oga 0.3.4 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -58,7 +58,12 @@ module Oga
58
58
  #
59
59
  # evaluator.evaluate('$number') # => 10
60
60
  #
61
+ # @api private
62
+ #
61
63
  class Evaluator
64
+ # Wildcard for node names/namespace prefixes.
65
+ STAR = '*'
66
+
62
67
  ##
63
68
  # @param [Oga::XML::Document|Oga::XML::Node] document
64
69
  # @param [Hash] variables Hash containing variables to expose to the XPath
@@ -187,7 +192,7 @@ module Oga
187
192
  # @return [Oga::XML::NodeSet]
188
193
  #
189
194
  def on_predicate(ast_node, context)
190
- test, predicate = *ast_node
195
+ test, predicate = *ast_node.children
191
196
  final_nodes = XML::NodeSet.new
192
197
 
193
198
  context.each do |context_node|
@@ -229,7 +234,7 @@ module Oga
229
234
  # @return [Oga::XML::NodeSet]
230
235
  #
231
236
  def on_axis(ast_node, context)
232
- name, test = *ast_node
237
+ name, test = *ast_node.children
233
238
 
234
239
  handler = name.gsub('-', '_')
235
240
 
@@ -534,7 +539,7 @@ module Oga
534
539
  next unless context_node.respond_to?(:available_namespaces)
535
540
 
536
541
  context_node.available_namespaces.each do |_, namespace|
537
- if namespace.name == name or name == '*'
542
+ if namespace.name == name or name == STAR
538
543
  nodes << namespace
539
544
  end
540
545
  end
@@ -551,7 +556,7 @@ module Oga
551
556
  # @return [Oga::XML::NodeSet]
552
557
  #
553
558
  def on_type_test(ast_node, context)
554
- name, test = *ast_node
559
+ name, test = *ast_node.children
555
560
 
556
561
  handler = name.gsub('-', '_')
557
562
 
@@ -638,7 +643,7 @@ module Oga
638
643
  # @return [Oga::XML::NodeSet]
639
644
  #
640
645
  def on_pipe(ast_node, context)
641
- left, right = *ast_node
646
+ left, right = *ast_node.children
642
647
 
643
648
  return process(left, context) + process(right, context)
644
649
  end
@@ -655,7 +660,7 @@ module Oga
655
660
  # @return [TrueClass|FalseClass]
656
661
  #
657
662
  def on_and(ast_node, context)
658
- left, right = *ast_node
663
+ left, right = *ast_node.children
659
664
 
660
665
  return on_call_boolean(context, left) && on_call_boolean(context, right)
661
666
  end
@@ -672,7 +677,7 @@ module Oga
672
677
  # @return [TrueClass|FalseClass]
673
678
  #
674
679
  def on_or(ast_node, context)
675
- left, right = *ast_node
680
+ left, right = *ast_node.children
676
681
 
677
682
  return on_call_boolean(context, left) || on_call_boolean(context, right)
678
683
  end
@@ -688,7 +693,7 @@ module Oga
688
693
  # @return [Float]
689
694
  #
690
695
  def on_add(ast_node, context)
691
- left, right = *ast_node
696
+ left, right = *ast_node.children
692
697
 
693
698
  return on_call_number(context, left) + on_call_number(context, right)
694
699
  end
@@ -704,7 +709,7 @@ module Oga
704
709
  # @return [Float]
705
710
  #
706
711
  def on_div(ast_node, context)
707
- left, right = *ast_node
712
+ left, right = *ast_node.children
708
713
 
709
714
  return on_call_number(context, left) / on_call_number(context, right)
710
715
  end
@@ -720,7 +725,7 @@ module Oga
720
725
  # @return [Float]
721
726
  #
722
727
  def on_mod(ast_node, context)
723
- left, right = *ast_node
728
+ left, right = *ast_node.children
724
729
 
725
730
  return on_call_number(context, left) % on_call_number(context, right)
726
731
  end
@@ -736,7 +741,7 @@ module Oga
736
741
  # @return [Float]
737
742
  #
738
743
  def on_mul(ast_node, context)
739
- left, right = *ast_node
744
+ left, right = *ast_node.children
740
745
 
741
746
  return on_call_number(context, left) * on_call_number(context, right)
742
747
  end
@@ -752,7 +757,7 @@ module Oga
752
757
  # @return [Float]
753
758
  #
754
759
  def on_sub(ast_node, context)
755
- left, right = *ast_node
760
+ left, right = *ast_node.children
756
761
 
757
762
  return on_call_number(context, left) - on_call_number(context, right)
758
763
  end
@@ -816,7 +821,7 @@ module Oga
816
821
  # @return [TrueClass|FalseClass]
817
822
  #
818
823
  def on_lt(ast_node, context)
819
- left, right = *ast_node
824
+ left, right = *ast_node.children
820
825
 
821
826
  return on_call_number(context, left) < on_call_number(context, right)
822
827
  end
@@ -832,7 +837,7 @@ module Oga
832
837
  # @return [TrueClass|FalseClass]
833
838
  #
834
839
  def on_gt(ast_node, context)
835
- left, right = *ast_node
840
+ left, right = *ast_node.children
836
841
 
837
842
  return on_call_number(context, left) > on_call_number(context, right)
838
843
  end
@@ -849,7 +854,7 @@ module Oga
849
854
  # @return [TrueClass|FalseClass]
850
855
  #
851
856
  def on_lte(ast_node, context)
852
- left, right = *ast_node
857
+ left, right = *ast_node.children
853
858
 
854
859
  return on_call_number(context, left) <= on_call_number(context, right)
855
860
  end
@@ -866,7 +871,7 @@ module Oga
866
871
  # @return [TrueClass|FalseClass]
867
872
  #
868
873
  def on_gte(ast_node, context)
869
- left, right = *ast_node
874
+ left, right = *ast_node.children
870
875
 
871
876
  return on_call_number(context, left) >= on_call_number(context, right)
872
877
  end
@@ -885,7 +890,7 @@ module Oga
885
890
  # @return [Oga::XML::NodeSet]
886
891
  #
887
892
  def on_call(ast_node, context)
888
- name, *args = *ast_node
893
+ name, *args = *ast_node.children
889
894
 
890
895
  handler = name.gsub('-', '_')
891
896
 
@@ -1635,16 +1640,16 @@ module Oga
1635
1640
  # @return [Oga::XML::NodeSet]
1636
1641
  #
1637
1642
  def node_matches?(xml_node, ast_node)
1638
- ns, name = *ast_node
1643
+ ns, name = *ast_node.children
1639
1644
 
1640
- if ast_node.type == :type_test
1645
+ if ast_node.type.equal?(:type_test)
1641
1646
  return type_matches?(xml_node, ast_node)
1642
1647
  end
1643
1648
 
1644
1649
  # If only the name is given and is a wildcard then we'll also want to
1645
1650
  # match the namespace as a wildcard.
1646
- if !ns and name == '*'
1647
- ns = '*'
1651
+ if !ns and name == STAR
1652
+ ns = STAR
1648
1653
  end
1649
1654
 
1650
1655
  name_matches = name_matches?(xml_node, name)
@@ -1686,7 +1691,7 @@ module Oga
1686
1691
  def name_matches?(xml_node, name)
1687
1692
  return false unless xml_node.respond_to?(:name)
1688
1693
 
1689
- return xml_node.name == name || name == '*'
1694
+ return name == STAR ? true : xml_node.name == name
1690
1695
  end
1691
1696
 
1692
1697
  ##
@@ -1699,7 +1704,9 @@ module Oga
1699
1704
  def namespace_matches?(xml_node, ns)
1700
1705
  return false unless xml_node.respond_to?(:namespace)
1701
1706
 
1702
- return xml_node.namespace.to_s == ns || ns == '*'
1707
+ return true if ns == STAR
1708
+
1709
+ return xml_node.namespace && xml_node.namespace.name == ns
1703
1710
  end
1704
1711
 
1705
1712
  ##
@@ -34,9 +34,11 @@ module Oga
34
34
  # use separate instances per thread as there is no global (= class level)
35
35
  # shared state.
36
36
  #
37
+ # @api private
38
+ #
37
39
  class Lexer
38
40
 
39
- # line 40 "lib/oga/xpath/lexer.rb"
41
+ # line 42 "lib/oga/xpath/lexer.rb"
40
42
  class << self
41
43
  attr_accessor :_xpath_lexer_trans_keys
42
44
  private :_xpath_lexer_trans_keys, :_xpath_lexer_trans_keys=
@@ -1336,7 +1338,7 @@ end
1336
1338
  self.xpath_lexer_en_main = 22;
1337
1339
 
1338
1340
 
1339
- # line 37 "lib/oga/xpath/lexer.rl"
1341
+ # line 39 "lib/oga/xpath/lexer.rl"
1340
1342
 
1341
1343
  # % fix highlight
1342
1344
 
@@ -1430,7 +1432,7 @@ self.xpath_lexer_en_main = 22;
1430
1432
  _xpath_lexer_trans_targs = self.class.send(:_xpath_lexer_trans_targs)
1431
1433
 
1432
1434
 
1433
- # line 1434 "lib/oga/xpath/lexer.rb"
1435
+ # line 1436 "lib/oga/xpath/lexer.rb"
1434
1436
  begin
1435
1437
  testEof = false
1436
1438
  _slen, _trans, _keys, _inds, _acts, _nacts = nil
@@ -1458,7 +1460,7 @@ begin
1458
1460
  begin
1459
1461
  ts = p
1460
1462
  end
1461
- # line 1462 "lib/oga/xpath/lexer.rb"
1463
+ # line 1464 "lib/oga/xpath/lexer.rb"
1462
1464
  end
1463
1465
  _keys = cs << 1
1464
1466
  _inds = _xpath_lexer_index_offsets[cs]
@@ -1478,11 +1480,11 @@ ts = p
1478
1480
  if _xpath_lexer_trans_actions[_trans] != 0
1479
1481
  case _xpath_lexer_trans_actions[_trans]
1480
1482
  when 19 then
1481
- # line 184 "lib/oga/xpath/lexer.rl"
1483
+ # line 186 "lib/oga/xpath/lexer.rl"
1482
1484
  begin
1483
1485
  add_token(:T_SLASH) end
1484
1486
  when 34 then
1485
- # line 296 "lib/oga/xpath/lexer.rl"
1487
+ # line 298 "lib/oga/xpath/lexer.rl"
1486
1488
  begin
1487
1489
  add_token(:T_ADD) end
1488
1490
  when 13 then
@@ -1491,12 +1493,12 @@ ts = p
1491
1493
  te = p+1
1492
1494
  end
1493
1495
  when 12 then
1494
- # line 368 "lib/oga/xpath/lexer.rl"
1496
+ # line 370 "lib/oga/xpath/lexer.rl"
1495
1497
  begin
1496
1498
  te = p+1
1497
1499
  end
1498
1500
  when 9 then
1499
- # line 349 "lib/oga/xpath/lexer.rl"
1501
+ # line 351 "lib/oga/xpath/lexer.rl"
1500
1502
  begin
1501
1503
  te = p+1
1502
1504
  begin
@@ -1504,7 +1506,7 @@ te = p+1
1504
1506
  end
1505
1507
  end
1506
1508
  when 3 then
1507
- # line 362 "lib/oga/xpath/lexer.rl"
1509
+ # line 364 "lib/oga/xpath/lexer.rl"
1508
1510
  begin
1509
1511
  te = p+1
1510
1512
  begin
@@ -1512,7 +1514,7 @@ te = p+1
1512
1514
  end
1513
1515
  end
1514
1516
  when 2 then
1515
- # line 238 "lib/oga/xpath/lexer.rl"
1517
+ # line 240 "lib/oga/xpath/lexer.rl"
1516
1518
  begin
1517
1519
  te = p+1
1518
1520
  begin
@@ -1520,7 +1522,7 @@ te = p+1
1520
1522
  end
1521
1523
  end
1522
1524
  when 8 then
1523
- # line 260 "lib/oga/xpath/lexer.rl"
1525
+ # line 262 "lib/oga/xpath/lexer.rl"
1524
1526
  begin
1525
1527
  te = p+1
1526
1528
  begin
@@ -1528,7 +1530,7 @@ te = p+1
1528
1530
  end
1529
1531
  end
1530
1532
  when 21 then
1531
- # line 272 "lib/oga/xpath/lexer.rl"
1533
+ # line 274 "lib/oga/xpath/lexer.rl"
1532
1534
  begin
1533
1535
  te = p+1
1534
1536
  begin
@@ -1549,7 +1551,7 @@ te = p+1
1549
1551
  end
1550
1552
  end
1551
1553
  when 16 then
1552
- # line 199 "lib/oga/xpath/lexer.rl"
1554
+ # line 201 "lib/oga/xpath/lexer.rl"
1553
1555
  begin
1554
1556
  te = p+1
1555
1557
  begin
@@ -1557,12 +1559,12 @@ te = p+1
1557
1559
  end
1558
1560
  end
1559
1561
  when 24 then
1560
- # line 368 "lib/oga/xpath/lexer.rl"
1562
+ # line 370 "lib/oga/xpath/lexer.rl"
1561
1563
  begin
1562
1564
  te = p
1563
1565
  p = p - 1; end
1564
1566
  when 32 then
1565
- # line 362 "lib/oga/xpath/lexer.rl"
1567
+ # line 364 "lib/oga/xpath/lexer.rl"
1566
1568
  begin
1567
1569
  te = p
1568
1570
  p = p - 1; begin
@@ -1570,7 +1572,7 @@ p = p - 1; begin
1570
1572
  end
1571
1573
  end
1572
1574
  when 36 then
1573
- # line 213 "lib/oga/xpath/lexer.rl"
1575
+ # line 215 "lib/oga/xpath/lexer.rl"
1574
1576
  begin
1575
1577
  te = p
1576
1578
  p = p - 1; begin
@@ -1580,7 +1582,7 @@ p = p - 1; begin
1580
1582
  end
1581
1583
  end
1582
1584
  when 37 then
1583
- # line 219 "lib/oga/xpath/lexer.rl"
1585
+ # line 221 "lib/oga/xpath/lexer.rl"
1584
1586
  begin
1585
1587
  te = p
1586
1588
  p = p - 1; begin
@@ -1590,7 +1592,7 @@ p = p - 1; begin
1590
1592
  end
1591
1593
  end
1592
1594
  when 38 then
1593
- # line 272 "lib/oga/xpath/lexer.rl"
1595
+ # line 274 "lib/oga/xpath/lexer.rl"
1594
1596
  begin
1595
1597
  te = p
1596
1598
  p = p - 1; begin
@@ -1611,7 +1613,7 @@ p = p - 1; begin
1611
1613
  end
1612
1614
  end
1613
1615
  when 44 then
1614
- # line 199 "lib/oga/xpath/lexer.rl"
1616
+ # line 201 "lib/oga/xpath/lexer.rl"
1615
1617
  begin
1616
1618
  te = p
1617
1619
  p = p - 1; begin
@@ -1619,12 +1621,12 @@ p = p - 1; begin
1619
1621
  end
1620
1622
  end
1621
1623
  when 1 then
1622
- # line 368 "lib/oga/xpath/lexer.rl"
1624
+ # line 370 "lib/oga/xpath/lexer.rl"
1623
1625
  begin
1624
1626
  begin p = ((te))-1; end
1625
1627
  end
1626
1628
  when 7 then
1627
- # line 199 "lib/oga/xpath/lexer.rl"
1629
+ # line 201 "lib/oga/xpath/lexer.rl"
1628
1630
  begin
1629
1631
  begin p = ((te))-1; end
1630
1632
  begin
@@ -1662,162 +1664,162 @@ end
1662
1664
  end
1663
1665
  end
1664
1666
  when 14 then
1665
- # line 185 "lib/oga/xpath/lexer.rl"
1667
+ # line 187 "lib/oga/xpath/lexer.rl"
1666
1668
  begin
1667
1669
  add_token(:T_LPAREN) end
1668
- # line 368 "lib/oga/xpath/lexer.rl"
1670
+ # line 370 "lib/oga/xpath/lexer.rl"
1669
1671
  begin
1670
1672
  te = p+1
1671
1673
  end
1672
1674
  when 15 then
1673
- # line 186 "lib/oga/xpath/lexer.rl"
1675
+ # line 188 "lib/oga/xpath/lexer.rl"
1674
1676
  begin
1675
1677
  add_token(:T_RPAREN) end
1676
- # line 368 "lib/oga/xpath/lexer.rl"
1678
+ # line 370 "lib/oga/xpath/lexer.rl"
1677
1679
  begin
1678
1680
  te = p+1
1679
1681
  end
1680
1682
  when 18 then
1681
- # line 187 "lib/oga/xpath/lexer.rl"
1683
+ # line 189 "lib/oga/xpath/lexer.rl"
1682
1684
  begin
1683
1685
  add_token(:T_COMMA) end
1684
- # line 368 "lib/oga/xpath/lexer.rl"
1686
+ # line 370 "lib/oga/xpath/lexer.rl"
1685
1687
  begin
1686
1688
  te = p+1
1687
1689
  end
1688
1690
  when 20 then
1689
- # line 188 "lib/oga/xpath/lexer.rl"
1691
+ # line 190 "lib/oga/xpath/lexer.rl"
1690
1692
  begin
1691
1693
  add_token(:T_COLON) end
1692
- # line 368 "lib/oga/xpath/lexer.rl"
1694
+ # line 370 "lib/oga/xpath/lexer.rl"
1693
1695
  begin
1694
1696
  te = p+1
1695
1697
  end
1696
1698
  when 22 then
1697
- # line 189 "lib/oga/xpath/lexer.rl"
1699
+ # line 191 "lib/oga/xpath/lexer.rl"
1698
1700
  begin
1699
1701
  add_token(:T_LBRACK) end
1700
- # line 368 "lib/oga/xpath/lexer.rl"
1702
+ # line 370 "lib/oga/xpath/lexer.rl"
1701
1703
  begin
1702
1704
  te = p+1
1703
1705
  end
1704
1706
  when 23 then
1705
- # line 190 "lib/oga/xpath/lexer.rl"
1707
+ # line 192 "lib/oga/xpath/lexer.rl"
1706
1708
  begin
1707
1709
  add_token(:T_RBRACK) end
1708
- # line 368 "lib/oga/xpath/lexer.rl"
1710
+ # line 370 "lib/oga/xpath/lexer.rl"
1709
1711
  begin
1710
1712
  te = p+1
1711
1713
  end
1712
1714
  when 45 then
1713
- # line 295 "lib/oga/xpath/lexer.rl"
1715
+ # line 297 "lib/oga/xpath/lexer.rl"
1714
1716
  begin
1715
1717
  add_token(:T_PIPE) end
1716
- # line 367 "lib/oga/xpath/lexer.rl"
1718
+ # line 369 "lib/oga/xpath/lexer.rl"
1717
1719
  begin
1718
1720
  te = p
1719
1721
  p = p - 1; end
1720
1722
  when 33 then
1721
- # line 296 "lib/oga/xpath/lexer.rl"
1723
+ # line 298 "lib/oga/xpath/lexer.rl"
1722
1724
  begin
1723
1725
  add_token(:T_ADD) end
1724
- # line 367 "lib/oga/xpath/lexer.rl"
1726
+ # line 369 "lib/oga/xpath/lexer.rl"
1725
1727
  begin
1726
1728
  te = p
1727
1729
  p = p - 1; end
1728
1730
  when 41 then
1729
- # line 297 "lib/oga/xpath/lexer.rl"
1731
+ # line 299 "lib/oga/xpath/lexer.rl"
1730
1732
  begin
1731
1733
  add_token(:T_EQ) end
1732
- # line 367 "lib/oga/xpath/lexer.rl"
1734
+ # line 369 "lib/oga/xpath/lexer.rl"
1733
1735
  begin
1734
1736
  te = p
1735
1737
  p = p - 1; end
1736
1738
  when 31 then
1737
- # line 298 "lib/oga/xpath/lexer.rl"
1739
+ # line 300 "lib/oga/xpath/lexer.rl"
1738
1740
  begin
1739
1741
  add_token(:T_NEQ) end
1740
- # line 367 "lib/oga/xpath/lexer.rl"
1742
+ # line 369 "lib/oga/xpath/lexer.rl"
1741
1743
  begin
1742
1744
  te = p
1743
1745
  p = p - 1; end
1744
1746
  when 39 then
1745
- # line 299 "lib/oga/xpath/lexer.rl"
1747
+ # line 301 "lib/oga/xpath/lexer.rl"
1746
1748
  begin
1747
1749
  add_token(:T_LT) end
1748
- # line 367 "lib/oga/xpath/lexer.rl"
1750
+ # line 369 "lib/oga/xpath/lexer.rl"
1749
1751
  begin
1750
1752
  te = p
1751
1753
  p = p - 1; end
1752
1754
  when 42 then
1753
- # line 300 "lib/oga/xpath/lexer.rl"
1755
+ # line 302 "lib/oga/xpath/lexer.rl"
1754
1756
  begin
1755
1757
  add_token(:T_GT) end
1756
- # line 367 "lib/oga/xpath/lexer.rl"
1758
+ # line 369 "lib/oga/xpath/lexer.rl"
1757
1759
  begin
1758
1760
  te = p
1759
1761
  p = p - 1; end
1760
1762
  when 40 then
1761
- # line 301 "lib/oga/xpath/lexer.rl"
1763
+ # line 303 "lib/oga/xpath/lexer.rl"
1762
1764
  begin
1763
1765
  add_token(:T_LTE) end
1764
- # line 367 "lib/oga/xpath/lexer.rl"
1766
+ # line 369 "lib/oga/xpath/lexer.rl"
1765
1767
  begin
1766
1768
  te = p
1767
1769
  p = p - 1; end
1768
1770
  when 43 then
1769
- # line 302 "lib/oga/xpath/lexer.rl"
1771
+ # line 304 "lib/oga/xpath/lexer.rl"
1770
1772
  begin
1771
1773
  add_token(:T_GTE) end
1772
- # line 367 "lib/oga/xpath/lexer.rl"
1774
+ # line 369 "lib/oga/xpath/lexer.rl"
1773
1775
  begin
1774
1776
  te = p
1775
1777
  p = p - 1; end
1776
1778
  when 27 then
1777
- # line 312 "lib/oga/xpath/lexer.rl"
1779
+ # line 314 "lib/oga/xpath/lexer.rl"
1778
1780
  begin
1779
1781
  add_token(:T_AND) end
1780
- # line 367 "lib/oga/xpath/lexer.rl"
1782
+ # line 369 "lib/oga/xpath/lexer.rl"
1781
1783
  begin
1782
1784
  te = p
1783
1785
  p = p - 1; end
1784
1786
  when 30 then
1785
- # line 313 "lib/oga/xpath/lexer.rl"
1787
+ # line 315 "lib/oga/xpath/lexer.rl"
1786
1788
  begin
1787
1789
  add_token(:T_OR) end
1788
- # line 367 "lib/oga/xpath/lexer.rl"
1790
+ # line 369 "lib/oga/xpath/lexer.rl"
1789
1791
  begin
1790
1792
  te = p
1791
1793
  p = p - 1; end
1792
1794
  when 28 then
1793
- # line 314 "lib/oga/xpath/lexer.rl"
1795
+ # line 316 "lib/oga/xpath/lexer.rl"
1794
1796
  begin
1795
1797
  add_token(:T_DIV) end
1796
- # line 367 "lib/oga/xpath/lexer.rl"
1798
+ # line 369 "lib/oga/xpath/lexer.rl"
1797
1799
  begin
1798
1800
  te = p
1799
1801
  p = p - 1; end
1800
1802
  when 29 then
1801
- # line 315 "lib/oga/xpath/lexer.rl"
1803
+ # line 317 "lib/oga/xpath/lexer.rl"
1802
1804
  begin
1803
1805
  add_token(:T_MOD) end
1804
- # line 367 "lib/oga/xpath/lexer.rl"
1806
+ # line 369 "lib/oga/xpath/lexer.rl"
1805
1807
  begin
1806
1808
  te = p
1807
1809
  p = p - 1; end
1808
1810
  when 25 then
1809
- # line 316 "lib/oga/xpath/lexer.rl"
1811
+ # line 318 "lib/oga/xpath/lexer.rl"
1810
1812
  begin
1811
1813
  add_token(:T_MUL) end
1812
- # line 367 "lib/oga/xpath/lexer.rl"
1814
+ # line 369 "lib/oga/xpath/lexer.rl"
1813
1815
  begin
1814
1816
  te = p
1815
1817
  p = p - 1; end
1816
1818
  when 26 then
1817
- # line 317 "lib/oga/xpath/lexer.rl"
1819
+ # line 319 "lib/oga/xpath/lexer.rl"
1818
1820
  begin
1819
1821
  add_token(:T_SUB) end
1820
- # line 367 "lib/oga/xpath/lexer.rl"
1822
+ # line 369 "lib/oga/xpath/lexer.rl"
1821
1823
  begin
1822
1824
  te = p
1823
1825
  p = p - 1; end
@@ -1826,7 +1828,7 @@ p = p - 1; end
1826
1828
  begin
1827
1829
  te = p+1
1828
1830
  end
1829
- # line 367 "lib/oga/xpath/lexer.rl"
1831
+ # line 369 "lib/oga/xpath/lexer.rl"
1830
1832
  begin
1831
1833
  act = 1; end
1832
1834
  when 5 then
@@ -1834,7 +1836,7 @@ act = 1; end
1834
1836
  begin
1835
1837
  te = p+1
1836
1838
  end
1837
- # line 213 "lib/oga/xpath/lexer.rl"
1839
+ # line 215 "lib/oga/xpath/lexer.rl"
1838
1840
  begin
1839
1841
  act = 6; end
1840
1842
  when 6 then
@@ -1842,7 +1844,7 @@ act = 6; end
1842
1844
  begin
1843
1845
  te = p+1
1844
1846
  end
1845
- # line 219 "lib/oga/xpath/lexer.rl"
1847
+ # line 221 "lib/oga/xpath/lexer.rl"
1846
1848
  begin
1847
1849
  act = 7; end
1848
1850
  when 35 then
@@ -1850,13 +1852,13 @@ act = 7; end
1850
1852
  begin
1851
1853
  te = p+1
1852
1854
  end
1853
- # line 296 "lib/oga/xpath/lexer.rl"
1855
+ # line 298 "lib/oga/xpath/lexer.rl"
1854
1856
  begin
1855
1857
  add_token(:T_ADD) end
1856
- # line 213 "lib/oga/xpath/lexer.rl"
1858
+ # line 215 "lib/oga/xpath/lexer.rl"
1857
1859
  begin
1858
1860
  act = 6; end
1859
- # line 1860 "lib/oga/xpath/lexer.rb"
1861
+ # line 1862 "lib/oga/xpath/lexer.rb"
1860
1862
  end
1861
1863
  end
1862
1864
  end
@@ -1870,7 +1872,7 @@ ts = nil; end
1870
1872
  begin
1871
1873
  act = 0
1872
1874
  end
1873
- # line 1874 "lib/oga/xpath/lexer.rb"
1875
+ # line 1876 "lib/oga/xpath/lexer.rb"
1874
1876
  end
1875
1877
 
1876
1878
  if cs == 0
@@ -1899,7 +1901,7 @@ act = 0
1899
1901
  end
1900
1902
  end
1901
1903
 
1902
- # line 130 "lib/oga/xpath/lexer.rl"
1904
+ # line 132 "lib/oga/xpath/lexer.rl"
1903
1905
 
1904
1906
  # % fix highlight
1905
1907
  ensure
@@ -1950,7 +1952,7 @@ end
1950
1952
  end
1951
1953
 
1952
1954
 
1953
- # line 379 "lib/oga/xpath/lexer.rl"
1955
+ # line 381 "lib/oga/xpath/lexer.rl"
1954
1956
 
1955
1957
  end # Lexer
1956
1958
  end # XPath