tools/net/sunrpc/xdrgen/grammars/xdr.lark
Source file repositories/reference/linux-study-clean/tools/net/sunrpc/xdrgen/grammars/xdr.lark
File Facts
- System
- Linux kernel
- Corpus path
tools/net/sunrpc/xdrgen/grammars/xdr.lark- Extension
.lark- Size
- 4497 bytes
- Lines
- 128
- Domain
- Support Tooling And Documentation
- Bucket
- tools
- Inferred role
- Support Tooling And Documentation: tools
- Status
- atlas-only
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
// A Lark grammar for the XDR specification language based on
// https://tools.ietf.org/html/rfc4506 Section 6.3
declaration : "opaque" identifier "[" value "]" -> fixed_length_opaque
| "opaque" identifier "<" [ value ] ">" -> variable_length_opaque
| "string" identifier "<" [ value ] ">" -> string
| type_specifier identifier "[" value "]" -> fixed_length_array
| type_specifier identifier "<" [ value ] ">" -> variable_length_array
| type_specifier "*" identifier -> optional_data
| type_specifier identifier -> basic
| "void" -> void
value : decimal_constant
| hexadecimal_constant
| octal_constant
| identifier
constant : decimal_constant | hexadecimal_constant | octal_constant
type_specifier : unsigned_hyper
| unsigned_long
| unsigned_int
| unsigned_short
| hyper
| long
| int
| short
| float
| double
| quadruple
| bool
| enum_type_spec
| struct_type_spec
| union_type_spec
| identifier
unsigned_hyper : "unsigned" "hyper"
unsigned_long : "unsigned" "long"
unsigned_int : "unsigned" "int"
unsigned_short : "unsigned" "short"
hyper : "hyper"
long : "long"
int : "int"
short : "short"
float : "float"
double : "double"
quadruple : "quadruple"
bool : "bool"
enum_type_spec : "enum" enum_body
enum_body : "{" ( identifier "=" value ) ( "," identifier "=" value )* "}"
struct_type_spec : "struct" struct_body
struct_body : "{" ( declaration ";" )+ "}"
union_type_spec : "union" union_body
union_body : switch_spec "{" case_spec+ [ default_spec ] "}"
switch_spec : "switch" "(" declaration ")"
case_spec : ( "case" value ":" )+ declaration ";"
default_spec : "default" ":" declaration ";"
constant_def : "const" identifier "=" value ";"
type_def : "typedef" declaration ";" -> typedef
Annotation
- Atlas domain: Support Tooling And Documentation / tools.
- Implementation status: atlas-only.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.