Merge: doc: fixed some typos and other misc. corrections
[nit.git] / src / parser / xss / main.xss
1 $ // This file is part of NIT ( http://www.nitlanguage.org ).
2 $ //
3 $ // Copyright 2008 Jean Privat <jean@pryen.org>
4 $ // Based on algorithms developped for ( http://www.sablecc.org/ ).
5 $ //
6 $ // Licensed under the Apache License, Version 2.0 (the "License");
7 $ // you may not use this file except in compliance with the License.
8 $ // You may obtain a copy of the License at
9 $ //
10 $ //     http://www.apache.org/licenses/LICENSE-2.0
11 $ //
12 $ // Unless required by applicable law or agreed to in writing, software
13 $ // distributed under the License is distributed on an "AS IS" BASIS,
14 $ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 $ // See the License for the specific language governing permissions and
16 $ // limitations under the License.
17
18 $ include 'lexer.xss'
19 $ include 'parser.xss'
20 $ include 'tokens.xss'
21 $ include 'prods.xss'
22
23 $ output 'parser_abs.nit'
24 # Raw AST node hierarchy.
25 # This file was generated by SableCC (http://www.sablecc.org/).
26 module parser_abs is generated, no_warning("missing-doc")
27
28 import location
29
30 $ call make_abs_tokens()
31 $ call make_abs_prods()
32 $ end output
33
34 $ output 'lexer.nit'
35 # Lexer and its tokens.
36 # This file was generated by SableCC (http://www.sablecc.org/).
37 module lexer is generated, no_warning("missing-doc")
38
39 $ if $usermodule
40 intrude import $usermodule
41 $ else
42 intrude import parser_abs
43 $ end
44 intrude import lexer_work
45 private import tables
46
47 $ call make_tokens()
48 $ call make_lexer()
49 $ end output
50
51 $ output 'parser_prod.nit'
52 # Production AST nodes full definition.
53 # This file was generated by SableCC (http://www.sablecc.org/).
54 module parser_prod is generated, no_warning("missing-doc")
55
56 import lexer
57 $ if $usermodule
58 intrude import $usermodule
59 $ else
60 intrude import parser_abs
61 $ end
62 private import tables
63
64 $ call make_prods()
65 $ end output
66
67 $ output 'parser.nit'
68 # Parser.
69 # This file was generated by SableCC (http://www.sablecc.org/).
70 module parser is generated, no_warning("missing-doc", "unread-variable")
71
72 intrude import parser_prod
73 intrude import parser_work
74 private import tables
75 $ call make_parser()
76 $ end output
77
78 $ output 'tables_nit.c'
79 /* This file was generated by SableCC (http://www.sablecc.org/). */
80 #include <stdlib.h>
81 #include "tables_nit.h"
82
83 $ call make_lexer_table()
84 $ call make_parser_table()
85 $ end output