Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
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
pub
frama-c
Commits
a1b33d59
Commit
a1b33d59
authored
1 year ago
by
Thibault Martin
Committed by
Allan Blanchard
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Add regexp variable for identifiers
parent
c46c5a73
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/kernel_internals/parsing/logic_lexer.mll
+4
-3
4 additions, 3 deletions
src/kernel_internals/parsing/logic_lexer.mll
with
4 additions
and
3 deletions
src/kernel_internals/parsing/logic_lexer.mll
+
4
−
3
View file @
a1b33d59
...
@@ -350,6 +350,7 @@ let rP = ['P''p']['+''-']? rD+
...
@@ -350,6 +350,7 @@ let rP = ['P''p']['+''-']? rD+
let
rFS
=
(
'
f'
|
'
F'
|
'
l'
|
'
L'
|
'
d'
|
'
D'
)
let
rFS
=
(
'
f'
|
'
F'
|
'
l'
|
'
L'
|
'
d'
|
'
D'
)
let
rIS
=
(
'
u'
|
'
U'
|
'
l'
|
'
L'
)
*
let
rIS
=
(
'
u'
|
'
U'
|
'
l'
|
'
L'
)
*
let
comment_line
=
"//"
[
^
'\n'
]
*
let
comment_line
=
"//"
[
^
'\n'
]
*
let
rIdentifier
=
rL
(
rL
|
rD
)
*
(* Do not forget to update also the corresponding chr rule if you add
(* Do not forget to update also the corresponding chr rule if you add
a supported escape sequence here. *)
a supported escape sequence here. *)
...
@@ -372,14 +373,14 @@ rule token = parse
...
@@ -372,14 +373,14 @@ rule token = parse
then comment lexbuf
then comment lexbuf
else lex_error lexbuf "
unexpected
block
-
comment
opening
"
else lex_error lexbuf "
unexpected
block
-
comment
opening
"
}
}
| '
\\
' (
(rL (rL | rD)*)
as plugin) "
::
" (
(rL (rL | rD)*)
as name) {
| '
\\
' (
rIdentifier
as plugin) "
::
" (
rIdentifier
as name) {
let loc = Lexing.(lexeme_start_p lexbuf, lexeme_end_p lexbuf) in
let loc = Lexing.(lexeme_start_p lexbuf, lexeme_end_p lexbuf) in
let cabsloc = Cil_datatype.Location.of_lexing_loc loc in
let cabsloc = Cil_datatype.Location.of_lexing_loc loc in
let tok = identifier name cabsloc in
let tok = identifier name cabsloc in
check_ext_plugin (fst cabsloc) plugin tok
check_ext_plugin (fst cabsloc) plugin tok
}
}
| '
\\
' r
L (rL | rD)*
{ bs_identifier lexbuf }
| '
\\
' r
Identifier
{ bs_identifier lexbuf }
| r
L (rL | rD)*
{
| r
Identifier
{
let loc = Lexing.(lexeme_start_p lexbuf, lexeme_end_p lexbuf) in
let loc = Lexing.(lexeme_start_p lexbuf, lexeme_end_p lexbuf) in
let cabsloc = Cil_datatype.Location.of_lexing_loc loc in
let cabsloc = Cil_datatype.Location.of_lexing_loc loc in
let s = lexeme lexbuf in
let s = lexeme lexbuf in
...
...
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