[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Fwd: Help with COBOL grammar for sablecc]

> I came cross a problem when I use SableCC to generate COBOL parser.
> My COBOL grammar is quite big and already in SableCC format.
> The problem is that every time I run "java SableCC cobol.grammar",
> it terminated with message 'OutOfMemoryError' at the step" generating
> parser".

Interesting...  Your grammar must have quite a lot of productions!  Did
you try generating a parser for a subset of this grammar?

> I tried to use -mx and -ms option of java, but it doesn't work.
> And my machine has 256M memory and virtual page size is set to
> 2048M. Sometimes the running time is more than 8 hours.

This was the first thing to do (-mx & -ms options).  If you are running
on virtual memory, then 8 hours is not surprizing.  As soon as the
system starts writing pages to disk, garbage collection makes the
process even more painful!

> I don't know what is the problem.  Help are urgently wanted! Please...

Do you have a copy of the grammar to experiment with?

> By the way,  does anyone have COBOL grammar for SableCC? As I am not
> sure
> about the correctness of my cobol grammar.

I'd be interested in this too...  

Etienne M. Gagnon, M.Sc.                     e-mail: egagnon@j-meg.com
Author of SableCC:                 http://www.sable.mcgill.ca/sablecc/