diff options
| author | Benjamin J. Culkin <bjculkin@mix.wvu.edu> | 2017-09-11 12:16:20 -0300 |
|---|---|---|
| committer | Benjamin J. Culkin <bjculkin@mix.wvu.edu> | 2017-09-11 12:16:20 -0300 |
| commit | 00804ba2bafba780c2f7e74b3e21ed14468ae7e6 (patch) | |
| tree | 32281b9a168586d48f745d60b633c1bdf085a928 | |
| parent | 2df965cd3f5764c07a6b9e412422958462bccc20 (diff) | |
Add beginnings of CLI for defines
| -rw-r--r-- | BJC-Utils2/src/main/java/bjc/utils/cli/objects/DefineCLI.java | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/BJC-Utils2/src/main/java/bjc/utils/cli/objects/DefineCLI.java b/BJC-Utils2/src/main/java/bjc/utils/cli/objects/DefineCLI.java new file mode 100644 index 0000000..71c683d --- /dev/null +++ b/BJC-Utils2/src/main/java/bjc/utils/cli/objects/DefineCLI.java @@ -0,0 +1,40 @@ +package bjc.utils.cli.objects; + +public class DefineCLI { + public static void main(String[] args) { + + } + + /** + * Run the CLI on an input source. + * + * @param input + * The place to read input from. + * @param ioSource + * The name of the place to read input from. + * @param interactive + * Whether or not the source is interactive + */ + public void run(Scanner input, String ioSource, boolean interactive) { + int lno = 0; + while(input.hasNextLine()) { + if(interactive) + System.out.printf("define-conf(%d)>", lno); + + String ln = input.nextLine(); + + lno += 1; + + Command com = Command.fromString(ln, lno, ioSource); + if(com == null) continue; + + handleCommand(com, interactive); + } + + input.close(); + } + + public void handleCommand(Command com, boolean interactive) { + + } +} |
