File tree Expand file tree Collapse file tree 9 files changed +79
-0
lines changed Expand file tree Collapse file tree 9 files changed +79
-0
lines changed Original file line number Diff line number Diff line change 1+ rm sandbox/Output.class sandbox/Output.java
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ python ../pls.py $1 > sandbox/Output.java
3+ javac sandbox/Output.java
4+ java sandbox/Output
5+ rm parser.out parsetab.py parsetab.pyc 2> /dev/null
6+
7+
8+
Original file line number Diff line number Diff line change 1+
2+ python ../pls.py $1 > sandbox/Output.java
3+ javac sandbox/Output.java
4+ java sandbox/Output
5+ rm parser.out parsetab.py parsetab.pyc 2> /dev/null
6+
7+
8+
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ python ../pls.py $1 > Output.java 2> /dev/null
3+ javac Output.java 2> /dev/null
4+ java -cp . Output
5+ rm Output.java Output.class parser.out parsetab.py parsetab.pyc 2> /dev/null
Original file line number Diff line number Diff line change 1+ python ../pls.py $1 > Output.java 2> /dev/null
2+ javac Output.java 2> /dev/null
3+ java -cp . Output
4+ rm Output.java Output.class parser.out parsetab.py parsetab.pyc 2> /dev/null
Original file line number Diff line number Diff line change 1+
2+ public class Output {
3+
4+ public static void main (String [] args ) throws Exception {
5+ double prev = 0 ;
6+ double aux = 0 ;
7+ double fib = 1 ; for (; (((fib < 500 ) ? 1 : 0 )) != 0 ;) { aux = fib ;
8+ fib = fib + prev ;
9+ prev = aux ;
10+ System .out .println (fib );}
11+ }}
Original file line number Diff line number Diff line change 1+ import os
2+ import os .path
3+ import subprocess
4+
5+ PATH = './Output.java'
6+ os .chdir ("./sandbox/" )
7+
8+ def test ():
9+ print ("Inside Testing Module" )
10+ #subprocess.check_output(["echo", "Hello World!"])
11+ subprocess .check_output (["./do.sh" , "input.pls" ])
12+
13+ def run ():
14+ output = subprocess .call (['./do.sh fib.pls' ])
15+
16+ if os .path .isfile (PATH ) and os .access (PATH , os .R_OK ):
17+ print "Output java File exists and is readable"
18+ test ()
19+ else :
20+ print "Either the Output java file is missing or is not readable"
21+ run ()
Original file line number Diff line number Diff line change 1+ import os
2+ import os.path
3+ import subprocess
4+
5+ PATH='./Output.java'
6+ os.chdir("./sandbox/")
7+
8+ def test():
9+ print("Inside Testing Module")
10+ #subprocess.check_output(["echo", "Hello World!"])
11+ subprocess.check_output(["./do.sh", "input.pls"])
12+
13+ def run():
14+ output=subprocess.call(['./do.sh fib.pls'])
15+
16+ if os.path.isfile(PATH) and os.access(PATH, os.R_OK):
17+ print "Output java File exists and is readable"
18+ test()
19+ else:
20+ print "Either the Output java file is missing or is not readable"
21+ run()
You can’t perform that action at this time.
0 commit comments