public class FolParserB extends java.lang.Object implements FolParserBConstants
Modifier and Type | Class and Description |
---|---|
(package private) static class |
FolParserB.JJCalls |
private static class |
FolParserB.LookaheadSuccess |
Modifier and Type | Field and Description |
---|---|
private boolean |
forceDefinitions |
private FolParserB.JJCalls[] |
jj_2_rtns |
private int |
jj_endpos |
private java.util.List<int[]> |
jj_expentries |
private int[] |
jj_expentry |
private int |
jj_gc |
private int |
jj_gen |
(package private) SimpleCharStream |
jj_input_stream |
private int |
jj_kind |
private int |
jj_la |
private int[] |
jj_la1 |
private static int[] |
jj_la1_0 |
private Token |
jj_lastpos |
private int[] |
jj_lasttokens |
private FolParserB.LookaheadSuccess |
jj_ls |
Token |
jj_nt
Next token.
|
private int |
jj_ntk |
private boolean |
jj_rescan |
private Token |
jj_scanpos |
Token |
token
Current token.
|
FolParserBTokenManager |
token_source
Generated Token Manager.
|
Constructor and Description |
---|
FolParserB(FolParserBTokenManager tm)
Constructor with generated Token Manager.
|
FolParserB(java.io.InputStream stream)
Constructor with InputStream.
|
FolParserB(java.io.InputStream stream,
java.lang.String encoding)
Constructor with InputStream and supplied encoding
|
FolParserB(java.io.Reader stream)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
FOLAtom |
atom(FolSignature signature) |
java.util.Set<Constant> |
constants(Sort type) |
void |
declar(FolSignature signature) |
void |
disable_tracing()
Disable tracing.
|
void |
enable_tracing()
Enable tracing.
|
TypedStructure |
endFunctorDeclar(FolSignature signature,
java.lang.String sortName) |
TypedStructure |
endPredicateDeclar(FolSignature signature,
java.lang.String name) |
FolFormula |
formula(FolSignature signature) |
Pair<java.lang.Integer,FolFormula> |
formulaex(FolSignature signature) |
ParseException |
generateParseException()
Generate ParseException.
|
private Sort |
getArgumentType(TypedStructure fbs,
int count) |
private Functor |
getFunctor(java.lang.String name,
FolSignature signature) |
Token |
getNextToken()
Get the next Token.
|
private Constant |
getOrCreateConstant(java.lang.String name,
Sort type,
FolSignature sig) |
private Functor |
getOrCreateFunctor(java.lang.String name,
java.util.List<Term<?>> args,
Sort targetSort,
FolSignature signature) |
private Predicate |
getPredicate(java.lang.String name,
FolSignature sig) |
private java.util.List<Sort> |
getSorts(FolSignature sig,
java.util.List<java.lang.String> names) |
Token |
getToken(int index)
Get the specific Token.
|
private FolFormula |
helper(FolFormula form,
Pair<java.lang.Integer,FolFormula> exform) |
java.lang.String |
identifier() |
private boolean |
jj_2_1(int xla) |
private boolean |
jj_2_2(int xla) |
private boolean |
jj_3_1() |
private boolean |
jj_3_2() |
private boolean |
jj_3R_10() |
private boolean |
jj_3R_9() |
private void |
jj_add_error_token(int kind,
int pos) |
private Token |
jj_consume_token(int kind) |
private static void |
jj_la1_init_0() |
private int |
jj_ntk() |
private void |
jj_rescan_token() |
private void |
jj_save(int index,
int xla) |
private boolean |
jj_scan_token(int kind) |
FolBeliefSet |
KB() |
void |
ReInit(FolParserBTokenManager tm)
Reinitialise.
|
void |
ReInit(java.io.InputStream stream)
Reinitialise.
|
void |
ReInit(java.io.InputStream stream,
java.lang.String encoding)
Reinitialise.
|
void |
ReInit(java.io.Reader stream)
Reinitialise.
|
void |
setForce(boolean forceDefinitions) |
java.util.List<Sort> |
sortdecl() |
Term<?> |
term(FolSignature signature,
Sort type) |
private boolean forceDefinitions
public FolParserBTokenManager token_source
SimpleCharStream jj_input_stream
public Token token
public Token jj_nt
private int jj_ntk
private Token jj_scanpos
private Token jj_lastpos
private int jj_la
private int jj_gen
private final int[] jj_la1
private static int[] jj_la1_0
private final FolParserB.JJCalls[] jj_2_rtns
private boolean jj_rescan
private int jj_gc
private final FolParserB.LookaheadSuccess jj_ls
private java.util.List<int[]> jj_expentries
private int[] jj_expentry
private int jj_kind
private int[] jj_lasttokens
private int jj_endpos
public FolParserB(java.io.InputStream stream)
public FolParserB(java.io.InputStream stream, java.lang.String encoding)
public FolParserB(java.io.Reader stream)
public FolParserB(FolParserBTokenManager tm)
public void setForce(boolean forceDefinitions)
private FolFormula helper(FolFormula form, Pair<java.lang.Integer,FolFormula> exform) throws ParseException
ParseException
private java.util.List<Sort> getSorts(FolSignature sig, java.util.List<java.lang.String> names) throws ParseException
ParseException
private Functor getFunctor(java.lang.String name, FolSignature signature)
private Functor getOrCreateFunctor(java.lang.String name, java.util.List<Term<?>> args, Sort targetSort, FolSignature signature) throws ParseException
ParseException
private Predicate getPredicate(java.lang.String name, FolSignature sig)
private Sort getArgumentType(TypedStructure fbs, int count) throws ParseException
ParseException
private Constant getOrCreateConstant(java.lang.String name, Sort type, FolSignature sig) throws ParseException
ParseException
public final FolBeliefSet KB() throws ParseException
ParseException
public final FolFormula formula(FolSignature signature) throws ParseException
ParseException
public final Pair<java.lang.Integer,FolFormula> formulaex(FolSignature signature) throws ParseException
ParseException
public final FOLAtom atom(FolSignature signature) throws ParseException
ParseException
public final Term<?> term(FolSignature signature, Sort type) throws ParseException
ParseException
public final java.lang.String identifier() throws ParseException
ParseException
public final java.util.List<Sort> sortdecl() throws ParseException
ParseException
public final java.util.Set<Constant> constants(Sort type) throws ParseException
ParseException
public final void declar(FolSignature signature) throws ParseException
ParseException
public final TypedStructure endPredicateDeclar(FolSignature signature, java.lang.String name) throws ParseException
ParseException
public final TypedStructure endFunctorDeclar(FolSignature signature, java.lang.String sortName) throws ParseException
ParseException
private boolean jj_2_1(int xla)
private boolean jj_2_2(int xla)
private boolean jj_3R_9()
private boolean jj_3R_10()
private boolean jj_3_1()
private boolean jj_3_2()
private static void jj_la1_init_0()
public void ReInit(java.io.InputStream stream)
public void ReInit(java.io.InputStream stream, java.lang.String encoding)
public void ReInit(java.io.Reader stream)
public void ReInit(FolParserBTokenManager tm)
private Token jj_consume_token(int kind) throws ParseException
ParseException
private boolean jj_scan_token(int kind)
public final Token getNextToken()
public final Token getToken(int index)
private int jj_ntk()
private void jj_add_error_token(int kind, int pos)
public ParseException generateParseException()
public final void enable_tracing()
public final void disable_tracing()
private void jj_rescan_token()
private void jj_save(int index, int xla)