Expectations on Fluent Syntax and parsing in a post 0.7 world


(Axel) #1

I’d like to start a conversation about our expectations on Fluent syntax, in particular in a post-0.7 world.

With the white-space relaxation in 0.7, we moved a whole category of parsing errors into properly parsed Fluent. Ugly, but working.

Looking at the Design Principles document, I wonder if this lends itself to an update to item 3:

3. Tolerance

Be liberal in what you require but conservative in what you do

The syntax should allow good error recovery: an error in one message should not break the whole file. The parser should resume normal parsing as soon as possible and with as few losses as possible.

This only talks about Tolerance in the sense of creating errors, but I think we’ve moved beyond that. I guess it’s an open question how far.


(Staś Małolepszy) #2

The formatting of the Tolerace principle needs some work. I meant it to comprise two related but separate points: one about being liberal in what we accept (A), and another one about the error recovery and how errors are produced (B).

Can you explain what you mean by creating errors here? Do you mean it as what is an error and what’s not (point A above), or as how exactly are errors created, from where to where (point B above).


(Axel) #3

What I mean is more along the lines of A. Things we visually disagree with “just work” in a lot more cases than they used to.