473,382 Members | 1,743 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

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 1477
In article <27******************************@localhost.talkab outprogramming.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_Keith) 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)cyberspace.org | don't, I need to know. Flames welcome.
Nov 14 '05 #6
In <ln************@nuthaus.mib.org> Keith Thompson <ks***@mib.org> 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.org> Keith Thompson <ks***@mib.org> 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.org> Keith Thompson <ks***@mib.org> 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(dot)nl
Nov 14 '05 #9
In <sl*************************@centerfold.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.org> Keith Thompson <ks***@mib.org> 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
In <Pi**********************************@unix46.andre w.cmu.edu> "Arthur J. O'Dwyer" <aj*@nospam.andrew.cmu.edu> writes:

On Tue, 20 Jul 2004, Dan Pop wrote:

In <ln************@nuthaus.mib.org> Keith Thompson <ks***@mib.org> 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.


In my almost 12 years spent on c.l.c, I have never seen a newbie posting
questions about cfront here. So, apparently, newbies are familiar with
the idea that cfront, despite being written in C and generating C code,
is topical elsewhere.

On an unrelated note, it seems that most of the confusion between C and
C++ is caused by compilers and IDEs that accept both languages, using one
heuristic or another to "guess" the language intended by the user. So,
someone intending to write C code might get the wrong ideas about the
language if his tool is operating in C++ mode. Seen this quite
frequently on c.l.c: people compiling "C" files with the extension cpp.
Read for comprehension, Dan. (Didn't someone quite recently warn


I do. Do *you*?

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 14 '05 #11
Profetas wrote:
And this is a C question in what way?

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


Again I ask, how is this a question about the C language? You asked it,
it ain't up to me to go google anything. You obviously didn't bother
with checking out the newsgroup before posting your question to see
whether it was on-topic or not.

Brian Rodenborn
Nov 14 '05 #12

On Tue, 20 Jul 2004, Dan Pop wrote:

"Arthur J. O'Dwyer" <aj*@nospam.andrew.cmu.edu> writes:
On Tue, 20 Jul 2004, Dan Pop wrote:
In <ln************@nuthaus.mib.org> Keith Thompson <ks***@mib.org> 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.


In my almost 12 years spent on c.l.c, I have never seen a newbie posting
questions about cfront here.


This is because newbies do not know what cfront /is/. Even 12
years ago, I bet there weren't too many newbies using cfront. But
it would not surprise me if a newbie /did/ ask a question about
cfront here, thinking it was topical. I wouldn't be surprised if
it rained tomorrow, either --- even though I've never seen it rain
tomorrow in... well... /more/ than 12 years!

Note for the Pops in the audience: The bit about raining was
intended humorously. It is not a direct analogy. However, just
because newbies don't know cfront exists doesn't necessarily
mean they know all about its topicality here. I rather suspect
the opposite.

-Arthur,
signing off
Nov 14 '05 #13
Da*****@cern.ch (Dan Pop) writes:
In <sl*************************@centerfold.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.org> Keith Thompson <ks***@mib.org> 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"?


It doesn't, and nobody has said it did.

I believe my original point was sufficiently clear. Based on past
experience, I doubt that I'll be able to explain it to Dan's
satisfaction, so I'm not going to try.

--
Keith Thompson (The_Other_Keith) 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 #14
In <ln************@nuthaus.mib.org> Keith Thompson <ks***@mib.org> writes:
Da*****@cern.ch (Dan Pop) writes:
In <sl*************************@centerfold.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.org> Keith Thompson <ks***@mib.org> 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"?


It doesn't, and nobody has said it did.

I believe my original point was sufficiently clear.


Indeed. I was pointing out its fallacy, not its lack of clarity.
Based on past
experience, I doubt that I'll be able to explain it to Dan's
satisfaction, so I'm not going to try.


There is nothing needing further explanations. Your point was wrong
and I have explained why.

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 14 '05 #15
In <Pi**********************************@unix45.andre w.cmu.edu> "Arthur J. O'Dwyer" <aj*@nospam.andrew.cmu.edu> writes:

On Tue, 20 Jul 2004, Dan Pop wrote:

"Arthur J. O'Dwyer" <aj*@nospam.andrew.cmu.edu> writes:
>On Tue, 20 Jul 2004, Dan Pop wrote:
>> In <ln************@nuthaus.mib.org> Keith Thompson <ks***@mib.org> 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.


In my almost 12 years spent on c.l.c, I have never seen a newbie posting
questions about cfront here.


This is because newbies do not know what cfront /is/.


I was, obviously, not talking about C newbies, but about cfront newbies.
Read for comprehension, Arthur.

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 14 '05 #16
what a chaos here, 15 posts to decide if it off topic or not. people here
must have a lot of time lol, if some one post a off topic question just
give him/her a link of the "rules" that show that it is off topic.

Nov 14 '05 #17
"Profetas" <xu*****@yahoo.com> wrote in message
news:4a******************************@localhost.ta lkaboutprogramming.com...
what a chaos here, 15 posts to decide if it off topic or not. people here
must have a lot of time lol, if some one post a off topic question just
give him/her a link of the "rules" that show that it is off topic.


It's "someone" not "some one".

--
Mabden
Nov 14 '05 #18
ra*@zedat.fu-berlin.de (Stefan Ram) writes:
"Mabden" <mabden@sbc_global.net> writes:
It's "someone" not "some one".


You should use a comma in front of "not".


And then we'll get to argue whether the comma should go inside or
outside the quotation marks!
--
Ben Pfaff
email: bl*@cs.stanford.edu
web: http://benpfaff.org
Nov 14 '05 #19

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

Similar topics

4
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 !='"')...
4
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 ? ...
6
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...
1
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...
13
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...
2
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...
2
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
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...
1
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...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...

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.