File: strutils.xml

package info (click to toggle)
adms 2.3.7-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,592 kB
  • sloc: xml: 7,167; perl: 4,866; ansic: 3,147; lex: 1,128; yacc: 691; sh: 323; makefile: 110
file content (75 lines) | stat: -rw-r--r-- 3,203 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<!--
  This file is part of adms - http://sourceforge.net/projects/mot-adms.

  adms is a code generator for the Verilog-AMS language.

  Copyright (C) 2002-2012 Laurent Lemaitre <r29173@users.sourceforge.net>

  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-->


<admst version="2.3.0"  xmlns:admst="http://mot-adms.svn.sourceforge.net/viewvc/*checkout*/mot-adms/trunk/adms/admst.dtd">
  <admst:open file="strutils.trg">
  upper-case: 1.0: B
  upper-case: 2.1: A
  upper-case: 3.0: B
  upper-case: 4.1: A
  upper-case: 5.4: COMMENTCAVA
  upper-case: 6.5: CAVATRESBIEN
  lower-case: 1.0: b
  lower-case: 2.1: a
  lower-case: 3.0: b
  lower-case: 4.1: a
  lower-case: 5.4: commentcava
  lower-case: 6.5: cavatresbien
  original: 1 B: 0: B
  original: 2 A: 1: A
  original: 3 b: 2: b
  original: 4 a: 3: a
  original: 5 CommentCaVa: 4: CommentCaVa
  original: 6 CaVatresBien: 5: CaVatresBien
---- basicstringbasicstringbasicstringbasicstringbasicstringbasicstring cavatresbiencommentcavaabab
---- basicstringbasicstringbasicstringbasicstringbasicstringbasicstring CAVATRESBIENCOMMENTCAVAABAB
oooo basicstringbasicstringbasicstringbasicstring CAVATRESBIENCOMMENTCAVAAB
oooo basicstringbasicstringbasicstringbasicstring CAVATRESBIENCOMMENTCAVAAB
  </admst:open>
  <admst:message format="strutils.trg: created\n"/>
  <admst:open file="strutils.va">
`include &quot;discipline.h&quot;
module strutils(p,n);
  inout p, n;
  electrical p, n;
  parameter real B=1.0;
  parameter real A=1.0;
  real b,a;
  real CommentCaVa,CaVatresBien;
  analog a=1;
endmodule
  </admst:open>
  <admst:message format="strutils.va: file created\n"/>
  <admst:read file="strutils.va"/>
  <admst:reverse select="/module/variable"/>
  <admst:variable name="upper-case" path="upper-case(/module/variable)"/>
  <admst:variable name="lower-case" path="lower-case(/module/variable)"/>
  <admst:text select="$(upper-case)" format="  upper-case: %(position(.)).%(index($(upper-case),.)): %(.)\n"/>
  <admst:text select="$(lower-case)" format="  lower-case: %(position(.)).%(index($(lower-case),.)): %(.)\n"/>
  <admst:text select="/module/variable" format="  original: %(position(.)) %(.): %(index(../variable,.)): %(.)\n"/>
  <admst:push into="/@lc" select="lower-case(/module/variable)"/>
  <admst:text format="---- %(/@lc/datatypename) %(/@lc)\n"/>
  <admst:text format="---- %(/@lc/datatypename) %(upper-case(/@lc))\n"/>
  <admst:push into="/@uc" select="upper-case(/module/variable)" onduplicate="ignore"/>
  <admst:text format="oooo %(/@uc/datatypename) %(/@uc)\n"/>
  <admst:text format="oooo %(/@uc/datatypename) %(upper-case(/@uc))\n"/>
</admst>