[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Java token names containing C trigraphs
From: |
Tim Landscheidt |
Subject: |
Java token names containing C trigraphs |
Date: |
Sat, 05 Nov 2011 19:03:50 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
Hi,
as alluded to on -patches, the generated Java parser is not
compilable if token names contain C trigraphs ("??>" & Co.).
Attached is a test.
Tim
diff --git a/tests/java.at b/tests/java.at
index de6747d..ac85734 100644
--- a/tests/java.at
+++ b/tests/java.at
@@ -781,3 +781,17 @@ AT_CHECK([[$EGREP -v ' */?\*' YYParser.java | grep
'Position']], [1], [ignore])
AT_CHECK([[$EGREP -v ' */?\*' YYParser.java | grep 'Location']], [1], [ignore])
AT_CLEANUP
+
+
+# ---------------------------------------
+# Java token names containing C trigraphs
+# ---------------------------------------
+
+AT_SETUP([Java token names containing C trigraphs])
+
+AT_CHECK_JAVA_MINIMAL([%token TRIGRAPHS "??=??/??'??(??)??!??<??>??-"], [], [])
+# Ensure that the compilation didn't succeed just because the token
+# wasn't output at all.
+AT_CHECK([[grep '"\\"??=??/??'\''??(??)??!??<??>??-\\""' YYParser.java]], [0],
[ignore])
+
+AT_CLEANUP
- Java token names containing C trigraphs,
Tim Landscheidt <=