nasl 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/nasl-parse +1 -1
- data/lib/nasl.rb +1 -1
- data/lib/nasl/cli.rb +1 -1
- data/lib/nasl/command.rb +1 -1
- data/lib/nasl/commands/benchmark.rb +1 -1
- data/lib/nasl/commands/parse.rb +1 -1
- data/lib/nasl/commands/test.rb +1 -1
- data/lib/nasl/commands/tokenize.rb +2 -2
- data/lib/nasl/commands/xml.rb +1 -1
- data/lib/nasl/context.rb +1 -1
- data/lib/nasl/grammar.racc +23 -2
- data/lib/nasl/parser.rb +1 -1
- data/lib/nasl/parser/argument.rb +1 -1
- data/lib/nasl/parser/assigment.rb +1 -1
- data/lib/nasl/parser/block.rb +1 -1
- data/lib/nasl/parser/break.rb +1 -1
- data/lib/nasl/parser/call.rb +1 -1
- data/lib/nasl/parser/comment.rb +46 -0
- data/lib/nasl/parser/continue.rb +1 -1
- data/lib/nasl/parser/decrement.rb +1 -1
- data/lib/nasl/parser/empty.rb +1 -1
- data/lib/nasl/parser/export.rb +1 -1
- data/lib/nasl/parser/expression.rb +1 -1
- data/lib/nasl/parser/for.rb +1 -1
- data/lib/nasl/parser/foreach.rb +1 -1
- data/lib/nasl/parser/function.rb +1 -1
- data/lib/nasl/parser/global.rb +1 -1
- data/lib/nasl/parser/identifier.rb +1 -1
- data/lib/nasl/parser/if.rb +1 -1
- data/lib/nasl/parser/import.rb +1 -1
- data/lib/nasl/parser/include.rb +1 -1
- data/lib/nasl/parser/increment.rb +1 -1
- data/lib/nasl/parser/integer.rb +1 -1
- data/lib/nasl/parser/ip.rb +1 -1
- data/lib/nasl/parser/local.rb +1 -1
- data/lib/nasl/parser/lvalue.rb +1 -1
- data/lib/nasl/parser/node.rb +1 -1
- data/lib/nasl/parser/repeat.rb +1 -1
- data/lib/nasl/parser/repetition.rb +1 -1
- data/lib/nasl/parser/return.rb +1 -1
- data/lib/nasl/parser/string.rb +1 -1
- data/lib/nasl/parser/tree.rb +1 -1
- data/lib/nasl/parser/undefined.rb +1 -1
- data/lib/nasl/parser/while.rb +1 -1
- data/lib/nasl/test.rb +1 -1
- data/lib/nasl/token.rb +1 -1
- data/lib/nasl/tokenizer.rb +66 -5
- data/lib/nasl/version.rb +1 -1
- data/test/unit/parser/test_assignment.rb +1 -1
- data/test/unit/parser/test_blank.rb +1 -1
- data/test/unit/parser/test_block.rb +1 -1
- data/test/unit/parser/test_call.rb +1 -1
- data/test/unit/parser/test_comment.rb +140 -0
- data/test/unit/parser/test_constant.rb +1 -1
- data/test/unit/parser/test_empty.rb +1 -1
- data/test/unit/parser/test_expressions.rb +1 -1
- data/test/unit/parser/test_function.rb +1 -1
- data/test/unit/parser/test_if.rb +1 -1
- data/test/unit/parser/test_include.rb +1 -1
- data/test/unit/parser/test_incr_decr.rb +1 -1
- data/test/unit/parser/test_ip.rb +1 -1
- data/test/unit/parser/test_return.rb +1 -1
- data/test/unit/parser/test_string.rb +1 -1
- data/test/unit/parser/test_whitespace.rb +1 -1
- data/test/unit/test_context.rb +1 -1
- data/test/unit/tokenizer/test_comment.rb +218 -0
- data/test/unit/tokenizer/test_empty.rb +1 -9
- data/test/unit/tokenizer/test_integer.rb +1 -1
- data/test/unit/tokenizer/test_string.rb +1 -1
- metadata +34 -11
@@ -1,5 +1,5 @@
|
|
1
1
|
################################################################################
|
2
|
-
# Copyright (c) 2011, Mak Kolybabi
|
2
|
+
# Copyright (c) 2011-2012, Mak Kolybabi
|
3
3
|
# All rights reserved.
|
4
4
|
#
|
5
5
|
# Redistribution and use in source and binary forms, with or without
|
@@ -42,12 +42,4 @@ class TestTokenizerEmpty < Test::Unit::TestCase
|
|
42
42
|
assert_equal(:EOF, tok.type)
|
43
43
|
assert_equal("$", tok.body)
|
44
44
|
end
|
45
|
-
|
46
|
-
def test_comments
|
47
|
-
tkz = tokenize("#")
|
48
|
-
type, tok = tkz.get_token
|
49
|
-
assert_equal(false, type)
|
50
|
-
assert_equal(:EOF, tok.type)
|
51
|
-
assert_equal("$", tok.body)
|
52
|
-
end
|
53
45
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nasl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-09-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
16
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,15 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
25
30
|
- !ruby/object:Gem::Dependency
|
26
31
|
name: builder
|
27
|
-
requirement:
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
28
33
|
none: false
|
29
34
|
requirements:
|
30
35
|
- - ! '>='
|
@@ -32,10 +37,15 @@ dependencies:
|
|
32
37
|
version: '0'
|
33
38
|
type: :runtime
|
34
39
|
prerelease: false
|
35
|
-
version_requirements:
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
36
46
|
- !ruby/object:Gem::Dependency
|
37
47
|
name: racc
|
38
|
-
requirement:
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
39
49
|
none: false
|
40
50
|
requirements:
|
41
51
|
- - ! '>='
|
@@ -43,10 +53,15 @@ dependencies:
|
|
43
53
|
version: '0'
|
44
54
|
type: :runtime
|
45
55
|
prerelease: false
|
46
|
-
version_requirements:
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
47
62
|
- !ruby/object:Gem::Dependency
|
48
63
|
name: rainbow
|
49
|
-
requirement:
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
50
65
|
none: false
|
51
66
|
requirements:
|
52
67
|
- - ! '>='
|
@@ -54,7 +69,12 @@ dependencies:
|
|
54
69
|
version: '0'
|
55
70
|
type: :runtime
|
56
71
|
prerelease: false
|
57
|
-
version_requirements:
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
58
78
|
description:
|
59
79
|
email:
|
60
80
|
- mak@kolybabi.com
|
@@ -83,6 +103,7 @@ files:
|
|
83
103
|
- lib/nasl/parser/block.rb
|
84
104
|
- lib/nasl/parser/break.rb
|
85
105
|
- lib/nasl/parser/call.rb
|
106
|
+
- lib/nasl/parser/comment.rb
|
86
107
|
- lib/nasl/parser/continue.rb
|
87
108
|
- lib/nasl/parser/decrement.rb
|
88
109
|
- lib/nasl/parser/empty.rb
|
@@ -119,6 +140,7 @@ files:
|
|
119
140
|
- test/unit/parser/test_blank.rb
|
120
141
|
- test/unit/parser/test_block.rb
|
121
142
|
- test/unit/parser/test_call.rb
|
143
|
+
- test/unit/parser/test_comment.rb
|
122
144
|
- test/unit/parser/test_constant.rb
|
123
145
|
- test/unit/parser/test_empty.rb
|
124
146
|
- test/unit/parser/test_expressions.rb
|
@@ -131,6 +153,7 @@ files:
|
|
131
153
|
- test/unit/parser/test_string.rb
|
132
154
|
- test/unit/parser/test_whitespace.rb
|
133
155
|
- test/unit/test_context.rb
|
156
|
+
- test/unit/tokenizer/test_comment.rb
|
134
157
|
- test/unit/tokenizer/test_empty.rb
|
135
158
|
- test/unit/tokenizer/test_integer.rb
|
136
159
|
- test/unit/tokenizer/test_string.rb
|
@@ -155,7 +178,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
155
178
|
version: '0'
|
156
179
|
requirements: []
|
157
180
|
rubyforge_project: nasl
|
158
|
-
rubygems_version: 1.8.
|
181
|
+
rubygems_version: 1.8.24
|
159
182
|
signing_key:
|
160
183
|
specification_version: 3
|
161
184
|
summary: A parser for the Nessus Attack Scripting Language.
|