Re: Re: [Opencxx-users] refining the Synopsis APIs
Stefan Seefeld <[email protected]>
| Newsgroups | gmane.comp.documentation.synopsis |
|---|---|
| Message-ID | <[email protected]> |
Markus Elfring wrote: >>well, that looks like sloppy use of the language, which is quite unfortunate. >> >>Please try to conceive of an example of code that maps to a graph >>on the syntax level. Until I see that I'd rather insist on the >>conventional use of the above acronyms, may be putting a glossary into >>the docs to make sure people understand what we are referring to. > > > Can another paper show more use cases? > > An Object-Oriented Approach to C++ Compiler Technology > Cristian Sminchisescu, Alexandru Telea > http://citeseer.ist.psu.edu/55096.html The authors use the term 'abstract syntax graph' to denote a representation that is the result of doing 'semantic analysis' on a 'concrete syntax tree'. As they write: "The abstract syntax graphs consist of...nonterminal nodes representing syntaxtic constructs" but later add: "Additionally to the nodes mapping directly to the syntactic constructs, we also introduce nodes modeling semantic constructs...as well as nodes making the connection between the syntax and semantics." This is opposed to my suggestion to keep these two sides separate for reasons I outlined earlier. The 'semantic graph' that's currently supported in synopsis' python modules is language independent (as far as that's possible) and thus can't itself express syntax. Instead, it's somewhere in the middle between a representation purely based on syntax, and a modeling-oriented language akin to UML. Regards, Stefan