0
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1 function nout = sltpda_reduceVarName(nin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
2
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
3 % SLTPDA_REDUCEVARNAME reduces a variable name to a sensible length. The
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
4 % output name is algorithmically based on the input name and so we should
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
5 % get unique variable names in the sLTPDA parser.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
6 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
7 % M Hewitson 01-05-07
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
8 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
9 % $Id: sltpda_reduceVarName.m,v 1.1 2007/05/01 08:29:22 hewitson Exp $
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
10 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
11
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
12 if length(nin) > 20e6
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
13 nout = [nin(1:10) '_' num2str(length(nin)) '_' nin(end-10:end)];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
14 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
15 nout = nin;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
16 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
17
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
18 % END |