Skip to content
Snippets Groups Projects
Commit 7f628ceb authored by Erwan Jahier's avatar Erwan Jahier
Browse files

Simplify significantly the node representation. The rational for this

change is
	- make the parser simpler
	- make the compilation simpler
	- make everything simpler actually...
	- accepts more correct programs.
	- etc.

Indeed, before, we had specific syntax nodes for
	- extern nodes
	- aliased nodes
	- abstract nodes
	- normal nodes
which leads to duplicate code everywhere. Now, we have a more generic
representation.

The nice thing is that the parser is much simpler, and a lot of
duplicated code is avoided (for example, extern and abstract nodes do
now share the same code).

The bad thing is that we have more "assert false" lying everywere due
to this «too rich» representation, in order to deal with cases
that can never happen. For exemple, we have to do something with
nodes that have  both an alias and a body. This cannot happen of
course, so we issue an "assert false", which is a little bit painful,
as it have been rejected by the parser anyway.

Moreover, for some reason, external node params could not be clocked,
and cannot have static params. Maybe it is not possible to compile
such nodes (I don't know yet), but we should not raise a syntax error IMHO.

Somehow, what was done was very similar to ask the parser to perform type
checking.
parent 20557478
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment