[antlr-interest] grammar for mixed languages syntax

Yauhen Yakimovich eugeny.yakimovitch at gmail.com
Tue Jul 5 06:31:55 PDT 2011


Hi Sébastien,

What you are trying to build as an interpreter of a language with
dynamical features.
Hence simple preprocessor will not fit.

Try to look for island grammars. Search the example folder for this.


2011/7/5 Sébastien Kirche <sebastien.kirche at gmail.com>:
> Hi,
>
> I would like to build a grammar for a language that can embed sql
> compliant statements.
>
> Basicaly the language is a basic-like case insensitive syntax (with
> for .. next, if .. end if classic syntax), but you can also insert
> direct sql statement (that must end by semicolon), for example for
> selecting data into a variable, or deleting, calling a stored
> procedure... whatever. If you wonder what language I am mentioning, it
> is the PowerScript language that is used by Sybase's Powerbuilder.
>
> Could you give me some pointers about how to proceed, if that kind of
> parsing is possible with antlr ?
>
> Thanks.
> --
> Sébastien Kirche
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>



-- 
With best regards,
Y.Y.


More information about the antlr-interest mailing list