| 1 |
WSP [ \t] |
| 2 |
VALCHAR [^\|] |
| 3 |
|
| 4 |
%START Main NextLine NewEntry Value |
| 5 |
|
| 6 |
%{ |
| 7 |
#include "isdn_cdb_def.h" |
| 8 |
%} |
| 9 |
%% |
| 10 |
int item = 0; |
| 11 |
|
| 12 |
<Main>{ |
| 13 |
# BEGIN NextLine; |
| 14 |
^\| { |
| 15 |
if (new_entry()) |
| 16 |
exit(99); |
| 17 |
BEGIN NewEntry; |
| 18 |
} |
| 19 |
^{WSP}+ ; |
| 20 |
\n ; |
| 21 |
} |
| 22 |
|
| 23 |
<NextLine>{ |
| 24 |
.* ; |
| 25 |
\n BEGIN Main; |
| 26 |
} |
| 27 |
|
| 28 |
<NewEntry>{ |
| 29 |
vendor= {item=vendor; BEGIN Value;} |
| 30 |
device= {item=device; BEGIN Value;} |
| 31 |
vendor_id= {item=vendor_id; BEGIN Value;} |
| 32 |
device_id= {item=device_id; BEGIN Value;} |
| 33 |
subvendor_id= {item=subvendor_id; BEGIN Value;} |
| 34 |
subdevice_id= {item=subdevice_id; BEGIN Value;} |
| 35 |
device_class= {item=device_class; BEGIN Value;} |
| 36 |
bus_type= {item=bus_type; BEGIN Value;} |
| 37 |
vario= {item=vario; BEGIN Value;} |
| 38 |
SMP= {item=SMP; BEGIN Value;} |
| 39 |
drv_id= {item=drv_id; BEGIN Value;} |
| 40 |
drv_subtyp= {item=drv_subtyp; BEGIN Value;} |
| 41 |
drv_typ= {item=drv_typ; BEGIN Value;} |
| 42 |
[iI]nterface= {item=interface; BEGIN Value;} |
| 43 |
line_cnt= {item=line_cnt; BEGIN Value;} |
| 44 |
line_protocol= {item=line_protocol; BEGIN Value;} |
| 45 |
module= {item=module; BEGIN Value;} |
| 46 |
need_packages= {item=need_packages; BEGIN Value;} |
| 47 |
supported= {item=supported; BEGIN Value;} |
| 48 |
feature= {item=feature; BEGIN Value;} |
| 49 |
info= {item=info; BEGIN Value;} |
| 50 |
special= {item=special; BEGIN Value;} |
| 51 |
firmware= {item=firmware; BEGIN Value;} |
| 52 |
short_description= {item=short_description; BEGIN Value;} |
| 53 |
IRQ= {item=IRQ; BEGIN Value;} |
| 54 |
IO= {item=IO; BEGIN Value;} |
| 55 |
MEMBASE= {item=MEMBASE; BEGIN Value;} |
| 56 |
alternative_name= {item=alternative_name; BEGIN Value;} |
| 57 |
revision= {item=revision; BEGIN Value;} |
| 58 |
\n BEGIN Main; |
| 59 |
} |
| 60 |
|
| 61 |
<Value>{ |
| 62 |
\| BEGIN NewEntry; |
| 63 |
{VALCHAR}*/\| add_current_item(item, yytext); |
| 64 |
} |