[antlr-interest] Best practise to handle undefined reference symbol

Xu Kai xukaiv at gmail.com
Tue Mar 1 05:51:06 PST 2011


Hi,
   I am new to language design and I am designing a language to generate
code for sim card file decode.
   Is there any best practise for handling "undefined reference symbol" when
user use a type symbol before defining it?
   My current implementation is just print out the symbol name and call
system.exit(1) to stop further parsing? Is there a better way(throw custom
exception maybe)?
   Thanks a lot

-- 
Xu Kai


More information about the antlr-interest mailing list