summaryrefslogtreecommitdiffstats
path: root/src/gram.y
diff options
context:
space:
mode:
authorBen Lu <ayroblu@gmail.com>2019-09-10 02:12:59 +0100
committerBen Lu <ayroblu@gmail.com>2019-09-10 02:12:59 +0100
commite215a1b55dd791ee7111e6c5595b54ebdcc08b77 (patch)
treed4513fca1833897efe560e23e83a0283c7813c8f /src/gram.y
parent410d403b765bb24e3a1cdb629897ae19c5581268 (diff)
No truncate isnt recognised?
Diffstat (limited to 'src/gram.y')
-rwxr-xr-xsrc/gram.y10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gram.y b/src/gram.y
index 710dcde..04f0fae 100755
--- a/src/gram.y
+++ b/src/gram.y
@@ -233,8 +233,8 @@ token S_YANKCOL
%token K_NONUMERIC_ZERO
%token K_OVERLAP
%token K_NOOVERLAP
-%token K_TRUNCATE_CELLS
-%token K_NOTRUNCATE_CELLS
+%token K_TRUNCATE
+%token K_NOTRUNCATE
%token K_QUIT_AFTERLOAD
%token K_NOQUIT_AFTERLOAD
%token K_XLSX_READFORMULAS
@@ -1022,8 +1022,10 @@ setitem :
else parse_str(user_conf_d, "overlap=1", TRUE); }
| K_OVERLAP { parse_str(user_conf_d, "overlap=1", TRUE); }
| K_NOOVERLAP { parse_str(user_conf_d, "overlap=0", TRUE); }
- | K_TRUNCATE_CELLS { parse_str(user_conf_d, "truncate_cells=1", TRUE); }
- | K_NOTRUNCATE_CELLS { parse_str(user_conf_d, "truncate_cells=0", TRUE); }
+ | K_TRUNCATE '=' NUMBER { if ($3 == 0) parse_str(user_conf_d, "truncate=0", TRUE);
+ else parse_str(user_conf_d, "truncate=1", TRUE); }
+ | K_TRUNCATE { parse_str(user_conf_d, "truncate=1", TRUE); }
+ | K_NOTRUNCATE { parse_str(user_conf_d, "truncate=0", TRUE); }
| K_AUTOBACKUP '=' NUMBER {
char cmd[MAXCMD];
sprintf(cmd, "autobackup=%d", $3);