yacc Questions
4
Solved
1
I'm writing a grammar for parsing a computer language, that can be used with Parse::Eyapp. This is a Perl package that simplifies writing parsers for regular languages. It is similar to yacc and ot...
1
I have created a context free grammar in bison and a scanner in flex. Now i also want to make a semantic check, for example, suppose the input is something like this:
int m=5;
c=c+5;
This input ...
Jacobson asked 27/3, 2013 at 17:47
2
Solved
About once a year I have to develop or at least design a grammar and a parser - that appears a constant of my working life.
Every time I'm facing this task, thus about once year, I, quite a ...
Christean asked 13/5, 2013 at 15:49
1
Solved
for one project in compilers i have one problem in the syntax analyzer,
when i go to add a symbol in a symbol table, i take always the same value in yylineno...
i did this in the begining:
...
Vaud asked 8/5, 2013 at 14:16
12
Solved
Actually, maybe not full-blown Lex/Yacc. I'm implementing a command-interpreter front-end to administer a webapp. I'm looking for something that'll take a grammar definition and turn it into a pars...
7
Solved
I am trying to build a Lisp grammar. Easy, right? Apparently not.
I present these inputs and receive errors...
( 1 1)
23 23 23
ui ui
This is the grammar...
%%
sexpr: atom {printf("matched sex...
3
Solved
Is it possible to make YACC (or I'm my case MPPG) output an Abstract Syntax Tree (AST).
All the stuff I'm reading suggests its simple to make YACC do this, but I'm struggling to see how you know w...
5
Solved
When writing a ("theoretical") grammar with a rule with an empty right-hand side, one always use a symbol such as ε (or 1) to make this emptiness explicit:
A → ε | a A
Such a grammar in Yacc and...
Saturday asked 1/2, 2013 at 13:8
4
Solved
When I try to use yacc on the following file I get the error conflicts: 1 shift/reduce
How can I find and fix the conflict?
/* C-Minus BNF Grammar */
%token ELSE
%token IF
%token INT
%token RETUR...
Icterus asked 15/11, 2009 at 12:48
5
I want my yylex() to parse a string rather than a file or standard input. How can I do it with the Lex and Yacc provided with Solaris?
6
Solved
I'm trying to work on a kind of code generator to help unit-testing an legacy C/C++ blended project. I don't find any kind of independent tool can generate stub code from declaration. So I decide t...
5
Solved
I'm working on a compiler design project in Java. Lexical analysis is done (using jflex) and I'm wondering which yacc-like tool would be best(most efficient, easiest to use, etc.) for doing syntact...
2
Solved
yacc doesn't seem to like when my tokens are of a type that I defined.
At the top of my grammar (.y) file in a %{ ... %} block, I include a header file that defines the following structure:
typed...
2
Solved
I'm using yacc and lex with Visual Studio 2012 C++/CLI and have created a custom build step for the yacc source file as shown in image below
There are two dependencies for the output file. They ...
Fibriform asked 22/9, 2012 at 18:59
1
Solved
This is more of an "in principle" question than a practical one. Is the order in which Yacc reduces productions, and reads new tokens from the lexer defined. That is, if I had the following set of ...
Ambiguity asked 8/9, 2012 at 13:20
2
Solved
I've been using lex/yacc and now I'm trying to switch to ANTLR. The major concern is that ANTLR is an LL(*) parser unlike yacc which is LALR. I'm used to thinking bottom-up and I don't exactly know...
Mcglone asked 29/8, 2012 at 4:26
1
Solved
My compilers class requires us to find a yacc grammar for one of these languages and combine it with the tokenizer we wrote. Presumably this is something easy to Google but I can't find it an...
Greerson asked 14/9, 2011 at 18:40
4
Solved
Is there an implementation of Lex and Yacc in PHP?
If not, can anyone suggest a lexical analyser and parser generator (ie, anything like Lex and Yacc) that will create PHP code. I'm not too...
Susanasusanetta asked 19/1, 2010 at 11:59
2
Solved
am developping a compiler using flex/bison.
I have this warning in my build output.
warning: type clash ('s' '') on default action
any help please?
2
Solved
Is it possible? Any tool available for this?
2
Solved
I was writing a parser to parse C-like grammars.
First, it could now parse code like:
a = 1;
b = 2;
Now I want to make the semicolon at the end of line optional.
The original YACC rule was:
s...
5
Solved
I've used lex and yacc (more usually bison) in the past for various projects, usually translators (such as a subset of EDIF streamed into an EDA app). Additionally, I've had to support code b...
2
Solved
I'm trying to write a lex/yacc grammar for C11 based off of N1570. Most of my grammar is copied verbatim from the informative syntax summary, but some yacc conflicts arose. I've managed to resolve ...
2
I'm working on a parser that parses json string and I want to make it a library.
The problem is that when I use ld to link the library I wrote,
there's a error message:
main.o: In function `main'...
Superiority asked 13/1, 2011 at 13:9
© 2022 - 2024 — McMap. All rights reserved.