Package antlr

Examples of antlr.MismatchedTokenException


        AST __t177 = _t;
        r = _t==ASTNULL ? null :(AST)_t;
        match(_t,DOT);
        _t = _t.getFirstChild();
        AST tmp74_AST_in = (AST)_t;
        if ( _t==null ) throw new MismatchedTokenException();
        _t = _t.getNextSibling();
        AST tmp75_AST_in = (AST)_t;
        if ( _t==null ) throw new MismatchedTokenException();
        _t = _t.getNextSibling();
        _t = __t177;
        _t = _t.getNextSibling();
        if ( inputState.guessing==0 ) {
          out(r);
View Full Code Here


      {
        id = (org.antlr.stringtemplate.language.StringTemplateAST)_t;
        match(_t,ID);
        _t = _t.getNextSibling();
        a1 = (org.antlr.stringtemplate.language.StringTemplateAST)_t;
        if ( _t==null ) throw new MismatchedTokenException();
        _t = _t.getNextSibling();
        name=id.getText(); args=a1;
        break;
      }
      case VALUE:
      {
        AST __t12 = _t;
        org.antlr.stringtemplate.language.StringTemplateAST tmp9_AST_in = (org.antlr.stringtemplate.language.StringTemplateAST)_t;
        match(_t,VALUE);
        _t = _t.getFirstChild();
        n=expr(_t);
        _t = _retTree;
        a2 = (org.antlr.stringtemplate.language.StringTemplateAST)_t;
        if ( _t==null ) throw new MismatchedTokenException();
        _t = _t.getNextSibling();
        _t = __t12;
        _t = _t.getNextSibling();
        if (n!=null) {name=n.toString();} args=a2;
        break;
View Full Code Here

      {
        t = (org.antlr.stringtemplate.language.StringTemplateAST)_t;
        match(_t,ID);
        _t = _t.getNextSibling();
        args = (org.antlr.stringtemplate.language.StringTemplateAST)_t;
        if ( _t==null ) throw new MismatchedTokenException();
        _t = _t.getNextSibling();
       
        String templateName = t.getText();
        StringTemplateGroup group = self.getGroup();
        StringTemplate embedded = group.getEmbeddedInstanceOf(self, templateName);
        if ( embedded!=null ) {
        embedded.setArgumentsAST(args);
        templatesToApply.addElement(embedded);
        }
       
        break;
      }
      case ANONYMOUS_TEMPLATE:
      {
        anon = (org.antlr.stringtemplate.language.StringTemplateAST)_t;
        match(_t,ANONYMOUS_TEMPLATE);
        _t = _t.getNextSibling();
       
        StringTemplate anonymous = anon.getStringTemplate();
        templatesToApply.addElement(anonymous);
       
        break;
      }
      case VALUE:
      {
        AST __t28 = _t;
        org.antlr.stringtemplate.language.StringTemplateAST tmp16_AST_in = (org.antlr.stringtemplate.language.StringTemplateAST)_t;
        match(_t,VALUE);
        _t = _t.getFirstChild();
        n=expr(_t);
        _t = _retTree;
        args2 = (org.antlr.stringtemplate.language.StringTemplateAST)_t;
        if ( _t==null ) throw new MismatchedTokenException();
        _t = _t.getNextSibling();
       
                  StringTemplate embedded = null;
                  if ( n!=null ) {
                    String templateName = n.toString();
View Full Code Here

          AST __t166 = _t;
          r = _t==ASTNULL ? null :(AST)_t;
          match(_t,DOT);
          _t = _t.getFirstChild();
          AST tmp66_AST_in = (AST)_t;
          if ( _t==null ) throw new MismatchedTokenException();
          _t = _t.getNextSibling();
          AST tmp67_AST_in = (AST)_t;
          if ( _t==null ) throw new MismatchedTokenException();
          _t = _t.getNextSibling();
          _t = __t166;
          _t = _t.getNextSibling();
          if ( inputState.guessing==0 ) {
            out(r);
View Full Code Here

        AST __t12 = _t;
        GrammarAST tmp6_AST_in = (GrammarAST)_t;
        match(_t,OPTIONS);
        _t = _t.getFirstChild();
        GrammarAST tmp7_AST_in = (GrammarAST)_t;
        if ( _t==null ) throw new MismatchedTokenException();
        _t = _t.getNextSibling();
        _t = __t12;
        _t = _t.getNextSibling();
        break;
      }
      case TOKENS:
      case RULE:
      case SCOPE:
      case IMPORT:
      case AMPERSAND:
      {
        break;
      }
      default:
      {
        throw new NoViableAltException(_t);
      }
      }
      }
      {
      if (_t==null) _t=ASTNULL;
      switch ( _t.getType()) {
      case IMPORT:
      {
        AST __t14 = _t;
        GrammarAST tmp8_AST_in = (GrammarAST)_t;
        match(_t,IMPORT);
        _t = _t.getFirstChild();
        GrammarAST tmp9_AST_in = (GrammarAST)_t;
        if ( _t==null ) throw new MismatchedTokenException();
        _t = _t.getNextSibling();
        _t = __t14;
        _t = _t.getNextSibling();
        break;
      }
      case TOKENS:
      case RULE:
      case SCOPE:
      case AMPERSAND:
      {
        break;
      }
      default:
      {
        throw new NoViableAltException(_t);
      }
      }
      }
      {
      if (_t==null) _t=ASTNULL;
      switch ( _t.getType()) {
      case TOKENS:
      {
        AST __t16 = _t;
        GrammarAST tmp10_AST_in = (GrammarAST)_t;
        match(_t,TOKENS);
        _t = _t.getFirstChild();
        GrammarAST tmp11_AST_in = (GrammarAST)_t;
        if ( _t==null ) throw new MismatchedTokenException();
        _t = _t.getNextSibling();
        _t = __t16;
        _t = _t.getNextSibling();
        break;
      }
View Full Code Here

      match(_t,QUOTE);
      _t = _t.getFirstChild();
      any = (AST)_t;
      AST any_AST_in = null;
      any_AST = astFactory.create(any);
      if ( _t==null ) throw new MismatchedTokenException();
      _t = _t.getNextSibling();
      currentAST = __currentAST3350;
      _t = __t3350;
      _t = _t.getNextSibling();
      res = new LinkedList<AST>(); res.add(astFactory.dupTree(any));
View Full Code Here

      tmp38_AST_in = (AST)_t;
      astFactory.addASTChild(currentAST, tmp38_AST);
      ASTPair __currentAST3371 = currentAST.copy();
      currentAST.root = currentAST.child;
      currentAST.child = null;
      if ( _t==null ) throw new MismatchedTokenException();
      _t = _t.getFirstChild();
      {
      _loop3373:
      do {
        if (_t==null) _t=ASTNULL;
View Full Code Here

      AST other_AST_in = null;
      other_AST = astFactory.create(other);
      ASTPair __currentAST3381 = currentAST.copy();
      currentAST.root = currentAST.child;
      currentAST.child = null;
      if ( _t==null ) throw new MismatchedTokenException();
      _t = _t.getFirstChild();
      {
      _loop3383:
      do {
        if (_t==null) _t=ASTNULL;
        if (((_t.getType() >= SEMI && _t.getType() <= DOT))) {
          AST tmp42_AST_in = null;
          if ( _t==null ) throw new MismatchedTokenException();
          _t = _t.getNextSibling();
        }
        else {
          break _loop3383;
        }
View Full Code Here

        AST __t12 = _t;
        GrammarAST tmp5_AST_in = (GrammarAST)_t;
        match(_t,OPTIONS);
        _t = _t.getFirstChild();
        GrammarAST tmp6_AST_in = (GrammarAST)_t;
        if ( _t==null ) throw new MismatchedTokenException();
        _t = _t.getNextSibling();
        _t = __t12;
        _t = _t.getNextSibling();
        break;
      }
      case TOKENS:
      case RULE:
      case SCOPE:
      case IMPORT:
      case AMPERSAND:
      {
        break;
      }
      default:
      {
        throw new NoViableAltException(_t);
      }
      }
      }
      {
      if (_t==null) _t=ASTNULL;
      switch ( _t.getType()) {
      case IMPORT:
      {
        AST __t14 = _t;
        GrammarAST tmp7_AST_in = (GrammarAST)_t;
        match(_t,IMPORT);
        _t = _t.getFirstChild();
        GrammarAST tmp8_AST_in = (GrammarAST)_t;
        if ( _t==null ) throw new MismatchedTokenException();
        _t = _t.getNextSibling();
        _t = __t14;
        _t = _t.getNextSibling();
        break;
      }
      case TOKENS:
      case RULE:
      case SCOPE:
      case AMPERSAND:
      {
        break;
      }
      default:
      {
        throw new NoViableAltException(_t);
      }
      }
      }
      {
      if (_t==null) _t=ASTNULL;
      switch ( _t.getType()) {
      case TOKENS:
      {
        AST __t16 = _t;
        GrammarAST tmp9_AST_in = (GrammarAST)_t;
        match(_t,TOKENS);
        _t = _t.getFirstChild();
        GrammarAST tmp10_AST_in = (GrammarAST)_t;
        if ( _t==null ) throw new MismatchedTokenException();
        _t = _t.getNextSibling();
        _t = __t16;
        _t = _t.getNextSibling();
        break;
      }
View Full Code Here

        AST __t33 = _t;
        GrammarAST tmp21_AST_in = (GrammarAST)_t;
        match(_t,OPTIONS);
        _t = _t.getFirstChild();
        GrammarAST tmp22_AST_in = (GrammarAST)_t;
        if ( _t==null ) throw new MismatchedTokenException();
        _t = _t.getNextSibling();
        _t = __t33;
        _t = _t.getNextSibling();
        break;
      }
View Full Code Here

TOP

Related Classes of antlr.MismatchedTokenException

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.