#
8547d904 |
|
07-Jul-2009 |
Michael Norrish <Michael.Norrish@nicta.com.au> |
Fix for the SML signature parser that helps to create the online help. In particular, it was failing to parse include foo where type ty1 = ty2 Indeed, the lexer didn't even know that "where" was a keyword. The fix is hackish. In particular, you start to get shift/reduce errors if you do this naively, because it is legitimate to write structure M1 : SIG1 and M2 : SIG2 inside a signature. I have unilaterally turned that into a syntax error because it can be rewritten to structure M1 : SIG1 structure M2 : SIG2 Moreover, it is not an idiom used in any of our sources. If and when we decide this needs fixing, I recommend looking at the parser code inside the Hamlet interpreter. That is where the two forms of INCLUDE production in the new version of Parser.grm comes from, along with the idea of having a non-terminal corresponding to a list of identifiers that is at least two elements long. These are cute ideas. The other contortions that Hamlet parser has to go through to get the full language properly supported are not.
|