Skip to content
This repository was archived by the owner on Apr 17, 2019. It is now read-only.
This repository was archived by the owner on Apr 17, 2019. It is now read-only.

too strict EBNF definition for a placeable-list #14

Open
@GlenDC

Description

@GlenDC

The placeable-list is too strictly defined. Currently it is defined as follows

placeable-list       ::= placeable-expression (__ ',' __ placeable-list)?;

With the current definition in mind, the following L20n.org/learn example is not valid:

liked-photo = { LEN($people) ->
    [1]     { $people } likes
    [2]     { $people } like
    [3]     { TAKE(2, $people), "one more person" } like

   *[other] { TAKE(2, $people),
              "{ LEN(DROP(2, $people)) ->
                  [1]    one more person like
                 *[other]  { LEN(DROP(2, $people)) } more people like
               }"
            }

Example Source: https://github.com/l20n/l20n.org/blob/gh-pages/_posts/2016-04-13-complex-example.md

The reason being because we can see that there is a ( NL __ ) in between the call-expression and quoted-pattern. Personally I think this is reasonable, as it makes hand-written FTL files a lot more readable. Therefore I suggest to change the definition of a placeable-list to the following:

placeable-list       ::= placeable-expression (__ ',' __ ( NL __ )? placeable-list)?;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions