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.
Showing
- src/TODO 16 additions, 0 deletionssrc/TODO
- src/compiledData.ml 4 additions, 3 deletionssrc/compiledData.ml
- src/evalNode.ml 4 additions, 4 deletionssrc/evalNode.ml
- src/expandPack.ml 15 additions, 16 deletionssrc/expandPack.ml
- src/lazyCompiler.ml 99 additions, 68 deletionssrc/lazyCompiler.ml
- src/parser.mly 248 additions, 285 deletionssrc/parser.mly
- src/parserUtils.ml 32 additions, 1 deletionsrc/parserUtils.ml
- src/syntaxTree.ml 1 addition, 31 deletionssrc/syntaxTree.ml
- src/syntaxTreeCore.ml 30 additions, 44 deletionssrc/syntaxTreeCore.ml
- src/syntaxTreeDump.ml 82 additions, 88 deletionssrc/syntaxTreeDump.ml
- src/test/Makefile 2 additions, 2 deletionssrc/test/Makefile
- src/test/test.res.exp 730 additions, 49 deletionssrc/test/test.res.exp
Loading
Please register or sign in to comment