-
Notifications
You must be signed in to change notification settings - Fork 0
/
mavenize.sh
executable file
·151 lines (113 loc) · 8.64 KB
/
mavenize.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
#!/bin/bash
set -eux
curl -L http://www.oreilly.co.jp/pub/9784873115320/tpdsl-code.tgz | tar xz
mkdir -p parsing/lexer/src/main/java
mv -v code/parsing/lexer/*.java parsing/lexer/src/main/java/
mkdir -p parsing/recursive-descent/src/main/{java,antlr3}
mv -v code/parsing/recursive-descent/*.java parsing/recursive-descent/src/main/java/
mv -v code/parsing/recursive-descent/*.g parsing/recursive-descent/src/main/antlr3/
mkdir -p parsing/multi/src/main/{java,antlr3}
mv -v code/parsing/multi/*.java parsing/multi/src/main/java/
mv -v code/parsing/multi/*.g parsing/multi/src/main/antlr3/
mkdir -p parsing/backtrack/src/main/{java,antlr3}
mv -v code/parsing/backtrack/*.java parsing/backtrack/src/main/java/
mv -v code/parsing/backtrack/*.g parsing/backtrack/src/main/antlr3/
mkdir -p parsing/memoize/src/main/{java,antlr3}
mv -v code/parsing/memoize/*.java parsing/memoize/src/main/java/
mv -v code/parsing/memoize/*.g parsing/memoize/src/main/antlr3/
mkdir -p parsing/antlr/src/main/{java,antlr3}
mv -v code/parsing/antlr/Test.java parsing/antlr/src/main/java/
mv -v code/parsing/antlr/*.g parsing/antlr/src/main/antlr3/
mv -v code/parsing/antlr/box parsing/antlr/
mkdir -p IR/Homo/src/main/java
mv -v code/IR/Homo/*.java IR/Homo/src/main/java
mkdir -p IR/Normalized/src/main/java
mv -v code/IR/Normalized/*.java IR/Normalized/src/main/java
mkdir -p IR/Hetero/src/main/java
mv -v code/IR/Hetero/*.java IR/Hetero/src/main/java
mkdir -p walking/embedded/src/main/java
mv -v code/walking/embedded/*.java walking/embedded/src/main/java
mkdir -p walking/visitor/src/main/java
mv -v code/walking/visitor/*.java walking/visitor/src/main/java
mkdir -p walking/tree-grammar/src/main/{java,antlr3}
mv -v code/walking/tree-grammar/{AddNode.java,ExprNode.java,PrintNode.java,Test.java,VectorNode.java,AssignNode.java,IntNode.java,StatListNode.java,VarNode.java,DotProductNode.java,MultNode.java,StatNode.java,VecMathNode.java} walking/tree-grammar/src/main/java
mv -v code/walking/tree-grammar/*.g walking/tree-grammar/src/main/antlr3
mv -v code/walking/tree-grammar/t1 walking/tree-grammar/
mkdir -p walking/patterns/src/main/{java,antlr3}
mv -v code/walking/patterns/*.g walking/patterns/src/main/antlr3
mv -v code/walking/patterns/Test*.java walking/patterns/src/main/java
mv -v code/walking/patterns/{t1,t2,u1,u2} walking/patterns/
mkdir -p symtab/monolithic/src/main/{java,antlr3}
mv -v code/symtab/monolithic/*.g symtab/monolithic/src/main/antlr3
mv -v code/symtab/monolithic/{BuiltInTypeSymbol.java,Scope.java,Symbol.java,SymbolTable.java,Test.java,Type.java,VariableSymbol.java} symtab/monolithic/src/main/java
mv -v code/symtab/monolithic/*.cymbol symtab/monolithic/
mkdir -p symtab/nested/src/main/{java,antlr3}
mv -v code/symtab/nested/*g symtab/nested/src/main/antlr3
mv -v code/symtab/nested/*.cymbol symtab/nested/
mv -v code/symtab/nested/{BaseScope.java,BuiltInTypeSymbol.java,GlobalScope.java,LocalScope.java,MethodSymbol.java,Scope.java,Symbol.java,SymbolTable.java,Test.java,Type.java,VariableSymbol.java} symtab/nested/src/main/java
mkdir -p symtab/aggr/src/main/{java,antlr3}
mv -v code/symtab/aggr/*.g symtab/aggr/src/main/antlr3
mv -v code/symtab/aggr/*.cymbol symtab/aggr
mv -v code/symtab/aggr/{BaseScope.java,BuiltInTypeSymbol.java,GlobalScope.java,LocalScope.java,MethodSymbol.java,Scope.java,ScopedSymbol.java,StructSymbol.java,Symbol.java,SymbolTable.java,Test.java,Type.java,VariableSymbol.java} symtab/aggr/src/main/java
mkdir -p symtab/class/src/main/{java,antlr3}
mv -v code/symtab/class/*.g symtab/class/src/main/antlr3
mv -v code/symtab/class/*.cymbol symtab/class
mv -v code/symtab/class/{BaseScope.java,BuiltInTypeSymbol.java,ClassSymbol.java,CymbolAST.java,CymbolErrorNode.java,GlobalScope.java,LocalScope.java,MethodSymbol.java,Scope.java,ScopedSymbol.java,Symbol.java,SymbolTable.java,Test.java,Type.java,VariableSymbol.java} symtab/class/src/main/java
mkdir -p semantics/types/src/main/{java,antlr3}
mv -v code/semantics/types/*.g semantics/types/src/main/antlr3
mv -v code/semantics/types/*.cymbol semantics/types
mv -v code/semantics/types/{ArrayType.java,BaseScope.java,BuiltInTypeSymbol.java,ClassSymbol.java,CymbolAST.java,CymbolErrorNode.java,CymbolListener.java,GlobalScope.java,LocalScope.java,MethodSymbol.java,Scope.java,ScopedSymbol.java,StructSymbol.java,Symbol.java,SymbolTable.java,Test.java,Type.java,VariableSymbol.java} semantics/types/src/main/java
mkdir -p semantics/promote/src/main/{java,antlr3}
mv -v code/semantics/promote/*.g semantics/promote/src/main/antlr3
mv -v code/semantics/promote/*.cymbol semantics/promote
mv -v code/semantics/promote/{ArrayType.java,BaseScope.java,BuiltInTypeSymbol.java,ClassSymbol.java,CymbolAST.java,CymbolErrorNode.java,CymbolListener.java,GlobalScope.java,LocalScope.java,MethodSymbol.java,Scope.java,ScopedSymbol.java,StructSymbol.java,Symbol.java,SymbolTable.java,Test.java,Type.java,VariableSymbol.java} semantics/promote/src/main/java
mkdir -p semantics/safety/src/main/{java,antlr3}
mv -v code/semantics/safety/*.g semantics/safety/src/main/antlr3
mv -v code/semantics/safety/*.cymbol semantics/safety
mv -v code/semantics/safety/{ArrayType.java,BaseScope.java,BuiltInTypeSymbol.java,ClassSymbol.java,CymbolAST.java,CymbolErrorNode.java,CymbolListener.java,GlobalScope.java,LocalScope.java,MethodSymbol.java,Scope.java,ScopedSymbol.java,StructSymbol.java,Symbol.java,SymbolTable.java,Test.java,Type.java,VariableSymbol.java} semantics/safety/src/main/java
mkdir -p semantics/oo/src/main/{java,antlr3}
mv -v code/semantics/oo/*.g semantics/oo/src/main/antlr3
mv -v code/semantics/oo/*.cymbol semantics/oo
mv -v code/semantics/oo/{BaseScope.java,BuiltInTypeSymbol.java,ClassSymbol.java,CymbolAST.java,CymbolErrorNode.java,CymbolListener.java,GlobalScope.java,LocalScope.java,MethodSymbol.java,PointerType.java,Scope.java,ScopedSymbol.java,Symbol.java,SymbolTable.java,Test.java,Type.java,VariableSymbol.java} semantics/oo/src/main/java
mkdir -p interp/syntax/src/main/{java,antlr3}
mv -v code/interp/syntax/*.g interp/syntax/src/main/antlr3
mv -v code/interp/syntax/*.q interp/syntax
mv -v code/interp/syntax/{Interpreter.java,InterpreterListener.java,QInterp.java,ResultSet.java,Row.java,Table.java} interp/syntax/src/main/java
mkdir -p interp/tree/src/main/{java,antlr3}
mv -v code/interp/tree/*.g interp/tree/src/main/antlr3
mv -v code/interp/tree/*.pie interp/tree
mv -v code/interp/tree/{BaseScope.java,FunctionSpace.java,FunctionSymbol.java,GlobalScope.java,InterPie.java,Interpreter.java,InterpreterListener.java,LocalScope.java,MemorySpace.java,PieAST.java,PieErrorNode.java,ReturnValue.java,Scope.java,ScopedSymbol.java,StructInstance.java,StructSymbol.java,Symbol.java,VariableSymbol.java} interp/tree/src/main/java
mkdir -p interp/asm/src/main/{java,antlr3}
mv -v code/interp/asm/*.g interp/asm/src/main/antlr3
mv -v code/interp/asm/{BytecodeAssembler.java,BytecodeDefinition.java,DisAssembler.java,FunctionSymbol.java,LabelSymbol.java} interp/asm/src/main/java
mkdir -p interp/stack/src/main/{java,antlr3}
mv -v code/interp/stack/*.g interp/stack/src/main/antlr3
mv -v code/interp/stack/*.pcode interp/stack
mv -v code/interp/stack/{BytecodeAssembler.java,BytecodeDefinition.java,DisAssembler.java,FunctionSymbol.java,Interpreter.java,LabelSymbol.java,StackFrame.java,StructSpace.java} interp/stack/src/main/java
mkdir -p interp/reg/src/main/{java,antlr3}
mv -v code/interp/reg/*.g interp/reg/src/main/antlr3
mv -v code/interp/reg/*.rcode interp/reg
mv -v code/interp/reg/{BytecodeAssembler.java,BytecodeDefinition.java,DisAssembler.java,FunctionSymbol.java,Interpreter.java,LabelSymbol.java,StackFrame.java,StructSpace.java} interp/reg/src/main/java
mkdir -p trans/make/src/main/{java,antlr3}
mv -v code/trans/make/*.g trans/make/src/main/antlr3
mv -v code/trans/make/{*.c,makefile} trans/make
mv -v code/trans/make/{JavaGenerator.java,MakeGenerator.java,MakeSupport.java,Maker.java,StreamVacuum.java,Target.java} trans/make/src/main/java
mkdir -p trans/wiki/src/main/{java,antlr3}
mv -v code/trans/wiki/*.g trans/wiki/src/main/antlr3
mv -v code/trans/wiki/*.wiki trans/wiki
mv -v code/trans/wiki/WikiToHTML.java trans/wiki/src/main/java
mkdir -p trans/intro/src/main/java
mv -v code/trans/intro/*.java trans/intro/src/main/java
mkdir -p trans/web/src/main/java
mv -v code/trans/web/*.stg trans/web
mv -v code/trans/web/*.java trans/web/src/main/java
mkdir -p trans/ast/src/main/java
mv -v code/trans/ast/*.stg trans/ast
mv -v code/trans/ast/*.java trans/ast/src/main/java
mkdir -p trans/ast-st/src/main/{java,antlr3}
mv -v code/trans/ast-st/*.g trans/ast-st/src/main/antlr3
mv -v code/trans/ast-st/*.{cymbol,stg} trans/ast-st
mv -v code/trans/ast-st/Test.java trans/ast-st/src/main/java
mkdir -p trans/sql/src/main/java
mv -v code/trans/sql/*.stg trans/sql
mv -v code/trans/sql/*.java trans/sql/src/main/java