diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..d753130 --- /dev/null +++ b/LICENSE @@ -0,0 +1,27 @@ +All IRPF90 requestors MUST agree to the following license agreement which +covers all versions of IRPF90 (source code and binaries). + +With regard to the IRP Fortran90 preprocessor IRPF90, together with its +associated utility programs, with which you have supplied me a +copy, I agree to the following conditions: + + 1. I will not supply a copy of the code to anyone outside my institution or +corporation for any reason whatsoever. Instead, I will refer any requests for +copies of the program to Anthony Scemama at CNRS. This in no way limits my making of +copies of the code for backup purposes, or for running on more than one +computer system at my institution or home. + + 2. I understand that copyright or ownership rights to IRPF90 are retained by +Anthony Scemama and CNRS to the IRPF90 package. I will not incorporate any part +of IRPF90 into any other program system, either for sale or for non-profit +distribution, without written permission from Anthony Scemama and CNRS, + + 3. I understand that no large program such as IRPF90 can be considered to be +bug free, and accordingly Anthony Scemama and the CNRS supplies the IRPF90 software on an "as is" +basis, with no additional responsibility or liability, + + 4. This license is considered a "Research Group" license. Thus anyone +directly associated with your research group is covered by the license and may +share your copy of IRPF90 on all of your group's computer resources. + + diff --git a/README b/README new file mode 100644 index 0000000..f54c36f --- /dev/null +++ b/README @@ -0,0 +1,30 @@ ++==============================================================================+ +| IRPF90 | ++==============================================================================+ + +Dependencies: +------------- + +- GNU make (3.81 recommended) +- Python > 2.3 +- Any Fortran 90 compiler (gfortran, for example) + +Installing IRPF90: +------------------ + +- As the super-user, run +./irpf90.install + + +Using IRPF90: +------------- + +In an empty directory, run: +irpf90 -init +This command creates a new Makefile suitable for most irpf90 projects. +Now you can start to program using irpf90. + +Author: +A. Scemama, LCPQ-IRSAMC, CNRS-Universite Paul Sabatier +scemama@irsamc.ups-tlse.fr + diff --git a/src/preprocessed_text.py b/src/preprocessed_text.py index 90c4d47..554d270 100644 --- a/src/preprocessed_text.py +++ b/src/preprocessed_text.py @@ -259,9 +259,13 @@ def remove_comments(text,form): elif isinstance(line,Empty_line): pass else: - line.text = remove_after_bang(line.text) - if line.text[0] in "#123456789 ": - result.append(line) + newline = line.text.lstrip() + if newline == "" or newline[0] == "!": + pass + else: + line.text = remove_after_bang(line.text) + if line.text[0] in "#123456789 ": + result.append(line) return result ###################################################################### diff --git a/src/util.py b/src/util.py index c4dbfde..a77bbae 100644 --- a/src/util.py +++ b/src/util.py @@ -29,9 +29,12 @@ def build_dim(dim): else: return "(%s)"%( ",".join(dim) ) - +import error def find_subname(line): - buffer = line.text.split('(') + buffer = line.text + if not buffer.endswith(')'): + buffer += "()" + buffer = buffer.split('(') if len(buffer) > 1: buffer = " ".join(buffer[:-1]) else: