Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
lfa:lab03-lexers [2021/10/25 11:44] stefan.stancu [3.2. Priority and longest match] |
lfa:lab03-lexers [2021/10/25 11:46] (current) stefan.stancu |
||
---|---|---|---|
Line 42: | Line 42: | ||
* $math[A] has higher priority than $math[B]. How will the string be split? (Which are the lexemes?) | * $math[A] has higher priority than $math[B]. How will the string be split? (Which are the lexemes?) | ||
* $math[B] has higher priority than $math[A]. How will the splitting look like? | * $math[B] has higher priority than $math[A]. How will the splitting look like? | ||
- | * finally, let us return to the **maximal match** principle. How should the DFAs $math[A] an $math[B] be ordered (w.r.t. priority) so that our word is splĀ | + | * finally, let us return to the **maximal match** principle. How should the DFAs $math[A] an $math[B] be ordered (w.r.t. priority) so that our word is split in the correct way (assuming a Python syntax)? |
- | it in the correct way (assuming a Python syntax)? | + | |