yhirose / cpp-peglib

A single file C++ header-only PEG (Parsing Expression Grammars) library
MIT License
900 stars 112 forks source link

Dictionary feature #90

Closed yhirose closed 4 years ago

yhirose commented 4 years ago

Dictionary feature uses 'trie' structure for fast lookup instead of the prioritized choice.

Dictionary operator:

WDAY <- 'Monday' | 'Tuesday' | 'Wednesday' | 'Thursday' | 'Friday' | 'Saturday' | 'Sunday'

Internally, it'll create a Trie structure for fast lookup.