473,715 Members | 6,082 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

yacc gurus

Hi
I have been trying to add a mid-rule to my yacc grammar but I always get
shift and reduce conflicts

pel-0.0.3.y contains 12 shift/reduce conflicts and 12 reduce/reduce
conflicts.

does anobody know other way? I was using yacc and then I tried bison but
they are the same, I have done what is in the manual but there they have a
very limited mid-rule topic

Thanks The Prophet
_______________ ___

Nov 14 '05 #1
18 1503
In article <27************ *************** ***@localhost.t alkaboutprogram ming.com>,
Profetas <xu*****@yahoo. com> wrote:
I have been trying to add a mid-rule to my yacc grammar but I always get
shift and reduce conflicts


You may get better results by asking this in comp.compilers.

--
rr
Nov 14 '05 #2
Profetas wrote:

Hi
I have been trying to add a mid-rule to my yacc grammar but I always get
shift and reduce conflicts

And this is a C question in what way?


Brian Rodenborn
Nov 14 '05 #3
>And this is a C question in what way?
If you don't know the topic don't even reply, google it

Nov 14 '05 #4
"Profetas" <xu*****@yahoo. com> writes:
And this is a C question in what way?

If you don't know the topic don't even reply, google it


His point is that questions about yacc are off-topic here in
comp.lang.c.

Since yacc is written in C, and generates C code as output, it's not
entirely unreasonable to assume that questions about it are topical --
but they're not. Since this is a very busy newsgroup, we're a bit
sensitive about topicality.

Either comp.compilers or (for bison) one of the gnu.* newsgroups might
be able to help you.

--
Keith Thompson (The_Other_Keit h) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Nov 14 '05 #5
Profetas <xu*****@yahoo. com> spoke thus:
does anobody know other way? I was using yacc and then I tried bison but
they are the same, I have done what is in the manual but there they have a
very limited mid-rule topic


Your post is off-topic for comp.lang.c. Please visit

http://www.ungerhu.com/jxh/clc.welcome.txt
http://www.eskimo.com/~scs/C-faq/top.html
http://benpfaff.org/writings/clc/off-topic.html

for posting guidelines and frequently asked questions. Thank you.

--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cybers pace.org | don't, I need to know. Flames welcome.
Nov 14 '05 #6
In <ln************ @nuthaus.mib.or g> Keith Thompson <ks***@mib.or g> writes:
Since yacc is written in C, and generates C code as output, it's not
entirely unreasonable to assume that questions about it are topical --
but they're not.


By this logic, since cfront (or f2c or p2c or any of the other xxx to C
converters) is written in C and generates C code as output it's not
entirely unreasonable to assume that questions about it are topical.

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 14 '05 #7

On Tue, 20 Jul 2004, Dan Pop wrote:

In <ln************ @nuthaus.mib.or g> Keith Thompson <ks***@mib.or g> writes:
Since yacc is written in C, and generates C code as output, it's not
entirely unreasonable to assume that questions about it are topical --
but they're not.


By this logic, since cfront (or f2c or p2c or any of the other xxx to C
converters) is written in C and generates C code as output it's not
entirely unreasonable to assume that questions about it are topical.


Right. Which is why it could surprise a newbie to discover that
questions about cfront, like questions about yacc, are not topical.
Read for comprehension, Dan. (Didn't someone quite recently warn
you that you were flailing around annoying people, and you ought to
stick to the good C-related answers you are /good/ at providing?)

-Arthur
Nov 14 '05 #8
In article <cd***********@ sunnews.cern.ch >, Dan Pop wrote:
In <ln************ @nuthaus.mib.or g> Keith Thompson <ks***@mib.or g> writes:
Since yacc is written in C, and generates C code as output, it's not
entirely unreasonable to assume that questions about it are topical --
but they're not.


By this logic, since cfront (or f2c or p2c or any of the other xxx to C
converters) is written in C and generates C code as output it's not
entirely unreasonable to assume that questions about it are topical.


He did not argued that such logic is valid, he just showed why some
people might consider those questions topical.

--
Rob van der Leek | rob(at)ricardis (dot)tudelft(do t)nl
Nov 14 '05 #9
In <sl************ *************@c enterfold.its-s.tudelft.nl> Rob van der Leek <ro***********@ yahoo.com> writes:
In article <cd***********@ sunnews.cern.ch >, Dan Pop wrote:
In <ln************ @nuthaus.mib.or g> Keith Thompson <ks***@mib.or g> writes:
Since yacc is written in C, and generates C code as output, it's not
entirely unreasonable to assume that questions about it are topical --
but they're not.


By this logic, since cfront (or f2c or p2c or any of the other xxx to C
converters) is written in C and generates C code as output it's not
entirely unreasonable to assume that questions about it are topical.


He did not argued that such logic is valid, he just showed why some
people might consider those questions topical.


Since when "it is not entirely unreasonable" is supposed to mean "it is
illogical"?

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 14 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
6338
by: Profetas | last post by:
Hi. I was wondering how can I access the yacc functions? because when use a normal yacc function such as qstring { yylval.string = strdup(yytext+1); if(yylval.string !='"') warning("Undeterminated Character strig",(char *)0); else
4
4900
by: Rodrick Brown | last post by:
This might be off topic but can someone give me a quick run down on why tools like lexx/yacc/bison are usefull ? I know what there used for but not sure when they should be used and where ? Thanks. -- Rodrick R. Brown
6
15480
by: Volker Hetzer | last post by:
Hi! We are finding ourselves in a situation where we have to parse several more or less free format text files. In the past, on linux, we had flex and bison for generating very fast parsers for these files. Is there any equivalent in the visual studio world? Lots of Greetings! Volker --
1
4280
by: deepusrp | last post by:
Helo everyone, i am doing a project on some graphic tool using qt as the front end. i am using lex and yacc as parser. now i am facing a problem since yacc generates only c code as i want to bring c++ features. so my request is " is there any way that we can create parser in qt itself or is there any method by which i can make a c++ (yacc) Parser... "
13
5018
by: Berk Birand | last post by:
Hi, I am working on a school project where we use lex/yacc to write a compiler for a fictional (Java-like) language. I have handled all the details about the yacc and lex files, but I still have a question regarding the dynamic memory allocation for strings. When the lex file encounters a variable name, I want it to pass this to yacc through yylval, and then retrieve it to add to a syntax tree. For this purpose, I wrote the following...
2
7521
by: max.giacometti | last post by:
Hi everybody! I am using lex and yacc to write a vhdl to systemc converter. Lex simply reads the input file and yacc implements grammar and translation. I'd like to be able to make yacc able to command lex to stop reading the current file and starting reading another file, when the inclusion syntax is reached.
2
1953
by: Mohitz | last post by:
Hi Guys, I am facing a peculiar problem with my yacc script. Following is the snippet of the yacc script that i am using. I am using lex as the lexical analyzer. Sample Input :
1
1915
by: neena.usenet | last post by:
I have a gui that reads in a file using C++/yacc. If the file has a parsing error, yacc throws the error to my program and I report it. The problem is at that point, I would like to try to open a different file, one that has no syntax errors. When I try to open this second file, yacc throws me another error which I believe is leftover from parsing the first file. How do I clear the yacc "error stack"?
1
2029
by: Robert | last post by:
If the goal is to take a 1-dimensional package of text and produce a tree data structure that is easy to understand and manipulate, and then write C/C++ code that works with that tree - does lex/yacc suit that purpose - i.e. kind of like a tree-manufacturing C library? Or is it for producing a compiler/interpreter the internals of which a new C/ C++ program cannot so easily work with?
0
8823
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8718
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9104
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9047
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7973
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4477
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3175
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2541
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2119
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.