Last change
on this file since 546 was
464,
checked in by julian.reschke@…, 12 years ago
|
add explanation how the ABNF parsing/collection step works
|
File size:
1.2 KB
|
Rev | Line | |
---|
[464] | 1 | ABNF
|
---|
| 2 | ====
|
---|
| 3 |
|
---|
| 4 | The build process now uses BAP, Bill Fenner's ABNF parser.
|
---|
| 5 |
|
---|
| 6 | To build BAP:
|
---|
| 7 |
|
---|
| 8 | cd ~/abnfparser/bap
|
---|
| 9 | ./configure
|
---|
| 10 | make
|
---|
| 11 |
|
---|
| 12 | If linking fails, try to change
|
---|
| 13 |
|
---|
| 14 | bap: ${OBJS}
|
---|
| 15 | ${CC} -o $@ ${DEBUG} ${OBJS} -ll
|
---|
| 16 |
|
---|
| 17 | to
|
---|
| 18 |
|
---|
| 19 | bap: ${OBJS}
|
---|
| 20 | ${CC} -o $@ ${DEBUG} ${OBJS} -lfl
|
---|
| 21 |
|
---|
| 22 |
|
---|
| 23 | The actual build process does the following steps:
|
---|
| 24 |
|
---|
| 25 | 1) Extract ABNF
|
---|
| 26 |
|
---|
| 27 | Extracts the individual ABNF fragments (labeled with type="abnf2616") into
|
---|
| 28 | *.abnf (using XSLT).
|
---|
| 29 |
|
---|
| 30 | 2) Parse ABNF and do 1st formatting step
|
---|
| 31 |
|
---|
| 32 | Parse the ABNF using BAP, sort it, and re-parse the result using BAP,
|
---|
| 33 | serializing the result with folded lines for RFC production to *.parsed-abnf.
|
---|
| 34 |
|
---|
| 35 | 3) Generate Collected ABNF appendix, and check whether the src is up2date
|
---|
| 36 |
|
---|
| 37 | Reads both *.xml and *parsed-abnf using XSLT, generating *.abnf-appendix,
|
---|
| 38 | ready for inclusion into the source. While doing so, checks that the current
|
---|
| 39 | source has an up to date appendix already.
|
---|
| 40 |
|
---|
| 41 | This step will produce a WARNING message when the newly generated appendix
|
---|
| 42 | needs to be refreshed in the source.
|
---|
| 43 |
|
---|
| 44 | Q: Why not do it automatically?
|
---|
| 45 |
|
---|
| 46 | A: Mainly, it would make bootstrapping harder, given the current toolchain.
|
---|
| 47 |
|
---|
Note: See
TracBrowser
for help on using the repository browser.