-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correct the generated bison parser for Bytes (#2620)
* Don't enquote Bytes tokens in bison parser * Add test Co-authored-by: rv-jenkins <[email protected]>
- Loading branch information
1 parent
93ff45a
commit 3158228
Showing
6 changed files
with
29 additions
and
2 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
k-distribution/tests/regression-new/kast-bison-bytes/.gitignore
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 @@ | ||
bison_parser |
1 change: 1 addition & 0 deletions
1
k-distribution/tests/regression-new/kast-bison-bytes/1.kast-bison
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 @@ | ||
b"\x00\x0f" |
1 change: 1 addition & 0 deletions
1
k-distribution/tests/regression-new/kast-bison-bytes/1.kast-bison.out
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 @@ | ||
inj{SortBytes{}, SortPgm{}}(\dv{SortBytes{}}("\x00\x0f")) |
8 changes: 8 additions & 0 deletions
8
k-distribution/tests/regression-new/kast-bison-bytes/Makefile
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,8 @@ | ||
DEF=kast-in | ||
EXT=kast-in | ||
TESTDIR=. | ||
KOMPILE_BACKEND=llvm | ||
KAST_FLAGS=--gen-parser | ||
CHECK=| diff - | ||
|
||
include ../../../include/kframework/ktest.mak |
12 changes: 12 additions & 0 deletions
12
k-distribution/tests/regression-new/kast-bison-bytes/kast-in.k
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,12 @@ | ||
// Copyright (c) 2019 K Team. All Rights Reserved. | ||
|
||
module KAST-IN-SYNTAX | ||
imports BYTES-SYNTAX | ||
|
||
syntax Pgm ::= Bytes | ||
endmodule | ||
|
||
module KAST-IN | ||
imports KAST-IN-SYNTAX | ||
configuration <k> $PGM:Pgm </k> | ||
endmodule |
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