excel_to_code 0.0.13 → 0.0.14

Sign up to get free protection for your applications and to get access to all the features.
@@ -128,7 +128,7 @@ class Formula < RubyPeg
128
128
  end
129
129
 
130
130
  def table_name
131
- terminal(/[.a-zA-Z0-9_]+/)
131
+ terminal(/[.\p{Word}_]+/)
132
132
  end
133
133
 
134
134
  def range_structured_reference
@@ -149,13 +149,13 @@ class Formula < RubyPeg
149
149
 
150
150
  def named_reference
151
151
  node :named_reference do
152
- terminal(/[#a-zA-Z][\w_.!]+/)
152
+ terminal(/[#\p{word}][\p{word}_.!]+/)
153
153
  end
154
154
  end
155
155
 
156
156
  def sheet_reference
157
157
  node :sheet_reference do
158
- (single_quoted_string || terminal(/[a-zA-Z0-9][\w_.]+/)) && ignore { terminal("!") } && (sheetless_reference || named_reference)
158
+ (single_quoted_string || terminal(/[\p{word}][\p{word}_.]+/)) && ignore { terminal("!") } && (sheetless_reference || named_reference)
159
159
  end
160
160
  end
161
161
 
@@ -20,13 +20,13 @@ operator := '+' | '-' | '/' | '*' | '^'
20
20
  external_reference := /\[\d+\]!?/ any_internal_reference
21
21
  table_reference := table_name `'[' (range_structured_reference | complex_structured_reference | simple_structured_reference) `']'
22
22
  local_table_reference := `'[' (range_structured_reference | complex_structured_reference | overly_structured_reference | simple_structured_reference) `']'
23
- table_name = /[.a-zA-Z0-9_]+/
23
+ table_name = /[.\p{Word}_]+/
24
24
  range_structured_reference = /\[[^\u005d]*\],\[[^\u005d]*\]:\[[^\u005d]*\]/
25
25
  complex_structured_reference = /\[[^\u005d]*\],\[[^\u005d]*\]/
26
26
  overly_structured_reference = `'[' simple_structured_reference `']'
27
27
  simple_structured_reference = /[^\u005d]*/
28
- named_reference := /[#a-zA-Z][\w_.!]+/
29
- sheet_reference := (single_quoted_string | /[a-zA-Z0-9][\w_.]+/) `'!' (sheetless_reference | named_reference)
28
+ named_reference := /[#\p{word}][\p{word}_.!]+/
29
+ sheet_reference := (single_quoted_string | /[\p{word}][\p{word}_.]+/) `'!' (sheetless_reference | named_reference)
30
30
  single_quoted_string = `"'" /[^']*/ `"'"
31
31
  sheetless_reference = column_range | row_range | area | cell
32
32
  column_range := column `':' column
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: excel_to_code
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.13
4
+ version: 0.0.14
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-22 00:00:00.000000000 Z
12
+ date: 2012-10-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rubypeg
@@ -242,10 +242,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
242
242
  version: '0'
243
243
  requirements: []
244
244
  rubyforge_project:
245
- rubygems_version: 1.8.24
245
+ rubygems_version: 1.8.23
246
246
  signing_key:
247
247
  specification_version: 3
248
248
  summary: Converts .xlxs files into pure ruby 1.9 code or pure C code so that they
249
249
  can be executed without excel
250
250
  test_files: []
251
- has_rdoc: false