我正在嘗試使用re2c與迭代器對定義的輸入,而不是空終止的字符串。 從手冊: YYCURSOR
[...]
On entry, YYCURSOR is assumed to point to the first character of the current token.
On exit, YYCURSOR will point to the first character of the
手冊明確表示: YYSETSTATE (s)
[...]
The parameter to YYSETSTATE is a signed integer that uniquely identifies
the specific instance of YYFILL (n) that is about to be called.
[...]
的問題是,我從野牛解析器叫我YYSETST
我試了幾次。在Google上,re2c + lemon只有幾個教程。 目前所有的例子出現了類似像一堆的錯誤: In file included from main.cpp:2:0:
parser.y:44:5: error: ‘yygotominor’ was not declared in this scope
A.int_value = B.int_value * C.int_va