-
Notifications
You must be signed in to change notification settings - Fork 0
SimpleFormulas
soulne4ny edited this page Nov 4, 2012
·
3 revisions
Simple Formula is a kind of string containing chemical elements, indexes and brackets. Chemical elements are http://en.wikipedia.org/wiki/Chemical_element#List_of_the_118_known_chemical_elements.
Example:
-
H2SO4consist of terminalsH,2,S,O,4.
There should be a set of terminals and a set of chemical compounds. It requires
-
TerminalRegistryandCompoundRegistrythat could be simple sets ofString.- specific API for showing field cells content in UI.
-
FormulaReactorin place ofSimpleReactororFormulaReporterin place ofCompoundReporter.
ElementRegistry should be populated with wildcard 'elements', like H{*} and {*}2.
Wildcard-elements representing atoms Xx{*} should be associated with all possible productions. Wildcard-elements representing indexes -- with all possible inputs(left-parts) having the same productions as inputs. This will result in filtering inputs.
It seem existing element registry and algorithms should be enough, as also UI representation.
The straight way looks simpler.