From sijokine at cs.helsinki.fi Fri Mar 9 08:09:33 2007 From: sijokine at cs.helsinki.fi (Sakari I Jokinen) Date: Fri Mar 9 08:02:29 2007 Subject: [C2hs] Compiling c2hs from darcs Message-ID: After getting c2hs from darcs and trying to compile it with ghc 6.6 I get the following error: [31 of 38] Compiling CParser ( c2hs/c/CParser.hs, dist/build/c2hs/c2hs-tmp/CParser.o ) c2hs/c/CParser.hs:958:45: Couldn't match expected type `CDecl' against inferred type `Either CDecl CStat' Expected type: Reversed [CDecl] Inferred type: Reversed [Either CDecl CStat] In the first argument of `reverse', namely `happy_var_3' In the first argument of `CCompound', namely `(reverse happy_var_3)' Is this a known problem or should the version from darcs work and I am just missing something? Best regards, Sakari From duncan.coutts at worc.ox.ac.uk Fri Mar 9 18:25:40 2007 From: duncan.coutts at worc.ox.ac.uk (Duncan Coutts) Date: Fri Mar 9 18:18:23 2007 Subject: [C2hs] Compiling c2hs from darcs In-Reply-To: References: Message-ID: <1173482740.1018.703.camel@localhost> On Fri, 2007-03-09 at 15:09 +0200, Sakari I Jokinen wrote: > After getting c2hs from darcs and trying to compile it with ghc 6.6 I get > the following error: > > [31 of 38] Compiling CParser ( c2hs/c/CParser.hs, dist/build/c2hs/c2hs-tmp/CParser.o ) > > c2hs/c/CParser.hs:958:45: > Couldn't match expected type `CDecl' > against inferred type `Either CDecl CStat' > Expected type: Reversed [CDecl] > Inferred type: Reversed [Either CDecl CStat] > In the first argument of `reverse', namely `happy_var_3' > In the first argument of `CCompound', namely > `(reverse happy_var_3)' > > > Is this a known problem or should the version from darcs work and I am > just missing something? Ah, that'll be my fault. I'm half way through merging changes to the C parser. Duncan From duncan.coutts at worc.ox.ac.uk Tue Mar 13 21:27:10 2007 From: duncan.coutts at worc.ox.ac.uk (Duncan Coutts) Date: Tue Mar 13 21:27:14 2007 Subject: [C2hs] Re: [Haskell-cafe] c2hs and pthreadtypes.h In-Reply-To: <20070313225648.GC11073@cse.unsw.EDU.AU> References: <20070313225522.GA3538@die.therning.org> <20070313225648.GC11073@cse.unsw.EDU.AU> Message-ID: <1173835630.5018.17.camel@localhost> On Wed, 2007-03-14 at 09:56 +1100, Donald Bruce Stewart wrote: > magnus: > > I'm trying to use c2hs but get stuck when including sys/types.h (though > > the problem really resides in pthreadtypes.h): > > > > % ./Setup.hs build -v > > Preprocessing executables for kowasu-0.1... > > /usr/bin/c2hs -C -D__GLASGOW_HASKELL__=606 -C -Icsrc -o src/Kowasu/PTrace.hs src/Kowasu/PTrace.chs > > c2hs: Error in C header file. > > > > /usr/include/bits/pthreadtypes.h:69: (column 6) [FATAL] > > >>> Syntax error! > > The symbol `;' does not fit here. > > > > The part of pthreadtypes.h where it chokes seems to be > > > > 65 __extension__ union > > 66 { > > 67 int __spins; > > 68 __pthread_slist_t __list; > > 69 }; > > 70 } __data; > > 71 char __size[__SIZEOF_PTHREAD_MUTEX_T]; > > 72 long int __align; > > 73 } pthread_mutex_t; > > > > Any pointers on how to solve this? (Besides manually resolving all > > defined types down to the C builtins.) > > > > /M > > Does it help to use the darcs version of c2hs? I've heard rumours that > it can parse the linux kernel now.. Yes, I do have a C parser that can parse the linux kernel and that of course includes anonymous structs and unions. Currently I'm part way through merging these changes into the darcs version of c2hs. So, Magnus, you can wait 'til I finish merging my changes into c2hs or you can have a go yourself if you're desperate. I posted the full code recently: http://haskell.org/~duncan/c2hs/c2hs-newparser.tar.gz That's just a snapshot of my development tree, so don't expect it to work 'out of the box'. In particular the rest of c2hs doesn't understand the new extensions that the parser can now handle. Duncan From duncan.coutts at worc.ox.ac.uk Thu Mar 15 07:30:44 2007 From: duncan.coutts at worc.ox.ac.uk (Duncan Coutts) Date: Thu Mar 15 07:30:37 2007 Subject: [C2hs] patch applied (c2hs): Make the C2HS.hs source module build with GHC 6.6 Message-ID: <20070315113044.GA7208@cvs.haskell.org> Sat Mar 10 07:25:09 PST 2007 Duncan Coutts * Make the C2HS.hs source module build with GHC 6.6 withObject has been deprecated for ages. M ./C2HS.hs -4 +4 From duncan.coutts at worc.ox.ac.uk Thu Mar 15 07:30:45 2007 From: duncan.coutts at worc.ox.ac.uk (Duncan Coutts) Date: Thu Mar 15 07:30:38 2007 Subject: [C2hs] patch applied (c2hs): Change the AST for compound statements to reflect C99 Message-ID: <20070315113045.GA7232@cvs.haskell.org> Thu Mar 15 04:23:36 PDT 2007 Duncan Coutts * Change the AST for compound statements to reflect C99 Fixes compile error, the parser was already converted but this AST change was missing. M ./c2hs/c/CAST.hs -4 +4 From duncan.coutts at worc.ox.ac.uk Thu Mar 15 07:30:46 2007 From: duncan.coutts at worc.ox.ac.uk (Duncan Coutts) Date: Thu Mar 15 07:30:40 2007 Subject: [C2hs] patch applied (c2hs): just whitespace / formatting change Message-ID: <20070315113046.GA7246@cvs.haskell.org> Thu Mar 15 04:25:42 PDT 2007 Duncan Coutts * just whitespace / formatting change M ./c2hs/c/CParser.y -4 +8 From duncan.coutts at worc.ox.ac.uk Tue Mar 13 21:27:10 2007 From: duncan.coutts at worc.ox.ac.uk (Duncan Coutts) Date: Fri Mar 16 07:20:15 2007 Subject: [C2hs] Re: [Haskell-cafe] c2hs and pthreadtypes.h In-Reply-To: <1173835630.5018.17.camel@localhost> References: <20070313225522.GA3538@die.therning.org> <20070313225648.GC11073@cse.unsw.EDU.AU> Message-ID: <1173835630.5018.17.camel@localhost> On Wed, 2007-03-14 at 09:56 +1100, Donald Bruce Stewart wrote: > magnus: > > I'm trying to use c2hs but get stuck when including sys/types.h (though > > the problem really resides in pthreadtypes.h): > > > > % ./Setup.hs build -v > > Preprocessing executables for kowasu-0.1... > > /usr/bin/c2hs -C -D__GLASGOW_HASKELL__=606 -C -Icsrc -o src/Kowasu/PTrace.hs src/Kowasu/PTrace.chs > > c2hs: Error in C header file. > > > > /usr/include/bits/pthreadtypes.h:69: (column 6) [FATAL] > > >>> Syntax error! > > The symbol `;' does not fit here. > > > > The part of pthreadtypes.h where it chokes seems to be > > > > 65 __extension__ union > > 66 { > > 67 int __spins; > > 68 __pthread_slist_t __list; > > 69 }; > > 70 } __data; > > 71 char __size[__SIZEOF_PTHREAD_MUTEX_T]; > > 72 long int __align; > > 73 } pthread_mutex_t; > > > > Any pointers on how to solve this? (Besides manually resolving all > > defined types down to the C builtins.) > > > > /M > > Does it help to use the darcs version of c2hs? I've heard rumours that > it can parse the linux kernel now.. Yes, I do have a C parser that can parse the linux kernel and that of course includes anonymous structs and unions. Currently I'm part way through merging these changes into the darcs version of c2hs. So, Magnus, you can wait 'til I finish merging my changes into c2hs or you can have a go yourself if you're desperate. I posted the full code recently: http://haskell.org/~duncan/c2hs/c2hs-newparser.tar.gz That's just a snapshot of my development tree, so don't expect it to work 'out of the box'. In particular the rest of c2hs doesn't understand the new extensions that the parser can now handle. Duncan _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe From duncan.coutts at worc.ox.ac.uk Tue Mar 20 22:07:19 2007 From: duncan.coutts at worc.ox.ac.uk (Duncan Coutts) Date: Tue Mar 20 22:06:56 2007 Subject: [C2hs] patch applied (c2hs): Reorder some non-terminal defs to reflect C99 order better Message-ID: <20070321020719.GA25854@cvs.haskell.org> Tue Mar 20 04:46:36 PDT 2007 Duncan Coutts * Reorder some non-terminal defs to reflect C99 order better and to make merging with the new grammar easier M ./c2hs/c/CParser.y -35 +35 From duncan.coutts at worc.ox.ac.uk Tue Mar 20 22:07:21 2007 From: duncan.coutts at worc.ox.ac.uk (Duncan Coutts) Date: Tue Mar 20 22:06:56 2007 Subject: [C2hs] patch applied (c2hs): move asm external decl production to a better non-terminal Message-ID: <20070321020721.GA25874@cvs.haskell.org> Tue Mar 20 04:49:42 PDT 2007 Duncan Coutts * move asm external decl production to a better non-terminal now a production of external_declaration rather than translation_unit M ./c2hs/c/CParser.y -2 +1 From duncan.coutts at worc.ox.ac.uk Tue Mar 20 22:07:22 2007 From: duncan.coutts at worc.ox.ac.uk (Duncan Coutts) Date: Tue Mar 20 22:06:58 2007 Subject: [C2hs] patch applied (c2hs): Move trailing ' ; ' inside declaration productions Message-ID: <20070321020722.GA25888@cvs.haskell.org> Tue Mar 20 04:55:18 PDT 2007 Duncan Coutts * Move trailing ';' inside declaration productions M ./c2hs/c/CParser.y -6 +6 From duncan.coutts at worc.ox.ac.uk Tue Mar 20 22:07:23 2007 From: duncan.coutts at worc.ox.ac.uk (Duncan Coutts) Date: Tue Mar 20 22:07:00 2007 Subject: [C2hs] patch applied (c2hs): Add identifier non-termnal to allow tyident in more places Message-ID: <20070321020723.GA25902@cvs.haskell.org> Tue Mar 20 05:19:42 PDT 2007 Duncan Coutts * Add identifier non-termnal to allow tyident in more places 'identifier' is an 'ident' token or a 'tyident' token. Many places that previously used just ident can now use identifier instead which allows tyident's to be used in those places. Some that should be allowed to be tyident still must be ident-only because otherwise it'd introduce many shift-reduce conflicts. Fixing those requires merging Roskind's grammar for declaraions. M ./c2hs/c/CParser.y -17 +17 From duncan.coutts at worc.ox.ac.uk Tue Mar 20 22:07:25 2007 From: duncan.coutts at worc.ox.ac.uk (Duncan Coutts) Date: Tue Mar 20 22:07:00 2007 Subject: [C2hs] patch applied (c2hs): Move maybe_asm inside declarator productions Message-ID: <20070321020725.GA25916@cvs.haskell.org> Tue Mar 20 05:25:32 PDT 2007 Duncan Coutts * Move maybe_asm inside declarator productions M ./c2hs/c/CParser.y -10 +12 From duncan.coutts at worc.ox.ac.uk Fri Mar 23 04:12:59 2007 From: duncan.coutts at worc.ox.ac.uk (Duncan Coutts) Date: Fri Mar 23 04:12:28 2007 Subject: [C2hs] patch applied (c2hs): Rename storage_class_specifier -> storage_class Message-ID: <20070323081259.GA17967@cvs.haskell.org> Wed Mar 21 03:07:05 PDT 2007 Duncan Coutts * Rename storage_class_specifier -> storage_class M ./c2hs/c/CParser.y -4 +4 From duncan.coutts at worc.ox.ac.uk Fri Mar 23 04:13:01 2007 From: duncan.coutts at worc.ox.ac.uk (Duncan Coutts) Date: Fri Mar 23 04:12:31 2007 Subject: [C2hs] patch applied (c2hs): Misc trivial changes to make merging easier Message-ID: <20070323081301.GA17987@cvs.haskell.org> Wed Mar 21 03:09:32 PDT 2007 Duncan Coutts * Misc trivial changes to make merging easier Put a comment in the right place and collect identifiers in identifier lists, even though at the moment we end up discarding them later. M ./c2hs/c/CParser.y -6 +6 From duncan.coutts at worc.ox.ac.uk Fri Mar 23 04:13:02 2007 From: duncan.coutts at worc.ox.ac.uk (Duncan Coutts) Date: Fri Mar 23 04:12:31 2007 Subject: [C2hs] patch applied (c2hs): Merge the Roskind declaration/declarator grammar Message-ID: <20070323081302.GA18002@cvs.haskell.org> Thu Mar 22 04:44:11 PDT 2007 Duncan Coutts * Merge the Roskind declaration/declarator grammar Replace all the non-terminals and productions involved in the C declaration and declarator grammar with ones based on those from James Roskind's classic C grammar. The main point is that it allows us to recognise identifiers and type-identifiers in all the right places. For example it allows us to correctly deal with cases where type identiers get re-declared as function parameters or local vars. M ./c2hs/c/CParser.y -132 +519 From duncan.coutts at worc.ox.ac.uk Fri Mar 23 04:13:03 2007 From: duncan.coutts at worc.ox.ac.uk (Duncan Coutts) Date: Fri Mar 23 04:12:32 2007 Subject: [C2hs] patch applied (c2hs): Document the declaration grammar Message-ID: <20070323081303.GA18018@cvs.haskell.org> Thu Mar 22 05:27:50 PDT 2007 Duncan Coutts * Document the declaration grammar Many of the productions specify various sequences of type qualifiers, storage class specifiers, type names and struct/union/enum declaration specifiers. These are quite hard to specify consisely with an ordinary context free grammar so it's quite hard to follow. To make it easier to understand I've added an extended grammar syntax which allows sequences with constraints on the number of occurences of items in the sequence. This allows these grammars to be specified very concisely. So hopefully that makes it easier for people to follow. I certainly didn't understand the grammar until I re-specified it this way. Also updated a bunch of other misc docs. M ./c2hs/c/CParser.y -21 +142 From duncan.coutts at worc.ox.ac.uk Fri Mar 23 21:21:41 2007 From: duncan.coutts at worc.ox.ac.uk (Duncan Coutts) Date: Fri Mar 23 21:21:08 2007 Subject: [C2hs] patch applied (c2hs): Trim imports Message-ID: <20070324012141.GA31293@cvs.haskell.org> Fri Mar 23 06:06:53 PDT 2007 Duncan Coutts * Trim imports M ./c2hs/c/CParser.y -3 +1 From duncan.coutts at worc.ox.ac.uk Fri Mar 23 21:21:44 2007 From: duncan.coutts at worc.ox.ac.uk (Duncan Coutts) Date: Fri Mar 23 21:21:09 2007 Subject: [C2hs] patch applied (c2hs): Don' t use precedence on if, just expect one s/r conflict Message-ID: <20070324012144.GA31322@cvs.haskell.org> Fri Mar 23 06:07:08 PDT 2007 Duncan Coutts * Don't use precedence on if, just expect one s/r conflict This is what Roskind does, just to make it explicit rather than hiding it using precedence. It's not important really. M ./c2hs/c/CParser.y -4 +2 From duncan.coutts at worc.ox.ac.uk Fri Mar 23 21:21:45 2007 From: duncan.coutts at worc.ox.ac.uk (Duncan Coutts) Date: Fri Mar 23 21:21:10 2007 Subject: [C2hs] patch applied (c2hs): Allow redundant ' ; ' in translation units and structure declarations. Message-ID: <20070324012145.GA31343@cvs.haskell.org> Fri Mar 23 06:08:33 PDT 2007 Duncan Coutts * Allow redundant ';' in translation units and structure declarations. M ./c2hs/c/CParser.y +3 From duncan.coutts at worc.ox.ac.uk Fri Mar 23 21:21:46 2007 From: duncan.coutts at worc.ox.ac.uk (Duncan Coutts) Date: Fri Mar 23 21:21:13 2007 Subject: [C2hs] patch applied (c2hs): Allow anonymous structures and unions nested inside other structs/unions Message-ID: <20070324012146.GA31358@cvs.haskell.org> Fri Mar 23 06:09:37 PDT 2007 Duncan Coutts * Allow anonymous structures and unions nested inside other structs/unions This is a fiarly commonly used GNU extension. Some glibc headers use it. M ./c2hs/c/CParser.y +19 From duncan.coutts at worc.ox.ac.uk Sun Mar 25 22:03:59 2007 From: duncan.coutts at worc.ox.ac.uk (Duncan Coutts) Date: Sun Mar 25 22:03:19 2007 Subject: [C2hs] patch applied (c2hs): Add C99 basic types _Bool and _Complex Message-ID: <20070326020359.GA7111@cvs.haskell.org> Sun Mar 25 03:58:57 PDT 2007 Duncan Coutts * Add C99 basic types _Bool and _Complex M ./c2hs/c/CAST.hs +6 M ./c2hs/c/CLexer.x +2 M ./c2hs/c/CParser.y +4 M ./c2hs/c/CTokens.hs +4 From duncan.coutts at worc.ox.ac.uk Sun Mar 25 22:04:00 2007 From: duncan.coutts at worc.ox.ac.uk (Duncan Coutts) Date: Sun Mar 25 22:03:21 2007 Subject: [C2hs] patch applied (c2hs): Remove old C parser test prog Message-ID: <20070326020400.GA7133@cvs.haskell.org> Sun Mar 25 04:00:35 PDT 2007 Duncan Coutts * Remove old C parser test prog Will add new ones soon. R ./c2hs/c/tests/Main.hs From duncan.coutts at worc.ox.ac.uk Sun Mar 25 22:04:02 2007 From: duncan.coutts at worc.ox.ac.uk (Duncan Coutts) Date: Sun Mar 25 22:03:25 2007 Subject: [C2hs] patch applied (c2hs): Add GNU C __thread storage class Message-ID: <20070326020402.GA7150@cvs.haskell.org> Sun Mar 25 04:12:59 PDT 2007 Duncan Coutts * Add GNU C __thread storage class M ./c2hs/c/CAST.hs +3 M ./c2hs/c/CLexer.x +1 M ./c2hs/c/CParser.y +4 M ./c2hs/c/CTokens.hs +3 From duncan.coutts at worc.ox.ac.uk Sun Mar 25 22:04:04 2007 From: duncan.coutts at worc.ox.ac.uk (Duncan Coutts) Date: Sun Mar 25 22:03:25 2007 Subject: [C2hs] patch applied (c2hs): Add GNU C typeof ( ... ) extension Message-ID: <20070326020404.GA7165@cvs.haskell.org> Sun Mar 25 04:21:14 PDT 2007 Duncan Coutts * Add GNU C typeof ( ... ) extension In place of a type identifier in some places, GNU C allows this typeof type expression which takes the type of a given expression or type name. eg: int typeof(Foo) x; This is handy in macros for example. M ./c2hs/c/CAST.hs +8 M ./c2hs/c/CLexer.x +3 M ./c2hs/c/CParser.y -1 +23 M ./c2hs/c/CTokens.hs +3 From duncan.coutts at worc.ox.ac.uk Sun Mar 25 22:04:05 2007 From: duncan.coutts at worc.ox.ac.uk (Duncan Coutts) Date: Sun Mar 25 22:03:25 2007 Subject: [C2hs] patch applied (c2hs): Add C99 initialiser designations Message-ID: <20070326020405.GA7179@cvs.haskell.org> Sun Mar 25 04:50:32 PDT 2007 Duncan Coutts * Add C99 initialiser designations M ./c2hs/c/CAST.hs -4 +21 M ./c2hs/c/CNames.hs -2 +2 M ./c2hs/c/CParser.y -5 +27 From duncan.coutts at worc.ox.ac.uk Sun Mar 25 22:04:06 2007 From: duncan.coutts at worc.ox.ac.uk (Duncan Coutts) Date: Sun Mar 25 22:03:26 2007 Subject: [C2hs] patch applied (c2hs): Add GNU C designator extensions Message-ID: <20070326020406.GA7193@cvs.haskell.org> Sun Mar 25 04:59:48 PDT 2007 Duncan Coutts * Add GNU C designator extensions These are pre-C99 GNU C extensions but they're still supported and still used in some programs like the Linux kernel. M ./c2hs/c/CAST.hs +5 M ./c2hs/c/CParser.y +13 From duncan.coutts at worc.ox.ac.uk Sun Mar 25 22:04:09 2007 From: duncan.coutts at worc.ox.ac.uk (Duncan Coutts) Date: Sun Mar 25 22:03:28 2007 Subject: [C2hs] patch applied (c2hs): C99 allows type quals on the elements in array declarator Message-ID: <20070326020409.GA7223@cvs.haskell.org> Sun Mar 25 05:17:13 PDT 2007 Duncan Coutts * C99 allows type quals on the elements in array declarator We allow this and record the qualifiers in the AST M ./c2hs/c/CAST.hs -2 +3 M ./c2hs/c/CNames.hs -1 +1 M ./c2hs/c/CParser.y -4 +16 M ./c2hs/c/CPretty.hs -1 +1 M ./c2hs/c/CTrav.hs -18 +18 From duncan.coutts at worc.ox.ac.uk Sun Mar 25 22:04:08 2007 From: duncan.coutts at worc.ox.ac.uk (Duncan Coutts) Date: Sun Mar 25 22:03:29 2007 Subject: [C2hs] patch applied (c2hs): Include the declaration in the compound literal AST Message-ID: <20070326020408.GA7208@cvs.haskell.org> Sun Mar 25 05:06:05 PDT 2007 Duncan Coutts * Include the declaration in the compound literal AST Previously it was parsd but ignored. M ./c2hs/c/CAST.hs -3 +4 M ./c2hs/c/CNames.hs -1 +1 M ./c2hs/c/CParser.y -2 +2 From duncan.coutts at worc.ox.ac.uk Sun Mar 25 22:04:10 2007 From: duncan.coutts at worc.ox.ac.uk (Duncan Coutts) Date: Sun Mar 25 22:03:30 2007 Subject: [C2hs] patch applied (c2hs): Add GNU C switch case range extension Message-ID: <20070326020410.GA7240@cvs.haskell.org> Sun Mar 25 05:24:01 PDT 2007 Duncan Coutts * Add GNU C switch case range extension Allow switch cases like: 'a' .. 'z' : M ./c2hs/c/CAST.hs +6 M ./c2hs/c/CParser.y +4 From duncan.coutts at worc.ox.ac.uk Sun Mar 25 22:04:12 2007 From: duncan.coutts at worc.ox.ac.uk (Duncan Coutts) Date: Sun Mar 25 22:03:33 2007 Subject: [C2hs] patch applied (c2hs): Allow computed gotos and taking addresses of labels Message-ID: <20070326020412.GA7259@cvs.haskell.org> Sun Mar 25 05:30:50 PDT 2007 Duncan Coutts * Allow computed gotos and taking addresses of labels This is yet another GNU C extension. M ./c2hs/c/CAST.hs +8 M ./c2hs/c/CParser.y -1 +8 From duncan.coutts at worc.ox.ac.uk Sun Mar 25 22:04:13 2007 From: duncan.coutts at worc.ox.ac.uk (Duncan Coutts) Date: Sun Mar 25 22:03:33 2007 Subject: [C2hs] patch applied (c2hs): GNU C extension to allow a compound statement as an expression Message-ID: <20070326020413.GA7273@cvs.haskell.org> Sun Mar 25 05:35:22 PDT 2007 Duncan Coutts * GNU C extension to allow a compound statement as an expression Used quite a bit in complex macros in some header files. M ./c2hs/c/CAST.hs +4 M ./c2hs/c/CParser.y +5 From duncan.coutts at worc.ox.ac.uk Sun Mar 25 22:04:14 2007 From: duncan.coutts at worc.ox.ac.uk (Duncan Coutts) Date: Sun Mar 25 22:03:34 2007 Subject: [C2hs] patch applied (c2hs): C99 for statements allow an initial decleration rather than an expression Message-ID: <20070326020414.GA7287@cvs.haskell.org> Sun Mar 25 05:46:44 PDT 2007 Duncan Coutts * C99 for statements allow an initial decleration rather than an expression eg: for (int x = 0; x < n; x++) { ... } M ./c2hs/c/CAST.hs -1 +2 M ./c2hs/c/CParser.y -1 +4 From duncan.coutts at worc.ox.ac.uk Sun Mar 25 22:04:16 2007 From: duncan.coutts at worc.ox.ac.uk (Duncan Coutts) Date: Sun Mar 25 22:03:35 2007 Subject: [C2hs] patch applied (c2hs): GNU C allows comitting the middle expr in conditional expressions Message-ID: <20070326020416.GA7302@cvs.haskell.org> Sun Mar 25 05:50:51 PDT 2007 Duncan Coutts * GNU C allows comitting the middle expr in conditional expressions so normally it's: ? : and GNU allows: ? : which in the 'then' case evaluates to . The advantage here is that the condition exp is evaluated only once. M ./c2hs/c/CAST.hs -1 +1 M ./c2hs/c/CNames.hs -1 +1 M ./c2hs/c/CParser.y -1 +7 From duncan.coutts at worc.ox.ac.uk Sun Mar 25 22:04:17 2007 From: duncan.coutts at worc.ox.ac.uk (Duncan Coutts) Date: Sun Mar 25 22:03:36 2007 Subject: [C2hs] patch applied (c2hs): Allow GNU C __label__ things in compound statements Message-ID: <20070326020417.GA7317@cvs.haskell.org> Sun Mar 25 05:56:37 PDT 2007 Duncan Coutts * Allow GNU C __label__ things in compound statements I'm not quite sure what they mean, they're recognised but ignored ie not included in the AST. M ./c2hs/c/CLexer.x +1 M ./c2hs/c/CParser.y +13 M ./c2hs/c/CTokens.hs +3 From duncan.coutts at worc.ox.ac.uk Sun Mar 25 22:04:18 2007 From: duncan.coutts at worc.ox.ac.uk (Duncan Coutts) Date: Sun Mar 25 22:03:37 2007 Subject: [C2hs] patch applied (c2hs): Allow various GNU C builtins that take types as parameters Message-ID: <20070326020418.GA7335@cvs.haskell.org> Sun Mar 25 06:00:26 PDT 2007 Duncan Coutts * Allow various GNU C builtins that take types as parameters We can parse normal builtins, but these ones are not just functions since they take types as parameters so have to be recognised specially in the parser. They are entered into the AST with only a place holder, not the full info. M ./c2hs/c/CAST.hs -1 +4 M ./c2hs/c/CLexer.x +5 M ./c2hs/c/CParser.y +22 M ./c2hs/c/CTokens.hs +6 From duncan.coutts at worc.ox.ac.uk Sun Mar 25 22:04:20 2007 From: duncan.coutts at worc.ox.ac.uk (Duncan Coutts) Date: Sun Mar 25 22:03:39 2007 Subject: [C2hs] patch applied (c2hs): Allow both + and - prefix on exponent part of float literals Message-ID: <20070326020420.GA7358@cvs.haskell.org> Sun Mar 25 06:03:30 PDT 2007 Duncan Coutts * Allow both + and - prefix on exponent part of float literals M ./c2hs/c/CLexer.x -1 +1 From duncan.coutts at worc.ox.ac.uk Sun Mar 25 22:04:21 2007 From: duncan.coutts at worc.ox.ac.uk (Duncan Coutts) Date: Sun Mar 25 22:03:40 2007 Subject: [C2hs] patch applied (c2hs): Allow ' \e' escape char in string and char literals Message-ID: <20070326020421.GA7373@cvs.haskell.org> Sun Mar 25 06:04:43 PDT 2007 Duncan Coutts * Allow '\e' escape char in string and char literals This is a GNU C extension. M ./c2hs/c/CLexer.x -1 +2 From duncan.coutts at worc.ox.ac.uk Sun Mar 25 22:04:22 2007 From: duncan.coutts at worc.ox.ac.uk (Duncan Coutts) Date: Sun Mar 25 22:03:42 2007 Subject: [C2hs] patch applied (c2hs): Allow unsigned long long integer literals with the ULL suffix. Message-ID: <20070326020422.GA7389@cvs.haskell.org> Sun Mar 25 06:05:36 PDT 2007 Duncan Coutts * Allow unsigned long long integer literals with the ULL suffix. We're slightly over-liberal in the lexical syntax here. M ./c2hs/c/CLexer.x -3 +3 From duncan.coutts at worc.ox.ac.uk Sun Mar 25 22:04:24 2007 From: duncan.coutts at worc.ox.ac.uk (Duncan Coutts) Date: Sun Mar 25 22:03:42 2007 Subject: [C2hs] patch applied (c2hs): Recognise wide character literals and strings Message-ID: <20070326020424.GA7407@cvs.haskell.org> Sun Mar 25 06:06:27 PDT 2007 Duncan Coutts * Recognise wide character literals and strings We don't do an charset conversion though. M ./c2hs/c/CLexer.x -1 +3 From duncan.coutts at worc.ox.ac.uk Sun Mar 25 22:04:25 2007 From: duncan.coutts at worc.ox.ac.uk (Duncan Coutts) Date: Sun Mar 25 22:03:44 2007 Subject: [C2hs] patch applied (c2hs): Add a couple new modules into the .cabal ' other-modules' list Message-ID: <20070326020425.GA7424@cvs.haskell.org> Sun Mar 25 18:43:35 PDT 2007 Duncan Coutts * Add a couple new modules into the .cabal 'other-modules' list M ./c2hs.cabal +2 From duncan.coutts at worc.ox.ac.uk Sun Mar 25 22:04:26 2007 From: duncan.coutts at worc.ox.ac.uk (Duncan Coutts) Date: Sun Mar 25 22:03:46 2007 Subject: [C2hs] patch applied (c2hs): Fix up a couple cases in GenBind where the AST changed slightly Message-ID: <20070326020426.GA7440@cvs.haskell.org> Sun Mar 25 18:49:51 PDT 2007 Duncan Coutts * Fix up a couple cases in GenBind where the AST changed slightly M ./c2hs/gen/GenBind.hs -3 +3 From vivian.mcphail at paradise.net.nz Sat Mar 31 03:18:10 2007 From: vivian.mcphail at paradise.net.nz (Vivian McPhail) Date: Sat Mar 31 03:17:19 2007 Subject: [C2hs] Error downloading repository under MSYS/WinXP Message-ID: <000001c77364$bd9b8bc0$6601a8c0@box> I get an error applying patch 107. From memory this is to do with a capitalisation inconsistency under WinXP (and MSYS). ] $ darcs get --partial http://darcs.haskell.org/c2hs ] Copying patch 256 of 256... done! ] Applying patch 107 of 256... ] darcs failed: Error applying hunk to file ./base/todo ] Unapplicable patch: ] Wed May 18 19:42:11 New Zealand Standard Time 2005 chak@cse.unsw.edu.au ] * rearranging darcs repo Cheers, Vivian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.haskell.org/pipermail/c2hs/attachments/20070331/4f714218/attachment.htm