~jtaylor/ubuntu/precise/python-numpy/multiarch-fix-818867

« back to all changes in this revision

Viewing changes to numpy/f2py/lib/parser/statements.py

  • Committer: Bazaar Package Importer
  • Author(s): Ondrej Certik, Riku Voipio, Tiziano Zito, Carlos Galisteo, Ondrej Certik
  • Date: 2008-07-08 15:08:16 UTC
  • mfrom: (0.1.21 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080708150816-ekf992jcp2k1eua3
Tags: 1:1.1.0-3
[ Riku Voipio ]
* debian/control: atlas is not available on armel, and after a quick look
  neither on alpha. I'd also suggest dropping
  libatlas-sse-dev|libatlas-sse2-dev|libatlas-3dnow-dev alternative combo
  away, these are potentially dangerous on buildd's. Ondrej: dropped.
  (Closes: #489568)

[ Tiziano Zito ]
* patch: build _dotblas.c when ATLAS is not installed, build-conflict with
  atlas, build-depend on blas+lapack only, as it used to be (Closes: #489726)

[ Carlos Galisteo ]
* debian/control
  - Added Homepage field.

[ Ondrej Certik ]
* Checked the package on i386 and amd64, both with and without atlas, all
  tests run and the numpy package is faster if atlas is around. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
95
95
            if sign=='=>':
96
96
                self.__class__ = PointerAssignment
97
97
            else:
98
 
                self.__class__ = Assignment            
 
98
                self.__class__ = Assignment
99
99
        apply_map = self.item.apply_map
100
100
        self.variable = apply_map(m.group('variable').replace(' ',''))
101
101
        self.expr = apply_map(m.group('expr'))
247
247
        tab = self.get_indent_tab(isfix=isfix)
248
248
        if self.items:
249
249
            return tab + 'GO TO %s (%s)' \
250
 
                   % (self.varname, ', '.join(self.items)) 
 
250
                   % (self.varname, ', '.join(self.items))
251
251
        return tab + 'GO TO %s' % (self.varname)
252
252
    def analyze(self): return
253
253
 
339
339
                             | [ NML = ] <namelist-group-name>
340
340
                             | ADVANCE = <scalar-default-char-expr>
341
341
                             ...
342
 
    
 
342
 
343
343
Read1:    READ <format> [, <input-item-list>]
344
344
    <format> == <default-char-expr> | <label> | *
345
345
    """
525
525
    def tofortran(self, isfix=None): return self.get_indent_tab(isfix=isfix) \
526
526
        + 'DEALLOCATE (%s)' % (', '.join(self.items))
527
527
    def analyze(self): return
528
 
    
 
528
 
529
529
class ModuleProcedure(Statement):
530
530
    """
531
531
    [ MODULE ] PROCEDURE <procedure-name-list>
704
704
                            ...
705
705
    <sign-edit-descr> = SS | SP | S
706
706
    ...
707
 
    
 
707
 
708
708
    """
709
709
    match = re.compile(r'format\s*\(.*\)\Z', re.I).match
710
710
    def process_item(self):
775
775
                   | <substring>
776
776
    <array-element> = <data-ref>
777
777
    <array-section> = <data-ref> [ ( <substring-range> ) ]
778
 
    
 
778
 
779
779
    """
780
780
    match = re.compile(r'data\b',re.I).match
781
781
 
875
875
 
876
876
    def analyze(self):
877
877
        use = self.parent.a.use
878
 
        if use.has_key(self.name):
 
878
        if self.name in use:
879
879
            return
880
880
 
881
881
        modules = self.top.a.module
882
 
        if not modules.has_key(self.name):
 
882
        if self.name not in modules:
883
883
            fn = None
884
884
            for d in self.reader.include_dirs:
885
885
                fn = get_module_file(self.name, d)
896
896
                parser.analyze()
897
897
                modules.update(parser.block.a.module)
898
898
 
899
 
        if not modules.has_key(self.name):
 
899
        if self.name not in modules:
900
900
            self.warning('no information about the module %r in use statement' % (self.name))
901
901
            return
902
902
 
903
903
        module = modules[self.name]
904
904
        use_provides = self.parent.a.use_provides
905
905
        print use
906
 
        
 
906
 
907
907
        return
908
908
 
909
909
class Exit(Statement):
966
966
class Dimension(Statement):
967
967
    """
968
968
    DIMENSION [ :: ] <array-name> ( <array-spec> ) [ , <array-name> ( <array-spec> ) ]...
969
 
    
 
969
 
970
970
    """
971
971
    match = re.compile(r'dimension\b', re.I).match
972
972
    def process_item(self):
990
990
class Target(Statement):
991
991
    """
992
992
    TARGET [ :: ] <object-name> ( <array-spec> ) [ , <object-name> ( <array-spec> ) ]...
993
 
    
 
993
 
994
994
    """
995
995
    match = re.compile(r'target\b', re.I).match
996
996
    def process_item(self):
1018
1018
    POINTER [ :: ] <pointer-decl-list>
1019
1019
    <pointer-decl> = <object-name> [ ( <deferred-shape-spec-list> ) ]
1020
1020
                   | <proc-entity-name>
1021
 
    
 
1021
 
1022
1022
    """
1023
1023
    match = re.compile(r'pointer\b',re.I).match
1024
1024
    def process_item(self):
1111
1111
    """
1112
1112
    INQUIRE ( <inquire-spec-list> )
1113
1113
    INQUIRE ( IOLENGTH = <scalar-int-variable> ) <output-item-list>
1114
 
    
 
1114
 
1115
1115
    <inquire-spec> = [ UNIT = ] <file-unit-number>
1116
1116
                     | FILE = <file-name-expr>
1117
1117
                     ...
1495
1495
        s += ' :: ' + self.spec + ' => ' + ', '.join(self.items)
1496
1496
        return tab + s
1497
1497
 
1498
 
        
 
1498
 
1499
1499
class FinalBinding(StatementWithNamelist):
1500
1500
    """
1501
1501
    FINAL [ :: ] <final-subroutine-name-list>
1515
1515
        self.items = split_comma(line, self.item)
1516
1516
        return
1517
1517
    def tofortran(self, isfix=None):
1518
 
        return self.get_indent_tab(isfix=isfix) + 'ALLOCATABLE ' + ', '.join(self.items) 
 
1518
        return self.get_indent_tab(isfix=isfix) + 'ALLOCATABLE ' + ', '.join(self.items)
1519
1519
    def analyze(self):
1520
1520
        for line in self.items:
1521
1521
            i = line.find('(')
1583
1583
        if self.name and self.name!=parent_name:
1584
1584
            self.warning('expected if-construct-name %r but got %r, skipping.'\
1585
1585
                         % (parent_name, self.name))
1586
 
            self.isvalid = False        
 
1586
            self.isvalid = False
1587
1587
        return
1588
1588
 
1589
1589
    def tofortran(self, isfix=None):
1610
1610
        if self.name and self.name!=parent_name:
1611
1611
            self.warning('expected if-construct-name %r but got %r, skipping.'\
1612
1612
                         % (parent_name, self.name))
1613
 
            self.isvalid = False        
 
1613
            self.isvalid = False
1614
1614
        return
1615
 
        
 
1615
 
1616
1616
    def tofortran(self, isfix=None):
1617
1617
        s = ''
1618
1618
        if self.name:
1658
1658
        if self.name and self.name!=parent_name:
1659
1659
            self.warning('expected case-construct-name %r but got %r, skipping.'\
1660
1660
                         % (parent_name, self.name))
1661
 
            self.isvalid = False        
 
1661
            self.isvalid = False
1662
1662
        return
1663
1663
 
1664
1664
    def tofortran(self, isfix=None):
1854
1854
            return self.get_indent_tab(isfix=isfix) + 'PAUSE ' + self.value
1855
1855
        return self.get_indent_tab(isfix=isfix) + 'PAUSE'
1856
1856
    def analyze(self): return
1857