You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Concatenation of adjacent string literals apparently is not supported, but legal c and quite helpful in some circumstances.
example.c
struct In {int in;};
struct Out {int out;};
void compute(struct In *input, struct Out *output) {
printf("VAR: " "4");
}
compiler output
Compiling example.c
Exception in thread "main" java.lang.RuntimeException: Unexpected ""4""
at ccomp.parser.CParser$208.syntaxError(CParser.java:1757)
at beaver.Parser.parse(Parser.java:394)
at beaver.Parser.parse(Parser.java:352)
at ccomp.parser_hw.CCompiler.compileProgram(CCompiler.java:169)
at zcc.ZCC.compile(ZCC.java:230)
at zcc.ZCC.main(ZCC.java:127)
Makefile:113: recipe for target 'bin/example.params' failed
make: *** [bin/example.params] Error 1
The text was updated successfully, but these errors were encountered:
Thanks for reporting this. Unfortunately, strings and string literals are another thing that the Pepper compiler simply doesn't have much support for. Adding this isn't a priority for us right now, but we're always happy to accept pull requests! If you (or anyone else reading this) is interested, I'm happy to provide some code pointers on how to get started.
Concatenation of adjacent string literals apparently is not supported, but legal c and quite helpful in some circumstances.
example.c
compiler output
The text was updated successfully, but these errors were encountered: