Opened 3 years ago

Closed 3 years ago

Last modified 21 months ago

#488 closed enhancement (fixed)

uaflex: avoid extra characters in lookahead

Reported by: Maxim Reznik Owned by: Maxim Reznik
Priority: major Milestone: 18.0
Component: Matreshka Version: 0.7.0
Keywords: uaflex Cc:

Description (last modified by Maxim Reznik)

There are situations when lexer generated by uaflex can avoid looking beyond right bound of the lexeme. If it's in a final state there is no transition by any next character, lexer should return result immediately.

Let's call such states 'dead-end' states and reorder them after any others. This avoid fast check is this state is dead-end.

We can also reorder other final states and place them before dead-ends, so we have continuous range of final states.

Change History (3)

comment:1 by Maxim Reznik, 3 years ago

Description: modified (diff)
Summary: uaflex: avoid extra characters in lookupuaflex: avoid extra characters in lookahead

comment:2 by Maxim Reznik, 3 years ago

Owner: set to Maxim Reznik
Resolution: fixed
Status: newclosed

In 5807:

In lexer generated by uaflex avoid extra looking

beyond right bound of the lexeme in dead-end states.

Close #488

comment:3 by vadim.godunko, 21 months ago

Milestone: 0.8.018.0

Milestone renamed

Note: See TracTickets for help on using tickets.