无法在Windows上安装Flex(词法分析器),无法找到全面的说明 [英] Cannot install Flex (lexical analyser) on Windows, unable to find comprehensive instructions

查看:178
本文介绍了无法在Windows上安装Flex(词法分析器),无法找到全面的说明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

本学期,我正在大学上Flex / Bison课,但在尝试使Flex正常工作时遇到了严重的问题。 (可能是由于我自己的无能,但是我发现非常非常困难的解决方案)

I'm taking a class on Flex/Bison at University this semester, and I'm having serious issues trying to get Flex working. (Possibly due to my own inaptitude, but I'm finding a solution very, very difficult to research)

我正在尝试使用命令提示符导航到文件包含.l(Lex)文件,然后使用Flex生成.yy文件 flex -ooutputfile.yy.c inputfile.l

I am trying to use the Command Prompt to navigate to a file containing a .l (Lex) file and then use Flex to generate a .yy file flex -ooutputfile.yy.c inputfile.l

我检查以确保我拥有适当的.dll(如此处的安装说明所述 http://gnuwin32.sourceforge.net/install.html

I checked to make sure I had the appropriate .dlls (as mentioned in the installation instructions here http://gnuwin32.sourceforge.net/install.html)

我通过Dreamspark下载了Visual Studio 2008并进行了安装(从那时起,我使用了Visual Studio 2008命令提示符)

I downloaded Visual Studio 2008 via Dreamspark and installed it (from which point on I used Visual Studio 2008 Command Prompt)

我按照某人的建议安装了Cygwin

I installed Cygwin at someone's suggestion

我在船尾安装了Perl er注意到要求(如此处所述 http://gnuwin32.sourceforge.net/install.html )列表 perl等

I installed Perl after noticing the Requirements (as mentioned here http://gnuwin32.sourceforge.net/install.html) list 'perl, etc.'

每次尝试解决方案后,我仍会收到消息'flex'不被识别为内部或外部命令,可操作程序或批处理文件。

After each and every attempt at a solution I continue to receive the message 'flex' is not recognized as an internal or external command, operable program or batch file.

我已经花了几个小时的搜索,但是我很茫然。我一直找不到有关如何安装Flex或它的要求/依赖项的任何全面说明...非常感谢您的帮助!

I've spent several hours searching however I am at a loss. I've been unable to find any comprehensive instructions on how to install Flex or on it's requirements / dependencies... Any help would be much appreciated!


  • 我将C:environmentProgram Files\GnuWin32\bin添加到PATH环境变量System Variables中。我仍然遇到相同的错误。 (flex.exe所在的位置)

推荐答案

您收到的错误意味着 flex.exe 不在您的 PATH 环境变量中。您需要弄清楚安装程序在何处安装了 flex 并将其添加到 PATH 或手动将其安装在 PATH

The error you are getting means that flex.exe isn't in your PATH environment variable. You need to figure out where the installer installed flex and add that to your PATH or manually install it somewhere in your PATH

这篇关于无法在Windows上安装Flex(词法分析器),无法找到全面的说明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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