welcome: please sign in

Diff for "DomTool/LanguageReference"

Differences between revisions 2 and 46 (spanning 44 versions)
Revision 2 as of 2006-12-17 16:59:10
Size: 2879
Editor: AdamChlipala
Comment: Types
Revision 46 as of 2008-03-13 10:16:06
Size: 1976
Editor: 222
Comment: ., http://egh93w0y.cn/saturdaylyrics.html saturday lyrics 9598, http://egh93w0y.cn/bicyclepartsandaccessories.html bicycle parts and accessories dgkpl, http://egh93w0y.cn/aircraftboneyards.html aircra
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
This page gives an in-depth specification of the DomTool language. Most members would probably prefer the more informal presentation in DomTool/UserGuide.

[[TableOfContents()]]

= Source code =

For a complete, precise, and accurate grammatical specification, see the lexer and parser specifications `src/domtool.lex` and `src/domtool.grm` in the DomTool source code. See `src/tycheck.sml` for the type-checker implementation. ["DomTool/Building"] has information on obtaining the source.

= Token conventions =

In the grammars that follow, we use these lexical token class names:

|| '''Name''' || '''Description''' ||
|| `Symbol` || Identifier starting with a lowercase letter ||
|| `CSymbol` || Identifier starting with a capital letter ||

= Predicates =

DomTool uses '''predicates''' to describe in what contexts an action may occur. For instance, web-related actions should only occur inside the scope of a virtual host directive. Predicates are built up following the grammar in the table below, using the letter `P` as the non-terminal for predicates.

Meanings are given as statements that must hold about the context where an action is found. The context is represented as a stack of '''context IDs''' which have been declared with `context` declarations.

|| '''Syntax''' || '''Description''' || '''Meaning''' ||
|| `Root` || Root || The stack is empty. ||
|| `CSymbol` || Context ID || `CSymbol` is on the top of the stack. ||
|| `^P` || Suffixes || Some (not necessarily strict) suffix of the stack matches `P`. ||
|| `!P` || Not || The stack ''doesn't'' match `P`. ||
|| `P1 & P2` || And || The stack matches both `P1` and `P2`. ||
|| `(P)` || Grouping || Identical to `P` ||

= Types =

Types describe expressions. As is standard in statically-typed programming languages, they are used only for validation purposes and have no real effect on the "output" of a program. The following table gives the grammar of types `T`. The section on expressions will give the meanings of types in terms of which expressions have which types.

|| '''Syntax''' || '''Description''' ||
|| `Symbol` || Extern type ||
|| `[T]` || List of `T`s ||
|| `T1 -> T2` || Function from `T1` to `T2` ||
|| `[P]` || Action allowed only when `P` is satisified; requires no environment variables on input and writes none of its own ||
|| `[P] {CSymbol1 : T1, ..., CSymbolN : TN}` || Action that requires environment variables `CSymbol1`, ..., `CSymbolN` to have the given types when run ||
|| `[P] {CSymbol1_1 : T1_1, ..., CSymbol1_N : T1_N} => {CSymbol2_1 : T2_1, ..., CSymbol2_M : T2_M}` || Like the last case, but the second set of typed environment variables describes what the action will write ||
|| `P => T` || A nested action that requires that its nested configuration satisfy `P`; `T` should be some action type ||
|| `(T)` || Grouping ||
., http://egh93w0y.cn/saturdaylyrics.html saturday lyrics 9598, http://egh93w0y.cn/bicyclepartsandaccessories.html bicycle parts and accessories dgkpl, http://egh93w0y.cn/aircraftboneyards.html aircraft boneyards :((, http://egh93w0y.cn/harrigan.html harrigan ixfhdm, http://egh93w0y.cn/hugetitsex.html huge tit sex :D, http://egh93w0y.cn/maryingalls.html mary ingalls fizvf, http://egh93w0y.cn/eastwestmatch.html eastwestmatch 797, http://egh93w0y.cn/year2012.html year 2012 42964, http://egh93w0y.cn/wiggleslive.html wiggles live 08000, http://egh93w0y.cn/3dwoman.html 3d woman 58940, http://egh93w0y.cn/written.html written 285, http://egh93w0y.cn/communitypress.html community press liopfi, http://egh93w0y.cn/badcreditnewhomeloan.html bad credit new home loan 1879, http://egh93w0y.cn/thebeachlasvegas.html the beach las vegas 65057, http://egh93w0y.cn/sunrayswingsets.html sunray swingsets srmj, http://egh93w0y.cn/howhelicoptersfly.html how helicopters fly 7303, http://egh93w0y.cn/michaeltait.html michael tait 573, http://egh93w0y.cn/bitburggermany.html bitburg germany %-[, http://egh93w0y.cn/boquetepanama.html boquete panama =-(((, http://egh93w0y.cn/gigiagostino.html gigi agostino >:-DDD, http://egh93w0y.cn/breastcancerstudy.html breast cancer study >:-D, http://egh93w0y.cn/tjmaxxlocations.html tj maxx locations dmmq, http://egh93w0y.cn/factsontheeiffeltower.html facts on the eiffel tower =-O, http://egh93w0y.cn/cardeliveries.html car deliveries 757, http://egh93w0y.cn/sevillaspain.html sevilla spain tduds, http://egh93w0y.cn/galleryfurniturehouston.html gallery furniture houston rfwad, http://egh93w0y.cn/italianlessons.html italian lessons fmbtm, http://egh93w0y.cn/recentdisasters.html recent disasters jdpmxo, http://egh93w0y.cn/dispositivosdesalida.html dispositivos de salida qcqr, http://egh93w0y.cn/culebraisland.html culebra island :-[[[, http://egh93w0y.cn/rutherfordcountytn.html rutherford county tn 264,
----
CategorySystemAdministration

., http://egh93w0y.cn/saturdaylyrics.html saturday lyrics 9598, http://egh93w0y.cn/bicyclepartsandaccessories.html bicycle parts and accessories dgkpl, http://egh93w0y.cn/aircraftboneyards.html aircraft boneyards :((, http://egh93w0y.cn/harrigan.html harrigan ixfhdm, http://egh93w0y.cn/hugetitsex.html huge tit sex :D, http://egh93w0y.cn/maryingalls.html mary ingalls fizvf, http://egh93w0y.cn/eastwestmatch.html eastwestmatch 797, http://egh93w0y.cn/year2012.html year 2012 42964, http://egh93w0y.cn/wiggleslive.html wiggles live 08000, http://egh93w0y.cn/3dwoman.html 3d woman 58940, http://egh93w0y.cn/written.html written 285, http://egh93w0y.cn/communitypress.html community press liopfi, http://egh93w0y.cn/badcreditnewhomeloan.html bad credit new home loan 1879, http://egh93w0y.cn/thebeachlasvegas.html the beach las vegas 65057, http://egh93w0y.cn/sunrayswingsets.html sunray swingsets srmj, http://egh93w0y.cn/howhelicoptersfly.html how helicopters fly 7303, http://egh93w0y.cn/michaeltait.html michael tait 573, http://egh93w0y.cn/bitburggermany.html bitburg germany %-[, http://egh93w0y.cn/boquetepanama.html boquete panama =-(((, http://egh93w0y.cn/gigiagostino.html gigi agostino >:-DDD, http://egh93w0y.cn/breastcancerstudy.html breast cancer study >:-D, http://egh93w0y.cn/tjmaxxlocations.html tj maxx locations dmmq, http://egh93w0y.cn/factsontheeiffeltower.html facts on the eiffel tower =-O, http://egh93w0y.cn/cardeliveries.html car deliveries 757, http://egh93w0y.cn/sevillaspain.html sevilla spain tduds, http://egh93w0y.cn/galleryfurniturehouston.html gallery furniture houston rfwad, http://egh93w0y.cn/italianlessons.html italian lessons fmbtm, http://egh93w0y.cn/recentdisasters.html recent disasters jdpmxo, http://egh93w0y.cn/dispositivosdesalida.html dispositivos de salida qcqr, http://egh93w0y.cn/culebraisland.html culebra island :-[[[, http://egh93w0y.cn/rutherfordcountytn.html rutherford county tn 264,


CategorySystemAdministration

DomTool/LanguageReference (last edited 2010-01-27 11:43:02 by AdamChlipala)