|
||||||||||
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
|
Fields inherited from interface gov.llnl.babel.parsers.sidl.ParserConstants |
BEGIN_DOC_COMMENT, DEFAULT, EOF, IN_DOC_COMMENT, LINE_DOC_COMMENT, T_ABSTRACT, T_ARRAY, T_BOOLEAN, T_CATCH_ALL, T_CHAR, T_CLASS, T_CLOSE_ANGLE, T_CLOSE_CURLY, T_CLOSE_PAREN, T_COLUMN_MAJOR, T_COMMA, T_COMMENT, T_COPY, T_DCOMPLEX, T_DIGIT, T_DOUBLE, T_ENUM, T_EQUALS, T_EXTENDS, T_FCOMPLEX, T_FINAL, T_FLOAT, T_IDENTIFIER, T_IMPLEMENTS, T_IMPLEMENTS_ALL, T_IMPORT, T_IN, T_INOUT, T_INT, T_INTEGER, T_INTERFACE, T_LETTER, T_LOCAL, T_LONG, T_ONEWAY, T_OPAQUE, T_OPEN_ANGLE, T_OPEN_CURLY, T_OPEN_PAREN, T_OUT, T_PACKAGE, T_REQUIRE, T_ROW_MAJOR, T_SCOPE, T_SEMICOLON, T_STATIC, T_STRING, T_THROWS, T_VERSION, T_VERSION_STRING, T_VOID, tokenImage |
Constructor Summary | |
Parser(java.io.InputStream stream)
|
|
Parser(ParserTokenManager tm)
|
|
Parser(java.io.Reader stream)
|
Method Summary | |
void |
AddInterface(Extendable ext,
java.util.Set set)
This production parses the next scoped identifier and validates that the name exists and is an interface symbol. |
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 |
Argument()
Parse a sidl argument. |
void |
Array()
Parse an array construct and push the resulting type and ordering on top of the stack. |
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 |
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. |
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 |
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 |
Method(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 |
Package()
The sidl package specification begins with a "package" token followed by a scoped identifier. |
void |
ReInit(java.io.InputStream stream)
|
void |
ReInit(ParserTokenManager tm)
|
void |
ReInit(java.io.Reader stream)
|
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 |
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. |
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.Set set) 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(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 SymbolType() 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 |