Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ocamllex では、レクサー ルールとして使用_して、以前に定義したルールに一致しない任意の文字列に一致させ、エラーを発生させることができます。lex/flexでこれをどのように達成できますか?
_
通常、次のようなルールを定義します。これは最後に実行されます。
.|\n { /* process default here */ }
このルールは、他のルールと一致しなかったすべての文字と一致します。
お役に立てれば!