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.
谁能指导我如何在 FLEX 词法分析器中处理/转义 Python 注释,以便不会为注释生成标记。谢谢。
我认为您只需要一个如下所示的规则:
"#".* ;
这将使您的词法分析器跳过注释并且不为其生成任何标记。