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?
"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
"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
"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:
>>
>> ::= ';'
>>
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
"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
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
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
"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'
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
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
"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
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
"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
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?
"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
"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 :)
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
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 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
20 matches
Mail list logo