I am currently writing a grammar for a programming language (PowerBuilder) and I am also collecting documentation about parsing and compilers creation.
Now I would like to add in my grammar (that looks roughly like Visual Basic) the possibility to handle embedded SQL statements that are supported inline by the language (with the usage of binding variables like
select foo into :ls_bar from baz where col=:ls_criteria;). As the embedded SQL is regular SQL syntax, I would not complexify my existing grammar but instead adapt an existing SQL-92 grammar to my needs and use it on these SQL blocks.
I would like to compare these techniques with AntLR with others tools like Lex/Yacc, Flex, JFlex, that I used while playing with several simple language designs described in different CS courses available online.
Could you point me to examples of implementations of parsers that support mixed grammars?