summaryrefslogtreecommitdiff
path: root/doc/ref/api-peg.texi
AgeCommit message (Collapse)AuthorFilesLines
2024-12-09PEG: Add support for `not-in-range` and [^...]Ekaitz Zarraga1-0/+8
Modern PEG supports inversed class like `[^a-z]` that would get any character not in the `a-z` range. This commit adds support for that and also for a new `not-in-range` PEG pattern for scheme. * module/ice-9/peg/codegen.scm (cg-not-in-range): New function. * module/ice-9/peg/string-peg.scm: Add support for `[^...]` * test-suite/tests/peg.test: Test it. * doc/ref/api-peg.texi: Document accordingly. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-12-09PEG: Add full support for PEG + some extensionsEkaitz Zarraga1-2/+6
This commit adds support for PEG as described in: <https://bford.info/pub/lang/peg.pdf> It adds support for the missing features (comments, underscores in identifiers and escaping) while keeping the extensions (dashes in identifiers, < and <--). The naming system tries to be as close as possible to the one proposed in the paper. * module/ice-9/peg/string-peg.scm: Rewrite PEG parser. * test-suite/tests/peg.test: Fix import Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-06-18bug#71303: [PATCH] doc: Fix typo in PEG example.Maxim Cournoyer1-1/+1
* doc/ref/api-peg.texi (PEG API Reference): Fix typo in PEG example.
2024-05-06Fix typos throughout codebase.Morgan Smith1-6/+6
* NEWS: * doc/ref/api-control.texi: * doc/ref/api-data.texi: * doc/ref/api-debug.texi: * doc/ref/api-deprecated.texi: * doc/ref/api-evaluation.texi: * doc/ref/api-foreign.texi: * doc/ref/api-i18n.texi: * doc/ref/api-io.texi: * doc/ref/api-languages.texi: * doc/ref/api-macros.texi: * doc/ref/api-memory.texi: * doc/ref/api-modules.texi: * doc/ref/api-options.texi: * doc/ref/api-peg.texi: * doc/ref/api-procedures.texi: * doc/ref/api-scheduling.texi: * doc/ref/api-undocumented.texi: * doc/ref/api-utility.texi: * doc/ref/expect.texi: * doc/ref/goops.texi: * doc/ref/misc-modules.texi: * doc/ref/posix.texi: * doc/ref/repl-modules.texi: * doc/ref/scheme-ideas.texi: * doc/ref/scheme-scripts.texi: * doc/ref/srfi-modules.texi: * gc-benchmarks/larceny/dynamic.sch: * gc-benchmarks/larceny/twobit-input-long.sch: * gc-benchmarks/larceny/twobit.sch: * libguile/gc.h: * libguile/ioext.c: * libguile/list.c: * libguile/options.c: * libguile/posix.c: * libguile/threads.c: * module/ice-9/boot-9.scm: * module/ice-9/optargs.scm: * module/ice-9/ports.scm: * module/ice-9/pretty-print.scm: * module/ice-9/psyntax.scm: * module/language/elisp/parser.scm: * module/language/tree-il/compile-bytecode.scm: * module/srfi/srfi-37.scm: * module/srfi/srfi-43.scm: * module/statprof.scm: * module/texinfo/reflection.scm: * test-suite/tests/eval.test: * test-suite/tests/fluids.test: Fix typos. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2018-08-07Fix minor typo in the PEG documentation.Arun Isaac1-1/+1
* doc/ref/api-peg.texi (PEG Internals): Fix minor typo. Signed-off-by: Mark H Weaver <mhw@netris.org>
2017-11-22Mention (ice-9 peg) module path.Arun Isaac1-5/+6
* doc/ref/api-peg.texi (PEG Parsing): Mention (ice-9 peg) module path. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2013-01-16PEG RenamesNoah Lavine1-5/+5
* 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-11/+11
* 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-27/+27
* 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-30/+30
* 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-34/+34
* 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-16Document PEGs at RuntimeNoah Lavine1-11/+15
doc/ref/api-peg.texi: suggest a cleaner method of generating PEG parsers at runtime.
2013-01-16Update PEG DocumentationNoah Lavine1-23/+29
Change the PEG documentation to use the new style of s-expression PEGs.
2013-01-16Add 'not-followed-by' PEGNoah Lavine1-2/+2
The PEG s-expression syntax now uses '(not-followed-by ...)' instead of '(body ! ... 1)'.
2013-01-16Add 'followed-by' PEGNoah Lavine1-2/+2
The PEG s-expression syntax now uses '(followed-by ...)' instead of '(body & ... 1)'.
2013-01-16Add '?' PEGNoah Lavine1-1/+1
The PEG s-expression syntax now uses '(? ...)' instead of '(body lit ... ?)'.
2013-01-16Add '+' PEGNoah Lavine1-1/+1
The PEG s-expression syntax now uses '(+ ...)' instead of '(body lit ... +)'.
2013-01-16Add '*' PEGNoah Lavine1-1/+1
The s-expression representation of PEG grammars now uses a '(* ...)' form instead of '(body lit ... *)'.
2013-01-16Extensible PEG SyntaxNoah Lavine1-0/+32
* 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-16Document PEG InternalsNoah Lavine1-0/+71
* doc/ref/api-peg.texi: add a manual section about the PEG internals.
2013-01-16reformat and reflow api-peg.texiAndy Wingo1-142/+366
* doc/ref/api-peg.texi: Reformat and reflow.
2013-01-16add PEG parser generatorAndy Wingo1-0/+699
* 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.