Commit 76ebae7f authored by Colin Eles's avatar Colin Eles
Browse files

example model

git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/trunk/TableTool@6560 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
parent c5509d2a
Loading
Loading
Loading
Loading
+16 −2
Original line number Diff line number Diff line
@@ -2,19 +2,33 @@ function [ cvc_type ] = pvs_to_cvc_subtypes( pvs_type )
%PVS_TO_CVC_SUBTYPES Summary of this function goes here
%   Detailed explanation goes here




%pvs_type is parsed
string = char(pvs_type);

% change cases
string = regexprep(string,'real','REAL');
string = regexprep(string,'Real','REAL');
string = regexprep(string,'int','INT');
string = regexprep(string,'Int','INT');
string = regexprep(string,'bool','BOOLEAN');
string = regexprep(string,'Bool','BOOLEAN');
string = regexprep(string,'BOOL[^EAN]','BOOLEAN');

% remove brackets
string_no_brack = regexp(string,'(?<=\{)[^\n]*(?=\})','match');
if isempty(string_no_brack)
    cvc_type = pvs_type;
    
    cvc_type = {string};
    return
end

split_at_pipe = regexp(char(string_no_brack),'\|','split');
if (size(split_at_pipe,2) ~= 2)
    %something strange happened
    cvc_type = pvs_type;
    cvc_type = {string};
    return;
end

+7 −0
Original line number Diff line number Diff line
@@ -17,6 +17,13 @@ end
if((strcmp(event.Character,'r')) && (strcmp(char(event.Modifier),'command') || strcmp(char(event.Modifier),'control')))
    return
end

if strcmp(event.Key,'tab')
    event.Character = '';
    return;
end


if(~isempty(unicode2native(event.Character)))
    % make sure the character is a printable character
    if event.Character > 33 || event.Character == 8