Toot

Written by Profoundly Nerdy on 2025-01-29 at 16:17

[#]Rakulang grammar question. Given something like:

[#] Ex. 1
grammar CSV {
    TOP {} # ??
    token column { [ '"' ]? .* \, [ '"']? }
}

[#] Ex. 2
grammar USD {
    TOP {} # ??
    token dollars { \d ** 3 [',']? } 
    token cents   { \. \d ** 2     }
}

  1. How do I tell the grammar's TOP that a given token could potentially repeat an arbitrary number of times?

  1. Can I mix in range validation somehow? So that 1,234.56 is a valid capture but 0,123.45 is not.

[#]programming #linux

=> More informations about this toot | View the thread | More toots from profoundlynerdy@bitbang.social

Mentions

Tags

=> View rakulang tag | View programming tag | View linux tag

Proxy Information
Original URL
gemini://mastogem.picasoft.net/toot/113912543862118380
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
225.163423 milliseconds
Gemini-to-HTML Time
0.537878 milliseconds

This content has been proxied by September (3851b).