Revision 56fbcea8

View differences:

src/flow/lib/grammar.rb
186 186
          r5 = instantiate_node(SyntaxNode,input, index...(index + match_len))
187 187
          @index += match_len
188 188
        else
189
          terminal_parse_failure('&&')
189
          terminal_parse_failure('\'&&\'')
190 190
          r5 = nil
191 191
        end
192 192
        if r5
......
197 197
            r6 = true
198 198
            @index += match_len
199 199
          else
200
            terminal_parse_failure('&')
200
            terminal_parse_failure('\'&\'')
201 201
            r6 = nil
202 202
          end
203 203
          if r6
......
243 243
            r13 = instantiate_node(SyntaxNode,input, index...(index + match_len))
244 244
            @index += match_len
245 245
          else
246
            terminal_parse_failure('||')
246
            terminal_parse_failure('\'||\'')
247 247
            r13 = nil
248 248
          end
249 249
          if r13
......
254 254
              r14 = true
255 255
              @index += match_len
256 256
            else
257
              terminal_parse_failure('|')
257
              terminal_parse_failure('\'|\'')
258 258
              r14 = nil
259 259
            end
260 260
            if r14
......
434 434
        r8 = true
435 435
        @index += match_len
436 436
      else
437
        terminal_parse_failure('!')
437
        terminal_parse_failure('\'!\'')
438 438
        r8 = nil
439 439
      end
440 440
      s7 << r8
......
463 463
          r12 = true
464 464
          @index += match_len
465 465
        else
466
          terminal_parse_failure('(')
466
          terminal_parse_failure('\'(\'')
467 467
          r12 = nil
468 468
        end
469 469
        s11 << r12
......
481 481
                  r16 = true
482 482
                  @index += match_len
483 483
                else
484
                  terminal_parse_failure(')')
484
                  terminal_parse_failure('\')\'')
485 485
                  r16 = nil
486 486
                end
487 487
                s11 << r16
......
565 565
      r2 = instantiate_node(SyntaxNode,input, index...(index + match_len))
566 566
      @index += match_len
567 567
    else
568
      terminal_parse_failure('==')
568
      terminal_parse_failure('\'==\'')
569 569
      r2 = nil
570 570
    end
571 571
    if r2
......
577 577
        r3 = true
578 578
        @index += match_len
579 579
      else
580
        terminal_parse_failure('=')
580
        terminal_parse_failure('\'=\'')
581 581
        r3 = nil
582 582
      end
583 583
      if r3
......
598 598
        r5 = instantiate_node(SyntaxNode,input, index...(index + match_len))
599 599
        @index += match_len
600 600
      else
601
        terminal_parse_failure('!=')
601
        terminal_parse_failure('\'!=\'')
602 602
        r5 = nil
603 603
      end
604 604
      if r5
......
610 610
          r6 = instantiate_node(SyntaxNode,input, index...(index + match_len))
611 611
          @index += match_len
612 612
        else
613
          terminal_parse_failure('<>')
613
          terminal_parse_failure('\'<>\'')
614 614
          r6 = nil
615 615
        end
616 616
        if r6
......
631 631
          r7.extend(CompOp2)
632 632
          @index += match_len
633 633
        else
634
          terminal_parse_failure('>=')
634
          terminal_parse_failure('\'>=\'')
635 635
          r7 = nil
636 636
        end
637 637
        if r7
......
643 643
            r8.extend(CompOp3)
644 644
            @index += match_len
645 645
          else
646
            terminal_parse_failure('>')
646
            terminal_parse_failure('\'>\'')
647 647
            r8 = nil
648 648
          end
649 649
          if r8
......
655 655
              r9.extend(CompOp4)
656 656
              @index += match_len
657 657
            else
658
              terminal_parse_failure('<=')
658
              terminal_parse_failure('\'<=\'')
659 659
              r9 = nil
660 660
            end
661 661
            if r9
......
667 667
                r10.extend(CompOp5)
668 668
                @index += match_len
669 669
              else
670
                terminal_parse_failure('<')
670
                terminal_parse_failure('\'<\'')
671 671
                r10 = nil
672 672
              end
673 673
              if r10
......
773 773
      r3 = true
774 774
      @index += match_len
775 775
    else
776
      terminal_parse_failure('-')
776
      terminal_parse_failure('\'-\'')
777 777
      r3 = nil
778 778
    end
779 779
    if r3
......
810 810
          r6 = true
811 811
          @index += match_len
812 812
        else
813
          terminal_parse_failure('.')
813
          terminal_parse_failure('\'.\'')
814 814
          r6 = nil
815 815
        end
816 816
        s1 << r6
......
857 857
        r11 = true
858 858
        @index += match_len
859 859
      else
860
        terminal_parse_failure('-')
860
        terminal_parse_failure('\'-\'')
861 861
        r11 = nil
862 862
      end
863 863
      if r11
......
962 962
            val = nil
963 963
            st = "#{att}[--]"
964 964
        else
965
            val = (total / n_nodes).round(2)
965
            val = ((total / n_nodes)*100).round/100.0
966 966
            st = "#{att}[#{val.to_s}]"
967 967
        end
968 968

  
......
987 987
      r2 = true
988 988
      @index += match_len
989 989
    else
990
      terminal_parse_failure('"')
990
      terminal_parse_failure('\'"\'')
991 991
      r2 = nil
992 992
    end
993 993
    s1 << r2
......
1023 1023
            r6 = true
1024 1024
            @index += match_len
1025 1025
          else
1026
            terminal_parse_failure('"')
1026
            terminal_parse_failure('\'"\'')
1027 1027
            r6 = nil
1028 1028
          end
1029 1029
          s1 << r6
......
1047 1047
        r8 = true
1048 1048
        @index += match_len
1049 1049
      else
1050
        terminal_parse_failure('\'')
1050
        terminal_parse_failure('\'\\\'\'')
1051 1051
        r8 = nil
1052 1052
      end
1053 1053
      s7 << r8
......
1083 1083
              r12 = true
1084 1084
              @index += match_len
1085 1085
            else
1086
              terminal_parse_failure('\'')
1086
              terminal_parse_failure('\'\\\'\'')
1087 1087
              r12 = nil
1088 1088
            end
1089 1089
            s7 << r12
......
1170 1170
        r1 = true
1171 1171
        @index += match_len
1172 1172
      else
1173
        terminal_parse_failure(' ')
1173
        terminal_parse_failure('\' \'')
1174 1174
        r1 = nil
1175 1175
      end
1176 1176
      if r1
src/flow/lib/grammar.treetop
222 222
                    val = nil
223 223
                    st = "#{att}[--]"
224 224
                else
225
                    val = (total / n_nodes).round(2)
225
                    val = ((total / n_nodes)*100).round/100.0
226 226
                    st = "#{att}[#{val.to_s}]"
227 227
                end
228 228

  

Also available in: Unified diff