From 007328b35378564e81eb40ea3cc7614ecbe6b1b2 Mon Sep 17 00:00:00 2001 From: rocky Date: Sun, 15 May 2016 19:44:18 -0400 Subject: [PATCH] Correct info on parser --- HISTORY.md | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 834067a1..3bae9bd0 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -109,15 +109,20 @@ Hartmut a decade an a half ago: NB. This is not a masterpiece of software, but became more like a hack. Probably a complete rewrite would be sensefull. hG/2000-12-27 -This project deparses using a LR parse. However another approach is to -do something like simulate execution symbolically and build expression -trees off of stack results. The two important projects that work this -way are [unpyc3](https://code.google.com/p/unpyc3/) and most -especially [pycdc](https://github.com/zrax/pycdc) The latter project -is largely by Michael Hansen and Darryl Pogue. If they supported -getting source-code fragments and I could call it from Python, I'd -probably ditch this and use that. From what I've seen, the code runs -blindingly fast and spans all versions of Python. +This project deparses using a Early-algorithm parse with lots of +massaging of tokens and the grammar in the scanner +phase. Early-algorithm parsers are context free and tend to be linear +if the grammar is LR or left recursive. + +Another approach that doesn't use grammars is to do something like +simulate execution symbolically and build expression trees off of +stack results. The two important projects that work this way are +[unpyc3](https://code.google.com/p/unpyc3/) and most especially +[pycdc](https://github.com/zrax/pycdc) The latter project is largely +by Michael Hansen and Darryl Pogue. If they supported getting +source-code fragments and I could call it from Python, I'd probably +ditch this and use that. From what I've seen, the code runs blindingly +fast and spans all versions of Python. Tests for the project have been, or are being, culled from all of the projects mentioned.