parser: use C tables in parser
[nit.git] / src / parser / xss / main.xss
index 002a71b..ba1360b 100644 (file)
@@ -43,6 +43,7 @@ intrude import $usermodule
 $ else
 intrude import parser_abs
 $ end
+private import tables
 $ call make_tokens()
 $ call make_lexer()
 $ end output
@@ -58,26 +59,26 @@ intrude import $usermodule
 $ else
 intrude import parser_abs
 $ end
+private import tables
 
 $ call make_nodes()
 $ call make_prods()
 $ end output
 
-$ output 'parser_tables.nit'
-# Tables used by the parser.
-# This file was generated by SableCC (http://www.sablecc.org/).
-package parser_tables
-
-$ call make_parser_tables()
-$ end output
-
 $ output 'parser.nit'
 # Parser.
 # This file was generated by SableCC (http://www.sablecc.org/).
 package parser
 
 intrude import parser_prod
-intrude import parser_tables
 $ call make_parser()
 $ end output
 
+$ output 'tables_nit.c'
+/* This file was generated by SableCC (http://www.sablecc.org/). */
+#include <stdlib.h>
+#include "tables_nit.h"
+
+$ call make_lexer_table()
+$ call make_parser_table()
+$ end output