forked from jasder/antlr
Support the -XdbgST and -XdbgSTWait options in TestPerformance
This commit is contained in:
parent
26d267ca38
commit
c462547ff3
|
@ -128,6 +128,16 @@ public class TestPerformance extends BaseTest {
|
|||
* DOT (GraphViz) file.
|
||||
*/
|
||||
private static final boolean EXPORT_ATN_GRAPHS = true;
|
||||
/**
|
||||
* {@code true} to specify the {@code -XdbgST} option when generating the
|
||||
* grammar.
|
||||
*/
|
||||
private static final boolean DEBUG_TEMPLATES = true;
|
||||
/**
|
||||
* {@code true} to specify the {@code -XdbgSTWait} option when generating the
|
||||
* grammar.
|
||||
*/
|
||||
private static final boolean DEBUG_TEMPLATES_WAIT = DEBUG_TEMPLATES;
|
||||
/**
|
||||
* {@code true} to delete temporary (generated and compiled) files when the
|
||||
* test completes.
|
||||
|
@ -573,6 +583,12 @@ public class TestPerformance extends BaseTest {
|
|||
if (EXPORT_ATN_GRAPHS) {
|
||||
extraOptions.add("-atn");
|
||||
}
|
||||
if (DEBUG_TEMPLATES) {
|
||||
extraOptions.add("-XdbgST");
|
||||
if (DEBUG_TEMPLATES_WAIT) {
|
||||
extraOptions.add("-XdbgSTWait");
|
||||
}
|
||||
}
|
||||
extraOptions.add("-visitor");
|
||||
String[] extraOptionsArray = extraOptions.toArray(new String[extraOptions.size()]);
|
||||
boolean success = rawGenerateAndBuildRecognizer(grammarFileName, body, "JavaParser", "JavaLexer", true, extraOptionsArray);
|
||||
|
|
Loading…
Reference in New Issue