nitcc: add `no_warning` when generating files
authorJean Privat <jean@pryen.org>
Sat, 20 Dec 2014 14:11:33 +0000 (09:11 -0500)
committerJean Privat <jean@pryen.org>
Sat, 20 Dec 2014 19:15:21 +0000 (14:15 -0500)
Signed-off-by: Jean Privat <jean@pryen.org>

contrib/nitcc/src/autom.nit
contrib/nitcc/src/grammar.nit
contrib/nitcc/src/nitcc.nit

index 5ece999..1367e0d 100644 (file)
@@ -655,7 +655,8 @@ private class DFAGenerator
                        i += 1
                end
 
-               add "# Lexer generated by nitcc for the grammar {name}"
+               add "# Lexer generated by nitcc for the grammar {name}\n"
+               add "module {name}_lexer is no_warning \"missing-doc\"\n"
                add("import nitcc_runtime\n")
 
                var p = parser
index eea312f..b9ac2f8 100644 (file)
@@ -640,6 +640,7 @@ private class Generator
                var gram = autom.grammar
 
                add "# Parser generated by nitcc for the grammar {name}"
+               add "module {name}_parser is no_warning(\"missing-doc\",\"old-init\")"
                add "import nitcc_runtime"
 
                add "class Parser_{name}"
index 562f5cb..0cc9d2a 100644 (file)
@@ -144,9 +144,14 @@ lr.gen_to_nit("{name}_parser.nit", name)
 
 f = new OFStream.open("{name}_test_parser.nit")
 f.write """# Generated by nitcc for the language {{{name}}}
+
+# Standalone parser tester for the language {{{name}}}
+module {{{name}}}_test_parser
 import nitcc_runtime
 import {{{name}}}_lexer
 import {{{name}}}_parser
+
+# Class to test the parser for the language {{{name}}}
 class TestParser_{{{name}}}
        super TestParser
        redef fun name do return \"{{{name}}}\"