checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
---
2
2
SHA1:
3
- metadata.gz: 99115f46e648d9a330a16e6998507fe532bbaac7
4
- data.tar.gz: 4a7ca042f8bbe236adc0cec08c0ba820e7d26c89
3
+ metadata.gz: cd1879cca3683122f2deaf4d3e42937f5a4fe870
4
+ data.tar.gz: 700d2f736b29de611e5b2834ea0e500e8e189a90
5
5
SHA512:
6
- metadata.gz: ccce1103568033abcdaa16ac33666e4b73c82f007550607c5b79564cb64ef24dae46d3f258963a3a5aa34263a9180298875f49539a6ba507025c70aad5fd1a94
7
- data.tar.gz: 5d1f555f4908071b4360c906209dfa90ae2d99ef0d7f5b2dd22788780331a0be2b53db73e76aad1ff39f5a56e364da6d3f78dfeb59f4fb170e9ffb85da6d06e4
6
+ metadata.gz: c131814294a059dbe6eb5eaf1a557be6a0326cbcf0fb81014e5c608feb2ed77fbb737cdbc085c331a85c164ab5ce6eeb6015b15f4eb7058e733cdcbf17ba0aea
7
+ data.tar.gz: 5f300c1af6f426f300d7a87478e44cf4de5d3daacef47df740628508a017c1fe92c2ccddb1d70ae5e04ac975ca97c4d2a90673d77dabe2102e7961d2bfe38ce4
data/lib/ast.rb CHANGED
@@ -8,7 +8,7 @@ module VHDL_TB
8
8
9
9
Identifier=Struct.new(:tok) do
10
10
def to_s
11
- "#{self.tok}"
11
+ self.tok.to_s
12
12
end
13
13
end
14
14
data/lib/compiler.rb CHANGED
@@ -11,7 +11,7 @@ module VHDL_TB
11
11
12
12
class Compiler
13
13
14
- VERSION = "0.6.3"
14
+ VERSION = "0.6.5"
15
15
16
16
def initialize
17
17
#puts __dir__
@@ -21,10 +21,9 @@ module VHDL_TB
21
21
end
22
22
23
23
def banner
24
- puts "-- "+"="*65
25
- puts "-- VHDL testbench generator -- Jean-Christophe Le Lann 2017-2018"
26
- puts "-- "+"="*65
24
+ #puts "-- "+"="*30
25
+ puts "==> VHDL testbench generator #{VERSION} <=="
26
+ #puts "-- "+"="*30
27
-
28
27
end
29
28
30
29
def analyze_options args
@@ -115,8 +114,6 @@ module VHDL_TB
115
114
end
116
115
end
117
116
118
-
119
-
120
117
end
121
118
end
122
119
data/lib/lexer.rb CHANGED
@@ -4,28 +4,39 @@ class Lexer < GenericLexer
4
4
def initialize
5
5
super
6
6
ignore /\s+/
7
+
8
+ #comments
9
+ token :comment => /--(.*)#x2F;
10
+
7
11
#....keywords
8
- token :entity => /entity/
9
- token :is => /is/
10
- token :generic => /generic/
11
- token :port => /port/
12
- token :in => /in/
13
- token :to => /to/
14
- token :downto => /downto/
15
- token :out => /out/
16
- token :end => /end/
17
- token :comment => /--(.*)#x2F;
18
- token :vassign => /\:\=/
19
- token :lparen => /\(/
20
- token :rparen => /\)/
21
- token :semicolon=> /\;/
22
- token :colon => /\:/
23
- token :dot => /\./
24
- token :comma => /\,/
25
- token :architecture => /architecture/
26
- token :of => /of/
12
+ keyword :entity
13
+ keyword :is
14
+ keyword :generic
15
+ keyword :port
16
+ keyword :in
17
+ keyword :to
18
+ keyword :downto
19
+ keyword :out
20
+ keyword :end
21
+ keyword :architecture
22
+ keyword :of
23
+
24
+ #punctuation
25
+ token :vassign => /\:\=/
26
+ token :sassign => /\<\=/
27
+ token :lparen => /\(/
28
+ token :rparen => /\)/
29
+ token :semicolon => /\;/
30
+ token :colon => /\:/
31
+ token :dot => /\./
32
+ token :comma => /\,/
33
+ token :rightarrow => /\=\>/
34
+ token :"-" => /\-/
35
+ token :"=" => /\=/
36
+ #terminals
27
37
token :id => /[a-zA-Z_][a-zA-Z0-9_]*/i
28
38
token :int_lit => /[0-9]+/
29
-
39
+ token :char_lit => /'[a-zA-Z0-9_]*'/
40
+ token :str_lit => /\"(.*)\"/
30
41
end
31
42
end
data/lib/parser.rb CHANGED
@@ -52,7 +52,7 @@ module VHDL_TB
52
52
end
53
53
54
54
def parse_entity
55
- entity=Entity.new(nil,[],[])
55
+ entity=Entity.new(nil,nil,[])
56
56
expect :entity
57
57
entity.name=expect :id
58
58
expect :is
data/lib/template.tb.vhd CHANGED
@@ -1,5 +1,5 @@
1
1
-----------------------------------------------------------------
2
- -- This file was generated automatically by tb_gen Ruby utility
2
+ -- This file was generated automatically by vhdl_tb Ruby utility
3
3
-- date : <%=Time.now.strftime("(d/m/y) %d/%m/%Y %H:%M")%>
4
4
-- Author : Jean-Christophe Le Lann - 2014
5
5
-----------------------------------------------------------------
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
--- !ruby/object:Gem::Specification
2
2
name: vhdl_tb
3
3
version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.6.5
5
5
platform: ruby
6
6
authors:
7
7
- Jean-Christophe Le Lann
8
8
autorequire:
9
9
bindir: bin
10
10
cert_chain: []
11
- date: 2018-04-06 00:00:00.000000000 Z
11
+ date: 2018-06-01 00:00:00.000000000 Z
12
12
dependencies: []
13
13
description: A simple testbench generator for VHDL
14
14
email: jean-christophe.le_lann@ensta-bretagne.fr