Open yanyh15 opened 5 years ago
@yanyh15 I think this is best to be done on top of ROSE's OpenMP AST, which has all the info. you need for semantics checking. Otherwise, you have to encode hierarchical info in your parser's AST first.
@chunhualiao I updated the issue, I think i meant syntax checking, though there are some semantics restriction in the spec for some directives.
For OpenMP syntax checking, this should be done in ompparser. I would like ompparser to have capability of checking the restrictions and rules applied by the language spec. After parsed successfully by ompparser, it is a legal OpenMP directive, thus requiring no checking from the integrating compiler. Semantics checking by the compiler will be much simpler as well.
OpenMP has lots of restrictions and rules in each directive and clause. A full syntax checking requires detailed work for each directive and clause. I am proposing that we apply the following strategies: