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

Resolve the inconsistant use of node and oper identifiers in the code.

To do that, we :

(1) totally remove  (in the  ocaml code) the  use of "oper",  and use
"node" instead.  Indeed, a node  is a memoryfull operator, as opposed
to function that are memoryless operators.  However, lus2lic does not
really care about memoryless  and memoryfull information. Therefore I
prefer  to use  node everywhere,  and to  flag node_info  to indicate
whether it has memories or not.

(2) change the syntaxTreeCore type to make it more general. Indeed,
    the distinction between functions and nodes was

    - redundant:  extern nodes  and (extern)  functions  were handled
    differently (NodeExtern versus ExtNode (was named FUNC before)).

    - and  incomplete:   it  was  not  possible   to  provide  static
      parameters to function, nor to define functions with body, etc.

Now a  function is  just a memoryless  node. The check  that function
indeed use no memory will be done later.

(3) also,  change  the  parser   so  that  functions  with  body  are
    accepted.

(4) in order  to do it step by  step, I add the  "extern" keyword" so
    that extern nodes and functions are more easy to parse. I will
    remove it later.
parent 4cb398b0
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