Package org.antlr.tool

Examples of org.antlr.tool.GrammarSemanticsMessage


      translator.translate();

    int expectedMsgID = ErrorManager.MSG_WRITE_TO_READONLY_ATTR;
    Object expectedArg = "other";
    Object expectedArg2 = "tree";
    GrammarSemanticsMessage expectedMessage =
      new GrammarSemanticsMessage(expectedMsgID, g, null, expectedArg, expectedArg2);
    String expectedMessageString = expectedMessage.toString();
    assertEquals(expectedMessageString, expectedMessage.toString());
  }
View Full Code Here


    generator.genRecognizer();

    int expectedMsgID = ErrorManager.MSG_UNDEFINED_RULE_REF;
    Object expectedArg = "ugh";
    Object expectedArg2 = null;
    GrammarSemanticsMessage expectedMessage =
      new GrammarSemanticsMessage(expectedMsgID, g, null, expectedArg, expectedArg2);

    checkError(equeue, expectedMessage);
  }
View Full Code Here

    generator.genRecognizer();

    int expectedMsgID = ErrorManager.MSG_REWRITE_ELEMENT_NOT_PRESENT_ON_LHS;
    Object expectedArg = "b";
    Object expectedArg2 = null;
    GrammarSemanticsMessage expectedMessage =
      new GrammarSemanticsMessage(expectedMsgID, g, null, expectedArg, expectedArg2);

    checkError(equeue, expectedMessage);
  }
View Full Code Here

    generator.genRecognizer();

    int expectedMsgID = ErrorManager.MSG_UNDEFINED_TOKEN_REF_IN_REWRITE;
    Object expectedArg = "ICK";
    Object expectedArg2 = null;
    GrammarSemanticsMessage expectedMessage =
      new GrammarSemanticsMessage(expectedMsgID, g, null, expectedArg, expectedArg2);

    checkError(equeue, expectedMessage);
  }
View Full Code Here

    generator.genRecognizer();

    int expectedMsgID = ErrorManager.MSG_UNDEFINED_LABEL_REF_IN_REWRITE;
    Object expectedArg = "foo";
    Object expectedArg2 = null;
    GrammarSemanticsMessage expectedMessage =
      new GrammarSemanticsMessage(expectedMsgID, g, null, expectedArg, expectedArg2);

    checkError(equeue, expectedMessage);
  }
View Full Code Here

    generator.genRecognizer();

    int expectedMsgID = ErrorManager.MSG_UNDEFINED_TOKEN_REF_IN_REWRITE;
    Object expectedArg = "'a'";
    Object expectedArg2 = null;
    GrammarSemanticsMessage expectedMessage =
      new GrammarSemanticsMessage(expectedMsgID, g, null, expectedArg, expectedArg2);

    checkError(equeue, expectedMessage);
  }
View Full Code Here

    generator.genRecognizer();

    int expectedMsgID = ErrorManager.MSG_UNDEFINED_TOKEN_REF_IN_REWRITE;
    Object expectedArg = "'foo'";
    Object expectedArg2 = null;
    GrammarSemanticsMessage expectedMessage =
      new GrammarSemanticsMessage(expectedMsgID, g, null, expectedArg, expectedArg2);

    checkError(equeue, expectedMessage);
  }
View Full Code Here

    g.setCodeGenerator(generator);
    generator.genRecognizer(); // forces load of templates

    int expectedMsgID = ErrorManager.MSG_INVALID_TEMPLATE_ACTION;
    Object expectedArg = "%x.";
    GrammarSemanticsMessage expectedMessage =
      new GrammarSemanticsMessage(expectedMsgID, g, null, expectedArg);
    checkError(equeue, expectedMessage);
  }
View Full Code Here

    g.setCodeGenerator(generator);
    generator.genRecognizer(); // forces load of templates

    int expectedMsgID = ErrorManager.MSG_INVALID_TEMPLATE_ACTION;
    Object expectedArg = "%x";
    GrammarSemanticsMessage expectedMessage =
      new GrammarSemanticsMessage(expectedMsgID, g, null, expectedArg);
    checkError(equeue, expectedMessage);
  }
View Full Code Here

    generator.genRecognizer();

    int expectedMsgID = ErrorManager.MSG_UNDEFINED_RULE_REF;
    Object expectedArg = "ugh";
    Object expectedArg2 = null;
    GrammarSemanticsMessage expectedMessage =
      new GrammarSemanticsMessage(expectedMsgID, g, null, expectedArg, expectedArg2);

    checkError(equeue, expectedMessage);
  }
View Full Code Here

TOP

Related Classes of org.antlr.tool.GrammarSemanticsMessage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.