Refactor render graph & DSL; remove material system
- Major optimization of Ghost.RenderGraph.Concept: pooled resources, zero-allocation hot paths, explicit queue types, and batch barrier APIs. - Migrated Ghost.DSL shader compiler to ANTLR4-based parser; removed hand-written parser, added grammar files and semantic model conversion. - Added CollectionPool/ListPool for pooled list management. - Updated documentation for new architecture and performance. - Removed Ghost.Shader.Concept (material/material system) from repo and solution. - README.md replaced with a brief project statement.
This commit is contained in:
33
Ghost.DSL/Grammar/GhostShaderLexer.g4
Normal file
33
Ghost.DSL/Grammar/GhostShaderLexer.g4
Normal file
@@ -0,0 +1,33 @@
|
||||
lexer grammar GhostShaderLexer;
|
||||
|
||||
// Keywords
|
||||
SHADER: 'shader';
|
||||
PROPERTIES: 'properties';
|
||||
PIPELINE: 'pipeline';
|
||||
PASS: 'pass';
|
||||
DEFINES: 'defines';
|
||||
KEYWORDS: 'keywords';
|
||||
INCLUDES: 'includes';
|
||||
GLOBAL: 'global';
|
||||
LOCAL: 'local';
|
||||
HLSL: 'hlsl';
|
||||
|
||||
// Punctuation
|
||||
LBRACE: '{';
|
||||
RBRACE: '}';
|
||||
LPAREN: '(';
|
||||
RPAREN: ')';
|
||||
SEMICOLON: ';';
|
||||
COMMA: ',';
|
||||
EQUALS: '=';
|
||||
COLON: ':';
|
||||
|
||||
// Literals
|
||||
STRING_LITERAL: '"' (~["\r\n] | '\\' .)* '"';
|
||||
NUMBER: [0-9]+ ('.' [0-9]+)? | '.' [0-9]+;
|
||||
IDENTIFIER: [a-zA-Z_][a-zA-Z0-9_]*;
|
||||
|
||||
// Whitespace and Comments
|
||||
WS: [ \t\r\n]+ -> skip;
|
||||
LINE_COMMENT: '//' ~[\r\n]* -> skip;
|
||||
BLOCK_COMMENT: '/*' .*? '*/' -> skip;
|
||||
Reference in New Issue
Block a user