Re: Build bison warning

2014-09-23 Thread Lionel Elie Mamane
On Mon, Sep 22, 2014 at 08:38:48AM -0500, Norbert Thiebaud wrote:
 On Mon, Sep 22, 2014 at 3:07 AM, Stephan Bergmann sberg...@redhat.com wrote:
 On 09/21/2014 08:29 AM, julien2412 wrote:

 /home/julien/compile-libreoffice/libreoffice/connectivity/source/parse/sqlbison.y:
 warning: 13 shift/reduce conflicts [-Wconflicts-sr]

 /home/julien/compile-libreoffice/libreoffice/connectivity/source/parse/sqlbison.y:
 warning: 15 reduce/reduce conflicts [-Wconflicts-rr]

 [...]

 What about reduce and shift conflicts, any bison expert here?

 Shift/reduce and (for GLR parsers, which that sqlbison.y is) reduce/reduce
 conflicts are somewhat common and expected, so there's even %expect and
 %expect-rr declarations that specify the number of expected sift/reduce and
 reduce/reduce conflicts, respectively, and Bison will then only warn if the
 numbers are wrong.  Though, of course, somebody familiar with that
 sqlbison.y should probably have a look before blindly adding such
 declarations to silence the warnings.

 yeah.. I advise _not_ hiding these. at this point it is highly
 unlikely that these be all 'legitimate'

Indeed; our SQL parser is not in the best of states.

-- 
Lionel
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Build bison warning

2014-09-22 Thread Stephan Bergmann

On 09/21/2014 08:29 AM, julien2412 wrote:

/home/julien/compile-libreoffice/libreoffice/connectivity/source/parse/sqlbison.y:
warning: 13 shift/reduce conflicts [-Wconflicts-sr]
/home/julien/compile-libreoffice/libreoffice/connectivity/source/parse/sqlbison.y:
warning: 15 reduce/reduce conflicts [-Wconflicts-rr]

[...]

What about reduce and shift conflicts, any bison expert here?


Shift/reduce and (for GLR parsers, which that sqlbison.y is) 
reduce/reduce conflicts are somewhat common and expected, so there's 
even %expect and %expect-rr declarations that specify the number of 
expected sift/reduce and reduce/reduce conflicts, respectively, and 
Bison will then only warn if the numbers are wrong.  Though, of course, 
somebody familiar with that sqlbison.y should probably have a look 
before blindly adding such declarations to silence the warnings.


Stephan
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Build bison warning

2014-09-22 Thread Norbert Thiebaud
On Mon, Sep 22, 2014 at 3:07 AM, Stephan Bergmann sberg...@redhat.com wrote:
 On 09/21/2014 08:29 AM, julien2412 wrote:


 /home/julien/compile-libreoffice/libreoffice/connectivity/source/parse/sqlbison.y:
 warning: 13 shift/reduce conflicts [-Wconflicts-sr]

 /home/julien/compile-libreoffice/libreoffice/connectivity/source/parse/sqlbison.y:
 warning: 15 reduce/reduce conflicts [-Wconflicts-rr]

 [...]

 What about reduce and shift conflicts, any bison expert here?


 Shift/reduce and (for GLR parsers, which that sqlbison.y is) reduce/reduce
 conflicts are somewhat common and expected, so there's even %expect and
 %expect-rr declarations that specify the number of expected sift/reduce and
 reduce/reduce conflicts, respectively, and Bison will then only warn if the
 numbers are wrong.  Though, of course, somebody familiar with that
 sqlbison.y should probably have a look before blindly adding such
 declarations to silence the warnings.

yeah.. I advise _not_ hiding these. at this point it is highly
unlikely that these be all 'legitimate'

Norbert
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Build bison warning

2014-09-21 Thread julien2412
Hello,

On pc Debian x86-64 with master sources updated yesterday, I noticed this
during building:
/home/julien/compile-libreoffice/libreoffice/rsc/source/parser/rscyacc.y:
warning: 2 shift/reduce conflicts [-Wconflicts-sr]
/home/julien/compile-libreoffice/libreoffice/connectivity/source/parse/sqlbison.y:
warning: 2 nonterminals useless in grammar [-Wother]
/home/julien/compile-libreoffice/libreoffice/connectivity/source/parse/sqlbison.y:
warning: 3 rules useless in grammar [-Wother]
/home/julien/compile-libreoffice/libreoffice/connectivity/source/parse/sqlbison.y:222.65-84:
warning: nonterminal useless in grammar: row_value_const_list [-Wother]
 %type pParseNode table_value_const_list row_value_constructor
row_value_const_list row_value_constructor_elem


/home/julien/compile-libreoffice/libreoffice/connectivity/source/parse/sqlbison.y:228.20-33:
warning: nonterminal useless in grammar: extract_source [-Wother]
 %type pParseNode extract_source char_length_exp octet_length_exp
bit_length_exp select_sublist string_value_exp
^^
/home/julien/compile-libreoffice/libreoffice/connectivity/source/parse/sqlbison.y:751.25-753.40:
warning: rule useless in grammar [-Wother]
row_value_constructor_elem
 ^
/home/julien/compile-libreoffice/libreoffice/connectivity/source/parse/sqlbison.y:754.17-756.33:
warning: rule useless in grammar [-Wother]
|   row_value_const_list ',' row_value_constructor_elem
 
/home/julien/compile-libreoffice/libreoffice/connectivity/source/parse/sqlbison.y:1766.17-1770.17:
warning: rule useless in grammar [-Wother]
datetime_value_exp
 
/home/julien/compile-libreoffice/libreoffice/connectivity/source/parse/sqlbison.y:
warning: 13 shift/reduce conflicts [-Wconflicts-sr]
/home/julien/compile-libreoffice/libreoffice/connectivity/source/parse/sqlbison.y:
warning: 15 reduce/reduce conflicts [-Wconflicts-rr]

May these rules be removed or should they be used in a way?
What about reduce and shift conflicts, any bison expert here?

BTW, all these warnings are not new but I think it could help to harden the
code (and perhaps prevent some bugs or optimize a bit)

Julien 



--
View this message in context: 
http://nabble.documentfoundation.org/Build-bison-warning-tp4123033.html
Sent from the Dev mailing list archive at Nabble.com.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice