Package org.antlr.stringtemplate

Examples of org.antlr.stringtemplate.StringTemplateGroup


    CodeGenerator generator = new CodeGenerator(antlr, g, "Java");
    ActionTranslatorLexer translator = new ActionTranslatorLexer(generator,"a",
                                   new antlr.CommonToken(ANTLRParser.ACTION,action),1);
    String rawTranslation =
      translator.translate();
    StringTemplateGroup templates =
      new StringTemplateGroup(".", AngleBracketTemplateLexer.class);
    StringTemplate actionST = new StringTemplate(templates, rawTranslation);
    String found = actionST.toString();
    assertEquals(expecting, found);

    int expectedMsgID = ErrorManager.MSG_UNKNOWN_SIMPLE_ATTRIBUTE;
View Full Code Here


    generator.genRecognizer(); // forces load of templates
    ActionTranslatorLexer translator = new ActionTranslatorLexer(generator,"a",
                                   new antlr.CommonToken(ANTLRParser.ACTION,action),1);
    String rawTranslation =
      translator.translate();
    StringTemplateGroup templates =
      new StringTemplateGroup(".", AngleBracketTemplateLexer.class);
    StringTemplate actionST = new StringTemplate(templates, rawTranslation);
    String found = actionST.toString();
    assertEquals(expecting, found);

    assertEquals("unexpected errors: "+equeue, 0, equeue.errors.size());
View Full Code Here

    CodeGenerator generator = new CodeGenerator(antlr, g, "Java");
    ActionTranslatorLexer translator = new ActionTranslatorLexer(generator, "b",
                                   new antlr.CommonToken(ANTLRParser.ACTION,action),1);
    String rawTranslation =
      translator.translate();
    StringTemplateGroup templates =
      new StringTemplateGroup(".", AngleBracketTemplateLexer.class);
    StringTemplate actionST = new StringTemplate(templates, rawTranslation);
    String found = actionST.toString();
    assertEquals(expecting, found);

    int expectedMsgID = ErrorManager.MSG_INVALID_RULE_PARAMETER_REF;
View Full Code Here

    CodeGenerator generator = new CodeGenerator(antlr, g, "Java");
    ActionTranslatorLexer translator = new ActionTranslatorLexer(generator, "b",
                                   new antlr.CommonToken(ANTLRParser.ACTION,action),1);
    String rawTranslation =
      translator.translate();
    StringTemplateGroup templates =
      new StringTemplateGroup(".", AngleBracketTemplateLexer.class);
    StringTemplate actionST = new StringTemplate(templates, rawTranslation);
    String found = actionST.toString();
    assertEquals(expecting, found);

    int expectedMsgID = ErrorManager.MSG_INVALID_RULE_SCOPE_ATTRIBUTE_REF;
View Full Code Here

    CodeGenerator generator = new CodeGenerator(antlr, g, "Java");
    ActionTranslatorLexer translator = new ActionTranslatorLexer(generator, "b",
                                   new antlr.CommonToken(ANTLRParser.ACTION,action),1);
    String rawTranslation =
      translator.translate();
    StringTemplateGroup templates =
      new StringTemplateGroup(".", AngleBracketTemplateLexer.class);
    StringTemplate actionST = new StringTemplate(templates, rawTranslation);
    String found = actionST.toString();
    assertEquals(expecting, found);

    int expectedMsgID = ErrorManager.MSG_UNKNOWN_RULE_ATTRIBUTE;
View Full Code Here

    ActionTranslatorLexer translator = new ActionTranslatorLexer(generator,
                                   null,
                                   new antlr.CommonToken(ANTLRParser.ACTION,action),0);
    String rawTranslation =
      translator.translate();
    StringTemplateGroup templates =
      new StringTemplateGroup(".", AngleBracketTemplateLexer.class);
    StringTemplate actionST = new StringTemplate(templates, rawTranslation);
    String found = actionST.toString();
    assertEquals(expecting, found);

    int expectedMsgID = ErrorManager.MSG_ATTRIBUTE_REF_NOT_IN_RULE;
View Full Code Here

    ActionTranslatorLexer translator = new ActionTranslatorLexer(generator,
                                   null,
                                   new antlr.CommonToken(ANTLRParser.ACTION,action),0);
    String rawTranslation =
      translator.translate();
    StringTemplateGroup templates =
      new StringTemplateGroup(".", AngleBracketTemplateLexer.class);
    StringTemplate actionST = new StringTemplate(templates, rawTranslation);
    String found = actionST.toString();
    assertEquals(expecting, found);

    int expectedMsgID = ErrorManager.MSG_ATTRIBUTE_REF_NOT_IN_RULE;
View Full Code Here

    generator.genRecognizer(); // forces load of templates
    ActionTranslatorLexer translator = new ActionTranslatorLexer(generator,"a",
                                   new antlr.CommonToken(ANTLRParser.ACTION,action),1);
    String rawTranslation =
      translator.translate();
    StringTemplateGroup templates =
      new StringTemplateGroup(".", AngleBracketTemplateLexer.class);
    StringTemplate actionST = new StringTemplate(templates, rawTranslation);
    String found = actionST.toString();
    assertEquals(expecting, found);

    assertEquals("unexpected errors: "+equeue, 0, equeue.errors.size());
View Full Code Here

    generator.genRecognizer(); // forces load of templates
    ActionTranslatorLexer translator = new ActionTranslatorLexer(generator,"a",
                                   new antlr.CommonToken(ANTLRParser.ACTION,action),1);
    String rawTranslation =
      translator.translate();
    StringTemplateGroup templates =
      new StringTemplateGroup(".", AngleBracketTemplateLexer.class);
    StringTemplate actionST = new StringTemplate(templates, rawTranslation);
    String found = actionST.toString();
    assertEquals(expecting, found);

    assertEquals("unexpected errors: "+equeue, 0, equeue.errors.size());
View Full Code Here

    generator.genRecognizer(); // forces load of templates
    ActionTranslatorLexer translator = new ActionTranslatorLexer(generator,"a",
                                   new antlr.CommonToken(ANTLRParser.ACTION,action),1);
    String rawTranslation =
      translator.translate();
    StringTemplateGroup templates =
      new StringTemplateGroup(".", AngleBracketTemplateLexer.class);
    StringTemplate actionST = new StringTemplate(templates, rawTranslation);
    String found = actionST.toString();
    assertEquals(expecting, found);

    assertEquals("unexpected errors: "+equeue, 0, equeue.errors.size());
View Full Code Here

TOP

Related Classes of org.antlr.stringtemplate.StringTemplateGroup

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.