public Lexer buildAndStoreLexer(Object syntaxInput, String baseName, List tokenSymbols, List ignoredSymbols)
		throws Exception
	{
		Syntax syntax = toSyntax(syntaxInput);
		
		if (tokenSymbols == null || ignoredSymbols == null)	{
			this.separation = newSyntaxSeparation(syntax);
			syntax = separation.getLexerSyntax();
			
			if (tokenSymbols == null)
				tokenSymbols = separation.getTokenSymbols();
			if (ignoredSymbols == null)
				ignoredSymbols = separation.getIgnoredSymbols();
		}
		// else: assume that syntaxInput is a prebuilt lexer Syntax and a list of ignored tokens
		
		TimeStopper ts = new TimeStopper();
		LexerBuilder builder = newLexerBuilder(syntax, ignoredSymbols);
		Lexer lexer = builder.getLexer();
		lexer.setTerminals(tokenSymbols);
		System.err.println("Lexer scratch construction took "+ts.getTimeMillis()+" millis");
		
		if (PRODUCTION)
			write(ensureFileName(syntaxInput, baseName), lexer);

		return lexer;
	}