上終止並解析錯誤我的詞法分析器應該在分類期間區分括號並保留一疊已打開的括號。爲此,我在我的FSL文件中指定一個輔助功能是這樣的: let updateBracketStack sign = // whenever a bracket is parsed, update the stack accordingly
match sign with
| '[' -> push sig
我的fsyacc代碼給出了一個編譯器錯誤,說沒有找到變量,但我不知道爲什麼。我希望有人能指出這個問題。 %{
open Ast
%}
// The start token becomes a parser function in the compiled code:
%start start
// These are the terminal tokens of the gramm