在 Linux Mint 中运行 lex 程序
我正在尝试在 linux mint 中运行 lex 程序。我将该文件保存为 abc.l,现在我尝试通过键入以下命令在终端中编译该文件:
vi abc.l
lex abc.l
gcc lex.yy .c -lfl
但在最后一个命令之后它说没有这样的文件或目录。
请帮助我运行该程序。
I am trying to run a lex program in linux mint.I saved that file as abc.l,now i am trying to compile this file in the terminal by typing the following commands:
vi abc.l
lex abc.l
gcc lex.yy.c -lfl
but after the last command it is saying that no such file or directory.
please help me out in running the program.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先,通过执行“man lex”检查您的系统上是否安装了 Lex。
如果没有安装,则需要安装Lex & Yacc 工具通过在命令提示符中键入这些
来编译尝试此命令,
然后运行实际的程序,键入
First of all check if you have installed Lex on your system by doing a "man lex" .
If not installed,you need to install Lex & Yacc tools by typing these in the command prompt
For compiling try this command,
Then to run the actual program,type