yacc Questions
3
Solved
I am running my fedora on VMware Workstation. I am having a lex and yacc program. Compilation of program is working fine but when i go to run the program through gcc y.tab.c lex.yy.c -ll it gives f...
4
Solved
Is there a simple way for integrating Bison/Flex/Yacc into XCode?
I want to write my own language to be parsed, which interacts with my ObjC objects.
But the tools will only take STDIN as input, ...
Bridgeman asked 9/6, 2011 at 17:19
6
This is my code in file skener.y
%{
#include <stdio.h>
%}
%token T_Int
%%
exp: T_Int { $$ = $1; }
| exp exp '+' { $$ = $1 + $2; }
| exp exp '-' { $$ = $1 - $2; }
| exp exp '*' { $$ = $1 * ...
2
Solved
Using this command:
go tool yacc -p Verb -o verb.go boilerplate.y
Trying to build this yacc file:
// boilerplate.y
%{
package main
import (
"bufio"
"fmt"
"os"
"unicode"
)
%}
%%
.|\n ...
6
I want to parse a string which I give to the parser in the main function of yacc . I know that this could be done by using yy_scan_string but I don't know how to use it. I searched the web and the ...
3
Solved
OK, so I suppose my question is quite self-explanatory.
I'm currently building a parser in Bison, and I want to make error reporting somewhat better.
Currently, I've set %define parse.error verbo...
Aboutship asked 14/3, 2014 at 14:24
2
Solved
Does anyone knows if there are some tutorials and/or examples of using GNU Bison with Java over the net. I've searched through the net. But i didn't manage to find anything. I have tried to impleme...
Provincetown asked 13/2, 2012 at 21:43
5
Solved
If I forget to put an empty line at the end of any of my files my program gets a syntax error. The problem is my grammar expects a newline to end the current line. Since a newline doesn't exist bis...
2
Solved
I try to learn about language parser recently and always seen the review about difference in Yacc and Antlr (about LALR and LL). It was always some concluded wording like "LALR is more powerful". B...
Unlace asked 29/8, 2019 at 5:15
7
Solved
I would like to create my own programming language. Maybe not exactly a programming language from scratch but maybe base it on another language.
I've heard of Yacc. So, I installed Flex and Bison...
Inodorous asked 12/7, 2013 at 7:56
3
I'm in the process of designing software to run in an embedded environment where the use of dynamic memory is prohibited. Lex and Yacc are well suited for the application.
Can I configure Lex and...
Vastha asked 10/1, 2011 at 16:22
5
Solved
I'm looking for a syntax in Sublime Text that highlights my Flex and Bison files (or lex/yacc) in a way that makes them readable... Sublime Text automatically chooses Lisp for Flex files, but that ...
Inquiline asked 2/10, 2013 at 12:19
9
Solved
I'm having Lex and YACC files to parse my files (.l file and .y file).
How to compile those files and how to make equivalent .c file for them in windows platform?
Drawtube asked 28/3, 2011 at 7:47
8
Solved
I want to create a read-eval-print loop using flex/bison parser. Trouble is, the flex generated lexer wants input of type FILE* and i would like it to be char*. Is there anyway to do this?
One sug...
Parliamentary asked 23/4, 2009 at 7:34
2
Solved
I am working on building a lexical and syntax analyzer. I am getting the following warning when I try to use flex with my .l file.
littleDuck.l:26: warning, rule cannot be matched
Rule 26 is th...
Camail asked 24/2, 2013 at 22:25
3
Solved
Lex part :
%%
[0-9]+ { yyval = atoi (yytext); return num; }
%%
Yacc part :
%token num
%%
exp:num '+' num ; {$$ = $1 + $3;}
%%
In this part of the code what do $$, $1 and $2 stand for?
How...
1
The overall question is:
How does my grammar have to look like to allow for arbitrarily nested expr := '(' expr ')' => expr | expr_without_short_closure and expr_without_short_closure := [expr_...
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...
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
2
I am unfamiliar with Yacc and trying to get an example I found here to work. When I try to compile with yacc -d calc.yacc, I get the following errors.
calc.yacc:42.17-18: $1 of `stat' has no decla...
Potoroo asked 5/8, 2013 at 1:15
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
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
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
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
2
I am trying to create a parser using golang's yacc tool. I found nex to simplify creating a lexer to give the parser. My problem now is that the generated parser has no method or field to give me a...
1 Next >
© 2022 - 2024 — McMap. All rights reserved.