Une MAJ de sécurité est nécessaire sur notre version actuelle. Elle sera effectuée lundi 02/08 entre 12h30 et 13h. L'interruption de service devrait durer quelques minutes (probablement moins de 5 minutes).

term.bnf 1.21 KB
Newer Older
MARCHE Claude's avatar
MARCHE Claude committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
\begin{syntax}
  bin-op ::= "+" | "-" | "*" | "/" | "%" ;
       | "==" | "!=" | "<=" | ">=" | ">" | "<" ;
       | "&&" | "||" |   ; boolean operations
       | "&" | "|" | "-->" ;
       | "<-->" | "^"; bitwise operations
       \
  unary-op ::= "+" | "-" ; unary plus and minus
       | "!" ; boolean negation
       | "~" ;  bitwise complementation
       | "*" ; pointer dereferencing
       | "&" ; address-of operator
       \
  term ::= "\true" | "\false" ;
       | integer ; integer constants
       | real ; real constants
       | id ; variables
       | unary-op term ;
       | term bin-op term ;
       | term "[" term "]" ; array access
       | "{" term "\with" "[" term "]" "=" term "}" ; array functional modifier
       | term "." id  ; structure field access
       | "{" term "\with" "."id "=" term "}" ; field functional modifier
       | term "->" id ;
       | "(" type-expr ")" term  ; cast
       | id "(" term ("," term)* ")" ; function application
       | "(" term ")" ; parentheses
       | term "?" term ":" term ; ternary condition
       | "\let" id "=" term ";" term ; local binding
       | "sizeof" "(" term ")" ;
       | "sizeof" "(" C-type-expr ")" ;
       | id ":" term ; syntactic naming
\end{syntax}