bison Questions
3
I think Bison and Yacc are very often used for parsing grammars of programming languages. (and lex/flex for tokenizing...)
My Question is:
Are all compilers made with this tools or are ther...
0
I have a collection of files written in a language 'A' that need to be translated into corresponding files of a language 'B'.
I want to create a program/parser that can automate this task (pr...
8
Solved
I'm trying to use flex and bison to create a filter, because I want get certain grammar elements from a complex language. My plan is to use flex + bison to recognise the grammar, and dump out the l...
Gorlicki asked 18/3, 2009 at 1:49
2
Hello there: Do you folks know of any GNU/Linux utility to format a Bison grammar file, containing C code, nicely? I'm thinking of something along the lines of GNU Indent, but designed to bea...
Septuor asked 13/6, 2010 at 11:11
1
Solved
I'm attempting to use the type mpz_t from the GMP library as the type for yylval by including the following in the Bison file:
%define api.value.type {mpz_t}
I checked the generated parser and i...
1
Solved
I am trying to compile my program which has a lex file and a yacc file and a couple of C files.I came across this example in the Flex manual.
I have a couple of questions regarding this makefile.I...
Ret asked 1/9, 2015 at 22:57
1
Solved
I have flex code that copies a string lexeme using strdup().
%{
#include "json.tab.h"
#define YY_DECL extern "C" int yylex()
%}
%option noyywrap
%%
[ \t\n]+ ;
\"[a-zA-Z]+\" {yylval.sval = st...
Vacuity asked 28/6, 2015 at 20:14
2
Solved
I would like to extend the php syntax, in order to tell apart mutable and immutable variables.
$a should be declared mutable (as in standard php)
and #b should be declared immutable.
I've read Ha...
Jeunesse asked 1/6, 2015 at 10:9
5
I am trying to translate my .spl file into a C file (because there is no compiler). I have an example "Hello World" .spl file, and I have downloaded the Shakespeare Programming Language .tar and ex...
Villus asked 17/4, 2013 at 2:23
2
Solved
I've been working through a tutorial on writing compilers with Flex, Bison, and LLVM (http://gnuu.org/2009/09/18/writing-your-own-toy-compiler/), and attempting to compile the final binary fails wi...
Latreshia asked 6/3, 2011 at 0:14
7
Solved
2
Solved
My program that needs to be parsed should be of the form:
program : [declaration]+
;
Which should mean: The program consists of one or more declarations.
Declaration on its turn is of course ...
Eminence asked 24/3, 2015 at 15:1
3
I'm using Bison & Flex for 1 month more or less, so I'm sorry if I don't see something obvious (but I don't think it is).
I have a problem about freeing memory with Flex Bison. Here is what my...
Convergence asked 20/3, 2014 at 13:48
3
Solved
I have the following files:
CP.h
#ifndef CP_H_
#define CP_H_
class CP {
public:
enum Cardinalite {VIDE = '\0', PTINT = '?', AST = '*', PLUS = '+'};
CP(Cardinalite myCard);
virtual ~CP();
pri...
3
Is there a parser available in the open ? Else, i'm planning to write one using the grammar rules in http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf
Thanks.
Tolu asked 1/8, 2012 at 8:8
2
Solved
I am converting my build system from configure/make to a cmake system
The system has some autogenerated files, from bison/flex. The original makefile commands are:
bison --defines=tokens.h --outp...
Barca asked 16/10, 2013 at 8:3
1
Solved
I am trying to write a simple YAML parser, I read the spec from yaml.org,
before I start, I was wondering if it is better to write a hand-rolled parser, or
use lex (flex/bison). I looked at the li...
Raynell asked 19/9, 2011 at 19:18
2
Solved
after upgrading from bison 2.7 to 3.0 I changed the following two lines in my parser definition file (.yy)
-------old--------
%define parser_class_name smathparser
%name-prefix = "imath"
-------ne...
3
Solved
I am building a compiler in flex and bison. The thing is that using char * is giving a lot of problems so I'm trying to migrate everything to string.
The only problem left is that there is a union...
1
Solved
i am working in a small language/IDE. And I need to know how to configure flex and bison to work together but without using any global or static variable. I need to pass to bison my AST pointer. I ...
Lincolnlincolnshire asked 28/2, 2014 at 22:39
3
Solved
OK, I understand this question may sound quite opinion-based, however since I have several specific criteria of choice, I think it would make a nice fit for SO. So, here I am...
I've worked ...
Levins asked 1/3, 2014 at 0:40
2
Solved
I've tried several different parser generators (Bison, DParser, etc.) that claim to be able to generate GLR parsers i.e., ones that can handle ambiguous grammars. Here is a very simple ambiguous gr...
2
Solved
I'm using Bison and Flex to make a reentrant scanner/parser pair but can't wrap my head around where everything is to be included and declared.
First of all, I'm using reentrant Flex so I need to ...
Wire asked 30/9, 2011 at 15:6
1
Solved
My bison-based parser started choking on some moderately sized files I've generated recently.
It throws an exception about "memory exhausted."
The bison man page says that this is likely due to u...
1
Solved
When I compile the below grammar with bison test.y, it warns that the nonterminals "header_stms" and "forward" are useless. Why? They are used in the "program" rule. The nonterminal "stm" is not re...
Sungsungari asked 12/1, 2014 at 1:18
© 2022 - 2024 — McMap. All rights reserved.