[antlr-interest] related question: multiple grammars..

Gavin Lambert antlr at mirality.co.nz
Thu Mar 29 01:26:23 PDT 2007

At 14:40 29/03/2007, Eitan Suez wrote:
>   for example, i'm trying to learn antlr v3 by writing
>   a css parser (or i'm trying to write a css parser using
>   antlr v3 and i'm an antlr newbie).  css is really
>   two languages:  there's the primary language,
>   then there's the sublanguage for interpreting
>   selectors.
>   one can get by ignoring whitespace for the main
>   language but not for the selectors.

As far as I am aware, whitespace isn't really significant anywhere 
in CSS -- it merely divides tokens but is not otherwise important, 
which is exactly the same as most other languages.  Hence, just 
ignore it all the time (either by skipping it entirely or 
assigning it to an alternate channel).

More information about the antlr-interest mailing list