[antlr-interest] ANTLR C# chokes on ""

Hendy Irawan gauldong at gmail.com
Mon Mar 28 03:14:29 PST 2005


Hi!

Running the ANTLR C# lexer and feeding it nothing gives the following:

Aphrodox.Test.DocBlockParserTest.Empty :
System.ArgumentOutOfRangeException : Index was out of range.  Must be
non-negative and less than the size of the collection.
Parameter name: index

   at System.Collections.ArrayList.get_Item(Int32 index)
   at antlr.InputBuffer.LA(Int32 i)
   at antlr.CharScanner..ctor(LexerSharedInputState sharedState)
   at Aphrodox.DocBlock.DocBlockLexer..ctor(LexerSharedInputState
state) in d:\c4\vcs\aphrodox\docblock\docblocklexer.cs:line 53
   at Aphrodox.DocBlock.DocBlockLexer..ctor(InputBuffer ib) in
d:\c4\vcs\aphrodox\docblock\docblocklexer.cs:line 49
   at Aphrodox.DocBlock.DocBlockLexer..ctor(TextReader r) in
d:\c4\vcs\aphrodox\docblock\docblocklexer.cs:line 45
   at Aphrodox.Test.DocBlockParserTest.Empty() in
d:\c4\vcs\aphrodox\test\aphrodoxtest\docblockparsertest.cs:line 16

It happens even on all the examples. Just run the generated program,
however don't type anything just type Ctrl+Z. All examples will give
similar error.

Is this the expected behavior? I don't see that exception listed in
the "throws" list though...
-- 
Hendy Irawan - http://dev.gauldong.net - GaulDong Developer Center


More information about the antlr-interest mailing list