forked from thoka/java2python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjava2py.str
More file actions
95 lines (78 loc) · 1.76 KB
/
Copy pathjava2py.str
File metadata and controls
95 lines (78 loc) · 1.76 KB
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
module java2py
imports
libstratego-lib
libjava-front
libstratego-tool-doc
pp2py/main
// java/pretty-print2py
strategies
/**
* Pretty-prints the Java AST to a string.
*
* @type Java -> String
*/
// pp-java-stream = pp-java2py-stream //TODO hack, to get java2java running now
pp-java2py-string =
pp-java52py-to-string
/**
* Pretty-prints the Java AST to the Stream.
*
* @param Stream
* @type Java -> Stream
*/
pp-java2py-stream(|stream) =
pp-java2py-box
; box2text-stream(|800, stream)
/**
* Pretty-prints the Java AST to a Box representation.
*
* @type Java -> Box
*/
pp-java2py-box =
pp-java2py-box(fail)
pp-java2py-box(extension) =
pp-java52py-to-abox(extension)
strategies
main-java2py =
io-wrap(
pp-java2py-box <+ report-failure
)
main-java2py_old =
io-wrap(
fail
, java2py-usage
, java2py-about
, java2py_new <+ report-failure
)
java2py =
?(<read-from-stream>, fout)
; pp-java2py-stream(|fout)
; <fputs> ("\n", fout)
java2py_new =
pp-java2py-box
/**
* Documentation
*/
strategies
java2py-usage =
<tool-doc>
[ Usage("java2py [OPTIONS]")
, Summary("Converts a Java abstract syntax tree in ATerm format to a Python ABox file.")
, OptionUsage()
, AutoReportBugs()
]
java2py-about =
<tool-doc>
[ AutoProgram()
, Author(
ItemList([
Person("Thomas Kalka", "thomas.kalka@googlemail.com")
,Person("Martin Bravenboer", "martin.bravenboer@gmail.com")]
)
)
, GNU_LGPL("2002-2007", "Martin Bravenboer <martin.bravenboer@gmail.com>")
, Config([
DefaultXTCRepository()
, CurrentXTCRepository()
])
]