1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 11:50:28 +02:00
Commit graph

13 commits

Author SHA1 Message Date
Noah Lavine
fee87b821f PEG Renames
* 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-16 10:11:50 +01:00
Noah Lavine
cdeb5a7826 Remove 'body' PEG
module/ice-9/peg/string-peg.scm: update S-expression generators to use the
  new *, +, ?, followed-by, and not-followed-by forms.
module/ice-9/peg/codegen.scm: remove the 'body' form in the PEG s-expression
  representation.
2013-01-16 10:11:47 +01:00
Noah Lavine
72287411e9 Add 'not-followed-by' PEG
The PEG s-expression syntax now uses '(not-followed-by ...)' instead of
'(body ! ... 1)'.
2013-01-16 10:11:46 +01:00
Noah Lavine
66ba3de0a6 Add 'followed-by' PEG
The PEG s-expression syntax now uses '(followed-by ...)' instead of
'(body & ... 1)'.
2013-01-16 10:11:46 +01:00
Noah Lavine
8e97edd5d3 Add '?' PEG
The PEG s-expression syntax now uses '(? ...)' instead of '(body lit ... ?)'.
2013-01-16 10:11:46 +01:00
Noah Lavine
3d19969d74 Add '+' PEG
The PEG s-expression syntax now uses '(+ ...)' instead of '(body lit ... +)'.
2013-01-16 10:11:46 +01:00
Noah Lavine
f310a111de Add '*' PEG
The s-expression representation of PEG grammars now uses a '(* ...)' form
instead of '(body lit ... *)'.
2013-01-16 10:11:46 +01:00
Noah Lavine
5c3f2da81f Clean Up PEG Codegen
* module/ice-9/peg/codegen.scm: remove unnecessary literals in
  peg-sexp-compile.
2013-01-16 10:11:46 +01:00
Noah Lavine
94e8517c16 Extensible PEG Syntax
* module/ice-9/peg/codegen.scm: Make the PEG syntax extensible, and
    move most of the current code generators to the new interface
* doc/ref/api-peg.texi: Document PEG extensions in the PEG Internals
    section of the manual
2013-01-16 10:11:44 +01:00
Noah Lavine
bbc5564c42 Separate PEG Concerns
* 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-16 10:11:44 +01:00
Noah Lavine
0afaf59982 Move define-nonterm
* 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-16 10:11:44 +01:00
Noah Lavine
5e16c41703 Separate PEG Strings
* 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-16 10:11:43 +01:00
Noah Lavine
bff3ccd957 Split peg.scm
* 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-16 10:11:42 +01:00