Fluent Syntax Spec 0.6.0
Pre-release-
Created the reference parser for Fluent Syntax.
This version is the first to ship with the official reference
implementation of the parser. The parser focuses on strictness and
correctness at a cost of reduced performance.The ASDL description of the AST has been removed in favor of
syntax/ast.mjswhich defines the actual AST nodes returned by the
reference parser.The EBNF is now auto-generated from the reference parser's
syntax/grammar.mjsfile. It provides an easy to read overview of the
grammar and will continue to be updated in the future.Going forward, all changes to the grammar will be implemented in the
reference parser first, which also ships with an extensive test suite. -
Added junk entries.
The grammar now explicitly defines the
junk_lineproduction which is
converted intoJunkduring the AST construction. -
Comments may now be attached to Messages or Terms.
The grammar now encodes the behavior for Comments preceding Messages and
Terms. If there are no blank lines between the Comment and the Message or
the Term, the Comment becomes part of theMessageor theTermAST node. -
Fixed many issues with the white-space grammar.
The EBNF for Syntax 0.5 had many issues with its use of
inline-spaceand
break-indent. It defined undesirable or impossible parsing behavior.
These issues have been fixed and the new test suite will help ensure the
correctness of the grammar in the future. -
Named arguments to
CallExpressionsmust now follow all positional ones.The order of arguments to
CallExpressionsis now strictly defined as
positional first, named second. TheCallExpression'sargumentsfield
was replaced by two new fields:positionalandnamed. -
Named arguments to
CallExpressionsmust now be unique. -
Added the
TermReferenceexpression.References to terms used to be stored as
MessageReferencesin the AST.
They now have their own expression type. -
Store the referent expression in attribute and variant expressions.
MessageAttributeExpression,TermAttributeExpressionand
TermVariantExpressionnow store the entire referent expression in a new
reffield, rather than just theIdentifier. -
ExternalArgumentis now calledVariableReference. -
Add the
VariantListvalue type.Selector-less
SelectExpressionshave been removed in favor of
VariantListswhich share the same syntax but have more restricted usage.
Values ofMessagesand allAttributesmay only bePatterns. Values
ofTermsmay either bePatternsorVariantLists. Values of
Variantsmay only beVariantListsif they're defined in another
VariantList. -
SelectExpression'sexpressionfield is now calledselector. -
StringExpressionis now calledStringLiteral. -
NumberExpressionis now calledNumberLiteral. -
TextElementandPlaceableare now subclasses of an abstract
PatternElementclass.