Changes between Version 44 and Version 45 of Taskforces/FCS/FCS-Specification-Draft


Ignore:
Timestamp:
12/13/16 10:55:10 (7 years ago)
Author:
Oliver Schonefeld
Comment:

update ebnf

Legend:

Unmodified
Added
Removed
Modified
  • Taskforces/FCS/FCS-Specification-Draft

    v44 v45  
    984984}}}
    985985{{{
    986  [1] query                ::= main-query within-part?
    987 
    988  [2.11] main-query        ::= simple-query
    989                             | simple-query "|" main-query     /* or */
    990                             | simple-query main-query         /* sequence */
    991                             | simple-query quantifier         /* quatification */
     986 [1] query                 ::= main-query within-part?
     987
     988 [2] main-query            ::= simple-query
     989                             | simple-query "|" main-query     /* or */
     990                             | simple-query main-query         /* sequence */
     991                             | simple-query quantifier         /* quatification */
    992992       
    993  [3.11] simple-query      ::= '(' main_query ')'              /* grouping */
    994                             | implicit-query
    995                             | segment-query     
     993 [3] simple-query          ::= '(' main_query ')'              /* grouping */
     994                             | implicit-query
     995                             | segment-query   
    996996 
    997  [4] implicit-query       ::= flagged-regexp     
     997 [4] implicit-query        ::= flagged-regexp   
    998998 
    999  [5] segment-query        ::= "[" expression? "]"       
    1000 
    1001  [6] within-part          ::= simple-within-part
    1002 
    1003  [7] simple-within-part   ::= "within" simple-within-scope
    1004 
    1005  [8] simple-within-scope  ::= "sentence"
    1006                             | "s"
    1007                             | "utterance"
    1008                             | "u"
    1009                             | "paragraph"
    1010                             | "p"
    1011                             | "turn"
    1012                             | "t"
    1013                             | "text"
    1014                             | "session"         
    1015 
    1016 [11.11] expression        ::= basic-expression
    1017                             | expression "|" expression     /* or */
    1018                             | expression "&" expression     /* and */
     999 [5] segment-query         ::= "[" expression? "]"       
     1000
     1001 [6] within-part           ::= simple-within-part
     1002
     1003 [7] simple-within-part    ::= "within" simple-within-scope
     1004
     1005 [8] simple-within-scope   ::= "sentence"
     1006                             | "s"
     1007                             | "utterance"
     1008                             | "u"
     1009                             | "paragraph"
     1010                             | "p"
     1011                             | "turn"
     1012                             | "t"
     1013                             | "text"
     1014                             | "session"         
     1015
     1016[11] expression            ::= basic-expression
     1017                             | expression "|" expression     /* or */
     1018                             | expression "&" expression     /* and */
    10191019                               
    1020 [12.11] basic-expression  ::= '(' expression ')'         /* grouping */
    1021                             | "!" expression                /* not */
    1022                             | attribute operator flagged-regexp
    1023 
    1024 [13] operator             ::= "="                           /* equals */
    1025                             | "!="                          /* non-equals */
    1026 
    1027 [14] quantifier           ::= "+"                           /* one-or-more */
    1028                             | "*"                           /* zero-or-more */
    1029                             | "?"                           /* zero-or-one */
    1030                             | "{" integer "}"               /* exactly n-times */
    1031                             | "{" integer? "," integer "}"  /* at most */
    1032                             | "{" integer "," integer? "}"  /* min-max */       
    1033 
    1034 [15] flagged-regexp       ::= regexp
    1035                             | regexp "/" regexp-flag+   
    1036 
    1037 [16] regexp-flag          ::= "i"  /* case-insensitive; Poliqarp/Perl compat */
    1038                             | "I"  /* case-sensitive; Poliqarp compat */
    1039                             | "c"  /* case-insensitive, CQP compat */
    1040                             | "C"  /* case-sensitive */
    1041                             | "l"  /* literal matching, CQP compat*/
    1042                             | "d"  /* diacritic agnostic matching, CQP compat */
     1020[12] basic-expression      ::= '(' expression ')'         /* grouping */
     1021                             | "!" expression                /* not */
     1022                             | attribute operator flagged-regexp
     1023
     1024[13] operator              ::= "="                           /* equals */
     1025                             | "!="                          /* non-equals */
     1026
     1027[14] quantifier            ::= "+"                           /* one-or-more */
     1028                             | "*"                           /* zero-or-more */
     1029                             | "?"                           /* zero-or-one */
     1030                             | "{" integer "}"               /* exactly n-times */
     1031                             | "{" integer? "," integer "}"  /* at most */
     1032                             | "{" integer "," integer? "}"  /* min-max */       
     1033
     1034[15] flagged-regexp        ::= regexp
     1035                             | regexp "/" regexp-flag+   
     1036
     1037[16] regexp-flag           ::= "i"  /* case-insensitive; Poliqarp/Perl compat */
     1038                             | "I"  /* case-sensitive; Poliqarp compat */
     1039                             | "c"  /* case-insensitive, CQP compat */
     1040                             | "C"  /* case-sensitive */
     1041                             | "l"  /* literal matching, CQP compat*/
     1042                             | "d"  /* diacritic agnostic matching, CQP compat */
    10431043       
    1044 [17] regexp               ::= quoted-string
    1045 
    1046 [18] attribute            ::= simple-attribute
    1047                             | qualified-attribute
    1048 
    1049 [19] simple-attribute     ::= identifier
    1050 
    1051 [20] qualified-attribute  ::= identifier ":" identifier 
    1052 
    1053 [21.11] identifier        ::= identifier-first-char identifier-char*
    1054 
    1055 [21.12] identifier-first-char      ::= [a-zA-Z]
    1056 
    1057 [22] identifier-char      ::= [a-zA-Z0-9\-]
    1058 
    1059 [24] integer              ::= [0-9]+
    1060 
    1061 [26] quoted-string        ::= "'" (char | ws)* "'"  /* single-quotes */
    1062                             | """ (char | ws)* """  /* double-quotes */
    1063 
    1064 [27] char                 ::= <any unicode codepoint excluding whitespace codepoints>
    1065                             | "\" escaped-char
    1066 
    1067 [28] ws                   ::= <any whitespace codepoint>
    1068 
    1069 [29] escaped-char         ::= "\"                                  /* backslash (\) */
    1070                             | "'"                                  /* single quote (') */
    1071                             | """                                  /* double quote (") */
    1072                             | "n"                                  /* generic newline, i.e "\n", "\r", etc */
    1073                             | "t"                                  /* character tabulation (U+0009) */
    1074                             | "x" hex hex                          /* Unicode codepoint with hex value hh */
    1075                             | "u" hex hex hex hex                  /* Unicode codepoint with hex value hhhh */
    1076                             | "U" hex hex hex hex hex hex hex hex  /* Unicode codepoint with hex value hhhhhhhh */
    1077 
    1078 [30] hex                  ::= [0-9a-fA-F]
     1044[17] regexp                ::= quoted-string
     1045
     1046[18] attribute             ::= simple-attribute
     1047                             | qualified-attribute
     1048
     1049[19] simple-attribute      ::= identifier
     1050
     1051[20] qualified-attribute   ::= identifier ":" identifier 
     1052
     1053[21] identifier            ::= identifier-first-char identifier-char*
     1054
     1055[22] identifier-first-char ::= [a-zA-Z]
     1056
     1057[23] identifier-char       ::= [a-zA-Z0-9\-]
     1058
     1059[24] integer               ::= [0-9]+
     1060
     1061[25] quoted-string         ::= "'" (char | ws)* "'"  /* single-quotes */
     1062                             | """ (char | ws)* """  /* double-quotes */
     1063
     1064[26] char                  ::= <any unicode codepoint excluding whitespace codepoints>
     1065                             | "\" escaped-char
     1066
     1067[27] ws                    ::= <any whitespace codepoint>
     1068
     1069[28] escaped-char          ::= "\"                                  /* backslash (\) */
     1070                             | "'"                                  /* single quote (') */
     1071                             | """                                  /* double quote (") */
     1072                             | "n"                                  /* generic newline, i.e "\n", "\r", etc */
     1073                             | "t"                                  /* character tabulation (U+0009) */
     1074                             | '.'                                  /* regex: dot (= any character) */
     1075                             | '^'                                  /* regex: caret (= beginning of string) */
     1076                             | '$'                                  /* regex: dollar (= end of string) */
     1077                             | '*'                                  /* regex: asterisk (= zero or more) */
     1078                             | '+'                                  /* regex: plus (= one or more) */
     1079                             | '?'                                  /* regex: question mark (= zero or one) */
     1080                             | '('                                  /* regex: opening parenthesis */
     1081                             | ')'                                  /* regex: closing parenthesis */
     1082                             | '{'                                  /* regex: opening curly brace */
     1083                             | '['                                  /* regex: opening square bracket */
     1084                             | '|'                                  /* regex: vertical bar */
     1085                             | "x" hex hex                          /* Unicode codepoint with hex value hh */
     1086                             | "u" hex hex hex hex                  /* Unicode codepoint with hex value hhhh */
     1087                             | "U" hex hex hex hex hex hex hex hex  /* Unicode codepoint with hex value hhhhhhhh */
     1088
     1089[29] hex                   ::= [0-9a-fA-F]
    10791090}}}
    10801091=== Notes ===