2 rem * Copyright 2004-2008 MTBJ, Inc.
4 rem * Licensed under the Apache License, Version 2.0 (the "License");
5 rem * you may not use this file except in compliance with the License.
6 rem * You may obtain a copy of the License at
8 rem * http://www.apache.org/licenses/LICENSE-2.0
10 rem * Unless required by applicable law or agreed to in writing, software
11 rem * distributed under the License is distributed on an "AS IS" BASIS,
12 rem * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 rem * See the License for the specific language governing permissions and
14 rem * limitations under the License.
16 set projectDirectory=%cd%
17 set cupDir=%projectDirectory%\src\main\java\com\dtrules\compiler\cup
18 set libDir=%projectDirectory%\lib
20 rem dir %projectDirectory%
26 java -cp %libDir%\java-cup-11a.jar java_cup.Main -parser nul: -symbols nul: -dump_grammar < parser.cup 2> bnf.txt
27 rem echo create Java file
28 java -cp %libDir%\java-cup-11a.jar java_cup.Main -compact_red -nopositions -parser DTRulesParser < parser.cup
31 copy /y copyright.txt+DTRulesParser.java xxx.tmp > nul
32 copy /y xxx.tmp DTRulesParser.java > nul
34 copy /y copyright.txt+sym.java xxx.tmp > nul
35 copy /y xxx.tmp sym.java > nul
37 copy /y copyright.txt+bnf.txt xxx.tmp > nul
38 copy /y xxx.tmp bnf.txt > nul