Re: Goldie Parsing System v0.4 Released - Now for D2

2011-04-18 Thread Kagamin
Nick Sabalausky Wrote: > In other words, we basically have a form of this: > > ::= | > ::= X > ::= X > > Can't be done. No way to tell if X is or . A hairy grammar can be used here, anyway goldie's output needs postprocessing, right?

Re: Goldie Parsing System v0.4 Released - Now for D2

2011-04-16 Thread Nick Sabalausky
"Nick Sabalausky" wrote in message news:iobh9o$1d04$1...@digitalmars.com... > "Nick Sabalausky" wrote in message > news:ioanmi$82c$1...@digitalmars.com... >> Andrej Mitrovic Wrote: >> >>> What I meant was that code like this will throw if MyType isn't >>> defined anywhere: >>> >>> int main(int

Re: Goldie Parsing System v0.4 Released - Now for D2

2011-04-16 Thread Nick Sabalausky
"Nick Sabalausky" wrote in message news:iod6fn$tch$1...@digitalmars.com... > "Kagamin" wrote in message > news:iod552$rbe$1...@digitalmars.com... >> >> As I understand, is a type, is a variable. There should be >> no problem here. > > First of all, the name up there is misleading. That only

Re: Goldie Parsing System v0.4 Released - Now for D2

2011-04-16 Thread Nick Sabalausky
"Kagamin" wrote in message news:iod552$rbe$1...@digitalmars.com... > Nick Sabalausky Wrote: > >> Yea, turns out that grammar just doesn't support using user-defined types >> without preceding them with "struct", "union", or "enum". You can see >> that >> here: >> >> ::= ';' >>

Re: Goldie Parsing System v0.4 Released - Now for D2

2011-04-16 Thread Kagamin
Nick Sabalausky Wrote: > Yea, turns out that grammar just doesn't support using user-defined types > without preceding them with "struct", "union", or "enum". You can see that > here: > > ::= ';' > | ';' > |';' > > ::= ext

Re: Goldie Parsing System v0.4 Released - Now for D2

2011-04-16 Thread Nick Sabalausky
"Nick Sabalausky" wrote in message news:ioanmi$82c$1...@digitalmars.com... > Andrej Mitrovic Wrote: > >> What I meant was that code like this will throw if MyType isn't >> defined anywhere: >> >> int main(int x) >> { >> MyType var; >> } >> >> goldie.exception.UnexpectedTokenException@src\gold

Re: Goldie Parsing System v0.4 Released - Now for D2

2011-04-15 Thread Nick Sabalausky
Andrej Mitrovic Wrote: > What I meant was that code like this will throw if MyType isn't > defined anywhere: > > int main(int x) > { > MyType var; > } > > goldie.exception.UnexpectedTokenException@src\goldie\exception.d(35): > test.c(3:12): Unexpected Id: 'var' > > It looks like valid C /sy

Re: Goldie Parsing System v0.4 Released - Now for D2

2011-04-15 Thread Andrej Mitrovic
What I meant was that code like this will throw if MyType isn't defined anywhere: int main(int x) { MyType var; } goldie.exception.UnexpectedTokenException@src\goldie\exception.d(35): test.c(3:12): Unexpected Id: 'var' It looks like valid C /syntax/, except that MyType isn't defined. But thi

Re: Goldie Parsing System v0.4 Released - Now for D2

2011-04-15 Thread Nick Sabalausky
"Andrej Mitrovic" wrote in message news:mailman.3531.1302884207.4748.digitalmars-d-annou...@puremagic.com... > I've used your tool yesterday. I used it on a simple C file with the > ANSI C grammar from the gold website. It does seem to work fine, but > yeah I have to preprocess a C file first (I'

Re: Goldie Parsing System v0.4 Released - Now for D2

2011-04-15 Thread Andrej Mitrovic
I've used your tool yesterday. I used it on a simple C file with the ANSI C grammar from the gold website. It does seem to work fine, but yeah I have to preprocess a C file first (I've spent so much time with D that I almost completely forgot about the C preprocessor in the first place). I've trie

Re: Goldie Parsing System v0.4 Released - Now for D2

2011-04-15 Thread Daniel Gibson
Am 15.04.2011 10:13, schrieb Nick Sabalausky: > "Daniel Gibson" wrote in message > news:io8u12$132q$1...@digitalmars.com... >> Am 15.04.2011 09:50, schrieb Nick Sabalausky: >>> Since you're talking about C, you'll probably want to run your original C >>> code through the "preprocess-only" option

Re: Goldie Parsing System v0.4 Released - Now for D2

2011-04-15 Thread Nick Sabalausky
"Daniel Gibson" wrote in message news:io8u12$132q$1...@digitalmars.com... > Am 15.04.2011 09:50, schrieb Nick Sabalausky: >> Since you're talking about C, you'll probably want to run your original C >> code through the "preprocess-only" option of a real C compiler. (I >> *think* >> DMC will do t

Re: Goldie Parsing System v0.4 Released - Now for D2

2011-04-15 Thread Daniel Gibson
Am 15.04.2011 09:50, schrieb Nick Sabalausky: > Since you're talking about C, you'll probably want to run your original C > code through the "preprocess-only" option of a real C compiler. (I *think* > DMC will do that.) Then parse the resulting "preprocessed C" files with > Goldie. (Although if

Re: Goldie Parsing System v0.4 Released - Now for D2

2011-04-15 Thread Nick Sabalausky
"Andrej Mitrovic" wrote in message news:mailman.3528.1302836832.4748.digitalmars-d-annou...@puremagic.com... > So could your library be used to implement an alternative for HTOD? Or > more simply put, could I use this to do (simple) transformations of C > code? C code is admittedly a bit tricky

Re: Goldie Parsing System v0.4 Released - Now for D2

2011-04-14 Thread Andrej Mitrovic
So could your library be used to implement an alternative for HTOD? Or more simply put, could I use this to do (simple) transformations of C code?

Re: Goldie Parsing System v0.4 Released - Now for D2

2011-03-27 Thread Nick Sabalausky
"Long Chang" wrote in message news:mailman.2805.1301240416.4748.digitalmars-d-annou...@puremagic.com... >I try use the gold from trunk, not the release version . It seems >very slow for parse css . please see this >http://www.dsource.org/projects/goldie/ticket/18 . > >Is all lalr slow like this

Re: Goldie Parsing System v0.4 Released - Now for D2

2011-03-27 Thread Nick Sabalausky
"Long Chang" wrote in message news:mailman.2806.1301240916.4748.digitalmars-d-annou...@puremagic.com... >just read you replay, very look forward to the Character Set Optimization. > >and thank you to done such a useful project . > Thanks for your interest :)

Re: Goldie Parsing System v0.4 Released - Now for D2

2011-03-27 Thread Long Chang
just read you replay, very look forward to the Character Set Optimization. and thank you to done such a useful project . On 3/27/11, Long Chang wrote: > I try use the gold from trunk, not the release version . It seems > very slow for parse css . please see this > http://www.dsource.org/projec

Re: Goldie Parsing System v0.4 Released - Now for D2

2011-03-27 Thread Long Chang
I try use the gold from trunk, not the release version . It seems very slow for parse css . please see this http://www.dsource.org/projects/goldie/ticket/18 . Is all lalr slow like this , or it is a gold problem . On Sun, Mar 27, 2011 at 4:11 PM, Nick Sabalausky wrote: > Goldie is a series of

Goldie Parsing System v0.4 Released - Now for D2

2011-03-27 Thread Nick Sabalausky
Goldie is a series of flexible open-source parsing tools, including a D2 library called GoldieLib. It's compatible with GOLD Parser Builder and can be used together with it, but does not require it. In fact, Goldie can be used as a cross-platform, shell-scripting-compatible alternative to GOLD