[antlr-interest] The behavior.....

Meena Vinod spprtmail09 at yahoo.com
Mon Jan 26 20:03:06 PST 2009


Hello,
This pet project of mine requires that I can validate a command. The command is of the form <command_name><command options>

My lexer consists of all the command names and options:

Ex: 
    
    CMD_CD : 'cd';
    CMD_SHOW: 'show';
    CMD_RESET: 'reset';
    CMD_SET: 'set';
    CMD_OPTION: '-all' | '-help';
    TSEP: ' ' { SKIP(); };

The parser is defined as:
cmd_validate: (cmd)(CMD_OPTION);

cmd: CMD_CD | CMD_SHOW | CMD_RESET | CMD_SET;

For all valid inputs, the cmd_validate behaves properly.

On the ANTLRWorks, when I give a junk input say 'zee zee', the ANTLRWorks does not generate any proper output and does not evn throw an exception.
Also, the C code generated hangs when given this input.

Can someone help me out on this?

Many thanks,
Swift.


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20090126/3e893db2/attachment.html 


More information about the antlr-interest mailing list