Parser parser = PRODUCTION ? (Parser) read(ensureFileName(syntaxInput, baseName)) : null;
if (parser == null) {
SerializedLexer lexerFactory = newSerializedLexer();
lexerFactory.PRODUCTION = false; // do not store this lexer, it will be stored with parser
Lexer lexer = lexerFactory.buildAndStoreLexer(syntaxInput, baseName, null, null); // null: forces syntax separation
Syntax parserSyntax = lexerFactory.getSyntaxSeparation().getParserSyntax();
SerializedTables tablesFactory = new SerializedTables(false); // do not store this tables, it will be stored with parser
ParserTables tables = tablesFactory.buildAndStoreParserTables(parserType, parserSyntax, syntaxInput, baseName);
parser = new Parser(tables);
parser.setLexer(lexer);