组合两个 lex/yacc 解决方案
为了获得用于解析和分析嵌入式sql代码的完整解决方案,我想知道是否可以组合两个< lex|yacc 解决方案,一个用于 Ansi C,另一个用于 SQL,在同一程序中。我认为这两种语法之间会有一种编排。
抱歉,如果我的想法有点模棱两可;至于建议,我将更多地解释我的观点。
首先,我的问题是:解析解决方案(lex|yacc 或 flex|bison)是否可以包含多个 lex 文件并且yacc 文件也有同样的问题吗?
In order to get a complete solution for parsing and analysing an embedded sql code I'd like to know if it is possible to combine two lex|yacc solutions, one for Ansi C and the other for SQL, in the same program. I assume there will be a kind of orchestration between the two grammars.
Sorry if my idea is a little bit ambiguous; as far as proposals come I'll explain more my point of view.
So first of all, my question is: can a parsing solution(lex|yacc or flex|bison) contain more than one lex file and also the same question for a yacc file?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 -P 选项向生成的代码和文件名添加前缀。
有关更多信息,请在 google 上搜索“lex yacc prefix”。
You can use the -P option to add a prefix to the generated code and to the file names.
For more information, google for "lex yacc prefix".