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

possible bugs with States in grammar, please verify

I have four states in my grammar file.  There are overlap in two of the
tokens, but they are defined in two different states.  One of the token
(valid_input) kept being matched even when the system is not in its
defined states.

Attached files:  basic.grm  (is the grammar file to feed to SableCC)
	           basic.html (is the input sequence to feed the test program)
	           ExtLexer.java  (will print out the debug information)
		Testmain.java (is the test program with main() )

Can anyone run these files for me to verify if a bug exist?

at the dos prompt>
 java -mx1024m SableCC basic.grm

after parser generated successfully,
compile ExtLexer.java and Testmain.java

then run the test program with basic.html
java Testmain basic.html

Should error out at TValidinput, State: 2, text:[body bgcolor]
parserException[5,4] TBody expected

When it encounter 'body bgcolor', it should match 'body' to token body, '
' to token blank1, and bgcolor to token bgcolor.  Any ideas why it is

Thanks in Advance