1. Diese Seite verwendet Cookies. Wenn du dich weiterhin auf dieser Seite aufhältst, akzeptierst du unseren Einsatz von Cookies. Weitere Informationen

[Java] evtl.[ANTLR] Suche Java Code Parser + Anleitung

Dieses Thema im Forum "OS X-Developer" wurde erstellt von FloydThreepwood, 25.06.09.

  1. FloydThreepwood

    FloydThreepwood Stechapfel

    Dabei seit:
    19.01.06
    Beiträge:
    161
    Hallo,

    Ich schreibe derzeit an einem kleinen Tool für Java Development (Son Compile & Run Button Teil). Dienstag habe ich mir gedacht, 'Hey wär doch super wenn man auch die Methodennamen + Zeile angezeigt bekommen würde...'. Also Frisch ans Werk und ANTLR gefunden, kurz durchgelesen und gedacht 'Damit gehts'. So.... nachdem ich seitdem jede Freie und nicht Freie Minute mit diesem Framework verbracht habe und mich tatsächlich schon durch einige der Unwegsamkeiten kämpfen konnte:

    Ich bekomme Java.g (1.6 unter Highlights) nicht kompiliert (Fehler 208) jedesmal wenn ich einen Anlauf nehmer bekomme ich denselben Fehler, dabei haben leider andere Grammars nicht die nötigen Deklarationen (u.a. keine Methoden Decl) implementiert. Da google und mein Verstand sich mittlerweile weigern mir weiter zu helfen richte ich jetzt meine Bitte an euch. Kann mir jemand vernünftig erklären wie man ANTLR oder etwas vergleichbares einsetzt einsetzt?

    MFG JPP
     
  2. FloydThreepwood

    FloydThreepwood Stechapfel

    Dabei seit:
    19.01.06
    Beiträge:
    161
    Mein Output:

    Code:
    [18:17:09] warning(209): Java.g:1741:1: Multiple token rules can match input such as "'*'": STAR, STAREQ
    
    As a result, token(s) STAREQ were disabled for that input
    [18:17:09] warning(209): Java.g:1781:1: Multiple token rules can match input such as "'i'": IF, IMPLEMENTS, IMPORT, INSTANCEOF, INT, INTERFACE, IDENTIFIER
    
    As a result, token(s) IMPLEMENTS,IMPORT,INSTANCEOF,INT,INTERFACE,IDENTIFIER were disabled for that input
    [18:17:09] warning(209): Java.g:1745:1: Multiple token rules can match input such as "'/'": COMMENT, LINE_COMMENT, SLASH, SLASHEQ
    
    As a result, token(s) LINE_COMMENT,SLASH,SLASHEQ were disabled for that input
    [18:17:09] warning(209): Java.g:1781:1: Multiple token rules can match input such as "'n'": NATIVE, NEW, NULL, IDENTIFIER
    
    As a result, token(s) NEW,NULL,IDENTIFIER were disabled for that input
    [18:17:09] warning(209): Java.g:1781:1: Multiple token rules can match input such as "'a'": ABSTRACT, ASSERT, IDENTIFIER
    
    As a result, token(s) ASSERT,IDENTIFIER were disabled for that input
    [18:17:09] warning(209): Java.g:1761:1: Multiple token rules can match input such as "'%'": PERCENT, PERCENTEQ
    
    As a result, token(s) PERCENTEQ were disabled for that input
    [18:17:09] warning(209): Java.g:1781:1: Multiple token rules can match input such as "'d'": DEFAULT, DO, DOUBLE, IDENTIFIER
    
    As a result, token(s) DO,DOUBLE,IDENTIFIER were disabled for that input
    [18:17:09] warning(209): Java.g:1781:1: Multiple token rules can match input such as "'e'": ELSE, ENUM, EXTENDS, IDENTIFIER
    
    As a result, token(s) ENUM,EXTENDS,IDENTIFIER were disabled for that input
    [18:17:09] warning(209): Java.g:1781:1: Multiple token rules can match input such as "'p'": PACKAGE, PRIVATE, PROTECTED, PUBLIC, IDENTIFIER
    
    As a result, token(s) PRIVATE,PROTECTED,PUBLIC,IDENTIFIER were disabled for that input
    [18:17:09] warning(209): Java.g:1324:1: Multiple token rules can match input such as "'1'..'9'": LONGLITERAL, INTLITERAL, FLOATLITERAL, DOUBLELITERAL
    
    As a result, token(s) INTLITERAL,FLOATLITERAL,DOUBLELITERAL were disabled for that input
    [18:17:09] warning(209): Java.g:1657:1: Multiple token rules can match input such as "'.'": FLOATLITERAL, DOUBLELITERAL, DOT, ELLIPSIS
    
    As a result, token(s) DOUBLELITERAL,DOT,ELLIPSIS were disabled for that input
    [18:17:09] warning(209): Java.g:1749:1: Multiple token rules can match input such as "'&'": AMPAMP, AMP, AMPEQ
    
    As a result, token(s) AMP,AMPEQ were disabled for that input
    [18:17:09] warning(209): Java.g:1324:1: Multiple token rules can match input such as "'0'": LONGLITERAL, INTLITERAL, FLOATLITERAL, DOUBLELITERAL
    
    As a result, token(s) INTLITERAL,FLOATLITERAL,DOUBLELITERAL were disabled for that input
    [18:17:09] warning(209): Java.g:1781:1: Multiple token rules can match input such as "'b'": BOOLEAN, BREAK, BYTE, IDENTIFIER
    
    As a result, token(s) BREAK,BYTE,IDENTIFIER were disabled for that input
    [18:17:09] warning(209): Java.g:1781:1: Multiple token rules can match input such as "'w'": WHILE, IDENTIFIER
    
    As a result, token(s) IDENTIFIER were disabled for that input
    [18:17:09] warning(209): Java.g:1781:1: Multiple token rules can match input such as "'t'": THIS, THROW, THROWS, TRANSIENT, TRY, TRUE, IDENTIFIER
    
    As a result, token(s) THROW,THROWS,TRANSIENT,TRY,TRUE,IDENTIFIER were disabled for that input
    [18:17:09] warning(209): Java.g:1781:1: Multiple token rules can match input such as "'r'": RETURN, IDENTIFIER
    
    As a result, token(s) IDENTIFIER were disabled for that input
    [18:17:09] warning(209): Java.g:1781:1: Multiple token rules can match input such as "'l'": LONG, IDENTIFIER
    
    As a result, token(s) IDENTIFIER were disabled for that input
    [18:17:09] warning(209): Java.g:1769:1: Multiple token rules can match input such as "'!'": BANG, BANGEQ
    
    As a result, token(s) BANGEQ were disabled for that input
    [18:17:09] warning(209): Java.g:1781:1: Multiple token rules can match input such as "'s'": SHORT, STATIC, STRICTFP, SUPER, SWITCH, SYNCHRONIZED, IDENTIFIER
    
    As a result, token(s) STATIC,STRICTFP,SUPER,SWITCH,SYNCHRONIZED,IDENTIFIER were disabled for that input
    [18:17:09] warning(209): Java.g:1781:1: Multiple token rules can match input such as "'f'": FINAL, FINALLY, FLOAT, FOR, FALSE, IDENTIFIER
    
    As a result, token(s) FINALLY,FLOAT,FOR,FALSE,IDENTIFIER were disabled for that input
    [18:17:09] warning(209): Java.g:1757:1: Multiple token rules can match input such as "'^'": CARET, CARETEQ
    
    As a result, token(s) CARETEQ were disabled for that input
    [18:17:09] warning(209): Java.g:1781:1: Multiple token rules can match input such as "'g'": GOTO, IDENTIFIER
    
    As a result, token(s) IDENTIFIER were disabled for that input
    [18:17:09] warning(209): Java.g:1753:1: Multiple token rules can match input such as "'|'": BARBAR, BAR, BAREQ
    
    As a result, token(s) BAR,BAREQ were disabled for that input
    [18:17:09] warning(209): Java.g:1781:1: Multiple token rules can match input such as "'c'": CASE, CATCH, CHAR, CLASS, CONST, CONTINUE, IDENTIFIER
    
    As a result, token(s) CATCH,CHAR,CLASS,CONST,CONTINUE,IDENTIFIER were disabled for that input
    [18:17:09] warning(209): Java.g:1681:1: Multiple token rules can match input such as "'='": EQ, EQEQ
    
    As a result, token(s) EQEQ were disabled for that input
    [18:17:09] warning(209): Java.g:1733:1: Multiple token rules can match input such as "'+'": PLUSPLUS, PLUS, PLUSEQ
    
    As a result, token(s) PLUS,PLUSEQ were disabled for that input
    [18:17:09] warning(209): Java.g:1737:1: Multiple token rules can match input such as "'-'": SUBSUB, SUB, SUBEQ
    
    As a result, token(s) SUB,SUBEQ were disabled for that input
    [18:17:10] warning(209): Java.g:1781:1: Multiple token rules can match input such as "'v'": VOID, VOLATILE, IDENTIFIER
    
    As a result, token(s) VOLATILE,IDENTIFIER were disabled for that input
    [18:17:10] error(208): Java.g:1769:1: The following token definitions can never be matched because prior tokens match the same input: INTLITERAL,DOUBLELITERAL,LINE_COMMENT,ASSERT,BREAK,BYTE,CATCH,CHAR,CLASS,CONST,CONTINUE,DO,DOUBLE,ENUM,EXTENDS,FINALLY,FLOAT,FOR,IMPLEMENTS,IMPORT,INSTANCEOF,INT,INTERFACE,NEW,PRIVATE,PROTECTED,PUBLIC,STATIC,STRICTFP,SUPER,SWITCH,SYNCHRONIZED,THROW,THROWS,TRANSIENT,TRY,VOLATILE,TRUE,FALSE,NULL,DOT,ELLIPSIS,EQEQ,PLUS,SUB,SLASH,AMP,BAR,PLUSEQ,SUBEQ,STAREQ,SLASHEQ,AMPEQ,BAREQ,CARETEQ,PERCENTEQ,BANGEQ
    [18:19:07] warning(209): Java.g:1741:1: Multiple token rules can match input such as "'*'": STAR, STAREQ
    
    As a result, token(s) STAREQ were disabled for that input
    [18:19:07] warning(209): Java.g:1781:1: Multiple token rules can match input such as "'i'": IF, IMPLEMENTS, IMPORT, INSTANCEOF, INT, INTERFACE, IDENTIFIER
    
    As a result, token(s) IMPLEMENTS,IMPORT,INSTANCEOF,INT,INTERFACE,IDENTIFIER were disabled for that input
    [18:19:07] warning(209): Java.g:1745:1: Multiple token rules can match input such as "'/'": COMMENT, LINE_COMMENT, SLASH, SLASHEQ
    
    As a result, token(s) LINE_COMMENT,SLASH,SLASHEQ were disabled for that input
    [18:19:07] warning(209): Java.g:1781:1: Multiple token rules can match input such as "'n'": NATIVE, NEW, NULL, IDENTIFIER
    
    As a result, token(s) NEW,NULL,IDENTIFIER were disabled for that input
    [18:19:07] warning(209): Java.g:1781:1: Multiple token rules can match input such as "'a'": ABSTRACT, ASSERT, IDENTIFIER
    
    As a result, token(s) ASSERT,IDENTIFIER were disabled for that input
    [18:19:07] warning(209): Java.g:1761:1: Multiple token rules can match input such as "'%'": PERCENT, PERCENTEQ
    
    As a result, token(s) PERCENTEQ were disabled for that input
    [18:19:07] warning(209): Java.g:1781:1: Multiple token rules can match input such as "'d'": DEFAULT, DO, DOUBLE, IDENTIFIER
    
    As a result, token(s) DO,DOUBLE,IDENTIFIER were disabled for that input
    [18:19:07] warning(209): Java.g:1781:1: Multiple token rules can match input such as "'e'": ELSE, ENUM, EXTENDS, IDENTIFIER
    
    As a result, token(s) ENUM,EXTENDS,IDENTIFIER were disabled for that input
    [18:19:07] warning(209): Java.g:1781:1: Multiple token rules can match input such as "'p'": PACKAGE, PRIVATE, PROTECTED, PUBLIC, IDENTIFIER
    
    As a result, token(s) PRIVATE,PROTECTED,PUBLIC,IDENTIFIER were disabled for that input
    [18:19:07] warning(209): Java.g:1324:1: Multiple token rules can match input such as "'1'..'9'": LONGLITERAL, INTLITERAL, FLOATLITERAL, DOUBLELITERAL
    
    As a result, token(s) INTLITERAL,FLOATLITERAL,DOUBLELITERAL were disabled for that input
    [18:19:07] warning(209): Java.g:1657:1: Multiple token rules can match input such as "'.'": FLOATLITERAL, DOUBLELITERAL, DOT, ELLIPSIS
    
    As a result, token(s) DOUBLELITERAL,DOT,ELLIPSIS were disabled for that input
    [18:19:07] warning(209): Java.g:1749:1: Multiple token rules can match input such as "'&'": AMPAMP, AMP, AMPEQ
    
    As a result, token(s) AMP,AMPEQ were disabled for that input
    [18:19:07] warning(209): Java.g:1324:1: Multiple token rules can match input such as "'0'": LONGLITERAL, INTLITERAL, FLOATLITERAL, DOUBLELITERAL
    
    As a result, token(s) INTLITERAL,FLOATLITERAL,DOUBLELITERAL were disabled for that input
    [18:19:07] warning(209): Java.g:1781:1: Multiple token rules can match input such as "'b'": BOOLEAN, BREAK, BYTE, IDENTIFIER
    
    As a result, token(s) BREAK,BYTE,IDENTIFIER were disabled for that input
    [18:19:07] warning(209): Java.g:1781:1: Multiple token rules can match input such as "'w'": WHILE, IDENTIFIER
    
    As a result, token(s) IDENTIFIER were disabled for that input
    [18:19:07] warning(209): Java.g:1781:1: Multiple token rules can match input such as "'t'": THIS, THROW, THROWS, TRANSIENT, TRY, TRUE, IDENTIFIER
    
    As a result, token(s) THROW,THROWS,TRANSIENT,TRY,TRUE,IDENTIFIER were disabled for that input
    [18:19:07] warning(209): Java.g:1781:1: Multiple token rules can match input such as "'r'": RETURN, IDENTIFIER
    
    As a result, token(s) IDENTIFIER were disabled for that input
    [18:19:07] warning(209): Java.g:1781:1: Multiple token rules can match input such as "'l'": LONG, IDENTIFIER
    
    As a result, token(s) IDENTIFIER were disabled for that input
    [18:19:07] warning(209): Java.g:1769:1: Multiple token rules can match input such as "'!'": BANG, BANGEQ
    
    As a result, token(s) BANGEQ were disabled for that input
    [18:19:07] warning(209): Java.g:1781:1: Multiple token rules can match input such as "'s'": SHORT, STATIC, STRICTFP, SUPER, SWITCH, SYNCHRONIZED, IDENTIFIER
    
    As a result, token(s) STATIC,STRICTFP,SUPER,SWITCH,SYNCHRONIZED,IDENTIFIER were disabled for that input
    [18:19:07] warning(209): Java.g:1781:1: Multiple token rules can match input such as "'f'": FINAL, FINALLY, FLOAT, FOR, FALSE, IDENTIFIER
    
    As a result, token(s) FINALLY,FLOAT,FOR,FALSE,IDENTIFIER were disabled for that input
    [18:19:07] warning(209): Java.g:1757:1: Multiple token rules can match input such as "'^'": CARET, CARETEQ
    
    As a result, token(s) CARETEQ were disabled for that input
    [18:19:07] warning(209): Java.g:1781:1: Multiple token rules can match input such as "'g'": GOTO, IDENTIFIER
    
    As a result, token(s) IDENTIFIER were disabled for that input
    [18:19:07] warning(209): Java.g:1753:1: Multiple token rules can match input such as "'|'": BARBAR, BAR, BAREQ
    
    As a result, token(s) BAR,BAREQ were disabled for that input
    [18:19:07] warning(209): Java.g:1781:1: Multiple token rules can match input such as "'c'": CASE, CATCH, CHAR, CLASS, CONST, CONTINUE, IDENTIFIER
    
    As a result, token(s) CATCH,CHAR,CLASS,CONST,CONTINUE,IDENTIFIER were disabled for that input
    [18:19:07] warning(209): Java.g:1681:1: Multiple token rules can match input such as "'='": EQ, EQEQ
    
    As a result, token(s) EQEQ were disabled for that input
    [18:19:07] warning(209): Java.g:1733:1: Multiple token rules can match input such as "'+'": PLUSPLUS, PLUS, PLUSEQ
    
    As a result, token(s) PLUS,PLUSEQ were disabled for that input
    [18:19:07] warning(209): Java.g:1737:1: Multiple token rules can match input such as "'-'": SUBSUB, SUB, SUBEQ
    
    As a result, token(s) SUB,SUBEQ were disabled for that input
    [18:19:07] warning(209): Java.g:1781:1: Multiple token rules can match input such as "'v'": VOID, VOLATILE, IDENTIFIER
    
    As a result, token(s) VOLATILE,IDENTIFIER were disabled for that input
    [18:19:07] error(208): Java.g:1769:1: The following token definitions can never be matched because prior tokens match the same input: INTLITERAL,DOUBLELITERAL,LINE_COMMENT,ASSERT,BREAK,BYTE,CATCH,CHAR,CLASS,CONST,CONTINUE,DO,DOUBLE,ENUM,EXTENDS,FINALLY,FLOAT,FOR,IMPLEMENTS,IMPORT,INSTANCEOF,INT,INTERFACE,NEW,PRIVATE,PROTECTED,PUBLIC,STATIC,STRICTFP,SUPER,SWITCH,SYNCHRONIZED,THROW,THROWS,TRANSIENT,TRY,VOLATILE,TRUE,FALSE,NULL,DOT,ELLIPSIS,EQEQ,PLUS,SUB,SLASH,AMP,BAR,PLUSEQ,SUBEQ,STAREQ,SLASHEQ,AMPEQ,BAREQ,CARETEQ,PERCENTEQ,BANGEQ
    [18:19:41] warning(205): Java.g:1:8: ANTLR could not analyze this decision in rule Tokens; often this is because of recursive rule references visible from the left edge of alternatives.  ANTLR will re-analyze the decision with a fixed lookahead of k=1.  Consider using "options {k=1;}" for that decision and possibly adding a syntactic predicate.
    [18:19:41] error(10):  internal error: org.antlr.tool.Grammar.createLookaheadDFA(Grammar.java:1242): could not even do k=1 for decision 33; reason: timed out (>1000ms)
     
    
    [18:20:07] warning(209): Java.g:1741:1: Multiple token rules can match input such as "'*'": STAR, STAREQ
    
    As a result, token(s) STAREQ were disabled for that input
    [18:20:07] warning(209): Java.g:1781:1: Multiple token rules can match input such as "'i'": IF, IMPLEMENTS, IMPORT, INSTANCEOF, INT, INTERFACE, IDENTIFIER
    
    As a result, token(s) IMPLEMENTS,IMPORT,INSTANCEOF,INT,INTERFACE,IDENTIFIER were disabled for that input
    [18:20:07] warning(209): Java.g:1745:1: Multiple token rules can match input such as "'/'": COMMENT, LINE_COMMENT, SLASH, SLASHEQ
    
    As a result, token(s) LINE_COMMENT,SLASH,SLASHEQ were disabled for that input
    [18:20:07] warning(209): Java.g:1781:1: Multiple token rules can match input such as "'n'": NATIVE, NEW, NULL, IDENTIFIER
    
    As a result, token(s) NEW,NULL,IDENTIFIER were disabled for that input
    [18:20:07] warning(209): Java.g:1781:1: Multiple token rules can match input such as "'a'": ABSTRACT, ASSERT, IDENTIFIER
    
    As a result, token(s) ASSERT,IDENTIFIER were disabled for that input
    [18:20:07] warning(209): Java.g:1761:1: Multiple token rules can match input such as "'%'": PERCENT, PERCENTEQ
    
    As a result, token(s) PERCENTEQ were disabled for that input
    [18:20:07] warning(209): Java.g:1781:1: Multiple token rules can match input such as "'d'": DEFAULT, DO, DOUBLE, IDENTIFIER
    
    As a result, token(s) DO,DOUBLE,IDENTIFIER were disabled for that input
    [18:20:07] warning(209): Java.g:1781:1: Multiple token rules can match input such as "'e'": ELSE, ENUM, EXTENDS, IDENTIFIER
    
    As a result, token(s) ENUM,EXTENDS,IDENTIFIER were disabled for that input
    [18:20:07] warning(209): Java.g:1781:1: Multiple token rules can match input such as "'p'": PACKAGE, PRIVATE, PROTECTED, PUBLIC, IDENTIFIER
    
    As a result, token(s) PRIVATE,PROTECTED,PUBLIC,IDENTIFIER were disabled for that input
    [18:20:07] warning(209): Java.g:1324:1: Multiple token rules can match input such as "'1'..'9'": LONGLITERAL, INTLITERAL, FLOATLITERAL, DOUBLELITERAL
    
    As a result, token(s) INTLITERAL,FLOATLITERAL,DOUBLELITERAL were disabled for that input
    [18:20:07] warning(209): Java.g:1657:1: Multiple token rules can match input such as "'.'": FLOATLITERAL, DOUBLELITERAL, DOT, ELLIPSIS
    
    As a result, token(s) DOUBLELITERAL,DOT,ELLIPSIS were disabled for that input
    [18:20:07] warning(209): Java.g:1749:1: Multiple token rules can match input such as "'&'": AMPAMP, AMP, AMPEQ
    
    As a result, token(s) AMP,AMPEQ were disabled for that input
    [18:20:07] warning(209): Java.g:1324:1: Multiple token rules can match input such as "'0'": LONGLITERAL, INTLITERAL, FLOATLITERAL, DOUBLELITERAL
    
    As a result, token(s) INTLITERAL,FLOATLITERAL,DOUBLELITERAL were disabled for that input
    [18:20:07] warning(209): Java.g:1781:1: Multiple token rules can match input such as "'b'": BOOLEAN, BREAK, BYTE, IDENTIFIER
    
    As a result, token(s) BREAK,BYTE,IDENTIFIER were disabled for that input
    [18:20:07] warning(209): Java.g:1781:1: Multiple token rules can match input such as "'w'": WHILE, IDENTIFIER
    
    As a result, token(s) IDENTIFIER were disabled for that input
    [18:20:07] warning(209): Java.g:1781:1: Multiple token rules can match input such as "'t'": THIS, THROW, THROWS, TRANSIENT, TRY, TRUE, IDENTIFIER
    
    As a result, token(s) THROW,THROWS,TRANSIENT,TRY,TRUE,IDENTIFIER were disabled for that input
    [18:20:07] warning(209): Java.g:1781:1: Multiple token rules can match input such as "'r'": RETURN, IDENTIFIER
    
    As a result, token(s) IDENTIFIER were disabled for that input
    [18:20:07] warning(209): Java.g:1781:1: Multiple token rules can match input such as "'l'": LONG, IDENTIFIER
    
    As a result, token(s) IDENTIFIER were disabled for that input
    [18:20:07] warning(209): Java.g:1769:1: Multiple token rules can match input such as "'!'": BANG, BANGEQ
    
    As a result, token(s) BANGEQ were disabled for that input
    [18:20:07] warning(209): Java.g:1781:1: Multiple token rules can match input such as "'s'": SHORT, STATIC, STRICTFP, SUPER, SWITCH, SYNCHRONIZED, IDENTIFIER
    
    As a result, token(s) STATIC,STRICTFP,SUPER,SWITCH,SYNCHRONIZED,IDENTIFIER were disabled for that input
    [18:20:07] warning(209): Java.g:1781:1: Multiple token rules can match input such as "'f'": FINAL, FINALLY, FLOAT, FOR, FALSE, IDENTIFIER
    
    As a result, token(s) FINALLY,FLOAT,FOR,FALSE,IDENTIFIER were disabled for that input
    [18:20:07] warning(209): Java.g:1757:1: Multiple token rules can match input such as "'^'": CARET, CARETEQ
    
    As a result, token(s) CARETEQ were disabled for that input
    [18:20:07] warning(209): Java.g:1781:1: Multiple token rules can match input such as "'g'": GOTO, IDENTIFIER
    
    As a result, token(s) IDENTIFIER were disabled for that input
    [18:20:07] warning(209): Java.g:1753:1: Multiple token rules can match input such as "'|'": BARBAR, BAR, BAREQ
    
    As a result, token(s) BAR,BAREQ were disabled for that input
    [18:20:07] warning(209): Java.g:1781:1: Multiple token rules can match input such as "'c'": CASE, CATCH, CHAR, CLASS, CONST, CONTINUE, IDENTIFIER
    
    As a result, token(s) CATCH,CHAR,CLASS,CONST,CONTINUE,IDENTIFIER were disabled for that input
    [18:20:07] warning(209): Java.g:1681:1: Multiple token rules can match input such as "'='": EQ, EQEQ
    
    As a result, token(s) EQEQ were disabled for that input
    [18:20:07] warning(209): Java.g:1733:1: Multiple token rules can match input such as "'+'": PLUSPLUS, PLUS, PLUSEQ
    
    As a result, token(s) PLUS,PLUSEQ were disabled for that input
    [18:20:07] warning(209): Java.g:1737:1: Multiple token rules can match input such as "'-'": SUBSUB, SUB, SUBEQ
    
    As a result, token(s) SUB,SUBEQ were disabled for that input
    [18:20:07] warning(209): Java.g:1781:1: Multiple token rules can match input such as "'v'": VOID, VOLATILE, IDENTIFIER
    
    As a result, token(s) VOLATILE,IDENTIFIER were disabled for that input
    [18:20:07] error(208): Java.g:1769:1: The following token definitions can never be matched because prior tokens match the same input: INTLITERAL,DOUBLELITERAL,LINE_COMMENT,ASSERT,BREAK,BYTE,CATCH,CHAR,CLASS,CONST,CONTINUE,DO,DOUBLE,ENUM,EXTENDS,FINALLY,FLOAT,FOR,IMPLEMENTS,IMPORT,INSTANCEOF,INT,INTERFACE,NEW,PRIVATE,PROTECTED,PUBLIC,STATIC,STRICTFP,SUPER,SWITCH,SYNCHRONIZED,THROW,THROWS,TRANSIENT,TRY,VOLATILE,TRUE,FALSE,NULL,DOT,ELLIPSIS,EQEQ,PLUS,SUB,SLASH,AMP,BAR,PLUSEQ,SUBEQ,STAREQ,SLASHEQ,AMPEQ,BAREQ,CARETEQ,PERCENTEQ,BANGEQ
    
     
  3. FloydThreepwood

    FloydThreepwood Stechapfel

    Dabei seit:
    19.01.06
    Beiträge:
    161
    OK, habe jetzt eine hlbwegs funktionierende Lösung, ich habe mir ein treetool.jar (Beispieldatei auf antlr.org)n runtergeladen und die darausstammenden Klassen in den Classpath gelegt, soweit funktioniert alles annehmbar.

    Kann mir einer sagen ob das legal ist?

    UPDATE: Hab gestern alles auf einem Windows Rechner Gemacht mit dem Resultat, dass mein jdk5 PowerBook das jetzt nicht mehr macht... SUPER! Ich suche also wieder nach dem oben beschriebenen. BITTE.
     
    #3 FloydThreepwood, 25.06.09
    Zuletzt bearbeitet: 26.06.09

Diese Seite empfehlen