我必須寫有這些規則lex程序: Identifiers: String of alphanumeric (and _), starting with an alphabetic character Literals: Integers and strings Comments: Start with ! character, go to until the end of the line 這是我與
上終止並解析錯誤我的詞法分析器應該在分類期間區分括號並保留一疊已打開的括號。爲此,我在我的FSL文件中指定一個輔助功能是這樣的: let updateBracketStack sign = // whenever a bracket is parsed, update the stack accordingly
match sign with
| '[' -> push sig