This is an archive of the discontinued LLVM Phabricator instance.

[Discussion] Interface for nodes related to id-expression
AbandonedPublic

Authored by eduucaldas on Jun 22 2020, 7:41 AM.

Details

Summary

SyntaxTree aims at being a closer representation of the C++ syntax. As such we are basing its design on the C++ grammar.
The subset of the grammar that we look here is described under [expr.prim.id].
The main questions we ask are:
How to make a clear distinction in the SyntaxTree between optional and required children?
An example of optional children in the context of id-expressions:

qualified-id:
	nested-name-specifier template_opt unqualified-id

How to encode the OR-relations of the grammar in the SyntaxTree?
In the context of id-expression:

id-expression:
        unqualified-id
        qualified-id

Or even

unqualified-id:
	identifier
	operator-function-id
	conversion-function-id
 	literal-operator-id
 	~ type-name
 	~ decltype-specifier
 	template-id

Diff Detail

Event Timeline

eduucaldas created this revision.Jun 22 2020, 7:41 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 22 2020, 7:41 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript

update comments, rollback references, and add them as proposition

remove union. or relation implemented as a parent-child relation

eduucaldas edited the summary of this revision. (Show Details)Jun 24 2020, 11:13 AM
eduucaldas edited the summary of this revision. (Show Details)Jun 24 2020, 11:17 AM
eduucaldas abandoned this revision.Jul 3 2020, 5:09 AM