~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/tools/net/sunrpc/xdrgen/grammars/xdr.lark

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /tools/net/sunrpc/xdrgen/grammars/xdr.lark (Architecture i386) and /tools/net/sunrpc/xdrgen/grammars/xdr.lark (Architecture ppc)


  1 // A Lark grammar for the XDR specification la      1 // A Lark grammar for the XDR specification language based on
  2 // https://tools.ietf.org/html/rfc4506 Section      2 // https://tools.ietf.org/html/rfc4506 Section 6.3
  3                                                     3 
  4 declaration             : "opaque" identifier       4 declaration             : "opaque" identifier "[" value "]"            -> fixed_length_opaque
  5                         | "opaque" identifier       5                         | "opaque" identifier "<" [ value ] ">"        -> variable_length_opaque
  6                         | "string" identifier       6                         | "string" identifier "<" [ value ] ">"        -> variable_length_string
  7                         | type_specifier ident      7                         | type_specifier identifier "[" value "]"      -> fixed_length_array
  8                         | type_specifier ident      8                         | type_specifier identifier "<" [ value ] ">"  -> variable_length_array
  9                         | type_specifier "*" i      9                         | type_specifier "*" identifier                -> optional_data
 10                         | type_specifier ident     10                         | type_specifier identifier                    -> basic
 11                         | "void"                   11                         | "void"                                       -> void
 12                                                    12 
 13 value                   : decimal_constant         13 value                   : decimal_constant
 14                         | hexadecimal_constant     14                         | hexadecimal_constant
 15                         | octal_constant           15                         | octal_constant
 16                         | identifier               16                         | identifier
 17                                                    17 
 18 constant                : decimal_constant | h     18 constant                : decimal_constant | hexadecimal_constant | octal_constant
 19                                                    19 
 20 type_specifier          : unsigned_hyper           20 type_specifier          : unsigned_hyper
 21                         | unsigned_long            21                         | unsigned_long
 22                         | unsigned_int             22                         | unsigned_int
 23                         | hyper                    23                         | hyper
 24                         | long                     24                         | long
 25                         | int                      25                         | int
 26                         | float                    26                         | float
 27                         | double                   27                         | double
 28                         | quadruple                28                         | quadruple
 29                         | bool                     29                         | bool
 30                         | enum_type_spec           30                         | enum_type_spec
 31                         | struct_type_spec         31                         | struct_type_spec
 32                         | union_type_spec          32                         | union_type_spec
 33                         | identifier               33                         | identifier
 34                                                    34 
 35 unsigned_hyper          : "unsigned" "hyper"       35 unsigned_hyper          : "unsigned" "hyper"
 36 unsigned_long           : "unsigned" "long"        36 unsigned_long           : "unsigned" "long"
 37 unsigned_int            : "unsigned" "int"         37 unsigned_int            : "unsigned" "int"
 38 hyper                   : "hyper"                  38 hyper                   : "hyper"
 39 long                    : "long"                   39 long                    : "long"
 40 int                     : "int"                    40 int                     : "int"
 41 float                   : "float"                  41 float                   : "float"
 42 double                  : "double"                 42 double                  : "double"
 43 quadruple               : "quadruple"              43 quadruple               : "quadruple"
 44 bool                    : "bool"                   44 bool                    : "bool"
 45                                                    45 
 46 enum_type_spec          : "enum" enum_body         46 enum_type_spec          : "enum" enum_body
 47                                                    47 
 48 enum_body               : "{" ( identifier "="     48 enum_body               : "{" ( identifier "=" value ) ( "," identifier "=" value )* "}"
 49                                                    49 
 50 struct_type_spec        : "struct" struct_body     50 struct_type_spec        : "struct" struct_body
 51                                                    51 
 52 struct_body             : "{" ( declaration ";     52 struct_body             : "{" ( declaration ";" )+ "}"
 53                                                    53 
 54 union_type_spec         : "union" union_body       54 union_type_spec         : "union" union_body
 55                                                    55 
 56 union_body              : switch_spec "{" case     56 union_body              : switch_spec "{" case_spec+ [ default_spec ] "}"
 57                                                    57 
 58 switch_spec             : "switch" "(" declara     58 switch_spec             : "switch" "(" declaration ")"
 59                                                    59 
 60 case_spec               : ( "case" value ":" )     60 case_spec               : ( "case" value ":" )+ declaration ";"
 61                                                    61 
 62 default_spec            : "default" ":" declar     62 default_spec            : "default" ":" declaration ";"
 63                                                    63 
 64 constant_def            : "const" identifier "     64 constant_def            : "const" identifier "=" value ";"
 65                                                    65 
 66 type_def                : "typedef" declaratio     66 type_def                : "typedef" declaration ";"                -> typedef
 67                         | "enum" identifier en     67                         | "enum" identifier enum_body ";"          -> enum
 68                         | "struct" identifier      68                         | "struct" identifier struct_body ";"      -> struct
 69                         | "union" identifier u     69                         | "union" identifier union_body ";"        -> union
 70                                                    70 
 71 specification           : definition*              71 specification           : definition*
 72                                                    72 
 73 definition              : constant_def             73 definition              : constant_def
 74                         | type_def                 74                         | type_def
 75                         | program_def              75                         | program_def
 76                         | pragma_def               76                         | pragma_def
 77                                                    77 
 78 //                                                 78 //
 79 // RPC program definitions not specified in RF     79 // RPC program definitions not specified in RFC 4506
 80 //                                                 80 //
 81                                                    81 
 82 program_def             : "program" identifier     82 program_def             : "program" identifier "{" version_def+ "}" "=" constant ";"
 83                                                    83 
 84 version_def             : "version" identifier     84 version_def             : "version" identifier "{" procedure_def+ "}" "=" constant ";"
 85                                                    85 
 86 procedure_def           : type_specifier ident     86 procedure_def           : type_specifier identifier "(" type_specifier ")" "=" constant ";"
 87                                                    87 
 88 pragma_def              : "pragma" directive i     88 pragma_def              : "pragma" directive identifier [ identifier ] ";"
 89                                                    89 
 90 directive               : exclude_directive        90 directive               : exclude_directive
 91                         | header_directive         91                         | header_directive
 92                         | pages_directive          92                         | pages_directive
 93                         | public_directive         93                         | public_directive
 94                         | skip_directive           94                         | skip_directive
 95                                                    95 
 96 exclude_directive       : "exclude"                96 exclude_directive       : "exclude"
 97 header_directive        : "header"                 97 header_directive        : "header"
 98 pages_directive         : "pages"                  98 pages_directive         : "pages"
 99 public_directive        : "public"                 99 public_directive        : "public"
100 skip_directive          : "skip"                  100 skip_directive          : "skip"
101                                                   101 
102 //                                                102 //
103 // XDR language primitives                        103 // XDR language primitives
104 //                                                104 //
105                                                   105 
106 identifier              : /([a-z]|[A-Z])(_|[a-    106 identifier              : /([a-z]|[A-Z])(_|[a-z]|[A-Z]|[0-9])*/
107                                                   107 
108 decimal_constant        : /[\+-]?(0|[1-9][0-9]    108 decimal_constant        : /[\+-]?(0|[1-9][0-9]*)/
109 hexadecimal_constant    : /0x([a-f]|[A-F]|[0-9    109 hexadecimal_constant    : /0x([a-f]|[A-F]|[0-9])+/
110 octal_constant          : /0[0-7]+/               110 octal_constant          : /0[0-7]+/
111                                                   111 
112 PASSTHRU                : "%" | "%" /.+/          112 PASSTHRU                : "%" | "%" /.+/
113 %ignore PASSTHRU                                  113 %ignore PASSTHRU
114                                                   114 
115 %import common.C_COMMENT                          115 %import common.C_COMMENT
116 %ignore C_COMMENT                                 116 %ignore C_COMMENT
117                                                   117 
118 %import common.WS                                 118 %import common.WS
119 %ignore WS                                        119 %ignore WS
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php