c - Lex 程序输入不会终止

标签 c flex-lexer

即使按ctrl D后,我也无法终止lex程序的输入,它只会继续! 可能出了什么问题?我正在使用适用于 Windows 的 flex 编译器。

最佳答案

在 Windows 上:
您需要 Ctrl+Z 然后 Enter 而不是 Ctrl+D,即在 Unix 和 Linux 中可用(在 Linux 上只需 Ctrl+D 即可)

Note: Both work on empty lines, so after entering any text, press Enter to go to next line (which will be empty), then these key combos will be effective.

关于c - Lex 程序输入不会终止,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49534477/

相关文章:

php - 编译一个 C 程序并运行它而不是 PHP 页面是否值得?

c - 从函数返回一个值

flex-lexer - 法典 : How to override YY_BUF_SIZE

parsing - 如何消除 flex & bison 的 'main' 例程,以便我可以将词法分析和解析过程放入库中?

c++ - (F)莱克斯 : get text not matched by rules/get default output

c - 我的多进程程序出了什么问题?

c - UNIX 和 Windows 上的非规范模式 getchar()

python - python-如何将C函数实现为可等待的(协程)

使用 flex 编译多个词法分析器会导致重新定义错误

c - Flex 和 Bison : Beginning a sentence with a specific keyword