|
Lines 26-31
Link Here
|
| 26 |
bison --defines --output-file="parser.c" --name-prefix="test" parser.y |
26 |
bison --defines --output-file="parser.c" --name-prefix="test" parser.y |
| 27 |
*/ |
27 |
*/ |
| 28 |
%parse-param { void* scanner } |
28 |
%parse-param { void* scanner } |
|
|
29 |
%lex-param { void* scanner } |
| 29 |
%{ |
30 |
%{ |
| 30 |
#include <stdio.h> |
31 |
#include <stdio.h> |
| 31 |
#include <stdlib.h> |
32 |
#include <stdlib.h> |
|
Lines 33-39
Link Here
|
| 33 |
#include "config.h" |
34 |
#include "config.h" |
| 34 |
|
35 |
|
| 35 |
#define YYERROR_VERBOSE 1 |
36 |
#define YYERROR_VERBOSE 1 |
| 36 |
#define YYLEX_PARAM scanner |
|
|
| 37 |
|
37 |
|
| 38 |
|
38 |
|
| 39 |
/* A dummy function. A check against seg-faults in yylval->str. */ |
39 |
/* A dummy function. A check against seg-faults in yylval->str. */ |
|
Lines 49-55
int process_text(char* s) {
Link Here
|
| 49 |
|
49 |
|
| 50 |
%} |
50 |
%} |
| 51 |
|
51 |
|
| 52 |
%pure_parser |
52 |
%pure-parser |
| 53 |
|
53 |
|
| 54 |
%union { |
54 |
%union { |
| 55 |
long unused; |
55 |
long unused; |
| 56 |
- |
|
|