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 classCClassParser.Add2DefMapContextstatic classCClassParser.AddAccessModifierContextstatic classCClassParser.AddDefContextstatic classCClassParser.AddMapContextstatic classCClassParser.AddProbAllocContextstatic classCClassParser.AddToIdDomContextstatic classCClassParser.AppendFormulaContextstatic classCClassParser.AppendOpContextstatic classCClassParser.AppendTokenContextstatic classCClassParser.CClassContextstatic classCClassParser.ComponentContextstatic classCClassParser.ComponentsContextstatic classCClassParser.EffectContextstatic classCClassParser.EffectsContext(package private) static classCClassParser.FormulaWrapperstatic classCClassParser.GetDistrContextstatic classCClassParser.GetPathContextstatic classCClassParser.GetSuperClassContextstatic classCClassParser.MapsContextstatic classCClassParser.ReplDistrContextstatic classCClassParser.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_ATNprotected static DFA[]_decisionToDFAprivate static String[]_LITERAL_NAMESstatic String_serializedATNprotected static PredictionContextCache_sharedContextCacheprivate static String[]_SYMBOLIC_NAMESprivate CClasscClassstatic intCCLASSprivate CClassLoaderclassLoaderstatic intCOMPLEMENTstatic intCOMPONENTSstatic intCONTstatic intCOVstatic intEFFECTSstatic intENDprivate booleanexceptionThrownstatic intEXTENDSstatic intFLOATstatic intIDDOMAINstatic intINPUTstatic intINTERSECTstatic intINVprivate ClassLocatorlocstatic intMAPstatic intMAPSstatic intMAPSTOstatic intMultiLineCommentstatic intNAMEstatic intOUTPUTstatic intPACKAGEstatic intREDECLAREstatic intREPLACEstatic intRULE_add2DefMapstatic intRULE_addAccessModifierstatic intRULE_addDefstatic intRULE_addMapstatic intRULE_addProbAllocstatic intRULE_addToIdDomstatic intRULE_appendFormulastatic intRULE_appendOpstatic intRULE_appendTokenstatic intRULE_cClassstatic intRULE_componentstatic intRULE_componentsstatic intRULE_effectstatic intRULE_effectsstatic intRULE_getDistrstatic intRULE_getPathstatic intRULE_getSuperClassstatic intRULE_mapsstatic intRULE_replDistrstatic intRULE_skipFormulastatic String[]ruleNamesstatic intSEPstatic intSingleLineCommentstatic intT__0static intT__1static intT__2static intT__3static intT__4static intT__5static intT__6static intT__7static String[]tokenNamesDeprecated.UseVOCABULARYinstead.static intUNIONstatic VocabularyVOCABULARYstatic intWS-
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.UseVOCABULARYinstead.
-
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:
getTokenNamesin classRecognizer<Token,ParserATNSimulator>
-
getVocabulary
public Vocabulary getVocabulary()
- Overrides:
getVocabularyin classRecognizer<Token,ParserATNSimulator>
-
getGrammarFileName
public String getGrammarFileName()
- Specified by:
getGrammarFileNamein classRecognizer<Token,ParserATNSimulator>
-
getRuleNames
public String[] getRuleNames()
- Specified by:
getRuleNamesin classRecognizer<Token,ParserATNSimulator>
-
getSerializedATN
public String getSerializedATN()
- Overrides:
getSerializedATNin classRecognizer<Token,ParserATNSimulator>
-
getATN
public ATN getATN()
- Specified by:
getATNin 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
Stringof 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
-
-