Commit 3c49520a authored by yoogx's avatar yoogx

* When scanning for an identifier, ensure we are still in the

          boundaries of the buffer

          Fix for issue #47
parent e656306b
......@@ -379,8 +379,9 @@ package body Ocarina.FE_AADL.Lexer is
Display_Name_Buffer (Display_Name_Len) := Buffer (Token_Location.Scan);
Token_Location.Scan := Token_Location.Scan + 1;
while Is_Identifier_Character (Buffer (Token_Location.Scan)) loop
while Token_Location.Scan <= Token_Location.EOF
and then Is_Identifier_Character (Buffer (Token_Location.Scan))
loop
Add_Char_To_Name_Buffer (To_Lower (Buffer (Token_Location.Scan)));
Display_Name_Len := Display_Name_Len + 1;
......
......@@ -289,5 +289,6 @@ tests/github/issue_22/p.aadl
tests/github/issue_35/test.aadl
tests/github/issue_36/test.aadl
tests/github/issue_39/pb1.aadl
tests/github/issue_47/test.aadl
tests/root_system/test.aadl
package test
public
system s end s;
end test
\ No newline at end of file
test.aadl:6:09: parsing Package_Specification, token ';' is expected, found [EOF]
Cannot parse AADL specifications
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment