ABNF Parser Generator
Working with the Prioritized-Choice Rule
The following exercises demonstrate several cases of valid but problematic CGFs with discussion and prioritized-choice solutions. They are arranged from trivial to head-scratching and it is suggested that you try them in the order presented.
exercise 1 – longest alternative first
exercise 2 – repetitions
exercise 3 – non-trivial
exercise 4 – impossible (almost)
Parser Output:
|
|