[gcc r17-2860] cobol: Scan VALUE in field_state.

"James K. Lowden via Gcc-cvs" <[email protected]> Fri, 31 Jul 2026 20:33:43 +0000 (GMT)
Newsgroups gmane.comp.gcc.cvs
Message-ID <[email protected]>
https://gcc.gnu.org/g:d2aab1a68be1b0867465a00692e5753d43ba3c1d

commit r17-2860-gd2aab1a68be1b0867465a00692e5753d43ba3c1d
Author: James K. Lowden <[email protected]>
Date:   Fri Jul 31 12:56:07 2026 -0400

    cobol: Scan VALUE in field_state.
    
    Prioritize keyword so it is recognized even if not followed by a space.
    
    gcc/cobol/ChangeLog:
    
            * scan.l: Add value pattern.

Diff:
---
 gcc/cobol/scan.l | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/gcc/cobol/scan.l b/gcc/cobol/scan.l
index 85603117e92d..b2843b9c7adf 100644
--- a/gcc/cobol/scan.l
+++ b/gcc/cobol/scan.l
@@ -1114,18 +1114,20 @@ USE({SPC}FOR)?		{ return USE; }
   HIGH-VALUES?	        { return HIGH_VALUES; }
   QUOTES?		{ return QUOTES; }
   NULLS?		{ return NULLS; }
+  OF			{ return OF; }
 
-  OF		           { return OF; }
+  VALUE				{ return VALUE; }
   VALUE({SPC}IS)?/[[:space:]]   { return VALUE; }
   VALUES({SPC}ARE)?/[[:space:]] { return VALUE; }
-  THRU|THROUGH             { return THRU; }
 
   VALUES?({SPC}(IS|ARE))?{SPC}NULLS? { return NULLPTR; }
   VALUES?({SPC}(IS|ARE))?/{SPC}[+-]?{dfc} {
                           yy_push_state(numeric_state); return VALUE; }
 
+  THRU|THROUGH		{ return THRU; }
  (THRU|THROUGH)/{SPC}[[:digit:].,+-] {
-                          yy_push_state(numeric_state); return THRU; }
+                          yy_push_state(numeric_state);
+			  return THRU; }
 
   ALL			{ return ALL; }
   AS			{ return AS; }