EFL 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/README.txt +36 -0
- data/lib/EFL.rb +494 -0
- data/lib/EFL_array.rb +20 -0
- data/lib/EFL_errors.rb +48 -0
- data/lib/EFL_hash.rb +18 -0
- data/lib/EFL_production.rb +49 -0
- data/lib/EFL_regexp.rb +112 -0
- data/lib/EFL_regexp_generator.rb +70 -0
- data/lib/EFL_substitution.rb +221 -0
- data/lib/EFL_syntactic_sugar.rb +67 -0
- data/lib/Hash Doc.doc +0 -0
- data/lib/Limitaciones.txt +3 -0
- data/lib/doc/classes/Generator.html +634 -0
- data/lib/doc/classes/Generator.src/M000008.html +18 -0
- data/lib/doc/classes/Generator.src/M000009.html +18 -0
- data/lib/doc/classes/Generator.src/M000010.html +18 -0
- data/lib/doc/classes/Generator.src/M000011.html +18 -0
- data/lib/doc/classes/Generator.src/M000012.html +18 -0
- data/lib/doc/classes/Generator.src/M000013.html +18 -0
- data/lib/doc/classes/Generator.src/M000014.html +18 -0
- data/lib/doc/classes/Generator.src/M000015.html +18 -0
- data/lib/doc/classes/Generator.src/M000016.html +28 -0
- data/lib/doc/classes/Generator.src/M000017.html +24 -0
- data/lib/doc/classes/Generator.src/M000018.html +157 -0
- data/lib/doc/classes/Generator.src/M000019.html +25 -0
- data/lib/doc/classes/Generator.src/M000020.html +30 -0
- data/lib/doc/classes/Generator.src/M000021.html +32 -0
- data/lib/doc/classes/Generator.src/M000022.html +22 -0
- data/lib/doc/classes/Generator.src/M000023.html +18 -0
- data/lib/doc/classes/Generator.src/M000024.html +27 -0
- data/lib/doc/classes/Generator.src/M000025.html +22 -0
- data/lib/doc/classes/Generator.src/M000026.html +18 -0
- data/lib/doc/classes/Generator.src/M000027.html +27 -0
- data/lib/doc/classes/Regexp.html +271 -0
- data/lib/doc/classes/Regexp.src/M000028.html +37 -0
- data/lib/doc/classes/Regexp.src/M000029.html +29 -0
- data/lib/doc/classes/Regexp.src/M000030.html +32 -0
- data/lib/doc/created.rid +1 -0
- data/lib/doc/files/EFL_rb.html +147 -0
- data/lib/doc/files/EFL_regexp_generator_rb.html +242 -0
- data/lib/doc/files/EFL_regexp_generator_rb.src/M000003.html +27 -0
- data/lib/doc/files/EFL_regexp_generator_rb.src/M000004.html +27 -0
- data/lib/doc/files/EFL_regexp_generator_rb.src/M000005.html +19 -0
- data/lib/doc/files/EFL_regexp_generator_rb.src/M000006.html +20 -0
- data/lib/doc/files/EFL_regexp_generator_rb.src/M000007.html +19 -0
- data/lib/doc/files/EFL_regexp_rb.html +139 -0
- data/lib/doc/files/EFL_syntactic_sugar_rb.html +208 -0
- data/lib/doc/files/EFL_syntactic_sugar_rb.src/M000001.html +29 -0
- data/lib/doc/files/EFL_syntactic_sugar_rb.src/M000002.html +19 -0
- data/lib/doc/fr_class_index.html +28 -0
- data/lib/doc/fr_file_index.html +30 -0
- data/lib/doc/fr_method_index.html +56 -0
- data/lib/doc/index.html +24 -0
- data/tests/Add_Sup_1.rb +223 -0
- data/tests/Add_Sup_1.rb.bak +223 -0
- data/tests/Add_Sup_1_NI.rb +25 -0
- data/tests/Add_Sup_2.rb +142 -0
- data/tests/Add_Sup_2.rb.bak +140 -0
- data/tests/All.rb +2 -0
- data/tests/All_1.rb +7 -0
- data/tests/All_2.rb +7 -0
- data/tests/All_2.rb.bak +5 -0
- data/tests/BeforeAfter.rb +83 -0
- data/tests/Bloques.rb +34 -0
- data/tests/Bloques.rb.bak +34 -0
- data/tests/Complementary.rb +144 -0
- data/tests/ComplementaryZoom.rb +78 -0
- data/tests/Del.rb +126 -0
- data/tests/Dup.rb +55 -0
- data/tests/Dup.rb.bak +54 -0
- data/tests/Error.rb +11 -0
- data/tests/ErrorArgClass.rb +169 -0
- data/tests/ErrorArgClass.rb.bak +158 -0
- data/tests/ErrorCollision.rb +218 -0
- data/tests/ErrorCollision.rb.bak +219 -0
- data/tests/ErrorWithoutDeclaration.rb +60 -0
- data/tests/ErrorWithoutDeclaration.rb.bak +60 -0
- data/tests/Extract.rb +56 -0
- data/tests/ExtractDollar.rb +17 -0
- data/tests/HashTest.rb +54 -0
- data/tests/HashTest.rb.bak +54 -0
- data/tests/Lista Czarnecki/AntiguaInterfaz/List.cpp +75 -0
- data/tests/Lista Czarnecki/AntiguaInterfaz/ListTransformer.rb +69 -0
- data/tests/Lista Czarnecki/AntiguaInterfaz/ListTransformer.rb.bak +100 -0
- data/tests/Lista Czarnecki/AntiguaInterfaz/ejecutame.bat +1 -0
- data/tests/Lista Czarnecki/AntiguaInterfaz/outDir/MyClassList.cpp +75 -0
- data/tests/Lista Czarnecki/AntiguaInterfaz/runme.bat +1 -0
- data/tests/Lista Czarnecki/AntiguaInterfaz/specification1.txt +5 -0
- data/tests/Lista Czarnecki/AntiguaInterfaz/specification2.txt +3 -0
- data/tests/Lista Czarnecki/AntiguaInterfaz/specification3.txt +5 -0
- data/tests/Lista Czarnecki/NuevaInterfaz/List.cpp +75 -0
- data/tests/Lista Czarnecki/NuevaInterfaz/ListTransformer.rb +58 -0
- data/tests/Lista Czarnecki/NuevaInterfaz/ListTransformer.rb.bak +57 -0
- data/tests/Lista Czarnecki/NuevaInterfaz/ejecutame.bat +1 -0
- data/tests/Lista Czarnecki/NuevaInterfaz/outDir/MyClassList.cpp +75 -0
- data/tests/Lista Czarnecki/NuevaInterfaz/outDir/NewClassList.cpp +75 -0
- data/tests/Lista Czarnecki/NuevaInterfaz/specification1.txt +5 -0
- data/tests/Lista Czarnecki/NuevaInterfaz/specification1.txt.bak +5 -0
- data/tests/Lista Czarnecki/NuevaInterfaz/specification2.txt +3 -0
- data/tests/Lista Czarnecki/NuevaInterfaz/specification3.txt +5 -0
- data/tests/Minus.rb +89 -0
- data/tests/Plus.rb.bak +48 -0
- data/tests/REVit.rb +84 -0
- data/tests/RenameTest.rb +46 -0
- data/tests/RenameTest.rb.bak +46 -0
- data/tests/SubCrash.rb +26 -0
- data/tests/SubList.rb.bak +43 -0
- data/tests/archAuxiliares/1.txt +328 -0
- data/tests/archAuxiliares/2.txt +328 -0
- data/tests/archAuxiliares/Bloques/s1.txt +328 -0
- data/tests/archAuxiliares/Copia de Matriz.java +19 -0
- data/tests/archAuxiliares/Gen/Tesis_156_1.lgi +10 -0
- data/tests/archAuxiliares/Gen/Tesis_156_2.lgi +10 -0
- data/tests/archAuxiliares/Gen/t01.txt +328 -0
- data/tests/archAuxiliares/Gen/t01.txt.bak +328 -0
- data/tests/archAuxiliares/Gen/t02.txt +328 -0
- data/tests/archAuxiliares/Gen/t02.txt.bak +328 -0
- data/tests/archAuxiliares/Gen/t03.txt +328 -0
- data/tests/archAuxiliares/Gen/t03.txt.bak +328 -0
- data/tests/archAuxiliares/Gen/t04.txt +328 -0
- data/tests/archAuxiliares/Gen/t04.txt.bak +328 -0
- data/tests/archAuxiliares/Gen/t1.txt +328 -0
- data/tests/archAuxiliares/Gen/t1.txt.bak +328 -0
- data/tests/archAuxiliares/Gen/t2.txt +328 -0
- data/tests/archAuxiliares/Gen/t2.txt.bak +328 -0
- data/tests/archAuxiliares/Gen/t5.txt +328 -0
- data/tests/archAuxiliares/Gen/t9.txt +328 -0
- data/tests/archAuxiliares/Gen/t9.txt.bak +328 -0
- data/tests/archAuxiliares/GenTesis_156_1.lgi +10 -0
- data/tests/archAuxiliares/Matriz.java +74 -0
- data/tests/archAuxiliares/MatrizOut.java +74 -0
- data/tests/archAuxiliares/MatrizOut10.java +68 -0
- data/tests/archAuxiliares/MatrizOut11.java +86 -0
- data/tests/archAuxiliares/MatrizOut2.java +74 -0
- data/tests/archAuxiliares/MatrizOut3.java +74 -0
- data/tests/archAuxiliares/MatrizOut4.java +74 -0
- data/tests/archAuxiliares/MatrizOut5.java +21 -0
- data/tests/archAuxiliares/MatrizOut6.java +21 -0
- data/tests/archAuxiliares/MatrizOut7.java +21 -0
- data/tests/archAuxiliares/MatrizOut8.java +16 -0
- data/tests/archAuxiliares/MatrizOut9.java +86 -0
- data/tests/archAuxiliares/MatrizOut_9.java +86 -0
- data/tests/archAuxiliares/Matriz_1.java +74 -0
- data/tests/archAuxiliares/Matriz_10.java +68 -0
- data/tests/archAuxiliares/Matriz_11.java +86 -0
- data/tests/archAuxiliares/Matriz_2.java +74 -0
- data/tests/archAuxiliares/Matriz_3.java +74 -0
- data/tests/archAuxiliares/Matriz_4.java +74 -0
- data/tests/archAuxiliares/Matriz_5.java +21 -0
- data/tests/archAuxiliares/Matriz_6.java +21 -0
- data/tests/archAuxiliares/Matriz_7.java +21 -0
- data/tests/archAuxiliares/Matriz_8.java +16 -0
- data/tests/archAuxiliares/Matriz_9.java +86 -0
- data/tests/archAuxiliares/Matriz_N_1.java +21 -0
- data/tests/archAuxiliares/Matriz_N_2.java +91 -0
- data/tests/archAuxiliares/N1.txt +18 -0
- data/tests/archAuxiliares/N1_EXPECTED.txt +18 -0
- data/tests/archAuxiliares/N1_OUT.txt +18 -0
- data/tests/archAuxiliares/N2_EXPECTED.txt +18 -0
- data/tests/archAuxiliares/N2_OUT.txt +18 -0
- data/tests/archAuxiliares/N3.txt +23 -0
- data/tests/archAuxiliares/N3_EXPECTED.txt +22 -0
- data/tests/archAuxiliares/N3_OUT.txt +22 -0
- data/tests/archAuxiliares/N4_EXPECTED.txt +10 -0
- data/tests/archAuxiliares/N4_OUT.txt +10 -0
- data/tests/archAuxiliares/N5_OUT.txt +18 -0
- data/tests/archAuxiliares/N6_OUT.txt +18 -0
- data/tests/archAuxiliares/PedidorTerceroWS.jsp +142 -0
- data/tests/archAuxiliares/Tesis_156.lgi +7 -0
- data/tests/archAuxiliares/aspectgen.rb +328 -0
- data/tests/archAuxiliares/aspectgenCopy.rb +328 -0
- data/tests/archAuxiliares/extract_dollar.txt +1 -0
- data/tests/archAuxiliares/minus.txt +26 -0
- data/tests/archAuxiliares/minus_expected_1.txt +26 -0
- data/tests/archAuxiliares/minus_expected_2.txt +26 -0
- data/tests/archAuxiliares/minus_out_1.txt +26 -0
- data/tests/archAuxiliares/minus_out_2.txt +26 -0
- data/tests/archAuxiliares/p1.txt +328 -0
- data/tests/archAuxiliares/p2.txt +328 -0
- data/tests/archAuxiliares/s1.txt +328 -0
- data/tests/archAuxiliares/s2.txt +328 -0
- data/tests/archAuxiliares/s3.txt +328 -0
- data/tests/archAuxiliares/s4.txt +328 -0
- data/tests/archAuxiliares/s5.txt +328 -0
- data/tests/archAuxiliares/s7.txt +328 -0
- data/tests/archAuxiliares/s8.txt +328 -0
- data/tests/archAuxiliares/s9.txt +328 -0
- data/tests/archAuxiliares/text.txt +1 -0
- data/tests/delay.rb +33 -0
- data/tests/delay.rb.bak +33 -0
- data/tests/satisfy.rb +44 -0
- data/tests/satisfy.rb.bak +34 -0
- metadata +252 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>nested_symbols (EFL_regexp_generator.rb)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File EFL_regexp_generator.rb, line 20</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">nested_symbols</span>(<span class="ruby-identifier">beginSymbol</span>, <span class="ruby-identifier">endSymbol</span>, <span class="ruby-identifier">levels</span>=<span class="ruby-value">10</span>)
|
|
15
|
+
<span class="ruby-identifier">eval</span>(<span class="ruby-value str">'@level0 = "['</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">beginSymbol</span> <span class="ruby-operator">+</span> <span class="ruby-value str">']([^'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">beginSymbol</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">endSymbol</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'])*['</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">endSymbol</span> <span class="ruby-operator">+</span> <span class="ruby-value str">']"'</span>)
|
|
16
|
+
(<span class="ruby-value">1</span><span class="ruby-operator">..</span>(<span class="ruby-identifier">levels</span><span class="ruby-operator">-</span><span class="ruby-value">2</span>)).<span class="ruby-identifier">reject</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
|
|
17
|
+
<span class="ruby-identifier">eval</span>(<span class="ruby-node">"@level#{i}"</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'= "['</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">beginSymbol</span> <span class="ruby-operator">+</span> <span class="ruby-value str">']([^'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">beginSymbol</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">endSymbol</span> <span class="ruby-operator">+</span><span class="ruby-value str">'] | #{@level'</span> <span class="ruby-operator">+</span> <span class="ruby-node">"#{i-1}"</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'} )*['</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">endSymbol</span> <span class="ruby-operator">+</span> <span class="ruby-value str">']"'</span>)
|
|
18
|
+
}
|
|
19
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">levels</span> <span class="ruby-operator">></span> <span class="ruby-value">1</span> <span class="ruby-keyword kw">then</span>
|
|
20
|
+
<span class="ruby-identifier">eval</span>(<span class="ruby-node">"@level#{levels-1}"</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'= /['</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">beginSymbol</span> <span class="ruby-operator">+</span> <span class="ruby-value str">']([^'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">beginSymbol</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">endSymbol</span> <span class="ruby-operator">+</span><span class="ruby-value str">'] | #{@level'</span> <span class="ruby-operator">+</span> <span class="ruby-node">"#{levels-2}"</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'} )*['</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">endSymbol</span> <span class="ruby-operator">+</span> <span class="ruby-value str">']/mx'</span>)
|
|
21
|
+
<span class="ruby-identifier">eval</span> <span class="ruby-node">"return @level#{levels-1}"</span>
|
|
22
|
+
<span class="ruby-keyword kw">else</span>
|
|
23
|
+
<span class="ruby-identifier">eval</span> <span class="ruby-node">"return /#{@level0}/mx"</span>
|
|
24
|
+
<span class="ruby-keyword kw">end</span>
|
|
25
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
26
|
+
</body>
|
|
27
|
+
</html>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>nested_symbol (EFL_regexp_generator.rb)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File EFL_regexp_generator.rb, line 40</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">nested_symbol</span>(<span class="ruby-identifier">symbol</span>, <span class="ruby-identifier">levels</span>=<span class="ruby-value">10</span>)
|
|
15
|
+
<span class="ruby-identifier">eval</span>(<span class="ruby-value str">'@level0 = "['</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">symbol</span> <span class="ruby-operator">+</span> <span class="ruby-value str">']([^'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">symbol</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'])*['</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">symbol</span> <span class="ruby-operator">+</span> <span class="ruby-value str">']"'</span>)
|
|
16
|
+
(<span class="ruby-value">1</span><span class="ruby-operator">..</span>(<span class="ruby-identifier">levels</span><span class="ruby-operator">-</span><span class="ruby-value">2</span>)).<span class="ruby-identifier">reject</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
|
|
17
|
+
<span class="ruby-identifier">eval</span>(<span class="ruby-node">"@level#{i}"</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'= "['</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">symbol</span> <span class="ruby-operator">+</span> <span class="ruby-value str">']([^'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">symbol</span> <span class="ruby-operator">+</span><span class="ruby-value str">'] | #{@level'</span> <span class="ruby-operator">+</span> <span class="ruby-node">"#{i-1}"</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'} )*['</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">symbol</span> <span class="ruby-operator">+</span> <span class="ruby-value str">']"'</span>)
|
|
18
|
+
}
|
|
19
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">levels</span> <span class="ruby-operator">></span> <span class="ruby-value">1</span> <span class="ruby-keyword kw">then</span>
|
|
20
|
+
<span class="ruby-identifier">eval</span>(<span class="ruby-node">"@level#{levels-1}"</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'= /['</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">symbol</span> <span class="ruby-operator">+</span> <span class="ruby-value str">']([^'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">symbol</span> <span class="ruby-operator">+</span><span class="ruby-value str">'] | #{@level'</span> <span class="ruby-operator">+</span> <span class="ruby-node">"#{levels-2}"</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'} )*['</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">symbol</span> <span class="ruby-operator">+</span> <span class="ruby-value str">']/mx'</span>)
|
|
21
|
+
<span class="ruby-identifier">eval</span> <span class="ruby-node">"return @level#{levels-1}"</span>
|
|
22
|
+
<span class="ruby-keyword kw">else</span>
|
|
23
|
+
<span class="ruby-identifier">eval</span> <span class="ruby-node">"return /#{@level0}/mx"</span>
|
|
24
|
+
<span class="ruby-keyword kw">end</span>
|
|
25
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
26
|
+
</body>
|
|
27
|
+
</html>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>regexp2string (EFL_regexp_generator.rb)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File EFL_regexp_generator.rb, line 53</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">regexp2string</span>(<span class="ruby-identifier">reg_exp</span>)
|
|
15
|
+
<span class="ruby-identifier">reg_exp</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/:(.*?)[)]$/</span><span class="ruby-identifier">mx</span>
|
|
16
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">$1</span>
|
|
17
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
18
|
+
</body>
|
|
19
|
+
</html>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>nested_quotes (EFL_regexp_generator.rb)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File EFL_regexp_generator.rb, line 60</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">nested_quotes</span>(<span class="ruby-identifier">levels</span>=<span class="ruby-value">10</span>)
|
|
15
|
+
<span class="ruby-identifier">nq_regexp</span> = <span class="ruby-identifier">nested_symbol</span>(<span class="ruby-value str">'\"'</span>, <span class="ruby-identifier">levels</span>)
|
|
16
|
+
<span class="ruby-identifier">nq_string</span> = <span class="ruby-identifier">regexp2string</span>(<span class="ruby-identifier">nq_regexp</span>).<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/\\/</span>, <span class="ruby-value str">''</span>)
|
|
17
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-node">/#{nq_string}/</span><span class="ruby-identifier">mx</span>
|
|
18
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
19
|
+
</body>
|
|
20
|
+
</html>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>inside_nested_symbols (EFL_regexp_generator.rb)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File EFL_regexp_generator.rb, line 66</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">inside_nested_symbols</span>(<span class="ruby-identifier">beginSymbol</span>, <span class="ruby-identifier">endSymbol</span>, <span class="ruby-identifier">levels</span>=<span class="ruby-value">50</span>)
|
|
15
|
+
<span class="ruby-identifier">quit_begin_and_end_symbols</span> = <span class="ruby-node">/[^#{beginSymbol}].*(?=#{endSymbol})/</span><span class="ruby-identifier">xm</span>
|
|
16
|
+
<span class="ruby-keyword kw">return</span> (<span class="ruby-identifier">nested_symbols</span>(<span class="ruby-identifier">beginSymbol</span>, <span class="ruby-identifier">endSymbol</span>, <span class="ruby-identifier">levels</span>) <span class="ruby-operator">></span> <span class="ruby-identifier">quit_begin_and_end_symbols</span>)
|
|
17
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
18
|
+
</body>
|
|
19
|
+
</html>
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
7
|
+
<head>
|
|
8
|
+
<title>File: EFL_regexp.rb</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
|
11
|
+
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
|
12
|
+
<script type="text/javascript">
|
|
13
|
+
// <![CDATA[
|
|
14
|
+
|
|
15
|
+
function popupCode( url ) {
|
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function toggleCode( id ) {
|
|
20
|
+
if ( document.getElementById )
|
|
21
|
+
elem = document.getElementById( id );
|
|
22
|
+
else if ( document.all )
|
|
23
|
+
elem = eval( "document.all." + id );
|
|
24
|
+
else
|
|
25
|
+
return false;
|
|
26
|
+
|
|
27
|
+
elemStyle = elem.style;
|
|
28
|
+
|
|
29
|
+
if ( elemStyle.display != "block" ) {
|
|
30
|
+
elemStyle.display = "block"
|
|
31
|
+
} else {
|
|
32
|
+
elemStyle.display = "none"
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Make codeblocks hidden by default
|
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
|
40
|
+
|
|
41
|
+
// ]]>
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
</head>
|
|
45
|
+
<body>
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
<div id="fileHeader">
|
|
50
|
+
<h1>EFL_regexp.rb</h1>
|
|
51
|
+
<table class="header-table">
|
|
52
|
+
<tr class="top-aligned-row">
|
|
53
|
+
<td><strong>Path:</strong></td>
|
|
54
|
+
<td>EFL_regexp.rb
|
|
55
|
+
</td>
|
|
56
|
+
</tr>
|
|
57
|
+
<tr class="top-aligned-row">
|
|
58
|
+
<td><strong>Last Update:</strong></td>
|
|
59
|
+
<td>Fri Nov 16 17:28:37 +0100 2007</td>
|
|
60
|
+
</tr>
|
|
61
|
+
</table>
|
|
62
|
+
</div>
|
|
63
|
+
<!-- banner header -->
|
|
64
|
+
|
|
65
|
+
<div id="bodyContent">
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
<div id="contextContent">
|
|
70
|
+
|
|
71
|
+
<div id="description">
|
|
72
|
+
<p>
|
|
73
|
+
<em>Copyright � 2007 by Ruben Heradio Gil, Jose Antonio Cerrada Somolinos,
|
|
74
|
+
Jose Ramon Coz Fernandez and Jose Carlos Lopez Ruiz.</em> <em>This file is
|
|
75
|
+
part of <b>EFL-A Ruby implementation of the Exemplar Flexibilization
|
|
76
|
+
Language.</em></b> <em>EFL is distributed under the terms of the GNU Lesser
|
|
77
|
+
General Public License (LGPL).</em> <em>EFL is free software: you can
|
|
78
|
+
redistribute it and/or modify it under the terms of the GNU Lesser General
|
|
79
|
+
Public License as published by the Free Software Foundation, either version
|
|
80
|
+
3 of the License, or (at your option) any later version.</em> <em>EFL is
|
|
81
|
+
distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
82
|
+
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
|
83
|
+
PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
|
84
|
+
details.</em> <em>You should have received a copy of the GNU Lesser General
|
|
85
|
+
Public License along with this program. If not, see <<a
|
|
86
|
+
href="http://www.gnu.org/licenses">www.gnu.org/licenses</a>/>.</em>
|
|
87
|
+
<em>Contact Information: Ruben Heradio Gil (rheradio@issi.uned.es). Phone
|
|
88
|
+
number: 00 34 91 398 8242, Postal address: Dpto. de Ingenier�a de SW y
|
|
89
|
+
Sistemas Inform�ticos. E.T.S.I. Inform�tica, UNED. C/ Juan del Rosal, 16.
|
|
90
|
+
28040 Madrid.</em>
|
|
91
|
+
</p>
|
|
92
|
+
<h1>Extensions of the Ruby regular expressions</h1>
|
|
93
|
+
<p>
|
|
94
|
+
The next operators are included:
|
|
95
|
+
</p>
|
|
96
|
+
<ul>
|
|
97
|
+
<li>zoom <a href="../classes/Regexp.html">Regexp</a>#>
|
|
98
|
+
|
|
99
|
+
</li>
|
|
100
|
+
<li>complement <a href="../classes/Regexp.html#M000030">Regexp#o</a>
|
|
101
|
+
|
|
102
|
+
</li>
|
|
103
|
+
<li>minus <a href="../classes/Regexp.html">Regexp</a>#-
|
|
104
|
+
|
|
105
|
+
</li>
|
|
106
|
+
</ul>
|
|
107
|
+
|
|
108
|
+
</div>
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
</div>
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
</div>
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
<!-- if includes -->
|
|
118
|
+
|
|
119
|
+
<div id="section">
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
<!-- if method_list -->
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
</div>
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
<div id="validator-badges">
|
|
135
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
136
|
+
</div>
|
|
137
|
+
|
|
138
|
+
</body>
|
|
139
|
+
</html>
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
7
|
+
<head>
|
|
8
|
+
<title>File: EFL_syntactic_sugar.rb</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
|
11
|
+
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
|
12
|
+
<script type="text/javascript">
|
|
13
|
+
// <![CDATA[
|
|
14
|
+
|
|
15
|
+
function popupCode( url ) {
|
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function toggleCode( id ) {
|
|
20
|
+
if ( document.getElementById )
|
|
21
|
+
elem = document.getElementById( id );
|
|
22
|
+
else if ( document.all )
|
|
23
|
+
elem = eval( "document.all." + id );
|
|
24
|
+
else
|
|
25
|
+
return false;
|
|
26
|
+
|
|
27
|
+
elemStyle = elem.style;
|
|
28
|
+
|
|
29
|
+
if ( elemStyle.display != "block" ) {
|
|
30
|
+
elemStyle.display = "block"
|
|
31
|
+
} else {
|
|
32
|
+
elemStyle.display = "none"
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Make codeblocks hidden by default
|
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
|
40
|
+
|
|
41
|
+
// ]]>
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
</head>
|
|
45
|
+
<body>
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
<div id="fileHeader">
|
|
50
|
+
<h1>EFL_syntactic_sugar.rb</h1>
|
|
51
|
+
<table class="header-table">
|
|
52
|
+
<tr class="top-aligned-row">
|
|
53
|
+
<td><strong>Path:</strong></td>
|
|
54
|
+
<td>EFL_syntactic_sugar.rb
|
|
55
|
+
</td>
|
|
56
|
+
</tr>
|
|
57
|
+
<tr class="top-aligned-row">
|
|
58
|
+
<td><strong>Last Update:</strong></td>
|
|
59
|
+
<td>Fri Nov 16 17:24:29 +0100 2007</td>
|
|
60
|
+
</tr>
|
|
61
|
+
</table>
|
|
62
|
+
</div>
|
|
63
|
+
<!-- banner header -->
|
|
64
|
+
|
|
65
|
+
<div id="bodyContent">
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
<div id="contextContent">
|
|
70
|
+
|
|
71
|
+
<div id="description">
|
|
72
|
+
<p>
|
|
73
|
+
<em>Copyright � 2007 by Ruben Heradio Gil, Jose Antonio Cerrada Somolinos,
|
|
74
|
+
Jose Ramon Coz Fernandez and Jose Carlos Lopez Ruiz.</em> <em>This file is
|
|
75
|
+
part of <b>EFL-A Ruby implementation of the Exemplar Flexibilization
|
|
76
|
+
Language.</em></b> <em>EFL is distributed under the terms of the GNU Lesser
|
|
77
|
+
General Public License (LGPL).</em> <em>EFL is free software: you can
|
|
78
|
+
redistribute it and/or modify it under the terms of the GNU Lesser General
|
|
79
|
+
Public License as published by the Free Software Foundation, either version
|
|
80
|
+
3 of the License, or (at your option) any later version.</em> <em>EFL is
|
|
81
|
+
distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
82
|
+
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
|
83
|
+
PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
|
84
|
+
details.</em> <em>You should have received a copy of the GNU Lesser General
|
|
85
|
+
Public License along with this program. If not, see <<a
|
|
86
|
+
href="http://www.gnu.org/licenses">www.gnu.org/licenses</a>/>.</em>
|
|
87
|
+
<em>Contact Information: Ruben Heradio Gil (rheradio@issi.uned.es). Phone
|
|
88
|
+
number: 00 34 91 398 8242, Postal address: Dpto. de Ingenier�a de SW y
|
|
89
|
+
Sistemas Inform�ticos. E.T.S.I. Inform�tica, UNED. C/ Juan del Rosal, 16.
|
|
90
|
+
28040 Madrid.</em>
|
|
91
|
+
</p>
|
|
92
|
+
<h1>Syntactic sugar for writing generators and regular expressions</h1>
|
|
93
|
+
|
|
94
|
+
</div>
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
</div>
|
|
98
|
+
|
|
99
|
+
<div id="method-list">
|
|
100
|
+
<h3 class="section-bar">Methods</h3>
|
|
101
|
+
|
|
102
|
+
<div class="name-list">
|
|
103
|
+
<a href="#M000001">generator</a>
|
|
104
|
+
<a href="#M000002">o</a>
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
|
|
108
|
+
</div>
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
<!-- if includes -->
|
|
112
|
+
|
|
113
|
+
<div id="section">
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
<!-- if method_list -->
|
|
123
|
+
<div id="methods">
|
|
124
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
|
125
|
+
|
|
126
|
+
<div id="method-M000001" class="method-detail">
|
|
127
|
+
<a name="M000001"></a>
|
|
128
|
+
|
|
129
|
+
<div class="method-heading">
|
|
130
|
+
<a href="EFL_syntactic_sugar_rb.src/M000001.html" target="Code" class="method-signature"
|
|
131
|
+
onclick="popupCode('EFL_syntactic_sugar_rb.src/M000001.html');return false;">
|
|
132
|
+
<span class="method-name">generator</span><span class="method-args">(args=nil, &block)</span>
|
|
133
|
+
</a>
|
|
134
|
+
</div>
|
|
135
|
+
|
|
136
|
+
<div class="method-description">
|
|
137
|
+
<p>
|
|
138
|
+
Syntactic sugar for writing generators. For simple generators, instead of
|
|
139
|
+
writing:
|
|
140
|
+
</p>
|
|
141
|
+
<p>
|
|
142
|
+
<tt>class SimpleGen < <a
|
|
143
|
+
href="../classes/Generator.html">Generator</a></tt>
|
|
144
|
+
</p>
|
|
145
|
+
<pre>
|
|
146
|
+
def initialize
|
|
147
|
+
substitutions
|
|
148
|
+
productions
|
|
149
|
+
end
|
|
150
|
+
auxiliar_methods
|
|
151
|
+
</pre>
|
|
152
|
+
<p>
|
|
153
|
+
<tt>end</tt>
|
|
154
|
+
</p>
|
|
155
|
+
<p>
|
|
156
|
+
<tt>SimpleGen.new</tt>
|
|
157
|
+
</p>
|
|
158
|
+
<p>
|
|
159
|
+
you can write:
|
|
160
|
+
</p>
|
|
161
|
+
<p>
|
|
162
|
+
<tt>simple_gen = <a
|
|
163
|
+
href="EFL_syntactic_sugar_rb.html#M000001">generator</a> {</tt>
|
|
164
|
+
</p>
|
|
165
|
+
<pre>
|
|
166
|
+
substitutions
|
|
167
|
+
productions
|
|
168
|
+
auxiliar_methods
|
|
169
|
+
</pre>
|
|
170
|
+
<p>
|
|
171
|
+
<tt>}</tt>
|
|
172
|
+
</p>
|
|
173
|
+
</div>
|
|
174
|
+
</div>
|
|
175
|
+
|
|
176
|
+
<div id="method-M000002" class="method-detail">
|
|
177
|
+
<a name="M000002"></a>
|
|
178
|
+
|
|
179
|
+
<div class="method-heading">
|
|
180
|
+
<a href="EFL_syntactic_sugar_rb.src/M000002.html" target="Code" class="method-signature"
|
|
181
|
+
onclick="popupCode('EFL_syntactic_sugar_rb.src/M000002.html');return false;">
|
|
182
|
+
<span class="method-name">o</span><span class="method-args">(regular_expression)</span>
|
|
183
|
+
</a>
|
|
184
|
+
</div>
|
|
185
|
+
|
|
186
|
+
<div class="method-description">
|
|
187
|
+
<p>
|
|
188
|
+
Syntactic sugar for the regular expressions complement operator <a
|
|
189
|
+
href="../classes/Regexp.html#M000030">Regexp#o</a>. Instead of writing:
|
|
190
|
+
<tt>regular_expression.o</tt> you can write: <tt><a
|
|
191
|
+
href="EFL_syntactic_sugar_rb.html#M000002">o</a>(regular_expression)</tt>
|
|
192
|
+
</p>
|
|
193
|
+
</div>
|
|
194
|
+
</div>
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
</div>
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
</div>
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
<div id="validator-badges">
|
|
204
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
205
|
+
</div>
|
|
206
|
+
|
|
207
|
+
</body>
|
|
208
|
+
</html>
|