mirror of
https://github.com/johnkerl/miller.git
synced 2026-07-25 08:53:55 +00:00
grammar neaten; for-loop iterate
This commit is contained in:
parent
289466f703
commit
f53bac0ca0
4 changed files with 15 additions and 12 deletions
|
|
@ -173,6 +173,8 @@ char* mlr_dsl_ast_node_describe_type(mlr_dsl_ast_node_type_t type) {
|
|||
case MD_AST_NODE_TYPE_ENV: return "env"; break;
|
||||
case MD_AST_NODE_TYPE_FOR: return "for"; break;
|
||||
case MD_AST_NODE_TYPE_IN: return "in"; break;
|
||||
case MD_AST_NODE_TYPE_BREAK: return "break"; break;
|
||||
case MD_AST_NODE_TYPE_CONTINUE: return "continue"; break;
|
||||
default: return "???";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,6 +35,8 @@ typedef enum _mlr_dsl_ast_node_type_t {
|
|||
MD_AST_NODE_TYPE_NOP, // only for parser internals; should not be in the AST returned by the parser
|
||||
MD_AST_NODE_TYPE_FOR,
|
||||
MD_AST_NODE_TYPE_IN,
|
||||
MD_AST_NODE_TYPE_BREAK,
|
||||
MD_AST_NODE_TYPE_CONTINUE,
|
||||
} mlr_dsl_ast_node_type_t;
|
||||
|
||||
typedef struct _mlr_dsl_ast_t {
|
||||
|
|
|
|||
|
|
@ -4,6 +4,17 @@
|
|||
#include "mlr_dsl_parse.h"
|
||||
#include "../containers/mlr_dsl_ast.h"
|
||||
// http://flex.sourceforge.net/manual/Extra-Data.html
|
||||
|
||||
//xxx to do
|
||||
//"break" {
|
||||
// *yyextra = mlr_dsl_ast_node_alloc(yytext, MD_AST_NODE_TYPE_BREAK);
|
||||
// return MD_TOKEN_BREAK;
|
||||
//}
|
||||
//"continue" {
|
||||
// *yyextra = mlr_dsl_ast_node_alloc(yytext, MD_AST_NODE_TYPE_CONTINUE);
|
||||
// return MD_TOKEN_CONTINUE;
|
||||
//}
|
||||
|
||||
%}
|
||||
|
||||
%option reentrant
|
||||
|
|
|
|||
12
c/todo.txt
12
c/todo.txt
|
|
@ -42,18 +42,6 @@ TOP-OF-LIST SUMMARY
|
|||
? komosa multiops?
|
||||
? for x $* { for y { @v["a"] { ... } } ?
|
||||
|
||||
================================================================
|
||||
* relcut material since 3.5.0:
|
||||
- oosvars
|
||||
- begin/end
|
||||
- emit/all
|
||||
- unset/all
|
||||
- bare-boolean and pattern-action
|
||||
- put -q: equiv to putting 'filter false'
|
||||
- += et al. were ever announced -- fix intro release & note
|
||||
- double-backslashing bug in sub/gsub
|
||||
- --from, & why: up-arrow & append then-chain
|
||||
|
||||
================================================================
|
||||
NON-PRE4
|
||||
================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue