phpDocumentor / fig-standards

Standards either proposed or approved by the Framework Interop Group
http://www.php-fig.org/
Other
360 stars 85 forks source link

Fixed FQSEN ABNF definition. #97

Closed Fleshgrinder closed 6 years ago

Fleshgrinder commented 9 years ago

The current FQSEN ABNF definition is too complicated, the rules are in the wrong order (and consequently do not allow real parsing, you can check here for yourself), and some brackets are missing:

- constant = (fqnn "\" / fqcn "::") name
+ constant = ( ( fqnn "\" ) / ( fqcn "::" ) ) name

This pull request fixes the FQSEN ABNF and provides a reasoning for the defined character range.

I also added a regular expression that helps implementer to check for themselves, you may run the unit tests against the regular expression via the following link: https://regex101.com/r/bR5eE9/4

Fleshgrinder commented 9 years ago

Updated regular expression: https://regex101.com/r/bR5eE9/5

Fleshgrinder commented 9 years ago

Updated regular expression: https://regex101.com/r/bR5eE9/6

ashnazg commented 6 years ago

This repo is outdated... please get a new fork from https://github.com/php-fig/fig-standards for future contributions.

This does still need to be discussed in the FIG repo, so please open a new PR there.

ashnazg commented 6 years ago

Rather than working against FIG repo, I have now updated this phpDoc fork, so we can resume working here.

Please update your fork of this repo, and update this PR to resolve its conflicts.

Fleshgrinder commented 6 years ago

@ashnazg I have no interest in contributing any further to any PHP project but feel free to use whatever material from me that is helpful to you. This PR, in particular, is of interest because the ABNF that is currently in the standard is simply wrong.

ashnazg commented 6 years ago

Thanks for the status, @Fleshgrinder , and for the original contribution. I'll see what I can do make good use of it.

mindplay-dk commented 6 years ago

@ashnazg from the discussion above, it looks like @mvriel provided feedback on several points and @Fleshgrinder made updates accordingly?

This looks good to me 👍

ashnazg commented 6 years ago

Ported these changes into new PR #162