Re: Updating a legacy bison/yacc grammar file (HELP!)

Aryeh Friedman <[email protected]>
Newsgroups gmane.comp.parsers.bison.general
Message-ID <CAGBxaXnigfBm0QqQtbTN-pkv-J1ogDZQS0oei=w-3S_CPu0stw@mail.gmail.com>
On Mon, Jun 15, 2020 at 3:57 AM Aryeh Friedman <[email protected]>
wrote:

>
>
> On Mon, Jun 15, 2020 at 12:49 AM Akim Demaille <[email protected]> wrote:
>
>>
>> You should look for the place where the symbols have be renamed.  It
>> might be outside of the grammar itself, in the build system.  Have a
>> look at this bug report, and the answers.
>>
>> https://lists.gnu.org/r/bug-bison/2020-05/msg00093.html
>>
>
> I will study the report and the answers *VERY* carefully since the grammar
> I am having problems with is for aegis which was written by the same person
> who wrote fhist and libexplain (the two programs the report pertains to)
>

That helped significantly but I still have a few more errors on linking now
that compiling is done:

c++ -v -o unspecified/bin/fmtgen -rdynamic -g -L/usr/local/lib
unspecified/fmtgen/parse.yacc.o unspecified/fmtgen/arglex.o
unspecified/fmtgen/generator.o unspecified/fmtgen/generator/factory.o
unspecified/fmtgen/generator/introsp_code.o
unspecified/fmtgen/generator/introsp_incl.o
unspecified/fmtgen/generator/orig_code.o
unspecified/fmtgen/generator/orig_include.o
unspecified/fmtgen/generator/pair.o unspecified/fmtgen/indent.o
unspecified/fmtgen/lex.o unspecified/fmtgen/main.o
unspecified/fmtgen/type.o unspecified/fmtgen/type/boolean.o
unspecified/fmtgen/type/boolean/code.o
unspecified/fmtgen/type/boolean/include.o
unspecified/fmtgen/type/boolean/introsp_code.o
unspecified/fmtgen/type/boolean/introsp_incl.o
unspecified/fmtgen/type/enumeration.o
unspecified/fmtgen/type/enumeration/code.o
unspecified/fmtgen/type/enumeration/include.o
unspecified/fmtgen/type/enumeration/introsp_code.o
unspecified/fmtgen/type/enumeration/introsp_incl.o
unspecified/fmtgen/type/integer.o unspecified/fmtgen/type/integer/code.o
unspecified/fmtgen/type/integer/include.o
unspecified/fmtgen/type/integer/introsp_code.o
unspecified/fmtgen/type/integer/introsp_incl.o
unspecified/fmtgen/type/list.o unspecified/fmtgen/type/list/code.o
unspecified/fmtgen/type/list/include.o
unspecified/fmtgen/type/list/introsp_code.o
unspecified/fmtgen/type/list/introsp_incl.o unspecified/fmtgen/type/pair.o
unspecified/fmtgen/type/real.o unspecified/fmtgen/type/real/code.o
unspecified/fmtgen/type/real/include.o
unspecified/fmtgen/type/real/introsp_code.o
unspecified/fmtgen/type/real/introsp_incl.o
unspecified/fmtgen/type/string.o unspecified/fmtgen/type/string/code.o
unspecified/fmtgen/type/string/include.o
unspecified/fmtgen/type/string/introsp_code.o
unspecified/fmtgen/type/string/introsp_incl.o
unspecified/fmtgen/type/structure.o
unspecified/fmtgen/type/structure/code.o
unspecified/fmtgen/type/structure/include.o
unspecified/fmtgen/type/structure/introsp_code.o
unspecified/fmtgen/type/structure/introsp_incl.o
unspecified/fmtgen/type/time.o unspecified/fmtgen/type/time/code.o
unspecified/fmtgen/type/time/include.o
unspecified/fmtgen/type/time/introsp_code.o
unspecified/fmtgen/type/time/introsp_incl.o
unspecified/fmtgen/type/top_level.o
unspecified/fmtgen/type/top_level/code.o
unspecified/fmtgen/type/top_level/include.o
unspecified/fmtgen/type/top_level/introsp_code.o
unspecified/fmtgen/type/top_level/introsp_incl.o
unspecified/fmtgen/type/vector.o unspecified/common/common.a -lxml2 -lcurl
-lmagic -lcrypt -lbz2 -lz -lm -lfl
 0:00:00.001 elapsed
 0:00:00.000 usr   0.0%
 0:00:00.001 sys  78.5%
FreeBSD clang version 8.0.1 (tags/RELEASE_801/final 366581) (based on LLVM
8.0.1)
Target: x86_64-unknown-freebsd12.1
Thread model: posix
InstalledDir: /usr/bin
 "/usr/bin/ld" --eh-frame-hdr -export-dynamic -dynamic-linker
/libexec/ld-elf.so.1 --hash-style=both --enable-new-dtags -o
unspecified/bin/fmtgen /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o
-L/usr/local/lib -L/usr/lib unspecified/fmtgen/parse.yacc.o
unspecified/fmtgen/arglex.o unspecified/fmtgen/generator.o
unspecified/fmtgen/generator/factory.o
unspecified/fmtgen/generator/introsp_code.o
unspecified/fmtgen/generator/introsp_incl.o
unspecified/fmtgen/generator/orig_code.o
unspecified/fmtgen/generator/orig_include.o
unspecified/fmtgen/generator/pair.o unspecified/fmtgen/indent.o
unspecified/fmtgen/lex.o unspecified/fmtgen/main.o
unspecified/fmtgen/type.o unspecified/fmtgen/type/boolean.o
unspecified/fmtgen/type/boolean/code.o
unspecified/fmtgen/type/boolean/include.o
unspecified/fmtgen/type/boolean/introsp_code.o
unspecified/fmtgen/type/boolean/introsp_incl.o
unspecified/fmtgen/type/enumeration.o
unspecified/fmtgen/type/enumeration/code.o
unspecified/fmtgen/type/enumeration/include.o
unspecified/fmtgen/type/enumeration/introsp_code.o
unspecified/fmtgen/type/enumeration/introsp_incl.o
unspecified/fmtgen/type/integer.o unspecified/fmtgen/type/integer/code.o
unspecified/fmtgen/type/integer/include.o
unspecified/fmtgen/type/integer/introsp_code.o
unspecified/fmtgen/type/integer/introsp_incl.o
unspecified/fmtgen/type/list.o unspecified/fmtgen/type/list/code.o
unspecified/fmtgen/type/list/include.o
unspecified/fmtgen/type/list/introsp_code.o
unspecified/fmtgen/type/list/introsp_incl.o unspecified/fmtgen/type/pair.o
unspecified/fmtgen/type/real.o unspecified/fmtgen/type/real/code.o
unspecified/fmtgen/type/real/include.o
unspecified/fmtgen/type/real/introsp_code.o
unspecified/fmtgen/type/real/introsp_incl.o
unspecified/fmtgen/type/string.o unspecified/fmtgen/type/string/code.o
unspecified/fmtgen/type/string/include.o
unspecified/fmtgen/type/string/introsp_code.o
unspecified/fmtgen/type/string/introsp_incl.o
unspecified/fmtgen/type/structure.o
unspecified/fmtgen/type/structure/code.o
unspecified/fmtgen/type/structure/include.o
unspecified/fmtgen/type/structure/introsp_code.o
unspecified/fmtgen/type/structure/introsp_incl.o
unspecified/fmtgen/type/time.o unspecified/fmtgen/type/time/code.o
unspecified/fmtgen/type/time/include.o
unspecified/fmtgen/type/time/introsp_code.o
unspecified/fmtgen/type/time/introsp_incl.o
unspecified/fmtgen/type/top_level.o
unspecified/fmtgen/type/top_level/code.o
unspecified/fmtgen/type/top_level/include.o
unspecified/fmtgen/type/top_level/introsp_code.o
unspecified/fmtgen/type/top_level/introsp_incl.o
unspecified/fmtgen/type/vector.o unspecified/common/common.a -lxml2 -lcurl
-lmagic -lcrypt -lbz2 -lz -lm -lfl -lc++ -lm -lgcc --as-needed -lgcc_s
--no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed
/usr/lib/crtend.o /usr/lib/crtn.o
ld: error: undefined symbol: yylex()
>>> referenced by parse.yacc.cc:1324 (fmtgen/parse.yacc.cc:1324)
>>>               unspecified/fmtgen/parse.yacc.o:(yyparse())
c++: error: linker command failed with exit code 1 (use -v to see
invocation)

In fmtgen/parse.y (which gets bisoned into fmt/parse.yacc.cc ... the
original problem I reported was caused by some sed calls as described in
the archived message you pointed me to) I have:

extern int yylex(void);

-- 
Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.