aboutsummaryrefslogtreecommitdiff
path: root/xsd-frontend/semantic-graph/fundamental.m4
blob: 2f2a6f257427f0ef04323056a03a5e082889b20d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# file      : xsd-frontend/semantic-graph/fundamental.m4
# author    : Boris Kolpackov <boris@codesynthesis.com>
# copyright : Copyright (c) 2005-2011 Code Synthesis Tools CC
# 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', ` ', `_')')