[FLASH-USERS] bad syntax in reading species

Anthony Scopatz scopatz at flash.uchicago.edu
Mon Jun 11 16:12:46 EDT 2012


Hello Raph,

I'll keep this in mind, but it seems unlikely.  Certain names in FLASH
setup are translated into Fortran or C variable names (ie we generate code
with this names).  The compilers would not be able to run if special
characters were included in these names.  So doing what you propose would
take a healthy chuck of rearchitecting.  I'll gladly review any patches
that are sent in on this issue, though ;)

Be Well
Anthony

On Mon, Jun 11, 2012 at 12:45 PM, William Raphael Hix <raph at ornl.gov> wrote:

> Hi Anthony-
>
> This is something which FLASH might want to look into extending.  +, - and
> other symbols are widely used in reaction rate compilations.  For example,
> the leading database for astrophysical nuclear reactions, the REACLIB
> database maintained by the JINA collaboration, has long used al-6 to denote
> the ground state of Al26 and al*6 to denote the long-lived metastable
> state.  It's much easier to maintain the code if the notation in the
> dataset and the notation in FLASH are consistent.
>
>                                                Raph
>
> On Jun 1, 2012, at 11:10 AM, Anthony Scopatz wrote:
>
> > Hello Seyit
> >
> > "+" and "-" are not normal programming word characters.  These are
> defined as any upper or lowercase latin letter, underscores, and digits
> (0-9).  I might use "p" and "m" instead.
> >
> > Be Well
> > Anthony
> >
> > On Fri, Jun 1, 2012 at 4:05 PM, Seyit Hocuk <seyit at astro.rug.nl> wrote:
> > Hi,
> >
> > I want to include species with names that have '+' or '-' in them. The
> config file cannot recognize these characters. It gives this error:
> >
> > "
> > Bad syntax:
> > SPECIES e-
> > input doesn't match regular expression
> "SPECIES\s+(?P<name>\w+)(\s+TO\s+(?P<nElec>\d+))?\s*$"
> > "
> >
> > Can I change the file "\bin\unitCfg.py" to make it able to read these?
> >
> >    def initparseSPECIES(self):
> >        return {}, r'SPECIES\s+(?P<name>\w+)(\s+TO\s+(?P<nElec>\d+))?\s*$
> >
> >
> > Thanks,
> > Seyit
> >
> >
>
> ------------------------------------------------------------------------
> William Raphael Hix                       Email:  raph at ornl.gov
> Oak Ridge National Laboratory             Voice:  (865) 574-4716
> P.O. Box 2008                               Fax:  (865) 576-8746
> Oak Ridge, TN 37831-6354
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20120611/b6515364/attachment-0001.htm>


More information about the flash-users mailing list