mainBison - Support: sr #108692, generated src/scan-gram.c file...

 
 

sr #108692: generated src/scan-gram.c file does not compile

Submitter:  None
Submitted:  Sat 29 Nov 2014 12:07:07 AM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  None
Privacy:  Public Assigned to:  None
Originator Email:  -email is unavailable- Open/Closed:  Closed
Operating System:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 18 Aug 2018 09:19:43 AM UTC, comment #1: 

Hi!

To whoever made this report: thanks!  Could you please try with the latest release of Bison?  3.0.5 at the time of this writing.  Cheers!

Akim Demaille <akim>
Group administrator
Sat 29 Nov 2014 12:07:07 AM UTC, original submission:  

For bison 3.0.2.

tar xpfz bison-3.0.2.tar.gz
cd bison-3.0.2
mv src/scan-gram.c src/scan-gram.c.orig
./configure
...
make
  GEN      examples/extracted.stamp
extexi:  GEN examples/rpcalc/rpcalc.y
extexi:  GEN examples/mfcalc/mfcalc.y
extexi:  GEN examples/mfcalc/calc.h
extexi:  GEN examples/calc++/calc++-driver.hh
extexi:  GEN examples/calc++/calc++-driver.cc
extexi:  GEN examples/calc++/calc++-parser.yy
extexi:  GEN examples/calc++/calc++-scanner.ll
extexi:  GEN examples/calc++/calc++.cc
  GEN      lib/alloca.h
  GEN      lib/configmake.h
  GEN      lib/c++defs.h
  GEN      lib/arg-nonnull.h
  GEN      lib/warn-on-use.h
  GEN      lib/fcntl.h
  GEN      lib/getopt.h
  GEN      lib/inttypes.h
  GEN      lib/math.h
  GEN      lib/signal.h
  GEN      lib/spawn.h
  GEN      lib/stdio.h
  GEN      lib/stdlib.h
  GEN      lib/string.h
  GEN      lib/sys/stat.h
  GEN      lib/sys/types.h
  GEN      lib/sys/wait.h
  GEN      lib/time.h
  GEN      lib/unistd.h
  GEN      lib/unitypes.h
  GEN      lib/uniwidth.h
  GEN      lib/wchar.h
  GEN      lib/wctype.h
  LEX      src/scan-gram.c
make  all-recursive
make[1]: Entering directory `/export/home/kim/tmp/bison-3.0.2'
Making all in po
make[2]: Entering directory `/export/home/kim/tmp/bison-3.0.2/po'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/export/home/kim/tmp/bison-3.0.2/po'
Making all in runtime-po
make[2]: Entering directory `/export/home/kim/tmp/bison-3.0.2/runtime-po'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/export/home/kim/tmp/bison-3.0.2/runtime-po'
Making all in .
make[2]: Entering directory `/export/home/kim/tmp/bison-3.0.2'
  CC       src/bison-AnnotationList.o
  CC       src/bison-InadequacyList.o
  CC       src/bison-LR0.o
  CC       src/bison-Sbitset.o
  CC       src/bison-assoc.o
  CC       src/bison-closure.o
  CC       src/bison-complain.o
  CC       src/bison-conflicts.o
  CC       src/bison-derives.o
  CC       src/bison-files.o
  CC       src/bison-getargs.o
  CC       src/bison-gram.o
  CC       src/bison-graphviz.o
  CC       src/bison-lalr.o
  CC       src/bison-ielr.o
  CC       src/bison-location.o
  CC       src/bison-main.o
  CC       src/bison-muscle-tab.o
  CC       src/bison-named-ref.o
  CC       src/bison-nullable.o
  CC       src/bison-output.o
  CC       src/bison-parse-gram.o
  CC       src/bison-print-xml.o
  CC       src/bison-print.o
  CC       src/bison-print_graph.o
  CC       src/bison-reader.o
  CC       src/bison-reduce.o
  CC       src/bison-relation.o
  CC       src/bison-scan-code-c.o
  CC       src/bison-scan-gram-c.o
In file included from src/scan-gram-c.c:3:0:
src/scan-gram.c: In function 'gram_lex':
src/scan-gram.l:49:4: error: 'code_start' undeclared (first use in this function)
    code_start = scanner_cursor = loc->start;            \
    ^
src/scan-gram.c:1402:3: note: in expansion of macro 'YY_USER_INIT'
   YY_USER_INIT;
   ^
src/scan-gram.l:49:4: note: each undeclared identifier is reported only once for each function it appears in
    code_start = scanner_cursor = loc->start;            \
    ^
src/scan-gram.c:1402:3: note: in expansion of macro 'YY_USER_INIT'
   YY_USER_INIT;
   ^
make[2]: * [src/bison-scan-gram-c.o] Error 1
make[2]: Leaving directory `/export/home/kim/tmp/bison-3.0.2'
make[1]: * [all-recursive] Error 1
make[1]: Leaving directory `/export/home/kim/tmp/bison-3.0.2'
make: * [all] Error 2


The generated src/scan-gram.c is NOT the same as the one included in bison-3.0.2.tar.gz.  The code in the definition of the YY_DECL function has the user's preamble code placed after the first use of the code_start variable.


Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by akim (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-08-18 akim Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code