token expression determinizer ted team and
play

Token Expression Determinizer TED Team and Responsibilities - PowerPoint PPT Presentation

Token Expression Determinizer TED Team and Responsibilities Konstantin Itskov Theodore Ahlfeld Matthew Haigh Gideon Mendels Manager Coding Guru Testing Architect History Overview Several group members have used web scraping


  1. Token Expression Determinizer “TED”

  2. Team and Responsibilities Konstantin Itskov Theodore Ahlfeld Matthew Haigh Gideon Mendels Manager Coding Guru Testing Architect

  3. History Overview Several group members have used web ● scraping professionally. Per discussion decided to compile to x86 ● The TED programming language is a web- assembly and add web manipulation. parsing language designed to simplify web Original project design turned out to be ● scraping and serve as a bridge between java-to-java compiler. complex high-level web-scraping languages like Javascript and imperative programming Why is it interesting? languages like C. TED is the first language designed for web scraping with the power of a low level programming language.

  4. Code Generation Machine code language using the Runnable Executable TED source file Semantic Analysis nasm assembler. NASM Code Opcode NASM TED AST SAST Linking Executable Generation Syntax Tree Assembler Intermediate Code Linking object file with the builtin Representation library for web parsing/scraping

  5. Language Syntax Code Generation Similar to GCC code generation Highlights GCC Specialized Data Types ● TED designed for web parsing (Page, Element) Simple C-like syntax without ● pointers No memory management ● Web parsing with built-in ● CSS selection

  6. The Infamous GCD

  7. Demo

  8. Built In Functions Page pageFetch(“http://www.sample.com/”); ● List pageFind(page, “#sample_id”); ● listNew(); ● pageURL(page); ● listHead(list); ● pageHTML(page); ● listTail(list); ● pageRoot(page); ● listSet(list, data); ● Element listAddAfter(list, data); ● listRemove(list, index); ● elementText(element); ● listConcat (list1, list2); ● elementType(element); ● listAddLast(list, data); ● elementAttr(element, “sample”); ● elementChildren(page, element); ●

  9. CSS-Selectors Overview Functionality This is a subset selection language similar to the way regex functioning. Below is just a tiny sample of the array of data selection available. “*” - Selects all elements. ● The built in functions work by communicating over underlying “.class” - Selects all elements with the given ● integrational layer with the PhantomJS class. interpreter that serves as the functionality for all of the easy to use functionalities of web [name=”value”] - Selects elements that ● have the specified attribute with a value scraping and parsing. That library opens the exactly equal to a certain value. entire library of css-selector language that allows for easy selection of information to be “parent > child” - Selects all direct child ● collected from the parsed web-page that the elements specified by “child” of elements developer is visiting. specified by “parent”.

  10. Regression Testing TEST 4 For loop and while loops TEST 1 TEST 5 The first series of tests are basic parsing and The library was becoming functional so this variable declarations for syntax only. round of tests included Lists, file, and web data TEST 2 TEST 6 Next we introduced string, Page, List and The final rounds of testing involved modifying Element and a series of tests were developed existing tests to match TED as the language for declaration and syntax only. evolved. While we maintained the original language design, syntax and implementation TEST 3 changed as TED became more complex Next we needed to implement print so tests were designed to print integers and strings.

  11. Future Work 1. Improve language syntax by introducing nested function definitions and better function invocation methods. 2. Introduce syntax for formatting the web-scraped data to shape it in a meaningfully presentable format such as csv and ascii tables as well as mysql insert queries. 3. Remove the dependency on the PhantomJS layer and build the functionality directly into the language. 4. Improve syntax compromises that were made due to implementation such as declaring all variables prior to function calls, improving readability of built-in functions, etc.

  12. Questions?

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend