Package com.reportmill.parsing
Class RMASParser
- java.lang.Object
- 
- com.reportmill.parsing.RMASParser
 
- 
- All Implemented Interfaces:
- RMASParserConstants
 
 public class RMASParser extends java.lang.Object implements RMASParserConstants RMASParser parses ActionScript to generate the byte-codes and binary encoded actions that are executed by the Flash Player.
- 
- 
Field SummaryFields Modifier and Type Field Description static java.lang.String[]errorKeysKeys that identify the different types of error generated while #include directives are being processed and the script is being parsed.Tokenjj_ntbooleanlookingAheadTokentokenRMASParserTokenManagertoken_source- 
Fields inherited from interface com.reportmill.parsing.RMASParserConstantsASR, ASSIGN, ASSIGN_ADD, ASSIGN_AND, ASSIGN_ASR, ASSIGN_DIV, ASSIGN_LSL, ASSIGN_LSR, ASSIGN_MOD, ASSIGN_MUL, ASSIGN_OR, ASSIGN_SUB, ASSIGN_XOR, BIT_AND, BIT_NOT, BIT_OR, BIT_XOR, BOOLEAN_LITERAL, BREAK, CONTINUE, DEC, DECIMAL_LITERAL, DEFAULT, DIGIT, DIVIDE, DO, ELSE, EOF, EQ, FOR, FUNCTION, GT, GTE, HEX_LITERAL, IDENTIFIER, IF, IN, INC, INTEGER_LITERAL, LETTER, LOGICAL_AND, LOGICAL_NOT, LOGICAL_OR, LSL, LSR, LT, LTE, MINUS, MOD, MULTIPLY, NE, NEW, NULL_LITERAL, ON, ONCLIPEVENT, PLUS, RETURN, STRING_LITERAL, tokenImage, VAR, WHILE, WITH
 
- 
 - 
Constructor SummaryConstructors Constructor Description RMASParser()Constructs a new parser object initializing it to read characters from the standard input stream, System.in.RMASParser(RMASParserTokenManager tm)RMASParser(java.io.InputStream stream)RMASParser(java.io.Reader stream)
 - 
Method Summary
 
- 
- 
- 
Field Detail- 
errorKeyspublic static java.lang.String[] errorKeys Keys that identify the different types of error generated while #include directives are being processed and the script is being parsed. The key can be used with a ResourceBundle object to generate a localized string that describes the error in detail.
 - 
token_sourcepublic RMASParserTokenManager token_source 
 - 
tokenpublic Token token 
 - 
jj_ntpublic Token jj_nt 
 - 
lookingAheadpublic boolean lookingAhead 
 
- 
 - 
Constructor Detail- 
RMASParserpublic RMASParser() Constructs a new parser object initializing it to read characters from the standard input stream, System.in. The current working directory "." is added to the list of directories that will be searched when looking for a file.
 - 
RMASParserpublic RMASParser(java.io.InputStream stream) 
 - 
RMASParserpublic RMASParser(java.io.Reader stream) 
 - 
RMASParserpublic RMASParser(RMASParserTokenManager tm) 
 
- 
 - 
Method Detail- 
getPathNamespublic java.util.ArrayList getPathNames() Returns the array of path names used when searching for a file.- Returns:
- an array of strings containing the names of directories to search.
 
 - 
setPathspublic void setPaths(java.util.ArrayList paths) Sets the array of path names used when searching for a file.- Parameters:
- paths- an array of strings containing the names of directories to search.
 
 - 
setPathspublic void setPaths(java.lang.String paths) Sets the array of path names used when searching for a file. The string should contains paths which contain the system-dependent separator and pathSeparator characters.- Parameters:
- paths- a string containing the names of directories to search.
 
 - 
addpublic void add(java.lang.String path) Add a path to the array of pathnames. The path should contain the system-dependent separator.- Parameters:
- path- a string containing the path to a directory.
 
 - 
getFilenamepublic java.lang.String getFilename() Returns the name of the file that contained the line of code that generated an error while parsing a script.- Returns:
- the name of the file which contained the line of code or an empty string if the line was in the 'root' script.
 
 - 
getLineNumberpublic int getLineNumber() Returns the number of the the line of code that generated an error parsing a script.- Returns:
- the number of the line which that triggered the error.
 
 - 
getLinepublic java.lang.String getLine() Returns the line of code that generated an error while parsing a script.- Returns:
- the line which that triggered the error.
 
 - 
getErrorpublic java.lang.String getError() Returns the key identifying the type of error that occured while of parsing a script.- Returns:
- the line which that triggered the error.
 
 - 
parsepublic RMASNode parse(java.lang.String script) throws ParseException Parses the ActionScript string, script.- Parameters:
- script- a String containing the ActionScript code to parse.
- Throws:
- ParseException- if a parsing error occurs.
 
 - 
Literalpublic final RMASNode Literal() throws ParseException - Throws:
- ParseException
 
 - 
Identifierpublic final RMASNode Identifier() throws ParseException - Throws:
- ParseException
 
 - 
Scriptpublic final RMASNode Script() throws ParseException - Throws:
- ParseException
 
 - 
Statementpublic final RMASNode Statement() throws ParseException - Throws:
- ParseException
 
 - 
FunctionDefinitionpublic final RMASNode FunctionDefinition() throws ParseException - Throws:
- ParseException
 
 - 
BlockStatementpublic final RMASNode BlockStatement() throws ParseException - Throws:
- ParseException
 
 - 
ExpressionStatementpublic final RMASNode ExpressionStatement() throws ParseException - Throws:
- ParseException
 
 - 
IfStatementpublic final RMASNode IfStatement() throws ParseException - Throws:
- ParseException
 
 - 
WithStatementpublic final RMASNode WithStatement() throws ParseException - Throws:
- ParseException
 
 - 
WhileStatementpublic final RMASNode WhileStatement() throws ParseException - Throws:
- ParseException
 
 - 
DoStatementpublic final RMASNode DoStatement() throws ParseException - Throws:
- ParseException
 
 - 
ForStatementpublic final RMASNode ForStatement() throws ParseException - Throws:
- ParseException
 
 - 
BreakStatementpublic final RMASNode BreakStatement() throws ParseException - Throws:
- ParseException
 
 - 
ContinueStatementpublic final RMASNode ContinueStatement() throws ParseException - Throws:
- ParseException
 
 - 
ReturnStatementpublic final RMASNode ReturnStatement() throws ParseException - Throws:
- ParseException
 
 - 
OnClipEventpublic final RMASNode OnClipEvent() throws ParseException - Throws:
- ParseException
 
 - 
Onpublic final RMASNode On() throws ParseException - Throws:
- ParseException
 
 - 
ExpressionListpublic final RMASNode ExpressionList() throws ParseException - Throws:
- ParseException
 
 - 
ArgumentListpublic final RMASNode ArgumentList() throws ParseException - Throws:
- ParseException
 
 - 
Expressionpublic final RMASNode Expression() throws ParseException - Throws:
- ParseException
 
 - 
AssignmentExpressionpublic final RMASNode AssignmentExpression() throws ParseException - Throws:
- ParseException
 
 - 
ConditionalExpressionpublic final RMASNode ConditionalExpression() throws ParseException - Throws:
- ParseException
 
 - 
LogicalOrExpressionpublic final RMASNode LogicalOrExpression() throws ParseException - Throws:
- ParseException
 
 - 
LogicalAndExpressionpublic final RMASNode LogicalAndExpression() throws ParseException - Throws:
- ParseException
 
 - 
InclusiveOrExpressionpublic final RMASNode InclusiveOrExpression() throws ParseException - Throws:
- ParseException
 
 - 
ExclusiveOrExpressionpublic final RMASNode ExclusiveOrExpression() throws ParseException - Throws:
- ParseException
 
 - 
AndExpressionpublic final RMASNode AndExpression() throws ParseException - Throws:
- ParseException
 
 - 
EqualityExpressionpublic final RMASNode EqualityExpression() throws ParseException - Throws:
- ParseException
 
 - 
RelationalExpressionpublic final RMASNode RelationalExpression() throws ParseException - Throws:
- ParseException
 
 - 
ShiftExpressionpublic final RMASNode ShiftExpression() throws ParseException - Throws:
- ParseException
 
 - 
AdditiveExpressionpublic final RMASNode AdditiveExpression() throws ParseException - Throws:
- ParseException
 
 - 
MultiplicativeExpressionpublic final RMASNode MultiplicativeExpression() throws ParseException - Throws:
- ParseException
 
 - 
UnaryExpressionpublic final RMASNode UnaryExpression() throws ParseException - Throws:
- ParseException
 
 - 
PostfixExpressionpublic final RMASNode PostfixExpression() throws ParseException - Throws:
- ParseException
 
 - 
PrimaryExpressionpublic final RMASNode PrimaryExpression() throws ParseException - Throws:
- ParseException
 
 - 
PrimaryPrefixpublic final RMASNode PrimaryPrefix() throws ParseException - Throws:
- ParseException
 
 - 
PrimarySuffixpublic final RMASNode PrimarySuffix() throws ParseException - Throws:
- ParseException
 
 - 
Functionpublic final RMASNode Function() throws ParseException - Throws:
- ParseException
 
 - 
Constructorpublic final RMASNode Constructor() throws ParseException - Throws:
- ParseException
 
 - 
AnonymousArraypublic final RMASNode AnonymousArray() throws ParseException - Throws:
- ParseException
 
 - 
MethodDefinitionpublic final RMASNode MethodDefinition() throws ParseException - Throws:
- ParseException
 
 - 
AnonymousObjectpublic final RMASNode AnonymousObject() throws ParseException - Throws:
- ParseException
 
 - 
Attributepublic final RMASNode Attribute() throws ParseException - Throws:
- ParseException
 
 - 
ReInitpublic void ReInit(java.io.InputStream stream) 
 - 
ReInitpublic void ReInit(java.io.Reader stream) 
 - 
ReInitpublic void ReInit(RMASParserTokenManager tm) 
 - 
getNextTokenpublic final Token getNextToken() 
 - 
getTokenpublic final Token getToken(int index) 
 - 
generateParseExceptionpublic ParseException generateParseException() 
 - 
enable_tracingpublic final void enable_tracing() 
 - 
disable_tracingpublic final void disable_tracing() 
 
- 
 
-