Open sigmike opened 9 years ago
Can I ask you to please make an effort to minimize the input just a bit further? I am rather sure that it can be made a bit smaller; you will likely need to do it by hand rather than using an automated tool such as delta.
Daniel
On Sun, Feb 22, 2015 at 4:59 AM, Michaël Witrant notifications@github.com wrote:
Hello,
I get this error in a STL header:
In state 296, I expected one of these tokens: (, ), [, ], ->, ., +, -, ++, --, &, , ., ->, /, %, <<, >>, <, <=, >, >=, ==, !=, ^, |, &&, ||, ?, :, =, =, /=, %=, +=, -=, &=, ^=, |=, <<=, >>=, ,, ..., ;, }, attribute, <?, >?, /usr/include/c++/4.6/bits/stl_algobase.h:731:32: Parse error (state 296) at
: __niter I've reduced the input with delta to this:
namespace std attribute ((visibility ("default"))) { template<class _Sp, class _Tp> struct traitor {}; template
struct is_integer {}; template ((visibility ("default"))) { template<bool, typename> struct enable_if {}; }namespace std __attribute ((visibility ("default"))) { template<typename _OutputIterator, typename _Size, typename _Tp> inline typename gnu_cxx::__enable_if<!is_scalar<_Tp>::value, _OutputIterator>::type fill_n_a(_OutputIterator first, _Size __n, const _Tp& value) { for (decltype(n + 0) niter = n; niter > 0; --niter, ++first) *first = value; }struct is_floating {}; templatestruct is_pointer {}; template struct is_arithmetic : public traitor<is_integer<_Tp>, is_floating<_Tp> > {}; templatestruct __is_scalar : public traitor<is_arithmetic<_Tp>, is_pointer<_Tp> > {}; }namespace __gnu_cxx __attributeI'm using gcc 4.6.3 and oink master with the lattice config on an clean Ubuntu 14.04. The header comes from the libstdc++6-4.6-dev package.
— Reply to this email directly or view it on GitHub https://github.com/dsw/oink-stack/issues/10.
Allow me to clarify: this is a string that the parser cannot parse, so certainly a smaller input will also induce the parser into the same state.
On Mon, Feb 23, 2015 at 12:10 AM, Daniel Wilkerson < daniel.wilkerson@gmail.com> wrote:
Can I ask you to please make an effort to minimize the input just a bit further? I am rather sure that it can be made a bit smaller; you will likely need to do it by hand rather than using an automated tool such as delta.
Daniel
On Sun, Feb 22, 2015 at 4:59 AM, Michaël Witrant <notifications@github.com
wrote:
Hello,
I get this error in a STL header:
In state 296, I expected one of these tokens: (, ), [, ], ->, ., +, -, ++, --, &, , ., ->, /, %, <<, >>, <, <=, >, >=, ==, !=, ^, |, &&, ||, ?, :, =, =, /=, %=, +=, -=, &=, ^=, |=, <<=, >>=, ,, ..., ;, }, attribute, <?, >?, /usr/include/c++/4.6/bits/stl_algobase.h:731:32: Parse error (state 296) at
: __niter I've reduced the input with delta to this:
namespace std attribute ((visibility ("default"))) { template<class _Sp, class _Tp> struct traitor {}; template
struct is_integer {}; template ((visibility ("default"))) { template<bool, typename> struct enable_if {}; }namespace std __attribute ((visibility ("default"))) { template<typename _OutputIterator, typename _Size, typename _Tp> inline typename gnu_cxx::__enable_if<!is_scalar<_Tp>::value, _OutputIterator>::type fill_n_a(_OutputIterator first, _Size __n, const _Tp& value) { for (decltype(n + 0) niter = n; niter > 0; --niter, ++first) *first = value; }struct is_floating {}; templatestruct is_pointer {}; template struct is_arithmetic : public traitor<is_integer<_Tp>, is_floating<_Tp> > {}; templatestruct __is_scalar : public traitor<is_arithmetic<_Tp>, is_pointer<_Tp> > {}; }namespace __gnu_cxx __attributeI'm using gcc 4.6.3 and oink master with the lattice config on an clean Ubuntu 14.04. The header comes from the libstdc++6-4.6-dev package.
— Reply to this email directly or view it on GitHub https://github.com/dsw/oink-stack/issues/10.
Here's a much smaller input:
void a(int b) {
__decltype(b + 0) c;
}
Thank you for the bug report and the extra effort to minimize the example; however I just have too many other important things to work on right now to spend time on this.
Scott says the following: "There is a debug flag to elkhound that will print all the states and their associated gram[m]ar productions. Use that to decode the state number to see where it got stuck."
If you follow Scott's suggestion, then the output from elkhound about what state the parser is in may tell you how the grammar needs to be altered. Since the grammar is GLR, it is quite robust against shift-reduce and reduce-reduce conflicts, so if you figure out the error, it should be easy to fix.
If you manage to fix it, do send me a pull request and if it looks sane and builds and passes on my machine, I'll incorporate it into the mainline.
Sorry, but I basically have to rely on others to take the time to investigate these bugs right now, but I can offer the kind of advice above and can test and merge fixes when people send them.
Daniel
On Sat, Feb 28, 2015 at 1:26 AM, Michaël Witrant notifications@github.com wrote:
Here's a much smaller input:
void a(int b) { __decltype(b + 0) c; }
— Reply to this email directly or view it on GitHub https://github.com/dsw/oink-stack/issues/10#issuecomment-76518730.
Hello,
I get this error in a STL header:
I've reduced the input with delta to this:
I'm using gcc 4.6.3 and oink master with the lattice config on an clean Ubuntu 12.04. The header comes from the libstdc++6-4.6-dev package.
Edit: Ubuntu 12.04 instead of 14.04