[antlr-interest] using RandomPhrase feature
Terence Parr
parrt at cs.usfca.edu
Wed Jul 22 12:28:41 PDT 2009
On Jul 21, 2009, at 9:46 PM, <harsha.nagesh at thomsonreuters.com> <harsha.nagesh at thomsonreuters.com
> wrote:
> 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.
It is only a prototype. Unfortunately, it uses the stack to dig down
deeper into the state machine. This will only work for so long of a
string before it explodes stack. :(
Ter
>
> 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
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
More information about the antlr-interest
mailing list