1

Topic: TLV a parcer

Kind time of days!
Who can in course where to take a ready parcer, it is desirable on Delphi, that  ASN.1 the message. It is possible, the is finite also to make, but what for to invent a bicycle when for a long time already all is made. Like in Indy the parcer is?  did not find anything approaching. Google shows everyone, but not that it is necessary...

2

Re: TLV a parcer

Galadriel75;
TLV a heap of types. Each clever man does not adhere to something from the standard. At me the, and each time when it was necessary, was necessary to enter "magic" parameters that both old not to spoil, and new that worked.

3

Re: TLV a parcer

YuRock wrote:

Galadriel75;
TLV a heap of types. Each clever man does not adhere to something from the standard. At me the, and each time when it was necessary, was necessary to enter "magic" parameters that both old not to spoil, and new that worked.

I will accept such type: a tag, length, value.

4

Re: TLV a parcer

Galadriel75 wrote:

it is passed...
I will accept such type: a tag, length, value.

ber-tlv

5

Re: TLV a parcer

Galadriel75 wrote:

I will accept such type: a tag, length, value.

It is clear))
And composite tags - under the standard or "in mind"? It is added .  or not? Etc.

6

Re: TLV a parcer

YuRock wrote:

it is passed...
It is clear))
And composite tags - under the standard or "in mind"? It is added .  or not? Etc.

Yes, all as in the standard!

7

Re: TLV a parcer

Galadriel75 wrote:

Yes, all as in the standard!

So you define;

Galadriel75 wrote:

I will accept such type: a tag, length, value

Or

YuRock wrote:

And composite tags - under the standard... It is added .

smile))
Anyhow, it is implemented for 30 minutes.

8

Re: TLV a parcer

YuRock wrote:

Anyhow, it is implemented for 30 minutes.

In the elementary case even faster:

while not eof (f) do
begin
BlockRead (f, tag, sizeof (tag));
BlockRead (f, length, sizeof (length));
BlockRead (f, buffer, length);
case tag of
......
end;
end;

9

Re: TLV a parcer

Dimitry Sibiryakov wrote:

it is passed...
In the elementary case even faster:

while not eof (f) do
begin
BlockRead (f, tag, sizeof (tag));
BlockRead (f, length, sizeof (length));
BlockRead (f, buffer, length);
case tag of
......
end;
end;

So that yes, is a variant the elementary. But I should make the present parcer that there the tree turned out as other tags are enclosed in other tags on operation... Already, as a matter of fact, I invent a bicycle. Made almost that... Recursively  a data package.
I hope that already and I will finish tomorrow. Thanks all for involvement!

10

Re: TLV a parcer

Everything, it is possible to close a subject! I made a parcer! Also all perfectly works ! Recursively...