Skip to content

sr1jan/grok-compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

init(grok-compiler)

while (grok < '100%' || !bored): continue

Syntax Analysis

  • 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.

References