import java.util.*; import java.io.*; BrokerSim = MarketList AccountList OperationList . MarketList = List(Investment) . OperationList = List(Operation) . Operation : Quit | Report | Buy | Sell *common* OpCode Description. OpCode = int . Report : MarketReport | AccountReport . MarketReport = "DisplayMarketReport". AccountReport = "DisplayAccountReport". Buy = "PurchaseInvestment". Sell = "SellInvestment". Quit = "Quit". AccountList = List(Account) . Account = "Username:" UserName "Password:" Password "$" Cash ["[" Portfolio "]"] . UserName = Ident . Password = Ident . Cash = float . Portfolio = List(Investment) . Investment = "*" TickerSymbol "$" UnitValue "#" Shares [ Description] . TickerSymbol = Ident . UnitValue = float . Shares = int . Description = String . List(S) ~ "(" { S } ")". Main = .