Skip to content
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

Revise serde mapping of ruststep::ast #222

Closed
wants to merge 9 commits into from
Closed

Conversation

termoshtt
Copy link
Contributor

@termoshtt termoshtt commented May 12, 2022

Split from #220

@termoshtt termoshtt self-assigned this May 12, 2022
@termoshtt termoshtt changed the title Revise serde mapping of ruststep::ast::{Parameter, Record} Revise serde mapping of ruststep::ast May 16, 2022
@@ -86,7 +86,7 @@
//! - `HEADER` section has three components `FILE_DESCRIPTION`, `FILE_NAME`, and `FILE_SCHEMA`.
//! - See [header] module document for detail.
//! - Each data is in form `TYPE_NAME(parameter1, ...)`.
//! - This is called "Record".
//! - This is called "SimpleEntityInstance".
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be remained as "Record"

@termoshtt
Copy link
Contributor Author

ENTITY person;
  name: STRING;
END_ENTITY;

ENTITY employee SUBTYPE OF (person);
  pay: INTEGER;
END_ENTITY;

ENTITY student SUBTYPE OF (person);
  school_name: STRING;
END_ENTITY;

In this case following all instances are complex entity instance

/* internal mapping */
#1 = EMPLOYEE('Hitori Goto', 10);
#2 = STUDENT('Ikuno Kita', 'Shuka');

/* external mapping */
#3 = (PERSON('Hitori Goto') EMPLOYEE(10));
#4 = (PERSON('Ikuno Kita') STUDENT('Shuka));
#5 = (PERSON('Nizika Iziti') EMPLOYEE(15) STUDENT('Simokitazawa'))

Thus, we should not use the naming "simple entity instance" for A(1) and "complex entity instance" (A(1) B(2)) is not correct

@termoshtt termoshtt closed this May 16, 2022
@termoshtt termoshtt deleted the revise-serde-mapping branch May 16, 2022 05:23
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

Successfully merging this pull request may close these issues.

1 participant