GNU flex库libfl提供了什么? [英] What does GNU flex library libfl provide?

查看:231
本文介绍了GNU flex库libfl提供了什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以通过flex和bison生成的文件来编译程序,

I could compile a program from flex and bison generated files by

cc lex.yy.c program.tab.c -o output

还有

cc lex.yy.c program.tab.c -lfl -o output

它们都运行平稳,没有任何问题.

They both run smoothly and without any problem.

那么libfl在这里提供了什么?我试图搜索文档,但找不到详细的解释.

So what did libfl provide here? I tried to search the documentation but couldn't find a detailed explanation.

谢谢.

推荐答案

$ nm /usr/lib/x86_64-linux-gnu/libfl.a
libmain.o:
0000000000000000 T main
                 U yylex
libyywrap.o:
0000000000000000 T yywrap

如您所见,它提供了功能mainyywrap,因此您无需定义它们.

As you can see it provides functions main and yywrap, so you needn't define them.

这篇关于GNU flex库libfl提供了什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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