Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add grammar rule for non-empty URI for searches and add hint hack for…

… module builders.
  • Loading branch information...
commit aea4e91be2fad5b044c950966e164caad386c11a 1 parent e87877e
ronaldxs authored June 07, 2012
3  lib/IETF/RFC_Grammar.pm
@@ -10,6 +10,9 @@ my %rfc_grammar_build = (
10 10
 );
11 11
 my %rfc_grammar;
12 12
 
  13
+# Hack to give hint to ufo/Panda to build in the right order.
  14
+# remove some day when module builders are upgraded
  15
+use IETF::RFC_Grammar::URI;
13 16
 
14 17
 has $.rfc;
15 18
 has $.grammar;
16  lib/IETF/RFC_Grammar/URI.pm
@@ -7,10 +7,12 @@ use IETF::RFC_Grammar::IPv6;
7 7
 
8 8
 grammar IETF::RFC_Grammar::URI is IETF::RFC_Grammar::IPv6 {
9 9
     token TOP               { <URI_reference> };
  10
+    token TOP_non_empty     { <URI> | <relative_ref_non_empty> };
10 11
     token TOP_validating    { ^ <URI_reference> $ };
11 12
     token URI_reference     { <URI> | <relative_ref> };
12 13
 
13 14
     token absolute_URI      { <scheme> ':' <.hier_part> [ '?' query ]? };
  15
+
14 16
     token relative_ref      {
15 17
 # need workaround for RT #112148/RT #107254
16 18
 #        <relative_part> [ '?' <query> ]? [ '#' <fragment> ]?
@@ -18,7 +20,6 @@ grammar IETF::RFC_Grammar::URI is IETF::RFC_Grammar::IPv6 {
18 20
             '?' <query> [ '#' <fragment> ]? | [ '#' <fragment> ]?
19 21
         ]
20 22
     };
21  
-
22 23
     token relative_part     {
23 24
         '//' <authority> <path_abempty>     |
24 25
         <path_absolute>                     |
@@ -26,6 +27,19 @@ grammar IETF::RFC_Grammar::URI is IETF::RFC_Grammar::IPv6 {
26 27
         <path_empty>
27 28
     };
28 29
 
  30
+    token relative_ref_non_empty      {
  31
+# need workaround for RT #112148/RT #107254
  32
+#        <relative_part_non_empty> [ '?' <query> ]? [ '#' <fragment> ]?
  33
+        <relative_part_non_empty> [ 
  34
+            '?' <query> [ '#' <fragment> ]? | [ '#' <fragment> ]?
  35
+        ]
  36
+    };
  37
+    token relative_part_non_empty     {
  38
+        '//' <authority> <path_abempty>     |
  39
+        <path_absolute>                     |
  40
+        <path_noscheme>                     
  41
+    };
  42
+
29 43
     token URI               {
30 44
 # need workaround for RT #112148/RT #107254
31 45
 #        <scheme> ':' <hier_part> ['?' <query> ]?  [ '#' <fragment> ]?

0 notes on commit aea4e91

Please sign in to comment.
Something went wrong with that request. Please try again.