Click here to Skip to main content
15,890,512 members
Home / Discussions / C#
   

C#

 
AnswerRe: Grammar in GOLD for generic constructs Pin
Manfred Rudolf Bihy19-May-15 0:27
professionalManfred Rudolf Bihy19-May-15 0:27 
AnswerRe: Grammar in GOLD for generic constructs Pin
Manfred Rudolf Bihy19-May-15 0:36
professionalManfred Rudolf Bihy19-May-15 0:36 
GeneralRe: Grammar in GOLD for generic constructs Pin
Sascha Lefèvre19-May-15 1:51
professionalSascha Lefèvre19-May-15 1:51 
GeneralRe: Grammar in GOLD for generic constructs Pin
Manfred Rudolf Bihy19-May-15 4:54
professionalManfred Rudolf Bihy19-May-15 4:54 
GeneralRe: Grammar in GOLD for generic constructs Pin
Brisingr Aerowing19-May-15 6:12
professionalBrisingr Aerowing19-May-15 6:12 
GeneralRe: Grammar in GOLD for generic constructs Pin
Manfred Rudolf Bihy19-May-15 9:28
professionalManfred Rudolf Bihy19-May-15 9:28 
GeneralRe: Grammar in GOLD for generic constructs Pin
Brisingr Aerowing19-May-15 17:28
professionalBrisingr Aerowing19-May-15 17:28 
GeneralRe: Grammar in GOLD for generic constructs Pin
Manfred Rudolf Bihy19-May-15 5:34
professionalManfred Rudolf Bihy19-May-15 5:34 
I just had to download that GOLD ParserBuilder and try it out with your grammar.
As expected it showed only warnings of the Shift-Reduce conflict, but it produced the egt file just fine.
So it should work for you too, me thinks.

The Shift in favor of the reduce is totally acceptable if (pretty big if eh?) GOLD backtracks when subsequent tokens let the chosen production fail (That's the one it shifted on). So eventually it would fall back on the reduce production which is the compare expression production in your case.

What I just saw from 15 minutes of looking at this thing, I must say I'm pretty much impressed. Not only can you inspect the generated automaton, but also the messages for the conflicts were the best and most easily understandable compared to any of the CCs I have seen so far. (YACC, PROGRAMMAR, ANTLR).

What you really should do next is create a test file and run tests on the grammar to see if it can still parse comparisons as well as the generics.

Regards,

Manfred

P.S.: I totally forgot how much fun this is, makes me want to uses this tool for some fun project.
"I had the right to remain silent, but I didn't have the ability!"
Ron White, Comedian

GeneralRe: Grammar in GOLD for generic constructs Pin
Sascha Lefèvre19-May-15 7:01
professionalSascha Lefèvre19-May-15 7:01 
GeneralRe: Grammar in GOLD for generic constructs Pin
Manfred Rudolf Bihy19-May-15 8:27
professionalManfred Rudolf Bihy19-May-15 8:27 
GeneralRe: Grammar in GOLD for generic constructs Pin
Sascha Lefèvre19-May-15 8:37
professionalSascha Lefèvre19-May-15 8:37 
GeneralRe: Grammar in GOLD for generic constructs Pin
Sascha Lefèvre20-May-15 2:46
professionalSascha Lefèvre20-May-15 2:46 
GeneralRe: Grammar in GOLD for generic constructs Pin
Sascha Lefèvre23-May-15 8:04
professionalSascha Lefèvre23-May-15 8:04 
GeneralRe: Grammar in GOLD for generic constructs Pin
Sascha Lefèvre8-Jun-15 20:20
professionalSascha Lefèvre8-Jun-15 20:20 
GeneralRe: Grammar in GOLD for generic constructs Pin
Manfred Rudolf Bihy8-Jun-15 20:28
professionalManfred Rudolf Bihy8-Jun-15 20:28 
GeneralRe: Grammar in GOLD for generic constructs Pin
Sascha Lefèvre8-Jun-15 20:33
professionalSascha Lefèvre8-Jun-15 20:33 
Questionhelppppp Pin
Member 1169697217-May-15 2:38
Member 1169697217-May-15 2:38 
AnswerRe: helppppp Pin
Kornfeld Eliyahu Peter17-May-15 3:33
professionalKornfeld Eliyahu Peter17-May-15 3:33 
AnswerRe: helppppp Pin
OriginalGriff17-May-15 3:59
mveOriginalGriff17-May-15 3:59 
GeneralRe: helppppp Pin
Member 1169697217-May-15 6:39
Member 1169697217-May-15 6:39 
GeneralRe: helppppp Pin
Sascha Lefèvre17-May-15 7:20
professionalSascha Lefèvre17-May-15 7:20 
GeneralRe: helppppp Pin
Member 1169697217-May-15 7:51
Member 1169697217-May-15 7:51 
GeneralRe: helppppp Pin
Dave Kreskowiak17-May-15 10:59
mveDave Kreskowiak17-May-15 10:59 
QuestionCrystal Report - object reference not set to an instance while loading subreport Pin
vijay vk16-May-15 22:20
vijay vk16-May-15 22:20 
AnswerRe: Crystal Report - object reference not set to an instance while loading subreport Pin
OriginalGriff16-May-15 22:50
mveOriginalGriff16-May-15 22:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.