stopping point8 before repairing parser
This commit is contained in:
parent
3f6a14a59a
commit
a02ba006de
2 changed files with 13 additions and 46 deletions
|
@ -67,11 +67,9 @@ import RTLILParser.Primitives(
|
|||
-- taken from: https://yosyshq.readthedocs.io/projects/yosys/en/0.47/appendix/rtlil_text.html
|
||||
-- parsers below are split int sections from the above link
|
||||
|
||||
runParser str = case parse pFile "pFile" preProcessedFile of
|
||||
-- runParser str = case parse pCell "pCell" preProcessedFile of
|
||||
runParser str = case parse pFile "pFile" str of
|
||||
Left err -> error $ show err
|
||||
Right val -> val
|
||||
where preProcessedFile = str
|
||||
|
||||
-- identifiers
|
||||
pId :: Parser Id
|
||||
|
@ -305,6 +303,8 @@ pWireOption :: Parser WireOption
|
|||
pWireOption = p <?> name where
|
||||
name = "WireOption"
|
||||
p =
|
||||
-- We technically don't need the first `try` below so this is a
|
||||
-- stylistic choice. The other `try` statements are needed.
|
||||
try (WireOptionWidth <$> (string "width" *> pWs *> pInteger)) <|>
|
||||
try (WireOptionOffset <$> (string "offset" *> pWs *> pInteger)) <|>
|
||||
try (WireOptionInput <$> (string "input" *> pWs *> pInteger)) <|>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue