Ticket #3: DumpAst.patch

File DumpAst.patch, 73.5 KB (added by benedikt, 16 months ago)

Patch: Show instances for AST types

Line 
1Thu Jan 20 18:06:40 CET 2011  Alexander Bernauer <bernauer@inf.ethz.ch>
2  * DumpAst
3
4New patches:
5
6[DumpAst
7Alexander Bernauer <bernauer@inf.ethz.ch>**20110120170640
8 Ignore-this: db1718beb0c6e1f55affba080e55dea
9] {
10addfile ./examples/DumpAst.hs
11hunk ./examples/DumpAst.hs 1
12+-- Minimal example: parse a file, and print its AST
13+module Main where
14+import System.Environment
15+import System.FilePath
16+import System.Exit
17+import System.IO
18+import Control.Arrow      hiding ((<+>))
19+import Control.Monad
20+import Debug.Trace
21+import Text.PrettyPrint.HughesPJ
22+import Data.List
23+
24+import Language.C              -- simple API
25+import Language.C.System.GCC   -- preprocessor used
26+
27+usageMsg :: String -> String
28+usageMsg prg = render $
29+  text "Usage:" <+> text prg <+> hsep (map text ["CPP_OPTIONS","input_file.c"])
30+
31+main :: IO ()
32+main = do
33+    let usageErr = (hPutStrLn stderr (usageMsg "./ParseAndPrint") >> exitWith (ExitFailure 1))
34+    args <- getArgs
35+    when (length args < 1) usageErr
36+    let (opts,input_file) = (init args, last args)
37+
38+    -- parse
39+    ast <- errorOnLeftM "Parse Error" $
40+      parseCFile (newGCC "gcc") Nothing opts input_file
41+    -- dump
42+    putStrLn $ show ast
43+
44+errorOnLeft :: (Show a) => String -> (Either a b) -> IO b
45+errorOnLeft msg = either (error . ((msg ++ ": ")++).show) return
46+errorOnLeftM :: (Show a) => String -> IO (Either a b) -> IO b
47+errorOnLeftM msg action = action >>= errorOnLeft msg
48hunk ./src/Language/C/Data.hs 26
49      initPos, nopos,builtinPos,internalPos,
50      isSourcePos,isBuiltinPos,isInternalPos,
51      -- * Syntax tree nodes
52-     NodeInfo(..),CNode(..),
53+     NodeInfo(..),CNode(..),NodeInfoS(..),
54      fileOfNode,posOfNode,nameOfNode,
55      undefNode,mkNodeInfoOnlyPos,mkNodeInfo,
56      internalNode, -- DEPRECATED
57hunk ./src/Language/C/Data/Node.hs 15
58 -- source position and unqiue name
59 -----------------------------------------------------------------------------
60 module Language.C.Data.Node (
61-   NodeInfo(..), undefNode, isUndefNode,
62+   NodeInfo(..), undefNode, isUndefNode, NodeInfoS(..),
63    mkNodeInfoOnlyPos,mkNodeInfoPosLen, mkNodeInfo,mkNodeInfo',
64    internalNode, -- deprecated, use undefNode
65    CNode(nodeInfo), fileOfNode,
66hunk ./src/Language/C/Data/Node.hs 29
67 -- | Parsed entity attribute
68 data NodeInfo = OnlyPos  Position {-# UNPACK #-} !PosLength        -- only pos and last token (for internal stuff only)
69               | NodeInfo Position {-# UNPACK #-} !PosLength !Name  -- pos, last token and unique name
70-           deriving (Show,Data,Typeable)
71+           deriving (Data,Typeable)
72+
73+instance Show NodeInfo where
74+    show _ = "_"
75+
76+newtype NodeInfoS = NodeInfoS NodeInfo
77+
78+instance Show NodeInfoS where
79+    showsPrec d (NodeInfoS (OnlyPos p l)) = (showString "(OnlyPos ") . (showsPrec d p) . (showString " ") . (showsPrec d l) . (showString ")")
80+    showsPrec d (NodeInfoS (NodeInfo p l n)) = (showString "(OnlyPos ") . (showsPrec d p) . (showString " ") . (showsPrec d l) . (showString " ") . (showsPrec d n) . (showString ")")
81 
82 -- name equality of attributes, used to define (name) equality of objects
83 instance Eq NodeInfo where
84hunk ./src/Language/C/Syntax/AST.hs 72
85 type CTranslUnit = CTranslationUnit NodeInfo
86 data CTranslationUnit a
87   = CTranslUnit [CExternalDeclaration a] a
88-    deriving (Data,Typeable {-! CNode !-})
89+    deriving (Show, Data,Typeable {-! CNode !-})
90 
91 -- | External C declaration (C99 6.9, K&R A10)
92 --
93hunk ./src/Language/C/Syntax/AST.hs 82
94   = CDeclExt (CDeclaration a)
95   | CFDefExt (CFunctionDef a)
96   | CAsmExt  (CStringLiteral a) a
97-    deriving (Data,Typeable {-! CNode !-})
98+    deriving (Show, Data,Typeable {-! CNode !-})
99 
100 -- | C function definition (C99 6.9.1, K&R A10.1)
101 --
102hunk ./src/Language/C/Syntax/AST.hs 105
103     [CDeclaration a]          -- optional declaration list
104     (CStatement a)            -- compound statement
105     a
106-    deriving (Data,Typeable {-! CNode !-})
107+    deriving (Show, Data,Typeable {-! CNode !-})
108 
109 -- | C declarations (K&R A8, C99 6.7), including structure declarations, parameter
110 --   declarations and type names.
111hunk ./src/Language/C/Syntax/AST.hs 157
112       Maybe (CInitializer a), -- optional initialize
113       Maybe (CExpression a))] -- optional size (const expr)
114     a
115-    deriving (Data,Typeable {-! CNode !-})
116+    deriving (Show, Data,Typeable {-! CNode !-})
117 
118 -- | C declarator (K&R A8.5, C99 6.7.5) and abstract declarator (K&R A8.8, C99 6.7.6)
119 --
120hunk ./src/Language/C/Syntax/AST.hs 206
121 type CDeclr = CDeclarator NodeInfo
122 data CDeclarator a
123   = CDeclr (Maybe Ident) [CDerivedDeclarator a] (Maybe (CStringLiteral a)) [CAttribute a] a
124-    deriving (Data,Typeable {-! CNode !-})
125+    deriving (Show, Data,Typeable {-! CNode !-})
126 
127 -- | Derived declarators, see 'CDeclr'
128 --
129hunk ./src/Language/C/Syntax/AST.hs 226
130   -- ^ Array declarator @CArrDeclr declr tyquals size-expr?@
131   | CFunDeclr (Either [Ident] ([CDeclaration a],Bool)) [CAttribute a] a
132     -- ^ Function declarator @CFunDeclr declr (old-style-params | new-style-params) c-attrs@
133-    deriving (Data,Typeable {-! CNode !-})
134+    deriving (Show, Data,Typeable {-! CNode !-})
135 
136 -- | Size of an array
137 type CArrSize = CArraySize NodeInfo
138hunk ./src/Language/C/Syntax/AST.hs 233
139 data CArraySize a
140   = CNoArrSize Bool               -- ^ @CUnknownSize isCompleteType@
141   | CArrSize Bool (CExpression a) -- ^ @CArrSize isStatic expr@
142-    deriving (Data,Typeable)
143+    deriving (Show, Data,Typeable)
144 
145 -- | C statement (K&R A9, C99 6.8)
146 --
147hunk ./src/Language/C/Syntax/AST.hs 279
148   | CReturn (Maybe (CExpression a)) a
149   -- | assembly statement
150   | CAsm CAsmStmt a
151-    deriving (Data,Typeable {-! CNode !-})
152+    deriving (Show, Data,Typeable {-! CNode !-})
153 
154 -- | GNU Assembler statement
155 --
156hunk ./src/Language/C/Syntax/AST.hs 299
157     [CAsmOperand]              -- input operands
158     [CStringLiteral a]         -- Clobbers
159     a
160-    deriving (Data,Typeable {-! CNode !-})
161+    deriving (Show, Data,Typeable {-! CNode !-})
162 -- | Assembler operand
163 --
164 -- @CAsmOperand argName? constraintExpr arg@ specifies an operand for an assembler
165hunk ./src/Language/C/Syntax/AST.hs 311
166     (CStringLiteral a)  -- constraint expr
167     (CExpression a)     -- argument
168     a
169-    deriving (Data,Typeable {-! CNode !-})
170+    deriving (Show, Data,Typeable {-! CNode !-})
171 -- | C99 Block items
172 --
173 --  Things that may appear in compound statements: either statements, declarations
174hunk ./src/Language/C/Syntax/AST.hs 321
175   = CBlockStmt    (CStatement a)    -- ^ A statement
176   | CBlockDecl    (CDeclaration a)  -- ^ A local declaration
177   | CNestedFunDef (CFunctionDef a)  -- ^ A nested function (GNU C)
178-    deriving (Data,Typeable {-! CNode !-})
179+    deriving (Show, Data,Typeable {-! CNode !-})
180 -- | C declaration specifiers and qualifiers
181 --
182 -- Declaration specifiers include at most one storage-class specifier (C99 6.7.1),
183hunk ./src/Language/C/Syntax/AST.hs 331
184   = CStorageSpec (CStorageSpecifier a) -- ^ storage-class specifier or typedef
185   | CTypeSpec    (CTypeSpecifier a)    -- ^ type name
186   | CTypeQual    (CTypeQualifier a)    -- ^ type qualifier
187-    deriving (Data,Typeable {-! CNode !-})
188+    deriving (Show, Data,Typeable {-! CNode !-})
189 
190 -- | Seperate the declaration specifiers
191 --
192hunk ./src/Language/C/Syntax/AST.hs 357
193   | CExtern   a     -- ^ extern
194   | CTypedef  a     -- ^ typedef
195   | CThread   a     -- ^ GNUC thread local storage
196-    deriving (Eq,Ord,Data,Typeable {-! CNode !-})
197+    deriving (Show, Eq,Ord,Data,Typeable {-! CNode !-})
198 
199 -- | C type specifier (K&R A8.2, C99 6.7.2)
200 --
201hunk ./src/Language/C/Syntax/AST.hs 383
202   | CTypeDef     Ident        a      -- ^ Typedef name
203   | CTypeOfExpr  (CExpression a)  a  -- ^ @typeof(expr)@
204   | CTypeOfType  (CDeclaration a) a  -- ^ @typeof(type)@
205-    deriving (Data,Typeable {-! CNode !-})
206+    deriving (Show, Data,Typeable {-! CNode !-})
207 
208 -- | returns @True@ if the given typespec is a struct, union or enum /definition/
209 isSUEDef :: CTypeSpec -> Bool
210hunk ./src/Language/C/Syntax/AST.hs 402
211   | CRestrQual a
212   | CInlineQual a
213   | CAttrQual  (CAttribute a)
214-    deriving (Data,Typeable {-! CNode !-})
215+    deriving (Show, Data,Typeable {-! CNode !-})
216 
217 -- | C structure or union specifiers (K&R A8.3, C99 6.7.2.1)
218 --
219hunk ./src/Language/C/Syntax/AST.hs 422
220     (Maybe [CDeclaration a])  -- member declarations
221     [CAttribute a]            -- __attribute__s
222     a
223-    deriving (Data,Typeable {-! CNode !-})
224+    deriving (Show, Data,Typeable {-! CNode !-})
225 
226 -- | A tag to determine wheter we refer to a @struct@ or @union@, see 'CStructUnion'.
227 data CStructTag = CStructTag
228hunk ./src/Language/C/Syntax/AST.hs 427
229                 | CUnionTag
230-                deriving (Eq,Data,Typeable)
231+                deriving (Show, Eq,Data,Typeable)
232 
233 -- | C enumeration specifier (K&R A8.4, C99 6.7.2.2)
234 --
235hunk ./src/Language/C/Syntax/AST.hs 449
236              Maybe (CExpression a))]) -- explicit variant value
237     [CAttribute a]                    -- __attribute__s
238     a
239-    deriving (Data,Typeable {-! CNode !-})
240+    deriving (Show, Data,Typeable {-! CNode !-})
241 
242 
243 -- | C initialization (K&R A8.7, C99 6.7.8)
244hunk ./src/Language/C/Syntax/AST.hs 463
245   = CInitExpr (CExpression a) a
246   -- | initialization list (see 'CInitList')
247   | CInitList (CInitializerList a) a
248-    deriving (Data,Typeable {-! CNode !-})
249+    deriving (Show, Data,Typeable {-! CNode !-})
250 
251 -- | Initializer List
252 --
253hunk ./src/Language/C/Syntax/AST.hs 506
254   | CMemberDesig  Ident a
255   -- | array range designator @CRangeDesig from to _@ (GNU C)
256   | CRangeDesig (CExpression a) (CExpression a) a
257-    deriving (Data,Typeable {-! CNode !-})
258+    deriving (Show, Data,Typeable {-! CNode !-})
259 
260 -- | @__attribute__@ annotations
261 --
262hunk ./src/Language/C/Syntax/AST.hs 514
263 -- and serve as generic properties of some syntax tree elements.
264 type CAttr = CAttribute NodeInfo
265 data CAttribute a = CAttr Ident [CExpression a] a
266-                    deriving (Data,Typeable {-! CNode !-})
267+                    deriving (Show, Data,Typeable {-! CNode !-})
268 
269 -- | C expression (K&R A7)
270 --
271hunk ./src/Language/C/Syntax/AST.hs 576
272   | CStatExpr    (CStatement a) a        -- ^ GNU C compound statement as expr
273   | CLabAddrExpr Ident a                 -- ^ GNU C address of label
274   | CBuiltinExpr (CBuiltinThing a)       -- ^ builtin expressions, see 'CBuiltin'
275-    deriving (Data,Typeable {-! CNode !-})
276+    deriving (Show, Data,Typeable {-! CNode !-})
277 
278 
279 -- | GNU Builtins, which cannot be typed in C99
280hunk ./src/Language/C/Syntax/AST.hs 585
281   = CBuiltinVaArg (CExpression a) (CDeclaration a) a            -- ^ @(expr, type)@
282   | CBuiltinOffsetOf (CDeclaration a) [CDesignator] a -- ^ @(type, designator-list)@
283   | CBuiltinTypesCompatible (CDeclaration a) (CDeclaration a) a  -- ^ @(type,type)@
284-    deriving (Data,Typeable {-! CNode !-})
285+    deriving (Show, Data,Typeable {-! CNode !-})
286 
287 -- | C constant (K&R A2.5 & A7.2)
288 type CConst = CConstant NodeInfo
289hunk ./src/Language/C/Syntax/AST.hs 594
290   | CCharConst  CChar a
291   | CFloatConst CFloat a
292   | CStrConst   CString a
293-    deriving (Data,Typeable {-! CNode !-})
294+    deriving (Show, Data,Typeable {-! CNode !-})
295 
296 -- | Attributed string literals
297 type CStrLit = CStringLiteral NodeInfo
298hunk ./src/Language/C/Syntax/AST.hs 599
299 data CStringLiteral a = CStrLit CString a
300-            deriving (Data,Typeable {-! CNode !-})
301+            deriving (Show, Data,Typeable {-! CNode !-})
302 
303 cstringOfLit :: CStrLit -> CString
304 cstringOfLit (CStrLit cstr _) = cstr
305}
306
307Context:
308
309[Improve pretty printing of if-then-else statements
310benedikt.huber@gmail.com**20101216110909
311 Ignore-this: 220a2dacbf8a1d15b0cf90ced7fbd5ea
312]
313[Remove useless UNPACK pragmas (GHC7 warnings)
314benedikt.huber@gmail.com**20101216104025
315 Ignore-this: c741569d400be3342af8a6d35c92d0f7
316]
317[Fix for GHC 7: Do not import Data.Generics.empty
318David Leuschner <david@loisch.de>**20101215224803
319 Ignore-this: 78e3375bdf3804ee4a2278affe9d045d
320]
321[Disable custom Monad Either instance for GHC 7
322benedikt.huber@gmail.com**20101215224355
323 Ignore-this: c9c3834df5bfee7abb3ac28bce41c2a5
324]
325[test-framework: Normalize if-statements to avoid spurious (parse-prettyprint-parse) mismatches for nested if-then-elses
326benedikt.huber@gmail.com**20100721133531
327 Ignore-this: 55e5db82a3ca04ccbc7df9a51c9be300
328]
329[Add another test for pretty printing if-then-else
330benedikt.huber@gmail.com**20100720212917
331 Ignore-this: c0cab673ec9d716deb4154ae5599ed74
332]
333[examples: Use matching version of language-c
334benedikt.huber@gmail.com**20100719135907
335 Ignore-this: df14d97e62a075c9c10b0544252b6b99
336]
337[test/harness: Call Makefile in parent directory
338benedikt.huber@gmail.com**20100719135708
339 Ignore-this: 557f27fc83ae5fa9fe33824475e999b7
340]
341[Fix signedness bug in constant folding.
342Aaron Tomb <aarontomb@gmail.com>**20101210225335
343 Ignore-this: 9ff9f2e4cc27fde2997902fd7d540c35
344]
345[Fix bug comparing void pointers to others.
346Aaron Tomb <aarontomb@gmail.com>**20100830000549
347 
348 Void pointers are now compatible, in the sense of composite types, with
349 all other pointers.
350]
351[Temporarily disable a type error message.
352Aaron Tomb <aarontomb@gmail.com>**20100827203839
353 
354 It's currently not quite correct. It will be re-enabled once it works
355 properly.
356]
357[Add another builtin function (__builtin_strcspn)
358Aaron Tomb <aarontomb@gmail.com>**20100821224347]
359[Array types can be composited with integral types.
360Aaron Tomb <aarontomb@gmail.com>**20100821210957]
361[Error message when mergeOldStyle fails.
362Aaron Tomb <aarontomb@gmail.com>**20100821210814
363 
364 The mergeOldStyle function seems to be aimed to remove all old-style
365 parameters from the argument list of a function. However, its result
366 sometimes includes old-style parameters, causing the previous
367 irrefutable pattern to fail. Now, instead of a pattern match failure,
368 you get an error message in this case.
369]
370[Remove some type error messages.
371Aaron Tomb <aarontomb@gmail.com>**20100821210658
372 
373 The type checker was being overly restrictive in its type checks in some
374 places, so a few type error messages are disabled until they work
375 correctly again.
376]
377[Add a couple of builtin functions.
378Aaron Tomb <aarontomb@gmail.com>**20100820221021]
379[Add optional \r before \n (DOS newline) when lexing line pragmas
380benedikt.huber@gmail.com**20100713230011
381 Ignore-this: 4f8dc3973926b89e37f7e506a3d6710
382]
383[Add test.expect for bug31_pp_if_else
384benedikt.huber@gmail.com**20100713220843
385 Ignore-this: e5cd2f3d1e0d613a47939438f1059cc0
386]
387[Add test for bug 5: Lexer chokes on DOS newlines
388benedikt.huber@gmail.com**20100713220142
389 Ignore-this: bcac16c711b44c9f6b3b6444450a2253
390]
391[Update tExpr to cache node types.
392Aaron Tomb <aarontomb@gmail.com>**20100627164528]
393[Constant-fold casts.
394Aaron Tomb <aarontomb@gmail.com>**20100523223654]
395[The size of a function type is the size of a pointer.
396Aaron Tomb <aarontomb@gmail.com>**20100523223626]
397[Add a few more builtin declarations.
398Aaron Tomb <aarontomb@gmail.com>**20100523223558]
399[Remove broken canonicalName and canonicalIdent functions.
400Aaron Tomb <aarontomb@gmail.com>**20100306195724
401 
402 I don't think anyone else was using them, and they don't seem to be
403 correct.
404]
405[Fix examples to include additional typequal/attribute fields of SemRep.Type
406benedikt.huber@gmail.com**20100223220612
407 Ignore-this: 606d591e7512226a7fc36173147b261c
408]
409[Add type qualifiers and attributes to SemRep.Type
410Benedikt Huber **20100223180554
411 Ignore-this: 4ac2ed84b60b9edd5523a1446e1e5926
412 
413 aaron:
414 >> For instance, language-c will accept the following code already:
415 >>
416 >> typedef int foo;
417 >> const foo y;
418 >>
419 >> though it's not immediately obvious to me where the const qualifier gets recorded.
420 benedikt:
421 > Oh, that's a [bug] in the analysis:
422 > a) type qualifiers are dropped for typedefs (tDirectType) [FIXED]
423 > b) type qualifiers are not allowed for typedefs (mergeTypeAttributes) [FIXED]
424 > c) attributes are dropped for direct types altogether [FIXED]
425 
426 Other than that, the changes were mostly straightforward, still I hope no new bugs have been introduced.
427]
428[Fix infinite loop in enumeration constant folding.
429Aaron Tomb <aarontomb@gmail.com>**20100210045301]
430[Add test for bug 31
431benedikt.huber@gmail.com**20100204095654
432 Ignore-this: ac96c7279e53d5775adeae2c787cad27
433]
434[Fix recently introduced bug with dangling else in pretty-printer
435benedikt.huber@gmail.com**20100204092743
436 Ignore-this: fc32765b13ec57bb8906b954c60ac58
437]
438[Export 'exportDeclr' in Analysis/Export.hs
439benedikt.huber@gmail.com**20100128104344
440 Ignore-this: 65a61348e5e21086cc3aa63ee60d86ab
441]
442[Fix type checking bug for function pointer parameters.
443Aaron Tomb <aarontomb@gmail.com>**20100127172548
444 
445 The previous patch to add support for transparent unions broke type
446 checking of paramters to functions passed via function pointers. If a
447 function was defined to take a parameter that was a typedef name, and
448 you passed in a function in which the matching parameter was the raw
449 type referred to by that typedef, the two would not match because the
450 type checker was failing to dereference typedef names in this one case.
451]
452[Support a bunch of additional GCC builtins.
453Aaron Tomb <aarontomb@gmail.com>**20100118051615]
454[Support transparent union parameters.
455Aaron Tomb <aarontomb@gmail.com>**20100118051536]
456[Simplify TypeCheck example program.
457Aaron Tomb <aarontomb@gmail.com>**20100118051450]
458[Support type checking of transparent unions.
459Aaron Tomb <aarontomb@gmail.com>**20100111181324]
460[Improve type error reporting for function calls.
461Aaron Tomb <aarontomb@gmail.com>**20100111171616]
462[Improve constant folding for sizeof/alignof.
463Aaron Tomb <aarontomb@gmail.com>**20100111042438]
464[Define sizeofType for UnknownArraySize
465Aaron Tomb <aarontomb@gmail.com>**20091222182612
466 
467 An array of unknown size is just a pointer.
468]
469[Parametric AST types.
470Aaron Tomb <aarontomb@gmail.com>**20091222182008
471 
472 Modify the types in Language.C.Syntax.AST to be parameterized by an
473 annotation type. The parser returns ASTs annotated with NodeInfo, but
474 other analysis code can replace the annotations.
475 
476 The parametric AST types have longer, less abbreviated names. For
477 instance, statements are now
478 
479   data CStatement a = ...
480 
481 with a type synonym
482 
483   type CStat = CStatement NodeInfo
484 
485 
486]
487[Extend NodeDerive.hs to deal with parametric AST
488benedikt.huber@gmail.com**20091220235521
489 Ignore-this: b9783b5f32e559597151eb96b3d5ff2c
490]
491[.cabal: recognize separate syb
492marco-oweber@gmx.de**20091130231738
493 Ignore-this: 9e0ec55119d163b9d4e439e8d3ee16de
494]
495[Arrays can participate in subtraction.
496Aaron Tomb <aarontomb@gmail.com>**20091112193809
497 
498 Previously, subtraction was allowed on pointers but not arrays. This
499 might be better implemented by coercing arrays to pointers beforehand,
500 but this works, and is easier at the moment.
501 
502 Eventually, it might be best to refactor the type checker a bit to
503 support array->pointer coercion in the right places.
504]
505[Export isTypeDef
506Aaron Tomb <aarontomb@gmail.com>**20091112193721]
507[Add __builtin_clz
508Aaron Tomb <aarontomb@gmail.com>**20091112193654]
509[Change pretty-printing of the else branch, s.t. the braces get on a new line
510benedikt.huber@gmail.com**20091101230141
511 Ignore-this: a9946733e17d2fefcee4c0bcb46d42b6
512]
513[Fix awkward array type checking.
514Aaron Tomb <aarontomb@gmail.com>**20090927200632
515 
516 Array type checking was somewhat broken before. During a moment of
517 frustration (because some key type checking code was incorrect), I
518 decided to convert array types to pointer types immediately after
519 getting them out of the symbol table, to simplify type checking.
520 
521 Unfortunately, this meant that the types returned by tExpr were never
522 array types, even when they should be.
523 
524 The other bits of the type checker are in much better shape now, so this
525 egregious hack isn't necessary.
526]
527[Use pattern matching instead of partial function
528Aaron Tomb <aarontomb@gmail.com>**20090816213828
529 
530 Some type checking code used the partial identOfName function in a case
531 expression that was already pattern matching on the structure of
532 VarName. It's shorter and safer to extract the field directly in this
533 case.
534]
535[Remove unused, buggy fieldOffset function.
536Aaron Tomb <aarontomb@gmail.com>**20090816213737]
537[Replace CStorageSpec Show instance with Pretty instance
538Aaron Tomb <aarontomb@gmail.com>**20090816185348
539 
540 CStorageSpec had a Show instance specified in L.C.Syntax.AST, but no
541 other data type did. This Show instance was only used in one place, and
542 it seemed somewhat inconsistent with the rest of the code. So I removed
543 the Show instance from L.C.Syntax.AST, added a Pretty instance in
544 L.C.Pretty, and changed the one place that used the Show instance to use
545 the Pretty instance instead.
546 
547 This could potentially cause incompatibilities with client code, but
548 it's unlikely: how often does code need to render storage specifications
549 as text but nothing else? Any broken code can be fixed with minimal
550 effort.
551]
552[Add constant expression evaluation.
553Aaron Tomb <aarontomb@gmail.com>**20090802235355
554 
555 This patch adds basic support for constant expression evaluation. Not
556 all cases are handled yet: alignof is not implemented, and the values
557 from the initializers for const globals are not yet used.
558 
559 This patch also enables proper type checking of the GCC extension
560 __builtin_choose_expr, which depends on constant expression evaluation.
561]
562[Tighten a bunch of class contexts.
563Aaron Tomb <aarontomb@gmail.com>**20090725044519
564 
565 The separation of MonadTrav into several smaller monads makes it
566 possible to give more precise types to a number of functions. Many
567 functions that previously included the MonadTrav class constrain now
568 have one or both of MonadCError and MonadSymtab. They never need to
569 generate fresh names or call 'handleDecl'.
570]
571[Split MonadTrav into several monads
572Aaron Tomb <aarontomb@gmail.com>**20090724011254
573 
574 The MonadTrav class serves several purposes, and some useful functions
575 only need some of its available methods. This patch splits it into
576 several monads:
577 
578 * MonadName, for fresh name generation.
579 * MonadSymtab, for symbol table operations.
580 * MonadCError, for C-specific error handling.
581 * MonadTrav, combining all of the above, plus a callback function.
582 
583]
584[Refactor type checking a bit.
585Aaron Tomb <aarontomb@gmail.com>**20090723012504
586 
587 Now many of the utility functions in the type checker are pure
588 functions, returning Left on error. Clients in the MonadTrav monad can
589 use typeErrorOnLeft to turn these into "real" errors.
590]
591[Export getUserState and tDesignator
592Aaron Tomb <aarontomb@gmail.com>**20090716234346
593 
594 The former is necessary for user state to be at all useful. The latter
595 is usable outside of the core type checker, and I found it useful in at
596 least one project, so it seems worth exporting.
597]
598[Fix bug #29 for real now! And remove typeof from SemRep.
599Aaron Tomb <aarontomb@gmail.com>**20090714035021
600 
601 This patch fixes bug #29 for real, without the various breakage the
602 previous patch caused. In addition, it allows the third example listed
603 in my last patch to typecheck properly.
604 
605 This change makes it no longer necessary to have a representation for
606 'typeof' in SemRep, so this patch removes that, as well.
607]
608[ Fix derive.sh and DeclEvent CNode instance (reported by Denis Bueno)
609benedikt.huber@gmail.com**20090712213037
610 Ignore-this: c601523dba6649a97bb927c452f80e13
611]
612[Further progress on bug #29
613Aaron Tomb <aarontomb@gmail.com>**20090620201202
614 Ignore-this: d2b78ed617dbd4c3d70df5a92e1e9e4e
615 
616 It's now possible to correctly type check this:
617 
618     typedef int ax25_dev;
619     int f() {
620         ax25_dev *ax25_dev, *ax25_dev_old;
621     }
622 
623 and this:
624 
625     typedef int ax25_dev;
626     int f() {
627         typeof(ax25_dev) *ax25_dev, *ax25_dev_old;
628     }
629 
630 but not this:
631 
632     typedef int ax25_dev;
633     int f() {
634         typeof(ax25_dev) *ax25_dev, *ax25_dev_old;
635         typeof(ax25_dev_old) foo;
636     }
637 
638 The second line resolves to ax25_dev, which now is an object, not a
639 type. Is this valid ANSI C? GCC accepts it.
640 
641]
642[Add tests for bug #29.
643Aaron Tomb <aarontomb@gmail.com>**20090228184609]
644[Record use/def link between names.
645Aaron Tomb <aarontomb@gmail.com>**20090222200922
646 
647 The DefTable type included a refTable field to record links between use
648 and definition Names, but it was unused. Now, whenever analysis code
649 calls lookupTypeDef or lookupObject, the link between use and definition
650 is store in the refTable. Type checking should fully populate this
651 table, because it needs to lookup all uses to ensure that their use is
652 well-typed.
653 
654]
655[Only analyse TypeSpecs once. Fixes #29.
656Aaron Tomb <aarontomb@gmail.com>**20090222183955
657 
658 Previously, the type specifiers of declarations with multiple
659 declarators were analyzed multiple times. However, when declaring a
660 variable with the same name as a type, this causes problems.
661 
662 Consider:
663 
664   foo *foo, *bar;
665 
666 The analysis of "foo *foo" results in a symbol table where the innermost
667 definition of "foo" refers to an object, not a typedef name.
668 Therefore, when analyzing "foo *bar", the type checker tries to look up
669 "foo" and gets an object declaration, which is a type error.
670 
671 Code like the above example does actually occur, and is valid C. The
672 seemingly equivalent:
673 
674   foo *foo;
675   foo *bar;
676 
677 is not valid C, and is rejected as it should be. The second line is seen
678 as an expression statement, multiplying foo and bar, and fails because
679 bar is not in scope.
680 
681]
682[Change examples to work with the new fileOfNode type sig.
683benedikt.huber@gmail.com**20090223113358
684 Ignore-this: 5659ff98882f2808062bc0f1927788f
685 
686 This change is somewhat preliminary, as the patch to Data.Position needs to be
687 cleaned up.
688]
689[Change fileOfNode to return (Maybe FilePath) instead of FilePath
690benedikt.huber@gmail.com**20090223113342
691 Ignore-this: 2577930de0523d87de2d54cf674c5de9
692]
693[Bump version number
694benedikt.huber@gmail.com**20090223113326
695 Ignore-this: eeb0bc1e75401e74993da85ead1e6954
696]
697[Better and (hopefully) correct examples for initializer list
698benedikt.huber@gmail.com**20090212123709
699 Ignore-this: a97ad65cf2a643ae9d5db8cf6789d4f3
700]
701[Improve README in test/harness
702benedikt.huber@gmail.com**20090126170411
703 Ignore-this: debc7f4d7c7215ecca631e1506aa5024
704]
705[Docuementation for 'position' and 'type PosLength'
706benedikt.huber@gmail.com**20090126164856
707 Ignore-this: 1b97e03544f85c929ef9b25e8bed039
708]
709[Documentation for Position selectors
710benedikt.huber@gmail.com**20090126164833
711 Ignore-this: d7f58d4fed2a7f994f4f854498d3c381
712]
713[[Lexer] use incOffset
714joe.thornber@gmail.com**20090126152422]
715[[Position] add incOffset
716joe.thornber@gmail.com**20090126152403]
717[[Position, Lexer] resolve conflicts
718joe.thornber@gmail.com**20090126151257]
719[[Position] documentation
720joe.thornber@gmail.com**20090126095411]
721[[Position, Lexer] Don't export any constructors for Position
722joe.thornber@gmail.com**20090126094323
723 
724 Instead use the provided operators to query/update a position.  Only
725 the lexer was effected by this.  I hope this doesn't impact
726 performance too much.
727 
728]
729[[Position] Use record syntax
730joe.thornber@gmail.com**20090126143542]
731[[Ident] Replace an UNBOXED pragma with UNPACK
732joe.thornber@gmail.com**20090126095104
733 
734 UNBOXED isn't recognised on 6.10.  When did this pragma get renamed ?
735 Do we need to go back and check 6.8 ?
736]
737[[Position] Use record syntax when defining Position
738joe.thornber@gmail.com**20090126091403
739 
740 That way we get pos{Row,File,Offset,Column} defined for free.
741]
742[[Position] Use a summation type for the various position types.
743joe.thornber@gmail.com**20090126085013
744 
745 Rather than using magic values for the row and column field I
746 think it's cleaner to just define some new constructors for
747 <builtin position> etc.  The only reason I can see for the way
748 it was is performance/memory.  But if that was the case Position
749 would have been defined with newtype.
750]
751[Add extra files (README etc.), remove trailing whitespace
752benedikt.huber@gmail.com**20090126101012
753 Ignore-this: 7166460f5c6e4f278ed6abf31db337c0
754]
755[Add bug-reports field to cabal file
756benedikt.huber@gmail.com**20090126100302
757 Ignore-this: daa837cee90f4b63fb66f4fe7a452b0a
758]
759[Data.Position: add adjustPos, fix documentation
760benedikt.huber@gmail.com**20090126094425
761 Ignore-this: 4fa481b37e55b54aa2090be768a6e2ee
762]
763[Rollback the changes to Data.Position.
764benedikt.huber@gmail.com**20090125142419
765 Ignore-this: 7985e131c3d6b7fd2f7973f9e8188e90
766 Joe Thoerner noted that the column field actually is useful sometimes and that it is used in one of his projects.
767 Maybe we should change Position to
768 > Position origFile origLine preLine preCol
769 ? This seems more consistent than the currently used
770 > Position preOffset origFile origLine preColumn
771 Need to think about this a little bit.
772 
773 rolling back:
774 
775 Sat Jan 24 21:15:33 CET 2009  benedikt.huber@gmail.com
776   * Simplify representation of Position.
777 
778     M ./src/Language/C/Data/Position.hs -24 +26
779     M ./src/Language/C/Parser/Lexer.x -6 +4
780]
781[Simplify representation of Position.
782benedikt.huber@gmail.com**20090124201533
783 Ignore-this: f1bdb854d8cabd882c08e296bc0f50f5
784]
785[Fixed bug #30: 0x0 should have hexadecimal representation
786benedikt.huber@gmail.com**20090113164137]
787[Add test for bug #30
788benedikt.huber@gmail.com**20090113144520]
789[Add ParseAndPrint example to /examples (useful for harness tests)
790benedikt.huber@gmail.com**20090113143148]
791[Add typecheck test to test/src/CRoundTrip
792benedikt.huber@gmail.com**20090113143059]
793[Fix test-framework's runCPP to work with preprocessed files as well
794benedikt.huber@gmail.com**20090113142931]
795[Remove ref to non-existant file from Makefile.
796Aaron Tomb <aarontomb@gmail.com>**20081231225601]
797[Pass statement context into tExpr
798Aaron Tomb <aarontomb@gmail.com>**20081230190851
799 
800 Since expressions can contain statements, correct checking requires
801 knowledge of the statement context (for instance, the return type of
802 the enclosing function, if a statement expression contains a return
803 statement).
804]
805[Add example type checking wrapper program.
806Aaron Tomb <aarontomb@gmail.com>**20081230182230]
807[Add __PRETTY_FUNCTION__ builtin.
808Aaron Tomb <aarontomb@gmail.com>**20081230182005]
809[Initial support for __builtin_choose_expr
810Aaron Tomb <aarontomb@gmail.com>**20081230181920]
811[Allow '&' applied to compound literals.
812Aaron Tomb <aarontomb@gmail.com>**20081230181841]
813[More robustness to occurrence of NoName
814Aaron Tomb <aarontomb@gmail.com>**20081230181725]
815[Expose language dialect options
816Aaron Tomb <aarontomb@gmail.com>**20081230181624]
817[Proper error instead of pattern match failure.
818Aaron Tomb <aarontomb@gmail.com>**20081220001942
819 
820 When attempting to access a field of a non-composite type, give a real
821 type error, rather than a pattern match failure. This was in here
822 before, I think, but must have been messed up during refactoring.
823]
824[Separate module for much of the type checker.
825Aaron Tomb <aarontomb@gmail.com>**20081219195144]
826[Add more type construction utility functions.
827Aaron Tomb <aarontomb@gmail.com>**20081219193412]
828[Better position info for string constant type.
829Aaron Tomb <aarontomb@gmail.com>**20081219191521]
830[Move type conversions into separate module.
831Aaron Tomb <aarontomb@gmail.com>**20081219191250]
832[Add stopping criteria to mapSubStmts
833Aaron Tomb <aarontomb@gmail.com>**20081217233833]
834[Add (unenforced) options for C language subset.
835Aaron Tomb <aarontomb@gmail.com>**20081216174157]
836[Move builtins to a separate module.
837Aaron Tomb <aarontomb@gmail.com>**20081215234146]
838[Improve type normalization.
839Aaron Tomb <aarontomb@gmail.com>**20081212224522]
840[Improve error messages in type checker.
841Aaron Tomb <aarontomb@gmail.com>**20081212224334]
842[Fix treatment of & when applied to array name.
843Aaron Tomb <aarontomb@gmail.com>**20081212224223]
844[Pretty-print chained fields in initializers.
845Aaron Tomb <aarontomb@gmail.com>**20081212001828]
846[Inline functions can appear before register globals.
847Aaron Tomb <aarontomb@gmail.com>**20081211234309]
848[Add support for global register variables.
849Aaron Tomb <aarontomb@gmail.com>**20081211194010]
850[Add expected output for type checking tests.
851Aaron Tomb <aarontomb@gmail.com>**20081211193835]
852[Remove redundant cast compatibility check.
853Aaron Tomb <aarontomb@gmail.com>**20081211004159]
854[Fill in missing case in type export code.
855Aaron Tomb <aarontomb@gmail.com>**20081211004138]
856[One more builtin!
857Aaron Tomb <aarontomb@gmail.com>**20081211004108]
858[More builtins
859Aaron Tomb <aarontomb@gmail.com>**20081211003714
860 
861 Now runTrav populates the symbol table with all of the builtins used by
862 Linux (as of 2.6.24.3).
863]
864[Code to merge name spaces and definition tables
865Aaron Tomb <aarontomb@gmail.com>**20081211003525
866 
867 It can be useful to merge symbol tables on occasion. It doesn't make any
868 sense to do this if they disagree about the values associated with their
869 respective keys, but there are many cases when you can guarantee that
870 they will agree.
871]
872[Add __builtin_expect to builtins
873Aaron Tomb <aarontomb@gmail.com>**20081210223952]
874[Add some test cases for type checking
875Aaron Tomb <aarontomb@gmail.com>**20081209003856]
876[Typedefs can be block scoped
877Aaron Tomb <aarontomb@gmail.com>**20081209003218
878 
879 Under certain circumstances, the standard says that typedefs have block
880 scope. GCC seems even more liberal, treating typedefs just like any
881 other identifier, with scope extending to the end of the innermost
882 block. To handle code such as Linux, we now do the same.
883]
884[Fix corner cases in compound initializer checking
885Aaron Tomb <aarontomb@gmail.com>**20081209002952
886 
887 Compound array and structure initializer lists with complex combinations of
888 designated and undesignated elements now type check. The bulk of Linux
889 2.6.24.3 now goes through with only one error.
890 
891]
892[New code for canonical types
893Aaron Tomb <aarontomb@gmail.com>**20081209002819]
894[Another attempt at structure type checking.
895Aaron Tomb <aarontomb@gmail.com>**20081206022456]
896[Fix fiddly bits of structure and union checking
897Aaron Tomb <aarontomb@gmail.com>**20081206000054
898 
899 Nested structures and unions weren't being handled correctly, especially
900 in initializers. Now we can check members of anonymous union members as
901 if they were direct members, and we can initialize nested structures.
902 
903 For example, we now accept:
904 
905 struct baz { int a; union { int b; int c; }; } v = { .a = 0, .b = 1 };
906 
907 and
908 
909 struct foo { int x; struct bar { int y; } inner; } z = { .x = 0, .inner.y = 1 };
910]
911[Allow void functions to return void expressions
912Aaron Tomb <aarontomb@gmail.com>**20081205235436
913 
914 There really is code (in Linux) that looks like this:
915 
916 void g();
917 void f() { return g(); }
918 
919 The standard doesn't allow it (6.8.6.4.1) but GCC does, so it seems
920 useful to allow it ourselves, too.
921 
922 Eventually, it would make sense to have some configuration settings that
923 describe exactly which variant of the language to accept. In strict C99
924 mode, we'd reject this.
925 
926]
927[Include anonymous structure members in analysis
928Aaron Tomb <aarontomb@gmail.com>**20081205235158
929 
930 When typechecking structure declarations, we previously skipped
931 anonymous members. Now anonymouse structure and union members are
932 included in the symbol table (and anonymous members of non-composite
933 type are rejected).
934]
935[Update linkage rules for redefinition
936Aaron Tomb <aarontomb@gmail.com>**20081205230750
937 
938 From my reading of the standard, it seems as though, if the original
939 declaration (or definition) of a function has internal linkage, then a
940 later declaration (or definition) can have either internal or external
941 linkage. GCC seems to agree with this.
942 
943]
944[Allow calls to unknown functions in type checker.
945Aaron Tomb <aarontomb@gmail.com>**20081204235538]
946[Remove redundant code from type checker
947Aaron Tomb <aarontomb@gmail.com>**20081204230358]
948[Export a few more things from AstAnalysis
949Aaron Tomb <aarontomb@gmail.com>**20081204225815]
950[Improve error message formatting
951Aaron Tomb <aarontomb@gmail.com>**20081204225758]
952[Move generally-useful functions to separate module
953Aaron Tomb <aarontomb@gmail.com>**20081204225416
954 
955 There is now a Language.C.Syntax.Utils module that contains useful
956 functions for dealing with ASTs. Right now, these include a
957 manually-written traversal to extract sub-statements and one to apply a
958 function to all sub-statements. These might be better written with some
959 sort of generic programming framework in the future.
960]
961[Export tStmt
962Aaron Tomb <aarontomb@gmail.com>**20081203205009]
963[Remove typeof as early as possible
964Aaron Tomb <aarontomb@gmail.com>**20081202182528
965 
966 Remove typeof when translating from C types to Types. This requires
967 DeclAnalysis to have the ability to typecheck expressions. I've decided
968 that making AstAnalysis and DeclAnalysis mutually recursive is the
969 simplest and cleanest way to do this for now.
970]
971[Typecheck initializers later (fixes #25)
972Aaron Tomb <aarontomb@gmail.com>**20081202181725
973 
974 Typecheck initializers after entering the variable they initialize into
975 the symbol table. For the moment, this works, but it will break if
976 Initializer becomes different from CInit.
977 
978]
979[Add local labels in block scope.
980Aaron Tomb <aarontomb@gmail.com>**20081202175734
981 
982 This patch undoes my previous "fix" of getSubStmts and does things
983 properly inside getLabels, instead. Now, function-scope labels are all
984 added before we start type checking the function, and local labels are
985 added when entering the block they live in.
986 
987 Ultimately, the utility functions getSubStmts, compoundSubStmts, and
988 getLabels probably belong somewhere in the Language.C.Syntax.*
989 hierarchy.
990]
991[Change block scopes to create new label scope, too.
992Aaron Tomb <aarontomb@gmail.com>**20081202175442
993 
994 This makes local labels work out properly. We should scan a function body
995 for non-local labels and add them all inside the initial function scope,
996 anyway, since labels can jump backward, so this shouldn't cause any
997 problems.
998]
999[Remove typeof from field types.
1000Aaron Tomb <aarontomb@gmail.com>**20081202002921]
1001[Handle initializers on variables with typeof types.
1002Aaron Tomb <aarontomb@gmail.com>**20081202000143]
1003[Export TypeOfExpr, because we can.
1004Aaron Tomb <aarontomb@gmail.com>**20081201233716
1005 
1006 This is useful for debugging, primarily, so we can print typeof types.
1007 Ultimately, it may not be necessary if we get rid of them entirely.
1008]
1009[Initial import of type checker.
1010Aaron Tomb <aarontomb@gmail.com>**20081201230325
1011 
1012 This patch adds a type checker for expressions and statements. It is
1013 almost certainly incomplete at this point, but passes some tests.
1014]
1015[Add a module of type utility functions
1016Aaron Tomb <aarontomb@gmail.com>**20081201190109
1017 
1018 These are all simple, pure functions for operating on types that are
1019 certainly useful in type checking, but may be useful in other contexts,
1020 as well.
1021]
1022[Add a number of C operator utility functions
1023Aaron Tomb <aarontomb@gmail.com>**20081201185545]
1024[examples/ScanFile: improve guessing of 'interesting declarations'
1025benedikt.huber@gmail.com**20081130115603]
1026[Add sanity check to AST analysis - we should be in file scope afterwards
1027benedikt.huber@gmail.com**20081130115510]
1028[Declare params of prototype in prototype-scope; remove unneccessary enterBlockScope after enterFunctionScope
1029benedikt.huber@gmail.com**20081130113349
1030 
1031 Parameters of prototypes must not be declared in global scope of course.
1032 enterFunctionScope also introduces a local scope, so we don't have to call enterBlockScope afterwards
1033]
1034[Cleanup test/harness, add test for local variable declarations
1035benedikt.huber@gmail.com**20081129171215]
1036[Use Analysis.Debug when tracing in examples/ScanFile
1037benedikt.huber@gmail.com**20081129170804]
1038[Fix scopes for parameters and local variable declarations
1039benedikt.huber@gmail.com**20081129170538
1040 
1041 1) The parameters of a function have to be declared in the scope of the outermost block of the function
1042 2) We have to search for local declarations in all statements (for,while, etc.)
1043 3) handleParamDecl is called in AstAnalysis not tParam
1044]
1045[Improve check for redeclarations
1046benedikt.huber@gmail.com**20081129170341
1047 
1048 We now check if the old identifier has been declared with the same linkage (and if it has linkage).
1049 Appropriate error constructors have been added to SemError.
1050]
1051[Add (Static NoLinkage _) for local declarations with static specifier
1052benedikt.huber@gmail.com**20081129170312]
1053[Add tracing for ParamEvent/LocalEvent to examples/ScanFile
1054benedikt.huber@gmail.com**20081127111248]
1055[First leave function scope, then add function definition
1056benedikt.huber@gmail.com**20081127111207]
1057[Fix/cleanup storage computation for global and local variables
1058benedikt.huber@gmail.com**20081127110518]
1059[Export travErrors
1060Aaron Tomb <aarontomb@gmail.com>**20081126003005]
1061[Builtin return and frame addresses
1062Aaron Tomb <aarontomb@gmail.com>**20081125230201]
1063[Add some more builtins
1064Aaron Tomb <aarontomb@gmail.com>**20081125223538]
1065[Local variables can have external linkage
1066Aaron Tomb <aarontomb@gmail.com>**20081125223500]
1067[Add some GCC builtins
1068Aaron Tomb <aarontomb@gmail.com>**20081124210541
1069 
1070 Start AST traversals with a symbol table pre-populated with common
1071 builtin functions including some math routines and varargs handlers.
1072]
1073[Handle merge conflict related to bug #21
1074Aaron Tomb <aarontomb@gmail.com>**20081122211125]
1075[Add labels to symbol table
1076Aaron Tomb <aarontomb@gmail.com>**20081121232244]
1077[Better (working) code for function-scope symbols
1078Aaron Tomb <aarontomb@gmail.com>**20081121005020
1079 
1080 The patch from 11/18 purported to record local variables in the symbol
1081 table, but it was broken in various ways. Now it should work.
1082]
1083[Resolve merge conflict
1084Aaron Tomb <aarontomb@gmail.com>**20081122210354]
1085[Add local variables to symbol table
1086Aaron Tomb <aarontomb@gmail.com>**20081118212831
1087 
1088 This patch adds local variables to the symbol table, and introduces two
1089 new event types, one for parameter declarations and one for local
1090 variable declarations.
1091]
1092[More informative error message about unbound typedefs
1093Aaron Tomb <aarontomb@gmail.com>**20081120224556]
1094[Add DefTable pretty-printing to L.C.A.Debug
1095Aaron Tomb <aarontomb@gmail.com>**20081119223851]
1096[Fix cabal file for compilation with GHC 6.10.1
1097Aaron Tomb <aarontomb@gmail.com>**20081117214250
1098 
1099 This should be backward-compatible. It just adds an upper bound to the
1100 version of base required, and 6.10.1 comes with base3.
1101]
1102[Pretty-print abstract parameter declarations.
1103Aaron Tomb <aarontomb@gmail.com>**20081117214157]
1104[Handle typedefs in mergeTypeAttributes
1105Aaron Tomb <aarontomb@gmail.com>**20081117214036]
1106[test/harness: regression test for bug #21, bug #22
1107benedikt.huber@gmail.com**20081122122124]
1108[Update AUTHORS
1109benedikt.huber@gmail.com**20081122121858]
1110[Fix bug #22: Set file permission after copying input
1111kcharter@gmail.com**20081122121617]
1112[Updated SourceView
1113benedikt.huber@gmail.com**20081120103351]
1114[Fix bug in lexer: recursive lexToken
1115benedikt.huber@gmail.com**20081120103318]
1116[Fix bug #21: typedef can have more than one declarator
1117benedikt.huber@gmail.com**20081120100715]
1118[Improvments to examples/sourceview
1119benedikt.huber@gmail.com**20081005210053
1120 
1121 The sourceview example can now be used for debugging large ASTs as well.
1122 It isn't finished yet, though.
1123]
1124[Fixing bugs in recording the location of AST nodes
1125benedikt.huber@gmail.com**20081005205846
1126 
1127 For computing the last token of an AST node, we safed
1128 the previous token and the one before that. Recursively
1129 invoking lexToken (line pragmas) has to take this into account.
1130 Additionally, fixed some wrong withNodeInfo calls in the Parser.
1131]
1132[examples/sourceview: A (preprocessed) C soure code / AST browser
1133benedikt.huber@gmail.com**20081001154619]
1134[[EXPERIMENTAL] Source code annotations: add absolute offset to Position and last token position and length to NodeInfo
1135benedikt.huber@gmail.com**20081001153016
1136 
1137 We safe the absolute offset (in the preprocessed file) in Data.Position and the position and length of the last token of each AST node in Data.NodeInfo.This allows source code annotations of preprocessed code, and should allow interaction with custom preprocessors.
1138]
1139[test-suite/bugs: empty.c (an empty file, caused troubles with positional information)
1140benedikt.huber@gmail.com**20081001124618]
1141[examples: Use initPos and undefNode
1142benedikt.huber@gmail.com**20081001102105]
1143[Use initPos instead of the explicit Position data constructor (test/src)
1144benedikt.huber@gmail.com**20081001101255]
1145[add 'parseCFilePre' to Language.C
1146benedikt.huber@gmail.com**20080930160311]
1147[bin/cc-wrapper: Surround shell argument with double quotes
1148benedikt.huber@gmail.com**20080919141649]
1149[Bump version number (so it is different from the one released on hackage)
1150benedikt.huber@gmail.com**20080917091947]
1151[adjustPos (change to line of another file) should set column offset to one (fixes bug #18)
1152benedikt.huber@gmail.com**20080917091753]
1153[TAG 0.3.1
1154benedikt.huber@gmail.com**20080821123218]
1155[Update ChangeLog for 0.3.1
1156benedikt.huber@gmail.com**20080821123017]
1157[add aliases for exposed parsers, in order to document them
1158benedikt.huber@gmail.com**20080821122747]
1159[language-c.cabal: change category to Language (this was done before uploading to hackage)
1160benedikt.huber@gmail.com**20080815175326]
1161[ChangeLog: strip the ChangeLog, focus on changes of interest to the library user
1162benedikt.huber@gmail.com**20080815173325]
1163[Remove NameMap from Data.Name; this should be done right (e.g. in its own module, same API as containers:Data.IntMap), or not at all.
1164benedikt.huber@gmail.com**20080815170144]
1165[CTest: use the exposed parsers expressionP, statementP etc. for parsing single expressions, statements etc.
1166benedikt.huber@gmail.com**20080815143708]
1167[Parser public API: expose parsers and Parser Monad
1168benedikt.huber@gmail.com**20080815143455
1169 
1170 Exposing additional parsers seems useful to me (Bug #).
1171 We also have to expose the Parser Monad (a parser is of type 'P ast_ty') and
1172 execParser.
1173]
1174[ParserMonad: Return updated name supply when executing parser
1175benedikt.huber@gmail.com**20080815143416]
1176[Parser: Expose expression, statement, declaration and file parsers
1177benedikt.huber@gmail.com**20080815143344]
1178[Data: Use newNameSupply instead of (namesStartingFrom 0)
1179benedikt.huber@gmail.com**20080815143235]
1180[Add a utility function to create a "blank" set of cpp arguments.
1181iavor.diatchki@gmail.com**20080814151329]
1182[Make that analysis traversal monad abstract.
1183iavor.diatchki@gmail.com**20080814143415]
1184[Export the type synonym "Register" (and bump version)
1185iavor.diatchki@gmail.com**20080814141742]
1186[Fix haddock 'Module' label for Data.InputStream
1187benedikt.huber@gmail.com**20080813100057]
1188[Add description field to .cabal
1189benedikt.huber@gmail.com**20080813094554]
1190[Mirror wiki docs in repo
1191benedikt.huber@gmail.com**20080813092639]
1192[add Data.Position: internalIdentAt
1193benedikt.huber@gmail.com**20080813092554
1194 
1195 I've just ported c2hs to use language.c, and this turned out to be useful.
1196]
1197[Add iavor to AUTHORS
1198benedikt.huber@gmail.com**20080813092540]
1199[Fix haddock: stability, portability and maintainer field
1200benedikt.huber@gmail.com**20080813092415]
1201[Shorter synopsis
1202benedikt.huber@gmail.com**20080812165622]
1203[TAG 0.3
1204benedikt.huber@gmail.com**20080812163405]
1205[language-c.cabal: 0.2.9 -> 0.3
1206benedikt.huber@gmail.com**20080812161831]
1207[Trim regression test to smoke and bugs only (gcc.dg takes 15 mins)
1208benedikt.huber@gmail.com**20080812161427]
1209[make bugs/gnu_complex.c compile with gcc
1210benedikt.huber@gmail.com**20080812160738]
1211[remove typedef_non_compile (ok if the parser accepts it)
1212benedikt.huber@gmail.com**20080812160218]
1213[make bugs/pp_assign_prec.c a valid C source
1214benedikt.huber@gmail.com**20080812160153]
1215[add smoke/test1.c
1216benedikt.huber@gmail.com**20080812155728]
1217[Add run-bugs.sh
1218benedikt.huber@gmail.com**20080812155449]
1219[Fix arg handling in ScanFile
1220benedikt.huber@gmail.com**20080812155305]
1221[Fix examples. (though ComputeSize produces warnings on gtk)
1222benedikt.huber@gmail.com**20080812151727]
1223[Fix lexer bug (does not distinguish 0 and 00) by case distinction in Constants.hs
1224benedikt.huber@gmail.com**20080812145852]
1225[Add export for EnumType
1226benedikt.huber@gmail.com**20080812145839]
1227[Fix struct definition
1228benedikt.huber@gmail.com**20080812145806]
1229[Add status docs to Analysis.hs
1230benedikt.huber@gmail.com**20080812145727]
1231[Documentation Cleanup: System
1232benedikt.huber@gmail.com**20080812123152]
1233[Documentation cleanup: C.hs
1234benedikt.huber@gmail.com**20080812123102]
1235[simpleCppArgs -> rawCppArgs (Language.C.System)
1236benedikt.huber@gmail.com**20080812123030]
1237[Move C.InputStream -> C.Data.InputStream
1238benedikt.huber@gmail.com**20080812122853]
1239[Fix bug #6
1240benedikt.huber@gmail.com**20080812121117]
1241[examples/ScanFile: better handling of file name extensions
1242benedikt.huber@gmail.com**20080812111447]
1243[Language.C.parseFile -> Language.C.parseCFile
1244benedikt.huber@gmail.com**20080812111414]
1245[Analysis.Export: export declr attributes, -Wall clean
1246benedikt.huber@gmail.com**20080812090858]
1247[Semantic Analysis: tag fwd decl, param decl improvements
1248benedikt.huber@gmail.com**20080812090701
1249 
1250 * Record tag forward declarations, as they might change the semantics.
1251 * Distinguish abstract and named parameter declarations in SemRep
1252 * Check for duplicate names in parameter declaration
1253]
1254[Bump version: 2.8 -> 2.9
1255benedikt.huber@gmail.com**20080811162415]
1256[Cleanup of analysis: Better handling of function prototypes
1257benedikt.huber@gmail.com**20080811162332]
1258[Remove c2hs test from the main repo, as it isn't finished yet.
1259benedikt.huber@gmail.com**20080811162104]
1260[Some regression tests
1261benedikt.huber@gmail.com**20080811161859]
1262[Note test/harness in README
1263benedikt.huber@gmail.com**20080811161827]
1264[Semantic analysis regression tests based on diff
1265benedikt.huber@gmail.com**20080811160622]
1266[Fix storage computation for function definitions
1267benedikt.huber@gmail.com**20080811153409]
1268[Fix examples (-> 0.2.9)
1269benedikt.huber@gmail.com**20080811150604]
1270[Remove trailing whitespaces
1271benedikt.huber@gmail.com**20080811150456]
1272[Data.Position: CamelCase isNoPos
1273benedikt.huber@gmail.com**20080811150432]
1274[Semantic Analysis: Enumerator datatype, better representations of storage, small bug fixes
1275benedikt.huber@gmail.com**20080811150131
1276 
1277 Couple of improvments for the analysis modules:
1278 Enumerators are now represented using an Enumerator datatype.
1279 Improved splitIdentDecls.
1280 Improved representation of Storage.
1281 Bug fixes in DeclAnalysis and Export.
1282 Debug now uses Export for types.
1283]
1284[Docs: A function without storage specifier is the same as a function with storage specifier extern (C99 6.2.2 / 5)
1285benedikt.huber@gmail.com**20080811145111]
1286[examples: remove QuickTest (integrated into ScanFile). Update ScanFile
1287benedikt.huber@gmail.com**20080811134256]
1288[Doc cleanup: Pretty
1289benedikt.huber@gmail.com**20080811114927]
1290[Doc cleanup: Parser
1291benedikt.huber@gmail.com**20080811114917]
1292[Syntax: Doc cleanup
1293benedikt.huber@gmail.com**20080811113647]
1294[Doc: InputStream.hs
1295benedikt.huber@gmail.com**20080811112933]
1296[Code/Doc cleanup: Data.{Error,Name,Node,Position}
1297benedikt.huber@gmail.com**20080811112417]
1298[Doc Cleanup: Analysis.hs
1299benedikt.huber@gmail.com**20080811111349]
1300[Add type signatures, documentation cleanup: TravMonad
1301benedikt.huber@gmail.com**20080811111251]
1302[Remove useless translations of Expr and CStringLit (Analysis)
1303benedikt.huber@gmail.com**20080811111047]
1304[Doc and Code cleanup: Data.hs, Data.Ident.hs
1305benedikt.huber@gmail.com**20080811110950]
1306[Syntax: removed redundant NodeInfo from CConst, camel-case constant constructors
1307benedikt.huber@gmail.com**20080811110859]
1308[SemRep improvements (Enumerator DT, Declaration, splitIdentDecls)
1309benedikt.huber@gmail.com**20080810163558
1310 
1311 More consistent handling of definitions and declarations. Everthing Declaration-a like now is instance of Declaration,
1312 providing getVarDecl.
1313 Added an Enumerator datatype; enumerators now have to have a value (expression) assigned.
1314 splitIdentDecls is more consistent now - it returns a map of ALL declarations, and seperate maps for enumerator, object and function definitions.
1315 Documentation cleanup.
1316]
1317[Better module documentation (SemRep)
1318benedikt.huber@gmail.com**20080810163501]
1319[Remove dependecy on MTL (builds but untested)
1320iavor.diatchki@gmail.com**20080809221942]
1321[Add blank lines at the end of files to avoid warnings.
1322iavor.diatchki@gmail.com**20080809214645]
1323[Update README and wiki docs
1324benedikt.huber@gmail.com**20080807105520]
1325[Fix import in test/src/CTest
1326benedikt.huber@gmail.com**20080807100351]
1327[Haddock fixes
1328benedikt.huber@gmail.com**20080807095958]
1329[Bump version number
1330benedikt.huber@gmail.com**20080807095004]
1331[Examples: 2.7 -> 2.8
1332benedikt.huber@gmail.com**20080807094850]
1333[Clean up: typedef is now always named TypeDef in haskell (reverting parts of a previous change)
1334benedikt.huber@gmail.com**20080807094334]
1335[Rename {Comp,Enum}TypeDecl to {Comp,Enum}TypeRef
1336benedikt.huber@gmail.com**20080807092635]
1337[rename Analysis/Pretty to Analysis/Debug
1338benedikt.huber@gmail.com**20080807092403]
1339[Export list and documentation for SemRep
1340benedikt.huber@gmail.com**20080807092215]
1341[Remove trailing whitespace (in src)
1342benedikt.huber@gmail.com**20080807091042]
1343[Refactoring of SemRep/DefTable
1344benedikt.huber@gmail.com**20080807074323
1345 
1346 We've split typedefs and other `ordinary' identifiers in the Definition Table (using Either),
1347 so typedefs are removed from IdentDecl, which now comprises functions,objects and enumerators only.
1348 In return, the global declaration table now only has one Map for functions, objects and enumerators
1349 (IdentDecls), which makes more sense, as all of them e.g. are valid expressions.
1350]
1351[Remove __attribute__ field from DirectType
1352benedikt.huber@gmail.com**20080807073834]
1353[Instead of using a `complex' qualifier for floating types, use a Complex type own its own
1354benedikt.huber@gmail.com**20080807073519]
1355[replace storage by declStorage
1356benedikt.huber@gmail.com**20080807072547]
1357[Attach attributes preceeding declarators to the corresponding declaration (not the declaration's type)
1358benedikt.huber@gmail.com**20080807072231]
1359[Analysis/typedefs: Consistently do not captialize the d, add export for typedefs, add event for typedefs
1360benedikt.huber@gmail.com**20080806225335]
1361[add Pos and CNode instances for NodeInfo
1362benedikt.huber@gmail.com**20080806225309]
1363[Add isAnonymousType to Data.Ident
1364benedikt.huber@gmail.com**20080806225218]
1365[Add mkErrorInfo to Data.Error
1366benedikt.huber@gmail.com**20080806225136]
1367[Add Show instance for operators, and use it in the pretty printer
1368benedikt.huber@gmail.com**20080806225039]
1369[Fix a precedence in the pretty printer
1370benedikt.huber@gmail.com**20080806225001]
1371[Add getCCharAsInt to Syntax.Constants
1372benedikt.huber@gmail.com**20080806224929]
1373[when partioning declaration specifiers, partition attributes in to a group of their own, as they (usually) do not belong to the type of the declared object, but to the declared object itself.
1374benedikt.huber@gmail.com**20080806224650]
1375[Renaming in SemRep (inconsistent choices): type: CompTag -> CompTyKind; ctors -> CompTag -> CompDef; EnumTag -> EnumDef
1376benedikt.huber@gmail.com**20080801110511]
1377[Add newlines at the end of files to remove warnings
1378iavor.diatchki@gmail.com**20080806133505]
1379[Renme Gcc.hs to GCC.hs to compile on case sensitive systems.
1380iavor.diatchki@gmail.com**20080806132320]
1381[Use sh to invoke the compile_log.sh script (test harness)
1382benedikt.huber@gmail.com**20080731151449]
1383[test harness Makefile
1384benedikt.huber@gmail.com**20080731151202]
1385[New examples (not completed)
1386benedikt.huber@gmail.com**20080731150714]
1387[small fix to pass regression test
1388benedikt.huber@gmail.com**20080731125834]
1389[rename mkUndefNodeInfo -> internalNode
1390benedikt.huber@gmail.com**20080731125601]
1391[Improvements to SemRep, Export, TravMonad
1392benedikt.huber@gmail.com**20080731125529]
1393[Updated examples
1394benedikt.huber@gmail.com**20080729131246]
1395[Add a new test script (compile_log.sh)
1396benedikt.huber@gmail.com**20080729131147]
1397[Add directory `harness' for manually crafted regression tests
1398benedikt.huber@gmail.com**20080729131103]
1399[Add compile test to Roundtrip, new features for simple test (CTest.hs)
1400benedikt.huber@gmail.com**20080729130936]
1401[Add a 'compile test' to the test suite
1402benedikt.huber@gmail.com**20080729130910]
1403[Take new CArraySize type into account (Analysis)
1404benedikt.huber@gmail.com**20080729130838]
1405[Various fixes to parser,AST and pretty (__attribute__ annotations, array size)
1406benedikt.huber@gmail.com**20080729130751]
1407[Remove trailing whitespaces in the parser (I should have checked that earlier I'm afraid)
1408benedikt.huber@gmail.com**20080724180131]
1409[More fixes for __attribute__s in the Parser
1410benedikt.huber@gmail.com**20080724180048]
1411[More tests for tricky __attribute__ annotations
1412benedikt.huber@gmail.com**20080724143931]
1413[Fix recording of attributes for struct members
1414benedikt.huber@gmail.com**20080724133155]
1415[Move partitionDeclSpecs to Syntaax
1416benedikt.huber@gmail.com**20080724124707]
1417[Fix handling of attributes following closing sue def braces, fixing #12
1418benedikt.huber@gmail.com**20080724110319]
1419[Some more attribute tests
1420benedikt.huber@gmail.com**20080724110152]
1421[Test for ticket #12: attributes directly following the closing brace of a sue definition belong to that definition
1422benedikt.huber@gmail.com**20080724110004
1423 
1424 This is also the first bug I found in CIL :)
1425]
1426[Add a performance regression test (bugs/concat.c)
1427benedikt.huber@gmail.com**20080724105927]
1428[Add a heuristic such that the preprocessor doesn't fail on already preprocessed files
1429benedikt.huber@gmail.com**20080724092324]
1430[Allow $ in identifier names
1431benedikt.huber@gmail.com**20080724092250]
1432[Remove spuriuos warning when declaration is entered twice
1433benedikt.huber@gmail.com**20080724010458]
1434[Add script for regression test
1435benedikt.huber@gmail.com**20080723224616]
1436[Fix show (CThread _), spotted by regression tests
1437benedikt.huber@gmail.com**20080723223811]
1438[Fix .cabal (forgot to export a few modules)
1439benedikt.huber@gmail.com**20080723220609]
1440[Updates to the ComputeSize example
1441benedikt.huber@gmail.com**20080723220517]
1442[Analysis: Cleanup of TravMonad, Better error messages
1443benedikt.huber@gmail.com**20080723213541]
1444[Type Errors for semantic analysis
1445benedikt.huber@gmail.com**20080723213339]
1446[Language.C.hs, top level facades: change exports to reflect the new Data directory
1447benedikt.huber@gmail.com**20080723185448]
1448[C.Analysis: use the new error types
1449benedikt.huber@gmail.com**20080723185429]
1450[Improvements for Data.Error
1451benedikt.huber@gmail.com**20080723185256]
1452[Fix imports in Parser and AST
1453benedikt.huber@gmail.com**20080723185148]
1454[Add Language.C.Data.hs
1455benedikt.huber@gmail.com**20080723171427]
1456[Script for moving around modules painlessly using darcs and rpl
1457benedikt.huber@gmail.com**20080723170528]
1458[Syntax.Position -> Data.Position
1459benedikt.huber@gmail.com**20080723154326]
1460[Syntax.Node -> Data.Node (because it is used both in Syntax and Analysis)
1461benedikt.huber@gmail.com**20080723153959]
1462[Syntax.RList -> Data.RList
1463benedikt.huber@gmail.com**20080723151825]
1464[Synatx.Name -> Data.Name
1465benedikt.huber@gmail.com**20080723151719]
1466[Move Syntax.Ident -> Data.Ident (following c2hs)
1467benedikt.huber@gmail.com**20080723151410]
1468[New general Error types, for use in all modules
1469benedikt.huber@gmail.com**20080723144922
1470 
1471 As we want to have typed errors, and error handling should be available everywhere,
1472 I've added a stub for a extensinsble extension mechanism following Simon Marlow's paper,
1473 and put it in Data (the new 'Common' : Looking at the source code of c2hs, I think we should
1474 follow the naming Duncan chose and put the common modules to Data.
1475]
1476[export builtinPos and internalPos
1477benedikt.huber@gmail.com**20080723144858]
1478[Regression Test failure: Fix haddock
1479benedikt.huber@gmail.com**20080722234726]
1480[language-c.cabal: 2.6 -> 2.7, add alpha stability Analysis.Export and Analysis.Pretty
1481benedikt.huber@gmail.com**20080722234059]
1482[Add ComputeSize example (little hackish, but quite complex)
1483benedikt.huber@gmail.com**20080722233858]
1484[Cleanup of ScanFile.hs example
1485benedikt.huber@gmail.com**20080722233744]
1486[Initial stub for exporting SemRep to AST
1487benedikt.huber@gmail.com**20080722233720]
1488[Cleanup SemRep, move nodeFile (sounds strange) -> fileOfNode, similar for nodePos, nodeName (for consistency)
1489benedikt.huber@gmail.com**20080722233550]
1490[SemRep Pretty Printer improvements
1491benedikt.huber@gmail.com**20080722233520]
1492[Small fixes in the analysis
1493benedikt.huber@gmail.com**20080722233425]
1494[Fix pretty printing bug (function declarator attributes)
1495benedikt.huber@gmail.com**20080722161616]
1496[Improve public API for syntax, documentation fixes
1497benedikt.huber@gmail.com**20080722152529]
1498[Fix documentation and haddock errors
1499benedikt.huber@gmail.com**20080722151238]
1500[examples (ScanFile.hs,example.c)
1501benedikt.huber@gmail.com**20080722143916]
1502[Add declaration analysis to cabal file
1503benedikt.huber@gmail.com**20080722143830]
1504[Add Semantic analysis to CTest
1505benedikt.huber@gmail.com**20080722143759]
1506[Add declaration analysis
1507benedikt.huber@gmail.com**20080722143708]
1508[Analyzing declarations (initial import)
1509benedikt.huber@gmail.com**20080722143616]
1510[Fixed bug in parser discarding attribute annotations
1511benedikt.huber@gmail.com**20080722143509]
1512[some additional documentation
1513benedikt.huber@gmail.com**20080722115936]
1514[Propagate changes in Analysis.Error and System to test framework
1515benedikt.huber@gmail.com**20080722115258]
1516[C.System: Create a class for preprocessors, improved option handling, simple parseFile wrapper
1517benedikt.huber@gmail.com**20080722112739]
1518[Improving names in DefTable (use Ident for ordinary identifiers, instead of object)
1519benedikt.huber@gmail.com**20080722112651]
1520[Moving the Error module to Analysis, adding ParseError (preparing for typed analysis errors)
1521benedikt.huber@gmail.com**20080722112451]
1522[Fix haddock error
1523benedikt.huber@gmail.com**20080722011145]
1524[Language.C.Analysis.hs: SymbolTable -> DefTable
1525benedikt.huber@gmail.com**20080722004858]
1526[Add fileOfNode function to Node
1527benedikt.huber@gmail.com**20080722004450]
1528[Propagate renamings to NodeDerive.hs and derive.sh
1529benedikt.huber@gmail.com**20080722004328]
1530[Small additions to the Analysis framework modules
1531benedikt.huber@gmail.com**20080722004240]
1532[Fix Parser and Language.C imports
1533benedikt.huber@gmail.com**20080722004042]
1534[Test framework: Strip and change language.c import statements
1535benedikt.huber@gmail.com**20080721222743]
1536[Test drivers: Common.Position -> Syntax.Position
1537benedikt.huber@gmail.com**20080721222606]
1538[Cleanup AUTHORS file, add dons
1539benedikt.huber@gmail.com**20080721221128]
1540[0.2.5 -> 0.2.6
1541benedikt.huber@gmail.com**20080721220522]
1542[Language.C facade: stripped public API
1543benedikt.huber@gmail.com**20080721215722]
1544[Parser.Pretty -> Pretty
1545benedikt.huber@gmail.com**20080721215637]
1546[Parser.InputStream -> InputStream
1547benedikt.huber@gmail.com**20080721215541]
1548[Refactoring: Common+AST -> Syntax (public API)
1549benedikt.huber@gmail.com**20080721215450]
1550[Analysis Framework: Rewrite of TravMonad, next iteration of SemRep
1551benedikt.huber@gmail.com**20080721215313]
1552[SymbolTable -> DefTable (old name, seems better)
1553benedikt.huber@gmail.com**20080721215244]
1554[Refactoring: Common+AST -> Syntax (in Parser)
1555benedikt.huber@gmail.com**20080721215214]
1556[Refactoring: Common+AST -> Syntax
1557benedikt.huber@gmail.com**20080721215133]
1558[add Show instance for SUERef
1559benedikt.huber@gmail.com**20080721194739]
1560[Add Language.C.System to cabal file
1561benedikt.huber@gmail.com**20080721103447]
1562[Add Show instance for CStorageSpec
1563benedikt.huber@gmail.com**20080721102741]
1564[Add nodeName function and RList type alias to Common
1565benedikt.huber@gmail.com**20080721102707]
1566[Rename SueRef to SUERef (reference to a struct,union,enum)
1567benedikt.huber@gmail.com**20080721102632]
1568[Rename: Common.Error: Level.Warning -> Level.Warn
1569benedikt.huber@gmail.com**20080721102522]
1570[Add wrappers for preprocessing
1571benedikt.huber@gmail.com**20080721102408]
1572[Update Makefile for test suite
1573benedikt.huber@gmail.com**20080716182624]
1574[language-c.cabal: Next version
1575benedikt.huber@gmail.com**20080716182557]
1576[test drivers: module renamings for 0.3
1577benedikt.huber@gmail.com**20080716181453]
1578[test-framework: module renaming
1579benedikt.huber@gmail.com**20080716181145]
1580[Change Data.Derive script
1581benedikt.huber@gmail.com**20080716180704]
1582[rm Language.C.AST, add Language.C.Analysis
1583benedikt.huber@gmail.com**20080716180627]
1584[Add Draft for Semantic Representation
1585benedikt.huber@gmail.com**20080716180452]
1586[Add SymbolTable, TravMonad
1587benedikt.huber@gmail.com**20080716180427]
1588[remove Standalong deriving Data,Typeable (not properly supported by ghc 6.8.3)
1589benedikt.huber@gmail.com**20080716180259]
1590[Common.NameSpaceMap -> Analysis.NameSpaceMap
1591benedikt.huber@gmail.com**20080716180222]
1592[C/Parser: Doc cleanup, factor Reversed lists out to common
1593benedikt.huber@gmail.com**20080716180024]
1594[C/Common: Doc cleanup, isWarning, isHardError
1595benedikt.huber@gmail.com**20080716175835]
1596[C.Parser: 0.3 refactoring changes
1597benedikt.huber@gmail.com**20080711105635]
1598[give type signature to skipTokens, in order to avoid 'defaulting to Integer'
1599benedikt.huber@gmail.com**20080709154150]
1600[AST.Constants -> Common.Constants
1601benedikt.huber@gmail.com**20080709153052]
1602[Factor out C operators
1603benedikt.huber@gmail.com**20080709152926]
1604[Language.C.Common : cleanup
1605benedikt.huber@gmail.com**20080709152915]
1606[Language.C.Common.Ident : cleanup
1607benedikt.huber@gmail.com**20080709122846]
1608[Language.C.Toolkit.Error : Cleanup
1609benedikt.huber@gmail.com**20080709122703]
1610[Language.C.Common.Position: cleanup
1611benedikt.huber@gmail.com**20080709122633]
1612[Toolkit -> Common
1613benedikt.huber@gmail.com**20080709122448]
1614[Rename Attributes -> Node, in order to avoid confusion with C __attribute__ annotations
1615benedikt.huber@gmail.com**20080703200405]
1616[Rename Attrs providing SrcLoc and Unique Name to NodeInfo, as Attrs collides with C's __attribute__ annotations
1617benedikt.huber@gmail.com**20080703194141]
1618[Script for standalone deriving Data,Typeable using Data.Derive
1619benedikt.huber@gmail.com**20080703194024
1620 
1621 I've added this due to a bug in GHC.
1622 At least until June 08 versions, you need a patch for Data.Derive:
1623 http://code.google.com/p/ndmitchell/issues/detail?id=14
1624]
1625[add Language.C.AST
1626benedikt.huber@gmail.com**20080702153239]
1627[fix RenderTests (new location of res/)
1628benedikt.huber@gmail.com**20080701183238]
1629[Move html resources down to test dir
1630benedikt.huber@gmail.com**20080701161433]
1631[Add support for different InputStreams (String, ByteString)
1632benedikt.huber@gmail.com**20080701161237]
1633[CHeader -> CTranslUnit
1634benedikt.huber@gmail.com**20080701145343]
1635[Test suite: fix typo, make removing files faster using xargs
1636benedikt.huber@gmail.com**20080701145249]
1637[Fixed .cabal file
1638benedikt.huber@gmail.com**20080701145215]
1639[Small Haddock bugfix for Language.C.hs
1640benedikt.huber@gmail.com**20080701144008]
1641[New AST representation of Declarators (Parser)
1642benedikt.huber@gmail.com**20080701143921]
1643[New representation of Declarators. Generics switched to Offline-Deriving
1644benedikt.huber@gmail.com**20080701143806]
1645[Toolkit facade
1646benedikt.huber@gmail.com**20080701143745]
1647[AST documentation fixes
1648benedikt.huber@gmail.com**20080630140608]
1649[Rename CHeader -> CTranslUnit, wrap enum list in Maybe
1650benedikt.huber@gmail.com**20080630131819]
1651[Adapt .cabal to module renamings
1652benedikt.huber@gmail.com**20080630102818]
1653[Fix definitions of attribute-based equality
1654benedikt.huber@gmail.com**20080630092837]
1655[remove Language.C.AST.Attrs - this will be merged into Langauage.C.Analysis.DefTable
1656benedikt.huber@gmail.com**20080630091315]
1657[Language.C.AST: Haddock 0.8 fixes
1658benedikt.huber@gmail.com**20080630091248]
1659[Add Summary datatypes (CObj, CTag, ...) to AST
1660benedikt.huber@gmail.com**20080630091107]
1661[rename 'range' to 'scope' in NameSpaceMap
1662benedikt.huber@gmail.com**20080630090729]
1663[Remove most functionality from Language.C.Toolkit.Attributes (AttrTable isnt used anymore)
1664benedikt.huber@gmail.com**20080630090642]
1665[move ParserMonad into Language.C.Parser
1666benedikt.huber@gmail.com**20080630090543]
1667[UNames -> Names, removed NameSupply stuff
1668benedikt.huber@gmail.com**20080630090456]
1669[Add switch for surpressing gcc invocation in cc-wrapper
1670benedikt.huber@gmail.com**20080630085108]
1671[Parser+AST: Incorporate Toolkit changes
1672benedikt.huber@gmail.com**20080627103222]
1673[ParserMonad, Idents: Rename UNames, -Wall clean
1674benedikt.huber@gmail.com**20080627101843]
1675[NameSpaces -> NameSpaceMap, fix and haddockify documentation, make -Wall clean
1676benedikt.huber@gmail.com**20080627095907]
1677[Test stuff reorg: split lib and executables
1678benedikt.huber@gmail.com**20080620094042]
1679[Derive Typeable and Data, if possible
1680benedikt.huber@gmail.com**20080618185323]
1681[Another Makefile patch
1682benedikt.huber@gmail.com**20080618175117]
1683[Better support for constants
1684benedikt.huber@gmail.com**20080618183006
1685   
1686   We now have datatypes on their own for C characters, strings, integers and floats.
1687   Code has ben moved to Language.C.AST.Constants.
1688   We save type flags of constants now (e.g. `long' in 5L).
1689   Performance seems to stay roughly the same.
1690]
1691[run dg tests selectively
1692benedikt.huber@gmail.com**20080618180939]
1693[Make cc-wrapper more flexible
1694benedikt.huber@gmail.com**20080618175138]
1695[rename cstrConst to liftStrLit, more consistent `external declaration'
1696benedikt.huber@gmail.com**20080618174510]
1697[Remove old debug stmts confusing haddock
1698benedikt.huber@gmail.com**20080617135253]
1699[AST Documentation
1700benedikt.huber@gmail.com**20080617134602
1701 
1702 Haddock-compatible documentation for the AST. Not yet complete, but should be helpful.
1703]
1704[bump version number (0.2)
1705benedikt.huber@gmail.com**20080616091037]
1706[Changelog update (0.2)
1707benedikt.huber@gmail.com**20080616091017]
1708[Record and pretty print local label declarations
1709benedikt.huber@gmail.com**20080616083023]
1710[Update test suites
1711benedikt.huber@gmail.com**20080616074302]
1712[Test Suite: Parse cmd-line-expr/decl for CTest, minor fixes
1713benedikt.huber@gmail.com**20080616074027]
1714[Support for GNU __complex__ extension
1715benedikt.huber@gmail.com**20080616073930]
1716[Parser: doc update
1717benedikt.huber@gmail.com**20080616073859]
1718[AST and pretty printer support for __attribute__
1719benedikt.huber@gmail.com**20080616073355]
1720[empty_struct AST design bug
1721benedikt.huber@gmail.com**20080614070017]
1722[Examples for the __attribute__ extension
1723benedikt.huber@gmail.com**20080613155449]
1724[gcc.dg bug documentation
1725benedikt.huber@gmail.com**20080613155417]
1726[pretty printer (- - x) bug
1727benedikt.huber@gmail.com**20080612170841]
1728[bug docu (align_of, offset_of, typedef, attribute)
1729benedikt.huber@gmail.com**20080612080347]
1730[cabal license field
1731benedikt.huber@gmail.com**20080611165421]
1732[AST and PP support for special form GNU builtin functions.
1733benedikt.huber@gmail.com**20080611163456]
1734[offsetof parser bug
1735benedikt.huber@gmail.com**20080611160524]
1736[More pretty-printer bug documentation
1737benedikt.huber@gmail.com**20080611123912]
1738[Fix Compound-expression pretty printing
1739benedikt.huber@gmail.com**20080611122240]
1740[Parser Doc
1741benedikt.huber@gmail.com**20080611073434]
1742[Improve Old-Style function declarations
1743benedikt.huber@gmail.com**20080611071524]
1744[Adding support for assembler statements
1745benedikt.huber@gmail.com**20080611071408]
1746[Tabs to spaces
1747benedikt.huber@gmail.com**20080610074954]
1748[License switched to 3-clause BSD
1749benedikt.huber@gmail.com**20080609211246
1750 
1751 In accordance with the original authors, Language.C is now licensed as BSD-3.
1752 See:
1753 http://haskell.org/pipermail/c2hs/2008-June/000833.html
1754 http://haskell.org/pipermail/c2hs/2008-June/000834.html
1755 http://haskell.org/pipermail/c2hs/2008-June/000835.html
1756]
1757[Test Framework: More test drivers.
1758benedikt.huber@gmail.com**20080609162629]
1759[Test framework: Parse and Equiv test executables
1760benedikt.huber@gmail.com**20080609161306]
1761[Test Framework: TestMonad, Docs, Cleanup
1762benedikt.huber@gmail.com**20080609161146]
1763[Documenting pretty printer bugs
1764benedikt.huber@gmail.com**20080609154809]
1765[Pretty Printer fixes
1766benedikt.huber@gmail.com**20080609154353
1767 
1768 Fixes some of the pretty printer bugs:
1769 
1770 bugs/pp_assign_prec.c
1771 bugs/qualifier_pretty.c
1772 bugs/empty_enum.c
1773 bugs/builtin_typedefs.c
1774]
1775[Improved test scripts.
1776benedikt.huber@gmail.com**20080608093339]
1777[Remove autogenerated alex and happy source files
1778benedikt.huber@gmail.com**20080608091341]
1779[Lexer: Cleanup, Doc, hexadecimal floating point constants, fixed bug float_non_compile.c, better error messages.
1780benedikt.huber@gmail.com**20080608090029
1781 
1782 The lexer now supports hexadecimal floating point constants (C99), and produces better error messages when faced with
1783 unsupported features or some common, hard to track errors.
1784]
1785[Correct pretty printing of chars and strings. Fix elseif bug.
1786benedikt.huber@gmail.com**20080608085208]
1787[Test suite: documenting lexer bugs
1788benedikt.huber@gmail.com**20080606161846
1789 
1790 The bugs testsuite documents bugs found in the parser, lexer and pretty printer (but not unsupported features, such as
1791 universal character names).
1792]
1793[Fix constant export bugs in pretty printer. Delayed asm and builtin errors to have more meaningfull test results.
1794benedikt.huber@gmail.com**20080606152329]
1795[Stylesheet for rendering test results.
1796benedikt.huber@gmail.com**20080606113947
1797 
1798 The stylesheet has support for tablesorter, a JQuery plugin which is also used for displaying the result tables.
1799 The color of result cells is no determined using css classes, instead of the bgcolor attribute.
1800]
1801[Test suite: Improved error reports and rendering.
1802benedikt.huber@gmail.com**20080606113833]
1803[Testsuite: Makefile and script fixes
1804benedikt.huber@gmail.com**20080606113757]
1805[Some docs and fixes to ensure others can use the test suite
1806benedikt.huber@gmail.com**20080605142629]
1807[directory for test results
1808benedikt.huber@gmail.com**20080605140605]
1809[simple smoke tests
1810benedikt.huber@gmail.com**20080605140449]
1811[Scripting test runs (config, template)
1812benedikt.huber@gmail.com**20080605140410]
1813[Test framework (scripts) initial import
1814benedikt.huber@gmail.com**20080605135840]
1815[Test framework (haskell), initial import
1816benedikt.huber@gmail.com**20080605135723]
1817[Standalone deriving Data and Typeable
1818benedikt.huber@gmail.com**20080605134635
1819 Note that the Data instance of Attr isn't complete yet.
1820 CAVEAT: Compiling with 6.8.2 sometimes failes, compiling with 6.9 HEAD from end of May always fails,
1821 works fine with the 6.8.3 RC.
1822]
1823[README, AUTHORS
1824benedikt.huber@gmail.com**20080603091618]
1825[Initial Version of the Parser / Pretty printer
1826benedikt.huber@gmail.com**20080603084545]
1827[TAG 0.1
1828benedikt.huber@gmail.com**20080603084536]
1829[Removed unneccessary module dep in CTest
1830benedikt.huber@gmail.com**20080603084318]
1831[Simple Parse-And-Print test
1832benedikt.huber@gmail.com**20080603083955]
1833[Fix .cabal, add alex and happy files
1834benedikt.huber@gmail.com**20080603081845]
1835[Initial Import
1836benedikt.huber@gmail.com**20080602163242]
1837Patch bundle hash:
1838e680413876e797c61f3b239eb9c47600422cf0f0