I am following this Circom tutorial to compile a simple circuit. Here is my code:
pragma circom 2.0.0;
template Multiplier2() {
signal input a;
signal input b;
signal output c;
c <== a*b;
}
component main = Multiplier2();
When I try to compile this using the following command:
circom multiplier2.circom --r1cs --wasm --sym --c
I get the following error:
Error Message:Error: Parse error on line 1:pragma circom 2.0.0;template Mult---------------^Expecting 'EOF', 'function', 'IDENTIFIER', '(', ')', 'template', ',', 'if', 'else', 'for', ';', 'while', 'do', 'compute', 'return', 'include', '{', '}', '==>', '-->', '===', '?', ':', '||', '&&', '|', '^', '&', '==', '!=', '<=', '>=', '<', '>', '<<', '>>', '+', '-', '*', '/', '', '%', '**', '++', '--', '!', '~', 'DECNUMBER', 'HEXNUMBER', 'var', 'signal', 'component', '[', ']', got '.'
I also found this article which mentions that Circom doesn’t like multiline comments. However, my code doesn’t have any comments.
I’ve double-checked the syntax and everything seems correct, but the error persists. Can anyone help me identify what I’m missing?
Chol Park is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1