[antlr-interest] simple function exercise (take 2)

eric nelson wirecracker at gmail.com
Mon Oct 17 16:16:54 PDT 2005


I tried this earlier, but it appeared saying that an HTML attachment had
been scrubbed ... anyways, can you see it now? ;)
 I haven't posted for awhile since my research responsibilities shifted over
the summer, but my goal is still to learn ANTLR ... Its actually been
driving me crazy, although mabye that's why it holds my interest? ;)
 Well here is a simple exercise that would give me some insight:
 Using a Java grammar, write a source to source translator that simply
recognizes functions and replaces the names as such:
 1) replace "main" (or "int main" or whatever) with "func_0"
2) append to all other functions "func_1" ... "func_n"
 I'd like the new source code to be written to a file ... although honestly
I'll take anything you can throw my way. You might ask me for what purpose
I'd like to do this ... I'd probably just answer its because I have no idea
what I'm doing ;) Thanks for any tips!
  - e
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20051017/2f67d3bd/attachment.html


More information about the antlr-interest mailing list