Skip to content

Support both quotation styles on '#include' #31

@timjroberts

Description

@timjroberts

Currently the preprocessor only considers relative paths, and it also doesn't consider the quotation style. As such, an include in the form '#include "core.p4"' will be resolved relative to the file that contains it. This is correct behavior. Future work is required to support the angle bracket quotation style, and in turn, support for multiple paths while resolving. As outlined in the P4_16 specification, the quotation style simply determines the order in which the preprocessor will need to consider these file paths: '"..."' using the relative path ahead of any additional include path list, and '<...>' using the relative path last.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions