From 65ecaf18aa34d3e76abbfd757797fa4dda9bb195 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Tue, 12 Jul 2022 03:16:34 +0200 Subject: Resolve # ## # --- module/c/lex2.scm | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'module/c/lex2.scm') 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) -- cgit v1.2.3