Ihor Radchenko <yanta...@gmail.com> writes: > David Masterson <dsmasterson92...@outlook.com> writes: > >> Could an extensible pre-hook that runs a list of functions take care of >> the inconsistencies where each function recognizes one change to the >> standard grammar and adjusts the input accordingly? > > Could you elaborate? For now, this sounds like unnecessary > over-complication. Why would we need to introduce deviations from > grammar in different functions?
Testing the usefulness of extensions to the grammar before they're added to the grammar..? Thinking about it, though, I'm not sure how you could "pre-parse" a section of the file, make changes to the file via an extension, then roll back the file pointer and let the regular parser take over. I was thinking of a "hook" approach where, when the parser gets to a certain point (beginning of a header?), it could call the hooks with the current spot as input. If the hooks try to "extract" something from the input (to process it and hide it from the regular grammar), I have a feeling that would mess up the base parser. It was just an idea... ;) -- David Masterson