You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With Tokay v0.5, the language is entering a phase where modularity becomes an important part.
For example, the new builtin native tokens Int and Float can be grouped by a pure Tokay parselet Number, defined as
Number : Float | Int
And together with #10, generic parselets are needed in various ways to provide tools for different use-cases.
Currently, there is no way to define such default parselets, except hacking directly in Compiler::get_constant() or Compiler::set_constant() as with the Whitespace defaults handling.
For sure, Float and Int could either be implemented in pure Tokay code on their own, but this may end in performance lose.
With Tokay v0.5, the language is entering a phase where modularity becomes an important part.
For example, the new builtin native tokens
Int
andFloat
can be grouped by a pure Tokay parseletNumber
, defined asAnd together with #10, generic parselets are needed in various ways to provide tools for different use-cases.
Currently, there is no way to define such default parselets, except hacking directly in Compiler::get_constant() or Compiler::set_constant() as with the Whitespace defaults handling.
For sure,
Float
andInt
could either be implemented in pure Tokay code on their own, but this may end in performance lose.Ideas for this issue (partly from #10):
Number: Float | Int
Token: Word | Number | AsciiPunctuation
Until : @<P, Escape: Void>
String: @<Start, End: void, Escape: void>
Repeat : @<P> min=1, max=0
Not : @<P>
Peek : @<P>
Expect : @<P> msg=void
Separated : @<P, Separator: ',', empty: true>
Csv : @<Separator: ';'|','|'\t'|' ', String: '"'>
The text was updated successfully, but these errors were encountered: