Thread overview | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
January 22, 2004 DMD parser hooked up | ||||
---|---|---|---|---|
| ||||
After messing with the lexer I took a deep breath and got the DMD parser hooked up and started transforming trees from DMD data structures to GCC data structures. I've done enough to get "hello world" back (for now that is my baseline - don't break things so much that "hello world" stops compiling). Basically I got the OpenD code and updated it from DMD.36 to DMD .78 (yeah, I know, Walter released .79 today), hooked it up to the G++ front-end and started plugging in the pieces to translate back and forth. So the parsing and three semantic phases of the DMD src now run before it is turned over to GCC. It should be fairly possible to make good progress filling in these pieces until it gets hard again. If anyone wants to try it out for themselves you can get the tarball from the last link at http://home.comcast.net/~benhinkle/index.html I've only tried it on Linux and compiling "hello world". -Ben ps. Walter, could you remove the extra closing parenthesis on line 175 of dmd/src/dmd/module.c? (((unsigned char *)p)[3] << 24)); |
January 23, 2004 Re: DMD parser hooked up | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ben Hinkle | Ben Hinkle wrote:
> After messing with the lexer I took a deep breath and got the DMD parser
> hooked up and started transforming trees from DMD data structures to GCC
> data structures. I've done enough to get "hello world" back (for now that is
> my baseline - don't break things so much that "hello world" stops
> compiling).
Simply amazing. I took one look at the GCC documentation, and my brain exploded more or less instantly.
Well done!
-- andy
|
January 23, 2004 Re: DMD parser hooked up | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andy Friesen | "Andy Friesen" <andy@ikagames.com> wrote in message news:buq0u5$15vk$1@digitaldaemon.com... > Ben Hinkle wrote: > > After messing with the lexer I took a deep breath and got the DMD parser hooked up and started transforming trees from DMD data structures to GCC data structures. I've done enough to get "hello world" back (for now that is > > my baseline - don't break things so much that "hello world" stops compiling). > > Simply amazing. I took one look at the GCC documentation, and my brain exploded more or less instantly. > > Well done! > > -- andy Glad you like it, though I don't understand 3/4 of the GCC internals either. That's why the G++ code is so useful - I can just call their function "finish_expr_stmt", for instance, instead of writing one myself. Probably at some point finish_expr_stmt will have to change but for now I just want to have a compiler than runs. It's too demoralizing to work on something that doesn't actually run. The main file to fiddle around with, if you want to take a look, is d-parse.c since it has all the routines that take D things and calls the G++ equivalents. -Ben |
January 23, 2004 Re: DMD parser hooked up | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ben Hinkle | Ben Hinkle wrote:
> "Andy Friesen" <andy@ikagames.com> wrote in message
> news:buq0u5$15vk$1@digitaldaemon.com...
>
>>Ben Hinkle wrote:
>>
>>>After messing with the lexer I took a deep breath and got the DMD parser
>>>hooked up and started transforming trees from DMD data structures to GCC
>>>data structures. I've done enough to get "hello world" back (for now
>
> that is
>
>>>my baseline - don't break things so much that "hello world" stops
>>>compiling).
>>
>>Simply amazing. I took one look at the GCC documentation, and my brain
>>exploded more or less instantly.
>>
>>Well done!
>>
>> -- andy
>
>
> Glad you like it, though I don't understand 3/4 of the GCC internals either.
> That's why the G++ code is so useful - I can just call their function
> "finish_expr_stmt", for instance, instead of writing one myself. Probably at
> some point finish_expr_stmt will have to change but for now I just want to
> have a compiler than runs. It's too demoralizing to work on something that
> doesn't actually run. The main file to fiddle around with, if you want to
> take a look, is d-parse.c since it has all the routines that take D things
> and calls the G++ equivalents.
>
> -Ben
>
>
Could you u/l it to a website?
Stephan
|
January 23, 2004 Re: DMD parser hooked up | ||||
---|---|---|---|---|
| ||||
Posted in reply to Stephan Wienczny | try http://home.comcast.net/~benhinkle/gdmd.tar.gz > Could you u/l it to a website? > > Stephan > |
January 23, 2004 Re: DMD parser hooked up | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ben Hinkle | Wooooohoooo!
Thanks a lot for your efforts! I will join you in about 3-4 weeks!
-eye
Ben Hinkle wrote:
> After messing with the lexer I took a deep breath and got the DMD parser
> hooked up and started transforming trees from DMD data structures to GCC
> data structures. I've done enough to get "hello world" back (for now that is
> my baseline - don't break things so much that "hello world" stops
> compiling).
>
> Basically I got the OpenD code and updated it from DMD.36 to DMD .78 (yeah,
> I know, Walter released .79 today), hooked it up to the G++ front-end and
> started plugging in the pieces to translate back and forth. So the parsing
> and three semantic phases of the DMD src now run before it is turned over to
> GCC. It should be fairly possible to make good progress filling in these
> pieces until it gets hard again.
>
> If anyone wants to try it out for themselves you can get the tarball from
> the last link at
> http://home.comcast.net/~benhinkle/index.html
>
> I've only tried it on Linux and compiling "hello world".
>
> -Ben
>
> ps. Walter, could you remove the extra closing parenthesis on line 175 of
> dmd/src/dmd/module.c?
> (((unsigned char *)p)[3] << 24));
>
>
|
January 23, 2004 Re: DMD parser hooked up | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ben Hinkle | Awesome! I'm compiling it now on my Mac OS X box. We'll see how it turns out... Only problem I've had thus far is that libstdc++ only seems to exist on OS X as a static library. Do I need to change anything to get it to work as such? Thanks again, Owen In article <bupadt$16o$1@digitaldaemon.com>, Ben Hinkle says... > >After messing with the lexer I took a deep breath and got the DMD parser hooked up and started transforming trees from DMD data structures to GCC data structures. I've done enough to get "hello world" back (for now that is my baseline - don't break things so much that "hello world" stops compiling). > >Basically I got the OpenD code and updated it from DMD.36 to DMD .78 (yeah, I know, Walter released .79 today), hooked it up to the G++ front-end and started plugging in the pieces to translate back and forth. So the parsing and three semantic phases of the DMD src now run before it is turned over to GCC. It should be fairly possible to make good progress filling in these pieces until it gets hard again. > >If anyone wants to try it out for themselves you can get the tarball from >the last link at >http://home.comcast.net/~benhinkle/index.html > >I've only tried it on Linux and compiling "hello world". > >-Ben > >ps. Walter, could you remove the extra closing parenthesis on line 175 of dmd/src/dmd/module.c? > (((unsigned char *)p)[3] << 24)); > > |
January 24, 2004 Re: DMD parser hooked up | ||||
---|---|---|---|---|
| ||||
Posted in reply to resistor | Well, no luck with that. It failed with these errors. Anything you can suggest to fix it? stage1/xgcc -Bstage1/ -B/usr/local/powerpc-apple-darwin7.2.0/bin/ -c -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Werror -Werror -fno-common -DHAVE_CONFIG_H -I. -Id -I../../gcc3/gcc -I../../gcc3/gcc/d -I../../gcc3/gcc/../include -I../intl ../../gcc3/gcc/d/call.c -o d/call.o In file included from ../../gcc3/gcc/d/call.c:35: ./../gcc3/gcc/d/d-tree.h:1020: warning: bit-field 'is_lang_type_class' type invalid in ISO C ./../gcc3/gcc/d/d-tree.h:1022: warning: bit-field 'has_type_conversion' type invalid in ISO C ./../gcc3/gcc/d/d-tree.h:1023: warning: bit-field 'has_init_ref' type invalid in ISO C ./../gcc3/gcc/d/d-tree.h:1024: warning: bit-field 'has_default_ctor' type invalid in ISO C ./../gcc3/gcc/d/d-tree.h:1025: warning: bit-field 'uses_multiple_inheritance' type invalid in ISO C ./../gcc3/gcc/d/d-tree.h:1026: warning: bit-field 'const_needs_init' type invalid in ISO C ./../gcc3/gcc/d/d-tree.h:1027: warning: bit-field 'ref_needs_init' type invalid in ISO C ./../gcc3/gcc/d/d-tree.h:1028: warning: bit-field 'has_const_assign_ref' type invalid in ISO C gnumake[2]: *** [d/call.o] Error 1 gnumake[1]: *** [stage2_build] Error 2 gnumake: *** [bootstrap] Error 2 In article <bus9vc$1v9b$1@digitaldaemon.com>, resistor@mac.com says... > >Awesome! I'm compiling it now on my Mac OS X box. We'll see how it turns out... > >Only problem I've had thus far is that libstdc++ only seems to exist on OS X as >a static library. Do >I need to change anything to get it to work as such? > >Thanks again, > >Owen |
January 24, 2004 Re: DMD parser hooked up | ||||
---|---|---|---|---|
| ||||
Posted in reply to resistor | Googling for the error gives these thread: http://gcc.gnu.org/ml/gcc/2003-04/msg00102.html http://gcc.gnu.org/ml/gcc-patches/2003-04/msg00175.html It seems like the second one has a solution as a patch file. If you feel like experimenting try using different C compilers for bootstrapping or maybe strip out the -pendantic flag or something. Good luck, -Ben <resistor@mac.com> wrote in message news:busk3q$2f5k$1@digitaldaemon.com... > Well, no luck with that. It failed with these errors. Anything you can suggest > to fix it? > > stage1/xgcc -Bstage1/ -B/usr/local/powerpc-apple-darwin7.2.0/bin/ -c -g -O 2 > -DIN_GCC -W > -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic > -Wno-long-long > -Werror -Werror -fno-common -DHAVE_CONFIG_H -I. -Id -I../../gcc3/gcc > -I../../gcc3/gcc/d > -I../../gcc3/gcc/../include -I../intl ../../gcc3/gcc/d/call.c -o d/call.o > In file included from ../../gcc3/gcc/d/call.c:35: > ./../gcc3/gcc/d/d-tree.h:1020: warning: bit-field 'is_lang_type_class' type > invalid in ISO C > ./../gcc3/gcc/d/d-tree.h:1022: warning: bit-field 'has_type_conversion' type > invalid in ISO C > ./../gcc3/gcc/d/d-tree.h:1023: warning: bit-field 'has_init_ref' type invalid > in ISO C > ./../gcc3/gcc/d/d-tree.h:1024: warning: bit-field 'has_default_ctor' type > invalid in ISO C > ./../gcc3/gcc/d/d-tree.h:1025: warning: bit-field 'uses_multiple_inheritance' > type invalid in ISO C > ./../gcc3/gcc/d/d-tree.h:1026: warning: bit-field 'const_needs_init' type > invalid in ISO C > ./../gcc3/gcc/d/d-tree.h:1027: warning: bit-field 'ref_needs_init' type invalid > in ISO C > ./../gcc3/gcc/d/d-tree.h:1028: warning: bit-field 'has_const_assign_ref' type > invalid in ISO C > gnumake[2]: *** [d/call.o] Error 1 > gnumake[1]: *** [stage2_build] Error 2 > gnumake: *** [bootstrap] Error 2 > > In article <bus9vc$1v9b$1@digitaldaemon.com>, resistor@mac.com says... > > > >Awesome! I'm compiling it now on my Mac OS X box. We'll see how it turns > >out... > > > >Only problem I've had thus far is that libstdc++ only seems to exist on OS X as > >a static library. Do > >I need to change anything to get it to work as such? > > > >Thanks again, > > > >Owen > > |
January 25, 2004 Re: DMD parser hooked up | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ben Hinkle | "Ben Hinkle" <bhinkle4@juno.com> wrote in message news:bupadt$16o$1@digitaldaemon.com... > After messing with the lexer I took a deep breath and got the DMD parser hooked up and started transforming trees from DMD data structures to GCC data structures. I've done enough to get "hello world" back (for now that is > my baseline - don't break things so much that "hello world" stops compiling). Great! > ps. Walter, could you remove the extra closing parenthesis on line 175 of > dmd/src/dmd/module.c? > (((unsigned char *)p)[3] << 24)); Done. |
Copyright © 1999-2021 by the D Language Foundation