rough API established for lexer and parser