WO2002027485A1 - Integrated content language for use on the web - Google Patents

Integrated content language for use on the web Download PDF

Info

Publication number
WO2002027485A1
WO2002027485A1 PCT/US2001/042337 US0142337W WO0227485A1 WO 2002027485 A1 WO2002027485 A1 WO 2002027485A1 US 0142337 W US0142337 W US 0142337W WO 0227485 A1 WO0227485 A1 WO 0227485A1
Authority
WO
WIPO (PCT)
Prior art keywords
content
language
programmed
programming constructs
syntax
Prior art date
Application number
PCT/US2001/042337
Other languages
French (fr)
Other versions
WO2002027485A9 (en
Inventor
Stephen A. Ward
Christopher J. Terman
David A. Kranz
Original Assignee
Curl Corporation
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Curl Corporation filed Critical Curl Corporation
Priority to AU2001295085A priority Critical patent/AU2001295085A1/en
Publication of WO2002027485A1 publication Critical patent/WO2002027485A1/en
Publication of WO2002027485A9 publication Critical patent/WO2002027485A9/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • G06F8/311Functional or applicative languages; Rewrite languages

Definitions

  • the present invention relates to methods and apparatus for developing and deploying content and software on the Web. More particularly, the present invention provides a programming language that permits developers to represent both content, such as formatted text and graphics, and interactive programmed behavior in a' single linguistic framework having consistent syntax and semantics.
  • HTML includes "tags" that may be used to represent forms, with areas that may be filled in by a user at a client computer.
  • the forms may be built using a standard set of elements, such as text boxes, pull-down menus, check boxes, and buttons.
  • the information that is obtained from a user using an HTML form is sent to a server, which process the information and dynamically generates a web page (which may contain another form) , which is sent to the client computer.
  • the client computer displays the dynamically generated web page within a standard Web browser, such as Internet Explorer, available from Microsoft Corporation, of Redmond, Washington, or Netscape Communicator, available from Netscape Communications Corporation, of Mountain View, California.
  • This server-based approach requires only that the client computer be able to handle standard HTML, a capability which is provided by any standard Web browser. Thus, this approach may be used to provide limited interactivity with most any client computer.
  • This server-based approach to providing interactivity over the Web has been widely used, and is facilitated by CGI (Common Gateway Interface) scripts executing on a Web server, or by systems such as Active Server Pages (ASP) , provided by Microsoft Corporation, of Redmond, Washington, or by Java TM servlets (Java is a trademark of Sun Microsystems, of Palo Alto, California) .
  • CGI Common Gateway Interface
  • ASP Active Server Pages
  • Java TM servlets Java is a trademark of Sun Microsystems, of Palo Alto, California
  • the degree of interactivity that can be provided is limited, since the client typically interacts with the user through forms, and the server must handle all the processing of the information provided by the user. Additionally, the communications burden of this approach is high, since each interaction requires that information from the user be sent to the server, which then sends back an entirely new dynamically generated web page in response. Finally, since all the computational work is being done on the server, which may be handling requests from thousands of clients, the computational load on the server may prevent requests from being handled in a timely manner, or may require that numerous expensive high-speed servers be used to process client requests.
  • HTML includes tags, such as the OBJECT and APPLET tags, that permit content other than HTML to be embedded within an HTML page. These tags typically identify external programmed content, such as a Java TM applet, the result of whose execution may be embedded in the Web page in an area specified by the OBJECT or APPLET tag. This permits sections of a web page to be used to interact with programmed content.
  • the programmed content typically has little ability to affect or otherwise interact with the textual (i.e. HTML) content in which the results of its execution are embedded.
  • HTML textual
  • the programmed content in this approach is generally encapsulated separately from the HTML content, rather than being integrated with it.
  • the programmed content is written in a language such as Java TM that is entirely separate from the HTML content, and has different syntax and semantics.
  • the programmed content does not share names, variables, or data representations with the textual content within which it is embedded, and has little or no ability to affect that textual content or the content of the Web page in which it is embedded, outside of an area specified in the APPLET or OBJECT tag.
  • the programmed content is stored in a separate file from the HTML, and is accessed independently from it. Because of the separation of the HTML content from the programmed content, the use of such embedded "foreign" content in HTML to provide interactive Web pages and Web-based applications has several drawbacks. First, the developer is required to learn at least two gratuitously incompatible languages — HTML, and a language such as Java TM , in which the programmed content is written.
  • scripts which may be placed within HTML content using the SCRIPT tag.
  • Numerous scripting languages have been developed for use within Web pages, including JavaScript, provided by Netscape Communications Corporation, of Mountain View, California, and JScript and VBScript, available from Microsoft Corporation, of Redmond, Washington. Code written in a scripting language is typically placed directly within the HTML code for a Web page. Aside from this ability to intermix the code with other content, however, scripting languages have many of the same problems as embedded programmed content, described hereinabove.
  • scripting languages have syntax and semantics that are completely different from the markup language in which the scripts are placed.
  • developers are still forced to write in two incompatible languages, HTML and the scripting language, to produce interactive Web pages or Web applications.
  • scripts have only a limited ability to interact with the textual content in which they are placed.
  • scripting languages are typically used to handle small tasks, and are generally designed to handle only a limited range of simple programmed behavior. Because their use is generally limited to relatively simple tasks, most scripting languages are interpreted, limiting their ability to handle high performance applications. The desirability of a single linguistic framework to represent both Web content and programmed behavior has led to numerous attempts to extend markup languages, such as HTML, to include programmed content. - € -
  • Extended markup languages examples include Meta-HTML, available from Meta-HTML.COM, of Santa Barbara, California, and XML (extensible Markup Language) , which provides a markup language for representing and handling structured data, the specification of which is available from the World Wide Web Consortium (W3C) . While these extended markup languages provide a reasonable degree of integration between content and programmed behavior, they typically use a tag-based syntax that is better suited for use in a markup language than in a programming language. As a result of this cumbersome syntax, the use of these extended markup languages for programming tasks is limited.
  • Web content development tools such as Flash TM and Shockwave ® , available from Macromedia, Inc., of San Francisco, California, permit developers to use a suite of front-end tools to create rich interactive Web content. This content is then processed by the tools to produce an intermediate representation that is sent to specialized viewers on client computers. While these tools provide animated and interactive Web content, the intermediate representation is opaque and is not intended to be read or altered by humans. Additionally, use of such highly processed intermediate forms causes much of the semantics of the original representation of the content to be lost, so the intermediate form cannot be processed as meaningful content itself. Furthermore, such tools typically provide only a limited ability to develop programmed content, and do not generally provide developers with the full capabilities of a modern programming language.
  • the MIT Curl language uses a LISP-like prefix syntax to provide markup commands for formatting text, and a language in which programmed behavior may be expressed within textual content.
  • LISP-like prefix syntax By providing the ability to intermix programmed content and rich textual content, MIT Curl is able to support much of the functionality that is needed for complex interactive Web pages and Web-based applications.
  • many programmers find the prefix syntax that is used throughout MIT Curl to be undesirable and cumbersome, especially for writing mathematical expressions.
  • MIT Curl provides only a limited ability for programmed content to manipulate content, and to handle content as data. Further, MIT Curl has little support for manipulating programmed content.
  • a content language designed to handle programmed content, rich textual content, and other types of content, all within a single linguistic framework.
  • a number of features may be added to an existing programming language, such as MIT Curl, to provide such a content language.
  • a new language incorporating these features could be designed.
  • a content language in accordance with the present invention includes the ability to express rich textual content and other types of content using prefix syntax markup commands, similar to the markup commands found in markup languages such as HTML. Additionally, a content language should be able to express programmed behavior, preferably using an extensible prefix syntax for most functions, and an infix syntax for expressions and other calculations.
  • the content language should have the ability to treat all forms of content, including programmed content as data. This abstraction over content feature permits the content language to pass content into procedures and functions, return content as a value from a procedure or function, store content in variables, and otherwise handle content in the same manner in which any other type of data is handled.
  • source data types are provided in the content language, that are capable of storing and manipulating programmed content, and providing access to a parser for the content language.
  • a content language in accordance with the present invention also should provide flexible extension mechanisms, so that new markup commands may be added, and new procedures may be defined.
  • the content language includes extension mechanisms that permit arbitrary prefix forms to be defined.
  • a runtime environment for the content language of the present invention is provided as a Web browser plug-in, permitting a standard Web browser to be used to view and/or execute content written in the content language. Additionally, a stand-alone runtime environment may be provided so that content and programs written in the content language may be viewed and/or executed without using a Web browser.
  • a language processor such as a compiler or interpreter is used to execute code written in a content language.
  • This language processor may be included in the Web browser plug-in with the runtime environment, or may be a stand-alone application.
  • the language processor may fully compile content written in a content language, or partially compile content written in a content language, using known dynamic compilation techniques (e.g., just-in-time compilation).
  • a preferred embodiment of the content language of the present invention is constructed by extending the MIT Curl programming language to create a new version of the Curl language.
  • This new version of the Curl language includes the features of a content language according to the present invention that are not present in MIT Curl, or that have only limited support in MIT Curl, including infix expression syntax, abstraction over content, source data types, and certain extension mechanisms.
  • FIG. 1 shows the features of a content language in accordance with the principles of the present invention
  • FIGS. 2A and 2B show an example of markup commands in a content language
  • FIGS. 3A and 3B show an example of programmed content in a content language in accordance with the present invention
  • FIGS . 4A and 4B show an example combining programmed content and markup commands in a content language in accordance with the present invention
  • FIGS. 5A and 5B show a more complex example in which formatted textual content and programmed content are combined in a content language in accordance with the present invention
  • FIGS. 6A and 6B show an example illustrating abstraction over content and extension mechanism features of a content language in accordance with the present invention
  • FIGS . 7A and 7B show an example of infix expression syntax in a content language in accordance with the present invention
  • FIG. 8 shows the structure of a class for handling source data in a preferred embodiment of the present invention
  • FIG. 9 shows a network environment in which the content language of the present invention may be used;
  • FIG. 10 is a block diagram of a computer system on which the content language of the present invention may be used.
  • FIG. 11 is a block diagram of a web browser in which a runtime environment for the content language of the present invention may be present as a plug-in;
  • FIG. 12 shows a language processor, such as a compiler or interpreter, that processes content written in the content language of the present invention.
  • a language processor such as a compiler or interpreter
  • the present invention relates to a language for use on a computer system or on a network of computer systems to represent content, including complex interactive content.
  • the content language of the present invention may be used to develop stand- alone applications, Web pages, or other documents and applications that may displayed or executed on a computer.
  • the content language of the present invention is used to deliver a variety of rich, interactive content over the World Wide Web.
  • an integrated content language, or content language is a computer programming language or representation for content that permits a programmer or developer to use a single coherent linguistic framework, having consistent syntax and semantics, to develop content that includes a wide variety of content types, including formatted text and programmed behavior.
  • Other types of content including graphics, sound, video, or any other type of content that may be rendered, displayed, or experienced through use of a computer may optionally be represented in a content language.
  • a content language is designed to represent formatted text and other types of media content.
  • a content language includes the ability to express complex programmed behavior.
  • a content language as defined herein provides for the representation and presentation of formatted text and other types of content, as well as programmed behavior, all within a single language.
  • a content language in accordance with the present invention provides a single linguistic framework, including consistent syntax and semantics, in which both content and programmed behavior can be expressed.
  • a single language processor such as a compiler or interpreter
  • FIG. 1 an overview of the features of a content language in accordance with the principles of the present invention is described.
  • Content language 10 has numerous features, including markup feature 11, programmed content feature 12, abstraction over content feature 13, extensible prefix syntax feature 14, infix expression syntax feature 15, extension mechanism feature 16, and source data types feature 17. All of these features of content language 10 share a single linguistic framework, having consistent syntax and semantics.
  • Markup feature 11 permits content language 10 to handle rich text content as well as other types of content that can be expressed using markup commands. Use of such markup commands is well known within markup languages, such as HTML. For example, in Curl, the markup command “ ⁇ bold this is a test ⁇ ” would cause the text "this is a test” to be displayed in a bold typeface. Markup commands are typically expressed using a prefix syntax, in which the command precedes the content that it affects .
  • Programmed content feature 12 permits content language 10 to handle programmed content, including " interactive programmed content, which is to be executed rather than displayed.
  • the programmed content is typically executed on a client computer, within the context of a runtime system in a browser plug-in or other execution environment on a client computer.
  • the programmed content may be processed by a language processor, which causes the content to be interpreted, compiled, dynamically compiled (e.g., just-in-time compilation) , or partially compiled, depending on the implementation of the language processor for content language 10.
  • Some implementations may execute programmed content on a server computer as well as on client computers.
  • programmed content in content language 10 typically may be freely intermixed with text, formatted text, and other types of content.
  • Abstraction over content feature 13 takes the interaction between programmed content and other types of content beyond simply permitting programmed content to be intermixed with other content, by permitting content, including programmed content, to be treated as data. Abstraction over content feature 13 permits content of all types to be passed into programmed procedures as arguments, to be returned as values from procedures or functions, to be stored in variables, and to otherwise be treated in the same manner as other data. This permits programmed content within a Web page or other document written in content language 10 to directly interact with all of the content in the Web page or document.
  • Extensible prefix syntax feature 14 in which markup commands and many other commands and procedures use prefix syntax, is used in a preferred embodiment of content language 10.
  • an entire sub-language, including data definitions, such as "Ml” and "M2”, and commands, such as ".tran” and ".plot” may exist within the bounds of a prefix form, such as " ⁇ circuit-si ulation-netlist ... ⁇ ". This degree of flexibility is extremely useful in representing a wide variety of content types within a single language.
  • Prefix syntax is a natural and easy to read format to use for markup commands and other commands that affect content such as formatted text or page layout.
  • prefix syntax is somewhat awkward for other uses, such as writing mathematical expressions in programmed content.
  • a preferred embodiment of content language 10 includes infix expression syntax feature 15.
  • Infix expression syntax feature 15 permits infix syntax to be used in expressions and other computations in programmed content. Thus, instead of using prefix syntax, such as " ⁇ + A B ⁇ " to add A and B, a more natural infix syntax, such as "A + B” may be used. Most programmers find infix syntax to be more natural and readable than prefix syntax for writing expressions.
  • Extension mechanism feature 16 permits new commands and procedures to be defined in content language 10. These new commands and procedures should be able to handle content, including textual content, formatted textual content, programmed content, and other forms of content. Extension mechanism feature 16 can be used, for example, to permit developers to define new markup commands that may be used to format text or other content. Being able to develop new commands and procedures in content language 10 provides the high degree of flexibility that is needed to implement Web-based applications and other complex interactive content.
  • Source data types feature 17 provides support in content language 10 for manipulation of source language forms representing programmed content. Through use of this feature, data types are provided for representing source code. Preferably, support is provided for performing various operations, such as reading, scanning, and parsing the source code in various ways.
  • the data types used to represent source code preferably also represent the parse state of source code, indicating whether a piece of content or source code is unparsed, fully parsed, or partially parsed.
  • Source data types feature 17 permits pieces of source code or content to be stored, read, scanned, parsed, and compiled under control of a Web page, document, or other application built using content language 10.
  • these features may be added to previously known programming languages to enhance their ability to work with rich content. This may be achieved by adding new commands to known programming or markup languages, and by making changes to various aspects of the syntax and semantics of known programming languages. It will be understood that some languages, such as MIT Curl, are more amenable to being altered to include the features of a content language than are others . Alternatively, a new programming language designed as a content language, and incorporating the features of the present invention described herein could be developed. This would involve designing a syntax and semantics for the new language, preferably incorporating the features of a content language in a natural and consistent manner.
  • the MIT Curl programming language discussed hereinabove is altered and extended with the features of the present invention to create a new version of Curl, which is capable of being used as a content language.
  • This approach builds on the already existing strengths of the MIT Curl language at intermixing formatted text and programmed content, and extends those abilities, by providing features such as abstraction over content feature 13, infix expression syntax feature 15, portions of extension mechanism feature 16, and source data types feature 17. These extensions greatly enhance the ability of the Curl language to handle rich content, and provide all of the features of content language 10 in a single extended version of the Curl language.
  • markup feature 11 an example of markup feature 11 is shown.
  • a content language should be able to represent formatted text using a set of markup commands that determine the way in which text is presented to a user.
  • markup command 20 causes the word “Ancestors:” to be shown in bold type in the output (FIG. 2B) .
  • markup commands 22, 24, and 26 cause the words “parents", “grandparents", and “great grandparents” to appear in italic text in the output shown in FIG. 2B.
  • Markup command 28 causes the enclosed content (the content between the " ⁇ " and the " ⁇ ") to be formatted as a table having two columns .
  • the syntax used to represent the markup commands will be easy to read, and will clearly indicate what formatting is to be applied, and which text the formatting is to be applied to.
  • Curl which is used in FIG. 2A
  • the markup commands are named according to their function, and curly braces (i.e. " ⁇ " and " ⁇ ") are placed around the text that is being formatted.
  • the readability of the code in FIG. 1A is further enhanced by the markup commands being represented in prefix notation (i.e. the command is placed before, the text to which it applies) .
  • the example shown in FIG. 2A is written in the Curl programming language, but could be presented in any of a large number of previously known markup languages, such as HTML.
  • markup commands could also be used for such functions as centering text, underlining text, using different fonts, changing the size of text, or other similar formatting and layout functions.
  • markup commands could be used to represent graphical objects, or interactive form elements, such as is done in HTML.
  • markup languages for text formatting are known, such text formatting and layout using markup commands is only one aspect of a content language, which must be able to handle rich content and functionality beyond what can be handled by previously known markup languages.
  • FIGS. 3A and 3B show an example of programmed content feature 12.
  • FIG. 3A shows code written in a version of the Curl programming language that has been extended in accordance with the present invention.
  • the code defines a procedure called "ancestors", that, given the generation, determines how many ancestors a person has at that generation earlier. Thus, for one generation earlier (the person's parents), the procedure would compute that the person has two ancestors. For each generation beyond one, the number of ancestors doubles.
  • the code shown in FIG. 3A uses constructs that are commonly found in previously known programming languages. In particular, the code contains comments 30, 31, 32, and 33, define function 34, return function 36, and conditional (i.e. if-then-else) function 38. Additionally, the code contains expressions 40, 42, and 44.
  • Each of these programming constructs or functions has semantics that are similar to the semantics of comparable constructs in other programming languages, such as C, Java, or LISP. For example, comments 30, 31, 32, and 33 are ignored (i.e. not executed or displayed) , define function 34 defines a new procedure that may be called later in the code, and return function 36 returns a value from a procedure.
  • FIG. 3A which is represented using text, it is not textual content. It is programmed content, for which the visual representation seen by the user is the result of executing the programmed content.
  • FIG. 3B which shows the result of executing the code shown in FIG. 3A, only the number "8" is displayed, since this is the result of executing " ⁇ ancestors 3 ⁇ ".
  • FIG. 3A does not show all of the programming constructs available in a content language in accordance with the present invention.
  • a content language should provide all of the standard programming constructs, such as loops, conditionals, assignment, procedure calls, expressions, and other known programming constructs, that are provided in any modern programming language.
  • a content language also provides programming constructs such as class definition and inheritance that are typically found in object oriented programming languages, such as C++ or Java .
  • the semantics of these programming constructs is well known to those skilled in the art, and the syntax of the programming constructs will vary according to the language that is used as the basis of the content language.
  • infix expression syntax feature 15 is also demonstrated in the example shown in FIG. 3A.
  • Operators (such as * and -) in expressions 40 and 44 of FIG. 3A use an infix notation, rather than prefix notation, such as is used for the markup commands shown in FIG. 2A.
  • Using infix notation is often considered a more natural and readable syntax to use for writing mathematical expressions and code than is prefix notation (e.g. ⁇ + 2 2 ⁇ ).
  • prefix notation e.g. ⁇ + 2 2 ⁇ .
  • a content language preferably uses prefix notation for markup and other functions for which prefix notation improves readability, and infix notation for mathematical expressions or other programmed content for which use of infix notation improves readability.
  • a content language permits markup commands that are used to format text and other content to be freely intermixed with programmed content.
  • programmed content such as "ancestor name” procedure 50 and "ancestors” procedure 52 are used to generate portions of the textual content within the table defined by table markup command 54.
  • the text that is returned by "ancestor name” procedure 50 is italicized using italic markup 56.
  • FIG. 4B shows the results of the content language code shown in FIG. 4A.
  • the code in FIG. 4A is written in a version of the Curl programming language that has been extended in accordance with the present invention by adding, for example, infix notation for expressions. It will be understood that other programming languages extended in accordance with the principles of the present invention could also be used as content languages, to permit writing of similar code that combines both rich textual content through use of markup commands and programmed content, using a single linguistic framework.
  • FIGS. 5A and 5B A more complex example that combines use of rich textual content with programmed content, and in which the programmed content directly manipulates the textual content is shown in FIGS. 5A and 5B.
  • the example shown in FIG. 5A uses the ancestors and ancestor-name procedures described hereinabove, and defined in the code shown in FIG. 4A.
  • loop 60 builds the contents of a table by using a "table. add” method to add content to a table object.
  • loop 60 When loop 60 is finished building the contents of the table, the system displays the table.
  • FIG. 5B The output of the code shown in FIG. 5A is shown in FIG. 5B.
  • a content language built in accordance with the principles of the present invention uses a single linguistic framework to express both formatted text and programmed content.
  • a content language can intermix the text and programmed content, so that the programmed content can build textual content to be displayed, and the textual content can invoke programmed content.
  • the code shown in FIG. 5A is written in a version of the Curl programming language that has been extended in accordance with the present invention. Since Curl is an object oriented language, the example in FIG. 5A is able to call methods, such as "table. add" on a table object. Although a preferred embodiment of a content language built in accordance with the principles of the present invention supports object-oriented programming, this ability is not always required in content languages.
  • a content language should include language-level support for dealing with content as data. This means that content, including textual content, markup content, programmed content, graphical content, or any other content type or combination of content types that can be handled by the content language, should be able to be treated as data. Like most any other type of data, such content should be able to be passed into procedures as arguments, returned as values from procedures or functions, or assigned to a variable.
  • any kind of content expressible in the content language can be passed into a procedure using a "" argument.
  • textual content such as "file more patent applications.”
  • formatted text containing markup such as " ⁇ bold File! ⁇ ”.
  • the value returned by the "quote-Bob” markup may contain any types of content.
  • FIG. 6A also demonstrates extension mechanism feature 16.
  • a content language should permit a programmer to define new markup commands and other prefix syntax. This permits the language, and the available syntax for representing content to be extended and customized.
  • "define-text-proc" command 70 provides such extensibility by permitting a new prefix markup command (“quote-Bob") to be defined.
  • extensions mechanisms are also available.
  • a " ⁇ define-class ... ⁇ ” extension mechanism could be used to define new classes in an object oriented language, such as Curl.
  • a " ⁇ define-proc ... ⁇ ” or “ ⁇ define ... ⁇ ” extension mechanism could be used to define procedures. This extension mechanism has been demonstrated in FIGS. 3A and 4A with the definitions of the "ancestors" and "ancestor-name” procedures.
  • a preferred embodiment of the present invention includes a " ⁇ define- acro ... ⁇ ” extension mechanism, that can be used to define arbitrary prefix forms.
  • this " ⁇ define- macro ... ⁇ " form can be used more generally than the " ⁇ define-text-proc ... ⁇ ” form shown in FIG. 6A, by permitting most any syntax and semantics to be associated with a prefix form whose leftmost keyword is specified in the definition.
  • FIG. 6A is written in a version of Curl that includes content language features in accordance with the present invention.
  • the code shown in FIG. 6A makes use of the ancestors and ancestor-name procedures described hereinabove, and defined in the code shown in FIG. 4A.
  • the result of executing the code in FIG. 6A is shown in FIG. 6B.
  • FIGS. 7A and 7B illustrate the use of infix expression syntax feature 15.
  • expressions such as “apples + oranges” expression 80, “apples > oranges” expression 82, and “oranges > apples” expression 84 all use infix syntax, rather than prefix syntax (e.g., " ⁇ + apples oranges ⁇ ", or " ⁇ > apples oranges ⁇ ”).
  • Use of infix notation provides a natural and readable syntax for writing expressions.
  • FIG. 7B shows the results of executing the code shown in FIG. 7A.
  • FIG. 7A uses a version of the Curl language that has been extended to include features such as infix expression feature 15.
  • FIG. 8 shows the structure of two classes that are used in a preferred embodiment of the present invention to provide source data types feature 17.
  • CurlSourceState class 90 provides a wrapper for an object of CurlSource class 92.
  • CurlSource class 92 provides an abstract source object interface that is inherited by all source objects in a preferred embodiment of the present invention.
  • CurlSource class 92 preferably provides numerous methods (including, for example, a "parse-text” method, a “parse-token” method, a “parse-expression” method, a “parse-keywords” method, a “parse-head” method, and other methods for parsing portions of a source object), that permit various levels of access to the parser, for reading, scanning, and parsing source code.
  • CurlSourceState class 90 provides a wrapper around a CurlSource object, and a parse index.
  • an object of CurlSourceState class 90 contains a CurlSource object, a current parse index, and a previous parse index.
  • the current and previous parse indices can be used to determine the current parse state of the source represented by the CurlSource object.
  • the indices may indicate that the source is unparsed, that it is fully parsed, or that it is in any partially parsed state.
  • the CurlSource class and CurlSourceState class are useful for manipulating source code as content in a preferred embodiment of the present invention, in which the Curl language is extended to include the features of a content language as described herein. It will be evident to one skilled in the art that there are numerous other ways that data types for handling source code content could be structured, depending on the language being used to manipulate the source code content, and the implementation of the parser.
  • the classes discussed with reference to FIG. 8 are illustrative, and are not intended to limit source data types feature 17.
  • APIs Application program interfaces of preferred implementations of the CurlSource and CurlSourceState classes are provided in Appendix A and Appendix B, respectively.
  • Computers 100, 102, and 104, and server 106 are connected to local area network (LAN) 110.
  • LAN local area network
  • Each of computers 100, 102, and 104 may execute a variety of software, all or part of which may be stored locally on computers 100, 102, or 104, or may be stored on server 106, and accessed over LAN 110.
  • LAN 110 is connected to a wide area network (WAN) 112, such as the Internet, through gateway 114, which may be a dedicated device, or may be a computer or server, similar to computers 100, 102, and 104, or server 106.
  • WAN wide area network
  • gateway 114 which may be a dedicated device, or may be a computer or server, similar to computers 100, 102, and 104, or server 106.
  • WAN 112 wide area network
  • gateway 114 may be a dedicated device, or may be a computer or server, similar to computers 100, 102, and 104, or server 106.
  • WAN 112 wide area network
  • gateway 114 which may be a dedicated device, or may be a computer or server, similar to computers 100, 102, and 104, or server 106.
  • remote server 116 or with other devices or networks connected to WAN 112.
  • Computers 100, 102, and 104 may gain access to information and software through WAN 112. This information and software may include content that is written in
  • Such content may, for example, be stored on remote server 116, and accessed by any of computers 100, 102, or 104, which may transfer the content from remote server 116, and display and/or execute the content within a Web browser capable of displaying and/or executing content written in a content language.
  • computers 100, 102, or 104 may transfer the content from remote server 116, and display and/or execute the content within a Web browser capable of displaying and/or executing content written in a content language.
  • the above-described environment is for illustration, and that content languages and content language processors in accordance with the present invention may be used in a variety of networked and non-networked environments.
  • the methods and apparatus of the present invention could be used on a single stand-alone computer, but would then be unable to access information or content over LAN 110 or WAN 112 — all content would need to be accessible locally.
  • a content language or content language processor may be used with any configuration of one or more computers, which may be interconnected on one or more networks .
  • LAN 110 may include a variety of devices other than computers.
  • LAN 110 may include printers (not shown) , scanners (not shown) , disk arrays (not shown) , or any other type of device that may be connected to a network.
  • Computer system 120 includes at least processor 122, for processing information according to programmed instructions, and memory 124, for storing information and instructions for processor 122.
  • Processor 122 and memory 124 are coupled to bus 126, which preferably provides a high-speed means for devices connected to bus 126 to communicate with each other.
  • computer system 120 is illustrative, and that alternative systems and architectures may be used with the present invention. It will further be understood that many other devices, such as a display system (not shown) , a network interface (not shown) , a storage device, such as a magnetic or optical disk drive (not shown) , and a variety of other input and output devices (not shown) may be included in computer system 120.
  • a content language or content language processor in accordance with the present invention can be used to display and/or execute content on most any computing device, including personal computers, network computers, handheld devices, and any other device capable of outputting content and executing programmed instructions.
  • Web browser 130 comprises a standard commercially available web browser, such as Internet Explorer, available from Microsoft Corporation, of Redmond, Washington. Web browser 130 is capable of displaying a variety of content to a user, including content written in HTML. Additionally, Web browser 130 includes plug-in modules 132, 134, and 136. These plug-in modules, or "plug- ins" may provide Web browser 130 with the ability to display or output other types of content, such as three-dimensional graphics, digital video, or streaming audio .
  • Web browser 130 includes content language runtime plug-in 138.
  • Content language runtime plug-in 138 permits Web browser 130 to display and/or execute content written in a content language, and preferably includes a content language processor, such as a compiler or interpreter, that is able to process a content language.
  • a content language processor such as a compiler or interpreter
  • content language runtime plug-in 138 is a browser plug-in, it may be used with other versions of Web browser 130, or with other Web browsers that maintain a consistent interface to their plug-ins. It will be understood by one of ordinary skill in the art that use of content language runtime plug-in 138 in Web browser 130 is only one software environment in which content written in a content language may be displayed and/or executed.
  • the required functionality could be built directly into the web browser, or could be a separate, stand-alone module, permitting content written in a content language to be executed outside of a Web browser.
  • a web browser plug-in such as content language runtime plug-in 138
  • a standalone runtime environment for displaying and/or executing content are provided.
  • FIG. 12 shows a language processor that processes content written in a content language.
  • Content language processor 140 takes content 142, which is written in a content language, as input.
  • Content language processor 140 then compiles and/or interprets content 142, or a portion of content 142, to produce output 144.
  • Output 144 may be output displayed within a Web browser, commands that cause a computer system to display the result of executing content 142, or commands that are sent over a network to cause a client computer to display the result of executing content 142.
  • Content language processor 140 may comprise a compiler, an interpreter, or any other program capable of instructing a computer to execute the commands and display the content in content 142. If content language processor 140 is a compiler, this may involve first translating content 142 into a set of executable instructions, or a set of partially compiled instructions that are further compiled or interpreted when the content is actually executed or displayed. In a preferred embodiment, content language processor 140 may fully compile content written in the content language, or partially compile content, using known dynamic compilation techniques (e.g., just-in-time compilation) . Content language processor 140 may be a part of a runtime environment, such as content language runtime plug-in 138 of FIG. 11, or it may be a stand- alone program or part of a content development environment .
  • a compiler an interpreter, or any other program capable of instructing a computer to execute the commands and display the content in content 142. If content language processor 140 is a compiler, this may involve first translating content 142 into a set of executable instructions, or a set of
  • a single language processor for a content language such as content language processor 140, can be used to produce output for both content and programmed behavior.
  • content language processor 140 can be used to produce output for both content and programmed behavior.
  • This appendix contains the application program interface (API) for a preferred implementation of the CurlSource Class. Some methods that are common to many objects in the system, such as methods to print or format an object for output have been omitted.
  • API application program interface
  • CurlSource (Class) Package Source Access : public Base Classes: ⁇ Serializable SourceLocation ⁇
  • hash A hash function used by HashTable. public Object. hash :int
  • Location is taken from the source object with the optional offset of index.
  • parse-expression public ⁇ CurlSource. parse-expression start : Par selndex ⁇ : ⁇ return Parsed, Parselndexj Return the next infix expression and the index of the following token.
  • Parselndex ⁇ Return the array of the keyword args and the index to the following token. Returns null if there are no keyword arguments . skip-trailing-whitespace?: When true, any whitespace characters after the last keyword argument will be considered part of the keywords, and the returned index will be after the whitespace. When false, the returned index will be immediately after the last keyword, regardless of whether that index refers to a whitespace character. parse-parameters public ⁇ CurlSource. parse-parameters start : Parselndex, expect -EOS '?
  • Parselndex ⁇ Return the next unparsed element and the index to the following element. If the first element is already parsed, it behaves like parse, read normally interprets the escape sequences. Set cooked? to false if you want the raw chars without any modification. The leading whitespace is skipped, unless skip-whitespace? is set to false.
  • This appendix contains the application program interface (API) for a preferred implementation of the CurlSourceState Class. Some methods that are common to many objects in the system, such as methods to print or format an object for output have been omitted.
  • API application program interface
  • CurlSourceState (Class) Package Source Access: public
  • the state consists of the current parse index and the previous parse index.
  • hash A hash function used by HashTable. public Object . hash : int
  • previous-index Get the previous parse index.
  • previous-index Parselndex
  • location-to-line-column public ⁇ CurlSourceState. location-to-line-column location : int ⁇ : ⁇ return line: int, column:int ⁇
  • pop-comma public ⁇ CurlSourceState. pop-comma error-if -exhausted? :bool true ⁇ : void
  • Parse and remove keyword arguments to special forms Returns a ⁇ Array-of Parsed ⁇ containing the keywords. If the list was empty, returns null. skip-trailing-whitespace?: When true, any whitespace characters after the last keyword- argument will be considered part of the keywords, and the Parselndex will be advanced accordingly. When false, the Parselndex will be set to the position immediately after the last keyword, regardless of whether that index refers to a whitespace character.

Abstract

The present invention provides apparatus and methods for developing and delivering interactive Web pages and Web-based applications. More particularly, the invention provides content language (10), in which intermixed with programmed content (12) (i.e., code) that defines program behavior. The content and programmed content are expressed in a single content language, using a single linguistic framework having consistent syntax and semantics. This content language includes a number of features, including an ability to handle content, including programmed content as data. In a preferred embodiment, the content language uses an programming constructs, and an infix syntax (15) for expressions. The content language of the present invention may be used to develop interactive web content that may be executed and displayed within a Web browser that includes a plug-in containing a language processor (i.e., a compiler or interpreter) for the content language. A stand-alone language processor for the content language may also be used to execute and display content written in the content language.

Description

INTEGRATED CONTENT LANGUAGE FOR USE ON THE WEB
Field of the Invention
The present invention relates to methods and apparatus for developing and deploying content and software on the Web. More particularly, the present invention provides a programming language that permits developers to represent both content, such as formatted text and graphics, and interactive programmed behavior in a' single linguistic framework having consistent syntax and semantics.
Background of the Invention
Use of the Internet and of the World Wide Web is increasing dramatically, and the role of the World Wide Web (the Web) is in the process of evolving. Although the Web originally provided a means of viewing and linking hypertext documents over the Internet, it is rapidly becoming the standard user interface to a wide variety of networked computational services. As a result of this change, HTML (HyperText Markup Language) , the markup language on which most Web content has been based, is no longer sufficient to handle the full range of uses of the Web. A variety of approaches have been taken to extend the ability of the Web to handle the rich content and interactivity that are now required of Web- accessible applications. These approaches include various server-based applications, use of "foreign" content types within HTML Web pages, extensions to HTML, and use of programming languages that permit code to be embedded within a Web page.
A first approach to providing interactivity within Web pages involves use of server-side applications that dynamically generate Web pages in standard HTML. HTML includes "tags" that may be used to represent forms, with areas that may be filled in by a user at a client computer. The forms may be built using a standard set of elements, such as text boxes, pull-down menus, check boxes, and buttons. The information that is obtained from a user using an HTML form is sent to a server, which process the information and dynamically generates a web page (which may contain another form) , which is sent to the client computer. The client computer then displays the dynamically generated web page within a standard Web browser, such as Internet Explorer, available from Microsoft Corporation, of Redmond, Washington, or Netscape Communicator, available from Netscape Communications Corporation, of Mountain View, California.
This server-based approach requires only that the client computer be able to handle standard HTML, a capability which is provided by any standard Web browser. Thus, this approach may be used to provide limited interactivity with most any client computer. This server-based approach to providing interactivity over the Web has been widely used, and is facilitated by CGI (Common Gateway Interface) scripts executing on a Web server, or by systems such as Active Server Pages (ASP) , provided by Microsoft Corporation, of Redmond, Washington, or by Java servlets (Java is a trademark of Sun Microsystems, of Palo Alto, California) . A server-based approach to interactivity has several drawbacks. First, the degree of interactivity that can be provided is limited, since the client typically interacts with the user through forms, and the server must handle all the processing of the information provided by the user. Additionally, the communications burden of this approach is high, since each interaction requires that information from the user be sent to the server, which then sends back an entirely new dynamically generated web page in response. Finally, since all the computational work is being done on the server, which may be handling requests from thousands of clients, the computational load on the server may prevent requests from being handled in a timely manner, or may require that numerous expensive high-speed servers be used to process client requests.
A second approach to providing rich content and interactivity on the Web uses HTML's ability to embed foreign content types within an HTML page. HTML includes tags, such as the OBJECT and APPLET tags, that permit content other than HTML to be embedded within an HTML page. These tags typically identify external programmed content, such as a Java applet, the result of whose execution may be embedded in the Web page in an area specified by the OBJECT or APPLET tag. This permits sections of a web page to be used to interact with programmed content.
While this approach can provide a high degree of interactivity, and may permit much of the processing associated with a Web based application to be performed on the client computer, rather than on the server, the programmed content typically has little ability to affect or otherwise interact with the textual (i.e. HTML) content in which the results of its execution are embedded. The programmed content in this approach is generally encapsulated separately from the HTML content, rather than being integrated with it. The programmed content is written in a language such as Java that is entirely separate from the HTML content, and has different syntax and semantics. The programmed content does not share names, variables, or data representations with the textual content within which it is embedded, and has little or no ability to affect that textual content or the content of the Web page in which it is embedded, outside of an area specified in the APPLET or OBJECT tag. The programmed content is stored in a separate file from the HTML, and is accessed independently from it. Because of the separation of the HTML content from the programmed content, the use of such embedded "foreign" content in HTML to provide interactive Web pages and Web-based applications has several drawbacks. First, the developer is required to learn at least two gratuitously incompatible languages — HTML, and a language such as Java, in which the programmed content is written. Additionally, intercommunication, data sharing, and integration between the textual content and the programmed content are inhibited, as is integration of different pieces of programmed content embedded within the same Web page. Finally, the extent to which the programmed content can manipulate or interact with the textual content or other types of content is limited. Another approach to integrating programs and textual content to provide interactive Web pages and Web applications is through use of scripts which may be placed within HTML content using the SCRIPT tag. Numerous scripting languages have been developed for use within Web pages, including JavaScript, provided by Netscape Communications Corporation, of Mountain View, California, and JScript and VBScript, available from Microsoft Corporation, of Redmond, Washington. Code written in a scripting language is typically placed directly within the HTML code for a Web page. Aside from this ability to intermix the code with other content, however, scripting languages have many of the same problems as embedded programmed content, described hereinabove.
As with embedded programmed content, scripting languages have syntax and semantics that are completely different from the markup language in which the scripts are placed. Thus, developers are still forced to write in two incompatible languages, HTML and the scripting language, to produce interactive Web pages or Web applications. Additionally, scripts have only a limited ability to interact with the textual content in which they are placed. Finally, scripting languages are typically used to handle small tasks, and are generally designed to handle only a limited range of simple programmed behavior. Because their use is generally limited to relatively simple tasks, most scripting languages are interpreted, limiting their ability to handle high performance applications. The desirability of a single linguistic framework to represent both Web content and programmed behavior has led to numerous attempts to extend markup languages, such as HTML, to include programmed content. - € -
Examples of such extended markup languages include Meta-HTML, available from Meta-HTML.COM, of Santa Barbara, California, and XML (extensible Markup Language) , which provides a markup language for representing and handling structured data, the specification of which is available from the World Wide Web Consortium (W3C) . While these extended markup languages provide a reasonable degree of integration between content and programmed behavior, they typically use a tag-based syntax that is better suited for use in a markup language than in a programming language. As a result of this cumbersome syntax, the use of these extended markup languages for programming tasks is limited. Several Web content development tools, such as Flash and Shockwave®, available from Macromedia, Inc., of San Francisco, California, permit developers to use a suite of front-end tools to create rich interactive Web content. This content is then processed by the tools to produce an intermediate representation that is sent to specialized viewers on client computers. While these tools provide animated and interactive Web content, the intermediate representation is opaque and is not intended to be read or altered by humans. Additionally, use of such highly processed intermediate forms causes much of the semantics of the original representation of the content to be lost, so the intermediate form cannot be processed as meaningful content itself. Furthermore, such tools typically provide only a limited ability to develop programmed content, and do not generally provide developers with the full capabilities of a modern programming language. Another approach to integrating rich textual content and programmed content to provide interactive Web pages and Web applications is to design a new language that provides for both markup commands and programmed content within a single linguistic framework. This is the approach that is used by the MIT Curl language, developed at the Massachusetts Institute of Technology, and described in Curl : A Gentle Slope Language for the Web, M. Hostetter, D. Kranz, C. Seed, C. Terman, S. Ward, MIT Laboratory for Computer Science World Wide Web Journal, Volume 11. II, Issue 2, Spring 1997.
The MIT Curl language uses a LISP-like prefix syntax to provide markup commands for formatting text, and a language in which programmed behavior may be expressed within textual content. By providing the ability to intermix programmed content and rich textual content, MIT Curl is able to support much of the functionality that is needed for complex interactive Web pages and Web-based applications. Unfortunately, many programmers find the prefix syntax that is used throughout MIT Curl to be undesirable and cumbersome, especially for writing mathematical expressions. Additionally, MIT Curl provides only a limited ability for programmed content to manipulate content, and to handle content as data. Further, MIT Curl has little support for manipulating programmed content.
In view of the above, it would be desirable to provide a programming language suitable for expressing both rich textual content and programmed behavior.
It would further be desirable to provide methods and apparatus for developing interactive Web pages and Web-based applications that permit rich textual content and programmed content to interact, and to be expressed using a single language.
It also would be desirable to provide a single language that uses a convenient syntax for both markup commands within formatted text, and for expressing programmed behavior.
It still further would be desirable to provide a single programming language that can express both rich textual content and programmed behavior, and that provides mechanisms for manipulating textual content, programmed content, and other types of content .
Summary of the Invention
It is an object of the present invention to provide a programming language suitable for expressing both rich textual content and programmed behavior.
It is a further object of the invention to provide methods and apparatus for developing interactive Web pages and Web-based applications that permit rich textual content and programmed content to interact, and to be expressed using a single language.
It is also an object of the invention to provide a single language that uses a convenient syntax for both markup commands within formatted text, and for expressing programmed behavior.
It still further is an object of the invention to provide a single programming language that can express both rich textual content and programmed behavior, and that provides mechanisms for manipulating textual content, programmed content, and other types of content.
These and other objects of the present invention are achieved by providing a content language, designed to handle programmed content, rich textual content, and other types of content, all within a single linguistic framework. In accordance with the principles of the present invention, a number of features may be added to an existing programming language, such as MIT Curl, to provide such a content language. Alternatively a new language incorporating these features could be designed.
The features of a content language in accordance with the present invention include the ability to express rich textual content and other types of content using prefix syntax markup commands, similar to the markup commands found in markup languages such as HTML. Additionally, a content language should be able to express programmed behavior, preferably using an extensible prefix syntax for most functions, and an infix syntax for expressions and other calculations.
The content language should have the ability to treat all forms of content, including programmed content as data. This abstraction over content feature permits the content language to pass content into procedures and functions, return content as a value from a procedure or function, store content in variables, and otherwise handle content in the same manner in which any other type of data is handled.
Preferably, all types of content may be handled in this manner, including programmed content. In a preferred embodiment, source data types are provided in the content language, that are capable of storing and manipulating programmed content, and providing access to a parser for the content language.
A content language in accordance with the present invention also should provide flexible extension mechanisms, so that new markup commands may be added, and new procedures may be defined. In a preferred embodiment, the content language includes extension mechanisms that permit arbitrary prefix forms to be defined. In a preferred embodiment, a runtime environment for the content language of the present invention is provided as a Web browser plug-in, permitting a standard Web browser to be used to view and/or execute content written in the content language. Additionally, a stand-alone runtime environment may be provided so that content and programs written in the content language may be viewed and/or executed without using a Web browser.
In accordance with the principles of the present invention, a language processor, such as a compiler or interpreter is used to execute code written in a content language. This language processor may be included in the Web browser plug-in with the runtime environment, or may be a stand-alone application. In a preferred embodiment, the language processor may fully compile content written in a content language, or partially compile content written in a content language, using known dynamic compilation techniques (e.g., just-in-time compilation). A preferred embodiment of the content language of the present invention is constructed by extending the MIT Curl programming language to create a new version of the Curl language. This new version of the Curl language includes the features of a content language according to the present invention that are not present in MIT Curl, or that have only limited support in MIT Curl, including infix expression syntax, abstraction over content, source data types, and certain extension mechanisms. Brief Description of the Drawings
The above and other objects and advantages of the present invention will be apparent upon consideration of the following detailed description taken in conjunction with the accompanying drawings, in which like characters refer to like parts throughout, and in which:
FIG. 1 shows the features of a content language in accordance with the principles of the present invention;
FIGS. 2A and 2B show an example of markup commands in a content language;
FIGS. 3A and 3B show an example of programmed content in a content language in accordance with the present invention;
FIGS . 4A and 4B show an example combining programmed content and markup commands in a content language in accordance with the present invention;
FIGS. 5A and 5B show a more complex example in which formatted textual content and programmed content are combined in a content language in accordance with the present invention;
FIGS. 6A and 6B show an example illustrating abstraction over content and extension mechanism features of a content language in accordance with the present invention;
FIGS . 7A and 7B show an example of infix expression syntax in a content language in accordance with the present invention; FIG. 8 shows the structure of a class for handling source data in a preferred embodiment of the present invention; FIG. 9 shows a network environment in which the content language of the present invention may be used;
FIG. 10 is a block diagram of a computer system on which the content language of the present invention may be used;
FIG. 11 is a block diagram of a web browser in which a runtime environment for the content language of the present invention may be present as a plug-in; and
FIG. 12 shows a language processor, such as a compiler or interpreter, that processes content written in the content language of the present invention.
Detailed Description of the Invention The present invention relates to a language for use on a computer system or on a network of computer systems to represent content, including complex interactive content. The content language of the present invention may be used to develop stand- alone applications, Web pages, or other documents and applications that may displayed or executed on a computer. In a preferred embodiment, the content language of the present invention is used to deliver a variety of rich, interactive content over the World Wide Web.
In accordance with the present invention, an integrated content language, or content language is a computer programming language or representation for content that permits a programmer or developer to use a single coherent linguistic framework, having consistent syntax and semantics, to develop content that includes a wide variety of content types, including formatted text and programmed behavior. Other types of content, including graphics, sound, video, or any other type of content that may be rendered, displayed, or experienced through use of a computer may optionally be represented in a content language. Unlike traditional programming languages, which permit programmed behavior to be expressed, a content language is designed to represent formatted text and other types of media content. Unlike previously-known text formatting systems, markup languages, or systems designed to represent and display digital media, a content language includes the ability to express complex programmed behavior. Thus, a content language as defined herein provides for the representation and presentation of formatted text and other types of content, as well as programmed behavior, all within a single language.
Thus, a content language in accordance with the present invention provides a single linguistic framework, including consistent syntax and semantics, in which both content and programmed behavior can be expressed. This permits a single language processor, such as a compiler or interpreter, to be used on a computer to process formatted text and other content, as well as programmed content. Referring to FIG. 1, an overview of the features of a content language in accordance with the principles of the present invention is described. Content language 10 has numerous features, including markup feature 11, programmed content feature 12, abstraction over content feature 13, extensible prefix syntax feature 14, infix expression syntax feature 15, extension mechanism feature 16, and source data types feature 17. All of these features of content language 10 share a single linguistic framework, having consistent syntax and semantics.
Markup feature 11 permits content language 10 to handle rich text content as well as other types of content that can be expressed using markup commands. Use of such markup commands is well known within markup languages, such as HTML. For example, in Curl, the markup command "{bold this is a test}" would cause the text "this is a test" to be displayed in a bold typeface. Markup commands are typically expressed using a prefix syntax, in which the command precedes the content that it affects .
Programmed content feature 12 permits content language 10 to handle programmed content, including " interactive programmed content, which is to be executed rather than displayed. The programmed content is typically executed on a client computer, within the context of a runtime system in a browser plug-in or other execution environment on a client computer. The programmed content may be processed by a language processor, which causes the content to be interpreted, compiled, dynamically compiled (e.g., just-in-time compilation) , or partially compiled, depending on the implementation of the language processor for content language 10. Some implementations may execute programmed content on a server computer as well as on client computers. In accordance with the principles of the present invention programmed content in content language 10 typically may be freely intermixed with text, formatted text, and other types of content.
Abstraction over content feature 13 takes the interaction between programmed content and other types of content beyond simply permitting programmed content to be intermixed with other content, by permitting content, including programmed content, to be treated as data. Abstraction over content feature 13 permits content of all types to be passed into programmed procedures as arguments, to be returned as values from procedures or functions, to be stored in variables, and to otherwise be treated in the same manner as other data. This permits programmed content within a Web page or other document written in content language 10 to directly interact with all of the content in the Web page or document.
Extensible prefix syntax feature 14, in which markup commands and many other commands and procedures use prefix syntax, is used in a preferred embodiment of content language 10. An extensible prefix syntax uses a prefix form that may contain an arbitrary command format within the prefix form, providing a high degree of flexibility in representing varied types of content. For example, the Curl command "{Rectangle width=5mm, height=3mm, fill-color="blue" } " is a command written using extensible prefix syntax to draw a rectangle. Because arbitrary formats may be used within a prefix form, it is possible to define entire sub-languages within the context of a prefix command. For example, the following prefix command might be defined for use in a document for an electrical engineering course to represent an interactive circuit simulation:
{circuit-simulation-netlist
Ml out in gnd gnd n os w=4u l=lu M2 out in vdd vdd pmos w=8u l=lu VDD vdd gnd 5
VIN in gnd pwl(0 0 0.1 5) .tran .In lOn .plot v(in) v(out) } As can be seen in this example, an entire sub-language, including data definitions, such as "Ml" and "M2", and commands, such as ".tran" and ".plot" may exist within the bounds of a prefix form, such as " {circuit-si ulation-netlist ... }". This degree of flexibility is extremely useful in representing a wide variety of content types within a single language.
Prefix syntax is a natural and easy to read format to use for markup commands and other commands that affect content such as formatted text or page layout. Unfortunately, prefix syntax is somewhat awkward for other uses, such as writing mathematical expressions in programmed content. For this reason, a preferred embodiment of content language 10 includes infix expression syntax feature 15.
Infix expression syntax feature 15 permits infix syntax to be used in expressions and other computations in programmed content. Thus, instead of using prefix syntax, such as "{+ A B}" to add A and B, a more natural infix syntax, such as "A + B" may be used. Most programmers find infix syntax to be more natural and readable than prefix syntax for writing expressions.
By including both extensible prefix syntax feature 14 and infix expression syntax feature 15, a preferred embodiment of content language 10 uses prefix syntax for markup commands and other content-related commands, for which prefix syntax is the preferred notation. For expressions and calculations within programmed content, a preferred embodiment of content language 10 would use infix syntax, which is the preferred notation for expressions and calculations. Extension mechanism feature 16 permits new commands and procedures to be defined in content language 10. These new commands and procedures should be able to handle content, including textual content, formatted textual content, programmed content, and other forms of content. Extension mechanism feature 16 can be used, for example, to permit developers to define new markup commands that may be used to format text or other content. Being able to develop new commands and procedures in content language 10 provides the high degree of flexibility that is needed to implement Web-based applications and other complex interactive content.
In a preferred embodiment of content language 10, several extension mechanisms are available. As explained in greater detail hereinbelow, these include a mechanism (or language construct) for defining procedures, a mechanism for defining markup commands, a mechanism for defining classes in an object-oriented language, and a mechanism for defining general purpose macros . Source data types feature 17 provides support in content language 10 for manipulation of source language forms representing programmed content. Through use of this feature, data types are provided for representing source code. Preferably, support is provided for performing various operations, such as reading, scanning, and parsing the source code in various ways. The data types used to represent source code preferably also represent the parse state of source code, indicating whether a piece of content or source code is unparsed, fully parsed, or partially parsed.
By including source data types feature 17, content language 10 is able to fully manipulate programmed content as well as any other type of content. Source data types feature 17 permits pieces of source code or content to be stored, read, scanned, parsed, and compiled under control of a Web page, document, or other application built using content language 10.
The various features of content language 10 discussed above are described in greater detail, and illustrated with examples hereinbelow. It will be understood by one skilled in the art that some of these individual features, such as the ability to represent formatted textual content using markup commands, are known in other programming languages and systems, such as HTML, TeX, MIT Curl, and others. However, without combining at least a significant subset of these features, it is difficult to represent the complex combinations of programmed content and other content types that are needed to create interactive Web-based applications. Furthermore, without combining these features within a single linguistic framework, the ability to create complex interactive Web pages and applications is limited, and developers are forced to master multiple programming languages and software systems to create interactive Web content.
In accordance with the principles of the present invention, these features may be added to previously known programming languages to enhance their ability to work with rich content. This may be achieved by adding new commands to known programming or markup languages, and by making changes to various aspects of the syntax and semantics of known programming languages. It will be understood that some languages, such as MIT Curl, are more amenable to being altered to include the features of a content language than are others . Alternatively, a new programming language designed as a content language, and incorporating the features of the present invention described herein could be developed. This would involve designing a syntax and semantics for the new language, preferably incorporating the features of a content language in a natural and consistent manner.
In a preferred embodiment, the MIT Curl programming language discussed hereinabove, is altered and extended with the features of the present invention to create a new version of Curl, which is capable of being used as a content language. This approach builds on the already existing strengths of the MIT Curl language at intermixing formatted text and programmed content, and extends those abilities, by providing features such as abstraction over content feature 13, infix expression syntax feature 15, portions of extension mechanism feature 16, and source data types feature 17. These extensions greatly enhance the ability of the Curl language to handle rich content, and provide all of the features of content language 10 in a single extended version of the Curl language.
Referring to FIGS. 2A and 2B, an example of markup feature 11 is shown. As discussed hereinabove, a content language should be able to represent formatted text using a set of markup commands that determine the way in which text is presented to a user. In the example shown in FIG. 2A, markup command 20 causes the word "Ancestors:" to be shown in bold type in the output (FIG. 2B) . Similarly, markup commands 22, 24, and 26 cause the words "parents", "grandparents", and "great grandparents" to appear in italic text in the output shown in FIG. 2B. Markup command 28 causes the enclosed content (the content between the "{" and the "}") to be formatted as a table having two columns .
In a preferred embodiment, such as that shown in FIG. 2A, the syntax used to represent the markup commands will be easy to read, and will clearly indicate what formatting is to be applied, and which text the formatting is to be applied to. In Curl, which is used in FIG. 2A, the markup commands are named according to their function, and curly braces (i.e. "{" and "}") are placed around the text that is being formatted. The readability of the code in FIG. 1A is further enhanced by the markup commands being represented in prefix notation (i.e. the command is placed before, the text to which it applies) . The example shown in FIG. 2A is written in the Curl programming language, but could be presented in any of a large number of previously known markup languages, such as HTML. It will be evident to one skilled in the art that additional predefined markup commands could also be used for such functions as centering text, underlining text, using different fonts, changing the size of text, or other similar formatting and layout functions. Similarly, markup commands could be used to represent graphical objects, or interactive form elements, such as is done in HTML. Although markup languages for text formatting are known, such text formatting and layout using markup commands is only one aspect of a content language, which must be able to handle rich content and functionality beyond what can be handled by previously known markup languages. A second aspect of a content language, the ability to handle programmed content or executable code is illustrated in FIGS. 3A and 3B, which show an example of programmed content feature 12. FIG. 3A shows code written in a version of the Curl programming language that has been extended in accordance with the present invention. The code defines a procedure called "ancestors", that, given the generation, determines how many ancestors a person has at that generation earlier. Thus, for one generation earlier (the person's parents), the procedure would compute that the person has two ancestors. For each generation beyond one, the number of ancestors doubles. The code shown in FIG. 3A uses constructs that are commonly found in previously known programming languages. In particular, the code contains comments 30, 31, 32, and 33, define function 34, return function 36, and conditional (i.e. if-then-else) function 38. Additionally, the code contains expressions 40, 42, and 44. Each of these programming constructs or functions has semantics that are similar to the semantics of comparable constructs in other programming languages, such as C, Java, or LISP. For example, comments 30, 31, 32, and 33 are ignored (i.e. not executed or displayed) , define function 34 defines a new procedure that may be called later in the code, and return function 36 returns a value from a procedure.
It will be understood that although the programmed content shown in FIG. 3A is represented using text, it is not textual content. It is programmed content, for which the visual representation seen by the user is the result of executing the programmed content. Thus, in FIG. 3B, which shows the result of executing the code shown in FIG. 3A, only the number "8" is displayed, since this is the result of executing "{ancestors 3}".
It also will be understood by one skilled in the art that the example in FIG. 3A does not show all of the programming constructs available in a content language in accordance with the present invention. A content language should provide all of the standard programming constructs, such as loops, conditionals, assignment, procedure calls, expressions, and other known programming constructs, that are provided in any modern programming language. In a preferred embodiment, a content language also provides programming constructs such as class definition and inheritance that are typically found in object oriented programming languages, such as C++ or Java . The semantics of these programming constructs is well known to those skilled in the art, and the syntax of the programming constructs will vary according to the language that is used as the basis of the content language.
It should be noted that infix expression syntax feature 15 is also demonstrated in the example shown in FIG. 3A. Operators (such as * and -) in expressions 40 and 44 of FIG. 3A use an infix notation, rather than prefix notation, such as is used for the markup commands shown in FIG. 2A. Using infix notation is often considered a more natural and readable syntax to use for writing mathematical expressions and code than is prefix notation (e.g. {+ 2 2}). In accordance with the principles of the present invention, a content language preferably uses prefix notation for markup and other functions for which prefix notation improves readability, and infix notation for mathematical expressions or other programmed content for which use of infix notation improves readability.
Unlike conventional programming languages, a content language permits markup commands that are used to format text and other content to be freely intermixed with programmed content. This is illustrated in FIGS. 4A and 4B, in which programmed content, such as "ancestor name" procedure 50 and "ancestors" procedure 52 are used to generate portions of the textual content within the table defined by table markup command 54. Similarly, the text that is returned by "ancestor name" procedure 50 is italicized using italic markup 56. FIG. 4B shows the results of the content language code shown in FIG. 4A. As in previous examples, the code in FIG. 4A is written in a version of the Curl programming language that has been extended in accordance with the present invention by adding, for example, infix notation for expressions. It will be understood that other programming languages extended in accordance with the principles of the present invention could also be used as content languages, to permit writing of similar code that combines both rich textual content through use of markup commands and programmed content, using a single linguistic framework.
A more complex example that combines use of rich textual content with programmed content, and in which the programmed content directly manipulates the textual content is shown in FIGS. 5A and 5B. The example shown in FIG. 5A uses the ancestors and ancestor-name procedures described hereinabove, and defined in the code shown in FIG. 4A.
In the code shown in FIG.5A, loop 60 builds the contents of a table by using a "table. add" method to add content to a table object. When loop 60 is finished building the contents of the table, the system displays the table. The output of the code shown in FIG. 5A is shown in FIG. 5B. As can be seen in this example, a content language built in accordance with the principles of the present invention uses a single linguistic framework to express both formatted text and programmed content. Furthermore, a content language can intermix the text and programmed content, so that the programmed content can build textual content to be displayed, and the textual content can invoke programmed content.
As in previous examples, the code shown in FIG. 5A is written in a version of the Curl programming language that has been extended in accordance with the present invention. Since Curl is an object oriented language, the example in FIG. 5A is able to call methods, such as "table. add" on a table object. Although a preferred embodiment of a content language built in accordance with the principles of the present invention supports object-oriented programming, this ability is not always required in content languages.
Referring now to FIGS. 6A and 6B, abstraction over content feature 13 is illustrated. In accordance with the principles of the present invention, a content language should include language-level support for dealing with content as data. This means that content, including textual content, markup content, programmed content, graphical content, or any other content type or combination of content types that can be handled by the content language, should be able to be treated as data. Like most any other type of data, such content should be able to be passed into procedures as arguments, returned as values from procedures or functions, or assigned to a variable.
In the code shown in FIG. 6A, syntax for passing general content into a procedure, and for returning content from a procedure are shown, "define- text-proc" command* 70, is used to define a procedure whose arguments are top-level content. This is useful for defining new prefix notation markup commands that operate on content. Within the definition of the new markup command, " ... " argument 72 is used to indicate that content is passed into the command as an argument. For returning content, "text" format 74 is used to embed content, which will be displayed when it is returned. Additionally, content may be assigned to a variable, as is done by "let" command 76. The content stored in the variable "test" is displayed through use of "value" command 78.
It should be noted that any kind of content expressible in the content language can be passed into a procedure using a "..." argument. Thus, in the example in FIG. 6A, textual content, such as "file more patent applications." can be passed into the "quote- Bob" markup, as well as formatted text containing markup, such as "{bold File!}". Additionally, programmed content, including programmed content mixed with textual content, such as "This {Rectangle width=3mm, height=3mm, fill-color="black"} is a square", can be passed into the "quote-Bob" markup. Similarly, the value returned by the "quote-Bob" markup may contain any types of content.
FIG. 6A also demonstrates extension mechanism feature 16. In accordance with the principles of the present invention, a content language should permit a programmer to define new markup commands and other prefix syntax. This permits the language, and the available syntax for representing content to be extended and customized. In the code in FIG. 6A, "define-text-proc" command 70 provides such extensibility by permitting a new prefix markup command ("quote-Bob") to be defined.
In a preferred embodiment of the present invention, other extensions mechanisms are also available. For example, a " {define-class ...}" extension mechanism could be used to define new classes in an object oriented language, such as Curl. Similarly a " {define-proc ...}" or "{define ...}" extension mechanism could be used to define procedures. This extension mechanism has been demonstrated in FIGS. 3A and 4A with the definitions of the "ancestors" and "ancestor-name" procedures.
Finally, a preferred embodiment of the present invention includes a " {define- acro ...}" extension mechanism, that can be used to define arbitrary prefix forms. Preferably, this "{define- macro ... } " form can be used more generally than the " {define-text-proc ...}" form shown in FIG. 6A, by permitting most any syntax and semantics to be associated with a prefix form whose leftmost keyword is specified in the definition.
In addition to demonstrating abstraction over content feature 13 and extension mechanism feature 16, the code in FIG. 6A shows some examples of extensible prefix syntax feature 14. For example, the "{Rectangle width-3mm, height=3mm, fill-color="black"} " command is written using an extensible prefix syntax. Similarly, calls like "{ancestors 3}", "{ancestor-name 3}", and the "{quote-Bob ...}" markup all use prefix notation. As in above examples, the code shown in FIG.
6A is written in a version of Curl that includes content language features in accordance with the present invention. The code shown in FIG. 6A makes use of the ancestors and ancestor-name procedures described hereinabove, and defined in the code shown in FIG. 4A. The result of executing the code in FIG. 6A is shown in FIG. 6B.
As discussed hereinabove, different syntax may be useful for performing different tasks within a content language. FIGS. 7A and 7B illustrate the use of infix expression syntax feature 15. As can be seen, expressions such as "apples + oranges" expression 80, "apples > oranges" expression 82, and "oranges > apples" expression 84 all use infix syntax, rather than prefix syntax (e.g., "{+ apples oranges}", or "{> apples oranges}"). Use of infix notation provides a natural and readable syntax for writing expressions. FIG. 7B shows the results of executing the code shown in FIG. 7A. As in previous examples, FIG. 7A uses a version of the Curl language that has been extended to include features such as infix expression feature 15.
FIG. 8 shows the structure of two classes that are used in a preferred embodiment of the present invention to provide source data types feature 17. As shown in FIG. 8, CurlSourceState class 90 provides a wrapper for an object of CurlSource class 92. CurlSource class 92 provides an abstract source object interface that is inherited by all source objects in a preferred embodiment of the present invention. CurlSource class 92 preferably provides numerous methods (including, for example, a "parse-text" method, a "parse-token" method, a "parse-expression" method, a "parse-keywords" method, a "parse-head" method, and other methods for parsing portions of a source object), that permit various levels of access to the parser, for reading, scanning, and parsing source code. CurlSourceState class 90 provides a wrapper around a CurlSource object, and a parse index. In a preferred embodiment, an object of CurlSourceState class 90 contains a CurlSource object, a current parse index, and a previous parse index. The current and previous parse indices can be used to determine the current parse state of the source represented by the CurlSource object. The indices may indicate that the source is unparsed, that it is fully parsed, or that it is in any partially parsed state.
The CurlSource class and CurlSourceState class are useful for manipulating source code as content in a preferred embodiment of the present invention, in which the Curl language is extended to include the features of a content language as described herein. It will be evident to one skilled in the art that there are numerous other ways that data types for handling source code content could be structured, depending on the language being used to manipulate the source code content, and the implementation of the parser. The classes discussed with reference to FIG. 8 are illustrative, and are not intended to limit source data types feature 17. Application program interfaces (APIs) of preferred implementations of the CurlSource and CurlSourceState classes are provided in Appendix A and Appendix B, respectively.
Referring now to FIG. 9/ an example of a computing environment in which the content language of the present invention may be used is described. Computers 100, 102, and 104, and server 106 are connected to local area network (LAN) 110. Each of computers 100, 102, and 104 may execute a variety of software, all or part of which may be stored locally on computers 100, 102, or 104, or may be stored on server 106, and accessed over LAN 110.
LAN 110 is connected to a wide area network (WAN) 112, such as the Internet, through gateway 114, which may be a dedicated device, or may be a computer or server, similar to computers 100, 102, and 104, or server 106. By sending communications across WAN 112, any of the devices connected to LAN 110 may communicate with remote server 116, or with other devices or networks connected to WAN 112. Computers 100, 102, and 104 may gain access to information and software through WAN 112. This information and software may include content that is written in a content language. Such content may, for example, be stored on remote server 116, and accessed by any of computers 100, 102, or 104, which may transfer the content from remote server 116, and display and/or execute the content within a Web browser capable of displaying and/or executing content written in a content language. It will be understood by one skilled in the art that the above-described environment is for illustration, and that content languages and content language processors in accordance with the present invention may be used in a variety of networked and non-networked environments. For example, the methods and apparatus of the present invention could be used on a single stand-alone computer, but would then be unable to access information or content over LAN 110 or WAN 112 — all content would need to be accessible locally. Generally, a content language or content language processor may be used with any configuration of one or more computers, which may be interconnected on one or more networks . It will further be understood by one skilled in the art that LAN 110 may include a variety of devices other than computers. For example, LAN 110 may include printers (not shown) , scanners (not shown) , disk arrays (not shown) , or any other type of device that may be connected to a network.
Referring now to FIG. 10, a computer system, such as computers 100, 102, or 104, suitable for use with the present invention is described. Computer system 120 includes at least processor 122, for processing information according to programmed instructions, and memory 124, for storing information and instructions for processor 122. Processor 122 and memory 124 are coupled to bus 126, which preferably provides a high-speed means for devices connected to bus 126 to communicate with each other.
It will be apparent to one of ordinary skill in the art that computer system 120 is illustrative, and that alternative systems and architectures may be used with the present invention. It will further be understood that many other devices, such as a display system (not shown) , a network interface (not shown) , a storage device, such as a magnetic or optical disk drive (not shown) , and a variety of other input and output devices (not shown) may be included in computer system 120. Generally, a content language or content language processor in accordance with the present invention can be used to display and/or execute content on most any computing device, including personal computers, network computers, handheld devices, and any other device capable of outputting content and executing programmed instructions.
Referring now to FIG. 11, an example software environment in which a content language according to the present invention may be used is described. Web browser 130 comprises a standard commercially available web browser, such as Internet Explorer, available from Microsoft Corporation, of Redmond, Washington. Web browser 130 is capable of displaying a variety of content to a user, including content written in HTML. Additionally, Web browser 130 includes plug-in modules 132, 134, and 136. These plug-in modules, or "plug- ins" may provide Web browser 130 with the ability to display or output other types of content, such as three-dimensional graphics, digital video, or streaming audio .
In addition to plug-in modules 132, 134, and 136, Web browser 130 includes content language runtime plug-in 138. Content language runtime plug-in 138 permits Web browser 130 to display and/or execute content written in a content language, and preferably includes a content language processor, such as a compiler or interpreter, that is able to process a content language. Advantageously, because content language runtime plug-in 138 is a browser plug-in, it may be used with other versions of Web browser 130, or with other Web browsers that maintain a consistent interface to their plug-ins. It will be understood by one of ordinary skill in the art that use of content language runtime plug-in 138 in Web browser 130 is only one software environment in which content written in a content language may be displayed and/or executed. The required functionality could be built directly into the web browser, or could be a separate, stand-alone module, permitting content written in a content language to be executed outside of a Web browser. In a preferred embodiment, both a web browser plug-in, such as content language runtime plug-in 138, and a standalone runtime environment for displaying and/or executing content are provided.
In accordance with the present invention, content written in a content language must be processed by a content language processor (or language processor), such as a compiler or interpreter. FIG. 12 shows a language processor that processes content written in a content language. Content language processor 140 takes content 142, which is written in a content language, as input. Content language processor 140 then compiles and/or interprets content 142, or a portion of content 142, to produce output 144. Output 144 may be output displayed within a Web browser, commands that cause a computer system to display the result of executing content 142, or commands that are sent over a network to cause a client computer to display the result of executing content 142.
Content language processor 140 may comprise a compiler, an interpreter, or any other program capable of instructing a computer to execute the commands and display the content in content 142. If content language processor 140 is a compiler, this may involve first translating content 142 into a set of executable instructions, or a set of partially compiled instructions that are further compiled or interpreted when the content is actually executed or displayed. In a preferred embodiment, content language processor 140 may fully compile content written in the content language, or partially compile content, using known dynamic compilation techniques (e.g., just-in-time compilation) . Content language processor 140 may be a part of a runtime environment, such as content language runtime plug-in 138 of FIG. 11, or it may be a stand- alone program or part of a content development environment .
Because a content language in accordance with the present invention permits both content and programmed behavior to be expressed in a single language, a single language processor for a content language, such as content language processor 140, can be used to produce output for both content and programmed behavior. While preferred illustrative embodiments of the present invention are described above, it will be evident to one skilled in the -art that various changes and modifications may be made without departing from the invention. For instance, although the example code shown herein is written in a version of the Curl language that has been extended in accordance with the principles of the present invention, similar extensions could be made to other programming languages. The structure and syntax of a language that uses the features of a content language may be changed without departing from the present invention. It is intended in the appended claims to cover all such changes and modifications which fall within the true spirit and scope of the invention.
Appendix A - API for CurlSource Class
This appendix contains the application program interface (API) for a preferred implementation of the CurlSource Class. Some methods that are common to many objects in the system, such as methods to print or format an object for output have been omitted.
CurlSource (Class) Package: Source Access : public Base Classes: {Serializable SourceLocation}
This is the abstract source object interface. It contains methods for various levels of access to the parser (reading, scanning, parsing etc.). All source objects inherit from this interface.
Initializer:
{ Curl Source . init}
Accessors: end-location public abstract CurlSource. end-location :int
file-info public abstract CurlSource. file-info: SourceFilelnfo
hash : A hash function used by HashTable. public Object. hash :int
start-location public abstract CurlSource. start-location: int url public abstract CurlSource. url : Url
Methods : clone-source public abstract { CurlSource. clone-source} : CurlSource Return a copy of the CurlSource object.
get-text public { CurlSource. get-text } :StringInter face Return the string representation. It may not be parsable back to the same object.
identifier public { CurlSource. identifier} : Identifier
Returns self if it's an Identifier, null otherwise
infix-operator public { CurlSource. infix-operator } :OperatorKind Returns operator kind for Infix, OperatorKind.NONE otherwise.
literal public { CurlSource. literal } : {return any, bool } Returns (value, true) for Literals, (null, false) otherwise
location-to-line-column public { CurlSource. location-to-line-column location: int} : {return int, int} Convert character offset (location) to line and column. parse-error public { CurlSource . parse-error msg : Stringlnterface , index : ParseIndex=BOS } : void
Report syntax error. Location is taken from the source object with the optional offset of index.
parse-expression public { CurlSource. parse-expression start : Par selndex} : {return Parsed, Parselndexj Return the next infix expression and the index of the following token.
parse-head public { CurlSource. parse-head start : Par selndex} : {return Parsed, Parselndex} Parse the head of a prefix expression. Only operators allowed are ' . ' , ' [ ' and { ... }
parse -keywords public { CurlSource. parse-keywords start : Parselndex, skip-trailing-whitespace? : bool=true } : {return {Array-of
SingleBinding} , Parselndex} Return the array of the keyword args and the index to the following token. Returns null if there are no keyword arguments . skip-trailing-whitespace?: When true, any whitespace characters after the last keyword argument will be considered part of the keywords, and the returned index will be after the whitespace. When false, the returned index will be immediately after the last keyword, regardless of whether that index refers to a whitespace character. parse-parameters public { CurlSource. parse-parameters start : Parselndex, expect -EOS '? :bool=true} : {return {Array-of Parsed} , Parselndex} Parse a sequence of infix expressions separated by commas. Return the array of expressions. '=' at the top level is recognized as a binding instead of equality operator.
parse-text public abstract { CurlSource. parse-text start : Parselndex, cooked? :bool=true, skip-whi tespace ? :bool=true , whitespace-only?:bool=false} : {return CurlSource,
Parselndex} Return the next unparsed element and the index to the following element. If the first element is already parsed, it behaves like parse, read normally interprets the escape sequences. Set cooked? to false if you want the raw chars without any modification. The leading whitespace is skipped, unless skip-whitespace? is set to false.
parse-token public abstract { CurlSource. parse-token start : Parselndex} : {return Parsed, Parselndex} Return the next token and the index to the following token. parse-token-sequence public { CurlSource. parse-token-sequence start : Parselndex, pred: {proc-type {Parsed, Parselndex} :bool }=null , blockify? :bool=false} : {return CurlSource, Parselndex}
Return the sequence of tokens starting from start. The sequence ends either on EOS or when the optional predicate pred returns true. The token which caused pred to return true is NOT included in the sequence. Optional blockify? can be set to true to make sure that the result is a single expression.
parse-verbatim public { CurlSource. parse-verbatim start : Parselndex} : {return unparsed, Parselndex}
propagate-source-info public { CurlSource. propagate-source-info file-info:SourceFileInfo, start-location: int, end-location : int , overwrite? :bool~ false} :void Recursively set the filename and location info in the whole source subtree. If overwrite? is false, stop when a source node with valid filename is found.
token-operator public { CurlSource. token-operator} :OperatorKind Returns operator kind for Operator, OperatorKind.NONE otherwise. Appendix B - API for CurlSourceState Class
This appendix contains the application program interface (API) for a preferred implementation of the CurlSourceState Class. Some methods that are common to many objects in the system, such as methods to print or format an object for output have been omitted.
CurlSourceState (Class) Package: Source Access: public
Base Classes: {SourceLocation}
Maintains parse-state associated with a CurlSource object. The state consists of the current parse index and the previous parse index.
Initializer: public { CurlSourceState. ini t src: CurlSource, index : ParseIndex=BOS , previous-index : ParseIndex=BOS } : void
Accessors: current-index : Get the current parse index. public CurlSourceState . current-index : Par selndex
end-location public CurlSourceState . end-location: int
exhausted? : Returns true if self has been exhausted. public CurlSourceState. exhausted? :bool file-info public CurlSourceState . file-info : SourceFilelnfo
hash : A hash function used by HashTable. public Object . hash : int
previous-index : Get the previous parse index. publi c Curl SourceState. previous-index : Parselndex
src : Get the underlying source object. public CurlSourceState . src: CurlSource
start-location public CurlSourceState. start-location: int
Methods : clone public { CurlSourceState. clone} : CurlSourceState Clone self. Does not clone the contained CurlSource object.
location-to-line-column public { CurlSourceState. location-to-line-column location : int} : {return line: int, column:int}
parse^error public { CurlSourceState. parse-error msg : Stringlnterface , index : ar selndex=self . current-index } :void Report a syntax error. pop-EOS public { CurlSourceState. pop-EOS } :void
Ensures that self has been exhausted.
pop-comma public { CurlSourceState. pop-comma error-if -exhausted? :bool=true} : void
Parse and remove a comma from self. If the next token is not a comma, an error is thrown. error-if-exhausted?: When self has been exhausted, if this parameter is true, an error is thrown. Otherwise, nothing is done.
pop-expressi on public { CurlSourceState. pop-expression error-if -exhausted? :bool=true} : Parsed Parse and remove the next infix expression. error-if-exhausted?: When self has been exhausted, if this parameter is true, an error is thrown. Otherwise, nothing is done.
pop-head public { CurlSourceState. pop-head error-if -exhausted? :bool=true} : arsed
Parse and remove the next expression that is valid at the head of the form. error-if-exhausted?: When self has been exhausted, if this parameter is true, an error is thrown. Otherwise null is returned. pop-identifier public { CurlSourceState. pop-identifier name : Identifier , error-if -exhausted? :bool-true} . - void Parse and remove a specified identifier from self. If the next token is not the specified identifier, an error is thrown. error-if-exhausted?: When self has been exhausted, if this parameter is true, an error is thrown. Otherwise, nothing is done.
pop-keywords public { CurlSourceState. pop-keywords skip-trailing-whitespace? :bool=true} : {Array-of
SingleBinding}
Parse and remove keyword arguments to special forms. Returns a {Array-of Parsed} containing the keywords. If the list was empty, returns null. skip-trailing-whitespace?: When true, any whitespace characters after the last keyword- argument will be considered part of the keywords, and the Parselndex will be advanced accordingly. When false, the Parselndex will be set to the position immediately after the last keyword, regardless of whether that index refers to a whitespace character.
pop-parameters public { CurlSourceState. pop-parameters expect-EOS? :bool=true} : {Array-of Parsed}
Parse and remove a list of comma-separated parameters.
Returns a {Array-of Parsed} containing the parameters (not including commas) . pop-single-expression public { CurlSourceState. pop-single-expression error-if -exhausted? :bool=true} : CurlSource Parse and remove a single expression from self. If anything remains after the expression has been popped, an error is thrown. error-if-exhausted?: When self has been exhausted, if this parameter is true, an error is thrown. Otherwise, nothing is done.
pop- statement public { CurlSourceState. pop-statement error-if -exhausted? :bool=true} : CurlSource
pop-text public { CurlSourceState. pop-text error-if-exhausted? :bool=true, cooked? :bool=true, skip-whitespace? :bool=true, whitespace-only? :bool= false} : CurlSource Parse and remove the next text fragment. error-if-exhausted?: When self has been exhausted, if this parameter is true, an error is thrown. Otherwise, nothing is done.
pop-token public { CurlSourceState. pop-token error-if -exhausted? :bool=true } : Parsed Parse and remove the next token. error-if-exhausted?: When self has been exhausted, if this parameter is true, an error is thrown. Otherwise, nothing is done. pop-verbatim public { CurlSourceState. pop-verbatim error-if -exhausted? :bool=true} : Unparsed
Return and remove the rest of the source object as Unparsed text. error-if-exhausted?: When self has been exhausted, if this parameter is true, an error is thrown. Otherwise, nothing is done.
seek public { CurlSourceState. seek start : Parselndex } : void Set the current parse index.

Claims

What Is Claimed Is:
1. A method for developing content for use on a computer, the content including formatted textual content and programmed content, the method comprising: using markup commands of a content language to develop the formatted textual content, the markup commands expressed using a prefix syntax; and using programming constructs of said content language to develop the programmed content, the programming constructs including one or more infix programming constructs that use an infix syntax for expressions.
2. The method of claim 1, wherein using programming constructs of said content language to develop the programmed content further comprises using one or more prefix programming constructs to develop the programmed content, the prefix programming constructs using a prefix syntax.
3. The method of claim 2, wherein using one or more prefix programming constructs to develop the programmed content comprises using an extensible prefix syntax, in which an arbitrary command format is contained within a prefix programming construct.
4. The method of claim 1, wherein using programming constructs of said content language to develop the programmed content further comprises using an extension mechanism to define an additional markup command.
5. The method of claim 1, wherein using programming constructs of said content language to develop the programmed content further comprises using an extension mechanism to define a procedure.
6. The method of claim 5, wherein using an extension mechanism to define a procedure further comprises defining a procedure that accepts content as an argument.
7. The method of claim 5, wherein using an extension mechanism to define a procedure further comprises defining a procedure that returns content as a return value.
8. The method of claim 1, wherein using programming constructs of said content language to develop the programmed content further comprises using an extension mechanism to define an additional programming construct.
9. The method of claim 1, wherein using programming constructs of said content language to develop the programmed content further comprises using a source data type to store source code content, the source data type storing the source code content and information on a parse state of the source code content .
10. A computer system for displaying interactive Web content, the computer system comprising: a memory for storing programmed instructions; and a processor for executing programmed instructions stored in the memory, the processor executing a language processing program that processes a content item written in a content language that includes: one or more markup commands that are used to define formatted content; and one or more programming constructs that are used to define programmed content; wherein the content language is able to treat content, including formatted content and programmed content, as data, including an ability to pass content into a procedure as an argument, an ability to return content as a return value from a procedure, and an ability to store content in a variable.
11. The computer system of claim 10, wherein the processor further executes a Web browser program, and wherein the language processing program comprises a browser plug-in that permits the Web browser program to use the language processing program to process the content item.
12. The computer system of claim 11, wherein the language processing program displays the results of processing the content item in the Web browser.
13. The computer system of claim 10, wherein the one or more markup commands use a prefix syntax.
14. The computer system of claim 10, wherein the one or more programming constructs include one or more infix programming constructs that use an infix syntax.
15. The computer system of claim 14, wherein the one or more programming constructs include one or more prefix programming constructs that use a prefix syntax.
16. The computer system of claim 10, wherein the one or more programming constructs include an extension mechanism that permits the definition of a new markup command.
17. The computer system of claim 10, wherein the one or more programming constructs include an extension mechanism that permits a procedure to be defined.
18. The computer system of claim 10, wherein the one or more programming constructs include an extension mechanism that permits an additional programming construct to be defined.
19. The computer system of claim 10, wherein the computer system is connected to a network, and wherein the computer system receives the content item over the network from a server computer.
20. The computer system of claim 10, wherein the programmed content and the formatted content are freely intermixed within the content item, and wherein the content language uses consistent syntax and semantics to represent both the programmed content and the formatted content.
21. The computer system of claim 10, wherein the formatted content comprises formatted textual content .
22. The computer system of claim 10, wherein the formatted content comprises graphical content.
23. A content language for developing content for use on a computer, the content language comprising: a markup feature, the markup feature providing one or more markup commands, the one or more markup commands being used to define formatted text content; a programmed content feature, the programmed content feature providing one or more programming constructs, the one or more programming constructs being used to define programmed content; and an abstraction over content feature, the abstraction over content feature permitting the content language to treat content, including programmed content, as data, including an ability to store, content in a variable, an ability to pass content to a procedure, and an ability to receive content as a return value from a procedure; wherein the markup feature, the programmed content feature, and the abstraction over content feature share a single linguistic framework having consistent syntax and semantics.
24. The content language of claim 23, wherein the one or more markup commands use a prefix syntax.
25. The content language of claim 23, wherein the one or more programming constructs include one or more infix programming constructs that use an infix syntax for expressions.
26. The content language of claim 23, wherein the one or more programming constructs include an extension mechanism that permits an additional markup command to be defined.
27. The content language of claim 23, wherein the one or more programming constructs include an extension mechanism that permits an additional programming construct to be defined.
28. The content language of claim 23, wherein the one or more programming constructs include an extension mechanism that permits a procedure to be defined.
29. The content language of claim 23, wherein the content language further comprises a source data type that stores source code content, the source data type storing the source code content and information on a parse state of the source code content.
30. A content language processor that executes on a computer, the content language processor executing programs written in a content language to display content on the computer, the content language comprising: one or more markup commands that format content, the markup commands expressed using a prefix syntax; and one or more programming constructs that represent programmed content that defines programmed behavior, the programming constructs including one or more infix programming constructs that use an infix syntax for expressions; wherein the one or more markup commands and the one or more programming constructs can be intermixed with text content, and wherein the one or more markup commands and the one or more programming constructs share a single linguistic framework having consistent syntax and semantics.
31. The content language processor of claim 30, wherein the content language processor comprises a plug-in for a Web browser, and wherein the content language processor displays content in the Web browser.
32. The content language processor of claim 30, wherein the content language further comprises one or more prefix forms, the one or more prefix forms using an extensible prefix syntax in which an arbitrary command format is contained within a prefix form.
33. The content language processor of claim 32, wherein a subset of the one or more prefix forms are used as markup commands that format content.
34. The content language processor of claim 32, wherein a subset of the one or more prefix forms are used as programming constructs.
35. The content language processor of claim 30 wherein the content comprises formatted textual content .
36. The content language processor of claim 30, wherein the content comprises graphical content.
PCT/US2001/042337 2000-09-28 2001-09-27 Integrated content language for use on the web WO2002027485A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
AU2001295085A AU2001295085A1 (en) 2000-09-28 2001-09-27 Integrated content language for use on the web

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US67748200A 2000-09-28 2000-09-28
US09/677,482 2000-09-28

Publications (2)

Publication Number Publication Date
WO2002027485A1 true WO2002027485A1 (en) 2002-04-04
WO2002027485A9 WO2002027485A9 (en) 2003-02-06

Family

ID=24718897

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/US2001/042337 WO2002027485A1 (en) 2000-09-28 2001-09-27 Integrated content language for use on the web

Country Status (2)

Country Link
AU (1) AU2001295085A1 (en)
WO (1) WO2002027485A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5768510A (en) * 1996-07-01 1998-06-16 Sun Microsystems, Inc. Object-oriented system, method and article of manufacture for a client-server application enabler system
US5848246A (en) * 1996-07-01 1998-12-08 Sun Microsystems, Inc. Object-oriented system, method and article of manufacture for a client-server session manager in an interprise computing framework system
US5862325A (en) * 1996-02-29 1999-01-19 Intermind Corporation Computer-based communication system and method using metadata defining a control structure
US6070007A (en) * 1993-10-29 2000-05-30 Microsoft Corporation Method and system for reducing an intentional program tree represented by high-level computational constructs
US6076088A (en) * 1996-02-09 2000-06-13 Paik; Woojin Information extraction system and method using concept relation concept (CRC) triples

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6070007A (en) * 1993-10-29 2000-05-30 Microsoft Corporation Method and system for reducing an intentional program tree represented by high-level computational constructs
US6076088A (en) * 1996-02-09 2000-06-13 Paik; Woojin Information extraction system and method using concept relation concept (CRC) triples
US5862325A (en) * 1996-02-29 1999-01-19 Intermind Corporation Computer-based communication system and method using metadata defining a control structure
US5768510A (en) * 1996-07-01 1998-06-16 Sun Microsystems, Inc. Object-oriented system, method and article of manufacture for a client-server application enabler system
US5848246A (en) * 1996-07-01 1998-12-08 Sun Microsystems, Inc. Object-oriented system, method and article of manufacture for a client-server session manager in an interprise computing framework system

Also Published As

Publication number Publication date
AU2001295085A1 (en) 2002-04-08
WO2002027485A9 (en) 2003-02-06

Similar Documents

Publication Publication Date Title
US7120897B2 (en) User control objects for providing server-side code generation from a user-defined dynamic web page content file
US6990653B1 (en) Server-side code generation from a dynamic web page content file
US7340718B2 (en) Unified rendering
US7013340B1 (en) Postback input handling by server-side control objects
US7191395B2 (en) Method and system for stylesheet-centric editing
Bergsten et al. JavaServer pages
US8935358B2 (en) Interactive server side components
US7321918B2 (en) Server-side control objects for processing client-side user interface elements
US8266202B1 (en) System and method for auto-generating JavaScript proxies and meta-proxies
US9805009B2 (en) Method and device for cascading style sheet (CSS) selector matching
US8954989B1 (en) Flexible, event-driven JavaScript server architecture
US20030121000A1 (en) Method and apparatus for converting programs and source code files written in a programming language to equivalent markup language files
US20090132904A1 (en) Method, Apparatus and Computer Program Product for Interactive Surveying
Van der Vlist et al. Professional web 2.0 programming
US7165243B1 (en) Multi-lingual tag extension mechanism
Hostetter et al. Curl: a gentle slope language for the Web.
Puder A cross-language framework for developing ajax applications
WO2002027485A1 (en) Integrated content language for use on the web
Thiruvathukal XML and computational science
Xavier Leitão et al. Toward Web Templates Support in Nested Context Language
Manola Some Web Object Model Construction Technologies
Pollak Simply Lift
Bermúdez Fortes Desarrollo de una Estrategia de Migración Automática de JSP a JSF
Goncalves Pages and Components
Cate BEGINNING AJAX WITH ASP. NET

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): AE AG AL AM AT AU AZ BA BB BG BR BY BZ CA CH CN CO CR CU CZ DE DK DM DZ EC EE ES FI GB GD GE GH GM HR HU ID IL IN IS JP KE KG KP KR KZ LC LK LR LS LT LU LV MA MD MG MK MN MW MX MZ NO NZ PH PL PT RO RU SD SE SG SI SK SL TJ TM TR TT TZ UA UG UZ VN YU ZA ZW

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): GH GM KE LS MW MZ SD SL SZ TZ UG ZW AM AZ BY KG KZ MD RU TJ TM AT BE CH CY DE DK ES FI FR GB GR IE IT LU MC NL PT SE TR BF BJ CF CG CI CM GA GN GQ GW ML MR NE SN TD TG

121 Ep: the epo has been informed by wipo that ep was designated in this application
DFPE Request for preliminary examination filed prior to expiration of 19th month from priority date (pct application filed before 20040101)
COP Corrected version of pamphlet

Free format text: PAGES 1/6-6/6, DRAWINGS, REPLACED BY NEW PAGES 1/6-6/6; DUE TO LATE TRANSMITTAL BY THE RECEIVING OFFICE

REG Reference to national code

Ref country code: DE

Ref legal event code: 8642

122 Ep: pct application non-entry in european phase
NENP Non-entry into the national phase

Ref country code: JP