Package r194

Examples of r194.Compiler


     
      Environment env = parser.compile();
     
      ASN1Compiler comp = new ASN1Compiler();*/
     
    Compiler compiler = new Compiler();
        Map environment = new HashMap();
               
//        environment.put( ParseStage.SRC_URI, "file:///home/krychu/workspace/OpenCDF/gtpprime-asn1cdr/src/main/resources/asn1/ldap.asn");
        //environment.put( ParseStage.SRC_URI, "file:///home/krychu/workspace/OpenCDF/gtpprime-asn1cdr/src/main/resources/asn1/32.298/ps.asn1");
        environment.put( ParseStage.SRC_URI, "file:///home/krychu/workspace/OpenCDF/gtpprime-asn1cdr/src/main/resources/asn1/3gpp_merged/huawei_ps.asn1");
        //environment.put( ParseStage.SRC_URI, "file:///home/krychu/workspace/OpenCDF/gtpprime-asn1cdr/src/main/resources/asn1/NBAP-25433-530.asn1");
        environment.put( CodeGeneratorStage.ROOT_PACKAGE, "org.apache.ldap.asn1" );
        environment.put( CodeGeneratorStage.DESTINATION_PATH, "./c/" );

        compiler.compile( environment );
   
     
    } catch (Exception e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
View Full Code Here


  }
 
  public void filterTokens(){
    List<Lexeme> newTokens = new ArrayList<>();
    for (int i = 0; i < tokens.size(); i++) {
      Lexeme t = tokens.get(i);
      if (t.type != Token.WHITESPACE){
        newTokens.add(t);
      }
    }
    tokens = newTokens;
View Full Code Here

    }
  }
 
  public Lexeme lookahead(int i) {
    if (position + i >= tokens.size()){
      return new Lexeme("", Token.EOF);
    }
    return tokens.get(position + i);
  }
View Full Code Here

    List<Lexer.Lexeme> lexed = new Lexer().lex(code);
    System.out.println("Compiling");
    Parser p = new Parser(lexed);
    p.filterTokens();
    System.out.println(p.tokens);
    AbstractSyntaxNode program = p.program();
    System.out.println(program);
    System.out.println("Generating");
    GenerateAsm asm = new GenerateAsm();
    List<String> gen = asm.generate(program);
   
View Full Code Here

TOP

Related Classes of r194.Compiler

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.