melt-umn / copper

An integrated context-aware scanner and parser generator
http://melt.cs.umn.edu/copper
GNU Lesser General Public License v3.0
18 stars 4 forks source link

Getting first set for nonterminals? #22

Open remexre opened 6 years ago

remexre commented 6 years ago

If I wanted to have Copper send Silver back the first set for every nonterminal, what would be the place to start? I want this for https://github.com/melt-umn/silver/issues/205, so nonterminals can be included in "alias groups."

schwerdf commented 6 years ago

Copper does not make that information obtainable through the API, since that would seriously hamstring the possibility of developing alternative parser compilation pipelines.

Currently, if run at the VERY_VERBOSE or -vv level, Copper logs context sets for all the symbols in a grammar. I think it would also be possible to include the context sets in the XML-format dump, if that would help.