|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectunsw.cse.framescript.Parser
public class Parser
This is the class that parses FrameScript frames/scripts/expressions.
| Constructor Summary | |
|---|---|
Parser(Atomiser a)
Creates a parser that uses a specific atomiser. |
|
| Method Summary | |
|---|---|
Term |
expression()
Reads an expression from the input. |
Term |
factor()
Reads a factor(function call, list, pattern, number, atom, bracketed expression) from the input. |
Term |
getDaemon()
Reads a daemon from the input. |
static SyntaxError |
InvalidName(java.lang.String type,
Term value)
Throws an error with standardised message when the name of an object is invalid. |
static boolean |
isReservedAtom(Term t)
Check whether an atom is reserved or not. |
Pattern |
pattern()
Reads a pattern from the input. |
Term |
patternElement()
Reads a pattern element(atom, number, string, sequence, alternatives, ^, #) from the input. |
void |
skip()
Skips to the beginning of the next statement. |
Term |
statement()
Reads a statement from the input. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Parser(Atomiser a)
a - atomiser that tokenises the input to be parsed| Method Detail |
|---|
public Term statement()
throws FSException,
java.io.IOException
FSException - if there is a problem parsing the statement
java.io.IOException - if there is an IO problem reading from the input
public void skip()
throws java.io.IOException
java.io.IOException - if there is an IO problem reading from the input
public Term expression()
throws SyntaxError,
java.io.IOException
SyntaxError - any errors parsing the expression
java.io.IOException - if there is an IO problem reading from the inputpublic static boolean isReservedAtom(Term t)
t - atom being tested
public Term factor()
throws SyntaxError,
java.io.IOException
SyntaxError - any errors parsing the factor
java.io.IOException - if there is an IO problem reading from the input
public Pattern pattern()
throws SyntaxError,
java.io.IOException
SyntaxError - any errors parsing the pattern
java.io.IOException - if there is an IO problem reading from the input
public Term patternElement()
throws SyntaxError,
java.io.IOException
SyntaxError - any errors parsing the pattern element
java.io.IOException - if there is an IO problem reading from the input
public static SyntaxError InvalidName(java.lang.String type,
Term value)
throws SyntaxError
type - the name of the typevalue - the invalid name
SyntaxError - a standardized error
public Term getDaemon()
throws SyntaxError,
java.io.IOException
SyntaxError - any errors parsing the daemon
java.io.IOException - if there is an IO problem reading from the input
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||