bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/4] style: formatting changes in scan-code.l


From: Akim Demaille
Subject: [PATCH 1/4] style: formatting changes in scan-code.l
Date: Sat, 7 Aug 2021 12:56:29 +0200

* src/scan-code.l: Fix indentation.
---
 TODO            | 8 ++++++++
 src/scan-code.l | 6 +++---
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/TODO b/TODO
index 0ae9ef89..8bdee7c3 100644
--- a/TODO
+++ b/TODO
@@ -3,6 +3,14 @@
 See the recent changes about function prototypes in POSIX Yacc.  Implement
 them.
 
+** scan-code
+The default case is scanning char-per-char.
+
+    /* By default, grow the string obstack with the input.  */
+    .|\n        STRING_GROW ();
+
+make it more eager?
+
 ** Missing tests
 commit c22902e360e0fbbe9fd5657dcf107e03166da309
 Author: Akim Demaille <akim.demaille@gmail.com>
diff --git a/src/scan-code.l b/src/scan-code.l
index 416f11d4..fced37d2 100644
--- a/src/scan-code.l
+++ b/src/scan-code.l
@@ -92,8 +92,8 @@ splice   (\\[ \f\t\v]*\n)*
 /* C style identifier. Must start with letter. Will be used for
    named symbol references. Shall be kept synchronized with
    scan-gram.l "letter" and "id". */
-letter    [.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_]
-id        {letter}({letter}|[-0-9])*
+letter   [.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_]
+id       {letter}({letter}|[-0-9])*
 ref      -?[0-9]+|{id}|"["{id}"]"|"$"
 
 %%
@@ -203,7 +203,7 @@ ref      -?[0-9]+|{id}|"["{id}"]"|"$"
   /* By default, grow the string obstack with the input.  */
   .|\n        STRING_GROW ();
 
- /* End of processing. */
+  /* End of processing. */
   <<EOF>>     STRING_FINISH (); return last_string;
 }
 
-- 
2.32.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]