Christoffer Lerno

Results 1217 comments of Christoffer Lerno

For ambiguous cases there are basically two ways out of it: 1. Infinite lookahead and disallow `a * b;`. This is fine because in practice the lookahead needed is very...

You're interested in (1)? Start parsing it as an expression or declaration, then switch to the other when it fails. For the ambiguous case of A[2], it will stay in...

I know it's not known, but you can disambiguate it during the semantic step. I already actually push some errors from parsing to semantic step in order to create better...

I think multiple passes is overkill as well. The need for `sizeof(a[0])` is mostly due to the inability to otherwise get the size of an element. This is especially important...

But again, speculatively parsing `sizeof(...)` as containing a type, then turning it into an expression if it fails seems like the easiest route following C. The `exprsizeof` solution is the...

$sizeof has parenthesis in C3, because it's a compile time function, there is also $alignof $offsetof etc

Although if it's missing using --linker=builtin will work

If you are in a special environment that lacks even a linker and a compiler, then you need to point to the crt files etc to link with. But odds...