423,516 Members | 2,068 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 423,516 IT Pros & Developers. It's quick & easy.

parse error

P: n/a
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
Share this Question
Share on Google+
5 Replies


P: n/a
"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

P: n/a
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

P: n/a
"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

P: n/a
> 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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.