private void RunTest(string input, bool expectEof) { if (expectEof) { _parsingContext.Expect(pc => pc.PushEof()); } _orderedModeToken.Dispose(); _mocks.ReplayAll(); var stream = new StringReader(input); var sut = new AhlLexer(_parsingContext, stream); sut.Run(); }
private SwixModel Run(IDictionary <string, string> variableDefinitions) { var result = new SwixModel(); var semanticContext = new FileSemanticContext(result, _guidProvider); if (variableDefinitions != null) { semanticContext.SetPredefinedSwixVariables(variableDefinitions); } IParsingContext parsingContext = new ParsingContext(semanticContext); var lexer = new AhlLexer(parsingContext, _sourceStream); lexer.Run(); return(result); }