bato 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 10f2f9e475c20ddd9ace7ddd1588272c57f4e65d
4
- data.tar.gz: 5ee669e3fa46cb947addfb8b0cdc53b0980a1353
3
+ metadata.gz: b3857215397e97cd5db2f2a2f8cdc98ca2870657
4
+ data.tar.gz: 5612fa1e18f564f935ce7cb033b81670f30cab2f
5
5
  SHA512:
6
- metadata.gz: 9850c98dcb9c118f9c43c577e96022f58ffd167109a0e7842046f91667f333e0b9b9f2cd49c03569ce59a72f6d4bbd124312de69ea56edf1a9e2f386caedbb4d
7
- data.tar.gz: d0398e12eb7926e9ee8f9c05471009c07f632c4bf9636849936b53e2f1c40cd3e02de7332fa79610c045e482425c3b7ff6c267a37e09e9f29ffb6d4cb403f3e8
6
+ metadata.gz: 71cd674fe2b0ddcd77f517874d6b38e3c452d48adce600dabba61bb4c3b7d2f03dfd542beda799b04130e20396c54af629e4faf36f99c44cad7a7f6c0f39f721
7
+ data.tar.gz: 708e80d77142360dfde4d0481eacacfe2360bff75f8cbd9809daffba39608b307bd1c58c561dfc6f4e1f379e3812a4fc6b7f3a934d781f495b3c2daa5751273f
data/README.md CHANGED
@@ -19,7 +19,7 @@ Ang kadahilanang ginamit ang pangalang 'bato' ay dahil ang Ruby ay isang uri ng
19
19
  Gumawa ng isang file na kamusta_mundo.bato na may mga sumusunod na nilalaman
20
20
 
21
21
  kapag 1 > 0
22
- isulat "Kamusta mundo!"
22
+ isulat "Kumusta mundo!"
23
23
  kung_hindi
24
24
  isulat "Mayroong sira"
25
25
  katapusan
data/Rakefile CHANGED
@@ -1,6 +1,6 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
3
 
4
4
  RSpec::Core::RakeTask.new(:spec)
5
5
 
6
- task :default => :spec
6
+ task default: :spec
@@ -1,26 +1,26 @@
1
- # coding: utf-8
1
+
2
2
  lib = File.expand_path('../lib', __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'bato/version'
4
+ require 'bato/bersiyon'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
- spec.name = "bato"
8
- spec.version = Bato::VERSION
9
- spec.authors = ["Joel Bryan Juliano"]
10
- spec.email = ["joelbryan.juliano@gmail.com"]
11
- spec.description = %q{Bato Programming Language}
12
- spec.summary = %q{Ang Bato ay isang programming language sa wikang Tagalog}
13
- spec.homepage = ""
14
- spec.license = "MIT"
7
+ spec.name = 'bato'
8
+ spec.version = Bato::BERSIYON
9
+ spec.authors = ['Joel Bryan Juliano']
10
+ spec.email = ['joelbryan.juliano@gmail.com']
11
+ spec.description = 'Bato Programming Language'
12
+ spec.summary = 'Ang Bato ay isang programming language sa wikang Tagalog'
13
+ spec.homepage = 'https://github.com/jjuliano/bato'
14
+ spec.license = 'MIT'
15
15
 
16
- spec.files = `git ls-files`.split($/)
16
+ spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
17
17
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
- spec.require_paths = ["lib"]
19
+ spec.require_paths = ['lib']
20
20
 
21
- spec.add_dependency "ruby2ruby"
21
+ spec.add_dependency 'ruby2ruby', '~> 2.4'
22
22
 
23
- spec.add_development_dependency "bundler", "~> 1.3"
24
- spec.add_development_dependency "rake"
25
- spec.add_development_dependency "rspec"
23
+ spec.add_development_dependency 'bundler', '~> 1.3'
24
+ spec.add_development_dependency 'rake', '~> 12.2'
25
+ spec.add_development_dependency 'rspec', '~> 3.7'
26
26
  end
data/bin/bato CHANGED
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env ruby
2
- # encoding: utf-8
3
-
4
- require "bato/tagatala"
2
+ require 'bato/tagatala'
3
+ require 'rubygems'
5
4
 
6
5
  if pangalan_ng_file = ARGV[0]
7
6
  tagatala = Bato::Tagatala.new
8
7
  kodigo = File.read pangalan_ng_file, encoding: 'utf-8'
9
8
  ruby_kodigo = tagatala.sa_ruby kodigo
9
+ raise 'Ang pinakamababang kinakailangan bersiyon ng Ruby ay 2.4.1' if
10
+ Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.4.1')
10
11
  eval ruby_kodigo
11
-
12
12
  else
13
13
  puts <<-EOS
14
14
  Hindi tinukoy ang file. Ang tamang sintaks ay:
@@ -1,4 +1,3 @@
1
- require "bato/version"
1
+ require 'bato/bersiyon'
2
2
 
3
- module Bato
4
- end
3
+ module Bato; end
@@ -0,0 +1,3 @@
1
+ module Bato
2
+ BERSIYON = '0.0.6'.freeze
3
+ end
@@ -1,7 +1,7 @@
1
- require "bato/core_ext/kernel"
2
- require "bato/core_ext/string"
3
- require "bato/core_ext/array"
4
- require "bato/core_ext/enumerator"
5
- require "bato/core_ext/fixnum"
6
- require "bato/core_ext/range"
7
- require "bato/core_ext/class"
1
+ require 'bato/core_ext/kernel'
2
+ require 'bato/core_ext/string'
3
+ require 'bato/core_ext/array'
4
+ require 'bato/core_ext/enumerator'
5
+ require 'bato/core_ext/integer'
6
+ require 'bato/core_ext/range'
7
+ require 'bato/core_ext/class'
@@ -1,18 +1,16 @@
1
- # encoding: utf-8
2
-
3
1
  class Array
4
- alias_method :umikot, :cycle
5
- alias_method :isuksok, :inject
6
- alias_method :magbagsak, :drop
7
- alias_method :itulak, :push
8
- alias_method :pasok, :push
9
- alias_method :ipasok, :push
10
- alias_method :huli, :last
11
- alias_method :dulo, :last
12
- alias_method :una, :first
13
- alias_method :isaisahin, :each
14
- alias_method :kada, :each
15
- alias_method :bawat, :each
16
- alias_method :kada_isa, :each
17
- alias_method :sa_bawat_isa, :each
18
- end
2
+ alias umikot cycle
3
+ alias isuksok inject
4
+ alias magbagsak drop
5
+ alias itulak push
6
+ alias pasok push
7
+ alias ipasok push
8
+ alias huli last
9
+ alias dulo last
10
+ alias una first
11
+ alias isaisahin each
12
+ alias kada each
13
+ alias bawat each
14
+ alias kada_isa each
15
+ alias sa_bawat_isa each
16
+ end
@@ -1,5 +1,3 @@
1
- # encoding: utf-8
2
-
3
1
  class Class
4
- alias_method :gumawa, :new
2
+ alias gumawa new
5
3
  end
@@ -1,5 +1,3 @@
1
- # encoding: utf-8
2
-
3
1
  class Enumerator
4
- alias_method :kumuha, :take
5
- end
2
+ alias kumuha take
3
+ end
@@ -0,0 +1,4 @@
1
+ class Integer
2
+ alias ulit times
3
+ alias beses times
4
+ end
@@ -1,8 +1,6 @@
1
- # encoding: utf-8
2
-
3
1
  module Kernel
4
- alias_method :isulat, :puts
5
- alias_method :sabihin, :puts
6
- alias_method :iangat, :raise
7
- alias_method :itaas, :raise
2
+ alias isulat puts
3
+ alias sabihin puts
4
+ alias iangat raise
5
+ alias itaas raise
8
6
  end
@@ -1,8 +1,6 @@
1
- # encoding: utf-8
2
-
3
1
  class Range
4
- alias_method :isaisahin, :each
5
- alias_method :bawat, :each
6
- alias_method :sa_bawat_isa, :each
7
- alias_method :kada_isa, :each
8
- end
2
+ alias isaisahin each
3
+ alias bawat each
4
+ alias sa_bawat_isa each
5
+ alias kada_isa each
6
+ end
@@ -1,11 +1,13 @@
1
- # encoding: utf-8
2
-
3
1
  class String
4
- alias_method :baliktad, :reverse
5
- alias_method :haba, :length
6
- alias_method :sa_malaking_titik, :capitalize
7
- alias_method :sa_malalaking_titik, :upcase
8
- alias_method :sa_malaking_mga_titik, :upcase
9
- alias_method :sa_maliliit_na_titik, :downcase
10
- alias_method :sa_maliit_na_mga_titik, :downcase
11
- end
2
+ alias baliktad reverse
3
+ alias haba length
4
+ alias sa_malaking_titik capitalize
5
+ alias sa_malalaking_titik upcase
6
+ alias sa_malaking_mga_titik upcase
7
+ alias sa_maliliit_na_titik downcase
8
+ alias sa_maliit_na_mga_titik downcase
9
+ alias igitna center
10
+ alias kagatan chomp
11
+ alias palitan replace
12
+ alias siyasatin inspect
13
+ end
@@ -1,162 +1,150 @@
1
- # encoding: utf-8
2
-
3
1
  class RubyLexer
4
- ##
5
- # Parse a number from the input stream.
6
- #
7
- # @param c The first character of the number.
8
- # @return A int constant wich represents a token.
9
-
10
2
  def parse_number
11
3
  self.lex_state = :expr_end
12
4
 
13
- case
14
- when src.scan(/[+-]?0[xXbBdD]\b/) then
15
- rb_compile_error "Invalid numeric format"
16
- # when src.scan(/[+-]?(?:(?:[1-9][\d_]*|0)(?!\.\d)\b|0[Dd][0-9_]+)/) then
17
- when src.scan(/[+-]?(?:(?:[1-9][\d_]*|0)(?!\,\d)\b|0[Dd][0-9_]+)/) then
5
+ if src.scan(/[+-]?0[xXbBdD]\b/)
6
+ rb_compile_error 'Invalid numeric format'
7
+ # elsif src.scan(/[+-]?(?:(?:[1-9][\d_]*|0)(?!\.\d)\b|0[Dd][0-9_]+)/)
8
+ elsif src.scan(/[+-]?(?:(?:[1-9][\d_]*|0)(?!\,\d)\b|0[Dd][0-9_]+)/)
18
9
  int_with_base(10)
19
- when src.scan(/[+-]?0x[a-f0-9_]+/i) then
10
+ elsif src.scan(/[+-]?0x[a-f0-9_]+/i)
20
11
  int_with_base(16)
21
- when src.scan(/[+-]?0[Bb][01_]+/) then
12
+ elsif src.scan(/[+-]?0[Bb][01_]+/)
22
13
  int_with_base(2)
23
- when src.scan(/[+-]?0[Oo]?[0-7_]*[89]/) then
24
- rb_compile_error "Illegal octal digit."
25
- when src.scan(/[+-]?0[Oo]?[0-7_]+|0[Oo]/) then
14
+ elsif src.scan(/[+-]?0[Oo]?[0-7_]*[89]/)
15
+ rb_compile_error 'Illegal octal digit.'
16
+ elsif src.scan(/[+-]?0[Oo]?[0-7_]+|0[Oo]/)
26
17
  int_with_base(8)
27
- when src.scan(/[+-]?[\d_]+_(e|\.)/) then
18
+ elsif src.scan(/[+-]?[\d_]+_(e|\.)/)
28
19
  rb_compile_error "Trailing '_' in number."
29
- # when src.scan(/[+-]?[\d_]+\.[\d_]+(e[+-]?[\d_]+)?\b|[+-]?[\d_]+e[+-]?[\d_]+\b/i) then
30
- when src.scan(/[+-]?[\d_]+\,[\d_]+(e[+-]?[\d_]+)?\b|[+-]?[\d_]+e[+-]?[\d_]+\b/i) then
20
+ # elsif src.scan(/[+-]?[\d_]+\.[\d_]+(e[+-]?[\d_]+)?\b|[+-]?[\d_]+e[+-]?[\d_]+\b/i)
21
+ elsif src.scan(/[+-]?[\d_]+\,[\d_]+(e[+-]?[\d_]+)?\b|[+-]?[\d_]+e[+-]?[\d_]+\b/i)
31
22
  number = src.matched.sub(',', '.')
32
- if number =~ /__/ then
33
- rb_compile_error "Invalid numeric format"
34
- end
23
+ rb_compile_error 'Invalid numeric format' if number =~ /__/
35
24
  self.yacc_value = number.to_f
36
25
  :tFLOAT
37
- when src.scan(/[+-]?[0-9_]+(?![e])/) then
26
+ elsif src.scan(/[+-]?[0-9_]+(?![e])/)
38
27
  int_with_base(10)
39
28
  else
40
- rb_compile_error "Bad number format"
29
+ rb_compile_error 'Bad number format'
41
30
  end
42
31
  end
43
-
44
32
  end
45
33
 
46
34
  module RubyParserStuff
47
35
  class Keyword
48
36
  wordlist = [
49
- ["katapusan", [:kEND, :kEND ], :expr_end ],
50
- ["dulo", [:kEND, :kEND ], :expr_end ],
51
- ["wakas", [:kEND, :kEND ], :expr_end ],
52
- ["iba", [:kELSE, :kELSE ], :expr_beg ],
53
- ["kung_iba", [:kELSE, :kELSE ], :expr_beg ],
54
- ["kung_hindi", [:kELSE, :kELSE ], :expr_beg ],
55
- ["kung_hindi_naman", [:kELSE, :kELSE ], :expr_beg ],
56
- ["kapag_hindi", [:kELSE, :kELSE ], :expr_beg ],
57
- ["kapag_hindi_naman", [:kELSE, :kELSE ], :expr_beg ],
58
- ["kung_hindi_pa", [:kELSE, :kELSE ], :expr_beg ],
59
- ["kapag_hindi_pa", [:kELSE, :kELSE ], :expr_beg ],
60
- ["at_kung_hindi", [:kELSE, :kELSE ], :expr_beg ],
61
- ["at_kapag_hindi", [:kELSE, :kELSE ], :expr_beg ],
62
- ["at_kung_hindi_naman", [:kELSE, :kELSE ], :expr_beg ],
63
- ["at_kapag_hindi_naman", [:kELSE, :kELSE ], :expr_beg ],
64
- ["at_kung_hindi_pa", [:kELSE, :kELSE ], :expr_beg ],
65
- ["at_kapag_hindi_pa", [:kELSE, :kELSE ], :expr_beg ],
66
- ["maliban_dito", [:kELSE, :kELSE ], :expr_beg ],
67
- ["maliban_sa_mga_ito", [:kELSE, :kELSE ], :expr_beg ],
68
- ["kalagayan", [:kCASE, :kCASE ], :expr_beg ],
69
- ["kaukulan", [:kCASE, :kCASE ], :expr_beg ],
70
- ["sakaling", [:kCASE, :kCASE ], :expr_beg ],
71
- ["sakali", [:kCASE, :kCASE ], :expr_beg ],
72
- ["kung_sakaling", [:kCASE, :kCASE ], :expr_beg ],
73
- ["sakali_na", [:kCASE, :kCASE ], :expr_beg ],
74
- ["kung_sakali_na", [:kCASE, :kCASE ], :expr_beg ],
75
- ["matiyak", [:kENSURE, :kENSURE ], :expr_beg ],
76
- ["tiyakin", [:kENSURE, :kENSURE ], :expr_beg ],
77
- ["tiyaking", [:kENSURE, :kENSURE ], :expr_beg ],
78
- ["siguraduhing", [:kENSURE, :kENSURE ], :expr_beg ],
79
- ["siguraduhin", [:kENSURE, :kENSURE ], :expr_beg ],
80
- ["panigurado", [:kENSURE, :kENSURE ], :expr_beg ],
81
- ["modyul", [:kMODULE, :kMODULE ], :expr_beg ],
82
- ["ngunit_kapag", [:kELSIF, :kELSIF ], :expr_beg ],
83
- ["kung_kapag", [:kELSIF, :kELSIF ], :expr_beg ],
84
- ["ngunit_kapag_ang", [:kELSIF, :kELSIF ], :expr_beg ],
85
- ["kung_kapag_ang", [:kELSIF, :kELSIF ], :expr_beg ],
86
- ["panuntunang", [:kDEF, :kDEF ], :expr_fname ],
87
- ["panuntunan", [:kDEF, :kDEF ], :expr_fname ],
88
- ["iligtas", [:kRESCUE, :kRESCUE_MOD ], :expr_mid ],
89
- ["agapan", [:kRESCUE, :kRESCUE_MOD ], :expr_mid ],
90
- ["hindi", [:kNOT, :kNOT ], :expr_beg ],
91
- ["dapat", [:kTHEN, :kTHEN ], :expr_beg ],
92
- ["bigyang_daan", [:kYIELD, :kYIELD ], :expr_arg ],
93
- ["magbigay_daan", [:kYIELD, :kYIELD ], :expr_arg ],
94
- ["para_sa", [:kFOR, :kFOR ], :expr_beg ],
95
- ["para_ang", [:kFOR, :kFOR ], :expr_beg ],
96
- ["self", [:kSELF, :kSELF ], :expr_end ],
97
- ["mali", [:kFALSE, :kFALSE ], :expr_end ],
98
- ["subukang_muli", [:kRETRY, :kRETRY ], :expr_end ],
99
- ["ibalik", [:kRETURN, :kRETURN ], :expr_mid ],
100
- ["ibalik_ang", [:kRETURN, :kRETURN ], :expr_mid ],
101
- ["magbalik", [:kRETURN, :kRETURN ], :expr_mid ],
102
- ["magbalik_nang", [:kRETURN, :kRETURN ], :expr_mid ],
103
- ["isauli", [:kRETURN, :kRETURN ], :expr_mid ],
104
- ["isauli_ang", [:kRETURN, :kRETURN ], :expr_mid ],
105
- ["ibigay", [:kRETURN, :kRETURN ], :expr_mid ],
106
- ["ibigay_ang", [:kRETURN, :kRETURN ], :expr_mid ],
107
- ["magbigay", [:kRETURN, :kRETURN ], :expr_mid ],
108
- ["magbigay_nang", [:kRETURN, :kRETURN ], :expr_mid ],
109
- ["tama", [:kTRUE, :kTRUE ], :expr_end ],
110
- ["kapag", [:kIF, :kIF_MOD ], :expr_beg ],
111
- ["kapag_ang", [:kIF, :kIF_MOD ], :expr_beg ],
112
- ["kapag_na_ang", [:kIF, :kIF_MOD ], :expr_beg ],
113
- ["kung", [:kIF, :kIF_MOD ], :expr_beg ],
114
- ["kung_ang", [:kIF, :kIF_MOD ], :expr_beg ],
115
- ["nakatukoy?", [:kDEFINED, :kDEFINED ], :expr_arg ],
116
- ["nakasaad?", [:kDEFINED, :kDEFINED ], :expr_arg ],
117
- ["super", [:kSUPER, :kSUPER ], :expr_arg ],
118
- ["tanggalin", [:kUNDEF, :kUNDEF ], :expr_fname ],
119
- ["magtanggal", [:kUNDEF, :kUNDEF ], :expr_fname ],
120
- ["ihinto", [:kBREAK, :kBREAK ], :expr_mid ],
121
- ["sa", [:kIN, :kIN ], :expr_beg ],
122
- ["sa_loob_ng", [:kIN, :kIN ], :expr_beg ],
123
- ["nasa", [:kIN, :kIN ], :expr_beg ],
124
- ["na_nasa", [:kIN, :kIN ], :expr_beg ],
125
- ["na_ganito", [:kDO, :kDO ], :expr_beg ],
126
- ["nang_ganito", [:kDO, :kDO ], :expr_beg ],
127
- ["ganito", [:kDO, :kDO ], :expr_beg ],
128
- ["ganito_gawin", [:kDO, :kDO ], :expr_beg ],
129
- ["ganito_ang_gagawin", [:kDO, :kDO ], :expr_beg ],
130
- ["wala", [:kNIL, :kNIL ], :expr_end ],
131
- ["hanggang", [:kUNTIL, :kUNTIL_MOD ], :expr_beg ],
132
- ["hanggang_ang", [:kUNTIL, :kUNTIL_MOD ], :expr_beg ],
133
- ["mapa_hanggang", [:kUNTIL, :kUNTIL_MOD ], :expr_beg ],
134
- ["malibang", [:kUNLESS, :kUNLESS_MOD ], :expr_beg ],
135
- ["maliban_na", [:kUNLESS, :kUNLESS_MOD ], :expr_beg ],
136
- ["maliban_ang", [:kUNLESS, :kUNLESS_MOD ], :expr_beg ],
137
- ["o", [:kOR, :kOR ], :expr_beg ],
138
- ["o_ang", [:kOR, :kOR ], :expr_beg ],
139
- ["sumunod", [:kNEXT, :kNEXT ], :expr_mid ],
140
- ["kasunod", [:kNEXT, :kNEXT ], :expr_mid ],
141
- ["pagka", [:kWHEN, :kWHEN ], :expr_beg ],
142
- ["pagka_ang", [:kWHEN, :kWHEN ], :expr_beg ],
143
- ["ay", [:kWHEN, :kWHEN ], :expr_beg ],
144
- ["ulitin", [:kREDO, :kREDO ], :expr_end ],
145
- ["at_ulitin", [:kREDO, :kREDO ], :expr_end ],
146
- ["uliting_muli", [:kREDO, :kREDO ], :expr_end ],
147
- ["at", [:kAND, :kAND ], :expr_beg ],
148
- ["at_ang", [:kAND, :kAND ], :expr_beg ],
149
- ["simula", [:kBEGIN, :kBEGIN ], :expr_beg ],
150
- ["simulan", [:kBEGIN, :kBEGIN ], :expr_beg ],
151
- ["__LINE__", [:k__LINE__, :k__LINE__ ], :expr_end ],
152
- ["klase", [:kCLASS, :kCLASS ], :expr_class ],
153
- ["__FILE__", [:k__FILE__, :k__FILE__ ], :expr_end ],
154
- ["END", [:klEND, :klEND ], :expr_end ],
155
- ["BEGIN", [:klBEGIN, :klBEGIN ], :expr_end ],
156
- ["habang", [:kWHILE, :kWHILE_MOD ], :expr_beg ],
157
- ["habang_ang", [:kWHILE, :kWHILE_MOD ], :expr_beg ],
158
- ["alyas", [:kALIAS, :kALIAS ], :expr_fname ],
159
- ["__ENCODING__", [:k__ENCODING__, :k__ENCODING__], :expr_end],
37
+ ['katapusan', %i[kEND kEND], :expr_end],
38
+ ['dulo', %i[kEND kEND], :expr_end],
39
+ ['wakas', %i[kEND kEND], :expr_end],
40
+ ['iba', %i[kELSE kELSE], :expr_beg],
41
+ ['kung_iba', %i[kELSE kELSE], :expr_beg],
42
+ ['kung_hindi', %i[kELSE kELSE], :expr_beg],
43
+ ['kung_hindi_naman', %i[kELSE kELSE], :expr_beg],
44
+ ['kapag_hindi', %i[kELSE kELSE], :expr_beg],
45
+ ['kapag_hindi_naman', %i[kELSE kELSE], :expr_beg],
46
+ ['kung_hindi_pa', %i[kELSE kELSE], :expr_beg],
47
+ ['kapag_hindi_pa', %i[kELSE kELSE], :expr_beg],
48
+ ['at_kung_hindi', %i[kELSE kELSE], :expr_beg],
49
+ ['at_kapag_hindi', %i[kELSE kELSE], :expr_beg],
50
+ ['at_kung_hindi_naman', %i[kELSE kELSE], :expr_beg],
51
+ ['at_kapag_hindi_naman', %i[kELSE kELSE], :expr_beg],
52
+ ['at_kung_hindi_pa', %i[kELSE kELSE], :expr_beg],
53
+ ['at_kapag_hindi_pa', %i[kELSE kELSE], :expr_beg],
54
+ ['maliban_dito', %i[kELSE kELSE], :expr_beg],
55
+ ['maliban_sa_mga_ito', %i[kELSE kELSE], :expr_beg],
56
+ ['kalagayan', %i[kCASE kCASE], :expr_beg],
57
+ ['kaukulan', %i[kCASE kCASE], :expr_beg],
58
+ ['sakaling', %i[kCASE kCASE], :expr_beg],
59
+ ['sakali', %i[kCASE kCASE], :expr_beg],
60
+ ['kung_sakaling', %i[kCASE kCASE], :expr_beg],
61
+ ['sakali_na', %i[kCASE kCASE], :expr_beg],
62
+ ['kung_sakali_na', %i[kCASE kCASE], :expr_beg],
63
+ ['matiyak', %i[kENSURE kENSURE], :expr_beg],
64
+ ['tiyakin', %i[kENSURE kENSURE], :expr_beg],
65
+ ['tiyaking', %i[kENSURE kENSURE], :expr_beg],
66
+ ['siguraduhing', %i[kENSURE kENSURE], :expr_beg],
67
+ ['siguraduhin', %i[kENSURE kENSURE], :expr_beg],
68
+ ['panigurado', %i[kENSURE kENSURE], :expr_beg],
69
+ ['modyul', %i[kMODULE kMODULE], :expr_beg],
70
+ ['ngunit_kapag', %i[kELSIF kELSIF], :expr_beg],
71
+ ['kung_kapag', %i[kELSIF kELSIF], :expr_beg],
72
+ ['ngunit_kapag_ang', %i[kELSIF kELSIF], :expr_beg],
73
+ ['kung_kapag_ang', %i[kELSIF kELSIF], :expr_beg],
74
+ ['panuntunang', %i[kDEF kDEF], :expr_fname],
75
+ ['panuntunan', %i[kDEF kDEF], :expr_fname],
76
+ ['iligtas', %i[kRESCUE kRESCUE_MOD], :expr_mid],
77
+ ['agapan', %i[kRESCUE kRESCUE_MOD], :expr_mid],
78
+ ['hindi', %i[kNOT kNOT], :expr_beg],
79
+ ['dapat', %i[kTHEN kTHEN], :expr_beg],
80
+ ['bigyang_daan', %i[kYIELD kYIELD], :expr_arg],
81
+ ['magbigay_daan', %i[kYIELD kYIELD], :expr_arg],
82
+ ['para_sa', %i[kFOR kFOR], :expr_beg],
83
+ ['para_ang', %i[kFOR kFOR], :expr_beg],
84
+ ['self', %i[kSELF kSELF], :expr_end],
85
+ ['mali', %i[kFALSE kFALSE], :expr_end],
86
+ ['subukang_muli', %i[kRETRY kRETRY], :expr_end],
87
+ ['ibalik', %i[kRETURN kRETURN], :expr_mid],
88
+ ['ibalik_ang', %i[kRETURN kRETURN], :expr_mid],
89
+ ['magbalik', %i[kRETURN kRETURN], :expr_mid],
90
+ ['magbalik_nang', %i[kRETURN kRETURN], :expr_mid],
91
+ ['isauli', %i[kRETURN kRETURN], :expr_mid],
92
+ ['isauli_ang', %i[kRETURN kRETURN], :expr_mid],
93
+ ['ibigay', %i[kRETURN kRETURN], :expr_mid],
94
+ ['ibigay_ang', %i[kRETURN kRETURN], :expr_mid],
95
+ ['magbigay', %i[kRETURN kRETURN], :expr_mid],
96
+ ['magbigay_nang', %i[kRETURN kRETURN], :expr_mid],
97
+ ['tama', %i[kTRUE kTRUE], :expr_end],
98
+ ['kapag', %i[kIF kIF_MOD], :expr_beg],
99
+ ['kapag_ang', %i[kIF kIF_MOD], :expr_beg],
100
+ ['kapag_na_ang', %i[kIF kIF_MOD], :expr_beg],
101
+ ['kung', %i[kIF kIF_MOD], :expr_beg],
102
+ ['kung_ang', %i[kIF kIF_MOD], :expr_beg],
103
+ ['nakatukoy?', %i[kDEFINED kDEFINED], :expr_arg],
104
+ ['nakasaad?', %i[kDEFINED kDEFINED], :expr_arg],
105
+ ['super', %i[kSUPER kSUPER], :expr_arg],
106
+ ['tanggalin', %i[kUNDEF kUNDEF], :expr_fname],
107
+ ['magtanggal', %i[kUNDEF kUNDEF], :expr_fname],
108
+ ['ihinto', %i[kBREAK kBREAK], :expr_mid],
109
+ ['sa', %i[kIN kIN], :expr_beg],
110
+ ['sa_loob_ng', %i[kIN kIN], :expr_beg],
111
+ ['nasa', %i[kIN kIN], :expr_beg],
112
+ ['na_nasa', %i[kIN kIN], :expr_beg],
113
+ ['na_ganito', %i[kDO kDO], :expr_beg],
114
+ ['nang_ganito', %i[kDO kDO], :expr_beg],
115
+ ['ganito', %i[kDO kDO], :expr_beg],
116
+ ['ganito_gawin', %i[kDO kDO], :expr_beg],
117
+ ['ganito_ang_gagawin', %i[kDO kDO], :expr_beg],
118
+ ['wala', %i[kNIL kNIL], :expr_end],
119
+ ['hanggang', %i[kUNTIL kUNTIL_MOD], :expr_beg],
120
+ ['hanggang_ang', %i[kUNTIL kUNTIL_MOD], :expr_beg],
121
+ ['mapa_hanggang', %i[kUNTIL kUNTIL_MOD], :expr_beg],
122
+ ['malibang', %i[kUNLESS kUNLESS_MOD], :expr_beg],
123
+ ['maliban_na', %i[kUNLESS kUNLESS_MOD], :expr_beg],
124
+ ['maliban_ang', %i[kUNLESS kUNLESS_MOD], :expr_beg],
125
+ ['o', %i[kOR kOR], :expr_beg],
126
+ ['o_ang', %i[kOR kOR], :expr_beg],
127
+ ['sumunod', %i[kNEXT kNEXT], :expr_mid],
128
+ ['kasunod', %i[kNEXT kNEXT], :expr_mid],
129
+ ['pagka', %i[kWHEN kWHEN], :expr_beg],
130
+ ['pagka_ang', %i[kWHEN kWHEN], :expr_beg],
131
+ ['ay', %i[kWHEN kWHEN], :expr_beg],
132
+ ['ulitin', %i[kREDO kREDO], :expr_end],
133
+ ['at_ulitin', %i[kREDO kREDO], :expr_end],
134
+ ['uliting_muli', %i[kREDO kREDO], :expr_end],
135
+ ['at', %i[kAND kAND], :expr_beg],
136
+ ['at_ang', %i[kAND kAND], :expr_beg],
137
+ ['simula', %i[kBEGIN kBEGIN], :expr_beg],
138
+ ['simulan', %i[kBEGIN kBEGIN], :expr_beg],
139
+ ['__LINE__', %i[k__LINE__ k__LINE__], :expr_end],
140
+ ['klase', %i[kCLASS kCLASS], :expr_class],
141
+ ['__FILE__', %i[k__FILE__ k__FILE__], :expr_end],
142
+ ['END', %i[klEND klEND], :expr_end],
143
+ ['BEGIN', %i[klBEGIN klBEGIN], :expr_end],
144
+ ['habang', %i[kWHILE kWHILE_MOD], :expr_beg],
145
+ ['habang_ang', %i[kWHILE kWHILE_MOD], :expr_beg],
146
+ ['alyas', %i[kALIAS kALIAS], :expr_fname],
147
+ ['__ENCODING__', %i[k__ENCODING__ k__ENCODING__], :expr_end]
160
148
  ].map { |args| KWtable.new(*args) }
161
149
 
162
150
  # :startdoc:
@@ -169,20 +157,20 @@ module RubyParserStuff
169
157
 
170
158
  $VERBOSE = original_verbosity
171
159
 
172
- WORDLIST18.delete "__ENCODING__"
160
+ WORDLIST18.delete '__ENCODING__'
173
161
 
174
162
  %w[at at_ang
175
- kalagayan kaukulan sakaling sakali kung_sakaling sakali_na kung_sakali_na
176
- ngunit_kapag kung_kapag ngunit_kapag_ang kung_kapag_ang
177
- para_sa para_ang
178
- kapag kapag_ang kapag_na_ang kung kung_ang
179
- sa sa_loob_ng nasa na_nasa
180
- modyul
181
- o o_ang
182
- malibang maliban_na maliban_ang
183
- hanggang hanggang_ang mapa_hanggang
184
- pagka pagka_ang ay
185
- habang habang_ang].each do |k|
163
+ kalagayan kaukulan sakaling sakali kung_sakaling sakali_na kung_sakali_na
164
+ ngunit_kapag kung_kapag ngunit_kapag_ang kung_kapag_ang
165
+ para_sa para_ang
166
+ kapag kapag_ang kapag_na_ang kung kung_ang
167
+ sa sa_loob_ng nasa na_nasa
168
+ modyul
169
+ o o_ang
170
+ malibang maliban_na maliban_ang
171
+ hanggang hanggang_ang mapa_hanggang
172
+ pagka pagka_ang ay
173
+ habang habang_ang].each do |k|
186
174
  WORDLIST19[k] = WORDLIST19[k].dup
187
175
  WORDLIST19[k].state = :expr_value
188
176
  end
@@ -190,7 +178,5 @@ module RubyParserStuff
190
178
  WORDLIST19[k] = WORDLIST19[k].dup
191
179
  WORDLIST19[k].state = :expr_arg
192
180
  end
193
-
194
181
  end
195
182
  end
196
-
@@ -1,18 +1,12 @@
1
- # encoding: utf-8
2
-
3
1
  require 'ruby2ruby'
4
2
  require 'ruby_parser'
5
3
  require 'bato/ruby_parser_patches'
6
4
 
7
5
  module Bato
8
-
9
6
  class Tagatala
7
+ def initialize; end
10
8
 
11
- def initialize
12
-
13
- end
14
-
15
- PASIMULANG_KODIGO = "# encoding: utf-8\nrequire \"bato/core_ext\"\n"
9
+ PASIMULANG_KODIGO = "# encoding: utf-8\nrequire \"bato/core_ext\"\n".freeze
16
10
 
17
11
  def sa_ruby(kodigo)
18
12
  ruby2ruby = Ruby2Ruby.new
@@ -23,8 +17,5 @@ module Bato
23
17
 
24
18
  "#{PASIMULANG_KODIGO}#{ruby_kodigo}"
25
19
  end
26
-
27
20
  end
28
-
29
21
  end
30
-
File without changes
File without changes
@@ -1,5 +1,5 @@
1
1
  kapag 1 > 0
2
- isulat "Kamusta mundo!"
2
+ isulat "Kumusta mundo!"
3
3
  kung_hindi
4
4
  isulat "Mayroong sira"
5
5
  katapusan
File without changes
File without changes
@@ -1,7 +1,7 @@
1
- # encoding: utf-8
2
- require "spec_helper"
3
1
 
4
- isalaysay_ang "Tagatala" do
2
+ require 'spec_helper'
3
+
4
+ isalaysay_ang 'Tagatala' do
5
5
  italaga_ang(:pasimulang_kodigo) do
6
6
  "# encoding: utf-8\nrequire \"bato/core_ext\"\n"
7
7
  end
@@ -10,41 +10,40 @@ isalaysay_ang "Tagatala" do
10
10
  Bato::Tagatala.new
11
11
  end
12
12
 
13
- ito_ang "walang lamang program na Bato" do
14
- tagatala.sa_ruby("").should == pasimulang_kodigo + ""
13
+ ito_ang 'walang lamang program na Bato' do
14
+ tagatala.sa_ruby('').should == pasimulang_kodigo + ''
15
15
  end
16
16
 
17
- isalaysay_ang "bilang" do
18
- ito_ang "pambuong bilang" do
19
- tagatala.sa_ruby("1").should == pasimulang_kodigo + "1"
17
+ isalaysay_ang 'bilang' do
18
+ ito_ang 'pambuong bilang' do
19
+ tagatala.sa_ruby('1').should == pasimulang_kodigo + '1'
20
20
  end
21
21
 
22
- ito_ang "maliliit na bilang" do
23
- tagatala.sa_ruby("1.2").should == pasimulang_kodigo + "1.2"
22
+ ito_ang 'maliliit na bilang' do
23
+ tagatala.sa_ruby('1.2').should == pasimulang_kodigo + '1.2'
24
24
  end
25
25
 
26
- ito_ang "listahan ng mga bilang" do
27
- tagatala.sa_ruby("[1.2, 3]").should == pasimulang_kodigo + "[1.2, 3]"
26
+ ito_ang 'listahan ng mga bilang' do
27
+ tagatala.sa_ruby('[1.2, 3]').should == pasimulang_kodigo + '[1.2, 3]'
28
28
  end
29
29
  end
30
30
 
31
- isalaysay_ang "ekspresyong Boolean" do
32
- ito_ang "ekspresyon ng tama o true" do
33
- tagatala.sa_ruby("tama").should == pasimulang_kodigo + "true"
31
+ isalaysay_ang 'ekspresyong Boolean' do
32
+ ito_ang 'ekspresyon ng tama o true' do
33
+ tagatala.sa_ruby('tama').should == pasimulang_kodigo + 'true'
34
34
  end
35
35
 
36
- ito_ang "ekspresyon ng mali o false" do
37
- tagatala.sa_ruby("mali").should == pasimulang_kodigo + "false"
36
+ ito_ang 'ekspresyon ng mali o false' do
37
+ tagatala.sa_ruby('mali').should == pasimulang_kodigo + 'false'
38
38
  end
39
39
 
40
- ito_ang "ekspresyon ng hindi o not" do
41
- tagatala.sa_ruby("hindi tama").should == pasimulang_kodigo + "(not true)"
40
+ ito_ang 'ekspresyon ng hindi o not' do
41
+ tagatala.sa_ruby('hindi tama').should == pasimulang_kodigo + '(not true)'
42
42
  end
43
-
44
43
  end
45
44
 
46
- isalaysay_ang "susing mga salita" do
47
- ito_ang "ekspresyon ng kapag / dapat / kung_kapag / kung_hindi / katapusan" do
45
+ isalaysay_ang 'susing mga salita' do
46
+ ito_ang 'ekspresyon ng kapag / dapat / kung_kapag / kung_hindi / katapusan' do
48
47
  tagatala.sa_ruby('
49
48
  kapag 1 dapat
50
49
  2
@@ -52,13 +51,11 @@ isalaysay_ang "Tagatala" do
52
51
  4
53
52
  kung_hindi
54
53
  5
55
- katapusan'
56
- ).should be_like(pasimulang_kodigo +
57
- '1 ? (2) : (3 ? (4) : (5))'
58
- )
54
+ katapusan').should be_like(pasimulang_kodigo +
55
+ '1 ? (2) : (3 ? (4) : (5))')
59
56
  end
60
57
 
61
- ito_ang "ekspresyon ng kung_sakaling / pagka / dapat / kung_hindi / katapusan" do
58
+ ito_ang 'ekspresyon ng kung_sakaling / pagka / dapat / kung_hindi / katapusan' do
62
59
  tagatala.sa_ruby("
63
60
  kung_sakaling 1
64
61
  pagka 1 dapat 1
@@ -66,8 +63,7 @@ isalaysay_ang "Tagatala" do
66
63
  2
67
64
  kung_hindi
68
65
  3
69
- katapusan"
70
- ).should be_like(pasimulang_kodigo +
66
+ katapusan").should be_like(pasimulang_kodigo +
71
67
  'case 1
72
68
  when 1 then
73
69
  1
@@ -75,11 +71,10 @@ isalaysay_ang "Tagatala" do
75
71
  2
76
72
  else
77
73
  3
78
- end'
79
- )
74
+ end')
80
75
  end
81
76
 
82
- ito_ang "simula / iligtas / iangat / siguraduhing / katapusan" do
77
+ ito_ang 'simula / iligtas / iangat / siguraduhing / katapusan' do
83
78
  # raise ir Kernel metode nevis atslēgvārds
84
79
  tagatala.sa_ruby('
85
80
  simula
@@ -89,8 +84,7 @@ isalaysay_ang "Tagatala" do
89
84
  iangat pagkakamali, pagkakamali.iulat
90
85
  siguraduhing
91
86
  isulat "Katapusan"
92
- katapusan'
93
- ).should be_like(pasimulang_kodigo +
87
+ katapusan').should be_like(pasimulang_kodigo +
94
88
  'begin
95
89
  (1 / 0)
96
90
  rescue => pagkakamali
@@ -98,29 +92,26 @@ isalaysay_ang "Tagatala" do
98
92
  iangat(pagkakamali, pagkakamali.iulat)
99
93
  ensure
100
94
  isulat("Katapusan")
101
- end'
102
- )
95
+ end')
103
96
  end
104
-
105
97
  end
106
98
 
107
- isalaysay_ang "pamamaraan sa Kernel" do
99
+ isalaysay_ang 'pamamaraan sa Kernel' do
108
100
  ito_ang "ekspresyon ng pagsusulat gamit ang 'isulat'" do
109
101
  tagatala.sa_ruby("isulat 'abc'").should ==
110
- pasimulang_kodigo + "isulat(\"abc\")"
102
+ pasimulang_kodigo + 'isulat("abc")'
111
103
  end
112
104
  end
113
105
 
114
- isalaysay_ang "Dinikit na mga pamamaraan" do
115
- ito_ang "ekspresyon ng pamamaraan sa pagbabaliktad ng mga titik" do
106
+ isalaysay_ang 'Dinikit na mga pamamaraan' do
107
+ ito_ang 'ekspresyon ng pamamaraan sa pagbabaliktad ng mga titik' do
116
108
  resulta = eval tagatala.sa_ruby("'magandang araw'.baliktad")
117
109
  resulta.should == 'wara gnadnagam'
118
110
  end
119
111
 
120
- ito_ang "ekspresayon ng pamamaraan sa pagsukat ng haba ng salita" do
112
+ ito_ang 'ekspresayon ng pamamaraan sa pagsukat ng haba ng salita' do
121
113
  resulta = eval tagatala.sa_ruby("'Pangungusap'.haba")
122
114
  resulta.should == 11
123
115
  end
124
116
  end
125
-
126
117
  end
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+
2
2
  # This file was generated by the `rspec --init` command. Conventionally, all
3
3
  # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
4
4
  # Require this file using `require "spec_helper"` to ensure that it is only
@@ -46,7 +46,7 @@ RSpec.configure do |config|
46
46
  end
47
47
 
48
48
  class << RSpec::Core::ExampleGroup
49
- alias_method :isalaysay_ang, :describe
49
+ alias isalaysay_ang describe
50
50
  RSpec::Core::ExampleGroup.define_example_group_method :isalaysay_ang
51
51
  RSpec::Core::ExampleGroup.define_example_method :ito_ang
52
52
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bato
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joel Bryan Juliano
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-30 00:00:00.000000000 Z
11
+ date: 2017-10-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby2ruby
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: '2.4'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: '2.4'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -42,30 +42,30 @@ dependencies:
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: '12.2'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: '12.2'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
61
+ version: '3.7'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0'
68
+ version: '3.7'
69
69
  description: Bato Programming Language
70
70
  email:
71
71
  - joelbryan.juliano@gmail.com
@@ -83,34 +83,34 @@ files:
83
83
  - Rakefile
84
84
  - bato.gemspec
85
85
  - bin/bato
86
- - examples/agapan.bato
87
- - examples/dapat.bato
88
- - examples/kamusta_mundo.bato
89
- - examples/kontrol-sa-pagiikot.bato
90
- - examples/magbibigay.bato
91
- - examples/modyul.bato
92
- - examples/ngunit_kapag.bato
93
- - examples/pamamaraan-sa-pagkakamali.bato
94
- - examples/pangalan.bato
95
- - examples/panuntunan.bato
96
- - examples/para_sa.bato
97
- - examples/pibonasyi.bato
98
- - examples/siguraduhin.bato
99
86
  - lib/bato.rb
87
+ - lib/bato/bersiyon.rb
100
88
  - lib/bato/core_ext.rb
101
89
  - lib/bato/core_ext/array.rb
102
90
  - lib/bato/core_ext/class.rb
103
91
  - lib/bato/core_ext/enumerator.rb
104
- - lib/bato/core_ext/fixnum.rb
92
+ - lib/bato/core_ext/integer.rb
105
93
  - lib/bato/core_ext/kernel.rb
106
94
  - lib/bato/core_ext/range.rb
107
95
  - lib/bato/core_ext/string.rb
108
96
  - lib/bato/ruby_parser_patches.rb
109
97
  - lib/bato/tagatala.rb
110
- - lib/bato/version.rb
98
+ - mga_halimbawa/agapan.bato
99
+ - mga_halimbawa/dapat.bato
100
+ - mga_halimbawa/kontrol-sa-pagiikot.bato
101
+ - mga_halimbawa/kumusta_mundo.bato
102
+ - mga_halimbawa/magbibigay.bato
103
+ - mga_halimbawa/modyul.bato
104
+ - mga_halimbawa/ngunit_kapag.bato
105
+ - mga_halimbawa/pamamaraan-sa-pagkakamali.bato
106
+ - mga_halimbawa/pangalan.bato
107
+ - mga_halimbawa/panuntunan.bato
108
+ - mga_halimbawa/para_sa.bato
109
+ - mga_halimbawa/pibonasyi.bato
110
+ - mga_halimbawa/siguraduhin.bato
111
111
  - spec/bato/tagatala_spec.rb
112
112
  - spec/spec_helper.rb
113
- homepage: ''
113
+ homepage: https://github.com/jjuliano/bato
114
114
  licenses:
115
115
  - MIT
116
116
  metadata: {}
@@ -130,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
130
130
  version: '0'
131
131
  requirements: []
132
132
  rubyforge_project:
133
- rubygems_version: 2.5.1
133
+ rubygems_version: 2.6.13
134
134
  signing_key:
135
135
  specification_version: 4
136
136
  summary: Ang Bato ay isang programming language sa wikang Tagalog
@@ -1,5 +0,0 @@
1
- # encoding: utf-8
2
-
3
- class Fixnum
4
- alias_method :ulit, :times
5
- end
@@ -1,3 +0,0 @@
1
- module Bato
2
- VERSION = "0.0.5"
3
- end