|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.llnl.babel.parsers.sidl.Parser
The Parser
class is automatically generated by the
JavaCC
compiler. The primary public method in the
parser is beginParse
, which parses the SIDL code in
the input stream set in the parser constructor. The other public
methods are setSourceURL
, which sets the name associated
with the input stream, and setMetadata
, which stores
metadata to be associated with symbols created from this input
file.
Field Summary | |
Token |
jj_nt
|
boolean |
lookingAhead
|
Token |
token
|
ParserTokenManager |
token_source
|
Constructor Summary | |
Parser(java.io.InputStream stream)
|
|
Parser(ParserTokenManager tm)
|
|
Parser(java.io.Reader stream)
|
Method Summary | |
void |
AddArguments(MethodCall mc)
An argument expression list is a comma-separated list of conditional expressions. |
void |
AddInterface(Extendable ext,
java.util.List implall)
This production parses the next scoped identifier and validates that the name exists and is an interface symbol. |
void |
AdditiveExpr()
An additive expression may be a unary (multiplicative) expression or binary (additive op multiplicative) expression, where op is "+" or "-". |
void |
addMetadata(java.lang.String key,
java.lang.String value)
Add metadata to be associated with symbols generated during the parse of this input stream. |
void |
AndExpr()
A AND-expression may be a unary (equality) expression or binary (AND "and" equality) expression. |
void |
Argument()
Parse a SIDL argument. |
void |
Array()
Parse an array construct and push the resulting type and ordering on top of the stack. |
void |
AssertionExpr()
An assertion expression may be a unary (conditional) expression or binary (conditional ("implies" | "iff") conditional) expression. |
void |
Assertions(Extendable ext,
Method m,
int type,
Comment comment)
This production parses the assertions associated with the specified type. |
java.lang.String[] |
beginParse()
Begin parsing and analysis of the SIDL grammar. |
void |
Class()
A SIDL class specification begins with an optional abstract keyword followed by the class token followed by an identifier. |
void |
ClassMethod(Class cls)
This production parses the SIDL method description for a class method. |
void |
ComplexLit()
Parse complex literal. |
void |
ConditionalExpr()
A conditional expression is simply an inclusive-OR expression. |
void |
Definition()
A SIDL Definition production consists of a class, interface, enumerated type, or package. |
void |
disable_tracing()
|
void |
enable_tracing()
|
void |
Enum()
The SIDL enumeration specification begins with an "enum" token followed by an identifier. |
void |
Enumerator(Enumeration e)
The SIDL enumerator specification consists of an identifier followed by an optional assignment statement beginning with an equals and followed by an integer value. |
void |
EqualityExpr()
An equality expression may be a unary (relational) expression or binary (equality op relational) expression, where op is "==" or "!=". |
void |
ExclusiveOrExpr()
A exclusive-OR expression may be a unary (AND) expression or binary (exclusive-OR "xor" AND) expression. |
void |
FloatLit()
Parse float literal. |
ParseException |
generateParseException()
|
Token |
getNextToken()
|
Token |
getToken(int index)
|
void |
Identifier()
A SIDL identifier must start with a letter and may be followed by any number of letters, numbers, or underscores. |
void |
Import()
A SIDL Import production begins with an "import" token and is followed by a scoped identifier which is optionally followed by a "version" token and a version number. |
void |
InclusiveOrExpr()
A inclusive-OR expression may be a unary (exclusive-OR) expression or binary (inclusive-OR "or" exclusive-OR) expression. |
void |
IntegerLit()
Parse integer literal. |
void |
Interface()
A SIDL interface specification begins with the interface token followed by an identifier. |
void |
InterfaceMethod(Interface ifc)
This method parses a SIDL method and then checks whether it can be added to the interface object. |
void |
Invariants(Extendable ext)
This production parses the invariants associated with the interface or class. |
void |
LiteralExpr()
A literal expression is a literal of type: integer, character, floating point, or string. |
void |
Method(Extendable ext,
Method m)
The SIDL method production has a return type, a method identifier, an optional argument list, an optional communication modifier, and an optional throws clause. |
void |
MultiplicativeExpr()
A multiplicative expression may be a unary (multiplicative) expression or binary (multiplicative expression, "*" or "/" or "mod", unary) expression. |
void |
Package()
The SIDL package specification begins with a "package" token followed by a scoped identifier. |
void |
PostfixExpr()
A postfix expression may be a primary expression or an identifier followed by an optional argument list. |
void |
PowerExpr()
A multiplicative expression may be a unary (multiplicative) expression or binary (multiplicative expression, "*" or "/" or "mod", unary) expression. |
void |
PrimaryExpr()
A primary expression may be an identifier, literal, or conditional expression within parentheses. |
void |
Rarray()
Parse an rarray construct and push the resulting type and ordering on top of the stack. |
void |
ReInit(java.io.InputStream stream)
|
void |
ReInit(ParserTokenManager tm)
|
void |
ReInit(java.io.Reader stream)
|
void |
RelationalExpr()
An relational expression may be a unary (shift) expression or binary (relational op shift) expression, where op is ">", "<", "<=", or ">=". |
void |
Require()
A SIDL Require production begins with a "require" token and is followed by a scoped identifer, a "version" token, and a version number. |
void |
ScopedIdentifier()
All SIDL scoped names are of the general form "ID ( . |
void |
setSourceURL(java.lang.String url)
Set the source URL name. |
void |
ShiftExpr()
A shift expression may be a unary (additive) expression or binary (shift op additive) expression, where op is "<<" or ">>". |
void |
Specification()
A SIDL Specification contains zero or more require productions followed by zero or more import productions followed by zero or more package productions followed by the end-of-file. |
void |
SymbolType()
This production parses a scoped identifier and verifies that it is either a forward reference or a symbol that may be used as a type (either an enum, an interface, or a class). |
void |
Type()
A SIDL type consists of one of the standard built-in types (boolean, char, dcomplex, double, fcomplex, float, int, long, opaque, and string), a user-defined type (interface, class, or enum), or an array. |
void |
UnaryExpr()
A unary expression may be a postfix or prefix expression. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public ParserTokenManager token_source
public Token token
public Token jj_nt
public boolean lookingAhead
Constructor Detail |
public Parser(java.io.InputStream stream)
public Parser(java.io.Reader stream)
public Parser(ParserTokenManager tm)
Method Detail |
public void setSourceURL(java.lang.String url)
public void addMetadata(java.lang.String key, java.lang.String value)
public java.lang.String[] beginParse() throws SIDLException
SIDLException
.
The symbols generated during the parse are returned in the symbol table.
Any warnings generated during the parse are returned through the string
array return argument (or null if there were no warnings).
SIDLException
public final void Specification() throws ParseException, SymbolException
ParseException
SymbolException
public final void Require() throws ParseException, SymbolException
ParseException
SymbolException
public final void Import() throws ParseException, SymbolException
ParseException
SymbolException
public final void Package() throws ParseException, SymbolException
ParseException
SymbolException
public final void Definition() throws ParseException, SymbolException
ParseException
SymbolException
public final void Class() throws ParseException, SymbolException
ParseException
SymbolException
public final void Enum() throws ParseException, SymbolException
ParseException
SymbolException
public final void Enumerator(Enumeration e) throws ParseException, SymbolException
ParseException
SymbolException
public final void Interface() throws ParseException, SymbolException
ParseException
SymbolException
public final void AddInterface(Extendable ext, java.util.List implall) throws ParseException, SymbolException
ParseException
SymbolException
public final void Invariants(Extendable ext) throws ParseException, SymbolException
ParseException
SymbolException
public final void ClassMethod(Class cls) throws ParseException, SymbolException
ParseException
SymbolException
public final void InterfaceMethod(Interface ifc) throws ParseException, SymbolException
ParseException
SymbolException
public final void Method(Extendable ext, Method m) throws ParseException, SymbolException
ParseException
SymbolException
public final void Argument() throws ParseException, SymbolException
ParseException
SymbolException
public final void Type() throws ParseException, SymbolException
ParseException
SymbolException
public final void Array() throws ParseException, SymbolException
ParseException
SymbolException
public final void Rarray() throws ParseException, SymbolException
ParseException
SymbolException
public final void SymbolType() throws ParseException, SymbolException
ParseException
SymbolException
public final void Assertions(Extendable ext, Method m, int type, Comment comment) throws ParseException, SymbolException
ParseException
SymbolException
public final void AssertionExpr() throws ParseException, SymbolException
ParseException
SymbolException
public final void ConditionalExpr() throws ParseException, SymbolException
ParseException
SymbolException
public final void InclusiveOrExpr() throws ParseException, SymbolException
ParseException
SymbolException
public final void ExclusiveOrExpr() throws ParseException, SymbolException
ParseException
SymbolException
public final void AndExpr() throws ParseException, SymbolException
ParseException
SymbolException
public final void EqualityExpr() throws ParseException, SymbolException
ParseException
SymbolException
public final void RelationalExpr() throws ParseException, SymbolException
ParseException
SymbolException
public final void ShiftExpr() throws ParseException, SymbolException
ParseException
SymbolException
public final void AdditiveExpr() throws ParseException, SymbolException
ParseException
SymbolException
public final void MultiplicativeExpr() throws ParseException, SymbolException
ParseException
SymbolException
public final void PowerExpr() throws ParseException, SymbolException
ParseException
SymbolException
public final void UnaryExpr() throws ParseException, SymbolException
ParseException
SymbolException
public final void PostfixExpr() throws ParseException, SymbolException
ParseException
SymbolException
public final void PrimaryExpr() throws ParseException, SymbolException
ParseException
SymbolException
public final void LiteralExpr() throws ParseException, SymbolException
ParseException
SymbolException
public final void ComplexLit() throws ParseException, SymbolException
ParseException
SymbolException
public final void FloatLit() throws ParseException, SymbolException
ParseException
SymbolException
public final void IntegerLit() throws ParseException, SymbolException
ParseException
SymbolException
public final void AddArguments(MethodCall mc) throws ParseException, SymbolException
ParseException
SymbolException
public final void ScopedIdentifier() throws ParseException, SymbolException
ParseException
SymbolException
public final void Identifier() throws ParseException, SymbolException
ParseException
SymbolException
public void ReInit(java.io.InputStream stream)
public void ReInit(java.io.Reader stream)
public void ReInit(ParserTokenManager tm)
public final Token getNextToken()
public final Token getToken(int index)
public final 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 |