Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
clean-ide
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
6
Issues
6
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
clean-and-itasks
clean-ide
Commits
4c9d88d3
Commit
4c9d88d3
authored
Apr 11, 2019
by
Mart Lubbers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implement environment import/export .. for cpm
parent
412ff028
Pipeline
#21004
passed with stage
in 56 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
5 deletions
+17
-5
Pm/PmEnvironment.dcl
Pm/PmEnvironment.dcl
+1
-0
cpm/AbsSyn.dcl
cpm/AbsSyn.dcl
+1
-1
cpm/CpmLogic.icl
cpm/CpmLogic.icl
+14
-3
cpm/Parser.icl
cpm/Parser.icl
+1
-1
No files found.
Pm/PmEnvironment.dcl
View file @
4c9d88d3
...
...
@@ -35,6 +35,7 @@ EnvsFileName :== "IDEEnvs"
getEnvironments
::
!
String
!
String
!*
env
->
*([
Target
],*
env
)
|
FileSystem
,
FileEnv
env
openEnvironments
::
!
String
!
String
!*
env
->
*([
Target
],*
env
)
|
FileEnv
env
openEnvironment
::
!
String
*
a
->
*(([
Target
],.
Bool
,{#
Char
}),*
a
)
|
FileSystem
a
saveEnvironments
::
!
String
![
Target
]
!*
env
->
*(
Bool
,*
env
)
|
FileEnv
env
t_StdEnv
::
Target
cpm/AbsSyn.dcl
View file @
4c9d88d3
...
...
@@ -72,7 +72,7 @@ from PmTypes import ::Pathname,::Output
|
ImportEnvironment
FilePath
|
RemoveEnvironment
String
|
ShowEnvironment
String
|
ExportEnvironment
String
|
ExportEnvironment
String
FilePath
|
CreateEnvironment
String
|
RenameEnvironment
String
String
|
SetEnvironmentCompiler
String
String
...
...
cpm/CpmLogic.icl
View file @
4c9d88d3
...
...
@@ -247,7 +247,12 @@ doEnvironmentAction :: String String EnvironmentAction *World -> *World
doEnvironmentAction
cleanhome
pwd
ListEnvironments
world
=
withEnvironments
cleanhome
(\
ts
w
->(
Nothing
,
showLines
[
t
.
target_name
\\
t
<-
ts
]
w
))
world
doEnvironmentAction
cleanhome
pwd
(
ImportEnvironment
ef
)
world
=
error
"Not implemented"
world
=
withEnvironments
cleanhome
importEnvironment
world
where
importEnvironment
ts
world
#
((
ts`
,
ok
,
err
),
world
)
=
openEnvironment
ef
world
|
not
ok
=
(
Nothing
,
error
err
world
)
=
(
Just
(
ts
++
ts`
),
world
)
doEnvironmentAction
cleanhome
pwd
(
RemoveEnvironment
en
)
world
=
withEnvironment
cleanhome
en
(\_
w
->(
Just
[],
w
))
world
doEnvironmentAction
cleanhome
pwd
(
ShowEnvironment
en
)
world
...
...
@@ -277,7 +282,13 @@ where
CompilePers
=
"pers"
,
"Processor: "
+++
toString
e
.
target_proc
]
doEnvironmentAction
cleanhome
pwd
(
ExportEnvironment
en
)
world
=
error
(
"Not implemented"
)
world
doEnvironmentAction
cleanhome
pwd
(
ExportEnvironment
en
fp
)
world
=
withEnvironment
cleanhome
en
exportEnvironment
world
where
exportEnvironment
t
world
#
(
ok
,
world
)
=
saveEnvironments
fp
[
t
]
world
|
not
ok
=
(
Nothing
,
error
"Error saving environment"
world
)
=
(
Nothing
,
world
)
doEnvironmentAction
cleanhome
pwd
(
CreateEnvironment
en
)
world
=
error
(
"Not implemented"
)
world
doEnvironmentAction
cleanhome
pwd
(
RenameEnvironment
en
en`
)
world
=
withEnvironment
cleanhome
en
(\
t
w
->(
Just
[{
t
&
target_name
=
en`
}],
w
))
world
...
...
@@ -291,7 +302,7 @@ doEnvironmentAction _ _ _ world =
,
" create <envname> : create a new environment with name <envname>"
,
" remove <envname> : remove evironment <envname>"
,
" show <envname> : show environment <envname>"
,
" export <envname>
: export environment <envname
>"
,
" export <envname>
<filepath> : export environment <envname> to <filepath
>"
,
" rename <envname> <envname`> : rename environment <envname> to <envname`>"
,
" setcompiler <envname> <compilername> : set compiler for <envname> to <compilername>"
,
" setcodegen <envname> <codegenname> : set codegen for <envname> to <codegenname>"
...
...
cpm/Parser.icl
View file @
4c9d88d3
...
...
@@ -181,7 +181,7 @@ parse_Environment ["import",s] = Environment (ImportEnvironment s);
parse_Environment
[
"create"
,
s
]
=
Environment
(
CreateEnvironment
s
);
parse_Environment
[
"remove"
,
s
]
=
Environment
(
RemoveEnvironment
s
);
parse_Environment
[
"show"
,
s
]
=
Environment
(
ShowEnvironment
s
);
parse_Environment
[
"export"
,
s
]
=
Environment
(
ExportEnvironment
s
);
parse_Environment
[
"export"
,
s
1
,
s2
]
=
Environment
(
ExportEnvironment
s1
s2
);
parse_Environment
[
"rename"
,
s1
,
s2
]
=
Environment
(
RenameEnvironment
s1
s2
);
parse_Environment
[
"setcompiler"
,
s1
,
s2
]
=
Environment
(
SetEnvironmentCompiler
s1
s2
);
parse_Environment
[
"setcodegen"
,
s1
,
s2
]
=
Environment
(
SetEnvironmentCodeGen
s1
s2
);
...
...
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