2ac387e1c9
The README.md file in the root of the repository had become too large, and as a result the file became hard to maintain. This commit extracts all the documentation and moves it to separate but managable files within the docs directory, a new folder also located in the root of the repository.
432 B
432 B
Backtracking
Unlike in regular expressions, there is no backtracking in PEG.js expressions.
For example, using the input "hi!":
// This will fail
HI = "hi" / "hi!"
// This will pass
HI = "hi!" / "hi"
// This will also pass
HI = w:"hi" !"!" { return w } / "hi!"
For more information on backtracking in PEG.js, checkout this excellent answer on Stack Overflow.