BioLegato - PCD: Python-esque Command Definition. Syntax and Semantic
From Bioinformatics.Org Wiki
Click here to go back to: BioLegato
Contents |
Research in Syntax and Semantics
Main links in Wikipedia
Formal Languages [1]
Formal Grammars [2]
Expression Grammar [3]
Regular Expressions [4]
Automata Theory [5]
Related Books
http://www.cs.uiowa.edu/~slonnegr/plf/Book/
Chapter #1. General Theory - http://www.cs.uiowa.edu/~slonnegr/plf/Book/Chapter1.pdf
Chapter #5. Lambda Calculus - http://www.cs.uiowa.edu/~slonnegr/plf/Book/Chapter5.pdf
Presentation - First Version 23-6-2010
File:PCD-Syntax and Semantic (23-6-2010).pdf
Write the user and programmer documentations. Write an article describing all this work
File:Article for Formal Syntax Definition Version 1 (14-7-2010).doc
PCD as Context-Free Grammar, defined using BNF (Backus-Naur Form) Metalanguage
version#1 - strict version
<program> ::= name <identifier> <bolcks>
<blocks> ::= <block> | <block> <blocks>
<block> ::= % <identifier> <param_definition>
<param_definition> ::= <ident> <parameter>
<parameter> ::= label <label_value> |
type <type_value> |
default <default_value> |
min <numerical_value> |
max <numerical_value> |
format <file_format> |
save <boolean_value> |
overwrite <boolean_value> |
content <content_value> |
command <command_value> |
close_windows <boolean_value> |
choices <choice_values>
<label_value> ::= <ident> <ident> <identifier>
<type_values> ::= <ident> <ident> slider |
<ident> <ident> text |
<ident> <ident> tempfile |
<ident> <ident> chooser |
<ident> <ident> choice_menu |
<ident> <ident> button
<default_values> ::= <ident> <ident> <identifier> | <ident> <ident> <numeral>
<numerical_value> ::= <ident> <ident> <numeral>
<file_format> ::= <ident> <ident> FASTA | <ident> <ident> GDE | <ident> <ident> GebBank
<boolean_value> ::= <ident> <ident> <boolean>
<content_value> ::= <ident> <ident> canvas | <ident> <ident> empty
<command_value> ::= <ident> <ident> <identifier>
<choices_value> ::= <ident> choices <choice_list>
<choice_list> ::= <choice> | <choice> <choice_list>
<choice> ::= <ident> <ident> <identifier> <choose_option>
<choose_option> ::= <ident> <ident> <ident> <identifier> | <ident> <ident> <ident> <numeral>
<identifier> ::= <letter> | <identifier> <letter> | <identifier> <digit>
<numeral> ::= <digit> | <digit> <numeral>
<symbols> ::= <symbol> | <symbol> <symbols>
<str> ::= <identifier> | <identifier> <str> | <numeral> | <numeral> <str> | <symbols> | <symbols> <str>
<letter> ::= a | b | c | d e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | t | v | w | x | y | z
<symbol> ::= ( | ) | ~ | “ | / | \ | % | & | * | + | $ | | | | = | - | . | _
<digit> ::= 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0
<boolean> ::= true | false
<reserved words> ::= name | label | type | default | min | max | format | save | overwrite | content | command | close_windows | choices | slider | text | tempfile | chooser | choice_menu |
button | canvas | empty | choices true | false
version#2 - more lenient version (context dependent - depends on indentation)
<program> ::= <out_block> <program> | <out_block> <out_block> ::= % <variable> <indent+1> <hash_block> | ^ <category> <indent+1> <out_block> | <hash_block> <hash_block> ::= <field> <indent+1> <hash_block> | <value> <variable> ::= <identifier> <category> ::= <identifier> <field> ::= <identifier> <value> ::= <identifier> <identifier> ::= <letter_or_digit> <identifier> | <letter_or_digit> <letter_or_digit> ::= <letter> | <digit> <letter> ::= a | b | c | d e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | t | v | w | x | y | z <digit> ::= 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0
version #3 - most basic version
Non-terminal symbols <pcd_menu> ::= <parser_settings> <sections> <sections> ::= <section> <new_line> <sections> | <section> <section> ::= # <space> <quote_line> | <block> <quote_line> ::= <letter_or_digit> <quote_line> <block> ::= <field> <new_line> <indent+1> <block> | <value> <field> ::= <type_symbol> <statement> | <statement> <value> ::= " <quoted_identifier> " | <identifier> Terminal Symbols <type_symbol> ::= % | ! | ^ <identifier> ::= anything from the keyboard except " and # <quoted_identifier> ::= anything from the keyboard; however, " must be followed by another ", to make ""... "" has the same meaning as \" in C/C++/Java <quoted_line> ::= anything from the keyborad <new_line> ::= \n <space> ::= space key or tab
version #3.5 what BioLegato understands (current version July 10th)
Non-terminal symbols <sections> ::= <section> <new_line> <sections> | <section> <section> ::= <field> <new_line> <indent+1> <section> | <value> <field> ::= <identifier> <value> ::= <identifier> Terminal Symbols <type_symbol> ::= % | ! | ^ <identifier> ::= anything from the keyboard except " and # <quote> ::= anything <new_line> ::= \n <space> ::= space key or tab
version #4 - basic version 2
Non-terminal symbols <pcd_menu> ::= <parser_settings> <sections> <sections> ::= <section> <new_line> <sections> | <section> <section> ::= <comment> | <block> <comment> ::= # <space> <comment_line> <block> ::= <field> <new_line> <indent+1> <block> | <value> <field> ::= <type_symbol> <statement> | <statement> <value> ::= <statement> <statement> ::= " <quoted_identifier> " | <code> | <identifier> | <variable> <code> :: #( <function> <parameters> ) <parameters> ::= <statement> <variables> | <statement> <parser_settings> ::= #@ <identifier> | #@ <identifier> <value> <variable> ::= @ <identifier> Terminal Symbols <function> ::= <fn_add> | <fn_sub> | <fn_if> <fn_add> ::= + <fn_sub> ::= - <fn_if> ::= ? <type_symbol> ::= <widget> | <nonwidget> | <tab_container> <widget> ::= % <nonwidget> ::= ! <tab_container> ::= ^ <identifier> ::= anything from the keyboard except " and # <quoted_identifier> ::= anything from the keyboard; however, " must be followed by another ", to make ""... "" has the same meaning as \" in C/C++/Java <quoted_line> ::= anything from the keyborad <new_line> ::= \n <space> ::= space key or tab