IP Library Granted Patent US 6,988,265
Granted Patent B2
US 6,988,265 · App. 09/977,527 · Granted Jan 17, 2006

Method and apparatus for statement boundary detection

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 6,988,265
App. No.
09/977,527
Granted
Jan 17, 2006
Kind
B2
Abstract

The present invention provides a method and apparatus for statement boundary detection. In one embodiment of the present invention, a parser determines a natural end of a statement, where possible, based upon the context of the input stream and the syntax of the programming language. Thus, no statement terminator is necessary when a natural end to a statement is determined. The parser uses the natural end of a statement to terminate one statement and begin parsing another statement. In one embodiment, a special statement termination token is required to terminate a statement when no natural statement end exists. In another embodiment, a special statement termination token can be used to terminate a statement when a natural end of the statement exists.

Claims (39)

1. A method for statement boundary detection comprising:

obtaining an input stream;

parsing said input stream to determine a natural end of a first statement using a programming language syntax, wherein using said programming language syntax comprises recognizing said natural end of said first statement with and without said first statement having an explicit statement terminator, and wherein said parsing comprises:

retrieving a next character from said input stream; and

positioning said natural end of said first statement immediately before said next character, if appending said next character to said first statement is inconsistent with said programming language syntax;

dividing said input stream into a series of statements wherein said natural end is used to divide said first statement from a second statement; and

compiling said series of statements to create executable code for execution on a processor of a computer system.

2. The method of claim 1 wherein said parsing comprises:

determining a context from one or more characters previously retrieved from said input stream; and

positioning said natural end based on said context and said programming language syntax.

3. The method of claim 1 further comprising:

detecting a statement termination token.

4. A statement boundary detector system comprising:

a processor;

main memory; and

instructions stored in main memory for executing on said processor to:

obtain an input stream;

parse said input stream to determine a natural end of a first statement using a programming language syntax, wherein using said programming language syntax comprises recognizing said natural end of said first statement with and without said first statement having an explicit statement terminator, and wherein parsing said input stream comprises:

retrieving a next character from said input stream; and

positioning said natural end of said first statement immediately before said next character, if appending said next character to said first statement is inconsistent with said programming language syntax;

divide said input stream into a series of statements wherein said natural end is used to divide said first statement from a second statement; and

compile said series of statements into executable code.

5. The statement boundary detector system of claim 4 further comprising instructions stored in main memory for executing on said processor to:

determine a context from one or more characters previously retrieved from said input stream; and

position said natural end based on said context and said programming language syntax.

6. The statement boundary detector system of claim 4 further comprising instructions stored in main memory for executing on said processor to:

detect a statement termination token.

7. A computer program product comprising:

a computer usable medium having computer readable code embodied therein configured to detect a statement boundary, said computer program product comprising:

computer readable code configured to cause a computer to obtain an input stream;

computer readable code configured to cause a computer to parse said input stream to determine a natural end of a first statement using a programming language syntax, wherein using said programming language syntax comprises recognizing said natural end of said first statement with and without said first statement having an explicit statement terminator, and wherein said computer readable code configured to cause a computer to parse comprises:

computer readable code configured to cause a computer to retrieve a next character from said input stream; and

computer readable code configured to cause a computer to position said natural end of said first statement immediately before said next character, if appending said next character to said first statement is inconsistent with said programming language syntax; and

computer readable code configured to cause a computer to divide said input stream into a series of statements wherein said natural end is used to divide said first statement from a second statement.

8. The computer program product of claim 7 wherein said computer readable code configured to cause a computer to parse comprises:

computer readable code configured to cause a computer to determine a context from one or more characters previously retrieved from said input stream; and

computer readable code configured to cause a computer to position said natural end based on said context and said programming language syntax.

9. The computer program product of claim 7 further comprising:

computer readable code configured to cause a computer to detect a statement termination token.

Assignments (2)
MERGER AND CHANGE OF NAME Recorded Dec 14, 2015
From: ORACLE USA, INC.; SUN MICROSYSTEMS, INC.; ORACLE AMERICA, INC.
To: ORACLE AMERICA, INC.
Reel/Frame 037280/0188 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 12, 2001
From: ALLISON, DAVID S.
To: SUN MICROSYSTEMS, INC.
Reel/Frame 012268/0152 →