Reinit method Usage
Hi there,
I am trying to use a Reinit method and I get some errors with it. Please help me to debug this issue. I have the following code in a FOR loop:
--------------------------------------------------
StringReader sr = new StringReader( t3 );
Reader r = new BufferedReader (sr);
check parser = new check(r);
parser.ReInit(r);
String event1 = check.event();
---------------------------------------------------
My StringReader gets a new String "t3" every time it enters the loop. I have a Reinit method to reinitialize the input but I get the following error each time I try to use the String "t3" but the first instance of Stinrg "t3" runs fine:
---------------------------------------------------
ERROR: Second call to constructor of static parser.
You must either use ReInit() or set the JavaCC option STATIC to false
during parser generation.
Exception in thread "main" java.lang.Error
at event.check.<init>(check.java:1384)
at event.check.main(check.java:205)
---------------------------------------------------
Please help me to use the reinit method in correctly.
Thanks.