Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
PEG parser written in Fantom
Fantom
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
examples
src
.gitignore
Changelog
LICENSE Add license (EPL)
README

README

The implementation of PEG parser in fantom (http://fantom.org/).

The main resources about PEG:
  * http://pdos.csail.mit.edu/~baford/packrat/popl04/peg-popl04.pdf
  * http://en.wikipedia.org/wiki/Parsing_expression_grammar
  * some tips and examples: https://github.com/xored/peg/wiki/_pages

Licensed under EPL. Special feature of this parser is that it allows to parse really big files, even if the file and/or the parsed tree wouldn't fit into RAM.

Another feature is that it is incremental: you can parse a part of a text, then stop it and parse the rest of the text afterwards. It saves time in situations, when you're getting the text slowly, because it allows to start parsing very early instead of waiting for the full text.

Meta grammar is not hardcoded and can be changed using the parser's API (only PEG expressions are hardcoded). This means, that you can modify/extend the grammar relatively easily, without patching the parser itself.
Something went wrong with that request. Please try again.