Bug found

Upon review of the diagrams, a bug in the was found in the toolkit currently under development.

It appears that building tools that test the tools that test the product, is not without its own mishaps.

The following diagram shows that when instead of following the config_declaration branch as described in the previous post, the library_declaration and the include_statement branches are followed, we run into something curious.

The library_declaration eventually leads up to multiple L(file_path_spec) nodes. However, the include_statement statement node leads up to a file_path_spec node.

The correct behavior is the file_path_spec node, so what went wrong? Let’s dive into the BFF

library_declaration ::= "library" library_identifier "file_path_spec" { "," "file_path_spec" } [ "-incdir" "file_path_spec" { "," "file_path_spec" } ] ";"
include_statement ::= "include" file_path_spec ";"

This shows that for library_declaration the file_path_spec is defined to be a string, but in include_statement it is not, and is implied to be a rule name.

The fix is trivial, so that part is omitted.

Garbage in == Garbage out

Something went wrong in transposing the BNF from the standard’s pdf to a something parsable.

In the standard, the file_path_spec rule is defined, albeit not formally in Annex A.

Supposedly the root of the error can be found there, but is no longer known.

It does underline the basic problem, as outlined in the project’s description, that unmitigated errors propagate downstream.

The irony of contending with the same type of problem in a solution to said problem in another domain is not lost to the author.