aboutsummaryrefslogtreecommitdiff
path: root/xsd-frontend/semantic-graph/fundamental.m4
blob: c92881dc0382fbbd1dfef552e7c3ef73f0be9145 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# file      : xsd-frontend/semantic-graph/fundamental.m4
# license   : GNU GPL v2 + exceptions; see accompanying LICENSE file

define(`upcase', `translit(`$*', `a-z', `A-Z')')


define(`capitalize_word',
  `regexp(`$1', `^\(.\)\(.*\)', `upcase(`\1')`\2'')')


define(`capitalize',
  `patsubst(`$1', `\w+', `capitalize_word(`\&')')')

define(`make_class_name', `patsubst(capitalize(`$1'), ` ')')

define(`make_var_name', `patsubst(`$1', ` ', `_')')