Help with elkhound port development

Brandon Allbery allbery.b at gmail.com
Fri Dec 12 19:28:30 PST 2014


On Fri, Dec 12, 2014 at 9:59 PM, Mark Brethen <mark.brethen at gmail.com>
wrote:
>
> Now, when building I had 5 errors:
>
> :info:build perl ../smbase/run-flex.pl
>
> -oagramlex.yy.cc
>
> agramlex.lex
> :info:build flex -oagramlex.yy.cc
>
> agramlex.lex
> :info:build modifying agramlex.yy.cc
>
>
> :info:build c++ -c -o agramlex.yy.o agramlex.yy.cc
>
> -g -Wall -Wno-deprecated -D__UNIX__ -O2 -DNDEBUG -I../smbase
> :info:build In file included from agramlex.lex:14:
> :info:build ./agrampar.codes.h:44:2: error: unterminated conditional
> directive
> :info:build #ifndef YYTOKENTYPE
> :info:build  ^
> :info:build ./agrampar.codes.h:33:2: error: unterminated conditional
> directive
> :info:build #ifndef YY_YY_AGRAMPAR_TAB_H_INCLUDED
> :info:build  ^
> :info:build In file included from agramlex.yy.cc:548
>
> :
> :info:build In file included from /usr/include/unistd.h:72:
> :info:build /usr/include/sys/unistd.h:132:1: error: expected identifier
> :info:build struct accessx_descriptor {
> :info:build ^
> :info:build agramlex.lex:332:1: error: expected '}'
> :info:build ^
> :info:build ./agrampar.codes.h:48:21: note: to match this '{'
> :info:build    enum yytokentype {
> :info:build                     ^
> :info:build agramlex.lex:331:2: error: expected ';' after enum
> :info:build }
> :info:build  ^
> :info:build  ;
> :info:build 5 errors generated.
> :info:build make[1]: *** [agramlex.yy.o] Error 1
>
> I think these errors can be easily remedied. Do you understand the last
> error?
>

I already answered this one: the program makes an assumption about how much
of the bison header it needs to take, one which is incorrect for bison 3 as
is currently in MacPorts and is also probably wrong for all bison 2
versions. (Note that bison since version 2 supports GLR parsers, suggesting
that elkhound expects bison 1.x. However, it's almost certainly not going
to be a drop-in replacement for elkhound.)

You are going to have to do some work to figure out how to adapt elkhound
to bison 3, possibly by digging out a copy of bison 1.x somewhere and
comparing the agrampar.tab.h it produces to the one bison 3 produces in
order to find out what to replace the "head -n 73" with something that
works to extract the appropriate token definitions from a bison 3-generated
agrampar.tab.h.

-- 
brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-dev/attachments/20141212/fdd9fcd9/attachment-0001.html>


More information about the macports-dev mailing list