From 26fbc81a9ef5b67a7e9b6ede7dec2b627b3a9d4a Mon Sep 17 00:00:00 2001 From: Pim Snel Date: Mon, 10 Feb 2020 18:52:02 +0100 Subject: add more commands usefull when scripting --- src/gram.y | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/gram.y') diff --git a/src/gram.y b/src/gram.y index f971535..d77fa9a 100755 --- a/src/gram.y +++ b/src/gram.y @@ -90,9 +90,9 @@ int yylex(); /* token S_INSERTCOL token S_OPENCOL -token S_DELETECOL token S_YANKCOL */ +%token S_DELETECOL %token S_DATEFMT %token S_SUBTOTAL %token S_RSUBTOTAL @@ -162,7 +162,9 @@ token S_YANKCOL token S_SELECT token S_INSERTROW token S_OPENROW - token S_DELETEROW +*/ +%token S_DELETEROW +/* token S_YANKROW token S_PULL token S_PULLMERGE @@ -184,6 +186,7 @@ token S_YANKCOL token S_PLUGIN token S_PLUGOUT */ +%token S_VALUEIZEALL %token S_SHIFT %token S_GETNUM %token S_GETSTRING @@ -472,6 +475,11 @@ command: | S_SHOW COL { show_col($2, 1); } // show de una unica columna | S_SHOW NUMBER { show_row($2, 1); } // show de una unica fila +/* more scripting commands */ + | S_DELETECOL COL { deletecol($2, 1); } + | S_DELETEROW NUMBER { deleterow($2, 1); } + + /* agregados para scim */ | S_HIDECOL COL { hide_col($2, 1); } // hide de una unica columna @@ -510,6 +518,7 @@ command: currow = r < currow ? r : r < currow + arg ? currow : r - arg; } + | S_VALUEIZEALL { valueize_area(0, 0, maxrow, maxcol); } | S_SHIFT var_or_range STRING { if (strlen($3) != 1 || ($3[0] != 'h' && $3[0] != 'j' && $3[0] != 'k' && $3[0] != 'l')) { sc_error("wrong parameter for shift command"); -- cgit v1.2.3