nasl 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. data/bin/nasl-parse +1 -1
  2. data/lib/nasl.rb +1 -1
  3. data/lib/nasl/cli.rb +1 -1
  4. data/lib/nasl/command.rb +1 -1
  5. data/lib/nasl/commands/benchmark.rb +1 -1
  6. data/lib/nasl/commands/parse.rb +1 -1
  7. data/lib/nasl/commands/test.rb +1 -1
  8. data/lib/nasl/commands/tokenize.rb +2 -2
  9. data/lib/nasl/commands/xml.rb +1 -1
  10. data/lib/nasl/context.rb +1 -1
  11. data/lib/nasl/grammar.racc +23 -2
  12. data/lib/nasl/parser.rb +1 -1
  13. data/lib/nasl/parser/argument.rb +1 -1
  14. data/lib/nasl/parser/assigment.rb +1 -1
  15. data/lib/nasl/parser/block.rb +1 -1
  16. data/lib/nasl/parser/break.rb +1 -1
  17. data/lib/nasl/parser/call.rb +1 -1
  18. data/lib/nasl/parser/comment.rb +46 -0
  19. data/lib/nasl/parser/continue.rb +1 -1
  20. data/lib/nasl/parser/decrement.rb +1 -1
  21. data/lib/nasl/parser/empty.rb +1 -1
  22. data/lib/nasl/parser/export.rb +1 -1
  23. data/lib/nasl/parser/expression.rb +1 -1
  24. data/lib/nasl/parser/for.rb +1 -1
  25. data/lib/nasl/parser/foreach.rb +1 -1
  26. data/lib/nasl/parser/function.rb +1 -1
  27. data/lib/nasl/parser/global.rb +1 -1
  28. data/lib/nasl/parser/identifier.rb +1 -1
  29. data/lib/nasl/parser/if.rb +1 -1
  30. data/lib/nasl/parser/import.rb +1 -1
  31. data/lib/nasl/parser/include.rb +1 -1
  32. data/lib/nasl/parser/increment.rb +1 -1
  33. data/lib/nasl/parser/integer.rb +1 -1
  34. data/lib/nasl/parser/ip.rb +1 -1
  35. data/lib/nasl/parser/local.rb +1 -1
  36. data/lib/nasl/parser/lvalue.rb +1 -1
  37. data/lib/nasl/parser/node.rb +1 -1
  38. data/lib/nasl/parser/repeat.rb +1 -1
  39. data/lib/nasl/parser/repetition.rb +1 -1
  40. data/lib/nasl/parser/return.rb +1 -1
  41. data/lib/nasl/parser/string.rb +1 -1
  42. data/lib/nasl/parser/tree.rb +1 -1
  43. data/lib/nasl/parser/undefined.rb +1 -1
  44. data/lib/nasl/parser/while.rb +1 -1
  45. data/lib/nasl/test.rb +1 -1
  46. data/lib/nasl/token.rb +1 -1
  47. data/lib/nasl/tokenizer.rb +66 -5
  48. data/lib/nasl/version.rb +1 -1
  49. data/test/unit/parser/test_assignment.rb +1 -1
  50. data/test/unit/parser/test_blank.rb +1 -1
  51. data/test/unit/parser/test_block.rb +1 -1
  52. data/test/unit/parser/test_call.rb +1 -1
  53. data/test/unit/parser/test_comment.rb +140 -0
  54. data/test/unit/parser/test_constant.rb +1 -1
  55. data/test/unit/parser/test_empty.rb +1 -1
  56. data/test/unit/parser/test_expressions.rb +1 -1
  57. data/test/unit/parser/test_function.rb +1 -1
  58. data/test/unit/parser/test_if.rb +1 -1
  59. data/test/unit/parser/test_include.rb +1 -1
  60. data/test/unit/parser/test_incr_decr.rb +1 -1
  61. data/test/unit/parser/test_ip.rb +1 -1
  62. data/test/unit/parser/test_return.rb +1 -1
  63. data/test/unit/parser/test_string.rb +1 -1
  64. data/test/unit/parser/test_whitespace.rb +1 -1
  65. data/test/unit/test_context.rb +1 -1
  66. data/test/unit/tokenizer/test_comment.rb +218 -0
  67. data/test/unit/tokenizer/test_empty.rb +1 -9
  68. data/test/unit/tokenizer/test_integer.rb +1 -1
  69. data/test/unit/tokenizer/test_string.rb +1 -1
  70. 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
@@ -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
@@ -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
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.5
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-01-26 00:00:00.000000000Z
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: &17202278380 !ruby/object:Gem::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: *17202278380
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: &17202277900 !ruby/object:Gem::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: *17202277900
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: &17202277380 !ruby/object:Gem::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: *17202277380
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: &17202276900 !ruby/object:Gem::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: *17202276900
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.10
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.