posted 18 years ago
Hello!
I'm a new user to JavaCC and I could use some help if anyone is willing. So far I've written the .jj file for my code and have gotten JavaCC to generate all 7 files but now I want it to do something more and I'm not sure where to start. My parser uses a GUI. It takes the parser text in from an editable TextArea and appends the output to an uneditable TextArea. What I need my parser to do is to print out a message as it parses each token, something like this:
Expecting digit...
digit found at line 1, column 2.
The error reporting works perfectly correctly and I have the errors showing up in the TextArea for the output but how do I get JavaCC to output this kind of a message to my output TextArea? I'm not sure where to start. I've pasted the code for my .jj file below...