Package eu.simuline.relana.parser
Class CClassParser
- java.lang.Object
-
- org.antlr.v4.runtime.Recognizer<Token,ParserATNSimulator>
-
- org.antlr.v4.runtime.Parser
-
- eu.simuline.relana.parser.CClassParser
-
public class CClassParser extends Parser
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CClassParser.Add2DefMapContext
static class
CClassParser.AddAccessModifierContext
static class
CClassParser.AddDefContext
static class
CClassParser.AddMapContext
static class
CClassParser.AddProbAllocContext
static class
CClassParser.AddToIdDomContext
static class
CClassParser.AppendFormulaContext
static class
CClassParser.AppendOpContext
static class
CClassParser.AppendTokenContext
static class
CClassParser.CClassContext
static class
CClassParser.ComponentContext
static class
CClassParser.ComponentsContext
static class
CClassParser.EffectContext
static class
CClassParser.EffectsContext
(package private) static class
CClassParser.FormulaWrapper
static class
CClassParser.GetDistrContext
static class
CClassParser.GetPathContext
static class
CClassParser.GetSuperClassContext
static class
CClassParser.MapsContext
static class
CClassParser.ReplDistrContext
static class
CClassParser.SkipFormulaContext
-
Nested classes/interfaces inherited from class org.antlr.v4.runtime.Parser
Parser.TraceListener, Parser.TrimToSizeListener
-
-
Field Summary
Fields Modifier and Type Field Description static ATN
_ATN
protected static DFA[]
_decisionToDFA
private static String[]
_LITERAL_NAMES
static String
_serializedATN
protected static PredictionContextCache
_sharedContextCache
private static String[]
_SYMBOLIC_NAMES
private CClass
cClass
static int
CCLASS
private CClassLoader
classLoader
static int
COMPLEMENT
static int
COMPONENTS
static int
CONT
static int
COV
static int
EFFECTS
static int
END
private boolean
exceptionThrown
static int
EXTENDS
static int
FLOAT
static int
IDDOMAIN
static int
INPUT
static int
INTERSECT
static int
INV
private ClassLocator
loc
static int
MAP
static int
MAPS
static int
MAPSTO
static int
MultiLineComment
static int
NAME
static int
OUTPUT
static int
PACKAGE
static int
REDECLARE
static int
REPLACE
static int
RULE_add2DefMap
static int
RULE_addAccessModifier
static int
RULE_addDef
static int
RULE_addMap
static int
RULE_addProbAlloc
static int
RULE_addToIdDom
static int
RULE_appendFormula
static int
RULE_appendOp
static int
RULE_appendToken
static int
RULE_cClass
static int
RULE_component
static int
RULE_components
static int
RULE_effect
static int
RULE_effects
static int
RULE_getDistr
static int
RULE_getPath
static int
RULE_getSuperClass
static int
RULE_maps
static int
RULE_replDistr
static int
RULE_skipFormula
static String[]
ruleNames
static int
SEP
static int
SingleLineComment
static int
T__0
static int
T__1
static int
T__2
static int
T__3
static int
T__4
static int
T__5
static int
T__6
static int
T__7
static String[]
tokenNames
Deprecated.UseVOCABULARY
instead.static int
UNION
static Vocabulary
VOCABULARY
static int
WS
-
Fields inherited from class org.antlr.v4.runtime.Parser
_buildParseTrees, _ctx, _errHandler, _input, _parseListeners, _precedenceStack, _syntaxErrors, matchedEOF
-
Fields inherited from class org.antlr.v4.runtime.Recognizer
_interp, EOF
-
-
Constructor Summary
Constructors Constructor Description CClassParser(InputStream str)
CClassParser(TokenStream input)
-
Method Summary
-
Methods inherited from class org.antlr.v4.runtime.Parser
addContextToParseTree, addParseListener, compileParseTreePattern, compileParseTreePattern, consume, createErrorNode, createTerminalNode, dumpDFA, enterOuterAlt, enterRecursionRule, enterRecursionRule, enterRule, exitRule, getATNWithBypassAlts, getBuildParseTree, getContext, getCurrentToken, getDFAStrings, getErrorHandler, getExpectedTokens, getExpectedTokensWithinCurrentRule, getInputStream, getInvokingContext, getNumberOfSyntaxErrors, getParseInfo, getParseListeners, getPrecedence, getRuleContext, getRuleIndex, getRuleInvocationStack, getRuleInvocationStack, getSourceName, getTokenFactory, getTokenStream, getTrimParseTree, inContext, isExpectedToken, isMatchedEOF, isTrace, match, matchWildcard, notifyErrorListeners, notifyErrorListeners, precpred, pushNewRecursionContext, removeParseListener, removeParseListeners, reset, setBuildParseTree, setContext, setErrorHandler, setInputStream, setProfile, setTokenFactory, setTokenStream, setTrace, setTrimParseTree, triggerEnterRuleEvent, triggerExitRuleEvent, unrollRecursionContexts
-
Methods inherited from class org.antlr.v4.runtime.Recognizer
action, addErrorListener, getErrorHeader, getErrorListenerDispatch, getErrorListeners, getInterpreter, getRuleIndexMap, getState, getTokenErrorDisplay, getTokenType, getTokenTypeMap, removeErrorListener, removeErrorListeners, sempred, setInterpreter, setState
-
-
-
-
Field Detail
-
_decisionToDFA
protected static final DFA[] _decisionToDFA
-
_sharedContextCache
protected static final PredictionContextCache _sharedContextCache
-
T__0
public static final int T__0
- See Also:
- Constant Field Values
-
T__1
public static final int T__1
- See Also:
- Constant Field Values
-
T__2
public static final int T__2
- See Also:
- Constant Field Values
-
T__3
public static final int T__3
- See Also:
- Constant Field Values
-
T__4
public static final int T__4
- See Also:
- Constant Field Values
-
T__5
public static final int T__5
- See Also:
- Constant Field Values
-
T__6
public static final int T__6
- See Also:
- Constant Field Values
-
T__7
public static final int T__7
- See Also:
- Constant Field Values
-
WS
public static final int WS
- See Also:
- Constant Field Values
-
SingleLineComment
public static final int SingleLineComment
- See Also:
- Constant Field Values
-
MultiLineComment
public static final int MultiLineComment
- See Also:
- Constant Field Values
-
PACKAGE
public static final int PACKAGE
- See Also:
- Constant Field Values
-
CCLASS
public static final int CCLASS
- See Also:
- Constant Field Values
-
EXTENDS
public static final int EXTENDS
- See Also:
- Constant Field Values
-
REDECLARE
public static final int REDECLARE
- See Also:
- Constant Field Values
-
MAPS
public static final int MAPS
- See Also:
- Constant Field Values
-
MAP
public static final int MAP
- See Also:
- Constant Field Values
-
MAPSTO
public static final int MAPSTO
- See Also:
- Constant Field Values
-
IDDOMAIN
public static final int IDDOMAIN
- See Also:
- Constant Field Values
-
COMPONENTS
public static final int COMPONENTS
- See Also:
- Constant Field Values
-
EFFECTS
public static final int EFFECTS
- See Also:
- Constant Field Values
-
INPUT
public static final int INPUT
- See Also:
- Constant Field Values
-
OUTPUT
public static final int OUTPUT
- See Also:
- Constant Field Values
-
REPLACE
public static final int REPLACE
- See Also:
- Constant Field Values
-
INV
public static final int INV
- See Also:
- Constant Field Values
-
COV
public static final int COV
- See Also:
- Constant Field Values
-
CONT
public static final int CONT
- See Also:
- Constant Field Values
-
END
public static final int END
- See Also:
- Constant Field Values
-
SEP
public static final int SEP
- See Also:
- Constant Field Values
-
UNION
public static final int UNION
- See Also:
- Constant Field Values
-
INTERSECT
public static final int INTERSECT
- See Also:
- Constant Field Values
-
COMPLEMENT
public static final int COMPLEMENT
- See Also:
- Constant Field Values
-
NAME
public static final int NAME
- See Also:
- Constant Field Values
-
FLOAT
public static final int FLOAT
- See Also:
- Constant Field Values
-
RULE_cClass
public static final int RULE_cClass
- See Also:
- Constant Field Values
-
RULE_getSuperClass
public static final int RULE_getSuperClass
- See Also:
- Constant Field Values
-
RULE_getPath
public static final int RULE_getPath
- See Also:
- Constant Field Values
-
RULE_maps
public static final int RULE_maps
- See Also:
- Constant Field Values
-
RULE_addMap
public static final int RULE_addMap
- See Also:
- Constant Field Values
-
RULE_add2DefMap
public static final int RULE_add2DefMap
- See Also:
- Constant Field Values
-
RULE_addDef
public static final int RULE_addDef
- See Also:
- Constant Field Values
-
RULE_addToIdDom
public static final int RULE_addToIdDom
- See Also:
- Constant Field Values
-
RULE_effects
public static final int RULE_effects
- See Also:
- Constant Field Values
-
RULE_effect
public static final int RULE_effect
- See Also:
- Constant Field Values
-
RULE_addAccessModifier
public static final int RULE_addAccessModifier
- See Also:
- Constant Field Values
-
RULE_getDistr
public static final int RULE_getDistr
- See Also:
- Constant Field Values
-
RULE_replDistr
public static final int RULE_replDistr
- See Also:
- Constant Field Values
-
RULE_addProbAlloc
public static final int RULE_addProbAlloc
- See Also:
- Constant Field Values
-
RULE_skipFormula
public static final int RULE_skipFormula
- See Also:
- Constant Field Values
-
RULE_appendFormula
public static final int RULE_appendFormula
- See Also:
- Constant Field Values
-
RULE_appendToken
public static final int RULE_appendToken
- See Also:
- Constant Field Values
-
RULE_appendOp
public static final int RULE_appendOp
- See Also:
- Constant Field Values
-
RULE_components
public static final int RULE_components
- See Also:
- Constant Field Values
-
RULE_component
public static final int RULE_component
- See Also:
- Constant Field Values
-
ruleNames
public static final String[] ruleNames
-
_LITERAL_NAMES
private static final String[] _LITERAL_NAMES
-
_SYMBOLIC_NAMES
private static final String[] _SYMBOLIC_NAMES
-
VOCABULARY
public static final Vocabulary VOCABULARY
-
tokenNames
@Deprecated public static final String[] tokenNames
Deprecated.UseVOCABULARY
instead.
-
classLoader
private CClassLoader classLoader
-
loc
private ClassLocator loc
-
cClass
private CClass cClass
-
exceptionThrown
private boolean exceptionThrown
-
_serializedATN
public static final String _serializedATN
- See Also:
- Constant Field Values
-
_ATN
public static final ATN _ATN
-
-
Constructor Detail
-
CClassParser
public CClassParser(InputStream str) throws IOException
- Throws:
IOException
-
CClassParser
public CClassParser(TokenStream input)
-
-
Method Detail
-
getTokenNames
@Deprecated public String[] getTokenNames()
Deprecated.- Specified by:
getTokenNames
in classRecognizer<Token,ParserATNSimulator>
-
getVocabulary
public Vocabulary getVocabulary()
- Overrides:
getVocabulary
in classRecognizer<Token,ParserATNSimulator>
-
getGrammarFileName
public String getGrammarFileName()
- Specified by:
getGrammarFileName
in classRecognizer<Token,ParserATNSimulator>
-
getRuleNames
public String[] getRuleNames()
- Specified by:
getRuleNames
in classRecognizer<Token,ParserATNSimulator>
-
getSerializedATN
public String getSerializedATN()
- Overrides:
getSerializedATN
in classRecognizer<Token,ParserATNSimulator>
-
getATN
public ATN getATN()
- Specified by:
getATN
in classRecognizer<Token,ParserATNSimulator>
-
inputStream2tokenStream
private static CommonTokenStream inputStream2tokenStream(InputStream str) throws IOException
- Throws:
IOException
-
getLocation
private String getLocation()
Returns a string comprising the current class, the number of the current line and column, the last token successfully read and the token tp be read next.- Returns:
- a
String
of the form[
.loc
] line ##, column ## between tokenRead and tokenToBeRead
-
report
private void report(String msg) throws RuntimeException
Reports an error and also the location where it occurred. **** same as in SClassParser ****- Parameters:
msg
- the message to be displayed.- Throws:
RuntimeException
-
report
private void report(Token token, String msg) throws RuntimeException
- Throws:
RuntimeException
-
setClassLoader
public void setClassLoader(CClassLoader classLoader)
To set theCClassLoader
. This is needed whenever the definition of the class currently read relies on definitions of other classes such as the superclass if it is given explicitly.- Parameters:
classLoader
- the currentSClassLoader
.
-
getCClass
public CClass getCClass(ClassLocator loc)
-
cClass
public final CClassParser.CClassContext cClass(ClassLocator loc) throws RecognitionException
- Throws:
RecognitionException
-
getSuperClass
public final CClassParser.GetSuperClassContext getSuperClass() throws RecognitionException
- Throws:
RecognitionException
-
getPath
public final CClassParser.GetPathContext getPath() throws RecognitionException
- Throws:
RecognitionException
-
maps
public final CClassParser.MapsContext maps() throws RecognitionException
- Throws:
RecognitionException
-
addMap
public final CClassParser.AddMapContext addMap(Map<String,MapDecl> name2map) throws RecognitionException
- Throws:
RecognitionException
-
add2DefMap
public final CClassParser.Add2DefMapContext add2DefMap(Map<Set<Deficiency>,Deficiency> setOfSrc2targ) throws RecognitionException
- Throws:
RecognitionException
-
addDef
public final CClassParser.AddDefContext addDef(Set<Deficiency> defs) throws RecognitionException
- Throws:
RecognitionException
-
addToIdDom
public final CClassParser.AddToIdDomContext addToIdDom(Set<Deficiency> idDomain) throws RecognitionException
- Throws:
RecognitionException
-
effects
public final CClassParser.EffectsContext effects(Map<String,CClassParser.FormulaWrapper> incompEffects) throws RecognitionException
- Throws:
RecognitionException
-
effect
public final CClassParser.EffectContext effect(Map<String,CClass.SClassDecl> effectsMap, Map<String,CClassParser.FormulaWrapper> incompEffects) throws RecognitionException
- Throws:
RecognitionException
-
addAccessModifier
public final CClassParser.AddAccessModifierContext addAccessModifier(Set<CClass.SClassModifier> accessModifiers) throws RecognitionException
- Throws:
RecognitionException
-
getDistr
public final CClassParser.GetDistrContext getDistr(SClass sClass) throws RecognitionException
- Throws:
RecognitionException
-
replDistr
public final CClassParser.ReplDistrContext replDistr(Map<Deficiency,ProbDistr> def2distr, SClass sClass) throws RecognitionException
- Throws:
RecognitionException
-
addProbAlloc
public final CClassParser.AddProbAllocContext addProbAlloc(Map<Deficiency,BigDecimal> def2prob) throws RecognitionException
- Throws:
RecognitionException
-
skipFormula
public final CClassParser.SkipFormulaContext skipFormula() throws RecognitionException
- Throws:
RecognitionException
-
appendFormula
public final CClassParser.AppendFormulaContext appendFormula(String pre, StringBuffer res) throws RecognitionException
- Throws:
RecognitionException
-
appendToken
public final CClassParser.AppendTokenContext appendToken(String pre, StringBuffer buf, String post) throws RecognitionException
- Throws:
RecognitionException
-
appendOp
public final CClassParser.AppendOpContext appendOp(StringBuffer buf) throws RecognitionException
- Throws:
RecognitionException
-
components
public final CClassParser.ComponentsContext components() throws RecognitionException
- Throws:
RecognitionException
-
component
public final CClassParser.ComponentContext component(Map<String,CClassLink> componentsX) throws RecognitionException
- Throws:
RecognitionException
-
-