# US 2012/0254231 A1 · Decoder compiler, computer readable medium, and communication device

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2012/0254231 A1
- Document ID: US20120254231A1
- Status: Published application
- Kind: A1
- Application number: 13/235,880
- Filed: 2011-09-19
- Published: 2012-10-04
- Earliest claimed: 2011-03-28
- Assignees: Kabushiki Kaisha Toshiba
- Inventors: Yusuke DOI
- Web page: https://patentgrep.com/patent/US20120254231A1

## CPC

- G06F 40/151: Transformation
- G06F 40/143: Markup, e.g. Standard Generalized Markup Language [SGML] or Document Type Definition [DTD]
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Information that maps a point in XML document structure to a name of a variable and an EXI grammar form that includes grammars each defining relationship among an event representative of an element in the XML document structure, an EXI event code, and a next grammar for use are read. A selecting unit selects grammars in the EXI grammar form such that the grammars are traced in sequence. A determining unit updates a grammar stack which identifies a current position in the XML document structure each time a grammar is selected. If the updated stack does not indicates the point, a function setting unit sets a skip function for skipping a corresponding value in an EXI stream, otherwise, sets a read function for reading and providing the corresponding value to a corresponding variable. A composer generates an EXI decoder including skip and read functions set for individual grammars.

## Claims

### Claim 1

A decoder compiler that generates an EXI (Efficient XML (Extensible Markup Language) Interchange) decoder, the EXI decoder decoding an EXI stream being a sequence of a plurality of EXI event codes and a value, comprising:
a first reading unit configured to read mapping information that maps a point in XML document structure defined by a XML schema to a name of a variable, the XML document structure including a plurality of elements;
a second reading unit configured to read an EXI grammar form including a plurality of grammars each defining relationship among an event representative of the element in the XML document structure, an EXI event code, and a next grammar for use;
a grammar selecting unit configured to sequentially select grammars in the EXI grammar form from a start grammar such that the grammars are traced in sequence;
an update determining unit configured to update a grammar stack which identifies a current position in the XML document structure each time the grammar is selected and determine whether an updated grammar stack indicates the point shown in the mapping information;
a skip function setting unit configured to set a skip function when the updated grammar stack does not indicate the point in the mapping information, the skip function skipping a value in the EXI stream that corresponds to the position indicated by the grammar stack when the skip function is executed;
a read function setting unit configured to set a read function when the updated grammar stack indicates the point in the mapping information, the read function reading a value in the EXI stream that corresponds to the position indicated by the grammar stack and providing the value to a variable mapped to the point when the read function is executed; and
a code composer configured to generate an EXI decoder which includes the skip function and the read function set for the grammars.

### Claim 2 (depends on 1)

The compiler according to claim 1, wherein the variable is an element of a structure.

### Claim 3 (depends on 1)

The compiler according to claim 1, wherein
the mapping information includes information on a type defined for the point in the XML document structure and the type of the variable, and
the read function converts the type of a read-out value to the type of the variable and provides the converted value to the variable.

### Claim 4

A non-transitory computer readable medium storing a program for producing an EXI (Efficient XML (Extensible Markup Language) Interchange) decoder which decodes an EXI stream, the program, when executed by a computer, causing the computer to perform steps comprising:
reading-in mapping information that maps a point in XML document structure defined by a XML schema to a name of a variable, the XML document structure including a plurality of elements;
reading-in an EXI grammar form including a plurality of grammars each defining relationship among an event representative of the element in the XML document structure, an EXI event code, and a next grammar for use;
sequentially selecting grammars in the EXI grammar form from a start grammar such that the grammars are traced in sequence;
updating a grammar stack which identifies a current position in the XML document structure each time the grammar is selected and determining whether an updated grammar stack indicates the point shown in the mapping information;
setting a skip function when the updated grammar stack does not indicate the point in the mapping information, the skip function skipping a value in the EXI stream that corresponds to the position indicated by the grammar stack when the skip function is executed;
setting a read function when the updated grammar stack indicates the point in the mapping information, the read function reading a value in the EXI stream, that corresponds to the position indicated by the grammar stack and providing the value to a variable mapped to the point the read function is executed; and
generating an EXI decoder which includes the skip function and the read function set for the grammars.

### Claim 5 (depends on 1)

A communication device comprising:
a storing unit configured to store an EXI decoder generated according to the decoder compiler recited in claim 1 and an EXI grammar form;
an executing unit configured to execute the EXI decoder; and
a receiving unit configured to receive an EXI stream, wherein
the EXI stream is a sequence of a plurality of EXI event codes and a value associated with a part of or all of the EXI event codes, and
the executing unit
sequentially identifies the EXI event code from a beginning of the EXI stream and select a next grammar for use based on the EXI event code and the grammar;
when the EXI event code is associated with the value, processes the value by executing a skip function or a read function that is mapped to the grammar applied when the EXI event code is identified; and
outputs the variable having the value retrieved by the read function.
