summaryrefslogtreecommitdiff
path: root/module/ice-9/peg.scm
AgeCommit message (Collapse)AuthorFilesLines
2013-01-16Remove 'define-grammar-f'Noah Lavine1-1/+0
* 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'
2013-01-16PEG RenamesNoah Lavine1-1/+1
* module/ice-9/peg.scm: rename 'peg-sexp-compile' to 'compile-peg-pattern' * module/ice-9/peg/codegen.scm: same * module/ice-9/peg/string-peg.scm: same * module/ice-9/peg/using-parsers.scm: same * doc/ref/api-peg.texi: same
2013-01-16PEG RenamesNoah Lavine1-1/+1
* module/ice-9/peg.scm: rename 'define-grammar' to 'define-peg-string-patterns' * module/ice-9/peg/string-peg.scm: same * doc/ref/api-peg.texi: same * test-suite/tests/peg.bench: same * test-suite/tests/peg.test: same
2013-01-16PEG RenamesNoah Lavine1-2/+2
* module/ice-9/peg.scm: rename 'define-nonterm' to 'define-peg-pattern' * module/ice-9/peg/using-parsers.scm: same * module/ice-9/peg/string-peg.scm: same * test-suite/tests/peg.test: same * doc/ref/api-peg.texi: same
2013-01-16PEG RenamesNoah Lavine1-1/+1
* module/ice-9/peg.scm: rename 'peg-parse' to 'match-pattern' * module/ice-9/peg/string-peg.scm: same * module/ice-9/peg/using-parsers.scm: same * doc/ref/api-peg.texi: same * test-suite/tests/peg.test: same * test-suite/tests/peg.bench: same
2013-01-16PEG RenamesNoah Lavine1-1/+1
* doc/ref/api-peg.texi: rename 'peg-match' to 'search-for-pattern' * module/ice-9/peg.scm: same * module/ice-9/peg/using-parsers.scm: same * test-suite/tests/peg.test: same
2013-01-16Make PEG FilesNoah Lavine1-0/+3
* module/ice-9/peg/using-parsers.scm: remove unnecessary dependency * module/ice-9/peg.scm: add comment about string-peg dependency * module/Makefile.scm: add PEG files to makefile
2013-01-16Rearrange PEG ModulesNoah Lavine1-74/+5
* module/ice-9/peg.scm: move code out of here * module/ice-9/peg/match-records.scm: remove this file * module/ice-9/peg/using-parsers.scm: make a new module with utilities for using parsers. It contains the code from both peg.scm and match-records.scm * module/ice-9/peg/string-peg.scm: update to use new module
2013-01-16PEG Cache ModuleNoah Lavine1-20/+3
* module/ice-9/peg/cache.scm: add module to hold cache logic for PEG parsers * module/ice-9/peg.scm: move cache logic out of here
2013-01-16Update String PEGsNoah Lavine1-13/+7
* module/ice-9/peg/string-peg.scm: use new interface for extending PEG syntax * module/ice-9/peg.scm: remove peg-extended-compile
2013-01-16Separate PEG ConcernsNoah Lavine1-1/+8
* module/ice-9/peg/codegen.scm: peg-sexp-compile no longer knows about string PEGs * module/ice-9/peg.scm: add a new function peg-extended-compile that calls peg-sexp-compile or peg-string-compile on its argument as appropriate
2013-01-16Move define-nontermNoah Lavine1-2/+31
* module/ice-9/peg/string-peg.scm: remove define-nonterm and make a simpler macro called `define-sexp-parser' to make the PEG grammar * module/ice-9/peg.scm: move define-nonterm macro to this file * module/ice-9/peg/codegen.scm: move code to wrap a parser result nicely to this file, under name `wrap-parser-for-users'
2013-01-16Remove eval-whenNoah Lavine1-5/+0
* module/ice-9/peg.scm: remove the eval-when statement
2013-01-16Factor PEG StructureNoah Lavine1-29/+9
* modules/ice-9/peg.scm: remove the part that defines a match structure * modules/ice-9/peg/match-record.scm: and put it here
2013-01-16Factor PEG FunctionsNoah Lavine1-81/+6
* module/ice-9/peg.scm: take out the functions for simplifying trees * module/ice-9/peg/simplify-tree.scm: and put them here
2013-01-16Separate PEG StringsNoah Lavine1-282/+9
* module/ice-9/peg.scm: remove functions dealing with PEGs as strings * module/ice-9/peg/string-peg.scm: and put them here
2013-01-16Make Macros HygienicNoah Lavine1-56/+73
* modules/ice-9/peg.scm: convert the unhygienic macros that generate code for string PEGs to use hygiene.
2013-01-16Rename in peg.scmNoah Lavine1-18/+18
* module/ice-9/peg.scm: rename peg-parse-* functions to avoid confusion with what PEGs do.
2013-01-16Split peg.scmNoah Lavine1-218/+5
* module/ice-9/peg.scm: move code generators to new module * module/ice-9/peg/codegen.scm: new module for PEG code generators
2013-01-16peg: remove error-valAndy Wingo1-7/+0
* module/ice-9/peg.scm (error-val): Remove needless definition.
2013-01-16peg: refactor peg-sexp-compile to operate on syntax directlyAndy Wingo1-132/+100
* module/ice-9/peg.scm (cg-generic-ret): Remove unused for-syntax argument. (peg-sexp-compile): Take the pattern as syntax directly, and use syntax-case to destructure it and dispatch to the code generators. (cg-and, cg-and-int, cg-or, cg-or-int): Refactor to operate on syntax instead of on s-expressions. (cg-body): Likewise; though this was a larger refactor. (define-nonterm, peg-match): Adapt to peg-sexp-compile calling convention change. (peg-string-compile): Likewise, and just take the grammar as a syntax object.
2013-01-16peg: cg-string, cg-peg-any, cg-range: remove needless for-syntax argAndy Wingo1-6/+6
* module/ice-9/peg.scm (cg-string, cg-peg-any, cg-range): Remove unnecessary for-syntax arg. (peg-sexp-compile): Adapt.
2013-01-16peg: change some instances of "match" to "pat"Andy Wingo1-38/+38
* module/ice-9/peg.scm (cg-string): Rename "match" to "pat". (peg-sexp-compile, cg-body-test, cg-body, define-nonterm): Likewise.
2013-01-16remove cggl, cg-generic-lambdaAndy Wingo1-23/+4
* module/ice-9/peg.scm (cg-generic-lambda, cggl): Remove these helpers, they are no longer needed. (cg-generic-ret): Remove optimization for particular cg- routines, as it's no longer needed.
2013-01-16peg: more cggl / cggr excisionsAndy Wingo1-11/+18
* module/ice-9/peg.scm (cg-peg-any): Don't use cggr. (cg-range): Don't use cggl or cggr.
2013-01-16peg: cg-string does not use cggrAndy Wingo1-4/+9
* module/ice-9/peg.scm (cg-string): Don't use cggr. Interesting to see what it actually generates.
2013-01-16peg: cg-peg-any does not use cgglAndy Wingo1-4/+5
* module/ice-9/peg.scm (cg-peg-any): Don't use cggl.
2013-01-16peg: cg-string without cgglAndy Wingo1-6/+6
* module/ice-9/peg.scm (cg-string): Refactor to not use cggl.
2013-01-16peg: cg-string improvementAndy Wingo1-2/+1
* module/ice-9/peg.scm (cg-string): Use the more efficient string= with range args, rather than string=? and substring.
2013-01-16peg: helper macro docstringsAndy Wingo1-14/+10
* module/ice-9/peg.scm: Convert the helper macro comments into docstrings.
2013-01-16peg: module-ref cleanupAndy Wingo1-4/+4
* module/ice-9/peg.scm (cg-generic-ret, cg-and-int, cg-body-test): Remove a few needless @ or @@ forms.
2013-01-16peg: remove get-code debugging fooAndy Wingo1-14/+1
* module/ice-9/peg.scm (define-nonterm): Don't stash the code in a symbol property. (get-code): Remove.
2013-01-16peg: more syntax helper cleanupAndy Wingo1-15/+16
* module/ice-9/peg.scm (single-filter, push-not-null!): Use syntax-rules, and move outside the eval-when.
2013-01-16peg: else for default cond clauses, not #tAndy Wingo1-16/+16
* module/ice-9/peg.scm: Change default cases of `cond' to use `else' instead of #t.
2013-01-16peg; syntax helper cleanupsAndy Wingo1-11/+12
* module/ice-9/peg.scm (until, single?, push!): Move outside the eval-when. Use syntax-rules, and single? is faster now.
2013-01-16peg: cleanupsAndy Wingo1-14/+10
* module/ice-9/peg.scm (until): Rename from until-works, and be functional (and faster). (peg-match): Adapt.
2013-01-16peg: define-module cleanupAndy Wingo1-5/+18
* module/ice-9/peg.scm: Fix up define-module block.
2013-01-16peg: let cleanupsNoah Lavine1-95/+64
* module/ice-9/peg.scm (cg-string, cg-peg-any, cg-range): Remove some unnecessary lets.
2013-01-16peg: remove unhygienic safe-bind, safe-bind-fNoah Lavine1-40/+0
* module/ice-9/peg.scm (safe-bind, safe-bind-f): Remove.
2013-01-16peg: remove unused nonhygienic expander helpersNoah Lavine1-62/+29
* module/ice-9/peg.scm (cggl, cggr): Remove, and rename the cggl-syn and cggr-syn to take their place.
2013-01-16peg: more helpers returning syntaxNoah Lavine1-33/+38
* module/ice-9/peg.scm (cg-body, cg-body-success, cg-body-more) (cg-body-ret): Return syntax instead of s-expressions.
2013-01-16peg: cg-or, cg-or-int return syntaxNoah Lavine1-14/+13
* module/ice-9/peg.scm (cg-or, cg-or-int): Return syntax instead of s-expressions. (peg-sexp-compile): Adapt.
2013-01-16peg: hygiene in cg-and, cg-and-intNoah Lavine1-21/+21
* module/ice-9/peg.scm (cg-and, cg-and-int): Use cggr-syn instead of cggr, and also return syntax now instead of s-expressions.
2013-01-16peg: hygiene in cg-rangeNoah Lavine1-8/+8
* module/ice-9/peg.scm (cg-range): Use cggl-syn and cggr-syn.
2013-01-16peg: hygiene in cg-peg-anyNoah Lavine1-4/+4
* module/ice-9/peg.scm (cg-peg-any): Use cggl-syn and cggr-syn.
2013-01-16peg: more hygiene in cg-stringNoah Lavine1-6/+42
* module/ice-9/peg.scm (cggl-syn, cggr-syn): New functions, equivalent to cggl and cggr except that they operate on syntax instead of s-expressions. (cg-string): Use them here.
2013-01-16peg: lower datum->syntax in cg-range caseNoah Lavine1-11/+13
* module/ice-9/peg.scm (cg-range): Datum->syntax here... (peg-sexp-compile): ...instead of here.
2013-01-16peg: lower datum->syntax in cg-peg-any caseNoah Lavine1-7/+8
* module/ice-9/peg.scm (cg-peg-any): Datum->syntax here... (peg-sexp-compile): ...instead of here.
2013-01-16peg: lower datum->syntax in cg-string caseNoah Lavine1-5/+6
* module/ice-9/peg.scm (cg-string): Return syntax instead of s-expressions. (peg-sexp-compile): No need for datum->string in cg-string case.
2013-01-16peg: peg-sexp-compile datum->syntax refactorNoah Lavine1-27/+37
* module/ice-9/peg.scm (peg-sexp-compile): Push datum->syntax call through cond expression in peg-sexp-compile. This is a preliminary move so that I can convert the code-generating functions into syntax-generating functions one by one.