2009/3/31 john skaller <skal...@users.sourceforge.net> > > On 31/03/2009, at 2:35 AM, Emmanuel Onzon wrote: > > >> Roughly Felix would benefit from ability to add new productions by >> "pushing" them onto a grammar stack, and later "forget" these productions. >> >> I conceive this as a purely functional operation, not a modification, >> working just like "scopes" in programming languages (because that's >> precisely the context in which the feature is needed :) >> >> This is exactly how extending the grammar works with dypgen, >> unless I'm missing something. >> >> > yes but it can't be done without priorities: there's no way to "push" > a grammar production into a chain otherwise. > > Merely adding another case to a non-terminal's RHS production list > is not enough to add a new operator, since the list is closed off by > a tail jump to the next precedence. > > Having priorities allows this because you can insert one between > two others, Hmm. Note this required deleting a priority and adding two > more if they're not transitive .. hmmm ... >
Adding new priorities is not a problem, but deleting them is currently not possible (except when going out of scope). Could you give me an example where you need to delete a priority to insert a new operator in the grammar ?
------------------------------------------------------------------------------
_______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language