|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.gla.dcs.renaissance.iqir.parser.IQIRParser
public class IQIRParser
Nested Class Summary | |
---|---|
static class |
IQIRParser.SOperator
|
Field Summary | |
---|---|
Token |
jj_nt
Next token. |
Token |
token
Current token. |
IQIRParserTokenManager |
token_source
Generated Token Manager. |
Fields inherited from interface uk.ac.gla.dcs.renaissance.iqir.parser.IQIRParserConstants |
---|
ALPHANUMERICS, COMMA, DEFAULT, DIGIT, EOF, LBRACKET, LCURLY, LETTER, LETTERDIGITEXTRAS, LPAREN, MINUS, NUMBER, PLUS, QUOTES, RBRACKET, RCURLY, RPAREN, tokenImage, XML_NAME, XML_NAMECHAR, XML_TAG |
Constructor Summary | |
---|---|
IQIRParser(InputStream stream)
Constructor with InputStream. |
|
IQIRParser(InputStream stream,
String encoding)
Constructor with InputStream and supplied encoding |
|
IQIRParser(IQIRParserTokenManager tm)
Constructor with generated Token Manager. |
|
IQIRParser(Reader stream)
Constructor. |
Method Summary | |
---|---|
Token |
alphanumeric()
alphanumeric ::= ALPHANUMERICS |
void |
disable_tracing()
Disable tracing. |
void |
enable_tracing()
Enable tracing. |
Operator |
expr()
Expression expr: operators (("+" | "-") operators)* |
ParseException |
generateParseException()
Generate ParseException. |
Token |
getNextToken()
Get the next Token. |
Token |
getToken(int index)
Get the specific Token. |
TopicOperator |
iqirTopic()
An IQIR topic is described by a set of tensors. |
MultiTermOperator |
multiterms()
A multiterms is a sequence of words |
Operator |
operator()
operator ::= ( ( LBRACKET operators RBRACKET ) | ( LPAREN expr RPAREN ) | ( QUOTES multiterms QUOTES ) ) |
Mixture |
operators(boolean superpose)
Operators |
void |
ReInit(InputStream stream)
Reinitialise. |
void |
ReInit(InputStream stream,
String encoding)
Reinitialise. |
void |
ReInit(IQIRParserTokenManager tm)
Reinitialise. |
void |
ReInit(Reader stream)
Reinitialise. |
List<Operator> |
tensors()
tensor: either {} ops or |
TermOperator |
word()
A word is a sequence: of alphabetics, of digits, of digits preceeded by a negative (-) sign (a negative number). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public IQIRParserTokenManager token_source
public Token token
public Token jj_nt
Constructor Detail |
---|
public IQIRParser(InputStream stream)
public IQIRParser(InputStream stream, String encoding)
public IQIRParser(Reader stream)
public IQIRParser(IQIRParserTokenManager tm)
Method Detail |
---|
public final TopicOperator iqirTopic() throws ParseException, Exception
iqir-topic ::= tensors (COMMA tensors)* EOF
ParseException
Exception
public final List<Operator> tensors() throws ParseException, Exception
tensors ::= ((expr) | LCURLY expr (COMMA expr)* RCURLY (operators)? ((PLUS | MINUS) operators)* ) )
ParseException
Exception
public final Operator expr() throws ParseException, Exception
expr ::= operators (( PLUS | MINUS) operators)*
ParseException
Exception
public final Mixture operators(boolean superpose) throws ParseException, Exception
operators ::= (operator)+
ParseException
Exception
public final Operator operator() throws ParseException, Exception
operator ::= ( ( LBRACKET operators RBRACKET ) | ( LPAREN expr RPAREN ) | ( QUOTES multiterms QUOTES ) )
ParseException
Exception
public final MultiTermOperator multiterms() throws ParseException, Exception
multiterms := (word)*
ParseException
Exception
public final TermOperator word() throws ParseException, Exception
word ::= (NUMBER | DIGIT | alphanumeric)
ParseException
Exception
public final Token alphanumeric() throws ParseException, Exception
alphanumeric ::= ALPHANUMERICS
ParseException
Exception
public void ReInit(InputStream stream)
public void ReInit(InputStream stream, String encoding)
public void ReInit(Reader stream)
public void ReInit(IQIRParserTokenManager 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 |