Skip to content

Parser for .flt file debugging not in place (was part of #25) #32

@Trondtr

Description

@Trondtr

Bug #25 was closed since it went off topic, and the original issue, on {} was carried over to a subissue. Another part of #25 deserves its own treatment, though:

To quote:

gle = error: Failed to load messages: Failed to parse Fluent file: [ParserError { pos: 4323..4324, slice: Some(4316..4414), kind: ExpectedToken('=') }]
@Trondtr it is on my todo list to add proper line and column error handling (I have literally built my own parser for this recently), so please hold. It will be fixed in due course. :)

The problem is that the missing messages slow down the pipeline considerably, and testing for false positives (tested on large corpora) becomes a nuisance, giving us a strong motivation for actually debugging the strings. We know that writing parsable strings is possible, since the sme grammarchecker (and some more) works.

While awaiting the parser the syntax rules would be of great help (ideally, those rules will be well-known to anyone familiar with the syntax of .ftl rules, something I unfortunately is not. Debugging thus becomes a blindfolded ectivity. Thus:

  1. Should the relation between error tags in grammarchecker.cg3 - errors.json - eerrors-xx.ftl be one of 1 to 1 to 1? Or can any tag be missing, e.g. in the .cg3 file?
  2. I take it the syntax is "key" "space" "=" "space" "string". What characters are excluded from "string"?
  3. Are there escape characters (, presumably) for such characters?

This 123 list would help while awaiting the line and column error handling.

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