2009/4/4 john skaller <skal...@users.sourceforge.net> > > On 04/04/2009, at 11:57 PM, john skaller wrote: > > >> >> On 04/04/2009, at 11:52 PM, Emmanuel Onzon wrote: >> >> >>> The bug was in dypgen. The function that initializes >>> the hashtable was bugged. Somewhere it did not makes >>> a recursive call when it had to. >>> >> >> ok .. pasting in new file .. >> >> >>> In addition, dypgen must be called with the flag: >>> --no-undef-nt >>> otherwise an exception is thrown. >>> >> >> I don't understand: an exception is thrown when? >> > > > OPEN SYNTAX HAS FINISHED, RETURNING RESULT TO DYPGEN > > !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! > <<load syntax>> open syntax felix ; > Syntax Error before token 5 in build/lib/flx_platform.flxh, line 10 col 1 > macro val WIN32 = false ; macro val POSIX = true ; macro val LINUX = false > ; macro val MACOSX > !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! > Dyp.Undefined_nt("comma") > PARSE ERROR > Unknown exception Parsing File > > > U mean like this? but I still don't understand how "comma" can be > undefined.. >
Yes, I mean this exception. comma is well defined, but dypgen believes it is not. It is not a problem though. Just call dypgen with --no-undef-nt or makes the change line 230 > comma is a core non-terminal in the initial grammar: > > comma: COMMA { 0,slift $1,Snull } > > and it is used in that grammar too, as well as in the extensions. > > Given that the extensions are "purely functional" so that they can be > forgotten, and Hashtbl is imperative .. I'm curious how a Hashtble > works at all for doing lookup: there has to be a functional data structure > being pushed and popped from which the table is built for each fresh > automaton .. well I think there is from seeing the code?? > A new hashtable is created for the extension. The previous one (for the non extended grammar) is still there, and is used again when the parser goes out of the scope of the extension.
------------------------------------------------------------------------------
_______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language