4 |
| | | | | | | | | | |
| | | | | | | | | | |
5 |
| ~~ | ~~| | ~ | | | ~~| for all hackers. |
| ~~ | ~~| | ~ | | | ~~| for all hackers. |
6 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
7 |
Copyright (c) 2003 Tama Communications Corporation |
Copyright (c) 2003, 2004 Tama Communications Corporation |
8 |
|
|
9 |
This file is free software; as a special exception the author gives |
This file is free software; as a special exception the author gives |
10 |
unlimited permission to copy and/or distribute it, with or without |
unlimited permission to copy and/or distribute it, with or without |
16 |
|
|
17 |
---------------------------------- |
---------------------------------- |
18 |
|
|
19 |
1. Outline of generating parsers. |
1. Required programs. |
20 |
|
|
21 |
You need to have the following package installed: |
To build the parser, you need to have the following package installed: |
22 |
|
|
23 |
- flex 2.5.4a |
- GNU gperf 3.0.1 to lookup reserved words. |
24 |
- GNU gperf 3.0.1 |
- flex 2.5.4a to generate php and assembly parser. |
25 |
- GNU bison 1.875 |
- GNU bison 1.875 to generate assembly parser. |
26 |
|
|
27 |
|
2. Reserved word processing using GNU gperf. |
28 |
|
|
29 |
|
This mechanism is independent of lex and bison. |
30 |
|
|
31 |
|
2.1 Outline |
32 |
|
|
33 |
(1) Generate gperf(1) source from each reserved word file. |
(1) Generate gperf(1) source from each reserved word file. |
34 |
|
|
62 |
+------------------------------------- |
+------------------------------------- |
63 |
|
|
64 |
|
|
65 |
2. The format of reserved word file. |
2.2 Reserved word file format. |
66 |
|
|
67 |
o One word and 'word' which means 'reserved word' a line. |
o One word and 'word' which means 'reserved word' a line. |
68 |
o Null line and the line start with ';' is skipped. |
o Null line and the line start with ';' is skipped. |