Add tokenizeSingle method
Add single-rule test cases
Add state.level everywhere