dbc 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/dbcparse.rb +281 -0
- data/lib/dbc/ctokenizer.rb +379 -0
- data/lib/dbc/ctype.rb +2397 -0
- data/lib/dbc/dbc.rb +237 -0
- data/lib/dbc/define.rb +302 -0
- data/lib/dbc/expand_function.rb +132 -0
- data/lib/dbc/ocl.rb +2166 -0
- data/lib/dbc/parameters.rb +400 -0
- data/lib/dbc/parseerrorhandler.rb +19 -0
- data/lib/dbc/preprocessor.rb +1790 -0
- data/lib/dbc/searchpath.rb +40 -0
- metadata +49 -0
@@ -0,0 +1,40 @@
|
|
1
|
+
# Copyright (c) 2004 Charles M Mills
|
2
|
+
# This document is licenced under The MIT Licence.
|
3
|
+
# THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.
|
4
|
+
# See included LICENCE file.
|
5
|
+
|
6
|
+
class SearchPath
|
7
|
+
def SearchPath.check(p)
|
8
|
+
if !File.exists?(p) or !File.directory?(p)
|
9
|
+
raise "invalid search path: #{p}"
|
10
|
+
end
|
11
|
+
end
|
12
|
+
def initialize
|
13
|
+
@paths = []
|
14
|
+
end
|
15
|
+
def add(path, check=true)
|
16
|
+
SearchPath.check(path)
|
17
|
+
@paths << path
|
18
|
+
end
|
19
|
+
def unshift(path)
|
20
|
+
SearchPath.check(path)
|
21
|
+
@paths.unshift(path)
|
22
|
+
end
|
23
|
+
def <<(path)
|
24
|
+
self.add(path)
|
25
|
+
end
|
26
|
+
|
27
|
+
def check
|
28
|
+
@paths.each do |p|
|
29
|
+
SearchPath.check(p)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
def find(file)
|
33
|
+
dir = @paths.find do |inc_dir|
|
34
|
+
File.exists?(File.join(inc_dir, file))
|
35
|
+
end
|
36
|
+
raise ArgumentError, "'#{file}' not found" unless dir
|
37
|
+
File.join(dir, file)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
metadata
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
rubygems_version: 0.8.1
|
3
|
+
specification_version: 1
|
4
|
+
name: dbc
|
5
|
+
version: !ruby/object:Gem::Version
|
6
|
+
version: 1.1.0
|
7
|
+
date: 2004-10-29
|
8
|
+
summary: Design by Contract (DBC) for C
|
9
|
+
require_paths:
|
10
|
+
- lib
|
11
|
+
- bin
|
12
|
+
author: Charlie Mills
|
13
|
+
email: cmills@freeshell.org
|
14
|
+
homepage: http://dbc.rubyforge.org
|
15
|
+
rubyforge_project: dbc
|
16
|
+
description:
|
17
|
+
autorequire: dbcparse
|
18
|
+
default_executable: dbcparse.rb
|
19
|
+
bindir: bin
|
20
|
+
has_rdoc: false
|
21
|
+
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
22
|
+
requirements:
|
23
|
+
-
|
24
|
+
- ">"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.0.0
|
27
|
+
version:
|
28
|
+
platform: ruby
|
29
|
+
files:
|
30
|
+
- lib/dbc
|
31
|
+
- lib/dbc/ctokenizer.rb
|
32
|
+
- lib/dbc/ctype.rb
|
33
|
+
- lib/dbc/dbc.rb
|
34
|
+
- lib/dbc/define.rb
|
35
|
+
- lib/dbc/expand_function.rb
|
36
|
+
- lib/dbc/ocl.rb
|
37
|
+
- lib/dbc/parameters.rb
|
38
|
+
- lib/dbc/parseerrorhandler.rb
|
39
|
+
- lib/dbc/preprocessor.rb
|
40
|
+
- lib/dbc/searchpath.rb
|
41
|
+
- bin/dbcparse.rb
|
42
|
+
test_files: []
|
43
|
+
rdoc_options: []
|
44
|
+
extra_rdoc_files: []
|
45
|
+
executables:
|
46
|
+
- dbcparse.rb
|
47
|
+
extensions: []
|
48
|
+
requirements: []
|
49
|
+
dependencies: []
|