Skip to content

Commit

Permalink
Fix some calls to substring in compiler
Browse files Browse the repository at this point in the history
They were not using the right length. Now just using extract instead.
  • Loading branch information
xrchz committed Oct 18, 2017
1 parent 145a539 commit 13caecc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/compilerScript.sml
Expand Up @@ -86,7 +86,7 @@ val find_parse_def = Define`
(find_parse flag [] = NONE) ∧
(find_parse flag (x::xs) =
if isPrefix flag x then
parse_num (substring x (strlen flag) (strlen x))
parse_num (extract x (strlen flag) NONE)
else find_parse flag xs)`

val comma_tokens_def = Define `
Expand All @@ -112,7 +112,7 @@ val find_parse_nums_def = Define`
(find_parse_nums flag [] = NONE) ∧
(find_parse_nums flag (x::xs) =
if isPrefix flag x then
parse_nums (substring x (strlen flag) (strlen x))
parse_nums (extract x (strlen flag) NONE)
else find_parse_nums flag xs)`

(* parses a list of strings to configurations and modifies the configuration *)
Expand Down

0 comments on commit 13caecc

Please sign in to comment.