执行lex / yacc文件时,将使用以下命令。 -d和-v代表什么? [英] When executing a lex/yacc file, the folllowing commands are used. What does -d and -v stand for?

查看:164
本文介绍了执行lex / yacc文件时,将使用以下命令。 -d和-v代表什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

lex b2.l

yacc -d -v b2.y

gcc lex.yy.c y.tab.c



我尝试了什么:



有人可以告诉同一个人

lex b2.l
yacc -d -v b2.y
gcc lex.yy.c y.tab.c

What I have tried:

Can someone plzz tell about the same

推荐答案

既然您正在使用Bison,请查看 Bison 3.0.4:Bison Options [ ^ ]

Since you're using Bison, have a look at Bison 3.0.4: Bison Options[^]
Quote:

-d

这与--defines相同,除了-d不接受文件参数,因为POSIX Yacc要求-d可以与其他短选项捆绑在一起。

-d
This is the same as --defines except -d does not accept a file argument since POSIX Yacc requires that -d can be bundled with other short options.




Quote:

-v

--verbose

假设指定了%verbose,即写入额外的输出包含语法和解析器的详细描述的文件。参见Decl Summary。

-v
--verbose
Pretend that %verbose was specified, i.e., write an extra output file containing verbose descriptions of the grammar and parser. See Decl Summary.


这篇关于执行lex / yacc文件时,将使用以下命令。 -d和-v代表什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆