Skip to content

Commit bc8a8e2

Browse files
authored
Merge pull request #5 from ulyssessouza/add-var-defaults
Add var defaults
2 parents 9f865e2 + 8ea2740 commit bc8a8e2

15 files changed

+172
-173
lines changed

EnvLangFile.g4

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,5 @@ SQSTRING
3838
;
3939
4040
SPACE
41-
:
42-
' ' -> skip
41+
: ' ' -> skip
4342
;

EnvLangValue.g4

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -41,27 +41,6 @@ STR
4141
: FIRST_CHAR REST_OF_STRING*
4242
;
4343

44-
PESO_SIGN
45-
: '$'
46-
;
47-
48-
FIRST_CHAR
49-
: ~[,\\."'\r\n ]
50-
;
51-
52-
REST_OF_STRING
53-
: ~[\\'"$\r\n ]
54-
;
55-
56-
NUMBER
57-
: [0-9]+
58-
;
59-
60-
VAR_ID
61-
: NUMBER // Only numbers
62-
| [a-zA-Z_][a-zA-Z_0-9]* // Start with letters, then letters, numbers and underscores
63-
;
64-
6544
SPACE
6645
: ' '
6746
| '\t'
@@ -78,3 +57,19 @@ ANY
7857
: .
7958
;
8059

60+
fragment FIRST_CHAR
61+
: ~[,\\."'\r\n ]
62+
;
63+
64+
fragment REST_OF_STRING
65+
: ~[\\'"$\r\n ]
66+
;
67+
68+
fragment NUMBER
69+
: [0-9]+
70+
;
71+
72+
fragment VAR_ID
73+
: NUMBER // Only numbers
74+
| [a-zA-Z_][a-zA-Z_0-9]* // Start with letters, then letters, numbers and underscores
75+
;

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Ulysses Domiciano Souza
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.THER DEALINGS IN THE SOFTWARE.

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ grun:
2020
java -Xmx500M -cp "/usr/share/java/antlr-4.13.1-complete.jar:$CLASSPATH" org.antlr.v4.gui.TestRig EnvLangValue dqstrings -tokens
2121

2222
lint:
23-
golangci-lint run ./... --timeout 2m
23+
@golangci-lint run ./... --timeout 2m

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Envlang
2+
3+
## Description
4+
5+
Envlang is a simple language for defining environment variables. It is designed to be easy to read and write, and to be easy to use in a variety of contexts.
6+
It's meant to be configurable through a simple API that lets you define your own Data Access Objects (DAOs) and use them to access the environment variables you need so they can serve as connectors to anything you need.
7+
8+
## Getting Started
9+
10+
### Add to your project
11+
12+
```
13+
go get -u github.com/ulyssessouza/envlang
14+
```
15+
16+
## License
17+
18+
This project is licensed under the [MIT](LICENSE) License - see the LICENSE.md file for details

facade.go renamed to envlang.go

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,24 @@
11
package main
22

33
import (
4+
"io"
5+
46
"github.com/antlr4-go/antlr/v4"
57
"github.com/ulyssessouza/envlang/dao"
68
"github.com/ulyssessouza/envlang/gen/fileparser"
79
"github.com/ulyssessouza/envlang/handlers"
810
)
911

12+
func GetVariablesFromInputStream(d dao.EnvLangDao, r io.Reader) map[string]*string {
13+
return getVariablesFromInputStream(d, antlr.NewIoStream(r))
14+
}
15+
1016
func GetVariables(d dao.EnvLangDao, s string) map[string]*string {
11-
is := antlr.NewInputStream(s)
12-
lexer := fileparser.NewEnvLangFileLexer(is)
17+
return getVariablesFromInputStream(d, antlr.NewInputStream(s))
18+
}
19+
20+
func getVariablesFromInputStream(d dao.EnvLangDao, ais *antlr.InputStream) map[string]*string {
21+
lexer := fileparser.NewEnvLangFileLexer(ais)
1322
stream := antlr.NewCommonTokenStream(lexer, antlr.TokenDefaultChannel)
1423
parser := fileparser.NewEnvLangFileParser(stream)
1524
listener := handlers.NewEnvLangFileListener(d)

facade_test.go renamed to envlang_test.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package main
22

33
import (
4+
"strings"
45
"testing"
56

67
log "github.com/sirupsen/logrus"
@@ -13,6 +14,14 @@ func init() {
1314
log.SetLevel(log.DebugLevel)
1415
}
1516

17+
func TestGetFromReader(t *testing.T) {
18+
expected := map[string]*string{
19+
"A": strPtr("aaa"),
20+
}
21+
d := dao.NewDefaultDaoFromMap(nil)
22+
assert.DeepEqual(t, expected, GetVariablesFromInputStream(d, strings.NewReader(`A=aaa`)))
23+
}
24+
1625
//nolint:funlen
1726
func TestGetValue(t *testing.T) {
1827
tests := []struct {

gen/valueparser/EnvLangValue.interp

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@ null
55
null
66
null
77
null
8-
'$'
9-
null
10-
null
11-
null
12-
null
138
null
149
null
1510
null
@@ -21,11 +16,6 @@ STRICT_VAR_WITH_DEFAULT_IF_UNSET
2116
SIMPLE_STRICT_VAR
2217
SIMPLE_VAR
2318
STR
24-
PESO_SIGN
25-
FIRST_CHAR
26-
REST_OF_STRING
27-
NUMBER
28-
VAR_ID
2919
SPACE
3020
CRLF
3121
ANY
@@ -37,4 +27,4 @@ variable
3727

3828

3929
atn:
40-
[4, 1, 13, 36, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 1, 0, 5, 0, 8, 8, 0, 10, 0, 12, 0, 11, 9, 0, 1, 0, 5, 0, 14, 8, 0, 10, 0, 12, 0, 17, 9, 0, 1, 0, 5, 0, 20, 8, 0, 10, 0, 12, 0, 23, 9, 0, 1, 0, 3, 0, 26, 8, 0, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 32, 8, 1, 1, 2, 1, 2, 1, 2, 0, 0, 3, 0, 2, 4, 0, 1, 1, 0, 1, 4, 40, 0, 9, 1, 0, 0, 0, 2, 31, 1, 0, 0, 0, 4, 33, 1, 0, 0, 0, 6, 8, 3, 2, 1, 0, 7, 6, 1, 0, 0, 0, 8, 11, 1, 0, 0, 0, 9, 7, 1, 0, 0, 0, 9, 10, 1, 0, 0, 0, 10, 25, 1, 0, 0, 0, 11, 9, 1, 0, 0, 0, 12, 14, 5, 11, 0, 0, 13, 12, 1, 0, 0, 0, 14, 17, 1, 0, 0, 0, 15, 13, 1, 0, 0, 0, 15, 16, 1, 0, 0, 0, 16, 26, 1, 0, 0, 0, 17, 15, 1, 0, 0, 0, 18, 20, 5, 12, 0, 0, 19, 18, 1, 0, 0, 0, 20, 23, 1, 0, 0, 0, 21, 19, 1, 0, 0, 0, 21, 22, 1, 0, 0, 0, 22, 26, 1, 0, 0, 0, 23, 21, 1, 0, 0, 0, 24, 26, 5, 0, 0, 1, 25, 15, 1, 0, 0, 0, 25, 21, 1, 0, 0, 0, 25, 24, 1, 0, 0, 0, 26, 1, 1, 0, 0, 0, 27, 32, 3, 4, 2, 0, 28, 32, 5, 5, 0, 0, 29, 32, 5, 11, 0, 0, 30, 32, 5, 12, 0, 0, 31, 27, 1, 0, 0, 0, 31, 28, 1, 0, 0, 0, 31, 29, 1, 0, 0, 0, 31, 30, 1, 0, 0, 0, 32, 3, 1, 0, 0, 0, 33, 34, 7, 0, 0, 0, 34, 5, 1, 0, 0, 0, 5, 9, 15, 21, 25, 31]
30+
[4, 1, 8, 36, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 1, 0, 5, 0, 8, 8, 0, 10, 0, 12, 0, 11, 9, 0, 1, 0, 5, 0, 14, 8, 0, 10, 0, 12, 0, 17, 9, 0, 1, 0, 5, 0, 20, 8, 0, 10, 0, 12, 0, 23, 9, 0, 1, 0, 3, 0, 26, 8, 0, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 32, 8, 1, 1, 2, 1, 2, 1, 2, 0, 0, 3, 0, 2, 4, 0, 1, 1, 0, 1, 4, 40, 0, 9, 1, 0, 0, 0, 2, 31, 1, 0, 0, 0, 4, 33, 1, 0, 0, 0, 6, 8, 3, 2, 1, 0, 7, 6, 1, 0, 0, 0, 8, 11, 1, 0, 0, 0, 9, 7, 1, 0, 0, 0, 9, 10, 1, 0, 0, 0, 10, 25, 1, 0, 0, 0, 11, 9, 1, 0, 0, 0, 12, 14, 5, 6, 0, 0, 13, 12, 1, 0, 0, 0, 14, 17, 1, 0, 0, 0, 15, 13, 1, 0, 0, 0, 15, 16, 1, 0, 0, 0, 16, 26, 1, 0, 0, 0, 17, 15, 1, 0, 0, 0, 18, 20, 5, 7, 0, 0, 19, 18, 1, 0, 0, 0, 20, 23, 1, 0, 0, 0, 21, 19, 1, 0, 0, 0, 21, 22, 1, 0, 0, 0, 22, 26, 1, 0, 0, 0, 23, 21, 1, 0, 0, 0, 24, 26, 5, 0, 0, 1, 25, 15, 1, 0, 0, 0, 25, 21, 1, 0, 0, 0, 25, 24, 1, 0, 0, 0, 26, 1, 1, 0, 0, 0, 27, 32, 3, 4, 2, 0, 28, 32, 5, 5, 0, 0, 29, 32, 5, 6, 0, 0, 30, 32, 5, 7, 0, 0, 31, 27, 1, 0, 0, 0, 31, 28, 1, 0, 0, 0, 31, 29, 1, 0, 0, 0, 31, 30, 1, 0, 0, 0, 32, 3, 1, 0, 0, 0, 33, 34, 7, 0, 0, 0, 34, 5, 1, 0, 0, 0, 5, 9, 15, 21, 25, 31]

gen/valueparser/EnvLangValue.tokens

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,6 @@ STRICT_VAR_WITH_DEFAULT_IF_UNSET=2
33
SIMPLE_STRICT_VAR=3
44
SIMPLE_VAR=4
55
STR=5
6-
PESO_SIGN=6
7-
FIRST_CHAR=7
8-
REST_OF_STRING=8
9-
NUMBER=9
10-
VAR_ID=10
11-
SPACE=11
12-
CRLF=12
13-
ANY=13
14-
'$'=6
6+
SPACE=6
7+
CRLF=7
8+
ANY=8

gen/valueparser/EnvLangValueLexer.interp

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@ null
55
null
66
null
77
null
8-
'$'
9-
null
10-
null
11-
null
12-
null
138
null
149
null
1510
null
@@ -21,11 +16,6 @@ STRICT_VAR_WITH_DEFAULT_IF_UNSET
2116
SIMPLE_STRICT_VAR
2217
SIMPLE_VAR
2318
STR
24-
PESO_SIGN
25-
FIRST_CHAR
26-
REST_OF_STRING
27-
NUMBER
28-
VAR_ID
2919
SPACE
3020
CRLF
3121
ANY
@@ -36,14 +26,13 @@ STRICT_VAR_WITH_DEFAULT_IF_UNSET
3626
SIMPLE_STRICT_VAR
3727
SIMPLE_VAR
3828
STR
39-
PESO_SIGN
29+
SPACE
30+
CRLF
31+
ANY
4032
FIRST_CHAR
4133
REST_OF_STRING
4234
NUMBER
4335
VAR_ID
44-
SPACE
45-
CRLF
46-
ANY
4736

4837
channel names:
4938
DEFAULT_TOKEN_CHANNEL
@@ -53,4 +42,4 @@ mode names:
5342
DEFAULT_MODE
5443

5544
atn:
56-
[4, 0, 13, 129, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 1, 0, 1, 0, 1, 0, 1, 0, 5, 0, 32, 8, 0, 10, 0, 12, 0, 35, 9, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 5, 0, 43, 8, 0, 10, 0, 12, 0, 46, 9, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 54, 8, 1, 10, 1, 12, 1, 57, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 63, 8, 1, 10, 1, 12, 1, 66, 9, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 5, 2, 74, 8, 2, 10, 2, 12, 2, 77, 9, 2, 1, 2, 1, 2, 5, 2, 81, 8, 2, 10, 2, 12, 2, 84, 9, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 5, 4, 93, 8, 4, 10, 4, 12, 4, 96, 9, 4, 1, 5, 1, 5, 1, 6, 1, 6, 1, 7, 1, 7, 1, 8, 4, 8, 105, 8, 8, 11, 8, 12, 8, 106, 1, 9, 1, 9, 1, 9, 5, 9, 112, 8, 9, 10, 9, 12, 9, 115, 9, 9, 3, 9, 117, 8, 9, 1, 10, 1, 10, 1, 11, 3, 11, 122, 8, 11, 1, 11, 1, 11, 3, 11, 126, 8, 11, 1, 12, 1, 12, 0, 0, 13, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 1, 0, 6, 8, 0, 10, 10, 13, 13, 32, 32, 34, 34, 39, 39, 44, 44, 46, 46, 92, 92, 7, 0, 10, 10, 13, 13, 32, 32, 34, 34, 36, 36, 39, 39, 92, 92, 1, 0, 48, 57, 3, 0, 65, 90, 95, 95, 97, 122, 4, 0, 48, 57, 65, 90, 95, 95, 97, 122, 2, 0, 9, 9, 32, 32, 140, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 1, 27, 1, 0, 0, 0, 3, 49, 1, 0, 0, 0, 5, 69, 1, 0, 0, 0, 7, 87, 1, 0, 0, 0, 9, 90, 1, 0, 0, 0, 11, 97, 1, 0, 0, 0, 13, 99, 1, 0, 0, 0, 15, 101, 1, 0, 0, 0, 17, 104, 1, 0, 0, 0, 19, 116, 1, 0, 0, 0, 21, 118, 1, 0, 0, 0, 23, 125, 1, 0, 0, 0, 25, 127, 1, 0, 0, 0, 27, 28, 5, 36, 0, 0, 28, 29, 5, 123, 0, 0, 29, 33, 1, 0, 0, 0, 30, 32, 3, 21, 10, 0, 31, 30, 1, 0, 0, 0, 32, 35, 1, 0, 0, 0, 33, 31, 1, 0, 0, 0, 33, 34, 1, 0, 0, 0, 34, 36, 1, 0, 0, 0, 35, 33, 1, 0, 0, 0, 36, 37, 3, 19, 9, 0, 37, 38, 5, 58, 0, 0, 38, 39, 5, 45, 0, 0, 39, 40, 1, 0, 0, 0, 40, 44, 3, 9, 4, 0, 41, 43, 3, 21, 10, 0, 42, 41, 1, 0, 0, 0, 43, 46, 1, 0, 0, 0, 44, 42, 1, 0, 0, 0, 44, 45, 1, 0, 0, 0, 45, 47, 1, 0, 0, 0, 46, 44, 1, 0, 0, 0, 47, 48, 5, 125, 0, 0, 48, 2, 1, 0, 0, 0, 49, 50, 5, 36, 0, 0, 50, 51, 5, 123, 0, 0, 51, 55, 1, 0, 0, 0, 52, 54, 3, 21, 10, 0, 53, 52, 1, 0, 0, 0, 54, 57, 1, 0, 0, 0, 55, 53, 1, 0, 0, 0, 55, 56, 1, 0, 0, 0, 56, 58, 1, 0, 0, 0, 57, 55, 1, 0, 0, 0, 58, 59, 3, 19, 9, 0, 59, 60, 5, 45, 0, 0, 60, 64, 3, 9, 4, 0, 61, 63, 3, 21, 10, 0, 62, 61, 1, 0, 0, 0, 63, 66, 1, 0, 0, 0, 64, 62, 1, 0, 0, 0, 64, 65, 1, 0, 0, 0, 65, 67, 1, 0, 0, 0, 66, 64, 1, 0, 0, 0, 67, 68, 5, 125, 0, 0, 68, 4, 1, 0, 0, 0, 69, 70, 5, 36, 0, 0, 70, 71, 5, 123, 0, 0, 71, 75, 1, 0, 0, 0, 72, 74, 3, 21, 10, 0, 73, 72, 1, 0, 0, 0, 74, 77, 1, 0, 0, 0, 75, 73, 1, 0, 0, 0, 75, 76, 1, 0, 0, 0, 76, 78, 1, 0, 0, 0, 77, 75, 1, 0, 0, 0, 78, 82, 3, 19, 9, 0, 79, 81, 3, 21, 10, 0, 80, 79, 1, 0, 0, 0, 81, 84, 1, 0, 0, 0, 82, 80, 1, 0, 0, 0, 82, 83, 1, 0, 0, 0, 83, 85, 1, 0, 0, 0, 84, 82, 1, 0, 0, 0, 85, 86, 5, 125, 0, 0, 86, 6, 1, 0, 0, 0, 87, 88, 5, 36, 0, 0, 88, 89, 3, 19, 9, 0, 89, 8, 1, 0, 0, 0, 90, 94, 3, 13, 6, 0, 91, 93, 3, 15, 7, 0, 92, 91, 1, 0, 0, 0, 93, 96, 1, 0, 0, 0, 94, 92, 1, 0, 0, 0, 94, 95, 1, 0, 0, 0, 95, 10, 1, 0, 0, 0, 96, 94, 1, 0, 0, 0, 97, 98, 5, 36, 0, 0, 98, 12, 1, 0, 0, 0, 99, 100, 8, 0, 0, 0, 100, 14, 1, 0, 0, 0, 101, 102, 8, 1, 0, 0, 102, 16, 1, 0, 0, 0, 103, 105, 7, 2, 0, 0, 104, 103, 1, 0, 0, 0, 105, 106, 1, 0, 0, 0, 106, 104, 1, 0, 0, 0, 106, 107, 1, 0, 0, 0, 107, 18, 1, 0, 0, 0, 108, 117, 3, 17, 8, 0, 109, 113, 7, 3, 0, 0, 110, 112, 7, 4, 0, 0, 111, 110, 1, 0, 0, 0, 112, 115, 1, 0, 0, 0, 113, 111, 1, 0, 0, 0, 113, 114, 1, 0, 0, 0, 114, 117, 1, 0, 0, 0, 115, 113, 1, 0, 0, 0, 116, 108, 1, 0, 0, 0, 116, 109, 1, 0, 0, 0, 117, 20, 1, 0, 0, 0, 118, 119, 7, 5, 0, 0, 119, 22, 1, 0, 0, 0, 120, 122, 5, 13, 0, 0, 121, 120, 1, 0, 0, 0, 121, 122, 1, 0, 0, 0, 122, 123, 1, 0, 0, 0, 123, 126, 5, 10, 0, 0, 124, 126, 5, 13, 0, 0, 125, 121, 1, 0, 0, 0, 125, 124, 1, 0, 0, 0, 126, 24, 1, 0, 0, 0, 127, 128, 9, 0, 0, 0, 128, 26, 1, 0, 0, 0, 13, 0, 33, 44, 55, 64, 75, 82, 94, 106, 113, 116, 121, 125, 0]
45+
[4, 0, 8, 125, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 1, 0, 1, 0, 1, 0, 1, 0, 5, 0, 30, 8, 0, 10, 0, 12, 0, 33, 9, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 5, 0, 41, 8, 0, 10, 0, 12, 0, 44, 9, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 52, 8, 1, 10, 1, 12, 1, 55, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 61, 8, 1, 10, 1, 12, 1, 64, 9, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 5, 2, 72, 8, 2, 10, 2, 12, 2, 75, 9, 2, 1, 2, 1, 2, 5, 2, 79, 8, 2, 10, 2, 12, 2, 82, 9, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 5, 4, 91, 8, 4, 10, 4, 12, 4, 94, 9, 4, 1, 5, 1, 5, 1, 6, 3, 6, 99, 8, 6, 1, 6, 1, 6, 3, 6, 103, 8, 6, 1, 7, 1, 7, 1, 8, 1, 8, 1, 9, 1, 9, 1, 10, 4, 10, 112, 8, 10, 11, 10, 12, 10, 113, 1, 11, 1, 11, 1, 11, 5, 11, 119, 8, 11, 10, 11, 12, 11, 122, 9, 11, 3, 11, 124, 8, 11, 0, 0, 12, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 0, 19, 0, 21, 0, 23, 0, 1, 0, 6, 2, 0, 9, 9, 32, 32, 8, 0, 10, 10, 13, 13, 32, 32, 34, 34, 39, 39, 44, 44, 46, 46, 92, 92, 7, 0, 10, 10, 13, 13, 32, 32, 34, 34, 36, 36, 39, 39, 92, 92, 1, 0, 48, 57, 3, 0, 65, 90, 95, 95, 97, 122, 4, 0, 48, 57, 65, 90, 95, 95, 97, 122, 132, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 1, 25, 1, 0, 0, 0, 3, 47, 1, 0, 0, 0, 5, 67, 1, 0, 0, 0, 7, 85, 1, 0, 0, 0, 9, 88, 1, 0, 0, 0, 11, 95, 1, 0, 0, 0, 13, 102, 1, 0, 0, 0, 15, 104, 1, 0, 0, 0, 17, 106, 1, 0, 0, 0, 19, 108, 1, 0, 0, 0, 21, 111, 1, 0, 0, 0, 23, 123, 1, 0, 0, 0, 25, 26, 5, 36, 0, 0, 26, 27, 5, 123, 0, 0, 27, 31, 1, 0, 0, 0, 28, 30, 3, 11, 5, 0, 29, 28, 1, 0, 0, 0, 30, 33, 1, 0, 0, 0, 31, 29, 1, 0, 0, 0, 31, 32, 1, 0, 0, 0, 32, 34, 1, 0, 0, 0, 33, 31, 1, 0, 0, 0, 34, 35, 3, 23, 11, 0, 35, 36, 5, 58, 0, 0, 36, 37, 5, 45, 0, 0, 37, 38, 1, 0, 0, 0, 38, 42, 3, 9, 4, 0, 39, 41, 3, 11, 5, 0, 40, 39, 1, 0, 0, 0, 41, 44, 1, 0, 0, 0, 42, 40, 1, 0, 0, 0, 42, 43, 1, 0, 0, 0, 43, 45, 1, 0, 0, 0, 44, 42, 1, 0, 0, 0, 45, 46, 5, 125, 0, 0, 46, 2, 1, 0, 0, 0, 47, 48, 5, 36, 0, 0, 48, 49, 5, 123, 0, 0, 49, 53, 1, 0, 0, 0, 50, 52, 3, 11, 5, 0, 51, 50, 1, 0, 0, 0, 52, 55, 1, 0, 0, 0, 53, 51, 1, 0, 0, 0, 53, 54, 1, 0, 0, 0, 54, 56, 1, 0, 0, 0, 55, 53, 1, 0, 0, 0, 56, 57, 3, 23, 11, 0, 57, 58, 5, 45, 0, 0, 58, 62, 3, 9, 4, 0, 59, 61, 3, 11, 5, 0, 60, 59, 1, 0, 0, 0, 61, 64, 1, 0, 0, 0, 62, 60, 1, 0, 0, 0, 62, 63, 1, 0, 0, 0, 63, 65, 1, 0, 0, 0, 64, 62, 1, 0, 0, 0, 65, 66, 5, 125, 0, 0, 66, 4, 1, 0, 0, 0, 67, 68, 5, 36, 0, 0, 68, 69, 5, 123, 0, 0, 69, 73, 1, 0, 0, 0, 70, 72, 3, 11, 5, 0, 71, 70, 1, 0, 0, 0, 72, 75, 1, 0, 0, 0, 73, 71, 1, 0, 0, 0, 73, 74, 1, 0, 0, 0, 74, 76, 1, 0, 0, 0, 75, 73, 1, 0, 0, 0, 76, 80, 3, 23, 11, 0, 77, 79, 3, 11, 5, 0, 78, 77, 1, 0, 0, 0, 79, 82, 1, 0, 0, 0, 80, 78, 1, 0, 0, 0, 80, 81, 1, 0, 0, 0, 81, 83, 1, 0, 0, 0, 82, 80, 1, 0, 0, 0, 83, 84, 5, 125, 0, 0, 84, 6, 1, 0, 0, 0, 85, 86, 5, 36, 0, 0, 86, 87, 3, 23, 11, 0, 87, 8, 1, 0, 0, 0, 88, 92, 3, 17, 8, 0, 89, 91, 3, 19, 9, 0, 90, 89, 1, 0, 0, 0, 91, 94, 1, 0, 0, 0, 92, 90, 1, 0, 0, 0, 92, 93, 1, 0, 0, 0, 93, 10, 1, 0, 0, 0, 94, 92, 1, 0, 0, 0, 95, 96, 7, 0, 0, 0, 96, 12, 1, 0, 0, 0, 97, 99, 5, 13, 0, 0, 98, 97, 1, 0, 0, 0, 98, 99, 1, 0, 0, 0, 99, 100, 1, 0, 0, 0, 100, 103, 5, 10, 0, 0, 101, 103, 5, 13, 0, 0, 102, 98, 1, 0, 0, 0, 102, 101, 1, 0, 0, 0, 103, 14, 1, 0, 0, 0, 104, 105, 9, 0, 0, 0, 105, 16, 1, 0, 0, 0, 106, 107, 8, 1, 0, 0, 107, 18, 1, 0, 0, 0, 108, 109, 8, 2, 0, 0, 109, 20, 1, 0, 0, 0, 110, 112, 7, 3, 0, 0, 111, 110, 1, 0, 0, 0, 112, 113, 1, 0, 0, 0, 113, 111, 1, 0, 0, 0, 113, 114, 1, 0, 0, 0, 114, 22, 1, 0, 0, 0, 115, 124, 3, 21, 10, 0, 116, 120, 7, 4, 0, 0, 117, 119, 7, 5, 0, 0, 118, 117, 1, 0, 0, 0, 119, 122, 1, 0, 0, 0, 120, 118, 1, 0, 0, 0, 120, 121, 1, 0, 0, 0, 121, 124, 1, 0, 0, 0, 122, 120, 1, 0, 0, 0, 123, 115, 1, 0, 0, 0, 123, 116, 1, 0, 0, 0, 124, 24, 1, 0, 0, 0, 13, 0, 31, 42, 53, 62, 73, 80, 92, 98, 102, 113, 120, 123, 0]

gen/valueparser/EnvLangValueLexer.tokens

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,6 @@ STRICT_VAR_WITH_DEFAULT_IF_UNSET=2
33
SIMPLE_STRICT_VAR=3
44
SIMPLE_VAR=4
55
STR=5
6-
PESO_SIGN=6
7-
FIRST_CHAR=7
8-
REST_OF_STRING=8
9-
NUMBER=9
10-
VAR_ID=10
11-
SPACE=11
12-
CRLF=12
13-
ANY=13
14-
'$'=6
6+
SPACE=6
7+
CRLF=7
8+
ANY=8

0 commit comments

Comments
 (0)