|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlp.parse.LpParser
lp.parse.EvolpParser
lp.trans.EvolpSolver.TransEvolpParser
private class EvolpSolver.TransEvolpParser
Special parser that recognizes the indexation of atoms in the normal logic program that was constructed by the transformation from an evolving logic program.
Field Summary | |
---|---|
private int |
group
Contains the index of the last atom that was parsed. |
private boolean |
topLevel
Used internally to remember whether we are parsing a top-level atom or some atom that is part of an inner rule. |
Fields inherited from class lp.parse.EvolpParser |
---|
SEP_RULE |
Constructor Summary | |
---|---|
private |
EvolpSolver.TransEvolpParser()
|
Method Summary | |
---|---|
int |
getGroup()
Returns the index of the last atom that was parsed. |
LpAtom |
parseAtom()
Parses an atom in a normal way but cuts off the indexation suffix "N([0-9]+)" and stores $1. |
void |
setInput(File file)
Sets the character input of this LpParser to the contents of the
given file. |
void |
setInput(CharSequence input)
Sets the character input of this LpParser to the given
CharSequence . |
void |
setInput(Reader input)
Sets the character input of this LpParser to the given
Reader . |
Methods inherited from class lp.parse.EvolpParser |
---|
parseEvolp, parseTerm |
Methods inherited from class lp.parse.LpParser |
---|
close, expect, getLexer, hasMoreTokens, match, nextToken, parseAllRules, parseAllRules, parseArguments, parseLiteral, parseOnlyRule, parseRule, parseRuleBody |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private int group
private boolean topLevel
Constructor Detail |
---|
private EvolpSolver.TransEvolpParser()
Method Detail |
---|
public void setInput(CharSequence input)
LpParser
to the given
CharSequence
.
setInput
in class LpParser
input
- the character sequence to be parsedLpLexer.setInput(CharSequence)
public void setInput(File file)
LpParser
to the contents of the
given file. The default system character encoding is used to read the
file.
setInput
in class LpParser
file
- the file to be parsedLpLexer.setInput(File)
public void setInput(Reader input)
LpParser
to the given
Reader
.
setInput
in class LpParser
input
- the input readerLpLexer.setInput(Reader)
public LpAtom parseAtom()
getGroup()
method.
parseAtom
in class LpParser
public int getGroup()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |