Toggle menu
862
3.8K
30.2K
279.1K
Catglobe Wiki
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Working with QSL: Difference between revisions

From Catglobe Wiki
New page: === Working with QSL === == What is QSL ? == QSL stands for Questionnaire Structure Language . We can use this language to specify structure of a questionnaire template including question...
 
Wikicatglobe (talk | contribs)
No edit summary
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=== Working with QSL  ===
<accesscontrol>Main:MyGroup</accesscontrol>
== What is QSL ? ==
== What is QSL ? ==
QSL stands for Questionnaire Structure Language . We can use this language to specify structure of a questionnaire template including questionnaire's properties , questions and question's properties . Though QSL has not been supported completely questionnaire template ( there are a few features missing ), it is an advance way to work with questionnaire template . Once getting familiar with QSL , user can create a questionnaire template quicker than using the GUI .
QSL stands for Questionnaire Structure Language . We can use this language to specify structure of a questionnaire template including questionnaire's properties , questions and question's properties . Though QSL has not been supported completely questionnaire template ( there are a few features missing ), it is an advance way to work with questionnaire template . Once getting familiar with QSL , user can create a questionnaire template quicker than using the GUI .
Line 5: Line 5:
QSL started in version 5.4 (VN1197QNR - Import of Questionnaire template) . In 5.5 , we re-defined the grammar of QSL and keep it up to now . An improvement was made in 5.6 so that the engine can catch syntax error and support test resource for error message .     
QSL started in version 5.4 (VN1197QNR - Import of Questionnaire template) . In 5.5 , we re-defined the grammar of QSL and keep it up to now . An improvement was made in 5.6 so that the engine can catch syntax error and support test resource for error message .     
== Before working with QSL ==
== Before working with QSL ==
QSL is a domain specific language (DSL) . It is always a painful to deal with DSL by our own but everything is easier thank to ANTLR (AnoTher Tool for Language Recognition). This is a language tool that provides a framework for constructing recognizers, compilers, and translators from grammatical descriptions containing actions in a variety of target languages. It is widely used because it's easy to understand, powerful, flexible, generates human-readable output and free . It is recommended that developers read the book "The Definitive Antlr Reference Building Domain-Specific Languages" to have a background before getting into QSL  
QSL is a domain specific language (DSL) . It is always a painful to deal with DSL by our own but everything is easier thank to ANTLR (AnoTher Tool for Language Recognition). This is a language tool that provides a framework for constructing recognizers, compilers, and translators from grammatical descriptions containing actions in a variety of target languages. It is widely used because it's easy to understand, powerful, flexible, generates human-readable output and free . It is recommended that developers read the book "The Definitive Antlr Reference Building Domain-Specific Languages" to have a background before getting into QSL . You also need to install ANTLR Runtime engine and configure environment .
== Processing QSL ==  
 
Below
== Processing QSL ==
[[category:Technical guidelines]]
 
[[Image:Process_QSL.png]]
 
All the work we need to do is define the syntax for QSL ( edit file Questionnaire.g) and write a class to parse the abstract structure tree into a Questionnaire object . We use ANTLR Work to edit and debug the syntax of QSL
[[Image:ANTLR_Work.JPG]]
 
After finished Questionnaire.g , we also use ANTLR Work to generate Java source code for the lexer and parser .
 
[[Image:GenerateCode.JPG]]
 
Put QuestionnaireLexer.java and QuestionnaireParser.java into source code folder and compile as normal source file .
The final work we need to handle is parsing the tree structure into Questionnaire object using the API library comes with ANTLR package .
 
[[Image:ASTTree.JPG]]
 
== Reference links ==
http://antlr.org/
<br>http://www.ociweb.com/jnb/jnbJun2008.html
 
[[Category:Technical_guidelines]]

Latest revision as of 04:46, 18 October 2013

<accesscontrol>Main:MyGroup</accesscontrol>

What is QSL ?

QSL stands for Questionnaire Structure Language . We can use this language to specify structure of a questionnaire template including questionnaire's properties , questions and question's properties . Though QSL has not been supported completely questionnaire template ( there are a few features missing ), it is an advance way to work with questionnaire template . Once getting familiar with QSL , user can create a questionnaire template quicker than using the GUI .

From which version QSL has supported ?

QSL started in version 5.4 (VN1197QNR - Import of Questionnaire template) . In 5.5 , we re-defined the grammar of QSL and keep it up to now . An improvement was made in 5.6 so that the engine can catch syntax error and support test resource for error message .

Before working with QSL

QSL is a domain specific language (DSL) . It is always a painful to deal with DSL by our own but everything is easier thank to ANTLR (AnoTher Tool for Language Recognition). This is a language tool that provides a framework for constructing recognizers, compilers, and translators from grammatical descriptions containing actions in a variety of target languages. It is widely used because it's easy to understand, powerful, flexible, generates human-readable output and free . It is recommended that developers read the book "The Definitive Antlr Reference Building Domain-Specific Languages" to have a background before getting into QSL . You also need to install ANTLR Runtime engine and configure environment .

Processing QSL

All the work we need to do is define the syntax for QSL ( edit file Questionnaire.g) and write a class to parse the abstract structure tree into a Questionnaire object . We use ANTLR Work to edit and debug the syntax of QSL

After finished Questionnaire.g , we also use ANTLR Work to generate Java source code for the lexer and parser .

Put QuestionnaireLexer.java and QuestionnaireParser.java into source code folder and compile as normal source file . The final work we need to handle is parsing the tree structure into Questionnaire object using the API library comes with ANTLR package .

Reference links

http://antlr.org/
http://www.ociweb.com/jnb/jnbJun2008.html