Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mockup-generator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dosek-verification
mockup-generator
Commits
ec389e8e
Commit
ec389e8e
authored
9 years ago
by
Hans-Peter Deifel
Browse files
Options
Downloads
Patches
Plain Diff
Compile to C in main function
parent
d461be32
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/CFG/Types.hs
+1
-1
1 addition, 1 deletion
src/CFG/Types.hs
src/main/Main.hs
+4
-2
4 additions, 2 deletions
src/main/Main.hs
with
5 additions
and
3 deletions
src/CFG/Types.hs
+
1
−
1
View file @
ec389e8e
...
...
@@ -36,7 +36,7 @@ data CFG = CFG
{
cfgGraph
::
Graph
,
cfgGetBlock
::
Vertex
->
(
Block
,
Text
,
[
Text
])
,
cfgGetVertex
::
Text
->
Maybe
Vertex
,
cfgEntryVertex
::
Vertex
,
cfgEntryVertex
::
Vertex
-- TODO Remove
}
instance
Show
CFG
where
...
...
This diff is collapsed.
Click to expand it.
src/main/Main.hs
+
4
−
2
View file @
ec389e8e
...
...
@@ -5,6 +5,8 @@ import qualified Data.Text.IO as T
import
qualified
CFG.Parser
as
P
import
CFG.Graph
import
CFG.IR
import
CFG.C
main
::
IO
()
main
=
do
...
...
@@ -12,5 +14,5 @@ main = do
case
P
.
parseFile
"<stdin>"
cntnt
of
Left
err
->
print
err
Right
res
->
do
let
graph
s
=
map
graphify
res
print
graph
s
let
fun
s
=
map
(
compileToC
.
fmap
flattenCFG
.
cfg
)
res
mapM_
T
.
putStrLn
fun
s
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment