public static App ReadAppText(string inputString) { //var input = new Antlr4.Runtime.AntlrFileStream(filename); //"..\\..\\Tests\\simple.app" var input = new Antlr4.Runtime.AntlrInputStream(inputString); //"..\\..\\Tests\\simple.app" var lexer = new PreposeGesturesLexer(input); var tokens = new CommonTokenStream(lexer); var parser = new PreposeGesturesParser(tokens); var tree = parser.app(); // parse var visitor = new AppConverter(); var app = (App)visitor.Visit(tree); return app; }
public static App ReadAppText(string inputString) { //var input = new Antlr4.Runtime.AntlrFileStream(filename); //"..\\..\\Tests\\simple.app" var input = new Antlr4.Runtime.AntlrInputStream(inputString); //"..\\..\\Tests\\simple.app" var lexer = new PreposeGesturesLexer(input); var tokens = new CommonTokenStream(lexer); var parser = new PreposeGesturesParser(tokens); var tree = parser.app(); // parse var visitor = new AppConverter(); var app = (App)visitor.Visit(tree); return(app); }
private static App GestureAppFromAntlrInput(ICharStream input) { var lexer = new PreposeGesturesLexer(input); var tokens = new CommonTokenStream(lexer); var parser = new PreposeGesturesParser(tokens); parser.AddErrorListener((IAntlrErrorListener <IToken>) new ParserErrorListener <IToken>()); var tree = parser.app(); // parse var visitor = new AppConverter(); var app = (App)visitor.Visit(tree); return(app); }
public void UploadOrders(List <JetOrder> orders, OrderStatus status) { Logger.Log("Upload Jet Orders to Ship Station", Status.INFO); List <ShipStationOrder> ShipStationOrders = new List <ShipStationOrder>(); foreach (JetOrder JetOrder in orders) { Logger.Log("Jet Order " + JetOrder.MerchantOrderId, Status.DEBUG); ShipStationOrder ShipStationOrder = AppConverter.ConvertToShipStationOrder(JetOrder); ShipStationOrder.OrderStatus = status; ShipStationOrders.Add(ShipStationOrder); Logger.Log("Jet Order Complete", Status.DEBUG); } Task.Run(async() => await ShipStationClientService.CreateOrders(ShipStationOrders)); }