-
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.
Merge pull request #28 from zlh20040308/fix-rvdecoderdb
fix fields with format attr1=attr2 not recognized
- Loading branch information
Showing
2 changed files
with
15 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package org.chipsalliance.rvdecoderdb.parser | ||
import org.chipsalliance.rvdecoderdb.parser.ArgLUT | ||
|
||
object SameValue { | ||
def unapply(str: String): Option[ArgLUT] = str match { | ||
case s"${attr1}=${attr2}" => ArgLUT.all.get(attr1) | ||
case _ => None | ||
} | ||
} | ||
|
||
class SameValue(val attr1: String, val attr2: String) extends Token { | ||
override def toString: String = s"$attr1=$attr2" | ||
} |
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