Package org.snt.inmemantlr.comp
Class StringCompiler
- java.lang.Object
-
- org.snt.inmemantlr.comp.StringCompiler
-
public class StringCompiler extends java.lang.Object
a compiler for strings
-
-
Constructor Summary
Constructors Constructor Description StringCompiler()
constructors
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
compile(java.util.Set<CunitProvider> units, CompilerOptionsProvider oprov)
do the compilation for the antlr artifactsMemoryTupleSet
getAllCompiledObjects()
get all compiled antlr objects (lexer, parser, etc) in source and bytecode formatorg.antlr.v4.runtime.Lexer
instanciateLexer(org.antlr.v4.runtime.CharStream input, java.lang.String lexerClassName, boolean useCached)
instanciate new lexerorg.antlr.v4.runtime.Parser
instanciateParser(org.antlr.v4.runtime.CommonTokenStream tstream, java.lang.String parserClassName)
instanciate new parservoid
load(MemoryTupleSet mset)
-
-
-
Method Detail
-
load
public void load(MemoryTupleSet mset)
-
compile
public void compile(java.util.Set<CunitProvider> units, CompilerOptionsProvider oprov) throws CompilationErrorException
do the compilation for the antlr artifacts- Parameters:
units
- string code generation pipelineoprov
- compiler option provider- Throws:
CompilationErrorException
- if the compilation was not successful
-
instanciateLexer
public org.antlr.v4.runtime.Lexer instanciateLexer(org.antlr.v4.runtime.CharStream input, java.lang.String lexerClassName, boolean useCached)
instanciate new lexer- Parameters:
input
- lexer class content as character streamlexerClassName
- class nameuseCached
- true to used cached lexers, otherwise false- Returns:
- antlr lexer
-
instanciateParser
public org.antlr.v4.runtime.Parser instanciateParser(org.antlr.v4.runtime.CommonTokenStream tstream, java.lang.String parserClassName)
instanciate new parser- Parameters:
tstream
- parser class content as character streamparserClassName
- class name- Returns:
- antlr parser
-
getAllCompiledObjects
public MemoryTupleSet getAllCompiledObjects()
get all compiled antlr objects (lexer, parser, etc) in source and bytecode format- Returns:
- memory tuple set
-
-