<commit_before>import 'package:tiny_lang/scanner.dart';
import 'package:tiny_lang/parser.dart';
import 'package:tiny_lang/ast.dart';

void main() {
  Scanner scanner = new Scanner(
    'BEGIN'
    'x := 2;'
    'READ (y);'
    'READ (y, z);'
    'WRITE (x);'
    'WRITE (1);'
    'WRITE (x, 1, y + z);'
    'x := x + y - z;'
    'y := (x + y) - (z - (x - y));'
    'END'
  );

  Parser parser = new Parser(scanner);
  AST ast = parser.parse();
  print(ast);
}<commit_msg>Added command line interface for loading files<commit_after>import 'dart:io';

import 'package:tiny_lang/scanner.dart';
import 'package:tiny_lang/parser.dart';
import 'package:tiny_lang/ast.dart';

main(List<String> arguments) async {
  if (arguments.length < 1) {
    print('Usage: dart bin/main.dart path-to-file');
    return;
  }
  
  Scanner scanner = new Scanner(await (new File(arguments[0]).readAsString()));
  Parser parser = new Parser(scanner);
  AST ast = parser.parse();
  print(ast);
}
{'fraction_non_alphanumeric': 0.17938144329896907, 'fraction_numerical': 0.005154639175257732, 'mean_word_length': 3.6018957345971563, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5351094', 'n_tokens_mistral': 377, 'n_tokens_neox': 364, 'n_words': 87}