12 Star 0 Fork 12

src-openEuler/flex

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
0001-scanner-fix-default-of-yy_top_state.patch
0002-scanner-fix-default-of-yy_top_state.patch
0003-backport-Fix-pattern-documentation-for-case-insensit...
0004-backport-fix-typo.patch
build-AC_USE_SYSTEM_EXTENSIONS-in-configure.ac.patch
filter-Output-correct-line-value-for-current-file.patch
filter-memory-leak-free-scanner-postprocessing.patch
flex-2.6.4.tar.gz
flex.spec
flex.yaml
mkskel.sh-fix-EOL-issue-for-CRLF-systems.patch
scanner-Ignore-comment-lines-in-skeleton-files.patch
scanner-c-i-j-should-preserve-case.patch
scanner-memory-leak-free-scanner-generator.patch
scanner-prevent-overflow-in-add_action.patch
scanner-temporarily-protect-against-ccl-overflow-ove.patch
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
scanner-Ignore-comment-lines-in-skeleton-files.patch 999 Bytes
一键复制 编辑 原始数据 按行查看 历史
yixiangzhike 提交于 5年前 . update to 2.6.4
From 7af066b952fc81eb1a29079c7206e50ffed80c40 Mon Sep 17 00:00:00 2001
From: jannick0 <jannick0@users.noreply.github.com>
Date: Sun, 9 Jul 2017 22:36:14 +0200
Subject: [PATCH] scanner: Ignore comment lines in skeleton files.
In skeleton files comments are indicated by leading `%#` and when
directly read in using `flex -S <skeleton.skl>` they should be
ignored. Example: `flex.skl`.
Amending commit 2f21edac99b5efc432417233e6e53326d630e08f which removed
this conditional branch.
---
src/misc.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/misc.c b/src/misc.c
index 39483ea..9ead263 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -732,7 +732,10 @@ void skelout (void)
*/
#define cmd_match(s) (strncmp(buf,(s),strlen(s))==0)
- if (buf[1] == '%') {
+ if (buf[1] == '#') {
+ /* %# indicates comment line to be ignored */
+ }
+ else if (buf[1] == '%') {
/* %% is a break point for skelout() */
return;
}
--
1.8.3.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/flex.git
git@gitee.com:src-openeuler/flex.git
src-openeuler
flex
flex
master

搜索帮助