GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Implement basic expressions, function calls and literals · Issue #1 · Seddryck/Expressif.Syntax Closed Labels DescriptionDescriptionImplement the initial Expressif Tree-sitter grammar covering the fundamental syntax required to parse independently testable expressions:
This issue establishes the basic syntax tree on which the remaining Expressif grammar will be built. Design principlesThe grammar must remain independent from the Expressif function catalogue. The parser must not know whether a callable exists, whether it is a function/predicate/accumulator/transformation, what argument types it accepts, or how many arguments it accepts. The syntax should avoid constructs whose interpretation depends on semantic context. Consequently:
Syntax modelExact Tree-sitter rule names may follow Tree-sitter naming conventions, but the resulting CST should preserve these distinctions. Function namesA function name consists of one or more alphabetic segments separated by a single hyphen. Valid examples: Invalid examples: Function names are case-preserving at syntax level. Name normalization, aliases and callable resolution belong to the semantic binding layer. Function callsZero-argument functions may omit parentheses: or use empty parentheses: Functions may contain positional arguments: The parser must not validate existence or arity. Therefore Numeric literalsSupport numeric literals such as: They produce Boolean literalsBoolean literals use explicit syntax: and produce Bare Initially support exactly lowercase Quoted literalsTextual values must be quoted. Valid: Escaped double quotes must be supported: The CST must retain the original quoting style. Unquoted textual parameters such as Temporal literalsTemporal values use the explicit Support three forms: They map respectively to: Accepted lexical formats are strictly:
The parser should validate the structural format, but semantic calendar validity such as February 30 may remain a later validation concern. Ordinary quoted text that happens to look temporal remains text: Positional argumentsArguments may initially contain any value implemented by this issue: Later issues will extend arguments with variables/references, compound values, expressions, named arguments and spread arguments. Do not introduce function-name-specific argument grammar. Open expressionsAn open expression consists of one or more function calls chained with Whitespace around Closed expressionsA closed expression starts with a value and may optionally continue with a function pipeline: Additional source types such as variables, arrays, tuples, records, references and intervals will be introduced by later issues. Root expressionsThe parser entry point must classify the input as either an open or closed expression. Examples: There should be no ambiguity between a bare function name and a literal. WhitespaceAccept insignificant surrounding whitespace, including: Whitespace inside quoted literals remains significant. The space separator inside a datetime literal is part of the literal format. Breaking changes from current Expressif syntaxThe existing Expressif parser accepts unquoted textual values such as: This grammar deliberately removes that ambiguity. Equivalent syntax becomes: Boolean literals are explicitly written as These changes ensure that bare alphabetic tokens have one syntactic meaning: function calls. Out of scopeDo not implement or special-case:
TestsAdd Tree-sitter corpus tests covering at minimum:
Tests should assert syntax-tree structure, not only parse success. ActivityMetadataMetadataAssigneesLabelsTypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |