public class Parser extends LexicalAnalyser
| Constructor and Description |
|---|
Parser(InputStream in)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
String |
getErrorContext(String errorLocation,
int errorStartLine,
int errorEndLine)
Get the location string from the declaration text where the error happened
|
void |
parseAcknowledgement()
Parses the prolog and the end of the characters
|
BigDecimal |
parseBigDecimal()
Parse the float of the next token
|
String |
parseBlock()
Read the context of the block
|
ConcreteState |
parseConcreteInitial(UppaalSystem system)
Parses the concrete initial state in the system
|
ConcreteState |
parseConcreteState(UppaalSystem system)
Create the concrete state in the system:
- Get the list of locations in the system
- Get the list of variables of the system
- Get the invariant value
<l-len> <location>* <v-len> ( <value> <rate> )* <limit> <strict>
|
ConcreteSuccessor |
parseConcreteSuccessor(UppaalSystem system)
To create the concrete successor:
- parses the concrete state
- get the list of the concrete transition
|
SystemEdge[] |
parseEdges(UppaalSystem system)
Get the list of the system edges
|
SystemEdgeSelect[] |
parseEdgesWS(UppaalSystem system)
Parses the selected edge of the system.
|
ArrayList<ConcreteTransition> |
parseEnabledConcreteTransitions(UppaalSystem system)
Parses the limit of the concrete transition and collect the enabled
concrete transition into the list
|
ArrayList<SymbolicTransition> |
parseEnabledTransitions(UppaalSystem system)
Parses the transitions that are transit enabled
|
void |
parseEnd()
Parses the end of the characters.
|
GanttChart |
parseGanttChart(UppaalSystem system,
BigDecimal globalTime)
Parses a Gantt chart.
|
void |
parseGanttHeader(UppaalSystem system)
Parses the header of the ganttchard
|
String |
parseId()
Parses and gets the string.
|
int |
parseInteger()
Parses and get the integer value
|
Limit |
parseLimit()
Parses the limit : limit consists of a value and information about whether the limit
is strict or not.
|
long |
parseLong()
Parses the response string in 'long'
|
LscProcess |
parseLscProcess(Document document)
Parse LSC process
|
void |
parsePartialEnd()
Parses the partial end of the characters
|
ArrayList<Problem> |
parseProblems()
Parses problems in the system
|
void |
parseProblems(ArrayList<Problem> problems)
Parses problems in the system
|
void |
parseProlog()
Parses the prolog
|
char |
parseQueryResult()
Parses query and get the query result
|
SymbolicState |
parseSymbolicInitial(UppaalSystem system)
Parses the symbolic initial state in the system
|
SymbolicState |
parseSymbolicState(UppaalSystem system)
Parses the symbolic state in the system
|
UppaalSystem |
parseSystem(Document document)
Parses the uppaal system:
- get the list of variables
- get the list of clocks
- add the processes into the system
- add Gantt Chart parsing
|
ArrayList<SymbolicTransition> |
parseXTRTrace(UppaalSystem system)
Parses the Trace
|
Problem |
problem()
Create the problem
|
boolean |
skipProblems()
To skip problems
|
getException, getFloat, getIntValue, getLookahead, getValue, getWord, nextToken, read, readBlockpublic Parser(InputStream in)
in - - The input streampublic void parseProlog()
throws EngineException,
IOException
IOException - engine crash or problem in communication.EngineException - problem in the Uppaal engine.public String parseId() throws ProtocolException, IOException
ProtocolException - broken engine communication protocolIOException - engine crash or problem in communication.public int parseInteger()
throws ProtocolException,
IOException,
ServerException
ProtocolException - broken engine communication protocol.IOException - engine crash or problem in communication.ServerException - engine returned an errorpublic long parseLong()
throws ProtocolException,
IOException,
ServerException
ProtocolException - broken engine communication protocol.IOException - engine crash or problem in communication.ServerException - engine returned an errorpublic BigDecimal parseBigDecimal() throws ProtocolException, IOException
ProtocolException - broken engine communication protocol.IOException - engine crash or problem in communication.public Limit parseLimit() throws ProtocolException, IOException, ServerException
ProtocolException - broken engine communication protocol.IOException - engine crash or problem in communication.ServerException - engine returned an errorpublic void parseEnd()
throws ProtocolException,
IOException
ProtocolException - broken engine communication protocol.IOException - engine crash or problem in communication.public void parsePartialEnd()
throws ProtocolException,
IOException
ProtocolException - broken engine communication protocol.IOException - engine crash or problem in communication.public SymbolicState parseSymbolicState(UppaalSystem system) throws ProtocolException, IOException, ServerException
system - - The uppaal systemProtocolException - broken engine communication protocol.IOException - engine crash or problem in communication.ServerException - engine returned an errorpublic SystemEdge[] parseEdges(UppaalSystem system) throws ProtocolException, IOException, ServerException
system - - The uppaal systemProtocolException - broken engine communication protocol.IOException - engine crash or problem in communication.ServerException - engine returned an errorpublic ArrayList<SymbolicTransition> parseEnabledTransitions(UppaalSystem system) throws EngineException, IOException, CannotEvaluateException
system - - The uppaal systemProtocolException - broken engine communication protocol.IOException - engine crash or problem in communication.EngineException - engine returned an errorCannotEvaluateException - an expression could not be evaluatedpublic String getErrorContext(String errorLocation, int errorStartLine, int errorEndLine)
errorLocation - - The all error location texterrorStartLine - - The start line number where the error string starts fromerrorEndLine - - The end line number where the error string ends topublic void parseAcknowledgement()
throws EngineException,
IOException
IOException - engine crash or problem in communication.EngineException - problem in the Uppaal engine.public String parseBlock() throws EngineException, IOException
IOException - engine crash or problem in communication.EngineException - problem in the Uppaal engine.public void parseGanttHeader(UppaalSystem system) throws ProtocolException, EngineException, IOException
system - - The uppaal systemProtocolException - broken engine communication protocol.IOException - engine crash or problem in communication.EngineException - engine returned an errorpublic SymbolicState parseSymbolicInitial(UppaalSystem system) throws EngineException, IOException, CannotEvaluateException
system - - The uppaal systemIOException - engine crash or problem in communication.EngineException - problem in the Uppaal engine.CannotEvaluateException - in the Uppaal engine.public ConcreteState parseConcreteInitial(UppaalSystem system) throws EngineException, IOException, ServerException, CannotEvaluateException
system - - The uppaal systemIOException - engine crash or problem in communication.EngineException - problem in the Uppaal engine.ServerException - engine returned an error.CannotEvaluateException - in the uppaal enginepublic UppaalSystem parseSystem(Document document) throws EngineException, IOException
document - - The documentIOException - engine crash or problem in communication.EngineException - problem in the Uppaal engine.public LscProcess parseLscProcess(Document document) throws EngineException, IOException
document - - The model documentIOException - engine crash or problem in communication.EngineException - problem in the Uppaal engine.public ArrayList<Problem> parseProblems() throws EngineException, IOException
IOException - engine crash or problem in communication.EngineException - problem in the Uppaal engine.public void parseProblems(ArrayList<Problem> problems) throws EngineException, IOException
problems - - Problems of the systemIOException - engine crash or problem in communication.EngineException - problem in the Uppaal engine.public boolean skipProblems()
throws EngineException,
IOException
IOException - engine crash or problem in communication.EngineException - problem in the Uppaal engine.public Problem problem() throws EngineException, IOException
IOException - engine crash or problem in communication.EngineException - problem in the Uppaal engine.public char parseQueryResult()
throws EngineException,
IOException
IOException - engine crash or problem in communication.EngineException - problem in the Uppaal engine.public ArrayList<SymbolicTransition> parseXTRTrace(UppaalSystem system) throws ProtocolException, IOException
system - - The uppaal systemIOException - engine crash or problem in communication.ProtocolException - broken engine communication protocol.public ConcreteState parseConcreteState(UppaalSystem system) throws IOException, ProtocolException, ServerException
system - - The uppaal systemIOException - engine crash or problem in communication.ProtocolException - broken engine communication protocol.ServerException - engine returned an error.public SystemEdgeSelect[] parseEdgesWS(UppaalSystem system) throws ProtocolException, IOException, ServerException
system - - The uppaal systemIOException - engine crash or problem in communication.ProtocolException - broken engine communication protocol.ServerException - engine returned an error.public ArrayList<ConcreteTransition> parseEnabledConcreteTransitions(UppaalSystem system) throws EngineException, IOException, CannotEvaluateException
system - - The uppaal systemIOException - I/O communication error.EngineException - error in the server protocol.CannotEvaluateException - some expression could not be evaluated.public ConcreteSuccessor parseConcreteSuccessor(UppaalSystem system) throws IOException, EngineException, ServerException, CannotEvaluateException
system - - The uppaal systemIOException - engine crash or problem in communication.EngineException - problem in the Uppaal engine.ServerException - engine returned an error.CannotEvaluateException - some expression could not be evaluated.public GanttChart parseGanttChart(UppaalSystem system, BigDecimal globalTime) throws ProtocolException, ServerException, IOException
system - - The uppaal systemglobalTime - - The global timeIOException - engine crash or problem in communication.ProtocolException - broken engine communication protocol.ServerException - engine returned an error.Copyright © 2014 Uppsala University and Aalborg University. All Rights Reserved.