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

How construct concrete data from syntax trees #15

Open
Iruyan-Zak opened this issue Jul 15, 2017 · 2 comments
Open

How construct concrete data from syntax trees #15

Iruyan-Zak opened this issue Jul 15, 2017 · 2 comments

Comments

@Iruyan-Zak
Copy link
Collaborator

Now, LexicalTree express a tree of String.
In semantic parsing phase, probably we need to construct data from String tree.

Type information can be added in this phase, but it requires second scan nevertheless first scan is done in lexical parsing phase.
Type information is owned by only Token s that can be become Leaf of Tree. (Literal and Identifier)
The former can get a type information in lexical parsing phase, but latter cannot.

Based on the above, I'm coming up with two way.

  1. Add type information to Literal in lexical parsing phase. To Identifier, adding it in semantic parsing phase.
  2. Type information is added to all Leaf element in only semantic parsing phase.

Or do you have ideas? I need your opinion.

@Roadagain
Copy link
Member

the 2nd way looks better.
i think adding type information should not be split.

@Iruyan-Zak
Copy link
Collaborator Author

OK, doing it.

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

No branches or pull requests

2 participants