cvs commit: nhc98/src/compiler98 Extra.hs MkSyntax.hs Parse.hs Rename.hs SyntaxPos.hs

olaf 2004/07/30 11:57:25 PDT Modified files: src/compiler98 Extra.hs MkSyntax.hs Parse.hs Rename.hs SyntaxPos.hs Log: Parts of parser and renamer modified to handle extended positions correctly. This work is not yet complete. Some tricky things not yet solved: - some constructs may include optional semicolons or curly brackets, e.g. do { x <- myRead; putStr x; } these are currently not included in the position, so the do expression ends at the last "x". - the syntax does not include enough positions to give positions to everything. E.g. now the position of a function declaration DeclFun describes the full declaration, there is no position for the function variable itself. - some syntactic constructs are immediately desugared, for example list comprehensions; now every component of the translation gets the position of the full list comprehension. This makes it easy to map parts of the syntax tree to the source code, but impossible to map part of the source code uniquely to the part of the syntax tree that describes it completely. So hat-observe will find it hard to give for a marked list comprehension just the values of the full list comprehension, not intermediate internal values. Revision Changes Path 1.14 +4 -0 nhc98/src/compiler98/Extra.hs 1.10 +8 -6 nhc98/src/compiler98/MkSyntax.hs 1.25 +13 -8 nhc98/src/compiler98/Parse.hs 1.34 +10 -6 nhc98/src/compiler98/Rename.hs 1.12 +63 -72 nhc98/src/compiler98/SyntaxPos.hs
participants (1)
-
olaf@glass.cse.ogi.edu