updated grammar with new signatures for Start/End
authorLuc Moreau <l.moreau@ecs.soton.ac.uk>
Thu, 10 May 2012 23:27:07 +0100
changeset 2760 26dd85ce95c7
parent 2759 cb3efd5adb23
child 2761 046f57371894
updated grammar with new signatures for Start/End
model/grammar/Makefile
model/grammar/yack/prov-n-LL.bnf
model/grammar/yack/prov-n.bnf
model/grammar/yack/prov_n.html
--- a/model/grammar/Makefile	Thu May 10 21:37:16 2012 +0100
+++ b/model/grammar/Makefile	Thu May 10 23:27:07 2012 +0100
@@ -1,8 +1,12 @@
 
-go.provn:
+lr.provn:
 	cd yack; PERL5LIB=perl/modules perl/modules/W3C/Grammar/bin/yacker -stubs -short -lang perl -o prov_n prov-n.bnf 
 	cd yack; $(MAKE)
 
+ll.provn:
+	cd yack; PERL5LIB=perl/modules perl/modules/W3C/Grammar/bin/yacker -stubs -short -lang perl -o prov_n_LL prov-n-LL.bnf 
+	cd yack; $(MAKE)
+
 man.provn:
 	cd yack; perldoc prov_n.pm
 
--- a/model/grammar/yack/prov-n-LL.bnf	Thu May 10 21:37:16 2012 +0100
+++ b/model/grammar/yack/prov-n-LL.bnf	Thu May 10 23:27:07 2012 +0100
@@ -5,7 +5,7 @@
 
 [4] namespaceDeclarations ::=  (defaultNamespaceDeclaration | namespaceDeclaration) namespaceDeclaration*
 
-[5] namespaceDeclaration ::= "prefix" QNAME namespace
+[5] namespaceDeclaration ::= "prefix" QUALNAME namespace
 
 [6] namespace ::= IRI_REF
 
@@ -15,7 +15,7 @@
         (   
 
            entityExpression | activityExpression | generationExpression  | usageExpression
-         | startExpression | endExpression | invalidationExpression | communicationExpression | startByActivityExpression
+         | startExpression | endExpression | invalidationExpression | communicationExpression 
         | agentExpression |  associationExpression | attributionExpression | responsibilityExpression
         | derivationExpression | tracedToExpression | hadOriginalSourceExpression | quotationExpression | revisionExpression
         | alternateExpression | specializationExpression
@@ -37,12 +37,12 @@
 
 usageExpression::=	"used" "(" optionalIdentifier  identifier "," identifier ("," timeOrMarker)? optionalAttributeValuePairs ")"
 
-startExpression::=	"wasStartedBy" "(" optionalIdentifier identifier ("," identifierOrMarker "," timeOrMarker)? optionalAttributeValuePairs ")"
+startExpression::=	"wasStartedBy" "(" optionalIdentifier identifier ("," identifierOrMarker "," identifierOrMarker "," timeOrMarker)? optionalAttributeValuePairs ")"
 
 
 
 
-endExpression::=	"wasEndedBy" "(" optionalIdentifier identifier ("," identifierOrMarker "," timeOrMarker)? optionalAttributeValuePairs ")"
+endExpression::=	"wasEndedBy" "(" optionalIdentifier identifier ("," identifierOrMarker "," identifierOrMarker "," timeOrMarker)? optionalAttributeValuePairs ")"
 
 
 invalidationExpression::=	"wasInvalidatedBy" "(" optionalIdentifier identifier ("," identifierOrMarker "," timeOrMarker)? optionalAttributeValuePairs ")"
@@ -52,9 +52,6 @@
 communicationExpression::=	"wasInformedBy" "(" optionalIdentifier identifier "," identifier optionalAttributeValuePairs ")"
 
 
-startByActivityExpression::=	"wasStartedByActivity" "(" optionalIdentifier identifier "," identifier optionalAttributeValuePairs ")"
-
-
 agentExpression::=	"agent" "(" identifier optionalAttributeValuePairs	")" 
 
 attributionExpression::=	"wasAttributedTo" "("  optionalIdentifier identifier "," identifier optionalAttributeValuePairs ")"
@@ -89,8 +86,8 @@
 
 optionalAttributeValuePairs::= ("," "[" attributeValuePairs "]")?
 
-identifier ::=QNAME
-attribute ::=QNAME
+identifier ::=QUALNAME
+attribute ::=QUALNAME
 attributeValuePairs::=      (  | attributeValuePair ( "," attributeValuePair )* )
 
 attributeValuePair::= attribute '='  literal
@@ -110,9 +107,10 @@
 
 
 
-[13] literal ::= StringLiteral | INTLITERAL | StringLiteral "%%" datatype
+[13] literal ::= StringLiteral | QUALNAME_LITERAL | INTLITERAL | StringLiteral "%%" datatype
 
-datatype::= IRI_REF | QNAME
+
+datatype::= IRI_REF | QUALNAME
 
  
 [66s] StringLiteral ::= STRING_LITERAL
@@ -121,7 +119,7 @@
 
 
 @terminals
-QNAME::= (PN_PREFIX ":")? PN_LOCAL | PN_PREFIX ":"
+QUALNAME::= (PN_PREFIX ":")? PN_LOCAL | PN_PREFIX ":"
 
 PREFX::=  PN_PREFIX
 DIGIT::=[0-9]
@@ -132,7 +130,6 @@
 
 
  
-[18] PREFIX ::= "@prefix" 
 
 [70s] IRI_REF ::= "<" ( [^<>\"{}|^`\\] - [#x00-#x20] | UCHAR )* ">" 
  
@@ -142,6 +139,7 @@
  
  
 [149s] STRING_LITERAL ::= '"' ( ( [^#x22#x5C#xA#xD]) | ECHAR | UCHAR )* '"' 
+[149s] QUALNAME_LITERAL ::= '\'' QUALNAME '\'' 
 
 
  
@@ -182,9 +180,9 @@
  | [#203F-#2040] 
 [99s] PN_PREFIX ::= PN_CHARS_BASE ( ( PN_CHARS | "." )* PN_CHARS )? 
  
-[100s] PN_LOCAL ::= ( PN_CHARS_U | [0-9] | PLX ) ( ( PN_CHARS | '.' | PLX )*  ( PN_CHARS | PLX ) ) ?
+[100s] PN_LOCAL ::= ( PN_CHARS_U | [0-9] | PN_CHARS_OTHERS ) ( ( PN_CHARS | '.' | PN_CHARS_OTHERS )*  ( PN_CHARS | PN_CHARS_OTHERS ) ) ?
 
-[160s] PLX ::= PERCENT | PN_LOCAL_ESC
+[160s] PN_CHARS_OTHERS ::= PERCENT | '/' | '@' | '~' | '&' | '+' | '?' | '#' | '$'
 
 [161s] PERCENT ::= '%' HEX HEX
 
--- a/model/grammar/yack/prov-n.bnf	Thu May 10 21:37:16 2012 +0100
+++ b/model/grammar/yack/prov-n.bnf	Thu May 10 23:27:07 2012 +0100
@@ -162,7 +162,6 @@
 
 
  
-[18] PREFIX ::= "@prefix" 
 
 [70s] IRI_REF ::= "<" ( [^<>\"{}|^`\\] - [#x00-#x20] | UCHAR )* ">" 
  
--- a/model/grammar/yack/prov_n.html	Thu May 10 21:37:16 2012 +0100
+++ b/model/grammar/yack/prov_n.html	Thu May 10 23:27:07 2012 +0100
@@ -658,16 +658,7 @@
 
 <tbody class="term">
 <tr valign="baseline">
-<td><a id="term-prov_n-PREFIX" name="term-prov_n-PREFIX"></a>[<span class="prodNo">67</span>]&nbsp;&nbsp;&nbsp;</td>
-<td>&lt;<code class="production term">PREFIX</code>&gt;</td>
-<td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
-<td><code class="content">"@prefix"</code></td>
-</tr>
-</tbody>
-
-<tbody class="term">
-<tr valign="baseline">
-<td><a id="term-prov_n-IRI_REF" name="term-prov_n-IRI_REF"></a>[<span class="prodNo">68</span>]&nbsp;&nbsp;&nbsp;</td>
+<td><a id="term-prov_n-IRI_REF" name="term-prov_n-IRI_REF"></a>[<span class="prodNo">67</span>]&nbsp;&nbsp;&nbsp;</td>
 <td>&lt;<code class="production term">IRI_REF</code>&gt;</td>
 <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
 <td><code class="content">"&lt;" (( [^&lt;&gt;\"{}|^`\\] - [#0000- ] | <span class="prod"><a class="grammarRef" href="#prod-prov_n-UCHAR">UCHAR</a></span> ))* "&gt;"</code></td>
@@ -676,7 +667,7 @@
 
 <tbody class="term">
 <tr valign="baseline">
-<td><a id="term-prov_n-STRING_LITERAL" name="term-prov_n-STRING_LITERAL"></a>[<span class="prodNo">69</span>]&nbsp;&nbsp;&nbsp;</td>
+<td><a id="term-prov_n-STRING_LITERAL" name="term-prov_n-STRING_LITERAL"></a>[<span class="prodNo">68</span>]&nbsp;&nbsp;&nbsp;</td>
 <td>&lt;<code class="production term">STRING_LITERAL</code>&gt;</td>
 <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
 <td><code class="content">'"' (( ( [^\"\\\n\r] ) | <span class="prod"><a class="grammarRef" href="#prod-prov_n-ECHAR">ECHAR</a></span> | <span class="prod"><a class="grammarRef" href="#prod-prov_n-UCHAR">UCHAR</a></span> ))* '"'</code></td>
@@ -685,7 +676,7 @@
 
 <tbody class="term">
 <tr valign="baseline">
-<td><a id="term-prov_n-QUALNAME_LITERAL" name="term-prov_n-QUALNAME_LITERAL"></a>[<span class="prodNo">70</span>]&nbsp;&nbsp;&nbsp;</td>
+<td><a id="term-prov_n-QUALNAME_LITERAL" name="term-prov_n-QUALNAME_LITERAL"></a>[<span class="prodNo">69</span>]&nbsp;&nbsp;&nbsp;</td>
 <td>&lt;<code class="production term">QUALNAME_LITERAL</code>&gt;</td>
 <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
 <td><code class="content">"'" <span class="prod"><a class="grammarRef" href="#prod-prov_n-QUALNAME">QUALNAME</a></span> "'"</code></td>
@@ -694,7 +685,7 @@
 
 <tbody class="term">
 <tr valign="baseline">
-<td><a id="term-prov_n-UCHAR" name="term-prov_n-UCHAR"></a>[<span class="prodNo">71</span>]&nbsp;&nbsp;&nbsp;</td>
+<td><a id="term-prov_n-UCHAR" name="term-prov_n-UCHAR"></a>[<span class="prodNo">70</span>]&nbsp;&nbsp;&nbsp;</td>
 <td>&lt;<code class="production term">UCHAR</code>&gt;</td>
 <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
 <td><code class="content">( "\\u" <span class="prod"><a class="grammarRef" href="#prod-prov_n-HEX">HEX</a></span> <span class="prod"><a class="grammarRef" href="#prod-prov_n-HEX">HEX</a></span> <span class="prod"><a class="grammarRef" href="#prod-prov_n-HEX">HEX</a></span> <span class="prod"><a class="grammarRef" href="#prod-prov_n-HEX">HEX</a></span> )<br/>
@@ -704,7 +695,7 @@
 
 <tbody class="term">
 <tr valign="baseline">
-<td><a id="term-prov_n-ECHAR" name="term-prov_n-ECHAR"></a>[<span class="prodNo">72</span>]&nbsp;&nbsp;&nbsp;</td>
+<td><a id="term-prov_n-ECHAR" name="term-prov_n-ECHAR"></a>[<span class="prodNo">71</span>]&nbsp;&nbsp;&nbsp;</td>
 <td>&lt;<code class="production term">ECHAR</code>&gt;</td>
 <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
 <td><code class="content">"\\" [tbnrf\\\"']</code></td>
@@ -713,7 +704,7 @@
 
 <tbody class="term">
 <tr valign="baseline">
-<td><a id="term-prov_n-NIL" name="term-prov_n-NIL"></a>[<span class="prodNo">73</span>]&nbsp;&nbsp;&nbsp;</td>
+<td><a id="term-prov_n-NIL" name="term-prov_n-NIL"></a>[<span class="prodNo">72</span>]&nbsp;&nbsp;&nbsp;</td>
 <td>&lt;<code class="production term">NIL</code>&gt;</td>
 <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
 <td><code class="content">"(" (( <span class="prod"><a class="grammarRef" href="#prod-prov_n-WS">WS</a></span> ))* ")"</code></td>
@@ -722,7 +713,7 @@
 
 <tbody class="term">
 <tr valign="baseline">
-<td><a id="term-prov_n-WS" name="term-prov_n-WS"></a>[<span class="prodNo">74</span>]&nbsp;&nbsp;&nbsp;</td>
+<td><a id="term-prov_n-WS" name="term-prov_n-WS"></a>[<span class="prodNo">73</span>]&nbsp;&nbsp;&nbsp;</td>
 <td>&lt;<code class="production term">WS</code>&gt;</td>
 <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
 <td><code class="content">" "<br/>
@@ -734,7 +725,7 @@
 
 <tbody class="term">
 <tr valign="baseline">
-<td><a id="term-prov_n-ANON" name="term-prov_n-ANON"></a>[<span class="prodNo">75</span>]&nbsp;&nbsp;&nbsp;</td>
+<td><a id="term-prov_n-ANON" name="term-prov_n-ANON"></a>[<span class="prodNo">74</span>]&nbsp;&nbsp;&nbsp;</td>
 <td>&lt;<code class="production term">ANON</code>&gt;</td>
 <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
 <td><code class="content">"[" (( <span class="prod"><a class="grammarRef" href="#prod-prov_n-WS">WS</a></span> ))* "]"</code></td>
@@ -743,7 +734,7 @@
 
 <tbody class="term">
 <tr valign="baseline">
-<td><a id="term-prov_n-PN_CHARS_BASE" name="term-prov_n-PN_CHARS_BASE"></a>[<span class="prodNo">76</span>]&nbsp;&nbsp;&nbsp;</td>
+<td><a id="term-prov_n-PN_CHARS_BASE" name="term-prov_n-PN_CHARS_BASE"></a>[<span class="prodNo">75</span>]&nbsp;&nbsp;&nbsp;</td>
 <td>&lt;<code class="production term">PN_CHARS_BASE</code>&gt;</td>
 <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
 <td><code class="content">[A-Z]<br/>
@@ -765,7 +756,7 @@
 
 <tbody class="term">
 <tr valign="baseline">
-<td><a id="term-prov_n-PN_CHARS_U" name="term-prov_n-PN_CHARS_U"></a>[<span class="prodNo">77</span>]&nbsp;&nbsp;&nbsp;</td>
+<td><a id="term-prov_n-PN_CHARS_U" name="term-prov_n-PN_CHARS_U"></a>[<span class="prodNo">76</span>]&nbsp;&nbsp;&nbsp;</td>
 <td>&lt;<code class="production term">PN_CHARS_U</code>&gt;</td>
 <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
 <td><code class="content"><span class="prod"><a class="grammarRef" href="#prod-prov_n-PN_CHARS_BASE">PN_CHARS_BASE</a></span><br/>
@@ -775,7 +766,7 @@
 
 <tbody class="term">
 <tr valign="baseline">
-<td><a id="term-prov_n-PN_CHARS" name="term-prov_n-PN_CHARS"></a>[<span class="prodNo">78</span>]&nbsp;&nbsp;&nbsp;</td>
+<td><a id="term-prov_n-PN_CHARS" name="term-prov_n-PN_CHARS"></a>[<span class="prodNo">77</span>]&nbsp;&nbsp;&nbsp;</td>
 <td>&lt;<code class="production term">PN_CHARS</code>&gt;</td>
 <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
 <td><code class="content"><span class="prod"><a class="grammarRef" href="#prod-prov_n-PN_CHARS_U">PN_CHARS_U</a></span><br/>
@@ -789,7 +780,7 @@
 
 <tbody class="term">
 <tr valign="baseline">
-<td><a id="term-prov_n-PN_PREFIX" name="term-prov_n-PN_PREFIX"></a>[<span class="prodNo">79</span>]&nbsp;&nbsp;&nbsp;</td>
+<td><a id="term-prov_n-PN_PREFIX" name="term-prov_n-PN_PREFIX"></a>[<span class="prodNo">78</span>]&nbsp;&nbsp;&nbsp;</td>
 <td>&lt;<code class="production term">PN_PREFIX</code>&gt;</td>
 <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
 <td><code class="content"><span class="prod"><a class="grammarRef" href="#prod-prov_n-PN_CHARS_BASE">PN_CHARS_BASE</a></span> (( (( <span class="prod"><a class="grammarRef" href="#prod-prov_n-PN_CHARS">PN_CHARS</a></span> | "." ))* <span class="prod"><a class="grammarRef" href="#prod-prov_n-PN_CHARS">PN_CHARS</a></span> ))?</code></td>
@@ -798,7 +789,7 @@
 
 <tbody class="term">
 <tr valign="baseline">
-<td><a id="term-prov_n-PN_LOCAL" name="term-prov_n-PN_LOCAL"></a>[<span class="prodNo">80</span>]&nbsp;&nbsp;&nbsp;</td>
+<td><a id="term-prov_n-PN_LOCAL" name="term-prov_n-PN_LOCAL"></a>[<span class="prodNo">79</span>]&nbsp;&nbsp;&nbsp;</td>
 <td>&lt;<code class="production term">PN_LOCAL</code>&gt;</td>
 <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
 <td><code class="content">( <span class="prod"><a class="grammarRef" href="#prod-prov_n-PN_CHARS_U">PN_CHARS_U</a></span> | [0-9] | <span class="prod"><a class="grammarRef" href="#prod-prov_n-PN_CHARS_OTHERS">PN_CHARS_OTHERS</a></span> ) (( (( <span class="prod"><a class="grammarRef" href="#prod-prov_n-PN_CHARS">PN_CHARS</a></span> | "." | <span class="prod"><a class="grammarRef" href="#prod-prov_n-PN_CHARS_OTHERS">PN_CHARS_OTHERS</a></span> ))* ( <span class="prod"><a class="grammarRef" href="#prod-prov_n-PN_CHARS">PN_CHARS</a></span> | <span class="prod"><a class="grammarRef" href="#prod-prov_n-PN_CHARS_OTHERS">PN_CHARS_OTHERS</a></span> ) ))?</code></td>
@@ -807,7 +798,7 @@
 
 <tbody class="term">
 <tr valign="baseline">
-<td><a id="term-prov_n-PN_CHARS_OTHERS" name="term-prov_n-PN_CHARS_OTHERS"></a>[<span class="prodNo">81</span>]&nbsp;&nbsp;&nbsp;</td>
+<td><a id="term-prov_n-PN_CHARS_OTHERS" name="term-prov_n-PN_CHARS_OTHERS"></a>[<span class="prodNo">80</span>]&nbsp;&nbsp;&nbsp;</td>
 <td>&lt;<code class="production term">PN_CHARS_OTHERS</code>&gt;</td>
 <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
 <td><code class="content"><span class="prod"><a class="grammarRef" href="#prod-prov_n-PERCENT">PERCENT</a></span><br/>
@@ -824,7 +815,7 @@
 
 <tbody class="term">
 <tr valign="baseline">
-<td><a id="term-prov_n-PERCENT" name="term-prov_n-PERCENT"></a>[<span class="prodNo">82</span>]&nbsp;&nbsp;&nbsp;</td>
+<td><a id="term-prov_n-PERCENT" name="term-prov_n-PERCENT"></a>[<span class="prodNo">81</span>]&nbsp;&nbsp;&nbsp;</td>
 <td>&lt;<code class="production term">PERCENT</code>&gt;</td>
 <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
 <td><code class="content">"%" <span class="prod"><a class="grammarRef" href="#prod-prov_n-HEX">HEX</a></span> <span class="prod"><a class="grammarRef" href="#prod-prov_n-HEX">HEX</a></span></code></td>
@@ -833,7 +824,7 @@
 
 <tbody class="term">
 <tr valign="baseline">
-<td><a id="term-prov_n-HEX" name="term-prov_n-HEX"></a>[<span class="prodNo">83</span>]&nbsp;&nbsp;&nbsp;</td>
+<td><a id="term-prov_n-HEX" name="term-prov_n-HEX"></a>[<span class="prodNo">82</span>]&nbsp;&nbsp;&nbsp;</td>
 <td>&lt;<code class="production term">HEX</code>&gt;</td>
 <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
 <td><code class="content">[0-9]<br/>
@@ -844,7 +835,7 @@
 
 <tbody class="term">
 <tr valign="baseline">
-<td><a id="term-prov_n-PN_LOCAL_ESC" name="term-prov_n-PN_LOCAL_ESC"></a>[<span class="prodNo">84</span>]&nbsp;&nbsp;&nbsp;</td>
+<td><a id="term-prov_n-PN_LOCAL_ESC" name="term-prov_n-PN_LOCAL_ESC"></a>[<span class="prodNo">83</span>]&nbsp;&nbsp;&nbsp;</td>
 <td>&lt;<code class="production term">PN_LOCAL_ESC</code>&gt;</td>
 <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
 <td><code class="content">"\\" ( "_" | "~" | "." | "-" | "!" | "$" | "&amp;" | "'" | "(" | ")" | "*" | "+" | "," | ";" | "=" | ":" | "/" | "?" | "#" | "@" | "%" )</code></td>
@@ -853,7 +844,7 @@
 
 <tbody class="term">
 <tr valign="baseline">
-<td><a id="term-prov_n-PASSED_TOKENS" name="term-prov_n-PASSED_TOKENS"></a>[<span class="prodNo">85</span>]&nbsp;&nbsp;&nbsp;</td>
+<td><a id="term-prov_n-PASSED_TOKENS" name="term-prov_n-PASSED_TOKENS"></a>[<span class="prodNo">84</span>]&nbsp;&nbsp;&nbsp;</td>
 <td><code class="production directive">PASSED TOKENS</code></td>
 <td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td>
 <td><code class="content">([ \t\r\n])+<br/>