MCPcopy Index your code
hub / github.com/numpy/numpy / cracktypespec0

Function cracktypespec0

numpy/f2py/crackfortran.py:1565–1589  ·  view source on GitHub ↗
(typespec, ll)

Source from the content-addressed store, hash-verified

1563
1564
1565def cracktypespec0(typespec, ll):
1566 selector = None
1567 attr = None
1568 if re.match(r'double\s*complex', typespec, re.I):
1569 typespec = 'double complex'
1570 elif re.match(r'double\s*precision', typespec, re.I):
1571 typespec = 'double precision'
1572 else:
1573 typespec = typespec.strip().lower()
1574 m1 = selectpattern.match(markouterparen(ll))
1575 if not m1:
1576 outmess(
1577 'cracktypespec0: no kind/char_selector pattern found for line.\n')
1578 return
1579 d = m1.groupdict()
1580 for k in list(d.keys()):
1581 d[k] = unmarkouterparen(d[k])
1582 if typespec in ['complex', 'integer', 'logical', 'real', 'character', 'type']:
1583 selector = d['this']
1584 ll = d['after']
1585 i = ll.find('::')
1586 if i >= 0:
1587 attr = ll[:i].strip()
1588 ll = ll[i + 2:]
1589 return typespec, selector, attr, ll
1590
1591
1592#####

Callers 2

analyzelineFunction · 0.85
analyzevarsFunction · 0.85

Calls 7

markouterparenFunction · 0.85
unmarkouterparenFunction · 0.85
lowerMethod · 0.80
stripMethod · 0.80
findMethod · 0.80
outmessFunction · 0.70
keysMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…