2
Copyright (c) 2006, 2009 IBM Corporation and others.
3
All rights reserved. This program and the accompanying materials
4
are made available under the terms of the Eclipse Public License v1.0
5
which accompanies this distribution, and is available at
6
http://www.eclipse.org/legal/epl-v10.html
9
IBM Corporation - initial API and implementation
12
<project name="CDT Extensible LR Parser Framework" basedir=".">
13
<description>Generates LPG parsers from grammar files</description>
15
<import file="generate.xml"/>
17
<property name="c99_location" value="../src/org/eclipse/cdt/internal/core/dom/lrparser/c99"/>
18
<property name="gcc_location" value="../src/org/eclipse/cdt/internal/core/dom/lrparser/gcc"/>
19
<property name="cpp_location" value="../src/org/eclipse/cdt/internal/core/dom/lrparser/cpp"/>
20
<property name="gpp_location" value="../src/org/eclipse/cdt/internal/core/dom/lrparser/gpp"/>
22
<target name="all" depends="c99, gcc, cpp, gpp"/>
24
<target name="clean_l_files">
26
<fileset dir="${c99_location}" includes="**/*.l"/>
27
<fileset dir="${gcc_location}" includes="**/*.l"/>
28
<fileset dir="${cpp_location}" includes="**/*.l"/>
29
<fileset dir="${gpp_location}" includes="**/*.l"/>
35
<description>Generate the C99 parser</description>
36
<!-- Generate main parser -->
37
<antcall target="generate_c99">
38
<param name="grammar_name" value="C99Parser"/>
40
<!-- Generate parser for disambiguating declarations vs expression statements -->
41
<antcall target="generate_c99">
42
<param name="grammar_name" value="C99ExpressionParser"/>
44
<!-- Generate parser for disambiguating cast expressions vs binary expressions-->
45
<antcall target="generate_c99">
46
<param name="grammar_name" value="C99NoCastExpressionParser"/>
48
<!-- Generate parser for disambiguating sizeof expressions -->
49
<antcall target="generate_c99">
50
<param name="grammar_name" value="C99SizeofExpressionParser"/>
54
<target name="generate_c99">
55
<antcall target="generate">
56
<param name="grammar_dir" value="c99"/>
57
<param name="output_dir" value="${c99_location}"/>
58
<param name="grammar_name" value="${grammar_name}"/>
64
<description>Generate the GCC parser</description>
65
<!-- Generate main parser -->
66
<antcall target="generate_gcc">
67
<param name="grammar_name" value="GCCParser"/>
69
<antcall target="generate_gcc">
70
<param name="grammar_name" value="GCCSizeofExpressionParser"/>
75
<target name="generate_gcc">
76
<antcall target="generate">
77
<param name="grammar_dir" value="gcc"/>
78
<param name="output_dir" value="${gcc_location}"/>
79
<param name="grammar_name" value="${grammar_name}"/>
85
<description>Generate the C++ parser</description>
86
<antcall target="generate_cpp">
87
<param name="grammar_name" value="CPPParser"/>
89
<!-- Generate parser for disambiguating declarations vs expression statements -->
90
<antcall target="generate_cpp">
91
<param name="grammar_name" value="CPPExpressionParser"/>
93
<!-- Generate parser for disambiguating cast expressions vs binary expressions-->
94
<antcall target="generate_cpp">
95
<param name="grammar_name" value="CPPNoCastExpressionParser"/>
97
<!-- Generate parser for disambiguating sizeof expressions -->
98
<antcall target="generate_cpp">
99
<param name="grammar_name" value="CPPSizeofExpressionParser"/>
101
<!-- Generate parser for disambiguating declarators -->
102
<antcall target="generate_cpp">
103
<param name="grammar_name" value="CPPNoFunctionDeclaratorParser"/>
105
<!-- Generate parser for disambiguating template parameters -->
106
<antcall target="generate_cpp">
107
<param name="grammar_name" value="CPPTemplateTypeParameterParser"/>
111
<target name="generate_cpp">
112
<antcall target="generate">
113
<param name="grammar_dir" value="cpp"/>
114
<param name="output_dir" value="${cpp_location}"/>
115
<param name="grammar_name" value="${grammar_name}"/>
121
<description>Generate the GCC parser</description>
122
<!-- Generate main parser -->
123
<antcall target="generate_gpp">
124
<param name="grammar_name" value="GPPParser"/>
126
<antcall target="generate_gpp">
127
<param name="grammar_name" value="GPPSizeofExpressionParser"/>
132
<target name="generate_gpp">
133
<antcall target="generate">
134
<param name="grammar_dir" value="gpp"/>
135
<param name="output_dir" value="${gpp_location}"/>
136
<param name="grammar_name" value="${grammar_name}"/>
b'\\ No newline at end of file'