summaryrefslogtreecommitdiff
path: root/mnml
blob: 33f7ca08e0190f3c2bf396b1bf8cb8643928adfe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/env php

<?php

require "vendor/autoload.php";

use Mnml\Lexer\Lexer;
use Mnml\Parser\Parser;

$input = file_get_contents(realpath($argv[1]));

$lexer = new Lexer($input);
$tokens = $lexer->lex();

$parser = new Parser($tokens);
$nodes = $parser->parse();
$parser->printTree();