8000 Possible (minor) issue with attribute types · Issue #366 · textX/textX · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Possible (minor) issue with attribute types #366

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
goto40 opened this issue Jan 30, 2022 · 2 comments
Open

Possible (minor) issue with attribute types #366

goto40 opened this issue Jan 30, 2022 · 2 comments

Comments

@goto40
Copy link
Member
goto40 commented Jan 30, 2022

Playing around with the meta model properties I added some tests: https://github.com/textX/textX/tree/feature/additional_metamodel_tests

I found a possible issue I would like to discuss:

In the docu we have "If there are multiple common rules than the first will be used as a result and the rest only for parsing".

Based on this sentence I tried:

        Model: 'value' x=Base;
        Base: S1|(S2 NotS3); // only use first rule (S2) as possible instance for each choice-option
        S1: name=ID;
        S2: name=ID;
        NotS3: name=ID;

In this meta model Base should not be a base of NotS3... I think this is a possible issue (probably not so difficult to fix).

@igordejanovic
Copy link
Member

I think you are right. It looks like a potential problem. The metamodel should be consistent with the parsing results. Since NotS3 instance is never instantiated during Base parsing (i.e. it will be thrown away after parsing) it shouldn't be its subclass.

@goto40
Copy link
Member Author
goto40 commented Jan 31, 2022

I will have a look...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0