[antlr-interest] question about 'while' logic

csnowfox_antlr at 126.com csnowfox_antlr at 126.com
Mon Jul 2 19:14:56 PDT 2007


But i can't find the enlighten from the example where in the download pag.
The examples only do the things that parser a language to another old language.
Do not have a example about parsering and executing a new language directly.
I want to implement the following logic in antlr:
a=5;
while(a>2){
      a=a-1;
}
print a;
the input file should be above,and the output file's content should be
2
the cycle logic has ran in the antlr's action,and the 'while' expr has do not only get get a 'wihle' string.
can anybody help me and give me a enlight to do that?


梦 幻 西 游,千 万 人 的 选 择,你 的 选 择  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070703/913815bf/attachment.html 


More information about the antlr-interest mailing list