Hacker GitHub

← All repos

darius/parson

View on GitHub ↗ ★ 57 Python

Yet another PEG parser combinator library and DSL

10 mentions on Hacker News by 3 people: 0 stories, 10 comments · first 2012-12-30 · latest 2023-11-07

Mentions per year 10 mentions · busiest year 2016 (2)
20082026
  1. …also worth mentioning in this connection: - darius bacon's work, especially parson (for example, https://github.com/darius/parson/blob/master/eg_calc_compile... ) - the oberon compiler in wirth and gutknecht's oberon book - the later…
  2. …lines of code you can maybe be even more ambitious than that. Darius Bacon's example compiler in https://github.com/darius/parson/blob/master/eg_calc_compile... is a bit more stripped down than that, but in its 32 lines of code it compiles…
  3. Yep, and here was mine: https://github.com/darius/parson/blob/master/eg_basic.py written to exercise a parsing library. It's super-slow.
    comment by abecedarius · 2018-10-27 · in Show HN: I wrote a BASIC interpreter in Go
  4. Expression parsing without left recursion can be straightforward: https://github.com/darius/parson/blob/master/eg_calc.py A left-associative operator means a Kleene star in the grammar, while a right-associative operator means…
    comment by abecedarius · 2018-04-09 · in Writing a recursive ascent parser by hand
  5. …of complicating the parsing algorithm with left recursion. Here's an example of how that can work: https://github.com/darius/parson/blob/master/eg_calc.py -- the '-' operator associates left, while the '^' op associates to the right. (Like…
    comment by abecedarius · 2017-10-17 · in Ohm: Parsing Made Easy
  6. …a version of it, with small changes plus a regex parser, since Udacity started requiring login: https://github.com/darius/parson/blob/master/eg_regex.py ) But some people have also told me that was a great learning experience -- they spent…
    comment by abecedarius · 2017-02-05 · in Smaller Code, Better Code
  7. Hi Andrea -- https://github.com/darius/parson is in Python. It's probably not very similar because I haven't got around to studying Ohm, but it shares the basic goal of not writing semantic actions inline in some particular language. (I…
  8. Here's a much smaller and less ambitious interpreter in Python as a hackable taste of the language: https://github.com/darius/parson/blob/master/eg_fp.py -- or rather another dialect, since everyone who implements FP makes up their own…
  9. I'm afraid there's https://github.com/darius/parson already too. (I went through the same process to name it -- there's not much left in that well, is there?)
  10. Not framework coders, but still far from hackers. For example: https://github.com/darius/parson/blob/master/parson.py
    comment by alecco · 2012-12-30 · in The Hacker School Experience