Skip to content
arthurmaciel edited this page May 31, 2020 · 2 revisions

packrat

Index

Intro

This is an R7RS Scheme adaptation of Tony Garnock-Jones's packrat parser made by Peter Lane (2017).

A manual is available. More info on packrat can be found on The Packrat Parsing and Parsing Expression Grammars Page.

Dependencies

None

Test-dependencies

None

Foreign-dependencies

None

API

(cyclone packrat)

[procedure] (top-parse-position filename)

[procedure] (update-parse-position pos ch)

[procedure] (parse-position->string pos)

[procedure] (make-error-expected pos str)

[procedure] (make-error-message pos msg)

[procedure] (make-result semantic-value next)

[procedure] (make-expected-result pos str)

[procedure] (make-message-result pos msg)

[procedure] (prepend-base pos base next)

[procedure] (prepend-semantic-value pos key result next)

[procedure] (base-generator->results generator)

[procedure] (parse-results-next results)

[procedure] (results->result results key fn)

[procedure] (parse-position>? a b)

[procedure] (parse-error-empty? e)

[procedure] (merge-parse-errors e1 e2)

[procedure] (merge-result-errors result errs)

[procedure] (parse-results-token-kind results)

[procedure] (parse-results-token-value results)

[procedure] (packrat-check-base token-kind k)

[procedure] (packrat-check parser k)

[procedure] (packrat-or p1 p2)

[procedure] (packrat-unless explanation p1 p2)

[syntax] (packrat-parser PARAMS)

Examples

(import (scheme base)
        (cyclone packrat))

Author(s)

Peter Lane, LShift Ltd. ,Tony Garnock-Jones

Maintainer(s)

Arthur Maciel

Version

0.1

License

MIT

Tags

language extensions

Clone this wiki locally