Related articles |
---|
Writing a symbol table in Perl destraynor@yahoo.ie (2002-03-17) |
Re: Writing a symbol table in Perl joachim_d@gmx.de (Joachim Durchholz) (2002-03-19) |
Re: Writing a symbol table in Perl destraynor@yahoo.ie (2002-03-21) |
Re: Writing a symbol table in Perl ed_walker@sympatico.ca (Edward Walker) (2002-03-21) |
From: | destraynor@yahoo.ie (Des Traynor) |
Newsgroups: | comp.compilers |
Date: | 17 Mar 2002 22:42:15 -0500 |
Organization: | http://groups.google.com/ |
Keywords: | question, practice |
Posted-Date: | 17 Mar 2002 22:42:15 EST |
I need to write a program that will perform semantics checking on a
java program, (i.e type checking,scope checking , method
invocation,uniqueness checking etc ). I can assume the input to the
program will be a lexically and syntactically correct program.
I am considering writing it in Perl, I believe that perl could
analyse the text of the program fairly quickly, implement a
(reasonably) efficient symbol table, and through pattern matching
perform all the necessary checks.
Does anyone see any immediate problems with this , Has anyone done it
before, or does anyone have any opinions on it.
All input will be gratefully accepted
Des Traynor
[Doing symbol tables in perl is really easy. A straightforward way is to
make the symbol table a perl table indexed by symbol name, and the values
pointers to either tables or arrays with the symbol's info. -John]
Return to the
comp.compilers page.
Search the
comp.compilers archives again.