Originally Lukas Renggli has written PetitParser as part of his work on the Helvetia system.
Writing Parsers with PetitParser. page
START 29 YOUTUBE vgiJG3Vd6KU PetitParser Tutorial (Part 1)
PetitParser is a parsing framework different to many other popular parser generators. For example, it is not table based such as SmaCC or ANTLR. Instead it uses a unique combination of four alternative parser methodologies: scannerless parsers, parser combinators, Parsing Expression Grammars and packrat parsers. As such **PetitParser** is more powerful in what it can parse and it arguably fits better the dynamic nature of Smalltalk. Let’s have a quick look at these four parser methodologies:
1. *Scannerless Parsers* combine what is usually done by two independent tools (scanner and parser) into one. This makes writing a grammar much simpler and avoids common problems when grammars are composed. 1. *Parser Combinators* are building blocks for parsers modeled as a graph of composable objects; they are modular and maintainable, and can be changed, recomposed, transformed and reflected upon. 1. *Parsing Expression Grammars* (PEGs) provide ordered choice. Unlike in parser combinators, the ordered choice of PEGs always follows the first matching alternative and ignores other alternatives. Valid input always results in exactly one parse-tree, the result of a parse is never ambiguous. 1. *Packrat Parsers* give linear parse time guarantees and avoid common problems with left-recursion in PEGs.
* 9:56 – […] but the coolest thing is the approach to parsing not necessarily as a sequence of rules, but as a Composition of Objects * Building Modular Parsers. pdf * Layout Sensitive Parsing in Petit Parser Framework. pdf * SStDSL, eine DSL für Schnittstellen mit PetitParser. page , pdf * Optimizing Parser Combinators. acm * […] – https://scholar.google.com/scholar?hl=de&as_sdt=0%2C5&q=%22petit+parser%22+grammar+of+string&btnG= * PetitParser2 – GT4PetitParser2. page
~
botwhytho — 30.11.2020 I just want to have some generic interfaces (to be sub-classed) defined for how to fetch from external sources and for how to parse them. My current source is trello cards in a specific list so a couple of api calls away, rather trivial. My formatting is very freeform but when I started I made sure I could at least parse it easily with some regex (or probably PetitParser). One line per time entry and a format similar to [Time - Range][space][description] Obviously this is not an ideal way to keep the data but figured it would be better to start collecting it somehow, and later analyze it. Gt seems like a pretty good platform for the analysis
tudor girba — 30.11.2020 Yes, PetitParser would likely be a good fit here you likely want: - an importer of Trello export (I guess they can export to something standard like JSON) - a model made out entities like: TimeRange, Space, Activity. This model is populated by the importer. - a parser that specializes the entries based on your notation (this is where PetitParser would work well). Based on this, the importer enriches the model. - views on the model
~
# Link Detection
Basic link detection using PetitParser. We need to add full support for the complete WikiText syntax, as we understand parsers better.
~
Tutorial de PetitParser2 con WikiText
We reorganized the PetitParser2 links. If you download the LepiterDocs repository (you can download it without Fossil as a zip file from https://mutabit.com/repos.fossil/LepiterDocs/zip) and load the "Libreta Base" note and run the "Create table of content" function in the page inspector [click (1) and then run (2) in the screenshot], we could share our PetitParser links. And yes, at some point we need a more fluid workflow for sharing our Lepiter/Web notes/documents.