I am trying to interact, mostly, writing an interpreter, for a language, I have only an API through a dll that permits me to compile files or strings, check syntax errors, etc. What I would like is really parsing the syntax. I have a user manual-level (i.e., no real grammar) specifications of the language, and I already wrote an incomplete parser using a context free grammar I wrote and lex yacc. But it's still choking out, and I'm adding so much weird regex and exceptions to rules in there that I think I'll never get to it that way.
I've looked (PE explorer) into the dll and found export entries matching an antlr3-generated lexer-parser-recognizer (well, multiple recognizers). I set out to build an interface to the functions in the dll (using ctypes in Python). I started with a dummy empty grammar, generated the headers, then "compiled" the antlr3*.h, LangLexer, LangParser headers to python with ctypesgen, and then I rebuilt an example found on Stack Overflow. I'm advancing but not sure how I would go about making a syntax tree without knowing the full grammar (though I know the name of the tokens). Got any clues?