From e3434d165fbb117a78f7fcaec83f7addf19a78f2 Mon Sep 17 00:00:00 2001 From: Scott Owens Date: Thu, 20 Feb 2003 21:44:50 +0000 Subject: [PATCH] *** empty log message *** original commit: 74b3651be73b004231f6d3cb2f24965e3d5f9de4 --- collects/parser-tools/yacc-to-scheme.ss | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/collects/parser-tools/yacc-to-scheme.ss b/collects/parser-tools/yacc-to-scheme.ss index 135bfbd..3fd6a25 100644 --- a/collects/parser-tools/yacc-to-scheme.ss +++ b/collects/parser-tools/yacc-to-scheme.ss @@ -22,9 +22,9 @@ (define-lex-abbrevs (letter (: (- "a" "z") (- "A" "Z"))) (digit (- "0" "9")) - (initial (: (letter) ! $ % & * / < = > ? ^ _ ~ @)) - (subsequent (: (initial) (digit) + - #\. @)) - (comment (@ /* (* (: (^ *) (@ * (^ /)))) */))) + (initial (: letter "!" "$" "%" "&" "*" "/" "<" "=" ">" "?" "^" "_" "~" "@")) + (subsequent (: initial digit "+" "-" "." "@")) + (comment (@ "/*" (* (: (^ "*") (@ "*" (^ "/")))) "*/"))) (define-empty-tokens x (EOF PIPE |:| SEMI |%%| %prec)) @@ -35,13 +35,13 @@ (lexer-src-pos ("%%" '|%%|) ((: ":") (string->symbol lexeme)) - (%prec (string->symbol lexeme)) + ("%prec" (string->symbol lexeme)) (#\| 'PIPE) - ((+ (: #\newline #\tab " " (comment) (@ "{" (* (^ "}")) "}"))) (return-without-pos (get-token-grammar input-port))) + ((+ (: #\newline #\tab " " comment (@ "{" (* (^ "}")) "}"))) (return-without-pos (get-token-grammar input-port))) (#\; 'SEMI) (#\' (token-STRING (string->symbol (list->string (match-single-string input-port))))) (#\" (token-STRING (string->symbol (list->string (match-double-string input-port))))) - ((@ (initial) (* (subsequent))) (token-SYM (string->symbol lexeme))))) + ((@ initial (* subsequent)) (token-SYM (string->symbol lexeme))))) (define (parse-grammar enter-term enter-empty-term enter-non-term) (parser