aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/com/sun/gluegen/cgram/HeaderParser.g
diff options
context:
space:
mode:
authorkrishna_gadepalli <[email protected]>2007-03-05 19:56:27 +0000
committerkrishna_gadepalli <[email protected]>2007-03-05 19:56:27 +0000
commitc1d4aef4377ca5102e3f79bf9027f7f801263218 (patch)
treed2cd75fcd51f953a8daf1a07f95efb76a9ebadd7 /src/java/com/sun/gluegen/cgram/HeaderParser.g
parent173474fa26823a6a508344430ec0f4443e0bc8b9 (diff)
- Add a fix (from Ken Russel) for properly parsing negative constants in enums
by adding getAllChildrenText() - Fixed the lineDirective() method in PCPP.java to emit the correct format of the line directive git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/gluegen/trunk@58 a78bb65f-1512-4460-ba86-f6dc96a7bf27
Diffstat (limited to 'src/java/com/sun/gluegen/cgram/HeaderParser.g')
-rw-r--r--src/java/com/sun/gluegen/cgram/HeaderParser.g4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/java/com/sun/gluegen/cgram/HeaderParser.g b/src/java/com/sun/gluegen/cgram/HeaderParser.g
index f91f146..7c13968 100644
--- a/src/java/com/sun/gluegen/cgram/HeaderParser.g
+++ b/src/java/com/sun/gluegen/cgram/HeaderParser.g
@@ -597,7 +597,7 @@ enumerator[EnumType enumeration, long defaultValue] returns [long newDefaultValu
: eName:ID ( ASSIGN eVal:expr )? {
long value = 0;
if (eVal != null) {
- String vTxt = eVal.getText();
+ String vTxt = eVal.getAllChildrenText();
if (enumHash.containsKey(vTxt)) {
EnumType oldEnumType = (EnumType) enumHash.get(vTxt);
value = oldEnumType.getEnumValue(vTxt);
@@ -605,7 +605,7 @@ enumerator[EnumType enumeration, long defaultValue] returns [long newDefaultValu
try {
value = Long.decode(vTxt).longValue();
} catch (NumberFormatException e) {
- System.err.println("NumberFormatException: " + enumerator_AST_in);
+ System.err.println("NumberFormatException: ID[" + eName.getText() + "], VALUE=[" + vTxt + "]");
throw e;
}
}