|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.sasl.language.placeholder.syntax.PlaceholderScriptParser
public class PlaceholderScriptParser
Small adapter to a cup generated LALR(1) placeholder parser.
Constructor Summary | |
---|---|
|
PlaceholderScriptParser(InputStream inputStream)
Creates a parser that reads the input from the given input stream. |
protected |
PlaceholderScriptParser(PlaceholderScriptScanner scanner)
Creates a parser that uses the given scanner to read the input. |
|
PlaceholderScriptParser(String input)
Creates a parser that reads the input from the given input string. |
Method Summary | |
---|---|
ScriptNode |
getParsedAST()
Returns the parsed abstract syntax tree. |
Set<String> |
getPlaceholderSymbols()
Returns a set of all placeholder names of the parsed abstract placeholder syntax tree. |
ScriptNode |
parse()
Tries to parse the input if not already parsed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PlaceholderScriptParser(String input) throws IllegalArgumentException
input
- non null.
IllegalArgumentException
- if input is null.public PlaceholderScriptParser(InputStream inputStream) throws IllegalArgumentException
inputStream
- non null.
IllegalArgumentException
protected PlaceholderScriptParser(PlaceholderScriptScanner scanner) throws IllegalArgumentException
scanner
- non null
IllegalArgumentException
- if scanner is null.Method Detail |
---|
public ScriptNode parse() throws ParseException
ParseException
- if a scanner exception or syntax error occurs during parsing
the input.public ScriptNode getParsedAST()
parse()
was not called in the past.
public Set<String> getPlaceholderSymbols()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |