summaryrefslogtreecommitdiff
path: root/mnml
diff options
context:
space:
mode:
Diffstat (limited to 'mnml')
-rwxr-xr-x[-rw-r--r--]mnml11
1 files changed, 9 insertions, 2 deletions
diff --git a/mnml b/mnml
index ae5f43c..33f7ca0 100644..100755
--- a/mnml
+++ b/mnml
@@ -1,10 +1,17 @@
+#!/bin/env php
+
<?php
require "vendor/autoload.php";
use Mnml\Lexer\Lexer;
+use Mnml\Parser\Parser;
+
+$input = file_get_contents(realpath($argv[1]));
-$input = file_get_contents(__DIR__ . "/test/test.mnml");
$lexer = new Lexer($input);
$tokens = $lexer->lex();
-#var_dump($tokens);
+
+$parser = new Parser($tokens);
+$nodes = $parser->parse();
+$parser->printTree();