summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@complang.org>2015-01-24 10:12:48 -0500
committerAdrian Thurston <thurston@complang.org>2015-01-24 10:12:48 -0500
commitaf9614513235a310590747bd0f39435c54816beb (patch)
treec5c9ca899d06f69026c3e5c04d1d0d54a45af85a /test
parent6ed9cc38ede29690539e8da3d2c161ce82a77b07 (diff)
downloadcolm-af9614513235a310590747bd0f39435c54816beb.tar.gz
mandatory arg list for new
Diffstat (limited to 'test')
-rw-r--r--test/accum1.lm2
-rw-r--r--test/accum2.lm4
-rw-r--r--test/accum3.lm2
-rw-r--r--test/accumbt1.lm2
-rw-r--r--test/accumbt2.lm4
-rw-r--r--test/accumbt3.lm4
-rw-r--r--test/argv2.lm2
-rw-r--r--test/binary1.lm12
-rw-r--r--test/btscan2.lm2
-rw-r--r--test/concat1.lm2
-rw-r--r--test/concat2.lm2
-rw-r--r--test/context1.lm2
-rw-r--r--test/context2.lm2
-rw-r--r--test/context3.lm2
-rw-r--r--test/counting1.lm2
-rw-r--r--test/counting3.lm2
-rw-r--r--test/counting4.lm2
-rw-r--r--test/generate1.lm8
-rw-r--r--test/generate2.lm6
-rw-r--r--test/heredoc.lm2
-rw-r--r--test/ignore2.lm2
-rw-r--r--test/list1.lm6
-rw-r--r--test/lookup1.lm110
-rw-r--r--test/maxlen.lm2
-rw-r--r--test/order1.lm2
-rw-r--r--test/order2.lm2
-rw-r--r--test/pointer1.lm4
-rw-r--r--test/print1.lm4
-rw-r--r--test/ref3.lm4
-rw-r--r--test/reor2.lm2
-rw-r--r--test/rubyhere.lm2
-rw-r--r--test/send1.lm4
-rw-r--r--test/struct1.lm2
-rw-r--r--test/superid.lm2
-rw-r--r--test/tags1.lm2
-rw-r--r--test/tags3.lm2
-rw-r--r--test/tags4.lm2
-rw-r--r--test/translate2.lm2
-rw-r--r--test/undofrag1.lm4
-rw-r--r--test/undofrag2.lm4
-rw-r--r--test/undofrag3.lm4
-rw-r--r--test/undolist1.lm8
-rw-r--r--test/undomap1.lm8
-rw-r--r--test/undomap2.lm10
-rw-r--r--test/void1.lm2
45 files changed, 131 insertions, 131 deletions
diff --git a/test/accum1.lm b/test/accum1.lm
index aa4e3cc0..852a10c4 100644
--- a/test/accum1.lm
+++ b/test/accum1.lm
@@ -13,7 +13,7 @@ def start
parse Input: start[ stdin ]
-Output: parser<start> = new parser<start>
+Output: parser<start> = new parser<start>()
for Id: id in Input {
send Output
diff --git a/test/accum2.lm b/test/accum2.lm
index bf2f56ab..0d483c58 100644
--- a/test/accum2.lm
+++ b/test/accum2.lm
@@ -26,8 +26,8 @@ def start
end # ctx
-SP: parser<ctx::start> = new parser<ctx::start>
-SP->ctx = new ctx
+SP: parser<ctx::start> = new parser<ctx::start>()
+SP->ctx = new ctx()
send SP [stdin]
Input: ctx::start = SP->finish()
print( Input )
diff --git a/test/accum3.lm b/test/accum3.lm
index 86225859..45d664ec 100644
--- a/test/accum3.lm
+++ b/test/accum3.lm
@@ -19,7 +19,7 @@ def item
def args
[item*]
-ArgParser: parser<args> = new parser<args>
+ArgParser: parser<args> = new parser<args>()
A: argv_el = argv->head
while ( A ) {
diff --git a/test/accumbt1.lm b/test/accumbt1.lm
index 6f10058a..8f63596c 100644
--- a/test/accumbt1.lm
+++ b/test/accumbt1.lm
@@ -21,7 +21,7 @@ def choice2
def start
[prefix choice1 choice2 string id id]
-I: parser<start> = new parser<start>
+I: parser<start> = new parser<start>()
send I " id "
send I " 77 "
diff --git a/test/accumbt2.lm b/test/accumbt2.lm
index b730eebe..3431f78b 100644
--- a/test/accumbt2.lm
+++ b/test/accumbt2.lm
@@ -35,8 +35,8 @@ end
end # accum_bt
-AccumBt: accum_bt = new accum_bt
-AccumBt->OneParser = new parser<accum_bt::one>
+AccumBt: accum_bt = new accum_bt()
+AccumBt->OneParser = new parser<accum_bt::one>()
parse Two: accum_bt::two(AccumBt)[ stdin ]
diff --git a/test/accumbt3.lm b/test/accumbt3.lm
index 1c845278..61d9a22c 100644
--- a/test/accumbt3.lm
+++ b/test/accumbt3.lm
@@ -78,8 +78,8 @@ def two
end # accum_bt
-AccumBt: accum_bt = new accum_bt
-AccumBt->NestedParser = new parser<nested>
+AccumBt: accum_bt = new accum_bt()
+AccumBt->NestedParser = new parser<nested>()
parse Two: accum_bt::two(AccumBt)[ stdin ]
diff --git a/test/argv2.lm b/test/argv2.lm
index 93d24c3f..fdcaa714 100644
--- a/test/argv2.lm
+++ b/test/argv2.lm
@@ -37,7 +37,7 @@ def args
# The argument parser. Using an accumulator so we can send nulls after each
# arg.
-ArgParser: parser<args> = new parser<args>
+ArgParser: parser<args> = new parser<args>()
# Parse the args and extract the result into Args.
A: argv_el = argv->head
diff --git a/test/binary1.lm b/test/binary1.lm
index d84790c6..c9819158 100644
--- a/test/binary1.lm
+++ b/test/binary1.lm
@@ -126,7 +126,7 @@ CL: list<int_el>
int start_list( count: int )
{
- IntEl: int_el = new int_el
+ IntEl: int_el = new int_el()
IntEl->Int = count
CL->push( IntEl )
}
@@ -474,7 +474,7 @@ int print_name( n: name m: map<int name_map_el> )
int print_all_names( s: start )
{
for M: message in s {
- m: map<int name_map_el> = new map<int name_map_el>
+ m: map<int name_map_el> = new map<int name_map_el>()
O: octet = octet in M
@@ -485,7 +485,7 @@ int print_all_names( s: start )
if match NP [L: octet nbytes name_part*] {
messageOffset: int = L.pos - O.pos
construct n: name [NP E]
- El: name_map_el = new name_map_el
+ El: name_map_el = new name_map_el()
El->key = messageOffset
El->Name = n
m->insert( El )
@@ -502,8 +502,8 @@ int print_all_names( s: start )
end # binary
-Binary: binary = new binary
-Binary->CL = new list<binary::int_el>
+Binary: binary = new binary()
+Binary->CL = new list<binary::int_el>()
int top( L: list<binary::int_el> )
{
@@ -519,7 +519,7 @@ int pop( L: list<binary::int_el> )
int push( L: list<binary::int_el> Int: int )
{
- Top: binary::int_el = new binary::int_el
+ Top: binary::int_el = new binary::int_el()
Top->Int = Int
L->push( Top )
}
diff --git a/test/btscan2.lm b/test/btscan2.lm
index 27a819d5..c69748a4 100644
--- a/test/btscan2.lm
+++ b/test/btscan2.lm
@@ -28,7 +28,7 @@ def item
def btscan
[item*]
-Parser: parser<btscan> = new parser<btscan>
+Parser: parser<btscan> = new parser<btscan>()
send Parser "!ab"
send Parser "b "
diff --git a/test/concat1.lm b/test/concat1.lm
index ebd3c797..87083349 100644
--- a/test/concat1.lm
+++ b/test/concat1.lm
@@ -46,7 +46,7 @@ start parseStart( InputFile: stream )
start parseTxt( T: str )
{
- A: parser<start> = new parser<start>
+ A: parser<start> = new parser<start>()
send A [T] eos
return A->tree
}
diff --git a/test/concat2.lm b/test/concat2.lm
index 6ef6abeb..e97398fd 100644
--- a/test/concat2.lm
+++ b/test/concat2.lm
@@ -46,7 +46,7 @@ start parseStart( InputFile: stream )
start parseTxt( T: str )
{
- A: parser<start> = new parser<start>
+ A: parser<start> = new parser<start>()
send A [T] eos
return A->tree
}
diff --git a/test/context1.lm b/test/context1.lm
index 47ac3760..855a76fc 100644
--- a/test/context1.lm
+++ b/test/context1.lm
@@ -27,7 +27,7 @@ context ctx
[item*]
end # ctx
-CTX: ctx = new ctx
+CTX: ctx = new ctx()
parse Input: ctx::start( CTX ) [ stdin ]
print( Input )
diff --git a/test/context2.lm b/test/context2.lm
index cbc2302d..2c756e74 100644
--- a/test/context2.lm
+++ b/test/context2.lm
@@ -89,7 +89,7 @@ context ruby_here
end # ruby_here
-CTX: ruby_here = new ruby_here
+CTX: ruby_here = new ruby_here()
parse S: ruby_here::start( CTX ) [ stdin ]
print_xml(S)
diff --git a/test/context3.lm b/test/context3.lm
index 53c99622..031eca17 100644
--- a/test/context3.lm
+++ b/test/context3.lm
@@ -35,7 +35,7 @@ context ctx
end # ctx
-CTX: ctx = new ctx
+CTX: ctx = new ctx()
parse Input: ctx::start( CTX ) [stdin]
print( Input )
diff --git a/test/counting1.lm b/test/counting1.lm
index 95680c5c..b295474b 100644
--- a/test/counting1.lm
+++ b/test/counting1.lm
@@ -90,7 +90,7 @@ context counting
}
end # counting
-Counting: counting = new counting
+Counting: counting = new counting()
parse counting::start( Counting )[ stdin ]
##### IN #####
3 1 b c 1 1 0 3 a b c
diff --git a/test/counting3.lm b/test/counting3.lm
index 6436702d..c5f1e691 100644
--- a/test/counting3.lm
+++ b/test/counting3.lm
@@ -92,7 +92,7 @@ context counting
end # counting
-Counting: counting = new counting
+Counting: counting = new counting()
parse counting::start( Counting )[ stdin ]
##### IN #####
3 1 b c 1 1 0 3 a b c
diff --git a/test/counting4.lm b/test/counting4.lm
index 191cda8c..f79f8f92 100644
--- a/test/counting4.lm
+++ b/test/counting4.lm
@@ -87,7 +87,7 @@ context counting
}
end # counting
-Counting: counting = new counting
+Counting: counting = new counting()
parse counting::start( Counting )[stdin]
##### IN #####
3 1 b c 1 1 0 3 a b c
diff --git a/test/generate1.lm b/test/generate1.lm
index 54a342a4..b6a1a5b3 100644
--- a/test/generate1.lm
+++ b/test/generate1.lm
@@ -113,7 +113,7 @@ context generate
input->push( make_token( typeid<INDENT> '' ) )
# Push to the stack as per python manual.
- IntEl: int_el = new int_el
+ IntEl: int_el = new int_el()
IntEl->Int = data_length
IndentStack->push( IntEl )
} else {
@@ -565,11 +565,11 @@ int print_primary_subscriptions_and_slicings( Start: generate::start )
}
}
-Generate: generate = new generate
+Generate: generate = new generate()
# List used as a stack of indentations.
-Generate->IndentStack = new list<generate::int_el>
-IntEl: generate::int_el = new generate::int_el
+Generate->IndentStack = new list<generate::int_el>()
+IntEl: generate::int_el = new generate::int_el()
IntEl->Int = 0
Generate->IndentStack->push( IntEl )
diff --git a/test/generate2.lm b/test/generate2.lm
index 1637044a..d7827a5b 100644
--- a/test/generate2.lm
+++ b/test/generate2.lm
@@ -8,7 +8,7 @@ context generate
open_item new_open_item( type: str num: int )
{
- OI: open_item = new open_item
+ OI: open_item = new open_item()
OI->type = type
OI->num = num
return OI
@@ -200,9 +200,9 @@ context generate
end # generate
-Generate: generate = new generate
+Generate: generate = new generate()
-Generate->OpenStack = new list<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/heredoc.lm b/test/heredoc.lm
index 5c5bf880..e3463ede 100644
--- a/test/heredoc.lm
+++ b/test/heredoc.lm
@@ -42,7 +42,7 @@ context heredoc
[here_name here_data here_close id nl]
end # heredoc
-HereDoc: heredoc = new heredoc
+HereDoc: heredoc = new heredoc()
parse S: heredoc::start(HereDoc)[stdin]
print_xml(S)
diff --git a/test/ignore2.lm b/test/ignore2.lm
index 40f1843c..dfba6d31 100644
--- a/test/ignore2.lm
+++ b/test/ignore2.lm
@@ -13,7 +13,7 @@ def start
parse Input: start[ stdin ]
-Output: accum<start> = new accum<start>
+Output: accum<start> = new accum<start>()
for Id: id in Input {
send Output
diff --git a/test/list1.lm b/test/list1.lm
index b1c58055..90c75dbe 100644
--- a/test/list1.lm
+++ b/test/list1.lm
@@ -22,13 +22,13 @@ struct start_el
list_el el
end
-L: list<start_el> = new list<start_el>
+L: list<start_el> = new list<start_el>()
-E: start_el = new start_el
+E: start_el = new start_el()
E->S = S
L->push_head( E )
-E = new start_el
+E = new start_el()
E->S = S
L->push_head( E )
diff --git a/test/lookup1.lm b/test/lookup1.lm
index 38902582..d1cb0034 100644
--- a/test/lookup1.lm
+++ b/test/lookup1.lm
@@ -294,13 +294,13 @@ context lookup
lang_object createLangObject( typeId: int name: str lookupParent: lang_object )
{
- Obj: lang_object = new lang_object
+ Obj: lang_object = new lang_object()
Obj->typeId = typeId
Obj->name = name
Obj->typedefOf = nil
- Obj->objectMap = new map_list_lang_object
- Obj->inherited = new list_lang_object
+ Obj->objectMap = new map_list_lang_object()
+ Obj->inherited = new list_lang_object()
Obj->lookupParent = lookupParent
return Obj
@@ -312,12 +312,12 @@ context lookup
ol: map_list_lang_object_el = definedIn->objectMap->find( name )
if !ol {
# Element not in the map already
- ol = new map_list_lang_object_el
+ ol = new map_list_lang_object_el()
ol->key = name
- ol->List = new list_lang_object
+ ol->List = new list_lang_object()
definedIn->objectMap->insert( ol )
}
- E: list_lang_object_el = new list_lang_object_el
+ E: list_lang_object_el = new list_lang_object_el()
E->Obj = obj
ol->List->push_tail( E )
}
@@ -491,7 +491,7 @@ context lookup
def templ_arg_open
[`<]
{
- E: list_lang_object_el = new list_lang_object_el
+ E: list_lang_object_el = new list_lang_object_el()
E->Obj = nil
qualNs->push_tail( E )
}
@@ -535,7 +535,7 @@ context lookup
[]
{
# LOG print( 'opening new declaration_data with templDecl: ', templDecl.tail, '\n' )
- DD: declaration_data = new declaration_data
+ DD: declaration_data = new declaration_data()
DD->isTypedef = 0
DD->isFriend = 0
DD->isTemplate = 0
@@ -543,7 +543,7 @@ context lookup
# Transfer the template flag and reset it.
declarationData->tail->isTemplate = templDecl->tail->Int
- IntEl: list_int_el = new list_int_el
+ IntEl: list_int_el = new list_int_el()
IntEl->Int = 0
templDecl->push_tail( IntEl )
}
@@ -1150,11 +1150,11 @@ context lookup
[]
{
newCompound: lang_object = createLangObject( 0 '<compound_begin>' lookupNs->tail->Obj )
- E1: list_lang_object_el = new list_lang_object_el
+ E1: list_lang_object_el = new list_lang_object_el()
E1->Obj = newCompound
lookupNs->push_tail( E1 )
- E2: list_lang_object_el = new list_lang_object_el
+ E2: list_lang_object_el = new list_lang_object_el()
E2->Obj = newCompound
declNs->push_tail( E2 )
# LOG print( 'opening <compound>\n' )
@@ -1319,7 +1319,7 @@ context lookup
}
- DD: declarator_data = new declarator_data
+ DD: declarator_data = new declarator_data()
DD->qualObj = qualObj
DD->pdcScope = nil
DD->lookupObj = lookupNs->tail->Obj
@@ -1330,7 +1330,7 @@ context lookup
# stack. Also save it in the declarator data so it can be passed to a
# function body if needed.
if qualObj {
- E: list_lang_object_el = new list_lang_object_el
+ E: list_lang_object_el = new list_lang_object_el()
E->Obj = qualObj
lookupNs->push_tail( E )
declaratorData->tail->lookupObj = qualObj
@@ -1424,7 +1424,7 @@ context lookup
[]
{
# Make scope for declarator.
- DD: declarator_data = new declarator_data
+ DD: declarator_data = new declarator_data()
declaratorData->push_tail( DD )
}
@@ -1455,11 +1455,11 @@ context lookup
# We are going to need a scope for the declarator.
pdcScope: lang_object = createLangObject( 0 '<pdc_scope>' lookupNs->tail->Obj )
- E1: list_lang_object_el = new list_lang_object_el
+ E1: list_lang_object_el = new list_lang_object_el()
E1->Obj = pdcScope
lookupNs->push_tail( E1 )
- E2: list_lang_object_el = new list_lang_object_el
+ E2: list_lang_object_el = new list_lang_object_el()
E2->Obj = pdcScope
declNs->push_tail( E2 )
@@ -1527,7 +1527,7 @@ context lookup
# The lookupObj from the declarator is the deepest lookup object found
# while parsing the declarator. Make it visible in the function body.
# This could be the args, the qualObj, or the parent to the function.
- E: list_lang_object_el = new list_lang_object_el
+ E: list_lang_object_el = new list_lang_object_el()
E->Obj = r1.lookupObj
lookupNs->push_tail( E )
}
@@ -1548,15 +1548,15 @@ context lookup
newFunctionBody: lang_object = createLangObject( 0
'<function_body_begin>' lookupNs->tail->Obj )
- E1: list_lang_object_el = new list_lang_object_el
+ E1: list_lang_object_el = new list_lang_object_el()
E1->Obj = newFunctionBody
lookupNs->push_tail( E1 )
- E2: list_lang_object_el = new list_lang_object_el
+ E2: list_lang_object_el = new list_lang_object_el()
E2->Obj = newFunctionBody
declNs->push_tail( E2 )
- IntEl: list_int_el = new list_int_el
+ IntEl: list_int_el = new list_int_el()
IntEl->Int = 0
templDecl->push_tail( IntEl )
# LOG print( 'opening <function_body>\n' )
@@ -1614,11 +1614,11 @@ context lookup
newClass: lang_object = createLangObject( nsType
'<anon_class>' lookupNs->tail->Obj )
- E1: list_lang_object_el = new list_lang_object_el
+ E1: list_lang_object_el = new list_lang_object_el()
E1->Obj = newClass
lookupNs->push_tail( E1 )
- E2: list_lang_object_el = new list_lang_object_el
+ E2: list_lang_object_el = new list_lang_object_el()
E2->Obj = newClass
declNs->push_tail( E2 )
}
@@ -1654,11 +1654,11 @@ context lookup
}
# Push the found/new class.
- E1: list_lang_object_el = new list_lang_object_el
+ E1: list_lang_object_el = new list_lang_object_el()
E1->Obj = declaredClass
lookupNs->push_tail( E1 )
- E2: list_lang_object_el = new list_lang_object_el
+ E2: list_lang_object_el = new list_lang_object_el()
E2->Obj = declaredClass
declNs->push_tail( E2 )
}
@@ -1686,11 +1686,11 @@ context lookup
}
# Push the found/new class.
- E1: list_lang_object_el = new list_lang_object_el
+ E1: list_lang_object_el = new list_lang_object_el()
E1->Obj = declaredClass
lookupNs->push_tail( E1 )
- E2: list_lang_object_el = new list_lang_object_el
+ E2: list_lang_object_el = new list_lang_object_el()
E2->Obj = declaredClass
declNs->push_tail( E2 )
}
@@ -1820,7 +1820,7 @@ context lookup
usingObject: lang_object = Id.obj
inObject: lang_object = declNs->tail->Obj
if usingObject != inObject {
- E: list_lang_object_el = new list_lang_object_el
+ E: list_lang_object_el = new list_lang_object_el()
E->Obj = usingObject
inObject->inherited->push_tail( E )
}
@@ -1848,7 +1848,7 @@ context lookup
if inheritedObject->typeId == TypedefType
inheritedObject = inheritedObject->typedefOf
- E: list_lang_object_el = new list_lang_object_el
+ E: list_lang_object_el = new list_lang_object_el()
E->Obj = inheritedObject
inObject->inherited->push_tail( E )
}
@@ -1975,14 +1975,14 @@ context lookup
def template_declaration_params
[`template `< tpl_start template_parameter_list `>]
{
- IntEl: list_int_el = new list_int_el
+ IntEl: list_int_el = new list_int_el()
IntEl->Int = 1
templDecl->push_tail( IntEl )
}
| [`export `template `< tpl_start template_parameter_list `>]
{
- IntEl: list_int_el = new list_int_el
+ IntEl: list_int_el = new list_int_el()
IntEl->Int = 1
templDecl->push_tail( IntEl )
}
@@ -1994,7 +1994,7 @@ context lookup
newTemplateParamScope: lang_object =
createLangObject( 0 '<tpl_start>' lookupNs->tail->Obj )
- E: list_lang_object_el = new list_lang_object_el
+ E: list_lang_object_el = new list_lang_object_el()
E->Obj = newTemplateParamScope
templateParamNs->push_tail( E )
}
@@ -2126,15 +2126,15 @@ context lookup
insertObject( curNamespace->tail->Obj Id.data nspace )
# Push the namespace
- E1: list_lang_object_el = new list_lang_object_el
+ E1: list_lang_object_el = new list_lang_object_el()
E1->Obj = nspace
curNamespace->push_tail( E1 )
- E2: list_lang_object_el = new list_lang_object_el
+ E2: list_lang_object_el = new list_lang_object_el()
E2->Obj = nspace
declNs->push_tail( E2 )
- E3: list_lang_object_el = new list_lang_object_el
+ E3: list_lang_object_el = new list_lang_object_el()
E3->Obj = nspace
lookupNs->push_tail( E3 )
@@ -2164,15 +2164,15 @@ context lookup
nspace: lang_object = Id.obj
# Push the namespace
- E1: list_lang_object_el = new list_lang_object_el
+ E1: list_lang_object_el = new list_lang_object_el()
E1->Obj = nspace
curNamespace->push_tail( E1 )
- E2: list_lang_object_el = new list_lang_object_el
+ E2: list_lang_object_el = new list_lang_object_el()
E2->Obj = nspace
declNs->push_tail( E2 )
- E3: list_lang_object_el = new list_lang_object_el
+ E3: list_lang_object_el = new list_lang_object_el()
E3->Obj = nspace
lookupNs->push_tail( E3 )
@@ -2192,15 +2192,15 @@ context lookup
lookupNs->tail->Obj )
# Push the namespace
- E1: list_lang_object_el = new list_lang_object_el
+ E1: list_lang_object_el = new list_lang_object_el()
E1->Obj = nspace
curNamespace->push_tail( E1 )
- E2: list_lang_object_el = new list_lang_object_el
+ E2: list_lang_object_el = new list_lang_object_el()
E2->Obj = nspace
declNs->push_tail( E2 )
- E3: list_lang_object_el = new list_lang_object_el
+ E3: list_lang_object_el = new list_lang_object_el()
E3->Obj = nspace
lookupNs->push_tail( E3 )
@@ -2290,7 +2290,7 @@ end # lookup
# Global data declarations
#
-Lookup: lookup = new lookup
+Lookup: lookup = new lookup()
# Constants for language object types.
Lookup->NamespaceType = typeid<lookup::namespace_id>
@@ -2303,45 +2303,45 @@ Lookup->TemplateIdType = typeid<lookup::template_id>
# Object stacks.
-Lookup->curNamespace = new lookup::list_lang_object
-Lookup->declNs = new lookup::list_lang_object
-Lookup->lookupNs = new lookup::list_lang_object
-Lookup->qualNs = new lookup::list_lang_object
-Lookup->templateParamNs = new lookup::list_lang_object
+Lookup->curNamespace = new lookup::list_lang_object()
+Lookup->declNs = new lookup::list_lang_object()
+Lookup->lookupNs = new lookup::list_lang_object()
+Lookup->qualNs = new lookup::list_lang_object()
+Lookup->templateParamNs = new lookup::list_lang_object()
# Declaration, declarator data.
-Lookup->declarationData = new lookup::list_declaration_data
-Lookup->declaratorData = new lookup::list_declarator_data
+Lookup->declarationData = new lookup::list_declaration_data()
+Lookup->declaratorData = new lookup::list_declarator_data()
# Template declarations
-Lookup->templDecl = new lookup::list_int
+Lookup->templDecl = new lookup::list_int()
# Root namespace object
Lookup->rootNamespace = createLangObject( Lookup->NamespaceType '<root_namespace>' nil )
# Initialize the namespace and declaration stacks with the root namespace
-E1: lookup::list_lang_object_el = new lookup::list_lang_object_el
+E1: lookup::list_lang_object_el = new lookup::list_lang_object_el()
E1->Obj = Lookup->rootNamespace
Lookup->curNamespace->push_tail( E1 )
-E2: lookup::list_lang_object_el = new lookup::list_lang_object_el
+E2: lookup::list_lang_object_el = new lookup::list_lang_object_el()
E2->Obj = Lookup->rootNamespace
Lookup->declNs->push_tail( E2 )
-E3: lookup::list_lang_object_el = new lookup::list_lang_object_el
+E3: lookup::list_lang_object_el = new lookup::list_lang_object_el()
E3->Obj = Lookup->rootNamespace
Lookup->lookupNs->push_tail( E3 )
# Start with no qualification (note variables are initialized to zero)
-E4: lookup::list_lang_object_el = new lookup::list_lang_object_el
+E4: lookup::list_lang_object_el = new lookup::list_lang_object_el()
E4->Obj = nil
Lookup->qualNs->push_tail( E4 )
-IntEl: lookup::list_int_el = new lookup::list_int_el
+IntEl: lookup::list_int_el = new lookup::list_int_el()
IntEl->Int = 0
Lookup->templDecl->push_tail( IntEl )
-DD: lookup::declaration_data = new lookup::declaration_data
+DD: lookup::declaration_data = new lookup::declaration_data()
DD->isTypedef = 0
DD->isFriend = 0
DD->isTemplate = 0
diff --git a/test/maxlen.lm b/test/maxlen.lm
index 2f92879f..827303eb 100644
--- a/test/maxlen.lm
+++ b/test/maxlen.lm
@@ -44,7 +44,7 @@ context maxlen
[restricted_list id*]
end # maxlen
-MaxLen: maxlen = new maxlen
+MaxLen: maxlen = new maxlen()
MaxLen->allow = 3
parse S: maxlen::start(MaxLen)[stdin]
diff --git a/test/order1.lm b/test/order1.lm
index 1f0d0f33..29881e28 100644
--- a/test/order1.lm
+++ b/test/order1.lm
@@ -80,7 +80,7 @@ def port
# Parse the input.
parse P: program[ stdin ]
-Output: parser<c> = new parser<c>
+Output: parser<c> = new parser<c>()
# Take off the leading C from the input file and send it out.
match P [C: c `%% protocol*]
diff --git a/test/order2.lm b/test/order2.lm
index 2fbde674..3eee1a7c 100644
--- a/test/order2.lm
+++ b/test/order2.lm
@@ -82,7 +82,7 @@ def port
# Parse the input.
parse P: program[ stdin ]
-Output: parser<c> = new parser<c>
+Output: parser<c> = new parser<c>()
# Take off the leading C from the input file and send it out.
match P [C: c '%%' protocol*]
diff --git a/test/pointer1.lm b/test/pointer1.lm
index 38677bd2..dc1f198c 100644
--- a/test/pointer1.lm
+++ b/test/pointer1.lm
@@ -21,11 +21,11 @@ struct undo
end
-Undo: undo = new undo
+Undo: undo = new undo()
parse Input: undo::start(Undo)[ stdin ]
-Input.Foo = new undo::foo
+Input.Foo = new undo::foo()
Input.Foo->Start = Input
print( Input.Foo->Start )
###### IN ######
diff --git a/test/print1.lm b/test/print1.lm
index 2358bb10..c5f25f79 100644
--- a/test/print1.lm
+++ b/test/print1.lm
@@ -15,8 +15,8 @@ def item2
def start
[item*]
-StartParser1: parser<start> = new parser<start>
-StartParser2: parser<start> = new parser<start>
+StartParser1: parser<start> = new parser<start>()
+StartParser2: parser<start> = new parser<start>()
parse Item2: item2 "b
diff --git a/test/ref3.lm b/test/ref3.lm
index ff5706f2..ee805b4a 100644
--- a/test/ref3.lm
+++ b/test/ref3.lm
@@ -21,7 +21,7 @@ end
on_heap newHeap( S: start )
{
- OnHeap: on_heap = new on_heap
+ OnHeap: on_heap = new on_heap()
OnHeap->S = S
return OnHeap
}
@@ -38,7 +38,7 @@ print( S )
int main( S: start )
{
- OnHeap: on_heap = new on_heap
+ OnHeap: on_heap = new on_heap()
OnHeap->S = S
for Id: id in OnHeap->S
diff --git a/test/reor2.lm b/test/reor2.lm
index 2bb014bd..27d3f7e2 100644
--- a/test/reor2.lm
+++ b/test/reor2.lm
@@ -14,7 +14,7 @@ context undo
[item* `; NL]
end
-Undo: undo = new undo
+Undo: undo = new undo()
parse Input: undo::start( Undo )[ stdin ]
print( Input )
##### IN #####
diff --git a/test/rubyhere.lm b/test/rubyhere.lm
index 219bb0d5..09003b4a 100644
--- a/test/rubyhere.lm
+++ b/test/rubyhere.lm
@@ -87,7 +87,7 @@ context rubyhere
[item*]
end # rubyhere
-RubyHere: rubyhere = new rubyhere
+RubyHere: rubyhere = new rubyhere()
parse S: rubyhere::start(RubyHere)[ stdin ]
diff --git a/test/send1.lm b/test/send1.lm
index dc061cfc..a3293142 100644
--- a/test/send1.lm
+++ b/test/send1.lm
@@ -15,8 +15,8 @@ def item2
def start
[item*]
-StartParser1: parser<start> = new parser<start>
-StartParser2: parser<start> = new parser<start>
+StartParser1: parser<start> = new parser<start>()
+StartParser2: parser<start> = new parser<start>()
parse Item2: item2 "b
diff --git a/test/struct1.lm b/test/struct1.lm
index ca66e1f6..e8323ede 100644
--- a/test/struct1.lm
+++ b/test/struct1.lm
@@ -5,7 +5,7 @@ context foo
def d []
end
-Foo: foo = new foo
+Foo: foo = new foo()
Foo->Int = 1
Foo->D = construct foo::d[]
diff --git a/test/superid.lm b/test/superid.lm
index e5c81ad8..ba9383a4 100644
--- a/test/superid.lm
+++ b/test/superid.lm
@@ -59,7 +59,7 @@ context si
}
end # si
-SuperId: si = new si
+SuperId: si = new si()
parse S: si::start(SuperId)[stdin]
print_xml( S )
print( '\n' )
diff --git a/test/tags1.lm b/test/tags1.lm
index 3bc109c9..25b2fad6 100644
--- a/test/tags1.lm
+++ b/test/tags1.lm
@@ -82,7 +82,7 @@ context tags
}
end # tags
-Tags: tags = new tags
+Tags: tags = new tags()
Tags->TS = cons tags::tag_stack ["sentinal"]
parse tags::start(Tags)[stdin]
##### IN #####
diff --git a/test/tags3.lm b/test/tags3.lm
index 1841ff22..2a6a2aee 100644
--- a/test/tags3.lm
+++ b/test/tags3.lm
@@ -297,7 +297,7 @@ context tags
# }
end # tags
-Tags: tags = new tags
+Tags: tags = new tags()
Tags->TagStack = construct tags::tag_stack []
parse HTML_P: tags::start(Tags)[ stdin ]
diff --git a/test/tags4.lm b/test/tags4.lm
index 60dbab9b..b1d6b8e9 100644
--- a/test/tags4.lm
+++ b/test/tags4.lm
@@ -321,7 +321,7 @@ end # tags
# }
#}
-Tags: tags = new tags
+Tags: tags = new tags()
Tags->TagStack = construct tags::tag_stack []
parse HTML: tags::start(Tags)[ stdin ]
print( HTML )
diff --git a/test/translate2.lm b/test/translate2.lm
index b8158db9..49911e53 100644
--- a/test/translate2.lm
+++ b/test/translate2.lm
@@ -47,7 +47,7 @@ context ctx
end # ctx
-CTX: ctx = new ctx
+CTX: ctx = new ctx()
parse Input: ctx::start( CTX ) [ stdin ]
print( Input )
diff --git a/test/undofrag1.lm b/test/undofrag1.lm
index 9b013133..04242fb2 100644
--- a/test/undofrag1.lm
+++ b/test/undofrag1.lm
@@ -46,8 +46,8 @@ context ctx
end # ctx
-CTX: ctx = new ctx
-CTX->SP = new parser<start2>
+CTX: ctx = new ctx()
+CTX->SP = new parser<start2>()
send CTX->SP "a b{c}"
parse Input: ctx::start1( CTX )[stdin]
diff --git a/test/undofrag2.lm b/test/undofrag2.lm
index 23520e1d..33dd92cc 100644
--- a/test/undofrag2.lm
+++ b/test/undofrag2.lm
@@ -37,8 +37,8 @@ context undo
end # undo
-Undo: undo = new undo
-Undo->Out = new parser<undo::out>
+Undo: undo = new undo()
+Undo->Out = new parser<undo::out>()
parse Input: undo::start(Undo)[ stdin ]
print( Input )
diff --git a/test/undofrag3.lm b/test/undofrag3.lm
index da626cfc..89b6fcc1 100644
--- a/test/undofrag3.lm
+++ b/test/undofrag3.lm
@@ -43,8 +43,8 @@ context undo
end # undo
-Undo: undo = new undo
-Undo->Out = new parser<undo::out>
+Undo: undo = new undo()
+Undo->Out = new parser<undo::out>()
parse Input: undo::start(Undo)[ stdin ]
print( Input )
diff --git a/test/undolist1.lm b/test/undolist1.lm
index 3b6c89e2..7874ac0a 100644
--- a/test/undolist1.lm
+++ b/test/undolist1.lm
@@ -17,13 +17,13 @@ context undo
def item
[id]
{
- E: item_el = new item_el
+ E: item_el = new item_el()
E->Item = lhs
List->push_tail( E )
}
| [`( item* `)]
{
- E: item_el = new item_el
+ E: item_el = new item_el()
E->Item = lhs
List->push_tail( E )
}
@@ -44,8 +44,8 @@ context undo
end
-Undo: undo = new undo
-Undo->List = new list<undo::item_el>
+Undo: undo = new undo()
+Undo->List = new list<undo::item_el>()
parse Input: undo::start(Undo)[ stdin ]
print( Input )
diff --git a/test/undomap1.lm b/test/undomap1.lm
index 38eda4f6..b4f590be 100644
--- a/test/undomap1.lm
+++ b/test/undomap1.lm
@@ -16,13 +16,13 @@ context undo
def item
[id]
{
- E: item_el = new item_el
+ E: item_el = new item_el()
E->key = lhs
Map->insert( E )
}
| [`( item* `)]
{
- E: item_el = new item_el
+ E: item_el = new item_el()
E->key = lhs
Map->insert( E )
}
@@ -43,8 +43,8 @@ context undo
end
-Undo: undo = new undo
-Undo->Map = new map<undo::item undo::item_el>
+Undo: undo = new undo()
+Undo->Map = new map<undo::item undo::item_el>()
parse Input: undo::start(Undo)[ stdin ]
print( Input )
diff --git a/test/undomap2.lm b/test/undomap2.lm
index b6684f97..6c823299 100644
--- a/test/undomap2.lm
+++ b/test/undomap2.lm
@@ -16,13 +16,13 @@ context undo
def item
[id]
{
- E: item_el = new item_el
+ E: item_el = new item_el()
E->key = lhs
Map->insert( E )
}
| [`( item* `)]
{
- E: item_el = new item_el
+ E: item_el = new item_el()
E->key = lhs
Map->insert( E )
}
@@ -48,10 +48,10 @@ context undo
end
-Undo: undo = new undo
-Undo->Map = new map<undo::item undo::item_el>
+Undo: undo = new undo()
+Undo->Map = new map<undo::item undo::item_el>()
-E: undo::item_el = new undo::item_el
+E: undo::item_el = new undo::item_el()
E->key = cons undo::item "a"
Undo->Map->insert( E )
diff --git a/test/void1.lm b/test/void1.lm
index 0115bdff..ede542da 100644
--- a/test/void1.lm
+++ b/test/void1.lm
@@ -25,7 +25,7 @@ def g
global P: parser<g>
-P = new parser<g>
+P = new parser<g>()
void hello2()
{