public class QuercusParser
extends java.lang.Object
Constructor and Description |
---|
QuercusParser(QuercusContext quercus) |
QuercusParser(QuercusContext quercus,
Path sourceFile,
java.io.Reader reader) |
QuercusParser(QuercusContext quercus,
Path sourceFile,
ReadStream is) |
QuercusParser(QuercusContext quercus,
java.lang.String scriptEncoding) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
Expr |
createVar(StringValue name) |
QuercusParseException |
error(java.lang.String msg)
Returns an error.
|
InterpretedClassDef |
getClassDef() |
java.lang.String |
getClassName()
Returns the current class name
|
ExprFactory |
getExprFactory() |
ExprFactory |
getFactory() |
java.lang.String |
getFileName()
Returns the current filename.
|
int |
getLine()
Returns the current line
|
Location |
getLocation()
The location from which the last token was read.
|
java.lang.String |
getParentClassName() |
java.lang.String |
getSelfClassName() |
StringValue |
getSystemFunctionName(StringValue name) |
boolean |
isShortOpenTag() |
static boolean |
isSwitchLabel(java.lang.String label) |
boolean |
isUnicodeSemantics() |
QuercusProgram |
parse() |
static QuercusProgram |
parse(QuercusContext quercus,
Path path,
java.io.Reader reader) |
static QuercusProgram |
parse(QuercusContext quercus,
Path path,
ReadStream is) |
static QuercusProgram |
parse(QuercusContext quercus,
Path path,
java.lang.String encoding) |
static QuercusProgram |
parse(QuercusContext quercus,
Path path,
java.lang.String encoding,
java.lang.String fileName,
int line) |
static QuercusProgram |
parse(QuercusContext quercus,
ReadStream is) |
static Expr |
parse(QuercusContext quercus,
java.lang.String str) |
static Expr |
parseDefault(ExprFactory factory,
java.lang.String str) |
static Expr |
parseDefault(java.lang.String str) |
static QuercusProgram |
parseEval(QuercusContext quercus,
StringValue str) |
static QuercusProgram |
parseEvalExpr(QuercusContext quercus,
StringValue str) |
static AbstractFunction |
parseFunction(QuercusContext quercus,
java.lang.String name,
java.lang.String args,
java.lang.String code) |
Function |
parseFunction(java.lang.String name,
Path argPath,
Path codePath) |
void |
setLocation(java.lang.String fileName,
int line) |
public QuercusParser(QuercusContext quercus)
public QuercusParser(QuercusContext quercus, java.lang.String scriptEncoding)
public QuercusParser(QuercusContext quercus, Path sourceFile, ReadStream is)
public QuercusParser(QuercusContext quercus, Path sourceFile, java.io.Reader reader)
public void setLocation(java.lang.String fileName, int line)
public static QuercusProgram parse(QuercusContext quercus, Path path, java.lang.String encoding) throws java.io.IOException
java.io.IOException
public static QuercusProgram parse(QuercusContext quercus, Path path, java.lang.String encoding, java.lang.String fileName, int line) throws java.io.IOException
java.io.IOException
public static QuercusProgram parse(QuercusContext quercus, ReadStream is) throws java.io.IOException
java.io.IOException
public static QuercusProgram parse(QuercusContext quercus, Path path, java.io.Reader reader) throws java.io.IOException
java.io.IOException
public static QuercusProgram parse(QuercusContext quercus, Path path, ReadStream is) throws java.io.IOException
java.io.IOException
public static QuercusProgram parseEval(QuercusContext quercus, StringValue str) throws java.io.IOException
java.io.IOException
public static QuercusProgram parseEvalExpr(QuercusContext quercus, StringValue str) throws java.io.IOException
java.io.IOException
public static AbstractFunction parseFunction(QuercusContext quercus, java.lang.String name, java.lang.String args, java.lang.String code) throws java.io.IOException
java.io.IOException
public boolean isUnicodeSemantics()
public boolean isShortOpenTag()
public static Expr parse(QuercusContext quercus, java.lang.String str) throws java.io.IOException
java.io.IOException
public static Expr parseDefault(java.lang.String str)
public static Expr parseDefault(ExprFactory factory, java.lang.String str)
public java.lang.String getFileName()
public java.lang.String getClassName()
public int getLine()
public ExprFactory getExprFactory()
public ExprFactory getFactory()
public QuercusProgram parse() throws java.io.IOException
java.io.IOException
public Function parseFunction(java.lang.String name, Path argPath, Path codePath) throws java.io.IOException
java.io.IOException
public Expr createVar(StringValue name)
public java.lang.String getSelfClassName()
public InterpretedClassDef getClassDef()
public java.lang.String getParentClassName()
public StringValue getSystemFunctionName(StringValue name)
public QuercusParseException error(java.lang.String msg)
public Location getLocation()
public static boolean isSwitchLabel(java.lang.String label)
public void close()