130 likes | 141 Views
Learn about MASC, a browser manipulation language, its uses, implementation, and lessons learned. Organize information easily with a clean web browser and shell. Example codes and tools like ANTLR and Eclipse included. Lessons on design and pitfalls to avoid.
E N D
MASC A browser manipulation language by Michael Masullo, Christos Angelopoulos, Vaibhav Saharan, and Kristina Chodorow
MASC overview and goals • Tutorial • Implementing MASC • Lessons Learned Outline
MASC Overview and goals What is MASC and Why make it
Browser-based webpage manipulation • Uses the MASC Browser, a fully functional graphical web browser • Contains the MASC Shell, where commands are given and results displayed What is MASC?
Great for organizing information • Simple, clean web browser • Easy access to shell Why make MASC?
Tutorial Putting on the MASC
(: display user's bookmarks : add the current page as a bookmark : redisplay list :) bkmrks_file = "/home/"+USER+"/.bookmarks" shell(echo "Old bookmark list:") (: create bookmarks file if it doesn't exist :) touch bkmrks_file shell(cat bkmrks_file | sort) shell(echo "------------") echo -n "Current page: " :/ (: append current page's address to the list :) echo :/ >> bkmrks_file (: redisplay :) echo "New bookmark list:" cat bkmrks_file | sort echo "------------" Example 1: Bookmark file
array goodLinks[5] j=0 while (j<5){ goodLinks[j]="" j=j+1 } j=0 newSite="www.televisionwithoutpity.com" while(j<5){ if(goodLinks[j]==¡¡){ goodLinks[j]=newSite j=0 break else { if(goodLinks[j]==newSite) { echo "Already Entered" j=0 break else {j=j+1} }}} Example 2: “Bookmark” Array
Implementation Making the language: MASC
ANTLR • Eclipse (with plug-ins) • Subversion • Lobo Tools Used
Webpage Browser .html .java Masc .java MascAntlrLexer grammar .java MascAntlrParser .g .java walker MascAntlrWalker .g .java Masc Backend Files .java Language Diagram
Lessons Learned What to do and what to be wary of when designing a compiler
Don’t bother programming anything in or for Windows. It’s not worth it. • Making a Firefox plug-in for the MASC shell would have been easy…if we wrote everything in JavaScript. • A lot of things are funnier at 3 in the morning. Lessons Learned