public class Dap2Parser extends Dap2Parse
Modifier and Type | Class and Description |
---|---|
static interface |
Dap2Parser.Lexer
Communication interface between the scanner and the Bison-generated
parser Dap2Parser.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
bisonSkeleton
Name of the skeleton that generated this parser.
|
static java.lang.String |
bisonVersion
Version number for the Bison executable that generated this parser.
|
static int |
YYABORT
Returned by a Bison action in order to stop the parsing process and
return failure (false).
|
static int |
YYACCEPT
Returned by a Bison action in order to stop the parsing process and
return success (true).
|
static int |
YYERROR
Returned by a Bison action in order to start error recovery without
printing an error message.
|
Constructor and Description |
---|
Dap2Parser(BaseTypeFactory factory)
Instantiates the Bison-generated parser.
|
Dap2Parser(Dap2Parser.Lexer yylexer)
Instantiates the Bison-generated parser.
|
Modifier and Type | Method and Description |
---|---|
int |
getDebugLevel()
Answer the verbosity of the debugging output; 0 means that all kinds of
output from the parser are suppressed.
|
java.io.PrintStream |
getDebugStream()
Return the PrintStream on which the debugging output is
printed.
|
boolean |
getErrorVerbose()
Return whether verbose error messages are enabled.
|
java.lang.String |
getURL() |
boolean |
parse()
Parse input from the scanner that was specified at object construction
time.
|
boolean |
parse(java.lang.String input)
**********************************************
|
boolean |
recovering()
Return whether error recovery is being done.
|
void |
setDebugLevel(int level)
Set the verbosity of the debugging output; 0 means that all kinds of
output from the parser are suppressed.
|
void |
setDebugStream(java.io.PrintStream s)
Set the PrintStream on which the debug output is printed.
|
void |
setErrorVerbose(boolean verbose)
Set the verbosity of error messages.
|
void |
setURL(java.lang.String url) |
protected void |
yycdebug(java.lang.String s) |
void |
yyerror(java.lang.String msg)
Print an error message via the lexer.
|
public static final java.lang.String bisonVersion
public static final java.lang.String bisonSkeleton
public static final int YYACCEPT
public static final int YYABORT
public static final int YYERROR
public Dap2Parser(Dap2Parser.Lexer yylexer)
yylexer
- The scanner that will supply tokens to the parser.public Dap2Parser(BaseTypeFactory factory)
factory
- the factory for generating tree nodespublic final boolean getErrorVerbose()
public final void setErrorVerbose(boolean verbose)
verbose
- True to request verbose error messages.public final java.io.PrintStream getDebugStream()
public final void setDebugStream(java.io.PrintStream s)
s
- The stream that is used for debugging output.public final int getDebugLevel()
getDebugLevel
in class Dap2Parse
public final void setDebugLevel(int level)
setDebugLevel
in class Dap2Parse
level
- The verbosity level for debugging output.public final void yyerror(java.lang.String msg)
msg
- The error message.protected final void yycdebug(java.lang.String s)
public final boolean recovering()
public boolean parse() throws ParseException, ParseException
ParseException
public boolean parse(java.lang.String input) throws ParseException
Dap2Parse
parse
in class Dap2Parse
ParseException