Permalink
Browse files

Renamed --pipe option to --pipe-in

  • Loading branch information...
1 parent b177176 commit f2626c9f0fabc6160c2651d20cbcdabcf25935f2 @tristanls committed Jul 2, 2011
Showing with 10 additions and 10 deletions.
  1. +4 −4 README.md
  2. +2 −2 bin/ometajsnode
  3. +4 −4 spec/ometajsnode.spec.js
View
@@ -63,19 +63,19 @@ This command uses grammar that also interprets, so the `output.file` will contai
from the `bin` directory:
-`./ometajsnode -g ../spec/data/grammar_to_ir.ometajs --grammar-match expr ../spec/data/program.file | ./ometajsnode -g ../spec/data/interpreter.ometajs --grammar-match interp -o output.file --pipe --debug`
+`./ometajsnode -g ../spec/data/grammar_to_ir.ometajs --grammar-match expr ../spec/data/program.file | ./ometajsnode -g ../spec/data/interpreter.ometajs --grammar-match interp -o output.file --pipe-in --debug`
-We introduce the `--pipe` option here:
+We introduce the `--pipe-in` option here:
-* `--pipe` indicates that the input has been previously generated by `ometajsnode`. notice that we are piping output from one `ometajsnode` to another; `--pipe` is a flag that lets `ometajsnode` know that it is working with input formatted by itself
+* `--pipe-in` indicates that the input has been previously generated by `ometajsnode`. notice that we are piping output from one `ometajsnode` to another; `--pipe-in` is a flag that lets `ometajsnode` know that it is working with input formatted by itself
#### Parser to intermediate representation, then intermediate representation to "assembly" code example:
from the `bin` directory:
-`./ometajsnode -g ../spec/data/grammar_to_ir.ometajs --grammar-match expr ../spec/data/program.file | ./ometajsnode -g ../spec/data/compiler.ometajs --grammar-match comp -u example-utilities --pipe -o output.file --debug --no-pipe-out`
+`./ometajsnode -g ../spec/data/grammar_to_ir.ometajs --grammar-match expr ../spec/data/program.file | ./ometajsnode -g ../spec/data/compiler.ometajs --grammar-match comp -u example-utilities --pipe-in -o output.file --debug --no-pipe-out`
We introduce the utilities option here:
View
@@ -22,7 +22,7 @@ var help2 = [
""
].join( '\n' );
var help3 = [
- " --pipe Pipe mode, expect stdin to be parse object represented as JSON string (instead of a program)",
+ " --pipe-in Pipe mode, expect stdin to be parse object represented as JSON string (instead of a program)",
" -u, --utility <module_file[,module_file]> Specifies a list of modules that will be available for access by ometajs files via __Utilities",
" Modules used as untilities must export 'utilityName' property to be read",
""
@@ -85,7 +85,7 @@ while ( arg = argv.shift() ) {
case 'o':
options.output = argv.shift();
break;
- case 'pipe':
+ case 'pipe-in':
options.pipe = true;
break;
case 'utility':
View
@@ -101,7 +101,7 @@ describe( 'ometajsnode', function() {
});
it( 'should parse piped output ["mul",["num",6],["add",["num",4],["num",3]]] from stdin using interpreter.ometajs and output to stdout', function() {
- exec( 'echo \'["mul",["num",6],["add",["num",4],["num",3]]]\' | ./bin/ometajsnode -g ./spec/data/interpreter.ometajs --grammar-match interp --pipe',
+ exec( 'echo \'["mul",["num",6],["add",["num",4],["num",3]]]\' | ./bin/ometajsnode -g ./spec/data/interpreter.ometajs --grammar-match interp --pipe-in',
function( error, stdout, stderr ) {
expect( stderr ).toEqual( '' );
expect( stdout ).toEqual( '42' );
@@ -111,7 +111,7 @@ describe( 'ometajsnode', function() {
});
it( 'should parse piped output ["mul",["num",6],["add",["num",4],["num",3]]] from stdin using interpreter.ometajs and output to file', function() {
- exec( 'echo \'["mul",["num",6],["add",["num",4],["num",3]]]\' | ./bin/ometajsnode -g ./spec/data/interpreter.ometajs --grammar-match interp --pipe -o ./spec/data/tmp/output.3.file',
+ exec( 'echo \'["mul",["num",6],["add",["num",4],["num",3]]]\' | ./bin/ometajsnode -g ./spec/data/interpreter.ometajs --grammar-match interp --pipe-in -o ./spec/data/tmp/output.3.file',
function( error, stdout, stderr ) {
expect( stderr ).toEqual( '' );
@@ -131,7 +131,7 @@ describe( 'ometajsnode', function() {
});
it( 'should parse intermediate representation ["mul",["num",6],["add",["num",4],["num",3]]] from ir.file using interpreter.ometajs and output to stdout', function() {
- exec( './bin/ometajsnode -g ./spec/data/interpreter.ometajs --grammar-match interp --pipe ./spec/data/ir.file',
+ exec( './bin/ometajsnode -g ./spec/data/interpreter.ometajs --grammar-match interp --pipe-in ./spec/data/ir.file',
function( error, stdout, stderr ) {
expect( stderr ).toEqual( '' );
expect( stdout ).toEqual( '42' );
@@ -141,7 +141,7 @@ describe( 'ometajsnode', function() {
});
it( 'should parse intermediate representation ["mul",["num",6],["add",["num",4],["num",3]]] from ir.file using interpreter.ometajs and output to file', function() {
- exec( './bin/ometajsnode -g ./spec/data/interpreter.ometajs --grammar-match interp --pipe -o ./spec/data/tmp/output.4.file ./spec/data/ir.file',
+ exec( './bin/ometajsnode -g ./spec/data/interpreter.ometajs --grammar-match interp --pipe-in -o ./spec/data/tmp/output.4.file ./spec/data/ir.file',
function( error, stdout, stderr ) {
expect( stderr ).toEqual( '' );

0 comments on commit f2626c9

Please sign in to comment.