~psmay/+junk/xml-targeting-c

« back to all changes in this revision

Viewing changes to schema/main.rnc

  • Committer: Peter S. May
  • Date: 2012-08-08 21:35:44 UTC
  • Revision ID: peter_s._may_httppsmay.com-20120808213544-8w3p7e2njom6eszw
Added an example of XInclude for our equivalent of headers. Made a unit out of the result of echo "#include <stddef.h>" | cpp as run from cygwin.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
 
2
2
start = Unit
3
3
 
4
 
Id = attribute id { xsd:NCName }
5
 
Ref = attribute ref { xsd:NCName }
 
4
Id = attribute id { xsd:ID }
 
5
Ref = attribute ref { xsd:ID }
6
6
 
7
7
Unit = element unit { Id?, ExternalDecl* }
8
8
 
31
31
        ## extern and static linkage, respectively.
32
32
        element public { Id? }
33
33
 
34
 
ExternalDef = Type | ExternalVariable | Function
 
34
ExternalDef = element typedef { Type } | ExternalVariable | Function
35
35
 
36
36
ExternalDecl = element decl {
37
37
        Id?, ((Name, Public?, ExternalDef) | ExternalDef)
60
60
 
61
61
VoidType = element void { Id? }
62
62
CharType = element char { Id?, (ExplicitSigned | Unsigned)? }
63
 
IntType = element int { Id?, Unsigned?, (Short+ | Long+)? }
 
63
IntType = element int { Id?, (Unsigned? & (Short+ | Long+)?) }
64
64
ComplexType = element complex { Id?, FloatType }
65
65
BoolType = element bool { Id? }
66
66
 
69
69
        ## the id of its decl.  ## If a type is referenced within itself (e.g. a
70
70
        ## structure with a pointer to its own type) the type must be defined with
71
71
        ## a tag so that a forward reference is possible.
72
 
        element type { Id?, (Ref | Cname) }
 
72
        element existing { Id?, (Ref | Cname) }
73
73
 
74
74
Type = NonArrayType
75
75