140 likes | 270 Views
WPSM Programming Language. A simple language that transform simple data structure into complex x ML f ormat. W ai Y. Wong P eter Chen S eema Gupta M iqdad Mohammed. Background. Business to Business data transformation E x tensible M arkup L anguage Database schema mapping
E N D
WPSM Programming Language A simple language that transform simple data structure into complex xML format Wai Y. Wong Peter Chen Seema Gupta Miqdad Mohammed
Background • Business to Business data transformation • Extensible Markup Language • Database schema mapping • Extensible Stylesheet Language How does Content Manager handle this?
Motivation • Worry free from XML syntax • Focusing on dealing with the inventory • A powerful tool to handle a mass data • An easy tool to learn How does WPSM fulfill these objectives?
WPSM Goals • Ease of use • Productivity • Robust • Portable • Internet ability
WPSM Syntax • WPSM takes in .xf source, .csv or other delimited, and outputs .xml • Source file read as stream of chars by Lexer and converted to stream of tokens • Stream of tokens read by Parser and converted to AST (Syntax checks) • Structure of AST in grammar (i.e root nodes and child nodes) • Token Types: Keyword, Variable, Integer, and String (i.e. BEGIN, END, PRINT(value), IF, WHILE, $1, “string”, 9, FS, RT, $var…) • Lexer and Parser errors
WPSM Semantics • Back-End intermediate between Front-End and Library • TreeWalker performs semantic checks • Two walks of the AST • Symbol Table • Code Generation using Library and Helper • Semantic Errors (Run-Time and Compile Time)
WPSM Compiler • “*.xf” (WPSM source program) • Whole WPSM Compiler is implemented in Java • Parser, Lexer, and Tree-walker are generated by ANTLR • Target language => Java source code
WPSM Library • Simplify WPSM Code Generation • Simplify WPSM Syntax • Allows for Reusability of methods • Reduces output code • Makes Upgrades Easier • Breaks up Compiler and WPSM Features to allow for easier debugging
WPSM Testing • Source File Testing • Syntax Testing • Dependency Checking • Feature Testing • Release Control
Conclusion • Great team work • TAs’ and professor’s support • Struggles • Short time VS perfection • Questions, Comments, or Suggestions • Thanks…