Re: Change to shift instead of reduce

2013-06-05 Thread Akim Demaille
Le 4 juin 2013 à 20:47, Adam Smalin a écrit : > I put the below in my main project just to test it out so I don't have a > self contained source but the below should explain everything. Be sure to read the whole section about precedence. http://www.gnu.org/software/bison/manual/html_node/Prece

Re: Change to shift instead of reduce

2013-06-04 Thread Adam Smalin
I put the below in my main project just to test it out so I don't have a self contained source but the below should explain everything. >From my understanding since '.' is more important then DOLLAR it will win. Precedence is chosen the order nonassoc/left/right where the first seen is least impor

Re: Change to shift instead of reduce

2013-06-04 Thread Akim Demaille
Le 4 juin 2013 à 11:04, Adam Smalin a écrit : > Nevermind I figured that out Great! Please, do try to make small self-contained examples when you can. ___ help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison

Re: Change to shift instead of reduce

2013-06-04 Thread Adam Smalin
Nevermind I figured that out On Mon, Jun 3, 2013 at 4:01 PM, Adam Smalin wrote: > Could you give me a better example? I tried the below and neither helped. > I got the error > > Ambiguity detected. > Option 1, > mainLoop -> > mainLoop -> > mainLoop -> > mainLoop >

Re: Change to shift instead of reduce

2013-06-03 Thread Adam Smalin
Could you give me a better example? I tried the below and neither helped. I got the error Ambiguity detected. Option 1, mainLoop -> mainLoop -> mainLoop -> mainLoop mainElement -> '$' VarName mainElement -> mainElement2 ->

Re: Change to shift instead of reduce

2013-06-03 Thread Ron Burk
When almost everything is a legal parse, a parser generator begins to fail to be a good match for the problem. When hand-written C is clearer, better able to identify errors, and possibly even shorter than the grammar equivalent, then I figure it's probably not a job for a parser generator. Person

Re: Change to shift instead of reduce

2013-06-03 Thread Akim Demaille
Le 1 juin 2013 à 20:49, Adam Smalin a écrit : > I have another thread but here is a simple version of my problem > > My text input is > a.b c.d > What I would like is > varname varname > My grammar is > %glr-parser > //... > mainLoop: > mainElement%dprec 5 >| mainLoop mainE

Change to shift instead of reduce

2013-06-01 Thread Adam Smalin
I have another thread but here is a simple version of my problem My text input is a.b c.d What I would like is varname varname My grammar is %glr-parser //... mainLoop: mainElement%dprec 5 | mainLoop mainElement%dprec 4 mainElement: '$' VarName%dprec 6{ prin