Back

Technical Description

Style Examples

Browse The Library

 

P4: Structured English Pseudo-Code Parser

Originally, I developed P4 as a means to complete a complex contract deliverable in only four days. I needed to design a Grants Management System for the Department of Labor. The Level 2 Specification was completed on time in P4. The name, P4, by the way, is a passing tribute to the 1977 book by Thomas J. Ryan, "The Adolescence of P-1".

Later, I worked to refine and extend P4 which, in turn, led me to Backus-Naur Form and eventually the development of Extended BNF (EBNF). I have since used each new version of EBNF to create an updated version of P4. (Computer Dictionary: endless loop; see loop, endless).

The objectives of P4 are to provide a style framework that will aid in producing clear, concise, logical descriptions of linear processes in plain English with enough structure to accurately convey structural and logical details. Writers of indeterminant skill levels must be able to express themselves accurately to an audience of possibly varying levels of skill.

A formal specification of a language like P4, with few syntax rules, using a tool like EBNF, which depends upon lexical and syntactic rules, is something of a challenge. In the past, I have had some difficulty balancing these polar requirements. The result has been that P4 gained more and more structure until it no longer met its original objectives. P4 version 4.0 makes a dramatic return to its roots and now allows much more freedom of expression without being bound by 'programming language'.

P4 is not an editor. It is a parser that performs lexical and syntactic analyses of your text source code. A sanity check, if you will. It helps you ensure that your P4 code is structured properly. If P4 encounters an error, it will give you the line number where the error occurred. The line number will match the source text file line number shown in your text editor. P4 is an EBNF application and like all EBNF applications it is small, tight, fast code. EBNF application source files will accommodate 50,000 source text lines or about 600 pages of text. All source file management and housekeeping is handled transparently by EBNF.

Additional information and examples will be listed on this page as it becomes available. In other words, as soon as I'm able to write it. I'll try not to keep you waiting.

P4 coloring scheme for EditPad Pro 7 text editor now available in the Library. Also a LaTeX2e .tex file that will typeset a P4 document file with keyword highlighting and AMS math statements. Simply bracket the P4 math statements with '$' signs and LaTeX will process them using a Mathescape function. The P4 parser will allow the bracketed math statements so no error messages will be caused by using this method. This file is also available in the library.

 

 

 

 

 

word to html converter html help workshop This Web Page Created with PageBreeze Free Website Builder  chm editor perl editor ide