parsing loop closed
This commit is contained in:
parent
63b0560375
commit
3bed74df87
8 changed files with 92 additions and 45 deletions
|
|
@ -25,7 +25,7 @@ namespace tp {
|
|||
ualni advancedIdx = 0;
|
||||
|
||||
while (advancedIdx < size) {
|
||||
tAlphabetType& symbol = *(stream + advancedIdx);
|
||||
const tAlphabetType& symbol = *(stream + advancedIdx);
|
||||
|
||||
if (!(symbol >= mSymbolRange.mBegin && symbol < mSymbolRange.mEnd)) {
|
||||
return { false, advancedIdx, {} };
|
||||
|
|
@ -34,7 +34,7 @@ namespace tp {
|
|||
mCurrentState = mTable.get({ (ualni) (symbol - mSymbolRange.mBegin), mCurrentState });
|
||||
|
||||
if (mCurrentState == mStates.size()) {
|
||||
return false;
|
||||
return { false, advancedIdx, {} };
|
||||
}
|
||||
|
||||
if (mStates[mCurrentState].first) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue