Source code for tellurium.teconverters.antimony_regex

from __future__ import print_function, division, absolute_import

[docs] def getModelStartRegex(): """ Return the regex string for Antimony model start. Matches whole line. """ return r'^\s*\*?\s*model\s*[^()\s]+\s*(\([^)]*\))?\s*((#|(//)).*)?$'
[docs] def getFunctionStartRegex(): """ Return the regex string for Antimony model start. Matches whole line. """ return r'^\s*function\s*([^()]*)\s*(\([^)]*\))?\s*((#|(//)).*)?$'
[docs] def getModelEndRegex(): """ Return the regex string for Antimony model end. Matches whole line. """ return r'^\s*end\s*((#|(//)).*)?$'
[docs] def getSBORegex(): """ Return the regex string for an SBO term. Matches whole line. """ return r'^\s*([^.\s]+)\.sboTerm\s*=\s*(SBO:)?([0-9]+)\s*(;)?\s*((#|(//)).*)?$'
[docs] def getFunctionSBORegex(): """ Return the regex string for a function SBO term. Matches whole line. """ return r'^\s*sboTerm\s*=\s*(SBO:)?([0-9]+)\s*(;)?\s*((#|(//)).*)?$'