|
|
|
|
|
by nickdrozd
2928 days ago
|
|
Yeah, the code is all in the book, and it works! Here's the main body of the qawk interpreter: BEGIN { readrel("relfile") }
/./ { doquery($0) }
where- relfile is a file containing the field attributes used in various database files, - readrel is a function that parses the relfile and stores the fields in a dictionary, and - doquery is a function that takes a qawk query, converts it to an awk query by replacing the field names with their corresponding field numbers, and then executes the awk command. The whole thing runs about 60 lines. |
|