diff options
author | Will Estes <westes575@gmail.com> | 2017-05-13 15:15:45 -0400 |
---|---|---|
committer | Will Estes <westes575@gmail.com> | 2017-05-13 15:15:45 -0400 |
commit | 5cadd124f882290dff281b6de06d64d92ce73ecd (patch) | |
tree | 3fb1433654ea48ee96885f3aa985c058e4873a83 | |
parent | 7284970311c8b0c7c36da2d527b596d4699d1023 (diff) |
scanner: finish support for noyy{get,set}_column.
Unattributed patch carried over from sourceforge bug tracker.
-rw-r--r-- | src/main.c | 10 | ||||
-rw-r--r-- | src/options.c | 4 | ||||
-rw-r--r-- | src/options.h | 2 | ||||
-rw-r--r-- | src/scan.l | 2 |
4 files changed, 18 insertions, 0 deletions
@@ -648,6 +648,7 @@ void flexend (int exit_status) "yyget_extra", "yyget_in", "yyget_leng", + "yyget_column", "yyget_lineno", "yyget_lloc", "yyget_lval", @@ -670,6 +671,7 @@ void flexend (int exit_status) "yyset_debug", "yyset_extra", "yyset_in", + "yyset_column", "yyset_lineno", "yyset_lloc", "yyset_lval", @@ -1394,6 +1396,14 @@ void flexinit (int argc, char **argv) //buf_strdefine (&userdef_buf, "YY_NO_SET_LINENO", "1"); buf_m4_define( &m4defs_buf, "M4_YY_NO_SET_LINENO",0); break; + case OPT_NO_YYGET_COLUMN: + //buf_strdefine (&userdef_buf, "YY_NO_GET_COLUMN", "1"); + buf_m4_define( &m4defs_buf, "M4_YY_NO_GET_COLUMN",0); + break; + case OPT_NO_YYSET_COLUMN: + //buf_strdefine (&userdef_buf, "YY_NO_SET_COLUMN", "1"); + buf_m4_define( &m4defs_buf, "M4_YY_NO_SET_COLUMN",0); + break; case OPT_NO_YYGET_IN: //buf_strdefine (&userdef_buf, "YY_NO_GET_IN", "1"); buf_m4_define( &m4defs_buf, "M4_YY_NO_GET_IN",0); diff --git a/src/options.c b/src/options.c index 366bc2e..8e42adb 100644 --- a/src/options.c +++ b/src/options.c @@ -255,6 +255,10 @@ optspec_t flexopts[] = { , {"--noyyset_lineno", OPT_NO_YYSET_LINENO, 0} , + {"--noyyget_column", OPT_NO_YYGET_COLUMN, 0} + , + {"--noyyset_column", OPT_NO_YYSET_COLUMN, 0} + , {"--noyyget_in", OPT_NO_YYGET_IN, 0} , {"--noyyset_in", OPT_NO_YYSET_IN, 0} diff --git a/src/options.h b/src/options.h index 5b51c23..5016680 100644 --- a/src/options.h +++ b/src/options.h @@ -83,6 +83,7 @@ enum flexopt_flag_t { OPT_NO_YYGET_IN, OPT_NO_YYGET_LENG, OPT_NO_YYGET_LINENO, + OPT_NO_YYGET_COLUMN, OPT_NO_YYGET_LLOC, OPT_NO_YYGET_LVAL, OPT_NO_YYGET_OUT, @@ -92,6 +93,7 @@ enum flexopt_flag_t { OPT_NO_YYSET_EXTRA, OPT_NO_YYSET_IN, OPT_NO_YYSET_LINENO, + OPT_NO_YYSET_COLUMN, OPT_NO_YYSET_LLOC, OPT_NO_YYSET_LVAL, OPT_NO_YYSET_OUT, @@ -433,6 +433,8 @@ M4QEND "]""]" yyset_extra ACTION_M4_IFDEF("M4""_YY_NO_SET_EXTRA", ! option_sense); yyget_leng ACTION_M4_IFDEF("M4""_YY_NO_GET_LENG", ! option_sense); yyget_text ACTION_M4_IFDEF("M4""_YY_NO_GET_TEXT", ! option_sense); + yyget_column ACTION_M4_IFDEF("M4""_YY_NO_GET_COLUMN", ! option_sense); + yyset_column ACTION_M4_IFDEF("M4""_YY_NO_SET_COLUMN", ! option_sense); yyget_lineno ACTION_M4_IFDEF("M4""_YY_NO_GET_LINENO", ! option_sense); yyset_lineno ACTION_M4_IFDEF("M4""_YY_NO_SET_LINENO", ! option_sense); yyget_in ACTION_M4_IFDEF("M4""_YY_NO_GET_IN", ! option_sense); |