Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
clean-and-itasks
clean-ide
Commits
81d1e8ab
Commit
81d1e8ab
authored
Mar 16, 2018
by
John van Groningen
Browse files
add setting output options for a project,
(written by Mart Lubbers)
parent
99ff9626
Changes
4
Hide whitespace changes
Inline
Side-by-side
cpm/AbsSyn.dcl
View file @
81d1e8ab
definition
module
AbsSyn
from
System
.
FilePath
import
::
FilePath
from
PmTypes
import
::
Output
/**
* Datatypes
...
...
@@ -45,6 +46,7 @@ from System.FilePath import :: FilePath
|
DescExLOff
|
HeapSize
!
Int
|
StackSize
!
Int
|
Output
!
Output
::
ModuleAction
=
CreateModule
ModuleType
...
...
cpm/AbsSyn.icl
View file @
81d1e8ab
implementation
module
AbsSyn
from
System
.
FilePath
import
::
FilePath
from
PmTypes
import
::
Output
cpm/CpmLogic.icl
View file @
81d1e8ab
...
...
@@ -163,6 +163,8 @@ where
=
PR_SetApplicationOptions
{
PR_GetApplicationOptions
project
&
hs
=
hs
}
project
set_project_option
(
StackSize
ss
)
project
=
PR_SetApplicationOptions
{
PR_GetApplicationOptions
project
&
ss
=
ss
}
project
set_project_option
(
Output
output
)
project
=
PR_SetApplicationOptions
{
PR_GetApplicationOptions
project
&
o
=
output
}
project
doProjectAction
_
_
_
_
world
=
help
"cpm project <projectfile> <action>"
...
...
@@ -182,6 +184,9 @@ doProjectAction _ _ _ _ world =
,
" : -descexl,-descexl"
,
" : Enable or disable descriptor generation and label exporting"
,
" : This translates to passing -desc and -exl to cocl"
,
" : -b,-nr,-nc,-sc"
,
" : Set the output option to BasicValuesOnly, NoReturnType,"
,
" : NoConsole or ShowConstructors respectively"
]
world
/**
...
...
cpm/Parser.icl
View file @
81d1e8ab
...
...
@@ -3,6 +3,7 @@ implementation module Parser;
import
StdEnv
;
import
AbsSyn
;
from
PmEnvironment
import
EnvsFileName
;
from
PmTypes
import
::
Output
(..);
parseCpmLogic
::
![
String
]
->
CpmAction
;
parseCpmLogic
[_:
args
]
=
parse_CpmLogic
args
;
...
...
@@ -101,6 +102,18 @@ parse_Project_options ["-s",stack_size:project_option_args]
#
stack_size
=
parseByteSuffix
stack_size
;
|
stack_size
>
0
=
(
ok
,[
StackSize
stack_size
:
project_options
]);
parse_Project_options
[
"-b"
:
project_option_args
]
#
(
ok
,
project_options
)
=
parse_Project_options
project_option_args
;
=
(
ok
,
[
Output
BasicValuesOnly
:
project_options
]);
parse_Project_options
[
"-sc"
:
project_option_args
]
#
(
ok
,
project_options
)
=
parse_Project_options
project_option_args
;
=
(
ok
,
[
Output
ShowConstructors
:
project_options
]);
parse_Project_options
[
"-nr"
:
project_option_args
]
#
(
ok
,
project_options
)
=
parse_Project_options
project_option_args
;
=
(
ok
,
[
Output
NoReturnType
:
project_options
]);
parse_Project_options
[
"-nc"
:
project_option_args
]
#
(
ok
,
project_options
)
=
parse_Project_options
project_option_args
;
=
(
ok
,
[
Output
NoConsole
:
project_options
]);
parse_Project_options
[]
=
(
True
,[]);
parse_Project_options
_
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment