Related articles |
---|
problem with cup didelot@iie.cnam.fr (Xavier Didelot) (2002-07-15) |
Re: problem with cup ronih@luukku.com (Roni Hursti) (2002-07-31) |
From: | "Xavier Didelot" <didelot@iie.cnam.fr> |
Newsgroups: | comp.compilers |
Date: | 15 Jul 2002 23:45:31 -0400 |
Organization: | Club Web! |
Keywords: | Java, question |
Posted-Date: | 15 Jul 2002 23:45:29 EDT |
Hello,
I have a little problem using cup. I need to have my program for
example write something in a file in certain cases of the grammar. I
have a rule looking like this :
expr ::= true {: file.println("lol"); :}
but how to make the variable file accessible to this part of the code
? this line of code will be in the cup$parser$actions class, so that
it doesn't have access to anything... Or is there a way to give it a
member and initialize it in the cup file ? (of course it would be easy
to make it work by modifing the code generated by cup, but it's not my
aim...)
Thanks,
--
Xavier Didelot
Return to the
comp.compilers page.
Search the
comp.compilers archives again.