Interpreting the D grammar

Jacob Carlborg via Digitalmars-d digitalmars-d at puremagic.com
Sun Aug 2 10:29:56 PDT 2015


On 02/08/15 18:08, cym13 wrote:

> You can't build a regular expression for any grammar. You can for some
> grammars but those are only a simple subset. For example, checking
> parens balance is impossible with common (not recursive) regular
> expressions only, and even with recursion it soon reaches its limitations.

TextMate grammars support recursion, it's possible to define a grammar 
with balanced parentheses [1].

[1] https://manual.macromates.com/en/language_grammars

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list