ABNF Parser Generator
This is the classic, textbook example of a context-free-grammar which cannot be described with a regular expression.
This simple grammar gives a very clear demonstration of how recursion leads to matched phrases within longer matched phrases.
- Click Configure
- Check "Save Parsed Phrases" & "Save Parser Trace" then Save
- Click Parse
- Select "AnBn" from the drop-down box
- Click "Parsed Phrases"
- Click "Display Trace" and "Full Screen"
The drop-down selection indicates four AnBn phrases which are then displayed in alternating highlight colors in the "Parsed Phrases" output. These four phrases are again shown in the last four lines of the displayed trace.