[antlr-interest] Re: Translators Should Use Tree Grammars
atripp54321
atripp at comcast.net
Tue Nov 23 08:05:06 PST 2004
And:
3) At every variable declaration where the type is "FILE *",
look at all references and check for fopen() (and similar) calls
to check whether the file is opened for reading, writing, or both.
Replace the variable type by ObjectInputStream, ObjectOutputStream,
or RandomAccessFile based on that. Because you changed a variable type,
be sure to check all other references of the variable, as you may
have to also change the types of other variables. During that
checking, you may find that in fact you can't make it an
ObjectInputStream and you'll have to resort to RandomAccessFile.
Change all references for read/write to their Java equivalents.
Wrap all these IO operations in appropriate try/catch blocks
at a reasonable level.
I just picked that transformation rule at random...let me
know if you'd like me to search for a complicated one :)
Andy
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/antlr-interest/
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list