170 likes | 255 Views
ChunText. By Chun ping Wang. Why?. This project was done for fun. This project is to demonstrate the power of Eclipse. What is it?. A plugin for Eclipse. distributable A compiler. LALR(1) parsing. History.
E N D
ChunText By Chun ping Wang.
Why? • This project was done for fun. • This project is to demonstrate the power of Eclipse.
What is it? • A plugin for Eclipse. • distributable • A compiler. • LALR(1) parsing.
History. June: Finish the rough compiler.July: Added For loop and concatenation (for String) in the language. Modify assignment operator. August: Finish the editor to be launch for eclipse. September: nothing. October: finish inputting plugin. November: made changes to the plugin to allow distribution, fixed lot of bugs.
.c– language. Features: Simple math instructions. Complex branch instructions. While If for String, integer and real type. Complex comparison.
.c– language. Lacks: Functions or subprogram. Error checking such as divide by zero. Complex math instructions. Type casting. No switch (case) statement.
.c– language. 1. “=“ is := in c--. 2. All programs have this format. Program X; Declarations. begin; End; 3. All arithmetic expression are put in parenthesis.
GUI DESIGN. (toolbar) a. b. c. Decrypt icons.
GUI DESIGN (Menu) ChunText (compiling tools). Cs 201 to Cs 312. (Sample tools). Misc Math (Education tools). Security (encryption and decryption of your code). Sample GUI (bunch of random graphic programs).
GUI DESIGN (views). • Console view • Exit button. • Clear button. • error message box view. • Help view.
Tools used • JLex – lexical generator. • YACC – parsing table. • Font Chooser for com.Borland.
Technological background. • Eclipse – an IDE. • JBuilder – an IDE. • Java JRE 1.5.0
Coding design (Compiler). • Vector for Parser Table • Back patching with Stacks. • BinarySearchTree for Symbol Table.
Coding design (GUI). • Org.eclipse.ui.IWorkbenchWindowActionDelegate for menu • Org.eclipse.ui.part.viewpart for views. • Java.awt for the awt console.
Conclusion. • Project started as an extension to an existing project. • Compiles only .c– code.