Inserting ternary in the qcc-operator-list at the place fteqcc would have it
authorWolfgang (Blub) Bumiller <blub@speed.at>
Wed, 21 Nov 2012 19:16:28 +0000 (20:16 +0100)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Wed, 21 Nov 2012 19:16:28 +0000 (20:16 +0100)
lexer.h

diff --git a/lexer.h b/lexer.h
index 561148ca0a18db5a590b6aefcc9297194dba0bd6..137bfe9414ebdced2e2f45a4f18a982a3c3c6a1f 100644 (file)
--- a/lexer.h
+++ b/lexer.h
@@ -262,7 +262,9 @@ static const oper_info qcc_operators[] = {
     { "&&",  2, opid2('&','&'),     ASSOC_LEFT,  5,  0 },
     { "||",  2, opid2('|','|'),     ASSOC_LEFT,  5,  0 },
 
-    { ",",   2, opid1(','),         ASSOC_LEFT,  1,  0 }
+    { ",",   2, opid1(','),         ASSOC_LEFT,  2,  0 }
+
+    { "?",   3, opid2('?',':'),     ASSOC_RIGHT, 1,  0 },
 };
 static const size_t qcc_operator_count = (sizeof(qcc_operators) / sizeof(qcc_operators[0]));