Menu

An internal error occurred ...

edude
2011-12-15
2013-05-28
  • edude

    edude - 2011-12-15

    Hello,

    I get this exception
    An internal error occurred during: "ANTLR Event Listener". For input string: "false"
    when I type in AUTOMATIC in the Interpreter.

    my gramatic looks like this:
    _grammar TEST;

    options
    {
      language = Java;
    }

    @header
    {
      package com.test.lr;
     
    }

    @lexer::header
    {
      package com.test.lr;
    }
     
    module 
      :
          (
              'AUTOMATIC'
            | 'TAG' {System.out.println("hallo");}
          )?
      ;

    WS  : (' '|'\r'|'\t'|'\u000C'|'\n') {$channel=HIDDEN;}
        ;_

    I am using ANTLR3.4 and ANTLR IDE 2.1.2

    Can anyone help me? thank you.

    edude

     
  • Anonymous

    Anonymous - 2011-12-16

    Hi,

    I am getting same error:

    I am using Antlr IDE 2.1.2 on eclipse Indigo and Antlr 3.4.

    Can anyone help?

    Thanks,
    Jay

     
  • Anonymous

    Anonymous - 2011-12-16

    Here is stack trace:

    java.lang.NumberFormatException: For input string: "false"
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
    at java.lang.Integer.parseInt(Integer.java:449)
    at java.lang.Integer.parseInt(Integer.java:499)
    at org.deved.antlride.debug.model.event.AntlrDebugDecisionEvent.<init>(AntlrDebugDecisionEvent.java:22)
    at org.deved.antlride.debug.model.event.AntlrDebugEventFactory.createFromString(AntlrDebugEventFactory.java:58)
    at org.deved.antlride.jdt.launch.AntlrJavaLauncher$1.run(AntlrJavaLauncher.java:193)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

    Thanks,
    Jay

     
  • edude

    edude - 2011-12-16

    short question:  how did you get the stack trace?

     
  • edude

    edude - 2011-12-16

    btw I think it works in ANTLRWorks 1.4.3

     
  • Anonymous

    Anonymous - 2011-12-16

    In Eclipse Menu, Window->Show View->Error Log.
    In Error Log view  (possibly in bottom), you will get message/plugin/Date as column headers in a table. Dbl Click on your error.

    Thanks,
    Jay

     
  • Anonymous

    Anonymous - 2011-12-16

    My grammar also works, I think issue is something else…

     
  • edude

    edude - 2011-12-16

    ah. thank you for the Error Log hint!

     
  • Anonymous

    Anonymous - 2012-02-15

    I have the same problem.

    message
    An internal error occurred during: "ANTLR Event Listener".

    Exception Stack Trace
    java.lang.NumberFormatException: For input string: "false"
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
    at java.lang.Integer.parseInt(Integer.java:449)
    at java.lang.Integer.parseInt(Integer.java:499)
    at org.deved.antlride.debug.model.event.AntlrDebugDecisionEvent.<init>(AntlrDebugDecisionEvent.java:22)
    at org.deved.antlride.debug.model.event.AntlrDebugEventFactory.createFromString(AntlrDebugEventFactory.java:58)
    at org.deved.antlride.jdt.launch.AntlrJavaLauncher$1.run(AntlrJavaLauncher.java:193)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

    Session Data

    eclipse.buildId=Powered by Pulse
    java.version=1.6.0_29
    java.vendor=Apple Inc.
    BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
    Framework arguments:  -keyring /Users/lscoughlin/.eclipse_keyring -showlocation
    Command-line arguments:  -os macosx -ws cocoa -arch x86_64 -keyring /Users/lscoughlin/.eclipse_keyring -showlocation

     
  • Christian Hinrichs

    I get the same error if I try to run certain grammars in the interpreter using the "Run (Java)" option instead of just "Run". It seems to be a problem of quantifiers. Consider the following minimal grammar example:

    grammar Sample;
    options {
      language = Java;
    }
    rule: CHAR;
    CHAR
        :   .
        ;
    

    This grammar works. But as soon as on extends the parser rule with a quantifier (I tried "+", "?" and "*"), it crashes with the above reported Exception:

    grammar Sample;
    options {
      language = Java;
    }
    rule: CHAR?;
    CHAR
        :   .
        ;
    

    Tested in Eclipse Indigo.

     
  • Christian Hinrichs

    *push*

    @dev:
    Any progress here? Or, at least, any cue how to fix this on our own? I would really like to use this release in class in June, so please give us a hint…

     

Log in to post a comment.