summaryrefslogtreecommitdiff
path: root/src/parser/cvc/cvc_lexer.g
diff options
context:
space:
mode:
authorDejan Jovanović <dejan.jovanovic@gmail.com>2009-12-18 23:34:05 +0000
committerDejan Jovanović <dejan.jovanovic@gmail.com>2009-12-18 23:34:05 +0000
commit1b3c2dc36df9d21a9eb7a536627ba37e13540c3a (patch)
treefe339ff256ac0acc3dcc21bb545bd33cc535cfab /src/parser/cvc/cvc_lexer.g
parent9d57ed6b7e78373bec9db88adfb9878e377abb97 (diff)
More fixes fot the parser tests.
Diffstat (limited to 'src/parser/cvc/cvc_lexer.g')
-rw-r--r--src/parser/cvc/cvc_lexer.g28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/parser/cvc/cvc_lexer.g b/src/parser/cvc/cvc_lexer.g
index 863b15a95..52c58a38f 100644
--- a/src/parser/cvc/cvc_lexer.g
+++ b/src/parser/cvc/cvc_lexer.g
@@ -17,6 +17,10 @@ options {
k = 2;
}
+/*
+ * The tokens that might match with the identifiers go here. Otherwise define
+ * them below.
+ */
tokens {
// Types
BOOLEAN = "BOOLEAN";
@@ -32,25 +36,28 @@ tokens {
TRUE = "TRUE";
FALSE = "FALSE";
XOR = "XOR";
- IMPLIES = "=>";
- IFF = "<=>";
// Commands
ASSERT = "ASSERT";
QUERY = "QUERY";
CHECKSAT = "CHECKSAT";
PRINT = "PRINT";
- EXHO = "ECHO";
+ ECHO = "ECHO";
PUSH = "PUSH";
POP = "POP";
POPTO = "POPTO";
}
+// Operators
+COMMA : ',';
+IMPLIES : "=>";
+IFF : "<=>";
+
/**
* Matches any letter ('a'-'z' and 'A'-'Z').
*/
protected
-ALPHA options{ paraphrase = "a letter"; }
+ALPHA options { paraphrase = "a letter"; }
: 'a'..'z'
| 'A'..'Z'
;
@@ -59,32 +66,25 @@ ALPHA options{ paraphrase = "a letter"; }
* Matches the digits (0-9)
*/
protected
-DIGIT options{ paraphrase = "a digit"; }
+DIGIT options { paraphrase = "a digit"; }
: '0'..'9'
;
/**
* Matches the ':'
*/
-COLON options{ paraphrase = "a colon"; }
+COLON options { paraphrase = "a colon"; }
: ':'
;
/**
* Matches the 'l'
*/
-SEMICOLON options{ paraphrase = "a semicolon"; }
+SEMICOLON options { paraphrase = "a semicolon"; }
: ';'
;
/**
- * Matches the ','
- */
-COMMA options{ paraphrase = "a comma"; }
- : ','
- ;
-
-/**
* Matches an identifier from the input. An identifier is a sequence of letters,
* digits and "_", "'", "." symbols, starting with a letter.
*/
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback