aboutsummaryrefslogtreecommitdiff
path: root/module/c/lex2.scm
diff options
context:
space:
mode:
Diffstat (limited to 'module/c/lex2.scm')
-rw-r--r--module/c/lex2.scm7
1 files changed, 7 insertions, 0 deletions
diff --git a/module/c/lex2.scm b/module/c/lex2.scm
index 50cf56e3..652aa6c1 100644
--- a/module/c/lex2.scm
+++ b/module/c/lex2.scm
@@ -330,6 +330,7 @@
comment
preprocessing-token)))
+
(define-type (lexeme)
(type type: (memv '(whitespace comment preprocessing-token placemaker)))
@@ -356,6 +357,12 @@
;; "unflatten"
('comment (lexeme body: "" type: 'comment))))
+
+
+;; At a number of places I chose token depending on the order of the rule. The
+;; standard however says that the longest possible choice should be used.
+;; 6.4 p. 4
+
;; returns a list of lexemes
(define (lex string)
(if (string-null? string)