|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pz.platypus.parsers.MacroParser
public class MacroParser
Parses macros and looks them up in the macro tables. TODO: need to handle multiple layers of macros and check for circular macros.
Field Summary | |
---|---|
private GDD |
gdd
following are for output of error messages |
Constructor Summary | |
---|---|
MacroParser(GDD gdd)
|
Method Summary | |
---|---|
java.lang.String |
extractMacroName(char[] input,
int parsePoint)
Extract the macro name from the string of chars starting at parsePoint |
java.lang.String |
lookupSystemMacro(java.lang.String macro)
Look up a macro in the table of System stings |
int |
parse(char[] input,
int parsePoint)
Principal function. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private GDD gdd
Constructor Detail |
---|
public MacroParser(GDD gdd)
Method Detail |
---|
public int parse(char[] input, int parsePoint)
input
- the input Platypus text that contains a macroparsePoint
- where to start parsing input
public java.lang.String lookupSystemMacro(java.lang.String macro)
macro
- macro to look up
public java.lang.String extractMacroName(char[] input, int parsePoint) throws java.lang.IllegalArgumentException
input
- the chars from which to extract the macro. should begin with a $parsePoint
- the point in input where the extracting should begin
java.lang.IllegalArgumentException
- in the event an invalid macro name was used
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |