1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00

Remove 'define-grammar-f'

* module/ice-9/peg.scm: don't re-export 'define-grammar-f'
* module/ice-9/peg/string-peg.scm: don't export 'define-grammar-f'
This commit is contained in:
Noah Lavine 2012-01-22 15:08:10 -05:00 committed by Andy Wingo
parent fee87b821f
commit 94027fe6ec
2 changed files with 3 additions and 5 deletions

View file

@ -31,7 +31,6 @@
match-pattern match-pattern
search-for-pattern search-for-pattern
compile-peg-pattern compile-peg-pattern
define-grammar-f
keyword-flatten keyword-flatten
context-flatten context-flatten
peg:start peg:start

View file

@ -20,7 +20,6 @@
(define-module (ice-9 peg string-peg) (define-module (ice-9 peg string-peg)
#:export (peg-as-peg #:export (peg-as-peg
define-peg-string-patterns define-peg-string-patterns
define-grammar-f
peg-grammar) peg-grammar)
#:use-module (ice-9 peg using-parsers) #:use-module (ice-9 peg using-parsers)
#:use-module (ice-9 peg codegen) #:use-module (ice-9 peg codegen)
@ -98,8 +97,9 @@ RB < ']'
;;;;; PARSE STRING PEGS ;;;;; PARSE STRING PEGS
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Pakes a string representing a PEG grammar and defines all the nonterminals in ;; Takes a string representing a PEG grammar and returns syntax that
;; it as the associated PEGs. ;; will define all of the nonterminals in the grammar with equivalent
;; PEG s-expressions.
(define (peg-parser str for-syntax) (define (peg-parser str for-syntax)
(let ((parsed (match-pattern peg-grammar str))) (let ((parsed (match-pattern peg-grammar str)))
(if (not parsed) (if (not parsed)
@ -123,7 +123,6 @@ RB < ']'
(syntax-case x () (syntax-case x ()
((_ str) ((_ str)
(peg-parser (syntax->datum #'str) x))))) (peg-parser (syntax->datum #'str) x)))))
(define define-grammar-f peg-parser)
;; lst has format (nonterm grabber pattern), where ;; lst has format (nonterm grabber pattern), where
;; nonterm is a symbol (the name of the nonterminal), ;; nonterm is a symbol (the name of the nonterminal),