static IConversionExpression BuildModel(string input) { var tokenizer = new ConversionTokenizer(); tokenizer.Tokenize(input, null); var modelBuilder = new ConversionModelBuilder(); return(modelBuilder.BuildFrom(tokenizer.Tokens)); }
static IConversionExpression ConvertFromString(string input) { var tokens = new ConversionTokenizer(); tokens.Tokenize(input, null); var model = new ConversionModelBuilder(); var converter = new MetricToImperialConverter(); return(converter.Convert(model.BuildFrom(tokens.Tokens))); }