diff options
| author | Tristan Gingold <tgingold@free.fr> | 2018-11-14 18:24:07 +0100 | 
|---|---|---|
| committer | Tristan Gingold <tgingold@free.fr> | 2018-11-14 18:24:07 +0100 | 
| commit | 42765ddc6dcd3461a15e1c20e623edad81f2915b (patch) | |
| tree | 92e52b065836bdd3f9db39958613f080aac53839 /src/vhdl | |
| parent | 75680ebfba391d0c4abea7b9d559409a2b59d3f2 (diff) | |
| download | ghdl-42765ddc6dcd3461a15e1c20e623edad81f2915b.tar.gz ghdl-42765ddc6dcd3461a15e1c20e623edad81f2915b.tar.bz2 ghdl-42765ddc6dcd3461a15e1c20e623edad81f2915b.zip | |
scanner: detect EOF in strings
Diffstat (limited to 'src/vhdl')
| -rw-r--r-- | src/vhdl/scanner.adb | 7 | 
1 files changed, 7 insertions, 0 deletions
| diff --git a/src/vhdl/scanner.adb b/src/vhdl/scanner.adb index f91357922..8a8150b89 100644 --- a/src/vhdl/scanner.adb +++ b/src/vhdl/scanner.adb @@ -453,6 +453,13 @@ package body Scanner is                 Error_Msg_Scan ("format effector not allowed in a string");                 exit;              when Invalid => +               if C = Files_Map.EOT +                 and then Pos >= Current_Context.File_Len +               then +                  Error_Msg_Scan ("string not terminated at end of file"); +                  exit; +               end if; +                 Error_Msg_Scan                   ("invalid character not allowed, even in a string");              when Graphic_Character => | 
