shift-reduce-conflict Questions

3

Solved

The grammar is as follows: 1. program -> declaration-list 2. declaration-list -> declaration-list declaration | declaration 3. declaration -> var-declaration | fun-declaration 4. var-decl...
Reinert asked 4/10, 2012 at 4:19

1

Solved

I'm trying to learn basics of the Lemon parser generator, but I stuck quickly. Here's a tiny grammar: %right PLUS_PLUS. %left DOT. program ::= expr. member_expr ::= expr DOT IDENTIFIER. lhs_ex...

3

Solved

How do I remove shift-reduce conflict for bison for the given grammar? selection-stmt -> if ( expression ) statement | if ( expression ) statement else statement A solution giving the modif...
Pomerania asked 4/10, 2012 at 16:44

3

Solved

I'm using CUP to create a parser that I need for my thesis. I have a shift/reduce conflict in my grammar. I have this production rule: command ::= IDENTIFIER | IDENTIFIER LPAREN parlist RPAREN; ...
Epicenter asked 2/7, 2010 at 17:11

5

Solved

I'm writing a grammar in YACC (actually Bison), and I'm having a shift/reduce problem. It results from including the postfix increment and decrement operators. Here is a trimmed down version of the...
Leban asked 20/5, 2009 at 20:24

4

Solved

I'm trying to write a small parser with Irony. Unfortunately I get a "shift-reduce conflict". Grammars are not my strong point, and I only need to get this one small thingy done. Here's the reduced...
Underwood asked 26/5, 2009 at 12:34

1

Solved

I'm new to Bison and I'm having trouble with shift/reduce conflicts... I'm trying to load from file to array data[]: struct _data { char name[50]; char surname[50]; int year; } data[1000]; ...
Predigest asked 11/7, 2013 at 9:46

1

Solved

I'm using Jison (Bison) to create a simple markup language. I'm clearly new to this, but slight variations are working very well. I just don't understand the source of the S/R conflict. It doesn't...
Appoggiatura asked 3/10, 2012 at 20:1

4

Solved

%token <token> PLUS MINUS INT %left PLUS MINUS THIS WORKS: exp : exp PLUS exp; exp : exp MINUS exp; exp : INT; THIS HAS 2 SHIFT/REDUCE CONFLICTS: exp : exp binaryop exp; exp : INT; bina...
Discriminant asked 15/3, 2012 at 9:23

1

Solved

I'm having a hard time wrapping my head around this and need some help understanding shift reduce and reduce reduce conflicts. I have a grammar which I can't seem to understand why it's problematic...
1

© 2022 - 2024 — McMap. All rights reserved.