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
365e23f6
Commit
365e23f6
authored
5 years ago
by
Loïc Correnson
Browse files
Options
Downloads
Patches
Plain Diff
[kernel] complete localizable
parent
f064c84d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/kernel_services/ast_printing/printer_tag.ml
+36
-4
36 additions, 4 deletions
src/kernel_services/ast_printing/printer_tag.ml
with
36 additions
and
4 deletions
src/kernel_services/ast_printing/printer_tag.ml
+
36
−
4
View file @
365e23f6
...
...
@@ -69,11 +69,12 @@ module Localizable =
|
PStmt
(
_
,
ki1
)
,
PStmt
(
_
,
ki2
)
->
ki1
.
sid
=
ki2
.
sid
|
PStmtStart
(
_
,
ki1
)
,
PStmtStart
(
_
,
ki2
)
->
ki1
.
sid
=
ki2
.
sid
|
PLval
(
_
,
ki1
,
lv1
)
,
PLval
(
_
,
ki2
,
lv2
)
->
Kinstr
.
equal
ki1
ki2
&&
lv1
==
lv2
Kinstr
.
equal
ki1
ki2
&&
Lval
.
equal
lv1
lv2
|
PTermLval
(
_
,
ki1
,
pi1
,
lv1
)
,
PTermLval
(
_
,
ki2
,
pi2
,
lv2
)
->
Kinstr
.
equal
ki1
ki2
&&
Property
.
equal
pi1
pi2
&&
Logic_utils
.
is_same_tlval
lv1
lv2
(* [JS 2008/01/21] term_lval are not shared: cannot use == *)
Kinstr
.
equal
ki1
ki2
&&
Property
.
equal
pi1
pi2
&&
Term_lval
.
equal
lv1
lv2
|
PVDecl
(
_
,_,
v1
)
,
PVDecl
(
_
,_,
v2
)
->
Varinfo
.
equal
v1
v2
|
PExp
(
_
,_,
e1
)
,
PExp
(
_
,_,
e2
)
->
Exp
.
equal
e1
e2
|
PIP
ip1
,
PIP
ip2
->
Property
.
equal
ip1
ip2
...
...
@@ -82,6 +83,37 @@ module Localizable =
|
PIP
_
|
PGlobal
_
)
,
_
->
false
let
compare
l1
l2
=
match
l1
,
l2
with
|
PStmt
(
_
,
s1
)
,
PStmt
(
_
,
s2
)
->
Stmt
.
compare
s1
s2
|
PStmt
_
,
_
->
(
-
1
)
|
_
,
PStmt
_
->
1
|
PStmtStart
(
_
,
s1
)
,
PStmtStart
(
_
,
s2
)
->
Stmt
.
compare
s1
s2
|
PStmtStart
_
,
_
->
(
-
1
)
|
_
,
PStmtStart
_
->
1
|
PLval
(
_
,
k1
,
lv1
)
,
PLval
(
_
,
k2
,
lv2
)
->
let
cmp
=
Kinstr
.
compare
k1
k2
in
if
cmp
<>
0
then
cmp
else
Lval
.
compare
lv1
lv2
|
PLval
_
,
_
->
(
-
1
)
|
_
,
PLval
_
->
1
|
PTermLval
(
_
,
k1
,
p1
,
lv1
)
,
PTermLval
(
_
,
k2
,
p2
,
lv2
)
->
let
cmp
=
Kinstr
.
compare
k1
k2
in
if
cmp
<>
0
then
cmp
else
let
cmp
=
Property
.
compare
p1
p2
in
if
cmp
<>
0
then
cmp
else
Term_lval
.
compare
lv1
lv2
|
PTermLval
_
,
_
->
(
-
1
)
|
_
,
PTermLval
_
->
1
|
PVDecl
(
_
,_,
v1
)
,
PVDecl
(
_
,_,
v2
)
->
Varinfo
.
compare
v1
v2
|
PVDecl
_
,
_
->
(
-
1
)
|
_
,
PVDecl
_
->
1
|
PExp
(
_
,_,
e1
)
,
PExp
(
_
,_,
e2
)
->
Exp
.
compare
e1
e2
|
PExp
_
,
_
->
(
-
1
)
|
_
,
PExp
_
->
1
|
PIP
p1
,
PIP
p2
->
Property
.
compare
p1
p2
|
PIP
_
,
_
->
(
-
1
)
|
_
,
PIP
_
->
1
|
PGlobal
g1
,
PGlobal
g2
->
Global
.
compare
g1
g2
let
pp_ki_loc
fmt
ki
=
match
ki
with
|
Kglobal
->
(* no location, print 'global' *)
...
...
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