| 1 |
root |
1.1 |
%{ |
| 2 |
|
|
#include <stdio.h> |
| 3 |
|
|
#include <stdlib.h> |
| 4 |
|
|
|
| 5 |
|
|
#define YYDEBUG 1 |
| 6 |
|
|
|
| 7 |
|
|
extern int yylex(void); |
| 8 |
|
|
static void yyerror (char const *msg) |
| 9 |
|
|
{ |
| 10 |
|
|
extern int yylineno; |
| 11 |
|
|
|
| 12 |
|
|
printf ("%s (line %d)", msg, yylineno); |
| 13 |
|
|
abort (); |
| 14 |
|
|
} |
| 15 |
|
|
|
| 16 |
|
|
%} |
| 17 |
|
|
|
| 18 |
|
|
%token MAC_POOL X_MAC_POOL MAC |
| 19 |
|
|
%token SHARED_NETWORK MANUAL_DHCP DYNAMIC_DHCP MANUAL_BOOTP |
| 20 |
|
|
%token SUBNET IP NETMASK IDENTIFIER RANGE STRING NUMBER |
| 21 |
|
|
|
| 22 |
|
|
%union { |
| 23 |
|
|
char *ident; |
| 24 |
|
|
char *string; |
| 25 |
|
|
long num; |
| 26 |
|
|
} |
| 27 |
|
|
|
| 28 |
|
|
%% |
| 29 |
|
|
|
| 30 |
|
|
config: |
| 31 |
|
|
section config |
| 32 |
|
|
| /* empty */ |
| 33 |
|
|
; |
| 34 |
|
|
|
| 35 |
|
|
section: MAC_POOL { ; } |
| 36 |
|
|
| X_MAC_POOL { ; } |
| 37 |
|
|
|