Skip to content

Commit 7241c7b

Browse files
committed
Libs updated, parser regenerated
1 parent a2c5a4a commit 7241c7b

File tree

8 files changed

+939
-577
lines changed

8 files changed

+939
-577
lines changed

docs/scripting.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ The first command in the script above retrieves all parts of set 8880-1 and stor
1111

1212
The following commands can be used in bricks scripts:
1313

14-
* *Assignment*: `ID := exp` - assigns a collection of parts defined by the given expression to a variable with name ID. The variable can be used in any expression later on.
15-
* *save*: `save(exp, FILE_NAME)` - saves the given collection defined by the expression to a JSON file with the given FILE_NAME.
16-
* *export*: `export(exp, EXPORT_DIR)` - exports the given collection defined by the expression to an HTML file into the given EXPORT_DIR.
17-
* *build*: `build(EXP, EXP, DIR_NAME, MODE?)` - Builds a set given by the first expression by using parts from the collection defined by the second expression. MODE is a combination of any of the following characters: C(olor), A(lternates), M(olds), and P(rints). If for example CAMP is provided, the build substitutes missing parts by parts of different color, alternates, molds, and prints. If no MODE is provided, no missing parts will be replaced. Exports the result to the given directory.
18-
* *pause*: `pause(INT)` - Pauses the script for the given time in seconds. Sometimes it's neccessary to pause the script between API requests to avoid a "429 Too many requests" error message from the rebrickable.com server.
14+
* *Assignment*: `ID := EXP` - assigns a collection of parts defined by the given expression EXP to a variable with name ID. The variable can be used in any expression later on.
15+
* *save*: `save(EXP, FILE_NAME)` - saves the given collection defined by the expression EXP to a JSON file with the given FILE_NAME.
16+
* *export*: `export(EXP, DIR_NAME)` - exports the given collection defined by the expression EXP to an HTML file into the given DIR_NAME.
17+
* *build*: `build(EXP1, EXP2, DIR_NAME, MODE?)` - Builds a set given by the first expression EXP1 by using parts from the collection defined by the second expression EXP2. MODE is a combination of any of the following characters: C(olor), A(lternates), M(olds), and P(rints). If for example CAMP is provided, the build substitutes missing parts by parts of different color, alternates, molds, and prints. If no MODE is provided, no missing parts will be replaced. Exports the result to the given directory DIR_NAME.
18+
* *pause*: `pause(INT)` - Pauses the script for the given time INT in seconds. Sometimes it's neccessary to pause the script between API requests to avoid a "429 Too many requests" error message from the rebrickable.com server.
1919

2020
## Expressions
2121

go.mod

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
module github.com/wendehals/bricks
22

3-
go 1.19
3+
go 1.25.3
44

55
require (
6-
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20220911224424-aa1f1f12a846
7-
github.com/google/go-cmp v0.5.9
8-
github.com/spf13/cobra v1.6.1
9-
golang.org/x/exp v0.0.0-20221114191408-850992195362
6+
github.com/antlr4-go/antlr/v4 v4.13.1
7+
github.com/google/go-cmp v0.7.0
8+
github.com/spf13/cobra v1.10.1
9+
golang.org/x/exp v0.0.0-20251023183803-a4bb9ffd2546
1010
)
1111

1212
require (
13-
github.com/inconshreveable/mousetrap v1.0.1 // indirect
14-
github.com/spf13/pflag v1.0.5 // indirect
13+
github.com/inconshreveable/mousetrap v1.1.0 // indirect
14+
github.com/spf13/pflag v1.0.10 // indirect
1515
)

go.sum

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1-
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20220911224424-aa1f1f12a846 h1:et5J11AOyUn9qwkIAF9kcxTxjTO8Z9oSmlOqH7MVSPo=
2-
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20220911224424-aa1f1f12a846/go.mod h1:pSwJ0fSY5KhvocuWSx4fz3BA8OrA1bQn+K1Eli3BRwM=
3-
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
4-
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
5-
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
6-
github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc=
7-
github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
1+
github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ=
2+
github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw=
3+
github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
4+
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
5+
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
6+
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
7+
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
88
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
9-
github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA=
10-
github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY=
11-
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
12-
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
13-
golang.org/x/exp v0.0.0-20221114191408-850992195362 h1:NoHlPRbyl1VFI6FjwHtPQCN7wAMXI6cKcqrmXhOOfBQ=
14-
golang.org/x/exp v0.0.0-20221114191408-850992195362/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc=
9+
github.com/spf13/cobra v1.10.1 h1:lJeBwCfmrnXthfAupyUTzJ/J4Nc1RsHC/mSRU2dll/s=
10+
github.com/spf13/cobra v1.10.1/go.mod h1:7SmJGaTHFVBY0jW4NXGluQoLvhqFQM+6XSKD+P4XaB0=
11+
github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
12+
github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk=
13+
github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
14+
golang.org/x/exp v0.0.0-20251023183803-a4bb9ffd2546 h1:mgKeJMpvi0yx/sU5GsxQ7p6s2wtOnGAHZWCHUM4KGzY=
15+
golang.org/x/exp v0.0.0-20251023183803-a4bb9ffd2546/go.mod h1:j/pmGrbnkbPtQfxEe5D0VQhZC6qKbfKifgD0oM7sR70=
1516
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
1617
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

scripting/BricksScript.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"net/http"
66
"time"
77

8-
"github.com/antlr/antlr4/runtime/Go/antlr/v4"
8+
"github.com/antlr4-go/antlr/v4"
99
"github.com/wendehals/bricks/api"
1010
"github.com/wendehals/bricks/scripting/parser"
1111
)

scripting/parser/bricks_base_listener.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripting/parser/bricks_lexer.go

Lines changed: 24 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripting/parser/bricks_listener.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)