mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
The `param` directive is very new and easily replaced with more compatible alternatives. git-svn-id: https://svn.macports.org/repository/macports/trunk/dports@133990 d073be05-634f-4543-b044-5fe20cf6d1d6
43 lines
1.0 KiB
Diff
43 lines
1.0 KiB
Diff
Replace YYPARSE_PARAM (which Bison 3 no longer supports) with
|
|
%parse-param and update function prototypes as necessary.
|
|
Index: nasl/nasl_grammar.y
|
|
===================================================================
|
|
--- nasl/nasl_grammar.y.orig
|
|
+++ nasl/nasl_grammar.y
|
|
@@ -1,4 +1,6 @@
|
|
-%pure_parser
|
|
+%define api.pure
|
|
+%lex-param {void * parm}
|
|
+%parse-param {void * parm}
|
|
%expect 1
|
|
%{
|
|
/* Nessus Attack Scripting Language version 2
|
|
@@ -19,9 +21,6 @@
|
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
*/
|
|
|
|
-#define YYPARSE_PARAM parm
|
|
-#define YYLEX_PARAM parm
|
|
-
|
|
#define LNB (((naslctxt*)parm)->line_nb)
|
|
#include "includes.h"
|
|
#include "nasl_tree.h"
|
|
@@ -32,7 +31,7 @@
|
|
#include "nasl_debug.h"
|
|
#include "nasl_signature.h"
|
|
|
|
-static void naslerror(const char *);
|
|
+static void naslerror(void *, const char *);
|
|
#define YYERROR_VERBOSE
|
|
%}
|
|
|
|
@@ -470,7 +469,7 @@ glob: GLOBAL arg_decl
|
|
#include <stdlib.h>
|
|
|
|
static void
|
|
-naslerror(const char *s)
|
|
+naslerror(void *parm, const char *s)
|
|
{
|
|
fputs(s, stderr);
|
|
}
|