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
bdbabbab
Commit
bdbabbab
authored
6 months ago
by
Virgile Prevosto
Browse files
Options
Downloads
Patches
Plain Diff
[acsl] only consider extension keywords when in extended mode in the lexer
parent
3d0d4411
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
+6
-8
6 additions, 8 deletions
src/kernel_internals/parsing/logic_lexer.mll
with
6 additions
and
8 deletions
src/kernel_internals/parsing/logic_lexer.mll
+
6
−
8
View file @
bdbabbab
...
@@ -106,6 +106,7 @@
...
@@ -106,6 +106,7 @@
let
identifier
,
is_acsl_keyword
=
let
identifier
,
is_acsl_keyword
=
let
all_kw
=
Hashtbl
.
create
37
in
let
all_kw
=
Hashtbl
.
create
37
in
let
type_kw
=
Hashtbl
.
create
3
in
let
type_kw
=
Hashtbl
.
create
3
in
let
ext_acsl_kw
kw
s
_
=
if
!
ext_acsl_spec
then
kw
else
IDENTIFIER
s
in
List
.
iter
List
.
iter
(
fun
(
i
,
t
)
->
Hashtbl
.
add
all_kw
i
t
;)
(
fun
(
i
,
t
)
->
Hashtbl
.
add
all_kw
i
t
;)
[
[
...
@@ -114,10 +115,7 @@
...
@@ -114,10 +115,7 @@
"assert"
,
(
fun
_
->
ASSERT
);
"assert"
,
(
fun
_
->
ASSERT
);
"assigns"
,
(
fun
_
->
ASSIGNS
);
"assigns"
,
(
fun
_
->
ASSIGNS
);
"assumes"
,
(
fun
_
->
ASSUMES
);
"assumes"
,
(
fun
_
->
ASSUMES
);
"at"
,
"at"
,
ext_acsl_kw
EXT_SPEC_AT
"at"
;
(
fun
_
->
if
!
ext_acsl_spec
then
EXT_SPEC_AT
else
IDENTIFIER
"at"
);
"axiom"
,
(
fun
_
->
AXIOM
);
"axiom"
,
(
fun
_
->
AXIOM
);
"axiomatic"
,
(
fun
_
->
AXIOMATIC
);
"axiomatic"
,
(
fun
_
->
AXIOMATIC
);
"behavior"
,
(
fun
_
->
BEHAVIOR
);
"behavior"
,
(
fun
_
->
BEHAVIOR
);
...
@@ -130,7 +128,7 @@
...
@@ -130,7 +128,7 @@
"complete"
,
(
fun
_
->
COMPLETE
);
"complete"
,
(
fun
_
->
COMPLETE
);
"const"
,
(
fun
_
->
CONST
);
"const"
,
(
fun
_
->
CONST
);
"continues"
,
(
fun
_
->
CONTINUES
);
"continues"
,
(
fun
_
->
CONTINUES
);
"contract"
,
(
fun
_
->
EXT_SPEC_CONTRACT
)
;
"contract"
,
ext_acsl_kw
EXT_SPEC_CONTRACT
"contract"
;
"decreases"
,
(
fun
_
->
DECREASES
);
"decreases"
,
(
fun
_
->
DECREASES
);
"disjoint"
,
(
fun
_
->
DISJOINT
);
"disjoint"
,
(
fun
_
->
DISJOINT
);
"double"
,
(
fun
_
->
DOUBLE
);
"double"
,
(
fun
_
->
DOUBLE
);
...
@@ -139,19 +137,19 @@
...
@@ -139,19 +137,19 @@
"enum"
,
(
fun
_
->
ENUM
);
"enum"
,
(
fun
_
->
ENUM
);
"exits"
,
(
fun
_
->
EXITS
);
"exits"
,
(
fun
_
->
EXITS
);
"frees"
,
(
fun
_
->
FREES
);
"frees"
,
(
fun
_
->
FREES
);
"function"
,
(
fun
_
->
EXT_SPEC_FUNCTION
)
;
"function"
,
ext_acsl_kw
EXT_SPEC_FUNCTION
"function"
;
"float"
,
(
fun
_
->
FLOAT
);
"float"
,
(
fun
_
->
FLOAT
);
"for"
,
(
fun
_
->
FOR
);
"for"
,
(
fun
_
->
FOR
);
"global"
,
(
fun
_
->
GLOBAL
);
"global"
,
(
fun
_
->
GLOBAL
);
"if"
,
(
fun
_
->
IF
);
"if"
,
(
fun
_
->
IF
);
"import"
,
(
fun
_
->
IMPORT
);
"import"
,
(
fun
_
->
IMPORT
);
"inductive"
,
(
fun
_
->
INDUCTIVE
);
"inductive"
,
(
fun
_
->
INDUCTIVE
);
"include"
,
(
fun
_
->
EXT_SPEC_INCLUDE
)
;
"include"
,
ext_acsl_kw
EXT_SPEC_INCLUDE
"include"
;
"int"
,
(
fun
_
->
INT
);
"int"
,
(
fun
_
->
INT
);
"invariant"
,
(
fun
_
->
INVARIANT
);
"invariant"
,
(
fun
_
->
INVARIANT
);
"label"
,
(
fun
_
->
LABEL
);
"label"
,
(
fun
_
->
LABEL
);
"lemma"
,
(
fun
_
->
LEMMA
);
"lemma"
,
(
fun
_
->
LEMMA
);
"let"
,
(
fun
_
->
EXT_SPEC_LET
)
;
"let"
,
ext_acsl_kw
EXT_SPEC_LET
"let"
;
(* ACSL extension for external spec file *)
(* ACSL extension for external spec file *)
"logic"
,
(
fun
_
->
LOGIC
);
"logic"
,
(
fun
_
->
LOGIC
);
"long"
,
(
fun
_
->
LONG
);
"long"
,
(
fun
_
->
LONG
);
...
...
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