Right now the grammar contains several grammar rules related to compiler directives and source formatting. Ideally these would already be handled in the tokenizer stages, not the parser.
Reasons for doing so:
These directives can appear pretty much anywhere, and handling all that in the grammar could/would add a lot of complexity.
Extending the functionality of the preprocessor is easier if we can intepret these directives already in the tokenizer stages.
Ideally, describing the syntax of these directives should be as easy as describing the syntax of Cobol; if it can use the same mechanism that would be even better.
Log in to post a comment.