sebastienros / parlot

Fast and lightweight parser creation tools
BSD 3-Clause "New" or "Revised" License
371 stars 44 forks source link

Create Number parser #132

Closed sebastienros closed 3 months ago

sebastienros commented 3 months ago

Fixes #106 Fixes #130

sebastienros commented 3 months ago

@lahma was able to delete TokenResult and use ReadOnlySpan<char> instead. @gumbarros this should allow to remove the custom logic in ncalc

gumbarros commented 3 months ago

@lahma was able to delete TokenResult and use ReadOnlySpan<char> instead. @gumbarros this should allow to remove the custom logic in ncalc

Nice, will this also work in the exponent parser https://github.com/ncalc/ncalc/pull/193/files?

sebastienros commented 3 months ago

@gumbarros I made NumberLiteralBase public such that you can create custom parser type and logic that will still use Parlot internally.

@lahma I made flags even faster by pre-computing them!