Skip to content

Commit

Permalink
fastmodel: only support single line literal when paring project file
Browse files Browse the repository at this point in the history
In python3.11, it requires the global specifier should be the first
token of regex. However it's not possible when using ply library. In
fastmodel case, we actually don't need to support multiline string
literal. We fix this issue by just making the string literal single
line.

Ref: dabeaz/ply#282

Change-Id: I746b628db7ad4c1d7834f1a1b2c1243cef68aa01
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/71018
Tested-by: kokoro <[email protected]>
Maintainer: Bobby Bruce <[email protected]>
Reviewed-by: Bobby Bruce <[email protected]>
  • Loading branch information
wmin0 authored and BobbyRBruce committed Jul 19, 2023
1 parent a31d341 commit c23b157
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/arch/arm/fastmodel/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,9 @@ class ProjectFileParser(Grammar):
t_ID = r'[A-Za-z_]\w*'

def t_STRLIT(self, t):
r'(?m)"([^"])*"'
r'"([^"])*"'
# strip off quotes
t.value = t.value[1:-1]
t.lexer.lineno += t.value.count('\n')
return t

t_EQUALS = r'='
Expand Down

0 comments on commit c23b157

Please sign in to comment.