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.scm12
1 files changed, 11 insertions, 1 deletions
diff --git a/module/c/lex2.scm b/module/c/lex2.scm
index 72f79f55..049cc48c 100644
--- a/module/c/lex2.scm
+++ b/module/c/lex2.scm
@@ -9,7 +9,10 @@
placemaker
(type . lexeme-type)
(body . lexeme-body)
- (noexpand . lexeme-noexpand)))
+ (noexpand . lexeme-noexpand)
+
+ parse-c-number
+ ))
;;; A.1 Lexical grammar
;;; A.1.1 Lexical elements
@@ -371,6 +374,7 @@
+
;; 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
@@ -392,3 +396,9 @@
"Parsing just failed. Chars: ~s"
(list (peg:string result)) #f))
(cdr (peg:tree result))))))
+
+
+
+(define (parse-c-number string)
+ (match-pattern constant string))
+