ahpalmerUNR / c_compiler

c compiler for UNR Compilers CS 660
1 stars 0 forks source link

additive_expression #60

Open ahpalmerUNR opened 5 years ago

zacharyy commented 5 years ago

For int a = 5+4 you can pass up nodes til you get to here which is where it seg faults. It for some reason doesn't like having two integer constants as its children.

natasha-audrey commented 5 years ago

Are you getting an error syntax error, unexpected INTEGER_CONSTANT_tok, expecting SEMI_tok or COMMA_tok? That's what I've been getting when running it on just int a = 5+4; and then it segfaults.

zacharyy commented 5 years ago

If you have it without spaces between the plus and the numbers it causes a problem i think if that's how you have it