User:Shainasabarwal/ScadLexer for ScintillaEditor

From BRL-CAD
< User:Shainasabarwal
Revision as of 22:34, 23 March 2015 by Shaina7837 (talk | contribs) (Personal Information)

Personal Information

  • Name: Shaina Sabarwal
  • Email-address: iamshainasabarwal@gmail.com
  • IRC username: shaina
  • Contact Number: +917837091321
  • Blog: shainasabarwal.wordpress.com

Background Information

  • Computer Science Engineering student at Guru Nanak Dev Engineering College, Ludhina, Punjab, India. Presently studying in 4th year.
  • I have worked in are C++, Qt, Wt, HTML, CSS, Javascript, Ruby on rails, flex and Bison and Wordpress.
  • Have worked with OpenSCAD in 2014 on project UI Brushup of OpenSCAD that was about enhancing the interface for users of OpenSCAD by adding QScintilla Editor and its various features, Toolbars with small 2D icons. Options to choose color scheme of the solid models, and launching screen of OpenSCAD.
  • Also interested in front end development. Recently developed a wordpress theme for language learning institure - Global Careers. Some screenshots are:
  • I am active member of Linux User Group, Ludhiana where the students are made aware about the open source technologies and motivated to contribute in them.

Project Information

Title: SCAD lexer for QScintilla Editor

This project aims to make lexer specifically for SCAD language. Currently, QScintilla is using CPP lexer, which cause syntax problem as CPP language is very large as compared to SCAD language of OpenSCAD. With this, some scintilla related issues will also be solved.

QsciLexerCustom inherited lexer QScintilla library has a class QsciLexerCustom which can be used as a base for new language lexers. The advantage of using this class is that it doesn't require to make any change in QScintilla code or to re-compile it. This will be inherited and its virtual functions will be redefined to make lexer for SCAD language.

Defining style index for SCAD language SCAD language includes various categories of keywords including mathematical functions, solid primitives as defined: http://www.openscad.org/cheatsheet/ ,Operators, Numbers, Comments - single line as well as multiline, single quoted and double quoted strings, parenthesis and variable names. The lexer firtly requires to index the styles for the purpose of syntax highlighting using functions of qsciLexerCustom.

Syntax Highlighting Different functions for highlighting of keywords, operators, numbers, mathematical functions etc will be defined in the lexer which will be using their respective style (as defined in the index) for coloring and setting fonts. A demo for keyword highlighting is:

Different Color scheme A number of different color schemes for users to be selected in preferences will be defined. In code, it will require checking the selected scheme and define style index accordingly.

Issue #1108 Customizable Icon set I liked the idea that user may add its own icon set for toolbars. It will require user to add his/her icons in a file such as icons/icon.svg and openscad will fetch and put them onto toolbar instead adding them into mainwin.cc code directly.

Issue #1056 Toolbar Buttons Toolbars requires more icons as demanded in this.

Issue #1172 Syntax highlighting: # affects the whole line As presently, qscintilla uses CPP lexer, so it takes the whole line as preprocessor directive, started with #. With writing lexer specifically for SCAD language, this problem will be tackled.

Issue #1075 Add multi-line, nested list '[' ']' indentation and tree folding to QScintilla Editor The feature of multi line, nested indentation and folding can be added into the scad lexer using functions like setFoldAtElse(), setFoldComments() etc.