Преглед изворни кода

Fix little problem on a rule

develop-theo
Sebeck10 пре 2 година
родитељ
комит
58ca592c31
4 измењених фајлова са 8 додато и 13 уклоњено
  1. +5
    -5
      ccmeta.leg
  2. +1
    -1
      tests-parsimony/002.c
  3. +1
    -6
      tests-parsimony/004.c
  4. +1
    -1
      tests-parsimony/007.c

+ 5
- 5
ccmeta.leg Прегледај датотеку

@ -1460,7 +1460,7 @@ sCharSequence = ( escapeSequence | !EOL [^\"\\] )* #"
primaryExpression = stringLiteral | constant | id
| META_AT ( META_LCB x:mstmts
| x:mvalue #{ $$ = eval(globals, x) }
| x:mvalue
)
| l:LPAREN x:expression r:RPAREN { $$= new_C_subexpr(l, x, r) }
| l:LPAREN x:compoundStatement r:RPAREN &{gnu} { $$= new_C_subexpr(l, x, r) }
@ -2177,10 +2177,10 @@ metaCatch = META_AT ( m:mvalue { map_
mvalue = { listBegin() } ( i:META_IDENT { listAppend(eval(globals, newGetVariable(i))) }
| META_LPAREN ( i:MO_OPERATION
i:meta_block
i:meta_exp
) META_RPAREN { listAppend(eval(globals, i)) }
| META_LPAREN ( i:MO_OPERATION
| i:meta_block
| i:meta_exp
) META_RPAREN { listAppend(eval(globals, i)) }
) { $$ = listEnd() }
mstmts = { listBegin() } ( s:meta_stmt { eval(globals, s) } )*

+ 1
- 1
tests-parsimony/002.c Прегледај датотеку

@ -5,7 +5,7 @@
@@.append(`declaration char *test = "foo";);
@@;
}
@(print("6 outputs : \n"))
@{print("6 outputs : \n");}
@{a = `constant 10;}
char t = @(`constant '@a');
int i = @cons;

+ 1
- 6
tests-parsimony/004.c Прегледај датотеку

@ -1,11 +1,8 @@
@{
num = `integer 21;
// print(num.text);
// print("\n");
test = `initializer 2 * 10;
}
int x = @{
@@.append(`initializer 2 * @num);
@@;
@ -14,13 +11,11 @@ int x = @{
int main() {
int i = @(`initializer 2 * @num);
int y = @test;
int a = @{
num = `integer 21;
test = 2;
@@.append(`initializer @num);
@@;
};
return 0;
}
}

+ 1
- 1
tests-parsimony/007.c Прегледај датотеку

@ -11,4 +11,4 @@
};
@a;
@(`declaration int d = 12;);

Loading…
Откажи
Сачувај