summaryrefslogtreecommitdiffstats
path: root/src/antlr/com/jogamp/gluegen/cgram/StdCParser.g
diff options
context:
space:
mode:
Diffstat (limited to 'src/antlr/com/jogamp/gluegen/cgram/StdCParser.g')
-rw-r--r--src/antlr/com/jogamp/gluegen/cgram/StdCParser.g18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/antlr/com/jogamp/gluegen/cgram/StdCParser.g b/src/antlr/com/jogamp/gluegen/cgram/StdCParser.g
index 26da996..3279826 100644
--- a/src/antlr/com/jogamp/gluegen/cgram/StdCParser.g
+++ b/src/antlr/com/jogamp/gluegen/cgram/StdCParser.g
@@ -64,10 +64,12 @@ options
exportVocab = STDC;
buildAST = true;
ASTLabelType = "TNode";
+
+ genHashLines = true;
// Copied following options from java grammar.
codeGenMakeSwitchThreshold = 2;
- codeGenBitsetTestThreshold = 3;
+ codeGenBitsetTestThreshold = 3;
}
@@ -80,7 +82,7 @@ options
// source for names to unnamed scopes
protected int unnamedScopeCounter = 0;
-
+
public boolean isTypedefName(String name) {
boolean returnValue = false;
TNode node = symbolTable.lookupNameInCurrentScope(name);
@@ -106,6 +108,16 @@ options
symbolTable.popScope();
}
+ protected boolean debugging = false;
+
+ public boolean getDebug() {
+ return debugging;
+ }
+
+ public void setDebug(boolean debug) {
+ this.debugging = debug;
+ }
+
int traceDepth = 0;
public void reportError(RecognitionException ex) {
try {
@@ -124,8 +136,6 @@ options
System.err.println("ANTLR Parsing Warning from String: " + s);
}
public void match(int t) throws MismatchedTokenException {
- boolean debugging = false;
-
if ( debugging ) {
for (int x=0; x<traceDepth; x++) System.out.print(" ");
try {