Method and apparatus for dynamically reconfiguring a parser
AssigneeMotorola, Inc.
InventorsDeepak Mulchandani, Rand Gray
Life of this patent
Estimating the term…
Abstract
A parser is dynamically reconfigured. Parse Control Records are read into memory. They are inserted into corresponding Parse Table Entries in a Parse Table in memory identified by a Parse Table Entry Identifier in each Parse Control Record. Each of the Parse Table Entries corresponds to a single command, and includes an ordered series of allowable parse states for that command. After a string of text has been tokenized into an ordered sequence of tokens, the ordered sequence of tokens is evaluated pursuant to the allowable parse states in the Parse Table Entries to determine whether the Text String has a valid syntax.
Claims22
A method for dynamically reconfiguring the parsing of data by a parser,
- said method comprising the step of:
- a) reading one or more Parse Control Records into a corresponding one of a plurality of Parse Table Entries in a Parse Table in a Memory, wherein:
- each of the one or more Parse Control Records includes a Parse Table Entry Identifier,
- each of the Parse Control Records and each of the Parse Table Entries identifies a corresponding command, and
- each of the Parse Control Records and each of the Parse Table Entries comprises an ordered sequence of allowable parse states for the corresponding command,
- said step further comprising the substeps of:
- 1) identifying which one of the Parse Table Entries corresponds to each of the one or more Parse Control Records utilizing the Parse Table Entry Identifier in the Parse Control Records.
A method for parsing text with a dynamically reconfigurable parser,
- said method comprising the step of:
- a) reading one or more Parse Control Records into a corresponding one of a plurality of Parse Table Entries in a Parse Table in a Memory, wherein:
- each of the one or more Parse Control Records includes a Parse Table Entry Identifier,
- each of the Parse Control Records and each of the Parse Table Entries identifies a corresponding command,
- each of the Parse Control Records and each of the Parse Table Entries comprises an ordered sequence of allowable parse states for the corresponding command, and
- each said Parse Table Entry Identifier is an index into the Parse Table;
- said step further comprising the substeps of:
- 1) identifying which one of the Parse Table Entries corresponds to each of the one or more Parse Control Records utilizing the Parse Table Entry Identifier in the Parse Control Records;
- b) reading a Text String to be parsed;
- c) tokenizing the Text String into an Ordered Sequence of Tokens;
- d) selecting one of the plurality of Parse Table Entries as a Selected Parse Table Entry;
- and
- e) evaluating the Ordered Sequence of Tokens pursuant to the allowable parse states in the Selected Parse Table Entry to determine whether the Text String has a valid syntax;
- f) repeating steps (d)-(e), selecting a different Parse Table Entry each time until either:
- 1) the Text String is evaluated to have valid syntax, or
- 2) all of the Parse Table Entries in the Parse Table have been selected and evaluated;
- and
- g) repeating steps (c)-(f) until no more Text Strings can be read.
A dynamically reconfigurable parser for parsing text comprising:
- a) means for reading one or more Parse Control Records into a corresponding one of a plurality of Parse Table Entries in a Parse Table in a Memory, wherein:
- each of the one or more Parse Control Records includes a Parse Table Entry Identifier,
- each of the Parse Control Records and each of the Parse Table Entries identifies a corresponding command, and
- each of the Parse Control Records and each of the Parse Table Entries comprises an ordered sequence of allowable parse states for the corresponding command,
- said element (a) further comprising the subelement of:
- 1) means for identifying which one of the Parse Table Entries corresponds to each of the one or more Parse Control Records utilizing the Parse Table Entry Identifier in the Parse Control Records.
A dynamically reconfigurable parser for parsing text, said apparatus comprising:
- a) means for reading one or more Parse Control Records into a corresponding one of a plurality of Parse Table Entries in a Parse Table in a Memory, wherein:
- each of the one or more Parse Control Records includes a Parse Table Entry Identifier,
- each of the Parse Control Records and each of the Parse Table Entries identifies a corresponding command,
- each of the Parse Control Records and each of the Parse Table Entries comprises an ordered sequence of allowable parse states for the corresponding command, and
- each said Parse Table Entry Identifier is an index into the Parse Table;
- said element further comprising the subelement of:
- 1) means for identifying which one of the Parse Table Entries corresponds to each of the one or more Parse Control Records utilizing the Parse Table Entry Identifier in the Parse Control Records;
- b) means for reading a Text String to be parsed;
- c) means for tokenizing the Text String into an Ordered Sequence of Tokens;
- d) means for selecting one of the plurality of Parse Table Entries as a Selected Parse Table Entry;
- e) means for evaluating the Ordered Sequence of Tokens pursuant to the allowable parse states in the Selected Parse Table Entry to determine whether the Text String has a valid syntax;
- f) means for repeatedly invoking elements (d)-(e), selecting a different Parse Table Entry each time until either:
- 1) the Text String is evaluted to have valid syntax, or
- 2) all of the Parse Table Entries in the Parse Table have been selected and evaluated;
- and
- g) means for repeatedly invoking elements (c)-(f) until no more Text Strings can be read.
A dynamically reconfigurable parser for parsing text, comprising:
- a) a Memory;
- and
- b) a computer processor connected to the Memory that is programmed to read one or more Parse Control Records into a corresponding one of a plurality of Parse Table Entries in a Parse Table in the Memory, wherein:
- each of the one or more Parse Control Records includes a Parse Table Entry Identifier,
- each of the Parse Control Records and each of the Parse Table Entries identifies a corresponding command, and
- each of the Parse Control Records and each of the Parse Table Entries comprises an ordered sequence of allowable parse states for the corresponding command, said element (b) further comprising the subelement of:
- 1) means for identifying which one of the Parse Table Entries corresponds to each of the one or more Parse Control Records utilizing the Parse Table Entry Identifier in the Parse Control Records.
Dependencies are inferred from the claim text.