Concrete syntax tree is intended for questions related to syntax analysis necessary for automated source code refactoring or syntax analysis tool development.
A concrete syntax tree is a hierarchical representation of the syntax of a language which is generated by parsing tokens based on a grammar definition.
I'm aware that its fairly trivial to pretty print code with a CST, since information about the grammar is stored in the node.
However, when converted to a AST, much of the initial structure of the source code is lost from de sugaring and other…
Evrything is in the title : I have an OCL AST (with as root an org.eclipse.ocl.ecore.Constraint) which I have modified.
I would like to parse it again, but I only find the "one-line OCL grammar" that you get when printing a constraint (or any OCL…
I have this concrete syntax:
syntax SomeMore = [...] SyncBlock? sync;
syntax SyncBlock = "sync" "{" SyncStatement* stats "}";
syntax SyncStatement = [...];
[SyncBlock]"sync { }" seems to work, but when I try to use it as a SyncBlock?…
Asked another way, if I showed you this masked code file, using only your human brain, is it possible to fix the indentation issues, even if you know it should be 2-space indentation?
…