Changeset 323 for ruby/trunk/lib/adl_parser
- Timestamp:
- Oct 19, 2009, 5:10:43 PM (15 years ago)
- Location:
- ruby/trunk/lib/adl_parser
- Files:
-
- 3 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
ruby/trunk/lib/adl_parser/lib/adl_exception.rb
r307 r323 5 5 end 6 6 7 module CADLScanner7 module Scanner 8 8 class Base < RuntimeError 9 9 end 10 10 end 11 12 module Parser 13 class Base < RuntimeError 14 end 15 end 16 17 18 # 19 # 20 # c.f. beale07:_archet_defin_languag,p.100 21 module Validation 22 class Base < RuntimeError 23 end 24 25 class VARID < Base 26 MESSAGE = "The archetype must have an identifier value for the archetype_id section. The identifier must conform to the published openEHR specification for archetype identifiers." 27 end 28 29 class VARCN < Base 30 MESSAGE = "The archetype must have an archetype term value in concept section. The term must exist in the archetype ontology." 31 end 32 33 class VARDF < Base 34 MESSAGE = "The archetype must have a definition section, expressed as a cADL syntax." 35 end 36 37 class VARON < Base 38 MESSAGE = "The archetype must have a ontology section, expressed as a dADL syntax." 39 end 40 41 class VARDT < Base 42 MESSAGE = "The topmost typename mentioned in the archetype definition section must match the type mentioned in the type-name slot of the first segment of the archetype id." 43 end 44 45 class VATDF < Base 46 MESSAGE = "Each archetype term used as a node identifier the archetype definition must be defined in the term_definitions part of the ontology." 47 end 48 49 class VACDF < Base 50 MESSAGE = "Each constraint code used in the archetype definition must be defined in the constraint_definition part of the ontology." 51 end 52 53 class VDFAI < Base 54 MESSAGE = "Any archetype identifier mentioned in an archetype slot in the definition section must conform to the published openEHR specification for archetype identifiers." 55 end 56 57 class VDFPT < Base 58 MESSAGE = "Any path mentioned in the definition section must be valid syntactically, and a valid path with respect to the hierarchical structure of the definition section." 59 end 60 end 61 11 62 end 12 63 end -
ruby/trunk/lib/adl_parser/lib/adl_scanner.rb
r321 r323 89 89 when /\A(\w+)-(\w+)-(\w+)\.(\w+)((?:-\w+)*)\.(v\w+)/ #V_ARCHETYPE_ID 90 90 object_id, rm_originator, rm_name, rm_entity, concept_name, specialisation, version_id = $&, $1, $2, $3, $4, $5, $6 91 #archetype_id = OpenEhr::RM::Support::Identification::ArchetypeID.new(object_id, concept_name, rm_name, rm_entity, rm_originator, specialisation, version_id) 92 archetype_id = OpenEhr::RM::Support::Identification::ArchetypeID.new(:concept_name => concept_name, :rm_name => rm_name, :rm_entity => rm_entity, :rm_originator => :rm_originator, :specialisation => specialisation, :version_id => version_id) 91 archetype_id = OpenEhr::RM::Support::Identification::ArchetypeID.new(:concept_name => concept_name, :rm_name => rm_name, :rm_entity => rm_entity, :rm_originator => rm_originator, :specialisation => specialisation, :version_id => version_id) 93 92 yield :V_ARCHETYPE_ID, archetype_id 94 93 when /\A[a-z][a-zA-Z0-9_]*/ … … 848 847 849 848 850 # module Common851 # class START_TERM_CODE_CONSTRAINT852 # include Yaparc::Parsable853 # def initialize854 # @parser = lambda do |input|855 # Yaparc::Apply.new(Yaparc::Regex.new(/[ \t\n]*\[([a-zA-Z0-9\(\)\._\-]+)::[ \t\n]*/)) do |match|856 # OpenEhr::LOG.info("START_TERM_CODE_CONSTRAINT: #{match}")857 # [:START_TERM_CODE_CONSTRAINT, match]858 # end859 # end860 # end861 # end862 863 # # /\A\[[a-zA-Z0-9()\._-]+::[a-zA-Z0-9\._-]+\]/ #V_QUALIFIED_TERM_CODE_REF form [ICD10AM(1998)::F23]864 # class V_QUALIFIED_TERM_CODE_REF865 # include Yaparc::Parsable866 # def initialize867 # @parser = lambda do |input|868 # Yaparc::Apply.new(Yaparc::Regex.new(/\A\[[a-zA-Z0-9()\._-]+::[a-zA-Z0-9\._-]+\]/)) do |match|869 # OpenEhr::LOG.info("V_QUALIFIED_TERM_CODE_REF: #{match}")870 # [:V_QUALIFIED_TERM_CODE_REF, match]871 # end872 # end873 # end874 # end875 876 # class V_LOCAL_TERM_CODE_REF877 # include Yaparc::Parsable878 # def initialize879 # @parser = lambda do |input|880 # Yaparc::Apply.new(Yaparc::Regex.new(/\A\[[a-zA-Z0-9][a-zA-Z0-9._\-]*\]/)) do |match|881 # OpenEhr::LOG.info("V_TERM_CODE_REF: #{match}")882 # [:V_LOCAL_TERM_CODE_REF, match]883 # end884 # end885 # end886 # end887 888 # class ERR_V_QUALIFIED_TERM_CODE_REF889 # include Yaparc::Parsable890 # def initialize891 # @parser = lambda do |input|892 # Yaparc::Apply.new(Yaparc::Regex.new(/\A\[[a-zA-Z0-9._\- ]+::[a-zA-Z0-9._\- ]+\]/)) do |match|893 # OpenEhr::LOG.info("ERR_V_QUALIFIED_TERM_CODE_REF: #{match}")894 # [:ERR_V_QUALIFIED_TERM_CODE_REF, match]895 # end896 # end897 # end898 # end899 900 # class V_TYPE_IDENTIFIER901 # include Yaparc::Parsable902 # def initialize903 # @parser = lambda do |input|904 # Yaparc::Apply.new(Yaparc::Regex.new(/\A[A-Z][a-zA-Z0-9_]*/)) do |match|905 # OpenEhr::LOG.info("V_TYPE_IDENTIFIER: #{match}")906 # [:V_TYPE_IDENTIFIER, match]907 # end908 # end909 # end910 # end911 912 # class V_GENERIC_TYPE_IDENTIFIER913 # include Yaparc::Parsable914 # def initialize915 # @parser = lambda do |input|916 # Yaparc::Apply.new(Yaparc::Regex.new(/\A[A-Z][a-zA-Z0-9_]*<[a-zA-Z0-9,_<>]+>/)) do |match|917 # OpenEhr::LOG.info("V_GENERIC_TYPE_IDENTIFIER: #{match}")918 # [:V_GENERIC_TYPE_IDENTIFIER, match]919 # end920 # end921 # end922 # end923 924 925 # class V_LOCAL_CODE926 # include Yaparc::Parsable927 # def initialize928 # @parser = lambda do |input|929 # Yaparc::Apply.new(Yaparc::Regex.new(/\Aa[ct][0-9.]+/)) do |match|930 # OpenEhr::LOG.info("V_LOCAL_CODE: #{match}")931 # [:V_LOCAL_CODE, match]932 # end933 # end934 # end935 # end936 937 # class V_STRING938 # include Yaparc::Parsable939 # def initialize940 # @parser = lambda do |input|941 # Yaparc::Apply.new(Yaparc::Regex.new(/\A"([^"]*)"/m)) do |match|942 # OpenEhr::LOG.info("V_STRING: #{match}")943 # [:V_STRING, match]944 # end945 # end946 # end947 # end948 949 # class V_REAL950 # include Yaparc::Parsable951 # def initialize952 # @parser = lambda do |input|953 # Yaparc::Apply.new(Yaparc::Regex.new(/\A[0-9]+\.[0-9]+|[0-9]+\.[0-9]+[eE][+-]?[0-9]+/)) do |match|954 # OpenEhr::LOG.info("V_REAL: #{match}")955 # [:V_REAL, match]956 # end957 # end958 # end959 # end960 961 # #V_ISO8601_DURATION PnYnMnWnDTnnHnnMnnS962 # class V_ISO8601_DURATION963 # include Yaparc::Parsable964 # def initialize965 # @parser = lambda do |input|966 # Yaparc::Apply.new(967 # Yaparc::Alt.new(Yaparc::Regex.new(/\AP([0-9]+|[yY])?([0-9]+|[mM])?([0-9]+|[wW])?([0-9]+|[dD])?T([0-9]+|[hH])?([0-9]+|[mM])?([0-9]+|[sS])?/),968 # Yaparc::Regex.new(/\AP([0-9]+|[yY])?([0-9]+|[mM])?([0-9]+|[wW])?([0-9]+|[dD])?/))) do |match|969 # OpenEhr::LOG.info("V_ISO8601_DURATION: #{match}")970 # [:V_ISO8601_DURATION, match]971 # end972 # end973 # end974 # end975 976 # end # of Common977 978 # module DADL979 # # c.f. http://www.openehr.org/svn/ref_impl_eiffel/TRUNK/components/adl_parser/src/syntax/adl/parser/adl_scanner.l980 # RESERVED = {981 # 'true' => :SYM_TRUE, #[Tt][Rr][Uu][Ee] -- -> SYM_TRUE982 # 'false' => :SYM_FALSE, # [Ff][Aa][Ll][Ss][Ee] -- -> SYM_FALSE983 # 'infinity' => :SYM_INFINITY # [Ii][Nn][Ff][Ii][Nn][Ii][Tt][Yy] -- -> SYM_INFINITY984 # }985 # #986 # # DADL::RootScanner987 # #988 # class RootScanner989 # include Yaparc::Parsable990 # def initialize991 # @parser = lambda do |input|992 # Yaparc::Alt.new(Reserved.new,993 # OpenEhr::ADL::Scanner::Common::V_QUALIFIED_TERM_CODE_REF.new,994 # OpenEhr::ADL::Scanner::Common::V_LOCAL_TERM_CODE_REF.new,995 # OpenEhr::ADL::Scanner::Common::ERR_V_QUALIFIED_TERM_CODE_REF.new,996 # OpenEhr::ADL::Scanner::Common::V_TYPE_IDENTIFIER.new,997 # OpenEhr::ADL::Scanner::Common::V_GENERIC_TYPE_IDENTIFIER.new,998 # OpenEhr::ADL::Scanner::Common::V_STRING.new,999 # OpenEhr::ADL::Scanner::Common::V_LOCAL_CODE.new,1000 # OpenEhr::ADL::Scanner::Common::V_REAL.new,1001 # OpenEhr::ADL::Scanner::Common::V_ISO8601_DURATION.new#,1002 # #OpenEhr::ADL::Scanner::Common::START_TERM_CODE_CONSTRAINT.new1003 # )1004 # end1005 # end1006 # end1007 1008 # # <DADL::Reserved class>1009 # class Reserved1010 # include Yaparc::Parsable1011 1012 # def initialize1013 # @parser = lambda do |input|1014 # reserved_parsers = OpenEhr::ADL::Scanner::DADL::RESERVED.map do |keyword|1015 # Yaparc::Tokenize.new(1016 # Yaparc::Literal.new(keyword[0],false)1017 # )1018 # end1019 # Yaparc::Alt.new(Yaparc::Apply.new(Yaparc::Alt.new(*reserved_parsers)) do |match|1020 # OpenEhr::LOG.info("Reserved: #{match}")1021 # [OpenEhr::ADL::Scanner::DADL::RESERVED[match], OpenEhr::ADL::Scanner::DADL::RESERVED[match]]1022 # end,1023 # Yaparc::Apply.new(Yaparc::Regex.new(/\A[a-z][a-zA-Z0-9_]*/)) do |match|1024 # OpenEhr::LOG.info("V_ATTRIBUTE_IDENTIFIER: #{match}")1025 # [:V_ATTRIBUTE_IDENTIFIER, match]1026 # end)1027 # end1028 # end1029 # end1030 # end # of DADL1031 1032 # module CADL1033 # # c.f. http://www.openehr.org/svn/ref_impl_eiffel/TRUNK/components/adl_parser/src/syntax/cadl/parser/cadl_scanner.l1034 # RESERVED = {1035 # 'ordered' => :SYM_ORDERED, # [Oo][Rr][Dd][Ee][Rr][Ee][Dd]1036 # 'unordered' => :SYM_UNORDERED, # [Uu][Nn][Oo][Rr][Dd][Ee][Rr][Ee][Dd]1037 # 'then' => :SYM_THEN, # [Tt][Hh][Ee][Nn]1038 # 'else' => :SYM_ELSE, # [Ee][Ll][Ss][Ee]1039 # 'and' => :SYM_AND, # [Aa][Nn][Dd]1040 # 'or' => :SYM_OR, # [Oo][Rr]1041 # 'xor' => :SYM_XOR, # [Xx][Oo][Rr]1042 # 'not' => :SYM_NOT, # [Nn][Oo][Tt]1043 # 'implies' => :SYM_IMPLIES, # [Ii][Mm][Pp][Ll][Ii][Ee][Ss]1044 # 'true' => :SYM_TRUE, #[Tt][Rr][Uu][Ee] -- -> SYM_TRUE1045 # 'false' => :SYM_FALSE, # [Ff][Aa][Ll][Ss][Ee] -- -> SYM_FALSE1046 # 'forall' => :SYM_FORALL, # [Ff][Oo][Rr][_][Aa][Ll][Ll]1047 # 'exists' => :SYM_EXISTS, # [Ee][Xx][Ii][Ss][Tt][Ss]1048 # 'existence' => :SYM_EXISTENCE, # [Ee][Xx][Iu][Ss][Tt][Ee][Nn][Cc][Ee]1049 # 'occurrences' => :SYM_OCCURRENCES, # [Oo][Cc][Cc][Uu][Rr][Rr][Ee][Nn][Cc][Ee][Ss]1050 # 'cardinality' => :SYM_CARDINALITY, # [Cc][Aa][Rr][Dd][Ii][Nn][Aa][Ll][Ii][Tt][Yy]1051 # 'unique' => :SYM_UNIQUE, # [Uu][Nn][Ii][Qq][Uu][Ee]1052 # 'matches' => :SYM_MATCHES, # [Mm][Aa][Tt][Cc][Hh][Ee][Ss]1053 # 'is_in' => :SYM_MATCHES, # [Ii][Ss][_][Ii][Nn]1054 # 'invariant' => :SYM_INVARIANT, # [Ii][Nn][Vv][Aa][Rr][Ii][Aa][Nn][Tt]1055 # 'infinity' => :SYM_INFINITY, # [Ii][Nn][Ff][Ii][Nn][Ii][Tt][Yy] -- -> SYM_INFINITY1056 # 'use_node' => :SYM_USE_NODE, # [Uu][Ss][Ee][_][Nn][Oo][Dd][Ee]1057 # 'use_archetype' => :SYM_ALLOW_ARCHETYPE, # [Uu][Ss][Ee][_][Aa][Rr][Cc][Hh][Ee][Tt][Yy][Pp][Ee]1058 # 'allow_archetype' => :SYM_ALLOW_ARCHETYPE, # [Aa][Ll][Ll][Oo][Ww][_][Aa][Rr][Cc][Hh][Ee][Tt][Yy][Pp][Ee]1059 # 'include' => :SYM_INCLUDE, # [Ii][Nn][Cc][Ll][Uu][Dd][Ee]1060 # 'exclude' => :SYM_EXCLUDE # [Ee][Xx][Cc][Ll][Uu][Dd][Ee]1061 # }1062 1063 # #V_ISO8601_DATE_TIME_CONSTRAINT_PATTERN, /\A[yY][yY][yY][yY]-[mM?X][mM?X]-[dD?X][dD?X][T\t][hH?X][hH?X]:[mM?X][mM?X]:[sS?X][sS?X]/1064 # class V_ISO8601_DATE_TIME_CONSTRAINT_PATTERN1065 # include Yaparc::Parsable1066 # def initialize1067 # @parser = lambda do |input|1068 # Yaparc::Apply.new(Yaparc::Regex.new(/\A[yY][yY][yY][yY]-[mM?X][mM?X]-[dD?X][dD?X][T\t][hH?X][hH?X]:[mM?X][mM?X]:[sS?X][sS?X]/)) do |match|1069 # OpenEhr::LOG.info("V_ISO8601_DATE_TIME_CONSTRAINT_PATTERN: #{match}")1070 # [:V_ISO8601_DATE_TIME_CONSTRAINT_PATTERN, match]1071 # end1072 # end1073 # end1074 # end1075 1076 # #V_ISO8601_DATE_CONSTRAINT_PATTERN /\A[yY][yY][yY][yY]-[mM?X][mM?X]-[dD?X][dD?X]/1077 # class V_ISO8601_DATE_CONSTRAINT_PATTERN1078 # include Yaparc::Parsable1079 # def initialize1080 # @parser = lambda do |input|1081 # Yaparc::Apply.new(Yaparc::Regex.new(/\A[yY][yY][yY][yY]-[mM?X][mM?X]-[dD?X][dD?X]/)) do |match|1082 # OpenEhr::LOG.info("V_ISO8601_DATE_CONSTRAINT_PATTERN: #{match}")1083 # [:V_ISO8601_DATE_CONSTRAINT_PATTERN, match]1084 # end1085 # end1086 # end1087 # end1088 1089 # #V_ISO8601_TIME_CONSTRAINT_PATTERN /\A[hH][hH]:[mM?X][mM?X]:[sS?X][sS?X]/1090 # class V_ISO8601_TIME_CONSTRAINT_PATTERN1091 # include Yaparc::Parsable1092 # def initialize1093 # @parser = lambda do |input|1094 # Yaparc::Apply.new(Yaparc::Regex.new(/\A[hH][hH]:[mM?X][mM?X]:[sS?X][sS?X]/)) do |match|1095 # OpenEhr::LOG.info("V_ISO8601_TIME_CONSTRAINT_PATTERN: #{match}")1096 # [:V_ISO8601_TIME_CONSTRAINT_PATTERN, match]1097 # end1098 # end1099 # end1100 # end1101 1102 # #V_ISO8601_DURATION_CONSTRAINT_PATTERN1103 # class V_ISO8601_DURATION_CONSTRAINT_PATTERN1104 # include Yaparc::Parsable1105 # def initialize1106 # @parser = lambda do |input|1107 # Yaparc::Apply.new(Yaparc::Alt.new(Yaparc::Regex.new(/\AP[yY]?[mM]?[wW]?[dD]?T[hH]?[mM]?[sS]?/),1108 # Yaparc::Regex.new(/\AP[yY]?[mM]?[wW]?[dD]?/))) do |match|1109 # OpenEhr::LOG.info("V_ISO8601_DURATION_CONSTRAINT_PATTERN: #{match}")1110 # [:V_ISO8601_DURATION_CONSTRAINT_PATTERN, match]1111 # end1112 # end1113 # end1114 # end1115 1116 # #V_C_DOMAIN_TYPE /\A[A-Z][a-zA-Z0-9_]*[ \n]*\</1117 # class V_C_DOMAIN_TYPE1118 # include Yaparc::Parsable1119 # def initialize1120 # @parser = lambda do |input|1121 # Yaparc::Apply.new(Yaparc::Regex.new(/\A[A-Z][a-zA-Z0-9_]*[ \n]*\</)) do |match|1122 # OpenEhr::LOG.info("V_C_DOMAIN_TYPE: #{match}")1123 # [:START_V_C_DOMAIN_TYPE_BLOCK, match]1124 # end1125 # end1126 # end1127 # end1128 1129 # #1130 # # CADL::RootScanner1131 # #1132 # class RootScanner1133 # include Yaparc::Parsable1134 # def initialize1135 # @parser = lambda do |input|1136 # Yaparc::Alt.new(V_ISO8601_DATE_TIME_CONSTRAINT_PATTERN.new,1137 # V_ISO8601_DATE_CONSTRAINT_PATTERN.new,1138 # V_ISO8601_TIME_CONSTRAINT_PATTERN.new,1139 # OpenEhr::ADL::Scanner::Common::V_ISO8601_DURATION.new,1140 # V_C_DOMAIN_TYPE.new,1141 # V_ISO8601_DURATION_CONSTRAINT_PATTERN.new,1142 # Reserved.new,1143 # OpenEhr::ADL::Scanner::Common::V_QUALIFIED_TERM_CODE_REF.new,1144 # OpenEhr::ADL::Scanner::Common::V_LOCAL_TERM_CODE_REF.new,1145 # OpenEhr::ADL::Scanner::Common::ERR_V_QUALIFIED_TERM_CODE_REF.new,1146 # OpenEhr::ADL::Scanner::Common::V_TYPE_IDENTIFIER.new,1147 # OpenEhr::ADL::Scanner::Common::V_GENERIC_TYPE_IDENTIFIER.new,1148 # OpenEhr::ADL::Scanner::Common::V_STRING.new,1149 # OpenEhr::ADL::Scanner::Common::V_LOCAL_CODE.new,1150 # OpenEhr::ADL::Scanner::Common::V_REAL.new,1151 # OpenEhr::ADL::Scanner::Common::V_ISO8601_DURATION.new#,1152 # #OpenEhr::ADL::Scanner::Common::START_TERM_CODE_CONSTRAINT.new1153 # )1154 # end1155 # end1156 # end1157 1158 # # <CADL::Reserved class>1159 # class Reserved1160 # include Yaparc::Parsable1161 1162 # def initialize1163 # @parser = lambda do |input|1164 # orderd_reserved = RESERVED.keys.sort{|x,y| y.length <=> x.length }1165 # reserved_parsers = orderd_reserved.map do |keyword|1166 # Yaparc::Literal.new(keyword,false)1167 # end1168 # Yaparc::Alt.new(Yaparc::Apply.new(Yaparc::Alt.new(*reserved_parsers)) do |match|1169 # OpenEhr::LOG.info("Reserved: #{match}")1170 # [OpenEhr::ADL::Scanner::CADL::RESERVED[match], OpenEhr::ADL::Scanner::CADL::RESERVED[match]]1171 # end,1172 # Yaparc::Apply.new(Yaparc::Regex.new(/\A[a-z][a-zA-Z0-9_]*/)) do |match|1173 # OpenEhr::LOG.info("V_ATTRIBUTE_IDENTIFIER: #{match}")1174 # [:V_ATTRIBUTE_IDENTIFIER, match]1175 # end)1176 # end1177 # end1178 # end1179 1180 # end1181 1182 -
ruby/trunk/lib/adl_parser/lib/parser.rb
r321 r323 27 27 class Parser < Racc::Parser 28 28 29 module_eval(<<'...end parser.y/module_eval...', 'parser.y', 131 7)29 module_eval(<<'...end parser.y/module_eval...', 'parser.y', 1318) 30 30 31 31 def assert_at(file,line, message = "") … … 43 43 end 44 44 45 46 ###----------/* keywords */ ---------------------------------------------47 ### @@adl_reserved = {48 ### 'archetype' => :SYM_ARCHETYPE,49 ### 'adl_version' => :SYM_ADL_VERSION,50 ### 'controlled' => :SYM_IS_CONTROLLED,51 ### 'specialize' => :SYM_SPECIALIZE,52 ### 'concept' => :SYM_CONCEPT,53 ### 'language' => :SYM_LANGUAGE,54 ### 'description' => :SYM_DESCRIPTION,55 ### 'definition' => :SYM_DEFINITION,56 ### 'invariant' => :SYM_INVARIANT,57 ### 'ontology' => :SYM_ONTOLOGY,58 ### 'matches' => :SYM_MATCHES,59 ### 'is_in' => :SYM_MATCHES,60 ### 'occurrences' => :SYM_OCCURRENCES,61 ### 'true' => :SYM_TRUE, #[Tt][Rr][Uu][Ee] -- -> SYM_TRUE62 ### 'false' => :SYM_FALSE, # [Ff][Aa][Ll][Ss][Ee] -- -> SYM_FALSE63 ### 'infinity' => :SYM_INFINITY # [Ii][Nn][Ff][Ii][Nn][Ii][Tt][Yy] -- -> SYM_INFINITY64 ### }65 66 ### @@dadl_reserved = {67 ### 'true' => :SYM_TRUE, #[Tt][Rr][Uu][Ee] -- -> SYM_TRUE68 ### 'false' => :SYM_FALSE, # [Ff][Aa][Ll][Ss][Ee] -- -> SYM_FALSE69 ### 'infinity' => :SYM_INFINITY # [Ii][Nn][Ff][Ii][Nn][Ii][Tt][Yy] -- -> SYM_INFINITY70 ### }71 72 ### @@cadl_reserved = {73 ### 'then' => :SYM_THEN, # [Tt][Hh][Ee][Nn]74 ### 'else' => :SYM_ELSE, # [Ee][Ll][Ss][Ee]75 ### 'and' => :SYM_AND, # [Aa][Nn][Dd]76 ### 'or' => :SYM_OR, # [Oo][Rr]77 ### 'xor' => :SYM_XOR, # [Xx][Oo][Rr]78 ### 'not' => :SYM_NOT, # [Nn][Oo][Tt]79 ### 'implies' => :SYM_IMPLIES, # [Ii][Mm][Pp][Ll][Ii][Ee][Ss]80 ### 'true' => :SYM_TRUE, #[Tt][Rr][Uu][Ee] -- -> SYM_TRUE81 ### 'false' => :SYM_FALSE, # [Ff][Aa][Ll][Ss][Ee] -- -> SYM_FALSE82 ### 'forall' => :SYM_FORALL, # [Ff][Oo][Rr][_][Aa][Ll][Ll]83 ### 'exists' => :SYM_EXISTS, # [Ee][Xx][Ii][Ss][Tt][Ss]84 ### 'existence' => :SYM_EXISTENCE, # [Ee][Xx][Iu][Ss][Tt][Ee][Nn][Cc][Ee]85 ### 'occurrences' => :SYM_OCCURRENCES, # [Oo][Cc][Cc][Uu][Rr][Rr][Ee][Nn][Cc][Ee][Ss]86 ### 'cardinality' => :SYM_CARDINALITY, # [Cc][Aa][Rr][Dd][Ii][Nn][Aa][Ll][Ii][Tt][Yy]87 ### 'ordered' => :SYM_ORDERED, # [Oo][Rr][Dd][Ee][Rr][Ee][Dd]88 ### 'unordered' => :SYM_UNORDERED, # [Uu][Nn][Oo][Rr][Dd][Ee][Rr][Ee][Dd]89 ### 'unique' => :SYM_UNIQUE, # [Uu][Nn][Ii][Qq][Uu][Ee]90 ### 'matches' => :SYM_MATCHES, # [Mm][Aa][Tt][Cc][Hh][Ee][Ss]91 ### 'is_in' => :SYM_MATCHES, # [Ii][Ss][_][Ii][Nn]92 ### 'invariant' => :SYM_INVARIANT, # [Ii][Nn][Vv][Aa][Rr][Ii][Aa][Nn][Tt]93 ### 'infinity' => :SYM_INFINITY, # [Ii][Nn][Ff][Ii][Nn][Ii][Tt][Yy] -- -> SYM_INFINITY94 ### 'use_node' => :SYM_USE_NODE, # [Uu][Ss][Ee][_][Nn][Oo][Dd][Ee]95 ### 'use_archetype' => :SYM_ALLOW_ARCHETYPE, # [Uu][Ss][Ee][_][Aa][Rr][Cc][Hh][Ee][Tt][Yy][Pp][Ee]96 ### 'allow_archetype' => :SYM_ALLOW_ARCHETYPE, # [Aa][Ll][Ll][Oo][Ww][_][Aa][Rr][Cc][Hh][Ee][Tt][Yy][Pp][Ee]97 ### 'include' => :SYM_INCLUDE, # [Ii][Nn][Cc][Ll][Uu][Dd][Ee]98 ### 'exclude' => :SYM_EXCLUDE # [Ee][Xx][Cc][Ll][Uu][Dd][Ee]99 ### }100 45 101 46 … … 152 97 153 98 racc_action_table = [ 154 5 14, 493, 133, 466, 164, 588, 464, 460, 129, 462,155 57, 374, 228, 327, 475, 10, 568, 169, 170, 167,156 168, 433, 29, 109, 511, 183, 108, 508, 524, 415,157 509, 510, 71, 431, 66, 12, 537, 512, 49, 515,158 517, 314, 569, 59, 491, 229, 95, 98, 567, 134,159 30, 46, 47, 309, 49, 571, 78, 81, 84, 187,99 569, 433, 472, 466, 10, 588, 464, 460, 228, 462, 100 129, 477, 568, 571, 475, 212, 1, 374, 333, 57, 101 29, 493, 330, 388, 12, 380, 381, 431, 524, 93, 102 114, 183, 71, 112, 478, 5, 537, 512, 213, 515, 103 517, 229, 514, 511, 567, 59, 508, 49, 30, 509, 104 510, 46, 47, 309, 491, 127, 78, 81, 84, 187, 160 105 117, 93, 295, 301, 75, 109, 112, 114, 117, 532, 161 106 524, 117, 109, 114, 71, 112, 123, 124, 537, 512, 162 117, 515, 517, 117, 101, 109, 307, 270, 271, 534,163 161, 114, 283, 46, 47, 309, 71, 230, 78, 81,164 84, 187, 11 4, 93, 295, 301, 99, 109, 112, 114,165 117, 532, 1 52, 66, 373, 46, 47, 101, 477, 142,166 78, 81, 84, 429, 117, 93, 95, 98, 307, 270,167 271, 534, 489, 49, 283, 88, 91, 152, 487, 139,168 152, 478, 76, 156, 157, 152, 217, 148, 155, 472,169 151, 153, 152, 78, 81, 84, 236, 158, 93, 95,170 98, 114, 159, 152, 143, 150, 456, 152, 88, 91,171 15 6, 157, 458, 155, 148, 76, 155, 151, 153, 152,172 1 12, 155, 78, 81, 84, 147, 149, 93, 155, 112,173 150, 152, 594, 150, 109, 236, 183, 577, 150, 155,174 166, 330, 127, 155, 76, 150, 576, 447, 154, 565,175 147, 149, 112, 147, 149, 155, 150, -373, 147, 149,176 150, 217, 78, 376, 377, 147, 149, 155, 448, 380,177 381, 217, 150, 93, 371, 154, 147, 149, 112, 258,178 147, 149, 250, 212, 150, 254, 255, 117, 78, 376,179 377, 35, 147, 149, 78, 376, 377, 78, 81, 84,180 46, 47, 93, 101, 147, 149, 213, 78, 81, 84,181 2 65, 109, 93, 144, 126, 564, 380, 381, 145, 76,182 9 3, 101, 237, 49, 20, 139, 78, 81, 84, 76,183 217, 93, 46, 47, 495, 109, 112, 114, 117, 78,184 8 1, 84, 21, 99, 93, 95, 98, 16, 101,17,185 1, 324, 46, 47, 88, 91, 217, 78, 81, 84,186 126, 76, 93, 95, 98, 319, 78, 81, 84, 5,187 139, 93, 88, 91, 217, 169, 170, 167, 168, 76,188 217, 78, 376, 377, 78, 81, 84, 217, 76, 93,189 9 5, 98, 78, 81, 84, 209, 333, 93, 217, 88,190 9 1, 496, 171, 380, 381, 35, 76, 93, 114, 310,191 78, 81, 84, 102, 76, 93, 78, 81, 84, -374,192 390, 93, 101, 78, 81, 84, 380, 381, 93, 16,193 93, 17, 76, 54, 78, 81, 84, 49, 76, 93,194 101, 424, 425, 35, 139, 76, 46, 47, 391, 380,195 381, 39, 392, 93, 46, 47, 76, 393, 78, 81,196 84, 35, 99, 93, 95, 98, 380, 381, 101, 394,197 93, 46, 47, 88, 91, 49, 78, 81, 84, 411,198 76, 93, 95, 98, 46, 47, 101, 416, 417, 102,199 99, 88, 91, 49, 78, 376, 377, 395, 76, 46,200 47, 396, 46, 47, 78, 81, 84, 397, 99, 93,201 95, 98, 398, 373, 101, 470, 399, 46, 47, 88,202 91, 400, 78, 81, 84, 262, 76, 93, 95, 98,203 46, 47, 101, 386, 322, 385, 99, 88, 91, 401,204 217, 123, 124, 402, 76, 46, 47, 411, 422, 423,205 78, 81, 84, 264, 139, 93, 95, 98, 101, 614,206 615, 616, 410, 376, 377, 88, 91, 265, 78, 81,207 84, 411, 76, 93, 95, 98, 78, 81, 84, 268,208 139, 93, 101, 88, 91, 266, 410, 376, 377, 403,209 76, 217, 418, 419, 78, 81, 84, 404, 76, 93,210 9 5, 98, 420, 421, 139, 217, 78, 376, 377, 88,211 91, 388, 405, 380, 381, 316, 76, 93, 78, 81,212 84, 426, 427, 93, 95, 98, 408, 78, 81, 84,213 46, 47, 93, 88, 91, 169, 170, 167, 168, 269,214 76, 78, 81, 84, 335, 336, 93, 309, 268, 76,215 78, 81, 84, 187, 267, 93, 295, 301, 266, 109,216 112, 114, 117, 76, 78, 81, 84, 314, 316, 93,217 78, 376, 377, 109, 112, 114, 117, 78, 376, 377,218 307, 270, 271, -104, 343, 344, 283, 202, 345, 346,219 78, 81, 84, 187, 265, 93, 123, 124, 126, 109,220 112, 114, 117, 183, 120, 127, 347, 348, 78, 81,221 84, 25, 26, 93, 123, 124, 126, 109, 112, 114,222 117, 264, 120, 78, 81, 84, 596, 597, 93, 78,223 376, 377, 109, 112, 114, 117, 78, 81, 84, 361,224 362, 93, 363, 364, 263, 109, 112, 114, 117, 78,225 81, 84, 123, 124, 93, 624, 625, 262, 109, 112,226 114, 117, 383, 78, 376, 377, 169, 170, 167, 168,227 169, 170, 167, 168, 169, 170, 167, 168, 169, 170,228 167, 168, 261, 260, 259, 248, 434, 435, 436, 437,229 438, 439, 440, 441, 442, 443, 444, 445, 247, 246,107 117, 515, 517, 314, 101, 114, 307, 270, 271, 534, 108 161, 458, 283, 46, 47, 309, 71, 230, 78, 81, 109 84, 187, 117, 93, 295, 301, 99, 109, 112, 114, 110 117, 532, 114, 565, 448, 46, 47, 101, 158, 373, 111 78, 81, 84, 159, 429, 93, 95, 98, 307, 270, 112 271, 534, 594, 20, 283, 88, 91, 156, 157, 139, 113 415, 148, 76, 456, 152, 153, 142, 489, 380, 381, 114 236, 21, 93, 78, 81, 84, 217, 117, 93, 95, 115 98, 487, 380, 381, 46, 47, 93, 164, 88, 91, 116 155, 258, 156, 157, 250, 76, 148, 254, 255, 152, 117 153, 112, 373, 102, 470, 114, 150, 151, 78, 376, 118 377, 143, 78, 81, 84, 217, 109, 93, 495, 78, 119 376, 377, 154, 217, 112, 155, 39, 147, 149, 95, 120 98, 183, 133, 101, 76, 112, 35, 109, 78, 81, 121 84, 150, 151, 93, 46, 47, 109, 109, 112, 114, 122 117, 78, 81, 84, 496, 139, 93, 154, 101, 78, 123 81, 84, 147, 149, 93, 78, 376, 377, 49, 78, 124 81, 84, 66, 76, 93, 95, 98, 46, 47, 134, 125 139, 76, 101, 327, 88, 91, 126, 16, 447, 17, 126 217, 76, 49, 109, 78, 81, 84, 319, 371, 93, 127 95, 98, 380, 381, 99, 217, 93, 209, 310, 88, 128 91, 117, 324, 46, 47, 217, 76, 35, 78, 81, 129 84, 126, 108, 93, 95, 98, 78, 81, 84, 217, 130 66, 93, 390, 88, 91, 78, 376, 377, 101, 391, 131 76, 78, 81, 84, 102, 166, 93, 171, 76, 49, 132 49, 78, 81, 84, 392, 386, 93, 385, 46, 47, 133 139, 101, -373, 76, -374, 78, 81, 84, 577, 217, 134 93, 393, 54, 76, 78, 81, 84, 576, 394, 93, 135 95, 98, 35, 99, 217, 46, 47, 76, 395, 88, 136 91, 396, 46, 47, 217, 265, 76, 78, 81, 84, 137 564, 397, 93, 95, 98, 78, 81, 84, 217, 35, 138 93, 144, 88, 91, 49, 398, 145, 101, 399, 76, 139 78, 81, 84, 46, 47, 93, 16, 76, 17, 322, 140 78, 81, 84, 400, 237, 93, 123, 124, 262, 139, 141 101, 49, 76, 401, 78, 81, 84, 418, 419, 93, 142 46, 47, 76, 78, 81, 84, 46, 47, 93, 95, 143 98, 402, 99, 101, 416, 417, 76, 264, 88, 91, 144 265, 46, 47, 25, 26, 76, 78, 81, 84, 268, 145 155, 93, 95, 98, 266, 99, 101, 169, 170, 167, 146 168, 88, 91, 403, 46, 47, 150, 151, 76, 78, 147 81, 84, 314, 316, 93, 95, 98, 404, 139, 101, 148 420, 421, 380, 381, 88, 91, 93, 147, 149, 155, 149 405, 76, 78, 81, 84, 422, 423, 93, 95, 98, 150 316, 99, 101, 335, 336, 150, 151, 88, 91, 408, 151 46, 47, 236, 269, 76, 78, 81, 84, 155, 268, 152 93, 95, 98, 267, 139, 217, 147, 149, 424, 425, 153 88, 91, 155, 266, 150, 151, 265, 76, 78, 81, 154 84, 343, 344, 93, 95, 98, 380, 381, 150, 151, 155 93, 155, 264, 88, 91, 147, 149, 155, 345, 346, 156 76, 78, 81, 84, 347, 348, 93, 150, 151, 147, 157 149, 263, 309, 150, 151, 78, 81, 84, 187, 262, 158 93, 295, 301, 76, 109, 112, 114, 117, 147, 149, 159 596, 597, 155, 261, 147, 149, 260, 411, 380, 381, 160 411, 259, 93, 411, 248, 307, 270, 271, 150, 151, 161 434, 283, 410, 376, 377, 78, 376, 377, 410, 376, 162 377, 614, 615, 616, -104, 78, 376, 377, 202, 147, 163 149, 78, 81, 84, 187, 435, 93, 123, 124, 126, 164 109, 112, 114, 117, 183, 120, 127, 123, 124, 78, 165 81, 84, 361, 362, 93, 123, 124, 126, 109, 112, 166 114, 117, 436, 120, 78, 81, 84, 363, 364, 93, 167 78, 376, 377, 109, 112, 114, 117, 78, 81, 84, 168 426, 427, 93, 78, 376, 377, 109, 112, 114, 117, 169 78, 81, 84, 624, 625, 93, 78, 376, 377, 109, 170 112, 114, 117, 78, 81, 84, 437, 438, 93, 439, 171 440, 441, 109, 112, 114, 117, 169, 170, 167, 168, 172 169, 170, 167, 168, 169, 170, 167, 168, 383, 78, 173 376, 377, 169, 170, 167, 168, 169, 170, 167, 168, 174 169, 170, 167, 168, 442, 443, 444, 445, 247, 246, 230 175 450, 451, 452, 453, 454, 455, 144, 158, 145, 159, 231 176 245, 244, 243, 242, 241, 240, 468, 239, 471, 238, … … 243 188 244 189 racc_action_check = [ 245 477, 423, 68, 396, 91, 563, 395, 393, 60, 394,246 40, 261, 161, 243, 401, 5, 525, 234, 234, 234,247 234, 348, 23, 243, 468, 261, 58, 468, 477, 336,248 468, 468, 477, 346, 58, 5, 477, 477, 40, 477,249 477, 477, 529, 60, 421, 161, 91, 91, 525,68,250 23, 477, 477, 477, 58, 529, 477, 477, 477, 477,251 423, 477, 477, 477, 53, 477, 477, 477, 477, 477,252 529, 396, 393, 395, 529, 394, 401, 401, 529, 529,253 348, 529, 529, 468, 53, 336, 477, 477, 477, 477,254 563, 3 46, 477, 529, 529, 529, 53, 165, 529, 529,255 529, 529, 421, 529, 529, 529, 53, 529, 529, 529,256 529, 529, 226, 48, 260, 53, 53, 165, 404, 80,257 53, 53, 53, 344, 246, 53, 53, 53, 529, 529,258 529, 529, 419, 48, 529, 53, 53, 227, 417, 165,259 172, 404, 53, 172, 172, 224, 149, 172, 226, 400,260 172, 172, 223, 165, 165, 165, 172, 84, 165, 165,261 165, 244, 84, 218, 80, 226, 390, 83, 165, 165,262 83, 83, 392, 227, 83, 165, 172, 83, 83, 318,263 344, 224, 149, 149, 149, 226, 226, 149, 223, 419,264 227, 221, 568, 172, 417, 318, 263, 539, 224, 218,265 94, 245, 400, 83, 149, 223, 539, 362, 172, 517,266 227, 227, 245, 172, 172, 318, 218, 94, 224, 224,267 83, 153, 390, 390, 390, 223, 223, 221, 364, 392,268 392, 152, 318, 392, 259, 83, 218, 218, 242, 187,269 83, 83, 187, 142, 221, 187, 187, 259, 568, 568,270 568, 512, 318, 318, 362, 362, 362, 153, 153, 153,271 517, 517, 153, 170, 221, 221, 142, 152, 152, 152,272 516, 240, 152, 81, 238, 516, 364, 364, 81, 153,273 364, 611, 173, 512, 13, 170, 187, 187, 187, 152,274 1 51, 187, 512, 512, 425, 187, 187, 187, 187, 170,275 170, 170, 13, 611, 170, 170, 170, 26, 168, 26,276 0, 241, 611, 611, 170, 170, 150, 611, 611, 611,277 241, 170, 611, 611, 611, 229, 151, 151, 151, 0,278 168, 151, 611, 611, 156, 173, 173, 173, 173, 611,279 1 57, 425, 425, 425, 168, 168, 168, 148, 151, 168,280 1 68, 168, 150, 150, 150, 135, 247, 150, 147, 168,281 16 8, 427, 99, 496, 496, 135, 168, 496, 247, 213,282 1 56, 156, 156, 56, 150, 156, 157, 157, 157, 99,283 272, 157, 164, 148, 148, 148, 264, 264, 148,12,284 264, 12, 156, 34, 147, 147, 147, 135, 157, 147,285 612, 341, 341, 34, 164, 148, 135, 135, 273, 427,286 427, 28, 275, 427, 56, 56, 147, 278, 164, 164,287 164, 28, 612, 164, 164, 164, 448, 448, 79, 281,288 448, 612, 612, 164, 164, 34, 612, 612, 612, 482,289 1 64, 612, 612, 612, 34, 34, 605, 337, 337, 131,290 79, 612, 612, 28, 482, 482, 482, 285, 612, 79,291 79, 288, 28, 28, 79, 79, 79, 291, 605, 79,292 79, 79, 293, 398, 617, 398, 295, 605, 605, 79,293 79, 296, 605, 605, 605, 298, 79, 605, 605, 605,294 131, 131, 169, 266, 239, 266, 617, 605, 605, 300,295 217, 239, 239, 301, 605, 617, 617, 319, 340, 340,296 617, 617, 617, 303, 169, 617, 617, 617, 167, 609,297 60 9, 609, 319, 319, 319, 617, 617, 304, 169, 169,298 169, 578, 617, 169, 169, 169, 217, 217, 217, 308,299 167, 217, 101, 169, 169, 309, 578, 578, 578, 310,300 16 9, 155, 338, 338, 167, 167, 167, 311, 217, 167,301 167, 167, 339, 339, 101, 154, 495, 495, 495, 167,302 167, 268, 312, 268, 268, 315, 167, 268, 101, 101,303 101, 342, 342, 101, 101, 101, 316, 155, 155, 155,304 515, 515, 155, 101, 101, 235, 235, 235, 235, 211,305 101, 154, 154, 154, 249, 249, 154, 212, 205, 155,306 212, 212, 212, 212, 204, 212, 212, 212, 202, 212,307 212, 212, 212, 154, 258, 258, 258, 215, 215, 258,308 447, 447, 447, 258, 258, 258, 258, 262, 262, 262,309 2 12, 212, 212, 102, 251, 251, 212, 102, 252, 252,310 102, 102, 102, 102, 201, 102, 102, 102, 102, 102,311 102, 102, 102, 102, 102, 59, 253, 253, 59, 59,312 59, 18, 18, 59, 59, 59, 59, 59, 59, 59,313 59, 200, 59, 254, 254, 254, 572, 572, 254, 567,314 567, 567, 254, 254, 254, 254, 250, 250, 250, 256,315 25 6, 250, 257, 257, 198, 250, 250, 250, 250, 255,316 255, 255, 2 67, 267, 255, 621, 621, 197, 255, 255,317 255, 255, 265, 265, 265, 265, 96, 96, 96, 96,318 23 3, 233, 233, 233, 232, 232, 232, 232, 231, 231,319 2 31, 231, 195, 194, 189, 186, 349, 350, 351, 352,320 353, 354, 355, 356, 357, 358, 359, 360, 185, 184,190 529, 348, 400, 396, 5, 563, 395, 393, 161, 394, 191 60, 404, 525, 529, 401, 142, 0, 261, 247, 40, 192 23, 423, 245, 268, 5, 268, 268, 346, 529, 268, 193 247, 261, 529, 245, 404, 0, 529, 529, 142, 529, 194 529, 161, 477, 468, 525, 60, 468, 40, 23, 468, 195 468, 529, 529, 529, 421, 400, 529, 529, 529, 529, 196 348, 529, 529, 529, 53, 529, 529, 529, 529, 529, 197 477, 396, 393, 395, 477, 394, 401, 401, 477, 477, 198 423, 477, 477, 477, 53, 346, 529, 529, 529, 529, 199 563, 392, 529, 477, 477, 477, 53, 165, 477, 477, 200 477, 477, 468, 477, 477, 477, 53, 477, 477, 477, 201 477, 477, 421, 517, 364, 53, 53, 165, 84, 260, 202 53, 53, 53, 84, 344, 53, 53, 53, 477, 477, 203 477, 477, 568, 13, 477, 53, 53, 172, 172, 165, 204 336, 172, 53, 390, 172, 172, 80, 419, 392, 392, 205 172, 13, 392, 165, 165, 165, 148, 246, 165, 165, 206 165, 417, 364, 364, 517, 517, 364, 91, 165, 165, 207 172, 187, 83, 83, 187, 165, 83, 187, 187, 83, 208 83, 344, 398, 56, 398, 244, 172, 172, 568, 568, 209 568, 80, 148, 148, 148, 153, 336, 148, 425, 390, 210 390, 390, 172, 152, 419, 83, 28, 172, 172, 91, 211 91, 263, 68, 168, 148, 242, 28, 417, 187, 187, 212 187, 83, 83, 187, 56, 56, 240, 187, 187, 187, 213 187, 153, 153, 153, 427, 168, 153, 83, 170, 152, 214 152, 152, 83, 83, 152, 425, 425, 425, 28, 168, 215 168, 168, 48, 153, 168, 168, 168, 28, 28, 68, 216 170, 152, 611, 243, 168, 168, 238, 12, 362, 12, 217 150, 168, 48, 243, 170, 170, 170, 229, 259, 170, 218 170, 170, 427, 427, 611, 149, 427, 135, 213, 170, 219 170, 259, 241, 611, 611, 154, 170, 135, 611, 611, 220 611, 241, 58, 611, 611, 611, 150, 150, 150, 147, 221 58, 150, 272, 611, 611, 362, 362, 362, 169, 273, 222 611, 149, 149, 149, 131, 94, 149, 99, 150, 135, 223 58, 154, 154, 154, 275, 266, 154, 266, 135, 135, 224 169, 612, 94, 149, 99, 147, 147, 147, 539, 155, 225 147, 278, 34, 154, 169, 169, 169, 539, 281, 169, 226 169, 169, 34, 612, 217, 131, 131, 147, 285, 169, 227 169, 288, 612, 612, 156, 516, 169, 612, 612, 612, 228 516, 291, 612, 612, 612, 155, 155, 155, 157, 512, 229 155, 81, 612, 612, 34, 293, 81, 101, 295, 612, 230 217, 217, 217, 34, 34, 217, 26, 155, 26, 239, 231 156, 156, 156, 296, 173, 156, 239, 239, 298, 101, 232 617, 512, 217, 300, 157, 157, 157, 338, 338, 157, 233 512, 512, 156, 101, 101, 101, 515, 515, 101, 101, 234 101, 301, 617, 79, 337, 337, 157, 303, 101, 101, 235 304, 617, 617, 18, 18, 101, 617, 617, 617, 308, 236 218, 617, 617, 617, 309, 79, 164, 173, 173, 173, 237 173, 617, 617, 310, 79, 79, 218, 218, 617, 79, 238 79, 79, 215, 215, 79, 79, 79, 311, 164, 605, 239 339, 339, 496, 496, 79, 79, 496, 218, 218, 223, 240 312, 79, 164, 164, 164, 340, 340, 164, 164, 164, 241 315, 605, 167, 249, 249, 223, 223, 164, 164, 316, 242 605, 605, 318, 211, 164, 605, 605, 605, 222, 205, 243 605, 605, 605, 204, 167, 151, 223, 223, 341, 341, 244 605, 605, 318, 202, 222, 222, 201, 605, 167, 167, 245 167, 251, 251, 167, 167, 167, 448, 448, 318, 318, 246 448, 226, 200, 167, 167, 222, 222, 227, 252, 252, 247 167, 151, 151, 151, 253, 253, 151, 226, 226, 318, 248 318, 198, 212, 227, 227, 212, 212, 212, 212, 197, 249 212, 212, 212, 151, 212, 212, 212, 212, 226, 226, 250 572, 572, 224, 195, 227, 227, 194, 578, 264, 264, 251 482, 189, 264, 319, 186, 212, 212, 212, 224, 224, 252 349, 212, 578, 578, 578, 482, 482, 482, 319, 319, 253 319, 609, 609, 609, 102, 495, 495, 495, 102, 224, 254 224, 102, 102, 102, 102, 350, 102, 102, 102, 102, 255 102, 102, 102, 102, 102, 102, 59, 267, 267, 59, 256 59, 59, 256, 256, 59, 59, 59, 59, 59, 59, 257 59, 59, 351, 59, 254, 254, 254, 257, 257, 254, 258 447, 447, 447, 254, 254, 254, 254, 250, 250, 250, 259 342, 342, 250, 262, 262, 262, 250, 250, 250, 250, 260 255, 255, 255, 621, 621, 255, 567, 567, 567, 255, 261 255, 255, 255, 258, 258, 258, 352, 353, 258, 354, 262 355, 356, 258, 258, 258, 258, 96, 96, 96, 96, 263 235, 235, 235, 235, 234, 234, 234, 234, 265, 265, 264 265, 265, 231, 231, 231, 231, 232, 232, 232, 232, 265 233, 233, 233, 233, 357, 358, 359, 360, 185, 184, 321 266 365, 366, 367, 368, 369, 370, 376, 377, 380, 381, 322 267 182, 181, 180, 179, 178, 177, 397, 175, 399, 174, … … 334 279 335 280 racc_action_pointer = [ 336 309, nil, 862, 876, 857, 14, 847, nil, 872, nil,337 nil, nil, 365, 283, 834, nil, 851, nil, 649, nil,338 nil, nil, 828, 21, 832, nil, 283, 823, 410, nil,339 nil, nil, nil, 812, 3 92, 791, nil, nil, 832, nil,340 -5, nil, nil, nil, 789, 826, nil, nil, 90, 835,341 nil, nil, 788, 63, nil, nil, 362, nil, 11, 611,342 - 7, nil, 825, nil, nil, nil, 779, nil,1, 772,343 nil, 776, nil, nil, nil, nil, 763, nil, nil, 4 07,344 85, 216, 771, 161, 100, nil, 717, nil, 723, nil,345 nil, -17, 748, nil, 171, nil, 651, nil, nil, 333,346 nil, 521, 593, nil, nil, nil, 782, nil, nil, nil,281 15, nil, 862, 876, 857, 3, 847, nil, 872, nil, 282 nil, nil, 243, 132, 834, nil, 851, nil, 431, nil, 283 nil, nil, 828, 19, 832, nil, 382, 823, 205, nil, 284 nil, nil, nil, 812, 351, 791, nil, nil, 832, nil, 285 4, nil, nil, nil, 789, 826, nil, nil, 229, 835, 286 nil, nil, 788, 63, nil, nil, 172, nil, 287, 602, 287 -5, nil, 825, nil, nil, nil, 779, nil, 211, 772, 288 nil, 776, nil, nil, nil, nil, 763, nil, nil, 422, 289 112, 334, 771, 163, 61, nil, 717, nil, 723, nil, 290 nil, 146, 748, nil, 296, nil, 651, nil, nil, 298, 291 nil, 376, 584, nil, nil, nil, 782, nil, nil, nil, 347 292 nil, 741, nil, nil, nil, nil, nil, nil, nil, nil, 348 293 nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 349 nil, 438, nil, nil, nil, 354, nil, 756, 711, 760,350 nil, nil, 231, 739, nil, nil, 768, 337, 326, 125,351 2 95, 269, 210, 200, 544, 530, 313, 319, nil, nil,352 nil, 11, nil, nil, 361, 96, nil, 497, 287, 471,353 2 42, nil, 134, 260, 724, 722, nil, 720, 719, 718,354 717, 716, 715, nil, 704, 703, 730, 229, nil, 689,355 nil, nil, nil, nil, 688, 687, nil, 662, 649, nil,356 626, 599, 563, nil, 559, 553, nil, nil, nil, nil,357 nil, 563, 553, 333, nil, 585, nil, 479, 157, nil,358 nil, 185, nil, 146, 139, nil, 106, 131, nil, 313,359 nil, 66 3, 659, 655, -58, 520, nil, nil, 209, 438,360 205, 255, 171, -43, 93, 145, 55, 300, nil, 544,361 63 9, 584, 588, 606, 626, 652, 639, 642, 567, 178,362 6 0, -45, 580, 126, 328, 666, 439, 649, 515, nil,363 nil, nil, 357, 394, nil, 389, nil, nil, 394, nil,364 nil, 406, nil, nil, nil, 434, nil, nil, 438, nil,365 nil, 3 88, nil, 417, nil, 421, 458, nil, 430, nil,366 4 76, 448, nil, 458, 472, nil, nil, nil, 484, 490,367 535, 523, 558, nil, nil, 532, 505, nil, 173, 465,294 nil, 313, nil, nil, nil, 286, nil, 756, 711, 760, 295 nil, nil, 3, 739, nil, nil, 768, 288, 135, 264, 296 249, 514, 182, 174, 274, 328, 353, 367, nil, nil, 297 nil, 7, nil, nil, 445, 96, nil, 491, 192, 297, 298 217, nil, 128, 392, 724, 722, nil, 720, 719, 718, 299 717, 716, 715, nil, 704, 703, 599, 161, nil, 556, 300 nil, nil, nil, nil, 551, 548, nil, 534, 526, nil, 301 507, 491, 488, nil, 478, 474, nil, nil, nil, nil, 302 nil, 487, 528, 252, nil, 440, nil, 343, 418, nil, 303 nil, nil, 486, 457, 560, nil, 519, 525, nil, 265, 304 nil, 667, 671, 675, 659, 655, nil, nil, 201, 353, 305 160, 236, 148, 207, 117, -34, 88, -38, nil, 453, 306 630, 491, 508, 514, 617, 643, 602, 617, 656, 222, 307 65, -39, 636, 141, 550, 682, 281, 594, -33, nil, 308 nil, nil, 289, 305, nil, 311, nil, nil, 328, nil, 309 nil, 335, nil, nil, nil, 345, nil, nil, 348, nil, 310 nil, 302, nil, 340, nil, 343, 390, nil, 363, nil, 311 400, 386, nil, 392, 395, nil, nil, nil, 404, 409, 312 459, 453, 486, nil, nil, 467, 438, nil, 500, 571, 368 313 nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 369 nil, nil, nil, nil, nil, nil, 19, 387, 492, 502,370 44 8, 341, 521, nil, 113, nil, 23, nil, 11, 686,371 687, 688, 689, 690, 691, 692, 693, 694, 695, 696,372 697, nil, 197, nil, 218, 700, 701, 702, 703, 704,314 nil, nil, nil, nil, nil, nil, 130, 384, 367, 430, 315 445, 478, 630, nil, 114, nil, 17, nil, -9, 560, 316 585, 612, 656, 657, 659, 660, 661, 694, 695, 696, 317 697, nil, 258, nil, 104, 700, 701, 702, 703, 704, 373 318 705, nil, nil, nil, nil, nil, 709, 710, nil, nil, 374 319 706, 707, nil, nil, nil, nil, nil, nil, nil, nil, 375 1 65, nil, 171, 6, 8, 5, 2, 716, 419, 714,376 148, 13, 718, nil, 106, nil, nil, 701, 750, nil,377 724, nil, nil, 772, 727, 722, nil, 1 28, nil, 122,378 nil, 34, nil, -9, nil, 284, nil, 351, 735, 729,320 142, nil, 90, 6, 8, 5, 2, 716, 128, 714, 321 1, 13, 718, nil, -1, nil, nil, 701, 750, nil, 322 724, nil, nil, 772, 727, 722, nil, 151, nil, 137, 323 nil, 44, nil, 11, nil, 188, nil, 224, 735, 729, 379 324 737, 730, 739, 731, nil, nil, nil, nil, nil, nil, 380 nil, nil, nil, nil, nil, nil, 741, 573, 368, 744,325 nil, nil, nil, nil, nil, nil, 741, 623, 498, 744, 381 326 nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 382 nil, nil, nil, nil, nil, nil, nil, nil, 14, nil,383 nil, nil, nil, nil, nil, nil, nil, -1, 771, nil,384 774, 797, 397, nil, nil, 751, 752, 747, 754, 748,385 756, 749, 758, 750, 760, 5 09, 305, 763, nil, 764,327 nil, nil, nil, nil, nil, nil, nil, nil, 33, nil, 328 nil, nil, nil, nil, nil, nil, nil, 41, 771, nil, 329 774, 797, 568, nil, nil, 751, 752, 747, 754, 748, 330 756, 749, 758, 750, 760, 578, 434, 763, nil, 764, 386 331 nil, 765, nil, 766, nil, 767, 768, nil, 760, 761, 387 762, 763, 240, nil, 820, 538, 215, 208, 809, nil,388 nil, nil, nil, nil, nil, -7, nil, nil, nil, 41,389 nil, nil, nil, nil, 792, 808, nil, nil, 757, 183,332 762, 763, 378, nil, 820, 384, 320, 112, 809, nil, 333 nil, nil, nil, nil, nil, -11, nil, nil, nil, -1, 334 nil, nil, nil, nil, 792, 808, nil, nil, 757, 334, 390 335 833, 789, nil, nil, nil, 787, nil, 788, nil, 789, 391 336 nil, 790, nil, 791, 792, nil, nil, nil, nil, nil, 392 nil, 814, nil, 4, 785, nil, 827, 6 32, 191, nil,393 nil, nil, 5 95, nil, 848, nil, 807, nil, 489, 802,337 nil, 814, nil, 4, 785, nil, 827, 649, 131, nil, 338 nil, nil, 509, nil, 848, nil, 807, nil, 565, 802, 394 339 850, nil, nil, nil, nil, nil, nil, nil, nil, 786, 395 340 nil, nil, nil, 806, nil, nil, nil, nil, 823, 854, 396 855, 847, 814, nil, nil, 4 25, 828, nil, nil, 436,397 nil, 2 60, 379, 863, 855, 856, 857, 453, nil, 797,398 798, 6 32, nil, nil, nil, nil ]341 855, 847, 814, nil, nil, 468, 828, nil, nil, 548, 342 nil, 241, 320, 863, 855, 856, 857, 399, nil, 797, 343 798, 620, nil, nil, nil, nil ] 399 344 400 345 racc_action_default = [ … … 421 366 -134, -123, -149, -146, -135, -124, -115, -108, -107, -87, 422 367 -86, -376, -376, -376, -287, -376, -276, -376, -263, -277, 423 -27 4, -264, -273, -265, -260, -275, -261, -262, -307, -376,368 -273, -274, -264, -265, -260, -275, -261, -262, -307, -376, 424 369 -253, -251, -268, -269, -266, -267, -278, -270, -376, -376, 425 370 -376, -376, -376, -376, -376, -376, -376, -376, -116, -376, … … 466 411 79, 140, 125, 162, 45, 51, 160, 203, 128, 313, 467 412 45, 55, 110, 413, 473, 121, 195, 317, 107, 103, 468 520, 63, 111, 64, 65, 61, 19, 3, 407, 94,469 113, 119, 106, 172, 65, 173, 58, 529, 118, 273,470 32, 130, 132, 613, 216, 201, 219, 220, 606, 222,413 173, 63, 111, 65, 172, 19, 520, 61, 3, 94, 414 113, 119, 106, 65, 64, 407, 58, 529, 118, 32, 415 273, 132, 613, 130, 216, 201, 219, 220, 221, 606, 471 416 60, 205, 225, 315, 115, 175, 312, 479, 189, 206, 472 417 186, 190, 192, 74, 198, 176, 72, 18, 11, 2, 473 136, 69, 570, 178, 185, 52, 33, 194, 197, 200,474 2 18, 182, 63, 221, 64, 223, 224, 204, 226, 227,475 174, 177, 179, 107, 208, 181, 184, 180, 173, 231,476 1 88, 232, 233, 234, 235, 191, 193, 106, 196, 199,418 136, 218, 69, 178, 185, 222, 223, 224, 570, 226, 419 227, 182, 63, 173, 231, 52, 232, 233, 234, 235, 420 33, 194, 197, 107, 208, 64, 200, 180, 204, 174, 421 177, 179, 181, 184, 188, 191, 193, 106, 196, 199, 477 422 27, 45, 210, 22, 163, 138, 14, 406, 6, 214, 478 423 580, 600, 4, 542, 592, 572, nil, nil, nil, nil, 479 424 256, nil, nil, nil, nil, nil, 257, nil, nil, nil, 480 nil, nil, nil, 253, nil, nil, nil, nil, nil, 318,425 318, nil, nil, 253, nil, nil, nil, nil, nil, nil, 481 426 nil, nil, nil, nil, nil, 304, nil, nil, nil, 252, 482 427 nil, 308, nil, nil, nil, nil, 251, nil, nil, nil, … … 524 469 18, 104, 80, 34, 23, 15, 22, 103, 81, 24, 525 470 23, 15, 82, 114, 51, 87, 78, 48, 59, 62, 526 26, 72, 71, 66, 60, 69, 14, 1, 52, 23,527 83, 86, 23, 108, 60, 57, 58, 50, 85, 39,528 14, 69, 60, 37, 110, 80, 110, 110, 36, 110,471 57, 72, 71, 60, 108, 14, 26, 69, 1, 23, 472 83, 86, 23, 60, 66, 52, 58, 50, 85, 14, 473 39, 60, 37, 69, 110, 80, 110, 110, 110, 36, 529 474 68, 81, 110, 25, 84, 82, 20, 53, 87, 74, 530 475 75, 76, 77, 17, 79, 71, 16, 13, 12, 11, 531 10, 9, 26, 83, 86, 8, 7, 89, 90, 91,532 108, 85, 72, 108, 66, 108, 108, 92, 108, 108,533 93, 94, 95, 59, 62, 96, 97, 84, 57, 57,534 9 8, 57, 57, 57, 57, 99, 100, 23, 101, 102,476 10, 108, 9, 83, 86, 108, 108, 108, 26, 108, 477 108, 85, 72, 57, 57, 8, 57, 57, 57, 57, 478 7, 89, 90, 59, 62, 66, 91, 84, 92, 93, 479 94, 95, 96, 97, 98, 99, 100, 23, 101, 102, 535 480 6, 23, 15, 5, 105, 107, 4, 48, 3, 111, 536 481 112, 113, 2, 115, 126, 128, nil, nil, nil, nil, 537 482 80, nil, nil, nil, nil, nil, 81, nil, nil, nil, 538 nil, nil, nil, 87, nil, nil, nil, nil, nil, 108,483 108, nil, nil, 87, nil, nil, nil, nil, nil, nil, 539 484 nil, nil, nil, nil, nil, 80, nil, nil, nil, 86, 540 485 nil, 81, nil, nil, nil, nil, 85, nil, nil, nil, … … 580 525 581 526 racc_goto_pointer = [ 582 nil, 2 7, 122, 118, 110, 99, 88, 49, 42, 19,583 1, 69, 63, 55, 1 4, -23, 13, 10, -53, nil,584 -159, nil, -80, -24, -206, -162, -45 7, nil, nil, nil,585 nil, nil, nil, nil, -85, nil, -5 50, -563, nil, -173,527 nil, 28, 122, 118, 110, 99, 88, 63, 52, 20, 528 1, 69, 63, 55, 13, -23, 13, 10, -53, nil, 529 -159, nil, -80, -24, -206, -162, -451, nil, nil, nil, 530 nil, nil, nil, nil, -85, nil, -549, -564, nil, -172, 586 531 nil, nil, nil, nil, nil, nil, nil, nil, -198, nil, 587 -440, -386, -28 8, -350, nil, nil, nil, -66, -4, -38,588 -2 4, nil, -37, nil, nil, nil, -22, nil, 6, -19,532 -440, -386, -281, -350, nil, nil, nil, -81, -4, -38, 533 -25, nil, -37, nil, nil, nil, -11, nil, 6, -17, 589 534 nil, -37, -24, nil, -47, -42, -41, -40, -86, -38, 590 -57, -51, -47, -29, -5, -21, -28, -44, nil, - 25,591 - 24, -23, -15, -12, -11, -10, -7, -6, -2, 3,592 4, 6, 7, -95, -78, 23, nil, 39, - 68, nil,535 -57, -51, -47, -29, -5, -21, -28, -44, nil, -11, 536 -10, -6, -4, -3, -2, -1, 0, 1, 2, 3, 537 4, 6, 7, -95, -78, 23, nil, 39, -77, nil, 593 538 -103, -24, -421, -457, -306, -359, nil, nil, nil, nil, 594 539 nil, nil, nil, nil, nil, nil, -443, nil, -409 ] … … 905 850 3, 206, :_reduce_293, 906 851 5, 147, :_reduce_294, 907 1, 207, :_reduce_ none,852 1, 207, :_reduce_295, 908 853 3, 207, :_reduce_none, 909 854 3, 207, :_reduce_none, … … 2516 2461 # reduce 167 omitted 2517 2462 2518 module_eval(<<'.,.,', 'parser.y', 82 2)2463 module_eval(<<'.,.,', 'parser.y', 820) 2519 2464 def _reduce_168(val, _values, result) 2520 2465 begin … … 2529 2474 .,., 2530 2475 2531 module_eval(<<'.,.,', 'parser.y', 8 31)2476 module_eval(<<'.,.,', 'parser.y', 829) 2532 2477 def _reduce_169(val, _values, result) 2533 2478 begin … … 2542 2487 .,., 2543 2488 2544 module_eval(<<'.,.,', 'parser.y', 8 40)2489 module_eval(<<'.,.,', 'parser.y', 838) 2545 2490 def _reduce_170(val, _values, result) 2546 2491 begin … … 2579 2524 # reduce 182 omitted 2580 2525 2581 module_eval(<<'.,.,', 'parser.y', 86 5)2526 module_eval(<<'.,.,', 'parser.y', 863) 2582 2527 def _reduce_183(val, _values, result) 2583 2528 result = true … … 2587 2532 .,., 2588 2533 2589 module_eval(<<'.,.,', 'parser.y', 86 9)2534 module_eval(<<'.,.,', 'parser.y', 867) 2590 2535 def _reduce_184(val, _values, result) 2591 2536 result = false … … 2609 2554 # reduce 191 omitted 2610 2555 2611 module_eval(<<'.,.,', 'parser.y', 88 4)2556 module_eval(<<'.,.,', 'parser.y', 882) 2612 2557 def _reduce_192(val, _values, result) 2613 2558 result = val[0] … … 2667 2612 # reduce 217 omitted 2668 2613 2669 module_eval(<<'.,.,', 'parser.y', 91 9)2614 module_eval(<<'.,.,', 'parser.y', 917) 2670 2615 def _reduce_218(val, _values, result) 2671 2616 @@logger.debug("V_ISO8601_EXTENDED_DATE_TIME: #{val[0]} at #{@filename}:#{@lineno}") … … 2700 2645 # reduce 230 omitted 2701 2646 2702 module_eval(<<'.,.,', 'parser.y', 93 9)2647 module_eval(<<'.,.,', 'parser.y', 937) 2703 2648 def _reduce_231(val, _values, result) 2704 2649 @@logger.debug("V_ISO8601_DURATION: #{val[0]} at #{@filename}:#{@lineno}") … … 2733 2678 # reduce 243 omitted 2734 2679 2735 module_eval(<<'.,.,', 'parser.y', 95 9)2680 module_eval(<<'.,.,', 'parser.y', 957) 2736 2681 def _reduce_244(val, _values, result) 2737 2682 @@logger.debug("#{__FILE__}:#{__LINE__}: V_QUALIFIED_TERM_CODE_REF = #{val[0]} at #{@filename}:#{@lineno}") … … 2748 2693 # reduce 247 omitted 2749 2694 2750 module_eval(<<'.,.,', 'parser.y', 96 9)2695 module_eval(<<'.,.,', 'parser.y', 967) 2751 2696 def _reduce_248(val, _values, result) 2752 2697 @@logger.debug("#{__FILE__}:#{__LINE__}: V_URI = #{val[0]} at #{@filename}:#{@lineno}") … … 2773 2718 # reduce 256 omitted 2774 2719 2775 module_eval(<<'.,.,', 'parser.y', 99 2)2720 module_eval(<<'.,.,', 'parser.y', 990) 2776 2721 def _reduce_257(val, _values, result) 2777 2722 @@logger.debug("#{__FILE__}:#{__LINE__}, boolean_node: relative_path = #{val[0]}, regexp_body => #{val[3]} at #{@filename}") … … 2838 2783 # reduce 285 omitted 2839 2784 2840 module_eval(<<'.,.,', 'parser.y', 103 9)2785 module_eval(<<'.,.,', 'parser.y', 1037) 2841 2786 def _reduce_286(val, _values, result) 2842 2787 @@logger.debug("#{__FILE__}:#{__LINE__}, relative_path = #{val[0]}") … … 2847 2792 .,., 2848 2793 2849 module_eval(<<'.,.,', 'parser.y', 104 4)2794 module_eval(<<'.,.,', 'parser.y', 1042) 2850 2795 def _reduce_287(val, _values, result) 2851 2796 @@logger.debug("#{__FILE__}:#{__LINE__}, relative_path = #{val[0]}/#{val[2]}") … … 2856 2801 .,., 2857 2802 2858 module_eval(<<'.,.,', 'parser.y', 10 50)2803 module_eval(<<'.,.,', 'parser.y', 1048) 2859 2804 def _reduce_288(val, _values, result) 2860 2805 @@logger.debug("#{__FILE__}:#{__LINE__}, V_ATTRIBUTE_IDENTIFIER = #{val[0]} at #{@filename}") … … 2865 2810 .,., 2866 2811 2867 module_eval(<<'.,.,', 'parser.y', 105 5)2812 module_eval(<<'.,.,', 'parser.y', 1053) 2868 2813 def _reduce_289(val, _values, result) 2869 2814 @@logger.debug("#{__FILE__}:#{__LINE__}, V_ATTRIBUTE_IDENTIFIER = #{val[0]} at #{@filename}") … … 2874 2819 .,., 2875 2820 2876 module_eval(<<'.,.,', 'parser.y', 106 7)2821 module_eval(<<'.,.,', 'parser.y', 1065) 2877 2822 def _reduce_290(val, _values, result) 2878 2823 result = Range.new(1,1) … … 2882 2827 .,., 2883 2828 2884 module_eval(<<'.,.,', 'parser.y', 10 71)2829 module_eval(<<'.,.,', 'parser.y', 1069) 2885 2830 def _reduce_291(val, _values, result) 2886 2831 result = val[3] … … 2890 2835 .,., 2891 2836 2892 module_eval(<<'.,.,', 'parser.y', 107 6)2837 module_eval(<<'.,.,', 'parser.y', 1074) 2893 2838 def _reduce_292(val, _values, result) 2894 2839 begin … … 2903 2848 .,., 2904 2849 2905 module_eval(<<'.,.,', 'parser.y', 108 5)2850 module_eval(<<'.,.,', 'parser.y', 1083) 2906 2851 def _reduce_293(val, _values, result) 2907 2852 begin … … 2917 2862 .,., 2918 2863 2919 module_eval(<<'.,.,', 'parser.y', 109 6)2864 module_eval(<<'.,.,', 'parser.y', 1094) 2920 2865 def _reduce_294(val, _values, result) 2921 2866 result = OpenEhr::AM::Archetype::ConstraintModel::CARDINALITY.new … … 2925 2870 .,., 2926 2871 2927 # reduce 295 omitted 2872 module_eval(<<'.,.,', 'parser.y', 1099) 2873 def _reduce_295(val, _values, result) 2874 result = val[0] 2875 2876 result 2877 end 2878 .,., 2928 2879 2929 2880 # reduce 296 omitted … … 2941 2892 # reduce 302 omitted 2942 2893 2943 module_eval(<<'.,.,', 'parser.y', 111 0)2894 module_eval(<<'.,.,', 'parser.y', 1111) 2944 2895 def _reduce_303(val, _values, result) 2945 2896 result = val[0] … … 2949 2900 .,., 2950 2901 2951 module_eval(<<'.,.,', 'parser.y', 111 4)2902 module_eval(<<'.,.,', 'parser.y', 1115) 2952 2903 def _reduce_304(val, _values, result) 2953 2904 result = val[0] … … 2959 2910 # reduce 305 omitted 2960 2911 2961 module_eval(<<'.,.,', 'parser.y', 112 1)2912 module_eval(<<'.,.,', 'parser.y', 1122) 2962 2913 def _reduce_306(val, _values, result) 2963 2914 case val[3] … … 2974 2925 # reduce 307 omitted 2975 2926 2976 module_eval(<<'.,.,', 'parser.y', 113 2)2927 module_eval(<<'.,.,', 'parser.y', 1133) 2977 2928 def _reduce_308(val, _values, result) 2978 2929 result = val[0] … … 2982 2933 .,., 2983 2934 2984 module_eval(<<'.,.,', 'parser.y', 113 6)2935 module_eval(<<'.,.,', 'parser.y', 1137) 2985 2936 def _reduce_309(val, _values, result) 2986 2937 result = OpenEhr::RM::Support::AssumedTypes::Interval.new(val[0], val[2]) … … 3076 3027 # reduce 352 omitted 3077 3028 3078 module_eval(<<'.,.,', 'parser.y', 120 2)3029 module_eval(<<'.,.,', 'parser.y', 1203) 3079 3030 def _reduce_353(val, _values, result) 3080 3031 result = OpenEhr::AM::Archetype::ConstraintModel::Primitive::C_BOOLEAN.new(:true_valid => true) … … 3084 3035 .,., 3085 3036 3086 module_eval(<<'.,.,', 'parser.y', 120 6)3037 module_eval(<<'.,.,', 'parser.y', 1207) 3087 3038 def _reduce_354(val, _values, result) 3088 3039 result = OpenEhr::AM::Archetype::ConstraintModel::Primitive::C_BOOLEAN.new(:true_valid => false) … … 3092 3043 .,., 3093 3044 3094 module_eval(<<'.,.,', 'parser.y', 121 0)3045 module_eval(<<'.,.,', 'parser.y', 1211) 3095 3046 def _reduce_355(val, _values, result) 3096 3047 result = OpenEhr::AM::Archetype::ConstraintModel::Primitive::C_BOOLEAN.new(:true_valid => true,:false_valid => false) … … 3100 3051 .,., 3101 3052 3102 module_eval(<<'.,.,', 'parser.y', 121 4)3053 module_eval(<<'.,.,', 'parser.y', 1215) 3103 3054 def _reduce_356(val, _values, result) 3104 3055 result = OpenEhr::AM::Archetype::ConstraintModel::Primitive::C_BOOLEAN.new(:true_valid => false,:false_valid => true) … … 3108 3059 .,., 3109 3060 3110 module_eval(<<'.,.,', 'parser.y', 12 19)3061 module_eval(<<'.,.,', 'parser.y', 1220) 3111 3062 def _reduce_357(val, _values, result) 3112 3063 result = val[0] … … 3116 3067 .,., 3117 3068 3118 module_eval(<<'.,.,', 'parser.y', 122 3)3069 module_eval(<<'.,.,', 'parser.y', 1224) 3119 3070 def _reduce_358(val, _values, result) 3120 3071 result = val[0] … … 3125 3076 .,., 3126 3077 3127 module_eval(<<'.,.,', 'parser.y', 122 8)3078 module_eval(<<'.,.,', 'parser.y', 1229) 3128 3079 def _reduce_359(val, _values, result) 3129 3080 raise 'Not implemented yet' … … 3143 3094 # reduce 364 omitted 3144 3095 3145 module_eval(<<'.,.,', 'parser.y', 124 0)3096 module_eval(<<'.,.,', 'parser.y', 1241) 3146 3097 def _reduce_365(val, _values, result) 3147 3098 @in_interval = false … … 3152 3103 .,., 3153 3104 3154 module_eval(<<'.,.,', 'parser.y', 124 7)3105 module_eval(<<'.,.,', 'parser.y', 1248) 3155 3106 def _reduce_366(val, _values, result) 3156 3107 result = val[0] … … 3160 3111 .,., 3161 3112 3162 module_eval(<<'.,.,', 'parser.y', 125 1)3113 module_eval(<<'.,.,', 'parser.y', 1252) 3163 3114 def _reduce_367(val, _values, result) 3164 3115 result = val[0] … … 3168 3119 .,., 3169 3120 3170 module_eval(<<'.,.,', 'parser.y', 125 7)3121 module_eval(<<'.,.,', 'parser.y', 1258) 3171 3122 def _reduce_368(val, _values, result) 3172 3123 @@logger.debug("#{__FILE__}:#{__LINE__}, START_TERM_CODE_CONSTRAINT = #{val[0]} at #{@filename}") … … 3185 3136 # reduce 371 omitted 3186 3137 3187 module_eval(<<'.,.,', 'parser.y', 127 3)3138 module_eval(<<'.,.,', 'parser.y', 1274) 3188 3139 def _reduce_372(val, _values, result) 3189 3140 result = val[0] … … 3193 3144 .,., 3194 3145 3195 module_eval(<<'.,.,', 'parser.y', 127 8)3146 module_eval(<<'.,.,', 'parser.y', 1279) 3196 3147 def _reduce_373(val, _values, result) 3197 3148 result = val[0] … … 3201 3152 .,., 3202 3153 3203 module_eval(<<'.,.,', 'parser.y', 128 2)3154 module_eval(<<'.,.,', 'parser.y', 1283) 3204 3155 def _reduce_374(val, _values, result) 3205 3156 @@logger.debug("#{__FILE__}:#{__LINE__}, V_ATTRIBUTE_IDENTIFIER = #{word} at #{@filename}") … … 3210 3161 .,., 3211 3162 3212 module_eval(<<'.,.,', 'parser.y', 129 3)3163 module_eval(<<'.,.,', 'parser.y', 1294) 3213 3164 def _reduce_375(val, _values, result) 3214 3165 result = OpenEhr::AM::Archetype::ConstraintModel::Primitive::C_DURATION.new #val[0] -
ruby/trunk/lib/adl_parser/lib/parser.y
r321 r323 802 802 result = - integer 803 803 } 804 ### | '+' V_INTEGER805 ### | '-' V_INTEGER806 804 807 805 integer_list_value: integer_value Comma_code integer_value … … 1012 1010 | SYM_FALSE 1013 1011 1014 arithmetic_node: arithmetic_expression '+'arithmetic_leaf1012 arithmetic_node: arithmetic_expression Plus_code arithmetic_leaf 1015 1013 | arithmetic_expression Minus_code arithmetic_leaf 1016 1014 | arithmetic_expression Star_code arithmetic_leaf … … 1099 1097 1100 1098 cardinality_spec: occurrence_spec 1099 { 1100 result = val[0] 1101 } 1101 1102 | occurrence_spec Semicolon_code SYM_ORDERED 1102 1103 | occurrence_spec Semicolon_code SYM_UNORDERED … … 1330 1331 end 1331 1332 1332 1333 ###----------/* keywords */ ---------------------------------------------1334 ### @@adl_reserved = {1335 ### 'archetype' => :SYM_ARCHETYPE,1336 ### 'adl_version' => :SYM_ADL_VERSION,1337 ### 'controlled' => :SYM_IS_CONTROLLED,1338 ### 'specialize' => :SYM_SPECIALIZE,1339 ### 'concept' => :SYM_CONCEPT,1340 ### 'language' => :SYM_LANGUAGE,1341 ### 'description' => :SYM_DESCRIPTION,1342 ### 'definition' => :SYM_DEFINITION,1343 ### 'invariant' => :SYM_INVARIANT,1344 ### 'ontology' => :SYM_ONTOLOGY,1345 ### 'matches' => :SYM_MATCHES,1346 ### 'is_in' => :SYM_MATCHES,1347 ### 'occurrences' => :SYM_OCCURRENCES,1348 ### 'true' => :SYM_TRUE, #[Tt][Rr][Uu][Ee] -- -> SYM_TRUE1349 ### 'false' => :SYM_FALSE, # [Ff][Aa][Ll][Ss][Ee] -- -> SYM_FALSE1350 ### 'infinity' => :SYM_INFINITY # [Ii][Nn][Ff][Ii][Nn][Ii][Tt][Yy] -- -> SYM_INFINITY1351 ### }1352 1353 ### @@dadl_reserved = {1354 ### 'true' => :SYM_TRUE, #[Tt][Rr][Uu][Ee] -- -> SYM_TRUE1355 ### 'false' => :SYM_FALSE, # [Ff][Aa][Ll][Ss][Ee] -- -> SYM_FALSE1356 ### 'infinity' => :SYM_INFINITY # [Ii][Nn][Ff][Ii][Nn][Ii][Tt][Yy] -- -> SYM_INFINITY1357 ### }1358 1359 ### @@cadl_reserved = {1360 ### 'then' => :SYM_THEN, # [Tt][Hh][Ee][Nn]1361 ### 'else' => :SYM_ELSE, # [Ee][Ll][Ss][Ee]1362 ### 'and' => :SYM_AND, # [Aa][Nn][Dd]1363 ### 'or' => :SYM_OR, # [Oo][Rr]1364 ### 'xor' => :SYM_XOR, # [Xx][Oo][Rr]1365 ### 'not' => :SYM_NOT, # [Nn][Oo][Tt]1366 ### 'implies' => :SYM_IMPLIES, # [Ii][Mm][Pp][Ll][Ii][Ee][Ss]1367 ### 'true' => :SYM_TRUE, #[Tt][Rr][Uu][Ee] -- -> SYM_TRUE1368 ### 'false' => :SYM_FALSE, # [Ff][Aa][Ll][Ss][Ee] -- -> SYM_FALSE1369 ### 'forall' => :SYM_FORALL, # [Ff][Oo][Rr][_][Aa][Ll][Ll]1370 ### 'exists' => :SYM_EXISTS, # [Ee][Xx][Ii][Ss][Tt][Ss]1371 ### 'existence' => :SYM_EXISTENCE, # [Ee][Xx][Iu][Ss][Tt][Ee][Nn][Cc][Ee]1372 ### 'occurrences' => :SYM_OCCURRENCES, # [Oo][Cc][Cc][Uu][Rr][Rr][Ee][Nn][Cc][Ee][Ss]1373 ### 'cardinality' => :SYM_CARDINALITY, # [Cc][Aa][Rr][Dd][Ii][Nn][Aa][Ll][Ii][Tt][Yy]1374 ### 'ordered' => :SYM_ORDERED, # [Oo][Rr][Dd][Ee][Rr][Ee][Dd]1375 ### 'unordered' => :SYM_UNORDERED, # [Uu][Nn][Oo][Rr][Dd][Ee][Rr][Ee][Dd]1376 ### 'unique' => :SYM_UNIQUE, # [Uu][Nn][Ii][Qq][Uu][Ee]1377 ### 'matches' => :SYM_MATCHES, # [Mm][Aa][Tt][Cc][Hh][Ee][Ss]1378 ### 'is_in' => :SYM_MATCHES, # [Ii][Ss][_][Ii][Nn]1379 ### 'invariant' => :SYM_INVARIANT, # [Ii][Nn][Vv][Aa][Rr][Ii][Aa][Nn][Tt]1380 ### 'infinity' => :SYM_INFINITY, # [Ii][Nn][Ff][Ii][Nn][Ii][Tt][Yy] -- -> SYM_INFINITY1381 ### 'use_node' => :SYM_USE_NODE, # [Uu][Ss][Ee][_][Nn][Oo][Dd][Ee]1382 ### 'use_archetype' => :SYM_ALLOW_ARCHETYPE, # [Uu][Ss][Ee][_][Aa][Rr][Cc][Hh][Ee][Tt][Yy][Pp][Ee]1383 ### 'allow_archetype' => :SYM_ALLOW_ARCHETYPE, # [Aa][Ll][Ll][Oo][Ww][_][Aa][Rr][Cc][Hh][Ee][Tt][Yy][Pp][Ee]1384 ### 'include' => :SYM_INCLUDE, # [Ii][Nn][Cc][Ll][Uu][Dd][Ee]1385 ### 'exclude' => :SYM_EXCLUDE # [Ee][Xx][Cc][Ll][Uu][Dd][Ee]1386 ### }1387 1333 1388 1334 -
ruby/trunk/lib/adl_parser/test/parser_test.rb
r321 r323 258 258 end 259 259 260 must "adl-test-ENTRY.assumed_types.v1.adl be properly parsed" do 261 file = File.read("#{TEST_ROOT_DIR}/adl/adl-test-ENTRY.assumed_types.v1.adl") 262 assert_nothing_raised do 263 ast = @parser.parse(file, 'adl-test-ENTRY.assumed_types.v1') 264 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 265 end 266 end 267 260 268 must "adl-test-ENTRY.basic_types.v1.adl be properly parsed" do 261 269 file = File.read("#{TEST_ROOT_DIR}/adl/adl-test-ENTRY.basic_types.v1.adl") … … 267 275 268 276 269 must "adl-test-ENTRY.assumed_types.v1.adl be properly parsed" do 270 file = File.read("#{TEST_ROOT_DIR}/adl/adl-test-ENTRY.assumed_types.v1.adl") 271 assert_nothing_raised do 272 ast = @parser.parse(file, 'adl-test-ENTRY.assumed_types.v1') 277 must "adl-test-ENTRY.basic_types_fail.v1.adl be properly parsed" do 278 file = File.read("#{TEST_ROOT_DIR}/adl/adl-test-ENTRY.basic_types_fail.v1.adl") 279 assert_raise Racc::ParseError do 280 ast = @parser.parse(file, 'adl-test-ENTRY.basic_types_fail.v1') 281 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 282 end 283 end 284 285 must "adl-test-ENTRY.most_minimal.v1.adl be properly parsed" do 286 file = File.read("#{TEST_ROOT_DIR}/adl/adl-test-ENTRY.most_minimal.v1.adl") 287 assert_nothing_raised do 288 ast = @parser.parse(file, 'adl-test-ENTRY.most_minimal.v1') 289 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 290 end 291 end 292 293 must "adl-test-ENTRY.structure_test1.v1.adl be properly parsed" do 294 file = File.read("#{TEST_ROOT_DIR}/adl/adl-test-ENTRY.structure_test1.v1.adl") 295 assert_nothing_raised do 296 ast = @parser.parse(file, 'adl-test-ENTRY.structure_test1.v1') 273 297 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 274 298 end -
ruby/trunk/lib/adl_parser/test/remote_adl_test.rb
r319 r323 28 28 29 29 30 must "test_adls should properly parsed" do 30 # must "test_adls should properly parsed" do 31 # assert_nothing_raised do 32 # @test_adls.each do |adl| 33 # puts "Processing #{adl}" 34 # open(adl) do |file| 35 # p "Processing #{file.gets}" 36 # case file.gets 37 # when "http://www.openehr.org/svn/knowledge/archetypes/dev/adl/test/basics/adl-test-ENTRY.basic_types_fail.v1.adl" 38 # assert_raise Racc::ParserError do 39 # @parser.parse(file.read, adl) 40 # end 41 # else 42 # assert_nothing_raised { @parser.parse(file.read, adl) } 43 # end 44 # end 45 # end 46 # end 47 # end 48 49 must "ehr_adls should properly parsed" do 31 50 assert_nothing_raised do 32 @ test_adls.each do |adl|51 @ehr_adls.each do |adl| 33 52 puts "Processing #{adl}" 34 53 open(adl) do |file| 35 @parser.parse(file.read, adl) 54 assert_nothing_raised do 55 @parser.parse(file.read, adl) 56 end 36 57 end 37 58 end … … 39 60 end 40 61 41 # must "ehr_adls should properly parsed" do42 # assert_nothing_raised do43 # @ehr_adls.each do |adl|44 # puts "Processing #{adl}"45 # open(adl) do |file|46 # @parser.parse(file.read, adl)47 # end48 # end49 # end50 # end51 52 62 53 63 end
Note:
See TracChangeset
for help on using the changeset viewer.