-
Hi, For separat of logic I would like to split one EmbeddedActionsParser into multiple ones. I wonder if what I want to do is possible at all? I don't care about reuseability, I just want to split my 1000 lines file into multiple smaller ones, grouped by topic. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
It would probably be easier to split up the code that defines the rules into multiple files and invoke the multiple rule definitions helpers See example in a large productive parser (Java)
This approach is made possible because Chevrotain is "just JavaScript" so you have a-lot of flexibility in how you mix/match/assemble it. |
Beta Was this translation helpful? Give feedback.
It would probably be easier to split up the code that defines the rules into multiple files and invoke the multiple rule definitions helpers
during a single parser's constructor.
See example in a large productive parser (Java)
This approach is made possible because Chevrotain is "just JavaScript" so you have a-lot of flexibility in how you mix/match/assemble it.