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.
有人可以帮助我使用 ml-lex 的 yyleng 功能。我如何使用它来显示分析器中最近匹配文本的长度
(这个问题在评论中得到了回答。转换为 Community Wiki Answer 以适应 SO Q&A 格式。)
@Jesper.Reenberg 指出:
您可能不想重新表述您的问题。目前尚不完全清楚您的确切问题是什么。据我所知,那么你只有yypos在yytextml-lex 中。然后你可以在哪里取长度yytext来获得匹配的长度。 有关示例,请参见此处或此处的用户指南。
您可能不想重新表述您的问题。目前尚不完全清楚您的确切问题是什么。据我所知,那么你只有yypos在yytextml-lex 中。然后你可以在哪里取长度yytext来获得匹配的长度。
yypos
yytext
有关示例,请参见此处或此处的用户指南。