Project

General

Profile

[logo] 
 
Home
News
Activity
About/Contact
Major Tools
  Dinotrace
  Verilator
  Verilog-mode
  Verilog-Perl
Other Tools
  BugVise
  CovVise
  Force-Gate-Sim
  Gspice
  IPC::Locker
  Rsvn
  SVN::S4
  Voneline
  WFH
General Info
  Papers

Issue #1103

Verilator fails to build with flex-2.6.2

Added by Sergey Kvachonok 4 months ago. Updated 3 months ago.

Status:
Closed
Priority:
High
Assignee:
-
Category:
Configure/Make/Compiling
% Done:

0%


Description

/usr/bin/flex --version
flex 2.6.2
/usr/bin/flex -d -oV3Lexer_pregen.yy.cpp ../verilog.l
../verilog.l:1078: EOF encountered inside an action
../verilog.l:1078: unrecognized rule
../verilog.l:1078: fatal parse error
make[2]: *** [../Makefile_obj:318: V3Lexer_pregen.yy.cpp] Error 1
make[2]: *** Waiting for unfinished jobs....

l.patch View (1009 Bytes) Wilson Snyder, 11/06/2016 12:11 PM

History

#1 Updated by Sergey Kvachonok 4 months ago

/usr/bin/flex --version
flex 2.6.2
/usr/bin/flex -d -oV3Lexer_pregen.yy.cpp ../verilog.l
../verilog.l:1078: EOF encountered inside an action
../verilog.l:1078: unrecognized rule
../verilog.l:1078: fatal parse error
make[2]: *** [../Makefile_obj:318: V3Lexer_pregen.yy.cpp] Error 1
make[2]: *** Waiting for unfinished jobs....

#2 Updated by Sergey Kvachonok 4 months ago

Looks like this is a known Flex bug:

https://github.com/westes/flex/issues/102

#3 Updated by Wilson Snyder 4 months ago

  • Description updated (diff)
  • Status changed from New to AskedReporter

The Flex team seems to have terrible regression process, as they break something obvious every few years. Anyhow there's a few dozen comments like that in the two .l files, verilog.l and V3PreLex.l. Can you confirm it works if you remove the comments which match "//.*'"?

#4 Updated by Wilson Snyder 4 months ago

I speculate there's only two places that hit their bug, try this patch.

#5 Updated by Sergey Kvachonok 4 months ago

flex-2.6.2 seems to have other issues besides // comment parsing, like %option prefix=myscanner being completely broken.

https://github.com/westes/flex/issues/113

I suggest giving up on trying to get it to work and waiting for the upstream to fix this.

If there's a way to blacklist flex-2.6.2 in the configure script that would be nice.

#6 Updated by Sergey Kvachonok 4 months ago

Unfortunately I've already reverted flex to 2.6.1 system-wide, so testing the patch won't be as easy.

Do you really think replacing all // comments with /**/ is the way to go?

#7 Updated by Wilson Snyder 4 months ago

I'll speculate it's those two lines and commit that, besides I expect the flex team will fix it soon.

Please reopen if you or anyone try 2.6.2 again.

Fixed in git towards 3.889.

#8 Updated by Wilson Snyder 3 months ago

  • Status changed from AskedReporter to Closed

In 3.890.

Also available in: Atom