Closed purpleidea closed 4 years ago
Hey @purpleidea, here's more information on ragel: http://www.colm.net/open-source/ragel/
Unfortunately, we're not looking to modify or make this package public. Keeping it internal allows to iterate without worrying too much about API decisions – feel fee to fork as necessary!
Looking at this test:
https://github.com/yarpc/yarpc-go/blob/dc33049fffa36ab75c07d422544df1c7b0ce2bdd/internal/interpolate/parse_test.go#L76
I am surprised by two things:
1) That
$foo
by itself without the curly brackets isn't seen as a variable. Is there a reason for this?2) The output contains two string literals right after each other:
$f
andoo
. If you assume it's not a variable, I wouldn't expect to see them joined together as one. I'm curious if something strange is going on with the lexer/parser. I've not used rygel, is there a guide to building the grammar? I'd normally just join the two string literals, except it's a problem to do so because:3) ... they're all private.
literal(
andvariable
should be public, and...4) ... This is in an "internal" package. I'd like to use and contribute to this externally. Can it be split off into either a separate project, or at least put somewhere non-"internal"? Otherwise I'll just fork, but then you won't get improvements.
If you'd like any of these comments to be split into separate issues, please let me know!
Thanks!