LEXING“ 1 -1”。 Lexer如何决定其1-1,而不是仅仅两个数字?
我是编写编译器的新手,我想知道解决此问题的适当解决方案。目前,如果有两个不同的令牌可能性,我选择了一个更长的令牌 - 它有效,但是我想知道是否有更优雅的解决方案。
I'm new to writing compilers, and I want to know the proper solution to this problem. Currently if there is the possibility of two different tokens I chose the one that is longer - it works, but I want to know if there is a more elegant solution.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论