Skip to content

Commit

Permalink
align
Browse files Browse the repository at this point in the history
  • Loading branch information
nomeata committed Sep 7, 2023
1 parent 2ec1c38 commit f7db109
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ParserParser.hs
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@ str = some (sat (not . (== '\'')))
ident :: P Ident
ident = some (sat (\c -> isAlphaNum c && isAscii c))
atom :: P Atom
atom = Lit <$> l (quoted str)
atom = Lit <$> l (quoted str)
<|> NonTerm <$> l ident
eps :: P ()
eps = void $ l (tok 'ε')
sep :: P ()
sep = void $ some (sat isSpace)
sq :: P Seq
sq = [] <$ eps
<|> (:) <$> atom <* sep <*> sq
<|> pure <$> atom
sq = [] <$ eps
<|> (:) <$> atom <* sep <*> sq
<|> pure <$> atom
ruleRhs :: P RuleRhs
ruleRhs = pure <$> sq <* l (tok ';')
<|> (:) <$> sq <* l (tok '|') <*> ruleRhs
Expand Down

0 comments on commit f7db109

Please sign in to comment.