You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The suggestion here is to add support for a custom set of delimiters, such as "#include [file]", or "#include (file)". The advantage is that the choice of delimiter can be used to tell the pre-processor which directory/ies to search first -- or search only.
By default, one sets up a list of possible delimiters, say " '()', '[]', '{}', '^^', '%%' ". These delimiters would only be enabled if the new option '+Ksym' ( where 'sym' is one of '([{^%' ) appears on the command line. This becomes significant when one relates to where the new option appears with regard to the '-I' option(s). If the '+Ksym' option appears just before a particular '-I' directory, searches for any file using that delimiter should start with ^that^ directory and proceed from there. However, if the user adds a '-Ksym' option referencing the ^same^ symbol after at least one more '-I' option has been specified, then search for files surrounded with "sym" should be confined to only that directory/ies.
For example, the command-line "... -I 'path1' +K '[' -I 'path2' -I 'path3' ..." would instruct the pre-processor to start searching for any file named as "#include [file]" at directory 'path2', then proceed down the list to the system directory/ies, then (optionally) cause a "wrap-around" to search the previous directories as well.
However, the command-line "... -I 'path1' +K '[' -I 'path2' -I 'path3' -K '[' -I 'path4' ..." would tell the pre-processor to search ^only^ the directories 'path2' and 'path3' for any file named as "#include [file]".
If the option '+Ksym' does not appear for a given 'sym', then any reference to a #include with the delimiter 'sym' should cause a warning message and the delimiters to be Ignored. Thus, with the command-lines above, a reference to "#include {file}" should cause a warning diagnostic. The files affected can then be searched for using the default "" delimiter rules. It is likely that only one pair of '+Ksym' ... '-Ksym' arguments should be allowed for any given 'sym', but that can be relaxed if it is desired. The presence of '-Ksym' without a preceding '+Ksym' should then be viewed as a Fatal Error, as would the appearance of '-Ksym' without at least one -I directory just before it (i.e. without at least one such -I argument between '+Ksym' and the following '-Ksym').
The text was updated successfully, but these errors were encountered:
In the existing system, it is legal to specify "#include file", with no delimiters at all. One can add the command-line option '-Kr' to forbid that; if that appeared on the command-line, a declaration in that form would cause a diagnostic (and the file would be Ignored, and not Included).
If this is done, then "wrapping around" the list of files probably should be the default. But one could add '-Kw' to prevent such wrap-around, or '+Kw' to enable it again. If '-Kw' appears before a '+Ksym', then inhibit wrap-around for that "sym", and vice-versa.
The suggestion here is to add support for a custom set of delimiters, such as "#include [file]", or "#include (file)". The advantage is that the choice of delimiter can be used to tell the pre-processor which directory/ies to search first -- or search only.
By default, one sets up a list of possible delimiters, say " '()', '[]', '{}', '^^', '%%' ". These delimiters would only be enabled if the new option '+Ksym' ( where 'sym' is one of '([{^%' ) appears on the command line. This becomes significant when one relates to where the new option appears with regard to the '-I' option(s). If the '+Ksym' option appears just before a particular '-I' directory, searches for any file using that delimiter should start with ^that^ directory and proceed from there. However, if the user adds a '-Ksym' option referencing the ^same^ symbol after at least one more '-I' option has been specified, then search for files surrounded with "sym" should be confined to only that directory/ies.
For example, the command-line "... -I 'path1' +K '[' -I 'path2' -I 'path3' ..." would instruct the pre-processor to start searching for any file named as "#include [file]" at directory 'path2', then proceed down the list to the system directory/ies, then (optionally) cause a "wrap-around" to search the previous directories as well.
However, the command-line "... -I 'path1' +K '[' -I 'path2' -I 'path3' -K '[' -I 'path4' ..." would tell the pre-processor to search ^only^ the directories 'path2' and 'path3' for any file named as "#include [file]".
If the option '+Ksym' does not appear for a given 'sym', then any reference to a #include with the delimiter 'sym' should cause a warning message and the delimiters to be Ignored. Thus, with the command-lines above, a reference to "#include {file}" should cause a warning diagnostic. The files affected can then be searched for using the default "" delimiter rules. It is likely that only one pair of '+Ksym' ... '-Ksym' arguments should be allowed for any given 'sym', but that can be relaxed if it is desired. The presence of '-Ksym' without a preceding '+Ksym' should then be viewed as a Fatal Error, as would the appearance of '-Ksym' without at least one -I directory just before it (i.e. without at least one such -I argument between '+Ksym' and the following '-Ksym').
The text was updated successfully, but these errors were encountered: