org.hecl
Class Parse
- java.lang.Object
-
- org.hecl.Parse
-
- Direct Known Subclasses:
- ParseList
public class Parse extends java.lang.ObjectTheParseclass takes care of parsing Hecl scripts.
-
-
Constructor Summary
Constructors Constructor and Description Parse()Creates a newParseinstance.Parse(Interp interp_in, java.lang.String in_in)Creates a newParseinstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddDollar()TheaddDollarmethod adds a $var lookup to the current output.voidaddSub(int type)booleanmore()Themoremethod returns a boolean value indicating whether there is more text to be parsed or not.java.util.Vectorparse()Theparsemethod runs the parser on the text added by creating a new Parse instance.voidparseLine(ParseState state)TheparseLinemethod is where parsing starts on a new line.CodeThingparseToCode()parseToCodeparses up a [] section as code.
-
-
-
Constructor Detail
-
Parse
public Parse()
Creates a newParseinstance. Not actually used by anything.
-
Parse
public Parse(Interp interp_in, java.lang.String in_in)
Creates a newParseinstance.- Parameters:
interp_in- aInterpvaluein_in- aStringvalue
-
-
Method Detail
-
more
public boolean more()
Themoremethod returns a boolean value indicating whether there is more text to be parsed or not.- Returns:
- a
booleanvalue
-
parse
public java.util.Vector parse() throws HeclExceptionTheparsemethod runs the parser on the text added by creating a new Parse instance.- Returns:
- a
Vectorvalue - Throws:
HeclException- if an error occurs
-
parseToCode
public CodeThing parseToCode() throws HeclException
parseToCodeparses up a [] section as code.- Returns:
- a
CodeThingvalue - Throws:
HeclException- if an error occurs
-
addDollar
public void addDollar() throws HeclExceptionTheaddDollarmethod adds a $var lookup to the current output.- Throws:
HeclException- if an error occurs
-
addSub
public void addSub(int type) throws HeclException- Throws:
HeclException
-
parseLine
public void parseLine(ParseState state) throws HeclException
TheparseLinemethod is where parsing starts on a new line.- Parameters:
state- aParseStatevalue- Throws:
HeclException- if an error occurs
-
-
DataMelt 3.0 © DataMelt by jWork.ORG