[antlr-interest] using RandomPhrase feature

harsha.nagesh at thomsonreuters.com harsha.nagesh at thomsonreuters.com
Tue Jul 21 21:46:04 PDT 2009


I am playing with the RandomPhrase feature in antlr to generate random
phrases based on a grammar. Infact I took the Expr grammar on antlr
website to try out this feature. Firstly I had to bump up the heap size
to more than 512mb to get any output from the program. After that I did
get a few expressions generated and sometimes it simply exited without
printing anything (perhaps the expression generated just matched NEWLINE
in the Expr grammar). Sometimes it went out of memory.

I am wondering if anybody has suggestions on how to control the behavior
of this feature ? Perhaps feed our own lexical tokens to the generator
and control the length of the expression ?

Thanks
Harsha


More information about the antlr-interest mailing list