Shahar Soel
Shahar Soel
Lets say we want to modify the CSTNode being created. For Example: ```javascript $.RULE("array", () => { const from = this.currIdx $.CONSUME(LSquare) // ... $.CONSUME(RSquare) const to = this.currIdx //...
Specifically this: - https://github.com/SAP/chevrotain/blob/5e77fc21c1ab39281acf874472a28b2698b2e334/packages/chevrotain/src/scan/tokens.ts#L34 This can cause issues when there are multiple Chevrotain packages in existence. E.g when the Lexer and Parser are in separate npm packages. This could also...
https://github.com/SAP/chevrotain/pull/1053#discussion_r330990829
### Description Now that Chevrotain no longer depends on Function.prototype.toString it is possible to allow end users to define their own MACROS. This means create their own Parsing DSL methods,...
Emphasize Production based tools vs Prototyping tools.
Example ```javascript $.RULE("formalParameterList", () => { let foundRestArg = false $.MANY_SEP({ SEP: tokens.Comma, DEF: () => { $.MANY2(() => { $.SUBRULE($.variableModifier) }) $.SUBRULE($.typeType) $.OPTION(() => { $.CONSUME(tokens.DotDotDot) foundRestArg = true...
See: - https://github.com/antlr/antlr4/blob/master/doc/wildcard.md#nongreedy-parser-subrules This could probably be done using [Token Categories](https://sap.github.io/chevrotain/docs/features/token_categories.html) to match against "all" kinds of tokens combined with an alternation which includes the one option we care about....
See: https://github.com/matthew-dean/less.js/commit/ec5cf7778ae6f7def27a07ea4ca88e54ab2f41c4#r34664698
Flow: * call [getGastProductions()](http://sap.github.io/chevrotain/documentation/0_32_1/classes/_chevrotain_d_.parser.html#getgastproductions) on a parser instance. * build a walker to print out the Gast (grammar representation) as an EBNF text. Advanced features: * Generate HTML with advanced...