Skip to content

incompatibility with GNU YACC/BISON #104

@e-kwsm

Description

@e-kwsm
  • libxo: 1.7.5 (fd5db1b)
  • yacc: bison (GNU Bison) 3.8.2—a wrapper around bison
$ sh bin/setup.sh
$ cd build
$ ../configure

checking for byacc... no
checking for yacc... yacc

  yacc:             yacc

$ make distcheck

make  distdir-am
make[4]: Entering directory '/tmp/libxo/build/libxo'
  YACC     xo_xpath.y ...
/usr/bin/bison: invalid option -- 'P'
Try '/usr/bin/bison --help' for more information.
make[4]: *** [Makefile:996: xo_xpath.c] Error 1
make[4]: Leaving directory '/tmp/libxo/build/libxo'
make[3]: *** [Makefile:809: distdir] Error 2
make[3]: Leaving directory '/tmp/libxo/build/libxo'
make[2]: *** [Makefile:689: distdir-am] Error 1
make[2]: Leaving directory '/tmp/libxo/build'
make[1]: *** [Makefile:683: distdir] Error 2
make[1]: Leaving directory '/tmp/libxo/build'
make: *** [Makefile:793: dist] Error 2

AC_CHECK_PROGS(YACC, [byacc yacc 'bison -y'], )

YACC_OPTS = -P -p xo_xpath_yy -d -v -s -b xo_xpath

GNU yacc does not support -P and -s options, and POSIX Yacc does not support string literals [-Wyacc].

libxo/libxo/xo_xpath.y

Lines 22 to 85 in fd5db1b

%token L_ASSIGN 1 ":="
%token L_AT 2 "@"
%token L_CBRACE 3 "}"
%token L_COMMA 4 ","
%token L_COLON 5 ":"
%token L_DAMPER 6 "&&"
%token L_DCOLON 7 "::"
%token L_DEQUALS 8 "=="
%token L_DOTDOT 9 ".."
%token L_DOTDOTDOT 10 "..."
%token L_DSLASH 11 "//"
%token L_DVBAR 12 "||"
%token L_EOS 13 ";"
%token L_EQUALS 14 "="
%token L_GRTR 15 ">"
%token L_GRTREQ 16 ">="
%token L_LESS 17 "<"
%token L_LESSEQ 18 "<="
%token L_MINUS 19 "-"
%token L_NOT 20 "!"
%token L_NOTEQUALS 21 "!="
%token L_OBRACE 22 "{"
%token L_OBRACK 23 "["
%token L_OPAREN 24 "("
%token L_PLUS 25 "+"
%token L_PLUSEQUALS 26 "+="
%token L_QUESTION 27 "?"
%token L_SLASH 28 "/"
%token L_STAR 29 "*"
%token L_UNDERSCORE 30 "_"
%token L_VBAR 31 "|"
%token L_LAST 32 /* Last literal token value */
/*
* Keyword tokens
*/
%token K_COMMENT 33 "comment"
%token K_ID 34 "id"
%token K_KEY 35 "key"
%token K_NODE 36 "node"
%token K_PROCESSING_INSTRUCTION 37 "processing-instruction"
%token K_TEXT 38 "text"
/*
* Operator keyword tokens, which might be NCNames if they appear inside an
* XPath expression
*/
%token M_OPERATOR_FIRST 39 /* Magic marker: first operator keyword */
%token K_AND 40 "and"
%token K_DIV 41 "div"
%token K_MOD 42 "mod"
%token K_OR 43 "or"
%token M_OPERATOR_LAST 44 /* Magic marker: last operator keyword */
/*
* Literal tokens which _may_ preceed the multiplication operator
*/
%token M_MULTIPLICATION_TEST_LAST 45 /* Magic marker: highest token number */
%token L_ASTERISK 46 /* "*" */
%token L_CBRACK 47 "]"
%token L_CPAREN 48 ")"
%token L_DOT 49 "."

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions