kit

kit
git clone https://git.ryansepassi.com/git/kit.git
Log | Files | Refs | README

anchors.ebnf (523B)


      1 // Tier-1 edge anchors (byte mode): start (\A, ^) and end (\z, $) anchors lowered
      2 // to zero-width DFA transitions. Exercises alternate start states and the
      3 // per-state end-context accept tables, and the C/Python generator parity over
      4 // them. The mid-pattern overlap (KW/LN shadowed by ID) checks anchor-aware
      5 // candidate selection rather than winner-only filtering.
      6 %lex {
      7   KW = \A "if";
      8   LN = ^ "ln";
      9   END = "x" \z;
     10   DOL = "d" $;
     11   ID = [a-z][a-z]*;
     12   NUM = [0-9][0-9]*;
     13 }
     14 
     15 start = KW | LN | END | DOL | ID | NUM;