BioLegato - Menu Format first proposals

From Bioinformatics.Org Wiki

Jump to: navigation, search

Click here to go back to: BioLegato



Contents

New syntax proposals #1 (PCD – Pythonesque Command Definition):

Similar to: Python's and CSV's tab structure

Menu:
	Menu Item:
		%Variable:
			field1:
				value
			field2:
				value
			field3: value on the same line
		#Button:
			field:
				value
	Menu Item 2:

Practical example

DNA/RNA:
	Numseq:
		%START
			type: int
			min:
				0
			max:
				@sequence.length@
		%END
			type:
				int
			min:
				0
			max:
				@sequence.length@
		%IN:
			type:
				sequencefile
			source:
				canvas
		#Run:
			command:
				numseq %START% %END% < %IN%


Advantages:

Disadvantages:

New syntax proposals #2 (CCD – C-ish Command Definition):

Similar to C's struct construction

Menu	{
	Menu_Item   {
		Variable_or_button {
			field	value
			field	“multiple
				  line and spaced value”
			“field with spaces in name”	{
				sub_field1
					value
				sub_field2
					value
			}
		}
	}
}

Practical example:

DNA/RNA	{
	Numseq {
		%START% {
			text	“Start position”
			type	int
			min	0
			max	#(sequence.length)
		}

		% END {
			text	“Start position”
			type	int
			min	0
			max	#(sequence.length)
		}

		%IN% {
			type	sequencefile
			source	canvas
		}

		Run_button	{
			type	button
			text	“Run”
			command	“numseq %START% %END% < %IN%”
		}
	}
}

Advantages:

  1. It is similar to C syntax, therefore it includes all of the same advantages and disadvantages as C
  2. It is easy to see how things are associated
  3. Allows for object encapsulation
  4. Easy to tell heirchy
  5. No white-space problems
  6. Can be made to allow explicit typing (buttons vs. variables vs. etc.)
  7. Intrinsically allows multiplicity of buttons
  8. Object abstraction
  9. Fairly easy to read

Disadvantages:

  1. Requires closing brace (})
  2. Can be formatted messily because the syntax does not enforce indentation


Conclusion

PCD – Pythonesque Command Definition was selected in the Bioinformatics Team Meeting

Personal tools
Namespaces
Variants
Actions
wiki navigation
Toolbox