AbsSyn.dcl 1.88 KB
Newer Older
1 2
definition module AbsSyn

3 4
:: FilePath:==Pathname
from PmTypes import ::Pathname,::Output
5
from StdMaybe import :: Maybe
6 7 8 9 10 11 12 13

/**
 * Datatypes
 */
:: CpmAction
  =  Project FilePath ProjectAction
  |  Module String ModuleAction
  |  Environment EnvironmentAction
14
  |  CpmMake
15 16 17
  |  CpmHelp

:: ProjectAction
18
  =  CreateProject (Maybe FilePath)
19 20
  |  ShowProject
  |  BuildProject Bool FilePath
21
  |  Compile [String]
22
  |  ProjectPath PathAction
23
  |  SetRelativeRoot String
24 25
  |  SetTarget String
  |  SetExec String
26
  |  SetBytecode (Maybe String)
27
  |  SetProjectOptions [ProjectOption]
28
  |  ExportTemplate FilePath
29 30 31
  |  ProjectHelp

:: PathAction
32
  =  AddPathAction [String]
33 34 35 36 37 38
  |  RemovePathAction Int
  |  ListPathsAction
  |  MovePathAction Int PathDirection
  |  PathHelp

:: PathDirection
39 40 41 42
  =  MovePathUp
  |  MovePathDown
  |  MovePathTop
  |  MovePathBottom
43

44 45 46
:: ProjectOption
	= DynamicsOn
	| DynamicsOff
47 48
	| GenericFusionOn
	| GenericFusionOff
49 50
	| RTSFlagsOn
	| RTSFlagsOff
51 52 53 54 55 56
	| StackTraceOn
	| StackTraceOff
	| TimeProfileOn
	| TimeProfileOff
	| MemoryProfileOn
	| MemoryProfileOff
57 58
	| DescExLOn
	| DescExLOff
59 60
	| HeapSize !Int
	| StackSize !Int
61
	| Output !Output
62 63
	| LinkerGenerateSymbolsOn
	| LinkerGenerateSymbolsOff
64 65 66 67 68
	| PO_OptimiseABC !Bool
	| PO_GenerateByteCode !Bool
	| PO_StripByteCode !Bool
	| PO_KeepByteCodeSymbols !Bool
	| PO_PreLinkByteCode !Bool
69

70 71 72 73 74 75 76 77 78
:: ModuleAction
  =  CreateModule ModuleType
  |  ModuleHelp

:: ModuleType
  =  ApplicationModule
  |  LibraryModule

:: EnvironmentAction
79 80 81 82
  =  ListEnvironments
  |  ImportEnvironment FilePath
  |  RemoveEnvironment String
  |  ShowEnvironment String
83
  |  ExportEnvironment String FilePath
84
  |  CreateEnvironment String (Maybe String)
85 86 87 88 89
  |  RenameEnvironment String String
  |  SetEnvironmentCompiler String String
  |  SetEnvironmentCodeGen String String
  |  EnvironmentHelp
  // TODO: EnvironmentPaths, EnvironmentVersion, EnvironmentProcessor, Environment64BitProcessor