Boo have great thing - 2 lexer model for Python-like and Basic-like block behaviour.
I'm using brail and day before wrote a compiler that collects all *.brail files
and compiles single library for caching views.
But my version of brail supports both Python and Basic block types (using self-rewriting brail).
So to create such compiler I have to rewrite and replace Parsing step with custom step
which perform pre-view on code, found pragma #pragma boo in title of source code file
and then decides which parser it must use.
It's will be MUCH clear if:
1) there is one fixed class for Parse step ALWAYS , because many pipeline extensions are applyed as InsertAfter and InsertBefore Parsing phase and
replacing of parser may crash some of such solutions
2) Compiler must have parameter DefaultWSABehaviour from some enum with values NonWSA, WSA, Default = NonWSA
3) Compiler has legal support for code module pragmas (processing instructions) - maybe as extension to InputSource, because pragmas must be parsed before any code processing
4) parsing step determines parser/lexer due two rules - if code module contains special pragma (for example #pragma wsa) it uses that setting, otherwise DefaultWSABehaviour used
(can became contributor for such thing and prepare patch, it doesn't need deep knowning on Boo core details)