Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- optCounter := 0;
- opdCounter := 0;
- i := 0;
- while (i < len) do
- begin
- if ((code[i] >= 'a') and (code[i] <= 'z')) or ((code[i] >= 'A') and (code[i] <= 'Z')) then
- begin
- word := '';
- while ((code[i] >= 'a') and (code[i] <= 'z')) or ((code[i] >= 'A') and (code[i] <= 'Z')) or ((code[i] >= '0') and (code[i] <= '9')) or (code[i] = '_') do
- begin
- word := word + code[i];
- Inc(i);
- end;
- if (code[i] = '(') then
- begin
- word := word + '(' + ')';
- operators[optCounter] := word;
- Inc(optCounter);
- end;
- end;
- Inc(i);
- end;
- //--- Литералы ---
- word := '';
- if (code[i] >= '0') and (code[i] <= '9') then
- begin
- while (code[i] >= '0') and (code[i] <= '9') do
- begin
- word := word + code[i];
- end;
- if code[i] = '.' then
- begin
- word := word + code[i];
- Inc(i);
- while (code[i] >= '0') and (code[i] <= '9') do
- begin
- word := word + code[i];
- end;
- if (code[i] = 'f') and (code[i] = 'd') then
- begin
- word := word + code[i];
- Inc(i);
- end;
- end
- else if code[i] = 'L' then
- begin
- word := word + code[i];
- Inc(i);
- end;
- Operands[opdCounter] := word;
- Inc(opdCounter);
- end;
- word := '';
- if code[i] = '"' then
- begin
- word := word + code[i];
- Inc(i);
- while code[i] <> '"' do
- begin
- word := word + code[i];
- Inc(i);
- end;
- word := word + code[i];
- Inc(i);
- Operands[opdCounter] := word;
- Inc(opdCounter);
- end;
- word := '';
- if code[i] = '''' then
- begin
- word := word + code[i];
- Inc(i);
- while code[i] <> '''' do
- begin
- word := word + code[i];
- Inc(i);
- end;
- word := word + code[i];
- Inc(i);
- Operands[opdCounter] := word;
- Inc(opdCounter);
- end;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement