IP Library Granted Patent US 6,925,635
Granted Patent B2
US 6,925,635 · App. 10/022,969 · Granted Aug 2, 2005

Embedded pre-processor with dynamic macro forms

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,925,635
App. No.
10/022,969
Granted
Aug 2, 2005
Kind
B2
Abstract

An embedded pre-processor having dynamic macro types is disclosed. After a lexer receives an identifier token from source code, the lexer compares the identifier token with the macro names stored in the symbol table. If the identifier token matches a macro name stored in the symbol table, the lexer replaces the identifier token with a macro form token. The lexer then sends the macro form token to a glue routine. The glue routine invokes a macro invocation parser. The lexer continues to transfer tokens to the macro invocation parser via the glue routine until the completion of the macro invocation. The macro invocation parser subsequently sends a macro body definition of the macro to the lexer.

Claims (24)

1. A method for processing macros of varying grammatical invocation by a pre-processor having a lexer, a glue routine, a macro invocation parser and a parser, said method comprising:

receiving an identifier token from source code;

in response to said received identifier token matching a macro stored in a symbol table:

replacing said identifier token with a corresponding macro form token;

sending said macro form token to said glue routine;

invoking said macro invocation parser by said glue routine;

continuously receiving tokens by said macros invocation parser via said glue routine until a completion of said macro invocation; and

sending a macro body definition of said macro to said lexer by said macro invocation parser.

2. The method of claim 1 , wherein said receiving step is performed by a lexer.

3. The method of claim 1 , wherein said replacing step is performed by a lexer.

4. The method of claim 1 , wherein said sending step is performed by a lexer.

5. The method of claim 1 , wherein said transferring step further includes transferring tokens from a lexer to said macro invocation parser.

6. A computer program product residing on a computer usable medium for processing macros of varying grammatical invocation by a pre-processor having a lexer, a glue routine, a macro invocation parser and a parser, said computer program product comprising:

program code means for receiving an identifier token from source code;

in response to said received identifier token matching a macro stored in a symbol table:

program code means for replacing said identifier token with a corresponding macro form token;

program code means for sending said macro form token to said glue routine;

program code means for invoking said macro invocation parser by said glue routine;

program code means for continuously receiving tokens by said macro invocation parser via said glue routine until a completion of said macro invocation; and

program code means for sending a macro body definition of said macro to said lexer by said macro invocation parser.

7. The computer program product of claim 6 , wherein said program code means for receiving is a lexer.

8. The computer program product of claim 6 , wherein said program code means for replacing is a lexer.

9. The computer program product of claim 6 , wherein said program code means for sending is a lexer.

10. The computer program product of claim 6 , wherein said program code means for transferring further includes computer code means for transferring tokens from a lexer to said macro invocation parser.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 17, 2013
From: INTERNATIONAL BUSINESS MACHINES CORPORATION
To: INTELLECTUAL DISCOVERY, INC.
Reel/Frame 030628/0554 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 13, 2001
From: GARVEY, JOSEPH F.
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 012405/0839 →