Skip to content

Commit ed330c3

Browse files
committed
ABNF
1 parent 4c7970f commit ed330c3

File tree

6 files changed

+82
-53
lines changed

6 files changed

+82
-53
lines changed

LANGUAGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
```
22
ABAP (abap)
3+
ABNF (abnf)
34
ActionScript (as)
45
Ada (ada,adb,ads,pad)
56
Agda (agda)

SCC-OUTPUT-REPORT.html

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<th>447</th>
1919
<th>7659</th>
2020
<th>1529</th>
21-
<th>254324</th>
21+
<th>254544</th>
2222
<th>4067</th>
2323
</tr><tr>
2424
<td>processor/formatters.go</td>
@@ -240,16 +240,6 @@
240240
<td>0</td>
241241
<td>2209</td>
242242
<td>35</td>
243-
</tr><tr>
244-
<td>processor/bloom.go</td>
245-
<td></td>
246-
<td>37</td>
247-
<td>7</td>
248-
<td>12</td>
249-
<td>18</td>
250-
<td>2</td>
251-
<td>1062</td>
252-
<td>29</td>
253243
</tr><tr>
254244
<td>processor/cocomo_test.go</td>
255245
<td></td>
@@ -260,6 +250,16 @@
260250
<td>6</td>
261251
<td>686</td>
262252
<td>23</td>
253+
</tr><tr>
254+
<td>processor/bloom.go</td>
255+
<td></td>
256+
<td>37</td>
257+
<td>7</td>
258+
<td>12</td>
259+
<td>18</td>
260+
<td>2</td>
261+
<td>1062</td>
262+
<td>29</td>
263263
</tr><tr>
264264
<td>processor/helpers_test.go</td>
265265
<td></td>
@@ -288,7 +288,7 @@
288288
<td>0</td>
289289
<td>4</td>
290290
<td>0</td>
291-
<td>21985</td>
291+
<td>22205</td>
292292
<td>5</td>
293293
</tr></tbody>
294294
<tfoot><tr>
@@ -299,7 +299,7 @@
299299
<th>447</th>
300300
<th>7659</th>
301301
<th>1529</th>
302-
<th>254324</th>
302+
<th>254544</th>
303303
<th>4067</th>
304304
</tr>
305305
<tr>

examples/language/abnf.abnf

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
postal-address = name-part street zip-part
2+
3+
name-part = *(personal-part SP) last-name [SP suffix] CRLF
4+
name-part =/ personal-part CRLF
5+
6+
personal-part = first-name / (initial ".")
7+
first-name = *ALPHA
8+
initial = ALPHA
9+
last-name = *ALPHA
10+
suffix = ("Jr." / "Sr." / 1*("I" / "V" / "X"))
11+
12+
street = [apt SP] house-num SP street-name CRLF
13+
apt = 1*4DIGIT
14+
house-num = 1*8(DIGIT / ALPHA)
15+
street-name = 1*VCHAR
16+
17+
zip-part = town-name "," SP state 1*2SP zip-code CRLF
18+
town-name = 1*(ALPHA / SP)
19+
state = 2ALPHA
20+
zip-code = 5DIGIT ["-" 4DIGIT]

languages.json

Lines changed: 46 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@
1818
"multi_line": [],
1919
"quotes": []
2020
},
21+
"ABNF": {
22+
"complexitychecks": ["=/ ", "/ ", "% ", "( "],
23+
"extensions": ["abnf"],
24+
"line_comment": [";"],
25+
"multi_line": [],
26+
"quotes": []
27+
},
2128
"APL": {
2229
"complexitychecks": [
2330
":For ",
@@ -3068,45 +3075,6 @@
30683075
],
30693076
"shebangs": ["node"]
30703077
},
3071-
"LiveScript": {
3072-
"complexitychecks": [
3073-
"for ",
3074-
"for(",
3075-
"if ",
3076-
"if(",
3077-
"switch ",
3078-
"case ",
3079-
"while ",
3080-
"when ",
3081-
"else ",
3082-
"|| ",
3083-
"&& ",
3084-
"!= ",
3085-
"!== ",
3086-
"xor ",
3087-
"and ",
3088-
"or ",
3089-
"|> ",
3090-
"<< ",
3091-
"<<< ",
3092-
"<<<< ",
3093-
">> ",
3094-
"== "
3095-
],
3096-
"extensions": ["ls"],
3097-
"line_comment": ["#"],
3098-
"multi_line": [["/*", "*/"]],
3099-
"quotes": [
3100-
{
3101-
"end": "\"",
3102-
"start": "\""
3103-
},
3104-
{
3105-
"end": "'",
3106-
"start": "'"
3107-
}
3108-
]
3109-
},
31103078
"JavaServer Pages": {
31113079
"complexitychecks": [
31123080
"for ",
@@ -3551,6 +3519,45 @@
35513519
"quotes": [],
35523520
"shebangs": ["sbcl"]
35533521
},
3522+
"LiveScript": {
3523+
"complexitychecks": [
3524+
"for ",
3525+
"for(",
3526+
"if ",
3527+
"if(",
3528+
"switch ",
3529+
"case ",
3530+
"while ",
3531+
"when ",
3532+
"else ",
3533+
"|| ",
3534+
"&& ",
3535+
"!= ",
3536+
"!== ",
3537+
"xor ",
3538+
"and ",
3539+
"or ",
3540+
"|> ",
3541+
"<< ",
3542+
"<<< ",
3543+
"<<<< ",
3544+
">> ",
3545+
"== "
3546+
],
3547+
"extensions": ["ls"],
3548+
"line_comment": ["#"],
3549+
"multi_line": [["/*", "*/"]],
3550+
"quotes": [
3551+
{
3552+
"end": "\"",
3553+
"start": "\""
3554+
},
3555+
{
3556+
"end": "'",
3557+
"start": "'"
3558+
}
3559+
]
3560+
},
35543561
"Lua": {
35553562
"complexitychecks": [
35563563
"for ",

processor/constants.go

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

test-all.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -916,6 +916,7 @@ fi
916916

917917
# Try out specific languages
918918
specificLanguages=(
919+
'ABNF '
919920
'Alchemist '
920921
'Alloy '
921922
'Arturo '

0 commit comments

Comments
 (0)