Download - WPSM Programming Language
WPSMWPSM Programming Language Programming Language
A simple language that transformA simple language that transformsimple data structuresimple data structure
intointocomplex complex xxML ML fformatormat
Wai Y. WongPeter ChenSeema GuptaMiqdad Mohammed
BackgroundBackground
Business to Business data transformationExtensible Markup LanguageDatabase schema mappingExtensible Stylesheet Language
How does Content Manager handle this?
MotivationMotivation
Worry free from XML syntaxFocusing on dealing with the inventoryA powerful tool to handle a mass dataAn easy tool to learn
How does WPSM fulfill these objectives?
WPSM GoalsWPSM Goals
Ease of useProductivityRobustPortableInternet ability
WPSM SyntaxWPSM 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 SemanticsWPSM Semantics
Back-End intermediate between Front-End and Library
TreeWalker performs semantic checksTwo walks of the AST
– Symbol Table– Code Generation using Library and Helper
Semantic Errors (Run-Time and Compile Time)
WPSM CompilerWPSM Compiler
“*.xf” (WPSM source program)Whole WPSM Compiler is implemented
in JavaParser, Lexer, and Tree-walker are
generated by ANTLRTarget language => Java source code
WPSM CompilerWPSM Compiler
WPSM LibraryWPSM Library
Simplify WPSM Code GenerationSimplify WPSM SyntaxAllows for Reusability of methodsReduces output codeMakes Upgrades EasierBreaks up Compiler and WPSM
Features to allow for easier debugging
WPSM SystemWPSM System
WPSM TestingWPSM Testing
Source File TestingSyntax TestingDependency CheckingFeature TestingRelease Control
WPSM Example – Data WPSM Example – Data XML XML
WPSM Example - .xf FileWPSM Example - .xf File
ConclusionConclusion
Great team workTAs’ and professor’s supportStrugglesShort time VS perfectionQuestions, Comments, or SuggestionsThanks…