Skip to content

Instantly share code, notes, and snippets.

View postmalloc's full-sized avatar
🛸

Srimukh Sripada postmalloc

🛸
View GitHub Profile
@mstefaniuk
mstefaniuk / Expecations in PEG.js error
Created October 12, 2011 13:37
Prividing expectations in PEG.js generated parser (last lines)
/*
* The parser is now in one of the following three states:
*
* 1. The parser successfully parsed the whole input.
*
* - |result !== null|
* - |pos === input.length|
* - |rightmostMatchFailuresExpected| may or may not contain something
*
* 2. The parser successfully parsed only a part of the input.