Skip to content

Commit f3c1282

Browse files
committed
Update Grammar.hs
1 parent b45449c commit f3c1282

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Control/Lens/Grammar.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@ type Tokenizor token p =
9191
regexGrammar :: Grammar Char (RegEx Char)
9292
regexGrammar = ruleRec "regex" altG
9393

94+
ebnfGrammar :: Grammar Char (Bnf (RegEx Char))
95+
ebnfGrammar = rule "ebnf" $ _Bnf >~
96+
terminal "start = " >* regexGrammar
97+
>*< several noSep (terminal "\n" >* ruleG)
98+
9499
altG :: Grammarr Char (RegEx Char) (RegEx Char)
95100
altG rex = rule "alternate" $
96101
chain1 Left (_RegExam . _Alternate) (sepBy (terminal "|")) (seqG rex)
@@ -216,11 +221,6 @@ failG = rule "fail" $ terminal "\\q" <|> terminal "[]"
216221
ruleG :: Grammar Char (String, RegEx Char)
217222
ruleG = rule "rule" $ manyP charG >*< terminal " = " >* regexGrammar
218223

219-
ebnfGrammar :: Grammar Char (Bnf (RegEx Char))
220-
ebnfGrammar = rule "ebnf" $ _Bnf >~
221-
terminal "start = " >* regexGrammar
222-
>*< several noSep (terminal "\n" >* ruleG)
223-
224224
newtype RegString = RegString {runRegString :: RegEx Char}
225225
deriving newtype
226226
( Eq, Ord

0 commit comments

Comments
 (0)