[antlr-interest] Unit testing Parsers

PSheehan at decaresystems.ie PSheehan at decaresystems.ie
Thu Apr 10 06:46:54 PDT 2008


I'm testing every rule in the parser individual and this all worked great 
until I started adding a dynamic scopes to build up a symbol table.  The 
problem I have now is that since these scopes are not initialized some of 
the individual rule calls through an EmptyStack exception in my unit 
tests.  I've ignored the problem for now with a nasty line in the grammar 
which checks if the a specific scope it empty before it uses a scope. 
Ideally I'll like a way to inject data into scopes for unit testing.  I 
was wondering how other people have got around this. 

This e-mail and any files transmitted with it are intended solely for the individual or entity to whom they are addressed. This communication may contain material that is privileged, confidential and protected from disclosure under the law. If you are not the intended recipient, any disclosure, distribution, copying, or use of this information is strictly prohibited and may be unlawful. 

If you have received this e-mail in error, please reply immediately to the sender and delete it.

Registered Address:
DeCare Systems Ireland Ltd, 
Building 1, University Technology Centre, Curraheen Road, Cork, Ireland. 
Company Registration Number:  278462
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080410/5d258463/attachment-0001.html 


More information about the antlr-interest mailing list