de.oddb 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Guide.txt +3 -0
- data/History.txt +5 -0
- data/LICENCE.txt +339 -0
- data/Manifest.txt +430 -0
- data/README +423 -0
- data/README.txt +25 -0
- data/Rakefile +28 -0
- data/bin/admin +71 -0
- data/bin/exportd +44 -0
- data/bin/oddbd +33 -0
- data/data/fulltext/data/dicts/french/fulltext.aff +1057 -0
- data/data/fulltext/data/dicts/french/fulltext.dict +91189 -0
- data/data/fulltext/data/dicts/french/fulltext.stop +135 -0
- data/data/fulltext/data/dicts/german/fulltext.aff +1233 -0
- data/data/fulltext/data/dicts/german/fulltext.dict +287574 -0
- data/data/fulltext/data/dicts/german/fulltext.stop +133 -0
- data/data/fulltext/data/german_compound/README +15 -0
- data/data/fulltext/data/german_compound/compound.pl +63 -0
- data/data/fulltext/data/german_compound/german.stop +20 -0
- data/data/fulltext/data/ispell-german-compound.tar.gz +0 -0
- data/data/fulltext/redist/dict_french/Makefile +12 -0
- data/data/fulltext/redist/dict_french/README.french +1 -0
- data/data/fulltext/redist/dict_french/dict_french.sql.in +7 -0
- data/data/fulltext/redist/dict_french/dict_snowball.c +56 -0
- data/data/fulltext/redist/dict_french/french_stem.c +1222 -0
- data/data/fulltext/redist/dict_french/french_stem.h +16 -0
- data/data/fulltext/redist/dict_french/subinclude.h +2 -0
- data/data/fulltext/redist/dict_german/Makefile +12 -0
- data/data/fulltext/redist/dict_german/README.german +1 -0
- data/data/fulltext/redist/dict_german/dict_german.sql.in +7 -0
- data/data/fulltext/redist/dict_german/dict_snowball.c +56 -0
- data/data/fulltext/redist/dict_german/german_stem.c +527 -0
- data/data/fulltext/redist/dict_german/german_stem.h +16 -0
- data/data/fulltext/redist/dict_german/subinclude.h +1 -0
- data/data/fulltext/redist/french_stem.c +1222 -0
- data/data/fulltext/redist/french_stem.h +16 -0
- data/data/fulltext/redist/german_stem.c +527 -0
- data/data/fulltext/redist/german_stem.h +16 -0
- data/jobs/export_chde_xls +20 -0
- data/jobs/export_csv +20 -0
- data/jobs/export_fachinfo_yaml +20 -0
- data/jobs/export_patinfo_yaml +20 -0
- data/jobs/export_yaml +20 -0
- data/jobs/import_dimdi +15 -0
- data/jobs/import_gkv +19 -0
- data/jobs/import_pharma24 +15 -0
- data/jobs/import_pharmnet +30 -0
- data/jobs/import_whocc +18 -0
- data/lib/fixes/singular.rb +9 -0
- data/lib/fixes/yaml.rb +13 -0
- data/lib/oddb.rb +13 -0
- data/lib/oddb/business/company.rb +18 -0
- data/lib/oddb/business/grant_download.rb +27 -0
- data/lib/oddb/business/invoice.rb +75 -0
- data/lib/oddb/config.rb +112 -0
- data/lib/oddb/currency.rb +6 -0
- data/lib/oddb/drugs.rb +16 -0
- data/lib/oddb/drugs/active_agent.rb +37 -0
- data/lib/oddb/drugs/atc.rb +53 -0
- data/lib/oddb/drugs/composition.rb +41 -0
- data/lib/oddb/drugs/ddd.rb +24 -0
- data/lib/oddb/drugs/dose.rb +107 -0
- data/lib/oddb/drugs/galenic_form.rb +21 -0
- data/lib/oddb/drugs/galenic_group.rb +17 -0
- data/lib/oddb/drugs/package.rb +111 -0
- data/lib/oddb/drugs/part.rb +55 -0
- data/lib/oddb/drugs/product.rb +25 -0
- data/lib/oddb/drugs/sequence.rb +68 -0
- data/lib/oddb/drugs/substance.rb +31 -0
- data/lib/oddb/drugs/substance_group.rb +13 -0
- data/lib/oddb/drugs/unit.rb +12 -0
- data/lib/oddb/export.rb +4 -0
- data/lib/oddb/export/csv.rb +94 -0
- data/lib/oddb/export/l10n_sessions.rb +30 -0
- data/lib/oddb/export/rss.rb +44 -0
- data/lib/oddb/export/server.rb +137 -0
- data/lib/oddb/export/xls.rb +127 -0
- data/lib/oddb/export/yaml.rb +212 -0
- data/lib/oddb/html/state/download.rb +13 -0
- data/lib/oddb/html/state/drugs/admin/package.rb +190 -0
- data/lib/oddb/html/state/drugs/admin/product.rb +56 -0
- data/lib/oddb/html/state/drugs/admin/sequence.rb +253 -0
- data/lib/oddb/html/state/drugs/ajax/explain_ddd_price.rb +19 -0
- data/lib/oddb/html/state/drugs/ajax/explain_price.rb +19 -0
- data/lib/oddb/html/state/drugs/ajax/global.rb +18 -0
- data/lib/oddb/html/state/drugs/ajax/package_infos.rb +19 -0
- data/lib/oddb/html/state/drugs/ajax/remote_infos.rb +19 -0
- data/lib/oddb/html/state/drugs/atc_browser.rb +39 -0
- data/lib/oddb/html/state/drugs/atc_guidelines.rb +21 -0
- data/lib/oddb/html/state/drugs/compare.rb +52 -0
- data/lib/oddb/html/state/drugs/download_export.rb +18 -0
- data/lib/oddb/html/state/drugs/downloads.rb +42 -0
- data/lib/oddb/html/state/drugs/fachinfo.rb +21 -0
- data/lib/oddb/html/state/drugs/feedback.rb +91 -0
- data/lib/oddb/html/state/drugs/global.rb +270 -0
- data/lib/oddb/html/state/drugs/init.rb +18 -0
- data/lib/oddb/html/state/drugs/login.rb +17 -0
- data/lib/oddb/html/state/drugs/package.rb +32 -0
- data/lib/oddb/html/state/drugs/patinfo.rb +21 -0
- data/lib/oddb/html/state/drugs/products.rb +51 -0
- data/lib/oddb/html/state/drugs/result.rb +125 -0
- data/lib/oddb/html/state/global.rb +206 -0
- data/lib/oddb/html/state/global_predefine.rb +17 -0
- data/lib/oddb/html/state/limit.rb +17 -0
- data/lib/oddb/html/state/login.rb +56 -0
- data/lib/oddb/html/state/paypal/checkout.rb +97 -0
- data/lib/oddb/html/state/paypal/collect.rb +19 -0
- data/lib/oddb/html/state/paypal/download.rb +61 -0
- data/lib/oddb/html/state/paypal/redirect.rb +18 -0
- data/lib/oddb/html/state/register_download.rb +24 -0
- data/lib/oddb/html/state/register_export.rb +38 -0
- data/lib/oddb/html/state/register_poweruser.rb +17 -0
- data/lib/oddb/html/state/viral/admin.rb +79 -0
- data/lib/oddb/html/state/viral/poweruser.rb +16 -0
- data/lib/oddb/html/util/annotated_list.rb +39 -0
- data/lib/oddb/html/util/know_it_all.rb +28 -0
- data/lib/oddb/html/util/known_user.rb +55 -0
- data/lib/oddb/html/util/lookandfeel.rb +698 -0
- data/lib/oddb/html/util/need_all_input.rb +29 -0
- data/lib/oddb/html/util/session.rb +84 -0
- data/lib/oddb/html/util/sort.rb +72 -0
- data/lib/oddb/html/util/unsaved_helper.rb +20 -0
- data/lib/oddb/html/util/validator.rb +59 -0
- data/lib/oddb/html/view/ajax/json.rb +22 -0
- data/lib/oddb/html/view/alpha_header.rb +28 -0
- data/lib/oddb/html/view/document.rb +117 -0
- data/lib/oddb/html/view/download.rb +33 -0
- data/lib/oddb/html/view/drugs/admin/package.rb +245 -0
- data/lib/oddb/html/view/drugs/admin/product.rb +104 -0
- data/lib/oddb/html/view/drugs/admin/sequence.rb +305 -0
- data/lib/oddb/html/view/drugs/ajax/explain_ddd_price.rb +87 -0
- data/lib/oddb/html/view/drugs/ajax/explain_price.rb +61 -0
- data/lib/oddb/html/view/drugs/ajax/package_infos.rb +105 -0
- data/lib/oddb/html/view/drugs/ajax/remote_infos.rb +44 -0
- data/lib/oddb/html/view/drugs/atc_browser.rb +68 -0
- data/lib/oddb/html/view/drugs/atc_guidelines.rb +94 -0
- data/lib/oddb/html/view/drugs/compare.rb +95 -0
- data/lib/oddb/html/view/drugs/download_export.rb +28 -0
- data/lib/oddb/html/view/drugs/downloads.rb +128 -0
- data/lib/oddb/html/view/drugs/fachinfo.rb +46 -0
- data/lib/oddb/html/view/drugs/feedback.rb +235 -0
- data/lib/oddb/html/view/drugs/init.rb +51 -0
- data/lib/oddb/html/view/drugs/legend.rb +24 -0
- data/lib/oddb/html/view/drugs/package.rb +403 -0
- data/lib/oddb/html/view/drugs/patinfo.rb +46 -0
- data/lib/oddb/html/view/drugs/products.rb +97 -0
- data/lib/oddb/html/view/drugs/result.rb +296 -0
- data/lib/oddb/html/view/drugs/search.rb +33 -0
- data/lib/oddb/html/view/drugs/template.rb +15 -0
- data/lib/oddb/html/view/foot.rb +52 -0
- data/lib/oddb/html/view/google.rb +23 -0
- data/lib/oddb/html/view/google_ads.rb +40 -0
- data/lib/oddb/html/view/head.rb +78 -0
- data/lib/oddb/html/view/limit.rb +109 -0
- data/lib/oddb/html/view/list.rb +59 -0
- data/lib/oddb/html/view/login.rb +38 -0
- data/lib/oddb/html/view/navigation.rb +67 -0
- data/lib/oddb/html/view/offset_header.rb +35 -0
- data/lib/oddb/html/view/paypal/collect.rb +95 -0
- data/lib/oddb/html/view/paypal/redirect.rb +51 -0
- data/lib/oddb/html/view/paypal/register_form.rb +149 -0
- data/lib/oddb/html/view/register_download.rb +29 -0
- data/lib/oddb/html/view/register_export.rb +29 -0
- data/lib/oddb/html/view/register_poweruser.rb +29 -0
- data/lib/oddb/html/view/rss/feedback.rb +64 -0
- data/lib/oddb/html/view/rss_preview.rb +61 -0
- data/lib/oddb/html/view/search.rb +104 -0
- data/lib/oddb/html/view/snapback.rb +24 -0
- data/lib/oddb/html/view/template.rb +56 -0
- data/lib/oddb/import/dimdi.rb +583 -0
- data/lib/oddb/import/excel.rb +45 -0
- data/lib/oddb/import/gkv.rb +463 -0
- data/lib/oddb/import/importer.rb +36 -0
- data/lib/oddb/import/pharma24.rb +211 -0
- data/lib/oddb/import/pharmnet.rb +1186 -0
- data/lib/oddb/import/rtf.rb +409 -0
- data/lib/oddb/import/whocc.rb +148 -0
- data/lib/oddb/import/xml.rb +15 -0
- data/lib/oddb/model.rb +179 -0
- data/lib/oddb/persistence.rb +22 -0
- data/lib/oddb/persistence/odba.rb +32 -0
- data/lib/oddb/persistence/odba/business/company.rb +13 -0
- data/lib/oddb/persistence/odba/business/grant_download.rb +14 -0
- data/lib/oddb/persistence/odba/business/invoice.rb +15 -0
- data/lib/oddb/persistence/odba/drugs/atc.rb +15 -0
- data/lib/oddb/persistence/odba/drugs/galenic_form.rb +18 -0
- data/lib/oddb/persistence/odba/drugs/galenic_group.rb +13 -0
- data/lib/oddb/persistence/odba/drugs/package.rb +25 -0
- data/lib/oddb/persistence/odba/drugs/product.rb +13 -0
- data/lib/oddb/persistence/odba/drugs/sequence.rb +21 -0
- data/lib/oddb/persistence/odba/drugs/substance.rb +21 -0
- data/lib/oddb/persistence/odba/drugs/substance_group.rb +13 -0
- data/lib/oddb/persistence/odba/drugs/unit.rb +13 -0
- data/lib/oddb/persistence/odba/export.rb +26 -0
- data/lib/oddb/persistence/odba/model.rb +68 -0
- data/lib/oddb/persistence/odba/text/document.rb +11 -0
- data/lib/oddb/persistence/odba/util/code.rb +11 -0
- data/lib/oddb/persistence/odba/util/m10l_document.rb +13 -0
- data/lib/oddb/persistence/og.rb +16 -0
- data/lib/oddb/persistence/og/drugs/composition.rb +14 -0
- data/lib/oddb/persistence/og/drugs/product.rb +14 -0
- data/lib/oddb/persistence/og/drugs/sequence.rb +15 -0
- data/lib/oddb/persistence/og/model.rb +25 -0
- data/lib/oddb/persistence/og/util/multilingual.rb +13 -0
- data/lib/oddb/redist/rtf_tools/reader.rb +139 -0
- data/lib/oddb/remote/business/company.rb +17 -0
- data/lib/oddb/remote/drugs/active_agent.rb +27 -0
- data/lib/oddb/remote/drugs/atc.rb +31 -0
- data/lib/oddb/remote/drugs/dose.rb +8 -0
- data/lib/oddb/remote/drugs/galenic_form.rb +24 -0
- data/lib/oddb/remote/drugs/package.rb +128 -0
- data/lib/oddb/remote/drugs/part.rb +30 -0
- data/lib/oddb/remote/drugs/substance.rb +20 -0
- data/lib/oddb/remote/drugs/unit.rb +20 -0
- data/lib/oddb/remote/object.rb +36 -0
- data/lib/oddb/text/chapter.rb +23 -0
- data/lib/oddb/text/document.rb +42 -0
- data/lib/oddb/text/format.rb +37 -0
- data/lib/oddb/text/paragraph.rb +53 -0
- data/lib/oddb/text/picture.rb +89 -0
- data/lib/oddb/text/table.rb +68 -0
- data/lib/oddb/util.rb +9 -0
- data/lib/oddb/util/annotated_list.rb +37 -0
- data/lib/oddb/util/code.rb +69 -0
- data/lib/oddb/util/comparison.rb +36 -0
- data/lib/oddb/util/download.rb +17 -0
- data/lib/oddb/util/exporter.rb +8 -0
- data/lib/oddb/util/feedback.rb +23 -0
- data/lib/oddb/util/ipn.rb +53 -0
- data/lib/oddb/util/job.rb +23 -0
- data/lib/oddb/util/logger.rb +20 -0
- data/lib/oddb/util/m10l_document.rb +41 -0
- data/lib/oddb/util/mail.rb +87 -0
- data/lib/oddb/util/money.rb +64 -0
- data/lib/oddb/util/multilingual.rb +70 -0
- data/lib/oddb/util/quanty.rb +3 -0
- data/lib/oddb/util/quanty/fact.rb +242 -0
- data/lib/oddb/util/quanty/main.rb +164 -0
- data/lib/oddb/util/quanty/parse.rb +872 -0
- data/lib/oddb/util/quanty/units.dump +0 -0
- data/lib/oddb/util/server.rb +150 -0
- data/lib/oddb/util/smtp_tls.rb +58 -0
- data/lib/oddb/util/updater.rb +161 -0
- data/lib/oddb/util/ydim.rb +110 -0
- data/lib/oddb/util/yus.rb +46 -0
- data/test/business/test_company.rb +29 -0
- data/test/business/test_grant_download.rb +29 -0
- data/test/drugs/test_active_agent.rb +53 -0
- data/test/drugs/test_atc.rb +54 -0
- data/test/drugs/test_composition.rb +88 -0
- data/test/drugs/test_ddd.rb +22 -0
- data/test/drugs/test_dose.rb +189 -0
- data/test/drugs/test_galenic_form.rb +41 -0
- data/test/drugs/test_package.rb +172 -0
- data/test/drugs/test_part.rb +32 -0
- data/test/drugs/test_product.rb +31 -0
- data/test/drugs/test_sequence.rb +140 -0
- data/test/drugs/test_substance.rb +51 -0
- data/test/drugs/test_substance_group.rb +27 -0
- data/test/export/test_rss.rb +86 -0
- data/test/export/test_server.rb +163 -0
- data/test/export/test_xls.rb +146 -0
- data/test/export/test_yaml.rb +120 -0
- data/test/import/data/csv/products.csv +11 -0
- data/test/import/data/html/dimdi_index.html +400 -0
- data/test/import/data/html/gkv/Befreiungsliste_Arzneimittel_Versicherte.gkvnet +508 -0
- data/test/import/data/html/pharma24/1337397.html +754 -0
- data/test/import/data/html/pharma24/842756.html +570 -0
- data/test/import/data/html/pharma24/ac-page-10.html +2999 -0
- data/test/import/data/html/pharma24/ac-page-11.html +2999 -0
- data/test/import/data/html/pharma24/ac-page-12.html +2999 -0
- data/test/import/data/html/pharma24/ac-page-13.html +2999 -0
- data/test/import/data/html/pharma24/ac-page-14.html +2999 -0
- data/test/import/data/html/pharma24/ac-page-15.html +3011 -0
- data/test/import/data/html/pharma24/ac-page-16.html +3050 -0
- data/test/import/data/html/pharma24/ac-page-17.html +3285 -0
- data/test/import/data/html/pharma24/ac-page-18.html +3109 -0
- data/test/import/data/html/pharma24/ac-page-19.html +3126 -0
- data/test/import/data/html/pharma24/ac-page-2.html +3005 -0
- data/test/import/data/html/pharma24/ac-page-20.html +3007 -0
- data/test/import/data/html/pharma24/ac-page-21.html +2999 -0
- data/test/import/data/html/pharma24/ac-page-22.html +2999 -0
- data/test/import/data/html/pharma24/ac-page-23.html +3055 -0
- data/test/import/data/html/pharma24/ac-page-24.html +2999 -0
- data/test/import/data/html/pharma24/ac-page-25.html +3004 -0
- data/test/import/data/html/pharma24/ac-page-26.html +2999 -0
- data/test/import/data/html/pharma24/ac-page-27.html +3167 -0
- data/test/import/data/html/pharma24/ac-page-28.html +3236 -0
- data/test/import/data/html/pharma24/ac-page-29.html +3110 -0
- data/test/import/data/html/pharma24/ac-page-3.html +2999 -0
- data/test/import/data/html/pharma24/ac-page-30.html +2999 -0
- data/test/import/data/html/pharma24/ac-page-31.html +2999 -0
- data/test/import/data/html/pharma24/ac-page-32.html +2999 -0
- data/test/import/data/html/pharma24/ac-page-33.html +3001 -0
- data/test/import/data/html/pharma24/ac-page-34.html +2999 -0
- data/test/import/data/html/pharma24/ac-page-35.html +2999 -0
- data/test/import/data/html/pharma24/ac-page-36.html +2999 -0
- data/test/import/data/html/pharma24/ac-page-37.html +2999 -0
- data/test/import/data/html/pharma24/ac-page-38.html +3003 -0
- data/test/import/data/html/pharma24/ac-page-39.html +2999 -0
- data/test/import/data/html/pharma24/ac-page-4.html +2999 -0
- data/test/import/data/html/pharma24/ac-page-40.html +2999 -0
- data/test/import/data/html/pharma24/ac-page-41.html +2999 -0
- data/test/import/data/html/pharma24/ac-page-42.html +2999 -0
- data/test/import/data/html/pharma24/ac-page-43.html +2999 -0
- data/test/import/data/html/pharma24/ac-page-44.html +2999 -0
- data/test/import/data/html/pharma24/ac-page-45.html +2999 -0
- data/test/import/data/html/pharma24/ac-page-46.html +2999 -0
- data/test/import/data/html/pharma24/ac-page-47.html +2999 -0
- data/test/import/data/html/pharma24/ac-page-48.html +2999 -0
- data/test/import/data/html/pharma24/ac-page-49.html +2999 -0
- data/test/import/data/html/pharma24/ac-page-5.html +3168 -0
- data/test/import/data/html/pharma24/ac-page-50.html +2999 -0
- data/test/import/data/html/pharma24/ac-page-51.html +2999 -0
- data/test/import/data/html/pharma24/ac-page-52.html +3003 -0
- data/test/import/data/html/pharma24/ac-page-53.html +2999 -0
- data/test/import/data/html/pharma24/ac-page-54.html +3095 -0
- data/test/import/data/html/pharma24/ac-page-55.html +3041 -0
- data/test/import/data/html/pharma24/ac-page-56.html +2999 -0
- data/test/import/data/html/pharma24/ac-page-57.html +3001 -0
- data/test/import/data/html/pharma24/ac-page-58.html +3001 -0
- data/test/import/data/html/pharma24/ac-page-59.html +2999 -0
- data/test/import/data/html/pharma24/ac-page-6.html +3072 -0
- data/test/import/data/html/pharma24/ac-page-60.html +3001 -0
- data/test/import/data/html/pharma24/ac-page-61.html +3005 -0
- data/test/import/data/html/pharma24/ac-page-62.html +2999 -0
- data/test/import/data/html/pharma24/ac-page-63.html +3007 -0
- data/test/import/data/html/pharma24/ac-page-64.html +3007 -0
- data/test/import/data/html/pharma24/ac-page-65.html +2999 -0
- data/test/import/data/html/pharma24/ac-page-66.html +3011 -0
- data/test/import/data/html/pharma24/ac-page-67.html +3026 -0
- data/test/import/data/html/pharma24/ac-page-68.html +2999 -0
- data/test/import/data/html/pharma24/ac-page-69.html +3010 -0
- data/test/import/data/html/pharma24/ac-page-7.html +2999 -0
- data/test/import/data/html/pharma24/ac-page-70.html +3192 -0
- data/test/import/data/html/pharma24/ac-page-71.html +3133 -0
- data/test/import/data/html/pharma24/ac-page-72.html +2999 -0
- data/test/import/data/html/pharma24/ac-page-73.html +3227 -0
- data/test/import/data/html/pharma24/ac-page-74.html +3241 -0
- data/test/import/data/html/pharma24/ac-page-75.html +3227 -0
- data/test/import/data/html/pharma24/ac-page-76.html +3244 -0
- data/test/import/data/html/pharma24/ac-page-77.html +1164 -0
- data/test/import/data/html/pharma24/ac-page-8.html +2999 -0
- data/test/import/data/html/pharma24/ac-page-9.html +2999 -0
- data/test/import/data/html/pharma24/ac.html +2999 -0
- data/test/import/data/html/pharmnet/display.html +662 -0
- data/test/import/data/html/pharmnet/display1.html +625 -0
- data/test/import/data/html/pharmnet/display2.html +625 -0
- data/test/import/data/html/pharmnet/display3.html +625 -0
- data/test/import/data/html/pharmnet/display_tramal.html +634 -0
- data/test/import/data/html/pharmnet/empty_result.html +395 -0
- data/test/import/data/html/pharmnet/gate.html +246 -0
- data/test/import/data/html/pharmnet/index.html +258 -0
- data/test/import/data/html/pharmnet/paged_result_1.html +401 -0
- data/test/import/data/html/pharmnet/paged_result_2.html +401 -0
- data/test/import/data/html/pharmnet/result.html +401 -0
- data/test/import/data/html/pharmnet/search.html +865 -0
- data/test/import/data/html/pharmnet/search_filtered.html +182 -0
- data/test/import/data/html/whocc/A.html +56 -0
- data/test/import/data/html/whocc/A03.html +48 -0
- data/test/import/data/html/whocc/A03AB.html +48 -0
- data/test/import/data/html/whocc/A06AA.html +47 -0
- data/test/import/data/html/whocc/C03.html +47 -0
- data/test/import/data/html/whocc/login.html +77 -0
- data/test/import/data/mail/csv.mail +81 -0
- data/test/import/data/rtf/pharmnet/aarane.pi.rtf +648 -0
- data/test/import/data/rtf/pharmnet/ace_hemmer_ratio.pi.rtf +324 -0
- data/test/import/data/rtf/pharmnet/ace_hemmer_ratio.rtf +4816 -0
- data/test/import/data/rtf/pharmnet/acemetacin.pi.rtf +388 -0
- data/test/import/data/rtf/pharmnet/acemit.pi.rtf +240 -0
- data/test/import/data/rtf/pharmnet/acerbon.pi.rtf +1257 -0
- data/test/import/data/rtf/pharmnet/acetylcystein.pi.rtf +323 -0
- data/test/import/data/rtf/pharmnet/aciclo.pi.rtf +287 -0
- data/test/import/data/rtf/pharmnet/aciclovir.pi.rtf +236 -0
- data/test/import/data/rtf/pharmnet/actrapid.pi.rtf +322 -0
- data/test/import/data/rtf/pharmnet/amlodipin.pi.rtf +452 -0
- data/test/import/data/rtf/pharmnet/amlodipin.rtf +473 -0
- data/test/import/data/rtf/pharmnet/aspirin.pi.rtf +313 -0
- data/test/import/data/rtf/pharmnet/aspirin.rtf +781 -0
- data/test/import/data/rtf/pharmnet/baymycard.pi.rtf +447 -0
- data/test/import/data/rtf/pharmnet/omeprazol.pi.rtf +510 -0
- data/test/import/data/rtf/pharmnet/omeprazol.rtf +9216 -0
- data/test/import/data/rtf/pharmnet/paroxetin.pi.rtf +678 -0
- data/test/import/data/rtf/pharmnet/selegilin.pi.rtf +312 -0
- data/test/import/data/rtf/pharmnet/selegilin.rtf +683 -0
- data/test/import/data/rtf/pharmnet/valium.pi.rtf +387 -0
- data/test/import/data/txt/gkv/gkv_p1.txt +17 -0
- data/test/import/data/xls/darform_010706.xls +0 -0
- data/test/import/data/xls/fb010706.xls +0 -0
- data/test/import/data/xls/liste_zuzahlungsbefreite_arzneimittel_suchfunktion.xls +0 -0
- data/test/import/data/xls/wirkkurz_010406.xls +0 -0
- data/test/import/data/xml/ATC_2006.xml +47 -0
- data/test/import/data/xml/ATC_2006_ddd.xml +35 -0
- data/test/import/test_dimdi.rb +323 -0
- data/test/import/test_excel.rb +31 -0
- data/test/import/test_gkv.rb +260 -0
- data/test/import/test_pharma24.rb +112 -0
- data/test/import/test_pharmnet.rb +980 -0
- data/test/import/test_rtf.rb +37 -0
- data/test/import/test_whocc.rb +314 -0
- data/test/remote/drugs/test_active_agent.rb +36 -0
- data/test/selenium/selenium-server.jar +0 -0
- data/test/selenium/test_atc_browser.rb +121 -0
- data/test/selenium/test_atc_guidelines.rb +95 -0
- data/test/selenium/test_collect.rb +137 -0
- data/test/selenium/test_compare.rb +294 -0
- data/test/selenium/test_fachinfo.rb +128 -0
- data/test/selenium/test_feedback.rb +192 -0
- data/test/selenium/test_init.rb +64 -0
- data/test/selenium/test_limit.rb +304 -0
- data/test/selenium/test_login.rb +67 -0
- data/test/selenium/test_package.rb +516 -0
- data/test/selenium/test_patinfo.rb +128 -0
- data/test/selenium/test_product.rb +80 -0
- data/test/selenium/test_products.rb +141 -0
- data/test/selenium/test_search.rb +933 -0
- data/test/selenium/test_sequence.rb +513 -0
- data/test/selenium/unit.rb +190 -0
- data/test/stub/http_server.rb +144 -0
- data/test/stub/model.rb +173 -0
- data/test/suite.rb +15 -0
- data/test/test_model.rb +83 -0
- data/test/util/test_code.rb +74 -0
- data/test/util/test_ipn.rb +117 -0
- data/test/util/test_mail.rb +85 -0
- data/test/util/test_multilingual.rb +97 -0
- data/test/util/test_server.rb +94 -0
- data/test/util/test_updater.rb +130 -0
- data/test/util/test_ydim.rb +115 -0
- data/test/util/test_yus.rb +79 -0
- metadata +568 -0
@@ -0,0 +1,872 @@
|
|
1
|
+
#
|
2
|
+
# DO NOT MODIFY!!!!
|
3
|
+
# This file is automatically generated by racc 1.4.5
|
4
|
+
# from racc grammer file "parse.y".
|
5
|
+
#
|
6
|
+
#
|
7
|
+
# lib/quanty/parse.rb: generated by racc (runtime embedded)
|
8
|
+
#
|
9
|
+
###### racc/parser.rb begin
|
10
|
+
unless $".index 'racc/parser.rb'
|
11
|
+
$".push 'racc/parser.rb'
|
12
|
+
|
13
|
+
self.class.module_eval <<'..end racc/parser.rb modeval..id72f10a7251', 'racc/parser.rb', 1
|
14
|
+
#
|
15
|
+
# $Id: parser.rb,v 1.7 2005/11/20 17:31:32 aamine Exp $
|
16
|
+
#
|
17
|
+
# Copyright (c) 1999-2005 Minero Aoki
|
18
|
+
#
|
19
|
+
# This program is free software.
|
20
|
+
# You can distribute/modify this program under the same terms of ruby.
|
21
|
+
#
|
22
|
+
# As a special exception, when this code is copied by Racc
|
23
|
+
# into a Racc output file, you may use that output file
|
24
|
+
# without restriction.
|
25
|
+
#
|
26
|
+
|
27
|
+
unless defined?(NotImplementedError)
|
28
|
+
NotImplementedError = NotImplementError
|
29
|
+
end
|
30
|
+
|
31
|
+
module Racc
|
32
|
+
class ParseError < StandardError; end
|
33
|
+
end
|
34
|
+
unless defined?(::ParseError)
|
35
|
+
ParseError = Racc::ParseError
|
36
|
+
end
|
37
|
+
|
38
|
+
module Racc
|
39
|
+
|
40
|
+
unless defined?(Racc_No_Extentions)
|
41
|
+
Racc_No_Extentions = false
|
42
|
+
end
|
43
|
+
|
44
|
+
class Parser
|
45
|
+
|
46
|
+
Racc_Runtime_Version = '1.4.5'
|
47
|
+
Racc_Runtime_Revision = '$Revision: 1.7 $'.split[1]
|
48
|
+
|
49
|
+
Racc_Runtime_Core_Version_R = '1.4.5'
|
50
|
+
Racc_Runtime_Core_Revision_R = '$Revision: 1.7 $'.split[1]
|
51
|
+
begin
|
52
|
+
require 'racc/cparse'
|
53
|
+
# Racc_Runtime_Core_Version_C = (defined in extention)
|
54
|
+
Racc_Runtime_Core_Revision_C = Racc_Runtime_Core_Id_C.split[2]
|
55
|
+
unless new.respond_to?(:_racc_do_parse_c, true)
|
56
|
+
raise LoadError, 'old cparse.so'
|
57
|
+
end
|
58
|
+
if Racc_No_Extentions
|
59
|
+
raise LoadError, 'selecting ruby version of racc runtime core'
|
60
|
+
end
|
61
|
+
|
62
|
+
Racc_Main_Parsing_Routine = :_racc_do_parse_c
|
63
|
+
Racc_YY_Parse_Method = :_racc_yyparse_c
|
64
|
+
Racc_Runtime_Core_Version = Racc_Runtime_Core_Version_C
|
65
|
+
Racc_Runtime_Core_Revision = Racc_Runtime_Core_Revision_C
|
66
|
+
Racc_Runtime_Type = 'c'
|
67
|
+
rescue LoadError
|
68
|
+
Racc_Main_Parsing_Routine = :_racc_do_parse_rb
|
69
|
+
Racc_YY_Parse_Method = :_racc_yyparse_rb
|
70
|
+
Racc_Runtime_Core_Version = Racc_Runtime_Core_Version_R
|
71
|
+
Racc_Runtime_Core_Revision = Racc_Runtime_Core_Revision_R
|
72
|
+
Racc_Runtime_Type = 'ruby'
|
73
|
+
end
|
74
|
+
|
75
|
+
def Parser.racc_runtime_type
|
76
|
+
Racc_Runtime_Type
|
77
|
+
end
|
78
|
+
|
79
|
+
private
|
80
|
+
|
81
|
+
def _racc_setup
|
82
|
+
@yydebug = false unless self.class::Racc_debug_parser
|
83
|
+
@yydebug = false unless defined?(@yydebug)
|
84
|
+
if @yydebug
|
85
|
+
@racc_debug_out = $stderr unless defined?(@racc_debug_out)
|
86
|
+
@racc_debug_out ||= $stderr
|
87
|
+
end
|
88
|
+
arg = self.class::Racc_arg
|
89
|
+
arg[13] = true if arg.size < 14
|
90
|
+
arg
|
91
|
+
end
|
92
|
+
|
93
|
+
def _racc_init_sysvars
|
94
|
+
@racc_state = [0]
|
95
|
+
@racc_tstack = []
|
96
|
+
@racc_vstack = []
|
97
|
+
|
98
|
+
@racc_t = nil
|
99
|
+
@racc_val = nil
|
100
|
+
|
101
|
+
@racc_read_next = true
|
102
|
+
|
103
|
+
@racc_user_yyerror = false
|
104
|
+
@racc_error_status = 0
|
105
|
+
end
|
106
|
+
|
107
|
+
###
|
108
|
+
### do_parse
|
109
|
+
###
|
110
|
+
|
111
|
+
def do_parse
|
112
|
+
__send__(Racc_Main_Parsing_Routine, _racc_setup(), false)
|
113
|
+
end
|
114
|
+
|
115
|
+
def next_token
|
116
|
+
raise NotImplementedError, "#{self.class}\#next_token is not defined"
|
117
|
+
end
|
118
|
+
|
119
|
+
def _racc_do_parse_rb(arg, in_debug)
|
120
|
+
action_table, action_check, action_default, action_pointer,
|
121
|
+
goto_table, goto_check, goto_default, goto_pointer,
|
122
|
+
nt_base, reduce_table, token_table, shift_n,
|
123
|
+
reduce_n, use_result, * = arg
|
124
|
+
|
125
|
+
_racc_init_sysvars
|
126
|
+
tok = act = i = nil
|
127
|
+
nerr = 0
|
128
|
+
|
129
|
+
catch(:racc_end_parse) {
|
130
|
+
while true
|
131
|
+
if i = action_pointer[@racc_state[-1]]
|
132
|
+
if @racc_read_next
|
133
|
+
if @racc_t != 0 # not EOF
|
134
|
+
tok, @racc_val = next_token()
|
135
|
+
unless tok # EOF
|
136
|
+
@racc_t = 0
|
137
|
+
else
|
138
|
+
@racc_t = (token_table[tok] or 1) # error token
|
139
|
+
end
|
140
|
+
racc_read_token(@racc_t, tok, @racc_val) if @yydebug
|
141
|
+
@racc_read_next = false
|
142
|
+
end
|
143
|
+
end
|
144
|
+
i += @racc_t
|
145
|
+
unless i >= 0 and
|
146
|
+
act = action_table[i] and
|
147
|
+
action_check[i] == @racc_state[-1]
|
148
|
+
act = action_default[@racc_state[-1]]
|
149
|
+
end
|
150
|
+
else
|
151
|
+
act = action_default[@racc_state[-1]]
|
152
|
+
end
|
153
|
+
while act = _racc_evalact(act, arg)
|
154
|
+
;
|
155
|
+
end
|
156
|
+
end
|
157
|
+
}
|
158
|
+
end
|
159
|
+
|
160
|
+
###
|
161
|
+
### yyparse
|
162
|
+
###
|
163
|
+
|
164
|
+
def yyparse(recv, mid)
|
165
|
+
__send__(Racc_YY_Parse_Method, recv, mid, _racc_setup(), true)
|
166
|
+
end
|
167
|
+
|
168
|
+
def _racc_yyparse_rb(recv, mid, arg, c_debug)
|
169
|
+
action_table, action_check, action_default, action_pointer,
|
170
|
+
goto_table, goto_check, goto_default, goto_pointer,
|
171
|
+
nt_base, reduce_table, token_table, shift_n,
|
172
|
+
reduce_n, use_result, * = arg
|
173
|
+
|
174
|
+
_racc_init_sysvars
|
175
|
+
tok = nil
|
176
|
+
act = nil
|
177
|
+
i = nil
|
178
|
+
nerr = 0
|
179
|
+
|
180
|
+
catch(:racc_end_parse) {
|
181
|
+
until i = action_pointer[@racc_state[-1]]
|
182
|
+
while act = _racc_evalact(action_default[@racc_state[-1]], arg)
|
183
|
+
;
|
184
|
+
end
|
185
|
+
end
|
186
|
+
recv.__send__(mid) do |tok, val|
|
187
|
+
unless tok
|
188
|
+
@racc_t = 0
|
189
|
+
else
|
190
|
+
@racc_t = (token_table[tok] or 1) # error token
|
191
|
+
end
|
192
|
+
@racc_val = val
|
193
|
+
@racc_read_next = false
|
194
|
+
|
195
|
+
i += @racc_t
|
196
|
+
unless i >= 0 and
|
197
|
+
act = action_table[i] and
|
198
|
+
action_check[i] == @racc_state[-1]
|
199
|
+
act = action_default[@racc_state[-1]]
|
200
|
+
end
|
201
|
+
while act = _racc_evalact(act, arg)
|
202
|
+
;
|
203
|
+
end
|
204
|
+
|
205
|
+
while not (i = action_pointer[@racc_state[-1]]) or
|
206
|
+
not @racc_read_next or
|
207
|
+
@racc_t == 0 # $
|
208
|
+
unless i and i += @racc_t and
|
209
|
+
i >= 0 and
|
210
|
+
act = action_table[i] and
|
211
|
+
action_check[i] == @racc_state[-1]
|
212
|
+
act = action_default[@racc_state[-1]]
|
213
|
+
end
|
214
|
+
while act = _racc_evalact(act, arg)
|
215
|
+
;
|
216
|
+
end
|
217
|
+
end
|
218
|
+
end
|
219
|
+
}
|
220
|
+
end
|
221
|
+
|
222
|
+
###
|
223
|
+
### common
|
224
|
+
###
|
225
|
+
|
226
|
+
def _racc_evalact(act, arg)
|
227
|
+
action_table, action_check, action_default, action_pointer,
|
228
|
+
goto_table, goto_check, goto_default, goto_pointer,
|
229
|
+
nt_base, reduce_table, token_table, shift_n,
|
230
|
+
reduce_n, use_result, * = arg
|
231
|
+
nerr = 0 # tmp
|
232
|
+
|
233
|
+
if act > 0 and act < shift_n
|
234
|
+
#
|
235
|
+
# shift
|
236
|
+
#
|
237
|
+
if @racc_error_status > 0
|
238
|
+
@racc_error_status -= 1 unless @racc_t == 1 # error token
|
239
|
+
end
|
240
|
+
@racc_vstack.push @racc_val
|
241
|
+
@racc_state.push act
|
242
|
+
@racc_read_next = true
|
243
|
+
if @yydebug
|
244
|
+
@racc_tstack.push @racc_t
|
245
|
+
racc_shift @racc_t, @racc_tstack, @racc_vstack
|
246
|
+
end
|
247
|
+
|
248
|
+
elsif act < 0 and act > -reduce_n
|
249
|
+
#
|
250
|
+
# reduce
|
251
|
+
#
|
252
|
+
code = catch(:racc_jump) {
|
253
|
+
@racc_state.push _racc_do_reduce(arg, act)
|
254
|
+
false
|
255
|
+
}
|
256
|
+
if code
|
257
|
+
case code
|
258
|
+
when 1 # yyerror
|
259
|
+
@racc_user_yyerror = true # user_yyerror
|
260
|
+
return -reduce_n
|
261
|
+
when 2 # yyaccept
|
262
|
+
return shift_n
|
263
|
+
else
|
264
|
+
raise '[Racc Bug] unknown jump code'
|
265
|
+
end
|
266
|
+
end
|
267
|
+
|
268
|
+
elsif act == shift_n
|
269
|
+
#
|
270
|
+
# accept
|
271
|
+
#
|
272
|
+
racc_accept if @yydebug
|
273
|
+
throw :racc_end_parse, @racc_vstack[0]
|
274
|
+
|
275
|
+
elsif act == -reduce_n
|
276
|
+
#
|
277
|
+
# error
|
278
|
+
#
|
279
|
+
case @racc_error_status
|
280
|
+
when 0
|
281
|
+
unless arg[21] # user_yyerror
|
282
|
+
nerr += 1
|
283
|
+
on_error @racc_t, @racc_val, @racc_vstack
|
284
|
+
end
|
285
|
+
when 3
|
286
|
+
if @racc_t == 0 # is $
|
287
|
+
throw :racc_end_parse, nil
|
288
|
+
end
|
289
|
+
@racc_read_next = true
|
290
|
+
end
|
291
|
+
@racc_user_yyerror = false
|
292
|
+
@racc_error_status = 3
|
293
|
+
while true
|
294
|
+
if i = action_pointer[@racc_state[-1]]
|
295
|
+
i += 1 # error token
|
296
|
+
if i >= 0 and
|
297
|
+
(act = action_table[i]) and
|
298
|
+
action_check[i] == @racc_state[-1]
|
299
|
+
break
|
300
|
+
end
|
301
|
+
end
|
302
|
+
throw :racc_end_parse, nil if @racc_state.size <= 1
|
303
|
+
@racc_state.pop
|
304
|
+
@racc_vstack.pop
|
305
|
+
if @yydebug
|
306
|
+
@racc_tstack.pop
|
307
|
+
racc_e_pop @racc_state, @racc_tstack, @racc_vstack
|
308
|
+
end
|
309
|
+
end
|
310
|
+
return act
|
311
|
+
|
312
|
+
else
|
313
|
+
raise "[Racc Bug] unknown action #{act.inspect}"
|
314
|
+
end
|
315
|
+
|
316
|
+
racc_next_state(@racc_state[-1], @racc_state) if @yydebug
|
317
|
+
|
318
|
+
nil
|
319
|
+
end
|
320
|
+
|
321
|
+
def _racc_do_reduce(arg, act)
|
322
|
+
action_table, action_check, action_default, action_pointer,
|
323
|
+
goto_table, goto_check, goto_default, goto_pointer,
|
324
|
+
nt_base, reduce_table, token_table, shift_n,
|
325
|
+
reduce_n, use_result, * = arg
|
326
|
+
state = @racc_state
|
327
|
+
vstack = @racc_vstack
|
328
|
+
tstack = @racc_tstack
|
329
|
+
|
330
|
+
i = act * -3
|
331
|
+
len = reduce_table[i]
|
332
|
+
reduce_to = reduce_table[i+1]
|
333
|
+
method_id = reduce_table[i+2]
|
334
|
+
void_array = []
|
335
|
+
|
336
|
+
tmp_t = tstack[-len, len] if @yydebug
|
337
|
+
tmp_v = vstack[-len, len]
|
338
|
+
tstack[-len, len] = void_array if @yydebug
|
339
|
+
vstack[-len, len] = void_array
|
340
|
+
state[-len, len] = void_array
|
341
|
+
|
342
|
+
# tstack must be updated AFTER method call
|
343
|
+
if use_result
|
344
|
+
vstack.push __send__(method_id, tmp_v, vstack, tmp_v[0])
|
345
|
+
else
|
346
|
+
vstack.push __send__(method_id, tmp_v, vstack)
|
347
|
+
end
|
348
|
+
tstack.push reduce_to
|
349
|
+
|
350
|
+
racc_reduce(tmp_t, reduce_to, tstack, vstack) if @yydebug
|
351
|
+
|
352
|
+
k1 = reduce_to - nt_base
|
353
|
+
if i = goto_pointer[k1]
|
354
|
+
i += state[-1]
|
355
|
+
if i >= 0 and (curstate = goto_table[i]) and goto_check[i] == k1
|
356
|
+
return curstate
|
357
|
+
end
|
358
|
+
end
|
359
|
+
goto_default[k1]
|
360
|
+
end
|
361
|
+
|
362
|
+
def on_error(t, val, vstack)
|
363
|
+
raise ParseError, sprintf("\nparse error on value %s (%s)",
|
364
|
+
val.inspect, token_to_str(t) || '?')
|
365
|
+
end
|
366
|
+
|
367
|
+
def yyerror
|
368
|
+
throw :racc_jump, 1
|
369
|
+
end
|
370
|
+
|
371
|
+
def yyaccept
|
372
|
+
throw :racc_jump, 2
|
373
|
+
end
|
374
|
+
|
375
|
+
def yyerrok
|
376
|
+
@racc_error_status = 0
|
377
|
+
end
|
378
|
+
|
379
|
+
#
|
380
|
+
# for debugging output
|
381
|
+
#
|
382
|
+
|
383
|
+
def racc_read_token(t, tok, val)
|
384
|
+
@racc_debug_out.print 'read '
|
385
|
+
@racc_debug_out.print tok.inspect, '(', racc_token2str(t), ') '
|
386
|
+
@racc_debug_out.puts val.inspect
|
387
|
+
@racc_debug_out.puts
|
388
|
+
end
|
389
|
+
|
390
|
+
def racc_shift(tok, tstack, vstack)
|
391
|
+
@racc_debug_out.puts "shift #{racc_token2str tok}"
|
392
|
+
racc_print_stacks tstack, vstack
|
393
|
+
@racc_debug_out.puts
|
394
|
+
end
|
395
|
+
|
396
|
+
def racc_reduce(toks, sim, tstack, vstack)
|
397
|
+
out = @racc_debug_out
|
398
|
+
out.print 'reduce '
|
399
|
+
if toks.empty?
|
400
|
+
out.print ' <none>'
|
401
|
+
else
|
402
|
+
toks.each {|t| out.print ' ', racc_token2str(t) }
|
403
|
+
end
|
404
|
+
out.puts " --> #{racc_token2str(sim)}"
|
405
|
+
|
406
|
+
racc_print_stacks tstack, vstack
|
407
|
+
@racc_debug_out.puts
|
408
|
+
end
|
409
|
+
|
410
|
+
def racc_accept
|
411
|
+
@racc_debug_out.puts 'accept'
|
412
|
+
@racc_debug_out.puts
|
413
|
+
end
|
414
|
+
|
415
|
+
def racc_e_pop(state, tstack, vstack)
|
416
|
+
@racc_debug_out.puts 'error recovering mode: pop token'
|
417
|
+
racc_print_states state
|
418
|
+
racc_print_stacks tstack, vstack
|
419
|
+
@racc_debug_out.puts
|
420
|
+
end
|
421
|
+
|
422
|
+
def racc_next_state(curstate, state)
|
423
|
+
@racc_debug_out.puts "goto #{curstate}"
|
424
|
+
racc_print_states state
|
425
|
+
@racc_debug_out.puts
|
426
|
+
end
|
427
|
+
|
428
|
+
def racc_print_stacks(t, v)
|
429
|
+
out = @racc_debug_out
|
430
|
+
out.print ' ['
|
431
|
+
t.each_index do |i|
|
432
|
+
out.print ' (', racc_token2str(t[i]), ' ', v[i].inspect, ')'
|
433
|
+
end
|
434
|
+
out.puts ' ]'
|
435
|
+
end
|
436
|
+
|
437
|
+
def racc_print_states(s)
|
438
|
+
out = @racc_debug_out
|
439
|
+
out.print ' ['
|
440
|
+
s.each {|st| out.print ' ', st }
|
441
|
+
out.puts ' ]'
|
442
|
+
end
|
443
|
+
|
444
|
+
def racc_token2str(tok)
|
445
|
+
self.class::Racc_token_to_s_table[tok] or
|
446
|
+
raise "[Racc Bug] can't convert token #{tok} to string"
|
447
|
+
end
|
448
|
+
|
449
|
+
def token_to_str(t)
|
450
|
+
self.class::Racc_token_to_s_table[t]
|
451
|
+
end
|
452
|
+
|
453
|
+
end
|
454
|
+
|
455
|
+
end
|
456
|
+
..end racc/parser.rb modeval..id72f10a7251
|
457
|
+
end
|
458
|
+
###### racc/parser.rb end
|
459
|
+
|
460
|
+
|
461
|
+
|
462
|
+
# parse.y, quanty/parse.rb
|
463
|
+
#
|
464
|
+
# by Masahiro Tanaka <masa@ir.isas.ac.jp>
|
465
|
+
#
|
466
|
+
class Quanty
|
467
|
+
|
468
|
+
|
469
|
+
class Parse < Racc::Parser
|
470
|
+
|
471
|
+
module_eval <<'..end parse.y modeval..id3b357f8af2', 'parse.y', 73
|
472
|
+
|
473
|
+
def parse( str )
|
474
|
+
@q = []
|
475
|
+
|
476
|
+
while str.size > 0 do
|
477
|
+
#p str
|
478
|
+
case str
|
479
|
+
when /\A[\s\n]+/o
|
480
|
+
when /\A\d+\.?\d*([eE][+-]?\d+)?/o
|
481
|
+
@q.push [:NUMBER, $&.to_f]
|
482
|
+
when /\A[A-Za-z_]+([A-Za-z_0-9-]+[A-Za-z_])?/o
|
483
|
+
@q.push [:WORD, $&]
|
484
|
+
when /\A[$%'"]'?/o
|
485
|
+
@q.push [:WORD, $&]
|
486
|
+
when /\A\^|\A\*\*/o
|
487
|
+
@q.push [:POW, $&]
|
488
|
+
when /\A./o
|
489
|
+
@q.push [$&,$&]
|
490
|
+
end
|
491
|
+
str = $'
|
492
|
+
end
|
493
|
+
@q.push [false, '$end']
|
494
|
+
|
495
|
+
do_parse
|
496
|
+
end
|
497
|
+
|
498
|
+
def next_token
|
499
|
+
@q.shift
|
500
|
+
end
|
501
|
+
|
502
|
+
..end parse.y modeval..id3b357f8af2
|
503
|
+
|
504
|
+
##### racc 1.4.5 generates ###
|
505
|
+
|
506
|
+
racc_reduce_table = [
|
507
|
+
0, 0, :racc_error,
|
508
|
+
1, 18, :_reduce_none,
|
509
|
+
0, 18, :_reduce_2,
|
510
|
+
1, 18, :_reduce_3,
|
511
|
+
1, 20, :_reduce_none,
|
512
|
+
2, 20, :_reduce_5,
|
513
|
+
3, 20, :_reduce_6,
|
514
|
+
3, 20, :_reduce_7,
|
515
|
+
3, 20, :_reduce_8,
|
516
|
+
3, 20, :_reduce_9,
|
517
|
+
3, 20, :_reduce_10,
|
518
|
+
3, 20, :_reduce_11,
|
519
|
+
3, 20, :_reduce_12,
|
520
|
+
1, 19, :_reduce_none,
|
521
|
+
2, 19, :_reduce_14,
|
522
|
+
2, 19, :_reduce_15,
|
523
|
+
3, 19, :_reduce_16,
|
524
|
+
1, 21, :_reduce_none,
|
525
|
+
2, 21, :_reduce_18,
|
526
|
+
3, 21, :_reduce_19,
|
527
|
+
3, 21, :_reduce_20,
|
528
|
+
3, 21, :_reduce_21,
|
529
|
+
3, 21, :_reduce_22,
|
530
|
+
3, 21, :_reduce_23,
|
531
|
+
1, 22, :_reduce_none,
|
532
|
+
2, 22, :_reduce_25,
|
533
|
+
3, 22, :_reduce_26,
|
534
|
+
1, 23, :_reduce_27,
|
535
|
+
3, 23, :_reduce_28,
|
536
|
+
3, 23, :_reduce_29 ]
|
537
|
+
|
538
|
+
racc_reduce_n = 30
|
539
|
+
|
540
|
+
racc_shift_n = 54
|
541
|
+
|
542
|
+
racc_action_table = [
|
543
|
+
23, 22, 23, 24, 25, 26, 27, 29, 23, 21,
|
544
|
+
39, 5, 6, 23, 23, 23, 24, 25, 26, 27,
|
545
|
+
29, 34, 21, 23, 5, 6, 24, 25, 26, 27,
|
546
|
+
29, 41, 21, 23, 5, 6, 24, 37, 26, 27,
|
547
|
+
29, 38, 40, 39, 31, 32, 33, nil, 31, 32,
|
548
|
+
33, 21, 14, 5, 6, 21, nil, 5, 6, 12,
|
549
|
+
2, 13, 7, nil, nil, 12, 2, 4, 7, 5,
|
550
|
+
6, 12, 2, 4, 7, 5, 6, 12, 2, 4,
|
551
|
+
7, 5, 6, 12, 2, 4, 23, 5, 6, 23,
|
552
|
+
nil, 26, 27, 29, 26, 27, 29, 23, nil, nil,
|
553
|
+
23, nil, 26, 27, 29, 26, 27, 29, 12, 2,
|
554
|
+
4, nil, 5, 6, 12, 2, 4, 23, 5, 6,
|
555
|
+
24, 37, 26, 12, 2, 4, 23, 5, 6, 24,
|
556
|
+
37, 26, 21, nil, 5, 6, 21, nil, 5, 6,
|
557
|
+
12, 2, 13, 12, 2, 13, 12, 2, 13, 12,
|
558
|
+
2, 13, 12, 2, 13, 12, 2, 13, 12, 2,
|
559
|
+
13, 12, 2, 13 ]
|
560
|
+
|
561
|
+
racc_action_check = [
|
562
|
+
17, 8, 42, 17, 17, 17, 17, 17, 43, 17,
|
563
|
+
17, 17, 17, 19, 45, 46, 19, 19, 19, 19,
|
564
|
+
19, 12, 19, 10, 19, 19, 10, 10, 10, 10,
|
565
|
+
10, 22, 10, 35, 10, 10, 35, 35, 35, 35,
|
566
|
+
35, 16, 18, 35, 28, 28, 28, nil, 11, 11,
|
567
|
+
11, 28, 3, 28, 28, 11, nil, 11, 11, 3,
|
568
|
+
3, 3, 21, nil, nil, 21, 21, 21, 6, 21,
|
569
|
+
21, 6, 6, 6, 4, 6, 6, 4, 4, 4,
|
570
|
+
0, 4, 4, 0, 0, 0, 15, 0, 0, 51,
|
571
|
+
nil, 15, 15, 15, 51, 51, 51, 36, nil, nil,
|
572
|
+
53, nil, 36, 36, 36, 53, 53, 53, 33, 33,
|
573
|
+
33, nil, 33, 33, 32, 32, 32, 48, 32, 32,
|
574
|
+
48, 48, 48, 25, 25, 25, 47, 25, 25, 47,
|
575
|
+
47, 47, 31, nil, 31, 31, 7, nil, 7, 7,
|
576
|
+
29, 29, 29, 13, 13, 13, 23, 23, 23, 14,
|
577
|
+
14, 14, 26, 26, 26, 37, 37, 37, 27, 27,
|
578
|
+
27, 24, 24, 24 ]
|
579
|
+
|
580
|
+
racc_action_pointer = [
|
581
|
+
73, nil, nil, 49, 67, nil, 61, 124, 1, nil,
|
582
|
+
20, 43, 10, 133, 139, 83, 28, -3, 26, 10,
|
583
|
+
nil, 55, 31, 136, 151, 113, 142, 148, 39, 130,
|
584
|
+
nil, 120, 104, 98, nil, 30, 94, 145, nil, nil,
|
585
|
+
nil, nil, -1, 5, nil, 11, 12, 123, 114, nil,
|
586
|
+
nil, 86, nil, 97 ]
|
587
|
+
|
588
|
+
racc_action_default = [
|
589
|
+
-2, -17, -4, -24, -30, -27, -30, -30, -30, -1,
|
590
|
+
-3, -13, -30, -30, -30, -25, -30, -30, -30, -30,
|
591
|
+
-15, -30, -30, -30, -30, -30, -30, -30, -14, -30,
|
592
|
+
-18, -30, -30, -30, -5, -30, -26, -30, -28, -12,
|
593
|
+
-29, 54, -11, -10, -16, -9, -8, -6, -7, -19,
|
594
|
+
-20, -22, -21, -23 ]
|
595
|
+
|
596
|
+
racc_goto_table = [
|
597
|
+
10, 28, 8, 15, 17, 9, nil, nil, 28, nil,
|
598
|
+
28, 18, nil, 35, 36, nil, nil, 20, nil, nil,
|
599
|
+
nil, 30, nil, 42, 43, 45, 46, 47, nil, 48,
|
600
|
+
nil, nil, 51, 53, nil, 44, nil, 45, 30, nil,
|
601
|
+
nil, 49, 50, 52 ]
|
602
|
+
|
603
|
+
racc_goto_check = [
|
604
|
+
3, 4, 1, 3, 3, 2, nil, nil, 4, nil,
|
605
|
+
4, 2, nil, 3, 3, nil, nil, 5, nil, nil,
|
606
|
+
nil, 5, nil, 3, 3, 3, 3, 3, nil, 3,
|
607
|
+
nil, nil, 3, 3, nil, 5, nil, 3, 5, nil,
|
608
|
+
nil, 5, 5, 5 ]
|
609
|
+
|
610
|
+
racc_goto_pointer = [
|
611
|
+
nil, 2, 5, 0, -9, 10, nil ]
|
612
|
+
|
613
|
+
racc_goto_default = [
|
614
|
+
nil, nil, 16, 19, 11, 1, 3 ]
|
615
|
+
|
616
|
+
racc_token_table = {
|
617
|
+
false => 0,
|
618
|
+
Object.new => 1,
|
619
|
+
:UMINUS => 2,
|
620
|
+
:POW => 3,
|
621
|
+
:UPOW => 4,
|
622
|
+
"." => 5,
|
623
|
+
"*" => 6,
|
624
|
+
"/" => 7,
|
625
|
+
"|" => 8,
|
626
|
+
"+" => 9,
|
627
|
+
"-" => 10,
|
628
|
+
:NUMBER => 11,
|
629
|
+
"(" => 12,
|
630
|
+
")" => 13,
|
631
|
+
:WORD => 14,
|
632
|
+
"[" => 15,
|
633
|
+
"]" => 16 }
|
634
|
+
|
635
|
+
racc_use_result_var = true
|
636
|
+
|
637
|
+
racc_nt_base = 17
|
638
|
+
|
639
|
+
Racc_arg = [
|
640
|
+
racc_action_table,
|
641
|
+
racc_action_check,
|
642
|
+
racc_action_default,
|
643
|
+
racc_action_pointer,
|
644
|
+
racc_goto_table,
|
645
|
+
racc_goto_check,
|
646
|
+
racc_goto_default,
|
647
|
+
racc_goto_pointer,
|
648
|
+
racc_nt_base,
|
649
|
+
racc_reduce_table,
|
650
|
+
racc_token_table,
|
651
|
+
racc_shift_n,
|
652
|
+
racc_reduce_n,
|
653
|
+
racc_use_result_var ]
|
654
|
+
|
655
|
+
Racc_token_to_s_table = [
|
656
|
+
'$end',
|
657
|
+
'error',
|
658
|
+
'UMINUS',
|
659
|
+
'POW',
|
660
|
+
'UPOW',
|
661
|
+
'"."',
|
662
|
+
'"*"',
|
663
|
+
'"/"',
|
664
|
+
'"|"',
|
665
|
+
'"+"',
|
666
|
+
'"-"',
|
667
|
+
'NUMBER',
|
668
|
+
'"("',
|
669
|
+
'")"',
|
670
|
+
'WORD',
|
671
|
+
'"["',
|
672
|
+
'"]"',
|
673
|
+
'$start',
|
674
|
+
'target',
|
675
|
+
'val',
|
676
|
+
'num',
|
677
|
+
'seq',
|
678
|
+
'exp',
|
679
|
+
'unit']
|
680
|
+
|
681
|
+
Racc_debug_parser = false
|
682
|
+
|
683
|
+
##### racc system variables end #####
|
684
|
+
|
685
|
+
# reduce 0 omitted
|
686
|
+
|
687
|
+
# reduce 1 omitted
|
688
|
+
|
689
|
+
module_eval <<'.,.,', 'parse.y', 21
|
690
|
+
def _reduce_2( val, _values, result )
|
691
|
+
result = Quanty::Fact.new
|
692
|
+
result
|
693
|
+
end
|
694
|
+
.,.,
|
695
|
+
|
696
|
+
module_eval <<'.,.,', 'parse.y', 22
|
697
|
+
def _reduce_3( val, _values, result )
|
698
|
+
result = Quanty::Fact.new(val[0])
|
699
|
+
result
|
700
|
+
end
|
701
|
+
.,.,
|
702
|
+
|
703
|
+
# reduce 4 omitted
|
704
|
+
|
705
|
+
module_eval <<'.,.,', 'parse.y', 26
|
706
|
+
def _reduce_5( val, _values, result )
|
707
|
+
result = -val[1]
|
708
|
+
result
|
709
|
+
end
|
710
|
+
.,.,
|
711
|
+
|
712
|
+
module_eval <<'.,.,', 'parse.y', 27
|
713
|
+
def _reduce_6( val, _values, result )
|
714
|
+
result += val[2]
|
715
|
+
result
|
716
|
+
end
|
717
|
+
.,.,
|
718
|
+
|
719
|
+
module_eval <<'.,.,', 'parse.y', 28
|
720
|
+
def _reduce_7( val, _values, result )
|
721
|
+
result -= val[2]
|
722
|
+
result
|
723
|
+
end
|
724
|
+
.,.,
|
725
|
+
|
726
|
+
module_eval <<'.,.,', 'parse.y', 29
|
727
|
+
def _reduce_8( val, _values, result )
|
728
|
+
result /= val[2]
|
729
|
+
result
|
730
|
+
end
|
731
|
+
.,.,
|
732
|
+
|
733
|
+
module_eval <<'.,.,', 'parse.y', 30
|
734
|
+
def _reduce_9( val, _values, result )
|
735
|
+
result /= val[2]
|
736
|
+
result
|
737
|
+
end
|
738
|
+
.,.,
|
739
|
+
|
740
|
+
module_eval <<'.,.,', 'parse.y', 31
|
741
|
+
def _reduce_10( val, _values, result )
|
742
|
+
result *= val[2]
|
743
|
+
result
|
744
|
+
end
|
745
|
+
.,.,
|
746
|
+
|
747
|
+
module_eval <<'.,.,', 'parse.y', 32
|
748
|
+
def _reduce_11( val, _values, result )
|
749
|
+
result **= val[2]
|
750
|
+
result
|
751
|
+
end
|
752
|
+
.,.,
|
753
|
+
|
754
|
+
module_eval <<'.,.,', 'parse.y', 33
|
755
|
+
def _reduce_12( val, _values, result )
|
756
|
+
result = val[1]
|
757
|
+
result
|
758
|
+
end
|
759
|
+
.,.,
|
760
|
+
|
761
|
+
# reduce 13 omitted
|
762
|
+
|
763
|
+
module_eval <<'.,.,', 'parse.y', 37
|
764
|
+
def _reduce_14( val, _values, result )
|
765
|
+
result = val[1].fac!(val[0])
|
766
|
+
result
|
767
|
+
end
|
768
|
+
.,.,
|
769
|
+
|
770
|
+
module_eval <<'.,.,', 'parse.y', 38
|
771
|
+
def _reduce_15( val, _values, result )
|
772
|
+
result = val[1].pow!(-1)
|
773
|
+
result
|
774
|
+
end
|
775
|
+
.,.,
|
776
|
+
|
777
|
+
module_eval <<'.,.,', 'parse.y', 39
|
778
|
+
def _reduce_16( val, _values, result )
|
779
|
+
result = val[2].pow!(-1).fac!(val[0])
|
780
|
+
result
|
781
|
+
end
|
782
|
+
.,.,
|
783
|
+
|
784
|
+
# reduce 17 omitted
|
785
|
+
|
786
|
+
module_eval <<'.,.,', 'parse.y', 43
|
787
|
+
def _reduce_18( val, _values, result )
|
788
|
+
result.mul!(val[1])
|
789
|
+
result
|
790
|
+
end
|
791
|
+
.,.,
|
792
|
+
|
793
|
+
module_eval <<'.,.,', 'parse.y', 44
|
794
|
+
def _reduce_19( val, _values, result )
|
795
|
+
result.mul!(val[2])
|
796
|
+
result
|
797
|
+
end
|
798
|
+
.,.,
|
799
|
+
|
800
|
+
module_eval <<'.,.,', 'parse.y', 45
|
801
|
+
def _reduce_20( val, _values, result )
|
802
|
+
result.mul!(val[2])
|
803
|
+
result
|
804
|
+
end
|
805
|
+
.,.,
|
806
|
+
|
807
|
+
module_eval <<'.,.,', 'parse.y', 46
|
808
|
+
def _reduce_21( val, _values, result )
|
809
|
+
result.div!(val[2])
|
810
|
+
result
|
811
|
+
end
|
812
|
+
.,.,
|
813
|
+
|
814
|
+
module_eval <<'.,.,', 'parse.y', 47
|
815
|
+
def _reduce_22( val, _values, result )
|
816
|
+
result.fac!(val[2])
|
817
|
+
result
|
818
|
+
end
|
819
|
+
.,.,
|
820
|
+
|
821
|
+
module_eval <<'.,.,', 'parse.y', 48
|
822
|
+
def _reduce_23( val, _values, result )
|
823
|
+
result.fac!(val[2]**-1)
|
824
|
+
result
|
825
|
+
end
|
826
|
+
.,.,
|
827
|
+
|
828
|
+
# reduce 24 omitted
|
829
|
+
|
830
|
+
module_eval <<'.,.,', 'parse.y', 52
|
831
|
+
def _reduce_25( val, _values, result )
|
832
|
+
result.pow!(val[1])
|
833
|
+
result
|
834
|
+
end
|
835
|
+
.,.,
|
836
|
+
|
837
|
+
module_eval <<'.,.,', 'parse.y', 53
|
838
|
+
def _reduce_26( val, _values, result )
|
839
|
+
result.pow!(val[2])
|
840
|
+
result
|
841
|
+
end
|
842
|
+
.,.,
|
843
|
+
|
844
|
+
module_eval <<'.,.,', 'parse.y', 56
|
845
|
+
def _reduce_27( val, _values, result )
|
846
|
+
result = Quanty::Fact.new(val[0])
|
847
|
+
result
|
848
|
+
end
|
849
|
+
.,.,
|
850
|
+
|
851
|
+
module_eval <<'.,.,', 'parse.y', 57
|
852
|
+
def _reduce_28( val, _values, result )
|
853
|
+
result = val[1]
|
854
|
+
result
|
855
|
+
end
|
856
|
+
.,.,
|
857
|
+
|
858
|
+
module_eval <<'.,.,', 'parse.y', 58
|
859
|
+
def _reduce_29( val, _values, result )
|
860
|
+
result = val[1]
|
861
|
+
result
|
862
|
+
end
|
863
|
+
.,.,
|
864
|
+
|
865
|
+
def _reduce_none( val, _values, result )
|
866
|
+
result
|
867
|
+
end
|
868
|
+
|
869
|
+
end # class Parse
|
870
|
+
|
871
|
+
|
872
|
+
end # class Quanty
|