05-21-07 06:19 PM
max.giacometti@gmail.com wrote:
> Hi everybody!
>
> I am using lex and yacc to write a vhdl to systemc converter.
>
> Lex simply reads the input file and yacc implements grammar and
> translation.
>
> I'd like to be able to make yacc able to command lex to stop reading
> the current file and starting reading another file, when the inclusion
> syntax is reached.
>
> How can I do that?
>
I guess that the easiest and most maintainable way is to use a
preprocessor step, just like the C compiler does. That way lex&yacc can
parse everything as one file.
If you stick with the C syntax for preprocessing directives, you can
even use the C preprocessor itself.
Just my 0.02$
Boa
--
Looking for an embeddable web server?
http://www.metasystems.no/products/...nder/index.html
[ Post a follow-up to this message ]
|