ShouldExecuteTestScripts test causes an exception

Oct 9, 2009 at 8:12 AM

A great project, with a very rapid development. Your code can be really useful!

When running the tests under the VS 2008 Debugger, I get an exception when running the ShouldExecuteTestScripts test of type Antlr.Runtime.MismatchedTokenException.

The Antlr.Runtime.MismatchedTokenException exception is thrown at the statement: Match('\n'); in line 2625 in Jint\Parser\JavaScriptLexer.cs. This was on version 0.7.3. The same problem I also got on version 0.7.2, but on line 2600 in that version of the source code.

One thing that would be nice, was if you updated the version numbers in the AssemblyInfo.cs files, for improved version control.

Here are the details of the exception.

Antlr.Runtime.MismatchedTokenException was unhandled by user code
  Message="Forårsaket unntak av typen Antlr.Runtime.MismatchedTokenException."
  Source="Antlr3.Runtime"
  Char=-1
  CharPositionInLine=48
  Index=454
  Line=19
  UnexpectedType=-1
  Expecting=10
  StackTrace:
       ved Antlr.Runtime.Lexer.Match(Int32 c)
       ved JavaScriptLexer.mLINE_COMMENT() i C:\jobb\DotNet\Jint\Jint - Sources 0.7.3\Jint\Parser\JavaScriptLexer.cs:linje 2625
       ved JavaScriptLexer.mTokens() i C:\jobb\DotNet\Jint\Jint - Sources 0.7.3\Jint\Parser\JavaScriptLexer.cs:linje 3146
       ved Antlr.Runtime.Lexer.NextToken()
  InnerException:

Best regards,

K

Oct 9, 2009 at 8:29 AM

Yes it's a normal behavior. Antlr uses exceptions to recover from no end paths. This exception is handled and recovers normally, unstead you have executed the tests in debug mode and maybe also registered to all CLR runtime exception in the Debug options. I'm using a deployment script which would fail if any of the tests would not pass.

Oct 9, 2009 at 9:07 AM

Fine!

Keep up the great work!