mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-10 05:50:26 +02:00
Clean Up PEG Codegen
* module/ice-9/peg/codegen.scm: remove unnecessary literals in peg-sexp-compile.
This commit is contained in:
parent
89c3c9ecf0
commit
5c3f2da81f
1 changed files with 1 additions and 1 deletions
|
@ -254,7 +254,7 @@ return EXP."
|
||||||
;; Takes an arbitrary expressions and accumulation variable, then parses it.
|
;; Takes an arbitrary expressions and accumulation variable, then parses it.
|
||||||
;; E.g.: (peg-sexp-compile syntax '(and "abc" (or "-" (range #\a #\z))) 'all)
|
;; E.g.: (peg-sexp-compile syntax '(and "abc" (or "-" (range #\a #\z))) 'all)
|
||||||
(define (peg-sexp-compile pat accum)
|
(define (peg-sexp-compile pat accum)
|
||||||
(syntax-case pat (peg-any range ignore capture peg and or body)
|
(syntax-case pat (peg-any)
|
||||||
(peg-any
|
(peg-any
|
||||||
(cg-peg-any (baf accum)))
|
(cg-peg-any (baf accum)))
|
||||||
(sym (identifier? #'sym) ;; nonterminal
|
(sym (identifier? #'sym) ;; nonterminal
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue