#!/usr/bin/end python

import re

routine = re.compile(
    r'^\s*(?P<type>[function|subroutine]+)\s+(?P<name>[\w\d_]+)\s*(?P<args>\([^\)]*\))',
    re.I)
comment = re.compile(
    r'^\s*!(?P<comment>.*?)$')
use = re.compile(
    r'^\s*use\s+(?P<name>[\w\d_]+)\b',
    re.I)
implicit_none = re.compile(
    r'^\s*implicit\s+none',
    re.I)
type = re.compile(
    r'^\s*type\s+(?P<name>[\w\d_]+)',
    re.I)
definition = re.compile(
    r'^\s*(?P<type>type|integer|real|complex|logical|character)',
    re.I)
blank = re.compile(r'^\s*$')
module = re.compile(r'^\s*module\s+(?P<name>[\w\d_]+)', re.I)
end_module = re.compile(r'^\s*end\s+module', re.I)
contains = re.compile(r'^\s*contains\b', re.I)
