home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_06_05
/
v6n5040a.txt
< prev
next >
Wrap
Text File
|
1989-09-28
|
1KB
|
27 lines
Parser Generator ``shootout''
Table 1: Comparative file sizes
╔═══════════════════════════════╤════════════════╤══════════════╗
║ Benchmark │ LALR │ YACC ║
╟───────────────────────────────┼────────────────┼──────────────╢
║ Grammar input file (.GRM/.Y) │ 2,090 bytes │ 2,471 bytes ║
║ Parser output file (.C) │ 38,989 bytes │ 11,204 bytes ║
║ Compiled parser (.OBJ) │ 10,149 bytes │ 3,465 bytes ║
║ POPL Syntax checker (.EXE) │ 17,242 bytes │ 13,542 bytes ║
╚═══════════════════════════════╧════════════════╧══════════════╝
Table 2: Comparative parser efficiency
╔═══════════════════════════════╤════════════════╤══════════════╗
║ Benchmark │ LALR │ YACC ║
╟───────────────────────────────┼────────────────┼──────────────╢
║ Generate the POPL parser │ 6.30 sec │ 19.10 sec ║
║ file from the grammar │ │ ║
╟───────────────────────────────┼────────────────┼──────────────╢
║ Syntax check 3860 lines │ 5.80 sec │ 18.00 sec ║
║ of POPL code (64K file) │40K lines/min. │13K lines/min.║
╚═══════════════════════════════╧════════════════╧══════════════╝