Replies: 1 comment 2 replies
-
Hello! Interestingly enough, I'd actually suggest not starting with something like this: it's usually better to start with a far more minimal subset of a syntax and build up rather than starting with a whole syntax and building down. If you really feel like like you want to take this approach though: any().repeated() Here, any().and_is(just(';').not()).repeated() (or, more simply) none_of(';').repeated() As I say though, I recommend starting building up instead of down, so the best place to start would probably be parsing the most basic elements of SQL: integers and other bits of expressions, and then building on top of them. You'll find that the tutorial is a helpful resource when building up a parser (note, however, that it's not been updated to |
Beta Was this translation helpful? Give feedback.
-
Hey,
fairly new to chumsky. I have been trying to get a simple SQL statement parser to work without success. For now, the only thing I want to achieve is to parse
into
Essentially, just a trimmed str.split(';').
I have been playing with
any
and theseparated_by
parser. The closest I could get isbut it returns just an empty result.
This is a very beginner question, but I am thankful for a hint to get started.
Thanks
Philipp
Beta Was this translation helpful? Give feedback.
All reactions