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
20082026
-
…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…
comment by kragen · 2023-11-07 · in Writing a Compiler is Surprisingly Easy (part 1) -
…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…
comment by kragen · 2022-07-17 · in Show HN: A compiler and VM for a simple language, in 150 lines of code -
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 -
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 -
…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 -
…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 -
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…
comment by abecedarius · 2016-11-25 · in META II: A Syntax-Oriented Compiler Writing Language (1964) [pdf] -
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…
comment by abecedarius · 2016-07-26 · in Can Programming Be Liberated From The Von Neumann Style? (1977) [pdf] -
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?)
comment by abecedarius · 2015-01-12 · in Parsley: a simple language for extracting structured data from web pages -
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