|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcz.cuni.amis.pogamut.sposh.elements.PoshParser
public class PoshParser
Field Summary | |
---|---|
Token |
jj_nt
Next token. |
Token |
token
Current token. |
PoshParserTokenManager |
token_source
Generated Token Manager. |
Fields inherited from interface cz.cuni.amis.pogamut.sposh.elements.PoshParserConstants |
---|
AD, AP, COMMA, COMMENT, COMPETENCE, DC, DEFAULT, DOCUMENTATION, DRIVES, ELEMENTS, ENUM_VALUE, EOF, EQUAL_SIGN, ERROR_CHARS, FALSE, GOAL, HOURS, HZ, JAVA_IDENTIFIER, LBRACE, MINUTES, NAME, NIL, NONE, NUMFLOAT, NUMINT, PM, PREDICATE, RBRACE, SECONDS, SINGLE_LINE_COMMENT, tokenImage, TRIGGER, TRUE, VARIABLE, VARS |
Constructor Summary | |
---|---|
PoshParser(InputStream stream)
Constructor with InputStream. |
|
PoshParser(InputStream stream,
String encoding)
Constructor with InputStream and supplied encoding |
|
PoshParser(PoshParserTokenManager tm)
Constructor with generated Token Manager. |
|
PoshParser(Reader stream)
Constructor. |
Method Summary | |
---|---|
ActionPattern |
actionPattern()
action-pattern ::= AP NAME ( NIL | "(" |
void |
actionPatternElements(ActionPattern ap,
FormalParameters formalParameters)
process actions of the AP and add them into the passed ap. |
Adopt |
adapt()
adapt ::= AD NAME [ |
cz.cuni.amis.pogamut.sposh.elements.PoshParser.Packet<Arguments.Argument,Boolean> |
callParameter(int index,
boolean named)
Parameter used when calling C/AP/sense/action callParameter :: |
Arguments |
callParametersList(FormalParameters formalParameters)
callParametersList:: callParameter() ( "," callParameter() )* ")" |
Competence |
competence()
competence ::= C NAME ( NIL | "(" |
CompetenceElement |
competenceElement(FormalParameters formalParameters)
competence-element ::= "(" NAME [ "(" |
List<Sense> |
competenceGoal(FormalParameters formalParameters)
( NIL | "(" |
List<CompetenceElement> |
competencePriorities(FormalParameters formalParameters)
competence-priorities ::= |
void |
disable_tracing()
Disable tracing. |
void |
docString(PoshPlan plan)
docstring ::= DOCUMENTATION COMMENT COMMENT COMMENT ")" |
void |
driveCollection(DriveCollection dc)
Take passed drive collection and put the data (name, drives) into it. |
void |
driveCollectionGoal(DriveCollection dc,
FormalParameters formalParameters)
Process goal of DC (if exists) |
DriveElement |
driveElement(FormalParameters formalParameters)
Create a drive and return it. |
cz.cuni.amis.pogamut.sposh.elements.PoshParser.Packet<Arguments,Freq> |
driveElementActionFreq(FormalParameters formalParameters)
Nonterminal for possible arguments of the action call of the drive action and the frequency. |
Freq |
driveElementFreq()
Get specified frequency. |
List<Sense> |
driveElementTrigger(FormalParameters formalParameters)
Read trigger (list of senses) and return it. |
void |
enable_tracing()
Enable tracing. |
Freq |
freq()
freq ::= |
Freq.FreqUnits |
freqUnit()
freq-unit ::= HOURS | MINUTES | SECONDS | HZ | PM | NONE |
Sense |
fullSense(FormalParameters formalParameters)
full-sense ::= "(" NAME [ |
ParseException |
generateParseException()
Generate ParseException. |
Token |
getNextToken()
Get the next Token. |
Token |
getToken(int index)
Get the specific Token. |
List<Sense> |
goal(FormalParameters formalParameters)
Process goal sense and return them. |
String |
optComment()
Optional comment, if no comment, return blank string. |
int |
optRetries()
Optional number of retries. |
FormalParameters |
parameters()
Declare parameters in C or AP. |
PoshPlan |
parsePlan()
FIXME: According to official grammar, plan can consists only from single competence or action pattern. |
void |
planFirstElement(PoshPlan plan)
[ "(" |
void |
planFirstHalf(PoshPlan plan)
First half of plan rule |
void |
planSecondHalf(PoshPlan plan)
( "(" |
void |
planSecondHalfElements(PoshPlan plan)
( |
void |
ReInit(InputStream stream)
Reinitialise. |
void |
ReInit(InputStream stream,
String encoding)
Reinitialise. |
void |
ReInit(PoshParserTokenManager tm)
Reinitialise. |
void |
ReInit(Reader stream)
Reinitialise. |
PrimitiveCall |
senseCall(FormalParameters formalParameters)
SenseCall sense:: |
void |
sensePredicate(cz.cuni.amis.pogamut.sposh.elements.SenseComponents _senseComp)
predicate ::= PREDICATE |
List<Sense> |
senses(FormalParameters formalParameters)
Get senses (if there are any) and return them. |
List<Sense> |
sensesList(FormalParameters formalParameters)
( NAME | |
Sense |
sensesListElement(FormalParameters formalParameters)
NAME | |
void |
senseValue(cz.cuni.amis.pogamut.sposh.elements.SenseComponents _senseComp)
value ::= NUMINT | NUMFLOAT | NAME | ENUM_VALUE | NIL Part of full-sense parsing. |
SolTime |
time()
time ::= |
SolTime.TimeUnits |
timeUnit()
time-unit ::= HOURS | MINUTES | SECONDS | NONE |
List<Sense> |
trigger(FormalParameters formalParameters)
Get list of senses of a trigger. |
Object |
value()
|
FormalParameters.Parameter |
varDeclaration()
varDeclare:: |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public PoshParserTokenManager token_source
public Token token
public Token jj_nt
Constructor Detail |
---|
public PoshParser(InputStream stream)
public PoshParser(InputStream stream, String encoding)
public PoshParser(Reader stream)
public PoshParser(PoshParserTokenManager tm)
Method Detail |
---|
public final PoshPlan parsePlan() throws ParseException
ParseException
public final void planFirstElement(PoshPlan plan) throws ParseException
ParseException
public final void planFirstHalf(PoshPlan plan) throws ParseException
ParseException
public final void planSecondHalf(PoshPlan plan) throws ParseException
ParseException
public final void planSecondHalfElements(PoshPlan plan) throws ParseException
ParseException
public final void docString(PoshPlan plan) throws ParseException
ParseException
public final void driveCollection(DriveCollection dc) throws ParseException
driveCollection() :: "DC"XXX: It has extra braces around[ ] "(" "drives" ( "(" + ")" )+ ")" ")"
ParseException
public final void driveCollectionGoal(DriveCollection dc, FormalParameters formalParameters) throws ParseException
ParseException
public final List<Sense> goal(FormalParameters formalParameters) throws ParseException
ParseException
public final DriveElement driveElement(FormalParameters formalParameters) throws ParseException
drive-element ::= "(" NAME ( NIL | "("| ) NAME ( NIL | "(" | ) ")"
ParseException
public final cz.cuni.amis.pogamut.sposh.elements.PoshParser.Packet<Arguments,Freq> driveElementActionFreq(FormalParameters formalParameters) throws ParseException
driveElementActionFreq:: ( | "(" ( | ) | )
I should probably use lookahead of 2 or more, but I really need this fast
for continuous syntax highlighting.
ParseException
public final List<Sense> driveElementTrigger(FormalParameters formalParameters) throws ParseException
( NIL | "(" | )
Part of driveElement rule
ParseException
public final Freq driveElementFreq() throws ParseException
Freq.INFINITE
.
( NIL | "("
ParseException
public final Competence competence() throws ParseException
public final FormalParameters parameters() throws ParseException
ParseException
public final FormalParameters.Parameter varDeclaration() throws ParseException
ParseException
public final List<Sense> competenceGoal(FormalParameters formalParameters) throws ParseException
ParseException
public final List<CompetenceElement> competencePriorities(FormalParameters formalParameters) throws ParseException
ParseException
public final CompetenceElement competenceElement(FormalParameters formalParameters) throws ParseException
ParseException
public final int optRetries() throws ParseException
CompetenceElement.INFINITE_RETRIES
.
ParseException
public final String optComment() throws ParseException
ParseException
public final ActionPattern actionPattern() throws ParseException
public final Adopt adapt() throws ParseException
ParseException
public final void actionPatternElements(ActionPattern ap, FormalParameters formalParameters) throws ParseException
ParseException
public final SolTime time() throws ParseException
ParseException
public final SolTime.TimeUnits timeUnit() throws ParseException
ParseException
public final Freq freq() throws ParseException
ParseException
public final Freq.FreqUnits freqUnit() throws ParseException
ParseException
public final List<Sense> trigger(FormalParameters formalParameters) throws ParseException
ParseException
public final List<Sense> senses(FormalParameters formalParameters) throws ParseException
ParseException
public final List<Sense> sensesList(FormalParameters formalParameters) throws ParseException
ParseException
public final Sense sensesListElement(FormalParameters formalParameters) throws ParseException
ParseException
public final Sense fullSense(FormalParameters formalParameters) throws ParseException
ParseException
public final PrimitiveCall senseCall(FormalParameters formalParameters) throws ParseException
ParseException
public final Arguments callParametersList(FormalParameters formalParameters) throws ParseException
ParseException
public final cz.cuni.amis.pogamut.sposh.elements.PoshParser.Packet<Arguments.Argument,Boolean> callParameter(int index, boolean named) throws ParseException
named
- was at least one named call parameter specified in the list before this one?
ParseException
public final void senseValue(cz.cuni.amis.pogamut.sposh.elements.SenseComponents _senseComp) throws ParseException
ParseException
public final void sensePredicate(cz.cuni.amis.pogamut.sposh.elements.SenseComponents _senseComp) throws ParseException
ParseException
public final Object value() throws ParseException
ParseException
public void ReInit(InputStream stream)
public void ReInit(InputStream stream, String encoding)
public void ReInit(Reader stream)
public void ReInit(PoshParserTokenManager tm)
public final Token getNextToken()
public final Token getToken(int index)
public ParseException generateParseException()
public final void enable_tracing()
public final void disable_tracing()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |