|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dk.brics.grammar.main.Main
public class Main
Parser and grammar ambiguity checker.
This tool can be used to
AmbiguityAnalyzer
).
MainCommandLine
,
MainGUI
,
MainServlet
Method Summary | |
---|---|
static void |
main(String[] args)
Parser and grammar ambiguity checker. |
static int |
run(String grammar,
String grammar_location,
String text,
String text_location,
boolean ambiguity_analysis,
int unfold_level,
String unfold_left,
String unfold_right,
boolean verbose,
boolean dump_ast,
boolean tokenize,
boolean extrastats,
PrintWriter out)
Front-end for parser and grammar ambiguity checker. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void main(String[] args)
-h
to see the command-line usage.
args
- argumentsrun(String, String, String, String, boolean, int, String, String, boolean, boolean, boolean, boolean, PrintWriter)
public static int run(String grammar, String grammar_location, String text, String text_location, boolean ambiguity_analysis, int unfold_level, String unfold_left, String unfold_right, boolean verbose, boolean dump_ast, boolean tokenize, boolean extrastats, PrintWriter out) throws InstantiationException, IllegalAccessException, ClassNotFoundException, IllegalArgumentException
grammar
- grammargrammar_location
- location of grammar (typically a directory path or a URL)text
- text to parse (null if none)text_location
- location of text (null if none)ambiguity_analysis
- if true, run ambiguity analysisunfold_level
- unfold numberunfold_left
- unfolding left parentheses symbolsunfold_right
- unfolding right parentheses symbolsverbose
- if true, verbose outputextrastats
- if true, print extra statisticsdump_ast
- if true, dump AST after parsingtokenize
- if true, tokenize grammar before ambiguity analysisout
- print writer for output
ClassNotFoundException
- if an approximation strategy class was not found
IllegalAccessException
- if an approximation strategy class or its nullary constructor is not accessible
InstantiationException
- if an approximation strategy class cannot be instantiated
IllegalArgumentException
- if the grammar is not balanced with the given unfolding parentheses
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |