yacc

How to use Bison (Yacc) to produce 64bit parser in C++?

Can anyone shed some light on this? From Bison's documentation, I didn't see anything related to this topic. Thanks very much in advance. Mark ...

SCONS: making a special script builder depend on output of another builder

I hope the title clarifies what I want to ask because it is a bit tricky. I have a SCONS SConscript for every subdir as follows (doing it in linux, if it matters): src_dir compiler SConscript yacc srcs scripts legacy_script data SConscript data files for the yacc I use a variant_dir without copy, for example: SConscrip...

Viewing of stack during yacc parsing

Is there a way to see the stack(for better understanding of working of yacc) during each step of yacc parsing. ...

AST for any arbitrary programming language or IR

Hi All, Is it possible to create an AST for any arbitrary programming language or IR using C or C++ alone (without the help of tools like YACC and LEX )? If so, how to implement the lexical and syntactic analysis ? If not, what are the tools that have to augmented to C or C++ to successfully create an AST ? Hope I made my doubt clear...

how to install Lex and Yacc in Ubuntu ?

Hello, I am doing project in SENSE, for that i have to install Lex and Yacc. If you can help me how to install in Ubuntu. I very new to this area. So can you help me. Any website to study the basic of Lex and Yacc ...

How to get started with yacc ?

What are their unique feature that other softwares don't have? ...

Problem using yyin with yacc file

I am using Yacc and lex to parse a C type language , I have built the data structures using c++. everything works fine but i am not able to read the input file using yyin in main.cpp. the following is the code : Please help ! #include "parse_tree.h" #include<iostream> #include<cstdlib> #include<stdio.h> #include"y.tab.h" extern "C" FI...

why calles function yyerror() in sample programm

curs.l : %{ #include <stdlib.h> #include "tree.c" #include "yycurs.h" %} L [a-zA-Z_] D [0-9] D4 [0-3] IDENTIFIER ({L})({L}|{D})* INT4 {D4}+'q' INT {D}+ %% {IDENTIFIER} {return VARIABLE;} %% int yywrap(void){ return 0; } curs.y: %{ #include stdio.h void yyerror(char*); int yylex(void); %} %token VARIABLE INTEGER %% va...

What goes in between { and } when writing BNF?

I'm having some trouble with BNF. I can't tell what seems to be the standard way of doing things (if there is one), and whether or not there are types like char or int or whatever already built in. However, my main problem is not understand how the part of the BNF in curly braces works. Given something like: exp : term ...

Ignoring errors in yacc/lex

I'm new to yacc/lex and I'm working on a parser that was written by someone else. I notice that when an undefined token is found, the parser returns an error and stops. Is there a simple way to just make it ignore completely lines that it cannot parse and just move on to the next one? ...