sfp 0.4.2 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +0 -2
- data/VERSION +1 -1
- data/lib/sfp/SfpLangLexer.rb +51 -51
- data/lib/sfp/SfpLangParser.rb +1114 -1106
- data/lib/sfp/Sfplib.rb +5 -5
- data/lib/sfp/parser.rb +13 -4
- data/lib/sfp/visitors.rb +7 -0
- data/src/SfpLang.g +6 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f74b51071bc249cc47e6f91e12e6e8ec0100b852
|
4
|
+
data.tar.gz: da737c02e956c87bec2581d3c94037125ebac648
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 65af9e251dc59c2703ae2e8fbd97cc59bb26ac7bef4ebf2b70cff92c8add181e97436ea3977cbbc0d553bc56e5fb29551e120dc236ec514ceaf17838f14e3a5f
|
7
|
+
data.tar.gz: 66c14dae30db399b4728514d2dfa4779aad73449598645b9a3cffbd0d47009dc735972b4e86278c442b7f1baef458f846ae0df7c6d67e3217a162e4c5312ae02
|
data/LICENSE
CHANGED
@@ -26,5 +26,3 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
26
26
|
The views and conclusions contained in the software and documentation are those
|
27
27
|
of the authors and should not be interpreted as representing official policies,
|
28
28
|
either expressed or implied, of the FreeBSD Project.
|
29
|
-
|
30
|
-
The solver binaries are under GPL License from http://fast-downward.org.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.4
|
data/lib/sfp/SfpLangLexer.rb
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
# Generated using ANTLR version: 3.5
|
6
6
|
# Ruby runtime library version: 1.10.0
|
7
7
|
# Input grammar file: SfpLang.g
|
8
|
-
# Generated at:
|
8
|
+
# Generated at: 2014-03-29 03:43:24
|
9
9
|
#
|
10
10
|
|
11
11
|
# ~~~> start load path setup
|
@@ -2041,7 +2041,7 @@ module SfpLang
|
|
2041
2041
|
|
2042
2042
|
|
2043
2043
|
# - - - - main rule block - - - -
|
2044
|
-
# at line
|
2044
|
+
# at line 1005:2: ( 'null' | 'nil' )
|
2045
2045
|
alt_1 = 2
|
2046
2046
|
look_1_0 = @input.peek( 1 )
|
2047
2047
|
|
@@ -2062,12 +2062,12 @@ module SfpLang
|
|
2062
2062
|
end
|
2063
2063
|
case alt_1
|
2064
2064
|
when 1
|
2065
|
-
# at line
|
2065
|
+
# at line 1005:4: 'null'
|
2066
2066
|
match( "null" )
|
2067
2067
|
|
2068
2068
|
|
2069
2069
|
when 2
|
2070
|
-
# at line
|
2070
|
+
# at line 1006:4: 'nil'
|
2071
2071
|
match( "nil" )
|
2072
2072
|
|
2073
2073
|
|
@@ -2096,7 +2096,7 @@ module SfpLang
|
|
2096
2096
|
|
2097
2097
|
|
2098
2098
|
# - - - - main rule block - - - -
|
2099
|
-
# at line
|
2099
|
+
# at line 1010:2: ( 'true' | 'false' | 'off' | 'on' | 'yes' | 'no' )
|
2100
2100
|
alt_2 = 6
|
2101
2101
|
case look_2 = @input.peek( 1 )
|
2102
2102
|
when 0x74 then alt_2 = 1
|
@@ -2119,32 +2119,32 @@ module SfpLang
|
|
2119
2119
|
end
|
2120
2120
|
case alt_2
|
2121
2121
|
when 1
|
2122
|
-
# at line
|
2122
|
+
# at line 1010:4: 'true'
|
2123
2123
|
match( "true" )
|
2124
2124
|
|
2125
2125
|
|
2126
2126
|
when 2
|
2127
|
-
# at line
|
2127
|
+
# at line 1011:4: 'false'
|
2128
2128
|
match( "false" )
|
2129
2129
|
|
2130
2130
|
|
2131
2131
|
when 3
|
2132
|
-
# at line
|
2132
|
+
# at line 1012:4: 'off'
|
2133
2133
|
match( "off" )
|
2134
2134
|
|
2135
2135
|
|
2136
2136
|
when 4
|
2137
|
-
# at line
|
2137
|
+
# at line 1013:4: 'on'
|
2138
2138
|
match( "on" )
|
2139
2139
|
|
2140
2140
|
|
2141
2141
|
when 5
|
2142
|
-
# at line
|
2142
|
+
# at line 1014:4: 'yes'
|
2143
2143
|
match( "yes" )
|
2144
2144
|
|
2145
2145
|
|
2146
2146
|
when 6
|
2147
|
-
# at line
|
2147
|
+
# at line 1015:4: 'no'
|
2148
2148
|
match( "no" )
|
2149
2149
|
|
2150
2150
|
|
@@ -2173,7 +2173,7 @@ module SfpLang
|
|
2173
2173
|
|
2174
2174
|
|
2175
2175
|
# - - - - main rule block - - - -
|
2176
|
-
# at line
|
2176
|
+
# at line 1018:6: ( 'a' .. 'z' | 'A' .. 'Z' ) ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' )*
|
2177
2177
|
if @input.peek( 1 ).between?( 0x41, 0x5a ) || @input.peek( 1 ).between?( 0x61, 0x7a )
|
2178
2178
|
@input.consume
|
2179
2179
|
else
|
@@ -2184,7 +2184,7 @@ module SfpLang
|
|
2184
2184
|
end
|
2185
2185
|
|
2186
2186
|
|
2187
|
-
# at line
|
2187
|
+
# at line 1018:25: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' )*
|
2188
2188
|
while true # decision 3
|
2189
2189
|
alt_3 = 2
|
2190
2190
|
look_3_0 = @input.peek( 1 )
|
@@ -2237,8 +2237,8 @@ module SfpLang
|
|
2237
2237
|
|
2238
2238
|
|
2239
2239
|
# - - - - main rule block - - - -
|
2240
|
-
# at line
|
2241
|
-
# at line
|
2240
|
+
# at line 1022:4: ( '-' )? ( '0' .. '9' )+
|
2241
|
+
# at line 1022:4: ( '-' )?
|
2242
2242
|
alt_4 = 2
|
2243
2243
|
look_4_0 = @input.peek( 1 )
|
2244
2244
|
|
@@ -2247,11 +2247,11 @@ module SfpLang
|
|
2247
2247
|
end
|
2248
2248
|
case alt_4
|
2249
2249
|
when 1
|
2250
|
-
# at line
|
2250
|
+
# at line 1022:4: '-'
|
2251
2251
|
match( 0x2d )
|
2252
2252
|
|
2253
2253
|
end
|
2254
|
-
# at file
|
2254
|
+
# at file 1022:8: ( '0' .. '9' )+
|
2255
2255
|
match_count_5 = 0
|
2256
2256
|
while true
|
2257
2257
|
alt_5 = 2
|
@@ -2311,7 +2311,7 @@ module SfpLang
|
|
2311
2311
|
|
2312
2312
|
|
2313
2313
|
# - - - - main rule block - - - -
|
2314
|
-
# at line
|
2314
|
+
# at line 1033:2: ( '//' (~ ( '\\n' | '\\r' ) )* | '#' (~ ( '\\n' | '\\r' ) )* | '/*' ( options {greedy=false; } : . )* '*/' )
|
2315
2315
|
alt_9 = 3
|
2316
2316
|
look_9_0 = @input.peek( 1 )
|
2317
2317
|
|
@@ -2334,10 +2334,10 @@ module SfpLang
|
|
2334
2334
|
end
|
2335
2335
|
case alt_9
|
2336
2336
|
when 1
|
2337
|
-
# at line
|
2337
|
+
# at line 1033:4: '//' (~ ( '\\n' | '\\r' ) )*
|
2338
2338
|
match( "//" )
|
2339
2339
|
|
2340
|
-
# at line
|
2340
|
+
# at line 1033:9: (~ ( '\\n' | '\\r' ) )*
|
2341
2341
|
while true # decision 6
|
2342
2342
|
alt_6 = 2
|
2343
2343
|
look_6_0 = @input.peek( 1 )
|
@@ -2372,9 +2372,9 @@ module SfpLang
|
|
2372
2372
|
|
2373
2373
|
|
2374
2374
|
when 2
|
2375
|
-
# at line
|
2375
|
+
# at line 1034:4: '#' (~ ( '\\n' | '\\r' ) )*
|
2376
2376
|
match( 0x23 )
|
2377
|
-
# at line
|
2377
|
+
# at line 1034:8: (~ ( '\\n' | '\\r' ) )*
|
2378
2378
|
while true # decision 7
|
2379
2379
|
alt_7 = 2
|
2380
2380
|
look_7_0 = @input.peek( 1 )
|
@@ -2409,10 +2409,10 @@ module SfpLang
|
|
2409
2409
|
|
2410
2410
|
|
2411
2411
|
when 3
|
2412
|
-
# at line
|
2412
|
+
# at line 1035:4: '/*' ( options {greedy=false; } : . )* '*/'
|
2413
2413
|
match( "/*" )
|
2414
2414
|
|
2415
|
-
# at line
|
2415
|
+
# at line 1035:9: ( options {greedy=false; } : . )*
|
2416
2416
|
while true # decision 8
|
2417
2417
|
alt_8 = 2
|
2418
2418
|
look_8_0 = @input.peek( 1 )
|
@@ -2432,7 +2432,7 @@ module SfpLang
|
|
2432
2432
|
end
|
2433
2433
|
case alt_8
|
2434
2434
|
when 1
|
2435
|
-
# at line
|
2435
|
+
# at line 1035:37: .
|
2436
2436
|
match_any
|
2437
2437
|
|
2438
2438
|
else
|
@@ -2474,10 +2474,10 @@ module SfpLang
|
|
2474
2474
|
|
2475
2475
|
|
2476
2476
|
# - - - - main rule block - - - -
|
2477
|
-
# at line
|
2477
|
+
# at line 1039:4: 'r\"' ( options {greedy=false; } : . )* '\"'
|
2478
2478
|
match( "r\"" )
|
2479
2479
|
|
2480
|
-
# at line
|
2480
|
+
# at line 1039:9: ( options {greedy=false; } : . )*
|
2481
2481
|
while true # decision 10
|
2482
2482
|
alt_10 = 2
|
2483
2483
|
look_10_0 = @input.peek( 1 )
|
@@ -2490,7 +2490,7 @@ module SfpLang
|
|
2490
2490
|
end
|
2491
2491
|
case alt_10
|
2492
2492
|
when 1
|
2493
|
-
# at line
|
2493
|
+
# at line 1039:37: .
|
2494
2494
|
match_any
|
2495
2495
|
|
2496
2496
|
else
|
@@ -2524,8 +2524,8 @@ module SfpLang
|
|
2524
2524
|
|
2525
2525
|
|
2526
2526
|
# - - - - main rule block - - - -
|
2527
|
-
# at line
|
2528
|
-
# at line
|
2527
|
+
# at line 1042:6: ( ( '\\r' )? '\\n' | ';' )
|
2528
|
+
# at line 1042:6: ( ( '\\r' )? '\\n' | ';' )
|
2529
2529
|
alt_12 = 2
|
2530
2530
|
look_12_0 = @input.peek( 1 )
|
2531
2531
|
|
@@ -2539,8 +2539,8 @@ module SfpLang
|
|
2539
2539
|
end
|
2540
2540
|
case alt_12
|
2541
2541
|
when 1
|
2542
|
-
# at line
|
2543
|
-
# at line
|
2542
|
+
# at line 1042:7: ( '\\r' )? '\\n'
|
2543
|
+
# at line 1042:7: ( '\\r' )?
|
2544
2544
|
alt_11 = 2
|
2545
2545
|
look_11_0 = @input.peek( 1 )
|
2546
2546
|
|
@@ -2549,14 +2549,14 @@ module SfpLang
|
|
2549
2549
|
end
|
2550
2550
|
case alt_11
|
2551
2551
|
when 1
|
2552
|
-
# at line
|
2552
|
+
# at line 1042:7: '\\r'
|
2553
2553
|
match( 0xd )
|
2554
2554
|
|
2555
2555
|
end
|
2556
2556
|
match( 0xa )
|
2557
2557
|
|
2558
2558
|
when 2
|
2559
|
-
# at line
|
2559
|
+
# at line 1042:18: ';'
|
2560
2560
|
match( 0x3b )
|
2561
2561
|
|
2562
2562
|
end
|
@@ -2585,7 +2585,7 @@ module SfpLang
|
|
2585
2585
|
|
2586
2586
|
|
2587
2587
|
# - - - - main rule block - - - -
|
2588
|
-
# at line
|
2588
|
+
# at line 1045:8: ( ' ' | '\\t' )
|
2589
2589
|
if @input.peek(1) == 0x9 || @input.peek(1) == 0x20
|
2590
2590
|
@input.consume
|
2591
2591
|
else
|
@@ -2626,9 +2626,9 @@ module SfpLang
|
|
2626
2626
|
|
2627
2627
|
|
2628
2628
|
# - - - - main rule block - - - -
|
2629
|
-
# at line
|
2629
|
+
# at line 1049:5: '\"' ( ESC_SEQ |~ ( '\\\\' | '\"' ) )* '\"'
|
2630
2630
|
match( 0x22 )
|
2631
|
-
# at line
|
2631
|
+
# at line 1049:9: ( ESC_SEQ |~ ( '\\\\' | '\"' ) )*
|
2632
2632
|
while true # decision 13
|
2633
2633
|
alt_13 = 3
|
2634
2634
|
look_13_0 = @input.peek( 1 )
|
@@ -2641,12 +2641,12 @@ module SfpLang
|
|
2641
2641
|
end
|
2642
2642
|
case alt_13
|
2643
2643
|
when 1
|
2644
|
-
# at line
|
2644
|
+
# at line 1049:11: ESC_SEQ
|
2645
2645
|
esc_seq!
|
2646
2646
|
|
2647
2647
|
|
2648
2648
|
when 2
|
2649
|
-
# at line
|
2649
|
+
# at line 1049:21: ~ ( '\\\\' | '\"' )
|
2650
2650
|
if @input.peek( 1 ).between?( 0x0, 0x21 ) || @input.peek( 1 ).between?( 0x23, 0x5b ) || @input.peek( 1 ).between?( 0x5d, 0xff )
|
2651
2651
|
@input.consume
|
2652
2652
|
else
|
@@ -2686,7 +2686,7 @@ module SfpLang
|
|
2686
2686
|
|
2687
2687
|
|
2688
2688
|
# - - - - main rule block - - - -
|
2689
|
-
# at line
|
2689
|
+
# at line 1054:12: ( 'e' | 'E' ) ( '+' | '-' )? ( '0' .. '9' )+
|
2690
2690
|
if @input.peek(1) == 0x45 || @input.peek(1) == 0x65
|
2691
2691
|
@input.consume
|
2692
2692
|
else
|
@@ -2697,7 +2697,7 @@ module SfpLang
|
|
2697
2697
|
end
|
2698
2698
|
|
2699
2699
|
|
2700
|
-
# at line
|
2700
|
+
# at line 1054:22: ( '+' | '-' )?
|
2701
2701
|
alt_14 = 2
|
2702
2702
|
look_14_0 = @input.peek( 1 )
|
2703
2703
|
|
@@ -2719,7 +2719,7 @@ module SfpLang
|
|
2719
2719
|
|
2720
2720
|
|
2721
2721
|
end
|
2722
|
-
# at file
|
2722
|
+
# at file 1054:33: ( '0' .. '9' )+
|
2723
2723
|
match_count_15 = 0
|
2724
2724
|
while true
|
2725
2725
|
alt_15 = 2
|
@@ -2803,7 +2803,7 @@ module SfpLang
|
|
2803
2803
|
|
2804
2804
|
|
2805
2805
|
# - - - - main rule block - - - -
|
2806
|
-
# at line
|
2806
|
+
# at line 1061:2: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | UNICODE_ESC | OCTAL_ESC )
|
2807
2807
|
alt_16 = 3
|
2808
2808
|
look_16_0 = @input.peek( 1 )
|
2809
2809
|
|
@@ -2822,7 +2822,7 @@ module SfpLang
|
|
2822
2822
|
end
|
2823
2823
|
case alt_16
|
2824
2824
|
when 1
|
2825
|
-
# at line
|
2825
|
+
# at line 1061:6: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' )
|
2826
2826
|
match( 0x5c )
|
2827
2827
|
if @input.peek(1) == 0x22 || @input.peek(1) == 0x27 || @input.peek(1) == 0x5c || @input.peek(1) == 0x62 || @input.peek(1) == 0x66 || @input.peek(1) == 0x6e || @input.peek(1) == 0x72 || @input.peek(1) == 0x74
|
2828
2828
|
@input.consume
|
@@ -2836,12 +2836,12 @@ module SfpLang
|
|
2836
2836
|
|
2837
2837
|
|
2838
2838
|
when 2
|
2839
|
-
# at line
|
2839
|
+
# at line 1062:6: UNICODE_ESC
|
2840
2840
|
unicode_esc!
|
2841
2841
|
|
2842
2842
|
|
2843
2843
|
when 3
|
2844
|
-
# at line
|
2844
|
+
# at line 1063:6: OCTAL_ESC
|
2845
2845
|
octal_esc!
|
2846
2846
|
|
2847
2847
|
|
@@ -2864,7 +2864,7 @@ module SfpLang
|
|
2864
2864
|
|
2865
2865
|
|
2866
2866
|
# - - - - main rule block - - - -
|
2867
|
-
# at line
|
2867
|
+
# at line 1068:2: ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) )
|
2868
2868
|
alt_17 = 3
|
2869
2869
|
look_17_0 = @input.peek( 1 )
|
2870
2870
|
|
@@ -2906,7 +2906,7 @@ module SfpLang
|
|
2906
2906
|
end
|
2907
2907
|
case alt_17
|
2908
2908
|
when 1
|
2909
|
-
# at line
|
2909
|
+
# at line 1068:6: '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' )
|
2910
2910
|
match( 0x5c )
|
2911
2911
|
if @input.peek( 1 ).between?( 0x30, 0x33 )
|
2912
2912
|
@input.consume
|
@@ -2940,7 +2940,7 @@ module SfpLang
|
|
2940
2940
|
|
2941
2941
|
|
2942
2942
|
when 2
|
2943
|
-
# at line
|
2943
|
+
# at line 1069:6: '\\\\' ( '0' .. '7' ) ( '0' .. '7' )
|
2944
2944
|
match( 0x5c )
|
2945
2945
|
if @input.peek( 1 ).between?( 0x30, 0x37 )
|
2946
2946
|
@input.consume
|
@@ -2964,7 +2964,7 @@ module SfpLang
|
|
2964
2964
|
|
2965
2965
|
|
2966
2966
|
when 3
|
2967
|
-
# at line
|
2967
|
+
# at line 1070:6: '\\\\' ( '0' .. '7' )
|
2968
2968
|
match( 0x5c )
|
2969
2969
|
if @input.peek( 1 ).between?( 0x30, 0x37 )
|
2970
2970
|
@input.consume
|
@@ -2996,7 +2996,7 @@ module SfpLang
|
|
2996
2996
|
|
2997
2997
|
|
2998
2998
|
# - - - - main rule block - - - -
|
2999
|
-
# at line
|
2999
|
+
# at line 1075:6: '\\\\' 'u' HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT
|
3000
3000
|
match( 0x5c )
|
3001
3001
|
match( 0x75 )
|
3002
3002
|
|