This commit is contained in:
John Kerl 2016-08-05 21:27:08 -04:00
parent 47bb4aac1f
commit 387ca3b180
3 changed files with 17 additions and 5 deletions

View file

@ -5,6 +5,8 @@
#include "../containers/mlr_dsl_ast.h"
// http://flex.sourceforge.net/manual/Extra-Data.html
// NOTE: any new keywords defined here should also be documented
// in mapping/mlr_dsl_cst.c's mlr_dsl_keyword_usage() et al.
%}
%option reentrant
@ -30,7 +32,6 @@
*yyextra = mlr_dsl_ast_node_alloc(yytext, MD_AST_NODE_TYPE_SREC_ASSIGNMENT);
return MD_TOKEN_ASSIGN;
}
"filter" {
*yyextra = mlr_dsl_ast_node_alloc(yytext, MD_AST_NODE_TYPE_FILTER);
return MD_TOKEN_FILTER;

View file

@ -2620,7 +2620,8 @@ void mlr_dsl_list_all_keywords_raw(FILE* ostream) {
printf("stderr\n");
}
// Pass function_name == NULL to get usage for all functions.
// Pass function_name == NULL to get usage for all keywords.
// Note keywords are defined in dsls/mlr_dsl_lexer.l.
void mlr_dsl_keyword_usage(FILE* ostream, char* keyword) {
if (keyword == NULL) {
mlr_dsl_filter_usage(ostream); fprintf(ostream, "\n");

View file

@ -16,12 +16,12 @@ TOP OF LIST:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
COMMON:
! print/dump end with OFS !
* mlr -k needs >/>>/| examples incl. stdout/stderr/file/cmd. also some subset at mlr put -h.
* keywords: mk cmt xrefs mlr -k <-> parse.l.
* kw stdout/stderr & to mlr -k / mlh / mld; also to release notes (not avail as boundvars & what happens if tried:
"syntax error")
* lrec_reader/writer take sub-bagged cliopts pstructs
* put/tee --oxxx flags overlays, w/ substruct data & federated substruct fcns
~ lrec_reader/writer take sub-bagged cliopts pstructs
~ put/tee --oxxx flags overlays, w/ substruct data & federated substruct fcns
COOKBOOK:
* mlr --from ../data/big.dkvp put -q 'tee > $a.$b.".txt", $*'
@ -30,10 +30,20 @@ COOKBOOK:
40116 ekshat.txt
40105 ekspan.txt
40257 ekswye.txt
...
* mlr step -a shift
* ... then put -q '' or ... then nothing
* asv et al.
awk manpage:
> The print statement prints its arguments on the standard output (or on a file if >file or >>file is
> present or on a pipe if |cmd is present), separated by the current output field separator, and termi-
> nated by the output record separator. file and cmd may be literal names or parenthesized expres-
> sions; identical string values in different statements denote the same open file. The printf state-
> ment formats its expression list according to the format (see printf(3)). The built-in function
> close(expr) closes the file or pipe expr. The built-in function fflush(expr) flushes any buffered
> output for the file or pipe expr.
----------------------------------------------------------------
FOR 4.4.0: