summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoah Lavine <noah.b.lavine@gmail.com>2012-01-22 15:08:10 -0500
committerNoah Lavine <noah.b.lavine@gmail.com>2012-01-22 15:08:10 -0500
commit71e8e12850ffead79270324db8f332959c074a2a (patch)
tree324f7711b133b62f91a80e37498d94a632887a23
parenta45dcbf23b199e4fc937d5057ac1e50109617612 (diff)
downloadguile-wip-peg-fixed-2.tar.gz
Remove 'define-grammar-f'wip-peg-fixed-2
* 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'
-rw-r--r--module/ice-9/peg.scm1
-rw-r--r--module/ice-9/peg/string-peg.scm7
2 files changed, 3 insertions, 5 deletions
diff --git a/module/ice-9/peg.scm b/module/ice-9/peg.scm
index f572277b9..4e03131cd 100644
--- a/module/ice-9/peg.scm
+++ b/module/ice-9/peg.scm
@@ -31,7 +31,6 @@
match-pattern
search-for-pattern
compile-peg-pattern
- define-grammar-f
keyword-flatten
context-flatten
peg:start
diff --git a/module/ice-9/peg/string-peg.scm b/module/ice-9/peg/string-peg.scm
index 6b1efa982..45ed14bb1 100644
--- a/module/ice-9/peg/string-peg.scm
+++ b/module/ice-9/peg/string-peg.scm
@@ -20,7 +20,6 @@
(define-module (ice-9 peg string-peg)
#:export (peg-as-peg
define-peg-string-patterns
- define-grammar-f
peg-grammar)
#:use-module (ice-9 peg using-parsers)
#:use-module (ice-9 peg codegen)
@@ -98,8 +97,9 @@ RB < ']'
;;;;; PARSE STRING PEGS
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Pakes a string representing a PEG grammar and defines all the nonterminals in
-;; it as the associated PEGs.
+;; Takes a string representing a PEG grammar and returns syntax that
+;; will define all of the nonterminals in the grammar with equivalent
+;; PEG s-expressions.
(define (peg-parser str for-syntax)
(let ((parsed (match-pattern peg-grammar str)))
(if (not parsed)
@@ -123,7 +123,6 @@ RB < ']'
(syntax-case x ()
((_ str)
(peg-parser (syntax->datum #'str) x)))))
-(define define-grammar-f peg-parser)
;; lst has format (nonterm grabber pattern), where
;; nonterm is a symbol (the name of the nonterminal),