Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Frama-C Website
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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 Website
Commits
5793de43
Commit
5793de43
authored
4 years ago
by
Augustin Lemesle
Browse files
Options
Downloads
Plain Diff
Merge branch 'changelog/generator' of git.frama-c.com:pub/pub.frama-c.com into changelog/generator
parents
422abc00
69068faf
No related branches found
No related tags found
1 merge request
!66
Changelog generator now takes in account WP and E-ACSL
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
generator/generate
+0
-0
0 additions, 0 deletions
generator/generate
generator/lexer.mll
+9
-4
9 additions, 4 deletions
generator/lexer.mll
with
9 additions
and
4 deletions
generator/generate
+
0
−
0
View file @
5793de43
No preview for this file type
This diff is collapsed.
Click to expand it.
generator/lexer.mll
+
9
−
4
View file @
5793de43
...
@@ -254,13 +254,18 @@ and text e = parse
...
@@ -254,13 +254,18 @@ and text e = parse
{ major; minor; patch }
{ major; minor; patch }
(* compares both old-style (YYYYMMDD) and new-style numbering (MAJOR.MINOR)
(* compares both old-style (YYYYMMDD) and new-style numbering (MAJOR.MINOR)
note: codenames are only used in case of equality
note: codenames are only used
for old versions or
in case of equality
*)
*)
let compare_version v1 v2 cn1 cn2 =
let compare_version v1 v2 cn1 cn2 =
let re_old_numbering = Str.regexp "
[
0
-
9
][
0
-
9
][
0
-
9
][
0
-
9
][
0
-
9
][
0
-
9
][
0
-
9
][
0
-
9
]
.*
" in
let re_old_numbering = Str.regexp "
.*
\\
(
[
0
-
9
][
0
-
9
][
0
-
9
][
0
-
9
][
0
-
9
][
0
-
9
][
0
-
9
][
0
-
9
]
\\
)
" in
let is_old_numbering v = Str.string_match re_old_numbering v 0 in
let is_old_numbering v = Str.string_match re_old_numbering v 0 in
match is_old_numbering v1, is_old_numbering v2 with
let get_old_version v =
| true, true -> String.compare v2 v1
let v = String.map (fun c -> if c = '_' then '-' else c) v in
assert(Str.string_match re_old_numbering v 0) ;
Str.matched_group 1 v
in
match is_old_numbering cn1, is_old_numbering cn2 with
| true, true -> String.compare (get_old_version cn2) (get_old_version cn1)
| false, true -> (* new numbering is always newer *) -1
| false, true -> (* new numbering is always newer *) -1
| true, false -> (* old numbering is always older *) 1
| true, false -> (* old numbering is always older *) 1
| false, false -> (* compare new-style versions *)
| false, false -> (* compare new-style versions *)
...
...
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