diff options
author | Tristan Gingold | 2013-12-31 19:01:48 +0100 |
---|---|---|
committer | Tristan Gingold | 2013-12-31 19:01:48 +0100 |
commit | 5f41fdc72fccd7169dc812c8690e82222ae1aca1 (patch) | |
tree | 2e2cddb257b071ec30b79c0672e2320f5421468d /scan.adb | |
parent | 2fe0a5359e1bdf6dfdab20bea121db8f4e54ffe9 (diff) | |
download | ghdl-5f41fdc72fccd7169dc812c8690e82222ae1aca1.tar.gz ghdl-5f41fdc72fccd7169dc812c8690e82222ae1aca1.tar.bz2 ghdl-5f41fdc72fccd7169dc812c8690e82222ae1aca1.zip |
Fix bug21274.
WIP for VHDL08.
Diffstat (limited to 'scan.adb')
-rw-r--r-- | scan.adb | 39 |
1 files changed, 38 insertions, 1 deletions
@@ -1393,7 +1393,44 @@ package body Scan is Pos := Pos + 1; Current_Token := Tok_Not; return; - when '$' | '?' | '`' + when '?' => + if Vhdl_Std < Vhdl_08 then + Error_Msg_Scan ("'?' can only be used in strings or comments"); + Pos := Pos + 1; + goto Again; + else + if Source (Pos + 1) = '<' then + if Source (Pos + 2) = '=' then + Current_Token := Tok_Match_Less_Equal; + Pos := Pos + 3; + else + Current_Token := Tok_Match_Less; + Pos := Pos + 2; + end if; + elsif Source (Pos + 1) = '>' then + if Source (Pos + 2) = '=' then + Current_Token := Tok_Match_Greater_Equal; + Pos := Pos + 3; + else + Current_Token := Tok_Match_Greater; + Pos := Pos + 2; + end if; + elsif Source (Pos + 1) = '=' then + Current_Token := Tok_Match_Equal; + Pos := Pos + 2; + elsif Source (Pos + 1) = '/' + and then Source (Pos + 2) = '=' + then + Current_Token := Tok_Match_Not_Equal; + Pos := Pos + 3; + else + Error_Msg_Scan ("unknown matching operator"); + Pos := Pos + 1; + goto Again; + end if; + end if; + return; + when '$' | '`' | Inverted_Exclamation .. Inverted_Question | Multiplication_Sign | Division_Sign => Error_Msg_Scan ("character """ & Source (Pos) |