From binoy@ccs.neu.edu Wed Sep 24 22:45:56 1997 Received: from default (meuslix.ccs.neu.edu [129.10.112.48]) by amber.ccs.neu.edu (8.8.6/8.7.3) with SMTP id WAA15268; Wed, 24 Sep 1997 22:45:53 -0400 (EDT) Message-ID: <3429CF90.2CAB@ccs.neu.edu> Date: Wed, 24 Sep 1997 22:42:24 -0400 From: Binoy Samuel X-Mailer: Mozilla 3.0 (Win95; I) MIME-Version: 1.0 To: Karl Lieberherr Subject: inlaws ?? Content-Type: multipart/mixed; boundary="------------6D691B297E2A" Status: R Content-Length: 1582 This is a multi-part message in MIME format. --------------6D691B297E2A Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi, I was trying the inlaws problem, but now I'm not very sure whether I understand how it can be done without join etc. Could you rephrase the strategy in plain english? I'm attaching my attempt... -binoy --------------6D691B297E2A Content-Type: text/plain; charset=us-ascii; name="inlaw.cd" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="inlaw.cd" //inlaw.cd Person = "[" "person" Ident ["spouse"Person] ["siblings"NList(Person)] "]". NList(S) ~ S{S}. Main=. --------------6D691B297E2A Content-Type: text/plain; charset=us-ascii; name="inlaw.beh" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="inlaw.beh" //inlaw.beh Main { (@ static public void main(String args[]) throws Exception { Person a = Person.parse(System.in); a.universal_trv0(new DisplayVisitor()); System.out.println(); System.out.println(" display done "); System.out.println("SUCCESS"); } @) } strategy x = { Person -> Person bypassing -> Person,siblings,* Person -> Person bypassing -> Person,spouse,* }. /* start#Person . ( - through -> *,spouse,* and bypassing {Person} to sp#Person . - through -> *,siblings,* and bypassing {Person} to inlaw#Person + - through -> *,siblings,* and bypassing {Person} to si#Person . - through -> *,spouse,* and bypassing {Person} to inlaw#Person ) */ --------------6D691B297E2A--