Search in sources :

Example 1 with ASNParser

use of org.openmuc.jasn1.compiler.parser.ASNParser in project jasn1 by openmuc.

the class Compiler method getJavaModelFromAsn1File.

private static AsnModel getJavaModelFromAsn1File(String inputFileName) throws Exception {
    InputStream stream = new FileInputStream(inputFileName);
    ASNLexer lexer = new ASNLexer(stream);
    ASNParser parser = new ASNParser(lexer);
    AsnModel model = new AsnModel();
    parser.module_definitions(model);
    return model;
}
Also used : AsnModel(org.openmuc.jasn1.compiler.model.AsnModel) FileInputStream(java.io.FileInputStream) InputStream(java.io.InputStream) ASNLexer(org.openmuc.jasn1.compiler.parser.ASNLexer) ASNParser(org.openmuc.jasn1.compiler.parser.ASNParser) FileInputStream(java.io.FileInputStream)

Aggregations

FileInputStream (java.io.FileInputStream)1 InputStream (java.io.InputStream)1 AsnModel (org.openmuc.jasn1.compiler.model.AsnModel)1 ASNLexer (org.openmuc.jasn1.compiler.parser.ASNLexer)1 ASNParser (org.openmuc.jasn1.compiler.parser.ASNParser)1