-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make parser properly handle multiline inputs
This commits makes the parser properly handle multiline inputs as well as empty lines. Though, the parser still assumes that instructions are not multiline — which seems to be reasonable. This commit is prerequisite to parse stream of tokens.
- Loading branch information
Showing
5 changed files
with
75 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
array [1..2] of int: X_INTRODUCED_2_ = [250,200]; | ||
array [1..2] of int: X_INTRODUCED_6_ = [75,150]; | ||
array [1..2] of int: X_INTRODUCED_8_ = [100,150]; | ||
var 0..3: b:: output_var; | ||
var 0..6: c:: output_var; | ||
var 0..85000: X_INTRODUCED_0_:: is_defined_var; | ||
constraint int_lin_le(X_INTRODUCED_2_,[b,c],4000); | ||
constraint int_lin_le(X_INTRODUCED_6_,[b,c],2000); | ||
constraint int_lin_le(X_INTRODUCED_8_,[b,c],500); | ||
constraint int_lin_eq([400,450,-1],[b,c,X_INTRODUCED_0_],0):: ctx_pos:: defines_var(X_INTRODUCED_0_); | ||
solve maximize X_INTRODUCED_0_; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
array [1..2] of int: X_INTRODUCED_2_ = [250,200];array [1..2] of int: X_INTRODUCED_6_ = [75,150];array [1..2] of int: X_INTRODUCED_8_ = [100,150];var 0..3: b:: output_var;var 0..6: c:: output_var;var 0..85000: X_INTRODUCED_0_:: is_defined_var;constraint int_lin_le(X_INTRODUCED_2_,[b,c],4000);constraint int_lin_le(X_INTRODUCED_6_,[b,c],2000);constraint int_lin_le(X_INTRODUCED_8_,[b,c],500);constraint int_lin_eq([400,450,-1],[b,c,X_INTRODUCED_0_],0):: ctx_pos:: defines_var(X_INTRODUCED_0_);solve maximize X_INTRODUCED_0_; |