appleseedlab / superc

The SuperC Parsing Framework
25 stars 4 forks source link

Adding P4 support to ForkMergeParser + output an additional information #147

Closed kaarthikalagappan closed 3 years ago

kaarthikalagappan commented 3 years ago

Adding P4 support to ForkMergeParser in a language independent way. Added an overloaded conditionGranularity function that will be used by SuperP4.java to set conditionGranularity flag and two new flags: one to track all productions under the conditional granularity option (rather than check if the production is part of the trackedProductions variable), and to emit the conditional after-set. The latter is to emit the conditional after-set of productions (when conditionGranularity is enabled) during the reduction stage when then conditional inside-set of productions is empty but not the after-set (since there were some cases where the conditional inside-set did not contain the production that had a conditional inside it but the after-set did).