Grammalecte  Check-in [99fa14a3e2]

Overview
Comment:[doc][fr] syntax update
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | fr | doc
Files: files | file ages | folders
SHA3-256: 99fa14a3e21f13c9722c01a04eff2484fdb97ac4c3a3464fdecb924a5957d4a6
User & Date: olr on 2020-04-13 21:10:50
Other Links: manifest | tags
Context
2020-04-13
21:16
[fr] ajustements check-in: 11b89de7a9 user: olr tags: trunk, fr
21:10
[doc][fr] syntax update check-in: 99fa14a3e2 user: olr tags: trunk, fr, doc
20:46
[fr] ajustements check-in: aa2e3acd2e user: olr tags: trunk, fr
Changes

Modified doc/syntax.txt from [a5a5d747b8] to [3e9971cb59].

200
201
202
203
204
205
206





















207
208
209
210
211
212
213

    __<i]__  \b([?!.])([A-Z]+) <<- ->> \1 \2     # Missing space?

Example. Back reference in messages.

    (fooo) bar <<- ->> foo      # “\1” should be:























### Pattern matching

Repeating pattern matching of a single rule continues after the previous matching, so instead of general multiword patterns, like

        (\w+) (\w+) <<- some_check(\1, \2) ->> \1, \2 # foo








>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234

    __<i]__  \b([?!.])([A-Z]+) <<- ->> \1 \2     # Missing space?

Example. Back reference in messages.

    (fooo) bar <<- ->> foo      # “\1” should be:


### Group positioning codes for JavaScript:

There is no way in JavaScript to know where a captured group starts and ends. To avoid misplacement, regex rules may specify group positioning codes which indicate to the grammar checker where is the position of the captured groups.

A group positioning code always begins by `@@`. If there is several codes, they are separated by a comma `,`.

Other codes:

    0 1 2 3 ... n       left boundary position from left
    -1 -2 -2 ... -n     right boundary position from right
    $                   extreme right boundary
    w                   somewhere with word boundaries
    *                   something somewhere
    **                  something somewhere after previous group

Examples:

    ([A-ZÉÈÂÎ][\w-]+) [A-ZÉÈÂ]([.]) ([A-ZÉÈÂ][\w-]+)  @@0,*,$
    " ([?!;])"  @@1


### Pattern matching

Repeating pattern matching of a single rule continues after the previous matching, so instead of general multiword patterns, like

        (\w+) (\w+) <<- some_check(\1, \2) ->> \1, \2 # foo

Modified gc_lang/fr/rules.grx from [915347a732] to [fe60d7c815].

15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.
#
#   You should have received a copy of the GNU General Public License
#   along with Grammalecte.  If not, see <http://www.gnu.org/licenses/>
#

# DOCUMENTATION

# [++] : séparateur des règles pour le paragraphe et des règles pour la phrase.

# Types d’action:
#   ->> erreur
#   ~>> préprocesseur de texte
#   =>> désambiguïsateur

# RÈGLES PAR EXPRESSIONS RÉGULIÈRES
# Expressions régulières en Python : http://docs.python.org/library/re.html
# Groups positioning code for JavaScript:
# Always begins by @@
#   0 ... n         left boundary position from left
#   $               right boundary
#   w               word boundaries
#   *               something somewhere
#   **              something somewhere after previous group
#   >x:_            within group x, _ is group position code within group x

# Fin d’interprétation du fichier avec une ligne commençant par #END



# ERREURS COURANTES
# http://fr.wikipedia.org/wiki/Wikip%C3%A9dia:Fautes_d%27orthographe/Courantes


!!
!!







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







15
16
17
18
19
20
21
























22
23
24
25
26
27
28
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.
#
#   You should have received a copy of the GNU General Public License
#   along with Grammalecte.  If not, see <http://www.gnu.org/licenses/>
#

























# ERREURS COURANTES
# http://fr.wikipedia.org/wiki/Wikip%C3%A9dia:Fautes_d%27orthographe/Courantes


!!
!!