Seeing that no one had a reply to my earlier query, I assume something got lost in the message or I am just being stupid.
I like to assume the former :-) I have been able to unit test the lexer, but the parser is giving me problems. Like I said, I am able to run the exact same text strings through the interpreter and everything works fine. But when I include the same strings in the .gunit file itself (with either dbl. quotes or dbl. angle brackets, '"' or '<<' & '>>') or include the test in a separate input file, the unit tests fails! I'm suspecting that it may be the way gunit is handling multiple newlines? The grammar defines a EOL as follows: EOL : ( CRCRLF | CRLF | LF ) ; fragment CRCRLF : '\r\r\n' ; fragment CRLF : '\r\n' ; fragment LF : '\n' ; With the CRCRLF form of newline being the most prevelant. Any ideas about how to get these unit tests to work via gunit? Thanks in advance, any clues would be appreciated. Greg -----Original Message----- Message: 10 Date: Thu, 9 Jul 2009 07:47:19 -0400 From: "Sylvain, Gregory [USA]" <[email protected]> Subject: [antlr-interest] Null Pointer Exception from valid gUnit test (ANTLR 3.1.3 and gnuit-1.0.4) To: "[email protected]" <[email protected]> Message-ID: <825e1b6d-3beb-4399-9b75-43fb79bf2...@mimectl> Content-Type: text/plain; charset="iso-8859-1" Hi, I've been trying to complete some unit testing of a grammar, and I keep getting Null Pointer Exceptions from valid gUnit tests. (The unit test strings work fine from the Interpreter in Eclipse (ANTLR IDE) and ANTLRWorks). Is this is a known bug, or am I just doing something obviously wrong. Thanks for any clues here, Greg -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20090709/bc267843/attachment-0001.html ------------------------------ List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en -~----------~----~----~----~------~----~------~--~---
