bison Questions

1

Solved

This is a very silly problem. There are no errors in the grammar rules afaik but its not giving the right output. I have been staring at it but the mistake is not visible to me. What tools are ava...
Rabassa asked 12/6, 2018 at 9:12

4

Solved

While running a makefile in gcc 4.1.2 (linux 5), I got the following error make: yacc: Command not found By googling, I came to know that this error can be rectified by installing Bison-GNU pars...
Beneficence asked 24/5, 2012 at 7:44

5

Solved

What is the difference between Flex & Lex and Yacc & Bison. I searched the Internet wildly and I didn't find any solid answer. Can I install pure Lex and Yacc on Ubuntu, or I can install o...
Coatee asked 8/3, 2009 at 12:31

5

Solved

What is the best way to handle multiple Flex/Bison parsers inside a project? I wrote a parser and now I need a second one in the same project. So far in the third section of parser1.y I inserted t...
Greedy asked 28/10, 2009 at 1:31

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

6

Solved

I'm looking for a good development environment in which to work on flex or bison or both. Are there any IDE's that have these capabilities and/or are suitable for this? (If not the next mos...
Imam asked 19/7, 2009 at 16:49

1

Solved

I would really prefer a working example to any explanation. Whatever I read so far on Bison's documentation site contradicts whatever Flex says. One says to declare yylex as int yylex (yyscan_t y...
Enforcement asked 18/2, 2018 at 9:37

2

Solved

I'm trying to get rid of a warning that gcc is throwing when I try to compile my bison and flex files: : In function ‘yy_init_buffer’: :1675: warning: implicit declaration of function ‘fileno’ T...
Progressist asked 14/9, 2017 at 8:12

3

Solved

I would like to be able to parse a non-empty, one-or-many element, comma-delimited (and optionally parenthesized) list using flex/bison parse rules. some e.g. of parseable lists : 1 1,2 (1,2) (...
Commend asked 4/6, 2011 at 2:29

1

This is for a parser in Jison but I guess the same applies for Bison. I have a rule that has a definition for an expression. expr : NUMBER -> { type: "number", value: $1 } | "(" expr ")" -&g...
Octahedrite asked 29/6, 2017 at 7:43

4

Solved

In the bison manual in section 2.1.2 Grammar Rules for rpcalc, it is written that: In each action, the pseudo-variable $$ stands for the semantic value for the grouping that the rule is going t...
Kremer asked 24/5, 2012 at 14:52

3

I've read http://msdn.microsoft.com/en-us/library/aa730877%28vs.80%29.aspx but this document was for VS 2005. I stuck on the part 'Importing a .rules File in Visual C++' in the document. It seems t...
Filtration asked 3/5, 2011 at 10:54

3

Solved

I wanted to experiment with the Shakespeare programming language, so I downloaded it from here and executed the Makefile using cd spl-1.2.1 Make. The compilation of spl2c executes with a couple w...
Alroy asked 22/12, 2009 at 18:46

3

I have searched almost every material online. But I am still confused why lexer cannot identify yylval. Here is the case: I have defined a bunch of ADT in node.h and realize them in node.c, my pu...
Mozart asked 9/6, 2011 at 19:37

1

Solved

I am trying to solve shift/reduce conflict in Bison. I have following grammar rules new_expr: T_NEW class_name_reference optional_generics_list ctor_arguments { $$ = zend_ast_create(ZEND_AST_NEW...
Bustup asked 21/1, 2017 at 22:47

1

Solved

I have a following production in a bison spec: op : '+' { printf("%d %d %c\n", $1, '+', '+'); } When I input a + I get the following output: 0 43 + Can someone explain why $1 has a value of 0...
Appointed asked 1/6, 2016 at 20:34

5

Solved

In my programming project I want to parse command line attributes using flex/bison. My program is called like this: ./prog -a "(1, 2, 3)(4, 5)(6, 7, 8)" filename Is it possible to parse this str...
Windham asked 25/11, 2010 at 17:43

2

How does one make a comment in Lex and Yacc? So far I haven't tried Yacc, but in Lex I have tried /* comment */ and // comment, but neither of these compile. I am on a Mac, using the builtin Lex a...
Galbraith asked 17/5, 2016 at 2:52

3

Solved

I want to pass the actual string of a token. If I have a token called ID, then I want my yacc file to actually know what ID is called. I thing I have to pass a string using yylval to the yacc file ...
Heteromerous asked 5/12, 2009 at 10:35

1

Quoting the book flex & bison (O'Reilly, John Levine, 2009): "Bison can create parsers in C++. Although flex appears to be able to create C++, scanners, the C++ code doesn't work.[21] Fortu...
Salamanca asked 16/4, 2016 at 16:5

2

Solved

I'm learning how to use reentrant Bison and Flex together. I already got a simple calculator working without the reentrant capability. However when I activated the reentrant feature and made the ne...
Berate asked 12/9, 2015 at 4:14

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

1

Solved

I'm working on constructing my parse data structure from bison's semantic values. One particular structure is of type std::vector<double>. I'm curious how the bison internals handle moving se...
Rybinsk asked 20/3, 2016 at 18:18

1

Solved

I am trying to build a program using multiple parsers. I have put the flex / bison files of the different parsers in separate folders to avoid conflicts. I have used different prefixes to be able ...
Isolated asked 24/2, 2016 at 15:36

3

Solved

I am trying to include a struct as part of the union with Bison, but I get an error on the 'struct node args' in %union: parser.y:17: error: field ‘args’ has incomplete type The Code: struct n...
Lazarolazaruk asked 16/9, 2009 at 1:1

© 2022 - 2024 — McMap. All rights reserved.