Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37888679
en ru br
ALT Linux repos
S:2.6.4.0.88.9801-alt2
5.0: 2.5.33-alt3
4.1: 2.5.33-alt3
4.0: 2.5.33-alt3
3.0: 2.5.4a-ipl16mdk

Group :: Development/Other
RPM: flex

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: flex-2.5.36-rh-tests-bison.patch
Download


https://sourceforge.net/tracker/?func=detail&aid=3546447&group_id=97492&atid=618177
--- flex/tests/test-bison-yylloc/main.c
+++ flex/tests/test-bison-yylloc/main.c
@@ -24,8 +24,6 @@
 #include "parser.h"
 #include "scanner.h"
 
-extern int testparse(yyscan_t);
-
 int main ( int argc, char** argv )
 {
     yyscan_t scanner;
--- flex/tests/test-bison-yylloc/parser.y
+++ flex/tests/test-bison-yylloc/parser.y
@@ -21,6 +21,8 @@
  * PURPOSE.
  */
 
+%parse-param { void* scanner }
+
 /* 
    How to compile:
    bison --defines --output-file="parser.c" --name-prefix="test" parser.y
@@ -32,10 +34,8 @@
 #include "config.h"
 
 #define YYERROR_VERBOSE 1
-#define YYPARSE_PARAM scanner
 #define YYLEX_PARAM   scanner
 
-int yyerror(char* msg);
 extern int testget_lineno(void*);
 
 
@@ -89,7 +89,7 @@ line:
 
 %%
 
-int yyerror(char* msg) {
+int yyerror(void* scanner, char* msg) {
     fprintf(stderr,"%s\n",msg);
     return 0;
 }
--- flex/tests/test-bison-yylval/main.c
+++ flex/tests/test-bison-yylval/main.c
@@ -24,8 +24,6 @@
 #include "parser.h"
 #include "scanner.h"
 
-extern int testparse(yyscan_t);
-
 int main ( int argc, char** argv )
 {
     yyscan_t scanner;
--- flex/tests/test-bison-yylval/parser.y
+++ flex/tests/test-bison-yylval/parser.y
@@ -25,6 +25,7 @@
    How to compile:
    bison --defines --output-file="parser.c" --name-prefix="test" parser.y
  */
+%parse-param { void* scanner }
 %{
 #include <stdio.h>
 #include <stdlib.h>
@@ -32,11 +33,8 @@
 #include "config.h"
 
 #define YYERROR_VERBOSE 1
-#define YYPARSE_PARAM scanner
 #define YYLEX_PARAM   scanner
 
-int yyerror(char* msg);
-
 
 /* A dummy function. A check against seg-faults in yylval->str. */
 int process_text(char* s) {
@@ -76,7 +74,7 @@ starttag:  LT      TAGNAME GT { process_text($2); free($2);} ;
 endtag:    LTSLASH TAGNAME GT { process_text($2);free($2);} ;
 %%
 
-int yyerror(char* msg) {
+int yyerror(void* scanner, char* msg) {
     fprintf(stderr,"%s\n",msg);
     return 0;
 }
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin