Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sv2v
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
sv2v
Commits
58ad1fea
Commit
58ad1fea
authored
Nov 19, 2019
by
Zachary Snow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow reading from stdin
parent
95299c6f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
README.md
+2
-1
src/Language/SystemVerilog/Parser/Lex.x
+4
-1
No files found.
README.md
View file @
58ad1fea
...
...
@@ -60,7 +60,8 @@ running `stack install`, or copy over the executable manually.
sv2v takes in a list of files and prints the converted Verilog to
`stdout`
.
Users may specify
`include`
search paths, define macros during preprocessing,
and exclude some of the conversions.
and exclude some of the conversions. Specifying
`-`
as an input file will read
from
`stdin`
.
Below is the current usage printout. This interface is subject to change.
...
...
src/Language/SystemVerilog/Parser/Lex.x
View file @
58ad1fea
...
...
@@ -527,7 +527,10 @@ alexInitUserState = LS [] "" Map.empty [] [] []
-- public-facing lexer entrypoint
lexFile :: [String] -> Env -> FilePath -> IO (Either String ([Token], Env))
lexFile includePaths env path = do
str <- readFile path >>= return . normalize
str <-
if path == "-"
then getContents
else readFile path >>= return . normalize
let result = runAlex str $ setEnv >> alexMonadScan >> get
return $ case result of
Left msg -> Left msg
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment