| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
* doc/ref/api-peg.texi: add a manual section about the PEG internals.
|
|
|
|
| |
* module/ice-9/peg.scm: remove the eval-when statement
|
|
|
|
|
|
|
| |
* modules/ice-9/peg.scm: remove the part that defines a match structure
* modules/ice-9/peg/match-record.scm: and put it here
* module/Makefile.am (ICE_9_SOURCES): Add match-record.scm.
|
|
|
|
|
|
|
| |
* module/ice-9/peg.scm: take out the functions for simplifying trees
* module/ice-9/peg/simplify-tree.scm: and put them here
* module/Makefile.am: Add simplify-tree.scm.
|
|
|
|
|
|
|
| |
* module/ice-9/peg.scm: remove functions dealing with PEGs as strings
* module/ice-9/peg/string-peg.scm: and put them here
* module/Makefile.am: Add string-peg.scm.
|
|
|
|
|
| |
* modules/ice-9/peg.scm: convert the unhygienic macros that generate code
for string PEGs to use hygiene.
|
|
|
|
|
| |
* module/ice-9/peg.scm: rename peg-parse-* functions to avoid confusion
with what PEGs do.
|
|
|
|
|
|
|
| |
* module/ice-9/peg.scm: move code generators to new module
* module/ice-9/peg/codegen.scm: new module for PEG code generators
* module/Makefile.am (ICE_9_SOURCES): Add codegen.scm.
|
|
|
|
| |
* doc/ref/api-peg.texi: Reformat and reflow.
|
|
|
|
| |
* module/ice-9/peg.scm (error-val): Remove needless definition.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
| |
* module/ice-9/peg.scm (cg-string, cg-peg-any, cg-range): Remove
unnecessary for-syntax arg.
(peg-sexp-compile): Adapt.
|
|
|
|
|
| |
* module/ice-9/peg.scm (cg-string): Rename "match" to "pat".
(peg-sexp-compile, cg-body-test, cg-body, define-nonterm): Likewise.
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
* module/ice-9/peg.scm (cg-peg-any): Don't use cggr.
(cg-range): Don't use cggl or cggr.
|
|
|
|
|
| |
* module/ice-9/peg.scm (cg-string): Don't use cggr. Interesting to see
what it actually generates.
|
|
|
|
| |
* module/ice-9/peg.scm (cg-peg-any): Don't use cggl.
|
|
|
|
| |
* module/ice-9/peg.scm (cg-string): Refactor to not use cggl.
|
|
|
|
|
| |
* module/ice-9/peg.scm (cg-string): Use the more efficient string= with
range args, rather than string=? and substring.
|
|
|
|
|
| |
* module/ice-9/peg.scm: Convert the helper macro comments into
docstrings.
|
|
|
|
|
| |
* module/ice-9/peg.scm (cg-generic-ret, cg-and-int, cg-body-test):
Remove a few needless @ or @@ forms.
|
|
|
|
|
|
| |
* module/ice-9/peg.scm (define-nonterm): Don't stash the code in a
symbol property.
(get-code): Remove.
|
|
|
|
|
| |
* module/ice-9/peg.scm (single-filter, push-not-null!): Use
syntax-rules, and move outside the eval-when.
|
|
|
|
|
| |
* module/ice-9/peg.scm: Change default cases of `cond' to use `else'
instead of #t.
|
|
|
|
|
| |
* module/ice-9/peg.scm (until, single?, push!): Move outside the
eval-when. Use syntax-rules, and single? is faster now.
|
|
|
|
|
|
| |
* module/ice-9/peg.scm (until): Rename from until-works, and be
functional (and faster).
(peg-match): Adapt.
|
|
|
|
| |
* module/ice-9/peg.scm: Fix up define-module block.
|
|
|
|
|
| |
* module/ice-9/peg.scm (cg-string, cg-peg-any, cg-range): Remove some
unnecessary lets.
|
|
|
|
| |
* module/ice-9/peg.scm (safe-bind, safe-bind-f): Remove.
|
|
|
|
|
| |
* module/ice-9/peg.scm (cggl, cggr): Remove, and rename the cggl-syn and
cggr-syn to take their place.
|
|
|
|
|
| |
* module/ice-9/peg.scm (cg-body, cg-body-success, cg-body-more)
(cg-body-ret): Return syntax instead of s-expressions.
|
|
|
|
|
|
| |
* module/ice-9/peg.scm (cg-or, cg-or-int): Return syntax instead of
s-expressions.
(peg-sexp-compile): Adapt.
|
|
|
|
|
| |
* 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.
|
|
|
|
| |
* module/ice-9/peg.scm (cg-range): Use cggl-syn and cggr-syn.
|
|
|
|
| |
* module/ice-9/peg.scm (cg-peg-any): Use cggl-syn and cggr-syn.
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
* module/ice-9/peg.scm (cg-range): Datum->syntax here...
(peg-sexp-compile): ...instead of here.
|
|
|
|
|
| |
* module/ice-9/peg.scm (cg-peg-any): Datum->syntax here...
(peg-sexp-compile): ...instead of here.
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
* module/ice-9/peg.scm (peg-sexp-compile, peg-string-compile): Return
syntax instead of s-expressions.
|
|
|
|
|
| |
* module/ice-9/peg.scm: Pass for-syntax argument to all of the
code-generating functions.
|
|
|
|
| |
* module/ice-9/peg.scm (syntax-for-non-cache-case): More cleanups.
|
|
|
|
| |
* module/ice-9/peg.scm (syntax-for-non-cache-case): Cleanups.
|
|
|
|
|
| |
* module/ice-9/peg.scm (syntax-for-non-cache-case): Use quasisyntax
instead of safe-bind.
|
|
|
|
|
| |
* module/ice-9/peg.scm (define-nonterm, syntax-for-non-cache-case):
Returns syntax instead of an s-expression.
|
|
|
|
| |
* module/ice-9/peg.scm (define-nonterm): Split for readability.
|
|
|
|
| |
* module/ice-9/peg.scm: Add copyright header.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* module/ice-9/peg.scm: New file.
* module/Makefile.am: Add to build.
* doc/ref/Makefile.am:
* doc/ref/api-peg.texi:
* doc/ref/guile.texi: Add documentation for PEG parser.
* test-suite/Makefile.am:
* test-suite/tests/peg.bench:
* test-suite/tests/peg.test: Add tests, and a benchmark.
|
|
|
|
|
|
|
|
| |
* configure.ac (HAVE_GC_STACK_BASE): New check.
* libguile/threads.c (GC_UNIMPLEMENTED, GC_SUCCESS): Define if needed.
(GC_register_my_thread, GC_unregister_my_thread)
(GC_call_with_stack_base): Define shims if needed.
|