[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[help-3dldf] Re: CVS 3DLDF:scanprse.web:451: error: `yyparse' was not de
From: |
Laurence Finston |
Subject: |
[help-3dldf] Re: CVS 3DLDF:scanprse.web:451: error: `yyparse' was not declared in this scope |
Date: |
Wed, 4 Apr 2007 16:30:50 +0200 (CEST) |
On Wed, 4 Apr 2007, XXX wrote:
>
> I updated the 3dldf from its latest cvs, but when I make it, I meet the
> following errors:
>
> scanprse.web: In function ???void* Scan_Parse::parse_func(void*)???:
> scanprse.web:451: error: ???yyparse??? was not declared in this scope
>
I've added a declaration of `yyparse' in `io.web' so that it's written
to `io.h', and updated this file, the snapshots, etc.
This should solve the problem. It seems that your version
of GCC (g++) is performing stricter checking than mine.
I'm using GCC 3.3.3.
None of the other "yy-" functions is called in `scanparse.web', so
I hope compilation and linking will work for you now. If you run into
any similar errors, please let me know and I'll try to fix them.
However, you could fix them yourself immediately simply by putting
a function declaration where the compiler will find it before trying
to process a call to that function. All of the functions in 3DLDF are
declared, and the declarations are usually right before the function
definitions in the CWEB files. Each file has a "Putting together"
section at the end. Just copy the declaration in there toward the
beginning. The most likely cause of something going wrong with this
approach is if the arguments or the return value uses a type which
hasn't been fully declared at this point in the process of compilation.
This is what I did for `yyparse':
@q * (1) Putting I/O together.@>
@* Putting I/O together.
\initials{LDF Undated.}
[...]
@q ** (2).@>
@ This is what's compiled.
@c
@<Include files@>@;
@<Version control identifier@>@;
[...]
@q ** (2).@>
@ This is what's written to \filename{io.h}.
\initials{LDF Undated.}
[...]
@(io.h@>=
int yyparse(void*);
@<Declare I/O |structs|@>@;
@<Declare I/O functions@>@;
@<|Id_Map_Entry_Node| declaration@>@;
[...]
@<|Id_Map_Entry_Type| declaration@>@;
@<|Id_Map_Sub_Map_Type| declaration@>@;
@<|Id_Map_Node| declaration@>@;
@<|Id_Map_Type| declaration@>@;
@<|Loop_Info_Node| declaration@>@;
@<|Loop_Info_Type| declaration@>@;
@<|Definition_Info_Node| declaration@>@;
@<|Definition_Info_Type| declaration@>@;
@<|Scanner_Node| declaration@>@;
@<|Scanner_Type| declaration@>@;
@<|extern| variable declarations@>@;
This explanation only applies to functions that aren't members of a
class. Member function of a class are always declared within the
class declaration. Non-class template functions are more complicated,
because they need to be instantiated for every combination of
types which are used for the type parameters. However, I've already
done this, so I'm virtually certain that this particular problem won't
crop up with respect to these functions.
Laurence
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [help-3dldf] Re: CVS 3DLDF:scanprse.web:451: error: `yyparse' was not declared in this scope,
Laurence Finston <=