f4987093f6
- define and validate the capability and resource-lock languages - provision workspace source repositories through Central Gitea - build package runtimes from pinned standalone sources - replace legacy schema compilation with workspace persistence plans - add stable optimistic registers and Automerge CRDT documents - modernize TypeScript/Nix package builds and runtime activation readiness
56 lines
933 B
ANTLR
56 lines
933 B
ANTLR
grammar QuixosLock;
|
|
|
|
document
|
|
: QUIXOS_LOCK VERSION INTEGER LBRACE quixosEntry resourceEntry* RBRACE EOF
|
|
;
|
|
|
|
quixosEntry
|
|
: QUIXOS SOURCE sourceBlock
|
|
;
|
|
|
|
resourceEntry
|
|
: resourceKind identifier SOURCE sourceBlock
|
|
;
|
|
|
|
resourceKind
|
|
: INTERFACE
|
|
| PACKAGE
|
|
;
|
|
|
|
sourceBlock
|
|
: LBRACE
|
|
REPOSITORY stringLiteral SEMI
|
|
COMMIT stringLiteral SEMI
|
|
RBRACE
|
|
;
|
|
|
|
identifier
|
|
: IDENTIFIER
|
|
;
|
|
|
|
stringLiteral
|
|
: STRING_LITERAL
|
|
;
|
|
|
|
QUIXOS_LOCK: 'quixos-lock';
|
|
VERSION: 'version';
|
|
QUIXOS: 'quixos';
|
|
SOURCE: 'source';
|
|
INTERFACE: 'interface';
|
|
PACKAGE: 'package';
|
|
REPOSITORY: 'repository';
|
|
COMMIT: 'commit';
|
|
|
|
LBRACE: '{';
|
|
RBRACE: '}';
|
|
SEMI: ';';
|
|
INTEGER: [0-9]+;
|
|
IDENTIFIER: [A-Za-z_] [A-Za-z0-9_]*;
|
|
STRING_LITERAL: '"' (ESC | ~["\\\r\n])* '"';
|
|
fragment ESC: '\\' (["\\/bfnrt] | 'u' HEX HEX HEX HEX);
|
|
fragment HEX: [0-9a-fA-F];
|
|
|
|
LINE_COMMENT: '//' ~[\r\n]* -> skip;
|
|
BLOCK_COMMENT: '/*' .*? '*/' -> skip;
|
|
WS: [ \t\r\n]+ -> skip;
|