# US 2024/0095402 A1 · Methods and Systems for Recursive Descent Parsing

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

- Number: US 2024/0095402 A1
- Document ID: US20240095402A1
- Status: Published application
- Kind: A1
- Application number: 18/516,830
- Filed: 2023-11-21
- Published: 2024-03-21
- Earliest claimed: 2021-10-21
- Assignees: Secure Computing Corporation
- Applicants: Secure Computing, LLC
- Inventors: Karen Heart; Alexander Rasin
- Web page: https://patentgrep.com/patent/US20240095402A1

## CPC

- G06F 21/629: {to features or functions of an application}
- G06F 21/6227: {where protection concerns the structure of data, e.g. records, types, queries}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Methods, systems, and devices for parsing text are described herein. A method of securing executable files is performed at a computing device having one or more processors and memory. The memory stories one or more programs configured for execution by the one or more processors. The computing device obtains source text that comprises a disassembled executable file and identifies, via a general parser module, the syntax of the source text by performing a recursive descent parsing of the source text. The device generates an abstract syntax tree (AST) for the source text based on the identified syntax and generates a transformed AST from the generated AST by replacing one or more system calls with respective protected system functions. The device also generates a secured executable file by assembling the transformed AST.

## Claims

### Claim 1

A method of securing executable files, performed at a computing device having one or more processors and memory storing one or more programs configured for execution by the one or more processors, the method comprising:
obtaining source text that comprises a disassembled executable file;
identifying, via a general parser module, a syntax of the source text by performing a recursive descent parsing of the source text;
generating an abstract syntax tree (AST) for the source text based on the identified syntax;
generating a transformed AST from the generated AST by replacing one or more system calls with respective protected system functions; and
generating a secured executable file by assembling the transformed AST.

### Claim 2 (depends on 1)

The method of claim 1, wherein identifying the syntax of the source text comprises:
recognizing a plurality of language tokens in the source text; and
recognizing corresponding identifier strings for the plurality of language tokens, wherein the syntax of the source text is identified based on the plurality of language tokens and the corresponding identifier strings.

### Claim 3 (depends on 1)

The method of claim 1, further comprising storing the AST to a file using a secure protocol format.

### Claim 4 (depends on 3)

The method of claim 3, wherein the general parser module comprises a first program for reconstructing the AST in memory and a second program for viewing the file.

### Claim 5 (depends on 3)

The method of claim 3, wherein the file is a binary file.

### Claim 6 (depends on 1)

The method of claim 1, wherein identifying the syntax of the source text comprises identifying one or more structural statements and one or more substructural statements in the source text.

### Claim 7 (depends on 6)

The method of claim 6, wherein generating the AST comprises identifying a production rule for each of one or more structural statements.

### Claim 8 (depends on 1)

The method of claim 1, wherein the transformed AST is digitally signed prior to assembly.

### Claim 9 (depends on 1)

The method of claim 1, wherein the one or more system calls comprise a first system call to a file and a second system call to a socket.

### Claim 10

A computing device, comprising:
one or more processors;
memory; and
one or more programs stored in the memory and configured for execution by the one or more processors, the one or more programs comprising instructions for:
obtaining source text that comprises a disassembled executable file;
identifying, via a general parser module, a syntax of the source text by performing a recursive descent parsing of the source text;
generating an abstract syntax tree (AST) for the source text based on the identified syntax;
generating a transformed AST from the generated AST by replacing one or more system calls with respective protected system functions; and
generating a secured executable file by assembling the transformed AST.

### Claim 11 (depends on 10)

The computing device of claim 10, wherein identifying the syntax of the source text comprises:
recognizing a plurality of language tokens in the source text; and
recognizing corresponding identifier strings for the plurality of language tokens, wherein the syntax of the source text is identified based on the plurality of language tokens and the corresponding identifier strings.

### Claim 12 (depends on 10)

The computing device of claim 10, wherein the one or more programs further comprise instructions for storing the AST to a file using a secure protocol format.

### Claim 13 (depends on 10)

The computing device of claim 10, wherein identifying the syntax of the source text comprises identifying one or more structural statements and one or more substructural statements in the source text.

### Claim 14 (depends on 13)

The computing device of claim 13, wherein generating the AST comprises identifying a production rule for each of one or more structural statements.

### Claim 15 (depends on 10)

The computing device of claim 10, wherein the transformed AST is digitally signed prior to assembly.

### Claim 16

A non-transitory computer-readable storage medium storing one or more programs configured for execution by a computing device having one or more processors and memory, the one or more programs comprising instructions for:
obtaining source text that comprises a disassembled executable file;
identifying, via a general parser module, a syntax of the source text by performing a recursive descent parsing of the source text;
generating an abstract syntax tree (AST) for the source text based on the identified syntax;
generating a transformed AST from the generated AST by replacing one or more system calls with respective protected system functions; and
generating a secured executable file by assembling the transformed AST.

### Claim 17 (depends on 16)

The non-transitory computer-readable storage medium of claim 16, wherein identifying the syntax of the source text comprises:
recognizing a plurality of language tokens in the source text; and
recognizing corresponding identifier strings for the plurality of language tokens, wherein the syntax of the source text is identified based on the plurality of language tokens and the corresponding identifier strings.

### Claim 18 (depends on 16)

The non-transitory computer-readable storage medium of claim 16, wherein the one or more programs further comprise instructions for storing the AST to a file using a secure protocol format.

### Claim 19 (depends on 16)

The non-transitory computer-readable storage medium of claim 16, wherein identifying the syntax of the source text comprises identifying one or more structural statements and one or more substructural statements in the source text.

### Claim 20 (depends on 19)

The non-transitory computer-readable storage medium of claim 19, wherein generating the AST comprises identifying a production rule for each of one or more structural statements.
