diff options
-rw-r--r-- | colm.vim | 2 | ||||
-rw-r--r-- | src/colm.lm | 16 | ||||
-rw-r--r-- | src/consinit.cc | 8 | ||||
-rw-r--r-- | src/declare.cc | 3 | ||||
-rw-r--r-- | src/loadcolm.cc | 99 | ||||
-rw-r--r-- | src/loadinit.cc | 8 | ||||
-rw-r--r-- | src/parser.cc | 38 | ||||
-rw-r--r-- | src/parser.h | 8 | ||||
-rw-r--r-- | src/parsetree.cc | 32 | ||||
-rw-r--r-- | src/parsetree.h | 16 | ||||
-rw-r--r-- | src/resolve.cc | 16 | ||||
-rw-r--r-- | src/synthesis.cc | 14 | ||||
-rw-r--r-- | test/binary1.lm | 12 | ||||
-rw-r--r-- | test/generate1.lm | 4 | ||||
-rw-r--r-- | test/generate2.lm | 4 | ||||
-rw-r--r-- | test/list1.lm | 2 | ||||
-rw-r--r-- | test/list2.lm | 2 | ||||
-rw-r--r-- | test/list3.lm | 2 | ||||
-rw-r--r-- | test/list4.lm | 2 | ||||
-rw-r--r-- | test/lookup1.lm | 10 | ||||
-rw-r--r-- | test/map1.lm | 2 | ||||
-rw-r--r-- | test/map2.lm | 2 | ||||
-rw-r--r-- | test/map3.lm | 2 | ||||
-rw-r--r-- | test/map4.lm | 2 | ||||
-rw-r--r-- | test/map5.lm | 2 | ||||
-rw-r--r-- | test/undolist1.lm | 4 | ||||
-rw-r--r-- | test/undomap1.lm | 4 | ||||
-rw-r--r-- | test/undomap2.lm | 4 |
28 files changed, 207 insertions, 113 deletions
@@ -62,7 +62,7 @@ syntax keyword Type \ end eos print syntax keyword typeKeywords - \ int str bool any ref ptr void list_el map_el + \ int str bool any ref ptr void syntax keyword Keyword \ reject else elsif return yield for while if diff --git a/src/colm.lm b/src/colm.lm index 27214c23..65964817 100644 --- a/src/colm.lm +++ b/src/colm.lm @@ -31,8 +31,6 @@ lex token LIST_EL / 'list_el' / token MAP / 'map' / token MAP_EL / 'map_el' / - token VLIST / 'vlist' / - token VMAP / 'vmap' / token PTR / 'ptr' / token ITER / 'iter' / token REF / 'ref' / @@ -249,12 +247,6 @@ def pre_eof_def def alias_def [ALIAS id type_ref] -def list_el_def - [LIST_EL id] - -def map_el_def - [MAP_EL LT type_ref GT id] - def struct_item [struct_var_def] :StructVar commit | [literal_def] :Literal commit @@ -271,8 +263,6 @@ def struct_item | [export_def] :Export commit | [pre_eof_def] :PreEof commit | [precedence_def] :Precedence commit -| [list_el_def] :ListEl commit -| [map_el_def] :MapEl commit | [alias_def] :Alias commit def export_def @@ -585,9 +575,9 @@ def type_ref | [BOOL] :Bool | [PARSER LT type_ref GT] :Parser | [LIST LT type_ref GT] :List -| [MAP LT KeyType: type_ref COMMA ElType: type_ref GT] :Map -| [VLIST LT type_ref GT] :ValueList -| [VMAP LT KeyType: type_ref COMMA ValType: type_ref GT] :ValueMap +| [MAP LT KeyType: type_ref COMMA ValType: type_ref GT] :Map +| [LIST_EL LT type_ref GT] :ListEl +| [MAP_EL LT KeyType: type_ref COMMA ValType: type_ref GT] :MapEl def region_qual [region_qual id DOUBLE_COLON] :Qual diff --git a/src/consinit.cc b/src/consinit.cc index 685bc150..0653dce2 100644 --- a/src/consinit.cc +++ b/src/consinit.cc @@ -758,8 +758,7 @@ void ConsInit::parseInput( StmtList *stmtList ) 0, curLocalFrame->rootScope, popQual, String("pop") ); LangExpr *pop = LangExpr::cons( LangTerm::cons( InputLoc(), popRef, popArgs ) ); - NamespaceQual *nspaceQual = NamespaceQual::cons( curNspace() ); - TypeRef *typeRef = TypeRef::cons( internal, nspaceQual, "argv_el", RepeatNone ); + TypeRef *typeRef = TypeRef::cons( internal, pd->uniqueTypeStr ); ObjectField *objField = ObjectField::cons( internal, ObjectField::UserLocalType, typeRef, "A" ); @@ -775,9 +774,8 @@ void ConsInit::parseInput( StmtList *stmtList ) /* Reference A->value */ QualItemVect *qual = new QualItemVect; - qual->append( QualItem( QualItem::Arrow, internal, "A" ) ); LangVarRef *varRef = LangVarRef::cons( internal, 0, - curLocalFrame->rootScope, qual, String("value") ); + curLocalFrame->rootScope, qual, String("A") ); LangExpr *Avalue = LangExpr::cons( LangTerm::cons( internal, LangTerm::VarRefType, varRef ) ); @@ -799,7 +797,7 @@ void ConsInit::parseInput( StmtList *stmtList ) ObjectField::UserLocalType, 0, String("P") ); /* Parse the "start" def. */ - nspaceQual = NamespaceQual::cons( curNspace() ); + NamespaceQual *nspaceQual = NamespaceQual::cons( curNspace() ); typeRef = TypeRef::cons( internal, nspaceQual, String("start"), RepeatNone ); diff --git a/src/declare.cc b/src/declare.cc index 05073547..8a85a4c3 100644 --- a/src/declare.cc +++ b/src/declare.cc @@ -250,6 +250,9 @@ StructEl *declareStruct( Compiler *pd, Namespace *inNspace, pd->structEls.append( structEl ); structDef->structEl = structEl; + if ( structDef->listEl ) + structEl->listEl = true; + if ( inNspace ) { TypeMapEl *typeMapEl = new TypeMapEl( TypeMapEl::StructType, data, structEl ); inNspace->typeMap.insert( typeMapEl ); diff --git a/src/loadcolm.cc b/src/loadcolm.cc index 0f4994ac..b62069a6 100644 --- a/src/loadcolm.cc +++ b/src/loadcolm.cc @@ -806,11 +806,6 @@ struct LoadColm return qual; } - NamespaceQual *emptyNspaceQual() - { - return NamespaceQual::cons( curNspace() ); - } - RepeatType walkOptRepeat( opt_repeat OptRepeat ) { RepeatType repeatType = RepeatNone; @@ -828,8 +823,6 @@ struct LoadColm return repeatType; } - BstSet<String, CmpStr> genericElDefined; - TypeRef *walkValueList( type_ref typeRef ) { TypeRef *valType = walkTypeRef( typeRef._type_ref() ); @@ -847,6 +840,7 @@ struct LoadColm ObjectField *elValObjField = ObjectField::cons( internal, ObjectField::StructFieldType, valType, id ); structVarDef( internal, elValObjField ); + elValObjField->context->listEl = true; /* List El. */ listElDef( "el" ); @@ -859,6 +853,35 @@ struct LoadColm return TypeRef::cons( typeRef.loc(), TypeRef::ValueList, 0, elType, valType ); } + TypeRef *walkListEl( type_ref typeRef ) + { + TypeRef *valType = walkTypeRef( typeRef._type_ref() ); + + /* Create the value list element. */ + String name( 32, "vlist_el_%s", valType->stringify().c_str() ); + + if ( !genericElDefined.find( name ) ) { + genericElDefined.insert( name ); + + structHead( internal, pd->rootNamespace, name, ObjectDef::StructType ); + + /* Var def. */ + String id = "value"; + ObjectField *elValObjField = ObjectField::cons( internal, + ObjectField::StructFieldType, valType, id ); + structVarDef( internal, elValObjField ); + elValObjField->context->listEl = true; + + /* List El. */ + listElDef( "el" ); + + structStack.pop(); + namespaceStack.pop(); + } + + return TypeRef::cons( typeRef.loc(), emptyNspaceQual(), name ); + } + TypeRef *walkValueMap( type_ref typeRef ) { TypeRef *keyType = walkTypeRef( typeRef.KeyType() ); @@ -890,6 +913,35 @@ struct LoadColm 0, keyType, elType, valType ); } + TypeRef *walkMapEl( type_ref typeRef ) + { + TypeRef *keyType = walkTypeRef( typeRef.KeyType() ); + TypeRef *valType = walkTypeRef( typeRef.ValType() ); + + String name( 32, "vmap_el_%s_%s", keyType->stringify().c_str(), + valType->stringify().c_str() ); + + if ( !genericElDefined.find( name ) ) { + genericElDefined.insert( name ); + + structHead( internal, pd->rootNamespace, name, ObjectDef::StructType ); + + /* Var def. */ + String id = "value"; + ObjectField *elValObjField = ObjectField::cons( internal, + ObjectField::StructFieldType, valType, id ); + structVarDef( internal, elValObjField ); + + /* Map El. */ + mapElDef( "el", keyType ); + + structStack.pop(); + namespaceStack.pop(); + } + + return TypeRef::cons( typeRef.loc(), emptyNspaceQual(), name ); + } + TypeRef *walkTypeRef( type_ref typeRef ) { TypeRef *tr = 0; @@ -915,22 +967,19 @@ struct LoadColm break; } case type_ref::List: { - TypeRef *type = walkTypeRef( typeRef._type_ref() ); - tr = TypeRef::cons( typeRef.loc(), TypeRef::List, 0, type, 0 ); + tr = walkValueList( typeRef ); break; } case type_ref::Map: { - TypeRef *keyType = walkTypeRef( typeRef.KeyType() ); - TypeRef *elType = walkTypeRef( typeRef.ElType() ); - tr = TypeRef::cons( typeRef.loc(), TypeRef::Map, 0, keyType, elType ); + tr = walkValueMap( typeRef ); break; } - case type_ref::ValueList: { - tr = walkValueList( typeRef ); + case type_ref::ListEl: { + tr = walkListEl( typeRef ); break; } - case type_ref::ValueMap: { - tr = walkValueMap( typeRef ); + case type_ref::MapEl: { + tr = walkMapEl( typeRef ); break; }} return tr; @@ -2320,15 +2369,15 @@ struct LoadColm case struct_item::Precedence: walkPrecedenceDef( structItem.precedence_def() ); break; - case struct_item::ListEl: - listElDef( structItem.list_el_def().id().data() ); - break; - case struct_item::MapEl: { - map_el_def Def = structItem.map_el_def(); - TypeRef *keyTr = walkTypeRef( Def.type_ref() ); - mapElDef( Def.id().data(), keyTr ); - break; - } +// case struct_item::ListEl: +// listElDef( structItem.list_el_def().id().data() ); +// break; +// case struct_item::MapEl: { +// map_el_def Def = structItem.map_el_def(); +// TypeRef *keyTr = walkTypeRef( Def.type_ref() ); +// mapElDef( Def.id().data(), keyTr ); +// break; +// } case struct_item::Alias: walkAliasDef( structItem.alias_def() ); break; diff --git a/src/loadinit.cc b/src/loadinit.cc index 34c0b9a0..f8454e3a 100644 --- a/src/loadinit.cc +++ b/src/loadinit.cc @@ -288,8 +288,7 @@ void LoadInit::consParseStmt( StmtList *stmtList ) curLocalFrame->rootScope, popQual, String("pop") ); LangExpr *pop = LangExpr::cons( LangTerm::cons( InputLoc(), popRef, popArgs ) ); - NamespaceQual *nspaceQual = NamespaceQual::cons( curNspace() ); - TypeRef *typeRef = TypeRef::cons( internal, nspaceQual, "argv_el", RepeatNone ); + TypeRef *typeRef = TypeRef::cons( internal, pd->uniqueTypeStr ); ObjectField *objField = ObjectField::cons( internal, ObjectField::UserLocalType, typeRef, "A" ); @@ -305,9 +304,8 @@ void LoadInit::consParseStmt( StmtList *stmtList ) /* Reference A->value */ QualItemVect *qual = new QualItemVect; - qual->append( QualItem( QualItem::Arrow, internal, "A" ) ); LangVarRef *varRef = LangVarRef::cons( internal, 0, - curLocalFrame->rootScope, qual, String("value") ); + curLocalFrame->rootScope, qual, String("A") ); LangExpr *Avalue = LangExpr::cons( LangTerm::cons( internal, LangTerm::VarRefType, varRef ) ); @@ -329,7 +327,7 @@ void LoadInit::consParseStmt( StmtList *stmtList ) ObjectField::UserLocalType, 0, String("P") ); /* Ref the start def. */ - nspaceQual = NamespaceQual::cons( curNspace() ); + NamespaceQual *nspaceQual = NamespaceQual::cons( curNspace() ); typeRef = TypeRef::cons( internal, nspaceQual, String("start"), RepeatNone ); diff --git a/src/parser.cc b/src/parser.cc index a056b681..21e7652b 100644 --- a/src/parser.cc +++ b/src/parser.cc @@ -95,6 +95,7 @@ void BaseParser::mapElDef( String name, TypeRef *keyType ) structVarDef( InputLoc(), of ); } +#if 0 void BaseParser::argvDecl() { String structName = "argv_el"; @@ -117,6 +118,7 @@ void BaseParser::argvDecl() structStack.pop(); namespaceStack.pop(); } +#endif void BaseParser::init() { @@ -157,7 +159,7 @@ void BaseParser::init() pd->declareBaseLangEls(); pd->initUniqueTypes(); - argvDecl(); + //argvDecl(); /* Internal variables. */ addArgvList(); @@ -420,9 +422,37 @@ void BaseParser::literalDef( const InputLoc &loc, const String &data, void BaseParser::addArgvList() { - NamespaceQual *nspaceQual = NamespaceQual::cons( curNspace() ); - TypeRef *typeRef = TypeRef::cons( internal, nspaceQual, "argv_el", RepeatNone ); - pd->argvTypeRef = TypeRef::cons( internal, TypeRef::List, 0, typeRef, 0 ); + TypeRef *valType = TypeRef::cons( internal, pd->uniqueTypeStr ); + + /* Create the value list element. */ + String name( 32, "vlist_el_%s", valType->stringify().c_str() ); + + if ( !genericElDefined.find( name ) ) { + genericElDefined.insert( name ); + + structHead( internal, pd->rootNamespace, name, ObjectDef::StructType ); + + /* Var def. */ + String id = "value"; + ObjectField *elValObjField = ObjectField::cons( internal, + ObjectField::StructFieldType, valType, id ); + structVarDef( internal, elValObjField ); + + pd->argvEl = elValObjField->context; + elValObjField->context->listEl = true; + + /* List El. */ + listElDef( "el" ); + + structStack.pop(); + namespaceStack.pop(); + } + + TypeRef *elType = TypeRef::cons( internal, + emptyNspaceQual(), name ); + + pd->argvTypeRef = TypeRef::cons( internal, + TypeRef::ValueList, 0, elType, valType ); } ObjectDef *BaseParser::blockOpen() diff --git a/src/parser.h b/src/parser.h index 5909d55f..8843aad6 100644 --- a/src/parser.h +++ b/src/parser.h @@ -162,6 +162,14 @@ struct BaseParser void popScope(); virtual void go( long activeRealm ) = 0; + + BstSet<String, CmpStr> genericElDefined; + + NamespaceQual *emptyNspaceQual() + { + return NamespaceQual::cons( curNspace() ); + } + }; #endif diff --git a/src/parsetree.cc b/src/parsetree.cc index dfbd8bab..52b61776 100644 --- a/src/parsetree.cc +++ b/src/parsetree.cc @@ -41,9 +41,13 @@ string TypeRef::stringify() { string s; switch ( type ) { - case Unspecified: - s = "unspecified"; + case Unspecified: { + if ( uniqueType->typeId == TYPE_INT ) + s = "int"; + else + s = "unspecified"; break; + } case Name: s = typeName; break; @@ -53,24 +57,24 @@ string TypeRef::stringify() case Iterator: s = "iterator"; break; - case List: - s = "list"; - break; +// case List: +// s = "list"; +// break; case ValueList: s = "vlist"; break; - case ListEl: - s = "listel"; - break; - case Map: - s = "map"; - break; +// case ListEl: +// s = "listel"; +// break; +// case Map: +// s = "map"; +// break; case ValueMap: s = "vmap"; break; - case MapEl: - s = "mapel"; - break; +// case MapEl: +// s = "mapel"; +// break; case Parser: s = "parser"; break; diff --git a/src/parsetree.h b/src/parsetree.h index 718f2dc3..fec20ffc 100644 --- a/src/parsetree.h +++ b/src/parsetree.h @@ -554,13 +554,15 @@ struct StructDef loc(loc), name(name), objectDef(objectDef), - structEl(0) + structEl(0), + listEl(false) {} InputLoc loc; String name; ObjectDef *objectDef; StructEl *structEl; + bool listEl; StructDef *prev, *next; }; @@ -568,11 +570,17 @@ struct StructDef struct StructEl { StructEl( const String &name, StructDef *structDef ) - : name(name), structDef(structDef), id(-1) {} + : + name(name), + structDef(structDef), + id(-1), + listEl(false) + {} String name; StructDef *structDef; int id; + bool listEl; StructEl *prev, *next; }; @@ -1990,10 +1998,8 @@ struct TypeRef Name, Literal, Iterator, - List, ValueList, ListEl, - Map, ValueMap, MapEl, Parser, @@ -2688,7 +2694,7 @@ struct LangVarRef void assignValue( Compiler *pd, CodeVect &code, UniqueType *exprUT ) const; - IterImpl *chooseTriterCall( Compiler *pd, CallArgVect *args ); + IterImpl *chooseTriterCall( Compiler *pd, UniqueType *searchUT, CallArgVect *args ); /* The deref generics value is for iterator calls with lists and maps as args. */ ObjectField **evaluateArgs( Compiler *pd, CodeVect &code, diff --git a/src/resolve.cc b/src/resolve.cc index 90a35b60..7dd69b31 100644 --- a/src/resolve.cc +++ b/src/resolve.cc @@ -114,6 +114,7 @@ UniqueType *TypeRef::resolveTypeLiteral( Compiler *pd ) return 0; } +#if 0 UniqueType *TypeRef::resolveTypeList( Compiler *pd ) { nspace = pd->rootNamespace; @@ -161,6 +162,7 @@ UniqueType *TypeRef::resolveTypeList( Compiler *pd ) generic = inMap->generic; return pd->findUniqueType( TYPE_GENERIC, inMap->generic ); } +#endif UniqueType *TypeRef::resolveTypeListEl( Compiler *pd ) { @@ -188,6 +190,7 @@ UniqueType *TypeRef::resolveTypeListEl( Compiler *pd ) return pd->findUniqueType( TYPE_GENERIC, inMap->generic ); } +#if 0 UniqueType *TypeRef::resolveTypeMap( Compiler *pd ) { nspace = pd->rootNamespace; @@ -233,6 +236,7 @@ UniqueType *TypeRef::resolveTypeMap( Compiler *pd ) generic = inMap->generic; return pd->findUniqueType( TYPE_GENERIC, inMap->generic ); } +#endif UniqueType *TypeRef::resolveTypeMapEl( Compiler *pd ) { @@ -474,15 +478,15 @@ UniqueType *TypeRef::resolveType( Compiler *pd ) case Literal: uniqueType = resolveTypeLiteral( pd ); break; - case List: - uniqueType = resolveTypeList( pd ); - break; +// case List: +// uniqueType = resolveTypeList( pd ); +// break; case ListEl: uniqueType = resolveTypeListEl( pd ); break; - case Map: - uniqueType = resolveTypeMap( pd ); - break; +// case Map: +// uniqueType = resolveTypeMap( pd ); +// break; case MapEl: uniqueType = resolveTypeMapEl( pd ); break; diff --git a/src/synthesis.cc b/src/synthesis.cc index 402b9dd1..dccfe333 100644 --- a/src/synthesis.cc +++ b/src/synthesis.cc @@ -826,7 +826,8 @@ ObjectField *LangVarRef::evaluateRef( Compiler *pd, CodeVect &code, long pushCou return lookup.objField; } -IterImpl *LangVarRef::chooseTriterCall( Compiler *pd, CallArgVect *args ) +IterImpl *LangVarRef::chooseTriterCall( Compiler *pd, + UniqueType *searchUT, CallArgVect *args ) { IterImpl *iterImpl = 0; @@ -840,8 +841,12 @@ IterImpl *LangVarRef::chooseTriterCall( Compiler *pd, CallArgVect *args ) if ( exprUT->typeId == TYPE_GENERIC && exprUT->generic->typeId == GEN_LIST ) iterImpl = new IterImpl( IterImpl::List ); - if ( exprUT->typeId == TYPE_GENERIC && exprUT->generic->typeId == GEN_VLIST ) - iterImpl = new IterImpl( IterImpl::ValueList ); + if ( exprUT->typeId == TYPE_GENERIC && exprUT->generic->typeId == GEN_VLIST ) { + if ( searchUT->structEl != 0 && searchUT->structEl->listEl ) + iterImpl = new IterImpl( IterImpl::List ); + else + iterImpl = new IterImpl( IterImpl::ValueList ); + } if ( exprUT->typeId == TYPE_GENERIC && exprUT->generic->typeId == GEN_MAP ) iterImpl = new IterImpl( IterImpl::Map ); @@ -2267,7 +2272,6 @@ void LangStmt::compileForIter( Compiler *pd, CodeVect &code ) const /* The type we are searching for. */ UniqueType *searchUT = typeRef->uniqueType; - /* Lookup the iterator call. Make sure it is an iterator. */ VarRefLookup lookup = iterCall->langTerm->varRef->lookupMethod( pd ); if ( lookup.objMethod->iterDef == 0 ) { @@ -2294,7 +2298,7 @@ void LangStmt::compileForIter( Compiler *pd, CodeVect &code ) const switch ( iterUT->iterDef->type ) { case IterDef::Tree: iterImpl = iterCall->langTerm->varRef->chooseTriterCall( pd, - iterCall->langTerm->args ); + searchUT, iterCall->langTerm->args ); break; case IterDef::Child: iterImpl = new IterImpl( IterImpl::Child ); diff --git a/test/binary1.lm b/test/binary1.lm index 13dba232..e2cb4a09 100644 --- a/test/binary1.lm +++ b/test/binary1.lm @@ -116,7 +116,7 @@ def count # end # -CL: vlist<int> +CL: list<int> int start_list( count: int ) { @@ -442,7 +442,7 @@ int print_RR_A( s: start ) } alias name_map - vmap<int, name> + map<int, name> int print_name( n: name, m: name_map ) { @@ -490,19 +490,19 @@ int print_all_names( s: start ) end # binary Binary: binary = new binary() -Binary->CL = new vlist<int>() +Binary->CL = new list<int>() -int top( L: vlist<int> ) +int top( L: list<int> ) { return L->top } -int pop( L: vlist<int> ) +int pop( L: list<int> ) { return L->pop() } -int push( L: vlist<int>, Int: int ) +int push( L: list<int>, Int: int ) { L->push( Int ) } diff --git a/test/generate1.lm b/test/generate1.lm index e7936a6f..2ea4c77f 100644 --- a/test/generate1.lm +++ b/test/generate1.lm @@ -3,7 +3,7 @@ context generate rl ident_char /[a-zA-Z_]/ # List used as a stack of indentations. - IndentStack: vlist<int> + IndentStack: list<int> # Has a newline been sent for this '\n' .. whitespace match. newline_sent: int @@ -562,7 +562,7 @@ int print_primary_subscriptions_and_slicings( Start: generate::start ) Generate: generate = new generate() # List used as a stack of indentations. -Generate->IndentStack = new vlist<int>() +Generate->IndentStack = new list<int>() Generate->IndentStack->push( 0 ) # Has a newline been sent for this '\n' .. whitespace match. diff --git a/test/generate2.lm b/test/generate2.lm index 32260003..7a2e0f71 100644 --- a/test/generate2.lm +++ b/test/generate2.lm @@ -12,7 +12,7 @@ context generate return OI } - OpenStack: vlist<open_item> + OpenStack: list<open_item> lex token stray_close // @@ -200,7 +200,7 @@ end # generate Generate: generate = new generate() -Generate->OpenStack = new vlist<generate::open_item>() +Generate->OpenStack = new list<generate::open_item>() Sentinal: generate::open_item = new_open_item( '** SENTINAL **', 1 ) Generate->OpenStack->push( Sentinal ) diff --git a/test/list1.lm b/test/list1.lm index b51e0fe1..e3c0519b 100644 --- a/test/list1.lm +++ b/test/list1.lm @@ -21,7 +21,7 @@ struct start_el B3: start end -L: vlist<start_el> = new vlist<start_el>() +L: list<start_el> = new list<start_el>() E: start_el = new start_el() E->S = S diff --git a/test/list2.lm b/test/list2.lm index 761012f3..f5c7654b 100644 --- a/test/list2.lm +++ b/test/list2.lm @@ -1,5 +1,5 @@ -new M: vmap<str, str>() +new M: map<str, str>() for AE: argv_el in argv { print "[AE->value] diff --git a/test/list3.lm b/test/list3.lm index fd477595..4284fd95 100644 --- a/test/list3.lm +++ b/test/list3.lm @@ -1,6 +1,6 @@ -new L: vlist<str>() +new L: list<str>() L->push_tail( "dear" ) L->push_tail( "friend" ) diff --git a/test/list4.lm b/test/list4.lm index a7cb9dbb..64eff726 100644 --- a/test/list4.lm +++ b/test/list4.lm @@ -1,5 +1,5 @@ -new L: vlist<str>() +new L: list<str>() L->push_tail( "dear" ) L->push_tail( "friend" ) diff --git a/test/lookup1.lm b/test/lookup1.lm index eac83f77..18c2b01f 100644 --- a/test/lookup1.lm +++ b/test/lookup1.lm @@ -1,19 +1,19 @@ context lookup alias list_lang_object - vlist<lang_object> + list<lang_object> alias list_declaration_data - vlist<declaration_data> + list<declaration_data> alias list_declarator_data - vlist<declarator_data> + list<declarator_data> alias list_int - vlist<int> + list<int> alias map_list_lang_object - vmap<str, list_lang_object> + map<str, list_lang_object> # # Data types for global data. diff --git a/test/map1.lm b/test/map1.lm index 205ab8fc..8d3b111b 100644 --- a/test/map1.lm +++ b/test/map1.lm @@ -1,5 +1,5 @@ -new M: vmap<str, str>() +new M: map<str, str>() AE: argv_el = argv->head while AE { diff --git a/test/map2.lm b/test/map2.lm index a381fefe..8fec8c83 100644 --- a/test/map2.lm +++ b/test/map2.lm @@ -1,4 +1,4 @@ -new M: vmap<str, str>() +new M: map<str, str>() M->insert( "hello", "friend" ) M->insert( "one--", "num1" ) diff --git a/test/map3.lm b/test/map3.lm index 15c2023c..ca6ff3d4 100644 --- a/test/map3.lm +++ b/test/map3.lm @@ -1,5 +1,5 @@ -new M: vmap<str, int>() +new M: map<str, int>() M->insert( "one--", 1 ) M->insert( "two--", 2 ) diff --git a/test/map4.lm b/test/map4.lm index d057ed6c..0327b4d2 100644 --- a/test/map4.lm +++ b/test/map4.lm @@ -1,5 +1,5 @@ -new M: vmap<int, str>() +new M: map<int, str>() M->insert( 0, "hello" ) M->insert( 1, "one" ) diff --git a/test/map5.lm b/test/map5.lm index d3ad99b5..fd26aa72 100644 --- a/test/map5.lm +++ b/test/map5.lm @@ -1,5 +1,5 @@ -new StrMap: vmap<str, str>() +new StrMap: map<str, str>() StrMap->insert( "hello ", "there" ) StrMap->insert( "friend", "how" ) StrMap->insert( "are ", "you" ) diff --git a/test/undolist1.lm b/test/undolist1.lm index c9760eb0..8ee9310a 100644 --- a/test/undolist1.lm +++ b/test/undolist1.lm @@ -7,7 +7,7 @@ context undo token id /[a-zA-Z_]+/ end - List: vlist<item> + List: list<item> def item [id] @@ -34,7 +34,7 @@ context undo end Undo: undo = new undo() -Undo->List = new vlist<undo::item>() +Undo->List = new list<undo::item>() parse Input: undo::start(Undo)[ stdin ] print( Input ) diff --git a/test/undomap1.lm b/test/undomap1.lm index 1b1544c5..e1974400 100644 --- a/test/undomap1.lm +++ b/test/undomap1.lm @@ -7,7 +7,7 @@ context undo token id /[a-zA-Z_]+/ end - Map: vmap<item, item> + Map: map<item, item> def item [id] @@ -33,7 +33,7 @@ context undo end Undo: undo = new undo() -Undo->Map = new vmap<undo::item, undo::item>() +Undo->Map = new map<undo::item, undo::item>() parse Input: undo::start(Undo)[ stdin ] print( Input ) diff --git a/test/undomap2.lm b/test/undomap2.lm index b853e235..a260655c 100644 --- a/test/undomap2.lm +++ b/test/undomap2.lm @@ -7,7 +7,7 @@ context undo token id /[a-zA-Z_]+/ end - Map: vmap<item, item> + Map: map<item, item> def item [id] @@ -39,7 +39,7 @@ context undo end Undo: undo = new undo() -Undo->Map = new vmap<undo::item, undo::item>() +Undo->Map = new map<undo::item, undo::item>() cons I: undo::item "a" Undo->Map->insert( I, I ) |