flex/0002-scanner-fix-default-of-yy_top_state.patch

27 lines
769 B
Diff
Raw Normal View History

2020-08-03 20:05:17 +08:00
From 3971b6146aab12e1c54945dcb47ae92a25a3f3c3 Mon Sep 17 00:00:00 2001
From: jannick0 <jannick0@users.noreply.github.com>
Date: Mon, 8 Jan 2018 10:04:23 +0100
Subject: [PATCH] scanner: fix default of yy_top_state()
extend fix when `YY_G` is used (reentrant scanner).
---
src/flex.skl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/flex.skl b/src/flex.skl
index 05729df..d9cdcc0 100644
--- a/src/flex.skl
+++ b/src/flex.skl
@@ -2465,7 +2465,7 @@ m4_ifdef( [[M4_YY_NO_TOP_STATE]],,
%endif
{
M4_YY_DECL_GUTS_VAR();
- return yy_start_stack_ptr > 0 ? YY_G(yy_start_stack)[YY_G(yy_start_stack_ptr) - 1] : YY_START;
+ return YY_G(yy_start_stack_ptr) > 0 ? YY_G(yy_start_stack)[YY_G(yy_start_stack_ptr) - 1] : YY_START;
}
]])
--
1.8.3.1