source tetra: lexing and parsing for foreign imports