Package antlr.collections

Examples of antlr.collections.AST


            parser.compilationUnit();
        } catch (OutOfMemoryError e) {
            log.error("Out of memory while processing: " + packagePath + "/" + file);
            throw e;
        }
        AST ast = parser.getAST();

        // now do the business
        Visitor visitor = new SimpleGroovyClassDocAssembler(packagePath, file, sourceBuffer, links, properties, true);
        AntlrASTProcessor traverser = new SourceCodeTraversal(visitor);
        traverser.process(ast);
View Full Code Here


/** Lookahead to check whether a block begins with explicit closure arguments. */
  public final void closableBlockParamsStart() throws RecognitionException, TokenStreamException {
   
    returnAST = null;
    ASTPair currentAST = new ASTPair();
    AST closableBlockParamsStart_AST = null;
   
    nls();
    parameterDeclarationList();
    nls();
    AST tmp215_AST = null;
    tmp215_AST = astFactory.create(LT(1));
    match(CLOSABLE_BLOCK_OP);
    returnAST = closableBlockParamsStart_AST;
  }
View Full Code Here

/** Simple names, as in {x|...}, are completely equivalent to {(def x)|...}.  Build the right AST. */
  public final void closableBlockParam() throws RecognitionException, TokenStreamException {
   
    returnAST = null;
    ASTPair currentAST = new ASTPair();
    AST closableBlockParam_AST = null;
    Token  id = null;
    AST id_AST = null;
    Token first = LT(1);
   
    id = LT(1);
    id_AST = astFactory.create(id);
    match(IDENT);
View Full Code Here

*/
  public final void closableBlock() throws RecognitionException, TokenStreamException {
   
    returnAST = null;
    ASTPair currentAST = new ASTPair();
    AST closableBlock_AST = null;
    AST cbp_AST = null;
    AST bb_AST = null;
    Token first = LT(1);
   
    match(LCURLY);
    nls();
    closableBlockParamsOpt(true);
View Full Code Here

*/
  public final void openOrClosableBlock() throws RecognitionException, TokenStreamException {
   
    returnAST = null;
    ASTPair currentAST = new ASTPair();
    AST openOrClosableBlock_AST = null;
    AST cp_AST = null;
    AST bb_AST = null;
    Token first = LT(1);
   
    match(LCURLY);
    nls();
    closableBlockParamsOpt(false);
View Full Code Here

/** A labeled statement, consisting of a vanilla identifier followed by a colon. */
  public final void statementLabelPrefix() throws RecognitionException, TokenStreamException {
   
    returnAST = null;
    ASTPair currentAST = new ASTPair();
    AST statementLabelPrefix_AST = null;
    Token  c = null;
    AST c_AST = null;
   
    AST tmp220_AST = null;
    tmp220_AST = astFactory.create(LT(1));
    astFactory.addASTChild(currentAST, tmp220_AST);
    match(IDENT);
    c = LT(1);
    c_AST = astFactory.create(c);
View Full Code Here

    int prevToken
  ) throws RecognitionException, TokenStreamException {
   
    returnAST = null;
    ASTPair currentAST = new ASTPair();
    AST expressionStatement_AST = null;
    AST esn_AST = null;
    Token first = LT(1);
   
    {
    boolean synPredMatched329 = false;
    if (((_tokenSet_19.member(LA(1))) && (_tokenSet_1.member(LA(2))))) {
View Full Code Here

 
  public final void assignmentLessExpression() throws RecognitionException, TokenStreamException {
   
    returnAST = null;
    ASTPair currentAST = new ASTPair();
    AST assignmentLessExpression_AST = null;
    Token first = LT(1);
   
    {
    conditionalExpression(0);
    astFactory.addASTChild(currentAST, returnAST);
    }
    if ( inputState.guessing==0 ) {
      assignmentLessExpression_AST = (AST)currentAST.root;
      assignmentLessExpression_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(EXPR,"EXPR",first,LT(1))).add(assignmentLessExpression_AST));
      currentAST.root = assignmentLessExpression_AST;
      currentAST.child = assignmentLessExpression_AST!=null &&assignmentLessExpression_AST.getFirstChild()!=null ?
        assignmentLessExpression_AST.getFirstChild() : assignmentLessExpression_AST;
      currentAST.advanceChildToEnd();
    }
    assignmentLessExpression_AST = (AST)currentAST.root;
    returnAST = assignmentLessExpression_AST;
  }
View Full Code Here

                                                .lang("Please enter a search term. For example, to search all fields for <b>Smith</b>, enter%c<p>"
                                                                + "<tt>smith</tt><p>"
                                                                + "To search the field <b>Author</b> for <b>Smith</b> and the field <b>Title</b> for <b>electrical</b>, enter%c<p>"
                                                                + "<tt>author%esmith and title%eelectrical</tt>"));
                        } else {
                                AST ast = SearchExpressionParser
                                                .checkSyntax(s1, m_sgCaseSensitive.isSelected(),
                                                                m_sgRegExp.isSelected());
                                setDescription(SearchGroup.getDescriptionForPreview(s1, ast,
                                                m_sgCaseSensitive.isSelected(), m_sgRegExp.isSelected()));
                                if (m_sgRegExp.isSelected()) {
View Full Code Here

    boolean caseSensitive, boolean regex
  ) throws RecognitionException, TokenStreamException {
   
    returnAST = null;
    ASTPair currentAST = new ASTPair();
    AST quotedRegularExpression_AST = null;
    Token  var_s = null;
    AST var_s_AST = null;
   
    var_s = LT(1);
    var_s_AST = astFactory.create(var_s);
    astFactory.addASTChild(currentAST, var_s_AST);
    match(STRING);
View Full Code Here

TOP

Related Classes of antlr.collections.AST

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.