From 1b17e12fd6322f79aed13cd3d5ffddfe5787eb7a Mon Sep 17 00:00:00 2001
From: sogaiu <983021772@users.noreply.github.com>
Date: Thu, 19 Oct 2023 18:45:20 +0900
Subject: [PATCH] Add more + and * keywords to default-peg-grammar

---
 src/boot/boot.janet | 30 ++++++++++++++++++++----------
 1 file changed, 20 insertions(+), 10 deletions(-)

diff --git a/src/boot/boot.janet b/src/boot/boot.janet
index a72b3c799..de66320fe 100644
--- a/src/boot/boot.janet
+++ b/src/boot/boot.janet
@@ -2333,26 +2333,36 @@
 (def default-peg-grammar
   `The default grammar used for pegs. This grammar defines several common patterns
   that should make it easier to write more complex patterns.`
-  ~@{:d (range "09")
-     :a (range "az" "AZ")
+  ~@{:a (range "az" "AZ")
+     :d (range "09")
+     :h (range "09" "af" "AF")
      :s (set " \t\r\n\0\f\v")
      :w (range "az" "AZ" "09")
-     :h (range "09" "af" "AF")
-     :S (if-not :s 1)
-     :W (if-not :w 1)
      :A (if-not :a 1)
      :D (if-not :d 1)
      :H (if-not :h 1)
-     :d+ (some :d)
+     :S (if-not :s 1)
+     :W (if-not :w 1)
      :a+ (some :a)
+     :d+ (some :d)
+     :h+ (some :h)
      :s+ (some :s)
      :w+ (some :w)
-     :h+ (some :h)
-     :d* (any :d)
+     :A+ (some :A)
+     :D+ (some :D)
+     :H+ (some :H)
+     :S+ (some :S)
+     :W+ (some :W)
      :a* (any :a)
-     :w* (any :w)
+     :d* (any :d)
+     :h* (any :h)
      :s* (any :s)
-     :h* (any :h)})
+     :w* (any :w)
+     :A* (any :A)
+     :D* (any :D)
+     :H* (any :H)
+     :S* (any :S)
+     :W* (any :W)})
 
 (setdyn *peg-grammar* default-peg-grammar)