First NIT release and new clean mercurial repository
[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
19 $ include 'nodes.xss'
20 $ include 'lexer.xss'
21 $ include 'parser.xss'
22 $ include 'tokens.xss'
23 $ include 'prods.xss'
24
25 $ output 'parser_abs.nit'
26 # Raw AST node hierarchy.
27 # This file was generated by SableCC (http://www.sablecc.org/). 
28 package parser_abs
29
30 $ call make_abs_nodes()
31 $ call make_abs_tokens()
32 $ call make_abs_prods()
33 $ end output
34
35 $ output 'lexer.nit'
36 # Lexer and its tokens.
37 # This file was generated by SableCC (http://www.sablecc.org/).
38 package lexer
39
40 $ if $usermodule
41 import $usermodule
42 $ else
43 import parser_abs
44 $ end
45 $ call make_tokens()
46 $ call make_lexer()
47 $ end output
48
49 $ output 'parser_prod.nit'
50 # Production AST nodes full definition.
51 # This file was generated by SableCC (http://www.sablecc.org/). 
52 package parser_prod
53
54 import lexer
55 $ if $usermodule
56 intrude import $usermodule
57 $ else
58 intrude import parser_abs
59 $ end
60
61 $ call make_nodes()
62 $ call make_prods()
63 $ end output
64
65 $ output 'parser_tables.nit'
66 # Tables used by the parser.
67 # This file was generated by SableCC (http://www.sablecc.org/). 
68 package parser_tables
69
70 $ call make_parser_tables()
71 $ end output
72
73 $ output 'parser.nit'
74 # Parser.
75 # This file was generated by SableCC (http://www.sablecc.org/). 
76 package parser
77
78 import parser_prod
79 intrude import parser_tables
80 $ call make_parser()
81 $ end output
82