Expand description
Parser for Fiducia System Description (.fis) files.
Implements grammar rules for parsing .fis files, which define system-level
declarations: the data layer (struct types and constants, #69), memory
regions, protection domains, channels, and system composition. All of
these are top-level items of the same .fis grammar surface, so their
parsers live together in this one file (see crate::ast for the node
type definitions themselves).
§Example
let input = r#"
struct Packet { id: uint32; length: uint16; }
const RBD_COUNT: uint = 64;
MemoryRegion uart(0x1000, 0x1000, 0xFE00_0000);
ProtectionDomain driver(200, 33);
ProtectionDomain app(100);
Chan notify = driver <-> app;
System = driver ||| app;
"#;
let system = fic::parser::parse_system(input).unwrap();
assert_eq!(system.protection_domains.len(), 2);
assert_eq!(system.structs.len(), 1);
assert_eq!(system.consts.len(), 1);Functions§
- parse
- Parse a
.fissystem description with error recovery.