Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
clean-compiler-and-rts
compiler
Commits
6fff7fa0
Commit
6fff7fa0
authored
Apr 04, 2011
by
John van Groningen
Browse files
Remove type argument from_symbol of type Import, it was always type ImportDeclaration
parent
303d5e69
Changes
3
Hide whitespace changes
Inline
Side-by-side
frontend/check.icl
View file @
6fff7fa0
...
...
@@ -1468,8 +1468,8 @@ replace_icl_macros_by_dcl_macros _ {ir_from=first_icl_macro_index,ir_to=end_icl_
(<=<)
infixl
(<=<)
state
fun
:==
fun
state
checkDclModules
::
[
.(
Import
.
ImportDeclaration
)]
*{#
.
DclModule
}
*{#*{#
.
FunDef
}}
*
Heaps
*
CheckState
->
(
Int
,[
ExplicitImport
],.[{#
Char
}],{!{!.
ExplImpInfo
}},
.
{#
DclModule
},
.
{#
.
{#
FunDef
}},
.
Heaps
,
.
CheckState
)
checkDclModules
::
[
Import
]
*{#
DclModule
}
*{#*{#
FunDef
}}
*
Heaps
*
CheckState
->
(
Int
,[
ExplicitImport
],.[{#
Char
}],{!{!.
ExplImpInfo
}},
*
{#
DclModule
},
*
{#
*
{#
FunDef
}},
*
Heaps
,
*
CheckState
)
checkDclModules
imports_of_icl_mod
dcl_modules
macro_defs
heaps
cs
=:{
cs_symbol_table
}
#!
nr_of_dcl_modules
=
size
dcl_modules
#
(
bitvect
,
dependencies
,
dcl_modules
,
cs_symbol_table
)
...
...
@@ -1537,7 +1537,7 @@ checkDclModules imports_of_icl_mod dcl_modules macro_defs heaps cs=:{cs_symbol_t
=
(
No
,
(
already_visited
,
cs_symbol_table
))
=
(
Yes
ste_index
,
(
bitvectSet
ste_index
already_visited
,
cs_symbol_table
))
set_to_false
::
(
Import
x
)
!(!*
LargeBitvect
,
!
u
:
SymbolTable
)
->
(!.
LargeBitvect
,
!
u
:
SymbolTable
)
set_to_false
::
Import
!(!*
LargeBitvect
,
!
u
:
SymbolTable
)
->
(!.
LargeBitvect
,
!
u
:
SymbolTable
)
set_to_false
{
import_module
}
(
bitvect
,
cs_symbol_table
)
#!
ste_index
=
(
sreadPtr
import_module
.
id_info
cs_symbol_table
).
ste_index
=
(
bitvectReset
ste_index
bitvect
,
cs_symbol_table
)
...
...
@@ -2153,7 +2153,7 @@ check_module1 cdefs icl_global_function_range fun_defs optional_dcl_mod optional
fill_macro_def_array
i
[
dcl_macro_defs
:
macro_defs
]
a
=
fill_macro_def_array
(
i
+1
)
macro_defs
{
a
&
[
i
]=
dcl_macro_defs
}
check_module2
::
Ident
{#
Char
}
[.
ImportedObject
]
.
[
Import
ImportDeclaration
]
[
ParsedForeignExport
]
.
ModuleKind
!.
IndexRange
!.
IndexRange
!.
IndexRange
!
Int
check_module2
::
Ident
{#
Char
}
[.
ImportedObject
]
[
Import
]
[
ParsedForeignExport
]
.
ModuleKind
!.
IndexRange
!.
IndexRange
!.
IndexRange
!
Int
(
Optional
(
Module
a
))
[
Declaration
]
Bool
Bool
*{#
FunDef
}
*{#*{#
FunDef
}}
*{#
DclModule
}
(
CollectedDefinitions
ClassInstance
)
*{#.
Int
}
*
Heaps
*
CheckState
->
(!
Bool
,.
IclModule
,!.{#
DclModule
},.{!
Group
},!*{#*{#
FunDef
}},!
Int
,!.
Heaps
,!.{#
PredefinedSymbol
},!.
Heap
SymbolTableEntry
,!.
File
,[
String
]);
...
...
frontend/syntax.dcl
View file @
6fff7fa0
...
...
@@ -458,16 +458,16 @@ cNameLocationDependent :== True
,
cim_index
::
!
Index
// or -1-index
}
::
Import
from_symbol
=
::
Import
=
{
import_module
::
!
Ident
,
import_symbols
::
![
from_symbol
]
,
import_symbols
::
![
ImportDeclaration
]
,
import_file_position
::
!
Position
// for error messages
,
import_qualified
::
!
Bool
}
instance
toString
(
Import
from_symbol
)
,
AttributeVar
,
TypeAttribute
,
Annotation
instance
toString
Import
,
AttributeVar
,
TypeAttribute
,
Annotation
::
ParsedImport
:==
Import
ImportDeclaration
::
ParsedImport
:==
Import
::
ImportDeclaration
=
ID_Function
!
Ident
|
ID_Class
!
Ident
!(
Optional
[
Ident
])
...
...
@@ -1431,7 +1431,7 @@ instance == ModuleKind, Ident
instance
<<<
(
Module
a
)
|
<<<
a
,
ParsedDefinition
,
InstanceType
,
AttributeVar
,
TypeVar
,
SymbolType
,
Expression
,
Type
,
Ident
,
(
Global
object
)
|
<<<
object
,
Position
,
CaseAlt
,
AType
,
FunDef
,
ParsedExpr
,
TypeAttribute
,
(
Bind
a
b
)
|
<<<
a
&
<<<
b
,
FieldNameOrQualifiedFieldName
,
ParsedConstructor
,
(
TypeDef
a
)
|
<<<
a
,
TypeVarInfo
,
AttrVarInfo
,
BasicValue
,
ATypeVar
,
TypeRhs
,
(
Import
from_symbol
)
|
<<<
from_symbol
,
ImportDeclaration
,
CasePatterns
,
BasicValue
,
ATypeVar
,
TypeRhs
,
Import
,
ImportDeclaration
,
CasePatterns
,
(
Optional
a
)
|
<<<
a
,
ConsVariable
,
BasicType
,
Annotation
,
SelectorKind
,
Selection
,
SelectorDef
,
ConsDef
,
LocalDefs
,
FreeVar
,
ClassInstance
,
SignClassification
,
TypeCodeExpression
,
CoercionPosition
,
AttrInequality
,
LetBind
,
Declaration
,
STE_Kind
,
BoundVar
,
TypeSymbIdent
,
...
...
frontend/syntax.icl
View file @
6fff7fa0
...
...
@@ -8,7 +8,7 @@ import syntax
instance
toString
Ident
where
toString
{
id_name
}
=
id_name
instance
toString
(
Import
from_symbol
)
instance
toString
Import
where
toString
{
import_module
}
=
toString
import_module
instance
==
FunctionOrMacroIndex
...
...
@@ -819,9 +819,8 @@ where
(<<<)
file
(
AVI_CountVar
_)
=
file
<<<
"AVI_CountVar"
(<<<)
file
(
AVI_SequenceNumber
n
)
=
file
<<<
"AVI_SequenceNumber "
<<<
n
(<<<)
file
AVI_Collected
=
file
<<<
"AVI_Collected"
instance
<<<
(
Import
from_symbol
)
|
<<<
from_symbol
instance
<<<
Import
where
(<<<)
file
{
import_module
,
import_symbols
}
=
file
<<<
"import "
<<<
import_module
<<<
import_symbols
...
...
Write
Preview
Supports
Markdown
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