|
4 | 4 | # This is the main interpreter. This is used to read through the file and call the respective libraries |
5 | 5 | # |
6 | 6 |
|
| 7 | +# TO read console input for ths program |
| 8 | +args <- commandArgs(trailingOnly = TRUE) |
| 9 | +loadScrit <- function(){ |
| 10 | + fileName <- "" |
| 11 | + if(is.na(args[1])){ |
| 12 | + fileName <- choose.files() |
| 13 | + } else if(args[1] == 1){ |
| 14 | + fileName <- "mainScript.txt" |
| 15 | + } else { |
| 16 | + fileName <- args[1] |
| 17 | + } |
| 18 | + return(fileName) |
| 19 | +} |
7 | 20 |
|
8 | | - |
9 | | - |
10 | | -script <- readLines("mainScript.txt") |
| 21 | +script <- suppressWarnings(readLines("mainScript.interOp")) #This triggers a warning but not an concern |
11 | 22 | # From loading from a file have to conver to table matrix |
12 | 23 | script <- as.matrix(script) |
13 | 24 |
|
@@ -70,7 +81,7 @@ allbounds <- processBounds() |
70 | 81 | titleRows <- as.integer(allbounds[,1]) |
71 | 82 | source("processRequest.R") |
72 | 83 |
|
73 | | -testPiper <- function(firstFunc, secondFunc){ |
| 84 | +Piper <- function(firstFunc, secondFunc){ |
74 | 85 |
|
75 | 86 | #Run first return output |
76 | 87 | firstFunc <- processFunction(match(firstFunc, allbounds[,3])) #Now it has the output val of first funct |
@@ -109,7 +120,7 @@ master <- function(){ |
109 | 120 | if(headTag[2] == "**<<"){ |
110 | 121 | #Then we need to pass both func bounds |
111 | 122 | #print(headTag) |
112 | | - print(testPiper(headTag[1], headTag[3])) |
| 123 | + print(Piper(headTag[1], headTag[3])) |
113 | 124 | } |
114 | 125 | } |
115 | 126 | } |
|
0 commit comments