6#include <QtCore/qdebug.h>
7#include <QtCore/qlist.h>
13#define QLALR_NO_CHECK_SORTED_TABLE
19 return a == 0 ||
b == 0 ||
a ==
b;
60 inline int index ()
const {
return _M_index; }
70 _M_beginNonZeros = _M_begin;
71 _M_endNonZeros = _M_end;
73 for (_M_beginNonZeros = _M_begin; _M_beginNonZeros != _M_end && ! _M_beginNonZeros [0]; ++_M_beginNonZeros)
77 for (_M_endNonZeros = _M_end; _M_endNonZeros != _M_beginNonZeros && ! _M_endNonZeros [-1]; --_M_endNonZeros)
83 {
return _M_begin [
index]; }
86 {
return _M_begin == _M_end; }
89 {
return _M_end - _M_begin; }
92 {
return _M_endNonZeros - _M_beginNonZeros; }
98 {
return _M_beginNonZeros; }
101 {
return _M_endNonZeros; }
114 {
return a.count (0) >
b.count (0); }
129 for (
int i = 0;
i < row_count; ++
i)
139#ifndef QLALR_NO_CHECK_SORTED_TABLE
140 int previous_zeros = INT_MAX;
144 int zeros =
row.count (0);
147 zeros = previous_zeros;
152 index.fill (-999999, row_count);
156 int first_token = std::distance (
row.begin (),
row.beginNonZeros ());
179 int idx = std::distance (
info.
begin (),
pos) - first_token;
180 bool conflict =
false;
182 for (
int j = 0; ! conflict &&
j <
row.size (); ++
j)
185 conflict |= idx +
j >= 0 &&
check [idx +
j] ==
j;
188 conflict |=
check [idx +
j] ==
j;
211 for (
const int *
it =
row.beginNonZeros ();
it !=
row.endNonZeros (); ++
it, ++
pos)
217 int i =
row.index ();
219 for (
int j = 0;
j <
row.size (); ++
j)
231 int i =
row.index ();
234 for (
int j = 0;
j <
row.size (); ++
j)
void operator()(int *table, int row_count, int column_count)
qsizetype size() const noexcept
const_reference at(qsizetype i) const noexcept
void resize(qsizetype size)
QList & assign(qsizetype n, parameter_type t)
const_iterator beginNonZeros() const
const_iterator endNonZeros() const
UncompressedRow(int index, const_iterator begin, const_iterator end)
int nonZeroElements() const
const_iterator end() const
void assign(int index, const_iterator begin, const_iterator end)
int count(int value) const
const_iterator begin() const
const int * const_iterator
QSet< QString >::iterator it
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
[7]
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum GLuint GLintptr offset
GLenum GLenum GLsizei void * row
GLenum GLenum GLsizei void * table
QtPrivate::QRegularExpressionMatchIteratorRangeBasedForIterator begin(const QRegularExpressionMatchIterator &iterator)
bool operator()(int a, int b) const
_GenerateCheck(QList< int >::const_iterator it, int i)
QList< int >::const_iterator iterator
bool operator()(int a, int b) const
bool operator()(const UncompressedRow &a, const UncompressedRow &b) const