tp_plus 0.0.76 → 0.0.77
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.
- checksums.yaml +4 -4
- data/lib/tp_plus/nodes/acc_node.rb +19 -0
- data/lib/tp_plus/parser.rb +665 -655
- data/lib/tp_plus/token.rb +1 -0
- data/lib/tp_plus/version.rb +1 -1
- data/lib/tp_plus.rb +1 -0
- data/test/tp_plus/test_interpreter.rb +20 -0
- metadata +4 -4
data/lib/tp_plus/token.rb
CHANGED
data/lib/tp_plus/version.rb
CHANGED
data/lib/tp_plus.rb
CHANGED
@@ -1207,6 +1207,26 @@ P[2:"test2"]{
|
|
1207
1207
|
end
|
1208
1208
|
end
|
1209
1209
|
|
1210
|
+
def test_acc_zero
|
1211
|
+
parse("foo := PR[1]\nlinear_move.to(foo).at(2000, 'mm/s').term(0).acc(0)")
|
1212
|
+
assert_prog "L PR[1:foo] 2000mm/sec CNT0 ACC0 ;\n"
|
1213
|
+
end
|
1214
|
+
|
1215
|
+
def test_acc_150
|
1216
|
+
parse("foo := PR[1]\nlinear_move.to(foo).at(2000, 'mm/s').term(0).acc(150)")
|
1217
|
+
assert_prog "L PR[1:foo] 2000mm/sec CNT0 ACC150 ;\n"
|
1218
|
+
end
|
1219
|
+
|
1220
|
+
def test_acc_with_constant
|
1221
|
+
parse("foo := PR[1]\nBAR := 50\nlinear_move.to(foo).at(2000, 'mm/s').term(0).acc(BAR)")
|
1222
|
+
assert_prog "L PR[1:foo] 2000mm/sec CNT0 ACC50 ;\n"
|
1223
|
+
end
|
1224
|
+
|
1225
|
+
def test_acc_with_var
|
1226
|
+
parse("foo := PR[1]\nbar := R[1]\nlinear_move.to(foo).at(2000, 'mm/s').term(0).acc(bar)")
|
1227
|
+
assert_prog "L PR[1:foo] 2000mm/sec CNT0 ACC R[1:bar] ;\n"
|
1228
|
+
end
|
1229
|
+
|
1210
1230
|
def test_term_fine_with_constant
|
1211
1231
|
parse("foo := PR[1]\nTERM := -1\nlinear_move.to(foo).at(2000, 'mm/s').term(TERM)")
|
1212
1232
|
assert_prog "L PR[1:foo] 2000mm/sec FINE ;\n"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tp_plus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.77
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jay Strybis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-06-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: benchmark-ips
|
@@ -109,6 +109,7 @@ files:
|
|
109
109
|
- lib/tp_plus/interpreter.rb
|
110
110
|
- lib/tp_plus/namespace.rb
|
111
111
|
- lib/tp_plus/nodes/abort_node.rb
|
112
|
+
- lib/tp_plus/nodes/acc_node.rb
|
112
113
|
- lib/tp_plus/nodes/address_node.rb
|
113
114
|
- lib/tp_plus/nodes/argument_node.rb
|
114
115
|
- lib/tp_plus/nodes/assignment_node.rb
|
@@ -191,7 +192,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
191
192
|
version: 1.3.6
|
192
193
|
requirements: []
|
193
194
|
rubyforge_project:
|
194
|
-
rubygems_version: 2.
|
195
|
+
rubygems_version: 2.5.1
|
195
196
|
signing_key:
|
196
197
|
specification_version: 4
|
197
198
|
summary: A higher-level abstraction of FANUC TP
|
@@ -200,4 +201,3 @@ test_files:
|
|
200
201
|
- test/tp_plus/test_interpreter.rb
|
201
202
|
- test/tp_plus/test_parser.rb
|
202
203
|
- test/tp_plus/test_scanner.rb
|
203
|
-
has_rdoc:
|