Package org.snt.inmemantlr.comp
Class StringCodeGenPipeline
- java.lang.Object
-
- org.antlr.v4.codegen.CodeGenPipeline
-
- org.snt.inmemantlr.comp.StringCodeGenPipeline
-
- All Implemented Interfaces:
CunitProvider
public class StringCodeGenPipeline extends org.antlr.v4.codegen.CodeGenPipeline implements CunitProvider
extended code gen pipeline for compiling antlr grammars in-memory
-
-
Constructor Summary
Constructors Constructor Description StringCodeGenPipeline(org.antlr.v4.tool.Grammar g)
constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
org.stringtemplate.v4.ST
getBaseListener()
get base listenerjava.lang.String
getBaseListenerName()
get base listener nameorg.stringtemplate.v4.ST
getBaseVisitor()
get base visitorjava.lang.String
getBaseVisitorName()
get base visitor nameorg.antlr.v4.tool.Grammar
getG()
get grammarjava.util.Collection<MemorySource>
getItems()
provide items to compileorg.stringtemplate.v4.ST
getLexer()
get lexerjava.lang.String
getLexerName()
get lexer nameorg.stringtemplate.v4.ST
getListener()
get listenerjava.lang.String
getListenerName()
get listener nameorg.stringtemplate.v4.ST
getParser()
get parserjava.lang.String
getParserName()
get parser nameorg.stringtemplate.v4.ST
getTokenVocab()
java.lang.String
getTokenVocabFileName()
java.lang.String
getTokenVocabString()
org.stringtemplate.v4.ST
getVisitor()
get visitorjava.lang.String
getVisitorName()
get visitor nameboolean
hasBaseListener()
check if base listener is setboolean
hasBaseVisitor()
check if visitor is setint
hashCode()
boolean
hasItems()
has items to compileboolean
hasLexer()
check if lexer is setboolean
hasListener()
check if listener is setboolean
hasParser()
check if parser is setboolean
hasTokenVocab()
boolean
hasVisitor()
check if visitor is setvoid
process()
compile lexer and parservoid
setG(InmemantlrGrammar g)
set grammarjava.lang.String
toString()
-
-
-
Method Detail
-
hasParser
public boolean hasParser()
check if parser is set- Returns:
- true if parser is set, false otherwise
-
getParser
public org.stringtemplate.v4.ST getParser()
get parser- Returns:
- parser
-
getBaseListener
public org.stringtemplate.v4.ST getBaseListener()
get base listener- Returns:
- base listener
-
hasBaseListener
public boolean hasBaseListener()
check if base listener is set- Returns:
- true if listener is set, false otherwise
-
getLexer
public org.stringtemplate.v4.ST getLexer()
get lexer- Returns:
- lexer
-
hasLexer
public boolean hasLexer()
check if lexer is set- Returns:
- true if lexer is set, false otherwise
-
getVisitor
public org.stringtemplate.v4.ST getVisitor()
get visitor- Returns:
- visitor
-
hasVisitor
public boolean hasVisitor()
check if visitor is set- Returns:
- true if visitor is set, false otherwise
-
getListener
public org.stringtemplate.v4.ST getListener()
get listener- Returns:
- listener
-
hasListener
public boolean hasListener()
check if listener is set- Returns:
- true if listener is set, false otherwise
-
getBaseVisitor
public org.stringtemplate.v4.ST getBaseVisitor()
get base visitor- Returns:
- base visitor
-
getTokenVocab
public org.stringtemplate.v4.ST getTokenVocab()
-
hasBaseVisitor
public boolean hasBaseVisitor()
check if visitor is set- Returns:
- true if visitor is set, false otherwise
-
hasTokenVocab
public boolean hasTokenVocab()
-
getG
public org.antlr.v4.tool.Grammar getG()
get grammar- Returns:
- grammar
-
setG
public void setG(InmemantlrGrammar g)
set grammar- Parameters:
g
- grammar
-
process
public void process()
compile lexer and parser- Overrides:
process
in classorg.antlr.v4.codegen.CodeGenPipeline
-
getParserName
public java.lang.String getParserName()
get parser name- Returns:
- parser name
-
getLexerName
public java.lang.String getLexerName()
get lexer name- Returns:
- lexer name
-
getVisitorName
public java.lang.String getVisitorName()
get visitor name- Returns:
- visitor name
-
getBaseVisitorName
public java.lang.String getBaseVisitorName()
get base visitor name- Returns:
- base visitor name
-
getListenerName
public java.lang.String getListenerName()
get listener name- Returns:
- listener name
-
getBaseListenerName
public java.lang.String getBaseListenerName()
get base listener name- Returns:
- base listener name
-
getTokenVocabFileName
public java.lang.String getTokenVocabFileName()
-
getTokenVocabString
public java.lang.String getTokenVocabString()
-
toString
public java.lang.String toString()
- Specified by:
toString
in interfaceCunitProvider
- Overrides:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
getItems
public java.util.Collection<MemorySource> getItems()
Description copied from interface:CunitProvider
provide items to compile- Specified by:
getItems
in interfaceCunitProvider
- Returns:
- items to compile
-
hasItems
public boolean hasItems()
Description copied from interface:CunitProvider
has items to compile- Specified by:
hasItems
in interfaceCunitProvider
- Returns:
- true, if items to compile are present, false otherwise
-
-