while (grok < '100%' || !bored): continue
- First and Follow (code)
- Both First and Follow helps the compiler to optimize the construction of parse/syntax tree inorder to verify syntax correctness of the input string (code).
- First precomputes the correct node of a production rule hence saving the compiler from backtracking to retrieve the node needed to generate the string from the parse tree.
- Follow helps when a production rule fails to return the required terminal value. It basically lets the compiler to jump to a different node by applying the ε (epsilon) value and thereby vanishes the non-terminal value to generate the string.
- Compilers by Alex Aiken (Internet Archive <3)
- Python's regular expression implementation: re