File tree Expand file tree Collapse file tree 5 files changed +23
-15
lines changed
Expand file tree Collapse file tree 5 files changed +23
-15
lines changed Original file line number Diff line number Diff line change 1212 *
1313 * History
1414 *
15+ * bengsig 12-jun-2023 - Make rwm a variable in scanners
1516 * bengsig 10-aug-2022 - Output userhelp in order from rwl source file
1617 * bengsig 10-aug-2022 - Don't reorder useroption/userswitch
1718 * bengsig 04-jul-2022 - Restructure scan string, scan SQL code
3940#include " rwldiprs.tab.h"
4041#define YYSTYPE RWLZSTYPE
4142#define YY_DECL sb4 rwlalex (void *yylval_param, void * yyscanner)
43+ #define YY_USER_ACTION { rwm = (yyget_extra (yyscanner)); }
4244
4345
44- /* The rwm define is used to make code below legible */
45- #define rwm (yyget_extra(yyscanner))
4646// to avoid flex generating some code:
4747// #define YY_NO_INPUT
4848
5959
6060%%
6161
62+ %{
63+ rwl_main *rwm = 0 ; // will be set using YY_USER_ACTION
64+ %}
65+
66+
6267(? i:administer[ \r\n ]+ key[ \r\n ]+ management) |
6368(? i:associate[ \r\n ]+ statistics) |
6469(? i:disassociate[ \r\n ]+ statistics) |
Original file line number Diff line number Diff line change 1414 *
1515 * History
1616 *
17+ * bengsig 12-jun-2023 - Make rwm a variable in scanners
1718 * bengsig 25-may-2023 - Use rwlscanstring.c
1819 * bengsig 15-may-2023 - statisticsonly
1920 * bengsig 8-mar-2023 - Normal Distributed random
4344#include " rwl.h"
4445#include " rwldiprs.tab.h"
4546
46- /* The rwm define is used to make code below legible */
47- #define rwm (yyget_extra(yyscanner))
4847// to avoid flex generating some code:
4948#define YY_NO_INPUT
5049
5150#define YYSTYPE RWLZSTYPE
5251#define YY_DECL sb4 rwlzlex (void *yylval_param, void *yyscanner)
52+ #define YY_USER_ACTION { rwm = (yyget_extra (yyscanner)); }
5353#define RWL_IN_DILEX // make rwlscanstring.c do the right thing
5454
5555%}
6060
6161%%
6262
63+ %{
64+ rwl_main *rwm = 0 ; // will be set using YY_USER_ACTION
65+ %}
66+
6367\' (\\ . | [^ \\ ' ])* \' { // copy from rwllexer.l
6468 rwlerror (rwm, RWL_ERROR_USE_QUOTE_FOR_STRING);
6569 rwm->badchar ++;
399403
400404%%
401405
402- #undef rwm /* now outside flex code */
403-
404406sb4 rwlzwrap (yyscan_t ys)
405407{
406408 return 1 ;
Original file line number Diff line number Diff line change 1111 *
1212 * History
1313 *
14+ * bengsig 12-jun-2023 - Make rwm a variable in scanners
1415 * bengsig 15-may-2023 - statisticsonly, incorrect RWL-293
1516 * bengsig 2-may-2023 - $hostname: directive
1617 * bengsig 17-apr-2023 - Engineering notation output
9192#include " rwl.h"
9293#include " rwlparser.tab.h"
9394
94- #define rwm (yyget_extra(yyscanner))
95-
9695#define YYSTYPE RWLYSTYPE
9796#define YY_DECL sb4 rwlylex (void *yylval_param, void *yyscanner)
98- #define YY_USER_ACTION { rwm->loc .inpos += yyleng; }
97+ #define YY_USER_ACTION { rwm = ( yyget_extra (yyscanner)); rwm ->loc .inpos += yyleng; }
9998
10099%}
101100
105104
106105%%
107106
107+ %{
108+ rwl_main *rwm = 0 ; // will be set using YY_USER_ACTION
109+ %}
110+
108111 /* **************************************************************** */
109112 /* NOTE THAT ANY CHANGES HERE MUST BE KEPT IN SYNC WITH rwlarglex.l */
110113 /* **************************************************************** */
15291532
15301533%%
15311534
1532- #undef rwm /* now outside flex code */
1533-
15341535/* this rouine must be here as it depends on #define
15351536 * and typedefs created by flex
15361537 */
Original file line number Diff line number Diff line change 1313 *
1414 * History
1515 *
16+ * bengsig 12-jun-2023 - Make rwm a variable in scanners
1617 * bengsig 04-jul-2022 - Scan sql and pl/sql in lexer
1718 */
1819
3334ub4 rwlscansql (void )
3435#endif
3536{
36- rwl_main * rwmhere = rwm ; // just for the debugger
37- rwmhere -> sqlbuffer [0 ] = 0 ;
37+ rwm -> sqlbuffer [0 ] = 0 ;
3838 ub8 l , len ;
3939 text * p ;
4040 sb4 curr , next ;
Original file line number Diff line number Diff line change 1313 *
1414 * History
1515 *
16+ * bengsig 12-jun-2023 - Make rwm a variable in scanners
1617 * bengsig 25-may-2023 - Also use in rwldilex.l
1718 * bengsig 04-jul-2022 - Creation
1819 */
2526ub4 rwlscanstring (void )
2627#endif
2728{
28- rwl_main * rwmhere = rwm ; // just a debugger aid
2929 text * in , * ut ;
30- rwmhere -> loc .inpos -= yyleng - 1 ; // make error below correct
30+ rwm -> loc .inpos -= yyleng - 1 ; // make error below correct
3131 /* copy string and remove " at ends */
3232 rwm -> sval = rwlstrdup (rwm , (text * )yytext + 1 );
3333 if ('"' == yytext [yyleng - 1 ])
You can’t perform that action at this time.
0 commit comments