ourPLCC / plcc

A Programming Languages Compiler Compiler
GNU General Public License v3.0
8 stars 4 forks source link

Enable JSON ASTs when 4th grammar section detected #95

Closed StoneyJackson closed 7 months ago

StoneyJackson commented 10 months ago

Parent issue: https://github.com/ourPLCC/plcc/issues/52

Add an optional 4th section to grammar files. The 4th section will be populated by Python semantics. When a grammar files is written with four section, its structure is as follows:

lexical specification % syntactic specification % syntactic checks/helpers written in Java % semantics written in Python Existing 3-section grammars should function normally.

When a 4th section is detected (even when empty), it will generate the Java code needed to generate JSON ASTs. Note that the 3rd section could also be empty, and it would behave the same.

github-actions[bot] commented 7 months ago

:tada: This issue has been resolved in version 6.2.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: