473,657 Members | 2,593 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Compile errors in *.y file (yacc ???)

Hello!

I'm trying to fix code of esnacc to compile it in gcc4.0. I've fixed
almost all c/c++ code, but I've completly no idea about yacc.
Can someone help me how to fix the following warnings:

core/parse-asn1.y: In function 'yyparse':
core/parse-asn1.y:1517: warning: format '%ld' expects type 'long int',
but argument 4 has type 'AsnInt'
core/parse-asn1.y: In function 'InitAsn1Parser ':
core/parse-asn1.y:3537: warning: implicit declaration of function
'yyrestart'
Below is the code:

@1515:
else
{
PrintErrLoc (modulePtrG->asn1SrcFileNam e, $3->lineNo);
fprintf (errFileG, "ERROR - attempt to implicitly reference
untagged type\n");
smallErrG = 1;
}

@3535:
#ifdef FLEX_IN_USE
if (!firstTimeThro ughG)
yyrestart (fPtr);

firstTimeThroug hG = FALSE;
#endif

best regards
Jarek
Feb 24 '06 #1
1 2610
"Jarek" <ja***@poczta.s rv.pl> schrieb im Newsbeitrag
news:dt******** **@atlantis.new s.tpi.pl...
Hello!

I'm trying to fix code of esnacc to compile it in gcc4.0. I've fixed
almost all c/c++ code, but I've completly no idea about yacc.
Can someone help me how to fix the following warnings:

core/parse-asn1.y: In function 'yyparse':
core/parse-asn1.y:1517: warning: format '%ld' expects type 'long int', but
argument 4 has type 'AsnInt'
core/parse-asn1.y: In function 'InitAsn1Parser ':
core/parse-asn1.y:3537: warning: implicit declaration of function
'yyrestart'


Which errors? Those are only warnings. For the first one, check the
definition of AsnInt. If it is typedef'ed as 'long int' or just 'long',
ignore that warning. Otherwise test with a little program that you can
printf a value of type AsnInt when a long int is expected. The second error
you can safely ignore. It just tells you that there is no prototype for
yyrestart, and the compiler simply assumes that the call matches the
definition of that function.

HTH
Heinz
Feb 24 '06 #2

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

Similar topics

8
16834
by: pavel.orehov | last post by:
Hi, I am using flex and bizon to write HTTP parser. I am passing well flex and bison tools but can't compile their output. ================= Flex file (http_parser.lpp) ============== %{ #include <iostream> #include "http_parser.tab.hpp"
0
2029
by: Jérôme Le Bougeant | last post by:
Hello (and sorry for my English), I downloaded the VideoCapture module on the http://videocapture.sourceforge.net/ site. I tested it with a webcam and that functions. Now I want to compile his file .cpp (vidcap.cpp). Thereafter, the idea is to be able to modify the code to include my own modifications.
5
1516
by: Torben Laursen | last post by:
Hi Often I just want to compile one c++ file in a project the check it for errors. Now I can right click on a *.cpp file and select "Compile" But is there a way and short cut to compile a file of any type. luke *.cc, *.h, *hpp Thanks Torben
1
4276
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... "
5
2160
by: Benny the Guard | last post by:
I am writing a parser to handle input commands and process them. There are some builtin in commands that it will recognize one of which is TOK_CMD with another keyword after it (all tokenized based on supported commands). The processing is working great for real commands, so moving on to error detection. I have the rule: | TOK_CMD error TOK_EOL { printf ("illegal command dummy\n"); } | error TOK_EOL {
5
2174
by: thomas | last post by:
hello I m writing a simple parser using bison. I just used someone's else c++ grammar, to produce a code beutifier. The thing is , most of the actions for productions would have form {$$ = $1 + $2 + $3} and so forth depending on number of terminals in production. Is it possible to set default action for all the productions like the one above ? It is something strange to type this formula for over 200 productions.
9
2450
by: beet | last post by:
Hi, I am really not good at c/c++. Some simple code.. #include <stdio.h> #include <stdlib.h> #include <math.h> #include "simlibdefs.h"
2
6918
by: Andrus | last post by:
I need compile in-memory assembly which references to other in-memory assembly. Compiling second assembly fails with error Line: 0 - Metadata file 'eed7li9m, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' could not be found Saving assembly to Windows temp directory for referencing only creates huge amout of temporary
1
5186
by: mh | last post by:
I'm porting a C lex/yacc based project, and would like to redo it in python. What's the best option for a python lex/yacc-like? I've googled a few things, but wanted to see the current concensus. Many TIA! Mark --
0
8303
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,...
0
8821
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8723
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8602
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
7316
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...
1
6162
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4150
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
2726
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

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.