public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* parse error at end of input
@ 2004-04-21 18:45 Satish Banukumar
  2004-04-21 19:04 ` Joe Buck
  0 siblings, 1 reply; 8+ messages in thread
From: Satish Banukumar @ 2004-04-21 18:45 UTC (permalink / raw)
  To: gcc

[-- Attachment #1: Type: TEXT/PLAIN, Size: 176 bytes --]

I am getting an error statement "parse error at end if input" when i gmake
the attached file. I says a error at line 62 which is after the end of the
file.

Thank you.

-Satish

[-- Attachment #2: file --]
[-- Type: TEXT/PLAIN, Size: 1398 bytes --]


#include "stage1.cpp"
#include "stage2.cpp"
#include "check.cpp"

int sc_main(int argc, char* argv[])
{

    // signals //////////////////////
    sc_signal<bool> reset, start, init, in_bounds, finished, s2_wakeup, hb_out, done;
    sc_signal<double>	din, dout1, dout;

    sc_time t1(10,SC_NS), t2(5, SC_NS);

     // period of 10 ns, 50% duty, start at time 5 ns, 
     // first edge pos
     sc_clock clk("clk",t1, 0.5,t2);

     // instantiate

     stage1 dut1("stage1");
     dut1.reset(reset);
     dut1.clock(clk);
     dut1.start(start);
     dut1.init(init);
     dut1.din(din);
     dut1.dout(dout1);    
     dut1.finished(finished);
     dut1.s2_wakeup(s2_wakeup);
     dut1.hb_out(hb_out);
     

     stage2 dut2("stage2");
     dut2.clock(clk);
     dut2.reset(reset);    
     dut2.dout(dout);          
     dut2.din(dout1);
     dut2.done(done);
     dut2.in_bounds(in_bounds);
     dut2.finished(finished);
     dut2.s2_wakeup(s2_wakeup);
     dut2.hb_out(hb_out);
     
     
     check check1("check1");
     check1.clock(clk);
     check1.reset(reset);
     check1.start(start);
     check1.init(init);
     check1.dout(din);
     check1.din(dout);
     check1.done(done);        
     check1.finished(finished);
     check1.in_bounds(in_bounds);
     
   
    sc_start(10,SC_MS);
    
    return (0);
        
}

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: parse error at end of input
  2004-04-21 18:45 parse error at end of input Satish Banukumar
@ 2004-04-21 19:04 ` Joe Buck
  2004-04-21 20:37   ` Satish Banukumar
                     ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Joe Buck @ 2004-04-21 19:04 UTC (permalink / raw)
  To: Satish Banukumar; +Cc: gcc

On Wed, Apr 21, 2004 at 01:35:54PM -0500, Satish Banukumar wrote:
> I am getting an error statement "parse error at end if input" when i gmake
> the attached file. I says a error at line 62 which is after the end of the
> file.

You haven't provided a full testcase.  You haven't said what version of
the compiler you're using.  At least I can tell you're using the SystemC
library.

> #include "stage1.cpp"
> #include "stage2.cpp"
> #include "check.cpp"

You haven't said what's in those files.  You can use gcc -E to produce
preprocessor output.  You probably have some form of unbalanced
parentheses or quoting, though the compiler should give you a more usable
error message.

There's a bug in your source, clearly, but I would argue that such a poor
diagnostic is a bug in the compiler.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: parse error at end of input
  2004-04-21 19:04 ` Joe Buck
@ 2004-04-21 20:37   ` Satish Banukumar
  2004-04-21 21:09     ` Joe Buck
  2004-04-25  5:36   ` Error manual for SystemC Satish Banukumar
  2004-04-28  4:20   ` sc_pvector Satish Banukumar
  2 siblings, 1 reply; 8+ messages in thread
From: Satish Banukumar @ 2004-04-21 20:37 UTC (permalink / raw)
  To: Joe Buck; +Cc: gcc

Iam sorry i didnt mention a few things, iam using the gcc compiler, yes
iam using SystemC library. Iam suspicious about the return statement can
you suggest how I can modify the return statement.

-Satish

On Wed, 21 Apr 2004, Joe Buck wrote:

> On Wed, Apr 21, 2004 at 01:35:54PM -0500, Satish Banukumar wrote:
> > I am getting an error statement "parse error at end if input" when i gmake
> > the attached file. I says a error at line 62 which is after the end of the
> > file.
>
> You haven't provided a full testcase.  You haven't said what version of
> the compiler you're using.  At least I can tell you're using the SystemC
> library.
>
> > #include "stage1.cpp"
> > #include "stage2.cpp"
> > #include "check.cpp"
>
> You haven't said what's in those files.  You can use gcc -E to produce
> preprocessor output.  You probably have some form of unbalanced
> parentheses or quoting, though the compiler should give you a more usable
> error message.
>
> There's a bug in your source, clearly, but I would argue that such a poor
> diagnostic is a bug in the compiler.
>
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: parse error at end of input
  2004-04-21 20:37   ` Satish Banukumar
@ 2004-04-21 21:09     ` Joe Buck
  2004-04-23 21:22       ` Dave Korn
  0 siblings, 1 reply; 8+ messages in thread
From: Joe Buck @ 2004-04-21 21:09 UTC (permalink / raw)
  To: Satish Banukumar; +Cc: gcc

On Wed, Apr 21, 2004 at 03:18:24PM -0500, Satish Banukumar wrote:
> Iam sorry i didnt mention a few things, iam using the gcc compiler.

Of course.  What version?  What platform?

> iam using SystemC library. Iam suspicious about the return statement can
> you suggest how I can modify the return statement.

You haven't posted a complete test case, so no one can help you.  There
isn't anything wrong with the return statement.  The error is probably in
one of these files:

> > > #include "stage1.cpp"
> > > #include "stage2.cpp"
> > > #include "check.cpp"

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: parse error at end of input
  2004-04-21 21:09     ` Joe Buck
@ 2004-04-23 21:22       ` Dave Korn
  0 siblings, 0 replies; 8+ messages in thread
From: Dave Korn @ 2004-04-23 21:22 UTC (permalink / raw)
  To: gcc

> -----Original Message-----
> From: gcc-owner On Behalf Of Joe Buck
> Sent: 21 April 2004 21:37

> On Wed, Apr 21, 2004 at 03:18:24PM -0500, Satish Banukumar wrote:
> > Iam sorry i didnt mention a few things, iam using the gcc compiler.
> 
> Of course.  What version?  What platform?
> 
> > iam using SystemC library. Iam suspicious about the return 
> statement can
> > you suggest how I can modify the return statement.
> 
> You haven't posted a complete test case, so no one can help 
> you.  There
> isn't anything wrong with the return statement.  The error is 
> probably in
> one of these files:
> 
> > > > #include "stage1.cpp"
> > > > #include "stage2.cpp"
> > > > #include "check.cpp"

  I agree there's precious little we can do without seeing the source code,
but I do have a suggestion worth considering:

  Does one of those files - particularly check.cpp - have a struct or array
definition at the end which is missing a semicolon after the closing brace?

  You might try putting a semicolon just after the #include "check.cpp"
line, as that will at least tell you if some malformed construct at the end
of that file is being parsed forward into and mangling the parsers
understanding of the main (...) function.

    cheers, 
      DaveK
-- 
Can't think of a witty .sigline today....

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Error manual for SystemC
  2004-04-21 19:04 ` Joe Buck
  2004-04-21 20:37   ` Satish Banukumar
@ 2004-04-25  5:36   ` Satish Banukumar
  2004-04-27  1:54     ` Ben Elliston
  2004-04-28  4:20   ` sc_pvector Satish Banukumar
  2 siblings, 1 reply; 8+ messages in thread
From: Satish Banukumar @ 2004-04-25  5:36 UTC (permalink / raw)
  To: Joe Buck; +Cc: gcc


Hi ,
  I would like to know if there any error manual for System C. When I
compiled my code it didnt give me any error but when i ran my code it gave
me the following error.

Error: (E107) bind interface to port failed: maximum reached: port 'some
port name(sc_in)'
In file ../../../../src/systemc/communication/sc_port.cpp:196

Can you please tell me what this error is and also how I can get the Error
manual.

-Satish

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Error manual for SystemC
  2004-04-25  5:36   ` Error manual for SystemC Satish Banukumar
@ 2004-04-27  1:54     ` Ben Elliston
  0 siblings, 0 replies; 8+ messages in thread
From: Ben Elliston @ 2004-04-27  1:54 UTC (permalink / raw)
  To: gcc

Satish Banukumar <sb304@ece.msstate.edu> writes:

> Can you please tell me what this error is and also how I can get the
> Error manual.

I'm afraid this mailing list is for discussion of GCC development.
Your question should be directed to users/developers of SystemC.

Ben


^ permalink raw reply	[flat|nested] 8+ messages in thread

* sc_pvector
  2004-04-21 19:04 ` Joe Buck
  2004-04-21 20:37   ` Satish Banukumar
  2004-04-25  5:36   ` Error manual for SystemC Satish Banukumar
@ 2004-04-28  4:20   ` Satish Banukumar
  2 siblings, 0 replies; 8+ messages in thread
From: Satish Banukumar @ 2004-04-28  4:20 UTC (permalink / raw)
  To: gcc

Hi ,
  Iam using sc_pvector to store a array of values apparently it says i can
store only values of type <int> iam not able to store float or double. Can
you tell who to store floats in sc_pvector.

Thanks,

Satish

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-04-28  1:38 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-21 18:45 parse error at end of input Satish Banukumar
2004-04-21 19:04 ` Joe Buck
2004-04-21 20:37   ` Satish Banukumar
2004-04-21 21:09     ` Joe Buck
2004-04-23 21:22       ` Dave Korn
2004-04-25  5:36   ` Error manual for SystemC Satish Banukumar
2004-04-27  1:54     ` Ben Elliston
2004-04-28  4:20   ` sc_pvector Satish Banukumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).