//program2.cd //Name: Cengiz GOK //Account name: cgok //Original program written by Binoy Samuel //rewritten by Cengiz GOK in a more adaptive way for demjava 12/04/97 BusRoute = "BusRoute:" RouteName "total" "route" "length" ":" RouteLen "consisting" "of" "bus" "stops" ":" BusStop_List "with" "assigned" "busses" ":" Bus_List. BusStop = StopId "at:" RouteLoc // clockwise dist. from origin "with" "waiting" "list" ":" Person_List. Bus : NaturalGasBus | GasolineBus | DieselBus *common* BusId "at:" RouteLoc // clockwise dist. from origin [ "currently" "at" "stop" ":" StopId] "driver:"DriverName "capacity:" BusCapac "speed:" BusSpeed "carrying" "passenger(s)" ":" Person_List. NaturalGasBus = "*N*". GasolineBus="*G*". DieselBus="*D*". Person = PersonId "destination:" StopId. // id of the dest. stop BusStop_List ~ "(" { BusStop } ")". Bus_List ~ "(" { Bus } ")". Person_List ~ "(" { Person } ")". RouteName = String. DriverName= String. RouteLen = Integer "ft". RouteLoc = Integer "ft". BusCapac = Integer "passengers". BusSpeed = Integer "ft/min". StopId = Ident. BusId = Ident. PersonId = Ident. Main =.