Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gboml
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
smart_grids
public
gboml
Commits
af6ee382
Commit
af6ee382
authored
9 months ago
by
Derval Guillaume
Browse files
Options
Downloads
Patches
Plain Diff
EqLoop -> LikeLoop
parent
8c495ccf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/gboml/ast/__init__.py
+1
-1
1 addition, 1 deletion
src/gboml/ast/__init__.py
src/gboml/ast/loops.py
+1
-1
1 addition, 1 deletion
src/gboml/ast/loops.py
src/gboml/gboml.lark
+2
-2
2 additions, 2 deletions
src/gboml/gboml.lark
src/gboml/parsing.py
+1
-1
1 addition, 1 deletion
src/gboml/parsing.py
with
5 additions
and
5 deletions
src/gboml/ast/__init__.py
+
1
−
1
View file @
af6ee382
__all__
=
[
"
Meta
"
,
"
GBOMLObject
"
,
"
VarScope
"
,
"
VarType
"
,
"
SOSType
"
,
"
ObjType
"
,
"
Operator
"
,
"
ExpressionObj
"
,
"
Expression
"
,
"
BoolExpression
"
,
"
VarOrParamLeaf
"
,
"
VarOrParam
"
,
"
Array
"
,
"
Loop
"
,
"
BaseLoop
"
,
"
Eq
Loop
"
,
"
Function
"
,
"
BoolExpressionOp
"
,
"
VarOrParam
"
,
"
Array
"
,
"
Loop
"
,
"
BaseLoop
"
,
"
Like
Loop
"
,
"
Function
"
,
"
BoolExpressionOp
"
,
"
BoolExpressionComparison
"
,
"
ScopeChange
"
,
"
ImportFile
"
,
"
Definition
"
,
"
Constraint
"
,
"
StdConstraint
"
,
"
SOSConstraint
"
,
"
Objective
"
,
"
VariableDefinition
"
,
"
Node
"
,
"
HyperEdge
"
,
"
NodeDefinition
"
,
"
HyperEdgeDefinition
"
,
...
...
This diff is collapsed.
Click to expand it.
src/gboml/ast/loops.py
+
1
−
1
View file @
af6ee382
...
...
@@ -22,7 +22,7 @@ class BaseLoop(Loop):
@dataclass
class
Eq
Loop
(
Loop
):
class
Like
Loop
(
Loop
):
varid
:
str
on
:
VarOrParam
condition
:
Optional
[
BoolExpression
]
...
...
This diff is collapsed.
Click to expand it.
src/gboml/gboml.lark
+
2
−
2
View file @
af6ee382
...
...
@@ -83,9 +83,9 @@ OBJ_TYPE: "min" | "max"
// LOOPS
?loop: multi_loop | implicit_loop
?multi_loop: (base_loop | e
q
_loop)+
?multi_loop: (base_loop |
lik
e_loop)+
base_loop: "for" ID "in" iterable ["where" bool_expression]
e
q
_loop: "for" ID "
=
" var_or_param ["where" bool_expression]
lik
e_loop: "for" ID "
like
" var_or_param ["where" bool_expression]
//var_or_param must point to an indexing param
implicit_loop: "where" bool_expression
// BOOLEAN EXPRESSIONS
...
...
This diff is collapsed.
Click to expand it.
src/gboml/parsing.py
+
1
−
1
View file @
af6ee382
...
...
@@ -92,7 +92,7 @@ class GBOMLParser:
"
constraint_sos
"
:
SOSConstraint
,
"
objective
"
:
Objective
,
"
base_loop
"
:
BaseLoop
,
"
e
q
_loop
"
:
Eq
Loop
,
"
lik
e_loop
"
:
Like
Loop
,
"
implicit_loop
"
:
ImplicitLoop
,
"
subtraction
"
:
_op_transform
(
Operator
.
minus
),
"
sum
"
:
_op_transform
(
Operator
.
plus
),
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment