summary refs log tree commit diff stats
path: root/README.md
diff options
context:
space:
mode:
authorSoniEx2 <endermoneymod@gmail.com>2019-04-11 13:49:31 -0300
committerSoniEx2 <endermoneymod@gmail.com>2019-04-11 13:49:31 -0300
commite5e653340114025675a0e4c088733111413af452 (patch)
tree24eb5ff09137a26e3a24ccefaf5b48ae0cb15d9f /README.md
parent17fe400e8c76767689ed181b4928443b08f4f4e6 (diff)
Add anti-LPeg rationale
Diffstat (limited to 'README.md')
-rw-r--r--README.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/README.md b/README.md
index ebb76b8..f000fde 100644
--- a/README.md
+++ b/README.md
@@ -14,3 +14,11 @@ which is equivalent to:
 This syntax sugar is similar to the "methods" syntax sugar ([Lua 5.3 §3.4.10](http://www.lua.org/manual/5.3/manual.html#3.4.10),
 [Lua 5.2 §3.4.9](http://www.lua.org/manual/5.2/manual.html#3.4.9), [Lua 5.1 §2.5.8](http://www.lua.org/manual/5.1/manual.html#2.5.8)),
 and, indeed, `mytable` is only evaluated once.
+
+Why not use LPeg?
+-----------------
+
+The use of a custom parsing library boils down to two reasons:
+
+1. LPeg can't stream or produce partial outputs. This just makes it difficult to use for making a compiler.
+2. LPeg can't process tables. It's still possible to use LPeg to parse table-based structures, but one must serialize them beforehand, which is... far from ideal, to say the least.