Package net.sf.lapg.templates.ast.AstLexer

Examples of net.sf.lapg.templates.ast.AstLexer.LapgSymbol


  private Object parse(AstLexer lexer, int state) throws IOException, ParseException {

    lapg_m = new LapgSymbol[1024];
    lapg_head = 0;

    lapg_m[0] = new LapgSymbol();
    lapg_m[0].state = state;
    lapg_n = lexer.next();

    while( lapg_m[lapg_head].state != 223+state ) {
      int lapg_i = lapg_next( lapg_m[lapg_head].state, lapg_n.lexem );
View Full Code Here


    }
  }

  @SuppressWarnings("unchecked")
  private void reduce(int rule) {
    LapgSymbol lapg_gg = new LapgSymbol();
    lapg_gg.sym = (lapg_rlen[rule]!=0)?lapg_m[lapg_head+1-lapg_rlen[rule]].sym:null;
    lapg_gg.lexem = lapg_rlex[rule];
    lapg_gg.state = 0;
    if( DEBUG_SYNTAX ) {
      System.out.println( "reduce to " + lapg_syms[lapg_rlex[rule]] );
    }
    LapgSymbol startsym = (lapg_rlen[rule]!=0)?lapg_m[lapg_head+1-lapg_rlen[rule]]:lapg_n;
    lapg_gg.line = startsym.line;
    lapg_gg.offset = startsym.offset;
    lapg_gg.endoffset = (lapg_rlen[rule]!=0)?lapg_m[lapg_head].endoffset:lapg_n.offset;
    switch( rule ) {
      case 5// template_declaration_or_space ::= template_start instructions template_end
View Full Code Here

TOP

Related Classes of net.sf.lapg.templates.ast.AstLexer.LapgSymbol

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.