Skip to content
Snippets Groups Projects
  • Erwan Jahier's avatar
    de2a5f14
    Resolve the inconsistant use of node and oper identifiers in the code. · de2a5f14
    Erwan Jahier authored
    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.
    de2a5f14
    History
    Resolve the inconsistant use of node and oper identifiers in the code.
    Erwan Jahier authored
    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.