xiacc 0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/pippin-0.1.gem +0 -0
- data/pippin-0.1/bin/generate.sh +6 -0
- data/pippin-0.1/bin/obsolete_install.rb +5 -0
- data/pippin-0.1/bin/parse.sh +7 -0
- data/pippin-0.1/docs/classes/Object.html +139 -0
- data/pippin-0.1/docs/classes/Object.src/M000003.html +18 -0
- data/pippin-0.1/docs/classes/Pippin.html +122 -0
- data/pippin-0.1/docs/classes/Pippin/Parser.html +257 -0
- data/pippin-0.1/docs/classes/Pippin/Parser.src/M000009.html +24 -0
- data/pippin-0.1/docs/classes/Pippin/Parser.src/M000010.html +27 -0
- data/pippin-0.1/docs/classes/Pippin/Parser.src/M000011.html +26 -0
- data/pippin-0.1/docs/classes/Pippin/Parser.src/M000012.html +26 -0
- data/pippin-0.1/docs/classes/Pippin/Parser.src/M000013.html +25 -0
- data/pippin-0.1/docs/classes/Pippin/Policy.html +286 -0
- data/pippin-0.1/docs/classes/Pippin/Policy.src/M000024.html +25 -0
- data/pippin-0.1/docs/classes/Pippin/Policy.src/M000025.html +21 -0
- data/pippin-0.1/docs/classes/Pippin/Policy.src/M000026.html +20 -0
- data/pippin-0.1/docs/classes/Pippin/Policy.src/M000027.html +16 -0
- data/pippin-0.1/docs/classes/Pippin/StackEntry.html +358 -0
- data/pippin-0.1/docs/classes/Pippin/StackEntry.src/M000014.html +22 -0
- data/pippin-0.1/docs/classes/Pippin/StackEntry.src/M000015.html +18 -0
- data/pippin-0.1/docs/classes/Pippin/StackEntry.src/M000016.html +18 -0
- data/pippin-0.1/docs/classes/Pippin/StackEntry.src/M000017.html +18 -0
- data/pippin-0.1/docs/classes/Pippin/StackEntry.src/M000018.html +29 -0
- data/pippin-0.1/docs/classes/Pippin/StackEntry.src/M000019.html +31 -0
- data/pippin-0.1/docs/classes/Pippin/StackEntry.src/M000020.html +28 -0
- data/pippin-0.1/docs/classes/Pippin/StackEntry.src/M000021.html +21 -0
- data/pippin-0.1/docs/classes/Pippin/StackEntry.src/M000022.html +21 -0
- data/pippin-0.1/docs/classes/Pippin/StackEntry.src/M000023.html +25 -0
- data/pippin-0.1/docs/classes/Pippin/WriteStackEntry.html +315 -0
- data/pippin-0.1/docs/classes/Pippin/WriteStackEntry.src/M000051.html +28 -0
- data/pippin-0.1/docs/classes/Pippin/WriteStackEntry.src/M000052.html +16 -0
- data/pippin-0.1/docs/classes/Pippin/WriteStackEntry.src/M000053.html +21 -0
- data/pippin-0.1/docs/classes/Pippin/WriteStackEntry.src/M000054.html +23 -0
- data/pippin-0.1/docs/classes/Pippin/WriteStackEntry.src/M000055.html +34 -0
- data/pippin-0.1/docs/classes/Pippin/WriteStackEntry.src/M000056.html +25 -0
- data/pippin-0.1/docs/classes/Pippin/WriteStackEntry.src/M000057.html +23 -0
- data/pippin-0.1/docs/classes/Pippin/WriteStackEntry.src/M000058.html +31 -0
- data/pippin-0.1/docs/classes/Pippin/WriteStackEntry.src/M000059.html +18 -0
- data/pippin-0.1/docs/classes/Pippin/Writer.html +525 -0
- data/pippin-0.1/docs/classes/Pippin/Writer.src/M000028.html +22 -0
- data/pippin-0.1/docs/classes/Pippin/Writer.src/M000029.html +16 -0
- data/pippin-0.1/docs/classes/Pippin/Writer.src/M000030.html +16 -0
- data/pippin-0.1/docs/classes/Pippin/Writer.src/M000031.html +16 -0
- data/pippin-0.1/docs/classes/Pippin/Writer.src/M000032.html +16 -0
- data/pippin-0.1/docs/classes/Pippin/Writer.src/M000033.html +16 -0
- data/pippin-0.1/docs/classes/Pippin/Writer.src/M000034.html +16 -0
- data/pippin-0.1/docs/classes/Pippin/Writer.src/M000035.html +16 -0
- data/pippin-0.1/docs/classes/Pippin/Writer.src/M000036.html +16 -0
- data/pippin-0.1/docs/classes/Pippin/Writer.src/M000037.html +16 -0
- data/pippin-0.1/docs/classes/Pippin/Writer.src/M000038.html +16 -0
- data/pippin-0.1/docs/classes/Pippin/Writer.src/M000039.html +16 -0
- data/pippin-0.1/docs/classes/Pippin/Writer.src/M000040.html +16 -0
- data/pippin-0.1/docs/classes/Pippin/Writer.src/M000041.html +18 -0
- data/pippin-0.1/docs/classes/Pippin/Writer.src/M000042.html +25 -0
- data/pippin-0.1/docs/classes/Pippin/Writer.src/M000043.html +19 -0
- data/pippin-0.1/docs/classes/Pippin/Writer.src/M000044.html +40 -0
- data/pippin-0.1/docs/classes/Pippin/Writer.src/M000045.html +22 -0
- data/pippin-0.1/docs/classes/Pippin/Writer.src/M000046.html +20 -0
- data/pippin-0.1/docs/classes/Pippin/Writer.src/M000047.html +19 -0
- data/pippin-0.1/docs/classes/Pippin/Writer.src/M000048.html +21 -0
- data/pippin-0.1/docs/classes/Pippin/Writer.src/M000049.html +22 -0
- data/pippin-0.1/docs/classes/Pippin/Writer.src/M000050.html +18 -0
- data/pippin-0.1/docs/classes/Roog.html +124 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.html +1237 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000233.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000234.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000235.html +32 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000236.html +20 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000237.html +20 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000238.html +16 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000239.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000240.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000241.html +19 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000242.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000243.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000244.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000245.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000246.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000247.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000248.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000249.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000250.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000251.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000252.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000253.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000254.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000255.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000256.html +20 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000257.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000258.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000259.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000260.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000261.html +20 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000262.html +22 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000263.html +32 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000264.html +24 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000265.html +32 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000266.html +26 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000267.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000268.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000269.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000270.html +20 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000271.html +22 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000272.html +36 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000273.html +20 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000274.html +21 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000275.html +20 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000276.html +20 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000277.html +23 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000278.html +24 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000279.html +32 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000280.html +31 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000281.html +24 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000282.html +41 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000283.html +25 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000284.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000285.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000286.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000287.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000288.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000289.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000290.html +29 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000291.html +20 -0
- data/pippin-0.1/docs/classes/Roog/Analyzer.src/M000292.html +32 -0
- data/pippin-0.1/docs/classes/Roog/Attribute.html +654 -0
- data/pippin-0.1/docs/classes/Roog/Attribute.src/M000193.html +19 -0
- data/pippin-0.1/docs/classes/Roog/Attribute.src/M000194.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Attribute.src/M000195.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Attribute.src/M000196.html +33 -0
- data/pippin-0.1/docs/classes/Roog/Attribute.src/M000197.html +20 -0
- data/pippin-0.1/docs/classes/Roog/Attribute.src/M000198.html +21 -0
- data/pippin-0.1/docs/classes/Roog/Attribute.src/M000199.html +29 -0
- data/pippin-0.1/docs/classes/Roog/Attribute.src/M000200.html +16 -0
- data/pippin-0.1/docs/classes/Roog/Attribute.src/M000201.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Attribute.src/M000202.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Attribute.src/M000203.html +19 -0
- data/pippin-0.1/docs/classes/Roog/Attribute.src/M000204.html +24 -0
- data/pippin-0.1/docs/classes/Roog/Attribute.src/M000205.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Attribute.src/M000206.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Attribute.src/M000207.html +24 -0
- data/pippin-0.1/docs/classes/Roog/Attribute.src/M000208.html +34 -0
- data/pippin-0.1/docs/classes/Roog/Attribute.src/M000209.html +34 -0
- data/pippin-0.1/docs/classes/Roog/Attribute.src/M000210.html +21 -0
- data/pippin-0.1/docs/classes/Roog/Attribute.src/M000211.html +30 -0
- data/pippin-0.1/docs/classes/Roog/Attribute.src/M000212.html +19 -0
- data/pippin-0.1/docs/classes/Roog/Attribute.src/M000213.html +19 -0
- data/pippin-0.1/docs/classes/Roog/Attribute.src/M000214.html +28 -0
- data/pippin-0.1/docs/classes/Roog/Attribute.src/M000215.html +30 -0
- data/pippin-0.1/docs/classes/Roog/Attribute.src/M000216.html +25 -0
- data/pippin-0.1/docs/classes/Roog/Attribute.src/M000217.html +22 -0
- data/pippin-0.1/docs/classes/Roog/Attribute.src/M000218.html +24 -0
- data/pippin-0.1/docs/classes/Roog/Attribute.src/M000219.html +22 -0
- data/pippin-0.1/docs/classes/Roog/Class.html +1022 -0
- data/pippin-0.1/docs/classes/Roog/Class.src/M000143.html +28 -0
- data/pippin-0.1/docs/classes/Roog/Class.src/M000144.html +24 -0
- data/pippin-0.1/docs/classes/Roog/Class.src/M000145.html +26 -0
- data/pippin-0.1/docs/classes/Roog/Class.src/M000146.html +30 -0
- data/pippin-0.1/docs/classes/Roog/Class.src/M000147.html +23 -0
- data/pippin-0.1/docs/classes/Roog/Class.src/M000148.html +20 -0
- data/pippin-0.1/docs/classes/Roog/Class.src/M000149.html +19 -0
- data/pippin-0.1/docs/classes/Roog/Class.src/M000150.html +20 -0
- data/pippin-0.1/docs/classes/Roog/Class.src/M000151.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Class.src/M000152.html +22 -0
- data/pippin-0.1/docs/classes/Roog/Class.src/M000153.html +16 -0
- data/pippin-0.1/docs/classes/Roog/Class.src/M000154.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Class.src/M000155.html +31 -0
- data/pippin-0.1/docs/classes/Roog/Class.src/M000156.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Class.src/M000157.html +23 -0
- data/pippin-0.1/docs/classes/Roog/Class.src/M000158.html +20 -0
- data/pippin-0.1/docs/classes/Roog/Class.src/M000159.html +21 -0
- data/pippin-0.1/docs/classes/Roog/Class.src/M000160.html +20 -0
- data/pippin-0.1/docs/classes/Roog/Class.src/M000161.html +21 -0
- data/pippin-0.1/docs/classes/Roog/Class.src/M000162.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Class.src/M000163.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Class.src/M000164.html +31 -0
- data/pippin-0.1/docs/classes/Roog/Class.src/M000165.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Class.src/M000166.html +24 -0
- data/pippin-0.1/docs/classes/Roog/Class.src/M000167.html +20 -0
- data/pippin-0.1/docs/classes/Roog/Class.src/M000168.html +21 -0
- data/pippin-0.1/docs/classes/Roog/Class.src/M000169.html +21 -0
- data/pippin-0.1/docs/classes/Roog/Class.src/M000170.html +16 -0
- data/pippin-0.1/docs/classes/Roog/Class.src/M000171.html +16 -0
- data/pippin-0.1/docs/classes/Roog/Class.src/M000172.html +16 -0
- data/pippin-0.1/docs/classes/Roog/Class.src/M000173.html +16 -0
- data/pippin-0.1/docs/classes/Roog/Class.src/M000174.html +16 -0
- data/pippin-0.1/docs/classes/Roog/Class.src/M000175.html +16 -0
- data/pippin-0.1/docs/classes/Roog/Class.src/M000176.html +16 -0
- data/pippin-0.1/docs/classes/Roog/Class.src/M000177.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Class.src/M000178.html +23 -0
- data/pippin-0.1/docs/classes/Roog/Class.src/M000179.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Class.src/M000180.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Class.src/M000181.html +23 -0
- data/pippin-0.1/docs/classes/Roog/Class.src/M000182.html +23 -0
- data/pippin-0.1/docs/classes/Roog/Class.src/M000183.html +20 -0
- data/pippin-0.1/docs/classes/Roog/Class.src/M000184.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Class.src/M000185.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Class.src/M000186.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Class.src/M000187.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Class.src/M000188.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Class.src/M000189.html +19 -0
- data/pippin-0.1/docs/classes/Roog/Class.src/M000190.html +25 -0
- data/pippin-0.1/docs/classes/Roog/Class.src/M000191.html +19 -0
- data/pippin-0.1/docs/classes/Roog/Class.src/M000192.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Entity.html +366 -0
- data/pippin-0.1/docs/classes/Roog/Entity.src/M000104.html +23 -0
- data/pippin-0.1/docs/classes/Roog/Entity.src/M000105.html +19 -0
- data/pippin-0.1/docs/classes/Roog/Entity.src/M000106.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Entity.src/M000107.html +20 -0
- data/pippin-0.1/docs/classes/Roog/Entity.src/M000108.html +19 -0
- data/pippin-0.1/docs/classes/Roog/Entity.src/M000109.html +20 -0
- data/pippin-0.1/docs/classes/Roog/Entity.src/M000110.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Entity.src/M000111.html +21 -0
- data/pippin-0.1/docs/classes/Roog/Entity.src/M000112.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Generator_Ruby.html +490 -0
- data/pippin-0.1/docs/classes/Roog/Generator_Ruby.src/M000124.html +33 -0
- data/pippin-0.1/docs/classes/Roog/Generator_Ruby.src/M000125.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Generator_Ruby.src/M000126.html +30 -0
- data/pippin-0.1/docs/classes/Roog/Generator_Ruby.src/M000127.html +22 -0
- data/pippin-0.1/docs/classes/Roog/Generator_Ruby.src/M000128.html +22 -0
- data/pippin-0.1/docs/classes/Roog/Generator_Ruby.src/M000129.html +17 -0
- data/pippin-0.1/docs/classes/Roog/Generator_Ruby.src/M000130.html +21 -0
- data/pippin-0.1/docs/classes/Roog/Generator_Ruby.src/M000131.html +20 -0
- data/pippin-0.1/docs/classes/Roog/Generator_Ruby.src/M000132.html +21 -0
- data/pippin-0.1/docs/classes/Roog/Generator_Ruby.src/M000133.html +21 -0
- data/pippin-0.1/docs/classes/Roog/Generator_Ruby.src/M000134.html +21 -0
- data/pippin-0.1/docs/classes/Roog/Generator_Ruby.src/M000135.html +21 -0
- data/pippin-0.1/docs/classes/Roog/Generator_Ruby.src/M000136.html +19 -0
- data/pippin-0.1/docs/classes/Roog/Generator_Ruby.src/M000137.html +24 -0
- data/pippin-0.1/docs/classes/Roog/Generator_Ruby.src/M000138.html +35 -0
- data/pippin-0.1/docs/classes/Roog/Generator_Ruby.src/M000139.html +28 -0
- data/pippin-0.1/docs/classes/Roog/Generator_Ruby.src/M000140.html +56 -0
- data/pippin-0.1/docs/classes/Roog/Generator_Ruby.src/M000141.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Generator_Ruby.src/M000142.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Interface.html +490 -0
- data/pippin-0.1/docs/classes/Roog/Interface.src/M000084.html +25 -0
- data/pippin-0.1/docs/classes/Roog/Interface.src/M000085.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Interface.src/M000086.html +24 -0
- data/pippin-0.1/docs/classes/Roog/Interface.src/M000087.html +26 -0
- data/pippin-0.1/docs/classes/Roog/Interface.src/M000088.html +24 -0
- data/pippin-0.1/docs/classes/Roog/Interface.src/M000089.html +22 -0
- data/pippin-0.1/docs/classes/Roog/Interface.src/M000090.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Interface.src/M000091.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Interface.src/M000092.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Interface.src/M000093.html +19 -0
- data/pippin-0.1/docs/classes/Roog/Interface.src/M000094.html +16 -0
- data/pippin-0.1/docs/classes/Roog/Interface.src/M000095.html +28 -0
- data/pippin-0.1/docs/classes/Roog/Interface.src/M000096.html +35 -0
- data/pippin-0.1/docs/classes/Roog/Interface.src/M000097.html +19 -0
- data/pippin-0.1/docs/classes/Roog/Interface.src/M000098.html +17 -0
- data/pippin-0.1/docs/classes/Roog/Interface.src/M000099.html +16 -0
- data/pippin-0.1/docs/classes/Roog/Interface.src/M000100.html +16 -0
- data/pippin-0.1/docs/classes/Roog/Interface.src/M000101.html +16 -0
- data/pippin-0.1/docs/classes/Roog/Interface.src/M000102.html +20 -0
- data/pippin-0.1/docs/classes/Roog/Interface.src/M000103.html +21 -0
- data/pippin-0.1/docs/classes/Roog/ModelComponent.html +236 -0
- data/pippin-0.1/docs/classes/Roog/ModelComponent.src/M000227.html +18 -0
- data/pippin-0.1/docs/classes/Roog/ModelComponent.src/M000228.html +16 -0
- data/pippin-0.1/docs/classes/Roog/ModelComponent.src/M000229.html +16 -0
- data/pippin-0.1/docs/classes/Roog/ModelComponent.src/M000230.html +16 -0
- data/pippin-0.1/docs/classes/Roog/ModelComponent.src/M000231.html +16 -0
- data/pippin-0.1/docs/classes/Roog/ModelComponent.src/M000232.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Namer.html +263 -0
- data/pippin-0.1/docs/classes/Roog/Namer.src/M000062.html +19 -0
- data/pippin-0.1/docs/classes/Roog/Namer.src/M000063.html +25 -0
- data/pippin-0.1/docs/classes/Roog/Namer.src/M000064.html +30 -0
- data/pippin-0.1/docs/classes/Roog/Namer.src/M000065.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Namer.src/M000066.html +21 -0
- data/pippin-0.1/docs/classes/Roog/Path.html +262 -0
- data/pippin-0.1/docs/classes/Roog/Path.src/M000221.html +25 -0
- data/pippin-0.1/docs/classes/Roog/Path.src/M000222.html +16 -0
- data/pippin-0.1/docs/classes/Roog/Path.src/M000223.html +22 -0
- data/pippin-0.1/docs/classes/Roog/Path.src/M000224.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Path.src/M000225.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Path.src/M000226.html +20 -0
- data/pippin-0.1/docs/classes/Roog/Policy.html +268 -0
- data/pippin-0.1/docs/classes/Roog/Policy.src/M000220.html +28 -0
- data/pippin-0.1/docs/classes/Roog/RenameTracker.html +164 -0
- data/pippin-0.1/docs/classes/Roog/RenameTracker.src/M000060.html +19 -0
- data/pippin-0.1/docs/classes/Roog/RenameTracker.src/M000061.html +20 -0
- data/pippin-0.1/docs/classes/Roog/SchemaDefined.html +369 -0
- data/pippin-0.1/docs/classes/Roog/SchemaDefined.src/M000072.html +17 -0
- data/pippin-0.1/docs/classes/Roog/SchemaDefined.src/M000073.html +17 -0
- data/pippin-0.1/docs/classes/Roog/SchemaDefined.src/M000074.html +27 -0
- data/pippin-0.1/docs/classes/Roog/SchemaDefined.src/M000075.html +18 -0
- data/pippin-0.1/docs/classes/Roog/SchemaDefined.src/M000076.html +35 -0
- data/pippin-0.1/docs/classes/Roog/SchemaDefined.src/M000077.html +25 -0
- data/pippin-0.1/docs/classes/Roog/SchemaDefined.src/M000078.html +23 -0
- data/pippin-0.1/docs/classes/Roog/SchemaDefined.src/M000079.html +28 -0
- data/pippin-0.1/docs/classes/Roog/SchemaDefined.src/M000080.html +24 -0
- data/pippin-0.1/docs/classes/Roog/SchemaDefined.src/M000081.html +26 -0
- data/pippin-0.1/docs/classes/Roog/SchemaDefined.src/M000082.html +20 -0
- data/pippin-0.1/docs/classes/Roog/SchemaDefined.src/M000083.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Semantics_Ruby.html +226 -0
- data/pippin-0.1/docs/classes/Roog/Semantics_Ruby.src/M000067.html +33 -0
- data/pippin-0.1/docs/classes/Roog/Semantics_Ruby.src/M000068.html +28 -0
- data/pippin-0.1/docs/classes/Roog/Semantics_Ruby.src/M000069.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Semantics_Ruby.src/M000070.html +22 -0
- data/pippin-0.1/docs/classes/Roog/Semantics_Ruby.src/M000071.html +18 -0
- data/pippin-0.1/docs/classes/Roog/Transformer_Ruby.html +382 -0
- data/pippin-0.1/docs/classes/Roog/Transformer_Ruby.src/M000113.html +22 -0
- data/pippin-0.1/docs/classes/Roog/Transformer_Ruby.src/M000114.html +21 -0
- data/pippin-0.1/docs/classes/Roog/Transformer_Ruby.src/M000115.html +21 -0
- data/pippin-0.1/docs/classes/Roog/Transformer_Ruby.src/M000116.html +20 -0
- data/pippin-0.1/docs/classes/Roog/Transformer_Ruby.src/M000117.html +19 -0
- data/pippin-0.1/docs/classes/Roog/Transformer_Ruby.src/M000118.html +20 -0
- data/pippin-0.1/docs/classes/Roog/Transformer_Ruby.src/M000119.html +20 -0
- data/pippin-0.1/docs/classes/Roog/Transformer_Ruby.src/M000120.html +20 -0
- data/pippin-0.1/docs/classes/Roog/Transformer_Ruby.src/M000121.html +26 -0
- data/pippin-0.1/docs/classes/Roog/Transformer_Ruby.src/M000122.html +24 -0
- data/pippin-0.1/docs/classes/Roog/Transformer_Ruby.src/M000123.html +21 -0
- data/pippin-0.1/docs/classes/String.html +219 -0
- data/pippin-0.1/docs/classes/String.src/M000004.html +19 -0
- data/pippin-0.1/docs/classes/String.src/M000005.html +19 -0
- data/pippin-0.1/docs/classes/String.src/M000006.html +18 -0
- data/pippin-0.1/docs/classes/String.src/M000007.html +27 -0
- data/pippin-0.1/docs/classes/String.src/M000008.html +25 -0
- data/pippin-0.1/docs/created.rid +1 -0
- data/pippin-0.1/docs/files/License_txt.html +127 -0
- data/pippin-0.1/docs/files/ReadMe_txt.html +127 -0
- data/pippin-0.1/docs/files/RoogStructures_txt.html +155 -0
- data/pippin-0.1/docs/files/nist/pippin/pippin_rb.html +142 -0
- data/pippin-0.1/docs/files/nist/pippin/pippin_rb.src/M000001.html +25 -0
- data/pippin-0.1/docs/files/nist/pippin/roog_rb.html +174 -0
- data/pippin-0.1/docs/files/nist/pippin/roog_rb.src/M000002.html +16 -0
- data/pippin-0.1/docs/fr_class_index.html +49 -0
- data/pippin-0.1/docs/fr_file_index.html +31 -0
- data/pippin-0.1/docs/fr_method_index.html +318 -0
- data/pippin-0.1/docs/index.html +24 -0
- data/pippin-0.1/docs/rdoc-style.css +208 -0
- data/pippin-0.1/lib/nist/pippin/pippin.rb +620 -0
- data/pippin-0.1/lib/nist/pippin/roog.rb +2498 -0
- data/pippin-0.1/tests/test_pippin.rb +332 -0
- data/xiacc-0.1/docs/classes/Array.html +323 -0
- data/xiacc-0.1/docs/classes/Array.src/M000017.html +19 -0
- data/xiacc-0.1/docs/classes/Array.src/M000018.html +18 -0
- data/xiacc-0.1/docs/classes/Array.src/M000019.html +18 -0
- data/xiacc-0.1/docs/classes/Array.src/M000020.html +18 -0
- data/xiacc-0.1/docs/classes/Array.src/M000021.html +22 -0
- data/xiacc-0.1/docs/classes/Array.src/M000022.html +18 -0
- data/xiacc-0.1/docs/classes/Array.src/M000023.html +28 -0
- data/xiacc-0.1/docs/classes/Array.src/M000024.html +18 -0
- data/xiacc-0.1/docs/classes/Array.src/M000025.html +19 -0
- data/xiacc-0.1/docs/classes/Array.src/M000026.html +18 -0
- data/xiacc-0.1/docs/classes/Array.src/M000027.html +20 -0
- data/xiacc-0.1/docs/classes/Array.src/M000028.html +19 -0
- data/xiacc-0.1/docs/classes/Array.src/M000029.html +18 -0
- data/xiacc-0.1/docs/classes/Association.html +189 -0
- data/xiacc-0.1/docs/classes/Association.src/M000001.html +18 -0
- data/xiacc-0.1/docs/classes/Association.src/M000002.html +23 -0
- data/xiacc-0.1/docs/classes/Association.src/M000003.html +19 -0
- data/xiacc-0.1/docs/classes/CollectionExclusionComparator.html +182 -0
- data/xiacc-0.1/docs/classes/CollectionExclusionComparator.src/M000044.html +18 -0
- data/xiacc-0.1/docs/classes/CollectionExclusionComparator.src/M000045.html +20 -0
- data/xiacc-0.1/docs/classes/CollectionExclusionComparator.src/M000046.html +21 -0
- data/xiacc-0.1/docs/classes/CollectionInclusionComparator.html +182 -0
- data/xiacc-0.1/docs/classes/CollectionInclusionComparator.src/M000004.html +18 -0
- data/xiacc-0.1/docs/classes/CollectionInclusionComparator.src/M000005.html +20 -0
- data/xiacc-0.1/docs/classes/CollectionInclusionComparator.src/M000006.html +21 -0
- data/xiacc-0.1/docs/classes/Hash.html +229 -0
- data/xiacc-0.1/docs/classes/Hash.src/M000010.html +22 -0
- data/xiacc-0.1/docs/classes/Hash.src/M000011.html +18 -0
- data/xiacc-0.1/docs/classes/Hash.src/M000012.html +18 -0
- data/xiacc-0.1/docs/classes/Hash.src/M000013.html +19 -0
- data/xiacc-0.1/docs/classes/Hash.src/M000014.html +18 -0
- data/xiacc-0.1/docs/classes/Hash.src/M000015.html +42 -0
- data/xiacc-0.1/docs/classes/Hash.src/M000016.html +24 -0
- data/xiacc-0.1/docs/classes/KeyedCollection.html +139 -0
- data/xiacc-0.1/docs/classes/KeyedCollection.src/M000030.html +20 -0
- data/xiacc-0.1/docs/classes/Object.html +319 -0
- data/xiacc-0.1/docs/classes/Object.src/M000031.html +16 -0
- data/xiacc-0.1/docs/classes/Object.src/M000032.html +16 -0
- data/xiacc-0.1/docs/classes/Object.src/M000033.html +16 -0
- data/xiacc-0.1/docs/classes/Object.src/M000034.html +16 -0
- data/xiacc-0.1/docs/classes/Object.src/M000035.html +16 -0
- data/xiacc-0.1/docs/classes/Object.src/M000036.html +16 -0
- data/xiacc-0.1/docs/classes/Object.src/M000037.html +16 -0
- data/xiacc-0.1/docs/classes/Object.src/M000038.html +16 -0
- data/xiacc-0.1/docs/classes/Object.src/M000039.html +16 -0
- data/xiacc-0.1/docs/classes/Object.src/M000040.html +16 -0
- data/xiacc-0.1/docs/classes/Object.src/M000041.html +16 -0
- data/xiacc-0.1/docs/classes/Object.src/M000042.html +16 -0
- data/xiacc-0.1/docs/classes/Object.src/M000043.html +23 -0
- data/xiacc-0.1/docs/classes/Set.html +169 -0
- data/xiacc-0.1/docs/classes/Set.src/M000007.html +18 -0
- data/xiacc-0.1/docs/classes/Set.src/M000008.html +18 -0
- data/xiacc-0.1/docs/classes/Set.src/M000009.html +20 -0
- data/xiacc-0.1/docs/classes/String.html +184 -0
- data/xiacc-0.1/docs/classes/String.src/M000047.html +18 -0
- data/xiacc-0.1/docs/classes/String.src/M000048.html +21 -0
- data/xiacc-0.1/docs/classes/String.src/M000049.html +34 -0
- data/xiacc-0.1/docs/classes/String.src/M000050.html +18 -0
- data/xiacc-0.1/docs/classes/XI.html +376 -0
- data/xiacc-0.1/docs/classes/XI/CCAction.html +313 -0
- data/xiacc-0.1/docs/classes/XI/CCAction.src/M000196.html +22 -0
- data/xiacc-0.1/docs/classes/XI/CCAction.src/M000197.html +19 -0
- data/xiacc-0.1/docs/classes/XI/CCAction.src/M000198.html +20 -0
- data/xiacc-0.1/docs/classes/XI/CCAction.src/M000199.html +23 -0
- data/xiacc-0.1/docs/classes/XI/CCAction.src/M000200.html +23 -0
- data/xiacc-0.1/docs/classes/XI/CCAction.src/M000201.html +30 -0
- data/xiacc-0.1/docs/classes/XI/CCAction.src/M000202.html +31 -0
- data/xiacc-0.1/docs/classes/XI/CCAction.src/M000203.html +19 -0
- data/xiacc-0.1/docs/classes/XI/CCAction.src/M000204.html +16 -0
- data/xiacc-0.1/docs/classes/XI/CanonicalLRParserGenerator.html +411 -0
- data/xiacc-0.1/docs/classes/XI/CanonicalLRParserGenerator.src/M000205.html +18 -0
- data/xiacc-0.1/docs/classes/XI/CanonicalLRParserGenerator.src/M000206.html +18 -0
- data/xiacc-0.1/docs/classes/XI/CanonicalLRParserGenerator.src/M000207.html +38 -0
- data/xiacc-0.1/docs/classes/XI/CanonicalLRParserGenerator.src/M000208.html +38 -0
- data/xiacc-0.1/docs/classes/XI/CanonicalLRParserGenerator.src/M000209.html +79 -0
- data/xiacc-0.1/docs/classes/XI/CanonicalLRParserGenerator.src/M000210.html +63 -0
- data/xiacc-0.1/docs/classes/XI/CanonicalLRParserGenerator.src/M000211.html +44 -0
- data/xiacc-0.1/docs/classes/XI/CanonicalLRParserGenerator.src/M000212.html +19 -0
- data/xiacc-0.1/docs/classes/XI/CanonicalLRParserGenerator.src/M000213.html +19 -0
- data/xiacc-0.1/docs/classes/XI/CanonicalLRParserGenerator.src/M000214.html +19 -0
- data/xiacc-0.1/docs/classes/XI/CanonicalLRParserGenerator.src/M000215.html +41 -0
- data/xiacc-0.1/docs/classes/XI/CanonicalLRParserGenerator.src/M000216.html +27 -0
- data/xiacc-0.1/docs/classes/XI/CanonicalLRParserGenerator.src/M000217.html +51 -0
- data/xiacc-0.1/docs/classes/XI/CanonicalLRParserGenerator.src/M000218.html +18 -0
- data/xiacc-0.1/docs/classes/XI/CanonicalLRParserGenerator.src/M000219.html +18 -0
- data/xiacc-0.1/docs/classes/XI/CanonicalLRParserGenerator.src/M000220.html +18 -0
- data/xiacc-0.1/docs/classes/XI/CanonicalLRParserGenerator.src/M000221.html +20 -0
- data/xiacc-0.1/docs/classes/XI/CanonicalLRParserGenerator.src/M000222.html +21 -0
- data/xiacc-0.1/docs/classes/XI/CanonicalLRParserItem.html +244 -0
- data/xiacc-0.1/docs/classes/XI/CanonicalLRParserItem.src/M000229.html +18 -0
- data/xiacc-0.1/docs/classes/XI/CanonicalLRParserItem.src/M000230.html +22 -0
- data/xiacc-0.1/docs/classes/XI/CanonicalLRParserItem.src/M000231.html +22 -0
- data/xiacc-0.1/docs/classes/XI/CanonicalLRParserItem.src/M000232.html +19 -0
- data/xiacc-0.1/docs/classes/XI/CanonicalLRParserItem.src/M000233.html +18 -0
- data/xiacc-0.1/docs/classes/XI/CanonicalLRParserItem.src/M000234.html +20 -0
- data/xiacc-0.1/docs/classes/XI/CanonicalLRParserItem.src/M000235.html +18 -0
- data/xiacc-0.1/docs/classes/XI/DFA.html +195 -0
- data/xiacc-0.1/docs/classes/XI/DFA.src/M000475.html +18 -0
- data/xiacc-0.1/docs/classes/XI/DFA.src/M000476.html +18 -0
- data/xiacc-0.1/docs/classes/XI/DFA.src/M000477.html +18 -0
- data/xiacc-0.1/docs/classes/XI/DFA.src/M000478.html +18 -0
- data/xiacc-0.1/docs/classes/XI/DFAState.html +157 -0
- data/xiacc-0.1/docs/classes/XI/DFAState.src/M000068.html +18 -0
- data/xiacc-0.1/docs/classes/XI/DFAState.src/M000069.html +19 -0
- data/xiacc-0.1/docs/classes/XI/DebugParserState.html +219 -0
- data/xiacc-0.1/docs/classes/XI/DebugParserState.src/M000479.html +19 -0
- data/xiacc-0.1/docs/classes/XI/DebugParserState.src/M000480.html +23 -0
- data/xiacc-0.1/docs/classes/XI/DebugParserState.src/M000481.html +20 -0
- data/xiacc-0.1/docs/classes/XI/DebugParserState.src/M000482.html +22 -0
- data/xiacc-0.1/docs/classes/XI/DebugParserState.src/M000483.html +18 -0
- data/xiacc-0.1/docs/classes/XI/DepthFirstSearch.html +160 -0
- data/xiacc-0.1/docs/classes/XI/DepthFirstSearch.src/M000164.html +18 -0
- data/xiacc-0.1/docs/classes/XI/DepthFirstSearch.src/M000165.html +22 -0
- data/xiacc-0.1/docs/classes/XI/EndMarker.html +204 -0
- data/xiacc-0.1/docs/classes/XI/EndMarker.src/M000159.html +18 -0
- data/xiacc-0.1/docs/classes/XI/EndMarker.src/M000160.html +20 -0
- data/xiacc-0.1/docs/classes/XI/EndMarker.src/M000161.html +18 -0
- data/xiacc-0.1/docs/classes/XI/EndMarker.src/M000162.html +19 -0
- data/xiacc-0.1/docs/classes/XI/EndMarker.src/M000163.html +19 -0
- data/xiacc-0.1/docs/classes/XI/Epsilon.html +237 -0
- data/xiacc-0.1/docs/classes/XI/Epsilon.src/M000497.html +16 -0
- data/xiacc-0.1/docs/classes/XI/Epsilon.src/M000498.html +20 -0
- data/xiacc-0.1/docs/classes/XI/Epsilon.src/M000499.html +16 -0
- data/xiacc-0.1/docs/classes/XI/Epsilon.src/M000500.html +16 -0
- data/xiacc-0.1/docs/classes/XI/Epsilon.src/M000501.html +16 -0
- data/xiacc-0.1/docs/classes/XI/Epsilon.src/M000502.html +16 -0
- data/xiacc-0.1/docs/classes/XI/Epsilon.src/M000503.html +16 -0
- data/xiacc-0.1/docs/classes/XI/EqualityTestableSet.html +175 -0
- data/xiacc-0.1/docs/classes/XI/EqualityTestableSet.src/M000494.html +18 -0
- data/xiacc-0.1/docs/classes/XI/EqualityTestableSet.src/M000495.html +22 -0
- data/xiacc-0.1/docs/classes/XI/EqualityTestableSet.src/M000496.html +19 -0
- data/xiacc-0.1/docs/classes/XI/FiniteAutomaton.html +483 -0
- data/xiacc-0.1/docs/classes/XI/FiniteAutomaton.src/M000070.html +18 -0
- data/xiacc-0.1/docs/classes/XI/FiniteAutomaton.src/M000071.html +21 -0
- data/xiacc-0.1/docs/classes/XI/FiniteAutomaton.src/M000072.html +16 -0
- data/xiacc-0.1/docs/classes/XI/FiniteAutomaton.src/M000073.html +36 -0
- data/xiacc-0.1/docs/classes/XI/FiniteAutomaton.src/M000074.html +16 -0
- data/xiacc-0.1/docs/classes/XI/FiniteAutomaton.src/M000075.html +16 -0
- data/xiacc-0.1/docs/classes/XI/FiniteAutomaton.src/M000076.html +16 -0
- data/xiacc-0.1/docs/classes/XI/FiniteAutomaton.src/M000077.html +18 -0
- data/xiacc-0.1/docs/classes/XI/FiniteAutomaton.src/M000078.html +20 -0
- data/xiacc-0.1/docs/classes/XI/FiniteAutomaton.src/M000079.html +34 -0
- data/xiacc-0.1/docs/classes/XI/FiniteAutomaton.src/M000080.html +21 -0
- data/xiacc-0.1/docs/classes/XI/FiniteAutomaton.src/M000081.html +20 -0
- data/xiacc-0.1/docs/classes/XI/FiniteAutomaton.src/M000082.html +19 -0
- data/xiacc-0.1/docs/classes/XI/FiniteAutomaton.src/M000083.html +21 -0
- data/xiacc-0.1/docs/classes/XI/FiniteAutomaton.src/M000084.html +30 -0
- data/xiacc-0.1/docs/classes/XI/FiniteAutomaton.src/M000085.html +22 -0
- data/xiacc-0.1/docs/classes/XI/FiniteAutomaton.src/M000086.html +16 -0
- data/xiacc-0.1/docs/classes/XI/FiniteAutomaton.src/M000087.html +20 -0
- data/xiacc-0.1/docs/classes/XI/FiniteAutomaton.src/M000088.html +19 -0
- data/xiacc-0.1/docs/classes/XI/FiniteAutomaton.src/M000089.html +16 -0
- data/xiacc-0.1/docs/classes/XI/FiniteAutomaton.src/M000090.html +16 -0
- data/xiacc-0.1/docs/classes/XI/FiniteAutomaton.src/M000091.html +16 -0
- data/xiacc-0.1/docs/classes/XI/FiniteAutomatonState.html +483 -0
- data/xiacc-0.1/docs/classes/XI/FiniteAutomatonState.src/M000453.html +20 -0
- data/xiacc-0.1/docs/classes/XI/FiniteAutomatonState.src/M000454.html +20 -0
- data/xiacc-0.1/docs/classes/XI/FiniteAutomatonState.src/M000455.html +19 -0
- data/xiacc-0.1/docs/classes/XI/FiniteAutomatonState.src/M000456.html +16 -0
- data/xiacc-0.1/docs/classes/XI/FiniteAutomatonState.src/M000457.html +22 -0
- data/xiacc-0.1/docs/classes/XI/FiniteAutomatonState.src/M000458.html +16 -0
- data/xiacc-0.1/docs/classes/XI/FiniteAutomatonState.src/M000459.html +16 -0
- data/xiacc-0.1/docs/classes/XI/FiniteAutomatonState.src/M000460.html +16 -0
- data/xiacc-0.1/docs/classes/XI/FiniteAutomatonState.src/M000461.html +16 -0
- data/xiacc-0.1/docs/classes/XI/FiniteAutomatonState.src/M000462.html +16 -0
- data/xiacc-0.1/docs/classes/XI/FiniteAutomatonState.src/M000463.html +16 -0
- data/xiacc-0.1/docs/classes/XI/FiniteAutomatonState.src/M000464.html +16 -0
- data/xiacc-0.1/docs/classes/XI/FiniteAutomatonState.src/M000465.html +16 -0
- data/xiacc-0.1/docs/classes/XI/FiniteAutomatonState.src/M000466.html +16 -0
- data/xiacc-0.1/docs/classes/XI/FiniteAutomatonState.src/M000467.html +16 -0
- data/xiacc-0.1/docs/classes/XI/FiniteAutomatonState.src/M000468.html +19 -0
- data/xiacc-0.1/docs/classes/XI/FiniteAutomatonState.src/M000469.html +16 -0
- data/xiacc-0.1/docs/classes/XI/FiniteAutomatonState.src/M000470.html +16 -0
- data/xiacc-0.1/docs/classes/XI/FiniteAutomatonState.src/M000471.html +16 -0
- data/xiacc-0.1/docs/classes/XI/FiniteAutomatonState.src/M000472.html +16 -0
- data/xiacc-0.1/docs/classes/XI/FiniteAutomatonState.src/M000473.html +23 -0
- data/xiacc-0.1/docs/classes/XI/FiniteAutomatonState.src/M000474.html +16 -0
- data/xiacc-0.1/docs/classes/XI/GrammarString.html +220 -0
- data/xiacc-0.1/docs/classes/XI/GrammarString.src/M000322.html +45 -0
- data/xiacc-0.1/docs/classes/XI/GrammarString.src/M000323.html +18 -0
- data/xiacc-0.1/docs/classes/XI/GrammarString.src/M000324.html +20 -0
- data/xiacc-0.1/docs/classes/XI/GrammarString.src/M000325.html +27 -0
- data/xiacc-0.1/docs/classes/XI/GrammarString.src/M000326.html +19 -0
- data/xiacc-0.1/docs/classes/XI/GrammarString.src/M000327.html +26 -0
- data/xiacc-0.1/docs/classes/XI/GrammarSymbol.html +342 -0
- data/xiacc-0.1/docs/classes/XI/GrammarSymbol.src/M000440.html +20 -0
- data/xiacc-0.1/docs/classes/XI/GrammarSymbol.src/M000441.html +38 -0
- data/xiacc-0.1/docs/classes/XI/GrammarSymbol.src/M000442.html +50 -0
- data/xiacc-0.1/docs/classes/XI/GrammarSymbol.src/M000443.html +18 -0
- data/xiacc-0.1/docs/classes/XI/GrammarSymbol.src/M000444.html +18 -0
- data/xiacc-0.1/docs/classes/XI/GrammarSymbol.src/M000445.html +18 -0
- data/xiacc-0.1/docs/classes/XI/GrammarSymbol.src/M000446.html +18 -0
- data/xiacc-0.1/docs/classes/XI/GrammarSymbol.src/M000447.html +18 -0
- data/xiacc-0.1/docs/classes/XI/GrammarSymbol.src/M000448.html +18 -0
- data/xiacc-0.1/docs/classes/XI/GrammarSymbol.src/M000449.html +18 -0
- data/xiacc-0.1/docs/classes/XI/GrammarSymbol.src/M000450.html +18 -0
- data/xiacc-0.1/docs/classes/XI/GrammarSymbol.src/M000451.html +19 -0
- data/xiacc-0.1/docs/classes/XI/GrammarSymbol.src/M000452.html +28 -0
- data/xiacc-0.1/docs/classes/XI/GraphSearch.html +468 -0
- data/xiacc-0.1/docs/classes/XI/GraphSearch.src/M000179.html +21 -0
- data/xiacc-0.1/docs/classes/XI/GraphSearch.src/M000180.html +18 -0
- data/xiacc-0.1/docs/classes/XI/GraphSearch.src/M000181.html +20 -0
- data/xiacc-0.1/docs/classes/XI/GraphSearch.src/M000182.html +18 -0
- data/xiacc-0.1/docs/classes/XI/GraphSearch.src/M000183.html +19 -0
- data/xiacc-0.1/docs/classes/XI/GraphSearch.src/M000184.html +23 -0
- data/xiacc-0.1/docs/classes/XI/GraphSearch.src/M000185.html +25 -0
- data/xiacc-0.1/docs/classes/XI/GraphSearch.src/M000186.html +19 -0
- data/xiacc-0.1/docs/classes/XI/GraphSearch.src/M000187.html +16 -0
- data/xiacc-0.1/docs/classes/XI/GraphSearch.src/M000188.html +16 -0
- data/xiacc-0.1/docs/classes/XI/GraphSearch.src/M000189.html +16 -0
- data/xiacc-0.1/docs/classes/XI/GraphSearch.src/M000190.html +16 -0
- data/xiacc-0.1/docs/classes/XI/GraphSearch.src/M000191.html +20 -0
- data/xiacc-0.1/docs/classes/XI/GraphSearch.src/M000192.html +31 -0
- data/xiacc-0.1/docs/classes/XI/GraphSearch.src/M000193.html +16 -0
- data/xiacc-0.1/docs/classes/XI/GraphSearch.src/M000194.html +19 -0
- data/xiacc-0.1/docs/classes/XI/GraphSearch.src/M000195.html +18 -0
- data/xiacc-0.1/docs/classes/XI/GraphSerachProgress.html +210 -0
- data/xiacc-0.1/docs/classes/XI/GraphSerachProgress.src/M000225.html +16 -0
- data/xiacc-0.1/docs/classes/XI/GraphSerachProgress.src/M000226.html +16 -0
- data/xiacc-0.1/docs/classes/XI/GraphSerachProgress.src/M000227.html +16 -0
- data/xiacc-0.1/docs/classes/XI/GraphSerachProgress.src/M000228.html +16 -0
- data/xiacc-0.1/docs/classes/XI/InstanceManager.html +373 -0
- data/xiacc-0.1/docs/classes/XI/InstanceManager.src/M000307.html +18 -0
- data/xiacc-0.1/docs/classes/XI/InstanceManager.src/M000308.html +18 -0
- data/xiacc-0.1/docs/classes/XI/InstanceManager.src/M000309.html +18 -0
- data/xiacc-0.1/docs/classes/XI/InstanceManager.src/M000310.html +18 -0
- data/xiacc-0.1/docs/classes/XI/InstanceManager.src/M000311.html +18 -0
- data/xiacc-0.1/docs/classes/XI/InstanceManager.src/M000312.html +29 -0
- data/xiacc-0.1/docs/classes/XI/InstanceManager.src/M000313.html +18 -0
- data/xiacc-0.1/docs/classes/XI/InstanceManager.src/M000314.html +18 -0
- data/xiacc-0.1/docs/classes/XI/InstanceManager.src/M000315.html +21 -0
- data/xiacc-0.1/docs/classes/XI/InstanceManager.src/M000316.html +18 -0
- data/xiacc-0.1/docs/classes/XI/InstanceManager.src/M000317.html +18 -0
- data/xiacc-0.1/docs/classes/XI/InstanceManager.src/M000318.html +21 -0
- data/xiacc-0.1/docs/classes/XI/InstanceManager.src/M000319.html +20 -0
- data/xiacc-0.1/docs/classes/XI/InstanceManager.src/M000320.html +24 -0
- data/xiacc-0.1/docs/classes/XI/InstanceManager.src/M000321.html +18 -0
- data/xiacc-0.1/docs/classes/XI/InstanceManagerFromSpec.html +306 -0
- data/xiacc-0.1/docs/classes/XI/InstanceManagerFromSpec.src/M000356.html +18 -0
- data/xiacc-0.1/docs/classes/XI/InstanceManagerFromSpec.src/M000357.html +19 -0
- data/xiacc-0.1/docs/classes/XI/InstanceManagerFromSpec.src/M000358.html +18 -0
- data/xiacc-0.1/docs/classes/XI/InstanceManagerFromSpec.src/M000359.html +18 -0
- data/xiacc-0.1/docs/classes/XI/InstanceManagerFromSpec.src/M000360.html +18 -0
- data/xiacc-0.1/docs/classes/XI/InstanceManagerFromSpec.src/M000361.html +20 -0
- data/xiacc-0.1/docs/classes/XI/InstanceManagerFromSpec.src/M000362.html +18 -0
- data/xiacc-0.1/docs/classes/XI/InstanceManagerFromSpec.src/M000363.html +18 -0
- data/xiacc-0.1/docs/classes/XI/InstanceManagerFromSpec.src/M000364.html +18 -0
- data/xiacc-0.1/docs/classes/XI/InstanceManagerFromSpec.src/M000365.html +18 -0
- data/xiacc-0.1/docs/classes/XI/ItemSet.html +231 -0
- data/xiacc-0.1/docs/classes/XI/ItemSet.src/M000393.html +18 -0
- data/xiacc-0.1/docs/classes/XI/ItemSet.src/M000394.html +20 -0
- data/xiacc-0.1/docs/classes/XI/ItemSet.src/M000395.html +20 -0
- data/xiacc-0.1/docs/classes/XI/ItemSet.src/M000396.html +20 -0
- data/xiacc-0.1/docs/classes/XI/ItemSet.src/M000397.html +18 -0
- data/xiacc-0.1/docs/classes/XI/ItemSet.src/M000398.html +18 -0
- data/xiacc-0.1/docs/classes/XI/ItemSet.src/M000399.html +20 -0
- data/xiacc-0.1/docs/classes/XI/LRParserGenerator.html +409 -0
- data/xiacc-0.1/docs/classes/XI/LRParserGenerator.src/M000337.html +20 -0
- data/xiacc-0.1/docs/classes/XI/LRParserGenerator.src/M000338.html +19 -0
- data/xiacc-0.1/docs/classes/XI/LRParserGenerator.src/M000339.html +19 -0
- data/xiacc-0.1/docs/classes/XI/LRParserGenerator.src/M000340.html +20 -0
- data/xiacc-0.1/docs/classes/XI/LRParserGenerator.src/M000341.html +18 -0
- data/xiacc-0.1/docs/classes/XI/LRParserGenerator.src/M000342.html +22 -0
- data/xiacc-0.1/docs/classes/XI/LRParserGenerator.src/M000343.html +18 -0
- data/xiacc-0.1/docs/classes/XI/LRParserGenerator.src/M000344.html +18 -0
- data/xiacc-0.1/docs/classes/XI/LRParserGenerator.src/M000345.html +18 -0
- data/xiacc-0.1/docs/classes/XI/LRParserGenerator.src/M000346.html +18 -0
- data/xiacc-0.1/docs/classes/XI/LRParserGenerator.src/M000347.html +18 -0
- data/xiacc-0.1/docs/classes/XI/LRParserGenerator.src/M000348.html +18 -0
- data/xiacc-0.1/docs/classes/XI/LRParserGenerator.src/M000349.html +18 -0
- data/xiacc-0.1/docs/classes/XI/LRParserGenerator.src/M000350.html +18 -0
- data/xiacc-0.1/docs/classes/XI/LRParserGenerator.src/M000351.html +42 -0
- data/xiacc-0.1/docs/classes/XI/LRParserGenerator.src/M000352.html +18 -0
- data/xiacc-0.1/docs/classes/XI/LRParserGenerator.src/M000353.html +28 -0
- data/xiacc-0.1/docs/classes/XI/LRParserItem.html +348 -0
- data/xiacc-0.1/docs/classes/XI/LRParserItem.src/M000131.html +19 -0
- data/xiacc-0.1/docs/classes/XI/LRParserItem.src/M000132.html +20 -0
- data/xiacc-0.1/docs/classes/XI/LRParserItem.src/M000133.html +19 -0
- data/xiacc-0.1/docs/classes/XI/LRParserItem.src/M000134.html +19 -0
- data/xiacc-0.1/docs/classes/XI/LRParserItem.src/M000135.html +19 -0
- data/xiacc-0.1/docs/classes/XI/LRParserItem.src/M000136.html +18 -0
- data/xiacc-0.1/docs/classes/XI/LRParserItem.src/M000137.html +47 -0
- data/xiacc-0.1/docs/classes/XI/LRParserItem.src/M000138.html +18 -0
- data/xiacc-0.1/docs/classes/XI/LRParserItem.src/M000139.html +18 -0
- data/xiacc-0.1/docs/classes/XI/LRParserItem.src/M000140.html +20 -0
- data/xiacc-0.1/docs/classes/XI/LRParserItem.src/M000141.html +26 -0
- data/xiacc-0.1/docs/classes/XI/LRParserItem.src/M000142.html +23 -0
- data/xiacc-0.1/docs/classes/XI/LRParserItem.src/M000143.html +19 -0
- data/xiacc-0.1/docs/classes/XI/Language.html +1007 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000253.html +26 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000254.html +25 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000255.html +24 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000256.html +27 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000257.html +23 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000258.html +27 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000259.html +27 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000260.html +27 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000261.html +23 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000262.html +54 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000263.html +18 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000264.html +21 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000265.html +21 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000266.html +18 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000267.html +18 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000268.html +20 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000269.html +18 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000270.html +18 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000271.html +21 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000272.html +20 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000273.html +115 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000274.html +61 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000275.html +16 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000276.html +16 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000277.html +16 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000278.html +16 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000279.html +16 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000280.html +18 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000281.html +19 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000282.html +18 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000283.html +21 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000284.html +18 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000285.html +18 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000286.html +25 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000287.html +27 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000288.html +18 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000289.html +35 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000290.html +20 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000291.html +19 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000292.html +21 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000293.html +16 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000294.html +22 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000295.html +16 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000296.html +16 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000297.html +16 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000298.html +20 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000299.html +20 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000300.html +34 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000301.html +16 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000302.html +16 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000303.html +16 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000304.html +20 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000305.html +32 -0
- data/xiacc-0.1/docs/classes/XI/Language.src/M000306.html +20 -0
- data/xiacc-0.1/docs/classes/XI/Lexer.html +174 -0
- data/xiacc-0.1/docs/classes/XI/Lexer.src/M000223.html +18 -0
- data/xiacc-0.1/docs/classes/XI/Lexer.src/M000224.html +18 -0
- data/xiacc-0.1/docs/classes/XI/LexerGenerator.html +169 -0
- data/xiacc-0.1/docs/classes/XI/LexerGenerator.src/M000354.html +18 -0
- data/xiacc-0.1/docs/classes/XI/LexerGenerator.src/M000355.html +16 -0
- data/xiacc-0.1/docs/classes/XI/NFA.html +681 -0
- data/xiacc-0.1/docs/classes/XI/NFA.src/M000404.html +16 -0
- data/xiacc-0.1/docs/classes/XI/NFA.src/M000405.html +24 -0
- data/xiacc-0.1/docs/classes/XI/NFA.src/M000406.html +29 -0
- data/xiacc-0.1/docs/classes/XI/NFA.src/M000407.html +16 -0
- data/xiacc-0.1/docs/classes/XI/NFA.src/M000408.html +16 -0
- data/xiacc-0.1/docs/classes/XI/NFA.src/M000409.html +16 -0
- data/xiacc-0.1/docs/classes/XI/NFA.src/M000410.html +16 -0
- data/xiacc-0.1/docs/classes/XI/NFA.src/M000411.html +22 -0
- data/xiacc-0.1/docs/classes/XI/NFA.src/M000412.html +21 -0
- data/xiacc-0.1/docs/classes/XI/NFA.src/M000413.html +18 -0
- data/xiacc-0.1/docs/classes/XI/NFA.src/M000414.html +18 -0
- data/xiacc-0.1/docs/classes/XI/NFA.src/M000415.html +25 -0
- data/xiacc-0.1/docs/classes/XI/NFA.src/M000416.html +20 -0
- data/xiacc-0.1/docs/classes/XI/NFA.src/M000417.html +63 -0
- data/xiacc-0.1/docs/classes/XI/NFA.src/M000418.html +19 -0
- data/xiacc-0.1/docs/classes/XI/NFA.src/M000419.html +19 -0
- data/xiacc-0.1/docs/classes/XI/NFA.src/M000420.html +18 -0
- data/xiacc-0.1/docs/classes/XI/NFA.src/M000421.html +16 -0
- data/xiacc-0.1/docs/classes/XI/NFA.src/M000422.html +16 -0
- data/xiacc-0.1/docs/classes/XI/NFA.src/M000423.html +16 -0
- data/xiacc-0.1/docs/classes/XI/NFA.src/M000424.html +16 -0
- data/xiacc-0.1/docs/classes/XI/NFA.src/M000425.html +16 -0
- data/xiacc-0.1/docs/classes/XI/NFA.src/M000426.html +18 -0
- data/xiacc-0.1/docs/classes/XI/NFA.src/M000427.html +29 -0
- data/xiacc-0.1/docs/classes/XI/NFA.src/M000428.html +34 -0
- data/xiacc-0.1/docs/classes/XI/NFA.src/M000429.html +20 -0
- data/xiacc-0.1/docs/classes/XI/NFA.src/M000430.html +28 -0
- data/xiacc-0.1/docs/classes/XI/NFA.src/M000431.html +21 -0
- data/xiacc-0.1/docs/classes/XI/NFA.src/M000432.html +16 -0
- data/xiacc-0.1/docs/classes/XI/NFA.src/M000433.html +20 -0
- data/xiacc-0.1/docs/classes/XI/NFA.src/M000434.html +16 -0
- data/xiacc-0.1/docs/classes/XI/NFA.src/M000435.html +27 -0
- data/xiacc-0.1/docs/classes/XI/NFA.src/M000436.html +16 -0
- data/xiacc-0.1/docs/classes/XI/NFA.src/M000437.html +16 -0
- data/xiacc-0.1/docs/classes/XI/NFA.src/M000438.html +30 -0
- data/xiacc-0.1/docs/classes/XI/NFA.src/M000439.html +24 -0
- data/xiacc-0.1/docs/classes/XI/NFAState.html +334 -0
- data/xiacc-0.1/docs/classes/XI/NFAState.src/M000380.html +22 -0
- data/xiacc-0.1/docs/classes/XI/NFAState.src/M000381.html +18 -0
- data/xiacc-0.1/docs/classes/XI/NFAState.src/M000382.html +26 -0
- data/xiacc-0.1/docs/classes/XI/NFAState.src/M000383.html +19 -0
- data/xiacc-0.1/docs/classes/XI/NFAState.src/M000384.html +18 -0
- data/xiacc-0.1/docs/classes/XI/NFAState.src/M000385.html +18 -0
- data/xiacc-0.1/docs/classes/XI/NFAState.src/M000386.html +18 -0
- data/xiacc-0.1/docs/classes/XI/NFAState.src/M000387.html +18 -0
- data/xiacc-0.1/docs/classes/XI/NFAState.src/M000388.html +21 -0
- data/xiacc-0.1/docs/classes/XI/NFAState.src/M000389.html +24 -0
- data/xiacc-0.1/docs/classes/XI/NFAState.src/M000390.html +18 -0
- data/xiacc-0.1/docs/classes/XI/NFAState.src/M000391.html +20 -0
- data/xiacc-0.1/docs/classes/XI/NFAState.src/M000392.html +20 -0
- data/xiacc-0.1/docs/classes/XI/NonTerminal.html +172 -0
- data/xiacc-0.1/docs/classes/XI/NonTerminal.src/M000129.html +21 -0
- data/xiacc-0.1/docs/classes/XI/NonTerminal.src/M000130.html +18 -0
- data/xiacc-0.1/docs/classes/XI/OrderedCollection.html +171 -0
- data/xiacc-0.1/docs/classes/XI/OrderedCollection.src/M000176.html +18 -0
- data/xiacc-0.1/docs/classes/XI/OrderedCollection.src/M000177.html +20 -0
- data/xiacc-0.1/docs/classes/XI/OrderedCollection.src/M000178.html +20 -0
- data/xiacc-0.1/docs/classes/XI/ParseTreeNode.html +339 -0
- data/xiacc-0.1/docs/classes/XI/ParseTreeNode.src/M000368.html +19 -0
- data/xiacc-0.1/docs/classes/XI/ParseTreeNode.src/M000369.html +20 -0
- data/xiacc-0.1/docs/classes/XI/ParseTreeNode.src/M000370.html +18 -0
- data/xiacc-0.1/docs/classes/XI/ParseTreeNode.src/M000371.html +32 -0
- data/xiacc-0.1/docs/classes/XI/ParseTreeNode.src/M000372.html +18 -0
- data/xiacc-0.1/docs/classes/XI/ParseTreeNode.src/M000373.html +18 -0
- data/xiacc-0.1/docs/classes/XI/ParseTreeNode.src/M000374.html +27 -0
- data/xiacc-0.1/docs/classes/XI/ParseTreeNode.src/M000375.html +18 -0
- data/xiacc-0.1/docs/classes/XI/ParseTreeNode.src/M000376.html +32 -0
- data/xiacc-0.1/docs/classes/XI/ParseTreeNode.src/M000377.html +22 -0
- data/xiacc-0.1/docs/classes/XI/ParseTreeNode.src/M000378.html +18 -0
- data/xiacc-0.1/docs/classes/XI/ParseTreeNode.src/M000379.html +18 -0
- data/xiacc-0.1/docs/classes/XI/Parser.html +444 -0
- data/xiacc-0.1/docs/classes/XI/Parser.src/M000111.html +18 -0
- data/xiacc-0.1/docs/classes/XI/Parser.src/M000112.html +20 -0
- data/xiacc-0.1/docs/classes/XI/Parser.src/M000113.html +18 -0
- data/xiacc-0.1/docs/classes/XI/Parser.src/M000114.html +18 -0
- data/xiacc-0.1/docs/classes/XI/Parser.src/M000115.html +23 -0
- data/xiacc-0.1/docs/classes/XI/Parser.src/M000116.html +18 -0
- data/xiacc-0.1/docs/classes/XI/Parser.src/M000117.html +18 -0
- data/xiacc-0.1/docs/classes/XI/Parser.src/M000118.html +25 -0
- data/xiacc-0.1/docs/classes/XI/Parser.src/M000119.html +28 -0
- data/xiacc-0.1/docs/classes/XI/Parser.src/M000120.html +19 -0
- data/xiacc-0.1/docs/classes/XI/Parser.src/M000121.html +37 -0
- data/xiacc-0.1/docs/classes/XI/Parser.src/M000122.html +18 -0
- data/xiacc-0.1/docs/classes/XI/Parser.src/M000123.html +19 -0
- data/xiacc-0.1/docs/classes/XI/Parser.src/M000124.html +18 -0
- data/xiacc-0.1/docs/classes/XI/Parser.src/M000125.html +21 -0
- data/xiacc-0.1/docs/classes/XI/Parser.src/M000126.html +18 -0
- data/xiacc-0.1/docs/classes/XI/Parser.src/M000127.html +79 -0
- data/xiacc-0.1/docs/classes/XI/Parser.src/M000128.html +23 -0
- data/xiacc-0.1/docs/classes/XI/ParserAction.html +224 -0
- data/xiacc-0.1/docs/classes/XI/ParserAction.src/M000154.html +20 -0
- data/xiacc-0.1/docs/classes/XI/ParserAction.src/M000155.html +16 -0
- data/xiacc-0.1/docs/classes/XI/ParserAction.src/M000156.html +29 -0
- data/xiacc-0.1/docs/classes/XI/ParserAction.src/M000157.html +18 -0
- data/xiacc-0.1/docs/classes/XI/ParserAction.src/M000158.html +16 -0
- data/xiacc-0.1/docs/classes/XI/ParserActionAccept.html +148 -0
- data/xiacc-0.1/docs/classes/XI/ParserActionAccept.src/M000067.html +23 -0
- data/xiacc-0.1/docs/classes/XI/ParserActionPreAccept.html +155 -0
- data/xiacc-0.1/docs/classes/XI/ParserActionPreAccept.src/M000066.html +19 -0
- data/xiacc-0.1/docs/classes/XI/ParserActionReduce.html +199 -0
- data/xiacc-0.1/docs/classes/XI/ParserActionReduce.src/M000400.html +18 -0
- data/xiacc-0.1/docs/classes/XI/ParserActionReduce.src/M000401.html +20 -0
- data/xiacc-0.1/docs/classes/XI/ParserActionReduce.src/M000402.html +27 -0
- data/xiacc-0.1/docs/classes/XI/ParserActionReduce.src/M000403.html +19 -0
- data/xiacc-0.1/docs/classes/XI/ParserActionShift.html +214 -0
- data/xiacc-0.1/docs/classes/XI/ParserActionShift.src/M000107.html +18 -0
- data/xiacc-0.1/docs/classes/XI/ParserActionShift.src/M000108.html +20 -0
- data/xiacc-0.1/docs/classes/XI/ParserActionShift.src/M000109.html +24 -0
- data/xiacc-0.1/docs/classes/XI/ParserActionShift.src/M000110.html +21 -0
- data/xiacc-0.1/docs/classes/XI/ParserComparator.html +139 -0
- data/xiacc-0.1/docs/classes/XI/ParserComparator.src/M000493.html +16 -0
- data/xiacc-0.1/docs/classes/XI/ParserRecorder.html +214 -0
- data/xiacc-0.1/docs/classes/XI/ParserRecorder.src/M000061.html +19 -0
- data/xiacc-0.1/docs/classes/XI/ParserRecorder.src/M000062.html +19 -0
- data/xiacc-0.1/docs/classes/XI/ParserRecorder.src/M000063.html +20 -0
- data/xiacc-0.1/docs/classes/XI/ParserRecorder.src/M000064.html +19 -0
- data/xiacc-0.1/docs/classes/XI/ParserRecorder.src/M000065.html +20 -0
- data/xiacc-0.1/docs/classes/XI/ParserState.html +297 -0
- data/xiacc-0.1/docs/classes/XI/ParserState.src/M000328.html +19 -0
- data/xiacc-0.1/docs/classes/XI/ParserState.src/M000329.html +21 -0
- data/xiacc-0.1/docs/classes/XI/ParserState.src/M000330.html +36 -0
- data/xiacc-0.1/docs/classes/XI/ParserState.src/M000331.html +32 -0
- data/xiacc-0.1/docs/classes/XI/ParserState.src/M000332.html +20 -0
- data/xiacc-0.1/docs/classes/XI/ParserState.src/M000333.html +24 -0
- data/xiacc-0.1/docs/classes/XI/ParserState.src/M000334.html +29 -0
- data/xiacc-0.1/docs/classes/XI/ParserState.src/M000335.html +22 -0
- data/xiacc-0.1/docs/classes/XI/ParserState.src/M000336.html +16 -0
- data/xiacc-0.1/docs/classes/XI/ParserTransition.html +209 -0
- data/xiacc-0.1/docs/classes/XI/ParserTransition.src/M000103.html +18 -0
- data/xiacc-0.1/docs/classes/XI/ParserTransition.src/M000104.html +24 -0
- data/xiacc-0.1/docs/classes/XI/ParserTransition.src/M000105.html +22 -0
- data/xiacc-0.1/docs/classes/XI/ParserTransition.src/M000106.html +18 -0
- data/xiacc-0.1/docs/classes/XI/ParserWarning.html +212 -0
- data/xiacc-0.1/docs/classes/XI/ParserWarning.src/M000057.html +18 -0
- data/xiacc-0.1/docs/classes/XI/ParserWarning.src/M000058.html +21 -0
- data/xiacc-0.1/docs/classes/XI/ParserWarning.src/M000059.html +21 -0
- data/xiacc-0.1/docs/classes/XI/ParserWarning.src/M000060.html +20 -0
- data/xiacc-0.1/docs/classes/XI/ProcessorScheduler.html +207 -0
- data/xiacc-0.1/docs/classes/XI/ProcessorScheduler.src/M000100.html +25 -0
- data/xiacc-0.1/docs/classes/XI/ProcessorScheduler.src/M000101.html +22 -0
- data/xiacc-0.1/docs/classes/XI/ProcessorScheduler.src/M000102.html +27 -0
- data/xiacc-0.1/docs/classes/XI/Production.html +310 -0
- data/xiacc-0.1/docs/classes/XI/Production.src/M000144.html +18 -0
- data/xiacc-0.1/docs/classes/XI/Production.src/M000145.html +16 -0
- data/xiacc-0.1/docs/classes/XI/Production.src/M000146.html +16 -0
- data/xiacc-0.1/docs/classes/XI/Production.src/M000147.html +16 -0
- data/xiacc-0.1/docs/classes/XI/Production.src/M000148.html +16 -0
- data/xiacc-0.1/docs/classes/XI/Production.src/M000149.html +16 -0
- data/xiacc-0.1/docs/classes/XI/Production.src/M000150.html +20 -0
- data/xiacc-0.1/docs/classes/XI/Production.src/M000151.html +19 -0
- data/xiacc-0.1/docs/classes/XI/Production.src/M000152.html +19 -0
- data/xiacc-0.1/docs/classes/XI/Production.src/M000153.html +20 -0
- data/xiacc-0.1/docs/classes/XI/Recognizer.html +306 -0
- data/xiacc-0.1/docs/classes/XI/Recognizer.src/M000166.html +18 -0
- data/xiacc-0.1/docs/classes/XI/Recognizer.src/M000167.html +20 -0
- data/xiacc-0.1/docs/classes/XI/Recognizer.src/M000168.html +28 -0
- data/xiacc-0.1/docs/classes/XI/Recognizer.src/M000169.html +21 -0
- data/xiacc-0.1/docs/classes/XI/Recognizer.src/M000170.html +18 -0
- data/xiacc-0.1/docs/classes/XI/Recognizer.src/M000171.html +18 -0
- data/xiacc-0.1/docs/classes/XI/Recognizer.src/M000172.html +21 -0
- data/xiacc-0.1/docs/classes/XI/Recognizer.src/M000173.html +21 -0
- data/xiacc-0.1/docs/classes/XI/Recognizer.src/M000174.html +18 -0
- data/xiacc-0.1/docs/classes/XI/Recognizer.src/M000175.html +20 -0
- data/xiacc-0.1/docs/classes/XI/RecognizerWithPostCondition.html +167 -0
- data/xiacc-0.1/docs/classes/XI/RecognizerWithPostCondition.src/M000251.html +18 -0
- data/xiacc-0.1/docs/classes/XI/RecognizerWithPostCondition.src/M000252.html +21 -0
- data/xiacc-0.1/docs/classes/XI/RestrictedCollectionExclusionComparator.html +220 -0
- data/xiacc-0.1/docs/classes/XI/RestrictedCollectionExclusionComparator.src/M000052.html +19 -0
- data/xiacc-0.1/docs/classes/XI/RestrictedCollectionExclusionComparator.src/M000053.html +21 -0
- data/xiacc-0.1/docs/classes/XI/RestrictedCollectionExclusionComparator.src/M000054.html +21 -0
- data/xiacc-0.1/docs/classes/XI/RestrictedCollectionExclusionComparator.src/M000055.html +18 -0
- data/xiacc-0.1/docs/classes/XI/RestrictedCollectionExclusionComparator.src/M000056.html +22 -0
- data/xiacc-0.1/docs/classes/XI/Shortcut.html +216 -0
- data/xiacc-0.1/docs/classes/XI/Shortcut.src/M000248.html +19 -0
- data/xiacc-0.1/docs/classes/XI/Shortcut.src/M000249.html +19 -0
- data/xiacc-0.1/docs/classes/XI/Shortcut.src/M000250.html +18 -0
- data/xiacc-0.1/docs/classes/XI/Terminal.html +192 -0
- data/xiacc-0.1/docs/classes/XI/Terminal.src/M000246.html +22 -0
- data/xiacc-0.1/docs/classes/XI/Terminal.src/M000247.html +16 -0
- data/xiacc-0.1/docs/classes/XI/TerminalDescription.html +157 -0
- data/xiacc-0.1/docs/classes/XI/TerminalDescription.src/M000051.html +19 -0
- data/xiacc-0.1/docs/classes/XI/TextLexer.html +234 -0
- data/xiacc-0.1/docs/classes/XI/TextLexer.src/M000094.html +20 -0
- data/xiacc-0.1/docs/classes/XI/TextLexer.src/M000095.html +66 -0
- data/xiacc-0.1/docs/classes/XI/TextLexer.src/M000096.html +16 -0
- data/xiacc-0.1/docs/classes/XI/TextLexer.src/M000097.html +16 -0
- data/xiacc-0.1/docs/classes/XI/TextLexer.src/M000098.html +16 -0
- data/xiacc-0.1/docs/classes/XI/TextLexer.src/M000099.html +29 -0
- data/xiacc-0.1/docs/classes/XI/TextLexerGenerator.html +169 -0
- data/xiacc-0.1/docs/classes/XI/TextLexerGenerator.src/M000092.html +19 -0
- data/xiacc-0.1/docs/classes/XI/TextLexerGenerator.src/M000093.html +36 -0
- data/xiacc-0.1/docs/classes/XI/Transition.html +234 -0
- data/xiacc-0.1/docs/classes/XI/Transition.src/M000487.html +18 -0
- data/xiacc-0.1/docs/classes/XI/Transition.src/M000488.html +19 -0
- data/xiacc-0.1/docs/classes/XI/Transition.src/M000489.html +19 -0
- data/xiacc-0.1/docs/classes/XI/Transition.src/M000490.html +18 -0
- data/xiacc-0.1/docs/classes/XI/Transition.src/M000491.html +21 -0
- data/xiacc-0.1/docs/classes/XI/Transition.src/M000492.html +18 -0
- data/xiacc-0.1/docs/classes/XI/UnHashedDictionary.html +292 -0
- data/xiacc-0.1/docs/classes/XI/UnHashedDictionary.src/M000236.html +20 -0
- data/xiacc-0.1/docs/classes/XI/UnHashedDictionary.src/M000237.html +20 -0
- data/xiacc-0.1/docs/classes/XI/UnHashedDictionary.src/M000238.html +18 -0
- data/xiacc-0.1/docs/classes/XI/UnHashedDictionary.src/M000239.html +18 -0
- data/xiacc-0.1/docs/classes/XI/UnHashedDictionary.src/M000240.html +18 -0
- data/xiacc-0.1/docs/classes/XI/UnHashedDictionary.src/M000241.html +30 -0
- data/xiacc-0.1/docs/classes/XI/UnHashedDictionary.src/M000242.html +32 -0
- data/xiacc-0.1/docs/classes/XI/UnHashedDictionary.src/M000243.html +19 -0
- data/xiacc-0.1/docs/classes/XI/UnHashedDictionary.src/M000244.html +18 -0
- data/xiacc-0.1/docs/classes/XI/UnHashedDictionary.src/M000245.html +32 -0
- data/xiacc-0.1/docs/classes/XI/UnHashedSet.html +171 -0
- data/xiacc-0.1/docs/classes/XI/UnHashedSet.src/M000484.html +18 -0
- data/xiacc-0.1/docs/classes/XI/UnHashedSet.src/M000485.html +21 -0
- data/xiacc-0.1/docs/classes/XI/UnHashedSet.src/M000486.html +19 -0
- data/xiacc-0.1/docs/classes/XI/UndefinedObject.html +189 -0
- data/xiacc-0.1/docs/classes/XI/UndefinedObject.src/M000366.html +18 -0
- data/xiacc-0.1/docs/classes/XI/UndefinedObject.src/M000367.html +19 -0
- data/xiacc-0.1/docs/created.rid +1 -0
- data/xiacc-0.1/docs/files/License_txt.html +136 -0
- data/xiacc-0.1/docs/files/ReadMe_txt.html +229 -0
- data/xiacc-0.1/docs/files/nist/xiacc/Association_rb.html +109 -0
- data/xiacc-0.1/docs/files/nist/xiacc/CCAction_rb.html +110 -0
- data/xiacc-0.1/docs/files/nist/xiacc/CCArrayAddon_rb.html +108 -0
- data/xiacc-0.1/docs/files/nist/xiacc/CCHashAddon_rb.html +108 -0
- data/xiacc-0.1/docs/files/nist/xiacc/CCObjectAddon_rb.html +101 -0
- data/xiacc-0.1/docs/files/nist/xiacc/CCSetAddon_rb.html +108 -0
- data/xiacc-0.1/docs/files/nist/xiacc/CCStringAddon_rb.html +101 -0
- data/xiacc-0.1/docs/files/nist/xiacc/CanonicalLRParserGenerator_rb.html +119 -0
- data/xiacc-0.1/docs/files/nist/xiacc/CanonicalLRParserItem_rb.html +109 -0
- data/xiacc-0.1/docs/files/nist/xiacc/CollectionExclusionComparator_rb.html +108 -0
- data/xiacc-0.1/docs/files/nist/xiacc/CollectionInclusionComparator_rb.html +108 -0
- data/xiacc-0.1/docs/files/nist/xiacc/Collection_rb.html +108 -0
- data/xiacc-0.1/docs/files/nist/xiacc/DFAState_rb.html +109 -0
- data/xiacc-0.1/docs/files/nist/xiacc/DFA_rb.html +109 -0
- data/xiacc-0.1/docs/files/nist/xiacc/DebugParserState_rb.html +109 -0
- data/xiacc-0.1/docs/files/nist/xiacc/DepthFirstSearch_rb.html +108 -0
- data/xiacc-0.1/docs/files/nist/xiacc/EndMarker_rb.html +109 -0
- data/xiacc-0.1/docs/files/nist/xiacc/Epsilon_rb.html +109 -0
- data/xiacc-0.1/docs/files/nist/xiacc/EqualityTestableSet_rb.html +109 -0
- data/xiacc-0.1/docs/files/nist/xiacc/FiniteAutomatonState_rb.html +108 -0
- data/xiacc-0.1/docs/files/nist/xiacc/FiniteAutomaton_rb.html +112 -0
- data/xiacc-0.1/docs/files/nist/xiacc/GrammarString_rb.html +111 -0
- data/xiacc-0.1/docs/files/nist/xiacc/GrammarSymbol_rb.html +109 -0
- data/xiacc-0.1/docs/files/nist/xiacc/GraphSearchProgress_rb.html +108 -0
- data/xiacc-0.1/docs/files/nist/xiacc/GraphSearch_rb.html +111 -0
- data/xiacc-0.1/docs/files/nist/xiacc/InstanceManagerFromSpec_rb.html +108 -0
- data/xiacc-0.1/docs/files/nist/xiacc/InstanceManager_rb.html +108 -0
- data/xiacc-0.1/docs/files/nist/xiacc/ItemSet_rb.html +108 -0
- data/xiacc-0.1/docs/files/nist/xiacc/KeyedCollection_rb.html +109 -0
- data/xiacc-0.1/docs/files/nist/xiacc/LRParserGenerator_rb.html +108 -0
- data/xiacc-0.1/docs/files/nist/xiacc/LRParserItem_rb.html +109 -0
- data/xiacc-0.1/docs/files/nist/xiacc/Language_rb.html +120 -0
- data/xiacc-0.1/docs/files/nist/xiacc/LexerGenerator_rb.html +108 -0
- data/xiacc-0.1/docs/files/nist/xiacc/Lexer_rb.html +108 -0
- data/xiacc-0.1/docs/files/nist/xiacc/NFAState_rb.html +109 -0
- data/xiacc-0.1/docs/files/nist/xiacc/NFA_rb.html +113 -0
- data/xiacc-0.1/docs/files/nist/xiacc/NonTerminal_rb.html +108 -0
- data/xiacc-0.1/docs/files/nist/xiacc/OrderedCollection_rb.html +101 -0
- data/xiacc-0.1/docs/files/nist/xiacc/ParseTreeNode_rb.html +109 -0
- data/xiacc-0.1/docs/files/nist/xiacc/ParserActionAccept_rb.html +108 -0
- data/xiacc-0.1/docs/files/nist/xiacc/ParserActionPreAccept_rb.html +108 -0
- data/xiacc-0.1/docs/files/nist/xiacc/ParserActionReduce_rb.html +109 -0
- data/xiacc-0.1/docs/files/nist/xiacc/ParserActionShift_rb.html +109 -0
- data/xiacc-0.1/docs/files/nist/xiacc/ParserAction_rb.html +109 -0
- data/xiacc-0.1/docs/files/nist/xiacc/ParserComparator_rb.html +108 -0
- data/xiacc-0.1/docs/files/nist/xiacc/ParserRecorder_rb.html +108 -0
- data/xiacc-0.1/docs/files/nist/xiacc/ParserState_rb.html +111 -0
- data/xiacc-0.1/docs/files/nist/xiacc/ParserTransition_rb.html +109 -0
- data/xiacc-0.1/docs/files/nist/xiacc/ParserWarning_rb.html +108 -0
- data/xiacc-0.1/docs/files/nist/xiacc/Parser_rb.html +111 -0
- data/xiacc-0.1/docs/files/nist/xiacc/ProcessorScheduler_rb.html +108 -0
- data/xiacc-0.1/docs/files/nist/xiacc/Production_rb.html +109 -0
- data/xiacc-0.1/docs/files/nist/xiacc/RecognizerWithPostCondition_rb.html +108 -0
- data/xiacc-0.1/docs/files/nist/xiacc/Recognizer_rb.html +108 -0
- data/xiacc-0.1/docs/files/nist/xiacc/RestrictedCollectionExclusionComparator_rb.html +108 -0
- data/xiacc-0.1/docs/files/nist/xiacc/Shortcut_rb.html +109 -0
- data/xiacc-0.1/docs/files/nist/xiacc/TerminalDescription_rb.html +108 -0
- data/xiacc-0.1/docs/files/nist/xiacc/Terminal_rb.html +109 -0
- data/xiacc-0.1/docs/files/nist/xiacc/TextLexerGenerator_rb.html +109 -0
- data/xiacc-0.1/docs/files/nist/xiacc/TextLexer_rb.html +109 -0
- data/xiacc-0.1/docs/files/nist/xiacc/Transition_rb.html +109 -0
- data/xiacc-0.1/docs/files/nist/xiacc/UnHashedDictionary_rb.html +109 -0
- data/xiacc-0.1/docs/files/nist/xiacc/UnHashedSet_rb.html +108 -0
- data/xiacc-0.1/docs/files/nist/xiacc/UndefinedObject_rb.html +108 -0
- data/xiacc-0.1/docs/fr_class_index.html +90 -0
- data/xiacc-0.1/docs/fr_file_index.html +92 -0
- data/xiacc-0.1/docs/fr_method_index.html +529 -0
- data/xiacc-0.1/docs/index.html +24 -0
- data/xiacc-0.1/docs/rdoc-style.css +208 -0
- data/xiacc-0.1/lib/nist/xiacc/Association.rb +27 -0
- data/xiacc-0.1/lib/nist/xiacc/CCAction.rb +99 -0
- data/xiacc-0.1/lib/nist/xiacc/CCArrayAddon.rb +68 -0
- data/xiacc-0.1/lib/nist/xiacc/CCHashAddon.rb +68 -0
- data/xiacc-0.1/lib/nist/xiacc/CCObjectAddon.rb +25 -0
- data/xiacc-0.1/lib/nist/xiacc/CCSetAddon.rb +19 -0
- data/xiacc-0.1/lib/nist/xiacc/CCStringAddon.rb +38 -0
- data/xiacc-0.1/lib/nist/xiacc/CanonicalLRParserGenerator.rb +343 -0
- data/xiacc-0.1/lib/nist/xiacc/CanonicalLRParserItem.rb +49 -0
- data/xiacc-0.1/lib/nist/xiacc/Collection.rb +15 -0
- data/xiacc-0.1/lib/nist/xiacc/CollectionExclusionComparator.rb +24 -0
- data/xiacc-0.1/lib/nist/xiacc/CollectionInclusionComparator.rb +25 -0
- data/xiacc-0.1/lib/nist/xiacc/DFA.rb +28 -0
- data/xiacc-0.1/lib/nist/xiacc/DFAState.rb +20 -0
- data/xiacc-0.1/lib/nist/xiacc/DebugParserState.rb +44 -0
- data/xiacc-0.1/lib/nist/xiacc/DepthFirstSearch.rb +22 -0
- data/xiacc-0.1/lib/nist/xiacc/EndMarker.rb +33 -0
- data/xiacc-0.1/lib/nist/xiacc/Epsilon.rb +28 -0
- data/xiacc-0.1/lib/nist/xiacc/EqualityTestableSet.rb +27 -0
- data/xiacc-0.1/lib/nist/xiacc/FiniteAutomaton.rb +154 -0
- data/xiacc-0.1/lib/nist/xiacc/FiniteAutomatonState.rb +74 -0
- data/xiacc-0.1/lib/nist/xiacc/GrammarString.rb +84 -0
- data/xiacc-0.1/lib/nist/xiacc/GrammarSymbol.rb +129 -0
- data/xiacc-0.1/lib/nist/xiacc/GraphSearch.rb +129 -0
- data/xiacc-0.1/lib/nist/xiacc/GraphSearchProgress.rb +19 -0
- data/xiacc-0.1/lib/nist/xiacc/InstanceManager.rb +101 -0
- data/xiacc-0.1/lib/nist/xiacc/InstanceManagerFromSpec.rb +70 -0
- data/xiacc-0.1/lib/nist/xiacc/ItemSet.rb +43 -0
- data/xiacc-0.1/lib/nist/xiacc/KeyedCollection.rb +12 -0
- data/xiacc-0.1/lib/nist/xiacc/LRParserGenerator.rb +127 -0
- data/xiacc-0.1/lib/nist/xiacc/LRParserItem.rb +118 -0
- data/xiacc-0.1/lib/nist/xiacc/Language.rb +577 -0
- data/xiacc-0.1/lib/nist/xiacc/Lexer.rb +19 -0
- data/xiacc-0.1/lib/nist/xiacc/LexerGenerator.rb +17 -0
- data/xiacc-0.1/lib/nist/xiacc/NFA.rb +277 -0
- data/xiacc-0.1/lib/nist/xiacc/NFAState.rb +93 -0
- data/xiacc-0.1/lib/nist/xiacc/NonTerminal.rb +22 -0
- data/xiacc-0.1/lib/nist/xiacc/OrderedCollection.rb +22 -0
- data/xiacc-0.1/lib/nist/xiacc/ParseTreeNode.rb +109 -0
- data/xiacc-0.1/lib/nist/xiacc/Parser.rb +208 -0
- data/xiacc-0.1/lib/nist/xiacc/ParserAction.rb +42 -0
- data/xiacc-0.1/lib/nist/xiacc/ParserActionAccept.rb +19 -0
- data/xiacc-0.1/lib/nist/xiacc/ParserActionPreAccept.rb +18 -0
- data/xiacc-0.1/lib/nist/xiacc/ParserActionReduce.rb +40 -0
- data/xiacc-0.1/lib/nist/xiacc/ParserActionShift.rb +42 -0
- data/xiacc-0.1/lib/nist/xiacc/ParserComparator.rb +10 -0
- data/xiacc-0.1/lib/nist/xiacc/ParserRecorder.rb +37 -0
- data/xiacc-0.1/lib/nist/xiacc/ParserState.rb +113 -0
- data/xiacc-0.1/lib/nist/xiacc/ParserTransition.rb +39 -0
- data/xiacc-0.1/lib/nist/xiacc/ParserWarning.rb +38 -0
- data/xiacc-0.1/lib/nist/xiacc/ProcessorScheduler.rb +49 -0
- data/xiacc-0.1/lib/nist/xiacc/Production.rb +51 -0
- data/xiacc-0.1/lib/nist/xiacc/Recognizer.rb +77 -0
- data/xiacc-0.1/lib/nist/xiacc/RecognizerWithPostCondition.rb +22 -0
- data/xiacc-0.1/lib/nist/xiacc/RestrictedCollectionExclusionComparator.rb +41 -0
- data/xiacc-0.1/lib/nist/xiacc/Shortcut.rb +40 -0
- data/xiacc-0.1/lib/nist/xiacc/Terminal.rb +46 -0
- data/xiacc-0.1/lib/nist/xiacc/TerminalDescription.rb +16 -0
- data/xiacc-0.1/lib/nist/xiacc/TextLexer.rb +90 -0
- data/xiacc-0.1/lib/nist/xiacc/TextLexerGenerator.rb +38 -0
- data/xiacc-0.1/lib/nist/xiacc/Transition.rb +41 -0
- data/xiacc-0.1/lib/nist/xiacc/UnHashedDictionary.rb +97 -0
- data/xiacc-0.1/lib/nist/xiacc/UnHashedSet.rb +24 -0
- data/xiacc-0.1/lib/nist/xiacc/UndefinedObject.rb +22 -0
- metadata +1252 -0
|
@@ -0,0 +1,2498 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
require 'nist/common/schema2'
|
|
4
|
+
require 'nist/common/sequentialHash'
|
|
5
|
+
require 'nist/common/rubyToolsDay'
|
|
6
|
+
require 'nist/common/framelet'
|
|
7
|
+
|
|
8
|
+
require 'stringio'
|
|
9
|
+
require 'nist/common/treeDump'
|
|
10
|
+
|
|
11
|
+
=begin rdoc
|
|
12
|
+
Ruby Object Ontology Generator
|
|
13
|
+
|
|
14
|
+
A story by Phillip K. Dick tells us that Roogs are sinister beings
|
|
15
|
+
cleverly disguised a trash collectors (only dogs realize this,
|
|
16
|
+
which is why they howl "ROOG!" whenever garbage is picked up).
|
|
17
|
+
|
|
18
|
+
Remarkably enough, Roog is also the name for this Module, which
|
|
19
|
+
generates a file of Ruby classes with attributes specified
|
|
20
|
+
by an XML schema. By writing a few subclasses (Generator_Ruby
|
|
21
|
+
and Namer), you could make it generate code for Java, Python
|
|
22
|
+
or some other language.
|
|
23
|
+
|
|
24
|
+
The output classes are pure domain objects: they contain only
|
|
25
|
+
attributes, no behavior. All the output classes are written
|
|
26
|
+
to one file: if the output is not specified on the command line,
|
|
27
|
+
autoDomain.rb is used. The expectation is that behaviors are
|
|
28
|
+
defined in a different file, which is loaded after the structure
|
|
29
|
+
definitions. Roog does not know or care about this behavior file,
|
|
30
|
+
but your application needs the behaviors (if it does not, consider
|
|
31
|
+
using framelets instead of objects).
|
|
32
|
+
|
|
33
|
+
How the meta model is built from a schema:
|
|
34
|
+
* Analyzer.analyze calls loadFile to generatge the XSD::Schema,
|
|
35
|
+
which is a crude queryable representation of the schema
|
|
36
|
+
* Stadard simple classes (corresponding to xsd simpleTypes)
|
|
37
|
+
are added to the Analyzer
|
|
38
|
+
* Create Roog::Class instances, first for simpleTypes defined
|
|
39
|
+
in the schema, and then the complexTypes.
|
|
40
|
+
* Roog::Class.new takes the REXML simpleType or complexType
|
|
41
|
+
(definition) as one of its arguments.
|
|
42
|
+
* SchemaDefined.initialize calls:
|
|
43
|
+
* setup(definition), which validates data and
|
|
44
|
+
fills in attibutes
|
|
45
|
+
* dispatchElement(definition). This in turn:
|
|
46
|
+
* pushes the defintion on the Analyzer stack
|
|
47
|
+
* calls dispatchName with the name of the element
|
|
48
|
+
This in turn sends/performs specify_<elementName>.
|
|
49
|
+
The multiple specify_<elementName_N) methods in a
|
|
50
|
+
given class allow for variable successors.
|
|
51
|
+
Each such method may be defined differently in
|
|
52
|
+
different classes, allowing for differen contexts.
|
|
53
|
+
These methods may in turn call any of these:
|
|
54
|
+
* notSupported('featureName')
|
|
55
|
+
* tos('attributeName') gets an attribute value from tos
|
|
56
|
+
* dispatchChildren, which recursively calls dispatchElement
|
|
57
|
+
* dispatchGroupChildren
|
|
58
|
+
* pops the (now finished) defintion
|
|
59
|
+
* Link up the model components so that (for example) Roog::Class
|
|
60
|
+
instances know the super Roog::Class, etc (see Analyzer.analyze).
|
|
61
|
+
|
|
62
|
+
The send/performs of the specify_<elementName> superficially make debugging
|
|
63
|
+
a little less obvious. Once you understand the structure, however, it
|
|
64
|
+
becomes clear. The Analyzer.stack can also help. In fact, if you set
|
|
65
|
+
roog_policy.save_context to true, each Roog::SchemaDefined will keep
|
|
66
|
+
its definition, and also a copy of the stack used to reach the definition.
|
|
67
|
+
Of course you can also use show_stack from rubyToolsDay.
|
|
68
|
+
|
|
69
|
+
*****************************************************************
|
|
70
|
+
Need to rewrite presumptions below from 2 perspcetives:
|
|
71
|
+
Unmarshalling XML to objects
|
|
72
|
+
Marshalling objects to XML
|
|
73
|
+
*****************************************************************
|
|
74
|
+
|
|
75
|
+
Presumptions (probably inescapable):
|
|
76
|
+
* There is a one-to-one mapping between classes and the
|
|
77
|
+
union of simpleTypes and complexTypes
|
|
78
|
+
* There is a one-to-one mapping between subclassing and
|
|
79
|
+
the union of xsd:extends and simpleType definitions
|
|
80
|
+
* There is a one-to-one mapping between interfaces and
|
|
81
|
+
the union of choice groups and substitutionGroups.
|
|
82
|
+
* There is a one-to-one mapping between instance attributes
|
|
83
|
+
the union of xml attributes, xsd:choice groups, and
|
|
84
|
+
child elements in (the union of xsd:sequence and xsd:all).
|
|
85
|
+
* The name of domain object attribues defaults to the name of
|
|
86
|
+
the xml attribute or xml element. In the case of xsd:choice
|
|
87
|
+
groups, a meaningful attribute name can not be derived from
|
|
88
|
+
the schema. **** It is a common mistake to think that
|
|
89
|
+
element names must map 1:1 on to class names. Although this is
|
|
90
|
+
possible, the element name could instead be an attribute name.
|
|
91
|
+
This issue is complicated by substitution and choice groups. Roog
|
|
92
|
+
uses the interface name as the
|
|
93
|
+
attribute name, but this must be mapped on to multiple concrete
|
|
94
|
+
elements: see @elementNameToClass
|
|
95
|
+
* It does not matter which XML container (xsd:sequence, xsd:all)
|
|
96
|
+
is used to hold child elements: all of the child elements turn into
|
|
97
|
+
instance attributes (except for xsd:choice)
|
|
98
|
+
* Some things can not be deduced very well or even at all from the schema:
|
|
99
|
+
* Which element is root!!! (Unless elements are defined on-the-fly)
|
|
100
|
+
* Class (static) attributes.
|
|
101
|
+
* Accessability (private/public/etc) of attributes
|
|
102
|
+
* Package path of classes (need external hints, possibly based on namespaces)
|
|
103
|
+
* Dependencies among package paths (or can we deduce these?)
|
|
104
|
+
* Methods other than accessors and collection management
|
|
105
|
+
* Types of collections
|
|
106
|
+
* Names of Interfaces representing xsd:choice groups
|
|
107
|
+
* Names of attributes holding Interfaces representing xsd:choice groups
|
|
108
|
+
* Ordering of child elements of the same type is important if the collection
|
|
109
|
+
type is ordered. Ordering between child elements of different types is not important.
|
|
110
|
+
* XML namespaces correspond to Java package paths or Ruby module paths
|
|
111
|
+
For this reason namespaces are handled when writing code.
|
|
112
|
+
* xsd:anyType corresponds to globalSuper
|
|
113
|
+
* xsd:any elements correspond to attributes named "any", of type
|
|
114
|
+
(depending on multiplicity) globalSuper or Array of globalSuper
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
Presumptions (easier to remove)
|
|
118
|
+
* A lot of attributes are currently ignored (with error message)
|
|
119
|
+
* Some structures are currently ignored (with error message)
|
|
120
|
+
* It's ok to generate names that can not be deduced from the schema
|
|
121
|
+
* We don't go out of our way to gracefully handle features of schemas that don't map well to objects.
|
|
122
|
+
|
|
123
|
+
Author: A. Griesser
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
Valid schemas can be ambiguous. Example from IPC2581:
|
|
129
|
+
====== Simplified IPC2581 Schema ================
|
|
130
|
+
<xsd:complexType name = "SetType">
|
|
131
|
+
<xsd:choice minOccurs = "0" maxOccurs = "unbounded">
|
|
132
|
+
<xsd:element ref = "Pad"/>
|
|
133
|
+
<xsd:element ref = "Fiducial"/>
|
|
134
|
+
</xsd:choice>
|
|
135
|
+
</xsd:complexType>
|
|
136
|
+
<xsd:element name = "Fiducial" abstract = "true"/>
|
|
137
|
+
<xsd:element name = "GlobalFiducial" type = "PadType" substitutionGroup = "Fiducial"/>
|
|
138
|
+
<xsd:element name = "Pad" type = "PadType"/>
|
|
139
|
+
======== The Problem =================
|
|
140
|
+
When you marshall objects to XML, do you create a Pad element or a Fiducial element?
|
|
141
|
+
It's hard to tell because both are of type PadType.
|
|
142
|
+
Your marshalling framework needs some kind of hint that isn't part of the schema.
|
|
143
|
+
This info is stored in an added attribute specified by hint_attribute_name
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
Roog was slapped together, so that I could build the OffspringViewer under a
|
|
147
|
+
tight deadline. Roog needs to be thought out better, and refactored. Stuff to do:
|
|
148
|
+
Separate Roog into Schema-parsing and Schema-analysis files.
|
|
149
|
+
The schema-analysis file would add behaviors.
|
|
150
|
+
Reconsider the policy attributes
|
|
151
|
+
Some look like they belong in Pippin
|
|
152
|
+
Some are accessed from pippin.
|
|
153
|
+
Perhaps Pippin should extend Roog's Policy.
|
|
154
|
+
The methods that Roog implements for Pippin's sake should
|
|
155
|
+
become extensions to the Roog classes, located in the Pippin file.
|
|
156
|
+
Verify: an element whose type specifies a simpleType carries it's data in the CDATA
|
|
157
|
+
between the opening and closing tags.
|
|
158
|
+
Verify dateTime representation
|
|
159
|
+
Name conversions are lousy:
|
|
160
|
+
toModuleName, toAttributeName, toModulePath are all crude approximations
|
|
161
|
+
Need to check for names which are reserved words
|
|
162
|
+
The names of attributes (and methods) of these classes are not consistent enough
|
|
163
|
+
for example, xmlSuperName vs. superEntityName, and xmlSuperName vs. xml_implementorNames
|
|
164
|
+
We need to distinguish several orthagonal axes:
|
|
165
|
+
namespace: xml document / domain
|
|
166
|
+
scope: local name / path / fq
|
|
167
|
+
when available: after analysis / after resolving fwd refs
|
|
168
|
+
required analyzer mode: singleton/detached
|
|
169
|
+
Could resolve by always using detached, and explitly passing the analyzer.
|
|
170
|
+
Detachment is good since muliple schemas will often be needed.
|
|
171
|
+
efficiency: computed / cached
|
|
172
|
+
failureAllowed: can / can't return nil
|
|
173
|
+
keySematics: elementName, type, etc
|
|
174
|
+
Could code generation use detached analyzer? (Semantics_ruby can)
|
|
175
|
+
Regression tests
|
|
176
|
+
Better control over when things can be nil
|
|
177
|
+
Assertions
|
|
178
|
+
Move recursive gathering in Roog::Interface up to Entity so it can use subclasses.
|
|
179
|
+
Input hints
|
|
180
|
+
Output hints
|
|
181
|
+
Base class (table, so you can customize)
|
|
182
|
+
xsd:string should not "include autoGenName_choiceInterface_4".... or should it???
|
|
183
|
+
Be more consistent about implicitly returned values
|
|
184
|
+
=end
|
|
185
|
+
|
|
186
|
+
# Perhaps these should be moved elsewhere: they are not very Roog specific
|
|
187
|
+
XMLNamespaceSep = ":"
|
|
188
|
+
UnixPathSep = "/"
|
|
189
|
+
JavaPathSep = "."
|
|
190
|
+
RubyPathSep = "::"
|
|
191
|
+
|
|
192
|
+
class String
|
|
193
|
+
|
|
194
|
+
# Horribly simpleminded
|
|
195
|
+
def toAttributeName()
|
|
196
|
+
badChars = '- ' #
|
|
197
|
+
return downcaseFirst.tr(badChars, '_')
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
# Horribly simpleminded
|
|
201
|
+
def toModuleName()
|
|
202
|
+
badChars = '- ' #
|
|
203
|
+
return capitalizeFirst.tr(badChars, '_')
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
# Horribly simpleminded
|
|
207
|
+
# Also need to convert path separators
|
|
208
|
+
def toModulePath()
|
|
209
|
+
return toModuleName
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# Returns another string, split at the last namespaceSep,
|
|
213
|
+
# with the namespace and separator removed
|
|
214
|
+
def stripNamespace(namespaceSep=XMLNamespaceSep)
|
|
215
|
+
nsOffset = rindex(namespaceSep)
|
|
216
|
+
if nil==nsOffset
|
|
217
|
+
return self
|
|
218
|
+
else
|
|
219
|
+
remainderStart = nsOffset + namespaceSep.length
|
|
220
|
+
remainderLength = length - remainderStart
|
|
221
|
+
if nameLength>0
|
|
222
|
+
return self[remainderStart, remainderLength]
|
|
223
|
+
end
|
|
224
|
+
end
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
# Returns:
|
|
229
|
+
# If there is no namespaceSep: nil
|
|
230
|
+
# If there is: anArray[0]=namespace (may be zero length), anArray[1]=remainder (may be zero length)
|
|
231
|
+
def splitNamespace(namespaceSep=XMLNamespaceSep)
|
|
232
|
+
nsOffset = rindex(namespaceSep)
|
|
233
|
+
if nil==nsOffset
|
|
234
|
+
return nil
|
|
235
|
+
else
|
|
236
|
+
remainderStart = nsOffset + namespaceSep.length
|
|
237
|
+
remainderLength = self.length - remainderStart
|
|
238
|
+
return [ self[0, nsOffset], self[remainderStart, remainderLength] ]
|
|
239
|
+
end
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
end # String
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
module Roog
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
class Policy
|
|
251
|
+
# FIXME: Temporarily a singleton. The singleton is convenient because it does not
|
|
252
|
+
# need to be passed around. It's bad because you can't have different instances
|
|
253
|
+
# of Roog classes that rely on different Policies.
|
|
254
|
+
include Singleton
|
|
255
|
+
|
|
256
|
+
# If true, Roog::Class.instantiateWith returns Framelets instead of domain objects.
|
|
257
|
+
# Note that you must use bypass_initialize=true if USE_FRAMELETS=true
|
|
258
|
+
attr_accessor :use_framelets
|
|
259
|
+
|
|
260
|
+
# If bypass_initialize is true, when you unmarshal a domain object,
|
|
261
|
+
# its :initialize method is not called. Attributes which are
|
|
262
|
+
# collections are set to Arrays by the unmarshalling code.
|
|
263
|
+
# Disadvantage: slower performance
|
|
264
|
+
# Advantage: can unmarshall objects that have :initialize methods that require arguments.
|
|
265
|
+
# If bypass_initialize is false, the class's "new" method is called,
|
|
266
|
+
# and :initialize gets invoked.
|
|
267
|
+
# Note that bypass_initialize does not apply to simple objects that get
|
|
268
|
+
# built from strings, and to attribute values that get converted.
|
|
269
|
+
attr_accessor :bypass_initialize # previously BYPASS_INITIALIZE
|
|
270
|
+
|
|
271
|
+
# If save_context = true, each SchemaDefined will save it's REXML
|
|
272
|
+
# :definition and :context (stack). This is useful mainly for debugging.
|
|
273
|
+
attr_accessor :save_context # previously SAVE_CONTEXT
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
# Currently used to format all floats (using sprintf), if not nil
|
|
277
|
+
attr_accessor :default_float_format # previously DEFAULT_FLOAT_FORMAT
|
|
278
|
+
# If true, print warnings related to schema issues
|
|
279
|
+
attr_accessor :schema_warnings # previously SCHEMA_WARNINGS
|
|
280
|
+
# Name of attribute used to cache schema ambiguity resolution info
|
|
281
|
+
attr_accessor :hint_attribute_name # previously HINT_ATTRIBUTE_NAME
|
|
282
|
+
# The path used for Entities that do not have a path. May be nil.
|
|
283
|
+
# Should not be nil if your schema contains elements that map
|
|
284
|
+
# onto a class with a name that conflicts with an existing ruby class.
|
|
285
|
+
# Used to initializze aNamer.defaultPathString
|
|
286
|
+
attr_accessor :defaultPathString
|
|
287
|
+
# The module that contains all generated Ruby classes.
|
|
288
|
+
# This can be nil. If it is not, even the Xsd classes will be included
|
|
289
|
+
# (which probably isn't what you want).
|
|
290
|
+
# Used as a default for Semantics_Ruby.globalModule
|
|
291
|
+
attr_accessor :globalModule
|
|
292
|
+
# Name of module to be mixed into all ruby classes.
|
|
293
|
+
# Does not get mixed into modules that act as packages.
|
|
294
|
+
# Not certain about modules that act as interfaces.
|
|
295
|
+
# Used as a default for Generator_Ruby.globalMixin
|
|
296
|
+
attr_accessor :globalMixin
|
|
297
|
+
# Name of a class that all generated classes should inherit from
|
|
298
|
+
# Used as a default for Generator_Ruby.globalSuper
|
|
299
|
+
attr_accessor :globalSuper
|
|
300
|
+
attr_accessor :debug
|
|
301
|
+
|
|
302
|
+
def initialize
|
|
303
|
+
self.use_framelets=false
|
|
304
|
+
self.bypass_initialize = true
|
|
305
|
+
self.save_context = false
|
|
306
|
+
self.default_float_format=nil
|
|
307
|
+
self.schema_warnings=false
|
|
308
|
+
self.hint_attribute_name='@_pippin_element_name'
|
|
309
|
+
self.defaultPathString=nil
|
|
310
|
+
self.globalModule=nil
|
|
311
|
+
self.globalMixin=nil
|
|
312
|
+
self.globalSuper=nil
|
|
313
|
+
self.debug=false
|
|
314
|
+
end
|
|
315
|
+
|
|
316
|
+
end # Policy
|
|
317
|
+
|
|
318
|
+
end # Roog
|
|
319
|
+
|
|
320
|
+
def roog_policy; Roog::Policy.instance; end
|
|
321
|
+
|
|
322
|
+
module Roog
|
|
323
|
+
|
|
324
|
+
module RenameTracker
|
|
325
|
+
|
|
326
|
+
attr_accessor :oldToNewNames, :newToOldNames
|
|
327
|
+
|
|
328
|
+
def initialize_RenameTracker
|
|
329
|
+
@oldToNewNames = Hash.new
|
|
330
|
+
@newToOldNames = Hash.new
|
|
331
|
+
end
|
|
332
|
+
|
|
333
|
+
def associateNames(oldName, newName)
|
|
334
|
+
# print "\n=== "+oldName.to_s+" -> "+newName.to_s
|
|
335
|
+
@oldToNewNames[oldName]=newName
|
|
336
|
+
@newToOldNames[newName]=oldName
|
|
337
|
+
end
|
|
338
|
+
|
|
339
|
+
end # RenameTracker
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
# ===========================================================================================================
|
|
343
|
+
# Represents a part of a model constructed from the schema
|
|
344
|
+
#
|
|
345
|
+
class ModelComponent
|
|
346
|
+
|
|
347
|
+
attr_accessor :localName
|
|
348
|
+
|
|
349
|
+
def initialize(localName)
|
|
350
|
+
@localName = localName
|
|
351
|
+
end
|
|
352
|
+
|
|
353
|
+
def isClass?() return false end
|
|
354
|
+
def isPath?() return false end
|
|
355
|
+
def isInterface?() return false end
|
|
356
|
+
def isAttribute?() return false end
|
|
357
|
+
|
|
358
|
+
def to_s
|
|
359
|
+
"<#{self.class.name} localName=#{localName}>"
|
|
360
|
+
end
|
|
361
|
+
|
|
362
|
+
end
|
|
363
|
+
|
|
364
|
+
# ===========================================================================================================
|
|
365
|
+
class Path < ModelComponent
|
|
366
|
+
|
|
367
|
+
attr_reader :parentPath, :childPaths, :classMap, :interfaceMap
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
# Links the parent and child paths.
|
|
371
|
+
# localName is the name of this instance, within the parentPath.
|
|
372
|
+
# parentPath is another instance (not a path name).
|
|
373
|
+
# Does not register the path Analyzer.instance.pathMap
|
|
374
|
+
def initialize(localName, parentPath)
|
|
375
|
+
super(localName)
|
|
376
|
+
@parentPath = parentPath
|
|
377
|
+
@childPaths = Array.new
|
|
378
|
+
@classMap = Hash.new
|
|
379
|
+
@interfaceMap = Hash.new
|
|
380
|
+
if parentPath!=nil
|
|
381
|
+
parentPath.childPaths << self
|
|
382
|
+
end
|
|
383
|
+
end
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
def isPath?() return true end
|
|
387
|
+
|
|
388
|
+
# entity is either a Roog::Class or Roog::Interface
|
|
389
|
+
def addEntity( entity)
|
|
390
|
+
if entity.isClass?
|
|
391
|
+
classMap[entity.localName]=entity
|
|
392
|
+
else
|
|
393
|
+
interfaceMap[entity.localName]=entity
|
|
394
|
+
end
|
|
395
|
+
end
|
|
396
|
+
|
|
397
|
+
|
|
398
|
+
def interfaces
|
|
399
|
+
return @interfaceMap.values
|
|
400
|
+
end
|
|
401
|
+
|
|
402
|
+
def classes
|
|
403
|
+
return @classMap.values
|
|
404
|
+
end
|
|
405
|
+
|
|
406
|
+
# We are only interested in one type of prerequisite,
|
|
407
|
+
# so the typeSymbol is ignored (it's expected to be :pathDependency)
|
|
408
|
+
def prerequisites(typeSymbol)
|
|
409
|
+
parts = localName.splitNamespace(RubyPathSep)
|
|
410
|
+
return [] if !parts
|
|
411
|
+
[ Analyzer.pathNamed(parts[0], true) ]
|
|
412
|
+
end
|
|
413
|
+
|
|
414
|
+
end
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
# ===========================================================================================================
|
|
419
|
+
# Common behavior for Attribute, Class, and Interface
|
|
420
|
+
class SchemaDefined < ModelComponent
|
|
421
|
+
|
|
422
|
+
attr_reader :definition, :context, :xmlName
|
|
423
|
+
|
|
424
|
+
# === Probably need to override ===
|
|
425
|
+
|
|
426
|
+
# Define instance attributes and their initial values
|
|
427
|
+
# Used for instance variables added by subclasses.
|
|
428
|
+
# This is called inside initialize, and elminates
|
|
429
|
+
# the need to redefine initialize.
|
|
430
|
+
def setup(definition)
|
|
431
|
+
end
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
# Finish the definion
|
|
435
|
+
def postProcess()
|
|
436
|
+
end
|
|
437
|
+
|
|
438
|
+
|
|
439
|
+
# ==== Should not override (convenience abbreviations)
|
|
440
|
+
|
|
441
|
+
# looks up a new name to replace oldName.
|
|
442
|
+
# If oldName is nil, return nil without a warning.
|
|
443
|
+
# If oldName is not nil, but can not be mapped, prints a warning
|
|
444
|
+
# and returns oldName.
|
|
445
|
+
# Unexpected warnings may indicate that generateStandardSimpleClasses
|
|
446
|
+
# is missing a name.
|
|
447
|
+
def remap(map, type, oldName)
|
|
448
|
+
if oldName==nil
|
|
449
|
+
return nil
|
|
450
|
+
end
|
|
451
|
+
newName = map[oldName]
|
|
452
|
+
if newName==nil
|
|
453
|
+
error self.class.name+".remap() can't find new name for "+type+" "+oldName.to_s
|
|
454
|
+
return oldName
|
|
455
|
+
else
|
|
456
|
+
return newName
|
|
457
|
+
end
|
|
458
|
+
end
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
def tos(attributeName=nil)
|
|
462
|
+
return Analyzer.tos(attributeName)
|
|
463
|
+
end
|
|
464
|
+
|
|
465
|
+
|
|
466
|
+
# ==== Should not override
|
|
467
|
+
|
|
468
|
+
|
|
469
|
+
# "definition" is the REXML::Element at the root of the definition
|
|
470
|
+
def initialize(definition, xmlName)
|
|
471
|
+
@xmlName=xmlName
|
|
472
|
+
if roog_policy.save_context
|
|
473
|
+
@definition=definition
|
|
474
|
+
@context=Analyzer.stackClone
|
|
475
|
+
end
|
|
476
|
+
setup(definition)
|
|
477
|
+
if @xmlName==nil
|
|
478
|
+
defStr = StringIO.new
|
|
479
|
+
definition.treeDump(3, defStr)
|
|
480
|
+
fatal( self.class.name + " without xmlName. definition: #{defStr.string}" )
|
|
481
|
+
return
|
|
482
|
+
end
|
|
483
|
+
# definition is nil for standard simple classes
|
|
484
|
+
# created by generateStandardSimpleClasses
|
|
485
|
+
if definition!=nil
|
|
486
|
+
dispatchElement(definition)
|
|
487
|
+
end
|
|
488
|
+
postProcess
|
|
489
|
+
end
|
|
490
|
+
|
|
491
|
+
|
|
492
|
+
# element must not be nil
|
|
493
|
+
def dispatchElement(element)
|
|
494
|
+
elementName = element.name
|
|
495
|
+
if elementName==nil
|
|
496
|
+
error "Unexpected inability to find REXML:Element.name"
|
|
497
|
+
return
|
|
498
|
+
end
|
|
499
|
+
Analyzer.push(element)
|
|
500
|
+
dispatchName(elementName)
|
|
501
|
+
Analyzer.pop
|
|
502
|
+
end
|
|
503
|
+
|
|
504
|
+
# If element is nil, the tos is used
|
|
505
|
+
def dispatchChildren(element=nil)
|
|
506
|
+
if element==nil
|
|
507
|
+
element = tos
|
|
508
|
+
end
|
|
509
|
+
element.elements.each { |subElement|
|
|
510
|
+
dispatchElement(subElement)
|
|
511
|
+
}
|
|
512
|
+
end
|
|
513
|
+
|
|
514
|
+
# Dereferences the group if necessary
|
|
515
|
+
def dispatchGroupChildren(group=nil)
|
|
516
|
+
if group==nil
|
|
517
|
+
group = tos
|
|
518
|
+
end
|
|
519
|
+
dispatchChildren(group)
|
|
520
|
+
deRefed = Analyzer.schema.deRefGroup(group)
|
|
521
|
+
if deRefed!=nil
|
|
522
|
+
dispatchChildren(deRefed)
|
|
523
|
+
if group.has_elements?
|
|
524
|
+
warn "group has both ref and child elements"
|
|
525
|
+
end
|
|
526
|
+
end
|
|
527
|
+
end
|
|
528
|
+
|
|
529
|
+
def dispatchName(elementName)
|
|
530
|
+
command = deriveMethodName("specify_", elementName, nil)
|
|
531
|
+
commandSymbol = command.intern
|
|
532
|
+
if respond_to? commandSymbol
|
|
533
|
+
self.send(commandSymbol)
|
|
534
|
+
else
|
|
535
|
+
fatal self.class.name + " is unable to dispatchName "+ command
|
|
536
|
+
end
|
|
537
|
+
end
|
|
538
|
+
|
|
539
|
+
# This refers to methods dispatched by send(aSymbol) during schema processing.
|
|
540
|
+
# Concatenate the three components. Only the first whitespace delimited word
|
|
541
|
+
# of string is used, and that is striped of any leading namespace.
|
|
542
|
+
def deriveMethodName(prefix, string, suffix)
|
|
543
|
+
result = ""
|
|
544
|
+
if prefix !=nil
|
|
545
|
+
result=prefix
|
|
546
|
+
end
|
|
547
|
+
result = result + string.firstWord.stripNamespace
|
|
548
|
+
if suffix != nil
|
|
549
|
+
result=result+suffix
|
|
550
|
+
end
|
|
551
|
+
return result
|
|
552
|
+
end
|
|
553
|
+
|
|
554
|
+
|
|
555
|
+
|
|
556
|
+
def notSupported(attributeName)
|
|
557
|
+
if nil!=tos("attributeName")
|
|
558
|
+
warn "Not yet supported: " + tos.name + attributeName
|
|
559
|
+
end
|
|
560
|
+
end
|
|
561
|
+
|
|
562
|
+
def to_s
|
|
563
|
+
"<#{self.class.name} localName=#{localName} xmlName=#{xmlName}>"
|
|
564
|
+
end
|
|
565
|
+
|
|
566
|
+
end
|
|
567
|
+
|
|
568
|
+
|
|
569
|
+
# ===========================================================================================================
|
|
570
|
+
# Represents (what will become) an attribute in the object model
|
|
571
|
+
class Attribute < SchemaDefined
|
|
572
|
+
|
|
573
|
+
# category is either "xsd:attribute" or "xsd:element"
|
|
574
|
+
attr_reader :minOccurs, :maxOccurs, :xmlTypeName, :default, :domainType, :elementNameToClass, :classToElementName, :category
|
|
575
|
+
attr_writer :domainType
|
|
576
|
+
|
|
577
|
+
def initialize(definition, xmlName, category)
|
|
578
|
+
@category = category
|
|
579
|
+
super(definition, xmlName)
|
|
580
|
+
end
|
|
581
|
+
|
|
582
|
+
def is_xml_child?
|
|
583
|
+
'xsd:attribute'!=category # may be xsd:element, xsd:choice, possibly others
|
|
584
|
+
end
|
|
585
|
+
|
|
586
|
+
def required?
|
|
587
|
+
minOccurs>0
|
|
588
|
+
end
|
|
589
|
+
|
|
590
|
+
def setup(definition)
|
|
591
|
+
super
|
|
592
|
+
@minOccurs=0
|
|
593
|
+
@maxOccurs=1
|
|
594
|
+
@xmlTypeName=nil # May refer to an Interface, rather than a concrete class
|
|
595
|
+
# An attribute can have only one type: if there seem to be more,
|
|
596
|
+
# use an Interface (perhaps a tagging one with no behaviors)
|
|
597
|
+
@default=nil
|
|
598
|
+
@domainType=nil
|
|
599
|
+
@classToElementName=Hash.new # Lets you look up all the child elements that are unmarshalled
|
|
600
|
+
# to a specific class (whose name is a key in this Hash).
|
|
601
|
+
# This is similar to an inverse of elementNameToClass. It's not
|
|
602
|
+
# exactly an inverse, because multiple child elements can be mapped
|
|
603
|
+
# onto the same class. The values are arrays.
|
|
604
|
+
# CAUTION: this and elementNameToClass must be maintained together!
|
|
605
|
+
@elementNameToClass=Hash.new # Lets you look up a concrete class. Similar to elementName2TypeName,
|
|
606
|
+
# but this is a higher level cache, queried by unmarshaller.
|
|
607
|
+
end
|
|
608
|
+
|
|
609
|
+
def ambiguous_element_for_class?(roogClass)
|
|
610
|
+
elements = classToElementName[roogClass]
|
|
611
|
+
assert {"Sanity check failure: no elements in attribute=#{xmlName} for class=#{roogClass.xmlName}" if elements.nil? || elements.empty? }
|
|
612
|
+
elements.size > 1
|
|
613
|
+
end
|
|
614
|
+
|
|
615
|
+
# Currently there is no way to undo this operation.
|
|
616
|
+
def associate_elementName_to_class(elementName, roogClass)
|
|
617
|
+
assert {"Sanity check failure: should not be redefining elementName=#{elementName} => roogClass=#{roogClass.xmlName} for attribute=#{xmlName}" if elementNameToClass.include? elementName }
|
|
618
|
+
elementNameToClass[elementName]=roogClass
|
|
619
|
+
classToElementName[roogClass]||= Array.new
|
|
620
|
+
classToElementName[roogClass] << elementName
|
|
621
|
+
end
|
|
622
|
+
|
|
623
|
+
def element_name_for_class(roogClass, object)
|
|
624
|
+
# simple cheap original thing: return elementNameToClass.key_for_value(roogClass)
|
|
625
|
+
answer = classToElementName[roogClass]
|
|
626
|
+
raise "Attribute #{localName} is unable to look up element name for class #{roogClass.localName}" if answer.nil? || answer.empty?
|
|
627
|
+
return answer[0] if answer.size==1
|
|
628
|
+
hint = object.get_ivar!(roog_policy.hint_attribute_name)
|
|
629
|
+
if hint.nil?
|
|
630
|
+
print "\nWarning: multiple elements names (#{answer.join(', ')}) for class #{roogClass.localName} in attribute #{localName}, without #{roog_policy.hint_attribute_name}" if roog_policy.schema_warnings
|
|
631
|
+
return answer[0]
|
|
632
|
+
end
|
|
633
|
+
return hint if answer.include? hint
|
|
634
|
+
print "\nWarning: multiple elements names (#{answer.join(', ')}) for class #{roogClass.localName} in attribute #{localName}, unresolved by #{roog_policy.hint_attribute_name}=#{hint.to_s}" if roog_policy.schema_warnings
|
|
635
|
+
answer[0]
|
|
636
|
+
end
|
|
637
|
+
|
|
638
|
+
def isAttribute?() return true end
|
|
639
|
+
|
|
640
|
+
def initialize?
|
|
641
|
+
return isCollection
|
|
642
|
+
end
|
|
643
|
+
|
|
644
|
+
def domainTypeName
|
|
645
|
+
return domainType.localName
|
|
646
|
+
end
|
|
647
|
+
|
|
648
|
+
def initialize_in(domainObj)
|
|
649
|
+
return if !isCollection
|
|
650
|
+
domainObj.set_ivar(localName, Array.new)
|
|
651
|
+
end
|
|
652
|
+
|
|
653
|
+
# The domainObj must have a public setter and getter
|
|
654
|
+
# Should be renamed to set_or_add_value
|
|
655
|
+
def setValue(domainObj, value)
|
|
656
|
+
if isCollection
|
|
657
|
+
collection = domainObj.get_ivar(localName)
|
|
658
|
+
collection << value
|
|
659
|
+
else
|
|
660
|
+
raise "Attribute #{localName} is required: can't set to nil." if value.nil? && required?
|
|
661
|
+
domainObj.set_ivar(localName, value)
|
|
662
|
+
end
|
|
663
|
+
end
|
|
664
|
+
|
|
665
|
+
# The domainObj must have a public getter.
|
|
666
|
+
def getValue(domainObj)
|
|
667
|
+
domainObj.get_ivar(localName)
|
|
668
|
+
end
|
|
669
|
+
|
|
670
|
+
def concreteClassForElementName(elementName)
|
|
671
|
+
elementNameToClass[elementName]
|
|
672
|
+
end
|
|
673
|
+
|
|
674
|
+
# Finds the lowest level concrete Roog::Class corresponding to a given domainObj.
|
|
675
|
+
# This is more complicated than it sounds, due to interfaces, modules, and superclasses.
|
|
676
|
+
# roogClass is deduced from the domainObj and roogAttribute.domainType
|
|
677
|
+
# (which might be abstract, or an interface)
|
|
678
|
+
# Returns nil if unable to find a concrete class.
|
|
679
|
+
# NOTE: analyzer is passed in because this is called after the anaylyzer
|
|
680
|
+
# has been detached.
|
|
681
|
+
def concreteClassForDomainObject(domainObj, analyzer, errorIfMissing=true)
|
|
682
|
+
sought = domainObj.class
|
|
683
|
+
return domainType if ( domainType.isClass? && !domainType.isAbstract && domainType.instantiates_domain_object(domainObj) )
|
|
684
|
+
concrete = domainType.all_concrete_children(analyzer, false)
|
|
685
|
+
# Think we don't need to worry about more than one, because they are concrete.
|
|
686
|
+
answer = concrete.detect { |klass| klass.instantiates_domain_object(domainObj) }
|
|
687
|
+
assert { "Unable to find a concrete Roog::Class for domain object <#{domainObj.to_s}> of class #{domainObj.class_name} in attribute #{localName}" if answer==nil } if errorIfMissing
|
|
688
|
+
answer
|
|
689
|
+
end
|
|
690
|
+
|
|
691
|
+
# === Performed by dispatch() ===
|
|
692
|
+
|
|
693
|
+
|
|
694
|
+
def specify_attribute()
|
|
695
|
+
notSupported "fixed"
|
|
696
|
+
notSupported "form"
|
|
697
|
+
notSupported "ref"
|
|
698
|
+
use = tos("use")
|
|
699
|
+
@xmlTypeName = tos("type")
|
|
700
|
+
@default = tos("default")
|
|
701
|
+
case use
|
|
702
|
+
when "optional", nil
|
|
703
|
+
@minOccurs=0
|
|
704
|
+
@maxOccurs=1
|
|
705
|
+
when "prohibited"
|
|
706
|
+
# "prohibited" is used when a complex type is restricted
|
|
707
|
+
error "Not yet supported: xsd:attribute.use = 'prohibited'."
|
|
708
|
+
when "required"
|
|
709
|
+
@minOccurs=1
|
|
710
|
+
@maxOccurs=1
|
|
711
|
+
end
|
|
712
|
+
end
|
|
713
|
+
|
|
714
|
+
def specify_element()
|
|
715
|
+
notSupported "id"
|
|
716
|
+
notSupported "abstract"
|
|
717
|
+
notSupported "block"
|
|
718
|
+
notSupported "final"
|
|
719
|
+
notSupported "fixed"
|
|
720
|
+
notSupported "form"
|
|
721
|
+
notSupported "nillable" # Does this mean optional?
|
|
722
|
+
ref = tos("ref")
|
|
723
|
+
if ref
|
|
724
|
+
deRefed = Analyzer.schema.deRefThing(tos)
|
|
725
|
+
fatal("Schema was unable to deRefThing #{tos.to_s}") if !deRefed
|
|
726
|
+
copyFromTemplate( deRefed )
|
|
727
|
+
end
|
|
728
|
+
# declaration overrides referenced template.
|
|
729
|
+
# need to verify this.
|
|
730
|
+
error("Unexpected nil tos") if !tos
|
|
731
|
+
copyFromTemplate( tos )
|
|
732
|
+
end
|
|
733
|
+
|
|
734
|
+
def specify_choice()
|
|
735
|
+
setMinOccurs(tos("minOccurs"))
|
|
736
|
+
setMaxOccurs(tos("maxOccurs"))
|
|
737
|
+
@xmlTypeName = Analyzer.choiceInterfaceName
|
|
738
|
+
Analyzer.xmlRegisterEntity( Roog::Interface.new(tos, @xmlTypeName) )
|
|
739
|
+
end
|
|
740
|
+
|
|
741
|
+
# === Construction helpers ===
|
|
742
|
+
|
|
743
|
+
def copyFromTemplate(template)
|
|
744
|
+
attrib = template.attributes
|
|
745
|
+
setMinOccurs(attrib["minOccurs"])
|
|
746
|
+
setMaxOccurs(attrib["maxOccurs"])
|
|
747
|
+
setDefault(attrib["default"])
|
|
748
|
+
setType(attrib["substitutionGroup"])
|
|
749
|
+
# type overrides substitutionGroup attribute
|
|
750
|
+
# See Walmsley page 362, next-to-last paragraph
|
|
751
|
+
setType(attrib["type"])
|
|
752
|
+
# head of substitution group overrides type
|
|
753
|
+
_name = attrib["name"]
|
|
754
|
+
if (Analyzer.schema.existsSubstGroup(_name))
|
|
755
|
+
setType(_name)
|
|
756
|
+
end
|
|
757
|
+
end
|
|
758
|
+
|
|
759
|
+
# Silently does nothing if string is nil
|
|
760
|
+
def setType(string)
|
|
761
|
+
return if !string
|
|
762
|
+
@xmlTypeName=string
|
|
763
|
+
end
|
|
764
|
+
|
|
765
|
+
# Silently does nothing if string is nil
|
|
766
|
+
def setDefault(string)
|
|
767
|
+
return if !string
|
|
768
|
+
@default=string
|
|
769
|
+
end
|
|
770
|
+
|
|
771
|
+
# Silently does nothing if string is nil
|
|
772
|
+
def setMinOccurs(string)
|
|
773
|
+
return if !string
|
|
774
|
+
int = string.to_i
|
|
775
|
+
if int<0
|
|
776
|
+
error "Cardinality can't be negative!"
|
|
777
|
+
elsif int!=0
|
|
778
|
+
@minOccurs=int
|
|
779
|
+
elsif "0"==string # to_i returns 0 if string does not start with integer
|
|
780
|
+
@minOccurs=0
|
|
781
|
+
else
|
|
782
|
+
error "Invalid value for minOccurs (#{string})"
|
|
783
|
+
end
|
|
784
|
+
end
|
|
785
|
+
|
|
786
|
+
|
|
787
|
+
# Silently does nothing if string is nil
|
|
788
|
+
def setMaxOccurs(string)
|
|
789
|
+
return if !string
|
|
790
|
+
int = string.to_i
|
|
791
|
+
if int<0
|
|
792
|
+
error "Cardinality can't be negative!"
|
|
793
|
+
elsif int!=0
|
|
794
|
+
@maxOccurs=int
|
|
795
|
+
elsif "0"==string # to_i returns 0 if string does not start with integer
|
|
796
|
+
error "maxOccurs should not be zero"
|
|
797
|
+
elsif "unbounded"==string
|
|
798
|
+
@maxOccurs=:unbounded
|
|
799
|
+
else
|
|
800
|
+
error "Invalid value for maxOccurs (#{string})"
|
|
801
|
+
end
|
|
802
|
+
end
|
|
803
|
+
|
|
804
|
+
# === Output ===
|
|
805
|
+
|
|
806
|
+
def isCollection()
|
|
807
|
+
if @maxOccurs==:unbounded
|
|
808
|
+
return true
|
|
809
|
+
elsif @maxOccurs.kind_of?(Numeric)
|
|
810
|
+
return @maxOccurs>1
|
|
811
|
+
else
|
|
812
|
+
error "Unrecognized maxOccurs in Roog::Class.isCollection"
|
|
813
|
+
return false
|
|
814
|
+
end
|
|
815
|
+
end
|
|
816
|
+
|
|
817
|
+
# If isCollection, then this refers to the contents
|
|
818
|
+
def isOptional()
|
|
819
|
+
#if @minOccurs < 1
|
|
820
|
+
# return true
|
|
821
|
+
# end
|
|
822
|
+
#return false
|
|
823
|
+
@minOccurs < 1
|
|
824
|
+
end
|
|
825
|
+
|
|
826
|
+
|
|
827
|
+
def multiplicity()
|
|
828
|
+
if isCollection
|
|
829
|
+
return @minOccurs.to_s + "... "+@maxOccurs.to_s
|
|
830
|
+
elsif isOptional
|
|
831
|
+
return "optional"
|
|
832
|
+
else
|
|
833
|
+
return "required"
|
|
834
|
+
end
|
|
835
|
+
end
|
|
836
|
+
|
|
837
|
+
def description()
|
|
838
|
+
if isCollection
|
|
839
|
+
return "Collection (#{multiplicity}) of "+domainTypeName
|
|
840
|
+
else
|
|
841
|
+
return multiplicity+" "+domainTypeName
|
|
842
|
+
end
|
|
843
|
+
end
|
|
844
|
+
|
|
845
|
+
end
|
|
846
|
+
|
|
847
|
+
|
|
848
|
+
# ===========================================================================================================
|
|
849
|
+
# Represents (what will become) a class or interface in the object model
|
|
850
|
+
#
|
|
851
|
+
class Entity < SchemaDefined
|
|
852
|
+
|
|
853
|
+
# We could derive localName and pathString from fqName
|
|
854
|
+
# but it's nice to keep this code independent of the language to be generated
|
|
855
|
+
# (which affects the path separator)
|
|
856
|
+
# FIXME? subEntities was added to enable a class to know it's subclasses.
|
|
857
|
+
# This might duplicate some semantics related to extenders of Interfaces.
|
|
858
|
+
# If so, it's harmless, just ugly.
|
|
859
|
+
attr_accessor :pathString, :fqName, :xmlSuperName, :superEntity, :subEntities
|
|
860
|
+
|
|
861
|
+
# Define instance attributes and their initial values
|
|
862
|
+
def setup(definition)
|
|
863
|
+
super
|
|
864
|
+
@pathString=nil
|
|
865
|
+
@fqName=nil
|
|
866
|
+
@xmlSuperName=nil
|
|
867
|
+
@superEntity=nil
|
|
868
|
+
@subEntities=Array.new
|
|
869
|
+
end
|
|
870
|
+
|
|
871
|
+
def superEntityFqName
|
|
872
|
+
return nil if superEntity==nil
|
|
873
|
+
return superEntity.fqName
|
|
874
|
+
end
|
|
875
|
+
|
|
876
|
+
def add_subEntity(entity)
|
|
877
|
+
subEntities << entity
|
|
878
|
+
end
|
|
879
|
+
|
|
880
|
+
def all_subEntities(answer=Array.new)
|
|
881
|
+
answer.concat(subEntities)
|
|
882
|
+
subEntities.each {|sub| sub.all_subEntities(answer) }
|
|
883
|
+
answer
|
|
884
|
+
end
|
|
885
|
+
|
|
886
|
+
# See note on concreteClassForDomainObject
|
|
887
|
+
def all_concrete_children(analyzer, includeSelf=true)
|
|
888
|
+
start = (includeSelf && !isAbstract) ? [self] : []
|
|
889
|
+
all_subEntities(start).select { |s| !s.isAbstract }
|
|
890
|
+
end
|
|
891
|
+
|
|
892
|
+
# names is an Array, the output of Namer.newEntityNames
|
|
893
|
+
# This has become a misnomer now that we keep the xmlName
|
|
894
|
+
def rename(names)
|
|
895
|
+
@pathString = names[0]
|
|
896
|
+
@localName = names[1]
|
|
897
|
+
@fqName = names[2]
|
|
898
|
+
end
|
|
899
|
+
|
|
900
|
+
# Always returns an Array, even if empty.
|
|
901
|
+
def prerequisites(typeSymbol)
|
|
902
|
+
return Array.new
|
|
903
|
+
end
|
|
904
|
+
|
|
905
|
+
def samePath(anotherEntity)
|
|
906
|
+
if (anotherEntity.respond_to?(:pathString))
|
|
907
|
+
return pathString == anotherEntity.pathString
|
|
908
|
+
end
|
|
909
|
+
return false
|
|
910
|
+
end
|
|
911
|
+
|
|
912
|
+
# Returns nil if the entity can ot have implementors
|
|
913
|
+
def xml_allImplementorNames
|
|
914
|
+
return nil
|
|
915
|
+
end
|
|
916
|
+
|
|
917
|
+
end
|
|
918
|
+
|
|
919
|
+
# ===========================================================================================================
|
|
920
|
+
# Represents (what will become) a class in the object model
|
|
921
|
+
|
|
922
|
+
class Class < Entity
|
|
923
|
+
|
|
924
|
+
include RenameTracker
|
|
925
|
+
|
|
926
|
+
attr_reader :attributes, :isAbstract, :enumerations, :isSimple, :xml_implementedInterfaceNames, :implementedInterfaces, :xmlAttributeLookup, :transformer
|
|
927
|
+
attr_writer :transformer, :isAbstract # Analyzer sets class corresponding to Document to abstract.
|
|
928
|
+
|
|
929
|
+
|
|
930
|
+
# Difference between @attributes and @xmlAttributeLookup...
|
|
931
|
+
# @attributes has a key for the first declaring element. Only one key per Roog::Attribute
|
|
932
|
+
# @xmlAttributeLookup has a key for every possible subelement.
|
|
933
|
+
# It has the same number of Roog::Attributes, but it can have more
|
|
934
|
+
# keys per Roog::Attribute. For example, if an attribute holds a subsititution
|
|
935
|
+
# group, the element names of concrete members of that group are keys (recursively)
|
|
936
|
+
def setup(definition)
|
|
937
|
+
super
|
|
938
|
+
initialize_RenameTracker
|
|
939
|
+
@attributes = SequentialHash.new # See above note
|
|
940
|
+
@xmlAttributeLookup = Hash.new # See above note
|
|
941
|
+
@enumerations=Array.new
|
|
942
|
+
@isAbstract = false
|
|
943
|
+
@isSimple = (nil==definition)
|
|
944
|
+
# These populated after the initial pass
|
|
945
|
+
@xml_implementedInterfaceNames = Array.new
|
|
946
|
+
@implementedInterfaces = Array.new
|
|
947
|
+
# @transformer # present only if isSimple (in which case it must be present)
|
|
948
|
+
end
|
|
949
|
+
|
|
950
|
+
# Deprecated FIXME, Remove
|
|
951
|
+
def instantiates_domain_class(klass)
|
|
952
|
+
# Changed during fix for no-namespace E120. Previously:
|
|
953
|
+
# return (!isAbstract && localName==klass.name) if !isSimple
|
|
954
|
+
return (!isAbstract && fqName==klass.name) if !isSimple
|
|
955
|
+
return true if roog_policy.use_framelets && klass==String && transformer.fromStringSym.nil?
|
|
956
|
+
domainClasses = transformer.domainClasses
|
|
957
|
+
return domainClasses.include?( klass) if domainClasses
|
|
958
|
+
fqName == klass.name
|
|
959
|
+
end
|
|
960
|
+
|
|
961
|
+
def instantiates_domain_object(obj)
|
|
962
|
+
className = obj.class_name
|
|
963
|
+
# Changed during fix for no-namespace E120. Previously:
|
|
964
|
+
# return (!isAbstract && localName==className) if !isSimple
|
|
965
|
+
return (!isAbstract && fqName==className) if !isSimple
|
|
966
|
+
klass = obj.class
|
|
967
|
+
return true if roog_policy.use_framelets && klass==String && transformer.fromStringSym.nil?
|
|
968
|
+
domainClasses = transformer.domainClasses
|
|
969
|
+
return domainClasses.include?( klass) if domainClasses
|
|
970
|
+
fqName == klass.name
|
|
971
|
+
end
|
|
972
|
+
|
|
973
|
+
def description
|
|
974
|
+
answer = String.new
|
|
975
|
+
if isAbstract
|
|
976
|
+
answer << 'Abstract '
|
|
977
|
+
else
|
|
978
|
+
answer << 'Conrete '
|
|
979
|
+
end
|
|
980
|
+
if isSimple
|
|
981
|
+
answer << 'Simple '
|
|
982
|
+
else
|
|
983
|
+
answer << 'Complex '
|
|
984
|
+
end
|
|
985
|
+
answer << transformer.to_s if transformer!=nil
|
|
986
|
+
answer
|
|
987
|
+
end
|
|
988
|
+
|
|
989
|
+
# The arguments are used only for classes corresponding to xsd simpleTypes.
|
|
990
|
+
# attributeData is any extra info that should be considered by the transformer.
|
|
991
|
+
# Currently a Pippin::StackEntry is passed for attributData, but it isn't used.
|
|
992
|
+
def instantiateWith(aString, attributeData=nil)
|
|
993
|
+
# assert {"Roog::Class.transformer should not be nil: did you run Semantics.specialize?" if transformer==nil}
|
|
994
|
+
return transformer.fromString(aString, self, attributeData) if isSimple
|
|
995
|
+
answer = roog_policy.use_framelets ? Framelet.new(fqName) : instantiate_class_named(fqName, roog_policy.bypass_initialize)
|
|
996
|
+
return answer if !roog_policy.bypass_initialize
|
|
997
|
+
allAttributes.each {|attr| attr.initialize_in(answer) }
|
|
998
|
+
answer
|
|
999
|
+
end
|
|
1000
|
+
|
|
1001
|
+
def toString(simple)
|
|
1002
|
+
assert {"Roog::Class#toString is for simple objects: #{localName} is not simple." if !isSimple }
|
|
1003
|
+
assert {"Roog::Class.transformer should not be nil: did you run Semantics.specialize?" if transformer==nil}
|
|
1004
|
+
transformer.toString(simple, self)
|
|
1005
|
+
end
|
|
1006
|
+
|
|
1007
|
+
def float_format
|
|
1008
|
+
# FIXME save constraints such as xsd:totalDigits and xsd:fractionDigits from schema and use them here
|
|
1009
|
+
roog_policy.default_float_format
|
|
1010
|
+
end
|
|
1011
|
+
|
|
1012
|
+
def superEntityFqName
|
|
1013
|
+
answer = super
|
|
1014
|
+
return answer if ( answer!=nil || transformer==nil)
|
|
1015
|
+
transformer.parentFqName
|
|
1016
|
+
end
|
|
1017
|
+
|
|
1018
|
+
def implementedFqInterfaceNames
|
|
1019
|
+
return @implementedInterfaces.collect { |interface| interface.fqName }
|
|
1020
|
+
end
|
|
1021
|
+
|
|
1022
|
+
# If there is no argument, tells you if this implements any interface at all.
|
|
1023
|
+
def implementsInterface(interfaceName=nil)
|
|
1024
|
+
if interfaceName==nil
|
|
1025
|
+
return !@xml_implementedInterfaceNames.empty?
|
|
1026
|
+
else
|
|
1027
|
+
return @xml_implementedInterfaceNames.include?(interfaceName)
|
|
1028
|
+
end
|
|
1029
|
+
end
|
|
1030
|
+
|
|
1031
|
+
def isClass?() return true end
|
|
1032
|
+
|
|
1033
|
+
#convenience method to allow for indirect querying to find out if this Class
|
|
1034
|
+
#contains an Attribute corresponding to domainAttributeName
|
|
1035
|
+
def hasDomainAttribute?(domainAttributeName)
|
|
1036
|
+
return attributes.has_key?( domainAttributeName)
|
|
1037
|
+
end
|
|
1038
|
+
|
|
1039
|
+
|
|
1040
|
+
def prerequisites(typeSymbol)
|
|
1041
|
+
answer = Array.new
|
|
1042
|
+
case typeSymbol
|
|
1043
|
+
when :samePathAndEntityType
|
|
1044
|
+
sc = Analyzer.classNamed(@xmlSuperName)
|
|
1045
|
+
if samePath(sc)
|
|
1046
|
+
answer.add!(sc)
|
|
1047
|
+
end
|
|
1048
|
+
when :all
|
|
1049
|
+
answer.add!(Analyzer.classNamed(@xmlSuperName))
|
|
1050
|
+
@xml_implementedInterfaceNames.each { |ifName|
|
|
1051
|
+
answer.add!(Analyzer.interfaceNamed(ifName))
|
|
1052
|
+
}
|
|
1053
|
+
end
|
|
1054
|
+
return answer.sort {|a,b| a.localName <=> b.localName }
|
|
1055
|
+
end
|
|
1056
|
+
|
|
1057
|
+
def initializedAttributes
|
|
1058
|
+
return @attributes.values.select { |attr| attr.initialize? }
|
|
1059
|
+
end
|
|
1060
|
+
|
|
1061
|
+
# oneArgBlock must take an Attribute as its argument, and return an Attribute.
|
|
1062
|
+
# An Array of new Attributes is returned. Correlates xmlName and localName
|
|
1063
|
+
def collectAttribues! ( &oneArgBlock )
|
|
1064
|
+
return @attributes.values.collect! {|attrib|
|
|
1065
|
+
oldName=attrib.xmlName
|
|
1066
|
+
newAttrib=oneArgBlock.call( attrib )
|
|
1067
|
+
newName=attrib.localName
|
|
1068
|
+
associateNames(oldName, newName)
|
|
1069
|
+
}
|
|
1070
|
+
end
|
|
1071
|
+
|
|
1072
|
+
# Get an attribute (without recursing up the hierarchy)
|
|
1073
|
+
def localAttributeForXMLName(xmlName, errorIfMissing=true)
|
|
1074
|
+
attribute = xmlAttributeLookup[xmlName]
|
|
1075
|
+
assert {"Must have attribute key #{xmlName} in parent #{@xmlName} (attribute keys are #{attributeNames})." if errorIfMissing && attribute==nil}
|
|
1076
|
+
attribute
|
|
1077
|
+
end
|
|
1078
|
+
|
|
1079
|
+
# Get an attribute, recursing up the hierarchy if necessary
|
|
1080
|
+
def attributeForXMLName(xmlName, errorIfMissing=true)
|
|
1081
|
+
attribute = localAttributeForXMLName(xmlName, false)
|
|
1082
|
+
attribute = @superEntity.attributeForXMLName(xmlName, false) if attribute==nil && @superEntity!=nil
|
|
1083
|
+
assert {"Unable to recursively find attribute key #{xmlName} in parent #{@xmlName}." if errorIfMissing && attribute==nil}
|
|
1084
|
+
attribute
|
|
1085
|
+
end
|
|
1086
|
+
|
|
1087
|
+
# Get an attribute (without recursing up the hierarchy)
|
|
1088
|
+
def localAttributeForDomainName(domainName, errorIfMissing=true)
|
|
1089
|
+
attribute = attributes[domainName]
|
|
1090
|
+
assert {"Must have attribute #{domainName} in #{@localName} (attributes are #{attributeDomainNames})." if errorIfMissing && attribute==nil}
|
|
1091
|
+
attribute
|
|
1092
|
+
end
|
|
1093
|
+
|
|
1094
|
+
# Get an attribute, recursing up the hierarchy if necessary
|
|
1095
|
+
def attributeForDomainName(domainName, errorIfMissing=true)
|
|
1096
|
+
attribute = localAttributeForDomainName(domainName, false)
|
|
1097
|
+
attribute = @superEntity.attributeForDomainName(domainName, false) if attribute==nil && @superEntity!=nil
|
|
1098
|
+
assert {"Unable to recursively find attribute #{domainName} in #{@localName}." if errorIfMissing && attribute==nil}
|
|
1099
|
+
attribute
|
|
1100
|
+
end
|
|
1101
|
+
|
|
1102
|
+
def attributeNames
|
|
1103
|
+
@xmlAttributeLookup.keys.join(", ")
|
|
1104
|
+
end
|
|
1105
|
+
|
|
1106
|
+
def attributeDomainNames
|
|
1107
|
+
@attributes.keys.join(", ")
|
|
1108
|
+
end
|
|
1109
|
+
|
|
1110
|
+
# attributeData is a Pippin StackEntry
|
|
1111
|
+
# returns the value that was actually set (which may be different from the input
|
|
1112
|
+
# due to conversion of string to date, etc.)
|
|
1113
|
+
def setAttribute(domainObj, xmlName, value, convert, attributeData)
|
|
1114
|
+
assert { "DomainObj can't be nil if you want to set attribute with xmlName #{xmlName.to_s} using roogClass with xmlName #{@xmlName}" if domainObj==nil }
|
|
1115
|
+
attribute = attributeForXMLName(xmlName, false) # searches up the hierarchy
|
|
1116
|
+
if attribute==nil
|
|
1117
|
+
print "\n >> Domain class #{localName.to_s} can't set unknown attribute with xmlName #{xmlName.to_s} with a value of class #{value.class.name}"
|
|
1118
|
+
print "\n Attributes: "+attributeNames
|
|
1119
|
+
return
|
|
1120
|
+
end
|
|
1121
|
+
if convert
|
|
1122
|
+
cls = attribute.concreteClassForElementName(xmlName)
|
|
1123
|
+
value = cls.instantiateWith(value, attributeData)
|
|
1124
|
+
end
|
|
1125
|
+
# print "\n -- Domain class #{localName.to_s} will set attribute #{attribute.localName.to_s} with a value of class #{value.class.name}"
|
|
1126
|
+
attribute.setValue(domainObj, value)
|
|
1127
|
+
value
|
|
1128
|
+
end
|
|
1129
|
+
|
|
1130
|
+
# Attributes in this class
|
|
1131
|
+
def allLocalAttributes
|
|
1132
|
+
attributes.values
|
|
1133
|
+
end
|
|
1134
|
+
|
|
1135
|
+
# Returns an array of Roog::Classes this object inherits from.
|
|
1136
|
+
# The parents are in order, with the root at index zero..
|
|
1137
|
+
def hierarchy(includeSelf=true)
|
|
1138
|
+
answer = includeSelf ? [self] : []
|
|
1139
|
+
current = self
|
|
1140
|
+
while !current.superEntity.nil?
|
|
1141
|
+
current = current.superEntity
|
|
1142
|
+
answer.unshift(current)
|
|
1143
|
+
end
|
|
1144
|
+
answer
|
|
1145
|
+
end
|
|
1146
|
+
|
|
1147
|
+
# Attributes in this and parent classes
|
|
1148
|
+
def allAttributes(collection=Array.new)
|
|
1149
|
+
answer = Array.new
|
|
1150
|
+
hierarchy.each {|rClass| answer.concat(rClass.allLocalAttributes) }
|
|
1151
|
+
answer
|
|
1152
|
+
end
|
|
1153
|
+
|
|
1154
|
+
# === Performed by dispatch() ===
|
|
1155
|
+
|
|
1156
|
+
def specify_simpleType()
|
|
1157
|
+
notSupported "id"
|
|
1158
|
+
notSupported "final"
|
|
1159
|
+
@isSimple=true
|
|
1160
|
+
dispatchChildren
|
|
1161
|
+
end
|
|
1162
|
+
|
|
1163
|
+
# We currently ignore the restriction semantics:
|
|
1164
|
+
# the restriction is used only to define a new Class.
|
|
1165
|
+
def specify_restriction()
|
|
1166
|
+
notSupported "id"
|
|
1167
|
+
return warn("Not yet supported: xsd:restriction on complexType") if ! @isSimple
|
|
1168
|
+
@xmlSuperName = tos("base")
|
|
1169
|
+
dispatchChildren
|
|
1170
|
+
end
|
|
1171
|
+
|
|
1172
|
+
|
|
1173
|
+
def specify_pattern; constraints_not_supported; end
|
|
1174
|
+
def specify_minInclusive; constraints_not_supported; end
|
|
1175
|
+
def specify_maxInclusive; constraints_not_supported; end
|
|
1176
|
+
def specify_minExclusive; constraints_not_supported; end
|
|
1177
|
+
def specify_maxExclusive; constraints_not_supported; end
|
|
1178
|
+
def specify_totalDigits; constraints_not_supported; end
|
|
1179
|
+
def specify_fractionDigits; constraints_not_supported; end
|
|
1180
|
+
|
|
1181
|
+
def specify_enumeration()
|
|
1182
|
+
enumerations << tos("value")
|
|
1183
|
+
end
|
|
1184
|
+
|
|
1185
|
+
def specify_complexType()
|
|
1186
|
+
notSupported "id"
|
|
1187
|
+
notSupported "mixed"
|
|
1188
|
+
notSupported "block"
|
|
1189
|
+
notSupported "final"
|
|
1190
|
+
@isAbstract = ( true == tos("abstract") )
|
|
1191
|
+
dispatchChildren
|
|
1192
|
+
end
|
|
1193
|
+
|
|
1194
|
+
def specify_simpleContent()
|
|
1195
|
+
warn "Not yet supported: xsd:simpleContent"
|
|
1196
|
+
end
|
|
1197
|
+
|
|
1198
|
+
def specify_complexContent()
|
|
1199
|
+
dispatchChildren
|
|
1200
|
+
end
|
|
1201
|
+
|
|
1202
|
+
def specify_all()
|
|
1203
|
+
# xsd:all differs mostly from xsd:sequence in that
|
|
1204
|
+
# xsd:all has some extra constraints on cardinality, but those
|
|
1205
|
+
# are enforced by a validating parser.
|
|
1206
|
+
# The order of children is significant only for XML, so we
|
|
1207
|
+
# can ignore it.
|
|
1208
|
+
specify_sequence()
|
|
1209
|
+
end
|
|
1210
|
+
|
|
1211
|
+
def specify_sequence()
|
|
1212
|
+
# minOccurs and maxOccurs should be used to change the contained
|
|
1213
|
+
# elements into collections. It's awkward that the cardinality
|
|
1214
|
+
# would be contained in two places (here, and at the element level).
|
|
1215
|
+
notSupported "minOccurs"
|
|
1216
|
+
notSupported "maxOccurs"
|
|
1217
|
+
dispatchChildren
|
|
1218
|
+
end
|
|
1219
|
+
|
|
1220
|
+
def specify_choice()
|
|
1221
|
+
# A choice specifies an un-named interface, which all of the contained items implement.
|
|
1222
|
+
# makeAttribute will indirectly make a Roog::Interface
|
|
1223
|
+
makeAttribute("xsd:choice", Analyzer.choiceAttributeName)
|
|
1224
|
+
end
|
|
1225
|
+
|
|
1226
|
+
def specify_group()
|
|
1227
|
+
warn "Not yet supported: xsd:group"
|
|
1228
|
+
end
|
|
1229
|
+
|
|
1230
|
+
def specify_attributeGroup()
|
|
1231
|
+
warn "Not yet supported: xsd:attributeGroup"
|
|
1232
|
+
end
|
|
1233
|
+
|
|
1234
|
+
def specify_anyAttribute()
|
|
1235
|
+
warn "Not yet supported: xsd:anyAttribute"
|
|
1236
|
+
end
|
|
1237
|
+
|
|
1238
|
+
|
|
1239
|
+
def specify_attribute()
|
|
1240
|
+
makeAttribute("xsd:attribute")
|
|
1241
|
+
end
|
|
1242
|
+
|
|
1243
|
+
def specify_element()
|
|
1244
|
+
makeAttribute("xsd:element")
|
|
1245
|
+
end
|
|
1246
|
+
|
|
1247
|
+
def specify_extension()
|
|
1248
|
+
@xmlSuperName = tos("base")
|
|
1249
|
+
dispatchChildren
|
|
1250
|
+
end
|
|
1251
|
+
|
|
1252
|
+
# ===== Construction helpers
|
|
1253
|
+
|
|
1254
|
+
# At the Class level, creating an attribute from an xsd:element
|
|
1255
|
+
# is the same as creating one from an xsd:attribute. Of course
|
|
1256
|
+
# different behaviors are dispatched at the Attribute level.
|
|
1257
|
+
# type can be "xsd:attribute", "xsd:element", or xsd:choice
|
|
1258
|
+
def makeAttribute(type, xmlName=tos("name"))
|
|
1259
|
+
xmlName = tos("ref") if xmlName.nil?
|
|
1260
|
+
if xmlName.nil?
|
|
1261
|
+
warn "Attribute (from "+type+") is missing its xmlName."
|
|
1262
|
+
elsif @attributes.has_key?(xmlName)
|
|
1263
|
+
warn "Attribute (#{xmlName}) is already present"
|
|
1264
|
+
else
|
|
1265
|
+
@attributes[xmlName]=Roog::Attribute.new(tos, xmlName, type)
|
|
1266
|
+
end
|
|
1267
|
+
end
|
|
1268
|
+
|
|
1269
|
+
# This is one half of a pair: you should instead call Interface.addImplementor
|
|
1270
|
+
def _addImplementedInterface(interface)
|
|
1271
|
+
@implementedInterfaces << interface
|
|
1272
|
+
@xml_implementedInterfaceNames << interface.xmlName
|
|
1273
|
+
end
|
|
1274
|
+
|
|
1275
|
+
|
|
1276
|
+
def constraints_not_supported
|
|
1277
|
+
warn "Not yet supported: constraints such as xsd:pattern, xsd:minInclusive, xsd:maxInclusive, xsd:minExclusive, xsd:maxExclusive, xsd:totalDigits, xsd:fractionDigits."
|
|
1278
|
+
end
|
|
1279
|
+
|
|
1280
|
+
end
|
|
1281
|
+
|
|
1282
|
+
# ===========================================================================================================
|
|
1283
|
+
# Represents (what will become) an Interface in the object model
|
|
1284
|
+
# Ruby code will implement the interface as a mixed-in Module with
|
|
1285
|
+
# no behavior (sort of like a Java tagging interface). You can than
|
|
1286
|
+
# test for implementation using aThing.kind_of?(anInterface).
|
|
1287
|
+
#
|
|
1288
|
+
# If isChoice is true, the Interface was created as a result of
|
|
1289
|
+
# an xsd:choice group. If isChoice is false, the Interface was created
|
|
1290
|
+
# to represent a substitution group.
|
|
1291
|
+
class Interface < Entity
|
|
1292
|
+
|
|
1293
|
+
attr_reader :implementors, :alternativeElements, :isChoice, :xml_extenderNames, :elementName2TypeName
|
|
1294
|
+
|
|
1295
|
+
def setup(definition)
|
|
1296
|
+
super
|
|
1297
|
+
@xml_extenderNames = Array.new
|
|
1298
|
+
@implementors = Array.new
|
|
1299
|
+
@alternativeElements = Array.new
|
|
1300
|
+
@elementName2TypeName = Hash.new # This is about elements mapping onto interface implementors
|
|
1301
|
+
# This is built during analysis, earlier than elementNameToClass
|
|
1302
|
+
# This maps only direct implementors, not implementors of extending interfaces.
|
|
1303
|
+
@isChoice = ("choice"==definition.name.firstWord.stripNamespace)
|
|
1304
|
+
end
|
|
1305
|
+
|
|
1306
|
+
def xml_implementorNames
|
|
1307
|
+
implementorNameMap.values.uniq
|
|
1308
|
+
end
|
|
1309
|
+
|
|
1310
|
+
# Recursively includes all concrete implementors
|
|
1311
|
+
def implementorNameMap(analyzer=Analyzer.instance, answer=Hash.new)
|
|
1312
|
+
answer.concat(elementName2TypeName)
|
|
1313
|
+
xml_extenderNames.each {|xName|
|
|
1314
|
+
extender=analyzer.interfaceNamed(xName)
|
|
1315
|
+
extender.implementorNameMap(analyzer, answer) if extender!=nil
|
|
1316
|
+
warn("Not able to look up extender #{xName} of #{xmlName}") if extender==nil
|
|
1317
|
+
}
|
|
1318
|
+
answer
|
|
1319
|
+
end
|
|
1320
|
+
|
|
1321
|
+
# See note on concreteClassForDomainObject
|
|
1322
|
+
def all_concrete_children(analyzer, includeSelf=true)
|
|
1323
|
+
# Might be wrong: don't remember difference between implementorNameMap.values and xml_allImplementorNames
|
|
1324
|
+
# Can't use :collect, some are nil
|
|
1325
|
+
answer = Array.new
|
|
1326
|
+
implementorNameMap(analyzer).values.each {|name|
|
|
1327
|
+
klass = analyzer.classNamed(name)
|
|
1328
|
+
answer << klass if klass!=nil
|
|
1329
|
+
error("Not able to look up implementor #{name} (#{name.class.name}) of #{xmlName} among known classes: #{analyzer.class_names}") if klass==nil
|
|
1330
|
+
}
|
|
1331
|
+
answer
|
|
1332
|
+
end
|
|
1333
|
+
|
|
1334
|
+
# does not include the recipient
|
|
1335
|
+
def extendersRecursively(answer=nil)
|
|
1336
|
+
answer=Array.new if answer==nil
|
|
1337
|
+
@xml_extenderNames.each { |extName|
|
|
1338
|
+
subInterface = Analyzer.interfaceNamed(extName)
|
|
1339
|
+
answer << subInterface
|
|
1340
|
+
extendersRecursively(answer)
|
|
1341
|
+
}
|
|
1342
|
+
answer
|
|
1343
|
+
end
|
|
1344
|
+
|
|
1345
|
+
# Concatenate the collections obtained when the receiver and all
|
|
1346
|
+
# extendersRecursively perform aSymbol
|
|
1347
|
+
def recursivelyConcat(aSymbol)
|
|
1348
|
+
answer=self.send(aSymbol)
|
|
1349
|
+
extendersRecursively.each { |subInterface|
|
|
1350
|
+
answer.concat(subInterface.send(aSymbol))
|
|
1351
|
+
}
|
|
1352
|
+
answer
|
|
1353
|
+
end
|
|
1354
|
+
|
|
1355
|
+
def xml_allImplementorNames()
|
|
1356
|
+
recursivelyConcat(:xml_implementorNames)
|
|
1357
|
+
end
|
|
1358
|
+
|
|
1359
|
+
|
|
1360
|
+
def allElementNames()
|
|
1361
|
+
recursivelyConcat(:elementNames)
|
|
1362
|
+
end
|
|
1363
|
+
|
|
1364
|
+
def elementNames
|
|
1365
|
+
elementName2TypeName.keys
|
|
1366
|
+
end
|
|
1367
|
+
|
|
1368
|
+
|
|
1369
|
+
def postProcess
|
|
1370
|
+
super
|
|
1371
|
+
@alternativeElements.uniq!
|
|
1372
|
+
end
|
|
1373
|
+
|
|
1374
|
+
|
|
1375
|
+
def isInterface?() return true end
|
|
1376
|
+
|
|
1377
|
+
|
|
1378
|
+
def prerequisites(typeSymbol)
|
|
1379
|
+
answer = Array.new
|
|
1380
|
+
case typeSymbol
|
|
1381
|
+
when :samePathAndEntityType
|
|
1382
|
+
sc = Analyzer.interfaceNamed(@xmlSuperName)
|
|
1383
|
+
if samePath(sc)
|
|
1384
|
+
answer.add!(sc)
|
|
1385
|
+
end
|
|
1386
|
+
when :all
|
|
1387
|
+
answer.add!(Analyzer.interfaceNamed(@xmlSuperName))
|
|
1388
|
+
end
|
|
1389
|
+
return answer.sort {|a,b| a.localName <=> b.localName }
|
|
1390
|
+
end
|
|
1391
|
+
|
|
1392
|
+
def addAlt(element)
|
|
1393
|
+
@alternativeElements << element
|
|
1394
|
+
type = Analyzer.schema.findTypeName(element)
|
|
1395
|
+
elementName = Analyzer.schema.findAttributeValue(element, "name")
|
|
1396
|
+
if type==nil
|
|
1397
|
+
# You reach this point only for elements
|
|
1398
|
+
# specifying a substitution group
|
|
1399
|
+
# Example elements at this point:
|
|
1400
|
+
# <element minOccurs='0' ref='Attribute'/> (Reference to substitution group head)
|
|
1401
|
+
# <element name='Feature' abstract='true'/> (Subsitution group head)
|
|
1402
|
+
assert { "elementName must not be nil for element #{element.openingTag}" if elementName==nil }
|
|
1403
|
+
return if elementName==xmlName
|
|
1404
|
+
@xml_extenderNames << elementName
|
|
1405
|
+
# We don't need to add to elementName2TypeName because if it wasn't abstract, we wouldn't end up here.
|
|
1406
|
+
else
|
|
1407
|
+
# Actually, this could be a substitution group (not in Offspring, where substitution groups are all abstract),
|
|
1408
|
+
# in which case we need the above code.
|
|
1409
|
+
@elementName2TypeName[elementName]=type
|
|
1410
|
+
end
|
|
1411
|
+
end
|
|
1412
|
+
|
|
1413
|
+
def addImplementor(implementor)
|
|
1414
|
+
@implementors << implementor
|
|
1415
|
+
implementor._addImplementedInterface(self)
|
|
1416
|
+
end
|
|
1417
|
+
|
|
1418
|
+
def x()
|
|
1419
|
+
end
|
|
1420
|
+
|
|
1421
|
+
# === Performed by dispatch() ===
|
|
1422
|
+
|
|
1423
|
+
# These deliberately ignore minOccurs and maxOccurs, which are not
|
|
1424
|
+
# necessary to define an interface
|
|
1425
|
+
def specify_choice() dispatchChildren end
|
|
1426
|
+
def specify_sequence() dispatchChildren end
|
|
1427
|
+
def specify_group() dispatchGroupChildren end
|
|
1428
|
+
def specify_any()
|
|
1429
|
+
notSupported "namespace"
|
|
1430
|
+
notSupported "processContents"
|
|
1431
|
+
dispatchChildren
|
|
1432
|
+
end
|
|
1433
|
+
|
|
1434
|
+
def specify_element()
|
|
1435
|
+
addAlt(tos)
|
|
1436
|
+
if ! @isChoice
|
|
1437
|
+
@xmlSuperName = tos("substitutionGroup")
|
|
1438
|
+
end
|
|
1439
|
+
end
|
|
1440
|
+
|
|
1441
|
+
end
|
|
1442
|
+
|
|
1443
|
+
|
|
1444
|
+
# ===========================================================================================================
|
|
1445
|
+
# This simple namer does not use lookup tables.
|
|
1446
|
+
# Uses capitalizeFirst xml namespace as path.
|
|
1447
|
+
# This might be ok for java code generation if you
|
|
1448
|
+
# change PathSep (haven't thought about it enough)
|
|
1449
|
+
#
|
|
1450
|
+
class Namer
|
|
1451
|
+
|
|
1452
|
+
attr_reader :nameCounter
|
|
1453
|
+
attr_accessor :defaultPathString
|
|
1454
|
+
|
|
1455
|
+
PathSep = RubyPathSep
|
|
1456
|
+
|
|
1457
|
+
def initialize
|
|
1458
|
+
@defaultPathString = roog_policy.defaultPathString
|
|
1459
|
+
@nameCounter = 0
|
|
1460
|
+
end
|
|
1461
|
+
|
|
1462
|
+
|
|
1463
|
+
# === May want to override ======
|
|
1464
|
+
|
|
1465
|
+
# Generate a new name of specified type
|
|
1466
|
+
# This is called during parsing, when we need to create a
|
|
1467
|
+
# new Interface or attribute, and the name can not be
|
|
1468
|
+
# deduced from the schema.
|
|
1469
|
+
def generateName(type="")
|
|
1470
|
+
@nameCounter = 1 + @nameCounter
|
|
1471
|
+
answer = "autoGenName_"
|
|
1472
|
+
if ! type.empty?
|
|
1473
|
+
answer=answer+type+"_"
|
|
1474
|
+
end
|
|
1475
|
+
answer = answer + @nameCounter.to_s
|
|
1476
|
+
info("Generated " + answer)
|
|
1477
|
+
return answer
|
|
1478
|
+
end
|
|
1479
|
+
|
|
1480
|
+
# Returns an Array of (related) names for entity:
|
|
1481
|
+
# answer[0] = new path
|
|
1482
|
+
# answer[1] = new local name
|
|
1483
|
+
# answer[2] = new fully qualified name
|
|
1484
|
+
# Does not change entity in any way.
|
|
1485
|
+
# This is called indirectly by Analyzer.renameAndBuildPaths,
|
|
1486
|
+
# after the schema has been completely parsed.
|
|
1487
|
+
# This version derives the package/module path from the XML namespace
|
|
1488
|
+
# This version also capitalizes all entity names.
|
|
1489
|
+
def newEntityNames(entity)
|
|
1490
|
+
oldName = entity.xmlName
|
|
1491
|
+
answer = oldName.splitNamespace(XMLNamespaceSep)
|
|
1492
|
+
if answer!=nil
|
|
1493
|
+
answer[0] = answer[0].toModulePath
|
|
1494
|
+
answer[1] = answer[1].toModuleName
|
|
1495
|
+
answer[2] = answer[0]+PathSep+answer[1]
|
|
1496
|
+
return answer
|
|
1497
|
+
end
|
|
1498
|
+
# if we reach this point, there is no namespace
|
|
1499
|
+
newLocalName=oldName.toModuleName
|
|
1500
|
+
newPath=defaultPathString
|
|
1501
|
+
newFQName= newPath ? newPath+PathSep+newLocalName : newLocalName
|
|
1502
|
+
[newPath, newLocalName, newFQName]
|
|
1503
|
+
end
|
|
1504
|
+
|
|
1505
|
+
# should this allow for namespaces?
|
|
1506
|
+
def newAttributeName(attribute)
|
|
1507
|
+
return attribute.xmlName.toAttributeName
|
|
1508
|
+
end
|
|
1509
|
+
|
|
1510
|
+
def splitNamespace(aString)
|
|
1511
|
+
if aString==nil
|
|
1512
|
+
return nil
|
|
1513
|
+
end
|
|
1514
|
+
return aString.splitNamespace(PathSep)
|
|
1515
|
+
end
|
|
1516
|
+
|
|
1517
|
+
end
|
|
1518
|
+
|
|
1519
|
+
# ===========================================================================================================
|
|
1520
|
+
#
|
|
1521
|
+
# Analyzer builds an internal representation of the schema's object model
|
|
1522
|
+
# (in terms of Roog::Class, Roog::Interface, and Roog::Attribute)
|
|
1523
|
+
#
|
|
1524
|
+
# This internal model can be used to generate source code for domain
|
|
1525
|
+
# objects, or to guide XML marshalling.
|
|
1526
|
+
#
|
|
1527
|
+
# Strictly speaking, the internal model is unnecessary. I like having
|
|
1528
|
+
# the internal model, because there may later be a need to transform or
|
|
1529
|
+
# query it.
|
|
1530
|
+
#
|
|
1531
|
+
# Likewise most info in the stack could be derived from REXML::Element's
|
|
1532
|
+
# chain of parent(). The stack, however, reflects the actual execution:
|
|
1533
|
+
# when an element needs to be dispatched a second time, it is put on
|
|
1534
|
+
# the stack again.
|
|
1535
|
+
#
|
|
1536
|
+
class Analyzer
|
|
1537
|
+
|
|
1538
|
+
include RenameTracker
|
|
1539
|
+
|
|
1540
|
+
attr_reader :classMap_xml, :interfaceMap_xml, :classMap_domain, :interfaceMap_domain, :pathMap, :stack, :schema, :namer
|
|
1541
|
+
|
|
1542
|
+
def initialize()
|
|
1543
|
+
@classMap_xml = Hash.new
|
|
1544
|
+
@interfaceMap_xml = Hash.new
|
|
1545
|
+
@classMap_domain = Hash.new
|
|
1546
|
+
@interfaceMap_domain = Hash.new
|
|
1547
|
+
@rootPath = Path.new(nil, nil) # The only path without a parent
|
|
1548
|
+
@pathMap = Hash.new
|
|
1549
|
+
@pathMap[nil]=@rootPath
|
|
1550
|
+
@stack = Array.new
|
|
1551
|
+
# If you don't like the default namer just call
|
|
1552
|
+
# Analyzer.instance.namer = MyNamer.new
|
|
1553
|
+
# before you call
|
|
1554
|
+
# Analyzer.analyze(fileName)
|
|
1555
|
+
@namer = Namer.new
|
|
1556
|
+
@schema = nil
|
|
1557
|
+
initialize_RenameTracker
|
|
1558
|
+
end
|
|
1559
|
+
|
|
1560
|
+
@@instance = Analyzer.new
|
|
1561
|
+
|
|
1562
|
+
def rootPath
|
|
1563
|
+
answer = @rootPath
|
|
1564
|
+
raise "Missing rootPath" if !answer
|
|
1565
|
+
answer
|
|
1566
|
+
end
|
|
1567
|
+
|
|
1568
|
+
# Returns the current instance (makes a new current instance)
|
|
1569
|
+
def Analyzer.detach
|
|
1570
|
+
answer = @@instance
|
|
1571
|
+
@@instance = Analyzer.new
|
|
1572
|
+
return answer
|
|
1573
|
+
end
|
|
1574
|
+
|
|
1575
|
+
def Analyzer.clear; Analyzer.detach; end
|
|
1576
|
+
|
|
1577
|
+
# The document class represents the document itself: it
|
|
1578
|
+
# contains a Roog::Attribute for every possible document
|
|
1579
|
+
# root element. This class does not correspond to a
|
|
1580
|
+
# domain object, and does not get instatiated.
|
|
1581
|
+
def Analyzer.xml_name_of_document_class
|
|
1582
|
+
'__DOCUMENT__'
|
|
1583
|
+
end
|
|
1584
|
+
|
|
1585
|
+
|
|
1586
|
+
# ========= Class side pseudo-singleton services
|
|
1587
|
+
|
|
1588
|
+
def Analyzer.instance
|
|
1589
|
+
return @@instance
|
|
1590
|
+
end
|
|
1591
|
+
|
|
1592
|
+
def Analyzer.analyze(fileName, fromScratch=true, context=REXML::Document::DEFAULT_CONTEXT)
|
|
1593
|
+
Analyzer.clear if fromScratch
|
|
1594
|
+
@@instance.analyze(fileName, context)
|
|
1595
|
+
end
|
|
1596
|
+
|
|
1597
|
+
def Analyzer.classNamed(xmlName)
|
|
1598
|
+
@@instance.classNamed(xmlName)
|
|
1599
|
+
end
|
|
1600
|
+
|
|
1601
|
+
def Analyzer.interfaceNamed(xmlName)
|
|
1602
|
+
@@instance.interfaceNamed(xmlName)
|
|
1603
|
+
end
|
|
1604
|
+
|
|
1605
|
+
def Analyzer.push(rexmlElement)
|
|
1606
|
+
@@instance.push(rexmlElement)
|
|
1607
|
+
end
|
|
1608
|
+
|
|
1609
|
+
def Analyzer.pop()
|
|
1610
|
+
@@instance.pop()
|
|
1611
|
+
end
|
|
1612
|
+
|
|
1613
|
+
|
|
1614
|
+
def Analyzer.tos(attributeName=nil)
|
|
1615
|
+
@@instance.tos(attributeName)
|
|
1616
|
+
end
|
|
1617
|
+
|
|
1618
|
+
def Analyzer.schema()
|
|
1619
|
+
@@instance.schema
|
|
1620
|
+
end
|
|
1621
|
+
|
|
1622
|
+
def Analyzer.choiceAttributeName()
|
|
1623
|
+
@@instance.namer.generateName("choiceAttribute")
|
|
1624
|
+
end
|
|
1625
|
+
|
|
1626
|
+
def Analyzer.choiceInterfaceName()
|
|
1627
|
+
@@instance.namer.generateName("choiceInterface")
|
|
1628
|
+
end
|
|
1629
|
+
|
|
1630
|
+
def Analyzer.substitutionInterfaceName()
|
|
1631
|
+
@@instance.namer.generateName("substitutionInterface")
|
|
1632
|
+
end
|
|
1633
|
+
|
|
1634
|
+
def Analyzer.stackClone()
|
|
1635
|
+
@@instance.stackClone
|
|
1636
|
+
end
|
|
1637
|
+
|
|
1638
|
+
def Analyzer.xmlRegisterEntity(entity)
|
|
1639
|
+
@@instance.xmlRegisterEntity(entity)
|
|
1640
|
+
end
|
|
1641
|
+
|
|
1642
|
+
# newFqName is the fully qualified name after the renaming process.
|
|
1643
|
+
def Analyzer.pathNamed(newFqName, fail_if_missing=false)
|
|
1644
|
+
@@instance.pathNamed(newFqName, fail_if_missing)
|
|
1645
|
+
end
|
|
1646
|
+
|
|
1647
|
+
def Analyzer.path_names
|
|
1648
|
+
@@instance.path_names
|
|
1649
|
+
end
|
|
1650
|
+
|
|
1651
|
+
# ============= Instance behaviors
|
|
1652
|
+
|
|
1653
|
+
def class_names
|
|
1654
|
+
classMap_xml.keys.sort.join(', ')
|
|
1655
|
+
end
|
|
1656
|
+
|
|
1657
|
+
def path_names
|
|
1658
|
+
keys = pathMap.keys.compact
|
|
1659
|
+
keys = keys.collect {|k| "'"+k+"'"}
|
|
1660
|
+
keys.sort.join(', ')
|
|
1661
|
+
end
|
|
1662
|
+
|
|
1663
|
+
def documentClass
|
|
1664
|
+
classNamed(Analyzer.xml_name_of_document_class)
|
|
1665
|
+
end
|
|
1666
|
+
|
|
1667
|
+
def classNamed(xmlName)
|
|
1668
|
+
classMap_xml[xmlName]
|
|
1669
|
+
end
|
|
1670
|
+
|
|
1671
|
+
def domainClassNamed(domainObjName)
|
|
1672
|
+
classMap_domain[domainObjName]
|
|
1673
|
+
end
|
|
1674
|
+
|
|
1675
|
+
def interfaceNamed(xmlName)
|
|
1676
|
+
interfaceMap_xml[xmlName]
|
|
1677
|
+
end
|
|
1678
|
+
|
|
1679
|
+
# newFqName is the fully qualified name after the renaming process.
|
|
1680
|
+
def pathNamed(newFqName, fail_if_missing=false)
|
|
1681
|
+
answer = pathMap[newFqName]
|
|
1682
|
+
raise "Unable to find path: '#{newFqName}' among: #{path_names}" if fail_if_missing && !answer
|
|
1683
|
+
answer
|
|
1684
|
+
end
|
|
1685
|
+
|
|
1686
|
+
# Given the name of a globally defined element,
|
|
1687
|
+
# find the name of the type declared by the schema.
|
|
1688
|
+
# This resolves refs if necessary.
|
|
1689
|
+
def schemaTypeForGlobalElementName(elementName)
|
|
1690
|
+
globalElement = schema.globalElements[elementName]
|
|
1691
|
+
if globalElement == nil
|
|
1692
|
+
return nil
|
|
1693
|
+
end
|
|
1694
|
+
return schema.findTypeName(globalElement)
|
|
1695
|
+
end
|
|
1696
|
+
|
|
1697
|
+
|
|
1698
|
+
def xmlRegisterEntity(entity)
|
|
1699
|
+
xmlName=entity.xmlName
|
|
1700
|
+
if xmlName==nil
|
|
1701
|
+
error "Entity is missing its xmlName."
|
|
1702
|
+
return
|
|
1703
|
+
end
|
|
1704
|
+
registry = xmlRegistryFor(entity)
|
|
1705
|
+
if registry==nil
|
|
1706
|
+
error "There is no xml registry for instances of "+entity.class.name
|
|
1707
|
+
return
|
|
1708
|
+
end
|
|
1709
|
+
if registry.has_key?(xmlName)
|
|
1710
|
+
error "Entity (#{name}) is already present"
|
|
1711
|
+
else
|
|
1712
|
+
registry[xmlName]=entity
|
|
1713
|
+
end
|
|
1714
|
+
end
|
|
1715
|
+
|
|
1716
|
+
def xmlRegistryFor(entity)
|
|
1717
|
+
if entity.isClass?
|
|
1718
|
+
return @classMap_xml
|
|
1719
|
+
elsif entity.isInterface?
|
|
1720
|
+
return @interfaceMap_xml
|
|
1721
|
+
else
|
|
1722
|
+
rturn nil
|
|
1723
|
+
end
|
|
1724
|
+
end
|
|
1725
|
+
|
|
1726
|
+
# Don't like redundancy with xmlRegisterEntity. Need to refactor.
|
|
1727
|
+
def domainRegisterEntity(entity)
|
|
1728
|
+
fqName=entity.fqName
|
|
1729
|
+
if fqName==nil
|
|
1730
|
+
error "Entity is missing its fqName."
|
|
1731
|
+
return
|
|
1732
|
+
end
|
|
1733
|
+
registry = domainRegistryFor(entity)
|
|
1734
|
+
if registry==nil
|
|
1735
|
+
error "There is no domain registry for instances of "+entity.class.name
|
|
1736
|
+
return
|
|
1737
|
+
end
|
|
1738
|
+
if registry.has_key?(fqName)
|
|
1739
|
+
error "Entity (#{fqName}) is already present"
|
|
1740
|
+
else
|
|
1741
|
+
registry[fqName]=entity
|
|
1742
|
+
end
|
|
1743
|
+
end
|
|
1744
|
+
|
|
1745
|
+
def domainRegistryFor(entity)
|
|
1746
|
+
if entity.isPath?
|
|
1747
|
+
return @pathMap
|
|
1748
|
+
elsif entity.isClass?
|
|
1749
|
+
return @classMap_domain
|
|
1750
|
+
elsif entity.isInterface?
|
|
1751
|
+
return @interfaceMap_domain
|
|
1752
|
+
else
|
|
1753
|
+
rturn nil
|
|
1754
|
+
end
|
|
1755
|
+
end
|
|
1756
|
+
|
|
1757
|
+
|
|
1758
|
+
|
|
1759
|
+
|
|
1760
|
+
def push(rexmlElement)
|
|
1761
|
+
@stack.push(rexmlElement)
|
|
1762
|
+
end
|
|
1763
|
+
|
|
1764
|
+
def pop()
|
|
1765
|
+
return @stack.pop()
|
|
1766
|
+
end
|
|
1767
|
+
|
|
1768
|
+
def stackClone()
|
|
1769
|
+
return @stack.clone()
|
|
1770
|
+
end
|
|
1771
|
+
|
|
1772
|
+
def printStack()
|
|
1773
|
+
@stack.reverse_each { |rexmlElement|
|
|
1774
|
+
print "\n\t"+rexmlElement.openingTag
|
|
1775
|
+
}
|
|
1776
|
+
end
|
|
1777
|
+
|
|
1778
|
+
# Returns either:
|
|
1779
|
+
# * The top of the stack, if the attributeName is nil. This does NOT pop the stack.
|
|
1780
|
+
# * An attribute from the element on the top of the stack, if attributeName is not nil
|
|
1781
|
+
# Note that the top of the stack is actually the last element in the
|
|
1782
|
+
# Array, because that's where "push" puts it.
|
|
1783
|
+
def tos(attributeName=nil)
|
|
1784
|
+
_tos = @stack.last
|
|
1785
|
+
if attributeName==nil
|
|
1786
|
+
return _tos
|
|
1787
|
+
end
|
|
1788
|
+
return _tos.attributes[attributeName]
|
|
1789
|
+
end
|
|
1790
|
+
|
|
1791
|
+
# Do not invoke on a detached Analyzer.
|
|
1792
|
+
def analyze(fileName, context=REXML::Document::DEFAULT_CONTEXT)
|
|
1793
|
+
# Parse the Schema & prepare for subsequent queries
|
|
1794
|
+
loadFile(fileName, context)
|
|
1795
|
+
# Create components of object model from the schema
|
|
1796
|
+
generateStandardSimpleClasses # Create Roog::Class instance for each standard schema simple type.
|
|
1797
|
+
analyzeSubstitutionGroups # Create Roog::Interface instance for each substitution group.
|
|
1798
|
+
analyzeSimpleClasses # Create Roog::Class instance for each schema-defined simple type.
|
|
1799
|
+
analyzeComplexClasses # Create Roog::Class instance for each complex type. Also creates Roog::Interface for choice groups.
|
|
1800
|
+
analyzeDocumentRoot # Create a Roog:Class instance corresponding to the document
|
|
1801
|
+
# Resolve forward references: assemble (link up) model components, now that they have been created
|
|
1802
|
+
linkSupers # Cache superEntity in entities with a xmlSuperName
|
|
1803
|
+
linkAttributeTypes # Cache domainType in Attribute
|
|
1804
|
+
linkImplementors # Cache Class.implementedInterfaces and Interface.implementors, populating Class.xml_implementedInterfaceNames
|
|
1805
|
+
linkElementTypes # Cache Attribute associated with each child element type
|
|
1806
|
+
# Generate model pieces that need to be deduced (packages/paths),
|
|
1807
|
+
# and transform names according to the naming convetions of the language used.
|
|
1808
|
+
# Builds Paths. During this, @namer generates Entity localName, pathString, and fqName
|
|
1809
|
+
# Uses these new names to build :classMap_domain, :interfaceMap_domain, :oldToNewNames, :newToOldNames
|
|
1810
|
+
# Also generates Attribute localName
|
|
1811
|
+
packageAndSpecialize
|
|
1812
|
+
end
|
|
1813
|
+
|
|
1814
|
+
# Parse the Schema & prepare for subsequent queries
|
|
1815
|
+
def loadFile(fileName, context=REXML::Document::DEFAULT_CONTEXT)
|
|
1816
|
+
print("\nLoading schema: " + fileName )
|
|
1817
|
+
@schema = XSD::Schema.new( fileName, context)
|
|
1818
|
+
print("\nDone loading schema." )
|
|
1819
|
+
end
|
|
1820
|
+
|
|
1821
|
+
# Create Roog::Class instance for each standard schema simple type
|
|
1822
|
+
def generateStandardSimpleClasses
|
|
1823
|
+
classNames = XSD::Schema.rootSimpleTypes
|
|
1824
|
+
classNames.each { |className|
|
|
1825
|
+
@classMap_xml[className] = Roog::Class.new( nil, className )
|
|
1826
|
+
}
|
|
1827
|
+
end
|
|
1828
|
+
|
|
1829
|
+
# Create Roog::Class instance for each schema-defined simple type
|
|
1830
|
+
def analyzeSimpleClasses()
|
|
1831
|
+
@schema.globalSimpleTypes.each { |className, definition|
|
|
1832
|
+
@classMap_xml[className]=Roog::Class.new( definition, className )
|
|
1833
|
+
}
|
|
1834
|
+
end
|
|
1835
|
+
|
|
1836
|
+
# Create Roog::Class instance for each complex type.
|
|
1837
|
+
# Also creates Roog::Interface for choice groups
|
|
1838
|
+
def analyzeComplexClasses()
|
|
1839
|
+
@schema.globalComplexTypes.each { |className, definition|
|
|
1840
|
+
@classMap_xml[className]=Roog::Class.new( definition, className )
|
|
1841
|
+
}
|
|
1842
|
+
end
|
|
1843
|
+
|
|
1844
|
+
# Create Roog::Interface instance for each substitution group
|
|
1845
|
+
def analyzeSubstitutionGroups()
|
|
1846
|
+
@schema.elementsInSubstitutionGroups.each { |headName, arrayOfAlts|
|
|
1847
|
+
headDefn = @schema.globalElements[headName]
|
|
1848
|
+
interface = Roog::Interface.new( headDefn, headName )
|
|
1849
|
+
@interfaceMap_xml[headName]= interface
|
|
1850
|
+
arrayOfAlts.each { |alt| interface.addAlt(alt) }
|
|
1851
|
+
}
|
|
1852
|
+
end
|
|
1853
|
+
|
|
1854
|
+
# Create a Roog:Class instance corresponding to the document
|
|
1855
|
+
# This document class can be created by the normal process (with definition==nil)
|
|
1856
|
+
# dispatchElement is not called.
|
|
1857
|
+
# Normally, dispatchElement would push the definition on the stack and call specify_complexType
|
|
1858
|
+
# which then calls dispatchChildren which in turn calls dispatchElement(subElement) for all subElements.
|
|
1859
|
+
# This document class has:
|
|
1860
|
+
# @localName Analyzer.xml_name_of_document_class.toModuleName (set during normal renaming process)
|
|
1861
|
+
# @definition nil
|
|
1862
|
+
# @context Expected to be empty
|
|
1863
|
+
# @xmlName Analyzer.xml_name_of_document_class.toModuleName
|
|
1864
|
+
# @fqName Analyzer.xml_name_of_document_class.toModuleName (set during normal renaming process)
|
|
1865
|
+
# @pathString namer.defaultPathString (set during normal renaming process, allowed to be nil)
|
|
1866
|
+
# @xmlSuperName nil
|
|
1867
|
+
# @superEntity nil
|
|
1868
|
+
# @xml_implementedInterfaceNames empty
|
|
1869
|
+
# @implementedInterfaces empty
|
|
1870
|
+
# @transformer nil
|
|
1871
|
+
# @attributes contains Roog::Attributes corrsponding to root elements
|
|
1872
|
+
# @xmlAttributeLookup (like attributes)
|
|
1873
|
+
# @isAbstract false
|
|
1874
|
+
# @isSimple true (not really correct: results from definition==nil. We could change, but some code may expect definition to be present if false.)
|
|
1875
|
+
def analyzeDocumentRoot
|
|
1876
|
+
rootClsName = Analyzer.xml_name_of_document_class
|
|
1877
|
+
rootCls = Roog::Class.new( nil, rootClsName )
|
|
1878
|
+
rootCls.isAbstract=true
|
|
1879
|
+
@classMap_xml[rootClsName]=rootCls
|
|
1880
|
+
@schema.globalElements.each { |eleName, eleDefinition|
|
|
1881
|
+
rootCls.dispatchElement(eleDefinition)
|
|
1882
|
+
}
|
|
1883
|
+
end
|
|
1884
|
+
|
|
1885
|
+
# Cache Class.implementedInterfaces and Interface.implementors, populating Class.xml_implementedInterfaceNames
|
|
1886
|
+
def linkImplementors()
|
|
1887
|
+
@interfaceMap_xml.each { |xmlName, interface|
|
|
1888
|
+
interface.xml_implementorNames.each { |implName|
|
|
1889
|
+
if implName==nil
|
|
1890
|
+
error "Interface "+xmlName+" has a nil implName"
|
|
1891
|
+
else
|
|
1892
|
+
implementor=@classMap_xml[implName]
|
|
1893
|
+
if implementor==nil
|
|
1894
|
+
error "Interface "+xmlName+" can't find implementor "+implName
|
|
1895
|
+
else
|
|
1896
|
+
|
|
1897
|
+
interface.addImplementor(implementor)
|
|
1898
|
+
end
|
|
1899
|
+
end
|
|
1900
|
+
}
|
|
1901
|
+
}
|
|
1902
|
+
end
|
|
1903
|
+
|
|
1904
|
+
# Cache superEntity in entities with a xmlSuperName
|
|
1905
|
+
def linkSupers(map=nil)
|
|
1906
|
+
if map==nil
|
|
1907
|
+
linkSupers @classMap_xml
|
|
1908
|
+
linkSupers @interfaceMap_xml
|
|
1909
|
+
return
|
|
1910
|
+
end
|
|
1911
|
+
map.each { |xmlName, entity|
|
|
1912
|
+
xmlSuperName = entity.xmlSuperName
|
|
1913
|
+
if xmlSuperName!=nil
|
|
1914
|
+
spr = map[xmlSuperName]
|
|
1915
|
+
entity.superEntity=spr
|
|
1916
|
+
error "Can't find superEntity #{xmlSuperName} of #{xmlName}" if spr==nil
|
|
1917
|
+
spr.add_subEntity(entity) if spr!=nil
|
|
1918
|
+
end
|
|
1919
|
+
}
|
|
1920
|
+
end
|
|
1921
|
+
|
|
1922
|
+
# Cache domainType in Attribute
|
|
1923
|
+
def linkAttributeTypes
|
|
1924
|
+
@classMap_xml.each_value { |cls|
|
|
1925
|
+
cls.allLocalAttributes.each {|attribute|
|
|
1926
|
+
xmlTypeName=attribute.xmlTypeName
|
|
1927
|
+
type = xmlEntityLookup(xmlTypeName)
|
|
1928
|
+
attribute.domainType = type
|
|
1929
|
+
}
|
|
1930
|
+
}
|
|
1931
|
+
end
|
|
1932
|
+
|
|
1933
|
+
# Cache Attribute associated with each child element type, and conrete class for element type
|
|
1934
|
+
def linkElementTypes
|
|
1935
|
+
@classMap_xml.each_value { |cls|
|
|
1936
|
+
cls.allLocalAttributes.each {|attribute|
|
|
1937
|
+
entity=xmlEntityLookup(attribute.xmlTypeName)
|
|
1938
|
+
if entity.isClass?
|
|
1939
|
+
# Is it always right to use attribute's xmlName?
|
|
1940
|
+
# elementName might be a role name.
|
|
1941
|
+
# Should we worry about subclassing? (not for Offspring)
|
|
1942
|
+
elementName=attribute.xmlName
|
|
1943
|
+
cls.xmlAttributeLookup[elementName]=attribute
|
|
1944
|
+
attribute.associate_elementName_to_class(elementName, entity)
|
|
1945
|
+
else
|
|
1946
|
+
# The entity is an interface. It represents
|
|
1947
|
+
# a subsitution group or a choice group. Ethier way
|
|
1948
|
+
# we need to add the attribute under each
|
|
1949
|
+
# element name.
|
|
1950
|
+
# This may not correctly handle roles.
|
|
1951
|
+
entity.implementorNameMap(self).each { |elementName, xmlTypeName|
|
|
1952
|
+
cls.xmlAttributeLookup[elementName]=attribute
|
|
1953
|
+
implClass=xmlEntityLookup(xmlTypeName)
|
|
1954
|
+
attribute.associate_elementName_to_class(elementName, implClass)
|
|
1955
|
+
}
|
|
1956
|
+
end
|
|
1957
|
+
}
|
|
1958
|
+
}
|
|
1959
|
+
end
|
|
1960
|
+
|
|
1961
|
+
|
|
1962
|
+
|
|
1963
|
+
def xmlEntityLookup(xmlTypeName)
|
|
1964
|
+
answer=classMap_xml[xmlTypeName]
|
|
1965
|
+
return answer if answer
|
|
1966
|
+
answer=interfaceMap_xml[xmlTypeName]
|
|
1967
|
+
if answer==nil
|
|
1968
|
+
joinStr = "', '"
|
|
1969
|
+
fatal "Can't find Entity from xmlName: #{xmlTypeName}, classes are: '#{classMap_xml.keys.join(joinStr)}' interfaces are: '#{interfaceMap_xml.keys.join(joinStr)}'"
|
|
1970
|
+
end
|
|
1971
|
+
return answer
|
|
1972
|
+
end
|
|
1973
|
+
|
|
1974
|
+
def allClasses
|
|
1975
|
+
@classMap_xml.values
|
|
1976
|
+
end
|
|
1977
|
+
|
|
1978
|
+
def allInterfaces
|
|
1979
|
+
@interfaceMap_xml.values
|
|
1980
|
+
end
|
|
1981
|
+
|
|
1982
|
+
def allEntities
|
|
1983
|
+
allClasses + allInterfaces
|
|
1984
|
+
end
|
|
1985
|
+
|
|
1986
|
+
# Includes the root package with nil localName
|
|
1987
|
+
def allPackages
|
|
1988
|
+
@pathMap.values
|
|
1989
|
+
end
|
|
1990
|
+
|
|
1991
|
+
def allPackages_exceptRoot
|
|
1992
|
+
allPackages.select {|p| p.localName }
|
|
1993
|
+
end
|
|
1994
|
+
|
|
1995
|
+
# Generate model pieces that need to be deduced (packages/paths),
|
|
1996
|
+
# and transform names according to the naming convetions of the language used.
|
|
1997
|
+
# Builds Paths. During this, @namer generates Entity localName, pathString, and fqName
|
|
1998
|
+
# Uses these new names to build :classMap_domain, :interfaceMap_domain, :oldToNewNames, :newToOldNames
|
|
1999
|
+
# Also generates Attribute localName
|
|
2000
|
+
def packageAndSpecialize
|
|
2001
|
+
allEntities.each { |entity| renameAndAssignToPath(entity) }
|
|
2002
|
+
end
|
|
2003
|
+
|
|
2004
|
+
# entity is a Roog::Class or Roog::Interface.
|
|
2005
|
+
def renameAndAssignToPath( entity)
|
|
2006
|
+
oldName = entity.xmlName
|
|
2007
|
+
names = namer.newEntityNames(entity)
|
|
2008
|
+
entity.rename(names)
|
|
2009
|
+
associateNames(oldName, entity.localName)
|
|
2010
|
+
domainRegisterEntity( entity )
|
|
2011
|
+
assignToPath( entity, entity.pathString)
|
|
2012
|
+
if entity.isClass?
|
|
2013
|
+
entity.collectAttribues! { |attrib|
|
|
2014
|
+
attrib.localName = namer.newAttributeName( attrib)
|
|
2015
|
+
attrib
|
|
2016
|
+
}
|
|
2017
|
+
end
|
|
2018
|
+
end
|
|
2019
|
+
|
|
2020
|
+
|
|
2021
|
+
def assignToPath( entity, pathString)
|
|
2022
|
+
# print "\nPath: #{pathString} Entity: #{entity} "
|
|
2023
|
+
path = findOrBuildPath(pathString)
|
|
2024
|
+
path.addEntity(entity)
|
|
2025
|
+
end
|
|
2026
|
+
|
|
2027
|
+
# This is called only for the path part of a qualified
|
|
2028
|
+
# name (or, recursively, a fraction of that path): it
|
|
2029
|
+
# is not called with an entity name at the end.
|
|
2030
|
+
def findOrBuildPath(pathString)
|
|
2031
|
+
path = pathMap[pathString]
|
|
2032
|
+
if path!=nil
|
|
2033
|
+
return path
|
|
2034
|
+
end
|
|
2035
|
+
decomposition = namer.splitNamespace(pathString)
|
|
2036
|
+
if decomposition==nil
|
|
2037
|
+
# must be a child of the rootPath
|
|
2038
|
+
path = Path.new(pathString, @rootPath)
|
|
2039
|
+
pathMap[pathString]=path
|
|
2040
|
+
return path
|
|
2041
|
+
end
|
|
2042
|
+
parent = findOrBuildPath( decompositon[0] )
|
|
2043
|
+
path = Path.new(decomposition[1], parent)
|
|
2044
|
+
pathMap[pathString]=path
|
|
2045
|
+
return path
|
|
2046
|
+
end
|
|
2047
|
+
|
|
2048
|
+
# End of class
|
|
2049
|
+
end
|
|
2050
|
+
|
|
2051
|
+
|
|
2052
|
+
|
|
2053
|
+
|
|
2054
|
+
# ===========================================================================================================
|
|
2055
|
+
#
|
|
2056
|
+
# Generates Ruby source code
|
|
2057
|
+
#
|
|
2058
|
+
class Generator_Ruby
|
|
2059
|
+
|
|
2060
|
+
attr_accessor :globalMixin, :globalSuper, :doNameSort, :doTopoSort
|
|
2061
|
+
|
|
2062
|
+
Indention = "\t"
|
|
2063
|
+
|
|
2064
|
+
def initialize(globalMixin=roog_policy.globalMixin, globalSuper=roog_policy.globalSuper)
|
|
2065
|
+
compileable=true
|
|
2066
|
+
# doNameSort was intended to make toposorting independent of the order of the schema file.
|
|
2067
|
+
# This feature is not yet fully functional, see comment on doTopoSort.
|
|
2068
|
+
@doNameSort=true
|
|
2069
|
+
# doTopoSort is required to actually compile the resulting code:
|
|
2070
|
+
# it ensures that references that can not be forwarded are declared first.
|
|
2071
|
+
# topo sorting currently results in unnecessarily changed order of classes
|
|
2072
|
+
# when the schema changes, almost certainly because DAG < RGL::DirectedAdjacencyGraph
|
|
2073
|
+
# is iterating over a Hash or a Set. Because of this, I sometimes turn off topo sorting
|
|
2074
|
+
# and use the uncompilable file with (doNameSort=true) to view the changes in the schema,
|
|
2075
|
+
# as they are reflected in the Ruby source code.
|
|
2076
|
+
@doTopoSort=true
|
|
2077
|
+
@io = nil
|
|
2078
|
+
@globalMixin=globalMixin
|
|
2079
|
+
@globalSuper=globalSuper
|
|
2080
|
+
@divider="# ==================================================================="
|
|
2081
|
+
end
|
|
2082
|
+
|
|
2083
|
+
# Creates and uses a transient instance.
|
|
2084
|
+
def Generator_Ruby.writeTo( io_or_filepathString, globalMixin=roog_policy.globalMixin, globalSuper=roog_policy.globalSuper )
|
|
2085
|
+
Generator_Ruby.new(globalMixin, globalSuper).writeTo( io_or_filepathString )
|
|
2086
|
+
end
|
|
2087
|
+
|
|
2088
|
+
# Argument can be:
|
|
2089
|
+
# a String specifying a file path, in which case this will gracefully close the IO
|
|
2090
|
+
# a File (or other IO), in which case the caller needs to gracefully close the IO
|
|
2091
|
+
def writeTo( io_or_filepathString )
|
|
2092
|
+
if io_or_filepathString.kind_of?(String)
|
|
2093
|
+
# The "w" mode is write only, truncating any existing file, or creating a new one.
|
|
2094
|
+
File.open( io_or_filepathString, "w") {|aFile|
|
|
2095
|
+
writeTo(aFile)
|
|
2096
|
+
}
|
|
2097
|
+
elsif io_or_filepathString.kind_of?(IO)
|
|
2098
|
+
@io = io_or_filepathString
|
|
2099
|
+
_writeHeader
|
|
2100
|
+
_writeContents
|
|
2101
|
+
_writeFooter
|
|
2102
|
+
else
|
|
2103
|
+
"Generator_Ruby.writeTo does not understand arguments of type "+io_or_filepathString.class.name
|
|
2104
|
+
end
|
|
2105
|
+
end
|
|
2106
|
+
|
|
2107
|
+
# protected
|
|
2108
|
+
|
|
2109
|
+
def divide(indent, type, num)
|
|
2110
|
+
@io << "\n\n\n"
|
|
2111
|
+
@io << "\n"+indent+@divider
|
|
2112
|
+
@io << "\n"+indent+"# " + type + " (" + num.to_s+")"
|
|
2113
|
+
@io << "\n"+indent+@divider
|
|
2114
|
+
@io << "\n"
|
|
2115
|
+
end
|
|
2116
|
+
|
|
2117
|
+
def _writeHeader
|
|
2118
|
+
@io << "\n\n\n"
|
|
2119
|
+
@io << "\n"+@divider
|
|
2120
|
+
@io << "\n# Do not modify! This file generated from schema by Ruby Object Ontology Generator"
|
|
2121
|
+
@io << "\n"+@divider
|
|
2122
|
+
@io << "\n"
|
|
2123
|
+
end
|
|
2124
|
+
|
|
2125
|
+
def _writeFooter
|
|
2126
|
+
end
|
|
2127
|
+
|
|
2128
|
+
# Replaces _writePath(Analyzer.instance.rootPath, indent)
|
|
2129
|
+
def _writeContents(indent='')
|
|
2130
|
+
_writePackages(indent)
|
|
2131
|
+
_writeInterfaces(indent)
|
|
2132
|
+
_writeSimpleTypes(indent)
|
|
2133
|
+
_writeComplexTypes(indent)
|
|
2134
|
+
end
|
|
2135
|
+
|
|
2136
|
+
def sort(aCollection)
|
|
2137
|
+
aCollection.sort! {|x,y| x.localName <=> y.localName } if doNameSort
|
|
2138
|
+
aCollection = DAG.topoSortDependents(:all, aCollection) if doTopoSort
|
|
2139
|
+
aCollection
|
|
2140
|
+
end
|
|
2141
|
+
|
|
2142
|
+
def _writePackages(indent='')
|
|
2143
|
+
items = Analyzer.instance.allPackages_exceptRoot
|
|
2144
|
+
divide(indent, "Packages", items.size)
|
|
2145
|
+
items = sort(items)
|
|
2146
|
+
items.each { |pkg| _writePackage(pkg, indent) }
|
|
2147
|
+
end
|
|
2148
|
+
|
|
2149
|
+
def _writeInterfaces(indent='')
|
|
2150
|
+
items = Analyzer.instance.allInterfaces
|
|
2151
|
+
divide(indent, "Interfaces", items.size)
|
|
2152
|
+
items = sort(items)
|
|
2153
|
+
items.each { |interface| _writeInterface(interface, indent) }
|
|
2154
|
+
end
|
|
2155
|
+
|
|
2156
|
+
def _writeSimpleTypes(indent='')
|
|
2157
|
+
items = Analyzer.instance.allClasses.select {|item| item.isSimple }
|
|
2158
|
+
divide(indent, "SimpleTypes", items.size)
|
|
2159
|
+
items = sort(items)
|
|
2160
|
+
items.each { |klass| _writeClass(klass, indent) }
|
|
2161
|
+
end
|
|
2162
|
+
|
|
2163
|
+
def _writeComplexTypes(indent='')
|
|
2164
|
+
items = Analyzer.instance.allClasses.reject {|item| item.isSimple }
|
|
2165
|
+
divide(indent, "ComplexTypes", items.size)
|
|
2166
|
+
items = sort(items)
|
|
2167
|
+
items.each { |klass| _writeClass(klass, indent) }
|
|
2168
|
+
end
|
|
2169
|
+
|
|
2170
|
+
def _writePackage(package, indent='')
|
|
2171
|
+
return if !package
|
|
2172
|
+
@io << "\n\n#{indent}module #{package.localName}; end";
|
|
2173
|
+
end
|
|
2174
|
+
|
|
2175
|
+
# DEPRECATED in favor of _writeContents
|
|
2176
|
+
# See also a change to _writeClass and _writeInterface
|
|
2177
|
+
# XML lets you mix up packages in a way that prohibits straightforward
|
|
2178
|
+
# hierarchical code. For example, a choice group (that translates to a
|
|
2179
|
+
# Ruby Module acting as an Interface) can contain elements from other
|
|
2180
|
+
# namespaces (including simple Xsd types). This means that modules
|
|
2181
|
+
# A and B may each need to refer to something defined in the other module.
|
|
2182
|
+
# As another example, a class in A may inherit from a class in B,
|
|
2183
|
+
# while some other class in B inherits from some other class in A.
|
|
2184
|
+
def _writePath(path, indent="")
|
|
2185
|
+
if path.localName!=nil
|
|
2186
|
+
@io << "\n\n#{indent}module #{path.localName}"
|
|
2187
|
+
_writePathContents(path, indent+Indention)
|
|
2188
|
+
@io << "\n#{indent}end"
|
|
2189
|
+
return
|
|
2190
|
+
end
|
|
2191
|
+
_writePathContents(path, indent)
|
|
2192
|
+
end
|
|
2193
|
+
|
|
2194
|
+
def _writePathContents(path, indent)
|
|
2195
|
+
# Write interfaces
|
|
2196
|
+
interfaces = path.interfaces
|
|
2197
|
+
divide(indent, "Interfaces", interfaces.size)
|
|
2198
|
+
interfaces.sort! {|x,y| x.localName <=> y.localName } if doNameSort
|
|
2199
|
+
interfaces = DAG.topoSortDependents(:samePathAndEntityType, interfaces) if doTopoSort
|
|
2200
|
+
interfaces.each { |interface| _writeInterface(interface, indent) }
|
|
2201
|
+
# Write sub-packages
|
|
2202
|
+
divide(indent, "Packages", path.childPaths.size)
|
|
2203
|
+
subPaths = path.childPaths.clone
|
|
2204
|
+
subPaths.sort! {|x,y| x.localName <=> y.localName } if doNameSort
|
|
2205
|
+
subPaths = DAG.topoSortDependents(:pathDependency, subPaths) if doTopoSort
|
|
2206
|
+
subPaths.each { |kid| _writePath(kid, indent) if kid }
|
|
2207
|
+
# Write classes
|
|
2208
|
+
classes = path.classes
|
|
2209
|
+
divide(indent, "Classes", classes.size)
|
|
2210
|
+
classes.sort! {|x,y| x.localName <=> y.localName } if doNameSort
|
|
2211
|
+
classes = DAG.topoSortDependents(:samePathAndEntityType, classes) if doTopoSort
|
|
2212
|
+
classes.each { |cls| _writeClass(cls, indent) }
|
|
2213
|
+
end
|
|
2214
|
+
|
|
2215
|
+
|
|
2216
|
+
def _writeInterface(interface, indent)
|
|
2217
|
+
if interface == nil
|
|
2218
|
+
return
|
|
2219
|
+
end
|
|
2220
|
+
# AFG changed from interface.localName to interface.fqName when _writePath was deprecated
|
|
2221
|
+
@io << "\n\n#{indent}module #{interface.fqName}"
|
|
2222
|
+
if interface.superEntityFqName!=nil
|
|
2223
|
+
@io << "\n#{indent}#{Indention}include " + interface.superEntityFqName
|
|
2224
|
+
elsif globalMixin!=nil
|
|
2225
|
+
@io << "\n#{indent}#{Indention}include " + globalMixin
|
|
2226
|
+
end
|
|
2227
|
+
@io << "\n#{indent}end"
|
|
2228
|
+
end
|
|
2229
|
+
|
|
2230
|
+
def _writeClass(cls, indent)
|
|
2231
|
+
return if cls == nil
|
|
2232
|
+
return if !cls.isClass?
|
|
2233
|
+
return if Analyzer.xml_name_of_document_class==cls.localName
|
|
2234
|
+
# AFG changed from cls.localName to cls.fqName when _writePath was deprecated
|
|
2235
|
+
@io << "\n\n#{indent}class #{cls.fqName}"
|
|
2236
|
+
superName=cls.superEntityFqName
|
|
2237
|
+
superName=globalSuper if superName==nil
|
|
2238
|
+
if superName!=nil
|
|
2239
|
+
@io << " < " + superName
|
|
2240
|
+
end
|
|
2241
|
+
if cls.implementsInterface
|
|
2242
|
+
@io << "\n#{indent}#{Indention}include "
|
|
2243
|
+
implementedFqInterfaceNames=cls.implementedFqInterfaceNames
|
|
2244
|
+
lastIdx=implementedFqInterfaceNames.size-1
|
|
2245
|
+
implementedFqInterfaceNames.each_index {|idx|
|
|
2246
|
+
@io << implementedFqInterfaceNames[idx]
|
|
2247
|
+
if idx<lastIdx
|
|
2248
|
+
@io << ", "
|
|
2249
|
+
end
|
|
2250
|
+
}
|
|
2251
|
+
elsif globalMixin!=nil
|
|
2252
|
+
@io << "\n#{indent}#{Indention}include #{globalMixin}"
|
|
2253
|
+
end
|
|
2254
|
+
@io << "\n#{indent}#{Indention}# " << cls.description
|
|
2255
|
+
attrs = cls.attributes.values.clone
|
|
2256
|
+
attrs.sort! {|x,y| x.localName <=> y.localName } if doNameSort
|
|
2257
|
+
attrs.each { |attrib| _writeAttribute(attrib, indent) }
|
|
2258
|
+
initializedAttributes = cls.initializedAttributes.clone
|
|
2259
|
+
initializedAttributes.sort! {|x,y| x.localName <=> y.localName } if doNameSort
|
|
2260
|
+
if !initializedAttributes.empty?
|
|
2261
|
+
attrIndent = indent+Indention+Indention
|
|
2262
|
+
@io << "\n#{indent}#{Indention}def initialize"
|
|
2263
|
+
@io << "\n#{indent}#{Indention}#{Indention}super"
|
|
2264
|
+
initializedAttributes.each { |attrib|
|
|
2265
|
+
_writeAttributeInitialization(attrib, attrIndent)
|
|
2266
|
+
}
|
|
2267
|
+
@io << "\n#{indent}#{Indention}end"
|
|
2268
|
+
end
|
|
2269
|
+
@io << "\n#{indent}end"
|
|
2270
|
+
end
|
|
2271
|
+
|
|
2272
|
+
def _writeAttribute(attribute, indent)
|
|
2273
|
+
@io << "\n#{indent}#{Indention}attr_accessor :#{attribute.localName} # "+attribute.description
|
|
2274
|
+
end
|
|
2275
|
+
|
|
2276
|
+
# So far don't deduce where Hashes are needed
|
|
2277
|
+
def _writeAttributeInitialization(attribute, indent)
|
|
2278
|
+
@io << "\n"+indent+"@"+attribute.localName+" = Array.new"
|
|
2279
|
+
end
|
|
2280
|
+
|
|
2281
|
+
end # Class Generator_Ruby
|
|
2282
|
+
|
|
2283
|
+
# ===========================================================================================================
|
|
2284
|
+
# Used to marshal or unmarshal one datum. Applicable only to simple data.
|
|
2285
|
+
# fromStringSym and toStringSym are symbols denoting messages sent to the
|
|
2286
|
+
# Transformer_Ruby (rather than the thing being converted, or the Roog::Class,
|
|
2287
|
+
# or Roog::Attribute).
|
|
2288
|
+
#
|
|
2289
|
+
# If fromStringSym is nil, the domain object must have a :new method which
|
|
2290
|
+
# takes one string argument. If toStringSym is nil, the domain object must
|
|
2291
|
+
# have a :to_s method which produces the marshaling result.
|
|
2292
|
+
#
|
|
2293
|
+
# parentClass specifies the superclass of the xsd class with which the Transformer_Ruby
|
|
2294
|
+
# is associated. If parentClass is nil, the xsd class will inherit from Object.
|
|
2295
|
+
# Note that fromStringSym need not create a domain object of the class specified by
|
|
2296
|
+
# the Roog::Class.
|
|
2297
|
+
#
|
|
2298
|
+
# domainClasses must must include all the possible classes resulting from fromStringSym.
|
|
2299
|
+
#
|
|
2300
|
+
# For example, in Ruby there is no Boolean class (only TrueClass and FalseClass,
|
|
2301
|
+
# which both inherit directly from Object), so there is nothing for xsd:boolean
|
|
2302
|
+
# to inherit from. We could just let it inherit from Object, and let it wrap
|
|
2303
|
+
# a Ruby Boolean. Yuk: we would have to use an accessor every time we want the
|
|
2304
|
+
# darn Boolean. So instead, the method invoked by fromStringSym returns either
|
|
2305
|
+
# the singleton TrueClass or FalseClass instance.
|
|
2306
|
+
#
|
|
2307
|
+
# It is less clear what should be done about Integers. The schema may specify some
|
|
2308
|
+
# constraints that we would like to maintain after we have unmarshaled the data
|
|
2309
|
+
# Booleans are easier because they are too fundamental to have much in the way
|
|
2310
|
+
# of constraints. Furthermore, there wasn't much of a choice, since there was no
|
|
2311
|
+
# superclass, but in the case of integers, we could use Integer. If we let
|
|
2312
|
+
# :fromStringSym just create a Bignum or Fixednum the constraints in the schema
|
|
2313
|
+
# would dissapear. We could perhaps add the constraints to a Bignum, but
|
|
2314
|
+
# they can not be added to Fixednums (which do not support singleton methods),
|
|
2315
|
+
# and the propagation of constraints would be problematical. The complicated
|
|
2316
|
+
# solution is to create an xsd class (call it XSDInt) which inherits from Integer, wraps a
|
|
2317
|
+
# Bignum or Fixednum, and which carries constraints. This involves implementing
|
|
2318
|
+
# almost all of the numeric behaviors, and insuring that operations with numeric
|
|
2319
|
+
# results always return an XSDInt. The propagation of constraints might get
|
|
2320
|
+
# tricky when a numeric results from two XSDInts. For now, the easiest thing to
|
|
2321
|
+
# do is apply the constraints only at boundaries (when marshaling/unmarshaling, and
|
|
2322
|
+
# at the GUI), and let :fromStringSym create a Fixednum or Bignum. Same thing for
|
|
2323
|
+
# xsd:double and xsd:decimal.
|
|
2324
|
+
#
|
|
2325
|
+
#
|
|
2326
|
+
# I liked the idea of using procs instead of symbols, but it made
|
|
2327
|
+
# the dictionary construction too complicated.
|
|
2328
|
+
class Transformer_Ruby
|
|
2329
|
+
|
|
2330
|
+
attr_reader :parentClass, :fromStringSym, :toStringSym, :domainClasses
|
|
2331
|
+
|
|
2332
|
+
def initialize( parentClass, fromStringSym=nil, domainClasses=nil, toStringSym=nil )
|
|
2333
|
+
assert { "domainClasses must be provideed if fromStringSym!=nil"} if fromStringSym!=nil && domainClasses==nil
|
|
2334
|
+
@parentClass=parentClass
|
|
2335
|
+
@fromStringSym=fromStringSym
|
|
2336
|
+
@toStringSym=toStringSym
|
|
2337
|
+
@domainClasses=domainClasses
|
|
2338
|
+
end
|
|
2339
|
+
|
|
2340
|
+
def to_s
|
|
2341
|
+
self.class.name << ' ' \
|
|
2342
|
+
<< (parentClass || 'nil').to_s << ' ' \
|
|
2343
|
+
<< (fromStringSym || 'nil').to_s << ' ' \
|
|
2344
|
+
<< (toStringSym || 'nil').to_s
|
|
2345
|
+
end
|
|
2346
|
+
|
|
2347
|
+
def parentFqName
|
|
2348
|
+
return nil if parentClass==nil
|
|
2349
|
+
answer = parentClass.name
|
|
2350
|
+
return answer if answer.index('::')
|
|
2351
|
+
'::'+answer
|
|
2352
|
+
end
|
|
2353
|
+
|
|
2354
|
+
def fromString(str, roogClass, attributeData)
|
|
2355
|
+
return self.send(fromStringSym, str, roogClass, attributeData) if fromStringSym!=nil
|
|
2356
|
+
return str if roog_policy.use_framelets
|
|
2357
|
+
instantiate_class_named(roogClass.fqName, false, str)
|
|
2358
|
+
end
|
|
2359
|
+
|
|
2360
|
+
def toString(obj, roogClass)
|
|
2361
|
+
return obj.to_s if toStringSym==nil
|
|
2362
|
+
self.send(toStringSym, obj, roogClass)
|
|
2363
|
+
end
|
|
2364
|
+
|
|
2365
|
+
def str2boolean(str, roogClass, attributeData)
|
|
2366
|
+
#print "\n ~~~~ str2boolean(#{str})"
|
|
2367
|
+
return nil if str.empty?
|
|
2368
|
+
str.downcase=="true"
|
|
2369
|
+
end
|
|
2370
|
+
|
|
2371
|
+
def str2int(str, roogClass, attributeData)
|
|
2372
|
+
#print "\n ~~~~ str2int(#{str})"
|
|
2373
|
+
return nil if str.empty?
|
|
2374
|
+
str.to_i
|
|
2375
|
+
end
|
|
2376
|
+
|
|
2377
|
+
def str2float(str, roogClass, attributeData)
|
|
2378
|
+
#print "\n ~~~~ str2float(#{str})"
|
|
2379
|
+
return nil if str.empty?
|
|
2380
|
+
str.to_f
|
|
2381
|
+
end
|
|
2382
|
+
|
|
2383
|
+
def float2str(obj, roogClass)
|
|
2384
|
+
return nil if !obj.kind_of?(Float)
|
|
2385
|
+
format = roogClass.float_format
|
|
2386
|
+
# Don't really know if sprintf format strings are expressive enough.
|
|
2387
|
+
return sprintf( format, obj ) if !format.nil?
|
|
2388
|
+
# Oops, not true: Ensure it has a decimal place. to_s results in '0' for 0.0
|
|
2389
|
+
answer = obj.to_f
|
|
2390
|
+
answer
|
|
2391
|
+
#return answer if answer.include? ?.
|
|
2392
|
+
#answer + '.0'
|
|
2393
|
+
end
|
|
2394
|
+
|
|
2395
|
+
def str2time(str, roogClass, attributeData)
|
|
2396
|
+
#print "\n ~~~~ str2time(#{str})"
|
|
2397
|
+
#attributeData.treeDump
|
|
2398
|
+
return nil if str.empty?
|
|
2399
|
+
return Time.from_string(str)
|
|
2400
|
+
rescue
|
|
2401
|
+
print "\n ~~~~ str2time unable to convert #{str}, using Time.now"
|
|
2402
|
+
Time.now
|
|
2403
|
+
end
|
|
2404
|
+
|
|
2405
|
+
def time2str(obj, roogClass)
|
|
2406
|
+
# to_s results in times of the form "Fri Feb 13 13:24:00 UTC 2004"
|
|
2407
|
+
# instead of "2004-02-13T13:24:00"
|
|
2408
|
+
return nil if !obj.kind_of?(Time)
|
|
2409
|
+
obj.strftime("%Y-%m-%dT%H:%M:%S")
|
|
2410
|
+
end
|
|
2411
|
+
|
|
2412
|
+
end # Transformer_Ruby
|
|
2413
|
+
|
|
2414
|
+
# ===========================================================================================================
|
|
2415
|
+
# Answers language dependent questions unrelated to
|
|
2416
|
+
# source code generation
|
|
2417
|
+
class Semantics_Ruby
|
|
2418
|
+
|
|
2419
|
+
attr_accessor :globalModule, :transformers
|
|
2420
|
+
|
|
2421
|
+
def initialize(globalModule=roog_policy.globalModule)
|
|
2422
|
+
@globalModule=globalModule
|
|
2423
|
+
# This must have a key for every simpleType in XSD::Schema.rootSimpleTypes
|
|
2424
|
+
# It can optionally have an entry for simple types not in XSD..
|
|
2425
|
+
@transformers = {
|
|
2426
|
+
"xsd:anyURI" => Transformer_Ruby.new( String ),
|
|
2427
|
+
"xsd:base64Binary" => Transformer_Ruby.new( String ),
|
|
2428
|
+
"xsd:boolean" => Transformer_Ruby.new( nil, :str2boolean, [TrueClass, FalseClass] ),
|
|
2429
|
+
"xsd:dateTime" => Transformer_Ruby.new( nil, :str2time, [Time], :time2str ),
|
|
2430
|
+
"xsd:decimal" => Transformer_Ruby.new( nil, :str2float, [Float] ),
|
|
2431
|
+
"xsd:double" => Transformer_Ruby.new( nil, :str2float, [Float]),
|
|
2432
|
+
"xsd:hexBinary" => Transformer_Ruby.new( String ),
|
|
2433
|
+
"xsd:integer" => Transformer_Ruby.new( nil, :str2int, [Fixnum, Bignum] ),
|
|
2434
|
+
"xsd:nonNegativeInteger" => Transformer_Ruby.new( nil, :str2int, [Fixnum, Bignum] ),
|
|
2435
|
+
"xsd:positiveInteger" => Transformer_Ruby.new( nil, :str2int, [Fixnum, Bignum] ),
|
|
2436
|
+
"xsd:string" => Transformer_Ruby.new( String )
|
|
2437
|
+
}
|
|
2438
|
+
end
|
|
2439
|
+
|
|
2440
|
+
def initializeTransformer(roogClass)
|
|
2441
|
+
return nil if !roogClass.isSimple
|
|
2442
|
+
tx = roogClass.transformer
|
|
2443
|
+
return tx if tx!=nil
|
|
2444
|
+
tx = transformers[roogClass.xmlName]
|
|
2445
|
+
roogClass.transformer = tx
|
|
2446
|
+
return tx if tx!=nil
|
|
2447
|
+
parent = roogClass.superEntity
|
|
2448
|
+
return nil if parent==nil
|
|
2449
|
+
tx = initializeTransformer(parent)
|
|
2450
|
+
roogClass.transformer = tx
|
|
2451
|
+
tx
|
|
2452
|
+
end
|
|
2453
|
+
|
|
2454
|
+
def add_global_module(roogClass)
|
|
2455
|
+
return if roogClass.isSimple
|
|
2456
|
+
end
|
|
2457
|
+
|
|
2458
|
+
def specialize(analyzer=Roog::Analyzer.instance)
|
|
2459
|
+
rp = analyzer.rootPath
|
|
2460
|
+
rp.localName=globalModule if !rp.localName || rp.localName.empty?
|
|
2461
|
+
analyzer.allClasses.each { |cls|
|
|
2462
|
+
initializeTransformer(cls)
|
|
2463
|
+
}
|
|
2464
|
+
end
|
|
2465
|
+
|
|
2466
|
+
def self.specialize(analyzer=Roog::Analyzer.instance)
|
|
2467
|
+
self.new.specialize(analyzer)
|
|
2468
|
+
end
|
|
2469
|
+
|
|
2470
|
+
end # Semantics_Ruby
|
|
2471
|
+
|
|
2472
|
+
end # Module Roog
|
|
2473
|
+
|
|
2474
|
+
|
|
2475
|
+
|
|
2476
|
+
|
|
2477
|
+
# ===========================================================================================================
|
|
2478
|
+
# ===========================================================================================================
|
|
2479
|
+
# ===========================================================================================================
|
|
2480
|
+
|
|
2481
|
+
if __FILE__ == $0 #directlyInvoked?
|
|
2482
|
+
require "Getopt/Declare"
|
|
2483
|
+
commandLineSpec = %q(
|
|
2484
|
+
<schemaPath:if> path to schema file [required]
|
|
2485
|
+
<domainPath:of> path to output domain source code file [required]
|
|
2486
|
+
<globalMixin> optional name of module to be mixed into everything
|
|
2487
|
+
<globalSuper> optional name of superclass of all objects not ineriting from simple classes
|
|
2488
|
+
)
|
|
2489
|
+
args = Getopt::Declare.new(commandLineSpec)
|
|
2490
|
+
Roog::Analyzer.analyze( args["<schemaPath>"] )
|
|
2491
|
+
Roog::Semantics_Ruby.specialize
|
|
2492
|
+
Roog::Generator_Ruby.writeTo( args["<domainPath>"], args["<globalMixin>"], args["<globalSuper>"] )
|
|
2493
|
+
print( "\n\n*** Done ***\n\n")
|
|
2494
|
+
end
|
|
2495
|
+
|
|
2496
|
+
|
|
2497
|
+
|
|
2498
|
+
|