|
|
|
|
|
Re: Trigger validator(builder) for multiple files [message #1850486 is a reply to message #1850485] |
Fri, 04 March 2022 16:42 |
Marvin Dongus Messages: 8 Registered: February 2022 |
Junior Member |
|
|
Hi,
they are both building correct. The only problems occur in the context of the cross references. If both files are edited and saved the cross references working fine. If on is unedited the cross references can't be found.
Grammar:
My grammar have two main branches, a programm description or a class definition.
In the programm description class methodes can be called. A scopeProvider provide the method names for the dotExpression. The classes und the methods are defined in a seperated file.
The two brances of the Grammar:
Programm:
(programm = Programmdefinition) | (classDefinitions += ClassDefinition)
;
ClassDefinition:
'define' 'class' name=ID
'{'
classBody += ClassBody;
'}'
;
ClassBody:
DefineClassFunction | .... | ClassDefinition
;
DefineClassFunction
'define' 'Function' returnType = ( Datatype | 'void') name = ID '(' ... ')'
'{'
...
'}'
;
Programmdefinition:
'call' 'Function' ref = FunctionDotExpression '(' ... ')'
;
FunctionDotExpression returns Ref:
ClassRef ({FunctionDotExpression .ref=current} "." tail=[DefineClassFunction])*
;
ClassRef returns Ref:
{ClassRef } ClassRef =[ClassDefinition]
;
The site where i got my ScopeProvider. (I have done some slightly canges for my application): https://dietrich-it.de/xtext/2013/05/18/xtext-and-dot/path-expressions/
[Updated on: Fri, 04 March 2022 16:42] Report message to a moderator
|
|
|
|
|
|
|
|
|
Re: Trigger validator(builder) for multiple files [message #1850619 is a reply to message #1850615] |
Thu, 10 March 2022 12:48 |
|
i want this from you
a.dsl
b.dsl2
c.dsl2
when i now change entity person and rename it to person2, then x will get red and will be validated, this is cause it has relation to person
y will not get validated, cause there is relation to person
what is your a.dsl and b.dsl2 and c.dsl2 and why should your b.dsl2 be valiated and your c.dsl2 should not be validated
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
|
Powered by
FUDForum. Page generated in 0.06109 seconds