473,507 Members | 2,379 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

parse error

I just received a "parse error at end of input" when compiling my code, but
am unsure why. It lists the line as the very last line of my .c file "}"My
code compiled fine yesterday, and I only made some minor adjustments today.

I am using the DJGPP compiler.

Is this parse error indicative of anything particular?

Ideas?

Thanks again!

John

Nov 14 '05 #1
5 7961
"John Hanley" <jd******@telusplanet.net> wrote in
news:10***************@proxy2.srv.ualberta.ca:
I just received a "parse error at end of input" when compiling my code,
but am unsure why. It lists the line as the very last line of my .c
file "}"My code compiled fine yesterday, and I only made some minor
adjustments today.

I am using the DJGPP compiler.

Is this parse error indicative of anything particular?

Ideas?


Sure, give us something to look at (we can't read minds) or start "cutting
out" large chunks of the file with #if / #endif until the error goes away.
Then move back out until you find the problem. Of course you need to be
smart about placement of the if/endif directives.

--
- Mark ->
--
Nov 14 '05 #2
Some times it happends that one may add a { and not close it} like that
"John Hanley" <jd******@telusplanet.net> wrote in message
news:10***************@proxy2.srv.ualberta.ca...
I just received a "parse error at end of input" when compiling my code, but am unsure why. It lists the line as the very last line of my .c file "}"My code compiled fine yesterday, and I only made some minor adjustments today.
I am using the DJGPP compiler.

Is this parse error indicative of anything particular?

Ideas?

Thanks again!

John

Nov 14 '05 #3
"John Hanley" <jd******@telusplanet.net> writes:
I just received a "parse error at end of input" when compiling my code, but
am unsure why. It lists the line as the very last line of my .c file "}"My
code compiled fine yesterday, and I only made some minor adjustments today.


This may indicate that you began more blocks with { than you
closed with }.
--
Ben Pfaff
email: bl*@cs.stanford.edu
web: http://benpfaff.org
Nov 14 '05 #4
> Some times it happends that one may add a { and not close it} like that

I found the problem. It makes sense that it was a parse error because it
was one "}" short. However, it was somewhere in the middle of my code, not
at the end. The error message really threw me off. But that's ok. At
least I found the problem.

Thanks for the help!

John
Nov 14 '05 #5
On Wed, 4 Aug 2004, John Hanley wrote:
I just received a "parse error at end of input" when compiling my code, but
am unsure why. It lists the line as the very last line of my .c file "}"My
code compiled fine yesterday, and I only made some minor adjustments today.

I am using the DJGPP compiler.

Is this parse error indicative of anything particular?

Ideas?


It is usually a missing } or ; that causes this. The compiler will line up
the braces incorrectly because one is missing but it will not realize the
problem until it gets to the end of the translation unit. It is sort of
like doing up the buttons on a shirt. If you miss a button hole you don't
realize it until you get to the bottom and find the last button does not
line up with the last button hole.

--
Send e-mail to: darrell at cs dot toronto dot edu
Don't send e-mail to vi************@whitehouse.gov
Nov 14 '05 #6

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

Similar topics

2
4091
by: Steven | last post by:
I got a "Parse error: parse error in ..." in this line: if(empty($_POST){ ..... But if I fist assign $ssn=$_POST; and then if(empty($ssn){ ... it is working. Any advice? Thanks in advance.
1
2470
by: H.L Bai | last post by:
hi, everybody i meet a parse error when i used the xml4c. any proposal is helpful. The error is following .../XMLRegionHandler.h:59 parse error before '*' .../XMLRegionHandler.h:60 parse...
2
4953
by: Vittal | last post by:
Hello All, I am trying to compile my application on Red Hat Linux 8 against gcc 3.2.2. Very first file in application is failing to compile. I tried compiling my application on Linux 7.2...
21
2884
by: BWIGLEY | last post by:
Basically I've just started making a game. So far it makes an array 25 by 20 and tries to make five rooms within it. In scr_make_room() there's parse errors: 20 C:\c\Rooms\Untitled1.c parse error...
6
8537
by: trevor | last post by:
Incorrect values when using float.Parse(string) I have discovered a problem with float.Parse(string) not getting values exactly correct in some circumstances(CSV file source) but in very similar...
5
64582
AdrianH
by: AdrianH | last post by:
Assumptions I am assuming that you know or are capable of looking up the functions I am to describe here and have some remedial understanding of C++ programming. FYI Although I have called...
1
64004
AdrianH
by: AdrianH | last post by:
Assumptions I am assuming that you know or are capable of looking up the functions I am to describe here and have some remedial understanding of C programming. FYI Although I have called this...
1
3728
by: Phaelle | last post by:
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' What does that error mean? I can´t find the mistake!! In another script, I have got another kind of mistake : parse...
2
3207
by: Lawrence Krubner | last post by:
Imagine a template system that works by getting a file, as a string, and then putting it through eval(), something like this: $formAsString = $controller->command("readFileAndReturnString",...
5
2682
by: goldtech | last post by:
SAX XML Parse Python error message Hi, My first attempt at SAX, but have an error message I need help with. I cite the error message, code, and xml below. Be grateful if anyone can tell me...
0
7376
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...
1
7031
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...
0
7485
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...
0
5623
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,...
0
4702
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...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1542
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 ...
1
760
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
412
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...

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.