|
Platypus | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.pz.platypus.parsers.CommandFamilyParser
public class CommandFamilyParser
Handles parsing of compound commands
| Constructor Summary | |
|---|---|
CommandFamilyParser()
|
|
| Method Summary | |
|---|---|
(package private) java.lang.String |
extractCommandName(char[] content,
int parsePoint)
return a command name in a complex command; e.g. |
(package private) void |
fixUp(TokenList tokens,
ParseContext context,
int end)
Complex commands can have 1 or more commands. |
private void |
invalidCommandError(GDD gdd,
ParseContext context,
java.lang.String command)
Outputs the error info to the user console |
private void |
invalidParameterError(GDD gdd,
ParseContext context,
java.lang.String command)
Outputs the error info to the user console |
int |
parse(CommandTable ctable,
ParseContext context,
TokenList parsedTokens,
java.lang.String familyRoot,
GDD gdd)
Parses a compound command, extracting the next command (as pointed to in the ParseContext) and any parameters associated with the command. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CommandFamilyParser()
| Method Detail |
|---|
public int parse(CommandTable ctable,
ParseContext context,
TokenList parsedTokens,
java.lang.String familyRoot,
GDD gdd)
ctable - map of all commandscontext - the parsing contextparsedTokens - the output list of tokens generated by the isLineCommentfamilyRoot - the root of the command family = [font|gdd - GDD
InvalidCommandException - if the command cannot be found
InvalidCommandParameterException - if the parameter is invalid
java.lang.IllegalArgumentException - if an invalid arg is passed to the method
void fixUp(TokenList tokens,
ParseContext context,
int end)
tokens - list of parsed commandscontext - the parser contextend - the end point in the input
java.lang.String extractCommandName(char[] content,
int parsePoint)
content - the input we're parsingparsePoint - where to start the isLineComment
private void invalidCommandError(GDD gdd,
ParseContext context,
java.lang.String command)
gdd - the GDD, used for the loggercontext - where the error occurredcommand - the errant command
private void invalidParameterError(GDD gdd,
ParseContext context,
java.lang.String command)
gdd - the GDD, used for the loggercontext - where the error occurredcommand - the command withe the errant parameter
|
Platypus | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||