Reputation: 3580
I am using following excerpt in the grammar for my DSL:
SelectDml:
'select' columnList+=FieldColumn (',' columns+=FieldColumn)* from=FromClause;
FromClause:
'from' value=ID (alias=ID)?;
FieldColumn hidden():
fieldName=ID ('.' ID)?;
If I parse following line of my DSL, then there is one FieldColumn in the column-List which is absolutely fine. But the FieldColumn has the fieldName a
and not the expected value: a.col
.
select a.col from a
Is there a problem with my grammar? Something missing?
Upvotes: 0
Views: 29
Reputation: 5256
Per this rule
FieldColumn hidden():
fieldName=ID ('.' ID)?;
the first ID
value is assigned to fieldName
. Any further ID
values are just skipped.
Upvotes: 1