Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • theo.putegnat/infosec-ecomp
  • damien.armillon/infosec-ecomp
  • mouhamed.sougou/infosec-ecomp
  • cidre-public/compilation/infosec-ecomp
4 results
Show changes
Showing
with 181 additions and 0 deletions
{"output": "", "error": null, "retval": 19}
\ No newline at end of file
SYM_INT
SYM_IDENTIFIER(main)
SYM_LPARENTHESIS
SYM_RPARENTHESIS
SYM_LBRACE
SYM_INT
SYM_IDENTIFIER(a)
SYM_ASSIGN
SYM_INTEGER(3)
SYM_SEMICOLON
SYM_RETURN
SYM_LPARENTHESIS
SYM_IDENTIFIER(a)
SYM_ASTERISK
SYM_INTEGER(5)
SYM_RPARENTHESIS
SYM_PLUS
SYM_INTEGER(4)
SYM_ASTERISK
SYM_LPARENTHESIS
SYM_INTEGER(3)
SYM_MINUS
SYM_INTEGER(2)
SYM_RPARENTHESIS
SYM_SEMICOLON
SYM_RBRACE
SYM_EOF
int main(){
int a_simple_variable = 8;
return a_simple_variable + 5 * 3;
}
{"output": "", "error": null, "retval": 23}
\ No newline at end of file
{"output": "", "error": null, "retval": 23}
\ No newline at end of file
SYM_INT
SYM_IDENTIFIER(main)
SYM_LPARENTHESIS
SYM_RPARENTHESIS
SYM_LBRACE
SYM_INT
SYM_IDENTIFIER(a_simple_variable)
SYM_ASSIGN
SYM_INTEGER(8)
SYM_SEMICOLON
SYM_RETURN
SYM_IDENTIFIER(a_simple_variable)
SYM_PLUS
SYM_INTEGER(5)
SYM_ASTERISK
SYM_INTEGER(3)
SYM_SEMICOLON
SYM_RBRACE
SYM_EOF
int main(int n, int m){
int a = 10;
int b = 20;
int x;
if (3 > n){
x = a;
} else {
x = b;
}
return x;
}
int f(int x){
int n = 3;
return 3 * x;
}
{"output": "", "error": null, "retval": 20}
\ No newline at end of file
{"output": "", "error": null, "retval": 10}
\ No newline at end of file
SYM_INT
SYM_IDENTIFIER(main)
SYM_LPARENTHESIS
SYM_INT
SYM_IDENTIFIER(n)
SYM_COMMA
SYM_INT
SYM_IDENTIFIER(m)
SYM_RPARENTHESIS
SYM_LBRACE
SYM_INT
SYM_IDENTIFIER(a)
SYM_ASSIGN
SYM_INTEGER(10)
SYM_SEMICOLON
SYM_INT
SYM_IDENTIFIER(b)
SYM_ASSIGN
SYM_INTEGER(20)
SYM_SEMICOLON
SYM_INT
SYM_IDENTIFIER(x)
SYM_SEMICOLON
SYM_IF
SYM_LPARENTHESIS
SYM_INTEGER(3)
SYM_GT
SYM_IDENTIFIER(n)
SYM_RPARENTHESIS
SYM_LBRACE
SYM_IDENTIFIER(x)
SYM_ASSIGN
SYM_IDENTIFIER(a)
SYM_SEMICOLON
SYM_RBRACE
SYM_ELSE
SYM_LBRACE
SYM_IDENTIFIER(x)
SYM_ASSIGN
SYM_IDENTIFIER(b)
SYM_SEMICOLON
SYM_RBRACE
SYM_RETURN
SYM_IDENTIFIER(x)
SYM_SEMICOLON
SYM_RBRACE
SYM_INT
SYM_IDENTIFIER(f)
SYM_LPARENTHESIS
SYM_INT
SYM_IDENTIFIER(x)
SYM_RPARENTHESIS
SYM_LBRACE
SYM_INT
SYM_IDENTIFIER(n)
SYM_ASSIGN
SYM_INTEGER(3)
SYM_SEMICOLON
SYM_RETURN
SYM_INTEGER(3)
SYM_ASTERISK
SYM_IDENTIFIER(x)
SYM_SEMICOLON
SYM_RBRACE
SYM_EOF
/** /**/
/** Commentaire ! */
int main(){
return 23;
}
{"output": "", "error": null, "retval": 23}
\ No newline at end of file
{"output": "", "error": null, "retval": 23}
\ No newline at end of file
SYM_INT
SYM_IDENTIFIER(main)
SYM_LPARENTHESIS
SYM_RPARENTHESIS
SYM_LBRACE
SYM_RETURN
SYM_INTEGER(23)
SYM_SEMICOLON
SYM_RBRACE
SYM_EOF
// Hello, this is a comment
int main(int a){
/* a multi-line
comment*/
return a / 2;
}
{"output": "", "error": null, "retval": 7}
\ No newline at end of file
{"output": "", "error": null, "retval": 0}
\ No newline at end of file
SYM_INT
SYM_IDENTIFIER(main)
SYM_LPARENTHESIS
SYM_INT
SYM_IDENTIFIER(a)
SYM_RPARENTHESIS
SYM_LBRACE
SYM_RETURN
SYM_IDENTIFIER(a)
SYM_DIV
SYM_INTEGER(2)
SYM_SEMICOLON
SYM_RBRACE
SYM_EOF
int main(int n){
while(n > 0){
n = n - 1;
}
return n;
}
{"output": "", "error": null, "retval": 0}
\ No newline at end of file