pegjs/lib/compiler/passes
David Majda 435bb8f2df Error handling: Structured expectations
Before this commit, the |expected| property of an exception object
thrown when a generated parser encountered an error contained
expectations as strings. These strings were in a human-readable format
suitable for displaying in the UI but not suitable for machine
processing. For example, expected string literals included quotes and a
string "any character" was used when any character was expected.

This commit makes expectations structured objects. This makes the
machine processing easier, while still allowing to generate a
human-readable representation if needed.

Implements part of #198.

Speed impact
------------
Before:     1180.41 kB/s
After:      1165.31 kB/s
Difference: -1.28%

Size impact
-----------
Before:     863523 b
After:      950817 b
Difference: 10.10%

(Measured by /tools/impact with Node.js v0.6.18 on x86_64 GNU/Linux.)
2013-12-01 16:08:29 +01:00
..
generate-bytecode.js Error handling: Structured expectations 2013-12-01 16:08:29 +01:00
generate-javascript.js Error handling: Structured expectations 2013-12-01 16:08:29 +01:00
remove-proxy-rules.js Move options handling from passes to |PEG.compiler.compile| 2013-01-06 10:32:52 +01:00
report-left-recursion.js
report-missing-rules.js