summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-07 04:48:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-07 04:48:34 +0000
commitd3b07d179267a553734faa62d990ca64c7756bb0 (patch)
tree74f5dccea2b73f379c090df5779cb8219dcdfcd2
parentAdding upstream version 0.11.2. (diff)
downloadlnav-upstream.tar.xz
lnav-upstream.zip
Adding upstream version 0.12.2.upstream/0.12.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rw-r--r--.circleci/config.yml32
-rw-r--r--.clang-tidy2
-rw-r--r--.github/ISSUE_TEMPLATE/bug_report.md3
-rw-r--r--.github/actions/muslbuilder/Dockerfile265
-rwxr-xr-x.github/actions/muslbuilder/entrypoint.sh10
-rw-r--r--.github/workflows/bins.yml83
-rw-r--r--.github/workflows/c-cpp.yml5
-rw-r--r--.github/workflows/check-md-links.yml11
-rw-r--r--.github/workflows/musl-build-image.yml45
-rw-r--r--.github/workflows/rpmbuild.yml2
-rw-r--r--.gitignore1
-rw-r--r--.readthedocs.yaml6
-rw-r--r--CMakeLists.txt6
-rw-r--r--Makefile.am9
-rw-r--r--NEWS.md353
-rw-r--r--README.md91
-rw-r--r--TESTS_ENVIRONMENT.in2
-rw-r--r--conanfile.py2
-rw-r--r--configure.ac22
-rw-r--r--demo/Dockerfile14
-rw-r--r--docs/02_downloads.md2
-rw-r--r--docs/Gemfile.lock15
-rw-r--r--docs/_config.yml5
-rw-r--r--docs/_posts/2018-04-05-linux-magazine-tutorial.md2
-rw-r--r--docs/_posts/2023-08-04-config-dump.md56
-rw-r--r--docs/_posts/2024-01-09-hammered.md324
-rw-r--r--docs/_posts/2024-03-29-prql-support.md51
-rw-r--r--docs/assets/images/lnav-prql-preview.pngbin0 -> 792294 bytes
-rw-r--r--docs/index.markdown4
-rw-r--r--docs/requirements.txt1
-rw-r--r--docs/schemas/config-v1.schema.json207
-rw-r--r--docs/schemas/event-log-msg-detected-v1.schema.json2
-rw-r--r--docs/schemas/format-v1.schema.json260
-rw-r--r--docs/source/_static/theme_overrides.css31
-rw-r--r--docs/source/cli.rst97
-rw-r--r--docs/source/commands.rst4
-rw-r--r--docs/source/conf.py9
-rw-r--r--docs/source/config.rst155
-rw-r--r--docs/source/cookbook.rst9
-rw-r--r--docs/source/formats.rst115
-rw-r--r--docs/source/hotkeys.rst26
-rw-r--r--docs/source/index.rst3
-rw-r--r--docs/source/intro.rst118
-rw-r--r--docs/source/lnav-gantt-1.pngbin0 -> 1575690 bytes
-rw-r--r--docs/source/lnav-gantt-2.pngbin0 -> 1409173 bytes
-rw-r--r--docs/source/lnav-intro-screen.pngbin0 -> 1739591 bytes
-rw-r--r--docs/source/lnav-make-check-log.pngbin0 -> 603097 bytes
-rw-r--r--docs/source/query-results.pngbin35595 -> 409140 bytes
-rw-r--r--docs/source/sqlext.rst43
-rw-r--r--docs/source/sqltab.rst31
-rw-r--r--docs/source/ui.rst179
-rw-r--r--docs/source/usage.rst101
-rw-r--r--example-scripts/report-demo.lnav4
-rw-r--r--lnav.187
-rw-r--r--m4/ax_cxx_compile_stdcxx.m476
-rw-r--r--m4/ax_pthread.m429
-rw-r--r--release/Makefile4
-rw-r--r--release/lnav.spec.in2
-rwxr-xr-xrelease/loggen.py6
-rw-r--r--snapcraft.yaml2
-rw-r--r--src/CMakeLists.txt136
-rw-r--r--src/Makefile.am96
-rw-r--r--src/all_logs_vtab.cc31
-rw-r--r--src/all_logs_vtab.hh2
-rw-r--r--src/archive_manager.cc73
-rw-r--r--src/archive_manager.hh20
-rw-r--r--src/base/CMakeLists.txt15
-rw-r--r--src/base/Makefile.am16
-rw-r--r--src/base/ansi_scrubber.cc325
-rw-r--r--src/base/ansi_scrubber.hh7
-rw-r--r--src/base/ansi_vars.hh41
-rw-r--r--src/base/attr_line.builder.cc54
-rw-r--r--src/base/attr_line.builder.hh19
-rw-r--r--src/base/attr_line.cc201
-rw-r--r--src/base/attr_line.hh300
-rw-r--r--src/base/attr_line.tests.cc24
-rw-r--r--src/base/auto_fd.cc248
-rw-r--r--src/base/auto_fd.hh168
-rw-r--r--src/base/auto_mem.hh12
-rw-r--r--src/base/auto_pid.hh21
-rw-r--r--src/base/color_spaces.cc176
-rw-r--r--src/base/color_spaces.hh96
-rw-r--r--src/base/date_time_scanner.cc117
-rw-r--r--src/base/date_time_scanner.cfg.hh43
-rw-r--r--src/base/date_time_scanner.hh19
-rw-r--r--src/base/from_trait.hh40
-rw-r--r--src/base/fs_util.cc62
-rw-r--r--src/base/fs_util.hh34
-rw-r--r--src/base/future_util.hh43
-rw-r--r--src/base/humanize.time.cc21
-rw-r--r--src/base/humanize.time.hh10
-rw-r--r--src/base/intern_string.cc166
-rw-r--r--src/base/intern_string.hh144
-rw-r--r--src/base/intern_string.tests.cc44
-rw-r--r--src/base/is_utf8.cc13
-rw-r--r--src/base/is_utf8.hh1
-rw-r--r--src/base/itertools.hh96
-rw-r--r--src/base/keycodes.hh42
-rw-r--r--src/base/line_range.hh164
-rw-r--r--src/base/lnav.console.cc143
-rw-r--r--src/base/lnav.console.hh28
-rw-r--r--src/base/lnav.gzip.hh15
-rw-r--r--src/base/lnav_log.cc2
-rw-r--r--src/base/map_util.hh126
-rw-r--r--src/base/math_util.hh82
-rw-r--r--src/base/network.tcp.hh1
-rw-r--r--src/base/piper.file.cc81
-rw-r--r--src/base/piper.file.hh (renamed from src/piper_proc.hh)78
-rw-r--r--src/base/string_attr_type.cc3
-rw-r--r--src/base/string_attr_type.hh83
-rw-r--r--src/base/string_util.cc124
-rw-r--r--src/base/string_util.hh68
-rw-r--r--src/base/string_util.tests.cc43
-rw-r--r--src/base/strnatcmp.c4
-rw-r--r--src/base/time_util.cc116
-rw-r--r--src/base/time_util.hh64
-rw-r--r--src/base/types.hh35
-rw-r--r--src/big_array.hh58
-rw-r--r--src/bookmarks.cc22
-rw-r--r--src/bookmarks.hh36
-rw-r--r--src/bookmarks.json.hh39
-rw-r--r--src/breadcrumb.hh12
-rw-r--r--src/breadcrumb_curses.cc278
-rw-r--r--src/breadcrumb_curses.hh42
-rw-r--r--src/column_namer.cc10
-rw-r--r--src/command_executor.cc392
-rw-r--r--src/command_executor.hh128
-rw-r--r--src/css-color-names.json150
-rw-r--r--src/curl_looper.cc9
-rw-r--r--src/curl_looper.hh9
-rw-r--r--src/data_parser.cc495
-rw-r--r--src/data_parser.hh14
-rw-r--r--src/data_scanner.cc140
-rw-r--r--src/data_scanner.hh97
-rw-r--r--src/data_scanner_re.cc92799
-rw-r--r--src/data_scanner_re.re318
-rw-r--r--src/db_sub_source.cc244
-rw-r--r--src/db_sub_source.hh40
-rw-r--r--src/document.sections.cc541
-rw-r--r--src/document.sections.hh48
-rw-r--r--src/dump_internals.cc15
-rw-r--r--src/elem_to_json.cc13
-rw-r--r--src/environ_vtab.cc30
-rw-r--r--src/extension-functions.cc3
-rw-r--r--src/field_overlay_source.cc355
-rw-r--r--src/field_overlay_source.hh45
-rw-r--r--src/file_collection.cc462
-rw-r--r--src/file_collection.hh73
-rw-r--r--src/file_converter_manager.cc (renamed from src/pcap_manager.cc)101
-rw-r--r--src/file_converter_manager.hh (renamed from src/pcap_manager.hh)19
-rw-r--r--src/file_format.cc78
-rw-r--r--src/file_format.hh14
-rw-r--r--src/file_options.cc144
-rw-r--r--src/file_options.hh81
-rw-r--r--src/file_vtab.cc58
-rw-r--r--src/files_sub_source.cc317
-rw-r--r--src/files_sub_source.hh31
-rw-r--r--src/filter_observer.cc2
-rw-r--r--src/filter_observer.hh2
-rw-r--r--src/filter_status_source.cc16
-rw-r--r--src/filter_sub_source.cc213
-rw-r--r--src/filter_sub_source.hh10
-rw-r--r--src/fmtlib/fmt/args.h2
-rw-r--r--src/fmtlib/fmt/chrono.h209
-rw-r--r--src/fmtlib/fmt/color.h9
-rw-r--r--src/fmtlib/fmt/compile.h111
-rw-r--r--src/fmtlib/fmt/core.h535
-rw-r--r--src/fmtlib/fmt/format-inl.h37
-rw-r--r--src/fmtlib/fmt/format.h593
-rw-r--r--src/fmtlib/fmt/os.h8
-rw-r--r--src/fmtlib/fmt/ostream.h10
-rw-r--r--src/fmtlib/fmt/printf.h256
-rw-r--r--src/fmtlib/fmt/ranges.h7
-rw-r--r--src/fmtlib/fmt/std.h210
-rw-r--r--src/fmtlib/fmt/xchar.h53
-rw-r--r--src/fmtlib/os.cc26
-rw-r--r--src/formats/access_log.json3
-rw-r--r--src/formats/block_log.json2
-rw-r--r--src/formats/bunyan_log.json2
-rw-r--r--src/formats/cloudvm_ram_log.json2
-rw-r--r--src/formats/esx_syslog_log.json30
-rw-r--r--src/formats/formats.am5
-rw-r--r--src/formats/github_events_log.json194
-rw-r--r--src/formats/java_log.json39
-rw-r--r--src/formats/nextcloud_log.json79
-rw-r--r--src/formats/nextflow_log.json33
-rw-r--r--src/formats/pcap_log.json14
-rw-r--r--src/formats/procstate_log.json4
-rw-r--r--src/formats/redis_log.json59
-rw-r--r--src/formats/sssd_log.json42
-rw-r--r--src/formats/strace_log.json5
-rw-r--r--src/formats/vmk_log.json19
-rw-r--r--src/formats/vmw_log.json126
-rw-r--r--src/formats/vmw_py_log.json5
-rw-r--r--src/formats/vmw_vc_svc_log.json50
-rw-r--r--src/formats/vpostgres_log.json51
-rw-r--r--src/fs-extension-functions.cc207
-rw-r--r--src/fstat_vtab.cc259
-rw-r--r--src/gantt_source.cc972
-rw-r--r--src/gantt_source.hh199
-rw-r--r--src/gantt_status_source.hh82
-rw-r--r--src/grep_proc.cc54
-rw-r--r--src/grep_proc.hh8
-rw-r--r--src/hasher.hh111
-rw-r--r--src/help.md50
-rw-r--r--src/help_text.cc18
-rw-r--r--src/help_text.hh33
-rw-r--r--src/help_text_formatter.cc171
-rw-r--r--src/help_text_formatter.hh4
-rw-r--r--src/highlighter.cc2
-rw-r--r--src/highlighter.hh6
-rw-r--r--src/hist_source.cc35
-rw-r--r--src/hist_source.hh84
-rw-r--r--src/hotkeys.cc305
-rw-r--r--src/hotkeys.hh2
-rw-r--r--src/init.sql22
-rw-r--r--src/input_dispatcher.cc21
-rw-r--r--src/input_dispatcher.hh10
-rw-r--r--src/internals/cmd-ref.rst186
-rw-r--r--src/internals/sql-ref.rst1331
-rw-r--r--src/json-extension-functions.cc72
-rw-r--r--src/keymaps/default-keymap.json32
-rw-r--r--src/keymaps/sv-keymap.json8
-rw-r--r--src/line_buffer.cc113
-rw-r--r--src/line_buffer.hh47
-rw-r--r--src/listview_curses.cc774
-rw-r--r--src/listview_curses.hh199
-rw-r--r--src/lnav.cc1366
-rw-r--r--src/lnav.hh54
-rw-r--r--src/lnav.indexing.cc110
-rw-r--r--src/lnav.indexing.hh10
-rw-r--r--src/lnav.management_cli.cc468
-rw-r--r--src/lnav_commands.cc2258
-rw-r--r--src/lnav_config.cc402
-rw-r--r--src/lnav_config.hh22
-rw-r--r--src/lnav_config_fwd.hh17
-rw-r--r--src/lnav_util.cc14
-rw-r--r--src/lnav_util.hh82
-rw-r--r--src/log.annotate.cc407
-rw-r--r--src/log.annotate.cfg.hh57
-rw-r--r--src/log.annotate.hh53
-rw-r--r--src/log.watch.cc21
-rw-r--r--src/log_actions.cc14
-rw-r--r--src/log_actions.hh10
-rw-r--r--src/log_data_helper.cc36
-rw-r--r--src/log_data_helper.hh1
-rw-r--r--src/log_data_table.cc7
-rw-r--r--src/log_data_table.hh2
-rw-r--r--src/log_format.cc1355
-rw-r--r--src/log_format.hh127
-rw-r--r--src/log_format_ext.hh50
-rw-r--r--src/log_format_fwd.hh101
-rw-r--r--src/log_format_impls.cc458
-rw-r--r--src/log_format_loader.cc218
-rw-r--r--src/log_level_re.cc1036
-rw-r--r--src/log_level_re.re1
-rw-r--r--src/log_search_table.cc20
-rw-r--r--src/log_vtab_impl.cc568
-rw-r--r--src/log_vtab_impl.hh7
-rw-r--r--src/logfile.cc423
-rw-r--r--src/logfile.hh58
-rw-r--r--src/logfile_fwd.hh42
-rw-r--r--src/logfile_sub_source.cc878
-rw-r--r--src/logfile_sub_source.hh363
-rw-r--r--src/md2attr_line.cc486
-rw-r--r--src/md2attr_line.hh7
-rw-r--r--src/md4cpp.cc32
-rw-r--r--src/md4cpp.hh17
-rw-r--r--src/network-extension-functions.cc2
-rw-r--r--src/pcrepp/CMakeLists.txt1
-rw-r--r--src/pcrepp/Makefile.am3
-rw-r--r--src/pcrepp/pcre2pp.cc25
-rw-r--r--src/pcrepp/pcre2pp.hh21
-rw-r--r--src/pcrepp/pcre2pp_fwd.hh41
-rw-r--r--src/piper.looper.cc485
-rw-r--r--src/piper.looper.cfg.hh47
-rw-r--r--src/piper.looper.hh152
-rw-r--r--src/piper_proc.cc237
-rw-r--r--src/plain_text_source.cc268
-rw-r--r--src/plain_text_source.hh8
-rw-r--r--src/pretty_printer.cc105
-rw-r--r--src/pretty_printer.hh18
-rw-r--r--src/preview_status_source.hh11
-rw-r--r--src/prql/prql.am5
-rw-r--r--src/prql/stats.prql48
-rw-r--r--src/prql/utils.prql5
-rw-r--r--src/ptimec.c43
-rw-r--r--src/ptimec.hh263
-rw-r--r--src/ptimec_rt.cc2
-rw-r--r--src/readline_callbacks.cc487
-rw-r--r--src/readline_callbacks.hh5
-rw-r--r--src/readline_context.hh53
-rw-r--r--src/readline_curses.cc492
-rw-r--r--src/readline_curses.hh11
-rw-r--r--src/readline_highlighters.cc119
-rw-r--r--src/readline_highlighters.hh1
-rw-r--r--src/readline_possibilities.cc213
-rw-r--r--src/readline_possibilities.hh3
-rw-r--r--src/regex101.client.cc14
-rw-r--r--src/regex101.client.hh1
-rw-r--r--src/regexp_vtab.cc27
-rw-r--r--src/relative_time.cc6
-rw-r--r--src/relative_time.hh2
-rw-r--r--src/root-config.json39
-rwxr-xr-xsrc/scripts/com.vmware.btresolver.py60
-rwxr-xr-xsrc/scripts/docker-url-handler.lnav62
-rw-r--r--src/scripts/journald-url-handler.lnav33
-rw-r--r--src/scripts/lnav-copy-text.lnav15
-rwxr-xr-xsrc/scripts/pcap_log-converter.sh13
-rwxr-xr-xsrc/scripts/piper-url-handler.lnav8
-rw-r--r--src/scripts/scripts.am6
-rw-r--r--src/service_tags.hh13
-rw-r--r--src/session.export.cc27
-rw-r--r--src/session_data.cc719
-rw-r--r--src/session_data.hh13
-rw-r--r--src/shared_buffer.cc50
-rw-r--r--src/shared_buffer.hh45
-rw-r--r--src/shlex.cc312
-rw-r--r--src/shlex.hh173
-rw-r--r--src/shlex.resolver.hh4
-rw-r--r--src/spectro_impls.cc30
-rw-r--r--src/spectro_source.cc329
-rw-r--r--src/spectro_source.hh22
-rw-r--r--src/sql_commands.cc545
-rw-r--r--src/sql_execute.hh47
-rw-r--r--src/sql_help.hh38
-rw-r--r--src/sql_util.cc396
-rw-r--r--src/sql_util.hh20
-rw-r--r--src/sqlite-extension-func.cc470
-rw-r--r--src/sqlite-extension-func.hh8
-rw-r--r--src/sqlitepp.client.hh15
-rw-r--r--src/sqlitepp.hh3
-rw-r--r--src/state-extension-functions.cc77
-rw-r--r--src/static_file_vtab.cc24
-rw-r--r--src/statusview_curses.cc49
-rw-r--r--src/statusview_curses.hh26
-rw-r--r--src/string-extension-functions.cc167
-rw-r--r--src/strong_int.hh32
-rw-r--r--src/styling.cc134
-rw-r--r--src/styling.hh87
-rw-r--r--src/tailer/Makefile.am3
-rwxr-xr-xsrc/tailer/tailer.apebin147456 -> 147456 bytes
-rw-r--r--src/tailer/tailer.looper.cc35
-rw-r--r--src/term_extra.hh17
-rw-r--r--src/text_anonymizer.cc6
-rw-r--r--src/text_format.cc145
-rw-r--r--src/text_format.hh19
-rw-r--r--src/text_overlay_menu.cc123
-rw-r--r--src/text_overlay_menu.hh55
-rw-r--r--src/textfile_highlighters.cc118
-rw-r--r--src/textfile_sub_source.cc753
-rw-r--r--src/textfile_sub_source.hh52
-rw-r--r--src/textview_curses.cc560
-rw-r--r--src/textview_curses.hh183
-rw-r--r--src/themes/default-theme.json91
-rw-r--r--src/themes/dracula.json312
-rw-r--r--src/themes/eldar.json112
-rw-r--r--src/themes/grayscale.json80
-rw-r--r--src/themes/monocai.json51
-rw-r--r--src/themes/night-owl.json91
-rw-r--r--src/themes/solarized-dark.json108
-rw-r--r--src/themes/solarized-light.json70
-rw-r--r--src/themes/themes.am1
-rw-r--r--src/third-party/ArenaAlloc/arenaalloc.h192
-rw-r--r--src/third-party/ArenaAlloc/arenaallocimpl.h465
-rw-r--r--src/third-party/date/include/date/chrono_io.h34
-rw-r--r--src/third-party/date/include/date/date.h8200
-rw-r--r--src/third-party/date/include/date/ios.h50
-rw-r--r--src/third-party/date/include/date/islamic.h3031
-rw-r--r--src/third-party/date/include/date/iso_week.h1751
-rw-r--r--src/third-party/date/include/date/julian.h3052
-rw-r--r--src/third-party/date/include/date/ptz.h950
-rw-r--r--src/third-party/date/include/date/solar_hijri.h3151
-rw-r--r--src/third-party/date/include/date/tz.h2792
-rw-r--r--src/third-party/date/include/date/tz_private.h316
-rw-r--r--src/third-party/date/src/Makefile.am19
-rw-r--r--src/third-party/date/src/tz.cpp3944
-rw-r--r--src/third-party/md4c/md4c.c1392
-rw-r--r--src/third-party/md4c/md4c.h4
-rw-r--r--src/third-party/prqlc-c/Cargo.lock1602
-rw-r--r--src/third-party/prqlc-c/Cargo.toml31
-rw-r--r--src/third-party/prqlc-c/README.md97
-rw-r--r--src/third-party/prqlc-c/cbindgen.toml14
-rw-r--r--src/third-party/prqlc-c/prqlc.cxx.cc891
-rw-r--r--src/third-party/prqlc-c/prqlc.cxx.hh775
-rw-r--r--src/third-party/prqlc-c/prqlc.h193
-rw-r--r--src/third-party/prqlc-c/prqlc.hpp158
-rw-r--r--src/third-party/prqlc-c/src/lib.rs127
-rw-r--r--src/third-party/rapidyaml/ryml_all.hpp6376
-rw-r--r--src/third-party/robin_hood/robin_hood.h2
-rw-r--r--src/time-extension-functions.cc87
-rw-r--r--src/time_formats.am45
-rw-r--r--src/top_status_source.cc11
-rw-r--r--src/top_status_source.hh9
-rw-r--r--src/unique_path.cc32
-rw-r--r--src/unique_path.hh9
-rw-r--r--src/url_handler.cc259
-rw-r--r--src/url_handler.cfg.hh52
-rw-r--r--src/url_handler.hh95
-rw-r--r--src/url_loader.hh17
-rw-r--r--src/view_curses.cc568
-rw-r--r--src/view_curses.hh120
-rw-r--r--src/view_helpers.cc724
-rw-r--r--src/view_helpers.hh14
-rw-r--r--src/views_vtab.cc302
-rw-r--r--src/vt52_curses.cc36
-rw-r--r--src/vt52_curses.hh30
-rw-r--r--src/vtab_module.cc7
-rw-r--r--src/vtab_module.hh39
-rw-r--r--src/ww898/cp_utf8.hpp176
-rw-r--r--src/xpath_vtab.cc36
-rw-r--r--src/xterm_mouse.cc15
-rw-r--r--src/xterm_mouse.hh6
-rw-r--r--src/yajlpp/CMakeLists.txt2
-rw-r--r--src/yajlpp/Makefile.am2
-rw-r--r--src/yajlpp/json_ptr.cc46
-rw-r--r--src/yajlpp/json_ptr.hh11
-rw-r--r--src/yajlpp/yajlpp.cc82
-rw-r--r--src/yajlpp/yajlpp.hh63
-rw-r--r--src/yajlpp/yajlpp_def.hh467
-rw-r--r--src/yaml-extension-functions.cc7
-rw-r--r--test/CMakeLists.txt7
-rw-r--r--test/Makefile.am89
-rw-r--r--test/bad-config/formats/invalid-file-format/format.json27
-rw-r--r--test/bad-config/formats/invalid-no-tscap/format.json32
-rw-r--r--test/bad-config2/configs/invalid-annotation/config.json14
-rw-r--r--test/bad-config2/configs/invalid-theme/config.json20
-rw-r--r--test/books.json14
-rw-r--r--test/books.xml39
-rw-r--r--test/configs/installed/anno-test.json12
-rwxr-xr-xtest/configs/installed/anno-test.sh3
-rw-r--r--test/configs/installed/hw-url-handler.json10
-rw-r--r--test/configs/installed/hw-url-handler.lnav10
-rw-r--r--test/datafile_c.011
-rw-r--r--test/datafile_simple.116
-rw-r--r--test/datafile_simple.1417
-rw-r--r--test/datafile_simple.1583
-rw-r--r--test/datafile_simple.1825
-rw-r--r--test/datafile_simple.1953
-rw-r--r--test/datafile_simple.2017
-rw-r--r--test/datafile_simple.211
-rw-r--r--test/datafile_simple.2382
-rw-r--r--test/datafile_simple.2452
-rw-r--r--test/datafile_simple.2515
-rw-r--r--test/datafile_simple.711
-rw-r--r--test/datafile_simple.833
-rw-r--r--test/document.sections.tests.cc53
-rw-r--r--test/drive_data_scanner.cc7
-rw-r--r--test/drive_doc_discovery.cc120
-rw-r--r--test/drive_grep_proc.cc17
-rw-r--r--test/drive_listview.cc41
-rw-r--r--test/drive_logfile.cc4
-rw-r--r--test/drive_shlexer.cc61
-rw-r--r--test/drive_view_colors.cc6
-rw-r--r--test/example.patch102
-rw-r--r--test/example.toml38
-rw-r--r--test/expected/expected.am326
-rw-r--r--test/expected/test_cli.sh_0b3639753916f71254e8c9cce4ebb8bfd9978d3e.err (renamed from test/expected/test_cli.sh_a1a09f890f4604309d0a81bbbec8e50fb7d5e887.err)0
-rw-r--r--test/expected/test_cli.sh_0b3639753916f71254e8c9cce4ebb8bfd9978d3e.out5263
-rw-r--r--test/expected/test_cli.sh_108c6922cde063429f76abc3fdb8a81ad9a2f671.err (renamed from test/expected/test_cmds.sh_a0e6214b2a85c90d31aee12efde850441cca7eb3.err)0
-rw-r--r--test/expected/test_cli.sh_108c6922cde063429f76abc3fdb8a81ad9a2f671.out1
-rw-r--r--test/expected/test_cli.sh_10c33e465ef7681c6b5519d05d557426b26cd43d.err4
-rw-r--r--test/expected/test_cli.sh_10c33e465ef7681c6b5519d05d557426b26cd43d.out1
-rw-r--r--test/expected/test_cli.sh_3114508cf42fb2608ef77f4bc294a84885c97a79.err (renamed from test/expected/test_cmds.sh_d7eebacdcf2cb194f25fa4ef97b7b5376b442467.out)0
-rw-r--r--test/expected/test_cli.sh_3114508cf42fb2608ef77f4bc294a84885c97a79.out1
-rw-r--r--test/expected/test_cli.sh_4327033cfae0d4c170a38a3c4a570520bfabb493.err (renamed from test/expected/test_config.sh_5105c29004e297521310ca0bd0fd560b01c2c549.out)0
-rw-r--r--test/expected/test_cli.sh_4327033cfae0d4c170a38a3c4a570520bfabb493.out1
-rw-r--r--test/expected/test_cli.sh_76aa57821598962e59063a40c20171040c95a731.err (renamed from test/expected/test_format_loader.sh_3f1d6f35e8a9ae4fd3e91ffaa82a037b5a847ab7.out)0
-rw-r--r--test/expected/test_cli.sh_76aa57821598962e59063a40c20171040c95a731.out9
-rw-r--r--test/expected/test_cli.sh_a1a09f890f4604309d0a81bbbec8e50fb7d5e887.out3
-rw-r--r--test/expected/test_cli.sh_af3ace7762b4cc150fcdcac86083b379bded7b32.err (renamed from test/expected/test_format_loader.sh_a47f2b090a5d8a226783835c7ff7d1c8821f11ed.out)0
-rw-r--r--test/expected/test_cli.sh_af3ace7762b4cc150fcdcac86083b379bded7b32.out9
-rw-r--r--test/expected/test_cli.sh_c69c835a3c43210225cf62564b3e9584c899af20.err (renamed from test/expected/test_json_format.sh_90a037c7d9d70ac4ca97158271ea242787313377.err)0
-rw-r--r--test/expected/test_cli.sh_c69c835a3c43210225cf62564b3e9584c899af20.out4
-rw-r--r--test/expected/test_cli.sh_cc06341dd560f927512e92c7c0985ed8b25827ae.err (renamed from test/expected/test_json_format.sh_a6be47f1311ed92feaf303142fcb103deb80f456.err)0
-rw-r--r--test/expected/test_cli.sh_cc06341dd560f927512e92c7c0985ed8b25827ae.out1187
-rw-r--r--test/expected/test_cli.sh_f2e41555f1a5f40f54ce241207af602ed1503a2b.out4
-rw-r--r--test/expected/test_cli.sh_ff7da172f4350a2adb74b8764575823d798ed8b6.err (renamed from test/expected/test_logfile.sh_1c6eee38f66356fcd9a9f0faedaea6dbcc901060.err)0
-rw-r--r--test/expected/test_cli.sh_ff7da172f4350a2adb74b8764575823d798ed8b6.out2
-rw-r--r--test/expected/test_cmds.sh_015ffe79a08f4c9f0cd1cb84c6afa4398f879fc7.err7
-rw-r--r--test/expected/test_cmds.sh_015ffe79a08f4c9f0cd1cb84c6afa4398f879fc7.out (renamed from test/expected/test_sessions.sh_8732dad5481be991ca7f291d9c5451c7b016cea7.err)0
-rw-r--r--test/expected/test_cmds.sh_017b495b95218b7c083951e2dba331cfec6e90be.err4
-rw-r--r--test/expected/test_cmds.sh_1d92c5bc12f5e7aaa6d84c5ed47f0b9f96e36c6a.out45
-rw-r--r--test/expected/test_cmds.sh_2e123104cdd2087ac40731a0aa533ba6a87ea744.out2
-rw-r--r--test/expected/test_cmds.sh_2e67bdbbc9a14aa772b2a9f755ed8f8124708558.out32
-rw-r--r--test/expected/test_cmds.sh_2ff0fe712c9b0012e42282c5f77b0b83cad37ddf.out2
-rw-r--r--test/expected/test_cmds.sh_3b4bea458c59d2bac492e568616b610625037ad0.err (renamed from test/expected/test_sessions.sh_e39648f425c3f291c9d1c0d14595a019abd0cb48.err)0
-rw-r--r--test/expected/test_cmds.sh_3b4bea458c59d2bac492e568616b610625037ad0.out2
-rw-r--r--test/expected/test_cmds.sh_453054e29aaca4c2662c45c2a1f2f63f3510d8dd.out4
-rw-r--r--test/expected/test_cmds.sh_4f06183ed231669965965f5042fbbb507fa7deab.out2
-rw-r--r--test/expected/test_cmds.sh_55c2fd15ec2c7d96dbef7b36a42a1b7b42f90dbc.err2
-rw-r--r--test/expected/test_cmds.sh_5630626e6f68c3d4a2c3e5f27d024df5950b88b5.err (renamed from test/expected/test_sql_str_func.sh_3855d2cc0ab29171cae8e722f130adec25eae36e.out)0
-rw-r--r--test/expected/test_cmds.sh_5630626e6f68c3d4a2c3e5f27d024df5950b88b5.out2
-rw-r--r--test/expected/test_cmds.sh_68c774418bac897bd4d4fe9dbbf08454886b2e15.err (renamed from test/expected/test_sql_yaml_func.sh_41c6abde708a69e74f5b7fde865d88fa75f91e0a.out)0
-rw-r--r--test/expected/test_cmds.sh_68c774418bac897bd4d4fe9dbbf08454886b2e15.out3
-rw-r--r--test/expected/test_cmds.sh_7cb644890c4b945ff3f1e15c86a58c85cb5425c0.out10
-rw-r--r--test/expected/test_cmds.sh_949826cc086c7a5c87270be172e3caa3bf8f928d.err (renamed from test/expected/test_text_file.sh_2e69c22dcfa37b5c3e8490a6026eacb7ca953998.out)0
-rw-r--r--test/expected/test_cmds.sh_949826cc086c7a5c87270be172e3caa3bf8f928d.out1
-rw-r--r--test/expected/test_cmds.sh_9527f941dc84a2ac3a030f222e41c6ccd1961cbe.err (renamed from test/expected/test_text_file.sh_801414c6bb6d3f9225973eafa3c6dfa49cd2081d.err)0
-rw-r--r--test/expected/test_cmds.sh_9527f941dc84a2ac3a030f222e41c6ccd1961cbe.out1
-rw-r--r--test/expected/test_cmds.sh_a00943ef715598c7554b85de8502454e41bb9e28.out8
-rw-r--r--test/expected/test_cmds.sh_a0e6214b2a85c90d31aee12efde850441cca7eb3.out2
-rw-r--r--test/expected/test_cmds.sh_a8006c4169d76baecd99a0699c2fc66a583ad676.err4
-rw-r--r--test/expected/test_cmds.sh_ac45fb0f8f9578c3ded0855f694698ec38ce31ad.out12
-rw-r--r--test/expected/test_cmds.sh_af0fcbd30b3fd0d13477aa3325ef0302052a4d9f.out2
-rw-r--r--test/expected/test_cmds.sh_b3d0588ad144a841200692b46125bddf66f5d8bb.err (renamed from test/expected/test_text_file.sh_c21295f131c221861568bda5014b76ef99bdd11f.err)0
-rw-r--r--test/expected/test_cmds.sh_b3d0588ad144a841200692b46125bddf66f5d8bb.out1
-rw-r--r--test/expected/test_cmds.sh_b6a3bb78e9d60e5e1f5ce5b18e40d2f1662707ab.out1673
-rw-r--r--test/expected/test_cmds.sh_b755a8b48c0f602f0270500b0117b76e11db546e.out5
-rw-r--r--test/expected/test_cmds.sh_c7fabc25374ff47c47931f63b1d697061b816a28.out4
-rw-r--r--test/expected/test_cmds.sh_ccd326da92d1cacda63501cd1a3077381a18e8f2.out2
-rw-r--r--test/expected/test_cmds.sh_d0d0ff9b68adc17136329f457fe52d5addcb12c0.err6
-rw-r--r--test/expected/test_cmds.sh_d0d0ff9b68adc17136329f457fe52d5addcb12c0.out0
-rw-r--r--test/expected/test_cmds.sh_d1afefacbdd387f02562c8633968b0162a588502.err6
-rw-r--r--test/expected/test_cmds.sh_d1afefacbdd387f02562c8633968b0162a588502.out0
-rw-r--r--test/expected/test_cmds.sh_d7eebacdcf2cb194f25fa4ef97b7b5376b442467.err7
-rw-r--r--test/expected/test_cmds.sh_d836c84398c831c976df46f46fe3bf5983c44c37.out2
-rw-r--r--test/expected/test_cmds.sh_da5f7160b967e60dbd772573614e2da89c5e22b2.err0
-rw-r--r--test/expected/test_cmds.sh_da5f7160b967e60dbd772573614e2da89c5e22b2.out1
-rw-r--r--test/expected/test_cmds.sh_dbdd62995fdefc8318053af05a32416eccfa79fc.out2
-rw-r--r--test/expected/test_cmds.sh_df6f4cea16bb8f20e6408fe4b40335e6de8a7f18.out6
-rw-r--r--test/expected/test_cmds.sh_e7e8244fac65bc51dbd5af31be476fe3b8776bfc.out18
-rw-r--r--test/expected/test_cmds.sh_eb22c3e94c536a1bfaeae0c40d271b5b4b08f4fc.out6
-rw-r--r--test/expected/test_cmds.sh_ec3a64cad41b070a1d04e2bfc3dc14cb2d964091.err6
-rw-r--r--test/expected/test_cmds.sh_ec3a64cad41b070a1d04e2bfc3dc14cb2d964091.out0
-rw-r--r--test/expected/test_config.sh_13fa2428c26fa12e732209620e21466b36bab252.err0
-rw-r--r--test/expected/test_config.sh_13fa2428c26fa12e732209620e21466b36bab252.out1
-rw-r--r--test/expected/test_config.sh_5105c29004e297521310ca0bd0fd560b01c2c549.err20
-rw-r--r--test/expected/test_config.sh_a0907769aba112d628e7ebe39c4ec252e5e0bc69.err46
-rw-r--r--test/expected/test_config.sh_d708b6fd32d83ce0ee00ca5383388308ba5a06e1.err2
-rw-r--r--test/expected/test_format_installer.sh_1e08efc3b8c7b67d944a1f8c475cd31d98d5b4f6.err2
-rw-r--r--test/expected/test_format_installer.sh_1e08efc3b8c7b67d944a1f8c475cd31d98d5b4f6.out0
-rw-r--r--test/expected/test_format_installer.sh_6cd73153a8990b8ddb8ce489e90ec667a442f7f9.err0
-rw-r--r--test/expected/test_format_installer.sh_6cd73153a8990b8ddb8ce489e90ec667a442f7f9.out2
-rw-r--r--test/expected/test_format_installer.sh_947cbc64a150c7fe2a17e1c7a69e9a932aeaa16b.err0
-rw-r--r--test/expected/test_format_installer.sh_947cbc64a150c7fe2a17e1c7a69e9a932aeaa16b.out1
-rw-r--r--test/expected/test_format_loader.sh_15e861d2327512a721fd42ae51dc5427689e0bb6.out18
-rw-r--r--test/expected/test_format_loader.sh_3f1d6f35e8a9ae4fd3e91ffaa82a037b5a847ab7.err171
-rw-r--r--test/expected/test_format_loader.sh_5992e2695b7e6cf1f3520dbb87af8fc2b8f27088.err15
-rw-r--r--test/expected/test_format_loader.sh_a47f2b090a5d8a226783835c7ff7d1c8821f11ed.err61
-rw-r--r--test/expected/test_format_loader.sh_fca6c1fb9f3aaa69b3ffb2d1a8a86434b2f4a247.err4
-rw-r--r--test/expected/test_gantt.sh_3af11588ee36bab7e2caea0f7a24d3c9cafd2310.err0
-rw-r--r--test/expected/test_gantt.sh_3af11588ee36bab7e2caea0f7a24d3c9cafd2310.out86
-rw-r--r--test/expected/test_gantt.sh_63500be50fc6743d8312133e2030cbbc39ca15ff.err0
-rw-r--r--test/expected/test_gantt.sh_63500be50fc6743d8312133e2030cbbc39ca15ff.out0
-rw-r--r--test/expected/test_gantt.sh_74a94ee9103eac5e8e78ca57bccf49efa3827a9d.err0
-rw-r--r--test/expected/test_gantt.sh_74a94ee9103eac5e8e78ca57bccf49efa3827a9d.out0
-rw-r--r--test/expected/test_gantt.sh_83db753dd2669f801810f311e2d7d74397e10f26.err0
-rw-r--r--test/expected/test_gantt.sh_83db753dd2669f801810f311e2d7d74397e10f26.out0
-rw-r--r--test/expected/test_gantt.sh_8fed8a7400042814ba13e50be5e3bd1741d82119.err0
-rw-r--r--test/expected/test_gantt.sh_8fed8a7400042814ba13e50be5e3bd1741d82119.out85
-rw-r--r--test/expected/test_gantt.sh_b013ab41c3cca76cf05a01ca1ba65888be247ada.err0
-rw-r--r--test/expected/test_gantt.sh_b013ab41c3cca76cf05a01ca1ba65888be247ada.out70
-rw-r--r--test/expected/test_gantt.sh_cde7947f361e5f3d4cd1bbc3f7458f426b6a8eb4.err0
-rw-r--r--test/expected/test_gantt.sh_cde7947f361e5f3d4cd1bbc3f7458f426b6a8eb4.out4
-rw-r--r--test/expected/test_gantt.sh_e6a4681a5a671c84c020dc91d7ce03c9d17fde07.err0
-rw-r--r--test/expected/test_gantt.sh_e6a4681a5a671c84c020dc91d7ce03c9d17fde07.out70
-rw-r--r--test/expected/test_json_format.sh_168cac40c27f547044c89d39eb0ff2ef81da4b21.out10
-rw-r--r--test/expected/test_json_format.sh_1bb0fd243e916546aea22029245ac590dae17a86.out28
-rw-r--r--test/expected/test_json_format.sh_40223ac4742883f883ccc61044bfffd6e102cca6.out208
-rw-r--r--test/expected/test_json_format.sh_4315a3d6124c14cbe3c474b6dbf4cc8720a9859f.out6
-rw-r--r--test/expected/test_json_format.sh_469f005b0708d629bc95f0c48a5e390f440c1fef.out26
-rw-r--r--test/expected/test_json_format.sh_5795c5ffd98ae581b30c6f0983349bf7a6a84501.err0
-rw-r--r--test/expected/test_json_format.sh_5795c5ffd98ae581b30c6f0983349bf7a6a84501.out52
-rw-r--r--test/expected/test_json_format.sh_6767b91d715338c24c67e928b59c560c84ddf4be.out20
-rw-r--r--test/expected/test_json_format.sh_6fbe20faa161ab9fa77df7568fff84bf3e47e920.out8
-rw-r--r--test/expected/test_json_format.sh_7724d1a96d74d4418dd44d7416270f9bb64b2564.out26
-rw-r--r--test/expected/test_json_format.sh_7c6529f6bf4a0cb565f5665fdcba032f0ae1ebbe.out8
-rw-r--r--test/expected/test_json_format.sh_80959e2bb6a7fdf938c2e4dbd7d7c81eb84fa072.out4
-rw-r--r--test/expected/test_json_format.sh_84a71e94dc34661a70bb9015b67ba00e93e9cfb5.out4
-rw-r--r--test/expected/test_json_format.sh_85d03b1b41a7f819af135d2521a8f2c59418e907.out28
-rw-r--r--test/expected/test_json_format.sh_895283eeb4c10e9c1702fafd13723c8085944f88.err0
-rw-r--r--test/expected/test_json_format.sh_895283eeb4c10e9c1702fafd13723c8085944f88.out20
-rw-r--r--test/expected/test_json_format.sh_90a037c7d9d70ac4ca97158271ea242787313377.out3
-rw-r--r--test/expected/test_json_format.sh_952297a90e312d2184fe3e4df795ddc731b096c9.out2
-rw-r--r--test/expected/test_json_format.sh_a06b3cdd46b387e72d6faa4cce648b8b11ae870b.out48
-rw-r--r--test/expected/test_json_format.sh_a6be47f1311ed92feaf303142fcb103deb80f456.out4
-rw-r--r--test/expected/test_json_format.sh_ad3a238d03493de305544f9b30a0c69d4f474d3a.out2
-rw-r--r--test/expected/test_json_format.sh_c1a23804c39b0f74642286d69865ee9d0961a58a.out4
-rw-r--r--test/expected/test_json_format.sh_c60050b3469f37c5b0864e1dc7eb354e91d6ec81.out4
-rw-r--r--test/expected/test_json_format.sh_d0ec34389274affb70a5a76ba4789d51fd60f602.out8
-rw-r--r--test/expected/test_json_format.sh_d7362cffc8335c2fe6b6527315de59bd6f5dcc7f.out6
-rw-r--r--test/expected/test_json_format.sh_dfff27a651650a04d93de9a06ab5480e94ce3a79.out8
-rw-r--r--test/expected/test_json_format.sh_e36401aa54bc61de71f8dcbe66ea16effa59ea52.out2
-rw-r--r--test/expected/test_json_format.sh_f740026626ab554dacb249762d8be7d6539b8c6e.out2
-rw-r--r--test/expected/test_json_format.sh_fe19b7ebd349cd689b3f5c22618eab5ce995e68e.out2
-rw-r--r--test/expected/test_logfile.sh_00877d2e9dadab916a02005a068410dfbd85ec74.err0
-rw-r--r--test/expected/test_logfile.sh_00877d2e9dadab916a02005a068410dfbd85ec74.out4
-rw-r--r--test/expected/test_logfile.sh_08d731a04c877a34819b35de185e30a74c9fd497.out6
-rw-r--r--test/expected/test_logfile.sh_18d9a7beeb09041993d0d6da488fc8192d111bd9.err0
-rw-r--r--test/expected/test_logfile.sh_18d9a7beeb09041993d0d6da488fc8192d111bd9.out3
-rw-r--r--test/expected/test_logfile.sh_1c6eee38f66356fcd9a9f0faedaea6dbcc901060.out2
-rw-r--r--test/expected/test_logfile.sh_218ecb88b4753010c4264b3ac351260b4811612f.out4
-rw-r--r--test/expected/test_logfile.sh_290a3c49e53c2229a7400c107338fa0bb38375e2.out4
-rw-r--r--test/expected/test_logfile.sh_2e72d848a51ac1eb476b973c61fe43a65d579ba5.err0
-rw-r--r--test/expected/test_logfile.sh_2e72d848a51ac1eb476b973c61fe43a65d579ba5.out2
-rw-r--r--test/expected/test_logfile.sh_341e491abcf8772422bafb8b0eaea6492da230f6.err0
-rw-r--r--test/expected/test_logfile.sh_341e491abcf8772422bafb8b0eaea6492da230f6.out3
-rw-r--r--test/expected/test_logfile.sh_3fc6bfd8a6160817211f3e14fde957af75b9dbe7.out5
-rw-r--r--test/expected/test_logfile.sh_82d65f4dac07b1623f8202444d5b9144096e8243.err0
-rw-r--r--test/expected/test_logfile.sh_82d65f4dac07b1623f8202444d5b9144096e8243.out3
-rw-r--r--test/expected/test_logfile.sh_8a5e754cd471e5fdcdaede49c9290903acd7aad6.err0
-rw-r--r--test/expected/test_logfile.sh_8a5e754cd471e5fdcdaede49c9290903acd7aad6.out3
-rw-r--r--test/expected/test_logfile.sh_c18e14a26d8261c9f72747118a469266121d5459.out6
-rw-r--r--test/expected/test_logfile.sh_cc368d4b4bb6a9b9c79bd5a70ffa1f2d9d01e286.err15
-rw-r--r--test/expected/test_logfile.sh_cc368d4b4bb6a9b9c79bd5a70ffa1f2d9d01e286.out0
-rw-r--r--test/expected/test_logfile.sh_ccb0d31813367c8d9dc5b5df383fac5b780711c1.err0
-rw-r--r--test/expected/test_logfile.sh_ccb0d31813367c8d9dc5b5df383fac5b780711c1.out3
-rw-r--r--test/expected/test_logfile.sh_d14f6d8888652321206549df8a9535399f0fd372.err0
-rw-r--r--test/expected/test_logfile.sh_d14f6d8888652321206549df8a9535399f0fd372.out4
-rw-r--r--test/expected/test_logfile.sh_de8d59879fe6aa5a012b0748ff77ae26c07aea89.err0
-rw-r--r--test/expected/test_logfile.sh_de8d59879fe6aa5a012b0748ff77ae26c07aea89.out4
-rw-r--r--test/expected/test_logfile.sh_e840b674cd65936a72bd64b1dac1524d16fe44c3.out12
-rw-r--r--test/expected/test_logfile.sh_f171f265d8d45a2707e8b9f53e938f574c614d25.err0
-rw-r--r--test/expected/test_logfile.sh_f171f265d8d45a2707e8b9f53e938f574c614d25.out3
-rw-r--r--test/expected/test_meta.sh_0ae5840c0758ec95a397493ac3c3d4fabd397a34.err7
-rw-r--r--test/expected/test_meta.sh_0ae5840c0758ec95a397493ac3c3d4fabd397a34.out0
-rw-r--r--test/expected/test_meta.sh_41f643bb4f720130625b042563e9591bee4ae588.out2
-rw-r--r--test/expected/test_meta.sh_4283bf9128e0396c4ff141faf68279d5a3d8ac63.err0
-rw-r--r--test/expected/test_meta.sh_4283bf9128e0396c4ff141faf68279d5a3d8ac63.out41
-rw-r--r--test/expected/test_meta.sh_65325d1bcb58e530a8d681685fea56803f67a2eb.err0
-rw-r--r--test/expected/test_meta.sh_65325d1bcb58e530a8d681685fea56803f67a2eb.out2
-rw-r--r--test/expected/test_meta.sh_aae427fe704f131f8466fbfc9e7967c2e874530a.err0
-rw-r--r--test/expected/test_meta.sh_aae427fe704f131f8466fbfc9e7967c2e874530a.out2
-rw-r--r--test/expected/test_meta.sh_ad2f396f332d14ed6e95936983bc7e4aeea0bfac.err0
-rw-r--r--test/expected/test_meta.sh_ad2f396f332d14ed6e95936983bc7e4aeea0bfac.out7
-rw-r--r--test/expected/test_meta.sh_b622c04c2bede5371bfa6f2627b0474049ecc5e9.err6
-rw-r--r--test/expected/test_meta.sh_b622c04c2bede5371bfa6f2627b0474049ecc5e9.out0
-rw-r--r--test/expected/test_meta.sh_c75128169049bd88d5eaf8b84a7f617e5ae5d936.out4
-rw-r--r--test/expected/test_meta.sh_d6af0b41066ca3be0bbce89c83c011f4ecfa516e.out2
-rw-r--r--test/expected/test_meta.sh_f7c55356df0d71c51eb7629c5a81f347083ce1ef.err0
-rw-r--r--test/expected/test_meta.sh_f7c55356df0d71c51eb7629c5a81f347083ce1ef.out2
-rw-r--r--test/expected/test_pretty_print.sh_3c255c3c8b28df9d694b329a265e8b8140dae4a2.out12
-rw-r--r--test/expected/test_pretty_print.sh_7192f8f68adb14705c8a60e73ff8248c61c7fd03.out4
-rw-r--r--test/expected/test_pretty_print.sh_a5bee322ea3374690e44a88a16cb6b84feaa11d3.out1
-rw-r--r--test/expected/test_prql.sh_06900fac5c2e854b1208320b753fcd43d4ba63a3.err0
-rw-r--r--test/expected/test_prql.sh_06900fac5c2e854b1208320b753fcd43d4ba63a3.out2
-rw-r--r--test/expected/test_prql.sh_15ebcd913f56cde35af26c6300533d6e76bf1b55.err10
-rw-r--r--test/expected/test_prql.sh_15ebcd913f56cde35af26c6300533d6e76bf1b55.out0
-rw-r--r--test/expected/test_prql.sh_451e242cdfa2db9005d4fe752a7b05d1ab5cba29.err10
-rw-r--r--test/expected/test_prql.sh_451e242cdfa2db9005d4fe752a7b05d1ab5cba29.out0
-rw-r--r--test/expected/test_prql.sh_45d57a042092ffdcd28ea35a892f02859e78f33d.err0
-rw-r--r--test/expected/test_prql.sh_45d57a042092ffdcd28ea35a892f02859e78f33d.out2
-rw-r--r--test/expected/test_prql.sh_5aea925b5ad95f55ce6b1b07b7046bc3d7310137.err0
-rw-r--r--test/expected/test_prql.sh_5aea925b5ad95f55ce6b1b07b7046bc3d7310137.out4
-rw-r--r--test/expected/test_regex101.sh_2158f1f011ba8e1b152396c072790c076fdb8ce8.err3
-rw-r--r--test/expected/test_regex101.sh_366730cac50b4a09b7de4b84641791470b1cb9a3.out2
-rw-r--r--test/expected/test_regex101.sh_3d18474a3e472fff6e23e0c41337ec9188fee591.err47
-rw-r--r--test/expected/test_regex101.sh_7991a5b617867cf37c9f7baa85ffa425f7d455a2.err6
-rw-r--r--test/expected/test_regex101.sh_8e93a3b6b941847c71409a297779fbb0a6666a51.err2
-rw-r--r--test/expected/test_regex101.sh_cbd859487e4ea011cd6e0f0f114d70158bfd8b43.out23
-rw-r--r--test/expected/test_regex101.sh_d84597760285c3964b258726341e018f6cd49954.err6
-rw-r--r--test/expected/test_sessions.sh_33ab03afda2c9331a289fcbd1abdbc1c37b2e87b.err0
-rw-r--r--test/expected/test_sessions.sh_33ab03afda2c9331a289fcbd1abdbc1c37b2e87b.out11
-rw-r--r--test/expected/test_sessions.sh_639b83ce8f67975dfdc7086946ec287b43b6fa8c.err0
-rw-r--r--test/expected/test_sessions.sh_639b83ce8f67975dfdc7086946ec287b43b6fa8c.out89
-rw-r--r--test/expected/test_sessions.sh_6d87ff483d5785c58fb271a405ff1c35e4f83cd9.out6
-rw-r--r--test/expected/test_sessions.sh_8732dad5481be991ca7f291d9c5451c7b016cea7.out33
-rw-r--r--test/expected/test_sessions.sh_9978aaa475513f9981840e612f853a7707ffcf90.out1
-rw-r--r--test/expected/test_sessions.sh_ba1ded92531350668301431db64df2d2f4a2e9ee.err0
-rw-r--r--test/expected/test_sessions.sh_ba1ded92531350668301431db64df2d2f4a2e9ee.out5
-rw-r--r--test/expected/test_sessions.sh_e57697be4d81ac8e5b2b2fa84f919b2d494978f3.err0
-rw-r--r--test/expected/test_sessions.sh_e57697be4d81ac8e5b2b2fa84f919b2d494978f3.out11
-rw-r--r--test/expected/test_sessions.sh_e988439404f2e97604641c8d087855f3efe052e4.err0
-rw-r--r--test/expected/test_sessions.sh_e988439404f2e97604641c8d087855f3efe052e4.out (renamed from test/expected/test_sessions.sh_e39648f425c3f291c9d1c0d14595a019abd0cb48.out)15
-rw-r--r--test/expected/test_shlexer.sh_14dd967cb2af90899c9e5e45d00b676b5a3163aa.out5
-rw-r--r--test/expected/test_shlexer.sh_2781f5dd570580cbe746ad91b58a28b8371283b3.out5
-rw-r--r--test/expected/test_shlexer.sh_2af44d06fc137a77bc230be86376ccad23a2806b.out2
-rw-r--r--test/expected/test_shlexer.sh_6858e530a8ecb77cbaec1a7507768dd5a1942ac9.out3
-rw-r--r--test/expected/test_shlexer.sh_7f31e16ea2469da7a4328c93c7bcc8e109f84d2f.out3
-rw-r--r--test/expected/test_shlexer.sh_8aeebcdef56edd783579eaaddaff7c5cc127bb86.out3
-rw-r--r--test/expected/test_shlexer.sh_8e9addb0e5b6f4254d81dd89ecf12783109644bb.out3
-rw-r--r--test/expected/test_shlexer.sh_90961e6728e96d0a44535a6c9907cc990c10316c.out3
-rw-r--r--test/expected/test_shlexer.sh_95c4e861804a5434900fdb4d67b149d1baa2edf4.out3
-rw-r--r--test/expected/test_shlexer.sh_d7fe5f6b8fc9ba00539fad0fa0bfb08319d8b04b.out3
-rw-r--r--test/expected/test_shlexer.sh_d9d46422a913e3a06ddbd262933ef5352c30e68f.out7
-rw-r--r--test/expected/test_shlexer.sh_e0599f0b53d1bd27af767113853f8e84291f137d.out3
-rw-r--r--test/expected/test_shlexer.sh_e8fa2239ab17e7563d0c524f5400a79d6ff8bfda.out3
-rw-r--r--test/expected/test_shlexer.sh_e99fe1cde36b85ebbab86ca820f55ec861cdc20b.err0
-rw-r--r--test/expected/test_shlexer.sh_e99fe1cde36b85ebbab86ca820f55ec861cdc20b.out6
-rw-r--r--test/expected/test_sql.sh_09416e332d9b2f76743836b72e71b6e4492e594e.err0
-rw-r--r--test/expected/test_sql.sh_09416e332d9b2f76743836b72e71b6e4492e594e.out3
-rw-r--r--test/expected/test_sql.sh_0a5d13b62da4cb66a59a51b0240b5fe0b6036b7e.out2
-rw-r--r--test/expected/test_sql.sh_13429aed81d7edfd47b57e9cdb8a25c43aff35c4.out4
-rw-r--r--test/expected/test_sql.sh_19c92996bcc884bfdb70e3d24606cf5070556a74.err0
-rw-r--r--test/expected/test_sql.sh_19c92996bcc884bfdb70e3d24606cf5070556a74.out46
-rw-r--r--test/expected/test_sql.sh_1cbb81cfe40ee16332c5c775a74d06b945aa65c2.out6
-rw-r--r--test/expected/test_sql.sh_1f892b85dc9008c7b3bab7fdf8aa372a6d5ae22c.err0
-rw-r--r--test/expected/test_sql.sh_1f892b85dc9008c7b3bab7fdf8aa372a6d5ae22c.out23
-rw-r--r--test/expected/test_sql.sh_26ace94793c68c44801e1ec496e7ab6a02304ce3.err0
-rw-r--r--test/expected/test_sql.sh_26ace94793c68c44801e1ec496e7ab6a02304ce3.out2
-rw-r--r--test/expected/test_sql.sh_2a16a6fd0ff235a7877e1ea93b22d873a3609402.err3
-rw-r--r--test/expected/test_sql.sh_2c60ed41369d667d1e2a563d54f8edf84682e526.err0
-rw-r--r--test/expected/test_sql.sh_2c60ed41369d667d1e2a563d54f8edf84682e526.out2
-rw-r--r--test/expected/test_sql.sh_2ed3f3b18ef4ecc68e4dd3cc8041b61fcf2a59af.err0
-rw-r--r--test/expected/test_sql.sh_2ed3f3b18ef4ecc68e4dd3cc8041b61fcf2a59af.out5
-rw-r--r--test/expected/test_sql.sh_2f15b8a38673ac4db45dc6ed2eafe609c332575b.out6
-rw-r--r--test/expected/test_sql.sh_31df37f254255115611fc321b63374a2fa4a1cd5.out2
-rw-r--r--test/expected/test_sql.sh_3445b783808f174b76f55dc6b998f721a1aae271.err0
-rw-r--r--test/expected/test_sql.sh_3445b783808f174b76f55dc6b998f721a1aae271.out83
-rw-r--r--test/expected/test_sql.sh_4563a807311d0ce3d1f912843e615a6ca579cffa.err0
-rw-r--r--test/expected/test_sql.sh_4563a807311d0ce3d1f912843e615a6ca579cffa.out40
-rw-r--r--test/expected/test_sql.sh_4a13356ccbdeb5f73fa063e292b5a6cb25e6c23e.err0
-rw-r--r--test/expected/test_sql.sh_4a13356ccbdeb5f73fa063e292b5a6cb25e6c23e.out2
-rw-r--r--test/expected/test_sql.sh_5532c7a21e3f6b7df3aad10d7bdfbb7a812ae6c7.out4
-rw-r--r--test/expected/test_sql.sh_57edc93426e6767aa44ab2356c55327553dcdc8d.err3
-rw-r--r--test/expected/test_sql.sh_61471583c5e2f8ede3a8adefce682c27bf3924c8.err0
-rw-r--r--test/expected/test_sql.sh_61471583c5e2f8ede3a8adefce682c27bf3924c8.out11
-rw-r--r--test/expected/test_sql.sh_62eb85c9569e71a630d72065238559528a16114c.out2
-rw-r--r--test/expected/test_sql.sh_753c343a256d1286750314957d1b4e155464e03e.out2
-rw-r--r--test/expected/test_sql.sh_7593b39f4be6fd2124ec7cf10835ee015d475b16.err0
-rw-r--r--test/expected/test_sql.sh_7593b39f4be6fd2124ec7cf10835ee015d475b16.out2
-rw-r--r--test/expected/test_sql.sh_764306f0e5f610ba71f521ba3d19fe158ece0ba5.out2
-rw-r--r--test/expected/test_sql.sh_7f664c9cda0ae1c48333e21051b5e0eeafd5b4bc.err3
-rw-r--r--test/expected/test_sql.sh_859af4cc5f57345be8dcece599419d58f332841a.err0
-rw-r--r--test/expected/test_sql.sh_859af4cc5f57345be8dcece599419d58f332841a.out4
-rw-r--r--test/expected/test_sql.sh_8ee288f1508eaab0367e465e9f382e848f3282aa.out4
-rw-r--r--test/expected/test_sql.sh_9aaaa810f883f5dcf8a4d5cda4051fdf4640a65c.err0
-rw-r--r--test/expected/test_sql.sh_9aaaa810f883f5dcf8a4d5cda4051fdf4640a65c.out4
-rw-r--r--test/expected/test_sql.sh_a7955e89791db9a252d8323436fabc51e2960731.err0
-rw-r--r--test/expected/test_sql.sh_a7955e89791db9a252d8323436fabc51e2960731.out3
-rw-r--r--test/expected/test_sql.sh_ae7b1f1684e14bf9c16e0d789257b6ef57cfb2b1.out2
-rw-r--r--test/expected/test_sql.sh_afe9cdc4898df5c4e112c13dfe3db6dc089c0d7c.out4
-rw-r--r--test/expected/test_sql.sh_b085d26043f9661d70f82cb90ecb3c5245d25eac.out4
-rw-r--r--test/expected/test_sql.sh_b5aa0561a65de7e8e22085db184c72a94b1a89a9.out2
-rw-r--r--test/expected/test_sql.sh_b9330763dea550bbd006d7ae6ae7ea367f831fa3.err0
-rw-r--r--test/expected/test_sql.sh_b9330763dea550bbd006d7ae6ae7ea367f831fa3.out10
-rw-r--r--test/expected/test_sql.sh_bad03a996c0750733ab99c592b9011851f521a69.out10
-rw-r--r--test/expected/test_sql.sh_bd46ca4560f8be6307a914e39539bbac0368080a.out2
-rw-r--r--test/expected/test_sql.sh_c17933125df910588b806a9d07c2655bc71198ef.err0
-rw-r--r--test/expected/test_sql.sh_c17933125df910588b806a9d07c2655bc71198ef.out6
-rw-r--r--test/expected/test_sql.sh_c353ef036c505b75996252138fbd4c8d22e8149c.out4
-rw-r--r--test/expected/test_sql.sh_c5b8da04734fadf3b9eea80e0af997e38e0fb811.out4
-rw-r--r--test/expected/test_sql.sh_c7e1dbf4605914720b55787785abfafdf2c4178a.out2
-rw-r--r--test/expected/test_sql.sh_d4d540f0ef7e34b693fc72078d1cf2e069f86d81.err0
-rw-r--r--test/expected/test_sql.sh_d4d540f0ef7e34b693fc72078d1cf2e069f86d81.out4
-rw-r--r--test/expected/test_sql.sh_dd540973a0dc86320d84706845a15608196ae5be.err3
-rw-r--r--test/expected/test_sql.sh_e44c0e2834038ec8d9b0b10b993967edb711c03c.err0
-rw-r--r--test/expected/test_sql.sh_e44c0e2834038ec8d9b0b10b993967edb711c03c.out11
-rw-r--r--test/expected/test_sql.sh_ef3cecab4ae0b90760f728add5652378e26b2fe6.err0
-rw-r--r--test/expected/test_sql.sh_ef3cecab4ae0b90760f728add5652378e26b2fe6.out2
-rw-r--r--test/expected/test_sql.sh_fea98f976873ee7b55e6f322dda42719a19fb3f0.err0
-rw-r--r--test/expected/test_sql.sh_fea98f976873ee7b55e6f322dda42719a19fb3f0.out2
-rw-r--r--test/expected/test_sql.sh_ffbc3dbf8464455358a77acffa10a8dd8a080374.err0
-rw-r--r--test/expected/test_sql.sh_ffbc3dbf8464455358a77acffa10a8dd8a080374.out4
-rw-r--r--test/expected/test_sql_anno.sh_1398146cf8b4f074ec8b9752f021cf47d011bebc.err0
-rw-r--r--test/expected/test_sql_anno.sh_1398146cf8b4f074ec8b9752f021cf47d011bebc.out9
-rw-r--r--test/expected/test_sql_anno.sh_de46094b6e005285dc0921ef9979e36240c5042d.err0
-rw-r--r--test/expected/test_sql_anno.sh_de46094b6e005285dc0921ef9979e36240c5042d.out7
-rw-r--r--test/expected/test_sql_anno.sh_e7dae4ba18c42c416ed03afd8819200f63e89ac8.err0
-rw-r--r--test/expected/test_sql_anno.sh_e7dae4ba18c42c416ed03afd8819200f63e89ac8.out17
-rw-r--r--test/expected/test_sql_fs_func.sh_2aa83fc90c850cdd11e3136a1a02b79c5879824b.err0
-rw-r--r--test/expected/test_sql_fs_func.sh_2aa83fc90c850cdd11e3136a1a02b79c5879824b.out0
-rw-r--r--test/expected/test_sql_fs_func.sh_34baa8050f8278d7b68c29e53bdd9f37da0f34c8.err0
-rw-r--r--test/expected/test_sql_fs_func.sh_34baa8050f8278d7b68c29e53bdd9f37da0f34c8.out2
-rw-r--r--test/expected/test_sql_fs_func.sh_9234a453403934587bbbdde355281a956d1fbe5f.err0
-rw-r--r--test/expected/test_sql_fs_func.sh_9234a453403934587bbbdde355281a956d1fbe5f.out2
-rw-r--r--test/expected/test_sql_fs_func.sh_9e2c0a90ce333365ff7354375f2c609bc27135c8.err2
-rw-r--r--test/expected/test_sql_fs_func.sh_cf670dfa1ae7ac5a074baa642068c6d26ac8e096.err2
-rw-r--r--test/expected/test_sql_indexes.sh_1614ebb5e2e83bab11023354dea8a0885ddf64b4.out6
-rw-r--r--test/expected/test_sql_indexes.sh_2b4945247332d01b08e6f17340f7d17f3b3649b8.err0
-rw-r--r--test/expected/test_sql_indexes.sh_2b4945247332d01b08e6f17340f7d17f3b3649b8.out5
-rw-r--r--test/expected/test_sql_indexes.sh_541a8e35f34a206e340a3880128b6ce137847872.out10
-rw-r--r--test/expected/test_sql_indexes.sh_59a1497c13a5e09bc8f95ef02552b2835ebea6e5.out4
-rw-r--r--test/expected/test_sql_indexes.sh_69fd19d56a8cd1fc9c7eb9351270eabb491f8233.out10
-rw-r--r--test/expected/test_sql_indexes.sh_6f707b6e856dbaab6f95e7e89b98dc3652021f85.out6
-rw-r--r--test/expected/test_sql_indexes.sh_b615b6737b1e0d383c8ce4a1db56332f11dbc158.out4
-rw-r--r--test/expected/test_sql_indexes.sh_dab07d8de7728752ae938a174468d75e85f3ae7e.out4
-rw-r--r--test/expected/test_sql_indexes.sh_f7681c234d4f60df16c997a05163aeb058c52870.out10
-rw-r--r--test/expected/test_sql_json_func.sh_026077f4d573ee034467065b7e4f1878bdd4e2f2.err5
-rw-r--r--test/expected/test_sql_json_func.sh_5f2feef079a51410e1f8661bfe92da1c3277f665.err2
-rw-r--r--test/expected/test_sql_json_func.sh_e0ab80f50fb008700ab6cfb90694ed014d40e44b.err2
-rw-r--r--test/expected/test_sql_json_func.sh_f34f5dfa938a1ac7721f924beb16bbceec127a1b.err5
-rw-r--r--test/expected/test_sql_regexp.sh_02ef03572fd2bcf39bab8e29cf1c735ff7c3f297.err0
-rw-r--r--test/expected/test_sql_regexp.sh_02ef03572fd2bcf39bab8e29cf1c735ff7c3f297.out3
-rw-r--r--test/expected/test_sql_regexp.sh_03257c56e85558aa0cc925b68d3af962afc25125.out4
-rw-r--r--test/expected/test_sql_regexp.sh_219a579cf7744fa08ab79fadd08b521b2f18a661.err7
-rw-r--r--test/expected/test_sql_regexp.sh_219a579cf7744fa08ab79fadd08b521b2f18a661.out0
-rw-r--r--test/expected/test_sql_regexp.sh_51293df041b6969ccecc60204dce3676d0fb006d.out4
-rw-r--r--test/expected/test_sql_regexp.sh_a610798fefdacd8d0179a4b17cd757d00fb731be.err7
-rw-r--r--test/expected/test_sql_regexp.sh_a610798fefdacd8d0179a4b17cd757d00fb731be.out0
-rw-r--r--test/expected/test_sql_regexp.sh_b841a0c09601e2419eeb99e85f7e286c889e4801.out54
-rw-r--r--test/expected/test_sql_regexp.sh_bbd1128cf61a9af8f9dc937b46217443f42e1a7a.out4
-rw-r--r--test/expected/test_sql_regexp.sh_d61af17ff19d640ddfc879460910991825eedd05.out4
-rw-r--r--test/expected/test_sql_regexp.sh_ed6e9f13f178def009ee58c2aeea8c3c70fdb580.out4
-rw-r--r--test/expected/test_sql_search_table.sh_1a0d872ebc492fcecb2e79a0993170d5fc771a5b.out4
-rw-r--r--test/expected/test_sql_search_table.sh_3f5f74863d065418bca5a000e6ad3d9344635164.out24
-rw-r--r--test/expected/test_sql_search_table.sh_5aaae556ecb1661602f176215e28f661d3404032.out8
-rw-r--r--test/expected/test_sql_search_table.sh_df0fd242f57a96d40f466493938cda0789a094fa.out48
-rw-r--r--test/expected/test_sql_search_table.sh_ef9373a76853f345d06234f6e0fe11b5d40da27b.out12
-rw-r--r--test/expected/test_sql_str_func.sh_00363f89638cb968584afc1ca0a4f52b2cf7a2ae.err0
-rw-r--r--test/expected/test_sql_str_func.sh_00363f89638cb968584afc1ca0a4f52b2cf7a2ae.out2
-rw-r--r--test/expected/test_sql_str_func.sh_0947bfe7ec626eaa0409a45b10fcbb634fb12eb7.out2
-rw-r--r--test/expected/test_sql_str_func.sh_0db1c1b406ba6ef2dadcbe90a3fdbe794a664eb5.err0
-rw-r--r--test/expected/test_sql_str_func.sh_0db1c1b406ba6ef2dadcbe90a3fdbe794a664eb5.out2
-rw-r--r--test/expected/test_sql_str_func.sh_11d458fdadd00df1239a0eeaac049abb49ed212d.out198
-rw-r--r--test/expected/test_sql_str_func.sh_1a1e07b6f72bce5402037761fa8afd66c05b4c34.err1
-rw-r--r--test/expected/test_sql_str_func.sh_1a1e07b6f72bce5402037761fa8afd66c05b4c34.out0
-rw-r--r--test/expected/test_sql_str_func.sh_3855d2cc0ab29171cae8e722f130adec25eae36e.err1
-rw-r--r--test/expected/test_sql_str_func.sh_51766b600fd158a9e0677f6b0fa31b83537b2e5b.out2
-rw-r--r--test/expected/test_sql_str_func.sh_57fc889eefb98571ecf3892ad670646613bf13a3.err1
-rw-r--r--test/expected/test_sql_str_func.sh_57fc889eefb98571ecf3892ad670646613bf13a3.out0
-rw-r--r--test/expected/test_sql_str_func.sh_68860c50e91cd6c1f2004ee0414a6e930ed42c87.err1
-rw-r--r--test/expected/test_sql_str_func.sh_68860c50e91cd6c1f2004ee0414a6e930ed42c87.out0
-rw-r--r--test/expected/test_sql_str_func.sh_6ac7ab1f90c064944ff66bef5974f050c8227d4b.err0
-rw-r--r--test/expected/test_sql_str_func.sh_6ac7ab1f90c064944ff66bef5974f050c8227d4b.out2
-rw-r--r--test/expected/test_sql_str_func.sh_6ff984d8ed3e5099376d19f0dd20d5fd1ed42494.out2
-rw-r--r--test/expected/test_sql_str_func.sh_805ca5e97fbf1ed56f2e920befd963255ba190b6.out2
-rw-r--r--test/expected/test_sql_str_func.sh_80c1fb9affbfac609ebf1cc5556aafb1ecd223c1.err2
-rw-r--r--test/expected/test_sql_str_func.sh_949ffd5b2ef9fbcbe17f2e61ef7750f7038f6fd6.out2
-rw-r--r--test/expected/test_sql_str_func.sh_a515ba81cc3655c602da28cd0fa1a186d5e9a6e1.err2
-rw-r--r--test/expected/test_sql_str_func.sh_b088735cf46f23ca3d5fb3da41f07a6a3b1cba35.out2
-rw-r--r--test/expected/test_sql_str_func.sh_b8ebe81c4881f704624a65ec91be0868c310f6ed.err0
-rw-r--r--test/expected/test_sql_str_func.sh_b8ebe81c4881f704624a65ec91be0868c310f6ed.out2
-rw-r--r--test/expected/test_sql_str_func.sh_bac7f6531a2adf70cd1871fb13eab26dff133b7c.out2
-rw-r--r--test/expected/test_sql_str_func.sh_cdc7b869132c33cae3c2565806c2396e1b4d6253.err0
-rw-r--r--test/expected/test_sql_str_func.sh_cdc7b869132c33cae3c2565806c2396e1b4d6253.out2
-rw-r--r--test/expected/test_sql_str_func.sh_d4bc869850f5b7e53353fc2506fea0c8e96f29c5.err2
-rw-r--r--test/expected/test_sql_str_func.sh_d54a759f5683a22ad289129b2096b80652b1cc0c.out37
-rw-r--r--test/expected/test_sql_time_func.sh_42f0fc1a154b0d79b4f6e846f283426be498040f.err2
-rw-r--r--test/expected/test_sql_time_func.sh_4364c7f5354fe108874dd22571115e012303e001.err4
-rw-r--r--test/expected/test_sql_time_func.sh_4364c7f5354fe108874dd22571115e012303e001.out0
-rw-r--r--test/expected/test_sql_time_func.sh_63f22db8689c238d51c9b9efe9837147ea5318e6.err0
-rw-r--r--test/expected/test_sql_time_func.sh_63f22db8689c238d51c9b9efe9837147ea5318e6.out2
-rw-r--r--test/expected/test_sql_time_func.sh_6fd8504e94688c4e7915f3a9eb5b030713141d03.out0
-rw-r--r--test/expected/test_sql_time_func.sh_72862ec9c8f261a8507d237eb673c7ddfaafd898.err2
-rw-r--r--test/expected/test_sql_time_func.sh_7ae9dbbb69dbc50ee6a34afc03d2579f09363068.err0
-rw-r--r--test/expected/test_sql_time_func.sh_7ae9dbbb69dbc50ee6a34afc03d2579f09363068.out2
-rw-r--r--test/expected/test_sql_time_func.sh_b3c00f049fdeb551a9165c281630e36359832d1f.err0
-rw-r--r--test/expected/test_sql_time_func.sh_b3c00f049fdeb551a9165c281630e36359832d1f.out2
-rw-r--r--test/expected/test_sql_time_func.sh_c1d7dc8a4bd3b8cb86a2f893f58a56f0f6ea1bc3.err8
-rw-r--r--test/expected/test_sql_time_func.sh_c1d7dc8a4bd3b8cb86a2f893f58a56f0f6ea1bc3.out0
-rw-r--r--test/expected/test_sql_time_func.sh_c5a5fc2edb54d10f1475afa7fed0b62bc05e1dc6.err0
-rw-r--r--test/expected/test_sql_time_func.sh_c5a5fc2edb54d10f1475afa7fed0b62bc05e1dc6.out2
-rw-r--r--test/expected/test_sql_time_func.sh_c7fc60392a2e52b163da1e1dde6978c16f415a9e.err0
-rw-r--r--test/expected/test_sql_time_func.sh_c7fc60392a2e52b163da1e1dde6978c16f415a9e.out2
-rw-r--r--test/expected/test_sql_views_vtab.sh_32acc1a8bb5028636fdbf08f077f9a835ab51bec.out3
-rw-r--r--test/expected/test_sql_views_vtab.sh_4363d60040424a573ed79ee4260a32e3cd72f62c.err0
-rw-r--r--test/expected/test_sql_views_vtab.sh_4363d60040424a573ed79ee4260a32e3cd72f62c.out46
-rw-r--r--test/expected/test_sql_views_vtab.sh_45dbef06572b43cb997682436e753a13e003f792.err0
-rw-r--r--test/expected/test_sql_views_vtab.sh_45dbef06572b43cb997682436e753a13e003f792.out47
-rw-r--r--test/expected/test_sql_views_vtab.sh_485a6ac7c69bd4b5d34d3399a9c17f6a2dc89ad3.out2
-rw-r--r--test/expected/test_sql_views_vtab.sh_62d15cb9d5a9259f198aa01ca8ed200d6da38d68.out6
-rw-r--r--test/expected/test_sql_views_vtab.sh_6ffd89498b9a7758ded6717148fc2ce77a12621b.out2
-rw-r--r--test/expected/test_sql_views_vtab.sh_81dc3eb51ec4dc3066a2365524001242c423a9cf.out4
-rw-r--r--test/expected/test_sql_views_vtab.sh_a2c0f0e51b3f85ea2a05ecdcacaad962b4fe5d4f.out4
-rw-r--r--test/expected/test_sql_views_vtab.sh_a7a7fd577f710aa8b0ad5a94fdfb35daea75e06c.err4
-rw-r--r--test/expected/test_sql_views_vtab.sh_a7a7fd577f710aa8b0ad5a94fdfb35daea75e06c.out0
-rw-r--r--test/expected/test_sql_views_vtab.sh_c851bdf3ba2f56fac5a216457b2d11a109e77f03.err4
-rw-r--r--test/expected/test_sql_views_vtab.sh_d99d884ba6668b66e3ca9ea4ed2d0e236497c35d.out2
-rw-r--r--test/expected/test_sql_xml_func.sh_81ad7678f080870956db37174bcf1054586cfbad.err11
-rw-r--r--test/expected/test_sql_xml_func.sh_81ad7678f080870956db37174bcf1054586cfbad.out0
-rw-r--r--test/expected/test_sql_xml_func.sh_b036c73528a446cba46625767517cdac868aba72.err2
-rw-r--r--test/expected/test_sql_xml_func.sh_bcbd691bb24c4f7bcb9fe0e035b290815f1c8874.err7
-rw-r--r--test/expected/test_sql_xml_func.sh_bcbd691bb24c4f7bcb9fe0e035b290815f1c8874.out0
-rw-r--r--test/expected/test_sql_xml_func.sh_fefeb387ae14d4171225ea06cbbff3ec43990cf0.err2
-rw-r--r--test/expected/test_sql_yaml_func.sh_41c6abde708a69e74f5b7fde865d88fa75f91e0a.err4
-rw-r--r--test/expected/test_text_file.sh_02a0514e0e384e5511ae202ea519552ba04030ed.err0
-rw-r--r--test/expected/test_text_file.sh_02a0514e0e384e5511ae202ea519552ba04030ed.out3
-rw-r--r--test/expected/test_text_file.sh_0bba304f34ae07c4fa9e91e0b42f5fe98654a6a8.err0
-rw-r--r--test/expected/test_text_file.sh_0bba304f34ae07c4fa9e91e0b42f5fe98654a6a8.out26
-rw-r--r--test/expected/test_text_file.sh_11fd274911e45a743b4de616888a64183d07cb76.err0
-rw-r--r--test/expected/test_text_file.sh_11fd274911e45a743b4de616888a64183d07cb76.out2
-rw-r--r--test/expected/test_text_file.sh_143a40164c93c7ec44a66e7940b92b128a421147.err0
-rw-r--r--test/expected/test_text_file.sh_143a40164c93c7ec44a66e7940b92b128a421147.out5
-rw-r--r--test/expected/test_text_file.sh_1ce4056d72b871f8bb844c86aade2a9b1da58030.err0
-rw-r--r--test/expected/test_text_file.sh_1ce4056d72b871f8bb844c86aade2a9b1da58030.out49
-rw-r--r--test/expected/test_text_file.sh_25cef06efcbe106c2e1cc4a166b673e7b244c6d7.err0
-rw-r--r--test/expected/test_text_file.sh_25cef06efcbe106c2e1cc4a166b673e7b244c6d7.out25
-rw-r--r--test/expected/test_text_file.sh_265a8a5825e6c7dbc85cbe496dab6be7a349f3db.err0
-rw-r--r--test/expected/test_text_file.sh_265a8a5825e6c7dbc85cbe496dab6be7a349f3db.out1
-rw-r--r--test/expected/test_text_file.sh_2e69c22dcfa37b5c3e8490a6026eacb7ca953998.err2
-rw-r--r--test/expected/test_text_file.sh_4226123565a53b4e3f80e602c1f294721e8e07bf.err0
-rw-r--r--test/expected/test_text_file.sh_4226123565a53b4e3f80e602c1f294721e8e07bf.out9
-rw-r--r--test/expected/test_text_file.sh_4dd174410d702a7b4be794fb6fa2c8889bd768d6.err0
-rw-r--r--test/expected/test_text_file.sh_4dd174410d702a7b4be794fb6fa2c8889bd768d6.out6
-rw-r--r--test/expected/test_text_file.sh_596b120fbea638472a27964444e262b4572afacc.err0
-rw-r--r--test/expected/test_text_file.sh_596b120fbea638472a27964444e262b4572afacc.out5
-rw-r--r--test/expected/test_text_file.sh_5b51b55dff7332c5bee2c9b797c401c5614d574a.out157
-rw-r--r--test/expected/test_text_file.sh_5e9320f18d066e6fc930dbbffc357af64312bd4b.err0
-rw-r--r--test/expected/test_text_file.sh_5e9320f18d066e6fc930dbbffc357af64312bd4b.out42
-rw-r--r--test/expected/test_text_file.sh_6a24078983cf1b7a80b6fb65d5186cd125498136.out109
-rw-r--r--test/expected/test_text_file.sh_73f69c883f60761bff9f8874f61d21a189e92912.err0
-rw-r--r--test/expected/test_text_file.sh_73f69c883f60761bff9f8874f61d21a189e92912.out43
-rw-r--r--test/expected/test_text_file.sh_786c7262f977201af36b0e69ba1a2aba130bbb06.err0
-rw-r--r--test/expected/test_text_file.sh_786c7262f977201af36b0e69ba1a2aba130bbb06.out4
-rw-r--r--test/expected/test_text_file.sh_78f252288519c8f767bb2759ea32959dab2ebc46.err0
-rw-r--r--test/expected/test_text_file.sh_78f252288519c8f767bb2759ea32959dab2ebc46.out98
-rw-r--r--test/expected/test_text_file.sh_7b00f32a3fff7fc2d78a87045ae842e58be88480.out2
-rw-r--r--test/expected/test_text_file.sh_801414c6bb6d3f9225973eafa3c6dfa49cd2081d.out111
-rw-r--r--test/expected/test_text_file.sh_87943c6be50d701a03e901f16493314c839af1ab.out56
-rw-r--r--test/expected/test_text_file.sh_8a4954af3e536b3789b1fd5b33519e9d444cc933.err0
-rw-r--r--test/expected/test_text_file.sh_8a4954af3e536b3789b1fd5b33519e9d444cc933.out6
-rw-r--r--test/expected/test_text_file.sh_8b2cd055e6a1db2ed9b2af2a917f8556395fa653.out4
-rw-r--r--test/expected/test_text_file.sh_a87c18c643994c3dbbbbb619a06a601d3668ea71.err0
-rw-r--r--test/expected/test_text_file.sh_a87c18c643994c3dbbbbb619a06a601d3668ea71.out2
-rw-r--r--test/expected/test_text_file.sh_ac486314c4e02e480d829ea2f077b86c49fedcec.out2
-rw-r--r--test/expected/test_text_file.sh_c21295f131c221861568bda5014b76ef99bdd11f.out159
-rw-r--r--test/expected/test_text_file.sh_c2a346ca1da2da4346f1d310212e166767993ce9.out22
-rw-r--r--test/expected/test_text_file.sh_d59b67113864ef5e77267d7fd8ad4072f5aef0fc.err0
-rw-r--r--test/expected/test_text_file.sh_d59b67113864ef5e77267d7fd8ad4072f5aef0fc.out51
-rw-r--r--test/expected/test_text_file.sh_e088ea61a5382458cc48a2607e2639e52b0be1da.out109
-rw-r--r--test/expected/test_text_file.sh_e556fa91b91579df20d38540a5db9cedbaf68a62.err0
-rw-r--r--test/expected/test_text_file.sh_e556fa91b91579df20d38540a5db9cedbaf68a62.out40
-rw-r--r--test/expected/test_text_file.sh_f586ef080a86dfe1f981b345bcf8d7a279b2b247.err0
-rw-r--r--test/expected/test_text_file.sh_f586ef080a86dfe1f981b345bcf8d7a279b2b247.out38
-rw-r--r--test/expected/test_text_file.sh_f7522b0a99550a3ff91aae6582eb861547c535e1.err0
-rw-r--r--test/expected/test_text_file.sh_f7522b0a99550a3ff91aae6582eb861547c535e1.out25
-rw-r--r--test/formats/jsontest/format.json13
-rw-r--r--test/formats/jsontest/lnav-logstash.json56
-rw-r--r--test/formats/jsontest/rewrite-user.lnav3
-rw-r--r--test/formats/partitions/format.json11
-rw-r--r--test/gharchive_log.jsonl50
-rw-r--r--test/invalid-books.xml132
-rw-r--r--test/listview_output_cursor.410
-rw-r--r--test/listview_output_cursor.520
-rw-r--r--test/listview_output_cursor.620
-rw-r--r--test/lnav_doctests.cc69
-rw-r--r--test/log-samples/sample-057d6c669632ef9d07b6adec605f6bdeae19af27.txt14
-rw-r--r--test/log-samples/sample-06aaa6f48a801f592558575d886864d6c3ab9ed4.txt72
-rw-r--r--test/log-samples/sample-0a470b1dae069dda03984e8e67994d8a.txt26
-rw-r--r--test/log-samples/sample-0edd747bbc6d5c173423c079b61c27a4.txt13
-rw-r--r--test/log-samples/sample-1aeb47c0a97d19bb7418f0172480e05e49c6e53e.txt24
-rw-r--r--test/log-samples/sample-207655c886794bc55da226bcb86e3c91.txt33
-rw-r--r--test/log-samples/sample-27353a72ba4025448f261dcfa6ea16e474187795.txt32
-rw-r--r--test/log-samples/sample-3136b918134d37827ee97f35adb130a5.txt43
-rw-r--r--test/log-samples/sample-5cbaeeb96f1f0c11a93656107801efc3.txt52
-rw-r--r--test/log-samples/sample-63068cd0931f8cbd22c2f15ac318af12.txt135
-rw-r--r--test/log-samples/sample-67484ecc8091237a27f12863d36b4d03.txt26
-rw-r--r--test/log-samples/sample-70c906b3c1a1cf03f15bde92ee78edfa6f9b7960.txt35
-rw-r--r--test/log-samples/sample-8a6527cdf27015a0204702430b6eca09.txt135
-rw-r--r--test/log-samples/sample-97f2106d5fa94132715730416e86b3de.txt16
-rw-r--r--test/log-samples/sample-aca2878a2e50779c6697c0747ab1f60e4b368dcb.txt1
-rw-r--r--test/log-samples/sample-ad31f12d2adabd07e3ddda3ad5b0dbf6b49c4c99.txt15
-rw-r--r--test/log-samples/sample-bc6f6cf689fa5455616b4d9fbe121a48d3c9de59.txt17
-rw-r--r--test/log-samples/sample-bed6bfb07b2af767547cedbf489c15ce.txt15
-rw-r--r--test/log-samples/sample-c15acd32844669d23d0cbc88ec548129ed2c592e.txt35
-rw-r--r--test/log-samples/sample-c23f22c1b932b904203e018f78dead95fb89b15d.txt37
-rw-r--r--test/log-samples/sample-d0d6b3fc6766caac5ac3fac4a3754ceaab785eb8.txt29
-rw-r--r--test/log-samples/sample-dd7d406352ec6a11d966b6f015a9482b060f2b29.txt31
-rw-r--r--test/log-samples/sample-e779d1771e34f5203ae73e85802e78002be63db6.txt17
-rw-r--r--test/log-samples/sample-e8729677c1b443d8f65124db0d5b6f04.txt22
-rw-r--r--test/log-samples/sample-eef32793daf841a576d8a5cd27239d5d.txt16
-rw-r--r--test/log-samples/sample-f2fba0d0b1e57f9a707ea96a8a4efcdc.txt31
-rw-r--r--test/log-samples/sample-f632067ddac054da85b5cade949c6d94.txt27
-rw-r--r--test/logfile_haproxy.012
-rw-r--r--test/logfile_json.json10
-rw-r--r--test/logfile_json_subsec.json2
-rw-r--r--test/logfile_nextcloud.05
-rw-r--r--test/logfile_partitions.082
-rw-r--r--test/logfile_regexp_access_log.02
-rw-r--r--test/logfile_rollover.2375
-rw-r--r--test/logfile_with_zones.03
-rw-r--r--test/man_echo.txt38
-rwxr-xr-xtest/naughty_files.py28
-rwxr-xr-xtest/parser_debugger.py68
-rw-r--r--test/pyfile_0.py9
-rw-r--r--test/scripty.cc50
-rw-r--r--test/test_ansi_scrubber.cc114
-rw-r--r--test/test_cli.sh32
-rw-r--r--test/test_cmds.sh46
-rwxr-xr-xtest/test_config.sh3
-rw-r--r--test/test_date_time_scanner.cc76
-rw-r--r--test/test_events.sh1
-rw-r--r--test/test_format_installer.sh14
-rw-r--r--test/test_gantt.sh43
-rw-r--r--test/test_json_format.sh7
-rw-r--r--test/test_logfile.sh75
-rw-r--r--test/test_meta.sh26
-rw-r--r--test/test_prql.sh17
-rw-r--r--test/test_sessions.sh37
-rw-r--r--test/test_shlexer.sh2
-rw-r--r--test/test_sql.sh282
-rw-r--r--test/test_sql_anno.sh6
-rw-r--r--test/test_sql_fs_func.sh6
-rw-r--r--test/test_sql_indexes.sh5
-rw-r--r--test/test_sql_regexp.sh10
-rw-r--r--test/test_sql_search_table.sh1
-rw-r--r--test/test_sql_str_func.sh31
-rw-r--r--test/test_sql_time_func.sh14
-rw-r--r--test/test_sql_views_vtab.sh19
-rw-r--r--test/test_sql_xml_func.sh10
-rw-r--r--test/test_stubs.cc5
-rw-r--r--test/test_text_anonymizer.cc4
-rw-r--r--test/test_text_file.sh88
-rw-r--r--test/textfile_0.md51
-rw-r--r--test/textfile_cjk.03
-rw-r--r--test/textfile_nonl.txt1
-rw-r--r--test/textfile_plain.09
-rw-r--r--tools/Makefile.am7
-rw-r--r--tools/bin2c.c8
-rwxr-xr-xupdate_expected_output.sh4
992 files changed, 157135 insertions, 38281 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml
new file mode 100644
index 0000000..8230c93
--- /dev/null
+++ b/.circleci/config.yml
@@ -0,0 +1,32 @@
+# This config was automatically generated from your source code
+# Stacks detected: cicd:github-actions:.github/workflows,deps:python:docs,deps:ruby:docs,deps:rust:src/third-party/prqlc-c
+version: 2.1
+orbs:
+ macos: circleci/macos@2.2.0
+jobs:
+ macos-apple-clang:
+ macos:
+ xcode: 14.2.0
+ resource_class: macos.m1.medium.gen1
+ steps:
+ - checkout
+ - run: brew install pcre2 sqlite ncurses xz zstd readline libarchive curl autoconf automake
+ - run: ./autogen.sh
+ - run: >-
+ ./configure \
+ --with-libcurl=$(brew --prefix curl) \
+ --with-pcre2=$(brew --prefix pcre2) \
+ --with-sqlite3=$(brew --prefix sqlite3) \
+ "CXXFLAGS=-I$(brew --prefix ncurses)/include -g2 -O2" \
+ 'CFLAGS=-O2 -g2' \
+ "LDFLAGS=-L$(brew --prefix ncurses)/lib -L$(brew --prefix xz)/lib -L$(brew --prefix lz4)/lib -L$(brew --prefix zstd)/lib/" \
+ --with-readline=$(brew --prefix readline) \
+ --with-libarchive=$(brew --prefix libarchive) \
+ || cat config.log
+ - run: make -j2 || true
+ - run: env DUMP_CRASH=1 src/lnav -V
+ - run: make check -j2 || (test -e test/test-suite.log && cat test/test-suite.log && false)
+workflows:
+ build-and-test:
+ jobs:
+ - macos-apple-clang
diff --git a/.clang-tidy b/.clang-tidy
index 138dd8a..768427f 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -159,4 +159,6 @@ CheckOptions:
value: '2'
- key: 'readability-identifier-length.MinimumParameterNameLength'
value: '2'
+ - key: 'cppcoreguidelines-avoid-do-while.IgnoreMacros'
+ value: 'true'
...
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index 35976d4..5f56a14 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -5,10 +5,11 @@ title: ''
labels: bug
assignees: ''
+
---
**lnav version**
-v0.11.1 is the latest
+v0.11.2 is the latest
**Describe the bug**
A clear and concise description of what the bug is.
diff --git a/.github/actions/muslbuilder/Dockerfile b/.github/actions/muslbuilder/Dockerfile
index 41d0910..dc545fc 100644
--- a/.github/actions/muslbuilder/Dockerfile
+++ b/.github/actions/muslbuilder/Dockerfile
@@ -1,56 +1,16 @@
-FROM alpine:3.16
+FROM --platform=$TARGETPLATFORM alpine:latest AS depsbuilder
-LABEL com.github.actions.name="C++ MUSL Builder Slim"
-LABEL com.github.actions.description="Provides a C++ MUSL environment"
-LABEL com.github.actions.icon="settings"
-LABEL com.github.actions.color="orange"
-
-RUN apk update && apk add --no-cache \
- build-base \
- binutils \
- m4 \
- git \
- cmake \
- make \
- libgcc \
- musl-dev \
- gcc \
- g++ \
- lz4 \
- lz4-dev \
- lz4-static \
- zip \
- zstd \
- zstd-dev \
- zstd-static \
- perl \
+RUN apk add --no-cache \
autoconf \
automake \
- elfutils \
- elfutils-dev \
- libelf-static \
- libexecinfo-dev \
- libexecinfo-static \
- libtool \
- libunwind \
- libunwind-dev \
- libunwind-static \
- linux-headers
-
-ADD https://www.libarchive.org/downloads/libarchive-3.6.2.tar.gz /
-ADD https://ftp.gnu.org/gnu/make/make-4.2.1.tar.gz /
-ADD https://ftp.gnu.org/gnu/ncurses/ncurses-6.4.tar.gz /
-ADD https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.42/pcre2-10.42.tar.gz /
-ADD https://ftp.gnu.org/gnu/readline/readline-6.3.tar.gz /
-ADD https://zlib.net/zlib-1.2.13.tar.gz /
-ADD https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz /
-ADD https://www.sqlite.org/2023/sqlite-autoconf-3420000.tar.gz /
-ADD https://www.openssl.org/source/openssl-1.0.2n.tar.gz /
-ADD https://www.libssh2.org/download/libssh2-1.11.0.tar.gz /
-ADD https://curl.se/download/curl-8.1.2.tar.gz /
-ADD https://tukaani.org/xz/xz-5.4.3.tar.gz /
-
-RUN mkdir -p /fake.root /packages /extract
+ build-base \
+ curl \
+ ncurses \
+ ncurses-terminfo \
+ zip
+
+RUN mkdir -p /fake.root /extract
+
ENV SQLITE_CFLAGS="\
-DSQLITE_ENABLE_COLUMN_METADATA \
-DSQLITE_SOUNDEX \
@@ -84,79 +44,142 @@ xterm,\
xterm-256color\
"
-RUN cd /extract && for pkg in /*.tar.gz; do tar xvfz "$pkg"; done
-
-RUN cd /extract/bzip2-1.0.8 && make install PREFIX=/fake.root && make clean
-
-RUN cd /extract/zlib-* && ./configure --prefix=/fake.root && make -j2 && make install && make clean
-
-RUN cd /extract/xz-* && \
- ./configure --prefix=/fake.root \
- --disable-shared \
- "LDFLAGS=-L/fake.root/lib" \
- "CPPFLAGS=-I/fake.root/include" \
- && \
- make -j2 && \
- make install && make clean
-
-RUN cd /extract/libarchive-* && \
- ./configure --prefix=/fake.root \
- --disable-shared \
- "LDFLAGS=-L/fake.root/lib" \
- "CPPFLAGS=-I/fake.root/include" \
- && \
- make -j2 && \
- make install && make clean
-
-RUN cd /extract/make-4.2.1 && ./configure --prefix=/fake.root && make -j2 && make install && make clean
-RUN cd /extract/readline-* && ./configure --prefix=/fake.root && make -j2 && make install && make clean
-
-RUN cd /extract/sqlite-* && \
- ./configure --disable-editline --prefix=/fake.root \
- CFLAGS="${SQLITE_CFLAGS}" \
+RUN curl -sSL https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz | tar xvzC /extract/ && \
+ cd /extract/bzip* && \
+ make install PREFIX=/fake.root && \
+ cd /extract && rm -rf *
+
+RUN curl -sSL https://github.com/lz4/lz4/archive/refs/tags/v1.9.4.tar.gz | tar xvzC /extract/ && \
+ cd /extract/lz4* && \
+ make install PREFIX=/fake.root && \
+ cd /extract && rm -rf *
+
+RUN curl -sSL https://github.com/facebook/zstd/releases/download/v1.5.5/zstd-1.5.5.tar.gz | tar xvzC /extract/ && \
+ cd /extract/zstd* && \
+ make install PREFIX=/fake.root && \
+ cd /extract && rm -rf *
+
+RUN curl -sSL https://www.zlib.net/zlib-1.3.1.tar.gz | tar xvzC /extract/ && \
+ cd /extract/zlib-* && ./configure --prefix=/fake.root --static && \
+ make -j2 && \
+ make install && \
+ cd /extract && rm -rf *
+
+RUN curl -sSL https://tukaani.org/xz/xz-5.4.3.tar.gz | tar xvzC /extract/ && \
+ cd /extract/xz-* && \
+ ./configure --prefix=/fake.root \
+ --disable-shared \
+ "LDFLAGS=-L/fake.root/lib" \
+ "CPPFLAGS=-I/fake.root/include" \
+ && \
+ make -j2 && \
+ make install && \
+ cd /extract && rm -rf *
+
+RUN curl -sSL https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.42/pcre2-10.42.tar.gz | tar xvzC /extract/ && \
+ cd /extract/pcre2-* && \
+ ./configure --prefix=/fake.root \
+ --enable-jit \
+ --disable-shared \
&& \
- make -j2 && make install && make clean
-
-RUN cd /extract/openssl-* && \
- ./config --prefix=/fake.root -fPIC && \
- make -j2 && \
- make install && make clean
-
-RUN cd /extract/ncurses-* && \
- ./configure --prefix=/fake.root \
- --enable-ext-mouse \
- --enable-sigwinch \
- --with-default-terminfo-dir=/usr/share/terminfo \
- --enable-ext-colors \
- --enable-widec \
- --enable-termcap \
- --with-fallbacks=$NCURSES_FALLBACKS \
- && \
- make -j2 && make install && make clean
+ make -j2 && \
+ make install && \
+ cd /extract && rm -rf *
+
+RUN curl -sSL https://ftp.gnu.org/gnu/ncurses/ncurses-6.4.tar.gz | tar xvzC /extract/ && \
+ cd /extract/ncurses-* && \
+ ./configure --prefix=/fake.root \
+ --enable-ext-mouse \
+ --enable-sigwinch \
+ --enable-ext-colors \
+ --enable-widec \
+ --enable-termcap \
+ --with-fallbacks=$NCURSES_FALLBACKS \
+ --without-shared \
+ --without-progs \
+ --without-manpages \
+ --without-tests \
+ && \
+ make -j2 install && \
+ cd /extract && rm -rf *
+
+RUN curl -sSL https://www.openssl.org/source/openssl-1.0.2n.tar.gz | tar xvzC /extract/ && \
+ cd /extract/openssl-* && \
+ ./config --prefix=/fake.root no-shared -fPIC && \
+ make -j2 && \
+ make install && \
+ cd /extract && rm -rf *
+
+RUN curl -sSL https://www.libssh2.org/download/libssh2-1.11.0.tar.gz | tar xvzC /extract/ && \
+ cd /extract/libssh2-* && \
+ ./configure --prefix=/fake.root \
+ --with-libssl-prefix=/fake.root \
+ --with-libz-prefix=/fake.root \
+ --disable-shared \
+ "CPPFLAGS=-I/fake.root/include" \
+ "LDFLAGS=-L/fake.root/lib" && \
+ make -j2 && \
+ make install && \
+ cd /extract && rm -rf *
+
+RUN curl -sSL https://ftp.gnu.org/gnu/readline/readline-8.2.tar.gz | tar xvzC /extract/ && \
+ cd /extract/readline-* && \
+ ./configure --prefix=/fake.root --disable-shared && \
+ make -j2 && \
+ make install && \
+ cd /extract && rm -rf *
+
+RUN curl -sSL https://www.libarchive.org/downloads/libarchive-3.7.2.tar.gz | tar xvzC /extract/ && \
+ cd /extract/libarchive-* && \
+ ./configure --prefix=/fake.root \
+ --disable-shared \
+ "LDFLAGS=-L/fake.root/lib" \
+ "CPPFLAGS=-I/fake.root/include" \
+ && \
+ make -j2 && \
+ make install && \
+ cd /extract && rm -rf *
+
+RUN curl -sSL https://curl.se/download/curl-8.6.0.tar.gz | tar xvzC /extract/ && \
+ cd /extract/curl-* && \
+ ./configure --prefix=/fake.root \
+ --disable-shared \
+ --with-libssh2=/fake.root \
+ --without-libpsl \
+ --with-ssl=/fake.root \
+ --with-zlib=/fake.root && \
+ make -j2 && \
+ make install && \
+ cd /extract && rm -rf *
+
+RUN curl -sSL https://www.sqlite.org/2024/sqlite-autoconf-3450100.tar.gz | tar xvzC /extract/ && \
+ cd /extract/sqlite-* && \
+ ./configure --disable-editline \
+ --disable-shared \
+ --prefix=/fake.root \
+ CFLAGS="${SQLITE_CFLAGS}" \
+ && \
+ make -j2 && \
+ make install && \
+ cd /extract && rm -rf *
+
+FROM --platform=$TARGETPLATFORM alpine:latest
+
+COPY --from=depsbuilder /fake.root /fake.root
-RUN cd /extract/pcre2-* && \
- ./configure --prefix=/fake.root \
- --enable-jit \
- && \
- make -j2 && make install && make clean
-
-RUN cd /extract/libssh2-* && \
- ./configure --prefix=/fake.root \
- --with-libssl-prefix=/fake.root \
- --with-libz-prefix=/fake.root \
- "CPPFLAGS=-I/fake.root/include" \
- "LDFLAGS=-ldl -L/fake.root/lib" && \
- make -j2 && \
- make install && make clean
-
-RUN cd /extract/curl-* && \
- ./configure --prefix=/fake.root \
- --with-libssh2=/fake.root \
- --with-ssl=/fake.root \
- --with-zlib=/fake.root \
- "LDFLAGS=-ldl" && \
- make -j2 && \
- make install && make clean
+LABEL com.github.actions.name="C++ MUSL Builder Slim"
+LABEL com.github.actions.description="Provides a C++ MUSL environment"
+LABEL com.github.actions.icon="settings"
+LABEL com.github.actions.color="orange"
+
+RUN apk add --no-cache \
+ autoconf \
+ automake \
+ build-base \
+ cargo \
+ git \
+ rust \
+ zip
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
diff --git a/.github/actions/muslbuilder/entrypoint.sh b/.github/actions/muslbuilder/entrypoint.sh
index 7c40420..6e2eac7 100755
--- a/.github/actions/muslbuilder/entrypoint.sh
+++ b/.github/actions/muslbuilder/entrypoint.sh
@@ -2,7 +2,13 @@
set -Eeuxo pipefail
-cd $GITHUB_WORKSPACE
+if [ -z ${GITHUB_WORKSPACE:-} ]; then
+ git clone --depth 1 https://github.com/tstack/lnav.git
+ cd lnav
+else
+ cd ${GITHUB_WORKSPACE}
+fi
+
./autogen.sh
mkdir lbuild
cd lbuild
@@ -12,7 +18,7 @@ cd lbuild
CXXFLAGS='-static -g1 -gz=zlib -U__unused -no-pie -O2' \
LDFLAGS="-L/fake.root/lib" \
CPPFLAGS="-I/fake.root/include" \
- LIBS="-L/fake.root/lib -lexecinfo -lssh2 -llzma -lssl -lcrypto -lz -llz4" \
+ LIBS="-L/fake.root/lib -lssh2 -llzma -lssl -lcrypto -lz -llz4" \
--enable-static \
PATH="/fake.root/bin:${PATH}"
make -j2
diff --git a/.github/workflows/bins.yml b/.github/workflows/bins.yml
index 27a9a04..9fd2133 100644
--- a/.github/workflows/bins.yml
+++ b/.github/workflows/bins.yml
@@ -5,9 +5,14 @@ on:
branches:
- master
paths-ignore:
- - docs
+ - 'docs/**'
+ - 'test/**'
- README.md
- NEWS.md
+ - .github/actions/muslbuilder/Dockerfile
+ - .github/actions/muslbuilder/entrypoint.sh
+ - .github/workflows/musl-build-image.yml
+ - '.github/ISSUE_TEMPLATE/**'
workflow_call:
inputs:
lnav_version_number:
@@ -20,13 +25,14 @@ on:
type: string
jobs:
- build-musl:
+ build-musl-x86_64:
runs-on: ubuntu-latest
container:
- image: tstack/lnav-build:1
+ image: tstack/lnav-build:latest
+ options: --platform linux/amd64
env:
LNAV_BASENAME: lnav-${{ inputs.lnav_version_number }}
- LNAV_ZIPNAME: lnav-${{ inputs.lnav_version_number }}-x86_64-linux-musl.zip
+ LNAV_ZIPNAME: lnav-${{ inputs.lnav_version_number }}-linux-musl-x86_64.zip
steps:
- name: checkout
uses: actions/checkout@v3
@@ -37,7 +43,7 @@ jobs:
run: >-
mkdir ${{ env.LNAV_BASENAME }} &&
cd ${{ env.LNAV_BASENAME }} &&
- cp ../NEWS.md ../README . &&
+ cp ../NEWS.md ../README ../lnav.1 . &&
cp ../lbuild/src/lnav . &&
cd .. &&
zip -r ${{ env.LNAV_ZIPNAME }} ${{ env.LNAV_BASENAME }}
@@ -45,7 +51,7 @@ jobs:
uses: actions/upload-artifact@v3
with:
# Artifact name
- name: lnav-linux-musl-64bit.zip
+ name: lnav-linux-musl-x86_64.zip
# A file, directory or wildcard pattern that describes what to upload
path: lbuild/src/lnav
- name: Upload musl-binary archive
@@ -59,6 +65,59 @@ jobs:
asset_name: ${{ env.LNAV_ZIPNAME }}
asset_content_type: application/octet-stream
+ build-arm:
+ runs-on: ubuntu-latest
+ if: false
+ strategy:
+ matrix:
+ include:
+ - container-platform: linux/arm/v7
+ arch: armv7l
+ - container-platform: linux/arm64
+ arch: aarch64
+ env:
+ LNAV_BASENAME: lnav-${{ inputs.lnav_version_number }}
+ LNAV_ZIPNAME: lnav-${{ inputs.lnav_version_number }}-linux-musl-${{ matrix.arch }}.zip
+ LNAV_ARTIFACT: lnav-linux-musl-${{ matrix.arch }}.zip
+ steps:
+ - name: checkout
+ uses: actions/checkout@v3
+ - name: Set up QEMU
+ uses: docker/setup-qemu-action@v2
+ - name: make
+ uses: addnab/docker-run-action@v3
+ with:
+ image: tstack/lnav-build:latest
+ options: -v ${{ github.workspace }}:/lnav -e GITHUB_WORKSPACE=/lnav --platform ${{ matrix.container-platform }}
+ run: /entrypoint.sh
+ - name: Build musl package
+ if: ${{ inputs.lnav_version_number != '' }}
+ run: >-
+ cd ${{ github.workspace }} &&
+ mkdir ${{ env.LNAV_BASENAME }} &&
+ cd ${{ env.LNAV_BASENAME }} &&
+ cp ../NEWS.md ../README ../lnav.1 . &&
+ cp ../lbuild/src/lnav . &&
+ cd .. &&
+ zip -r ${{ env.LNAV_ZIPNAME }} ${{ env.LNAV_BASENAME }}
+ - name: Upload a Build Artifact
+ uses: actions/upload-artifact@v3
+ with:
+ # Artifact name
+ name: ${{ env.LNAV_ARTIFACT }}
+ # A file, directory or wildcard pattern that describes what to upload
+ path: ${{ github.workspace }}/lbuild/src/lnav
+ - name: Upload musl-binary archive
+ uses: actions/upload-release-asset@v1.0.2
+ if: ${{ inputs.upload_url != '' }}
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ upload_url: ${{ inputs.upload_url }}
+ asset_path: ${{ github.workspace }}/${{ env.LNAV_ZIPNAME }}
+ asset_name: ${{ env.LNAV_ZIPNAME }}
+ asset_content_type: application/octet-stream
+
build-macos:
runs-on: macos-12
env:
@@ -82,7 +141,7 @@ jobs:
"LDFLAGS=-L$(brew --prefix ncurses)/lib -L$(brew --prefix xz)/lib -L$(brew --prefix zstd)/lib/" \
--with-readline=$(brew --prefix readline) \
--with-libarchive=$(brew --prefix libarchive) \
- "LIBS=-llzma -lzstd -lbrotlidec-static -liconv -llz4"
+ "LIBS=-llzma -lzstd -liconv -llz4"
- name: make
run: make -j2
- name: Build macos package
@@ -90,18 +149,20 @@ jobs:
run: >-
mkdir ${{ env.LNAV_BASENAME }} &&
cd ${{ env.LNAV_BASENAME }} &&
- cp ../NEWS.md ../README . &&
+ cp ../NEWS.md ../README ../lnav.1 . &&
cp ../src/lnav . &&
cd .. &&
zip -r ${{ env.LNAV_ZIPNAME }} ${{ env.LNAV_BASENAME }}
- - name: Upload config.log artifact
+ - name: Upload build artifacts
uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
# Artifact name
- name: config-log.zip
+ name: lnav-macos-x86_64.zip
# A file, directory or wildcard pattern that describes what to upload
- path: config.log
+ path: |
+ config.log
+ src/lnav
- name: Upload macos archive
uses: actions/upload-release-asset@v1.0.2
if: ${{ inputs.upload_url != '' }}
diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml
index 66188af..d053a25 100644
--- a/.github/workflows/c-cpp.yml
+++ b/.github/workflows/c-cpp.yml
@@ -71,8 +71,11 @@ jobs:
libbz2-dev
libcurl4-openssl-dev
libreadline-dev
+ pipx
tshark
zlib1g-dev
+ - name: Install python packages
+ run: pipx install check-jsonschema
- name: autogen
run: ./autogen.sh
- name: configure
@@ -141,7 +144,7 @@ jobs:
CPPFLAGS="-I../src -I../../lnav/src -I../../lnav/src/fmtlib -O2 -DNCURSES_STATIC" \
CXXFLAGS="-fPIC" \
CFLAGS="-fPIC" \
- LIBS="-larchive -lssh2 -llzma -llz4 -lz -lzstd -lssl -lcrypto -liconv -lunistring -lbrotlicommon" \
+ LIBS="-larchive -lssh2 -llzma -llz4 -lz -lzstd -lssl -lcrypto -liconv -lunistring -lbrotlicommon -lcrypt32" \
--sysconfdir=/etc \
--prefix=$PREFIX || cat config.log
- name: '🚧 Make (do not use -j)'
diff --git a/.github/workflows/check-md-links.yml b/.github/workflows/check-md-links.yml
index f55b468..ef17d24 100644
--- a/.github/workflows/check-md-links.yml
+++ b/.github/workflows/check-md-links.yml
@@ -1,6 +1,15 @@
name: Check Markdown links
-on: push
+on:
+ push:
+ paths:
+ - '**.md'
+ - .github/workflows/check-md-links.yml
+
+ schedule:
+ # The markdown files are not frequently modified. So run the job at least
+ # once every week.
+ - cron: '30 1 * * TUE'
jobs:
markdown-link-check:
diff --git a/.github/workflows/musl-build-image.yml b/.github/workflows/musl-build-image.yml
new file mode 100644
index 0000000..75b39a3
--- /dev/null
+++ b/.github/workflows/musl-build-image.yml
@@ -0,0 +1,45 @@
+name: musl-build-image
+
+on:
+ push:
+ branches: master
+ paths:
+ - .github/actions/muslbuilder/Dockerfile
+ - .github/actions/muslbuilder/entrypoint.sh
+ - .github/workflows/musl-build-image.yml
+
+concurrency:
+ group: musl-build-image
+ cancel-in-progress: true
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ env:
+ CONTAINER_TAG: tstack/lnav-build:latest
+ steps:
+ -
+ name: checkout code
+ uses: actions/checkout@v3
+ -
+ name: Set up QEMU
+ uses: docker/setup-qemu-action@v2
+ -
+ name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v2
+ -
+ name: Login to Docker Hub
+ uses: docker/login-action@v2
+ with:
+ username: ${{ secrets.DOCKER_USERNAME }}
+ password: ${{ secrets.DOCKER_PASSWORD }}
+ -
+ name: Build and push
+ uses: docker/build-push-action@v4
+ with:
+ context: ${{ github.workspace }}/.github/actions/muslbuilder/
+ platforms: linux/amd64, linux/arm/v7, linux/arm64
+ push: true
+ tags: ${{ env.CONTAINER_TAG }}
+ cache-from: type=registry,ref=${{ env.CONTAINER_TAG }}-buildcache
+ cache-to: type=registry,ref=${{ env.CONTAINER_TAG }}-buildcache,mode=max
diff --git a/.github/workflows/rpmbuild.yml b/.github/workflows/rpmbuild.yml
index 67e6d83..a32c150 100644
--- a/.github/workflows/rpmbuild.yml
+++ b/.github/workflows/rpmbuild.yml
@@ -15,7 +15,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v3
- name: Get the release version from the tag
shell: bash
diff --git a/.gitignore b/.gitignore
index 100682c..dbfb3d9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
.deps
.lnav
+.DS_Store
*.dat
*.diff
test/*.err
diff --git a/.readthedocs.yaml b/.readthedocs.yaml
index fd30369..28ce5db 100644
--- a/.readthedocs.yaml
+++ b/.readthedocs.yaml
@@ -5,6 +5,11 @@
# Required
version: 2
+build:
+ os: "ubuntu-22.04"
+ tools:
+ python: "3.11"
+
# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/source/conf.py
@@ -15,6 +20,5 @@ formats:
# Optionally set the version of Python and requirements required to build your docs
python:
- version: 3.7
install:
- requirements: docs/requirements.txt
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0234703..3ef1af8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,8 +5,8 @@ include(cmake/prelude.cmake)
set(CMAKE_CXX_STANDARD 14)
project(
lnav
- VERSION 0.11.2
- DESCRIPTION "An advanced log file viewer for the small-scale."
+ VERSION 0.12.2
+ DESCRIPTION "An advanced log file viewer for the terminal."
HOMEPAGE_URL "https://lnav.org/"
LANGUAGES CXX C
)
@@ -34,7 +34,7 @@ set(lnav_LIBS
readline::readline
LibArchive::LibArchive
ZLIB::ZLIB
- )
+)
add_subdirectory(src)
# add_subdirectory(test)
diff --git a/Makefile.am b/Makefile.am
index d3f34d5..af3bb31 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -8,6 +8,15 @@ noinst_SCRIPTS = TESTS_ENVIRONMENT
dist_man_MANS = lnav.1
EXTRA_DIST = \
+ docs/lnav-architecture.png \
+ docs/lnav-tui.png \
+ docs/schemas/config-v1.schema.json \
+ docs/schemas/event-file-format-detected-v1.schema.json \
+ docs/schemas/event-file-open-v1.schema.json \
+ docs/schemas/event-log-msg-detected-v1.schema.json \
+ docs/schemas/event-session-loaded-v1.schema.json \
+ docs/schemas/format-v1.schema.json \
+ ARCHITECTURE.md \
AUTHORS \
LICENSE \
README.md
diff --git a/NEWS.md b/NEWS.md
index acd36f6..3c73f01 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,3 +1,354 @@
+## lnav v0.12.2
+
+Features:
+* Added mouse support that can be toggled with `F2` or enabled
+ by default with: `:config /ui/mouse/mode enabled`. With
+ mouse support enabled, many of the UI elements will respond to
+ mouse inputs:
+ - clicking on the main view will move the cursor to the given
+ row and dragging will scroll the view as needed;
+ - shift + clicking/dragging in the main view will highlight
+ lines and then toggle their bookmark status on release;
+ - double-clicking in the main view will select the underlying
+ text and drag-selecting within a line will select the given
+ text;
+ - when double-clicking text: if the mouse pointer is inside
+ a quoted string, the contents of the string will be selected;
+ if the mouse pointer is on the quote, the quote will be included
+ in the selection; if the mouse pointer is over a bracket
+ (e.g. [],{},()) where the matching bracket is on the same line,
+ the selection will span from one bracket to the other;
+ - when text is selected, a menu will pop up that can be used
+ to filter based on the current text, search for it, or copy
+ it to the clipboard;
+ - right-clicking the start of a log message in the main view
+ will open the parser details overlay;
+ - the parser details now displays a diamond next to fields to
+ indicate whether they are shown/hidden and this can be
+ clicked to toggle the state;
+ - the parser details will show a bar chart icon for fields with
+ values which, when clicked, will open either the spectrogram
+ view for the given field or open the DB query prompt with a
+ PRQL query to generate a histogram of the field values;
+ - clicking in the scroll area will move the view by a page,
+ double-clicking will move the view to that area, and
+ dragging the scrollbar will move the view to the given spot;
+ - clicking on the breadcrumb bar will select a crumb and
+ selecting a possibility from the popup will move to that
+ location in the view;
+ - clicking on portions of the bottom status bar will trigger
+ a relevant action (e.g. clicking the line number will open
+ the command prompt with `:goto <current-line>`);
+ - clicking on the configuration panel tabs (i.e. Files/Filters)
+ will open the selected panel and clicking parts of the
+ display in there will perform the relevant action (e.g.
+ clicking the diamond will enable/disable the file/filter);
+ - clicking in a prompt will move the cursor to the location;
+ - clicking on a column in the spectrogram view will select it.
+
+ (Note that this is new work, so there are likely to be some
+ glitches.)
+* Added a `journald://` URL handler that will call `journalctl`
+ and pass any query parameters as options. For example, the
+ following command:
+
+ ```
+ $ lnav 'journal://?since=yesterday'
+ ```
+
+ Will execute the following and capture the output:
+
+ ```
+ journalctl --output=json -f --since=yesterday
+ ```
+* Added the "last-word" line-format field shortening algorithm
+ from @flicus.
+* Added a `stats.hist` PRQL transform that produces a histogram
+ of values over time.
+* The preview for the `:open` command will now show a listing
+ of archive contents.
+* Added `humanize_id` SQL function that colorizes a string using
+ ANSI escape codes.
+* Added a `selected_text` column to the `lnav_views` table that
+ reports information about text that was selected with a mouse.
+ This makes it possible to script operations that use the
+ selected text as an input.
+* Added `breadcrumb` as an option to the `:prompt` command so
+ that the breadcrumb hotkey can be configured.
+
+Interface changes:
+* The bar charts in the DB view have now been moved to their
+ individual columns instead of occupying the whole width of
+ the view. The result is much cleaner, so the charts are
+ now enabled by default again.
+* Cursor mode in the main view is now the default instead of
+ using the top line as the focus. You can change back by
+ running:
+
+ `:config /ui/movement/mode top`
+* In the parser details panel (opened by pressing `p`), you
+ can now hide/show fields by moving the cursor line to the
+ given field and pressing the space bar or by clicking on
+ the diamond with the mouse.
+* The `sv` keymap binds `§` to focus the breadcrumb bar.
+
+Bug Fixes:
+* With the recent xz backdoor shenanigans, it seems like a good
+ time to add some checks for data being hidden by escape codes:
+ - File names with escape sequences are now displayed in quotes
+ with backslash escapes.
+ - Text that has the same foreground and background colors will
+ have the background set to a contrasting color.
+* Sub-millisecond time values should now be preserved when
+ displaying JSON-lines logs.
+* A crash during initialization on Apple Silicon and MacOS 12
+ has been fixed.
+* A crash when previewing non-text files.
+* Optimized ANSI-escape processing.
+* Various fixes to make lnav usable as a `PAGER`.
+
+## lnav v0.12.1
+
+Features:
+* Database queries can now be written in
+ [PRQL](https://prql-lang.org). When executing a query with `;`,
+ if the query starts with `from`, it will be treated as PRQL.
+ The pipeline structure of PRQL queries is more desirable for
+ interactive use since lnav can make better suggestions and
+ show previews of the stages of the pipeline.
+* Log partitions can automatically be created by defining a log
+ message pattern in a log format. Under a format definition,
+ add an entry into the "partitions" object in a format definition.
+ The "pattern" property specifies the regular expression to match
+ against a line in a file that matches the format. If a match is
+ found, the partition name will be set to the value(s) captured
+ by the regex. To restrict matches to certain files, you can add
+ a "paths" array whose object elements contain a "glob" property
+ that will be matched against file names.
+
+Interface changes:
+* When using PRQL in the database query prompt (`;`),
+ the preview pane will show the results for the pipeline
+ stage the cursor is within along with the results of
+ the previous stage (if there is one). The preview
+ works on a limited data set, so the preview results
+ may differ from the final results.
+* Changed the breadcrumb bar styling to space things out
+ more and make the divisions between items clearer.
+* The `ESC` key can now be used to exit the files/filters
+ configuration panel instead of `q`. This should make
+ it easier to avoid accidentally exiting lnav.
+* Added some default help text for the command prompt.
+* Suggestions are now shown for some commands and can
+ be accepted by pressing the right arrow key. For
+ example, after typing in `:filter-in` the current
+ search term for the view will be suggested (if
+ one is active).
+* The focused line should be preserved more reliably in
+ the LOG/TEXT views.
+* In the LOG view, the current partition name (as set
+ with the `:partition-name` command) is shown as the
+ first breadcrumb in the breadcrumb bar. And, when
+ that breadcrumb is selected, you can select another
+ partition to jump to.
+* The `{` / `}` hotkeys, `:next-section`, and `:prev-section`
+ commands now work in the LOG view and take you to the
+ next/previous partition.
+* The DB view now defaults to not showing bar charts.
+
+Breaking changes:
+* Many of the lesser used column in the log format tables
+ (e.g. `log_tags`) have been moved to after the columns
+ defined by the format. These columns are usually `NULL`
+ and are a distraction when previewing queries.
+
+## lnav v0.12.0
+
+Features:
+* Added a Gantt Chart view to visualize operations over time
+ based on the "opid" in log messages. The view shows
+ the operation IDs, a description of the operation captured
+ from log messages, and a bar representing the period of
+ time that the operation was running.
+* Added the `:sh` command and `-e` option to execute a shell
+ command-line and display its output within **lnav**. The
+ captured output will be displayed in the TEXT view. The
+ lines from stdout and stderr are recorded separately so
+ that the lines from stderr can be shown in the theme's
+ "error" highlight. The time that the lines were received
+ are also recorded internally so that the "time-offset"
+ display (enabled by pressing `Shift` + `T`) can be shown
+ and the "jump to slow-down" hotkeys (`s`/`Shift` + `S`)
+ work. Since the line-by-line timestamps are recorded
+ internally, they will not interfere with timestamps that
+ are in the commands output.
+* Added a `:cd` command to change **lnav**'s current directory.
+* Added support for automatically converting files that are
+ in a format not natively supported by **lnav**. The new
+ `converter` section in a log format definition allows you
+ to specify how a file type can be detected and converted.
+ The built-in PCAP support in **lnav** is implemented using
+ this mechanism.
+* Added a `shell_exec()` SQLite function that executes a
+ command-line with the user's `$SHELL` and returns the
+ output.
+* Added support for custom URL schemes that are handled by an
+ lnav script. Schemes can be defined under
+ `/tuning/url-schemes`. See the main docs for more details.
+* Added `docker://` and `podman://` URL schemes that can be
+ used to tail the logs for containers (e.g.
+ `docker://my-container`) or files within a container (e.g.
+ `docker://my-serv/var/log/dpkg.log`). Containers mentioned
+ in a "Compose" configuration file can be tailed by using
+ `compose` as the host name with the path to the configuration
+ file (e.g. `docker://compose/compose.yaml`).
+* Added an `:annotate` command that can trigger a call-out
+ to a script to analyze a log message and generate an
+ annotation that is attached to the message. The script
+ is executed asynchronously, so it will not block input
+ and the result is saved in the session. Annotations are
+ defined in the `/log/annotations` configuration property.
+* Timestamps with numeric timezone offsets (or `Z`) are now
+ automatically converted to the local time zone. For
+ example, a timestamp ending in `-03:00` will be treated
+ as three hours behind UTC and then adjusted to the local
+ timezone. This feature can be disabled by setting the
+ `/log/date-time/convert-zoned-to-local` configuration
+ property to `false`. Timestamps without a zone or have
+ a symbolic zone name (e.g. `PDT`) are not converted.
+* Added the SQLite JSON functions to the online help.
+* Added `config get` and `config blame` management CLI
+ commands to get the current configuration and the file
+ locations where the configuration options came from.
+* When piping data into **lnav**'s stdin, the input used to
+ only be written to a single file without any rotation.
+ Now, the input is written to a directory of rotating files.
+ The same is true for the command-lines executed through the
+ new `:sh` command. The piped data can be managed using the
+ new `piper` commands in the management CLI.
+* The `$LNAV_HOME_DIR` and `$LNAV_WORK_DIR` environment
+ variables are now defined inside **lnav** and refer to
+ the location of the user's configuration directory and
+ the directory where cached data is stored, respectively.
+* The `<pre>` and `<img>` tags are now recognized in
+ Markdown files.
+* The `style` attribute in `<span>` tags is now supported.
+ The following CSS properties and values are supported:
+ * `color` and `background-color` with CSS color names
+ * `font-weight` with a value of `bold` or `bolder`
+ * `text-decoration` with `underline`
+ * `border-left` and `border-right` with the `solid`,
+ `dashed` and `dotted` line styles and colors.
+* Added an `options` column to the `lnav_views` table
+ to allow more control over overlays.
+* Added a "Dracula" theme as described at:
+ https://draculatheme.com
+* Added the following styles for themes:
+ - `/ui/theme-defs/<theme_name>/syntax-styles/inline-code`
+ - `/ui/theme-defs/<theme_name>/syntax-styles/type`
+ - `/ui/theme-defs/<theme_name>/syntax-styles/function`
+ - `/ui/theme-defs/<theme_name>/syntax-styles/separators-references-accessors`
+* Multi-line block comments (i.e. `/* ... */`) and strings
+ are now recognized and styled as appropriate.
+* Added `error` and `data` columns to the `fstat()`
+ table-valued-function. The `error` column is non-NULL
+ if there is a problem accessing the file. The `data`
+ contains the contents of the file, as such, it is
+ hidden by default.
+* Added a log format for Redis.
+* The `:eval` command will now treat its argument(s) as a
+ script, allowing multiple commands to be executed.
+* Added a `timezone()` SQL function for converting a timestamp
+ to a target timezone.
+* Added a `:convert-time-to` command that converts the
+ timestamp of the focused log message to the given timezone.
+* Added the `:set-file-timezone` and `:clear-file-timezone`
+ commands to set the timezone for log messages that don't
+ include a zone in their timestamp.
+* Added the `options_path` and `options` columns to the
+ `lnav_file` table so you can see what options are applied
+ to a file. Currently, the only option is the default
+ timezone that is set by the `:set-file-timezone` command.
+* Added the `config file-options` management command that
+ can be used to examine the options that will be applied
+ to a given file.
+* When viewing a diff, the sections of the diff for each
+ file is recognized and shown in the breadcrumb bar. So,
+ you can see the file the focused line is in. You can
+ also jump to a particular file by focusing on the
+ breadcrumb bar, selecting the crumb, and then selecting
+ the desired file.
+* Binary files are now displayed as a hex dump with ASCII
+ representation (where applicable).
+* Added a `log_msg_line()` SQL function that will return the
+ line number of the start of the currently focused
+ message in the log view.
+* Added a `log_msg_values` column to the `all_logs` SQL
+ table that contains a JSON object with the top 5 values
+ for the fields extracted from the log message.
+* Added `:next-section` and `:prev-section` commands for
+ moving to the next and previous section of a document.
+ For example, the next section in a man page or JSON
+ array. The default keymap has been changed to bind
+ the curly brace keys to these commands.
+* Added Nextcloud log format from Adam Monsen.
+* Added GitHub Event Log format for files from gharchive.org.
+ It makes a good example of a JSON-Lines format.
+
+Bug Fixes:
+* Binary data piped into stdin should now be treated the same
+ as if it was in a file that was passed on the command-line.
+* The `-I` option is now recognized in the management CLI
+ (i.e. when you run **lnav** with the `-m` flag).
+* Fields in the bro and w3c log formats that were hidden are
+ now saved in the session and restored.
+* A warning will now be issued if a timestamp in a log format's
+ sample message does not match completely. Warnings in the
+ configuration can be viewed by passing the `-W` flag.
+* Importing from regex101.com broke due to some changes in the
+ API.
+* The details overlay for a log message no longer shows keys
+ for unknown JSON properties. These extra fields are now
+ shown with the proper `jget(log_raw_text, '/...')` SQL
+ expression needed to retrieve the value.
+* Improved text-wrapping when rendering Markdown.
+
+Interface changes:
+* The breadcrumb bar hotkey is moving to backtick `` ` ``
+ instead of `ENTER`.
+* The DB view now uses the "alt-text" theme style to draw
+ alternating rows instead of being hard-coded to bold. The
+ alternation is also now done in groups of two rows instead
+ of only a single row. Numbers are also rendered using the
+ "number" theme style as well.
+* The log message overlay in the LOG view is now limited
+ 2/3rds of the height. You can focus on the overlay panel
+ by pressing `CTRL-]`. The "alt-text" theme style is also
+ used to draw the overlay contents now as well. (The
+ overlay is used to display the parser details, comments,
+ and annotations.)
+* The `{` and `}` keys have been changed from moving
+ through the "location history" to moving to the previous
+ and next section in a document.
+* Added indent guidelines when structured data is detected.
+
+Breaking changes:
+* Removed the `-w` command-line option. This option was
+ useful when stdin was not automatically preserved. Since
+ the data is now stored (and cleaned up) as well as being
+ spread across multiple files, this option doesn't make
+ sense anymore.
+* The `-t` command-line flag behaves a little differently
+ behind the scenes now. Timestamps will always be
+ recorded for each line piped into lnav. This flag means
+ that the data should be treated as a log file instead of
+ plain text.
+* Data piped into **lnav** is now stored in the work
+ directory instead of the `stdin-captures` dot-lnav
+ directory.
+* Changed the "Bunyan" log format name from `bunyan` to
+ `bunyan_log` to be consistent with other format names.
+
## lnav v0.11.2
Features:
@@ -12,7 +363,7 @@ Features:
field should automatically be determined by the observed
values.
* Added bunyan log format from Tobias Gruetzmacher.
-* Added cloudlare log format from @minusf.
+* Added cloudflare log format from @minusf.
* Number fields used in a JSON log format `line-format`
array now default to being right-aligned. Also, added
`prefix` and `suffix` to `line-format` elements so a
diff --git a/README.md b/README.md
index 5f1185a..74a0113 100644
--- a/README.md
+++ b/README.md
@@ -5,51 +5,95 @@
[![Coverage Status](https://coveralls.io/repos/github/tstack/lnav/badge.svg?branch=master)](https://coveralls.io/github/tstack/lnav?branch=master)
[![lnav](https://snapcraft.io/lnav/badge.svg)](https://snapcraft.io/lnav)
-[<img src="https://assets-global.website-files.com/6257adef93867e50d84d30e2/62594fddd654fc29fcc07359_cb48d2a8d4991281d7a6a95d2f58195e.svg" height="20"/>](https://discord.gg/erBPnKwz7R)
+[<img src="https://assets-global.website-files.com/6257adef93867e50d84d30e2/62594fddd654fc29fcc07359_cb48d2a8d4991281d7a6a95d2f58195e.svg" height="20" alt="Discord Logo"/>](https://discord.gg/erBPnKwz7R)
_This is the source repository for **lnav**, visit [https://lnav.org](https://lnav.org) for a high level overview._
# LNAV -- The Logfile Navigator
-The Log File Navigator, **lnav** for short, is an advanced log file viewer
-for the small-scale. It is a terminal application that can understand
-your log files and make it easy for you to find problems with little to
-no setup.
+The Logfile Navigator is a log file viewer for the terminal. Given a
+set of files/directories, **lnav** will:
+
+- decompress as needed;
+- detect their format;
+- merge the files together by time into a single view;
+- tail the files, follow renames, find new files in directories;
+- build an index of errors and warnings;
+- [pretty-print JSON-lines](https://docs.lnav.org/en/latest/formats.html#json-lines).
+
+Then, in the **lnav** TUI, you can:
+
+- jump quickly to the previous/next error ([press `e`/`E`](https://docs.lnav.org/en/latest/hotkeys.html#spatial-navigation));
+- search using regular expressions ([press `/`](https://docs.lnav.org/en/latest/hotkeys.html#spatial-navigation));
+- highlight text with a regular expression ([`:highlight`](https://docs.lnav.org/en/latest/commands.html#highlight-pattern) command);
+- filter messages using [regular expressions](https://docs.lnav.org/en/latest/usage.html#regular-expression-match) or [SQLite expressions](https://docs.lnav.org/en/latest/usage.html#sqlite-expression);
+- pretty-print structured text ([press `P`](https://docs.lnav.org/en/latest/ui.html#pretty));
+- view a histogram of messages over time ([press `i`](https://docs.lnav.org/en/latest/ui.html#hist));
+- query messages using SQLite ([press `;`](https://docs.lnav.org/en/latest/sqlext.html))
## Screenshot
-The following screenshot shows a syslog file. Log lines are displayed with
-highlights. Errors are red and warnings are yellow.
+The following screenshot shows a mix of syslog and web access log
+files. Failed requests are shown in red. Identifiers, like IP
+address and PIDs are semantically highlighted.
+
+[![Screenshot](docs/assets/images/lnav-front-page.png)](docs/assets/images/lnav-front-page.png)
+
+## Why not **just** use `tail`/`grep`/`less`?
+
+The standard Unix utilities are great for processing raw text lines,
+however, they do not understand log messages. Tail can watch
+multiple files at a time, but it won't display messages in order by
+time and you can't scroll backwards. Grep will only find matching
+lines, but won't return a full multi-line log message. Less can only
+display a single file at a time. Also, none of these basic tools
+handle compressed files.
+
+## Try online before installing
+
+You can SSH into a demo node to play with lnav before installing.
+
+The "playground" account starts lnav with a couple of log files as
+an example:
-[![Screenshot](docs/assets/images/lnav-syslog-thumb.png)](docs/assets/images/lnav-syslog.png)
+[`$ ssh playground@demo.lnav.org`](ssh://playground@demo.lnav.org)
-## Features
+The "tutorial 1" account is an interactive tutorial that can teach
+you the basics of operation:
-- Log messages from different files are collated together into a single view
-- Automatic detection of log format
-- Automatic decompression of GZip and BZip2 files
-- Filter log messages based on regular expressions
-- Use SQL to analyze your logs
-- And more...
+[`$ ssh tutorial1@demo.lnav.org`](ssh://tutorial1@demo.lnav.org)
## Installation
[Download a statically-linked binary for Linux/MacOS from the release page](https://github.com/tstack/lnav/releases/latest#release-artifacts)
+### Brew on MacOS
+
+```console
+$ brew install lnav
+```
+
## Usage
-The only file installed is the executable, `lnav`. You can execute it
-with no arguments to view the default set of files:
+Simply point **lnav** at the files or directories you want to
+monitor, it will figure out the rest:
-```
-$ lnav
+```console
+$ lnav /path/to/file1 /path/to/dir ...
```
-You can view all the syslog messages by running:
+The **lnav** TUI will pop up right away and begin indexing the
+files. Progress is displayed in the "Files" panel at the
+bottom. Once the indexing has finished, the LOG view will display
+the log messages that were recognized[^1]. You can then use the
+usual hotkeys to move around the view (arrow keys or
+`j`/`k`/`h`/`l` to move down/up/left/right).
-```
-$ lnav /var/log/messages*
-```
+See the [Usage section](https://docs.lnav.org/en/latest/usage.html)
+of the online documentation for more information.
+
+[^1]: Files that do not contain log messages can be seen in the
+ TEXT view (reachable by pressing `t`).
### Usage with `systemd-journald`
@@ -138,6 +182,7 @@ The following software packages are required to build lnav:
- libcurl - The cURL library for downloading files from URLs. Version 7.23.0 or higher is required.
- libarchive - The libarchive library for opening archive files, like zip/tgz.
- wireshark - The 'tshark' program is used to interpret pcap files.
+- cargo/rust - The Rust language is used to build the PRQL compiler.
#### Build
diff --git a/TESTS_ENVIRONMENT.in b/TESTS_ENVIRONMENT.in
index 42de497..48aa143 100644
--- a/TESTS_ENVIRONMENT.in
+++ b/TESTS_ENVIRONMENT.in
@@ -106,6 +106,7 @@ run_cap_test() {
-e "s;${builddir};{test_dir};g" \
-e "s;${top_srcdir};{top_srcdir};g" \
-e "s;${top_srcdir_parent};{top_srcdir_parent};g" \
+ -e "s;lnav-user-${UID}-work;lnav-user-{uid}-work;g" \
${test_file_base}_${test_hash}.out
echo
printf "%s \033[0;35m=============================================================\033[0m\n" $(date -Iseconds)
@@ -133,6 +134,7 @@ run_cap_test() {
-e "s;${test_dir};{test_dir};g" \
-e "s;${builddir};{builddir};g" \
-e "s;${top_srcdir};{top_srcdir};g" \
+ -e "s;lnav-user-${UID}-work;lnav-user-{uid}-work;g" \
-e 's;"errorId":".+";;g' \
${test_file_base}_${test_hash}.err
printf '\033[0;31mBEGIN\033[0m %s\n' "${test_file_base}_${test_hash}.err"
diff --git a/conanfile.py b/conanfile.py
index b9fa5c4..b5ae53c 100644
--- a/conanfile.py
+++ b/conanfile.py
@@ -4,7 +4,7 @@ from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps
class LnavConan(ConanFile):
name = "lnav"
- version = "0.11.2"
+ version = "0.12.1"
homepage = "https://lnav.org"
url = "https://github.com/tstack/lnav.git"
license = "BSD-2-Clause"
diff --git a/configure.ac b/configure.ac
index abc8015..c2e553d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-AC_INIT([lnav],[0.11.2],[lnav@googlegroups.com],[lnav],[http://lnav.org])
+AC_INIT([lnav],[0.12.2],[lnav@googlegroups.com],[lnav],[http://lnav.org])
AC_CONFIG_SRCDIR([src/lnav.cc])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([foreign subdir-objects])
@@ -13,6 +13,8 @@ AX_PTHREAD()
LIBS="$PTHREAD_LIBS $LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
CC="$PTHREAD_CC"
+CXX="$PTHREAD_CXX"
+CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS"
AC_LANG(C++)
AX_CXX_COMPILE_STDCXX_14([noext], [mandatory])
@@ -27,9 +29,8 @@ AS_CASE([x$srcdir],
AC_SUBST(abssrcdir)
-AC_PROG_CXX
-
-CPPFLAGS="$CPPFLAGS -D_ISOC99_SOURCE -D__STDC_LIMIT_MACROS -D_GNU_SOURCE"
+CXX=`echo $CXX | sed -e 's/-std=gnu++11//g'`
+CPPFLAGS="$CPPFLAGS -D_ISOC99_SOURCE -D__STDC_LIMIT_MACROS -D_GNU_SOURCE -DUSE_OS_TZDB=1 -DHAS_REMOTE_API=0"
AC_ARG_ENABLE([debug],
AS_HELP_STRING([--enable-debug],
@@ -49,11 +50,13 @@ AM_PROG_AR
AC_PROG_LN_S
AC_PROG_MAKE_SET
+AC_PATH_PROG(CARGO_CMD, [cargo])
AC_PATH_PROG(BZIP2_CMD, [bzip2])
AC_PATH_PROG(RE2C_CMD, [re2c])
AM_CONDITIONAL(HAVE_RE2C, test x"$RE2C_CMD" != x"")
AC_PATH_PROG(XZ_CMD, [xz])
AC_PATH_PROG(TSHARK_CMD, [tshark])
+AC_PATH_PROG(CHECK_JSONSCHEMA, [check-jsonschema])
AC_CHECK_SIZEOF(off_t)
AC_CHECK_SIZEOF(size_t)
@@ -264,7 +267,7 @@ AC_SUBST(STATIC_LDFLAGS)
AS_CASE(["$host_os"],
[darwin*],
- [],
+ [LDFLAGS="$LDFLAGS -framework CoreFoundation"],
[
curses_lib=$(echo $CURSES_LIB | sed -e 's/-l//')
AS_IF([test $? -eq 0],
@@ -295,7 +298,7 @@ AS_CASE(["$host_os"],
saved_location=$(pwd)
cd $srcdir
-version=$(expr $(git describe --abbrev=7 --dirty --always --tags 2>/dev/null) : 'v\([[0-9]]*\.[[0-9]]*\.[[0-9]]*.*\)' 2>/dev/null)
+version=$(echo $(git describe --abbrev=7 --dirty --always --tags 2>/dev/null) | sed -e 's/^v//' 2>/dev/null)
cd $saved_location
AS_IF([test $? -eq 0],
[version=$(echo $version | tr -d '\n')
@@ -304,11 +307,13 @@ AS_IF([test $? -eq 0],
[VCS package string])],
AC_DEFINE_UNQUOTED([VCS_PACKAGE_STRING], ["$PACKAGE_STRING"], [VCS package string]))
+AM_CONDITIONAL(HAVE_CARGO, test x"$CARGO_CMD" != x"")
AM_CONDITIONAL(USE_INCLUDED_YAJL, test $HAVE_LOCAL_YAJL -eq 0)
AM_CONDITIONAL(HAVE_LIBCURL, test x"$LIBCURL" != x"")
-AM_CONDITIONAL([DISABLE_DOCUMENTATION], [ test x"$cross_compiling" != x"no" ])
+AM_CONDITIONAL([CROSS_COMPILING], [ test x"$cross_compiling" != x"no" ])
+AM_CONDITIONAL(HAVE_CHECK_JSONSCHEMA, test x"$CHECK_JSONSCHEMA" != x"")
-USER_CXXFLAGS="${CXXFLAGS}"
+AS_VAR_SET(USER_CXXFLAGS, ["$CXXFLAGS"])
AC_SUBST(USER_CXXFLAGS)
AC_CONFIG_HEADERS([src/config.h])
@@ -325,6 +330,7 @@ AC_CONFIG_FILES([src/tailer/Makefile])
AC_CONFIG_FILES([src/yajl/Makefile])
AC_CONFIG_FILES([src/yajlpp/Makefile])
AC_CONFIG_FILES([src/third-party/base64/lib/Makefile])
+AC_CONFIG_FILES([src/third-party/date/src/Makefile])
AC_CONFIG_FILES([src/third-party/scnlib/src/Makefile])
AC_CONFIG_FILES([test/Makefile])
diff --git a/demo/Dockerfile b/demo/Dockerfile
index 25ded84..34757f0 100644
--- a/demo/Dockerfile
+++ b/demo/Dockerfile
@@ -1,5 +1,5 @@
-FROM debian:11.3-slim
+FROM --platform=linux/amd64 debian:11.3-slim
RUN set -eux; \
export DEBIAN_FRONTEND=noninteractive; \
@@ -10,8 +10,8 @@ RUN set -eux; \
rm -rf /var/lib/{apt,dpkg,cache,log}/; \
echo "Installed base utils!"
-ADD https://github.com/tstack/lnav/releases/download/v0.11.0/lnav-0.11.0-musl-64bit.zip /
-RUN unzip lnav-0.11.0-musl-64bit.zip
+ADD https://github.com/tstack/lnav/releases/download/v0.11.2/lnav-0.11.2-x86_64-linux-musl.zip /
+RUN unzip lnav-0.11.2-x86_64-linux-musl.zip
COPY docs/tutorials tutorials
RUN gunzip /tutorials/playground/logs/*.gz
@@ -25,18 +25,18 @@ RUN echo 'tutorial1:tutorial1' | chpasswd
RUN passwd -d tutorial1
USER playground
-RUN /lnav-0.11.0/lnav -nN -c ":config /ui/theme monocai"
+RUN /lnav-0.11.2/lnav -nN -c ":config /ui/theme monocai"
USER tutorial1
-RUN /lnav-0.11.0/lnav -nN -c ":config /ui/theme monocai"
+RUN /lnav-0.11.2/lnav -nN -c ":config /ui/theme monocai"
USER root
RUN echo 'Match User playground' >> /etc/ssh/sshd_config
-RUN echo 'ForceCommand env PATH=/lnav-0.11.0:$PATH /tutorials/playground/run.sh' >> /etc/ssh/sshd_config
+RUN echo 'ForceCommand env PATH=/lnav-0.11.2:$PATH /tutorials/playground/run.sh' >> /etc/ssh/sshd_config
RUN echo 'PermitEmptyPasswords yes' >> /etc/ssh/sshd_config
RUN echo 'Match User tutorial1' >> /etc/ssh/sshd_config
-RUN echo 'ForceCommand env PATH=/lnav-0.11.0:$PATH /tutorials/tutorial1/run.sh' >> /etc/ssh/sshd_config
+RUN echo 'ForceCommand env PATH=/lnav-0.11.2:$PATH /tutorials/tutorial1/run.sh' >> /etc/ssh/sshd_config
RUN echo 'PermitEmptyPasswords yes' >> /etc/ssh/sshd_config
RUN service ssh start
EXPOSE 22
diff --git a/docs/02_downloads.md b/docs/02_downloads.md
index 9c44192..9a82d48 100644
--- a/docs/02_downloads.md
+++ b/docs/02_downloads.md
@@ -11,7 +11,7 @@ The following options are available for installing **lnav**:
## Linux
<!-- markdown-link-check-disable-next-line -->
-Download a [statically linked 64-bit binary](https://github.com/tstack/lnav/releases/download/v{{site.version}}/lnav-{{site.version}}-x86_64-linux-musl.zip).
+Download a [statically linked 64-bit binary](https://github.com/tstack/lnav/releases/download/v{{site.version}}/lnav-{{site.version}}-linux-musl-x86_64.zip).
Install from the [Snap Store](https://snapcraft.io/lnav):
diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock
index 275c580..d31a8c6 100644
--- a/docs/Gemfile.lock
+++ b/docs/Gemfile.lock
@@ -1,11 +1,12 @@
GEM
remote: https://rubygems.org/
specs:
- activesupport (7.0.5)
+ activesupport (6.1.7.6)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
+ zeitwerk (~> 2.3)
addressable (2.8.4)
public_suffix (>= 2.0.2, < 6.0)
coffee-script (2.4.1)
@@ -13,7 +14,7 @@ GEM
execjs
coffee-script-source (1.11.1)
colorator (1.1.0)
- commonmarker (0.23.9)
+ commonmarker (0.23.10)
concurrent-ruby (1.2.2)
dnsruby (1.70.0)
simpleidn (~> 0.2.1)
@@ -210,9 +211,11 @@ GEM
jekyll-feed (~> 0.9)
jekyll-seo-tag (~> 2.1)
minitest (5.18.1)
- nokogiri (1.15.2-arm64-darwin)
+ nokogiri (1.16.3-arm64-darwin)
racc (~> 1.4)
- nokogiri (1.15.2-x86_64-linux)
+ nokogiri (1.16.3-x86_64-darwin)
+ racc (~> 1.4)
+ nokogiri (1.16.3-x86_64-linux)
racc (~> 1.4)
octokit (4.25.1)
faraday (>= 1, < 3)
@@ -220,7 +223,7 @@ GEM
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (4.0.7)
- racc (1.7.1)
+ racc (1.7.3)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
@@ -250,10 +253,12 @@ GEM
unf_ext (0.0.8.2)
unicode-display_width (1.8.0)
webrick (1.8.1)
+ zeitwerk (2.6.11)
PLATFORMS
arm64-darwin-21
arm64-darwin-22
+ universal-darwin-23
x86_64-linux
DEPENDENCIES
diff --git a/docs/_config.yml b/docs/_config.yml
index 6d116ee..b258464 100644
--- a/docs/_config.yml
+++ b/docs/_config.yml
@@ -19,7 +19,7 @@
# in the templates via {{ site.myvariable }}.
title: The Logfile Navigator
-version: 0.11.1
+version: 0.12.1
email: support@lnav.org
description: >- # this means to ignore newlines until "baseurl:"
The Logfile Navigator, lnav for short, is an advanced log file viewer
@@ -37,6 +37,9 @@ plugins:
show_excerpts: true
+kramdown:
+ syntax_highlighter: rouge
+
exclude:
- source
- tutorials
diff --git a/docs/_posts/2018-04-05-linux-magazine-tutorial.md b/docs/_posts/2018-04-05-linux-magazine-tutorial.md
index 9d868b5..2a749b2 100644
--- a/docs/_posts/2018-04-05-linux-magazine-tutorial.md
+++ b/docs/_posts/2018-04-05-linux-magazine-tutorial.md
@@ -5,5 +5,5 @@ date: 2018-04-05 00:00:00
---
Looks like there was an in-depth
-[tutorial on lnav in Linux Magazine](http://www.linux-magazine.com/Issues/2017/196/Tutorials-lnav).
+[tutorial on lnav in Linux Magazine](https://web.archive.org/web/20230130154739/http://www.linux-magazine.com/Issues/2017/196/Tutorials-lnav).
Unfortunately, I didn't notice until now and missed out on a hardcopy.
diff --git a/docs/_posts/2023-08-04-config-dump.md b/docs/_posts/2023-08-04-config-dump.md
new file mode 100644
index 0000000..cfa9471
--- /dev/null
+++ b/docs/_posts/2023-08-04-config-dump.md
@@ -0,0 +1,56 @@
+---
+layout: post
+title: Tooling for troubleshooting configuration
+excerpt: Getting the final configuration and the sources of values
+---
+
+*(This change is in **v0.12.0+**)*
+
+Inspired by [this blog post about reporting configuration file locations](https://utcc.utoronto.ca/~cks/space/blog/sysadmin/ReportConfigFileLocations)
+and the [ensuing HackerNews commentary](https://news.ycombinator.com/item?id=36465886).
+I've added the `config get` and `config blame` management commands for getting the
+final configuration and the source of each property in the configuration, respectively.
+I had previously added the file locations used by **lnav** in the `lnav -h` output as
+recommended by the blog post. But, the HN comments made a good case for adding the
+the other troubleshooting tooling as well.
+
+If you would like to try out these new commands, you need to run lnav with the `-m`
+option to switch to the "management" mode. For example, just running lnav with this
+flag will print out the available operations:
+
+```console
+$ lnav -m
+✘ error: expecting an operation to perform
+ = help: the available operations are:
+ • config: perform operations on the lnav configuration
+ • format: perform operations on log file formats
+ • piper: perform operations on piper storage
+ • regex101: create and edit log message regular expressions using regex101.com
+```
+
+Executing `config get` will print out the final configuration that lnav is operating
+with as JSON:
+
+```console
+$ lnav -m config get
+```
+
+If you would like to know the source of the value for each property, you can use
+the `config blame` command, like so:
+
+```console
+$ lnav -m config blame | tail
+/ui/theme-defs/solarized-light/vars/black -> solarized-light.json:15
+/ui/theme-defs/solarized-light/vars/blue -> solarized-light.json:21
+/ui/theme-defs/solarized-light/vars/cyan -> solarized-light.json:22
+/ui/theme-defs/solarized-light/vars/green -> solarized-light.json:23
+/ui/theme-defs/solarized-light/vars/magenta -> solarized-light.json:19
+/ui/theme-defs/solarized-light/vars/orange -> solarized-light.json:17
+/ui/theme-defs/solarized-light/vars/red -> solarized-light.json:18
+/ui/theme-defs/solarized-light/vars/semantic_highlight_color -> solarized-light.json:24
+/ui/theme-defs/solarized-light/vars/violet -> solarized-light.json:20
+/ui/theme-defs/solarized-light/vars/yellow -> solarized-light.json:16
+```
+
+In the above output, "solarized-light.json" file is built into the lnav
+executable and is not from the file system.
diff --git a/docs/_posts/2024-01-09-hammered.md b/docs/_posts/2024-01-09-hammered.md
new file mode 100644
index 0000000..bb94577
--- /dev/null
+++ b/docs/_posts/2024-01-09-hammered.md
@@ -0,0 +1,324 @@
+---
+layout: post
+title: Using lnav to solve the CyberDefenders Hammered Challenge
+excerpt: >-
+ A walkthrough that uses lnav's analysis functionality
+ to answer questions about a collection of logs
+---
+
+I recently stumbled on this nice [review of lnav](https://lopes.id/2023-lnav-test/)
+by José Lopes. They use this [Hammered](https://cyberdefenders.org/blueteam-ctf-challenges/42)
+challenge by [cyberdefenders.org](https://cyberdefenders.org) as a way to get to
+know how to use lnav. I thought I would do the same and document the commands
+I would use to give folks some practical examples of using lnav.
+
+(Since I'm not well-versed in forensic work, I followed this great
+[walkthrough](https://forensicskween.com/ctf/cyberdefenders/hammered/).)
+
+#### Q1: Which service did the attackers use to gain access to the system?
+
+We can probably figure this out by looking for common failure messages
+in the logs. But, first, we need to load the logs into lnav. You
+can load all of the logs by passing the path to the `Hammered` directory
+along with the `-r` option to recurse through any subdirectories:
+
+```console
+lnav -r Hammered
+```
+
+Now that the logs are loaded, you can use the `.msgformats` SQL command
+to execute a canned query that finds log messages with a common text
+format. (Unfortunately, this command has suffered from bitrot and is
+broken in the current release. It will be fixed in the next release.
+In the meantime, you can copy the [snippet](#msgformatlnav) below
+to a file and execute it using the `|` prompt.) You can enter the
+SQL prompt by pressing `;` and then entering the command or statement:
+
+```
+;.msgformats
+```
+
+The top results I get for this batch of logs look like the following.
+
+```
+┏━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
+┃total┃log_line┃ log_time ┃ duration ┃ log_formats ┃ log_msg_format ┃
+┡━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
+│15179│ 798│2010-03-16 08:12:09.000│47d14h59m04s│syslog_log │#): session closed for user root │
+│14500│ 817│2010-03-16 08:17:01.000│47d14h54m00s│syslog_log │#): session opened for user root by (#) │
+│14480│ 29380│2010-04-19 04:36:49.000│7d04h03m45s │syslog_log │pam_unix(sshd:auth): #; # │
+│14478│ 29381│2010-04-19 04:36:49.000│7d04h03m45s │syslog_log │#): #; logname= # │
+│ 6300│ 74477│2010-04-20 06:57:11.000│6d03h00m42s │syslog_log │: [#]: IN=# OUT=# MAC=# SRC=# DST=# LEN=# TOS=# PREC=# TTL=# ID=# PROTO=# SPT=# DPT=# LEN=# │
+│ 5848│ 4695│2010-03-18 11:38:04.000│38d21h13m39s│syslog_log │#): #; logname= # │
+│ 5479│ 16164│2010-03-29 13:23:46.000│27d19h27m58s│syslog_log │Failed password for root from # port # # │
+...
+```
+
+The `#` in the `log_msg_format` column are the parts of the text
+that vary between log messages. For example, the most interesting
+message is "Failed password for root from # port # #". In that case,
+the first `#` would be the IP address and then the port number. The
+first column indicates how many times a message like this was found,
+so 5,479 failed password attempts is probably a good sign of a breakin
+attempt.
+
+To find out the service that logged this message, you can scroll down
+to focus on the message and then press `Shift` + `Q` to return to the
+LOG view at the line mentioned in the `log_line` column. In this case,
+line 16,164, which contains:
+
+```
+Mar 29 13:23:46 app-1 sshd[21492]: Failed password for root from 10.0.1.2 port 51771 ssh2
+```
+
+So, the attack vector is `sshd`.
+
+
+##### msgformat.lnav
+
+The `;.msgformats` command has been broken for a few releases, but
+its functionality can be replicated using the script below.
+Copy the following to a file named `msgformat.lnav` and place it in the
+`formats/installed` lnav configuration directory.
+
+```
+;SELECT count(*) AS total,
+ min(log_line) AS log_line,
+ min(log_time) AS log_time,
+ humanize_duration(timediff(max(log_time), min(log_time))) AS duration,
+ group_concat(DISTINCT log_format) AS log_formats,
+ log_msg_format
+ FROM all_logs
+ GROUP BY log_msg_format
+ HAVING total > 1
+ ORDER BY total DESC
+:switch-to-view db
+```
+
+#### Q2: What is the operating system version of the targeted system? (one word)
+
+The answer to this question has the form `4.*.*.u3` as given in the
+challenge. You can do a search in lnav by pressing `/` and then
+entering a PCRE-compatible regular expression. In this case,
+entering `4\.[^ ]+u3` will locate lines with the desired version
+number of `4.2.4-1ubuntu3`.
+
+#### Q3: What is the name of the compromised account?
+
+Using the findings of our initial analysis, the compromised account
+is `root`.
+
+#### Q4: Consider that each unique IP represents a different attacker. How many attackers were able to get access to the system?
+
+Answering this question will require analyzing messages in the `auth.log`
+file. Specifically, we will need to find failed password attempts, like
+the following one and extract the user ID and IP address:
+
+```
+Apr 18 18:22:07 app-1 sshd[5266]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=61.151.246.140 user=root
+```
+
+The failed attempts will give us the attacker IP addresses. However, we
+don't want to confuse attacker IPs with legitimate logins. So, we'll
+need to look for successful login messages like this one:
+
+```
+Mar 16 08:26:06 app-1 sshd[4894]: Accepted password for user3 from 192.168.126.1 port 61474 ssh2
+```
+
+Analyzing log data in lnav is done through the SQL interface. The
+log messages can be accessed through SQL tables that are automatically
+defined for each log format. However, that is pretty cumbersome
+since there would be a lot of regex SQL function calls cluttering up
+the queries. Instead, we can use the [`:create-search-table`](https://docs.lnav.org/en/v0.11.2/usage.html#search-tables)
+command to create a SQL table that matches a regular expression
+against the log messages and extracts data into column(s). We can
+then write much simpler SQL queries to get the data we're interested
+in.
+
+First, lets create an `auth_failures` table for the authentication
+failure log messages:
+
+```
+:create-search-table auth_failures authentication failure; .* rhost=(?<ip>\d+\.\d+\.\d+\.\d+)\s+user=(?<user>[^ ]+)
+```
+
+Now, let's try it out by finding the IPs of failed auth attempts:
+
+```sql
+;SELECT DISTINCT ip FROM auth_failures
+```
+
+Next, lets create an `auth_accepted` table for the successful
+authentications:
+
+```
+:create-search-table auth_accepted Accepted password for (?<user>[^ ]+) from (?<ip>\d+\.\d+\.\d+\.\d+)
+```
+
+Now that we have these two tables, we can write a query that
+gets the IPs of failed auth attempts that eventually
+succeeded. We further filter out low failure counts to
+eliminate human error. The full query is as follows:
+
+```sql
+;SELECT ip, count(*) AS co FROM auth_failures WHERE user = 'root' AND ip IN (SELECT DISTINCT ip FROM auth_accepted) GROUP BY ip HAVING co > 10
+```
+
+The results are the following six IPs:
+
+```
+┏━━━━━━━━━━━━━━━┳━━━━┓
+┃ ip ┃ co ┃
+┡━━━━━━━━━━━━━━━╇━━━━┩
+│61.168.227.12 │ 386│
+│121.11.66.70 │2858│
+│122.226.202.12 │ 626│
+│219.150.161.20 │3120│
+│222.66.204.246 │1016│
+│222.169.224.197│ 358│
+└━━━━━━━━━━━━━━━┴━━━━┘
+```
+
+#### Q5: Which attacker's IP address successfully logged into the system the most number of times?
+
+The attacker IPs were found using the query in the previous
+question, but the counts are for the number of failed auth
+attempts. Probably the easiest thing to do is create a SQL
+view with the previous query. That can be done quickly by
+pressing `;` and then pressing the up arrow to go back in
+the command history. Then, go to the start of the line and
+prepend `CREATE VIEW attackers AS ` before the `SELECT`.
+That will create an `attackers` SQL view that we can use
+to answer this question.
+
+Now that we can easily get the list of attacker IPs, we
+can write a query for the `auth_accepted` table that
+finds all the successful auth messages. We then group
+by IP and count to get the data we want:
+
+```sql
+;SELECT ip, count(*) AS co FROM auth_accepted WHERE ip IN (SELECT ip FROM attackers) GROUP BY ip ORDER co DESC
+```
+
+The results are:
+
+```
+┏━━━━━━━━━━━━━━━┳━━┓
+┃ ip ┃co┃
+┡━━━━━━━━━━━━━━━╇━━┩
+│219.150.161.20 │ 4│
+│122.226.202.12 │ 2│
+│121.11.66.70 │ 2│
+│222.169.224.197│ 1│
+│222.66.204.246 │ 1│
+│61.168.227.12 │ 1│
+└━━━━━━━━━━━━━━━┴━━┘
+```
+
+The top IP there is `219.150.161.20`.
+
+#### Q6: How many requests were sent to the Apache Server?
+
+Logs that follow the Apache log format can be accessed by the
+`access_log` SQL table. The following query will count the
+log messages in each access log file:
+
+```sql
+;SELECT log_path, count(*) FROM access_log GROUP BY log_path
+```
+
+The results I get are:
+
+```
+┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┓
+┃ log_path ┃count(*)┃
+┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━┩
+│/Users/tstack/Downloads/Hammered/apache2/www-access.log│ 365│
+│/Users/tstack/Downloads/Hammered/apache2/www-media.log │ 229│
+└━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┴━━━━━━━━┘
+```
+
+It seems like they want just what is in the `www-access.log`
+file, so the answer is 365.
+
+#### Q7: How many rules have been added to the firewall?
+
+Rules are added by the `iptables -A` command, so we can do a
+search for that command and the status bar will show
+"6 hits for “iptables -A”".
+
+#### Q9: When was the last login from the attacker with IP 219.150.161.20? Format: MM/DD/YYYY HH:MM:SS AM
+
+Using the `auth_accepted` table we created previously, this is
+a pretty simple query for `max(log_time)`:
+
+```sql
+;SELECT max(log_time) FROM auth_accepted WHERE ip = '219.150.161.20'
+```
+
+The result I get is:
+
+```
+✔ SQL Result: 2010-04-19 05:56:05.000
+```
+
+#### Q10: The database displayed two warning messages, provide the most important and dangerous one.
+
+The database log messages come out in the syslog with a procname
+of `/etc/mysql/debian-start` and are recognized as warnings.
+Using this, we can write a [filter expression](https://docs.lnav.org/en/v0.11.2/commands.html#filter-expr-expr)
+that filters the log based on SQL expression. For the syslog
+file format, the procname is accessible via the `:log_procname`
+variable and the log level is in the `:log_level` variable.
+The following command puts this together:
+
+```
+:filter-expr :log_procname = '/etc/mysql/debian-start' AND :log_level = 'warning'
+```
+
+After running this command, you should only see about 15 lines
+of the 100+k that was originally shown. Taking a look at these
+lines, the following line seems pretty bad:
+
+```
+Mar 18 10:18:42 app-1 /etc/mysql/debian-start[7566]: WARNING: mysql.user contains 2 root accounts without password!
+```
+
+To clear the filter, you can press `CTRL` + `R` to reset the
+state of the session.
+
+#### Q12: Few attackers were using a proxy to run their scans. What is the corresponding user-agent used by this proxy?
+
+The user-agent can be retrieved from the `cs_user_agent`
+column in the `access_log` table. The following query
+will get the unique user-agent names:
+
+```sql
+;SELECT DISTINCT cs_user_agent FROM access_log
+```
+
+The results I get are:
+
+```
+┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
+┃ cs_user_agent ┃
+┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
+│Apple-PubSub/65.12.1 │
+│Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) │
+│Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) │
+│iearthworm/1.0, iearthworm@yahoo.com.cn │
+│Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.1.249.1045 Safari/532.5 │
+│WordPress/2.9.2; http://www.domain.org │
+│Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.9.0.19) Gecko/2010031422 Firefox/3.0.19 │
+│Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; en-us) AppleWebKit/531.21.8 (KHTML, like Gecko) Version/4.0.4 Safari/531.21.10│
+│Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 │
+│pxyscand/2.1 │
+│- │
+│Mozilla/4.0 (compatible; NaverBot/1.0; http://help.naver.com/customer_webtxt_02.jsp) │
+│Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; en-us) AppleWebKit/531.22.7 (KHTML, like Gecko) Version/4.0.5 Safari/531.22.7 │
+│Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.1.249.1059 Safari/532.5 │
+└━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┘
+```
+
+The `pxyscand/2.1` name seems to be the one they want.
diff --git a/docs/_posts/2024-03-29-prql-support.md b/docs/_posts/2024-03-29-prql-support.md
new file mode 100644
index 0000000..98df8e6
--- /dev/null
+++ b/docs/_posts/2024-03-29-prql-support.md
@@ -0,0 +1,51 @@
+---
+layout: post
+title: Support for the PRQL in the database query prompt
+excerpt: >-
+ PRQL is a database query language that is pipeline-oriented
+ and easier to use interactively
+---
+
+The v0.12.1 release of lnav includes support for
+[PRQL](https://prql-lang.org). PRQL is a database query language
+that has a pipeline-oriented syntax. The main advantage of PRQL,
+in the context of lnav, is that it is easier to work with
+interactively compared to SQL. For example, lnav can provide
+previews of different stages of the pipeline and provide more
+accurate tab-completions for the columns in the result set. I'm
+hoping that the ease-of-use will make doing log analysis in lnav
+much easier.
+
+You can execute a PRQL query using the existing database prompt
+(press `;`). A query is interpreted as PRQL if it starts with
+the [`from`](https://prql-lang.org/book/reference/data/from.html)
+keyword. After `from`, the database table should be provided.
+The table for the focused log message will be suggested by default.
+You can accept the suggestion by pressing TAB. To add a new stage
+to the pipeline, enter a pipe symbol (`|`), followed by a
+[PRQL transform](https://prql-lang.org/book/reference/stdlib/transforms/index.html)
+and its arguments. In addition to the standard set of transforms,
+lnav provides some convenience transforms in the `stats` and `utils`
+namespaces. For example, `stats.count_by` can be passed one or more
+column names to group by and count, with the result sorted by most
+to least.
+
+As you enter a query, lnav will update various panels on the display
+to show help, preview data, and errors. The following is a
+screenshot of lnav viewing a web access log with a query in progress:
+
+![Screenshot of PRQL in action](/assets/images/lnav-prql-preview.png)
+
+The top half is the usual log message view. Below that is the online
+help panel showing the documentation for the `stats.count_by` PRQL
+function. lnav will show the help for what is currently under the
+cursor. The next panel shows the preview data for the pipeline stage
+that precedes the stage where the cursor is. In this case, the
+results of `from access_log`, which is the contents of the access
+log table. The second preview window shows the result of the
+pipeline stage where the cursor is located.
+
+There is still a lot of work to be done on the integration and PRQL
+itself, but I'm very hopeful this will work out well in the long
+term. Many thanks to the PRQL team for starting the project and
+keeping it going, it's not easy competing with SQL.
diff --git a/docs/assets/images/lnav-prql-preview.png b/docs/assets/images/lnav-prql-preview.png
new file mode 100644
index 0000000..1c484d7
--- /dev/null
+++ b/docs/assets/images/lnav-prql-preview.png
Binary files differ
diff --git a/docs/index.markdown b/docs/index.markdown
index eadb501..68ea500 100644
--- a/docs/index.markdown
+++ b/docs/index.markdown
@@ -11,11 +11,11 @@ layout: top
style="float: right; max-width: 50%"}
<div id="top-description">
-An advanced log file viewer for the small-scale
+A log file viewer for the terminal
</div>
<div id="intro">
-<p>Watch and analyze your log files from a terminal.</p>
+<p>Merge, tail, search, filter, and query log files with ease.</p>
<p>No server. No setup. Still featureful.</p>
diff --git a/docs/requirements.txt b/docs/requirements.txt
index 1d29e34..4567bf2 100644
--- a/docs/requirements.txt
+++ b/docs/requirements.txt
@@ -1,3 +1,4 @@
+furo
sphinx>=4.3.0
sphinx-copybutton
sphinx-jsonschema
diff --git a/docs/schemas/config-v1.schema.json b/docs/schemas/config-v1.schema.json
index e2285cc..9ca49b4 100644
--- a/docs/schemas/config-v1.schema.json
+++ b/docs/schemas/config-v1.schema.json
@@ -39,6 +39,35 @@
},
"additionalProperties": false
},
+ "piper": {
+ "description": "Settings related to capturing piped data",
+ "title": "/tuning/piper",
+ "type": "object",
+ "properties": {
+ "max-size": {
+ "title": "/tuning/piper/max-size",
+ "description": "The maximum size of a capture file",
+ "type": "integer",
+ "minimum": 128
+ },
+ "rotations": {
+ "title": "/tuning/piper/rotations",
+ "description": "The number of rotated files to keep",
+ "type": "integer",
+ "minimum": 2
+ },
+ "ttl": {
+ "title": "/tuning/piper/ttl",
+ "description": "The time-to-live for captured data, expressed as a duration (e.g. '3d' for three days)",
+ "type": "string",
+ "examples": [
+ "3d",
+ "12h"
+ ]
+ }
+ },
+ "additionalProperties": false
+ },
"file-vtab": {
"description": "Settings related to the lnav_file virtual-table",
"title": "/tuning/file-vtab",
@@ -111,7 +140,7 @@
"title": "/tuning/remote/ssh/options",
"type": "object",
"patternProperties": {
- "(\\w+)": {
+ "^(\\w+)$": {
"title": "/tuning/remote/ssh/options/<option_name>",
"description": "Set an option to be passed to the SSH command",
"type": "string"
@@ -124,7 +153,7 @@
"title": "/tuning/remote/ssh/config",
"type": "object",
"patternProperties": {
- "(\\w+)": {
+ "^(\\w+)$": {
"title": "/tuning/remote/ssh/config/<config_name>",
"description": "Set an SSH configuration value",
"type": "string"
@@ -148,7 +177,7 @@
"title": "/tuning/clipboard/impls",
"type": "object",
"patternProperties": {
- "([\\w\\-]+)": {
+ "^([\\w\\-]+)$": {
"description": "Clipboard implementation",
"title": "/tuning/clipboard/impls/<clipboard_impl_name>",
"type": "object",
@@ -179,6 +208,28 @@
}
},
"additionalProperties": false
+ },
+ "url-scheme": {
+ "description": "Settings related to custom URL handling",
+ "title": "/tuning/url-scheme",
+ "type": "object",
+ "patternProperties": {
+ "^([a-z][\\w\\-\\+\\.]+)$": {
+ "description": "Definition of a custom URL scheme",
+ "title": "/tuning/url-scheme/<url_scheme>",
+ "type": "object",
+ "properties": {
+ "handler": {
+ "title": "/tuning/url-scheme/<url_scheme>/handler",
+ "description": "The name of the lnav script that can handle URLs with of this scheme. This should not include the '.lnav' suffix.",
+ "type": "string",
+ "pattern": "^[\\w\\-]+(?!\\.lnav)$"
+ }
+ },
+ "additionalProperties": false
+ }
+ },
+ "additionalProperties": false
}
},
"additionalProperties": false
@@ -221,7 +272,7 @@
"title": "/ui/theme-defs",
"type": "object",
"patternProperties": {
- "([\\w\\-]+)": {
+ "^([\\w\\-]+)$": {
"description": "Theme definitions",
"title": "/ui/theme-defs/<theme_name>",
"type": "object",
@@ -231,7 +282,7 @@
"title": "/ui/theme-defs/<theme_name>/vars",
"type": "object",
"patternProperties": {
- "(\\w+)": {
+ "^(\\w+)$": {
"title": "/ui/theme-defs/<theme_name>/vars/<var_name>",
"description": "A theme variable definition",
"type": "string"
@@ -254,6 +305,11 @@
"title": "/ui/theme-defs/<theme_name>/styles/text",
"$ref": "#/definitions/style"
},
+ "selected-text": {
+ "description": "Styling for text selected in a view",
+ "title": "/ui/theme-defs/<theme_name>/styles/selected-text",
+ "$ref": "#/definitions/style"
+ },
"alt-text": {
"description": "Styling for plain text when alternating",
"title": "/ui/theme-defs/<theme_name>/styles/alt-text",
@@ -289,6 +345,11 @@
"title": "/ui/theme-defs/<theme_name>/styles/cursor-line",
"$ref": "#/definitions/style"
},
+ "disabled-cursor-line": {
+ "description": "Styling for the cursor line when it is disabled",
+ "title": "/ui/theme-defs/<theme_name>/styles/disabled-cursor-line",
+ "$ref": "#/definitions/style"
+ },
"adjusted-time": {
"description": "Styling for timestamps that have been adjusted",
"title": "/ui/theme-defs/<theme_name>/styles/adjusted-time",
@@ -299,8 +360,13 @@
"title": "/ui/theme-defs/<theme_name>/styles/skewed-time",
"$ref": "#/definitions/style"
},
+ "file-offset": {
+ "description": "Styling for a file offset",
+ "title": "/ui/theme-defs/<theme_name>/styles/file-offset",
+ "$ref": "#/definitions/style"
+ },
"offset-time": {
- "description": "Styling for hidden fields",
+ "description": "Styling for the elapsed time column",
"title": "/ui/theme-defs/<theme_name>/styles/offset-time",
"$ref": "#/definitions/style"
},
@@ -413,6 +479,11 @@
"description": "Styling for snippet borders",
"title": "/ui/theme-defs/<theme_name>/styles/snippet-border",
"$ref": "#/definitions/style"
+ },
+ "indent-guide": {
+ "description": "Styling for indent guide lines",
+ "title": "/ui/theme-defs/<theme_name>/styles/indent-guide",
+ "$ref": "#/definitions/style"
}
},
"additionalProperties": false
@@ -422,6 +493,11 @@
"title": "/ui/theme-defs/<theme_name>/syntax-styles",
"type": "object",
"properties": {
+ "inline-code": {
+ "description": "Styling for inline code blocks",
+ "title": "/ui/theme-defs/<theme_name>/syntax-styles/inline-code",
+ "$ref": "#/definitions/style"
+ },
"quoted-code": {
"description": "Styling for quoted code blocks",
"title": "/ui/theme-defs/<theme_name>/syntax-styles/quoted-code",
@@ -462,11 +538,41 @@
"title": "/ui/theme-defs/<theme_name>/syntax-styles/symbol",
"$ref": "#/definitions/style"
},
+ "null": {
+ "description": "Styling for nulls in source files",
+ "title": "/ui/theme-defs/<theme_name>/syntax-styles/null",
+ "$ref": "#/definitions/style"
+ },
+ "ascii-control": {
+ "description": "Styling for ASCII control characters in source files",
+ "title": "/ui/theme-defs/<theme_name>/syntax-styles/ascii-control",
+ "$ref": "#/definitions/style"
+ },
+ "non-ascii": {
+ "description": "Styling for non-ASCII characters in source files",
+ "title": "/ui/theme-defs/<theme_name>/syntax-styles/non-ascii",
+ "$ref": "#/definitions/style"
+ },
"number": {
"description": "Styling for numbers in source files",
"title": "/ui/theme-defs/<theme_name>/syntax-styles/number",
"$ref": "#/definitions/style"
},
+ "type": {
+ "description": "Styling for types in source files",
+ "title": "/ui/theme-defs/<theme_name>/syntax-styles/type",
+ "$ref": "#/definitions/style"
+ },
+ "function": {
+ "description": "Styling for functions in source files",
+ "title": "/ui/theme-defs/<theme_name>/syntax-styles/function",
+ "$ref": "#/definitions/style"
+ },
+ "separators-references-accessors": {
+ "description": "Styling for sigils in source files",
+ "title": "/ui/theme-defs/<theme_name>/syntax-styles/separators-references-accessors",
+ "$ref": "#/definitions/style"
+ },
"re-special": {
"description": "Styling for special characters in regular expressions",
"title": "/ui/theme-defs/<theme_name>/syntax-styles/re-special",
@@ -579,6 +685,11 @@
"description": "Styling for hotkey highlights of status bars",
"title": "/ui/theme-defs/<theme_name>/status-styles/hotkey",
"$ref": "#/definitions/style"
+ },
+ "suggestion": {
+ "description": "Styling for suggested values",
+ "title": "/ui/theme-defs/<theme_name>/status-styles/suggestion",
+ "$ref": "#/definitions/style"
}
},
"additionalProperties": false
@@ -588,7 +699,7 @@
"title": "/ui/theme-defs/<theme_name>/log-level-styles",
"type": "object",
"patternProperties": {
- "(trace|debug5|debug4|debug3|debug2|debug|info|stats|notice|warning|error|critical|fatal|invalid)": {
+ "^(trace|debug5|debug4|debug3|debug2|debug|info|stats|notice|warning|error|critical|fatal|invalid)$": {
"title": "/ui/theme-defs/<theme_name>/log-level-styles/<level>",
"$ref": "#/definitions/style"
}
@@ -600,7 +711,7 @@
"title": "/ui/theme-defs/<theme_name>/highlights",
"type": "object",
"patternProperties": {
- "([\\w\\-]+)": {
+ "^([\\w\\-]+)$": {
"title": "/ui/theme-defs/<theme_name>/highlights/<highlight_name>",
"type": "object",
"properties": {
@@ -626,6 +737,27 @@
},
"additionalProperties": false
},
+ "mouse": {
+ "description": "Mouse-related settings",
+ "title": "/ui/mouse",
+ "type": "object",
+ "properties": {
+ "mode": {
+ "title": "/ui/mouse/mode",
+ "description": "Overall control for mouse support",
+ "type": "string",
+ "enum": [
+ "disabled",
+ "enabled"
+ ],
+ "examples": [
+ "enabled",
+ "disabled"
+ ]
+ }
+ },
+ "additionalProperties": false
+ },
"movement": {
"description": "Log file cursor movement mode settings",
"title": "/ui/movement",
@@ -652,21 +784,26 @@
"title": "/ui/keymap-defs",
"type": "object",
"patternProperties": {
- "([\\w\\-]+)": {
+ "^([\\w\\-]+)$": {
"description": "The keymap definitions",
"title": "/ui/keymap-defs/<keymap_name>",
"type": "object",
"patternProperties": {
- "((?:x[0-9a-f]{2})+)": {
+ "^((?:x[0-9a-f]{2})+)$": {
"description": "Map of key codes to commands to execute. The field names are the keys to be mapped using as a hexadecimal representation of the UTF-8 encoding. Each byte of the UTF-8 should start with an 'x' followed by the hexadecimal representation of the byte.",
"title": "/ui/keymap-defs/<keymap_name>/<key_seq>",
"type": "object",
"properties": {
+ "id": {
+ "title": "/ui/keymap-defs/<keymap_name>/<key_seq>/id",
+ "description": "The identifier that can be used to refer to this key",
+ "type": "string"
+ },
"command": {
"title": "/ui/keymap-defs/<keymap_name>/<key_seq>/command",
"description": "The command to execute for the given key sequence. Use a script to execute more complicated operations.",
"type": "string",
- "pattern": "^[:|;].*",
+ "pattern": "^$|^[:|;].*",
"examples": [
":goto next hour"
]
@@ -693,12 +830,25 @@
"title": "/log",
"type": "object",
"properties": {
+ "date-time": {
+ "description": "Settings related to log message dates and times",
+ "title": "/log/date-time",
+ "type": "object",
+ "properties": {
+ "convert-zoned-to-local": {
+ "title": "/log/date-time/convert-zoned-to-local",
+ "description": "Convert timestamps with ",
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false
+ },
"watch-expressions": {
"description": "Log message watch expressions",
"title": "/log/watch-expressions",
"type": "object",
"patternProperties": {
- "([\\w\\-]+)": {
+ "^([\\w\\.\\-]+)$": {
"description": "A log message watch expression",
"title": "/log/watch-expressions/<watch_name>",
"type": "object",
@@ -718,6 +868,37 @@
}
},
"additionalProperties": false
+ },
+ "annotations": {
+ "title": "/log/annotations",
+ "type": "object",
+ "patternProperties": {
+ "^([\\w\\.\\-]+)$": {
+ "title": "/log/annotations/<annotation_name>",
+ "type": "object",
+ "properties": {
+ "description": {
+ "title": "/log/annotations/<annotation_name>/description",
+ "description": "A description of this annotation",
+ "type": "string"
+ },
+ "condition": {
+ "title": "/log/annotations/<annotation_name>/condition",
+ "description": "The SQLite expression to execute for a log message that determines whether or not this annotation is applicable. The expression is evaluated the same way as a filter expression",
+ "type": "string",
+ "minLength": 1
+ },
+ "handler": {
+ "title": "/log/annotations/<annotation_name>/handler",
+ "description": "The script to execute to generate the annotation content. A JSON object with the log message content will be sent to the script on the standard input",
+ "type": "string",
+ "minLength": 1
+ }
+ },
+ "additionalProperties": false
+ }
+ },
+ "additionalProperties": false
}
},
"additionalProperties": false
@@ -727,7 +908,7 @@
"title": "/global",
"type": "object",
"patternProperties": {
- "(\\w+)": {
+ "^(\\w+)$": {
"title": "/global/<var_name>",
"description": "A global variable definition. Global variables can be referenced in scripts, SQL statements, or commands.",
"type": "string"
diff --git a/docs/schemas/event-log-msg-detected-v1.schema.json b/docs/schemas/event-log-msg-detected-v1.schema.json
index 30ec3a2..a82b01f 100644
--- a/docs/schemas/event-log-msg-detected-v1.schema.json
+++ b/docs/schemas/event-log-msg-detected-v1.schema.json
@@ -41,7 +41,7 @@
"title": "/values",
"type": "object",
"patternProperties": {
- "([\\w\\-]+)": {
+ "^([\\w\\-]+)$": {
"title": "/values/<name>",
"type": [
"boolean",
diff --git a/docs/schemas/format-v1.schema.json b/docs/schemas/format-v1.schema.json
index fe781f9..d96a285 100644
--- a/docs/schemas/format-v1.schema.json
+++ b/docs/schemas/format-v1.schema.json
@@ -10,7 +10,7 @@
}
},
"patternProperties": {
- "(\\w+)": {
+ "^(\\w+)$": {
"description": "The definition of a log file format.",
"title": "/<format_name>",
"type": "object",
@@ -20,7 +20,7 @@
"title": "/<format_name>/regex",
"type": "object",
"patternProperties": {
- "([^/]+)": {
+ "^(.+)$": {
"description": "The set of patterns used to match log messages",
"title": "/<format_name>/regex/<pattern_name>",
"type": "object",
@@ -75,16 +75,50 @@
"description": "A regular expression that restricts this format to log files with a matching name",
"type": "string"
},
- "mime-types": {
- "title": "/<format_name>/mime-types",
- "description": "A list of mime-types this format should be used for",
- "type": "array",
- "items": {
- "type": "string",
- "enum": [
- "application/vnd.tcpdump.pcap"
- ]
- }
+ "converter": {
+ "description": "Describes how the file format can be detected and converted to a log that can be understood by lnav",
+ "title": "/<format_name>/converter",
+ "type": "object",
+ "properties": {
+ "type": {
+ "title": "/<format_name>/converter/type",
+ "description": "The MIME type",
+ "type": "string"
+ },
+ "header": {
+ "description": "File header detection definitions",
+ "title": "/<format_name>/converter/header",
+ "type": "object",
+ "properties": {
+ "expr": {
+ "description": "The expressions used to check if a file header matches this file format",
+ "title": "/<format_name>/converter/header/expr",
+ "type": "object",
+ "patternProperties": {
+ "^(\\w+)$": {
+ "title": "/<format_name>/converter/header/expr/<header_expr_name>",
+ "description": "SQLite expression",
+ "type": "string"
+ }
+ },
+ "additionalProperties": false
+ },
+ "size": {
+ "title": "/<format_name>/converter/header/size",
+ "description": "The minimum size required for this header type",
+ "type": "integer"
+ }
+ },
+ "additionalProperties": false
+ },
+ "command": {
+ "title": "/<format_name>/converter/command",
+ "description": "The script used to convert the file",
+ "type": "string",
+ "pattern": "[\\w\\.\\-]+"
+ }
+ },
+ "additionalProperties": false
},
"level-field": {
"title": "/<format_name>/level-field",
@@ -165,6 +199,123 @@
"description": "The name of the operation-id field in the log message pattern",
"type": "string"
},
+ "opid": {
+ "description": "Definitions related to operations found in logs",
+ "title": "/<format_name>/opid",
+ "type": "object",
+ "properties": {
+ "subid": {
+ "title": "/<format_name>/opid/subid",
+ "description": "The field that holds the ID for a sub-operation",
+ "type": "string"
+ },
+ "description": {
+ "description": "Define how to construct a description of an operation",
+ "title": "/<format_name>/opid/description",
+ "type": "object",
+ "patternProperties": {
+ "^([\\w\\.\\-]+)$": {
+ "description": "A type of description for this operation",
+ "title": "/<format_name>/opid/description/<opid_descriptor>",
+ "type": "object",
+ "properties": {
+ "format": {
+ "description": "Defines the elements of this operation description",
+ "title": "/<format_name>/opid/description/<opid_descriptor>/format",
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "field": {
+ "title": "/<format_name>/opid/description/<opid_descriptor>/format/field",
+ "description": "The field to include in the operation description",
+ "type": "string"
+ },
+ "extractor": {
+ "title": "/<format_name>/opid/description/<opid_descriptor>/format/extractor",
+ "description": "The regex used to extract content for the operation description",
+ "type": "string"
+ },
+ "prefix": {
+ "title": "/<format_name>/opid/description/<opid_descriptor>/format/prefix",
+ "description": "A string to prepend to this field in the description",
+ "type": "string"
+ },
+ "suffix": {
+ "title": "/<format_name>/opid/description/<opid_descriptor>/format/suffix",
+ "description": "A string to append to this field in the description",
+ "type": "string"
+ },
+ "joiner": {
+ "title": "/<format_name>/opid/description/<opid_descriptor>/format/joiner",
+ "description": "A string to insert between instances of this field when the field is found more than once",
+ "type": "string"
+ }
+ },
+ "additionalProperties": false
+ }
+ }
+ },
+ "additionalProperties": false
+ }
+ },
+ "additionalProperties": false
+ },
+ "sub-description": {
+ "description": "Define how to construct a description of a sub-operation",
+ "title": "/<format_name>/opid/sub-description",
+ "type": "object",
+ "patternProperties": {
+ "^([\\w\\.\\-]+)$": {
+ "description": "A type of description for this sub-operation",
+ "title": "/<format_name>/opid/sub-description/<subid_descriptor>",
+ "type": "object",
+ "properties": {
+ "format": {
+ "description": "Defines the elements of this operation description",
+ "title": "/<format_name>/opid/sub-description/<subid_descriptor>/format",
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "field": {
+ "title": "/<format_name>/opid/sub-description/<subid_descriptor>/format/field",
+ "description": "The field to include in the operation description",
+ "type": "string"
+ },
+ "extractor": {
+ "title": "/<format_name>/opid/sub-description/<subid_descriptor>/format/extractor",
+ "description": "The regex used to extract content for the operation description",
+ "type": "string"
+ },
+ "prefix": {
+ "title": "/<format_name>/opid/sub-description/<subid_descriptor>/format/prefix",
+ "description": "A string to prepend to this field in the description",
+ "type": "string"
+ },
+ "suffix": {
+ "title": "/<format_name>/opid/sub-description/<subid_descriptor>/format/suffix",
+ "description": "A string to append to this field in the description",
+ "type": "string"
+ },
+ "joiner": {
+ "title": "/<format_name>/opid/sub-description/<subid_descriptor>/format/joiner",
+ "description": "A string to insert between instances of this field when the field is found more than once",
+ "type": "string"
+ }
+ },
+ "additionalProperties": false
+ }
+ }
+ },
+ "additionalProperties": false
+ }
+ },
+ "additionalProperties": false
+ }
+ },
+ "additionalProperties": false
+ },
"ordered-by-time": {
"title": "/<format_name>/ordered-by-time",
"description": "Indicates that the order of messages in the file is time-based.",
@@ -175,7 +326,7 @@
"title": "/<format_name>/level",
"type": "object",
"patternProperties": {
- "(trace|debug[2345]?|info|stats|notice|warning|error|critical|fatal)": {
+ "^(trace|debug[2345]?|info|stats|notice|warning|error|critical|fatal)$": {
"title": "/<format_name>/level/<level>",
"description": "The regular expression used to match the log text for this level. For JSON logs with numeric levels, this should be the number for the corresponding level.",
"type": [
@@ -191,7 +342,7 @@
"title": "/<format_name>/value",
"type": "object",
"patternProperties": {
- "([^/]+)": {
+ "^(.+)$": {
"description": "The set of values captured by the log message patterns",
"title": "/<format_name>/value/<value_name>",
"type": "object",
@@ -231,7 +382,7 @@
"title": "/<format_name>/value/<value_name>/unit/scaling-factor",
"type": "object",
"patternProperties": {
- "([^/]+)": {
+ "^(.+)$": {
"title": "/<format_name>/value/<value_name>/unit/scaling-factor/<scale>",
"type": "object",
"properties": {
@@ -304,7 +455,7 @@
"title": "/<format_name>/tags",
"type": "object",
"patternProperties": {
- "([\\w:;\\._\\-]+)": {
+ "^([\\w:;\\._\\-]+)$": {
"description": "The name of the tag to apply",
"title": "/<format_name>/tags/<tag_name>",
"type": "object",
@@ -367,11 +518,79 @@
},
"additionalProperties": false
},
+ "partitions": {
+ "description": "The partitions to automatically apply to log messages",
+ "title": "/<format_name>/partitions",
+ "type": "object",
+ "patternProperties": {
+ "^([\\w:;\\._\\-]+)$": {
+ "description": "The type of partition to apply",
+ "title": "/<format_name>/partitions/<partition_type>",
+ "type": "object",
+ "properties": {
+ "paths": {
+ "description": "Restrict partitioning to the given paths",
+ "title": "/<format_name>/partitions/<partition_type>/paths",
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "glob": {
+ "title": "/<format_name>/partitions/<partition_type>/paths/glob",
+ "description": "The glob to match against file paths",
+ "type": "string",
+ "examples": [
+ "*/system.log*"
+ ]
+ }
+ },
+ "additionalProperties": false
+ }
+ },
+ "pattern": {
+ "title": "/<format_name>/partitions/<partition_type>/pattern",
+ "description": "The regular expression to match against the body of the log message",
+ "type": "string",
+ "examples": [
+ "\\w+ is down"
+ ]
+ },
+ "description": {
+ "title": "/<format_name>/partitions/<partition_type>/description",
+ "description": "A description of this partition",
+ "type": "string"
+ },
+ "level": {
+ "title": "/<format_name>/partitions/<partition_type>/level",
+ "description": "Constrain hits to log messages with this level",
+ "type": "string",
+ "enum": [
+ "trace",
+ "debug5",
+ "debug4",
+ "debug3",
+ "debug2",
+ "debug",
+ "info",
+ "stats",
+ "notice",
+ "warning",
+ "error",
+ "critical",
+ "fatal"
+ ]
+ }
+ },
+ "additionalProperties": false
+ }
+ },
+ "additionalProperties": false
+ },
"action": {
"title": "/<format_name>/action",
"type": "object",
"patternProperties": {
- "(\\w+)": {
+ "^(\\w+)$": {
"title": "/<format_name>/action/<action_name>",
"type": [
"string",
@@ -499,7 +718,8 @@
"enum": [
"abbrev",
"truncate",
- "dot-dot"
+ "dot-dot",
+ "last-word"
]
},
"text-transform": {
@@ -532,7 +752,7 @@
"title": "/<format_name>/search-table",
"type": "object",
"patternProperties": {
- "(\\w+)": {
+ "^(\\w+)$": {
"description": "The set of search tables to be automatically defined",
"title": "/<format_name>/search-table/<table_name>",
"type": "object",
@@ -578,7 +798,7 @@
"title": "/<format_name>/highlights",
"type": "object",
"patternProperties": {
- "([^/]+)": {
+ "^(.+)$": {
"description": "The definition of a highlight",
"title": "/<format_name>/highlights/<highlight_name>",
"type": "object",
diff --git a/docs/source/_static/theme_overrides.css b/docs/source/_static/theme_overrides.css
index c25d308..39a5db1 100644
--- a/docs/source/_static/theme_overrides.css
+++ b/docs/source/_static/theme_overrides.css
@@ -22,36 +22,7 @@ table.query-results p {
font-size: 0.9em !important;
}
-DL DT:target, :target > H2, :target > H3, span:target + H2, span:target + H3 {
- border: 0 !important;
- border-bottom: 1px solid #d3d381 !important;
- background: #ffc !important;
- /* padding: 1em !important;*/
-}
DL DT {
- border: 0 !important;
- background: inherit !important;
- border-bottom: 1px solid #c3c0ee !important;
- /* display: block !important; */
-}
-
-kbd {
- padding: 0.1em 0.6em;
- border: 1px solid #ccc;
- font-size: 11px;
- font-family: Arial, Helvetica, sans-serif;
- background-color: #f7f7f7;
- color: #333;
- -moz-box-shadow: 0 1px 0px rgba(0, 0, 0, 0.2), 0 0 0 2px #ffffff inset;
- -webkit-box-shadow: 0 1px 0px rgba(0, 0, 0, 0.2), 0 0 0 2px #ffffff inset;
- box-shadow: 0 1px 0px rgba(0, 0, 0, 0.2), 0 0 0 2px #ffffff inset;
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px;
- border-radius: 3px;
- display: inline-block;
- margin: 0 0.1em 0.1em 0.1em;
- text-shadow: 0 1px 0 #fff;
- line-height: 1.4;
- white-space: nowrap;
+ border-bottom: 1px solid #333 !important;
}
diff --git a/docs/source/cli.rst b/docs/source/cli.rst
index 565e54f..93119e5 100644
--- a/docs/source/cli.rst
+++ b/docs/source/cli.rst
@@ -38,13 +38,19 @@ Options
Execute the given lnav command, SQL query, or lnav script. The
argument must be prefixed with the character used to enter the prompt
- to distinguish between the different types (i.e. ':', ';', '|').
- This option can be given multiple times.
+ to distinguish between the different types (i.e. :code:`:`, :code:`;`,
+ :code:`|`, :code:`/`). This option can be given multiple times.
.. option:: -f <path>
Execute the given command file. This option can be given multiple times.
+.. option:: -e <command-line>
+
+ Execute the given shell command-line and display its output. This is
+ equivalent to executing the :code:`:sh` command and passing the
+ :option:`-N` flag. This option can be given multiple times.
+
.. option:: -I <path>
Add a configuration directory.
@@ -76,23 +82,21 @@ Options
Recursively load files from the given base directories.
-.. option:: -t
-
- Prepend timestamps to the lines of data being read in on the standard input.
-
-.. option:: -w <path>
-
- Write the contents of the standard input to this file.
-
.. option:: -V
Print the version of lnav.
+.. option:: -v
+
+ Print extra information during operations.
+
.. option:: -q
- Do not print the log messages after executing all of the commands.
+ Do not print informational messages.
+.. _management_cli:
+
Management Mode (v0.11.0+)
--------------------------
@@ -107,12 +111,41 @@ Options
Switch to management mode. This must be the first option passed on the
command-line.
+.. option:: -I <path>
+
+ Add a configuration directory.
+
Subcommands
^^^^^^^^^^^
-.. option:: regex101 import <regex101-url> <format-name> [<regex-name>]
+.. option:: config get
- Convert a regex101.com entry into a skeleton log format file.
+ Print out the current configuration as JSON on the standard output.
+
+.. option:: config blame
+
+ Print out the configuration options as JSON-Pointers and the
+ file/line-number where the configuration is sourced from.
+
+.. option:: config file-options <path>
+
+ Print out the options that will be applied to the given file. The
+ options are stored in the :file:`file-options.json` file in the
+ **lnav** configuration directory. The only option available at
+ the moment is the timezone to be used for log message timestamps
+ that do not include a zone. The timezone for a file can be set
+ using the :ref:`:set-file-timezone<set_file_timezone>` command
+ and cleared with the :ref:`:clear-file-timezone<clear_file_timezone>`
+ command.
+
+.. option:: format <format-name> get
+
+ Print information about the given log format.
+
+.. option:: format <format-name> source
+
+ Print the name of the first file that contained this log format
+ definition.
.. option:: format <format-name> regex <regex-name> push
@@ -122,6 +155,22 @@ Subcommands
Pull changes to a regex that was previously pushed to regex101.com .
+.. option:: piper clean
+
+ Remove all of the files that stored data that was piped into **lnav**.
+
+.. option:: piper list
+
+ List all of the data that was piped into **lnav** from oldest to newest.
+ The listing will show the creation time, the URL you can use to reopen
+ the data, and a description of the data. Passing the :option:`-v`
+ option will print out additional metadata that was captured, such as
+ the current working directory of **lnav** and the environment variables.
+
+.. option:: regex101 import <regex101-url> <format-name> [<regex-name>]
+
+ Convert a regex101.com entry into a skeleton log format file.
+
Environment Variables
---------------------
@@ -142,27 +191,27 @@ Environment Variables
.. envvar:: TZ
- The timezone setting is used in some log formats to convert UTC timestamps
- to the local timezone.
+ The timezone setting is used in some log formats to convert timestamps
+ with a timezone to the local timezone.
Examples
--------
- To load and follow the system syslog file:
+To load and follow the system syslog file:
- .. prompt:: bash
+.. prompt:: bash
- lnav
+ lnav
- To load all of the files in :file:`/var/log`:
+To load all of the files in :file:`/var/log`:
- .. prompt:: bash
+.. prompt:: bash
- lnav /var/log
+ lnav /var/log
- To watch the output of make with timestamps prepended:
+To watch the output of make:
- .. prompt:: bash
+.. prompt:: bash
- make 2>&1 | lnav -t
+ lnav -e 'make -j4'
diff --git a/docs/source/commands.rst b/docs/source/commands.rst
index d83a07e..98de0a2 100644
--- a/docs/source/commands.rst
+++ b/docs/source/commands.rst
@@ -68,9 +68,13 @@ an error message in the status bar, like so:
.. note:: The following commands can be disabled by setting the ``LNAVSECURE``
environment variable before executing the **lnav** binary:
+ - :code:`:cd`
+ - :code:`:export-session-to`
- :code:`:open`
- :code:`:pipe-to`
- :code:`:pipe-line-to`
+ - :code:`:redirecto-to`
+ - :code:`:sh`
- :code:`:write-*-to`
This makes it easier to run **lnav** in restricted environments without the
diff --git a/docs/source/conf.py b/docs/source/conf.py
index 3a2d8f2..4f94dba 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -229,7 +229,6 @@ lexers['custsqlite'] = CustSqliteLexer(startinline=True)
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [
'sphinx.ext.coverage',
- "sphinx_rtd_theme",
'sphinx_copybutton',
'sphinx-jsonschema',
'sphinx-prompt',
@@ -257,9 +256,9 @@ copyright = u'2023, Tim Stack'
# built documents.
#
# The short X.Y version.
-version = '0.11'
+version = '0.12'
# The full version, including alpha/beta/rc tags.
-release = '0.11.1'
+release = '0.12.1'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@@ -299,7 +298,7 @@ pygments_style = 'sphinx'
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
-html_theme = 'sphinx_rtd_theme'
+html_theme = 'furo'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
@@ -312,7 +311,7 @@ html_theme_options = {
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
-# html_title = None
+html_title = f"lnav v{release}"
# A shorter title for the navigation bar. Default is the same as html_title.
# html_short_title = None
diff --git a/docs/source/config.rst b/docs/source/config.rst
index 5294e52..d4fc9d5 100644
--- a/docs/source/config.rst
+++ b/docs/source/config.rst
@@ -1,23 +1,34 @@
-
.. _Configuration:
Configuration
=============
-The configuration for **lnav** is stored in the following JSON files in
-:file:`~/.lnav`:
-
-* :file:`config.json` -- Contains local customizations that were done using the
- :code:`:config` command.
-* :file:`configs/default/*.json` -- The default configuration files that are
- built into lnav are written to this directory with :file:`.sample` appended.
- Removing the :file:`.sample` extension and editing the file will allow you to
- do basic customizations.
-* :file:`configs/installed/*.json` -- Contains configuration files installed
- using the :option:`-i` flag (e.g. :code:`$ lnav -i /path/to/config.json`).
-* :file:`configs/*/*.json` -- Other directories that contain :file:`*.json`
- files will be loaded on startup. This structure is convenient for installing
- **lnav** configurations, like from a git repository.
+The configuration for **lnav** is stored in the following JSON files
+where :file:`<lnav-home>` refers to the location in the :envvar:`HOME`
+directory where files are stored, either (:file:`~/.lnav` or
+:file:`~/.config/lnav`):
+
+#. Builtin -- The default configuration is shipped inside the **lnav** binary.
+
+#. :file:`/etc/lnav/configs/*/*.json` -- System-wide configuration files can
+ be installed here to make it available to all users.
+
+#. :file:`<lnav-home>/configs/default/*.json` -- The default configuration
+ files that are built into lnav are written to this directory with :file:`.sample`
+ appended. Removing the :file:`.sample` extension and editing the file will
+ allow you to do basic customizations.
+
+#. :file:`<lnav-home>/configs/*/*.json` -- Other directories that contain :file:`*.json`
+ files will be loaded on startup. This structure is convenient for installing
+ **lnav** configurations, like from a git repository. The :file:`configs/installed`
+ directory is reserved for files that are installed using the :option:`-i`
+ flag (e.g. :code:`$ lnav -i /path/to/config.json`).
+
+#. :file:`-I <path>/configs/*/*.json` -- Include directories passed on the
+ command-line can have a :file:`configs` directory that will also be searched.
+
+#. :file:`<lnav-home>/config.json` -- Contains local customizations that were
+ done using the :code:`:config` command.
A valid **lnav** configuration file must contain an object with the
:code:`$schema` property, like so:
@@ -34,6 +45,14 @@ A valid **lnav** configuration file must contain an object with the
directly. See the :ref:`Log Formats<log_formats>` chapter for more
information.
+.. note::
+
+ Configuration files are read in the above directory order and sorted
+ by path name. The internal configuration is updated as files are
+ parsed, so one file can overwrite the settings from another. You can
+ use the :ref:`Management CLI<management_cli>` to get the final
+ configuration and where the value came from for a particular
+ configuration option.
Options
-------
@@ -115,39 +134,39 @@ You can copy the code block, save it to a file in
definition, see one of the definitions built into **lnav**, like
`monocai <https://github.com/tstack/lnav/blob/master/src/themes/monocai.json>`_.
- .. code-block:: json
-
- {
- "$schema": "https://lnav.org/schemas/config-v1.schema.json",
- "ui": {
- "theme-defs": {
- "example1": {
- "vars": {
- "black": "#2d2a2e"
- },
- "styles": {
- "text": {
- "color": "#f6f6f6",
- "background-color": "$black"
- }
- }
- }
- }
- }
- }
+.. code-block:: json
+
+ {
+ "$schema": "https://lnav.org/schemas/config-v1.schema.json",
+ "ui": {
+ "theme-defs": {
+ "example1": {
+ "vars": {
+ "black": "#2d2a2e"
+ },
+ "styles": {
+ "text": {
+ "color": "#f6f6f6",
+ "background-color": "$black"
+ }
+ }
+ }
+ }
+ }
+ }
Reference
^^^^^^^^^
-.. jsonschema:: ../schemas/config-v1.schema.json#/properties/ui/properties/theme-defs/patternProperties/([\w\-]+)/properties/vars
+.. jsonschema:: ../schemas/config-v1.schema.json#/properties/ui/properties/theme-defs/patternProperties/^([\w\-]+)$/properties/vars
-.. jsonschema:: ../schemas/config-v1.schema.json#/properties/ui/properties/theme-defs/patternProperties/([\w\-]+)/properties/styles
+.. jsonschema:: ../schemas/config-v1.schema.json#/properties/ui/properties/theme-defs/patternProperties/^([\w\-]+)$/properties/styles
-.. jsonschema:: ../schemas/config-v1.schema.json#/properties/ui/properties/theme-defs/patternProperties/([\w\-]+)/properties/syntax-styles
+.. jsonschema:: ../schemas/config-v1.schema.json#/properties/ui/properties/theme-defs/patternProperties/^([\w\-]+)$/properties/syntax-styles
-.. jsonschema:: ../schemas/config-v1.schema.json#/properties/ui/properties/theme-defs/patternProperties/([\w\-]+)/properties/status-styles
+.. jsonschema:: ../schemas/config-v1.schema.json#/properties/ui/properties/theme-defs/patternProperties/^([\w\-]+)$/properties/status-styles
-.. jsonschema:: ../schemas/config-v1.schema.json#/properties/ui/properties/theme-defs/patternProperties/([\w\-]+)/properties/log-level-styles
+.. jsonschema:: ../schemas/config-v1.schema.json#/properties/ui/properties/theme-defs/patternProperties/^([\w\-]+)$/properties/log-level-styles
.. _theme_style:
@@ -198,7 +217,7 @@ to the key.
Reference
^^^^^^^^^
-.. jsonschema:: ../schemas/config-v1.schema.json#/properties/ui/properties/keymap-defs/patternProperties/([\w\-]+)
+.. jsonschema:: ../schemas/config-v1.schema.json#/properties/ui/properties/keymap-defs/patternProperties/^([\w\-]+)$
Log Handling
@@ -208,6 +227,18 @@ The handling of logs is largely determined by the
:ref:`log file formats<log_formats>`, this section covers options that are not
specific to a particular format.
+Timezone Conversion (v0.12.0+)
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Log messages that have a numeric timezone, like :code:`-03:00` or :code:`Z`
+for UTC, will be converted to the local timezone as given by the :envvar:`TZ`
+environment variable. For example, a timestamp ending in `-03:00` will be treated
+as three hours behind UTC and then adjusted to the local timezone.
+
+This behavior can be disabled by setting the
+:code:`/log/date-time/convert-zoned-to-local` configuration property to
+:code:`false`.
+
Watch Expressions (v0.11.0+)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -243,10 +274,44 @@ From there, you can create a SQLite trigger on the :code:`lnav_events` table
that will examine the event contents and perform an action. See the
:ref:`Events` section for more information on handling events.
+Annotations (v0.12.0+)
+^^^^^^^^^^^^^^^^^^^^^^
+
+Annotations are content generated by a script for a given log message and
+displayed along with the message, like comments and tags. Since the script
+is run asynchronously, it can do complex analysis without delaying loading
+or interrupting the viewing experience. An annotation is defined by a
+condition and a handler in the **lnav** configuration. The condition is
+tested against a log message to determine if the annotation is applicable.
+If it is, the handler script will be executed for that log message when
+the user runs the :ref:`:annotate<annotate>` command.
+
+Conditions are SQLite expressions like the ones passed to
+:ref:`:filter-expr<filter_expr>` where the expression is appended to
+:code:`SELECT 1 WHERE`. The expression can use bound variables that
+correspond to the columns that would be in the format table and are
+prefixed by a colon (:code:`:`). For example, the standard
+:code:`log_opid` table column can be access by using :code:`:log_opid`.
+
+.. note:: The expression is executed with bound variables because it
+ can be applied to log messages from multiple formats. Writing an
+ expression that could handle different formats would be more
+ challenging. In this approach, variables for log message fields
+ that are not part of a format will evaluate to :code:`NULL`.
+
+Handlers are executable script files that should be co-located with
+the configuration file that defined the annotation. The handler will
+be executed and a JSON object with log message data fed in on the
+standard input. The handler should then generate the annotation
+content on the standard output. The output is treated as Markdown,
+so the content can be styled as desired.
+
Reference
^^^^^^^^^
-.. jsonschema:: ../schemas/config-v1.schema.json#/properties/log/properties/watch-expressions/patternProperties/([\w\-]+)
+.. jsonschema:: ../schemas/config-v1.schema.json#/properties/log/properties/watch-expressions/patternProperties/^([\w\.\-]+)$
+.. jsonschema:: ../schemas/config-v1.schema.json#/properties/log/properties/annotations/patternProperties/^([\w\.\-]+)$
+
.. _tuning:
@@ -261,6 +326,8 @@ command.
.. jsonschema:: ../schemas/config-v1.schema.json#/properties/tuning/properties/clipboard
+.. jsonschema:: ../schemas/config-v1.schema.json#/properties/tuning/properties/piper
+
.. jsonschema:: ../schemas/config-v1.schema.json#/definitions/clip-commands
.. jsonschema:: ../schemas/config-v1.schema.json#/properties/tuning/properties/file-vtab
@@ -268,3 +335,7 @@ command.
.. jsonschema:: ../schemas/config-v1.schema.json#/properties/tuning/properties/logfile
.. jsonschema:: ../schemas/config-v1.schema.json#/properties/tuning/properties/remote/properties/ssh
+
+.. _url_scheme:
+
+.. jsonschema:: ../schemas/config-v1.schema.json#/properties/tuning/properties/url-scheme
diff --git a/docs/source/cookbook.rst b/docs/source/cookbook.rst
index 3eb0ffd..9523235 100644
--- a/docs/source/cookbook.rst
+++ b/docs/source/cookbook.rst
@@ -1,4 +1,3 @@
-
.. _Cookbook:
Cookbook
@@ -69,9 +68,9 @@ Count client IPs in web access logs
To count the occurrences of an IP in web access logs and order the results
from highest to lowest:
- .. code-block:: custsqlite
+.. code-block:: custsqlite
- ;SELECT c_ip, count(*) as hits FROM access_log GROUP BY c_ip ORDER BY hits DESC
+ ;SELECT c_ip, count(*) as hits FROM access_log GROUP BY c_ip ORDER BY hits DESC
Show only lines where a numeric field is in a range
@@ -81,9 +80,9 @@ The :ref:`:filter-expr<filter_expr>` command can be used to filter web access
logs to only show lines where the number of bytes transferred to the client is
between 10,000 and 40,000 bytes like so:
- .. code-block:: custsqlite
+.. code-block:: custsqlite
- :filter-expr :sc_bytes BETWEEN 10000 AND 40000
+ :filter-expr :sc_bytes BETWEEN 10000 AND 40000
Generating a Report
diff --git a/docs/source/formats.rst b/docs/source/formats.rst
index b30713d..d57add1 100644
--- a/docs/source/formats.rst
+++ b/docs/source/formats.rst
@@ -1,7 +1,11 @@
.. _log_formats:
+***********
Log Formats
-===========
+***********
+
+Built-in Formats
+================
Log files loaded into **lnav** are parsed based on formats defined in
configuration files. Many
@@ -19,6 +23,9 @@ The following log formats are built into **lnav**:
:widths: 8 5 20
:file: format-table.csv
+XSV Formats
+-----------
+
In addition to the above formats, the following self-describing formats are
supported:
@@ -33,6 +40,24 @@ supported:
self-describing, so **lnav** will read the header to determine the shape of
the file.
+JSON-lines
+----------
+
+Logs encoded as `JSON-lines <https://jsonlines.org>`_ can be parsed and
+pretty-printed in lnav by creating a log format file. The format file
+is a bit simpler to create since it doesn't require a regular expression
+to match plain text. Instead, the format defines the relevant fields
+and provides a :code:`line-format` array that specifies how the fields
+in the JSON object should be displayed.
+
+See the following formats that are built into lnav as examples:
+
+* `cloudflare_log.json <https://github.com/tstack/lnav/blob/master/src/formats/cloudflare_log.json>`_
+* `github_events_log.json <https://github.com/tstack/lnav/blob/master/src/formats/github_events_log.json>`_
+
+logfmt
+------
+
There is also basic support for the `logfmt <https://brandur.org/logfmt>`_
convention for formatting log messages. Files that use this format must
have the entire line be key/value pairs and the timestamp contained in a
@@ -41,9 +66,8 @@ quite follow this formatting, but wraps logfmt data with another recognized
format, you can use the :ref:`logfmt2json` SQL function to convert the data
into JSON for further analysis.
-
Defining a New Format
----------------------
+=====================
New log formats can be defined by placing JSON configuration files in
subdirectories of the :file:`/etc/lnav/formats` and :file:`~/.lnav/formats/`
@@ -55,7 +79,7 @@ modify existing ones. Format directories can also contain '.sql' and '.lnav'
script files that can be used automate log file analysis.
Creating a Format Using Regex101.com (v0.11.0+)
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-----------------------------------------------
For plain-text log files, the easiest way to create a log format definition is
to create the regular expression that recognizes log messages using
@@ -81,7 +105,7 @@ default to :code:`string`, but you'll want to change them to the appropriate
type.
Format File Reference
-^^^^^^^^^^^^^^^^^^^^^
+---------------------
An **lnav** format file must contain a single JSON object, preferably with a
:code:`$schema` property that refers to the
@@ -133,6 +157,30 @@ object with the following fields:
:json: True if each log line is JSON-encoded.
+:converter: An object that describes how an input file can be detected and
+ then converted to a form that can be interpreted by **lnav**. For
+ example, a PCAP file is in a binary format that cannot be handled natively
+ by **lnav**. However, a PCAP file can be converted by :file:`tshark`
+ into JSON-lines that can be handled by **lnav**. So, this configuration
+ describes how the input file format can be detected and converted. See
+ `Automatic File Conversion`_ for more information.
+
+ :header: An object that describes how to match the header of the input
+ file.
+
+ :expr: An object that contains SQLite expressions that can be used to
+ check if the input file's header is of this type. The property
+ name is the name of the expression and the value is the expression.
+ The expression is evaluated with the following variables:
+
+ :\:header: The hex-encoded version of the header content.
+
+ :\:filepath: The path to the input file.
+
+ :size: The minimum size of header that is needed to do the match.
+
+ :command: The command to execute to convert the input file.
+
:line-format: An array that specifies the text format for JSON-encoded
log messages. Log files that are JSON-encoded will have each message
converted from the raw JSON encoding into this format. Each element
@@ -179,6 +227,9 @@ object with the following fields:
:truncate: Truncates any text past the maximum width.
:dot-dot: Cuts out the middle of the text and replaces it with two
dots (i.e. '..').
+ :last-word: Removes all but the last word in text with dot, dash,
+ forward-slash, or colon separators. For example, "com.example.foo"
+ would be shortened to "foo".
(v0.8.2+)
:timestamp-format: The timestamp format to use when displaying the time
@@ -319,6 +370,19 @@ object with the following fields:
:glob: A glob pattern to check against the log files read by lnav.
+:partitions: This object contains a description of partitions that should
+ automatically be created in the log view.
+
+ :pattern: The regular expression evaluated over a line in the log file as
+ it is read in. If there is a match, the log message the line is a part
+ of will be used as the start of the partition. The name of the
+ partition will be taken from any captures in the regex.
+ :paths: This array contains objects that define restrictions on the file
+ paths in which partitions will be created. The objects in this array
+ can contain:
+
+ :glob: A glob pattern to check against the log files read by lnav.
+
.. _format_sample:
:sample: A list of objects that contain sample log messages. All formats
@@ -455,6 +519,15 @@ hash are treated as comments. The following variables are defined in a script:
The arguments passed to the script.
+.. envvar:: LNAV_HOME_DIR
+
+ The path to the directory where the user's **lnav** configuration is stored.
+
+.. envvar:: LNAV_WORK_DIR
+
+ The path to the directory where **lnav** caches files, like archives that
+ have been unpacked or piper captures.
+
Remember that you need to use the :ref:`:eval<eval>` command when referencing
variables in most **lnav** commands. Scripts can provide help text to be
displayed during interactive usage by adding the following tags in a comment
@@ -482,7 +555,7 @@ header:
:eval :filter-out ${pattern}
VSCode Extension
-^^^^^^^^^^^^^^^^
+----------------
The `lnav VSCode Extension <https://marketplace.visualstudio.com/items?itemName=lnav.lnav>`_
can be installed to add syntax highlighting to lnav scripts.
@@ -533,7 +606,7 @@ Executing the format file should then install it automatically:
.. _format_order:
Format Order When Scanning a File
----------------------------------
+=================================
When **lnav** loads a file, it tries each log format against the first 15,000
lines [#]_ of the file trying to find a match. When a match is found, that log
@@ -559,3 +632,31 @@ will win.
.. [#] The maximum number of lines to check can be configured. See the
:ref:`tuning` section for more details.
+
+Automatic File Conversion
+=========================
+
+File formats that are not naturally understood by **lnav** can be
+automatically detected and converted to a usable form using the
+:code:`converter` property. For example, PCAP files can be
+detected and converted to a JSON-lines form using :code:`tshark`.
+The conversion process works as follows:
+
+#. The first 1024 bytes of the file are read, if available.
+#. This header is converted into a hex string.
+#. For each log format that has defined a :code:`converter`,
+ every "header expression" is evaluated to see if there is a
+ match. The header expressions are SQLite expressions where
+ the following variables are defined:
+
+ :\:header: A string containing the header as a hex string.
+
+ :\:filepath: The path to the file.
+
+#. If a match is found, the converter script defined in the
+ log format will be invoked and passed the format name and
+ path to the file as arguments. The script should write
+ the converted form of the input file on its standard output.
+ Any errors should be written to the standard error.
+#. The log format will be associated with the original file will
+ be used to interpret the converted file.
diff --git a/docs/source/hotkeys.rst b/docs/source/hotkeys.rst
index 4bad1d9..7b065e7 100644
--- a/docs/source/hotkeys.rst
+++ b/docs/source/hotkeys.rst
@@ -7,6 +7,23 @@ This reference covers the keys used to control **lnav**. Consult the `built-in
help <https://github.com/tstack/lnav/blob/master/src/help.txt>`_ in **lnav** for
a more detailed explanation of each key.
+Global
+------
+
+.. list-table::
+ :header-rows: 1
+ :widths: 6 20
+
+ * - Keypress
+ - Command
+
+ * - :kbd:`Ctrl` + :kbd:`C`
+ - If the focused line is from a file connected to an open pipe (the "↻"
+ icon will be next to the file name), a SIGINT will be sent to the
+ child process. Otherwise, **lnav** will quickly exit. If **lnav**
+ seems to be stuck in a loop, pressing :kbd:`Ctrl` + :kbd:`C` three
+ times will trigger an abort exit.
+
Spatial Navigation
------------------
@@ -148,9 +165,10 @@ status bar.
* - Keypress
- Description
+ * - :kbd:`\``
+ - Focus on the breadcrumb bar.
* - :kbd:`ENTER`
- - Focus on the breadcrumb bar. Or, if the bar is currently focused,
- accept the selected value and drop focus.
+ - If the bar is currently focused, accept the selected value and drop focus.
* - :kbd:`Escape`
- Drop focus on the breadcrumb bar.
* - :kbd:`←`
@@ -223,7 +241,9 @@ Display
* - :kbd:`Shift` + :kbd:`p`
- Switch to/from the pretty-printed view of the displayed log or text files
* - :kbd:`Shift` + :kbd:`t`
- - Display elapsed time between lines
+ - Display the elapsed time from a bookmark to a given line. In the TEXT view,
+ this only works for content that was captured from stdin or a :code:`:sh`
+ command.
* - :kbd:`t`
- Switch to/from the text file view
* - :kbd:`i`
diff --git a/docs/source/index.rst b/docs/source/index.rst
index d94c0eb..29d2be1 100644
--- a/docs/source/index.rst
+++ b/docs/source/index.rst
@@ -2,7 +2,8 @@ Welcome to lnav's documentation!
================================
The `Log File Navigator <http://lnav.org>`_ (**lnav**) is an advanced log file
-viewer for the console.
+viewer for the console. If you have a bunch of log files that you need to
+look through to find issues, **lnav** is the tool for you.
Contents:
diff --git a/docs/source/intro.rst b/docs/source/intro.rst
index 96b0612..28172a1 100644
--- a/docs/source/intro.rst
+++ b/docs/source/intro.rst
@@ -11,16 +11,12 @@ navigate through your logs using a variety of :ref:`hotkeys<hotkeys>`.
for doing things like applying filters, tagging messages, and more. You can
then analyze your log messages using the :ref:`sql-ext`.
-Development
------------
+.. figure:: lnav-intro-screen.png
+ :align: center
+ :alt: Screenshot of lnav showing a mix of syslog and web access_log messages.
-Development of lnav is hosted on `GitHub <https://github.com/tstack/lnav/>`_.
+ Screenshot of **lnav** viewing syslog and web access_log messages.
-`Issues <https://github.com/tstack/lnav/issues>`_ should be used for bugs
-and feature requests.
-
-`Discussions <https://github.com/tstack/lnav/discussions>`_ should be used
-for asking questions and sharing tips.
Downloads
---------
@@ -28,34 +24,7 @@ Downloads
Binaries and source code for lnav can be downloaded from the
`releases page <https://github.com/tstack/lnav/releases>`_.
-When building from source, follow the steps below.
-
-Dependencies
-^^^^^^^^^^^^
-
-When compiling from source, the following dependencies are required:
-
-* `NCurses <http://www.gnu.org/s/ncurses/>`_
-* `PCRE2 <http://www.pcre.org>`_
-* `SQLite <http://www.sqlite.org>`_
-* `ZLib <http://wwww.zlib.net>`_
-* `Bzip2 <http://www.bzip.org>`_
-* `Readline <http://www.gnu.org/s/readline>`_
-* `libcurl <https://curl.haxx.se>`_
-* `libarchive <https://libarchive.org>`_
-
-Installation
-^^^^^^^^^^^^
-
-Check the `downloads page <http://lnav.org/downloads>`_ to see if there are
-packages for your operating system. To compile from source, use the following
-commands:
-
-.. prompt:: bash
-
- ./configure
- make
- sudo make install
+When building from source, follow the steps in :ref:`development`.
Viewing Logs
@@ -129,6 +98,7 @@ command can be used to the change the theme:
The builtin themes are:
`default <https://github.com/tstack/lnav/blob/master/src/themes/default-theme.json>`_,
+`dracula <https://github.com/tstack/lnav/blob/master/src/themes/dracula.json>`_,
`eldar <https://github.com/tstack/lnav/blob/master/src/themes/eldar.json>`_,
`grayscale <https://github.com/tstack/lnav/blob/master/src/themes/grayscale.json>`_,
`monocai <https://github.com/tstack/lnav/blob/master/src/themes/monocai.json>`_,
@@ -143,16 +113,33 @@ To create or customize a theme, consult the :ref:`themes` section.
Cursor Mode (v0.11.2+)
^^^^^^^^^^^^^^^^^^^^^^
-The default mode for scrolling in **lnav** is to move the contents of the
-main view when the arrow keys are pressed. Any interactions, such as
-jumping to a search hit, are then focused on the top line in the view.
-Alternatively, you can enable "cursor" mode where there is a cursor line
-in the view that is moved by the arrow keys and other interactions. You
-can enable cursor mode with the following command:
+The default mode for scrolling in **lnav** is "cursor" mode where
+there is a cursor line in the view that is moved by the arrow keys
+and other interactions. Any interactions, such as jumping to a
+search hit, are then focused on that line.
+
+Alternatively, you can enable "top" mode where the contents of the
+main view are moved when the arrow keys are pressed. Any
+interactions, such as jumping to a search hit, are then focused
+on the top line in the view. You can change to "top" mode with
+the following command:
+
+.. code-block:: lnav
+
+ :config /ui/movement/mode top
+
+
+Mouse Support (v0.12.2+)
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+Mouse support can be enabled temporarily by pressing :kbd:`F2`
+and can be set as the default by executing the following command:
.. code-block:: lnav
- :config /ui/movement/mode cursor
+ :config /ui/mouse/mode enabled
+
+See :ref:`ui_mouse` for more details.
Log Formats
^^^^^^^^^^^
@@ -162,3 +149,48 @@ parse the log messages using a log format definition. There are many log
formats builtin and **lnav** will automatically determine the best format to
use. In case your log file is not recognized, consult the :ref:`log_formats`
section for information on how to create a format.
+
+.. _development:
+
+Development
+-----------
+
+Development of lnav is hosted on `GitHub <https://github.com/tstack/lnav/>`_.
+
+`Issues <https://github.com/tstack/lnav/issues>`_ should be used for bugs
+and feature requests.
+
+`Discussions <https://github.com/tstack/lnav/discussions>`_ should be used
+for asking questions and sharing tips.
+
+Dependencies
+^^^^^^^^^^^^
+
+When compiling from source, the following dependencies are required:
+
+* `NCurses <http://www.gnu.org/s/ncurses/>`_
+* `PCRE2 <http://www.pcre.org>`_
+* `SQLite <http://www.sqlite.org>`_
+* `ZLib <http://wwww.zlib.net>`_
+* `Bzip2 <http://www.bzip.org>`_
+* `Readline <http://www.gnu.org/s/readline>`_
+* `libcurl <https://curl.haxx.se>`_
+* `libarchive <https://libarchive.org>`_
+
+Installation
+^^^^^^^^^^^^
+
+Check the `downloads page <http://lnav.org/downloads>`_ to see if there are
+packages for your operating system. To compile from source, use the following
+commands:
+
+.. note::
+
+ Run :code:`./autogen.sh` if compiling from the git repository.
+
+.. prompt:: bash
+
+ ./configure
+ make
+ sudo make install
+
diff --git a/docs/source/lnav-gantt-1.png b/docs/source/lnav-gantt-1.png
new file mode 100644
index 0000000..306187c
--- /dev/null
+++ b/docs/source/lnav-gantt-1.png
Binary files differ
diff --git a/docs/source/lnav-gantt-2.png b/docs/source/lnav-gantt-2.png
new file mode 100644
index 0000000..90bf8c1
--- /dev/null
+++ b/docs/source/lnav-gantt-2.png
Binary files differ
diff --git a/docs/source/lnav-intro-screen.png b/docs/source/lnav-intro-screen.png
new file mode 100644
index 0000000..39d8129
--- /dev/null
+++ b/docs/source/lnav-intro-screen.png
Binary files differ
diff --git a/docs/source/lnav-make-check-log.png b/docs/source/lnav-make-check-log.png
new file mode 100644
index 0000000..68ac351
--- /dev/null
+++ b/docs/source/lnav-make-check-log.png
Binary files differ
diff --git a/docs/source/query-results.png b/docs/source/query-results.png
index 14ae5b8..8343d71 100644
--- a/docs/source/query-results.png
+++ b/docs/source/query-results.png
Binary files differ
diff --git a/docs/source/sqlext.rst b/docs/source/sqlext.rst
index 221b100..3b0ee75 100644
--- a/docs/source/sqlext.rst
+++ b/docs/source/sqlext.rst
@@ -47,6 +47,14 @@ and maximum number of bytes returned by the server, grouped by IP address:
;SELECT c_ip, avg(sc_bytes), max(sc_bytes) FROM access_log GROUP BY c_ip
+.. note::
+
+ For reference, the PRQL query would look like this:
+
+ .. code-block:: elm
+
+ from access_log | stats.by c_ip {average sc_bytes, max sc_bytes}
+
After pressing :kbd:`Enter`, SQLite will execute the query using **lnav**'s
virtual table implementation to extract the data directly from the log files.
Once the query has finished, the main window will switch to the DB view to
@@ -71,6 +79,39 @@ The DB view has the following display features:
the `jget`_ function.
+PRQL Support (v0.12.1+)
+-----------------------
+
+`PRQL <https://prql-lang.org>`_ is an alternative database query language
+that compiles to SQLite. You can enter PRQL in the database query prompt
+and lnav will switch accordingly. A major advantage of using PRQL is that
+lnav can show previews of the results of the pipeline stages and provide
+better tab completion options.
+
+A PRQL query starts with the :code:`from` keyword that specifies the table
+to use as a data source. The next stage of a pipeline is started by
+entering a pipe symbol (:code:`|`) followed by a
+`PRQL transform <https://prql-lang.org/book/reference/stdlib/transforms/index.html>`_.
+As you build the query in the prompt, lnav will display any relevant
+help and preview for the current and previous stages of the pipeline.
+
+The following is a screenshot of lnav viewing a web access log with a
+query in progress:
+
+.. figure:: ../assets/images/lnav-prql-preview.png
+ :align: center
+
+ Screenshot of a PRQL query in progress
+
+The top half of the window is the usual log message view. Below that is
+the online help panel showing the documentation for the :code:`stats.count_by`
+PRQL function. lnav will show the help for what is currently under the
+cursor. The next panel shows the preview data for the pipeline stage
+that precedes the stage where the cursor is. In this case, the
+results of :code:`from access_log`, which is the contents of the access
+log table. The second preview window shows the result of the
+pipeline stage where the cursor is located.
+
Log Tables
----------
@@ -105,6 +146,8 @@ The following columns are builtin and included in a :code:`SELECT *`:
an :code:`UPDATE` or the :ref:`:comment<comment>` command.
:log_tags: A JSON list of tags for the message. This column can be changed
by an :code:`UPDATE` or the :ref:`:tag<tag>` command.
+ :log_annotations: A JSON object of annotations for this message.
+ This column is populated by the :ref:`:annotate<annotate>` command.
:log_filters: A JSON list of filter IDs that matched this message
The following columns are builtin and are hidden, so they will *not* be
diff --git a/docs/source/sqltab.rst b/docs/source/sqltab.rst
index 2531390..299ba2b 100644
--- a/docs/source/sqltab.rst
+++ b/docs/source/sqltab.rst
@@ -7,6 +7,7 @@ In addition to the tables generated for each log format, **lnav** includes
the following tables/views:
* `environ`_
+* `fstat(<path|pattern>)`_
* `lnav_events`_
* `lnav_file`_
* `lnav_file_metadata`_
@@ -31,7 +32,7 @@ by executing the '.schema' SQL command, like so::
environ
-------
-The **environ** table gives you access to the **lnav** process' environment
+The :code:`environ` table gives you access to the **lnav** process' environment
variables. You can :code:`SELECT`, :code:`INSERT`, and :code:`UPDATE`
environment variables, like so:
@@ -55,6 +56,19 @@ named "FILENAME" and then open it in **lnav** by referencing it with
:open $FILENAME
+fstat(<path|pattern>)
+---------------------
+
+The :code:`fstat` table-valued function provides access to the local
+file system. The function takes a file path or a glob pattern and
+returns the results of :code:`lstat(2)` for the matching files. If
+the parameter is a pattern that matches nothing, no rows will be
+returned. If the parameter is a path for a non-existent file, a
+row will be returned with the :code:`error` column set and the
+stat columns as :code:`NULL`. To read the contents of a file, you
+can :code:`SELECT` the hidden :code:`data` column.
+
+
.. _table_lnav_events:
lnav_events
@@ -81,12 +95,22 @@ following columns are available in this table:
:device: The device the file is stored on.
:inode: The inode for the file on the device.
:filepath: If this is a real file, it will be the absolute path. Otherwise,
- it is a symbolic name. If it is a symbolic name, it can be UPDATEd so that
- this file will be considered when saving and loading session information.
+ it is a symbolic name. If it is a symbolic name, it can be UPDATEd
+ so that this file will be considered when saving and loading session
+ information.
+ :mimetype: The detected MIME type of the file.
+ :content_id: The hash of some unique content in the file.
:format: The log file format for the file.
:lines: The number of lines in the file.
:time_offset: The millisecond offset for timestamps. This column can be
UPDATEd to change the offset of timestamps in the file.
+ :options_path: Options can be applied to files based on a path or glob
+ pattern. If this file matches a set of options, the matching path/pattern
+ is available in this column and the actual options themselves are in the
+ :code:`options` column.
+ :options: The options that are applicable to this file. Currently, the
+ only options available are for the timezone set by the
+ :ref:`:set-file-timezone<set_file_timezone>` command.
lnav_file_metadata
------------------
@@ -169,6 +193,7 @@ available in this table:
:top_meta: A JSON object that contains metadata related to the top line
in the view.
:selection: The number of the line that is focused for selection.
+:options: A JSON object that contains optional settings for this view.
lnav_views_echo
---------------
diff --git a/docs/source/ui.rst b/docs/source/ui.rst
index a718d06..b2de5b7 100644
--- a/docs/source/ui.rst
+++ b/docs/source/ui.rst
@@ -8,7 +8,7 @@ with status bars above and below, and the interactive prompt as the last line.
.. figure:: lnav-ui.png
:align: center
- :alt: Screenshot of lnav showing a mix of syslog and web access_log messages.
+ :figwidth: 90%
Screenshot of **lnav** viewing syslog and web access_log messages.
@@ -26,11 +26,11 @@ times in the views.
**lnav** provides many operations to work with the log/text data in the
main view. For example, you can add comments and tags to log messages.
-By default, the top line is used as the reference point to edit the
+The highlighted cursor line is used as the reference point to edit the
comment or tags. Alternatively, you can press :kbd:`Ctrl` + :kbd:`x`
-to switch to "cursor" mode where the "focused" line is highlighted and
-most operations now work with that line. When in "cursor" mode, the
-:kbd:`↑` and :kbd:`↓` keys now move the focused line instead of scrolling
+to switch to "top" mode where the "focused" line is the top line in the
+view and most operations now work with that line. When in "cursor" mode,
+the :kbd:`↑` and :kbd:`↓` keys now move the focused line instead of scrolling
the view. Jumping to bookmarks, like errors, will also move the focused
line instead of moving the next error to the top of the view.
@@ -173,7 +173,9 @@ LOG
^^^
The log view displays the log messages from any loaded log files in time
-order. This view will be shown by default if any log messages are available.
+order. This view will be shown by default if any log files were detected.
+If plain text files were also loaded, they will be available in the TEXT
+view, which you can switch to by pressing :kbd:`t`.
On color displays, the log messages will be highlighted as follows:
@@ -194,11 +196,18 @@ On color displays, the log messages will be highlighted as follows:
:config /ui/theme grayscale
+Timestamps in log messages will be rewritten to the local timezone (or the
+timezone specified by :envvar:`TZ`) automatically if they include a
+timezone component. If a file's timestamps do not include a timezone, they
+will be treated as if they are from the local zone. You can change the zone
+to use for these types of files using the
+:ref:`:set-file-timezone<set_file_timezone>` command.
+
.. note::
If a log message has a timestamp that is out-of-order with its neighboring
messages, the timestamp will be highlighted in yellow. When one of these
- messages is at the top of the log view, an overlay will display the
+ messages is focused, an overlay will display the
difference between the "actual time" and the "received time". The "actual
time" is the original textual timestamp. The "received time" is the time
of an earlier message that is larger than this log message's time.
@@ -221,6 +230,10 @@ These crumbs are interactive and can be used to navigate to different parts
of the log view. For example, selecting a different value in the log format
crumb will jump to the first message with that format.
+The file crumb will show a "↻" icon if the file is from the output of a FIFO,
+:code:`:sh` command, or data that was piped into the standard input. When
+the pipe is closed, the icon will disappear.
+
TEXT
^^^^
@@ -230,16 +243,39 @@ Press :kbd:`t` to switch to the text view. While in the text view, you can
press :kbd:`f` or :kbd:`Shift` + :kbd:`F` to switch to the next / previous
text file.
+The breadcrumb bar will show the name of the file and any structure that was
+discovered in the content. The file crumb will show a "↻" icon if the file
+is from the output of a FIFO, :code:`:sh` command, or data that was piped
+into the standard input. When the pipe is closed, the icon will disappear.
+
+If the content is piped into lnav through standard input, a FIFO, or a
+:code:`:sh` command, the time that lines are received are recorded. You
+can press :kbd:`Shift` + :kbd:`T` to view the elapsed time like in the
+LOG view. The breadcrumb bar will also show the received time of the
+focused line after the file name crumb. If the output being shown is from
+a :code:`:sh` command, you can press :kbd:`Ctrl` + :kbd:`C` to send a
+SIGINT to the child process without killing **lnav** itself.
+
+.. figure:: lnav-make-check-log.png
+ :align: center
+ :figwidth: 90%
+
+ Screenshot of the TEXT view showing the output of :code:`sh make check`.
+ Each line is timestamped internally when it was received so it's
+ possible to view how long each test is taking to run. The "↻" icon
+ next to the file name in the breadcrumb bar means that the make is
+ still running.
+
Markdown
""""""""
Files with an :code:`.md` (or :code:`.markdown`) extension will be treated as
Markdown files and rendered separately.
- .. figure:: lnav-markdown-example.png
- :align: center
+.. figure:: lnav-markdown-example.png
+ :align: center
- Viewing the **lnav** :file:`README.md` file.
+ Viewing the **lnav** :file:`README.md` file.
DB
@@ -269,6 +305,61 @@ can also press :kbd:`Shift` + :kbd:`i` to toggle the histogram view
while synchronizing the top time. While in the histogram view,
pressing :kbd:`z` / :kbd:`Shift` + :kbd:`z` will zoom in/out.
+GANTT
+^^^^^
+
+.. note:: This feature is available in v0.12.0+.
+
+.. figure:: lnav-gantt-1.png
+ :align: center
+
+ Screenshot of the Gantt chart view when viewing logs from the
+ VMWare Update Manager. Most rows show API requests as they
+ are received and processed.
+
+The Gantt Chart view visualizes operations over time. The operations
+are identified by the "opid" field defined in the log format. In the
+view, there is a header that shows the overall time span, the
+narrowed time span around the focused line, and the column headers.
+Each row in the view shows the following:
+
+* The duration of the operation
+* Sparklines showing the number of errors and warnings relative to the
+ total number of messages associated with the OPID.
+* The OPID itself.
+* A description of the operation as captured from the log messages.
+
+The rows are sorted by the start time of each operation.
+
+If an operation row is in the focused time span, a reverse-video
+bar will show when the operation started and finished (unless it
+extends outside the time span). As you move the focused line, the
+focused time span will be adjusted to keep the preceding and following
+five operations within the span.
+
+The preview panel at the bottom of the display will show the
+messages associated with the focused operation.
+
+The following hotkeys can be useful in this view:
+
+* :kbd:`p` -- If the log format defined sub-operations with the
+ :code:`opid/subid` property, this will toggle an overlay panel
+ that displays the sub-operation descriptions.
+
+ .. figure:: lnav-gantt-2.png
+ :align: center
+
+ Screenshot showing the same log as above after pressing
+ :kbd:`p`. The overlay panel shows a breakdown of
+ sub-operations performed while processing the main operation.
+
+* :kbd:`Shift` + :kbd:`q` -- Return to the previous view and change
+ its focused line to match the time that was focused in the gantt
+ view.
+* :kbd:`Shift` + :kbd:`a` -- After leaving the gantt view, pressing
+ these keys will return to the Gantt view while keeping the focused
+ time in sync.
+
PRETTY
^^^^^^
@@ -325,3 +416,71 @@ range of values. The panel at the bottom of the view shows the data points
themselves from the original source, the log file or the SQL query results.
You can press :kbd:`TAB` to focus on the details panel so you can scroll
around and get a closer look at the values.
+
+.. _ui_mouse:
+
+Mouse Support (v0.12.2+)
+------------------------
+
+With mouse support enabled, either through the `/ui/mouse/mode`
+configuration option or by pressing :kbd:`F2`, many of the UI
+elements will respond to mouse inputs:
+
+* clicking on the main view will move the cursor to the given
+ row and dragging will scroll the view as needed;
+* double-clicking in the main view will select the underlying
+ text and drag-selecting within a line will select the given
+ text;
+* when double-clicking text: if the mouse pointer is inside
+ a quoted string, the contents of the string will be selected;
+ if the mouse pointer is on the quote, the quote will be included
+ in the selection; if the mouse pointer is over a bracket
+ (e.g. [],{},()) where the matching bracket is on the same line,
+ the selection will span from one bracket to the other;
+* when text is selected, a menu will pop up that can be used
+ to filter based on the current text, search for it, or copy
+ it to the clipboard;
+* right-clicking the start of a log message in the main view
+ will open the parser details overlay;
+* the parser details now displays a diamond next to fields to
+ indicate whether they are shown/hidden and this can be
+ clicked to toggle the state;
+* the parser details will show a bar chart icon for fields with
+ values which, when clicked, will open either the spectrogram
+ view for the given field or open the DB query prompt with a
+ PRQL query to generate a histogram of the field values;
+* clicking in the scroll area will move the view by a page,
+ double-clicking will move the view to that area, and
+ dragging the scrollbar will move the view to the given spot;
+* clicking on the breadcrumb bar will select a crumb and
+ selecting a possibility from the popup will move to that
+ location in the view;
+* clicking on portions of the bottom status bar will trigger
+ a relevant action (e.g. clicking the line number will open
+ the command prompt with :code:`:goto <current-line>`);
+* clicking on the configuration panel tabs (i.e. Files/Filters)
+ will open the selected panel and clicking parts of the
+ display in there will perform the relevant action (e.g.
+ clicking the diamond will enable/disable the file/filter);
+* clicking in a prompt will move the cursor to the location;
+* clicking on a column in the spectrogram view will select it.
+
+.. note::
+
+ A downside of enabling mouse support is that normal text
+ selection and copy will no longer work. While lnav has
+ some support for selection in the main view, there are
+ still likely to be cases where that is insufficient.
+ In those cases, you can press :kbd:`F2` to quickly
+ switch back-and-forth. Or, some terminals have support
+ for switching while a modifier is pressed:
+
+ .. list-table::
+ :header-rows: 1
+
+ * - Key
+ - Terminal
+ * - :kbd:`Option`
+ - iTerm, Hyper
+ * - :kbd:`Fn`
+ - Terminal.app
diff --git a/docs/source/usage.rst b/docs/source/usage.rst
index d43ed52..df50c7d 100644
--- a/docs/source/usage.rst
+++ b/docs/source/usage.rst
@@ -116,6 +116,68 @@ file.
The binary file is named ``tailer.bin.XXXXXX`` where *XXXXXX* is 6 random digits.
The file is, under normal circumstancies, deleted immediately.
+Command Output
+^^^^^^^^^^^^^^
+
+The output of commands can be captured and displayed in **lnav** using
+the :ref:`:sh<sh>` command or by passing the :option:`-e` option on the
+command-line. The captured output will be displayed in the TEXT view.
+The lines from stdout and stderr are recorded separately so that the
+lines from stderr can be shown in the theme's "error" highlight. The
+time that the lines were received are also recorded internally so that
+the "time-offset" display (enabled by pressing :kbd:`Shift` + :kbd:`T`)
+can be shown and the "jump to slow-down" hotkeys (:kbd:`s` /
+:kbd:`Shift` + :kbd:`S`) work. Since the line-by-line timestamps are
+recorded internally, they will not interfere with timestamps that are
+in the commands output.
+
+Docker Logs
+^^^^^^^^^^^
+
+To make it easier to view
+`docker logs <https://docs.docker.com/engine/reference/commandline/logs/>`_
+within **lnav**, a :code:`docker://` URL scheme is available. Passing
+the container name in the authority field will run the :code:`docker logs`
+command. If a path is added to the URL, then **lnav** will execute
+:code:`docker exec <container> tail -F -n +0 /path/to/file` to try and
+tail the file in the container.
+
+Custom URL Schemes
+^^^^^^^^^^^^^^^^^^
+
+Custom URL schemes can be defined using the :ref:`/tuning/url-schemes<url_scheme>`
+configuration. By adding a scheme name to the tuning configuration along
+with the name of an **lnav** handler script, you can control how the URL is
+interpreted and turned into **lnav** commands. This feature is how the
+`Docker Logs`_ functionality is implemented.
+
+Custom URLs can be passed on the command-line or to the :ref:`:open<open>`
+command. When passed on the command-line, an :code:`:open` command with the
+URL is added to the list of initial commands. When the :code:`:open` command
+detects a custom URL, it checks for the definition in the configuration.
+If found, it will call the associated handler script with the URL as the
+first parameter. The script can parse the URL using the :ref:`parse_url`
+SQL function, if needed. The script should then execute whatever commands
+it needs to open the destination for viewing in **lnav**. For example,
+the docker URL handler uses the :ref:`:sh<sh>` command to run
+:code:`docker logs` with the container.
+
+Using as a PAGER
+^^^^^^^^^^^^^^^^
+
+Setting **lnav** as your :envvar:`PAGER` can have some advantages, like
+basic syntax highlighting and discovering sections in a document. For
+example, when viewing a man page, the current section is displayed in
+the breadcrumb bar and you can jump to a section with the
+:ref:`:goto<goto>` command.
+
+You will probably want to pass the :option:`-q` option to suppress the
+message showing the path to the captured input.
+
+.. prompt:: bash
+
+ export PAGER="lnav -q"
+
Searching
---------
@@ -203,10 +265,41 @@ columns will be included in the table.
Taking Notes
------------
-A few of the columns in the log tables can be updated on a row-by-row basis to
-allow you to take notes. The majority of the columns in a log table are
-read-only since they are backed by the log files themselves. However, the
-following columns can be changed by an :code:`UPDATE` statement:
+As you are looking through logs, you might find that you want to leave some
+notes of your findings. **lnav** can help here by saving information in
+the session without needing to modify the actual log files. Thus, when
+you re-open the files in lnav, the notes will be restored. The following
+types of information can be saved:
+
+:tags: Log messages can be tagged with the :ref:`:tag<tag>` command as a
+ simple way to leave a descriptive mark. The tags attached to a
+ message will be shown underneath the message. You can press
+ :kbd:`u` and :kbd:`Shift` + :kbd:`u` to jump to the next/previous
+ marked line. A regular search will also match tags.
+
+:comments: Free-form text can be attached to a log message with the
+ :ref:`:comment<comment>` command. The comment will be shown
+ underneath the message. If the text contains markdown syntax,
+ it will be rendered to the best of the terminal's ability.
+ You can press :kbd:`u` and :kbd:`Shift` + :kbd:`u` to jump to the
+ next/previous marked line. A regular search will also match the
+ comment text.
+
+:partitions: The log view can be partitioned to provide some context
+ about where you are in a collection of logs. For example, in logs
+ for a test run, partitions could be created with the name for each
+ test. The current partition is shown in the breadcrumb bar and
+ prefixed by the "⊑" symbol. You can select the partition breadcrumb
+ to jump to another partition. Pressing :kbd:`{` and :kbd:`}` will
+ jump to the next/previous partition.
+
+Accessing notes through the SQLite interface
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+The note taking functionality in lnav can also be accessed through the
+log tables exposed through SQLite. The majority of the columns in a log
+table are read-only since they are backed by the log files themselves.
+However, the following columns can be changed by an :code:`UPDATE` statement:
* **log_part** - The "partition" the log message belongs to. This column can
also be changed by the :ref:`:partition-name<partition_name>` command.
diff --git a/example-scripts/report-demo.lnav b/example-scripts/report-demo.lnav
index aeb0040..aa80d4c 100644
--- a/example-scripts/report-demo.lnav
+++ b/example-scripts/report-demo.lnav
@@ -17,7 +17,7 @@
;SELECT printf('\n%d total requests', count(1)) AS msg FROM access_log
:echo $msg
-;WITH top_paths AS (
+;WITH top_paths AS MATERIALIZED (
SELECT
cs_uri_stem,
count(1) AS total_hits,
@@ -28,7 +28,7 @@
GROUP BY cs_uri_stem
ORDER BY total_hits DESC
LIMIT 50),
- weekly_hits_with_gaps AS (
+ weekly_hits_with_gaps AS MATERIALIZED (
SELECT timeslice(log_time_msecs, '1w') AS week,
cs_uri_stem,
count(1) AS weekly_hits
diff --git a/lnav.1 b/lnav.1
index 4a1366a..bdf349b 100644
--- a/lnav.1
+++ b/lnav.1
@@ -1,4 +1,3 @@
-.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
.\" Some roff macros, for reference:
.\" .nh disable hyphenation
.\" .hy enable hyphenation
@@ -19,21 +18,27 @@
.ft R
.fi
..
-.TH LNAV "1" "August 2022"
+.TH LNAV "1" "April 2024"
.SH NAME
-lnav \- ncurses-based log file viewer
+lnav \- log file viewer for the terminal
.SH SYNOPSIS
.B lnav
-[\-hVsar] [logfile1 logfile2 ...]
+[options] [logfile1 logfile2 ...]
.SH DESCRIPTION
-The log file navigator, lnav, is an enhanced log file viewer that
-takes advantage of any semantic information that can be gleaned from
-the files being viewed, such as timestamps and log levels. Using this
-extra semantic information, lnav can do things like interleaving
-messages from different files, generate histograms of messages over
-time, and providing hotkeys for navigating through the file. It is
-hoped that these features will allow the user to quickly and
-efficiently zero in on problems.
+The Logfile Navigator, lnav, is a log file viewer for the terminal.
+Given a set of files/directories, lnav will:
+.TP
+- decompress as needed;
+.TP
+- detect their format;
+.TP
+- merge the files together by time into a single view;
+.TP
+- tail the files, follow renames, find new files in directories;
+.TP
+- build an index of errors and warnings;
+.TP
+- pretty-print JSON-lines.
.SH KEY BINDINGS
.TP
?
@@ -49,36 +54,15 @@ Print help and exit
\fB\-H\fR
Display the internal help text.
.TP
-\fB\-n\fR
-Run without the curses UI. (headless mode)
-.TP
-\fB\-c\fR cmd
-Execute a command after the files have been loaded.
-.TP
-\fB\-f\fR path
-Execute the commands in the given file.
-.TP
\fB\-I\fR path
Add the given configuration directory to the search path.
.TP
-\fB\-n\fR
-Do not open the default syslog file if no files are given.
-.TP
-\fB\-q\fR
-Quiet mode. Do not print the log messages after executing all of the commands.
-.TP
-\fB\-i\fR
-Install the given format files in the $HOME/.lnav/formats/installed directory
-and exit.
+\fB\-W\fR
+Print warnings related to lnav's configuration.
.TP
\fB\-u\fR
Update formats installed from git repositories.
.TP
-\fB\-C\fR
-Check the configuration and exit. The log format files will be loaded and
-checked. Any files given on the command-line will be loaded checked to make
-sure they match a log format.
-.TP
\fB\-d\fR file
Write debug messages to the given file.
.TP
@@ -91,18 +75,47 @@ Recursively load files from the given directories.
\fB\-R\fR
Load older rotated log files as well.
.TP
+\fB\-c\fR cmd
+Execute a command after the files have been loaded.
+.TP
+\fB\-f\fR path
+Execute the commands in the given file.
+.TP
+\fB\-e\fR cmd
+Execute a shell command-line.
+.TP
\fB\-t\fR
Prepend timestamps to the lines of data being read in
on the standard input.
.TP
-\fB\-w\fR file
-Write the contents of the standard input to this file.
+\fB\-n\fR
+Run without the curses UI. (headless mode)
+.TP
+\fB\-N\fR
+Do not open the default syslog file if no files are given.
+.TP
+\fB\-q\fR
+Quiet mode. Do not print the log messages after executing all of the commands.
.SS "Optional arguments:"
.TP
logfile1
The log files or directories to view. If a
directory is given, all of the files in the
directory will be loaded.
+.SH MANAGEMENT-MODE OPTIONS
+.TP
+\fB\-i\fR
+Install the given format files in the $HOME/.lnav/formats/installed directory
+and exit.
+.TP
+\fB\-m\fR
+Switch to the management command-line mode. This mode is
+used to work with lnav's configuration.
+.TP
+\fB\-C\fR
+Check the configuration and exit. The log format files will be loaded and
+checked. Any files given on the command-line will be loaded checked to make
+sure they match a log format.
.SH EXAMPLES
To load and follow the syslog file:
.PP
diff --git a/m4/ax_cxx_compile_stdcxx.m4 b/m4/ax_cxx_compile_stdcxx.m4
index 9413da6..8edf515 100644
--- a/m4/ax_cxx_compile_stdcxx.m4
+++ b/m4/ax_cxx_compile_stdcxx.m4
@@ -10,8 +10,8 @@
#
# Check for baseline language coverage in the compiler for the specified
# version of the C++ standard. If necessary, add switches to CXX and
-# CXXCPP to enable support. VERSION may be '11' (for the C++11 standard)
-# or '14' (for the C++14 standard).
+# CXXCPP to enable support. VERSION may be '11', '14', '17', or '20' for
+# the respective C++ standard version.
#
# The second argument, if specified, indicates whether you insist on an
# extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g.
@@ -36,13 +36,14 @@
# Copyright (c) 2016, 2018 Krzesimir Nowak <qdlacz@gmail.com>
# Copyright (c) 2019 Enji Cooper <yaneurabeya@gmail.com>
# Copyright (c) 2020 Jason Merrill <jason@redhat.com>
+# Copyright (c) 2021 Jörn Heusipp <osmanx@problemloesungsmaschine.de>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
-#serial 12
+#serial 18
dnl This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro
dnl (serial version number 13).
@@ -51,6 +52,7 @@ AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
m4_if([$1], [11], [ax_cxx_compile_alternatives="11 0x"],
[$1], [14], [ax_cxx_compile_alternatives="14 1y"],
[$1], [17], [ax_cxx_compile_alternatives="17 1z"],
+ [$1], [20], [ax_cxx_compile_alternatives="20"],
[m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl
m4_if([$2], [], [],
[$2], [ext], [],
@@ -102,9 +104,18 @@ AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
dnl HP's aCC needs +std=c++11 according to:
dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf
dnl Cray's crayCC needs "-h std=c++11"
+ dnl MSVC needs -std:c++NN for C++17 and later (default is C++14)
for alternative in ${ax_cxx_compile_alternatives}; do
- for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
- cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
+ for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}" MSVC; do
+ if test x"$switch" = xMSVC; then
+ dnl AS_TR_SH maps both `:` and `=` to `_` so -std:c++17 would collide
+ dnl with -std=c++17. We suffix the cache variable name with _MSVC to
+ dnl avoid this.
+ switch=-std:c++${alternative}
+ cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_${switch}_MSVC])
+ else
+ cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
+ fi
AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
$cachevar,
[ac_save_CXX="$CXX"
@@ -151,7 +162,6 @@ m4_define([_AX_CXX_COMPILE_STDCXX_testbody_11],
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
)
-
dnl Test body for checking C++14 support
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_14],
@@ -159,12 +169,24 @@ m4_define([_AX_CXX_COMPILE_STDCXX_testbody_14],
_AX_CXX_COMPILE_STDCXX_testbody_new_in_14
)
+dnl Test body for checking C++17 support
+
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_17],
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
_AX_CXX_COMPILE_STDCXX_testbody_new_in_14
_AX_CXX_COMPILE_STDCXX_testbody_new_in_17
)
+dnl Test body for checking C++20 support
+
+m4_define([_AX_CXX_COMPILE_STDCXX_testbody_20],
+ _AX_CXX_COMPILE_STDCXX_testbody_new_in_11
+ _AX_CXX_COMPILE_STDCXX_testbody_new_in_14
+ _AX_CXX_COMPILE_STDCXX_testbody_new_in_17
+ _AX_CXX_COMPILE_STDCXX_testbody_new_in_20
+)
+
+
dnl Tests for new features in C++11
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[
@@ -176,7 +198,11 @@ m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[
#error "This is not a C++ compiler"
-#elif __cplusplus < 201103L
+// MSVC always sets __cplusplus to 199711L in older versions; newer versions
+// only set it correctly if /Zc:__cplusplus is specified as well as a
+// /std:c++NN switch:
+// https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/
+#elif __cplusplus < 201103L && !defined _MSC_VER
#error "This is not a C++11 compiler"
@@ -467,7 +493,7 @@ m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_14], [[
#error "This is not a C++ compiler"
-#elif __cplusplus < 201402L
+#elif __cplusplus < 201402L && !defined _MSC_VER
#error "This is not a C++14 compiler"
@@ -591,7 +617,7 @@ m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_17], [[
#error "This is not a C++ compiler"
-#elif __cplusplus < 201703L
+#elif __cplusplus < 201703L && !defined _MSC_VER
#error "This is not a C++17 compiler"
@@ -957,6 +983,36 @@ namespace cxx17
} // namespace cxx17
-#endif // __cplusplus < 201703L
+#endif // __cplusplus < 201703L && !defined _MSC_VER
+
+]])
+
+
+dnl Tests for new features in C++20
+
+m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_20], [[
+
+#ifndef __cplusplus
+
+#error "This is not a C++ compiler"
+
+#elif __cplusplus < 202002L && !defined _MSC_VER
+
+#error "This is not a C++20 compiler"
+
+#else
+
+#include <version>
+
+namespace cxx20
+{
+
+// As C++20 supports feature test macros in the standard, there is no
+// immediate need to actually test for feature availability on the
+// Autoconf side.
+
+} // namespace cxx20
+
+#endif // __cplusplus < 202002L && !defined _MSC_VER
]])
diff --git a/m4/ax_pthread.m4 b/m4/ax_pthread.m4
index 1598d07..9f35d13 100644
--- a/m4/ax_pthread.m4
+++ b/m4/ax_pthread.m4
@@ -14,20 +14,24 @@
# flags that are needed. (The user can also force certain compiler
# flags/libs to be tested by setting these environment variables.)
#
-# Also sets PTHREAD_CC to any special C compiler that is needed for
-# multi-threaded programs (defaults to the value of CC otherwise). (This
-# is necessary on AIX to use the special cc_r compiler alias.)
+# Also sets PTHREAD_CC and PTHREAD_CXX to any special C compiler that is
+# needed for multi-threaded programs (defaults to the value of CC
+# respectively CXX otherwise). (This is necessary on e.g. AIX to use the
+# special cc_r/CC_r compiler alias.)
#
# NOTE: You are assumed to not only compile your program with these flags,
# but also to link with them as well. For example, you might link with
# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
+# $PTHREAD_CXX $CXXFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
#
# If you are only building threaded programs, you may wish to use these
# variables in your default LIBS, CFLAGS, and CC:
#
# LIBS="$PTHREAD_LIBS $LIBS"
# CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+# CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS"
# CC="$PTHREAD_CC"
+# CXX="$PTHREAD_CXX"
#
# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
# has a nonstandard name, this macro defines PTHREAD_CREATE_JOINABLE to
@@ -83,7 +87,7 @@
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
-#serial 27
+#serial 31
AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
AC_DEFUN([AX_PTHREAD], [
@@ -105,6 +109,7 @@ if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
ax_pthread_save_CFLAGS="$CFLAGS"
ax_pthread_save_LIBS="$LIBS"
AS_IF([test "x$PTHREAD_CC" != "x"], [CC="$PTHREAD_CC"])
+ AS_IF([test "x$PTHREAD_CXX" != "x"], [CXX="$PTHREAD_CXX"])
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
LIBS="$PTHREAD_LIBS $LIBS"
AC_MSG_CHECKING([for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS])
@@ -386,7 +391,7 @@ if test "x$ax_pthread_clang" = "xyes"; then
# step
ax_pthread_save_ac_link="$ac_link"
ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
- ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
+ ax_pthread_link_step=`AS_ECHO(["$ac_link"]) | sed "$ax_pthread_sed"`
ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
ax_pthread_save_CFLAGS="$CFLAGS"
for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
@@ -482,18 +487,28 @@ if test "x$ax_pthread_ok" = "xyes"; then
[#handle absolute path differently from PATH based program lookup
AS_CASE(["x$CC"],
[x/*],
- [AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])],
- [AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])])
+ [
+ AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])
+ AS_IF([test "x${CXX}" != "x"], [AS_IF([AS_EXECUTABLE_P([${CXX}_r])],[PTHREAD_CXX="${CXX}_r"])])
+ ],
+ [
+ AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])
+ AS_IF([test "x${CXX}" != "x"], [AC_CHECK_PROGS([PTHREAD_CXX],[${CXX}_r],[$CXX])])
+ ]
+ )
+ ])
;;
esac
fi
fi
test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
+test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX"
AC_SUBST([PTHREAD_LIBS])
AC_SUBST([PTHREAD_CFLAGS])
AC_SUBST([PTHREAD_CC])
+AC_SUBST([PTHREAD_CXX])
# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
if test "x$ax_pthread_ok" = "xyes"; then
diff --git a/release/Makefile b/release/Makefile
index f141740..a7ea516 100644
--- a/release/Makefile
+++ b/release/Makefile
@@ -1,5 +1,5 @@
-VERSION=0.11.2
+VERSION=0.12.2
VERSION_TAG=v$(VERSION)
@@ -95,7 +95,7 @@ release: osx-package musl-package release-NEWS.md
push:
env LANG=UTF-8 package_cloud push tstack/lnav/ubuntu/lucid outbox/lnav*.deb
- env LANG=UTF-8 package_cloud push tstack/lnav/el/5 outbox/lnav-0.11.2-1.x86_64.rpm
+ env LANG=UTF-8 package_cloud push tstack/lnav/el/5 outbox/lnav-0.12.1-1.x86_64.rpm
clean:
cd vagrant-static && vagrant destroy -f
diff --git a/release/lnav.spec.in b/release/lnav.spec.in
index 3e4e299..f0af1c5 100644
--- a/release/lnav.spec.in
+++ b/release/lnav.spec.in
@@ -30,6 +30,7 @@ BuildRequires: gcc-toolset-12-annobin-plugin-gcc
BuildRequires: gcc-toolset-12-annobin-annocheck
BuildRequires: autoconf
BuildRequires: automake
+BuildRequires: cargo
BuildRequires: libarchive-devel
BuildRequires: libcurl-devel
BuildRequires: ncurses-devel
@@ -38,6 +39,7 @@ BuildRequires: openssh
BuildRequires: bzip2-devel
BuildRequires: pcre2-devel
BuildRequires: readline-devel
+BuildRequires: rust
BuildRequires: zlib-devel
%if 0%{?suse_version}
BuildRequires: sqlite3-devel >= 3.9.0
diff --git a/release/loggen.py b/release/loggen.py
index 5e0bbbb..556991c 100755
--- a/release/loggen.py
+++ b/release/loggen.py
@@ -131,7 +131,7 @@ TEST_AGENTS = [
"Roku4640X/DVP-7.70 (297.70E04154A)",
]
-START_TIME = datetime.datetime.fromtimestamp(1641898727)
+START_TIME = datetime.datetime.fromtimestamp(1692700000)
ACCESS_LOG_CURR_TIME = START_TIME
SYSLOG_LOG_CURR_TIME = START_TIME
@@ -139,7 +139,7 @@ SYSLOG_LOG_CURR_TIME = START_TIME
def access_log_msgs():
global ACCESS_LOG_CURR_TIME
while True:
- ACCESS_LOG_CURR_TIME += datetime.timedelta(seconds=random.randrange(1, 3))
+ ACCESS_LOG_CURR_TIME += datetime.timedelta(seconds=random.randrange(1, 5))
yield '%s - %s [%s +0000] "%s %s %s" %s %s "%s" "%s"\n' % (
random.choice(TEST_ADDRESSES),
random.choice(TEST_USERNAMES),
@@ -181,7 +181,7 @@ TEST_MSGS = [
def syslog_msgs():
global SYSLOG_LOG_CURR_TIME
while True:
- SYSLOG_LOG_CURR_TIME += datetime.timedelta(seconds=random.randrange(1, 3))
+ SYSLOG_LOG_CURR_TIME += datetime.timedelta(seconds=random.randrange(1, 5))
yield '%s frontend3 %s: %s\n' % (
SYSLOG_LOG_CURR_TIME.strftime(SYSLOG_DATE_FMT),
random.choice(TEST_PROCS),
diff --git a/snapcraft.yaml b/snapcraft.yaml
index 109b541..6756b6d 100644
--- a/snapcraft.yaml
+++ b/snapcraft.yaml
@@ -66,6 +66,7 @@ parts:
"$SNAPCRAFT_STAGE"/scriptlets/selective-checkout --debug --force-snapshot
build-packages:
- build-essential
+ - cargo
- libarchive-dev
- libcurl4-gnutls-dev
- libpcre2-dev
@@ -75,6 +76,7 @@ parts:
- zlib1g-dev
- libbz2-dev
- libgpm-dev
+ - rustc
stage-packages:
- zlib1g
- git-core
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 58cfd7b..4600fe8 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -29,19 +29,35 @@ add_executable(ptimec ptimec.hh ptimec.c)
set(TIME_FORMATS
"@%@"
- "%Y-%m-%d %H:%M:%S"
+ "%Y-%m-%d %H:%M:%S.%f%z"
+ "%Y-%m-%d %H:%M:%S,%f%z"
+ "%Y-%m-%d %H:%M:%S.%f %Z"
+ "%Y-%m-%d %H:%M:%S,%f %Z"
+ "%Y-%m-%d %H:%M:%S,%L%z"
+ "%Y-%m-%d %H:%M:%S,%L %z"
+ "%Y-%m-%d %H:%M:%S.%L%z"
+ "%Y-%m-%d %H:%M:%S.%L %z"
+ "%Y-%m-%d %H:%M:%S.%L %Z"
+ "%Y-%m-%d %H:%M:%S,%L"
+ "%Y-%m-%d %H:%M:%S.%L"
"%Y-%m-%d %H:%M:%S%z"
"%Y-%m-%d %H:%M:%S %z"
+ "%Y-%m-%d %H:%M:%S:%L"
+ "%Y-%m-%d %H:%M:%S"
"%Y-%m-%d %H:%M"
"%Y-%m-%dT%H:%M:%S.%f%z"
"%y-%m-%dT%H:%M:%S.%f%z"
- "%Y-%m-%dT%H:%M:%SZ"
+ "%Y-%m-%dT%H:%M:%S.%L%z"
+ "%y-%m-%dT%H:%M:%S.%L%z"
"%Y-%m-%dT%H:%M:%S%z"
"%Y-%m-%dT%H:%M:%S"
"%Y-%m-%dT%H:%M:%S%z"
- "%Y/%m/%d %H:%M:%S"
+ "%Y-%m-%dT%H:%M"
"%Y/%m/%d %H:%M:%S %z"
"%Y/%m/%d %H:%M:%S%z"
+ "%Y/%m/%d %H:%M:%S.%f"
+ "%Y/%m/%d %H:%M:%S.%L"
+ "%Y/%m/%d %H:%M:%S"
"%Y/%m/%d %H:%M"
"%Y %b %d %a %H:%M:%S.%L"
"%Y %b %d %H:%M:%S.%L"
@@ -49,28 +65,38 @@ set(TIME_FORMATS
"%a %b %d %H:%M:%S %Y"
"%a %b %d %H:%M:%S.%f %Y"
"%a %b %d %H:%M:%S %Z %Y"
+ "%a %b %d %I:%M:%S %p %Z %Y"
"%a %b %d %H:%M:%S "
"%a %b %d %H:%M:%S.%L "
"%a %b %d %H:%M "
"%a %b %e %H:%M:%S %Z %Y"
- "%d/%b/%Y:%H:%M:%S +0000"
"%d/%b/%Y:%H:%M:%S %z"
"%d-%b-%Y %H:%M:%S %z"
"%d-%b-%Y %H:%M:%S %Z"
"%d %b %Y %H:%M:%S"
+ "%d %b %Y %H:%M:%S.%L%z"
+ "%d %b %Y %H:%M:%S,%L%z"
"%d %b %Y %H:%M:%S.%L"
"%d %b %Y %H:%M:%S,%L"
+ "%d %b %Y %H:%M"
"%b %d %H:%M:%S"
"%b %d %k:%M:%S"
"%b %d %l:%M:%S"
+ "%b %d %l:%M"
"%b %e, %Y %l:%M:%S %p"
- "%m/%d/%y %H:%M:%S"
+ "%b %d, %Y %l:%M:%S %p"
"%m/%d/%Y %I:%M:%S:%L %p %Z"
"%m/%d/%Y %I:%M:%S %p %Z"
"%m/%d/%Y %l:%M:%S %p %Z"
+ "%m/%d/%Y %I:%M:%S %p%z"
+ "%m/%d/%Y %l:%M:%S %p%z"
+ "%m/%e/%Y %l:%M:%S %p%z"
+ "%m/%e/%Y %l:%M:%S %p %z"
"%m/%e/%Y %I:%M:%S %p"
- "%m/%e/%Y %l:%M:%S %p"
+ "%m/%e/%Y %l:%M:%S%p"
+ "%m/%d/%y %H:%M:%S"
"%m/%d/%Y %H:%M:%S"
+ "%d/%b/%Y %H:%M:%S"
"%d/%b/%y %H:%M:%S"
"%m%d %H:%M:%S"
"%Y%m%d %H:%M:%S"
@@ -83,7 +109,8 @@ set(TIME_FORMATS
"%Y-%m"
"%Y/%m/%d"
"%Y/%m"
- "%s.%f")
+ "%s.%f"
+)
set(GEN_SRCS "")
@@ -91,7 +118,7 @@ add_custom_command(OUTPUT time_fmts.cc COMMAND ptimec ${TIME_FORMATS} >
time_fmts.cc)
add_library(lnavdt STATIC config.h.in ptimec.hh ptimec_rt.cc time_fmts.cc)
-target_include_directories(lnavdt PUBLIC . ${CMAKE_CURRENT_BINARY_DIR})
+target_include_directories(lnavdt PUBLIC . ${CMAKE_CURRENT_BINARY_DIR} third-party/date/include)
function(bin2c)
cmake_parse_arguments(BIN2C_ "" "VARNAME" "" ${ARGN})
@@ -103,7 +130,7 @@ function(bin2c)
DEPENDS bin2c "${FILE_TO_LINK}")
endfunction(bin2c)
-foreach (FILE_TO_LINK animals.json ansi-palette.json diseases.json emojis.json xml-entities.json xterm-palette.json help.txt help.md init.sql words.json)
+foreach (FILE_TO_LINK animals.json ansi-palette.json css-color-names.json diseases.json emojis.json xml-entities.json xterm-palette.json help.txt help.md init.sql words.json)
string(REPLACE "." "-" DST_FILE "${FILE_TO_LINK}")
add_custom_command(
OUTPUT "${DST_FILE}.h" "${DST_FILE}.cc"
@@ -164,6 +191,20 @@ add_custom_command(
DEPENDS bin2c ${FORMAT_FILES})
list(APPEND GEN_SRCS default-formats.h default-formats.cc)
+set(PRQL_FILES
+ prql/stats.prql
+ prql/utils.prql)
+
+set(PRQL_FILE_PATHS ${PRQL_FILES})
+
+list(TRANSFORM PRQL_FILE_PATHS PREPEND "${CMAKE_CURRENT_SOURCE_DIR}/")
+
+add_custom_command(
+ OUTPUT prql-modules.h prql-modules.cc
+ COMMAND bin2c -n lnav_prql_modules prql-modules ${PRQL_FILE_PATHS}
+ DEPENDS bin2c ${PRQL_FILES})
+list(APPEND GEN_SRCS prql-modules.h prql-modules.cc)
+
set(CONFIG_FILES
root-config.json
keymaps/de-keymap.json
@@ -190,9 +231,15 @@ add_custom_command(
list(APPEND GEN_SRCS default-config.h default-config.cc)
set(BUILTIN_LNAV_SCRIPTS
- scripts/dhclient-summary.lnav scripts/lnav-pop-view.lnav
- scripts/partition-by-boot.lnav scripts/rename-stdin.lnav
- scripts/search-for.lnav)
+ scripts/dhclient-summary.lnav
+ scripts/docker-url-handler.lnav
+ scripts/journald-url-handler.lnav
+ scripts/lnav-pop-view.lnav
+ scripts/partition-by-boot.lnav
+ scripts/piper-url-handler.lnav
+ scripts/rename-stdin.lnav
+ scripts/search-for.lnav
+)
set(BUILTIN_LNAV_SCRIPT_PATHS ${BUILTIN_LNAV_SCRIPTS})
@@ -204,8 +251,7 @@ add_custom_command(
DEPENDS bin2c ${BUILTIN_LNAV_SCRIPTS})
list(APPEND GEN_SRCS builtin-scripts.h builtin-scripts.cc)
-set(BUILTIN_SH_SCRIPTS scripts/dhclient-summary.lnav scripts/lnav-pop-view.lnav
- scripts/partition-by-boot.lnav scripts/search-for.lnav)
+set(BUILTIN_SH_SCRIPTS scripts/com.vmware.btresolver.py scripts/dump-pid.sh scripts/pcap_log-converter.sh)
set(BUILTIN_SH_SCRIPT_PATHS ${BUILTIN_SH_SCRIPTS})
@@ -239,6 +285,13 @@ add_library(
target_include_directories(cppfmt PUBLIC fmtlib)
add_library(
+ datepp STATIC
+ third-party/date/src/tz.cpp
+)
+target_include_directories(datepp PUBLIC third-party/date/include)
+target_link_libraries(datepp ${lnav_LIBS})
+
+add_library(
cppscnlib STATIC
third-party/scnlib/src/reader_float.cpp
third-party/scnlib/src/reader_int.cpp
@@ -318,16 +371,21 @@ add_library(
add_library(lnavfileio STATIC
grep_proc.hh
line_buffer.hh
+ log_level.hh
+ piper.looper.cfg.hh
+ piper.looper.hh
pollable.hh
shared_buffer.hh
grep_proc.cc
line_buffer.cc
+ log_level.cc
+ piper.looper.cc
pollable.cc
shared_buffer.cc
- )
+)
target_include_directories(lnavfileio PRIVATE . ${CMAKE_CURRENT_BINARY_DIR})
-target_link_libraries(lnavfileio cppfmt spookyhash pcrepp base BZip2::BZip2 ZLIB::ZLIB)
+target_link_libraries(lnavfileio cppfmt spookyhash pcrepp base BZip2::BZip2 ZLIB::ZLIB yajlpp)
add_library(
diag STATIC
@@ -351,7 +409,9 @@ add_library(
extension-functions.cc
field_overlay_source.cc
file_collection.cc
+ file_converter_manager.cc
file_format.cc
+ file_options.cc
file_vtab.cc
files_sub_source.cc
filter_observer.cc
@@ -360,6 +420,7 @@ add_library(
fs-extension-functions.cc
fstat_vtab.cc
fts_fuzzy_match.cc
+ gantt_source.cc
help_text.cc
help_text_formatter.cc
highlighter.cc
@@ -374,6 +435,7 @@ add_library(
lnav_commands.cc
lnav_config.cc
lnav_util.cc
+ log.annotate.cc
log.watch.cc
log_accel.cc
log_actions.cc
@@ -381,7 +443,6 @@ add_library(
log_data_table.cc
log_format.cc
log_format_loader.cc
- log_level.cc
log_search_table.cc
logfile.cc
logfile_sub_source.cc
@@ -391,7 +452,7 @@ add_library(
data_scanner.cc
data_scanner_re.cc
data_parser.cc
- pcap_manager.cc
+ file_converter_manager.cc
plain_text_source.cc
pretty_printer.cc
pugixml/pugixml.cpp
@@ -412,7 +473,6 @@ add_library(
statusview_curses.cc
string-extension-functions.cc
sysclip.cc
- piper_proc.cc
spectro_impls.cc
spectro_source.cc
sql_commands.cc
@@ -422,6 +482,7 @@ add_library(
styling.cc
text_anonymizer.cc
text_format.cc
+ text_overlay_menu.cc
textfile_highlighters.cc
textfile_sub_source.cc
textview_curses.cc
@@ -449,6 +510,8 @@ add_library(
archive_manager.cfg.hh
document.sections.hh
big_array.hh
+ bookmarks.hh
+ bookmarks.json.hh
bottom_status_source.hh
bound_tags.hh
breadcrumb.hh
@@ -462,14 +525,19 @@ add_library(
elem_to_json.hh
field_overlay_source.hh
file_collection.hh
+ file_converter_manager.hh
file_format.hh
+ file_options.hh
files_sub_source.hh
filter_observer.hh
filter_status_source.hh
filter_sub_source.hh
fstat_vtab.hh
fts_fuzzy_match.hh
+ gantt_source.hh
+ gantt_status_source.hh
grep_highlighter.hh
+ hasher.hh
help_text.hh
help_text_formatter.hh
highlighter.hh
@@ -483,6 +551,8 @@ add_library(
lnav_config.hh
lnav_config_fwd.hh
lnav_util.hh
+ log.annotate.hh
+ log.annotate.cfg.hh
log.watch.hh
log_actions.hh
log_data_helper.hh
@@ -492,7 +562,6 @@ add_library(
log_format_fwd.hh
log_format_impls.cc
log_gutter_source.hh
- log_level.hh
log_search_table.hh
log_search_table_fwd.hh
logfile_sub_source.cfg.hh
@@ -502,7 +571,7 @@ add_library(
md2attr_line.hh
md4cpp.hh
optional.hpp
- pcap_manager.hh
+ file_converter_manager.hh
plain_text_source.hh
pretty_printer.hh
preview_status_source.hh
@@ -529,6 +598,7 @@ add_library(
spectro_impls.hh
spectro_source.hh
sqlitepp.hh
+ sql_execute.hh
sql_help.hh
sql_util.hh
static_file_vtab.hh
@@ -539,6 +609,7 @@ add_library(
termios_guard.hh
text_anonymizer.hh
text_format.hh
+ text_overlay_menu.hh
textfile_highlighters.hh
textfile_sub_source.hh
textview_curses.hh
@@ -546,6 +617,7 @@ add_library(
time_T.hh
timer.hh
top_status_source.hh
+ url_handler.cfg.hh
url_loader.hh
view_helpers.hh
view_helpers.crumbs.hh
@@ -589,11 +661,25 @@ add_library(
third-party/CLI/TypeTools.hpp
third-party/CLI/ConfigFwd.hpp
+ third-party/date/include/date/tz_private.h
+ third-party/date/include/date/ios.h
+ third-party/date/include/date/ptz.h
+ third-party/date/include/date/solar_hijri.h
+ third-party/date/include/date/date.h
+ third-party/date/include/date/julian.h
+ third-party/date/include/date/chrono_io.h
+ third-party/date/include/date/iso_week.h
+ third-party/date/include/date/tz.h
+ third-party/date/include/date/islamic.h
+
third-party/intervaltree/IntervalTree.h
third-party/md4c/md4c.h
third-party/robin_hood/robin_hood.h
+
+ third-party/prqlc-c/prqlc.cxx.hh
+ third-party/prqlc-c/prqlc.cxx.cc
)
set(lnav_SRCS lnav.cc)
@@ -601,12 +687,15 @@ set(lnav_SRCS lnav.cc)
target_include_directories(diag PUBLIC . fmtlib ${CMAKE_CURRENT_BINARY_DIR}
third-party
third-party/base64/include
+ third-party/date/include
+ third-party/prqlc-c
third-party/rapidyaml
- )
+)
target_link_libraries(
diag
base
+ datepp
lnavdt
lnavfileio
pcrepp
@@ -618,7 +707,8 @@ target_link_libraries(
cppfmt
base64
spookyhash
- ${lnav_LIBS})
+ ${lnav_LIBS}
+)
target_compile_definitions(diag PRIVATE SQLITE_OMIT_LOAD_EXTENSION)
check_library_exists(util openpty "" HAVE_LIBUTIL)
diff --git a/src/Makefile.am b/src/Makefile.am
index 24eaaf1..31fd6b5 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -6,6 +6,7 @@ CXXFLAGS =
SUBDIRS = \
fmtlib \
third-party/base64/lib \
+ third-party/date/src \
third-party/scnlib/src \
pcrepp \
base \
@@ -42,6 +43,7 @@ default-formats.cc: $(BIN2C_PATH) $(FORMAT_FILES)
$(BIN2C_V)$(BIN2C_PATH) -n lnav_format_json default-formats $(FORMAT_FILES)
include keymaps/keymaps.am
+include prql/prql.am
include themes/themes.am
CONFIG_FILES = \
@@ -53,6 +55,9 @@ CONFIG_FILES = \
default-config.cc: $(BIN2C_PATH) $(CONFIG_FILES)
$(BIN2C_V)$(BIN2C_PATH) -n lnav_config_json default-config $(CONFIG_FILES)
+prql-modules.cc: $(BIN2C_PATH) $(PRQL_FILES)
+ $(BIN2C_V)$(BIN2C_PATH) -n lnav_prql_modules prql-modules $(PRQL_FILES)
+
include scripts/scripts.am
builtin-scripts.cc: $(BIN2C_PATH) $(BUILTIN_LNAVSCRIPTS)
@@ -73,6 +78,9 @@ builtin-sh-scripts.cc: $(BIN2C_PATH) $(BUILTIN_SHSCRIPTS)
%-sql.cc: $(srcdir)/%.sql $(BIN2C_PATH)
$(BIN2C_V)$(BIN2C_PATH) $(*)-sql $<
+%-prql.cc: $(srcdir)/%.prql $(BIN2C_PATH)
+ $(BIN2C_V)$(BIN2C_PATH) $(*)-prql $<
+
%-lnav.cc: $(srcdir)/%.lnav $(BIN2C_PATH)
$(BIN2C_V)$(BIN2C_PATH) $(*)-lnav $<
@@ -86,7 +94,7 @@ time_fmts.cc: ptimec$(BUILD_EXEEXT)
if HAVE_RE2C
%.cc: %.re
- $(RE2C_V)$(RE2C_CMD) --bit-vectors -W --tags -8 -o $@ $<
+ $(RE2C_V)$(RE2C_CMD) --bit-vectors -W -8 -c -o $@ $<
$(REC2_V)test $@ -ef $(srcdir)/$*.cc || cp $@ $(srcdir)/$*.cc
endif
@@ -95,6 +103,7 @@ LNAV_BUILT_FILES = \
ansi-palette-json.cc \
builtin-scripts.cc \
builtin-sh-scripts.cc \
+ css-color-names-json.cc \
default-config.cc \
default-formats.cc \
diseases-json.cc \
@@ -102,6 +111,7 @@ LNAV_BUILT_FILES = \
words-json.cc \
help-md.cc \
init-sql.cc \
+ prql-modules.cc \
time_fmts.cc \
xml-entities-json.cc \
xterm-palette-json.cc
@@ -112,6 +122,22 @@ AM_LIBS = $(CODE_COVERAGE_LIBS)
AM_CFLAGS = $(CODE_COVERAGE_CFLAGS)
AM_CXXFLAGS = $(CODE_COVERAGE_CXXFLAGS) $(USER_CXXFLAGS)
+if HAVE_CARGO
+RUST_DEPS_CPPFLAGS = -DHAVE_RUST_DEPS=1
+PRQLC_DIR = third-party/prqlc-c/target
+RUST_DEPS_LIBS = $(PRQLC_DIR)/release/libprqlc_c.a
+
+$(RUST_DEPS_LIBS): $(srcdir)/third-party/prqlc-c/src/lib.rs $(srcdir)/third-party/prqlc-c/Cargo.toml
+ mkdir -p $(PRQLC_DIR)
+ env CARGO_TARGET_DIR=third-party/prqlc-c/target $(CARGO_CMD) build --manifest-path \
+ $(srcdir)/third-party/prqlc-c/Cargo.toml --package prqlc-c --release
+
+else
+RUST_DEPS =
+RUST_DEPS_CPPFLAGS =
+RUST_DEPS_LIBS =
+endif
+
AM_LDFLAGS = \
$(STATIC_LDFLAGS) \
$(LIBARCHIVE_LDFLAGS) \
@@ -125,6 +151,8 @@ AM_CPPFLAGS = \
-I$(srcdir)/fmtlib \
-I$(srcdir)/third-party \
-I$(srcdir)/third-party/base64/include \
+ -I$(srcdir)/third-party/date/include \
+ -I$(srcdir)/third-party/prqlc-c \
-I$(srcdir)/third-party/rapidyaml \
-I$(top_srcdir)/src/third-party/scnlib/include \
-Wall \
@@ -133,7 +161,8 @@ AM_CPPFLAGS = \
$(READLINE_CFLAGS) \
$(SQLITE3_CFLAGS) \
$(PCRE_CFLAGS) \
- $(LIBCURL_CPPFLAGS)
+ $(LIBCURL_CPPFLAGS) \
+ $(RUST_DEPS_CPPFLAGS)
LDADD = \
libdiag.a \
@@ -141,6 +170,7 @@ LDADD = \
base/libbase.a \
formats/logfmt/liblogfmt.a \
fmtlib/libcppfmt.a \
+ third-party/date/src/libdatepp.a \
third-party/scnlib/src/libscnlib.a \
pcrepp/libpcrepp.a \
pugixml/libpugixml.a \
@@ -150,6 +180,7 @@ LDADD = \
yajl/libyajl.a \
yajlpp/libyajlpp.a \
third-party/base64/lib/libbase64.a \
+ $(RUST_DEPS_LIBS) \
$(READLINE_LIBS) \
$(CURSES_LIB) \
$(SQLITE3_LIBS) \
@@ -158,23 +189,29 @@ LDADD = \
# emojis.json is from https://gist.github.com/oliveratgithub/0bf11a9aff0d6da7b46f1490f86a71eb/
# xml-entities.json is from https://html.spec.whatwg.org/entities.json
+# css-color-names.json is from https://github.com/bahamas10/css-color-names/blob/master/css-color-names.json
dist_noinst_DATA = \
alpha-release.sh \
animals.json \
ansi-palette.json \
+ css-color-names.json \
diseases.json \
emojis.json \
$(BUILTIN_LNAVSCRIPTS) \
$(BUILTIN_SHSCRIPTS) \
$(CONFIG_FILES) \
$(FORMAT_FILES) \
+ $(PRQL_FILES) \
words.json \
xml-entities.json \
xterm-palette.json
noinst_HEADERS = \
third-party/md4c/md4c.h \
+ third-party/prqlc-c/prqlc.h \
+ third-party/prqlc-c/prqlc.hpp \
+ third-party/prqlc-c/prqlc.cxx.hh \
third-party/rapidyaml/ryml_all.hpp \
all_logs_vtab.hh \
archive_manager.hh \
@@ -182,6 +219,7 @@ noinst_HEADERS = \
big_array.hh \
bin2c.hh \
bookmarks.hh \
+ bookmarks.json.hh \
bottom_status_source.hh \
bound_tags.hh \
breadcrumb.hh \
@@ -201,7 +239,9 @@ noinst_HEADERS = \
environ_vtab.hh \
field_overlay_source.hh \
file_collection.hh \
+ file_converter_manager.hh \
file_format.hh \
+ file_options.hh \
file_vtab.cfg.hh \
files_sub_source.hh \
filter_observer.hh \
@@ -209,8 +249,11 @@ noinst_HEADERS = \
filter_sub_source.hh \
fstat_vtab.hh \
fts_fuzzy_match.hh \
+ gantt_source.hh \
+ gantt_status_source.hh \
grep_highlighter.hh \
grep_proc.hh \
+ hasher.hh \
help.md \
help.txt \
help_text.hh \
@@ -232,6 +275,8 @@ noinst_HEADERS = \
lnav_config.hh \
lnav_config_fwd.hh \
lnav_util.hh \
+ log.annotate.hh \
+ log.annotate.cfg.hh \
log.watch.hh \
log_accel.hh \
log_actions.hh \
@@ -258,8 +303,8 @@ noinst_HEADERS = \
md2attr_line.hh \
md4cpp.hh \
optional.hpp \
- pcap_manager.hh \
- piper_proc.hh \
+ piper.looper.hh \
+ piper.looper.cfg.hh \
plain_text_source.hh \
pollable.hh \
pretty_printer.hh \
@@ -290,6 +335,7 @@ noinst_HEADERS = \
spectro_source.hh \
sqlitepp.hh \
sqlitepp.client.hh \
+ sql_execute.hh \
sql_help.hh \
sql_util.hh \
sqlite-extension-func.hh \
@@ -303,6 +349,7 @@ noinst_HEADERS = \
term_extra.hh \
text_anonymizer.hh \
text_format.hh \
+ text_overlay_menu.hh \
textfile_highlighters.hh \
textfile_sub_source.hh \
textview_curses.hh \
@@ -312,6 +359,7 @@ noinst_HEADERS = \
top_status_source.hh \
top_status_source.cfg.hh \
unique_path.hh \
+ url_handler.cfg.hh \
url_loader.hh \
view_curses.hh \
view_helpers.hh \
@@ -363,6 +411,7 @@ THIRD_PARTY_SRCS = \
third-party/doctest-root/doctest/doctest.h \
third-party/intervaltree/IntervalTree.h \
third-party/md4c/md4c.c \
+ third-party/prqlc-c/prqlc.cxx.cc \
third-party/robin_hood/robin_hood.h \
third-party/sqlite/ext/dbdump.c \
third-party/sqlite/ext/series.c
@@ -390,7 +439,9 @@ libdiag_a_SOURCES = \
extension-functions.cc \
field_overlay_source.cc \
file_collection.cc \
+ file_converter_manager.cc \
file_format.cc \
+ file_options.cc \
files_sub_source.cc \
filter_observer.cc \
filter_status_source.cc \
@@ -398,6 +449,7 @@ libdiag_a_SOURCES = \
fstat_vtab.cc \
fs-extension-functions.cc \
fts_fuzzy_match.cc \
+ gantt_source.cc \
grep_proc.cc \
help_text.cc \
help_text_formatter.cc \
@@ -411,6 +463,7 @@ libdiag_a_SOURCES = \
lnav_commands.cc \
lnav_config.cc \
lnav_util.cc \
+ log.annotate.cc \
log.watch.cc \
log_accel.cc \
log_actions.cc \
@@ -427,7 +480,7 @@ libdiag_a_SOURCES = \
md4cpp.cc \
network-extension-functions.cc \
data_parser.cc \
- pcap_manager.cc \
+ piper.looper.cc \
plain_text_source.cc \
pollable.cc \
pretty_printer.cc \
@@ -454,9 +507,9 @@ libdiag_a_SOURCES = \
styling.cc \
text_anonymizer.cc \
text_format.cc \
+ text_overlay_menu.cc \
textfile_sub_source.cc \
timer.cc \
- piper_proc.cc \
sql_commands.cc \
sql_util.cc \
state-extension-functions.cc \
@@ -496,14 +549,23 @@ lnav_test_SOURCES = \
test_override.c \
$(PLUGIN_SRCS)
+if CROSS_COMPILING
ptimec$(BUILD_EXEEXT): ptimec.c
- $(AM_V_CC) $(CC_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -g3 -o $@ $?
+ $(AM_V_CC) $(CC_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -g3 -o $@ $? -fPIE
+else
+ptimec$(BUILD_EXEEXT): ptimec.c
+ $(AM_V_CC) $(CC) $(CPPFLAGS) $(LDFLAGS) -g3 -o $@ $? -fPIE
+endif
if HAVE_RE2C
RE2C_FILES = data_scanner_re.cc log_level_re.cc
endif
EXTRA_DIST = \
+ third-party/prqlc-c/Cargo.lock \
+ third-party/prqlc-c/Cargo.toml \
+ third-party/prqlc-c/cbindgen.toml \
+ third-party/prqlc-c/src/lib.rs \
ptimec.c
CLEANFILES = \
@@ -515,6 +577,7 @@ DISTCLEANFILES = \
ansi-palette-json.h \
builtin-scripts.h \
builtin-sh-scripts.h \
+ css-color-names-json.h \
default-config.h \
default-formats.h \
diseases-json.h \
@@ -522,11 +585,18 @@ DISTCLEANFILES = \
words-json.h \
help-md.h \
init-sql.h \
+ prql-modules.h \
time_fmts.h \
xml-entities-json.h \
xterm-palette-json.h \
$(RE2C_FILES)
+if HAVE_CARGO
+clean-local:
+ env CARGO_TARGET_DIR=third-party/prqlc-c/target $(CARGO_CMD) clean --manifest-path \
+ $(srcdir)/third-party/prqlc-c/Cargo.toml
+endif
+
distclean-local:
$(RM_V)rm -rf *.dSYM
@@ -534,14 +604,20 @@ uncrusty:
(cd $(srcdir) && uncrustify -c ../lnav.cfg --replace $(SOURCES) \
$(HEADERS))
-if !DISABLE_DOCUMENTATION
-all-local: $(LNAV_BUILT_FILES) lnav
+if !CROSS_COMPILING
+all-local: $(LNAV_BUILT_FILES) lnav $(RUST_DEPS)
if test -w $(srcdir)/internals; then \
env DUMP_INTERNALS_DIR=$(srcdir)/internals DUMP_CRASH=1 ./lnav Makefile; \
mv $(srcdir)/internals/*.schema.json $(top_srcdir)/docs/schemas; \
fi
else
-all-local: $(LNAV_BUILT_FILES)
+all-local: $(LNAV_BUILT_FILES) $(RUST_DEPS)
+endif
+
+check-local:
+if HAVE_CHECK_JSONSCHEMA
+ $(CHECK_JSONSCHEMA) --schemafile $(top_srcdir)/docs/schemas/format-v1.schema.json $(FORMAT_FILES)
+ $(CHECK_JSONSCHEMA) --schemafile $(top_srcdir)/docs/schemas/config-v1.schema.json $(CONFIG_FILES)
endif
install-exec-hook:
diff --git a/src/all_logs_vtab.cc b/src/all_logs_vtab.cc
index f4468a6..69acf49 100644
--- a/src/all_logs_vtab.cc
+++ b/src/all_logs_vtab.cc
@@ -31,15 +31,22 @@
#include "base/attr_line.hh"
#include "config.h"
+#include "data_parser.hh"
+#include "elem_to_json.hh"
static auto intern_lifetime = intern_string::get_table_lifetime();
all_logs_vtab::all_logs_vtab()
: log_vtab_impl(intern_string::lookup("all_logs")),
- alv_msg_meta(
- intern_string::lookup("log_msg_format"), value_kind_t::VALUE_TEXT, 0),
- alv_schema_meta(
- intern_string::lookup("log_msg_schema"), value_kind_t::VALUE_TEXT, 1)
+ alv_msg_meta(intern_string::lookup("log_msg_format"),
+ value_kind_t::VALUE_TEXT,
+ logline_value_meta::table_column{0}),
+ alv_schema_meta(intern_string::lookup("log_msg_schema"),
+ value_kind_t::VALUE_TEXT,
+ logline_value_meta::table_column{1}),
+ alv_values_meta(intern_string::lookup("log_msg_values"),
+ value_kind_t::VALUE_JSON,
+ logline_value_meta::table_column{2})
{
this->alv_msg_meta.lvm_identifier = true;
this->alv_schema_meta.lvm_identifier = true;
@@ -57,6 +64,11 @@ all_logs_vtab::get_columns(std::vector<vtab_column>& cols) const
"",
true,
"The ID for the message schema");
+ cols.emplace_back(this->alv_values_meta.lvm_name.get(),
+ SQLITE3_TEXT,
+ "",
+ false,
+ "The values extracted from the message");
}
void
@@ -70,7 +82,7 @@ all_logs_vtab::extract(logfile* lf,
logline_value_vector sub_values;
this->vi_attrs.clear();
- sub_values.lvv_sbr = line;
+ sub_values.lvv_sbr = line.clone();
format->annotate(line_number, this->vi_attrs, sub_values, false);
auto body = find_string_attr_range(this->vi_attrs, &SA_BODY);
@@ -87,9 +99,18 @@ all_logs_vtab::extract(logfile* lf,
dp.dp_msg_format = &str;
dp.parse();
+ yajlpp_gen gen;
+ yajl_gen_config(gen, yajl_gen_beautify, false);
+
+ elements_to_json(gen, dp, &dp.dp_pairs);
+
values.lvv_values.emplace_back(this->alv_msg_meta, std::move(str));
values.lvv_values.emplace_back(this->alv_schema_meta,
dp.dp_schema_id.to_string());
+ values.lvv_values.emplace_back(
+ this->alv_values_meta,
+ json_string(gen).to_string_fragment().to_string());
+ values.lvv_opid_value = std::move(sub_values.lvv_opid_value);
}
bool
diff --git a/src/all_logs_vtab.hh b/src/all_logs_vtab.hh
index cab0a4d..971ab25 100644
--- a/src/all_logs_vtab.hh
+++ b/src/all_logs_vtab.hh
@@ -32,7 +32,6 @@
#include <array>
-#include "data_parser.hh"
#include "log_vtab_impl.hh"
/**
@@ -55,6 +54,7 @@ public:
private:
logline_value_meta alv_msg_meta;
logline_value_meta alv_schema_meta;
+ logline_value_meta alv_values_meta;
};
#endif // LNAV_ALL_LOGS_VTAB_HH
diff --git a/src/archive_manager.cc b/src/archive_manager.cc
index 705842e..0f33cba 100644
--- a/src/archive_manager.cc
+++ b/src/archive_manager.cc
@@ -29,6 +29,8 @@
* @file archive_manager.cc
*/
+#include <future>
+
#include <unistd.h>
#include "config.h"
@@ -48,7 +50,7 @@
#include "base/lnav_log.hh"
#include "base/paths.hh"
#include "fmt/format.h"
-#include "lnav_util.hh"
+#include "hasher.hh"
namespace fs = ghc::filesystem;
@@ -72,10 +74,13 @@ enable_desired_archive_formats(archive* arc)
}
#endif
-bool
-is_archive(const fs::path& filename)
+Result<describe_result, std::string>
+describe(const fs::path& filename)
{
#if HAVE_ARCHIVE_H
+ static const auto RAW_FORMAT_NAME = string_fragment::from_const("raw");
+ static const auto GZ_FILTER_NAME = string_fragment::from_const("gzip");
+
auto_mem<archive> arc(archive_read_free);
arc = archive_read_new();
@@ -94,39 +99,56 @@ is_archive(const fs::path& filename)
if (archive_read_next_header(arc, &entry) == ARCHIVE_OK) {
log_debug("read next done %s", filename.c_str());
- static const auto RAW_FORMAT_NAME = string_fragment("raw");
- static const auto GZ_FILTER_NAME = string_fragment("gzip");
-
format_name = archive_format_name(arc);
-
if (RAW_FORMAT_NAME == format_name) {
auto filter_count = archive_filter_count(arc);
if (filter_count == 1) {
- return false;
+ return Ok(describe_result{unknown_file{}});
}
const auto* first_filter_name = archive_filter_name(arc, 0);
if (filter_count == 2 && GZ_FILTER_NAME == first_filter_name) {
- return false;
+ return Ok(describe_result{unknown_file{}});
}
}
log_info(
"detected archive: %s -- %s", filename.c_str(), format_name);
- return true;
+ auto ai = archive_info{
+ format_name,
+ };
+
+ do {
+ ai.ai_entries.emplace_back(archive_info::entry{
+ archive_entry_pathname_utf8(entry),
+ archive_entry_strmode(entry),
+ archive_entry_mtime(entry),
+ archive_entry_size_is_set(entry)
+ ? nonstd::make_optional(archive_entry_size(entry))
+ : nonstd::nullopt,
+ });
+ } while (archive_read_next_header(arc, &entry) == ARCHIVE_OK);
+
+ return Ok(describe_result{ai});
}
- log_info("archive read header failed: %s -- %s",
- filename.c_str(),
- archive_error_string(arc));
+ const auto* errstr = archive_error_string(arc);
+ log_info(
+ "archive read header failed: %s -- %s", filename.c_str(), errstr);
+ return Err(
+ fmt::format(FMT_STRING("unable to read archive header: {} -- {}"),
+ filename,
+ errstr ? errstr : "not an archive"));
} else {
- log_info("archive open failed: %s -- %s",
- filename.c_str(),
- archive_error_string(arc));
+ const auto* errstr = archive_error_string(arc);
+ log_info("archive open failed: %s -- %s", filename.c_str(), errstr);
+ return Err(fmt::format(FMT_STRING("unable to open file: {} -- {}"),
+ filename,
+ errstr ? errstr : "unknown"));
}
#endif
- return false;
+ return Ok(describe_result{unknown_file{}});
}
static fs::path
@@ -143,7 +165,7 @@ filename_to_tmp_path(const std::string& filename)
hasher h;
h.update(basename);
- auto fd = auto_fd(lnav::filesystem::openp(filename, O_RDONLY));
+ auto fd = auto_fd(lnav::filesystem::openp(filename, O_RDONLY | O_CLOEXEC));
if (fd != -1) {
char buffer[1024];
int rc;
@@ -226,9 +248,10 @@ extract(const std::string& filename, const extract_cb& cb)
fs::create_directories(tmp_path.parent_path(), ec);
if (ec) {
- return Err(fmt::format("unable to create directory: {} -- {}",
- tmp_path.parent_path().string(),
- ec.message()));
+ return Err(
+ fmt::format(FMT_STRING("unable to create directory: {} -- {}"),
+ tmp_path.parent_path().string(),
+ ec.message()));
}
auto arc_lock = lnav::filesystem::file_lock(tmp_path);
@@ -352,13 +375,19 @@ walk_archive_files(
return result;
}
- for (const auto& entry : fs::recursive_directory_iterator(tmp_path)) {
+ std::error_code ec;
+ for (const auto& entry : fs::recursive_directory_iterator(tmp_path, ec)) {
if (!entry.is_regular_file()) {
continue;
}
callback(tmp_path, entry);
}
+ if (ec) {
+ return Err(fmt::format(FMT_STRING("failed to walk temp dir: {} -- {}"),
+ tmp_path.string(),
+ ec.message()));
+ }
return Ok();
#else
diff --git a/src/archive_manager.hh b/src/archive_manager.hh
index 777ae87..7fab86f 100644
--- a/src/archive_manager.hh
+++ b/src/archive_manager.hh
@@ -37,8 +37,11 @@
#include <string>
#include <utility>
+#include "base/file_range.hh"
#include "base/result.h"
#include "ghc/filesystem.hpp"
+#include "mapbox/variant.hpp"
+#include "optional.hpp"
namespace archive_manager {
@@ -56,7 +59,22 @@ struct extract_progress {
using extract_cb
= std::function<extract_progress*(const ghc::filesystem::path&, ssize_t)>;
-bool is_archive(const ghc::filesystem::path& filename);
+struct archive_info {
+ struct entry {
+ ghc::filesystem::path e_name;
+ const char* e_mode;
+ time_t e_mtime;
+ nonstd::optional<file_ssize_t> e_size;
+ };
+ const char* ai_format_name;
+ std::vector<entry> ai_entries;
+};
+struct unknown_file {};
+
+using describe_result = mapbox::util::variant<archive_info, unknown_file>;
+
+Result<describe_result, std::string> describe(
+ const ghc::filesystem::path& filename);
ghc::filesystem::path filename_to_tmp_path(const std::string& filename);
diff --git a/src/base/CMakeLists.txt b/src/base/CMakeLists.txt
index aa4143f..2ff04c6 100644
--- a/src/base/CMakeLists.txt
+++ b/src/base/CMakeLists.txt
@@ -4,7 +4,9 @@ add_library(
ansi_scrubber.cc
attr_line.cc
attr_line.builder.cc
+ auto_fd.cc
auto_pid.cc
+ color_spaces.cc
date_time_scanner.cc
fs_util.cc
humanize.cc
@@ -18,6 +20,7 @@ add_library(
lnav_log.cc
network.tcp.cc
paths.cc
+ piper.file.cc
snippet_highlighters.cc
string_attr_type.cc
string_util.cc
@@ -25,14 +28,18 @@ add_library(
time_util.cc
ansi_scrubber.hh
+ ansi_vars.hh
attr_line.hh
attr_line.builder.hh
auto_fd.hh
auto_mem.hh
auto_pid.hh
bus.hh
+ color_spaces.hh
+ date_time_scanner.cfg.hh
date_time_scanner.hh
enum_util.hh
+ from_trait.hh
fs_util.hh
func_util.hh
future_util.hh
@@ -45,26 +52,32 @@ add_library(
is_utf8.hh
isc.hh
itertools.hh
+ keycodes.hh
+ line_range.hh
lnav.console.hh
lnav.console.into.hh
log_level_enum.hh
lrucache.hpp
+ map_util.hh
math_util.hh
network.tcp.hh
paths.hh
+ piper.file.hh
result.h
snippet_highlighters.hh
string_attr_type.hh
strnatcmp.h
time_util.hh
+ types.hh
../third-party/xxHash/xxhash.h
../third-party/xxHash/xxhash.c
)
target_include_directories(base PUBLIC . .. ../third-party
+ ../third-party/date/include
${CMAKE_CURRENT_BINARY_DIR}/..)
-target_link_libraries(base cppfmt cppscnlib pcrepp ncurses::libcurses pthread)
+target_link_libraries(base cppfmt cppscnlib pcrepp ncurses::libcurses pthread lnavdt datepp)
add_executable(
test_base
diff --git a/src/base/Makefile.am b/src/base/Makefile.am
index 4a459a6..105913f 100644
--- a/src/base/Makefile.am
+++ b/src/base/Makefile.am
@@ -7,6 +7,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/src/ \
-I$(top_srcdir)/src/third-party \
-I$(top_srcdir)/src/fmtlib \
+ -I$(top_srcdir)/src/third-party/date/include \
-I$(top_srcdir)/src/third-party/scnlib/include \
$(LIBARCHIVE_CFLAGS) \
$(READLINE_CFLAGS) \
@@ -22,15 +23,19 @@ noinst_LIBRARIES = libbase.a
noinst_HEADERS = \
ansi_scrubber.hh \
+ ansi_vars.hh \
attr_line.hh \
attr_line.builder.hh \
auto_fd.hh \
auto_mem.hh \
auto_pid.hh \
bus.hh \
+ color_spaces.hh \
+ date_time_scanner.cfg.hh \
date_time_scanner.hh \
enum_util.hh \
file_range.hh \
+ from_trait.hh \
fs_util.hh \
func_util.hh \
future_util.hh \
@@ -43,28 +48,35 @@ noinst_HEADERS = \
is_utf8.hh \
isc.hh \
itertools.hh \
+ keycodes.hh \
+ line_range.hh \
lnav_log.hh \
lnav.console.hh \
lnav.console.into.hh \
lnav.gzip.hh \
log_level_enum.hh \
lrucache.hpp \
+ map_util.hh \
math_util.hh \
network.tcp.hh \
opt_util.hh \
paths.hh \
+ piper.file.hh \
result.h \
snippet_highlighters.hh \
string_attr_type.hh \
string_util.hh \
strnatcmp.h \
- time_util.hh
+ time_util.hh \
+ types.hh
libbase_a_SOURCES = \
ansi_scrubber.cc \
attr_line.cc \
attr_line.builder.cc \
+ auto_fd.cc \
auto_pid.cc \
+ color_spaces.cc \
date_time_scanner.cc \
fs_util.cc \
humanize.cc \
@@ -78,6 +90,7 @@ libbase_a_SOURCES = \
lnav_log.cc \
network.tcp.cc \
paths.cc \
+ piper.file.cc \
snippet_highlighters.cc \
string_attr_type.cc \
string_util.cc \
@@ -103,6 +116,7 @@ test_base_SOURCES = \
test_base_LDADD = \
libbase.a \
../fmtlib/libcppfmt.a \
+ ../third-party/date/src/libdatepp.a \
../third-party/scnlib/src/libscnlib.a \
../pcrepp/libpcrepp.a
diff --git a/src/base/ansi_scrubber.cc b/src/base/ansi_scrubber.cc
index 98f6c96..ec34328 100644
--- a/src/base/ansi_scrubber.cc
+++ b/src/base/ansi_scrubber.cc
@@ -33,6 +33,8 @@
#include "ansi_scrubber.hh"
+#include "ansi_vars.hh"
+#include "base/lnav_log.hh"
#include "base/opt_util.hh"
#include "config.h"
#include "pcrepp/pcre2pp.hh"
@@ -43,7 +45,7 @@ static const lnav::pcre2pp::code&
ansi_regex()
{
static const auto retval = lnav::pcre2pp::code::from_const(
- "\x1b\\[([\\d=;\\?]*)([a-zA-Z])|(?:\\X\x08\\X)+");
+ R"(\x1b\[([\d=;\?]*)([a-zA-Z])|\x1b\](\d+);(.*?)(?:\x07|\x1b\\)|(?:\X\x08\X)+|(\x16+))");
return retval;
}
@@ -120,11 +122,18 @@ void
scrub_ansi_string(std::string& str, string_attrs_t* sa)
{
static thread_local auto md = lnav::pcre2pp::match_data::unitialized();
- const auto& regex = ansi_regex();
- int64_t origin_offset = 0;
- int last_origin_offset_end = 0;
+ static const auto semi_pred = string_fragment::tag1{';'};
- replace(str.begin(), str.end(), '\0', ' ');
+ const auto& regex = ansi_regex();
+ nonstd::optional<std::string> href;
+ size_t href_start = 0;
+ string_attrs_t tmp_sa;
+ size_t cp_dst = std::string::npos;
+ size_t cp_start = std::string::npos;
+ int last_origin_end = 0;
+ int erased = 0;
+
+ std::replace(str.begin(), str.end(), '\0', ' ');
auto matcher = regex.capture_from(str).into(md);
while (true) {
auto match_res = matcher.matches(PCRE2_NO_UTF_CHECK);
@@ -140,13 +149,22 @@ scrub_ansi_string(std::string& str, string_attrs_t* sa)
const auto sf = md[0].value();
auto bs_index_res = sf.codepoint_to_byte_index(1);
+ if (cp_dst != std::string::npos) {
+ auto cp_len = sf.sf_begin - cp_start;
+ memmove(&str[cp_dst], &str[cp_start], cp_len);
+ cp_dst += cp_len;
+ } else {
+ cp_dst = sf.sf_begin;
+ }
+
if (sf.length() >= 3 && bs_index_res.isOk()
&& sf[bs_index_res.unwrap()] == '\b')
{
- ssize_t fill_index = sf.sf_begin;
+ ssize_t fill_index = cp_dst;
line_range bold_range;
line_range ul_range;
auto sub_sf = sf;
+ auto mid_sf = string_fragment();
while (!sub_sf.empty()) {
auto lhs_opt = sub_sf.consume_codepoint();
@@ -164,12 +182,13 @@ scrub_ansi_string(std::string& str, string_attrs_t* sa)
return;
}
auto rhs_pair = rhs_opt.value();
- sub_sf = rhs_pair.second;
if (lhs_pair.first == '_' || rhs_pair.first == '_') {
if (sa != nullptr && bold_range.is_valid()) {
- sa->emplace_back(bold_range,
- VC_STYLE.value(text_attrs{A_BOLD}));
+ shift_string_attrs(
+ *sa, bold_range.lr_start, -bold_range.length() * 2);
+ tmp_sa.emplace_back(bold_range,
+ VC_STYLE.value(text_attrs{A_BOLD}));
bold_range.clear();
}
if (ul_range.is_valid()) {
@@ -183,9 +202,13 @@ scrub_ansi_string(std::string& str, string_attrs_t* sa)
ww898::utf::utf8::write(cp, [&str, &fill_index](auto ch) {
str[fill_index++] = ch;
});
- } else {
+ } else if (lhs_pair.first == rhs_pair.first
+ && !fmt::v10::detail::needs_escape(lhs_pair.first))
+ {
if (sa != nullptr && ul_range.is_valid()) {
- sa->emplace_back(
+ shift_string_attrs(
+ *sa, ul_range.lr_start, -ul_range.length() * 2);
+ tmp_sa.emplace_back(
ul_range, VC_STYLE.value(text_attrs{A_UNDERLINE}));
ul_range.clear();
}
@@ -204,57 +227,91 @@ scrub_ansi_string(std::string& str, string_attrs_t* sa)
log_error("invalid UTF-8 at %d", sf.sf_begin);
return;
}
+ } else {
+ mid_sf = mid_pair.second;
+ break;
}
+ sub_sf = rhs_pair.second;
}
- auto output_size = fill_index - sf.sf_begin;
- auto erased_size = sf.length() - output_size;
-
- if (sa != nullptr) {
-#if 0
- shift_string_attrs(
- *sa, caps->c_begin + sf.length() / 3, -erased_size);
-#endif
- sa->emplace_back(line_range{last_origin_offset_end,
- sf.sf_begin + (int) output_size},
- SA_ORIGIN_OFFSET.value(origin_offset));
- }
-
+ auto output_size = fill_index - cp_dst;
if (sa != nullptr && ul_range.is_valid()) {
- sa->emplace_back(ul_range,
- VC_STYLE.value(text_attrs{A_UNDERLINE}));
+ shift_string_attrs(
+ *sa, ul_range.lr_start, -ul_range.length() * 2);
+ tmp_sa.emplace_back(ul_range,
+ VC_STYLE.value(text_attrs{A_UNDERLINE}));
ul_range.clear();
}
if (sa != nullptr && bold_range.is_valid()) {
- sa->emplace_back(bold_range,
- VC_STYLE.value(text_attrs{A_BOLD}));
+ shift_string_attrs(
+ *sa, bold_range.lr_start, -bold_range.length() * 2);
+ tmp_sa.emplace_back(bold_range,
+ VC_STYLE.value(text_attrs{A_BOLD}));
bold_range.clear();
}
-
- str.erase(str.begin() + fill_index, str.begin() + sf.sf_end);
- last_origin_offset_end = sf.sf_begin + output_size;
- origin_offset += erased_size;
- matcher.reload_input(str, last_origin_offset_end);
+ if (sa != nullptr && output_size > 0 && cp_dst > 0) {
+ tmp_sa.emplace_back(
+ line_range{
+ (int) last_origin_end,
+ (int) cp_dst + (int) output_size,
+ },
+ SA_ORIGIN_OFFSET.value(erased));
+ }
+ last_origin_end = cp_dst + output_size;
+ cp_dst = fill_index;
+ cp_start = sub_sf.sf_begin;
+ erased += sf.length() - output_size;
continue;
}
- auto seq = md[1].value();
- auto terminator = md[2].value();
struct line_range lr;
- bool has_attrs = false;
text_attrs attrs;
+ bool has_attrs = false;
nonstd::optional<role_t> role;
- size_t lpc;
-
- switch (terminator[0]) {
- case 'm':
- for (lpc = seq.sf_begin;
- lpc != std::string::npos && lpc < (size_t) seq.sf_end;)
- {
- auto ansi_code_res = scn::scan_value<int>(
- scn::string_view{&str[lpc], &str[seq.sf_end]});
- if (ansi_code_res) {
+ if (md[3]) {
+ auto osc_id = scn::scan_value<int32_t>(md[3]->to_string_view());
+
+ if (osc_id) {
+ switch (osc_id.value()) {
+ case 8:
+ auto split_res = md[4]->split_pair(semi_pred);
+ if (split_res) {
+ // auto params = split_res->first;
+ auto uri = split_res->second;
+
+ if (href) {
+ if (sa != nullptr) {
+ tmp_sa.emplace_back(
+ line_range{
+ (int) href_start,
+ (int) cp_dst,
+ },
+ VC_HYPERLINK.value(href.value()));
+ }
+ href = nonstd::nullopt;
+ }
+ if (!uri.empty()) {
+ href = uri.to_string();
+ href_start = cp_dst;
+ }
+ }
+ break;
+ }
+ }
+ } else if (md[1]) {
+ auto seq = md[1].value();
+ auto terminator = md[2].value();
+
+ switch (terminator[0]) {
+ case 'm':
+ while (!seq.empty()) {
+ auto ansi_code_res
+ = scn::scan_value<int>(seq.to_string_view());
+
+ if (!ansi_code_res) {
+ break;
+ }
auto ansi_code = ansi_code_res.value();
if (90 <= ansi_code && ansi_code <= 97) {
ansi_code -= 60;
@@ -266,6 +323,39 @@ scrub_ansi_string(std::string& str, string_attrs_t* sa)
if (40 <= ansi_code && ansi_code <= 47) {
attrs.ta_bg_color = ansi_code - 40;
}
+ if (ansi_code == 38 || ansi_code == 48) {
+ auto color_code_pair
+ = seq.split_when(semi_pred).second.split_pair(
+ semi_pred);
+ if (!color_code_pair) {
+ break;
+ }
+ auto color_type = scn::scan_value<int>(
+ color_code_pair->first.to_string_view());
+ if (!color_type.has_value()) {
+ break;
+ }
+ if (color_type.value() == 2) {
+ } else if (color_type.value() == 5) {
+ auto color_index_pair
+ = color_code_pair->second.split_when(
+ semi_pred);
+ auto color_index = scn::scan_value<short>(
+ color_index_pair.first.to_string_view());
+ if (!color_index.has_value()
+ || color_index.value() < 0
+ || color_index.value() > 255)
+ {
+ break;
+ }
+ if (ansi_code == 38) {
+ attrs.ta_fg_color = color_index.value();
+ } else {
+ attrs.ta_bg_color = color_index.value();
+ }
+ seq = color_index_pair.second;
+ }
+ }
switch (ansi_code) {
case 1:
attrs.ta_attrs |= A_BOLD;
@@ -283,90 +373,107 @@ scrub_ansi_string(std::string& str, string_attrs_t* sa)
attrs.ta_attrs |= A_REVERSE;
break;
}
+ auto split_pair = seq.split_when(semi_pred);
+ seq = split_pair.second;
}
- lpc = str.find(';', lpc);
- if (lpc != std::string::npos) {
- lpc += 1;
- }
- }
- has_attrs = true;
- break;
+ has_attrs = true;
+ break;
- case 'C': {
- auto spaces_res
- = scn::scan_value<unsigned int>(seq.to_string_view());
+#if 0
+ case 'C': {
+ auto spaces_res
+ = scn::scan_value<unsigned int>(seq.to_string_view());
- if (spaces_res && spaces_res.value() > 0) {
- str.insert((std::string::size_type) sf.sf_end,
- spaces_res.value(),
- ' ');
+ if (spaces_res && spaces_res.value() > 0) {
+ str.insert((std::string::size_type) sf.sf_end,
+ spaces_res.value(),
+ ' ');
+ }
+ break;
}
- break;
- }
- case 'H': {
- unsigned int row = 0, spaces = 0;
+ case 'H': {
+ unsigned int row = 0, spaces = 0;
- if (scn::scan(seq.to_string_view(), "{};{}", row, spaces)
- && spaces > 1)
- {
- int ispaces = spaces - 1;
- if (ispaces > sf.sf_begin) {
- str.insert((unsigned long) sf.sf_end,
- ispaces - sf.sf_begin,
- ' ');
+ if (scn::scan(seq.to_string_view(), "{};{}", row, spaces)
+ && spaces > 1)
+ {
+ int ispaces = spaces - 1;
+ if (ispaces > sf.sf_begin) {
+ str.insert((unsigned long) sf.sf_end,
+ ispaces - sf.sf_begin,
+ ' ');
+ }
}
+ break;
}
- break;
- }
+#endif
- case 'O': {
- auto role_res = scn::scan_value<int>(seq.to_string_view());
+ case 'O': {
+ auto role_res = scn::scan_value<int>(seq.to_string_view());
- if (role_res) {
- role_t role_tmp = (role_t) role_res.value();
- if (role_tmp > role_t::VCR_NONE
- && role_tmp < role_t::VCR__MAX)
- {
- role = role_tmp;
- has_attrs = true;
+ if (role_res) {
+ role_t role_tmp = (role_t) role_res.value();
+ if (role_tmp > role_t::VCR_NONE
+ && role_tmp < role_t::VCR__MAX)
+ {
+ role = role_tmp;
+ has_attrs = true;
+ }
}
+ break;
}
- break;
}
}
- str.erase(str.begin() + sf.sf_begin, str.begin() + sf.sf_end);
- if (sa != nullptr) {
- shift_string_attrs(*sa, sf.sf_begin, -sf.length());
-
- if (has_attrs) {
- for (auto rit = sa->rbegin(); rit != sa->rend(); rit++) {
- if (rit->sa_range.lr_end != -1) {
- continue;
+ if (md[1] || md[3] || md[5]) {
+ if (sa != nullptr) {
+ shift_string_attrs(*sa, sf.sf_begin, -sf.length());
+
+ if (has_attrs) {
+ for (auto rit = tmp_sa.rbegin(); rit != tmp_sa.rend();
+ rit++)
+ {
+ if (rit->sa_range.lr_end != -1) {
+ continue;
+ }
+ rit->sa_range.lr_end = cp_dst;
+ }
+ lr.lr_start = cp_dst;
+ lr.lr_end = -1;
+ if (!attrs.empty()) {
+ tmp_sa.emplace_back(lr, VC_STYLE.value(attrs));
}
- rit->sa_range.lr_end = sf.sf_begin;
+ role | [&lr, &tmp_sa](role_t r) {
+ tmp_sa.emplace_back(lr, VC_ROLE.value(r));
+ };
}
- lr.lr_start = sf.sf_begin;
- lr.lr_end = -1;
- if (attrs.ta_attrs || attrs.ta_fg_color || attrs.ta_bg_color) {
- sa->emplace_back(lr, VC_STYLE.value(attrs));
+ if (cp_dst > 0) {
+ tmp_sa.emplace_back(
+ line_range{
+ (int) last_origin_end,
+ (int) cp_dst,
+ },
+ SA_ORIGIN_OFFSET.value(erased));
}
- role | [&lr, &sa](role_t r) {
- sa->emplace_back(lr, VC_ROLE.value(r));
- };
+ last_origin_end = cp_dst;
}
- sa->emplace_back(line_range{last_origin_offset_end, sf.sf_begin},
- SA_ORIGIN_OFFSET.value(origin_offset));
- last_origin_offset_end = sf.sf_begin;
- origin_offset += sf.length();
+ erased += sf.length();
}
-
- matcher.reload_input(str, sf.sf_begin);
+ cp_start = sf.sf_end;
}
- if (sa != nullptr && last_origin_offset_end > 0) {
- sa->emplace_back(line_range{last_origin_offset_end, (int) str.size()},
- SA_ORIGIN_OFFSET.value(origin_offset));
+ if (cp_dst != std::string::npos) {
+ auto cp_len = str.size() - cp_start;
+ memmove(&str[cp_dst], &str[cp_start], cp_len);
+ cp_dst += cp_len;
+ str.resize(cp_dst);
+ }
+ if (sa != nullptr && last_origin_end > 0 && last_origin_end != str.size()) {
+ tmp_sa.emplace_back(line_range{(int) last_origin_end, (int) str.size()},
+ SA_ORIGIN_OFFSET.value(erased));
+ }
+ if (sa != nullptr) {
+ sa->insert(sa->end(), tmp_sa.begin(), tmp_sa.end());
}
}
diff --git a/src/base/ansi_scrubber.hh b/src/base/ansi_scrubber.hh
index b832e17..ce4eadf 100644
--- a/src/base/ansi_scrubber.hh
+++ b/src/base/ansi_scrubber.hh
@@ -36,7 +36,6 @@
#include <string>
#include "attr_line.hh"
-#include "shlex.resolver.hh"
#define ANSI_CSI "\x1b["
#define ANSI_CHAR_ATTR "m"
@@ -66,10 +65,4 @@ void scrub_ansi_string(std::string& str, string_attrs_t* sa);
size_t erase_ansi_escapes(string_fragment input);
-/**
- * Populate a variable map with strings that contain escape sequences that
- * might be useful to script writers.
- */
-void add_ansi_vars(std::map<std::string, scoped_value_t>& vars);
-
#endif
diff --git a/src/base/ansi_vars.hh b/src/base/ansi_vars.hh
new file mode 100644
index 0000000..e6d8f03
--- /dev/null
+++ b/src/base/ansi_vars.hh
@@ -0,0 +1,41 @@
+/**
+ * Copyright (c) 2023, Timothy Stack
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of Timothy Stack nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ''AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef lnav_ansi_vars_hh
+#define lnav_ansi_vars_hh
+
+#include "shlex.resolver.hh"
+
+/**
+ * Populate a variable map with strings that contain escape sequences that
+ * might be useful to script writers.
+ */
+void add_ansi_vars(std::map<std::string, scoped_value_t>& vars);
+
+#endif
diff --git a/src/base/attr_line.builder.cc b/src/base/attr_line.builder.cc
index 95416dc..a6071a4 100644
--- a/src/base/attr_line.builder.cc
+++ b/src/base/attr_line.builder.cc
@@ -28,3 +28,57 @@
*/
#include "attr_line.builder.hh"
+
+attr_line_builder&
+attr_line_builder::append_as_hexdump(const string_fragment& sf)
+{
+ auto byte_off = size_t{0};
+ for (auto ch : sf) {
+ if (byte_off == 8) {
+ this->append(" ");
+ }
+ nonstd::optional<role_t> ro;
+ if (ch == '\0') {
+ ro = role_t::VCR_NULL;
+ } else if (isspace(ch) || iscntrl(ch)) {
+ ro = role_t::VCR_ASCII_CTRL;
+ } else if (!isprint(ch)) {
+ ro = role_t::VCR_NON_ASCII;
+ }
+ auto ag = ro.has_value() ? this->with_attr(VC_ROLE.value(ro.value()))
+ : this->with_default();
+ this->appendf(FMT_STRING(" {:0>2x}"), ch);
+ byte_off += 1;
+ }
+ for (; byte_off < 16; byte_off++) {
+ if (byte_off == 8) {
+ this->append(" ");
+ }
+ this->append(" ");
+ }
+ this->append(" ");
+ byte_off = 0;
+ for (auto ch : sf) {
+ if (byte_off == 8) {
+ this->append(" ");
+ }
+ if (ch == '\0') {
+ auto ag = this->with_attr(VC_ROLE.value(role_t::VCR_NULL));
+ this->append("\u22c4");
+ } else if (isspace(ch)) {
+ auto ag = this->with_attr(VC_ROLE.value(role_t::VCR_ASCII_CTRL));
+ this->append("_");
+ } else if (iscntrl(ch)) {
+ auto ag = this->with_attr(VC_ROLE.value(role_t::VCR_ASCII_CTRL));
+ this->append("\u2022");
+ } else if (isprint(ch)) {
+ this->alb_line.get_string().push_back(ch);
+ } else {
+ auto ag = this->with_attr(VC_ROLE.value(role_t::VCR_NON_ASCII));
+ this->append("\u00d7");
+ }
+ byte_off += 1;
+ }
+
+ return *this;
+}
diff --git a/src/base/attr_line.builder.hh b/src/base/attr_line.builder.hh
index 1e62532..9ae2caa 100644
--- a/src/base/attr_line.builder.hh
+++ b/src/base/attr_line.builder.hh
@@ -40,6 +40,11 @@ public:
class attr_guard {
public:
+ explicit attr_guard(attr_line_t& al)
+ : ag_line(al), ag_start(nonstd::nullopt)
+ {
+ }
+
attr_guard(attr_line_t& al, string_attr_pair sap)
: ag_line(al), ag_start(al.get_string().length()),
ag_attr(std::move(sap))
@@ -51,7 +56,7 @@ public:
attr_guard& operator=(const attr_guard&) = delete;
attr_guard(attr_guard&& other) noexcept
- : ag_line(other.ag_line), ag_start(other.ag_start),
+ : ag_line(other.ag_line), ag_start(std::move(other.ag_start)),
ag_attr(std::move(other.ag_attr))
{
other.ag_start = nonstd::nullopt;
@@ -75,6 +80,8 @@ public:
string_attr_pair ag_attr;
};
+ attr_guard with_default() { return attr_guard{this->alb_line}; }
+
attr_guard with_attr(string_attr_pair sap)
{
return {this->alb_line, std::move(sap)};
@@ -103,6 +110,14 @@ public:
return *this;
}
+ template<typename... Args>
+ attr_line_builder& appendf(Args... args)
+ {
+ this->alb_line.appendf(args...);
+
+ return *this;
+ }
+
attr_line_builder& indent(size_t amount)
{
auto pre = this->with_attr(SA_PREFORMATTED.value());
@@ -112,6 +127,8 @@ public:
return *this;
}
+ attr_line_builder& append_as_hexdump(const string_fragment& sf);
+
private:
attr_line_t& alb_line;
};
diff --git a/src/base/attr_line.cc b/src/base/attr_line.cc
index b65f4ba..c406525 100644
--- a/src/base/attr_line.cc
+++ b/src/base/attr_line.cc
@@ -200,7 +200,9 @@ attr_line_t::insert(size_t index,
this->al_string, starting_line_index, this->al_string.length());
string_fragment last_word;
ssize_t line_ch_count = 0;
+ ssize_t line_indent_count = 0;
auto needs_indent = false;
+ auto last_was_pre = false;
while (!text_to_wrap.empty()) {
if (needs_indent) {
@@ -214,6 +216,7 @@ attr_line_t::insert(size_t index,
split_attrs(*this, indent_lr);
indent_lr.lr_end += tws->tws_padding_indent;
line_ch_count += tws->tws_padding_indent;
+ line_indent_count += tws->tws_padding_indent;
if (!indent_lr.empty()) {
this->al_attrs.emplace_back(indent_lr, SA_PREFORMATTED.value());
}
@@ -222,18 +225,34 @@ attr_line_t::insert(size_t index,
tws->tws_indent + tws->tws_padding_indent);
needs_indent = false;
}
- auto chunk = text_stream::consume(text_to_wrap);
- text_to_wrap = chunk.match(
+ text_stream::chunk next_chunk(mapbox::util::no_init{});
+ auto pre_iter = find_string_attr_containing(
+ this->al_attrs, &SA_PREFORMATTED, text_to_wrap.sf_begin);
+ if (pre_iter != this->al_attrs.end()) {
+ auto pre_len = pre_iter->sa_range.lr_end - text_to_wrap.sf_begin;
+ auto pre_lf = text_to_wrap.find('\n');
+ if (pre_lf && pre_lf.value() < pre_len) {
+ pre_len = pre_lf.value() + 1;
+ }
+
+ auto pre_pair = text_to_wrap.split_n(pre_len);
+ next_chunk = text_stream::word{
+ pre_pair->first,
+ pre_pair->second,
+ };
+ }
+ if (!next_chunk.valid()) {
+ next_chunk = text_stream::consume(text_to_wrap);
+ }
+
+ text_to_wrap = next_chunk.match(
[&](text_stream::word word) {
auto ch_count
= word.w_word.utf8_length().unwrapOr(word.w_word.length());
- if ((line_ch_count + ch_count) > usable_width
- && find_string_attr_containing(this->al_attrs,
- &SA_PREFORMATTED,
- text_to_wrap.sf_begin)
- == this->al_attrs.end())
+ if (line_ch_count > line_indent_count && !last_was_pre
+ && (line_ch_count + ch_count) > usable_width)
{
this->insert(word.w_word.sf_begin, 1, '\n');
this->insert(word.w_word.sf_begin + 1,
@@ -250,6 +269,7 @@ attr_line_t::insert(size_t index,
SA_PREFORMATTED.value());
}
line_ch_count = tws->tws_padding_indent + ch_count;
+ line_indent_count = tws->tws_padding_indent;
auto trailing_space_count = 0;
if (!last_word.empty()) {
trailing_space_count
@@ -263,12 +283,18 @@ attr_line_t::insert(size_t index,
1 + tws->tws_indent + tws->tws_padding_indent);
}
line_ch_count += ch_count;
+ if (word.w_word.endswith("\n")) {
+ line_ch_count = 0;
+ line_indent_count = 0;
+ needs_indent = true;
+ }
return word.w_remaining;
},
[&](text_stream::space space) {
if (space.s_value == "\n") {
line_ch_count = 0;
+ line_indent_count = 0;
needs_indent = true;
return space.s_remaining;
}
@@ -287,6 +313,7 @@ attr_line_t::insert(size_t index,
space.s_value.length());
this->insert(space.s_value.sf_begin, "\n");
line_ch_count = 0;
+ line_indent_count = 0;
needs_indent = true;
auto trailing_space_count = 0;
@@ -318,9 +345,10 @@ attr_line_t::insert(size_t index,
[](text_stream::corrupt corrupt) { return corrupt.c_remaining; },
[](text_stream::eof eof) { return eof.e_remaining; });
- if (chunk.is<text_stream::word>()) {
+ if (next_chunk.is<text_stream::word>()) {
last_word = text_to_wrap;
}
+ last_was_pre = (pre_iter != this->al_attrs.end());
ensure(this->al_string.data() == text_to_wrap.sf_string);
ensure(text_to_wrap.sf_begin <= text_to_wrap.sf_end);
@@ -429,7 +457,7 @@ attr_line_t::apply_hide()
}
attr_line_t&
-attr_line_t::rtrim()
+attr_line_t::rtrim(nonstd::optional<const char*> chars)
{
auto index = this->al_string.length();
@@ -440,7 +468,12 @@ attr_line_t::rtrim()
{
break;
}
- if (!isspace(this->al_string[index - 1])) {
+ if (chars
+ && strchr(chars.value(), this->al_string[index - 1]) == nullptr)
+ {
+ break;
+ }
+ if (!chars && !isspace(this->al_string[index - 1])) {
break;
}
}
@@ -462,7 +495,9 @@ attr_line_t::erase(size_t pos, size_t len)
this->al_string.erase(pos, len);
- shift_string_attrs(this->al_attrs, pos, -((int32_t) len));
+ shift_string_attrs(this->al_attrs,
+ line_range{(int) pos, (int) (pos + len)},
+ -((int32_t) len));
auto new_end = std::remove_if(
this->al_attrs.begin(), this->al_attrs.end(), [](const auto& attr) {
return attr.sa_range.empty();
@@ -506,6 +541,33 @@ line_range::intersection(const line_range& other) const
}
line_range&
+line_range::shift_range(const line_range& cover, int32_t amount)
+{
+ if (cover.lr_end <= this->lr_start) {
+ this->lr_start = std::max(0, this->lr_start + amount);
+ if (this->lr_end != -1) {
+ this->lr_end = std::max(0, this->lr_end + amount);
+ }
+ } else {
+ if (amount < 0 && cover.contains(*this)) {
+ this->lr_start = cover.lr_start;
+ }
+ if (this->lr_end != -1) {
+ if (cover.lr_start < this->lr_end) {
+ if (amount < 0 && amount < (cover.lr_start - this->lr_end)) {
+ this->lr_end = cover.lr_start;
+ } else {
+ this->lr_end
+ = std::max(this->lr_start, this->lr_end + amount);
+ }
+ }
+ }
+ }
+
+ return *this;
+}
+
+line_range&
line_range::shift(int32_t start, int32_t amount)
{
if (start == this->lr_start) {
@@ -535,3 +597,120 @@ line_range::shift(int32_t start, int32_t amount)
return *this;
}
+
+string_attrs_t::const_iterator
+find_string_attr(const string_attrs_t& sa, size_t near)
+{
+ auto nearest = sa.end();
+ ssize_t last_diff = INT_MAX;
+
+ for (auto iter = sa.begin(); iter != sa.end(); ++iter) {
+ const auto& lr = iter->sa_range;
+
+ if (!lr.is_valid() || !lr.contains(near)) {
+ continue;
+ }
+
+ ssize_t diff = near - lr.lr_start;
+ if (diff < last_diff) {
+ last_diff = diff;
+ nearest = iter;
+ }
+ }
+
+ return nearest;
+}
+
+void
+shift_string_attrs(string_attrs_t& sa, int32_t start, int32_t amount)
+{
+ for (auto& iter : sa) {
+ iter.sa_range.shift(start, amount);
+ }
+}
+
+void
+shift_string_attrs(string_attrs_t& sa, const line_range& cover, int32_t amount)
+{
+ for (auto& iter : sa) {
+ iter.sa_range.shift_range(cover, amount);
+ }
+}
+
+struct line_range
+find_string_attr_range(const string_attrs_t& sa, string_attr_type_base* type)
+{
+ auto iter = find_string_attr(sa, type);
+
+ if (iter != sa.end()) {
+ return iter->sa_range;
+ }
+
+ return line_range();
+}
+
+void
+remove_string_attr(string_attrs_t& sa, const line_range& lr)
+{
+ string_attrs_t::iterator iter;
+
+ while ((iter = find_string_attr(sa, lr)) != sa.end()) {
+ sa.erase(iter);
+ }
+}
+
+void
+remove_string_attr(string_attrs_t& sa, string_attr_type_base* type)
+{
+ for (auto iter = sa.begin(); iter != sa.end();) {
+ if (iter->sa_type == type) {
+ iter = sa.erase(iter);
+ } else {
+ ++iter;
+ }
+ }
+}
+
+string_attrs_t::iterator
+find_string_attr(string_attrs_t& sa, const line_range& lr)
+{
+ string_attrs_t::iterator iter;
+
+ for (iter = sa.begin(); iter != sa.end(); ++iter) {
+ if (lr.contains(iter->sa_range)) {
+ break;
+ }
+ }
+
+ return iter;
+}
+
+string_attrs_t::const_iterator
+find_string_attr(const string_attrs_t& sa,
+ const string_attr_type_base* type,
+ int start)
+{
+ string_attrs_t::const_iterator iter;
+
+ for (iter = sa.begin(); iter != sa.end(); ++iter) {
+ if (iter->sa_type == type && iter->sa_range.lr_start >= start) {
+ break;
+ }
+ }
+
+ return iter;
+}
+
+nonstd::optional<const string_attr*>
+get_string_attr(const string_attrs_t& sa,
+ const string_attr_type_base* type,
+ int start)
+{
+ auto iter = find_string_attr(sa, type, start);
+
+ if (iter == sa.end()) {
+ return nonstd::nullopt;
+ }
+
+ return nonstd::make_optional(&(*iter));
+}
diff --git a/src/base/attr_line.hh b/src/base/attr_line.hh
index c9cb6a8..c294321 100644
--- a/src/base/attr_line.hh
+++ b/src/base/attr_line.hh
@@ -40,130 +40,10 @@
#include "fmt/format.h"
#include "intern_string.hh"
+#include "line_range.hh"
#include "string_attr_type.hh"
#include "string_util.hh"
-/**
- * Encapsulates a range in a string.
- */
-struct line_range {
- enum class unit {
- bytes,
- codepoint,
- };
-
- int lr_start;
- int lr_end;
- unit lr_unit;
-
- explicit line_range(int start = -1, int end = -1, unit u = unit::bytes)
- : lr_start(start), lr_end(end), lr_unit(u)
- {
- }
-
- bool is_valid() const { return this->lr_start != -1; }
-
- int length() const
- {
- return this->lr_end == -1 ? INT_MAX : this->lr_end - this->lr_start;
- }
-
- bool empty() const { return this->length() == 0; }
-
- void clear()
- {
- this->lr_start = -1;
- this->lr_end = -1;
- }
-
- int end_for_string(const std::string& str) const
- {
- return this->lr_end == -1 ? str.length() : this->lr_end;
- }
-
- bool contains(int pos) const
- {
- return this->lr_start <= pos
- && (this->lr_end == -1 || pos < this->lr_end);
- }
-
- bool contains(const struct line_range& other) const
- {
- return this->contains(other.lr_start)
- && (this->lr_end == -1 || other.lr_end <= this->lr_end);
- }
-
- bool intersects(const struct line_range& other) const
- {
- if (this->contains(other.lr_start)) {
- return true;
- }
- if (other.lr_end > 0 && this->contains(other.lr_end - 1)) {
- return true;
- }
- if (other.contains(this->lr_start)) {
- return true;
- }
-
- return false;
- }
-
- line_range intersection(const struct line_range& other) const;
-
- line_range& shift(int32_t start, int32_t amount);
-
- void ltrim(const char* str)
- {
- while (this->lr_start < this->lr_end && isspace(str[this->lr_start])) {
- this->lr_start += 1;
- }
- }
-
- bool operator<(const struct line_range& rhs) const
- {
- if (this->lr_start < rhs.lr_start) {
- return true;
- }
- if (this->lr_start > rhs.lr_start) {
- return false;
- }
-
- // this->lr_start == rhs.lr_start
- if (this->lr_end == rhs.lr_end) {
- return false;
- }
-
- if (this->lr_end < rhs.lr_end) {
- return false;
- }
- return true;
- }
-
- bool operator==(const struct line_range& rhs) const
- {
- return (this->lr_start == rhs.lr_start && this->lr_end == rhs.lr_end);
- }
-
- const char* substr(const std::string& str) const
- {
- if (this->lr_start == -1) {
- return str.c_str();
- }
- return &(str.c_str()[this->lr_start]);
- }
-
- size_t sublen(const std::string& str) const
- {
- if (this->lr_start == -1) {
- return str.length();
- }
- if (this->lr_end == -1) {
- return str.length() - this->lr_start;
- }
- return this->length();
- }
-};
-
inline line_range
to_line_range(const string_fragment& frag)
{
@@ -214,35 +94,11 @@ struct string_attr_wrapper {
/** A map of line ranges to attributes for that range. */
using string_attrs_t = std::vector<string_attr>;
-inline string_attrs_t::const_iterator
-find_string_attr(const string_attrs_t& sa,
- const string_attr_type_base* type,
- int start = 0)
-{
- string_attrs_t::const_iterator iter;
-
- for (iter = sa.begin(); iter != sa.end(); ++iter) {
- if (iter->sa_type == type && iter->sa_range.lr_start >= start) {
- break;
- }
- }
-
- return iter;
-}
-
-inline nonstd::optional<const string_attr*>
-get_string_attr(const string_attrs_t& sa,
- const string_attr_type_base* type,
- int start = 0)
-{
- auto iter = find_string_attr(sa, type, start);
-
- if (iter == sa.end()) {
- return nonstd::nullopt;
- }
+string_attrs_t::const_iterator find_string_attr(
+ const string_attrs_t& sa, const string_attr_type_base* type, int start = 0);
- return nonstd::make_optional(&(*iter));
-}
+nonstd::optional<const string_attr*> get_string_attr(
+ const string_attrs_t& sa, const string_attr_type_base* type, int start = 0);
template<typename T>
inline nonstd::optional<string_attr_wrapper<T>>
@@ -276,42 +132,11 @@ find_string_attr_containing(const string_attrs_t& sa,
return iter;
}
-inline string_attrs_t::iterator
-find_string_attr(string_attrs_t& sa, const struct line_range& lr)
-{
- string_attrs_t::iterator iter;
-
- for (iter = sa.begin(); iter != sa.end(); ++iter) {
- if (lr.contains(iter->sa_range)) {
- break;
- }
- }
-
- return iter;
-}
-
-inline string_attrs_t::const_iterator
-find_string_attr(const string_attrs_t& sa, size_t near)
-{
- auto nearest = sa.end();
- ssize_t last_diff = INT_MAX;
-
- for (auto iter = sa.begin(); iter != sa.end(); ++iter) {
- const auto& lr = iter->sa_range;
-
- if (!lr.is_valid() || !lr.contains(near)) {
- continue;
- }
-
- ssize_t diff = near - lr.lr_start;
- if (diff < last_diff) {
- last_diff = diff;
- nearest = iter;
- }
- }
+string_attrs_t::iterator find_string_attr(string_attrs_t& sa,
+ const struct line_range& lr);
- return nearest;
-}
+string_attrs_t::const_iterator find_string_attr(const string_attrs_t& sa,
+ size_t near);
template<typename T>
inline string_attrs_t::const_iterator
@@ -341,47 +166,18 @@ rfind_string_attr_if(const string_attrs_t& sa, ssize_t near, T predicate)
return nearest;
}
-inline struct line_range
-find_string_attr_range(const string_attrs_t& sa, string_attr_type_base* type)
-{
- auto iter = find_string_attr(sa, type);
+struct line_range find_string_attr_range(const string_attrs_t& sa,
+ string_attr_type_base* type);
- if (iter != sa.end()) {
- return iter->sa_range;
- }
+void remove_string_attr(string_attrs_t& sa, const struct line_range& lr);
- return line_range();
-}
+void remove_string_attr(string_attrs_t& sa, string_attr_type_base* type);
-inline void
-remove_string_attr(string_attrs_t& sa, const struct line_range& lr)
-{
- string_attrs_t::iterator iter;
-
- while ((iter = find_string_attr(sa, lr)) != sa.end()) {
- sa.erase(iter);
- }
-}
+void shift_string_attrs(string_attrs_t& sa, int32_t start, int32_t amount);
-inline void
-remove_string_attr(string_attrs_t& sa, string_attr_type_base* type)
-{
- for (auto iter = sa.begin(); iter != sa.end();) {
- if (iter->sa_type == type) {
- iter = sa.erase(iter);
- } else {
- ++iter;
- }
- }
-}
-
-inline void
-shift_string_attrs(string_attrs_t& sa, int32_t start, int32_t amount)
-{
- for (auto& iter : sa) {
- iter.sa_range.shift(start, amount);
- }
-}
+void shift_string_attrs(string_attrs_t& sa,
+ const line_range& cover,
+ int32_t amount);
struct text_wrap_settings {
text_wrap_settings& with_indent(int indent)
@@ -425,6 +221,13 @@ public:
return retval.with_ansi_string("%s", str);
}
+ static inline attr_line_t from_ansi_str(const std::string& str)
+ {
+ attr_line_t retval;
+
+ return retval.with_ansi_string(str);
+ }
+
/** @return The string itself. */
std::string& get_string() { return this->al_string; }
@@ -517,15 +320,6 @@ public:
return *this;
}
- attr_line_t& append_quoted(const attr_line_t& al)
- {
- this->al_string.append("\u201c");
- this->append(al);
- this->al_string.append("\u201d");
-
- return *this;
- }
-
template<typename S>
attr_line_t& append_quoted(S s)
{
@@ -548,18 +342,31 @@ public:
return *this;
}
- template<typename S>
- attr_line_t& append(S str)
+ attr_line_t& append(const std::string& str)
{
this->al_string.append(str);
return *this;
}
+ attr_line_t& append(const char* str)
+ {
+ this->al_string.append(str);
+ return *this;
+ }
+
+ template<typename V>
+ attr_line_t& append(const V& v)
+ {
+ this->al_string.append(fmt::to_string(v));
+ return *this;
+ }
+
template<typename... Args>
attr_line_t& appendf(fmt::format_string<Args...> fstr, Args&&... args)
{
- this->template append(
- fmt::vformat(fstr, fmt::make_format_args(args...)));
+ fmt::vformat_to(std::back_inserter(this->al_string),
+ fstr,
+ fmt::make_format_args(args...));
return *this;
}
@@ -635,6 +442,24 @@ public:
return *this;
}
+ template<typename S>
+ attr_line_t& insert(size_t index,
+ const std::pair<S, string_attr_pair>& value)
+ {
+ size_t start_len = this->al_string.length();
+
+ this->insert(index, std::move(value.first));
+
+ line_range lr{
+ (int) index,
+ (int) (index + (this->al_string.length() - start_len)),
+ };
+
+ this->al_attrs.emplace_back(lr, value.second);
+
+ return *this;
+ }
+
template<typename... Args>
attr_line_t& add_header(Args... args)
{
@@ -657,7 +482,7 @@ public:
attr_line_t& erase(size_t pos, size_t len = std::string::npos);
- attr_line_t& rtrim();
+ attr_line_t& rtrim(nonstd::optional<const char*> chars = nonstd::nullopt);
attr_line_t& erase_utf8_chars(size_t start)
{
@@ -695,6 +520,11 @@ public:
return utf8_string_length(this->al_string).unwrapOr(this->length());
}
+ size_t column_width() const
+ {
+ return string_fragment::from_str(this->al_string).column_width();
+ }
+
std::string get_substring(const line_range& lr) const
{
if (!lr.is_valid()) {
diff --git a/src/base/attr_line.tests.cc b/src/base/attr_line.tests.cc
index 53b338e..8e23480 100644
--- a/src/base/attr_line.tests.cc
+++ b/src/base/attr_line.tests.cc
@@ -36,6 +36,15 @@
using namespace lnav::roles::literals;
+TEST_CASE("line_range")
+{
+ line_range lr1{0, 95};
+ line_range lr2{0, -1};
+
+ CHECK(lr2 < lr1);
+ CHECK(!(lr1 < lr2));
+}
+
TEST_CASE("attr_line_t::basic-wrapping")
{
text_wrap_settings tws = {3, 21};
@@ -89,3 +98,18 @@ TEST_CASE("attr_line_t::unicode-wrap")
" be wrapped and\n"
" indented");
}
+
+TEST_CASE("attr_line_t::pre-wrap")
+{
+ auto pre_al = attr_line_t(" Hello, World! ")
+ .with_attr_for_all(SA_PREFORMATTED.value());
+ auto al = attr_line_t("This is a pre-formatted inline -- ")
+ .append(pre_al)
+ .append(" -- that should be wrapped");
+
+ text_wrap_settings tws = {0, 36};
+
+ auto body = attr_line_t().append(al, &tws);
+
+ printf("body\n%s\n", body.get_string().c_str());
+}
diff --git a/src/base/auto_fd.cc b/src/base/auto_fd.cc
new file mode 100644
index 0000000..0853c3a
--- /dev/null
+++ b/src/base/auto_fd.cc
@@ -0,0 +1,248 @@
+/**
+ * Copyright (c) 2023, Timothy Stack
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of Timothy Stack nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ''AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * @file auto_fd.cc
+ */
+
+#include "auto_fd.hh"
+
+#include <fcntl.h>
+#include <unistd.h>
+
+#include "lnav_log.hh"
+
+int
+auto_fd::pipe(auto_fd* af)
+{
+ int retval, fd[2];
+
+ require(af != nullptr);
+
+ if ((retval = ::pipe(fd)) == 0) {
+ af[0] = fd[0];
+ af[1] = fd[1];
+ }
+
+ return retval;
+}
+
+auto_fd
+auto_fd::dup_of(int fd)
+{
+ if (fd == -1) {
+ return auto_fd{};
+ }
+
+ auto new_fd = ::dup(fd);
+
+ if (new_fd == -1) {
+ throw std::bad_alloc();
+ }
+
+ return auto_fd(new_fd);
+}
+
+Result<auto_fd, std::string>
+auto_fd::openpt(int flags)
+{
+ auto rc = posix_openpt(flags);
+ if (rc == -1) {
+ return Err(fmt::format(FMT_STRING("posix_openpt() failed: {}"),
+ strerror(errno)));
+ }
+
+ return Ok(auto_fd{rc});
+}
+
+auto_fd::auto_fd(int fd) : af_fd(fd)
+{
+ require(fd >= -1);
+}
+
+auto_fd::auto_fd(auto_fd&& af) noexcept : af_fd(af.release()) {}
+
+auto_fd
+auto_fd::dup() const
+{
+ int new_fd;
+
+ if (this->af_fd == -1 || (new_fd = ::dup(this->af_fd)) == -1) {
+ throw std::bad_alloc();
+ }
+
+ return auto_fd{new_fd};
+}
+
+auto_fd::~auto_fd()
+{
+ this->reset();
+}
+
+void
+auto_fd::reset(int fd)
+{
+ require(fd >= -1);
+
+ if (this->af_fd != fd) {
+ if (this->af_fd != -1) {
+ switch (this->af_fd) {
+ case STDIN_FILENO:
+ case STDOUT_FILENO:
+ case STDERR_FILENO:
+ break;
+ default:
+ close(this->af_fd);
+ break;
+ }
+ }
+ this->af_fd = fd;
+ }
+}
+
+void
+auto_fd::close_on_exec() const
+{
+ if (this->af_fd == -1) {
+ return;
+ }
+ log_perror(fcntl(this->af_fd, F_SETFD, FD_CLOEXEC));
+}
+
+void
+auto_fd::non_blocking() const
+{
+ auto fl = fcntl(this->af_fd, F_GETFL, 0);
+ if (fl < 0) {
+ return;
+ }
+
+ log_perror(fcntl(this->af_fd, F_SETFL, fl | O_NONBLOCK));
+}
+
+auto_fd&
+auto_fd::operator=(int fd)
+{
+ require(fd >= -1);
+
+ this->reset(fd);
+ return *this;
+}
+
+Result<void, std::string>
+auto_fd::write_fully(string_fragment sf)
+{
+ while (!sf.empty()) {
+ auto rc = write(this->af_fd, sf.data(), sf.length());
+
+ if (rc < 0) {
+ return Err(
+ fmt::format(FMT_STRING("failed to write {} bytes to FD {}"),
+ sf.length(),
+ this->af_fd));
+ }
+
+ sf = sf.substr(rc);
+ }
+
+ return Ok();
+}
+
+Result<auto_pipe, std::string>
+auto_pipe::for_child_fd(int child_fd)
+{
+ auto_pipe retval(child_fd);
+
+ if (retval.open() == -1) {
+ return Err(std::string(strerror(errno)));
+ }
+
+ return Ok(std::move(retval));
+}
+
+auto_pipe::auto_pipe(int child_fd, int child_flags)
+ : ap_child_flags(child_flags), ap_child_fd(child_fd)
+{
+ switch (child_fd) {
+ case STDIN_FILENO:
+ this->ap_child_flags = O_RDONLY;
+ break;
+ case STDOUT_FILENO:
+ case STDERR_FILENO:
+ this->ap_child_flags = O_WRONLY;
+ break;
+ }
+}
+
+void
+auto_pipe::after_fork(pid_t child_pid)
+{
+ int new_fd;
+
+ switch (child_pid) {
+ case -1:
+ this->close();
+ break;
+ case 0:
+ if (this->ap_child_flags == O_RDONLY) {
+ this->write_end().reset();
+ if (this->read_end().get() == -1) {
+ this->read_end() = ::open("/dev/null", O_RDONLY);
+ }
+ new_fd = this->read_end().get();
+ } else {
+ this->read_end().reset();
+ if (this->write_end().get() == -1) {
+ this->write_end() = ::open("/dev/null", O_WRONLY);
+ }
+ new_fd = this->write_end().get();
+ }
+ if (this->ap_child_fd != -1) {
+ if (new_fd != this->ap_child_fd) {
+ dup2(new_fd, this->ap_child_fd);
+ this->close();
+ }
+ }
+ break;
+ default:
+ if (this->ap_child_flags == O_RDONLY) {
+ this->read_end().reset();
+ } else {
+ this->write_end().reset();
+ }
+ break;
+ }
+}
+
+int
+auto_pipe::open()
+{
+ int retval = auto_fd::pipe(this->ap_fd);
+ this->ap_fd[0].close_on_exec();
+ this->ap_fd[1].close_on_exec();
+ return retval;
+}
diff --git a/src/base/auto_fd.hh b/src/base/auto_fd.hh
index da4a582..9fb3c91 100644
--- a/src/base/auto_fd.hh
+++ b/src/base/auto_fd.hh
@@ -32,16 +32,11 @@
#ifndef auto_fd_hh
#define auto_fd_hh
-#include <exception>
-#include <new>
#include <string>
-#include <errno.h>
#include <fcntl.h>
-#include <sys/select.h>
-#include <unistd.h>
-#include "base/lnav_log.hh"
+#include "base/intern_string.hh"
#include "base/result.h"
/**
@@ -59,19 +54,7 @@ public:
* contains the reader end of the pipe and the second contains the writer.
* @return The result of the pipe(2) function.
*/
- static int pipe(auto_fd* af)
- {
- int retval, fd[2];
-
- require(af != nullptr);
-
- if ((retval = ::pipe(fd)) == 0) {
- af[0] = fd[0];
- af[1] = fd[1];
- }
-
- return retval;
- }
+ static int pipe(auto_fd* af);
/**
* dup(2) the given file descriptor and wrap it in an auto_fd.
@@ -79,27 +62,16 @@ public:
* @param fd The file descriptor to duplicate.
* @return A new auto_fd that contains the duplicated file descriptor.
*/
- static auto_fd dup_of(int fd)
- {
- if (fd == -1) {
- return auto_fd{};
- }
+ static auto_fd dup_of(int fd);
- auto new_fd = ::dup(fd);
-
- if (new_fd == -1) {
- throw std::bad_alloc();
- }
-
- return auto_fd(new_fd);
- }
+ static Result<auto_fd, std::string> openpt(int flags);
/**
* Construct an auto_fd to manage the given file descriptor.
*
* @param fd The file descriptor to be managed.
*/
- explicit auto_fd(int fd = -1) : af_fd(fd) { require(fd >= -1); }
+ explicit auto_fd(int fd = -1);
/**
* Non-const copy constructor. Management of the file descriptor will be
@@ -108,7 +80,7 @@ public:
*
* @param af The source of the file descriptor.
*/
- auto_fd(auto_fd&& af) noexcept : af_fd(af.release()) {}
+ auto_fd(auto_fd&& af) noexcept;
/**
* Const copy constructor. The file descriptor from the source will be
@@ -118,21 +90,12 @@ public:
*/
auto_fd(const auto_fd& af) = delete;
- auto_fd dup() const
- {
- int new_fd;
-
- if (this->af_fd == -1 || (new_fd = ::dup(this->af_fd)) == -1) {
- throw std::bad_alloc();
- }
-
- return auto_fd{new_fd};
- }
+ auto_fd dup() const;
/**
* Destructor that will close the file descriptor managed by this object.
*/
- ~auto_fd() { this->reset(); }
+ ~auto_fd();
/** @return The file descriptor as a plain integer. */
operator int() const { return this->af_fd; }
@@ -144,13 +107,7 @@ public:
* @param fd The file descriptor to store in this object.
* @return *this
*/
- auto_fd& operator=(int fd)
- {
- require(fd >= -1);
-
- this->reset(fd);
- return *this;
- }
+ auto_fd& operator=(int fd);
/**
* Transfer management of the given file descriptor to this object.
@@ -194,39 +151,21 @@ public:
*/
int get() const { return this->af_fd; }
+ bool has_value() const { return this->af_fd != -1; }
+
/**
* Closes the current file descriptor and replaces its value with the given
* one.
*
* @param fd The new file descriptor to be managed.
*/
- void reset(int fd = -1)
- {
- require(fd >= -1);
-
- if (this->af_fd != fd) {
- if (this->af_fd != -1) {
- switch (this->af_fd) {
- case STDIN_FILENO:
- case STDOUT_FILENO:
- case STDERR_FILENO:
- break;
- default:
- close(this->af_fd);
- break;
- }
- }
- this->af_fd = fd;
- }
- }
+ void reset(int fd = -1);
- void close_on_exec() const
- {
- if (this->af_fd == -1) {
- return;
- }
- log_perror(fcntl(this->af_fd, F_SETFD, FD_CLOEXEC));
- }
+ Result<void, std::string> write_fully(string_fragment sf);
+
+ void close_on_exec() const;
+
+ void non_blocking() const;
private:
int af_fd; /*< The managed file descriptor. */
@@ -234,32 +173,30 @@ private:
class auto_pipe {
public:
- static Result<auto_pipe, std::string> for_child_fd(int child_fd)
+ static Result<auto_pipe, std::string> for_child_fd(int child_fd);
+
+ template<typename... ARGS>
+ static Result<std::array<auto_pipe, sizeof...(ARGS)>, std::string>
+ for_child_fds(ARGS... args)
{
- auto_pipe retval(child_fd);
+ std::array<auto_pipe, sizeof...(ARGS)> retval;
- if (retval.open() == -1) {
- return Err(std::string(strerror(errno)));
+ size_t index = 0;
+ for (const auto child_fd : {args...}) {
+ auto open_res = for_child_fd(child_fd);
+ if (open_res.isErr()) {
+ return Err(open_res.unwrapErr());
+ }
+
+ retval[index++] = open_res.unwrap();
}
return Ok(std::move(retval));
}
- explicit auto_pipe(int child_fd = -1, int child_flags = O_RDONLY)
- : ap_child_flags(child_flags), ap_child_fd(child_fd)
- {
- switch (child_fd) {
- case STDIN_FILENO:
- this->ap_child_flags = O_RDONLY;
- break;
- case STDOUT_FILENO:
- case STDERR_FILENO:
- this->ap_child_flags = O_WRONLY;
- break;
- }
- }
+ explicit auto_pipe(int child_fd = -1, int child_flags = O_RDONLY);
- int open() { return auto_fd::pipe(this->ap_fd); }
+ int open();
void close()
{
@@ -271,44 +208,7 @@ public:
auto_fd& write_end() { return this->ap_fd[1]; }
- void after_fork(pid_t child_pid)
- {
- int new_fd;
-
- switch (child_pid) {
- case -1:
- this->close();
- break;
- case 0:
- if (this->ap_child_flags == O_RDONLY) {
- this->write_end().reset();
- if (this->read_end().get() == -1) {
- this->read_end() = ::open("/dev/null", O_RDONLY);
- }
- new_fd = this->read_end().get();
- } else {
- this->read_end().reset();
- if (this->write_end().get() == -1) {
- this->write_end() = ::open("/dev/null", O_WRONLY);
- }
- new_fd = this->write_end().get();
- }
- if (this->ap_child_fd != -1) {
- if (new_fd != this->ap_child_fd) {
- dup2(new_fd, this->ap_child_fd);
- this->close();
- }
- }
- break;
- default:
- if (this->ap_child_flags == O_RDONLY) {
- this->read_end().reset();
- } else {
- this->write_end().reset();
- }
- break;
- }
- }
+ void after_fork(pid_t child_pid);
int ap_child_flags;
int ap_child_fd;
diff --git a/src/base/auto_mem.hh b/src/base/auto_mem.hh
index e6b456c..b404a1b 100644
--- a/src/base/auto_mem.hh
+++ b/src/base/auto_mem.hh
@@ -66,6 +66,16 @@ public:
return retval;
}
+ static auto_mem calloc(size_t count)
+ {
+ return auto_mem(static_cast<T*>(::calloc(count, sizeof(T))));
+ }
+
+ static auto_mem malloc(size_t sz)
+ {
+ return auto_mem(static_cast<T*>(::malloc(sz)));
+ }
+
explicit auto_mem(T* ptr = nullptr)
: am_ptr(ptr), am_free_func(default_free)
{
@@ -241,6 +251,8 @@ public:
const char* begin() const { return this->ab_buffer; }
+ char* next_available() { return &this->ab_buffer[this->ab_size]; }
+
auto_buffer& push_back(char ch)
{
if (this->ab_size == this->ab_capacity) {
diff --git a/src/base/auto_pid.hh b/src/base/auto_pid.hh
index 702af1e..ff44b99 100644
--- a/src/base/auto_pid.hh
+++ b/src/base/auto_pid.hh
@@ -62,10 +62,7 @@ public:
{
}
- ~auto_pid() noexcept
- {
- this->reset();
- }
+ ~auto_pid() noexcept { this->reset(); }
auto_pid& operator=(auto_pid&& other) noexcept
{
@@ -77,10 +74,7 @@ public:
auto_pid& operator=(const auto_pid& other) = delete;
- pid_t in() const
- {
- return this->ap_child;
- }
+ pid_t in() const { return this->ap_child; }
bool in_child() const
{
@@ -89,9 +83,7 @@ public:
return this->ap_child == 0;
}
- pid_t release() &&
- {
- return std::exchange(this->ap_child, -1); }
+ pid_t release() && { return std::exchange(this->ap_child, -1); }
int status() const
{
@@ -107,6 +99,13 @@ public:
return WIFEXITED(this->ap_status);
}
+ int term_signal() const
+ {
+ static_assert(ProcState == process_state::finished,
+ "wait_for_child() must be called first");
+ return WTERMSIG(this->ap_status);
+ }
+
int exit_status() const
{
static_assert(ProcState == process_state::finished,
diff --git a/src/base/color_spaces.cc b/src/base/color_spaces.cc
new file mode 100644
index 0000000..74d9fe6
--- /dev/null
+++ b/src/base/color_spaces.cc
@@ -0,0 +1,176 @@
+/**
+ * Copyright (c) 2024, Timothy Stack
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of Timothy Stack nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ''AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <cmath>
+
+#include "color_spaces.hh"
+
+#include "config.h"
+
+bool
+rgb_color::operator<(const rgb_color& rhs) const
+{
+ if (rc_r < rhs.rc_r)
+ return true;
+ if (rhs.rc_r < rc_r)
+ return false;
+ if (rc_g < rhs.rc_g)
+ return true;
+ if (rhs.rc_g < rc_g)
+ return false;
+ return rc_b < rhs.rc_b;
+}
+
+bool
+rgb_color::operator>(const rgb_color& rhs) const
+{
+ return rhs < *this;
+}
+
+bool
+rgb_color::operator<=(const rgb_color& rhs) const
+{
+ return !(rhs < *this);
+}
+
+bool
+rgb_color::operator>=(const rgb_color& rhs) const
+{
+ return !(*this < rhs);
+}
+
+bool
+rgb_color::operator==(const rgb_color& rhs) const
+{
+ return rc_r == rhs.rc_r && rc_g == rhs.rc_g && rc_b == rhs.rc_b;
+}
+
+bool
+rgb_color::operator!=(const rgb_color& rhs) const
+{
+ return !(rhs == *this);
+}
+
+lab_color::lab_color(const rgb_color& rgb)
+{
+ double r = rgb.rc_r / 255.0, g = rgb.rc_g / 255.0, b = rgb.rc_b / 255.0, x,
+ y, z;
+
+ r = (r > 0.04045) ? pow((r + 0.055) / 1.055, 2.4) : r / 12.92;
+ g = (g > 0.04045) ? pow((g + 0.055) / 1.055, 2.4) : g / 12.92;
+ b = (b > 0.04045) ? pow((b + 0.055) / 1.055, 2.4) : b / 12.92;
+
+ x = (r * 0.4124 + g * 0.3576 + b * 0.1805) / 0.95047;
+ y = (r * 0.2126 + g * 0.7152 + b * 0.0722) / 1.00000;
+ z = (r * 0.0193 + g * 0.1192 + b * 0.9505) / 1.08883;
+
+ x = (x > 0.008856) ? pow(x, 1.0 / 3.0) : (7.787 * x) + 16.0 / 116.0;
+ y = (y > 0.008856) ? pow(y, 1.0 / 3.0) : (7.787 * y) + 16.0 / 116.0;
+ z = (z > 0.008856) ? pow(z, 1.0 / 3.0) : (7.787 * z) + 16.0 / 116.0;
+
+ this->lc_l = (116.0 * y) - 16;
+ this->lc_a = 500.0 * (x - y);
+ this->lc_b = 200.0 * (y - z);
+}
+
+double
+lab_color::deltaE(const lab_color& other) const
+{
+ double deltaL = this->lc_l - other.lc_l;
+ double deltaA = this->lc_a - other.lc_a;
+ double deltaB = this->lc_b - other.lc_b;
+ double c1 = sqrt(this->lc_a * this->lc_a + this->lc_b * this->lc_b);
+ double c2 = sqrt(other.lc_a * other.lc_a + other.lc_b * other.lc_b);
+ double deltaC = c1 - c2;
+ double deltaH = deltaA * deltaA + deltaB * deltaB - deltaC * deltaC;
+ deltaH = deltaH < 0.0 ? 0.0 : sqrt(deltaH);
+ double sc = 1.0 + 0.045 * c1;
+ double sh = 1.0 + 0.015 * c1;
+ double deltaLKlsl = deltaL / (1.0);
+ double deltaCkcsc = deltaC / (sc);
+ double deltaHkhsh = deltaH / (sh);
+ double i = deltaLKlsl * deltaLKlsl + deltaCkcsc * deltaCkcsc
+ + deltaHkhsh * deltaHkhsh;
+ return i < 0.0 ? 0.0 : sqrt(i);
+}
+
+bool
+lab_color::operator<(const lab_color& rhs) const
+{
+ if (lc_l < rhs.lc_l)
+ return true;
+ if (rhs.lc_l < lc_l)
+ return false;
+ if (lc_a < rhs.lc_a)
+ return true;
+ if (rhs.lc_a < lc_a)
+ return false;
+ return lc_b < rhs.lc_b;
+}
+
+bool
+lab_color::operator>(const lab_color& rhs) const
+{
+ return rhs < *this;
+}
+
+bool
+lab_color::operator<=(const lab_color& rhs) const
+{
+ return !(rhs < *this);
+}
+
+bool
+lab_color::operator>=(const lab_color& rhs) const
+{
+ return !(*this < rhs);
+}
+
+bool
+lab_color::operator==(const lab_color& rhs) const
+{
+ return lc_l == rhs.lc_l && lc_a == rhs.lc_a && lc_b == rhs.lc_b;
+}
+
+bool
+lab_color::operator!=(const lab_color& rhs) const
+{
+ return !(rhs == *this);
+}
+
+bool
+lab_color::sufficient_contrast(const lab_color& other) const
+{
+ if (std::abs(this->lc_l - other.lc_l) > 15) {
+ return true;
+ }
+
+ return (std::signbit(this->lc_a) != std::signbit(other.lc_a)
+ || std::signbit(this->lc_b) != std::signbit(other.lc_b));
+}
diff --git a/src/base/color_spaces.hh b/src/base/color_spaces.hh
new file mode 100644
index 0000000..22c4afc
--- /dev/null
+++ b/src/base/color_spaces.hh
@@ -0,0 +1,96 @@
+/**
+ * Copyright (c) 2024, Timothy Stack
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of Timothy Stack nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ''AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef color_spaces_hh
+#define color_spaces_hh
+
+struct rgb_color {
+ explicit rgb_color(short r = -1, short g = -1, short b = -1)
+ : rc_r(r), rc_g(g), rc_b(b)
+ {
+ }
+
+ bool empty() const
+ {
+ return this->rc_r == -1 && this->rc_g == -1 && this->rc_b == -1;
+ }
+
+ bool operator==(const rgb_color& rhs) const;
+
+ bool operator!=(const rgb_color& rhs) const;
+
+ bool operator<(const rgb_color& rhs) const;
+
+ bool operator>(const rgb_color& rhs) const;
+
+ bool operator<=(const rgb_color& rhs) const;
+
+ bool operator>=(const rgb_color& rhs) const;
+
+ short rc_r;
+ short rc_g;
+ short rc_b;
+};
+
+struct lab_color {
+ lab_color() : lc_l(0), lc_a(0), lc_b(0) {}
+
+ explicit lab_color(const rgb_color& rgb);
+
+ double deltaE(const lab_color& other) const;
+
+ bool sufficient_contrast(const lab_color& other) const;
+
+ lab_color& operator=(const lab_color& other)
+ {
+ this->lc_l = other.lc_l;
+ this->lc_a = other.lc_a;
+ this->lc_b = other.lc_b;
+
+ return *this;
+ }
+
+ bool operator==(const lab_color& rhs) const;
+
+ bool operator!=(const lab_color& rhs) const;
+
+ bool operator<(const lab_color& rhs) const;
+
+ bool operator>(const lab_color& rhs) const;
+
+ bool operator<=(const lab_color& rhs) const;
+
+ bool operator>=(const lab_color& rhs) const;
+
+ double lc_l;
+ double lc_a;
+ double lc_b;
+};
+
+#endif
diff --git a/src/base/date_time_scanner.cc b/src/base/date_time_scanner.cc
index 72b7e5d..c3a904b 100644
--- a/src/base/date_time_scanner.cc
+++ b/src/base/date_time_scanner.cc
@@ -34,6 +34,8 @@
#include "date_time_scanner.hh"
#include "config.h"
+#include "date_time_scanner.cfg.hh"
+#include "injector.hh"
#include "ptimec.hh"
#include "scn/scn.h"
@@ -45,17 +47,28 @@ date_time_scanner::ftime(char* dst,
{
off_t off = 0;
- if (time_fmt == nullptr) {
- PTIMEC_FORMATS[this->dts_fmt_lock].pf_ffunc(dst, off, len, tm);
- if (tm.et_flags & ETF_MILLIS_SET) {
- dst[off++] = '.';
- ftime_L(dst, off, len, tm);
- } else if (tm.et_flags & ETF_MICROS_SET) {
- dst[off++] = '.';
- ftime_f(dst, off, len, tm);
- } else if (tm.et_flags & ETF_NANOS_SET) {
- dst[off++] = '.';
- ftime_N(dst, off, len, tm);
+ if (time_fmt == nullptr || this->dts_fmt_lock == -1
+ || (tm.et_flags & ETF_MACHINE_ORIENTED))
+ {
+ auto index
+ = this->dts_fmt_lock != -1 && !(tm.et_flags & ETF_MACHINE_ORIENTED)
+ ? this->dts_fmt_lock
+ : PTIMEC_DEFAULT_FMT_INDEX;
+ PTIMEC_FORMATS[index].pf_ffunc(dst, off, len, tm);
+ if (tm.et_flags & ETF_SUB_NOT_IN_FORMAT) {
+ if (tm.et_flags & ETF_MILLIS_SET) {
+ dst[off++] = '.';
+ ftime_L(dst, off, len, tm);
+ } else if (tm.et_flags & ETF_MICROS_SET) {
+ dst[off++] = '.';
+ ftime_f(dst, off, len, tm);
+ } else if (tm.et_flags & ETF_NANOS_SET) {
+ dst[off++] = '.';
+ ftime_N(dst, off, len, tm);
+ }
+ }
+ if (index == PTIMEC_DEFAULT_FMT_INDEX && tm.et_flags & ETF_ZONE_SET) {
+ ftime_z(dst, off, len, tm);
}
dst[off] = '\0';
} else {
@@ -92,6 +105,9 @@ date_time_scanner::scan(const char* time_dest,
struct timeval& tv_out,
bool convert_local)
{
+ static const auto& cfg
+ = injector::get<const date_time_scanner_ns::config&>();
+
int curr_time_fmt = -1;
bool found = false;
const char* retval = nullptr;
@@ -100,32 +116,34 @@ date_time_scanner::scan(const char* time_dest,
time_fmt = PTIMEC_FORMAT_STR;
}
+ this->dts_zoned_to_local = cfg.c_zoned_to_local;
while (next_format(time_fmt, curr_time_fmt, this->dts_fmt_lock)) {
*tm_out = this->dts_base_tm;
tm_out->et_flags = 0;
if (time_len > 1 && time_dest[0] == '+' && isdigit(time_dest[1])) {
retval = nullptr;
- auto epoch_scan_res = scn::scan_value<int64_t>(
- scn::string_view{time_dest, time_len});
+ auto sv = scn::string_view{time_dest, time_len};
+ auto epoch_scan_res = scn::scan_value<int64_t>(sv);
if (epoch_scan_res) {
time_t gmt = epoch_scan_res.value();
- if (convert_local && this->dts_local_time) {
+ if (convert_local
+ && (this->dts_local_time || this->dts_zoned_to_local))
+ {
localtime_r(&gmt, &tm_out->et_tm);
#ifdef HAVE_STRUCT_TM_TM_ZONE
tm_out->et_tm.tm_zone = nullptr;
#endif
tm_out->et_tm.tm_isdst = 0;
- gmt = tm2sec(&tm_out->et_tm);
+ gmt = tm_out->to_timeval().tv_sec;
}
tv_out.tv_sec = gmt;
tv_out.tv_usec = 0;
tm_out->et_flags = ETF_DAY_SET | ETF_MONTH_SET | ETF_YEAR_SET
- | ETF_MACHINE_ORIENTED | ETF_EPOCH_TIME;
+ | ETF_MACHINE_ORIENTED | ETF_EPOCH_TIME | ETF_ZONE_SET;
this->dts_fmt_lock = curr_time_fmt;
- this->dts_fmt_len = std::distance(epoch_scan_res.begin(),
- epoch_scan_res.end());
+ this->dts_fmt_len = sv.length() - epoch_scan_res.range().size();
retval = time_dest + this->dts_fmt_len;
found = true;
break;
@@ -147,10 +165,25 @@ date_time_scanner::scan(const char* time_dest,
}
if (convert_local
&& (this->dts_local_time
- || tm_out->et_flags & ETF_EPOCH_TIME))
+ || tm_out->et_flags & ETF_EPOCH_TIME
+ || ((tm_out->et_flags & ETF_ZONE_SET
+ || this->dts_default_zone != nullptr)
+ && this->dts_zoned_to_local)))
{
- time_t gmt = tm2sec(&tm_out->et_tm);
-
+ time_t gmt = tm_out->to_timeval().tv_sec;
+
+ if (!(tm_out->et_flags & ETF_ZONE_SET)
+ && !(tm_out->et_flags & ETF_EPOCH_TIME)
+ && this->dts_default_zone != nullptr)
+ {
+ date::local_seconds stime;
+ stime += std::chrono::seconds{gmt};
+ auto ztime
+ = date::make_zoned(this->dts_default_zone, stime);
+ gmt = std::chrono::duration_cast<std::chrono::seconds>(
+ ztime.get_sys_time().time_since_epoch())
+ .count();
+ }
this->to_localtime(gmt, *tm_out);
}
const auto& last_tm = this->dts_last_tm.et_tm;
@@ -167,8 +200,7 @@ date_time_scanner::scan(const char* time_dest,
tv_out.tv_sec += sec_diff;
tm_out->et_tm.tm_wday = last_tm.tm_wday;
} else {
- // log_debug("doing tm2sec");
- tv_out.tv_sec = tm2sec(&tm_out->et_tm);
+ tv_out = tm_out->to_timeval();
secs2wday(tv_out, &tm_out->et_tm);
}
tv_out.tv_usec = tm_out->et_nsec / 1000;
@@ -198,9 +230,11 @@ date_time_scanner::scan(const char* time_dest,
}
if (convert_local
&& (this->dts_local_time
- || tm_out->et_flags & ETF_EPOCH_TIME))
+ || tm_out->et_flags & ETF_EPOCH_TIME
+ || (tm_out->et_flags & ETF_ZONE_SET
+ && this->dts_zoned_to_local)))
{
- time_t gmt = tm2sec(&tm_out->et_tm);
+ time_t gmt = tm_out->to_timeval().tv_sec;
this->to_localtime(gmt, *tm_out);
#ifdef HAVE_STRUCT_TM_TM_ZONE
@@ -209,8 +243,7 @@ date_time_scanner::scan(const char* time_dest,
tm_out->et_tm.tm_isdst = 0;
}
- tv_out.tv_sec = tm2sec(&tm_out->et_tm);
- tv_out.tv_usec = tm_out->et_nsec / 1000;
+ tv_out = tm_out->to_timeval();
secs2wday(tv_out, &tm_out->et_tm);
this->dts_fmt_lock = curr_time_fmt;
@@ -234,7 +267,10 @@ date_time_scanner::scan(const char* time_dest,
if (retval != nullptr && static_cast<size_t>(retval - time_dest) < time_len)
{
/* Try to pull out the milli/micro-second value. */
- if (retval[0] == '.' || retval[0] == ',') {
+ if (!(tm_out->et_flags
+ & (ETF_MILLIS_SET | ETF_MICROS_SET | ETF_NANOS_SET))
+ && (retval[0] == '.' || retval[0] == ','))
+ {
off_t off = (retval - time_dest) + 1;
if (ptime_N(tm_out, time_dest, off, time_len)) {
@@ -243,7 +279,7 @@ date_time_scanner::scan(const char* time_dest,
std::chrono::nanoseconds{tm_out->et_nsec})
.count();
this->dts_fmt_len += 10;
- tm_out->et_flags |= ETF_NANOS_SET;
+ tm_out->et_flags |= ETF_NANOS_SET | ETF_SUB_NOT_IN_FORMAT;
retval += 10;
} else if (ptime_f(tm_out, time_dest, off, time_len)) {
tv_out.tv_usec
@@ -251,7 +287,7 @@ date_time_scanner::scan(const char* time_dest,
std::chrono::nanoseconds{tm_out->et_nsec})
.count();
this->dts_fmt_len += 7;
- tm_out->et_flags |= ETF_MICROS_SET;
+ tm_out->et_flags |= ETF_MICROS_SET | ETF_SUB_NOT_IN_FORMAT;
retval += 7;
} else if (ptime_L(tm_out, time_dest, off, time_len)) {
tv_out.tv_usec
@@ -259,7 +295,7 @@ date_time_scanner::scan(const char* time_dest,
std::chrono::nanoseconds{tm_out->et_nsec})
.count();
this->dts_fmt_len += 4;
- tm_out->et_flags |= ETF_MILLIS_SET;
+ tm_out->et_flags |= ETF_MILLIS_SET | ETF_SUB_NOT_IN_FORMAT;
retval += 4;
}
}
@@ -287,22 +323,27 @@ date_time_scanner::to_localtime(time_t t, exttm& tm_out)
if (t < this->dts_local_offset_valid || t >= this->dts_local_offset_expiry)
{
- time_t new_gmt;
-
localtime_r(&t, &tm_out.et_tm);
+ // Clear the gmtoff set by localtime_r() otherwise tm2sec() will
+ // convert the time back again.
#ifdef HAVE_STRUCT_TM_TM_ZONE
+ tm_out.et_tm.tm_gmtoff = 0;
tm_out.et_tm.tm_zone = nullptr;
#endif
tm_out.et_tm.tm_isdst = 0;
-
- new_gmt = tm2sec(&tm_out.et_tm);
- this->dts_local_offset_cache = t - new_gmt;
+ auto new_gmt = tm2sec(&tm_out.et_tm);
+ this->dts_local_offset_cache = new_gmt - t;
this->dts_local_offset_valid = t;
this->dts_local_offset_expiry = t + (EXPIRE_TIME - 1);
this->dts_local_offset_expiry
-= this->dts_local_offset_expiry % EXPIRE_TIME;
} else {
- time_t adjust_gmt = t - this->dts_local_offset_cache;
- gmtime_r(&adjust_gmt, &tm_out.et_tm);
+ time_t adjust_gmt = t + this->dts_local_offset_cache;
+ secs2tm(adjust_gmt, &tm_out.et_tm);
}
+ tm_out.et_gmtoff = 0;
+#ifdef HAVE_STRUCT_TM_TM_ZONE
+ tm_out.et_tm.tm_gmtoff = 0;
+ tm_out.et_tm.tm_zone = nullptr;
+#endif
}
diff --git a/src/base/date_time_scanner.cfg.hh b/src/base/date_time_scanner.cfg.hh
new file mode 100644
index 0000000..7921aee
--- /dev/null
+++ b/src/base/date_time_scanner.cfg.hh
@@ -0,0 +1,43 @@
+/**
+ * Copyright (c) 2020, Timothy Stack
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of Timothy Stack nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ''AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * @file date_time_scanner.hh
+ */
+
+#ifndef lnav_date_time_scanner_cfg_hh
+#define lnav_date_time_scanner_cfg_hh
+
+namespace date_time_scanner_ns {
+
+struct config {
+ bool c_zoned_to_local{true};
+};
+
+} // namespace date_time_scanner_ns
+
+#endif
diff --git a/src/base/date_time_scanner.hh b/src/base/date_time_scanner.hh
index 90eaffa..cf8a0da 100644
--- a/src/base/date_time_scanner.hh
+++ b/src/base/date_time_scanner.hh
@@ -37,6 +37,7 @@
#include <sys/types.h>
+#include "date/tz.h"
#include "time_util.hh"
/**
@@ -59,13 +60,27 @@ struct date_time_scanner {
this->dts_last_tm = exttm{};
}
+ struct lock_state {
+ int ls_fmt_index{-1};
+ int ls_fmt_len{-1};
+ };
+
/**
* Unlock this scanner so that the format is rediscovered.
*/
- void unlock()
+ lock_state unlock()
{
+ auto retval = lock_state{this->dts_fmt_lock, this->dts_fmt_len};
+
this->dts_fmt_lock = -1;
this->dts_fmt_len = -1;
+ return retval;
+ }
+
+ void relock(const lock_state& ls)
+ {
+ this->dts_fmt_lock = ls.ls_fmt_index;
+ this->dts_fmt_len = ls.ls_fmt_len;
}
void set_base_time(time_t base_time, const tm& local_tm);
@@ -81,6 +96,7 @@ struct date_time_scanner {
bool dts_keep_base_tz{false};
bool dts_local_time{false};
+ bool dts_zoned_to_local{true};
time_t dts_base_time{0};
struct exttm dts_base_tm;
int dts_fmt_lock{-1};
@@ -90,6 +106,7 @@ struct date_time_scanner {
time_t dts_local_offset_cache{0};
time_t dts_local_offset_valid{0};
time_t dts_local_offset_expiry{0};
+ const date::time_zone* dts_default_zone{nullptr};
static const int EXPIRE_TIME = 15 * 60;
diff --git a/src/base/from_trait.hh b/src/base/from_trait.hh
new file mode 100644
index 0000000..05c426e
--- /dev/null
+++ b/src/base/from_trait.hh
@@ -0,0 +1,40 @@
+/**
+ * Copyright (c) 2024, Timothy Stack
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of Timothy Stack nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ''AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef from_trait_hh
+#define from_trait_hh
+
+#include <string>
+
+#include "result.h"
+
+template<typename R, typename S>
+Result<R, std::string> from(S v);
+
+#endif
diff --git a/src/base/fs_util.cc b/src/base/fs_util.cc
index f72aaa6..7cbc228 100644
--- a/src/base/fs_util.cc
+++ b/src/base/fs_util.cc
@@ -29,14 +29,30 @@
#include "fs_util.hh"
+#include <stdlib.h>
+
#include "config.h"
#include "fmt/format.h"
#include "itertools.hh"
+#include "lnav_log.hh"
#include "opt_util.hh"
namespace lnav {
namespace filesystem {
+Result<ghc::filesystem::path, std::string>
+realpath(const ghc::filesystem::path& path)
+{
+ char resolved[PATH_MAX];
+ auto rc = ::realpath(path.c_str(), resolved);
+
+ if (rc == nullptr) {
+ return Err(std::string(strerror(errno)));
+ }
+
+ return Ok(ghc::filesystem::path(resolved));
+}
+
Result<auto_fd, std::string>
create_file(const ghc::filesystem::path& path, int flags, mode_t mode)
{
@@ -73,7 +89,7 @@ open_temp_file(const ghc::filesystem::path& pattern)
int fd;
strcpy(pattern_copy, pattern_str.c_str());
- if ((fd = mkstemp(pattern_copy)) == -1) {
+ if ((fd = mkostemp(pattern_copy, O_CLOEXEC)) == -1) {
return Err(
fmt::format(FMT_STRING("unable to create temporary file: {} -- {}"),
pattern.string(),
@@ -102,9 +118,12 @@ read_file(const ghc::filesystem::path& path)
}
}
-Result<void, std::string>
-write_file(const ghc::filesystem::path& path, const string_fragment& content)
+Result<write_file_result, std::string>
+write_file(const ghc::filesystem::path& path,
+ const string_fragment& content,
+ std::set<write_file_options> options)
{
+ write_file_result retval;
auto tmp_pattern = path;
tmp_pattern += ".XXXXXX";
@@ -123,7 +142,25 @@ write_file(const ghc::filesystem::path& path, const string_fragment& content)
bytes_written,
content.length()));
}
+
std::error_code ec;
+ if (options.count(write_file_options::backup_existing)) {
+ if (ghc::filesystem::exists(path, ec)) {
+ auto backup_path = path;
+
+ backup_path += ".bak";
+ ghc::filesystem::rename(path, backup_path, ec);
+ if (ec) {
+ return Err(
+ fmt::format(FMT_STRING("unable to backup file {}: {}"),
+ path.string(),
+ ec.message()));
+ }
+
+ retval.wfr_backup_path = backup_path;
+ }
+ }
+
ghc::filesystem::rename(tmp_pair.first, path, ec);
if (ec) {
return Err(
@@ -132,7 +169,7 @@ write_file(const ghc::filesystem::path& path, const string_fragment& content)
ec.message()));
}
- return Ok();
+ return Ok(retval);
}
std::string
@@ -181,3 +218,20 @@ file_lock::file_lock(const ghc::filesystem::path& archive_path)
} // namespace filesystem
} // namespace lnav
+
+namespace fmt {
+
+auto
+formatter<ghc::filesystem::path>::format(const ghc::filesystem::path& p,
+ format_context& ctx)
+ -> decltype(ctx.out()) const
+{
+ auto esc_res = fmt::v10::detail::find_escape(&(*p.native().begin()),
+ &(*p.native().end()));
+ if (esc_res.end == nullptr) {
+ return formatter<string_view>::format(p.native(), ctx);
+ }
+
+ return format_to(ctx.out(), FMT_STRING("{:?}"), p.native());
+}
+} // namespace fmt
diff --git a/src/base/fs_util.hh b/src/base/fs_util.hh
index b9253ff..7553075 100644
--- a/src/base/fs_util.hh
+++ b/src/base/fs_util.hh
@@ -30,6 +30,7 @@
#ifndef lnav_fs_util_hh
#define lnav_fs_util_hh
+#include <set>
#include <string>
#include <vector>
@@ -41,6 +42,14 @@
namespace lnav {
namespace filesystem {
+inline bool
+is_glob(const std::string& fn)
+{
+ return (fn.find('*') != std::string::npos
+ || fn.find('?') != std::string::npos
+ || fn.find('[') != std::string::npos);
+}
+
inline int
statp(const ghc::filesystem::path& path, struct stat* buf)
{
@@ -59,6 +68,9 @@ openp(const ghc::filesystem::path& path, int flags, mode_t mode)
return open(path.c_str(), flags, mode);
}
+Result<ghc::filesystem::path, std::string> realpath(
+ const ghc::filesystem::path& path);
+
Result<auto_fd, std::string> create_file(const ghc::filesystem::path& path,
int flags,
mode_t mode);
@@ -73,8 +85,18 @@ Result<std::pair<ghc::filesystem::path, auto_fd>, std::string> open_temp_file(
Result<std::string, std::string> read_file(const ghc::filesystem::path& path);
-Result<void, std::string> write_file(const ghc::filesystem::path& path,
- const string_fragment& content);
+enum class write_file_options {
+ backup_existing,
+};
+
+struct write_file_result {
+ nonstd::optional<ghc::filesystem::path> wfr_backup_path;
+};
+
+Result<write_file_result, std::string> write_file(
+ const ghc::filesystem::path& path,
+ const string_fragment& content,
+ std::set<write_file_options> options = {});
std::string build_path(const std::vector<ghc::filesystem::path>& paths);
@@ -119,4 +141,12 @@ public:
} // namespace filesystem
} // namespace lnav
+namespace fmt {
+template<>
+struct formatter<ghc::filesystem::path> : formatter<string_view> {
+ auto format(const ghc::filesystem::path& p, format_context& ctx)
+ -> decltype(ctx.out()) const;
+};
+} // namespace fmt
+
#endif
diff --git a/src/base/future_util.hh b/src/base/future_util.hh
index 8797faa..ad57459 100644
--- a/src/base/future_util.hh
+++ b/src/base/future_util.hh
@@ -57,22 +57,32 @@ make_ready_future(T&& t)
* A queue used to limit the number of futures that are running concurrently.
*
* @tparam T The result of the futures.
- * @tparam MAX_QUEUE_SIZE The maximum number of futures that can be in flight.
*/
-template<typename T, int MAX_QUEUE_SIZE = 8>
+template<typename T>
class future_queue {
public:
+ enum class processor_result_t {
+ ok,
+ interrupt,
+ };
+
/**
* @param processor The function to execute with the result of a future.
+ * @param max_queue_size The maximum number of futures that can be in
+ * flight.
*/
- explicit future_queue(std::function<void(T&)> processor)
- : fq_processor(processor){};
-
- ~future_queue()
+ explicit future_queue(
+ std::function<processor_result_t(std::future<T>&)> processor,
+ size_t max_queue_size = 8)
+ : fq_processor(processor), fq_max_queue_size(max_queue_size)
{
- this->pop_to();
}
+ future_queue(const future_queue&) = delete;
+ future_queue& operator=(const future_queue&) = delete;
+
+ ~future_queue() { this->pop_to(); }
+
/**
* Add a future to the queue. If the size of the queue is greater than the
* MAX_QUEUE_SIZE, this call will block waiting for the first queued
@@ -80,10 +90,10 @@ public:
*
* @param f The future to add to the queue.
*/
- void push_back(std::future<T>&& f)
+ processor_result_t push_back(std::future<T>&& f)
{
this->fq_deque.emplace_back(std::move(f));
- this->pop_to(MAX_QUEUE_SIZE);
+ return this->pop_to(this->fq_max_queue_size);
}
/**
@@ -92,17 +102,24 @@ public:
*
* @param size The new desired size of the queue.
*/
- void pop_to(size_t size = 0)
+ processor_result_t pop_to(size_t size = 0)
{
+ processor_result_t retval = processor_result_t::ok;
+
while (this->fq_deque.size() > size) {
- auto v = this->fq_deque.front().get();
- this->fq_processor(v);
+ if (this->fq_processor(this->fq_deque.front())
+ == processor_result_t::interrupt)
+ {
+ retval = processor_result_t::interrupt;
+ }
this->fq_deque.pop_front();
}
+ return retval;
}
- std::function<void(T&)> fq_processor;
+ std::function<processor_result_t(std::future<T>&)> fq_processor;
std::deque<std::future<T>> fq_deque;
+ size_t fq_max_queue_size;
};
} // namespace futures
diff --git a/src/base/humanize.time.cc b/src/base/humanize.time.cc
index 68cfe0f..a791a3d 100644
--- a/src/base/humanize.time.cc
+++ b/src/base/humanize.time.cc
@@ -33,6 +33,7 @@
#include "config.h"
#include "fmt/format.h"
+#include "math_util.hh"
#include "time_util.hh"
namespace humanize {
@@ -161,18 +162,21 @@ duration::to_string() const
millis = -millis;
}
- uint64_t remaining;
+ uint64_t remaining = millis.count();
+ uint64_t scale = 1;
+ if (this->d_msecs_resolution > 0) {
+ remaining = roundup(remaining, this->d_msecs_resolution);
+ }
if (millis >= 10min) {
- remaining
- = std::chrono::duration_cast<std::chrono::seconds>(millis).count();
+ remaining /= curr_interval->length;
+ scale *= curr_interval->length;
curr_interval += 1;
- } else {
- remaining = millis.count();
}
for (; curr_interval != std::end(intervals); curr_interval++) {
uint64_t amount;
char segment[32];
+ auto skip = scale < this->d_msecs_resolution;
if (curr_interval->length) {
amount = remaining % curr_interval->length;
@@ -181,11 +185,16 @@ duration::to_string() const
amount = remaining;
remaining = 0;
}
+ scale *= curr_interval->length;
- if (!amount && !remaining) {
+ if (amount == 0 && remaining == 0) {
break;
}
+ if (skip) {
+ continue;
+ }
+
snprintf(segment,
sizeof(segment),
curr_interval->format,
diff --git a/src/base/humanize.time.hh b/src/base/humanize.time.hh
index 96edebd..e1ebf67 100644
--- a/src/base/humanize.time.hh
+++ b/src/base/humanize.time.hh
@@ -74,12 +74,22 @@ class duration {
public:
static duration from_tv(const struct timeval& tv);
+ template<class Rep, class Period>
+ duration& with_resolution(const std::chrono::duration<Rep, Period>& res)
+ {
+ this->d_msecs_resolution
+ = std::chrono::duration_cast<std::chrono::milliseconds>(res)
+ .count();
+ return *this;
+ }
+
std::string to_string() const;
private:
explicit duration(const struct timeval& tv) : d_timeval(tv) {}
struct timeval d_timeval;
+ uint64_t d_msecs_resolution{1};
};
} // namespace time
diff --git a/src/base/intern_string.cc b/src/base/intern_string.cc
index 676d2bc..010da52 100644
--- a/src/base/intern_string.cc
+++ b/src/base/intern_string.cc
@@ -37,6 +37,7 @@
#include "config.h"
#include "pcrepp/pcre2pp.hh"
+#include "ww898/cp_utf8.hpp"
#include "xxHash/xxhash.h"
const static int TABLE_SIZE = 4095;
@@ -224,7 +225,9 @@ string_fragment::split_lines() const
start = index + 1;
}
}
- retval.emplace_back(this->sf_string, start, this->sf_end);
+ if (retval.empty() || start < this->sf_end) {
+ retval.emplace_back(this->sf_string, start, this->sf_end);
+ }
return retval;
}
@@ -301,3 +304,164 @@ string_fragment::to_string_with_case_style(case_style style) const
return retval;
}
+
+std::string
+string_fragment::to_unquoted_string() const
+{
+ auto sub_sf = *this;
+
+ if (sub_sf.startswith("r") || sub_sf.startswith("u")) {
+ sub_sf = sub_sf.consume_n(1).value();
+ }
+ if (sub_sf.length() >= 2
+ && ((sub_sf.startswith("\"") && sub_sf.endswith("\""))
+ || (sub_sf.startswith("'") && sub_sf.endswith("'"))))
+ {
+ std::string retval;
+
+ sub_sf.sf_begin += 1;
+ sub_sf.sf_end -= 1;
+ retval.reserve(this->length());
+
+ auto in_escape = false;
+ for (auto ch : sub_sf) {
+ if (in_escape) {
+ switch (ch) {
+ case 'n':
+ retval.push_back('\n');
+ break;
+ case 't':
+ retval.push_back('\t');
+ break;
+ case 'r':
+ retval.push_back('\r');
+ break;
+ default:
+ retval.push_back(ch);
+ break;
+ }
+ in_escape = false;
+ } else if (ch == '\\') {
+ in_escape = true;
+ } else {
+ retval.push_back(ch);
+ }
+ }
+
+ return retval;
+ }
+
+ return this->to_string();
+}
+
+uint32_t
+string_fragment::front_codepoint() const
+{
+ size_t index = 0;
+ auto read_res = ww898::utf::utf8::read(
+ [this, &index]() { return this->data()[index++]; });
+ if (read_res.isErr()) {
+ return this->data()[0];
+ }
+ return read_res.unwrap();
+}
+
+Result<ssize_t, const char*>
+string_fragment::codepoint_to_byte_index(ssize_t cp_index) const
+{
+ ssize_t retval = 0;
+
+ while (cp_index > 0) {
+ if (retval >= this->length()) {
+ return Err("index is beyond the end of the string");
+ }
+ auto ch_len = TRY(ww898::utf::utf8::char_size([this, retval]() {
+ return std::make_pair(this->data()[retval],
+ this->length() - retval - 1);
+ }));
+
+ retval += ch_len;
+ cp_index -= 1;
+ }
+
+ return Ok(retval);
+}
+
+string_fragment
+string_fragment::sub_cell_range(int cell_start, int cell_end) const
+{
+ int byte_index = this->sf_begin;
+ nonstd::optional<int> byte_start;
+ nonstd::optional<int> byte_end;
+ int cell_index = 0;
+
+ while (byte_index < this->sf_end) {
+ if (cell_start == cell_index) {
+ byte_start = byte_index;
+ }
+ if (!byte_end && cell_index >= cell_end) {
+ byte_end = byte_index;
+ break;
+ }
+ auto read_res = ww898::utf::utf8::read(
+ [this, &byte_index]() { return this->sf_string[byte_index++]; });
+ if (read_res.isErr()) {
+ byte_index += 1;
+ } else {
+ auto ch = read_res.unwrap();
+
+ switch (ch) {
+ case '\t':
+ do {
+ cell_index += 1;
+ } while (cell_index % 8);
+ break;
+ default:
+ cell_index += wcwidth(read_res.unwrap());
+ break;
+ }
+ }
+ }
+ if (cell_start == cell_index) {
+ byte_start = byte_index;
+ }
+ if (!byte_end) {
+ byte_end = byte_index;
+ }
+
+ if (byte_start && byte_end) {
+ return this->sub_range(byte_start.value(), byte_end.value());
+ }
+
+ return string_fragment{};
+}
+
+size_t
+string_fragment::column_width() const
+{
+ auto index = this->sf_begin;
+ size_t retval = 0;
+
+ while (index < this->sf_end) {
+ auto read_res = ww898::utf::utf8::read(
+ [this, &index]() { return this->sf_string[index++]; });
+ if (read_res.isErr()) {
+ retval += 1;
+ } else {
+ auto ch = read_res.unwrap();
+
+ switch (ch) {
+ case '\t':
+ do {
+ retval += 1;
+ } while (retval % 8);
+ break;
+ default:
+ retval += wcwidth(read_res.unwrap());
+ break;
+ }
+ }
+ }
+
+ return retval;
+}
diff --git a/src/base/intern_string.hh b/src/base/intern_string.hh
index 4ae40da..f77dc49 100644
--- a/src/base/intern_string.hh
+++ b/src/base/intern_string.hh
@@ -33,7 +33,6 @@
#define intern_string_hh
#include <ostream>
-#include <string>
#include <vector>
#include <assert.h>
@@ -42,9 +41,9 @@
#include "fmt/format.h"
#include "optional.hpp"
+#include "result.h"
#include "scn/util/string_view.h"
#include "strnatcmp.h"
-#include "ww898/cp_utf8.hpp"
struct string_fragment {
using iterator = const char*;
@@ -143,6 +142,8 @@ struct string_fragment {
Result<ssize_t, const char*> utf8_length() const;
+ size_t column_width() const;
+
const char* data() const { return &this->sf_string[this->sf_begin]; }
const unsigned char* udata() const
@@ -157,16 +158,7 @@ struct string_fragment {
char front() const { return this->sf_string[this->sf_begin]; }
- uint32_t front_codepoint() const
- {
- size_t index = 0;
- try {
- return ww898::utf::utf8::read(
- [this, &index]() { return this->data()[index++]; });
- } catch (const std::runtime_error& e) {
- return this->data()[0];
- }
- }
+ uint32_t front_codepoint() const;
char back() const { return this->sf_string[this->sf_end - 1]; }
@@ -183,25 +175,10 @@ struct string_fragment {
bool empty() const { return !this->is_valid() || length() == 0; }
- Result<ssize_t, const char*> codepoint_to_byte_index(ssize_t cp_index) const
- {
- ssize_t retval = 0;
-
- while (cp_index > 0) {
- if (retval >= this->length()) {
- return Err("index is beyond the end of the string");
- }
- auto ch_len = TRY(ww898::utf::utf8::char_size([this, retval]() {
- return std::make_pair(this->data()[retval],
- this->length() - retval - 1);
- }));
-
- retval += ch_len;
- cp_index -= 1;
- }
+ Result<ssize_t, const char*> codepoint_to_byte_index(
+ ssize_t cp_index) const;
- return Ok(retval);
- }
+ string_fragment sub_cell_range(int cell_start, int cell_end) const;
const char& operator[](int index) const
{
@@ -228,6 +205,22 @@ struct string_fragment {
return memcmp(this->data(), sf.data(), sf.length()) == 0;
}
+ bool operator!=(const string_fragment& rhs) const
+ {
+ return !(*this == rhs);
+ }
+
+ bool operator<(const string_fragment& rhs) const
+ {
+ auto rc = strncmp(
+ this->data(), rhs.data(), std::min(this->length(), rhs.length()));
+ if (rc < 0 || (rc == 0 && this->length() < rhs.length())) {
+ return true;
+ }
+
+ return false;
+ }
+
bool iequal(const string_fragment& sf) const
{
if (this->length() != sf.length()) {
@@ -290,6 +283,12 @@ struct string_fragment {
this->sf_string, this->sf_begin + begin, this->sf_begin + end};
}
+ bool contains(const string_fragment& sf) const
+ {
+ return this->sf_string == sf.sf_string && this->sf_begin <= sf.sf_begin
+ && sf.sf_end <= this->sf_end;
+ }
+
size_t count(char ch) const
{
size_t retval = 0;
@@ -315,7 +314,9 @@ struct string_fragment {
}
template<typename P>
- string_fragment find_left_boundary(size_t start, P&& predicate) const
+ string_fragment find_left_boundary(size_t start,
+ P&& predicate,
+ size_t count = 1) const
{
assert((int) start <= this->length());
@@ -324,25 +325,33 @@ struct string_fragment {
}
while (start > 0) {
if (predicate(this->data()[start])) {
- start += 1;
- break;
+ count -= 1;
+ if (count == 0) {
+ start += 1;
+ break;
+ }
}
start -= 1;
}
return string_fragment{
this->sf_string,
- (int) start,
+ this->sf_begin + (int) start,
this->sf_end,
};
}
template<typename P>
- string_fragment find_right_boundary(size_t start, P&& predicate) const
+ string_fragment find_right_boundary(size_t start,
+ P&& predicate,
+ size_t count = 1) const
{
while ((int) start < this->length()) {
if (predicate(this->data()[start])) {
- break;
+ count -= 1;
+ if (count == 0) {
+ break;
+ }
}
start += 1;
}
@@ -355,10 +364,14 @@ struct string_fragment {
}
template<typename P>
- string_fragment find_boundaries_around(size_t start, P&& predicate) const
+ string_fragment find_boundaries_around(size_t start,
+ P&& predicate,
+ size_t count = 1) const
{
- return this->template find_left_boundary(start, predicate)
- .find_right_boundary(0, predicate);
+ auto left = this->template find_left_boundary(start, predicate, count);
+
+ return left.find_right_boundary(
+ start - left.sf_begin, predicate, count);
}
nonstd::optional<std::pair<uint32_t, string_fragment>> consume_codepoint()
@@ -446,8 +459,10 @@ struct string_fragment {
});
}
+ using split_when_result = std::pair<string_fragment, string_fragment>;
+
template<typename P>
- split_result split_when(P&& predicate) const
+ split_when_result split_when(P&& predicate) const
{
int consumed = 0;
while (consumed < this->length()) {
@@ -458,7 +473,33 @@ struct string_fragment {
consumed += 1;
}
- if (consumed == 0) {
+ return std::make_pair(
+ string_fragment{
+ this->sf_string,
+ this->sf_begin,
+ this->sf_begin + consumed,
+ },
+ string_fragment{
+ this->sf_string,
+ this->sf_begin + consumed
+ + ((consumed == this->length()) ? 0 : 1),
+ this->sf_end,
+ });
+ }
+
+ template<typename P>
+ split_result split_pair(P&& predicate) const
+ {
+ int consumed = 0;
+ while (consumed < this->length()) {
+ if (predicate(this->data()[consumed])) {
+ break;
+ }
+
+ consumed += 1;
+ }
+
+ if (consumed == this->length()) {
return nonstd::nullopt;
}
@@ -517,6 +558,8 @@ struct string_fragment {
return {this->data(), (size_t) this->length()};
}
+ std::string to_unquoted_string() const;
+
void clear()
{
this->sf_begin = 0;
@@ -823,6 +866,12 @@ operator==(const string_fragment& left, const intern_string_t& right)
&& (memcmp(left.data(), right.get(), left.length()) == 0);
}
+inline string_fragment
+operator"" _frag(const char* str, std::size_t len)
+{
+ return string_fragment::from_byte_range(str, 0, len);
+}
+
namespace std {
inline string
to_string(const string_fragment& s)
@@ -855,6 +904,12 @@ to_string_fragment(const std::string& s)
return string_fragment(s.c_str(), 0, s.length());
}
+inline string_fragment
+to_string_fragment(const scn::string_view& sv)
+{
+ return string_fragment::from_bytes(sv.data(), sv.length());
+}
+
struct frag_hasher {
size_t operator()(const string_fragment& sf) const
{
@@ -862,4 +917,11 @@ struct frag_hasher {
}
};
+struct intern_hasher {
+ size_t operator()(const intern_string_t& is) const
+ {
+ return hash_str(is.c_str(), is.size());
+ }
+};
+
#endif
diff --git a/src/base/intern_string.tests.cc b/src/base/intern_string.tests.cc
index 8816803..71ff7c2 100644
--- a/src/base/intern_string.tests.cc
+++ b/src/base/intern_string.tests.cc
@@ -43,6 +43,15 @@ TEST_CASE("string_fragment::startswith")
CHECK_FALSE(sf.startswith("abc"));
}
+TEST_CASE("string_fragment::lt")
+{
+ auto sf1 = string_fragment::from_const("abc");
+ auto sf2 = string_fragment::from_const("abcdef");
+
+ CHECK(sf1 < sf2);
+ CHECK_FALSE(sf2 < sf1);
+}
+
TEST_CASE("split_lines")
{
std::string in1 = "Hello, World!";
@@ -129,6 +138,12 @@ TEST_CASE("find_left_boundary")
auto world_sf = sf.find_left_boundary(
in1.length() - 3, [](auto ch) { return ch == '\n'; });
CHECK(world_sf.to_string() == "World!\n");
+ auto world_sf2 = sf.find_left_boundary(
+ in1.length() - 3, [](auto ch) { return ch == '\n'; }, 2);
+ CHECK(world_sf2.to_string() == "Hello,\nWorld!\n");
+ auto world_sf3 = sf.find_left_boundary(
+ in1.length() - 3, [](auto ch) { return ch == '\n'; }, 3);
+ CHECK(world_sf3.to_string() == "Hello,\nWorld!\n");
auto full_sf
= sf.find_left_boundary(3, [](auto ch) { return ch == '\n'; });
CHECK(full_sf.to_string() == in1);
@@ -137,16 +152,35 @@ TEST_CASE("find_left_boundary")
TEST_CASE("find_right_boundary")
{
- std::string in1 = "Hello,\nWorld!\n";
-
{
- auto sf = string_fragment{in1};
+ const auto sf = string_fragment::from_const("Hello,\nWorld!\n");
- auto world_sf = sf.find_right_boundary(
- in1.length() - 3, [](auto ch) { return ch == '\n'; });
+ auto world_sf = sf.find_right_boundary(sf.length() - 3,
+ string_fragment::tag1{'\n'});
CHECK(world_sf.to_string() == "Hello,\nWorld!");
auto hello_sf
= sf.find_right_boundary(3, [](auto ch) { return ch == '\n'; });
CHECK(hello_sf.to_string() == "Hello,");
+ auto hello_sf2
+ = sf.find_right_boundary(3, string_fragment::tag1{'\n'}, 2);
+ CHECK(hello_sf2.to_string() == "Hello,\nWorld!");
+ }
+}
+
+TEST_CASE("find_boundaries_around")
+{
+ {
+ const auto sf = string_fragment::from_const(
+ R"(Hello,
+World!
+Goodbye,
+World!)");
+
+ auto all_sf1
+ = sf.find_boundaries_around(3, string_fragment::tag1{'\n'});
+ CHECK(all_sf1 == "Hello,");
+ auto all_sf2
+ = sf.find_boundaries_around(3, string_fragment::tag1{'\n'}, 2);
+ CHECK(all_sf2 == "Hello,\nWorld!");
}
}
diff --git a/src/base/is_utf8.cc b/src/base/is_utf8.cc
index f55dfe0..b8fbab0 100644
--- a/src/base/is_utf8.cc
+++ b/src/base/is_utf8.cc
@@ -64,7 +64,7 @@ is_utf8(string_fragment str, nonstd::optional<unsigned char> terminator)
{
const auto* ustr = str.udata();
utf8_scan_result retval;
- ssize_t i = 0;
+ ssize_t i = 0, valid_end = 0;
while (i < str.length()) {
if (ustr[i] == '\x1b') {
@@ -72,20 +72,21 @@ is_utf8(string_fragment str, nonstd::optional<unsigned char> terminator)
}
if (terminator && ustr[i] == terminator.value()) {
- if (retval.usr_message == nullptr) {
- retval.usr_valid_frag = str.sub_range(0, i);
- }
retval.usr_remaining = str.substr(i + 1);
break;
}
+ retval.usr_column_width_guess += 1;
if (retval.usr_message != nullptr) {
i += 1;
continue;
}
- retval.usr_valid_frag = str.sub_range(0, i);
+ valid_end = i;
if (ustr[i] <= 0x7F) /* 00..7F */ {
+ if (ustr[i] == '\t') {
+ retval.usr_column_width_guess += 7;
+ }
i += 1;
} else if (ustr[i] >= 0xC2 && ustr[i] <= 0xDF) /* C2..DF 80..BF */ {
if (i + 1 < str.length()) /* Expect a 2nd byte */ {
@@ -308,6 +309,8 @@ is_utf8(string_fragment str, nonstd::optional<unsigned char> terminator)
}
if (retval.usr_message == nullptr) {
retval.usr_valid_frag = str.sub_range(0, i);
+ } else {
+ retval.usr_valid_frag = str.sub_range(0, valid_end);
}
return retval;
}
diff --git a/src/base/is_utf8.hh b/src/base/is_utf8.hh
index 56a959f..81d09c6 100644
--- a/src/base/is_utf8.hh
+++ b/src/base/is_utf8.hh
@@ -40,6 +40,7 @@ struct utf8_scan_result {
string_fragment usr_valid_frag{string_fragment::invalid()};
nonstd::optional<string_fragment> usr_remaining;
bool usr_has_ansi{false};
+ size_t usr_column_width_guess{0};
const char* remaining_ptr(const string_fragment& frag) const
{
diff --git a/src/base/itertools.hh b/src/base/itertools.hh
index 058ceb8..70286fb 100644
--- a/src/base/itertools.hh
+++ b/src/base/itertools.hh
@@ -31,6 +31,8 @@
#define lnav_itertools_hh
#include <algorithm>
+#include <deque>
+#include <map>
#include <memory>
#include <set>
#include <type_traits>
@@ -138,8 +140,16 @@ struct max_with_init {
struct sum {};
+struct to_vector {};
+
} // namespace details
+inline details::to_vector
+to_vector()
+{
+ return details::to_vector{};
+}
+
template<typename T>
inline details::unwrap_or<T>
unwrap_or(T value)
@@ -619,12 +629,32 @@ operator|(nonstd::optional<T> in,
template<typename T, typename F>
auto
-operator|(const T& in, const lnav::itertools::details::mapper<F>& mapper)
- -> std::vector<std::remove_const_t<std::remove_reference_t<
- decltype(mapper.m_func(std::declval<typename T::value_type>()))>>>
+operator|(const std::set<T>& in,
+ const lnav::itertools::details::mapper<F>& mapper)
+ -> std::set<std::remove_const_t<
+ std::remove_reference_t<decltype(mapper.m_func(std::declval<T>()))>>>
{
- using return_type = std::vector<std::remove_const_t<std::remove_reference_t<
- decltype(mapper.m_func(std::declval<typename T::value_type>()))>>>;
+ using return_type = std::set<std::remove_const_t<
+ std::remove_reference_t<decltype(mapper.m_func(std::declval<T>()))>>>;
+ return_type retval;
+
+ std::transform(in.begin(),
+ in.end(),
+ std::inserter(retval, retval.begin()),
+ mapper.m_func);
+
+ return retval;
+}
+
+template<typename T, typename F>
+auto
+operator|(const std::vector<T>& in,
+ const lnav::itertools::details::mapper<F>& mapper)
+ -> std::vector<std::remove_const_t<
+ std::remove_reference_t<decltype(mapper.m_func(std::declval<T>()))>>>
+{
+ using return_type = std::vector<std::remove_const_t<
+ std::remove_reference_t<decltype(mapper.m_func(std::declval<T>()))>>>;
return_type retval;
retval.reserve(in.size());
@@ -636,12 +666,50 @@ operator|(const T& in, const lnav::itertools::details::mapper<F>& mapper)
template<typename T, typename F>
auto
-operator|(const T& in, const lnav::itertools::details::mapper<F>& mapper)
+operator|(const std::deque<T>& in,
+ const lnav::itertools::details::mapper<F>& mapper)
+ -> std::vector<std::remove_const_t<
+ std::remove_reference_t<decltype(mapper.m_func(std::declval<T>()))>>>
+{
+ using return_type = std::vector<std::remove_const_t<
+ std::remove_reference_t<decltype(mapper.m_func(std::declval<T>()))>>>;
+ return_type retval;
+
+ retval.reserve(in.size());
+ std::transform(
+ in.begin(), in.end(), std::back_inserter(retval), mapper.m_func);
+
+ return retval;
+}
+
+template<typename K, typename V, typename F>
+auto
+operator|(const std::map<K, V>& in,
+ const lnav::itertools::details::mapper<F>& mapper)
-> std::vector<
- std::remove_const_t<decltype(((*in.begin()).*mapper.m_func)())>>
+ std::remove_const_t<std::remove_reference_t<decltype(mapper.m_func(
+ std::declval<typename std::map<K, V>::value_type>()))>>>
{
using return_type = std::vector<
- std::remove_const_t<decltype(((*in.begin()).*mapper.m_func)())>>;
+ std::remove_const_t<std::remove_reference_t<decltype(mapper.m_func(
+ std::declval<typename std::map<K, V>::value_type>()))>>>;
+ return_type retval;
+
+ retval.reserve(in.size());
+ std::transform(
+ in.begin(), in.end(), std::back_inserter(retval), mapper.m_func);
+
+ return retval;
+}
+
+template<typename T, typename F>
+auto
+operator|(const T& in, const lnav::itertools::details::mapper<F>& mapper)
+ -> std::vector<std::remove_const_t<
+ std::remove_reference_t<decltype(((*in.begin()).*mapper.m_func)())>>>
+{
+ using return_type = std::vector<std::remove_const_t<
+ std::remove_reference_t<decltype(((*in.begin()).*mapper.m_func)())>>>;
return_type retval;
retval.reserve(in.size());
@@ -782,4 +850,16 @@ operator|(nonstd::optional<T> in,
return in.value_or(unwrapper.uo_value);
}
+template<typename T>
+std::vector<T>
+operator|(std::set<T>&& in, lnav::itertools::details::to_vector tv)
+{
+ std::vector<T> retval;
+
+ retval.reserve(in.size());
+ std::copy(in.begin(), in.end(), std::back_inserter(retval));
+
+ return retval;
+}
+
#endif
diff --git a/src/base/keycodes.hh b/src/base/keycodes.hh
new file mode 100644
index 0000000..7f3c3e2
--- /dev/null
+++ b/src/base/keycodes.hh
@@ -0,0 +1,42 @@
+/**
+ * Copyright (c) 2023, Timothy Stack
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of Timothy Stack nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ''AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef lnav_keycodes_hh
+#define lnav_keycodes_hh
+
+inline constexpr int
+KEY_CTRL(char k)
+{
+ return k & 0x1f;
+}
+
+#define KEY_ESCAPE 0x1b
+#define KEY_DELETE 0x7f
+
+#endif
diff --git a/src/base/line_range.hh b/src/base/line_range.hh
new file mode 100644
index 0000000..70deb25
--- /dev/null
+++ b/src/base/line_range.hh
@@ -0,0 +1,164 @@
+/**
+ * Copyright (c) 2023, Timothy Stack
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of Timothy Stack nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ''AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef lnav_base_line_range_hh
+#define lnav_base_line_range_hh
+
+#include <string>
+
+/**
+ * Encapsulates a range in a string.
+ */
+struct line_range {
+ enum class unit {
+ bytes,
+ codepoint,
+ };
+
+ int lr_start;
+ int lr_end;
+ unit lr_unit;
+
+ explicit line_range(int start = -1, int end = -1, unit u = unit::bytes)
+ : lr_start(start), lr_end(end), lr_unit(u)
+ {
+ }
+
+ bool is_valid() const { return this->lr_start != -1; }
+
+ int length() const
+ {
+ return this->lr_end == -1 ? INT_MAX : this->lr_end - this->lr_start;
+ }
+
+ bool empty() const { return this->length() == 0; }
+
+ void clear()
+ {
+ this->lr_start = -1;
+ this->lr_end = -1;
+ }
+
+ int end_for_string(const std::string& str) const
+ {
+ return this->lr_end == -1 ? str.length() : this->lr_end;
+ }
+
+ bool contains(int pos) const
+ {
+ return this->lr_start <= pos
+ && (this->lr_end == -1 || pos < this->lr_end);
+ }
+
+ bool contains(const struct line_range& other) const
+ {
+ return this->contains(other.lr_start)
+ && (this->lr_end == -1 || other.lr_end <= this->lr_end);
+ }
+
+ bool intersects(const struct line_range& other) const
+ {
+ if (this->contains(other.lr_start)) {
+ return true;
+ }
+ if (other.lr_end > 0 && this->contains(other.lr_end - 1)) {
+ return true;
+ }
+ if (other.contains(this->lr_start)) {
+ return true;
+ }
+
+ return false;
+ }
+
+ line_range intersection(const struct line_range& other) const;
+
+ line_range& shift(int32_t start, int32_t amount);
+
+ line_range& shift_range(const line_range& cover, int32_t amount);
+
+ void ltrim(const char* str)
+ {
+ while (this->lr_start < this->lr_end && isspace(str[this->lr_start])) {
+ this->lr_start += 1;
+ }
+ }
+
+ bool operator<(const struct line_range& rhs) const
+ {
+ if (this->lr_start < rhs.lr_start) {
+ return true;
+ }
+ if (this->lr_start > rhs.lr_start) {
+ return false;
+ }
+
+ // this->lr_start == rhs.lr_start
+ if (this->lr_end == rhs.lr_end) {
+ return false;
+ }
+
+ // When the start is the same, the longer range has a lower priority
+ // than the shorter range.
+ if (rhs.lr_end == -1) {
+ return false;
+ }
+
+ if ((this->lr_end == -1) || (this->lr_end > rhs.lr_end)) {
+ return true;
+ }
+ return false;
+ }
+
+ bool operator==(const struct line_range& rhs) const
+ {
+ return (this->lr_start == rhs.lr_start && this->lr_end == rhs.lr_end);
+ }
+
+ const char* substr(const std::string& str) const
+ {
+ if (this->lr_start == -1) {
+ return str.c_str();
+ }
+ return &(str.c_str()[this->lr_start]);
+ }
+
+ size_t sublen(const std::string& str) const
+ {
+ if (this->lr_start == -1) {
+ return str.length();
+ }
+ if (this->lr_end == -1) {
+ return str.length() - this->lr_start;
+ }
+ return this->length();
+ }
+};
+
+#endif
diff --git a/src/base/lnav.console.cc b/src/base/lnav.console.cc
index a34ebac..b9d2d6c 100644
--- a/src/base/lnav.console.cc
+++ b/src/base/lnav.console.cc
@@ -45,6 +45,45 @@ using namespace lnav::roles::literals;
namespace lnav {
namespace console {
+snippet
+snippet::from_content_with_offset(intern_string_t src,
+ const attr_line_t& content,
+ size_t offset,
+ const std::string& errmsg)
+{
+ auto content_sf = string_fragment::from_str(content.get_string());
+ auto line_with_error = content_sf.find_boundaries_around(
+ offset, string_fragment::tag1{'\n'});
+ auto line_with_context = content_sf.find_boundaries_around(
+ offset, string_fragment::tag1{'\n'}, 3);
+ auto line_number = content_sf.sub_range(0, offset).count('\n');
+ auto erroff_in_line = offset - line_with_error.sf_begin;
+
+ attr_line_t pointer;
+
+ pointer.append(erroff_in_line, ' ')
+ .append("^ "_snippet_border)
+ .append(lnav::roles::error(errmsg))
+ .with_attr_for_all(VC_ROLE.value(role_t::VCR_QUOTED_CODE));
+
+ snippet retval;
+ retval.s_content
+ = content.subline(line_with_context.sf_begin,
+ line_with_error.sf_end - line_with_context.sf_begin);
+ if (line_with_error.sf_end >= retval.s_content.get_string().size()) {
+ retval.s_content.append("\n");
+ }
+ retval.s_content.append(pointer).append(
+ content.subline(line_with_error.sf_end,
+ line_with_context.sf_end - line_with_error.sf_end));
+ retval.s_location = source_location{
+ src,
+ static_cast<int32_t>(1 + line_number),
+ };
+
+ return retval;
+}
+
user_message
user_message::raw(const attr_line_t& al)
{
@@ -238,13 +277,38 @@ curses_color_to_terminal_color(int curses_color)
}
}
+static bool
+get_no_color()
+{
+ return getenv("NO_COLOR") != nullptr;
+}
+
+static bool
+get_yes_color()
+{
+ return getenv("YES_COLOR") != nullptr;
+}
+
+static bool
+get_fd_tty(int fd)
+{
+ return isatty(fd);
+}
+
void
println(FILE* file, const attr_line_t& al)
{
+ static const auto IS_NO_COLOR = get_no_color();
+ static const auto IS_YES_COLOR = get_yes_color();
+ static const auto IS_STDOUT_TTY = get_fd_tty(STDOUT_FILENO);
+ static const auto IS_STDERR_TTY = get_fd_tty(STDERR_FILENO);
+
const auto& str = al.get_string();
- if (getenv("NO_COLOR") != nullptr
- || (!isatty(fileno(file)) && getenv("YES_COLOR") == nullptr))
+ if (IS_NO_COLOR || (file != stdout && file != stderr)
+ || (((file == stdout && !IS_STDOUT_TTY)
+ || (file == stderr && !IS_STDERR_TTY))
+ && !IS_YES_COLOR))
{
fmt::print(file, "{}\n", str);
return;
@@ -273,6 +337,7 @@ println(FILE* file, const attr_line_t& al)
auto line_style = fmt::text_style{};
auto fg_style = fmt::text_style{};
auto start = last_point.value();
+ nonstd::optional<std::string> href;
for (const auto& attr : al.get_attrs()) {
if (!attr.sa_range.contains(start)
@@ -282,7 +347,10 @@ println(FILE* file, const attr_line_t& al)
}
try {
- if (attr.sa_type == &VC_BACKGROUND) {
+ if (attr.sa_type == &VC_HYPERLINK) {
+ auto saw = string_attr_wrapper<std::string>(&attr);
+ href = saw.get();
+ } else if (attr.sa_type == &VC_BACKGROUND) {
auto saw = string_attr_wrapper<int64_t>(&attr);
auto color_opt = curses_color_to_terminal_color(saw.get());
@@ -349,6 +417,9 @@ println(FILE* file, const attr_line_t& al)
case role_t::VCR_TEXT:
case role_t::VCR_IDENTIFIER:
break;
+ case role_t::VCR_ALT_ROW:
+ line_style |= fmt::emphasis::bold;
+ break;
case role_t::VCR_SEARCH:
line_style |= fmt::emphasis::reverse;
break;
@@ -407,6 +478,7 @@ println(FILE* file, const attr_line_t& al)
case role_t::VCR_LIST_GLYPH:
line_style |= fmt::fg(fmt::terminal_color::yellow);
break;
+ case role_t::VCR_INLINE_CODE:
case role_t::VCR_QUOTED_CODE:
default_fg_style
= fmt::fg(fmt::terminal_color::white);
@@ -442,12 +514,69 @@ println(FILE* file, const attr_line_t& al)
line_style |= default_bg_style;
}
+ if (line_style.has_foreground() && line_style.has_background()
+ && !line_style.get_foreground().is_rgb
+ && !line_style.get_background().is_rgb
+ && line_style.get_foreground().value.term_color
+ == line_style.get_background().value.term_color)
+ {
+ auto new_style = fmt::text_style{};
+
+ if (line_style.has_emphasis()) {
+ new_style |= line_style.get_emphasis();
+ }
+ new_style |= fmt::fg(line_style.get_foreground());
+ if (line_style.get_background().value.term_color
+ == lnav::enums::to_underlying(fmt::terminal_color::black))
+ {
+ new_style |= fmt::bg(fmt::terminal_color::white);
+ } else {
+ new_style |= fmt::bg(fmt::terminal_color::black);
+ }
+ line_style = new_style;
+ }
+
+ if (href) {
+ fmt::print(file, FMT_STRING("\x1b]8;;{}\x1b\\"), href.value());
+ }
if (start < str.size()) {
auto actual_end = std::min(str.size(), static_cast<size_t>(point));
- fmt::print(file,
- line_style,
- FMT_STRING("{}"),
- str.substr(start, actual_end - start));
+ auto sub = std::string{};
+
+ for (auto lpc = start; lpc < actual_end;) {
+ auto cp_start = lpc;
+ auto read_res = ww898::utf::utf8::read(
+ [&str, &lpc]() { return str[lpc++]; });
+
+ if (read_res.isErr()) {
+ sub.append(fmt::format(
+ FMT_STRING("{:?}"),
+ fmt::string_view{&str[cp_start], lpc - cp_start}));
+ continue;
+ }
+
+ auto ch = read_res.unwrap();
+ switch (ch) {
+ case '\b':
+ sub.append("\u232b");
+ break;
+ case '\x1b':
+ sub.append("\u238b");
+ break;
+ case '\x07':
+ sub.append("\U0001F514");
+ break;
+
+ default:
+ sub.append(&str[cp_start], lpc - cp_start);
+ break;
+ }
+ }
+
+ fmt::print(file, line_style, FMT_STRING("{}"), sub);
+ }
+ if (href) {
+ fmt::print(file, FMT_STRING("\x1b]8;;\x1b\\"));
}
last_point = point;
}
diff --git a/src/base/lnav.console.hh b/src/base/lnav.console.hh
index ac4c2b0..591093e 100644
--- a/src/base/lnav.console.hh
+++ b/src/base/lnav.console.hh
@@ -42,6 +42,11 @@ namespace console {
void println(FILE* file, const attr_line_t& al);
struct snippet {
+ static snippet from_content_with_offset(intern_string_t src,
+ const attr_line_t& content,
+ size_t offset,
+ const std::string& errmsg);
+
static snippet from(intern_string_t src, const attr_line_t& content)
{
snippet retval;
@@ -114,6 +119,26 @@ struct user_message {
}
template<typename C>
+ user_message& with_context_snippets(C snippets)
+ {
+ this->um_snippets.insert(this->um_snippets.begin(),
+ std::make_move_iterator(std::begin(snippets)),
+ std::make_move_iterator(std::end(snippets)));
+ if (this->um_snippets.size() > 1) {
+ for (auto iter = this->um_snippets.begin();
+ iter != this->um_snippets.end();)
+ {
+ if (iter->s_content.empty()) {
+ iter = this->um_snippets.erase(iter);
+ } else {
+ ++iter;
+ }
+ }
+ }
+ return *this;
+ }
+
+ template<typename C>
user_message& with_snippets(C snippets)
{
this->um_snippets.insert(this->um_snippets.end(),
@@ -121,7 +146,8 @@ struct user_message {
std::make_move_iterator(std::end(snippets)));
if (this->um_snippets.size() > 1) {
for (auto iter = this->um_snippets.begin();
- iter != this->um_snippets.end();) {
+ iter != this->um_snippets.end();)
+ {
if (iter->s_content.empty()) {
iter = this->um_snippets.erase(iter);
} else {
diff --git a/src/base/lnav.gzip.hh b/src/base/lnav.gzip.hh
index bd73965..060aad4 100644
--- a/src/base/lnav.gzip.hh
+++ b/src/base/lnav.gzip.hh
@@ -34,12 +34,27 @@
#include <string>
+#include <sys/time.h>
+
#include "auto_mem.hh"
#include "result.h"
namespace lnav {
namespace gzip {
+struct header {
+ timeval h_mtime{};
+ auto_buffer h_extra{auto_buffer::alloc(0)};
+ std::string h_name;
+ std::string h_comment;
+
+ bool empty() const
+ {
+ return this->h_mtime.tv_sec == 0 && this->h_extra.empty()
+ && this->h_name.empty() && this->h_comment.empty();
+ }
+};
+
bool is_gzipped(const char* buffer, size_t len);
Result<auto_buffer, std::string> compress(const void* input, size_t len);
diff --git a/src/base/lnav_log.cc b/src/base/lnav_log.cc
index 2e5dbba..b770698 100644
--- a/src/base/lnav_log.cc
+++ b/src/base/lnav_log.cc
@@ -190,7 +190,7 @@ log_argv(int argc, char* argv[])
const char* log_path = getenv("LNAV_LOG_PATH");
if (log_path != nullptr) {
- lnav_log_file = make_optional_from_nullable(fopen(log_path, "a"));
+ lnav_log_file = make_optional_from_nullable(fopen(log_path, "ae"));
}
log_info("argv[%d] =", argc);
diff --git a/src/base/map_util.hh b/src/base/map_util.hh
new file mode 100644
index 0000000..a3e565e
--- /dev/null
+++ b/src/base/map_util.hh
@@ -0,0 +1,126 @@
+/**
+ * Copyright (c) 2023, Timothy Stack
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of Timothy Stack nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ''AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef lnav_map_util_hh
+#define lnav_map_util_hh
+
+#include <functional>
+#include <map>
+#include <type_traits>
+#include <vector>
+
+#include "optional.hpp"
+
+namespace lnav {
+namespace map {
+
+template<typename C>
+nonstd::optional<
+ std::reference_wrapper<std::conditional_t<std::is_const<C>::value,
+ const typename C::mapped_type,
+ typename C::mapped_type>>>
+find(C& container, const typename C::key_type& key)
+{
+ auto iter = container.find(key);
+ if (iter != container.end()) {
+ return nonstd::make_optional(std::ref(iter->second));
+ }
+
+ return nonstd::nullopt;
+}
+
+template<typename K, typename V, typename M = std::map<K, V>>
+M
+from_vec(const std::vector<std::pair<K, V>>& container)
+{
+ M retval;
+
+ for (const auto& elem : container) {
+ retval[elem.first] = elem.second;
+ }
+
+ return retval;
+}
+
+template<typename K, typename V>
+class small : public std::vector<std::pair<K, V>> {
+public:
+ auto insert(const K& key, const V& value)
+ {
+ auto pos = this->begin();
+
+ while (pos != this->end() && pos->first < key) {
+ ++pos;
+ }
+ return this->emplace(pos, std::make_pair(key, value));
+ }
+
+ auto find(const K& key)
+ {
+ auto retval = this->begin();
+
+ while (retval != this->end()
+ && (retval->first < key || key < retval->first))
+ {
+ ++retval;
+ }
+
+ return retval;
+ }
+
+ auto find(const K& key) const
+ {
+ auto retval = this->begin();
+
+ while (retval != this->end()
+ && (retval->first < key || key < retval->first))
+ {
+ ++retval;
+ }
+
+ return retval;
+ }
+
+ V& operator[](const K& key)
+ {
+ auto iter = this->find(key);
+ if (iter != this->end()) {
+ return iter->second;
+ }
+
+ this->emplace_back(key, V{});
+
+ return this->back().second;
+ }
+};
+
+} // namespace map
+} // namespace lnav
+
+#endif
diff --git a/src/base/math_util.hh b/src/base/math_util.hh
index 842b319..fcd507c 100644
--- a/src/base/math_util.hh
+++ b/src/base/math_util.hh
@@ -33,6 +33,7 @@
#include <sys/types.h>
#undef rounddown
+#undef roundup
/**
* Round down a number based on a given granularity.
@@ -47,6 +48,17 @@ rounddown(Size size, Step step)
return size - (size % step);
}
+template<typename Size, typename Step>
+inline auto
+roundup(Size size, Step step)
+{
+ auto retval = size + (step - 1);
+
+ retval -= (retval % step);
+
+ return retval;
+}
+
inline int
rounddown_offset(size_t size, int step, int offset)
{
@@ -70,4 +82,74 @@ abs_diff(T a, T b)
return a > b ? a - b : b - a;
}
+template<typename T>
+class clamped {
+public:
+ static clamped from(T value, T min, T max) { return {value, min, max}; }
+
+ clamped& operator+=(T rhs)
+ {
+ if (rhs < 0) {
+ return this->operator-=(-rhs);
+ }
+
+ if (this->c_value + rhs < this->c_max) {
+ this->c_value += rhs;
+ } else {
+ this->c_value = this->c_max;
+ }
+
+ return *this;
+ }
+
+ clamped& operator-=(T rhs)
+ {
+ if (rhs < 0) {
+ return this->operator+=(-rhs);
+ }
+
+ if (this->c_value - rhs > this->c_min) {
+ this->c_value -= rhs;
+ } else {
+ this->c_value = this->c_min;
+ }
+
+ return *this;
+ }
+
+ bool available_to_consume(T rhs) const
+ {
+ return (this->c_value - rhs > this->c_min);
+ }
+
+ bool try_consume(T rhs)
+ {
+ if (rhs == 0) {
+ return false;
+ }
+
+ if (this->c_value - rhs > this->c_min) {
+ this->c_value -= rhs;
+ return true;
+ }
+
+ return false;
+ }
+
+ operator T() const { return this->c_value; }
+
+ bool is_min() const { return this->c_value == this->c_min; }
+
+ T get_min() const { return this->c_min; }
+
+ T get_max() const { return this->c_max; }
+
+private:
+ clamped(T value, T min, T max) : c_value(value), c_min(min), c_max(max) {}
+
+ T c_value;
+ T c_min;
+ T c_max;
+};
+
#endif
diff --git a/src/base/network.tcp.hh b/src/base/network.tcp.hh
index 49fc392..c046bb6 100644
--- a/src/base/network.tcp.hh
+++ b/src/base/network.tcp.hh
@@ -33,6 +33,7 @@
#include <string>
#include "auto_fd.hh"
+#include "optional.hpp"
#include "result.h"
namespace network {
diff --git a/src/base/piper.file.cc b/src/base/piper.file.cc
new file mode 100644
index 0000000..1443604
--- /dev/null
+++ b/src/base/piper.file.cc
@@ -0,0 +1,81 @@
+/**
+ * Copyright (c) 2023, Timothy Stack
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of Timothy Stack nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ''AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "piper.file.hh"
+
+#include <arpa/inet.h>
+#include <unistd.h>
+
+#include "base/lnav_log.hh"
+#include "base/paths.hh"
+
+namespace lnav {
+namespace piper {
+
+const char HEADER_MAGIC[4] = {'L', 0, 'N', 1};
+
+const ghc::filesystem::path&
+storage_path()
+{
+ static auto INSTANCE = lnav::paths::workdir() / "piper";
+
+ return INSTANCE;
+}
+
+nonstd::optional<auto_buffer>
+read_header(int fd, const char* first8)
+{
+ if (memcmp(first8, HEADER_MAGIC, sizeof(HEADER_MAGIC)) != 0) {
+ log_trace("first 4 bytes are not a piper header: %02x%02x%02x%02x",
+ first8[0],
+ first8[1],
+ first8[2],
+ first8[3]);
+ return nonstd::nullopt;
+ }
+
+ uint32_t meta_size = ntohl(*((uint32_t*) &first8[4]));
+
+ auto meta_buf = auto_buffer::alloc(meta_size);
+ if (meta_buf.in() == nullptr) {
+ log_error("failed to alloc %d bytes for header", meta_size);
+ return nonstd::nullopt;
+ }
+ auto meta_prc = pread(fd, meta_buf.in(), meta_size, 8);
+ if (meta_prc != meta_size) {
+ log_error("failed to read piper header: %s", strerror(errno));
+ return nonstd::nullopt;
+ }
+ meta_buf.resize(meta_size);
+
+ return meta_buf;
+}
+
+} // namespace piper
+} // namespace lnav
diff --git a/src/piper_proc.hh b/src/base/piper.file.hh
index 0caf29e..7a263ea 100644
--- a/src/piper_proc.hh
+++ b/src/base/piper.file.hh
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2007-2012, Timothy Stack
+ * Copyright (c) 2023, Timothy Stack
*
* All rights reserved.
*
@@ -25,62 +25,52 @@
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @file piper_proc.hh
*/
-#ifndef piper_proc_hh
-#define piper_proc_hh
+#ifndef lnav_piper_file_hh
+#define lnav_piper_file_hh
+#include <map>
#include <string>
-#include <sys/types.h>
+#include <sys/time.h>
-#include "base/auto_fd.hh"
+#include "auto_mem.hh"
+#include "ghc/filesystem.hpp"
+#include "optional.hpp"
+#include "time_util.hh"
-/**
- * Creates a subprocess that reads data from a pipe and writes it to a file so
- * lnav can treat it like any other file and do preads.
- *
- * TODO: Add support for gzipped files.
- */
-class piper_proc {
-public:
- class error : public std::exception {
- public:
- error(int err) : e_err(err) {}
+namespace lnav {
+namespace piper {
- int e_err;
- };
+struct header {
+ timeval h_ctime{};
+ std::string h_name;
+ std::string h_cwd;
+ std::map<std::string, std::string> h_env;
- /**
- * Forks a subprocess that will read data from the given file descriptor
- * and write it to a temporary file.
- *
- * @param pipefd The file descriptor to read the file contents from.
- * @param timestamp True if an ISO 8601 timestamp should be prepended onto
- * the lines read from pipefd.
- * @param filefd The descriptor for the backing file.
- */
- piper_proc(auto_fd pipefd, bool timestamp, auto_fd filefd);
+ bool operator<(const header& rhs) const
+ {
+ if (this->h_ctime < rhs.h_ctime) {
+ return true;
+ }
- bool has_exited();
+ if (this->h_ctime == rhs.h_ctime) {
+ return this->h_name < rhs.h_name;
+ }
- /**
- * Terminates the child process.
- */
- virtual ~piper_proc();
+ return false;
+ }
+};
- /** @return The file descriptor for the temporary file. */
- auto_fd get_fd() { return this->pp_fd.dup(); }
+const ghc::filesystem::path& storage_path();
- pid_t get_child_pid() const { return this->pp_child; }
+constexpr size_t HEADER_SIZE = 8;
+extern const char HEADER_MAGIC[4];
-private:
- /** A file descriptor that refers to the temporary file. */
- auto_fd pp_fd;
+nonstd::optional<auto_buffer> read_header(int fd, const char* first8);
+
+} // namespace piper
+} // namespace lnav
- /** The child process' pid. */
- pid_t pp_child;
-};
#endif
diff --git a/src/base/string_attr_type.cc b/src/base/string_attr_type.cc
index 9a3950b..fb31036 100644
--- a/src/base/string_attr_type.cc
+++ b/src/base/string_attr_type.cc
@@ -40,12 +40,13 @@ string_attr_type<void> SA_PREFORMATTED("preformatted");
string_attr_type<std::string> SA_INVALID("invalid");
string_attr_type<std::string> SA_ERROR("error");
string_attr_type<int64_t> SA_LEVEL("level");
-string_attr_type<string_fragment> SA_ORIGIN("origin");
string_attr_type<int64_t> SA_ORIGIN_OFFSET("origin-offset");
string_attr_type<role_t> VC_ROLE("role");
string_attr_type<role_t> VC_ROLE_FG("role-fg");
string_attr_type<text_attrs> VC_STYLE("style");
string_attr_type<int64_t> VC_GRAPHIC("graphic");
+string_attr_type<block_elem_t> VC_BLOCK_ELEM("block-elem");
string_attr_type<int64_t> VC_FOREGROUND("foreground");
string_attr_type<int64_t> VC_BACKGROUND("background");
+string_attr_type<std::string> VC_HYPERLINK("hyperlink");
diff --git a/src/base/string_attr_type.hh b/src/base/string_attr_type.hh
index 5bff345..0b8cd85 100644
--- a/src/base/string_attr_type.hh
+++ b/src/base/string_attr_type.hh
@@ -55,9 +55,11 @@ enum class role_t : int32_t {
VCR_ALT_ROW, /*< Highlight for alternating rows in a list */
VCR_HIDDEN,
VCR_CURSOR_LINE,
+ VCR_DISABLED_CURSOR_LINE,
VCR_ADJUSTED_TIME,
VCR_SKEWED_TIME,
VCR_OFFSET_TIME,
+ VCR_FILE_OFFSET,
VCR_INVALID_MSG,
VCR_STATUS, /*< Normal status line text. */
VCR_WARN_STATUS,
@@ -94,6 +96,9 @@ enum class role_t : int32_t {
VCR_DOC_DIRECTIVE,
VCR_VARIABLE,
VCR_SYMBOL,
+ VCR_NULL,
+ VCR_ASCII_CTRL,
+ VCR_NON_ASCII,
VCR_NUMBER,
VCR_RE_SPECIAL,
VCR_RE_REPEAT,
@@ -125,6 +130,13 @@ enum class role_t : int32_t {
VCR_FOOTNOTE_BORDER,
VCR_FOOTNOTE_TEXT,
VCR_SNIPPET_BORDER,
+ VCR_INDENT_GUIDE,
+ VCR_INLINE_CODE,
+ VCR_FUNCTION,
+ VCR_TYPE,
+ VCR_SEP_REF_ACC,
+ VCR_SUGGESTION,
+ VCR_SELECTED_TEXT,
VCR__MAX
};
@@ -156,6 +168,11 @@ struct text_attrs {
nonstd::optional<short> ta_bg_color;
};
+struct block_elem_t {
+ wchar_t value;
+ role_t role;
+};
+
using string_attr_value = mapbox::util::variant<int64_t,
role_t,
text_attrs,
@@ -164,7 +181,8 @@ using string_attr_value = mapbox::util::variant<int64_t,
std::shared_ptr<logfile>,
bookmark_metadata*,
timespec,
- string_fragment>;
+ string_fragment,
+ block_elem_t>;
class string_attr_type_base {
public:
@@ -211,15 +229,16 @@ extern string_attr_type<void> SA_PREFORMATTED;
extern string_attr_type<std::string> SA_INVALID;
extern string_attr_type<std::string> SA_ERROR;
extern string_attr_type<int64_t> SA_LEVEL;
-extern string_attr_type<string_fragment> SA_ORIGIN;
extern string_attr_type<int64_t> SA_ORIGIN_OFFSET;
extern string_attr_type<role_t> VC_ROLE;
extern string_attr_type<role_t> VC_ROLE_FG;
extern string_attr_type<text_attrs> VC_STYLE;
extern string_attr_type<int64_t> VC_GRAPHIC;
+extern string_attr_type<block_elem_t> VC_BLOCK_ELEM;
extern string_attr_type<int64_t> VC_FOREGROUND;
extern string_attr_type<int64_t> VC_BACKGROUND;
+extern string_attr_type<std::string> VC_HYPERLINK;
namespace lnav {
@@ -233,6 +252,14 @@ preformatted(S str)
return std::make_pair(std::move(str), SA_PREFORMATTED.template value());
}
+template<typename S>
+inline std::pair<S, string_attr_pair>
+href(S str, std::string href)
+{
+ return std::make_pair(std::move(str),
+ VC_HYPERLINK.template value(std::move(href)));
+}
+
} // namespace attrs
} // namespace string
@@ -288,6 +315,14 @@ ok(S str)
template<typename S>
inline std::pair<S, string_attr_pair>
+hidden(S str)
+{
+ return std::make_pair(std::move(str),
+ VC_ROLE.template value(role_t::VCR_HIDDEN));
+}
+
+template<typename S>
+inline std::pair<S, string_attr_pair>
file(S str)
{
return std::make_pair(std::move(str),
@@ -344,6 +379,14 @@ identifier(S str)
template<typename S>
inline std::pair<S, string_attr_pair>
+string(S str)
+{
+ return std::make_pair(std::move(str),
+ VC_ROLE.template value(role_t::VCR_STRING));
+}
+
+template<typename S>
+inline std::pair<S, string_attr_pair>
hr(S str)
{
return std::make_pair(std::move(str),
@@ -494,6 +537,14 @@ h6(S str)
VC_ROLE.template value(role_t::VCR_H6));
}
+template<typename S>
+inline std::pair<S, string_attr_pair>
+suggestion(S str)
+{
+ return std::make_pair(std::move(str),
+ VC_ROLE.template value(role_t::VCR_SUGGESTION));
+}
+
namespace literals {
inline std::pair<std::string, string_attr_pair> operator"" _ok(const char* str,
@@ -510,6 +561,13 @@ inline std::pair<std::string, string_attr_pair> operator"" _error(
VC_ROLE.template value(role_t::VCR_ERROR));
}
+inline std::pair<std::string, string_attr_pair> operator"" _warning(
+ const char* str, std::size_t len)
+{
+ return std::make_pair(std::string(str, len),
+ VC_ROLE.template value(role_t::VCR_WARNING));
+}
+
inline std::pair<std::string, string_attr_pair> operator"" _info(
const char* str, std::size_t len)
{
@@ -517,6 +575,13 @@ inline std::pair<std::string, string_attr_pair> operator"" _info(
VC_ROLE.template value(role_t::VCR_INFO));
}
+inline std::pair<std::string, string_attr_pair> operator"" _status_title(
+ const char* str, std::size_t len)
+{
+ return std::make_pair(std::string(str, len),
+ VC_ROLE.template value(role_t::VCR_STATUS_TITLE));
+}
+
inline std::pair<std::string, string_attr_pair> operator"" _symbol(
const char* str, std::size_t len)
{
@@ -629,6 +694,13 @@ inline std::pair<std::string, string_attr_pair> operator"" _code_border(
VC_ROLE.template value(role_t::VCR_CODE_BORDER));
}
+inline std::pair<std::string, string_attr_pair> operator"" _table_header(
+ const char* str, std::size_t len)
+{
+ return std::make_pair(std::string(str, len),
+ VC_ROLE.template value(role_t::VCR_TABLE_HEADER));
+}
+
inline std::pair<std::string, string_attr_pair> operator"" _table_border(
const char* str, std::size_t len)
{
@@ -671,6 +743,13 @@ inline std::pair<std::string, string_attr_pair> operator"" _snippet_border(
VC_ROLE.template value(role_t::VCR_SNIPPET_BORDER));
}
+inline std::pair<std::string, string_attr_pair> operator"" _link(
+ const char* str, std::size_t len)
+{
+ return std::make_pair(std::string(str, len),
+ VC_HYPERLINK.template value(std::string(str, len)));
+}
+
} // namespace literals
} // namespace roles
diff --git a/src/base/string_util.cc b/src/base/string_util.cc
index 8af686c..39e80f6 100644
--- a/src/base/string_util.cc
+++ b/src/base/string_util.cc
@@ -199,6 +199,34 @@ is_url(const std::string& fn)
}
size_t
+last_word_str(char* str, size_t len, size_t max_len)
+{
+ if (len < max_len) {
+ return len;
+ }
+
+ size_t last_start = 0;
+
+ for (size_t index = 0; index < len; index++) {
+ switch (str[index]) {
+ case '.':
+ case '-':
+ case '/':
+ case ':':
+ last_start = index + 1;
+ break;
+ }
+ }
+
+ if (last_start == 0) {
+ return len;
+ }
+
+ memmove(&str[0], &str[last_start], len - last_start);
+ return len - last_start;
+}
+
+size_t
abbreviate_str(char* str, size_t len, size_t max_len)
{
size_t last_start = 1;
@@ -273,7 +301,7 @@ is_blank(const std::string& str)
}
std::string
-scrub_ws(const char* in)
+scrub_ws(const char* in, ssize_t len)
{
static const std::string TAB_SYMBOL = "\u21e5";
static const std::string LF_SYMBOL = "\u240a";
@@ -281,7 +309,9 @@ scrub_ws(const char* in)
std::string retval;
- for (size_t lpc = 0; in[lpc]; lpc++) {
+ for (size_t lpc = 0; (len == -1 && in[lpc]) || (len >= 0 && lpc < len);
+ lpc++)
+ {
auto ch = in[lpc];
switch (ch) {
@@ -302,3 +332,93 @@ scrub_ws(const char* in)
return retval;
}
+
+namespace fmt {
+auto
+formatter<lnav::tainted_string>::format(const lnav::tainted_string& ts,
+ format_context& ctx)
+ -> decltype(ctx.out()) const
+{
+ auto esc_res = fmt::v10::detail::find_escape(&(*ts.ts_str.begin()),
+ &(*ts.ts_str.end()));
+ if (esc_res.end == nullptr) {
+ return formatter<string_view>::format(ts.ts_str, ctx);
+ }
+
+ return format_to(ctx.out(), FMT_STRING("{:?}"), ts.ts_str);
+}
+} // namespace fmt
+
+namespace lnav {
+namespace pcre2pp {
+
+static bool
+is_meta(char ch)
+{
+ switch (ch) {
+ case '\\':
+ case '^':
+ case '$':
+ case '.':
+ case '[':
+ case ']':
+ case '(':
+ case ')':
+ case '*':
+ case '+':
+ case '?':
+ case '{':
+ case '}':
+ return true;
+ default:
+ return false;
+ }
+}
+
+static nonstd::optional<const char*>
+char_escape_seq(char ch)
+{
+ switch (ch) {
+ case '\t':
+ return "\\t";
+ case '\n':
+ return "\\n";
+ }
+
+ return nonstd::nullopt;
+}
+
+std::string
+quote(string_fragment str)
+{
+ std::string retval;
+
+ while (true) {
+ auto cp_pair_opt = str.consume_codepoint();
+ if (!cp_pair_opt) {
+ break;
+ }
+
+ auto cp_pair = cp_pair_opt.value();
+ if ((cp_pair.first & ~0xff) == 0) {
+ if (is_meta(cp_pair.first)) {
+ retval.push_back('\\');
+ } else {
+ auto esc_seq = char_escape_seq(cp_pair.first);
+ if (esc_seq) {
+ retval.append(esc_seq.value());
+ str = cp_pair_opt->second;
+ continue;
+ }
+ }
+ }
+ ww898::utf::utf8::write(cp_pair.first,
+ [&retval](char ch) { retval.push_back(ch); });
+ str = cp_pair_opt->second;
+ }
+
+ return retval;
+}
+
+} // namespace pcre2pp
+} // namespace lnav
diff --git a/src/base/string_util.hh b/src/base/string_util.hh
index 73a8b87..886fb6c 100644
--- a/src/base/string_util.hh
+++ b/src/base/string_util.hh
@@ -100,7 +100,12 @@ endswith(const std::string& str, const char (&suffix)[N])
void truncate_to(std::string& str, size_t max_char_len);
-std::string scrub_ws(const char* in);
+std::string scrub_ws(const char* in, ssize_t len = -1);
+inline std::string
+scrub_ws(const string_fragment& sf)
+{
+ return scrub_ws(sf.data(), sf.length());
+}
inline std::string
trim(const std::string& str)
@@ -115,6 +120,16 @@ trim(const std::string& str)
return str.substr(start, end - start);
}
+inline const char*
+ltrim(const char* str)
+{
+ while (isspace(*str)) {
+ str += 1;
+ }
+
+ return str;
+}
+
inline std::string
rtrim(const std::string& str)
{
@@ -213,6 +228,8 @@ bool is_blank(const std::string& str);
size_t abbreviate_str(char* str, size_t len, size_t max_len);
+size_t last_word_str(char* str, size_t len, size_t max_len);
+
void split_ws(const std::string& str, std::vector<std::string>& toks_out);
std::string repeat(const std::string& input, size_t num);
@@ -229,4 +246,53 @@ on_blank(const std::string& str, const std::string& def)
return str;
}
+namespace lnav {
+class tainted_string {
+public:
+ explicit tainted_string(std::string s) : ts_str(std::move(s)) {}
+
+ bool operator==(const tainted_string& other) const
+ {
+ return this->ts_str == other.ts_str;
+ }
+
+ bool operator!=(const tainted_string& other) const
+ {
+ return this->ts_str != other.ts_str;
+ }
+
+ bool operator<(const tainted_string& other) const
+ {
+ return this->ts_str < other.ts_str;
+ }
+
+ bool empty() const { return this->ts_str.empty(); }
+
+ size_t length() const { return this->ts_str.length(); }
+
+ size_t size() const { return this->ts_str.size(); }
+
+ friend fmt::formatter<lnav::tainted_string>;
+
+private:
+ const std::string ts_str;
+};
+} // namespace lnav
+
+namespace fmt {
+template<>
+struct formatter<lnav::tainted_string> : formatter<string_view> {
+ auto format(const lnav::tainted_string& ts,
+ format_context& ctx) -> decltype(ctx.out()) const;
+};
+} // namespace fmt
+
+namespace lnav {
+namespace pcre2pp {
+
+std::string quote(string_fragment sf);
+
+}
+} // namespace lnav
+
#endif
diff --git a/src/base/string_util.tests.cc b/src/base/string_util.tests.cc
index 98cf5c8..c27f2a2 100644
--- a/src/base/string_util.tests.cc
+++ b/src/base/string_util.tests.cc
@@ -87,4 +87,47 @@ TEST_CASE("strnatcmp")
CHECK(strnatcmp(strlen(n1), n1, strlen(n2), n2) < 0);
}
+ {
+ constexpr const char* n1 = "servers";
+ constexpr const char* n2 = "servers.alpha";
+
+ CHECK(strnatcasecmp(strlen(n1), n1, strlen(n2), n2) < 0);
+ }
+ {
+ static constexpr const char* TOKENS = "[](){}";
+ const std::string n1 = "[servers]";
+ const std::string n2 = "[servers.alpha]";
+
+ auto lhs = string_fragment::from_str(n1).trim(TOKENS);
+ auto rhs = string_fragment::from_str(n2).trim(TOKENS);
+ CHECK(strnatcasecmp(lhs.length(), lhs.data(), rhs.length(), rhs.data())
+ < 0);
+ }
+
+ {
+ const std::string a = "10.112.81.15";
+ const std::string b = "192.168.202.254";
+
+ int ipcmp = 0;
+ auto rc = ipv4cmp(a.length(), a.c_str(), b.length(), b.c_str(), &ipcmp);
+ CHECK(rc == 1);
+ CHECK(ipcmp == -1);
+ }
+}
+
+TEST_CASE("last_word_str")
+{
+ {
+ std::string s = "foobar baz";
+
+ auto rc = last_word_str(&s[0], s.length(), 6);
+ CHECK(s.length() == rc);
+ }
+ {
+ std::string s = "com.example.foo";
+
+ auto rc = last_word_str(&s[0], s.length(), 6);
+ s.resize(rc);
+ CHECK(s == "foo");
+ }
}
diff --git a/src/base/strnatcmp.c b/src/base/strnatcmp.c
index 6773164..0ea332d 100644
--- a/src/base/strnatcmp.c
+++ b/src/base/strnatcmp.c
@@ -275,13 +275,13 @@ int ipv4cmp(int a_len, nat_char const *a,
}
for (; ai < a_len; ai++) {
- if (!isdigit((unsigned char)a[ai]) || a[ai] != '.') {
+ if (!isdigit((unsigned char)a[ai]) && a[ai] != '.') {
return 0;
}
}
for (; bi < b_len; bi++) {
- if (!isdigit((unsigned char)b[bi]) || b[bi] != '.') {
+ if (!isdigit((unsigned char)b[bi]) && b[bi] != '.') {
return 0;
}
}
diff --git a/src/base/time_util.cc b/src/base/time_util.cc
index 0d46107..5aee017 100644
--- a/src/base/time_util.cc
+++ b/src/base/time_util.cc
@@ -30,10 +30,15 @@
*/
#include <chrono>
+#include <map>
#include "time_util.hh"
+#include <date/ptz.h>
+
#include "config.h"
+#include "lnav_log.hh"
+#include "optional.hpp"
namespace lnav {
@@ -75,8 +80,66 @@ strftime_rfc3339(
return index;
}
+static nonstd::optional<Posix::time_zone>
+get_posix_zone(const char* name)
+{
+ if (name == nullptr) {
+ return nonstd::nullopt;
+ }
+
+ try {
+ return date::zoned_traits<Posix::time_zone>::locate_zone(name);
+ } catch (const std::runtime_error& e) {
+ log_error("invalid TZ value: %s -- %s", name, e.what());
+ return nonstd::nullopt;
+ }
+}
+
+static const date::time_zone*
+get_date_zone(const char* name)
+{
+ if (name == nullptr) {
+ return date::current_zone();
+ }
+
+ try {
+ return date::locate_zone(name);
+ } catch (const std::runtime_error& e) {
+ log_error("invalid TZ value: %s -- %s", name, e.what());
+ return date::current_zone();
+ }
+}
+
+date::sys_seconds
+to_sys_time(date::local_seconds secs)
+{
+ static const auto* TZ = getenv("TZ");
+ static const auto TZ_POSIX_ZONE = get_posix_zone(TZ);
+ static const auto* TZ_DATE_ZONE = get_date_zone(TZ);
+
+ if (TZ_POSIX_ZONE) {
+ return TZ_POSIX_ZONE.value().to_sys(secs);
+ }
+
+ return TZ_DATE_ZONE->to_sys(secs);
+}
+
+date::local_seconds
+to_local_time(date::sys_seconds secs)
+{
+ static const auto* TZ = getenv("TZ");
+ static const auto TZ_POSIX_ZONE = get_posix_zone(TZ);
+ static const auto* TZ_DATE_ZONE = get_date_zone(TZ);
+
+ if (TZ_POSIX_ZONE) {
+ return TZ_POSIX_ZONE.value().to_local(secs);
+ }
+
+ return TZ_DATE_ZONE->to_local(secs);
}
+} // namespace lnav
+
static time_t BAD_DATE = -1;
time_t
@@ -225,15 +288,68 @@ secs2tm(lnav::time64_t tim, struct tm* res)
return (res);
}
+exttm
+exttm::from_tv(const timeval& tv)
+{
+ auto retval = exttm{};
+
+ retval.et_tm = *gmtime(&tv.tv_sec);
+ retval.et_nsec = tv.tv_usec * 1000;
+
+ return retval;
+}
+
struct timeval
exttm::to_timeval() const
{
struct timeval retval;
retval.tv_sec = tm2sec(&this->et_tm);
+ retval.tv_sec -= this->et_gmtoff;
retval.tv_usec = std::chrono::duration_cast<std::chrono::microseconds>(
std::chrono::nanoseconds(this->et_nsec))
.count();
return retval;
}
+
+time_range&
+time_range::operator|=(const time_range& rhs)
+{
+ if (rhs.tr_begin < this->tr_begin) {
+ this->tr_begin = rhs.tr_begin;
+ }
+ if (this->tr_end < rhs.tr_end) {
+ this->tr_end = rhs.tr_end;
+ }
+
+ return *this;
+}
+
+void
+time_range::extend_to(const timeval& tv)
+{
+ if (tv < this->tr_begin) {
+ // logs aren't always in time-order
+ this->tr_begin = tv;
+ } else if (this->tr_end < tv) {
+ this->tr_end = tv;
+ }
+}
+
+std::chrono::milliseconds
+time_range::duration() const
+{
+ auto diff = this->tr_end - this->tr_begin;
+
+ return std::chrono::duration_cast<std::chrono::milliseconds>(
+ std::chrono::seconds(diff.tv_sec))
+ + std::chrono::duration_cast<std::chrono::milliseconds>(
+ std::chrono::microseconds(diff.tv_usec));
+}
+
+bool
+time_range::contains_inclusive(const timeval& tv) const
+{
+ return (this->tr_begin <= tv) && (tv <= this->tr_end);
+}
diff --git a/src/base/time_util.hh b/src/base/time_util.hh
index ef9687f..5640463 100644
--- a/src/base/time_util.hh
+++ b/src/base/time_util.hh
@@ -30,6 +30,8 @@
#ifndef lnav_time_util_hh
#define lnav_time_util_hh
+#include <chrono>
+
#include <inttypes.h>
#include <string.h>
#include <sys/time.h>
@@ -37,6 +39,7 @@
#include <time.h>
#include "config.h"
+#include "date/date.h"
namespace lnav {
@@ -48,6 +51,10 @@ ssize_t strftime_rfc3339(char* buffer,
int millis,
char sep = ' ');
+date::sys_seconds to_sys_time(date::local_seconds secs);
+
+date::local_seconds to_local_time(date::sys_seconds secs);
+
} // namespace lnav
struct tm* secs2tm(lnav::time64_t tim, struct tm* res);
@@ -84,9 +91,15 @@ enum exttm_bits_t {
ETB_SECOND_SET,
ETB_MACHINE_ORIENTED,
ETB_EPOCH_TIME,
+ ETB_SUB_NOT_IN_FORMAT,
ETB_MILLIS_SET,
ETB_MICROS_SET,
ETB_NANOS_SET,
+ ETB_ZONE_SET,
+ ETB_Z_FOR_UTC,
+ ETB_Z_COLON,
+ ETB_Z_IS_UTC,
+ ETB_Z_IS_GMT,
};
enum exttm_flags_t {
@@ -98,12 +111,20 @@ enum exttm_flags_t {
ETF_SECOND_SET = (1UL << ETB_SECOND_SET),
ETF_MACHINE_ORIENTED = (1UL << ETB_MACHINE_ORIENTED),
ETF_EPOCH_TIME = (1UL << ETB_EPOCH_TIME),
+ ETF_SUB_NOT_IN_FORMAT = (1UL << ETB_SUB_NOT_IN_FORMAT),
ETF_MILLIS_SET = (1UL << ETB_MILLIS_SET),
ETF_MICROS_SET = (1UL << ETB_MICROS_SET),
ETF_NANOS_SET = (1UL << ETB_NANOS_SET),
+ ETF_ZONE_SET = (1UL << ETB_ZONE_SET),
+ ETF_Z_FOR_UTC = (1UL << ETB_Z_FOR_UTC),
+ ETF_Z_COLON = (1UL << ETB_Z_COLON),
+ ETF_Z_IS_UTC = (1UL << ETB_Z_IS_UTC),
+ ETF_Z_IS_GMT = (1UL << ETB_Z_IS_GMT),
};
struct exttm {
+ static exttm from_tv(const timeval& tv);
+
struct tm et_tm {};
int32_t et_nsec{0};
unsigned int et_flags{0};
@@ -139,6 +160,13 @@ operator<(const struct timeval& left, const struct timeval& right)
}
inline bool
+operator<=(const struct timeval& left, const struct timeval& right)
+{
+ return left.tv_sec < right.tv_sec
+ || ((left.tv_sec == right.tv_sec) && (left.tv_usec <= right.tv_usec));
+}
+
+inline bool
operator!=(const struct timeval& left, const struct timeval& right)
{
return left.tv_sec != right.tv_sec || left.tv_usec != right.tv_usec;
@@ -147,7 +175,7 @@ operator!=(const struct timeval& left, const struct timeval& right)
inline bool
operator==(const struct timeval& left, const struct timeval& right)
{
- return left.tv_sec == right.tv_sec || left.tv_usec == right.tv_usec;
+ return left.tv_sec == right.tv_sec && left.tv_usec == right.tv_usec;
}
inline struct timeval
@@ -159,16 +187,31 @@ operator-(const struct timeval& lhs, const struct timeval& rhs)
return diff;
}
+inline struct timeval
+operator+(const struct timeval& lhs, const struct timeval& rhs)
+{
+ struct timeval retval;
+
+ timeradd(&lhs, &rhs, &retval);
+ return retval;
+}
+
typedef int64_t mstime_t;
inline mstime_t
+to_mstime(const timeval& tv)
+{
+ return tv.tv_sec * 1000ULL + tv.tv_usec / 1000ULL;
+}
+
+inline mstime_t
getmstime()
{
struct timeval tv;
gettimeofday(&tv, nullptr);
- return tv.tv_sec * 1000ULL + tv.tv_usec / 1000ULL;
+ return to_mstime(tv);
}
inline struct timeval
@@ -203,4 +246,21 @@ hour_num(time_t ti)
return ti / (60 * 60);
}
+struct time_range {
+ struct timeval tr_begin;
+ struct timeval tr_end;
+
+ bool operator<(const time_range& rhs) const
+ {
+ return this->tr_begin < rhs.tr_begin;
+ }
+
+ time_range& operator|=(const time_range& rhs);
+
+ bool contains_inclusive(const timeval& tv) const;
+
+ void extend_to(const timeval& tv);
+ std::chrono::milliseconds duration() const;
+};
+
#endif
diff --git a/src/base/types.hh b/src/base/types.hh
new file mode 100644
index 0000000..ba6f914
--- /dev/null
+++ b/src/base/types.hh
@@ -0,0 +1,35 @@
+/**
+ * Copyright (c) 2023, Timothy Stack
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of Timothy Stack nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ''AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef lnav_base_types_hh
+#define lnav_base_types_hh
+
+struct null_value_t {};
+
+#endif
diff --git a/src/big_array.hh b/src/big_array.hh
index 8401ead..d744dcb 100644
--- a/src/big_array.hh
+++ b/src/big_array.hh
@@ -35,17 +35,13 @@
#include <sys/mman.h>
#include <unistd.h>
+#include "base/lnav_log.hh"
#include "base/math_util.hh"
template<typename T>
struct big_array {
static const size_t DEFAULT_INCREMENT = 100 * 1000;
- big_array()
- : ba_ptr(nullptr), ba_size(0), ba_capacity(0){
-
- };
-
bool reserve(size_t size)
{
if (size < this->ba_capacity) {
@@ -71,17 +67,11 @@ struct big_array {
this->ba_ptr = (T*) result;
return true;
- };
+ }
- void clear()
- {
- this->ba_size = 0;
- };
+ void clear() { this->ba_size = 0; }
- size_t size() const
- {
- return this->ba_size;
- };
+ size_t size() const { return this->ba_size; }
void shrink_to(size_t new_size)
{
@@ -90,47 +80,29 @@ struct big_array {
this->ba_size = new_size;
}
- bool empty() const
- {
- return this->ba_size == 0;
- };
+ bool empty() const { return this->ba_size == 0; }
void push_back(const T& val)
{
this->ba_ptr[this->ba_size] = val;
this->ba_size += 1;
- };
+ }
- T& operator[](size_t index)
- {
- return this->ba_ptr[index];
- };
+ T& operator[](size_t index) { return this->ba_ptr[index]; }
- const T& operator[](size_t index) const
- {
- return this->ba_ptr[index];
- };
+ const T& operator[](size_t index) const { return this->ba_ptr[index]; }
- T& back()
- {
- return this->ba_ptr[this->ba_size - 1];
- }
+ T& back() { return this->ba_ptr[this->ba_size - 1]; }
- typedef T* iterator;
+ using iterator = T*;
- iterator begin()
- {
- return this->ba_ptr;
- };
+ iterator begin() { return this->ba_ptr; }
- iterator end()
- {
- return this->ba_ptr + this->ba_size;
- };
+ iterator end() { return this->ba_ptr + this->ba_size; }
- T* ba_ptr;
- size_t ba_size;
- size_t ba_capacity;
+ T* ba_ptr{nullptr};
+ size_t ba_size{0};
+ size_t ba_capacity{0};
};
#endif
diff --git a/src/bookmarks.cc b/src/bookmarks.cc
index 89637ad..fd166c4 100644
--- a/src/bookmarks.cc
+++ b/src/bookmarks.cc
@@ -32,10 +32,16 @@
#include "bookmarks.hh"
#include "base/itertools.hh"
+#include "bookmarks.json.hh"
#include "config.h"
std::unordered_set<std::string> bookmark_metadata::KNOWN_TAGS;
+typed_json_path_container<logmsg_annotations> logmsg_annotations_handlers = {
+ yajlpp::pattern_property_handler("(?<annotation_id>.*)")
+ .for_field(&logmsg_annotations::la_pairs),
+};
+
void
bookmark_metadata::add_tag(const std::string& tag)
{
@@ -58,10 +64,19 @@ bookmark_metadata::remove_tag(const std::string& tag)
}
bool
-bookmark_metadata::empty() const
+bookmark_metadata::empty(bookmark_metadata::categories props) const
{
- return this->bm_name.empty() && this->bm_comment.empty()
- && this->bm_tags.empty();
+ switch (props) {
+ case categories::any:
+ return this->bm_name.empty() && this->bm_comment.empty()
+ && this->bm_tags.empty()
+ && this->bm_annotations.la_pairs.empty();
+ case categories::partition:
+ return this->bm_name.empty();
+ case categories::notes:
+ return this->bm_comment.empty() && this->bm_tags.empty()
+ && this->bm_annotations.la_pairs.empty();
+ }
}
void
@@ -69,6 +84,7 @@ bookmark_metadata::clear()
{
this->bm_comment.clear();
this->bm_tags.clear();
+ this->bm_annotations.la_pairs.clear();
}
nonstd::optional<bookmark_type_t*>
diff --git a/src/bookmarks.hh b/src/bookmarks.hh
index 189e830..c8ffa56 100644
--- a/src/bookmarks.hh
+++ b/src/bookmarks.hh
@@ -34,24 +34,56 @@
#include <algorithm>
#include <map>
-#include <unordered_set>
#include <string>
+#include <unordered_set>
#include <vector>
#include "base/lnav_log.hh"
+struct logmsg_annotations {
+ std::map<std::string, std::string> la_pairs;
+};
+
struct bookmark_metadata {
static std::unordered_set<std::string> KNOWN_TAGS;
+ enum class categories : int {
+ any = 0,
+ partition = 0x01,
+ notes = 0x02,
+ };
+
+ bool has(categories props) const
+ {
+ if (props == categories::any) {
+ return true;
+ }
+
+ if (props == categories::partition && !this->bm_name.empty()) {
+ return true;
+ }
+
+ if (props == categories::notes
+ && (!this->bm_comment.empty()
+ || !this->bm_annotations.la_pairs.empty()
+ || !this->bm_tags.empty()))
+ {
+ return true;
+ }
+
+ return false;
+ }
+
std::string bm_name;
std::string bm_comment;
+ logmsg_annotations bm_annotations;
std::vector<std::string> bm_tags;
void add_tag(const std::string& tag);
bool remove_tag(const std::string& tag);
- bool empty() const;
+ bool empty(categories props) const;
void clear();
};
diff --git a/src/bookmarks.json.hh b/src/bookmarks.json.hh
new file mode 100644
index 0000000..f3f267a
--- /dev/null
+++ b/src/bookmarks.json.hh
@@ -0,0 +1,39 @@
+/**
+ * Copyright (c) 2023, Timothy Stack
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of Timothy Stack nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ''AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef lnav_bookmarks_json_hh
+#define lnav_bookmarks_json_hh
+
+#include "bookmarks.hh"
+#include "yajlpp/yajlpp_def.hh"
+
+extern typed_json_path_container<logmsg_annotations>
+ logmsg_annotations_handlers;
+
+#endif
diff --git a/src/breadcrumb.hh b/src/breadcrumb.hh
index 051ba2b..108c782 100644
--- a/src/breadcrumb.hh
+++ b/src/breadcrumb.hh
@@ -53,6 +53,18 @@ struct possibility {
bool operator<=(const possibility& rhs) const { return !(rhs < *this); }
bool operator>=(const possibility& rhs) const { return !(*this < rhs); }
+ static bool sort_cmp(const possibility& lhs, const possibility& rhs)
+ {
+ static constexpr const char* TOKENS = "[](){}";
+
+ auto lhsf = string_fragment::from_str(lhs.p_key).trim(TOKENS);
+ auto rhsf = string_fragment::from_str(rhs.p_key).trim(TOKENS);
+
+ return strnatcasecmp(
+ lhsf.length(), lhsf.data(), rhsf.length(), rhsf.data())
+ < 0;
+ }
+
std::string p_key;
attr_line_t p_display_value;
};
diff --git a/src/breadcrumb_curses.cc b/src/breadcrumb_curses.cc
index 6481e6b..6232221 100644
--- a/src/breadcrumb_curses.cc
+++ b/src/breadcrumb_curses.cc
@@ -31,15 +31,19 @@
#include "base/itertools.hh"
#include "itertools.similar.hh"
-#include "log_format_fwd.hh"
-#include "logfile.hh"
using namespace lnav::roles::literals;
+void
+breadcrumb_curses::no_op_action(breadcrumb_curses&)
+{
+}
+
breadcrumb_curses::breadcrumb_curses()
{
this->bc_match_search_overlay.sos_parent = this;
this->bc_match_source.set_reverse_selection(true);
+ this->bc_match_view.set_title("breadcrumb popup");
this->bc_match_view.set_selectable(true);
this->bc_match_view.set_overlay_source(&this->bc_match_search_overlay);
this->bc_match_view.set_sub_source(&this->bc_match_source);
@@ -49,11 +53,11 @@ breadcrumb_curses::breadcrumb_curses()
this->add_child_view(&this->bc_match_view);
}
-void
+bool
breadcrumb_curses::do_update()
{
if (!this->bc_line_source) {
- return;
+ return false;
}
size_t crumb_index = 0;
@@ -66,44 +70,49 @@ breadcrumb_curses::do_update()
{
this->bc_last_selected_crumb = crumbs.size() - 1;
}
+ this->bc_displayed_crumbs.clear();
attr_line_t crumbs_line;
for (const auto& crumb : crumbs) {
- auto accum_width
- = utf8_string_length(crumbs_line.get_string()).template unwrap();
- auto elem_width = utf8_string_length(crumb.c_display_value.get_string())
- .template unwrap();
+ auto accum_width = crumbs_line.column_width();
+ auto elem_width = crumb.c_display_value.column_width();
auto is_selected = this->bc_selected_crumb
&& (crumb_index == this->bc_selected_crumb.value());
if (is_selected && ((accum_width + elem_width) > width)) {
crumbs_line.clear();
- crumbs_line.append("\u22ef\u276d"_breadcrumb);
+ crumbs_line.append("\u22ef\uff1a"_breadcrumb);
accum_width = 2;
}
+ line_range crumb_range;
+ crumb_range.lr_start = (int) crumbs_line.length();
crumbs_line.append(crumb.c_display_value);
+ crumb_range.lr_end = (int) crumbs_line.length();
if (is_selected) {
sel_crumb_offset = accum_width;
crumbs_line.get_attrs().emplace_back(
- line_range{
- (int) (crumbs_line.length()
- - crumb.c_display_value.length()),
- (int) crumbs_line.length(),
- },
- VC_STYLE.template value(text_attrs{A_REVERSE}));
+ crumb_range, VC_STYLE.template value(text_attrs{A_REVERSE}));
}
+
+ this->bc_displayed_crumbs.emplace_back(
+ line_range{(int) accum_width,
+ (int) (accum_width + elem_width),
+ line_range::unit::codepoint},
+ crumb_index);
crumb_index += 1;
- crumbs_line.append("\u276d"_breadcrumb);
+ crumbs_line.append(" \uff1a"_breadcrumb);
}
line_range lr{0, static_cast<int>(width)};
view_curses::mvwattrline(
- this->bc_window, this->bc_y, 0, crumbs_line, lr, role_t::VCR_STATUS);
+ this->bc_window, this->vc_y, 0, crumbs_line, lr, role_t::VCR_STATUS);
if (this->bc_selected_crumb) {
this->bc_match_view.set_x(sel_crumb_offset);
}
view_curses::do_update();
+
+ return true;
}
void
@@ -123,13 +132,7 @@ breadcrumb_curses::reload_data()
[](const auto& elem) { return elem.p_key; },
this->bc_current_search,
128)
- | lnav::itertools::sort_with([](const auto& lhs, const auto& rhs) {
- return strnatcasecmp(lhs.p_key.size(),
- lhs.p_key.data(),
- rhs.p_key.size(),
- rhs.p_key.data())
- < 0;
- });
+ | lnav::itertools::sort_with(breadcrumb::possibility::sort_cmp);
if (selected_crumb_ref.c_key.is<std::string>()
&& selected_crumb_ref.c_expected_input
!= breadcrumb::crumb::expected_input_t::anything)
@@ -175,6 +178,9 @@ breadcrumb_curses::reload_data()
this->bc_match_view.set_needs_update();
this->bc_match_view.set_selection(
vis_line_t(selected_value.value_or(-1_vl)));
+ if (selected_value) {
+ this->bc_match_view.set_top(vis_line_t(selected_value.value()));
+ }
this->bc_match_view.reload_data();
this->set_needs_update();
}
@@ -182,6 +188,7 @@ breadcrumb_curses::reload_data()
void
breadcrumb_curses::focus()
{
+ this->bc_match_view.set_y(this->vc_y + 1);
this->bc_focused_crumbs = this->bc_line_source();
if (this->bc_focused_crumbs.empty()) {
return;
@@ -217,7 +224,7 @@ breadcrumb_curses::handle_key(int ch)
bool retval = false;
switch (ch) {
- case KEY_CTRL_A:
+ case KEY_CTRL('a'):
if (this->bc_selected_crumb) {
this->bc_selected_crumb = 0;
this->bc_current_search.clear();
@@ -225,7 +232,7 @@ breadcrumb_curses::handle_key(int ch)
}
retval = true;
break;
- case KEY_CTRL_E:
+ case KEY_CTRL('e'):
if (this->bc_selected_crumb) {
this->bc_selected_crumb = this->bc_focused_crumbs.size() - 1;
this->bc_current_search.clear();
@@ -278,22 +285,26 @@ breadcrumb_curses::handle_key(int ch)
retval = true;
break;
case KEY_NPAGE:
- this->bc_match_view.shift_selection(3);
+ this->bc_match_view.shift_selection(
+ listview_curses::shift_amount_t::down_page);
retval = true;
break;
case KEY_PPAGE:
- this->bc_match_view.shift_selection(-3);
+ this->bc_match_view.shift_selection(
+ listview_curses::shift_amount_t::up_page);
retval = true;
break;
case KEY_UP:
- this->bc_match_view.shift_selection(-1);
+ this->bc_match_view.shift_selection(
+ listview_curses::shift_amount_t::up_line);
retval = true;
break;
case KEY_DOWN:
- this->bc_match_view.shift_selection(1);
+ this->bc_match_view.shift_selection(
+ listview_curses::shift_amount_t::down_line);
retval = true;
break;
- case 0x7f:
+ case KEY_DELETE:
case KEY_BACKSPACE:
if (!this->bc_current_search.empty()) {
this->bc_current_search.pop_back();
@@ -305,6 +316,8 @@ breadcrumb_curses::handle_key(int ch)
case '\r':
this->perform_selection(perform_behavior_t::always);
break;
+ case KEY_ESCAPE:
+ break;
default:
if (isprint(ch)) {
this->bc_current_search.push_back(ch);
@@ -371,40 +384,55 @@ breadcrumb_curses::perform_selection(
}
bool
-breadcrumb_curses::search_overlay_source::list_value_for_overlay(
- const listview_curses& lv,
- int y,
- int bottom,
- vis_line_t line,
- attr_line_t& value_out)
+breadcrumb_curses::search_overlay_source::list_static_overlay(
+ const listview_curses& lv, int y, int bottom, attr_line_t& value_out)
{
- if (y == 0) {
- auto* parent = this->sos_parent;
- auto sel_opt = parent->bc_focused_crumbs
- | lnav::itertools::nth(parent->bc_selected_crumb);
- auto exp_input = sel_opt
- | lnav::itertools::map(&breadcrumb::crumb::c_expected_input)
- | lnav::itertools::unwrap_or(
- breadcrumb::crumb::expected_input_t::exact);
-
- value_out.with_attr_for_all(VC_STYLE.value(text_attrs{A_UNDERLINE}));
-
- if (!parent->bc_current_search.empty()) {
- value_out = parent->bc_current_search;
-
- role_t combobox_role = role_t::VCR_STATUS;
- switch (exp_input) {
- case breadcrumb::crumb::expected_input_t::exact:
- if (parent->bc_similar_values.empty()) {
- combobox_role = role_t::VCR_ALERT_STATUS;
- }
- break;
- case breadcrumb::crumb::expected_input_t::index: {
- size_t index;
+ if (y != 0) {
+ return false;
+ }
+ auto* parent = this->sos_parent;
+ auto sel_opt = parent->bc_focused_crumbs
+ | lnav::itertools::nth(parent->bc_selected_crumb);
+ auto exp_input = sel_opt
+ | lnav::itertools::map(&breadcrumb::crumb::c_expected_input)
+ | lnav::itertools::unwrap_or(
+ breadcrumb::crumb::expected_input_t::exact);
+
+ value_out.with_attr_for_all(VC_STYLE.value(text_attrs{A_UNDERLINE}));
- if (sscanf(parent->bc_current_search.c_str(), "%zu", &index)
- != 1
- || index < 0
+ if (!parent->bc_current_search.empty()) {
+ value_out = parent->bc_current_search;
+
+ role_t combobox_role = role_t::VCR_STATUS;
+ switch (exp_input) {
+ case breadcrumb::crumb::expected_input_t::exact:
+ if (parent->bc_similar_values.empty()) {
+ combobox_role = role_t::VCR_ALERT_STATUS;
+ }
+ break;
+ case breadcrumb::crumb::expected_input_t::index: {
+ size_t index;
+
+ if (sscanf(parent->bc_current_search.c_str(), "%zu", &index)
+ != 1
+ || index < 0
+ || (index
+ >= (sel_opt | lnav::itertools::map([](const auto& cr) {
+ return cr->c_possible_range.value_or(0);
+ })
+ | lnav::itertools::unwrap_or(size_t{0}))))
+ {
+ combobox_role = role_t::VCR_ALERT_STATUS;
+ }
+ break;
+ }
+ case breadcrumb::crumb::expected_input_t::index_or_exact: {
+ size_t index;
+
+ if (sscanf(parent->bc_current_search.c_str(), "%zu", &index)
+ == 1)
+ {
+ if (index < 0
|| (index
>= (sel_opt
| lnav::itertools::map([](const auto& cr) {
@@ -414,48 +442,102 @@ breadcrumb_curses::search_overlay_source::list_value_for_overlay(
{
combobox_role = role_t::VCR_ALERT_STATUS;
}
- break;
+ } else if (parent->bc_similar_values.empty()) {
+ combobox_role = role_t::VCR_ALERT_STATUS;
}
- case breadcrumb::crumb::expected_input_t::index_or_exact: {
- size_t index;
-
- if (sscanf(parent->bc_current_search.c_str(), "%zu", &index)
- == 1)
- {
- if (index < 0
- || (index
- >= (sel_opt
- | lnav::itertools::map([](const auto& cr) {
- return cr->c_possible_range.value_or(
- 0);
- })
- | lnav::itertools::unwrap_or(size_t{0}))))
- {
- combobox_role = role_t::VCR_ALERT_STATUS;
- }
- } else if (parent->bc_similar_values.empty()) {
- combobox_role = role_t::VCR_ALERT_STATUS;
- }
- break;
- }
- case breadcrumb::crumb::expected_input_t::anything:
- break;
+ break;
}
- value_out.with_attr_for_all(VC_ROLE.value(combobox_role));
+ case breadcrumb::crumb::expected_input_t::anything:
+ break;
+ }
+ value_out.with_attr_for_all(VC_ROLE.value(combobox_role));
+ return true;
+ }
+ if (parent->bc_selected_crumb) {
+ auto& selected_crumb_ref
+ = parent->bc_focused_crumbs[parent->bc_selected_crumb.value()];
+
+ if (!selected_crumb_ref.c_search_placeholder.empty()) {
+ value_out = selected_crumb_ref.c_search_placeholder;
+ value_out.with_attr_for_all(
+ VC_ROLE.value(role_t::VCR_INACTIVE_STATUS));
return true;
}
- if (parent->bc_selected_crumb) {
- auto& selected_crumb_ref
- = parent->bc_focused_crumbs[parent->bc_selected_crumb.value()];
-
- if (!selected_crumb_ref.c_search_placeholder.empty()) {
- value_out = selected_crumb_ref.c_search_placeholder;
- value_out.with_attr_for_all(
- VC_ROLE.value(role_t::VCR_INACTIVE_STATUS));
+ }
+
+ return false;
+}
+
+bool
+breadcrumb_curses::handle_mouse(mouse_event& me)
+{
+ if (me.me_state == mouse_button_state_t::BUTTON_STATE_PRESSED
+ && this->bc_focused_crumbs.empty())
+ {
+ this->focus();
+ this->on_focus(*this);
+ this->do_update();
+ }
+
+ auto find_res = this->bc_displayed_crumbs
+ | lnav::itertools::find_if([&me](const auto& elem) {
+ return me.me_button == mouse_button_t::BUTTON_LEFT
+ && elem.dc_range.contains(me.me_x);
+ });
+
+ if (!this->bc_focused_crumbs.empty()) {
+ if (me.me_y > 0 || !find_res
+ || find_res.value()->dc_index == this->bc_selected_crumb)
+ {
+ if (view_curses::handle_mouse(me)) {
+ if (me.me_y > 0
+ && (me.me_state
+ == mouse_button_state_t::BUTTON_STATE_DOUBLE_CLICK
+ || me.me_state
+ == mouse_button_state_t::BUTTON_STATE_RELEASED))
+ {
+ this->perform_selection(perform_behavior_t::if_different);
+ this->blur();
+ this->reload_data();
+ this->on_blur(*this);
+ this->bc_initial_mouse_event = true;
+ }
return true;
}
}
+ if (!this->bc_initial_mouse_event
+ && me.me_state == mouse_button_state_t::BUTTON_STATE_RELEASED
+ && me.me_y == 0 && find_res
+ && find_res.value()->dc_index == this->bc_selected_crumb.value())
+ {
+ this->blur();
+ this->reload_data();
+ this->on_blur(*this);
+ this->bc_initial_mouse_event = true;
+ return true;
+ }
}
- return false;
+ if (me.me_state == mouse_button_state_t::BUTTON_STATE_RELEASED) {
+ this->bc_initial_mouse_event = false;
+ }
+
+ if (me.me_y != 0) {
+ return true;
+ }
+
+ if (find_res) {
+ auto crumb_index = find_res.value()->dc_index;
+
+ if (this->bc_selected_crumb) {
+ this->blur();
+ this->focus();
+ this->reload_data();
+ this->bc_selected_crumb = crumb_index;
+ this->bc_current_search.clear();
+ this->reload_data();
+ }
+ }
+
+ return true;
}
diff --git a/src/breadcrumb_curses.hh b/src/breadcrumb_curses.hh
index 06218c3..93733d6 100644
--- a/src/breadcrumb_curses.hh
+++ b/src/breadcrumb_curses.hh
@@ -40,15 +40,9 @@
class breadcrumb_curses : public view_curses {
public:
- breadcrumb_curses();
-
- void set_y(int y)
- {
- this->bc_y = y;
- this->bc_match_view.set_y(y + 1);
- }
+ using action = std::function<void(breadcrumb_curses&)>;
- int get_y() const { return this->bc_y; }
+ breadcrumb_curses();
void set_window(WINDOW* win)
{
@@ -61,23 +55,29 @@ public:
this->bc_line_source = std::move(ls);
}
+ bool handle_mouse(mouse_event& me) override;
+
void focus();
void blur();
bool handle_key(int ch);
- void do_update() override;
+ bool do_update() override;
void reload_data();
+ static void no_op_action(breadcrumb_curses&);
+
+ action on_focus{no_op_action};
+ action on_blur{no_op_action};
+
private:
class search_overlay_source : public list_overlay_source {
public:
- bool list_value_for_overlay(const listview_curses& lv,
- int y,
- int bottom,
- vis_line_t line,
- attr_line_t& value_out) override;
+ bool list_static_overlay(const listview_curses& lv,
+ int y,
+ int bottom,
+ attr_line_t& value_out) override;
breadcrumb_curses* sos_parent{nullptr};
};
@@ -91,7 +91,6 @@ private:
WINDOW* bc_window{nullptr};
std::function<std::vector<breadcrumb::crumb>()> bc_line_source;
- int bc_y{0};
std::vector<breadcrumb::crumb> bc_focused_crumbs;
nonstd::optional<size_t> bc_selected_crumb;
nonstd::optional<size_t> bc_last_selected_crumb;
@@ -102,6 +101,19 @@ private:
plain_text_source bc_match_source;
search_overlay_source bc_match_search_overlay;
textview_curses bc_match_view;
+
+ struct displayed_crumb {
+ displayed_crumb(line_range range, size_t index)
+ : dc_range(range), dc_index(index)
+ {
+ }
+
+ line_range dc_range;
+ size_t dc_index{0};
+ };
+
+ std::vector<displayed_crumb> bc_displayed_crumbs;
+ bool bc_initial_mouse_event{true};
};
#endif
diff --git a/src/column_namer.cc b/src/column_namer.cc
index ba2d872..8c263c2 100644
--- a/src/column_namer.cc
+++ b/src/column_namer.cc
@@ -50,7 +50,8 @@ column_namer::existing_name(const string_fragment& in_name) const
auto upped = toupper(in_name.to_string());
if (std::binary_search(
- std::begin(sql_keywords), std::end(sql_keywords), upped)) {
+ std::begin(sql_keywords), std::end(sql_keywords), upped))
+ {
return true;
}
break;
@@ -99,10 +100,13 @@ column_namer::add_column(const string_fragment& in_name)
this->cn_name_counters[counter_name] = num;
}
- log_debug(
- "column name already exists: %.*s", retval.length(), retval.data());
fmt::format_to(
std::back_inserter(buf), FMT_STRING("{}_{}"), base_name, num);
+ log_debug("column name already exists (%.*s), trying (%.*s)",
+ retval.length(),
+ retval.data(),
+ buf.size(),
+ buf.data());
retval = string_fragment::from_memory_buffer(buf);
num += 1;
}
diff --git a/src/command_executor.cc b/src/command_executor.cc
index 574fefb..ca62818 100644
--- a/src/command_executor.cc
+++ b/src/command_executor.cc
@@ -32,9 +32,11 @@
#include "command_executor.hh"
#include "base/ansi_scrubber.hh"
+#include "base/ansi_vars.hh"
#include "base/fs_util.hh"
#include "base/injector.hh"
#include "base/itertools.hh"
+#include "base/paths.hh"
#include "base/string_util.hh"
#include "bound_tags.hh"
#include "config.h"
@@ -45,24 +47,22 @@
#include "lnav_config.hh"
#include "lnav_util.hh"
#include "log_format_loader.hh"
+#include "prql-modules.h"
#include "readline_highlighters.hh"
#include "service_tags.hh"
#include "shlex.hh"
+#include "sql_help.hh"
#include "sql_util.hh"
#include "vtab_module.hh"
-#include "yajlpp/json_ptr.hh"
+
+#ifdef HAVE_RUST_DEPS
+# include "prqlc.cxx.hh"
+#endif
using namespace lnav::roles::literals;
exec_context INIT_EXEC_CONTEXT;
-static const std::string MSG_FORMAT_STMT = R"(
-SELECT count(*) AS total, min(log_line) AS log_line, log_msg_format
- FROM all_logs
- GROUP BY log_msg_format
- ORDER BY total DESC
-)";
-
int
sql_progress(const struct log_cursor& lc)
{
@@ -105,7 +105,7 @@ sql_progress_finished()
static Result<std::string, lnav::console::user_message> execute_from_file(
exec_context& ec,
- const ghc::filesystem::path& path,
+ const std::string& src,
int line_number,
const std::string& cmdline);
@@ -166,14 +166,7 @@ bind_sql_parameters(exec_context& ec, sqlite3_stmt* stmt)
return Err(um);
}
- ov_iter = ec.ec_override.find(name);
- if (ov_iter != ec.ec_override.end()) {
- sqlite3_bind_text(stmt,
- lpc,
- ov_iter->second.c_str(),
- ov_iter->second.length(),
- SQLITE_TRANSIENT);
- } else if (name[0] == '$') {
+ if (name[0] == '$') {
const auto& lvars = ec.ec_local_vars.top();
const auto& gvars = ec.ec_global_vars;
std::map<std::string, scoped_value_t>::const_iterator local_var,
@@ -263,14 +256,60 @@ execute_search(const std::string& search_cmd)
Result<std::string, lnav::console::user_message>
execute_sql(exec_context& ec, const std::string& sql, std::string& alt_msg)
{
- db_label_source& dls = lnav_data.ld_db_row_source;
+ db_label_source& dls = *(ec.ec_label_source_stack.back());
auto_mem<sqlite3_stmt> stmt(sqlite3_finalize);
struct timeval start_tv, end_tv;
std::string stmt_str = trim(sql);
std::string retval;
int retcode = SQLITE_OK;
- log_info("Executing SQL: %s", sql.c_str());
+ if (lnav::sql::is_prql(stmt_str)) {
+ log_info("compiling PRQL: %s", stmt_str.c_str());
+
+#if HAVE_RUST_DEPS
+ auto opts = prqlc::Options{true, "sql.sqlite", true};
+
+ auto tree = sqlite_extension_prql;
+ for (const auto& mod : lnav_prql_modules) {
+ tree.emplace_back(prqlc::SourceTreeElement{
+ mod.get_name(),
+ mod.to_string_fragment().to_string(),
+ });
+ }
+ tree.emplace_back(prqlc::SourceTreeElement{"", stmt_str});
+ auto cr = prqlc::compile_tree(tree, opts);
+
+ for (const auto& msg : cr.messages) {
+ if (msg.kind != prqlc::MessageKind::Error) {
+ continue;
+ }
+
+ auto stmt_al = attr_line_t(stmt_str);
+ readline_sqlite_highlighter(stmt_al, 0);
+ auto um
+ = lnav::console::user_message::error(
+ attr_line_t("unable to compile PRQL: ").append(stmt_al))
+ .with_reason(
+ attr_line_t::from_ansi_str((std::string) msg.reason));
+ if (!msg.display.empty()) {
+ um.with_note(
+ attr_line_t::from_ansi_str((std::string) msg.display));
+ }
+ for (const auto& hint : msg.hints) {
+ um.with_help(attr_line_t::from_ansi_str((std::string) hint));
+ break;
+ }
+ return Err(um);
+ }
+ stmt_str = (std::string) cr.output;
+#else
+ auto um = lnav::console::user_message::error(
+ attr_line_t("PRQL is not supported in this build"));
+ return Err(um);
+#endif
+ }
+
+ log_info("Executing SQL: %s", stmt_str.c_str());
auto old_mode = lnav_data.ld_mode;
lnav_data.ld_mode = ln_mode_t::BUSY;
@@ -281,8 +320,9 @@ execute_sql(exec_context& ec, const std::string& sql, std::string& alt_msg)
std::vector<std::string> args;
split_ws(stmt_str, args);
- auto* sql_cmd_map = injector::get<readline_context::command_map_t*,
- sql_cmd_map_tag>();
+ const auto* sql_cmd_map
+ = injector::get<readline_context::command_map_t*,
+ sql_cmd_map_tag>();
auto cmd_iter = sql_cmd_map->find(args[0]);
if (cmd_iter != sql_cmd_map->end()) {
@@ -294,10 +334,6 @@ execute_sql(exec_context& ec, const std::string& sql, std::string& alt_msg)
}
}
- if (stmt_str == ".msgformats") {
- stmt_str = MSG_FORMAT_STMT;
- }
-
ec.ec_accumulator->clear();
const auto& source = ec.ec_source.back();
@@ -358,27 +394,19 @@ execute_sql(exec_context& ec, const std::string& sql, std::string& alt_msg)
bool done = false;
auto bound_values = TRY(bind_sql_parameters(ec, stmt.in()));
- if (lnav_data.ld_rl_view != nullptr) {
- if (lnav_data.ld_rl_view) {
- lnav_data.ld_rl_view->set_attr_value(
- lnav::console::user_message::info(
- attr_line_t("executing SQL statement, press ")
- .append("CTRL+]"_hotkey)
- .append(" to cancel"))
- .to_attr_line());
- lnav_data.ld_rl_view->do_update();
- }
- }
-
ec.ec_sql_callback(ec, stmt.in());
while (!done) {
retcode = sqlite3_step(stmt.in());
switch (retcode) {
case SQLITE_OK:
- case SQLITE_DONE:
+ case SQLITE_DONE: {
+ auto changes = sqlite3_changes(lnav_data.ld_db.in());
+
+ log_info("sqlite3_changes() -> %d", changes);
done = true;
break;
+ }
case SQLITE_ROW:
ec.ec_sql_callback(ec, stmt.in());
@@ -414,7 +442,7 @@ execute_sql(exec_context& ec, const std::string& sql, std::string& alt_msg)
log_error("sqlite3_step error code: %d", retcode);
auto um = sqlite3_error_to_user_message(lnav_data.ld_db)
- .with_snippets(ec.ec_source)
+ .with_context_snippets(ec.ec_source)
.with_note(bound_note);
return Err(um);
@@ -437,14 +465,14 @@ execute_sql(exec_context& ec, const std::string& sql, std::string& alt_msg)
}
lnav_data.ld_filter_view.reload_data();
lnav_data.ld_files_view.reload_data();
- lnav_data.ld_views[LNV_DB].reload_data();
- lnav_data.ld_views[LNV_DB].set_left(0);
lnav_data.ld_active_files.fc_files
| lnav::itertools::for_each(&logfile::dump_stats);
if (ec.ec_sql_callback != sql_callback) {
retval = ec.ec_accumulator->get_string();
} else if (!dls.dls_rows.empty()) {
+ lnav_data.ld_views[LNV_DB].reload_data();
+ lnav_data.ld_views[LNV_DB].set_left(0);
if (lnav_data.ld_flags & LNF_HEADLESS) {
if (ec.ec_local_vars.size() == 1) {
ensure_view(&lnav_data.ld_views[LNV_DB]);
@@ -501,6 +529,7 @@ execute_sql(exec_context& ec, const std::string& sql, std::string& alt_msg)
if (lnav_data.ld_flags & LNF_HEADLESS) {
if (ec.ec_local_vars.size() == 1) {
+ lnav_data.ld_views[LNV_DB].reload_data();
ensure_view(&lnav_data.ld_views[LNV_DB]);
}
}
@@ -511,13 +540,73 @@ execute_sql(exec_context& ec, const std::string& sql, std::string& alt_msg)
return Ok(retval);
}
+Result<void, lnav::console::user_message>
+multiline_executor::push_back(string_fragment line)
+{
+ this->me_line_number += 1;
+
+ if (line.trim().empty()) {
+ if (this->me_cmdline) {
+ this->me_cmdline = this->me_cmdline.value() + "\n";
+ }
+ return Ok();
+ }
+ if (line[0] == '#') {
+ return Ok();
+ }
+
+ switch (line[0]) {
+ case ':':
+ case '/':
+ case ';':
+ case '|':
+ if (this->me_cmdline) {
+ this->me_last_result
+ = TRY(execute_from_file(this->me_exec_context,
+ this->me_source,
+ this->me_starting_line_number,
+ trim(this->me_cmdline.value())));
+ }
+
+ this->me_starting_line_number = this->me_line_number;
+ this->me_cmdline = line.to_string();
+ break;
+ default:
+ if (this->me_cmdline) {
+ this->me_cmdline = fmt::format(
+ FMT_STRING("{}{}"), this->me_cmdline.value(), line);
+ } else {
+ this->me_last_result = TRY(
+ execute_from_file(this->me_exec_context,
+ this->me_source,
+ this->me_line_number,
+ fmt::format(FMT_STRING(":{}"), line)));
+ }
+ break;
+ }
+
+ return Ok();
+}
+
+Result<std::string, lnav::console::user_message>
+multiline_executor::final()
+{
+ if (this->me_cmdline) {
+ this->me_last_result
+ = TRY(execute_from_file(this->me_exec_context,
+ this->me_source,
+ this->me_starting_line_number,
+ trim(this->me_cmdline.value())));
+ }
+
+ return Ok(this->me_last_result);
+}
+
static Result<std::string, lnav::console::user_message>
-execute_file_contents(exec_context& ec,
- const ghc::filesystem::path& path,
- bool multiline)
+execute_file_contents(exec_context& ec, const ghc::filesystem::path& path)
{
- static ghc::filesystem::path stdin_path("-");
- static ghc::filesystem::path dev_stdin_path("/dev/stdin");
+ static const ghc::filesystem::path stdin_path("-");
+ static const ghc::filesystem::path dev_stdin_path("/dev/stdin");
std::string retval;
FILE* file;
@@ -527,59 +616,22 @@ execute_file_contents(exec_context& ec,
return ec.make_error("stdin has already been consumed");
}
file = stdin;
- } else if ((file = fopen(path.c_str(), "r")) == nullptr) {
+ } else if ((file = fopen(path.c_str(), "re")) == nullptr) {
return ec.make_error("unable to open file");
}
- int line_number = 0, starting_line_number = 0;
auto_mem<char> line;
size_t line_max_size;
ssize_t line_size;
- nonstd::optional<std::string> cmdline;
+ multiline_executor me(ec, path.string());
ec.ec_path_stack.emplace_back(path.parent_path());
exec_context::output_guard og(ec);
while ((line_size = getline(line.out(), &line_max_size, file)) != -1) {
- line_number += 1;
-
- if (trim(line.in()).empty()) {
- if (multiline && cmdline) {
- cmdline = cmdline.value() + "\n";
- }
- continue;
- }
- if (line[0] == '#') {
- continue;
- }
-
- switch (line[0]) {
- case ':':
- case '/':
- case ';':
- case '|':
- if (cmdline) {
- retval = TRY(execute_from_file(
- ec, path, starting_line_number, trim(cmdline.value())));
- }
-
- starting_line_number = line_number;
- cmdline = std::string(line);
- break;
- default:
- if (multiline) {
- cmdline = fmt::format("{}{}", cmdline.value(), line.in());
- } else {
- retval = TRY(execute_from_file(
- ec, path, line_number, fmt::format(":{}", line.in())));
- }
- break;
- }
+ TRY(me.push_back(string_fragment::from_bytes(line.in(), line_size)));
}
- if (cmdline) {
- retval = TRY(execute_from_file(
- ec, path, starting_line_number, trim(cmdline.value())));
- }
+ retval = TRY(me.final());
if (file == stdin) {
if (isatty(STDOUT_FILENO)) {
@@ -594,25 +646,35 @@ execute_file_contents(exec_context& ec,
}
Result<std::string, lnav::console::user_message>
-execute_file(exec_context& ec, const std::string& path_and_args, bool multiline)
+execute_file(exec_context& ec, const std::string& path_and_args)
{
+ static const intern_string_t SRC = intern_string::lookup("cmdline");
+
available_scripts scripts;
- std::vector<std::string> split_args;
std::string retval, msg;
shlex lexer(path_and_args);
log_info("Executing file: %s", path_and_args.c_str());
- if (!lexer.split(split_args, ec.ec_local_vars.top())) {
- return ec.make_error("unable to parse path");
+ auto split_args_res = lexer.split(scoped_resolver{&ec.ec_local_vars.top()});
+ if (split_args_res.isErr()) {
+ auto split_err = split_args_res.unwrapErr();
+ auto um = lnav::console::user_message::error(
+ "unable to parse script command-line")
+ .with_reason(split_err.te_msg)
+ .with_snippet(lnav::console::snippet::from(
+ SRC, lexer.to_attr_line(split_err)));
+
+ return Err(um);
}
+ auto split_args = split_args_res.unwrap();
if (split_args.empty()) {
return ec.make_error("no script specified");
}
ec.ec_local_vars.push({});
- auto script_name = split_args[0];
+ auto script_name = split_args[0].se_value;
auto& vars = ec.ec_local_vars.top();
char env_arg_name[32];
std::string star, open_error = "file not found";
@@ -625,13 +687,13 @@ execute_file(exec_context& ec, const std::string& path_and_args, bool multiline)
vars["#"] = env_arg_name;
for (size_t lpc = 0; lpc < split_args.size(); lpc++) {
snprintf(env_arg_name, sizeof(env_arg_name), "%lu", lpc);
- vars[env_arg_name] = split_args[lpc];
+ vars[env_arg_name] = split_args[lpc].se_value;
}
for (size_t lpc = 1; lpc < split_args.size(); lpc++) {
if (lpc > 1) {
star.append(" ");
}
- star.append(split_args[lpc]);
+ star.append(split_args[lpc].se_value);
}
vars["__all__"] = star;
@@ -672,8 +734,7 @@ execute_file(exec_context& ec, const std::string& path_and_args, bool multiline)
if (!paths_to_exec.empty()) {
for (auto& path_iter : paths_to_exec) {
- retval
- = TRY(execute_file_contents(ec, path_iter.sm_path, multiline));
+ retval = TRY(execute_file_contents(ec, path_iter.sm_path));
}
}
ec.ec_local_vars.pop();
@@ -688,13 +749,13 @@ execute_file(exec_context& ec, const std::string& path_and_args, bool multiline)
Result<std::string, lnav::console::user_message>
execute_from_file(exec_context& ec,
- const ghc::filesystem::path& path,
+ const std::string& src,
int line_number,
const std::string& cmdline)
{
std::string retval, alt_msg;
- auto _sg = ec.enter_source(
- intern_string::lookup(path.string()), line_number, cmdline);
+ auto _sg
+ = ec.enter_source(intern_string::lookup(src), line_number, cmdline);
switch (cmdline[0]) {
case ':':
@@ -715,10 +776,8 @@ execute_from_file(exec_context& ec,
break;
}
- log_info("%s:%d:execute result -- %s",
- path.c_str(),
- line_number,
- retval.c_str());
+ log_info(
+ "%s:%d:execute result -- %s", src.c_str(), line_number, retval.c_str());
return Ok(retval);
}
@@ -726,6 +785,17 @@ execute_from_file(exec_context& ec,
Result<std::string, lnav::console::user_message>
execute_any(exec_context& ec, const std::string& cmdline_with_mode)
{
+ if (cmdline_with_mode.empty()) {
+ auto um = lnav::console::user_message::error("empty command")
+ .with_help(
+ "a command should start with ':', ';', '/', '|' and "
+ "followed by the operation to perform");
+ if (!ec.ec_source.empty()) {
+ um.with_snippet(ec.ec_source.back());
+ }
+ return Err(um);
+ }
+
std::string retval, alt_msg, cmdline = cmdline_with_mode.substr(1);
auto _cleanup = finally([&ec] {
if (ec.is_read_write() &&
@@ -734,6 +804,7 @@ execute_any(exec_context& ec, const std::string& cmdline_with_mode)
(lnav_data.ld_flags & LNF_HEADLESS || ec.ec_path_stack.size() > 1))
{
rescan_files();
+ wait_for_pipers(nonstd::nullopt);
rebuild_indexes_repeatedly();
}
});
@@ -785,11 +856,13 @@ execute_init_commands(
"");
return;
}
+ fcntl(fileno(tmpout), F_SETFD, FD_CLOEXEC);
fd_copy = auto_fd::dup_of(fileno(tmpout));
+ fd_copy.close_on_exec();
ec_out = std::make_pair(tmpout.release(), fclose);
}
- auto& dls = lnav_data.ld_db_row_source;
+ auto& dls = *(ec.ec_label_source_stack.back());
int option_index = 1;
{
@@ -804,6 +877,8 @@ execute_init_commands(
wait_for_children();
+ lnav_data.ld_view_stack.top() |
+ [&ec](auto* tc) { ec.ec_top_line = tc->get_selection(); };
log_debug("init cmd: %s", cmd.c_str());
{
auto _sg
@@ -828,9 +903,16 @@ execute_init_commands(
}
rescan_files();
+ auto deadline = current_timeval()
+ + ((lnav_data.ld_flags & LNF_HEADLESS)
+ ? timeval{5, 0}
+ : timeval{0, 500000});
+ wait_for_pipers(deadline);
rebuild_indexes_repeatedly();
}
- if (dls.dls_rows.size() > 1) {
+ if (dls.dls_rows.size() > 1 && lnav_data.ld_view_stack.size() == 1)
+ {
+ lnav_data.ld_views[LNV_DB].reload_data();
ensure_view(LNV_DB);
}
}
@@ -842,15 +924,20 @@ execute_init_commands(
if (ec_out && fstat(fd_copy, &st) != -1 && st.st_size > 0) {
static const auto OUTPUT_NAME = std::string("Initial command output");
- lnav_data.ld_active_files.fc_file_names[OUTPUT_NAME]
- .with_fd(std::move(fd_copy))
- .with_include_in_session(false)
- .with_detect_format(false);
- lnav_data.ld_files_to_front.emplace_back(OUTPUT_NAME, 0_vl);
-
- if (lnav_data.ld_rl_view != nullptr) {
- lnav_data.ld_rl_view->set_alt_value(
- HELP_MSG_1(X, "to close the file"));
+ auto create_piper_res = lnav::piper::create_looper(
+ OUTPUT_NAME, std::move(fd_copy), auto_fd{});
+ if (create_piper_res.isOk()) {
+ lnav_data.ld_active_files.fc_file_names[OUTPUT_NAME]
+ .with_piper(create_piper_res.unwrap())
+ .with_include_in_session(false)
+ .with_detect_format(false)
+ .with_init_location(0_vl);
+ lnav_data.ld_files_to_front.emplace_back(OUTPUT_NAME, 0_vl);
+
+ if (lnav_data.ld_rl_view != nullptr) {
+ lnav_data.ld_rl_view->set_alt_value(
+ HELP_MSG_1(X, "to close the file"));
+ }
}
}
@@ -860,7 +947,7 @@ execute_init_commands(
int
sql_callback(exec_context& ec, sqlite3_stmt* stmt)
{
- auto& dls = lnav_data.ld_db_row_source;
+ auto& dls = *(ec.ec_label_source_stack.back());
if (!sqlite3_stmt_busy(stmt)) {
dls.clear();
@@ -868,7 +955,6 @@ sql_callback(exec_context& ec, sqlite3_stmt* stmt)
return 0;
}
- auto& chart = dls.dls_chart;
auto& vc = view_colors::singleton();
int ncols = sqlite3_column_count(stmt);
int row_number;
@@ -890,16 +976,17 @@ sql_callback(exec_context& ec, sqlite3_stmt* stmt)
dls.push_header(colname, type, graphable);
if (graphable) {
+ auto& hm = dls.dls_headers.back();
auto name_for_ident_attrs = colname;
auto attrs = vc.attrs_for_ident(name_for_ident_attrs);
for (size_t attempt = 0;
- chart.attrs_in_use(attrs) && attempt < 3;
+ hm.hm_chart.attrs_in_use(attrs) && attempt < 3;
attempt++)
{
name_for_ident_attrs += " ";
attrs = vc.attrs_for_ident(name_for_ident_attrs);
}
- chart.with_attrs_for_ident(colname, attrs);
+ hm.hm_chart.with_attrs_for_ident(colname, attrs);
dls.dls_headers.back().hm_title_attrs = attrs;
}
}
@@ -963,7 +1050,7 @@ pipe_callback(exec_context& ec, const std::string& cmdline, auto_fd& fd)
if (out) {
FILE* file = *out;
- return std::async(std::launch::async, [&fd, file]() {
+ return std::async(std::launch::async, [fd = std::move(fd), file]() {
char buffer[1024];
ssize_t rc;
@@ -978,26 +1065,37 @@ pipe_callback(exec_context& ec, const std::string& cmdline, auto_fd& fd)
return std::string();
});
}
- auto tmp_fd
- = lnav::filesystem::open_temp_file(
- ghc::filesystem::temp_directory_path() / "lnav.out.XXXXXX")
- .map([](auto pair) {
- ghc::filesystem::remove(pair.first);
-
- return std::move(pair.second);
- })
- .expect("Cannot create temporary file for callback");
- auto pp
- = std::make_shared<piper_proc>(std::move(fd), false, std::move(tmp_fd));
- static int exec_count = 0;
+ std::error_code errc;
+ ghc::filesystem::create_directories(lnav::paths::workdir(), errc);
+ auto open_temp_res = lnav::filesystem::open_temp_file(lnav::paths::workdir()
+ / "exec.XXXXXX");
+ if (open_temp_res.isErr()) {
+ return lnav::futures::make_ready_future(
+ fmt::format(FMT_STRING("error: cannot open temp file -- {}"),
+ open_temp_res.unwrapErr()));
+ }
+
+ auto tmp_pair = open_temp_res.unwrap();
- lnav_data.ld_pipers.push_back(pp);
+ auto reader = std::thread(
+ [in_fd = std::move(fd), out_fd = std::move(tmp_pair.second)]() {
+ char buffer[1024];
+ ssize_t rc;
+
+ while ((rc = read(in_fd, buffer, sizeof(buffer))) > 0) {
+ write(out_fd, buffer, rc);
+ }
+ });
+ reader.detach();
+
+ static int exec_count = 0;
auto desc
= fmt::format(FMT_STRING("[{}] Output of {}"), exec_count++, cmdline);
- lnav_data.ld_active_files.fc_file_names[desc]
- .with_fd(pp->get_fd())
+ lnav_data.ld_active_files.fc_file_names[tmp_pair.first]
+ .with_filename(desc)
.with_include_in_session(false)
- .with_detect_format(false);
+ .with_detect_format(false)
+ .with_init_location(0_vl);
lnav_data.ld_files_to_front.emplace_back(desc, 0_vl);
if (lnav_data.ld_rl_view != nullptr) {
lnav_data.ld_rl_view->set_alt_value(HELP_MSG_1(X, "to close the file"));
@@ -1013,7 +1111,7 @@ add_global_vars(exec_context& ec)
shlex subber(iter.second);
std::string str;
- if (!subber.eval(str, ec.ec_global_vars)) {
+ if (!subber.eval(str, scoped_resolver{&ec.ec_global_vars})) {
log_error("Unable to evaluate global variable value: %s",
iter.second.c_str());
continue;
@@ -1071,6 +1169,28 @@ exec_context::exec_context(logline_value_vector* line_values,
void
exec_context::execute(const std::string& cmdline)
{
+ if (this->get_provenance<mouse_input>()) {
+ require(!lnav_data.ld_rl_view->is_active());
+
+ int context = 0;
+ switch (cmdline[0]) {
+ case '/':
+ context = lnav::enums::to_underlying(ln_mode_t::SEARCH);
+ break;
+ case ':':
+ context = lnav::enums::to_underlying(ln_mode_t::COMMAND);
+ break;
+ case ';':
+ context = lnav::enums::to_underlying(ln_mode_t::SQL);
+ break;
+ case '|':
+ context = lnav::enums::to_underlying(ln_mode_t::EXEC);
+ break;
+ }
+
+ lnav_data.ld_rl_view->append_to_history(context, cmdline.substr(1));
+ }
+
auto exec_res = execute_any(*this, cmdline);
if (exec_res.isErr()) {
this->ec_error_callback_stack.back()(exec_res.unwrapErr());
diff --git a/src/command_executor.hh b/src/command_executor.hh
index 4461d55..ea29451 100644
--- a/src/command_executor.hh
+++ b/src/command_executor.hh
@@ -38,7 +38,7 @@
#include "base/auto_fd.hh"
#include "base/lnav.console.hh"
-#include "bookmarks.hh"
+#include "db_sub_source.hh"
#include "fmt/format.h"
#include "ghc/filesystem.hpp"
#include "help_text.hh"
@@ -72,15 +72,9 @@ struct exec_context {
sql_callback_t sql_callback = ::sql_callback,
pipe_callback_t pipe_callback = nullptr);
- bool is_read_write() const
- {
- return this->ec_perms == perm_t::READ_WRITE;
- }
+ bool is_read_write() const { return this->ec_perms == perm_t::READ_WRITE; }
- bool is_read_only() const
- {
- return this->ec_perms == perm_t::READ_ONLY;
- }
+ bool is_read_only() const { return this->ec_perms == perm_t::READ_ONLY; }
exec_context& with_perms(perm_t perms)
{
@@ -91,15 +85,22 @@ struct exec_context {
void add_error_context(lnav::console::user_message& um);
template<typename... Args>
- Result<std::string, lnav::console::user_message> make_error(
- fmt::string_view format_str, const Args&... args)
+ lnav::console::user_message make_error_msg(fmt::string_view format_str,
+ const Args&... args)
{
auto retval = lnav::console::user_message::error(
fmt::vformat(format_str, fmt::make_format_args(args...)));
this->add_error_context(retval);
- return Err(retval);
+ return retval;
+ }
+
+ template<typename... Args>
+ Result<std::string, lnav::console::user_message> make_error(
+ fmt::string_view format_str, const Args&... args)
+ {
+ return Err(this->make_error_msg(format_str, args...));
}
nonstd::optional<FILE*> get_output()
@@ -120,6 +121,45 @@ struct exec_context {
void clear_output();
+ struct mouse_input {};
+ struct user {};
+ struct file_open {
+ std::string fo_name;
+ };
+
+ using provenance_t = mapbox::util::variant<user, mouse_input, file_open>;
+
+ struct provenance_guard {
+ explicit provenance_guard(exec_context* context, provenance_t prov)
+ : pg_context(context)
+ {
+ this->pg_context->ec_provenance.push_back(prov);
+ }
+
+ provenance_guard(const provenance_guard&) = delete;
+ provenance_guard(provenance_guard&& other)
+ : pg_context(other.pg_context)
+ {
+ other.pg_context = nullptr;
+ }
+
+ ~provenance_guard()
+ {
+ if (this->pg_context != nullptr) {
+ this->pg_context->ec_provenance.pop_back();
+ }
+ }
+
+ exec_context* operator->() { return this->pg_context; }
+
+ exec_context* pg_context;
+ };
+
+ provenance_guard with_provenance(provenance_t prov)
+ {
+ return provenance_guard{this, prov};
+ }
+
struct source_guard {
source_guard(exec_context* context) : sg_context(context) {}
@@ -155,6 +195,33 @@ struct exec_context {
int line_number,
const std::string& content);
+ struct db_source_guard {
+ db_source_guard(exec_context* context) : dsg_context(context) {}
+
+ db_source_guard(const source_guard&) = delete;
+
+ db_source_guard(source_guard&& other) : dsg_context(other.sg_context)
+ {
+ other.sg_context = nullptr;
+ }
+
+ ~db_source_guard()
+ {
+ if (this->dsg_context != nullptr) {
+ this->dsg_context->ec_label_source_stack.pop_back();
+ }
+ }
+
+ exec_context* dsg_context;
+ };
+
+ db_source_guard enter_db_source(db_label_source* dls)
+ {
+ this->ec_label_source_stack.push_back(dls);
+
+ return db_source_guard{this};
+ }
+
struct error_cb_guard {
error_cb_guard(exec_context* context) : sg_context(context) {}
@@ -214,13 +281,25 @@ struct exec_context {
this->ec_local_vars.pop();
}
+ template<typename T>
+ nonstd::optional<T> get_provenance() const
+ {
+ for (const auto& elem : this->ec_provenance) {
+ if (elem.is<T>()) {
+ return elem.get<T>();
+ }
+ }
+
+ return nonstd::nullopt;
+ }
+
vis_line_t ec_top_line{0_vl};
bool ec_dry_run{false};
perm_t ec_perms{perm_t::READ_WRITE};
- std::map<std::string, std::string> ec_override;
logline_value_vector* ec_line_values;
std::stack<std::map<std::string, scoped_value_t>> ec_local_vars;
+ std::vector<provenance_t> ec_provenance;
std::map<std::string, scoped_value_t> ec_global_vars;
std::vector<ghc::filesystem::path> ec_path_stack;
std::vector<lnav::console::snippet> ec_source;
@@ -234,6 +313,7 @@ struct exec_context {
sql_callback_t ec_sql_callback;
pipe_callback_t ec_pipe_callback;
std::vector<error_callback_t> ec_error_callback_stack;
+ std::vector<db_label_source*> ec_label_source_stack;
};
Result<std::string, lnav::console::user_message> execute_command(
@@ -241,8 +321,28 @@ Result<std::string, lnav::console::user_message> execute_command(
Result<std::string, lnav::console::user_message> execute_sql(
exec_context& ec, const std::string& sql, std::string& alt_msg);
+
+class multiline_executor {
+public:
+ exec_context& me_exec_context;
+ std::string me_source;
+ nonstd::optional<std::string> me_cmdline;
+ int me_line_number{0};
+ int me_starting_line_number{0};
+ std::string me_last_result;
+
+ multiline_executor(exec_context& ec, std::string src)
+ : me_exec_context(ec), me_source(src)
+ {
+ }
+
+ Result<void, lnav::console::user_message> push_back(string_fragment line);
+
+ Result<std::string, lnav::console::user_message> final();
+};
+
Result<std::string, lnav::console::user_message> execute_file(
- exec_context& ec, const std::string& path_and_args, bool multiline = true);
+ exec_context& ec, const std::string& path_and_args);
Result<std::string, lnav::console::user_message> execute_any(
exec_context& ec, const std::string& cmdline);
void execute_init_commands(
diff --git a/src/css-color-names.json b/src/css-color-names.json
new file mode 100644
index 0000000..7a1480d
--- /dev/null
+++ b/src/css-color-names.json
@@ -0,0 +1,150 @@
+{
+ "aliceblue": "#f0f8ff",
+ "antiquewhite": "#faebd7",
+ "aqua": "#00ffff",
+ "aquamarine": "#7fffd4",
+ "azure": "#f0ffff",
+ "beige": "#f5f5dc",
+ "bisque": "#ffe4c4",
+ "black": "#000000",
+ "blanchedalmond": "#ffebcd",
+ "blue": "#0000ff",
+ "blueviolet": "#8a2be2",
+ "brown": "#a52a2a",
+ "burlywood": "#deb887",
+ "cadetblue": "#5f9ea0",
+ "chartreuse": "#7fff00",
+ "chocolate": "#d2691e",
+ "coral": "#ff7f50",
+ "cornflowerblue": "#6495ed",
+ "cornsilk": "#fff8dc",
+ "crimson": "#dc143c",
+ "cyan": "#00ffff",
+ "darkblue": "#00008b",
+ "darkcyan": "#008b8b",
+ "darkgoldenrod": "#b8860b",
+ "darkgray": "#a9a9a9",
+ "darkgreen": "#006400",
+ "darkgrey": "#a9a9a9",
+ "darkkhaki": "#bdb76b",
+ "darkmagenta": "#8b008b",
+ "darkolivegreen": "#556b2f",
+ "darkorange": "#ff8c00",
+ "darkorchid": "#9932cc",
+ "darkred": "#8b0000",
+ "darksalmon": "#e9967a",
+ "darkseagreen": "#8fbc8f",
+ "darkslateblue": "#483d8b",
+ "darkslategray": "#2f4f4f",
+ "darkslategrey": "#2f4f4f",
+ "darkturquoise": "#00ced1",
+ "darkviolet": "#9400d3",
+ "deeppink": "#ff1493",
+ "deepskyblue": "#00bfff",
+ "dimgray": "#696969",
+ "dimgrey": "#696969",
+ "dodgerblue": "#1e90ff",
+ "firebrick": "#b22222",
+ "floralwhite": "#fffaf0",
+ "forestgreen": "#228b22",
+ "fuchsia": "#ff00ff",
+ "gainsboro": "#dcdcdc",
+ "ghostwhite": "#f8f8ff",
+ "goldenrod": "#daa520",
+ "gold": "#ffd700",
+ "gray": "#808080",
+ "green": "#008000",
+ "greenyellow": "#adff2f",
+ "grey": "#808080",
+ "honeydew": "#f0fff0",
+ "hotpink": "#ff69b4",
+ "indianred": "#cd5c5c",
+ "indigo": "#4b0082",
+ "ivory": "#fffff0",
+ "khaki": "#f0e68c",
+ "lavenderblush": "#fff0f5",
+ "lavender": "#e6e6fa",
+ "lawngreen": "#7cfc00",
+ "lemonchiffon": "#fffacd",
+ "lightblue": "#add8e6",
+ "lightcoral": "#f08080",
+ "lightcyan": "#e0ffff",
+ "lightgoldenrodyellow": "#fafad2",
+ "lightgray": "#d3d3d3",
+ "lightgreen": "#90ee90",
+ "lightgrey": "#d3d3d3",
+ "lightpink": "#ffb6c1",
+ "lightsalmon": "#ffa07a",
+ "lightseagreen": "#20b2aa",
+ "lightskyblue": "#87cefa",
+ "lightslategray": "#778899",
+ "lightslategrey": "#778899",
+ "lightsteelblue": "#b0c4de",
+ "lightyellow": "#ffffe0",
+ "lime": "#00ff00",
+ "limegreen": "#32cd32",
+ "linen": "#faf0e6",
+ "magenta": "#ff00ff",
+ "maroon": "#800000",
+ "mediumaquamarine": "#66cdaa",
+ "mediumblue": "#0000cd",
+ "mediumorchid": "#ba55d3",
+ "mediumpurple": "#9370db",
+ "mediumseagreen": "#3cb371",
+ "mediumslateblue": "#7b68ee",
+ "mediumspringgreen": "#00fa9a",
+ "mediumturquoise": "#48d1cc",
+ "mediumvioletred": "#c71585",
+ "midnightblue": "#191970",
+ "mintcream": "#f5fffa",
+ "mistyrose": "#ffe4e1",
+ "moccasin": "#ffe4b5",
+ "navajowhite": "#ffdead",
+ "navy": "#000080",
+ "oldlace": "#fdf5e6",
+ "olive": "#808000",
+ "olivedrab": "#6b8e23",
+ "orange": "#ffa500",
+ "orangered": "#ff4500",
+ "orchid": "#da70d6",
+ "palegoldenrod": "#eee8aa",
+ "palegreen": "#98fb98",
+ "paleturquoise": "#afeeee",
+ "palevioletred": "#db7093",
+ "papayawhip": "#ffefd5",
+ "peachpuff": "#ffdab9",
+ "peru": "#cd853f",
+ "pink": "#ffc0cb",
+ "plum": "#dda0dd",
+ "powderblue": "#b0e0e6",
+ "purple": "#800080",
+ "rebeccapurple": "#663399",
+ "red": "#ff0000",
+ "rosybrown": "#bc8f8f",
+ "royalblue": "#4169e1",
+ "saddlebrown": "#8b4513",
+ "salmon": "#fa8072",
+ "sandybrown": "#f4a460",
+ "seagreen": "#2e8b57",
+ "seashell": "#fff5ee",
+ "sienna": "#a0522d",
+ "silver": "#c0c0c0",
+ "skyblue": "#87ceeb",
+ "slateblue": "#6a5acd",
+ "slategray": "#708090",
+ "slategrey": "#708090",
+ "snow": "#fffafa",
+ "springgreen": "#00ff7f",
+ "steelblue": "#4682b4",
+ "tan": "#d2b48c",
+ "teal": "#008080",
+ "thistle": "#d8bfd8",
+ "tomato": "#ff6347",
+ "turquoise": "#40e0d0",
+ "violet": "#ee82ee",
+ "wheat": "#f5deb3",
+ "white": "#ffffff",
+ "whitesmoke": "#f5f5f5",
+ "yellow": "#ffff00",
+ "yellowgreen": "#9acd32"
+}
diff --git a/src/curl_looper.cc b/src/curl_looper.cc
index 27e41fe..db97c40 100644
--- a/src/curl_looper.cc
+++ b/src/curl_looper.cc
@@ -108,6 +108,8 @@ curl_url_strerror(CURLUcode error)
}
# endif
+namespace {
+
struct curl_request_eq {
explicit curl_request_eq(const std::string& name) : cre_name(name){};
@@ -125,6 +127,8 @@ struct curl_request_eq {
const std::string& cre_name;
};
+} // namespace
+
int
curl_request::debug_cb(
CURL* handle, curl_infotype type, char* data, size_t size, void* userp)
@@ -187,6 +191,11 @@ curl_request::complete(CURLcode result)
return -1;
}
+curl_looper::curl_looper() : cl_curl_multi(curl_multi_cleanup)
+{
+ this->cl_curl_multi.reset(curl_multi_init());
+}
+
void
curl_looper::loop_body()
{
diff --git a/src/curl_looper.hh b/src/curl_looper.hh
index fbfbf2e..1f4b7df 100644
--- a/src/curl_looper.hh
+++ b/src/curl_looper.hh
@@ -94,6 +94,10 @@ public:
}
}
+ curl_request(const curl_request&) = delete;
+ curl_request(curl_request&&) = delete;
+ void operator=(curl_request&&) = delete;
+
virtual ~curl_request() = default;
const std::string& get_name() const { return this->cr_name; }
@@ -148,10 +152,7 @@ protected:
class curl_looper : public isc::service<curl_looper> {
public:
- curl_looper() : cl_curl_multi(curl_multi_cleanup)
- {
- this->cl_curl_multi.reset(curl_multi_init());
- }
+ curl_looper();
void process_all();
diff --git a/src/data_parser.cc b/src/data_parser.cc
index a751b30..aaec953 100644
--- a/src/data_parser.cc
+++ b/src/data_parser.cc
@@ -27,8 +27,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <algorithm>
-
#include "data_parser.hh"
#include "config.h"
@@ -36,6 +34,7 @@
data_format data_parser::FORMAT_SEMI("semi", DT_COMMA, DT_SEMI);
data_format data_parser::FORMAT_COMMA("comma", DT_INVALID, DT_COMMA);
+data_format data_parser::FORMAT_EMDASH("emdash", DT_INVALID, DT_EMDASH);
data_format data_parser::FORMAT_PLAIN("plain", DT_INVALID, DT_INVALID);
data_parser::data_parser(data_scanner* ds)
@@ -79,12 +78,13 @@ data_parser::pairup(data_parser::schema_id_t* schema,
if (in_list.el_format.df_prefix_terminator != DT_INVALID) {
if (iter->e_token == in_list.el_format.df_prefix_terminator) {
in_list.el_format.df_prefix_terminator = DT_INVALID;
+ in_list.el_format.df_separator = DT_COLON;
} else {
el_stack.PUSH_BACK(*iter);
}
} else if (iter->e_token == in_list.el_format.df_terminator) {
this->end_of_value(
- el_stack, key_comps, value, in_list, group_depth);
+ el_stack, key_comps, value, in_list, group_depth, iter);
key_comps.PUSH_BACK(*iter);
} else if (iter->e_token == in_list.el_format.df_qualifier) {
@@ -94,9 +94,17 @@ data_parser::pairup(data_parser::schema_id_t* schema,
if (!value.empty()) {
el_stack.PUSH_BACK(element(value, DNT_VALUE));
}
- } else if (iter->e_token == in_list.el_format.df_separator) {
+ value.CLEAR();
+ } else if (iter->e_token == in_list.el_format.df_separator
+ || iter->e_token == DNT_GROUP)
+ {
auto key_iter = key_comps.end();
- bool found = false, key_is_values = true;
+ bool found = false, key_is_values = true, mixed_values = false;
+ auto last_is_key = !key_comps.empty()
+ && (key_comps.back().e_token == DT_WORD
+ || key_comps.back().e_token == DT_SYMBOL);
+ element_list_t ELEMENT_LIST_T(mixed_queue),
+ ELEMENT_LIST_T(mixed_tail);
if (!key_comps.empty()) {
do {
@@ -107,7 +115,9 @@ data_parser::pairup(data_parser::schema_id_t* schema,
key_comps,
key_comps.begin(),
key_iter);
- key_comps.POP_FRONT();
+ if (!key_comps.empty()) {
+ key_comps.POP_FRONT();
+ }
found = true;
} else if (key_iter->e_token
== in_list.el_format.df_terminator)
@@ -127,19 +137,133 @@ data_parser::pairup(data_parser::schema_id_t* schema,
}
found = true;
}
- if (key_iter != key_comps.end()) {
+ if (!found && key_iter != key_comps.end()) {
switch (key_iter->e_token) {
case DT_WORD:
case DT_SYMBOL:
key_is_values = false;
break;
+ case DT_WHITE:
+ break;
+ case DT_ID:
+ case DT_QUOTED_STRING:
+ case DT_URL:
+ case DT_PATH:
+ case DT_MAC_ADDRESS:
+ case DT_DATE:
+ case DT_TIME:
+ case DT_DATE_TIME:
+ case DT_IPV4_ADDRESS:
+ case DT_IPV6_ADDRESS:
+ case DT_HEX_DUMP:
+ case DT_UUID:
+ case DT_CREDIT_CARD_NUMBER:
+ case DT_VERSION_NUMBER:
+ case DT_OCTAL_NUMBER:
+ case DT_PERCENTAGE:
+ case DT_NUMBER:
+ case DT_HEX_NUMBER:
+ case DT_EMAIL:
+ case DT_CONSTANT:
+ case DNT_MEASUREMENT: {
+ if (((in_list.el_format.df_terminator
+ != DT_INVALID
+ && !el_stack.empty())
+ || (key_comps.size() == 1
+ && mixed_queue.empty()))
+ && key_iter->e_token == DT_ID)
+ {
+ key_is_values = false;
+ } else if (in_list.el_format.df_terminator
+ == DT_INVALID
+ || el_stack.empty())
+ {
+ element_list_t ELEMENT_LIST_T(mixed_key);
+ element_list_t ELEMENT_LIST_T(mixed_value);
+
+ mixed_values = true;
+ auto value_iter = key_iter;
+ if (last_is_key) {
+ if (mixed_tail.empty()) {
+ mixed_tail.SPLICE(
+ mixed_tail.end(),
+ key_comps,
+ std::next(value_iter),
+ key_comps.end());
+ }
+ } else {
+ while (std::prev(key_comps.end())
+ != value_iter)
+ {
+ key_comps.POP_BACK();
+ }
+ }
+ key_iter = std::next(value_iter);
+ mixed_value.SPLICE(mixed_value.end(),
+ key_comps,
+ value_iter,
+ key_iter);
+ if (!el_stack.empty()
+ && el_stack.back().e_token == DNT_KEY
+ && key_comps.empty())
+ {
+ el_stack.PUSH_BACK(
+ element(mixed_value, DNT_VALUE));
+ } else {
+ mixed_queue.PUSH_FRONT(
+ element(mixed_value, DNT_VALUE));
+ if (!key_comps.empty()) {
+ if (key_comps.back().e_token
+ == DT_WORD)
+ {
+ key_iter = std::prev(
+ key_comps.end());
+ mixed_key.SPLICE(
+ mixed_key.end(),
+ key_comps,
+ key_iter,
+ key_comps.end());
+ mixed_queue.PUSH_FRONT(element(
+ mixed_key, DNT_KEY));
+ }
+ }
+ }
+ while (!key_comps.empty()
+ && !key_comps.back().is_value())
+ {
+ key_comps.POP_BACK();
+ }
+ key_iter = key_comps.end();
+ }
+ break;
+ }
default:
break;
}
}
} while (key_iter != key_comps.begin() && !found);
}
- if (!found && !el_stack.empty() && !key_comps.empty()) {
+ if (!mixed_queue.empty()) {
+ if (el_stack.back().e_token == DNT_KEY
+ && mixed_queue.front().e_token == DNT_KEY)
+ {
+ el_stack.POP_BACK();
+ }
+ el_stack.SPLICE(el_stack.end(),
+ mixed_queue,
+ mixed_queue.begin(),
+ mixed_queue.end());
+ }
+ if (!mixed_tail.empty()) {
+ key_comps.CLEAR();
+ key_comps.SPLICE(key_comps.end(),
+ mixed_tail,
+ std::prev(mixed_tail.end()),
+ mixed_tail.end());
+ }
+ if (!found && !mixed_values && !el_stack.empty()
+ && !key_comps.empty())
+ {
element_list_t::iterator value_iter;
if (el_stack.size() > 1
@@ -167,15 +291,31 @@ data_parser::pairup(data_parser::schema_id_t* schema,
}
strip(key_comps, element_is_space{});
if (!key_comps.empty()) {
- if (key_is_values) {
- el_stack.PUSH_BACK(element(key_comps, DNT_VALUE));
- } else {
- el_stack.PUSH_BACK(element(key_comps, DNT_KEY, false));
+ if (mixed_values) {
+ key_is_values = false;
+ while (key_comps.size() > 1) {
+ key_comps.POP_FRONT();
+ }
+ }
+ if (!key_comps.empty()) {
+ if (key_is_values) {
+ el_stack.PUSH_BACK(element(key_comps, DNT_VALUE));
+ } else {
+ el_stack.PUSH_BACK(element(key_comps, DNT_KEY, false));
+ }
}
}
key_comps.CLEAR();
value.CLEAR();
- } else {
+
+ if (iter->e_token == DNT_GROUP) {
+ value.PUSH_BACK(*iter);
+ el_stack.PUSH_BACK(element(value, DNT_VALUE));
+ value.CLEAR();
+ }
+ } else if (iter->e_token != DT_WHITE && iter->e_token != DT_CSI
+ && iter->e_token != DT_LINE)
+ {
key_comps.PUSH_BACK(*iter);
}
@@ -192,7 +332,8 @@ data_parser::pairup(data_parser::schema_id_t* schema,
free_row.SPLICE(
free_row.begin(), key_comps, key_comps.begin(), key_comps.end());
} else {
- this->end_of_value(el_stack, key_comps, value, in_list, group_depth);
+ this->end_of_value(
+ el_stack, key_comps, value, in_list, group_depth, in_list.end());
}
POINT_TRACE("pairup_stack");
@@ -324,6 +465,7 @@ data_parser::pairup(data_parser::schema_id_t* schema,
case DT_CONSTANT:
case DT_NUMBER:
case DT_SYMBOL:
+ case DT_ID:
case DT_HEX_NUMBER:
case DT_OCTAL_NUMBER:
case DT_VERSION_NUMBER:
@@ -341,7 +483,8 @@ data_parser::pairup(data_parser::schema_id_t* schema,
case DT_PATH:
case DT_DATE:
case DT_TIME:
- case DT_PERCENTAGE: {
+ case DT_PERCENTAGE:
+ case DNT_MEASUREMENT: {
element_list_t ELEMENT_LIST_T(pair_subs);
struct element blank;
@@ -365,7 +508,8 @@ data_parser::pairup(data_parser::schema_id_t* schema,
= this->get_element_string(free_row.front(), key_len);
context.Update(key_val, key_len);
- } break;
+ break;
+ }
}
free_row.POP_FRONT();
@@ -384,10 +528,6 @@ data_parser::pairup(data_parser::schema_id_t* schema,
pairs_out.PUSH_FRONT(element(pair_subs, DNT_PAIR));
}
- if (schema != nullptr) {
- context.Final(schema->out(0), schema->out(1));
- }
-
if (schema != nullptr && this->dp_msg_format != nullptr) {
for (auto& fiter : pairs_out) {
*(this->dp_msg_format) += this->get_string_up_to_value(fiter);
@@ -407,6 +547,12 @@ data_parser::pairup(data_parser::schema_id_t* schema,
}
*(this->dp_msg_format) += last.to_string();
}
+ context.Update(this->dp_msg_format->c_str(),
+ this->dp_msg_format->length());
+ }
+
+ if (schema != nullptr) {
+ context.Final(schema->out(0), schema->out(1));
}
if (pairs_out.size() > 1000) {
@@ -495,6 +641,20 @@ data_parser::discover_format()
}
break;
+ case DT_UNIT: {
+ element_list_t measurement_list;
+
+ measurement_list.SPLICE(
+ measurement_list.end(),
+ this->dp_group_stack.back(),
+ std::prev(this->dp_group_stack.back().end()),
+ this->dp_group_stack.back().end());
+ measurement_list.PUSH_BACK(elem);
+ this->dp_group_stack.back().PUSH_BACK(
+ element(measurement_list, DNT_MEASUREMENT));
+ break;
+ }
+
default:
this->dp_group_stack.back().PUSH_BACK(elem);
break;
@@ -525,67 +685,212 @@ data_parser::end_of_value(data_parser::element_list_t& el_stack,
data_parser::element_list_t& key_comps,
data_parser::element_list_t& value,
const data_parser::element_list_t& in_list,
- int group_depth)
+ int group_depth,
+ element_list_t::iterator iter)
{
- key_comps.remove_if(element_if(in_list.el_format.df_terminator));
- key_comps.remove_if(element_if(DT_COMMA));
- value.remove_if(element_if(in_list.el_format.df_terminator));
- value.remove_if(element_if(DT_COMMA));
- strip(key_comps, element_is_space{});
- strip(value, element_is_space{});
- if ((el_stack.empty() || el_stack.back().e_token != DNT_KEY)
- && value.empty() && key_comps.size() > 1
- && (key_comps.front().e_token == DT_WORD
- || key_comps.front().e_token == DT_SYMBOL))
- {
- element_list_t::iterator key_iter, key_end;
- bool found_value = false;
- int word_count = 0;
- key_iter = key_comps.begin();
- key_end = key_comps.begin();
- for (; key_iter != key_comps.end(); ++key_iter) {
- if (key_iter->e_token == DT_WORD || key_iter->e_token == DT_SYMBOL)
- {
- word_count += 1;
- if (found_value) {
- key_end = key_comps.begin();
+ auto key_iter = key_comps.end();
+ bool found = false, key_is_values = true, mixed_values = false;
+ auto last_is_key = !key_comps.empty()
+ && (key_comps.back().e_token == DT_WORD
+ || key_comps.back().e_token == DT_SYMBOL);
+ element_list_t ELEMENT_LIST_T(mixed_queue), ELEMENT_LIST_T(mixed_tail);
+
+ if (!key_comps.empty()) {
+ do {
+ --key_iter;
+ if (key_iter->e_token == in_list.el_format.df_appender) {
+ ++key_iter;
+ value.SPLICE(
+ value.end(), key_comps, key_comps.begin(), key_iter);
+ if (!key_comps.empty()) {
+ key_comps.POP_FRONT();
}
- } else if (key_iter->e_token == DT_WHITE
- || key_iter->e_token == DT_CSI)
- {
- } else {
- if (!found_value) {
- key_end = key_iter;
+ found = true;
+ } else if (key_iter->e_token == in_list.el_format.df_terminator) {
+ value.SPLICE(
+ value.end(), key_comps, key_comps.begin(), key_iter);
+ key_comps.POP_FRONT();
+ strip(key_comps, element_is_space{});
+ if (key_comps.empty()) {
+ key_iter = key_comps.end();
+ } else {
+ key_iter = key_comps.begin();
}
- found_value = true;
+ found = true;
}
+ if (!found && key_iter != key_comps.end()) {
+ switch (key_iter->e_token) {
+ case DT_WORD:
+ case DT_SYMBOL:
+ key_is_values = false;
+ break;
+ case DT_WHITE:
+ break;
+ case DT_ID:
+ case DT_QUOTED_STRING:
+ case DT_URL:
+ case DT_PATH:
+ case DT_MAC_ADDRESS:
+ case DT_DATE:
+ case DT_TIME:
+ case DT_DATE_TIME:
+ case DT_IPV4_ADDRESS:
+ case DT_IPV6_ADDRESS:
+ case DT_HEX_DUMP:
+ case DT_UUID:
+ case DT_CREDIT_CARD_NUMBER:
+ case DT_VERSION_NUMBER:
+ case DT_OCTAL_NUMBER:
+ case DT_PERCENTAGE:
+ case DT_NUMBER:
+ case DT_HEX_NUMBER:
+ case DT_EMAIL:
+ case DT_CONSTANT:
+ case DNT_MEASUREMENT: {
+ if (((in_list.el_format.df_terminator != DT_INVALID
+ && !el_stack.empty())
+ || (key_comps.size() == 1 && mixed_queue.empty()))
+ && key_iter->e_token == DT_ID)
+ {
+ key_is_values = false;
+ } else if (in_list.el_format.df_terminator == DT_INVALID
+ || el_stack.empty())
+ {
+ element_list_t ELEMENT_LIST_T(mixed_key);
+ element_list_t ELEMENT_LIST_T(mixed_value);
+
+ mixed_values = true;
+ auto value_iter = key_iter;
+ if (last_is_key) {
+ if (mixed_tail.empty()) {
+ mixed_tail.SPLICE(mixed_tail.end(),
+ key_comps,
+ std::next(value_iter),
+ key_comps.end());
+ }
+ } else {
+ while (std::prev(key_comps.end()) != value_iter)
+ {
+ key_comps.POP_BACK();
+ }
+ }
+ key_iter = std::next(value_iter);
+ mixed_value.SPLICE(mixed_value.end(),
+ key_comps,
+ value_iter,
+ key_iter);
+ if (!el_stack.empty()
+ && el_stack.back().e_token == DNT_KEY
+ && key_comps.empty())
+ {
+ el_stack.PUSH_BACK(
+ element(mixed_value, DNT_VALUE));
+ } else {
+ mixed_queue.PUSH_FRONT(
+ element(mixed_value, DNT_VALUE));
+ if (!key_comps.empty()) {
+ if (key_comps.back().e_token == DT_WORD) {
+ key_iter = std::prev(key_comps.end());
+ mixed_key.SPLICE(mixed_key.end(),
+ key_comps,
+ key_iter,
+ key_comps.end());
+ mixed_queue.PUSH_FRONT(
+ element(mixed_key, DNT_KEY));
+ }
+ }
+ }
+ while (!key_comps.empty()
+ && !key_comps.back().is_value())
+ {
+ key_comps.POP_BACK();
+ }
+ key_iter = key_comps.end();
+ }
+ break;
+ }
+ default:
+ break;
+ }
+ }
+ } while (key_iter != key_comps.begin() && !found);
+ }
+ if (!mixed_queue.empty()) {
+ if (el_stack.back().e_token == DNT_KEY
+ && mixed_queue.front().e_token == DNT_KEY)
+ {
+ el_stack.POP_BACK();
}
- if (word_count != 1) {
- key_end = key_comps.begin();
- }
- value.SPLICE(value.end(), key_comps, key_end, key_comps.end());
- strip(key_comps, element_is_space{});
- if (!key_comps.empty()) {
- el_stack.PUSH_BACK(element(key_comps, DNT_KEY, false));
- }
+ el_stack.SPLICE(el_stack.end(),
+ mixed_queue,
+ mixed_queue.begin(),
+ mixed_queue.end());
+ }
+ if (!mixed_tail.empty()) {
key_comps.CLEAR();
- } else {
+ key_comps.SPLICE(key_comps.end(),
+ mixed_tail,
+ std::prev(mixed_tail.end()),
+ mixed_tail.end());
+ }
+ if (!mixed_values && !el_stack.empty() && !key_comps.empty()) {
+ element_list_t::iterator value_iter;
+
+ if (el_stack.size() > 1 && in_list.el_format.df_appender != DT_INVALID
+ && in_list.el_format.df_terminator != DT_INVALID
+ && iter->e_token == in_list.el_format.df_separator)
+ {
+ /* If we're expecting a terminator and haven't found it */
+ /* then this is part of the value. */
+ return;
+ }
+
value.SPLICE(
value.end(), key_comps, key_comps.begin(), key_comps.end());
+
+ if (value.size() == 2
+ && (value.front().e_token == DT_WORD
+ || value.front().e_token == DT_SYMBOL
+ || value.front().e_token == DT_ID)
+ && el_stack.back().e_token != DNT_KEY)
+ {
+ element_list_t ELEMENT_LIST_T(mixed_key);
+
+ mixed_key.SPLICE(mixed_key.end(),
+ value,
+ value.begin(),
+ std::next(value.begin()));
+ el_stack.PUSH_BACK(element(mixed_key, DNT_KEY, false));
+ }
}
+
strip(value, element_is_space{});
- strip(value, element_if(DT_COLON));
- strip(value, element_is_space{});
+ value.remove_if(element_if(DT_COMMA));
if (!value.empty()) {
- if (value.size() == 2 && value.back().e_token == DNT_GROUP) {
- element_list_t ELEMENT_LIST_T(group_pair);
-
- group_pair.PUSH_BACK(element(value, DNT_PAIR));
- el_stack.PUSH_BACK(element(group_pair, DNT_VALUE));
- } else {
- el_stack.PUSH_BACK(element(value, DNT_VALUE));
+ el_stack.PUSH_BACK(element(value, DNT_VALUE));
+ }
+ strip(key_comps, element_is_space{});
+ if (!key_comps.empty()) {
+ if (mixed_values) {
+ key_is_values = false;
+ while (key_comps.size() > 1) {
+ key_comps.POP_FRONT();
+ }
+ }
+ if (!key_comps.empty()) {
+ if (iter == in_list.end()
+ || iter->e_token != in_list.el_format.df_separator)
+ {
+ key_is_values = true;
+ }
+ if (key_is_values) {
+ el_stack.PUSH_BACK(element(key_comps, DNT_VALUE));
+ } else {
+ el_stack.PUSH_BACK(element(key_comps, DNT_KEY, false));
+ }
}
}
+ key_comps.CLEAR();
value.CLEAR();
}
@@ -679,6 +984,7 @@ dfs_prefix_next(data_format_state_t state, data_token_t next_token)
case DT_EMAIL:
case DT_WORD:
case DT_SYMBOL:
+ case DT_ID:
case DT_OCTAL_NUMBER:
case DT_HEX_NUMBER:
case DT_NUMBER:
@@ -1009,6 +1315,37 @@ data_parser::element::print(FILE* out, data_scanner& ds, int offset) const
fprintf(out, " %s\n", sub.c_str());
}
+bool
+data_parser::element::is_value() const
+{
+ switch (this->e_token) {
+ case DNT_MEASUREMENT:
+ case DT_ID:
+ case DT_QUOTED_STRING:
+ case DT_URL:
+ case DT_PATH:
+ case DT_MAC_ADDRESS:
+ case DT_DATE:
+ case DT_TIME:
+ case DT_DATE_TIME:
+ case DT_IPV4_ADDRESS:
+ case DT_IPV6_ADDRESS:
+ case DT_HEX_DUMP:
+ case DT_UUID:
+ case DT_CREDIT_CARD_NUMBER:
+ case DT_VERSION_NUMBER:
+ case DT_OCTAL_NUMBER:
+ case DT_PERCENTAGE:
+ case DT_NUMBER:
+ case DT_HEX_NUMBER:
+ case DT_EMAIL:
+ case DT_CONSTANT:
+ return true;
+ default:
+ return false;
+ }
+}
+
data_parser::discover_format_state::discover_format_state()
: dfs_prefix_state(DFS_INIT), dfs_semi_state(DFS_INIT),
dfs_comma_state(DFS_INIT)
@@ -1051,14 +1388,18 @@ data_parser::discover_format_state::finalize()
if (this->dfs_semi_state != DFS_ERROR && this->dfs_hist[DT_SEMI]) {
this->dfs_format = FORMAT_SEMI;
} else if (this->dfs_comma_state != DFS_ERROR) {
- this->dfs_format = FORMAT_COMMA;
+ if (this->dfs_hist[DT_COMMA] > 0) {
+ this->dfs_format = FORMAT_COMMA;
+ } else if (this->dfs_hist[DT_EMDASH] > 0) {
+ this->dfs_format = FORMAT_EMDASH;
+ }
if (separator == DT_COLON && this->dfs_hist[DT_COMMA] > 0) {
if (!((this->dfs_hist[DT_COLON] == this->dfs_hist[DT_COMMA])
|| ((this->dfs_hist[DT_COLON] - 1)
== this->dfs_hist[DT_COMMA])))
{
separator = DT_INVALID;
- if (this->dfs_hist[DT_COLON] == 1) {
+ if (this->dfs_hist[DT_COLON] > 0) {
prefix_term = DT_COLON;
}
}
@@ -1069,3 +1410,17 @@ data_parser::discover_format_state::finalize()
this->dfs_format.df_separator = separator;
this->dfs_format.df_prefix_terminator = prefix_term;
}
+
+void
+data_parser::element_list_t::push_back(const data_parser::element& elem,
+ const char* fn,
+ int line)
+{
+ ELEMENT_TRACE;
+
+ require(elem.e_capture.c_end >= -1);
+ require(this->empty()
+ || (elem.e_capture.c_begin == -1 && elem.e_capture.c_end == -1)
+ || this->back().e_capture.c_end <= elem.e_capture.c_begin);
+ this->std::list<element>::push_back(elem);
+}
diff --git a/src/data_parser.hh b/src/data_parser.hh
index ca54a58..e2e4c70 100644
--- a/src/data_parser.hh
+++ b/src/data_parser.hh
@@ -209,6 +209,7 @@ class data_parser {
public:
static data_format FORMAT_SEMI;
static data_format FORMAT_COMMA;
+ static data_format FORMAT_EMDASH;
static data_format FORMAT_PLAIN;
static FILE* TRACE_FILE;
@@ -259,13 +260,7 @@ public:
this->std::list<element>::push_front(elem);
}
- void push_back(const element& elem, const char* fn, int line)
- {
- ELEMENT_TRACE;
-
- require(elem.e_capture.c_end >= -1);
- this->std::list<element>::push_back(elem);
- }
+ void push_back(const element& elem, const char* fn, int line);
void pop_front(const char* fn, int line)
{
@@ -335,6 +330,8 @@ public:
const element& get_pair_elem() const;
+ bool is_value() const;
+
void print(FILE* out, data_scanner&, int offset = 0) const;
data_scanner::capture_t e_capture;
@@ -402,7 +399,8 @@ public:
element_list_t& key_comps,
element_list_t& value,
const element_list_t& in_list,
- int group_depth);
+ int group_depth,
+ element_list_t::iterator iter);
void parse();
diff --git a/src/data_scanner.cc b/src/data_scanner.cc
index f270a13..3727407 100644
--- a/src/data_scanner.cc
+++ b/src/data_scanner.cc
@@ -48,6 +48,9 @@ static struct {
"quot",
},
{
+ "comm",
+ },
+ {
"url",
},
{
@@ -109,6 +112,9 @@ static struct {
{
"semi",
},
+ {
+ "emda",
+ },
{
"empt",
@@ -179,9 +185,15 @@ static struct {
"word",
},
{
+ "id",
+ },
+ {
"sym",
},
{
+ "unit",
+ },
+ {
"line",
},
{
@@ -200,6 +212,15 @@ static struct {
{
"gbg",
},
+ {
+ "zwsp",
+ },
+ {
+ "dffi",
+ },
+ {
+ "dfch",
+ },
};
const char* DNT_NAMES[DNT_MAX - DNT_KEY] = {
@@ -263,3 +284,122 @@ data_scanner::is_credit_card(string_fragment cc) const
return double_even_sum % 10 == 0;
}
+
+void
+data_scanner::cleanup_end()
+{
+ auto done = false;
+
+ while (!this->ds_input.empty() && !done) {
+ switch (this->ds_input.back()) {
+ case '.':
+ case ' ':
+ case '\r':
+ case '\n':
+ this->ds_input.pop_back();
+ break;
+ default:
+ done = true;
+ break;
+ }
+ }
+}
+
+nonstd::optional<data_scanner::tokenize_result>
+data_scanner::tokenize2(text_format_t tf)
+{
+ auto retval = this->tokenize_int(tf);
+
+ if (this->ds_last_bracket_matched) {
+ this->ds_matching_brackets.pop_back();
+ this->ds_last_bracket_matched = false;
+ }
+ if (retval) {
+ auto dt = retval.value().tr_token;
+ switch (dt) {
+ case DT_LSQUARE:
+ case DT_LCURLY:
+ case DT_LPAREN:
+ this->ds_matching_brackets.emplace_back(retval.value());
+ break;
+ case DT_RSQUARE:
+ case DT_RCURLY:
+ case DT_RPAREN:
+ if (!this->ds_matching_brackets.empty()
+ && this->ds_matching_brackets.back().tr_token
+ == to_opener(dt))
+ {
+ this->ds_last_bracket_matched = true;
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+ return retval;
+}
+
+nonstd::optional<data_scanner::tokenize_result>
+data_scanner::find_matching_bracket(text_format_t tf, tokenize_result tr)
+{
+ switch (tr.tr_token) {
+ case DT_LSQUARE:
+ case DT_LCURLY:
+ case DT_LPAREN: {
+ auto curr_size = this->ds_matching_brackets.size();
+ while (true) {
+ auto tok_res = this->tokenize2(tf);
+ if (!tok_res) {
+ break;
+ }
+
+ if (this->ds_matching_brackets.size() == curr_size
+ && this->ds_last_bracket_matched)
+ {
+ return tokenize_result{
+ DNT_GROUP,
+ {
+ tr.tr_capture.c_begin,
+ tok_res->tr_capture.c_end,
+ },
+ {
+ tr.tr_capture.c_begin,
+ tok_res->tr_capture.c_end,
+ },
+ tr.tr_data,
+ };
+ }
+ }
+ break;
+ }
+ case DT_RSQUARE:
+ case DT_RCURLY:
+ case DT_RPAREN: {
+ for (auto riter = this->ds_matching_brackets.rbegin();
+ riter != this->ds_matching_brackets.rend();
+ ++riter)
+ {
+ if (riter->tr_token == to_opener(tr.tr_token)) {
+ return data_scanner::tokenize_result{
+ DNT_GROUP,
+ {
+ riter->tr_capture.c_begin,
+ tr.tr_capture.c_end,
+ },
+ {
+ riter->tr_capture.c_begin,
+ tr.tr_capture.c_end,
+ },
+ tr.tr_data,
+ };
+ }
+ }
+ break;
+ }
+ default:
+ break;
+ }
+
+ return nonstd::nullopt;
+}
diff --git a/src/data_scanner.hh b/src/data_scanner.hh
index 3859ebb..86551de 100644
--- a/src/data_scanner.hh
+++ b/src/data_scanner.hh
@@ -34,11 +34,13 @@
#include "pcrepp/pcre2pp.hh"
#include "shared_buffer.hh"
+#include "text_format.hh"
enum data_token_t {
DT_INVALID = -1,
DT_QUOTED_STRING = 0,
+ DT_COMMENT,
DT_URL,
DT_PATH,
DT_MAC_ADDRESS,
@@ -62,6 +64,7 @@ enum data_token_t {
DT_EQUALS,
DT_COMMA,
DT_SEMI,
+ DT_EMDASH,
DT_EMPTY_CONTAINER,
@@ -90,7 +93,9 @@ enum data_token_t {
DT_EMAIL,
DT_CONSTANT,
DT_WORD,
+ DT_ID,
DT_SYMBOL,
+ DT_UNIT,
DT_LINE,
DT_WHITE,
DT_DOT,
@@ -98,10 +103,14 @@ enum data_token_t {
DT_CSI,
DT_GARBAGE,
+ DT_ZERO_WIDTH_SPACE,
- DT_TERMINAL_MAX = DT_GARBAGE + 1,
+ DT_DIFF_FILE_HEADER,
+ DT_DIFF_HUNK_HEADING,
- DNT_KEY = 50,
+ DT_TERMINAL_MAX = DT_DIFF_HUNK_HEADING + 1,
+
+ DNT_KEY = 54,
DNT_PAIR,
DNT_VALUE,
DNT_ROW,
@@ -121,8 +130,7 @@ public:
static const char* token2name(data_token_t token);
struct capture_t {
- capture_t()
- { /* We don't initialize anything since it's a perf hit. */
+ capture_t() { /* We don't initialize anything since it's a perf hit. */
}
capture_t(int begin, int end) : c_begin(begin), c_end(end)
@@ -151,25 +159,20 @@ public:
: ds_line(line), ds_input(this->ds_line), ds_init_offset(off),
ds_next_offset(off)
{
- if (!line.empty() && line.back() == '.') {
- this->ds_input.sf_end -= 1;
- }
+ this->cleanup_end();
}
explicit data_scanner(string_fragment sf) : ds_input(sf)
{
- if (!sf.empty() && sf.back() == '.') {
- this->ds_input.sf_end -= 1;
- }
+ this->cleanup_end();
}
- explicit data_scanner(shared_buffer_ref& line, size_t off, size_t end)
- : ds_sbr(line), ds_input(line.to_string_fragment().sub_range(0, end)),
+ explicit data_scanner(const shared_buffer_ref& line, size_t off, size_t end)
+ : ds_sbr(line.clone()),
+ ds_input(line.to_string_fragment().sub_range(0, end)),
ds_init_offset(off), ds_next_offset(off)
{
- if (!this->ds_input.empty() && this->ds_input.back() == '.') {
- this->ds_input.sf_end -= 1;
- }
+ this->cleanup_end();
}
struct tokenize_result {
@@ -178,6 +181,21 @@ public:
capture_t tr_inner_capture;
const char* tr_data{nullptr};
+ string_fragment to_string_fragment() const
+ {
+ return string_fragment::from_byte_range(this->tr_data,
+ this->tr_capture.c_begin,
+ this->tr_capture.c_end);
+ }
+
+ string_fragment inner_string_fragment() const
+ {
+ return string_fragment::from_byte_range(
+ this->tr_data,
+ this->tr_inner_capture.c_begin,
+ this->tr_inner_capture.c_end);
+ }
+
std::string to_string() const
{
return {&this->tr_data[this->tr_capture.c_begin],
@@ -185,7 +203,11 @@ public:
}
};
- nonstd::optional<tokenize_result> tokenize2();
+ nonstd::optional<tokenize_result> tokenize2(text_format_t tf
+ = text_format_t::TF_UNKNOWN);
+
+ nonstd::optional<tokenize_result> find_matching_bracket(text_format_t tf,
+ tokenize_result tr);
void reset() { this->ds_next_offset = this->ds_init_offset; }
@@ -199,13 +221,56 @@ public:
}
private:
+ void cleanup_end();
+
bool is_credit_card(string_fragment frag) const;
+ nonstd::optional<tokenize_result> tokenize_int(text_format_t tf
+ = text_format_t::TF_UNKNOWN);
+
std::string ds_line;
shared_buffer_ref ds_sbr;
string_fragment ds_input;
int ds_init_offset{0};
int ds_next_offset{0};
+ bool ds_bol{true};
+ bool ds_units{false};
+ std::vector<tokenize_result> ds_matching_brackets;
+ bool ds_last_bracket_matched{false};
};
+inline data_token_t
+to_opener(data_token_t dt)
+{
+ switch (dt) {
+ case DT_XML_CLOSE_TAG:
+ return DT_XML_OPEN_TAG;
+ case DT_RCURLY:
+ return DT_LCURLY;
+ case DT_RSQUARE:
+ return DT_LSQUARE;
+ case DT_RPAREN:
+ return DT_LPAREN;
+ default:
+ ensure(0);
+ }
+}
+
+inline data_token_t
+to_closer(data_token_t dt)
+{
+ switch (dt) {
+ case DT_XML_OPEN_TAG:
+ return DT_XML_CLOSE_TAG;
+ case DT_LCURLY:
+ return DT_RCURLY;
+ case DT_LSQUARE:
+ return DT_RSQUARE;
+ case DT_LPAREN:
+ return DT_RPAREN;
+ default:
+ ensure(0);
+ }
+}
+
#endif
diff --git a/src/data_scanner_re.cc b/src/data_scanner_re.cc
index 21bb7ce..ae65b3d 100644
--- a/src/data_scanner_re.cc
+++ b/src/data_scanner_re.cc
@@ -1,4 +1,4 @@
-/* Generated by re2c 3.0 on Mon Sep 19 01:36:56 2022 */
+/* Generated by re2c 3.1 on Thu Apr 18 13:48:53 2024 */
#line 1 "../../lnav/src/data_scanner_re.re"
/**
* Copyright (c) 2015, Timothy Stack
@@ -37,7 +37,18 @@
#include "config.h"
#include "data_scanner.hh"
-nonstd::optional<data_scanner::tokenize_result> data_scanner::tokenize2()
+#line 41 "../../lnav/src/data_scanner_re.cc"
+enum YYCONDTYPE {
+ yycbol,
+ yycinit,
+ yycdbldocstring,
+ yycsdocstring,
+ yycunits
+};
+#line 38 "../../lnav/src/data_scanner_re.re"
+
+
+nonstd::optional<data_scanner::tokenize_result> data_scanner::tokenize_int(text_format_t tf)
{
data_token_t token_out = DT_INVALID;
capture_t cap_all;
@@ -102,8 +113,30 @@ nonstd::optional<data_scanner::tokenize_result> data_scanner::tokenize2()
_YYCURSOR yyt2;
_YYCURSOR yyt3;
_YYCURSOR yyt4;
+ _YYCURSOR hunk_heading;
const YYCTYPE *YYLIMIT = (const unsigned char *) this->ds_input.end();
const YYCTYPE *YYMARKER = YYCURSOR;
+ class _yycond {
+ public:
+ int operator()() const {
+ return this->val;
+ }
+
+ void operator=(int v) {
+ this->val = v;
+ }
+
+ int val{yycinit};
+ } c;
+
+ if (this->ds_bol) {
+ c = yycbol;
+ }
+ this->ds_bol = false;
+ if (this->ds_units) {
+ c = yycunits;
+ }
+ this->ds_units = false;
YYCURSOR.lim = YYLIMIT;
@@ -113,28 +146,28 @@ nonstd::optional<data_scanner::tokenize_result> data_scanner::tokenize2()
cap_inner.c_end = this->ds_next_offset;
-#line 117 "../../lnav/src/data_scanner_re.cc"
+#line 150 "../../lnav/src/data_scanner_re.cc"
{
- YYCTYPE yych;
+ uint8_t yych;
unsigned int yyaccept = 0;
- static const unsigned char yybm[] = {
+ static const unsigned char yybm_bol[] = {
/* table 1 .. 8: 0 */
- 0, 231, 231, 231, 231, 231, 231, 231,
- 231, 239, 231, 231, 231, 239, 231, 231,
- 231, 231, 231, 231, 231, 231, 231, 231,
- 231, 231, 231, 231, 231, 231, 231, 231,
- 239, 231, 34, 231, 231, 231, 231, 36,
- 231, 231, 231, 231, 231, 175, 231, 183,
- 175, 175, 175, 175, 175, 175, 175, 175,
- 175, 175, 175, 231, 231, 231, 128, 183,
- 231, 175, 175, 175, 175, 175, 175, 175,
- 175, 175, 175, 175, 175, 175, 175, 175,
- 175, 175, 175, 175, 175, 175, 175, 175,
- 175, 175, 175, 231, 1, 231, 231, 175,
- 231, 175, 175, 175, 175, 175, 175, 175,
- 175, 175, 175, 175, 175, 175, 175, 175,
- 175, 175, 175, 175, 175, 175, 175, 175,
- 175, 175, 175, 231, 231, 231, 231, 231,
+ 0, 249, 249, 249, 249, 249, 249, 249,
+ 249, 251, 249, 249, 249, 251, 249, 249,
+ 249, 249, 249, 249, 249, 249, 249, 249,
+ 249, 249, 249, 249, 249, 249, 249, 249,
+ 251, 249, 24, 249, 249, 249, 249, 25,
+ 249, 249, 177, 249, 249, 147, 249, 221,
+ 219, 219, 219, 219, 219, 219, 219, 219,
+ 219, 219, 219, 249, 249, 249, 192, 221,
+ 249, 219, 219, 219, 219, 219, 219, 219,
+ 219, 219, 219, 219, 219, 219, 219, 219,
+ 219, 219, 219, 219, 219, 219, 219, 219,
+ 219, 219, 219, 249, 25, 249, 249, 219,
+ 249, 219, 219, 219, 219, 219, 219, 219,
+ 219, 219, 219, 219, 219, 219, 219, 219,
+ 219, 219, 219, 219, 219, 219, 219, 219,
+ 219, 219, 219, 249, 249, 249, 249, 249,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
@@ -152,22 +185,22 @@ nonstd::optional<data_scanner::tokenize_result> data_scanner::tokenize2()
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
/* table 9 .. 16: 256 */
- 0, 249, 249, 249, 249, 249, 249, 249,
- 249, 248, 248, 249, 249, 248, 249, 249,
- 249, 249, 249, 249, 249, 249, 249, 249,
- 249, 249, 249, 248, 249, 249, 249, 249,
- 248, 249, 176, 249, 249, 252, 252, 104,
- 248, 248, 249, 249, 249, 28, 249, 28,
- 28, 28, 28, 28, 28, 28, 28, 28,
- 28, 28, 25, 249, 249, 252, 25, 28,
- 249, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 248, 33, 248, 249, 25,
- 249, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 248, 249, 248, 249, 249,
+ 0, 251, 251, 251, 251, 251, 251, 251,
+ 251, 251, 251, 251, 251, 251, 251, 251,
+ 251, 251, 251, 251, 251, 251, 251, 251,
+ 251, 251, 251, 251, 251, 251, 251, 251,
+ 251, 251, 146, 251, 251, 251, 251, 33,
+ 251, 251, 192, 251, 251, 196, 251, 251,
+ 251, 251, 251, 251, 251, 251, 251, 251,
+ 251, 251, 251, 251, 251, 251, 3, 251,
+ 251, 251, 251, 251, 251, 251, 251, 251,
+ 251, 251, 251, 251, 251, 251, 251, 251,
+ 251, 251, 251, 251, 251, 251, 251, 251,
+ 251, 251, 251, 251, 248, 251, 251, 251,
+ 251, 251, 251, 251, 251, 251, 251, 251,
+ 251, 251, 251, 251, 251, 251, 251, 251,
+ 251, 251, 251, 251, 251, 251, 251, 251,
+ 251, 251, 251, 251, 251, 251, 251, 251,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
@@ -185,22 +218,288 @@ nonstd::optional<data_scanner::tokenize_result> data_scanner::tokenize2()
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
/* table 17 .. 24: 512 */
+ 0, 253, 253, 253, 253, 253, 253, 253,
+ 253, 253, 252, 253, 253, 253, 253, 253,
+ 253, 253, 253, 253, 253, 253, 253, 253,
+ 253, 253, 253, 253, 253, 253, 253, 253,
+ 253, 253, 185, 253, 253, 255, 255, 117,
+ 253, 253, 237, 253, 253, 15, 253, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 29, 253, 253, 255, 29, 31,
+ 253, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 253, 49, 253, 253, 29,
+ 253, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 253, 253, 253, 253, 253,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ /* table 25 .. 32: 768 */
+ 0, 32, 32, 32, 32, 32, 32, 32,
+ 32, 0, 0, 32, 32, 0, 32, 32,
+ 32, 32, 32, 32, 32, 32, 0, 32,
+ 32, 32, 32, 0, 32, 32, 32, 32,
+ 0, 32, 0, 32, 32, 0, 0, 0,
+ 0, 0, 48, 32, 32, 1, 40, 0,
+ 65, 65, 65, 65, 65, 65, 65, 65,
+ 65, 65, 96, 32, 32, 0, 32, 0,
+ 32, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193,
+ 193, 193, 193, 0, 32, 2, 32, 97,
+ 32, 197, 197, 197, 197, 197, 197, 197,
+ 197, 197, 197, 197, 197, 197, 197, 197,
+ 197, 197, 197, 197, 197, 197, 197, 197,
+ 197, 197, 197, 0, 32, 0, 32, 32,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
- 1, 0, 0, 0, 0, 0, 0, 32,
- 0, 0, 0, 0, 0, 19, 64, 0,
- 159, 159, 159, 159, 159, 159, 159, 159,
- 155, 155, 16, 0, 0, 0, 0, 0,
- 0, 155, 155, 155, 155, 155, 155, 147,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ /* table 33 .. 40: 1024 */
+ 0, 33, 33, 33, 33, 33, 33, 33,
+ 33, 33, 33, 33, 33, 33, 33, 33,
+ 33, 33, 33, 33, 33, 33, 33, 33,
+ 33, 33, 33, 33, 33, 33, 33, 33,
+ 33, 33, 33, 33, 33, 33, 33, 33,
+ 33, 33, 1, 33, 33, 227, 33, 33,
+ 255, 255, 255, 255, 255, 255, 255, 255,
+ 247, 247, 97, 33, 33, 33, 33, 33,
+ 33, 243, 243, 243, 243, 243, 243, 227,
+ 227, 227, 227, 227, 227, 227, 227, 227,
+ 227, 227, 227, 227, 227, 227, 227, 227,
+ 227, 227, 227, 33, 33, 32, 33, 225,
+ 33, 115, 115, 115, 115, 115, 115, 99,
+ 99, 99, 99, 99, 99, 99, 99, 99,
+ 99, 99, 99, 99, 99, 99, 99, 99,
+ 99, 99, 99, 33, 33, 33, 33, 33,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ /* table 41 .. 48: 1280 */
+ 0, 128, 128, 128, 128, 128, 128, 128,
+ 128, 128, 0, 128, 128, 128, 128, 128,
+ 128, 128, 128, 128, 128, 128, 128, 128,
+ 128, 128, 128, 128, 128, 128, 128, 128,
+ 140, 131, 128, 131, 131, 131, 131, 144,
+ 131, 131, 129, 128, 128, 139, 131, 131,
+ 235, 235, 235, 235, 235, 235, 235, 235,
+ 235, 235, 128, 128, 128, 128, 128, 128,
+ 131, 235, 235, 235, 235, 235, 235, 235,
+ 235, 235, 235, 235, 235, 235, 235, 235,
+ 235, 235, 235, 235, 235, 235, 235, 235,
+ 235, 235, 235, 128, 131, 0, 131, 171,
+ 128, 147, 147, 147, 147, 147, 147, 147,
147, 147, 147, 147, 147, 147, 147, 147,
147, 147, 147, 147, 147, 147, 147, 147,
- 147, 147, 147, 0, 0, 0, 0, 145,
- 0, 154, 154, 154, 154, 154, 154, 146,
- 146, 146, 146, 146, 146, 146, 146, 146,
- 146, 146, 146, 146, 146, 146, 146, 146,
- 146, 146, 146, 0, 0, 0, 0, 0,
+ 147, 147, 147, 128, 128, 128, 131, 128,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ /* table 49 .. 56: 1536 */
+ 0, 72, 72, 72, 72, 72, 72, 72,
+ 72, 74, 0, 72, 72, 74, 72, 72,
+ 72, 72, 72, 72, 72, 72, 0, 72,
+ 72, 72, 72, 0, 72, 72, 72, 72,
+ 74, 72, 64, 72, 72, 104, 72, 8,
+ 72, 72, 72, 104, 72, 104, 104, 72,
+ 237, 237, 237, 237, 237, 237, 237, 237,
+ 237, 237, 72, 76, 72, 92, 72, 76,
+ 72, 233, 233, 233, 233, 233, 233, 233,
+ 233, 233, 233, 233, 233, 233, 233, 233,
+ 233, 233, 233, 233, 233, 233, 233, 233,
+ 233, 233, 233, 72, 0, 72, 72, 105,
+ 72, 233, 233, 233, 233, 233, 233, 233,
+ 233, 233, 233, 233, 233, 233, 233, 233,
+ 233, 233, 233, 233, 233, 233, 233, 233,
+ 233, 233, 233, 72, 72, 72, 72, 72,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ /* table 57 .. 57: 1792 */
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 128, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ };
+ static const unsigned char yybm_init[] = {
+ /* table 1 .. 8: 0 */
+ 0, 252, 252, 252, 252, 252, 252, 252,
+ 252, 253, 124, 252, 252, 253, 252, 252,
+ 252, 252, 252, 252, 252, 252, 252, 252,
+ 252, 252, 252, 252, 252, 252, 252, 252,
+ 253, 252, 140, 252, 252, 252, 252, 140,
+ 252, 252, 216, 252, 252, 201, 252, 238,
+ 237, 237, 237, 237, 237, 237, 237, 237,
+ 237, 237, 237, 252, 252, 252, 224, 238,
+ 252, 237, 237, 237, 237, 237, 237, 237,
+ 237, 237, 237, 237, 237, 237, 237, 237,
+ 237, 237, 237, 237, 237, 237, 237, 237,
+ 237, 237, 237, 252, 140, 252, 252, 237,
+ 252, 237, 237, 237, 237, 237, 237, 237,
+ 237, 237, 237, 237, 237, 237, 237, 237,
+ 237, 237, 237, 237, 237, 237, 237, 237,
+ 237, 237, 237, 252, 252, 252, 252, 252,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ /* table 9 .. 16: 256 */
+ 0, 253, 253, 253, 253, 253, 253, 253,
+ 253, 253, 253, 253, 253, 253, 253, 253,
+ 253, 253, 253, 253, 253, 253, 253, 253,
+ 253, 253, 253, 253, 253, 253, 253, 253,
+ 253, 253, 73, 253, 253, 253, 253, 144,
+ 253, 253, 224, 253, 253, 226, 253, 253,
+ 253, 253, 253, 253, 253, 253, 253, 253,
+ 253, 253, 253, 253, 253, 253, 1, 253,
+ 253, 253, 253, 253, 253, 253, 253, 253,
+ 253, 253, 253, 253, 253, 253, 253, 253,
+ 253, 253, 253, 253, 253, 253, 253, 253,
+ 253, 253, 253, 253, 252, 253, 253, 253,
+ 253, 253, 253, 253, 253, 253, 253, 253,
+ 253, 253, 253, 253, 253, 253, 253, 253,
+ 253, 253, 253, 253, 253, 253, 253, 253,
+ 253, 253, 253, 253, 253, 253, 253, 253,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ /* table 17 .. 24: 512 */
+ 0, 254, 254, 254, 254, 254, 254, 254,
+ 254, 254, 254, 254, 254, 254, 254, 254,
+ 254, 254, 254, 254, 254, 254, 254, 254,
+ 254, 254, 254, 254, 254, 254, 254, 254,
+ 254, 254, 92, 254, 254, 255, 255, 186,
+ 254, 254, 118, 254, 254, 7, 254, 143,
+ 143, 143, 143, 143, 143, 143, 143, 143,
+ 143, 143, 142, 254, 254, 255, 142, 143,
+ 254, 143, 143, 143, 143, 143, 143, 143,
+ 143, 143, 143, 143, 143, 143, 143, 143,
+ 143, 143, 143, 143, 143, 143, 143, 143,
+ 143, 143, 143, 254, 24, 254, 254, 142,
+ 254, 143, 143, 143, 143, 143, 143, 143,
+ 143, 143, 143, 143, 143, 143, 143, 143,
+ 143, 143, 143, 143, 143, 143, 143, 143,
+ 143, 143, 143, 254, 254, 254, 254, 254,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
@@ -218,28 +517,88 @@ nonstd::optional<data_scanner::tokenize_result> data_scanner::tokenize2()
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
/* table 25 .. 32: 768 */
- 0, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 0, 2, 2, 2, 2,
- 34, 10, 2, 10, 26, 11, 10, 0,
- 10, 10, 10, 3, 2, 27, 27, 26,
- 95, 95, 95, 95, 95, 95, 95, 95,
- 95, 95, 2, 2, 2, 2, 2, 2,
- 26, 91, 91, 91, 91, 91, 91, 91,
- 91, 91, 91, 91, 91, 91, 91, 91,
- 91, 91, 91, 91, 91, 91, 91, 91,
- 91, 91, 91, 2, 8, 2, 10, 27,
- 2, 219, 219, 219, 219, 219, 219, 219,
- 219, 219, 219, 219, 219, 219, 219, 219,
- 219, 219, 219, 219, 219, 219, 219, 219,
- 219, 219, 219, 2, 2, 2, 10, 2,
+ 0, 32, 32, 32, 32, 32, 32, 32,
+ 32, 0, 0, 32, 32, 0, 32, 32,
+ 32, 32, 32, 32, 32, 32, 0, 32,
+ 32, 32, 32, 0, 32, 32, 32, 32,
+ 0, 32, 0, 32, 32, 0, 0, 0,
+ 0, 0, 48, 32, 32, 3, 40, 0,
+ 67, 67, 67, 67, 67, 67, 67, 67,
+ 67, 67, 97, 32, 32, 0, 32, 0,
+ 32, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 0, 32, 0, 32, 99,
+ 32, 199, 199, 199, 199, 199, 199, 199,
+ 199, 199, 199, 199, 199, 199, 199, 199,
+ 199, 199, 199, 199, 199, 199, 199, 199,
+ 199, 199, 199, 0, 32, 0, 32, 32,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ /* table 33 .. 40: 1024 */
+ 0, 132, 132, 132, 132, 132, 132, 132,
+ 132, 132, 132, 132, 132, 132, 132, 132,
+ 132, 132, 132, 132, 132, 132, 132, 132,
+ 132, 132, 132, 132, 132, 132, 132, 132,
+ 133, 132, 132, 132, 132, 132, 132, 134,
+ 132, 132, 4, 132, 132, 140, 132, 132,
+ 252, 252, 252, 252, 252, 252, 252, 252,
+ 220, 220, 132, 132, 132, 132, 132, 132,
+ 132, 204, 204, 204, 204, 204, 204, 140,
+ 140, 140, 140, 140, 140, 140, 140, 140,
+ 140, 140, 140, 140, 140, 140, 140, 140,
+ 140, 140, 140, 132, 132, 128, 132, 132,
+ 132, 206, 206, 206, 206, 206, 206, 142,
+ 142, 142, 142, 142, 142, 142, 142, 142,
+ 142, 142, 142, 142, 142, 142, 142, 142,
+ 142, 142, 142, 132, 132, 132, 132, 132,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
+ /* table 41 .. 48: 1280 */
+ 0, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 0, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 0, 18,
+ 18, 18, 18, 0, 18, 18, 18, 18,
+ 18, 210, 16, 210, 210, 218, 210, 2,
+ 210, 210, 82, 26, 18, 218, 218, 210,
+ 251, 251, 251, 251, 251, 251, 251, 251,
+ 251, 251, 18, 19, 18, 23, 18, 19,
+ 210, 250, 250, 250, 250, 250, 250, 250,
+ 250, 250, 250, 250, 250, 250, 250, 250,
+ 250, 250, 250, 250, 250, 250, 250, 250,
+ 250, 250, 250, 18, 192, 18, 210, 218,
+ 18, 250, 250, 250, 250, 250, 250, 250,
+ 250, 250, 250, 250, 250, 250, 250, 250,
+ 250, 250, 250, 250, 250, 250, 250, 250,
+ 250, 250, 250, 18, 18, 18, 210, 18,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
@@ -250,23 +609,29 @@ nonstd::optional<data_scanner::tokenize_result> data_scanner::tokenize2()
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
- /* table 33 .. 37: 1024 */
- 0, 136, 136, 136, 136, 136, 136, 136,
- 136, 160, 128, 136, 136, 160, 136, 136,
- 136, 136, 136, 136, 136, 136, 136, 136,
- 136, 136, 136, 0, 136, 136, 136, 136,
- 160, 128, 0, 128, 136, 128, 128, 128,
- 128, 128, 128, 128, 128, 152, 152, 136,
- 216, 216, 216, 216, 216, 216, 216, 216,
- 216, 216, 128, 192, 128, 192, 128, 192,
- 136, 152, 152, 152, 152, 152, 152, 152,
- 152, 152, 152, 152, 152, 152, 152, 152,
- 152, 152, 152, 152, 152, 152, 152, 152,
- 152, 152, 152, 128, 0, 128, 128, 152,
- 128, 152, 152, 152, 152, 152, 152, 152,
- 152, 152, 152, 152, 152, 152, 152, 152,
- 152, 152, 152, 152, 152, 152, 152, 152,
- 152, 152, 152, 128, 128, 128, 128, 136,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ /* table 49 .. 51: 1536 */
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 128, 0, 0, 0, 128, 0, 0,
+ 0, 0, 0, 0, 0, 0, 32, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 128, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 64, 64, 64, 64, 64, 64, 64, 64,
+ 64, 64, 0, 0, 0, 0, 0, 0,
+ 0, 64, 64, 64, 64, 64, 64, 64,
+ 64, 64, 64, 64, 64, 64, 64, 64,
+ 64, 64, 64, 64, 64, 64, 64, 64,
+ 64, 64, 64, 0, 0, 0, 0, 64,
+ 0, 64, 64, 64, 64, 64, 64, 64,
+ 64, 64, 64, 64, 64, 64, 64, 64,
+ 64, 64, 64, 64, 64, 64, 64, 64,
+ 64, 64, 64, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
@@ -284,22117 +649,66551 @@ nonstd::optional<data_scanner::tokenize_result> data_scanner::tokenize2()
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
};
+ if (c() < 2) {
+ if (c() < 1) {
+ goto yyc_bol;
+ } else {
+ goto yyc_init;
+ }
+ } else {
+ if (c() < 3) {
+ goto yyc_dbldocstring;
+ } else {
+ if (c() < 4) {
+ goto yyc_sdocstring;
+ } else {
+ goto yyc_units;
+ }
+ }
+ }
+/* *********************************** */
+yyc_bol:
yych = *YYCURSOR;
+ if (yybm_bol[1792+yych] & 128) {
+ goto yy8;
+ }
if (yych <= 'E') {
- if (yych <= '(') {
+ if (yych <= ')') {
if (yych <= 0x1F) {
if (yych <= '\n') {
- if (yych <= 0x00) goto yy2;
- if (yych <= 0x08) goto yy3;
- if (yych <= '\t') goto yy6;
- goto yy8;
+ if (yych <= 0x00) goto yy1;
+ if (yych <= 0x08) goto yy2;
+ if (yych <= '\t') goto yy4;
+ goto yy6;
} else {
if (yych <= '\r') {
- if (yych <= '\f') goto yy3;
- goto yy10;
+ if (yych <= '\f') goto yy2;
+ goto yy7;
} else {
- if (yych == 0x1B) goto yy11;
- goto yy3;
+ if (yych == 0x1B) goto yy9;
+ goto yy2;
}
}
} else {
- if (yych <= '#') {
- if (yych <= ' ') goto yy6;
- if (yych == '"') goto yy14;
- goto yy13;
+ if (yych <= '$') {
+ if (yych <= '!') {
+ if (yych <= ' ') goto yy4;
+ goto yy2;
+ } else {
+ if (yych <= '"') goto yy10;
+ if (yych <= '#') goto yy11;
+ goto yy2;
+ }
} else {
- if (yych <= '%') {
- if (yych <= '$') goto yy3;
- goto yy15;
+ if (yych <= '&') {
+ if (yych <= '%') goto yy12;
+ goto yy2;
} else {
- if (yych <= '&') goto yy13;
- if (yych <= '\'') goto yy16;
- goto yy17;
+ if (yych <= '\'') goto yy13;
+ if (yych <= '(') goto yy14;
+ goto yy15;
}
}
}
} else {
- if (yych <= '1') {
- if (yych <= ',') {
- if (yych <= ')') goto yy18;
- if (yych <= '*') goto yy13;
- if (yych <= '+') goto yy15;
- goto yy19;
+ if (yych <= '2') {
+ if (yych <= '-') {
+ if (yych <= '*') goto yy2;
+ if (yych <= '+') goto yy16;
+ if (yych <= ',') goto yy17;
+ goto yy18;
} else {
- if (yych <= '.') {
- if (yych <= '-') goto yy20;
+ if (yych <= '/') {
+ if (yych <= '.') goto yy19;
goto yy21;
} else {
- if (yych <= '/') goto yy23;
- if (yych <= '0') goto yy25;
- goto yy27;
+ if (yych <= '0') goto yy23;
+ if (yych <= '1') goto yy25;
+ goto yy26;
}
}
} else {
- if (yych <= '<') {
- if (yych <= '9') {
- if (yych <= '2') goto yy28;
- goto yy29;
+ if (yych <= '=') {
+ if (yych <= ':') {
+ if (yych <= '9') goto yy27;
+ goto yy28;
} else {
- if (yych <= ':') goto yy30;
- if (yych <= ';') goto yy32;
+ if (yych <= ';') goto yy30;
+ if (yych <= '<') goto yy31;
goto yy33;
}
} else {
- if (yych <= '>') {
- if (yych <= '=') goto yy35;
- goto yy36;
+ if (yych <= '?') {
+ if (yych <= '>') goto yy34;
+ goto yy2;
} else {
- if (yych <= '?') goto yy13;
- if (yych <= '@') goto yy3;
- goto yy37;
+ if (yych <= '@') goto yy35;
+ if (yych <= 'A') goto yy36;
+ goto yy38;
}
}
}
}
} else {
- if (yych <= 'n') {
- if (yych <= 'Z') {
- if (yych <= 'Q') {
- if (yych <= 'F') goto yy38;
- if (yych == 'N') goto yy40;
- goto yy39;
+ if (yych <= 'f') {
+ if (yych <= '[') {
+ if (yych <= 'M') {
+ if (yych <= 'F') goto yy40;
+ if (yych == 'I') goto yy42;
+ goto yy41;
} else {
if (yych <= 'S') {
- if (yych <= 'R') goto yy41;
- goto yy39;
+ if (yych <= 'N') goto yy43;
+ goto yy41;
} else {
- if (yych <= 'T') goto yy42;
- if (yych <= 'U') goto yy41;
- goto yy39;
+ if (yych <= 'T') goto yy44;
+ if (yych <= 'Z') goto yy41;
+ goto yy45;
}
}
} else {
- if (yych <= '_') {
- if (yych <= '\\') {
- if (yych <= '[') goto yy43;
- goto yy44;
+ if (yych <= '`') {
+ if (yych <= ']') {
+ if (yych <= '\\') goto yy47;
+ goto yy48;
} else {
- if (yych <= ']') goto yy45;
- if (yych <= '^') goto yy13;
- goto yy46;
+ if (yych == '_') goto yy49;
+ goto yy2;
}
} else {
- if (yych <= 'e') {
- if (yych <= '`') goto yy13;
- goto yy47;
+ if (yych <= 'c') {
+ if (yych <= 'a') goto yy51;
+ goto yy52;
} else {
- if (yych <= 'f') goto yy48;
- if (yych <= 'm') goto yy49;
- goto yy50;
+ if (yych <= 'd') goto yy53;
+ if (yych <= 'e') goto yy52;
+ goto yy54;
}
}
}
} else {
- if (yych <= '}') {
- if (yych <= 't') {
- if (yych == 'r') goto yy51;
- if (yych <= 's') goto yy49;
- goto yy52;
- } else {
- if (yych <= 'z') {
- if (yych <= 'u') goto yy53;
- goto yy49;
+ if (yych <= '|') {
+ if (yych <= 's') {
+ if (yych <= 'n') {
+ if (yych <= 'm') goto yy55;
+ goto yy56;
} else {
- if (yych <= '{') goto yy54;
- if (yych <= '|') goto yy13;
+ if (yych == 'r') goto yy57;
goto yy55;
}
+ } else {
+ if (yych <= 'u') {
+ if (yych <= 't') goto yy58;
+ goto yy59;
+ } else {
+ if (yych <= 'z') goto yy55;
+ if (yych <= '{') goto yy60;
+ goto yy2;
+ }
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= '~') goto yy13;
- goto yy3;
+ if (yych <= '}') goto yy61;
+ goto yy2;
} else {
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy56;
- goto yy57;
+ if (yych <= 0xC1) goto yy62;
+ if (yych <= 0xDF) goto yy64;
+ goto yy65;
}
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy58;
- goto yy59;
+ if (yych <= 0xEF) goto yy66;
+ goto yy67;
} else {
- if (yych <= 0xF3) goto yy60;
- if (yych <= 0xF4) goto yy61;
+ if (yych <= 0xF3) goto yy68;
+ if (yych <= 0xF4) goto yy69;
+ goto yy62;
}
}
}
}
}
yy1:
+ ++YYCURSOR;
+#line 172 "../../lnav/src/data_scanner_re.re"
+ { return nonstd::nullopt; }
+#line 837 "../../lnav/src/data_scanner_re.cc"
+yy2:
+ ++YYCURSOR;
+yy3:
+#line 476 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_GARBAGE); }
+#line 843 "../../lnav/src/data_scanner_re.cc"
+yy4:
+ yyaccept = 0;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '/') goto yy71;
+ if (yych <= '9') goto yy72;
+ if (yych <= ':') goto yy74;
+ goto yy71;
+yy5:
+#line 473 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_WHITE); }
+#line 854 "../../lnav/src/data_scanner_re.cc"
+yy6:
+ ++YYCURSOR;
+#line 469 "../../lnav/src/data_scanner_re.re"
+ {
+ this->ds_bol = true;
+ RET(DT_LINE);
+ }
+#line 862 "../../lnav/src/data_scanner_re.cc"
+yy7:
+ yyaccept = 0;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '/') {
+ if (yych == '\n') goto yy6;
+ goto yy71;
+ } else {
+ if (yych <= '9') goto yy72;
+ if (yych <= ':') goto yy74;
+ goto yy71;
+ }
+yy8:
+ yych = *++YYCURSOR;
+ if (yybm_bol[1792+yych] & 128) {
+ goto yy8;
+ }
+#line 174 "../../lnav/src/data_scanner_re.re"
+ {
+ RET(DT_ZERO_WIDTH_SPACE);
+ }
+#line 883 "../../lnav/src/data_scanner_re.cc"
+yy9:
+ yyaccept = 1;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '[') goto yy75;
+ goto yy3;
+yy10:
+ yyaccept = 1;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 0x1A) {
+ if (yych <= '\n') {
+ if (yych <= 0x00) goto yy3;
+ if (yych <= '\t') goto yy77;
+ goto yy3;
+ } else {
+ if (yych == 0x16) goto yy3;
+ goto yy77;
+ }
+ } else {
+ if (yych <= '"') {
+ if (yych <= 0x1B) goto yy3;
+ if (yych <= '!') goto yy77;
+ goto yy78;
+ } else {
+ if (yych <= 0x7F) goto yy77;
+ if (yych <= 0xC1) goto yy3;
+ if (yych <= 0xF4) goto yy77;
+ goto yy3;
+ }
+ }
+yy11:
+ yyaccept = 1;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '[') goto yy87;
+ goto yy3;
+yy12:
+ yyaccept = 1;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '/') {
+ if (yych <= '*') {
+ if (yych == '%') goto yy89;
+ goto yy3;
+ } else {
+ if (yych == ',') goto yy3;
+ if (yych <= '.') goto yy89;
+ goto yy3;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '9') goto yy89;
+ if (yych <= '?') goto yy3;
+ if (yych <= 'Z') goto yy89;
+ goto yy3;
+ } else {
+ if (yych == '`') goto yy3;
+ if (yych <= 'z') goto yy89;
+ goto yy3;
+ }
+ }
+yy13:
+ yyaccept = 1;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 0x1A) {
+ if (yych <= '\n') {
+ if (yych <= 0x00) goto yy3;
+ if (yych <= '\t') goto yy92;
+ goto yy3;
+ } else {
+ if (yych == 0x16) goto yy3;
+ goto yy92;
+ }
+ } else {
+ if (yych <= '\'') {
+ if (yych <= 0x1B) goto yy3;
+ if (yych <= '&') goto yy92;
+ goto yy93;
+ } else {
+ if (yych <= 0x7F) goto yy92;
+ if (yych <= 0xC1) goto yy3;
+ if (yych <= 0xF4) goto yy92;
+ goto yy3;
+ }
+ }
+yy14:
+ yych = *++YYCURSOR;
+ if (yych == ')') goto yy101;
+#line 380 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_LPAREN); }
+#line 971 "../../lnav/src/data_scanner_re.cc"
+yy15:
+ ++YYCURSOR;
+#line 381 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_RPAREN); }
+#line 976 "../../lnav/src/data_scanner_re.cc"
+yy16:
+ yyaccept = 1;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '0') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy107;
+ if (yych <= '*') goto yy3;
+ goto yy103;
+ } else {
+ if (yych <= ',') goto yy3;
+ if (yych <= '.') goto yy107;
+ if (yych <= '/') goto yy3;
+ goto yy104;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '9') goto yy105;
+ if (yych <= '?') goto yy3;
+ if (yych <= 'Z') goto yy107;
+ goto yy3;
+ } else {
+ if (yych == '`') goto yy3;
+ if (yych <= 'z') goto yy107;
+ goto yy3;
+ }
+ }
+yy17:
+ ++YYCURSOR;
+#line 372 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_COMMA); }
+#line 1007 "../../lnav/src/data_scanner_re.cc"
+yy18:
+ yyaccept = 1;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '/') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy107;
+ if (yych <= '*') goto yy3;
+ goto yy107;
+ } else {
+ if (yych <= ',') goto yy3;
+ if (yych <= '-') goto yy108;
+ if (yych <= '.') goto yy107;
+ goto yy3;
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '0') goto yy109;
+ if (yych <= '9') goto yy110;
+ if (yych <= '?') goto yy3;
+ goto yy107;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy3;
+ goto yy107;
+ } else {
+ if (yych <= '`') goto yy3;
+ if (yych <= 'z') goto yy107;
+ goto yy3;
+ }
+ }
+ }
+yy19:
+ yyaccept = 2;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '/') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy89;
+ if (yych >= '+') goto yy89;
+ } else {
+ if (yych <= ',') goto yy20;
+ if (yych <= '-') goto yy89;
+ if (yych <= '.') goto yy111;
+ goto yy112;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '9') goto yy89;
+ if (yych <= '?') goto yy20;
+ if (yych <= 'Z') goto yy89;
+ } else {
+ if (yych == '`') goto yy20;
+ if (yych <= 'z') goto yy89;
+ }
+ }
+yy20:
+#line 474 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_DOT); }
+#line 1065 "../../lnav/src/data_scanner_re.cc"
+yy21:
+ yych = *++YYCURSOR;
+ if (yych == '*') goto yy115;
+ if (yych == 'P') goto yy116;
+ goto yy114;
+yy22:
+#line 293 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_PATH); }
+#line 1074 "../../lnav/src/data_scanner_re.cc"
+yy23:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ switch (yych) {
+ case '%': goto yy119;
+ case '+': goto yy88;
+ case '-': goto yy121;
+ case '.': goto yy122;
+ case '/': goto yy123;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7': goto yy124;
+ case '8':
+ case '9': goto yy126;
+ case ':': goto yy128;
+ case '@': goto yy129;
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'E':
+ case 'F':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'e':
+ case 'f': goto yy130;
+ case 'B':
+ case 'b': goto yy131;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy132;
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'y':
+ case 'z': goto yy134;
+ case 'S':
+ case 's': goto yy136;
+ case '_': goto yy137;
+ case 'm': goto yy139;
+ case 'p':
+ case 'u': goto yy140;
+ case 'x': goto yy141;
+ default: goto yy24;
+ }
+yy24:
+#line 429 "../../lnav/src/data_scanner_re.re"
+ {
+ CAPTURE(DT_NUMBER);
+ auto sf = this->to_string_fragment(cap_all);
+ if (isalpha(sf.back())) {
+ while (isalpha(sf.back())) {
+ sf.pop_back();
+ }
+ cap_all.c_end = sf.sf_end - this->ds_input.sf_begin;
+ cap_inner.c_end = sf.sf_end - this->ds_input.sf_begin;
+ this->ds_next_offset = cap_all.c_end;
+ this->ds_units = true;
+ }
+ return tokenize_result{DT_NUMBER, cap_all, cap_inner, this->ds_input.data()};
+ }
+#line 1170 "../../lnav/src/data_scanner_re.cc"
+yy25:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ switch (yych) {
+ case '%': goto yy119;
+ case '+': goto yy88;
+ case '-': goto yy121;
+ case '.': goto yy122;
+ case '/': goto yy123;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy142;
+ case ':': goto yy128;
+ case '@': goto yy129;
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f': goto yy130;
+ case 'B':
+ case 'b': goto yy131;
+ case 'E':
+ case 'e': goto yy143;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy132;
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy134;
+ case 'S':
+ case 's': goto yy136;
+ case '_': goto yy137;
+ case 'm': goto yy139;
+ case 'p':
+ case 'u': goto yy140;
+ default: goto yy24;
+ }
+yy26:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ switch (yych) {
+ case '%': goto yy119;
+ case '+': goto yy88;
+ case '-': goto yy121;
+ case '.': goto yy122;
+ case '/': goto yy123;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4': goto yy142;
+ case '5': goto yy144;
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy145;
+ case ':': goto yy128;
+ case '@': goto yy129;
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f': goto yy130;
+ case 'B':
+ case 'b': goto yy131;
+ case 'E':
+ case 'e': goto yy143;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy132;
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy134;
+ case 'S':
+ case 's': goto yy136;
+ case '_': goto yy137;
+ case 'm': goto yy139;
+ case 'p':
+ case 'u': goto yy140;
+ default: goto yy24;
+ }
+yy27:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ switch (yych) {
+ case '%': goto yy119;
+ case '+': goto yy88;
+ case '-': goto yy121;
+ case '.': goto yy122;
+ case '/': goto yy123;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy145;
+ case ':': goto yy128;
+ case '@': goto yy129;
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f': goto yy130;
+ case 'B':
+ case 'b': goto yy131;
+ case 'E':
+ case 'e': goto yy143;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy132;
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy134;
+ case 'S':
+ case 's': goto yy136;
+ case '_': goto yy137;
+ case 'm': goto yy139;
+ case 'p':
+ case 'u': goto yy140;
+ default: goto yy24;
+ }
+yy28:
+ yyaccept = 4;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == ':') goto yy146;
+yy29:
+#line 370 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_COLON); }
+#line 1415 "../../lnav/src/data_scanner_re.cc"
+yy30:
+ ++YYCURSOR;
+#line 373 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_SEMI); }
+#line 1420 "../../lnav/src/data_scanner_re.cc"
+yy31:
+ yyaccept = 5;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '>') {
+ if (yych <= '-') {
+ if (yych == '!') goto yy147;
+ if (yych >= '-') goto yy148;
+ } else {
+ if (yych <= '.') goto yy32;
+ if (yych <= '/') goto yy149;
+ if (yych <= ':') goto yy148;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '?') goto yy150;
+ if (yych <= '@') goto yy32;
+ if (yych <= 'Z') goto yy148;
+ } else {
+ if (yych == '`') goto yy32;
+ if (yych <= 'z') goto yy148;
+ }
+ }
+yy32:
+#line 382 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_LANGLE); }
+#line 1446 "../../lnav/src/data_scanner_re.cc"
+yy33:
+ ++YYCURSOR;
+#line 371 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_EQUALS); }
+#line 1451 "../../lnav/src/data_scanner_re.cc"
+yy34:
+ ++YYCURSOR;
+#line 383 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_RANGLE); }
+#line 1456 "../../lnav/src/data_scanner_re.cc"
+yy35:
+ yyaccept = 1;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '@') goto yy151;
+ goto yy3;
+yy36:
+ yyaccept = 6;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '9') {
+ if (yych <= '&') {
+ if (yych <= ' ') {
+ if (yych >= ' ') goto yy164;
+ } else {
+ if (yych == '%') goto yy164;
+ }
+ } else {
+ if (yych <= '+') {
+ if (yych <= '\'') goto yy154;
+ if (yych >= '+') goto yy164;
+ } else {
+ if (yych <= ',') goto yy37;
+ if (yych <= '/') goto yy164;
+ goto yy159;
+ }
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '?') {
+ if (yych <= ':') goto yy160;
+ } else {
+ if (yych <= '@') goto yy164;
+ if (yych <= 'F') goto yy161;
+ goto yy162;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych == '_') goto yy164;
+ } else {
+ if (yych <= 'f') goto yy165;
+ if (yych <= 'z') goto yy166;
+ }
+ }
+ }
+yy37:
+#line 451 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_WORD); }
+#line 1503 "../../lnav/src/data_scanner_re.cc"
+yy38:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= '&') {
+ if (yych != '\n') goto yy164;
+ } else {
+ if (yych <= '\'') goto yy154;
+ if (yych <= '/') goto yy164;
+ if (yych <= '9') goto yy159;
+ goto yy160;
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '@') goto yy164;
+ if (yych <= 'F') goto yy161;
+ goto yy162;
+ } else {
+ if (yych <= '`') goto yy164;
+ if (yych <= 'f') goto yy165;
+ if (yych <= 'z') goto yy166;
+ goto yy164;
+ }
+ }
+yy39:
+#line 461 "../../lnav/src/data_scanner_re.re"
+ {
+ RET(DT_SYMBOL);
+ }
+#line 1533 "../../lnav/src/data_scanner_re.cc"
+yy40:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '\'') {
+ if (yych == '\n') goto yy39;
+ if (yych <= '&') goto yy164;
+ goto yy154;
+ } else {
+ if (yych <= '/') goto yy164;
+ if (yych <= '9') goto yy159;
+ if (yych <= ':') goto yy160;
+ goto yy164;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych <= 'A') goto yy167;
+ if (yych <= 'F') goto yy161;
+ if (yych <= 'Z') goto yy162;
+ goto yy164;
+ } else {
+ if (yych <= 'a') goto yy168;
+ if (yych <= 'f') goto yy165;
+ if (yych <= 'z') goto yy166;
+ goto yy164;
+ }
+ }
+yy41:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '9') {
+ if (yych <= '\n') {
+ if (yych <= '\t') goto yy170;
+ goto yy39;
+ } else {
+ if (yych == '\'') goto yy154;
+ goto yy170;
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= ':') goto yy171;
+ if (yych <= '@') goto yy170;
+ goto yy162;
+ } else {
+ if (yych <= '`') goto yy170;
+ if (yych <= 'z') goto yy166;
+ goto yy170;
+ }
+ }
+yy42:
+ yyaccept = 6;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych == ' ') goto yy170;
+ if (yych <= '$') goto yy37;
+ goto yy170;
+ } else {
+ if (yych <= '\'') {
+ if (yych <= '&') goto yy37;
+ goto yy154;
+ } else {
+ if (yych == '+') goto yy170;
+ goto yy37;
+ }
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= ':') {
+ if (yych <= '9') goto yy170;
+ goto yy171;
+ } else {
+ if (yych <= '?') goto yy37;
+ if (yych <= '@') goto yy170;
+ goto yy162;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy37;
+ goto yy170;
+ } else {
+ if (yych <= '`') goto yy37;
+ if (yych <= 'z') goto yy166;
+ goto yy37;
+ }
+ }
+ }
+yy43:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '&') {
+ if (yych == '\n') goto yy39;
+ goto yy170;
+ } else {
+ if (yych <= '\'') goto yy154;
+ if (yych == ':') goto yy171;
+ goto yy170;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych == 'U') goto yy172;
+ if (yych <= 'Z') goto yy162;
+ goto yy170;
+ } else {
+ if (yych == 'o') goto yy173;
+ if (yych <= 'z') goto yy166;
+ goto yy170;
+ }
+ }
+yy44:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '&') {
+ if (yych == '\n') goto yy39;
+ goto yy170;
+ } else {
+ if (yych <= '\'') goto yy154;
+ if (yych == ':') goto yy171;
+ goto yy170;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych == 'R') goto yy174;
+ if (yych <= 'Z') goto yy162;
+ goto yy170;
+ } else {
+ if (yych == 'r') goto yy175;
+ if (yych <= 'z') goto yy166;
+ goto yy170;
+ }
+ }
+yy45:
+ yyaccept = 8;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '\\') {
+ if (yych <= 0x00) goto yy46;
+ if (yych != '\n') goto yy177;
+ } else {
+ if (yych <= 0x7F) {
+ if (yych <= ']') goto yy178;
+ goto yy177;
+ } else {
+ if (yych <= 0xC1) goto yy46;
+ if (yych <= 0xF4) goto yy177;
+ }
+ }
+yy46:
+#line 378 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_LSQUARE); }
+#line 1685 "../../lnav/src/data_scanner_re.cc"
+yy47:
+ yyaccept = 1;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 0x7F) {
+ if (yych <= '[') {
+ if (yych == '\n') goto yy3;
+ goto yy185;
+ } else {
+ if (yych <= '\\') goto yy112;
+ if (yych == 'n') goto yy6;
+ goto yy185;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy3;
+ if (yych <= 0xDF) goto yy186;
+ if (yych <= 0xE0) goto yy187;
+ goto yy188;
+ } else {
+ if (yych <= 0xF0) goto yy189;
+ if (yych <= 0xF3) goto yy190;
+ if (yych <= 0xF4) goto yy191;
+ goto yy3;
+ }
+ }
+yy48:
+ ++YYCURSOR;
+#line 379 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_RSQUARE); }
+#line 1715 "../../lnav/src/data_scanner_re.cc"
+yy49:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+yy50:
+ if (yybm_bol[1536+yych] & 1) {
+ goto yy49;
+ }
+ switch (yych) {
+ case '%':
+ case '+': goto yy88;
+ case '-': goto yy121;
+ case '.': goto yy158;
+ case '/': goto yy123;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ case ':': goto yy192;
+ case '@': goto yy129;
+ default: goto yy39;
+ }
+yy51:
+ yyaccept = 6;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= '*') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy37;
+ goto yy50;
+ } else {
+ if (yych == '\'') goto yy154;
+ goto yy37;
+ }
+ } else {
+ if (yych <= ',') {
+ if (yych <= '+') goto yy50;
+ goto yy37;
+ } else {
+ if (yych <= '/') goto yy50;
+ if (yych <= '9') goto yy193;
+ goto yy194;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') {
+ if (yych <= '?') goto yy37;
+ goto yy50;
+ } else {
+ if (yych <= 'F') goto yy195;
+ if (yych <= 'Z') goto yy196;
+ goto yy37;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych <= '_') goto yy50;
+ goto yy37;
+ } else {
+ if (yych <= 'f') goto yy165;
+ if (yych <= 'z') goto yy166;
+ goto yy37;
+ }
+ }
+ }
+yy52:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') {
+ if (yych == '\'') goto yy154;
+ goto yy50;
+ } else {
+ if (yych <= '9') goto yy193;
+ if (yych <= ':') goto yy194;
+ goto yy50;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych <= 'F') goto yy195;
+ if (yych <= 'Z') goto yy196;
+ goto yy50;
+ } else {
+ if (yych <= 'f') goto yy165;
+ if (yych <= 'z') goto yy166;
+ goto yy50;
+ }
+ }
+yy53:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'F') {
+ if (yych <= '/') {
+ if (yych == '\'') goto yy154;
+ goto yy50;
+ } else {
+ if (yych <= '9') goto yy193;
+ if (yych <= ':') goto yy194;
+ if (yych <= '@') goto yy50;
+ goto yy195;
+ }
+ } else {
+ if (yych <= 'f') {
+ if (yych <= 'Z') goto yy196;
+ if (yych <= '`') goto yy50;
+ goto yy165;
+ } else {
+ if (yych == 'i') goto yy197;
+ if (yych <= 'z') goto yy166;
+ goto yy50;
+ }
+ }
+yy54:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= '&') {
+ if (yych == '"') goto yy198;
+ goto yy50;
+ } else {
+ if (yych <= '\'') goto yy199;
+ if (yych <= '/') goto yy50;
+ if (yych <= '9') goto yy193;
+ goto yy194;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych <= '@') goto yy50;
+ if (yych <= 'F') goto yy195;
+ if (yych <= 'Z') goto yy196;
+ goto yy50;
+ } else {
+ if (yych <= 'a') goto yy168;
+ if (yych <= 'f') goto yy165;
+ if (yych <= 'z') goto yy166;
+ goto yy50;
+ }
+ }
+yy55:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych == '\'') goto yy154;
+ goto yy201;
+ } else {
+ if (yych <= 'Z') goto yy196;
+ if (yych <= '`') goto yy201;
+ if (yych <= 'z') goto yy166;
+ goto yy201;
+ }
+yy56:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'Z') {
+ if (yych == '\'') goto yy154;
+ if (yych <= '@') goto yy201;
+ goto yy196;
+ } else {
+ if (yych <= 't') {
+ if (yych <= '`') goto yy201;
+ goto yy166;
+ } else {
+ if (yych <= 'u') goto yy203;
+ if (yych <= 'z') goto yy166;
+ goto yy201;
+ }
+ }
+yy57:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '"') {
+ if (yych <= '!') goto yy201;
+ goto yy198;
+ } else {
+ if (yych == '\'') goto yy199;
+ goto yy201;
+ }
+ } else {
+ if (yych <= 'd') {
+ if (yych <= 'Z') goto yy196;
+ if (yych <= '`') goto yy201;
+ goto yy166;
+ } else {
+ if (yych <= 'e') goto yy204;
+ if (yych <= 'z') goto yy166;
+ goto yy201;
+ }
+ }
+yy58:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'Z') {
+ if (yych == '\'') goto yy154;
+ if (yych <= '@') goto yy201;
+ goto yy196;
+ } else {
+ if (yych <= 'q') {
+ if (yych <= '`') goto yy201;
+ goto yy166;
+ } else {
+ if (yych <= 'r') goto yy175;
+ if (yych <= 'z') goto yy166;
+ goto yy201;
+ }
+ }
+yy59:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '\'') {
+ if (yych == '"') goto yy198;
+ if (yych <= '&') goto yy201;
+ goto yy199;
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '@') goto yy201;
+ goto yy196;
+ } else {
+ if (yych <= '`') goto yy201;
+ if (yych <= 'z') goto yy166;
+ goto yy201;
+ }
+ }
+yy60:
+ yych = *++YYCURSOR;
+ if (yych == '}') goto yy101;
+#line 376 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_LCURLY); }
+#line 1949 "../../lnav/src/data_scanner_re.cc"
+yy61:
+ ++YYCURSOR;
+#line 377 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_RCURLY); }
+#line 1954 "../../lnav/src/data_scanner_re.cc"
+yy62:
+ ++YYCURSOR;
+yy63:
+#line 173 "../../lnav/src/data_scanner_re.re"
+ { return nonstd::nullopt; }
+#line 1960 "../../lnav/src/data_scanner_re.cc"
+yy64:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy63;
+ if (yych <= 0xBF) goto yy2;
+ goto yy63;
+yy65:
+ yyaccept = 9;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 0x9F) goto yy63;
+ if (yych <= 0xBF) goto yy205;
+ goto yy63;
+yy66:
+ yyaccept = 9;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 0x7F) goto yy63;
+ if (yych <= 0xBF) goto yy205;
+ goto yy63;
+yy67:
+ yyaccept = 9;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 0x8F) goto yy63;
+ if (yych <= 0xBF) goto yy206;
+ goto yy63;
+yy68:
+ yyaccept = 9;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 0x7F) goto yy63;
+ if (yych <= 0xBF) goto yy206;
+ goto yy63;
+yy69:
+ yyaccept = 9;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 0x7F) goto yy63;
+ if (yych <= 0x8F) goto yy206;
+ goto yy63;
+yy70:
+ yych = *++YYCURSOR;
+yy71:
+ if (yybm_bol[1536+yych] & 2) {
+ goto yy70;
+ }
+ goto yy5;
+yy72:
+ yych = *++YYCURSOR;
+ if (yych == ':') goto yy207;
+yy73:
YYCURSOR = YYMARKER;
- if (yyaccept <= 17) {
- if (yyaccept <= 8) {
- if (yyaccept <= 4) {
+ if (yyaccept <= 23) {
+ if (yyaccept <= 11) {
+ if (yyaccept <= 5) {
if (yyaccept <= 2) {
if (yyaccept <= 1) {
if (yyaccept == 0) {
goto yy5;
} else {
- goto yy7;
+ goto yy3;
}
} else {
- goto yy9;
+ goto yy20;
}
} else {
- if (yyaccept == 3) {
- goto yy12;
+ if (yyaccept <= 4) {
+ if (yyaccept == 3) {
+ goto yy24;
+ } else {
+ goto yy29;
+ }
} else {
- goto yy22;
+ goto yy32;
}
}
} else {
- if (yyaccept <= 6) {
- if (yyaccept == 5) {
- goto yy24;
+ if (yyaccept <= 8) {
+ if (yyaccept <= 7) {
+ if (yyaccept == 6) {
+ goto yy37;
+ } else {
+ goto yy39;
+ }
} else {
- goto yy26;
+ goto yy46;
}
} else {
- if (yyaccept == 7) {
- goto yy31;
+ if (yyaccept <= 10) {
+ if (yyaccept == 9) {
+ goto yy63;
+ } else {
+ goto yy22;
+ }
} else {
- goto yy34;
+ goto yy120;
}
}
}
} else {
- if (yyaccept <= 13) {
- if (yyaccept <= 11) {
- if (yyaccept <= 10) {
- if (yyaccept == 9) {
- goto yy72;
+ if (yyaccept <= 17) {
+ if (yyaccept <= 14) {
+ if (yyaccept <= 13) {
+ if (yyaccept == 12) {
+ goto yy125;
} else {
- goto yy106;
+ goto yy127;
}
} else {
- goto yy109;
+ goto yy133;
}
} else {
- if (yyaccept == 12) {
- goto yy113;
+ if (yyaccept <= 16) {
+ if (yyaccept == 15) {
+ yyt3 = YYCURSOR;
+ goto yy156;
+ } else {
+ goto yy102;
+ }
} else {
- goto yy125;
+ goto yy79;
}
}
} else {
- if (yyaccept <= 15) {
- if (yyaccept == 14) {
- goto yy161;
+ if (yyaccept <= 20) {
+ if (yyaccept <= 19) {
+ if (yyaccept == 18) {
+ goto yy212;
+ } else {
+ goto yy220;
+ }
} else {
- goto yy222;
+ goto yy229;
}
} else {
- if (yyaccept == 16) {
- yyt3 = yyt4;
- goto yy222;
+ if (yyaccept <= 22) {
+ if (yyaccept == 21) {
+ goto yy241;
+ } else {
+ goto yy231;
+ }
} else {
- goto yy199;
+ goto yy274;
}
}
}
}
} else {
- if (yyaccept <= 26) {
- if (yyaccept <= 22) {
- if (yyaccept <= 20) {
- if (yyaccept <= 19) {
- if (yyaccept == 18) {
- yyt2 = yyt1;
- goto yy199;
+ if (yyaccept <= 35) {
+ if (yyaccept <= 29) {
+ if (yyaccept <= 26) {
+ if (yyaccept <= 25) {
+ if (yyaccept == 24) {
+ goto yy156;
} else {
- goto yy338;
+ goto yy218;
}
} else {
- goto yy345;
+ goto yy306;
}
} else {
- if (yyaccept == 21) {
- goto yy354;
+ if (yyaccept <= 28) {
+ if (yyaccept == 27) {
+ yyt2 = yyt1;
+ goto yy306;
+ } else {
+ yyt1 = YYCURSOR;
+ goto yy495;
+ }
} else {
- goto yy371;
+ goto yy509;
}
}
} else {
- if (yyaccept <= 24) {
- if (yyaccept == 23) {
- goto yy428;
+ if (yyaccept <= 32) {
+ if (yyaccept <= 31) {
+ if (yyaccept == 30) {
+ goto yy391;
+ } else {
+ goto yy532;
+ }
} else {
- goto yy450;
+ goto yy544;
}
} else {
- if (yyaccept == 25) {
- goto yy435;
+ if (yyaccept <= 34) {
+ if (yyaccept == 33) {
+ goto yy560;
+ } else {
+ goto yy458;
+ }
} else {
- goto yy217;
+ goto yy495;
}
}
}
} else {
- if (yyaccept <= 31) {
- if (yyaccept <= 29) {
- if (yyaccept <= 28) {
- if (yyaccept == 27) {
- goto yy310;
+ if (yyaccept <= 41) {
+ if (yyaccept <= 38) {
+ if (yyaccept <= 37) {
+ if (yyaccept == 36) {
+ goto yy679;
} else {
- goto yy315;
+ goto yy326;
}
} else {
- goto yy643;
+ yyt2 = yyt4;
+ goto yy306;
}
} else {
- if (yyaccept == 30) {
- goto yy654;
+ if (yyaccept <= 40) {
+ if (yyaccept == 39) {
+ goto yy895;
+ } else {
+ goto yy463;
+ }
} else {
- goto yy674;
+ goto yy988;
}
}
} else {
- if (yyaccept <= 33) {
- if (yyaccept == 32) {
- goto yy943;
+ if (yyaccept <= 44) {
+ if (yyaccept <= 43) {
+ if (yyaccept == 42) {
+ goto yy999;
+ } else {
+ goto yy1021;
+ }
} else {
- goto yy971;
+ goto yy1400;
}
} else {
- if (yyaccept == 34) {
- goto yy1017;
+ if (yyaccept <= 46) {
+ if (yyaccept == 45) {
+ goto yy1444;
+ } else {
+ goto yy1507;
+ }
} else {
- goto yy1091;
+ goto yy1609;
}
}
}
}
}
-yy2:
- ++YYCURSOR;
-#line 141 "../../lnav/src/data_scanner_re.re"
- { return nonstd::nullopt; }
-#line 586 "../../lnav/src/data_scanner_re.cc"
-yy3:
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
-yy4:
- if (yybm[1024+yych] & 8) {
- goto yy3;
+yy74:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy208;
+ goto yy73;
+yy75:
+ yych = *++YYCURSOR;
+ if (yybm_bol[1536+yych] & 4) {
+ goto yy75;
}
- if (yych <= 0xE0) {
- if (yych <= ':') {
- if (yych >= '-') goto yy62;
+ if (yych <= '@') goto yy73;
+ if (yych <= 'Z') goto yy209;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'z') goto yy209;
+ goto yy73;
+yy76:
+ yych = *++YYCURSOR;
+yy77:
+ if (yybm_bol[1536+yych] & 8) {
+ goto yy76;
+ }
+ if (yych <= 0xDF) {
+ if (yych <= '"') {
+ if (yych <= 0x1B) goto yy73;
+ goto yy210;
} else {
- if (yych <= 0xC1) goto yy5;
- if (yych <= 0xDF) goto yy56;
- goto yy57;
+ if (yych <= '\\') goto yy80;
+ if (yych <= 0xC1) goto yy73;
+ goto yy81;
}
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy58;
- goto yy59;
+ if (yych <= 0xE0) goto yy82;
+ if (yych <= 0xEF) goto yy83;
+ goto yy84;
} else {
- if (yych <= 0xF3) goto yy60;
- if (yych <= 0xF4) goto yy61;
+ if (yych <= 0xF3) goto yy85;
+ if (yych <= 0xF4) goto yy86;
+ goto yy73;
}
}
-yy5:
-#line 266 "../../lnav/src/data_scanner_re.re"
+yy78:
+ yych = *++YYCURSOR;
+ if (yych == '"') goto yy211;
+yy79:
+#line 178 "../../lnav/src/data_scanner_re.re"
{
- RET(DT_SYMBOL);
+ CAPTURE(DT_QUOTED_STRING);
+ switch (this->ds_input[cap_inner.c_begin]) {
+ case 'f':
+ case 'u':
+ case 'r':
+ cap_inner.c_begin += 1;
+ break;
+ }
+ cap_inner.c_begin += 1;
+ cap_inner.c_end -= 1;
+ return tokenize_result{token_out, cap_all, cap_inner, this->ds_input.data()};
}
-#line 616 "../../lnav/src/data_scanner_re.cc"
-yy6:
- yyaccept = 1;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '/') goto yy64;
- if (yych <= '9') goto yy65;
- if (yych <= ':') goto yy66;
- goto yy64;
-yy7:
-#line 271 "../../lnav/src/data_scanner_re.re"
- { RET(DT_WHITE); }
-#line 627 "../../lnav/src/data_scanner_re.cc"
-yy8:
- yyaccept = 2;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '@') goto yy9;
- if (yych <= 'Z') goto yy67;
-yy9:
-#line 270 "../../lnav/src/data_scanner_re.re"
- { RET(DT_LINE); }
-#line 636 "../../lnav/src/data_scanner_re.cc"
-yy10:
- yyaccept = 1;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '/') {
- if (yych == '\n') goto yy68;
- goto yy64;
+#line 2260 "../../lnav/src/data_scanner_re.cc"
+yy80:
+ yych = *++YYCURSOR;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 0x00) goto yy73;
+ goto yy76;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych >= 0xE0) goto yy82;
+ }
} else {
- if (yych <= '9') goto yy65;
- if (yych <= ':') goto yy66;
- goto yy64;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy83;
+ goto yy84;
+ } else {
+ if (yych <= 0xF3) goto yy85;
+ if (yych <= 0xF4) goto yy86;
+ goto yy73;
+ }
}
-yy11:
- yyaccept = 3;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == '[') goto yy69;
-yy12:
-#line 274 "../../lnav/src/data_scanner_re.re"
- { RET(DT_GARBAGE); }
-#line 655 "../../lnav/src/data_scanner_re.cc"
-yy13:
+yy81:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy76;
+ goto yy73;
+yy82:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy73;
+ if (yych <= 0xBF) goto yy81;
+ goto yy73;
+yy83:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy81;
+ goto yy73;
+yy84:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy73;
+ if (yych <= 0xBF) goto yy83;
+ goto yy73;
+yy85:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy83;
+ goto yy73;
+yy86:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0x8F) goto yy83;
+ goto yy73;
+yy87:
+ yych = *++YYCURSOR;
+ if (yybm_bol[1536+yych] & 16) {
+ goto yy87;
+ }
+ if (yych == '[') goto yy213;
+ goto yy73;
+yy88:
+ yych = *++YYCURSOR;
+yy89:
+ if (yybm_bol[1536+yych] & 32) {
+ goto yy88;
+ }
+ if (yych != '@') goto yy73;
+yy90:
+ yych = *++YYCURSOR;
+ if (yych == '.') goto yy214;
+ goto yy215;
+yy91:
+ yych = *++YYCURSOR;
+yy92:
+ if (yybm_bol[1536+yych] & 64) {
+ goto yy91;
+ }
+ if (yych <= 0xDF) {
+ if (yych <= '\'') {
+ if (yych <= 0x1B) goto yy73;
+ goto yy216;
+ } else {
+ if (yych <= '\\') goto yy94;
+ if (yych <= 0xC1) goto yy73;
+ goto yy95;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy96;
+ if (yych <= 0xEF) goto yy97;
+ goto yy98;
+ } else {
+ if (yych <= 0xF3) goto yy99;
+ if (yych <= 0xF4) goto yy100;
+ goto yy73;
+ }
+ }
+yy93:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) {
+ if (yych <= 'R') {
+ if (yych == '\'') goto yy219;
+ yyt2 = YYCURSOR;
+ goto yy217;
+ } else {
+ if (yych <= 'S') goto yy73;
+ if (yych == 's') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy217;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy221;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy222;
+ }
+ yyt2 = YYCURSOR;
+ goto yy223;
+ } else {
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy224;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy225;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy226;
+ }
+ goto yy73;
+ }
+ }
+yy94:
+ yych = *++YYCURSOR;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 0x00) goto yy73;
+ goto yy91;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych >= 0xE0) goto yy96;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy97;
+ goto yy98;
+ } else {
+ if (yych <= 0xF3) goto yy99;
+ if (yych <= 0xF4) goto yy100;
+ goto yy73;
+ }
+ }
+yy95:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy91;
+ goto yy73;
+yy96:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy73;
+ if (yych <= 0xBF) goto yy95;
+ goto yy73;
+yy97:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy95;
+ goto yy73;
+yy98:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy73;
+ if (yych <= 0xBF) goto yy97;
+ goto yy73;
+yy99:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy97;
+ goto yy73;
+yy100:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0x8F) goto yy97;
+ goto yy73;
+yy101:
++YYCURSOR;
- goto yy12;
-yy14:
+yy102:
+#line 375 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_EMPTY_CONTAINER); }
+#line 2452 "../../lnav/src/data_scanner_re.cc"
+yy103:
+ yych = *++YYCURSOR;
+ if (yych <= '9') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy88;
+ if (yych <= '*') goto yy73;
+ goto yy88;
+ } else {
+ if (yych <= ',') goto yy73;
+ if (yych <= '.') goto yy88;
+ if (yych <= '/') goto yy73;
+ goto yy227;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '?') goto yy73;
+ if (yych <= '@') goto yy90;
+ if (yych <= 'Z') goto yy227;
+ goto yy73;
+ } else {
+ if (yych <= '_') goto yy88;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'z') goto yy227;
+ goto yy73;
+ }
+ }
+yy104:
+ yych = *++YYCURSOR;
+ if (yybm_bol[1536+yych] & 128) {
+ goto yy106;
+ }
+ if (yych <= '\r') {
+ if (yych <= 0x08) {
+ if (yych <= 0x00) goto yy230;
+ goto yy89;
+ } else {
+ if (yych <= '\n') goto yy230;
+ if (yych <= '\f') goto yy89;
+ goto yy230;
+ }
+ } else {
+ if (yych <= ' ') {
+ if (yych <= 0x1F) goto yy89;
+ goto yy230;
+ } else {
+ if (yych == '.') goto yy232;
+ goto yy89;
+ }
+ }
+yy105:
yyaccept = 3;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= 0x1B) {
- if (yych <= 0x00) goto yy12;
- if (yych <= 0x1A) goto yy71;
- goto yy12;
+ if (yych == '.') goto yy232;
+ goto yy234;
+yy106:
+ yych = *++YYCURSOR;
+yy107:
+ if (yybm_bol[1536+yych] & 128) {
+ goto yy106;
+ }
+ if (yych <= '%') {
+ if (yych <= '\f') {
+ if (yych <= 0x00) goto yy230;
+ if (yych <= 0x08) goto yy73;
+ if (yych <= '\n') goto yy230;
+ goto yy73;
+ } else {
+ if (yych <= 0x1F) {
+ if (yych <= '\r') goto yy230;
+ goto yy73;
+ } else {
+ if (yych <= ' ') goto yy230;
+ if (yych <= '$') goto yy73;
+ goto yy88;
+ }
+ }
} else {
- if (yych <= 0x7F) goto yy71;
- if (yych <= 0xC1) goto yy12;
- if (yych <= 0xF4) goto yy71;
- goto yy12;
+ if (yych <= '.') {
+ if (yych == '+') goto yy88;
+ if (yych <= ',') goto yy73;
+ goto yy88;
+ } else {
+ if (yych <= '@') {
+ if (yych <= '?') goto yy73;
+ goto yy90;
+ } else {
+ if (yych == '_') goto yy88;
+ goto yy73;
+ }
+ }
}
-yy15:
+yy108:
+ yych = *++YYCURSOR;
+ if (yych <= 'Z') {
+ if (yych <= '-') {
+ if (yych <= '*') {
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy242;
+ }
+ yyt1 = YYCURSOR;
+ goto yy240;
+ } else {
+ if (yych <= '+') {
+ yyt1 = YYCURSOR;
+ goto yy242;
+ }
+ if (yych <= ',') {
+ yyt1 = YYCURSOR;
+ goto yy240;
+ }
+ goto yy243;
+ }
+ } else {
+ if (yych <= '9') {
+ if (yych <= '.') {
+ yyt1 = YYCURSOR;
+ goto yy242;
+ }
+ if (yych <= '/') {
+ yyt1 = YYCURSOR;
+ goto yy240;
+ }
+ yyt1 = YYCURSOR;
+ goto yy244;
+ } else {
+ if (yych <= '?') {
+ yyt1 = YYCURSOR;
+ goto yy240;
+ }
+ if (yych <= '@') {
+ yyt1 = YYCURSOR;
+ goto yy245;
+ }
+ yyt1 = YYCURSOR;
+ goto yy244;
+ }
+ }
+ } else {
+ if (yych <= 0xC1) {
+ if (yych <= '`') {
+ if (yych == '_') {
+ yyt1 = YYCURSOR;
+ goto yy242;
+ }
+ yyt1 = YYCURSOR;
+ goto yy240;
+ } else {
+ if (yych <= 'z') {
+ yyt1 = YYCURSOR;
+ goto yy244;
+ }
+ if (yych <= 0x7F) {
+ yyt1 = YYCURSOR;
+ goto yy240;
+ }
+ goto yy73;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
+ yyt1 = YYCURSOR;
+ goto yy246;
+ }
+ if (yych <= 0xE0) {
+ yyt1 = YYCURSOR;
+ goto yy247;
+ }
+ yyt1 = YYCURSOR;
+ goto yy248;
+ } else {
+ if (yych <= 0xF0) {
+ yyt1 = YYCURSOR;
+ goto yy249;
+ }
+ if (yych <= 0xF3) {
+ yyt1 = YYCURSOR;
+ goto yy250;
+ }
+ if (yych <= 0xF4) {
+ yyt1 = YYCURSOR;
+ goto yy251;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy109:
+ yych = *++YYCURSOR;
+ if (yybm_bol[1024+yych] & 8) {
+ goto yy254;
+ }
+ if (yych <= '.') {
+ if (yych <= '\r') {
+ if (yych <= 0x08) {
+ if (yych <= 0x00) goto yy230;
+ goto yy89;
+ } else {
+ if (yych <= '\n') goto yy230;
+ if (yych <= '\f') goto yy89;
+ goto yy230;
+ }
+ } else {
+ if (yych <= '$') {
+ if (yych == ' ') goto yy252;
+ goto yy89;
+ } else {
+ if (yych <= '%') goto yy119;
+ if (yych <= '-') goto yy89;
+ goto yy253;
+ }
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '9') {
+ if (yych <= '/') goto yy89;
+ goto yy255;
+ } else {
+ if (yych <= '@') goto yy89;
+ if (yych <= 'F') goto yy256;
+ goto yy106;
+ }
+ } else {
+ if (yych <= 'w') {
+ if (yych <= '`') goto yy89;
+ if (yych <= 'f') goto yy256;
+ goto yy106;
+ } else {
+ if (yych <= 'x') goto yy258;
+ if (yych <= 'z') goto yy106;
+ goto yy89;
+ }
+ }
+ }
+yy110:
yyaccept = 3;
yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '.') goto yy253;
+ goto yy260;
+yy111:
+ yych = *++YYCURSOR;
+ if (yych != '/') goto yy89;
+yy112:
+ yych = *++YYCURSOR;
+ if (yych == 'P') goto yy116;
+ goto yy114;
+yy113:
+ yych = *++YYCURSOR;
+yy114:
+ if (yybm_bol[1280+yych] & 1) {
+ goto yy113;
+ }
+ goto yy22;
+yy115:
+ yyaccept = 10;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 2) {
+ goto yy115;
+ }
+ if (yych <= 0xDF) {
+ if (yych <= '*') {
+ if (yych <= 0x00) goto yy22;
+ if (yych <= '\'') goto yy263;
+ goto yy264;
+ } else {
+ if (yych <= 0x7F) goto yy263;
+ if (yych <= 0xC1) goto yy22;
+ goto yy265;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy266;
+ if (yych <= 0xEF) goto yy267;
+ goto yy268;
+ } else {
+ if (yych <= 0xF3) goto yy269;
+ if (yych <= 0xF4) goto yy270;
+ goto yy22;
+ }
+ }
+yy116:
+ yych = *++YYCURSOR;
+ if (yych == 'r') goto yy271;
+ goto yy114;
+yy117:
+ yych = *++YYCURSOR;
+yy118:
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ if (yych == '%') goto yy272;
+ goto yy73;
+yy119:
+ yyaccept = 11;
+ yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '/') {
if (yych <= '*') {
- if (yych == '%') goto yy81;
- goto yy12;
+ if (yych == '%') goto yy89;
} else {
- if (yych == ',') goto yy12;
- if (yych <= '.') goto yy81;
- goto yy12;
+ if (yych == ',') goto yy120;
+ if (yych <= '.') goto yy89;
}
} else {
if (yych <= '^') {
- if (yych <= '9') goto yy81;
- if (yych <= '?') goto yy12;
- if (yych <= 'Z') goto yy81;
- goto yy12;
+ if (yych <= '9') goto yy89;
+ if (yych <= '?') goto yy120;
+ if (yych <= 'Z') goto yy89;
} else {
- if (yych == '`') goto yy12;
- if (yych <= 'z') goto yy81;
- goto yy12;
+ if (yych == '`') goto yy120;
+ if (yych <= 'z') goto yy89;
}
}
-yy16:
- yyaccept = 3;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= 0x1B) {
- if (yych <= 0x00) goto yy12;
- if (yych <= 0x1A) goto yy84;
- goto yy12;
+yy120:
+#line 428 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_PERCENTAGE); }
+#line 2768 "../../lnav/src/data_scanner_re.cc"
+yy121:
+ yych = *++YYCURSOR;
+ if (yych <= '9') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy88;
+ if (yych <= '*') goto yy73;
+ goto yy88;
+ } else {
+ if (yych <= ',') goto yy73;
+ if (yych <= '.') goto yy88;
+ if (yych <= '/') goto yy73;
+ goto yy137;
+ }
} else {
- if (yych <= 0x7F) goto yy84;
- if (yych <= 0xC1) goto yy12;
- if (yych <= 0xF4) goto yy84;
- goto yy12;
+ if (yych <= '^') {
+ if (yych <= '?') goto yy73;
+ if (yych <= '@') goto yy90;
+ if (yych <= 'Z') goto yy137;
+ goto yy73;
+ } else {
+ if (yych == '`') goto yy73;
+ if (yych <= 'z') goto yy137;
+ goto yy73;
+ }
}
-yy17:
+yy122:
yych = *++YYCURSOR;
- if (yych == ')') goto yy93;
-#line 225 "../../lnav/src/data_scanner_re.re"
- { RET(DT_LPAREN); }
-#line 714 "../../lnav/src/data_scanner_re.cc"
-yy18:
- ++YYCURSOR;
-#line 226 "../../lnav/src/data_scanner_re.re"
- { RET(DT_RPAREN); }
-#line 719 "../../lnav/src/data_scanner_re.cc"
-yy19:
- ++YYCURSOR;
-#line 218 "../../lnav/src/data_scanner_re.re"
- { RET(DT_COMMA); }
-#line 724 "../../lnav/src/data_scanner_re.cc"
-yy20:
- yyaccept = 0;
+ if (yych <= '@') {
+ if (yych <= '1') {
+ if (yych <= '/') goto yy89;
+ if (yych <= '0') goto yy273;
+ goto yy275;
+ } else {
+ if (yych <= '2') goto yy276;
+ if (yych <= '9') goto yy273;
+ goto yy89;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy137;
+ if (yych <= '^') goto yy89;
+ goto yy137;
+ } else {
+ if (yych <= '`') goto yy89;
+ if (yych <= 'z') goto yy137;
+ goto yy89;
+ }
+ }
+yy123:
+ yych = *++YYCURSOR;
+ if (yych <= 'Z') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy277;
+ if (yych <= '@') goto yy73;
+ goto yy277;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy73;
+ goto yy277;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'z') goto yy277;
+ goto yy73;
+ }
+ }
+yy124:
+ yyaccept = 12;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '0') {
- if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ if (yych <= '9') {
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych >= '%') goto yy119;
+ } else {
+ if (yych == '+') goto yy88;
+ }
} else {
- if (yych <= ',') goto yy4;
- if (yych <= '.') goto yy46;
- if (yych <= '/') goto yy4;
- goto yy94;
+ if (yych <= '.') {
+ if (yych <= '-') goto yy279;
+ goto yy280;
+ } else {
+ if (yych <= '/') goto yy281;
+ if (yych <= '7') goto yy282;
+ goto yy283;
+ }
}
} else {
if (yych <= 'Z') {
- if (yych <= '9') goto yy95;
- if (yych <= '?') goto yy4;
- if (yych <= '@') goto yy96;
- goto yy46;
+ if (yych <= '?') {
+ if (yych <= ':') goto yy284;
+ } else {
+ if (yych <= '@') goto yy129;
+ if (yych <= 'F') goto yy285;
+ goto yy134;
+ }
} else {
- if (yych <= '_') {
- if (yych <= '^') goto yy4;
- goto yy46;
+ if (yych <= '`') {
+ if (yych == '_') goto yy137;
} else {
- if (yych <= '`') goto yy4;
- if (yych <= 'z') goto yy46;
- goto yy4;
+ if (yych <= 'f') goto yy285;
+ if (yych <= 'z') goto yy134;
}
}
}
-yy21:
- yyaccept = 4;
+yy125:
+#line 427 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_OCTAL_NUMBER); }
+#line 2878 "../../lnav/src/data_scanner_re.cc"
+yy126:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '/') {
- if (yych <= '+') {
- if (yych == '%') goto yy81;
- if (yych >= '+') goto yy81;
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ if (yych <= ':') {
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych >= '%') goto yy119;
+ } else {
+ if (yych == '+') goto yy88;
+ }
} else {
- if (yych <= ',') goto yy22;
- if (yych <= '-') goto yy81;
- if (yych <= '.') goto yy97;
- goto yy98;
+ if (yych <= '.') {
+ if (yych <= '-') goto yy279;
+ goto yy280;
+ } else {
+ if (yych <= '/') goto yy281;
+ if (yych <= '9') goto yy283;
+ goto yy284;
+ }
}
} else {
if (yych <= '^') {
- if (yych <= '9') goto yy81;
- if (yych <= '?') goto yy22;
- if (yych <= 'Z') goto yy81;
+ if (yych <= '@') {
+ if (yych >= '@') goto yy129;
+ } else {
+ if (yych <= 'F') goto yy285;
+ if (yych <= 'Z') goto yy134;
+ }
} else {
- if (yych == '`') goto yy22;
- if (yych <= 'z') goto yy81;
+ if (yych <= '`') {
+ if (yych <= '_') goto yy137;
+ } else {
+ if (yych <= 'f') goto yy285;
+ if (yych <= 'z') goto yy134;
+ }
}
}
-yy22:
-#line 272 "../../lnav/src/data_scanner_re.re"
- { RET(DT_DOT); }
-#line 782 "../../lnav/src/data_scanner_re.cc"
-yy23:
- yyaccept = 5;
+yy127:
+#line 443 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_HEX_NUMBER); }
+#line 2922 "../../lnav/src/data_scanner_re.cc"
+yy128:
+ yych = *++YYCURSOR;
+ if (yych <= ':') {
+ if (yych <= '.') goto yy73;
+ if (yych <= '/') goto yy286;
+ if (yych <= '9') goto yy287;
+ goto yy288;
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy73;
+ goto yy289;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy289;
+ goto yy73;
+ }
+ }
+yy129:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '.') {
+ if (yych <= ',') goto yy73;
+ goto yy214;
+ } else {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy290;
+ goto yy73;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy290;
+ if (yych <= '^') goto yy73;
+ goto yy277;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'z') goto yy290;
+ goto yy73;
+ }
+ }
+yy130:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '9') {
- if (yych <= ' ') {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy24;
- if (yych <= 0x08) goto yy4;
- if (yych >= '\v') goto yy4;
+ if (yych <= ':') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy135;
+ if (yych <= '*') goto yy127;
+ goto yy135;
+ } else {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy127;
+ goto yy279;
} else {
- if (yych <= 0x1A) {
- if (yych >= 0x0E) goto yy4;
- } else {
- if (yych <= 0x1B) goto yy24;
- if (yych <= 0x1F) goto yy4;
- }
+ if (yych <= '/') goto yy135;
+ if (yych <= '9') goto yy285;
+ goto yy291;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') {
+ if (yych <= '?') goto yy127;
+ goto yy135;
+ } else {
+ if (yych <= 'F') goto yy285;
+ if (yych <= 'Z') goto yy135;
+ goto yy127;
}
} else {
- if (yych <= '$') {
- if (yych == '"') goto yy24;
- if (yych <= '#') goto yy99;
- goto yy101;
+ if (yych <= '`') {
+ if (yych <= '_') goto yy135;
+ goto yy127;
} else {
- if (yych <= '\'') {
- if (yych <= '&') goto yy99;
- } else {
- if (yych <= '*') goto yy99;
- if (yych >= '-') goto yy101;
- }
+ if (yych <= 'f') goto yy285;
+ if (yych <= 'z') goto yy135;
+ goto yy127;
+ }
+ }
+ }
+yy131:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy135;
+ if (yych <= '*') goto yy24;
+ goto yy135;
+ } else {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy24;
+ goto yy279;
+ } else {
+ if (yych <= '/') goto yy135;
+ if (yych <= '9') goto yy285;
+ goto yy291;
}
}
} else {
if (yych <= '^') {
- if (yych <= 'P') {
- if (yych <= ':') goto yy4;
+ if (yych <= '@') {
if (yych <= '?') goto yy24;
- if (yych <= 'O') goto yy101;
- goto yy102;
+ goto yy135;
} else {
- if (yych <= '[') {
- if (yych <= 'Z') goto yy101;
- } else {
- if (yych != ']') goto yy99;
- }
+ if (yych <= 'F') goto yy285;
+ if (yych <= 'Z') goto yy135;
+ goto yy24;
}
} else {
- if (yych <= '}') {
- if (yych == '`') goto yy24;
- if (yych <= 'z') goto yy101;
+ if (yych <= '`') {
+ if (yych <= '_') goto yy135;
+ goto yy24;
} else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy99;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy24;
- if (yych <= 0xF4) goto yy4;
- }
+ if (yych <= 'f') goto yy285;
+ if (yych <= 'z') goto yy135;
+ goto yy24;
}
}
}
-yy24:
-#line 171 "../../lnav/src/data_scanner_re.re"
- { RET(DT_PATH); }
-#line 846 "../../lnav/src/data_scanner_re.cc"
-yy25:
- yyaccept = 6;
+yy132:
+ yyaccept = 14;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
+ if (yych <= 'a') {
+ if (yych == 'B') goto yy136;
+ goto yy135;
+ } else {
+ if (yych <= 'b') goto yy136;
+ if (yych == 'i') goto yy293;
+ goto yy135;
+ }
+yy133:
+#line 465 "../../lnav/src/data_scanner_re.re"
+ {
+ RET(DT_ID);
+ }
+#line 3056 "../../lnav/src/data_scanner_re.cc"
+yy134:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+yy135:
+ if (yych <= '9') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy88;
+ if (yych <= '*') goto yy133;
+ goto yy88;
+ } else {
+ if (yych <= ',') goto yy133;
+ if (yych <= '.') goto yy121;
+ if (yych <= '/') goto yy123;
+ goto yy134;
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= ':') goto yy292;
+ if (yych <= '?') goto yy133;
+ if (yych <= '@') goto yy129;
+ goto yy134;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy133;
+ goto yy137;
+ } else {
+ if (yych <= '`') goto yy133;
+ if (yych <= 'z') goto yy134;
+ goto yy133;
+ }
+ }
}
+yy136:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ':') {
- if (yych <= '$') {
- if (yych <= '\r') {
- if (yych <= 0x08) {
- if (yych >= 0x01) goto yy4;
- } else {
- if (yych <= '\n') goto yy26;
- if (yych <= '\f') goto yy4;
- }
+ if (yych <= '*') {
+ if (yych == '%') goto yy135;
+ goto yy24;
+ } else {
+ if (yych == ',') goto yy24;
+ goto yy135;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '?') goto yy24;
+ if (yych <= 'Z') goto yy135;
+ goto yy24;
+ } else {
+ if (yych == '`') goto yy24;
+ if (yych <= 'z') goto yy135;
+ goto yy24;
+ }
+ }
+yy137:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+yy138:
+ if (yych <= '9') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy88;
+ if (yych <= '*') goto yy133;
+ goto yy88;
+ } else {
+ if (yych <= ',') goto yy133;
+ if (yych <= '.') goto yy121;
+ if (yych <= '/') goto yy123;
+ goto yy137;
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= ':') goto yy294;
+ if (yych <= '?') goto yy133;
+ if (yych <= '@') goto yy129;
+ goto yy137;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy133;
+ goto yy137;
} else {
- if (yych <= 0x1B) {
- if (yych <= 0x1A) goto yy4;
- } else {
- if (yych <= 0x1F) goto yy4;
- if (yych >= '$') goto yy4;
- }
+ if (yych <= '`') goto yy133;
+ if (yych <= 'z') goto yy137;
+ goto yy133;
+ }
+ }
+ }
+yy139:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'S') {
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy24;
+ goto yy135;
+ } else {
+ if (yych == '+') goto yy135;
+ goto yy24;
}
} else {
- if (yych <= '-') {
- if (yych <= '*') {
- if (yych <= '%') goto yy105;
- } else {
- if (yych <= '+') goto yy80;
- if (yych >= '-') goto yy46;
- }
+ if (yych <= 'A') {
+ if (yych <= ':') goto yy135;
+ if (yych <= '?') goto yy24;
+ goto yy135;
} else {
- if (yych <= '/') {
- if (yych <= '.') goto yy107;
- goto yy4;
- } else {
- if (yych <= '7') goto yy108;
- if (yych <= '9') goto yy110;
- goto yy111;
- }
+ if (yych <= 'B') goto yy136;
+ if (yych <= 'R') goto yy135;
+ goto yy136;
}
}
} else {
- if (yych <= 'd') {
- if (yych <= 'F') {
- if (yych <= '@') {
- if (yych >= '@') goto yy96;
- } else {
- if (yych == 'E') goto yy114;
- goto yy112;
- }
+ if (yych <= 'b') {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy135;
+ if (yych <= '^') goto yy24;
+ goto yy135;
} else {
- if (yych <= '^') {
- if (yych <= 'Z') goto yy115;
- } else {
- if (yych <= '_') goto yy46;
- if (yych >= 'a') goto yy112;
- }
+ if (yych <= '`') goto yy24;
+ if (yych <= 'a') goto yy135;
+ goto yy136;
}
} else {
- if (yych <= 'z') {
- if (yych <= 'f') {
- if (yych <= 'e') goto yy114;
- goto yy112;
- } else {
- if (yych == 'x') goto yy116;
- goto yy115;
- }
+ if (yych <= 'r') {
+ if (yych == 'i') goto yy295;
+ goto yy135;
} else {
- if (yych <= 0x7F) {
- if (yych >= 0x7F) goto yy4;
- } else {
- if (yych <= 0xC1) goto yy26;
- if (yych <= 0xF4) goto yy4;
- }
+ if (yych <= 's') goto yy136;
+ if (yych <= 'z') goto yy135;
+ goto yy24;
}
}
}
-yy26:
-#line 257 "../../lnav/src/data_scanner_re.re"
- { RET(DT_NUMBER); }
-#line 928 "../../lnav/src/data_scanner_re.cc"
-yy27:
- yyaccept = 6;
+yy140:
+ yyaccept = 14;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
+ if (yych == 'S') goto yy136;
+ if (yych == 's') goto yy136;
+ goto yy135;
+yy141:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= '*') {
+ if (yych == '%') goto yy297;
+ goto yy133;
+ } else {
+ if (yych == ',') goto yy133;
+ goto yy297;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '?') goto yy133;
+ if (yych <= 'Z') goto yy297;
+ goto yy133;
+ } else {
+ if (yych == '`') goto yy133;
+ if (yych <= 'z') goto yy297;
+ goto yy133;
+ }
}
- if (yych <= '9') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy26;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy26;
- goto yy4;
+yy142:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ switch (yych) {
+ case '%': goto yy119;
+ case '+': goto yy88;
+ case '-': goto yy279;
+ case '.': goto yy298;
+ case '/': goto yy281;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy299;
+ case ':': goto yy284;
+ case '@': goto yy129;
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f': goto yy285;
+ case 'B':
+ case 'b': goto yy300;
+ case 'E':
+ case 'e': goto yy301;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy132;
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy134;
+ case 'S':
+ case 's': goto yy136;
+ case '_': goto yy137;
+ case 'm': goto yy139;
+ case 'p':
+ case 'u': goto yy140;
+ default: goto yy24;
+ }
+yy143:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy135;
+ if (yych <= '*') goto yy127;
+ goto yy302;
+ } else {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy127;
+ goto yy303;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') goto yy26;
- goto yy4;
- } else {
- if (yych <= 0x1B) goto yy26;
- if (yych <= 0x1F) goto yy4;
- goto yy26;
- }
+ if (yych <= '/') goto yy135;
+ if (yych <= '9') goto yy285;
+ goto yy291;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') {
+ if (yych <= '?') goto yy127;
+ goto yy135;
+ } else {
+ if (yych <= 'F') goto yy285;
+ if (yych <= 'Z') goto yy135;
+ goto yy127;
}
} else {
- if (yych <= '+') {
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy105;
- if (yych <= '*') goto yy26;
- goto yy80;
+ if (yych <= '`') {
+ if (yych <= '_') goto yy135;
+ goto yy127;
} else {
- if (yych <= '-') {
- if (yych <= ',') goto yy26;
- goto yy46;
- } else {
- if (yych <= '.') goto yy107;
- if (yych <= '/') goto yy4;
- goto yy117;
+ if (yych <= 'f') goto yy285;
+ if (yych <= 'z') goto yy135;
+ goto yy127;
+ }
+ }
+ }
+yy144:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ switch (yych) {
+ case '%': goto yy119;
+ case '+': goto yy88;
+ case '-': goto yy279;
+ case '.': goto yy298;
+ case '/': goto yy281;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5': goto yy299;
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy304;
+ case ':': goto yy284;
+ case '@': goto yy129;
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f': goto yy285;
+ case 'B':
+ case 'b': goto yy300;
+ case 'E':
+ case 'e': goto yy301;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy132;
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy134;
+ case 'S':
+ case 's': goto yy136;
+ case '_': goto yy137;
+ case 'm': goto yy139;
+ case 'p':
+ case 'u': goto yy140;
+ default: goto yy24;
+ }
+yy145:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ switch (yych) {
+ case '%': goto yy119;
+ case '+': goto yy88;
+ case '-': goto yy279;
+ case '.': goto yy298;
+ case '/': goto yy281;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy304;
+ case ':': goto yy284;
+ case '@': goto yy129;
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f': goto yy285;
+ case 'B':
+ case 'b': goto yy300;
+ case 'E':
+ case 'e': goto yy301;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy132;
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy134;
+ case 'S':
+ case 's': goto yy136;
+ case '_': goto yy137;
+ case 'm': goto yy139;
+ case 'p':
+ case 'u': goto yy140;
+ default: goto yy24;
+ }
+yy146:
+ yych = *++YYCURSOR;
+ if (yych <= '`') {
+ if (yych <= '9') {
+ if (yych <= '0') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy307;
+ } else {
+ if (yych <= '1') goto yy308;
+ if (yych <= '2') goto yy309;
+ goto yy307;
+ }
+ } else {
+ if (yych <= 'E') {
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy310;
+ }
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
+ goto yy311;
+ } else {
+ if (yych <= 'F') goto yy312;
+ if (yych <= 'Z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
}
}
} else {
- if (yych <= '_') {
- if (yych <= 'D') {
- if (yych <= ':') goto yy111;
- if (yych <= '?') goto yy26;
- if (yych <= '@') goto yy96;
- goto yy112;
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= 'e') goto yy311;
+ if (yych <= 'f') goto yy312;
+ goto yy73;
} else {
- if (yych <= 'F') {
- if (yych <= 'E') goto yy114;
- goto yy112;
- } else {
- if (yych <= 'Z') goto yy115;
- if (yych <= '^') goto yy26;
- goto yy46;
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
+ if (yych <= 0xC1) goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy313;
}
} else {
- if (yych <= 'z') {
- if (yych <= 'd') {
- if (yych <= '`') goto yy26;
- goto yy112;
- } else {
- if (yych <= 'e') goto yy114;
- if (yych <= 'f') goto yy112;
- goto yy115;
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
}
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
} else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy26;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy26;
- if (yych <= 0xF4) goto yy4;
- goto yy26;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
}
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
}
}
}
-yy28:
- yyaccept = 6;
+yy147:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy73;
+ goto yy319;
+ } else {
+ if (yych <= '/') goto yy73;
+ if (yych <= ':') goto yy320;
+ goto yy73;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy320;
+ if (yych <= '^') goto yy73;
+ goto yy320;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'z') goto yy320;
+ goto yy73;
+ }
+ }
+yy148:
+ yych = *++YYCURSOR;
+ if (yybm_bol[1024+yych] & 64) {
+ goto yy323;
+ }
+ goto yy322;
+yy149:
+ yych = *++YYCURSOR;
+ if (yych <= '\r') {
+ if (yych == '\t') goto yy73;
+ if (yych <= '\f') goto yy328;
+ goto yy73;
+ } else {
+ if (yych <= ' ') {
+ if (yych <= 0x1F) goto yy328;
+ goto yy73;
+ } else {
+ if (yych == '>') goto yy73;
+ goto yy328;
+ }
+ }
+yy150:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy73;
+ goto yy329;
+ } else {
+ if (yych <= '/') goto yy73;
+ if (yych <= ':') goto yy329;
+ goto yy73;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy329;
+ if (yych <= '^') goto yy73;
+ goto yy329;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'z') goto yy329;
+ goto yy73;
+ }
+ }
+yy151:
+ yych = *++YYCURSOR;
+ if (yych == ' ') goto yy330;
+ goto yy73;
+yy152:
+ yych = *++YYCURSOR;
+yy153:
+ if (yybm_bol[1280+yych] & 8) {
+ goto yy152;
+ }
+ if (yych == '\n') goto yy331;
+ goto yy73;
+yy154:
+ yyaccept = 15;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
+yy155:
+ if (yybm_bol[1280+yych] & 16) {
+ goto yy154;
}
- if (yych <= '5') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy26;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy26;
- goto yy4;
- } else {
- if (yych <= 0x1A) {
- if (yych <= '\r') goto yy26;
- goto yy4;
- } else {
- if (yych <= 0x1B) goto yy26;
- if (yych <= 0x1F) goto yy4;
- goto yy26;
- }
+ if (yych <= '&') {
+ if (yych <= '\r') {
+ if (yych <= 0x08) {
+ yyt3 = YYCURSOR;
+ goto yy156;
+ }
+ if (yych <= '\n') {
+ yyt3 = YYCURSOR;
+ goto yy332;
}
+ if (yych >= '\r') {
+ yyt3 = YYCURSOR;
+ goto yy332;
+ }
+ yyt3 = YYCURSOR;
} else {
- if (yych <= ',') {
- if (yych <= '%') {
- if (yych <= '$') goto yy4;
- goto yy105;
- } else {
- if (yych == '+') goto yy80;
- goto yy26;
+ if (yych <= ' ') {
+ if (yych >= ' ') {
+ yyt3 = YYCURSOR;
+ goto yy332;
}
+ yyt3 = YYCURSOR;
} else {
- if (yych <= '.') {
- if (yych <= '-') goto yy46;
- goto yy107;
- } else {
- if (yych <= '/') goto yy4;
- if (yych <= '4') goto yy117;
- goto yy118;
+ if (yych <= '!') {
+ yyt3 = YYCURSOR;
+ goto yy333;
+ }
+ if (yych <= '"') {
+ yyt3 = YYCURSOR;
+ goto yy332;
}
+ yyt3 = YYCURSOR;
}
}
} else {
- if (yych <= '_') {
- if (yych <= 'D') {
- if (yych <= ':') {
- if (yych <= '9') goto yy110;
- goto yy111;
- } else {
- if (yych <= '?') goto yy26;
- if (yych <= '@') goto yy96;
- goto yy112;
+ if (yych <= '.') {
+ if (yych <= '+') {
+ if (yych <= '*') {
+ yyt3 = YYCURSOR;
+ goto yy332;
}
+ yyt3 = YYCURSOR;
} else {
- if (yych <= 'F') {
- if (yych <= 'E') goto yy114;
- goto yy112;
- } else {
- if (yych <= 'Z') goto yy115;
- if (yych <= '^') goto yy26;
- goto yy46;
+ if (yych <= ',') {
+ yyt3 = YYCURSOR;
+ goto yy333;
}
+ if (yych >= '.') {
+ yyt3 = YYCURSOR;
+ goto yy334;
+ }
+ yyt3 = YYCURSOR;
}
} else {
- if (yych <= 'z') {
- if (yych <= 'd') {
- if (yych <= '`') goto yy26;
- goto yy112;
- } else {
- if (yych <= 'e') goto yy114;
- if (yych <= 'f') goto yy112;
- goto yy115;
+ if (yych <= ';') {
+ if (yych >= ':') {
+ yyt3 = YYCURSOR;
+ goto yy332;
}
+ yyt3 = YYCURSOR;
} else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy26;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy26;
- if (yych <= 0xF4) goto yy4;
- goto yy26;
+ if (yych == '?') {
+ yyt3 = YYCURSOR;
+ goto yy333;
}
+ yyt3 = YYCURSOR;
}
}
}
-yy29:
- yyaccept = 6;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
- }
- if (yych <= '9') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy26;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy26;
- goto yy4;
+yy156:
+ YYCURSOR = yyt3;
+#line 449 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_WORD); }
+#line 3722 "../../lnav/src/data_scanner_re.cc"
+yy157:
+ yych = *++YYCURSOR;
+ if (yych <= '-') {
+ if (yych <= '$') {
+ if (yych <= '\n') {
+ if (yych <= '\t') goto yy73;
+ goto yy331;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') goto yy26;
- goto yy4;
- } else {
- if (yych <= 0x1B) goto yy26;
- if (yych <= 0x1F) goto yy4;
- goto yy26;
- }
+ if (yych == ' ') goto yy152;
+ goto yy73;
}
} else {
- if (yych <= '+') {
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy105;
- if (yych <= '*') goto yy26;
- goto yy80;
+ if (yych <= '*') {
+ if (yych <= '%') goto yy88;
+ goto yy73;
} else {
- if (yych <= '-') {
- if (yych <= ',') goto yy26;
- goto yy46;
- } else {
- if (yych <= '.') goto yy107;
- if (yych <= '/') goto yy4;
- goto yy110;
- }
+ if (yych <= '+') goto yy88;
+ if (yych <= ',') goto yy73;
+ goto yy335;
}
}
} else {
- if (yych <= '_') {
- if (yych <= 'D') {
- if (yych <= ':') goto yy111;
- if (yych <= '?') goto yy26;
- if (yych <= '@') goto yy96;
- goto yy112;
+ if (yych <= '@') {
+ if (yych <= '/') {
+ if (yych <= '.') goto yy88;
+ goto yy73;
} else {
- if (yych <= 'F') {
- if (yych <= 'E') goto yy114;
- goto yy112;
- } else {
- if (yych <= 'Z') goto yy115;
- if (yych <= '^') goto yy26;
- goto yy46;
- }
+ if (yych <= '9') goto yy336;
+ if (yych <= '?') goto yy73;
+ goto yy90;
}
} else {
- if (yych <= 'z') {
- if (yych <= 'd') {
- if (yych <= '`') goto yy26;
- goto yy112;
- } else {
- if (yych <= 'e') goto yy114;
- if (yych <= 'f') goto yy112;
- goto yy115;
- }
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy336;
+ if (yych <= '^') goto yy73;
+ goto yy336;
} else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy26;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy26;
- if (yych <= 0xF4) goto yy4;
- goto yy26;
- }
+ if (yych <= '`') goto yy73;
+ if (yych <= 'z') goto yy137;
+ goto yy73;
}
}
}
-yy30:
+yy158:
+ yych = *++YYCURSOR;
+ if (yych <= '/') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy88;
+ if (yych <= '*') goto yy73;
+ goto yy88;
+ } else {
+ if (yych <= ',') goto yy73;
+ if (yych <= '-') goto yy338;
+ if (yych <= '.') goto yy88;
+ goto yy73;
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '9') goto yy339;
+ if (yych <= '?') goto yy73;
+ if (yych <= '@') goto yy90;
+ goto yy339;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy73;
+ goto yy339;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'z') goto yy339;
+ goto yy73;
+ }
+ }
+ }
+yy159:
yyaccept = 7;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych == ':') goto yy119;
-yy31:
-#line 216 "../../lnav/src/data_scanner_re.re"
- { RET(DT_COLON); }
-#line 1180 "../../lnav/src/data_scanner_re.cc"
-yy32:
- ++YYCURSOR;
-#line 219 "../../lnav/src/data_scanner_re.re"
- { RET(DT_SEMI); }
-#line 1185 "../../lnav/src/data_scanner_re.cc"
-yy33:
- yyaccept = 8;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '>') {
+ if (yych <= ':') {
if (yych <= '-') {
- if (yych == '!') goto yy120;
- if (yych >= '-') goto yy121;
+ if (yych <= ',') goto yy170;
+ goto yy340;
} else {
- if (yych <= '.') goto yy34;
- if (yych <= '/') goto yy122;
- if (yych <= ':') goto yy121;
+ if (yych <= '/') goto yy170;
+ if (yych <= '9') goto yy341;
+ goto yy342;
}
} else {
- if (yych <= '^') {
- if (yych <= '?') goto yy123;
- if (yych <= '@') goto yy34;
- if (yych <= 'Z') goto yy121;
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy170;
+ goto yy341;
} else {
- if (yych == '`') goto yy34;
- if (yych <= 'z') goto yy121;
+ if (yych <= '`') goto yy170;
+ if (yych <= 'f') goto yy343;
+ goto yy170;
}
}
-yy34:
-#line 227 "../../lnav/src/data_scanner_re.re"
- { RET(DT_LANGLE); }
-#line 1211 "../../lnav/src/data_scanner_re.cc"
-yy35:
- ++YYCURSOR;
-#line 217 "../../lnav/src/data_scanner_re.re"
- { RET(DT_EQUALS); }
-#line 1216 "../../lnav/src/data_scanner_re.cc"
-yy36:
- ++YYCURSOR;
-#line 228 "../../lnav/src/data_scanner_re.re"
- { RET(DT_RANGLE); }
-#line 1221 "../../lnav/src/data_scanner_re.cc"
-yy37:
- yyaccept = 0;
+yy160:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') {
+ if (yych <= '.') goto yy73;
+ goto yy286;
+ } else {
+ if (yych <= '9') goto yy289;
+ if (yych <= ':') goto yy344;
+ goto yy73;
+ }
+ } else {
+ if (yych <= '\\') {
+ if (yych <= 'F') goto yy289;
+ if (yych <= '[') goto yy73;
+ goto yy112;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy289;
+ goto yy73;
+ }
+ }
+yy161:
+ yyaccept = 7;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '9') {
- if (yych <= '*') {
- if (yych <= '%') {
- if (yych <= '$') goto yy4;
- goto yy80;
- } else {
- if (yych == '\'') goto yy124;
- goto yy4;
- }
+ if (yych <= '@') {
+ if (yych <= '/') {
+ if (yych == '-') goto yy340;
+ goto yy164;
} else {
- if (yych <= ',') {
- if (yych <= '+') goto yy80;
- goto yy4;
- } else {
- if (yych <= '.') goto yy46;
- if (yych <= '/') goto yy4;
- goto yy126;
- }
+ if (yych <= '9') goto yy341;
+ if (yych <= ':') goto yy342;
+ goto yy164;
}
} else {
- if (yych <= 'Z') {
- if (yych <= '?') {
- if (yych <= ':') goto yy127;
- goto yy4;
+ if (yych <= '`') {
+ if (yych <= 'F') goto yy345;
+ if (yych <= 'Z') goto yy346;
+ goto yy164;
+ } else {
+ if (yych <= 'f') goto yy347;
+ if (yych <= 'z') goto yy348;
+ goto yy164;
+ }
+ }
+yy162:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') goto yy170;
+ if (yych <= 'Z') goto yy346;
+ if (yych <= '`') goto yy170;
+ if (yych <= 'z') goto yy348;
+ goto yy170;
+yy163:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+yy164:
+ if (yybm_bol[1280+yych] & 32) {
+ goto yy163;
+ }
+ if (yych <= ',') {
+ if (yych <= ' ') {
+ if (yych == '\n') goto yy331;
+ if (yych <= 0x1F) goto yy39;
+ goto yy152;
+ } else {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy39;
+ goto yy88;
} else {
- if (yych <= '@') goto yy96;
- if (yych <= 'F') goto yy128;
- goto yy129;
+ if (yych == '+') goto yy88;
+ goto yy39;
}
+ }
+ } else {
+ if (yych <= ':') {
+ if (yych <= '-') goto yy157;
+ if (yych <= '.') goto yy158;
+ if (yych <= '/') goto yy123;
+ goto yy192;
} else {
- if (yych <= '`') {
- if (yych == '_') goto yy46;
- goto yy4;
+ if (yych <= '@') {
+ if (yych <= '?') goto yy39;
+ goto yy129;
} else {
- if (yych <= 'f') goto yy130;
- if (yych <= 'z') goto yy131;
- goto yy4;
+ if (yych <= '`') goto yy39;
+ if (yych <= 'z') goto yy49;
+ goto yy39;
}
}
}
-yy38:
- yyaccept = 0;
+yy165:
+ yyaccept = 15;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ':') {
- if (yych <= '*') {
+ if (yych <= ',') {
if (yych <= '%') {
- if (yych <= '$') goto yy4;
- goto yy80;
+ if (yych <= '$') goto yy155;
+ goto yy88;
} else {
- if (yych == '\'') goto yy124;
- goto yy4;
+ if (yych == '+') goto yy88;
+ goto yy155;
}
} else {
if (yych <= '.') {
- if (yych <= '+') goto yy80;
- if (yych <= ',') goto yy4;
- goto yy46;
+ if (yych <= '-') goto yy279;
+ yyt3 = YYCURSOR;
+ goto yy349;
} else {
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy126;
- goto yy127;
+ if (yych <= '/') goto yy123;
+ if (yych <= '9') goto yy343;
+ yyt3 = YYCURSOR;
+ goto yy350;
}
}
} else {
if (yych <= '^') {
- if (yych <= 'A') {
- if (yych <= '?') goto yy4;
- if (yych <= '@') goto yy96;
- goto yy132;
+ if (yych <= '@') {
+ if (yych <= '?') goto yy155;
+ goto yy129;
} else {
- if (yych <= 'F') goto yy128;
- if (yych <= 'Z') goto yy129;
- goto yy4;
+ if (yych <= 'F') goto yy347;
+ if (yych <= 'Z') goto yy348;
+ goto yy155;
}
} else {
- if (yych <= 'a') {
- if (yych <= '_') goto yy46;
- if (yych <= '`') goto yy4;
- goto yy133;
+ if (yych <= '`') {
+ if (yych <= '_') goto yy49;
+ goto yy155;
} else {
- if (yych <= 'f') goto yy130;
- if (yych <= 'z') goto yy131;
- goto yy4;
+ if (yych <= 'f') goto yy351;
+ if (yych <= 'z') goto yy352;
+ goto yy155;
}
}
}
-yy39:
- yyaccept = 0;
+yy166:
+ yyaccept = 15;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '/') {
- if (yych <= '\'') {
- if (yych == '%') goto yy80;
- if (yych <= '&') goto yy4;
- goto yy124;
+ if (yych <= '9') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy88;
+ if (yych <= '*') goto yy155;
+ goto yy88;
} else {
- if (yych <= '+') {
- if (yych <= '*') goto yy4;
- goto yy80;
+ if (yych <= '-') {
+ if (yych <= ',') goto yy155;
+ goto yy121;
} else {
- if (yych <= ',') goto yy4;
- if (yych <= '.') goto yy46;
- goto yy4;
+ if (yych <= '.') {
+ yyt3 = YYCURSOR;
+ goto yy349;
+ }
+ if (yych <= '/') goto yy123;
+ goto yy200;
}
}
} else {
if (yych <= 'Z') {
if (yych <= ':') {
- if (yych <= '9') goto yy115;
- goto yy134;
- } else {
- if (yych <= '?') goto yy4;
- if (yych <= '@') goto yy96;
- goto yy129;
+ yyt3 = YYCURSOR;
+ goto yy353;
}
+ if (yych <= '?') goto yy155;
+ if (yych <= '@') goto yy129;
+ goto yy348;
} else {
if (yych <= '_') {
- if (yych <= '^') goto yy4;
- goto yy46;
+ if (yych <= '^') goto yy155;
+ goto yy49;
} else {
- if (yych <= '`') goto yy4;
- if (yych <= 'z') goto yy131;
- goto yy4;
+ if (yych <= '`') goto yy155;
+ if (yych <= 'z') goto yy352;
+ goto yy155;
}
}
}
-yy40:
- yyaccept = 0;
+yy167:
+ yyaccept = 7;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= ':') {
- if (yych <= '*') {
+ if (yych <= 'F') {
+ if (yych <= '/') {
+ if (yych == '-') goto yy340;
+ goto yy164;
+ } else {
+ if (yych <= '9') goto yy341;
+ if (yych <= ':') goto yy342;
+ if (yych <= '@') goto yy164;
+ goto yy345;
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych == 'L') goto yy354;
+ goto yy346;
+ } else {
+ if (yych <= '`') goto yy164;
+ if (yych <= 'f') goto yy347;
+ if (yych <= 'z') goto yy348;
+ goto yy164;
+ }
+ }
+yy168:
+ yyaccept = 15;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '?') {
+ if (yych <= ',') {
if (yych <= '%') {
- if (yych <= '$') goto yy4;
- goto yy80;
+ if (yych <= '$') goto yy155;
+ goto yy88;
} else {
- if (yych == '\'') goto yy124;
- goto yy4;
+ if (yych == '+') goto yy88;
+ goto yy155;
}
} else {
- if (yych <= '.') {
- if (yych <= '+') goto yy80;
- if (yych <= ',') goto yy4;
- goto yy46;
+ if (yych <= '/') {
+ if (yych <= '-') goto yy279;
+ if (yych <= '.') {
+ yyt3 = YYCURSOR;
+ goto yy349;
+ }
+ goto yy123;
} else {
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy115;
- goto yy134;
+ if (yych <= '9') goto yy343;
+ if (yych <= ':') {
+ yyt3 = YYCURSOR;
+ goto yy350;
+ }
+ goto yy155;
}
}
} else {
- if (yych <= '^') {
- if (yych <= 'T') {
- if (yych <= '?') goto yy4;
- if (yych <= '@') goto yy96;
- goto yy129;
+ if (yych <= '_') {
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy129;
+ goto yy347;
} else {
- if (yych <= 'U') goto yy135;
- if (yych <= 'Z') goto yy129;
- goto yy4;
+ if (yych <= 'Z') goto yy348;
+ if (yych <= '^') goto yy155;
+ goto yy49;
}
} else {
- if (yych <= 'n') {
- if (yych <= '_') goto yy46;
- if (yych <= '`') goto yy4;
- goto yy131;
+ if (yych <= 'k') {
+ if (yych <= '`') goto yy155;
+ if (yych <= 'f') goto yy351;
+ goto yy352;
} else {
- if (yych <= 'o') goto yy136;
- if (yych <= 'z') goto yy131;
- goto yy4;
+ if (yych <= 'l') goto yy355;
+ if (yych <= 'z') goto yy352;
+ goto yy155;
}
}
}
-yy41:
- yyaccept = 0;
+yy169:
+ yyaccept = 7;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '/') {
- if (yych <= '\'') {
- if (yych == '%') goto yy80;
- if (yych <= '&') goto yy4;
- goto yy137;
+yy170:
+ if (yybm_bol[1280+yych] & 64) {
+ goto yy169;
+ }
+ if (yych <= '-') {
+ if (yych <= '$') {
+ if (yych <= '\n') {
+ if (yych <= '\t') goto yy39;
+ goto yy331;
+ } else {
+ if (yych == ' ') goto yy152;
+ goto yy39;
+ }
} else {
- if (yych <= '+') {
- if (yych <= '*') goto yy4;
- goto yy80;
+ if (yych <= '*') {
+ if (yych <= '%') goto yy88;
+ goto yy39;
} else {
- if (yych <= ',') goto yy4;
- if (yych <= '.') goto yy46;
- goto yy4;
+ if (yych <= '+') goto yy88;
+ if (yych <= ',') goto yy39;
+ goto yy157;
}
}
} else {
- if (yych <= 'Z') {
- if (yych <= ':') {
- if (yych <= '9') goto yy115;
- goto yy134;
+ if (yych <= '@') {
+ if (yych <= '/') {
+ if (yych <= '.') goto yy158;
+ goto yy123;
} else {
- if (yych <= '?') goto yy4;
- if (yych <= '@') goto yy96;
+ if (yych <= ':') goto yy202;
+ if (yych <= '?') goto yy39;
goto yy129;
}
} else {
if (yych <= '_') {
- if (yych <= '^') goto yy4;
- goto yy46;
+ if (yych <= '^') goto yy39;
+ goto yy163;
} else {
- if (yych <= '`') goto yy4;
- if (yych <= 'z') goto yy131;
- goto yy4;
+ if (yych <= '`') goto yy39;
+ if (yych <= 'z') goto yy200;
+ goto yy39;
}
}
}
-yy42:
- yyaccept = 0;
+yy171:
+ yych = *++YYCURSOR;
+ if (yych <= '9') {
+ if (yych == '/') goto yy286;
+ goto yy73;
+ } else {
+ if (yych <= ':') goto yy356;
+ if (yych == '\\') goto yy112;
+ goto yy73;
+ }
+yy172:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'L') {
+ if (yych <= '@') goto yy170;
+ if (yych <= 'K') goto yy346;
+ goto yy357;
+ } else {
+ if (yych <= 'Z') goto yy346;
+ if (yych <= '`') goto yy170;
+ if (yych <= 'z') goto yy348;
+ goto yy170;
+ }
+yy173:
+ yyaccept = 15;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ':') {
- if (yych <= '*') {
+ if (yych <= ',') {
if (yych <= '%') {
- if (yych <= '$') goto yy4;
- goto yy80;
+ if (yych <= '$') goto yy155;
+ goto yy88;
} else {
- if (yych == '\'') goto yy124;
- goto yy4;
+ if (yych == '+') goto yy88;
+ goto yy155;
}
} else {
if (yych <= '.') {
- if (yych <= '+') goto yy80;
- if (yych <= ',') goto yy4;
- goto yy46;
+ if (yych <= '-') goto yy121;
+ yyt3 = YYCURSOR;
+ goto yy349;
} else {
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy115;
- goto yy134;
+ if (yych <= '/') goto yy123;
+ if (yych <= '9') goto yy200;
+ yyt3 = YYCURSOR;
+ goto yy353;
}
}
} else {
- if (yych <= '^') {
- if (yych <= 'Q') {
- if (yych <= '?') goto yy4;
- if (yych <= '@') goto yy96;
+ if (yych <= '_') {
+ if (yych <= '@') {
+ if (yych <= '?') goto yy155;
goto yy129;
} else {
- if (yych <= 'R') goto yy138;
- if (yych <= 'Z') goto yy129;
- goto yy4;
+ if (yych <= 'Z') goto yy348;
+ if (yych <= '^') goto yy155;
+ goto yy49;
}
} else {
- if (yych <= 'q') {
- if (yych <= '_') goto yy46;
- if (yych <= '`') goto yy4;
- goto yy131;
+ if (yych <= 'm') {
+ if (yych <= '`') goto yy155;
+ goto yy352;
} else {
- if (yych <= 'r') goto yy139;
- if (yych <= 'z') goto yy131;
- goto yy4;
+ if (yych <= 'n') goto yy358;
+ if (yych <= 'z') goto yy352;
+ goto yy155;
}
}
}
-yy43:
- yych = *++YYCURSOR;
- if (yych == ']') goto yy93;
-#line 223 "../../lnav/src/data_scanner_re.re"
- { RET(DT_LSQUARE); }
-#line 1486 "../../lnav/src/data_scanner_re.cc"
-yy44:
- yyaccept = 3;
+yy174:
+ yyaccept = 7;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= 0x7F) {
- if (yych <= '[') {
- if (yych == '\n') goto yy12;
- goto yy140;
+ if (yych <= 'U') {
+ if (yych <= '@') goto yy170;
+ if (yych <= 'T') goto yy346;
+ goto yy359;
+ } else {
+ if (yych <= 'Z') goto yy346;
+ if (yych <= '`') goto yy170;
+ if (yych <= 'z') goto yy348;
+ goto yy170;
+ }
+yy175:
+ yyaccept = 15;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy155;
+ goto yy88;
+ } else {
+ if (yych == '+') goto yy88;
+ goto yy155;
+ }
} else {
- if (yych <= '\\') goto yy98;
- if (yych == 'n') goto yy68;
- goto yy140;
+ if (yych <= '.') {
+ if (yych <= '-') goto yy121;
+ yyt3 = YYCURSOR;
+ goto yy349;
+ } else {
+ if (yych <= '/') goto yy123;
+ if (yych <= '9') goto yy200;
+ yyt3 = YYCURSOR;
+ goto yy353;
+ }
}
} else {
- if (yych <= 0xEF) {
- if (yych <= 0xC1) goto yy12;
- if (yych <= 0xDF) goto yy141;
- if (yych <= 0xE0) goto yy142;
- goto yy143;
+ if (yych <= '_') {
+ if (yych <= '@') {
+ if (yych <= '?') goto yy155;
+ goto yy129;
+ } else {
+ if (yych <= 'Z') goto yy348;
+ if (yych <= '^') goto yy155;
+ goto yy49;
+ }
} else {
- if (yych <= 0xF0) goto yy144;
- if (yych <= 0xF3) goto yy145;
- if (yych <= 0xF4) goto yy146;
- goto yy12;
+ if (yych <= 't') {
+ if (yych <= '`') goto yy155;
+ goto yy352;
+ } else {
+ if (yych <= 'u') goto yy358;
+ if (yych <= 'z') goto yy352;
+ goto yy155;
+ }
}
}
-yy45:
+yy176:
+ yych = *++YYCURSOR;
+yy177:
+ if (yybm_bol[1280+yych] & 128) {
+ goto yy176;
+ }
+ if (yych <= 0xE0) {
+ if (yych <= ']') {
+ if (yych <= '\n') goto yy73;
+ goto yy360;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy179;
+ goto yy180;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy181;
+ goto yy182;
+ } else {
+ if (yych <= 0xF3) goto yy183;
+ if (yych <= 0xF4) goto yy184;
+ goto yy73;
+ }
+ }
+yy178:
+ yyaccept = 16;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '\n') {
+ if (yych <= 0x00) goto yy102;
+ if (yych <= '\t') goto yy177;
+ goto yy102;
+ } else {
+ if (yych <= 0x7F) goto yy177;
+ if (yych <= 0xC1) goto yy102;
+ if (yych <= 0xF4) goto yy177;
+ goto yy102;
+ }
+yy179:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy176;
+ goto yy73;
+yy180:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy73;
+ if (yych <= 0xBF) goto yy179;
+ goto yy73;
+yy181:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy179;
+ goto yy73;
+yy182:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy73;
+ if (yych <= 0xBF) goto yy181;
+ goto yy73;
+yy183:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy181;
+ goto yy73;
+yy184:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0x8F) goto yy181;
+ goto yy73;
+yy185:
++YYCURSOR;
-#line 224 "../../lnav/src/data_scanner_re.re"
- { RET(DT_RSQUARE); }
-#line 1516 "../../lnav/src/data_scanner_re.cc"
-yy46:
- yyaccept = 0;
+#line 475 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_ESCAPED_CHAR); }
+#line 4315 "../../lnav/src/data_scanner_re.cc"
+yy186:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy185;
+ goto yy73;
+yy187:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy73;
+ if (yych <= 0xBF) goto yy186;
+ goto yy73;
+yy188:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy186;
+ goto yy73;
+yy189:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy73;
+ if (yych <= 0xBF) goto yy188;
+ goto yy73;
+yy190:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy188;
+ goto yy73;
+yy191:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0x8F) goto yy188;
+ goto yy73;
+yy192:
+ yych = *++YYCURSOR;
+ if (yych == ':') goto yy356;
+ goto yy73;
+yy193:
+ yyaccept = 7;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[1024+yych] & 16) {
- goto yy46;
+ if (yych <= ':') {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy201;
+ goto yy279;
+ } else {
+ if (yych <= '/') goto yy201;
+ if (yych <= '9') goto yy343;
+ goto yy342;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy201;
+ goto yy343;
+ } else {
+ if (yych <= '`') goto yy201;
+ if (yych <= 'f') goto yy343;
+ goto yy201;
+ }
}
- if (yych <= ',') {
- if (yych <= 0x1B) {
- if (yych <= '\n') {
- if (yych <= 0x00) goto yy5;
- if (yych <= 0x08) goto yy3;
- goto yy5;
+yy194:
+ yych = *++YYCURSOR;
+ if (yych <= ':') {
+ if (yych <= '.') goto yy73;
+ if (yych <= '/') goto yy286;
+ if (yych <= '9') goto yy289;
+ goto yy344;
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy73;
+ goto yy289;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy289;
+ goto yy73;
+ }
+ }
+yy195:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') {
+ if (yych == '-') goto yy279;
+ goto yy50;
+ } else {
+ if (yych <= '9') goto yy343;
+ if (yych <= ':') goto yy342;
+ goto yy50;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych <= 'F') goto yy347;
+ if (yych <= 'Z') goto yy348;
+ goto yy50;
+ } else {
+ if (yych <= 'f') goto yy347;
+ if (yych <= 'z') goto yy348;
+ goto yy50;
+ }
+ }
+yy196:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') goto yy201;
+ if (yych <= 'Z') goto yy348;
+ if (yych <= '`') goto yy201;
+ if (yych <= 'z') goto yy348;
+ goto yy201;
+yy197:
+ yyaccept = 15;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy155;
+ goto yy88;
} else {
- if (yych == '\r') goto yy5;
- if (yych <= 0x1A) goto yy3;
- goto yy5;
+ if (yych == '+') goto yy88;
+ goto yy155;
}
} else {
- if (yych <= '$') {
- if (yych <= 0x1F) goto yy3;
- if (yych <= '#') goto yy5;
- goto yy3;
+ if (yych <= '.') {
+ if (yych <= '-') goto yy121;
+ yyt3 = YYCURSOR;
+ goto yy349;
} else {
- if (yych <= '%') goto yy80;
- if (yych == '+') goto yy80;
- goto yy5;
+ if (yych <= '/') goto yy123;
+ if (yych <= '9') goto yy200;
+ yyt3 = YYCURSOR;
+ goto yy353;
}
}
} else {
- if (yych <= 0xC1) {
- if (yych <= '?') {
- if (yych <= '/') goto yy3;
- if (yych <= ':') goto yy62;
- goto yy5;
+ if (yych <= '_') {
+ if (yych <= '@') {
+ if (yych <= '?') goto yy155;
+ goto yy129;
} else {
- if (yych <= '@') goto yy96;
- if (yych == 0x7F) goto yy3;
- goto yy5;
+ if (yych <= 'Z') goto yy348;
+ if (yych <= '^') goto yy155;
+ goto yy49;
}
} else {
- if (yych <= 0xEF) {
- if (yych <= 0xDF) goto yy56;
- if (yych <= 0xE0) goto yy57;
- goto yy58;
+ if (yych <= 'e') {
+ if (yych <= '`') goto yy155;
+ goto yy352;
} else {
- if (yych <= 0xF0) goto yy59;
- if (yych <= 0xF3) goto yy60;
- if (yych <= 0xF4) goto yy61;
- goto yy5;
+ if (yych <= 'f') goto yy361;
+ if (yych <= 'z') goto yy352;
+ goto yy155;
}
}
}
-yy47:
- yyaccept = 0;
+yy198:
+ yych = *++YYCURSOR;
+ if (yych == '"') goto yy78;
+ goto yy77;
+yy199:
+ yyaccept = 15;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '9') {
- if (yych <= '*') {
- if (yych <= '%') {
- if (yych <= '$') goto yy4;
- goto yy80;
+ if (yybm_bol[768+yych] & 4) {
+ goto yy366;
+ }
+ if (yych <= '"') {
+ if (yych <= 0x15) {
+ if (yych <= '\t') {
+ if (yych <= 0x00) {
+ yyt3 = YYCURSOR;
+ goto yy156;
+ }
+ if (yych <= 0x08) goto yy92;
+ yyt3 = YYCURSOR;
+ goto yy362;
} else {
- if (yych == '\'') goto yy124;
- goto yy4;
+ if (yych <= '\n') {
+ yyt3 = YYCURSOR;
+ goto yy332;
+ }
+ if (yych == '\r') {
+ yyt3 = YYCURSOR;
+ goto yy362;
+ }
+ goto yy92;
}
} else {
- if (yych <= ',') {
- if (yych <= '+') goto yy80;
- goto yy4;
+ if (yych <= 0x1B) {
+ if (yych <= 0x16) {
+ yyt3 = YYCURSOR;
+ goto yy156;
+ }
+ if (yych <= 0x1A) goto yy92;
+ yyt3 = YYCURSOR;
+ goto yy156;
} else {
- if (yych <= '.') goto yy46;
- if (yych <= '/') goto yy4;
- goto yy126;
+ if (yych <= 0x1F) goto yy92;
+ if (yych == '!') {
+ yyt3 = YYCURSOR;
+ goto yy363;
+ }
+ yyt3 = YYCURSOR;
+ goto yy362;
}
}
} else {
- if (yych <= 'Z') {
+ if (yych <= '.') {
+ if (yych <= '*') {
+ if (yych <= '&') goto yy92;
+ if (yych <= '\'') goto yy364;
+ yyt3 = YYCURSOR;
+ goto yy362;
+ } else {
+ if (yych == ',') {
+ yyt3 = YYCURSOR;
+ goto yy363;
+ }
+ if (yych <= '-') goto yy92;
+ yyt3 = YYCURSOR;
+ goto yy365;
+ }
+ } else {
if (yych <= '?') {
- if (yych <= ':') goto yy147;
- goto yy4;
+ if (yych <= '9') goto yy92;
+ if (yych <= ';') {
+ yyt3 = YYCURSOR;
+ goto yy362;
+ }
+ if (yych <= '>') goto yy92;
+ yyt3 = YYCURSOR;
+ goto yy363;
} else {
- if (yych <= '@') goto yy96;
- if (yych <= 'F') goto yy128;
- goto yy129;
+ if (yych <= 0x7F) goto yy92;
+ if (yych <= 0xC1) {
+ yyt3 = YYCURSOR;
+ goto yy156;
+ }
+ if (yych <= 0xF4) goto yy92;
+ yyt3 = YYCURSOR;
+ goto yy156;
}
+ }
+ }
+yy200:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+yy201:
+ if (yych <= '9') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy88;
+ if (yych <= '*') goto yy39;
+ goto yy88;
} else {
- if (yych <= '`') {
- if (yych == '_') goto yy46;
- goto yy4;
+ if (yych <= '-') {
+ if (yych <= ',') goto yy39;
+ goto yy121;
+ } else {
+ if (yych <= '.') goto yy158;
+ if (yych <= '/') goto yy123;
+ goto yy200;
+ }
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= ':') goto yy202;
+ if (yych <= '?') goto yy39;
+ if (yych <= '@') goto yy129;
+ goto yy200;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy39;
+ goto yy49;
} else {
- if (yych <= 'f') goto yy130;
- if (yych <= 'z') goto yy131;
- goto yy4;
+ if (yych <= '`') goto yy39;
+ if (yych <= 'z') goto yy200;
+ goto yy39;
}
}
}
-yy48:
- yyaccept = 0;
+yy202:
+ yych = *++YYCURSOR;
+ if (yych == '/') goto yy286;
+ if (yych == ':') goto yy356;
+ goto yy73;
+yy203:
+ yyaccept = 15;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ':') {
- if (yych <= '*') {
+ if (yych <= ',') {
if (yych <= '%') {
- if (yych <= '$') goto yy4;
- goto yy80;
+ if (yych <= '$') goto yy155;
+ goto yy88;
} else {
- if (yych == '\'') goto yy124;
- goto yy4;
+ if (yych == '+') goto yy88;
+ goto yy155;
}
} else {
if (yych <= '.') {
- if (yych <= '+') goto yy80;
- if (yych <= ',') goto yy4;
- goto yy46;
+ if (yych <= '-') goto yy121;
+ yyt3 = YYCURSOR;
+ goto yy349;
} else {
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy126;
- goto yy147;
+ if (yych <= '/') goto yy123;
+ if (yych <= '9') goto yy200;
+ yyt3 = YYCURSOR;
+ goto yy353;
}
}
} else {
- if (yych <= '^') {
+ if (yych <= '_') {
if (yych <= '@') {
- if (yych <= '?') goto yy4;
- goto yy96;
+ if (yych <= '?') goto yy155;
+ goto yy129;
} else {
- if (yych <= 'F') goto yy128;
- if (yych <= 'Z') goto yy129;
- goto yy4;
+ if (yych <= 'Z') goto yy348;
+ if (yych <= '^') goto yy155;
+ goto yy49;
}
} else {
- if (yych <= 'a') {
- if (yych <= '_') goto yy46;
- if (yych <= '`') goto yy4;
- goto yy133;
+ if (yych <= 'k') {
+ if (yych <= '`') goto yy155;
+ goto yy352;
} else {
- if (yych <= 'f') goto yy130;
- if (yych <= 'z') goto yy131;
- goto yy4;
+ if (yych <= 'l') goto yy367;
+ if (yych <= 'z') goto yy352;
+ goto yy155;
}
}
}
-yy49:
- yyaccept = 0;
+yy204:
+ yyaccept = 15;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '/') {
- if (yych <= '\'') {
- if (yych == '%') goto yy80;
- if (yych <= '&') goto yy4;
- goto yy124;
+ if (yych <= '9') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy88;
+ if (yych <= '*') goto yy155;
+ goto yy88;
} else {
- if (yych <= '+') {
- if (yych <= '*') goto yy4;
- goto yy80;
+ if (yych <= '-') {
+ if (yych <= ',') goto yy155;
+ goto yy368;
} else {
- if (yych <= ',') goto yy4;
- if (yych <= '.') goto yy46;
- goto yy4;
+ if (yych <= '.') {
+ yyt3 = YYCURSOR;
+ goto yy349;
+ }
+ if (yych <= '/') goto yy123;
+ goto yy200;
}
}
} else {
if (yych <= 'Z') {
if (yych <= ':') {
- if (yych <= '9') goto yy115;
- goto yy148;
+ yyt3 = YYCURSOR;
+ goto yy353;
+ }
+ if (yych <= '?') goto yy155;
+ if (yych <= '@') goto yy129;
+ goto yy348;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy155;
+ goto yy49;
} else {
- if (yych <= '?') goto yy4;
- if (yych <= '@') goto yy96;
- goto yy129;
+ if (yych <= '`') goto yy155;
+ if (yych <= 'z') goto yy352;
+ goto yy155;
+ }
+ }
+ }
+yy205:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy2;
+ goto yy73;
+yy206:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy205;
+ goto yy73;
+yy207:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy369;
+ goto yy73;
+yy208:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy370;
+ goto yy73;
+yy209:
+ ++YYCURSOR;
+#line 366 "../../lnav/src/data_scanner_re.re"
+ {
+ RET(DT_CSI);
+ }
+#line 4706 "../../lnav/src/data_scanner_re.cc"
+yy210:
+ yyaccept = 17;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '"') goto yy76;
+ goto yy79;
+yy211:
+ yyaccept = 18;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 0x16) {
+ if (yych <= '\t') {
+ if (yych >= 0x01) goto yy77;
+ } else {
+ if (yych <= '\n') goto yy212;
+ if (yych <= 0x15) goto yy77;
+ }
+ } else {
+ if (yych <= 0x7F) {
+ if (yych != 0x1B) goto yy77;
+ } else {
+ if (yych <= 0xC1) goto yy212;
+ if (yych <= 0xF4) goto yy77;
+ }
+ }
+yy212:
+#line 191 "../../lnav/src/data_scanner_re.re"
+ {
+ CAPTURE(DT_QUOTED_STRING);
+ switch (this->ds_input[cap_inner.c_begin]) {
+ case 'f':
+ case 'u':
+ case 'r':
+ cap_inner.c_begin += 1;
+ break;
+ }
+ cap_inner.c_begin += 3;
+ goto yyc_dbldocstring;
+ }
+#line 4744 "../../lnav/src/data_scanner_re.cc"
+yy213:
+ yych = *++YYCURSOR;
+ if (yybm_bol[1024+yych] & 1) {
+ goto yy213;
+ }
+ if (yych <= 0xE0) {
+ if (yych <= ']') {
+ if (yych <= 0x00) goto yy73;
+ goto yy371;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy372;
+ goto yy373;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy374;
+ goto yy375;
+ } else {
+ if (yych <= 0xF3) goto yy376;
+ if (yych <= 0xF4) goto yy377;
+ goto yy73;
+ }
+ }
+yy214:
+ yych = *++YYCURSOR;
+yy215:
+ if (yybm_bol[1024+yych] & 2) {
+ goto yy214;
+ }
+ if (yych <= ',') goto yy73;
+ if (yych <= '.') goto yy378;
+ goto yy73;
+yy216:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) {
+ if (yych <= 'R') {
+ if (yych == '\'') {
+ yyt1 = YYCURSOR;
+ goto yy379;
+ }
+ yyt2 = YYCURSOR;
+ } else {
+ if (yych <= 'S') goto yy73;
+ if (yych == 's') goto yy73;
+ yyt2 = YYCURSOR;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy221;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy222;
}
+ yyt2 = YYCURSOR;
+ goto yy223;
+ } else {
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy224;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy225;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy226;
+ }
+ goto yy73;
+ }
+ }
+yy217:
+ ++YYCURSOR;
+ yyt1 = yyt2;
+yy218:
+ YYCURSOR = yyt1;
+#line 271 "../../lnav/src/data_scanner_re.re"
+ {
+ CAPTURE(DT_QUOTED_STRING);
+ if (tf == text_format_t::TF_RUST) {
+ auto sf = this->to_string_fragment(cap_all);
+ auto split_res = sf.split_when([](char ch) { return ch != '\'' && !isalnum(ch); });
+ cap_all.c_end = split_res.first.sf_end - this->ds_input.sf_begin;
+ cap_inner.c_end = split_res.first.sf_end - this->ds_input.sf_begin;
+ this->ds_next_offset = cap_all.c_end;
+ return tokenize_result{DT_SYMBOL, cap_all, cap_inner, this->ds_input.data()};
+ }
+ switch (this->ds_input[cap_inner.c_begin]) {
+ case 'f':
+ case 'u':
+ case 'r':
+ cap_inner.c_begin += 1;
+ break;
+ }
+ cap_inner.c_begin += 1;
+ cap_inner.c_end -= 1;
+ return tokenize_result{token_out, cap_all, cap_inner, this->ds_input.data()};
+ }
+#line 4848 "../../lnav/src/data_scanner_re.cc"
+yy219:
+ yyaccept = 19;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 0x16) {
+ if (yych <= '\t') {
+ if (yych >= 0x01) goto yy92;
+ } else {
+ if (yych <= '\n') goto yy220;
+ if (yych <= 0x15) goto yy92;
+ }
+ } else {
+ if (yych <= 0x7F) {
+ if (yych != 0x1B) goto yy92;
+ } else {
+ if (yych <= 0xC1) goto yy220;
+ if (yych <= 0xF4) goto yy92;
+ }
+ }
+yy220:
+#line 214 "../../lnav/src/data_scanner_re.re"
+ {
+ CAPTURE(DT_QUOTED_STRING);
+ switch (this->ds_input[cap_inner.c_begin]) {
+ case 'f':
+ case 'u':
+ case 'r':
+ cap_inner.c_begin += 1;
+ break;
+ }
+ cap_inner.c_begin += 3;
+ goto yyc_sdocstring;
+ }
+#line 4881 "../../lnav/src/data_scanner_re.cc"
+yy221:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy217;
+ goto yy73;
+yy222:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy73;
+ if (yych <= 0xBF) goto yy221;
+ goto yy73;
+yy223:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy221;
+ goto yy73;
+yy224:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy73;
+ if (yych <= 0xBF) goto yy223;
+ goto yy73;
+yy225:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy223;
+ goto yy73;
+yy226:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0x8F) goto yy223;
+ goto yy73;
+yy227:
+ yyaccept = 20;
+ yych = *(YYMARKER = ++YYCURSOR);
+yy228:
+ if (yych <= '/') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy88;
+ if (yych >= '+') goto yy88;
+ } else {
+ if (yych <= ',') goto yy229;
+ if (yych <= '-') goto yy103;
+ if (yych <= '.') goto yy88;
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '9') goto yy227;
+ if (yych <= '?') goto yy229;
+ if (yych <= '@') goto yy90;
+ goto yy227;
} else {
if (yych <= '_') {
- if (yych <= '^') goto yy4;
- goto yy46;
+ if (yych >= '_') goto yy88;
} else {
- if (yych <= '`') goto yy4;
- if (yych <= 'z') goto yy131;
- goto yy4;
+ if (yych <= '`') goto yy229;
+ if (yych <= 'z') goto yy227;
}
}
}
-yy50:
- yyaccept = 0;
+yy229:
+#line 453 "../../lnav/src/data_scanner_re.re"
+ {
+ RET(DT_SYMBOL);
+ }
+#line 4945 "../../lnav/src/data_scanner_re.cc"
+yy230:
+ ++YYCURSOR;
+yy231:
+ YYCURSOR -= 1;
+#line 457 "../../lnav/src/data_scanner_re.re"
+ {
+ RET(DT_SYMBOL);
+ }
+#line 4954 "../../lnav/src/data_scanner_re.cc"
+yy232:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy89;
+ if (yych <= '9') goto yy380;
+ goto yy89;
+yy233:
+ yyaccept = 3;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '9') {
- if (yych <= '*') {
- if (yych <= '%') {
- if (yych <= '$') goto yy4;
- goto yy80;
+yy234:
+ if (yybm_bol[1024+yych] & 4) {
+ goto yy233;
+ }
+ switch (yych) {
+ case 0x00:
+ case '\t':
+ case '\n':
+ case '\r':
+ case ' ': goto yy230;
+ case '%':
+ case '+':
+ case '-':
+ case '_': goto yy88;
+ case '.': goto yy381;
+ case '@': goto yy90;
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy106;
+ case 'B':
+ case 'S':
+ case 'b':
+ case 's': goto yy235;
+ case 'E':
+ case 'e': goto yy236;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy237;
+ case 'm': goto yy238;
+ case 'p':
+ case 'u': goto yy239;
+ default: goto yy24;
+ }
+yy235:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '+') {
+ if (yych <= '\r') {
+ if (yych <= 0x08) {
+ if (yych <= 0x00) goto yy107;
+ goto yy24;
} else {
- if (yych == '\'') goto yy124;
- goto yy4;
+ if (yych <= '\n') goto yy107;
+ if (yych <= '\f') goto yy24;
+ goto yy107;
}
} else {
- if (yych <= ',') {
- if (yych <= '+') goto yy80;
- goto yy4;
+ if (yych <= '$') {
+ if (yych == ' ') goto yy107;
+ goto yy24;
} else {
- if (yych <= '.') goto yy46;
- if (yych <= '/') goto yy4;
- goto yy115;
+ if (yych <= '%') goto yy107;
+ if (yych <= '*') goto yy24;
+ goto yy107;
}
}
} else {
- if (yych <= '^') {
- if (yych <= '?') {
- if (yych <= ':') goto yy148;
- goto yy4;
+ if (yych <= '?') {
+ if (yych <= '.') {
+ if (yych <= ',') goto yy24;
+ goto yy107;
} else {
- if (yych <= '@') goto yy96;
- if (yych <= 'Z') goto yy129;
- goto yy4;
+ if (yych <= '/') goto yy24;
+ if (yych <= '9') goto yy107;
+ goto yy24;
}
} else {
- if (yych <= 't') {
- if (yych <= '_') goto yy46;
- if (yych <= '`') goto yy4;
- goto yy131;
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy107;
+ if (yych <= '^') goto yy24;
+ goto yy107;
} else {
- if (yych <= 'u') goto yy149;
- if (yych <= 'z') goto yy131;
- goto yy4;
+ if (yych <= '`') goto yy24;
+ if (yych <= 'z') goto yy107;
+ goto yy24;
}
}
}
-yy51:
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '/') {
- if (yych <= '&') {
- if (yych <= '"') {
- if (yych <= '!') goto yy4;
- goto yy70;
+yy236:
+ yych = *++YYCURSOR;
+ if (yybm_bol[1536+yych] & 128) {
+ goto yy106;
+ }
+ if (yych <= 0x1F) {
+ if (yych <= '\n') {
+ if (yych <= 0x00) goto yy230;
+ if (yych <= 0x08) goto yy89;
+ goto yy230;
+ } else {
+ if (yych == '\r') goto yy230;
+ goto yy89;
+ }
+ } else {
+ if (yych <= '+') {
+ if (yych <= ' ') goto yy230;
+ if (yych <= '*') goto yy89;
+ goto yy302;
+ } else {
+ if (yych == '-') goto yy302;
+ goto yy89;
+ }
+ }
+yy237:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '\r') {
+ if (yych <= 0x08) {
+ if (yych <= 0x00) goto yy230;
+ goto yy89;
} else {
- if (yych == '%') goto yy80;
- goto yy4;
+ if (yych <= '\n') goto yy230;
+ if (yych <= '\f') goto yy89;
+ goto yy230;
}
} else {
- if (yych <= '+') {
- if (yych <= '\'') goto yy150;
- if (yych <= '*') goto yy4;
- goto yy80;
+ if (yych <= ' ') {
+ if (yych <= 0x1F) goto yy89;
+ goto yy230;
} else {
- if (yych <= ',') goto yy4;
- if (yych <= '.') goto yy46;
- goto yy4;
+ if (yych <= '/') goto yy89;
+ if (yych <= '9') goto yy106;
+ goto yy89;
}
}
} else {
- if (yych <= '^') {
- if (yych <= '?') {
- if (yych <= '9') goto yy115;
- if (yych <= ':') goto yy148;
- goto yy4;
+ if (yych <= 'a') {
+ if (yych <= 'B') {
+ if (yych <= 'A') goto yy106;
+ goto yy235;
} else {
- if (yych <= '@') goto yy96;
- if (yych <= 'Z') goto yy129;
- goto yy4;
+ if (yych <= 'Z') goto yy106;
+ if (yych <= '`') goto yy89;
+ goto yy106;
}
} else {
- if (yych <= 'd') {
- if (yych <= '_') goto yy46;
- if (yych <= '`') goto yy4;
- goto yy131;
+ if (yych <= 'h') {
+ if (yych <= 'b') goto yy235;
+ goto yy106;
} else {
- if (yych <= 'e') goto yy151;
- if (yych <= 'z') goto yy131;
- goto yy4;
+ if (yych <= 'i') goto yy382;
+ if (yych <= 'z') goto yy106;
+ goto yy89;
}
}
}
-yy52:
- yyaccept = 0;
+yy238:
+ yyaccept = 3;
yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '?') {
+ if (yych <= '$') {
+ if (yych <= '\f') {
+ if (yych <= 0x00) goto yy107;
+ if (yych <= 0x08) goto yy24;
+ if (yych <= '\n') goto yy107;
+ goto yy24;
+ } else {
+ if (yych <= '\r') goto yy107;
+ if (yych == ' ') goto yy107;
+ goto yy24;
+ }
+ } else {
+ if (yych <= ',') {
+ if (yych <= '%') goto yy107;
+ if (yych == '+') goto yy107;
+ goto yy24;
+ } else {
+ if (yych == '/') goto yy24;
+ if (yych <= '9') goto yy107;
+ goto yy24;
+ }
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych <= 'S') {
+ if (yych == 'B') goto yy235;
+ if (yych <= 'R') goto yy107;
+ goto yy235;
+ } else {
+ if (yych <= 'Z') goto yy107;
+ if (yych == '_') goto yy107;
+ goto yy24;
+ }
+ } else {
+ if (yych <= 'i') {
+ if (yych == 'b') goto yy235;
+ if (yych <= 'h') goto yy107;
+ goto yy383;
+ } else {
+ if (yych == 's') goto yy235;
+ if (yych <= 'z') goto yy107;
+ goto yy24;
+ }
+ }
+ }
+yy239:
+ yych = *++YYCURSOR;
if (yych <= '9') {
+ if (yych <= '\f') {
+ if (yych <= 0x00) goto yy230;
+ if (yych <= 0x08) goto yy89;
+ if (yych <= '\n') goto yy230;
+ goto yy89;
+ } else {
+ if (yych <= 0x1F) {
+ if (yych <= '\r') goto yy230;
+ goto yy89;
+ } else {
+ if (yych <= ' ') goto yy230;
+ if (yych <= '/') goto yy89;
+ goto yy106;
+ }
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '@') goto yy89;
+ if (yych == 'S') goto yy235;
+ goto yy106;
+ } else {
+ if (yych <= 'r') {
+ if (yych <= '`') goto yy89;
+ goto yy106;
+ } else {
+ if (yych <= 's') goto yy235;
+ if (yych <= 'z') goto yy106;
+ goto yy89;
+ }
+ }
+ }
+yy240:
+ ++YYCURSOR;
+yy241:
+ YYCURSOR = yyt1;
+#line 374 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_EMDASH); }
+#line 5234 "../../lnav/src/data_scanner_re.cc"
+yy242:
+ yyaccept = 21;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '/') {
+ if (yych <= '*') {
+ if (yych == '%') goto yy89;
+ goto yy241;
+ } else {
+ if (yych == ',') goto yy241;
+ if (yych <= '.') goto yy89;
+ goto yy241;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '9') goto yy89;
+ if (yych <= '?') goto yy241;
+ if (yych <= 'Z') goto yy89;
+ goto yy241;
+ } else {
+ if (yych == '`') goto yy241;
+ if (yych <= 'z') goto yy89;
+ goto yy241;
+ }
+ }
+yy243:
+ yych = *++YYCURSOR;
+ if (yych == ' ') goto yy384;
+ goto yy89;
+yy244:
+ yyaccept = 21;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '/') {
if (yych <= '*') {
+ if (yych == '%') goto yy228;
+ goto yy241;
+ } else {
+ if (yych == ',') goto yy241;
+ if (yych <= '.') goto yy228;
+ goto yy241;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '9') goto yy228;
+ if (yych <= '?') goto yy241;
+ if (yych <= 'Z') goto yy228;
+ goto yy241;
+ } else {
+ if (yych == '`') goto yy241;
+ if (yych <= 'z') goto yy228;
+ goto yy241;
+ }
+ }
+yy245:
+ yyaccept = 21;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '9') {
+ if (yych <= ',') goto yy241;
+ if (yych == '/') goto yy241;
+ goto yy214;
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '@') goto yy241;
+ goto yy214;
+ } else {
+ if (yych <= '`') goto yy241;
+ if (yych <= 'z') goto yy214;
+ goto yy241;
+ }
+ }
+yy246:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy240;
+ goto yy73;
+yy247:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy73;
+ if (yych <= 0xBF) goto yy246;
+ goto yy73;
+yy248:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy246;
+ goto yy73;
+yy249:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy73;
+ if (yych <= 0xBF) goto yy248;
+ goto yy73;
+yy250:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy248;
+ goto yy73;
+yy251:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0x8F) goto yy248;
+ goto yy73;
+yy252:
+ yyaccept = 22;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ if (yych == '%') goto yy272;
+ goto yy231;
+yy253:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy89;
+ if (yych <= '9') goto yy385;
+ goto yy89;
+yy254:
+ yyaccept = 12;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1024+yych] & 8) {
+ goto yy254;
+ }
+ if (yych <= '-') {
+ if (yych <= 0x1F) {
+ if (yych <= '\n') {
+ if (yych <= 0x00) goto yy230;
+ if (yych <= 0x08) goto yy125;
+ goto yy230;
+ } else {
+ if (yych == '\r') goto yy230;
+ goto yy125;
+ }
+ } else {
if (yych <= '%') {
- if (yych <= '$') goto yy4;
- goto yy80;
+ if (yych <= ' ') goto yy252;
+ if (yych <= '$') goto yy125;
+ goto yy119;
} else {
- if (yych == '\'') goto yy124;
- goto yy4;
+ if (yych == '+') goto yy88;
+ if (yych <= ',') goto yy125;
+ goto yy88;
+ }
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '9') {
+ if (yych <= '.') goto yy386;
+ if (yych <= '/') goto yy125;
+ } else {
+ if (yych <= '?') goto yy125;
+ if (yych <= '@') goto yy90;
+ goto yy256;
}
} else {
- if (yych <= ',') {
- if (yych <= '+') goto yy80;
- goto yy4;
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy106;
+ if (yych <= '^') goto yy125;
+ goto yy88;
} else {
- if (yych <= '.') goto yy46;
- if (yych <= '/') goto yy4;
- goto yy115;
+ if (yych <= '`') goto yy125;
+ if (yych <= 'f') goto yy256;
+ if (yych <= 'z') goto yy106;
+ goto yy125;
+ }
+ }
+ }
+yy255:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '-') {
+ if (yych <= 0x1F) {
+ if (yych <= '\n') {
+ if (yych <= 0x00) goto yy230;
+ if (yych <= 0x08) goto yy127;
+ goto yy230;
+ } else {
+ if (yych == '\r') goto yy230;
+ goto yy127;
+ }
+ } else {
+ if (yych <= '%') {
+ if (yych <= ' ') goto yy252;
+ if (yych <= '$') goto yy127;
+ goto yy119;
+ } else {
+ if (yych == '+') goto yy88;
+ if (yych <= ',') goto yy127;
+ goto yy88;
}
}
} else {
- if (yych <= '^') {
- if (yych <= '?') {
- if (yych <= ':') goto yy148;
- goto yy4;
+ if (yych <= 'F') {
+ if (yych <= '9') {
+ if (yych <= '.') goto yy386;
+ if (yych <= '/') goto yy127;
+ goto yy255;
} else {
- if (yych <= '@') goto yy96;
- if (yych <= 'Z') goto yy129;
- goto yy4;
+ if (yych <= '?') goto yy127;
+ if (yych <= '@') goto yy90;
}
} else {
- if (yych <= 'q') {
- if (yych <= '_') goto yy46;
- if (yych <= '`') goto yy4;
- goto yy131;
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy106;
+ if (yych <= '^') goto yy127;
+ goto yy88;
} else {
- if (yych <= 'r') goto yy139;
- if (yych <= 'z') goto yy131;
- goto yy4;
+ if (yych <= '`') goto yy127;
+ if (yych <= 'f') goto yy256;
+ if (yych <= 'z') goto yy106;
+ goto yy127;
}
}
}
-yy53:
- yyaccept = 0;
+yy256:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '.') {
- if (yych <= '&') {
- if (yych <= '"') {
- if (yych <= '!') goto yy4;
- goto yy70;
+yy257:
+ if (yybm_bol[1024+yych] & 16) {
+ goto yy256;
+ }
+ if (yych <= '*') {
+ if (yych <= '\r') {
+ if (yych <= 0x08) {
+ if (yych <= 0x00) goto yy230;
+ goto yy127;
} else {
- if (yych == '%') goto yy80;
- goto yy4;
+ if (yych <= '\n') goto yy230;
+ if (yych <= '\f') goto yy127;
+ goto yy230;
}
} else {
- if (yych <= '*') {
- if (yych <= '\'') goto yy150;
- goto yy4;
+ if (yych <= ' ') {
+ if (yych <= 0x1F) goto yy127;
+ goto yy230;
} else {
- if (yych <= '+') goto yy80;
- if (yych <= ',') goto yy4;
- goto yy46;
+ if (yych == '%') goto yy88;
+ goto yy127;
}
}
} else {
if (yych <= '@') {
- if (yych <= '9') {
- if (yych <= '/') goto yy4;
- goto yy115;
+ if (yych <= ',') {
+ if (yych <= '+') goto yy88;
+ goto yy127;
} else {
- if (yych <= ':') goto yy148;
- if (yych <= '?') goto yy4;
- goto yy96;
+ if (yych <= '.') goto yy88;
+ if (yych <= '?') goto yy127;
+ goto yy90;
}
} else {
if (yych <= '_') {
- if (yych <= 'Z') goto yy129;
- if (yych <= '^') goto yy4;
- goto yy46;
+ if (yych <= 'Z') goto yy106;
+ if (yych <= '^') goto yy127;
+ goto yy88;
} else {
- if (yych <= '`') goto yy4;
- if (yych <= 'z') goto yy131;
- goto yy4;
+ if (yych <= '`') goto yy127;
+ if (yych <= 'z') goto yy106;
+ goto yy127;
}
}
}
-yy54:
+yy258:
yych = *++YYCURSOR;
- if (yych == '}') goto yy93;
-#line 221 "../../lnav/src/data_scanner_re.re"
- { RET(DT_LCURLY); }
-#line 1879 "../../lnav/src/data_scanner_re.cc"
-yy55:
- ++YYCURSOR;
-#line 222 "../../lnav/src/data_scanner_re.re"
- { RET(DT_RCURLY); }
-#line 1884 "../../lnav/src/data_scanner_re.cc"
-yy56:
+ if (yybm_bol[1024+yych] & 16) {
+ goto yy256;
+ }
+ if (yych <= 0x1F) {
+ if (yych <= '\n') {
+ if (yych <= 0x00) goto yy230;
+ if (yych <= 0x08) goto yy89;
+ goto yy230;
+ } else {
+ if (yych == '\r') goto yy230;
+ goto yy89;
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= ' ') goto yy230;
+ if (yych <= '@') goto yy89;
+ goto yy106;
+ } else {
+ if (yych <= '`') goto yy89;
+ if (yych <= 'z') goto yy106;
+ goto yy89;
+ }
+ }
+yy259:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+yy260:
+ switch (yych) {
+ case 0x00:
+ case '\t':
+ case '\n':
+ case '\r': goto yy230;
+ case ' ': goto yy252;
+ case '%': goto yy119;
+ case '+':
+ case '-':
+ case '_': goto yy88;
+ case '.': goto yy387;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy259;
+ case '@': goto yy90;
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f': goto yy256;
+ case 'B':
+ case 'b': goto yy261;
+ case 'E':
+ case 'e': goto yy262;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy237;
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy106;
+ case 'S':
+ case 's': goto yy235;
+ case 'm': goto yy238;
+ case 'p':
+ case 'u': goto yy239;
+ default: goto yy24;
+ }
+yy261:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '+') {
+ if (yych <= '\r') {
+ if (yych <= 0x08) {
+ if (yych <= 0x00) goto yy257;
+ goto yy24;
+ } else {
+ if (yych <= '\n') goto yy257;
+ if (yych <= '\f') goto yy24;
+ goto yy257;
+ }
+ } else {
+ if (yych <= '$') {
+ if (yych == ' ') goto yy257;
+ goto yy24;
+ } else {
+ if (yych <= '%') goto yy257;
+ if (yych <= '*') goto yy24;
+ goto yy257;
+ }
+ }
+ } else {
+ if (yych <= '?') {
+ if (yych <= '.') {
+ if (yych <= ',') goto yy24;
+ goto yy257;
+ } else {
+ if (yych <= '/') goto yy24;
+ if (yych <= '9') goto yy257;
+ goto yy24;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy257;
+ if (yych <= '^') goto yy24;
+ goto yy257;
+ } else {
+ if (yych <= '`') goto yy24;
+ if (yych <= 'z') goto yy257;
+ goto yy24;
+ }
+ }
+ }
+yy262:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '+') goto yy302;
+ if (yych == '-') goto yy302;
+ goto yy257;
+yy263:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy3;
- goto yy1;
-yy57:
+ if (yybm_bol[1024+yych] & 32) {
+ goto yy263;
+ }
+ if (yych <= 0xE0) {
+ if (yych <= '*') {
+ if (yych <= 0x00) goto yy73;
+ goto yy388;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy265;
+ goto yy266;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy267;
+ goto yy268;
+ } else {
+ if (yych <= 0xF3) goto yy269;
+ if (yych <= 0xF4) goto yy270;
+ goto yy73;
+ }
+ }
+yy264:
+ yyaccept = 10;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[768+yych] & 16) {
+ goto yy389;
+ }
+ if (yych <= '\\') {
+ if (yych <= ')') {
+ if (yych <= '!') {
+ if (yych <= 0x00) goto yy22;
+ if (yych <= ' ') goto yy263;
+ goto yy115;
+ } else {
+ if (yych <= '"') goto yy263;
+ if (yych == '\'') goto yy263;
+ goto yy115;
+ }
+ } else {
+ if (yych <= '9') {
+ if (yych <= ',') goto yy263;
+ if (yych == '/') goto yy390;
+ goto yy115;
+ } else {
+ if (yych <= '?') goto yy263;
+ if (yych == '[') goto yy263;
+ goto yy115;
+ }
+ }
+ } else {
+ if (yych <= 0x7F) {
+ if (yych <= '`') {
+ if (yych <= ']') goto yy263;
+ if (yych <= '_') goto yy115;
+ goto yy263;
+ } else {
+ if (yych <= 'z') goto yy115;
+ if (yych == '~') goto yy115;
+ goto yy263;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy22;
+ if (yych <= 0xDF) goto yy265;
+ if (yych <= 0xE0) goto yy266;
+ goto yy267;
+ } else {
+ if (yych <= 0xF0) goto yy268;
+ if (yych <= 0xF3) goto yy269;
+ if (yych <= 0xF4) goto yy270;
+ goto yy22;
+ }
+ }
+ }
+yy265:
yych = *++YYCURSOR;
- if (yych <= 0x9F) goto yy1;
- if (yych <= 0xBF) goto yy56;
- goto yy1;
-yy58:
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy263;
+ goto yy73;
+yy266:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy56;
- goto yy1;
-yy59:
+ if (yych <= 0x9F) goto yy73;
+ if (yych <= 0xBF) goto yy265;
+ goto yy73;
+yy267:
yych = *++YYCURSOR;
- if (yych <= 0x8F) goto yy1;
- if (yych <= 0xBF) goto yy58;
- goto yy1;
-yy60:
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy265;
+ goto yy73;
+yy268:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy58;
- goto yy1;
-yy61:
+ if (yych <= 0x8F) goto yy73;
+ if (yych <= 0xBF) goto yy267;
+ goto yy73;
+yy269:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0x8F) goto yy58;
- goto yy1;
-yy62:
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy267;
+ goto yy73;
+yy270:
yych = *++YYCURSOR;
- if (yych == ':') goto yy152;
- goto yy1;
-yy63:
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0x8F) goto yy267;
+ goto yy73;
+yy271:
yych = *++YYCURSOR;
-yy64:
- if (yybm[1024+yych] & 32) {
- goto yy63;
+ if (yych == 'o') goto yy392;
+ goto yy114;
+yy272:
+ ++YYCURSOR;
+ goto yy120;
+yy273:
+ yyaccept = 23;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ switch (yych) {
+ case '%': goto yy119;
+ case '+':
+ case '-':
+ case '/':
+ case ':':
+ case '@':
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy397;
+ case '.': goto yy394;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy395;
+ case 'B':
+ case 'S':
+ case 'b':
+ case 's': goto yy398;
+ case 'E':
+ case 'e': goto yy399;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy400;
+ case 'm': goto yy401;
+ case 'p':
+ case 'u': goto yy402;
+ default: goto yy274;
}
- goto yy7;
-yy65:
- yych = *++YYCURSOR;
- if (yych == ':') goto yy153;
- goto yy1;
-yy66:
- yych = *++YYCURSOR;
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy154;
- goto yy1;
-yy67:
+yy274:
+#line 404 "../../lnav/src/data_scanner_re.re"
+ {
+ CAPTURE(DT_NUMBER);
+ auto sf = this->to_string_fragment(cap_all);
+ if (isalpha(sf.back())) {
+ while (isalpha(sf.back())) {
+ sf.pop_back();
+ }
+ cap_all.c_end = sf.sf_end - this->ds_input.sf_begin;
+ cap_inner.c_end = sf.sf_end - this->ds_input.sf_begin;
+ this->ds_next_offset = cap_all.c_end;
+ this->ds_units = true;
+ }
+ return tokenize_result{DT_NUMBER, cap_all, cap_inner, this->ds_input.data()};
+ }
+#line 5857 "../../lnav/src/data_scanner_re.cc"
+yy275:
+ yyaccept = 23;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ switch (yych) {
+ case '%': goto yy119;
+ case '+':
+ case '-':
+ case '/':
+ case ':':
+ case '@':
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy397;
+ case '.': goto yy394;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy273;
+ case 'B':
+ case 'S':
+ case 'b':
+ case 's': goto yy398;
+ case 'E':
+ case 'e': goto yy399;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy400;
+ case 'm': goto yy401;
+ case 'p':
+ case 'u': goto yy402;
+ default: goto yy274;
+ }
+yy276:
+ yyaccept = 23;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ switch (yych) {
+ case '%': goto yy119;
+ case '+':
+ case '-':
+ case '/':
+ case ':':
+ case '@':
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy397;
+ case '.': goto yy394;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4': goto yy273;
+ case '5': goto yy403;
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy395;
+ case 'B':
+ case 'S':
+ case 'b':
+ case 's': goto yy398;
+ case 'E':
+ case 'e': goto yy399;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy400;
+ case 'm': goto yy401;
+ case 'p':
+ case 'u': goto yy402;
+ default: goto yy274;
+ }
+yy277:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+yy278:
+ if (yych <= '@') {
+ if (yych <= '9') {
+ if (yych <= ',') goto yy133;
+ if (yych <= '/') goto yy123;
+ goto yy277;
+ } else {
+ if (yych <= ':') goto yy294;
+ if (yych <= '?') goto yy133;
+ goto yy123;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy277;
+ if (yych <= '^') goto yy133;
+ goto yy277;
+ } else {
+ if (yych <= '`') goto yy133;
+ if (yych <= 'z') goto yy277;
+ goto yy133;
+ }
+ }
+yy279:
yych = *++YYCURSOR;
- if (yych == '\n') goto yy1;
- goto yy156;
-yy68:
- ++YYCURSOR;
- goto yy9;
-yy69:
+ if (yych <= '?') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy88;
+ if (yych <= '*') goto yy73;
+ goto yy88;
+ } else {
+ if (yych <= '.') {
+ if (yych <= ',') goto yy73;
+ goto yy88;
+ } else {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy404;
+ goto yy73;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') goto yy90;
+ if (yych <= 'F') goto yy404;
+ if (yych <= 'Z') goto yy137;
+ goto yy73;
+ } else {
+ if (yych <= '`') {
+ if (yych <= '_') goto yy137;
+ goto yy73;
+ } else {
+ if (yych <= 'f') goto yy404;
+ if (yych <= 'z') goto yy137;
+ goto yy73;
+ }
+ }
+ }
+yy280:
yych = *++YYCURSOR;
- if (yybm[1024+yych] & 64) {
- goto yy69;
+ if (yych <= '@') {
+ if (yych <= '1') {
+ if (yych <= '/') goto yy89;
+ if (yych <= '0') goto yy405;
+ goto yy406;
+ } else {
+ if (yych <= '2') goto yy407;
+ if (yych <= '9') goto yy405;
+ goto yy89;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy137;
+ if (yych <= '^') goto yy89;
+ goto yy137;
+ } else {
+ if (yych <= '`') goto yy89;
+ if (yych <= 'z') goto yy137;
+ goto yy89;
+ }
}
- if (yych <= '@') goto yy1;
- if (yych <= 'Z') goto yy157;
- if (yych <= '`') goto yy1;
- if (yych <= 'z') goto yy157;
- goto yy1;
-yy70:
+yy281:
yych = *++YYCURSOR;
-yy71:
- if (yybm[1024+yych] & 128) {
- goto yy70;
+ if (yych <= 'Z') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy277;
+ if (yych <= '@') goto yy73;
+ goto yy408;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy73;
+ goto yy277;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'z') goto yy408;
+ goto yy73;
+ }
}
- if (yych <= 0xDF) {
- if (yych <= '"') {
- if (yych <= 0x1B) goto yy1;
+yy282:
+ yyaccept = 12;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ if (yych <= '9') {
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy125;
+ goto yy119;
+ } else {
+ if (yych == '+') goto yy88;
+ goto yy125;
+ }
} else {
- if (yych <= '\\') goto yy73;
- if (yych <= 0xC1) goto yy1;
- goto yy74;
+ if (yych <= '.') {
+ if (yych <= '-') goto yy121;
+ goto yy409;
+ } else {
+ if (yych <= '/') goto yy123;
+ if (yych <= '7') goto yy410;
+ goto yy411;
+ }
}
} else {
- if (yych <= 0xF0) {
- if (yych <= 0xE0) goto yy75;
- if (yych <= 0xEF) goto yy76;
- goto yy77;
+ if (yych <= 'Z') {
+ if (yych <= '?') {
+ if (yych <= ':') goto yy412;
+ goto yy125;
+ } else {
+ if (yych <= '@') goto yy129;
+ if (yych <= 'F') goto yy413;
+ goto yy134;
+ }
} else {
- if (yych <= 0xF3) goto yy78;
- if (yych <= 0xF4) goto yy79;
- goto yy1;
+ if (yych <= '`') {
+ if (yych == '_') goto yy137;
+ goto yy125;
+ } else {
+ if (yych <= 'f') goto yy413;
+ if (yych <= 'z') goto yy134;
+ goto yy125;
+ }
}
}
- yyaccept = 9;
+yy283:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych == '"') goto yy70;
-yy72:
-#line 143 "../../lnav/src/data_scanner_re.re"
- {
- CAPTURE(DT_QUOTED_STRING);
- switch (this->ds_input[cap_inner.c_begin]) {
- case 'u':
- case 'r':
- cap_inner.c_begin += 1;
- break;
- }
- cap_inner.c_begin += 1;
- cap_inner.c_end -= 1;
- return tokenize_result{token_out, cap_all, cap_inner, this->ds_input.data()};
- }
-#line 1994 "../../lnav/src/data_scanner_re.cc"
-yy73:
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ if (yych <= ':') {
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy127;
+ goto yy119;
+ } else {
+ if (yych == '+') goto yy88;
+ goto yy127;
+ }
+ } else {
+ if (yych <= '.') {
+ if (yych <= '-') goto yy121;
+ goto yy409;
+ } else {
+ if (yych <= '/') goto yy123;
+ if (yych <= '9') goto yy411;
+ goto yy412;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') {
+ if (yych <= '?') goto yy127;
+ goto yy129;
+ } else {
+ if (yych <= 'F') goto yy413;
+ if (yych <= 'Z') goto yy134;
+ goto yy127;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych <= '_') goto yy137;
+ goto yy127;
+ } else {
+ if (yych <= 'f') goto yy413;
+ if (yych <= 'z') goto yy134;
+ goto yy127;
+ }
+ }
+ }
+yy284:
yych = *++YYCURSOR;
- if (yych <= 0xDF) {
- if (yych <= '\n') {
- if (yych <= '\t') goto yy70;
- goto yy1;
+ if (yych <= ':') {
+ if (yych <= '.') goto yy73;
+ if (yych <= '/') goto yy286;
+ if (yych <= '9') goto yy414;
+ goto yy288;
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy73;
+ goto yy415;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy415;
+ goto yy73;
+ }
+ }
+yy285:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '?') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy135;
+ if (yych <= '*') goto yy127;
+ goto yy135;
} else {
- if (yych <= 0x7F) goto yy70;
- if (yych <= 0xC1) goto yy1;
+ if (yych <= '/') {
+ if (yych <= ',') goto yy127;
+ goto yy135;
+ } else {
+ if (yych <= '9') goto yy413;
+ if (yych <= ':') goto yy412;
+ goto yy127;
+ }
}
} else {
- if (yych <= 0xF0) {
- if (yych <= 0xE0) goto yy75;
- if (yych <= 0xEF) goto yy76;
- goto yy77;
+ if (yych <= '^') {
+ if (yych <= '@') goto yy135;
+ if (yych <= 'F') goto yy413;
+ if (yych <= 'Z') goto yy135;
+ goto yy127;
} else {
- if (yych <= 0xF3) goto yy78;
- if (yych <= 0xF4) goto yy79;
- goto yy1;
+ if (yych <= '`') {
+ if (yych <= '_') goto yy135;
+ goto yy127;
+ } else {
+ if (yych <= 'f') goto yy413;
+ if (yych <= 'z') goto yy135;
+ goto yy127;
+ }
}
}
-yy74:
+yy286:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy70;
- goto yy1;
-yy75:
+ if (yych <= '<') {
+ if (yych <= ',') {
+ if (yych <= '$') goto yy417;
+ if (yych <= '&') goto yy416;
+ goto yy417;
+ } else {
+ if (yych == '.') goto yy417;
+ if (yych <= '9') goto yy416;
+ goto yy417;
+ }
+ } else {
+ if (yych <= '@') {
+ if (yych == '>') goto yy417;
+ if (yych <= '?') goto yy416;
+ goto yy417;
+ } else {
+ if (yych <= 'Z') goto yy416;
+ if (yych <= '`') goto yy417;
+ if (yych <= 'z') goto yy416;
+ goto yy417;
+ }
+ }
+yy287:
yych = *++YYCURSOR;
- if (yych <= 0x9F) goto yy1;
- if (yych <= 0xBF) goto yy74;
- goto yy1;
-yy76:
+ if (yych <= '@') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy424;
+ if (yych <= ':') goto yy425;
+ goto yy73;
+ } else {
+ if (yych <= 'F') goto yy426;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy426;
+ goto yy73;
+ }
+yy288:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy74;
- goto yy1;
-yy77:
+ if (yych <= '_') {
+ if (yych <= '9') {
+ if (yych <= '0') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy427;
+ } else {
+ if (yych <= '1') goto yy428;
+ if (yych <= '2') goto yy429;
+ goto yy427;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy310;
+ }
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy430;
+ } else {
+ if (yych <= 'Z') goto yy277;
+ if (yych <= '^') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt2 = YYCURSOR;
+ goto yy431;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 'f') goto yy430;
+ goto yy277;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy289:
yych = *++YYCURSOR;
- if (yych <= 0x8F) goto yy1;
- if (yych <= 0xBF) goto yy76;
- goto yy1;
-yy78:
+ if (yych <= '@') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy426;
+ if (yych <= ':') goto yy425;
+ goto yy73;
+ } else {
+ if (yych <= 'F') goto yy426;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy426;
+ goto yy73;
+ }
+yy290:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '?') {
+ if (yych <= '.') {
+ if (yych <= ',') goto yy133;
+ if (yych <= '-') goto yy432;
+ goto yy433;
+ } else {
+ if (yych <= '/') goto yy123;
+ if (yych <= '9') goto yy290;
+ if (yych <= ':') goto yy294;
+ goto yy133;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') goto yy123;
+ if (yych <= 'Z') goto yy290;
+ goto yy133;
+ } else {
+ if (yych <= '_') goto yy277;
+ if (yych <= '`') goto yy133;
+ if (yych <= 'z') goto yy290;
+ goto yy133;
+ }
+ }
+yy291:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy76;
- goto yy1;
-yy79:
+ if (yych <= ':') {
+ if (yych <= '.') goto yy73;
+ if (yych <= '/') goto yy286;
+ if (yych <= '9') goto yy415;
+ goto yy288;
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy73;
+ goto yy415;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy415;
+ goto yy73;
+ }
+ }
+yy292:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0x8F) goto yy76;
- goto yy1;
-yy80:
+ if (yych == '/') goto yy286;
+ if (yych == ':') goto yy123;
+ goto yy73;
+yy293:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == 'B') goto yy136;
+ if (yych == 'b') goto yy136;
+ goto yy135;
+yy294:
yych = *++YYCURSOR;
-yy81:
- if (yybm[768+yych] & 1) {
- goto yy80;
+ if (yych == ':') goto yy123;
+ goto yy73;
+yy295:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'a') {
+ if (yych == 'B') goto yy136;
+ goto yy135;
+ } else {
+ if (yych <= 'b') goto yy136;
+ if (yych == 'n') goto yy136;
+ goto yy135;
}
- if (yych != '@') goto yy1;
-yy82:
+yy296:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+yy297:
+ if (yych <= ':') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy88;
+ if (yych <= '*') goto yy127;
+ goto yy88;
+ } else {
+ if (yych <= '.') {
+ if (yych <= ',') goto yy127;
+ goto yy121;
+ } else {
+ if (yych <= '/') goto yy123;
+ if (yych <= '9') goto yy296;
+ goto yy292;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') {
+ if (yych <= '?') goto yy127;
+ goto yy129;
+ } else {
+ if (yych <= 'F') goto yy296;
+ if (yych <= 'Z') goto yy134;
+ goto yy127;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych <= '_') goto yy137;
+ goto yy127;
+ } else {
+ if (yych <= 'f') goto yy296;
+ if (yych <= 'z') goto yy134;
+ goto yy127;
+ }
+ }
+ }
+yy298:
yych = *++YYCURSOR;
- if (yych == '.') goto yy158;
- goto yy159;
-yy83:
+ if (yych <= '@') {
+ if (yych <= '1') {
+ if (yych <= '/') goto yy89;
+ if (yych <= '0') goto yy434;
+ goto yy435;
+ } else {
+ if (yych <= '2') goto yy436;
+ if (yych <= '9') goto yy434;
+ goto yy89;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy137;
+ if (yych <= '^') goto yy89;
+ goto yy137;
+ } else {
+ if (yych <= '`') goto yy89;
+ if (yych <= 'z') goto yy137;
+ goto yy89;
+ }
+ }
+yy299:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ switch (yych) {
+ case '%': goto yy119;
+ case '+': goto yy88;
+ case '-': goto yy121;
+ case '.': goto yy298;
+ case '/': goto yy123;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy437;
+ case ':': goto yy412;
+ case '@': goto yy129;
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f': goto yy413;
+ case 'B':
+ case 'b': goto yy438;
+ case 'E':
+ case 'e': goto yy439;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy132;
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy134;
+ case 'S':
+ case 's': goto yy136;
+ case '_': goto yy137;
+ case 'm': goto yy139;
+ case 'p':
+ case 'u': goto yy140;
+ default: goto yy24;
+ }
+yy300:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '?') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy135;
+ if (yych <= '*') goto yy24;
+ goto yy135;
+ } else {
+ if (yych <= '/') {
+ if (yych <= ',') goto yy24;
+ goto yy135;
+ } else {
+ if (yych <= '9') goto yy413;
+ if (yych <= ':') goto yy412;
+ goto yy24;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') goto yy135;
+ if (yych <= 'F') goto yy413;
+ if (yych <= 'Z') goto yy135;
+ goto yy24;
+ } else {
+ if (yych <= '`') {
+ if (yych <= '_') goto yy135;
+ goto yy24;
+ } else {
+ if (yych <= 'f') goto yy413;
+ if (yych <= 'z') goto yy135;
+ goto yy24;
+ }
+ }
+ }
+yy301:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy135;
+ if (yych <= '*') goto yy127;
+ } else {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy127;
+ goto yy440;
+ } else {
+ if (yych <= '/') goto yy135;
+ if (yych <= '9') goto yy413;
+ goto yy412;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') {
+ if (yych <= '?') goto yy127;
+ goto yy135;
+ } else {
+ if (yych <= 'F') goto yy413;
+ if (yych <= 'Z') goto yy135;
+ goto yy127;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych <= '_') goto yy135;
+ goto yy127;
+ } else {
+ if (yych <= 'f') goto yy413;
+ if (yych <= 'z') goto yy135;
+ goto yy127;
+ }
+ }
+ }
+yy302:
yych = *++YYCURSOR;
-yy84:
- if (yybm[768+yych] & 2) {
- goto yy83;
+ if (yych <= '/') goto yy89;
+ if (yych <= '9') goto yy441;
+ goto yy89;
+yy303:
+ yych = *++YYCURSOR;
+ if (yych <= 'Z') {
+ if (yych <= '9') {
+ if (yych <= '/') goto yy89;
+ goto yy442;
+ } else {
+ if (yych <= '@') goto yy89;
+ if (yych <= 'F') goto yy404;
+ goto yy137;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych == '_') goto yy137;
+ goto yy89;
+ } else {
+ if (yych <= 'f') goto yy404;
+ if (yych <= 'z') goto yy137;
+ goto yy89;
+ }
}
- if (yych <= 0xDF) {
- if (yych <= '\'') {
- if (yych <= 0x1B) goto yy1;
+yy304:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ switch (yych) {
+ case '%': goto yy119;
+ case '+': goto yy88;
+ case '-': goto yy121;
+ case '.': goto yy443;
+ case '/': goto yy123;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy437;
+ case ':': goto yy412;
+ case '@': goto yy129;
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f': goto yy413;
+ case 'B':
+ case 'b': goto yy438;
+ case 'E':
+ case 'e': goto yy439;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy132;
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy134;
+ case 'S':
+ case 's': goto yy136;
+ case '_': goto yy137;
+ case 'm': goto yy139;
+ case 'p':
+ case 'u': goto yy140;
+ default: goto yy24;
+ }
+yy305:
+ ++YYCURSOR;
+yy306:
+ YYCURSOR = yyt2;
+#line 312 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_IPV6_ADDRESS); }
+#line 6783 "../../lnav/src/data_scanner_re.cc"
+yy307:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt1 = YYCURSOR;
+ goto yy444;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy445;
+ yyt1 = YYCURSOR;
+ goto yy446;
+ }
} else {
- if (yych <= '\\') goto yy86;
- if (yych <= 0xC1) goto yy1;
- goto yy87;
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy447;
+ } else {
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy447;
+ }
}
} else {
- if (yych <= 0xF0) {
- if (yych <= 0xE0) goto yy88;
- if (yych <= 0xEF) goto yy89;
- goto yy90;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
} else {
- if (yych <= 0xF3) goto yy91;
- if (yych <= 0xF4) goto yy92;
- goto yy1;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
}
}
-yy85:
+yy308:
yych = *++YYCURSOR;
- if (yych <= 0x7F) {
- if (yych <= 'R') {
- if (yych == '\'') {
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt1 = YYCURSOR;
+ goto yy444;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy448;
+ yyt1 = YYCURSOR;
+ goto yy446;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy447;
+ } else {
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy447;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
yyt2 = YYCURSOR;
- goto yy162;
+ goto yy305;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
}
- yyt2 = YYCURSOR;
- goto yy160;
} else {
- if (yych <= 'S') goto yy1;
- if (yych == 's') goto yy1;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy309:
+ yych = *++YYCURSOR;
+ if (yych <= '`') {
+ if (yych <= '5') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt1 = YYCURSOR;
+ goto yy444;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '4') goto yy448;
+ goto yy449;
+ }
+ } else {
+ if (yych <= '@') {
+ if (yych <= '9') goto yy445;
+ if (yych <= ':') {
+ yyt1 = YYCURSOR;
+ goto yy446;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'F') goto yy447;
+ if (yych <= 'Z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= 'f') goto yy447;
+ goto yy73;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy310:
+ yych = *++YYCURSOR;
+ if (yych == ' ') goto yy305;
+ goto yy73;
+yy311:
+ yych = *++YYCURSOR;
+ if (yych <= 'z') {
+ if (yych <= '@') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy447;
+ if (yych <= ':') {
+ yyt1 = YYCURSOR;
+ goto yy446;
+ }
yyt2 = YYCURSOR;
- goto yy160;
+ goto yy305;
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= 'F') goto yy447;
+ goto yy73;
+ } else {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 'f') goto yy447;
+ goto yy73;
+ }
}
} else {
- if (yych <= 0xEF) {
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy163;
+ goto yy305;
}
- if (yych <= 0xE0) {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy164;
+ goto yy313;
}
yyt2 = YYCURSOR;
- goto yy165;
+ goto yy314;
} else {
if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
yyt2 = YYCURSOR;
- goto yy166;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
}
- if (yych <= 0xF3) {
+ }
+ }
+yy312:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= 'E') {
+ if (yych <= '9') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy447;
+ } else {
+ if (yych <= ':') {
+ yyt1 = YYCURSOR;
+ goto yy446;
+ }
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy447;
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= 'F') goto yy450;
+ goto yy73;
+ } else {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 'e') goto yy447;
+ goto yy450;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych >= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
yyt2 = YYCURSOR;
- goto yy167;
}
- if (yych <= 0xF4) {
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
yyt2 = YYCURSOR;
- goto yy168;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
}
- goto yy1;
}
}
-yy86:
+yy313:
yych = *++YYCURSOR;
- if (yych <= 0xDF) {
- if (yych <= '\n') {
- if (yych <= '\t') goto yy83;
- goto yy1;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy305;
+ goto yy73;
+yy314:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy73;
+ if (yych <= 0xBF) goto yy313;
+ goto yy73;
+yy315:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy313;
+ goto yy73;
+yy316:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy73;
+ if (yych <= 0xBF) goto yy315;
+ goto yy73;
+yy317:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy315;
+ goto yy73;
+yy318:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0x8F) goto yy315;
+ goto yy73;
+yy319:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy452;
+ goto yy455;
} else {
- if (yych <= 0x7F) goto yy83;
- if (yych <= 0xC1) goto yy1;
+ if (yych <= '/') goto yy452;
+ if (yych <= ':') goto yy456;
+ goto yy452;
}
} else {
- if (yych <= 0xF0) {
- if (yych <= 0xE0) goto yy88;
- if (yych <= 0xEF) goto yy89;
- goto yy90;
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy456;
+ if (yych <= '^') goto yy452;
+ goto yy456;
} else {
- if (yych <= 0xF3) goto yy91;
- if (yych <= 0xF4) goto yy92;
- goto yy1;
+ if (yych <= '`') goto yy452;
+ if (yych <= 'z') goto yy456;
+ goto yy452;
}
}
-yy87:
+yy320:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy83;
- goto yy1;
-yy88:
+ if (yych <= '@') {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy452;
+ goto yy456;
+ } else {
+ if (yych <= '/') goto yy452;
+ if (yych <= ':') goto yy456;
+ goto yy452;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy456;
+ if (yych <= '^') goto yy452;
+ goto yy456;
+ } else {
+ if (yych <= '`') goto yy452;
+ if (yych <= 'z') goto yy456;
+ goto yy452;
+ }
+ }
+yy321:
yych = *++YYCURSOR;
- if (yych <= 0x9F) goto yy1;
- if (yych <= 0xBF) goto yy87;
- goto yy1;
-yy89:
+yy322:
+ if (yych <= '/') {
+ if (yych <= 0x1F) {
+ if (yych <= '\t') {
+ if (yych <= 0x08) goto yy73;
+ goto yy321;
+ } else {
+ if (yych == '\r') goto yy321;
+ goto yy73;
+ }
+ } else {
+ if (yych <= ',') {
+ if (yych <= ' ') goto yy321;
+ goto yy73;
+ } else {
+ if (yych <= '-') goto yy459;
+ if (yych <= '.') goto yy73;
+ goto yy324;
+ }
+ }
+ } else {
+ if (yych <= '@') {
+ if (yych <= '=') {
+ if (yych <= ':') goto yy459;
+ goto yy73;
+ } else {
+ if (yych <= '>') goto yy325;
+ if (yych <= '?') goto yy324;
+ goto yy73;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy459;
+ if (yych <= '^') goto yy73;
+ goto yy459;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'z') goto yy459;
+ goto yy73;
+ }
+ }
+ }
+yy323:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy87;
- goto yy1;
-yy90:
+ if (yybm_bol[1024+yych] & 64) {
+ goto yy323;
+ }
+ if (yych <= ' ') {
+ if (yych <= '\f') {
+ if (yych == '\t') goto yy460;
+ goto yy73;
+ } else {
+ if (yych <= '\r') goto yy460;
+ if (yych <= 0x1F) goto yy73;
+ goto yy460;
+ }
+ } else {
+ if (yych <= '<') {
+ if (yych != '/') goto yy73;
+ } else {
+ if (yych <= '=') goto yy461;
+ if (yych <= '>') goto yy325;
+ if (yych >= '@') goto yy73;
+ }
+ }
+yy324:
yych = *++YYCURSOR;
- if (yych <= 0x8F) goto yy1;
- if (yych <= 0xBF) goto yy89;
- goto yy1;
-yy91:
+ if (yych == '>') goto yy462;
+ goto yy73;
+yy325:
+ ++YYCURSOR;
+yy326:
+#line 322 "../../lnav/src/data_scanner_re.re"
+ {
+ RET(DT_XML_OPEN_TAG);
+ }
+#line 7289 "../../lnav/src/data_scanner_re.cc"
+yy327:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy89;
- goto yy1;
-yy92:
+yy328:
+ if (yych <= '/') {
+ if (yych <= '\r') {
+ if (yych == '\t') goto yy464;
+ if (yych <= '\f') goto yy73;
+ goto yy464;
+ } else {
+ if (yych <= ' ') {
+ if (yych <= 0x1F) goto yy73;
+ goto yy464;
+ } else {
+ if (yych == '-') goto yy327;
+ goto yy73;
+ }
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '=') {
+ if (yych <= ':') goto yy327;
+ goto yy73;
+ } else {
+ if (yych <= '>') goto yy465;
+ if (yych <= '@') goto yy73;
+ goto yy327;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy73;
+ goto yy327;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'z') goto yy327;
+ goto yy73;
+ }
+ }
+ }
+yy329:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0x8F) goto yy89;
- goto yy1;
-yy93:
+ if (yych <= '@') {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy467;
+ goto yy468;
+ } else {
+ if (yych <= '/') goto yy467;
+ if (yych <= ':') goto yy468;
+ goto yy467;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy468;
+ if (yych <= '^') goto yy467;
+ goto yy468;
+ } else {
+ if (yych <= '`') goto yy467;
+ if (yych <= 'z') goto yy468;
+ goto yy467;
+ }
+ }
+yy330:
+ yych = *++YYCURSOR;
+ if (yych == '-') goto yy469;
+ goto yy73;
+yy331:
++YYCURSOR;
-#line 220 "../../lnav/src/data_scanner_re.re"
- { RET(DT_EMPTY_CONTAINER); }
-#line 2182 "../../lnav/src/data_scanner_re.cc"
-yy94:
- yyaccept = 6;
+#line 330 "../../lnav/src/data_scanner_re.re"
+ {
+ CAPTURE(DT_H1);
+ cap_inner.c_end -= 1;
+ this->ds_bol = true;
+ return tokenize_result{token_out, cap_all, cap_inner, this->ds_input.data()};
+ }
+#line 7363 "../../lnav/src/data_scanner_re.cc"
+yy332:
+ ++YYCURSOR;
+ goto yy156;
+yy333:
+ yych = *++YYCURSOR;
+ if (yych <= '\f') {
+ if (yych == '\t') goto yy332;
+ goto yy156;
+ } else {
+ if (yych <= '\r') goto yy332;
+ if (yych == ' ') goto yy332;
+ goto yy156;
+ }
+yy334:
+ yych = *++YYCURSOR;
+ if (yych <= '\f') {
+ if (yych == '\t') goto yy332;
+ goto yy73;
+ } else {
+ if (yych <= '\r') goto yy332;
+ if (yych == ' ') goto yy332;
+ goto yy73;
+ }
+yy335:
+ yych = *++YYCURSOR;
+ if (yybm_bol[1024+yych] & 128) {
+ goto yy335;
+ }
+ if (yych <= '*') {
+ if (yych <= 0x1F) {
+ if (yych == '\n') goto yy331;
+ goto yy73;
+ } else {
+ if (yych <= ' ') goto yy152;
+ if (yych == '%') goto yy88;
+ goto yy73;
+ }
+ } else {
+ if (yych <= '?') {
+ if (yych == ',') goto yy73;
+ if (yych <= '.') goto yy88;
+ goto yy73;
+ } else {
+ if (yych <= '@') goto yy90;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'z') goto yy88;
+ goto yy73;
+ }
+ }
+yy336:
+ yyaccept = 14;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
+yy337:
+ if (yych <= '.') {
+ if (yych <= '$') {
+ if (yych <= '\n') {
+ if (yych <= '\t') goto yy133;
+ goto yy331;
+ } else {
+ if (yych == ' ') goto yy152;
+ goto yy133;
+ }
+ } else {
+ if (yych <= '+') {
+ if (yych <= '%') goto yy88;
+ if (yych <= '*') goto yy133;
+ goto yy88;
+ } else {
+ if (yych <= ',') goto yy133;
+ if (yych <= '-') goto yy157;
+ goto yy121;
+ }
+ }
+ } else {
+ if (yych <= '@') {
+ if (yych <= '9') {
+ if (yych <= '/') goto yy123;
+ goto yy336;
+ } else {
+ if (yych <= ':') goto yy294;
+ if (yych <= '?') goto yy133;
+ goto yy129;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy336;
+ if (yych <= '^') goto yy133;
+ goto yy336;
+ } else {
+ if (yych <= '`') goto yy133;
+ if (yych <= 'z') goto yy137;
+ goto yy133;
+ }
+ }
}
- if (yych <= ':') {
+yy338:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[768+yych] & 1) {
+ goto yy338;
+ }
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy39;
+ goto yy88;
+ } else {
+ if (yych == '+') goto yy88;
+ goto yy39;
+ }
+ } else {
+ if (yych <= ':') {
+ if (yych <= '.') goto yy470;
+ if (yych <= '/') goto yy39;
+ goto yy471;
+ } else {
+ if (yych == '@') goto yy90;
+ goto yy39;
+ }
+ }
+yy339:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '9') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy88;
+ if (yych <= '*') goto yy39;
+ goto yy88;
+ } else {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy39;
+ goto yy472;
+ } else {
+ if (yych <= '.') goto yy158;
+ if (yych <= '/') goto yy123;
+ goto yy339;
+ }
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= ':') goto yy192;
+ if (yych <= '?') goto yy39;
+ if (yych <= '@') goto yy129;
+ goto yy339;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy39;
+ goto yy339;
+ } else {
+ if (yych <= '`') goto yy39;
+ if (yych <= 'z') goto yy339;
+ goto yy39;
+ }
+ }
+ }
+yy340:
+ yych = *++YYCURSOR;
+ if (yych <= '.') {
if (yych <= '$') {
- if (yych <= '\r') {
- if (yych <= 0x08) {
- if (yych <= 0x00) goto yy26;
- goto yy4;
- } else {
- if (yych <= '\n') goto yy26;
- if (yych <= '\f') goto yy4;
- goto yy26;
+ if (yych <= '\n') {
+ if (yych <= '\t') goto yy73;
+ goto yy331;
+ } else {
+ if (yych == ' ') goto yy152;
+ goto yy73;
+ }
+ } else {
+ if (yych <= '+') {
+ if (yych <= '%') goto yy88;
+ if (yych <= '*') goto yy73;
+ goto yy88;
+ } else {
+ if (yych <= ',') goto yy73;
+ if (yych <= '-') goto yy335;
+ goto yy88;
+ }
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '?') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy473;
+ goto yy73;
+ } else {
+ if (yych <= '@') goto yy90;
+ if (yych <= 'F') goto yy473;
+ goto yy336;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych == '_') goto yy336;
+ goto yy73;
+ } else {
+ if (yych <= 'f') goto yy404;
+ if (yych <= 'z') goto yy137;
+ goto yy73;
+ }
+ }
+ }
+yy341:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy170;
+ if (yych <= '9') goto yy474;
+ if (yych <= ':') goto yy194;
+ goto yy170;
+ } else {
+ if (yych <= 'F') goto yy474;
+ if (yych <= '`') goto yy170;
+ if (yych <= 'f') goto yy475;
+ goto yy170;
+ }
+yy342:
+ yych = *++YYCURSOR;
+ if (yych <= ':') {
+ if (yych <= '.') goto yy73;
+ if (yych <= '/') goto yy286;
+ if (yych <= '9') goto yy415;
+ goto yy344;
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy73;
+ goto yy415;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy415;
+ goto yy73;
+ }
+ }
+yy343:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy201;
+ if (yych <= '9') goto yy475;
+ if (yych <= ':') goto yy194;
+ goto yy201;
+ } else {
+ if (yych <= 'F') goto yy475;
+ if (yych <= '`') goto yy201;
+ if (yych <= 'f') goto yy475;
+ goto yy201;
+ }
+yy344:
+ yych = *++YYCURSOR;
+ if (yych <= '^') {
+ if (yych <= '2') {
+ if (yych <= '/') {
+ if (yych == '-') {
+ yyt2 = YYCURSOR;
+ goto yy476;
}
+ yyt2 = YYCURSOR;
+ goto yy305;
} else {
- if (yych <= 0x1B) {
- if (yych <= 0x1A) goto yy4;
- goto yy26;
- } else {
- if (yych <= 0x1F) goto yy4;
- if (yych <= '#') goto yy26;
- goto yy4;
+ if (yych <= '0') goto yy477;
+ if (yych <= '1') goto yy478;
+ goto yy479;
+ }
+ } else {
+ if (yych <= '@') {
+ if (yych <= '9') goto yy477;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy310;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'F') goto yy480;
+ if (yych <= 'Z') goto yy481;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ }
+ } else {
+ if (yych <= 0xC1) {
+ if (yych <= 'f') {
+ if (yych <= '_') {
+ yyt2 = YYCURSOR;
+ goto yy483;
+ }
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy480;
+ } else {
+ if (yych <= 'z') goto yy481;
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy73;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
}
+ yyt2 = YYCURSOR;
+ goto yy315;
+ } else {
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy316;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy345:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= ' ') {
+ if (yych <= 0x1F) goto yy170;
+ goto yy484;
+ } else {
+ if (yych <= '/') goto yy170;
+ if (yych <= '9') goto yy474;
+ goto yy194;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy170;
+ goto yy474;
+ } else {
+ if (yych <= '`') goto yy170;
+ if (yych <= 'f') goto yy475;
+ goto yy170;
+ }
+ }
+yy346:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == ' ') goto yy484;
+ goto yy170;
+yy347:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= ' ') {
+ if (yych <= 0x1F) goto yy201;
+ goto yy485;
+ } else {
+ if (yych <= '/') goto yy201;
+ if (yych <= '9') goto yy475;
+ goto yy194;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy201;
+ goto yy475;
+ } else {
+ if (yych <= '`') goto yy201;
+ if (yych <= 'f') goto yy475;
+ goto yy201;
+ }
+ }
+yy348:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == ' ') goto yy485;
+ goto yy201;
+yy349:
+ yych = *++YYCURSOR;
+ if (yych <= '-') {
+ if (yych <= '\r') {
+ if (yych == '\t') goto yy332;
+ if (yych <= '\f') goto yy89;
+ goto yy332;
+ } else {
+ if (yych == ' ') goto yy332;
+ if (yych <= ',') goto yy89;
+ goto yy338;
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '/') goto yy89;
+ if (yych <= '9') goto yy339;
+ if (yych <= '@') goto yy89;
+ goto yy339;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy89;
+ goto yy339;
+ } else {
+ if (yych <= '`') goto yy89;
+ if (yych <= 'z') goto yy339;
+ goto yy89;
+ }
+ }
+ }
+yy350:
+ yyaccept = 24;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= '.') goto yy156;
+ if (yych <= '/') goto yy286;
+ if (yych <= '9') goto yy415;
+ goto yy344;
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy156;
+ goto yy415;
+ } else {
+ if (yych <= '`') goto yy156;
+ if (yych <= 'f') goto yy415;
+ goto yy156;
+ }
+ }
+yy351:
+ yyaccept = 15;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '9') {
+ if (yych <= '*') {
+ if (yych <= ' ') {
+ if (yych <= 0x1F) goto yy155;
+ yyt3 = YYCURSOR;
+ goto yy486;
+ } else {
+ if (yych == '%') goto yy88;
+ goto yy155;
}
} else {
if (yych <= '-') {
- if (yych <= '*') {
- if (yych <= '%') goto yy105;
- goto yy26;
- } else {
- if (yych <= '+') goto yy80;
- if (yych <= ',') goto yy26;
- goto yy46;
+ if (yych <= '+') goto yy88;
+ if (yych <= ',') goto yy155;
+ goto yy121;
+ } else {
+ if (yych <= '.') {
+ yyt3 = YYCURSOR;
+ goto yy349;
+ }
+ if (yych <= '/') goto yy123;
+ goto yy475;
+ }
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '?') {
+ if (yych <= ':') {
+ yyt3 = YYCURSOR;
+ goto yy487;
}
+ goto yy155;
} else {
- if (yych <= '/') {
- if (yych <= '.') goto yy169;
- goto yy4;
- } else {
- if (yych <= '7') goto yy170;
- if (yych >= ':') goto yy4;
+ if (yych <= '@') goto yy129;
+ if (yych <= 'F') goto yy475;
+ goto yy200;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych == '_') goto yy49;
+ goto yy155;
+ } else {
+ if (yych <= 'f') goto yy488;
+ if (yych <= 'z') goto yy489;
+ goto yy155;
+ }
+ }
+ }
+yy352:
+ yyaccept = 15;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '/') {
+ if (yych <= '*') {
+ if (yych <= ' ') {
+ if (yych <= 0x1F) goto yy155;
+ yyt3 = YYCURSOR;
+ goto yy486;
+ } else {
+ if (yych == '%') goto yy88;
+ goto yy155;
+ }
+ } else {
+ if (yych <= ',') {
+ if (yych <= '+') goto yy88;
+ goto yy155;
+ } else {
+ if (yych <= '-') goto yy121;
+ if (yych <= '.') {
+ yyt3 = YYCURSOR;
+ goto yy349;
}
+ goto yy123;
}
}
} else {
- if (yych <= 'd') {
- if (yych <= 'F') {
- if (yych <= '@') {
- if (yych <= '?') goto yy26;
- goto yy96;
- } else {
- if (yych == 'E') goto yy172;
- goto yy171;
+ if (yych <= 'Z') {
+ if (yych <= ':') {
+ if (yych <= '9') goto yy200;
+ yyt3 = YYCURSOR;
+ } else {
+ if (yych <= '?') goto yy155;
+ if (yych <= '@') goto yy129;
+ goto yy200;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy155;
+ goto yy49;
+ } else {
+ if (yych <= '`') goto yy155;
+ if (yych <= 'z') goto yy489;
+ goto yy155;
+ }
+ }
+ }
+yy353:
+ yyaccept = 24;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '/') goto yy286;
+ if (yych == ':') goto yy356;
+ goto yy156;
+yy354:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == ' ') goto yy484;
+ if (yych == 'S') goto yy490;
+ goto yy170;
+yy355:
+ yyaccept = 15;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '9') {
+ if (yych <= '*') {
+ if (yych <= ' ') {
+ if (yych <= 0x1F) goto yy155;
+ yyt3 = YYCURSOR;
+ goto yy486;
+ } else {
+ if (yych == '%') goto yy88;
+ goto yy155;
+ }
+ } else {
+ if (yych <= '-') {
+ if (yych <= '+') goto yy88;
+ if (yych <= ',') goto yy155;
+ goto yy121;
+ } else {
+ if (yych <= '.') {
+ yyt3 = YYCURSOR;
+ goto yy349;
+ }
+ if (yych <= '/') goto yy123;
+ goto yy200;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '?') {
+ if (yych <= ':') {
+ yyt3 = YYCURSOR;
+ goto yy353;
}
+ goto yy155;
} else {
- if (yych <= '^') {
- if (yych <= 'Z') goto yy46;
- goto yy26;
- } else {
- if (yych <= '_') goto yy46;
- if (yych <= '`') goto yy26;
- goto yy171;
+ if (yych <= '@') goto yy129;
+ if (yych <= 'Z') goto yy200;
+ goto yy155;
+ }
+ } else {
+ if (yych <= 'r') {
+ if (yych <= '_') goto yy49;
+ if (yych <= '`') goto yy155;
+ goto yy489;
+ } else {
+ if (yych <= 's') goto yy491;
+ if (yych <= 'z') goto yy489;
+ goto yy155;
+ }
+ }
+ }
+yy356:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy73;
+ goto yy492;
+ } else {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy481;
+ goto yy73;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy481;
+ if (yych <= '^') goto yy73;
+ goto yy481;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'z') goto yy481;
+ goto yy73;
+ }
+ }
+yy357:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == ' ') goto yy484;
+ if (yych == 'L') goto yy494;
+ goto yy170;
+yy358:
+ yyaccept = 15;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '9') {
+ if (yych <= '*') {
+ if (yych <= ' ') {
+ if (yych <= 0x1F) goto yy155;
+ yyt3 = YYCURSOR;
+ goto yy486;
+ } else {
+ if (yych == '%') goto yy88;
+ goto yy155;
+ }
+ } else {
+ if (yych <= '-') {
+ if (yych <= '+') goto yy88;
+ if (yych <= ',') goto yy155;
+ goto yy121;
+ } else {
+ if (yych <= '.') {
+ yyt3 = YYCURSOR;
+ goto yy349;
}
+ if (yych <= '/') goto yy123;
+ goto yy200;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '?') {
+ if (yych <= ':') {
+ yyt3 = YYCURSOR;
+ goto yy353;
+ }
+ goto yy155;
+ } else {
+ if (yych <= '@') goto yy129;
+ if (yych <= 'Z') goto yy200;
+ goto yy155;
}
} else {
- if (yych <= 'z') {
- if (yych <= 'f') {
- if (yych <= 'e') goto yy172;
- goto yy171;
- } else {
- if (yych == 'x') goto yy173;
- goto yy46;
+ if (yych <= 'd') {
+ if (yych <= '_') goto yy49;
+ if (yych <= '`') goto yy155;
+ goto yy489;
+ } else {
+ if (yych <= 'e') goto yy496;
+ if (yych <= 'z') goto yy489;
+ goto yy155;
+ }
+ }
+ }
+yy359:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == ' ') goto yy484;
+ if (yych == 'E') goto yy494;
+ goto yy170;
+yy360:
+ yych = *++YYCURSOR;
+ if (yybm_bol[1280+yych] & 128) {
+ goto yy176;
+ }
+ if (yych <= 0xDF) {
+ if (yych <= '\n') {
+ if (yych <= 0x00) goto yy73;
+ goto yy497;
+ } else {
+ if (yych <= ']') goto yy360;
+ if (yych <= 0xC1) goto yy73;
+ goto yy179;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy180;
+ if (yych <= 0xEF) goto yy181;
+ goto yy182;
+ } else {
+ if (yych <= 0xF3) goto yy183;
+ if (yych <= 0xF4) goto yy184;
+ goto yy73;
+ }
+ }
+yy361:
+ yyaccept = 15;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '9') {
+ if (yych <= '*') {
+ if (yych <= ' ') {
+ if (yych <= 0x1F) goto yy155;
+ yyt3 = YYCURSOR;
+ goto yy486;
+ } else {
+ if (yych == '%') goto yy88;
+ goto yy155;
+ }
+ } else {
+ if (yych <= '-') {
+ if (yych <= '+') goto yy88;
+ if (yych <= ',') goto yy155;
+ goto yy121;
+ } else {
+ if (yych <= '.') {
+ yyt3 = YYCURSOR;
+ goto yy349;
}
+ if (yych <= '/') goto yy123;
+ goto yy200;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '?') {
+ if (yych <= ':') {
+ yyt3 = YYCURSOR;
+ goto yy353;
+ }
+ goto yy155;
+ } else {
+ if (yych <= '@') goto yy129;
+ if (yych <= 'Z') goto yy200;
+ goto yy155;
+ }
+ } else {
+ if (yych <= 'e') {
+ if (yych <= '_') goto yy49;
+ if (yych <= '`') goto yy155;
+ goto yy489;
+ } else {
+ if (yych <= 'f') goto yy498;
+ if (yych <= 'z') goto yy489;
+ goto yy155;
+ }
+ }
+ }
+yy362:
+ yyaccept = 24;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 0x16) {
+ if (yych <= '\t') {
+ if (yych <= 0x00) goto yy156;
+ goto yy92;
+ } else {
+ if (yych <= '\n') goto yy156;
+ if (yych <= 0x15) goto yy92;
+ goto yy156;
+ }
+ } else {
+ if (yych <= 0x7F) {
+ if (yych == 0x1B) goto yy156;
+ goto yy92;
+ } else {
+ if (yych <= 0xC1) goto yy156;
+ if (yych <= 0xF4) goto yy92;
+ goto yy156;
+ }
+ }
+yy363:
+ yyaccept = 24;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 0x16) {
+ if (yych <= '\n') {
+ if (yych <= 0x00) goto yy156;
+ if (yych <= 0x08) goto yy92;
+ if (yych <= '\t') goto yy362;
+ goto yy156;
+ } else {
+ if (yych == '\r') goto yy362;
+ if (yych <= 0x15) goto yy92;
+ goto yy156;
+ }
+ } else {
+ if (yych <= ' ') {
+ if (yych == 0x1B) goto yy156;
+ if (yych <= 0x1F) goto yy92;
+ goto yy362;
+ } else {
+ if (yych <= 0x7F) goto yy92;
+ if (yych <= 0xC1) goto yy156;
+ if (yych <= 0xF4) goto yy92;
+ goto yy156;
+ }
+ }
+yy364:
+ yyaccept = 15;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'S') {
+ if (yych <= ',') {
+ if (yych <= '&') {
+ if (yych == '!') {
+ yyt1 = yyt3 = YYCURSOR;
+ goto yy499;
+ }
+ yyt2 = YYCURSOR;
+ goto yy217;
+ } else {
+ if (yych <= '\'') goto yy500;
+ if (yych <= '+') {
+ yyt2 = YYCURSOR;
+ goto yy217;
+ }
+ yyt1 = yyt3 = YYCURSOR;
+ goto yy499;
+ }
+ } else {
+ if (yych <= '>') {
+ if (yych == '.') {
+ yyt1 = yyt3 = YYCURSOR;
+ goto yy499;
+ }
+ yyt2 = YYCURSOR;
+ goto yy217;
+ } else {
+ if (yych <= '?') {
+ yyt1 = yyt3 = YYCURSOR;
+ goto yy499;
+ }
+ if (yych <= 'R') {
+ yyt2 = YYCURSOR;
+ goto yy217;
+ }
+ yyt3 = YYCURSOR;
+ goto yy156;
+ }
+ }
+ } else {
+ if (yych <= 0xC1) {
+ if (yych <= 's') {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy217;
+ }
+ if (yych <= 'r') {
+ yyt1 = YYCURSOR;
+ goto yy501;
+ }
+ goto yy154;
} else {
+ if (yych <= 'z') {
+ yyt1 = YYCURSOR;
+ goto yy501;
+ }
if (yych <= 0x7F) {
- if (yych <= '~') goto yy26;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy26;
- if (yych <= 0xF4) goto yy4;
- goto yy26;
+ yyt2 = YYCURSOR;
+ goto yy217;
}
+ yyt3 = YYCURSOR;
+ goto yy156;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy221;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy222;
+ }
+ yyt2 = YYCURSOR;
+ goto yy223;
+ } else {
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy224;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy225;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy226;
+ }
+ yyt3 = YYCURSOR;
+ goto yy156;
}
}
}
-yy95:
- yyaccept = 6;
+yy365:
+ yych = *++YYCURSOR;
+ if (yych <= '\f') {
+ if (yych == '\t') goto yy362;
+ goto yy92;
+ } else {
+ if (yych <= '\r') goto yy362;
+ if (yych == ' ') goto yy362;
+ goto yy92;
+ }
+yy366:
+ yyaccept = 15;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
+ if (yybm_bol[768+yych] & 4) {
+ goto yy366;
}
- if (yych <= '@') {
- if (yych <= '$') {
- if (yych <= '\r') {
- if (yych <= 0x08) {
- if (yych <= 0x00) goto yy26;
- goto yy3;
- } else {
- if (yych <= '\n') goto yy26;
- if (yych <= '\f') goto yy3;
- goto yy26;
+ if (yych <= '+') {
+ if (yych <= 0x1A) {
+ if (yych <= '\n') {
+ if (yych <= 0x00) {
+ yyt3 = YYCURSOR;
+ goto yy156;
}
+ if (yych <= 0x08) goto yy91;
+ if (yych <= '\t') {
+ yyt3 = YYCURSOR;
+ goto yy362;
+ }
+ yyt3 = YYCURSOR;
+ goto yy332;
} else {
- if (yych <= 0x1B) {
- if (yych <= 0x1A) goto yy3;
- goto yy26;
+ if (yych <= '\r') {
+ if (yych <= '\f') goto yy91;
+ yyt3 = YYCURSOR;
+ goto yy362;
} else {
- if (yych <= 0x1F) goto yy3;
- if (yych <= '#') goto yy26;
- goto yy3;
+ if (yych == 0x16) {
+ yyt3 = YYCURSOR;
+ goto yy156;
+ }
+ goto yy91;
}
}
} else {
- if (yych <= '-') {
- if (yych <= '*') {
- if (yych <= '%') goto yy105;
- goto yy26;
- } else {
- if (yych <= '+') goto yy80;
- if (yych <= ',') goto yy26;
- goto yy46;
+ if (yych <= '!') {
+ if (yych <= 0x1B) {
+ yyt3 = YYCURSOR;
+ goto yy156;
+ }
+ if (yych <= 0x1F) goto yy91;
+ if (yych <= ' ') {
+ yyt3 = YYCURSOR;
+ goto yy362;
}
+ yyt3 = YYCURSOR;
+ goto yy363;
} else {
- if (yych <= '9') {
- if (yych <= '.') goto yy169;
- if (yych <= '/') goto yy3;
- goto yy95;
+ if (yych <= '&') {
+ if (yych <= '"') {
+ yyt3 = YYCURSOR;
+ goto yy362;
+ }
+ goto yy91;
} else {
- if (yych <= ':') goto yy62;
- if (yych <= '?') goto yy26;
+ if (yych <= '\'') goto yy502;
+ if (yych <= '*') {
+ yyt3 = YYCURSOR;
+ goto yy362;
+ }
+ goto yy91;
}
}
}
} else {
- if (yych <= 'f') {
- if (yych <= '^') {
- if (yych <= 'E') {
- if (yych <= 'D') goto yy171;
- goto yy172;
- } else {
- if (yych <= 'F') goto yy171;
- if (yych <= 'Z') goto yy46;
- goto yy26;
+ if (yych <= '\\') {
+ if (yych <= '9') {
+ if (yych <= ',') {
+ yyt3 = YYCURSOR;
+ goto yy363;
+ }
+ if (yych == '.') {
+ yyt3 = YYCURSOR;
+ goto yy365;
}
+ goto yy91;
} else {
- if (yych <= '`') {
- if (yych <= '_') goto yy46;
- goto yy26;
+ if (yych <= '>') {
+ if (yych <= ';') {
+ yyt3 = YYCURSOR;
+ goto yy362;
+ }
+ goto yy91;
} else {
- if (yych == 'e') goto yy172;
- goto yy171;
+ if (yych <= '?') {
+ yyt3 = YYCURSOR;
+ goto yy363;
+ }
+ if (yych <= '[') goto yy91;
+ goto yy94;
}
}
} else {
- if (yych <= 0xDF) {
- if (yych <= '~') {
- if (yych <= 'z') goto yy46;
- goto yy26;
- } else {
- if (yych <= 0x7F) goto yy3;
- if (yych <= 0xC1) goto yy26;
- goto yy56;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy91;
+ if (yych <= 0xC1) {
+ yyt3 = YYCURSOR;
+ goto yy156;
}
+ if (yych <= 0xDF) goto yy95;
+ goto yy96;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xE0) goto yy57;
- if (yych <= 0xEF) goto yy58;
- goto yy59;
+ if (yych <= 0xEF) goto yy97;
+ goto yy98;
} else {
- if (yych <= 0xF3) goto yy60;
- if (yych <= 0xF4) goto yy61;
- goto yy26;
+ if (yych <= 0xF3) goto yy99;
+ if (yych <= 0xF4) goto yy100;
+ yyt3 = YYCURSOR;
+ goto yy156;
}
}
}
}
-yy96:
- yyaccept = 0;
+yy367:
+ yyaccept = 15;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '9') {
- if (yych <= ',') goto yy4;
- if (yych == '/') goto yy4;
- goto yy174;
+ if (yych <= '*') {
+ if (yych <= ' ') {
+ if (yych <= 0x1F) goto yy155;
+ yyt3 = YYCURSOR;
+ goto yy486;
+ } else {
+ if (yych == '%') goto yy88;
+ goto yy155;
+ }
+ } else {
+ if (yych <= '-') {
+ if (yych <= '+') goto yy88;
+ if (yych <= ',') goto yy155;
+ goto yy121;
+ } else {
+ if (yych <= '.') {
+ yyt3 = YYCURSOR;
+ goto yy349;
+ }
+ if (yych <= '/') goto yy123;
+ goto yy200;
+ }
+ }
} else {
- if (yych <= 'Z') {
- if (yych <= '@') goto yy4;
- goto yy174;
+ if (yych <= '^') {
+ if (yych <= '?') {
+ if (yych <= ':') {
+ yyt3 = YYCURSOR;
+ goto yy353;
+ }
+ goto yy155;
+ } else {
+ if (yych <= '@') goto yy129;
+ if (yych <= 'Z') goto yy200;
+ goto yy155;
+ }
} else {
- if (yych <= '`') goto yy4;
- if (yych <= 'z') goto yy174;
- goto yy4;
+ if (yych <= 'k') {
+ if (yych <= '_') goto yy49;
+ if (yych <= '`') goto yy155;
+ goto yy489;
+ } else {
+ if (yych <= 'l') goto yy496;
+ if (yych <= 'z') goto yy489;
+ goto yy155;
+ }
}
}
-yy97:
+yy368:
yych = *++YYCURSOR;
- if (yych != '/') goto yy81;
-yy98:
+ if (yych <= 'Z') {
+ if (yych <= '/') goto yy89;
+ if (yych <= '9') goto yy137;
+ if (yych <= '@') goto yy89;
+ goto yy503;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy89;
+ goto yy137;
+ } else {
+ if (yych <= '`') goto yy89;
+ if (yych <= 'z') goto yy503;
+ goto yy89;
+ }
+ }
+yy369:
yych = *++YYCURSOR;
- if (yych == 'P') goto yy175;
- goto yy100;
-yy99:
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy504;
+ goto yy73;
+yy370:
yych = *++YYCURSOR;
-yy100:
- if (yybm[768+yych] & 8) {
- goto yy99;
+ if (yych == ':') goto yy505;
+ goto yy73;
+yy371:
+ yych = *++YYCURSOR;
+ if (yych <= 0xC1) {
+ if (yych <= '=') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= '<') goto yy213;
+ goto yy506;
+ } else {
+ if (yych == ']') goto yy507;
+ if (yych <= 0x7F) goto yy213;
+ goto yy73;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy372;
+ if (yych <= 0xE0) goto yy373;
+ goto yy374;
+ } else {
+ if (yych <= 0xF0) goto yy375;
+ if (yych <= 0xF3) goto yy376;
+ if (yych <= 0xF4) goto yy377;
+ goto yy73;
+ }
}
- goto yy24;
-yy101:
- yyaccept = 5;
+yy372:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy213;
+ goto yy73;
+yy373:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy73;
+ if (yych <= 0xBF) goto yy372;
+ goto yy73;
+yy374:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy372;
+ goto yy73;
+yy375:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy73;
+ if (yych <= 0xBF) goto yy374;
+ goto yy73;
+yy376:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy374;
+ goto yy73;
+yy377:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0x8F) goto yy374;
+ goto yy73;
+yy378:
+ yych = *++YYCURSOR;
+ if (yybm_bol[768+yych] & 8) {
+ goto yy378;
+ }
+ if (yych <= '9') {
+ if (yych == '-') goto yy214;
+ if (yych <= '/') goto yy73;
+ goto yy214;
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '@') goto yy73;
+ goto yy508;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'z') goto yy508;
+ goto yy73;
+ }
+ }
+yy379:
+ yyaccept = 25;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 16) {
- goto yy101;
+ if (yybm_bol[1536+yych] & 64) {
+ goto yy91;
}
- if (yych <= ',') {
- if (yych <= 0x1B) {
- if (yych <= '\n') {
- if (yych <= 0x00) goto yy24;
- if (yych <= 0x08) goto yy3;
- goto yy24;
+ if (yych <= 0xDF) {
+ if (yych <= '\'') {
+ if (yych <= 0x1B) goto yy218;
+ goto yy216;
+ } else {
+ if (yych <= '\\') goto yy94;
+ if (yych <= 0xC1) goto yy218;
+ goto yy95;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy96;
+ if (yych <= 0xEF) goto yy97;
+ goto yy98;
+ } else {
+ if (yych <= 0xF3) goto yy99;
+ if (yych <= 0xF4) goto yy100;
+ goto yy218;
+ }
+ }
+yy380:
+ yyaccept = 23;
+ yych = *(YYMARKER = ++YYCURSOR);
+ switch (yych) {
+ case '%':
+ case '+':
+ case '-':
+ case '.':
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy88;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy380;
+ case '@': goto yy90;
+ case 'B':
+ case 'S':
+ case 'b':
+ case 's': goto yy510;
+ case 'E':
+ case 'e': goto yy511;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy512;
+ case 'm': goto yy513;
+ case 'p':
+ case 'u': goto yy514;
+ default: goto yy274;
+ }
+yy381:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy89;
+ if (yych <= '9') goto yy515;
+ goto yy89;
+yy382:
+ yych = *++YYCURSOR;
+ if (yych <= '9') {
+ if (yych <= '\f') {
+ if (yych <= 0x00) goto yy230;
+ if (yych <= 0x08) goto yy89;
+ if (yych <= '\n') goto yy230;
+ goto yy89;
+ } else {
+ if (yych <= 0x1F) {
+ if (yych <= '\r') goto yy230;
+ goto yy89;
} else {
- if (yych == '\r') goto yy24;
- if (yych <= 0x1A) goto yy3;
- goto yy24;
+ if (yych <= ' ') goto yy230;
+ if (yych <= '/') goto yy89;
+ goto yy106;
}
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '@') goto yy89;
+ if (yych == 'B') goto yy235;
+ goto yy106;
} else {
- if (yych <= '"') {
- if (yych <= 0x1F) goto yy3;
- if (yych == '!') goto yy99;
- goto yy24;
+ if (yych <= 'a') {
+ if (yych <= '`') goto yy89;
+ goto yy106;
} else {
- if (yych == '\'') goto yy24;
- if (yych <= '*') goto yy99;
- goto yy24;
+ if (yych <= 'b') goto yy235;
+ if (yych <= 'z') goto yy106;
+ goto yy89;
+ }
+ }
+ }
+yy383:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '\r') {
+ if (yych <= 0x08) {
+ if (yych <= 0x00) goto yy230;
+ goto yy89;
+ } else {
+ if (yych <= '\n') goto yy230;
+ if (yych <= '\f') goto yy89;
+ goto yy230;
+ }
+ } else {
+ if (yych <= ' ') {
+ if (yych <= 0x1F) goto yy89;
+ goto yy230;
+ } else {
+ if (yych <= '/') goto yy89;
+ if (yych <= '9') goto yy106;
+ goto yy89;
}
}
} else {
- if (yych <= 0x7F) {
- if (yych <= ']') {
- if (yych <= ':') goto yy62;
- if (yych == '\\') goto yy99;
- goto yy24;
+ if (yych <= 'a') {
+ if (yych <= 'B') {
+ if (yych <= 'A') goto yy106;
+ goto yy235;
} else {
- if (yych <= '^') goto yy99;
- if (yych <= '}') goto yy24;
- if (yych <= '~') goto yy99;
- goto yy3;
+ if (yych <= 'Z') goto yy106;
+ if (yych <= '`') goto yy89;
+ goto yy106;
}
} else {
- if (yych <= 0xEF) {
- if (yych <= 0xC1) goto yy24;
- if (yych <= 0xDF) goto yy56;
- if (yych <= 0xE0) goto yy57;
- goto yy58;
- } else {
- if (yych <= 0xF0) goto yy59;
- if (yych <= 0xF3) goto yy60;
- if (yych <= 0xF4) goto yy61;
- goto yy24;
+ if (yych <= 'm') {
+ if (yych <= 'b') goto yy235;
+ goto yy106;
+ } else {
+ if (yych <= 'n') goto yy235;
+ if (yych <= 'z') goto yy106;
+ goto yy89;
}
}
}
-yy102:
- yyaccept = 5;
+yy384:
+ yych = *++YYCURSOR;
+ if (yych == '\n') goto yy73;
+ goto yy517;
+yy385:
+ yyaccept = 23;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '9') {
- if (yych <= ' ') {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy24;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy24;
- goto yy4;
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ switch (yych) {
+ case '%': goto yy119;
+ case '+':
+ case '-':
+ case '.':
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy88;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy385;
+ case '@': goto yy90;
+ case 'B':
+ case 'S':
+ case 'b':
+ case 's': goto yy510;
+ case 'E':
+ case 'e': goto yy511;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy512;
+ case 'm': goto yy513;
+ case 'p':
+ case 'u': goto yy514;
+ default: goto yy274;
+ }
+yy386:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy89;
+ if (yych <= '9') goto yy524;
+ goto yy89;
+yy387:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy89;
+ if (yych <= '9') goto yy525;
+ goto yy89;
+yy388:
+ yych = *++YYCURSOR;
+ if (yych <= 0xC1) {
+ if (yych <= '*') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= ')') goto yy263;
+ goto yy526;
+ } else {
+ if (yych == '/') goto yy527;
+ if (yych <= 0x7F) goto yy263;
+ goto yy73;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy265;
+ if (yych <= 0xE0) goto yy266;
+ goto yy267;
+ } else {
+ if (yych <= 0xF0) goto yy268;
+ if (yych <= 0xF3) goto yy269;
+ if (yych <= 0xF4) goto yy270;
+ goto yy73;
+ }
+ }
+yy389:
+ yyaccept = 10;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[768+yych] & 16) {
+ goto yy389;
+ }
+ if (yych <= '\\') {
+ if (yych <= ')') {
+ if (yych <= '!') {
+ if (yych <= 0x00) goto yy22;
+ if (yych <= ' ') goto yy263;
+ goto yy115;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') goto yy24;
- goto yy4;
- } else {
- if (yych <= 0x1B) goto yy24;
- if (yych <= 0x1F) goto yy4;
- goto yy24;
- }
+ if (yych <= '"') goto yy263;
+ if (yych == '\'') goto yy263;
+ goto yy115;
}
} else {
- if (yych <= '$') {
- if (yych == '"') goto yy24;
- if (yych <= '#') goto yy99;
- goto yy101;
+ if (yych <= '9') {
+ if (yych <= ',') goto yy263;
+ if (yych == '/') goto yy528;
+ goto yy115;
} else {
- if (yych <= '\'') {
- if (yych <= '&') goto yy99;
- goto yy24;
- } else {
- if (yych <= '*') goto yy99;
- if (yych <= ',') goto yy24;
- goto yy101;
- }
+ if (yych <= '?') goto yy263;
+ if (yych == '[') goto yy263;
+ goto yy115;
}
}
} else {
- if (yych <= '`') {
- if (yych <= '[') {
- if (yych <= ':') goto yy4;
- if (yych <= '?') goto yy24;
- if (yych <= 'Z') goto yy101;
- goto yy24;
+ if (yych <= 0x7F) {
+ if (yych <= '`') {
+ if (yych <= ']') goto yy263;
+ if (yych <= '_') goto yy115;
+ goto yy263;
} else {
- if (yych <= ']') {
- if (yych <= '\\') goto yy99;
- goto yy24;
- } else {
- if (yych <= '^') goto yy99;
- if (yych <= '_') goto yy101;
- goto yy24;
- }
+ if (yych <= 'z') goto yy115;
+ if (yych == '~') goto yy115;
+ goto yy263;
}
} else {
- if (yych <= '}') {
- if (yych == 'r') goto yy176;
- if (yych <= 'z') goto yy101;
- goto yy24;
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy22;
+ if (yych <= 0xDF) goto yy265;
+ if (yych <= 0xE0) goto yy266;
+ goto yy267;
} else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy99;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy24;
- if (yych <= 0xF4) goto yy4;
- goto yy24;
- }
+ if (yych <= 0xF0) goto yy268;
+ if (yych <= 0xF3) goto yy269;
+ if (yych <= 0xF4) goto yy270;
+ goto yy22;
}
}
}
-yy103:
+yy390:
yych = *++YYCURSOR;
-yy104:
- if (yybm[768+yych] & 32) {
- goto yy103;
+ if (yybm_bol[1280+yych] & 1) {
+ goto yy113;
}
- if (yych == '%') goto yy177;
- goto yy1;
-yy105:
- yyaccept = 10;
+yy391:
+#line 237 "../../lnav/src/data_scanner_re.re"
+ {
+ CAPTURE(DT_COMMENT);
+ if (tf == text_format_t::TF_DIFF) {
+ auto sf = this->to_string_fragment(cap_all);
+ auto split_res = sf.split_when(string_fragment::tag1{'\n'});
+ cap_all.c_end = split_res.first.sf_end;
+ cap_inner.c_end = split_res.first.sf_end;
+ this->ds_next_offset = cap_all.c_end;
+ }
+ return tokenize_result{token_out, cap_all, cap_inner, this->ds_input.data()};
+ }
+#line 8900 "../../lnav/src/data_scanner_re.cc"
+yy392:
+ yych = *++YYCURSOR;
+ if (yych == 'g') goto yy529;
+ goto yy114;
+yy393:
+ yych = *++YYCURSOR;
+ if (yych <= 'Z') {
+ if (yych <= '/') goto yy89;
+ if (yych <= '9') goto yy530;
+ if (yych <= '@') goto yy89;
+ goto yy530;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy89;
+ goto yy530;
+ } else {
+ if (yych <= '`') goto yy89;
+ if (yych <= 'z') goto yy530;
+ goto yy89;
+ }
+ }
+yy394:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '1') {
+ if (yych <= '/') goto yy89;
+ if (yych <= '0') goto yy533;
+ goto yy534;
+ } else {
+ if (yych <= '2') goto yy535;
+ if (yych <= '9') goto yy533;
+ goto yy89;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy137;
+ if (yych <= '^') goto yy89;
+ goto yy137;
+ } else {
+ if (yych <= '`') goto yy89;
+ if (yych <= 'z') goto yy137;
+ goto yy89;
+ }
+ }
+yy395:
+ yyaccept = 23;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '/') {
+ if (yych == '.') goto yy394;
+ goto yy537;
+yy396:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+yy397:
+ if (yych <= '9') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy88;
+ if (yych <= '*') goto yy133;
+ goto yy88;
+ } else {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy133;
+ goto yy393;
+ } else {
+ if (yych <= '.') goto yy538;
+ if (yych <= '/') goto yy123;
+ goto yy396;
+ }
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= ':') goto yy294;
+ if (yych <= '?') goto yy133;
+ if (yych <= '@') goto yy129;
+ goto yy396;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy133;
+ goto yy396;
+ } else {
+ if (yych <= '`') goto yy133;
+ if (yych <= 'z') goto yy396;
+ goto yy133;
+ }
+ }
+ }
+yy398:
+ yyaccept = 23;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
if (yych <= '*') {
- if (yych == '%') goto yy81;
+ if (yych == '%') goto yy397;
+ goto yy274;
} else {
- if (yych == ',') goto yy106;
- if (yych <= '.') goto yy81;
+ if (yych == ',') goto yy274;
+ goto yy397;
}
} else {
if (yych <= '^') {
- if (yych <= '9') goto yy81;
- if (yych <= '?') goto yy106;
- if (yych <= 'Z') goto yy81;
+ if (yych <= '?') goto yy274;
+ if (yych <= 'Z') goto yy397;
+ goto yy274;
} else {
- if (yych == '`') goto yy106;
- if (yych <= 'z') goto yy81;
+ if (yych == '`') goto yy274;
+ if (yych <= 'z') goto yy397;
+ goto yy274;
}
}
-yy106:
-#line 256 "../../lnav/src/data_scanner_re.re"
- { RET(DT_PERCENTAGE); }
-#line 2548 "../../lnav/src/data_scanner_re.cc"
-yy107:
- yyaccept = 0;
+yy399:
+ yyaccept = 14;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '1') {
+ if (yych == '+') goto yy539;
+ if (yych == '-') goto yy540;
+ goto yy397;
+yy400:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'a') {
+ if (yych == 'B') goto yy398;
+ goto yy397;
+ } else {
+ if (yych <= 'b') goto yy398;
+ if (yych == 'i') goto yy541;
+ goto yy397;
+ }
+yy401:
+ yyaccept = 23;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'S') {
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy274;
+ goto yy397;
+ } else {
+ if (yych == '+') goto yy397;
+ goto yy274;
+ }
+ } else {
+ if (yych <= 'A') {
+ if (yych <= ':') goto yy397;
+ if (yych <= '?') goto yy274;
+ goto yy397;
+ } else {
+ if (yych <= 'B') goto yy398;
+ if (yych <= 'R') goto yy397;
+ goto yy398;
+ }
+ }
+ } else {
+ if (yych <= 'b') {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy397;
+ if (yych <= '^') goto yy274;
+ goto yy397;
+ } else {
+ if (yych <= '`') goto yy274;
+ if (yych <= 'a') goto yy397;
+ goto yy398;
+ }
+ } else {
+ if (yych <= 'r') {
+ if (yych == 'i') goto yy542;
+ goto yy397;
+ } else {
+ if (yych <= 's') goto yy398;
+ if (yych <= 'z') goto yy397;
+ goto yy274;
+ }
+ }
+ }
+yy402:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == 'S') goto yy398;
+ if (yych == 's') goto yy398;
+ goto yy397;
+yy403:
+ yyaccept = 23;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '.') goto yy394;
+ if (yych <= '/') goto yy537;
+ if (yych <= '5') goto yy395;
+ goto yy537;
+yy404:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
+ if (yych == '%') goto yy88;
+ if (yych <= '*') goto yy133;
+ goto yy88;
} else {
if (yych <= '.') {
- if (yych <= ',') goto yy4;
- goto yy46;
+ if (yych <= ',') goto yy133;
+ goto yy121;
} else {
- if (yych <= '/') goto yy4;
- if (yych <= '0') goto yy178;
- goto yy179;
+ if (yych <= '/') goto yy123;
+ if (yych <= '9') goto yy543;
+ goto yy294;
}
}
} else {
- if (yych <= 'Z') {
- if (yych <= '9') {
- if (yych <= '2') goto yy180;
- goto yy178;
+ if (yych <= '^') {
+ if (yych <= '@') {
+ if (yych <= '?') goto yy133;
+ goto yy129;
} else {
- if (yych <= '?') goto yy4;
- if (yych <= '@') goto yy96;
- goto yy46;
+ if (yych <= 'F') goto yy543;
+ if (yych <= 'Z') goto yy137;
+ goto yy133;
}
} else {
- if (yych <= '_') {
- if (yych <= '^') goto yy4;
- goto yy46;
+ if (yych <= '`') {
+ if (yych <= '_') goto yy137;
+ goto yy133;
} else {
- if (yych <= '`') goto yy4;
- if (yych <= 'z') goto yy46;
- goto yy4;
+ if (yych <= 'f') goto yy543;
+ if (yych <= 'z') goto yy137;
+ goto yy133;
}
}
}
-yy108:
- yyaccept = 11;
+yy405:
+ yyaccept = 14;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
}
- if (yych <= '9') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy109;
- if (yych <= 0x08) goto yy4;
- if (yych >= '\v') goto yy4;
+ if (yych <= '-') {
+ if (yych == '%') goto yy119;
+ goto yy397;
+ } else {
+ if (yych <= '.') goto yy394;
+ if (yych <= '/') goto yy397;
+ if (yych <= '9') goto yy545;
+ goto yy397;
+ }
+yy406:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ if (yych <= '-') {
+ if (yych == '%') goto yy119;
+ goto yy397;
+ } else {
+ if (yych <= '.') goto yy394;
+ if (yych <= '/') goto yy397;
+ if (yych <= '9') goto yy405;
+ goto yy397;
+ }
+yy407:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ switch (yych) {
+ case '%': goto yy119;
+ case '.': goto yy394;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4': goto yy405;
+ case '5': goto yy546;
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy545;
+ default: goto yy397;
+ }
+yy408:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') goto yy278;
+ if (yych <= 'Z') goto yy547;
+ if (yych <= '`') goto yy278;
+ if (yych <= 'z') goto yy547;
+ goto yy278;
+yy409:
+ yych = *++YYCURSOR;
+ if (yych <= 'Z') {
+ if (yych <= '/') goto yy89;
+ if (yych <= '9') goto yy548;
+ if (yych <= '@') goto yy89;
+ goto yy137;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy89;
+ goto yy137;
+ } else {
+ if (yych <= '`') goto yy89;
+ if (yych <= 'z') goto yy137;
+ goto yy89;
+ }
+ }
+yy410:
+ yyaccept = 12;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '7') {
+ if (yych <= '*') {
+ if (yych <= ' ') {
+ if (yych <= 0x1F) goto yy125;
+ goto yy550;
} else {
- if (yych <= 0x1A) {
- if (yych >= 0x0E) goto yy4;
- } else {
- if (yych <= 0x1B) goto yy109;
- if (yych <= 0x1F) goto yy4;
- }
+ if (yych == '%') goto yy119;
+ goto yy125;
}
} else {
- if (yych <= ',') {
- if (yych <= '%') {
- if (yych <= '$') goto yy4;
- goto yy105;
- } else {
- if (yych == '+') goto yy80;
- }
+ if (yych <= '-') {
+ if (yych <= '+') goto yy88;
+ if (yych <= ',') goto yy125;
+ goto yy551;
} else {
- if (yych <= '.') {
- if (yych <= '-') goto yy181;
- goto yy182;
- } else {
- if (yych <= '/') goto yy183;
- if (yych <= '7') goto yy184;
- goto yy185;
- }
+ if (yych <= '.') goto yy409;
+ if (yych <= '/') goto yy552;
+ goto yy553;
}
}
} else {
- if (yych <= '_') {
- if (yych <= 'D') {
- if (yych <= ':') goto yy186;
- if (yych <= '?') goto yy109;
- if (yych <= '@') goto yy96;
- goto yy187;
+ if (yych <= 'Z') {
+ if (yych <= '?') {
+ if (yych <= '9') goto yy554;
+ if (yych <= ':') goto yy555;
+ goto yy125;
} else {
- if (yych <= 'F') {
- if (yych <= 'E') goto yy188;
- goto yy187;
- } else {
- if (yych <= 'Z') goto yy115;
- if (yych >= '_') goto yy46;
- }
+ if (yych <= '@') goto yy129;
+ if (yych <= 'F') goto yy556;
+ goto yy134;
}
} else {
- if (yych <= 'z') {
- if (yych <= 'd') {
- if (yych >= 'a') goto yy187;
- } else {
- if (yych <= 'e') goto yy188;
- if (yych <= 'f') goto yy187;
- goto yy115;
- }
+ if (yych <= '`') {
+ if (yych == '_') goto yy137;
+ goto yy125;
} else {
- if (yych <= 0x7F) {
- if (yych >= 0x7F) goto yy4;
- } else {
- if (yych <= 0xC1) goto yy109;
- if (yych <= 0xF4) goto yy4;
- }
+ if (yych <= 'f') goto yy556;
+ if (yych <= 'z') goto yy134;
+ goto yy125;
}
}
}
-yy109:
-#line 255 "../../lnav/src/data_scanner_re.re"
- { RET(DT_OCTAL_NUMBER); }
-#line 2665 "../../lnav/src/data_scanner_re.cc"
-yy110:
- yyaccept = 6;
+yy411:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
- }
if (yych <= '9') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy26;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy26;
- goto yy4;
+ if (yych <= '*') {
+ if (yych <= ' ') {
+ if (yych <= 0x1F) goto yy127;
+ goto yy550;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') goto yy26;
- goto yy4;
- } else {
- if (yych <= 0x1B) goto yy26;
- if (yych <= 0x1F) goto yy4;
- goto yy26;
- }
+ if (yych == '%') goto yy119;
+ goto yy127;
}
} else {
- if (yych <= '+') {
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy105;
- if (yych <= '*') goto yy26;
- goto yy80;
+ if (yych <= '-') {
+ if (yych <= '+') goto yy88;
+ if (yych <= ',') goto yy127;
+ goto yy551;
} else {
- if (yych <= '-') {
- if (yych <= ',') goto yy26;
- goto yy181;
- } else {
- if (yych <= '.') goto yy182;
- if (yych <= '/') goto yy183;
- goto yy185;
- }
+ if (yych <= '.') goto yy409;
+ if (yych <= '/') goto yy552;
+ goto yy554;
}
}
} else {
- if (yych <= '_') {
- if (yych <= 'D') {
- if (yych <= ':') goto yy186;
- if (yych <= '?') goto yy26;
- if (yych <= '@') goto yy96;
- goto yy187;
+ if (yych <= 'Z') {
+ if (yych <= '?') {
+ if (yych <= ':') goto yy555;
+ goto yy127;
} else {
- if (yych <= 'F') {
- if (yych <= 'E') goto yy188;
- goto yy187;
- } else {
- if (yych <= 'Z') goto yy115;
- if (yych <= '^') goto yy26;
- goto yy46;
- }
+ if (yych <= '@') goto yy129;
+ if (yych <= 'F') goto yy556;
+ goto yy134;
}
} else {
- if (yych <= 'z') {
- if (yych <= 'd') {
- if (yych <= '`') goto yy26;
- goto yy187;
- } else {
- if (yych <= 'e') goto yy188;
- if (yych <= 'f') goto yy187;
- goto yy115;
- }
+ if (yych <= '`') {
+ if (yych == '_') goto yy137;
+ goto yy127;
} else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy26;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy26;
- if (yych <= 0xF4) goto yy4;
- goto yy26;
- }
+ if (yych <= 'f') goto yy556;
+ if (yych <= 'z') goto yy134;
+ goto yy127;
}
}
}
-yy111:
+yy412:
yych = *++YYCURSOR;
if (yych <= ':') {
- if (yych <= '.') goto yy1;
- if (yych <= '/') goto yy189;
- if (yych <= '9') goto yy190;
- goto yy191;
+ if (yych <= '.') goto yy73;
+ if (yych <= '/') goto yy286;
+ if (yych <= '9') goto yy289;
+ goto yy288;
} else {
if (yych <= 'F') {
- if (yych <= '@') goto yy1;
- goto yy192;
+ if (yych <= '@') goto yy73;
+ goto yy289;
} else {
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy192;
- goto yy1;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy289;
+ goto yy73;
}
}
-yy112:
- yyaccept = 12;
+yy413:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '.') {
- if (yych <= 0x1F) {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy113;
- if (yych <= 0x08) goto yy4;
- if (yych >= '\v') goto yy4;
+ if (yych <= '?') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy135;
+ if (yych <= '*') goto yy127;
+ goto yy135;
+ } else {
+ if (yych <= '/') {
+ if (yych <= ',') goto yy127;
+ goto yy135;
} else {
- if (yych <= '\r') goto yy113;
- if (yych != 0x1B) goto yy4;
+ if (yych <= '9') goto yy556;
+ if (yych <= ':') goto yy555;
+ goto yy127;
}
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') goto yy135;
+ if (yych <= 'F') goto yy556;
+ if (yych <= 'Z') goto yy135;
+ goto yy127;
} else {
- if (yych <= '*') {
- if (yych <= '#') goto yy113;
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy80;
+ if (yych <= '`') {
+ if (yych <= '_') goto yy135;
+ goto yy127;
} else {
- if (yych <= '+') goto yy80;
- if (yych <= ',') goto yy113;
- if (yych <= '-') goto yy181;
- goto yy46;
+ if (yych <= 'f') goto yy556;
+ if (yych <= 'z') goto yy135;
+ goto yy127;
}
}
+ }
+yy414:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy557;
+ if (yych <= ':') goto yy425;
+ goto yy73;
} else {
- if (yych <= '^') {
- if (yych <= '?') {
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy187;
- if (yych <= ':') goto yy193;
+ if (yych <= 'F') goto yy558;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy558;
+ goto yy73;
+ }
+yy415:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy558;
+ if (yych <= ':') goto yy425;
+ goto yy73;
+ } else {
+ if (yych <= 'F') goto yy558;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy558;
+ goto yy73;
+ }
+yy416:
+ yych = *++YYCURSOR;
+yy417:
+ if (yybm_bol[768+yych] & 32) {
+ goto yy416;
+ }
+ if (yych <= 0xC1) {
+ if (yych <= ')') {
+ if (yych <= '"') goto yy73;
+ if (yych <= '&') goto yy559;
+ goto yy73;
+ } else {
+ if (yych <= 'Z') goto yy559;
+ if (yych <= ']') goto yy73;
+ if (yych <= 'z') goto yy559;
+ goto yy73;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy418;
+ if (yych <= 0xE0) goto yy419;
+ goto yy420;
+ } else {
+ if (yych <= 0xF0) goto yy421;
+ if (yych <= 0xF3) goto yy422;
+ if (yych <= 0xF4) goto yy423;
+ goto yy73;
+ }
+ }
+yy418:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy416;
+ goto yy73;
+yy419:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy73;
+ if (yych <= 0xBF) goto yy418;
+ goto yy73;
+yy420:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy418;
+ goto yy73;
+yy421:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy73;
+ if (yych <= 0xBF) goto yy420;
+ goto yy73;
+yy422:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy420;
+ goto yy73;
+yy423:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0x8F) goto yy420;
+ goto yy73;
+yy424:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy561;
+ if (yych <= ':') goto yy562;
+ goto yy73;
+ } else {
+ if (yych <= 'F') goto yy561;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy561;
+ goto yy73;
+ }
+yy425:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy563;
+ if (yych <= ':') goto yy564;
+ goto yy73;
+ } else {
+ if (yych <= 'F') goto yy563;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy563;
+ goto yy73;
+ }
+yy426:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy561;
+ if (yych <= ':') goto yy425;
+ goto yy73;
+ } else {
+ if (yych <= 'F') goto yy561;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy561;
+ goto yy73;
+ }
+yy427:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '_') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= ',') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ yyt2 = YYCURSOR;
+ goto yy566;
} else {
- if (yych <= '@') goto yy96;
- if (yych <= 'F') goto yy187;
- if (yych <= 'Z') goto yy115;
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ if (yych <= '9') goto yy567;
+ yyt2 = YYCURSOR;
+ goto yy568;
}
} else {
+ if (yych <= 'F') {
+ if (yych <= '?') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ goto yy569;
+ } else {
+ if (yych <= 'Z') goto yy277;
+ if (yych <= '^') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt2 = YYCURSOR;
+ goto yy431;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
if (yych <= 'z') {
- if (yych <= '_') goto yy46;
- if (yych <= '`') goto yy113;
- if (yych <= 'f') goto yy187;
- goto yy115;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 'f') goto yy569;
+ goto yy277;
} else {
if (yych <= 0x7F) {
- if (yych >= 0x7F) goto yy4;
- } else {
- if (yych <= 0xC1) goto yy113;
- if (yych <= 0xF4) goto yy4;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy133;
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
}
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy133;
}
}
}
-yy113:
-#line 258 "../../lnav/src/data_scanner_re.re"
- { RET(DT_HEX_NUMBER); }
-#line 2817 "../../lnav/src/data_scanner_re.cc"
-yy114:
- yyaccept = 12;
+yy428:
+ yyaccept = 14;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '.') {
- if (yych <= 0x1F) {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy113;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy113;
- goto yy4;
+ if (yych <= '_') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= ',') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ yyt2 = YYCURSOR;
+ goto yy566;
} else {
- if (yych <= '\r') goto yy113;
- if (yych == 0x1B) goto yy113;
- goto yy4;
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ if (yych <= '9') goto yy570;
+ yyt2 = YYCURSOR;
+ goto yy568;
}
} else {
- if (yych <= '*') {
- if (yych <= '#') goto yy113;
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy80;
- goto yy113;
+ if (yych <= 'F') {
+ if (yych <= '?') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ goto yy569;
} else {
- if (yych <= '+') goto yy194;
- if (yych <= ',') goto yy113;
- if (yych <= '-') goto yy195;
- goto yy46;
+ if (yych <= 'Z') goto yy277;
+ if (yych <= '^') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt2 = YYCURSOR;
+ goto yy431;
}
}
} else {
- if (yych <= '^') {
- if (yych <= '?') {
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy187;
- if (yych <= ':') goto yy193;
- goto yy113;
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 'f') goto yy569;
+ goto yy277;
} else {
- if (yych <= '@') goto yy96;
- if (yych <= 'F') goto yy187;
- if (yych >= '[') goto yy113;
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy133;
+ yyt2 = YYCURSOR;
+ goto yy313;
}
} else {
- if (yych <= 'z') {
- if (yych <= '_') goto yy46;
- if (yych <= '`') goto yy113;
- if (yych <= 'f') goto yy187;
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
} else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy113;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy113;
- if (yych <= 0xF4) goto yy4;
- goto yy113;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
}
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy133;
}
}
}
-yy115:
- yyaccept = 0;
+yy429:
+ yyaccept = 14;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 64) {
- goto yy115;
- }
- if (yych <= '.') {
- if (yych <= 0x1B) {
- if (yych <= '\n') {
- if (yych <= 0x00) goto yy5;
- if (yych <= 0x08) goto yy3;
- goto yy5;
+ if (yych <= '^') {
+ if (yych <= '5') {
+ if (yych <= '.') {
+ if (yych <= ',') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ yyt2 = YYCURSOR;
+ goto yy566;
} else {
- if (yych == '\r') goto yy5;
- if (yych <= 0x1A) goto yy3;
- goto yy5;
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ if (yych <= '4') goto yy570;
+ goto yy571;
}
} else {
- if (yych <= '%') {
- if (yych <= 0x1F) goto yy3;
- if (yych <= '#') goto yy5;
- if (yych <= '$') goto yy3;
- goto yy80;
+ if (yych <= '?') {
+ if (yych <= '9') goto yy567;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy568;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
} else {
- if (yych == '+') goto yy80;
- if (yych <= ',') goto yy5;
- goto yy46;
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ if (yych <= 'F') goto yy569;
+ if (yych <= 'Z') goto yy277;
+ yyt2 = YYCURSOR;
+ goto yy305;
}
}
} else {
- if (yych <= 0x7F) {
- if (yych <= '@') {
- if (yych <= '/') goto yy3;
- if (yych <= ':') goto yy148;
- if (yych <= '?') goto yy5;
- goto yy96;
+ if (yych <= 0xC1) {
+ if (yych <= 'f') {
+ if (yych <= '_') {
+ yyt2 = YYCURSOR;
+ goto yy431;
+ }
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy569;
} else {
- if (yych == '_') goto yy46;
- if (yych <= '~') goto yy5;
- goto yy3;
+ if (yych <= 'z') goto yy277;
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy133;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xC1) goto yy5;
- if (yych <= 0xDF) goto yy56;
- if (yych <= 0xE0) goto yy57;
- goto yy58;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ yyt2 = YYCURSOR;
+ goto yy315;
} else {
- if (yych <= 0xF0) goto yy59;
- if (yych <= 0xF3) goto yy60;
- if (yych <= 0xF4) goto yy61;
- goto yy5;
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy316;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy133;
}
}
}
-yy116:
- yyaccept = 0;
+yy430:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '`') {
+ if (yych <= '?') {
+ if (yych <= '/') {
+ if (yych <= ',') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt2 = YYCURSOR;
+ goto yy565;
+ } else {
+ if (yych <= '9') goto yy569;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy568;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ if (yych <= 'F') goto yy569;
+ goto yy277;
+ } else {
+ if (yych != '_') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt2 = YYCURSOR;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= 'f') goto yy569;
+ goto yy277;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy133;
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy133;
+ }
+ }
+ }
+yy431:
+ yyaccept = 26;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'Z') {
+ if (yych <= ',') goto yy306;
+ if (yych <= ':') goto yy278;
+ if (yych <= '?') goto yy306;
+ goto yy278;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy306;
+ goto yy278;
+ } else {
+ if (yych <= '`') goto yy306;
+ if (yych <= 'z') goto yy278;
+ goto yy306;
+ }
+ }
+yy432:
+ yych = *++YYCURSOR;
+ if (yybm_bol[768+yych] & 8) {
+ goto yy378;
+ }
+ if (yych <= '@') {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy73;
+ goto yy214;
+ } else {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy290;
+ goto yy73;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy290;
+ if (yych <= '^') goto yy73;
+ goto yy277;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'z') goto yy290;
+ goto yy73;
+ }
+ }
+yy433:
+ yych = *++YYCURSOR;
+ if (yybm_bol[768+yych] & 8) {
+ goto yy378;
+ }
+ if (yych <= '@') {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy73;
+ goto yy214;
+ } else {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy290;
+ goto yy73;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy572;
+ if (yych <= '^') goto yy73;
+ goto yy277;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'z') goto yy572;
+ goto yy73;
+ }
+ }
+yy434:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ switch (yych) {
+ case '%': goto yy119;
+ case '+':
+ case '-':
+ case '/':
+ case ':':
+ case '@':
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy397;
+ case '.': goto yy394;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy573;
+ case 'B':
+ case 'S':
+ case 'b':
+ case 's': goto yy574;
+ case 'E':
+ case 'e': goto yy575;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy576;
+ case 'm': goto yy577;
+ case 'p':
+ case 'u': goto yy578;
+ default: goto yy24;
+ }
+yy435:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ switch (yych) {
+ case '%': goto yy119;
+ case '+':
+ case '-':
+ case '/':
+ case ':':
+ case '@':
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy397;
+ case '.': goto yy394;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy434;
+ case 'B':
+ case 'S':
+ case 'b':
+ case 's': goto yy574;
+ case 'E':
+ case 'e': goto yy575;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy576;
+ case 'm': goto yy577;
+ case 'p':
+ case 'u': goto yy578;
+ default: goto yy24;
+ }
+yy436:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ switch (yych) {
+ case '%': goto yy119;
+ case '+':
+ case '-':
+ case '/':
+ case ':':
+ case '@':
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy397;
+ case '.': goto yy394;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4': goto yy434;
+ case '5': goto yy579;
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy573;
+ case 'B':
+ case 'S':
+ case 'b':
+ case 's': goto yy574;
+ case 'E':
+ case 'e': goto yy575;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy576;
+ case 'm': goto yy577;
+ case 'p':
+ case 'u': goto yy578;
+ default: goto yy24;
+ }
+yy437:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ switch (yych) {
+ case ' ': goto yy550;
+ case '%': goto yy119;
+ case '+': goto yy88;
+ case '-': goto yy551;
+ case '.': goto yy443;
+ case '/': goto yy552;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy580;
+ case ':': goto yy555;
+ case '@': goto yy129;
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f': goto yy556;
+ case 'B':
+ case 'b': goto yy581;
+ case 'E':
+ case 'e': goto yy582;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy132;
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy134;
+ case 'S':
+ case 's': goto yy136;
+ case '_': goto yy137;
+ case 'm': goto yy139;
+ case 'p':
+ case 'u': goto yy140;
+ default: goto yy24;
+ }
+yy438:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '?') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy135;
+ if (yych <= '*') goto yy24;
+ goto yy135;
+ } else {
+ if (yych <= '/') {
+ if (yych <= ',') goto yy24;
+ goto yy135;
+ } else {
+ if (yych <= '9') goto yy556;
+ if (yych <= ':') goto yy555;
+ goto yy24;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') goto yy135;
+ if (yych <= 'F') goto yy556;
+ if (yych <= 'Z') goto yy135;
+ goto yy24;
+ } else {
+ if (yych <= '`') {
+ if (yych <= '_') goto yy135;
+ goto yy24;
+ } else {
+ if (yych <= 'f') goto yy556;
+ if (yych <= 'z') goto yy135;
+ goto yy24;
+ }
+ }
+ }
+yy439:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ':') {
if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
+ if (yych == '%') goto yy135;
+ if (yych <= '*') goto yy127;
+ goto yy302;
} else {
- if (yych <= '.') {
- if (yych <= ',') goto yy4;
- goto yy46;
+ if (yych <= '-') {
+ if (yych <= ',') goto yy127;
} else {
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy196;
- goto yy148;
+ if (yych <= '/') goto yy135;
+ if (yych <= '9') goto yy556;
+ goto yy555;
}
}
} else {
if (yych <= '^') {
if (yych <= '@') {
- if (yych <= '?') goto yy4;
- goto yy96;
+ if (yych <= '?') goto yy127;
+ goto yy135;
} else {
- if (yych <= 'F') goto yy196;
- if (yych <= 'Z') goto yy115;
- goto yy4;
+ if (yych <= 'F') goto yy556;
+ if (yych <= 'Z') goto yy135;
+ goto yy127;
}
} else {
if (yych <= '`') {
- if (yych <= '_') goto yy46;
- goto yy4;
+ if (yych <= '_') goto yy135;
+ goto yy127;
} else {
- if (yych <= 'f') goto yy196;
- if (yych <= 'z') goto yy115;
- goto yy4;
+ if (yych <= 'f') goto yy556;
+ if (yych <= 'z') goto yy135;
+ goto yy127;
}
}
}
-yy117:
- yyaccept = 6;
+yy440:
+ yych = *++YYCURSOR;
+ if (yych <= 'Z') {
+ if (yych <= '/') goto yy89;
+ if (yych <= '9') goto yy583;
+ if (yych <= '@') goto yy89;
+ goto yy137;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy89;
+ goto yy137;
+ } else {
+ if (yych <= '`') goto yy89;
+ if (yych <= 'z') goto yy137;
+ goto yy89;
+ }
+ }
+yy441:
+ yyaccept = 3;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
+ switch (yych) {
+ case '%':
+ case '+':
+ case '-':
+ case '.':
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'E':
+ case 'F':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'e':
+ case 'f':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy88;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy441;
+ case '@': goto yy90;
+ case 'B':
+ case 'S':
+ case 'b':
+ case 's': goto yy585;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy586;
+ case 'm': goto yy587;
+ case 'p':
+ case 'u': goto yy588;
+ default: goto yy24;
}
- if (yych <= '9') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy26;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy26;
- goto yy4;
+yy442:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ switch (yych) {
+ case '%':
+ case '+':
+ case '-':
+ case '.':
+ case '/':
+ case ':':
+ case '@':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy138;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy589;
+ case 'A':
+ case 'B':
+ case 'C':
+ case 'D':
+ case 'E':
+ case 'F':
+ case 'a':
+ case 'b':
+ case 'c':
+ case 'd':
+ case 'e':
+ case 'f': goto yy543;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy590;
+ case 'S':
+ case 's': goto yy591;
+ case 'm': goto yy592;
+ case 'p':
+ case 'u': goto yy593;
+ default: goto yy24;
+ }
+yy443:
+ yych = *++YYCURSOR;
+ if (yych <= 'Z') {
+ if (yych <= '/') goto yy89;
+ if (yych <= '9') goto yy594;
+ if (yych <= '@') goto yy89;
+ goto yy137;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy89;
+ goto yy137;
+ } else {
+ if (yych <= '`') goto yy89;
+ if (yych <= 'z') goto yy137;
+ goto yy89;
+ }
+ }
+yy444:
+ yyaccept = 27;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '1') {
+ if (yych <= '/') {
+ yyt2 = yyt1;
+ goto yy306;
+ }
+ if (yych <= '0') goto yy596;
+ goto yy597;
+ } else {
+ if (yych <= '2') goto yy598;
+ if (yych <= '9') goto yy596;
+ yyt2 = yyt1;
+ goto yy306;
+ }
+yy445:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt1 = YYCURSOR;
+ goto yy444;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') goto yy26;
- goto yy4;
- } else {
- if (yych <= 0x1B) goto yy26;
- if (yych <= 0x1F) goto yy4;
- goto yy26;
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
+ if (yych <= '9') goto yy599;
+ yyt1 = YYCURSOR;
}
} else {
- if (yych <= '+') {
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy105;
- if (yych <= '*') goto yy26;
- goto yy80;
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy599;
} else {
- if (yych <= '-') {
- if (yych <= ',') goto yy26;
- goto yy181;
- } else {
- if (yych <= '.') goto yy182;
- if (yych <= '/') goto yy183;
- goto yy197;
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
+ goto yy599;
}
}
} else {
- if (yych <= '_') {
- if (yych <= 'D') {
- if (yych <= ':') goto yy186;
- if (yych <= '?') goto yy26;
- if (yych <= '@') goto yy96;
- goto yy187;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
} else {
- if (yych <= 'F') {
- if (yych <= 'E') goto yy188;
- goto yy187;
- } else {
- if (yych <= 'Z') goto yy115;
- if (yych <= '^') goto yy26;
- goto yy46;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
}
+ yyt2 = YYCURSOR;
+ goto yy314;
}
} else {
- if (yych <= 'z') {
- if (yych <= 'd') {
- if (yych <= '`') goto yy26;
- goto yy187;
- } else {
- if (yych <= 'e') goto yy188;
- if (yych <= 'f') goto yy187;
- goto yy115;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
}
+ yyt2 = YYCURSOR;
+ goto yy316;
} else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy26;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy26;
- if (yych <= 0xF4) goto yy4;
- goto yy26;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
}
+ goto yy73;
}
}
}
-yy118:
- yyaccept = 6;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
- }
+yy446:
+ yych = *++YYCURSOR;
if (yych <= '9') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy26;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy26;
- goto yy4;
+ if (yych == ' ') {
+ yyt2 = yyt1;
+ goto yy305;
+ }
+ if (yych <= '/') goto yy73;
+ goto yy600;
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy73;
+ goto yy600;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy600;
+ goto yy73;
+ }
+ }
+yy447:
+ yych = *++YYCURSOR;
+ if (yych <= 'z') {
+ if (yych <= '@') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy599;
+ if (yych <= ':') {
+ yyt1 = YYCURSOR;
+ goto yy446;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= 'F') goto yy599;
+ goto yy73;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') goto yy26;
- goto yy4;
- } else {
- if (yych <= 0x1B) goto yy26;
- if (yych <= 0x1F) goto yy4;
- goto yy26;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
+ if (yych <= 'f') goto yy599;
+ goto yy73;
}
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
} else {
- if (yych <= ',') {
- if (yych <= '%') {
- if (yych <= '$') goto yy4;
- goto yy105;
- } else {
- if (yych == '+') goto yy80;
- goto yy26;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
}
+ yyt2 = YYCURSOR;
+ goto yy316;
} else {
- if (yych <= '.') {
- if (yych <= '-') goto yy181;
- goto yy182;
- } else {
- if (yych <= '/') goto yy183;
- if (yych <= '5') goto yy197;
- goto yy185;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy448:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt1 = YYCURSOR;
+ goto yy444;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy601;
+ yyt1 = YYCURSOR;
+ goto yy446;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy599;
+ } else {
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
+ goto yy599;
}
}
} else {
- if (yych <= '_') {
- if (yych <= 'D') {
- if (yych <= ':') goto yy186;
- if (yych <= '?') goto yy26;
- if (yych <= '@') goto yy96;
- goto yy187;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
} else {
- if (yych <= 'F') {
- if (yych <= 'E') goto yy188;
- goto yy187;
- } else {
- if (yych <= 'Z') goto yy115;
- if (yych <= '^') goto yy26;
- goto yy46;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
}
+ yyt2 = YYCURSOR;
+ goto yy314;
}
} else {
- if (yych <= 'z') {
- if (yych <= 'd') {
- if (yych <= '`') goto yy26;
- goto yy187;
- } else {
- if (yych <= 'e') goto yy188;
- if (yych <= 'f') goto yy187;
- goto yy115;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
}
+ yyt2 = YYCURSOR;
+ goto yy316;
} else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy26;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy26;
- if (yych <= 0xF4) goto yy4;
- goto yy26;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
}
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
}
}
}
-yy119:
+yy449:
yych = *++YYCURSOR;
if (yych <= '`') {
if (yych <= '9') {
- if (yych <= '0') {
- if (yych <= '/') {
+ if (yych <= '.') {
+ if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
}
- goto yy200;
+ yyt1 = YYCURSOR;
+ goto yy444;
} else {
- if (yych <= '1') goto yy201;
- if (yych <= '2') goto yy202;
- goto yy200;
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '5') goto yy601;
+ goto yy599;
}
} else {
- if (yych <= 'E') {
- if (yych <= ':') goto yy1;
- if (yych <= '@') {
- yyt2 = YYCURSOR;
- goto yy198;
+ if (yych <= '@') {
+ if (yych <= ':') {
+ yyt1 = YYCURSOR;
+ goto yy446;
}
- goto yy203;
+ yyt2 = YYCURSOR;
+ goto yy305;
} else {
- if (yych <= 'F') goto yy204;
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'F') goto yy599;
+ if (yych <= 'Z') goto yy73;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
}
}
} else {
if (yych <= 0xDF) {
if (yych <= 'z') {
- if (yych <= 'e') goto yy203;
- if (yych <= 'f') goto yy204;
- goto yy1;
+ if (yych <= 'f') goto yy599;
+ goto yy73;
} else {
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
}
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy73;
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy313;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy314;
}
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy315;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy316;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy317;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy318;
}
- goto yy1;
+ goto yy73;
}
}
}
-yy120:
+yy450:
yych = *++YYCURSOR;
- if (yych <= '@') {
- if (yych <= '-') {
- if (yych <= ',') goto yy1;
- goto yy211;
+ if (yych <= 'f') {
+ if (yych <= 'E') {
+ if (yych <= '9') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy599;
+ } else {
+ if (yych <= ':') {
+ yyt1 = YYCURSOR;
+ goto yy446;
+ }
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy599;
+ }
} else {
- if (yych <= '/') goto yy1;
- if (yych <= ':') goto yy211;
- goto yy1;
+ if (yych <= 'Z') {
+ if (yych <= 'F') goto yy602;
+ goto yy73;
+ } else {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 'e') goto yy599;
+ goto yy602;
+ }
}
} else {
- if (yych <= '_') {
- if (yych <= 'Z') goto yy211;
- if (yych <= '^') goto yy1;
- goto yy211;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
} else {
- if (yych <= '`') goto yy1;
- if (yych <= 'z') goto yy211;
- goto yy1;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
}
}
-yy121:
+yy451:
yych = *++YYCURSOR;
- if (yybm[512+yych] & 16) {
- goto yy214;
+yy452:
+ if (yych <= ',') {
+ if (yych <= 0x1F) {
+ if (yych <= '\t') {
+ if (yych <= 0x08) goto yy73;
+ goto yy451;
+ } else {
+ if (yych == '\r') goto yy451;
+ goto yy73;
+ }
+ } else {
+ if (yych <= '"') {
+ if (yych <= ' ') goto yy451;
+ if (yych <= '!') goto yy73;
+ } else {
+ if (yych == '\'') goto yy454;
+ goto yy73;
+ }
+ }
+ } else {
+ if (yych <= '@') {
+ if (yych <= ':') {
+ if (yych <= '-') goto yy603;
+ if (yych <= '/') goto yy73;
+ goto yy603;
+ } else {
+ if (yych == '>') goto yy457;
+ goto yy73;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy603;
+ if (yych <= '^') goto yy73;
+ goto yy603;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'z') goto yy603;
+ goto yy73;
+ }
+ }
}
- goto yy213;
-yy122:
+yy453:
yych = *++YYCURSOR;
- if (yych <= '\r') {
- if (yych == '\t') goto yy1;
- if (yych <= '\f') goto yy219;
- goto yy1;
+ if (yybm_bol[512+yych] & 4) {
+ goto yy604;
+ }
+ if (yych <= 0xE0) {
+ if (yych <= '\\') {
+ if (yych <= '"') goto yy73;
+ goto yy605;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy606;
+ goto yy607;
+ }
} else {
- if (yych <= ' ') {
- if (yych <= 0x1F) goto yy219;
- goto yy1;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy608;
+ goto yy609;
} else {
- if (yych == '>') goto yy1;
- goto yy219;
+ if (yych <= 0xF3) goto yy610;
+ if (yych <= 0xF4) goto yy611;
+ goto yy73;
}
}
-yy123:
+yy454:
yych = *++YYCURSOR;
- if (yych <= '@') {
- if (yych <= '-') {
- if (yych <= ',') goto yy1;
- goto yy220;
+ if (yybm_bol[512+yych] & 8) {
+ goto yy612;
+ }
+ if (yych <= 0xE0) {
+ if (yych <= '\\') {
+ if (yych <= '\'') goto yy73;
+ goto yy613;
} else {
- if (yych <= '/') goto yy1;
- if (yych <= ':') goto yy220;
- goto yy1;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy614;
+ goto yy615;
}
} else {
- if (yych <= '_') {
- if (yych <= 'Z') goto yy220;
- if (yych <= '^') goto yy1;
- goto yy220;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy616;
+ goto yy617;
} else {
- if (yych <= '`') goto yy1;
- if (yych <= 'z') goto yy220;
- goto yy1;
+ if (yych <= 0xF3) goto yy618;
+ if (yych <= 0xF4) goto yy619;
+ goto yy73;
}
}
-yy124:
- yyaccept = 13;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 128) {
- goto yy137;
+yy455:
+ yych = *++YYCURSOR;
+ if (yybm_bol[768+yych] & 64) {
+ goto yy455;
}
if (yych <= '*') {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy225;
- if (yych <= 0x08) goto yy125;
- if (yych <= '\n') goto yy225;
+ if (yych <= 0x1F) {
+ if (yych <= '\t') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= 0x08) goto yy620;
+ goto yy622;
+ } else {
+ if (yych == '\r') goto yy622;
+ goto yy620;
+ }
} else {
- if (yych <= 0x1F) {
- if (yych <= '\r') goto yy225;
+ if (yych <= '"') {
+ if (yych <= ' ') goto yy622;
+ if (yych <= '!') goto yy620;
+ goto yy623;
} else {
- if (yych <= '"') goto yy225;
- if (yych >= '\'') goto yy225;
+ if (yych == '\'') goto yy624;
+ if (yych <= ')') goto yy620;
+ goto yy73;
}
}
} else {
- if (yych <= '.') {
- if (yych == ',') goto yy225;
- if (yych >= '.') {
- yyt4 = YYCURSOR;
- goto yy226;
+ if (yych <= 0xC1) {
+ if (yych <= '<') {
+ if (yych == '-') goto yy625;
+ goto yy620;
+ } else {
+ if (yych <= '=') goto yy626;
+ if (yych <= '>') goto yy627;
+ if (yych <= 0x7F) goto yy620;
+ goto yy73;
}
} else {
- if (yych <= ';') {
- if (yych >= ':') goto yy225;
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy628;
+ if (yych <= 0xE0) goto yy629;
+ goto yy630;
} else {
- if (yych == '?') goto yy225;
+ if (yych <= 0xF0) goto yy631;
+ if (yych <= 0xF3) goto yy632;
+ if (yych <= 0xF4) goto yy633;
+ goto yy73;
}
}
}
-yy125:
-#line 155 "../../lnav/src/data_scanner_re.re"
+yy456:
+ yych = *++YYCURSOR;
+ if (yych <= '-') {
+ if (yych <= ' ') {
+ if (yych <= '\f') {
+ if (yych == '\t') goto yy634;
+ goto yy73;
+ } else {
+ if (yych <= '\r') goto yy634;
+ if (yych <= 0x1F) goto yy73;
+ goto yy634;
+ }
+ } else {
+ if (yych <= '&') {
+ if (yych == '"') goto yy453;
+ goto yy73;
+ } else {
+ if (yych <= '\'') goto yy454;
+ if (yych <= ',') goto yy73;
+ goto yy456;
+ }
+ }
+ } else {
+ if (yych <= '@') {
+ if (yych <= '<') {
+ if (yych <= '/') goto yy73;
+ if (yych <= ':') goto yy456;
+ goto yy73;
+ } else {
+ if (yych <= '=') goto yy635;
+ if (yych >= '?') goto yy73;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy456;
+ if (yych <= '^') goto yy73;
+ goto yy456;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'z') goto yy456;
+ goto yy73;
+ }
+ }
+ }
+yy457:
+ ++YYCURSOR;
+yy458:
+#line 314 "../../lnav/src/data_scanner_re.re"
{
- CAPTURE(DT_WORD);
+ RET(DT_XML_DECL_TAG);
}
-#line 3304 "../../lnav/src/data_scanner_re.cc"
-yy126:
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
+#line 11024 "../../lnav/src/data_scanner_re.cc"
+yy459:
+ yych = *++YYCURSOR;
if (yych <= ':') {
- if (yych <= ',') {
- if (yych <= '%') {
- if (yych <= '$') goto yy4;
- goto yy80;
+ if (yych <= 0x1F) {
+ if (yych <= '\t') {
+ if (yych <= 0x08) goto yy73;
+ goto yy636;
} else {
- if (yych == '+') goto yy80;
- goto yy4;
+ if (yych == '\r') goto yy636;
+ goto yy73;
}
} else {
- if (yych <= '.') {
- if (yych <= '-') goto yy181;
- goto yy46;
+ if (yych <= '-') {
+ if (yych <= ' ') goto yy636;
+ if (yych <= ',') goto yy73;
+ goto yy459;
} else {
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy227;
- goto yy193;
+ if (yych <= '.') goto yy73;
+ if (yych <= '/') goto yy324;
+ goto yy459;
}
}
} else {
- if (yych <= '^') {
- if (yych <= '@') {
- if (yych <= '?') goto yy4;
- goto yy96;
+ if (yych <= '@') {
+ if (yych <= '=') {
+ if (yych <= '<') goto yy73;
+ goto yy461;
} else {
- if (yych <= 'F') goto yy227;
- if (yych <= 'Z') goto yy115;
- goto yy4;
+ if (yych <= '>') goto yy325;
+ if (yych <= '?') goto yy324;
+ goto yy73;
}
} else {
- if (yych <= '`') {
- if (yych <= '_') goto yy46;
- goto yy4;
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy459;
+ if (yych <= '^') goto yy73;
+ goto yy459;
} else {
- if (yych <= 'f') goto yy227;
- if (yych <= 'z') goto yy115;
- goto yy4;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'z') goto yy459;
+ goto yy73;
}
}
}
-yy127:
+yy460:
yych = *++YYCURSOR;
- if (yych <= '@') {
- if (yych <= '/') {
- if (yych <= '.') goto yy1;
- goto yy189;
+ if (yych <= ':') {
+ if (yych <= 0x1F) {
+ if (yych <= '\t') {
+ if (yych <= 0x08) goto yy73;
+ goto yy460;
+ } else {
+ if (yych == '\r') goto yy460;
+ goto yy73;
+ }
} else {
- if (yych <= '9') goto yy192;
- if (yych <= ':') goto yy191;
- goto yy1;
+ if (yych <= '-') {
+ if (yych <= ' ') goto yy460;
+ if (yych <= ',') goto yy73;
+ goto yy459;
+ } else {
+ if (yych <= '.') goto yy73;
+ if (yych <= '/') goto yy324;
+ goto yy459;
+ }
}
} else {
- if (yych <= '\\') {
- if (yych <= 'F') goto yy192;
- if (yych <= '[') goto yy1;
- goto yy98;
+ if (yych <= '@') {
+ if (yych <= '=') {
+ if (yych <= '<') goto yy73;
+ } else {
+ if (yych <= '>') goto yy325;
+ if (yych <= '?') goto yy324;
+ goto yy73;
+ }
} else {
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy192;
- goto yy1;
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy459;
+ if (yych <= '^') goto yy73;
+ goto yy459;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'z') goto yy459;
+ goto yy73;
+ }
}
}
-yy128:
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
+yy461:
+ yych = *++YYCURSOR;
+ if (yych <= '\'') {
+ if (yych <= '\r') {
+ if (yych <= 0x08) {
+ if (yych <= 0x00) goto yy73;
+ goto yy637;
+ } else {
+ if (yych <= '\t') goto yy638;
+ if (yych <= '\f') goto yy637;
+ goto yy638;
+ }
+ } else {
+ if (yych <= '!') {
+ if (yych == ' ') goto yy638;
+ goto yy637;
+ } else {
+ if (yych <= '"') goto yy639;
+ if (yych <= '&') goto yy637;
+ goto yy640;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= '>') {
+ if (yych <= '=') goto yy637;
+ goto yy73;
+ } else {
+ if (yych <= 0x7F) goto yy637;
+ if (yych <= 0xC1) goto yy73;
+ goto yy641;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy642;
+ if (yych <= 0xEF) goto yy643;
+ goto yy644;
+ } else {
+ if (yych <= 0xF3) goto yy645;
+ if (yych <= 0xF4) goto yy646;
+ goto yy73;
+ }
+ }
+ }
+yy462:
+ ++YYCURSOR;
+yy463:
+#line 318 "../../lnav/src/data_scanner_re.re"
+ {
+ RET(DT_XML_EMPTY_TAG);
+ }
+#line 11163 "../../lnav/src/data_scanner_re.cc"
+yy464:
+ yych = *++YYCURSOR;
+ if (yych <= '\r') {
+ if (yych == '\t') goto yy464;
+ if (yych <= '\f') goto yy73;
+ goto yy464;
+ } else {
+ if (yych <= ' ') {
+ if (yych <= 0x1F) goto yy73;
+ goto yy464;
+ } else {
+ if (yych != '>') goto yy73;
+ }
+ }
+yy465:
+ ++YYCURSOR;
+#line 326 "../../lnav/src/data_scanner_re.re"
+ {
+ RET(DT_XML_CLOSE_TAG);
+ }
+#line 11184 "../../lnav/src/data_scanner_re.cc"
+yy466:
+ yych = *++YYCURSOR;
+yy467:
+ if (yych <= '/') {
+ if (yych <= 0x1F) {
+ if (yych <= '\t') {
+ if (yych <= 0x08) goto yy73;
+ goto yy466;
+ } else {
+ if (yych == '\r') goto yy466;
+ goto yy73;
+ }
+ } else {
+ if (yych <= ',') {
+ if (yych <= ' ') goto yy466;
+ goto yy73;
+ } else {
+ if (yych <= '-') goto yy647;
+ if (yych <= '.') goto yy73;
+ goto yy324;
+ }
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '>') {
+ if (yych <= ':') goto yy647;
+ goto yy73;
+ } else {
+ if (yych <= '?') goto yy324;
+ if (yych <= '@') goto yy73;
+ goto yy647;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy73;
+ goto yy647;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'z') goto yy647;
+ goto yy73;
+ }
+ }
+ }
+yy468:
+ yych = *++YYCURSOR;
if (yych <= ':') {
- if (yych <= ',') {
- if (yych <= '%') {
- if (yych <= '$') goto yy4;
- goto yy80;
+ if (yych <= 0x1F) {
+ if (yych <= '\t') {
+ if (yych <= 0x08) goto yy73;
+ goto yy648;
} else {
- if (yych == '+') goto yy80;
- goto yy4;
+ if (yych == '\r') goto yy648;
+ goto yy73;
}
} else {
- if (yych <= '.') {
- if (yych <= '-') goto yy181;
- goto yy46;
+ if (yych <= '-') {
+ if (yych <= ' ') goto yy648;
+ if (yych <= ',') goto yy73;
+ goto yy468;
} else {
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy227;
- goto yy193;
+ if (yych <= '.') goto yy73;
+ if (yych <= '/') goto yy324;
+ goto yy468;
}
}
} else {
- if (yych <= '^') {
- if (yych <= '@') {
- if (yych <= '?') goto yy4;
- goto yy96;
+ if (yych <= '@') {
+ if (yych <= '=') {
+ if (yych <= '<') goto yy73;
+ goto yy649;
} else {
- if (yych <= 'F') goto yy228;
- if (yych <= 'Z') goto yy229;
- goto yy4;
+ if (yych == '?') goto yy324;
+ goto yy73;
}
} else {
- if (yych <= '`') {
- if (yych <= '_') goto yy46;
- goto yy4;
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy468;
+ if (yych <= '^') goto yy73;
+ goto yy468;
} else {
- if (yych <= 'f') goto yy228;
- if (yych <= 'z') goto yy229;
- goto yy4;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'z') goto yy468;
+ goto yy73;
}
}
}
-yy129:
- yyaccept = 0;
+yy469:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy650;
+ goto yy73;
+yy470:
+ yych = *++YYCURSOR;
+ if (yybm_bol[768+yych] & 1) {
+ goto yy338;
+ }
+ if (yych <= '+') {
+ if (yych == '%') goto yy88;
+ if (yych <= '*') goto yy73;
+ goto yy88;
+ } else {
+ if (yych <= '.') {
+ if (yych <= ',') goto yy73;
+ goto yy88;
+ } else {
+ if (yych == '@') goto yy90;
+ goto yy73;
+ }
+ }
+yy471:
+ yych = *++YYCURSOR;
+ if (yych == ':') goto yy651;
+ goto yy73;
+yy472:
+ yyaccept = 7;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '9') {
if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
+ if (yych == '%') goto yy88;
+ if (yych <= '*') goto yy39;
+ goto yy88;
} else {
- if (yych <= ',') goto yy4;
- if (yych <= '.') goto yy46;
- if (yych <= '/') goto yy4;
- goto yy115;
+ if (yych <= '-') {
+ if (yych <= ',') goto yy39;
+ goto yy338;
+ } else {
+ if (yych <= '.') goto yy470;
+ if (yych <= '/') goto yy39;
+ goto yy339;
+ }
}
} else {
if (yych <= 'Z') {
- if (yych <= ':') goto yy148;
- if (yych <= '?') goto yy4;
- if (yych <= '@') goto yy96;
- goto yy229;
+ if (yych <= ':') goto yy471;
+ if (yych <= '?') goto yy39;
+ if (yych <= '@') goto yy90;
+ goto yy339;
} else {
if (yych <= '_') {
- if (yych <= '^') goto yy4;
- goto yy46;
+ if (yych <= '^') goto yy39;
+ goto yy339;
} else {
- if (yych <= '`') goto yy4;
- if (yych <= 'z') goto yy229;
- goto yy4;
+ if (yych <= '`') goto yy39;
+ if (yych <= 'z') goto yy339;
+ goto yy39;
}
}
}
-yy130:
- yyaccept = 0;
+yy473:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '/') {
+ if (yych <= '%') {
+ if (yych <= 0x1F) {
+ if (yych == '\n') goto yy331;
+ goto yy133;
+ } else {
+ if (yych <= ' ') goto yy152;
+ if (yych <= '$') goto yy133;
+ goto yy88;
+ }
+ } else {
+ if (yych <= ',') {
+ if (yych == '+') goto yy88;
+ goto yy133;
+ } else {
+ if (yych <= '-') goto yy157;
+ if (yych <= '.') goto yy121;
+ goto yy123;
+ }
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '?') {
+ if (yych <= '9') goto yy652;
+ if (yych <= ':') goto yy294;
+ goto yy133;
+ } else {
+ if (yych <= '@') goto yy129;
+ if (yych <= 'F') goto yy652;
+ goto yy336;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych == '_') goto yy336;
+ goto yy133;
+ } else {
+ if (yych <= 'f') goto yy543;
+ if (yych <= 'z') goto yy137;
+ goto yy133;
+ }
+ }
+ }
+yy474:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy170;
+ if (yych <= '9') goto yy653;
+ if (yych <= ':') goto yy654;
+ goto yy170;
+ } else {
+ if (yych <= 'F') goto yy653;
+ if (yych <= '`') goto yy170;
+ if (yych <= 'f') goto yy655;
+ goto yy170;
+ }
+yy475:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy201;
+ if (yych <= '9') goto yy655;
+ if (yych <= ':') goto yy654;
+ goto yy201;
+ } else {
+ if (yych <= 'F') goto yy655;
+ if (yych <= '`') goto yy201;
+ if (yych <= 'f') goto yy655;
+ goto yy201;
+ }
+yy476:
+ yyaccept = 26;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '.') {
+ if (yych <= ',') goto yy306;
+ goto yy493;
+ } else {
+ if (yych <= '/') goto yy306;
+ if (yych <= ':') goto yy493;
+ goto yy306;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy493;
+ if (yych <= '^') goto yy306;
+ goto yy493;
+ } else {
+ if (yych <= '`') goto yy306;
+ if (yych <= 'z') goto yy493;
+ goto yy306;
+ }
+ }
+yy477:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '_') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= ',') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy656;
+ }
+ yyt2 = YYCURSOR;
+ goto yy657;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ if (yych <= '9') goto yy658;
+ yyt2 = YYCURSOR;
+ goto yy659;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '?') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ goto yy660;
+ } else {
+ if (yych <= 'Z') goto yy481;
+ if (yych <= '^') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt2 = YYCURSOR;
+ goto yy483;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 'f') goto yy660;
+ goto yy481;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy39;
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy39;
+ }
+ }
+ }
+yy478:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '_') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= ',') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy656;
+ }
+ yyt2 = YYCURSOR;
+ goto yy657;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ if (yych <= '9') goto yy661;
+ yyt2 = YYCURSOR;
+ goto yy659;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '?') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ goto yy660;
+ } else {
+ if (yych <= 'Z') goto yy481;
+ if (yych <= '^') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt2 = YYCURSOR;
+ goto yy483;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 'f') goto yy660;
+ goto yy481;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy39;
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy39;
+ }
+ }
+ }
+yy479:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '^') {
+ if (yych <= '5') {
+ if (yych <= '.') {
+ if (yych <= ',') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy656;
+ }
+ yyt2 = YYCURSOR;
+ goto yy657;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ if (yych <= '4') goto yy661;
+ goto yy662;
+ }
+ } else {
+ if (yych <= '?') {
+ if (yych <= '9') goto yy658;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy659;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ if (yych <= 'F') goto yy660;
+ if (yych <= 'Z') goto yy481;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ }
+ } else {
+ if (yych <= 0xC1) {
+ if (yych <= 'f') {
+ if (yych <= '_') {
+ yyt2 = YYCURSOR;
+ goto yy483;
+ }
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy660;
+ } else {
+ if (yych <= 'z') goto yy481;
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy39;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ yyt2 = YYCURSOR;
+ goto yy315;
+ } else {
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy316;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy39;
+ }
+ }
+ }
+yy480:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '_') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= ',') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy656;
+ }
+ yyt2 = YYCURSOR;
+ goto yy663;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ if (yych <= '9') goto yy660;
+ yyt2 = YYCURSOR;
+ goto yy659;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '?') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ goto yy660;
+ } else {
+ if (yych <= 'Z') goto yy481;
+ if (yych <= '^') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt2 = YYCURSOR;
+ goto yy483;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 'f') goto yy660;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy39;
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy39;
+ }
+ }
+ }
+yy481:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+yy482:
+ if (yych <= '?') {
+ if (yych <= '.') {
+ if (yych <= ',') goto yy39;
+ if (yych <= '-') goto yy664;
+ goto yy356;
+ } else {
+ if (yych <= '/') goto yy123;
+ if (yych <= '9') goto yy481;
+ if (yych <= ':') goto yy192;
+ goto yy39;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') goto yy123;
+ if (yych <= 'Z') goto yy481;
+ goto yy39;
+ } else {
+ if (yych == '`') goto yy39;
+ if (yych <= 'z') goto yy481;
+ goto yy39;
+ }
+ }
+yy483:
+ yyaccept = 26;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'Z') {
+ if (yych <= ',') goto yy306;
+ if (yych <= ':') goto yy482;
+ if (yych <= '?') goto yy306;
+ goto yy482;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy306;
+ goto yy482;
+ } else {
+ if (yych <= '`') goto yy306;
+ if (yych <= 'z') goto yy482;
+ goto yy306;
+ }
+ }
+yy484:
+ yych = *++YYCURSOR;
+ if (yych == ' ') goto yy665;
+ if (yych <= '/') goto yy153;
+ if (yych <= '9') goto yy665;
+ goto yy153;
+yy485:
+ yych = *++YYCURSOR;
+ if (yych == ' ') goto yy666;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy666;
+ goto yy73;
+yy486:
+ yyaccept = 24;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == ' ') goto yy666;
+ if (yych <= '/') goto yy156;
+ if (yych <= '9') goto yy666;
+ goto yy156;
+yy487:
+ yyaccept = 24;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= '.') goto yy156;
+ if (yych <= '/') goto yy286;
+ if (yych <= '9') goto yy289;
+ goto yy344;
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy156;
+ goto yy289;
+ } else {
+ if (yych <= '`') goto yy156;
+ if (yych <= 'f') goto yy289;
+ goto yy156;
+ }
+ }
+yy488:
+ yyaccept = 15;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy155;
+ goto yy88;
+ } else {
+ if (yych == '+') goto yy88;
+ goto yy155;
+ }
+ } else {
+ if (yych <= '.') {
+ if (yych <= '-') goto yy121;
+ yyt3 = YYCURSOR;
+ goto yy349;
+ } else {
+ if (yych <= '/') goto yy123;
+ if (yych <= '9') goto yy655;
+ yyt3 = YYCURSOR;
+ goto yy667;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') {
+ if (yych <= '?') goto yy155;
+ goto yy129;
+ } else {
+ if (yych <= 'F') goto yy655;
+ if (yych <= 'Z') goto yy200;
+ goto yy155;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych <= '_') goto yy49;
+ goto yy155;
+ } else {
+ if (yych <= 'f') goto yy668;
+ if (yych >= '{') goto yy155;
+ }
+ }
+ }
+yy489:
+ yyaccept = 15;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ',') {
if (yych <= '!') {
if (yych <= '\f') {
- if (yych <= 0x00) {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= 0x08) {
+ yyt3 = YYCURSOR;
+ goto yy156;
}
- if (yych <= 0x08) goto yy4;
if (yych <= '\n') {
- yyt4 = YYCURSOR;
- goto yy221;
+ yyt3 = YYCURSOR;
+ goto yy332;
}
- goto yy4;
+ yyt3 = YYCURSOR;
+ goto yy156;
} else {
if (yych <= '\r') {
- yyt4 = YYCURSOR;
- goto yy221;
+ yyt3 = YYCURSOR;
+ goto yy332;
+ }
+ if (yych <= 0x1F) {
+ yyt3 = YYCURSOR;
+ goto yy156;
}
- if (yych <= 0x1F) goto yy4;
if (yych <= ' ') {
- yyt4 = YYCURSOR;
- goto yy221;
+ yyt3 = YYCURSOR;
+ goto yy332;
}
- yyt4 = YYCURSOR;
- goto yy223;
+ yyt3 = YYCURSOR;
+ goto yy333;
}
} else {
if (yych <= '&') {
if (yych <= '"') {
- yyt4 = YYCURSOR;
- goto yy221;
+ yyt3 = YYCURSOR;
+ goto yy332;
}
- if (yych == '%') goto yy80;
- goto yy4;
+ if (yych == '%') goto yy88;
+ yyt3 = YYCURSOR;
+ goto yy156;
} else {
- if (yych <= '\'') {
- yyt4 = YYCURSOR;
- goto yy224;
- }
+ if (yych <= '\'') goto yy154;
if (yych <= '*') {
- yyt4 = YYCURSOR;
- goto yy221;
+ yyt3 = YYCURSOR;
+ goto yy332;
}
- if (yych <= '+') goto yy80;
- yyt4 = YYCURSOR;
- goto yy223;
+ if (yych <= '+') goto yy88;
+ yyt3 = YYCURSOR;
+ goto yy333;
}
}
} else {
- if (yych <= '?') {
- if (yych <= '9') {
- if (yych <= '-') goto yy181;
+ if (yych <= '>') {
+ if (yych <= '/') {
+ if (yych <= '-') goto yy121;
if (yych <= '.') {
- yyt4 = YYCURSOR;
- goto yy230;
+ yyt3 = YYCURSOR;
+ goto yy349;
}
- if (yych <= '/') goto yy4;
- goto yy227;
+ goto yy123;
} else {
+ if (yych <= '9') goto yy200;
if (yych <= ':') {
- yyt4 = YYCURSOR;
- goto yy231;
+ yyt3 = YYCURSOR;
+ goto yy353;
}
if (yych <= ';') {
- yyt4 = YYCURSOR;
- goto yy221;
+ yyt3 = YYCURSOR;
+ goto yy332;
}
- if (yych <= '>') goto yy4;
- yyt4 = YYCURSOR;
- goto yy223;
+ yyt3 = YYCURSOR;
+ goto yy156;
}
} else {
if (yych <= '^') {
- if (yych <= '@') goto yy96;
- if (yych <= 'F') goto yy228;
- if (yych <= 'Z') goto yy229;
- goto yy4;
+ if (yych <= '?') {
+ yyt3 = YYCURSOR;
+ goto yy333;
+ }
+ if (yych <= '@') goto yy129;
+ if (yych <= 'Z') goto yy200;
+ yyt3 = YYCURSOR;
+ goto yy156;
} else {
+ if (yych <= '_') goto yy49;
if (yych <= '`') {
- if (yych <= '_') goto yy46;
- goto yy4;
- } else {
- if (yych <= 'f') goto yy232;
- if (yych <= 'z') goto yy233;
- goto yy4;
+ yyt3 = YYCURSOR;
+ goto yy156;
}
+ if (yych <= 'z') goto yy489;
+ yyt3 = YYCURSOR;
+ goto yy156;
}
}
}
-yy131:
- yyaccept = 0;
+yy490:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == 'E') goto yy494;
+ goto yy170;
+yy491:
+ yyaccept = 15;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy155;
+ goto yy88;
+ } else {
+ if (yych == '+') goto yy88;
+ goto yy155;
+ }
+ } else {
+ if (yych <= '.') {
+ if (yych <= '-') goto yy121;
+ yyt3 = YYCURSOR;
+ goto yy349;
+ } else {
+ if (yych <= '/') goto yy123;
+ if (yych <= '9') goto yy200;
+ yyt3 = YYCURSOR;
+ goto yy353;
+ }
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= '@') {
+ if (yych <= '?') goto yy155;
+ goto yy129;
+ } else {
+ if (yych <= 'Z') goto yy200;
+ if (yych <= '^') goto yy155;
+ goto yy49;
+ }
+ } else {
+ if (yych <= 'd') {
+ if (yych <= '`') goto yy155;
+ goto yy489;
+ } else {
+ if (yych <= 'e') goto yy496;
+ if (yych <= 'z') goto yy489;
+ goto yy155;
+ }
+ }
+ }
+yy492:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+yy493:
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= ',') goto yy39;
+ if (yych <= '-') goto yy492;
+ goto yy651;
+ } else {
+ if (yych <= '/') goto yy39;
+ if (yych <= '9') goto yy492;
+ goto yy471;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') goto yy39;
+ if (yych <= 'Z') goto yy492;
+ goto yy39;
+ } else {
+ if (yych == '`') goto yy39;
+ if (yych <= 'z') goto yy492;
+ goto yy39;
+ }
+ }
+yy494:
+ yyaccept = 28;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '+') {
if (yych <= ' ') {
if (yych <= '\n') {
- if (yych <= 0x00) {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= 0x08) {
+ yyt1 = YYCURSOR;
+ goto yy495;
}
- if (yych <= 0x08) goto yy4;
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= '\t') {
+ yyt1 = YYCURSOR;
+ goto yy669;
+ }
+ goto yy170;
} else {
if (yych == '\r') {
- yyt4 = YYCURSOR;
- goto yy221;
+ yyt1 = YYCURSOR;
+ goto yy669;
}
- if (yych <= 0x1F) goto yy4;
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych >= ' ') {
+ yyt1 = YYCURSOR;
+ goto yy670;
+ }
+ yyt1 = YYCURSOR;
}
} else {
- if (yych <= '%') {
+ if (yych <= '$') {
if (yych <= '!') {
- yyt4 = YYCURSOR;
- goto yy223;
+ yyt1 = YYCURSOR;
+ goto yy671;
}
if (yych <= '"') {
- yyt4 = YYCURSOR;
- goto yy221;
+ yyt1 = YYCURSOR;
+ goto yy669;
}
- if (yych <= '$') goto yy4;
- goto yy80;
+ yyt1 = YYCURSOR;
} else {
- if (yych <= '&') goto yy4;
- if (yych <= '\'') {
- yyt4 = YYCURSOR;
- goto yy224;
+ if (yych <= '%') goto yy170;
+ if (yych <= '&') {
+ yyt1 = YYCURSOR;
+ goto yy495;
}
if (yych <= '*') {
- yyt4 = YYCURSOR;
- goto yy221;
+ yyt1 = YYCURSOR;
+ goto yy669;
}
- goto yy80;
+ goto yy170;
}
}
} else {
if (yych <= '>') {
- if (yych <= '/') {
+ if (yych <= '.') {
if (yych <= ',') {
- yyt4 = YYCURSOR;
- goto yy223;
- }
- if (yych <= '-') goto yy46;
- if (yych <= '.') {
- yyt4 = YYCURSOR;
- goto yy230;
+ yyt1 = YYCURSOR;
+ goto yy671;
}
- goto yy4;
+ if (yych <= '-') goto yy170;
+ yyt1 = YYCURSOR;
+ goto yy672;
} else {
- if (yych <= '9') goto yy115;
+ if (yych <= '9') goto yy170;
if (yych <= ':') {
- yyt3 = YYCURSOR;
- goto yy234;
+ yyt1 = YYCURSOR;
+ goto yy673;
}
if (yych <= ';') {
- yyt4 = YYCURSOR;
- goto yy221;
+ yyt1 = YYCURSOR;
+ goto yy669;
}
- goto yy4;
+ yyt1 = YYCURSOR;
}
} else {
if (yych <= '^') {
if (yych <= '?') {
- yyt4 = YYCURSOR;
- goto yy223;
+ yyt1 = YYCURSOR;
+ goto yy671;
}
- if (yych <= '@') goto yy96;
- if (yych <= 'Z') goto yy229;
- goto yy4;
+ if (yych <= 'Z') goto yy170;
+ yyt1 = YYCURSOR;
} else {
- if (yych <= '_') goto yy46;
- if (yych <= '`') goto yy4;
- if (yych <= 'z') goto yy233;
- goto yy4;
+ if (yych == '`') {
+ yyt1 = YYCURSOR;
+ goto yy495;
+ }
+ if (yych <= 'z') goto yy170;
+ yyt1 = YYCURSOR;
}
}
}
-yy132:
- yyaccept = 0;
+yy495:
+ YYCURSOR = yyt1;
+#line 447 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_CONSTANT); }
+#line 12178 "../../lnav/src/data_scanner_re.cc"
+yy496:
+ yyaccept = 28;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '?') {
- if (yych <= ',') {
+ if (yych <= '+') {
+ if (yych <= '!') {
+ if (yych <= '\f') {
+ if (yych <= 0x08) {
+ yyt1 = YYCURSOR;
+ goto yy495;
+ }
+ if (yych <= '\n') {
+ yyt1 = YYCURSOR;
+ goto yy669;
+ }
+ yyt1 = YYCURSOR;
+ goto yy495;
+ } else {
+ if (yych <= '\r') {
+ yyt1 = YYCURSOR;
+ goto yy669;
+ }
+ if (yych <= 0x1F) {
+ yyt1 = YYCURSOR;
+ goto yy495;
+ }
+ if (yych <= ' ') {
+ yyt1 = YYCURSOR;
+ goto yy669;
+ }
+ yyt1 = YYCURSOR;
+ goto yy671;
+ }
+ } else {
if (yych <= '%') {
- if (yych <= '$') goto yy4;
- goto yy80;
+ if (yych <= '"') {
+ yyt1 = YYCURSOR;
+ goto yy669;
+ }
+ if (yych <= '$') {
+ yyt1 = YYCURSOR;
+ goto yy495;
+ }
+ goto yy201;
+ } else {
+ if (yych <= '&') {
+ yyt1 = YYCURSOR;
+ goto yy495;
+ }
+ if (yych <= '\'') {
+ yyt1 = YYCURSOR;
+ goto yy674;
+ }
+ if (yych <= '*') {
+ yyt1 = YYCURSOR;
+ goto yy669;
+ }
+ goto yy201;
+ }
+ }
+ } else {
+ if (yych <= '>') {
+ if (yych <= '.') {
+ if (yych <= ',') {
+ yyt1 = YYCURSOR;
+ goto yy671;
+ }
+ if (yych <= '-') goto yy201;
+ yyt1 = YYCURSOR;
+ goto yy672;
} else {
- if (yych == '+') goto yy80;
- goto yy4;
+ if (yych <= '9') goto yy201;
+ if (yych <= ':') {
+ yyt1 = YYCURSOR;
+ goto yy673;
+ }
+ if (yych <= ';') {
+ yyt1 = YYCURSOR;
+ goto yy669;
+ }
+ yyt1 = YYCURSOR;
+ goto yy495;
}
} else {
- if (yych <= '/') {
- if (yych <= '-') goto yy181;
- if (yych <= '.') goto yy46;
- goto yy4;
+ if (yych <= '^') {
+ if (yych <= '?') {
+ yyt1 = YYCURSOR;
+ goto yy671;
+ }
+ if (yych <= 'Z') goto yy201;
+ yyt1 = YYCURSOR;
+ goto yy495;
+ } else {
+ if (yych <= '_') goto yy201;
+ if (yych <= '`') {
+ yyt1 = YYCURSOR;
+ goto yy495;
+ }
+ if (yych <= 'z') goto yy489;
+ yyt1 = YYCURSOR;
+ goto yy495;
+ }
+ }
+ }
+yy497:
+ ++YYCURSOR;
+#line 337 "../../lnav/src/data_scanner_re.re"
+ {
+ CAPTURE(DT_H1);
+ cap_inner.c_end -= 1;
+ this->ds_bol = true;
+ return tokenize_result{token_out, cap_all, cap_inner, this->ds_input.data()};
+ }
+#line 12291 "../../lnav/src/data_scanner_re.cc"
+yy498:
+ yyaccept = 15;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '/') {
+ if (yych <= '*') {
+ if (yych <= ' ') {
+ if (yych <= 0x1F) goto yy155;
+ yyt3 = YYCURSOR;
+ goto yy675;
+ } else {
+ if (yych == '%') goto yy88;
+ goto yy155;
+ }
+ } else {
+ if (yych <= ',') {
+ if (yych <= '+') goto yy88;
+ goto yy155;
} else {
- if (yych <= '9') goto yy227;
- if (yych <= ':') goto yy193;
- goto yy4;
+ if (yych <= '-') goto yy121;
+ if (yych <= '.') {
+ yyt3 = YYCURSOR;
+ goto yy349;
+ }
+ goto yy123;
}
}
} else {
if (yych <= 'Z') {
- if (yych <= 'F') {
- if (yych <= '@') goto yy96;
- goto yy228;
+ if (yych <= ':') {
+ if (yych <= '9') goto yy200;
+ yyt3 = YYCURSOR;
+ goto yy353;
} else {
- if (yych == 'L') goto yy235;
- goto yy229;
+ if (yych <= '?') goto yy155;
+ if (yych <= '@') goto yy129;
+ goto yy200;
}
} else {
- if (yych <= '`') {
- if (yych == '_') goto yy46;
- goto yy4;
+ if (yych <= '_') {
+ if (yych <= '^') goto yy155;
+ goto yy49;
} else {
- if (yych <= 'f') goto yy228;
- if (yych <= 'z') goto yy229;
- goto yy4;
+ if (yych <= '`') goto yy155;
+ if (yych <= 'z') goto yy489;
+ goto yy155;
}
}
}
-yy133:
- yyaccept = 0;
+yy499:
+ yych = *++YYCURSOR;
+ if (yych <= '\f') {
+ if (yych == '\t') goto yy332;
+ goto yy218;
+ } else {
+ if (yych <= '\r') goto yy332;
+ if (yych == ' ') goto yy332;
+ goto yy218;
+ }
+yy500:
+ yyaccept = 19;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '-') {
- if (yych <= '!') {
- if (yych <= '\f') {
- if (yych <= 0x00) {
- yyt4 = YYCURSOR;
- goto yy221;
- }
- if (yych <= 0x08) goto yy4;
+ if (yybm_bol[768+yych] & 4) {
+ goto yy366;
+ }
+ if (yych <= '"') {
+ if (yych <= 0x15) {
+ if (yych <= '\t') {
+ if (yych <= 0x00) goto yy220;
+ if (yych <= 0x08) goto yy92;
+ yyt3 = YYCURSOR;
+ goto yy362;
+ } else {
if (yych <= '\n') {
- yyt4 = YYCURSOR;
- goto yy221;
+ yyt3 = YYCURSOR;
+ goto yy332;
+ }
+ if (yych == '\r') {
+ yyt3 = YYCURSOR;
+ goto yy362;
}
- goto yy4;
+ goto yy92;
+ }
+ } else {
+ if (yych <= 0x1B) {
+ if (yych <= 0x16) goto yy220;
+ if (yych <= 0x1A) goto yy92;
+ goto yy220;
} else {
- if (yych <= '\r') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= 0x1F) goto yy92;
+ if (yych == '!') {
+ yyt3 = YYCURSOR;
+ goto yy363;
}
- if (yych <= 0x1F) goto yy4;
- if (yych <= ' ') {
- yyt4 = YYCURSOR;
- goto yy221;
+ yyt3 = YYCURSOR;
+ goto yy362;
+ }
+ }
+ } else {
+ if (yych <= '.') {
+ if (yych <= '*') {
+ if (yych <= '&') goto yy92;
+ if (yych <= '\'') goto yy502;
+ yyt3 = YYCURSOR;
+ goto yy362;
+ } else {
+ if (yych == ',') {
+ yyt3 = YYCURSOR;
+ goto yy363;
}
- yyt4 = YYCURSOR;
- goto yy223;
+ if (yych <= '-') goto yy92;
+ yyt3 = YYCURSOR;
+ goto yy365;
+ }
+ } else {
+ if (yych <= '?') {
+ if (yych <= '9') goto yy92;
+ if (yych <= ';') {
+ yyt3 = YYCURSOR;
+ goto yy362;
+ }
+ if (yych <= '>') goto yy92;
+ yyt3 = YYCURSOR;
+ goto yy363;
+ } else {
+ if (yych <= 0x7F) goto yy92;
+ if (yych <= 0xC1) goto yy220;
+ if (yych <= 0xF4) goto yy92;
+ goto yy220;
+ }
+ }
+ }
+yy501:
+ yyaccept = 25;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '+') {
+ if (yych <= '\r') {
+ if (yych <= 0x08) goto yy218;
+ if (yych <= '\n') goto yy155;
+ if (yych <= '\f') goto yy218;
+ goto yy155;
+ } else {
+ if (yych <= '"') {
+ if (yych <= 0x1F) goto yy218;
+ goto yy155;
+ } else {
+ if (yych <= '&') goto yy218;
+ if (yych <= '*') goto yy155;
+ goto yy218;
+ }
+ }
+ } else {
+ if (yych <= ';') {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy155;
+ goto yy218;
+ } else {
+ if (yych <= '.') goto yy155;
+ if (yych <= '9') goto yy218;
+ goto yy155;
}
} else {
+ if (yych <= '?') {
+ if (yych <= '>') goto yy218;
+ goto yy155;
+ } else {
+ if (yych <= '`') goto yy218;
+ if (yych <= 'z') goto yy155;
+ goto yy218;
+ }
+ }
+ }
+yy502:
+ yyaccept = 15;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'S') {
+ if (yych <= ',') {
if (yych <= '&') {
- if (yych <= '"') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych == '!') {
+ yyt1 = yyt3 = YYCURSOR;
+ goto yy499;
}
- if (yych == '%') goto yy80;
- goto yy4;
+ yyt2 = YYCURSOR;
+ goto yy217;
} else {
- if (yych <= '*') {
- if (yych <= '\'') {
- yyt4 = YYCURSOR;
- goto yy224;
- }
- yyt4 = YYCURSOR;
- goto yy221;
- } else {
- if (yych <= '+') goto yy80;
- if (yych <= ',') {
- yyt4 = YYCURSOR;
- goto yy223;
- }
- goto yy181;
+ if (yych <= '\'') {
+ yyt1 = YYCURSOR;
+ goto yy676;
+ }
+ if (yych <= '+') {
+ yyt2 = YYCURSOR;
+ goto yy217;
+ }
+ yyt1 = yyt3 = YYCURSOR;
+ goto yy499;
+ }
+ } else {
+ if (yych <= '>') {
+ if (yych == '.') {
+ yyt1 = yyt3 = YYCURSOR;
+ goto yy499;
+ }
+ yyt2 = YYCURSOR;
+ goto yy217;
+ } else {
+ if (yych <= '?') {
+ yyt1 = yyt3 = YYCURSOR;
+ goto yy499;
+ }
+ if (yych <= 'R') {
+ yyt2 = YYCURSOR;
+ goto yy217;
}
+ yyt3 = YYCURSOR;
+ goto yy156;
}
}
} else {
- if (yych <= 'F') {
- if (yych <= ':') {
- if (yych <= '.') {
- yyt4 = YYCURSOR;
- goto yy230;
+ if (yych <= 0xC1) {
+ if (yych <= 's') {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy217;
}
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy227;
- yyt4 = YYCURSOR;
- goto yy231;
+ if (yych <= 'r') {
+ yyt1 = YYCURSOR;
+ goto yy501;
+ }
+ goto yy154;
} else {
- if (yych <= '>') {
- if (yych <= ';') {
- yyt4 = YYCURSOR;
- goto yy221;
- }
- goto yy4;
- } else {
- if (yych <= '?') {
- yyt4 = YYCURSOR;
- goto yy223;
- }
- if (yych <= '@') goto yy96;
- goto yy228;
+ if (yych <= 'z') {
+ yyt1 = YYCURSOR;
+ goto yy501;
}
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy217;
+ }
+ yyt3 = YYCURSOR;
+ goto yy156;
}
} else {
- if (yych <= '`') {
- if (yych <= 'Z') goto yy229;
- if (yych == '_') goto yy46;
- goto yy4;
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy221;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy222;
+ }
+ yyt2 = YYCURSOR;
+ goto yy223;
} else {
- if (yych <= 'k') {
- if (yych <= 'f') goto yy232;
- goto yy233;
- } else {
- if (yych <= 'l') goto yy236;
- if (yych <= 'z') goto yy233;
- goto yy4;
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy224;
}
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy225;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy226;
+ }
+ yyt3 = YYCURSOR;
+ goto yy156;
}
}
}
-yy134:
+yy503:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '\'') goto yy154;
+ if (yych <= '`') goto yy138;
+ if (yych <= 'z') goto yy677;
+ goto yy138;
+yy504:
yych = *++YYCURSOR;
+ if (yych <= 0xDF) {
+ if (yych <= ':') {
+ if (yych <= '9') {
+ yyt1 = YYCURSOR;
+ goto yy678;
+ }
+ } else {
+ if (yych <= 0x7F) {
+ yyt1 = YYCURSOR;
+ goto yy678;
+ }
+ if (yych <= 0xC1) goto yy73;
+ yyt1 = YYCURSOR;
+ goto yy680;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt1 = YYCURSOR;
+ goto yy681;
+ }
+ if (yych <= 0xEF) {
+ yyt1 = YYCURSOR;
+ goto yy682;
+ }
+ yyt1 = YYCURSOR;
+ goto yy683;
+ } else {
+ if (yych <= 0xF3) {
+ yyt1 = YYCURSOR;
+ goto yy684;
+ }
+ if (yych <= 0xF4) {
+ yyt1 = YYCURSOR;
+ goto yy685;
+ }
+ goto yy73;
+ }
+ }
+yy505:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy686;
+ goto yy73;
+yy506:
+ yych = *++YYCURSOR;
+ if (yych == '=') goto yy506;
+ if (yych != ']') goto yy73;
+yy507:
+ ++YYCURSOR;
+#line 259 "../../lnav/src/data_scanner_re.re"
+ {
+ CAPTURE(DT_COMMENT);
+ if (tf == text_format_t::TF_DIFF) {
+ auto sf = this->to_string_fragment(cap_all);
+ auto split_res = sf.split_when(string_fragment::tag1{'\n'});
+ cap_all.c_end = split_res.first.sf_end;
+ cap_inner.c_end = split_res.first.sf_end;
+ this->ds_next_offset = cap_all.c_end;
+ }
+ return tokenize_result{token_out, cap_all, cap_inner, this->ds_input.data()};
+ }
+#line 12633 "../../lnav/src/data_scanner_re.cc"
+yy508:
+ yyaccept = 29;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[768+yych] & 8) {
+ goto yy378;
+ }
if (yych <= '9') {
- if (yych == '/') goto yy189;
- goto yy1;
+ if (yych == '-') goto yy214;
+ if (yych >= '0') goto yy214;
} else {
- if (yych <= ':') goto yy152;
- if (yych == '\\') goto yy98;
- goto yy1;
+ if (yych <= 'Z') {
+ if (yych >= 'A') goto yy508;
+ } else {
+ if (yych <= '`') goto yy509;
+ if (yych <= 'z') goto yy508;
+ }
}
-yy135:
- yyaccept = 0;
+yy509:
+#line 445 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_EMAIL); }
+#line 12654 "../../lnav/src/data_scanner_re.cc"
+yy510:
+ yyaccept = 23;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= ':') {
+ if (yych <= '/') {
+ if (yych <= '*') {
+ if (yych == '%') goto yy89;
+ goto yy274;
+ } else {
+ if (yych == ',') goto yy274;
+ if (yych <= '.') goto yy89;
+ goto yy274;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '9') goto yy89;
+ if (yych <= '?') goto yy274;
+ if (yych <= 'Z') goto yy89;
+ goto yy274;
+ } else {
+ if (yych == '`') goto yy274;
+ if (yych <= 'z') goto yy89;
+ goto yy274;
+ }
+ }
+yy511:
+ yych = *++YYCURSOR;
+ if (yych == '+') goto yy539;
+ if (yych == '-') goto yy539;
+ goto yy89;
+yy512:
+ yych = *++YYCURSOR;
+ if (yych <= 'a') {
+ if (yych == 'B') goto yy510;
+ goto yy89;
+ } else {
+ if (yych <= 'b') goto yy510;
+ if (yych == 'i') goto yy687;
+ goto yy89;
+ }
+yy513:
+ yyaccept = 23;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'R') {
+ if (yych <= '.') {
+ if (yych <= '*') {
+ if (yych == '%') goto yy89;
+ goto yy274;
+ } else {
+ if (yych == ',') goto yy274;
+ goto yy89;
+ }
+ } else {
+ if (yych <= '?') {
+ if (yych <= '/') goto yy274;
+ if (yych <= '9') goto yy89;
+ goto yy274;
+ } else {
+ if (yych == 'B') goto yy510;
+ goto yy89;
+ }
+ }
+ } else {
+ if (yych <= 'a') {
+ if (yych <= '^') {
+ if (yych <= 'S') goto yy510;
+ if (yych <= 'Z') goto yy89;
+ goto yy274;
+ } else {
+ if (yych == '`') goto yy274;
+ goto yy89;
+ }
+ } else {
+ if (yych <= 'i') {
+ if (yych <= 'b') goto yy510;
+ if (yych <= 'h') goto yy89;
+ goto yy688;
+ } else {
+ if (yych == 's') goto yy510;
+ if (yych <= 'z') goto yy89;
+ goto yy274;
+ }
+ }
+ }
+yy514:
+ yych = *++YYCURSOR;
+ if (yych == 'S') goto yy510;
+ if (yych == 's') goto yy510;
+ goto yy89;
+yy515:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ switch (yych) {
+ case '%':
+ case '+':
+ case '-':
+ case '.':
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy88;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy515;
+ case '@': goto yy90;
+ case 'B':
+ case 'S':
+ case 'b':
+ case 's': goto yy585;
+ case 'E':
+ case 'e': goto yy689;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy586;
+ case 'm': goto yy587;
+ case 'p':
+ case 'u': goto yy588;
+ default: goto yy24;
+ }
+yy516:
+ yych = *++YYCURSOR;
+yy517:
+ if (yybm_bol[512+yych] & 1) {
+ goto yy516;
+ }
+ if (yych <= 0xE0) {
+ if (yych <= '\n') {
+ if (yych <= 0x00) goto yy73;
+ goto yy690;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych >= 0xE0) goto yy519;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy520;
+ goto yy521;
+ } else {
+ if (yych <= 0xF3) goto yy522;
+ if (yych <= 0xF4) goto yy523;
+ goto yy73;
+ }
+ }
+yy518:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy516;
+ goto yy73;
+yy519:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy73;
+ if (yych <= 0xBF) goto yy518;
+ goto yy73;
+yy520:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy518;
+ goto yy73;
+yy521:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy73;
+ if (yych <= 0xBF) goto yy520;
+ goto yy73;
+yy522:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy520;
+ goto yy73;
+yy523:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0x8F) goto yy520;
+ goto yy73;
+yy524:
+ yych = *++YYCURSOR;
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ if (yych <= '9') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy119;
+ if (yych <= '*') goto yy73;
+ goto yy88;
+ } else {
+ if (yych <= ',') goto yy73;
+ if (yych <= '.') goto yy88;
+ if (yych <= '/') goto yy73;
+ goto yy524;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '?') goto yy73;
+ if (yych <= '@') goto yy90;
+ if (yych <= 'Z') goto yy88;
+ goto yy73;
+ } else {
+ if (yych == '`') goto yy73;
+ if (yych <= 'z') goto yy88;
+ goto yy73;
+ }
+ }
+yy525:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ switch (yych) {
+ case '%': goto yy119;
+ case '+':
+ case '-':
+ case '.':
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy88;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy525;
+ case '@': goto yy90;
+ case 'B':
+ case 'S':
+ case 'b':
+ case 's': goto yy585;
+ case 'E':
+ case 'e': goto yy689;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy586;
+ case 'm': goto yy587;
+ case 'p':
+ case 'u': goto yy588;
+ default: goto yy24;
+ }
+yy526:
+ yych = *++YYCURSOR;
+ if (yych <= 0xC1) {
+ if (yych <= '*') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= ')') goto yy263;
+ goto yy526;
+ } else {
+ if (yych == '/') goto yy691;
+ if (yych <= 0x7F) goto yy263;
+ goto yy73;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy265;
+ if (yych <= 0xE0) goto yy266;
+ goto yy267;
+ } else {
+ if (yych <= 0xF0) goto yy268;
+ if (yych <= 0xF3) goto yy269;
+ if (yych <= 0xF4) goto yy270;
+ goto yy73;
+ }
+ }
+yy527:
+ ++YYCURSOR;
+ goto yy391;
+yy528:
+ yyaccept = 30;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 2) {
+ goto yy115;
+ }
+ if (yych <= 0xDF) {
+ if (yych <= '*') {
+ if (yych <= 0x00) goto yy391;
+ if (yych <= '\'') goto yy263;
+ goto yy264;
+ } else {
+ if (yych <= 0x7F) goto yy263;
+ if (yych <= 0xC1) goto yy391;
+ goto yy265;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy266;
+ if (yych <= 0xEF) goto yy267;
+ goto yy268;
+ } else {
+ if (yych <= 0xF3) goto yy269;
+ if (yych <= 0xF4) goto yy270;
+ goto yy391;
+ }
+ }
+yy529:
+ yych = *++YYCURSOR;
+ if (yych == 'r') goto yy692;
+ goto yy114;
+yy530:
+ yyaccept = 31;
+ yych = *(YYMARKER = ++YYCURSOR);
+yy531:
+ if (yych <= '9') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy88;
+ if (yych >= '+') goto yy88;
+ } else {
+ if (yych <= ',') goto yy532;
+ if (yych <= '.') goto yy121;
+ if (yych <= '/') goto yy123;
+ goto yy530;
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= ':') goto yy294;
+ if (yych <= '?') goto yy532;
+ if (yych <= '@') goto yy129;
+ goto yy530;
+ } else {
+ if (yych <= '_') {
+ if (yych >= '_') goto yy530;
+ } else {
+ if (yych <= '`') goto yy532;
+ if (yych <= 'z') goto yy530;
+ }
+ }
+ }
+yy532:
+#line 419 "../../lnav/src/data_scanner_re.re"
+ {
+ RET(DT_VERSION_NUMBER);
+ }
+#line 13068 "../../lnav/src/data_scanner_re.cc"
+yy533:
+ yyaccept = 31;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '.') goto yy693;
+ if (yych <= '/') goto yy696;
+ if (yych <= '9') goto yy694;
+ goto yy696;
+yy534:
+ yyaccept = 31;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '.') goto yy693;
+ if (yych <= '/') goto yy696;
+ if (yych <= '9') goto yy533;
+ goto yy696;
+yy535:
+ yyaccept = 31;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '/') {
+ if (yych == '.') goto yy693;
+ goto yy696;
+ } else {
+ if (yych <= '4') goto yy533;
+ if (yych <= '5') goto yy697;
+ if (yych <= '9') goto yy694;
+ goto yy696;
+ }
+yy536:
+ yyaccept = 23;
+ yych = *(YYMARKER = ++YYCURSOR);
+yy537:
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ switch (yych) {
+ case '%': goto yy119;
+ case '+': goto yy88;
+ case '-': goto yy393;
+ case '.': goto yy538;
+ case '/': goto yy123;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy536;
+ case ':': goto yy294;
+ case '@': goto yy129;
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy396;
+ case 'B':
+ case 'S':
+ case 'b':
+ case 's': goto yy398;
+ case 'E':
+ case 'e': goto yy399;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy400;
+ case 'm': goto yy401;
+ case 'p':
+ case 'u': goto yy402;
+ default: goto yy274;
+ }
+yy538:
+ yych = *++YYCURSOR;
+ if (yych <= '9') {
if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
+ if (yych == '%') goto yy88;
+ if (yych <= '*') goto yy73;
+ goto yy88;
+ } else {
+ if (yych <= ',') goto yy73;
+ if (yych <= '.') goto yy88;
+ if (yych <= '/') goto yy73;
+ goto yy695;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '?') goto yy73;
+ if (yych <= '@') goto yy90;
+ if (yych <= 'Z') goto yy137;
+ goto yy73;
+ } else {
+ if (yych == '`') goto yy73;
+ if (yych <= 'z') goto yy137;
+ goto yy73;
+ }
+ }
+yy539:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy89;
+ if (yych <= '9') goto yy698;
+ goto yy89;
+yy540:
+ yych = *++YYCURSOR;
+ if (yych <= 'Z') {
+ if (yych <= '/') goto yy89;
+ if (yych <= '9') goto yy699;
+ if (yych <= '@') goto yy89;
+ goto yy530;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy89;
+ goto yy530;
+ } else {
+ if (yych <= '`') goto yy89;
+ if (yych <= 'z') goto yy530;
+ goto yy89;
+ }
+ }
+yy541:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == 'B') goto yy398;
+ if (yych == 'b') goto yy398;
+ goto yy397;
+yy542:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'a') {
+ if (yych == 'B') goto yy398;
+ goto yy397;
+ } else {
+ if (yych <= 'b') goto yy398;
+ if (yych == 'n') goto yy398;
+ goto yy397;
+ }
+yy543:
+ yyaccept = 32;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '9') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy88;
+ if (yych >= '+') goto yy88;
+ } else {
+ if (yych <= '-') {
+ if (yych >= '-') goto yy279;
+ } else {
+ if (yych <= '.') goto yy121;
+ if (yych <= '/') goto yy123;
+ goto yy137;
+ }
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= ':') goto yy700;
+ if (yych <= '?') goto yy544;
+ if (yych <= '@') goto yy129;
+ goto yy137;
+ } else {
+ if (yych <= '_') {
+ if (yych >= '_') goto yy137;
+ } else {
+ if (yych <= '`') goto yy544;
+ if (yych <= 'z') goto yy137;
+ }
+ }
+ }
+yy544:
+#line 296 "../../lnav/src/data_scanner_re.re"
+ {
+ if ((YYCURSOR.val - (this->ds_input.udata() + this->ds_next_offset)) == 17) {
+ RET(DT_MAC_ADDRESS);
+ } else {
+ RET(DT_HEX_DUMP);
+ }
+ }
+#line 13279 "../../lnav/src/data_scanner_re.cc"
+yy545:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '.') goto yy394;
+ goto yy549;
+yy546:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '.') goto yy394;
+ if (yych <= '/') goto yy549;
+ if (yych <= '5') goto yy545;
+ goto yy549;
+yy547:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') goto yy278;
+ if (yych <= 'Z') goto yy701;
+ if (yych <= '`') goto yy278;
+ if (yych <= 'z') goto yy701;
+ goto yy278;
+yy548:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+yy549:
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ if (yych <= '9') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy119;
+ if (yych <= '*') goto yy133;
+ goto yy88;
+ } else {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy133;
+ goto yy393;
+ } else {
+ if (yych <= '.') goto yy538;
+ if (yych <= '/') goto yy123;
+ goto yy548;
+ }
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= ':') goto yy294;
+ if (yych <= '?') goto yy133;
+ if (yych <= '@') goto yy129;
+ goto yy396;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy133;
+ goto yy396;
+ } else {
+ if (yych <= '`') goto yy133;
+ if (yych <= 'z') goto yy396;
+ goto yy133;
+ }
+ }
+ }
+yy550:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy118;
+ if (yych <= '9') goto yy702;
+ goto yy118;
+yy551:
+ yych = *++YYCURSOR;
+ if (yych <= 'Z') {
+ if (yych <= '/') goto yy89;
+ if (yych <= '9') goto yy703;
+ if (yych <= '@') goto yy89;
+ goto yy137;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy89;
+ goto yy137;
+ } else {
+ if (yych <= '`') goto yy89;
+ if (yych <= 'z') goto yy137;
+ goto yy89;
+ }
+ }
+yy552:
+ yych = *++YYCURSOR;
+ if (yych <= 'Z') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy704;
+ if (yych <= '@') goto yy73;
+ goto yy277;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy73;
+ goto yy277;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'z') goto yy277;
+ goto yy73;
+ }
+ }
+yy553:
+ yyaccept = 12;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ if (yych <= '9') {
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy125;
+ goto yy119;
+ } else {
+ if (yych == '+') goto yy88;
+ goto yy125;
+ }
} else {
if (yych <= '.') {
- if (yych <= ',') goto yy4;
- goto yy46;
+ if (yych <= '-') goto yy121;
+ goto yy409;
} else {
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy115;
- goto yy148;
+ if (yych <= '/') goto yy123;
+ if (yych <= '7') goto yy705;
+ goto yy706;
}
}
} else {
if (yych <= 'Z') {
+ if (yych <= '?') {
+ if (yych <= ':') goto yy292;
+ goto yy125;
+ } else {
+ if (yych <= '@') goto yy129;
+ if (yych <= 'F') goto yy707;
+ goto yy134;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych == '_') goto yy137;
+ goto yy125;
+ } else {
+ if (yych <= 'f') goto yy707;
+ if (yych <= 'z') goto yy134;
+ goto yy125;
+ }
+ }
+ }
+yy554:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ if (yych <= ':') {
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy127;
+ goto yy119;
+ } else {
+ if (yych == '+') goto yy88;
+ goto yy127;
+ }
+ } else {
+ if (yych <= '.') {
+ if (yych <= '-') goto yy121;
+ goto yy409;
+ } else {
+ if (yych <= '/') goto yy123;
+ if (yych <= '9') goto yy706;
+ goto yy292;
+ }
+ }
+ } else {
+ if (yych <= '^') {
if (yych <= '@') {
- if (yych <= '?') goto yy4;
- goto yy96;
+ if (yych <= '?') goto yy127;
+ goto yy129;
} else {
- if (yych == 'L') goto yy237;
- goto yy229;
+ if (yych <= 'F') goto yy707;
+ if (yych <= 'Z') goto yy134;
+ goto yy127;
}
} else {
- if (yych <= '_') {
- if (yych <= '^') goto yy4;
- goto yy46;
+ if (yych <= '`') {
+ if (yych <= '_') goto yy137;
+ goto yy127;
} else {
- if (yych <= '`') goto yy4;
- if (yych <= 'z') goto yy229;
- goto yy4;
+ if (yych <= 'f') goto yy707;
+ if (yych <= 'z') goto yy134;
+ goto yy127;
}
}
}
-yy136:
- yyaccept = 0;
+yy555:
+ yych = *++YYCURSOR;
+ if (yych <= '9') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy73;
+ goto yy708;
+ } else {
+ if (yych <= '.') goto yy73;
+ if (yych <= '/') goto yy286;
+ goto yy289;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= ':') goto yy709;
+ if (yych <= '@') goto yy73;
+ goto yy289;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy289;
+ goto yy73;
+ }
+ }
+yy556:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= ',') {
- if (yych <= '!') {
- if (yych <= '\f') {
- if (yych <= 0x00) {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= '?') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy135;
+ if (yych <= '*') goto yy127;
+ goto yy135;
+ } else {
+ if (yych <= '/') {
+ if (yych <= ',') goto yy127;
+ goto yy135;
+ } else {
+ if (yych <= '9') goto yy707;
+ if (yych <= ':') goto yy135;
+ goto yy127;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') goto yy135;
+ if (yych <= 'F') goto yy707;
+ if (yych <= 'Z') goto yy135;
+ goto yy127;
+ } else {
+ if (yych <= '`') {
+ if (yych <= '_') goto yy135;
+ goto yy127;
+ } else {
+ if (yych <= 'f') goto yy707;
+ if (yych <= 'z') goto yy135;
+ goto yy127;
+ }
+ }
+ }
+yy557:
+ yyaccept = 32;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'f') {
+ if (yych <= '9') {
+ if (yych == '-') {
+ yyt1 = YYCURSOR;
+ goto yy710;
+ }
+ if (yych <= '/') {
+ yyt1 = YYCURSOR;
+ goto yy678;
+ }
+ yyt1 = YYCURSOR;
+ goto yy711;
+ } else {
+ if (yych <= '@') {
+ if (yych <= ':') goto yy712;
+ yyt1 = YYCURSOR;
+ goto yy678;
+ } else {
+ if (yych <= 'F') {
+ yyt1 = YYCURSOR;
+ goto yy711;
}
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= '`') {
+ yyt1 = YYCURSOR;
+ goto yy678;
+ }
+ yyt1 = YYCURSOR;
+ goto yy711;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ yyt1 = YYCURSOR;
+ goto yy678;
+ }
+ if (yych <= 0xC1) goto yy544;
+ if (yych <= 0xDF) {
+ yyt1 = YYCURSOR;
+ goto yy680;
+ }
+ yyt1 = YYCURSOR;
+ goto yy681;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt1 = YYCURSOR;
+ goto yy682;
}
- goto yy4;
+ yyt1 = YYCURSOR;
+ goto yy683;
} else {
- if (yych <= '\r') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= 0xF3) {
+ yyt1 = YYCURSOR;
+ goto yy684;
}
- if (yych <= 0x1F) goto yy4;
- if (yych <= ' ') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= 0xF4) {
+ yyt1 = YYCURSOR;
+ goto yy685;
}
- yyt4 = YYCURSOR;
- goto yy223;
+ goto yy544;
}
+ }
+ }
+yy558:
+ yyaccept = 32;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy544;
+ goto yy713;
} else {
- if (yych <= '&') {
- if (yych <= '"') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= '/') goto yy544;
+ if (yych <= '9') goto yy561;
+ goto yy714;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy544;
+ goto yy561;
+ } else {
+ if (yych <= '`') goto yy544;
+ if (yych <= 'f') goto yy561;
+ goto yy544;
+ }
+ }
+yy559:
+ yyaccept = 33;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[768+yych] & 32) {
+ goto yy416;
+ }
+ if (yych <= 0xC1) {
+ if (yych <= ')') {
+ if (yych <= '"') goto yy560;
+ if (yych <= '&') goto yy559;
+ } else {
+ if (yych <= 'Z') goto yy559;
+ if (yych <= ']') goto yy560;
+ if (yych <= 'z') goto yy559;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy418;
+ if (yych <= 0xE0) goto yy419;
+ goto yy420;
+ } else {
+ if (yych <= 0xF0) goto yy421;
+ if (yych <= 0xF3) goto yy422;
+ if (yych <= 0xF4) goto yy423;
+ }
+ }
+yy560:
+#line 292 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_URL); }
+#line 13645 "../../lnav/src/data_scanner_re.cc"
+yy561:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy715;
+ if (yych <= ':') goto yy425;
+ goto yy73;
+ } else {
+ if (yych <= 'F') goto yy715;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy715;
+ goto yy73;
+ }
+yy562:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy716;
+ if (yych <= ':') goto yy564;
+ goto yy73;
+ } else {
+ if (yych <= 'F') goto yy563;
+ if (yych <= '`') goto yy73;
+ if (yych >= 'g') goto yy73;
+ }
+yy563:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy717;
+ if (yych <= ':') goto yy718;
+ goto yy73;
+ } else {
+ if (yych <= 'F') goto yy717;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy717;
+ goto yy73;
+ }
+yy564:
+ yych = *++YYCURSOR;
+ if (yych <= '`') {
+ if (yych <= '9') {
+ if (yych <= '0') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
- if (yych == '%') goto yy80;
- goto yy4;
+ goto yy719;
} else {
- if (yych <= '\'') {
- yyt4 = YYCURSOR;
- goto yy224;
+ if (yych <= '1') goto yy720;
+ if (yych <= '2') goto yy721;
+ goto yy719;
+ }
+ } else {
+ if (yych <= '@') {
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy310;
}
- if (yych <= '*') {
- yyt4 = YYCURSOR;
- goto yy221;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'F') goto yy722;
+ if (yych <= 'Z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= 'f') goto yy722;
+ goto yy73;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
- if (yych <= '+') goto yy80;
- yyt4 = YYCURSOR;
- goto yy223;
+ if (yych <= 0xC1) goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
}
}
+ }
+yy565:
+ yych = *++YYCURSOR;
+ if (yych <= 'Z') {
+ if (yych <= '/') goto yy306;
+ if (yych <= '9') goto yy277;
+ if (yych <= '@') goto yy306;
+ goto yy277;
} else {
- if (yych <= '?') {
- if (yych <= '9') {
- if (yych <= '-') goto yy46;
- if (yych <= '.') {
- yyt4 = YYCURSOR;
- goto yy230;
+ if (yych <= '_') {
+ if (yych <= '^') goto yy306;
+ goto yy277;
+ } else {
+ if (yych <= '`') goto yy306;
+ if (yych <= 'z') goto yy277;
+ goto yy306;
+ }
+ }
+yy566:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '1') {
+ if (yych <= '/') goto yy306;
+ if (yych <= '0') goto yy723;
+ goto yy724;
+ } else {
+ if (yych <= '2') goto yy725;
+ if (yych <= '9') goto yy723;
+ goto yy306;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy277;
+ if (yych <= '^') goto yy306;
+ goto yy277;
+ } else {
+ if (yych <= '`') goto yy306;
+ if (yych <= 'z') goto yy277;
+ goto yy306;
+ }
+ }
+yy567:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '_') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= ',') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
- if (yych <= '/') goto yy4;
- goto yy115;
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ yyt2 = YYCURSOR;
+ goto yy566;
} else {
- if (yych <= ':') {
- yyt3 = YYCURSOR;
- goto yy234;
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy565;
}
- if (yych <= ';') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= '9') goto yy726;
+ yyt2 = YYCURSOR;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '?') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
- if (yych <= '>') goto yy4;
- yyt4 = YYCURSOR;
- goto yy223;
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ goto yy726;
+ } else {
+ if (yych <= 'Z') goto yy277;
+ if (yych <= '^') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt2 = YYCURSOR;
+ goto yy431;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 'f') goto yy726;
+ goto yy277;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy133;
+ yyt2 = YYCURSOR;
+ goto yy313;
}
} else {
- if (yych <= '_') {
- if (yych <= '@') goto yy96;
- if (yych <= 'Z') goto yy229;
- if (yych <= '^') goto yy4;
- goto yy46;
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
} else {
- if (yych <= 'm') {
- if (yych <= '`') goto yy4;
- goto yy233;
- } else {
- if (yych <= 'n') goto yy238;
- if (yych <= 'z') goto yy233;
- goto yy4;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
}
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy133;
}
}
}
-yy137:
+yy568:
yych = *++YYCURSOR;
- if (yybm[768+yych] & 128) {
- goto yy137;
+ if (yych <= ':') {
+ if (yych <= ' ') {
+ if (yych <= 0x1F) goto yy73;
+ goto yy305;
+ } else {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy727;
+ goto yy123;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy73;
+ goto yy727;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy727;
+ goto yy73;
+ }
}
- if (yych <= '&') {
- if (yych <= '\r') {
- if (yych <= 0x08) {
- if (yych <= 0x00) {
- yyt4 = YYCURSOR;
- goto yy221;
+yy569:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '`') {
+ if (yych <= '?') {
+ if (yych <= '/') {
+ if (yych <= ',') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
- goto yy1;
+ yyt2 = YYCURSOR;
+ goto yy565;
} else {
- if (yych <= '\n') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= '9') goto yy726;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy568;
}
- if (yych <= '\f') goto yy1;
- yyt4 = YYCURSOR;
- goto yy221;
+ yyt2 = YYCURSOR;
+ goto yy305;
}
} else {
- if (yych <= ' ') {
- if (yych <= 0x1F) goto yy1;
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= 'Z') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ if (yych <= 'F') goto yy726;
+ goto yy277;
} else {
- if (yych <= '!') {
- yyt4 = YYCURSOR;
- goto yy223;
+ if (yych == '_') {
+ yyt2 = YYCURSOR;
+ goto yy431;
}
- if (yych <= '"') {
- yyt4 = YYCURSOR;
- goto yy221;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= 'f') goto yy726;
+ goto yy277;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy133;
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy133;
+ }
+ }
+ }
+yy570:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '_') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= ',') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
- goto yy1;
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ yyt2 = YYCURSOR;
+ goto yy566;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ if (yych <= '9') goto yy728;
+ yyt2 = YYCURSOR;
+ goto yy568;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '?') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ goto yy726;
+ } else {
+ if (yych <= 'Z') goto yy277;
+ if (yych <= '^') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt2 = YYCURSOR;
+ goto yy431;
}
}
} else {
- if (yych <= '-') {
- if (yych <= '*') {
- if (yych <= '\'') {
- yyt4 = YYCURSOR;
- goto yy224;
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= 'f') goto yy726;
+ goto yy277;
} else {
- if (yych == ',') {
- yyt4 = YYCURSOR;
- goto yy223;
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
- goto yy1;
+ if (yych <= 0xC1) goto yy133;
+ yyt2 = YYCURSOR;
+ goto yy313;
}
} else {
- if (yych <= ';') {
- if (yych <= '.') {
- yyt4 = YYCURSOR;
- goto yy226;
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
}
- if (yych <= '9') goto yy1;
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
} else {
- if (yych == '?') {
- yyt4 = YYCURSOR;
- goto yy223;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
}
- goto yy1;
+ goto yy133;
}
}
}
-yy138:
- yyaccept = 0;
+yy571:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '^') {
+ if (yych <= '9') {
+ if (yych <= '.') {
+ if (yych <= ',') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ yyt2 = YYCURSOR;
+ goto yy566;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ if (yych <= '5') goto yy728;
+ goto yy726;
+ }
+ } else {
+ if (yych <= '@') {
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy568;
+ }
+ if (yych <= '?') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt2 = YYCURSOR;
+ goto yy565;
+ } else {
+ if (yych <= 'F') goto yy726;
+ if (yych <= 'Z') goto yy277;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ }
+ } else {
+ if (yych <= 0xC1) {
+ if (yych <= 'f') {
+ if (yych <= '_') {
+ yyt2 = YYCURSOR;
+ goto yy431;
+ }
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy726;
+ } else {
+ if (yych <= 'z') goto yy277;
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy133;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ yyt2 = YYCURSOR;
+ goto yy315;
+ } else {
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy316;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy133;
+ }
+ }
+ }
+yy572:
+ yyaccept = 29;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '?') {
+ if (yych <= '.') {
+ if (yych <= ',') goto yy509;
+ if (yych <= '-') goto yy432;
+ goto yy433;
+ } else {
+ if (yych <= '/') goto yy123;
+ if (yych <= '9') goto yy290;
+ if (yych <= ':') goto yy294;
+ goto yy509;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') goto yy123;
+ if (yych <= 'Z') goto yy572;
+ goto yy509;
+ } else {
+ if (yych <= '_') goto yy277;
+ if (yych <= '`') goto yy509;
+ if (yych <= 'z') goto yy572;
+ goto yy509;
+ }
+ }
+yy573:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '.') goto yy394;
+ goto yy595;
+yy574:
+ yyaccept = 3;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ':') {
+ if (yych <= '*') {
+ if (yych == '%') goto yy397;
+ goto yy24;
+ } else {
+ if (yych == ',') goto yy24;
+ goto yy397;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '?') goto yy24;
+ if (yych <= 'Z') goto yy397;
+ goto yy24;
+ } else {
+ if (yych == '`') goto yy24;
+ if (yych <= 'z') goto yy397;
+ goto yy24;
+ }
+ }
+yy575:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '+') goto yy302;
+ goto yy397;
+yy576:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'a') {
+ if (yych == 'B') goto yy574;
+ goto yy397;
+ } else {
+ if (yych <= 'b') goto yy574;
+ if (yych == 'i') goto yy729;
+ goto yy397;
+ }
+yy577:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'S') {
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy24;
+ goto yy397;
+ } else {
+ if (yych == '+') goto yy397;
+ goto yy24;
+ }
+ } else {
+ if (yych <= 'A') {
+ if (yych <= ':') goto yy397;
+ if (yych <= '?') goto yy24;
+ goto yy397;
+ } else {
+ if (yych <= 'B') goto yy574;
+ if (yych <= 'R') goto yy397;
+ goto yy574;
+ }
+ }
+ } else {
+ if (yych <= 'b') {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy397;
+ if (yych <= '^') goto yy24;
+ goto yy397;
+ } else {
+ if (yych <= '`') goto yy24;
+ if (yych <= 'a') goto yy397;
+ goto yy574;
+ }
+ } else {
+ if (yych <= 'r') {
+ if (yych == 'i') goto yy730;
+ goto yy397;
+ } else {
+ if (yych <= 's') goto yy574;
+ if (yych <= 'z') goto yy397;
+ goto yy24;
+ }
+ }
+ }
+yy578:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == 'S') goto yy574;
+ if (yych == 's') goto yy574;
+ goto yy397;
+yy579:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '.') goto yy394;
+ if (yych <= '/') goto yy595;
+ if (yych <= '5') goto yy573;
+ goto yy595;
+yy580:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ switch (yych) {
+ case '%': goto yy119;
+ case '+': goto yy88;
+ case '-': goto yy121;
+ case '.': goto yy443;
+ case '/': goto yy123;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy731;
+ case ':': goto yy292;
+ case '@': goto yy129;
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f': goto yy707;
+ case 'B':
+ case 'b': goto yy732;
+ case 'E':
+ case 'e': goto yy733;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy132;
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy134;
+ case 'S':
+ case 's': goto yy136;
+ case '_': goto yy137;
+ case 'm': goto yy139;
+ case 'p':
+ case 'u': goto yy140;
+ default: goto yy24;
+ }
+yy581:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '?') {
if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
+ if (yych == '%') goto yy135;
+ if (yych <= '*') goto yy24;
+ goto yy135;
} else {
- if (yych <= '.') {
- if (yych <= ',') goto yy4;
- goto yy46;
+ if (yych <= '/') {
+ if (yych <= ',') goto yy24;
+ goto yy135;
} else {
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy115;
- goto yy148;
+ if (yych <= '9') goto yy707;
+ if (yych <= ':') goto yy135;
+ goto yy24;
}
}
} else {
- if (yych <= 'Z') {
+ if (yych <= '^') {
+ if (yych <= '@') goto yy135;
+ if (yych <= 'F') goto yy707;
+ if (yych <= 'Z') goto yy135;
+ goto yy24;
+ } else {
+ if (yych <= '`') {
+ if (yych <= '_') goto yy135;
+ goto yy24;
+ } else {
+ if (yych <= 'f') goto yy707;
+ if (yych <= 'z') goto yy135;
+ goto yy24;
+ }
+ }
+ }
+yy582:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy135;
+ if (yych <= '*') goto yy127;
+ goto yy302;
+ } else {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy127;
+ goto yy440;
+ } else {
+ if (yych <= '/') goto yy135;
+ if (yych <= '9') goto yy707;
+ goto yy135;
+ }
+ }
+ } else {
+ if (yych <= '^') {
if (yych <= '@') {
- if (yych <= '?') goto yy4;
- goto yy96;
+ if (yych <= '?') goto yy127;
+ goto yy135;
+ } else {
+ if (yych <= 'F') goto yy707;
+ if (yych <= 'Z') goto yy135;
+ goto yy127;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych <= '_') goto yy135;
+ goto yy127;
+ } else {
+ if (yych <= 'f') goto yy707;
+ if (yych <= 'z') goto yy135;
+ goto yy127;
+ }
+ }
+ }
+yy583:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+yy584:
+ switch (yych) {
+ case '%':
+ case '+': goto yy88;
+ case '-':
+ case '.': goto yy121;
+ case '/': goto yy123;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy583;
+ case ':': goto yy294;
+ case '@': goto yy129;
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'E':
+ case 'F':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'e':
+ case 'f':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy137;
+ case 'B':
+ case 'S':
+ case 'b':
+ case 's': goto yy591;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy590;
+ case 'm': goto yy592;
+ case 'p':
+ case 'u': goto yy593;
+ default: goto yy24;
+ }
+yy585:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '/') {
+ if (yych <= '*') {
+ if (yych == '%') goto yy89;
+ goto yy24;
+ } else {
+ if (yych == ',') goto yy24;
+ if (yych <= '.') goto yy89;
+ goto yy24;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '9') goto yy89;
+ if (yych <= '?') goto yy24;
+ if (yych <= 'Z') goto yy89;
+ goto yy24;
+ } else {
+ if (yych == '`') goto yy24;
+ if (yych <= 'z') goto yy89;
+ goto yy24;
+ }
+ }
+yy586:
+ yych = *++YYCURSOR;
+ if (yych <= 'a') {
+ if (yych == 'B') goto yy585;
+ goto yy89;
+ } else {
+ if (yych <= 'b') goto yy585;
+ if (yych == 'i') goto yy734;
+ goto yy89;
+ }
+yy587:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'R') {
+ if (yych <= '.') {
+ if (yych <= '*') {
+ if (yych == '%') goto yy89;
+ goto yy24;
+ } else {
+ if (yych == ',') goto yy24;
+ goto yy89;
+ }
+ } else {
+ if (yych <= '?') {
+ if (yych <= '/') goto yy24;
+ if (yych <= '9') goto yy89;
+ goto yy24;
+ } else {
+ if (yych == 'B') goto yy585;
+ goto yy89;
+ }
+ }
+ } else {
+ if (yych <= 'a') {
+ if (yych <= '^') {
+ if (yych <= 'S') goto yy585;
+ if (yych <= 'Z') goto yy89;
+ goto yy24;
+ } else {
+ if (yych == '`') goto yy24;
+ goto yy89;
+ }
+ } else {
+ if (yych <= 'i') {
+ if (yych <= 'b') goto yy585;
+ if (yych <= 'h') goto yy89;
+ goto yy735;
+ } else {
+ if (yych == 's') goto yy585;
+ if (yych <= 'z') goto yy89;
+ goto yy24;
+ }
+ }
+ }
+yy588:
+ yych = *++YYCURSOR;
+ if (yych == 'S') goto yy585;
+ if (yych == 's') goto yy585;
+ goto yy89;
+yy589:
+ yyaccept = 32;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '9') {
+ if (yych <= '*') {
+ if (yych == '%') goto yy584;
+ goto yy544;
+ } else {
+ if (yych <= '+') goto yy584;
+ if (yych <= ',') goto yy544;
+ if (yych <= '-') goto yy279;
+ goto yy584;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= ':') goto yy700;
+ if (yych <= '?') goto yy544;
+ if (yych <= 'Z') goto yy584;
+ goto yy544;
+ } else {
+ if (yych == '`') goto yy544;
+ if (yych <= 'z') goto yy584;
+ goto yy544;
+ }
+ }
+yy590:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'a') {
+ if (yych != 'B') goto yy138;
+ } else {
+ if (yych <= 'b') goto yy591;
+ if (yych == 'i') goto yy736;
+ goto yy138;
+ }
+yy591:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= '*') {
+ if (yych == '%') goto yy138;
+ goto yy24;
+ } else {
+ if (yych == ',') goto yy24;
+ goto yy138;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '?') goto yy24;
+ if (yych <= 'Z') goto yy138;
+ goto yy24;
+ } else {
+ if (yych == '`') goto yy24;
+ if (yych <= 'z') goto yy138;
+ goto yy24;
+ }
+ }
+yy592:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'S') {
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy24;
+ goto yy138;
} else {
- if (yych == 'U') goto yy239;
- goto yy229;
+ if (yych == '+') goto yy138;
+ goto yy24;
}
} else {
+ if (yych <= 'A') {
+ if (yych <= ':') goto yy138;
+ if (yych <= '?') goto yy24;
+ goto yy138;
+ } else {
+ if (yych <= 'B') goto yy591;
+ if (yych <= 'R') goto yy138;
+ goto yy591;
+ }
+ }
+ } else {
+ if (yych <= 'b') {
if (yych <= '_') {
- if (yych <= '^') goto yy4;
- goto yy46;
+ if (yych <= 'Z') goto yy138;
+ if (yych <= '^') goto yy24;
+ goto yy138;
+ } else {
+ if (yych <= '`') goto yy24;
+ if (yych <= 'a') goto yy138;
+ goto yy591;
+ }
+ } else {
+ if (yych <= 'r') {
+ if (yych == 'i') goto yy737;
+ goto yy138;
} else {
- if (yych <= '`') goto yy4;
- if (yych <= 'z') goto yy229;
- goto yy4;
+ if (yych <= 's') goto yy591;
+ if (yych <= 'z') goto yy138;
+ goto yy24;
}
}
}
-yy139:
- yyaccept = 0;
+yy593:
+ yyaccept = 14;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= ',') {
- if (yych <= '!') {
- if (yych <= '\f') {
- if (yych <= 0x00) {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych == 'S') goto yy591;
+ if (yych == 's') goto yy591;
+ goto yy138;
+yy594:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+yy595:
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ switch (yych) {
+ case '%': goto yy119;
+ case '+': goto yy88;
+ case '-': goto yy393;
+ case '.': goto yy538;
+ case '/': goto yy123;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy594;
+ case ':': goto yy294;
+ case '@': goto yy129;
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy396;
+ case 'B':
+ case 'S':
+ case 'b':
+ case 's': goto yy574;
+ case 'E':
+ case 'e': goto yy575;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy576;
+ case 'm': goto yy577;
+ case 'p':
+ case 'u': goto yy578;
+ default: goto yy24;
+ }
+yy596:
+ yych = *++YYCURSOR;
+ if (yych == '.') goto yy738;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy739;
+ goto yy73;
+yy597:
+ yych = *++YYCURSOR;
+ if (yych == '.') goto yy738;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy596;
+ goto yy73;
+yy598:
+ yych = *++YYCURSOR;
+ if (yych <= '/') {
+ if (yych == '.') goto yy738;
+ goto yy73;
+ } else {
+ if (yych <= '4') goto yy596;
+ if (yych <= '5') goto yy740;
+ if (yych <= '9') goto yy739;
+ goto yy73;
+ }
+yy599:
+ yych = *++YYCURSOR;
+ if (yych <= 'z') {
+ if (yych <= '@') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy741;
+ if (yych <= ':') {
+ yyt1 = YYCURSOR;
+ goto yy446;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= 'F') goto yy741;
+ goto yy73;
+ } else {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= 'f') goto yy741;
+ goto yy73;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
}
- goto yy4;
+ yyt2 = YYCURSOR;
+ goto yy316;
} else {
- if (yych <= '\r') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
}
- if (yych <= 0x1F) goto yy4;
- if (yych <= ' ') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
}
- yyt4 = YYCURSOR;
- goto yy223;
+ goto yy73;
+ }
+ }
+ }
+yy600:
+ yych = *++YYCURSOR;
+ if (yych <= 'z') {
+ if (yych <= '@') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy742;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy743;
}
+ yyt2 = YYCURSOR;
+ goto yy305;
} else {
- if (yych <= '&') {
- if (yych <= '"') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= 'Z') {
+ if (yych <= 'F') goto yy742;
+ goto yy73;
+ } else {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 'f') goto yy742;
+ goto yy73;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
}
- if (yych == '%') goto yy80;
- goto yy4;
+ yyt2 = YYCURSOR;
+ goto yy316;
} else {
- if (yych <= '\'') {
- yyt4 = YYCURSOR;
- goto yy224;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
}
- if (yych <= '*') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
}
- if (yych <= '+') goto yy80;
- yyt4 = YYCURSOR;
- goto yy223;
+ goto yy73;
+ }
+ }
+ }
+yy601:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt1 = YYCURSOR;
+ goto yy444;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy741;
+ yyt1 = YYCURSOR;
+ goto yy446;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy741;
+ } else {
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy741;
}
}
} else {
- if (yych <= '?') {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy602:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= 'E') {
if (yych <= '9') {
- if (yych <= '-') goto yy46;
- if (yych <= '.') {
- yyt4 = YYCURSOR;
- goto yy230;
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
- if (yych <= '/') goto yy4;
- goto yy115;
+ goto yy741;
} else {
if (yych <= ':') {
- yyt3 = YYCURSOR;
- goto yy234;
+ yyt1 = YYCURSOR;
+ goto yy446;
}
- if (yych <= ';') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
- if (yych <= '>') goto yy4;
- yyt4 = YYCURSOR;
- goto yy223;
+ goto yy741;
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= 'F') goto yy744;
+ goto yy73;
+ } else {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 'e') goto yy741;
+ goto yy744;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy603:
+ yych = *++YYCURSOR;
+ if (yych <= '-') {
+ if (yych <= ' ') {
+ if (yych <= '\f') {
+ if (yych == '\t') goto yy745;
+ goto yy73;
+ } else {
+ if (yych <= '\r') goto yy745;
+ if (yych <= 0x1F) goto yy73;
+ goto yy745;
+ }
+ } else {
+ if (yych <= '&') {
+ if (yych == '"') goto yy453;
+ goto yy73;
+ } else {
+ if (yych <= '\'') goto yy454;
+ if (yych <= ',') goto yy73;
+ goto yy603;
+ }
+ }
+ } else {
+ if (yych <= '@') {
+ if (yych <= '<') {
+ if (yych <= '/') goto yy73;
+ if (yych <= ':') goto yy603;
+ goto yy73;
+ } else {
+ if (yych <= '=') goto yy635;
+ if (yych <= '>') goto yy457;
+ goto yy73;
}
} else {
if (yych <= '_') {
- if (yych <= '@') goto yy96;
- if (yych <= 'Z') goto yy229;
- if (yych <= '^') goto yy4;
- goto yy46;
+ if (yych <= 'Z') goto yy603;
+ if (yych <= '^') goto yy73;
+ goto yy603;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'z') goto yy603;
+ goto yy73;
+ }
+ }
+ }
+yy604:
+ yych = *++YYCURSOR;
+ if (yybm_bol[512+yych] & 4) {
+ goto yy604;
+ }
+ if (yych <= 0xDF) {
+ if (yych <= '"') {
+ if (yych <= 0x00) goto yy73;
+ goto yy746;
+ } else {
+ if (yych <= '\\') goto yy605;
+ if (yych <= 0xC1) goto yy73;
+ goto yy606;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy607;
+ if (yych <= 0xEF) goto yy608;
+ goto yy609;
+ } else {
+ if (yych <= 0xF3) goto yy610;
+ if (yych <= 0xF4) goto yy611;
+ goto yy73;
+ }
+ }
+yy605:
+ yych = *++YYCURSOR;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 0x00) goto yy73;
+ goto yy604;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych >= 0xE0) goto yy607;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy608;
+ goto yy609;
+ } else {
+ if (yych <= 0xF3) goto yy610;
+ if (yych <= 0xF4) goto yy611;
+ goto yy73;
+ }
+ }
+yy606:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy604;
+ goto yy73;
+yy607:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy73;
+ if (yych <= 0xBF) goto yy606;
+ goto yy73;
+yy608:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy606;
+ goto yy73;
+yy609:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy73;
+ if (yych <= 0xBF) goto yy608;
+ goto yy73;
+yy610:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy608;
+ goto yy73;
+yy611:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0x8F) goto yy608;
+ goto yy73;
+yy612:
+ yych = *++YYCURSOR;
+ if (yybm_bol[512+yych] & 8) {
+ goto yy612;
+ }
+ if (yych <= 0xDF) {
+ if (yych <= '\'') {
+ if (yych <= 0x00) goto yy73;
+ goto yy746;
+ } else {
+ if (yych <= '\\') goto yy613;
+ if (yych <= 0xC1) goto yy73;
+ goto yy614;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy615;
+ if (yych <= 0xEF) goto yy616;
+ goto yy617;
+ } else {
+ if (yych <= 0xF3) goto yy618;
+ if (yych <= 0xF4) goto yy619;
+ goto yy73;
+ }
+ }
+yy613:
+ yych = *++YYCURSOR;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 0x00) goto yy73;
+ goto yy612;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych >= 0xE0) goto yy615;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy616;
+ goto yy617;
+ } else {
+ if (yych <= 0xF3) goto yy618;
+ if (yych <= 0xF4) goto yy619;
+ goto yy73;
+ }
+ }
+yy614:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy612;
+ goto yy73;
+yy615:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy73;
+ if (yych <= 0xBF) goto yy614;
+ goto yy73;
+yy616:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy614;
+ goto yy73;
+yy617:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy73;
+ if (yych <= 0xBF) goto yy616;
+ goto yy73;
+yy618:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy616;
+ goto yy73;
+yy619:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0x8F) goto yy616;
+ goto yy73;
+yy620:
+ yych = *++YYCURSOR;
+yy621:
+ if (yybm_bol[512+yych] & 16) {
+ goto yy620;
+ }
+ if (yych <= 0xE0) {
+ if (yych <= '-') {
+ if (yych <= '*') goto yy73;
+ goto yy747;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy628;
+ goto yy629;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy630;
+ goto yy631;
+ } else {
+ if (yych <= 0xF3) goto yy632;
+ if (yych <= 0xF4) goto yy633;
+ goto yy73;
+ }
+ }
+yy622:
+ yych = *++YYCURSOR;
+ if (yych <= ':') {
+ if (yych <= '!') {
+ if (yych <= '\f') {
+ if (yych <= 0x00) goto yy73;
+ if (yych == '\t') goto yy622;
+ goto yy620;
+ } else {
+ if (yych <= '\r') goto yy622;
+ if (yych == ' ') goto yy622;
+ goto yy620;
+ }
+ } else {
+ if (yych <= ')') {
+ if (yych <= '"') goto yy623;
+ if (yych == '\'') goto yy624;
+ goto yy620;
} else {
- if (yych <= 't') {
- if (yych <= '`') goto yy4;
- goto yy233;
+ if (yych <= ',') {
+ if (yych <= '*') goto yy73;
+ goto yy620;
} else {
- if (yych <= 'u') goto yy238;
- if (yych <= 'z') goto yy233;
- goto yy4;
+ if (yych <= '-') goto yy748;
+ if (yych <= '/') goto yy620;
+ goto yy749;
+ }
+ }
+ }
+ } else {
+ if (yych <= 'z') {
+ if (yych <= '@') {
+ if (yych <= '<') goto yy620;
+ if (yych <= '=') goto yy626;
+ if (yych <= '>') goto yy627;
+ goto yy620;
+ } else {
+ if (yych <= '^') {
+ if (yych <= 'Z') goto yy749;
+ goto yy620;
+ } else {
+ if (yych == '`') goto yy620;
+ goto yy749;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy620;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy628;
+ goto yy629;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy630;
+ goto yy631;
+ } else {
+ if (yych <= 0xF3) goto yy632;
+ if (yych <= 0xF4) goto yy633;
+ goto yy73;
}
}
}
}
-yy140:
- ++YYCURSOR;
-#line 273 "../../lnav/src/data_scanner_re.re"
- { RET(DT_ESCAPED_CHAR); }
-#line 4114 "../../lnav/src/data_scanner_re.cc"
-yy141:
+yy623:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy140;
- goto yy1;
-yy142:
+ if (yybm_bol[256+yych] & 1) {
+ goto yy750;
+ }
+ if (yych <= 0xC1) {
+ if (yych <= '*') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= '"') goto yy620;
+ goto yy604;
+ } else {
+ if (yych <= '-') goto yy751;
+ if (yych <= '\\') goto yy752;
+ goto yy73;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy753;
+ if (yych <= 0xE0) goto yy754;
+ goto yy755;
+ } else {
+ if (yych <= 0xF0) goto yy756;
+ if (yych <= 0xF3) goto yy757;
+ if (yych <= 0xF4) goto yy758;
+ goto yy73;
+ }
+ }
+yy624:
yych = *++YYCURSOR;
- if (yych <= 0x9F) goto yy1;
- if (yych <= 0xBF) goto yy141;
- goto yy1;
-yy143:
+ if (yybm_bol[256+yych] & 2) {
+ goto yy759;
+ }
+ if (yych <= 0xC1) {
+ if (yych <= '*') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= '\'') goto yy620;
+ goto yy612;
+ } else {
+ if (yych <= '-') goto yy760;
+ if (yych <= '\\') goto yy761;
+ goto yy73;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy762;
+ if (yych <= 0xE0) goto yy763;
+ goto yy764;
+ } else {
+ if (yych <= 0xF0) goto yy765;
+ if (yych <= 0xF3) goto yy766;
+ if (yych <= 0xF4) goto yy767;
+ goto yy73;
+ }
+ }
+yy625:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy141;
- goto yy1;
-yy144:
+ if (yybm_bol[256+yych] & 4) {
+ goto yy768;
+ }
+ if (yych <= '=') {
+ if (yych <= ' ') {
+ if (yych <= '\t') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= 0x08) goto yy620;
+ goto yy622;
+ } else {
+ if (yych == '\r') goto yy622;
+ if (yych <= 0x1F) goto yy620;
+ goto yy622;
+ }
+ } else {
+ if (yych <= '\'') {
+ if (yych == '"') goto yy623;
+ if (yych <= '&') goto yy620;
+ goto yy624;
+ } else {
+ if (yych <= '/') goto yy620;
+ if (yych <= ':') goto yy455;
+ if (yych <= '<') goto yy620;
+ }
+ }
+ } else {
+ if (yych <= 0x7F) {
+ if (yych <= '^') {
+ if (yych <= '>') goto yy627;
+ if (yych <= '@') goto yy620;
+ if (yych <= 'Z') goto yy455;
+ goto yy620;
+ } else {
+ if (yych == '`') goto yy620;
+ if (yych <= 'z') goto yy455;
+ goto yy620;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy628;
+ if (yych <= 0xE0) goto yy629;
+ goto yy630;
+ } else {
+ if (yych <= 0xF0) goto yy631;
+ if (yych <= 0xF3) goto yy632;
+ if (yych <= 0xF4) goto yy633;
+ goto yy73;
+ }
+ }
+ }
+yy626:
yych = *++YYCURSOR;
- if (yych <= 0x8F) goto yy1;
- if (yych <= 0xBF) goto yy143;
- goto yy1;
-yy145:
+ if (yybm_bol[256+yych] & 8) {
+ goto yy769;
+ }
+ if (yych <= 0xC1) {
+ if (yych <= '\'') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= '"') goto yy770;
+ goto yy771;
+ } else {
+ if (yych <= '*') goto yy772;
+ if (yych <= '-') goto yy773;
+ if (yych <= '>') goto yy620;
+ goto yy73;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy774;
+ if (yych <= 0xE0) goto yy775;
+ goto yy776;
+ } else {
+ if (yych <= 0xF0) goto yy777;
+ if (yych <= 0xF3) goto yy778;
+ if (yych <= 0xF4) goto yy779;
+ goto yy73;
+ }
+ }
+yy627:
+ yyaccept = 34;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '*') {
+ if (yych <= 0x00) goto yy458;
+ if (yych <= ')') goto yy621;
+ goto yy458;
+ } else {
+ if (yych <= 0x7F) goto yy621;
+ if (yych <= 0xC1) goto yy458;
+ if (yych <= 0xF4) goto yy621;
+ goto yy458;
+ }
+yy628:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy143;
- goto yy1;
-yy146:
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy620;
+ goto yy73;
+yy629:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0x8F) goto yy143;
- goto yy1;
-yy147:
+ if (yych <= 0x9F) goto yy73;
+ if (yych <= 0xBF) goto yy628;
+ goto yy73;
+yy630:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy628;
+ goto yy73;
+yy631:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy73;
+ if (yych <= 0xBF) goto yy630;
+ goto yy73;
+yy632:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy630;
+ goto yy73;
+yy633:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0x8F) goto yy630;
+ goto yy73;
+yy634:
+ yych = *++YYCURSOR;
+ if (yych <= '-') {
+ if (yych <= ' ') {
+ if (yych <= '\f') {
+ if (yych == '\t') goto yy634;
+ goto yy73;
+ } else {
+ if (yych <= '\r') goto yy634;
+ if (yych <= 0x1F) goto yy73;
+ goto yy634;
+ }
+ } else {
+ if (yych <= '&') {
+ if (yych == '"') goto yy453;
+ goto yy73;
+ } else {
+ if (yych <= '\'') goto yy454;
+ if (yych <= ',') goto yy73;
+ goto yy603;
+ }
+ }
+ } else {
+ if (yych <= '@') {
+ if (yych <= '<') {
+ if (yych <= '/') goto yy73;
+ if (yych <= ':') goto yy603;
+ goto yy73;
+ } else {
+ if (yych <= '=') goto yy635;
+ if (yych <= '>') goto yy457;
+ goto yy73;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy603;
+ if (yych <= '^') goto yy73;
+ goto yy603;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'z') goto yy603;
+ goto yy73;
+ }
+ }
+ }
+yy635:
+ yych = *++YYCURSOR;
+ if (yybm_bol[256+yych] & 64) {
+ goto yy772;
+ }
+ if (yych <= 0xDF) {
+ if (yych <= '"') {
+ if (yych <= 0x00) goto yy73;
+ goto yy780;
+ } else {
+ if (yych <= '\'') goto yy781;
+ if (yych <= 0xC1) goto yy73;
+ goto yy782;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy783;
+ if (yych <= 0xEF) goto yy784;
+ goto yy785;
+ } else {
+ if (yych <= 0xF3) goto yy786;
+ if (yych <= 0xF4) goto yy787;
+ goto yy73;
+ }
+ }
+yy636:
+ yych = *++YYCURSOR;
+ if (yych <= ' ') {
+ if (yych <= '\f') {
+ if (yych == '\t') goto yy636;
+ goto yy73;
+ } else {
+ if (yych <= '\r') goto yy636;
+ if (yych <= 0x1F) goto yy73;
+ goto yy636;
+ }
+ } else {
+ if (yych <= '<') {
+ if (yych == '/') goto yy324;
+ goto yy73;
+ } else {
+ if (yych <= '=') goto yy461;
+ if (yych <= '>') goto yy325;
+ if (yych <= '?') goto yy324;
+ goto yy73;
+ }
+ }
+yy637:
+ yych = *++YYCURSOR;
+ if (yybm_bol[512+yych] & 32) {
+ goto yy637;
+ }
+ if (yych <= 'z') {
+ if (yych <= '/') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= '-') goto yy788;
+ goto yy789;
+ } else {
+ if (yych <= ':') goto yy788;
+ if (yych <= '>') goto yy325;
+ if (yych <= '?') goto yy789;
+ goto yy788;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy641;
+ if (yych <= 0xE0) goto yy642;
+ goto yy643;
+ } else {
+ if (yych <= 0xF0) goto yy644;
+ if (yych <= 0xF3) goto yy645;
+ if (yych <= 0xF4) goto yy646;
+ goto yy73;
+ }
+ }
+yy638:
+ yych = *++YYCURSOR;
+ if (yybm_bol[0+yych] & 4) {
+ goto yy789;
+ }
+ if (yych <= '=') {
+ if (yych <= '!') {
+ if (yych <= '\f') {
+ if (yych <= 0x00) goto yy73;
+ if (yych == '\t') goto yy638;
+ goto yy637;
+ } else {
+ if (yych <= '\r') goto yy638;
+ if (yych == ' ') goto yy638;
+ goto yy637;
+ }
+ } else {
+ if (yych <= ',') {
+ if (yych <= '"') goto yy639;
+ if (yych == '\'') goto yy640;
+ goto yy637;
+ } else {
+ if (yych == '.') goto yy637;
+ if (yych <= ':') goto yy788;
+ goto yy637;
+ }
+ }
+ } else {
+ if (yych <= 0x7F) {
+ if (yych <= '^') {
+ if (yych <= '>') goto yy325;
+ if (yych <= '@') goto yy637;
+ if (yych <= 'Z') goto yy788;
+ goto yy637;
+ } else {
+ if (yych == '`') goto yy637;
+ if (yych <= 'z') goto yy788;
+ goto yy637;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy641;
+ if (yych <= 0xE0) goto yy642;
+ goto yy643;
+ } else {
+ if (yych <= 0xF0) goto yy644;
+ if (yych <= 0xF3) goto yy645;
+ if (yych <= 0xF4) goto yy646;
+ goto yy73;
+ }
+ }
+ }
+yy639:
+ yych = *++YYCURSOR;
+ if (yybm_bol[512+yych] & 64) {
+ goto yy639;
+ }
+ if (yych <= '\\') {
+ if (yych <= '/') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= '"') goto yy637;
+ if (yych <= '-') goto yy790;
+ goto yy791;
+ } else {
+ if (yych <= '>') {
+ if (yych <= ':') goto yy790;
+ goto yy792;
+ } else {
+ if (yych <= '?') goto yy791;
+ if (yych <= 'Z') goto yy790;
+ goto yy793;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 'z') goto yy790;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy794;
+ goto yy795;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy796;
+ goto yy797;
+ } else {
+ if (yych <= 0xF3) goto yy798;
+ if (yych <= 0xF4) goto yy799;
+ goto yy73;
+ }
+ }
+ }
+yy640:
+ yych = *++YYCURSOR;
+ if (yybm_bol[512+yych] & 128) {
+ goto yy640;
+ }
+ if (yych <= '\\') {
+ if (yych <= '/') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= '\'') goto yy637;
+ if (yych <= '-') goto yy800;
+ goto yy801;
+ } else {
+ if (yych <= '>') {
+ if (yych <= ':') goto yy800;
+ goto yy802;
+ } else {
+ if (yych <= '?') goto yy801;
+ if (yych <= 'Z') goto yy800;
+ goto yy803;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 'z') goto yy800;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy804;
+ goto yy805;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy806;
+ goto yy807;
+ } else {
+ if (yych <= 0xF3) goto yy808;
+ if (yych <= 0xF4) goto yy809;
+ goto yy73;
+ }
+ }
+ }
+yy641:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy637;
+ goto yy73;
+yy642:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy73;
+ if (yych <= 0xBF) goto yy641;
+ goto yy73;
+yy643:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy641;
+ goto yy73;
+yy644:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy73;
+ if (yych <= 0xBF) goto yy643;
+ goto yy73;
+yy645:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy643;
+ goto yy73;
+yy646:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0x8F) goto yy643;
+ goto yy73;
+yy647:
yych = *++YYCURSOR;
if (yych <= ':') {
- if (yych <= '.') goto yy1;
- if (yych <= '/') goto yy189;
- if (yych <= '9') goto yy192;
- goto yy191;
+ if (yych <= 0x1F) {
+ if (yych <= '\t') {
+ if (yych <= 0x08) goto yy73;
+ goto yy810;
+ } else {
+ if (yych == '\r') goto yy810;
+ goto yy73;
+ }
+ } else {
+ if (yych <= '-') {
+ if (yych <= ' ') goto yy810;
+ if (yych <= ',') goto yy73;
+ goto yy647;
+ } else {
+ if (yych <= '.') goto yy73;
+ if (yych <= '/') goto yy324;
+ goto yy647;
+ }
+ }
+ } else {
+ if (yych <= '@') {
+ if (yych <= '=') {
+ if (yych <= '<') goto yy73;
+ goto yy649;
+ } else {
+ if (yych == '?') goto yy324;
+ goto yy73;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy647;
+ if (yych <= '^') goto yy73;
+ goto yy647;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'z') goto yy647;
+ goto yy73;
+ }
+ }
+ }
+yy648:
+ yych = *++YYCURSOR;
+ if (yych <= ':') {
+ if (yych <= 0x1F) {
+ if (yych <= '\t') {
+ if (yych <= 0x08) goto yy73;
+ goto yy648;
+ } else {
+ if (yych == '\r') goto yy648;
+ goto yy73;
+ }
+ } else {
+ if (yych <= '-') {
+ if (yych <= ' ') goto yy648;
+ if (yych <= ',') goto yy73;
+ goto yy647;
+ } else {
+ if (yych <= '.') goto yy73;
+ if (yych <= '/') goto yy324;
+ goto yy647;
+ }
+ }
+ } else {
+ if (yych <= '@') {
+ if (yych <= '=') {
+ if (yych <= '<') goto yy73;
+ } else {
+ if (yych == '?') goto yy324;
+ goto yy73;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy647;
+ if (yych <= '^') goto yy73;
+ goto yy647;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'z') goto yy647;
+ goto yy73;
+ }
+ }
+ }
+yy649:
+ yych = *++YYCURSOR;
+ if (yych <= '\'') {
+ if (yych <= '\r') {
+ if (yych <= 0x08) {
+ if (yych <= 0x00) goto yy73;
+ goto yy811;
+ } else {
+ if (yych <= '\t') goto yy812;
+ if (yych <= '\f') goto yy811;
+ goto yy812;
+ }
+ } else {
+ if (yych <= '!') {
+ if (yych == ' ') goto yy812;
+ goto yy811;
+ } else {
+ if (yych <= '"') goto yy813;
+ if (yych <= '&') goto yy811;
+ goto yy814;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= '>') {
+ if (yych <= '=') goto yy811;
+ goto yy73;
+ } else {
+ if (yych <= 0x7F) goto yy811;
+ if (yych <= 0xC1) goto yy73;
+ goto yy815;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy816;
+ if (yych <= 0xEF) goto yy817;
+ goto yy818;
+ } else {
+ if (yych <= 0xF3) goto yy819;
+ if (yych <= 0xF4) goto yy820;
+ goto yy73;
+ }
+ }
+ }
+yy650:
+ yych = *++YYCURSOR;
+ if (yych == ',') goto yy821;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy650;
+ goto yy73;
+yy651:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy73;
+ goto yy492;
+ } else {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy492;
+ goto yy73;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy492;
+ if (yych <= '^') goto yy73;
+ goto yy492;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'z') goto yy492;
+ goto yy73;
+ }
+ }
+yy652:
+ yyaccept = 32;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '.') {
+ if (yych <= '$') {
+ if (yych <= '\n') {
+ if (yych <= '\t') goto yy544;
+ goto yy331;
+ } else {
+ if (yych == ' ') goto yy152;
+ goto yy544;
+ }
+ } else {
+ if (yych <= '+') {
+ if (yych <= '%') goto yy88;
+ if (yych <= '*') goto yy544;
+ goto yy88;
+ } else {
+ if (yych <= ',') goto yy544;
+ if (yych <= '-') goto yy340;
+ goto yy121;
+ }
+ }
+ } else {
+ if (yych <= '@') {
+ if (yych <= '9') {
+ if (yych <= '/') goto yy123;
+ goto yy336;
+ } else {
+ if (yych <= ':') goto yy700;
+ if (yych <= '?') goto yy544;
+ goto yy129;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy336;
+ if (yych <= '^') goto yy544;
+ goto yy336;
+ } else {
+ if (yych <= '`') goto yy544;
+ if (yych <= 'z') goto yy137;
+ goto yy544;
+ }
+ }
+ }
+yy653:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy170;
+ if (yych <= '9') goto yy822;
+ goto yy170;
+ } else {
+ if (yych <= 'F') goto yy822;
+ if (yych <= '`') goto yy170;
+ if (yych <= 'f') goto yy823;
+ goto yy170;
+ }
+yy654:
+ yych = *++YYCURSOR;
+ if (yych <= '9') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy73;
+ goto yy708;
+ } else {
+ if (yych <= '.') goto yy73;
+ if (yych <= '/') goto yy286;
+ goto yy289;
+ }
} else {
if (yych <= 'F') {
- if (yych <= '@') goto yy1;
- goto yy192;
+ if (yych <= ':') goto yy824;
+ if (yych <= '@') goto yy73;
+ goto yy289;
} else {
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy192;
- goto yy1;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy289;
+ goto yy73;
}
}
-yy148:
+yy655:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy201;
+ if (yych <= '9') goto yy823;
+ goto yy201;
+ } else {
+ if (yych <= 'F') goto yy823;
+ if (yych <= '`') goto yy201;
+ if (yych <= 'f') goto yy823;
+ goto yy201;
+ }
+yy656:
+ yyaccept = 26;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') {
+ if (yych <= ',') goto yy306;
+ if (yych <= '.') goto yy493;
+ goto yy306;
+ } else {
+ if (yych <= '9') goto yy481;
+ if (yych <= ':') goto yy493;
+ goto yy306;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy481;
+ if (yych <= '^') goto yy306;
+ goto yy481;
+ } else {
+ if (yych <= '`') goto yy306;
+ if (yych <= 'z') goto yy481;
+ goto yy306;
+ }
+ }
+yy657:
yych = *++YYCURSOR;
- if (yych == '/') goto yy189;
- if (yych == ':') goto yy152;
- goto yy1;
-yy149:
- yyaccept = 0;
+ if (yych <= '9') {
+ if (yych <= '/') {
+ if (yych == '-') goto yy492;
+ goto yy306;
+ } else {
+ if (yych <= '0') goto yy825;
+ if (yych <= '1') goto yy826;
+ if (yych <= '2') goto yy827;
+ goto yy825;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') goto yy306;
+ if (yych <= 'Z') goto yy481;
+ goto yy306;
+ } else {
+ if (yych == '`') goto yy306;
+ if (yych <= 'z') goto yy481;
+ goto yy306;
+ }
+ }
+yy658:
+ yyaccept = 7;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= ',') {
- if (yych <= '!') {
- if (yych <= '\f') {
- if (yych <= 0x00) {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= '_') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= ',') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy656;
}
- goto yy4;
+ yyt2 = YYCURSOR;
+ goto yy657;
} else {
- if (yych <= '\r') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy565;
}
- if (yych <= 0x1F) goto yy4;
- if (yych <= ' ') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= '9') goto yy828;
+ yyt2 = YYCURSOR;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '?') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
- yyt4 = YYCURSOR;
- goto yy223;
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ goto yy828;
+ } else {
+ if (yych <= 'Z') goto yy481;
+ if (yych <= '^') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt2 = YYCURSOR;
+ goto yy483;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 'f') goto yy828;
+ goto yy481;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy39;
+ yyt2 = YYCURSOR;
+ goto yy313;
}
} else {
- if (yych <= '&') {
- if (yych <= '"') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
}
- if (yych == '%') goto yy80;
- goto yy4;
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
} else {
- if (yych <= '\'') {
- yyt4 = YYCURSOR;
- goto yy224;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
}
- if (yych <= '*') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
}
- if (yych <= '+') goto yy80;
- yyt4 = YYCURSOR;
- goto yy223;
+ goto yy39;
}
}
+ }
+yy659:
+ yych = *++YYCURSOR;
+ if (yych <= ':') {
+ if (yych <= ' ') {
+ if (yych <= 0x1F) goto yy73;
+ goto yy305;
+ } else {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy727;
+ goto yy356;
+ }
} else {
- if (yych <= '?') {
- if (yych <= '9') {
- if (yych <= '-') goto yy46;
- if (yych <= '.') {
- yyt4 = YYCURSOR;
- goto yy230;
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy73;
+ goto yy727;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy727;
+ goto yy73;
+ }
+ }
+yy660:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '_') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= ',') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
- if (yych <= '/') goto yy4;
- goto yy115;
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy656;
+ }
+ yyt2 = YYCURSOR;
+ goto yy663;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ if (yych <= '9') goto yy828;
+ yyt2 = YYCURSOR;
+ goto yy659;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '?') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ goto yy828;
+ } else {
+ if (yych <= 'Z') goto yy481;
+ if (yych <= '^') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt2 = YYCURSOR;
+ goto yy483;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 'f') goto yy828;
+ goto yy481;
} else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy39;
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy39;
+ }
+ }
+ }
+yy661:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '_') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= ',') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy656;
+ }
+ yyt2 = YYCURSOR;
+ goto yy657;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ if (yych <= '9') goto yy829;
+ yyt2 = YYCURSOR;
+ goto yy659;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '?') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ goto yy828;
+ } else {
+ if (yych <= 'Z') goto yy481;
+ if (yych <= '^') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt2 = YYCURSOR;
+ goto yy483;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 'f') goto yy828;
+ goto yy481;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy39;
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy39;
+ }
+ }
+ }
+yy662:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '^') {
+ if (yych <= '9') {
+ if (yych <= '.') {
+ if (yych <= ',') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy656;
+ }
+ yyt2 = YYCURSOR;
+ goto yy657;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ if (yych <= '5') goto yy829;
+ goto yy828;
+ }
+ } else {
+ if (yych <= '@') {
if (yych <= ':') {
- yyt3 = YYCURSOR;
- goto yy234;
+ yyt2 = YYCURSOR;
+ goto yy659;
}
- if (yych <= ';') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= '?') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
- if (yych <= '>') goto yy4;
- yyt4 = YYCURSOR;
- goto yy223;
+ yyt2 = YYCURSOR;
+ goto yy565;
+ } else {
+ if (yych <= 'F') goto yy828;
+ if (yych <= 'Z') goto yy481;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ }
+ } else {
+ if (yych <= 0xC1) {
+ if (yych <= 'f') {
+ if (yych <= '_') {
+ yyt2 = YYCURSOR;
+ goto yy483;
+ }
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy828;
+ } else {
+ if (yych <= 'z') goto yy481;
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy39;
}
} else {
- if (yych <= '_') {
- if (yych <= '@') goto yy96;
- if (yych <= 'Z') goto yy229;
- if (yych <= '^') goto yy4;
- goto yy46;
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ yyt2 = YYCURSOR;
+ goto yy315;
} else {
- if (yych <= 'k') {
- if (yych <= '`') goto yy4;
- goto yy233;
- } else {
- if (yych <= 'l') goto yy240;
- if (yych <= 'z') goto yy233;
- goto yy4;
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy316;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
}
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy39;
}
}
}
-yy150:
+yy663:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy306;
+ goto yy492;
+ } else {
+ if (yych <= '/') goto yy306;
+ if (yych <= '9') goto yy481;
+ goto yy306;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy481;
+ if (yych <= '^') goto yy306;
+ goto yy481;
+ } else {
+ if (yych <= '`') goto yy306;
+ if (yych <= 'z') goto yy481;
+ goto yy306;
+ }
+ }
+yy664:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= ',') goto yy39;
+ if (yych <= '-') goto yy492;
+ goto yy651;
+ } else {
+ if (yych <= '/') goto yy39;
+ if (yych <= '9') goto yy481;
+ goto yy471;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') goto yy39;
+ if (yych <= 'Z') goto yy481;
+ goto yy39;
+ } else {
+ if (yych == '`') goto yy39;
+ if (yych <= 'z') goto yy481;
+ goto yy39;
+ }
+ }
+yy665:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy153;
+ if (yych <= '9') goto yy830;
+ goto yy153;
+yy666:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy831;
+ goto yy73;
+yy667:
+ yyaccept = 24;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '9') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy156;
+ goto yy708;
+ } else {
+ if (yych <= '.') goto yy156;
+ if (yych <= '/') goto yy286;
+ goto yy289;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= ':') goto yy824;
+ if (yych <= '@') goto yy156;
+ goto yy289;
+ } else {
+ if (yych <= '`') goto yy156;
+ if (yych <= 'f') goto yy289;
+ goto yy156;
+ }
+ }
+yy668:
+ yyaccept = 15;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy155;
+ goto yy88;
+ } else {
+ if (yych == '+') goto yy88;
+ goto yy155;
+ }
+ } else {
+ if (yych <= '.') {
+ if (yych <= '-') goto yy121;
+ yyt3 = YYCURSOR;
+ goto yy349;
+ } else {
+ if (yych <= '/') goto yy123;
+ if (yych <= '9') goto yy823;
+ yyt3 = YYCURSOR;
+ goto yy353;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') {
+ if (yych <= '?') goto yy155;
+ goto yy129;
+ } else {
+ if (yych <= 'F') goto yy823;
+ if (yych <= 'Z') goto yy200;
+ goto yy155;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych <= '_') goto yy49;
+ goto yy155;
+ } else {
+ if (yych <= 'f') goto yy832;
+ if (yych <= 'z') goto yy489;
+ goto yy155;
+ }
+ }
+ }
+yy669:
+ ++YYCURSOR;
+ goto yy495;
+yy670:
+ yyaccept = 35;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 8) {
+ goto yy152;
+ }
+ if (yych == '\n') goto yy331;
+ goto yy495;
+yy671:
+ yych = *++YYCURSOR;
+ if (yych <= '\f') {
+ if (yych == '\t') goto yy669;
+ goto yy495;
+ } else {
+ if (yych <= '\r') goto yy669;
+ if (yych == ' ') goto yy669;
+ goto yy495;
+ }
+yy672:
yych = *++YYCURSOR;
if (yych <= '-') {
- if (yych <= 0x1F) {
- if (yych <= '\f') {
- if (yych <= 0x00) {
- yyt4 = YYCURSOR;
- goto yy221;
- }
- if (yych <= 0x08) goto yy83;
- if (yych <= '\n') {
+ if (yych <= '\r') {
+ if (yych == '\t') goto yy669;
+ if (yych <= '\f') goto yy89;
+ goto yy669;
+ } else {
+ if (yych == ' ') goto yy669;
+ if (yych <= ',') goto yy89;
+ goto yy338;
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '/') goto yy89;
+ if (yych <= '9') goto yy339;
+ if (yych <= '@') goto yy89;
+ goto yy339;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy89;
+ goto yy339;
+ } else {
+ if (yych <= '`') goto yy89;
+ if (yych <= 'z') goto yy339;
+ goto yy89;
+ }
+ }
+ }
+yy673:
+ yyaccept = 35;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '/') goto yy286;
+ if (yych == ':') goto yy356;
+ goto yy495;
+yy674:
+ yyaccept = 35;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '+') {
+ if (yych <= '\r') {
+ if (yych <= 0x08) goto yy495;
+ if (yych <= '\n') goto yy155;
+ if (yych <= '\f') goto yy495;
+ goto yy155;
+ } else {
+ if (yych <= '"') {
+ if (yych <= 0x1F) goto yy495;
+ goto yy155;
+ } else {
+ if (yych <= '&') goto yy495;
+ if (yych <= '*') goto yy155;
+ goto yy495;
+ }
+ }
+ } else {
+ if (yych <= ';') {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy155;
+ goto yy495;
+ } else {
+ if (yych <= '.') goto yy155;
+ if (yych <= '9') goto yy495;
+ goto yy155;
+ }
+ } else {
+ if (yych <= '?') {
+ if (yych <= '>') goto yy495;
+ goto yy155;
+ } else {
+ if (yych <= '`') goto yy495;
+ if (yych <= 'z') goto yy155;
+ goto yy495;
+ }
+ }
+ }
+yy675:
+ yyaccept = 24;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '-') goto yy833;
+ goto yy156;
+yy676:
+ yyaccept = 25;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[768+yych] & 4) {
+ goto yy366;
+ }
+ if (yych <= '+') {
+ if (yych <= 0x1A) {
+ if (yych <= '\n') {
+ if (yych <= 0x00) goto yy218;
+ if (yych <= 0x08) goto yy91;
+ if (yych <= '\t') {
yyt3 = YYCURSOR;
- goto yy241;
+ goto yy362;
}
- goto yy83;
+ yyt3 = YYCURSOR;
+ goto yy332;
} else {
if (yych <= '\r') {
+ if (yych <= '\f') goto yy91;
yyt3 = YYCURSOR;
- goto yy241;
+ goto yy362;
+ } else {
+ if (yych == 0x16) goto yy218;
+ goto yy91;
}
- if (yych == 0x1B) goto yy1;
- goto yy83;
}
} else {
- if (yych <= '&') {
- if (yych == '!') {
- yyt3 = YYCURSOR;
- goto yy242;
- }
- if (yych <= '"') {
+ if (yych <= '!') {
+ if (yych <= 0x1B) goto yy218;
+ if (yych <= 0x1F) goto yy91;
+ if (yych <= ' ') {
yyt3 = YYCURSOR;
- goto yy241;
+ goto yy362;
}
- goto yy83;
+ yyt3 = YYCURSOR;
+ goto yy363;
} else {
- if (yych <= '*') {
- if (yych <= '\'') {
+ if (yych <= '&') {
+ if (yych <= '"') {
yyt3 = YYCURSOR;
- goto yy243;
+ goto yy362;
}
- yyt3 = YYCURSOR;
- goto yy241;
+ goto yy91;
} else {
- if (yych == ',') {
+ if (yych <= '\'') goto yy502;
+ if (yych <= '*') {
yyt3 = YYCURSOR;
- goto yy242;
+ goto yy362;
}
- goto yy83;
+ goto yy91;
}
}
}
} else {
- if (yych <= 'z') {
- if (yych <= '>') {
- if (yych <= '.') {
+ if (yych <= '\\') {
+ if (yych <= '9') {
+ if (yych <= ',') {
yyt3 = YYCURSOR;
- goto yy244;
+ goto yy363;
}
- if (yych <= '9') goto yy83;
- if (yych <= ';') {
+ if (yych == '.') {
yyt3 = YYCURSOR;
- goto yy241;
+ goto yy365;
}
- goto yy83;
+ goto yy91;
} else {
- if (yych <= '[') {
- if (yych <= '?') {
+ if (yych <= '>') {
+ if (yych <= ';') {
yyt3 = YYCURSOR;
- goto yy242;
+ goto yy362;
}
- goto yy83;
+ goto yy91;
} else {
- if (yych <= '\\') goto yy86;
- if (yych <= '`') goto yy83;
- goto yy150;
+ if (yych <= '?') {
+ yyt3 = YYCURSOR;
+ goto yy363;
+ }
+ if (yych <= '[') goto yy91;
+ goto yy94;
}
}
} else {
if (yych <= 0xE0) {
- if (yych <= 0x7F) goto yy83;
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy87;
- goto yy88;
+ if (yych <= 0x7F) goto yy91;
+ if (yych <= 0xC1) goto yy218;
+ if (yych <= 0xDF) goto yy95;
+ goto yy96;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy89;
- goto yy90;
+ if (yych <= 0xEF) goto yy97;
+ goto yy98;
} else {
- if (yych <= 0xF3) goto yy91;
- if (yych <= 0xF4) goto yy92;
- goto yy1;
+ if (yych <= 0xF3) goto yy99;
+ if (yych <= 0xF4) goto yy100;
+ goto yy218;
}
}
}
}
-yy151:
- yyaccept = 0;
+yy677:
+ yyaccept = 15;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '+') {
- if (yych <= ' ') {
- if (yych <= '\n') {
- if (yych <= 0x00) {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= ',') {
+ if (yych <= '!') {
+ if (yych <= '\f') {
+ if (yych <= 0x08) {
+ yyt3 = YYCURSOR;
+ goto yy156;
}
- if (yych <= 0x08) goto yy4;
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= '\n') {
+ yyt3 = YYCURSOR;
+ goto yy332;
+ }
+ yyt3 = YYCURSOR;
+ goto yy156;
} else {
- if (yych == '\r') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= '\r') {
+ yyt3 = YYCURSOR;
+ goto yy332;
}
- if (yych <= 0x1F) goto yy4;
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= 0x1F) {
+ yyt3 = YYCURSOR;
+ goto yy156;
+ }
+ if (yych <= ' ') {
+ yyt3 = YYCURSOR;
+ goto yy332;
+ }
+ yyt3 = YYCURSOR;
+ goto yy333;
}
} else {
- if (yych <= '%') {
- if (yych <= '!') {
- yyt4 = YYCURSOR;
- goto yy223;
- }
+ if (yych <= '&') {
if (yych <= '"') {
- yyt4 = YYCURSOR;
- goto yy221;
+ yyt3 = YYCURSOR;
+ goto yy332;
}
- if (yych <= '$') goto yy4;
- goto yy80;
+ if (yych == '%') goto yy88;
+ yyt3 = YYCURSOR;
+ goto yy156;
} else {
- if (yych <= '&') goto yy4;
- if (yych <= '\'') {
- yyt4 = YYCURSOR;
- goto yy224;
- }
+ if (yych <= '\'') goto yy154;
if (yych <= '*') {
- yyt4 = YYCURSOR;
- goto yy221;
+ yyt3 = YYCURSOR;
+ goto yy332;
}
- goto yy80;
+ if (yych <= '+') goto yy88;
+ yyt3 = YYCURSOR;
+ goto yy333;
}
}
} else {
if (yych <= '>') {
if (yych <= '/') {
- if (yych <= ',') {
- yyt4 = YYCURSOR;
- goto yy223;
- }
- if (yych <= '-') goto yy245;
+ if (yych <= '-') goto yy121;
if (yych <= '.') {
- yyt4 = YYCURSOR;
- goto yy230;
+ yyt3 = YYCURSOR;
+ goto yy834;
}
- goto yy4;
+ goto yy123;
} else {
- if (yych <= '9') goto yy115;
+ if (yych <= '9') goto yy137;
if (yych <= ':') {
yyt3 = YYCURSOR;
- goto yy234;
+ goto yy835;
}
if (yych <= ';') {
- yyt4 = YYCURSOR;
- goto yy221;
+ yyt3 = YYCURSOR;
+ goto yy332;
}
- goto yy4;
+ yyt3 = YYCURSOR;
+ goto yy156;
}
} else {
if (yych <= '^') {
if (yych <= '?') {
- yyt4 = YYCURSOR;
- goto yy223;
+ yyt3 = YYCURSOR;
+ goto yy333;
}
- if (yych <= '@') goto yy96;
- if (yych <= 'Z') goto yy229;
- goto yy4;
+ if (yych <= '@') goto yy129;
+ if (yych <= 'Z') goto yy137;
+ yyt3 = YYCURSOR;
+ goto yy156;
} else {
- if (yych <= '_') goto yy46;
- if (yych <= '`') goto yy4;
- if (yych <= 'z') goto yy233;
- goto yy4;
+ if (yych <= '_') goto yy137;
+ if (yych <= '`') {
+ yyt3 = YYCURSOR;
+ goto yy156;
+ }
+ if (yych <= 'z') goto yy677;
+ yyt3 = YYCURSOR;
+ goto yy156;
}
}
}
-yy152:
+yy678:
+ ++YYCURSOR;
+yy679:
+ YYCURSOR = yyt1;
+#line 294 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_TIME); }
+#line 16921 "../../lnav/src/data_scanner_re.cc"
+yy680:
yych = *++YYCURSOR;
- if (yybm[1024+yych] & 8) {
- goto yy3;
- }
- if (yych <= 0xEF) {
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy56;
- if (yych <= 0xE0) goto yy57;
- goto yy58;
- } else {
- if (yych <= 0xF0) goto yy59;
- if (yych <= 0xF3) goto yy60;
- if (yych <= 0xF4) goto yy61;
- goto yy1;
- }
-yy153:
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy678;
+ goto yy73;
+yy681:
yych = *++YYCURSOR;
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy246;
- goto yy1;
-yy154:
+ if (yych <= 0x9F) goto yy73;
+ if (yych <= 0xBF) goto yy680;
+ goto yy73;
+yy682:
yych = *++YYCURSOR;
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy247;
- goto yy1;
-yy155:
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy680;
+ goto yy73;
+yy683:
yych = *++YYCURSOR;
-yy156:
- if (yybm[512+yych] & 1) {
- goto yy155;
- }
- if (yych == '\n') goto yy248;
- goto yy1;
-yy157:
- ++YYCURSOR;
-#line 212 "../../lnav/src/data_scanner_re.re"
- {
- RET(DT_CSI);
- }
-#line 4483 "../../lnav/src/data_scanner_re.cc"
-yy158:
+ if (yych <= 0x8F) goto yy73;
+ if (yych <= 0xBF) goto yy682;
+ goto yy73;
+yy684:
yych = *++YYCURSOR;
-yy159:
- if (yybm[512+yych] & 2) {
- goto yy158;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy682;
+ goto yy73;
+yy685:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0x8F) goto yy682;
+ goto yy73;
+yy686:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy836;
+ goto yy73;
+yy687:
+ yych = *++YYCURSOR;
+ if (yych == 'B') goto yy510;
+ if (yych == 'b') goto yy510;
+ goto yy89;
+yy688:
+ yych = *++YYCURSOR;
+ if (yych <= 'a') {
+ if (yych == 'B') goto yy510;
+ goto yy89;
+ } else {
+ if (yych <= 'b') goto yy510;
+ if (yych == 'n') goto yy510;
+ goto yy89;
}
- if (yych <= ',') goto yy1;
- if (yych <= '.') goto yy249;
- goto yy1;
-yy160:
- ++YYCURSOR;
- yyt1 = yyt2;
-yy161:
- YYCURSOR = yyt1;
-#line 158 "../../lnav/src/data_scanner_re.re"
- {
- CAPTURE(DT_QUOTED_STRING);
- switch (this->ds_input[cap_inner.c_begin]) {
- case 'u':
- case 'r':
- cap_inner.c_begin += 1;
- break;
- }
- cap_inner.c_begin += 1;
- cap_inner.c_end -= 1;
- return tokenize_result{token_out, cap_all, cap_inner, this->ds_input.data()};
- }
-#line 4511 "../../lnav/src/data_scanner_re.cc"
-yy162:
- yyaccept = 14;
+yy689:
+ yych = *++YYCURSOR;
+ if (yych == '+') goto yy302;
+ if (yych == '-') goto yy302;
+ goto yy89;
+yy690:
+ yych = *++YYCURSOR;
+ if (yych == '+') goto yy837;
+ goto yy73;
+yy691:
+ yyaccept = 30;
yych = *(YYMARKER = ++YYCURSOR);
- yyt1 = yyt2;
- if (yybm[768+yych] & 2) {
- goto yy83;
+ if (yybm_bol[1024+yych] & 32) {
+ goto yy263;
}
- if (yych <= 0xDF) {
- if (yych <= '\'') {
- if (yych <= 0x1B) goto yy161;
- goto yy85;
+ if (yych <= 0xE0) {
+ if (yych <= '*') {
+ if (yych <= 0x00) goto yy391;
+ goto yy388;
} else {
- if (yych <= '\\') goto yy86;
- if (yych <= 0xC1) goto yy161;
- goto yy87;
+ if (yych <= 0xC1) goto yy391;
+ if (yych <= 0xDF) goto yy265;
+ goto yy266;
}
} else {
if (yych <= 0xF0) {
- if (yych <= 0xE0) goto yy88;
- if (yych <= 0xEF) goto yy89;
- goto yy90;
+ if (yych <= 0xEF) goto yy267;
+ goto yy268;
} else {
- if (yych <= 0xF3) goto yy91;
- if (yych <= 0xF4) goto yy92;
- goto yy161;
+ if (yych <= 0xF3) goto yy269;
+ if (yych <= 0xF4) goto yy270;
+ goto yy391;
}
}
-yy163:
- yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy160;
- goto yy1;
-yy164:
- yych = *++YYCURSOR;
- if (yych <= 0x9F) goto yy1;
- if (yych <= 0xBF) goto yy163;
- goto yy1;
-yy165:
+yy692:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy163;
- goto yy1;
-yy166:
+ if (yych == 'a') goto yy838;
+ goto yy114;
+yy693:
yych = *++YYCURSOR;
- if (yych <= 0x8F) goto yy1;
- if (yych <= 0xBF) goto yy165;
- goto yy1;
-yy167:
+ if (yych <= '@') {
+ if (yych <= '1') {
+ if (yych <= '/') goto yy89;
+ if (yych <= '0') goto yy839;
+ goto yy840;
+ } else {
+ if (yych <= '2') goto yy841;
+ if (yych <= '9') goto yy839;
+ goto yy89;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy137;
+ if (yych <= '^') goto yy89;
+ goto yy137;
+ } else {
+ if (yych <= '`') goto yy89;
+ if (yych <= 'z') goto yy137;
+ goto yy89;
+ }
+ }
+yy694:
+ yyaccept = 31;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '.') goto yy693;
+ goto yy696;
+yy695:
+ yyaccept = 31;
+ yych = *(YYMARKER = ++YYCURSOR);
+yy696:
+ if (yych <= '9') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy88;
+ if (yych <= '*') goto yy532;
+ goto yy88;
+ } else {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy532;
+ goto yy393;
+ } else {
+ if (yych <= '.') goto yy538;
+ if (yych <= '/') goto yy123;
+ goto yy695;
+ }
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= ':') goto yy294;
+ if (yych <= '?') goto yy532;
+ if (yych <= '@') goto yy129;
+ goto yy695;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy532;
+ goto yy695;
+ } else {
+ if (yych <= '`') goto yy532;
+ if (yych <= 'z') goto yy695;
+ goto yy532;
+ }
+ }
+ }
+yy697:
+ yyaccept = 31;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '.') goto yy693;
+ if (yych <= '/') goto yy696;
+ if (yych <= '5') goto yy694;
+ goto yy696;
+yy698:
+ yyaccept = 23;
+ yych = *(YYMARKER = ++YYCURSOR);
+ switch (yych) {
+ case '%':
+ case '+':
+ case '-':
+ case '.':
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'E':
+ case 'F':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'e':
+ case 'f':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy88;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy698;
+ case '@': goto yy90;
+ case 'B':
+ case 'S':
+ case 'b':
+ case 's': goto yy510;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy512;
+ case 'm': goto yy513;
+ case 'p':
+ case 'u': goto yy514;
+ default: goto yy274;
+ }
+yy699:
+ yyaccept = 23;
+ yych = *(YYMARKER = ++YYCURSOR);
+ switch (yych) {
+ case '%':
+ case '+': goto yy88;
+ case '-':
+ case '.': goto yy121;
+ case '/': goto yy123;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy699;
+ case ':': goto yy294;
+ case '@': goto yy129;
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'E':
+ case 'F':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'e':
+ case 'f':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy530;
+ case 'B':
+ case 'S':
+ case 'b':
+ case 's': goto yy842;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy843;
+ case 'm': goto yy844;
+ case 'p':
+ case 'u': goto yy845;
+ default: goto yy274;
+ }
+yy700:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy165;
- goto yy1;
-yy168:
+ if (yych <= '@') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy846;
+ if (yych <= ':') goto yy123;
+ goto yy73;
+ } else {
+ if (yych <= 'F') goto yy846;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy846;
+ goto yy73;
+ }
+yy701:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '/') goto yy847;
+ goto yy278;
+yy702:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0x8F) goto yy165;
- goto yy1;
-yy169:
- yyaccept = 0;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy848;
+ goto yy73;
+yy703:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '-') goto yy849;
+ if (yych <= '/') goto yy138;
+ if (yych <= '9') goto yy850;
+ goto yy138;
+yy704:
+ yyaccept = 14;
yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '.') goto yy278;
+ if (yych <= '/') goto yy851;
+ if (yych <= '9') goto yy852;
+ goto yy278;
+yy705:
+ yyaccept = 12;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
if (yych <= '9') {
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy125;
+ goto yy119;
+ } else {
+ if (yych == '+') goto yy88;
+ goto yy125;
+ }
+ } else {
+ if (yych <= '.') {
+ if (yych <= '-') goto yy121;
+ goto yy409;
+ } else {
+ if (yych <= '/') goto yy123;
+ if (yych <= '7') goto yy853;
+ goto yy854;
+ }
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '?') {
+ if (yych <= ':') goto yy292;
+ goto yy125;
+ } else {
+ if (yych <= '@') goto yy129;
+ if (yych <= 'F') goto yy855;
+ goto yy134;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych == '_') goto yy137;
+ goto yy125;
+ } else {
+ if (yych <= 'f') goto yy855;
+ if (yych <= 'z') goto yy134;
+ goto yy125;
+ }
+ }
+ }
+yy706:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ if (yych <= ':') {
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy127;
+ goto yy119;
+ } else {
+ if (yych == '+') goto yy88;
+ goto yy127;
+ }
+ } else {
+ if (yych <= '.') {
+ if (yych <= '-') goto yy121;
+ goto yy409;
+ } else {
+ if (yych <= '/') goto yy123;
+ if (yych <= '9') goto yy854;
+ goto yy292;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') {
+ if (yych <= '?') goto yy127;
+ goto yy129;
+ } else {
+ if (yych <= 'F') goto yy855;
+ if (yych <= 'Z') goto yy134;
+ goto yy127;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych <= '_') goto yy137;
+ goto yy127;
+ } else {
+ if (yych <= 'f') goto yy855;
+ if (yych <= 'z') goto yy134;
+ goto yy127;
+ }
+ }
+ }
+yy707:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '?') {
if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
+ if (yych == '%') goto yy135;
+ if (yych <= '*') goto yy127;
+ goto yy135;
} else {
- if (yych <= ',') goto yy4;
- if (yych <= '.') goto yy46;
- if (yych <= '/') goto yy4;
- goto yy250;
+ if (yych <= '/') {
+ if (yych <= ',') goto yy127;
+ goto yy135;
+ } else {
+ if (yych <= '9') goto yy855;
+ if (yych <= ':') goto yy135;
+ goto yy127;
+ }
}
} else {
if (yych <= '^') {
- if (yych <= '?') goto yy4;
- if (yych <= '@') goto yy96;
- if (yych <= 'Z') goto yy46;
- goto yy4;
+ if (yych <= '@') goto yy135;
+ if (yych <= 'F') goto yy855;
+ if (yych <= 'Z') goto yy135;
+ goto yy127;
} else {
- if (yych == '`') goto yy4;
- if (yych <= 'z') goto yy46;
- goto yy4;
+ if (yych <= '`') {
+ if (yych <= '_') goto yy135;
+ goto yy127;
+ } else {
+ if (yych <= 'f') goto yy855;
+ if (yych <= 'z') goto yy135;
+ goto yy127;
+ }
}
}
-yy170:
- yyaccept = 11;
+yy708:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy856;
+ goto yy73;
+ } else {
+ if (yych <= 'Z') goto yy856;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'z') goto yy856;
+ goto yy73;
+ }
+yy709:
+ yych = *++YYCURSOR;
+ if (yych <= '_') {
+ if (yych <= '9') {
+ if (yych <= '0') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy857;
+ } else {
+ if (yych <= '1') goto yy858;
+ if (yych <= '2') goto yy859;
+ goto yy857;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy310;
+ }
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy860;
+ } else {
+ if (yych <= 'Z') goto yy277;
+ if (yych <= '^') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt2 = YYCURSOR;
+ goto yy431;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 'f') goto yy860;
+ goto yy277;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy710:
+ yyaccept = 36;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy679;
+ if (yych <= '9') goto yy846;
+ goto yy679;
+ } else {
+ if (yych <= 'F') goto yy846;
+ if (yych <= '`') goto yy679;
+ if (yych <= 'f') goto yy846;
+ goto yy679;
}
- if (yych <= '?') {
- if (yych <= '$') {
- if (yych <= '\r') {
- if (yych <= 0x08) {
- if (yych <= 0x00) goto yy109;
- goto yy3;
- } else {
- if (yych <= '\n') goto yy109;
- if (yych <= '\f') goto yy3;
- goto yy109;
+yy711:
+ yyaccept = 36;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy679;
+ if (yych <= '9') goto yy715;
+ if (yych <= ':') goto yy425;
+ goto yy679;
+ } else {
+ if (yych <= 'F') goto yy715;
+ if (yych <= '`') goto yy679;
+ if (yych <= 'f') goto yy715;
+ goto yy679;
+ }
+yy712:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy861;
+ if (yych <= ':') goto yy564;
+ goto yy73;
+ } else {
+ if (yych <= 'F') goto yy862;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy862;
+ goto yy73;
+ }
+yy713:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy846;
+ goto yy73;
+ } else {
+ if (yych <= 'F') goto yy846;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy846;
+ goto yy73;
+ }
+yy714:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy862;
+ if (yych <= ':') goto yy564;
+ goto yy73;
+ } else {
+ if (yych <= 'F') goto yy862;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy862;
+ goto yy73;
+ }
+yy715:
+ yych = *++YYCURSOR;
+ if (yych == ':') goto yy425;
+ goto yy73;
+yy716:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy863;
+ if (yych <= ':') goto yy718;
+ goto yy73;
+ } else {
+ if (yych <= 'F') goto yy717;
+ if (yych <= '`') goto yy73;
+ if (yych >= 'g') goto yy73;
+ }
+yy717:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy864;
+ if (yych >= ';') goto yy73;
+ } else {
+ if (yych <= 'F') goto yy864;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy864;
+ goto yy73;
+ }
+yy718:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy865;
+ if (yych <= ':') goto yy866;
+ goto yy73;
+ } else {
+ if (yych <= 'F') goto yy865;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy865;
+ goto yy73;
+ }
+yy719:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
+ yyt4 = YYCURSOR;
+ goto yy867;
} else {
- if (yych <= 0x1B) {
- if (yych <= 0x1A) goto yy3;
- goto yy109;
- } else {
- if (yych <= 0x1F) goto yy3;
- if (yych <= '#') goto yy109;
- goto yy3;
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
+ if (yych <= '9') goto yy868;
+ yyt4 = YYCURSOR;
+ goto yy869;
}
} else {
- if (yych <= '-') {
- if (yych <= '*') {
- if (yych <= '%') goto yy105;
- goto yy109;
- } else {
- if (yych <= '+') goto yy80;
- if (yych <= ',') goto yy109;
- goto yy46;
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
+ goto yy870;
} else {
- if (yych <= '7') {
- if (yych <= '.') goto yy169;
- if (yych <= '/') goto yy3;
- goto yy170;
- } else {
- if (yych <= '9') goto yy95;
- if (yych <= ':') goto yy62;
- goto yy109;
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
+ goto yy870;
}
}
} else {
- if (yych <= 'f') {
- if (yych <= 'Z') {
- if (yych <= 'D') {
- if (yych <= '@') goto yy96;
- } else {
- if (yych <= 'E') goto yy172;
- if (yych >= 'G') goto yy46;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy720:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt4 = YYCURSOR;
+ goto yy867;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy871;
+ yyt4 = YYCURSOR;
+ goto yy869;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
+ goto yy870;
} else {
+ if (yych <= 'Z') goto yy73;
if (yych <= '`') {
- if (yych == '_') goto yy46;
- goto yy109;
- } else {
- if (yych == 'e') goto yy172;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy870;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy721:
+ yych = *++YYCURSOR;
+ if (yych <= '`') {
+ if (yych <= '5') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt4 = YYCURSOR;
+ goto yy867;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '4') goto yy871;
+ goto yy872;
+ }
+ } else {
+ if (yych <= '@') {
+ if (yych <= '9') goto yy868;
+ if (yych <= ':') {
+ yyt4 = YYCURSOR;
+ goto yy869;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'F') goto yy870;
+ if (yych <= 'Z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= 'f') goto yy870;
+ goto yy73;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
}
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy722:
+ yych = *++YYCURSOR;
+ if (yych <= 'z') {
+ if (yych <= '@') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
+ if (yych <= '9') goto yy870;
+ if (yych <= ':') {
+ yyt4 = YYCURSOR;
+ goto yy869;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
} else {
+ if (yych <= 'Z') {
+ if (yych <= 'F') goto yy870;
+ goto yy73;
+ } else {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 'f') goto yy870;
+ goto yy73;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy73;
if (yych <= 0xDF) {
- if (yych <= '~') {
- if (yych <= 'z') goto yy46;
- goto yy109;
- } else {
- if (yych <= 0x7F) goto yy3;
- if (yych <= 0xC1) goto yy109;
- goto yy56;
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
}
+ yyt2 = YYCURSOR;
+ goto yy316;
} else {
- if (yych <= 0xF0) {
- if (yych <= 0xE0) goto yy57;
- if (yych <= 0xEF) goto yy58;
- goto yy59;
- } else {
- if (yych <= 0xF3) goto yy60;
- if (yych <= 0xF4) goto yy61;
- goto yy109;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
}
+ goto yy73;
}
}
}
-yy171:
- yyaccept = 12;
+yy723:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '.') goto yy873;
+ if (yych <= '/') goto yy278;
+ if (yych <= '9') goto yy874;
+ goto yy278;
+yy724:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '.') goto yy873;
+ if (yych <= '/') goto yy278;
+ if (yych <= '9') goto yy723;
+ goto yy278;
+yy725:
+ yyaccept = 14;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[512+yych] & 8) {
- goto yy171;
+ if (yych <= '/') {
+ if (yych == '.') goto yy873;
+ goto yy278;
+ } else {
+ if (yych <= '4') goto yy723;
+ if (yych <= '5') goto yy875;
+ if (yych <= '9') goto yy874;
+ goto yy278;
}
- if (yych <= ':') {
- if (yych <= 0x1F) {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy113;
- if (yych <= 0x08) goto yy3;
- if (yych <= '\n') goto yy113;
- goto yy3;
+yy726:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '`') {
+ if (yych <= '?') {
+ if (yych <= '/') {
+ if (yych <= ',') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt2 = YYCURSOR;
+ goto yy565;
} else {
- if (yych <= '\r') goto yy113;
- if (yych == 0x1B) goto yy113;
- goto yy3;
+ if (yych <= '9') goto yy876;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy568;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
}
} else {
- if (yych <= '*') {
- if (yych <= '#') goto yy113;
- if (yych <= '$') goto yy3;
- if (yych <= '%') goto yy80;
- goto yy113;
+ if (yych <= 'Z') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ if (yych <= 'F') goto yy876;
+ goto yy277;
} else {
- if (yych <= ',') {
- if (yych <= '+') goto yy80;
- goto yy113;
- } else {
- if (yych <= '.') goto yy46;
- if (yych <= '/') goto yy3;
- goto yy62;
+ if (yych == '_') {
+ yyt2 = YYCURSOR;
+ goto yy431;
}
+ yyt2 = YYCURSOR;
+ goto yy305;
}
}
} else {
- if (yych <= '~') {
- if (yych <= '^') {
- if (yych <= '?') goto yy113;
- if (yych <= '@') goto yy96;
- if (yych <= 'Z') goto yy46;
- goto yy113;
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= 'f') goto yy876;
+ goto yy277;
} else {
- if (yych == '`') goto yy113;
- if (yych <= 'z') goto yy46;
- goto yy113;
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy133;
+ yyt2 = YYCURSOR;
+ goto yy313;
}
} else {
- if (yych <= 0xE0) {
- if (yych <= 0x7F) goto yy3;
- if (yych <= 0xC1) goto yy113;
- if (yych <= 0xDF) goto yy56;
- goto yy57;
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
} else {
- if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy58;
- goto yy59;
- } else {
- if (yych <= 0xF3) goto yy60;
- if (yych <= 0xF4) goto yy61;
- goto yy113;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
}
+ goto yy133;
}
}
}
-yy172:
- yyaccept = 12;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[512+yych] & 8) {
- goto yy171;
+yy727:
+ yych = *++YYCURSOR;
+ if (yych <= 'z') {
+ if (yych <= '@') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy877;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy878;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= 'F') goto yy877;
+ goto yy73;
+ } else {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 'f') goto yy877;
+ goto yy73;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
}
- if (yych <= ',') {
- if (yych <= 0x1B) {
- if (yych <= '\n') {
- if (yych <= 0x00) goto yy113;
- if (yych <= 0x08) goto yy4;
- goto yy113;
+yy728:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '_') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= ',') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ yyt2 = YYCURSOR;
+ goto yy566;
} else {
- if (yych == '\r') goto yy113;
- if (yych <= 0x1A) goto yy4;
- goto yy113;
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ if (yych <= '9') goto yy876;
+ yyt2 = YYCURSOR;
+ goto yy568;
}
} else {
- if (yych <= '$') {
- if (yych <= 0x1F) goto yy4;
- if (yych <= '#') goto yy113;
- goto yy4;
+ if (yych <= 'F') {
+ if (yych <= '?') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ goto yy876;
} else {
- if (yych <= '%') goto yy80;
- if (yych == '+') goto yy194;
- goto yy113;
+ if (yych <= 'Z') goto yy277;
+ if (yych <= '^') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt2 = YYCURSOR;
+ goto yy431;
}
}
} else {
- if (yych <= '^') {
- if (yych <= ':') {
- if (yych <= '-') goto yy251;
- if (yych <= '.') goto yy46;
- goto yy4;
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 'f') goto yy876;
+ goto yy277;
} else {
- if (yych <= '?') goto yy113;
- if (yych <= '@') goto yy96;
- if (yych <= 'Z') goto yy46;
- goto yy113;
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy133;
+ yyt2 = YYCURSOR;
+ goto yy313;
}
} else {
- if (yych <= '~') {
- if (yych == '`') goto yy113;
- if (yych <= 'z') goto yy46;
- goto yy113;
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
} else {
- if (yych <= 0x7F) goto yy4;
- if (yych <= 0xC1) goto yy113;
- if (yych <= 0xF4) goto yy4;
- goto yy113;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy133;
}
}
}
-yy173:
- yyaccept = 0;
+yy729:
+ yyaccept = 14;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[512+yych] & 8) {
- goto yy171;
+ if (yych == 'B') goto yy574;
+ if (yych == 'b') goto yy574;
+ goto yy397;
+yy730:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'a') {
+ if (yych == 'B') goto yy574;
+ goto yy397;
+ } else {
+ if (yych <= 'b') goto yy574;
+ if (yych == 'n') goto yy574;
+ goto yy397;
}
+yy731:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ switch (yych) {
+ case '%': goto yy119;
+ case '+': goto yy88;
+ case '-': goto yy121;
+ case '.': goto yy443;
+ case '/': goto yy123;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy879;
+ case ':': goto yy292;
+ case '@': goto yy129;
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f': goto yy855;
+ case 'B':
+ case 'b': goto yy880;
+ case 'E':
+ case 'e': goto yy881;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy132;
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy134;
+ case 'S':
+ case 's': goto yy136;
+ case '_': goto yy137;
+ case 'm': goto yy139;
+ case 'p':
+ case 'u': goto yy140;
+ default: goto yy24;
+ }
+yy732:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '?') {
- if (yych <= '*') {
- if (yych == '%') goto yy80;
- goto yy4;
+ if (yych <= '+') {
+ if (yych == '%') goto yy135;
+ if (yych <= '*') goto yy24;
+ goto yy135;
} else {
- if (yych <= '+') goto yy80;
- if (yych <= ',') goto yy4;
- if (yych <= '.') goto yy46;
- goto yy4;
+ if (yych <= '/') {
+ if (yych <= ',') goto yy24;
+ goto yy135;
+ } else {
+ if (yych <= '9') goto yy855;
+ if (yych <= ':') goto yy135;
+ goto yy24;
+ }
}
} else {
if (yych <= '^') {
- if (yych <= '@') goto yy96;
- if (yych <= 'Z') goto yy46;
- goto yy4;
+ if (yych <= '@') goto yy135;
+ if (yych <= 'F') goto yy855;
+ if (yych <= 'Z') goto yy135;
+ goto yy24;
} else {
- if (yych == '`') goto yy4;
- if (yych <= 'z') goto yy46;
- goto yy4;
+ if (yych <= '`') {
+ if (yych <= '_') goto yy135;
+ goto yy24;
+ } else {
+ if (yych <= 'f') goto yy855;
+ if (yych <= 'z') goto yy135;
+ goto yy24;
+ }
}
}
-yy174:
- yyaccept = 0;
+yy733:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ':') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy135;
+ if (yych <= '*') goto yy127;
+ goto yy302;
+ } else {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy127;
+ goto yy440;
+ } else {
+ if (yych <= '/') goto yy135;
+ if (yych <= '9') goto yy855;
+ goto yy135;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') {
+ if (yych <= '?') goto yy127;
+ goto yy135;
+ } else {
+ if (yych <= 'F') goto yy855;
+ if (yych <= 'Z') goto yy135;
+ goto yy127;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych <= '_') goto yy135;
+ goto yy127;
+ } else {
+ if (yych <= 'f') goto yy855;
+ if (yych <= 'z') goto yy135;
+ goto yy127;
+ }
+ }
+ }
+yy734:
+ yych = *++YYCURSOR;
+ if (yych == 'B') goto yy585;
+ if (yych == 'b') goto yy585;
+ goto yy89;
+yy735:
+ yych = *++YYCURSOR;
+ if (yych <= 'a') {
+ if (yych == 'B') goto yy585;
+ goto yy89;
+ } else {
+ if (yych <= 'b') goto yy585;
+ if (yych == 'n') goto yy585;
+ goto yy89;
+ }
+yy736:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == 'B') goto yy591;
+ if (yych == 'b') goto yy591;
+ goto yy138;
+yy737:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'a') {
+ if (yych == 'B') goto yy591;
+ goto yy138;
+ } else {
+ if (yych <= 'b') goto yy591;
+ if (yych == 'n') goto yy591;
+ goto yy138;
+ }
+yy738:
+ yych = *++YYCURSOR;
+ if (yych <= '1') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '0') goto yy882;
+ goto yy883;
+ } else {
+ if (yych <= '2') goto yy884;
+ if (yych <= '9') goto yy882;
+ goto yy73;
+ }
+yy739:
+ yych = *++YYCURSOR;
+ if (yych == '.') goto yy738;
+ goto yy73;
+yy740:
+ yych = *++YYCURSOR;
+ if (yych == '.') goto yy738;
+ if (yych <= '/') goto yy73;
+ if (yych <= '5') goto yy739;
+ goto yy73;
+yy741:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) {
+ if (yych <= '@') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy73;
+ if (yych <= ':') {
+ yyt1 = YYCURSOR;
+ goto yy446;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ yyt2 = YYCURSOR;
+ goto yy315;
+ } else {
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy316;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+yy742:
+ yych = *++YYCURSOR;
+ if (yych <= 'z') {
+ if (yych <= '@') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy885;
+ if (yych >= ';') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt2 = YYCURSOR;
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= 'F') goto yy885;
+ goto yy73;
+ } else {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 'f') goto yy885;
+ goto yy73;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy743:
+ yych = *++YYCURSOR;
+ if (yych <= '9') {
+ if (yych == ' ') goto yy305;
+ if (yych <= '/') goto yy73;
+ goto yy727;
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy73;
+ goto yy727;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy727;
+ goto yy73;
+ }
+ }
+yy744:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) {
+ if (yych <= '@') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy73;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy886;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ yyt2 = YYCURSOR;
+ goto yy315;
+ } else {
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy316;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+yy745:
+ yych = *++YYCURSOR;
+ if (yych <= '!') {
+ if (yych <= '\f') {
+ if (yych == '\t') goto yy745;
+ goto yy73;
+ } else {
+ if (yych <= '\r') goto yy745;
+ if (yych == ' ') goto yy745;
+ goto yy73;
+ }
+ } else {
+ if (yych <= '\'') {
+ if (yych <= '"') goto yy453;
+ if (yych <= '&') goto yy73;
+ goto yy454;
+ } else {
+ if (yych <= '<') goto yy73;
+ if (yych <= '=') goto yy635;
+ if (yych <= '>') goto yy457;
+ goto yy73;
+ }
+ }
+yy746:
+ yych = *++YYCURSOR;
+ if (yych <= ',') {
if (yych <= 0x1F) {
+ if (yych <= '\t') {
+ if (yych <= 0x08) goto yy73;
+ goto yy887;
+ } else {
+ if (yych == '\r') goto yy887;
+ goto yy73;
+ }
+ } else {
+ if (yych <= '"') {
+ if (yych <= ' ') goto yy887;
+ if (yych <= '!') goto yy73;
+ goto yy453;
+ } else {
+ if (yych == '\'') goto yy454;
+ goto yy73;
+ }
+ }
+ } else {
+ if (yych <= '@') {
+ if (yych <= ':') {
+ if (yych <= '-') goto yy603;
+ if (yych <= '/') goto yy73;
+ goto yy603;
+ } else {
+ if (yych == '>') goto yy457;
+ goto yy73;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy603;
+ if (yych <= '^') goto yy73;
+ goto yy603;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'z') goto yy603;
+ goto yy73;
+ }
+ }
+ }
+yy747:
+ yych = *++YYCURSOR;
+ if (yych <= 0xDF) {
+ if (yych <= '-') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= ',') goto yy620;
+ goto yy888;
+ } else {
+ if (yych <= 0x7F) goto yy620;
+ if (yych <= 0xC1) goto yy73;
+ goto yy628;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy629;
+ if (yych <= 0xEF) goto yy630;
+ goto yy631;
+ } else {
+ if (yych <= 0xF3) goto yy632;
+ if (yych <= 0xF4) goto yy633;
+ goto yy73;
+ }
+ }
+yy748:
+ yych = *++YYCURSOR;
+ if (yych <= '<') {
+ if (yych <= '!') {
if (yych <= '\f') {
- if (yych <= 0x00) goto yy5;
- if (yych <= 0x08) goto yy3;
- if (yych <= '\n') goto yy5;
- goto yy3;
+ if (yych <= 0x00) goto yy73;
+ if (yych == '\t') goto yy889;
+ goto yy620;
} else {
- if (yych <= '\r') goto yy5;
- if (yych == 0x1B) goto yy5;
- goto yy3;
+ if (yych <= '\r') goto yy889;
+ if (yych == ' ') goto yy889;
+ goto yy620;
}
} else {
- if (yych <= '-') {
- if (yych == '$') goto yy3;
- if (yych <= ',') goto yy5;
- goto yy174;
+ if (yych <= ',') {
+ if (yych <= '"') goto yy623;
+ if (yych == '\'') goto yy624;
+ goto yy620;
} else {
- if (yych <= '.') goto yy252;
- if (yych <= '/') goto yy3;
- if (yych <= '9') goto yy174;
- goto yy62;
+ if (yych <= '-') goto yy890;
+ if (yych <= '/') goto yy620;
+ if (yych >= ';') goto yy620;
}
}
} else {
- if (yych <= '~') {
- if (yych <= '^') {
- if (yych <= '?') goto yy5;
- if (yych <= '@') goto yy3;
- if (yych <= 'Z') goto yy174;
- goto yy5;
+ if (yych <= 'z') {
+ if (yych <= 'Z') {
+ if (yych <= '=') goto yy626;
+ if (yych <= '>') goto yy627;
+ if (yych <= '@') goto yy620;
} else {
- if (yych <= '_') goto yy3;
- if (yych <= '`') goto yy5;
- if (yych <= 'z') goto yy174;
- goto yy5;
+ if (yych == '_') goto yy749;
+ if (yych <= '`') goto yy620;
}
} else {
if (yych <= 0xE0) {
- if (yych <= 0x7F) goto yy3;
- if (yych <= 0xC1) goto yy5;
- if (yych <= 0xDF) goto yy56;
- goto yy57;
+ if (yych <= 0x7F) goto yy620;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy628;
+ goto yy629;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy58;
- goto yy59;
+ if (yych <= 0xEF) goto yy630;
+ goto yy631;
} else {
- if (yych <= 0xF3) goto yy60;
- if (yych <= 0xF4) goto yy61;
- goto yy5;
+ if (yych <= 0xF3) goto yy632;
+ if (yych <= 0xF4) goto yy633;
+ goto yy73;
}
}
}
}
-yy175:
+yy749:
yych = *++YYCURSOR;
- if (yych == 'r') goto yy253;
- goto yy100;
-yy176:
- yyaccept = 5;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '9') {
- if (yych <= ' ') {
+ if (yych <= ':') {
+ if (yych <= '!') {
if (yych <= '\f') {
- if (yych <= 0x00) goto yy24;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy24;
- goto yy4;
+ if (yych <= 0x00) goto yy73;
+ if (yych == '\t') goto yy889;
+ goto yy620;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') goto yy24;
- goto yy4;
+ if (yych <= '\r') goto yy889;
+ if (yych == ' ') goto yy889;
+ goto yy620;
+ }
+ } else {
+ if (yych <= ')') {
+ if (yych <= '"') goto yy623;
+ if (yych == '\'') goto yy624;
+ goto yy620;
+ } else {
+ if (yych <= ',') {
+ if (yych <= '*') goto yy73;
+ goto yy620;
} else {
- if (yych <= 0x1B) goto yy24;
- if (yych <= 0x1F) goto yy4;
- goto yy24;
+ if (yych <= '-') goto yy748;
+ if (yych <= '/') goto yy620;
+ goto yy749;
+ }
+ }
+ }
+ } else {
+ if (yych <= 'z') {
+ if (yych <= '@') {
+ if (yych <= '<') goto yy620;
+ if (yych <= '=') goto yy626;
+ if (yych <= '>') goto yy627;
+ goto yy620;
+ } else {
+ if (yych <= '^') {
+ if (yych <= 'Z') goto yy749;
+ goto yy620;
+ } else {
+ if (yych == '`') goto yy620;
+ goto yy749;
}
}
} else {
- if (yych <= '$') {
- if (yych == '"') goto yy24;
- if (yych <= '#') goto yy99;
- goto yy101;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy620;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy628;
+ goto yy629;
} else {
- if (yych <= '\'') {
- if (yych <= '&') goto yy99;
- goto yy24;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy630;
+ goto yy631;
} else {
- if (yych <= '*') goto yy99;
- if (yych <= ',') goto yy24;
- goto yy101;
+ if (yych <= 0xF3) goto yy632;
+ if (yych <= 0xF4) goto yy633;
+ goto yy73;
}
}
}
+ }
+yy750:
+ yych = *++YYCURSOR;
+ if (yybm_bol[256+yych] & 1) {
+ goto yy750;
+ }
+ if (yych <= 0xC1) {
+ if (yych <= '*') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= '"') goto yy891;
+ goto yy604;
+ } else {
+ if (yych <= '-') goto yy751;
+ if (yych <= '\\') goto yy752;
+ goto yy73;
+ }
} else {
- if (yych <= '`') {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy753;
+ if (yych <= 0xE0) goto yy754;
+ goto yy755;
+ } else {
+ if (yych <= 0xF0) goto yy756;
+ if (yych <= 0xF3) goto yy757;
+ if (yych <= 0xF4) goto yy758;
+ goto yy73;
+ }
+ }
+yy751:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) {
+ if (yych <= ',') {
+ if (yych <= 0x00) goto yy73;
+ if (yych == '"') goto yy891;
+ goto yy750;
+ } else {
+ if (yych <= '-') goto yy892;
+ if (yych != '\\') goto yy750;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy753;
+ if (yych <= 0xE0) goto yy754;
+ goto yy755;
+ } else {
+ if (yych <= 0xF0) goto yy756;
+ if (yych <= 0xF3) goto yy757;
+ if (yych <= 0xF4) goto yy758;
+ goto yy73;
+ }
+ }
+yy752:
+ yych = *++YYCURSOR;
+ if (yych <= 0xC1) {
+ if (yych <= '*') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= ')') goto yy750;
+ goto yy604;
+ } else {
+ if (yych == '-') goto yy751;
+ if (yych <= 0x7F) goto yy750;
+ goto yy73;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy753;
+ if (yych <= 0xE0) goto yy754;
+ goto yy755;
+ } else {
+ if (yych <= 0xF0) goto yy756;
+ if (yych <= 0xF3) goto yy757;
+ if (yych <= 0xF4) goto yy758;
+ goto yy73;
+ }
+ }
+yy753:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy750;
+ goto yy73;
+yy754:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy73;
+ if (yych <= 0xBF) goto yy753;
+ goto yy73;
+yy755:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy753;
+ goto yy73;
+yy756:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy73;
+ if (yych <= 0xBF) goto yy755;
+ goto yy73;
+yy757:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy755;
+ goto yy73;
+yy758:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0x8F) goto yy755;
+ goto yy73;
+yy759:
+ yych = *++YYCURSOR;
+ if (yybm_bol[256+yych] & 2) {
+ goto yy759;
+ }
+ if (yych <= 0xC1) {
+ if (yych <= '*') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= '\'') goto yy891;
+ goto yy612;
+ } else {
+ if (yych <= '-') goto yy760;
+ if (yych <= '\\') goto yy761;
+ goto yy73;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy762;
+ if (yych <= 0xE0) goto yy763;
+ goto yy764;
+ } else {
+ if (yych <= 0xF0) goto yy765;
+ if (yych <= 0xF3) goto yy766;
+ if (yych <= 0xF4) goto yy767;
+ goto yy73;
+ }
+ }
+yy760:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) {
+ if (yych <= ',') {
+ if (yych <= 0x00) goto yy73;
+ if (yych == '\'') goto yy891;
+ goto yy759;
+ } else {
+ if (yych <= '-') goto yy893;
+ if (yych != '\\') goto yy759;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy762;
+ if (yych <= 0xE0) goto yy763;
+ goto yy764;
+ } else {
+ if (yych <= 0xF0) goto yy765;
+ if (yych <= 0xF3) goto yy766;
+ if (yych <= 0xF4) goto yy767;
+ goto yy73;
+ }
+ }
+yy761:
+ yych = *++YYCURSOR;
+ if (yych <= 0xC1) {
+ if (yych <= '*') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= ')') goto yy759;
+ goto yy612;
+ } else {
+ if (yych == '-') goto yy760;
+ if (yych <= 0x7F) goto yy759;
+ goto yy73;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy762;
+ if (yych <= 0xE0) goto yy763;
+ goto yy764;
+ } else {
+ if (yych <= 0xF0) goto yy765;
+ if (yych <= 0xF3) goto yy766;
+ if (yych <= 0xF4) goto yy767;
+ goto yy73;
+ }
+ }
+yy762:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy759;
+ goto yy73;
+yy763:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy73;
+ if (yych <= 0xBF) goto yy762;
+ goto yy73;
+yy764:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy762;
+ goto yy73;
+yy765:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy73;
+ if (yych <= 0xBF) goto yy764;
+ goto yy73;
+yy766:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy764;
+ goto yy73;
+yy767:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0x8F) goto yy764;
+ goto yy73;
+yy768:
+ yych = *++YYCURSOR;
+ if (yybm_bol[256+yych] & 4) {
+ goto yy768;
+ }
+ if (yych <= '=') {
+ if (yych <= ' ') {
+ if (yych <= '\t') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= 0x08) goto yy620;
+ goto yy622;
+ } else {
+ if (yych == '\r') goto yy622;
+ if (yych <= 0x1F) goto yy620;
+ goto yy622;
+ }
+ } else {
+ if (yych <= '\'') {
+ if (yych == '"') goto yy623;
+ if (yych <= '&') goto yy620;
+ goto yy624;
+ } else {
+ if (yych <= '/') goto yy620;
+ if (yych <= ':') goto yy455;
+ if (yych <= '<') goto yy620;
+ goto yy626;
+ }
+ }
+ } else {
+ if (yych <= 0x7F) {
+ if (yych <= '^') {
+ if (yych <= '>') goto yy894;
+ if (yych <= '@') goto yy620;
+ if (yych <= 'Z') goto yy455;
+ goto yy620;
+ } else {
+ if (yych == '`') goto yy620;
+ if (yych <= 'z') goto yy455;
+ goto yy620;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy628;
+ if (yych <= 0xE0) goto yy629;
+ goto yy630;
+ } else {
+ if (yych <= 0xF0) goto yy631;
+ if (yych <= 0xF3) goto yy632;
+ if (yych <= 0xF4) goto yy633;
+ goto yy73;
+ }
+ }
+ }
+yy769:
+ yych = *++YYCURSOR;
+ if (yybm_bol[256+yych] & 8) {
+ goto yy769;
+ }
+ if (yych <= 0xC1) {
+ if (yych <= '\'') {
+ if (yych <= 0x00) goto yy73;
+ if (yych >= '#') goto yy771;
+ } else {
+ if (yych <= '*') goto yy772;
+ if (yych <= '-') goto yy773;
+ if (yych <= '>') goto yy627;
+ goto yy73;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy774;
+ if (yych <= 0xE0) goto yy775;
+ goto yy776;
+ } else {
+ if (yych <= 0xF0) goto yy777;
+ if (yych <= 0xF3) goto yy778;
+ if (yych <= 0xF4) goto yy779;
+ goto yy73;
+ }
+ }
+yy770:
+ yych = *++YYCURSOR;
+ if (yybm_bol[256+yych] & 16) {
+ goto yy770;
+ }
+ if (yych <= 0xC1) {
+ if (yych <= '*') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= '\'') goto yy896;
+ goto yy780;
+ } else {
+ if (yych <= '-') goto yy897;
+ if (yych <= '>') goto yy898;
+ goto yy73;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy899;
+ if (yych <= 0xE0) goto yy900;
+ goto yy901;
+ } else {
+ if (yych <= 0xF0) goto yy902;
+ if (yych <= 0xF3) goto yy903;
+ if (yych <= 0xF4) goto yy904;
+ goto yy73;
+ }
+ }
+yy771:
+ yych = *++YYCURSOR;
+ if (yybm_bol[256+yych] & 32) {
+ goto yy771;
+ }
+ if (yych <= 0xC1) {
+ if (yych <= '*') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= '"') goto yy896;
+ goto yy781;
+ } else {
+ if (yych <= '-') goto yy905;
+ if (yych <= '>') goto yy906;
+ goto yy73;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy907;
+ if (yych <= 0xE0) goto yy908;
+ goto yy909;
+ } else {
+ if (yych <= 0xF0) goto yy910;
+ if (yych <= 0xF3) goto yy911;
+ if (yych <= 0xF4) goto yy912;
+ goto yy73;
+ }
+ }
+yy772:
+ yych = *++YYCURSOR;
+ if (yybm_bol[256+yych] & 64) {
+ goto yy772;
+ }
+ if (yych <= 0xDF) {
+ if (yych <= '\'') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= '"') goto yy780;
+ goto yy781;
+ } else {
+ if (yych <= '>') goto yy457;
+ if (yych <= 0xC1) goto yy73;
+ goto yy782;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy783;
+ if (yych <= 0xEF) goto yy784;
+ goto yy785;
+ } else {
+ if (yych <= 0xF3) goto yy786;
+ if (yych <= 0xF4) goto yy787;
+ goto yy73;
+ }
+ }
+yy773:
+ yych = *++YYCURSOR;
+ if (yych <= '>') {
+ if (yych <= '&') {
+ if (yych <= 0x00) goto yy73;
+ if (yych == '"') goto yy770;
+ goto yy769;
+ } else {
+ if (yych <= ',') {
+ if (yych <= '\'') goto yy771;
+ goto yy769;
+ } else {
+ if (yych <= '-') goto yy913;
+ if (yych <= '=') goto yy769;
+ goto yy627;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy769;
+ if (yych <= 0xC1) goto yy73;
+ if (yych >= 0xE0) goto yy775;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy776;
+ goto yy777;
+ } else {
+ if (yych <= 0xF3) goto yy778;
+ if (yych <= 0xF4) goto yy779;
+ goto yy73;
+ }
+ }
+ }
+yy774:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy769;
+ goto yy73;
+yy775:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy73;
+ if (yych <= 0xBF) goto yy774;
+ goto yy73;
+yy776:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy774;
+ goto yy73;
+yy777:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy73;
+ if (yych <= 0xBF) goto yy776;
+ goto yy73;
+yy778:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy776;
+ goto yy73;
+yy779:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0x8F) goto yy776;
+ goto yy73;
+yy780:
+ yych = *++YYCURSOR;
+ if (yybm_bol[256+yych] & 128) {
+ goto yy780;
+ }
+ if (yych <= 0xDF) {
+ if (yych <= '\'') {
+ if (yych <= 0x00) goto yy73;
+ goto yy914;
+ } else {
+ if (yych <= '>') goto yy915;
+ if (yych <= 0xC1) goto yy73;
+ goto yy916;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy917;
+ if (yych <= 0xEF) goto yy918;
+ goto yy919;
+ } else {
+ if (yych <= 0xF3) goto yy920;
+ if (yych <= 0xF4) goto yy921;
+ goto yy73;
+ }
+ }
+yy781:
+ yych = *++YYCURSOR;
+ if (yybm_bol[0+yych] & 1) {
+ goto yy781;
+ }
+ if (yych <= 0xDF) {
+ if (yych <= '"') {
+ if (yych <= 0x00) goto yy73;
+ goto yy914;
+ } else {
+ if (yych <= '>') goto yy922;
+ if (yych <= 0xC1) goto yy73;
+ goto yy923;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy924;
+ if (yych <= 0xEF) goto yy925;
+ goto yy926;
+ } else {
+ if (yych <= 0xF3) goto yy927;
+ if (yych <= 0xF4) goto yy928;
+ goto yy73;
+ }
+ }
+yy782:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy772;
+ goto yy73;
+yy783:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy73;
+ if (yych <= 0xBF) goto yy782;
+ goto yy73;
+yy784:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy782;
+ goto yy73;
+yy785:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy73;
+ if (yych <= 0xBF) goto yy784;
+ goto yy73;
+yy786:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy784;
+ goto yy73;
+yy787:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0x8F) goto yy784;
+ goto yy73;
+yy788:
+ yych = *++YYCURSOR;
+ if (yybm_bol[0+yych] & 2) {
+ goto yy788;
+ }
+ if (yych <= 0x7F) {
+ if (yych <= '<') {
+ if (yych <= 0x00) goto yy73;
+ if (yych != '/') goto yy637;
+ } else {
+ if (yych <= '=') goto yy638;
+ if (yych <= '>') goto yy325;
+ if (yych >= '@') goto yy637;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy641;
+ if (yych <= 0xE0) goto yy642;
+ goto yy643;
+ } else {
+ if (yych <= 0xF0) goto yy644;
+ if (yych <= 0xF3) goto yy645;
+ if (yych <= 0xF4) goto yy646;
+ goto yy73;
+ }
+ }
+yy789:
+ yych = *++YYCURSOR;
+ if (yybm_bol[512+yych] & 32) {
+ goto yy637;
+ }
+ if (yych <= 'z') {
+ if (yych <= '/') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= '-') goto yy788;
+ goto yy789;
+ } else {
+ if (yych <= ':') goto yy788;
+ if (yych <= '>') goto yy462;
+ if (yych <= '?') goto yy789;
+ goto yy788;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy641;
+ if (yych <= 0xE0) goto yy642;
+ goto yy643;
+ } else {
+ if (yych <= 0xF0) goto yy644;
+ if (yych <= 0xF3) goto yy645;
+ if (yych <= 0xF4) goto yy646;
+ goto yy73;
+ }
+ }
+yy790:
+ yych = *++YYCURSOR;
+ if (yych <= '>') {
+ if (yych <= '!') {
+ if (yych <= '\f') {
+ if (yych <= 0x00) goto yy73;
+ if (yych == '\t') goto yy790;
+ goto yy639;
+ } else {
+ if (yych <= '\r') goto yy790;
+ if (yych == ' ') goto yy790;
+ goto yy639;
+ }
+ } else {
+ if (yych <= '.') {
+ if (yych <= '"') goto yy637;
+ if (yych == '-') goto yy790;
+ goto yy639;
+ } else {
+ if (yych <= ':') {
+ if (yych >= '0') goto yy790;
+ } else {
+ if (yych <= '<') goto yy639;
+ if (yych <= '=') goto yy929;
+ goto yy792;
+ }
+ }
+ }
+ } else {
+ if (yych <= 'z') {
if (yych <= '[') {
- if (yych <= ':') goto yy4;
- if (yych <= '?') goto yy24;
- if (yych <= 'Z') goto yy101;
- goto yy24;
+ if (yych <= '?') goto yy791;
+ if (yych <= '@') goto yy639;
+ if (yych <= 'Z') goto yy790;
+ goto yy639;
} else {
- if (yych <= ']') {
- if (yych <= '\\') goto yy99;
- goto yy24;
+ if (yych <= '^') {
+ if (yych <= '\\') goto yy793;
+ goto yy639;
} else {
- if (yych <= '^') goto yy99;
- if (yych <= '_') goto yy101;
- goto yy24;
+ if (yych == '`') goto yy639;
+ goto yy790;
}
}
} else {
- if (yych <= '}') {
- if (yych == 'o') goto yy254;
- if (yych <= 'z') goto yy101;
- goto yy24;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy639;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy794;
+ goto yy795;
} else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy99;
- goto yy4;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy796;
+ goto yy797;
} else {
- if (yych <= 0xC1) goto yy24;
- if (yych <= 0xF4) goto yy4;
- goto yy24;
+ if (yych <= 0xF3) goto yy798;
+ if (yych <= 0xF4) goto yy799;
+ goto yy73;
}
}
}
}
-yy177:
- ++YYCURSOR;
- goto yy106;
-yy178:
- yyaccept = 6;
+yy791:
+ yych = *++YYCURSOR;
+ if (yybm_bol[512+yych] & 64) {
+ goto yy639;
+ }
+ if (yych <= '\\') {
+ if (yych <= '/') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= '"') goto yy637;
+ if (yych <= '-') goto yy790;
+ goto yy791;
+ } else {
+ if (yych <= '>') {
+ if (yych <= ':') goto yy790;
+ goto yy930;
+ } else {
+ if (yych <= '?') goto yy791;
+ if (yych <= 'Z') goto yy790;
+ goto yy793;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 'z') goto yy790;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy794;
+ goto yy795;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy796;
+ goto yy797;
+ } else {
+ if (yych <= 0xF3) goto yy798;
+ if (yych <= 0xF4) goto yy799;
+ goto yy73;
+ }
+ }
+ }
+yy792:
+ yyaccept = 37;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
+ if (yych <= 0xC1) {
+ if (yych <= '"') {
+ if (yych <= 0x00) goto yy326;
+ if (yych <= '!') goto yy931;
+ goto yy932;
+ } else {
+ if (yych == '\\') goto yy933;
+ if (yych <= 0x7F) goto yy931;
+ goto yy326;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy934;
+ if (yych <= 0xE0) goto yy935;
+ goto yy936;
+ } else {
+ if (yych <= 0xF0) goto yy937;
+ if (yych <= 0xF3) goto yy938;
+ if (yych <= 0xF4) goto yy939;
+ goto yy326;
+ }
}
- if (yych <= '/') {
- if (yych <= 0x1F) {
+yy793:
+ yych = *++YYCURSOR;
+ if (yych <= '^') {
+ if (yych <= ':') {
+ if (yych <= '-') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= ',') goto yy639;
+ goto yy790;
+ } else {
+ if (yych <= '.') goto yy639;
+ if (yych <= '/') goto yy791;
+ goto yy790;
+ }
+ } else {
+ if (yych <= '?') {
+ if (yych <= '=') goto yy639;
+ if (yych <= '>') goto yy792;
+ goto yy791;
+ } else {
+ if (yych <= '@') goto yy639;
+ if (yych <= 'Z') goto yy790;
+ goto yy639;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych == '`') goto yy639;
+ goto yy790;
+ } else {
+ if (yych <= 0x7F) goto yy639;
+ if (yych <= 0xC1) goto yy73;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy795;
+ if (yych <= 0xEF) goto yy796;
+ goto yy797;
+ } else {
+ if (yych <= 0xF3) goto yy798;
+ if (yych <= 0xF4) goto yy799;
+ goto yy73;
+ }
+ }
+ }
+yy794:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy639;
+ goto yy73;
+yy795:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy73;
+ if (yych <= 0xBF) goto yy794;
+ goto yy73;
+yy796:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy794;
+ goto yy73;
+yy797:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy73;
+ if (yych <= 0xBF) goto yy796;
+ goto yy73;
+yy798:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy796;
+ goto yy73;
+yy799:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0x8F) goto yy796;
+ goto yy73;
+yy800:
+ yych = *++YYCURSOR;
+ if (yych <= '>') {
+ if (yych <= '&') {
if (yych <= '\f') {
- if (yych <= 0x00) goto yy26;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy26;
- goto yy4;
+ if (yych <= 0x00) goto yy73;
+ if (yych == '\t') goto yy800;
+ goto yy640;
} else {
- if (yych <= '\r') goto yy26;
- if (yych == 0x1B) goto yy26;
- goto yy4;
+ if (yych <= '\r') goto yy800;
+ if (yych == ' ') goto yy800;
+ goto yy640;
}
} else {
- if (yych <= '*') {
- if (yych <= '#') goto yy26;
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy105;
- goto yy26;
+ if (yych <= '.') {
+ if (yych <= '\'') goto yy637;
+ if (yych == '-') goto yy800;
+ goto yy640;
} else {
- if (yych <= ',') {
- if (yych <= '+') goto yy80;
- goto yy26;
+ if (yych <= ':') {
+ if (yych >= '0') goto yy800;
} else {
- if (yych <= '-') goto yy255;
- if (yych <= '.') goto yy256;
- goto yy4;
+ if (yych <= '<') goto yy640;
+ if (yych <= '=') goto yy940;
+ goto yy802;
}
}
}
} else {
- if (yych <= '_') {
- if (yych <= '@') {
- if (yych <= '9') goto yy257;
- if (yych <= ':') goto yy4;
- if (yych <= '?') goto yy26;
- goto yy96;
+ if (yych <= 'z') {
+ if (yych <= '[') {
+ if (yych <= '?') goto yy801;
+ if (yych <= '@') goto yy640;
+ if (yych <= 'Z') goto yy800;
+ goto yy640;
} else {
- if (yych <= 'E') {
- if (yych <= 'D') goto yy258;
- goto yy259;
+ if (yych <= '^') {
+ if (yych <= '\\') goto yy803;
+ goto yy640;
} else {
- if (yych <= 'Z') goto yy258;
- if (yych <= '^') goto yy26;
- goto yy258;
+ if (yych == '`') goto yy640;
+ goto yy800;
}
}
} else {
- if (yych <= 'z') {
- if (yych <= '`') goto yy26;
- if (yych == 'e') goto yy259;
- goto yy258;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy640;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy804;
+ goto yy805;
} else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy26;
- goto yy4;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy806;
+ goto yy807;
} else {
- if (yych <= 0xC1) goto yy26;
- if (yych <= 0xF4) goto yy4;
- goto yy26;
+ if (yych <= 0xF3) goto yy808;
+ if (yych <= 0xF4) goto yy809;
+ goto yy73;
}
}
}
}
-yy179:
- yyaccept = 6;
+yy801:
+ yych = *++YYCURSOR;
+ if (yybm_bol[512+yych] & 128) {
+ goto yy640;
+ }
+ if (yych <= '\\') {
+ if (yych <= '/') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= '\'') goto yy637;
+ if (yych <= '-') goto yy800;
+ goto yy801;
+ } else {
+ if (yych <= '>') {
+ if (yych <= ':') goto yy800;
+ goto yy941;
+ } else {
+ if (yych <= '?') goto yy801;
+ if (yych <= 'Z') goto yy800;
+ goto yy803;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 'z') goto yy800;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy804;
+ goto yy805;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy806;
+ goto yy807;
+ } else {
+ if (yych <= 0xF3) goto yy808;
+ if (yych <= 0xF4) goto yy809;
+ goto yy73;
+ }
+ }
+ }
+yy802:
+ yyaccept = 37;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
+ if (yych <= 0xC1) {
+ if (yych <= '\'') {
+ if (yych <= 0x00) goto yy326;
+ if (yych <= '&') goto yy942;
+ goto yy932;
+ } else {
+ if (yych == '\\') goto yy943;
+ if (yych <= 0x7F) goto yy942;
+ goto yy326;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy944;
+ if (yych <= 0xE0) goto yy945;
+ goto yy946;
+ } else {
+ if (yych <= 0xF0) goto yy947;
+ if (yych <= 0xF3) goto yy948;
+ if (yych <= 0xF4) goto yy949;
+ goto yy326;
+ }
}
- if (yych <= '/') {
- if (yych <= 0x1F) {
+yy803:
+ yych = *++YYCURSOR;
+ if (yych <= '^') {
+ if (yych <= ':') {
+ if (yych <= '-') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= ',') goto yy640;
+ goto yy800;
+ } else {
+ if (yych <= '.') goto yy640;
+ if (yych <= '/') goto yy801;
+ goto yy800;
+ }
+ } else {
+ if (yych <= '?') {
+ if (yych <= '=') goto yy640;
+ if (yych <= '>') goto yy802;
+ goto yy801;
+ } else {
+ if (yych <= '@') goto yy640;
+ if (yych <= 'Z') goto yy800;
+ goto yy640;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych == '`') goto yy640;
+ goto yy800;
+ } else {
+ if (yych <= 0x7F) goto yy640;
+ if (yych <= 0xC1) goto yy73;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy805;
+ if (yych <= 0xEF) goto yy806;
+ goto yy807;
+ } else {
+ if (yych <= 0xF3) goto yy808;
+ if (yych <= 0xF4) goto yy809;
+ goto yy73;
+ }
+ }
+ }
+yy804:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy640;
+ goto yy73;
+yy805:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy73;
+ if (yych <= 0xBF) goto yy804;
+ goto yy73;
+yy806:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy804;
+ goto yy73;
+yy807:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy73;
+ if (yych <= 0xBF) goto yy806;
+ goto yy73;
+yy808:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy806;
+ goto yy73;
+yy809:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0x8F) goto yy806;
+ goto yy73;
+yy810:
+ yych = *++YYCURSOR;
+ if (yych <= ' ') {
+ if (yych <= '\f') {
+ if (yych == '\t') goto yy810;
+ goto yy73;
+ } else {
+ if (yych <= '\r') goto yy810;
+ if (yych <= 0x1F) goto yy73;
+ goto yy810;
+ }
+ } else {
+ if (yych <= '<') {
+ if (yych == '/') goto yy324;
+ goto yy73;
+ } else {
+ if (yych <= '=') goto yy649;
+ if (yych == '?') goto yy324;
+ goto yy73;
+ }
+ }
+yy811:
+ yych = *++YYCURSOR;
+ if (yych <= '^') {
+ if (yych <= ':') {
+ if (yych <= '-') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= ',') goto yy811;
+ goto yy950;
+ } else {
+ if (yych <= '.') goto yy811;
+ if (yych <= '/') goto yy951;
+ goto yy950;
+ }
+ } else {
+ if (yych <= '?') {
+ if (yych <= '=') goto yy811;
+ if (yych <= '>') goto yy73;
+ goto yy951;
+ } else {
+ if (yych <= '@') goto yy811;
+ if (yych <= 'Z') goto yy950;
+ goto yy811;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych == '`') goto yy811;
+ goto yy950;
+ } else {
+ if (yych <= 0x7F) goto yy811;
+ if (yych <= 0xC1) goto yy73;
+ goto yy815;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy816;
+ if (yych <= 0xEF) goto yy817;
+ goto yy818;
+ } else {
+ if (yych <= 0xF3) goto yy819;
+ if (yych <= 0xF4) goto yy820;
+ goto yy73;
+ }
+ }
+ }
+yy812:
+ yych = *++YYCURSOR;
+ if (yych <= '=') {
+ if (yych <= '!') {
if (yych <= '\f') {
- if (yych <= 0x00) goto yy26;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy26;
- goto yy4;
+ if (yych <= 0x00) goto yy73;
+ if (yych == '\t') goto yy812;
+ goto yy811;
} else {
- if (yych <= '\r') goto yy26;
- if (yych == 0x1B) goto yy26;
- goto yy4;
+ if (yych <= '\r') goto yy812;
+ if (yych == ' ') goto yy812;
+ goto yy811;
}
} else {
- if (yych <= '*') {
- if (yych <= '#') goto yy26;
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy105;
- goto yy26;
+ if (yych <= ',') {
+ if (yych <= '"') goto yy813;
+ if (yych == '\'') goto yy814;
+ goto yy811;
} else {
- if (yych <= ',') {
- if (yych <= '+') goto yy80;
- goto yy26;
+ if (yych <= '.') {
+ if (yych <= '-') goto yy950;
+ goto yy811;
} else {
- if (yych <= '-') goto yy255;
- if (yych <= '.') goto yy256;
- goto yy4;
+ if (yych <= '/') goto yy951;
+ if (yych <= ':') goto yy950;
+ goto yy811;
}
}
}
} else {
- if (yych <= '_') {
- if (yych <= '@') {
- if (yych <= '9') goto yy178;
- if (yych <= ':') goto yy4;
- if (yych <= '?') goto yy26;
- goto yy96;
+ if (yych <= 'z') {
+ if (yych <= 'Z') {
+ if (yych <= '>') goto yy73;
+ if (yych <= '?') goto yy951;
+ if (yych <= '@') goto yy811;
+ goto yy950;
+ } else {
+ if (yych == '_') goto yy950;
+ if (yych <= '`') goto yy811;
+ goto yy950;
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy811;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy815;
+ goto yy816;
} else {
- if (yych <= 'E') {
- if (yych <= 'D') goto yy258;
- goto yy259;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy817;
+ goto yy818;
} else {
- if (yych <= 'Z') goto yy258;
- if (yych <= '^') goto yy26;
- goto yy258;
+ if (yych <= 0xF3) goto yy819;
+ if (yych <= 0xF4) goto yy820;
+ goto yy73;
}
}
+ }
+ }
+yy813:
+ yych = *++YYCURSOR;
+ if (yych <= '[') {
+ if (yych <= '/') {
+ if (yych <= '"') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= '!') goto yy813;
+ goto yy811;
+ } else {
+ if (yych == '-') goto yy952;
+ if (yych <= '.') goto yy813;
+ goto yy953;
+ }
} else {
- if (yych <= 'z') {
- if (yych <= '`') goto yy26;
- if (yych == 'e') goto yy259;
- goto yy258;
+ if (yych <= '>') {
+ if (yych <= ':') goto yy952;
+ if (yych <= '=') goto yy813;
+ goto yy954;
+ } else {
+ if (yych <= '?') goto yy953;
+ if (yych <= '@') goto yy813;
+ if (yych <= 'Z') goto yy952;
+ goto yy813;
+ }
+ }
+ } else {
+ if (yych <= 0xC1) {
+ if (yych <= '_') {
+ if (yych <= '\\') goto yy955;
+ if (yych <= '^') goto yy813;
+ goto yy952;
+ } else {
+ if (yych <= '`') goto yy813;
+ if (yych <= 'z') goto yy952;
+ if (yych <= 0x7F) goto yy813;
+ goto yy73;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy956;
+ if (yych <= 0xE0) goto yy957;
+ goto yy958;
+ } else {
+ if (yych <= 0xF0) goto yy959;
+ if (yych <= 0xF3) goto yy960;
+ if (yych <= 0xF4) goto yy961;
+ goto yy73;
+ }
+ }
+ }
+yy814:
+ yych = *++YYCURSOR;
+ if (yych <= '[') {
+ if (yych <= '/') {
+ if (yych <= '\'') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= '&') goto yy814;
+ goto yy811;
+ } else {
+ if (yych == '-') goto yy962;
+ if (yych <= '.') goto yy814;
+ goto yy963;
+ }
+ } else {
+ if (yych <= '>') {
+ if (yych <= ':') goto yy962;
+ if (yych <= '=') goto yy814;
+ goto yy964;
+ } else {
+ if (yych <= '?') goto yy963;
+ if (yych <= '@') goto yy814;
+ if (yych <= 'Z') goto yy962;
+ goto yy814;
+ }
+ }
+ } else {
+ if (yych <= 0xC1) {
+ if (yych <= '_') {
+ if (yych <= '\\') goto yy965;
+ if (yych <= '^') goto yy814;
+ goto yy962;
+ } else {
+ if (yych <= '`') goto yy814;
+ if (yych <= 'z') goto yy962;
+ if (yych <= 0x7F) goto yy814;
+ goto yy73;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy966;
+ if (yych <= 0xE0) goto yy967;
+ goto yy968;
+ } else {
+ if (yych <= 0xF0) goto yy969;
+ if (yych <= 0xF3) goto yy970;
+ if (yych <= 0xF4) goto yy971;
+ goto yy73;
+ }
+ }
+ }
+yy815:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy811;
+ goto yy73;
+yy816:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy73;
+ if (yych <= 0xBF) goto yy815;
+ goto yy73;
+yy817:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy815;
+ goto yy73;
+yy818:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy73;
+ if (yych <= 0xBF) goto yy817;
+ goto yy73;
+yy819:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy817;
+ goto yy73;
+yy820:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0x8F) goto yy817;
+ goto yy73;
+yy821:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy972;
+ goto yy73;
+yy822:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy170;
+ if (yych <= '9') goto yy973;
+ goto yy170;
+ } else {
+ if (yych <= 'F') goto yy973;
+ if (yych <= '`') goto yy170;
+ if (yych <= 'f') goto yy974;
+ goto yy170;
+ }
+yy823:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy201;
+ if (yych <= '9') goto yy974;
+ goto yy201;
+ } else {
+ if (yych <= 'F') goto yy974;
+ if (yych <= '`') goto yy201;
+ if (yych <= 'f') goto yy974;
+ goto yy201;
+ }
+yy824:
+ yych = *++YYCURSOR;
+ if (yych <= '^') {
+ if (yych <= '2') {
+ if (yych <= '/') {
+ if (yych == '-') {
+ yyt2 = YYCURSOR;
+ goto yy476;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= '0') goto yy975;
+ if (yych <= '1') goto yy976;
+ goto yy977;
+ }
+ } else {
+ if (yych <= '@') {
+ if (yych <= '9') goto yy975;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy310;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
} else {
+ if (yych <= 'F') goto yy978;
+ if (yych <= 'Z') goto yy481;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ }
+ } else {
+ if (yych <= 0xC1) {
+ if (yych <= 'f') {
+ if (yych <= '_') {
+ yyt2 = YYCURSOR;
+ goto yy483;
+ }
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy978;
+ } else {
+ if (yych <= 'z') goto yy481;
if (yych <= 0x7F) {
- if (yych <= '~') goto yy26;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy26;
- if (yych <= 0xF4) goto yy4;
- goto yy26;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy73;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ yyt2 = YYCURSOR;
+ goto yy315;
+ } else {
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy316;
}
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
}
}
}
-yy180:
- yyaccept = 6;
+yy825:
+ yyaccept = 7;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
+ if (yych == '.') goto yy979;
+ if (yych <= '/') goto yy482;
+ if (yych <= '9') goto yy980;
+ goto yy482;
+yy826:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '.') goto yy979;
+ if (yych <= '/') goto yy482;
+ if (yych <= '9') goto yy825;
+ goto yy482;
+yy827:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '/') {
+ if (yych == '.') goto yy979;
+ goto yy482;
+ } else {
+ if (yych <= '4') goto yy825;
+ if (yych <= '5') goto yy981;
+ if (yych <= '9') goto yy980;
+ goto yy482;
}
- if (yych <= '4') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy26;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy26;
- goto yy4;
+yy828:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '_') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= ',') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy656;
+ }
+ yyt2 = YYCURSOR;
+ goto yy663;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') goto yy26;
- goto yy4;
- } else {
- if (yych <= 0x1B) goto yy26;
- if (yych <= 0x1F) goto yy4;
- goto yy26;
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy565;
}
+ if (yych <= '9') goto yy982;
+ yyt2 = YYCURSOR;
+ goto yy659;
}
} else {
- if (yych <= '+') {
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy105;
- if (yych <= '*') goto yy26;
- goto yy80;
+ if (yych <= 'F') {
+ if (yych <= '?') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ goto yy982;
} else {
- if (yych <= '-') {
- if (yych <= ',') goto yy26;
- goto yy255;
- } else {
- if (yych <= '.') goto yy256;
- if (yych <= '/') goto yy4;
- goto yy178;
+ if (yych <= 'Z') goto yy481;
+ if (yych <= '^') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
+ yyt2 = YYCURSOR;
+ goto yy483;
}
}
} else {
- if (yych <= '^') {
- if (yych <= '?') {
- if (yych <= '5') goto yy260;
- if (yych <= '9') goto yy257;
- if (yych <= ':') goto yy4;
- goto yy26;
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 'f') goto yy982;
+ goto yy481;
} else {
- if (yych <= 'D') {
- if (yych <= '@') goto yy96;
- goto yy258;
- } else {
- if (yych <= 'E') goto yy259;
- if (yych <= 'Z') goto yy258;
- goto yy26;
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
+ if (yych <= 0xC1) goto yy39;
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy39;
+ }
+ }
+ }
+yy829:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '_') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= ',') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy656;
+ }
+ yyt2 = YYCURSOR;
+ goto yy657;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ if (yych <= '9') goto yy982;
+ yyt2 = YYCURSOR;
+ goto yy659;
}
} else {
+ if (yych <= 'F') {
+ if (yych <= '?') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ goto yy982;
+ } else {
+ if (yych <= 'Z') goto yy481;
+ if (yych <= '^') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt2 = YYCURSOR;
+ goto yy483;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
if (yych <= 'z') {
if (yych <= '`') {
- if (yych <= '_') goto yy258;
- goto yy26;
- } else {
- if (yych == 'e') goto yy259;
- goto yy258;
+ yyt2 = YYCURSOR;
+ goto yy305;
}
+ if (yych <= 'f') goto yy982;
+ goto yy481;
} else {
if (yych <= 0x7F) {
- if (yych <= '~') goto yy26;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy26;
- if (yych <= 0xF4) goto yy4;
- goto yy26;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy39;
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
}
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy39;
}
}
}
-yy181:
- yyaccept = 0;
+yy830:
+ yych = *++YYCURSOR;
+ if (yych == ' ') goto yy983;
+ goto yy153;
+yy831:
+ yych = *++YYCURSOR;
+ if (yych == ' ') goto yy984;
+ goto yy73;
+yy832:
+ yyaccept = 15;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ':') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy5;
- if (yych <= 0x08) goto yy3;
- if (yych <= '\n') goto yy5;
- goto yy3;
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy155;
+ goto yy88;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') goto yy5;
- goto yy3;
- } else {
- if (yych <= 0x1B) goto yy5;
- if (yych <= 0x1F) goto yy3;
- goto yy5;
+ if (yych == '+') goto yy88;
+ goto yy155;
+ }
+ } else {
+ if (yych <= '.') {
+ if (yych <= '-') goto yy121;
+ yyt3 = YYCURSOR;
+ goto yy349;
+ } else {
+ if (yych <= '/') goto yy123;
+ if (yych <= '9') goto yy974;
+ yyt3 = YYCURSOR;
+ goto yy353;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') {
+ if (yych <= '?') goto yy155;
+ goto yy129;
+ } else {
+ if (yych <= 'F') goto yy974;
+ if (yych <= 'Z') goto yy200;
+ goto yy155;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych <= '_') goto yy49;
+ goto yy155;
+ } else {
+ if (yych <= 'f') goto yy985;
+ if (yych <= 'z') goto yy489;
+ goto yy155;
+ }
+ }
+ }
+yy833:
+ yych = *++YYCURSOR;
+ if (yych == '-') goto yy986;
+ goto yy73;
+yy834:
+ yych = *++YYCURSOR;
+ if (yych <= '/') {
+ if (yych <= '\f') {
+ if (yych == '\t') goto yy332;
+ goto yy89;
+ } else {
+ if (yych <= '\r') goto yy332;
+ if (yych == ' ') goto yy332;
+ goto yy89;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '9') goto yy137;
+ if (yych <= '@') goto yy89;
+ if (yych <= 'Z') goto yy137;
+ goto yy89;
+ } else {
+ if (yych == '`') goto yy89;
+ if (yych <= 'z') goto yy137;
+ goto yy89;
+ }
+ }
+yy835:
+ yyaccept = 24;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == ':') goto yy123;
+ goto yy156;
+yy836:
+ yych = *++YYCURSOR;
+ if (yych <= 0xC1) {
+ if (yych <= '9') {
+ if (yych == '.') {
+ yyt2 = YYCURSOR;
+ goto yy989;
+ }
+ yyt2 = YYCURSOR;
+ goto yy987;
+ } else {
+ if (yych <= ':') goto yy73;
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy987;
+ }
+ goto yy73;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy990;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy991;
+ }
+ yyt2 = YYCURSOR;
+ goto yy992;
+ } else {
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy993;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy994;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy995;
+ }
+ goto yy73;
+ }
+ }
+yy837:
+ yych = *++YYCURSOR;
+ if (yych == '+') goto yy996;
+ goto yy73;
+yy838:
+ yych = *++YYCURSOR;
+ if (yych == 'm') goto yy997;
+ goto yy114;
+yy839:
+ yyaccept = 31;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'Z') {
+ if (yych <= '-') {
+ if (yych <= '*') {
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy1000;
}
+ yyt1 = YYCURSOR;
+ goto yy998;
+ } else {
+ if (yych <= '+') {
+ yyt1 = YYCURSOR;
+ goto yy1000;
+ }
+ if (yych <= ',') {
+ yyt1 = YYCURSOR;
+ goto yy998;
+ }
+ yyt1 = YYCURSOR;
+ goto yy1001;
}
} else {
- if (yych <= '+') {
- if (yych <= '$') goto yy3;
- if (yych <= '%') goto yy80;
- if (yych <= '*') goto yy5;
- goto yy80;
+ if (yych <= '9') {
+ if (yych <= '.') {
+ yyt1 = YYCURSOR;
+ goto yy1002;
+ }
+ if (yych <= '/') {
+ yyt1 = YYCURSOR;
+ goto yy1003;
+ }
+ goto yy1004;
+ } else {
+ if (yych <= ':') {
+ yyt1 = YYCURSOR;
+ goto yy1005;
+ }
+ if (yych <= '?') {
+ yyt1 = YYCURSOR;
+ goto yy998;
+ }
+ if (yych <= '@') {
+ yyt1 = YYCURSOR;
+ goto yy1006;
+ }
+ yyt1 = YYCURSOR;
+ goto yy1007;
+ }
+ }
+ } else {
+ if (yych <= 0xC1) {
+ if (yych <= '`') {
+ if (yych == '_') {
+ yyt1 = YYCURSOR;
+ goto yy1007;
+ }
+ yyt1 = YYCURSOR;
+ goto yy998;
+ } else {
+ if (yych <= 'z') {
+ yyt1 = YYCURSOR;
+ goto yy1007;
+ }
+ if (yych <= 0x7F) {
+ yyt1 = YYCURSOR;
+ goto yy998;
+ }
+ goto yy532;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
+ yyt1 = YYCURSOR;
+ goto yy1008;
+ }
+ if (yych <= 0xE0) {
+ yyt1 = YYCURSOR;
+ goto yy1009;
+ }
+ yyt1 = YYCURSOR;
+ goto yy1010;
+ } else {
+ if (yych <= 0xF0) {
+ yyt1 = YYCURSOR;
+ goto yy1011;
+ }
+ if (yych <= 0xF3) {
+ yyt1 = YYCURSOR;
+ goto yy1012;
+ }
+ if (yych <= 0xF4) {
+ yyt1 = YYCURSOR;
+ goto yy1013;
+ }
+ goto yy532;
+ }
+ }
+ }
+yy840:
+ yyaccept = 31;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'Z') {
+ if (yych <= '-') {
+ if (yych <= '*') {
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy1000;
+ }
+ yyt1 = YYCURSOR;
+ goto yy998;
} else {
+ if (yych <= '+') {
+ yyt1 = YYCURSOR;
+ goto yy1000;
+ }
+ if (yych <= ',') {
+ yyt1 = YYCURSOR;
+ goto yy998;
+ }
+ yyt1 = YYCURSOR;
+ goto yy1001;
+ }
+ } else {
+ if (yych <= '9') {
if (yych <= '.') {
- if (yych <= ',') goto yy5;
- goto yy46;
- } else {
- if (yych <= '/') goto yy3;
- if (yych <= '9') goto yy261;
- goto yy62;
+ yyt1 = YYCURSOR;
+ goto yy1002;
+ }
+ if (yych <= '/') {
+ yyt1 = YYCURSOR;
+ goto yy1003;
+ }
+ goto yy839;
+ } else {
+ if (yych <= ':') {
+ yyt1 = YYCURSOR;
+ goto yy1005;
+ }
+ if (yych <= '?') {
+ yyt1 = YYCURSOR;
+ goto yy998;
+ }
+ if (yych <= '@') {
+ yyt1 = YYCURSOR;
+ goto yy1006;
}
+ yyt1 = YYCURSOR;
+ goto yy1007;
}
}
} else {
- if (yych <= 'z') {
- if (yych <= 'Z') {
- if (yych <= '?') goto yy5;
- if (yych <= '@') goto yy96;
- if (yych <= 'F') goto yy261;
- goto yy46;
+ if (yych <= 0xC1) {
+ if (yych <= '`') {
+ if (yych == '_') {
+ yyt1 = YYCURSOR;
+ goto yy1007;
+ }
+ yyt1 = YYCURSOR;
+ goto yy998;
} else {
- if (yych <= '_') {
- if (yych <= '^') goto yy5;
- goto yy46;
- } else {
- if (yych <= '`') goto yy5;
- if (yych <= 'f') goto yy261;
- goto yy46;
+ if (yych <= 'z') {
+ yyt1 = YYCURSOR;
+ goto yy1007;
}
+ if (yych <= 0x7F) {
+ yyt1 = YYCURSOR;
+ goto yy998;
+ }
+ goto yy532;
}
} else {
- if (yych <= 0xE0) {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
+ yyt1 = YYCURSOR;
+ goto yy1008;
+ }
+ if (yych <= 0xE0) {
+ yyt1 = YYCURSOR;
+ goto yy1009;
+ }
+ yyt1 = YYCURSOR;
+ goto yy1010;
+ } else {
+ if (yych <= 0xF0) {
+ yyt1 = YYCURSOR;
+ goto yy1011;
+ }
+ if (yych <= 0xF3) {
+ yyt1 = YYCURSOR;
+ goto yy1012;
+ }
+ if (yych <= 0xF4) {
+ yyt1 = YYCURSOR;
+ goto yy1013;
+ }
+ goto yy532;
+ }
+ }
+ }
+yy841:
+ yyaccept = 31;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '.') {
+ if (yych <= '*') {
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy1000;
+ }
+ yyt1 = YYCURSOR;
+ goto yy998;
+ } else {
+ if (yych <= '+') {
+ yyt1 = YYCURSOR;
+ goto yy1000;
+ }
+ if (yych <= ',') {
+ yyt1 = YYCURSOR;
+ goto yy998;
+ }
+ if (yych <= '-') {
+ yyt1 = YYCURSOR;
+ goto yy1001;
+ }
+ yyt1 = YYCURSOR;
+ goto yy1002;
+ }
+ } else {
+ if (yych <= '5') {
+ if (yych <= '/') {
+ yyt1 = YYCURSOR;
+ goto yy1003;
+ }
+ if (yych <= '4') goto yy839;
+ goto yy1014;
+ } else {
+ if (yych <= '9') goto yy1004;
+ if (yych <= ':') {
+ yyt1 = YYCURSOR;
+ goto yy1005;
+ }
+ if (yych <= '?') {
+ yyt1 = YYCURSOR;
+ goto yy998;
+ }
+ yyt1 = YYCURSOR;
+ goto yy1006;
+ }
+ }
+ } else {
+ if (yych <= 0xC1) {
+ if (yych <= '_') {
+ if (yych <= 'Z') {
+ yyt1 = YYCURSOR;
+ goto yy1007;
+ }
+ if (yych <= '^') {
+ yyt1 = YYCURSOR;
+ goto yy998;
+ }
+ yyt1 = YYCURSOR;
+ goto yy1007;
+ } else {
+ if (yych <= '`') {
+ yyt1 = YYCURSOR;
+ goto yy998;
+ }
+ if (yych <= 'z') {
+ yyt1 = YYCURSOR;
+ goto yy1007;
+ }
if (yych <= 0x7F) {
- if (yych <= '~') goto yy5;
- goto yy3;
- } else {
- if (yych <= 0xC1) goto yy5;
- if (yych <= 0xDF) goto yy56;
- goto yy57;
+ yyt1 = YYCURSOR;
+ goto yy998;
+ }
+ goto yy532;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
+ yyt1 = YYCURSOR;
+ goto yy1008;
}
+ if (yych <= 0xE0) {
+ yyt1 = YYCURSOR;
+ goto yy1009;
+ }
+ yyt1 = YYCURSOR;
+ goto yy1010;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy58;
- goto yy59;
- } else {
- if (yych <= 0xF3) goto yy60;
- if (yych <= 0xF4) goto yy61;
- goto yy5;
+ yyt1 = YYCURSOR;
+ goto yy1011;
+ }
+ if (yych <= 0xF3) {
+ yyt1 = YYCURSOR;
+ goto yy1012;
+ }
+ if (yych <= 0xF4) {
+ yyt1 = YYCURSOR;
+ goto yy1013;
}
+ goto yy532;
}
}
}
-yy182:
- yyaccept = 0;
+yy842:
+ yyaccept = 23;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '1') {
- if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
+ if (yych <= ':') {
+ if (yych <= '*') {
+ if (yych == '%') goto yy531;
+ goto yy274;
+ } else {
+ if (yych == ',') goto yy274;
+ goto yy531;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '?') goto yy274;
+ if (yych <= 'Z') goto yy531;
+ goto yy274;
+ } else {
+ if (yych == '`') goto yy274;
+ if (yych <= 'z') goto yy531;
+ goto yy274;
+ }
+ }
+yy843:
+ yyaccept = 31;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'a') {
+ if (yych == 'B') goto yy842;
+ goto yy531;
+ } else {
+ if (yych <= 'b') goto yy842;
+ if (yych == 'i') goto yy1015;
+ goto yy531;
+ }
+yy844:
+ yyaccept = 23;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'S') {
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy274;
+ goto yy531;
+ } else {
+ if (yych == '+') goto yy531;
+ goto yy274;
+ }
+ } else {
+ if (yych <= 'A') {
+ if (yych <= ':') goto yy531;
+ if (yych <= '?') goto yy274;
+ goto yy531;
+ } else {
+ if (yych <= 'B') goto yy842;
+ if (yych <= 'R') goto yy531;
+ goto yy842;
+ }
+ }
+ } else {
+ if (yych <= 'b') {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy531;
+ if (yych <= '^') goto yy274;
+ goto yy531;
+ } else {
+ if (yych <= '`') goto yy274;
+ if (yych <= 'a') goto yy531;
+ goto yy842;
+ }
+ } else {
+ if (yych <= 'r') {
+ if (yych == 'i') goto yy1016;
+ goto yy531;
+ } else {
+ if (yych <= 's') goto yy842;
+ if (yych <= 'z') goto yy531;
+ goto yy274;
+ }
+ }
+ }
+yy845:
+ yyaccept = 31;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == 'S') goto yy842;
+ if (yych == 's') goto yy842;
+ goto yy531;
+yy846:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1017;
+ goto yy73;
+ } else {
+ if (yych <= 'F') goto yy1017;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy1017;
+ goto yy73;
+ }
+yy847:
+ yych = *++YYCURSOR;
+ if (yych <= 'Z') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1018;
+ if (yych <= '@') goto yy73;
+ goto yy277;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy73;
+ goto yy277;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'z') goto yy277;
+ goto yy73;
+ }
+ }
+yy848:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1019;
+ goto yy73;
+yy849:
+ yych = *++YYCURSOR;
+ if (yych <= 'Z') {
+ if (yych <= '/') goto yy89;
+ if (yych <= '9') goto yy1020;
+ if (yych <= '@') goto yy89;
+ goto yy137;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy89;
+ goto yy137;
+ } else {
+ if (yych <= '`') goto yy89;
+ if (yych <= 'z') goto yy137;
+ goto yy89;
+ }
+ }
+yy850:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '-') goto yy849;
+ goto yy138;
+yy851:
+ yych = *++YYCURSOR;
+ if (yych <= 'Z') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1022;
+ if (yych <= '@') goto yy73;
+ goto yy277;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy73;
+ goto yy277;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'z') goto yy277;
+ goto yy73;
+ }
+ }
+yy852:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '/') goto yy851;
+ goto yy278;
+yy853:
+ yyaccept = 12;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ if (yych <= '9') {
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy125;
+ goto yy119;
+ } else {
+ if (yych == '+') goto yy88;
+ goto yy125;
+ }
} else {
if (yych <= '.') {
- if (yych <= ',') goto yy4;
- goto yy46;
+ if (yych <= '-') goto yy121;
+ goto yy409;
} else {
- if (yych <= '/') goto yy4;
- if (yych <= '0') goto yy262;
- goto yy263;
+ if (yych <= '/') goto yy123;
+ if (yych <= '7') goto yy1023;
+ goto yy1024;
}
}
} else {
if (yych <= 'Z') {
- if (yych <= '9') {
- if (yych <= '2') goto yy264;
- goto yy262;
+ if (yych <= '?') {
+ if (yych <= ':') goto yy292;
+ goto yy125;
} else {
- if (yych <= '?') goto yy4;
- if (yych <= '@') goto yy96;
- goto yy46;
+ if (yych <= '@') goto yy129;
+ if (yych <= 'F') goto yy1025;
+ goto yy134;
}
} else {
- if (yych <= '_') {
- if (yych <= '^') goto yy4;
- goto yy46;
+ if (yych <= '`') {
+ if (yych == '_') goto yy137;
+ goto yy125;
} else {
- if (yych <= '`') goto yy4;
- if (yych <= 'z') goto yy46;
- goto yy4;
+ if (yych <= 'f') goto yy1025;
+ if (yych <= 'z') goto yy134;
+ goto yy125;
}
}
}
-yy183:
- yyaccept = 0;
+yy854:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '@') goto yy4;
- if (yych <= 'Z') goto yy265;
- if (yych <= '`') goto yy4;
- if (yych <= 'z') goto yy265;
- goto yy4;
-yy184:
- yyaccept = 11;
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ if (yych <= ':') {
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy127;
+ goto yy119;
+ } else {
+ if (yych == '+') goto yy88;
+ goto yy127;
+ }
+ } else {
+ if (yych <= '.') {
+ if (yych <= '-') goto yy121;
+ goto yy409;
+ } else {
+ if (yych <= '/') goto yy123;
+ if (yych <= '9') goto yy1024;
+ goto yy292;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') {
+ if (yych <= '?') goto yy127;
+ goto yy129;
+ } else {
+ if (yych <= 'F') goto yy1025;
+ if (yych <= 'Z') goto yy134;
+ goto yy127;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych <= '_') goto yy137;
+ goto yy127;
+ } else {
+ if (yych <= 'f') goto yy1025;
+ if (yych <= 'z') goto yy134;
+ goto yy127;
+ }
+ }
+ }
+yy855:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
+ if (yych <= '?') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy135;
+ if (yych <= '*') goto yy127;
+ goto yy135;
+ } else {
+ if (yych <= '/') {
+ if (yych <= ',') goto yy127;
+ goto yy135;
+ } else {
+ if (yych <= '9') goto yy1025;
+ if (yych <= ':') goto yy135;
+ goto yy127;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') goto yy135;
+ if (yych <= 'F') goto yy1025;
+ if (yych <= 'Z') goto yy135;
+ goto yy127;
+ } else {
+ if (yych <= '`') {
+ if (yych <= '_') goto yy135;
+ goto yy127;
+ } else {
+ if (yych <= 'f') goto yy1025;
+ if (yych <= 'z') goto yy135;
+ goto yy127;
+ }
+ }
}
- if (yych <= '9') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy109;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy109;
- goto yy4;
+yy856:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) {
+ if (yych <= '@') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy856;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy310;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'Z') goto yy856;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 'z') goto yy856;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ yyt2 = YYCURSOR;
+ goto yy315;
+ } else {
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy316;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+yy857:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '^') {
+ if (yych <= '/') {
+ if (yych <= ',') {
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy1026;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') goto yy109;
- goto yy4;
- } else {
- if (yych <= 0x1B) goto yy109;
- if (yych <= 0x1F) goto yy4;
- goto yy109;
+ if (yych == '.') {
+ yyt2 = YYCURSOR;
+ goto yy566;
}
+ yyt2 = YYCURSOR;
+ goto yy565;
}
} else {
+ if (yych <= '?') {
+ if (yych <= '9') goto yy1027;
+ if (yych <= ':') {
+ yyt1 = YYCURSOR;
+ goto yy1028;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ if (yych <= 'F') goto yy1029;
+ if (yych <= 'Z') goto yy277;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ }
+ } else {
+ if (yych <= 0xC1) {
+ if (yych <= 'f') {
+ if (yych <= '_') {
+ yyt2 = YYCURSOR;
+ goto yy431;
+ }
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1029;
+ } else {
+ if (yych <= 'z') goto yy277;
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy133;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ yyt2 = YYCURSOR;
+ goto yy315;
+ } else {
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy316;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy133;
+ }
+ }
+ }
+yy858:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '^') {
+ if (yych <= '/') {
if (yych <= ',') {
- if (yych <= '%') {
- if (yych <= '$') goto yy4;
- goto yy105;
- } else {
- if (yych == '+') goto yy80;
- goto yy109;
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy1026;
}
+ yyt2 = YYCURSOR;
+ goto yy305;
} else {
- if (yych <= '.') {
- if (yych <= '-') goto yy46;
- goto yy266;
- } else {
- if (yych <= '/') goto yy4;
- if (yych <= '7') goto yy267;
- goto yy268;
+ if (yych == '.') {
+ yyt2 = YYCURSOR;
+ goto yy566;
+ }
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ } else {
+ if (yych <= '?') {
+ if (yych <= '9') goto yy1030;
+ if (yych <= ':') {
+ yyt1 = YYCURSOR;
+ goto yy1028;
}
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ if (yych <= 'F') goto yy1029;
+ if (yych <= 'Z') goto yy277;
+ yyt2 = YYCURSOR;
+ goto yy305;
}
}
} else {
- if (yych <= '_') {
- if (yych <= 'D') {
- if (yych <= ':') goto yy147;
- if (yych <= '?') goto yy109;
- if (yych <= '@') goto yy96;
- goto yy269;
+ if (yych <= 0xC1) {
+ if (yych <= 'f') {
+ if (yych <= '_') {
+ yyt2 = YYCURSOR;
+ goto yy431;
+ }
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1029;
+ } else {
+ if (yych <= 'z') goto yy277;
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy133;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ yyt2 = YYCURSOR;
+ goto yy315;
+ } else {
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy316;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy133;
+ }
+ }
+ }
+yy859:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'Z') {
+ if (yych <= '4') {
+ if (yych <= ',') {
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy1026;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych == '.') {
+ yyt2 = YYCURSOR;
+ goto yy566;
+ }
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ goto yy1030;
+ }
+ } else {
+ if (yych <= ':') {
+ if (yych <= '5') goto yy1031;
+ if (yych <= '9') goto yy1027;
+ yyt1 = YYCURSOR;
+ goto yy1028;
+ } else {
+ if (yych <= '?') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ if (yych <= 'F') goto yy1029;
+ goto yy277;
+ }
+ }
+ } else {
+ if (yych <= 0xC1) {
+ if (yych <= '`') {
+ if (yych == '_') {
+ yyt2 = YYCURSOR;
+ goto yy431;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'f') goto yy1029;
+ if (yych <= 'z') goto yy277;
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy133;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ yyt2 = YYCURSOR;
+ goto yy315;
+ } else {
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy316;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy133;
+ }
+ }
+ }
+yy860:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '_') {
+ if (yych <= ':') {
+ if (yych <= ',') {
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy1026;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ if (yych <= '9') goto yy1029;
+ yyt1 = YYCURSOR;
+ goto yy1028;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '?') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ goto yy1029;
+ } else {
+ if (yych <= 'Z') goto yy277;
+ if (yych <= '^') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt2 = YYCURSOR;
+ goto yy431;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 'f') goto yy1029;
+ goto yy277;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy133;
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy133;
+ }
+ }
+ }
+yy861:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1032;
+ if (yych <= ':') goto yy718;
+ goto yy73;
+ } else {
+ if (yych <= 'F') goto yy1033;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy1033;
+ goto yy73;
+ }
+yy862:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1033;
+ if (yych <= ':') goto yy718;
+ goto yy73;
+ } else {
+ if (yych <= 'F') goto yy1033;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy1033;
+ goto yy73;
+ }
+yy863:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= '9') {
+ if (yych == '.') {
+ yyt2 = YYCURSOR;
+ goto yy989;
+ }
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy987;
+ }
+ yyt1 = YYCURSOR;
+ goto yy1034;
+ } else {
+ if (yych <= '@') {
+ if (yych <= ':') goto yy718;
+ yyt2 = YYCURSOR;
+ goto yy987;
} else {
if (yych <= 'F') {
- if (yych <= 'E') goto yy270;
- goto yy269;
- } else {
- if (yych <= 'Z') goto yy115;
- if (yych <= '^') goto yy109;
- goto yy46;
+ yyt1 = YYCURSOR;
+ goto yy1034;
+ }
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy987;
}
+ yyt1 = YYCURSOR;
+ goto yy1034;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy987;
+ }
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy990;
}
+ yyt2 = YYCURSOR;
+ goto yy991;
} else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy992;
+ }
+ yyt2 = YYCURSOR;
+ goto yy993;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy994;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy995;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy864:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1035;
+ if (yych <= ':') goto yy718;
+ goto yy73;
+ } else {
+ if (yych <= 'F') goto yy1035;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy1035;
+ goto yy73;
+ }
+yy865:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1036;
+ if (yych <= ':') goto yy1037;
+ goto yy73;
+ } else {
+ if (yych <= 'F') goto yy1036;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy1036;
+ goto yy73;
+ }
+yy866:
+ yych = *++YYCURSOR;
+ if (yych <= '`') {
+ if (yych <= '9') {
+ if (yych <= '0') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1038;
+ } else {
+ if (yych <= '1') goto yy1039;
+ if (yych <= '2') goto yy1040;
+ goto yy1038;
+ }
+ } else {
+ if (yych <= '@') {
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy310;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'F') goto yy1041;
+ if (yych <= 'Z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
if (yych <= 'z') {
- if (yych <= 'd') {
- if (yych <= '`') goto yy109;
- goto yy269;
- } else {
- if (yych <= 'e') goto yy270;
- if (yych <= 'f') goto yy269;
- goto yy115;
+ if (yych <= 'f') goto yy1041;
+ goto yy73;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy867:
+ yyaccept = 38;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '1') {
+ if (yych <= '/') {
+ yyt2 = yyt4;
+ goto yy306;
+ }
+ if (yych <= '0') goto yy596;
+ goto yy597;
+ } else {
+ if (yych <= '2') goto yy598;
+ if (yych <= '9') goto yy596;
+ yyt2 = yyt4;
+ goto yy306;
+ }
+yy868:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt4 = YYCURSOR;
+ goto yy867;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1042;
+ yyt4 = YYCURSOR;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1042;
+ } else {
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
+ goto yy1042;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy869:
+ yych = *++YYCURSOR;
+ if (yych <= '9') {
+ if (yych == ' ') {
+ yyt2 = yyt4;
+ goto yy305;
+ }
+ if (yych <= '/') goto yy73;
+ goto yy1041;
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy73;
+ goto yy1041;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy1041;
+ goto yy73;
+ }
+ }
+yy870:
+ yych = *++YYCURSOR;
+ if (yych <= 'z') {
+ if (yych <= '@') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1042;
+ if (yych <= ':') {
+ yyt4 = YYCURSOR;
+ goto yy869;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= 'F') goto yy1042;
+ goto yy73;
+ } else {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 'f') goto yy1042;
+ goto yy73;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy871:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt4 = YYCURSOR;
+ goto yy867;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1043;
+ yyt4 = YYCURSOR;
+ goto yy869;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1042;
+ } else {
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1042;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy872:
+ yych = *++YYCURSOR;
+ if (yych <= '`') {
+ if (yych <= '9') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt4 = YYCURSOR;
+ goto yy867;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '5') goto yy1043;
+ goto yy1042;
+ }
+ } else {
+ if (yych <= '@') {
+ if (yych <= ':') {
+ yyt4 = YYCURSOR;
+ goto yy869;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'F') goto yy1042;
+ if (yych <= 'Z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= 'f') goto yy1042;
+ goto yy73;
} else {
if (yych <= 0x7F) {
- if (yych <= '~') goto yy109;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy109;
- if (yych <= 0xF4) goto yy4;
- goto yy109;
+ yyt2 = YYCURSOR;
+ goto yy305;
}
+ if (yych <= 0xC1) goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
}
}
}
-yy185:
- yyaccept = 6;
+yy873:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '1') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '0') goto yy1044;
+ goto yy1045;
+ } else {
+ if (yych <= '2') goto yy1046;
+ if (yych <= '9') goto yy1044;
+ goto yy73;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy277;
+ if (yych <= '^') goto yy73;
+ goto yy277;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'z') goto yy277;
+ goto yy73;
+ }
+ }
+yy874:
+ yyaccept = 14;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
+ if (yych == '.') goto yy873;
+ goto yy278;
+yy875:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '.') goto yy873;
+ if (yych <= '/') goto yy278;
+ if (yych <= '5') goto yy874;
+ goto yy278;
+yy876:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '`') {
+ if (yych <= '?') {
+ if (yych <= '/') {
+ if (yych <= ',') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt2 = YYCURSOR;
+ goto yy565;
+ } else {
+ if (yych <= '9') goto yy277;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy568;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ goto yy277;
+ } else {
+ if (yych == '_') {
+ yyt2 = YYCURSOR;
+ goto yy431;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy277;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 0xC1) goto yy133;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy133;
+ }
+ }
+ }
+yy877:
+ yych = *++YYCURSOR;
+ if (yych <= 'z') {
+ if (yych <= '@') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1047;
+ if (yych >= ';') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt2 = YYCURSOR;
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= 'F') goto yy1047;
+ goto yy73;
+ } else {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 'f') goto yy1047;
+ goto yy73;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
}
+yy878:
+ yych = *++YYCURSOR;
if (yych <= '9') {
- if (yych <= '#') {
+ if (yych == ' ') goto yy305;
+ if (yych <= '/') goto yy73;
+ goto yy1041;
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy73;
+ goto yy1041;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy1041;
+ goto yy73;
+ }
+ }
+yy879:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ switch (yych) {
+ case '%': goto yy119;
+ case '+': goto yy88;
+ case '-': goto yy121;
+ case '.': goto yy443;
+ case '/': goto yy123;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy1048;
+ case ':': goto yy292;
+ case '@': goto yy129;
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f': goto yy1025;
+ case 'B':
+ case 'b': goto yy1049;
+ case 'E':
+ case 'e': goto yy1050;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy132;
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy134;
+ case 'S':
+ case 's': goto yy136;
+ case '_': goto yy137;
+ case 'm': goto yy139;
+ case 'p':
+ case 'u': goto yy140;
+ default: goto yy24;
+ }
+yy880:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '?') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy135;
+ if (yych <= '*') goto yy24;
+ goto yy135;
+ } else {
+ if (yych <= '/') {
+ if (yych <= ',') goto yy24;
+ goto yy135;
+ } else {
+ if (yych <= '9') goto yy1025;
+ if (yych <= ':') goto yy135;
+ goto yy24;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') goto yy135;
+ if (yych <= 'F') goto yy1025;
+ if (yych <= 'Z') goto yy135;
+ goto yy24;
+ } else {
+ if (yych <= '`') {
+ if (yych <= '_') goto yy135;
+ goto yy24;
+ } else {
+ if (yych <= 'f') goto yy1025;
+ if (yych <= 'z') goto yy135;
+ goto yy24;
+ }
+ }
+ }
+yy881:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy135;
+ if (yych <= '*') goto yy127;
+ goto yy302;
+ } else {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy127;
+ goto yy440;
+ } else {
+ if (yych <= '/') goto yy135;
+ if (yych <= '9') goto yy1025;
+ goto yy135;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') {
+ if (yych <= '?') goto yy127;
+ goto yy135;
+ } else {
+ if (yych <= 'F') goto yy1025;
+ if (yych <= 'Z') goto yy135;
+ goto yy127;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych <= '_') goto yy135;
+ goto yy127;
+ } else {
+ if (yych <= 'f') goto yy1025;
+ if (yych <= 'z') goto yy135;
+ goto yy127;
+ }
+ }
+ }
+yy882:
+ yych = *++YYCURSOR;
+ if (yych == '.') goto yy1051;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1052;
+ goto yy73;
+yy883:
+ yych = *++YYCURSOR;
+ if (yych == '.') goto yy1051;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy882;
+ goto yy73;
+yy884:
+ yych = *++YYCURSOR;
+ if (yych <= '/') {
+ if (yych == '.') goto yy1051;
+ goto yy73;
+ } else {
+ if (yych <= '4') goto yy882;
+ if (yych <= '5') goto yy1053;
+ if (yych <= '9') goto yy1052;
+ goto yy73;
+ }
+yy885:
+ yych = *++YYCURSOR;
+ if (yych <= 'z') {
+ if (yych <= '@') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1054;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy743;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= 'F') goto yy1054;
+ goto yy73;
+ } else {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 'f') goto yy1054;
+ goto yy73;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy886:
+ yych = *++YYCURSOR;
+ if (yych <= '2') {
+ if (yych <= '/') {
+ if (yych == ' ') goto yy305;
+ goto yy73;
+ } else {
+ if (yych <= '0') goto yy1055;
+ if (yych <= '1') goto yy1056;
+ goto yy1057;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '9') goto yy1058;
+ if (yych <= '@') goto yy73;
+ goto yy600;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy600;
+ goto yy73;
+ }
+ }
+yy887:
+ yych = *++YYCURSOR;
+ if (yych <= ' ') {
+ if (yych <= '\f') {
+ if (yych == '\t') goto yy887;
+ goto yy73;
+ } else {
+ if (yych <= '\r') goto yy887;
+ if (yych <= 0x1F) goto yy73;
+ goto yy887;
+ }
+ } else {
+ if (yych <= '&') {
+ if (yych == '"') goto yy453;
+ goto yy73;
+ } else {
+ if (yych <= '\'') goto yy454;
+ if (yych == '>') goto yy457;
+ goto yy73;
+ }
+ }
+yy888:
+ yych = *++YYCURSOR;
+ if (yych <= 0xC1) {
+ if (yych <= '-') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= ',') goto yy620;
+ goto yy888;
+ } else {
+ if (yych == '>') goto yy894;
+ if (yych <= 0x7F) goto yy620;
+ goto yy73;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy628;
+ if (yych <= 0xE0) goto yy629;
+ goto yy630;
+ } else {
+ if (yych <= 0xF0) goto yy631;
+ if (yych <= 0xF3) goto yy632;
+ if (yych <= 0xF4) goto yy633;
+ goto yy73;
+ }
+ }
+yy889:
+ yych = *++YYCURSOR;
+ if (yych <= '*') {
+ if (yych <= 0x1F) {
+ if (yych <= '\t') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= 0x08) goto yy620;
+ goto yy889;
+ } else {
+ if (yych == '\r') goto yy889;
+ goto yy620;
+ }
+ } else {
+ if (yych <= '"') {
+ if (yych <= ' ') goto yy889;
+ if (yych <= '!') goto yy620;
+ goto yy623;
+ } else {
+ if (yych == '\'') goto yy624;
+ if (yych <= ')') goto yy620;
+ goto yy73;
+ }
+ }
+ } else {
+ if (yych <= 0xC1) {
+ if (yych <= '<') {
+ if (yych == '-') goto yy747;
+ goto yy620;
+ } else {
+ if (yych <= '=') goto yy626;
+ if (yych <= '>') goto yy627;
+ if (yych <= 0x7F) goto yy620;
+ goto yy73;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy628;
+ if (yych <= 0xE0) goto yy629;
+ goto yy630;
+ } else {
+ if (yych <= 0xF0) goto yy631;
+ if (yych <= 0xF3) goto yy632;
+ if (yych <= 0xF4) goto yy633;
+ goto yy73;
+ }
+ }
+ }
+yy890:
+ yych = *++YYCURSOR;
+ if (yych <= '<') {
+ if (yych <= '!') {
if (yych <= '\f') {
- if (yych <= 0x00) goto yy26;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy26;
- goto yy4;
+ if (yych <= 0x00) goto yy73;
+ if (yych == '\t') goto yy889;
+ goto yy620;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') goto yy26;
- goto yy4;
+ if (yych <= '\r') goto yy889;
+ if (yych == ' ') goto yy889;
+ goto yy620;
+ }
+ } else {
+ if (yych <= ',') {
+ if (yych <= '"') goto yy623;
+ if (yych == '\'') goto yy624;
+ goto yy620;
+ } else {
+ if (yych <= '-') goto yy890;
+ if (yych <= '/') goto yy620;
+ if (yych <= ':') goto yy749;
+ goto yy620;
+ }
+ }
+ } else {
+ if (yych <= 'z') {
+ if (yych <= 'Z') {
+ if (yych <= '=') goto yy626;
+ if (yych <= '>') goto yy894;
+ if (yych <= '@') goto yy620;
+ goto yy749;
+ } else {
+ if (yych == '_') goto yy749;
+ if (yych <= '`') goto yy620;
+ goto yy749;
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy620;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy628;
+ goto yy629;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy630;
+ goto yy631;
} else {
- if (yych <= 0x1B) goto yy26;
- if (yych <= 0x1F) goto yy4;
- goto yy26;
+ if (yych <= 0xF3) goto yy632;
+ if (yych <= 0xF4) goto yy633;
+ goto yy73;
}
}
+ }
+ }
+yy891:
+ yych = *++YYCURSOR;
+ if (yych <= ':') {
+ if (yych <= '!') {
+ if (yych <= '\f') {
+ if (yych <= 0x00) goto yy73;
+ if (yych == '\t') goto yy1059;
+ goto yy620;
+ } else {
+ if (yych <= '\r') goto yy1059;
+ if (yych == ' ') goto yy1059;
+ goto yy620;
+ }
} else {
- if (yych <= '+') {
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy105;
- if (yych <= '*') goto yy26;
- goto yy80;
+ if (yych <= ')') {
+ if (yych <= '"') goto yy623;
+ if (yych == '\'') goto yy624;
+ goto yy620;
} else {
- if (yych <= '-') {
- if (yych <= ',') goto yy26;
- goto yy46;
+ if (yych <= ',') {
+ if (yych <= '*') goto yy73;
+ goto yy620;
} else {
- if (yych <= '.') goto yy266;
- if (yych <= '/') goto yy4;
- goto yy268;
+ if (yych <= '-') goto yy748;
+ if (yych <= '/') goto yy620;
+ goto yy749;
}
}
}
} else {
- if (yych <= '_') {
- if (yych <= 'D') {
- if (yych <= ':') goto yy147;
- if (yych <= '?') goto yy26;
- if (yych <= '@') goto yy96;
- goto yy269;
+ if (yych <= 'z') {
+ if (yych <= 'Z') {
+ if (yych == '>') goto yy627;
+ if (yych <= '@') goto yy620;
+ goto yy749;
} else {
- if (yych <= 'F') {
- if (yych <= 'E') goto yy270;
- goto yy269;
+ if (yych == '_') goto yy749;
+ if (yych <= '`') goto yy620;
+ goto yy749;
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy620;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy628;
+ goto yy629;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy630;
+ goto yy631;
} else {
- if (yych <= 'Z') goto yy115;
- if (yych <= '^') goto yy26;
- goto yy46;
+ if (yych <= 0xF3) goto yy632;
+ if (yych <= 0xF4) goto yy633;
+ goto yy73;
}
}
+ }
+ }
+yy892:
+ yych = *++YYCURSOR;
+ if (yych <= '\\') {
+ if (yych <= ',') {
+ if (yych <= 0x00) goto yy73;
+ if (yych == '"') goto yy891;
+ goto yy750;
} else {
- if (yych <= 'z') {
- if (yych <= 'd') {
- if (yych <= '`') goto yy26;
- goto yy269;
+ if (yych <= '=') {
+ if (yych <= '-') goto yy892;
+ goto yy750;
+ } else {
+ if (yych <= '>') goto yy1060;
+ if (yych <= '[') goto yy750;
+ goto yy752;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy750;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy753;
+ goto yy754;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy755;
+ goto yy756;
+ } else {
+ if (yych <= 0xF3) goto yy757;
+ if (yych <= 0xF4) goto yy758;
+ goto yy73;
+ }
+ }
+ }
+yy893:
+ yych = *++YYCURSOR;
+ if (yych <= '\\') {
+ if (yych <= ',') {
+ if (yych <= 0x00) goto yy73;
+ if (yych == '\'') goto yy891;
+ goto yy759;
+ } else {
+ if (yych <= '=') {
+ if (yych <= '-') goto yy893;
+ goto yy759;
+ } else {
+ if (yych <= '>') goto yy1061;
+ if (yych <= '[') goto yy759;
+ goto yy761;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy759;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy762;
+ goto yy763;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy764;
+ goto yy765;
+ } else {
+ if (yych <= 0xF3) goto yy766;
+ if (yych <= 0xF4) goto yy767;
+ goto yy73;
+ }
+ }
+ }
+yy894:
+ yyaccept = 39;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[512+yych] & 16) {
+ goto yy620;
+ }
+ if (yych <= 0xE0) {
+ if (yych <= '-') {
+ if (yych >= '+') goto yy747;
+ } else {
+ if (yych <= 0xC1) goto yy895;
+ if (yych <= 0xDF) goto yy628;
+ goto yy629;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy630;
+ goto yy631;
+ } else {
+ if (yych <= 0xF3) goto yy632;
+ if (yych <= 0xF4) goto yy633;
+ }
+ }
+yy895:
+#line 248 "../../lnav/src/data_scanner_re.re"
+ {
+ CAPTURE(DT_COMMENT);
+ if (tf == text_format_t::TF_DIFF) {
+ auto sf = this->to_string_fragment(cap_all);
+ auto split_res = sf.split_when(string_fragment::tag1{'\n'});
+ cap_all.c_end = split_res.first.sf_end;
+ cap_inner.c_end = split_res.first.sf_end;
+ this->ds_next_offset = cap_all.c_end;
+ }
+ return tokenize_result{token_out, cap_all, cap_inner, this->ds_input.data()};
+ }
+#line 22677 "../../lnav/src/data_scanner_re.cc"
+yy896:
+ yych = *++YYCURSOR;
+ if (yybm_bol[0+yych] & 8) {
+ goto yy896;
+ }
+ if (yych <= 0xDF) {
+ if (yych <= '-') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= '*') goto yy914;
+ goto yy1062;
+ } else {
+ if (yych <= '>') goto yy1063;
+ if (yych <= 0xC1) goto yy73;
+ goto yy1064;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy1065;
+ if (yych <= 0xEF) goto yy1066;
+ goto yy1067;
+ } else {
+ if (yych <= 0xF3) goto yy1068;
+ if (yych <= 0xF4) goto yy1069;
+ goto yy73;
+ }
+ }
+yy897:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) {
+ if (yych <= ',') {
+ if (yych <= 0x00) goto yy73;
+ if (yych == '\'') goto yy896;
+ goto yy770;
+ } else {
+ if (yych <= '-') goto yy1070;
+ if (yych != '>') goto yy770;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy899;
+ if (yych <= 0xE0) goto yy900;
+ goto yy901;
+ } else {
+ if (yych <= 0xF0) goto yy902;
+ if (yych <= 0xF3) goto yy903;
+ if (yych <= 0xF4) goto yy904;
+ goto yy73;
+ }
+ }
+yy898:
+ yyaccept = 34;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[256+yych] & 1) {
+ goto yy750;
+ }
+ if (yych <= 0xC1) {
+ if (yych <= '*') {
+ if (yych <= 0x00) goto yy458;
+ if (yych <= '"') goto yy891;
+ goto yy604;
+ } else {
+ if (yych <= '-') goto yy751;
+ if (yych <= '\\') goto yy752;
+ goto yy458;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy753;
+ if (yych <= 0xE0) goto yy754;
+ goto yy755;
+ } else {
+ if (yych <= 0xF0) goto yy756;
+ if (yych <= 0xF3) goto yy757;
+ if (yych <= 0xF4) goto yy758;
+ goto yy458;
+ }
+ }
+yy899:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy770;
+ goto yy73;
+yy900:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy73;
+ if (yych <= 0xBF) goto yy899;
+ goto yy73;
+yy901:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy899;
+ goto yy73;
+yy902:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy73;
+ if (yych <= 0xBF) goto yy901;
+ goto yy73;
+yy903:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy901;
+ goto yy73;
+yy904:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0x8F) goto yy901;
+ goto yy73;
+yy905:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) {
+ if (yych <= ',') {
+ if (yych <= 0x00) goto yy73;
+ if (yych == '"') goto yy896;
+ goto yy771;
+ } else {
+ if (yych <= '-') goto yy1071;
+ if (yych != '>') goto yy771;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy907;
+ if (yych <= 0xE0) goto yy908;
+ goto yy909;
+ } else {
+ if (yych <= 0xF0) goto yy910;
+ if (yych <= 0xF3) goto yy911;
+ if (yych <= 0xF4) goto yy912;
+ goto yy73;
+ }
+ }
+yy906:
+ yyaccept = 34;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[256+yych] & 2) {
+ goto yy759;
+ }
+ if (yych <= 0xC1) {
+ if (yych <= '*') {
+ if (yych <= 0x00) goto yy458;
+ if (yych <= '\'') goto yy891;
+ goto yy612;
+ } else {
+ if (yych <= '-') goto yy760;
+ if (yych <= '\\') goto yy761;
+ goto yy458;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy762;
+ if (yych <= 0xE0) goto yy763;
+ goto yy764;
+ } else {
+ if (yych <= 0xF0) goto yy765;
+ if (yych <= 0xF3) goto yy766;
+ if (yych <= 0xF4) goto yy767;
+ goto yy458;
+ }
+ }
+yy907:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy771;
+ goto yy73;
+yy908:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy73;
+ if (yych <= 0xBF) goto yy907;
+ goto yy73;
+yy909:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy907;
+ goto yy73;
+yy910:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy73;
+ if (yych <= 0xBF) goto yy909;
+ goto yy73;
+yy911:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy909;
+ goto yy73;
+yy912:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0x8F) goto yy909;
+ goto yy73;
+yy913:
+ yych = *++YYCURSOR;
+ if (yych <= '>') {
+ if (yych <= '&') {
+ if (yych <= 0x00) goto yy73;
+ if (yych == '"') goto yy770;
+ goto yy769;
+ } else {
+ if (yych <= ',') {
+ if (yych <= '\'') goto yy771;
+ goto yy769;
+ } else {
+ if (yych <= '-') goto yy913;
+ if (yych <= '=') goto yy769;
+ goto yy894;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy769;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy774;
+ goto yy775;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy776;
+ goto yy777;
+ } else {
+ if (yych <= 0xF3) goto yy778;
+ if (yych <= 0xF4) goto yy779;
+ goto yy73;
+ }
+ }
+ }
+yy914:
+ yych = *++YYCURSOR;
+ if (yybm_bol[0+yych] & 16) {
+ goto yy914;
+ }
+ if (yych <= 0xE0) {
+ if (yych <= '>') {
+ if (yych <= 0x00) goto yy73;
+ goto yy1072;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy1073;
+ goto yy1074;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy1075;
+ goto yy1076;
+ } else {
+ if (yych <= 0xF3) goto yy1077;
+ if (yych <= 0xF4) goto yy1078;
+ goto yy73;
+ }
+ }
+yy915:
+ yyaccept = 34;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[512+yych] & 4) {
+ goto yy604;
+ }
+ if (yych <= 0xDF) {
+ if (yych <= '"') {
+ if (yych <= 0x00) goto yy458;
+ goto yy746;
+ } else {
+ if (yych <= '\\') goto yy605;
+ if (yych <= 0xC1) goto yy458;
+ goto yy606;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy607;
+ if (yych <= 0xEF) goto yy608;
+ goto yy609;
+ } else {
+ if (yych <= 0xF3) goto yy610;
+ if (yych <= 0xF4) goto yy611;
+ goto yy458;
+ }
+ }
+yy916:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy780;
+ goto yy73;
+yy917:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy73;
+ if (yych <= 0xBF) goto yy916;
+ goto yy73;
+yy918:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy916;
+ goto yy73;
+yy919:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy73;
+ if (yych <= 0xBF) goto yy918;
+ goto yy73;
+yy920:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy918;
+ goto yy73;
+yy921:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0x8F) goto yy918;
+ goto yy73;
+yy922:
+ yyaccept = 34;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[512+yych] & 8) {
+ goto yy612;
+ }
+ if (yych <= 0xDF) {
+ if (yych <= '\'') {
+ if (yych <= 0x00) goto yy458;
+ goto yy746;
+ } else {
+ if (yych <= '\\') goto yy613;
+ if (yych <= 0xC1) goto yy458;
+ goto yy614;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy615;
+ if (yych <= 0xEF) goto yy616;
+ goto yy617;
+ } else {
+ if (yych <= 0xF3) goto yy618;
+ if (yych <= 0xF4) goto yy619;
+ goto yy458;
+ }
+ }
+yy923:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy781;
+ goto yy73;
+yy924:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy73;
+ if (yych <= 0xBF) goto yy923;
+ goto yy73;
+yy925:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy923;
+ goto yy73;
+yy926:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy73;
+ if (yych <= 0xBF) goto yy925;
+ goto yy73;
+yy927:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy925;
+ goto yy73;
+yy928:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0x8F) goto yy925;
+ goto yy73;
+yy929:
+ yych = *++YYCURSOR;
+ if (yych <= '?') {
+ if (yych <= '&') {
+ if (yych <= '\f') {
+ if (yych <= 0x00) goto yy73;
+ if (yych == '\t') goto yy929;
+ goto yy639;
+ } else {
+ if (yych <= '\r') goto yy929;
+ if (yych == ' ') goto yy929;
+ goto yy639;
+ }
+ } else {
+ if (yych <= '.') {
+ if (yych <= '\'') goto yy1079;
+ if (yych == '-') goto yy790;
+ goto yy639;
+ } else {
+ if (yych <= ':') {
+ if (yych <= '/') goto yy791;
+ goto yy790;
} else {
- if (yych <= 'e') goto yy270;
- if (yych <= 'f') goto yy269;
- goto yy115;
+ if (yych <= '=') goto yy639;
+ if (yych <= '>') goto yy792;
+ goto yy791;
}
+ }
+ }
+ } else {
+ if (yych <= 'z') {
+ if (yych <= '\\') {
+ if (yych <= '@') goto yy639;
+ if (yych <= 'Z') goto yy790;
+ if (yych <= '[') goto yy639;
+ goto yy793;
} else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy26;
- goto yy4;
+ if (yych == '_') goto yy790;
+ if (yych <= '`') goto yy639;
+ goto yy790;
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy639;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy794;
+ goto yy795;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy796;
+ goto yy797;
} else {
- if (yych <= 0xC1) goto yy26;
- if (yych <= 0xF4) goto yy4;
- goto yy26;
+ if (yych <= 0xF3) goto yy798;
+ if (yych <= 0xF4) goto yy799;
+ goto yy73;
}
}
}
}
-yy186:
+yy930:
+ yyaccept = 40;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 0xC1) {
+ if (yych <= '"') {
+ if (yych <= 0x00) goto yy463;
+ if (yych >= '"') goto yy932;
+ } else {
+ if (yych == '\\') goto yy933;
+ if (yych >= 0x80) goto yy463;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy934;
+ if (yych <= 0xE0) goto yy935;
+ goto yy936;
+ } else {
+ if (yych <= 0xF0) goto yy937;
+ if (yych <= 0xF3) goto yy938;
+ if (yych <= 0xF4) goto yy939;
+ goto yy463;
+ }
+ }
+yy931:
yych = *++YYCURSOR;
- if (yych <= ':') {
- if (yych <= '.') goto yy1;
- if (yych <= '/') goto yy189;
- if (yych <= '9') goto yy271;
- goto yy191;
+ if (yych <= 0xC1) {
+ if (yych <= '"') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= '!') goto yy931;
+ } else {
+ if (yych == '\\') goto yy933;
+ if (yych <= 0x7F) goto yy931;
+ goto yy73;
+ }
} else {
- if (yych <= 'F') {
- if (yych <= '@') goto yy1;
- goto yy272;
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy934;
+ if (yych <= 0xE0) goto yy935;
+ goto yy936;
} else {
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy272;
- goto yy1;
+ if (yych <= 0xF0) goto yy937;
+ if (yych <= 0xF3) goto yy938;
+ if (yych <= 0xF4) goto yy939;
+ goto yy73;
}
}
-yy187:
- yyaccept = 12;
- yych = *(YYMARKER = ++YYCURSOR);
+yy932:
+ yych = *++YYCURSOR;
if (yych <= '/') {
if (yych <= 0x1F) {
+ if (yych <= '\t') {
+ if (yych <= 0x08) goto yy73;
+ goto yy1080;
+ } else {
+ if (yych == '\r') goto yy1080;
+ goto yy73;
+ }
+ } else {
+ if (yych <= ',') {
+ if (yych <= ' ') goto yy1080;
+ goto yy73;
+ } else {
+ if (yych <= '-') goto yy459;
+ if (yych <= '.') goto yy73;
+ goto yy324;
+ }
+ }
+ } else {
+ if (yych <= '@') {
+ if (yych <= '=') {
+ if (yych <= ':') goto yy459;
+ goto yy73;
+ } else {
+ if (yych <= '>') goto yy325;
+ if (yych <= '?') goto yy324;
+ goto yy73;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy459;
+ if (yych <= '^') goto yy73;
+ goto yy459;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'z') goto yy459;
+ goto yy73;
+ }
+ }
+ }
+yy933:
+ yych = *++YYCURSOR;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 0x00) goto yy73;
+ goto yy931;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych >= 0xE0) goto yy935;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy936;
+ goto yy937;
+ } else {
+ if (yych <= 0xF3) goto yy938;
+ if (yych <= 0xF4) goto yy939;
+ goto yy73;
+ }
+ }
+yy934:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy931;
+ goto yy73;
+yy935:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy73;
+ if (yych <= 0xBF) goto yy934;
+ goto yy73;
+yy936:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy934;
+ goto yy73;
+yy937:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy73;
+ if (yych <= 0xBF) goto yy936;
+ goto yy73;
+yy938:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy936;
+ goto yy73;
+yy939:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0x8F) goto yy936;
+ goto yy73;
+yy940:
+ yych = *++YYCURSOR;
+ if (yych <= '?') {
+ if (yych <= '!') {
if (yych <= '\f') {
- if (yych <= 0x00) goto yy113;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy113;
- goto yy4;
+ if (yych <= 0x00) goto yy73;
+ if (yych == '\t') goto yy940;
+ goto yy640;
} else {
- if (yych <= '\r') goto yy113;
- if (yych == 0x1B) goto yy113;
- goto yy4;
+ if (yych <= '\r') goto yy940;
+ if (yych == ' ') goto yy940;
+ goto yy640;
}
} else {
- if (yych <= '*') {
- if (yych <= '#') goto yy113;
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy80;
- goto yy113;
+ if (yych <= '.') {
+ if (yych <= '"') goto yy1079;
+ if (yych == '-') goto yy800;
+ goto yy640;
} else {
- if (yych <= '+') goto yy80;
- if (yych <= ',') goto yy113;
- if (yych <= '.') goto yy46;
- goto yy4;
+ if (yych <= ':') {
+ if (yych <= '/') goto yy801;
+ goto yy800;
+ } else {
+ if (yych <= '=') goto yy640;
+ if (yych <= '>') goto yy802;
+ goto yy801;
+ }
}
}
} else {
- if (yych <= '_') {
- if (yych <= '@') {
- if (yych <= '9') goto yy269;
- if (yych <= ':') goto yy147;
- if (yych <= '?') goto yy113;
- goto yy96;
+ if (yych <= 'z') {
+ if (yych <= '\\') {
+ if (yych <= '@') goto yy640;
+ if (yych <= 'Z') goto yy800;
+ if (yych <= '[') goto yy640;
+ goto yy803;
} else {
- if (yych <= 'F') goto yy269;
- if (yych <= 'Z') goto yy115;
- if (yych <= '^') goto yy113;
- goto yy46;
+ if (yych == '_') goto yy800;
+ if (yych <= '`') goto yy640;
+ goto yy800;
}
} else {
- if (yych <= '~') {
- if (yych <= '`') goto yy113;
- if (yych <= 'f') goto yy269;
- if (yych <= 'z') goto yy115;
- goto yy113;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy640;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy804;
+ goto yy805;
} else {
- if (yych <= 0x7F) goto yy4;
- if (yych <= 0xC1) goto yy113;
- if (yych <= 0xF4) goto yy4;
- goto yy113;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy806;
+ goto yy807;
+ } else {
+ if (yych <= 0xF3) goto yy808;
+ if (yych <= 0xF4) goto yy809;
+ goto yy73;
+ }
}
}
}
-yy188:
- yyaccept = 12;
+yy941:
+ yyaccept = 40;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '.') {
- if (yych <= 0x1F) {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy113;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy113;
- goto yy4;
+ if (yych <= 0xC1) {
+ if (yych <= '\'') {
+ if (yych <= 0x00) goto yy463;
+ if (yych >= '\'') goto yy932;
+ } else {
+ if (yych == '\\') goto yy943;
+ if (yych >= 0x80) goto yy463;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy944;
+ if (yych <= 0xE0) goto yy945;
+ goto yy946;
+ } else {
+ if (yych <= 0xF0) goto yy947;
+ if (yych <= 0xF3) goto yy948;
+ if (yych <= 0xF4) goto yy949;
+ goto yy463;
+ }
+ }
+yy942:
+ yych = *++YYCURSOR;
+ if (yych <= 0xC1) {
+ if (yych <= '\'') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= '&') goto yy942;
+ goto yy932;
+ } else {
+ if (yych == '\\') goto yy943;
+ if (yych <= 0x7F) goto yy942;
+ goto yy73;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy944;
+ if (yych <= 0xE0) goto yy945;
+ goto yy946;
+ } else {
+ if (yych <= 0xF0) goto yy947;
+ if (yych <= 0xF3) goto yy948;
+ if (yych <= 0xF4) goto yy949;
+ goto yy73;
+ }
+ }
+yy943:
+ yych = *++YYCURSOR;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 0x00) goto yy73;
+ goto yy942;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych >= 0xE0) goto yy945;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy946;
+ goto yy947;
+ } else {
+ if (yych <= 0xF3) goto yy948;
+ if (yych <= 0xF4) goto yy949;
+ goto yy73;
+ }
+ }
+yy944:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy942;
+ goto yy73;
+yy945:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy73;
+ if (yych <= 0xBF) goto yy944;
+ goto yy73;
+yy946:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy944;
+ goto yy73;
+yy947:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy73;
+ if (yych <= 0xBF) goto yy946;
+ goto yy73;
+yy948:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy946;
+ goto yy73;
+yy949:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0x8F) goto yy946;
+ goto yy73;
+yy950:
+ yych = *++YYCURSOR;
+ if (yych <= '>') {
+ if (yych <= ' ') {
+ if (yych <= '\t') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= 0x08) goto yy811;
+ goto yy950;
} else {
- if (yych <= '\r') goto yy113;
- if (yych == 0x1B) goto yy113;
- goto yy4;
+ if (yych == '\r') goto yy950;
+ if (yych <= 0x1F) goto yy811;
+ goto yy950;
}
} else {
- if (yych <= '*') {
- if (yych <= '#') goto yy113;
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy80;
- goto yy113;
+ if (yych <= '/') {
+ if (yych == '-') goto yy950;
+ if (yych <= '.') goto yy811;
} else {
- if (yych <= '+') goto yy194;
- if (yych <= ',') goto yy113;
- if (yych <= '-') goto yy251;
- goto yy46;
+ if (yych <= ':') goto yy950;
+ if (yych <= '<') goto yy811;
+ if (yych <= '=') goto yy812;
+ goto yy73;
}
}
} else {
- if (yych <= '^') {
- if (yych <= '?') {
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy269;
- if (yych <= ':') goto yy147;
- goto yy113;
+ if (yych <= 0x7F) {
+ if (yych <= '^') {
+ if (yych <= '?') goto yy951;
+ if (yych <= '@') goto yy811;
+ if (yych <= 'Z') goto yy950;
+ goto yy811;
+ } else {
+ if (yych == '`') goto yy811;
+ if (yych <= 'z') goto yy950;
+ goto yy811;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy815;
+ if (yych <= 0xE0) goto yy816;
+ goto yy817;
+ } else {
+ if (yych <= 0xF0) goto yy818;
+ if (yych <= 0xF3) goto yy819;
+ if (yych <= 0xF4) goto yy820;
+ goto yy73;
+ }
+ }
+ }
+yy951:
+ yych = *++YYCURSOR;
+ if (yych <= '^') {
+ if (yych <= ':') {
+ if (yych <= '-') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= ',') goto yy811;
+ goto yy950;
} else {
- if (yych <= '@') goto yy96;
- if (yych <= 'F') goto yy269;
- if (yych <= 'Z') goto yy115;
- goto yy113;
+ if (yych <= '.') goto yy811;
+ if (yych <= '/') goto yy951;
+ goto yy950;
}
} else {
+ if (yych <= '?') {
+ if (yych <= '=') goto yy811;
+ if (yych <= '>') goto yy462;
+ goto yy951;
+ } else {
+ if (yych <= '@') goto yy811;
+ if (yych <= 'Z') goto yy950;
+ goto yy811;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
if (yych <= 'z') {
- if (yych <= '_') goto yy46;
- if (yych <= '`') goto yy113;
- if (yych <= 'f') goto yy269;
- goto yy115;
+ if (yych == '`') goto yy811;
+ goto yy950;
} else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy113;
- goto yy4;
+ if (yych <= 0x7F) goto yy811;
+ if (yych <= 0xC1) goto yy73;
+ goto yy815;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy816;
+ if (yych <= 0xEF) goto yy817;
+ goto yy818;
+ } else {
+ if (yych <= 0xF3) goto yy819;
+ if (yych <= 0xF4) goto yy820;
+ goto yy73;
+ }
+ }
+ }
+yy952:
+ yych = *++YYCURSOR;
+ if (yych <= '>') {
+ if (yych <= '!') {
+ if (yych <= '\f') {
+ if (yych <= 0x00) goto yy73;
+ if (yych == '\t') goto yy952;
+ goto yy813;
+ } else {
+ if (yych <= '\r') goto yy952;
+ if (yych == ' ') goto yy952;
+ goto yy813;
+ }
+ } else {
+ if (yych <= '.') {
+ if (yych <= '"') goto yy811;
+ if (yych == '-') goto yy952;
+ goto yy813;
+ } else {
+ if (yych <= ':') {
+ if (yych >= '0') goto yy952;
+ } else {
+ if (yych <= '<') goto yy813;
+ if (yych <= '=') goto yy1081;
+ goto yy954;
+ }
+ }
+ }
+ } else {
+ if (yych <= 'z') {
+ if (yych <= '[') {
+ if (yych <= '?') goto yy953;
+ if (yych <= '@') goto yy813;
+ if (yych <= 'Z') goto yy952;
+ goto yy813;
+ } else {
+ if (yych <= '^') {
+ if (yych <= '\\') goto yy955;
+ goto yy813;
} else {
- if (yych <= 0xC1) goto yy113;
- if (yych <= 0xF4) goto yy4;
- goto yy113;
+ if (yych == '`') goto yy813;
+ goto yy952;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy813;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy956;
+ goto yy957;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy958;
+ goto yy959;
+ } else {
+ if (yych <= 0xF3) goto yy960;
+ if (yych <= 0xF4) goto yy961;
+ goto yy73;
}
}
}
}
-yy189:
+yy953:
yych = *++YYCURSOR;
- if (yych <= '<') {
- if (yych <= ',') {
- if (yych <= '$') goto yy274;
- if (yych <= '&') goto yy273;
- goto yy274;
+ if (yych <= '[') {
+ if (yych <= '/') {
+ if (yych <= '"') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= '!') goto yy813;
+ goto yy811;
+ } else {
+ if (yych == '-') goto yy952;
+ if (yych <= '.') goto yy813;
+ goto yy953;
+ }
} else {
- if (yych == '.') goto yy274;
- if (yych <= '9') goto yy273;
- goto yy274;
+ if (yych <= '>') {
+ if (yych <= ':') goto yy952;
+ if (yych <= '=') goto yy813;
+ goto yy1082;
+ } else {
+ if (yych <= '?') goto yy953;
+ if (yych <= '@') goto yy813;
+ if (yych <= 'Z') goto yy952;
+ goto yy813;
+ }
}
} else {
- if (yych <= '@') {
- if (yych == '>') goto yy274;
- if (yych <= '?') goto yy273;
- goto yy274;
+ if (yych <= 0xC1) {
+ if (yych <= '_') {
+ if (yych <= '\\') goto yy955;
+ if (yych <= '^') goto yy813;
+ goto yy952;
+ } else {
+ if (yych <= '`') goto yy813;
+ if (yych <= 'z') goto yy952;
+ if (yych <= 0x7F) goto yy813;
+ goto yy73;
+ }
} else {
- if (yych <= 'Z') goto yy273;
- if (yych <= '`') goto yy274;
- if (yych <= 'z') goto yy273;
- goto yy274;
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy956;
+ if (yych <= 0xE0) goto yy957;
+ goto yy958;
+ } else {
+ if (yych <= 0xF0) goto yy959;
+ if (yych <= 0xF3) goto yy960;
+ if (yych <= 0xF4) goto yy961;
+ goto yy73;
+ }
}
}
-yy190:
+yy954:
yych = *++YYCURSOR;
- if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy281;
- if (yych <= ':') goto yy282;
- goto yy1;
+ if (yych <= 0xC1) {
+ if (yych <= '"') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= '!') goto yy954;
+ goto yy1083;
+ } else {
+ if (yych == '\\') goto yy1084;
+ if (yych <= 0x7F) goto yy954;
+ goto yy73;
+ }
} else {
- if (yych <= 'F') goto yy283;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy283;
- goto yy1;
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy1085;
+ if (yych <= 0xE0) goto yy1086;
+ goto yy1087;
+ } else {
+ if (yych <= 0xF0) goto yy1088;
+ if (yych <= 0xF3) goto yy1089;
+ if (yych <= 0xF4) goto yy1090;
+ goto yy73;
+ }
}
-yy191:
+yy955:
yych = *++YYCURSOR;
- if (yych <= '?') {
- if (yych <= '#') {
+ if (yych <= '^') {
+ if (yych <= ':') {
+ if (yych <= '-') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= ',') goto yy813;
+ goto yy952;
+ } else {
+ if (yych <= '.') goto yy813;
+ if (yych <= '/') goto yy953;
+ goto yy952;
+ }
+ } else {
+ if (yych <= '?') {
+ if (yych <= '=') goto yy813;
+ if (yych <= '>') goto yy954;
+ goto yy953;
+ } else {
+ if (yych <= '@') goto yy813;
+ if (yych <= 'Z') goto yy952;
+ goto yy813;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych == '`') goto yy813;
+ goto yy952;
+ } else {
+ if (yych <= 0x7F) goto yy813;
+ if (yych <= 0xC1) goto yy73;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy957;
+ if (yych <= 0xEF) goto yy958;
+ goto yy959;
+ } else {
+ if (yych <= 0xF3) goto yy960;
+ if (yych <= 0xF4) goto yy961;
+ goto yy73;
+ }
+ }
+ }
+yy956:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy813;
+ goto yy73;
+yy957:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy73;
+ if (yych <= 0xBF) goto yy956;
+ goto yy73;
+yy958:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy956;
+ goto yy73;
+yy959:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy73;
+ if (yych <= 0xBF) goto yy958;
+ goto yy73;
+yy960:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy958;
+ goto yy73;
+yy961:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0x8F) goto yy958;
+ goto yy73;
+yy962:
+ yych = *++YYCURSOR;
+ if (yych <= '>') {
+ if (yych <= '&') {
if (yych <= '\f') {
- if (yych <= 0x00) {
+ if (yych <= 0x00) goto yy73;
+ if (yych == '\t') goto yy962;
+ goto yy814;
+ } else {
+ if (yych <= '\r') goto yy962;
+ if (yych == ' ') goto yy962;
+ goto yy814;
+ }
+ } else {
+ if (yych <= '.') {
+ if (yych <= '\'') goto yy811;
+ if (yych == '-') goto yy962;
+ goto yy814;
+ } else {
+ if (yych <= ':') {
+ if (yych >= '0') goto yy962;
+ } else {
+ if (yych <= '<') goto yy814;
+ if (yych <= '=') goto yy1091;
+ goto yy964;
+ }
+ }
+ }
+ } else {
+ if (yych <= 'z') {
+ if (yych <= '[') {
+ if (yych <= '?') goto yy963;
+ if (yych <= '@') goto yy814;
+ if (yych <= 'Z') goto yy962;
+ goto yy814;
+ } else {
+ if (yych <= '^') {
+ if (yych <= '\\') goto yy965;
+ goto yy814;
+ } else {
+ if (yych == '`') goto yy814;
+ goto yy962;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy814;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy966;
+ goto yy967;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy968;
+ goto yy969;
+ } else {
+ if (yych <= 0xF3) goto yy970;
+ if (yych <= 0xF4) goto yy971;
+ goto yy73;
+ }
+ }
+ }
+ }
+yy963:
+ yych = *++YYCURSOR;
+ if (yych <= '[') {
+ if (yych <= '/') {
+ if (yych <= '\'') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= '&') goto yy814;
+ goto yy811;
+ } else {
+ if (yych == '-') goto yy962;
+ if (yych <= '.') goto yy814;
+ goto yy963;
+ }
+ } else {
+ if (yych <= '>') {
+ if (yych <= ':') goto yy962;
+ if (yych <= '=') goto yy814;
+ goto yy1092;
+ } else {
+ if (yych <= '?') goto yy963;
+ if (yych <= '@') goto yy814;
+ if (yych <= 'Z') goto yy962;
+ goto yy814;
+ }
+ }
+ } else {
+ if (yych <= 0xC1) {
+ if (yych <= '_') {
+ if (yych <= '\\') goto yy965;
+ if (yych <= '^') goto yy814;
+ goto yy962;
+ } else {
+ if (yych <= '`') goto yy814;
+ if (yych <= 'z') goto yy962;
+ if (yych <= 0x7F) goto yy814;
+ goto yy73;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy966;
+ if (yych <= 0xE0) goto yy967;
+ goto yy968;
+ } else {
+ if (yych <= 0xF0) goto yy969;
+ if (yych <= 0xF3) goto yy970;
+ if (yych <= 0xF4) goto yy971;
+ goto yy73;
+ }
+ }
+ }
+yy964:
+ yych = *++YYCURSOR;
+ if (yych <= 0xC1) {
+ if (yych <= '\'') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= '&') goto yy964;
+ goto yy1083;
+ } else {
+ if (yych == '\\') goto yy1093;
+ if (yych <= 0x7F) goto yy964;
+ goto yy73;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy1094;
+ if (yych <= 0xE0) goto yy1095;
+ goto yy1096;
+ } else {
+ if (yych <= 0xF0) goto yy1097;
+ if (yych <= 0xF3) goto yy1098;
+ if (yych <= 0xF4) goto yy1099;
+ goto yy73;
+ }
+ }
+yy965:
+ yych = *++YYCURSOR;
+ if (yych <= '^') {
+ if (yych <= ':') {
+ if (yych <= '-') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= ',') goto yy814;
+ goto yy962;
+ } else {
+ if (yych <= '.') goto yy814;
+ if (yych <= '/') goto yy963;
+ goto yy962;
+ }
+ } else {
+ if (yych <= '?') {
+ if (yych <= '=') goto yy814;
+ if (yych <= '>') goto yy964;
+ goto yy963;
+ } else {
+ if (yych <= '@') goto yy814;
+ if (yych <= 'Z') goto yy962;
+ goto yy814;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych == '`') goto yy814;
+ goto yy962;
+ } else {
+ if (yych <= 0x7F) goto yy814;
+ if (yych <= 0xC1) goto yy73;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy967;
+ if (yych <= 0xEF) goto yy968;
+ goto yy969;
+ } else {
+ if (yych <= 0xF3) goto yy970;
+ if (yych <= 0xF4) goto yy971;
+ goto yy73;
+ }
+ }
+ }
+yy966:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy814;
+ goto yy73;
+yy967:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy73;
+ if (yych <= 0xBF) goto yy966;
+ goto yy73;
+yy968:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy966;
+ goto yy73;
+yy969:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy73;
+ if (yych <= 0xBF) goto yy968;
+ goto yy73;
+yy970:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy968;
+ goto yy73;
+yy971:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0x8F) goto yy968;
+ goto yy73;
+yy972:
+ yych = *++YYCURSOR;
+ if (yych == ' ') goto yy1100;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy972;
+ goto yy73;
+yy973:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy170;
+ if (yych <= '9') goto yy1101;
+ goto yy170;
+ } else {
+ if (yych <= 'F') goto yy1101;
+ if (yych <= '`') goto yy170;
+ if (yych <= 'f') goto yy1102;
+ goto yy170;
+ }
+yy974:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy201;
+ if (yych <= '9') goto yy1102;
+ goto yy201;
+ } else {
+ if (yych <= 'F') goto yy1102;
+ if (yych <= '`') goto yy201;
+ if (yych <= 'f') goto yy1102;
+ goto yy201;
+ }
+yy975:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '^') {
+ if (yych <= '/') {
+ if (yych <= ',') {
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy1026;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy656;
}
- if (yych <= 0x08) {
+ if (yych <= '.') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy657;
}
- if (yych <= '\n') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ } else {
+ if (yych <= '?') {
+ if (yych <= '9') goto yy1103;
+ if (yych <= ':') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1104;
}
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy305;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') {
- yyt2 = YYCURSOR;
- goto yy198;
- }
+ if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy284;
- } else {
- if (yych <= 0x1B) {
- yyt2 = YYCURSOR;
- goto yy198;
- }
- if (yych <= 0x1F) {
- yyt2 = YYCURSOR;
- goto yy284;
- }
+ goto yy565;
+ }
+ if (yych <= 'F') goto yy1105;
+ if (yych <= 'Z') goto yy481;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ }
+ } else {
+ if (yych <= 0xC1) {
+ if (yych <= 'f') {
+ if (yych <= '_') {
+ yyt2 = YYCURSOR;
+ goto yy483;
+ }
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1105;
+ } else {
+ if (yych <= 'z') goto yy481;
+ if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
}
+ goto yy39;
}
} else {
- if (yych <= '0') {
- if (yych <= '$') {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy313;
}
- if (yych <= ',') {
+ if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy314;
}
- if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ } else {
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy316;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy318;
}
- goto yy285;
+ goto yy39;
+ }
+ }
+ }
+yy976:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '^') {
+ if (yych <= '/') {
+ if (yych <= ',') {
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy1026;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
} else {
- if (yych <= '2') {
- if (yych <= '1') goto yy286;
- goto yy287;
- } else {
- if (yych <= '9') goto yy285;
- if (yych <= ':') goto yy1;
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy656;
+ }
+ if (yych <= '.') {
+ yyt2 = YYCURSOR;
+ goto yy657;
+ }
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ } else {
+ if (yych <= '?') {
+ if (yych <= '9') goto yy1106;
+ if (yych <= ':') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1104;
}
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ if (yych <= 'F') goto yy1105;
+ if (yych <= 'Z') goto yy481;
+ yyt2 = YYCURSOR;
+ goto yy305;
}
}
} else {
- if (yych <= '~') {
- if (yych <= '^') {
+ if (yych <= 0xC1) {
+ if (yych <= 'f') {
+ if (yych <= '_') {
+ yyt2 = YYCURSOR;
+ goto yy483;
+ }
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1105;
+ } else {
+ if (yych <= 'z') goto yy481;
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy39;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ yyt2 = YYCURSOR;
+ goto yy315;
+ } else {
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy316;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy39;
+ }
+ }
+ }
+yy977:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'Z') {
+ if (yych <= '4') {
+ if (yych <= ',') {
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy1026;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy656;
+ }
+ if (yych <= '.') {
+ yyt2 = YYCURSOR;
+ goto yy657;
+ }
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ goto yy1106;
+ }
+ } else {
+ if (yych <= ':') {
+ if (yych <= '5') goto yy1107;
+ if (yych <= '9') goto yy1103;
+ yyt2 = YYCURSOR;
+ goto yy1104;
+ } else {
+ if (yych <= '?') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy565;
+ }
+ if (yych <= 'F') goto yy1105;
+ goto yy481;
+ }
+ }
+ } else {
+ if (yych <= 0xC1) {
+ if (yych <= '`') {
+ if (yych == '_') {
+ yyt2 = YYCURSOR;
+ goto yy483;
}
- if (yych <= 'F') goto yy288;
- if (yych <= 'Z') goto yy3;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
} else {
- if (yych <= '`') {
- if (yych <= '_') {
- yyt2 = YYCURSOR;
- goto yy284;
- }
+ if (yych <= 'f') goto yy1105;
+ if (yych <= 'z') goto yy481;
+ if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
- } else {
- if (yych <= 'f') goto yy288;
- if (yych <= 'z') goto yy3;
+ goto yy305;
+ }
+ goto yy39;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ yyt2 = YYCURSOR;
+ goto yy315;
+ } else {
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy316;
+ }
+ if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy317;
}
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy39;
+ }
+ }
+ }
+yy978:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '^') {
+ if (yych <= '/') {
+ if (yych <= ',') {
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy1026;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy656;
+ }
+ if (yych <= '.') {
+ yyt2 = YYCURSOR;
+ goto yy663;
+ }
+ yyt2 = YYCURSOR;
+ goto yy565;
}
} else {
- if (yych <= 0xE0) {
+ if (yych <= '?') {
+ if (yych <= '9') goto yy1105;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1104;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ if (yych <= 'F') goto yy1105;
+ if (yych <= 'Z') goto yy481;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ }
+ } else {
+ if (yych <= 0xC1) {
+ if (yych <= 'f') {
+ if (yych <= '_') {
+ yyt2 = YYCURSOR;
+ goto yy483;
+ }
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1105;
+ } else {
+ if (yych <= 'z') goto yy481;
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy305;
}
- if (yych <= 0xC1) goto yy1;
+ goto yy39;
+ }
+ } else {
+ if (yych <= 0xEF) {
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy289;
+ goto yy313;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
}
yyt2 = YYCURSOR;
- goto yy290;
+ goto yy315;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) {
- yyt2 = YYCURSOR;
- goto yy291;
- }
yyt2 = YYCURSOR;
- goto yy292;
- } else {
- if (yych <= 0xF3) {
- yyt2 = YYCURSOR;
- goto yy293;
- }
- if (yych <= 0xF4) {
- yyt2 = YYCURSOR;
- goto yy294;
- }
- goto yy1;
+ goto yy316;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
}
+ goto yy39;
}
}
}
-yy192:
+yy979:
yych = *++YYCURSOR;
- if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy283;
- if (yych <= ':') goto yy282;
- goto yy1;
+ if (yych <= '9') {
+ if (yych <= '/') {
+ if (yych == '-') goto yy492;
+ goto yy73;
+ } else {
+ if (yych <= '0') goto yy1108;
+ if (yych <= '1') goto yy1109;
+ if (yych <= '2') goto yy1110;
+ goto yy1108;
+ }
} else {
- if (yych <= 'F') goto yy283;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy283;
- goto yy1;
+ if (yych <= '^') {
+ if (yych <= '@') goto yy73;
+ if (yych <= 'Z') goto yy481;
+ goto yy73;
+ } else {
+ if (yych == '`') goto yy73;
+ if (yych <= 'z') goto yy481;
+ goto yy73;
+ }
}
-yy193:
- yych = *++YYCURSOR;
- if (yych <= ':') {
- if (yych <= '.') goto yy1;
- if (yych <= '/') goto yy189;
- if (yych <= '9') goto yy272;
- goto yy191;
+yy980:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '.') goto yy979;
+ goto yy482;
+yy981:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '.') goto yy979;
+ if (yych <= '/') goto yy482;
+ if (yych <= '5') goto yy980;
+ goto yy482;
+yy982:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '_') {
+ if (yych <= '9') {
+ if (yych <= '-') {
+ if (yych <= ',') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt2 = YYCURSOR;
+ goto yy656;
+ } else {
+ if (yych <= '.') {
+ yyt2 = YYCURSOR;
+ goto yy663;
+ }
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ goto yy481;
+ }
+ } else {
+ if (yych <= '@') {
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy659;
+ }
+ if (yych <= '?') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt2 = YYCURSOR;
+ goto yy565;
+ } else {
+ if (yych <= 'Z') goto yy481;
+ if (yych <= '^') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt2 = YYCURSOR;
+ goto yy483;
+ }
+ }
} else {
- if (yych <= 'F') {
- if (yych <= '@') goto yy1;
- goto yy272;
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy481;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy39;
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
} else {
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy272;
- goto yy1;
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy39;
+ }
}
}
-yy194:
+yy983:
yych = *++YYCURSOR;
- if (yych <= '/') goto yy81;
- if (yych <= '9') goto yy295;
- goto yy81;
-yy195:
- yyaccept = 0;
+ if (yych <= '/') goto yy153;
+ if (yych <= '9') goto yy1111;
+ goto yy153;
+yy984:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1112;
+ goto yy73;
+yy985:
+ yyaccept = 15;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '?') {
- if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
+ if (yych <= ':') {
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy155;
+ goto yy88;
+ } else {
+ if (yych == '+') goto yy88;
+ goto yy155;
+ }
} else {
if (yych <= '.') {
- if (yych <= ',') goto yy4;
- goto yy46;
+ if (yych <= '-') goto yy121;
+ yyt3 = YYCURSOR;
+ goto yy349;
} else {
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy296;
- goto yy4;
+ if (yych <= '/') goto yy123;
+ if (yych <= '9') goto yy1102;
+ yyt3 = YYCURSOR;
+ goto yy353;
}
}
} else {
if (yych <= '^') {
- if (yych <= '@') goto yy96;
- if (yych <= 'F') goto yy261;
- if (yych <= 'Z') goto yy46;
- goto yy4;
+ if (yych <= '@') {
+ if (yych <= '?') goto yy155;
+ goto yy129;
+ } else {
+ if (yych <= 'F') goto yy1102;
+ if (yych <= 'Z') goto yy200;
+ goto yy155;
+ }
} else {
if (yych <= '`') {
- if (yych <= '_') goto yy46;
- goto yy4;
+ if (yych <= '_') goto yy49;
+ goto yy155;
} else {
- if (yych <= 'f') goto yy261;
- if (yych <= 'z') goto yy46;
- goto yy4;
+ if (yych <= 'f') goto yy1113;
+ if (yych <= 'z') goto yy489;
+ goto yy155;
}
}
}
-yy196:
- yyaccept = 12;
+yy986:
+ yych = *++YYCURSOR;
+ if (yych == 'g') goto yy1114;
+ goto yy73;
+yy987:
+ ++YYCURSOR;
+ yyt1 = yyt2;
+yy988:
+ YYCURSOR = yyt1;
+#line 295 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_TIME); }
+#line 24502 "../../lnav/src/data_scanner_re.cc"
+yy989:
+ yyaccept = 41;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= ':') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy113;
- if (yych <= 0x08) goto yy3;
- if (yych <= '\n') goto yy113;
- goto yy3;
+ yyt1 = yyt2;
+ if (yych <= '/') goto yy988;
+ if (yych <= '9') goto yy1115;
+ goto yy988;
+yy990:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy987;
+ goto yy73;
+yy991:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy73;
+ if (yych <= 0xBF) goto yy990;
+ goto yy73;
+yy992:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy990;
+ goto yy73;
+yy993:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy73;
+ if (yych <= 0xBF) goto yy992;
+ goto yy73;
+yy994:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy992;
+ goto yy73;
+yy995:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0x8F) goto yy992;
+ goto yy73;
+yy996:
+ yych = *++YYCURSOR;
+ if (yych == '+') goto yy1116;
+ goto yy73;
+yy997:
+ yyaccept = 10;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == ' ') goto yy1117;
+ goto yy114;
+yy998:
+ ++YYCURSOR;
+yy999:
+ YYCURSOR = yyt1;
+#line 385 "../../lnav/src/data_scanner_re.re"
+ {
+ RET(DT_IPV4_ADDRESS);
+ }
+#line 24557 "../../lnav/src/data_scanner_re.cc"
+yy1000:
+ yyaccept = 42;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '/') {
+ if (yych <= '*') {
+ if (yych == '%') goto yy89;
+ goto yy999;
+ } else {
+ if (yych == ',') goto yy999;
+ if (yych <= '.') goto yy89;
+ goto yy999;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '9') goto yy89;
+ if (yych <= '?') goto yy999;
+ if (yych <= 'Z') goto yy89;
+ goto yy999;
+ } else {
+ if (yych == '`') goto yy999;
+ if (yych <= 'z') goto yy89;
+ goto yy999;
+ }
+ }
+yy1001:
+ yyaccept = 42;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '9') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy88;
+ if (yych <= '*') goto yy999;
+ goto yy88;
+ } else {
+ if (yych <= ',') goto yy999;
+ if (yych <= '.') goto yy88;
+ if (yych <= '/') goto yy999;
+ goto yy530;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '?') goto yy999;
+ if (yych <= '@') goto yy90;
+ if (yych <= 'Z') goto yy530;
+ goto yy999;
+ } else {
+ if (yych == '`') goto yy999;
+ if (yych <= 'z') goto yy530;
+ goto yy999;
+ }
+ }
+yy1002:
+ yyaccept = 42;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '9') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy88;
+ if (yych <= '*') goto yy999;
+ goto yy88;
+ } else {
+ if (yych <= ',') goto yy999;
+ if (yych <= '.') goto yy88;
+ if (yych <= '/') goto yy999;
+ goto yy695;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '?') goto yy999;
+ if (yych <= '@') goto yy90;
+ if (yych <= 'Z') goto yy137;
+ goto yy999;
+ } else {
+ if (yych == '`') goto yy999;
+ if (yych <= 'z') goto yy137;
+ goto yy999;
+ }
+ }
+yy1003:
+ yych = *++YYCURSOR;
+ if (yych <= 'Z') {
+ if (yych <= '/') goto yy999;
+ if (yych <= '9') goto yy277;
+ if (yych <= '@') goto yy999;
+ goto yy277;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy999;
+ goto yy277;
+ } else {
+ if (yych <= '`') goto yy999;
+ if (yych <= 'z') goto yy277;
+ goto yy999;
+ }
+ }
+yy1004:
+ yyaccept = 31;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'Z') {
+ if (yych <= '-') {
+ if (yych <= '*') {
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy1000;
+ }
+ yyt1 = YYCURSOR;
+ goto yy998;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') goto yy113;
- goto yy3;
- } else {
- if (yych <= 0x1B) goto yy113;
- if (yych <= 0x1F) goto yy3;
- goto yy113;
+ if (yych <= '+') {
+ yyt1 = YYCURSOR;
+ goto yy1000;
}
+ if (yych <= ',') {
+ yyt1 = YYCURSOR;
+ goto yy998;
+ }
+ yyt1 = YYCURSOR;
+ goto yy1001;
}
} else {
- if (yych <= '+') {
- if (yych <= '$') goto yy3;
- if (yych <= '%') goto yy80;
- if (yych <= '*') goto yy113;
- goto yy80;
- } else {
+ if (yych <= '9') {
if (yych <= '.') {
- if (yych <= ',') goto yy113;
- goto yy46;
- } else {
- if (yych <= '/') goto yy3;
- if (yych <= '9') goto yy196;
- goto yy148;
+ yyt1 = YYCURSOR;
+ goto yy1002;
+ }
+ if (yych <= '/') {
+ yyt1 = YYCURSOR;
+ goto yy1003;
+ }
+ goto yy695;
+ } else {
+ if (yych <= ':') {
+ yyt1 = YYCURSOR;
+ goto yy1005;
+ }
+ if (yych <= '?') {
+ yyt1 = YYCURSOR;
+ goto yy998;
+ }
+ if (yych <= '@') {
+ yyt1 = YYCURSOR;
+ goto yy1006;
+ }
+ yyt1 = YYCURSOR;
+ goto yy1007;
+ }
+ }
+ } else {
+ if (yych <= 0xC1) {
+ if (yych <= '`') {
+ if (yych == '_') {
+ yyt1 = YYCURSOR;
+ goto yy1007;
+ }
+ yyt1 = YYCURSOR;
+ goto yy998;
+ } else {
+ if (yych <= 'z') {
+ yyt1 = YYCURSOR;
+ goto yy1007;
+ }
+ if (yych <= 0x7F) {
+ yyt1 = YYCURSOR;
+ goto yy998;
}
+ goto yy532;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
+ yyt1 = YYCURSOR;
+ goto yy1008;
+ }
+ if (yych <= 0xE0) {
+ yyt1 = YYCURSOR;
+ goto yy1009;
+ }
+ yyt1 = YYCURSOR;
+ goto yy1010;
+ } else {
+ if (yych <= 0xF0) {
+ yyt1 = YYCURSOR;
+ goto yy1011;
+ }
+ if (yych <= 0xF3) {
+ yyt1 = YYCURSOR;
+ goto yy1012;
+ }
+ if (yych <= 0xF4) {
+ yyt1 = YYCURSOR;
+ goto yy1013;
+ }
+ goto yy532;
}
}
+ }
+yy1005:
+ yyaccept = 42;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == ':') goto yy123;
+ goto yy999;
+yy1006:
+ yyaccept = 42;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '.') {
+ if (yych <= ',') goto yy999;
+ goto yy214;
+ } else {
+ if (yych <= '/') goto yy999;
+ if (yych <= '9') goto yy290;
+ goto yy999;
+ }
} else {
- if (yych <= 'z') {
- if (yych <= 'Z') {
- if (yych <= '?') goto yy113;
- if (yych <= '@') goto yy96;
- if (yych <= 'F') goto yy196;
- goto yy115;
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy290;
+ if (yych <= '^') goto yy999;
+ goto yy277;
+ } else {
+ if (yych <= '`') goto yy999;
+ if (yych <= 'z') goto yy290;
+ goto yy999;
+ }
+ }
+yy1007:
+ yyaccept = 42;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= '*') {
+ if (yych == '%') goto yy696;
+ goto yy999;
+ } else {
+ if (yych == ',') goto yy999;
+ goto yy696;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '?') goto yy999;
+ if (yych <= 'Z') goto yy696;
+ goto yy999;
+ } else {
+ if (yych == '`') goto yy999;
+ if (yych <= 'z') goto yy696;
+ goto yy999;
+ }
+ }
+yy1008:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy998;
+ goto yy73;
+yy1009:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy73;
+ if (yych <= 0xBF) goto yy1008;
+ goto yy73;
+yy1010:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy1008;
+ goto yy73;
+yy1011:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy73;
+ if (yych <= 0xBF) goto yy1010;
+ goto yy73;
+yy1012:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy1010;
+ goto yy73;
+yy1013:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0x8F) goto yy1010;
+ goto yy73;
+yy1014:
+ yyaccept = 31;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '-') {
+ if (yych <= '*') {
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy1000;
+ }
+ yyt1 = YYCURSOR;
+ goto yy998;
} else {
- if (yych <= '_') {
- if (yych <= '^') goto yy113;
- goto yy46;
- } else {
- if (yych <= '`') goto yy113;
- if (yych <= 'f') goto yy196;
- goto yy115;
+ if (yych <= '+') {
+ yyt1 = YYCURSOR;
+ goto yy1000;
}
+ if (yych <= ',') {
+ yyt1 = YYCURSOR;
+ goto yy998;
+ }
+ yyt1 = YYCURSOR;
+ goto yy1001;
}
} else {
- if (yych <= 0xE0) {
+ if (yych <= '5') {
+ if (yych <= '.') {
+ yyt1 = YYCURSOR;
+ goto yy1002;
+ }
+ if (yych <= '/') {
+ yyt1 = YYCURSOR;
+ goto yy1003;
+ }
+ goto yy1004;
+ } else {
+ if (yych <= '9') goto yy695;
+ if (yych <= ':') {
+ yyt1 = YYCURSOR;
+ goto yy1005;
+ }
+ if (yych <= '?') {
+ yyt1 = YYCURSOR;
+ goto yy998;
+ }
+ yyt1 = YYCURSOR;
+ goto yy1006;
+ }
+ }
+ } else {
+ if (yych <= 0xC1) {
+ if (yych <= '_') {
+ if (yych <= 'Z') {
+ yyt1 = YYCURSOR;
+ goto yy1007;
+ }
+ if (yych <= '^') {
+ yyt1 = YYCURSOR;
+ goto yy998;
+ }
+ yyt1 = YYCURSOR;
+ goto yy1007;
+ } else {
+ if (yych <= '`') {
+ yyt1 = YYCURSOR;
+ goto yy998;
+ }
+ if (yych <= 'z') {
+ yyt1 = YYCURSOR;
+ goto yy1007;
+ }
if (yych <= 0x7F) {
- if (yych <= '~') goto yy113;
- goto yy3;
- } else {
- if (yych <= 0xC1) goto yy113;
- if (yych <= 0xDF) goto yy56;
- goto yy57;
+ yyt1 = YYCURSOR;
+ goto yy998;
+ }
+ goto yy532;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
+ yyt1 = YYCURSOR;
+ goto yy1008;
}
+ if (yych <= 0xE0) {
+ yyt1 = YYCURSOR;
+ goto yy1009;
+ }
+ yyt1 = YYCURSOR;
+ goto yy1010;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy58;
- goto yy59;
- } else {
- if (yych <= 0xF3) goto yy60;
- if (yych <= 0xF4) goto yy61;
- goto yy113;
+ yyt1 = YYCURSOR;
+ goto yy1011;
+ }
+ if (yych <= 0xF3) {
+ yyt1 = YYCURSOR;
+ goto yy1012;
}
+ if (yych <= 0xF4) {
+ yyt1 = YYCURSOR;
+ goto yy1013;
+ }
+ goto yy532;
}
}
}
-yy197:
- yyaccept = 6;
+yy1015:
+ yyaccept = 31;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == 'B') goto yy842;
+ if (yych == 'b') goto yy842;
+ goto yy531;
+yy1016:
+ yyaccept = 31;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
+ if (yych <= 'a') {
+ if (yych == 'B') goto yy842;
+ goto yy531;
+ } else {
+ if (yych <= 'b') goto yy842;
+ if (yych == 'n') goto yy842;
+ goto yy531;
}
+yy1017:
+ yyaccept = 32;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '-') goto yy713;
+ if (yych == ':') goto yy713;
+ goto yy544;
+yy1018:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '/') goto yy278;
+ if (yych <= '9') goto yy1118;
+ goto yy278;
+yy1019:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1119;
+ goto yy73;
+yy1020:
+ yyaccept = 43;
+ yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '9') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy26;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy26;
- goto yy4;
+ if (yych <= '%') {
+ if (yych == ' ') goto yy1120;
+ if (yych >= '%') goto yy138;
+ } else {
+ if (yych <= '+') {
+ if (yych >= '+') goto yy138;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') goto yy26;
- goto yy4;
- } else {
- if (yych <= 0x1B) goto yy26;
- if (yych <= 0x1F) goto yy4;
- goto yy26;
+ if (yych <= ',') goto yy1021;
+ if (yych <= '/') goto yy138;
+ goto yy1121;
+ }
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '?') {
+ if (yych <= ':') goto yy138;
+ } else {
+ if (yych == 'T') goto yy1122;
+ goto yy138;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych >= '_') goto yy138;
+ } else {
+ if (yych <= '`') goto yy1021;
+ if (yych <= 'z') goto yy138;
+ }
+ }
+ }
+yy1021:
+#line 309 "../../lnav/src/data_scanner_re.re"
+ {
+ RET(DT_DATE);
+ }
+#line 25010 "../../lnav/src/data_scanner_re.cc"
+yy1022:
+ yyaccept = 43;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '?') {
+ if (yych <= ',') {
+ if (yych == ' ') goto yy1120;
+ goto yy1021;
+ } else {
+ if (yych <= '/') goto yy278;
+ if (yych <= '9') goto yy1123;
+ if (yych <= ':') goto yy278;
+ goto yy1021;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych == 'T') goto yy1124;
+ if (yych <= 'Z') goto yy278;
+ goto yy1021;
+ } else {
+ if (yych == '`') goto yy1021;
+ if (yych <= 'z') goto yy278;
+ goto yy1021;
+ }
+ }
+yy1023:
+ yyaccept = 12;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ if (yych <= '7') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy119;
+ if (yych <= '*') goto yy125;
+ goto yy297;
+ } else {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy125;
+ goto yy1125;
+ } else {
+ if (yych <= '.') goto yy409;
+ if (yych <= '/') goto yy297;
+ goto yy1126;
+ }
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '9') goto yy1127;
+ if (yych <= ':') goto yy297;
+ if (yych <= '?') goto yy125;
+ goto yy297;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy125;
+ goto yy297;
+ } else {
+ if (yych <= '`') goto yy125;
+ if (yych <= 'z') goto yy297;
+ goto yy125;
+ }
+ }
+ }
+yy1024:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ if (yych <= '-') {
+ if (yych == '%') goto yy119;
+ if (yych <= ',') goto yy297;
+ goto yy1125;
+ } else {
+ if (yych <= '.') goto yy409;
+ if (yych <= '/') goto yy297;
+ if (yych <= '9') goto yy1127;
+ goto yy297;
+ }
+yy1025:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '-') goto yy1125;
+ goto yy297;
+yy1026:
+ yyaccept = 27;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') {
+ yyt2 = yyt1;
+ goto yy306;
+ }
+ if (yych <= '9') goto yy856;
+ yyt2 = yyt1;
+ goto yy306;
+ } else {
+ if (yych <= 'Z') goto yy856;
+ if (yych <= '`') {
+ yyt2 = yyt1;
+ goto yy306;
+ }
+ if (yych <= 'z') goto yy856;
+ yyt2 = yyt1;
+ goto yy306;
+ }
+yy1027:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '^') {
+ if (yych <= '/') {
+ if (yych <= ',') {
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy1026;
}
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych == '.') {
+ yyt2 = YYCURSOR;
+ goto yy566;
+ }
+ yyt2 = YYCURSOR;
+ goto yy565;
}
} else {
- if (yych <= '+') {
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy105;
- if (yych <= '*') goto yy26;
- goto yy80;
+ if (yych <= '?') {
+ if (yych <= '9') goto yy1128;
+ if (yych >= ';') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt1 = YYCURSOR;
} else {
- if (yych <= '-') {
- if (yych <= ',') goto yy26;
- goto yy46;
- } else {
- if (yych <= '.') goto yy182;
- if (yych <= '/') goto yy4;
- goto yy268;
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy565;
}
+ if (yych <= 'F') goto yy1128;
+ if (yych <= 'Z') goto yy277;
+ yyt2 = YYCURSOR;
+ goto yy305;
}
}
} else {
- if (yych <= '_') {
- if (yych <= 'D') {
- if (yych <= ':') goto yy147;
- if (yych <= '?') goto yy26;
- if (yych <= '@') goto yy96;
- goto yy269;
+ if (yych <= 0xC1) {
+ if (yych <= 'f') {
+ if (yych <= '_') {
+ yyt2 = YYCURSOR;
+ goto yy431;
+ }
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1128;
} else {
- if (yych <= 'F') {
- if (yych <= 'E') goto yy270;
- goto yy269;
- } else {
- if (yych <= 'Z') goto yy115;
- if (yych <= '^') goto yy26;
- goto yy46;
+ if (yych <= 'z') goto yy277;
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy133;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ yyt2 = YYCURSOR;
+ goto yy315;
+ } else {
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy316;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
}
+ goto yy133;
}
+ }
+ }
+yy1028:
+ yych = *++YYCURSOR;
+ if (yych <= ':') {
+ if (yych <= ' ') {
+ if (yych <= 0x1F) goto yy73;
+ yyt2 = yyt1;
+ goto yy305;
} else {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1129;
+ goto yy123;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy73;
+ goto yy1129;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy1129;
+ goto yy73;
+ }
+ }
+yy1029:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '_') {
+ if (yych <= ':') {
+ if (yych <= ',') {
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy1026;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ if (yych <= '9') goto yy1128;
+ yyt1 = YYCURSOR;
+ goto yy1028;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '?') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ goto yy1128;
+ } else {
+ if (yych <= 'Z') goto yy277;
+ if (yych <= '^') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt2 = YYCURSOR;
+ goto yy431;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
if (yych <= 'z') {
- if (yych <= 'd') {
- if (yych <= '`') goto yy26;
- goto yy269;
- } else {
- if (yych <= 'e') goto yy270;
- if (yych <= 'f') goto yy269;
- goto yy115;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
+ if (yych <= 'f') goto yy1128;
+ goto yy277;
} else {
if (yych <= 0x7F) {
- if (yych <= '~') goto yy26;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy26;
- if (yych <= 0xF4) goto yy4;
- goto yy26;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy133;
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
}
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy133;
}
}
}
-yy198:
- ++YYCURSOR;
-yy199:
- YYCURSOR = yyt2;
-#line 190 "../../lnav/src/data_scanner_re.re"
- { RET(DT_IPV6_ADDRESS); }
-#line 5991 "../../lnav/src/data_scanner_re.cc"
-yy200:
+yy1030:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '^') {
+ if (yych <= '/') {
+ if (yych <= ',') {
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy1026;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych == '.') {
+ yyt2 = YYCURSOR;
+ goto yy566;
+ }
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ } else {
+ if (yych <= '?') {
+ if (yych <= '9') goto yy1130;
+ if (yych <= ':') {
+ yyt1 = YYCURSOR;
+ goto yy1028;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ if (yych <= 'F') goto yy1128;
+ if (yych <= 'Z') goto yy277;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ }
+ } else {
+ if (yych <= 0xC1) {
+ if (yych <= 'f') {
+ if (yych <= '_') {
+ yyt2 = YYCURSOR;
+ goto yy431;
+ }
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1128;
+ } else {
+ if (yych <= 'z') goto yy277;
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy133;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ yyt2 = YYCURSOR;
+ goto yy315;
+ } else {
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy316;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy133;
+ }
+ }
+ }
+yy1031:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'Z') {
+ if (yych <= '/') {
+ if (yych <= ',') {
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy1026;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych == '.') {
+ yyt2 = YYCURSOR;
+ goto yy566;
+ }
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ } else {
+ if (yych <= ':') {
+ if (yych <= '5') goto yy1130;
+ if (yych <= '9') goto yy1128;
+ yyt1 = YYCURSOR;
+ goto yy1028;
+ } else {
+ if (yych <= '?') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ if (yych <= 'F') goto yy1128;
+ goto yy277;
+ }
+ }
+ } else {
+ if (yych <= 0xC1) {
+ if (yych <= '`') {
+ if (yych == '_') {
+ yyt2 = YYCURSOR;
+ goto yy431;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'f') goto yy1128;
+ if (yych <= 'z') goto yy277;
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy133;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ yyt2 = YYCURSOR;
+ goto yy315;
+ } else {
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy316;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy133;
+ }
+ }
+ }
+yy1032:
+ yyaccept = 32;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '`') {
+ if (yych <= '/') {
+ if (yych <= ',') {
+ yyt2 = YYCURSOR;
+ goto yy987;
+ }
+ if (yych <= '-') {
+ yyt1 = YYCURSOR;
+ goto yy1131;
+ }
+ if (yych <= '.') {
+ yyt2 = YYCURSOR;
+ goto yy989;
+ }
+ yyt2 = YYCURSOR;
+ goto yy987;
+ } else {
+ if (yych <= ':') {
+ if (yych <= '9') {
+ yyt1 = YYCURSOR;
+ goto yy1034;
+ }
+ goto yy1132;
+ } else {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy987;
+ }
+ if (yych <= 'F') {
+ yyt1 = YYCURSOR;
+ goto yy1034;
+ }
+ yyt2 = YYCURSOR;
+ goto yy987;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'f') {
+ yyt1 = YYCURSOR;
+ goto yy1034;
+ }
+ yyt2 = YYCURSOR;
+ goto yy987;
+ } else {
+ if (yych <= 0xC1) goto yy544;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy990;
+ }
+ yyt2 = YYCURSOR;
+ goto yy991;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy992;
+ }
+ yyt2 = YYCURSOR;
+ goto yy993;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy994;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy995;
+ }
+ goto yy544;
+ }
+ }
+ }
+yy1033:
+ yyaccept = 32;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy544;
+ goto yy713;
+ } else {
+ if (yych <= '/') goto yy544;
+ if (yych <= '9') goto yy864;
+ goto yy1132;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy544;
+ goto yy864;
+ } else {
+ if (yych <= '`') goto yy544;
+ if (yych <= 'f') goto yy864;
+ goto yy544;
+ }
+ }
+yy1034:
+ yyaccept = 41;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy988;
+ if (yych <= '9') goto yy1035;
+ if (yych <= ':') goto yy718;
+ goto yy988;
+ } else {
+ if (yych <= 'F') goto yy1035;
+ if (yych <= '`') goto yy988;
+ if (yych >= 'g') goto yy988;
+ }
+yy1035:
+ yych = *++YYCURSOR;
+ if (yych == ':') goto yy718;
+ goto yy73;
+yy1036:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1133;
+ if (yych >= ';') goto yy73;
+ } else {
+ if (yych <= 'F') goto yy1133;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy1133;
+ goto yy73;
+ }
+yy1037:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1134;
+ if (yych <= ':') goto yy1135;
+ goto yy73;
+ } else {
+ if (yych <= 'F') goto yy1134;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy1134;
+ goto yy73;
+ }
+yy1038:
yych = *++YYCURSOR;
if (yych <= 'f') {
if (yych <= ':') {
if (yych <= '.') {
if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
}
- yyt1 = YYCURSOR;
- goto yy297;
+ yyt4 = YYCURSOR;
+ goto yy867;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
}
- if (yych <= '9') goto yy298;
- goto yy299;
+ if (yych <= '9') goto yy1136;
+ yyt2 = YYCURSOR;
+ goto yy1137;
}
} else {
if (yych <= 'F') {
if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
}
- goto yy300;
+ goto yy1138;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy73;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
}
- goto yy300;
+ goto yy1138;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy73;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
} else {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy73;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy313;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy314;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy315;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy316;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy317;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy318;
}
- goto yy1;
+ goto yy73;
}
}
}
-yy201:
+yy1039:
yych = *++YYCURSOR;
if (yych <= 'f') {
if (yych <= ':') {
if (yych <= '.') {
if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
}
- yyt1 = YYCURSOR;
- goto yy297;
+ yyt4 = YYCURSOR;
+ goto yy867;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
}
- if (yych <= '9') goto yy301;
- goto yy299;
+ if (yych <= '9') goto yy1139;
+ yyt2 = YYCURSOR;
+ goto yy1137;
}
} else {
if (yych <= 'F') {
if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
}
- goto yy300;
+ goto yy1138;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy73;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
}
- goto yy300;
+ goto yy1138;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy73;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
} else {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy73;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy313;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy314;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy315;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy316;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy317;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy318;
}
- goto yy1;
+ goto yy73;
}
}
}
-yy202:
+yy1040:
yych = *++YYCURSOR;
if (yych <= '`') {
if (yych <= '5') {
if (yych <= '.') {
if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
}
- yyt1 = YYCURSOR;
- goto yy297;
+ yyt4 = YYCURSOR;
+ goto yy867;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
}
- if (yych <= '4') goto yy301;
- goto yy302;
+ if (yych <= '4') goto yy1139;
+ goto yy1140;
}
} else {
if (yych <= '@') {
- if (yych <= '9') goto yy298;
- if (yych <= ':') goto yy299;
+ if (yych <= '9') goto yy1136;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1137;
+ }
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
} else {
- if (yych <= 'F') goto yy300;
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'F') goto yy1138;
+ if (yych <= 'Z') goto yy73;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
}
}
} else {
if (yych <= 0xDF) {
if (yych <= 'z') {
- if (yych <= 'f') goto yy300;
- goto yy1;
+ if (yych <= 'f') goto yy1138;
+ goto yy73;
} else {
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
}
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy73;
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy313;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy314;
}
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy315;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy316;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy317;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy318;
}
- goto yy1;
+ goto yy73;
}
}
}
-yy203:
+yy1041:
yych = *++YYCURSOR;
if (yych <= 'z') {
if (yych <= '@') {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1138;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1137;
}
- if (yych <= '9') goto yy300;
- if (yych <= ':') goto yy299;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
} else {
if (yych <= 'Z') {
- if (yych <= 'F') goto yy300;
- goto yy1;
+ if (yych <= 'F') goto yy1138;
+ goto yy73;
} else {
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
}
- if (yych <= 'f') goto yy300;
- goto yy1;
+ if (yych <= 'f') goto yy1138;
+ goto yy73;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
}
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy73;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy313;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy314;
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy315;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy316;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy317;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy318;
}
- goto yy1;
+ goto yy73;
}
}
}
-yy204:
+yy1042:
+ yych = *++YYCURSOR;
+ if (yych <= 'z') {
+ if (yych <= '@') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1141;
+ if (yych <= ':') {
+ yyt4 = YYCURSOR;
+ goto yy869;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= 'F') goto yy1141;
+ goto yy73;
+ } else {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 'f') goto yy1141;
+ goto yy73;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy1043:
yych = *++YYCURSOR;
if (yych <= 'f') {
- if (yych <= 'E') {
- if (yych <= '9') {
- if (yych <= '/') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
}
- goto yy300;
+ yyt4 = YYCURSOR;
+ goto yy867;
} else {
- if (yych <= ':') goto yy299;
- if (yych <= '@') {
+ if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
}
- goto yy300;
+ if (yych <= '9') goto yy1141;
+ yyt4 = YYCURSOR;
+ goto yy869;
}
} else {
- if (yych <= 'Z') {
- if (yych <= 'F') goto yy303;
- goto yy1;
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1141;
} else {
+ if (yych <= 'Z') goto yy73;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
}
- if (yych <= 'e') goto yy300;
- goto yy303;
+ goto yy1141;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy73;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
} else {
- if (yych <= 0xC1) goto yy1;
- if (yych >= 0xE0) {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy313;
}
yyt2 = YYCURSOR;
+ goto yy314;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy315;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy316;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy317;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy318;
}
- goto yy1;
+ goto yy73;
}
}
}
-yy205:
+yy1044:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '.') goto yy1142;
+ if (yych <= '/') goto yy278;
+ if (yych <= '9') goto yy1143;
+ goto yy278;
+yy1045:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '.') goto yy1142;
+ if (yych <= '/') goto yy278;
+ if (yych <= '9') goto yy1044;
+ goto yy278;
+yy1046:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '/') {
+ if (yych == '.') goto yy1142;
+ goto yy278;
+ } else {
+ if (yych <= '4') goto yy1044;
+ if (yych <= '5') goto yy1144;
+ if (yych <= '9') goto yy1143;
+ goto yy278;
+ }
+yy1047:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy198;
- goto yy1;
-yy206:
+ if (yych <= 'z') {
+ if (yych <= '@') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1145;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy878;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= 'F') goto yy1145;
+ goto yy73;
+ } else {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 'f') goto yy1145;
+ goto yy73;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy1048:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ switch (yych) {
+ case '%': goto yy119;
+ case '+':
+ case '/':
+ case ':':
+ case '@':
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy297;
+ case '-': goto yy1125;
+ case '.': goto yy443;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy1146;
+ case 'B':
+ case 'b': goto yy1147;
+ case 'E':
+ case 'e': goto yy1148;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy132;
+ case 'S':
+ case 's': goto yy136;
+ case 'm': goto yy139;
+ case 'p':
+ case 'u': goto yy140;
+ default: goto yy24;
+ }
+yy1049:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= '*') {
+ if (yych == '%') goto yy297;
+ goto yy24;
+ } else {
+ if (yych <= '+') goto yy297;
+ if (yych <= ',') goto yy24;
+ if (yych <= '-') goto yy1125;
+ goto yy297;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '?') goto yy24;
+ if (yych <= 'Z') goto yy297;
+ goto yy24;
+ } else {
+ if (yych == '`') goto yy24;
+ if (yych <= 'z') goto yy297;
+ goto yy24;
+ }
+ }
+yy1050:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '+') goto yy302;
+ if (yych == '-') goto yy1149;
+ goto yy297;
+yy1051:
yych = *++YYCURSOR;
- if (yych <= 0x9F) goto yy1;
- if (yych <= 0xBF) goto yy205;
- goto yy1;
-yy207:
+ if (yych <= '1') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '0') goto yy1150;
+ goto yy1151;
+ } else {
+ if (yych <= '2') goto yy1152;
+ if (yych <= '9') goto yy1150;
+ goto yy73;
+ }
+yy1052:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy205;
- goto yy1;
-yy208:
+ if (yych == '.') goto yy1051;
+ goto yy73;
+yy1053:
yych = *++YYCURSOR;
- if (yych <= 0x8F) goto yy1;
- if (yych <= 0xBF) goto yy207;
- goto yy1;
-yy209:
+ if (yych == '.') goto yy1051;
+ if (yych <= '/') goto yy73;
+ if (yych <= '5') goto yy1052;
+ goto yy73;
+yy1054:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy207;
- goto yy1;
-yy210:
+ if (yych <= 0x7F) {
+ if (yych <= '@') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy73;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy743;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ yyt2 = YYCURSOR;
+ goto yy315;
+ } else {
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy316;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+yy1055:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0x8F) goto yy207;
- goto yy1;
-yy211:
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt1 = YYCURSOR;
+ goto yy444;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1153;
+ yyt2 = YYCURSOR;
+ goto yy1154;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy742;
+ } else {
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy742;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy1056:
yych = *++YYCURSOR;
- if (yych <= '@') {
- if (yych <= '-') {
- if (yych <= ',') goto yy305;
- goto yy308;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt1 = YYCURSOR;
+ goto yy444;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1155;
+ yyt2 = YYCURSOR;
+ goto yy743;
+ }
} else {
- if (yych <= '/') goto yy305;
- if (yych <= ':') goto yy308;
- goto yy305;
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy742;
+ } else {
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy742;
+ }
}
} else {
- if (yych <= '_') {
- if (yych <= 'Z') goto yy308;
- if (yych <= '^') goto yy305;
- goto yy308;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
} else {
- if (yych <= '`') goto yy305;
- if (yych <= 'z') goto yy308;
- goto yy305;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
}
}
-yy212:
+yy1057:
yych = *++YYCURSOR;
-yy213:
- if (yych <= '/') {
+ if (yych <= '`') {
+ if (yych <= '5') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt1 = YYCURSOR;
+ goto yy444;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '4') goto yy1155;
+ goto yy1156;
+ }
+ } else {
+ if (yych <= '@') {
+ if (yych <= '9') goto yy1153;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy743;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'F') goto yy742;
+ if (yych <= 'Z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= 'f') goto yy742;
+ goto yy73;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy1058:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt1 = YYCURSOR;
+ goto yy444;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1153;
+ yyt2 = YYCURSOR;
+ goto yy743;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy742;
+ } else {
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy742;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy1059:
+ yych = *++YYCURSOR;
+ if (yych <= '*') {
if (yych <= 0x1F) {
if (yych <= '\t') {
- if (yych <= 0x08) goto yy1;
- goto yy212;
+ if (yych <= 0x00) goto yy73;
+ if (yych <= 0x08) goto yy620;
+ goto yy1059;
} else {
- if (yych == '\r') goto yy212;
- goto yy1;
+ if (yych == '\r') goto yy1059;
+ goto yy620;
}
} else {
- if (yych <= ',') {
- if (yych <= ' ') goto yy212;
- goto yy1;
+ if (yych <= '"') {
+ if (yych <= ' ') goto yy1059;
+ if (yych <= '!') goto yy620;
+ goto yy623;
} else {
- if (yych <= '-') goto yy311;
- if (yych <= '.') goto yy1;
- goto yy215;
+ if (yych == '\'') goto yy624;
+ if (yych <= ')') goto yy620;
+ goto yy73;
}
}
} else {
- if (yych <= '@') {
+ if (yych <= 0xC1) {
if (yych <= '=') {
- if (yych <= ':') goto yy311;
- goto yy1;
+ if (yych == '-') goto yy747;
+ goto yy620;
} else {
- if (yych <= '>') goto yy216;
- if (yych <= '?') goto yy215;
- goto yy1;
+ if (yych <= '>') goto yy627;
+ if (yych <= 0x7F) goto yy620;
+ goto yy73;
}
} else {
- if (yych <= '_') {
- if (yych <= 'Z') goto yy311;
- if (yych <= '^') goto yy1;
- goto yy311;
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy628;
+ if (yych <= 0xE0) goto yy629;
+ goto yy630;
} else {
- if (yych <= '`') goto yy1;
- if (yych <= 'z') goto yy311;
- goto yy1;
+ if (yych <= 0xF0) goto yy631;
+ if (yych <= 0xF3) goto yy632;
+ if (yych <= 0xF4) goto yy633;
+ goto yy73;
}
}
}
-yy214:
+yy1060:
+ yyaccept = 39;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[256+yych] & 1) {
+ goto yy750;
+ }
+ if (yych <= 0xC1) {
+ if (yych <= '*') {
+ if (yych <= 0x00) goto yy895;
+ if (yych <= '"') goto yy891;
+ goto yy604;
+ } else {
+ if (yych <= '-') goto yy751;
+ if (yych <= '\\') goto yy752;
+ goto yy895;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy753;
+ if (yych <= 0xE0) goto yy754;
+ goto yy755;
+ } else {
+ if (yych <= 0xF0) goto yy756;
+ if (yych <= 0xF3) goto yy757;
+ if (yych <= 0xF4) goto yy758;
+ goto yy895;
+ }
+ }
+yy1061:
+ yyaccept = 39;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[256+yych] & 2) {
+ goto yy759;
+ }
+ if (yych <= 0xC1) {
+ if (yych <= '*') {
+ if (yych <= 0x00) goto yy895;
+ if (yych <= '\'') goto yy891;
+ goto yy612;
+ } else {
+ if (yych <= '-') goto yy760;
+ if (yych <= '\\') goto yy761;
+ goto yy895;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy762;
+ if (yych <= 0xE0) goto yy763;
+ goto yy764;
+ } else {
+ if (yych <= 0xF0) goto yy765;
+ if (yych <= 0xF3) goto yy766;
+ if (yych <= 0xF4) goto yy767;
+ goto yy895;
+ }
+ }
+yy1062:
yych = *++YYCURSOR;
- if (yybm[512+yych] & 16) {
- goto yy214;
+ if (yych <= 0xC1) {
+ if (yych <= '-') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= ',') goto yy896;
+ goto yy1157;
+ } else {
+ if (yych == '>') goto yy1063;
+ if (yych <= 0x7F) goto yy896;
+ goto yy73;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy1064;
+ if (yych <= 0xE0) goto yy1065;
+ goto yy1066;
+ } else {
+ if (yych <= 0xF0) goto yy1067;
+ if (yych <= 0xF3) goto yy1068;
+ if (yych <= 0xF4) goto yy1069;
+ goto yy73;
+ }
+ }
+yy1063:
+ yyaccept = 34;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[0+yych] & 64) {
+ goto yy1158;
+ }
+ if (yych <= 0xC1) {
+ if (yych <= '\'') {
+ if (yych <= 0x00) goto yy458;
+ if (yych <= '"') goto yy1159;
+ goto yy1160;
+ } else {
+ if (yych <= '*') goto yy1161;
+ if (yych <= '-') goto yy1162;
+ if (yych <= '\\') goto yy1163;
+ goto yy458;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy1164;
+ if (yych <= 0xE0) goto yy1165;
+ goto yy1166;
+ } else {
+ if (yych <= 0xF0) goto yy1167;
+ if (yych <= 0xF3) goto yy1168;
+ if (yych <= 0xF4) goto yy1169;
+ goto yy458;
+ }
+ }
+yy1064:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy896;
+ goto yy73;
+yy1065:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy73;
+ if (yych <= 0xBF) goto yy1064;
+ goto yy73;
+yy1066:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy1064;
+ goto yy73;
+yy1067:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy73;
+ if (yych <= 0xBF) goto yy1066;
+ goto yy73;
+yy1068:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy1066;
+ goto yy73;
+yy1069:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0x8F) goto yy1066;
+ goto yy73;
+yy1070:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) {
+ if (yych <= ',') {
+ if (yych <= 0x00) goto yy73;
+ if (yych == '\'') goto yy896;
+ goto yy770;
+ } else {
+ if (yych <= '-') goto yy1070;
+ if (yych == '>') goto yy1060;
+ goto yy770;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy899;
+ if (yych <= 0xE0) goto yy900;
+ goto yy901;
+ } else {
+ if (yych <= 0xF0) goto yy902;
+ if (yych <= 0xF3) goto yy903;
+ if (yych <= 0xF4) goto yy904;
+ goto yy73;
+ }
+ }
+yy1071:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) {
+ if (yych <= ',') {
+ if (yych <= 0x00) goto yy73;
+ if (yych == '"') goto yy896;
+ goto yy771;
+ } else {
+ if (yych <= '-') goto yy1071;
+ if (yych == '>') goto yy1061;
+ goto yy771;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy907;
+ if (yych <= 0xE0) goto yy908;
+ goto yy909;
+ } else {
+ if (yych <= 0xF0) goto yy910;
+ if (yych <= 0xF3) goto yy911;
+ if (yych <= 0xF4) goto yy912;
+ goto yy73;
+ }
+ }
+yy1072:
+ yyaccept = 34;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[0+yych] & 128) {
+ goto yy1161;
+ }
+ if (yych <= 0xDF) {
+ if (yych <= '\'') {
+ if (yych <= 0x00) goto yy458;
+ if (yych <= '"') goto yy1170;
+ goto yy1171;
+ } else {
+ if (yych <= '\\') goto yy1172;
+ if (yych <= 0xC1) goto yy458;
+ goto yy1173;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy1174;
+ if (yych <= 0xEF) goto yy1175;
+ goto yy1176;
+ } else {
+ if (yych <= 0xF3) goto yy1177;
+ if (yych <= 0xF4) goto yy1178;
+ goto yy458;
+ }
+ }
+yy1073:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy914;
+ goto yy73;
+yy1074:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy73;
+ if (yych <= 0xBF) goto yy1073;
+ goto yy73;
+yy1075:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy1073;
+ goto yy73;
+yy1076:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy73;
+ if (yych <= 0xBF) goto yy1075;
+ goto yy73;
+yy1077:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy1075;
+ goto yy73;
+yy1078:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0x8F) goto yy1075;
+ goto yy73;
+yy1079:
+ yych = *++YYCURSOR;
+ if (yybm_bol[0+yych] & 32) {
+ goto yy1079;
+ }
+ if (yych <= 'Z') {
+ if (yych <= '-') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= '"') goto yy640;
+ if (yych <= '\'') goto yy639;
+ goto yy1179;
+ } else {
+ if (yych <= ':') {
+ if (yych <= '/') goto yy1180;
+ goto yy1179;
+ } else {
+ if (yych <= '>') goto yy1181;
+ if (yych <= '?') goto yy1180;
+ goto yy1179;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 'z') {
+ if (yych <= '\\') goto yy1182;
+ goto yy1179;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy1183;
+ goto yy1184;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy1185;
+ goto yy1186;
+ } else {
+ if (yych <= 0xF3) goto yy1187;
+ if (yych <= 0xF4) goto yy1188;
+ goto yy73;
+ }
+ }
}
+yy1080:
+ yych = *++YYCURSOR;
if (yych <= ' ') {
if (yych <= '\f') {
- if (yych == '\t') goto yy312;
- goto yy1;
+ if (yych == '\t') goto yy1080;
+ goto yy73;
} else {
- if (yych <= '\r') goto yy312;
- if (yych <= 0x1F) goto yy1;
- goto yy312;
+ if (yych <= '\r') goto yy1080;
+ if (yych <= 0x1F) goto yy73;
+ goto yy1080;
}
} else {
- if (yych <= '<') {
- if (yych != '/') goto yy1;
+ if (yych <= '=') {
+ if (yych == '/') goto yy324;
+ goto yy73;
} else {
- if (yych <= '=') goto yy313;
- if (yych <= '>') goto yy216;
- if (yych >= '@') goto yy1;
+ if (yych <= '>') goto yy325;
+ if (yych <= '?') goto yy324;
+ goto yy73;
}
}
-yy215:
+yy1081:
yych = *++YYCURSOR;
- if (yych == '>') goto yy314;
- goto yy1;
-yy216:
- ++YYCURSOR;
-yy217:
-#line 200 "../../lnav/src/data_scanner_re.re"
- {
- RET(DT_XML_OPEN_TAG);
- }
-#line 6460 "../../lnav/src/data_scanner_re.cc"
-yy218:
+ if (yych <= '?') {
+ if (yych <= '&') {
+ if (yych <= '\f') {
+ if (yych <= 0x00) goto yy73;
+ if (yych == '\t') goto yy1081;
+ goto yy813;
+ } else {
+ if (yych <= '\r') goto yy1081;
+ if (yych == ' ') goto yy1081;
+ goto yy813;
+ }
+ } else {
+ if (yych <= '.') {
+ if (yych <= '\'') goto yy1189;
+ if (yych == '-') goto yy952;
+ goto yy813;
+ } else {
+ if (yych <= ':') {
+ if (yych <= '/') goto yy953;
+ goto yy952;
+ } else {
+ if (yych <= '=') goto yy813;
+ if (yych <= '>') goto yy954;
+ goto yy953;
+ }
+ }
+ }
+ } else {
+ if (yych <= 'z') {
+ if (yych <= '\\') {
+ if (yych <= '@') goto yy813;
+ if (yych <= 'Z') goto yy952;
+ if (yych <= '[') goto yy813;
+ goto yy955;
+ } else {
+ if (yych == '_') goto yy952;
+ if (yych <= '`') goto yy813;
+ goto yy952;
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy813;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy956;
+ goto yy957;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy958;
+ goto yy959;
+ } else {
+ if (yych <= 0xF3) goto yy960;
+ if (yych <= 0xF4) goto yy961;
+ goto yy73;
+ }
+ }
+ }
+ }
+yy1082:
+ yyaccept = 40;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 0xC1) {
+ if (yych <= '"') {
+ if (yych <= 0x00) goto yy463;
+ if (yych <= '!') goto yy954;
+ } else {
+ if (yych == '\\') goto yy1084;
+ if (yych <= 0x7F) goto yy954;
+ goto yy463;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy1085;
+ if (yych <= 0xE0) goto yy1086;
+ goto yy1087;
+ } else {
+ if (yych <= 0xF0) goto yy1088;
+ if (yych <= 0xF3) goto yy1089;
+ if (yych <= 0xF4) goto yy1090;
+ goto yy463;
+ }
+ }
+yy1083:
yych = *++YYCURSOR;
-yy219:
if (yych <= '/') {
- if (yych <= '\r') {
- if (yych == '\t') goto yy316;
- if (yych <= '\f') goto yy1;
- goto yy316;
+ if (yych <= 0x1F) {
+ if (yych <= '\t') {
+ if (yych <= 0x08) goto yy73;
+ goto yy1190;
+ } else {
+ if (yych == '\r') goto yy1190;
+ goto yy73;
+ }
} else {
- if (yych <= ' ') {
- if (yych <= 0x1F) goto yy1;
- goto yy316;
+ if (yych <= ',') {
+ if (yych <= ' ') goto yy1190;
+ goto yy73;
} else {
- if (yych == '-') goto yy218;
- goto yy1;
+ if (yych <= '-') goto yy647;
+ if (yych <= '.') goto yy73;
+ goto yy324;
}
}
} else {
if (yych <= 'Z') {
- if (yych <= '=') {
- if (yych <= ':') goto yy218;
- goto yy1;
+ if (yych <= '>') {
+ if (yych <= ':') goto yy647;
+ goto yy73;
} else {
- if (yych <= '>') goto yy317;
- if (yych <= '@') goto yy1;
- goto yy218;
+ if (yych <= '?') goto yy324;
+ if (yych <= '@') goto yy73;
+ goto yy647;
}
} else {
if (yych <= '_') {
- if (yych <= '^') goto yy1;
- goto yy218;
+ if (yych <= '^') goto yy73;
+ goto yy647;
} else {
- if (yych <= '`') goto yy1;
- if (yych <= 'z') goto yy218;
- goto yy1;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'z') goto yy647;
+ goto yy73;
}
}
}
-yy220:
+yy1084:
yych = *++YYCURSOR;
- if (yych <= '@') {
- if (yych <= '-') {
- if (yych <= ',') goto yy319;
- goto yy320;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 0x00) goto yy73;
+ goto yy954;
} else {
- if (yych <= '/') goto yy319;
- if (yych <= ':') goto yy320;
- goto yy319;
+ if (yych <= 0xC1) goto yy73;
+ if (yych >= 0xE0) goto yy1086;
}
} else {
- if (yych <= '_') {
- if (yych <= 'Z') goto yy320;
- if (yych <= '^') goto yy319;
- goto yy320;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy1087;
+ goto yy1088;
} else {
- if (yych <= '`') goto yy319;
- if (yych <= 'z') goto yy320;
- goto yy319;
+ if (yych <= 0xF3) goto yy1089;
+ if (yych <= 0xF4) goto yy1090;
+ goto yy73;
}
}
-yy221:
- ++YYCURSOR;
- yyt3 = yyt4;
-yy222:
- YYCURSOR = yyt3;
-#line 264 "../../lnav/src/data_scanner_re.re"
- { RET(DT_WORD); }
-#line 6528 "../../lnav/src/data_scanner_re.cc"
-yy223:
+yy1085:
yych = *++YYCURSOR;
- if (yych <= '\f') {
- if (yych == '\t') goto yy221;
- yyt3 = yyt4;
- goto yy222;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy954;
+ goto yy73;
+yy1086:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy73;
+ if (yych <= 0xBF) goto yy1085;
+ goto yy73;
+yy1087:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy1085;
+ goto yy73;
+yy1088:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy73;
+ if (yych <= 0xBF) goto yy1087;
+ goto yy73;
+yy1089:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy1087;
+ goto yy73;
+yy1090:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0x8F) goto yy1087;
+ goto yy73;
+yy1091:
+ yych = *++YYCURSOR;
+ if (yych <= '?') {
+ if (yych <= '!') {
+ if (yych <= '\f') {
+ if (yych <= 0x00) goto yy73;
+ if (yych == '\t') goto yy1091;
+ goto yy814;
+ } else {
+ if (yych <= '\r') goto yy1091;
+ if (yych == ' ') goto yy1091;
+ goto yy814;
+ }
+ } else {
+ if (yych <= '.') {
+ if (yych <= '"') goto yy1189;
+ if (yych == '-') goto yy962;
+ goto yy814;
+ } else {
+ if (yych <= ':') {
+ if (yych <= '/') goto yy963;
+ goto yy962;
+ } else {
+ if (yych <= '=') goto yy814;
+ if (yych <= '>') goto yy964;
+ goto yy963;
+ }
+ }
+ }
} else {
- if (yych <= '\r') goto yy221;
- if (yych == ' ') goto yy221;
- yyt3 = yyt4;
- goto yy222;
+ if (yych <= 'z') {
+ if (yych <= '\\') {
+ if (yych <= '@') goto yy814;
+ if (yych <= 'Z') goto yy962;
+ if (yych <= '[') goto yy814;
+ goto yy965;
+ } else {
+ if (yych == '_') goto yy962;
+ if (yych <= '`') goto yy814;
+ goto yy962;
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy814;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy966;
+ goto yy967;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy968;
+ goto yy969;
+ } else {
+ if (yych <= 0xF3) goto yy970;
+ if (yych <= 0xF4) goto yy971;
+ goto yy73;
+ }
+ }
+ }
}
-yy224:
- yyaccept = 15;
+yy1092:
+ yyaccept = 40;
yych = *(YYMARKER = ++YYCURSOR);
-yy225:
- if (yych <= '\'') {
- if (yych <= '\r') {
- if (yych <= 0x08) {
- if (yych <= 0x00) {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= 0xC1) {
+ if (yych <= '\'') {
+ if (yych <= 0x00) goto yy463;
+ if (yych <= '&') goto yy964;
+ goto yy1083;
+ } else {
+ if (yych == '\\') goto yy1093;
+ if (yych <= 0x7F) goto yy964;
+ goto yy463;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy1094;
+ if (yych <= 0xE0) goto yy1095;
+ goto yy1096;
+ } else {
+ if (yych <= 0xF0) goto yy1097;
+ if (yych <= 0xF3) goto yy1098;
+ if (yych <= 0xF4) goto yy1099;
+ goto yy463;
+ }
+ }
+yy1093:
+ yych = *++YYCURSOR;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 0x00) goto yy73;
+ goto yy964;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych >= 0xE0) goto yy1095;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy1096;
+ goto yy1097;
+ } else {
+ if (yych <= 0xF3) goto yy1098;
+ if (yych <= 0xF4) goto yy1099;
+ goto yy73;
+ }
+ }
+yy1094:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy964;
+ goto yy73;
+yy1095:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy73;
+ if (yych <= 0xBF) goto yy1094;
+ goto yy73;
+yy1096:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy1094;
+ goto yy73;
+yy1097:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy73;
+ if (yych <= 0xBF) goto yy1096;
+ goto yy73;
+yy1098:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy1096;
+ goto yy73;
+yy1099:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0x8F) goto yy1096;
+ goto yy73;
+yy1100:
+ yych = *++YYCURSOR;
+ if (yych == '+') goto yy1191;
+ goto yy73;
+yy1101:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '-') goto yy1192;
+ goto yy170;
+yy1102:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '-') goto yy1125;
+ goto yy201;
+yy1103:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '^') {
+ if (yych <= '/') {
+ if (yych <= ',') {
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy1026;
}
- yyt3 = yyt4;
- goto yy222;
+ yyt2 = YYCURSOR;
+ goto yy305;
} else {
- if (yych <= '\n') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy656;
}
- if (yych <= '\f') {
- yyt3 = yyt4;
- goto yy222;
+ if (yych <= '.') {
+ yyt2 = YYCURSOR;
+ goto yy657;
}
- yyt4 = YYCURSOR;
- goto yy221;
+ yyt2 = YYCURSOR;
+ goto yy565;
}
} else {
- if (yych <= '!') {
- if (yych <= 0x1F) {
- yyt3 = yyt4;
- goto yy222;
- }
- if (yych <= ' ') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= '?') {
+ if (yych <= '9') goto yy1193;
+ if (yych >= ';') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
- yyt4 = YYCURSOR;
- goto yy223;
+ yyt2 = YYCURSOR;
} else {
- if (yych <= '"') {
- yyt4 = YYCURSOR;
- goto yy221;
- }
- if (yych <= '&') {
- yyt3 = yyt4;
- goto yy222;
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy565;
}
- yyt4 = YYCURSOR;
- goto yy224;
+ if (yych <= 'F') goto yy1193;
+ if (yych <= 'Z') goto yy481;
+ yyt2 = YYCURSOR;
+ goto yy305;
}
}
} else {
- if (yych <= '9') {
- if (yych <= ',') {
- if (yych <= '*') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= 0xC1) {
+ if (yych <= 'f') {
+ if (yych <= '_') {
+ yyt2 = YYCURSOR;
+ goto yy483;
}
- if (yych <= '+') {
- yyt3 = yyt4;
- goto yy222;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
- yyt4 = YYCURSOR;
- goto yy223;
+ goto yy1193;
} else {
- if (yych != '.') {
- yyt3 = yyt4;
- goto yy222;
+ if (yych <= 'z') goto yy481;
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
- yyt3 = yyt4;
- yyt4 = YYCURSOR;
+ goto yy39;
}
} else {
- if (yych <= '?') {
- if (yych <= ';') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
}
- if (yych <= '>') {
- yyt3 = yyt4;
- goto yy222;
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
}
- yyt4 = YYCURSOR;
- goto yy223;
+ yyt2 = YYCURSOR;
+ goto yy315;
} else {
- if (yych <= '`') {
- yyt3 = yyt4;
- goto yy222;
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy316;
}
- if (yych <= 'z') {
- yyt3 = yyt4;
- goto yy137;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
}
- yyt3 = yyt4;
- goto yy222;
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy39;
}
}
}
-yy226:
+yy1104:
yych = *++YYCURSOR;
- if (yych <= '\f') {
- if (yych == '\t') goto yy221;
- goto yy1;
+ if (yych <= ':') {
+ if (yych <= ' ') {
+ if (yych <= 0x1F) goto yy73;
+ goto yy305;
+ } else {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1129;
+ goto yy356;
+ }
} else {
- if (yych <= '\r') goto yy221;
- if (yych == ' ') goto yy221;
- goto yy1;
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy73;
+ goto yy1129;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy1129;
+ goto yy73;
+ }
}
-yy227:
- yyaccept = 0;
+yy1105:
+ yyaccept = 7;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= ':') {
- if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
+ if (yych <= '^') {
+ if (yych <= '/') {
+ if (yych <= ',') {
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy1026;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy656;
+ }
+ if (yych <= '.') {
+ yyt2 = YYCURSOR;
+ goto yy663;
+ }
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
} else {
- if (yych <= '.') {
- if (yych <= ',') goto yy4;
- goto yy46;
+ if (yych <= '?') {
+ if (yych <= '9') goto yy1193;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1104;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
} else {
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy321;
- goto yy147;
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ if (yych <= 'F') goto yy1193;
+ if (yych <= 'Z') goto yy481;
+ yyt2 = YYCURSOR;
+ goto yy305;
}
}
} else {
- if (yych <= '^') {
- if (yych <= '@') {
- if (yych <= '?') goto yy4;
- goto yy96;
+ if (yych <= 0xC1) {
+ if (yych <= 'f') {
+ if (yych <= '_') {
+ yyt2 = YYCURSOR;
+ goto yy483;
+ }
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1193;
} else {
- if (yych <= 'F') goto yy321;
- if (yych <= 'Z') goto yy115;
- goto yy4;
+ if (yych <= 'z') goto yy481;
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy39;
}
} else {
- if (yych <= '`') {
- if (yych <= '_') goto yy46;
- goto yy4;
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ yyt2 = YYCURSOR;
+ goto yy315;
} else {
- if (yych <= 'f') goto yy321;
- if (yych <= 'z') goto yy115;
- goto yy4;
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy316;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy39;
}
}
}
-yy228:
- yyaccept = 0;
+yy1106:
+ yyaccept = 7;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '9') {
- if (yych <= '*') {
- if (yych <= ' ') {
- if (yych <= 0x1F) goto yy4;
- goto yy322;
+ if (yych <= '^') {
+ if (yych <= '/') {
+ if (yych <= ',') {
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy1026;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
} else {
- if (yych == '%') goto yy80;
- goto yy4;
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy656;
+ }
+ if (yych <= '.') {
+ yyt2 = YYCURSOR;
+ goto yy657;
+ }
+ yyt2 = YYCURSOR;
+ goto yy565;
}
} else {
- if (yych <= ',') {
- if (yych <= '+') goto yy80;
- goto yy4;
+ if (yych <= '?') {
+ if (yych <= '9') goto yy1194;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1104;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
} else {
- if (yych <= '.') goto yy46;
- if (yych <= '/') goto yy4;
- goto yy321;
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ if (yych <= 'F') goto yy1193;
+ if (yych <= 'Z') goto yy481;
+ yyt2 = YYCURSOR;
+ goto yy305;
}
}
} else {
- if (yych <= 'Z') {
- if (yych <= '?') {
- if (yych <= ':') goto yy147;
- goto yy4;
+ if (yych <= 0xC1) {
+ if (yych <= 'f') {
+ if (yych <= '_') {
+ yyt2 = YYCURSOR;
+ goto yy483;
+ }
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1193;
} else {
- if (yych <= '@') goto yy96;
- if (yych <= 'F') goto yy321;
- goto yy115;
+ if (yych <= 'z') goto yy481;
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy39;
}
} else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ yyt2 = YYCURSOR;
+ goto yy315;
+ } else {
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy316;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy39;
+ }
+ }
+ }
+yy1107:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'Z') {
+ if (yych <= '/') {
+ if (yych <= ',') {
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy1026;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy656;
+ }
+ if (yych <= '.') {
+ yyt2 = YYCURSOR;
+ goto yy657;
+ }
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ } else {
+ if (yych <= ':') {
+ if (yych <= '5') goto yy1194;
+ if (yych <= '9') goto yy1193;
+ yyt2 = YYCURSOR;
+ goto yy1104;
+ } else {
+ if (yych <= '?') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ if (yych <= 'F') goto yy1193;
+ goto yy481;
+ }
+ }
+ } else {
+ if (yych <= 0xC1) {
if (yych <= '`') {
- if (yych == '_') goto yy46;
- goto yy4;
+ if (yych == '_') {
+ yyt2 = YYCURSOR;
+ goto yy483;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
} else {
- if (yych <= 'f') goto yy321;
- if (yych <= 'z') goto yy115;
- goto yy4;
+ if (yych <= 'f') goto yy1193;
+ if (yych <= 'z') goto yy481;
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy39;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ yyt2 = YYCURSOR;
+ goto yy315;
+ } else {
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy316;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy39;
}
}
}
-yy229:
- yyaccept = 0;
+yy1108:
+ yyaccept = 7;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 64) {
- goto yy115;
+ if (yych == '.') goto yy1195;
+ if (yych <= '/') goto yy482;
+ if (yych <= '9') goto yy1196;
+ goto yy482;
+yy1109:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '.') goto yy1195;
+ if (yych <= '/') goto yy482;
+ if (yych <= '9') goto yy1108;
+ goto yy482;
+yy1110:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '/') {
+ if (yych == '.') goto yy1195;
+ goto yy482;
+ } else {
+ if (yych <= '4') goto yy1108;
+ if (yych <= '5') goto yy1197;
+ if (yych <= '9') goto yy1196;
+ goto yy482;
}
- if (yych <= ',') {
- if (yych <= '$') {
- if (yych == ' ') goto yy322;
- goto yy4;
+yy1111:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy153;
+ if (yych <= '9') goto yy1198;
+ goto yy153;
+yy1112:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1199;
+ goto yy73;
+yy1113:
+ yyaccept = 15;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '9') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy88;
+ if (yych <= '*') goto yy155;
+ goto yy88;
} else {
- if (yych <= '%') goto yy80;
- if (yych == '+') goto yy80;
- goto yy4;
+ if (yych <= '-') {
+ if (yych <= ',') goto yy155;
+ goto yy1125;
+ } else {
+ if (yych <= '.') {
+ yyt3 = YYCURSOR;
+ goto yy349;
+ }
+ if (yych <= '/') goto yy123;
+ goto yy200;
+ }
}
} else {
- if (yych <= '?') {
- if (yych <= '.') goto yy46;
- if (yych <= '/') goto yy4;
- if (yych <= ':') goto yy148;
- goto yy4;
+ if (yych <= 'Z') {
+ if (yych <= ':') {
+ yyt3 = YYCURSOR;
+ goto yy353;
+ }
+ if (yych <= '?') goto yy155;
+ if (yych <= '@') goto yy129;
+ goto yy200;
} else {
- if (yych <= '@') goto yy96;
- if (yych == '_') goto yy46;
- goto yy4;
+ if (yych <= '_') {
+ if (yych <= '^') goto yy155;
+ goto yy49;
+ } else {
+ if (yych <= '`') goto yy155;
+ if (yych <= 'z') goto yy489;
+ goto yy155;
+ }
}
}
-yy230:
- yyaccept = 0;
+yy1114:
+ yych = *++YYCURSOR;
+ if (yych == 'i') goto yy1200;
+ goto yy73;
+yy1115:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1201;
+ goto yy73;
+yy1116:
+ yych = *++YYCURSOR;
+ if (yych == ' ') goto yy1202;
+ goto yy73;
+yy1117:
+ yych = *++YYCURSOR;
+ if (yych == 'F') goto yy1203;
+ goto yy73;
+yy1118:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '/') goto yy278;
+ if (yych <= '9') goto yy1204;
+ goto yy278;
+yy1119:
+ yych = *++YYCURSOR;
+ if (yych == ' ') goto yy1205;
+ goto yy73;
+yy1120:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1206;
+ goto yy73;
+yy1121:
+ yyaccept = 43;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[1024+yych] & 16) {
- goto yy46;
+ if (yych <= ':') {
+ if (yych <= '%') {
+ if (yych == ' ') goto yy1120;
+ if (yych <= '$') goto yy1021;
+ goto yy138;
+ } else {
+ if (yych == '+') goto yy138;
+ if (yych <= ',') goto yy1021;
+ goto yy138;
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '?') goto yy1021;
+ if (yych != 'T') goto yy138;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy1021;
+ goto yy138;
+ } else {
+ if (yych <= '`') goto yy1021;
+ if (yych <= 'z') goto yy138;
+ goto yy1021;
+ }
+ }
}
- if (yych <= ' ') {
- if (yych <= '\f') {
- if (yych == '\t') goto yy221;
- goto yy4;
+yy1122:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '/') goto yy138;
+ if (yych <= '9') goto yy1207;
+ goto yy138;
+yy1123:
+ yyaccept = 43;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'S') {
+ if (yych <= ',') {
+ if (yych == ' ') goto yy1120;
+ goto yy1021;
} else {
- if (yych <= '\r') goto yy221;
- if (yych <= 0x1F) goto yy4;
- goto yy221;
+ if (yych <= ':') goto yy278;
+ if (yych <= '?') goto yy1021;
+ goto yy278;
}
} else {
- if (yych <= '*') {
- if (yych == '%') goto yy80;
- goto yy4;
+ if (yych <= '^') {
+ if (yych <= 'T') goto yy1124;
+ if (yych <= 'Z') goto yy278;
+ goto yy1021;
} else {
- if (yych <= '+') goto yy80;
- if (yych == '@') goto yy96;
- goto yy4;
+ if (yych == '`') goto yy1021;
+ if (yych <= 'z') goto yy278;
+ goto yy1021;
}
}
-yy231:
- yyaccept = 16;
+yy1124:
+ yyaccept = 14;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= ':') {
- if (yych <= '.') {
- yyt3 = yyt4;
- goto yy222;
+ if (yych <= '/') goto yy278;
+ if (yych <= '9') goto yy1208;
+ goto yy278;
+yy1125:
+ yych = *++YYCURSOR;
+ if (yych <= 'Z') {
+ if (yych <= '9') {
+ if (yych <= '/') goto yy89;
+ goto yy1209;
+ } else {
+ if (yych <= '@') goto yy89;
+ if (yych <= 'F') goto yy1209;
+ goto yy137;
}
- if (yych <= '/') goto yy189;
- if (yych <= '9') goto yy272;
- goto yy191;
} else {
- if (yych <= 'F') {
- if (yych <= '@') {
- yyt3 = yyt4;
- goto yy222;
+ if (yych <= '`') {
+ if (yych == '_') goto yy137;
+ goto yy89;
+ } else {
+ if (yych <= 'f') goto yy1209;
+ if (yych <= 'z') goto yy137;
+ goto yy89;
+ }
+ }
+yy1126:
+ yyaccept = 12;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ if (yych <= '7') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy119;
+ if (yych <= '*') goto yy125;
+ goto yy297;
+ } else {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy125;
+ goto yy297;
+ } else {
+ if (yych <= '.') goto yy409;
+ if (yych <= '/') goto yy297;
+ goto yy1210;
}
- goto yy272;
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '9') goto yy1211;
+ if (yych <= ':') goto yy297;
+ if (yych <= '?') goto yy125;
+ goto yy297;
} else {
- if (yych <= '`') {
- yyt3 = yyt4;
- goto yy222;
+ if (yych <= '_') {
+ if (yych <= '^') goto yy125;
+ goto yy297;
+ } else {
+ if (yych <= '`') goto yy125;
+ if (yych <= 'z') goto yy297;
+ goto yy125;
}
- if (yych <= 'f') goto yy272;
- yyt3 = yyt4;
- goto yy222;
}
}
-yy232:
- yyaccept = 0;
+yy1127:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= ',') {
- if (yych <= '!') {
- if (yych <= '\f') {
- if (yych <= 0x00) {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ if (yych <= '-') {
+ if (yych == '%') goto yy119;
+ goto yy297;
+ } else {
+ if (yych <= '.') goto yy409;
+ if (yych <= '/') goto yy297;
+ if (yych <= '9') goto yy1211;
+ goto yy297;
+ }
+yy1128:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '_') {
+ if (yych <= ':') {
+ if (yych <= ',') {
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy1026;
}
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') {
- yyt4 = YYCURSOR;
- goto yy221;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ if (yych <= '9') goto yy1212;
+ yyt1 = YYCURSOR;
+ goto yy1028;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '?') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy565;
}
- goto yy4;
+ goto yy1212;
} else {
- if (yych <= '\r') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= 'Z') goto yy277;
+ if (yych <= '^') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
- if (yych <= 0x1F) goto yy4;
- if (yych <= ' ') {
- yyt3 = YYCURSOR;
- goto yy323;
+ yyt2 = YYCURSOR;
+ goto yy431;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
- yyt4 = YYCURSOR;
- goto yy223;
+ if (yych <= 'f') goto yy1212;
+ goto yy277;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy133;
+ yyt2 = YYCURSOR;
+ goto yy313;
}
} else {
- if (yych <= '&') {
- if (yych <= '"') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
}
- if (yych == '%') goto yy80;
- goto yy4;
+ yyt2 = YYCURSOR;
+ goto yy316;
} else {
- if (yych <= '\'') {
- yyt4 = YYCURSOR;
- goto yy224;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
}
- if (yych <= '*') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
}
- if (yych <= '+') goto yy80;
- yyt4 = YYCURSOR;
- goto yy223;
+ goto yy133;
}
}
- } else {
- if (yych <= '?') {
- if (yych <= '9') {
- if (yych <= '-') goto yy46;
- if (yych <= '.') {
- yyt4 = YYCURSOR;
- goto yy230;
+ }
+yy1129:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '%') {
+ if (yych <= '$') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
- if (yych <= '/') goto yy4;
- goto yy321;
+ yyt1 = YYCURSOR;
+ goto yy1026;
} else {
- if (yych <= ':') {
- yyt3 = YYCURSOR;
- goto yy324;
- }
- if (yych <= ';') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
- if (yych <= '>') goto yy4;
- yyt4 = YYCURSOR;
- goto yy223;
+ if (yych <= '9') goto yy1213;
+ yyt2 = YYCURSOR;
+ goto yy1214;
}
} else {
- if (yych <= '^') {
- if (yych <= '@') goto yy96;
- if (yych <= 'F') goto yy321;
- if (yych <= 'Z') goto yy115;
- goto yy4;
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1213;
} else {
+ if (yych <= 'Z') goto yy73;
if (yych <= '`') {
- if (yych <= '_') goto yy46;
- goto yy4;
- } else {
- if (yych <= 'f') goto yy325;
- if (yych <= 'z') goto yy326;
- goto yy4;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1213;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
}
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
}
}
}
-yy233:
- yyaccept = 0;
+yy1130:
+ yyaccept = 14;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '+') {
- if (yych <= ' ') {
- if (yych <= '\n') {
- if (yych <= 0x00) {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= '^') {
+ if (yych <= '/') {
+ if (yych <= ',') {
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy1026;
}
- if (yych <= 0x08) goto yy4;
- yyt4 = YYCURSOR;
- goto yy221;
+ yyt2 = YYCURSOR;
+ goto yy305;
} else {
- if (yych == '\r') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych == '.') {
+ yyt2 = YYCURSOR;
+ goto yy566;
}
- if (yych <= 0x1F) goto yy4;
- yyt3 = YYCURSOR;
- goto yy323;
+ yyt2 = YYCURSOR;
+ goto yy565;
}
} else {
- if (yych <= '%') {
- if (yych <= '!') {
- yyt4 = YYCURSOR;
- goto yy223;
+ if (yych <= '?') {
+ if (yych <= '9') goto yy1212;
+ if (yych <= ':') {
+ yyt1 = YYCURSOR;
+ goto yy1028;
}
- if (yych <= '"') {
- yyt4 = YYCURSOR;
- goto yy221;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ if (yych <= 'F') goto yy1212;
+ if (yych <= 'Z') goto yy277;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ }
+ } else {
+ if (yych <= 0xC1) {
+ if (yych <= 'f') {
+ if (yych <= '_') {
+ yyt2 = YYCURSOR;
+ goto yy431;
+ }
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
- if (yych <= '$') goto yy4;
- goto yy80;
+ goto yy1212;
} else {
- if (yych <= '&') goto yy4;
- if (yych <= '\'') {
- yyt4 = YYCURSOR;
- goto yy224;
+ if (yych <= 'z') goto yy277;
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
- if (yych <= '*') {
- yyt4 = YYCURSOR;
- goto yy221;
+ goto yy133;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ yyt2 = YYCURSOR;
+ goto yy315;
+ } else {
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy316;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
}
- goto yy80;
+ goto yy133;
}
}
+ }
+yy1131:
+ yyaccept = 41;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy988;
+ if (yych <= '9') goto yy846;
+ goto yy988;
} else {
- if (yych <= '>') {
- if (yych <= '/') {
- if (yych <= ',') {
- yyt4 = YYCURSOR;
- goto yy223;
- }
- if (yych <= '-') goto yy46;
- if (yych <= '.') {
- yyt4 = YYCURSOR;
- goto yy230;
+ if (yych <= 'F') goto yy846;
+ if (yych <= '`') goto yy988;
+ if (yych <= 'f') goto yy846;
+ goto yy988;
+ }
+yy1132:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1215;
+ if (yych <= ':') goto yy866;
+ goto yy73;
+ } else {
+ if (yych <= 'F') goto yy1215;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy1215;
+ goto yy73;
+ }
+yy1133:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1216;
+ if (yych <= ':') goto yy1037;
+ goto yy73;
+ } else {
+ if (yych <= 'F') goto yy1216;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy1216;
+ goto yy73;
+ }
+yy1134:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1217;
+ if (yych <= ':') goto yy1218;
+ goto yy73;
+ } else {
+ if (yych <= 'F') goto yy1217;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy1217;
+ goto yy73;
+ }
+yy1135:
+ yych = *++YYCURSOR;
+ if (yych <= '`') {
+ if (yych <= '9') {
+ if (yych <= '0') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
- goto yy4;
+ goto yy1219;
} else {
- if (yych <= '9') goto yy115;
+ if (yych <= '1') goto yy1220;
+ if (yych <= '2') goto yy1221;
+ goto yy1219;
+ }
+ } else {
+ if (yych <= '@') {
if (yych <= ':') {
- yyt3 = YYCURSOR;
- goto yy234;
+ yyt2 = YYCURSOR;
+ goto yy310;
}
- if (yych <= ';') {
- yyt4 = YYCURSOR;
- goto yy221;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'F') goto yy1222;
+ if (yych <= 'Z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= 'f') goto yy1222;
+ goto yy73;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
- goto yy4;
+ if (yych <= 0xC1) goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy313;
}
} else {
- if (yych <= '^') {
- if (yych <= '?') {
- yyt4 = YYCURSOR;
- goto yy223;
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
}
- if (yych <= '@') goto yy96;
- if (yych <= 'Z') goto yy115;
- goto yy4;
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
} else {
- if (yych <= '_') goto yy46;
- if (yych <= '`') goto yy4;
- if (yych <= 'z') goto yy326;
- goto yy4;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
}
}
}
-yy234:
- yyaccept = 15;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == '/') goto yy189;
- if (yych == ':') goto yy152;
- goto yy222;
-yy235:
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '9') {
- if (yych <= '*') {
- if (yych <= ' ') {
- if (yych <= 0x1F) goto yy4;
- goto yy322;
+yy1136:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt4 = YYCURSOR;
+ goto yy867;
} else {
- if (yych == '%') goto yy80;
- goto yy4;
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1223;
+ yyt2 = YYCURSOR;
}
} else {
- if (yych <= ',') {
- if (yych <= '+') goto yy80;
- goto yy4;
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1223;
} else {
- if (yych <= '.') goto yy46;
- if (yych <= '/') goto yy4;
- goto yy115;
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1223;
}
}
} else {
- if (yych <= 'S') {
- if (yych <= '?') {
- if (yych <= ':') goto yy148;
- goto yy4;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
} else {
- if (yych <= '@') goto yy96;
- if (yych <= 'R') goto yy115;
- goto yy327;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
}
} else {
- if (yych <= '_') {
- if (yych <= 'Z') goto yy115;
- if (yych <= '^') goto yy4;
- goto yy46;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
} else {
- if (yych <= '`') goto yy4;
- if (yych <= 'z') goto yy115;
- goto yy4;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
}
}
}
-yy236:
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= ',') {
- if (yych <= '!') {
- if (yych <= '\f') {
- if (yych <= 0x00) {
- yyt4 = YYCURSOR;
- goto yy221;
+yy1137:
+ yych = *++YYCURSOR;
+ if (yych <= '9') {
+ if (yych == ' ') goto yy305;
+ if (yych <= '/') goto yy73;
+ goto yy1222;
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy73;
+ goto yy1222;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy1222;
+ goto yy73;
+ }
+ }
+yy1138:
+ yych = *++YYCURSOR;
+ if (yych <= 'z') {
+ if (yych <= '@') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1223;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1137;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= 'F') goto yy1223;
+ goto yy73;
+ } else {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= 'f') goto yy1223;
+ goto yy73;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
}
- goto yy4;
+ yyt2 = YYCURSOR;
+ goto yy316;
} else {
- if (yych <= '\r') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
}
- if (yych <= 0x1F) goto yy4;
- if (yych <= ' ') {
- yyt3 = YYCURSOR;
- goto yy323;
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy1139:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
yyt4 = YYCURSOR;
- goto yy223;
+ goto yy867;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1224;
+ yyt2 = YYCURSOR;
+ goto yy1137;
}
} else {
- if (yych <= '&') {
- if (yych <= '"') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
- if (yych == '%') goto yy80;
- goto yy4;
+ goto yy1223;
} else {
- if (yych <= '\'') {
- yyt4 = YYCURSOR;
- goto yy224;
- }
- if (yych <= '*') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
- if (yych <= '+') goto yy80;
- yyt4 = YYCURSOR;
- goto yy223;
+ goto yy1223;
}
}
} else {
- if (yych <= '?') {
- if (yych <= '9') {
- if (yych <= '-') goto yy46;
- if (yych <= '.') {
- yyt4 = YYCURSOR;
- goto yy230;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
}
- if (yych <= '/') goto yy4;
- goto yy115;
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
} else {
- if (yych <= ':') {
- yyt3 = YYCURSOR;
- goto yy234;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
}
- if (yych <= ';') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy1140:
+ yych = *++YYCURSOR;
+ if (yych <= '`') {
+ if (yych <= '9') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
- if (yych <= '>') goto yy4;
yyt4 = YYCURSOR;
- goto yy223;
+ goto yy867;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '5') goto yy1224;
+ goto yy1223;
}
} else {
- if (yych <= '_') {
- if (yych <= '@') goto yy96;
- if (yych <= 'Z') goto yy115;
- if (yych <= '^') goto yy4;
- goto yy46;
+ if (yych <= '@') {
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1137;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
} else {
- if (yych <= 'r') {
- if (yych <= '`') goto yy4;
- goto yy326;
- } else {
- if (yych <= 's') goto yy328;
- if (yych <= 'z') goto yy326;
- goto yy4;
+ if (yych <= 'F') goto yy1223;
+ if (yych <= 'Z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= 'f') goto yy1223;
+ goto yy73;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
}
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
}
}
}
-yy237:
- yyaccept = 0;
+yy1141:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) {
+ if (yych <= '@') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy73;
+ if (yych <= ':') {
+ yyt4 = YYCURSOR;
+ goto yy869;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ yyt2 = YYCURSOR;
+ goto yy315;
+ } else {
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy316;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+yy1142:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '1') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '0') goto yy1225;
+ goto yy1226;
+ } else {
+ if (yych <= '2') goto yy1227;
+ if (yych <= '9') goto yy1225;
+ goto yy73;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy277;
+ if (yych <= '^') goto yy73;
+ goto yy277;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'z') goto yy277;
+ goto yy73;
+ }
+ }
+yy1143:
+ yyaccept = 14;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '9') {
+ if (yych == '.') goto yy1142;
+ goto yy278;
+yy1144:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '.') goto yy1142;
+ if (yych <= '/') goto yy278;
+ if (yych <= '5') goto yy1143;
+ goto yy278;
+yy1145:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) {
+ if (yych <= '@') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy73;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy878;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ yyt2 = YYCURSOR;
+ goto yy315;
+ } else {
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy316;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+yy1146:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ switch (yych) {
+ case '%': goto yy119;
+ case '+':
+ case '-':
+ case '/':
+ case ':':
+ case '@':
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy297;
+ case '.': goto yy443;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy1228;
+ case 'B':
+ case 'b': goto yy1147;
+ case 'E':
+ case 'e': goto yy1148;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy132;
+ case 'S':
+ case 's': goto yy136;
+ case 'm': goto yy139;
+ case 'p':
+ case 'u': goto yy140;
+ default: goto yy24;
+ }
+yy1147:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
if (yych <= '*') {
- if (yych <= ' ') {
- if (yych <= 0x1F) goto yy4;
- goto yy322;
+ if (yych == '%') goto yy297;
+ goto yy24;
+ } else {
+ if (yych == ',') goto yy24;
+ goto yy297;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '?') goto yy24;
+ if (yych <= 'Z') goto yy297;
+ goto yy24;
+ } else {
+ if (yych == '`') goto yy24;
+ if (yych <= 'z') goto yy297;
+ goto yy24;
+ }
+ }
+yy1148:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '+') goto yy302;
+ if (yych == '-') goto yy440;
+ goto yy297;
+yy1149:
+ yych = *++YYCURSOR;
+ if (yych <= 'Z') {
+ if (yych <= '9') {
+ if (yych <= '/') goto yy89;
+ goto yy1229;
+ } else {
+ if (yych <= '@') goto yy89;
+ if (yych <= 'F') goto yy1209;
+ goto yy137;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych == '_') goto yy137;
+ goto yy89;
+ } else {
+ if (yych <= 'f') goto yy1209;
+ if (yych <= 'z') goto yy137;
+ goto yy89;
+ }
+ }
+yy1150:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) {
+ if (yych <= '@') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1230;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy310;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ yyt2 = YYCURSOR;
+ goto yy315;
+ } else {
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy316;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+yy1151:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) {
+ if (yych <= '@') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1150;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy310;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ yyt2 = YYCURSOR;
+ goto yy315;
+ } else {
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy316;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+yy1152:
+ yych = *++YYCURSOR;
+ if (yych <= 'z') {
+ if (yych <= '9') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '4') goto yy1150;
+ if (yych <= '5') goto yy1231;
+ goto yy1230;
+ } else {
+ if (yych <= '@') {
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy310;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
} else {
- if (yych == '%') goto yy80;
- goto yy4;
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy73;
}
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
} else {
- if (yych <= ',') {
- if (yych <= '+') goto yy80;
- goto yy4;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
} else {
- if (yych <= '.') goto yy46;
- if (yych <= '/') goto yy4;
- goto yy115;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy1153:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt1 = YYCURSOR;
+ goto yy444;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy885;
+ yyt2 = YYCURSOR;
+ goto yy743;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy885;
+ } else {
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy885;
}
}
} else {
- if (yych <= 'L') {
- if (yych <= '?') {
- if (yych <= ':') goto yy148;
- goto yy4;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
} else {
- if (yych <= '@') goto yy96;
- if (yych <= 'K') goto yy115;
- goto yy329;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
}
} else {
- if (yych <= '_') {
- if (yych <= 'Z') goto yy115;
- if (yych <= '^') goto yy4;
- goto yy46;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
} else {
- if (yych <= '`') goto yy4;
- if (yych <= 'z') goto yy115;
- goto yy4;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
}
}
}
-yy238:
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= ',') {
- if (yych <= '!') {
- if (yych <= '\f') {
- if (yych <= 0x00) {
- yyt4 = YYCURSOR;
- goto yy221;
+yy1154:
+ yych = *++YYCURSOR;
+ if (yych <= '2') {
+ if (yych <= '/') {
+ if (yych == ' ') goto yy305;
+ goto yy73;
+ } else {
+ if (yych <= '0') goto yy1232;
+ if (yych <= '1') goto yy1233;
+ goto yy1234;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '9') goto yy1235;
+ if (yych <= '@') goto yy73;
+ goto yy727;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy727;
+ goto yy73;
+ }
+ }
+yy1155:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') {
- yyt4 = YYCURSOR;
- goto yy221;
+ yyt1 = YYCURSOR;
+ goto yy444;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
- goto yy4;
+ if (yych <= '9') goto yy1236;
+ yyt2 = YYCURSOR;
+ goto yy743;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy885;
} else {
- if (yych <= '\r') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
- if (yych <= 0x1F) goto yy4;
- if (yych <= ' ') {
- yyt3 = YYCURSOR;
- goto yy323;
+ goto yy885;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
}
- yyt4 = YYCURSOR;
- goto yy223;
+ yyt2 = YYCURSOR;
+ goto yy314;
}
} else {
- if (yych <= '&') {
- if (yych <= '"') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
}
- if (yych == '%') goto yy80;
- goto yy4;
+ yyt2 = YYCURSOR;
+ goto yy316;
} else {
- if (yych <= '\'') {
- yyt4 = YYCURSOR;
- goto yy224;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
}
- if (yych <= '*') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
}
- if (yych <= '+') goto yy80;
- yyt4 = YYCURSOR;
- goto yy223;
+ goto yy73;
}
}
- } else {
- if (yych <= '?') {
- if (yych <= '9') {
- if (yych <= '-') goto yy46;
- if (yych <= '.') {
- yyt4 = YYCURSOR;
- goto yy230;
+ }
+yy1156:
+ yych = *++YYCURSOR;
+ if (yych <= '`') {
+ if (yych <= '9') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
- if (yych <= '/') goto yy4;
- goto yy115;
+ yyt1 = YYCURSOR;
+ goto yy444;
} else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '5') goto yy1236;
+ goto yy885;
+ }
+ } else {
+ if (yych <= '@') {
if (yych <= ':') {
- yyt3 = YYCURSOR;
- goto yy234;
+ yyt2 = YYCURSOR;
+ goto yy743;
}
- if (yych <= ';') {
- yyt4 = YYCURSOR;
- goto yy221;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'F') goto yy885;
+ if (yych <= 'Z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= 'f') goto yy885;
+ goto yy73;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
- if (yych <= '>') goto yy4;
- yyt4 = YYCURSOR;
- goto yy223;
+ if (yych <= 0xC1) goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy313;
}
} else {
- if (yych <= '_') {
- if (yych <= '@') goto yy96;
- if (yych <= 'Z') goto yy115;
- if (yych <= '^') goto yy4;
- goto yy46;
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
} else {
- if (yych <= 'd') {
- if (yych <= '`') goto yy4;
- goto yy326;
- } else {
- if (yych <= 'e') goto yy330;
- if (yych <= 'z') goto yy326;
- goto yy4;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
}
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
}
}
}
-yy239:
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '9') {
- if (yych <= '*') {
- if (yych <= ' ') {
- if (yych <= 0x1F) goto yy4;
- goto yy322;
+yy1157:
+ yych = *++YYCURSOR;
+ if (yych <= 0xC1) {
+ if (yych <= '-') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= ',') goto yy896;
+ goto yy1157;
+ } else {
+ if (yych == '>') goto yy1237;
+ if (yych <= 0x7F) goto yy896;
+ goto yy73;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy1064;
+ if (yych <= 0xE0) goto yy1065;
+ goto yy1066;
+ } else {
+ if (yych <= 0xF0) goto yy1067;
+ if (yych <= 0xF3) goto yy1068;
+ if (yych <= 0xF4) goto yy1069;
+ goto yy73;
+ }
+ }
+yy1158:
+ yych = *++YYCURSOR;
+ if (yybm_bol[0+yych] & 64) {
+ goto yy1158;
+ }
+ if (yych <= 0xC1) {
+ if (yych <= '\'') {
+ if (yych <= 0x00) goto yy73;
+ if (yych >= '#') goto yy1160;
+ } else {
+ if (yych <= '*') goto yy1161;
+ if (yych <= '-') goto yy1162;
+ if (yych <= '\\') goto yy1163;
+ goto yy73;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy1164;
+ if (yych <= 0xE0) goto yy1165;
+ goto yy1166;
+ } else {
+ if (yych <= 0xF0) goto yy1167;
+ if (yych <= 0xF3) goto yy1168;
+ if (yych <= 0xF4) goto yy1169;
+ goto yy73;
+ }
+ }
+yy1159:
+ yych = *++YYCURSOR;
+ if (yych <= '=') {
+ if (yych <= '"') {
+ if (yych <= '\f') {
+ if (yych <= 0x00) goto yy73;
+ if (yych == '\t') goto yy1238;
+ goto yy759;
} else {
- if (yych == '%') goto yy80;
- goto yy4;
+ if (yych <= 0x1F) {
+ if (yych <= '\r') goto yy1238;
+ goto yy759;
+ } else {
+ if (yych <= ' ') goto yy1238;
+ if (yych <= '!') goto yy759;
+ goto yy1239;
+ }
}
} else {
- if (yych <= ',') {
- if (yych <= '+') goto yy80;
- goto yy4;
+ if (yych <= '*') {
+ if (yych == '\'') goto yy1240;
+ if (yych <= ')') goto yy759;
+ goto yy612;
} else {
- if (yych <= '.') goto yy46;
- if (yych <= '/') goto yy4;
- goto yy115;
+ if (yych <= '-') {
+ if (yych <= ',') goto yy759;
+ goto yy1241;
+ } else {
+ if (yych <= '/') goto yy759;
+ if (yych <= ':') goto yy1242;
+ goto yy759;
+ }
}
}
} else {
- if (yych <= 'E') {
- if (yych <= '?') {
- if (yych <= ':') goto yy148;
- goto yy4;
+ if (yych <= 'z') {
+ if (yych <= '[') {
+ if (yych <= '>') goto yy906;
+ if (yych <= '@') goto yy759;
+ if (yych <= 'Z') goto yy1242;
+ goto yy759;
} else {
- if (yych <= '@') goto yy96;
- if (yych <= 'D') goto yy115;
- goto yy329;
+ if (yych <= '^') {
+ if (yych <= '\\') goto yy761;
+ goto yy759;
+ } else {
+ if (yych == '`') goto yy759;
+ goto yy1242;
+ }
}
} else {
- if (yych <= '_') {
- if (yych <= 'Z') goto yy115;
- if (yych <= '^') goto yy4;
- goto yy46;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy759;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy762;
+ goto yy763;
} else {
- if (yych <= '`') goto yy4;
- if (yych <= 'z') goto yy115;
- goto yy4;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy764;
+ goto yy765;
+ } else {
+ if (yych <= 0xF3) goto yy766;
+ if (yych <= 0xF4) goto yy767;
+ goto yy73;
+ }
}
}
}
-yy240:
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= ',') {
- if (yych <= '!') {
+yy1160:
+ yych = *++YYCURSOR;
+ if (yych <= '=') {
+ if (yych <= '"') {
if (yych <= '\f') {
- if (yych <= 0x00) {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= 0x00) goto yy73;
+ if (yych == '\t') goto yy1243;
+ goto yy750;
+ } else {
+ if (yych <= 0x1F) {
+ if (yych <= '\r') goto yy1243;
+ goto yy750;
+ } else {
+ if (yych <= ' ') goto yy1243;
+ if (yych <= '!') goto yy750;
+ goto yy1244;
}
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') {
- yyt4 = YYCURSOR;
- goto yy221;
+ }
+ } else {
+ if (yych <= '*') {
+ if (yych == '\'') goto yy1245;
+ if (yych <= ')') goto yy750;
+ goto yy604;
+ } else {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy750;
+ goto yy1246;
+ } else {
+ if (yych <= '/') goto yy750;
+ if (yych <= ':') goto yy1247;
+ goto yy750;
}
- goto yy4;
+ }
+ }
+ } else {
+ if (yych <= 'z') {
+ if (yych <= '[') {
+ if (yych <= '>') goto yy898;
+ if (yych <= '@') goto yy750;
+ if (yych <= 'Z') goto yy1247;
+ goto yy750;
} else {
- if (yych <= '\r') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= '^') {
+ if (yych <= '\\') goto yy752;
+ goto yy750;
+ } else {
+ if (yych == '`') goto yy750;
+ goto yy1247;
}
- if (yych <= 0x1F) goto yy4;
- if (yych <= ' ') {
- yyt3 = YYCURSOR;
- goto yy323;
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy750;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy753;
+ goto yy754;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy755;
+ goto yy756;
+ } else {
+ if (yych <= 0xF3) goto yy757;
+ if (yych <= 0xF4) goto yy758;
+ goto yy73;
}
- yyt4 = YYCURSOR;
- goto yy223;
}
+ }
+ }
+yy1161:
+ yych = *++YYCURSOR;
+ if (yybm_bol[0+yych] & 128) {
+ goto yy1161;
+ }
+ if (yych <= 0xDF) {
+ if (yych <= '\'') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= '"') goto yy1170;
+ goto yy1171;
} else {
- if (yych <= '&') {
- if (yych <= '"') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= '\\') goto yy1172;
+ if (yych <= 0xC1) goto yy73;
+ goto yy1173;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy1174;
+ if (yych <= 0xEF) goto yy1175;
+ goto yy1176;
+ } else {
+ if (yych <= 0xF3) goto yy1177;
+ if (yych <= 0xF4) goto yy1178;
+ goto yy73;
+ }
+ }
+yy1162:
+ yych = *++YYCURSOR;
+ if (yych <= '\\') {
+ if (yych <= '&') {
+ if (yych <= 0x00) goto yy73;
+ if (yych == '"') goto yy1159;
+ goto yy1158;
+ } else {
+ if (yych <= ',') {
+ if (yych <= '\'') goto yy1160;
+ goto yy1158;
+ } else {
+ if (yych <= '-') goto yy1248;
+ if (yych <= '[') goto yy1158;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy1158;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy1164;
+ goto yy1165;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy1166;
+ goto yy1167;
+ } else {
+ if (yych <= 0xF3) goto yy1168;
+ if (yych <= 0xF4) goto yy1169;
+ goto yy73;
+ }
+ }
+ }
+yy1163:
+ yych = *++YYCURSOR;
+ if (yych <= 0xC1) {
+ if (yych <= '*') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= ')') goto yy1158;
+ goto yy1161;
+ } else {
+ if (yych == '-') goto yy1162;
+ if (yych <= 0x7F) goto yy1158;
+ goto yy73;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy1164;
+ if (yych <= 0xE0) goto yy1165;
+ goto yy1166;
+ } else {
+ if (yych <= 0xF0) goto yy1167;
+ if (yych <= 0xF3) goto yy1168;
+ if (yych <= 0xF4) goto yy1169;
+ goto yy73;
+ }
+ }
+yy1164:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy1158;
+ goto yy73;
+yy1165:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy73;
+ if (yych <= 0xBF) goto yy1164;
+ goto yy73;
+yy1166:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy1164;
+ goto yy73;
+yy1167:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy73;
+ if (yych <= 0xBF) goto yy1166;
+ goto yy73;
+yy1168:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy1166;
+ goto yy73;
+yy1169:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0x8F) goto yy1166;
+ goto yy73;
+yy1170:
+ yych = *++YYCURSOR;
+ if (yych <= '>') {
+ if (yych <= '!') {
+ if (yych <= '\f') {
+ if (yych <= 0x00) goto yy73;
+ if (yych == '\t') goto yy1249;
+ goto yy612;
+ } else {
+ if (yych <= '\r') goto yy1249;
+ if (yych == ' ') goto yy1249;
+ goto yy612;
+ }
+ } else {
+ if (yych <= ',') {
+ if (yych <= '"') goto yy1250;
+ if (yych == '\'') goto yy1251;
+ goto yy612;
+ } else {
+ if (yych <= '/') {
+ if (yych <= '-') goto yy1252;
+ goto yy612;
+ } else {
+ if (yych <= ':') goto yy1252;
+ if (yych <= '=') goto yy612;
+ goto yy922;
}
- if (yych == '%') goto yy80;
- goto yy4;
+ }
+ }
+ } else {
+ if (yych <= 'z') {
+ if (yych <= '\\') {
+ if (yych <= '@') goto yy612;
+ if (yych <= 'Z') goto yy1252;
+ if (yych <= '[') goto yy612;
+ goto yy613;
} else {
- if (yych <= '\'') {
- yyt4 = YYCURSOR;
- goto yy224;
+ if (yych == '_') goto yy1252;
+ if (yych <= '`') goto yy612;
+ goto yy1252;
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy612;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy614;
+ goto yy615;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy616;
+ goto yy617;
+ } else {
+ if (yych <= 0xF3) goto yy618;
+ if (yych <= 0xF4) goto yy619;
+ goto yy73;
}
- if (yych <= '*') {
- yyt4 = YYCURSOR;
- goto yy221;
+ }
+ }
+ }
+yy1171:
+ yych = *++YYCURSOR;
+ if (yych <= '>') {
+ if (yych <= '!') {
+ if (yych <= '\f') {
+ if (yych <= 0x00) goto yy73;
+ if (yych == '\t') goto yy1253;
+ goto yy604;
+ } else {
+ if (yych <= '\r') goto yy1253;
+ if (yych == ' ') goto yy1253;
+ goto yy604;
+ }
+ } else {
+ if (yych <= ',') {
+ if (yych <= '"') goto yy1254;
+ if (yych == '\'') goto yy1255;
+ goto yy604;
+ } else {
+ if (yych <= '/') {
+ if (yych <= '-') goto yy1256;
+ goto yy604;
+ } else {
+ if (yych <= ':') goto yy1256;
+ if (yych <= '=') goto yy604;
+ goto yy915;
}
- if (yych <= '+') goto yy80;
- yyt4 = YYCURSOR;
- goto yy223;
}
}
} else {
- if (yych <= '?') {
- if (yych <= '9') {
- if (yych <= '-') goto yy46;
- if (yych <= '.') {
- yyt4 = YYCURSOR;
- goto yy230;
+ if (yych <= 'z') {
+ if (yych <= '\\') {
+ if (yych <= '@') goto yy604;
+ if (yych <= 'Z') goto yy1256;
+ if (yych <= '[') goto yy604;
+ goto yy605;
+ } else {
+ if (yych == '_') goto yy1256;
+ if (yych <= '`') goto yy604;
+ goto yy1256;
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy604;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy606;
+ goto yy607;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy608;
+ goto yy609;
+ } else {
+ if (yych <= 0xF3) goto yy610;
+ if (yych <= 0xF4) goto yy611;
+ goto yy73;
}
- if (yych <= '/') goto yy4;
- goto yy115;
+ }
+ }
+ }
+yy1172:
+ yych = *++YYCURSOR;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 0x00) goto yy73;
+ goto yy1161;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych >= 0xE0) goto yy1174;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy1175;
+ goto yy1176;
+ } else {
+ if (yych <= 0xF3) goto yy1177;
+ if (yych <= 0xF4) goto yy1178;
+ goto yy73;
+ }
+ }
+yy1173:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy1161;
+ goto yy73;
+yy1174:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy73;
+ if (yych <= 0xBF) goto yy1173;
+ goto yy73;
+yy1175:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy1173;
+ goto yy73;
+yy1176:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy73;
+ if (yych <= 0xBF) goto yy1175;
+ goto yy73;
+yy1177:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy1175;
+ goto yy73;
+yy1178:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0x8F) goto yy1175;
+ goto yy73;
+yy1179:
+ yych = *++YYCURSOR;
+ if (yych <= '=') {
+ if (yych <= '"') {
+ if (yych <= '\f') {
+ if (yych <= 0x00) goto yy73;
+ if (yych == '\t') goto yy1179;
+ goto yy1079;
} else {
- if (yych <= ':') {
- yyt3 = YYCURSOR;
- goto yy234;
+ if (yych <= 0x1F) {
+ if (yych <= '\r') goto yy1179;
+ goto yy1079;
+ } else {
+ if (yych <= ' ') goto yy1179;
+ if (yych <= '!') goto yy1079;
+ goto yy640;
}
- if (yych <= ';') {
- yyt4 = YYCURSOR;
- goto yy221;
+ }
+ } else {
+ if (yych <= '-') {
+ if (yych == '\'') goto yy639;
+ if (yych <= ',') goto yy1079;
+ goto yy1179;
+ } else {
+ if (yych <= '/') {
+ if (yych <= '.') goto yy1079;
+ } else {
+ if (yych <= ':') goto yy1179;
+ if (yych <= '<') goto yy1079;
+ goto yy1257;
+ }
+ }
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych <= 'Z') {
+ if (yych <= '>') goto yy1181;
+ if (yych <= '?') goto yy1180;
+ if (yych <= '@') goto yy1079;
+ goto yy1179;
+ } else {
+ if (yych <= '\\') {
+ if (yych <= '[') goto yy1079;
+ goto yy1182;
+ } else {
+ if (yych == '_') goto yy1179;
+ goto yy1079;
}
- if (yych <= '>') goto yy4;
- yyt4 = YYCURSOR;
- goto yy223;
}
} else {
- if (yych <= '_') {
- if (yych <= '@') goto yy96;
- if (yych <= 'Z') goto yy115;
- if (yych <= '^') goto yy4;
- goto yy46;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy1179;
+ goto yy1079;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy1183;
+ goto yy1184;
+ }
} else {
- if (yych <= 'k') {
- if (yych <= '`') goto yy4;
- goto yy326;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy1185;
+ goto yy1186;
} else {
- if (yych <= 'l') goto yy330;
- if (yych <= 'z') goto yy326;
- goto yy4;
+ if (yych <= 0xF3) goto yy1187;
+ if (yych <= 0xF4) goto yy1188;
+ goto yy73;
}
}
}
}
-yy241:
- yyaccept = 15;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= 0x1B) {
- if (yych <= 0x00) goto yy222;
- if (yych <= 0x1A) goto yy84;
- goto yy222;
+yy1180:
+ yych = *++YYCURSOR;
+ if (yybm_bol[0+yych] & 32) {
+ goto yy1079;
+ }
+ if (yych <= 'Z') {
+ if (yych <= '-') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= '"') goto yy640;
+ if (yych <= '\'') goto yy639;
+ goto yy1179;
+ } else {
+ if (yych <= ':') {
+ if (yych <= '/') goto yy1180;
+ goto yy1179;
+ } else {
+ if (yych <= '>') goto yy1258;
+ if (yych <= '?') goto yy1180;
+ goto yy1179;
+ }
+ }
} else {
- if (yych <= 0x7F) goto yy84;
- if (yych <= 0xC1) goto yy222;
- if (yych <= 0xF4) goto yy84;
- goto yy222;
+ if (yych <= 0xE0) {
+ if (yych <= 'z') {
+ if (yych <= '\\') goto yy1182;
+ goto yy1179;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy1183;
+ goto yy1184;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy1185;
+ goto yy1186;
+ } else {
+ if (yych <= 0xF3) goto yy1187;
+ if (yych <= 0xF4) goto yy1188;
+ goto yy73;
+ }
+ }
}
-yy242:
- yyaccept = 15;
+yy1181:
+ yyaccept = 37;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= 0x1A) {
+ if (yych <= 0x7F) {
+ if (yych <= '&') {
+ if (yych <= 0x00) goto yy326;
+ if (yych == '"') goto yy1260;
+ goto yy1259;
+ } else {
+ if (yych <= '\'') goto yy1261;
+ if (yych == '\\') goto yy1262;
+ goto yy1259;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy326;
+ if (yych <= 0xDF) goto yy1263;
+ if (yych <= 0xE0) goto yy1264;
+ goto yy1265;
+ } else {
+ if (yych <= 0xF0) goto yy1266;
+ if (yych <= 0xF3) goto yy1267;
+ if (yych <= 0xF4) goto yy1268;
+ goto yy326;
+ }
+ }
+yy1182:
+ yych = *++YYCURSOR;
+ if (yych <= '^') {
+ if (yych <= ':') {
+ if (yych <= '-') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= ',') goto yy1079;
+ goto yy1179;
+ } else {
+ if (yych <= '.') goto yy1079;
+ if (yych <= '/') goto yy1180;
+ goto yy1179;
+ }
+ } else {
+ if (yych <= '?') {
+ if (yych <= '=') goto yy1079;
+ if (yych <= '>') goto yy1181;
+ goto yy1180;
+ } else {
+ if (yych <= '@') goto yy1079;
+ if (yych <= 'Z') goto yy1179;
+ goto yy1079;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych == '`') goto yy1079;
+ goto yy1179;
+ } else {
+ if (yych <= 0x7F) goto yy1079;
+ if (yych <= 0xC1) goto yy73;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy1184;
+ if (yych <= 0xEF) goto yy1185;
+ goto yy1186;
+ } else {
+ if (yych <= 0xF3) goto yy1187;
+ if (yych <= 0xF4) goto yy1188;
+ goto yy73;
+ }
+ }
+ }
+yy1183:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy1079;
+ goto yy73;
+yy1184:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy73;
+ if (yych <= 0xBF) goto yy1183;
+ goto yy73;
+yy1185:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy1183;
+ goto yy73;
+yy1186:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy73;
+ if (yych <= 0xBF) goto yy1185;
+ goto yy73;
+yy1187:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy1185;
+ goto yy73;
+yy1188:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0x8F) goto yy1185;
+ goto yy73;
+yy1189:
+ yych = *++YYCURSOR;
+ if (yych <= 'Z') {
+ if (yych <= '-') {
+ if (yych <= '"') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= '!') goto yy1189;
+ goto yy814;
+ } else {
+ if (yych == '\'') goto yy813;
+ if (yych <= ',') goto yy1189;
+ goto yy1269;
+ }
+ } else {
+ if (yych <= '=') {
+ if (yych <= '.') goto yy1189;
+ if (yych <= '/') goto yy1270;
+ if (yych <= ':') goto yy1269;
+ goto yy1189;
+ } else {
+ if (yych <= '>') goto yy1271;
+ if (yych <= '?') goto yy1270;
+ if (yych <= '@') goto yy1189;
+ goto yy1269;
+ }
+ }
+ } else {
+ if (yych <= 0x7F) {
+ if (yych <= '^') {
+ if (yych == '\\') goto yy1272;
+ goto yy1189;
+ } else {
+ if (yych == '`') goto yy1189;
+ if (yych <= 'z') goto yy1269;
+ goto yy1189;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy1273;
+ if (yych <= 0xE0) goto yy1274;
+ goto yy1275;
+ } else {
+ if (yych <= 0xF0) goto yy1276;
+ if (yych <= 0xF3) goto yy1277;
+ if (yych <= 0xF4) goto yy1278;
+ goto yy73;
+ }
+ }
+ }
+yy1190:
+ yych = *++YYCURSOR;
+ if (yych <= 0x1F) {
if (yych <= '\t') {
- if (yych <= 0x00) goto yy222;
- if (yych <= 0x08) goto yy84;
- goto yy241;
+ if (yych <= 0x08) goto yy73;
+ goto yy1190;
} else {
- if (yych == '\r') goto yy241;
- goto yy84;
+ if (yych == '\r') goto yy1190;
+ goto yy73;
}
} else {
- if (yych <= ' ') {
- if (yych <= 0x1B) goto yy222;
- if (yych <= 0x1F) goto yy84;
- goto yy241;
+ if (yych <= '/') {
+ if (yych <= ' ') goto yy1190;
+ if (yych <= '.') goto yy73;
+ goto yy324;
} else {
- if (yych <= 0x7F) goto yy84;
- if (yych <= 0xC1) goto yy222;
- if (yych <= 0xF4) goto yy84;
- goto yy222;
+ if (yych == '?') goto yy324;
+ goto yy73;
}
}
-yy243:
- yyaccept = 15;
+yy1191:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1279;
+ goto yy73;
+yy1192:
+ yych = *++YYCURSOR;
+ if (yych <= '9') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy88;
+ if (yych <= '*') goto yy153;
+ goto yy88;
+ } else {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy153;
+ goto yy335;
+ } else {
+ if (yych <= '.') goto yy88;
+ if (yych <= '/') goto yy153;
+ goto yy1280;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') {
+ if (yych <= '?') goto yy153;
+ goto yy90;
+ } else {
+ if (yych <= 'F') goto yy1280;
+ if (yych <= 'Z') goto yy336;
+ goto yy153;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych <= '_') goto yy336;
+ goto yy153;
+ } else {
+ if (yych <= 'f') goto yy1209;
+ if (yych <= 'z') goto yy137;
+ goto yy153;
+ }
+ }
+ }
+yy1193:
+ yyaccept = 7;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= 'S') {
- if (yych <= ',') {
- if (yych <= '&') {
- if (yych == '!') {
- yyt1 = yyt4 = YYCURSOR;
- goto yy331;
+ if (yych <= '^') {
+ if (yych <= '/') {
+ if (yych <= ',') {
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy1026;
}
yyt2 = YYCURSOR;
- goto yy160;
+ goto yy305;
} else {
- if (yych <= '\'') {
- yyt1 = YYCURSOR;
- goto yy332;
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy656;
}
- if (yych <= '+') {
+ if (yych <= '.') {
yyt2 = YYCURSOR;
- goto yy160;
+ goto yy663;
}
- yyt1 = yyt4 = YYCURSOR;
- goto yy331;
+ yyt2 = YYCURSOR;
+ goto yy565;
}
} else {
- if (yych <= '>') {
- if (yych == '.') {
- yyt1 = yyt4 = YYCURSOR;
- goto yy331;
+ if (yych <= '?') {
+ if (yych <= '9') goto yy1281;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1104;
}
yyt2 = YYCURSOR;
- goto yy160;
+ goto yy305;
} else {
- if (yych <= '?') {
- yyt1 = yyt4 = YYCURSOR;
- goto yy331;
- }
- if (yych <= 'R') {
+ if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy160;
+ goto yy565;
}
- goto yy222;
+ if (yych <= 'F') goto yy1281;
+ if (yych <= 'Z') goto yy481;
+ yyt2 = YYCURSOR;
+ goto yy305;
}
}
} else {
if (yych <= 0xC1) {
- if (yych <= 's') {
+ if (yych <= 'f') {
+ if (yych <= '_') {
+ yyt2 = YYCURSOR;
+ goto yy483;
+ }
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy160;
+ goto yy305;
}
- if (yych <= 'r') {
- yyt1 = YYCURSOR;
- goto yy333;
+ goto yy1281;
+ } else {
+ if (yych <= 'z') goto yy481;
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
- goto yy137;
+ goto yy39;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ yyt2 = YYCURSOR;
+ goto yy315;
} else {
- if (yych <= 'z') {
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy316;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy39;
+ }
+ }
+ }
+yy1194:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '^') {
+ if (yych <= '/') {
+ if (yych <= ',') {
+ if (yych == '%') {
yyt1 = YYCURSOR;
- goto yy333;
+ goto yy1026;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy656;
+ }
+ if (yych <= '.') {
+ yyt2 = YYCURSOR;
+ goto yy657;
+ }
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ } else {
+ if (yych <= '?') {
+ if (yych <= '9') goto yy1281;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1104;
}
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ if (yych <= 'F') goto yy1281;
+ if (yych <= 'Z') goto yy481;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ }
+ } else {
+ if (yych <= 0xC1) {
+ if (yych <= 'f') {
+ if (yych <= '_') {
+ yyt2 = YYCURSOR;
+ goto yy483;
+ }
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1281;
+ } else {
+ if (yych <= 'z') goto yy481;
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy160;
+ goto yy305;
}
- goto yy222;
+ goto yy39;
}
} else {
if (yych <= 0xEF) {
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy163;
+ goto yy313;
}
if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy164;
+ goto yy314;
}
yyt2 = YYCURSOR;
- goto yy165;
+ goto yy315;
} else {
if (yych <= 0xF0) {
yyt2 = YYCURSOR;
- goto yy166;
+ goto yy316;
}
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy167;
+ goto yy317;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy168;
+ goto yy318;
}
- goto yy222;
+ goto yy39;
}
}
}
-yy244:
+yy1195:
yych = *++YYCURSOR;
- if (yych <= '\f') {
- if (yych == '\t') goto yy241;
- goto yy84;
+ if (yych <= '9') {
+ if (yych <= '/') {
+ if (yych == '-') goto yy492;
+ goto yy73;
+ } else {
+ if (yych <= '0') goto yy1282;
+ if (yych <= '1') goto yy1283;
+ if (yych <= '2') goto yy1284;
+ goto yy1282;
+ }
} else {
- if (yych <= '\r') goto yy241;
- if (yych == ' ') goto yy241;
- goto yy84;
+ if (yych <= '^') {
+ if (yych <= '@') goto yy73;
+ if (yych <= 'Z') goto yy481;
+ goto yy73;
+ } else {
+ if (yych == '`') goto yy73;
+ if (yych <= 'z') goto yy481;
+ goto yy73;
+ }
}
-yy245:
- yyaccept = 0;
+yy1196:
+ yyaccept = 7;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '9') {
+ if (yych == '.') goto yy1195;
+ goto yy482;
+yy1197:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '.') goto yy1195;
+ if (yych <= '/') goto yy482;
+ if (yych <= '5') goto yy1196;
+ goto yy482;
+yy1198:
+ yych = *++YYCURSOR;
+ if (yych == ':') goto yy1285;
+ goto yy153;
+yy1199:
+ yych = *++YYCURSOR;
+ if (yych == ':') goto yy1285;
+ goto yy73;
+yy1200:
+ yych = *++YYCURSOR;
+ if (yych == 't') goto yy1286;
+ goto yy73;
+yy1201:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1287;
+ goto yy73;
+yy1202:
+ yych = *++YYCURSOR;
+ if (yych == '\n') goto yy73;
+ goto yy1289;
+yy1203:
+ yych = *++YYCURSOR;
+ if (yych == 'i') goto yy1296;
+ goto yy73;
+yy1204:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '/') goto yy278;
+ if (yych <= '9') goto yy1123;
+ goto yy278;
+yy1205:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1297;
+ goto yy73;
+yy1206:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1298;
+ goto yy73;
+yy1207:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '/') goto yy138;
+ if (yych <= '9') goto yy1299;
+ goto yy138;
+yy1208:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '/') goto yy278;
+ if (yych <= '9') goto yy1300;
+ goto yy278;
+yy1209:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy138;
+ if (yych <= '9') goto yy1301;
+ goto yy138;
+ } else {
+ if (yych <= 'F') goto yy1301;
+ if (yych <= '`') goto yy138;
+ if (yych <= 'f') goto yy1301;
+ goto yy138;
+ }
+yy1210:
+ yyaccept = 12;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ if (yych <= '7') {
if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
+ if (yych == '%') goto yy119;
+ if (yych <= '*') goto yy125;
+ goto yy297;
} else {
- if (yych <= ',') goto yy4;
- if (yych == '/') goto yy4;
- goto yy46;
+ if (yych <= '-') {
+ if (yych <= ',') goto yy125;
+ goto yy297;
+ } else {
+ if (yych <= '.') goto yy409;
+ if (yych <= '/') goto yy297;
+ goto yy1302;
+ }
}
} else {
- if (yych <= '^') {
- if (yych <= '?') goto yy4;
- if (yych <= '@') goto yy96;
- if (yych <= 'Z') goto yy334;
- goto yy4;
+ if (yych <= 'Z') {
+ if (yych <= '9') goto yy1303;
+ if (yych <= ':') goto yy297;
+ if (yych <= '?') goto yy125;
+ goto yy297;
} else {
- if (yych <= '_') goto yy46;
- if (yych <= '`') goto yy4;
- if (yych <= 'z') goto yy334;
- goto yy4;
+ if (yych <= '_') {
+ if (yych <= '^') goto yy125;
+ goto yy297;
+ } else {
+ if (yych <= '`') goto yy125;
+ if (yych <= 'z') goto yy297;
+ goto yy125;
+ }
}
}
-yy246:
- yych = *++YYCURSOR;
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy335;
- goto yy1;
-yy247:
- yych = *++YYCURSOR;
- if (yych == ':') goto yy336;
- goto yy1;
-yy248:
- ++YYCURSOR;
-#line 208 "../../lnav/src/data_scanner_re.re"
- {
- RET(DT_H1);
- }
-#line 7589 "../../lnav/src/data_scanner_re.cc"
-yy249:
+yy1211:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ if (yych <= '-') {
+ if (yych == '%') goto yy119;
+ goto yy297;
+ } else {
+ if (yych <= '.') goto yy409;
+ if (yych <= '/') goto yy297;
+ if (yych <= '9') goto yy1303;
+ goto yy297;
+ }
+yy1212:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '_') {
+ if (yych <= '9') {
+ if (yych <= '%') {
+ if (yych <= '$') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt1 = YYCURSOR;
+ goto yy1026;
+ } else {
+ if (yych <= ',') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ goto yy277;
+ }
+ } else {
+ if (yych <= '@') {
+ if (yych <= ':') {
+ yyt1 = YYCURSOR;
+ goto yy1028;
+ }
+ if (yych <= '?') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt2 = YYCURSOR;
+ goto yy565;
+ } else {
+ if (yych <= 'Z') goto yy277;
+ if (yych <= '^') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt2 = YYCURSOR;
+ goto yy431;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy277;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy133;
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy133;
+ }
+ }
+ }
+yy1213:
yych = *++YYCURSOR;
- if (yybm[512+yych] & 64) {
- goto yy249;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '%') {
+ if (yych <= '$') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt1 = YYCURSOR;
+ goto yy1026;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1304;
+ yyt2 = YYCURSOR;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1304;
+ } else {
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1304;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
}
+yy1214:
+ yych = *++YYCURSOR;
if (yych <= '9') {
- if (yych == '-') goto yy158;
- if (yych <= '/') goto yy1;
- goto yy158;
+ if (yych == ' ') goto yy305;
+ if (yych <= '/') goto yy73;
+ goto yy1305;
} else {
- if (yych <= 'Z') {
- if (yych <= '@') goto yy1;
- goto yy337;
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy73;
+ goto yy1305;
} else {
- if (yych <= '`') goto yy1;
- if (yych <= 'z') goto yy337;
- goto yy1;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy1305;
+ goto yy73;
}
}
-yy250:
- yyaccept = 6;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
+yy1215:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1306;
+ if (yych <= ':') goto yy1037;
+ goto yy73;
+ } else {
+ if (yych <= 'F') goto yy1306;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy1306;
+ goto yy73;
}
- if (yych <= '?') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy26;
- if (yych <= 0x08) goto yy3;
- if (yych <= '\n') goto yy26;
- goto yy3;
+yy1216:
+ yych = *++YYCURSOR;
+ if (yych == ':') goto yy1037;
+ goto yy73;
+yy1217:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1307;
+ if (yych >= ';') goto yy73;
+ } else {
+ if (yych <= 'F') goto yy1307;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy1307;
+ goto yy73;
+ }
+yy1218:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1308;
+ if (yych <= ':') goto yy1309;
+ goto yy73;
+ } else {
+ if (yych <= 'F') goto yy1308;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy1308;
+ goto yy73;
+ }
+yy1219:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt4 = YYCURSOR;
+ goto yy867;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') goto yy26;
- goto yy3;
- } else {
- if (yych <= 0x1B) goto yy26;
- if (yych <= 0x1F) goto yy3;
- goto yy26;
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
+ if (yych <= '9') goto yy1310;
+ yyt2 = YYCURSOR;
+ goto yy1311;
}
} else {
- if (yych <= ',') {
- if (yych <= '%') {
- if (yych <= '$') goto yy3;
- goto yy105;
- } else {
- if (yych == '+') goto yy80;
- goto yy26;
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
+ goto yy1312;
} else {
- if (yych <= '/') {
- if (yych <= '.') goto yy46;
- goto yy3;
- } else {
- if (yych <= '9') goto yy250;
- if (yych <= ':') goto yy62;
- goto yy26;
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
+ goto yy1312;
}
}
} else {
- if (yych <= 'z') {
- if (yych <= '^') {
- if (yych <= 'D') {
- if (yych <= '@') goto yy96;
- goto yy46;
- } else {
- if (yych <= 'E') goto yy339;
- if (yych <= 'Z') goto yy46;
- goto yy26;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy1220:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt4 = YYCURSOR;
+ goto yy867;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1313;
+ yyt2 = YYCURSOR;
+ goto yy1311;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
+ goto yy1312;
} else {
+ if (yych <= 'Z') goto yy73;
if (yych <= '`') {
- if (yych <= '_') goto yy46;
- goto yy26;
- } else {
- if (yych == 'e') goto yy339;
- goto yy46;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1312;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
}
+ yyt2 = YYCURSOR;
+ goto yy314;
}
} else {
- if (yych <= 0xE0) {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy1221:
+ yych = *++YYCURSOR;
+ if (yych <= '`') {
+ if (yych <= '5') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt4 = YYCURSOR;
+ goto yy867;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '4') goto yy1313;
+ goto yy1314;
+ }
+ } else {
+ if (yych <= '@') {
+ if (yych <= '9') goto yy1310;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1311;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'F') goto yy1312;
+ if (yych <= 'Z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= 'f') goto yy1312;
+ goto yy73;
+ } else {
if (yych <= 0x7F) {
- if (yych <= '~') goto yy26;
- goto yy3;
- } else {
- if (yych <= 0xC1) goto yy26;
- if (yych <= 0xDF) goto yy56;
- goto yy57;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
}
+ yyt2 = YYCURSOR;
+ goto yy316;
} else {
- if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy58;
- goto yy59;
- } else {
- if (yych <= 0xF3) goto yy60;
- if (yych <= 0xF4) goto yy61;
- goto yy26;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
}
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
}
}
}
-yy251:
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '9') {
- if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
+yy1222:
+ yych = *++YYCURSOR;
+ if (yych <= 'z') {
+ if (yych <= '@') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1312;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1311;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
} else {
- if (yych <= ',') goto yy4;
- if (yych <= '.') goto yy46;
- if (yych <= '/') goto yy4;
- goto yy340;
+ if (yych <= 'Z') {
+ if (yych <= 'F') goto yy1312;
+ goto yy73;
+ } else {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 'f') goto yy1312;
+ goto yy73;
+ }
}
} else {
- if (yych <= '^') {
- if (yych <= '?') goto yy4;
- if (yych <= '@') goto yy96;
- if (yych <= 'Z') goto yy46;
- goto yy4;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
} else {
- if (yych == '`') goto yy4;
- if (yych <= 'z') goto yy46;
- goto yy4;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
}
}
-yy252:
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= ':') {
- if (yych <= 0x1F) {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy5;
- if (yych <= 0x08) goto yy3;
- if (yych <= '\n') goto yy5;
- goto yy3;
+yy1223:
+ yych = *++YYCURSOR;
+ if (yych <= 'z') {
+ if (yych <= '@') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1315;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1137;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= 'F') goto yy1315;
+ goto yy73;
} else {
- if (yych <= '\r') goto yy5;
- if (yych == 0x1B) goto yy5;
- goto yy3;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 'f') goto yy1315;
+ goto yy73;
}
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
} else {
- if (yych <= '-') {
- if (yych == '$') goto yy3;
- if (yych <= ',') goto yy5;
- goto yy174;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy1224:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt4 = YYCURSOR;
+ goto yy867;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1315;
+ yyt2 = YYCURSOR;
+ goto yy1137;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1315;
} else {
- if (yych <= '.') goto yy252;
- if (yych <= '/') goto yy3;
- if (yych <= '9') goto yy174;
- goto yy62;
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1315;
}
}
} else {
- if (yych <= '~') {
- if (yych <= '^') {
- if (yych <= '?') goto yy5;
- if (yych <= '@') goto yy3;
- if (yych <= 'Z') goto yy341;
- goto yy5;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
} else {
- if (yych <= '_') goto yy3;
- if (yych <= '`') goto yy5;
- if (yych <= 'z') goto yy341;
- goto yy5;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
}
} else {
- if (yych <= 0xE0) {
- if (yych <= 0x7F) goto yy3;
- if (yych <= 0xC1) goto yy5;
- if (yych <= 0xDF) goto yy56;
- goto yy57;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
} else {
- if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy58;
- goto yy59;
- } else {
- if (yych <= 0xF3) goto yy60;
- if (yych <= 0xF4) goto yy61;
- goto yy5;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
}
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
}
}
}
-yy253:
- yych = *++YYCURSOR;
- if (yych == 'o') goto yy342;
- goto yy100;
-yy254:
- yyaccept = 5;
+yy1225:
+ yyaccept = 14;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '9') {
- if (yych <= ' ') {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy24;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy24;
- goto yy4;
+ if (yych <= '`') {
+ if (yych <= '?') {
+ if (yych <= '/') {
+ if (yych <= ',') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt2 = YYCURSOR;
+ goto yy565;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') goto yy24;
- goto yy4;
- } else {
- if (yych <= 0x1B) goto yy24;
- if (yych <= 0x1F) goto yy4;
- goto yy24;
+ if (yych <= '9') goto yy1316;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1317;
}
+ yyt2 = YYCURSOR;
+ goto yy305;
}
} else {
- if (yych <= '$') {
- if (yych == '"') goto yy24;
- if (yych <= '#') goto yy99;
- goto yy101;
+ if (yych <= 'Z') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ goto yy277;
} else {
- if (yych <= '\'') {
- if (yych <= '&') goto yy99;
- goto yy24;
- } else {
- if (yych <= '*') goto yy99;
- if (yych <= ',') goto yy24;
- goto yy101;
+ if (yych == '_') {
+ yyt2 = YYCURSOR;
+ goto yy431;
}
+ yyt2 = YYCURSOR;
+ goto yy305;
}
}
} else {
- if (yych <= '`') {
- if (yych <= '[') {
- if (yych <= ':') goto yy4;
- if (yych <= '?') goto yy24;
- if (yych <= 'Z') goto yy101;
- goto yy24;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy277;
+ yyt2 = YYCURSOR;
+ goto yy305;
} else {
- if (yych <= ']') {
- if (yych <= '\\') goto yy99;
- goto yy24;
- } else {
- if (yych <= '^') goto yy99;
- if (yych <= '_') goto yy101;
- goto yy24;
+ if (yych <= 0xC1) goto yy133;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
}
+ yyt2 = YYCURSOR;
+ goto yy314;
}
} else {
- if (yych <= '}') {
- if (yych == 'g') goto yy343;
- if (yych <= 'z') goto yy101;
- goto yy24;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
} else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy99;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy24;
- if (yych <= 0xF4) goto yy4;
- goto yy24;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
}
+ goto yy133;
}
}
}
-yy255:
- yyaccept = 0;
+yy1226:
+ yyaccept = 14;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '9') {
- if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
+ if (yych <= '`') {
+ if (yych <= '?') {
+ if (yych <= '/') {
+ if (yych <= ',') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt2 = YYCURSOR;
+ goto yy565;
+ } else {
+ if (yych <= '9') goto yy1225;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1317;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
} else {
- if (yych <= ',') goto yy4;
- if (yych <= '.') goto yy46;
- if (yych <= '/') goto yy4;
- goto yy344;
+ if (yych <= 'Z') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ goto yy277;
+ } else {
+ if (yych == '_') {
+ yyt2 = YYCURSOR;
+ goto yy431;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
}
} else {
- if (yych <= '^') {
- if (yych <= '?') goto yy4;
- if (yych <= '@') goto yy96;
- if (yych <= 'Z') goto yy344;
- goto yy4;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy277;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 0xC1) goto yy133;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
} else {
- if (yych == '`') goto yy4;
- if (yych <= 'z') goto yy344;
- goto yy4;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy133;
+ }
}
}
-yy256:
- yyaccept = 0;
+yy1227:
+ yyaccept = 14;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '1') {
- if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
+ if (yych <= '_') {
+ if (yych <= '9') {
+ if (yych <= '/') {
+ if (yych <= ',') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt2 = YYCURSOR;
+ goto yy565;
+ } else {
+ if (yych <= '4') goto yy1225;
+ if (yych <= '5') goto yy1318;
+ goto yy1316;
+ }
} else {
- if (yych <= '.') {
- if (yych <= ',') goto yy4;
- goto yy46;
+ if (yych <= '@') {
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1317;
+ }
+ if (yych <= '?') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt2 = YYCURSOR;
+ goto yy565;
} else {
- if (yych <= '/') goto yy4;
- if (yych <= '0') goto yy346;
- goto yy347;
+ if (yych <= 'Z') goto yy277;
+ if (yych <= '^') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt2 = YYCURSOR;
+ goto yy431;
}
}
} else {
- if (yych <= 'Z') {
- if (yych <= '9') {
- if (yych <= '2') goto yy348;
- goto yy346;
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy277;
} else {
- if (yych <= '?') goto yy4;
- if (yych <= '@') goto yy96;
- goto yy46;
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy133;
+ yyt2 = YYCURSOR;
+ goto yy313;
}
} else {
- if (yych <= '_') {
- if (yych <= '^') goto yy4;
- goto yy46;
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
} else {
- if (yych <= '`') goto yy4;
- if (yych <= 'z') goto yy46;
- goto yy4;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy133;
}
}
}
-yy257:
- yyaccept = 6;
+yy1228:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ switch (yych) {
+ case '%': goto yy119;
+ case '+':
+ case '-':
+ case '/':
+ case ':':
+ case '@':
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy297;
+ case '.': goto yy443;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy1319;
+ case 'B':
+ case 'b': goto yy1147;
+ case 'E':
+ case 'e': goto yy1148;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy132;
+ case 'S':
+ case 's': goto yy136;
+ case 'm': goto yy139;
+ case 'p':
+ case 'u': goto yy140;
+ default: goto yy24;
+ }
+yy1229:
+ yyaccept = 3;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
+ switch (yych) {
+ case '%':
+ case '+':
+ case '-':
+ case '.':
+ case '/':
+ case ':':
+ case '@':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy138;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy1320;
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'E':
+ case 'F':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'e':
+ case 'f': goto yy1301;
+ case 'B':
+ case 'b': goto yy1321;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy590;
+ case 'S':
+ case 's': goto yy591;
+ case 'm': goto yy592;
+ case 'p':
+ case 'u': goto yy593;
+ default: goto yy24;
+ }
+yy1230:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) {
+ if (yych <= '@') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy73;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy310;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ yyt2 = YYCURSOR;
+ goto yy315;
+ } else {
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy316;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
}
- if (yych <= '/') {
- if (yych <= 0x1F) {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy26;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy26;
- goto yy4;
+yy1231:
+ yych = *++YYCURSOR;
+ if (yych <= 'z') {
+ if (yych <= ':') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '5') goto yy1230;
+ if (yych <= '9') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy310;
+ } else {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy73;
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy1232:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt1 = YYCURSOR;
+ goto yy444;
} else {
- if (yych <= '\r') goto yy26;
- if (yych == 0x1B) goto yy26;
- goto yy4;
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1322;
+ yyt2 = YYCURSOR;
+ goto yy1323;
}
} else {
- if (yych <= '*') {
- if (yych <= '#') goto yy26;
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy105;
- goto yy26;
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy877;
} else {
- if (yych <= ',') {
- if (yych <= '+') goto yy80;
- goto yy26;
- } else {
- if (yych <= '-') goto yy255;
- if (yych <= '.') goto yy256;
- goto yy4;
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
+ goto yy877;
}
}
} else {
- if (yych <= '_') {
- if (yych <= '@') {
- if (yych <= '9') goto yy349;
- if (yych <= ':') goto yy4;
- if (yych <= '?') goto yy26;
- goto yy96;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
} else {
- if (yych <= 'E') {
- if (yych >= 'E') goto yy259;
- } else {
- if (yych <= 'Z') goto yy258;
- if (yych <= '^') goto yy26;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
}
+ yyt2 = YYCURSOR;
+ goto yy314;
}
} else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy1233:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt1 = YYCURSOR;
+ goto yy444;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1324;
+ yyt2 = YYCURSOR;
+ goto yy878;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy877;
+ } else {
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy877;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy1234:
+ yych = *++YYCURSOR;
+ if (yych <= '`') {
+ if (yych <= '5') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt1 = YYCURSOR;
+ goto yy444;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '4') goto yy1324;
+ goto yy1325;
+ }
+ } else {
+ if (yych <= '@') {
+ if (yych <= '9') goto yy1322;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy878;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'F') goto yy877;
+ if (yych <= 'Z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
if (yych <= 'z') {
- if (yych <= '`') goto yy26;
- if (yych == 'e') goto yy259;
+ if (yych <= 'f') goto yy877;
+ goto yy73;
} else {
if (yych <= 0x7F) {
- if (yych <= '~') goto yy26;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy26;
- if (yych <= 0xF4) goto yy4;
- goto yy26;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
}
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
}
}
}
-yy258:
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[512+yych] & 128) {
- goto yy258;
+yy1235:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt1 = YYCURSOR;
+ goto yy444;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1322;
+ yyt2 = YYCURSOR;
+ goto yy878;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy877;
+ } else {
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy877;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
}
- if (yych <= '-') {
- if (yych <= 0x1B) {
- if (yych <= '\n') {
- if (yych <= 0x00) goto yy5;
- if (yych <= 0x08) goto yy3;
- goto yy5;
+yy1236:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt1 = YYCURSOR;
+ goto yy444;
} else {
- if (yych == '\r') goto yy5;
- if (yych <= 0x1A) goto yy3;
- goto yy5;
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1054;
+ yyt2 = YYCURSOR;
+ goto yy743;
}
} else {
- if (yych <= '%') {
- if (yych <= 0x1F) goto yy3;
- if (yych <= '#') goto yy5;
- if (yych <= '$') goto yy3;
- goto yy80;
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1054;
} else {
- if (yych == '+') goto yy80;
- if (yych <= ',') goto yy5;
- goto yy255;
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1054;
}
}
} else {
- if (yych <= 0x7F) {
- if (yych <= ':') {
- if (yych <= '.') goto yy350;
- if (yych <= '/') goto yy3;
- goto yy62;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
} else {
- if (yych == '@') goto yy96;
- if (yych <= '~') goto yy5;
- goto yy3;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
}
} else {
- if (yych <= 0xEF) {
- if (yych <= 0xC1) goto yy5;
- if (yych <= 0xDF) goto yy56;
- if (yych <= 0xE0) goto yy57;
- goto yy58;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
} else {
- if (yych <= 0xF0) goto yy59;
- if (yych <= 0xF3) goto yy60;
- if (yych <= 0xF4) goto yy61;
- goto yy5;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
}
}
}
-yy259:
- yyaccept = 0;
+yy1237:
+ yyaccept = 39;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[512+yych] & 128) {
- goto yy258;
+ if (yybm_bol[0+yych] & 64) {
+ goto yy1158;
}
+ if (yych <= 0xC1) {
+ if (yych <= '\'') {
+ if (yych <= 0x00) goto yy895;
+ if (yych <= '"') goto yy1159;
+ goto yy1160;
+ } else {
+ if (yych <= '*') goto yy1161;
+ if (yych <= '-') goto yy1162;
+ if (yych <= '\\') goto yy1163;
+ goto yy895;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy1164;
+ if (yych <= 0xE0) goto yy1165;
+ goto yy1166;
+ } else {
+ if (yych <= 0xF0) goto yy1167;
+ if (yych <= 0xF3) goto yy1168;
+ if (yych <= 0xF4) goto yy1169;
+ goto yy895;
+ }
+ }
+yy1238:
+ yych = *++YYCURSOR;
if (yych <= ',') {
- if (yych <= '%') {
- if (yych <= '$') goto yy4;
- goto yy80;
+ if (yych <= ' ') {
+ if (yych <= '\t') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= 0x08) goto yy759;
+ goto yy1238;
+ } else {
+ if (yych == '\r') goto yy1238;
+ if (yych <= 0x1F) goto yy759;
+ goto yy1238;
+ }
} else {
- if (yych == '+') goto yy351;
- goto yy4;
+ if (yych <= '&') {
+ if (yych != '"') goto yy759;
+ } else {
+ if (yych <= '\'') goto yy1240;
+ if (yych == '*') goto yy612;
+ goto yy759;
+ }
}
} else {
- if (yych <= '.') {
- if (yych <= '-') goto yy352;
- goto yy350;
+ if (yych <= 0xC1) {
+ if (yych <= '>') {
+ if (yych <= '-') goto yy760;
+ if (yych <= '=') goto yy759;
+ goto yy906;
+ } else {
+ if (yych == '\\') goto yy761;
+ if (yych <= 0x7F) goto yy759;
+ goto yy73;
+ }
} else {
- if (yych == '@') goto yy96;
- goto yy4;
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy762;
+ if (yych <= 0xE0) goto yy763;
+ goto yy764;
+ } else {
+ if (yych <= 0xF0) goto yy765;
+ if (yych <= 0xF3) goto yy766;
+ if (yych <= 0xF4) goto yy767;
+ goto yy73;
+ }
}
}
-yy260:
- yyaccept = 6;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
+yy1239:
+ yych = *++YYCURSOR;
+ if (yybm_bol[0+yych] & 64) {
+ goto yy1158;
+ }
+ if (yych <= 0xC1) {
+ if (yych <= '\'') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= '"') goto yy759;
+ goto yy1160;
+ } else {
+ if (yych <= '*') goto yy1161;
+ if (yych <= '-') goto yy1162;
+ if (yych <= '\\') goto yy1163;
+ goto yy73;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy1164;
+ if (yych <= 0xE0) goto yy1165;
+ goto yy1166;
+ } else {
+ if (yych <= 0xF0) goto yy1167;
+ if (yych <= 0xF3) goto yy1168;
+ if (yych <= 0xF4) goto yy1169;
+ goto yy73;
+ }
}
- if (yych <= '5') {
- if (yych <= '#') {
+yy1240:
+ yych = *++YYCURSOR;
+ if (yych <= '=') {
+ if (yych <= '"') {
if (yych <= '\f') {
- if (yych <= 0x00) goto yy26;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy26;
- goto yy4;
+ if (yych <= 0x00) goto yy73;
+ if (yych == '\t') goto yy1238;
+ goto yy759;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') goto yy26;
- goto yy4;
+ if (yych <= 0x1F) {
+ if (yych <= '\r') goto yy1238;
+ goto yy759;
} else {
- if (yych <= 0x1B) goto yy26;
- if (yych <= 0x1F) goto yy4;
- goto yy26;
+ if (yych <= ' ') goto yy1238;
+ if (yych <= '!') goto yy759;
+ goto yy1239;
}
}
} else {
- if (yych <= '+') {
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy105;
- if (yych <= '*') goto yy26;
- goto yy80;
+ if (yych <= '*') {
+ if (yych == '\'') goto yy624;
+ if (yych <= ')') goto yy759;
+ goto yy612;
} else {
if (yych <= '-') {
- if (yych <= ',') goto yy26;
- goto yy255;
+ if (yych <= ',') goto yy759;
} else {
- if (yych <= '.') goto yy256;
- if (yych <= '/') goto yy4;
- goto yy257;
+ if (yych <= '/') goto yy759;
+ if (yych <= ':') goto yy1242;
+ goto yy759;
}
}
}
} else {
- if (yych <= '_') {
- if (yych <= '@') {
- if (yych <= '9') goto yy349;
- if (yych <= ':') goto yy4;
- if (yych <= '?') goto yy26;
- goto yy96;
+ if (yych <= 'z') {
+ if (yych <= '[') {
+ if (yych <= '>') goto yy906;
+ if (yych <= '@') goto yy759;
+ if (yych <= 'Z') goto yy1242;
+ goto yy759;
} else {
- if (yych <= 'E') {
- if (yych <= 'D') goto yy258;
- goto yy259;
+ if (yych <= '^') {
+ if (yych <= '\\') goto yy761;
+ goto yy759;
} else {
- if (yych <= 'Z') goto yy258;
- if (yych <= '^') goto yy26;
- goto yy258;
+ if (yych == '`') goto yy759;
+ goto yy1242;
}
}
} else {
- if (yych <= 'z') {
- if (yych <= '`') goto yy26;
- if (yych == 'e') goto yy259;
- goto yy258;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy759;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy762;
+ goto yy763;
} else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy26;
- goto yy4;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy764;
+ goto yy765;
} else {
- if (yych <= 0xC1) goto yy26;
- if (yych <= 0xF4) goto yy4;
- goto yy26;
+ if (yych <= 0xF3) goto yy766;
+ if (yych <= 0xF4) goto yy767;
+ goto yy73;
}
}
}
}
-yy261:
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= ':') {
- if (yych <= '#') {
+yy1241:
+ yych = *++YYCURSOR;
+ if (yych <= '=') {
+ if (yych <= '!') {
if (yych <= '\f') {
- if (yych <= 0x00) goto yy5;
- if (yych <= 0x08) goto yy3;
- if (yych <= '\n') goto yy5;
- goto yy3;
+ if (yych <= 0x00) goto yy73;
+ if (yych == '\t') goto yy1326;
+ goto yy759;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') goto yy5;
- goto yy3;
+ if (yych <= '\r') goto yy1326;
+ if (yych == ' ') goto yy1326;
+ goto yy759;
+ }
+ } else {
+ if (yych <= ',') {
+ if (yych <= '"') goto yy1239;
+ if (yych == '\'') goto yy1240;
+ goto yy759;
+ } else {
+ if (yych <= '/') {
+ if (yych <= '-') goto yy1327;
+ goto yy759;
} else {
- if (yych <= 0x1B) goto yy5;
- if (yych <= 0x1F) goto yy3;
- goto yy5;
+ if (yych <= ':') goto yy1242;
+ if (yych <= '<') goto yy759;
+ goto yy1328;
+ }
+ }
+ }
+ } else {
+ if (yych <= 'z') {
+ if (yych <= '[') {
+ if (yych <= '>') goto yy906;
+ if (yych <= '@') goto yy759;
+ if (yych >= '[') goto yy759;
+ } else {
+ if (yych <= '^') {
+ if (yych <= '\\') goto yy761;
+ goto yy759;
+ } else {
+ if (yych == '`') goto yy759;
}
}
} else {
- if (yych <= '+') {
- if (yych <= '$') goto yy3;
- if (yych <= '%') goto yy80;
- if (yych <= '*') goto yy5;
- goto yy80;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy759;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy762;
+ goto yy763;
} else {
- if (yych <= '.') {
- if (yych <= ',') goto yy5;
- goto yy46;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy764;
+ goto yy765;
} else {
- if (yych <= '/') goto yy3;
- if (yych <= '9') goto yy353;
- goto yy62;
+ if (yych <= 0xF3) goto yy766;
+ if (yych <= 0xF4) goto yy767;
+ goto yy73;
+ }
+ }
+ }
+ }
+yy1242:
+ yych = *++YYCURSOR;
+ if (yych <= '<') {
+ if (yych <= '"') {
+ if (yych <= '\f') {
+ if (yych <= 0x00) goto yy73;
+ if (yych == '\t') goto yy1326;
+ goto yy759;
+ } else {
+ if (yych <= 0x1F) {
+ if (yych <= '\r') goto yy1326;
+ goto yy759;
+ } else {
+ if (yych <= ' ') goto yy1326;
+ if (yych <= '!') goto yy759;
+ goto yy1239;
+ }
+ }
+ } else {
+ if (yych <= '*') {
+ if (yych == '\'') goto yy1240;
+ if (yych <= ')') goto yy759;
+ goto yy612;
+ } else {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy759;
+ goto yy1241;
+ } else {
+ if (yych <= '/') goto yy759;
+ if (yych <= ':') goto yy1242;
+ goto yy759;
}
}
}
} else {
- if (yych <= 'z') {
+ if (yych <= '`') {
if (yych <= 'Z') {
- if (yych <= '?') goto yy5;
- if (yych <= '@') goto yy96;
- if (yych <= 'F') goto yy353;
- goto yy46;
+ if (yych <= '=') goto yy1328;
+ if (yych <= '>') goto yy906;
+ if (yych <= '@') goto yy759;
+ goto yy1242;
} else {
- if (yych <= '_') {
- if (yych <= '^') goto yy5;
- goto yy46;
+ if (yych <= '\\') {
+ if (yych <= '[') goto yy759;
+ goto yy761;
} else {
- if (yych <= '`') goto yy5;
- if (yych <= 'f') goto yy353;
- goto yy46;
+ if (yych == '_') goto yy1242;
+ goto yy759;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= '~') goto yy5;
- goto yy3;
+ if (yych <= 'z') goto yy1242;
+ goto yy759;
} else {
- if (yych <= 0xC1) goto yy5;
- if (yych <= 0xDF) goto yy56;
- goto yy57;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy762;
+ goto yy763;
}
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy58;
- goto yy59;
+ if (yych <= 0xEF) goto yy764;
+ goto yy765;
} else {
- if (yych <= 0xF3) goto yy60;
- if (yych <= 0xF4) goto yy61;
- goto yy5;
+ if (yych <= 0xF3) goto yy766;
+ if (yych <= 0xF4) goto yy767;
+ goto yy73;
}
}
}
}
-yy262:
- yyaccept = 6;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
+yy1243:
+ yych = *++YYCURSOR;
+ if (yych <= ',') {
+ if (yych <= ' ') {
+ if (yych <= '\t') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= 0x08) goto yy750;
+ goto yy1243;
+ } else {
+ if (yych == '\r') goto yy1243;
+ if (yych <= 0x1F) goto yy750;
+ goto yy1243;
+ }
+ } else {
+ if (yych <= '&') {
+ if (yych != '"') goto yy750;
+ } else {
+ if (yych <= '\'') goto yy1245;
+ if (yych == '*') goto yy604;
+ goto yy750;
+ }
+ }
+ } else {
+ if (yych <= 0xC1) {
+ if (yych <= '>') {
+ if (yych <= '-') goto yy751;
+ if (yych <= '=') goto yy750;
+ goto yy898;
+ } else {
+ if (yych == '\\') goto yy752;
+ if (yych <= 0x7F) goto yy750;
+ goto yy73;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy753;
+ if (yych <= 0xE0) goto yy754;
+ goto yy755;
+ } else {
+ if (yych <= 0xF0) goto yy756;
+ if (yych <= 0xF3) goto yy757;
+ if (yych <= 0xF4) goto yy758;
+ goto yy73;
+ }
+ }
}
- if (yych <= '/') {
- if (yych <= 0x1F) {
+yy1244:
+ yych = *++YYCURSOR;
+ if (yych <= '=') {
+ if (yych <= '"') {
if (yych <= '\f') {
- if (yych <= 0x00) goto yy26;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy26;
- goto yy4;
+ if (yych <= 0x00) goto yy73;
+ if (yych == '\t') goto yy1243;
+ goto yy750;
} else {
- if (yych <= '\r') goto yy26;
- if (yych == 0x1B) goto yy26;
- goto yy4;
+ if (yych <= 0x1F) {
+ if (yych <= '\r') goto yy1243;
+ goto yy750;
+ } else {
+ if (yych <= ' ') goto yy1243;
+ if (yych <= '!') goto yy750;
+ goto yy623;
+ }
}
} else {
if (yych <= '*') {
- if (yych <= '#') goto yy26;
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy105;
- goto yy26;
+ if (yych == '\'') goto yy1245;
+ if (yych <= ')') goto yy750;
+ goto yy604;
} else {
- if (yych <= ',') {
- if (yych <= '+') goto yy80;
- goto yy26;
+ if (yych <= '-') {
+ if (yych <= ',') goto yy750;
+ goto yy1246;
} else {
- if (yych <= '-') goto yy255;
- if (yych <= '.') goto yy256;
- goto yy4;
+ if (yych <= '/') goto yy750;
+ if (yych <= ':') goto yy1247;
+ goto yy750;
}
}
}
} else {
- if (yych <= '_') {
- if (yych <= '@') {
- if (yych <= '9') goto yy355;
- if (yych <= ':') goto yy4;
- if (yych <= '?') goto yy26;
- goto yy96;
+ if (yych <= 'z') {
+ if (yych <= '[') {
+ if (yych <= '>') goto yy898;
+ if (yych <= '@') goto yy750;
+ if (yych <= 'Z') goto yy1247;
+ goto yy750;
} else {
- if (yych <= 'E') {
- if (yych <= 'D') goto yy258;
- goto yy356;
+ if (yych <= '^') {
+ if (yych <= '\\') goto yy752;
+ goto yy750;
} else {
- if (yych <= 'Z') goto yy258;
- if (yych <= '^') goto yy26;
- goto yy258;
+ if (yych == '`') goto yy750;
+ goto yy1247;
}
}
} else {
- if (yych <= 'z') {
- if (yych <= '`') goto yy26;
- if (yych == 'e') goto yy356;
- goto yy258;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy750;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy753;
+ goto yy754;
} else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy26;
- goto yy4;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy755;
+ goto yy756;
} else {
- if (yych <= 0xC1) goto yy26;
- if (yych <= 0xF4) goto yy4;
- goto yy26;
+ if (yych <= 0xF3) goto yy757;
+ if (yych <= 0xF4) goto yy758;
+ goto yy73;
}
}
}
}
-yy263:
- yyaccept = 6;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
+yy1245:
+ yych = *++YYCURSOR;
+ if (yybm_bol[0+yych] & 64) {
+ goto yy1158;
}
- if (yych <= '/') {
- if (yych <= 0x1F) {
+ if (yych <= 0xC1) {
+ if (yych <= '\'') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= '"') goto yy1159;
+ goto yy750;
+ } else {
+ if (yych <= '*') goto yy1161;
+ if (yych <= '-') goto yy1162;
+ if (yych <= '\\') goto yy1163;
+ goto yy73;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy1164;
+ if (yych <= 0xE0) goto yy1165;
+ goto yy1166;
+ } else {
+ if (yych <= 0xF0) goto yy1167;
+ if (yych <= 0xF3) goto yy1168;
+ if (yych <= 0xF4) goto yy1169;
+ goto yy73;
+ }
+ }
+yy1246:
+ yych = *++YYCURSOR;
+ if (yych <= '=') {
+ if (yych <= '!') {
if (yych <= '\f') {
- if (yych <= 0x00) goto yy26;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy26;
- goto yy4;
+ if (yych <= 0x00) goto yy73;
+ if (yych == '\t') goto yy1329;
+ goto yy750;
} else {
- if (yych <= '\r') goto yy26;
- if (yych == 0x1B) goto yy26;
- goto yy4;
+ if (yych <= '\r') goto yy1329;
+ if (yych == ' ') goto yy1329;
+ goto yy750;
}
} else {
- if (yych <= '*') {
- if (yych <= '#') goto yy26;
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy105;
- goto yy26;
+ if (yych <= ',') {
+ if (yych <= '"') goto yy1244;
+ if (yych == '\'') goto yy1245;
+ goto yy750;
} else {
- if (yych <= ',') {
- if (yych <= '+') goto yy80;
- goto yy26;
+ if (yych <= '/') {
+ if (yych <= '-') goto yy1330;
+ goto yy750;
} else {
- if (yych <= '-') goto yy255;
- if (yych <= '.') goto yy256;
- goto yy4;
+ if (yych <= ':') goto yy1247;
+ if (yych <= '<') goto yy750;
+ goto yy1331;
}
}
}
} else {
- if (yych <= '_') {
- if (yych <= '@') {
- if (yych <= '9') goto yy262;
- if (yych <= ':') goto yy4;
- if (yych <= '?') goto yy26;
- goto yy96;
+ if (yych <= 'z') {
+ if (yych <= '[') {
+ if (yych <= '>') goto yy898;
+ if (yych <= '@') goto yy750;
+ if (yych >= '[') goto yy750;
} else {
- if (yych <= 'E') {
- if (yych <= 'D') goto yy258;
- goto yy356;
+ if (yych <= '^') {
+ if (yych <= '\\') goto yy752;
+ goto yy750;
} else {
- if (yych <= 'Z') goto yy258;
- if (yych <= '^') goto yy26;
- goto yy258;
+ if (yych == '`') goto yy750;
}
}
} else {
- if (yych <= 'z') {
- if (yych <= '`') goto yy26;
- if (yych == 'e') goto yy356;
- goto yy258;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy750;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy753;
+ goto yy754;
} else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy26;
- goto yy4;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy755;
+ goto yy756;
} else {
- if (yych <= 0xC1) goto yy26;
- if (yych <= 0xF4) goto yy4;
- goto yy26;
+ if (yych <= 0xF3) goto yy757;
+ if (yych <= 0xF4) goto yy758;
+ goto yy73;
}
}
}
}
-yy264:
- yyaccept = 6;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
- }
- if (yych <= '4') {
- if (yych <= '#') {
+yy1247:
+ yych = *++YYCURSOR;
+ if (yych <= '<') {
+ if (yych <= '"') {
if (yych <= '\f') {
- if (yych <= 0x00) goto yy26;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy26;
- goto yy4;
+ if (yych <= 0x00) goto yy73;
+ if (yych == '\t') goto yy1329;
+ goto yy750;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') goto yy26;
- goto yy4;
+ if (yych <= 0x1F) {
+ if (yych <= '\r') goto yy1329;
+ goto yy750;
} else {
- if (yych <= 0x1B) goto yy26;
- if (yych <= 0x1F) goto yy4;
- goto yy26;
+ if (yych <= ' ') goto yy1329;
+ if (yych <= '!') goto yy750;
+ goto yy1244;
}
}
} else {
- if (yych <= '+') {
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy105;
- if (yych <= '*') goto yy26;
- goto yy80;
+ if (yych <= '*') {
+ if (yych == '\'') goto yy1245;
+ if (yych <= ')') goto yy750;
+ goto yy604;
} else {
if (yych <= '-') {
- if (yych <= ',') goto yy26;
- goto yy255;
+ if (yych <= ',') goto yy750;
+ goto yy1246;
} else {
- if (yych <= '.') goto yy256;
- if (yych <= '/') goto yy4;
- goto yy262;
+ if (yych <= '/') goto yy750;
+ if (yych <= ':') goto yy1247;
+ goto yy750;
}
}
}
} else {
- if (yych <= '^') {
- if (yych <= '?') {
- if (yych <= '5') goto yy357;
- if (yych <= '9') goto yy355;
- if (yych <= ':') goto yy4;
- goto yy26;
+ if (yych <= '`') {
+ if (yych <= 'Z') {
+ if (yych <= '=') goto yy1331;
+ if (yych <= '>') goto yy898;
+ if (yych <= '@') goto yy750;
+ goto yy1247;
} else {
- if (yych <= 'D') {
- if (yych <= '@') goto yy96;
- goto yy258;
+ if (yych <= '\\') {
+ if (yych <= '[') goto yy750;
+ goto yy752;
} else {
- if (yych <= 'E') goto yy356;
- if (yych <= 'Z') goto yy258;
- goto yy26;
+ if (yych == '_') goto yy1247;
+ goto yy750;
}
}
} else {
- if (yych <= 'z') {
- if (yych <= '`') {
- if (yych <= '_') goto yy258;
- goto yy26;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy1247;
+ goto yy750;
} else {
- if (yych == 'e') goto yy356;
- goto yy258;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy753;
+ goto yy754;
}
} else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy26;
- goto yy4;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy755;
+ goto yy756;
} else {
- if (yych <= 0xC1) goto yy26;
- if (yych <= 0xF4) goto yy4;
- goto yy26;
+ if (yych <= 0xF3) goto yy757;
+ if (yych <= 0xF4) goto yy758;
+ goto yy73;
}
}
}
}
-yy265:
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '@') goto yy4;
- if (yych <= 'Z') goto yy358;
- if (yych <= '`') goto yy4;
- if (yych <= 'z') goto yy358;
- goto yy4;
-yy266:
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '9') {
- if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
+yy1248:
+ yych = *++YYCURSOR;
+ if (yych <= '[') {
+ if (yych <= '\'') {
+ if (yych <= '!') {
+ if (yych <= 0x00) goto yy73;
+ goto yy1158;
+ } else {
+ if (yych <= '"') goto yy1159;
+ if (yych <= '&') goto yy1158;
+ goto yy1160;
+ }
} else {
- if (yych <= ',') goto yy4;
- if (yych <= '.') goto yy46;
- if (yych <= '/') goto yy4;
- goto yy359;
+ if (yych <= '-') {
+ if (yych <= ',') goto yy1158;
+ goto yy1248;
+ } else {
+ if (yych == '>') goto yy1237;
+ goto yy1158;
+ }
}
} else {
- if (yych <= '^') {
- if (yych <= '?') goto yy4;
- if (yych <= '@') goto yy96;
- if (yych <= 'Z') goto yy46;
- goto yy4;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= '\\') goto yy1163;
+ goto yy1158;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy1164;
+ goto yy1165;
+ }
} else {
- if (yych == '`') goto yy4;
- if (yych <= 'z') goto yy46;
- goto yy4;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy1166;
+ goto yy1167;
+ } else {
+ if (yych <= 0xF3) goto yy1168;
+ if (yych <= 0xF4) goto yy1169;
+ goto yy73;
+ }
}
}
-yy267:
- yyaccept = 11;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '7') {
- if (yych <= ' ') {
+yy1249:
+ yych = *++YYCURSOR;
+ if (yych <= '=') {
+ if (yych <= 0x1F) {
+ if (yych <= '\t') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= 0x08) goto yy612;
+ goto yy1249;
+ } else {
+ if (yych == '\r') goto yy1249;
+ goto yy612;
+ }
+ } else {
+ if (yych <= '"') {
+ if (yych <= ' ') goto yy1249;
+ if (yych <= '!') goto yy612;
+ } else {
+ if (yych == '\'') goto yy1251;
+ goto yy612;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= '\\') {
+ if (yych <= '>') goto yy922;
+ if (yych <= '[') goto yy612;
+ goto yy613;
+ } else {
+ if (yych <= 0x7F) goto yy612;
+ if (yych <= 0xC1) goto yy73;
+ goto yy614;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy615;
+ if (yych <= 0xEF) goto yy616;
+ goto yy617;
+ } else {
+ if (yych <= 0xF3) goto yy618;
+ if (yych <= 0xF4) goto yy619;
+ goto yy73;
+ }
+ }
+ }
+yy1250:
+ yych = *++YYCURSOR;
+ if (yybm_bol[0+yych] & 128) {
+ goto yy1161;
+ }
+ if (yych <= 0xDF) {
+ if (yych <= '\'') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= '"') goto yy612;
+ goto yy1171;
+ } else {
+ if (yych <= '\\') goto yy1172;
+ if (yych <= 0xC1) goto yy73;
+ goto yy1173;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy1174;
+ if (yych <= 0xEF) goto yy1175;
+ goto yy1176;
+ } else {
+ if (yych <= 0xF3) goto yy1177;
+ if (yych <= 0xF4) goto yy1178;
+ goto yy73;
+ }
+ }
+yy1251:
+ yych = *++YYCURSOR;
+ if (yych <= '>') {
+ if (yych <= '!') {
if (yych <= '\f') {
- if (yych <= 0x00) goto yy109;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy109;
- goto yy4;
+ if (yych <= 0x00) goto yy73;
+ if (yych == '\t') goto yy1249;
+ goto yy612;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') goto yy109;
- goto yy4;
+ if (yych <= '\r') goto yy1249;
+ if (yych == ' ') goto yy1249;
+ goto yy612;
+ }
+ } else {
+ if (yych <= ',') {
+ if (yych <= '"') goto yy1250;
+ if (yych == '\'') goto yy454;
+ goto yy612;
+ } else {
+ if (yych <= '/') {
+ if (yych >= '.') goto yy612;
} else {
- if (yych <= 0x1B) goto yy109;
- if (yych <= 0x1F) goto yy4;
- goto yy360;
+ if (yych <= ':') goto yy1252;
+ if (yych <= '=') goto yy612;
+ goto yy922;
}
}
+ }
+ } else {
+ if (yych <= 'z') {
+ if (yych <= '\\') {
+ if (yych <= '@') goto yy612;
+ if (yych <= 'Z') goto yy1252;
+ if (yych <= '[') goto yy612;
+ goto yy613;
+ } else {
+ if (yych == '_') goto yy1252;
+ if (yych <= '`') goto yy612;
+ }
} else {
- if (yych <= '+') {
- if (yych <= '$') {
- if (yych <= '#') goto yy109;
- goto yy4;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy612;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy614;
+ goto yy615;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy616;
+ goto yy617;
} else {
- if (yych <= '%') goto yy105;
- if (yych <= '*') goto yy109;
- goto yy80;
+ if (yych <= 0xF3) goto yy618;
+ if (yych <= 0xF4) goto yy619;
+ goto yy73;
}
+ }
+ }
+ }
+yy1252:
+ yych = *++YYCURSOR;
+ if (yych <= '=') {
+ if (yych <= '!') {
+ if (yych <= '\f') {
+ if (yych <= 0x00) goto yy73;
+ if (yych == '\t') goto yy1332;
+ goto yy612;
} else {
- if (yych <= '-') {
- if (yych <= ',') goto yy109;
- goto yy361;
+ if (yych <= '\r') goto yy1332;
+ if (yych == ' ') goto yy1332;
+ goto yy612;
+ }
+ } else {
+ if (yych <= ',') {
+ if (yych <= '"') goto yy1250;
+ if (yych == '\'') goto yy1251;
+ goto yy612;
+ } else {
+ if (yych <= '/') {
+ if (yych <= '-') goto yy1252;
+ goto yy612;
} else {
- if (yych <= '.') goto yy266;
- if (yych <= '/') goto yy362;
- goto yy363;
+ if (yych <= ':') goto yy1252;
+ if (yych <= '<') goto yy612;
+ goto yy1333;
}
}
}
} else {
- if (yych <= '_') {
- if (yych <= 'D') {
- if (yych <= ':') {
- if (yych <= '9') goto yy364;
- goto yy365;
- } else {
- if (yych <= '?') goto yy109;
- if (yych <= '@') goto yy96;
- goto yy366;
- }
+ if (yych <= 'z') {
+ if (yych <= '[') {
+ if (yych <= '>') goto yy922;
+ if (yych <= '@') goto yy612;
+ if (yych <= 'Z') goto yy1252;
+ goto yy612;
} else {
- if (yych <= 'F') {
- if (yych <= 'E') goto yy367;
- goto yy366;
+ if (yych <= '^') {
+ if (yych <= '\\') goto yy613;
+ goto yy612;
} else {
- if (yych <= 'Z') goto yy115;
- if (yych <= '^') goto yy109;
- goto yy46;
+ if (yych == '`') goto yy612;
+ goto yy1252;
}
}
} else {
- if (yych <= 'z') {
- if (yych <= 'd') {
- if (yych <= '`') goto yy109;
- goto yy366;
- } else {
- if (yych <= 'e') goto yy367;
- if (yych <= 'f') goto yy366;
- goto yy115;
- }
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy612;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy614;
+ goto yy615;
} else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy109;
- goto yy4;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy616;
+ goto yy617;
} else {
- if (yych <= 0xC1) goto yy109;
- if (yych <= 0xF4) goto yy4;
- goto yy109;
+ if (yych <= 0xF3) goto yy618;
+ if (yych <= 0xF4) goto yy619;
+ goto yy73;
}
}
}
}
-yy268:
- yyaccept = 6;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '9') {
- if (yych <= ' ') {
+yy1253:
+ yych = *++YYCURSOR;
+ if (yych <= '=') {
+ if (yych <= 0x1F) {
+ if (yych <= '\t') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= 0x08) goto yy604;
+ goto yy1253;
+ } else {
+ if (yych == '\r') goto yy1253;
+ goto yy604;
+ }
+ } else {
+ if (yych <= '"') {
+ if (yych <= ' ') goto yy1253;
+ if (yych <= '!') goto yy604;
+ } else {
+ if (yych == '\'') goto yy1255;
+ goto yy604;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= '\\') {
+ if (yych <= '>') goto yy915;
+ if (yych <= '[') goto yy604;
+ goto yy605;
+ } else {
+ if (yych <= 0x7F) goto yy604;
+ if (yych <= 0xC1) goto yy73;
+ goto yy606;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy607;
+ if (yych <= 0xEF) goto yy608;
+ goto yy609;
+ } else {
+ if (yych <= 0xF3) goto yy610;
+ if (yych <= 0xF4) goto yy611;
+ goto yy73;
+ }
+ }
+ }
+yy1254:
+ yych = *++YYCURSOR;
+ if (yych <= '>') {
+ if (yych <= '!') {
if (yych <= '\f') {
- if (yych <= 0x00) goto yy26;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy26;
- goto yy4;
+ if (yych <= 0x00) goto yy73;
+ if (yych == '\t') goto yy1253;
+ goto yy604;
+ } else {
+ if (yych <= '\r') goto yy1253;
+ if (yych == ' ') goto yy1253;
+ goto yy604;
+ }
+ } else {
+ if (yych <= ',') {
+ if (yych <= '"') goto yy453;
+ if (yych != '\'') goto yy604;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') goto yy26;
- goto yy4;
+ if (yych <= '/') {
+ if (yych <= '-') goto yy1256;
+ goto yy604;
} else {
- if (yych <= 0x1B) goto yy26;
- if (yych <= 0x1F) goto yy4;
- goto yy360;
+ if (yych <= ':') goto yy1256;
+ if (yych <= '=') goto yy604;
+ goto yy915;
}
}
+ }
+ } else {
+ if (yych <= 'z') {
+ if (yych <= '\\') {
+ if (yych <= '@') goto yy604;
+ if (yych <= 'Z') goto yy1256;
+ if (yych <= '[') goto yy604;
+ goto yy605;
+ } else {
+ if (yych == '_') goto yy1256;
+ if (yych <= '`') goto yy604;
+ goto yy1256;
+ }
} else {
- if (yych <= '+') {
- if (yych <= '$') {
- if (yych <= '#') goto yy26;
- goto yy4;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy604;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy606;
+ goto yy607;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy608;
+ goto yy609;
} else {
- if (yych <= '%') goto yy105;
- if (yych <= '*') goto yy26;
- goto yy80;
+ if (yych <= 0xF3) goto yy610;
+ if (yych <= 0xF4) goto yy611;
+ goto yy73;
}
+ }
+ }
+ }
+yy1255:
+ yych = *++YYCURSOR;
+ if (yybm_bol[0+yych] & 128) {
+ goto yy1161;
+ }
+ if (yych <= 0xDF) {
+ if (yych <= '\'') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= '"') goto yy1170;
+ goto yy604;
+ } else {
+ if (yych <= '\\') goto yy1172;
+ if (yych <= 0xC1) goto yy73;
+ goto yy1173;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy1174;
+ if (yych <= 0xEF) goto yy1175;
+ goto yy1176;
+ } else {
+ if (yych <= 0xF3) goto yy1177;
+ if (yych <= 0xF4) goto yy1178;
+ goto yy73;
+ }
+ }
+yy1256:
+ yych = *++YYCURSOR;
+ if (yych <= '=') {
+ if (yych <= '!') {
+ if (yych <= '\f') {
+ if (yych <= 0x00) goto yy73;
+ if (yych == '\t') goto yy1334;
+ goto yy604;
} else {
- if (yych <= '-') {
- if (yych <= ',') goto yy26;
- goto yy361;
+ if (yych <= '\r') goto yy1334;
+ if (yych == ' ') goto yy1334;
+ goto yy604;
+ }
+ } else {
+ if (yych <= ',') {
+ if (yych <= '"') goto yy1254;
+ if (yych == '\'') goto yy1255;
+ goto yy604;
+ } else {
+ if (yych <= '/') {
+ if (yych <= '-') goto yy1256;
+ goto yy604;
} else {
- if (yych <= '.') goto yy266;
- if (yych <= '/') goto yy362;
- goto yy364;
+ if (yych <= ':') goto yy1256;
+ if (yych <= '<') goto yy604;
+ goto yy1335;
}
}
}
} else {
- if (yych <= '_') {
- if (yych <= 'D') {
- if (yych <= ':') goto yy365;
- if (yych <= '?') goto yy26;
- if (yych <= '@') goto yy96;
- goto yy366;
+ if (yych <= 'z') {
+ if (yych <= '[') {
+ if (yych <= '>') goto yy915;
+ if (yych <= '@') goto yy604;
+ if (yych <= 'Z') goto yy1256;
+ goto yy604;
} else {
- if (yych <= 'F') {
- if (yych <= 'E') goto yy367;
- goto yy366;
+ if (yych <= '^') {
+ if (yych <= '\\') goto yy605;
+ goto yy604;
} else {
- if (yych <= 'Z') goto yy115;
- if (yych <= '^') goto yy26;
- goto yy46;
+ if (yych == '`') goto yy604;
+ goto yy1256;
}
}
} else {
- if (yych <= 'z') {
- if (yych <= 'd') {
- if (yych <= '`') goto yy26;
- goto yy366;
- } else {
- if (yych <= 'e') goto yy367;
- if (yych <= 'f') goto yy366;
- goto yy115;
- }
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy604;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy606;
+ goto yy607;
} else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy26;
- goto yy4;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy608;
+ goto yy609;
} else {
- if (yych <= 0xC1) goto yy26;
- if (yych <= 0xF4) goto yy4;
- goto yy26;
+ if (yych <= 0xF3) goto yy610;
+ if (yych <= 0xF4) goto yy611;
+ goto yy73;
}
}
}
}
-yy269:
- yyaccept = 12;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '/') {
- if (yych <= 0x1F) {
+yy1257:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= ',') {
if (yych <= '\f') {
- if (yych <= 0x00) goto yy113;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy113;
- goto yy4;
+ if (yych <= 0x00) goto yy73;
+ if (yych == '\t') goto yy1257;
+ goto yy1079;
} else {
- if (yych <= '\r') goto yy113;
- if (yych == 0x1B) goto yy113;
- goto yy4;
+ if (yych <= '\r') goto yy1257;
+ if (yych == ' ') goto yy1257;
+ goto yy1079;
}
} else {
- if (yych <= '*') {
- if (yych <= '#') goto yy113;
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy80;
- goto yy113;
+ if (yych <= ':') {
+ if (yych <= '-') goto yy1179;
+ if (yych <= '.') goto yy1079;
+ if (yych <= '/') goto yy1180;
+ goto yy1179;
} else {
- if (yych <= '+') goto yy80;
- if (yych <= ',') goto yy113;
- if (yych <= '.') goto yy46;
- goto yy4;
+ if (yych <= '=') goto yy1079;
+ if (yych <= '>') goto yy1181;
+ if (yych <= '?') goto yy1180;
+ goto yy1079;
}
}
} else {
- if (yych <= '_') {
- if (yych <= '@') {
- if (yych <= '9') goto yy366;
- if (yych <= ':') goto yy365;
- if (yych <= '?') goto yy113;
- goto yy96;
+ if (yych <= 0x7F) {
+ if (yych <= '^') {
+ if (yych <= 'Z') goto yy1179;
+ if (yych == '\\') goto yy1182;
+ goto yy1079;
} else {
- if (yych <= 'F') goto yy366;
- if (yych <= 'Z') goto yy115;
- if (yych <= '^') goto yy113;
- goto yy46;
+ if (yych == '`') goto yy1079;
+ if (yych <= 'z') goto yy1179;
+ goto yy1079;
}
} else {
- if (yych <= '~') {
- if (yych <= '`') goto yy113;
- if (yych <= 'f') goto yy366;
- if (yych <= 'z') goto yy115;
- goto yy113;
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy1183;
+ if (yych <= 0xE0) goto yy1184;
+ goto yy1185;
} else {
- if (yych <= 0x7F) goto yy4;
- if (yych <= 0xC1) goto yy113;
- if (yych <= 0xF4) goto yy4;
- goto yy113;
+ if (yych <= 0xF0) goto yy1186;
+ if (yych <= 0xF3) goto yy1187;
+ if (yych <= 0xF4) goto yy1188;
+ goto yy73;
}
}
}
-yy270:
- yyaccept = 12;
+yy1258:
+ yyaccept = 40;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '.') {
- if (yych <= 0x1F) {
+ if (yych <= 0x7F) {
+ if (yych <= '&') {
+ if (yych <= 0x00) goto yy463;
+ if (yych == '"') goto yy1260;
+ } else {
+ if (yych <= '\'') goto yy1261;
+ if (yych == '\\') goto yy1262;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy463;
+ if (yych <= 0xDF) goto yy1263;
+ if (yych <= 0xE0) goto yy1264;
+ goto yy1265;
+ } else {
+ if (yych <= 0xF0) goto yy1266;
+ if (yych <= 0xF3) goto yy1267;
+ if (yych <= 0xF4) goto yy1268;
+ goto yy463;
+ }
+ }
+yy1259:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) {
+ if (yych <= '&') {
+ if (yych <= 0x00) goto yy73;
+ if (yych != '"') goto yy1259;
+ } else {
+ if (yych <= '\'') goto yy1261;
+ if (yych == '\\') goto yy1262;
+ goto yy1259;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy1263;
+ if (yych <= 0xE0) goto yy1264;
+ goto yy1265;
+ } else {
+ if (yych <= 0xF0) goto yy1266;
+ if (yych <= 0xF3) goto yy1267;
+ if (yych <= 0xF4) goto yy1268;
+ goto yy73;
+ }
+ }
+yy1260:
+ yych = *++YYCURSOR;
+ if (yych <= '?') {
+ if (yych <= '&') {
if (yych <= '\f') {
- if (yych <= 0x00) goto yy113;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy113;
- goto yy4;
+ if (yych <= 0x00) goto yy73;
+ if (yych == '\t') goto yy1336;
+ goto yy942;
} else {
- if (yych <= '\r') goto yy113;
- if (yych == 0x1B) goto yy113;
- goto yy4;
+ if (yych <= '\r') goto yy1336;
+ if (yych == ' ') goto yy1336;
+ goto yy942;
}
} else {
- if (yych <= '*') {
- if (yych <= '#') goto yy113;
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy80;
- goto yy113;
+ if (yych <= '.') {
+ if (yych <= '\'') goto yy932;
+ if (yych == '-') goto yy1337;
+ goto yy942;
} else {
- if (yych <= '+') goto yy194;
- if (yych <= ',') goto yy113;
- if (yych <= '-') goto yy251;
- goto yy46;
+ if (yych <= ':') {
+ if (yych <= '/') goto yy1338;
+ goto yy1337;
+ } else {
+ if (yych <= '=') goto yy942;
+ if (yych <= '>') goto yy802;
+ goto yy1338;
+ }
}
}
} else {
- if (yych <= '^') {
- if (yych <= '?') {
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy366;
- if (yych <= ':') goto yy365;
- goto yy113;
+ if (yych <= 'z') {
+ if (yych <= '\\') {
+ if (yych <= '@') goto yy942;
+ if (yych <= 'Z') goto yy1337;
+ if (yych <= '[') goto yy942;
+ goto yy943;
} else {
- if (yych <= '@') goto yy96;
- if (yych <= 'F') goto yy366;
- if (yych <= 'Z') goto yy115;
- goto yy113;
+ if (yych == '_') goto yy1337;
+ if (yych <= '`') goto yy942;
+ goto yy1337;
}
} else {
- if (yych <= 'z') {
- if (yych <= '_') goto yy46;
- if (yych <= '`') goto yy113;
- if (yych <= 'f') goto yy366;
- goto yy115;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy942;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy944;
+ goto yy945;
} else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy113;
- goto yy4;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy946;
+ goto yy947;
} else {
- if (yych <= 0xC1) goto yy113;
- if (yych <= 0xF4) goto yy4;
- goto yy113;
+ if (yych <= 0xF3) goto yy948;
+ if (yych <= 0xF4) goto yy949;
+ goto yy73;
}
}
}
}
-yy271:
- yych = *++YYCURSOR;
- if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy368;
- if (yych <= ':') goto yy282;
- goto yy1;
- } else {
- if (yych <= 'F') goto yy369;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy369;
- goto yy1;
- }
-yy272:
+yy1261:
yych = *++YYCURSOR;
- if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy369;
- if (yych <= ':') goto yy282;
- goto yy1;
+ if (yych <= '?') {
+ if (yych <= '!') {
+ if (yych <= '\f') {
+ if (yych <= 0x00) goto yy73;
+ if (yych == '\t') goto yy1339;
+ goto yy931;
+ } else {
+ if (yych <= '\r') goto yy1339;
+ if (yych == ' ') goto yy1339;
+ goto yy931;
+ }
+ } else {
+ if (yych <= '.') {
+ if (yych <= '"') goto yy932;
+ if (yych == '-') goto yy1340;
+ goto yy931;
+ } else {
+ if (yych <= ':') {
+ if (yych <= '/') goto yy1341;
+ goto yy1340;
+ } else {
+ if (yych <= '=') goto yy931;
+ if (yych <= '>') goto yy792;
+ goto yy1341;
+ }
+ }
+ }
} else {
- if (yych <= 'F') goto yy369;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy369;
- goto yy1;
+ if (yych <= 'z') {
+ if (yych <= '\\') {
+ if (yych <= '@') goto yy931;
+ if (yych <= 'Z') goto yy1340;
+ if (yych <= '[') goto yy931;
+ goto yy933;
+ } else {
+ if (yych == '_') goto yy1340;
+ if (yych <= '`') goto yy931;
+ goto yy1340;
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy931;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy934;
+ goto yy935;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy936;
+ goto yy937;
+ } else {
+ if (yych <= 0xF3) goto yy938;
+ if (yych <= 0xF4) goto yy939;
+ goto yy73;
+ }
+ }
+ }
}
-yy273:
+yy1262:
yych = *++YYCURSOR;
-yy274:
- if (yybm[256+yych] & 1) {
- goto yy273;
- }
- if (yych <= 0xC1) {
- if (yych <= ')') {
- if (yych <= '"') goto yy1;
- if (yych <= '&') goto yy370;
- goto yy1;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 0x00) goto yy73;
+ goto yy1259;
} else {
- if (yych <= 'Z') goto yy370;
- if (yych <= ']') goto yy1;
- if (yych <= 'z') goto yy370;
- goto yy1;
+ if (yych <= 0xC1) goto yy73;
+ if (yych >= 0xE0) goto yy1264;
}
} else {
- if (yych <= 0xEF) {
- if (yych <= 0xDF) goto yy275;
- if (yych <= 0xE0) goto yy276;
- goto yy277;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy1265;
+ goto yy1266;
} else {
- if (yych <= 0xF0) goto yy278;
- if (yych <= 0xF3) goto yy279;
- if (yych <= 0xF4) goto yy280;
- goto yy1;
+ if (yych <= 0xF3) goto yy1267;
+ if (yych <= 0xF4) goto yy1268;
+ goto yy73;
}
}
-yy275:
+yy1263:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy273;
- goto yy1;
-yy276:
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy1259;
+ goto yy73;
+yy1264:
yych = *++YYCURSOR;
- if (yych <= 0x9F) goto yy1;
- if (yych <= 0xBF) goto yy275;
- goto yy1;
-yy277:
+ if (yych <= 0x9F) goto yy73;
+ if (yych <= 0xBF) goto yy1263;
+ goto yy73;
+yy1265:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy275;
- goto yy1;
-yy278:
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy1263;
+ goto yy73;
+yy1266:
yych = *++YYCURSOR;
- if (yych <= 0x8F) goto yy1;
- if (yych <= 0xBF) goto yy277;
- goto yy1;
-yy279:
+ if (yych <= 0x8F) goto yy73;
+ if (yych <= 0xBF) goto yy1265;
+ goto yy73;
+yy1267:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy277;
- goto yy1;
-yy280:
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy1265;
+ goto yy73;
+yy1268:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0x8F) goto yy277;
- goto yy1;
-yy281:
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0x8F) goto yy1265;
+ goto yy73;
+yy1269:
yych = *++YYCURSOR;
- if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy372;
- if (yych <= ':') goto yy373;
- goto yy1;
+ if (yych <= '=') {
+ if (yych <= '"') {
+ if (yych <= '\f') {
+ if (yych <= 0x00) goto yy73;
+ if (yych == '\t') goto yy1269;
+ goto yy1189;
+ } else {
+ if (yych <= 0x1F) {
+ if (yych <= '\r') goto yy1269;
+ goto yy1189;
+ } else {
+ if (yych <= ' ') goto yy1269;
+ if (yych <= '!') goto yy1189;
+ goto yy814;
+ }
+ }
+ } else {
+ if (yych <= '-') {
+ if (yych == '\'') goto yy813;
+ if (yych <= ',') goto yy1189;
+ goto yy1269;
+ } else {
+ if (yych <= '/') {
+ if (yych <= '.') goto yy1189;
+ } else {
+ if (yych <= ':') goto yy1269;
+ if (yych <= '<') goto yy1189;
+ goto yy1342;
+ }
+ }
+ }
} else {
- if (yych <= 'F') goto yy372;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy372;
- goto yy1;
+ if (yych <= '`') {
+ if (yych <= 'Z') {
+ if (yych <= '>') goto yy1271;
+ if (yych <= '?') goto yy1270;
+ if (yych <= '@') goto yy1189;
+ goto yy1269;
+ } else {
+ if (yych <= '\\') {
+ if (yych <= '[') goto yy1189;
+ goto yy1272;
+ } else {
+ if (yych == '_') goto yy1269;
+ goto yy1189;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy1269;
+ goto yy1189;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy1273;
+ goto yy1274;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy1275;
+ goto yy1276;
+ } else {
+ if (yych <= 0xF3) goto yy1277;
+ if (yych <= 0xF4) goto yy1278;
+ goto yy73;
+ }
+ }
+ }
}
-yy282:
+yy1270:
yych = *++YYCURSOR;
- if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy374;
- if (yych <= ':') goto yy375;
- goto yy1;
+ if (yych <= 'Z') {
+ if (yych <= '-') {
+ if (yych <= '"') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= '!') goto yy1189;
+ goto yy814;
+ } else {
+ if (yych == '\'') goto yy813;
+ if (yych <= ',') goto yy1189;
+ goto yy1269;
+ }
+ } else {
+ if (yych <= '=') {
+ if (yych <= '.') goto yy1189;
+ if (yych <= '/') goto yy1270;
+ if (yych <= ':') goto yy1269;
+ goto yy1189;
+ } else {
+ if (yych <= '>') goto yy1343;
+ if (yych <= '?') goto yy1270;
+ if (yych <= '@') goto yy1189;
+ goto yy1269;
+ }
+ }
} else {
- if (yych <= 'F') goto yy374;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy374;
- goto yy1;
+ if (yych <= 0x7F) {
+ if (yych <= '^') {
+ if (yych == '\\') goto yy1272;
+ goto yy1189;
+ } else {
+ if (yych == '`') goto yy1189;
+ if (yych <= 'z') goto yy1269;
+ goto yy1189;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy1273;
+ if (yych <= 0xE0) goto yy1274;
+ goto yy1275;
+ } else {
+ if (yych <= 0xF0) goto yy1276;
+ if (yych <= 0xF3) goto yy1277;
+ if (yych <= 0xF4) goto yy1278;
+ goto yy73;
+ }
+ }
}
-yy283:
+yy1271:
yych = *++YYCURSOR;
- if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy372;
- if (yych <= ':') goto yy282;
- goto yy1;
+ if (yych <= 0x7F) {
+ if (yych <= '&') {
+ if (yych <= 0x00) goto yy73;
+ if (yych == '"') goto yy1344;
+ goto yy1271;
+ } else {
+ if (yych <= '\'') goto yy1345;
+ if (yych == '\\') goto yy1346;
+ goto yy1271;
+ }
} else {
- if (yych <= 'F') goto yy372;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy372;
- goto yy1;
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy1347;
+ if (yych <= 0xE0) goto yy1348;
+ goto yy1349;
+ } else {
+ if (yych <= 0xF0) goto yy1350;
+ if (yych <= 0xF3) goto yy1351;
+ if (yych <= 0xF4) goto yy1352;
+ goto yy73;
+ }
}
-yy284:
- yyaccept = 17;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= ',') {
- if (yych <= '\r') {
- if (yych <= 0x08) {
- if (yych <= 0x00) goto yy199;
- goto yy4;
+yy1272:
+ yych = *++YYCURSOR;
+ if (yych <= '^') {
+ if (yych <= ':') {
+ if (yych <= '-') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= ',') goto yy1189;
+ goto yy1269;
} else {
- if (yych <= '\n') goto yy199;
- if (yych <= '\f') goto yy4;
- goto yy199;
+ if (yych <= '.') goto yy1189;
+ if (yych <= '/') goto yy1270;
+ goto yy1269;
}
} else {
- if (yych <= 0x1F) {
- if (yych == 0x1B) goto yy199;
- goto yy4;
+ if (yych <= '?') {
+ if (yych <= '=') goto yy1189;
+ if (yych <= '>') goto yy1271;
+ goto yy1270;
} else {
- if (yych == '$') goto yy4;
- goto yy199;
+ if (yych <= '@') goto yy1189;
+ if (yych <= 'Z') goto yy1269;
+ goto yy1189;
}
}
} else {
- if (yych <= '`') {
- if (yych <= 'Z') {
- if (yych <= ':') goto yy4;
- if (yych <= '?') goto yy199;
- goto yy4;
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych == '`') goto yy1189;
+ goto yy1269;
} else {
- if (yych == '_') goto yy4;
- goto yy199;
+ if (yych <= 0x7F) goto yy1189;
+ if (yych <= 0xC1) goto yy73;
}
} else {
- if (yych <= 0x7F) {
- if (yych <= 'z') goto yy4;
- if (yych <= '~') goto yy199;
- goto yy4;
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy1274;
+ if (yych <= 0xEF) goto yy1275;
+ goto yy1276;
} else {
- if (yych <= 0xC1) goto yy199;
- if (yych <= 0xF4) goto yy4;
- goto yy199;
+ if (yych <= 0xF3) goto yy1277;
+ if (yych <= 0xF4) goto yy1278;
+ goto yy73;
}
}
}
-yy285:
- yyaccept = 0;
+yy1273:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy1189;
+ goto yy73;
+yy1274:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy73;
+ if (yych <= 0xBF) goto yy1273;
+ goto yy73;
+yy1275:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy1273;
+ goto yy73;
+yy1276:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy73;
+ if (yych <= 0xBF) goto yy1275;
+ goto yy73;
+yy1277:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy1275;
+ goto yy73;
+yy1278:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0x8F) goto yy1275;
+ goto yy73;
+yy1279:
+ yych = *++YYCURSOR;
+ if (yych == ',') goto yy1353;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1279;
+ goto yy73;
+yy1280:
+ yyaccept = 14;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '?') {
- if (yych <= 0x1F) {
- if (yych <= '\f') {
- if (yych <= 0x00) {
+ if (yych <= '@') {
+ if (yych <= '/') goto yy337;
+ if (yych <= '9') goto yy1354;
+ goto yy337;
+ } else {
+ if (yych <= 'F') goto yy1354;
+ if (yych <= '`') goto yy337;
+ if (yych <= 'f') goto yy1301;
+ goto yy337;
+ }
+yy1281:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '^') {
+ if (yych <= '/') {
+ if (yych <= ',') {
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy1026;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy656;
}
- if (yych <= 0x08) {
+ if (yych <= '.') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy663;
}
- if (yych <= '\n') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ } else {
+ if (yych <= '?') {
+ if (yych <= '9') goto yy481;
+ if (yych <= ':') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1104;
}
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy305;
} else {
- if (yych <= '\r') {
+ if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy565;
}
- if (yych == 0x1B) {
+ if (yych <= 'Z') goto yy481;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= '_') {
+ yyt2 = YYCURSOR;
+ goto yy483;
+ }
+ if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
}
+ goto yy481;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy39;
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy313;
}
} else {
- if (yych <= '-') {
- if (yych == '$') {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy314;
}
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy39;
+ }
+ }
+ }
+yy1282:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '_') {
+ if (yych <= '9') {
+ if (yych <= '-') {
if (yych <= ',') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
}
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy656;
} else {
+ if (yych <= '.') {
+ yyt2 = YYCURSOR;
+ goto yy663;
+ }
if (yych <= '/') {
- if (yych <= '.') {
- yyt2 = YYCURSOR;
- goto yy376;
- }
yyt2 = YYCURSOR;
- goto yy284;
- } else {
- if (yych <= '9') goto yy377;
- if (yych <= ':') goto yy378;
+ goto yy565;
+ }
+ goto yy1355;
+ }
+ } else {
+ if (yych <= '@') {
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1356;
+ }
+ if (yych <= '?') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt2 = YYCURSOR;
+ goto yy565;
+ } else {
+ if (yych <= 'Z') goto yy481;
+ if (yych <= '^') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
}
+ yyt2 = YYCURSOR;
+ goto yy483;
}
}
} else {
- if (yych <= '~') {
- if (yych <= '^') {
- if (yych <= '@') {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy305;
}
- if (yych <= 'F') goto yy379;
- if (yych <= 'Z') goto yy3;
+ goto yy481;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy39;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy313;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
} else {
- if (yych <= '`') {
- if (yych <= '_') {
- yyt2 = YYCURSOR;
- goto yy284;
- }
+ if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy198;
- } else {
- if (yych <= 'f') goto yy379;
- if (yych <= 'z') goto yy3;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy39;
+ }
+ }
+ }
+yy1283:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '_') {
+ if (yych <= '9') {
+ if (yych <= '-') {
+ if (yych <= ',') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
}
+ yyt2 = YYCURSOR;
+ goto yy656;
+ } else {
+ if (yych <= '.') {
+ yyt2 = YYCURSOR;
+ goto yy663;
+ }
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ goto yy1282;
}
} else {
- if (yych <= 0xE0) {
+ if (yych <= '@') {
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1356;
+ }
+ if (yych <= '?') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt2 = YYCURSOR;
+ goto yy565;
+ } else {
+ if (yych <= 'Z') goto yy481;
+ if (yych <= '^') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt2 = YYCURSOR;
+ goto yy483;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy481;
+ } else {
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy305;
}
- if (yych <= 0xC1) goto yy5;
- if (yych <= 0xDF) {
+ if (yych <= 0xC1) goto yy39;
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy289;
+ goto yy315;
}
yyt2 = YYCURSOR;
- goto yy290;
+ goto yy316;
} else {
- if (yych <= 0xF0) {
- if (yych <= 0xEF) {
- yyt2 = YYCURSOR;
- goto yy291;
- }
+ if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy292;
- } else {
- if (yych <= 0xF3) {
- yyt2 = YYCURSOR;
- goto yy293;
- }
- if (yych <= 0xF4) {
- yyt2 = YYCURSOR;
- goto yy294;
- }
- goto yy5;
+ goto yy317;
}
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy39;
}
}
}
-yy286:
- yyaccept = 0;
+yy1284:
+ yyaccept = 7;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '?') {
- if (yych <= 0x1F) {
- if (yych <= '\f') {
- if (yych <= 0x00) {
+ if (yych <= '^') {
+ if (yych <= '5') {
+ if (yych <= '.') {
+ if (yych <= ',') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
}
- if (yych <= 0x08) {
+ if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy656;
}
- if (yych <= '\n') {
+ yyt2 = YYCURSOR;
+ goto yy663;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ if (yych <= '4') goto yy1282;
+ goto yy1357;
+ }
+ } else {
+ if (yych <= '?') {
+ if (yych <= '9') goto yy1355;
+ if (yych <= ':') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1356;
}
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy305;
} else {
- if (yych <= '\r') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ if (yych <= 'Z') goto yy481;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= '_') {
+ yyt2 = YYCURSOR;
+ goto yy483;
+ }
+ if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
}
- if (yych == 0x1B) {
+ goto yy481;
+ } else {
+ if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
}
+ if (yych <= 0xC1) goto yy39;
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy313;
}
} else {
- if (yych <= '-') {
- if (yych == '$') {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy314;
}
- if (yych <= ',') {
+ if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy315;
}
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy316;
} else {
- if (yych <= '/') {
- if (yych <= '.') {
- yyt2 = YYCURSOR;
- goto yy376;
- }
+ if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy284;
- } else {
- if (yych <= '9') goto yy380;
- if (yych <= ':') goto yy378;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy318;
}
+ goto yy39;
+ }
+ }
+ }
+yy1285:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1358;
+ goto yy73;
+yy1286:
+ yych = *++YYCURSOR;
+ if (yych == ' ') goto yy1359;
+ goto yy73;
+yy1287:
+ yych = *++YYCURSOR;
+ if (yych <= 0xDF) {
+ if (yych <= ':') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy987;
+ }
+ if (yych <= '9') {
+ yyt1 = YYCURSOR;
+ goto yy1360;
+ }
+ goto yy73;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy987;
}
+ if (yych <= 0xC1) goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy990;
}
} else {
- if (yych <= '~') {
- if (yych <= '^') {
- if (yych <= '@') {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy991;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy992;
+ }
+ yyt2 = YYCURSOR;
+ goto yy993;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy994;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy995;
+ }
+ goto yy73;
+ }
+ }
+yy1288:
+ yych = *++YYCURSOR;
+yy1289:
+ if (yych <= 0xDF) {
+ if (yych <= '\n') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= '\t') goto yy1288;
+ goto yy1361;
+ } else {
+ if (yych <= 0x7F) goto yy1288;
+ if (yych <= 0xC1) goto yy73;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy1291;
+ if (yych <= 0xEF) goto yy1292;
+ goto yy1293;
+ } else {
+ if (yych <= 0xF3) goto yy1294;
+ if (yych <= 0xF4) goto yy1295;
+ goto yy73;
+ }
+ }
+yy1290:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy1288;
+ goto yy73;
+yy1291:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy73;
+ if (yych <= 0xBF) goto yy1290;
+ goto yy73;
+yy1292:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy1290;
+ goto yy73;
+yy1293:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy73;
+ if (yych <= 0xBF) goto yy1292;
+ goto yy73;
+yy1294:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy1292;
+ goto yy73;
+yy1295:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0x8F) goto yy1292;
+ goto yy73;
+yy1296:
+ yych = *++YYCURSOR;
+ if (yych == 'l') goto yy1362;
+ goto yy73;
+yy1297:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1363;
+ goto yy73;
+yy1298:
+ yych = *++YYCURSOR;
+ if (yych == ':') goto yy1364;
+ goto yy73;
+yy1299:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == ':') goto yy1365;
+ goto yy138;
+yy1300:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == ':') goto yy1365;
+ goto yy278;
+yy1301:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy138;
+ if (yych <= '9') goto yy1366;
+ goto yy138;
+ } else {
+ if (yych <= 'F') goto yy1366;
+ if (yych <= '`') goto yy138;
+ if (yych <= 'f') goto yy1366;
+ goto yy138;
+ }
+yy1302:
+ yyaccept = 12;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ if (yych <= '7') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy119;
+ if (yych <= '*') goto yy125;
+ goto yy297;
+ } else {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy125;
+ goto yy297;
+ } else {
+ if (yych <= '.') goto yy409;
+ if (yych <= '/') goto yy297;
+ goto yy1367;
+ }
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '9') goto yy1368;
+ if (yych <= ':') goto yy297;
+ if (yych <= '?') goto yy125;
+ goto yy297;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy125;
+ goto yy297;
+ } else {
+ if (yych <= '`') goto yy125;
+ if (yych <= 'z') goto yy297;
+ goto yy125;
+ }
+ }
+ }
+yy1303:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ if (yych <= '-') {
+ if (yych == '%') goto yy119;
+ goto yy297;
+ } else {
+ if (yych <= '.') goto yy409;
+ if (yych <= '/') goto yy297;
+ if (yych <= '9') goto yy1368;
+ goto yy297;
+ }
+yy1304:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '%') {
+ if (yych <= '$') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt1 = YYCURSOR;
+ goto yy1026;
+ } else {
+ if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy305;
}
- if (yych <= 'F') goto yy379;
- if (yych <= 'Z') goto yy3;
+ if (yych <= '9') goto yy1369;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1214;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1369;
} else {
+ if (yych <= 'Z') goto yy73;
if (yych <= '`') {
- if (yych <= '_') {
- yyt2 = YYCURSOR;
- goto yy284;
- }
yyt2 = YYCURSOR;
- goto yy198;
- } else {
- if (yych <= 'f') goto yy379;
- if (yych <= 'z') goto yy3;
+ goto yy305;
+ }
+ goto yy1369;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy313;
}
+ yyt2 = YYCURSOR;
+ goto yy314;
}
} else {
- if (yych <= 0xE0) {
- if (yych <= 0x7F) {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy317;
}
- if (yych <= 0xC1) goto yy5;
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy1305:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '%') {
+ if (yych <= '$') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt1 = YYCURSOR;
+ goto yy1026;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1370;
+ yyt2 = YYCURSOR;
+ goto yy1371;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1370;
+ } else {
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1370;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 0xC1) goto yy73;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy289;
+ goto yy313;
}
yyt2 = YYCURSOR;
- goto yy290;
+ goto yy314;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
} else {
- if (yych <= 0xF0) {
- if (yych <= 0xEF) {
- yyt2 = YYCURSOR;
- goto yy291;
- }
+ if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy292;
- } else {
- if (yych <= 0xF3) {
- yyt2 = YYCURSOR;
- goto yy293;
- }
- if (yych <= 0xF4) {
- yyt2 = YYCURSOR;
- goto yy294;
- }
- goto yy5;
+ goto yy317;
}
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
}
}
}
-yy287:
- yyaccept = 0;
+yy1306:
+ yyaccept = 32;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ':') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy544;
+ goto yy713;
+ } else {
+ if (yych <= '/') goto yy544;
+ if (yych <= '9') goto yy1133;
+ goto yy1372;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy544;
+ goto yy1133;
+ } else {
+ if (yych <= '`') goto yy544;
+ if (yych <= 'f') goto yy1133;
+ goto yy544;
+ }
+ }
+yy1307:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1373;
+ if (yych <= ':') goto yy1218;
+ goto yy73;
+ } else {
+ if (yych <= 'F') goto yy1373;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy1373;
+ goto yy73;
+ }
+yy1308:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1374;
+ if (yych <= ':') goto yy1375;
+ goto yy73;
+ } else {
+ if (yych <= 'F') goto yy1374;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy1374;
+ goto yy73;
+ }
+yy1309:
+ yych = *++YYCURSOR;
+ if (yych <= 'z') {
+ if (yych <= '@') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1376;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy310;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= 'F') goto yy1376;
+ goto yy73;
+ } else {
+ if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
}
- if (yych <= 0x08) {
+ if (yych <= 'f') goto yy1376;
+ goto yy73;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy315;
}
- if (yych <= '\n') {
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy317;
}
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy1310:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt4 = YYCURSOR;
+ goto yy867;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1377;
yyt2 = YYCURSOR;
- goto yy284;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1377;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') {
- yyt2 = YYCURSOR;
- goto yy198;
- }
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy284;
- } else {
- if (yych <= 0x1B) {
- yyt2 = YYCURSOR;
- goto yy198;
- }
- if (yych <= 0x1F) {
- yyt2 = YYCURSOR;
- goto yy284;
- }
+ goto yy305;
+ }
+ goto yy1377;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy313;
}
+ yyt2 = YYCURSOR;
+ goto yy314;
}
} else {
- if (yych <= '.') {
- if (yych <= '$') {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy315;
}
- if (yych <= ',') {
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy317;
}
- if (yych <= '-') {
+ if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy318;
}
+ goto yy73;
+ }
+ }
+ }
+yy1311:
+ yych = *++YYCURSOR;
+ if (yych <= '9') {
+ if (yych == ' ') goto yy305;
+ if (yych <= '/') goto yy73;
+ goto yy1376;
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy73;
+ goto yy1376;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy1376;
+ goto yy73;
+ }
+ }
+yy1312:
+ yych = *++YYCURSOR;
+ if (yych <= 'z') {
+ if (yych <= '@') {
+ if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy376;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1377;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1311;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= 'F') goto yy1377;
+ goto yy73;
} else {
- if (yych <= '4') {
- if (yych <= '/') {
- yyt2 = YYCURSOR;
- goto yy284;
- }
- goto yy380;
- } else {
- if (yych <= '5') goto yy381;
- if (yych <= '9') goto yy377;
- goto yy378;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
+ if (yych <= 'f') goto yy1377;
+ goto yy73;
}
}
} else {
- if (yych <= 'z') {
- if (yych <= 'Z') {
- if (yych <= '?') {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy1313:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
}
+ yyt4 = YYCURSOR;
+ goto yy867;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1378;
+ yyt2 = YYCURSOR;
+ goto yy1311;
+ }
+ } else {
+ if (yych <= 'F') {
if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy305;
}
- if (yych <= 'F') goto yy379;
- goto yy3;
+ goto yy1377;
} else {
- if (yych <= '_') {
- if (yych <= '^') {
- yyt2 = YYCURSOR;
- goto yy198;
- }
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy284;
- } else {
- if (yych <= '`') {
- yyt2 = YYCURSOR;
- goto yy198;
- }
- if (yych <= 'f') goto yy379;
- goto yy3;
+ goto yy305;
}
+ goto yy1377;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
}
} else {
- if (yych <= 0xE0) {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy1314:
+ yych = *++YYCURSOR;
+ if (yych <= '`') {
+ if (yych <= '9') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt4 = YYCURSOR;
+ goto yy867;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '5') goto yy1378;
+ goto yy1377;
+ }
+ } else {
+ if (yych <= '@') {
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1311;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'F') goto yy1377;
+ if (yych <= 'Z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= 'f') goto yy1377;
+ goto yy73;
+ } else {
if (yych <= 0x7F) {
- if (yych <= '~') {
- yyt2 = YYCURSOR;
- goto yy198;
- }
yyt2 = YYCURSOR;
- goto yy284;
- } else {
- if (yych <= 0xC1) goto yy5;
- if (yych <= 0xDF) {
- yyt2 = YYCURSOR;
- goto yy289;
- }
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy290;
+ goto yy314;
}
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
} else {
- if (yych <= 0xF0) {
- if (yych <= 0xEF) {
- yyt2 = YYCURSOR;
- goto yy291;
- }
+ if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy292;
- } else {
- if (yych <= 0xF3) {
- yyt2 = YYCURSOR;
- goto yy293;
- }
- if (yych <= 0xF4) {
- yyt2 = YYCURSOR;
- goto yy294;
- }
- goto yy5;
+ goto yy317;
}
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
}
}
}
-yy288:
- yyaccept = 0;
+yy1315:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) {
+ if (yych <= '@') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy73;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1137;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ yyt2 = YYCURSOR;
+ goto yy315;
+ } else {
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy316;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+yy1316:
+ yyaccept = 14;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '@') {
- if (yych <= 0x1F) {
- if (yych <= '\f') {
- if (yych <= 0x00) {
+ if (yych <= '`') {
+ if (yych <= '?') {
+ if (yych <= '/') {
+ if (yych <= ',') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
}
- if (yych <= 0x08) {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ } else {
+ if (yych <= '9') goto yy277;
+ if (yych >= ';') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy305;
}
- if (yych <= '\n') {
+ yyt2 = YYCURSOR;
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy565;
}
- yyt2 = YYCURSOR;
- goto yy284;
+ goto yy277;
} else {
- if (yych <= '\r') {
+ if (yych == '_') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy431;
}
- if (yych == 0x1B) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy277;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 0xC1) goto yy133;
+ if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy313;
}
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy314;
}
} else {
- if (yych <= '/') {
- if (yych == '$') {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy318;
}
+ goto yy133;
+ }
+ }
+ }
+yy1317:
+ yych = *++YYCURSOR;
+ if (yych == ' ') goto yy305;
+ if (yych == ':') goto yy123;
+ goto yy73;
+yy1318:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '_') {
+ if (yych <= ':') {
+ if (yych <= '/') {
if (yych <= ',') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
}
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy565;
} else {
- if (yych <= '9') goto yy379;
- if (yych <= ':') goto yy378;
+ if (yych <= '5') goto yy1316;
+ if (yych <= '9') goto yy277;
+ yyt2 = YYCURSOR;
+ goto yy1317;
+ }
+ } else {
+ if (yych <= '@') {
if (yych <= '?') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
}
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy565;
+ } else {
+ if (yych <= 'Z') goto yy277;
+ if (yych <= '^') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt2 = YYCURSOR;
+ goto yy431;
}
}
} else {
- if (yych <= '~') {
- if (yych <= '_') {
- if (yych <= 'F') goto yy379;
- if (yych <= 'Z') goto yy3;
- if (yych <= '^') {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy277;
+ } else {
+ if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
}
+ if (yych <= 0xC1) goto yy133;
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy313;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy133;
+ }
+ }
+ }
+yy1319:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ switch (yych) {
+ case '%': goto yy119;
+ case '+':
+ case '-':
+ case '/':
+ case ':':
+ case '@':
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy297;
+ case '.': goto yy443;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy1379;
+ case 'B':
+ case 'b': goto yy1147;
+ case 'E':
+ case 'e': goto yy1148;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy132;
+ case 'S':
+ case 's': goto yy136;
+ case 'm': goto yy139;
+ case 'p':
+ case 'u': goto yy140;
+ default: goto yy24;
+ }
+yy1320:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ switch (yych) {
+ case '%':
+ case '+':
+ case '-':
+ case '.':
+ case '/':
+ case ':':
+ case '@':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy138;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy1380;
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'E':
+ case 'F':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'e':
+ case 'f': goto yy1366;
+ case 'B':
+ case 'b': goto yy1381;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy590;
+ case 'S':
+ case 's': goto yy591;
+ case 'm': goto yy592;
+ case 'p':
+ case 'u': goto yy593;
+ default: goto yy24;
+ }
+yy1321:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '?') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy138;
+ if (yych <= '*') goto yy24;
+ goto yy138;
+ } else {
+ if (yych <= '/') {
+ if (yych <= ',') goto yy24;
+ goto yy138;
+ } else {
+ if (yych <= '9') goto yy1366;
+ if (yych <= ':') goto yy138;
+ goto yy24;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') goto yy138;
+ if (yych <= 'F') goto yy1366;
+ if (yych <= 'Z') goto yy138;
+ goto yy24;
+ } else {
+ if (yych <= '`') {
+ if (yych <= '_') goto yy138;
+ goto yy24;
+ } else {
+ if (yych <= 'f') goto yy1366;
+ if (yych <= 'z') goto yy138;
+ goto yy24;
+ }
+ }
+ }
+yy1322:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt1 = YYCURSOR;
+ goto yy444;
} else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1047;
+ yyt2 = YYCURSOR;
+ goto yy878;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1047;
+ } else {
+ if (yych <= 'Z') goto yy73;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
+ }
+ goto yy1047;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
}
- if (yych <= 'f') goto yy379;
- if (yych <= 'z') goto yy3;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy314;
}
} else {
- if (yych <= 0xE0) {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy1323:
+ yych = *++YYCURSOR;
+ if (yych <= '2') {
+ if (yych <= '/') {
+ if (yych == ' ') goto yy305;
+ goto yy73;
+ } else {
+ if (yych <= '0') goto yy1382;
+ if (yych <= '1') goto yy1383;
+ goto yy1384;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '9') goto yy1385;
+ if (yych <= '@') goto yy73;
+ goto yy1041;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy1041;
+ goto yy73;
+ }
+ }
+yy1324:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt1 = YYCURSOR;
+ goto yy444;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1386;
+ yyt2 = YYCURSOR;
+ goto yy878;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1047;
+ } else {
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1047;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy1325:
+ yych = *++YYCURSOR;
+ if (yych <= '`') {
+ if (yych <= '9') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt1 = YYCURSOR;
+ goto yy444;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '5') goto yy1386;
+ goto yy1047;
+ }
+ } else {
+ if (yych <= '@') {
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy878;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'F') goto yy1047;
+ if (yych <= 'Z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= 'f') goto yy1047;
+ goto yy73;
+ } else {
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy305;
}
- if (yych <= 0xC1) goto yy5;
- if (yych >= 0xE0) {
+ if (yych <= 0xC1) goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy290;
+ goto yy314;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
}
yyt2 = YYCURSOR;
+ goto yy316;
} else {
- if (yych <= 0xF0) {
- if (yych <= 0xEF) {
- yyt2 = YYCURSOR;
- goto yy291;
- }
+ if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy292;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy1326:
+ yych = *++YYCURSOR;
+ if (yych <= ',') {
+ if (yych <= ' ') {
+ if (yych <= '\t') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= 0x08) goto yy759;
+ goto yy1326;
+ } else {
+ if (yych == '\r') goto yy1326;
+ if (yych <= 0x1F) goto yy759;
+ goto yy1326;
+ }
+ } else {
+ if (yych <= '&') {
+ if (yych == '"') goto yy1239;
+ goto yy759;
+ } else {
+ if (yych <= '\'') goto yy1240;
+ if (yych == '*') goto yy612;
+ goto yy759;
+ }
+ }
+ } else {
+ if (yych <= 0x7F) {
+ if (yych <= '=') {
+ if (yych <= '-') goto yy760;
+ if (yych <= '<') goto yy759;
+ goto yy1328;
+ } else {
+ if (yych <= '>') goto yy906;
+ if (yych == '\\') goto yy761;
+ goto yy759;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy762;
+ if (yych <= 0xE0) goto yy763;
+ goto yy764;
+ } else {
+ if (yych <= 0xF0) goto yy765;
+ if (yych <= 0xF3) goto yy766;
+ if (yych <= 0xF4) goto yy767;
+ goto yy73;
+ }
+ }
+ }
+yy1327:
+ yych = *++YYCURSOR;
+ if (yych <= '=') {
+ if (yych <= '!') {
+ if (yych <= '\f') {
+ if (yych <= 0x00) goto yy73;
+ if (yych == '\t') goto yy1326;
+ goto yy759;
+ } else {
+ if (yych <= '\r') goto yy1326;
+ if (yych == ' ') goto yy1326;
+ goto yy759;
+ }
+ } else {
+ if (yych <= ',') {
+ if (yych <= '"') goto yy1239;
+ if (yych == '\'') goto yy1240;
+ goto yy759;
+ } else {
+ if (yych <= '/') {
+ if (yych <= '-') goto yy1327;
+ goto yy759;
} else {
- if (yych <= 0xF3) {
- yyt2 = YYCURSOR;
- goto yy293;
- }
- if (yych <= 0xF4) {
- yyt2 = YYCURSOR;
- goto yy294;
- }
- goto yy5;
+ if (yych <= ':') goto yy1242;
+ if (yych <= '<') goto yy759;
+ }
+ }
+ }
+ } else {
+ if (yych <= 'z') {
+ if (yych <= '[') {
+ if (yych <= '>') goto yy1061;
+ if (yych <= '@') goto yy759;
+ if (yych <= 'Z') goto yy1242;
+ goto yy759;
+ } else {
+ if (yych <= '^') {
+ if (yych <= '\\') goto yy761;
+ goto yy759;
+ } else {
+ if (yych == '`') goto yy759;
+ goto yy1242;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy759;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy762;
+ goto yy763;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy764;
+ goto yy765;
+ } else {
+ if (yych <= 0xF3) goto yy766;
+ if (yych <= 0xF4) goto yy767;
+ goto yy73;
}
}
}
}
-yy289:
+yy1328:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy284;
- goto yy1;
-yy290:
+ if (yybm_bol[256+yych] & 32) {
+ goto yy771;
+ }
+ if (yych <= 0xC1) {
+ if (yych <= '*') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= '"') goto yy896;
+ goto yy781;
+ } else {
+ if (yych <= '-') goto yy905;
+ if (yych <= '>') goto yy759;
+ goto yy73;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy907;
+ if (yych <= 0xE0) goto yy908;
+ goto yy909;
+ } else {
+ if (yych <= 0xF0) goto yy910;
+ if (yych <= 0xF3) goto yy911;
+ if (yych <= 0xF4) goto yy912;
+ goto yy73;
+ }
+ }
+yy1329:
yych = *++YYCURSOR;
- if (yych <= 0x9F) goto yy1;
- if (yych <= 0xBF) goto yy289;
- goto yy1;
-yy291:
+ if (yych <= ',') {
+ if (yych <= ' ') {
+ if (yych <= '\t') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= 0x08) goto yy750;
+ goto yy1329;
+ } else {
+ if (yych == '\r') goto yy1329;
+ if (yych <= 0x1F) goto yy750;
+ goto yy1329;
+ }
+ } else {
+ if (yych <= '&') {
+ if (yych == '"') goto yy1244;
+ goto yy750;
+ } else {
+ if (yych <= '\'') goto yy1245;
+ if (yych == '*') goto yy604;
+ goto yy750;
+ }
+ }
+ } else {
+ if (yych <= 0x7F) {
+ if (yych <= '=') {
+ if (yych <= '-') goto yy751;
+ if (yych <= '<') goto yy750;
+ goto yy1331;
+ } else {
+ if (yych <= '>') goto yy898;
+ if (yych == '\\') goto yy752;
+ goto yy750;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy753;
+ if (yych <= 0xE0) goto yy754;
+ goto yy755;
+ } else {
+ if (yych <= 0xF0) goto yy756;
+ if (yych <= 0xF3) goto yy757;
+ if (yych <= 0xF4) goto yy758;
+ goto yy73;
+ }
+ }
+ }
+yy1330:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy289;
- goto yy1;
-yy292:
+ if (yych <= '=') {
+ if (yych <= '!') {
+ if (yych <= '\f') {
+ if (yych <= 0x00) goto yy73;
+ if (yych == '\t') goto yy1329;
+ goto yy750;
+ } else {
+ if (yych <= '\r') goto yy1329;
+ if (yych == ' ') goto yy1329;
+ goto yy750;
+ }
+ } else {
+ if (yych <= ',') {
+ if (yych <= '"') goto yy1244;
+ if (yych == '\'') goto yy1245;
+ goto yy750;
+ } else {
+ if (yych <= '/') {
+ if (yych <= '-') goto yy1330;
+ goto yy750;
+ } else {
+ if (yych <= ':') goto yy1247;
+ if (yych <= '<') goto yy750;
+ }
+ }
+ }
+ } else {
+ if (yych <= 'z') {
+ if (yych <= '[') {
+ if (yych <= '>') goto yy1060;
+ if (yych <= '@') goto yy750;
+ if (yych <= 'Z') goto yy1247;
+ goto yy750;
+ } else {
+ if (yych <= '^') {
+ if (yych <= '\\') goto yy752;
+ goto yy750;
+ } else {
+ if (yych == '`') goto yy750;
+ goto yy1247;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy750;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy753;
+ goto yy754;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy755;
+ goto yy756;
+ } else {
+ if (yych <= 0xF3) goto yy757;
+ if (yych <= 0xF4) goto yy758;
+ goto yy73;
+ }
+ }
+ }
+ }
+yy1331:
yych = *++YYCURSOR;
- if (yych <= 0x8F) goto yy1;
- if (yych <= 0xBF) goto yy291;
- goto yy1;
-yy293:
+ if (yybm_bol[256+yych] & 16) {
+ goto yy770;
+ }
+ if (yych <= 0xC1) {
+ if (yych <= '*') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= '\'') goto yy896;
+ goto yy780;
+ } else {
+ if (yych <= '-') goto yy897;
+ if (yych <= '>') goto yy750;
+ goto yy73;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy899;
+ if (yych <= 0xE0) goto yy900;
+ goto yy901;
+ } else {
+ if (yych <= 0xF0) goto yy902;
+ if (yych <= 0xF3) goto yy903;
+ if (yych <= 0xF4) goto yy904;
+ goto yy73;
+ }
+ }
+yy1332:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy291;
- goto yy1;
-yy294:
+ if (yych <= '<') {
+ if (yych <= 0x1F) {
+ if (yych <= '\t') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= 0x08) goto yy612;
+ goto yy1332;
+ } else {
+ if (yych == '\r') goto yy1332;
+ goto yy612;
+ }
+ } else {
+ if (yych <= '"') {
+ if (yych <= ' ') goto yy1332;
+ if (yych <= '!') goto yy612;
+ goto yy1250;
+ } else {
+ if (yych == '\'') goto yy1251;
+ goto yy612;
+ }
+ }
+ } else {
+ if (yych <= 0xC1) {
+ if (yych <= '[') {
+ if (yych <= '=') goto yy1333;
+ if (yych <= '>') goto yy922;
+ goto yy612;
+ } else {
+ if (yych <= '\\') goto yy613;
+ if (yych <= 0x7F) goto yy612;
+ goto yy73;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy614;
+ if (yych <= 0xE0) goto yy615;
+ goto yy616;
+ } else {
+ if (yych <= 0xF0) goto yy617;
+ if (yych <= 0xF3) goto yy618;
+ if (yych <= 0xF4) goto yy619;
+ goto yy73;
+ }
+ }
+ }
+yy1333:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0x8F) goto yy291;
- goto yy1;
-yy295:
- yyaccept = 6;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '9') {
- if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy26;
- goto yy80;
+ if (yybm_bol[0+yych] & 1) {
+ goto yy781;
+ }
+ if (yych <= 0xDF) {
+ if (yych <= '"') {
+ if (yych <= 0x00) goto yy73;
+ goto yy914;
} else {
- if (yych <= ',') goto yy26;
- if (yych <= '.') goto yy80;
- if (yych <= '/') goto yy26;
- goto yy295;
+ if (yych <= '>') goto yy612;
+ if (yych <= 0xC1) goto yy73;
+ goto yy923;
}
} else {
- if (yych <= '^') {
- if (yych <= '?') goto yy26;
- if (yych <= '@') goto yy82;
- if (yych <= 'Z') goto yy80;
- goto yy26;
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy924;
+ if (yych <= 0xEF) goto yy925;
+ goto yy926;
} else {
- if (yych == '`') goto yy26;
- if (yych <= 'z') goto yy80;
- goto yy26;
+ if (yych <= 0xF3) goto yy927;
+ if (yych <= 0xF4) goto yy928;
+ goto yy73;
}
}
-yy296:
- yyaccept = 6;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '/') {
+yy1334:
+ yych = *++YYCURSOR;
+ if (yych <= '<') {
+ if (yych <= 0x1F) {
+ if (yych <= '\t') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= 0x08) goto yy604;
+ goto yy1334;
+ } else {
+ if (yych == '\r') goto yy1334;
+ goto yy604;
+ }
+ } else {
+ if (yych <= '"') {
+ if (yych <= ' ') goto yy1334;
+ if (yych <= '!') goto yy604;
+ goto yy1254;
+ } else {
+ if (yych == '\'') goto yy1255;
+ goto yy604;
+ }
+ }
+ } else {
+ if (yych <= 0xC1) {
+ if (yych <= '[') {
+ if (yych <= '=') goto yy1335;
+ if (yych <= '>') goto yy915;
+ goto yy604;
+ } else {
+ if (yych <= '\\') goto yy605;
+ if (yych <= 0x7F) goto yy604;
+ goto yy73;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy606;
+ if (yych <= 0xE0) goto yy607;
+ goto yy608;
+ } else {
+ if (yych <= 0xF0) goto yy609;
+ if (yych <= 0xF3) goto yy610;
+ if (yych <= 0xF4) goto yy611;
+ goto yy73;
+ }
+ }
+ }
+yy1335:
+ yych = *++YYCURSOR;
+ if (yybm_bol[256+yych] & 128) {
+ goto yy780;
+ }
+ if (yych <= 0xDF) {
+ if (yych <= '\'') {
+ if (yych <= 0x00) goto yy73;
+ goto yy914;
+ } else {
+ if (yych <= '>') goto yy604;
+ if (yych <= 0xC1) goto yy73;
+ goto yy916;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy917;
+ if (yych <= 0xEF) goto yy918;
+ goto yy919;
+ } else {
+ if (yych <= 0xF3) goto yy920;
+ if (yych <= 0xF4) goto yy921;
+ goto yy73;
+ }
+ }
+yy1336:
+ yych = *++YYCURSOR;
+ if (yych <= '=') {
+ if (yych <= 0x1F) {
+ if (yych <= '\t') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= 0x08) goto yy942;
+ goto yy1336;
+ } else {
+ if (yych == '\r') goto yy1336;
+ goto yy942;
+ }
+ } else {
+ if (yych <= '\'') {
+ if (yych <= ' ') goto yy1336;
+ if (yych <= '&') goto yy942;
+ goto yy932;
+ } else {
+ if (yych == '/') goto yy1338;
+ goto yy942;
+ }
+ }
+ } else {
+ if (yych <= 0xC1) {
+ if (yych <= '[') {
+ if (yych <= '>') goto yy802;
+ if (yych <= '?') goto yy1338;
+ goto yy942;
+ } else {
+ if (yych <= '\\') goto yy943;
+ if (yych <= 0x7F) goto yy942;
+ goto yy73;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy944;
+ if (yych <= 0xE0) goto yy945;
+ goto yy946;
+ } else {
+ if (yych <= 0xF0) goto yy947;
+ if (yych <= 0xF3) goto yy948;
+ if (yych <= 0xF4) goto yy949;
+ goto yy73;
+ }
+ }
+ }
+yy1337:
+ yych = *++YYCURSOR;
+ if (yych <= '>') {
+ if (yych <= '&') {
+ if (yych <= '\f') {
+ if (yych <= 0x00) goto yy73;
+ if (yych == '\t') goto yy1387;
+ goto yy942;
+ } else {
+ if (yych <= '\r') goto yy1387;
+ if (yych == ' ') goto yy1387;
+ goto yy942;
+ }
+ } else {
+ if (yych <= '.') {
+ if (yych <= '\'') goto yy932;
+ if (yych == '-') goto yy1337;
+ goto yy942;
+ } else {
+ if (yych <= ':') {
+ if (yych >= '0') goto yy1337;
+ } else {
+ if (yych <= '<') goto yy942;
+ if (yych <= '=') goto yy1388;
+ goto yy802;
+ }
+ }
+ }
+ } else {
+ if (yych <= 'z') {
+ if (yych <= '[') {
+ if (yych <= '?') goto yy1338;
+ if (yych <= '@') goto yy942;
+ if (yych <= 'Z') goto yy1337;
+ goto yy942;
+ } else {
+ if (yych <= '^') {
+ if (yych <= '\\') goto yy943;
+ goto yy942;
+ } else {
+ if (yych == '`') goto yy942;
+ goto yy1337;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy942;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy944;
+ goto yy945;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy946;
+ goto yy947;
+ } else {
+ if (yych <= 0xF3) goto yy948;
+ if (yych <= 0xF4) goto yy949;
+ goto yy73;
+ }
+ }
+ }
+ }
+yy1338:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) {
+ if (yych <= '=') {
+ if (yych <= 0x00) goto yy73;
+ if (yych == '\'') goto yy932;
+ goto yy942;
+ } else {
+ if (yych <= '>') goto yy941;
+ if (yych == '\\') goto yy943;
+ goto yy942;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy944;
+ if (yych <= 0xE0) goto yy945;
+ goto yy946;
+ } else {
+ if (yych <= 0xF0) goto yy947;
+ if (yych <= 0xF3) goto yy948;
+ if (yych <= 0xF4) goto yy949;
+ goto yy73;
+ }
+ }
+yy1339:
+ yych = *++YYCURSOR;
+ if (yych <= '=') {
if (yych <= 0x1F) {
+ if (yych <= '\t') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= 0x08) goto yy931;
+ goto yy1339;
+ } else {
+ if (yych == '\r') goto yy1339;
+ goto yy931;
+ }
+ } else {
+ if (yych <= '"') {
+ if (yych <= ' ') goto yy1339;
+ if (yych <= '!') goto yy931;
+ goto yy932;
+ } else {
+ if (yych == '/') goto yy1341;
+ goto yy931;
+ }
+ }
+ } else {
+ if (yych <= 0xC1) {
+ if (yych <= '[') {
+ if (yych <= '>') goto yy792;
+ if (yych <= '?') goto yy1341;
+ goto yy931;
+ } else {
+ if (yych <= '\\') goto yy933;
+ if (yych <= 0x7F) goto yy931;
+ goto yy73;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy934;
+ if (yych <= 0xE0) goto yy935;
+ goto yy936;
+ } else {
+ if (yych <= 0xF0) goto yy937;
+ if (yych <= 0xF3) goto yy938;
+ if (yych <= 0xF4) goto yy939;
+ goto yy73;
+ }
+ }
+ }
+yy1340:
+ yych = *++YYCURSOR;
+ if (yych <= '>') {
+ if (yych <= '!') {
if (yych <= '\f') {
- if (yych <= 0x00) goto yy26;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy26;
- goto yy4;
+ if (yych <= 0x00) goto yy73;
+ if (yych == '\t') goto yy1389;
+ goto yy931;
} else {
- if (yych <= '\r') goto yy26;
- if (yych == 0x1B) goto yy26;
- goto yy4;
+ if (yych <= '\r') goto yy1389;
+ if (yych == ' ') goto yy1389;
+ goto yy931;
}
} else {
- if (yych <= '*') {
- if (yych <= '#') goto yy26;
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy80;
- goto yy26;
+ if (yych <= '.') {
+ if (yych <= '"') goto yy932;
+ if (yych == '-') goto yy1340;
+ goto yy931;
} else {
- if (yych <= '+') goto yy80;
- if (yych <= ',') goto yy26;
- if (yych <= '.') goto yy46;
- goto yy4;
+ if (yych <= ':') {
+ if (yych >= '0') goto yy1340;
+ } else {
+ if (yych <= '<') goto yy931;
+ if (yych <= '=') goto yy1390;
+ goto yy792;
+ }
}
}
} else {
- if (yych <= '_') {
+ if (yych <= 'z') {
+ if (yych <= '[') {
+ if (yych <= '?') goto yy1341;
+ if (yych <= '@') goto yy931;
+ if (yych <= 'Z') goto yy1340;
+ goto yy931;
+ } else {
+ if (yych <= '^') {
+ if (yych <= '\\') goto yy933;
+ goto yy931;
+ } else {
+ if (yych == '`') goto yy931;
+ goto yy1340;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy931;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy934;
+ goto yy935;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy936;
+ goto yy937;
+ } else {
+ if (yych <= 0xF3) goto yy938;
+ if (yych <= 0xF4) goto yy939;
+ goto yy73;
+ }
+ }
+ }
+ }
+yy1341:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) {
+ if (yych <= '=') {
+ if (yych <= 0x00) goto yy73;
+ if (yych == '"') goto yy932;
+ goto yy931;
+ } else {
+ if (yych <= '>') goto yy930;
+ if (yych == '\\') goto yy933;
+ goto yy931;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy934;
+ if (yych <= 0xE0) goto yy935;
+ goto yy936;
+ } else {
+ if (yych <= 0xF0) goto yy937;
+ if (yych <= 0xF3) goto yy938;
+ if (yych <= 0xF4) goto yy939;
+ goto yy73;
+ }
+ }
+yy1342:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= ',') {
+ if (yych <= '\f') {
+ if (yych <= 0x00) goto yy73;
+ if (yych == '\t') goto yy1342;
+ goto yy1189;
+ } else {
+ if (yych <= '\r') goto yy1342;
+ if (yych == ' ') goto yy1342;
+ goto yy1189;
+ }
+ } else {
+ if (yych <= ':') {
+ if (yych <= '-') goto yy1269;
+ if (yych <= '.') goto yy1189;
+ if (yych <= '/') goto yy1270;
+ goto yy1269;
+ } else {
+ if (yych <= '=') goto yy1189;
+ if (yych <= '>') goto yy1271;
+ if (yych <= '?') goto yy1270;
+ goto yy1189;
+ }
+ }
+ } else {
+ if (yych <= 0x7F) {
+ if (yych <= '^') {
+ if (yych <= 'Z') goto yy1269;
+ if (yych == '\\') goto yy1272;
+ goto yy1189;
+ } else {
+ if (yych == '`') goto yy1189;
+ if (yych <= 'z') goto yy1269;
+ goto yy1189;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy1273;
+ if (yych <= 0xE0) goto yy1274;
+ goto yy1275;
+ } else {
+ if (yych <= 0xF0) goto yy1276;
+ if (yych <= 0xF3) goto yy1277;
+ if (yych <= 0xF4) goto yy1278;
+ goto yy73;
+ }
+ }
+ }
+yy1343:
+ yyaccept = 40;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 0x7F) {
+ if (yych <= '&') {
+ if (yych <= 0x00) goto yy463;
+ if (yych != '"') goto yy1271;
+ } else {
+ if (yych <= '\'') goto yy1345;
+ if (yych == '\\') goto yy1346;
+ goto yy1271;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy463;
+ if (yych <= 0xDF) goto yy1347;
+ if (yych <= 0xE0) goto yy1348;
+ goto yy1349;
+ } else {
+ if (yych <= 0xF0) goto yy1350;
+ if (yych <= 0xF3) goto yy1351;
+ if (yych <= 0xF4) goto yy1352;
+ goto yy463;
+ }
+ }
+yy1344:
+ yych = *++YYCURSOR;
+ if (yych <= '?') {
+ if (yych <= '&') {
+ if (yych <= '\f') {
+ if (yych <= 0x00) goto yy73;
+ if (yych == '\t') goto yy1391;
+ goto yy964;
+ } else {
+ if (yych <= '\r') goto yy1391;
+ if (yych == ' ') goto yy1391;
+ goto yy964;
+ }
+ } else {
+ if (yych <= '.') {
+ if (yych <= '\'') goto yy1083;
+ if (yych == '-') goto yy1392;
+ goto yy964;
+ } else {
+ if (yych <= '/') goto yy1393;
+ if (yych <= ':') goto yy1392;
+ if (yych <= '>') goto yy964;
+ goto yy1393;
+ }
+ }
+ } else {
+ if (yych <= 'z') {
+ if (yych <= '\\') {
+ if (yych <= '@') goto yy964;
+ if (yych <= 'Z') goto yy1392;
+ if (yych <= '[') goto yy964;
+ goto yy1093;
+ } else {
+ if (yych == '_') goto yy1392;
+ if (yych <= '`') goto yy964;
+ goto yy1392;
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy964;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy1094;
+ goto yy1095;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy1096;
+ goto yy1097;
+ } else {
+ if (yych <= 0xF3) goto yy1098;
+ if (yych <= 0xF4) goto yy1099;
+ goto yy73;
+ }
+ }
+ }
+ }
+yy1345:
+ yych = *++YYCURSOR;
+ if (yych <= '?') {
+ if (yych <= '!') {
+ if (yych <= '\f') {
+ if (yych <= 0x00) goto yy73;
+ if (yych == '\t') goto yy1394;
+ goto yy954;
+ } else {
+ if (yych <= '\r') goto yy1394;
+ if (yych == ' ') goto yy1394;
+ goto yy954;
+ }
+ } else {
+ if (yych <= '.') {
+ if (yych <= '"') goto yy1083;
+ if (yych == '-') goto yy1395;
+ goto yy954;
+ } else {
+ if (yych <= '/') goto yy1396;
+ if (yych <= ':') goto yy1395;
+ if (yych <= '>') goto yy954;
+ goto yy1396;
+ }
+ }
+ } else {
+ if (yych <= 'z') {
+ if (yych <= '\\') {
+ if (yych <= '@') goto yy954;
+ if (yych <= 'Z') goto yy1395;
+ if (yych <= '[') goto yy954;
+ goto yy1084;
+ } else {
+ if (yych == '_') goto yy1395;
+ if (yych <= '`') goto yy954;
+ goto yy1395;
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy954;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy1085;
+ goto yy1086;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy1087;
+ goto yy1088;
+ } else {
+ if (yych <= 0xF3) goto yy1089;
+ if (yych <= 0xF4) goto yy1090;
+ goto yy73;
+ }
+ }
+ }
+ }
+yy1346:
+ yych = *++YYCURSOR;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 0x00) goto yy73;
+ goto yy1271;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych >= 0xE0) goto yy1348;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy1349;
+ goto yy1350;
+ } else {
+ if (yych <= 0xF3) goto yy1351;
+ if (yych <= 0xF4) goto yy1352;
+ goto yy73;
+ }
+ }
+yy1347:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy1271;
+ goto yy73;
+yy1348:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy73;
+ if (yych <= 0xBF) goto yy1347;
+ goto yy73;
+yy1349:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy1347;
+ goto yy73;
+yy1350:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy73;
+ if (yych <= 0xBF) goto yy1349;
+ goto yy73;
+yy1351:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy1349;
+ goto yy73;
+yy1352:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0x8F) goto yy1349;
+ goto yy73;
+yy1353:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1397;
+ goto yy73;
+yy1354:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy337;
+ if (yych <= '9') goto yy1398;
+ goto yy337;
+ } else {
+ if (yych <= 'F') goto yy1398;
+ if (yych <= '`') goto yy337;
+ if (yych <= 'f') goto yy1366;
+ goto yy337;
+ }
+yy1355:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '_') {
+ if (yych <= '9') {
+ if (yych <= '-') {
+ if (yych <= ',') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt2 = YYCURSOR;
+ goto yy656;
+ } else {
+ if (yych <= '.') {
+ yyt2 = YYCURSOR;
+ goto yy663;
+ }
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ goto yy481;
+ }
+ } else {
if (yych <= '@') {
- if (yych <= '9') goto yy382;
- if (yych <= ':') goto yy4;
- if (yych <= '?') goto yy26;
- goto yy96;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1356;
+ }
+ if (yych <= '?') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt2 = YYCURSOR;
+ goto yy565;
} else {
- if (yych <= 'F') goto yy353;
- if (yych <= 'Z') goto yy46;
- if (yych <= '^') goto yy26;
- goto yy46;
+ if (yych <= 'Z') goto yy481;
+ if (yych <= '^') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt2 = YYCURSOR;
+ goto yy483;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy481;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy39;
+ yyt2 = YYCURSOR;
+ goto yy313;
}
} else {
- if (yych <= '~') {
- if (yych <= '`') goto yy26;
- if (yych <= 'f') goto yy353;
- if (yych <= 'z') goto yy46;
- goto yy26;
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
} else {
- if (yych <= 0x7F) goto yy4;
- if (yych <= 0xC1) goto yy26;
- if (yych <= 0xF4) goto yy4;
- goto yy26;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy39;
}
}
}
-yy297:
- yyaccept = 18;
+yy1356:
+ yych = *++YYCURSOR;
+ if (yych == ' ') goto yy305;
+ if (yych == ':') goto yy356;
+ goto yy73;
+yy1357:
+ yyaccept = 7;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '1') {
- if (yych <= '/') {
- yyt2 = yyt1;
- goto yy199;
+ if (yych <= '^') {
+ if (yych <= '5') {
+ if (yych <= '-') {
+ if (yych <= ',') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt2 = YYCURSOR;
+ goto yy656;
+ } else {
+ if (yych <= '.') {
+ yyt2 = YYCURSOR;
+ goto yy663;
+ }
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ goto yy1355;
+ }
+ } else {
+ if (yych <= '?') {
+ if (yych <= '9') goto yy481;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1356;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy565;
+ }
+ if (yych <= 'Z') goto yy481;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
}
- if (yych <= '0') goto yy383;
- goto yy384;
} else {
- if (yych <= '2') goto yy385;
- if (yych <= '9') goto yy383;
- yyt2 = yyt1;
- goto yy199;
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= '_') {
+ yyt2 = YYCURSOR;
+ goto yy483;
+ }
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy481;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy39;
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy39;
+ }
+ }
}
-yy298:
+yy1358:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1399;
+ goto yy73;
+yy1359:
+ yych = *++YYCURSOR;
+ if (yych == '\n') goto yy73;
+ goto yy1402;
+yy1360:
+ yyaccept = 41;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 0xDF) {
+ if (yych <= ':') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy987;
+ }
+ if (yych <= '9') {
+ yyt1 = YYCURSOR;
+ goto yy1409;
+ }
+ goto yy988;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy987;
+ }
+ if (yych <= 0xC1) goto yy988;
+ yyt2 = YYCURSOR;
+ goto yy990;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy991;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy992;
+ }
+ yyt2 = YYCURSOR;
+ goto yy993;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy994;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy995;
+ }
+ goto yy988;
+ }
+ }
+yy1361:
+ ++YYCURSOR;
+#line 351 "../../lnav/src/data_scanner_re.re"
+ {
+ CAPTURE(DT_DIFF_FILE_HEADER);
+ cap_inner.c_end -= 1;
+ this->ds_bol = true;
+ return tokenize_result{token_out, cap_all, cap_inner, this->ds_input.data()};
+ }
+#line 36302 "../../lnav/src/data_scanner_re.cc"
+yy1362:
+ yych = *++YYCURSOR;
+ if (yych == 'e') goto yy1410;
+ goto yy73;
+yy1363:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1411;
+ goto yy73;
+yy1364:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1412;
+ goto yy73;
+yy1365:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1412;
+ if (yych <= ':') goto yy123;
+ goto yy73;
+yy1366:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy138;
+ if (yych <= '9') goto yy1413;
+ goto yy138;
+ } else {
+ if (yych <= 'F') goto yy1413;
+ if (yych <= '`') goto yy138;
+ if (yych <= 'f') goto yy1413;
+ goto yy138;
+ }
+yy1367:
+ yyaccept = 12;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ if (yych <= '7') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy119;
+ if (yych <= '*') goto yy125;
+ goto yy297;
+ } else {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy125;
+ goto yy297;
+ } else {
+ if (yych <= '.') goto yy409;
+ if (yych <= '/') goto yy297;
+ goto yy1414;
+ }
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '9') goto yy1415;
+ if (yych <= ':') goto yy297;
+ if (yych <= '?') goto yy125;
+ goto yy297;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy125;
+ goto yy297;
+ } else {
+ if (yych <= '`') goto yy125;
+ if (yych <= 'z') goto yy297;
+ goto yy125;
+ }
+ }
+ }
+yy1368:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ if (yych <= '-') {
+ if (yych == '%') goto yy119;
+ goto yy297;
+ } else {
+ if (yych <= '.') goto yy409;
+ if (yych <= '/') goto yy297;
+ if (yych <= '9') goto yy1415;
+ goto yy297;
+ }
+yy1369:
+ yych = *++YYCURSOR;
+ if (yych <= 'z') {
+ if (yych <= '9') {
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy1026;
+ }
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy73;
+ } else {
+ if (yych <= '@') {
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1214;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy73;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy1370:
yych = *++YYCURSOR;
if (yych <= 'f') {
if (yych <= ':') {
- if (yych <= '.') {
- if (yych <= '-') {
+ if (yych <= '%') {
+ if (yych <= '$') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
}
yyt1 = YYCURSOR;
- goto yy297;
+ goto yy1026;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
}
- if (yych <= '9') goto yy386;
+ if (yych <= '9') goto yy1416;
+ yyt2 = YYCURSOR;
}
} else {
if (yych <= 'F') {
if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
}
- goto yy386;
+ goto yy1416;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy73;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
}
- goto yy386;
+ goto yy1416;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy73;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
} else {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy73;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy313;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy314;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy315;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy316;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy317;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy318;
}
- goto yy1;
+ goto yy73;
}
}
}
-yy299:
+yy1371:
+ yych = *++YYCURSOR;
+ if (yych <= '9') {
+ if (yych == ' ') goto yy305;
+ if (yych <= '/') goto yy73;
+ goto yy1417;
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy73;
+ goto yy1417;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy1417;
+ goto yy73;
+ }
+ }
+yy1372:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy387;
- goto yy1;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1418;
+ if (yych <= ':') goto yy1135;
+ goto yy73;
} else {
- if (yych <= 'F') goto yy387;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy387;
- goto yy1;
+ if (yych <= 'F') goto yy1418;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy1418;
+ goto yy73;
}
-yy300:
+yy1373:
+ yych = *++YYCURSOR;
+ if (yych == ':') goto yy1218;
+ goto yy73;
+yy1374:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1419;
+ if (yych >= ';') goto yy73;
+ } else {
+ if (yych <= 'F') goto yy1419;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy1419;
+ goto yy73;
+ }
+yy1375:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1420;
+ if (yych <= ':') goto yy1421;
+ goto yy73;
+ } else {
+ if (yych <= 'F') goto yy1420;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy1420;
+ goto yy73;
+ }
+yy1376:
yych = *++YYCURSOR;
if (yych <= 'z') {
if (yych <= '@') {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1422;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1423;
}
- if (yych <= '9') goto yy386;
- if (yych <= ':') goto yy299;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
} else {
if (yych <= 'Z') {
- if (yych <= 'F') goto yy386;
- goto yy1;
+ if (yych <= 'F') goto yy1422;
+ goto yy73;
} else {
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
}
- if (yych <= 'f') goto yy386;
- goto yy1;
+ if (yych <= 'f') goto yy1422;
+ goto yy73;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
}
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy73;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy313;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy314;
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy315;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy316;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy317;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy318;
}
- goto yy1;
+ goto yy73;
}
}
}
-yy301:
+yy1377:
+ yych = *++YYCURSOR;
+ if (yych <= 'z') {
+ if (yych <= '@') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1424;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1311;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= 'F') goto yy1424;
+ goto yy73;
+ } else {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 'f') goto yy1424;
+ goto yy73;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy1378:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt4 = YYCURSOR;
+ goto yy867;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1424;
+ yyt2 = YYCURSOR;
+ goto yy1311;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1424;
+ } else {
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1424;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy1379:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ switch (yych) {
+ case '%': goto yy119;
+ case '+':
+ case '-':
+ case '/':
+ case ':':
+ case '@':
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy297;
+ case '.': goto yy443;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy1425;
+ case 'B':
+ case 'b': goto yy1147;
+ case 'E':
+ case 'e': goto yy1148;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy132;
+ case 'S':
+ case 's': goto yy136;
+ case 'm': goto yy139;
+ case 'p':
+ case 'u': goto yy140;
+ default: goto yy24;
+ }
+yy1380:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ switch (yych) {
+ case '%':
+ case '+':
+ case '-':
+ case '.':
+ case '/':
+ case ':':
+ case '@':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy138;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy1426;
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'E':
+ case 'F':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'e':
+ case 'f': goto yy1413;
+ case 'B':
+ case 'b': goto yy1427;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy590;
+ case 'S':
+ case 's': goto yy591;
+ case 'm': goto yy592;
+ case 'p':
+ case 'u': goto yy593;
+ default: goto yy24;
+ }
+yy1381:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '?') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy138;
+ if (yych <= '*') goto yy24;
+ goto yy138;
+ } else {
+ if (yych <= '/') {
+ if (yych <= ',') goto yy24;
+ goto yy138;
+ } else {
+ if (yych <= '9') goto yy1413;
+ if (yych <= ':') goto yy138;
+ goto yy24;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') goto yy138;
+ if (yych <= 'F') goto yy1413;
+ if (yych <= 'Z') goto yy138;
+ goto yy24;
+ } else {
+ if (yych <= '`') {
+ if (yych <= '_') goto yy138;
+ goto yy24;
+ } else {
+ if (yych <= 'f') goto yy1413;
+ if (yych <= 'z') goto yy138;
+ goto yy24;
+ }
+ }
+ }
+yy1382:
yych = *++YYCURSOR;
if (yych <= 'f') {
if (yych <= ':') {
if (yych <= '.') {
if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
}
yyt1 = YYCURSOR;
- goto yy297;
+ goto yy444;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
}
- if (yych <= '9') goto yy388;
- goto yy299;
+ if (yych <= '9') goto yy1428;
+ yyt2 = YYCURSOR;
+ goto yy1429;
}
} else {
if (yych <= 'F') {
if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
}
- goto yy386;
+ goto yy1138;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy73;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
}
- goto yy386;
+ goto yy1138;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy73;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
} else {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy73;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy313;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy314;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy315;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy316;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy317;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy318;
}
- goto yy1;
+ goto yy73;
}
}
}
-yy302:
+yy1383:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt1 = YYCURSOR;
+ goto yy444;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1430;
+ yyt2 = YYCURSOR;
+ goto yy1137;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1138;
+ } else {
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1138;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy1384:
yych = *++YYCURSOR;
if (yych <= '`') {
- if (yych <= '9') {
+ if (yych <= '5') {
if (yych <= '.') {
if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
}
yyt1 = YYCURSOR;
- goto yy297;
+ goto yy444;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
}
- if (yych <= '5') goto yy388;
- goto yy386;
+ if (yych <= '4') goto yy1430;
+ goto yy1431;
}
} else {
if (yych <= '@') {
- if (yych <= ':') goto yy299;
+ if (yych <= '9') goto yy1428;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1137;
+ }
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
} else {
- if (yych <= 'F') goto yy386;
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'F') goto yy1138;
+ if (yych <= 'Z') goto yy73;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
}
}
} else {
if (yych <= 0xDF) {
if (yych <= 'z') {
- if (yych <= 'f') goto yy386;
- goto yy1;
+ if (yych <= 'f') goto yy1138;
+ goto yy73;
} else {
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
}
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy73;
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy313;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy314;
}
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy315;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy316;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy317;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy318;
}
- goto yy1;
+ goto yy73;
}
}
}
-yy303:
+yy1385:
yych = *++YYCURSOR;
if (yych <= 'f') {
- if (yych <= 'E') {
- if (yych <= '9') {
- if (yych <= '/') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
}
- goto yy386;
+ yyt1 = YYCURSOR;
+ goto yy444;
} else {
- if (yych <= ':') goto yy299;
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1428;
+ yyt2 = YYCURSOR;
+ goto yy1137;
+ }
+ } else {
+ if (yych <= 'F') {
if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
+ }
+ goto yy1138;
+ } else {
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1138;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
}
- goto yy386;
+ yyt2 = YYCURSOR;
+ goto yy314;
}
} else {
- if (yych <= 'Z') {
- if (yych <= 'F') goto yy389;
- goto yy1;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy1386:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt1 = YYCURSOR;
+ goto yy444;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1145;
+ yyt2 = YYCURSOR;
+ goto yy878;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1145;
} else {
+ if (yych <= 'Z') goto yy73;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
}
- if (yych <= 'e') goto yy386;
- goto yy389;
+ goto yy1145;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy73;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy305;
} else {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy73;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy313;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy314;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy315;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy316;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy317;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy318;
}
- goto yy1;
+ goto yy73;
}
}
}
-yy304:
+yy1387:
yych = *++YYCURSOR;
-yy305:
- if (yych <= ',') {
+ if (yych <= '=') {
if (yych <= 0x1F) {
if (yych <= '\t') {
- if (yych <= 0x08) goto yy1;
- goto yy304;
+ if (yych <= 0x00) goto yy73;
+ if (yych <= 0x08) goto yy942;
+ goto yy1387;
} else {
- if (yych == '\r') goto yy304;
- goto yy1;
+ if (yych == '\r') goto yy1387;
+ goto yy942;
}
} else {
- if (yych <= '"') {
- if (yych <= ' ') goto yy304;
- if (yych <= '!') goto yy1;
+ if (yych <= '\'') {
+ if (yych <= ' ') goto yy1387;
+ if (yych <= '&') goto yy942;
+ goto yy932;
} else {
- if (yych == '\'') goto yy307;
- goto yy1;
+ if (yych == '/') goto yy1338;
+ if (yych <= '<') goto yy942;
}
}
} else {
- if (yych <= '@') {
- if (yych <= ':') {
- if (yych <= '-') goto yy390;
- if (yych <= '/') goto yy1;
- goto yy390;
+ if (yych <= 0xC1) {
+ if (yych <= '[') {
+ if (yych <= '>') goto yy802;
+ if (yych <= '?') goto yy1338;
+ goto yy942;
} else {
- if (yych == '>') goto yy309;
- goto yy1;
+ if (yych <= '\\') goto yy943;
+ if (yych <= 0x7F) goto yy942;
+ goto yy73;
}
} else {
- if (yych <= '_') {
- if (yych <= 'Z') goto yy390;
- if (yych <= '^') goto yy1;
- goto yy390;
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy944;
+ if (yych <= 0xE0) goto yy945;
+ goto yy946;
} else {
- if (yych <= '`') goto yy1;
- if (yych <= 'z') goto yy390;
- goto yy1;
+ if (yych <= 0xF0) goto yy947;
+ if (yych <= 0xF3) goto yy948;
+ if (yych <= 0xF4) goto yy949;
+ goto yy73;
}
}
}
-yy306:
+yy1388:
yych = *++YYCURSOR;
- if (yybm[256+yych] & 8) {
- goto yy391;
+ if (yych <= '>') {
+ if (yych <= '\r') {
+ if (yych <= 0x08) {
+ if (yych <= 0x00) goto yy73;
+ goto yy640;
+ } else {
+ if (yych <= '\t') goto yy940;
+ if (yych <= '\f') goto yy640;
+ goto yy940;
+ }
+ } else {
+ if (yych <= '!') {
+ if (yych == ' ') goto yy940;
+ goto yy640;
+ } else {
+ if (yych <= '"') goto yy1079;
+ if (yych <= '=') goto yy640;
+ goto yy942;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= '\\') {
+ if (yych <= '[') goto yy640;
+ goto yy803;
+ } else {
+ if (yych <= 0x7F) goto yy640;
+ if (yych <= 0xC1) goto yy73;
+ goto yy804;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy805;
+ if (yych <= 0xEF) goto yy806;
+ goto yy807;
+ } else {
+ if (yych <= 0xF3) goto yy808;
+ if (yych <= 0xF4) goto yy809;
+ goto yy73;
+ }
+ }
}
- if (yych <= 0xE0) {
- if (yych <= '\\') {
- if (yych <= '"') goto yy1;
- goto yy392;
+yy1389:
+ yych = *++YYCURSOR;
+ if (yych <= '=') {
+ if (yych <= 0x1F) {
+ if (yych <= '\t') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= 0x08) goto yy931;
+ goto yy1389;
+ } else {
+ if (yych == '\r') goto yy1389;
+ goto yy931;
+ }
} else {
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy393;
- goto yy394;
+ if (yych <= '"') {
+ if (yych <= ' ') goto yy1389;
+ if (yych <= '!') goto yy931;
+ goto yy932;
+ } else {
+ if (yych == '/') goto yy1341;
+ if (yych <= '<') goto yy931;
+ }
}
} else {
- if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy395;
- goto yy396;
+ if (yych <= 0xC1) {
+ if (yych <= '[') {
+ if (yych <= '>') goto yy792;
+ if (yych <= '?') goto yy1341;
+ goto yy931;
+ } else {
+ if (yych <= '\\') goto yy933;
+ if (yych <= 0x7F) goto yy931;
+ goto yy73;
+ }
} else {
- if (yych <= 0xF3) goto yy397;
- if (yych <= 0xF4) goto yy398;
- goto yy1;
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy934;
+ if (yych <= 0xE0) goto yy935;
+ goto yy936;
+ } else {
+ if (yych <= 0xF0) goto yy937;
+ if (yych <= 0xF3) goto yy938;
+ if (yych <= 0xF4) goto yy939;
+ goto yy73;
+ }
}
}
-yy307:
+yy1390:
yych = *++YYCURSOR;
- if (yybm[256+yych] & 16) {
- goto yy399;
+ if (yych <= '>') {
+ if (yych <= '\r') {
+ if (yych <= 0x08) {
+ if (yych <= 0x00) goto yy73;
+ goto yy639;
+ } else {
+ if (yych <= '\t') goto yy929;
+ if (yych <= '\f') goto yy639;
+ goto yy929;
+ }
+ } else {
+ if (yych <= '&') {
+ if (yych == ' ') goto yy929;
+ goto yy639;
+ } else {
+ if (yych <= '\'') goto yy1079;
+ if (yych <= '=') goto yy639;
+ goto yy931;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= '\\') {
+ if (yych <= '[') goto yy639;
+ goto yy793;
+ } else {
+ if (yych <= 0x7F) goto yy639;
+ if (yych <= 0xC1) goto yy73;
+ goto yy794;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy795;
+ if (yych <= 0xEF) goto yy796;
+ goto yy797;
+ } else {
+ if (yych <= 0xF3) goto yy798;
+ if (yych <= 0xF4) goto yy799;
+ goto yy73;
+ }
+ }
}
- if (yych <= 0xE0) {
- if (yych <= '\\') {
- if (yych <= '\'') goto yy1;
- goto yy400;
+yy1391:
+ yych = *++YYCURSOR;
+ if (yych <= '>') {
+ if (yych <= 0x1F) {
+ if (yych <= '\t') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= 0x08) goto yy964;
+ goto yy1391;
+ } else {
+ if (yych == '\r') goto yy1391;
+ goto yy964;
+ }
} else {
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy401;
- goto yy402;
+ if (yych <= '\'') {
+ if (yych <= ' ') goto yy1391;
+ if (yych <= '&') goto yy964;
+ goto yy1083;
+ } else {
+ if (yych == '/') goto yy1393;
+ goto yy964;
+ }
}
} else {
- if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy403;
- goto yy404;
+ if (yych <= 0xDF) {
+ if (yych <= '\\') {
+ if (yych <= '?') goto yy1393;
+ if (yych <= '[') goto yy964;
+ goto yy1093;
+ } else {
+ if (yych <= 0x7F) goto yy964;
+ if (yych <= 0xC1) goto yy73;
+ goto yy1094;
+ }
} else {
- if (yych <= 0xF3) goto yy405;
- if (yych <= 0xF4) goto yy406;
- goto yy1;
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy1095;
+ if (yych <= 0xEF) goto yy1096;
+ goto yy1097;
+ } else {
+ if (yych <= 0xF3) goto yy1098;
+ if (yych <= 0xF4) goto yy1099;
+ goto yy73;
+ }
}
}
-yy308:
+yy1392:
yych = *++YYCURSOR;
- if (yych <= '-') {
- if (yych <= ' ') {
+ if (yych <= '>') {
+ if (yych <= '&') {
if (yych <= '\f') {
- if (yych == '\t') goto yy407;
- goto yy1;
+ if (yych <= 0x00) goto yy73;
+ if (yych == '\t') goto yy1432;
+ goto yy964;
} else {
- if (yych <= '\r') goto yy407;
- if (yych <= 0x1F) goto yy1;
- goto yy407;
+ if (yych <= '\r') goto yy1432;
+ if (yych == ' ') goto yy1432;
+ goto yy964;
}
} else {
- if (yych <= '&') {
- if (yych == '"') goto yy306;
- goto yy1;
+ if (yych <= '.') {
+ if (yych <= '\'') goto yy1083;
+ if (yych == '-') goto yy1392;
+ goto yy964;
} else {
- if (yych <= '\'') goto yy307;
- if (yych <= ',') goto yy1;
- goto yy308;
+ if (yych <= ':') {
+ if (yych >= '0') goto yy1392;
+ } else {
+ if (yych == '=') goto yy1433;
+ goto yy964;
+ }
}
}
} else {
- if (yych <= '@') {
- if (yych <= '<') {
- if (yych <= '/') goto yy1;
- if (yych <= ':') goto yy308;
- goto yy1;
+ if (yych <= 'z') {
+ if (yych <= '[') {
+ if (yych <= '?') goto yy1393;
+ if (yych <= '@') goto yy964;
+ if (yych <= 'Z') goto yy1392;
+ goto yy964;
} else {
- if (yych <= '=') goto yy408;
- if (yych >= '?') goto yy1;
+ if (yych <= '^') {
+ if (yych <= '\\') goto yy1093;
+ goto yy964;
+ } else {
+ if (yych == '`') goto yy964;
+ goto yy1392;
+ }
}
} else {
- if (yych <= '_') {
- if (yych <= 'Z') goto yy308;
- if (yych <= '^') goto yy1;
- goto yy308;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy964;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy1094;
+ goto yy1095;
} else {
- if (yych <= '`') goto yy1;
- if (yych <= 'z') goto yy308;
- goto yy1;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy1096;
+ goto yy1097;
+ } else {
+ if (yych <= 0xF3) goto yy1098;
+ if (yych <= 0xF4) goto yy1099;
+ goto yy73;
+ }
}
}
}
-yy309:
- ++YYCURSOR;
-yy310:
-#line 192 "../../lnav/src/data_scanner_re.re"
- {
- RET(DT_XML_DECL_TAG);
- }
-#line 10017 "../../lnav/src/data_scanner_re.cc"
-yy311:
+yy1393:
yych = *++YYCURSOR;
- if (yych <= ':') {
+ if (yych <= 0x7F) {
+ if (yych <= '=') {
+ if (yych <= 0x00) goto yy73;
+ if (yych == '\'') goto yy1083;
+ goto yy964;
+ } else {
+ if (yych <= '>') goto yy1092;
+ if (yych == '\\') goto yy1093;
+ goto yy964;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy1094;
+ if (yych <= 0xE0) goto yy1095;
+ goto yy1096;
+ } else {
+ if (yych <= 0xF0) goto yy1097;
+ if (yych <= 0xF3) goto yy1098;
+ if (yych <= 0xF4) goto yy1099;
+ goto yy73;
+ }
+ }
+yy1394:
+ yych = *++YYCURSOR;
+ if (yych <= '>') {
if (yych <= 0x1F) {
if (yych <= '\t') {
- if (yych <= 0x08) goto yy1;
- goto yy409;
+ if (yych <= 0x00) goto yy73;
+ if (yych <= 0x08) goto yy954;
+ goto yy1394;
+ } else {
+ if (yych == '\r') goto yy1394;
+ goto yy954;
+ }
+ } else {
+ if (yych <= '"') {
+ if (yych <= ' ') goto yy1394;
+ if (yych <= '!') goto yy954;
+ goto yy1083;
+ } else {
+ if (yych == '/') goto yy1396;
+ goto yy954;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= '\\') {
+ if (yych <= '?') goto yy1396;
+ if (yych <= '[') goto yy954;
+ goto yy1084;
+ } else {
+ if (yych <= 0x7F) goto yy954;
+ if (yych <= 0xC1) goto yy73;
+ goto yy1085;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy1086;
+ if (yych <= 0xEF) goto yy1087;
+ goto yy1088;
+ } else {
+ if (yych <= 0xF3) goto yy1089;
+ if (yych <= 0xF4) goto yy1090;
+ goto yy73;
+ }
+ }
+ }
+yy1395:
+ yych = *++YYCURSOR;
+ if (yych <= '>') {
+ if (yych <= '!') {
+ if (yych <= '\f') {
+ if (yych <= 0x00) goto yy73;
+ if (yych == '\t') goto yy1434;
+ goto yy954;
+ } else {
+ if (yych <= '\r') goto yy1434;
+ if (yych == ' ') goto yy1434;
+ goto yy954;
+ }
+ } else {
+ if (yych <= '.') {
+ if (yych <= '"') goto yy1083;
+ if (yych == '-') goto yy1395;
+ goto yy954;
} else {
- if (yych == '\r') goto yy409;
- goto yy1;
+ if (yych <= ':') {
+ if (yych >= '0') goto yy1395;
+ } else {
+ if (yych == '=') goto yy1435;
+ goto yy954;
+ }
}
+ }
+ } else {
+ if (yych <= 'z') {
+ if (yych <= '[') {
+ if (yych <= '?') goto yy1396;
+ if (yych <= '@') goto yy954;
+ if (yych <= 'Z') goto yy1395;
+ goto yy954;
+ } else {
+ if (yych <= '^') {
+ if (yych <= '\\') goto yy1084;
+ goto yy954;
+ } else {
+ if (yych == '`') goto yy954;
+ goto yy1395;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy954;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy1085;
+ goto yy1086;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy1087;
+ goto yy1088;
+ } else {
+ if (yych <= 0xF3) goto yy1089;
+ if (yych <= 0xF4) goto yy1090;
+ goto yy73;
+ }
+ }
+ }
+ }
+yy1396:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) {
+ if (yych <= '=') {
+ if (yych <= 0x00) goto yy73;
+ if (yych == '"') goto yy1083;
+ goto yy954;
+ } else {
+ if (yych <= '>') goto yy1082;
+ if (yych == '\\') goto yy1084;
+ goto yy954;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) goto yy1085;
+ if (yych <= 0xE0) goto yy1086;
+ goto yy1087;
+ } else {
+ if (yych <= 0xF0) goto yy1088;
+ if (yych <= 0xF3) goto yy1089;
+ if (yych <= 0xF4) goto yy1090;
+ goto yy73;
+ }
+ }
+yy1397:
+ yych = *++YYCURSOR;
+ if (yych == ' ') goto yy1436;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1397;
+ goto yy73;
+yy1398:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy337;
+ if (yych <= '9') goto yy1437;
+ goto yy337;
+ } else {
+ if (yych <= 'F') goto yy1437;
+ if (yych <= '`') goto yy337;
+ if (yych <= 'f') goto yy1413;
+ goto yy337;
+ }
+yy1399:
+ yyaccept = 44;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == ':') goto yy1438;
+yy1400:
+#line 306 "../../lnav/src/data_scanner_re.re"
+ {
+ RET(DT_DATE_TIME);
+ }
+#line 37800 "../../lnav/src/data_scanner_re.cc"
+yy1401:
+ yych = *++YYCURSOR;
+yy1402:
+ if (yych <= 0xDF) {
+ if (yych <= '\n') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= '\t') goto yy1401;
+ goto yy1439;
+ } else {
+ if (yych <= 0x7F) goto yy1401;
+ if (yych <= 0xC1) goto yy73;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy1404;
+ if (yych <= 0xEF) goto yy1405;
+ goto yy1406;
+ } else {
+ if (yych <= 0xF3) goto yy1407;
+ if (yych <= 0xF4) goto yy1408;
+ goto yy73;
+ }
+ }
+yy1403:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy1401;
+ goto yy73;
+yy1404:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy73;
+ if (yych <= 0xBF) goto yy1403;
+ goto yy73;
+yy1405:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy1403;
+ goto yy73;
+yy1406:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy73;
+ if (yych <= 0xBF) goto yy1405;
+ goto yy73;
+yy1407:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy1405;
+ goto yy73;
+yy1408:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0x8F) goto yy1405;
+ goto yy73;
+yy1409:
+ yyaccept = 41;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 0xDF) {
+ if (yych <= ':') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy987;
+ }
+ if (yych <= '9') {
+ yyt1 = YYCURSOR;
+ goto yy1440;
+ }
+ goto yy988;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy987;
+ }
+ if (yych <= 0xC1) goto yy988;
+ yyt2 = YYCURSOR;
+ goto yy990;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy991;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy992;
+ }
+ yyt2 = YYCURSOR;
+ goto yy993;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy994;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy995;
+ }
+ goto yy988;
+ }
+ }
+yy1410:
+ yych = *++YYCURSOR;
+ if (yych == 's') goto yy1441;
+ goto yy73;
+yy1411:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1442;
+ goto yy73;
+yy1412:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1443;
+ goto yy73;
+yy1413:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '-') goto yy1445;
+ goto yy138;
+yy1414:
+ yyaccept = 12;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ if (yych <= '7') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy119;
+ if (yych <= '*') goto yy125;
+ goto yy297;
} else {
if (yych <= '-') {
- if (yych <= ' ') goto yy409;
- if (yych <= ',') goto yy1;
- goto yy311;
+ if (yych <= ',') goto yy125;
+ goto yy297;
} else {
- if (yych <= '.') goto yy1;
- if (yych <= '/') goto yy215;
- goto yy311;
+ if (yych <= '.') goto yy409;
+ if (yych <= '/') goto yy297;
+ goto yy1446;
+ }
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '9') goto yy1447;
+ if (yych <= ':') goto yy297;
+ if (yych <= '?') goto yy125;
+ goto yy297;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy125;
+ goto yy297;
+ } else {
+ if (yych <= '`') goto yy125;
+ if (yych <= 'z') goto yy297;
+ goto yy125;
+ }
+ }
+ }
+yy1415:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ if (yych <= '-') {
+ if (yych == '%') goto yy119;
+ goto yy297;
+ } else {
+ if (yych <= '.') goto yy409;
+ if (yych <= '/') goto yy297;
+ if (yych <= '9') goto yy1447;
+ goto yy297;
+ }
+yy1416:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '%') {
+ if (yych <= '$') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt1 = YYCURSOR;
+ goto yy1026;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1448;
+ yyt2 = YYCURSOR;
+ goto yy1371;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1448;
+ } else {
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1448;
}
}
} else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy1417:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '%') {
+ if (yych <= '$') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt1 = YYCURSOR;
+ goto yy1026;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1449;
+ yyt2 = YYCURSOR;
+ goto yy1311;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1449;
+ } else {
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1449;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy1418:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1450;
+ if (yych <= ':') goto yy1218;
+ goto yy73;
+ } else {
+ if (yych <= 'F') goto yy1450;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy1450;
+ goto yy73;
+ }
+yy1419:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1451;
+ if (yych <= ':') goto yy1375;
+ goto yy73;
+ } else {
+ if (yych <= 'F') goto yy1451;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy1451;
+ goto yy73;
+ }
+yy1420:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1452;
+ if (yych <= ':') goto yy1453;
+ goto yy73;
+ } else {
+ if (yych <= 'F') goto yy1452;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy1452;
+ goto yy73;
+ }
+yy1421:
+ yych = *++YYCURSOR;
+ if (yych <= 'z') {
if (yych <= '@') {
- if (yych <= '=') {
- if (yych <= '<') goto yy1;
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1454;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy310;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= 'F') goto yy1454;
+ goto yy73;
+ } else {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 'f') goto yy1454;
+ goto yy73;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
} else {
- if (yych <= '>') goto yy216;
- if (yych <= '?') goto yy215;
- goto yy1;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy1422:
+ yych = *++YYCURSOR;
+ if (yych <= 'z') {
+ if (yych <= '@') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
+ if (yych <= '9') goto yy1455;
+ if (yych >= ';') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt2 = YYCURSOR;
} else {
- if (yych <= '_') {
- if (yych <= 'Z') goto yy311;
- if (yych <= '^') goto yy1;
- goto yy311;
+ if (yych <= 'Z') {
+ if (yych <= 'F') goto yy1455;
+ goto yy73;
+ } else {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 'f') goto yy1455;
+ goto yy73;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
} else {
- if (yych <= '`') goto yy1;
- if (yych <= 'z') goto yy311;
- goto yy1;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
}
}
}
-yy312:
+yy1423:
yych = *++YYCURSOR;
+ if (yych <= '9') {
+ if (yych == ' ') goto yy305;
+ if (yych <= '/') goto yy73;
+ goto yy1454;
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy73;
+ goto yy1454;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy1454;
+ goto yy73;
+ }
+ }
+yy1424:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) {
+ if (yych <= '@') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy73;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1311;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ yyt2 = YYCURSOR;
+ goto yy315;
+ } else {
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy316;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+yy1425:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ switch (yych) {
+ case '%': goto yy119;
+ case '+':
+ case '-':
+ case '/':
+ case ':':
+ case '@':
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy297;
+ case '.': goto yy443;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy1456;
+ case 'B':
+ case 'b': goto yy1147;
+ case 'E':
+ case 'e': goto yy1148;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy132;
+ case 'S':
+ case 's': goto yy136;
+ case 'm': goto yy139;
+ case 'p':
+ case 'u': goto yy140;
+ default: goto yy24;
+ }
+yy1426:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '-') goto yy1445;
+ goto yy584;
+yy1427:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ':') {
+ if (yych <= '*') {
+ if (yych == '%') goto yy138;
+ goto yy24;
+ } else {
+ if (yych <= '+') goto yy138;
+ if (yych <= ',') goto yy24;
+ if (yych <= '-') goto yy1445;
+ goto yy138;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '?') goto yy24;
+ if (yych <= 'Z') goto yy138;
+ goto yy24;
+ } else {
+ if (yych == '`') goto yy24;
+ if (yych <= 'z') goto yy138;
+ goto yy24;
+ }
+ }
+yy1428:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt1 = YYCURSOR;
+ goto yy444;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1223;
+ yyt2 = YYCURSOR;
+ goto yy1137;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1223;
+ } else {
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1223;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy1429:
+ yych = *++YYCURSOR;
+ if (yych <= '2') {
+ if (yych <= '/') {
+ if (yych == ' ') goto yy305;
+ goto yy73;
+ } else {
+ if (yych <= '0') goto yy1457;
+ if (yych <= '1') goto yy1458;
+ goto yy1459;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '9') goto yy1460;
+ if (yych <= '@') goto yy73;
+ goto yy1222;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy1222;
+ goto yy73;
+ }
+ }
+yy1430:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt1 = YYCURSOR;
+ goto yy444;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1461;
+ yyt2 = YYCURSOR;
+ goto yy1137;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1223;
+ } else {
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1223;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy1431:
+ yych = *++YYCURSOR;
+ if (yych <= '`') {
+ if (yych <= '9') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt1 = YYCURSOR;
+ goto yy444;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '5') goto yy1461;
+ goto yy1223;
+ }
+ } else {
+ if (yych <= '@') {
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1137;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'F') goto yy1223;
+ if (yych <= 'Z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= 'f') goto yy1223;
+ goto yy73;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy1432:
+ yych = *++YYCURSOR;
+ if (yych <= '=') {
if (yych <= 0x1F) {
if (yych <= '\t') {
- if (yych <= 0x08) goto yy1;
- goto yy312;
+ if (yych <= 0x00) goto yy73;
+ if (yych <= 0x08) goto yy964;
+ goto yy1432;
} else {
- if (yych == '\r') goto yy312;
- goto yy1;
+ if (yych == '\r') goto yy1432;
+ goto yy964;
}
} else {
- if (yych <= '-') {
- if (yych <= ' ') goto yy312;
- if (yych <= ',') goto yy1;
- goto yy311;
+ if (yych <= '\'') {
+ if (yych <= ' ') goto yy1432;
+ if (yych <= '&') goto yy964;
+ goto yy1083;
} else {
- if (yych <= '.') goto yy1;
- if (yych <= '/') goto yy215;
- goto yy311;
+ if (yych == '/') goto yy1393;
+ if (yych <= '<') goto yy964;
}
}
} else {
- if (yych <= '@') {
- if (yych <= '=') {
- if (yych <= '<') goto yy1;
+ if (yych <= 0xC1) {
+ if (yych <= '[') {
+ if (yych == '?') goto yy1393;
+ goto yy964;
} else {
- if (yych <= '>') goto yy216;
- if (yych <= '?') goto yy215;
- goto yy1;
+ if (yych <= '\\') goto yy1093;
+ if (yych <= 0x7F) goto yy964;
+ goto yy73;
}
} else {
- if (yych <= '_') {
- if (yych <= 'Z') goto yy311;
- if (yych <= '^') goto yy1;
- goto yy311;
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy1094;
+ if (yych <= 0xE0) goto yy1095;
+ goto yy1096;
} else {
- if (yych <= '`') goto yy1;
- if (yych <= 'z') goto yy311;
- goto yy1;
+ if (yych <= 0xF0) goto yy1097;
+ if (yych <= 0xF3) goto yy1098;
+ if (yych <= 0xF4) goto yy1099;
+ goto yy73;
}
}
}
-yy313:
+yy1433:
yych = *++YYCURSOR;
- if (yych <= '\'') {
+ if (yych <= '>') {
if (yych <= '\r') {
if (yych <= 0x08) {
- if (yych <= 0x00) goto yy1;
- goto yy410;
+ if (yych <= 0x00) goto yy73;
+ goto yy814;
} else {
- if (yych <= '\t') goto yy411;
- if (yych <= '\f') goto yy410;
- goto yy411;
+ if (yych <= '\t') goto yy1091;
+ if (yych <= '\f') goto yy814;
+ goto yy1091;
}
} else {
if (yych <= '!') {
- if (yych == ' ') goto yy411;
- goto yy410;
+ if (yych == ' ') goto yy1091;
+ goto yy814;
} else {
- if (yych <= '"') goto yy412;
- if (yych <= '&') goto yy410;
- goto yy413;
+ if (yych <= '"') goto yy1189;
+ if (yych <= '=') goto yy814;
+ goto yy964;
}
}
} else {
if (yych <= 0xDF) {
- if (yych <= '>') {
- if (yych <= '=') goto yy410;
- goto yy1;
+ if (yych <= '\\') {
+ if (yych <= '[') goto yy814;
+ goto yy965;
} else {
- if (yych <= 0x7F) goto yy410;
- if (yych <= 0xC1) goto yy1;
- goto yy414;
+ if (yych <= 0x7F) goto yy814;
+ if (yych <= 0xC1) goto yy73;
+ goto yy966;
}
} else {
if (yych <= 0xF0) {
- if (yych <= 0xE0) goto yy415;
- if (yych <= 0xEF) goto yy416;
- goto yy417;
+ if (yych <= 0xE0) goto yy967;
+ if (yych <= 0xEF) goto yy968;
+ goto yy969;
} else {
- if (yych <= 0xF3) goto yy418;
- if (yych <= 0xF4) goto yy419;
- goto yy1;
+ if (yych <= 0xF3) goto yy970;
+ if (yych <= 0xF4) goto yy971;
+ goto yy73;
}
}
}
-yy314:
+yy1434:
+ yych = *++YYCURSOR;
+ if (yych <= '=') {
+ if (yych <= 0x1F) {
+ if (yych <= '\t') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= 0x08) goto yy954;
+ goto yy1434;
+ } else {
+ if (yych == '\r') goto yy1434;
+ goto yy954;
+ }
+ } else {
+ if (yych <= '"') {
+ if (yych <= ' ') goto yy1434;
+ if (yych <= '!') goto yy954;
+ goto yy1083;
+ } else {
+ if (yych == '/') goto yy1396;
+ if (yych <= '<') goto yy954;
+ }
+ }
+ } else {
+ if (yych <= 0xC1) {
+ if (yych <= '[') {
+ if (yych == '?') goto yy1396;
+ goto yy954;
+ } else {
+ if (yych <= '\\') goto yy1084;
+ if (yych <= 0x7F) goto yy954;
+ goto yy73;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy1085;
+ if (yych <= 0xE0) goto yy1086;
+ goto yy1087;
+ } else {
+ if (yych <= 0xF0) goto yy1088;
+ if (yych <= 0xF3) goto yy1089;
+ if (yych <= 0xF4) goto yy1090;
+ goto yy73;
+ }
+ }
+ }
+yy1435:
+ yych = *++YYCURSOR;
+ if (yych <= '>') {
+ if (yych <= '\r') {
+ if (yych <= 0x08) {
+ if (yych <= 0x00) goto yy73;
+ goto yy813;
+ } else {
+ if (yych <= '\t') goto yy1081;
+ if (yych <= '\f') goto yy813;
+ goto yy1081;
+ }
+ } else {
+ if (yych <= '&') {
+ if (yych == ' ') goto yy1081;
+ goto yy813;
+ } else {
+ if (yych <= '\'') goto yy1189;
+ if (yych <= '=') goto yy813;
+ goto yy954;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= '\\') {
+ if (yych <= '[') goto yy813;
+ goto yy955;
+ } else {
+ if (yych <= 0x7F) goto yy813;
+ if (yych <= 0xC1) goto yy73;
+ goto yy956;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy957;
+ if (yych <= 0xEF) goto yy958;
+ goto yy959;
+ } else {
+ if (yych <= 0xF3) goto yy960;
+ if (yych <= 0xF4) goto yy961;
+ goto yy73;
+ }
+ }
+ }
+yy1436:
+ yych = *++YYCURSOR;
+ if (yych == '@') goto yy1462;
+ goto yy73;
+yy1437:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '-') goto yy1463;
+ goto yy337;
+yy1438:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1464;
+ goto yy73;
+yy1439:
++YYCURSOR;
-yy315:
-#line 196 "../../lnav/src/data_scanner_re.re"
+#line 344 "../../lnav/src/data_scanner_re.re"
{
- RET(DT_XML_EMPTY_TAG);
+ CAPTURE(DT_H1);
+ cap_inner.c_end = cap_inner.c_begin;
+ this->ds_bol = true;
+ return tokenize_result{token_out, cap_all, cap_inner, this->ds_input.data()};
}
-#line 10156 "../../lnav/src/data_scanner_re.cc"
-yy316:
- yych = *++YYCURSOR;
- if (yych <= '\r') {
- if (yych == '\t') goto yy316;
- if (yych <= '\f') goto yy1;
- goto yy316;
+#line 38897 "../../lnav/src/data_scanner_re.cc"
+yy1440:
+ yyaccept = 41;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 0xDF) {
+ if (yych <= ':') {
+ if (yych <= '9') {
+ yyt2 = YYCURSOR;
+ goto yy987;
+ }
+ goto yy988;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy987;
+ }
+ if (yych <= 0xC1) goto yy988;
+ yyt2 = YYCURSOR;
+ goto yy990;
+ }
} else {
- if (yych <= ' ') {
- if (yych <= 0x1F) goto yy1;
- goto yy316;
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy991;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy992;
+ }
+ yyt2 = YYCURSOR;
+ goto yy993;
} else {
- if (yych != '>') goto yy1;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy994;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy995;
+ }
+ goto yy988;
}
}
-yy317:
- ++YYCURSOR;
-#line 204 "../../lnav/src/data_scanner_re.re"
+yy1441:
+ yyaccept = 10;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == ' ') goto yy1465;
+ goto yy114;
+yy1442:
+ yych = *++YYCURSOR;
+ if (yych == ' ') goto yy1466;
+ goto yy73;
+yy1443:
+ yyaccept = 45;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == ':') goto yy1467;
+yy1444:
+#line 303 "../../lnav/src/data_scanner_re.re"
{
- RET(DT_XML_CLOSE_TAG);
+ RET(DT_DATE_TIME);
}
-#line 10177 "../../lnav/src/data_scanner_re.cc"
-yy318:
+#line 38959 "../../lnav/src/data_scanner_re.cc"
+yy1445:
yych = *++YYCURSOR;
-yy319:
- if (yych <= '/') {
- if (yych <= 0x1F) {
- if (yych <= '\t') {
- if (yych <= 0x08) goto yy1;
- goto yy318;
+ if (yych <= 'Z') {
+ if (yych <= '9') {
+ if (yych <= '/') goto yy89;
+ goto yy1468;
+ } else {
+ if (yych <= '@') goto yy89;
+ if (yych <= 'F') goto yy1468;
+ goto yy137;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych == '_') goto yy137;
+ goto yy89;
+ } else {
+ if (yych <= 'f') goto yy1468;
+ if (yych <= 'z') goto yy137;
+ goto yy89;
+ }
+ }
+yy1446:
+ yyaccept = 12;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ if (yych <= '7') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy119;
+ if (yych <= '*') goto yy125;
+ goto yy297;
+ } else {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy125;
+ goto yy297;
} else {
- if (yych == '\r') goto yy318;
- goto yy1;
+ if (yych <= '.') goto yy409;
+ if (yych <= '/') goto yy297;
+ goto yy1469;
}
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '9') goto yy1470;
+ if (yych <= ':') goto yy297;
+ if (yych <= '?') goto yy125;
+ goto yy297;
} else {
- if (yych <= ',') {
- if (yych <= ' ') goto yy318;
- goto yy1;
+ if (yych <= '_') {
+ if (yych <= '^') goto yy125;
+ goto yy297;
} else {
- if (yych <= '-') goto yy420;
- if (yych <= '.') goto yy1;
- goto yy215;
+ if (yych <= '`') goto yy125;
+ if (yych <= 'z') goto yy297;
+ goto yy125;
}
}
+ }
+yy1447:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ if (yych <= '-') {
+ if (yych == '%') goto yy119;
+ goto yy297;
} else {
- if (yych <= 'Z') {
- if (yych <= '>') {
- if (yych <= ':') goto yy420;
- goto yy1;
+ if (yych <= '.') goto yy409;
+ if (yych <= '/') goto yy297;
+ if (yych <= '9') goto yy1470;
+ goto yy297;
+ }
+yy1448:
+ yych = *++YYCURSOR;
+ if (yych <= 'z') {
+ if (yych <= '9') {
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy1026;
+ }
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy73;
+ } else {
+ if (yych <= '@') {
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1371;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
} else {
- if (yych <= '?') goto yy215;
- if (yych <= '@') goto yy1;
- goto yy420;
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy73;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
} else {
- if (yych <= '_') {
- if (yych <= '^') goto yy1;
- goto yy420;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
} else {
- if (yych <= '`') goto yy1;
- if (yych <= 'z') goto yy420;
- goto yy1;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
}
}
}
-yy320:
+yy1449:
yych = *++YYCURSOR;
- if (yych <= ':') {
- if (yych <= 0x1F) {
- if (yych <= '\t') {
- if (yych <= 0x08) goto yy1;
- goto yy421;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '%') {
+ if (yych <= '$') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt1 = YYCURSOR;
+ goto yy1026;
} else {
- if (yych == '\r') goto yy421;
- goto yy1;
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1471;
+ yyt2 = YYCURSOR;
+ goto yy1311;
}
} else {
- if (yych <= '-') {
- if (yych <= ' ') goto yy421;
- if (yych <= ',') goto yy1;
- goto yy320;
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1471;
} else {
- if (yych <= '.') goto yy1;
- if (yych <= '/') goto yy215;
- goto yy320;
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1471;
}
}
} else {
- if (yych <= '@') {
- if (yych <= '=') {
- if (yych <= '<') goto yy1;
- goto yy422;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
} else {
- if (yych == '?') goto yy215;
- goto yy1;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
}
} else {
- if (yych <= '_') {
- if (yych <= 'Z') goto yy320;
- if (yych <= '^') goto yy1;
- goto yy320;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
} else {
- if (yych <= '`') goto yy1;
- if (yych <= 'z') goto yy320;
- goto yy1;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
}
}
}
-yy321:
- yyaccept = 0;
+yy1450:
+ yyaccept = 32;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ':') {
- if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
+ if (yych <= '-') {
+ if (yych <= ',') goto yy544;
+ goto yy713;
} else {
- if (yych <= '.') {
- if (yych <= ',') goto yy4;
- goto yy46;
+ if (yych <= '/') goto yy544;
+ if (yych <= '9') goto yy1307;
+ goto yy1472;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy544;
+ goto yy1307;
+ } else {
+ if (yych <= '`') goto yy544;
+ if (yych <= 'f') goto yy1307;
+ goto yy544;
+ }
+ }
+yy1451:
+ yych = *++YYCURSOR;
+ if (yych == ':') goto yy1375;
+ goto yy73;
+yy1452:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1473;
+ if (yych >= ';') goto yy73;
+ } else {
+ if (yych <= 'F') goto yy1473;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy1473;
+ goto yy73;
+ }
+yy1453:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1454;
+ if (yych <= ':') goto yy1230;
+ goto yy73;
+ } else {
+ if (yych <= 'F') goto yy1454;
+ if (yych <= '`') goto yy73;
+ if (yych >= 'g') goto yy73;
+ }
+yy1454:
+ yych = *++YYCURSOR;
+ if (yych <= 'z') {
+ if (yych <= '@') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1474;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy310;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= 'F') goto yy1474;
+ goto yy73;
} else {
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy423;
- goto yy365;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 'f') goto yy1474;
+ goto yy73;
}
}
} else {
- if (yych <= '^') {
- if (yych <= '@') {
- if (yych <= '?') goto yy4;
- goto yy96;
- } else {
- if (yych <= 'F') goto yy423;
- if (yych <= 'Z') goto yy115;
- goto yy4;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
} else {
- if (yych <= '`') {
- if (yych <= '_') goto yy46;
- goto yy4;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
} else {
- if (yych <= 'f') goto yy423;
- if (yych <= 'z') goto yy115;
- goto yy4;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
}
}
}
-yy322:
+yy1455:
yych = *++YYCURSOR;
- if (yych == ' ') goto yy424;
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy424;
- goto yy1;
-yy323:
- yyaccept = 15;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == ' ') goto yy424;
- if (yych <= '/') goto yy222;
- if (yych <= '9') goto yy424;
- goto yy222;
-yy324:
- yyaccept = 15;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= ':') {
- if (yych <= '.') goto yy222;
- if (yych <= '/') goto yy189;
- if (yych <= '9') goto yy192;
- goto yy191;
+ if (yych <= 'z') {
+ if (yych <= '@') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1475;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1423;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= 'F') goto yy1475;
+ goto yy73;
+ } else {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 'f') goto yy1475;
+ goto yy73;
+ }
+ }
} else {
- if (yych <= 'F') {
- if (yych <= '@') goto yy222;
- goto yy192;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
} else {
- if (yych <= '`') goto yy222;
- if (yych <= 'f') goto yy192;
- goto yy222;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
}
}
-yy325:
- yyaccept = 0;
+yy1456:
+ yyaccept = 3;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= ',') {
- if (yych <= '!') {
- if (yych <= '\f') {
- if (yych <= 0x00) {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ switch (yych) {
+ case '%': goto yy119;
+ case '+':
+ case '-':
+ case '/':
+ case ':':
+ case '@':
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy297;
+ case '.': goto yy443;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy1476;
+ case 'B':
+ case 'b': goto yy1147;
+ case 'E':
+ case 'e': goto yy1148;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy132;
+ case 'S':
+ case 's': goto yy136;
+ case 'm': goto yy139;
+ case 'p':
+ case 'u': goto yy140;
+ default: goto yy24;
+ }
+yy1457:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') {
- yyt4 = YYCURSOR;
- goto yy221;
+ yyt1 = YYCURSOR;
+ goto yy444;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
- goto yy4;
+ if (yych <= '9') goto yy1477;
+ yyt2 = YYCURSOR;
+ goto yy1478;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1312;
} else {
- if (yych <= '\r') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
- if (yych <= 0x1F) goto yy4;
- if (yych <= ' ') {
- yyt4 = YYCURSOR;
- goto yy221;
+ goto yy1312;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
}
- yyt4 = YYCURSOR;
- goto yy223;
+ yyt2 = YYCURSOR;
+ goto yy314;
}
} else {
- if (yych <= '&') {
- if (yych <= '"') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
}
- if (yych == '%') goto yy80;
- goto yy4;
+ yyt2 = YYCURSOR;
+ goto yy316;
} else {
- if (yych <= '\'') {
- yyt4 = YYCURSOR;
- goto yy224;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
}
- if (yych <= '*') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
}
- if (yych <= '+') goto yy80;
- yyt4 = YYCURSOR;
- goto yy223;
+ goto yy73;
+ }
+ }
+ }
+yy1458:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt1 = YYCURSOR;
+ goto yy444;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1479;
+ yyt2 = YYCURSOR;
+ goto yy1311;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1312;
+ } else {
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1312;
}
}
} else {
- if (yych <= '?') {
- if (yych <= '9') {
- if (yych <= '-') goto yy46;
- if (yych <= '.') {
- yyt4 = YYCURSOR;
- goto yy230;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
}
- if (yych <= '/') goto yy4;
- goto yy423;
+ goto yy73;
+ }
+ }
+ }
+yy1459:
+ yych = *++YYCURSOR;
+ if (yych <= '`') {
+ if (yych <= '5') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt1 = YYCURSOR;
+ goto yy444;
} else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '4') goto yy1479;
+ goto yy1480;
+ }
+ } else {
+ if (yych <= '@') {
+ if (yych <= '9') goto yy1477;
if (yych <= ':') {
- yyt3 = YYCURSOR;
- goto yy425;
+ yyt2 = YYCURSOR;
+ goto yy1311;
}
- if (yych <= ';') {
- yyt4 = YYCURSOR;
- goto yy221;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'F') goto yy1312;
+ if (yych <= 'Z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= 'f') goto yy1312;
+ goto yy73;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
- if (yych <= '>') goto yy4;
- yyt4 = YYCURSOR;
- goto yy223;
+ if (yych <= 0xC1) goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy313;
}
} else {
- if (yych <= '^') {
- if (yych <= '@') goto yy96;
- if (yych <= 'F') goto yy423;
- if (yych <= 'Z') goto yy115;
- goto yy4;
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
} else {
- if (yych <= '`') {
- if (yych <= '_') goto yy46;
- goto yy4;
- } else {
- if (yych <= 'f') goto yy426;
- if (yych >= '{') goto yy4;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
}
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
}
}
}
-yy326:
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '.') {
- if (yych <= '!') {
- if (yych <= '\r') {
- if (yych <= 0x08) {
- if (yych <= 0x00) {
- yyt4 = YYCURSOR;
- goto yy221;
- }
- goto yy3;
- } else {
- if (yych <= '\n') {
- yyt4 = YYCURSOR;
- goto yy221;
- }
- if (yych <= '\f') goto yy3;
- yyt4 = YYCURSOR;
- goto yy221;
+yy1460:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
+ yyt1 = YYCURSOR;
+ goto yy444;
} else {
- if (yych <= 0x1B) {
- if (yych <= 0x1A) goto yy3;
- goto yy5;
- } else {
- if (yych <= 0x1F) goto yy3;
- if (yych <= ' ') {
- yyt4 = YYCURSOR;
- goto yy221;
- }
- yyt4 = YYCURSOR;
- goto yy223;
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
+ if (yych <= '9') goto yy1477;
+ yyt2 = YYCURSOR;
+ goto yy1311;
}
} else {
- if (yych <= '&') {
- if (yych <= '#') {
- if (yych <= '"') {
- yyt4 = YYCURSOR;
- goto yy221;
- }
- goto yy5;
- } else {
- if (yych <= '$') goto yy3;
- if (yych <= '%') goto yy80;
- goto yy5;
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
+ goto yy1312;
} else {
- if (yych <= '+') {
- if (yych <= '\'') {
- yyt4 = YYCURSOR;
- goto yy224;
- }
- if (yych <= '*') {
- yyt4 = YYCURSOR;
- goto yy221;
- }
- goto yy80;
- } else {
- if (yych <= ',') {
- yyt4 = YYCURSOR;
- goto yy223;
- }
- if (yych <= '-') goto yy46;
- yyt4 = YYCURSOR;
- goto yy230;
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
+ goto yy1312;
}
}
} else {
- if (yych <= '`') {
- if (yych <= '>') {
- if (yych <= '9') {
- if (yych <= '/') goto yy3;
- goto yy115;
- } else {
- if (yych <= ':') {
- yyt3 = YYCURSOR;
- goto yy234;
- }
- if (yych <= ';') {
- yyt4 = YYCURSOR;
- goto yy221;
- }
- goto yy5;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
}
+ yyt2 = YYCURSOR;
+ goto yy316;
} else {
- if (yych <= 'Z') {
- if (yych <= '?') {
- yyt4 = YYCURSOR;
- goto yy223;
- }
- if (yych <= '@') goto yy96;
- goto yy115;
- } else {
- if (yych == '_') goto yy46;
- goto yy5;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy1461:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
+ yyt1 = YYCURSOR;
+ goto yy444;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1315;
+ yyt2 = YYCURSOR;
+ goto yy1137;
}
} else {
- if (yych <= 0xDF) {
- if (yych <= '~') {
- if (yych <= 'z') goto yy326;
- goto yy5;
- } else {
- if (yych <= 0x7F) goto yy3;
- if (yych <= 0xC1) goto yy5;
- goto yy56;
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
+ goto yy1315;
} else {
- if (yych <= 0xF0) {
- if (yych <= 0xE0) goto yy57;
- if (yych <= 0xEF) goto yy58;
- goto yy59;
- } else {
- if (yych <= 0xF3) goto yy60;
- if (yych <= 0xF4) goto yy61;
- goto yy5;
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1315;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
}
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
}
}
}
-yy327:
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= ':') {
+yy1462:
+ yych = *++YYCURSOR;
+ if (yych == '@') goto yy1481;
+ goto yy73;
+yy1463:
+ yych = *++YYCURSOR;
+ if (yych <= '9') {
if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
+ if (yych == '%') goto yy88;
+ if (yych <= '*') goto yy153;
+ goto yy88;
} else {
- if (yych <= '.') {
- if (yych <= ',') goto yy4;
- goto yy46;
+ if (yych <= '-') {
+ if (yych <= ',') goto yy153;
+ goto yy335;
} else {
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy115;
- goto yy148;
+ if (yych <= '.') goto yy88;
+ if (yych <= '/') goto yy153;
+ goto yy1482;
}
}
} else {
- if (yych <= 'Z') {
+ if (yych <= '^') {
if (yych <= '@') {
- if (yych <= '?') goto yy4;
- goto yy96;
+ if (yych <= '?') goto yy153;
+ goto yy90;
} else {
- if (yych == 'E') goto yy329;
- goto yy115;
+ if (yych <= 'F') goto yy1482;
+ if (yych <= 'Z') goto yy336;
+ goto yy153;
}
} else {
+ if (yych <= '`') {
+ if (yych <= '_') goto yy336;
+ goto yy153;
+ } else {
+ if (yych <= 'f') goto yy1468;
+ if (yych <= 'z') goto yy137;
+ goto yy153;
+ }
+ }
+ }
+yy1464:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1483;
+ goto yy73;
+yy1465:
+ yych = *++YYCURSOR;
+ if (yych == '(') goto yy1484;
+ goto yy73;
+yy1466:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1485;
+ goto yy73;
+yy1467:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1486;
+ goto yy73;
+yy1468:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy138;
+ if (yych <= '9') goto yy1487;
+ goto yy138;
+ } else {
+ if (yych <= 'F') goto yy1487;
+ if (yych <= '`') goto yy138;
+ if (yych <= 'f') goto yy1487;
+ goto yy138;
+ }
+yy1469:
+ yyaccept = 12;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ if (yych <= '7') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy119;
+ if (yych <= '*') goto yy125;
+ goto yy297;
+ } else {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy125;
+ goto yy297;
+ } else {
+ if (yych <= '.') goto yy409;
+ if (yych <= '/') goto yy297;
+ goto yy1488;
+ }
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '9') goto yy1489;
+ if (yych <= ':') goto yy297;
+ if (yych <= '?') goto yy125;
+ goto yy297;
+ } else {
if (yych <= '_') {
- if (yych <= '^') goto yy4;
- goto yy46;
+ if (yych <= '^') goto yy125;
+ goto yy297;
} else {
- if (yych <= '`') goto yy4;
- if (yych <= 'z') goto yy115;
- goto yy4;
+ if (yych <= '`') goto yy125;
+ if (yych <= 'z') goto yy297;
+ goto yy125;
}
}
}
-yy328:
- yyaccept = 0;
+yy1470:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= ',') {
- if (yych <= '!') {
- if (yych <= '\f') {
- if (yych <= 0x00) {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ if (yych <= '-') {
+ if (yych == '%') goto yy119;
+ goto yy297;
+ } else {
+ if (yych <= '.') goto yy409;
+ if (yych <= '/') goto yy297;
+ if (yych <= '9') goto yy1489;
+ goto yy297;
+ }
+yy1471:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '%') {
+ if (yych <= '$') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') {
- yyt4 = YYCURSOR;
- goto yy221;
+ yyt1 = YYCURSOR;
+ goto yy1026;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1490;
+ yyt2 = YYCURSOR;
+ goto yy1311;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
- goto yy4;
+ goto yy1490;
} else {
- if (yych <= '\r') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
- if (yych <= 0x1F) goto yy4;
- if (yych <= ' ') {
- yyt4 = YYCURSOR;
- goto yy221;
+ goto yy1490;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
}
- yyt4 = YYCURSOR;
- goto yy223;
+ yyt2 = YYCURSOR;
+ goto yy314;
}
} else {
- if (yych <= '&') {
- if (yych <= '"') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
}
- if (yych == '%') goto yy80;
- goto yy4;
+ yyt2 = YYCURSOR;
+ goto yy316;
} else {
- if (yych <= '\'') {
- yyt4 = YYCURSOR;
- goto yy224;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
}
- if (yych <= '*') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
}
- if (yych <= '+') goto yy80;
- yyt4 = YYCURSOR;
- goto yy223;
+ goto yy73;
}
}
+ }
+yy1472:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1491;
+ if (yych <= ':') goto yy1309;
+ goto yy73;
} else {
- if (yych <= '?') {
- if (yych <= '9') {
- if (yych <= '-') goto yy46;
- if (yych <= '.') {
- yyt4 = YYCURSOR;
- goto yy230;
+ if (yych <= 'F') goto yy1491;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy1491;
+ goto yy73;
+ }
+yy1473:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1492;
+ if (yych <= ':') goto yy1453;
+ goto yy73;
+ } else {
+ if (yych <= 'F') goto yy1492;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy1492;
+ goto yy73;
+ }
+yy1474:
+ yych = *++YYCURSOR;
+ if (yych <= 'z') {
+ if (yych <= '@') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1493;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy310;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= 'F') goto yy1493;
+ goto yy73;
+ } else {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
- if (yych <= '/') goto yy4;
- goto yy115;
+ if (yych <= 'f') goto yy1493;
+ goto yy73;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy1475:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) {
+ if (yych <= '@') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy73;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1423;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ yyt2 = YYCURSOR;
+ goto yy315;
+ } else {
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy316;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+yy1476:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ switch (yych) {
+ case '%': goto yy119;
+ case '+':
+ case '-':
+ case '/':
+ case ':':
+ case '@':
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy297;
+ case '.': goto yy443;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy1494;
+ case 'B':
+ case 'b': goto yy1147;
+ case 'E':
+ case 'e': goto yy1148;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy132;
+ case 'S':
+ case 's': goto yy136;
+ case 'm': goto yy139;
+ case 'p':
+ case 'u': goto yy140;
+ default: goto yy24;
+ }
+yy1477:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt1 = YYCURSOR;
+ goto yy444;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1377;
+ yyt2 = YYCURSOR;
+ goto yy1311;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1377;
+ } else {
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1377;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy1478:
+ yych = *++YYCURSOR;
+ if (yych <= '2') {
+ if (yych <= '/') {
+ if (yych == ' ') goto yy305;
+ goto yy73;
+ } else {
+ if (yych <= '0') goto yy1495;
+ if (yych <= '1') goto yy1496;
+ goto yy1497;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '9') goto yy1495;
+ if (yych <= '@') goto yy73;
+ goto yy1376;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy1376;
+ goto yy73;
+ }
+ }
+yy1479:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt1 = YYCURSOR;
+ goto yy444;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1498;
+ yyt2 = YYCURSOR;
+ goto yy1311;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1377;
+ } else {
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1377;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
} else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy1480:
+ yych = *++YYCURSOR;
+ if (yych <= '`') {
+ if (yych <= '9') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt1 = YYCURSOR;
+ goto yy444;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '5') goto yy1498;
+ goto yy1377;
+ }
+ } else {
+ if (yych <= '@') {
if (yych <= ':') {
- yyt3 = YYCURSOR;
- goto yy234;
+ yyt2 = YYCURSOR;
+ goto yy1311;
}
- if (yych <= ';') {
- yyt4 = YYCURSOR;
- goto yy221;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'F') goto yy1377;
+ if (yych <= 'Z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= 'f') goto yy1377;
+ goto yy73;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
- if (yych <= '>') goto yy4;
- yyt4 = YYCURSOR;
- goto yy223;
+ if (yych <= 0xC1) goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy313;
}
} else {
- if (yych <= '_') {
- if (yych <= '@') goto yy96;
- if (yych <= 'Z') goto yy115;
- if (yych <= '^') goto yy4;
- goto yy46;
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
} else {
- if (yych <= 'd') {
- if (yych <= '`') goto yy4;
- goto yy326;
- } else {
- if (yych <= 'e') goto yy330;
- if (yych <= 'z') goto yy326;
- goto yy4;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
}
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
}
}
}
-yy329:
- yyaccept = 0;
+yy1481:
+ yych = *++YYCURSOR;
+ if (yych == ' ') goto yy1499;
+ goto yy73;
+yy1482:
+ yyaccept = 14;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 64) {
- goto yy115;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy337;
+ if (yych <= '9') goto yy1500;
+ goto yy337;
+ } else {
+ if (yych <= 'F') goto yy1500;
+ if (yych <= '`') goto yy337;
+ if (yych <= 'f') goto yy1487;
+ goto yy337;
}
- if (yych <= '*') {
- if (yych <= 0x1F) {
- if (yych <= '\n') {
- if (yych <= 0x00) {
+yy1483:
+ yyaccept = 44;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '.') goto yy1501;
+ goto yy1400;
+yy1484:
+ yych = *++YYCURSOR;
+ if (yych == 'x') goto yy1502;
+ goto yy73;
+yy1485:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1503;
+ goto yy73;
+yy1486:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1504;
+ goto yy73;
+yy1487:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy138;
+ if (yych <= '9') goto yy1505;
+ goto yy138;
+ } else {
+ if (yych <= 'F') goto yy1505;
+ if (yych <= '`') goto yy138;
+ if (yych <= 'f') goto yy1505;
+ goto yy138;
+ }
+yy1488:
+ yyaccept = 12;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'F') {
+ if (yych <= ',') {
+ if (yych <= '$') {
+ if (yych == ' ') {
yyt1 = YYCURSOR;
- goto yy427;
+ goto yy1508;
}
- if (yych <= 0x08) goto yy4;
yyt1 = YYCURSOR;
- goto yy427;
+ goto yy1506;
} else {
- if (yych == '\r') {
+ if (yych <= '%') {
+ yyt1 = YYCURSOR;
+ goto yy1509;
+ }
+ if (yych == '+') {
yyt1 = YYCURSOR;
- goto yy427;
+ goto yy1509;
}
- goto yy4;
+ yyt1 = YYCURSOR;
+ goto yy1506;
}
} else {
- if (yych <= '"') {
- if (yych == '!') {
+ if (yych <= '9') {
+ if (yych <= '-') {
yyt1 = YYCURSOR;
- goto yy429;
+ goto yy1510;
}
- yyt1 = YYCURSOR;
- goto yy427;
+ if (yych <= '.') {
+ yyt1 = YYCURSOR;
+ goto yy1511;
+ }
+ if (yych <= '/') {
+ yyt1 = YYCURSOR;
+ goto yy1512;
+ }
+ goto yy1514;
} else {
- if (yych == '%') goto yy80;
- if (yych <= '&') goto yy4;
+ if (yych <= ':') {
+ yyt1 = YYCURSOR;
+ goto yy1516;
+ }
+ if (yych <= '?') {
+ yyt1 = YYCURSOR;
+ goto yy1506;
+ }
+ if (yych <= '@') {
+ yyt1 = YYCURSOR;
+ goto yy1517;
+ }
yyt1 = YYCURSOR;
- goto yy427;
+ goto yy1518;
}
}
} else {
- if (yych <= ':') {
- if (yych <= '-') {
- if (yych <= '+') goto yy80;
- if (yych <= ',') {
+ if (yych <= 0x7F) {
+ if (yych <= '_') {
+ if (yych <= 'Z') {
yyt1 = YYCURSOR;
- goto yy429;
+ goto yy1519;
}
- goto yy46;
+ if (yych <= '^') {
+ yyt1 = YYCURSOR;
+ goto yy1506;
+ }
+ yyt1 = YYCURSOR;
+ goto yy1520;
} else {
- if (yych <= '.') {
+ if (yych <= '`') {
+ yyt1 = YYCURSOR;
+ goto yy1506;
+ }
+ if (yych <= 'f') {
yyt1 = YYCURSOR;
- goto yy430;
+ goto yy1518;
+ }
+ if (yych <= 'z') {
+ yyt1 = YYCURSOR;
+ goto yy1519;
}
- if (yych <= '/') goto yy4;
yyt1 = YYCURSOR;
- goto yy431;
+ goto yy1506;
}
} else {
- if (yych <= '?') {
- if (yych <= ';') {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy1514;
+ if (yych <= 0xDF) {
yyt1 = YYCURSOR;
- goto yy427;
+ goto yy1521;
+ }
+ if (yych <= 0xE0) {
+ yyt1 = YYCURSOR;
+ goto yy1522;
}
- if (yych <= '>') goto yy4;
yyt1 = YYCURSOR;
- goto yy429;
+ goto yy1523;
} else {
- if (yych <= '@') goto yy96;
- if (yych == '_') goto yy46;
- goto yy4;
+ if (yych <= 0xF0) {
+ yyt1 = YYCURSOR;
+ goto yy1524;
+ }
+ if (yych <= 0xF3) {
+ yyt1 = YYCURSOR;
+ goto yy1525;
+ }
+ if (yych <= 0xF4) {
+ yyt1 = YYCURSOR;
+ goto yy1526;
+ }
+ goto yy1514;
}
}
}
-yy330:
- yyaccept = 0;
+yy1489:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '+') {
- if (yych <= ' ') {
- if (yych <= '\n') {
- if (yych <= 0x00) {
+ if (yych <= 'F') {
+ if (yych <= ',') {
+ if (yych <= '$') {
+ if (yych == ' ') {
yyt1 = YYCURSOR;
- goto yy427;
+ goto yy1508;
}
- if (yych <= 0x08) goto yy4;
yyt1 = YYCURSOR;
- goto yy427;
+ goto yy1506;
} else {
- if (yych == '\r') {
+ if (yych <= '%') {
yyt1 = YYCURSOR;
- goto yy427;
+ goto yy1509;
+ }
+ if (yych == '+') {
+ yyt1 = YYCURSOR;
+ goto yy1509;
}
- if (yych <= 0x1F) goto yy4;
yyt1 = YYCURSOR;
- goto yy427;
+ goto yy1506;
}
} else {
- if (yych <= '%') {
- if (yych <= '!') {
+ if (yych <= '9') {
+ if (yych <= '-') {
yyt1 = YYCURSOR;
- goto yy429;
+ goto yy1510;
}
- if (yych <= '"') {
+ if (yych <= '.') {
+ yyt1 = YYCURSOR;
+ goto yy1511;
+ }
+ if (yych <= '/') {
yyt1 = YYCURSOR;
- goto yy427;
+ goto yy1512;
}
- if (yych <= '$') goto yy4;
- goto yy80;
+ goto yy1515;
} else {
- if (yych <= '&') goto yy4;
- if (yych <= '\'') {
+ if (yych <= ':') {
yyt1 = YYCURSOR;
- goto yy432;
+ goto yy1516;
}
- if (yych <= '*') {
+ if (yych <= '?') {
yyt1 = YYCURSOR;
- goto yy427;
+ goto yy1506;
}
- goto yy80;
+ if (yych <= '@') {
+ yyt1 = YYCURSOR;
+ goto yy1517;
+ }
+ yyt1 = YYCURSOR;
+ goto yy1518;
}
}
} else {
- if (yych <= '>') {
- if (yych <= '/') {
- if (yych <= ',') {
+ if (yych <= 0x7F) {
+ if (yych <= '_') {
+ if (yych <= 'Z') {
yyt1 = YYCURSOR;
- goto yy429;
+ goto yy1519;
}
- if (yych <= '-') goto yy46;
- if (yych <= '.') {
+ if (yych <= '^') {
yyt1 = YYCURSOR;
- goto yy430;
+ goto yy1506;
}
- goto yy4;
+ yyt1 = YYCURSOR;
+ goto yy1520;
} else {
- if (yych <= '9') goto yy115;
- if (yych <= ':') {
+ if (yych <= '`') {
yyt1 = YYCURSOR;
- goto yy431;
+ goto yy1506;
}
- if (yych <= ';') {
+ if (yych <= 'f') {
yyt1 = YYCURSOR;
- goto yy427;
+ goto yy1518;
}
- goto yy4;
+ if (yych <= 'z') {
+ yyt1 = YYCURSOR;
+ goto yy1519;
+ }
+ yyt1 = YYCURSOR;
+ goto yy1506;
}
} else {
- if (yych <= '^') {
- if (yych <= '?') {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy127;
+ if (yych <= 0xDF) {
+ yyt1 = YYCURSOR;
+ goto yy1521;
+ }
+ if (yych <= 0xE0) {
yyt1 = YYCURSOR;
- goto yy429;
+ goto yy1522;
}
- if (yych <= '@') goto yy96;
- if (yych <= 'Z') goto yy115;
- goto yy4;
+ yyt1 = YYCURSOR;
+ goto yy1523;
} else {
- if (yych <= '_') goto yy46;
- if (yych <= '`') goto yy4;
- if (yych <= 'z') goto yy326;
- goto yy4;
+ if (yych <= 0xF0) {
+ yyt1 = YYCURSOR;
+ goto yy1524;
+ }
+ if (yych <= 0xF3) {
+ yyt1 = YYCURSOR;
+ goto yy1525;
+ }
+ if (yych <= 0xF4) {
+ yyt1 = YYCURSOR;
+ goto yy1526;
+ }
+ goto yy127;
}
}
}
-yy331:
+yy1490:
yych = *++YYCURSOR;
- if (yych <= '\f') {
- if (yych == '\t') goto yy221;
- goto yy161;
+ if (yych <= 'z') {
+ if (yych <= '9') {
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy1026;
+ }
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy73;
+ } else {
+ if (yych <= '@') {
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1311;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy73;
+ }
+ }
} else {
- if (yych <= '\r') goto yy221;
- if (yych == ' ') goto yy221;
- goto yy161;
- }
-yy332:
- yyaccept = 14;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '-') {
- if (yych <= 0x1F) {
- if (yych <= '\f') {
- if (yych <= 0x00) {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
}
- if (yych <= 0x08) goto yy83;
- if (yych <= '\n') {
- yyt3 = YYCURSOR;
- goto yy241;
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
}
- goto yy83;
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy1491:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1527;
+ if (yych <= ':') goto yy1375;
+ goto yy73;
+ } else {
+ if (yych <= 'F') goto yy1527;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy1527;
+ goto yy73;
+ }
+yy1492:
+ yych = *++YYCURSOR;
+ if (yych == ':') goto yy1453;
+ goto yy73;
+yy1493:
+ yych = *++YYCURSOR;
+ if (yych <= 'z') {
+ if (yych <= '@') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1230;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy310;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= 'F') goto yy1230;
+ goto yy73;
} else {
- if (yych <= '\r') {
- yyt3 = YYCURSOR;
- goto yy241;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
- if (yych == 0x1B) goto yy161;
- goto yy83;
+ if (yych <= 'f') goto yy1230;
+ goto yy73;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
}
+ yyt2 = YYCURSOR;
+ goto yy314;
} else {
- if (yych <= '&') {
- if (yych == '!') {
- yyt3 = YYCURSOR;
- goto yy242;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
}
- if (yych <= '"') {
- yyt3 = YYCURSOR;
- goto yy241;
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy1494:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '^') {
+ if (yych <= ':') {
+ if (yych <= '+') {
+ if (yych <= '$') {
+ if (yych == ' ') {
+ yyt1 = YYCURSOR;
+ goto yy1508;
+ }
+ yyt1 = YYCURSOR;
+ goto yy1506;
+ } else {
+ if (yych <= '%') {
+ yyt1 = YYCURSOR;
+ goto yy1509;
+ }
+ if (yych <= '*') {
+ yyt1 = YYCURSOR;
+ goto yy1506;
+ }
+ yyt1 = YYCURSOR;
+ goto yy1509;
}
- goto yy83;
} else {
- if (yych <= '*') {
- if (yych <= '\'') {
- yyt3 = YYCURSOR;
- goto yy243;
+ if (yych <= '.') {
+ if (yych <= ',') {
+ yyt1 = YYCURSOR;
+ goto yy1506;
}
- yyt3 = YYCURSOR;
- goto yy241;
+ if (yych <= '-') {
+ yyt1 = YYCURSOR;
+ goto yy1510;
+ }
+ yyt1 = YYCURSOR;
+ goto yy1528;
} else {
- if (yych == ',') {
- yyt3 = YYCURSOR;
- goto yy242;
+ if (yych <= '/') {
+ yyt1 = YYCURSOR;
+ goto yy1512;
}
- goto yy83;
+ if (yych <= '9') goto yy1529;
+ yyt1 = YYCURSOR;
+ goto yy1516;
+ }
+ }
+ } else {
+ if (yych <= 'G') {
+ if (yych <= 'D') {
+ if (yych <= '?') {
+ yyt1 = YYCURSOR;
+ goto yy1506;
+ }
+ if (yych <= '@') {
+ yyt1 = YYCURSOR;
+ goto yy1517;
+ }
+ yyt1 = YYCURSOR;
+ goto yy1518;
+ } else {
+ if (yych <= 'E') {
+ yyt1 = YYCURSOR;
+ goto yy1530;
+ }
+ if (yych <= 'F') {
+ yyt1 = YYCURSOR;
+ goto yy1518;
+ }
+ yyt1 = YYCURSOR;
+ goto yy1531;
+ }
+ } else {
+ if (yych <= 'L') {
+ if (yych == 'K') {
+ yyt1 = YYCURSOR;
+ goto yy1531;
+ }
+ yyt1 = YYCURSOR;
+ goto yy1519;
+ } else {
+ if (yych <= 'M') {
+ yyt1 = YYCURSOR;
+ goto yy1531;
+ }
+ if (yych <= 'Z') {
+ yyt1 = YYCURSOR;
+ goto yy1519;
+ }
+ yyt1 = YYCURSOR;
+ goto yy1506;
}
}
}
} else {
- if (yych <= 'z') {
- if (yych <= '>') {
- if (yych <= '.') {
- yyt3 = YYCURSOR;
- goto yy244;
- }
- if (yych <= '9') goto yy83;
- if (yych <= ';') {
- yyt3 = YYCURSOR;
- goto yy241;
+ if (yych <= 'p') {
+ if (yych <= 'g') {
+ if (yych <= 'd') {
+ if (yych <= '_') {
+ yyt1 = YYCURSOR;
+ goto yy1520;
+ }
+ if (yych <= '`') {
+ yyt1 = YYCURSOR;
+ goto yy1506;
+ }
+ yyt1 = YYCURSOR;
+ goto yy1518;
+ } else {
+ if (yych <= 'e') {
+ yyt1 = YYCURSOR;
+ goto yy1530;
+ }
+ if (yych <= 'f') {
+ yyt1 = YYCURSOR;
+ goto yy1518;
+ }
+ yyt1 = YYCURSOR;
+ goto yy1531;
}
- goto yy83;
} else {
- if (yych <= '[') {
- if (yych <= '?') {
- yyt3 = YYCURSOR;
- goto yy242;
+ if (yych <= 'l') {
+ if (yych == 'k') {
+ yyt1 = YYCURSOR;
+ goto yy1531;
}
- goto yy83;
+ yyt1 = YYCURSOR;
+ goto yy1519;
} else {
- if (yych <= '\\') goto yy86;
- if (yych <= '`') goto yy83;
- goto yy150;
+ if (yych <= 'm') {
+ yyt1 = YYCURSOR;
+ goto yy1532;
+ }
+ if (yych <= 'o') {
+ yyt1 = YYCURSOR;
+ goto yy1519;
+ }
+ yyt1 = YYCURSOR;
+ goto yy1533;
}
}
} else {
- if (yych <= 0xE0) {
- if (yych <= 0x7F) goto yy83;
- if (yych <= 0xC1) goto yy161;
- if (yych <= 0xDF) goto yy87;
- goto yy88;
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych == 'u') {
+ yyt1 = YYCURSOR;
+ goto yy1533;
+ }
+ yyt1 = YYCURSOR;
+ goto yy1519;
+ } else {
+ if (yych <= 0x7F) {
+ yyt1 = YYCURSOR;
+ goto yy1506;
+ }
+ if (yych <= 0xC1) goto yy24;
+ yyt1 = YYCURSOR;
+ goto yy1521;
+ }
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy89;
- goto yy90;
+ if (yych <= 0xE0) {
+ yyt1 = YYCURSOR;
+ goto yy1522;
+ }
+ if (yych <= 0xEF) {
+ yyt1 = YYCURSOR;
+ goto yy1523;
+ }
+ yyt1 = YYCURSOR;
+ goto yy1524;
} else {
- if (yych <= 0xF3) goto yy91;
- if (yych <= 0xF4) goto yy92;
- goto yy161;
+ if (yych <= 0xF3) {
+ yyt1 = YYCURSOR;
+ goto yy1525;
+ }
+ if (yych <= 0xF4) {
+ yyt1 = YYCURSOR;
+ goto yy1526;
+ }
+ goto yy24;
}
}
}
}
-yy333:
- yyaccept = 14;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 128) {
- goto yy137;
+yy1495:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt1 = YYCURSOR;
+ goto yy444;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1534;
+ yyt2 = YYCURSOR;
+ goto yy1423;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1422;
+ } else {
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1422;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
}
- if (yych <= '*') {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy225;
- if (yych <= 0x08) goto yy161;
- if (yych <= '\n') goto yy225;
- goto yy161;
+yy1496:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt1 = YYCURSOR;
+ goto yy444;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1535;
+ yyt2 = YYCURSOR;
+ goto yy1423;
+ }
} else {
- if (yych <= 0x1F) {
- if (yych <= '\r') goto yy225;
- goto yy161;
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1422;
} else {
- if (yych <= '"') goto yy225;
- if (yych <= '&') goto yy161;
- goto yy225;
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1422;
}
}
} else {
- if (yych <= '.') {
- if (yych == ',') goto yy225;
- if (yych <= '-') goto yy161;
- yyt4 = YYCURSOR;
- goto yy226;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
} else {
- if (yych <= ';') {
- if (yych <= '9') goto yy161;
- goto yy225;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
} else {
- if (yych == '?') goto yy225;
- goto yy161;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
}
}
}
-yy334:
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '/') {
- if (yych <= '\'') {
- if (yych == '%') goto yy80;
- if (yych <= '&') goto yy4;
- goto yy137;
+yy1497:
+ yych = *++YYCURSOR;
+ if (yych <= '`') {
+ if (yych <= '5') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt1 = YYCURSOR;
+ goto yy444;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '4') goto yy1535;
+ goto yy1536;
+ }
} else {
- if (yych <= '+') {
- if (yych <= '*') goto yy4;
- goto yy80;
+ if (yych <= '@') {
+ if (yych <= '9') goto yy1534;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1423;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
} else {
- if (yych <= ',') goto yy4;
- if (yych <= '.') goto yy46;
- goto yy4;
+ if (yych <= 'F') goto yy1422;
+ if (yych <= 'Z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
}
}
} else {
- if (yych <= 'Z') {
- if (yych <= '9') goto yy46;
- if (yych <= '?') goto yy4;
- if (yych <= '@') goto yy96;
- goto yy46;
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= 'f') goto yy1422;
+ goto yy73;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
} else {
- if (yych <= '_') {
- if (yych <= '^') goto yy4;
- goto yy46;
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy1498:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt1 = YYCURSOR;
+ goto yy444;
} else {
- if (yych <= '`') goto yy4;
- if (yych <= 'z') goto yy433;
- goto yy4;
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1424;
+ yyt2 = YYCURSOR;
+ goto yy1311;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1424;
+ } else {
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1424;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
}
}
}
-yy335:
+yy1499:
yych = *++YYCURSOR;
if (yych <= 0xDF) {
- if (yych <= ':') {
- if (yych <= '9') {
+ if (yych <= '\n') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= '\t') {
yyt1 = YYCURSOR;
- goto yy434;
+ goto yy1537;
}
+ goto yy73;
} else {
if (yych <= 0x7F) {
yyt1 = YYCURSOR;
- goto yy434;
+ goto yy1537;
}
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy73;
yyt1 = YYCURSOR;
- goto yy436;
+ goto yy1538;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xE0) {
yyt1 = YYCURSOR;
- goto yy437;
+ goto yy1539;
}
if (yych <= 0xEF) {
yyt1 = YYCURSOR;
- goto yy438;
+ goto yy1540;
}
yyt1 = YYCURSOR;
- goto yy439;
+ goto yy1541;
} else {
if (yych <= 0xF3) {
yyt1 = YYCURSOR;
- goto yy440;
+ goto yy1542;
}
if (yych <= 0xF4) {
yyt1 = YYCURSOR;
- goto yy441;
+ goto yy1543;
}
- goto yy1;
+ goto yy73;
}
}
-yy336:
+yy1500:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy337;
+ if (yych <= '9') goto yy1544;
+ goto yy337;
+ } else {
+ if (yych <= 'F') goto yy1544;
+ if (yych <= '`') goto yy337;
+ if (yych <= 'f') goto yy1505;
+ goto yy337;
+ }
+yy1501:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1545;
+ goto yy73;
+yy1502:
+ yych = *++YYCURSOR;
+ if (yych == '8') goto yy1546;
+ goto yy73;
+yy1503:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1547;
+ goto yy73;
+yy1504:
+ yyaccept = 45;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '.') goto yy1548;
+ goto yy1444;
+yy1505:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy138;
+ if (yych <= '9') goto yy1549;
+ goto yy138;
+ } else {
+ if (yych <= 'F') goto yy1549;
+ if (yych <= '`') goto yy138;
+ if (yych <= 'f') goto yy1549;
+ goto yy138;
+ }
+yy1506:
+ ++YYCURSOR;
+yy1507:
+ YYCURSOR = yyt1;
+#line 391 "../../lnav/src/data_scanner_re.re"
+ {
+ CAPTURE(DT_CREDIT_CARD_NUMBER);
+ if (!this->is_credit_card(this->to_string_fragment(cap_all))) {
+ if (cap_all.length() > 16) {
+ cap_all.c_end = cap_all.c_begin + 4;
+ cap_inner.c_end = cap_inner.c_begin + 4;
+ }
+ this->ds_next_offset = cap_all.c_end;
+ token_out = DT_HEX_DUMP;
+ }
+ return tokenize_result{token_out, cap_all, cap_inner, this->ds_input.data()};
+ }
+#line 41446 "../../lnav/src/data_scanner_re.cc"
+yy1508:
+ yyaccept = 46;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ if (yych == '%') goto yy272;
+ goto yy1507;
+yy1509:
+ yyaccept = 46;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '/') {
+ if (yych <= '*') {
+ if (yych == '%') goto yy89;
+ goto yy1507;
+ } else {
+ if (yych == ',') goto yy1507;
+ if (yych <= '.') goto yy89;
+ goto yy1507;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '9') goto yy89;
+ if (yych <= '?') goto yy1507;
+ if (yych <= 'Z') goto yy89;
+ goto yy1507;
+ } else {
+ if (yych == '`') goto yy1507;
+ if (yych <= 'z') goto yy89;
+ goto yy1507;
+ }
+ }
+yy1510:
+ yyaccept = 46;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '9') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy88;
+ if (yych <= '*') goto yy1507;
+ goto yy88;
+ } else {
+ if (yych <= ',') goto yy1507;
+ if (yych <= '.') goto yy88;
+ if (yych <= '/') goto yy1507;
+ goto yy137;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '?') goto yy1507;
+ if (yych <= '@') goto yy90;
+ if (yych <= 'Z') goto yy137;
+ goto yy1507;
+ } else {
+ if (yych == '`') goto yy1507;
+ if (yych <= 'z') goto yy137;
+ goto yy1507;
+ }
+ }
+yy1511:
+ yyaccept = 46;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '9') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy88;
+ if (yych <= '*') goto yy1507;
+ goto yy88;
+ } else {
+ if (yych <= ',') goto yy1507;
+ if (yych <= '.') goto yy88;
+ if (yych <= '/') goto yy1507;
+ goto yy548;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '?') goto yy1507;
+ if (yych <= '@') goto yy90;
+ if (yych <= 'Z') goto yy137;
+ goto yy1507;
+ } else {
+ if (yych == '`') goto yy1507;
+ if (yych <= 'z') goto yy137;
+ goto yy1507;
+ }
+ }
+yy1512:
yych = *++YYCURSOR;
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy442;
- goto yy1;
-yy337:
- yyaccept = 19;
+ if (yych <= 'Z') {
+ if (yych <= '/') goto yy1507;
+ if (yych <= '9') goto yy277;
+ if (yych <= '@') goto yy1507;
+ goto yy277;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy1507;
+ goto yy277;
+ } else {
+ if (yych <= '`') goto yy1507;
+ if (yych <= 'z') goto yy277;
+ goto yy1507;
+ }
+ }
+yy1513:
+ yyaccept = 12;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[512+yych] & 64) {
- goto yy249;
+yy1514:
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
}
if (yych <= '9') {
- if (yych == '-') goto yy158;
- if (yych >= '0') goto yy158;
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy125;
+ goto yy119;
+ } else {
+ if (yych == '+') goto yy88;
+ goto yy125;
+ }
+ } else {
+ if (yych <= '.') {
+ if (yych <= '-') goto yy121;
+ goto yy409;
+ } else {
+ if (yych <= '/') goto yy123;
+ if (yych <= '7') goto yy1513;
+ }
+ }
} else {
if (yych <= 'Z') {
- if (yych >= 'A') goto yy337;
+ if (yych <= '?') {
+ if (yych <= ':') goto yy292;
+ goto yy125;
+ } else {
+ if (yych <= '@') goto yy129;
+ if (yych <= 'F') goto yy296;
+ goto yy134;
+ }
} else {
- if (yych <= '`') goto yy338;
- if (yych <= 'z') goto yy337;
+ if (yych <= '`') {
+ if (yych == '_') goto yy137;
+ goto yy125;
+ } else {
+ if (yych <= 'f') goto yy296;
+ if (yych <= 'z') goto yy134;
+ goto yy125;
+ }
}
}
-yy338:
-#line 260 "../../lnav/src/data_scanner_re.re"
- { RET(DT_EMAIL); }
-#line 11084 "../../lnav/src/data_scanner_re.cc"
-yy339:
- yyaccept = 0;
+yy1515:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '/') {
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ if (yych <= ':') {
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy127;
+ goto yy119;
+ } else {
+ if (yych == '+') goto yy88;
+ goto yy127;
+ }
+ } else {
+ if (yych <= '.') {
+ if (yych <= '-') goto yy121;
+ goto yy409;
+ } else {
+ if (yych <= '/') goto yy123;
+ if (yych <= '9') goto yy1515;
+ goto yy292;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') {
+ if (yych <= '?') goto yy127;
+ goto yy129;
+ } else {
+ if (yych <= 'F') goto yy296;
+ if (yych <= 'Z') goto yy134;
+ goto yy127;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych <= '_') goto yy137;
+ goto yy127;
+ } else {
+ if (yych <= 'f') goto yy296;
+ if (yych <= 'z') goto yy134;
+ goto yy127;
+ }
+ }
+ }
+yy1516:
+ yyaccept = 46;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '/') goto yy286;
+ if (yych == ':') goto yy123;
+ goto yy1507;
+yy1517:
+ yyaccept = 46;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '.') {
+ if (yych <= ',') goto yy1507;
+ goto yy214;
+ } else {
+ if (yych <= '/') goto yy1507;
+ if (yych <= '9') goto yy290;
+ goto yy1507;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy290;
+ if (yych <= '^') goto yy1507;
+ goto yy277;
+ } else {
+ if (yych <= '`') goto yy1507;
+ if (yych <= 'z') goto yy290;
+ goto yy1507;
+ }
+ }
+yy1518:
+ yyaccept = 46;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= '*') {
+ if (yych == '%') goto yy297;
+ goto yy1507;
+ } else {
+ if (yych == ',') goto yy1507;
+ goto yy297;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '?') goto yy1507;
+ if (yych <= 'Z') goto yy297;
+ goto yy1507;
+ } else {
+ if (yych == '`') goto yy1507;
+ if (yych <= 'z') goto yy297;
+ goto yy1507;
+ }
+ }
+yy1519:
+ yyaccept = 46;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= '*') {
+ if (yych == '%') goto yy135;
+ goto yy1507;
+ } else {
+ if (yych == ',') goto yy1507;
+ goto yy135;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '?') goto yy1507;
+ if (yych <= 'Z') goto yy135;
+ goto yy1507;
+ } else {
+ if (yych == '`') goto yy1507;
+ if (yych <= 'z') goto yy135;
+ goto yy1507;
+ }
+ }
+yy1520:
+ yyaccept = 46;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= '*') {
+ if (yych == '%') goto yy138;
+ goto yy1507;
+ } else {
+ if (yych == ',') goto yy1507;
+ goto yy138;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '?') goto yy1507;
+ if (yych <= 'Z') goto yy138;
+ goto yy1507;
+ } else {
+ if (yych == '`') goto yy1507;
+ if (yych <= 'z') goto yy138;
+ goto yy1507;
+ }
+ }
+yy1521:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy1506;
+ goto yy73;
+yy1522:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy73;
+ if (yych <= 0xBF) goto yy1521;
+ goto yy73;
+yy1523:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy1521;
+ goto yy73;
+yy1524:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy73;
+ if (yych <= 0xBF) goto yy1523;
+ goto yy73;
+yy1525:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy1523;
+ goto yy73;
+yy1526:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0x8F) goto yy1523;
+ goto yy73;
+yy1527:
+ yyaccept = 32;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy544;
+ goto yy713;
+ } else {
+ if (yych <= '/') goto yy544;
+ if (yych <= '9') goto yy1419;
+ goto yy1550;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy544;
+ goto yy1419;
+ } else {
+ if (yych <= '`') goto yy544;
+ if (yych <= 'f') goto yy1419;
+ goto yy544;
+ }
+ }
+yy1528:
+ yyaccept = 46;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '9') {
if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy194;
+ if (yych == '%') goto yy88;
+ if (yych <= '*') goto yy1507;
+ goto yy88;
} else {
- if (yych <= ',') goto yy4;
- if (yych <= '-') goto yy251;
- if (yych <= '.') goto yy46;
- goto yy4;
+ if (yych <= ',') goto yy1507;
+ if (yych <= '.') goto yy88;
+ if (yych <= '/') goto yy1507;
+ goto yy594;
}
} else {
- if (yych <= 'Z') {
- if (yych <= '9') goto yy46;
- if (yych <= '?') goto yy4;
- if (yych <= '@') goto yy96;
- goto yy46;
+ if (yych <= '^') {
+ if (yych <= '?') goto yy1507;
+ if (yych <= '@') goto yy90;
+ if (yych <= 'Z') goto yy137;
+ goto yy1507;
+ } else {
+ if (yych == '`') goto yy1507;
+ if (yych <= 'z') goto yy137;
+ goto yy1507;
+ }
+ }
+yy1529:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_bol[1280+yych] & 4) {
+ goto yy117;
+ }
+ switch (yych) {
+ case '%': goto yy119;
+ case '+': goto yy88;
+ case '-': goto yy121;
+ case '.': goto yy443;
+ case '/': goto yy123;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy1529;
+ case ':': goto yy292;
+ case '@': goto yy129;
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f': goto yy296;
+ case 'B':
+ case 'b': goto yy1147;
+ case 'E':
+ case 'e': goto yy1148;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy132;
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy134;
+ case 'S':
+ case 's': goto yy136;
+ case '_': goto yy137;
+ case 'm': goto yy139;
+ case 'p':
+ case 'u': goto yy140;
+ default: goto yy24;
+ }
+yy1530:
+ yyaccept = 46;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= '*') {
+ if (yych == '%') goto yy297;
+ goto yy1507;
+ } else {
+ if (yych <= '+') goto yy302;
+ if (yych <= ',') goto yy1507;
+ if (yych <= '-') goto yy440;
+ goto yy297;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '?') goto yy1507;
+ if (yych <= 'Z') goto yy297;
+ goto yy1507;
+ } else {
+ if (yych == '`') goto yy1507;
+ if (yych <= 'z') goto yy297;
+ goto yy1507;
+ }
+ }
+yy1531:
+ yyaccept = 46;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'B') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy135;
+ if (yych <= '*') goto yy1507;
+ goto yy135;
+ } else {
+ if (yych <= ':') {
+ if (yych <= ',') goto yy1507;
+ goto yy135;
+ } else {
+ if (yych <= '?') goto yy1507;
+ if (yych <= 'A') goto yy135;
+ goto yy136;
+ }
+ }
+ } else {
+ if (yych <= 'a') {
+ if (yych <= '^') {
+ if (yych <= 'Z') goto yy135;
+ goto yy1507;
+ } else {
+ if (yych == '`') goto yy1507;
+ goto yy135;
+ }
+ } else {
+ if (yych <= 'h') {
+ if (yych <= 'b') goto yy136;
+ goto yy135;
+ } else {
+ if (yych <= 'i') goto yy293;
+ if (yych <= 'z') goto yy135;
+ goto yy1507;
+ }
+ }
+ }
+yy1532:
+ yyaccept = 46;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'S') {
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy1507;
+ goto yy135;
+ } else {
+ if (yych == '+') goto yy135;
+ goto yy1507;
+ }
} else {
+ if (yych <= 'A') {
+ if (yych <= ':') goto yy135;
+ if (yych <= '?') goto yy1507;
+ goto yy135;
+ } else {
+ if (yych <= 'B') goto yy136;
+ if (yych <= 'R') goto yy135;
+ goto yy136;
+ }
+ }
+ } else {
+ if (yych <= 'b') {
if (yych <= '_') {
- if (yych <= '^') goto yy4;
- goto yy46;
+ if (yych <= 'Z') goto yy135;
+ if (yych <= '^') goto yy1507;
+ goto yy135;
} else {
- if (yych <= '`') goto yy4;
- if (yych <= 'z') goto yy46;
- goto yy4;
+ if (yych <= '`') goto yy1507;
+ if (yych <= 'a') goto yy135;
+ goto yy136;
+ }
+ } else {
+ if (yych <= 'r') {
+ if (yych == 'i') goto yy295;
+ goto yy135;
+ } else {
+ if (yych <= 's') goto yy136;
+ if (yych <= 'z') goto yy135;
+ goto yy1507;
}
}
}
-yy340:
- yyaccept = 6;
+yy1533:
+ yyaccept = 46;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '9') {
- if (yych <= 0x1F) {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy26;
- if (yych <= 0x08) goto yy3;
- if (yych <= '\n') goto yy26;
- goto yy3;
+ if (yych <= 'R') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy135;
+ if (yych <= '*') goto yy1507;
+ goto yy135;
+ } else {
+ if (yych <= ',') goto yy1507;
+ if (yych <= ':') goto yy135;
+ if (yych <= '?') goto yy1507;
+ goto yy135;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'S') goto yy136;
+ if (yych <= 'Z') goto yy135;
+ if (yych <= '^') goto yy1507;
+ goto yy135;
+ } else {
+ if (yych <= 'r') {
+ if (yych <= '`') goto yy1507;
+ goto yy135;
} else {
- if (yych <= '\r') goto yy26;
- if (yych == 0x1B) goto yy26;
- goto yy3;
+ if (yych <= 's') goto yy136;
+ if (yych <= 'z') goto yy135;
+ goto yy1507;
+ }
+ }
+ }
+yy1534:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt1 = YYCURSOR;
+ goto yy444;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1455;
+ yyt2 = YYCURSOR;
+ goto yy1423;
}
} else {
- if (yych <= '*') {
- if (yych <= '#') goto yy26;
- if (yych <= '$') goto yy3;
- if (yych <= '%') goto yy80;
- goto yy26;
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1455;
} else {
- if (yych <= ',') {
- if (yych <= '+') goto yy80;
- goto yy26;
- } else {
- if (yych <= '.') goto yy46;
- if (yych <= '/') goto yy3;
- goto yy340;
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
+ goto yy1455;
}
}
} else {
- if (yych <= '~') {
- if (yych <= 'Z') {
- if (yych <= ':') goto yy62;
- if (yych <= '?') goto yy26;
- if (yych <= '@') goto yy96;
- goto yy46;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
} else {
- if (yych <= '_') {
- if (yych <= '^') goto yy26;
- goto yy46;
- } else {
- if (yych <= '`') goto yy26;
- if (yych <= 'z') goto yy46;
- goto yy26;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
}
+ yyt2 = YYCURSOR;
+ goto yy314;
}
} else {
- if (yych <= 0xE0) {
- if (yych <= 0x7F) goto yy3;
- if (yych <= 0xC1) goto yy26;
- if (yych <= 0xDF) goto yy56;
- goto yy57;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
} else {
- if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy58;
- goto yy59;
- } else {
- if (yych <= 0xF3) goto yy60;
- if (yych <= 0xF4) goto yy61;
- goto yy26;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
}
+ goto yy73;
}
}
}
-yy341:
- yyaccept = 19;
+yy1535:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt1 = YYCURSOR;
+ goto yy444;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1551;
+ yyt2 = YYCURSOR;
+ goto yy1423;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1455;
+ } else {
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1455;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy1536:
+ yych = *++YYCURSOR;
+ if (yych <= '`') {
+ if (yych <= '9') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt1 = YYCURSOR;
+ goto yy444;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '5') goto yy1551;
+ goto yy1455;
+ }
+ } else {
+ if (yych <= '@') {
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1423;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'F') goto yy1455;
+ if (yych <= 'Z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= 'f') goto yy1455;
+ goto yy73;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy1537:
+ yych = *++YYCURSOR;
+ if (yych <= 0xDF) {
+ if (yych <= '\n') {
+ if (yych <= 0x00) goto yy73;
+ if (yych <= '\t') goto yy1537;
+ goto yy1552;
+ } else {
+ if (yych <= 0x7F) goto yy1537;
+ if (yych <= 0xC1) goto yy73;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy1539;
+ if (yych <= 0xEF) goto yy1540;
+ goto yy1541;
+ } else {
+ if (yych <= 0xF3) goto yy1542;
+ if (yych <= 0xF4) goto yy1543;
+ goto yy73;
+ }
+ }
+yy1538:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy1537;
+ goto yy73;
+yy1539:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy73;
+ if (yych <= 0xBF) goto yy1538;
+ goto yy73;
+yy1540:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy1538;
+ goto yy73;
+yy1541:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy73;
+ if (yych <= 0xBF) goto yy1540;
+ goto yy73;
+yy1542:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0xBF) goto yy1540;
+ goto yy73;
+yy1543:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy73;
+ if (yych <= 0x8F) goto yy1540;
+ goto yy73;
+yy1544:
+ yyaccept = 14;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= ':') {
- if (yych <= 0x1F) {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy338;
- if (yych <= 0x08) goto yy3;
- if (yych <= '\n') goto yy338;
- goto yy3;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy337;
+ if (yych <= '9') goto yy1553;
+ goto yy337;
+ } else {
+ if (yych <= 'F') goto yy1553;
+ if (yych <= '`') goto yy337;
+ if (yych <= 'f') goto yy1549;
+ goto yy337;
+ }
+yy1545:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1554;
+ goto yy73;
+yy1546:
+ yych = *++YYCURSOR;
+ if (yych == '6') goto yy1555;
+ goto yy73;
+yy1547:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1556;
+ goto yy73;
+yy1548:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1557;
+ goto yy73;
+yy1549:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '-') goto yy1558;
+ goto yy138;
+yy1550:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1559;
+ if (yych <= ':') goto yy1421;
+ goto yy73;
+ } else {
+ if (yych <= 'F') goto yy1559;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy1559;
+ goto yy73;
+ }
+yy1551:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt1 = YYCURSOR;
+ goto yy444;
} else {
- if (yych <= '\r') goto yy338;
- if (yych == 0x1B) goto yy338;
- goto yy3;
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1475;
+ yyt2 = YYCURSOR;
+ goto yy1423;
}
} else {
- if (yych <= '-') {
- if (yych == '$') goto yy3;
- if (yych <= ',') goto yy338;
- goto yy174;
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1475;
} else {
- if (yych <= '.') goto yy252;
- if (yych <= '/') goto yy3;
- if (yych <= '9') goto yy174;
- goto yy62;
+ if (yych <= 'Z') goto yy73;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1475;
}
}
} else {
- if (yych <= '~') {
- if (yych <= '^') {
- if (yych <= '?') goto yy338;
- if (yych <= '@') goto yy3;
- if (yych <= 'Z') goto yy341;
- goto yy338;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy73;
+ yyt2 = YYCURSOR;
+ goto yy305;
} else {
- if (yych <= '_') goto yy3;
- if (yych <= '`') goto yy338;
- if (yych <= 'z') goto yy341;
- goto yy338;
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
+ }
+ }
+ }
+yy1552:
+ ++YYCURSOR;
+ hunk_heading = yyt1;
+#line 358 "../../lnav/src/data_scanner_re.re"
+ {
+ CAPTURE(DT_DIFF_HUNK_HEADING);
+ cap_inner.c_begin = hunk_heading.val - this->ds_input.udata();
+ cap_inner.c_end -= 1;
+ this->ds_bol = true;
+ return tokenize_result{token_out, cap_all, cap_inner, this->ds_input.data()};
+ }
+#line 42432 "../../lnav/src/data_scanner_re.cc"
+yy1553:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '-') goto yy1560;
+ goto yy337;
+yy1554:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1561;
+ goto yy73;
+yy1555:
+ yych = *++YYCURSOR;
+ if (yych == ')') goto yy113;
+ goto yy73;
+yy1556:
+ yych = *++YYCURSOR;
+ if (yych <= 0xDF) {
+ if (yych <= '9') {
+ if (yych <= '/') {
+ yyt1 = YYCURSOR;
+ goto yy1506;
}
+ goto yy73;
} else {
+ if (yych <= 0x7F) {
+ yyt1 = YYCURSOR;
+ goto yy1506;
+ }
+ if (yych <= 0xC1) goto yy73;
+ yyt1 = YYCURSOR;
+ goto yy1521;
+ }
+ } else {
+ if (yych <= 0xF0) {
if (yych <= 0xE0) {
- if (yych <= 0x7F) goto yy3;
- if (yych <= 0xC1) goto yy338;
- if (yych <= 0xDF) goto yy56;
- goto yy57;
+ yyt1 = YYCURSOR;
+ goto yy1522;
+ }
+ if (yych <= 0xEF) {
+ yyt1 = YYCURSOR;
+ goto yy1523;
+ }
+ yyt1 = YYCURSOR;
+ goto yy1524;
+ } else {
+ if (yych <= 0xF3) {
+ yyt1 = YYCURSOR;
+ goto yy1525;
+ }
+ if (yych <= 0xF4) {
+ yyt1 = YYCURSOR;
+ goto yy1526;
+ }
+ goto yy73;
+ }
+ }
+yy1557:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1562;
+ goto yy73;
+yy1558:
+ yych = *++YYCURSOR;
+ if (yych <= 'Z') {
+ if (yych <= '9') {
+ if (yych <= '/') goto yy89;
+ goto yy1563;
+ } else {
+ if (yych <= '@') goto yy89;
+ if (yych <= 'F') goto yy1563;
+ goto yy137;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych == '_') goto yy137;
+ goto yy89;
+ } else {
+ if (yych <= 'f') goto yy1563;
+ if (yych <= 'z') goto yy137;
+ goto yy89;
+ }
+ }
+yy1559:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1564;
+ if (yych <= ':') goto yy1453;
+ goto yy73;
+ } else {
+ if (yych <= 'F') goto yy1564;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy1564;
+ goto yy73;
+ }
+yy1560:
+ yych = *++YYCURSOR;
+ if (yych <= '9') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy88;
+ if (yych <= '*') goto yy153;
+ goto yy88;
+ } else {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy153;
+ goto yy335;
} else {
- if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy58;
- goto yy59;
- } else {
- if (yych <= 0xF3) goto yy60;
- if (yych <= 0xF4) goto yy61;
- goto yy338;
+ if (yych <= '.') goto yy88;
+ if (yych <= '/') goto yy153;
+ goto yy1565;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') {
+ if (yych <= '?') goto yy153;
+ goto yy90;
+ } else {
+ if (yych <= 'F') goto yy1565;
+ if (yych <= 'Z') goto yy336;
+ goto yy153;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych <= '_') goto yy336;
+ goto yy153;
+ } else {
+ if (yych <= 'f') goto yy1563;
+ if (yych <= 'z') goto yy137;
+ goto yy153;
+ }
+ }
+ }
+yy1561:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy1400;
+ if (yych <= '9') goto yy1566;
+ goto yy1400;
+yy1562:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1567;
+ goto yy73;
+yy1563:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy138;
+ if (yych <= '9') goto yy1568;
+ goto yy138;
+ } else {
+ if (yych <= 'F') goto yy1568;
+ if (yych <= '`') goto yy138;
+ if (yych <= 'f') goto yy1568;
+ goto yy138;
+ }
+yy1564:
+ yyaccept = 32;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy544;
+ goto yy713;
+ } else {
+ if (yych <= '/') goto yy544;
+ if (yych <= '9') goto yy1473;
+ goto yy1569;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy544;
+ goto yy1473;
+ } else {
+ if (yych <= '`') goto yy544;
+ if (yych <= 'f') goto yy1473;
+ goto yy544;
+ }
+ }
+yy1565:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy337;
+ if (yych <= '9') goto yy1570;
+ goto yy337;
+ } else {
+ if (yych <= 'F') goto yy1570;
+ if (yych <= '`') goto yy337;
+ if (yych <= 'f') goto yy1568;
+ goto yy337;
+ }
+yy1566:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy1400;
+ if (yych <= '9') goto yy1571;
+ goto yy1400;
+yy1567:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy1444;
+ if (yych <= '9') goto yy1572;
+ goto yy1444;
+yy1568:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy138;
+ if (yych <= '9') goto yy1573;
+ goto yy138;
+ } else {
+ if (yych <= 'F') goto yy1573;
+ if (yych <= '`') goto yy138;
+ if (yych <= 'f') goto yy1573;
+ goto yy138;
+ }
+yy1569:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy73;
+ if (yych <= '9') goto yy1574;
+ if (yych <= ':') goto yy1230;
+ goto yy73;
+ } else {
+ if (yych <= 'F') goto yy1574;
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy1574;
+ goto yy73;
+ }
+yy1570:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy337;
+ if (yych <= '9') goto yy1575;
+ goto yy337;
+ } else {
+ if (yych <= 'F') goto yy1575;
+ if (yych <= '`') goto yy337;
+ if (yych <= 'f') goto yy1573;
+ goto yy337;
+ }
+yy1571:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy1400;
+ if (yych <= '9') goto yy1576;
+ goto yy1400;
+yy1572:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy1444;
+ if (yych <= '9') goto yy1577;
+ goto yy1444;
+yy1573:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy138;
+ if (yych <= '9') goto yy1578;
+ goto yy138;
+ } else {
+ if (yych <= 'F') goto yy1578;
+ if (yych <= '`') goto yy138;
+ if (yych <= 'f') goto yy1578;
+ goto yy138;
+ }
+yy1574:
+ yych = *++YYCURSOR;
+ if (yych <= 'z') {
+ if (yych <= '@') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= '9') goto yy1579;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy310;
+ }
+ yyt2 = YYCURSOR;
+ goto yy305;
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= 'F') goto yy1579;
+ goto yy73;
+ } else {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
+ if (yych <= 'f') goto yy1579;
+ goto yy73;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ if (yych <= 0xC1) goto yy73;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
+ }
+ yyt2 = YYCURSOR;
+ goto yy314;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy73;
}
}
}
-yy342:
+yy1575:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy337;
+ if (yych <= '9') goto yy1580;
+ goto yy337;
+ } else {
+ if (yych <= 'F') goto yy1580;
+ if (yych <= '`') goto yy337;
+ if (yych <= 'f') goto yy1578;
+ goto yy337;
+ }
+yy1576:
+ ++YYCURSOR;
+ goto yy1400;
+yy1577:
yych = *++YYCURSOR;
- if (yych == 'g') goto yy443;
- goto yy100;
-yy343:
- yyaccept = 5;
+ if (yych <= '/') goto yy1444;
+ if (yych <= '9') goto yy1581;
+ goto yy1444;
+yy1578:
+ yyaccept = 14;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '9') {
- if (yych <= ' ') {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy24;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy24;
- goto yy4;
+ if (yych == '-') goto yy1582;
+ goto yy138;
+yy1579:
+ yyaccept = 32;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '-') {
+ if (yych <= ',') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1583;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') goto yy24;
- goto yy4;
- } else {
- if (yych <= 0x1B) goto yy24;
- if (yych <= 0x1F) goto yy4;
- goto yy24;
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
+ if (yych <= '9') goto yy1493;
+ yyt2 = YYCURSOR;
+ goto yy1584;
}
} else {
- if (yych <= '$') {
- if (yych == '"') goto yy24;
- if (yych <= '#') goto yy99;
- goto yy101;
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy305;
+ }
+ goto yy1493;
} else {
- if (yych <= '\'') {
- if (yych <= '&') goto yy99;
- goto yy24;
- } else {
- if (yych <= '*') goto yy99;
- if (yych <= ',') goto yy24;
- goto yy101;
+ if (yych <= 'Z') goto yy544;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy305;
}
+ goto yy1493;
}
}
} else {
- if (yych <= '`') {
- if (yych <= '[') {
- if (yych <= ':') goto yy4;
- if (yych <= '?') goto yy24;
- if (yych <= 'Z') goto yy101;
- goto yy24;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy544;
+ yyt2 = YYCURSOR;
+ goto yy305;
} else {
- if (yych <= ']') {
- if (yych <= '\\') goto yy99;
- goto yy24;
- } else {
- if (yych <= '^') goto yy99;
- if (yych <= '_') goto yy101;
- goto yy24;
+ if (yych <= 0xC1) goto yy544;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy313;
}
+ yyt2 = YYCURSOR;
+ goto yy314;
}
} else {
- if (yych <= '}') {
- if (yych == 'r') goto yy444;
- if (yych <= 'z') goto yy101;
- goto yy24;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy315;
+ }
+ yyt2 = YYCURSOR;
+ goto yy316;
} else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy99;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy24;
- if (yych <= 0xF4) goto yy4;
- goto yy24;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy317;
}
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy318;
+ }
+ goto yy544;
}
}
}
-yy344:
- yyaccept = 20;
+yy1580:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '-') goto yy1585;
+ goto yy337;
+yy1581:
+ ++YYCURSOR;
+ goto yy1444;
+yy1582:
+ yych = *++YYCURSOR;
+ if (yych <= 'Z') {
+ if (yych <= '9') {
+ if (yych <= '/') goto yy89;
+ goto yy1586;
+ } else {
+ if (yych <= '@') goto yy89;
+ if (yych <= 'F') goto yy1586;
+ goto yy137;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych == '_') goto yy137;
+ goto yy89;
+ } else {
+ if (yych <= 'f') goto yy1586;
+ if (yych <= 'z') goto yy137;
+ goto yy89;
+ }
+ }
+yy1583:
+ yyaccept = 26;
yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy306;
+ if (yych <= '9') goto yy846;
+ goto yy306;
+ } else {
+ if (yych <= 'F') goto yy846;
+ if (yych <= '`') goto yy306;
+ if (yych <= 'f') goto yy846;
+ goto yy306;
+ }
+yy1584:
+ yych = *++YYCURSOR;
if (yych <= '9') {
- if (yych <= 0x1F) {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy345;
- if (yych <= 0x08) goto yy3;
- if (yych >= '\v') goto yy3;
+ if (yych == ' ') goto yy305;
+ if (yych <= '/') goto yy73;
+ goto yy846;
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy73;
+ goto yy846;
+ } else {
+ if (yych <= '`') goto yy73;
+ if (yych <= 'f') goto yy846;
+ goto yy73;
+ }
+ }
+yy1585:
+ yych = *++YYCURSOR;
+ if (yych <= '9') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy88;
+ if (yych <= '*') goto yy153;
+ goto yy88;
+ } else {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy153;
+ goto yy335;
+ } else {
+ if (yych <= '.') goto yy88;
+ if (yych <= '/') goto yy153;
+ goto yy1587;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') {
+ if (yych <= '?') goto yy153;
+ goto yy90;
} else {
- if (yych <= '\r') goto yy345;
- if (yych != 0x1B) goto yy3;
+ if (yych <= 'F') goto yy1587;
+ if (yych <= 'Z') goto yy336;
+ goto yy153;
}
} else {
- if (yych <= '*') {
- if (yych <= '#') goto yy345;
- if (yych <= '$') goto yy3;
- if (yych <= '%') goto yy80;
+ if (yych <= '`') {
+ if (yych <= '_') goto yy336;
+ goto yy153;
+ } else {
+ if (yych <= 'f') goto yy1586;
+ if (yych <= 'z') goto yy137;
+ goto yy153;
+ }
+ }
+ }
+yy1586:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy138;
+ if (yych <= '9') goto yy1588;
+ goto yy138;
+ } else {
+ if (yych <= 'F') goto yy1588;
+ if (yych <= '`') goto yy138;
+ if (yych <= 'f') goto yy1588;
+ goto yy138;
+ }
+yy1587:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy337;
+ if (yych <= '9') goto yy1589;
+ goto yy337;
+ } else {
+ if (yych <= 'F') goto yy1589;
+ if (yych <= '`') goto yy337;
+ if (yych >= 'g') goto yy337;
+ }
+yy1588:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy138;
+ if (yych <= '9') goto yy1590;
+ goto yy138;
+ } else {
+ if (yych <= 'F') goto yy1590;
+ if (yych <= '`') goto yy138;
+ if (yych <= 'f') goto yy1590;
+ goto yy138;
+ }
+yy1589:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy337;
+ if (yych <= '9') goto yy1591;
+ goto yy337;
+ } else {
+ if (yych <= 'F') goto yy1591;
+ if (yych <= '`') goto yy337;
+ if (yych >= 'g') goto yy337;
+ }
+yy1590:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy138;
+ if (yych <= '9') goto yy1592;
+ goto yy138;
+ } else {
+ if (yych <= 'F') goto yy1592;
+ if (yych <= '`') goto yy138;
+ if (yych <= 'f') goto yy1592;
+ goto yy138;
+ }
+yy1591:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy337;
+ if (yych <= '9') goto yy1593;
+ goto yy337;
+ } else {
+ if (yych <= 'F') goto yy1593;
+ if (yych <= '`') goto yy337;
+ if (yych >= 'g') goto yy337;
+ }
+yy1592:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy138;
+ if (yych <= '9') goto yy1594;
+ goto yy138;
+ } else {
+ if (yych <= 'F') goto yy1594;
+ if (yych <= '`') goto yy138;
+ if (yych <= 'f') goto yy1594;
+ goto yy138;
+ }
+yy1593:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy337;
+ if (yych <= '9') goto yy1595;
+ goto yy337;
+ } else {
+ if (yych <= 'F') goto yy1595;
+ if (yych <= '`') goto yy337;
+ if (yych >= 'g') goto yy337;
+ }
+yy1594:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy138;
+ if (yych <= '9') goto yy1596;
+ goto yy138;
+ } else {
+ if (yych <= 'F') goto yy1596;
+ if (yych <= '`') goto yy138;
+ if (yych <= 'f') goto yy1596;
+ goto yy138;
+ }
+yy1595:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy337;
+ if (yych <= '9') goto yy1597;
+ goto yy337;
+ } else {
+ if (yych <= 'F') goto yy1597;
+ if (yych <= '`') goto yy337;
+ if (yych >= 'g') goto yy337;
+ }
+yy1596:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy138;
+ if (yych <= '9') goto yy1598;
+ goto yy138;
+ } else {
+ if (yych <= 'F') goto yy1598;
+ if (yych <= '`') goto yy138;
+ if (yych <= 'f') goto yy1598;
+ goto yy138;
+ }
+yy1597:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy337;
+ if (yych <= '9') goto yy1599;
+ goto yy337;
+ } else {
+ if (yych <= 'F') goto yy1599;
+ if (yych <= '`') goto yy337;
+ if (yych >= 'g') goto yy337;
+ }
+yy1598:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy138;
+ if (yych <= '9') goto yy1600;
+ goto yy138;
+ } else {
+ if (yych <= 'F') goto yy1600;
+ if (yych <= '`') goto yy138;
+ if (yych <= 'f') goto yy1600;
+ goto yy138;
+ }
+yy1599:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy337;
+ if (yych <= '9') goto yy1601;
+ goto yy337;
+ } else {
+ if (yych <= 'F') goto yy1601;
+ if (yych <= '`') goto yy337;
+ if (yych >= 'g') goto yy337;
+ }
+yy1600:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy138;
+ if (yych <= '9') goto yy1602;
+ goto yy138;
+ } else {
+ if (yych <= 'F') goto yy1602;
+ if (yych <= '`') goto yy138;
+ if (yych <= 'f') goto yy1602;
+ goto yy138;
+ }
+yy1601:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy337;
+ if (yych <= '9') goto yy1603;
+ goto yy337;
+ } else {
+ if (yych <= 'F') goto yy1603;
+ if (yych <= '`') goto yy337;
+ if (yych >= 'g') goto yy337;
+ }
+yy1602:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy138;
+ if (yych <= '9') goto yy1604;
+ goto yy138;
+ } else {
+ if (yych <= 'F') goto yy1604;
+ if (yych <= '`') goto yy138;
+ if (yych <= 'f') goto yy1604;
+ goto yy138;
+ }
+yy1603:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy337;
+ if (yych <= '9') goto yy1605;
+ goto yy337;
+ } else {
+ if (yych <= 'F') goto yy1605;
+ if (yych <= '`') goto yy337;
+ if (yych >= 'g') goto yy337;
+ }
+yy1604:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy138;
+ if (yych <= '9') goto yy1606;
+ goto yy138;
+ } else {
+ if (yych <= 'F') goto yy1606;
+ if (yych <= '`') goto yy138;
+ if (yych <= 'f') goto yy1606;
+ goto yy138;
+ }
+yy1605:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy337;
+ if (yych <= '9') goto yy1607;
+ goto yy337;
+ } else {
+ if (yych <= 'F') goto yy1607;
+ if (yych <= '`') goto yy337;
+ if (yych >= 'g') goto yy337;
+ }
+yy1606:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy138;
+ if (yych <= '9') goto yy1608;
+ goto yy138;
+ } else {
+ if (yych <= 'F') goto yy1608;
+ if (yych <= '`') goto yy138;
+ if (yych <= 'f') goto yy1608;
+ goto yy138;
+ }
+yy1607:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy337;
+ if (yych <= '9') goto yy1610;
+ goto yy337;
+ } else {
+ if (yych <= 'F') goto yy1610;
+ if (yych <= '`') goto yy337;
+ if (yych >= 'g') goto yy337;
+ }
+yy1608:
+ yyaccept = 47;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= '*') {
+ if (yych == '%') goto yy138;
+ } else {
+ if (yych != ',') goto yy138;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '?') goto yy1609;
+ if (yych <= 'Z') goto yy138;
+ } else {
+ if (yych == '`') goto yy1609;
+ if (yych <= 'z') goto yy138;
+ }
+ }
+yy1609:
+#line 389 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_UUID); }
+#line 43249 "../../lnav/src/data_scanner_re.cc"
+yy1610:
+ yyaccept = 47;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '+') {
+ if (yych <= ' ') {
+ if (yych == '\n') goto yy337;
+ if (yych <= 0x1F) goto yy1609;
+ goto yy337;
+ } else {
+ if (yych == '%') goto yy337;
+ if (yych <= '*') goto yy1609;
+ goto yy337;
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= ',') goto yy1609;
+ if (yych <= ':') goto yy337;
+ if (yych <= '?') goto yy1609;
+ goto yy337;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy1609;
+ goto yy337;
+ } else {
+ if (yych <= '`') goto yy1609;
+ if (yych <= 'z') goto yy337;
+ goto yy1609;
+ }
+ }
+ }
+/* *********************************** */
+yyc_init:
+ yych = *YYCURSOR;
+ if (yybm_init[1536+yych] & 32) {
+ goto yy1619;
+ }
+ if (yych <= 'A') {
+ if (yych <= '(') {
+ if (yych <= 0x1F) {
+ if (yych <= '\n') {
+ if (yych <= 0x00) goto yy1612;
+ if (yych <= 0x08) goto yy1613;
+ if (yych <= '\t') goto yy1615;
+ goto yy1617;
+ } else {
+ if (yych <= '\r') {
+ if (yych <= '\f') goto yy1613;
+ goto yy1618;
+ } else {
+ if (yych == 0x1B) goto yy1620;
+ goto yy1613;
+ }
+ }
} else {
+ if (yych <= '#') {
+ if (yych <= ' ') goto yy1615;
+ if (yych <= '!') goto yy1613;
+ if (yych <= '"') goto yy1621;
+ goto yy1622;
+ } else {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy1613;
+ goto yy1623;
+ } else {
+ if (yych <= '&') goto yy1613;
+ if (yych <= '\'') goto yy1624;
+ goto yy1625;
+ }
+ }
+ }
+ } else {
+ if (yych <= '1') {
if (yych <= ',') {
- if (yych <= '+') goto yy80;
+ if (yych <= ')') goto yy1626;
+ if (yych <= '*') goto yy1613;
+ if (yych <= '+') goto yy1627;
+ goto yy1628;
} else {
- if (yych <= '.') goto yy46;
- if (yych <= '/') goto yy3;
- goto yy344;
+ if (yych <= '.') {
+ if (yych <= '-') goto yy1629;
+ goto yy1630;
+ } else {
+ if (yych <= '/') goto yy1632;
+ if (yych <= '0') goto yy1634;
+ goto yy1636;
+ }
+ }
+ } else {
+ if (yych <= '<') {
+ if (yych <= '9') {
+ if (yych <= '2') goto yy1637;
+ goto yy1638;
+ } else {
+ if (yych <= ':') goto yy1639;
+ if (yych <= ';') goto yy1641;
+ goto yy1642;
+ }
+ } else {
+ if (yych <= '>') {
+ if (yych <= '=') goto yy1644;
+ goto yy1645;
+ } else {
+ if (yych <= '?') goto yy1613;
+ if (yych <= '@') goto yy1646;
+ goto yy1647;
+ }
}
}
}
} else {
- if (yych <= '~') {
+ if (yych <= 'm') {
if (yych <= 'Z') {
- if (yych <= ':') goto yy62;
- if (yych <= '?') goto yy345;
- if (yych <= '@') goto yy96;
- goto yy344;
+ if (yych <= 'I') {
+ if (yych <= 'E') goto yy1649;
+ if (yych <= 'F') goto yy1651;
+ if (yych <= 'H') goto yy1652;
+ goto yy1653;
+ } else {
+ if (yych <= 'N') {
+ if (yych <= 'M') goto yy1652;
+ goto yy1654;
+ } else {
+ if (yych == 'T') goto yy1655;
+ goto yy1652;
+ }
+ }
} else {
if (yych <= '_') {
- if (yych >= '_') goto yy344;
+ if (yych <= '\\') {
+ if (yych <= '[') goto yy1656;
+ goto yy1657;
+ } else {
+ if (yych <= ']') goto yy1658;
+ if (yych <= '^') goto yy1613;
+ goto yy1659;
+ }
} else {
- if (yych <= '`') goto yy345;
- if (yych <= 'z') goto yy344;
+ if (yych <= 'a') {
+ if (yych <= '`') goto yy1613;
+ goto yy1661;
+ } else {
+ if (yych <= 'e') goto yy1662;
+ if (yych <= 'f') goto yy1663;
+ goto yy1664;
+ }
}
}
} else {
- if (yych <= 0xE0) {
- if (yych <= 0x7F) goto yy3;
- if (yych <= 0xC1) goto yy345;
- if (yych <= 0xDF) goto yy56;
- goto yy57;
+ if (yych <= '|') {
+ if (yych <= 's') {
+ if (yych <= 'n') goto yy1665;
+ if (yych == 'r') goto yy1666;
+ goto yy1664;
+ } else {
+ if (yych <= 'u') {
+ if (yych <= 't') goto yy1667;
+ goto yy1668;
+ } else {
+ if (yych <= 'z') goto yy1664;
+ if (yych <= '{') goto yy1669;
+ goto yy1613;
+ }
+ }
} else {
- if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy58;
- goto yy59;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= '}') goto yy1670;
+ goto yy1613;
+ } else {
+ if (yych <= 0xC1) goto yy1671;
+ if (yych <= 0xDF) goto yy1673;
+ goto yy1674;
+ }
} else {
- if (yych <= 0xF3) goto yy60;
- if (yych <= 0xF4) goto yy61;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy1675;
+ goto yy1676;
+ } else {
+ if (yych <= 0xF3) goto yy1677;
+ if (yych <= 0xF4) goto yy1678;
+ goto yy1671;
+ }
}
}
}
}
-yy345:
-#line 251 "../../lnav/src/data_scanner_re.re"
+yy1612:
+ ++YYCURSOR;
+#line 172 "../../lnav/src/data_scanner_re.re"
+ { return nonstd::nullopt; }
+#line 43440 "../../lnav/src/data_scanner_re.cc"
+yy1613:
+ ++YYCURSOR;
+yy1614:
+#line 476 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_GARBAGE); }
+#line 43446 "../../lnav/src/data_scanner_re.cc"
+yy1615:
+ yyaccept = 0;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '/') goto yy1680;
+ if (yych <= '9') goto yy1681;
+ if (yych <= ':') goto yy1683;
+ goto yy1680;
+yy1616:
+#line 473 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_WHITE); }
+#line 43457 "../../lnav/src/data_scanner_re.cc"
+yy1617:
+ ++YYCURSOR;
+#line 469 "../../lnav/src/data_scanner_re.re"
{
- RET(DT_VERSION_NUMBER);
+ this->ds_bol = true;
+ RET(DT_LINE);
}
-#line 11380 "../../lnav/src/data_scanner_re.cc"
-yy346:
- yyaccept = 20;
+#line 43465 "../../lnav/src/data_scanner_re.cc"
+yy1618:
+ yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '-') {
- if (yych <= 0x1B) {
- if (yych <= '\n') {
- if (yych <= 0x00) goto yy345;
- if (yych <= 0x08) goto yy4;
- goto yy345;
+ if (yych <= '/') {
+ if (yych == '\n') goto yy1617;
+ goto yy1680;
+ } else {
+ if (yych <= '9') goto yy1681;
+ if (yych <= ':') goto yy1683;
+ goto yy1680;
+ }
+yy1619:
+ yych = *++YYCURSOR;
+ if (yybm_init[1536+yych] & 32) {
+ goto yy1619;
+ }
+#line 174 "../../lnav/src/data_scanner_re.re"
+ {
+ RET(DT_ZERO_WIDTH_SPACE);
+ }
+#line 43486 "../../lnav/src/data_scanner_re.cc"
+yy1620:
+ yyaccept = 1;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '[') goto yy1684;
+ goto yy1614;
+yy1621:
+ yyaccept = 1;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 0x1A) {
+ if (yych <= '\n') {
+ if (yych <= 0x00) goto yy1614;
+ if (yych <= '\t') goto yy1686;
+ goto yy1614;
+ } else {
+ if (yych == 0x16) goto yy1614;
+ goto yy1686;
+ }
+ } else {
+ if (yych <= '"') {
+ if (yych <= 0x1B) goto yy1614;
+ if (yych <= '!') goto yy1686;
+ goto yy1687;
+ } else {
+ if (yych <= 0x7F) goto yy1686;
+ if (yych <= 0xC1) goto yy1614;
+ if (yych <= 0xF4) goto yy1686;
+ goto yy1614;
+ }
+ }
+yy1622:
+ yyaccept = 1;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '[') goto yy1696;
+ goto yy1614;
+yy1623:
+ yyaccept = 1;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '/') {
+ if (yych <= '*') {
+ if (yych == '%') goto yy1698;
+ goto yy1614;
+ } else {
+ if (yych == ',') goto yy1614;
+ if (yych <= '.') goto yy1698;
+ goto yy1614;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '9') goto yy1698;
+ if (yych <= '?') goto yy1614;
+ if (yych <= 'Z') goto yy1698;
+ goto yy1614;
+ } else {
+ if (yych == '`') goto yy1614;
+ if (yych <= 'z') goto yy1698;
+ goto yy1614;
+ }
+ }
+yy1624:
+ yyaccept = 1;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 0x1A) {
+ if (yych <= '\n') {
+ if (yych <= 0x00) goto yy1614;
+ if (yych <= '\t') goto yy1701;
+ goto yy1614;
+ } else {
+ if (yych == 0x16) goto yy1614;
+ goto yy1701;
+ }
+ } else {
+ if (yych <= '\'') {
+ if (yych <= 0x1B) goto yy1614;
+ if (yych <= '&') goto yy1701;
+ goto yy1702;
+ } else {
+ if (yych <= 0x7F) goto yy1701;
+ if (yych <= 0xC1) goto yy1614;
+ if (yych <= 0xF4) goto yy1701;
+ goto yy1614;
+ }
+ }
+yy1625:
+ yych = *++YYCURSOR;
+ if (yych == ')') goto yy1710;
+#line 380 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_LPAREN); }
+#line 43574 "../../lnav/src/data_scanner_re.cc"
+yy1626:
+ ++YYCURSOR;
+#line 381 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_RPAREN); }
+#line 43579 "../../lnav/src/data_scanner_re.cc"
+yy1627:
+ yyaccept = 1;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '0') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1715;
+ if (yych <= '*') goto yy1614;
+ goto yy1711;
+ } else {
+ if (yych <= ',') goto yy1614;
+ if (yych <= '.') goto yy1715;
+ if (yych <= '/') goto yy1614;
+ goto yy1712;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '9') goto yy1713;
+ if (yych <= '?') goto yy1614;
+ if (yych <= 'Z') goto yy1715;
+ goto yy1614;
+ } else {
+ if (yych == '`') goto yy1614;
+ if (yych <= 'z') goto yy1715;
+ goto yy1614;
+ }
+ }
+yy1628:
+ ++YYCURSOR;
+#line 372 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_COMMA); }
+#line 43610 "../../lnav/src/data_scanner_re.cc"
+yy1629:
+ yyaccept = 1;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '/') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1715;
+ if (yych <= '*') goto yy1614;
+ goto yy1715;
+ } else {
+ if (yych <= ',') goto yy1614;
+ if (yych <= '-') goto yy1716;
+ if (yych <= '.') goto yy1715;
+ goto yy1614;
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '0') goto yy1717;
+ if (yych <= '9') goto yy1718;
+ if (yych <= '?') goto yy1614;
+ goto yy1715;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy1614;
+ goto yy1715;
} else {
- if (yych == '\r') goto yy345;
- if (yych <= 0x1A) goto yy4;
- goto yy345;
+ if (yych <= '`') goto yy1614;
+ if (yych <= 'z') goto yy1715;
+ goto yy1614;
}
+ }
+ }
+yy1630:
+ yyaccept = 2;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '/') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1698;
+ if (yych >= '+') goto yy1698;
} else {
+ if (yych <= ',') goto yy1631;
+ if (yych <= '-') goto yy1698;
+ if (yych <= '.') goto yy1719;
+ goto yy1720;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '9') goto yy1698;
+ if (yych <= '?') goto yy1631;
+ if (yych <= 'Z') goto yy1698;
+ } else {
+ if (yych == '`') goto yy1631;
+ if (yych <= 'z') goto yy1698;
+ }
+ }
+yy1631:
+#line 474 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_DOT); }
+#line 43668 "../../lnav/src/data_scanner_re.cc"
+yy1632:
+ yych = *++YYCURSOR;
+ if (yych == '*') goto yy1723;
+ if (yych == 'P') goto yy1724;
+ goto yy1722;
+yy1633:
+#line 293 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_PATH); }
+#line 43677 "../../lnav/src/data_scanner_re.cc"
+yy1634:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ switch (yych) {
+ case '%': goto yy1727;
+ case '+': goto yy1697;
+ case '-': goto yy1729;
+ case '.': goto yy1730;
+ case '/': goto yy1731;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7': goto yy1732;
+ case '8':
+ case '9': goto yy1734;
+ case ':': goto yy1736;
+ case '@': goto yy1737;
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'E':
+ case 'F':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'e':
+ case 'f': goto yy1738;
+ case 'B':
+ case 'b': goto yy1739;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy1740;
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'y':
+ case 'z': goto yy1742;
+ case 'S':
+ case 's': goto yy1744;
+ case '_': goto yy1745;
+ case 'm': goto yy1747;
+ case 'p':
+ case 'u': goto yy1748;
+ case 'x': goto yy1749;
+ default: goto yy1635;
+ }
+yy1635:
+#line 429 "../../lnav/src/data_scanner_re.re"
+ {
+ CAPTURE(DT_NUMBER);
+ auto sf = this->to_string_fragment(cap_all);
+ if (isalpha(sf.back())) {
+ while (isalpha(sf.back())) {
+ sf.pop_back();
+ }
+ cap_all.c_end = sf.sf_end - this->ds_input.sf_begin;
+ cap_inner.c_end = sf.sf_end - this->ds_input.sf_begin;
+ this->ds_next_offset = cap_all.c_end;
+ this->ds_units = true;
+ }
+ return tokenize_result{DT_NUMBER, cap_all, cap_inner, this->ds_input.data()};
+ }
+#line 43773 "../../lnav/src/data_scanner_re.cc"
+yy1636:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ switch (yych) {
+ case '%': goto yy1727;
+ case '+': goto yy1697;
+ case '-': goto yy1729;
+ case '.': goto yy1730;
+ case '/': goto yy1731;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy1750;
+ case ':': goto yy1736;
+ case '@': goto yy1737;
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f': goto yy1738;
+ case 'B':
+ case 'b': goto yy1739;
+ case 'E':
+ case 'e': goto yy1751;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy1740;
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy1742;
+ case 'S':
+ case 's': goto yy1744;
+ case '_': goto yy1745;
+ case 'm': goto yy1747;
+ case 'p':
+ case 'u': goto yy1748;
+ default: goto yy1635;
+ }
+yy1637:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ switch (yych) {
+ case '%': goto yy1727;
+ case '+': goto yy1697;
+ case '-': goto yy1729;
+ case '.': goto yy1730;
+ case '/': goto yy1731;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4': goto yy1750;
+ case '5': goto yy1752;
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy1753;
+ case ':': goto yy1736;
+ case '@': goto yy1737;
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f': goto yy1738;
+ case 'B':
+ case 'b': goto yy1739;
+ case 'E':
+ case 'e': goto yy1751;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy1740;
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy1742;
+ case 'S':
+ case 's': goto yy1744;
+ case '_': goto yy1745;
+ case 'm': goto yy1747;
+ case 'p':
+ case 'u': goto yy1748;
+ default: goto yy1635;
+ }
+yy1638:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ switch (yych) {
+ case '%': goto yy1727;
+ case '+': goto yy1697;
+ case '-': goto yy1729;
+ case '.': goto yy1730;
+ case '/': goto yy1731;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy1753;
+ case ':': goto yy1736;
+ case '@': goto yy1737;
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f': goto yy1738;
+ case 'B':
+ case 'b': goto yy1739;
+ case 'E':
+ case 'e': goto yy1751;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy1740;
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy1742;
+ case 'S':
+ case 's': goto yy1744;
+ case '_': goto yy1745;
+ case 'm': goto yy1747;
+ case 'p':
+ case 'u': goto yy1748;
+ default: goto yy1635;
+ }
+yy1639:
+ yyaccept = 4;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == ':') goto yy1754;
+yy1640:
+#line 370 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_COLON); }
+#line 44018 "../../lnav/src/data_scanner_re.cc"
+yy1641:
+ ++YYCURSOR;
+#line 373 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_SEMI); }
+#line 44023 "../../lnav/src/data_scanner_re.cc"
+yy1642:
+ yyaccept = 5;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '>') {
+ if (yych <= '-') {
+ if (yych == '!') goto yy1755;
+ if (yych >= '-') goto yy1756;
+ } else {
+ if (yych <= '.') goto yy1643;
+ if (yych <= '/') goto yy1757;
+ if (yych <= ':') goto yy1756;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '?') goto yy1758;
+ if (yych <= '@') goto yy1643;
+ if (yych <= 'Z') goto yy1756;
+ } else {
+ if (yych == '`') goto yy1643;
+ if (yych <= 'z') goto yy1756;
+ }
+ }
+yy1643:
+#line 382 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_LANGLE); }
+#line 44049 "../../lnav/src/data_scanner_re.cc"
+yy1644:
+ ++YYCURSOR;
+#line 371 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_EQUALS); }
+#line 44054 "../../lnav/src/data_scanner_re.cc"
+yy1645:
+ ++YYCURSOR;
+#line 383 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_RANGLE); }
+#line 44059 "../../lnav/src/data_scanner_re.cc"
+yy1646:
+ yyaccept = 1;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '@') goto yy1759;
+ goto yy1614;
+yy1647:
+ yyaccept = 6;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= '*') {
if (yych <= '%') {
- if (yych <= 0x1F) goto yy4;
- if (yych <= '#') goto yy345;
- if (yych <= '$') goto yy4;
- goto yy80;
+ if (yych >= '%') goto yy1660;
} else {
- if (yych == '+') goto yy80;
- if (yych <= ',') goto yy345;
- goto yy255;
+ if (yych == '\'') goto yy1760;
+ }
+ } else {
+ if (yych <= ',') {
+ if (yych <= '+') goto yy1660;
+ } else {
+ if (yych <= '/') goto yy1660;
+ if (yych <= '9') goto yy1764;
+ goto yy1765;
}
}
} else {
if (yych <= '^') {
- if (yych <= ':') {
- if (yych <= '.') goto yy445;
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy446;
- goto yy4;
+ if (yych <= '@') {
+ if (yych >= '@') goto yy1660;
} else {
- if (yych <= '?') goto yy345;
- if (yych <= '@') goto yy96;
- if (yych <= 'Z') goto yy447;
- goto yy345;
+ if (yych <= 'F') goto yy1766;
+ if (yych <= 'Z') goto yy1767;
}
} else {
- if (yych <= '~') {
- if (yych == '`') goto yy345;
- if (yych <= 'z') goto yy447;
- goto yy345;
+ if (yych <= '`') {
+ if (yych <= '_') goto yy1660;
} else {
- if (yych <= 0x7F) goto yy4;
- if (yych <= 0xC1) goto yy345;
- if (yych <= 0xF4) goto yy4;
- goto yy345;
+ if (yych <= 'f') goto yy1768;
+ if (yych <= 'z') goto yy1769;
}
}
}
-yy347:
- yyaccept = 20;
+yy1648:
+#line 451 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_WORD); }
+#line 44104 "../../lnav/src/data_scanner_re.cc"
+yy1649:
+ yyaccept = 7;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '-') {
- if (yych <= 0x1B) {
- if (yych <= '\n') {
- if (yych <= 0x00) goto yy345;
- if (yych <= 0x08) goto yy4;
- goto yy345;
+ if (yych <= '@') {
+ if (yych <= '/') {
+ if (yych == '\'') goto yy1760;
+ goto yy1660;
+ } else {
+ if (yych <= '9') goto yy1764;
+ if (yych <= ':') goto yy1765;
+ goto yy1660;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych <= 'F') goto yy1766;
+ if (yych <= 'Z') goto yy1767;
+ goto yy1660;
+ } else {
+ if (yych <= 'f') goto yy1768;
+ if (yych <= 'z') goto yy1769;
+ goto yy1660;
+ }
+ }
+yy1650:
+#line 461 "../../lnav/src/data_scanner_re.re"
+ {
+ RET(DT_SYMBOL);
+ }
+#line 44133 "../../lnav/src/data_scanner_re.cc"
+yy1651:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'A') {
+ if (yych <= '/') {
+ if (yych == '\'') goto yy1760;
+ goto yy1660;
+ } else {
+ if (yych <= '9') goto yy1764;
+ if (yych <= ':') goto yy1765;
+ if (yych <= '@') goto yy1660;
+ goto yy1770;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych <= 'F') goto yy1766;
+ if (yych <= 'Z') goto yy1767;
+ goto yy1660;
+ } else {
+ if (yych <= 'a') goto yy1771;
+ if (yych <= 'f') goto yy1768;
+ if (yych <= 'z') goto yy1769;
+ goto yy1660;
+ }
+ }
+yy1652:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych == '\'') goto yy1760;
+ if (yych <= '9') goto yy1773;
+ goto yy1774;
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '@') goto yy1773;
+ goto yy1767;
+ } else {
+ if (yych <= '`') goto yy1773;
+ if (yych <= 'z') goto yy1769;
+ goto yy1773;
+ }
+ }
+yy1653:
+ yyaccept = 6;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '9') {
+ if (yych <= '\'') {
+ if (yych == '%') goto yy1773;
+ if (yych <= '&') goto yy1648;
+ goto yy1760;
+ } else {
+ if (yych == '+') goto yy1773;
+ if (yych <= ',') goto yy1648;
+ goto yy1773;
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= ':') goto yy1774;
+ if (yych <= '?') goto yy1648;
+ if (yych <= '@') goto yy1773;
+ goto yy1767;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy1648;
+ goto yy1773;
} else {
- if (yych == '\r') goto yy345;
- if (yych <= 0x1A) goto yy4;
- goto yy345;
+ if (yych <= '`') goto yy1648;
+ if (yych <= 'z') goto yy1769;
+ goto yy1648;
}
+ }
+ }
+yy1654:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'T') {
+ if (yych <= '9') {
+ if (yych == '\'') goto yy1760;
+ goto yy1773;
+ } else {
+ if (yych <= ':') goto yy1774;
+ if (yych <= '@') goto yy1773;
+ goto yy1767;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych <= 'U') goto yy1775;
+ if (yych <= 'Z') goto yy1767;
+ goto yy1773;
+ } else {
+ if (yych == 'o') goto yy1776;
+ if (yych <= 'z') goto yy1769;
+ goto yy1773;
+ }
+ }
+yy1655:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'Q') {
+ if (yych <= '9') {
+ if (yych == '\'') goto yy1760;
+ goto yy1773;
+ } else {
+ if (yych <= ':') goto yy1774;
+ if (yych <= '@') goto yy1773;
+ goto yy1767;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych <= 'R') goto yy1777;
+ if (yych <= 'Z') goto yy1767;
+ goto yy1773;
} else {
+ if (yych == 'r') goto yy1778;
+ if (yych <= 'z') goto yy1769;
+ goto yy1773;
+ }
+ }
+yy1656:
+ yych = *++YYCURSOR;
+ if (yych == ']') goto yy1710;
+#line 378 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_LSQUARE); }
+#line 44257 "../../lnav/src/data_scanner_re.cc"
+yy1657:
+ yyaccept = 1;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 0x7F) {
+ if (yych <= '[') {
+ if (yych == '\n') goto yy1614;
+ goto yy1779;
+ } else {
+ if (yych <= '\\') goto yy1720;
+ if (yych == 'n') goto yy1617;
+ goto yy1779;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy1614;
+ if (yych <= 0xDF) goto yy1780;
+ if (yych <= 0xE0) goto yy1781;
+ goto yy1782;
+ } else {
+ if (yych <= 0xF0) goto yy1783;
+ if (yych <= 0xF3) goto yy1784;
+ if (yych <= 0xF4) goto yy1785;
+ goto yy1614;
+ }
+ }
+yy1658:
+ ++YYCURSOR;
+#line 379 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_RSQUARE); }
+#line 44287 "../../lnav/src/data_scanner_re.cc"
+yy1659:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+yy1660:
+ if (yybm_init[1536+yych] & 64) {
+ goto yy1659;
+ }
+ switch (yych) {
+ case '%':
+ case '+': goto yy1697;
+ case '-': goto yy1729;
+ case '.': goto yy1763;
+ case '/': goto yy1731;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ case ':': goto yy1786;
+ case '@': goto yy1737;
+ default: goto yy1650;
+ }
+yy1661:
+ yyaccept = 6;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= '*') {
if (yych <= '%') {
- if (yych <= 0x1F) goto yy4;
- if (yych <= '#') goto yy345;
- if (yych <= '$') goto yy4;
- goto yy80;
+ if (yych <= '$') goto yy1648;
+ goto yy1660;
} else {
- if (yych == '+') goto yy80;
- if (yych <= ',') goto yy345;
- goto yy255;
+ if (yych == '\'') goto yy1760;
+ goto yy1648;
+ }
+ } else {
+ if (yych <= ',') {
+ if (yych <= '+') goto yy1660;
+ goto yy1648;
+ } else {
+ if (yych <= '/') goto yy1660;
+ if (yych <= '9') goto yy1764;
+ goto yy1787;
}
}
} else {
if (yych <= '^') {
- if (yych <= ':') {
- if (yych <= '.') goto yy445;
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy346;
- goto yy4;
+ if (yych <= '@') {
+ if (yych <= '?') goto yy1648;
+ goto yy1660;
} else {
- if (yych <= '?') goto yy345;
- if (yych <= '@') goto yy96;
- if (yych <= 'Z') goto yy447;
- goto yy345;
+ if (yych <= 'F') goto yy1766;
+ if (yych <= 'Z') goto yy1767;
+ goto yy1648;
}
} else {
- if (yych <= '~') {
- if (yych == '`') goto yy345;
- if (yych <= 'z') goto yy447;
- goto yy345;
+ if (yych <= '`') {
+ if (yych <= '_') goto yy1660;
+ goto yy1648;
} else {
- if (yych <= 0x7F) goto yy4;
- if (yych <= 0xC1) goto yy345;
- if (yych <= 0xF4) goto yy4;
- goto yy345;
+ if (yych <= 'f') goto yy1768;
+ if (yych <= 'z') goto yy1769;
+ goto yy1648;
}
}
}
-yy348:
- yyaccept = 20;
+yy1662:
+ yyaccept = 7;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '.') {
- if (yych <= 0x1F) {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy345;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy345;
- goto yy4;
- } else {
- if (yych <= '\r') goto yy345;
- if (yych == 0x1B) goto yy345;
- goto yy4;
- }
+ if (yych <= '@') {
+ if (yych <= '/') {
+ if (yych == '\'') goto yy1760;
+ goto yy1660;
} else {
- if (yych <= '*') {
- if (yych <= '#') goto yy345;
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy80;
- goto yy345;
- } else {
- if (yych <= '+') goto yy80;
- if (yych <= ',') goto yy345;
- if (yych <= '-') goto yy255;
- goto yy445;
- }
+ if (yych <= '9') goto yy1764;
+ if (yych <= ':') goto yy1787;
+ goto yy1660;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych <= 'F') goto yy1766;
+ if (yych <= 'Z') goto yy1767;
+ goto yy1660;
+ } else {
+ if (yych <= 'f') goto yy1768;
+ if (yych <= 'z') goto yy1769;
+ goto yy1660;
+ }
+ }
+yy1663:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= '&') {
+ if (yych == '"') goto yy1788;
+ goto yy1660;
+ } else {
+ if (yych <= '\'') goto yy1789;
+ if (yych <= '/') goto yy1660;
+ if (yych <= '9') goto yy1764;
+ goto yy1787;
}
} else {
+ if (yych <= '`') {
+ if (yych <= '@') goto yy1660;
+ if (yych <= 'F') goto yy1766;
+ if (yych <= 'Z') goto yy1767;
+ goto yy1660;
+ } else {
+ if (yych <= 'a') goto yy1771;
+ if (yych <= 'f') goto yy1768;
+ if (yych <= 'z') goto yy1769;
+ goto yy1660;
+ }
+ }
+yy1664:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych == '\'') goto yy1760;
+ goto yy1773;
+ } else {
+ if (yych <= 'Z') goto yy1767;
+ if (yych <= '`') goto yy1773;
+ if (yych <= 'z') goto yy1769;
+ goto yy1773;
+ }
+yy1665:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'Z') {
+ if (yych == '\'') goto yy1760;
+ if (yych <= '@') goto yy1773;
+ goto yy1767;
+ } else {
+ if (yych <= 't') {
+ if (yych <= '`') goto yy1773;
+ goto yy1769;
+ } else {
+ if (yych <= 'u') goto yy1791;
+ if (yych <= 'z') goto yy1769;
+ goto yy1773;
+ }
+ }
+yy1666:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '"') {
+ if (yych <= '!') goto yy1773;
+ goto yy1788;
+ } else {
+ if (yych == '\'') goto yy1789;
+ goto yy1773;
+ }
+ } else {
+ if (yych <= 'd') {
+ if (yych <= 'Z') goto yy1767;
+ if (yych <= '`') goto yy1773;
+ goto yy1769;
+ } else {
+ if (yych <= 'e') goto yy1792;
+ if (yych <= 'z') goto yy1769;
+ goto yy1773;
+ }
+ }
+yy1667:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'Z') {
+ if (yych == '\'') goto yy1760;
+ if (yych <= '@') goto yy1773;
+ goto yy1767;
+ } else {
+ if (yych <= 'q') {
+ if (yych <= '`') goto yy1773;
+ goto yy1769;
+ } else {
+ if (yych <= 'r') goto yy1778;
+ if (yych <= 'z') goto yy1769;
+ goto yy1773;
+ }
+ }
+yy1668:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '\'') {
+ if (yych == '"') goto yy1788;
+ if (yych <= '&') goto yy1773;
+ goto yy1789;
+ } else {
if (yych <= 'Z') {
- if (yych <= '9') {
- if (yych <= '/') goto yy4;
- if (yych <= '4') goto yy346;
- if (yych <= '5') goto yy448;
- goto yy446;
- } else {
- if (yych <= ':') goto yy4;
- if (yych <= '?') goto yy345;
- if (yych <= '@') goto yy96;
- goto yy447;
- }
+ if (yych <= '@') goto yy1773;
+ goto yy1767;
} else {
- if (yych <= 'z') {
- if (yych == '_') goto yy447;
- if (yych <= '`') goto yy345;
- goto yy447;
- } else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy345;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy345;
- if (yych <= 0xF4) goto yy4;
- goto yy345;
- }
- }
+ if (yych <= '`') goto yy1773;
+ if (yych <= 'z') goto yy1769;
+ goto yy1773;
}
}
-yy349:
- yyaccept = 6;
+yy1669:
+ yych = *++YYCURSOR;
+ if (yych == '}') goto yy1710;
+#line 376 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_LCURLY); }
+#line 44497 "../../lnav/src/data_scanner_re.cc"
+yy1670:
+ ++YYCURSOR;
+#line 377 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_RCURLY); }
+#line 44502 "../../lnav/src/data_scanner_re.cc"
+yy1671:
+ ++YYCURSOR;
+yy1672:
+#line 173 "../../lnav/src/data_scanner_re.re"
+ { return nonstd::nullopt; }
+#line 44508 "../../lnav/src/data_scanner_re.cc"
+yy1673:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1672;
+ if (yych <= 0xBF) goto yy1613;
+ goto yy1672;
+yy1674:
+ yyaccept = 8;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 0x9F) goto yy1672;
+ if (yych <= 0xBF) goto yy1793;
+ goto yy1672;
+yy1675:
+ yyaccept = 8;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
+ if (yych <= 0x7F) goto yy1672;
+ if (yych <= 0xBF) goto yy1793;
+ goto yy1672;
+yy1676:
+ yyaccept = 8;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 0x8F) goto yy1672;
+ if (yych <= 0xBF) goto yy1794;
+ goto yy1672;
+yy1677:
+ yyaccept = 8;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 0x7F) goto yy1672;
+ if (yych <= 0xBF) goto yy1794;
+ goto yy1672;
+yy1678:
+ yyaccept = 8;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 0x7F) goto yy1672;
+ if (yych <= 0x8F) goto yy1794;
+ goto yy1672;
+yy1679:
+ yych = *++YYCURSOR;
+yy1680:
+ if (yybm_init[1536+yych] & 128) {
+ goto yy1679;
}
- if (yych <= '?') {
- if (yych <= '$') {
- if (yych <= '\r') {
- if (yych <= 0x08) {
- if (yych <= 0x00) goto yy26;
- goto yy3;
+ goto yy1616;
+yy1681:
+ yych = *++YYCURSOR;
+ if (yych == ':') goto yy1795;
+yy1682:
+ YYCURSOR = YYMARKER;
+ if (yyaccept <= 22) {
+ if (yyaccept <= 11) {
+ if (yyaccept <= 5) {
+ if (yyaccept <= 2) {
+ if (yyaccept <= 1) {
+ if (yyaccept == 0) {
+ goto yy1616;
+ } else {
+ goto yy1614;
+ }
+ } else {
+ goto yy1631;
+ }
} else {
- if (yych <= '\n') goto yy26;
- if (yych <= '\f') goto yy3;
- goto yy26;
+ if (yyaccept <= 4) {
+ if (yyaccept == 3) {
+ goto yy1635;
+ } else {
+ goto yy1640;
+ }
+ } else {
+ goto yy1643;
+ }
}
} else {
- if (yych <= 0x1B) {
- if (yych <= 0x1A) goto yy3;
- goto yy26;
+ if (yyaccept <= 8) {
+ if (yyaccept <= 7) {
+ if (yyaccept == 6) {
+ goto yy1648;
+ } else {
+ goto yy1650;
+ }
+ } else {
+ goto yy1672;
+ }
} else {
- if (yych <= 0x1F) goto yy3;
- if (yych <= '#') goto yy26;
- goto yy3;
+ if (yyaccept <= 10) {
+ if (yyaccept == 9) {
+ goto yy1633;
+ } else {
+ goto yy1728;
+ }
+ } else {
+ goto yy1733;
+ }
}
}
} else {
- if (yych <= '-') {
- if (yych <= '*') {
- if (yych <= '%') goto yy105;
- goto yy26;
+ if (yyaccept <= 17) {
+ if (yyaccept <= 14) {
+ if (yyaccept <= 13) {
+ if (yyaccept == 12) {
+ goto yy1735;
+ } else {
+ goto yy1741;
+ }
+ } else {
+ yyt3 = YYCURSOR;
+ goto yy1762;
+ }
} else {
- if (yych <= '+') goto yy80;
- if (yych <= ',') goto yy26;
- goto yy255;
+ if (yyaccept <= 16) {
+ if (yyaccept == 15) {
+ goto yy1688;
+ } else {
+ goto yy1800;
+ }
+ } else {
+ goto yy1808;
+ }
}
} else {
- if (yych <= '/') {
- if (yych >= '/') goto yy3;
+ if (yyaccept <= 20) {
+ if (yyaccept <= 19) {
+ if (yyaccept == 18) {
+ goto yy1817;
+ } else {
+ goto yy1829;
+ }
+ } else {
+ goto yy1819;
+ }
} else {
- if (yych <= '9') goto yy349;
- if (yych <= ':') goto yy62;
- goto yy26;
+ if (yyaccept == 21) {
+ goto yy1861;
+ } else {
+ goto yy1762;
+ }
}
}
}
} else {
- if (yych <= 'z') {
- if (yych <= '^') {
- if (yych <= 'D') {
- if (yych <= '@') goto yy96;
- goto yy258;
+ if (yyaccept <= 34) {
+ if (yyaccept <= 28) {
+ if (yyaccept <= 25) {
+ if (yyaccept <= 24) {
+ if (yyaccept == 23) {
+ goto yy1806;
+ } else {
+ goto yy1893;
+ }
+ } else {
+ yyt2 = yyt1;
+ goto yy1893;
+ }
} else {
- if (yych <= 'E') goto yy259;
- if (yych <= 'Z') goto yy258;
- goto yy26;
+ if (yyaccept <= 27) {
+ if (yyaccept == 26) {
+ yyt1 = YYCURSOR;
+ goto yy2068;
+ } else {
+ goto yy2080;
+ }
+ } else {
+ goto yy1967;
+ }
}
} else {
- if (yych <= '`') {
- if (yych <= '_') goto yy258;
- goto yy26;
+ if (yyaccept <= 31) {
+ if (yyaccept <= 30) {
+ if (yyaccept == 29) {
+ goto yy2095;
+ } else {
+ goto yy2107;
+ }
+ } else {
+ goto yy2123;
+ }
} else {
- if (yych == 'e') goto yy259;
- goto yy258;
+ if (yyaccept <= 33) {
+ if (yyaccept == 32) {
+ goto yy2034;
+ } else {
+ goto yy2068;
+ }
+ } else {
+ goto yy2237;
+ }
}
}
} else {
- if (yych <= 0xE0) {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy26;
- goto yy3;
+ if (yyaccept <= 40) {
+ if (yyaccept <= 37) {
+ if (yyaccept <= 36) {
+ if (yyaccept == 35) {
+ goto yy1913;
+ } else {
+ yyt2 = yyt4;
+ goto yy1893;
+ }
+ } else {
+ goto yy2448;
+ }
} else {
- if (yych <= 0xC1) goto yy26;
- if (yych <= 0xDF) goto yy56;
- goto yy57;
+ if (yyaccept <= 39) {
+ if (yyaccept == 38) {
+ goto yy2039;
+ } else {
+ goto yy2538;
+ }
+ } else {
+ goto yy2548;
+ }
}
} else {
- if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy58;
- goto yy59;
+ if (yyaccept <= 43) {
+ if (yyaccept <= 42) {
+ if (yyaccept == 41) {
+ goto yy2570;
+ } else {
+ goto yy2927;
+ }
+ } else {
+ goto yy2961;
+ }
} else {
- if (yych <= 0xF3) goto yy60;
- if (yych <= 0xF4) goto yy61;
- goto yy26;
+ if (yyaccept == 44) {
+ goto yy3021;
+ } else {
+ goto yy3104;
+ }
}
}
}
}
-yy350:
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
+yy1683:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy1796;
+ goto yy1682;
+yy1684:
+ yych = *++YYCURSOR;
+ if (yybm_init[1280+yych] & 1) {
+ goto yy1684;
+ }
+ if (yych <= '@') goto yy1682;
+ if (yych <= 'Z') goto yy1797;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'z') goto yy1797;
+ goto yy1682;
+yy1685:
+ yych = *++YYCURSOR;
+yy1686:
+ if (yybm_init[1280+yych] & 2) {
+ goto yy1685;
+ }
+ if (yych <= 0xDF) {
+ if (yych <= '"') {
+ if (yych <= 0x1B) goto yy1682;
+ goto yy1798;
+ } else {
+ if (yych <= '\\') goto yy1689;
+ if (yych <= 0xC1) goto yy1682;
+ goto yy1690;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy1691;
+ if (yych <= 0xEF) goto yy1692;
+ goto yy1693;
+ } else {
+ if (yych <= 0xF3) goto yy1694;
+ if (yych <= 0xF4) goto yy1695;
+ goto yy1682;
+ }
+ }
+yy1687:
+ yych = *++YYCURSOR;
+ if (yych == '"') goto yy1799;
+yy1688:
+#line 178 "../../lnav/src/data_scanner_re.re"
+ {
+ CAPTURE(DT_QUOTED_STRING);
+ switch (this->ds_input[cap_inner.c_begin]) {
+ case 'f':
+ case 'u':
+ case 'r':
+ cap_inner.c_begin += 1;
+ break;
+ }
+ cap_inner.c_begin += 1;
+ cap_inner.c_end -= 1;
+ return tokenize_result{token_out, cap_all, cap_inner, this->ds_input.data()};
+ }
+#line 44800 "../../lnav/src/data_scanner_re.cc"
+yy1689:
+ yych = *++YYCURSOR;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 0x00) goto yy1682;
+ goto yy1685;
+ } else {
+ if (yych <= 0xC1) goto yy1682;
+ if (yych >= 0xE0) goto yy1691;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy1692;
+ goto yy1693;
+ } else {
+ if (yych <= 0xF3) goto yy1694;
+ if (yych <= 0xF4) goto yy1695;
+ goto yy1682;
+ }
+ }
+yy1690:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy1685;
+ goto yy1682;
+yy1691:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy1682;
+ if (yych <= 0xBF) goto yy1690;
+ goto yy1682;
+yy1692:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy1690;
+ goto yy1682;
+yy1693:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy1682;
+ if (yych <= 0xBF) goto yy1692;
+ goto yy1682;
+yy1694:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy1692;
+ goto yy1682;
+yy1695:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0x8F) goto yy1692;
+ goto yy1682;
+yy1696:
+ yych = *++YYCURSOR;
+ if (yybm_init[1280+yych] & 4) {
+ goto yy1696;
+ }
+ if (yych == '[') goto yy1801;
+ goto yy1682;
+yy1697:
+ yych = *++YYCURSOR;
+yy1698:
+ if (yybm_init[1280+yych] & 8) {
+ goto yy1697;
+ }
+ if (yych != '@') goto yy1682;
+yy1699:
+ yych = *++YYCURSOR;
+ if (yych == '.') goto yy1802;
+ goto yy1803;
+yy1700:
+ yych = *++YYCURSOR;
+yy1701:
+ if (yybm_init[1280+yych] & 16) {
+ goto yy1700;
+ }
+ if (yych <= 0xDF) {
+ if (yych <= '\'') {
+ if (yych <= 0x1B) goto yy1682;
+ goto yy1804;
+ } else {
+ if (yych <= '\\') goto yy1703;
+ if (yych <= 0xC1) goto yy1682;
+ goto yy1704;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy1705;
+ if (yych <= 0xEF) goto yy1706;
+ goto yy1707;
+ } else {
+ if (yych <= 0xF3) goto yy1708;
+ if (yych <= 0xF4) goto yy1709;
+ goto yy1682;
+ }
+ }
+yy1702:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) {
+ if (yych <= 'R') {
+ if (yych == '\'') goto yy1807;
+ yyt2 = YYCURSOR;
+ goto yy1805;
+ } else {
+ if (yych <= 'S') goto yy1682;
+ if (yych == 's') goto yy1682;
+ yyt2 = YYCURSOR;
+ goto yy1805;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy1809;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1810;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1811;
+ } else {
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy1812;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1813;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1814;
+ }
+ goto yy1682;
+ }
+ }
+yy1703:
+ yych = *++YYCURSOR;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 0x00) goto yy1682;
+ goto yy1700;
+ } else {
+ if (yych <= 0xC1) goto yy1682;
+ if (yych >= 0xE0) goto yy1705;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy1706;
+ goto yy1707;
+ } else {
+ if (yych <= 0xF3) goto yy1708;
+ if (yych <= 0xF4) goto yy1709;
+ goto yy1682;
+ }
+ }
+yy1704:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy1700;
+ goto yy1682;
+yy1705:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy1682;
+ if (yych <= 0xBF) goto yy1704;
+ goto yy1682;
+yy1706:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy1704;
+ goto yy1682;
+yy1707:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy1682;
+ if (yych <= 0xBF) goto yy1706;
+ goto yy1682;
+yy1708:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy1706;
+ goto yy1682;
+yy1709:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0x8F) goto yy1706;
+ goto yy1682;
+yy1710:
+ ++YYCURSOR;
+#line 375 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_EMPTY_CONTAINER); }
+#line 44991 "../../lnav/src/data_scanner_re.cc"
+yy1711:
+ yych = *++YYCURSOR;
if (yych <= '9') {
- if (yych <= 0x1F) {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy5;
- if (yych <= 0x08) goto yy3;
- if (yych <= '\n') goto yy5;
- goto yy3;
+ if (yych <= '+') {
+ if (yych == '%') goto yy1697;
+ if (yych <= '*') goto yy1682;
+ goto yy1697;
+ } else {
+ if (yych <= ',') goto yy1682;
+ if (yych <= '.') goto yy1697;
+ if (yych <= '/') goto yy1682;
+ goto yy1815;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '?') goto yy1682;
+ if (yych <= '@') goto yy1699;
+ if (yych <= 'Z') goto yy1815;
+ goto yy1682;
+ } else {
+ if (yych <= '_') goto yy1697;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'z') goto yy1815;
+ goto yy1682;
+ }
+ }
+yy1712:
+ yych = *++YYCURSOR;
+ if (yybm_init[1280+yych] & 32) {
+ goto yy1714;
+ }
+ if (yych <= '\r') {
+ if (yych <= 0x08) {
+ if (yych <= 0x00) goto yy1818;
+ goto yy1698;
+ } else {
+ if (yych <= '\n') goto yy1818;
+ if (yych <= '\f') goto yy1698;
+ goto yy1818;
+ }
+ } else {
+ if (yych <= ' ') {
+ if (yych <= 0x1F) goto yy1698;
+ goto yy1818;
+ } else {
+ if (yych == '.') goto yy1820;
+ goto yy1698;
+ }
+ }
+yy1713:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '.') goto yy1820;
+ goto yy1822;
+yy1714:
+ yych = *++YYCURSOR;
+yy1715:
+ if (yybm_init[1280+yych] & 32) {
+ goto yy1714;
+ }
+ if (yych <= '%') {
+ if (yych <= '\f') {
+ if (yych <= 0x00) goto yy1818;
+ if (yych <= 0x08) goto yy1682;
+ if (yych <= '\n') goto yy1818;
+ goto yy1682;
+ } else {
+ if (yych <= 0x1F) {
+ if (yych <= '\r') goto yy1818;
+ goto yy1682;
} else {
- if (yych <= '\r') goto yy5;
- if (yych == 0x1B) goto yy5;
- goto yy3;
+ if (yych <= ' ') goto yy1818;
+ if (yych <= '$') goto yy1682;
+ goto yy1697;
}
+ }
+ } else {
+ if (yych <= '.') {
+ if (yych == '+') goto yy1697;
+ if (yych <= ',') goto yy1682;
+ goto yy1697;
} else {
+ if (yych <= '@') {
+ if (yych <= '?') goto yy1682;
+ goto yy1699;
+ } else {
+ if (yych == '_') goto yy1697;
+ goto yy1682;
+ }
+ }
+ }
+yy1716:
+ yych = *++YYCURSOR;
+ if (yych <= 'Z') {
+ if (yych <= '-') {
if (yych <= '*') {
- if (yych <= '#') goto yy5;
- if (yych <= '$') goto yy3;
- if (yych <= '%') goto yy80;
- goto yy5;
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy1830;
+ }
+ yyt1 = YYCURSOR;
+ goto yy1828;
} else {
+ if (yych <= '+') {
+ yyt1 = YYCURSOR;
+ goto yy1830;
+ }
if (yych <= ',') {
- if (yych <= '+') goto yy80;
- goto yy5;
- } else {
- if (yych <= '.') goto yy46;
- if (yych <= '/') goto yy3;
- goto yy447;
+ yyt1 = YYCURSOR;
+ goto yy1828;
}
+ goto yy1697;
+ }
+ } else {
+ if (yych <= '9') {
+ if (yych <= '.') {
+ yyt1 = YYCURSOR;
+ goto yy1830;
+ }
+ if (yych <= '/') {
+ yyt1 = YYCURSOR;
+ goto yy1828;
+ }
+ yyt1 = YYCURSOR;
+ goto yy1831;
+ } else {
+ if (yych <= '?') {
+ yyt1 = YYCURSOR;
+ goto yy1828;
+ }
+ if (yych <= '@') {
+ yyt1 = YYCURSOR;
+ goto yy1832;
+ }
+ yyt1 = YYCURSOR;
+ goto yy1831;
}
}
} else {
- if (yych <= '~') {
- if (yych <= 'Z') {
- if (yych <= ':') goto yy62;
- if (yych <= '?') goto yy5;
- if (yych <= '@') goto yy96;
- goto yy46;
+ if (yych <= 0xC1) {
+ if (yych <= '`') {
+ if (yych == '_') {
+ yyt1 = YYCURSOR;
+ goto yy1830;
+ }
+ yyt1 = YYCURSOR;
+ goto yy1828;
} else {
- if (yych <= '_') {
- if (yych <= '^') goto yy5;
- goto yy46;
- } else {
- if (yych <= '`') goto yy5;
- if (yych <= 'z') goto yy46;
- goto yy5;
+ if (yych <= 'z') {
+ yyt1 = YYCURSOR;
+ goto yy1831;
+ }
+ if (yych <= 0x7F) {
+ yyt1 = YYCURSOR;
+ goto yy1828;
}
+ goto yy1682;
}
} else {
- if (yych <= 0xE0) {
- if (yych <= 0x7F) goto yy3;
- if (yych <= 0xC1) goto yy5;
- if (yych <= 0xDF) goto yy56;
- goto yy57;
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
+ yyt1 = YYCURSOR;
+ goto yy1833;
+ }
+ if (yych <= 0xE0) {
+ yyt1 = YYCURSOR;
+ goto yy1834;
+ }
+ yyt1 = YYCURSOR;
+ goto yy1835;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy58;
- goto yy59;
- } else {
- if (yych <= 0xF3) goto yy60;
- if (yych <= 0xF4) goto yy61;
- goto yy5;
+ yyt1 = YYCURSOR;
+ goto yy1836;
+ }
+ if (yych <= 0xF3) {
+ yyt1 = YYCURSOR;
+ goto yy1837;
}
+ if (yych <= 0xF4) {
+ yyt1 = YYCURSOR;
+ goto yy1838;
+ }
+ goto yy1682;
}
}
}
-yy351:
+yy1717:
yych = *++YYCURSOR;
- if (yych <= '/') goto yy81;
- if (yych <= '9') goto yy449;
- goto yy81;
-yy352:
- yyaccept = 0;
+ if (yybm_init[1024+yych] & 32) {
+ goto yy1841;
+ }
+ if (yych <= '.') {
+ if (yych <= '\r') {
+ if (yych <= 0x08) {
+ if (yych <= 0x00) goto yy1818;
+ goto yy1698;
+ } else {
+ if (yych <= '\n') goto yy1818;
+ if (yych <= '\f') goto yy1698;
+ goto yy1818;
+ }
+ } else {
+ if (yych <= '$') {
+ if (yych == ' ') goto yy1839;
+ goto yy1698;
+ } else {
+ if (yych <= '%') goto yy1727;
+ if (yych <= '-') goto yy1698;
+ goto yy1840;
+ }
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '9') {
+ if (yych <= '/') goto yy1698;
+ goto yy1842;
+ } else {
+ if (yych <= '@') goto yy1698;
+ if (yych <= 'F') goto yy1843;
+ goto yy1714;
+ }
+ } else {
+ if (yych <= 'w') {
+ if (yych <= '`') goto yy1698;
+ if (yych <= 'f') goto yy1843;
+ goto yy1714;
+ } else {
+ if (yych <= 'x') goto yy1845;
+ if (yych <= 'z') goto yy1714;
+ goto yy1698;
+ }
+ }
+ }
+yy1718:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '.') goto yy1840;
+ goto yy1847;
+yy1719:
+ yych = *++YYCURSOR;
+ if (yych != '/') goto yy1698;
+yy1720:
+ yych = *++YYCURSOR;
+ if (yych == 'P') goto yy1724;
+ goto yy1722;
+yy1721:
+ yych = *++YYCURSOR;
+yy1722:
+ if (yybm_init[1280+yych] & 64) {
+ goto yy1721;
+ }
+ goto yy1633;
+yy1723:
+ yyaccept = 9;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[1280+yych] & 128) {
+ goto yy1723;
+ }
+ if (yych <= 0xDF) {
+ if (yych <= '*') {
+ if (yych <= 0x00) goto yy1633;
+ if (yych <= '\'') goto yy1850;
+ goto yy1851;
+ } else {
+ if (yych <= 0x7F) goto yy1850;
+ if (yych <= 0xC1) goto yy1633;
+ goto yy1852;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy1853;
+ if (yych <= 0xEF) goto yy1854;
+ goto yy1855;
+ } else {
+ if (yych <= 0xF3) goto yy1856;
+ if (yych <= 0xF4) goto yy1857;
+ goto yy1633;
+ }
+ }
+yy1724:
+ yych = *++YYCURSOR;
+ if (yych == 'r') goto yy1858;
+ goto yy1722;
+yy1725:
+ yych = *++YYCURSOR;
+yy1726:
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ if (yych == '%') goto yy1859;
+ goto yy1682;
+yy1727:
+ yyaccept = 10;
yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '/') {
+ if (yych <= '*') {
+ if (yych == '%') goto yy1698;
+ } else {
+ if (yych == ',') goto yy1728;
+ if (yych <= '.') goto yy1698;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '9') goto yy1698;
+ if (yych <= '?') goto yy1728;
+ if (yych <= 'Z') goto yy1698;
+ } else {
+ if (yych == '`') goto yy1728;
+ if (yych <= 'z') goto yy1698;
+ }
+ }
+yy1728:
+#line 428 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_PERCENTAGE); }
+#line 45307 "../../lnav/src/data_scanner_re.cc"
+yy1729:
+ yych = *++YYCURSOR;
if (yych <= '9') {
if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
+ if (yych == '%') goto yy1697;
+ if (yych <= '*') goto yy1682;
+ goto yy1697;
} else {
- if (yych <= ',') goto yy4;
- if (yych <= '.') goto yy46;
- if (yych <= '/') goto yy4;
- goto yy451;
+ if (yych <= ',') goto yy1682;
+ if (yych <= '.') goto yy1697;
+ if (yych <= '/') goto yy1682;
+ goto yy1745;
}
} else {
if (yych <= '^') {
- if (yych <= '?') goto yy4;
- if (yych <= '@') goto yy96;
- if (yych <= 'Z') goto yy344;
- goto yy4;
+ if (yych <= '?') goto yy1682;
+ if (yych <= '@') goto yy1699;
+ if (yych <= 'Z') goto yy1745;
+ goto yy1682;
} else {
- if (yych == '`') goto yy4;
- if (yych <= 'z') goto yy344;
- goto yy4;
+ if (yych == '`') goto yy1682;
+ if (yych <= 'z') goto yy1745;
+ goto yy1682;
}
}
-yy353:
- yyaccept = 21;
+yy1730:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '1') {
+ if (yych <= '/') goto yy1698;
+ if (yych <= '0') goto yy1860;
+ goto yy1862;
+ } else {
+ if (yych <= '2') goto yy1863;
+ if (yych <= '9') goto yy1860;
+ goto yy1698;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy1745;
+ if (yych <= '^') goto yy1698;
+ goto yy1745;
+ } else {
+ if (yych <= '`') goto yy1698;
+ if (yych <= 'z') goto yy1745;
+ goto yy1698;
+ }
+ }
+yy1731:
+ yych = *++YYCURSOR;
+ if (yych <= 'Z') {
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy1864;
+ if (yych <= '@') goto yy1682;
+ goto yy1864;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy1682;
+ goto yy1864;
+ } else {
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'z') goto yy1864;
+ goto yy1682;
+ }
+ }
+yy1732:
+ yyaccept = 11;
yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
if (yych <= '9') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy354;
- if (yych <= 0x08) goto yy3;
- if (yych >= '\v') goto yy3;
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych >= '%') goto yy1727;
} else {
- if (yych <= 0x1A) {
- if (yych >= 0x0E) goto yy3;
- } else {
- if (yych <= 0x1B) goto yy354;
- if (yych <= 0x1F) goto yy3;
- }
+ if (yych == '+') goto yy1697;
}
} else {
- if (yych <= '+') {
- if (yych <= '$') goto yy3;
- if (yych <= '%') goto yy80;
- if (yych >= '+') goto yy80;
+ if (yych <= '.') {
+ if (yych <= '-') goto yy1866;
+ goto yy1867;
} else {
- if (yych <= '-') {
- if (yych >= '-') goto yy181;
- } else {
- if (yych == '/') goto yy3;
- goto yy46;
- }
+ if (yych <= '/') goto yy1868;
+ if (yych <= '7') goto yy1869;
+ goto yy1870;
}
}
} else {
- if (yych <= '~') {
- if (yych <= 'Z') {
- if (yych <= ':') goto yy452;
- if (yych <= '?') goto yy354;
- if (yych <= '@') goto yy96;
- goto yy46;
+ if (yych <= 'Z') {
+ if (yych <= '?') {
+ if (yych <= ':') goto yy1871;
} else {
- if (yych <= '_') {
- if (yych >= '_') goto yy46;
- } else {
- if (yych <= '`') goto yy354;
- if (yych <= 'z') goto yy46;
- }
+ if (yych <= '@') goto yy1737;
+ if (yych <= 'F') goto yy1872;
+ goto yy1742;
}
} else {
- if (yych <= 0xE0) {
- if (yych <= 0x7F) goto yy3;
- if (yych <= 0xC1) goto yy354;
- if (yych <= 0xDF) goto yy56;
- goto yy57;
+ if (yych <= '`') {
+ if (yych == '_') goto yy1745;
} else {
- if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy58;
- goto yy59;
- } else {
- if (yych <= 0xF3) goto yy60;
- if (yych <= 0xF4) goto yy61;
- }
+ if (yych <= 'f') goto yy1872;
+ if (yych <= 'z') goto yy1742;
}
}
}
-yy354:
-#line 174 "../../lnav/src/data_scanner_re.re"
+yy1733:
+#line 427 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_OCTAL_NUMBER); }
+#line 45417 "../../lnav/src/data_scanner_re.cc"
+yy1734:
+ yyaccept = 12;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ if (yych <= ':') {
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych >= '%') goto yy1727;
+ } else {
+ if (yych == '+') goto yy1697;
+ }
+ } else {
+ if (yych <= '.') {
+ if (yych <= '-') goto yy1866;
+ goto yy1867;
+ } else {
+ if (yych <= '/') goto yy1868;
+ if (yych <= '9') goto yy1870;
+ goto yy1871;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') {
+ if (yych >= '@') goto yy1737;
+ } else {
+ if (yych <= 'F') goto yy1872;
+ if (yych <= 'Z') goto yy1742;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych <= '_') goto yy1745;
+ } else {
+ if (yych <= 'f') goto yy1872;
+ if (yych <= 'z') goto yy1742;
+ }
+ }
+ }
+yy1735:
+#line 443 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_HEX_NUMBER); }
+#line 45461 "../../lnav/src/data_scanner_re.cc"
+yy1736:
+ yych = *++YYCURSOR;
+ if (yych <= ':') {
+ if (yych <= '.') goto yy1682;
+ if (yych <= '/') goto yy1873;
+ if (yych <= '9') goto yy1874;
+ goto yy1875;
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy1682;
+ goto yy1876;
+ } else {
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy1876;
+ goto yy1682;
+ }
+ }
+yy1737:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '.') {
+ if (yych <= ',') goto yy1682;
+ goto yy1802;
+ } else {
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy1877;
+ goto yy1682;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy1877;
+ if (yych <= '^') goto yy1682;
+ goto yy1864;
+ } else {
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'z') goto yy1877;
+ goto yy1682;
+ }
+ }
+yy1738:
+ yyaccept = 12;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1743;
+ if (yych <= '*') goto yy1735;
+ goto yy1743;
+ } else {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy1735;
+ goto yy1866;
+ } else {
+ if (yych <= '/') goto yy1743;
+ if (yych <= '9') goto yy1872;
+ goto yy1878;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') {
+ if (yych <= '?') goto yy1735;
+ goto yy1743;
+ } else {
+ if (yych <= 'F') goto yy1872;
+ if (yych <= 'Z') goto yy1743;
+ goto yy1735;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych <= '_') goto yy1743;
+ goto yy1735;
+ } else {
+ if (yych <= 'f') goto yy1872;
+ if (yych <= 'z') goto yy1743;
+ goto yy1735;
+ }
+ }
+ }
+yy1739:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1743;
+ if (yych <= '*') goto yy1635;
+ goto yy1743;
+ } else {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy1635;
+ goto yy1866;
+ } else {
+ if (yych <= '/') goto yy1743;
+ if (yych <= '9') goto yy1872;
+ goto yy1878;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') {
+ if (yych <= '?') goto yy1635;
+ goto yy1743;
+ } else {
+ if (yych <= 'F') goto yy1872;
+ if (yych <= 'Z') goto yy1743;
+ goto yy1635;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych <= '_') goto yy1743;
+ goto yy1635;
+ } else {
+ if (yych <= 'f') goto yy1872;
+ if (yych <= 'z') goto yy1743;
+ goto yy1635;
+ }
+ }
+ }
+yy1740:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'a') {
+ if (yych == 'B') goto yy1744;
+ goto yy1743;
+ } else {
+ if (yych <= 'b') goto yy1744;
+ if (yych == 'i') goto yy1880;
+ goto yy1743;
+ }
+yy1741:
+#line 465 "../../lnav/src/data_scanner_re.re"
{
- if ((YYCURSOR.val - (this->ds_input.udata() + this->ds_next_offset)) == 17) {
- RET(DT_MAC_ADDRESS);
- } else {
- RET(DT_HEX_DUMP);
- }
+ RET(DT_ID);
}
-#line 11802 "../../lnav/src/data_scanner_re.cc"
-yy355:
- yyaccept = 6;
+#line 45595 "../../lnav/src/data_scanner_re.cc"
+yy1742:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
+yy1743:
+ if (yych <= '9') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1697;
+ if (yych <= '*') goto yy1741;
+ goto yy1697;
+ } else {
+ if (yych <= ',') goto yy1741;
+ if (yych <= '.') goto yy1729;
+ if (yych <= '/') goto yy1731;
+ goto yy1742;
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= ':') goto yy1879;
+ if (yych <= '?') goto yy1741;
+ if (yych <= '@') goto yy1737;
+ goto yy1742;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy1741;
+ goto yy1745;
+ } else {
+ if (yych <= '`') goto yy1741;
+ if (yych <= 'z') goto yy1742;
+ goto yy1741;
+ }
+ }
}
- if (yych <= '/') {
- if (yych <= 0x1F) {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy26;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy26;
- goto yy4;
+yy1744:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= '*') {
+ if (yych == '%') goto yy1743;
+ goto yy1635;
+ } else {
+ if (yych == ',') goto yy1635;
+ goto yy1743;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '?') goto yy1635;
+ if (yych <= 'Z') goto yy1743;
+ goto yy1635;
+ } else {
+ if (yych == '`') goto yy1635;
+ if (yych <= 'z') goto yy1743;
+ goto yy1635;
+ }
+ }
+yy1745:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+yy1746:
+ if (yych <= '9') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1697;
+ if (yych <= '*') goto yy1741;
+ goto yy1697;
+ } else {
+ if (yych <= ',') goto yy1741;
+ if (yych <= '.') goto yy1729;
+ if (yych <= '/') goto yy1731;
+ goto yy1745;
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= ':') goto yy1881;
+ if (yych <= '?') goto yy1741;
+ if (yych <= '@') goto yy1737;
+ goto yy1745;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy1741;
+ goto yy1745;
+ } else {
+ if (yych <= '`') goto yy1741;
+ if (yych <= 'z') goto yy1745;
+ goto yy1741;
+ }
+ }
+ }
+yy1747:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'S') {
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy1635;
+ goto yy1743;
} else {
- if (yych <= '\r') goto yy26;
- if (yych == 0x1B) goto yy26;
- goto yy4;
+ if (yych == '+') goto yy1743;
+ goto yy1635;
}
} else {
- if (yych <= '*') {
- if (yych <= '#') goto yy26;
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy105;
- goto yy26;
+ if (yych <= 'A') {
+ if (yych <= ':') goto yy1743;
+ if (yych <= '?') goto yy1635;
+ goto yy1743;
} else {
- if (yych <= ',') {
- if (yych <= '+') goto yy80;
- goto yy26;
- } else {
- if (yych <= '-') goto yy255;
- if (yych <= '.') goto yy256;
- goto yy4;
- }
+ if (yych <= 'B') goto yy1744;
+ if (yych <= 'R') goto yy1743;
+ goto yy1744;
}
}
} else {
- if (yych <= '_') {
+ if (yych <= 'b') {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy1743;
+ if (yych <= '^') goto yy1635;
+ goto yy1743;
+ } else {
+ if (yych <= '`') goto yy1635;
+ if (yych <= 'a') goto yy1743;
+ goto yy1744;
+ }
+ } else {
+ if (yych <= 'r') {
+ if (yych == 'i') goto yy1882;
+ goto yy1743;
+ } else {
+ if (yych <= 's') goto yy1744;
+ if (yych <= 'z') goto yy1743;
+ goto yy1635;
+ }
+ }
+ }
+yy1748:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == 'S') goto yy1744;
+ if (yych == 's') goto yy1744;
+ goto yy1743;
+yy1749:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= '*') {
+ if (yych == '%') goto yy1884;
+ goto yy1741;
+ } else {
+ if (yych == ',') goto yy1741;
+ goto yy1884;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '?') goto yy1741;
+ if (yych <= 'Z') goto yy1884;
+ goto yy1741;
+ } else {
+ if (yych == '`') goto yy1741;
+ if (yych <= 'z') goto yy1884;
+ goto yy1741;
+ }
+ }
+yy1750:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ switch (yych) {
+ case '%': goto yy1727;
+ case '+': goto yy1697;
+ case '-': goto yy1866;
+ case '.': goto yy1885;
+ case '/': goto yy1868;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy1886;
+ case ':': goto yy1871;
+ case '@': goto yy1737;
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f': goto yy1872;
+ case 'B':
+ case 'b': goto yy1887;
+ case 'E':
+ case 'e': goto yy1888;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy1740;
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy1742;
+ case 'S':
+ case 's': goto yy1744;
+ case '_': goto yy1745;
+ case 'm': goto yy1747;
+ case 'p':
+ case 'u': goto yy1748;
+ default: goto yy1635;
+ }
+yy1751:
+ yyaccept = 12;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1743;
+ if (yych <= '*') goto yy1735;
+ goto yy1889;
+ } else {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy1735;
+ goto yy1890;
+ } else {
+ if (yych <= '/') goto yy1743;
+ if (yych <= '9') goto yy1872;
+ goto yy1878;
+ }
+ }
+ } else {
+ if (yych <= '^') {
if (yych <= '@') {
- if (yych <= '9') goto yy359;
- if (yych <= ':') goto yy4;
- if (yych <= '?') goto yy26;
- goto yy96;
+ if (yych <= '?') goto yy1735;
+ goto yy1743;
} else {
- if (yych <= 'E') {
- if (yych <= 'D') goto yy258;
- } else {
- if (yych <= 'Z') goto yy258;
- if (yych <= '^') goto yy26;
- goto yy258;
+ if (yych <= 'F') goto yy1872;
+ if (yych <= 'Z') goto yy1743;
+ goto yy1735;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych <= '_') goto yy1743;
+ goto yy1735;
+ } else {
+ if (yych <= 'f') goto yy1872;
+ if (yych <= 'z') goto yy1743;
+ goto yy1735;
+ }
+ }
+ }
+yy1752:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ switch (yych) {
+ case '%': goto yy1727;
+ case '+': goto yy1697;
+ case '-': goto yy1866;
+ case '.': goto yy1885;
+ case '/': goto yy1868;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5': goto yy1886;
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy1891;
+ case ':': goto yy1871;
+ case '@': goto yy1737;
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f': goto yy1872;
+ case 'B':
+ case 'b': goto yy1887;
+ case 'E':
+ case 'e': goto yy1888;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy1740;
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy1742;
+ case 'S':
+ case 's': goto yy1744;
+ case '_': goto yy1745;
+ case 'm': goto yy1747;
+ case 'p':
+ case 'u': goto yy1748;
+ default: goto yy1635;
+ }
+yy1753:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ switch (yych) {
+ case '%': goto yy1727;
+ case '+': goto yy1697;
+ case '-': goto yy1866;
+ case '.': goto yy1885;
+ case '/': goto yy1868;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy1891;
+ case ':': goto yy1871;
+ case '@': goto yy1737;
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f': goto yy1872;
+ case 'B':
+ case 'b': goto yy1887;
+ case 'E':
+ case 'e': goto yy1888;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy1740;
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy1742;
+ case 'S':
+ case 's': goto yy1744;
+ case '_': goto yy1745;
+ case 'm': goto yy1747;
+ case 'p':
+ case 'u': goto yy1748;
+ default: goto yy1635;
+ }
+yy1754:
+ yych = *++YYCURSOR;
+ if (yych <= '`') {
+ if (yych <= '9') {
+ if (yych <= '0') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
+ goto yy1894;
+ } else {
+ if (yych <= '1') goto yy1895;
+ if (yych <= '2') goto yy1896;
+ goto yy1894;
}
} else {
+ if (yych <= 'E') {
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1897;
+ }
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy1898;
+ } else {
+ if (yych <= 'F') goto yy1899;
+ if (yych <= 'Z') goto yy1682;
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
if (yych <= 'z') {
- if (yych <= '`') goto yy26;
- if (yych != 'e') goto yy258;
+ if (yych <= 'e') goto yy1898;
+ if (yych <= 'f') goto yy1899;
+ goto yy1682;
} else {
if (yych <= 0x7F) {
- if (yych <= '~') goto yy26;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy26;
- if (yych <= 0xF4) goto yy4;
- goto yy26;
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= 0xC1) goto yy1682;
+ yyt2 = YYCURSOR;
+ goto yy1900;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy1902;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1903;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
}
+ goto yy1682;
}
}
}
-yy356:
- yyaccept = 0;
+yy1755:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy1682;
+ goto yy1906;
+ } else {
+ if (yych <= '/') goto yy1682;
+ if (yych <= ':') goto yy1907;
+ goto yy1682;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy1907;
+ if (yych <= '^') goto yy1682;
+ goto yy1907;
+ } else {
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'z') goto yy1907;
+ goto yy1682;
+ }
+ }
+yy1756:
+ yych = *++YYCURSOR;
+ if (yybm_init[768+yych] & 1) {
+ goto yy1910;
+ }
+ goto yy1909;
+yy1757:
+ yych = *++YYCURSOR;
+ if (yych <= '\r') {
+ if (yych == '\t') goto yy1682;
+ if (yych <= '\f') goto yy1915;
+ goto yy1682;
+ } else {
+ if (yych <= ' ') {
+ if (yych <= 0x1F) goto yy1915;
+ goto yy1682;
+ } else {
+ if (yych == '>') goto yy1682;
+ goto yy1915;
+ }
+ }
+yy1758:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy1682;
+ goto yy1916;
+ } else {
+ if (yych <= '/') goto yy1682;
+ if (yych <= ':') goto yy1916;
+ goto yy1682;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy1916;
+ if (yych <= '^') goto yy1682;
+ goto yy1916;
+ } else {
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'z') goto yy1916;
+ goto yy1682;
+ }
+ }
+yy1759:
+ yych = *++YYCURSOR;
+ if (yych == ' ') goto yy1917;
+ goto yy1682;
+yy1760:
+ yyaccept = 14;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[512+yych] & 128) {
- goto yy258;
+yy1761:
+ if (yybm_init[1024+yych] & 2) {
+ goto yy1760;
}
- if (yych <= ',') {
- if (yych <= '%') {
- if (yych <= '$') goto yy4;
- goto yy80;
+ if (yych <= '&') {
+ if (yych <= '\r') {
+ if (yych <= 0x08) {
+ yyt3 = YYCURSOR;
+ goto yy1762;
+ }
+ if (yych <= '\n') {
+ yyt3 = YYCURSOR;
+ goto yy1918;
+ }
+ if (yych >= '\r') {
+ yyt3 = YYCURSOR;
+ goto yy1918;
+ }
+ yyt3 = YYCURSOR;
} else {
- if (yych == '+') goto yy194;
- goto yy4;
+ if (yych <= ' ') {
+ if (yych >= ' ') {
+ yyt3 = YYCURSOR;
+ goto yy1918;
+ }
+ yyt3 = YYCURSOR;
+ } else {
+ if (yych <= '!') {
+ yyt3 = YYCURSOR;
+ goto yy1919;
+ }
+ if (yych <= '"') {
+ yyt3 = YYCURSOR;
+ goto yy1918;
+ }
+ yyt3 = YYCURSOR;
+ }
}
} else {
if (yych <= '.') {
- if (yych <= '-') goto yy255;
- goto yy350;
+ if (yych <= '+') {
+ if (yych <= '*') {
+ yyt3 = YYCURSOR;
+ goto yy1918;
+ }
+ yyt3 = YYCURSOR;
+ } else {
+ if (yych <= ',') {
+ yyt3 = YYCURSOR;
+ goto yy1919;
+ }
+ if (yych >= '.') {
+ yyt3 = YYCURSOR;
+ goto yy1920;
+ }
+ yyt3 = YYCURSOR;
+ }
} else {
- if (yych == '@') goto yy96;
- goto yy4;
+ if (yych <= ';') {
+ if (yych >= ':') {
+ yyt3 = YYCURSOR;
+ goto yy1918;
+ }
+ yyt3 = YYCURSOR;
+ } else {
+ if (yych == '?') {
+ yyt3 = YYCURSOR;
+ goto yy1919;
+ }
+ yyt3 = YYCURSOR;
+ }
}
}
-yy357:
- yyaccept = 6;
+yy1762:
+ YYCURSOR = yyt3;
+#line 449 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_WORD); }
+#line 46253 "../../lnav/src/data_scanner_re.cc"
+yy1763:
+ yych = *++YYCURSOR;
+ if (yych <= '/') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1697;
+ if (yych <= '*') goto yy1682;
+ goto yy1697;
+ } else {
+ if (yych <= ',') goto yy1682;
+ if (yych <= '-') goto yy1921;
+ if (yych <= '.') goto yy1697;
+ goto yy1682;
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '9') goto yy1922;
+ if (yych <= '?') goto yy1682;
+ if (yych <= '@') goto yy1699;
+ goto yy1922;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy1682;
+ goto yy1922;
+ } else {
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'z') goto yy1922;
+ goto yy1682;
+ }
+ }
+ }
+yy1764:
+ yyaccept = 7;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
+ if (yych <= ':') {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy1773;
+ goto yy1866;
+ } else {
+ if (yych <= '/') goto yy1773;
+ if (yych <= '9') goto yy1923;
+ goto yy1924;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy1773;
+ goto yy1923;
+ } else {
+ if (yych <= '`') goto yy1773;
+ if (yych <= 'f') goto yy1923;
+ goto yy1773;
+ }
}
- if (yych <= '5') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy26;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy26;
- goto yy4;
+yy1765:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') {
+ if (yych <= '.') goto yy1682;
+ goto yy1873;
+ } else {
+ if (yych <= '9') goto yy1876;
+ if (yych <= ':') goto yy1925;
+ goto yy1682;
+ }
+ } else {
+ if (yych <= '\\') {
+ if (yych <= 'F') goto yy1876;
+ if (yych <= '[') goto yy1682;
+ goto yy1720;
+ } else {
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy1876;
+ goto yy1682;
+ }
+ }
+yy1766:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') {
+ if (yych == '-') goto yy1866;
+ goto yy1660;
+ } else {
+ if (yych <= '9') goto yy1923;
+ if (yych <= ':') goto yy1924;
+ goto yy1660;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych <= 'F') goto yy1926;
+ if (yych <= 'Z') goto yy1927;
+ goto yy1660;
+ } else {
+ if (yych <= 'f') goto yy1926;
+ if (yych <= 'z') goto yy1927;
+ goto yy1660;
+ }
+ }
+yy1767:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') goto yy1773;
+ if (yych <= 'Z') goto yy1927;
+ if (yych <= '`') goto yy1773;
+ if (yych <= 'z') goto yy1927;
+ goto yy1773;
+yy1768:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy1761;
+ goto yy1697;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') goto yy26;
- goto yy4;
- } else {
- if (yych <= 0x1B) goto yy26;
- if (yych <= 0x1F) goto yy4;
- goto yy26;
+ if (yych == '+') goto yy1697;
+ goto yy1761;
+ }
+ } else {
+ if (yych <= '.') {
+ if (yych <= '-') goto yy1866;
+ yyt3 = YYCURSOR;
+ goto yy1928;
+ } else {
+ if (yych <= '/') goto yy1731;
+ if (yych <= '9') goto yy1923;
+ yyt3 = YYCURSOR;
+ goto yy1929;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') {
+ if (yych <= '?') goto yy1761;
+ goto yy1737;
+ } else {
+ if (yych <= 'F') goto yy1926;
+ if (yych <= 'Z') goto yy1927;
+ goto yy1761;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych <= '_') goto yy1659;
+ goto yy1761;
+ } else {
+ if (yych <= 'f') goto yy1930;
+ if (yych <= 'z') goto yy1931;
+ goto yy1761;
+ }
+ }
+ }
+yy1769:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '9') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1697;
+ if (yych <= '*') goto yy1761;
+ goto yy1697;
+ } else {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy1761;
+ goto yy1729;
+ } else {
+ if (yych <= '.') {
+ yyt3 = YYCURSOR;
+ goto yy1928;
}
+ if (yych <= '/') goto yy1731;
+ goto yy1772;
+ }
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= ':') {
+ yyt3 = YYCURSOR;
+ goto yy1932;
}
+ if (yych <= '?') goto yy1761;
+ if (yych <= '@') goto yy1737;
+ goto yy1927;
} else {
- if (yych <= '+') {
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy105;
- if (yych <= '*') goto yy26;
- goto yy80;
+ if (yych <= '_') {
+ if (yych <= '^') goto yy1761;
+ goto yy1659;
} else {
- if (yych <= '-') {
- if (yych <= ',') goto yy26;
- goto yy255;
- } else {
- if (yych <= '.') goto yy256;
- if (yych <= '/') goto yy4;
- goto yy355;
+ if (yych <= '`') goto yy1761;
+ if (yych <= 'z') goto yy1931;
+ goto yy1761;
+ }
+ }
+ }
+yy1770:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'F') {
+ if (yych <= '/') {
+ if (yych == '-') goto yy1866;
+ goto yy1660;
+ } else {
+ if (yych <= '9') goto yy1923;
+ if (yych <= ':') goto yy1924;
+ if (yych <= '@') goto yy1660;
+ goto yy1926;
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych == 'L') goto yy1933;
+ goto yy1927;
+ } else {
+ if (yych <= '`') goto yy1660;
+ if (yych <= 'f') goto yy1926;
+ if (yych <= 'z') goto yy1927;
+ goto yy1660;
+ }
+ }
+yy1771:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '?') {
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy1761;
+ goto yy1697;
+ } else {
+ if (yych == '+') goto yy1697;
+ goto yy1761;
+ }
+ } else {
+ if (yych <= '/') {
+ if (yych <= '-') goto yy1866;
+ if (yych <= '.') {
+ yyt3 = YYCURSOR;
+ goto yy1928;
+ }
+ goto yy1731;
+ } else {
+ if (yych <= '9') goto yy1923;
+ if (yych <= ':') {
+ yyt3 = YYCURSOR;
+ goto yy1929;
}
+ goto yy1761;
+ }
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy1737;
+ goto yy1926;
+ } else {
+ if (yych <= 'Z') goto yy1927;
+ if (yych <= '^') goto yy1761;
+ goto yy1659;
+ }
+ } else {
+ if (yych <= 'k') {
+ if (yych <= '`') goto yy1761;
+ if (yych <= 'f') goto yy1930;
+ goto yy1931;
+ } else {
+ if (yych <= 'l') goto yy1934;
+ if (yych <= 'z') goto yy1931;
+ goto yy1761;
+ }
+ }
+ }
+yy1772:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+yy1773:
+ if (yych <= '9') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1697;
+ if (yych <= '*') goto yy1650;
+ goto yy1697;
+ } else {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy1650;
+ goto yy1729;
+ } else {
+ if (yych <= '.') goto yy1763;
+ if (yych <= '/') goto yy1731;
+ goto yy1772;
+ }
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= ':') goto yy1790;
+ if (yych <= '?') goto yy1650;
+ if (yych <= '@') goto yy1737;
+ goto yy1772;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy1650;
+ goto yy1659;
+ } else {
+ if (yych <= '`') goto yy1650;
+ if (yych <= 'z') goto yy1772;
+ goto yy1650;
+ }
+ }
+ }
+yy1774:
+ yych = *++YYCURSOR;
+ if (yych <= '9') {
+ if (yych == '/') goto yy1873;
+ goto yy1682;
+ } else {
+ if (yych <= ':') goto yy1935;
+ if (yych == '\\') goto yy1720;
+ goto yy1682;
+ }
+yy1775:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'L') {
+ if (yych <= '@') goto yy1773;
+ if (yych <= 'K') goto yy1927;
+ goto yy1936;
+ } else {
+ if (yych <= 'Z') goto yy1927;
+ if (yych <= '`') goto yy1773;
+ if (yych <= 'z') goto yy1927;
+ goto yy1773;
+ }
+yy1776:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy1761;
+ goto yy1697;
+ } else {
+ if (yych == '+') goto yy1697;
+ goto yy1761;
+ }
+ } else {
+ if (yych <= '.') {
+ if (yych <= '-') goto yy1729;
+ yyt3 = YYCURSOR;
+ goto yy1928;
+ } else {
+ if (yych <= '/') goto yy1731;
+ if (yych <= '9') goto yy1772;
+ yyt3 = YYCURSOR;
+ goto yy1932;
}
}
} else {
if (yych <= '_') {
if (yych <= '@') {
- if (yych <= '9') goto yy359;
- if (yych <= ':') goto yy4;
- if (yych <= '?') goto yy26;
- goto yy96;
+ if (yych <= '?') goto yy1761;
+ goto yy1737;
} else {
- if (yych <= 'E') {
- if (yych <= 'D') goto yy258;
- goto yy356;
- } else {
- if (yych <= 'Z') goto yy258;
- if (yych <= '^') goto yy26;
- goto yy258;
- }
+ if (yych <= 'Z') goto yy1927;
+ if (yych <= '^') goto yy1761;
+ goto yy1659;
}
} else {
- if (yych <= 'z') {
- if (yych <= '`') goto yy26;
- if (yych == 'e') goto yy356;
- goto yy258;
+ if (yych <= 'm') {
+ if (yych <= '`') goto yy1761;
+ goto yy1931;
} else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy26;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy26;
- if (yych <= 0xF4) goto yy4;
- goto yy26;
- }
+ if (yych <= 'n') goto yy1937;
+ if (yych <= 'z') goto yy1931;
+ goto yy1761;
}
}
}
-yy358:
- yyaccept = 0;
+yy1777:
+ yyaccept = 7;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '@') goto yy4;
- if (yych <= 'Z') goto yy453;
- if (yych <= '`') goto yy4;
- if (yych <= 'z') goto yy453;
- goto yy4;
-yy359:
- yyaccept = 6;
+ if (yych <= 'U') {
+ if (yych <= '@') goto yy1773;
+ if (yych <= 'T') goto yy1927;
+ goto yy1938;
+ } else {
+ if (yych <= 'Z') goto yy1927;
+ if (yych <= '`') goto yy1773;
+ if (yych <= 'z') goto yy1927;
+ goto yy1773;
+ }
+yy1778:
+ yyaccept = 14;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
+ if (yych <= ':') {
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy1761;
+ goto yy1697;
+ } else {
+ if (yych == '+') goto yy1697;
+ goto yy1761;
+ }
+ } else {
+ if (yych <= '.') {
+ if (yych <= '-') goto yy1729;
+ yyt3 = YYCURSOR;
+ goto yy1928;
+ } else {
+ if (yych <= '/') goto yy1731;
+ if (yych <= '9') goto yy1772;
+ yyt3 = YYCURSOR;
+ goto yy1932;
+ }
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= '@') {
+ if (yych <= '?') goto yy1761;
+ goto yy1737;
+ } else {
+ if (yych <= 'Z') goto yy1927;
+ if (yych <= '^') goto yy1761;
+ goto yy1659;
+ }
+ } else {
+ if (yych <= 't') {
+ if (yych <= '`') goto yy1761;
+ goto yy1931;
+ } else {
+ if (yych <= 'u') goto yy1937;
+ if (yych <= 'z') goto yy1931;
+ goto yy1761;
+ }
+ }
}
- if (yych <= '?') {
- if (yych <= '$') {
- if (yych <= '\r') {
- if (yych <= 0x08) {
- if (yych <= 0x00) goto yy26;
- goto yy3;
- } else {
- if (yych <= '\n') goto yy26;
- if (yych <= '\f') goto yy3;
- goto yy26;
+yy1779:
+ ++YYCURSOR;
+#line 475 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_ESCAPED_CHAR); }
+#line 46686 "../../lnav/src/data_scanner_re.cc"
+yy1780:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy1779;
+ goto yy1682;
+yy1781:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy1682;
+ if (yych <= 0xBF) goto yy1780;
+ goto yy1682;
+yy1782:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy1780;
+ goto yy1682;
+yy1783:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy1682;
+ if (yych <= 0xBF) goto yy1782;
+ goto yy1682;
+yy1784:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy1782;
+ goto yy1682;
+yy1785:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0x8F) goto yy1782;
+ goto yy1682;
+yy1786:
+ yych = *++YYCURSOR;
+ if (yych == ':') goto yy1935;
+ goto yy1682;
+yy1787:
+ yych = *++YYCURSOR;
+ if (yych <= ':') {
+ if (yych <= '.') goto yy1682;
+ if (yych <= '/') goto yy1873;
+ if (yych <= '9') goto yy1876;
+ goto yy1925;
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy1682;
+ goto yy1876;
+ } else {
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy1876;
+ goto yy1682;
+ }
+ }
+yy1788:
+ yych = *++YYCURSOR;
+ if (yych == '"') goto yy1687;
+ goto yy1686;
+yy1789:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[768+yych] & 4) {
+ goto yy1943;
+ }
+ if (yych <= '"') {
+ if (yych <= 0x15) {
+ if (yych <= '\t') {
+ if (yych <= 0x00) {
+ yyt3 = YYCURSOR;
+ goto yy1762;
}
+ if (yych <= 0x08) goto yy1701;
+ yyt3 = YYCURSOR;
+ goto yy1939;
} else {
- if (yych <= 0x1B) {
- if (yych <= 0x1A) goto yy3;
- goto yy26;
- } else {
- if (yych <= 0x1F) goto yy3;
- if (yych <= '#') goto yy26;
- goto yy3;
+ if (yych <= '\n') {
+ yyt3 = YYCURSOR;
+ goto yy1918;
+ }
+ if (yych == '\r') {
+ yyt3 = YYCURSOR;
+ goto yy1939;
}
+ goto yy1701;
}
} else {
- if (yych <= '-') {
- if (yych <= '*') {
- if (yych <= '%') goto yy105;
- goto yy26;
- } else {
- if (yych <= '+') goto yy80;
- if (yych <= ',') goto yy26;
- goto yy255;
+ if (yych <= 0x1B) {
+ if (yych <= 0x16) {
+ yyt3 = YYCURSOR;
+ goto yy1762;
}
+ if (yych <= 0x1A) goto yy1701;
+ yyt3 = YYCURSOR;
+ goto yy1762;
} else {
- if (yych <= '/') {
- if (yych <= '.') goto yy350;
- goto yy3;
- } else {
- if (yych <= '9') goto yy359;
- if (yych <= ':') goto yy62;
- goto yy26;
+ if (yych <= 0x1F) goto yy1701;
+ if (yych == '!') {
+ yyt3 = YYCURSOR;
+ goto yy1940;
}
+ yyt3 = YYCURSOR;
+ goto yy1939;
}
}
} else {
- if (yych <= 'z') {
- if (yych <= '^') {
- if (yych <= 'D') {
- if (yych <= '@') goto yy96;
- goto yy258;
- } else {
- if (yych <= 'E') goto yy356;
- if (yych <= 'Z') goto yy258;
- goto yy26;
- }
+ if (yych <= '.') {
+ if (yych <= '*') {
+ if (yych <= '&') goto yy1701;
+ if (yych <= '\'') goto yy1941;
+ yyt3 = YYCURSOR;
+ goto yy1939;
} else {
- if (yych <= '`') {
- if (yych <= '_') goto yy258;
- goto yy26;
- } else {
- if (yych == 'e') goto yy356;
- goto yy258;
+ if (yych == ',') {
+ yyt3 = YYCURSOR;
+ goto yy1940;
}
+ if (yych <= '-') goto yy1701;
+ yyt3 = YYCURSOR;
+ goto yy1942;
}
} else {
- if (yych <= 0xE0) {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy26;
- goto yy3;
- } else {
- if (yych <= 0xC1) goto yy26;
- if (yych <= 0xDF) goto yy56;
- goto yy57;
+ if (yych <= '?') {
+ if (yych <= '9') goto yy1701;
+ if (yych <= ';') {
+ yyt3 = YYCURSOR;
+ goto yy1939;
}
+ if (yych <= '>') goto yy1701;
+ yyt3 = YYCURSOR;
+ goto yy1940;
} else {
- if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy58;
- goto yy59;
- } else {
- if (yych <= 0xF3) goto yy60;
- if (yych <= 0xF4) goto yy61;
- goto yy26;
+ if (yych <= 0x7F) goto yy1701;
+ if (yych <= 0xC1) {
+ yyt3 = YYCURSOR;
+ goto yy1762;
}
+ if (yych <= 0xF4) goto yy1701;
+ yyt3 = YYCURSOR;
+ goto yy1762;
}
}
}
-yy360:
+yy1790:
yych = *++YYCURSOR;
- if (yych <= '/') goto yy104;
- if (yych <= '9') goto yy454;
- goto yy104;
-yy361:
- yyaccept = 0;
+ if (yych == '/') goto yy1873;
+ if (yych == ':') goto yy1935;
+ goto yy1682;
+yy1791:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy1761;
+ goto yy1697;
+ } else {
+ if (yych == '+') goto yy1697;
+ goto yy1761;
+ }
+ } else {
+ if (yych <= '.') {
+ if (yych <= '-') goto yy1729;
+ yyt3 = YYCURSOR;
+ goto yy1928;
+ } else {
+ if (yych <= '/') goto yy1731;
+ if (yych <= '9') goto yy1772;
+ yyt3 = YYCURSOR;
+ goto yy1932;
+ }
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= '@') {
+ if (yych <= '?') goto yy1761;
+ goto yy1737;
+ } else {
+ if (yych <= 'Z') goto yy1927;
+ if (yych <= '^') goto yy1761;
+ goto yy1659;
+ }
+ } else {
+ if (yych <= 'k') {
+ if (yych <= '`') goto yy1761;
+ goto yy1931;
+ } else {
+ if (yych <= 'l') goto yy1944;
+ if (yych <= 'z') goto yy1931;
+ goto yy1761;
+ }
+ }
+ }
+yy1792:
+ yyaccept = 14;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '9') {
if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
+ if (yych == '%') goto yy1697;
+ if (yych <= '*') goto yy1761;
+ goto yy1697;
} else {
- if (yych <= ',') goto yy4;
- if (yych <= '.') goto yy46;
- if (yych <= '/') goto yy4;
- goto yy455;
+ if (yych <= '-') {
+ if (yych <= ',') goto yy1761;
+ goto yy1945;
+ } else {
+ if (yych <= '.') {
+ yyt3 = YYCURSOR;
+ goto yy1928;
+ }
+ if (yych <= '/') goto yy1731;
+ goto yy1772;
+ }
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= ':') {
+ yyt3 = YYCURSOR;
+ goto yy1932;
+ }
+ if (yych <= '?') goto yy1761;
+ if (yych <= '@') goto yy1737;
+ goto yy1927;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy1761;
+ goto yy1659;
+ } else {
+ if (yych <= '`') goto yy1761;
+ if (yych <= 'z') goto yy1931;
+ goto yy1761;
+ }
+ }
+ }
+yy1793:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy1613;
+ goto yy1682;
+yy1794:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy1793;
+ goto yy1682;
+yy1795:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy1946;
+ goto yy1682;
+yy1796:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy1947;
+ goto yy1682;
+yy1797:
+ ++YYCURSOR;
+#line 366 "../../lnav/src/data_scanner_re.re"
+ {
+ RET(DT_CSI);
+ }
+#line 46943 "../../lnav/src/data_scanner_re.cc"
+yy1798:
+ yyaccept = 15;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '"') goto yy1685;
+ goto yy1688;
+yy1799:
+ yyaccept = 16;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 0x16) {
+ if (yych <= '\t') {
+ if (yych >= 0x01) goto yy1686;
+ } else {
+ if (yych <= '\n') goto yy1800;
+ if (yych <= 0x15) goto yy1686;
+ }
+ } else {
+ if (yych <= 0x7F) {
+ if (yych != 0x1B) goto yy1686;
+ } else {
+ if (yych <= 0xC1) goto yy1800;
+ if (yych <= 0xF4) goto yy1686;
+ }
+ }
+yy1800:
+#line 191 "../../lnav/src/data_scanner_re.re"
+ {
+ CAPTURE(DT_QUOTED_STRING);
+ switch (this->ds_input[cap_inner.c_begin]) {
+ case 'f':
+ case 'u':
+ case 'r':
+ cap_inner.c_begin += 1;
+ break;
+ }
+ cap_inner.c_begin += 3;
+ goto yyc_dbldocstring;
+ }
+#line 46981 "../../lnav/src/data_scanner_re.cc"
+yy1801:
+ yych = *++YYCURSOR;
+ if (yybm_init[1024+yych] & 4) {
+ goto yy1801;
+ }
+ if (yych <= 0xE0) {
+ if (yych <= ']') {
+ if (yych <= 0x00) goto yy1682;
+ goto yy1948;
+ } else {
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy1949;
+ goto yy1950;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy1951;
+ goto yy1952;
+ } else {
+ if (yych <= 0xF3) goto yy1953;
+ if (yych <= 0xF4) goto yy1954;
+ goto yy1682;
+ }
+ }
+yy1802:
+ yych = *++YYCURSOR;
+yy1803:
+ if (yybm_init[1024+yych] & 8) {
+ goto yy1802;
+ }
+ if (yych <= ',') goto yy1682;
+ if (yych <= '.') goto yy1955;
+ goto yy1682;
+yy1804:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) {
+ if (yych <= 'R') {
+ if (yych == '\'') {
+ yyt1 = YYCURSOR;
+ goto yy1956;
+ }
+ yyt2 = YYCURSOR;
+ } else {
+ if (yych <= 'S') goto yy1682;
+ if (yych == 's') goto yy1682;
+ yyt2 = YYCURSOR;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy1809;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1810;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1811;
+ } else {
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy1812;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1813;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1814;
+ }
+ goto yy1682;
+ }
+ }
+yy1805:
+ ++YYCURSOR;
+ yyt1 = yyt2;
+yy1806:
+ YYCURSOR = yyt1;
+#line 271 "../../lnav/src/data_scanner_re.re"
+ {
+ CAPTURE(DT_QUOTED_STRING);
+ if (tf == text_format_t::TF_RUST) {
+ auto sf = this->to_string_fragment(cap_all);
+ auto split_res = sf.split_when([](char ch) { return ch != '\'' && !isalnum(ch); });
+ cap_all.c_end = split_res.first.sf_end - this->ds_input.sf_begin;
+ cap_inner.c_end = split_res.first.sf_end - this->ds_input.sf_begin;
+ this->ds_next_offset = cap_all.c_end;
+ return tokenize_result{DT_SYMBOL, cap_all, cap_inner, this->ds_input.data()};
+ }
+ switch (this->ds_input[cap_inner.c_begin]) {
+ case 'f':
+ case 'u':
+ case 'r':
+ cap_inner.c_begin += 1;
+ break;
+ }
+ cap_inner.c_begin += 1;
+ cap_inner.c_end -= 1;
+ return tokenize_result{token_out, cap_all, cap_inner, this->ds_input.data()};
+ }
+#line 47085 "../../lnav/src/data_scanner_re.cc"
+yy1807:
+ yyaccept = 17;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 0x16) {
+ if (yych <= '\t') {
+ if (yych >= 0x01) goto yy1701;
+ } else {
+ if (yych <= '\n') goto yy1808;
+ if (yych <= 0x15) goto yy1701;
+ }
+ } else {
+ if (yych <= 0x7F) {
+ if (yych != 0x1B) goto yy1701;
+ } else {
+ if (yych <= 0xC1) goto yy1808;
+ if (yych <= 0xF4) goto yy1701;
+ }
+ }
+yy1808:
+#line 214 "../../lnav/src/data_scanner_re.re"
+ {
+ CAPTURE(DT_QUOTED_STRING);
+ switch (this->ds_input[cap_inner.c_begin]) {
+ case 'f':
+ case 'u':
+ case 'r':
+ cap_inner.c_begin += 1;
+ break;
+ }
+ cap_inner.c_begin += 3;
+ goto yyc_sdocstring;
+ }
+#line 47118 "../../lnav/src/data_scanner_re.cc"
+yy1809:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy1805;
+ goto yy1682;
+yy1810:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy1682;
+ if (yych <= 0xBF) goto yy1809;
+ goto yy1682;
+yy1811:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy1809;
+ goto yy1682;
+yy1812:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy1682;
+ if (yych <= 0xBF) goto yy1811;
+ goto yy1682;
+yy1813:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy1811;
+ goto yy1682;
+yy1814:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0x8F) goto yy1811;
+ goto yy1682;
+yy1815:
+ yyaccept = 18;
+ yych = *(YYMARKER = ++YYCURSOR);
+yy1816:
+ if (yych <= '/') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1697;
+ if (yych >= '+') goto yy1697;
+ } else {
+ if (yych <= ',') goto yy1817;
+ if (yych <= '-') goto yy1711;
+ if (yych <= '.') goto yy1697;
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '9') goto yy1815;
+ if (yych <= '?') goto yy1817;
+ if (yych <= '@') goto yy1699;
+ goto yy1815;
+ } else {
+ if (yych <= '_') {
+ if (yych >= '_') goto yy1697;
+ } else {
+ if (yych <= '`') goto yy1817;
+ if (yych <= 'z') goto yy1815;
+ }
+ }
+ }
+yy1817:
+#line 453 "../../lnav/src/data_scanner_re.re"
+ {
+ RET(DT_SYMBOL);
+ }
+#line 47182 "../../lnav/src/data_scanner_re.cc"
+yy1818:
+ ++YYCURSOR;
+yy1819:
+ YYCURSOR -= 1;
+#line 457 "../../lnav/src/data_scanner_re.re"
+ {
+ RET(DT_SYMBOL);
+ }
+#line 47191 "../../lnav/src/data_scanner_re.cc"
+yy1820:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy1698;
+ if (yych <= '9') goto yy1957;
+ goto yy1698;
+yy1821:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+yy1822:
+ if (yybm_init[1024+yych] & 16) {
+ goto yy1821;
+ }
+ switch (yych) {
+ case 0x00:
+ case '\t':
+ case '\n':
+ case '\r':
+ case ' ': goto yy1818;
+ case '%':
+ case '+':
+ case '-':
+ case '_': goto yy1697;
+ case '.': goto yy1958;
+ case '@': goto yy1699;
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy1714;
+ case 'B':
+ case 'S':
+ case 'b':
+ case 's': goto yy1823;
+ case 'E':
+ case 'e': goto yy1824;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy1825;
+ case 'm': goto yy1826;
+ case 'p':
+ case 'u': goto yy1827;
+ default: goto yy1635;
+ }
+yy1823:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '+') {
+ if (yych <= '\r') {
+ if (yych <= 0x08) {
+ if (yych <= 0x00) goto yy1715;
+ goto yy1635;
+ } else {
+ if (yych <= '\n') goto yy1715;
+ if (yych <= '\f') goto yy1635;
+ goto yy1715;
+ }
+ } else {
+ if (yych <= '$') {
+ if (yych == ' ') goto yy1715;
+ goto yy1635;
+ } else {
+ if (yych <= '%') goto yy1715;
+ if (yych <= '*') goto yy1635;
+ goto yy1715;
+ }
+ }
+ } else {
+ if (yych <= '?') {
+ if (yych <= '.') {
+ if (yych <= ',') goto yy1635;
+ goto yy1715;
+ } else {
+ if (yych <= '/') goto yy1635;
+ if (yych <= '9') goto yy1715;
+ goto yy1635;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy1715;
+ if (yych <= '^') goto yy1635;
+ goto yy1715;
+ } else {
+ if (yych <= '`') goto yy1635;
+ if (yych <= 'z') goto yy1715;
+ goto yy1635;
+ }
+ }
+ }
+yy1824:
+ yych = *++YYCURSOR;
+ if (yybm_init[1280+yych] & 32) {
+ goto yy1714;
+ }
+ if (yych <= 0x1F) {
+ if (yych <= '\n') {
+ if (yych <= 0x00) goto yy1818;
+ if (yych <= 0x08) goto yy1698;
+ goto yy1818;
+ } else {
+ if (yych == '\r') goto yy1818;
+ goto yy1698;
+ }
+ } else {
+ if (yych <= '+') {
+ if (yych <= ' ') goto yy1818;
+ if (yych <= '*') goto yy1698;
+ goto yy1889;
+ } else {
+ if (yych == '-') goto yy1889;
+ goto yy1698;
+ }
+ }
+yy1825:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '\r') {
+ if (yych <= 0x08) {
+ if (yych <= 0x00) goto yy1818;
+ goto yy1698;
+ } else {
+ if (yych <= '\n') goto yy1818;
+ if (yych <= '\f') goto yy1698;
+ goto yy1818;
+ }
+ } else {
+ if (yych <= ' ') {
+ if (yych <= 0x1F) goto yy1698;
+ goto yy1818;
+ } else {
+ if (yych <= '/') goto yy1698;
+ if (yych <= '9') goto yy1714;
+ goto yy1698;
+ }
+ }
+ } else {
+ if (yych <= 'a') {
+ if (yych <= 'B') {
+ if (yych <= 'A') goto yy1714;
+ goto yy1823;
+ } else {
+ if (yych <= 'Z') goto yy1714;
+ if (yych <= '`') goto yy1698;
+ goto yy1714;
+ }
+ } else {
+ if (yych <= 'h') {
+ if (yych <= 'b') goto yy1823;
+ goto yy1714;
+ } else {
+ if (yych <= 'i') goto yy1959;
+ if (yych <= 'z') goto yy1714;
+ goto yy1698;
+ }
+ }
+ }
+yy1826:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '?') {
+ if (yych <= '$') {
+ if (yych <= '\f') {
+ if (yych <= 0x00) goto yy1715;
+ if (yych <= 0x08) goto yy1635;
+ if (yych <= '\n') goto yy1715;
+ goto yy1635;
+ } else {
+ if (yych <= '\r') goto yy1715;
+ if (yych == ' ') goto yy1715;
+ goto yy1635;
+ }
+ } else {
+ if (yych <= ',') {
+ if (yych <= '%') goto yy1715;
+ if (yych == '+') goto yy1715;
+ goto yy1635;
+ } else {
+ if (yych == '/') goto yy1635;
+ if (yych <= '9') goto yy1715;
+ goto yy1635;
+ }
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych <= 'S') {
+ if (yych == 'B') goto yy1823;
+ if (yych <= 'R') goto yy1715;
+ goto yy1823;
+ } else {
+ if (yych <= 'Z') goto yy1715;
+ if (yych == '_') goto yy1715;
+ goto yy1635;
+ }
+ } else {
+ if (yych <= 'i') {
+ if (yych == 'b') goto yy1823;
+ if (yych <= 'h') goto yy1715;
+ goto yy1960;
+ } else {
+ if (yych == 's') goto yy1823;
+ if (yych <= 'z') goto yy1715;
+ goto yy1635;
+ }
+ }
+ }
+yy1827:
+ yych = *++YYCURSOR;
+ if (yych <= '9') {
+ if (yych <= '\f') {
+ if (yych <= 0x00) goto yy1818;
+ if (yych <= 0x08) goto yy1698;
+ if (yych <= '\n') goto yy1818;
+ goto yy1698;
+ } else {
+ if (yych <= 0x1F) {
+ if (yych <= '\r') goto yy1818;
+ goto yy1698;
+ } else {
+ if (yych <= ' ') goto yy1818;
+ if (yych <= '/') goto yy1698;
+ goto yy1714;
+ }
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '@') goto yy1698;
+ if (yych == 'S') goto yy1823;
+ goto yy1714;
+ } else {
+ if (yych <= 'r') {
+ if (yych <= '`') goto yy1698;
+ goto yy1714;
+ } else {
+ if (yych <= 's') goto yy1823;
+ if (yych <= 'z') goto yy1714;
+ goto yy1698;
+ }
+ }
+ }
+yy1828:
+ ++YYCURSOR;
+yy1829:
+ YYCURSOR = yyt1;
+#line 374 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_EMDASH); }
+#line 47471 "../../lnav/src/data_scanner_re.cc"
+yy1830:
+ yyaccept = 19;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '/') {
+ if (yych <= '*') {
+ if (yych == '%') goto yy1698;
+ goto yy1829;
+ } else {
+ if (yych == ',') goto yy1829;
+ if (yych <= '.') goto yy1698;
+ goto yy1829;
}
} else {
if (yych <= '^') {
- if (yych <= '?') goto yy4;
- if (yych <= '@') goto yy96;
- if (yych <= 'Z') goto yy46;
- goto yy4;
+ if (yych <= '9') goto yy1698;
+ if (yych <= '?') goto yy1829;
+ if (yych <= 'Z') goto yy1698;
+ goto yy1829;
} else {
- if (yych == '`') goto yy4;
- if (yych <= 'z') goto yy46;
- goto yy4;
+ if (yych == '`') goto yy1829;
+ if (yych <= 'z') goto yy1698;
+ goto yy1829;
}
}
-yy362:
- yyaccept = 0;
+yy1831:
+ yyaccept = 19;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy456;
- goto yy4;
-yy363:
+ if (yych <= '/') {
+ if (yych <= '*') {
+ if (yych == '%') goto yy1816;
+ goto yy1829;
+ } else {
+ if (yych == ',') goto yy1829;
+ if (yych <= '.') goto yy1816;
+ goto yy1829;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '9') goto yy1816;
+ if (yych <= '?') goto yy1829;
+ if (yych <= 'Z') goto yy1816;
+ goto yy1829;
+ } else {
+ if (yych == '`') goto yy1829;
+ if (yych <= 'z') goto yy1816;
+ goto yy1829;
+ }
+ }
+yy1832:
+ yyaccept = 19;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '9') {
+ if (yych <= ',') goto yy1829;
+ if (yych == '/') goto yy1829;
+ goto yy1802;
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '@') goto yy1829;
+ goto yy1802;
+ } else {
+ if (yych <= '`') goto yy1829;
+ if (yych <= 'z') goto yy1802;
+ goto yy1829;
+ }
+ }
+yy1833:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy1828;
+ goto yy1682;
+yy1834:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy1682;
+ if (yych <= 0xBF) goto yy1833;
+ goto yy1682;
+yy1835:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy1833;
+ goto yy1682;
+yy1836:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy1682;
+ if (yych <= 0xBF) goto yy1835;
+ goto yy1682;
+yy1837:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy1835;
+ goto yy1682;
+yy1838:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0x8F) goto yy1835;
+ goto yy1682;
+yy1839:
+ yyaccept = 20;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ if (yych == '%') goto yy1859;
+ goto yy1819;
+yy1840:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy1698;
+ if (yych <= '9') goto yy1961;
+ goto yy1698;
+yy1841:
yyaccept = 11;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
+ if (yybm_init[1024+yych] & 32) {
+ goto yy1841;
}
- if (yych <= '9') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy109;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy109;
- goto yy4;
+ if (yych <= '-') {
+ if (yych <= 0x1F) {
+ if (yych <= '\n') {
+ if (yych <= 0x00) goto yy1818;
+ if (yych <= 0x08) goto yy1733;
+ goto yy1818;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') goto yy109;
- goto yy4;
- } else {
- if (yych <= 0x1B) goto yy109;
- if (yych <= 0x1F) goto yy4;
- goto yy109;
- }
+ if (yych == '\r') goto yy1818;
+ goto yy1733;
+ }
+ } else {
+ if (yych <= '%') {
+ if (yych <= ' ') goto yy1839;
+ if (yych <= '$') goto yy1733;
+ goto yy1727;
+ } else {
+ if (yych == '+') goto yy1697;
+ if (yych <= ',') goto yy1733;
+ goto yy1697;
+ }
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '9') {
+ if (yych <= '.') goto yy1962;
+ if (yych <= '/') goto yy1733;
+ } else {
+ if (yych <= '?') goto yy1733;
+ if (yych <= '@') goto yy1699;
+ goto yy1843;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy1714;
+ if (yych <= '^') goto yy1733;
+ goto yy1697;
+ } else {
+ if (yych <= '`') goto yy1733;
+ if (yych <= 'f') goto yy1843;
+ if (yych <= 'z') goto yy1714;
+ goto yy1733;
+ }
+ }
+ }
+yy1842:
+ yyaccept = 12;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '-') {
+ if (yych <= 0x1F) {
+ if (yych <= '\n') {
+ if (yych <= 0x00) goto yy1818;
+ if (yych <= 0x08) goto yy1735;
+ goto yy1818;
+ } else {
+ if (yych == '\r') goto yy1818;
+ goto yy1735;
+ }
+ } else {
+ if (yych <= '%') {
+ if (yych <= ' ') goto yy1839;
+ if (yych <= '$') goto yy1735;
+ goto yy1727;
+ } else {
+ if (yych == '+') goto yy1697;
+ if (yych <= ',') goto yy1735;
+ goto yy1697;
+ }
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '9') {
+ if (yych <= '.') goto yy1962;
+ if (yych <= '/') goto yy1735;
+ goto yy1842;
+ } else {
+ if (yych <= '?') goto yy1735;
+ if (yych <= '@') goto yy1699;
}
} else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy1714;
+ if (yych <= '^') goto yy1735;
+ goto yy1697;
+ } else {
+ if (yych <= '`') goto yy1735;
+ if (yych <= 'f') goto yy1843;
+ if (yych <= 'z') goto yy1714;
+ goto yy1735;
+ }
+ }
+ }
+yy1843:
+ yyaccept = 12;
+ yych = *(YYMARKER = ++YYCURSOR);
+yy1844:
+ if (yybm_init[1024+yych] & 64) {
+ goto yy1843;
+ }
+ if (yych <= '*') {
+ if (yych <= '\r') {
+ if (yych <= 0x08) {
+ if (yych <= 0x00) goto yy1818;
+ goto yy1735;
+ } else {
+ if (yych <= '\n') goto yy1818;
+ if (yych <= '\f') goto yy1735;
+ goto yy1818;
+ }
+ } else {
+ if (yych <= ' ') {
+ if (yych <= 0x1F) goto yy1735;
+ goto yy1818;
+ } else {
+ if (yych == '%') goto yy1697;
+ goto yy1735;
+ }
+ }
+ } else {
+ if (yych <= '@') {
if (yych <= ',') {
- if (yych <= '%') {
- if (yych <= '$') goto yy4;
- goto yy105;
- } else {
- if (yych == '+') goto yy80;
- goto yy109;
- }
+ if (yych <= '+') goto yy1697;
+ goto yy1735;
} else {
- if (yych <= '.') {
- if (yych <= '-') goto yy46;
- goto yy266;
- } else {
- if (yych <= '/') goto yy4;
- if (yych <= '7') goto yy457;
- goto yy458;
- }
+ if (yych <= '.') goto yy1697;
+ if (yych <= '?') goto yy1735;
+ goto yy1699;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy1714;
+ if (yych <= '^') goto yy1735;
+ goto yy1697;
+ } else {
+ if (yych <= '`') goto yy1735;
+ if (yych <= 'z') goto yy1714;
+ goto yy1735;
+ }
+ }
+ }
+yy1845:
+ yych = *++YYCURSOR;
+ if (yybm_init[1024+yych] & 64) {
+ goto yy1843;
+ }
+ if (yych <= 0x1F) {
+ if (yych <= '\n') {
+ if (yych <= 0x00) goto yy1818;
+ if (yych <= 0x08) goto yy1698;
+ goto yy1818;
+ } else {
+ if (yych == '\r') goto yy1818;
+ goto yy1698;
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= ' ') goto yy1818;
+ if (yych <= '@') goto yy1698;
+ goto yy1714;
+ } else {
+ if (yych <= '`') goto yy1698;
+ if (yych <= 'z') goto yy1714;
+ goto yy1698;
+ }
+ }
+yy1846:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+yy1847:
+ switch (yych) {
+ case 0x00:
+ case '\t':
+ case '\n':
+ case '\r': goto yy1818;
+ case ' ': goto yy1839;
+ case '%': goto yy1727;
+ case '+':
+ case '-':
+ case '_': goto yy1697;
+ case '.': goto yy1963;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy1846;
+ case '@': goto yy1699;
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f': goto yy1843;
+ case 'B':
+ case 'b': goto yy1848;
+ case 'E':
+ case 'e': goto yy1849;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy1825;
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy1714;
+ case 'S':
+ case 's': goto yy1823;
+ case 'm': goto yy1826;
+ case 'p':
+ case 'u': goto yy1827;
+ default: goto yy1635;
+ }
+yy1848:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '+') {
+ if (yych <= '\r') {
+ if (yych <= 0x08) {
+ if (yych <= 0x00) goto yy1844;
+ goto yy1635;
+ } else {
+ if (yych <= '\n') goto yy1844;
+ if (yych <= '\f') goto yy1635;
+ goto yy1844;
+ }
+ } else {
+ if (yych <= '$') {
+ if (yych == ' ') goto yy1844;
+ goto yy1635;
+ } else {
+ if (yych <= '%') goto yy1844;
+ if (yych <= '*') goto yy1635;
+ goto yy1844;
+ }
+ }
+ } else {
+ if (yych <= '?') {
+ if (yych <= '.') {
+ if (yych <= ',') goto yy1635;
+ goto yy1844;
+ } else {
+ if (yych <= '/') goto yy1635;
+ if (yych <= '9') goto yy1844;
+ goto yy1635;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy1844;
+ if (yych <= '^') goto yy1635;
+ goto yy1844;
+ } else {
+ if (yych <= '`') goto yy1635;
+ if (yych <= 'z') goto yy1844;
+ goto yy1635;
+ }
+ }
+ }
+yy1849:
+ yyaccept = 12;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '+') goto yy1889;
+ if (yych == '-') goto yy1889;
+ goto yy1844;
+yy1850:
+ yych = *++YYCURSOR;
+ if (yybm_init[1024+yych] & 128) {
+ goto yy1850;
+ }
+ if (yych <= 0xE0) {
+ if (yych <= '*') {
+ if (yych <= 0x00) goto yy1682;
+ goto yy1964;
+ } else {
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy1852;
+ goto yy1853;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy1854;
+ goto yy1855;
+ } else {
+ if (yych <= 0xF3) goto yy1856;
+ if (yych <= 0xF4) goto yy1857;
+ goto yy1682;
+ }
+ }
+yy1851:
+ yyaccept = 9;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[768+yych] & 16) {
+ goto yy1965;
+ }
+ if (yych <= '\\') {
+ if (yych <= ')') {
+ if (yych <= '!') {
+ if (yych <= 0x00) goto yy1633;
+ if (yych <= ' ') goto yy1850;
+ goto yy1723;
+ } else {
+ if (yych <= '"') goto yy1850;
+ if (yych == '\'') goto yy1850;
+ goto yy1723;
+ }
+ } else {
+ if (yych <= '9') {
+ if (yych <= ',') goto yy1850;
+ if (yych == '/') goto yy1966;
+ goto yy1723;
+ } else {
+ if (yych <= '?') goto yy1850;
+ if (yych == '[') goto yy1850;
+ goto yy1723;
}
}
} else {
+ if (yych <= 0x7F) {
+ if (yych <= '`') {
+ if (yych <= ']') goto yy1850;
+ if (yych <= '_') goto yy1723;
+ goto yy1850;
+ } else {
+ if (yych <= 'z') goto yy1723;
+ if (yych == '~') goto yy1723;
+ goto yy1850;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy1633;
+ if (yych <= 0xDF) goto yy1852;
+ if (yych <= 0xE0) goto yy1853;
+ goto yy1854;
+ } else {
+ if (yych <= 0xF0) goto yy1855;
+ if (yych <= 0xF3) goto yy1856;
+ if (yych <= 0xF4) goto yy1857;
+ goto yy1633;
+ }
+ }
+ }
+yy1852:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy1850;
+ goto yy1682;
+yy1853:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy1682;
+ if (yych <= 0xBF) goto yy1852;
+ goto yy1682;
+yy1854:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy1852;
+ goto yy1682;
+yy1855:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy1682;
+ if (yych <= 0xBF) goto yy1854;
+ goto yy1682;
+yy1856:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy1854;
+ goto yy1682;
+yy1857:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0x8F) goto yy1854;
+ goto yy1682;
+yy1858:
+ yych = *++YYCURSOR;
+ if (yych == 'o') goto yy1968;
+ goto yy1722;
+yy1859:
+ ++YYCURSOR;
+ goto yy1728;
+yy1860:
+ yyaccept = 21;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ switch (yych) {
+ case '%': goto yy1727;
+ case '+':
+ case '-':
+ case '/':
+ case ':':
+ case '@':
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy1973;
+ case '.': goto yy1970;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy1971;
+ case 'B':
+ case 'S':
+ case 'b':
+ case 's': goto yy1974;
+ case 'E':
+ case 'e': goto yy1975;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy1976;
+ case 'm': goto yy1977;
+ case 'p':
+ case 'u': goto yy1978;
+ default: goto yy1861;
+ }
+yy1861:
+#line 404 "../../lnav/src/data_scanner_re.re"
+ {
+ CAPTURE(DT_NUMBER);
+ auto sf = this->to_string_fragment(cap_all);
+ if (isalpha(sf.back())) {
+ while (isalpha(sf.back())) {
+ sf.pop_back();
+ }
+ cap_all.c_end = sf.sf_end - this->ds_input.sf_begin;
+ cap_inner.c_end = sf.sf_end - this->ds_input.sf_begin;
+ this->ds_next_offset = cap_all.c_end;
+ this->ds_units = true;
+ }
+ return tokenize_result{DT_NUMBER, cap_all, cap_inner, this->ds_input.data()};
+ }
+#line 48090 "../../lnav/src/data_scanner_re.cc"
+yy1862:
+ yyaccept = 21;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ switch (yych) {
+ case '%': goto yy1727;
+ case '+':
+ case '-':
+ case '/':
+ case ':':
+ case '@':
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy1973;
+ case '.': goto yy1970;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy1860;
+ case 'B':
+ case 'S':
+ case 'b':
+ case 's': goto yy1974;
+ case 'E':
+ case 'e': goto yy1975;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy1976;
+ case 'm': goto yy1977;
+ case 'p':
+ case 'u': goto yy1978;
+ default: goto yy1861;
+ }
+yy1863:
+ yyaccept = 21;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ switch (yych) {
+ case '%': goto yy1727;
+ case '+':
+ case '-':
+ case '/':
+ case ':':
+ case '@':
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy1973;
+ case '.': goto yy1970;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4': goto yy1860;
+ case '5': goto yy1979;
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy1971;
+ case 'B':
+ case 'S':
+ case 'b':
+ case 's': goto yy1974;
+ case 'E':
+ case 'e': goto yy1975;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy1976;
+ case 'm': goto yy1977;
+ case 'p':
+ case 'u': goto yy1978;
+ default: goto yy1861;
+ }
+yy1864:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+yy1865:
+ if (yych <= '@') {
+ if (yych <= '9') {
+ if (yych <= ',') goto yy1741;
+ if (yych <= '/') goto yy1731;
+ goto yy1864;
+ } else {
+ if (yych <= ':') goto yy1881;
+ if (yych <= '?') goto yy1741;
+ goto yy1731;
+ }
+ } else {
if (yych <= '_') {
- if (yych <= 'D') {
- if (yych <= ':') goto yy148;
- if (yych <= '?') goto yy109;
- if (yych <= '@') goto yy96;
- goto yy459;
+ if (yych <= 'Z') goto yy1864;
+ if (yych <= '^') goto yy1741;
+ goto yy1864;
+ } else {
+ if (yych <= '`') goto yy1741;
+ if (yych <= 'z') goto yy1864;
+ goto yy1741;
+ }
+ }
+yy1866:
+ yych = *++YYCURSOR;
+ if (yych <= '?') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1697;
+ if (yych <= '*') goto yy1682;
+ goto yy1697;
+ } else {
+ if (yych <= '.') {
+ if (yych <= ',') goto yy1682;
+ goto yy1697;
} else {
- if (yych <= 'F') {
- if (yych <= 'E') goto yy460;
- goto yy459;
- } else {
- if (yych <= 'Z') goto yy115;
- if (yych <= '^') goto yy109;
- goto yy46;
- }
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy1980;
+ goto yy1682;
}
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') goto yy1699;
+ if (yych <= 'F') goto yy1980;
+ if (yych <= 'Z') goto yy1745;
+ goto yy1682;
} else {
- if (yych <= 'z') {
- if (yych <= 'd') {
- if (yych <= '`') goto yy109;
- goto yy459;
- } else {
- if (yych <= 'e') goto yy460;
- if (yych <= 'f') goto yy459;
- goto yy115;
- }
+ if (yych <= '`') {
+ if (yych <= '_') goto yy1745;
+ goto yy1682;
} else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy109;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy109;
- if (yych <= 0xF4) goto yy4;
- goto yy109;
- }
+ if (yych <= 'f') goto yy1980;
+ if (yych <= 'z') goto yy1745;
+ goto yy1682;
}
}
}
-yy364:
- yyaccept = 6;
+yy1867:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '1') {
+ if (yych <= '/') goto yy1698;
+ if (yych <= '0') goto yy1981;
+ goto yy1982;
+ } else {
+ if (yych <= '2') goto yy1983;
+ if (yych <= '9') goto yy1981;
+ goto yy1698;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy1745;
+ if (yych <= '^') goto yy1698;
+ goto yy1745;
+ } else {
+ if (yych <= '`') goto yy1698;
+ if (yych <= 'z') goto yy1745;
+ goto yy1698;
+ }
+ }
+yy1868:
+ yych = *++YYCURSOR;
+ if (yych <= 'Z') {
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy1864;
+ if (yych <= '@') goto yy1682;
+ goto yy1984;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy1682;
+ goto yy1864;
+ } else {
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'z') goto yy1984;
+ goto yy1682;
+ }
+ }
+yy1869:
+ yyaccept = 11;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
}
if (yych <= '9') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy26;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy26;
- goto yy4;
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy1733;
+ goto yy1727;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') goto yy26;
- goto yy4;
- } else {
- if (yych <= 0x1B) goto yy26;
- if (yych <= 0x1F) goto yy4;
- goto yy26;
- }
+ if (yych == '+') goto yy1697;
+ goto yy1733;
}
} else {
- if (yych <= '+') {
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy105;
- if (yych <= '*') goto yy26;
- goto yy80;
+ if (yych <= '.') {
+ if (yych <= '-') goto yy1729;
+ goto yy1985;
} else {
- if (yych <= '-') {
- if (yych <= ',') goto yy26;
- goto yy46;
- } else {
- if (yych <= '.') goto yy266;
- if (yych <= '/') goto yy4;
- goto yy458;
- }
+ if (yych <= '/') goto yy1731;
+ if (yych <= '7') goto yy1986;
+ goto yy1987;
}
}
} else {
- if (yych <= '_') {
- if (yych <= 'D') {
- if (yych <= ':') goto yy148;
- if (yych <= '?') goto yy26;
- if (yych <= '@') goto yy96;
- goto yy459;
+ if (yych <= 'Z') {
+ if (yych <= '?') {
+ if (yych <= ':') goto yy1988;
+ goto yy1733;
} else {
- if (yych <= 'F') {
- if (yych <= 'E') goto yy460;
- goto yy459;
- } else {
- if (yych <= 'Z') goto yy115;
- if (yych <= '^') goto yy26;
- goto yy46;
+ if (yych <= '@') goto yy1737;
+ if (yych <= 'F') goto yy1989;
+ goto yy1742;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych == '_') goto yy1745;
+ goto yy1733;
+ } else {
+ if (yych <= 'f') goto yy1989;
+ if (yych <= 'z') goto yy1742;
+ goto yy1733;
+ }
+ }
+ }
+yy1870:
+ yyaccept = 12;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ if (yych <= ':') {
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy1735;
+ goto yy1727;
+ } else {
+ if (yych == '+') goto yy1697;
+ goto yy1735;
+ }
+ } else {
+ if (yych <= '.') {
+ if (yych <= '-') goto yy1729;
+ goto yy1985;
+ } else {
+ if (yych <= '/') goto yy1731;
+ if (yych <= '9') goto yy1987;
+ goto yy1988;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') {
+ if (yych <= '?') goto yy1735;
+ goto yy1737;
+ } else {
+ if (yych <= 'F') goto yy1989;
+ if (yych <= 'Z') goto yy1742;
+ goto yy1735;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych <= '_') goto yy1745;
+ goto yy1735;
+ } else {
+ if (yych <= 'f') goto yy1989;
+ if (yych <= 'z') goto yy1742;
+ goto yy1735;
+ }
+ }
+ }
+yy1871:
+ yych = *++YYCURSOR;
+ if (yych <= ':') {
+ if (yych <= '.') goto yy1682;
+ if (yych <= '/') goto yy1873;
+ if (yych <= '9') goto yy1990;
+ goto yy1875;
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy1682;
+ goto yy1991;
+ } else {
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy1991;
+ goto yy1682;
+ }
+ }
+yy1872:
+ yyaccept = 12;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '?') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1743;
+ if (yych <= '*') goto yy1735;
+ goto yy1743;
+ } else {
+ if (yych <= '/') {
+ if (yych <= ',') goto yy1735;
+ goto yy1743;
+ } else {
+ if (yych <= '9') goto yy1989;
+ if (yych <= ':') goto yy1988;
+ goto yy1735;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') goto yy1743;
+ if (yych <= 'F') goto yy1989;
+ if (yych <= 'Z') goto yy1743;
+ goto yy1735;
+ } else {
+ if (yych <= '`') {
+ if (yych <= '_') goto yy1743;
+ goto yy1735;
+ } else {
+ if (yych <= 'f') goto yy1989;
+ if (yych <= 'z') goto yy1743;
+ goto yy1735;
+ }
+ }
+ }
+yy1873:
+ yych = *++YYCURSOR;
+ if (yych <= '<') {
+ if (yych <= ',') {
+ if (yych <= '$') goto yy1993;
+ if (yych <= '&') goto yy1992;
+ goto yy1993;
+ } else {
+ if (yych == '.') goto yy1993;
+ if (yych <= '9') goto yy1992;
+ goto yy1993;
+ }
+ } else {
+ if (yych <= '@') {
+ if (yych == '>') goto yy1993;
+ if (yych <= '?') goto yy1992;
+ goto yy1993;
+ } else {
+ if (yych <= 'Z') goto yy1992;
+ if (yych <= '`') goto yy1993;
+ if (yych <= 'z') goto yy1992;
+ goto yy1993;
+ }
+ }
+yy1874:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2000;
+ if (yych <= ':') goto yy2001;
+ goto yy1682;
+ } else {
+ if (yych <= 'F') goto yy2002;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2002;
+ goto yy1682;
+ }
+yy1875:
+ yych = *++YYCURSOR;
+ if (yych <= '_') {
+ if (yych <= '9') {
+ if (yych <= '0') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
+ goto yy2003;
+ } else {
+ if (yych <= '1') goto yy2004;
+ if (yych <= '2') goto yy2005;
+ goto yy2003;
}
} else {
+ if (yych <= 'F') {
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1897;
+ }
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2006;
+ } else {
+ if (yych <= 'Z') goto yy1864;
+ if (yych <= '^') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ yyt2 = YYCURSOR;
+ goto yy2007;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
if (yych <= 'z') {
- if (yych <= 'd') {
- if (yych <= '`') goto yy26;
- goto yy459;
- } else {
- if (yych <= 'e') goto yy460;
- if (yych <= 'f') goto yy459;
- goto yy115;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
+ if (yych <= 'f') goto yy2006;
+ goto yy1864;
} else {
if (yych <= 0x7F) {
- if (yych <= '~') goto yy26;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy26;
- if (yych <= 0xF4) goto yy4;
- goto yy26;
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
+ if (yych <= 0xC1) goto yy1682;
+ yyt2 = YYCURSOR;
+ goto yy1900;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy1902;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1903;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1682;
}
}
}
-yy365:
+yy1876:
yych = *++YYCURSOR;
- if (yych <= '9') {
- if (yych <= '%') {
- if (yych <= '$') goto yy1;
- goto yy461;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2002;
+ if (yych <= ':') goto yy2001;
+ goto yy1682;
+ } else {
+ if (yych <= 'F') goto yy2002;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2002;
+ goto yy1682;
+ }
+yy1877:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '?') {
+ if (yych <= '.') {
+ if (yych <= ',') goto yy1741;
+ if (yych <= '-') goto yy2008;
+ goto yy2009;
} else {
- if (yych <= '.') goto yy1;
- if (yych <= '/') goto yy189;
- goto yy192;
+ if (yych <= '/') goto yy1731;
+ if (yych <= '9') goto yy1877;
+ if (yych <= ':') goto yy1881;
+ goto yy1741;
}
} else {
+ if (yych <= '^') {
+ if (yych <= '@') goto yy1731;
+ if (yych <= 'Z') goto yy1877;
+ goto yy1741;
+ } else {
+ if (yych <= '_') goto yy1864;
+ if (yych <= '`') goto yy1741;
+ if (yych <= 'z') goto yy1877;
+ goto yy1741;
+ }
+ }
+yy1878:
+ yych = *++YYCURSOR;
+ if (yych <= ':') {
+ if (yych <= '.') goto yy1682;
+ if (yych <= '/') goto yy1873;
+ if (yych <= '9') goto yy1991;
+ goto yy1875;
+ } else {
if (yych <= 'F') {
- if (yych <= ':') goto yy462;
- if (yych <= '@') goto yy1;
- goto yy192;
+ if (yych <= '@') goto yy1682;
+ goto yy1991;
} else {
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy192;
- goto yy1;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy1991;
+ goto yy1682;
}
}
-yy366:
+yy1879:
+ yych = *++YYCURSOR;
+ if (yych == '/') goto yy1873;
+ if (yych == ':') goto yy1731;
+ goto yy1682;
+yy1880:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == 'B') goto yy1744;
+ if (yych == 'b') goto yy1744;
+ goto yy1743;
+yy1881:
+ yych = *++YYCURSOR;
+ if (yych == ':') goto yy1731;
+ goto yy1682;
+yy1882:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'a') {
+ if (yych == 'B') goto yy1744;
+ goto yy1743;
+ } else {
+ if (yych <= 'b') goto yy1744;
+ if (yych == 'n') goto yy1744;
+ goto yy1743;
+ }
+yy1883:
yyaccept = 12;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '/') {
- if (yych <= 0x1F) {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy113;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy113;
- goto yy4;
+yy1884:
+ if (yych <= ':') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1697;
+ if (yych <= '*') goto yy1735;
+ goto yy1697;
+ } else {
+ if (yych <= '.') {
+ if (yych <= ',') goto yy1735;
+ goto yy1729;
+ } else {
+ if (yych <= '/') goto yy1731;
+ if (yych <= '9') goto yy1883;
+ goto yy1879;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') {
+ if (yych <= '?') goto yy1735;
+ goto yy1737;
} else {
- if (yych <= '\r') goto yy113;
- if (yych == 0x1B) goto yy113;
- goto yy4;
+ if (yych <= 'F') goto yy1883;
+ if (yych <= 'Z') goto yy1742;
+ goto yy1735;
}
} else {
- if (yych <= '*') {
- if (yych <= '#') goto yy113;
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy80;
- goto yy113;
+ if (yych <= '`') {
+ if (yych <= '_') goto yy1745;
+ goto yy1735;
} else {
- if (yych <= '+') goto yy80;
- if (yych <= ',') goto yy113;
- if (yych <= '.') goto yy46;
- goto yy4;
+ if (yych <= 'f') goto yy1883;
+ if (yych <= 'z') goto yy1742;
+ goto yy1735;
}
}
+ }
+yy1885:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '1') {
+ if (yych <= '/') goto yy1698;
+ if (yych <= '0') goto yy2010;
+ goto yy2011;
+ } else {
+ if (yych <= '2') goto yy2012;
+ if (yych <= '9') goto yy2010;
+ goto yy1698;
+ }
} else {
if (yych <= '_') {
- if (yych <= '@') {
- if (yych <= '9') goto yy459;
- if (yych <= ':') goto yy148;
- if (yych <= '?') goto yy113;
- goto yy96;
+ if (yych <= 'Z') goto yy1745;
+ if (yych <= '^') goto yy1698;
+ goto yy1745;
+ } else {
+ if (yych <= '`') goto yy1698;
+ if (yych <= 'z') goto yy1745;
+ goto yy1698;
+ }
+ }
+yy1886:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ switch (yych) {
+ case '%': goto yy1727;
+ case '+': goto yy1697;
+ case '-': goto yy1729;
+ case '.': goto yy1885;
+ case '/': goto yy1731;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy2013;
+ case ':': goto yy1988;
+ case '@': goto yy1737;
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f': goto yy1989;
+ case 'B':
+ case 'b': goto yy2014;
+ case 'E':
+ case 'e': goto yy2015;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy1740;
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy1742;
+ case 'S':
+ case 's': goto yy1744;
+ case '_': goto yy1745;
+ case 'm': goto yy1747;
+ case 'p':
+ case 'u': goto yy1748;
+ default: goto yy1635;
+ }
+yy1887:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '?') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1743;
+ if (yych <= '*') goto yy1635;
+ goto yy1743;
+ } else {
+ if (yych <= '/') {
+ if (yych <= ',') goto yy1635;
+ goto yy1743;
} else {
- if (yych <= 'F') goto yy459;
- if (yych <= 'Z') goto yy115;
- if (yych <= '^') goto yy113;
- goto yy46;
+ if (yych <= '9') goto yy1989;
+ if (yych <= ':') goto yy1988;
+ goto yy1635;
}
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') goto yy1743;
+ if (yych <= 'F') goto yy1989;
+ if (yych <= 'Z') goto yy1743;
+ goto yy1635;
} else {
- if (yych <= '~') {
- if (yych <= '`') goto yy113;
- if (yych <= 'f') goto yy459;
- if (yych <= 'z') goto yy115;
- goto yy113;
+ if (yych <= '`') {
+ if (yych <= '_') goto yy1743;
+ goto yy1635;
} else {
- if (yych <= 0x7F) goto yy4;
- if (yych <= 0xC1) goto yy113;
- if (yych <= 0xF4) goto yy4;
- goto yy113;
+ if (yych <= 'f') goto yy1989;
+ if (yych <= 'z') goto yy1743;
+ goto yy1635;
}
}
}
-yy367:
+yy1888:
yyaccept = 12;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '.') {
- if (yych <= 0x1F) {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy113;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy113;
- goto yy4;
- } else {
- if (yych <= '\r') goto yy113;
- if (yych == 0x1B) goto yy113;
- goto yy4;
- }
+ if (yych <= ':') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1743;
+ if (yych <= '*') goto yy1735;
} else {
- if (yych <= '*') {
- if (yych <= '#') goto yy113;
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy80;
- goto yy113;
+ if (yych <= '-') {
+ if (yych <= ',') goto yy1735;
+ goto yy2016;
} else {
- if (yych <= '+') goto yy194;
- if (yych <= ',') goto yy113;
- if (yych <= '-') goto yy251;
- goto yy46;
+ if (yych <= '/') goto yy1743;
+ if (yych <= '9') goto yy1989;
+ goto yy1988;
}
}
} else {
if (yych <= '^') {
- if (yych <= '?') {
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy459;
- if (yych <= ':') goto yy148;
- goto yy113;
+ if (yych <= '@') {
+ if (yych <= '?') goto yy1735;
+ goto yy1743;
} else {
- if (yych <= '@') goto yy96;
- if (yych <= 'F') goto yy459;
- if (yych <= 'Z') goto yy115;
- goto yy113;
+ if (yych <= 'F') goto yy1989;
+ if (yych <= 'Z') goto yy1743;
+ goto yy1735;
}
} else {
- if (yych <= 'z') {
- if (yych <= '_') goto yy46;
- if (yych <= '`') goto yy113;
- if (yych <= 'f') goto yy459;
- goto yy115;
+ if (yych <= '`') {
+ if (yych <= '_') goto yy1743;
+ goto yy1735;
} else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy113;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy113;
- if (yych <= 0xF4) goto yy4;
- goto yy113;
- }
+ if (yych <= 'f') goto yy1989;
+ if (yych <= 'z') goto yy1743;
+ goto yy1735;
}
}
}
-yy368:
- yyaccept = 21;
+yy1889:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy1698;
+ if (yych <= '9') goto yy2017;
+ goto yy1698;
+yy1890:
+ yych = *++YYCURSOR;
+ if (yych <= 'Z') {
+ if (yych <= '9') {
+ if (yych <= '/') goto yy1698;
+ goto yy2018;
+ } else {
+ if (yych <= '@') goto yy1698;
+ if (yych <= 'F') goto yy1980;
+ goto yy1745;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych == '_') goto yy1745;
+ goto yy1698;
+ } else {
+ if (yych <= 'f') goto yy1980;
+ if (yych <= 'z') goto yy1745;
+ goto yy1698;
+ }
+ }
+yy1891:
+ yyaccept = 3;
yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ switch (yych) {
+ case '%': goto yy1727;
+ case '+': goto yy1697;
+ case '-': goto yy1729;
+ case '.': goto yy2019;
+ case '/': goto yy1731;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy2013;
+ case ':': goto yy1988;
+ case '@': goto yy1737;
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f': goto yy1989;
+ case 'B':
+ case 'b': goto yy2014;
+ case 'E':
+ case 'e': goto yy2015;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy1740;
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy1742;
+ case 'S':
+ case 's': goto yy1744;
+ case '_': goto yy1745;
+ case 'm': goto yy1747;
+ case 'p':
+ case 'u': goto yy1748;
+ default: goto yy1635;
+ }
+yy1892:
+ ++YYCURSOR;
+yy1893:
+ YYCURSOR = yyt2;
+#line 312 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_IPV6_ADDRESS); }
+#line 49016 "../../lnav/src/data_scanner_re.cc"
+yy1894:
+ yych = *++YYCURSOR;
if (yych <= 'f') {
- if (yych <= '9') {
- if (yych == '-') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
yyt1 = YYCURSOR;
- goto yy463;
- }
- if (yych <= '/') {
+ goto yy2020;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= '9') goto yy2021;
yyt1 = YYCURSOR;
- goto yy434;
+ goto yy2022;
}
- yyt1 = YYCURSOR;
- goto yy464;
} else {
- if (yych <= '@') {
- if (yych <= ':') goto yy465;
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2023;
+ } else {
+ if (yych <= 'Z') goto yy1682;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2023;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy1682;
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ } else {
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy1900;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy1902;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1903;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1682;
+ }
+ }
+ }
+yy1895:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
yyt1 = YYCURSOR;
- goto yy434;
+ goto yy2020;
} else {
- if (yych <= 'F') {
- yyt1 = YYCURSOR;
- goto yy464;
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
+ if (yych <= '9') goto yy2024;
+ yyt1 = YYCURSOR;
+ goto yy2022;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2023;
+ } else {
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2023;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy1682;
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ } else {
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy1900;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy1902;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1903;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1682;
+ }
+ }
+ }
+yy1896:
+ yych = *++YYCURSOR;
+ if (yych <= '`') {
+ if (yych <= '5') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ yyt1 = YYCURSOR;
+ goto yy2020;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= '4') goto yy2024;
+ goto yy2025;
+ }
+ } else {
+ if (yych <= '@') {
+ if (yych <= '9') goto yy2021;
+ if (yych <= ':') {
yyt1 = YYCURSOR;
- goto yy434;
+ goto yy2022;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ } else {
+ if (yych <= 'F') goto yy2023;
+ if (yych <= 'Z') goto yy1682;
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= 'f') goto yy2023;
+ goto yy1682;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
+ if (yych <= 0xC1) goto yy1682;
+ yyt2 = YYCURSOR;
+ goto yy1900;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy1902;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1903;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1682;
+ }
+ }
+ }
+yy1897:
+ yych = *++YYCURSOR;
+ if (yych == ' ') goto yy1892;
+ goto yy1682;
+yy1898:
+ yych = *++YYCURSOR;
+ if (yych <= 'z') {
+ if (yych <= '@') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= '9') goto yy2023;
+ if (yych <= ':') {
yyt1 = YYCURSOR;
- goto yy464;
+ goto yy2022;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= 'F') goto yy2023;
+ goto yy1682;
+ } else {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= 'f') goto yy2023;
+ goto yy1682;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- yyt1 = YYCURSOR;
- goto yy434;
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
- if (yych <= 0xC1) goto yy354;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
- yyt1 = YYCURSOR;
- goto yy436;
+ yyt2 = YYCURSOR;
+ goto yy1900;
}
- yyt1 = YYCURSOR;
- goto yy437;
+ yyt2 = YYCURSOR;
+ goto yy1901;
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
- yyt1 = YYCURSOR;
- goto yy438;
+ yyt2 = YYCURSOR;
+ goto yy1902;
}
- yyt1 = YYCURSOR;
- goto yy439;
+ yyt2 = YYCURSOR;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1682;
+ }
+ }
+ }
+yy1899:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= 'E') {
+ if (yych <= '9') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2023;
+ } else {
+ if (yych <= ':') {
yyt1 = YYCURSOR;
- goto yy440;
+ goto yy2022;
+ }
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2023;
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= 'F') goto yy2026;
+ goto yy1682;
+ } else {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= 'e') goto yy2023;
+ goto yy2026;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy1682;
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ } else {
+ if (yych <= 0xC1) goto yy1682;
+ if (yych >= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
+ yyt2 = YYCURSOR;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy1902;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1903;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1682;
+ }
+ }
+ }
+yy1900:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy1892;
+ goto yy1682;
+yy1901:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy1682;
+ if (yych <= 0xBF) goto yy1900;
+ goto yy1682;
+yy1902:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy1900;
+ goto yy1682;
+yy1903:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy1682;
+ if (yych <= 0xBF) goto yy1902;
+ goto yy1682;
+yy1904:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy1902;
+ goto yy1682;
+yy1905:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0x8F) goto yy1902;
+ goto yy1682;
+yy1906:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy2028;
+ goto yy2031;
+ } else {
+ if (yych <= '/') goto yy2028;
+ if (yych <= ':') goto yy2032;
+ goto yy2028;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy2032;
+ if (yych <= '^') goto yy2028;
+ goto yy2032;
+ } else {
+ if (yych <= '`') goto yy2028;
+ if (yych <= 'z') goto yy2032;
+ goto yy2028;
+ }
+ }
+yy1907:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy2028;
+ goto yy2032;
+ } else {
+ if (yych <= '/') goto yy2028;
+ if (yych <= ':') goto yy2032;
+ goto yy2028;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy2032;
+ if (yych <= '^') goto yy2028;
+ goto yy2032;
+ } else {
+ if (yych <= '`') goto yy2028;
+ if (yych <= 'z') goto yy2032;
+ goto yy2028;
+ }
+ }
+yy1908:
+ yych = *++YYCURSOR;
+yy1909:
+ if (yych <= '/') {
+ if (yych <= 0x1F) {
+ if (yych <= '\t') {
+ if (yych <= 0x08) goto yy1682;
+ goto yy1908;
+ } else {
+ if (yych == '\r') goto yy1908;
+ goto yy1682;
+ }
+ } else {
+ if (yych <= ',') {
+ if (yych <= ' ') goto yy1908;
+ goto yy1682;
+ } else {
+ if (yych <= '-') goto yy2035;
+ if (yych <= '.') goto yy1682;
+ goto yy1911;
+ }
+ }
+ } else {
+ if (yych <= '@') {
+ if (yych <= '=') {
+ if (yych <= ':') goto yy2035;
+ goto yy1682;
+ } else {
+ if (yych <= '>') goto yy1912;
+ if (yych <= '?') goto yy1911;
+ goto yy1682;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy2035;
+ if (yych <= '^') goto yy1682;
+ goto yy2035;
+ } else {
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'z') goto yy2035;
+ goto yy1682;
+ }
+ }
+ }
+yy1910:
+ yych = *++YYCURSOR;
+ if (yybm_init[768+yych] & 1) {
+ goto yy1910;
+ }
+ if (yych <= ' ') {
+ if (yych <= '\f') {
+ if (yych == '\t') goto yy2036;
+ goto yy1682;
+ } else {
+ if (yych <= '\r') goto yy2036;
+ if (yych <= 0x1F) goto yy1682;
+ goto yy2036;
+ }
+ } else {
+ if (yych <= '<') {
+ if (yych != '/') goto yy1682;
+ } else {
+ if (yych <= '=') goto yy2037;
+ if (yych <= '>') goto yy1912;
+ if (yych >= '@') goto yy1682;
+ }
+ }
+yy1911:
+ yych = *++YYCURSOR;
+ if (yych == '>') goto yy2038;
+ goto yy1682;
+yy1912:
+ ++YYCURSOR;
+yy1913:
+#line 322 "../../lnav/src/data_scanner_re.re"
+ {
+ RET(DT_XML_OPEN_TAG);
+ }
+#line 49522 "../../lnav/src/data_scanner_re.cc"
+yy1914:
+ yych = *++YYCURSOR;
+yy1915:
+ if (yych <= '/') {
+ if (yych <= '\r') {
+ if (yych == '\t') goto yy2040;
+ if (yych <= '\f') goto yy1682;
+ goto yy2040;
+ } else {
+ if (yych <= ' ') {
+ if (yych <= 0x1F) goto yy1682;
+ goto yy2040;
+ } else {
+ if (yych == '-') goto yy1914;
+ goto yy1682;
+ }
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '=') {
+ if (yych <= ':') goto yy1914;
+ goto yy1682;
+ } else {
+ if (yych <= '>') goto yy2041;
+ if (yych <= '@') goto yy1682;
+ goto yy1914;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy1682;
+ goto yy1914;
+ } else {
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'z') goto yy1914;
+ goto yy1682;
+ }
+ }
+ }
+yy1916:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy2043;
+ goto yy2044;
+ } else {
+ if (yych <= '/') goto yy2043;
+ if (yych <= ':') goto yy2044;
+ goto yy2043;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy2044;
+ if (yych <= '^') goto yy2043;
+ goto yy2044;
+ } else {
+ if (yych <= '`') goto yy2043;
+ if (yych <= 'z') goto yy2044;
+ goto yy2043;
+ }
+ }
+yy1917:
+ yych = *++YYCURSOR;
+ if (yych == '-') goto yy2045;
+ goto yy1682;
+yy1918:
+ ++YYCURSOR;
+ goto yy1762;
+yy1919:
+ yych = *++YYCURSOR;
+ if (yych <= '\f') {
+ if (yych == '\t') goto yy1918;
+ goto yy1762;
+ } else {
+ if (yych <= '\r') goto yy1918;
+ if (yych == ' ') goto yy1918;
+ goto yy1762;
+ }
+yy1920:
+ yych = *++YYCURSOR;
+ if (yych <= '\f') {
+ if (yych == '\t') goto yy1918;
+ goto yy1682;
+ } else {
+ if (yych <= '\r') goto yy1918;
+ if (yych == ' ') goto yy1918;
+ goto yy1682;
+ }
+yy1921:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[768+yych] & 2) {
+ goto yy1921;
+ }
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy1650;
+ goto yy1697;
+ } else {
+ if (yych == '+') goto yy1697;
+ goto yy1650;
+ }
+ } else {
+ if (yych <= ':') {
+ if (yych <= '.') goto yy2046;
+ if (yych <= '/') goto yy1650;
+ goto yy2047;
+ } else {
+ if (yych == '@') goto yy1699;
+ goto yy1650;
+ }
+ }
+yy1922:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '9') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1697;
+ if (yych <= '*') goto yy1650;
+ goto yy1697;
+ } else {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy1650;
+ goto yy2048;
+ } else {
+ if (yych <= '.') goto yy1763;
+ if (yych <= '/') goto yy1731;
+ goto yy1922;
+ }
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= ':') goto yy1786;
+ if (yych <= '?') goto yy1650;
+ if (yych <= '@') goto yy1737;
+ goto yy1922;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy1650;
+ goto yy1922;
+ } else {
+ if (yych <= '`') goto yy1650;
+ if (yych <= 'z') goto yy1922;
+ goto yy1650;
+ }
+ }
+ }
+yy1923:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy1773;
+ if (yych <= '9') goto yy2049;
+ if (yych <= ':') goto yy1787;
+ goto yy1773;
+ } else {
+ if (yych <= 'F') goto yy2049;
+ if (yych <= '`') goto yy1773;
+ if (yych <= 'f') goto yy2049;
+ goto yy1773;
+ }
+yy1924:
+ yych = *++YYCURSOR;
+ if (yych <= ':') {
+ if (yych <= '.') goto yy1682;
+ if (yych <= '/') goto yy1873;
+ if (yych <= '9') goto yy1991;
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy1682;
+ goto yy1991;
+ } else {
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy1991;
+ goto yy1682;
+ }
+ }
+yy1925:
+ yych = *++YYCURSOR;
+ if (yych <= '^') {
+ if (yych <= '2') {
+ if (yych <= '/') {
+ if (yych == '-') {
+ yyt2 = YYCURSOR;
+ goto yy2050;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ } else {
+ if (yych <= '0') goto yy2051;
+ if (yych <= '1') goto yy2052;
+ goto yy2053;
+ }
+ } else {
+ if (yych <= '@') {
+ if (yych <= '9') goto yy2051;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1897;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ } else {
+ if (yych <= 'F') goto yy2054;
+ if (yych <= 'Z') goto yy2055;
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ }
+ } else {
+ if (yych <= 0xC1) {
+ if (yych <= 'f') {
+ if (yych <= '_') {
+ yyt2 = YYCURSOR;
+ goto yy2057;
+ }
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2054;
+ } else {
+ if (yych <= 'z') goto yy2055;
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy1682;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy1900;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1902;
+ } else {
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy1903;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
}
if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1682;
+ }
+ }
+ }
+yy1926:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= ' ') {
+ if (yych <= 0x1F) goto yy1773;
+ goto yy2058;
+ } else {
+ if (yych <= '/') goto yy1773;
+ if (yych <= '9') goto yy2049;
+ goto yy1787;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy1773;
+ goto yy2049;
+ } else {
+ if (yych <= '`') goto yy1773;
+ if (yych <= 'f') goto yy2049;
+ goto yy1773;
+ }
+ }
+yy1927:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == ' ') goto yy2058;
+ goto yy1773;
+yy1928:
+ yych = *++YYCURSOR;
+ if (yych <= '-') {
+ if (yych <= '\r') {
+ if (yych == '\t') goto yy1918;
+ if (yych <= '\f') goto yy1698;
+ goto yy1918;
+ } else {
+ if (yych == ' ') goto yy1918;
+ if (yych <= ',') goto yy1698;
+ goto yy1921;
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '/') goto yy1698;
+ if (yych <= '9') goto yy1922;
+ if (yych <= '@') goto yy1698;
+ goto yy1922;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy1698;
+ goto yy1922;
+ } else {
+ if (yych <= '`') goto yy1698;
+ if (yych <= 'z') goto yy1922;
+ goto yy1698;
+ }
+ }
+ }
+yy1929:
+ yyaccept = 22;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= '.') goto yy1762;
+ if (yych <= '/') goto yy1873;
+ if (yych <= '9') goto yy1991;
+ goto yy1925;
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy1762;
+ goto yy1991;
+ } else {
+ if (yych <= '`') goto yy1762;
+ if (yych <= 'f') goto yy1991;
+ goto yy1762;
+ }
+ }
+yy1930:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '9') {
+ if (yych <= '*') {
+ if (yych <= ' ') {
+ if (yych <= 0x1F) goto yy1761;
+ yyt3 = YYCURSOR;
+ goto yy2059;
+ } else {
+ if (yych == '%') goto yy1697;
+ goto yy1761;
+ }
+ } else {
+ if (yych <= '-') {
+ if (yych <= '+') goto yy1697;
+ if (yych <= ',') goto yy1761;
+ goto yy1729;
+ } else {
+ if (yych <= '.') {
+ yyt3 = YYCURSOR;
+ goto yy1928;
+ }
+ if (yych <= '/') goto yy1731;
+ goto yy2049;
+ }
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '?') {
+ if (yych <= ':') {
+ yyt3 = YYCURSOR;
+ goto yy2060;
+ }
+ goto yy1761;
+ } else {
+ if (yych <= '@') goto yy1737;
+ if (yych <= 'F') goto yy2049;
+ goto yy1772;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych == '_') goto yy1659;
+ goto yy1761;
+ } else {
+ if (yych <= 'f') goto yy2061;
+ if (yych <= 'z') goto yy2062;
+ goto yy1761;
+ }
+ }
+ }
+yy1931:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '/') {
+ if (yych <= '*') {
+ if (yych <= ' ') {
+ if (yych <= 0x1F) goto yy1761;
+ yyt3 = YYCURSOR;
+ goto yy2059;
+ } else {
+ if (yych == '%') goto yy1697;
+ goto yy1761;
+ }
+ } else {
+ if (yych <= ',') {
+ if (yych <= '+') goto yy1697;
+ goto yy1761;
+ } else {
+ if (yych <= '-') goto yy1729;
+ if (yych <= '.') {
+ yyt3 = YYCURSOR;
+ goto yy1928;
+ }
+ goto yy1731;
+ }
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= ':') {
+ if (yych <= '9') goto yy1772;
+ yyt3 = YYCURSOR;
+ } else {
+ if (yych <= '?') goto yy1761;
+ if (yych <= '@') goto yy1737;
+ goto yy1772;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy1761;
+ goto yy1659;
+ } else {
+ if (yych <= '`') goto yy1761;
+ if (yych <= 'z') goto yy2062;
+ goto yy1761;
+ }
+ }
+ }
+yy1932:
+ yyaccept = 22;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '/') goto yy1873;
+ if (yych == ':') goto yy1935;
+ goto yy1762;
+yy1933:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == ' ') goto yy2058;
+ if (yych == 'S') goto yy2063;
+ goto yy1773;
+yy1934:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '9') {
+ if (yych <= '*') {
+ if (yych <= ' ') {
+ if (yych <= 0x1F) goto yy1761;
+ yyt3 = YYCURSOR;
+ goto yy2059;
+ } else {
+ if (yych == '%') goto yy1697;
+ goto yy1761;
+ }
+ } else {
+ if (yych <= '-') {
+ if (yych <= '+') goto yy1697;
+ if (yych <= ',') goto yy1761;
+ goto yy1729;
+ } else {
+ if (yych <= '.') {
+ yyt3 = YYCURSOR;
+ goto yy1928;
+ }
+ if (yych <= '/') goto yy1731;
+ goto yy1772;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '?') {
+ if (yych <= ':') {
+ yyt3 = YYCURSOR;
+ goto yy1932;
+ }
+ goto yy1761;
+ } else {
+ if (yych <= '@') goto yy1737;
+ if (yych <= 'Z') goto yy1772;
+ goto yy1761;
+ }
+ } else {
+ if (yych <= 'r') {
+ if (yych <= '_') goto yy1659;
+ if (yych <= '`') goto yy1761;
+ goto yy2062;
+ } else {
+ if (yych <= 's') goto yy2064;
+ if (yych <= 'z') goto yy2062;
+ goto yy1761;
+ }
+ }
+ }
+yy1935:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy1682;
+ goto yy2065;
+ } else {
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2055;
+ goto yy1682;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy2055;
+ if (yych <= '^') goto yy1682;
+ goto yy2055;
+ } else {
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'z') goto yy2055;
+ goto yy1682;
+ }
+ }
+yy1936:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == ' ') goto yy2058;
+ if (yych == 'L') goto yy2067;
+ goto yy1773;
+yy1937:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '9') {
+ if (yych <= '*') {
+ if (yych <= ' ') {
+ if (yych <= 0x1F) goto yy1761;
+ yyt3 = YYCURSOR;
+ goto yy2059;
+ } else {
+ if (yych == '%') goto yy1697;
+ goto yy1761;
+ }
+ } else {
+ if (yych <= '-') {
+ if (yych <= '+') goto yy1697;
+ if (yych <= ',') goto yy1761;
+ goto yy1729;
+ } else {
+ if (yych <= '.') {
+ yyt3 = YYCURSOR;
+ goto yy1928;
+ }
+ if (yych <= '/') goto yy1731;
+ goto yy1772;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '?') {
+ if (yych <= ':') {
+ yyt3 = YYCURSOR;
+ goto yy1932;
+ }
+ goto yy1761;
+ } else {
+ if (yych <= '@') goto yy1737;
+ if (yych <= 'Z') goto yy1772;
+ goto yy1761;
+ }
+ } else {
+ if (yych <= 'd') {
+ if (yych <= '_') goto yy1659;
+ if (yych <= '`') goto yy1761;
+ goto yy2062;
+ } else {
+ if (yych <= 'e') goto yy2069;
+ if (yych <= 'z') goto yy2062;
+ goto yy1761;
+ }
+ }
+ }
+yy1938:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == ' ') goto yy2058;
+ if (yych == 'E') goto yy2067;
+ goto yy1773;
+yy1939:
+ yyaccept = 22;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 0x16) {
+ if (yych <= '\t') {
+ if (yych <= 0x00) goto yy1762;
+ goto yy1701;
+ } else {
+ if (yych <= '\n') goto yy1762;
+ if (yych <= 0x15) goto yy1701;
+ goto yy1762;
+ }
+ } else {
+ if (yych <= 0x7F) {
+ if (yych == 0x1B) goto yy1762;
+ goto yy1701;
+ } else {
+ if (yych <= 0xC1) goto yy1762;
+ if (yych <= 0xF4) goto yy1701;
+ goto yy1762;
+ }
+ }
+yy1940:
+ yyaccept = 22;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 0x16) {
+ if (yych <= '\n') {
+ if (yych <= 0x00) goto yy1762;
+ if (yych <= 0x08) goto yy1701;
+ if (yych <= '\t') goto yy1939;
+ goto yy1762;
+ } else {
+ if (yych == '\r') goto yy1939;
+ if (yych <= 0x15) goto yy1701;
+ goto yy1762;
+ }
+ } else {
+ if (yych <= ' ') {
+ if (yych == 0x1B) goto yy1762;
+ if (yych <= 0x1F) goto yy1701;
+ goto yy1939;
+ } else {
+ if (yych <= 0x7F) goto yy1701;
+ if (yych <= 0xC1) goto yy1762;
+ if (yych <= 0xF4) goto yy1701;
+ goto yy1762;
+ }
+ }
+yy1941:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'S') {
+ if (yych <= ',') {
+ if (yych <= '&') {
+ if (yych == '!') {
+ yyt1 = yyt3 = YYCURSOR;
+ goto yy2070;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1805;
+ } else {
+ if (yych <= '\'') goto yy2071;
+ if (yych <= '+') {
+ yyt2 = YYCURSOR;
+ goto yy1805;
+ }
+ yyt1 = yyt3 = YYCURSOR;
+ goto yy2070;
+ }
+ } else {
+ if (yych <= '>') {
+ if (yych == '.') {
+ yyt1 = yyt3 = YYCURSOR;
+ goto yy2070;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1805;
+ } else {
+ if (yych <= '?') {
+ yyt1 = yyt3 = YYCURSOR;
+ goto yy2070;
+ }
+ if (yych <= 'R') {
+ yyt2 = YYCURSOR;
+ goto yy1805;
+ }
+ yyt3 = YYCURSOR;
+ goto yy1762;
+ }
+ }
+ } else {
+ if (yych <= 0xC1) {
+ if (yych <= 's') {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1805;
+ }
+ if (yych <= 'r') {
yyt1 = YYCURSOR;
- goto yy441;
+ goto yy2072;
}
- goto yy354;
+ goto yy1760;
+ } else {
+ if (yych <= 'z') {
+ yyt1 = YYCURSOR;
+ goto yy2072;
+ }
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy1805;
+ }
+ yyt3 = YYCURSOR;
+ goto yy1762;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy1809;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1810;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1811;
+ } else {
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy1812;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1813;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1814;
+ }
+ yyt3 = YYCURSOR;
+ goto yy1762;
}
}
}
-yy369:
+yy1942:
+ yych = *++YYCURSOR;
+ if (yych <= '\f') {
+ if (yych == '\t') goto yy1939;
+ goto yy1701;
+ } else {
+ if (yych <= '\r') goto yy1939;
+ if (yych == ' ') goto yy1939;
+ goto yy1701;
+ }
+yy1943:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[768+yych] & 4) {
+ goto yy1943;
+ }
+ if (yych <= '+') {
+ if (yych <= 0x1A) {
+ if (yych <= '\n') {
+ if (yych <= 0x00) {
+ yyt3 = YYCURSOR;
+ goto yy1762;
+ }
+ if (yych <= 0x08) goto yy1700;
+ if (yych <= '\t') {
+ yyt3 = YYCURSOR;
+ goto yy1939;
+ }
+ yyt3 = YYCURSOR;
+ goto yy1918;
+ } else {
+ if (yych <= '\r') {
+ if (yych <= '\f') goto yy1700;
+ yyt3 = YYCURSOR;
+ goto yy1939;
+ } else {
+ if (yych == 0x16) {
+ yyt3 = YYCURSOR;
+ goto yy1762;
+ }
+ goto yy1700;
+ }
+ }
+ } else {
+ if (yych <= '!') {
+ if (yych <= 0x1B) {
+ yyt3 = YYCURSOR;
+ goto yy1762;
+ }
+ if (yych <= 0x1F) goto yy1700;
+ if (yych <= ' ') {
+ yyt3 = YYCURSOR;
+ goto yy1939;
+ }
+ yyt3 = YYCURSOR;
+ goto yy1940;
+ } else {
+ if (yych <= '&') {
+ if (yych <= '"') {
+ yyt3 = YYCURSOR;
+ goto yy1939;
+ }
+ goto yy1700;
+ } else {
+ if (yych <= '\'') goto yy2073;
+ if (yych <= '*') {
+ yyt3 = YYCURSOR;
+ goto yy1939;
+ }
+ goto yy1700;
+ }
+ }
+ }
+ } else {
+ if (yych <= '\\') {
+ if (yych <= '9') {
+ if (yych <= ',') {
+ yyt3 = YYCURSOR;
+ goto yy1940;
+ }
+ if (yych == '.') {
+ yyt3 = YYCURSOR;
+ goto yy1942;
+ }
+ goto yy1700;
+ } else {
+ if (yych <= '>') {
+ if (yych <= ';') {
+ yyt3 = YYCURSOR;
+ goto yy1939;
+ }
+ goto yy1700;
+ } else {
+ if (yych <= '?') {
+ yyt3 = YYCURSOR;
+ goto yy1940;
+ }
+ if (yych <= '[') goto yy1700;
+ goto yy1703;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy1700;
+ if (yych <= 0xC1) {
+ yyt3 = YYCURSOR;
+ goto yy1762;
+ }
+ if (yych <= 0xDF) goto yy1704;
+ goto yy1705;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy1706;
+ goto yy1707;
+ } else {
+ if (yych <= 0xF3) goto yy1708;
+ if (yych <= 0xF4) goto yy1709;
+ yyt3 = YYCURSOR;
+ goto yy1762;
+ }
+ }
+ }
+ }
+yy1944:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '9') {
+ if (yych <= '*') {
+ if (yych <= ' ') {
+ if (yych <= 0x1F) goto yy1761;
+ yyt3 = YYCURSOR;
+ goto yy2059;
+ } else {
+ if (yych == '%') goto yy1697;
+ goto yy1761;
+ }
+ } else {
+ if (yych <= '-') {
+ if (yych <= '+') goto yy1697;
+ if (yych <= ',') goto yy1761;
+ goto yy1729;
+ } else {
+ if (yych <= '.') {
+ yyt3 = YYCURSOR;
+ goto yy1928;
+ }
+ if (yych <= '/') goto yy1731;
+ goto yy1772;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '?') {
+ if (yych <= ':') {
+ yyt3 = YYCURSOR;
+ goto yy1932;
+ }
+ goto yy1761;
+ } else {
+ if (yych <= '@') goto yy1737;
+ if (yych <= 'Z') goto yy1772;
+ goto yy1761;
+ }
+ } else {
+ if (yych <= 'k') {
+ if (yych <= '_') goto yy1659;
+ if (yych <= '`') goto yy1761;
+ goto yy2062;
+ } else {
+ if (yych <= 'l') goto yy2069;
+ if (yych <= 'z') goto yy2062;
+ goto yy1761;
+ }
+ }
+ }
+yy1945:
+ yych = *++YYCURSOR;
+ if (yych <= 'Z') {
+ if (yych <= '/') goto yy1698;
+ if (yych <= '9') goto yy1745;
+ if (yych <= '@') goto yy1698;
+ goto yy2074;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy1698;
+ goto yy1745;
+ } else {
+ if (yych <= '`') goto yy1698;
+ if (yych <= 'z') goto yy2074;
+ goto yy1698;
+ }
+ }
+yy1946:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2075;
+ goto yy1682;
+yy1947:
+ yych = *++YYCURSOR;
+ if (yych == ':') goto yy2076;
+ goto yy1682;
+yy1948:
+ yych = *++YYCURSOR;
+ if (yych <= 0xC1) {
+ if (yych <= '=') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= '<') goto yy1801;
+ goto yy2077;
+ } else {
+ if (yych == ']') goto yy2078;
+ if (yych <= 0x7F) goto yy1801;
+ goto yy1682;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy1949;
+ if (yych <= 0xE0) goto yy1950;
+ goto yy1951;
+ } else {
+ if (yych <= 0xF0) goto yy1952;
+ if (yych <= 0xF3) goto yy1953;
+ if (yych <= 0xF4) goto yy1954;
+ goto yy1682;
+ }
+ }
+yy1949:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy1801;
+ goto yy1682;
+yy1950:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy1682;
+ if (yych <= 0xBF) goto yy1949;
+ goto yy1682;
+yy1951:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy1949;
+ goto yy1682;
+yy1952:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy1682;
+ if (yych <= 0xBF) goto yy1951;
+ goto yy1682;
+yy1953:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy1951;
+ goto yy1682;
+yy1954:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0x8F) goto yy1951;
+ goto yy1682;
+yy1955:
+ yych = *++YYCURSOR;
+ if (yybm_init[768+yych] & 8) {
+ goto yy1955;
+ }
+ if (yych <= '9') {
+ if (yych == '-') goto yy1802;
+ if (yych <= '/') goto yy1682;
+ goto yy1802;
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '@') goto yy1682;
+ goto yy2079;
+ } else {
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'z') goto yy2079;
+ goto yy1682;
+ }
+ }
+yy1956:
+ yyaccept = 23;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[1280+yych] & 16) {
+ goto yy1700;
+ }
+ if (yych <= 0xDF) {
+ if (yych <= '\'') {
+ if (yych <= 0x1B) goto yy1806;
+ goto yy1804;
+ } else {
+ if (yych <= '\\') goto yy1703;
+ if (yych <= 0xC1) goto yy1806;
+ goto yy1704;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy1705;
+ if (yych <= 0xEF) goto yy1706;
+ goto yy1707;
+ } else {
+ if (yych <= 0xF3) goto yy1708;
+ if (yych <= 0xF4) goto yy1709;
+ goto yy1806;
+ }
+ }
+yy1957:
+ yyaccept = 21;
+ yych = *(YYMARKER = ++YYCURSOR);
+ switch (yych) {
+ case '%':
+ case '+':
+ case '-':
+ case '.':
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy1697;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy1957;
+ case '@': goto yy1699;
+ case 'B':
+ case 'S':
+ case 'b':
+ case 's': goto yy2081;
+ case 'E':
+ case 'e': goto yy2082;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy2083;
+ case 'm': goto yy2084;
+ case 'p':
+ case 'u': goto yy2085;
+ default: goto yy1861;
+ }
+yy1958:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy1698;
+ if (yych <= '9') goto yy2086;
+ goto yy1698;
+yy1959:
+ yych = *++YYCURSOR;
+ if (yych <= '9') {
+ if (yych <= '\f') {
+ if (yych <= 0x00) goto yy1818;
+ if (yych <= 0x08) goto yy1698;
+ if (yych <= '\n') goto yy1818;
+ goto yy1698;
+ } else {
+ if (yych <= 0x1F) {
+ if (yych <= '\r') goto yy1818;
+ goto yy1698;
+ } else {
+ if (yych <= ' ') goto yy1818;
+ if (yych <= '/') goto yy1698;
+ goto yy1714;
+ }
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '@') goto yy1698;
+ if (yych == 'B') goto yy1823;
+ goto yy1714;
+ } else {
+ if (yych <= 'a') {
+ if (yych <= '`') goto yy1698;
+ goto yy1714;
+ } else {
+ if (yych <= 'b') goto yy1823;
+ if (yych <= 'z') goto yy1714;
+ goto yy1698;
+ }
+ }
+ }
+yy1960:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '\r') {
+ if (yych <= 0x08) {
+ if (yych <= 0x00) goto yy1818;
+ goto yy1698;
+ } else {
+ if (yych <= '\n') goto yy1818;
+ if (yych <= '\f') goto yy1698;
+ goto yy1818;
+ }
+ } else {
+ if (yych <= ' ') {
+ if (yych <= 0x1F) goto yy1698;
+ goto yy1818;
+ } else {
+ if (yych <= '/') goto yy1698;
+ if (yych <= '9') goto yy1714;
+ goto yy1698;
+ }
+ }
+ } else {
+ if (yych <= 'a') {
+ if (yych <= 'B') {
+ if (yych <= 'A') goto yy1714;
+ goto yy1823;
+ } else {
+ if (yych <= 'Z') goto yy1714;
+ if (yych <= '`') goto yy1698;
+ goto yy1714;
+ }
+ } else {
+ if (yych <= 'm') {
+ if (yych <= 'b') goto yy1823;
+ goto yy1714;
+ } else {
+ if (yych <= 'n') goto yy1823;
+ if (yych <= 'z') goto yy1714;
+ goto yy1698;
+ }
+ }
+ }
+yy1961:
+ yyaccept = 21;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ switch (yych) {
+ case '%': goto yy1727;
+ case '+':
+ case '-':
+ case '.':
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy1697;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy1961;
+ case '@': goto yy1699;
+ case 'B':
+ case 'S':
+ case 'b':
+ case 's': goto yy2081;
+ case 'E':
+ case 'e': goto yy2082;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy2083;
+ case 'm': goto yy2084;
+ case 'p':
+ case 'u': goto yy2085;
+ default: goto yy1861;
+ }
+yy1962:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy1698;
+ if (yych <= '9') goto yy2087;
+ goto yy1698;
+yy1963:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy1698;
+ if (yych <= '9') goto yy2088;
+ goto yy1698;
+yy1964:
+ yych = *++YYCURSOR;
+ if (yych <= 0xC1) {
+ if (yych <= '*') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= ')') goto yy1850;
+ goto yy2089;
+ } else {
+ if (yych == '/') goto yy2090;
+ if (yych <= 0x7F) goto yy1850;
+ goto yy1682;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy1852;
+ if (yych <= 0xE0) goto yy1853;
+ goto yy1854;
+ } else {
+ if (yych <= 0xF0) goto yy1855;
+ if (yych <= 0xF3) goto yy1856;
+ if (yych <= 0xF4) goto yy1857;
+ goto yy1682;
+ }
+ }
+yy1965:
+ yyaccept = 9;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[768+yych] & 16) {
+ goto yy1965;
+ }
+ if (yych <= '\\') {
+ if (yych <= ')') {
+ if (yych <= '!') {
+ if (yych <= 0x00) goto yy1633;
+ if (yych <= ' ') goto yy1850;
+ goto yy1723;
+ } else {
+ if (yych <= '"') goto yy1850;
+ if (yych == '\'') goto yy1850;
+ goto yy1723;
+ }
+ } else {
+ if (yych <= '9') {
+ if (yych <= ',') goto yy1850;
+ if (yych == '/') goto yy2091;
+ goto yy1723;
+ } else {
+ if (yych <= '?') goto yy1850;
+ if (yych == '[') goto yy1850;
+ goto yy1723;
+ }
+ }
+ } else {
+ if (yych <= 0x7F) {
+ if (yych <= '`') {
+ if (yych <= ']') goto yy1850;
+ if (yych <= '_') goto yy1723;
+ goto yy1850;
+ } else {
+ if (yych <= 'z') goto yy1723;
+ if (yych == '~') goto yy1723;
+ goto yy1850;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy1633;
+ if (yych <= 0xDF) goto yy1852;
+ if (yych <= 0xE0) goto yy1853;
+ goto yy1854;
+ } else {
+ if (yych <= 0xF0) goto yy1855;
+ if (yych <= 0xF3) goto yy1856;
+ if (yych <= 0xF4) goto yy1857;
+ goto yy1633;
+ }
+ }
+ }
+yy1966:
+ yych = *++YYCURSOR;
+ if (yybm_init[1280+yych] & 64) {
+ goto yy1721;
+ }
+yy1967:
+#line 237 "../../lnav/src/data_scanner_re.re"
+ {
+ CAPTURE(DT_COMMENT);
+ if (tf == text_format_t::TF_DIFF) {
+ auto sf = this->to_string_fragment(cap_all);
+ auto split_res = sf.split_when(string_fragment::tag1{'\n'});
+ cap_all.c_end = split_res.first.sf_end;
+ cap_inner.c_end = split_res.first.sf_end;
+ this->ds_next_offset = cap_all.c_end;
+ }
+ return tokenize_result{token_out, cap_all, cap_inner, this->ds_input.data()};
+ }
+#line 50884 "../../lnav/src/data_scanner_re.cc"
+yy1968:
+ yych = *++YYCURSOR;
+ if (yych == 'g') goto yy2092;
+ goto yy1722;
+yy1969:
+ yych = *++YYCURSOR;
+ if (yych <= 'Z') {
+ if (yych <= '/') goto yy1698;
+ if (yych <= '9') goto yy2093;
+ if (yych <= '@') goto yy1698;
+ goto yy2093;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy1698;
+ goto yy2093;
+ } else {
+ if (yych <= '`') goto yy1698;
+ if (yych <= 'z') goto yy2093;
+ goto yy1698;
+ }
+ }
+yy1970:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '1') {
+ if (yych <= '/') goto yy1698;
+ if (yych <= '0') goto yy2096;
+ goto yy2097;
+ } else {
+ if (yych <= '2') goto yy2098;
+ if (yych <= '9') goto yy2096;
+ goto yy1698;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy1745;
+ if (yych <= '^') goto yy1698;
+ goto yy1745;
+ } else {
+ if (yych <= '`') goto yy1698;
+ if (yych <= 'z') goto yy1745;
+ goto yy1698;
+ }
+ }
+yy1971:
+ yyaccept = 21;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '.') goto yy1970;
+ goto yy2100;
+yy1972:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+yy1973:
+ if (yych <= '9') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1697;
+ if (yych <= '*') goto yy1741;
+ goto yy1697;
+ } else {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy1741;
+ goto yy1969;
+ } else {
+ if (yych <= '.') goto yy2101;
+ if (yych <= '/') goto yy1731;
+ goto yy1972;
+ }
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= ':') goto yy1881;
+ if (yych <= '?') goto yy1741;
+ if (yych <= '@') goto yy1737;
+ goto yy1972;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy1741;
+ goto yy1972;
+ } else {
+ if (yych <= '`') goto yy1741;
+ if (yych <= 'z') goto yy1972;
+ goto yy1741;
+ }
+ }
+ }
+yy1974:
yyaccept = 21;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ':') {
- if (yych <= '-') {
- if (yych <= ',') goto yy354;
- goto yy466;
+ if (yych <= '*') {
+ if (yych == '%') goto yy1973;
+ goto yy1861;
} else {
- if (yych <= '/') goto yy354;
- if (yych <= '9') goto yy372;
- goto yy467;
+ if (yych == ',') goto yy1861;
+ goto yy1973;
}
} else {
+ if (yych <= '^') {
+ if (yych <= '?') goto yy1861;
+ if (yych <= 'Z') goto yy1973;
+ goto yy1861;
+ } else {
+ if (yych == '`') goto yy1861;
+ if (yych <= 'z') goto yy1973;
+ goto yy1861;
+ }
+ }
+yy1975:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '+') goto yy2102;
+ if (yych == '-') goto yy2103;
+ goto yy1973;
+yy1976:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'a') {
+ if (yych == 'B') goto yy1974;
+ goto yy1973;
+ } else {
+ if (yych <= 'b') goto yy1974;
+ if (yych == 'i') goto yy2104;
+ goto yy1973;
+ }
+yy1977:
+ yyaccept = 21;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'S') {
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy1861;
+ goto yy1973;
+ } else {
+ if (yych == '+') goto yy1973;
+ goto yy1861;
+ }
+ } else {
+ if (yych <= 'A') {
+ if (yych <= ':') goto yy1973;
+ if (yych <= '?') goto yy1861;
+ goto yy1973;
+ } else {
+ if (yych <= 'B') goto yy1974;
+ if (yych <= 'R') goto yy1973;
+ goto yy1974;
+ }
+ }
+ } else {
+ if (yych <= 'b') {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy1973;
+ if (yych <= '^') goto yy1861;
+ goto yy1973;
+ } else {
+ if (yych <= '`') goto yy1861;
+ if (yych <= 'a') goto yy1973;
+ goto yy1974;
+ }
+ } else {
+ if (yych <= 'r') {
+ if (yych == 'i') goto yy2105;
+ goto yy1973;
+ } else {
+ if (yych <= 's') goto yy1974;
+ if (yych <= 'z') goto yy1973;
+ goto yy1861;
+ }
+ }
+ }
+yy1978:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == 'S') goto yy1974;
+ if (yych == 's') goto yy1974;
+ goto yy1973;
+yy1979:
+ yyaccept = 21;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '.') goto yy1970;
+ if (yych <= '/') goto yy2100;
+ if (yych <= '5') goto yy1971;
+ goto yy2100;
+yy1980:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1697;
+ if (yych <= '*') goto yy1741;
+ goto yy1697;
+ } else {
+ if (yych <= '.') {
+ if (yych <= ',') goto yy1741;
+ goto yy1729;
+ } else {
+ if (yych <= '/') goto yy1731;
+ if (yych <= '9') goto yy2106;
+ goto yy1881;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') {
+ if (yych <= '?') goto yy1741;
+ goto yy1737;
+ } else {
+ if (yych <= 'F') goto yy2106;
+ if (yych <= 'Z') goto yy1745;
+ goto yy1741;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych <= '_') goto yy1745;
+ goto yy1741;
+ } else {
+ if (yych <= 'f') goto yy2106;
+ if (yych <= 'z') goto yy1745;
+ goto yy1741;
+ }
+ }
+ }
+yy1981:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ if (yych <= '-') {
+ if (yych == '%') goto yy1727;
+ goto yy1973;
+ } else {
+ if (yych <= '.') goto yy1970;
+ if (yych <= '/') goto yy1973;
+ if (yych <= '9') goto yy2108;
+ goto yy1973;
+ }
+yy1982:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ if (yych <= '-') {
+ if (yych == '%') goto yy1727;
+ goto yy1973;
+ } else {
+ if (yych <= '.') goto yy1970;
+ if (yych <= '/') goto yy1973;
+ if (yych <= '9') goto yy1981;
+ goto yy1973;
+ }
+yy1983:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ switch (yych) {
+ case '%': goto yy1727;
+ case '.': goto yy1970;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4': goto yy1981;
+ case '5': goto yy2109;
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy2108;
+ default: goto yy1973;
+ }
+yy1984:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') goto yy1865;
+ if (yych <= 'Z') goto yy2110;
+ if (yych <= '`') goto yy1865;
+ if (yych <= 'z') goto yy2110;
+ goto yy1865;
+yy1985:
+ yych = *++YYCURSOR;
+ if (yych <= 'Z') {
+ if (yych <= '/') goto yy1698;
+ if (yych <= '9') goto yy2111;
+ if (yych <= '@') goto yy1698;
+ goto yy1745;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy1698;
+ goto yy1745;
+ } else {
+ if (yych <= '`') goto yy1698;
+ if (yych <= 'z') goto yy1745;
+ goto yy1698;
+ }
+ }
+yy1986:
+ yyaccept = 11;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '7') {
+ if (yych <= '*') {
+ if (yych <= ' ') {
+ if (yych <= 0x1F) goto yy1733;
+ goto yy2113;
+ } else {
+ if (yych == '%') goto yy1727;
+ goto yy1733;
+ }
+ } else {
+ if (yych <= '-') {
+ if (yych <= '+') goto yy1697;
+ if (yych <= ',') goto yy1733;
+ goto yy2114;
+ } else {
+ if (yych <= '.') goto yy1985;
+ if (yych <= '/') goto yy2115;
+ goto yy2116;
+ }
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '?') {
+ if (yych <= '9') goto yy2117;
+ if (yych <= ':') goto yy2118;
+ goto yy1733;
+ } else {
+ if (yych <= '@') goto yy1737;
+ if (yych <= 'F') goto yy2119;
+ goto yy1742;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych == '_') goto yy1745;
+ goto yy1733;
+ } else {
+ if (yych <= 'f') goto yy2119;
+ if (yych <= 'z') goto yy1742;
+ goto yy1733;
+ }
+ }
+ }
+yy1987:
+ yyaccept = 12;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '9') {
+ if (yych <= '*') {
+ if (yych <= ' ') {
+ if (yych <= 0x1F) goto yy1735;
+ goto yy2113;
+ } else {
+ if (yych == '%') goto yy1727;
+ goto yy1735;
+ }
+ } else {
+ if (yych <= '-') {
+ if (yych <= '+') goto yy1697;
+ if (yych <= ',') goto yy1735;
+ goto yy2114;
+ } else {
+ if (yych <= '.') goto yy1985;
+ if (yych <= '/') goto yy2115;
+ goto yy2117;
+ }
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '?') {
+ if (yych <= ':') goto yy2118;
+ goto yy1735;
+ } else {
+ if (yych <= '@') goto yy1737;
+ if (yych <= 'F') goto yy2119;
+ goto yy1742;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych == '_') goto yy1745;
+ goto yy1735;
+ } else {
+ if (yych <= 'f') goto yy2119;
+ if (yych <= 'z') goto yy1742;
+ goto yy1735;
+ }
+ }
+ }
+yy1988:
+ yych = *++YYCURSOR;
+ if (yych <= ':') {
+ if (yych <= '.') goto yy1682;
+ if (yych <= '/') goto yy1873;
+ if (yych <= '9') goto yy1876;
+ goto yy1875;
+ } else {
if (yych <= 'F') {
- if (yych <= '@') goto yy354;
- goto yy372;
+ if (yych <= '@') goto yy1682;
+ goto yy1876;
} else {
- if (yych <= '`') goto yy354;
- if (yych <= 'f') goto yy372;
- goto yy354;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy1876;
+ goto yy1682;
}
}
-yy370:
- yyaccept = 22;
+yy1989:
+ yyaccept = 12;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[256+yych] & 1) {
- goto yy273;
+ if (yych <= '?') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1743;
+ if (yych <= '*') goto yy1735;
+ goto yy1743;
+ } else {
+ if (yych <= '/') {
+ if (yych <= ',') goto yy1735;
+ goto yy1743;
+ } else {
+ if (yych <= '9') goto yy2119;
+ if (yych <= ':') goto yy2118;
+ goto yy1735;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') goto yy1743;
+ if (yych <= 'F') goto yy2119;
+ if (yych <= 'Z') goto yy1743;
+ goto yy1735;
+ } else {
+ if (yych <= '`') {
+ if (yych <= '_') goto yy1743;
+ goto yy1735;
+ } else {
+ if (yych <= 'f') goto yy2119;
+ if (yych <= 'z') goto yy1743;
+ goto yy1735;
+ }
+ }
+ }
+yy1990:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2120;
+ if (yych <= ':') goto yy2001;
+ goto yy1682;
+ } else {
+ if (yych <= 'F') goto yy2121;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2121;
+ goto yy1682;
+ }
+yy1991:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2121;
+ if (yych <= ':') goto yy2001;
+ goto yy1682;
+ } else {
+ if (yych <= 'F') goto yy2121;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2121;
+ goto yy1682;
+ }
+yy1992:
+ yych = *++YYCURSOR;
+yy1993:
+ if (yybm_init[768+yych] & 32) {
+ goto yy1992;
}
if (yych <= 0xC1) {
if (yych <= ')') {
- if (yych <= '"') goto yy371;
- if (yych <= '&') goto yy370;
+ if (yych <= '"') goto yy1682;
+ if (yych <= '&') goto yy2122;
+ goto yy1682;
} else {
- if (yych <= 'Z') goto yy370;
- if (yych <= ']') goto yy371;
- if (yych <= 'z') goto yy370;
+ if (yych <= 'Z') goto yy2122;
+ if (yych <= ']') goto yy1682;
+ if (yych <= 'z') goto yy2122;
+ goto yy1682;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xDF) goto yy275;
- if (yych <= 0xE0) goto yy276;
- goto yy277;
+ if (yych <= 0xDF) goto yy1994;
+ if (yych <= 0xE0) goto yy1995;
+ goto yy1996;
} else {
- if (yych <= 0xF0) goto yy278;
- if (yych <= 0xF3) goto yy279;
- if (yych <= 0xF4) goto yy280;
+ if (yych <= 0xF0) goto yy1997;
+ if (yych <= 0xF3) goto yy1998;
+ if (yych <= 0xF4) goto yy1999;
+ goto yy1682;
}
}
-yy371:
-#line 170 "../../lnav/src/data_scanner_re.re"
- { RET(DT_URL); }
-#line 12517 "../../lnav/src/data_scanner_re.cc"
-yy372:
+yy1994:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy1992;
+ goto yy1682;
+yy1995:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy1682;
+ if (yych <= 0xBF) goto yy1994;
+ goto yy1682;
+yy1996:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy1994;
+ goto yy1682;
+yy1997:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy1682;
+ if (yych <= 0xBF) goto yy1996;
+ goto yy1682;
+yy1998:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy1996;
+ goto yy1682;
+yy1999:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0x8F) goto yy1996;
+ goto yy1682;
+yy2000:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy468;
- if (yych <= ':') goto yy282;
- goto yy1;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2124;
+ if (yych <= ':') goto yy2125;
+ goto yy1682;
} else {
- if (yych <= 'F') goto yy468;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy468;
- goto yy1;
+ if (yych <= 'F') goto yy2124;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2124;
+ goto yy1682;
}
-yy373:
+yy2001:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy469;
- if (yych <= ':') goto yy375;
- goto yy1;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2126;
+ if (yych <= ':') goto yy2127;
+ goto yy1682;
} else {
- if (yych <= 'F') goto yy374;
- if (yych <= '`') goto yy1;
- if (yych >= 'g') goto yy1;
+ if (yych <= 'F') goto yy2126;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2126;
+ goto yy1682;
}
-yy374:
+yy2002:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy470;
- if (yych <= ':') goto yy471;
- goto yy1;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2124;
+ if (yych <= ':') goto yy2001;
+ goto yy1682;
} else {
- if (yych <= 'F') goto yy470;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy470;
- goto yy1;
+ if (yych <= 'F') goto yy2124;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2124;
+ goto yy1682;
}
-yy375:
- yych = *++YYCURSOR;
- if (yych <= '`') {
- if (yych <= '9') {
- if (yych <= '0') {
+yy2003:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '_') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= ',') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
+ }
+ yyt2 = YYCURSOR;
+ goto yy2129;
+ } else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy2128;
}
- goto yy472;
+ if (yych <= '9') goto yy2130;
+ yyt2 = YYCURSOR;
+ goto yy2131;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '?') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
+ }
+ goto yy2132;
} else {
- if (yych <= '1') goto yy473;
- if (yych <= '2') goto yy474;
- goto yy472;
+ if (yych <= 'Z') goto yy1864;
+ if (yych <= '^') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ yyt2 = YYCURSOR;
+ goto yy2007;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= 'f') goto yy2132;
+ goto yy1864;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= 0xC1) goto yy1741;
+ yyt2 = YYCURSOR;
+ goto yy1900;
}
} else {
- if (yych <= '@') {
- if (yych <= ':') goto yy1;
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy1902;
+ }
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1903;
} else {
- if (yych <= 'F') goto yy475;
- if (yych <= 'Z') goto yy1;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1741;
+ }
+ }
+ }
+yy2004:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '_') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= ',') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
+ }
+ yyt2 = YYCURSOR;
+ goto yy2129;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
+ }
+ if (yych <= '9') goto yy2133;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy2131;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '?') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
+ }
+ goto yy2132;
+ } else {
+ if (yych <= 'Z') goto yy1864;
+ if (yych <= '^') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ yyt2 = YYCURSOR;
+ goto yy2007;
}
}
} else {
if (yych <= 0xDF) {
if (yych <= 'z') {
- if (yych <= 'f') goto yy475;
- goto yy1;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= 'f') goto yy2132;
+ goto yy1864;
} else {
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1741;
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1741;
}
}
}
-yy376:
- yyaccept = 17;
+yy2005:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '1') {
- if (yych <= 0x1B) {
- if (yych <= '\n') {
- if (yych <= 0x00) goto yy199;
- if (yych <= 0x08) goto yy4;
- goto yy199;
+ if (yych <= '^') {
+ if (yych <= '5') {
+ if (yych <= '.') {
+ if (yych <= ',') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
+ }
+ yyt2 = YYCURSOR;
+ goto yy2129;
} else {
- if (yych == '\r') goto yy199;
- if (yych <= 0x1A) goto yy4;
- goto yy199;
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
+ }
+ if (yych <= '4') goto yy2133;
+ goto yy2134;
}
} else {
- if (yych <= '$') {
- if (yych <= 0x1F) goto yy4;
- if (yych <= '#') goto yy199;
- goto yy4;
+ if (yych <= '?') {
+ if (yych <= '9') goto yy2130;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2131;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1892;
} else {
- if (yych <= ',') goto yy199;
- if (yych <= '/') goto yy4;
- if (yych <= '0') goto yy476;
- goto yy477;
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
+ }
+ if (yych <= 'F') goto yy2132;
+ if (yych <= 'Z') goto yy1864;
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
}
} else {
- if (yych <= '_') {
- if (yych <= ':') {
- if (yych <= '2') goto yy478;
- if (yych <= '9') goto yy476;
- goto yy4;
+ if (yych <= 0xC1) {
+ if (yych <= 'f') {
+ if (yych <= '_') {
+ yyt2 = YYCURSOR;
+ goto yy2007;
+ }
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2132;
} else {
- if (yych <= '?') goto yy199;
- if (yych <= 'Z') goto yy4;
- if (yych <= '^') goto yy199;
- goto yy4;
+ if (yych <= 'z') goto yy1864;
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy1741;
}
} else {
- if (yych <= '~') {
- if (yych <= '`') goto yy199;
- if (yych <= 'z') goto yy4;
- goto yy199;
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy1900;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1902;
} else {
- if (yych <= 0x7F) goto yy4;
- if (yych <= 0xC1) goto yy199;
- if (yych <= 0xF4) goto yy4;
- goto yy199;
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy1903;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1741;
}
}
}
-yy377:
- yyaccept = 0;
+yy2006:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '?') {
- if (yych <= 0x1F) {
- if (yych <= '\f') {
- if (yych <= 0x00) {
+ if (yych <= '`') {
+ if (yych <= '?') {
+ if (yych <= '/') {
+ if (yych <= ',') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 0x08) {
+ yyt2 = YYCURSOR;
+ goto yy2128;
+ } else {
+ if (yych <= '9') goto yy2132;
+ if (yych <= ':') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy2131;
}
- if (yych <= '\n') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
+ }
+ if (yych <= 'F') goto yy2132;
+ goto yy1864;
+ } else {
+ if (yych != '_') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
yyt2 = YYCURSOR;
- goto yy284;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= 'f') goto yy2132;
+ goto yy1864;
} else {
- if (yych <= '\r') {
+ if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych == 0x1B) {
+ if (yych <= 0xC1) goto yy1741;
+ yyt2 = YYCURSOR;
+ goto yy1900;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1901;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1903;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1741;
+ }
+ }
+ }
+yy2007:
+ yyaccept = 24;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'Z') {
+ if (yych <= ',') goto yy1893;
+ if (yych <= ':') goto yy1865;
+ if (yych <= '?') goto yy1893;
+ goto yy1865;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy1893;
+ goto yy1865;
+ } else {
+ if (yych <= '`') goto yy1893;
+ if (yych <= 'z') goto yy1865;
+ goto yy1893;
+ }
+ }
+yy2008:
+ yych = *++YYCURSOR;
+ if (yybm_init[768+yych] & 8) {
+ goto yy1955;
+ }
+ if (yych <= '@') {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy1682;
+ goto yy1802;
+ } else {
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy1877;
+ goto yy1682;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy1877;
+ if (yych <= '^') goto yy1682;
+ goto yy1864;
+ } else {
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'z') goto yy1877;
+ goto yy1682;
+ }
+ }
+yy2009:
+ yych = *++YYCURSOR;
+ if (yybm_init[768+yych] & 8) {
+ goto yy1955;
+ }
+ if (yych <= '@') {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy1682;
+ goto yy1802;
+ } else {
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy1877;
+ goto yy1682;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy2135;
+ if (yych <= '^') goto yy1682;
+ goto yy1864;
+ } else {
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'z') goto yy2135;
+ goto yy1682;
+ }
+ }
+yy2010:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ switch (yych) {
+ case '%': goto yy1727;
+ case '+':
+ case '-':
+ case '/':
+ case ':':
+ case '@':
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy1973;
+ case '.': goto yy1970;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy2136;
+ case 'B':
+ case 'S':
+ case 'b':
+ case 's': goto yy2137;
+ case 'E':
+ case 'e': goto yy2138;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy2139;
+ case 'm': goto yy2140;
+ case 'p':
+ case 'u': goto yy2141;
+ default: goto yy1635;
+ }
+yy2011:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ switch (yych) {
+ case '%': goto yy1727;
+ case '+':
+ case '-':
+ case '/':
+ case ':':
+ case '@':
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy1973;
+ case '.': goto yy1970;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy2010;
+ case 'B':
+ case 'S':
+ case 'b':
+ case 's': goto yy2137;
+ case 'E':
+ case 'e': goto yy2138;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy2139;
+ case 'm': goto yy2140;
+ case 'p':
+ case 'u': goto yy2141;
+ default: goto yy1635;
+ }
+yy2012:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ switch (yych) {
+ case '%': goto yy1727;
+ case '+':
+ case '-':
+ case '/':
+ case ':':
+ case '@':
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy1973;
+ case '.': goto yy1970;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4': goto yy2010;
+ case '5': goto yy2142;
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy2136;
+ case 'B':
+ case 'S':
+ case 'b':
+ case 's': goto yy2137;
+ case 'E':
+ case 'e': goto yy2138;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy2139;
+ case 'm': goto yy2140;
+ case 'p':
+ case 'u': goto yy2141;
+ default: goto yy1635;
+ }
+yy2013:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ switch (yych) {
+ case ' ': goto yy2113;
+ case '%': goto yy1727;
+ case '+': goto yy1697;
+ case '-': goto yy2114;
+ case '.': goto yy2019;
+ case '/': goto yy2115;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy2143;
+ case ':': goto yy2118;
+ case '@': goto yy1737;
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f': goto yy2119;
+ case 'B':
+ case 'b': goto yy2144;
+ case 'E':
+ case 'e': goto yy2145;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy1740;
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy1742;
+ case 'S':
+ case 's': goto yy1744;
+ case '_': goto yy1745;
+ case 'm': goto yy1747;
+ case 'p':
+ case 'u': goto yy1748;
+ default: goto yy1635;
+ }
+yy2014:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '?') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1743;
+ if (yych <= '*') goto yy1635;
+ goto yy1743;
+ } else {
+ if (yych <= '/') {
+ if (yych <= ',') goto yy1635;
+ goto yy1743;
+ } else {
+ if (yych <= '9') goto yy2119;
+ if (yych <= ':') goto yy2118;
+ goto yy1635;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') goto yy1743;
+ if (yych <= 'F') goto yy2119;
+ if (yych <= 'Z') goto yy1743;
+ goto yy1635;
+ } else {
+ if (yych <= '`') {
+ if (yych <= '_') goto yy1743;
+ goto yy1635;
+ } else {
+ if (yych <= 'f') goto yy2119;
+ if (yych <= 'z') goto yy1743;
+ goto yy1635;
}
+ }
+ }
+yy2015:
+ yyaccept = 12;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1743;
+ if (yych <= '*') goto yy1735;
+ goto yy1889;
} else {
if (yych <= '-') {
- if (yych == '$') {
+ if (yych <= ',') goto yy1735;
+ } else {
+ if (yych <= '/') goto yy1743;
+ if (yych <= '9') goto yy2119;
+ goto yy2118;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') {
+ if (yych <= '?') goto yy1735;
+ goto yy1743;
+ } else {
+ if (yych <= 'F') goto yy2119;
+ if (yych <= 'Z') goto yy1743;
+ goto yy1735;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych <= '_') goto yy1743;
+ goto yy1735;
+ } else {
+ if (yych <= 'f') goto yy2119;
+ if (yych <= 'z') goto yy1743;
+ goto yy1735;
+ }
+ }
+ }
+yy2016:
+ yych = *++YYCURSOR;
+ if (yych <= 'Z') {
+ if (yych <= '/') goto yy1698;
+ if (yych <= '9') goto yy2146;
+ if (yych <= '@') goto yy1698;
+ goto yy1745;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy1698;
+ goto yy1745;
+ } else {
+ if (yych <= '`') goto yy1698;
+ if (yych <= 'z') goto yy1745;
+ goto yy1698;
+ }
+ }
+yy2017:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ switch (yych) {
+ case '%':
+ case '+':
+ case '-':
+ case '.':
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'E':
+ case 'F':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'e':
+ case 'f':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy1697;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy2017;
+ case '@': goto yy1699;
+ case 'B':
+ case 'S':
+ case 'b':
+ case 's': goto yy2148;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy2149;
+ case 'm': goto yy2150;
+ case 'p':
+ case 'u': goto yy2151;
+ default: goto yy1635;
+ }
+yy2018:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ switch (yych) {
+ case '%':
+ case '+':
+ case '-':
+ case '.':
+ case '/':
+ case ':':
+ case '@':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy1746;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy2152;
+ case 'A':
+ case 'B':
+ case 'C':
+ case 'D':
+ case 'E':
+ case 'F':
+ case 'a':
+ case 'b':
+ case 'c':
+ case 'd':
+ case 'e':
+ case 'f': goto yy2106;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy2153;
+ case 'S':
+ case 's': goto yy2154;
+ case 'm': goto yy2155;
+ case 'p':
+ case 'u': goto yy2156;
+ default: goto yy1635;
+ }
+yy2019:
+ yych = *++YYCURSOR;
+ if (yych <= 'Z') {
+ if (yych <= '/') goto yy1698;
+ if (yych <= '9') goto yy2157;
+ if (yych <= '@') goto yy1698;
+ goto yy1745;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy1698;
+ goto yy1745;
+ } else {
+ if (yych <= '`') goto yy1698;
+ if (yych <= 'z') goto yy1745;
+ goto yy1698;
+ }
+ }
+yy2020:
+ yyaccept = 25;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '1') {
+ if (yych <= '/') {
+ yyt2 = yyt1;
+ goto yy1893;
+ }
+ if (yych <= '0') goto yy2159;
+ goto yy2160;
+ } else {
+ if (yych <= '2') goto yy2161;
+ if (yych <= '9') goto yy2159;
+ yyt2 = yyt1;
+ goto yy1893;
+ }
+yy2021:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1892;
}
- if (yych <= ',') {
+ yyt1 = YYCURSOR;
+ goto yy2020;
+ } else {
+ if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
+ if (yych <= '9') goto yy2162;
+ yyt1 = YYCURSOR;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2162;
+ } else {
+ if (yych <= 'Z') goto yy1682;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2162;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1892;
} else {
- if (yych <= '/') {
- if (yych <= '.') {
- yyt2 = YYCURSOR;
- goto yy376;
- }
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy284;
- } else {
- if (yych <= '9') goto yy479;
- if (yych >= ';') {
- yyt2 = YYCURSOR;
- goto yy198;
- }
+ goto yy1900;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy1902;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1903;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
}
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1682;
}
}
+ }
+yy2022:
+ yych = *++YYCURSOR;
+ if (yych <= '9') {
+ if (yych == ' ') {
+ yyt2 = yyt1;
+ goto yy1892;
+ }
+ if (yych <= '/') goto yy1682;
+ goto yy2163;
} else {
- if (yych <= '~') {
- if (yych <= '^') {
- if (yych <= '@') {
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy1682;
+ goto yy2163;
+ } else {
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2163;
+ goto yy1682;
+ }
+ }
+yy2023:
+ yych = *++YYCURSOR;
+ if (yych <= 'z') {
+ if (yych <= '@') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= '9') goto yy2162;
+ if (yych <= ':') {
+ yyt1 = YYCURSOR;
+ goto yy2022;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= 'F') goto yy2162;
+ goto yy1682;
+ } else {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= 'f') goto yy2162;
+ goto yy1682;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy1900;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1902;
}
- if (yych <= 'F') goto yy479;
- if (yych <= 'Z') goto yy3;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1903;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1682;
+ }
+ }
+ }
+yy2024:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ yyt1 = YYCURSOR;
+ goto yy2020;
} else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= '9') goto yy2164;
+ yyt1 = YYCURSOR;
+ goto yy2022;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2162;
+ } else {
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
- if (yych <= '_') {
- yyt2 = YYCURSOR;
- goto yy284;
- }
yyt2 = YYCURSOR;
- goto yy198;
- } else {
- if (yych <= 'f') goto yy479;
- if (yych <= 'z') goto yy3;
+ goto yy1892;
+ }
+ goto yy2162;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy1682;
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ } else {
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1900;
}
+ yyt2 = YYCURSOR;
+ goto yy1901;
}
} else {
- if (yych <= 0xE0) {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy1902;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1903;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1682;
+ }
+ }
+ }
+yy2025:
+ yych = *++YYCURSOR;
+ if (yych <= '`') {
+ if (yych <= '9') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ yyt1 = YYCURSOR;
+ goto yy2020;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= '5') goto yy2164;
+ goto yy2162;
+ }
+ } else {
+ if (yych <= '@') {
+ if (yych <= ':') {
+ yyt1 = YYCURSOR;
+ goto yy2022;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ } else {
+ if (yych <= 'F') goto yy2162;
+ if (yych <= 'Z') goto yy1682;
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= 'f') goto yy2162;
+ goto yy1682;
+ } else {
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1892;
+ }
+ if (yych <= 0xC1) goto yy1682;
+ yyt2 = YYCURSOR;
+ goto yy1900;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy1902;
}
- if (yych <= 0xC1) goto yy5;
+ yyt2 = YYCURSOR;
+ goto yy1903;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1682;
+ }
+ }
+ }
+yy2026:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= 'E') {
+ if (yych <= '9') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2162;
+ } else {
+ if (yych <= ':') {
+ yyt1 = YYCURSOR;
+ goto yy2022;
+ }
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2162;
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= 'F') goto yy2165;
+ goto yy1682;
+ } else {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= 'e') goto yy2162;
+ goto yy2165;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy1682;
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ } else {
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy289;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy290;
+ goto yy1901;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy1902;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1903;
} else {
- if (yych <= 0xF0) {
- if (yych <= 0xEF) {
- yyt2 = YYCURSOR;
- goto yy291;
- }
+ if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy292;
- } else {
- if (yych <= 0xF3) {
- yyt2 = YYCURSOR;
- goto yy293;
- }
- if (yych <= 0xF4) {
- yyt2 = YYCURSOR;
- goto yy294;
- }
- goto yy5;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
}
+ goto yy1682;
}
}
}
-yy378:
+yy2027:
+ yych = *++YYCURSOR;
+yy2028:
+ if (yych <= ',') {
+ if (yych <= 0x1F) {
+ if (yych <= '\t') {
+ if (yych <= 0x08) goto yy1682;
+ goto yy2027;
+ } else {
+ if (yych == '\r') goto yy2027;
+ goto yy1682;
+ }
+ } else {
+ if (yych <= '"') {
+ if (yych <= ' ') goto yy2027;
+ if (yych <= '!') goto yy1682;
+ } else {
+ if (yych == '\'') goto yy2030;
+ goto yy1682;
+ }
+ }
+ } else {
+ if (yych <= '@') {
+ if (yych <= ':') {
+ if (yych <= '-') goto yy2166;
+ if (yych <= '/') goto yy1682;
+ goto yy2166;
+ } else {
+ if (yych == '>') goto yy2033;
+ goto yy1682;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy2166;
+ if (yych <= '^') goto yy1682;
+ goto yy2166;
+ } else {
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'z') goto yy2166;
+ goto yy1682;
+ }
+ }
+ }
+yy2029:
+ yych = *++YYCURSOR;
+ if (yybm_init[512+yych] & 2) {
+ goto yy2167;
+ }
+ if (yych <= 0xE0) {
+ if (yych <= '\\') {
+ if (yych <= '"') goto yy1682;
+ goto yy2168;
+ } else {
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2169;
+ goto yy2170;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy2171;
+ goto yy2172;
+ } else {
+ if (yych <= 0xF3) goto yy2173;
+ if (yych <= 0xF4) goto yy2174;
+ goto yy1682;
+ }
+ }
+yy2030:
+ yych = *++YYCURSOR;
+ if (yybm_init[512+yych] & 4) {
+ goto yy2175;
+ }
+ if (yych <= 0xE0) {
+ if (yych <= '\\') {
+ if (yych <= '\'') goto yy1682;
+ goto yy2176;
+ } else {
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2177;
+ goto yy2178;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy2179;
+ goto yy2180;
+ } else {
+ if (yych <= 0xF3) goto yy2181;
+ if (yych <= 0xF4) goto yy2182;
+ goto yy1682;
+ }
+ }
+yy2031:
+ yych = *++YYCURSOR;
+ if (yybm_init[768+yych] & 64) {
+ goto yy2031;
+ }
+ if (yych <= '*') {
+ if (yych <= 0x1F) {
+ if (yych <= '\t') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= 0x08) goto yy2183;
+ goto yy2185;
+ } else {
+ if (yych == '\r') goto yy2185;
+ goto yy2183;
+ }
+ } else {
+ if (yych <= '"') {
+ if (yych <= ' ') goto yy2185;
+ if (yych <= '!') goto yy2183;
+ goto yy2186;
+ } else {
+ if (yych == '\'') goto yy2187;
+ if (yych <= ')') goto yy2183;
+ goto yy1682;
+ }
+ }
+ } else {
+ if (yych <= 0xC1) {
+ if (yych <= '<') {
+ if (yych == '-') goto yy2188;
+ goto yy2183;
+ } else {
+ if (yych <= '=') goto yy2189;
+ if (yych <= '>') goto yy2190;
+ if (yych <= 0x7F) goto yy2183;
+ goto yy1682;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy2191;
+ if (yych <= 0xE0) goto yy2192;
+ goto yy2193;
+ } else {
+ if (yych <= 0xF0) goto yy2194;
+ if (yych <= 0xF3) goto yy2195;
+ if (yych <= 0xF4) goto yy2196;
+ goto yy1682;
+ }
+ }
+ }
+yy2032:
+ yych = *++YYCURSOR;
+ if (yych <= '-') {
+ if (yych <= ' ') {
+ if (yych <= '\f') {
+ if (yych == '\t') goto yy2197;
+ goto yy1682;
+ } else {
+ if (yych <= '\r') goto yy2197;
+ if (yych <= 0x1F) goto yy1682;
+ goto yy2197;
+ }
+ } else {
+ if (yych <= '&') {
+ if (yych == '"') goto yy2029;
+ goto yy1682;
+ } else {
+ if (yych <= '\'') goto yy2030;
+ if (yych <= ',') goto yy1682;
+ goto yy2032;
+ }
+ }
+ } else {
+ if (yych <= '@') {
+ if (yych <= '<') {
+ if (yych <= '/') goto yy1682;
+ if (yych <= ':') goto yy2032;
+ goto yy1682;
+ } else {
+ if (yych <= '=') goto yy2198;
+ if (yych >= '?') goto yy1682;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy2032;
+ if (yych <= '^') goto yy1682;
+ goto yy2032;
+ } else {
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'z') goto yy2032;
+ goto yy1682;
+ }
+ }
+ }
+yy2033:
+ ++YYCURSOR;
+yy2034:
+#line 314 "../../lnav/src/data_scanner_re.re"
+ {
+ RET(DT_XML_DECL_TAG);
+ }
+#line 53008 "../../lnav/src/data_scanner_re.cc"
+yy2035:
+ yych = *++YYCURSOR;
+ if (yych <= ':') {
+ if (yych <= 0x1F) {
+ if (yych <= '\t') {
+ if (yych <= 0x08) goto yy1682;
+ goto yy2199;
+ } else {
+ if (yych == '\r') goto yy2199;
+ goto yy1682;
+ }
+ } else {
+ if (yych <= '-') {
+ if (yych <= ' ') goto yy2199;
+ if (yych <= ',') goto yy1682;
+ goto yy2035;
+ } else {
+ if (yych <= '.') goto yy1682;
+ if (yych <= '/') goto yy1911;
+ goto yy2035;
+ }
+ }
+ } else {
+ if (yych <= '@') {
+ if (yych <= '=') {
+ if (yych <= '<') goto yy1682;
+ goto yy2037;
+ } else {
+ if (yych <= '>') goto yy1912;
+ if (yych <= '?') goto yy1911;
+ goto yy1682;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy2035;
+ if (yych <= '^') goto yy1682;
+ goto yy2035;
+ } else {
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'z') goto yy2035;
+ goto yy1682;
+ }
+ }
+ }
+yy2036:
+ yych = *++YYCURSOR;
+ if (yych <= ':') {
+ if (yych <= 0x1F) {
+ if (yych <= '\t') {
+ if (yych <= 0x08) goto yy1682;
+ goto yy2036;
+ } else {
+ if (yych == '\r') goto yy2036;
+ goto yy1682;
+ }
+ } else {
+ if (yych <= '-') {
+ if (yych <= ' ') goto yy2036;
+ if (yych <= ',') goto yy1682;
+ goto yy2035;
+ } else {
+ if (yych <= '.') goto yy1682;
+ if (yych <= '/') goto yy1911;
+ goto yy2035;
+ }
+ }
+ } else {
+ if (yych <= '@') {
+ if (yych <= '=') {
+ if (yych <= '<') goto yy1682;
+ } else {
+ if (yych <= '>') goto yy1912;
+ if (yych <= '?') goto yy1911;
+ goto yy1682;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy2035;
+ if (yych <= '^') goto yy1682;
+ goto yy2035;
+ } else {
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'z') goto yy2035;
+ goto yy1682;
+ }
+ }
+ }
+yy2037:
+ yych = *++YYCURSOR;
+ if (yych <= '\'') {
+ if (yych <= '\r') {
+ if (yych <= 0x08) {
+ if (yych <= 0x00) goto yy1682;
+ goto yy2200;
+ } else {
+ if (yych <= '\t') goto yy2201;
+ if (yych <= '\f') goto yy2200;
+ goto yy2201;
+ }
+ } else {
+ if (yych <= '!') {
+ if (yych == ' ') goto yy2201;
+ goto yy2200;
+ } else {
+ if (yych <= '"') goto yy2202;
+ if (yych <= '&') goto yy2200;
+ goto yy2203;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= '>') {
+ if (yych <= '=') goto yy2200;
+ goto yy1682;
+ } else {
+ if (yych <= 0x7F) goto yy2200;
+ if (yych <= 0xC1) goto yy1682;
+ goto yy2204;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy2205;
+ if (yych <= 0xEF) goto yy2206;
+ goto yy2207;
+ } else {
+ if (yych <= 0xF3) goto yy2208;
+ if (yych <= 0xF4) goto yy2209;
+ goto yy1682;
+ }
+ }
+ }
+yy2038:
+ ++YYCURSOR;
+yy2039:
+#line 318 "../../lnav/src/data_scanner_re.re"
+ {
+ RET(DT_XML_EMPTY_TAG);
+ }
+#line 53147 "../../lnav/src/data_scanner_re.cc"
+yy2040:
+ yych = *++YYCURSOR;
+ if (yych <= '\r') {
+ if (yych == '\t') goto yy2040;
+ if (yych <= '\f') goto yy1682;
+ goto yy2040;
+ } else {
+ if (yych <= ' ') {
+ if (yych <= 0x1F) goto yy1682;
+ goto yy2040;
+ } else {
+ if (yych != '>') goto yy1682;
+ }
+ }
+yy2041:
+ ++YYCURSOR;
+#line 326 "../../lnav/src/data_scanner_re.re"
+ {
+ RET(DT_XML_CLOSE_TAG);
+ }
+#line 53168 "../../lnav/src/data_scanner_re.cc"
+yy2042:
+ yych = *++YYCURSOR;
+yy2043:
+ if (yych <= '/') {
+ if (yych <= 0x1F) {
+ if (yych <= '\t') {
+ if (yych <= 0x08) goto yy1682;
+ goto yy2042;
+ } else {
+ if (yych == '\r') goto yy2042;
+ goto yy1682;
+ }
+ } else {
+ if (yych <= ',') {
+ if (yych <= ' ') goto yy2042;
+ goto yy1682;
+ } else {
+ if (yych <= '-') goto yy2210;
+ if (yych <= '.') goto yy1682;
+ goto yy1911;
+ }
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '>') {
+ if (yych <= ':') goto yy2210;
+ goto yy1682;
+ } else {
+ if (yych <= '?') goto yy1911;
+ if (yych <= '@') goto yy1682;
+ goto yy2210;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy1682;
+ goto yy2210;
+ } else {
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'z') goto yy2210;
+ goto yy1682;
+ }
+ }
+ }
+yy2044:
yych = *++YYCURSOR;
+ if (yych <= ':') {
+ if (yych <= 0x1F) {
+ if (yych <= '\t') {
+ if (yych <= 0x08) goto yy1682;
+ goto yy2211;
+ } else {
+ if (yych == '\r') goto yy2211;
+ goto yy1682;
+ }
+ } else {
+ if (yych <= '-') {
+ if (yych <= ' ') goto yy2211;
+ if (yych <= ',') goto yy1682;
+ goto yy2044;
+ } else {
+ if (yych <= '.') goto yy1682;
+ if (yych <= '/') goto yy1911;
+ goto yy2044;
+ }
+ }
+ } else {
+ if (yych <= '@') {
+ if (yych <= '=') {
+ if (yych <= '<') goto yy1682;
+ goto yy2212;
+ } else {
+ if (yych == '?') goto yy1911;
+ goto yy1682;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy2044;
+ if (yych <= '^') goto yy1682;
+ goto yy2044;
+ } else {
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'z') goto yy2044;
+ goto yy1682;
+ }
+ }
+ }
+yy2045:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2213;
+ goto yy1682;
+yy2046:
+ yych = *++YYCURSOR;
+ if (yybm_init[768+yych] & 2) {
+ goto yy1921;
+ }
+ if (yych <= '+') {
+ if (yych == '%') goto yy1697;
+ if (yych <= '*') goto yy1682;
+ goto yy1697;
+ } else {
+ if (yych <= '.') {
+ if (yych <= ',') goto yy1682;
+ goto yy1697;
+ } else {
+ if (yych == '@') goto yy1699;
+ goto yy1682;
+ }
+ }
+yy2047:
+ yych = *++YYCURSOR;
+ if (yych == ':') goto yy2214;
+ goto yy1682;
+yy2048:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '9') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1697;
+ if (yych <= '*') goto yy1650;
+ goto yy1697;
+ } else {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy1650;
+ goto yy1921;
+ } else {
+ if (yych <= '.') goto yy2046;
+ if (yych <= '/') goto yy1650;
+ goto yy1922;
+ }
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= ':') goto yy2047;
+ if (yych <= '?') goto yy1650;
+ if (yych <= '@') goto yy1699;
+ goto yy1922;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy1650;
+ goto yy1922;
+ } else {
+ if (yych <= '`') goto yy1650;
+ if (yych <= 'z') goto yy1922;
+ goto yy1650;
+ }
+ }
+ }
+yy2049:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy475;
- if (yych <= ':') goto yy152;
- goto yy1;
+ if (yych <= '/') goto yy1773;
+ if (yych <= '9') goto yy2215;
+ if (yych <= ':') goto yy2216;
+ goto yy1773;
} else {
- if (yych <= 'F') goto yy475;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy475;
- goto yy1;
+ if (yych <= 'F') goto yy2215;
+ if (yych <= '`') goto yy1773;
+ if (yych <= 'f') goto yy2215;
+ goto yy1773;
}
-yy379:
- yyaccept = 0;
+yy2050:
+ yyaccept = 24;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '@') {
- if (yych <= 0x1F) {
- if (yych <= '\f') {
- if (yych <= 0x00) {
+ if (yych <= '.') {
+ if (yych <= ',') goto yy1893;
+ goto yy2066;
+ } else {
+ if (yych <= '/') goto yy1893;
+ if (yych <= ':') goto yy2066;
+ goto yy1893;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy2066;
+ if (yych <= '^') goto yy1893;
+ goto yy2066;
+ } else {
+ if (yych <= '`') goto yy1893;
+ if (yych <= 'z') goto yy2066;
+ goto yy1893;
+ }
+ }
+yy2051:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '_') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= ',') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 0x08) {
+ if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy2217;
}
- if (yych <= '\n') {
+ yyt2 = YYCURSOR;
+ goto yy2218;
+ } else {
+ if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy2128;
}
+ if (yych <= '9') goto yy2219;
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy2220;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '?') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
+ }
+ goto yy2221;
} else {
- if (yych <= '\r') {
+ if (yych <= 'Z') goto yy2055;
+ if (yych <= '^') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych == 0x1B) {
+ yyt2 = YYCURSOR;
+ goto yy2057;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= 'f') goto yy2221;
+ goto yy2055;
+ } else {
+ if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
+ if (yych <= 0xC1) goto yy1650;
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1900;
}
} else {
- if (yych <= '/') {
- if (yych == '$') {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
+ if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1902;
}
+ yyt2 = YYCURSOR;
+ goto yy1903;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1650;
+ }
+ }
+ }
+yy2052:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '_') {
+ if (yych <= ':') {
+ if (yych <= '.') {
if (yych <= ',') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
+ }
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy2217;
}
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy2218;
} else {
- if (yych <= '9') goto yy479;
- if (yych <= ':') goto yy378;
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
+ }
+ if (yych <= '9') goto yy2222;
+ yyt2 = YYCURSOR;
+ goto yy2220;
+ }
+ } else {
+ if (yych <= 'F') {
if (yych <= '?') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
+ }
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
+ }
+ goto yy2221;
+ } else {
+ if (yych <= 'Z') goto yy2055;
+ if (yych <= '^') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy2057;
}
}
} else {
- if (yych <= '~') {
- if (yych <= '_') {
- if (yych <= 'F') goto yy479;
- if (yych <= 'Z') goto yy3;
- if (yych <= '^') {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
+ if (yych <= 'f') goto yy2221;
+ goto yy2055;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= 0xC1) goto yy1650;
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1900;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy1902;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1903;
} else {
- if (yych <= '`') {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1650;
+ }
+ }
+ }
+yy2053:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '^') {
+ if (yych <= '5') {
+ if (yych <= '.') {
+ if (yych <= ',') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
+ }
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy2217;
}
- if (yych <= 'f') goto yy479;
- if (yych <= 'z') goto yy3;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy2218;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
+ }
+ if (yych <= '4') goto yy2222;
+ goto yy2223;
}
} else {
- if (yych <= 0xE0) {
+ if (yych <= '?') {
+ if (yych <= '9') goto yy2219;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2220;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ } else {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
+ }
+ if (yych <= 'F') goto yy2221;
+ if (yych <= 'Z') goto yy2055;
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ }
+ } else {
+ if (yych <= 0xC1) {
+ if (yych <= 'f') {
+ if (yych <= '_') {
+ yyt2 = YYCURSOR;
+ goto yy2057;
+ }
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2221;
+ } else {
+ if (yych <= 'z') goto yy2055;
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1892;
}
- if (yych <= 0xC1) goto yy5;
+ goto yy1650;
+ }
+ } else {
+ if (yych <= 0xEF) {
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy289;
+ goto yy1900;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1901;
}
yyt2 = YYCURSOR;
- goto yy290;
+ goto yy1902;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) {
- yyt2 = YYCURSOR;
- goto yy291;
- }
yyt2 = YYCURSOR;
- goto yy292;
- } else {
- if (yych <= 0xF3) {
- yyt2 = YYCURSOR;
- goto yy293;
- }
- if (yych <= 0xF4) {
- yyt2 = YYCURSOR;
- goto yy294;
- }
- goto yy5;
+ goto yy1903;
}
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1650;
}
}
}
-yy380:
- yyaccept = 0;
+yy2054:
+ yyaccept = 7;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '?') {
- if (yych <= 0x1F) {
- if (yych <= '\f') {
- if (yych <= 0x00) {
+ if (yych <= '_') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= ',') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 0x08) {
+ if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy2217;
}
- if (yych <= '\n') {
+ yyt2 = YYCURSOR;
+ goto yy2224;
+ } else {
+ if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy2128;
}
+ if (yych <= '9') goto yy2221;
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy2220;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '?') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
+ }
+ goto yy2221;
} else {
- if (yych <= '\r') {
+ if (yych <= 'Z') goto yy2055;
+ if (yych <= '^') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych == 0x1B) {
+ yyt2 = YYCURSOR;
+ goto yy2057;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
+ if (yych <= 'f') goto yy2221;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= 0xC1) goto yy1650;
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1900;
}
} else {
- if (yych <= '-') {
- if (yych == '$') {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1901;
}
- if (yych <= ',') {
+ if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1903;
} else {
- if (yych <= '/') {
- if (yych <= '.') {
- yyt2 = YYCURSOR;
- goto yy376;
- }
+ if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy284;
- } else {
- if (yych <= '9') goto yy480;
- if (yych <= ':') goto yy378;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1905;
+ }
+ goto yy1650;
+ }
+ }
+ }
+yy2055:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+yy2056:
+ if (yych <= '?') {
+ if (yych <= '.') {
+ if (yych <= ',') goto yy1650;
+ if (yych <= '-') goto yy2225;
+ goto yy1935;
+ } else {
+ if (yych <= '/') goto yy1731;
+ if (yych <= '9') goto yy2055;
+ if (yych <= ':') goto yy1786;
+ goto yy1650;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') goto yy1731;
+ if (yych <= 'Z') goto yy2055;
+ goto yy1650;
+ } else {
+ if (yych == '`') goto yy1650;
+ if (yych <= 'z') goto yy2055;
+ goto yy1650;
+ }
+ }
+yy2057:
+ yyaccept = 24;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'Z') {
+ if (yych <= ',') goto yy1893;
+ if (yych <= ':') goto yy2056;
+ if (yych <= '?') goto yy1893;
+ goto yy2056;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy1893;
+ goto yy2056;
+ } else {
+ if (yych <= '`') goto yy1893;
+ if (yych <= 'z') goto yy2056;
+ goto yy1893;
+ }
+ }
+yy2058:
+ yych = *++YYCURSOR;
+ if (yych == ' ') goto yy2226;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2226;
+ goto yy1682;
+yy2059:
+ yyaccept = 22;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == ' ') goto yy2226;
+ if (yych <= '/') goto yy1762;
+ if (yych <= '9') goto yy2226;
+ goto yy1762;
+yy2060:
+ yyaccept = 22;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= '.') goto yy1762;
+ if (yych <= '/') goto yy1873;
+ if (yych <= '9') goto yy1876;
+ goto yy1925;
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy1762;
+ goto yy1876;
+ } else {
+ if (yych <= '`') goto yy1762;
+ if (yych <= 'f') goto yy1876;
+ goto yy1762;
+ }
+ }
+yy2061:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy1761;
+ goto yy1697;
+ } else {
+ if (yych == '+') goto yy1697;
+ goto yy1761;
+ }
+ } else {
+ if (yych <= '.') {
+ if (yych <= '-') goto yy1729;
+ yyt3 = YYCURSOR;
+ goto yy1928;
+ } else {
+ if (yych <= '/') goto yy1731;
+ if (yych <= '9') goto yy2215;
+ yyt3 = YYCURSOR;
+ goto yy2227;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') {
+ if (yych <= '?') goto yy1761;
+ goto yy1737;
+ } else {
+ if (yych <= 'F') goto yy2215;
+ if (yych <= 'Z') goto yy1772;
+ goto yy1761;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych <= '_') goto yy1659;
+ goto yy1761;
+ } else {
+ if (yych <= 'f') goto yy2228;
+ if (yych >= '{') goto yy1761;
+ }
+ }
+ }
+yy2062:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ',') {
+ if (yych <= '!') {
+ if (yych <= '\f') {
+ if (yych <= 0x08) {
+ yyt3 = YYCURSOR;
+ goto yy1762;
+ }
+ if (yych <= '\n') {
+ yyt3 = YYCURSOR;
+ goto yy1918;
+ }
+ yyt3 = YYCURSOR;
+ goto yy1762;
+ } else {
+ if (yych <= '\r') {
+ yyt3 = YYCURSOR;
+ goto yy1918;
+ }
+ if (yych <= 0x1F) {
+ yyt3 = YYCURSOR;
+ goto yy1762;
+ }
+ if (yych <= ' ') {
+ yyt3 = YYCURSOR;
+ goto yy1918;
}
+ yyt3 = YYCURSOR;
+ goto yy1919;
+ }
+ } else {
+ if (yych <= '&') {
+ if (yych <= '"') {
+ yyt3 = YYCURSOR;
+ goto yy1918;
+ }
+ if (yych == '%') goto yy1697;
+ yyt3 = YYCURSOR;
+ goto yy1762;
+ } else {
+ if (yych <= '\'') goto yy1760;
+ if (yych <= '*') {
+ yyt3 = YYCURSOR;
+ goto yy1918;
+ }
+ if (yych <= '+') goto yy1697;
+ yyt3 = YYCURSOR;
+ goto yy1919;
}
}
} else {
- if (yych <= '~') {
+ if (yych <= '>') {
+ if (yych <= '/') {
+ if (yych <= '-') goto yy1729;
+ if (yych <= '.') {
+ yyt3 = YYCURSOR;
+ goto yy1928;
+ }
+ goto yy1731;
+ } else {
+ if (yych <= '9') goto yy1772;
+ if (yych <= ':') {
+ yyt3 = YYCURSOR;
+ goto yy1932;
+ }
+ if (yych <= ';') {
+ yyt3 = YYCURSOR;
+ goto yy1918;
+ }
+ yyt3 = YYCURSOR;
+ goto yy1762;
+ }
+ } else {
if (yych <= '^') {
- if (yych <= '@') {
+ if (yych <= '?') {
+ yyt3 = YYCURSOR;
+ goto yy1919;
+ }
+ if (yych <= '@') goto yy1737;
+ if (yych <= 'Z') goto yy1772;
+ yyt3 = YYCURSOR;
+ goto yy1762;
+ } else {
+ if (yych <= '_') goto yy1659;
+ if (yych <= '`') {
+ yyt3 = YYCURSOR;
+ goto yy1762;
+ }
+ if (yych <= 'z') goto yy2062;
+ yyt3 = YYCURSOR;
+ goto yy1762;
+ }
+ }
+ }
+yy2063:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == 'E') goto yy2067;
+ goto yy1773;
+yy2064:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy1761;
+ goto yy1697;
+ } else {
+ if (yych == '+') goto yy1697;
+ goto yy1761;
+ }
+ } else {
+ if (yych <= '.') {
+ if (yych <= '-') goto yy1729;
+ yyt3 = YYCURSOR;
+ goto yy1928;
+ } else {
+ if (yych <= '/') goto yy1731;
+ if (yych <= '9') goto yy1772;
+ yyt3 = YYCURSOR;
+ goto yy1932;
+ }
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= '@') {
+ if (yych <= '?') goto yy1761;
+ goto yy1737;
+ } else {
+ if (yych <= 'Z') goto yy1772;
+ if (yych <= '^') goto yy1761;
+ goto yy1659;
+ }
+ } else {
+ if (yych <= 'd') {
+ if (yych <= '`') goto yy1761;
+ goto yy2062;
+ } else {
+ if (yych <= 'e') goto yy2069;
+ if (yych <= 'z') goto yy2062;
+ goto yy1761;
+ }
+ }
+ }
+yy2065:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+yy2066:
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= ',') goto yy1650;
+ if (yych <= '-') goto yy2065;
+ goto yy2214;
+ } else {
+ if (yych <= '/') goto yy1650;
+ if (yych <= '9') goto yy2065;
+ goto yy2047;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') goto yy1650;
+ if (yych <= 'Z') goto yy2065;
+ goto yy1650;
+ } else {
+ if (yych == '`') goto yy1650;
+ if (yych <= 'z') goto yy2065;
+ goto yy1650;
+ }
+ }
+yy2067:
+ yyaccept = 26;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '+') {
+ if (yych <= ' ') {
+ if (yych <= '\f') {
+ if (yych <= 0x08) {
+ yyt1 = YYCURSOR;
+ goto yy2068;
+ }
+ if (yych <= '\n') {
+ yyt1 = YYCURSOR;
+ goto yy2229;
+ }
+ yyt1 = YYCURSOR;
+ } else {
+ if (yych <= '\r') {
+ yyt1 = YYCURSOR;
+ goto yy2229;
+ }
+ if (yych >= ' ') {
+ yyt1 = YYCURSOR;
+ goto yy2229;
+ }
+ yyt1 = YYCURSOR;
+ }
+ } else {
+ if (yych <= '$') {
+ if (yych <= '!') {
+ yyt1 = YYCURSOR;
+ goto yy2230;
+ }
+ if (yych <= '"') {
+ yyt1 = YYCURSOR;
+ goto yy2229;
+ }
+ yyt1 = YYCURSOR;
+ } else {
+ if (yych <= '%') goto yy1773;
+ if (yych <= '&') {
+ yyt1 = YYCURSOR;
+ goto yy2068;
+ }
+ if (yych <= '*') {
+ yyt1 = YYCURSOR;
+ goto yy2229;
+ }
+ goto yy1773;
+ }
+ }
+ } else {
+ if (yych <= '>') {
+ if (yych <= '.') {
+ if (yych <= ',') {
+ yyt1 = YYCURSOR;
+ goto yy2230;
+ }
+ if (yych <= '-') goto yy1773;
+ yyt1 = YYCURSOR;
+ goto yy2231;
+ } else {
+ if (yych <= '9') goto yy1773;
+ if (yych <= ':') {
+ yyt1 = YYCURSOR;
+ goto yy2232;
+ }
+ if (yych <= ';') {
+ yyt1 = YYCURSOR;
+ goto yy2229;
+ }
+ yyt1 = YYCURSOR;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '?') {
+ yyt1 = YYCURSOR;
+ goto yy2230;
+ }
+ if (yych <= 'Z') goto yy1773;
+ yyt1 = YYCURSOR;
+ } else {
+ if (yych == '`') {
+ yyt1 = YYCURSOR;
+ goto yy2068;
+ }
+ if (yych <= 'z') goto yy1773;
+ yyt1 = YYCURSOR;
+ }
+ }
+ }
+yy2068:
+ YYCURSOR = yyt1;
+#line 447 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_CONSTANT); }
+#line 54097 "../../lnav/src/data_scanner_re.cc"
+yy2069:
+ yyaccept = 26;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '+') {
+ if (yych <= '!') {
+ if (yych <= '\f') {
+ if (yych <= 0x08) {
+ yyt1 = YYCURSOR;
+ goto yy2068;
+ }
+ if (yych <= '\n') {
+ yyt1 = YYCURSOR;
+ goto yy2229;
+ }
+ yyt1 = YYCURSOR;
+ goto yy2068;
+ } else {
+ if (yych <= '\r') {
+ yyt1 = YYCURSOR;
+ goto yy2229;
+ }
+ if (yych <= 0x1F) {
+ yyt1 = YYCURSOR;
+ goto yy2068;
+ }
+ if (yych <= ' ') {
+ yyt1 = YYCURSOR;
+ goto yy2229;
+ }
+ yyt1 = YYCURSOR;
+ goto yy2230;
+ }
+ } else {
+ if (yych <= '%') {
+ if (yych <= '"') {
+ yyt1 = YYCURSOR;
+ goto yy2229;
+ }
+ if (yych <= '$') {
+ yyt1 = YYCURSOR;
+ goto yy2068;
+ }
+ goto yy1773;
+ } else {
+ if (yych <= '&') {
+ yyt1 = YYCURSOR;
+ goto yy2068;
+ }
+ if (yych <= '\'') {
+ yyt1 = YYCURSOR;
+ goto yy2233;
+ }
+ if (yych <= '*') {
+ yyt1 = YYCURSOR;
+ goto yy2229;
+ }
+ goto yy1773;
+ }
+ }
+ } else {
+ if (yych <= '>') {
+ if (yych <= '.') {
+ if (yych <= ',') {
+ yyt1 = YYCURSOR;
+ goto yy2230;
+ }
+ if (yych <= '-') goto yy1773;
+ yyt1 = YYCURSOR;
+ goto yy2231;
+ } else {
+ if (yych <= '9') goto yy1773;
+ if (yych <= ':') {
+ yyt1 = YYCURSOR;
+ goto yy2232;
+ }
+ if (yych <= ';') {
+ yyt1 = YYCURSOR;
+ goto yy2229;
+ }
+ yyt1 = YYCURSOR;
+ goto yy2068;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '?') {
+ yyt1 = YYCURSOR;
+ goto yy2230;
+ }
+ if (yych <= 'Z') goto yy1773;
+ yyt1 = YYCURSOR;
+ goto yy2068;
+ } else {
+ if (yych <= '_') goto yy1773;
+ if (yych <= '`') {
+ yyt1 = YYCURSOR;
+ goto yy2068;
+ }
+ if (yych <= 'z') goto yy2062;
+ yyt1 = YYCURSOR;
+ goto yy2068;
+ }
+ }
+ }
+yy2070:
+ yych = *++YYCURSOR;
+ if (yych <= '\f') {
+ if (yych == '\t') goto yy1918;
+ goto yy1806;
+ } else {
+ if (yych <= '\r') goto yy1918;
+ if (yych == ' ') goto yy1918;
+ goto yy1806;
+ }
+yy2071:
+ yyaccept = 17;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[768+yych] & 4) {
+ goto yy1943;
+ }
+ if (yych <= '"') {
+ if (yych <= 0x15) {
+ if (yych <= '\t') {
+ if (yych <= 0x00) goto yy1808;
+ if (yych <= 0x08) goto yy1701;
+ yyt3 = YYCURSOR;
+ goto yy1939;
+ } else {
+ if (yych <= '\n') {
+ yyt3 = YYCURSOR;
+ goto yy1918;
+ }
+ if (yych == '\r') {
+ yyt3 = YYCURSOR;
+ goto yy1939;
+ }
+ goto yy1701;
+ }
+ } else {
+ if (yych <= 0x1B) {
+ if (yych <= 0x16) goto yy1808;
+ if (yych <= 0x1A) goto yy1701;
+ goto yy1808;
+ } else {
+ if (yych <= 0x1F) goto yy1701;
+ if (yych == '!') {
+ yyt3 = YYCURSOR;
+ goto yy1940;
+ }
+ yyt3 = YYCURSOR;
+ goto yy1939;
+ }
+ }
+ } else {
+ if (yych <= '.') {
+ if (yych <= '*') {
+ if (yych <= '&') goto yy1701;
+ if (yych <= '\'') goto yy2073;
+ yyt3 = YYCURSOR;
+ goto yy1939;
+ } else {
+ if (yych == ',') {
+ yyt3 = YYCURSOR;
+ goto yy1940;
+ }
+ if (yych <= '-') goto yy1701;
+ yyt3 = YYCURSOR;
+ goto yy1942;
+ }
+ } else {
+ if (yych <= '?') {
+ if (yych <= '9') goto yy1701;
+ if (yych <= ';') {
+ yyt3 = YYCURSOR;
+ goto yy1939;
+ }
+ if (yych <= '>') goto yy1701;
+ yyt3 = YYCURSOR;
+ goto yy1940;
+ } else {
+ if (yych <= 0x7F) goto yy1701;
+ if (yych <= 0xC1) goto yy1808;
+ if (yych <= 0xF4) goto yy1701;
+ goto yy1808;
+ }
+ }
+ }
+yy2072:
+ yyaccept = 23;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '+') {
+ if (yych <= '\r') {
+ if (yych <= 0x08) goto yy1806;
+ if (yych <= '\n') goto yy1761;
+ if (yych <= '\f') goto yy1806;
+ goto yy1761;
+ } else {
+ if (yych <= '"') {
+ if (yych <= 0x1F) goto yy1806;
+ goto yy1761;
+ } else {
+ if (yych <= '&') goto yy1806;
+ if (yych <= '*') goto yy1761;
+ goto yy1806;
+ }
+ }
+ } else {
+ if (yych <= ';') {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy1761;
+ goto yy1806;
+ } else {
+ if (yych <= '.') goto yy1761;
+ if (yych <= '9') goto yy1806;
+ goto yy1761;
+ }
+ } else {
+ if (yych <= '?') {
+ if (yych <= '>') goto yy1806;
+ goto yy1761;
+ } else {
+ if (yych <= '`') goto yy1806;
+ if (yych <= 'z') goto yy1761;
+ goto yy1806;
+ }
+ }
+ }
+yy2073:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'S') {
+ if (yych <= ',') {
+ if (yych <= '&') {
+ if (yych == '!') {
+ yyt1 = yyt3 = YYCURSOR;
+ goto yy2070;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1805;
+ } else {
+ if (yych <= '\'') {
+ yyt1 = YYCURSOR;
+ goto yy2234;
+ }
+ if (yych <= '+') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1805;
+ }
+ yyt1 = yyt3 = YYCURSOR;
+ goto yy2070;
+ }
+ } else {
+ if (yych <= '>') {
+ if (yych == '.') {
+ yyt1 = yyt3 = YYCURSOR;
+ goto yy2070;
}
- if (yych <= 'F') goto yy479;
- if (yych <= 'Z') goto yy3;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1805;
} else {
+ if (yych <= '?') {
+ yyt1 = yyt3 = YYCURSOR;
+ goto yy2070;
+ }
+ if (yych <= 'R') {
+ yyt2 = YYCURSOR;
+ goto yy1805;
+ }
+ yyt3 = YYCURSOR;
+ goto yy1762;
+ }
+ }
+ } else {
+ if (yych <= 0xC1) {
+ if (yych <= 's') {
if (yych <= '`') {
- if (yych <= '_') {
- yyt2 = YYCURSOR;
- goto yy284;
- }
yyt2 = YYCURSOR;
- goto yy198;
- } else {
- if (yych <= 'f') goto yy479;
- if (yych <= 'z') goto yy3;
+ goto yy1805;
+ }
+ if (yych <= 'r') {
+ yyt1 = YYCURSOR;
+ goto yy2072;
+ }
+ goto yy1760;
+ } else {
+ if (yych <= 'z') {
+ yyt1 = YYCURSOR;
+ goto yy2072;
+ }
+ if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1805;
}
+ yyt3 = YYCURSOR;
+ goto yy1762;
}
} else {
- if (yych <= 0xE0) {
- if (yych <= 0x7F) {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1809;
}
- if (yych <= 0xC1) goto yy5;
- if (yych <= 0xDF) {
+ if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy289;
+ goto yy1810;
}
yyt2 = YYCURSOR;
- goto yy290;
+ goto yy1811;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) {
- yyt2 = YYCURSOR;
- goto yy291;
- }
yyt2 = YYCURSOR;
- goto yy292;
- } else {
- if (yych <= 0xF3) {
- yyt2 = YYCURSOR;
- goto yy293;
- }
- if (yych <= 0xF4) {
- yyt2 = YYCURSOR;
- goto yy294;
- }
- goto yy5;
+ goto yy1812;
}
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1813;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1814;
+ }
+ yyt3 = YYCURSOR;
+ goto yy1762;
}
}
}
-yy381:
- yyaccept = 0;
+yy2074:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '\'') goto yy1760;
+ if (yych <= '`') goto yy1746;
+ if (yych <= 'z') goto yy2235;
+ goto yy1746;
+yy2075:
+ yych = *++YYCURSOR;
+ if (yych <= 0xDF) {
+ if (yych <= ':') {
+ if (yych <= '9') {
+ yyt1 = YYCURSOR;
+ goto yy2236;
+ }
+ } else {
+ if (yych <= 0x7F) {
+ yyt1 = YYCURSOR;
+ goto yy2236;
+ }
+ if (yych <= 0xC1) goto yy1682;
+ yyt1 = YYCURSOR;
+ goto yy2238;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt1 = YYCURSOR;
+ goto yy2239;
+ }
+ if (yych <= 0xEF) {
+ yyt1 = YYCURSOR;
+ goto yy2240;
+ }
+ yyt1 = YYCURSOR;
+ goto yy2241;
+ } else {
+ if (yych <= 0xF3) {
+ yyt1 = YYCURSOR;
+ goto yy2242;
+ }
+ if (yych <= 0xF4) {
+ yyt1 = YYCURSOR;
+ goto yy2243;
+ }
+ goto yy1682;
+ }
+ }
+yy2076:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2244;
+ goto yy1682;
+yy2077:
+ yych = *++YYCURSOR;
+ if (yych == '=') goto yy2077;
+ if (yych != ']') goto yy1682;
+yy2078:
+ ++YYCURSOR;
+#line 259 "../../lnav/src/data_scanner_re.re"
+ {
+ CAPTURE(DT_COMMENT);
+ if (tf == text_format_t::TF_DIFF) {
+ auto sf = this->to_string_fragment(cap_all);
+ auto split_res = sf.split_when(string_fragment::tag1{'\n'});
+ cap_all.c_end = split_res.first.sf_end;
+ cap_inner.c_end = split_res.first.sf_end;
+ this->ds_next_offset = cap_all.c_end;
+ }
+ return tokenize_result{token_out, cap_all, cap_inner, this->ds_input.data()};
+ }
+#line 54494 "../../lnav/src/data_scanner_re.cc"
+yy2079:
+ yyaccept = 27;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[768+yych] & 8) {
+ goto yy1955;
+ }
+ if (yych <= '9') {
+ if (yych == '-') goto yy1802;
+ if (yych >= '0') goto yy1802;
+ } else {
+ if (yych <= 'Z') {
+ if (yych >= 'A') goto yy2079;
+ } else {
+ if (yych <= '`') goto yy2080;
+ if (yych <= 'z') goto yy2079;
+ }
+ }
+yy2080:
+#line 445 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_EMAIL); }
+#line 54515 "../../lnav/src/data_scanner_re.cc"
+yy2081:
+ yyaccept = 21;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '/') {
+ if (yych <= '*') {
+ if (yych == '%') goto yy1698;
+ goto yy1861;
+ } else {
+ if (yych == ',') goto yy1861;
+ if (yych <= '.') goto yy1698;
+ goto yy1861;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '9') goto yy1698;
+ if (yych <= '?') goto yy1861;
+ if (yych <= 'Z') goto yy1698;
+ goto yy1861;
+ } else {
+ if (yych == '`') goto yy1861;
+ if (yych <= 'z') goto yy1698;
+ goto yy1861;
+ }
+ }
+yy2082:
+ yych = *++YYCURSOR;
+ if (yych == '+') goto yy2102;
+ if (yych == '-') goto yy2102;
+ goto yy1698;
+yy2083:
+ yych = *++YYCURSOR;
+ if (yych <= 'a') {
+ if (yych == 'B') goto yy2081;
+ goto yy1698;
+ } else {
+ if (yych <= 'b') goto yy2081;
+ if (yych == 'i') goto yy2245;
+ goto yy1698;
+ }
+yy2084:
+ yyaccept = 21;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'R') {
+ if (yych <= '.') {
+ if (yych <= '*') {
+ if (yych == '%') goto yy1698;
+ goto yy1861;
+ } else {
+ if (yych == ',') goto yy1861;
+ goto yy1698;
+ }
+ } else {
+ if (yych <= '?') {
+ if (yych <= '/') goto yy1861;
+ if (yych <= '9') goto yy1698;
+ goto yy1861;
+ } else {
+ if (yych == 'B') goto yy2081;
+ goto yy1698;
+ }
+ }
+ } else {
+ if (yych <= 'a') {
+ if (yych <= '^') {
+ if (yych <= 'S') goto yy2081;
+ if (yych <= 'Z') goto yy1698;
+ goto yy1861;
+ } else {
+ if (yych == '`') goto yy1861;
+ goto yy1698;
+ }
+ } else {
+ if (yych <= 'i') {
+ if (yych <= 'b') goto yy2081;
+ if (yych <= 'h') goto yy1698;
+ goto yy2246;
+ } else {
+ if (yych == 's') goto yy2081;
+ if (yych <= 'z') goto yy1698;
+ goto yy1861;
+ }
+ }
+ }
+yy2085:
+ yych = *++YYCURSOR;
+ if (yych == 'S') goto yy2081;
+ if (yych == 's') goto yy2081;
+ goto yy1698;
+yy2086:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ switch (yych) {
+ case '%':
+ case '+':
+ case '-':
+ case '.':
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy1697;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy2086;
+ case '@': goto yy1699;
+ case 'B':
+ case 'S':
+ case 'b':
+ case 's': goto yy2148;
+ case 'E':
+ case 'e': goto yy2247;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy2149;
+ case 'm': goto yy2150;
+ case 'p':
+ case 'u': goto yy2151;
+ default: goto yy1635;
+ }
+yy2087:
+ yych = *++YYCURSOR;
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ if (yych <= '9') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1727;
+ if (yych <= '*') goto yy1682;
+ goto yy1697;
+ } else {
+ if (yych <= ',') goto yy1682;
+ if (yych <= '.') goto yy1697;
+ if (yych <= '/') goto yy1682;
+ goto yy2087;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '?') goto yy1682;
+ if (yych <= '@') goto yy1699;
+ if (yych <= 'Z') goto yy1697;
+ goto yy1682;
+ } else {
+ if (yych == '`') goto yy1682;
+ if (yych <= 'z') goto yy1697;
+ goto yy1682;
+ }
+ }
+yy2088:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ switch (yych) {
+ case '%': goto yy1727;
+ case '+':
+ case '-':
+ case '.':
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy1697;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy2088;
+ case '@': goto yy1699;
+ case 'B':
+ case 'S':
+ case 'b':
+ case 's': goto yy2148;
+ case 'E':
+ case 'e': goto yy2247;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy2149;
+ case 'm': goto yy2150;
+ case 'p':
+ case 'u': goto yy2151;
+ default: goto yy1635;
+ }
+yy2089:
+ yych = *++YYCURSOR;
+ if (yych <= 0xC1) {
+ if (yych <= '*') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= ')') goto yy1850;
+ goto yy2089;
+ } else {
+ if (yych == '/') goto yy2248;
+ if (yych <= 0x7F) goto yy1850;
+ goto yy1682;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy1852;
+ if (yych <= 0xE0) goto yy1853;
+ goto yy1854;
+ } else {
+ if (yych <= 0xF0) goto yy1855;
+ if (yych <= 0xF3) goto yy1856;
+ if (yych <= 0xF4) goto yy1857;
+ goto yy1682;
+ }
+ }
+yy2090:
+ ++YYCURSOR;
+ goto yy1967;
+yy2091:
+ yyaccept = 28;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[1280+yych] & 128) {
+ goto yy1723;
+ }
+ if (yych <= 0xDF) {
+ if (yych <= '*') {
+ if (yych <= 0x00) goto yy1967;
+ if (yych <= '\'') goto yy1850;
+ goto yy1851;
+ } else {
+ if (yych <= 0x7F) goto yy1850;
+ if (yych <= 0xC1) goto yy1967;
+ goto yy1852;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy1853;
+ if (yych <= 0xEF) goto yy1854;
+ goto yy1855;
+ } else {
+ if (yych <= 0xF3) goto yy1856;
+ if (yych <= 0xF4) goto yy1857;
+ goto yy1967;
+ }
+ }
+yy2092:
+ yych = *++YYCURSOR;
+ if (yych == 'r') goto yy2249;
+ goto yy1722;
+yy2093:
+ yyaccept = 29;
+ yych = *(YYMARKER = ++YYCURSOR);
+yy2094:
+ if (yych <= '9') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1697;
+ if (yych >= '+') goto yy1697;
+ } else {
+ if (yych <= ',') goto yy2095;
+ if (yych <= '.') goto yy1729;
+ if (yych <= '/') goto yy1731;
+ goto yy2093;
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= ':') goto yy1881;
+ if (yych <= '?') goto yy2095;
+ if (yych <= '@') goto yy1737;
+ goto yy2093;
+ } else {
+ if (yych <= '_') {
+ if (yych >= '_') goto yy2093;
+ } else {
+ if (yych <= '`') goto yy2095;
+ if (yych <= 'z') goto yy2093;
+ }
+ }
+ }
+yy2095:
+#line 419 "../../lnav/src/data_scanner_re.re"
+ {
+ RET(DT_VERSION_NUMBER);
+ }
+#line 54875 "../../lnav/src/data_scanner_re.cc"
+yy2096:
+ yyaccept = 29;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '.') goto yy2250;
+ if (yych <= '/') goto yy2253;
+ if (yych <= '9') goto yy2251;
+ goto yy2253;
+yy2097:
+ yyaccept = 29;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '.') goto yy2250;
+ if (yych <= '/') goto yy2253;
+ if (yych <= '9') goto yy2096;
+ goto yy2253;
+yy2098:
+ yyaccept = 29;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '/') {
+ if (yych == '.') goto yy2250;
+ goto yy2253;
+ } else {
+ if (yych <= '4') goto yy2096;
+ if (yych <= '5') goto yy2254;
+ if (yych <= '9') goto yy2251;
+ goto yy2253;
+ }
+yy2099:
+ yyaccept = 21;
+ yych = *(YYMARKER = ++YYCURSOR);
+yy2100:
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ switch (yych) {
+ case '%': goto yy1727;
+ case '+': goto yy1697;
+ case '-': goto yy1969;
+ case '.': goto yy2101;
+ case '/': goto yy1731;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy2099;
+ case ':': goto yy1881;
+ case '@': goto yy1737;
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy1972;
+ case 'B':
+ case 'S':
+ case 'b':
+ case 's': goto yy1974;
+ case 'E':
+ case 'e': goto yy1975;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy1976;
+ case 'm': goto yy1977;
+ case 'p':
+ case 'u': goto yy1978;
+ default: goto yy1861;
+ }
+yy2101:
+ yych = *++YYCURSOR;
+ if (yych <= '9') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1697;
+ if (yych <= '*') goto yy1682;
+ goto yy1697;
+ } else {
+ if (yych <= ',') goto yy1682;
+ if (yych <= '.') goto yy1697;
+ if (yych <= '/') goto yy1682;
+ goto yy2252;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '?') goto yy1682;
+ if (yych <= '@') goto yy1699;
+ if (yych <= 'Z') goto yy1745;
+ goto yy1682;
+ } else {
+ if (yych == '`') goto yy1682;
+ if (yych <= 'z') goto yy1745;
+ goto yy1682;
+ }
+ }
+yy2102:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy1698;
+ if (yych <= '9') goto yy2255;
+ goto yy1698;
+yy2103:
+ yych = *++YYCURSOR;
+ if (yych <= 'Z') {
+ if (yych <= '/') goto yy1698;
+ if (yych <= '9') goto yy2256;
+ if (yych <= '@') goto yy1698;
+ goto yy2093;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy1698;
+ goto yy2093;
+ } else {
+ if (yych <= '`') goto yy1698;
+ if (yych <= 'z') goto yy2093;
+ goto yy1698;
+ }
+ }
+yy2104:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == 'B') goto yy1974;
+ if (yych == 'b') goto yy1974;
+ goto yy1973;
+yy2105:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'a') {
+ if (yych == 'B') goto yy1974;
+ goto yy1973;
+ } else {
+ if (yych <= 'b') goto yy1974;
+ if (yych == 'n') goto yy1974;
+ goto yy1973;
+ }
+yy2106:
+ yyaccept = 30;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '9') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1697;
+ if (yych >= '+') goto yy1697;
+ } else {
+ if (yych <= '-') {
+ if (yych >= '-') goto yy1866;
+ } else {
+ if (yych <= '.') goto yy1729;
+ if (yych <= '/') goto yy1731;
+ goto yy1745;
+ }
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= ':') goto yy2257;
+ if (yych <= '?') goto yy2107;
+ if (yych <= '@') goto yy1737;
+ goto yy1745;
+ } else {
+ if (yych <= '_') {
+ if (yych >= '_') goto yy1745;
+ } else {
+ if (yych <= '`') goto yy2107;
+ if (yych <= 'z') goto yy1745;
+ }
+ }
+ }
+yy2107:
+#line 296 "../../lnav/src/data_scanner_re.re"
+ {
+ if ((YYCURSOR.val - (this->ds_input.udata() + this->ds_next_offset)) == 17) {
+ RET(DT_MAC_ADDRESS);
+ } else {
+ RET(DT_HEX_DUMP);
+ }
+ }
+#line 55086 "../../lnav/src/data_scanner_re.cc"
+yy2108:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '.') goto yy1970;
+ goto yy2112;
+yy2109:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '.') goto yy1970;
+ if (yych <= '/') goto yy2112;
+ if (yych <= '5') goto yy2108;
+ goto yy2112;
+yy2110:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') goto yy1865;
+ if (yych <= 'Z') goto yy2258;
+ if (yych <= '`') goto yy1865;
+ if (yych <= 'z') goto yy2258;
+ goto yy1865;
+yy2111:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+yy2112:
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ if (yych <= '9') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1727;
+ if (yych <= '*') goto yy1741;
+ goto yy1697;
+ } else {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy1741;
+ goto yy1969;
+ } else {
+ if (yych <= '.') goto yy2101;
+ if (yych <= '/') goto yy1731;
+ goto yy2111;
+ }
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= ':') goto yy1881;
+ if (yych <= '?') goto yy1741;
+ if (yych <= '@') goto yy1737;
+ goto yy1972;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy1741;
+ goto yy1972;
+ } else {
+ if (yych <= '`') goto yy1741;
+ if (yych <= 'z') goto yy1972;
+ goto yy1741;
+ }
+ }
+ }
+yy2113:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy1726;
+ if (yych <= '9') goto yy2259;
+ goto yy1726;
+yy2114:
+ yych = *++YYCURSOR;
+ if (yych <= 'Z') {
+ if (yych <= '/') goto yy1698;
+ if (yych <= '9') goto yy2260;
+ if (yych <= '@') goto yy1698;
+ goto yy1745;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy1698;
+ goto yy1745;
+ } else {
+ if (yych <= '`') goto yy1698;
+ if (yych <= 'z') goto yy1745;
+ goto yy1698;
+ }
+ }
+yy2115:
+ yych = *++YYCURSOR;
+ if (yych <= 'Z') {
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2261;
+ if (yych <= '@') goto yy1682;
+ goto yy1864;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy1682;
+ goto yy1864;
+ } else {
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'z') goto yy1864;
+ goto yy1682;
+ }
+ }
+yy2116:
+ yyaccept = 11;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ if (yych <= '9') {
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy1733;
+ goto yy1727;
+ } else {
+ if (yych == '+') goto yy1697;
+ goto yy1733;
+ }
+ } else {
+ if (yych <= '.') {
+ if (yych <= '-') goto yy1729;
+ goto yy1985;
+ } else {
+ if (yych <= '/') goto yy1731;
+ if (yych <= '7') goto yy2262;
+ goto yy2263;
+ }
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '?') {
+ if (yych <= ':') goto yy1879;
+ goto yy1733;
+ } else {
+ if (yych <= '@') goto yy1737;
+ if (yych <= 'F') goto yy2264;
+ goto yy1742;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych == '_') goto yy1745;
+ goto yy1733;
+ } else {
+ if (yych <= 'f') goto yy2264;
+ if (yych <= 'z') goto yy1742;
+ goto yy1733;
+ }
+ }
+ }
+yy2117:
+ yyaccept = 12;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ if (yych <= ':') {
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy1735;
+ goto yy1727;
+ } else {
+ if (yych == '+') goto yy1697;
+ goto yy1735;
+ }
+ } else {
+ if (yych <= '.') {
+ if (yych <= '-') goto yy1729;
+ goto yy1985;
+ } else {
+ if (yych <= '/') goto yy1731;
+ if (yych <= '9') goto yy2263;
+ goto yy1879;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') {
+ if (yych <= '?') goto yy1735;
+ goto yy1737;
+ } else {
+ if (yych <= 'F') goto yy2264;
+ if (yych <= 'Z') goto yy1742;
+ goto yy1735;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych <= '_') goto yy1745;
+ goto yy1735;
+ } else {
+ if (yych <= 'f') goto yy2264;
+ if (yych <= 'z') goto yy1742;
+ goto yy1735;
+ }
+ }
+ }
+yy2118:
+ yych = *++YYCURSOR;
+ if (yych <= '9') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy1682;
+ goto yy2265;
+ } else {
+ if (yych <= '.') goto yy1682;
+ if (yych <= '/') goto yy1873;
+ goto yy1876;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= ':') goto yy2266;
+ if (yych <= '@') goto yy1682;
+ goto yy1876;
+ } else {
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy1876;
+ goto yy1682;
+ }
+ }
+yy2119:
+ yyaccept = 12;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '?') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1743;
+ if (yych <= '*') goto yy1735;
+ goto yy1743;
+ } else {
+ if (yych <= '/') {
+ if (yych <= ',') goto yy1735;
+ goto yy1743;
+ } else {
+ if (yych <= '9') goto yy2264;
+ if (yych <= ':') goto yy1743;
+ goto yy1735;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') goto yy1743;
+ if (yych <= 'F') goto yy2264;
+ if (yych <= 'Z') goto yy1743;
+ goto yy1735;
+ } else {
+ if (yych <= '`') {
+ if (yych <= '_') goto yy1743;
+ goto yy1735;
+ } else {
+ if (yych <= 'f') goto yy2264;
+ if (yych <= 'z') goto yy1743;
+ goto yy1735;
+ }
+ }
+ }
+yy2120:
+ yyaccept = 30;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'f') {
+ if (yych <= '9') {
+ if (yych == '-') {
+ yyt1 = YYCURSOR;
+ goto yy2267;
+ }
+ if (yych <= '/') {
+ yyt1 = YYCURSOR;
+ goto yy2236;
+ }
+ yyt1 = YYCURSOR;
+ goto yy2268;
+ } else {
+ if (yych <= '@') {
+ if (yych <= ':') goto yy2269;
+ yyt1 = YYCURSOR;
+ goto yy2236;
+ } else {
+ if (yych <= 'F') {
+ yyt1 = YYCURSOR;
+ goto yy2268;
+ }
+ if (yych <= '`') {
+ yyt1 = YYCURSOR;
+ goto yy2236;
+ }
+ yyt1 = YYCURSOR;
+ goto yy2268;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ yyt1 = YYCURSOR;
+ goto yy2236;
+ }
+ if (yych <= 0xC1) goto yy2107;
+ if (yych <= 0xDF) {
+ yyt1 = YYCURSOR;
+ goto yy2238;
+ }
+ yyt1 = YYCURSOR;
+ goto yy2239;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt1 = YYCURSOR;
+ goto yy2240;
+ }
+ yyt1 = YYCURSOR;
+ goto yy2241;
+ } else {
+ if (yych <= 0xF3) {
+ yyt1 = YYCURSOR;
+ goto yy2242;
+ }
+ if (yych <= 0xF4) {
+ yyt1 = YYCURSOR;
+ goto yy2243;
+ }
+ goto yy2107;
+ }
+ }
+ }
+yy2121:
+ yyaccept = 30;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy2107;
+ goto yy2270;
+ } else {
+ if (yych <= '/') goto yy2107;
+ if (yych <= '9') goto yy2124;
+ goto yy2271;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy2107;
+ goto yy2124;
+ } else {
+ if (yych <= '`') goto yy2107;
+ if (yych <= 'f') goto yy2124;
+ goto yy2107;
+ }
+ }
+yy2122:
+ yyaccept = 31;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[768+yych] & 32) {
+ goto yy1992;
+ }
+ if (yych <= 0xC1) {
+ if (yych <= ')') {
+ if (yych <= '"') goto yy2123;
+ if (yych <= '&') goto yy2122;
+ } else {
+ if (yych <= 'Z') goto yy2122;
+ if (yych <= ']') goto yy2123;
+ if (yych <= 'z') goto yy2122;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy1994;
+ if (yych <= 0xE0) goto yy1995;
+ goto yy1996;
+ } else {
+ if (yych <= 0xF0) goto yy1997;
+ if (yych <= 0xF3) goto yy1998;
+ if (yych <= 0xF4) goto yy1999;
+ }
+ }
+yy2123:
+#line 292 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_URL); }
+#line 55452 "../../lnav/src/data_scanner_re.cc"
+yy2124:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2272;
+ if (yych <= ':') goto yy2001;
+ goto yy1682;
+ } else {
+ if (yych <= 'F') goto yy2272;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2272;
+ goto yy1682;
+ }
+yy2125:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2273;
+ if (yych <= ':') goto yy2127;
+ goto yy1682;
+ } else {
+ if (yych <= 'F') goto yy2126;
+ if (yych <= '`') goto yy1682;
+ if (yych >= 'g') goto yy1682;
+ }
+yy2126:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2274;
+ if (yych <= ':') goto yy2275;
+ goto yy1682;
+ } else {
+ if (yych <= 'F') goto yy2274;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2274;
+ goto yy1682;
+ }
+yy2127:
+ yych = *++YYCURSOR;
+ if (yych <= '`') {
+ if (yych <= '9') {
+ if (yych <= '0') {
+ if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 0x08) {
+ goto yy2276;
+ } else {
+ if (yych <= '1') goto yy2277;
+ if (yych <= '2') goto yy2278;
+ goto yy2276;
+ }
+ } else {
+ if (yych <= '@') {
+ if (yych <= ':') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1897;
}
- if (yych <= '\n') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ } else {
+ if (yych <= 'F') goto yy2279;
+ if (yych <= 'Z') goto yy1682;
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= 'f') goto yy2279;
+ goto yy1682;
+ } else {
+ if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
+ if (yych <= 0xC1) goto yy1682;
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1900;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy1902;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1903;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') {
- yyt2 = YYCURSOR;
- goto yy198;
- }
+ if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy284;
- } else {
- if (yych <= 0x1B) {
- yyt2 = YYCURSOR;
- goto yy198;
- }
- if (yych <= 0x1F) {
- yyt2 = YYCURSOR;
- goto yy284;
- }
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1905;
}
+ goto yy1682;
}
+ }
+ }
+yy2128:
+ yych = *++YYCURSOR;
+ if (yych <= 'Z') {
+ if (yych <= '/') goto yy1893;
+ if (yych <= '9') goto yy1864;
+ if (yych <= '@') goto yy1893;
+ goto yy1864;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy1893;
+ goto yy1864;
} else {
+ if (yych <= '`') goto yy1893;
+ if (yych <= 'z') goto yy1864;
+ goto yy1893;
+ }
+ }
+yy2129:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '1') {
+ if (yych <= '/') goto yy1893;
+ if (yych <= '0') goto yy2280;
+ goto yy2281;
+ } else {
+ if (yych <= '2') goto yy2282;
+ if (yych <= '9') goto yy2280;
+ goto yy1893;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy1864;
+ if (yych <= '^') goto yy1893;
+ goto yy1864;
+ } else {
+ if (yych <= '`') goto yy1893;
+ if (yych <= 'z') goto yy1864;
+ goto yy1893;
+ }
+ }
+yy2130:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '_') {
+ if (yych <= ':') {
if (yych <= '.') {
- if (yych <= '$') {
- yyt2 = YYCURSOR;
- goto yy284;
- }
if (yych <= ',') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy2128;
}
yyt2 = YYCURSOR;
- goto yy376;
+ goto yy2129;
} else {
- if (yych <= '5') {
- if (yych <= '/') {
- yyt2 = YYCURSOR;
- goto yy284;
- }
- goto yy480;
- } else {
- if (yych <= '9') goto yy479;
- if (yych <= ':') goto yy378;
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
+ }
+ if (yych <= '9') goto yy2283;
+ yyt2 = YYCURSOR;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '?') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
+ }
+ goto yy2283;
+ } else {
+ if (yych <= 'Z') goto yy1864;
+ if (yych <= '^') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
+ yyt2 = YYCURSOR;
+ goto yy2007;
}
}
} else {
- if (yych <= '~') {
- if (yych <= '^') {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= 'f') goto yy2283;
+ goto yy1864;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= 0xC1) goto yy1741;
+ yyt2 = YYCURSOR;
+ goto yy1900;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy1902;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1903;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1741;
+ }
+ }
+ }
+yy2131:
+ yych = *++YYCURSOR;
+ if (yych <= ':') {
+ if (yych <= ' ') {
+ if (yych <= 0x1F) goto yy1682;
+ goto yy1892;
+ } else {
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2284;
+ goto yy1731;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy1682;
+ goto yy2284;
+ } else {
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2284;
+ goto yy1682;
+ }
+ }
+yy2132:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '`') {
+ if (yych <= '?') {
+ if (yych <= '/') {
+ if (yych <= ',') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ yyt2 = YYCURSOR;
+ goto yy2128;
+ } else {
+ if (yych <= '9') goto yy2283;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2131;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ } else {
+ if (yych <= 'Z') {
if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy2128;
+ }
+ if (yych <= 'F') goto yy2283;
+ goto yy1864;
+ } else {
+ if (yych == '_') {
+ yyt2 = YYCURSOR;
+ goto yy2007;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= 'f') goto yy2283;
+ goto yy1864;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= 0xC1) goto yy1741;
+ yyt2 = YYCURSOR;
+ goto yy1900;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy1902;
}
- if (yych <= 'F') goto yy479;
- if (yych <= 'Z') goto yy3;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1903;
} else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1741;
+ }
+ }
+ }
+yy2133:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '_') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= ',') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
+ }
+ yyt2 = YYCURSOR;
+ goto yy2129;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
+ }
+ if (yych <= '9') goto yy2285;
+ yyt2 = YYCURSOR;
+ goto yy2131;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '?') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
+ }
+ goto yy2283;
+ } else {
+ if (yych <= 'Z') goto yy1864;
+ if (yych <= '^') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ yyt2 = YYCURSOR;
+ goto yy2007;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
if (yych <= '`') {
- if (yych <= '_') {
- yyt2 = YYCURSOR;
- goto yy284;
- }
yyt2 = YYCURSOR;
- goto yy198;
- } else {
- if (yych <= 'f') goto yy479;
- if (yych <= 'z') goto yy3;
+ goto yy1892;
+ }
+ if (yych <= 'f') goto yy2283;
+ goto yy1864;
+ } else {
+ if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
+ if (yych <= 0xC1) goto yy1741;
+ yyt2 = YYCURSOR;
+ goto yy1900;
}
} else {
- if (yych <= 0xE0) {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy1902;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1903;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1741;
+ }
+ }
+ }
+yy2134:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '^') {
+ if (yych <= '9') {
+ if (yych <= '.') {
+ if (yych <= ',') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
+ }
+ yyt2 = YYCURSOR;
+ goto yy2129;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
+ }
+ if (yych <= '5') goto yy2285;
+ goto yy2283;
+ }
+ } else {
+ if (yych <= '@') {
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2131;
+ }
+ if (yych <= '?') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ yyt2 = YYCURSOR;
+ goto yy2128;
+ } else {
+ if (yych <= 'F') goto yy2283;
+ if (yych <= 'Z') goto yy1864;
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ }
+ } else {
+ if (yych <= 0xC1) {
+ if (yych <= 'f') {
+ if (yych <= '_') {
+ yyt2 = YYCURSOR;
+ goto yy2007;
+ }
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2283;
+ } else {
+ if (yych <= 'z') goto yy1864;
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1892;
}
- if (yych <= 0xC1) goto yy5;
+ goto yy1741;
+ }
+ } else {
+ if (yych <= 0xEF) {
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy289;
+ goto yy1900;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1901;
}
yyt2 = YYCURSOR;
- goto yy290;
+ goto yy1902;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) {
- yyt2 = YYCURSOR;
- goto yy291;
- }
yyt2 = YYCURSOR;
- goto yy292;
- } else {
- if (yych <= 0xF3) {
- yyt2 = YYCURSOR;
- goto yy293;
- }
- if (yych <= 0xF4) {
- yyt2 = YYCURSOR;
- goto yy294;
- }
- goto yy5;
+ goto yy1903;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
}
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1741;
}
}
}
-yy382:
- yyaccept = 21;
+yy2135:
+ yyaccept = 27;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '-') {
- if (yych <= 0x1B) {
- if (yych <= '\n') {
- if (yych <= 0x00) goto yy354;
- if (yych <= 0x08) goto yy4;
- goto yy354;
+ if (yych <= '?') {
+ if (yych <= '.') {
+ if (yych <= ',') goto yy2080;
+ if (yych <= '-') goto yy2008;
+ goto yy2009;
+ } else {
+ if (yych <= '/') goto yy1731;
+ if (yych <= '9') goto yy1877;
+ if (yych <= ':') goto yy1881;
+ goto yy2080;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') goto yy1731;
+ if (yych <= 'Z') goto yy2135;
+ goto yy2080;
+ } else {
+ if (yych <= '_') goto yy1864;
+ if (yych <= '`') goto yy2080;
+ if (yych <= 'z') goto yy2135;
+ goto yy2080;
+ }
+ }
+yy2136:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '.') goto yy1970;
+ goto yy2158;
+yy2137:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= '*') {
+ if (yych == '%') goto yy1973;
+ goto yy1635;
+ } else {
+ if (yych == ',') goto yy1635;
+ goto yy1973;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '?') goto yy1635;
+ if (yych <= 'Z') goto yy1973;
+ goto yy1635;
+ } else {
+ if (yych == '`') goto yy1635;
+ if (yych <= 'z') goto yy1973;
+ goto yy1635;
+ }
+ }
+yy2138:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '+') goto yy1889;
+ goto yy1973;
+yy2139:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'a') {
+ if (yych == 'B') goto yy2137;
+ goto yy1973;
+ } else {
+ if (yych <= 'b') goto yy2137;
+ if (yych == 'i') goto yy2286;
+ goto yy1973;
+ }
+yy2140:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'S') {
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy1635;
+ goto yy1973;
} else {
- if (yych == '\r') goto yy354;
- if (yych <= 0x1A) goto yy4;
- goto yy354;
+ if (yych == '+') goto yy1973;
+ goto yy1635;
}
} else {
- if (yych <= '%') {
- if (yych <= 0x1F) goto yy4;
- if (yych <= '#') goto yy354;
- if (yych <= '$') goto yy4;
- goto yy80;
+ if (yych <= 'A') {
+ if (yych <= ':') goto yy1973;
+ if (yych <= '?') goto yy1635;
+ goto yy1973;
+ } else {
+ if (yych <= 'B') goto yy2137;
+ if (yych <= 'R') goto yy1973;
+ goto yy2137;
+ }
+ }
+ } else {
+ if (yych <= 'b') {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy1973;
+ if (yych <= '^') goto yy1635;
+ goto yy1973;
+ } else {
+ if (yych <= '`') goto yy1635;
+ if (yych <= 'a') goto yy1973;
+ goto yy2137;
+ }
+ } else {
+ if (yych <= 'r') {
+ if (yych == 'i') goto yy2287;
+ goto yy1973;
+ } else {
+ if (yych <= 's') goto yy2137;
+ if (yych <= 'z') goto yy1973;
+ goto yy1635;
+ }
+ }
+ }
+yy2141:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == 'S') goto yy2137;
+ if (yych == 's') goto yy2137;
+ goto yy1973;
+yy2142:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '.') goto yy1970;
+ if (yych <= '/') goto yy2158;
+ if (yych <= '5') goto yy2136;
+ goto yy2158;
+yy2143:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ switch (yych) {
+ case '%': goto yy1727;
+ case '+': goto yy1697;
+ case '-': goto yy1729;
+ case '.': goto yy2019;
+ case '/': goto yy1731;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy2288;
+ case ':': goto yy1879;
+ case '@': goto yy1737;
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f': goto yy2264;
+ case 'B':
+ case 'b': goto yy2289;
+ case 'E':
+ case 'e': goto yy2290;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy1740;
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy1742;
+ case 'S':
+ case 's': goto yy1744;
+ case '_': goto yy1745;
+ case 'm': goto yy1747;
+ case 'p':
+ case 'u': goto yy1748;
+ default: goto yy1635;
+ }
+yy2144:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '?') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1743;
+ if (yych <= '*') goto yy1635;
+ goto yy1743;
+ } else {
+ if (yych <= '/') {
+ if (yych <= ',') goto yy1635;
+ goto yy1743;
} else {
- if (yych == '+') goto yy80;
- if (yych <= ',') goto yy354;
- goto yy181;
+ if (yych <= '9') goto yy2264;
+ if (yych <= ':') goto yy1743;
+ goto yy1635;
}
}
} else {
if (yych <= '^') {
- if (yych <= ':') {
- if (yych <= '.') goto yy46;
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy340;
- goto yy452;
+ if (yych <= '@') goto yy1743;
+ if (yych <= 'F') goto yy2264;
+ if (yych <= 'Z') goto yy1743;
+ goto yy1635;
+ } else {
+ if (yych <= '`') {
+ if (yych <= '_') goto yy1743;
+ goto yy1635;
+ } else {
+ if (yych <= 'f') goto yy2264;
+ if (yych <= 'z') goto yy1743;
+ goto yy1635;
+ }
+ }
+ }
+yy2145:
+ yyaccept = 12;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1743;
+ if (yych <= '*') goto yy1735;
+ goto yy1889;
+ } else {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy1735;
+ goto yy2016;
+ } else {
+ if (yych <= '/') goto yy1743;
+ if (yych <= '9') goto yy2264;
+ goto yy1743;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') {
+ if (yych <= '?') goto yy1735;
+ goto yy1743;
} else {
- if (yych <= '?') goto yy354;
- if (yych <= '@') goto yy96;
- if (yych <= 'Z') goto yy46;
- goto yy354;
+ if (yych <= 'F') goto yy2264;
+ if (yych <= 'Z') goto yy1743;
+ goto yy1735;
}
} else {
- if (yych <= '~') {
- if (yych == '`') goto yy354;
- if (yych <= 'z') goto yy46;
- goto yy354;
+ if (yych <= '`') {
+ if (yych <= '_') goto yy1743;
+ goto yy1735;
} else {
- if (yych <= 0x7F) goto yy4;
- if (yych <= 0xC1) goto yy354;
- if (yych <= 0xF4) goto yy4;
- goto yy354;
+ if (yych <= 'f') goto yy2264;
+ if (yych <= 'z') goto yy1743;
+ goto yy1735;
}
}
}
-yy383:
+yy2146:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+yy2147:
+ switch (yych) {
+ case '%':
+ case '+': goto yy1697;
+ case '-':
+ case '.': goto yy1729;
+ case '/': goto yy1731;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy2146;
+ case ':': goto yy1881;
+ case '@': goto yy1737;
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'E':
+ case 'F':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'e':
+ case 'f':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy1745;
+ case 'B':
+ case 'S':
+ case 'b':
+ case 's': goto yy2154;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy2153;
+ case 'm': goto yy2155;
+ case 'p':
+ case 'u': goto yy2156;
+ default: goto yy1635;
+ }
+yy2148:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '/') {
+ if (yych <= '*') {
+ if (yych == '%') goto yy1698;
+ goto yy1635;
+ } else {
+ if (yych == ',') goto yy1635;
+ if (yych <= '.') goto yy1698;
+ goto yy1635;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '9') goto yy1698;
+ if (yych <= '?') goto yy1635;
+ if (yych <= 'Z') goto yy1698;
+ goto yy1635;
+ } else {
+ if (yych == '`') goto yy1635;
+ if (yych <= 'z') goto yy1698;
+ goto yy1635;
+ }
+ }
+yy2149:
yych = *++YYCURSOR;
- if (yych == '.') goto yy481;
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy482;
- goto yy1;
-yy384:
+ if (yych <= 'a') {
+ if (yych == 'B') goto yy2148;
+ goto yy1698;
+ } else {
+ if (yych <= 'b') goto yy2148;
+ if (yych == 'i') goto yy2291;
+ goto yy1698;
+ }
+yy2150:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'R') {
+ if (yych <= '.') {
+ if (yych <= '*') {
+ if (yych == '%') goto yy1698;
+ goto yy1635;
+ } else {
+ if (yych == ',') goto yy1635;
+ goto yy1698;
+ }
+ } else {
+ if (yych <= '?') {
+ if (yych <= '/') goto yy1635;
+ if (yych <= '9') goto yy1698;
+ goto yy1635;
+ } else {
+ if (yych == 'B') goto yy2148;
+ goto yy1698;
+ }
+ }
+ } else {
+ if (yych <= 'a') {
+ if (yych <= '^') {
+ if (yych <= 'S') goto yy2148;
+ if (yych <= 'Z') goto yy1698;
+ goto yy1635;
+ } else {
+ if (yych == '`') goto yy1635;
+ goto yy1698;
+ }
+ } else {
+ if (yych <= 'i') {
+ if (yych <= 'b') goto yy2148;
+ if (yych <= 'h') goto yy1698;
+ goto yy2292;
+ } else {
+ if (yych == 's') goto yy2148;
+ if (yych <= 'z') goto yy1698;
+ goto yy1635;
+ }
+ }
+ }
+yy2151:
yych = *++YYCURSOR;
- if (yych == '.') goto yy481;
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy383;
- goto yy1;
-yy385:
+ if (yych == 'S') goto yy2148;
+ if (yych == 's') goto yy2148;
+ goto yy1698;
+yy2152:
+ yyaccept = 30;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '9') {
+ if (yych <= '*') {
+ if (yych == '%') goto yy2147;
+ goto yy2107;
+ } else {
+ if (yych <= '+') goto yy2147;
+ if (yych <= ',') goto yy2107;
+ if (yych <= '-') goto yy1866;
+ goto yy2147;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= ':') goto yy2257;
+ if (yych <= '?') goto yy2107;
+ if (yych <= 'Z') goto yy2147;
+ goto yy2107;
+ } else {
+ if (yych == '`') goto yy2107;
+ if (yych <= 'z') goto yy2147;
+ goto yy2107;
+ }
+ }
+yy2153:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'a') {
+ if (yych != 'B') goto yy1746;
+ } else {
+ if (yych <= 'b') goto yy2154;
+ if (yych == 'i') goto yy2293;
+ goto yy1746;
+ }
+yy2154:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= '*') {
+ if (yych == '%') goto yy1746;
+ goto yy1635;
+ } else {
+ if (yych == ',') goto yy1635;
+ goto yy1746;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '?') goto yy1635;
+ if (yych <= 'Z') goto yy1746;
+ goto yy1635;
+ } else {
+ if (yych == '`') goto yy1635;
+ if (yych <= 'z') goto yy1746;
+ goto yy1635;
+ }
+ }
+yy2155:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'S') {
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy1635;
+ goto yy1746;
+ } else {
+ if (yych == '+') goto yy1746;
+ goto yy1635;
+ }
+ } else {
+ if (yych <= 'A') {
+ if (yych <= ':') goto yy1746;
+ if (yych <= '?') goto yy1635;
+ goto yy1746;
+ } else {
+ if (yych <= 'B') goto yy2154;
+ if (yych <= 'R') goto yy1746;
+ goto yy2154;
+ }
+ }
+ } else {
+ if (yych <= 'b') {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy1746;
+ if (yych <= '^') goto yy1635;
+ goto yy1746;
+ } else {
+ if (yych <= '`') goto yy1635;
+ if (yych <= 'a') goto yy1746;
+ goto yy2154;
+ }
+ } else {
+ if (yych <= 'r') {
+ if (yych == 'i') goto yy2294;
+ goto yy1746;
+ } else {
+ if (yych <= 's') goto yy2154;
+ if (yych <= 'z') goto yy1746;
+ goto yy1635;
+ }
+ }
+ }
+yy2156:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == 'S') goto yy2154;
+ if (yych == 's') goto yy2154;
+ goto yy1746;
+yy2157:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+yy2158:
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ switch (yych) {
+ case '%': goto yy1727;
+ case '+': goto yy1697;
+ case '-': goto yy1969;
+ case '.': goto yy2101;
+ case '/': goto yy1731;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy2157;
+ case ':': goto yy1881;
+ case '@': goto yy1737;
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy1972;
+ case 'B':
+ case 'S':
+ case 'b':
+ case 's': goto yy2137;
+ case 'E':
+ case 'e': goto yy2138;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy2139;
+ case 'm': goto yy2140;
+ case 'p':
+ case 'u': goto yy2141;
+ default: goto yy1635;
+ }
+yy2159:
+ yych = *++YYCURSOR;
+ if (yych == '.') goto yy2295;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2296;
+ goto yy1682;
+yy2160:
+ yych = *++YYCURSOR;
+ if (yych == '.') goto yy2295;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2159;
+ goto yy1682;
+yy2161:
yych = *++YYCURSOR;
if (yych <= '/') {
- if (yych == '.') goto yy481;
- goto yy1;
+ if (yych == '.') goto yy2295;
+ goto yy1682;
} else {
- if (yych <= '4') goto yy383;
- if (yych <= '5') goto yy483;
- if (yych <= '9') goto yy482;
- goto yy1;
+ if (yych <= '4') goto yy2159;
+ if (yych <= '5') goto yy2297;
+ if (yych <= '9') goto yy2296;
+ goto yy1682;
}
-yy386:
+yy2162:
yych = *++YYCURSOR;
if (yych <= 'z') {
if (yych <= '@') {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
+ }
+ if (yych <= '9') goto yy2298;
+ if (yych <= ':') {
+ yyt1 = YYCURSOR;
+ goto yy2022;
}
- if (yych <= '9') goto yy484;
- if (yych <= ':') goto yy299;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
if (yych <= 'Z') {
- if (yych <= 'F') goto yy484;
- goto yy1;
+ if (yych <= 'F') goto yy2298;
+ goto yy1682;
} else {
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 'f') goto yy484;
- goto yy1;
+ if (yych <= 'f') goto yy2298;
+ goto yy1682;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy387:
+yy2163:
yych = *++YYCURSOR;
if (yych <= 'z') {
if (yych <= '@') {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
+ }
+ if (yych <= '9') goto yy2299;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2300;
}
- if (yych <= '9') goto yy485;
- if (yych <= ':') goto yy486;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
if (yych <= 'Z') {
- if (yych <= 'F') goto yy485;
- goto yy1;
+ if (yych <= 'F') goto yy2299;
+ goto yy1682;
} else {
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 'f') goto yy485;
- goto yy1;
+ if (yych <= 'f') goto yy2299;
+ goto yy1682;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy388:
+yy2164:
yych = *++YYCURSOR;
if (yych <= 'f') {
if (yych <= ':') {
if (yych <= '.') {
if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
yyt1 = YYCURSOR;
- goto yy297;
+ goto yy2020;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '9') goto yy484;
- goto yy299;
+ if (yych <= '9') goto yy2298;
+ yyt1 = YYCURSOR;
+ goto yy2022;
}
} else {
if (yych <= 'F') {
if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy484;
+ goto yy2298;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy484;
+ goto yy2298;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy389:
+yy2165:
yych = *++YYCURSOR;
if (yych <= 'f') {
if (yych <= 'E') {
if (yych <= '9') {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy484;
+ goto yy2298;
} else {
- if (yych <= ':') goto yy299;
+ if (yych <= ':') {
+ yyt1 = YYCURSOR;
+ goto yy2022;
+ }
if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy484;
+ goto yy2298;
}
} else {
if (yych <= 'Z') {
- if (yych <= 'F') goto yy487;
- goto yy1;
+ if (yych <= 'F') goto yy2301;
+ goto yy1682;
} else {
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 'e') goto yy484;
- goto yy487;
+ if (yych <= 'e') goto yy2298;
+ goto yy2301;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy390:
+yy2166:
yych = *++YYCURSOR;
if (yych <= '-') {
if (yych <= ' ') {
if (yych <= '\f') {
- if (yych == '\t') goto yy488;
- goto yy1;
+ if (yych == '\t') goto yy2302;
+ goto yy1682;
} else {
- if (yych <= '\r') goto yy488;
- if (yych <= 0x1F) goto yy1;
- goto yy488;
+ if (yych <= '\r') goto yy2302;
+ if (yych <= 0x1F) goto yy1682;
+ goto yy2302;
}
} else {
if (yych <= '&') {
- if (yych == '"') goto yy306;
- goto yy1;
+ if (yych == '"') goto yy2029;
+ goto yy1682;
} else {
- if (yych <= '\'') goto yy307;
- if (yych <= ',') goto yy1;
- goto yy390;
+ if (yych <= '\'') goto yy2030;
+ if (yych <= ',') goto yy1682;
+ goto yy2166;
}
}
} else {
if (yych <= '@') {
if (yych <= '<') {
- if (yych <= '/') goto yy1;
- if (yych <= ':') goto yy390;
- goto yy1;
+ if (yych <= '/') goto yy1682;
+ if (yych <= ':') goto yy2166;
+ goto yy1682;
} else {
- if (yych <= '=') goto yy408;
- if (yych <= '>') goto yy309;
- goto yy1;
+ if (yych <= '=') goto yy2198;
+ if (yych <= '>') goto yy2033;
+ goto yy1682;
}
} else {
if (yych <= '_') {
- if (yych <= 'Z') goto yy390;
- if (yych <= '^') goto yy1;
- goto yy390;
+ if (yych <= 'Z') goto yy2166;
+ if (yych <= '^') goto yy1682;
+ goto yy2166;
} else {
- if (yych <= '`') goto yy1;
- if (yych <= 'z') goto yy390;
- goto yy1;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'z') goto yy2166;
+ goto yy1682;
}
}
}
-yy391:
+yy2167:
yych = *++YYCURSOR;
- if (yybm[256+yych] & 8) {
- goto yy391;
+ if (yybm_init[512+yych] & 2) {
+ goto yy2167;
}
if (yych <= 0xDF) {
if (yych <= '"') {
- if (yych <= 0x00) goto yy1;
- goto yy489;
+ if (yych <= 0x00) goto yy1682;
+ goto yy2303;
} else {
- if (yych <= '\\') goto yy392;
- if (yych <= 0xC1) goto yy1;
- goto yy393;
+ if (yych <= '\\') goto yy2168;
+ if (yych <= 0xC1) goto yy1682;
+ goto yy2169;
}
} else {
if (yych <= 0xF0) {
- if (yych <= 0xE0) goto yy394;
- if (yych <= 0xEF) goto yy395;
- goto yy396;
+ if (yych <= 0xE0) goto yy2170;
+ if (yych <= 0xEF) goto yy2171;
+ goto yy2172;
} else {
- if (yych <= 0xF3) goto yy397;
- if (yych <= 0xF4) goto yy398;
- goto yy1;
+ if (yych <= 0xF3) goto yy2173;
+ if (yych <= 0xF4) goto yy2174;
+ goto yy1682;
}
}
-yy392:
+yy2168:
yych = *++YYCURSOR;
- if (yych <= 0xDF) {
- if (yych <= '\n') {
- if (yych <= '\t') goto yy391;
- goto yy1;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 0x00) goto yy1682;
+ goto yy2167;
} else {
- if (yych <= 0x7F) goto yy391;
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych >= 0xE0) goto yy2170;
}
} else {
if (yych <= 0xF0) {
- if (yych <= 0xE0) goto yy394;
- if (yych <= 0xEF) goto yy395;
- goto yy396;
+ if (yych <= 0xEF) goto yy2171;
+ goto yy2172;
} else {
- if (yych <= 0xF3) goto yy397;
- if (yych <= 0xF4) goto yy398;
- goto yy1;
+ if (yych <= 0xF3) goto yy2173;
+ if (yych <= 0xF4) goto yy2174;
+ goto yy1682;
}
}
-yy393:
+yy2169:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy391;
- goto yy1;
-yy394:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2167;
+ goto yy1682;
+yy2170:
yych = *++YYCURSOR;
- if (yych <= 0x9F) goto yy1;
- if (yych <= 0xBF) goto yy393;
- goto yy1;
-yy395:
+ if (yych <= 0x9F) goto yy1682;
+ if (yych <= 0xBF) goto yy2169;
+ goto yy1682;
+yy2171:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy393;
- goto yy1;
-yy396:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2169;
+ goto yy1682;
+yy2172:
yych = *++YYCURSOR;
- if (yych <= 0x8F) goto yy1;
- if (yych <= 0xBF) goto yy395;
- goto yy1;
-yy397:
+ if (yych <= 0x8F) goto yy1682;
+ if (yych <= 0xBF) goto yy2171;
+ goto yy1682;
+yy2173:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy395;
- goto yy1;
-yy398:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2171;
+ goto yy1682;
+yy2174:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0x8F) goto yy395;
- goto yy1;
-yy399:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0x8F) goto yy2171;
+ goto yy1682;
+yy2175:
yych = *++YYCURSOR;
- if (yybm[256+yych] & 16) {
- goto yy399;
+ if (yybm_init[512+yych] & 4) {
+ goto yy2175;
}
if (yych <= 0xDF) {
if (yych <= '\'') {
- if (yych <= 0x00) goto yy1;
- goto yy489;
+ if (yych <= 0x00) goto yy1682;
+ goto yy2303;
} else {
- if (yych <= '\\') goto yy400;
- if (yych <= 0xC1) goto yy1;
- goto yy401;
+ if (yych <= '\\') goto yy2176;
+ if (yych <= 0xC1) goto yy1682;
+ goto yy2177;
}
} else {
if (yych <= 0xF0) {
- if (yych <= 0xE0) goto yy402;
- if (yych <= 0xEF) goto yy403;
- goto yy404;
+ if (yych <= 0xE0) goto yy2178;
+ if (yych <= 0xEF) goto yy2179;
+ goto yy2180;
} else {
- if (yych <= 0xF3) goto yy405;
- if (yych <= 0xF4) goto yy406;
- goto yy1;
+ if (yych <= 0xF3) goto yy2181;
+ if (yych <= 0xF4) goto yy2182;
+ goto yy1682;
}
}
-yy400:
+yy2176:
yych = *++YYCURSOR;
- if (yych <= 0xDF) {
- if (yych <= '\n') {
- if (yych <= '\t') goto yy399;
- goto yy1;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 0x00) goto yy1682;
+ goto yy2175;
} else {
- if (yych <= 0x7F) goto yy399;
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych >= 0xE0) goto yy2178;
}
} else {
if (yych <= 0xF0) {
- if (yych <= 0xE0) goto yy402;
- if (yych <= 0xEF) goto yy403;
- goto yy404;
+ if (yych <= 0xEF) goto yy2179;
+ goto yy2180;
} else {
- if (yych <= 0xF3) goto yy405;
- if (yych <= 0xF4) goto yy406;
- goto yy1;
+ if (yych <= 0xF3) goto yy2181;
+ if (yych <= 0xF4) goto yy2182;
+ goto yy1682;
}
}
-yy401:
+yy2177:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy399;
- goto yy1;
-yy402:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2175;
+ goto yy1682;
+yy2178:
yych = *++YYCURSOR;
- if (yych <= 0x9F) goto yy1;
- if (yych <= 0xBF) goto yy401;
- goto yy1;
-yy403:
+ if (yych <= 0x9F) goto yy1682;
+ if (yych <= 0xBF) goto yy2177;
+ goto yy1682;
+yy2179:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy401;
- goto yy1;
-yy404:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2177;
+ goto yy1682;
+yy2180:
yych = *++YYCURSOR;
- if (yych <= 0x8F) goto yy1;
- if (yych <= 0xBF) goto yy403;
- goto yy1;
-yy405:
+ if (yych <= 0x8F) goto yy1682;
+ if (yych <= 0xBF) goto yy2179;
+ goto yy1682;
+yy2181:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy403;
- goto yy1;
-yy406:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2179;
+ goto yy1682;
+yy2182:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0x8F) goto yy403;
- goto yy1;
-yy407:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0x8F) goto yy2179;
+ goto yy1682;
+yy2183:
+ yych = *++YYCURSOR;
+yy2184:
+ if (yybm_init[512+yych] & 8) {
+ goto yy2183;
+ }
+ if (yych <= 0xE0) {
+ if (yych <= '-') {
+ if (yych <= '*') goto yy1682;
+ goto yy2304;
+ } else {
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2191;
+ goto yy2192;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy2193;
+ goto yy2194;
+ } else {
+ if (yych <= 0xF3) goto yy2195;
+ if (yych <= 0xF4) goto yy2196;
+ goto yy1682;
+ }
+ }
+yy2185:
+ yych = *++YYCURSOR;
+ if (yych <= ':') {
+ if (yych <= '!') {
+ if (yych <= '\f') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '\t') goto yy2185;
+ goto yy2183;
+ } else {
+ if (yych <= '\r') goto yy2185;
+ if (yych == ' ') goto yy2185;
+ goto yy2183;
+ }
+ } else {
+ if (yych <= ')') {
+ if (yych <= '"') goto yy2186;
+ if (yych == '\'') goto yy2187;
+ goto yy2183;
+ } else {
+ if (yych <= ',') {
+ if (yych <= '*') goto yy1682;
+ goto yy2183;
+ } else {
+ if (yych <= '-') goto yy2305;
+ if (yych <= '/') goto yy2183;
+ goto yy2306;
+ }
+ }
+ }
+ } else {
+ if (yych <= 'z') {
+ if (yych <= '@') {
+ if (yych <= '<') goto yy2183;
+ if (yych <= '=') goto yy2189;
+ if (yych <= '>') goto yy2190;
+ goto yy2183;
+ } else {
+ if (yych <= '^') {
+ if (yych <= 'Z') goto yy2306;
+ goto yy2183;
+ } else {
+ if (yych == '`') goto yy2183;
+ goto yy2306;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy2183;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2191;
+ goto yy2192;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy2193;
+ goto yy2194;
+ } else {
+ if (yych <= 0xF3) goto yy2195;
+ if (yych <= 0xF4) goto yy2196;
+ goto yy1682;
+ }
+ }
+ }
+ }
+yy2186:
+ yych = *++YYCURSOR;
+ if (yybm_init[512+yych] & 128) {
+ goto yy2307;
+ }
+ if (yych <= 0xC1) {
+ if (yych <= '*') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= '"') goto yy2183;
+ goto yy2167;
+ } else {
+ if (yych <= '-') goto yy2308;
+ if (yych <= '\\') goto yy2309;
+ goto yy1682;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy2310;
+ if (yych <= 0xE0) goto yy2311;
+ goto yy2312;
+ } else {
+ if (yych <= 0xF0) goto yy2313;
+ if (yych <= 0xF3) goto yy2314;
+ if (yych <= 0xF4) goto yy2315;
+ goto yy1682;
+ }
+ }
+yy2187:
+ yych = *++YYCURSOR;
+ if (yybm_init[256+yych] & 1) {
+ goto yy2316;
+ }
+ if (yych <= 0xC1) {
+ if (yych <= '*') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= '\'') goto yy2183;
+ goto yy2175;
+ } else {
+ if (yych <= '-') goto yy2317;
+ if (yych <= '\\') goto yy2318;
+ goto yy1682;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy2319;
+ if (yych <= 0xE0) goto yy2320;
+ goto yy2321;
+ } else {
+ if (yych <= 0xF0) goto yy2322;
+ if (yych <= 0xF3) goto yy2323;
+ if (yych <= 0xF4) goto yy2324;
+ goto yy1682;
+ }
+ }
+yy2188:
+ yych = *++YYCURSOR;
+ if (yybm_init[256+yych] & 2) {
+ goto yy2325;
+ }
+ if (yych <= '=') {
+ if (yych <= ' ') {
+ if (yych <= '\t') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= 0x08) goto yy2183;
+ goto yy2185;
+ } else {
+ if (yych == '\r') goto yy2185;
+ if (yych <= 0x1F) goto yy2183;
+ goto yy2185;
+ }
+ } else {
+ if (yych <= '\'') {
+ if (yych == '"') goto yy2186;
+ if (yych <= '&') goto yy2183;
+ goto yy2187;
+ } else {
+ if (yych <= '/') goto yy2183;
+ if (yych <= ':') goto yy2031;
+ if (yych <= '<') goto yy2183;
+ }
+ }
+ } else {
+ if (yych <= 0x7F) {
+ if (yych <= '^') {
+ if (yych <= '>') goto yy2190;
+ if (yych <= '@') goto yy2183;
+ if (yych <= 'Z') goto yy2031;
+ goto yy2183;
+ } else {
+ if (yych == '`') goto yy2183;
+ if (yych <= 'z') goto yy2031;
+ goto yy2183;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2191;
+ if (yych <= 0xE0) goto yy2192;
+ goto yy2193;
+ } else {
+ if (yych <= 0xF0) goto yy2194;
+ if (yych <= 0xF3) goto yy2195;
+ if (yych <= 0xF4) goto yy2196;
+ goto yy1682;
+ }
+ }
+ }
+yy2189:
+ yych = *++YYCURSOR;
+ if (yybm_init[256+yych] & 4) {
+ goto yy2326;
+ }
+ if (yych <= 0xC1) {
+ if (yych <= '\'') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= '"') goto yy2327;
+ goto yy2328;
+ } else {
+ if (yych <= '*') goto yy2329;
+ if (yych <= '-') goto yy2330;
+ if (yych <= '>') goto yy2183;
+ goto yy1682;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy2331;
+ if (yych <= 0xE0) goto yy2332;
+ goto yy2333;
+ } else {
+ if (yych <= 0xF0) goto yy2334;
+ if (yych <= 0xF3) goto yy2335;
+ if (yych <= 0xF4) goto yy2336;
+ goto yy1682;
+ }
+ }
+yy2190:
+ yyaccept = 32;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '*') {
+ if (yych <= 0x00) goto yy2034;
+ if (yych <= ')') goto yy2184;
+ goto yy2034;
+ } else {
+ if (yych <= 0x7F) goto yy2184;
+ if (yych <= 0xC1) goto yy2034;
+ if (yych <= 0xF4) goto yy2184;
+ goto yy2034;
+ }
+yy2191:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2183;
+ goto yy1682;
+yy2192:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy1682;
+ if (yych <= 0xBF) goto yy2191;
+ goto yy1682;
+yy2193:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2191;
+ goto yy1682;
+yy2194:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy1682;
+ if (yych <= 0xBF) goto yy2193;
+ goto yy1682;
+yy2195:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2193;
+ goto yy1682;
+yy2196:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0x8F) goto yy2193;
+ goto yy1682;
+yy2197:
yych = *++YYCURSOR;
if (yych <= '-') {
if (yych <= ' ') {
if (yych <= '\f') {
- if (yych == '\t') goto yy407;
- goto yy1;
+ if (yych == '\t') goto yy2197;
+ goto yy1682;
} else {
- if (yych <= '\r') goto yy407;
- if (yych <= 0x1F) goto yy1;
- goto yy407;
+ if (yych <= '\r') goto yy2197;
+ if (yych <= 0x1F) goto yy1682;
+ goto yy2197;
}
} else {
if (yych <= '&') {
- if (yych == '"') goto yy306;
- goto yy1;
+ if (yych == '"') goto yy2029;
+ goto yy1682;
} else {
- if (yych <= '\'') goto yy307;
- if (yych <= ',') goto yy1;
- goto yy390;
+ if (yych <= '\'') goto yy2030;
+ if (yych <= ',') goto yy1682;
+ goto yy2166;
}
}
} else {
if (yych <= '@') {
if (yych <= '<') {
- if (yych <= '/') goto yy1;
- if (yych <= ':') goto yy390;
- goto yy1;
+ if (yych <= '/') goto yy1682;
+ if (yych <= ':') goto yy2166;
+ goto yy1682;
} else {
- if (yych <= '=') goto yy408;
- if (yych <= '>') goto yy309;
- goto yy1;
+ if (yych <= '=') goto yy2198;
+ if (yych <= '>') goto yy2033;
+ goto yy1682;
}
} else {
if (yych <= '_') {
- if (yych <= 'Z') goto yy390;
- if (yych <= '^') goto yy1;
- goto yy390;
+ if (yych <= 'Z') goto yy2166;
+ if (yych <= '^') goto yy1682;
+ goto yy2166;
} else {
- if (yych <= '`') goto yy1;
- if (yych <= 'z') goto yy390;
- goto yy1;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'z') goto yy2166;
+ goto yy1682;
}
}
}
-yy408:
+yy2198:
yych = *++YYCURSOR;
- if (yybm[0+yych] & 1) {
- goto yy490;
+ if (yybm_init[256+yych] & 32) {
+ goto yy2329;
}
if (yych <= 0xDF) {
if (yych <= '"') {
- if (yych <= 0x00) goto yy1;
- goto yy491;
+ if (yych <= 0x00) goto yy1682;
+ goto yy2337;
} else {
- if (yych <= '\'') goto yy492;
- if (yych <= 0xC1) goto yy1;
- goto yy493;
+ if (yych <= '\'') goto yy2338;
+ if (yych <= 0xC1) goto yy1682;
+ goto yy2339;
}
} else {
if (yych <= 0xF0) {
- if (yych <= 0xE0) goto yy494;
- if (yych <= 0xEF) goto yy495;
- goto yy496;
+ if (yych <= 0xE0) goto yy2340;
+ if (yych <= 0xEF) goto yy2341;
+ goto yy2342;
} else {
- if (yych <= 0xF3) goto yy497;
- if (yych <= 0xF4) goto yy498;
- goto yy1;
+ if (yych <= 0xF3) goto yy2343;
+ if (yych <= 0xF4) goto yy2344;
+ goto yy1682;
}
}
-yy409:
+yy2199:
yych = *++YYCURSOR;
if (yych <= ' ') {
if (yych <= '\f') {
- if (yych == '\t') goto yy409;
- goto yy1;
+ if (yych == '\t') goto yy2199;
+ goto yy1682;
} else {
- if (yych <= '\r') goto yy409;
- if (yych <= 0x1F) goto yy1;
- goto yy409;
+ if (yych <= '\r') goto yy2199;
+ if (yych <= 0x1F) goto yy1682;
+ goto yy2199;
}
} else {
if (yych <= '<') {
- if (yych == '/') goto yy215;
- goto yy1;
+ if (yych == '/') goto yy1911;
+ goto yy1682;
} else {
- if (yych <= '=') goto yy313;
- if (yych <= '>') goto yy216;
- if (yych <= '?') goto yy215;
- goto yy1;
+ if (yych <= '=') goto yy2037;
+ if (yych <= '>') goto yy1912;
+ if (yych <= '?') goto yy1911;
+ goto yy1682;
}
}
-yy410:
+yy2200:
yych = *++YYCURSOR;
- if (yybm[256+yych] & 32) {
- goto yy410;
+ if (yybm_init[512+yych] & 16) {
+ goto yy2200;
}
if (yych <= 'z') {
if (yych <= '/') {
- if (yych <= 0x00) goto yy1;
- if (yych <= '-') goto yy499;
- goto yy500;
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= '-') goto yy2345;
+ goto yy2346;
} else {
- if (yych <= ':') goto yy499;
- if (yych <= '>') goto yy216;
- if (yych <= '?') goto yy500;
- goto yy499;
+ if (yych <= ':') goto yy2345;
+ if (yych <= '>') goto yy1912;
+ if (yych <= '?') goto yy2346;
+ goto yy2345;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy414;
- if (yych <= 0xE0) goto yy415;
- goto yy416;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2204;
+ if (yych <= 0xE0) goto yy2205;
+ goto yy2206;
} else {
- if (yych <= 0xF0) goto yy417;
- if (yych <= 0xF3) goto yy418;
- if (yych <= 0xF4) goto yy419;
- goto yy1;
+ if (yych <= 0xF0) goto yy2207;
+ if (yych <= 0xF3) goto yy2208;
+ if (yych <= 0xF4) goto yy2209;
+ goto yy1682;
}
}
-yy411:
+yy2201:
yych = *++YYCURSOR;
- if (yybm[0+yych] & 16) {
- goto yy500;
+ if (yybm_init[0+yych] & 2) {
+ goto yy2346;
}
if (yych <= '=') {
if (yych <= '!') {
if (yych <= '\f') {
- if (yych <= 0x00) goto yy1;
- if (yych == '\t') goto yy411;
- goto yy410;
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '\t') goto yy2201;
+ goto yy2200;
} else {
- if (yych <= '\r') goto yy411;
- if (yych == ' ') goto yy411;
- goto yy410;
+ if (yych <= '\r') goto yy2201;
+ if (yych == ' ') goto yy2201;
+ goto yy2200;
}
} else {
if (yych <= ',') {
- if (yych <= '"') goto yy412;
- if (yych == '\'') goto yy413;
- goto yy410;
+ if (yych <= '"') goto yy2202;
+ if (yych == '\'') goto yy2203;
+ goto yy2200;
} else {
- if (yych == '.') goto yy410;
- if (yych <= ':') goto yy499;
- goto yy410;
+ if (yych == '.') goto yy2200;
+ if (yych <= ':') goto yy2345;
+ goto yy2200;
}
}
} else {
if (yych <= 0x7F) {
if (yych <= '^') {
- if (yych <= '>') goto yy216;
- if (yych <= '@') goto yy410;
- if (yych <= 'Z') goto yy499;
- goto yy410;
+ if (yych <= '>') goto yy1912;
+ if (yych <= '@') goto yy2200;
+ if (yych <= 'Z') goto yy2345;
+ goto yy2200;
} else {
- if (yych == '`') goto yy410;
- if (yych <= 'z') goto yy499;
- goto yy410;
+ if (yych == '`') goto yy2200;
+ if (yych <= 'z') goto yy2345;
+ goto yy2200;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy414;
- if (yych <= 0xE0) goto yy415;
- goto yy416;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2204;
+ if (yych <= 0xE0) goto yy2205;
+ goto yy2206;
} else {
- if (yych <= 0xF0) goto yy417;
- if (yych <= 0xF3) goto yy418;
- if (yych <= 0xF4) goto yy419;
- goto yy1;
+ if (yych <= 0xF0) goto yy2207;
+ if (yych <= 0xF3) goto yy2208;
+ if (yych <= 0xF4) goto yy2209;
+ goto yy1682;
}
}
}
-yy412:
+yy2202:
yych = *++YYCURSOR;
- if (yybm[256+yych] & 64) {
- goto yy412;
+ if (yybm_init[512+yych] & 32) {
+ goto yy2202;
}
if (yych <= '\\') {
if (yych <= '/') {
- if (yych <= 0x00) goto yy1;
- if (yych <= '"') goto yy410;
- if (yych <= '-') goto yy501;
- goto yy502;
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= '"') goto yy2200;
+ if (yych <= '-') goto yy2347;
+ goto yy2348;
} else {
if (yych <= '>') {
- if (yych <= ':') goto yy501;
- goto yy503;
+ if (yych <= ':') goto yy2347;
+ goto yy2349;
} else {
- if (yych <= '?') goto yy502;
- if (yych <= 'Z') goto yy501;
- goto yy504;
+ if (yych <= '?') goto yy2348;
+ if (yych <= 'Z') goto yy2347;
+ goto yy2350;
}
}
} else {
if (yych <= 0xE0) {
- if (yych <= 'z') goto yy501;
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy505;
- goto yy506;
+ if (yych <= 'z') goto yy2347;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2351;
+ goto yy2352;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy507;
- goto yy508;
+ if (yych <= 0xEF) goto yy2353;
+ goto yy2354;
} else {
- if (yych <= 0xF3) goto yy509;
- if (yych <= 0xF4) goto yy510;
- goto yy1;
+ if (yych <= 0xF3) goto yy2355;
+ if (yych <= 0xF4) goto yy2356;
+ goto yy1682;
}
}
}
-yy413:
+yy2203:
yych = *++YYCURSOR;
- if (yybm[256+yych] & 128) {
- goto yy413;
+ if (yybm_init[512+yych] & 64) {
+ goto yy2203;
}
if (yych <= '\\') {
if (yych <= '/') {
- if (yych <= 0x00) goto yy1;
- if (yych <= '\'') goto yy410;
- if (yych <= '-') goto yy511;
- goto yy512;
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= '\'') goto yy2200;
+ if (yych <= '-') goto yy2357;
+ goto yy2358;
} else {
if (yych <= '>') {
- if (yych <= ':') goto yy511;
- goto yy513;
+ if (yych <= ':') goto yy2357;
+ goto yy2359;
} else {
- if (yych <= '?') goto yy512;
- if (yych <= 'Z') goto yy511;
- goto yy514;
+ if (yych <= '?') goto yy2358;
+ if (yych <= 'Z') goto yy2357;
+ goto yy2360;
}
}
} else {
if (yych <= 0xE0) {
- if (yych <= 'z') goto yy511;
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy515;
- goto yy516;
+ if (yych <= 'z') goto yy2357;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2361;
+ goto yy2362;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy517;
- goto yy518;
+ if (yych <= 0xEF) goto yy2363;
+ goto yy2364;
} else {
- if (yych <= 0xF3) goto yy519;
- if (yych <= 0xF4) goto yy520;
- goto yy1;
+ if (yych <= 0xF3) goto yy2365;
+ if (yych <= 0xF4) goto yy2366;
+ goto yy1682;
}
}
}
-yy414:
+yy2204:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy410;
- goto yy1;
-yy415:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2200;
+ goto yy1682;
+yy2205:
yych = *++YYCURSOR;
- if (yych <= 0x9F) goto yy1;
- if (yych <= 0xBF) goto yy414;
- goto yy1;
-yy416:
+ if (yych <= 0x9F) goto yy1682;
+ if (yych <= 0xBF) goto yy2204;
+ goto yy1682;
+yy2206:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy414;
- goto yy1;
-yy417:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2204;
+ goto yy1682;
+yy2207:
yych = *++YYCURSOR;
- if (yych <= 0x8F) goto yy1;
- if (yych <= 0xBF) goto yy416;
- goto yy1;
-yy418:
+ if (yych <= 0x8F) goto yy1682;
+ if (yych <= 0xBF) goto yy2206;
+ goto yy1682;
+yy2208:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy416;
- goto yy1;
-yy419:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2206;
+ goto yy1682;
+yy2209:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0x8F) goto yy416;
- goto yy1;
-yy420:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0x8F) goto yy2206;
+ goto yy1682;
+yy2210:
yych = *++YYCURSOR;
if (yych <= ':') {
if (yych <= 0x1F) {
if (yych <= '\t') {
- if (yych <= 0x08) goto yy1;
- goto yy521;
+ if (yych <= 0x08) goto yy1682;
+ goto yy2367;
} else {
- if (yych == '\r') goto yy521;
- goto yy1;
+ if (yych == '\r') goto yy2367;
+ goto yy1682;
}
} else {
if (yych <= '-') {
- if (yych <= ' ') goto yy521;
- if (yych <= ',') goto yy1;
- goto yy420;
+ if (yych <= ' ') goto yy2367;
+ if (yych <= ',') goto yy1682;
+ goto yy2210;
} else {
- if (yych <= '.') goto yy1;
- if (yych <= '/') goto yy215;
- goto yy420;
+ if (yych <= '.') goto yy1682;
+ if (yych <= '/') goto yy1911;
+ goto yy2210;
}
}
} else {
if (yych <= '@') {
if (yych <= '=') {
- if (yych <= '<') goto yy1;
- goto yy422;
+ if (yych <= '<') goto yy1682;
+ goto yy2212;
} else {
- if (yych == '?') goto yy215;
- goto yy1;
+ if (yych == '?') goto yy1911;
+ goto yy1682;
}
} else {
if (yych <= '_') {
- if (yych <= 'Z') goto yy420;
- if (yych <= '^') goto yy1;
- goto yy420;
+ if (yych <= 'Z') goto yy2210;
+ if (yych <= '^') goto yy1682;
+ goto yy2210;
} else {
- if (yych <= '`') goto yy1;
- if (yych <= 'z') goto yy420;
- goto yy1;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'z') goto yy2210;
+ goto yy1682;
}
}
}
-yy421:
+yy2211:
yych = *++YYCURSOR;
if (yych <= ':') {
if (yych <= 0x1F) {
if (yych <= '\t') {
- if (yych <= 0x08) goto yy1;
- goto yy421;
+ if (yych <= 0x08) goto yy1682;
+ goto yy2211;
} else {
- if (yych == '\r') goto yy421;
- goto yy1;
+ if (yych == '\r') goto yy2211;
+ goto yy1682;
}
} else {
if (yych <= '-') {
- if (yych <= ' ') goto yy421;
- if (yych <= ',') goto yy1;
- goto yy420;
+ if (yych <= ' ') goto yy2211;
+ if (yych <= ',') goto yy1682;
+ goto yy2210;
} else {
- if (yych <= '.') goto yy1;
- if (yych <= '/') goto yy215;
- goto yy420;
+ if (yych <= '.') goto yy1682;
+ if (yych <= '/') goto yy1911;
+ goto yy2210;
}
}
} else {
if (yych <= '@') {
if (yych <= '=') {
- if (yych <= '<') goto yy1;
+ if (yych <= '<') goto yy1682;
} else {
- if (yych == '?') goto yy215;
- goto yy1;
+ if (yych == '?') goto yy1911;
+ goto yy1682;
}
} else {
if (yych <= '_') {
- if (yych <= 'Z') goto yy420;
- if (yych <= '^') goto yy1;
- goto yy420;
+ if (yych <= 'Z') goto yy2210;
+ if (yych <= '^') goto yy1682;
+ goto yy2210;
} else {
- if (yych <= '`') goto yy1;
- if (yych <= 'z') goto yy420;
- goto yy1;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'z') goto yy2210;
+ goto yy1682;
}
}
}
-yy422:
+yy2212:
yych = *++YYCURSOR;
if (yych <= '\'') {
if (yych <= '\r') {
if (yych <= 0x08) {
- if (yych <= 0x00) goto yy1;
- goto yy522;
+ if (yych <= 0x00) goto yy1682;
+ goto yy2368;
} else {
- if (yych <= '\t') goto yy523;
- if (yych <= '\f') goto yy522;
- goto yy523;
+ if (yych <= '\t') goto yy2369;
+ if (yych <= '\f') goto yy2368;
+ goto yy2369;
}
} else {
if (yych <= '!') {
- if (yych == ' ') goto yy523;
- goto yy522;
+ if (yych == ' ') goto yy2369;
+ goto yy2368;
} else {
- if (yych <= '"') goto yy524;
- if (yych <= '&') goto yy522;
- goto yy525;
+ if (yych <= '"') goto yy2370;
+ if (yych <= '&') goto yy2368;
+ goto yy2371;
}
}
} else {
if (yych <= 0xDF) {
if (yych <= '>') {
- if (yych <= '=') goto yy522;
- goto yy1;
+ if (yych <= '=') goto yy2368;
+ goto yy1682;
} else {
- if (yych <= 0x7F) goto yy522;
- if (yych <= 0xC1) goto yy1;
- goto yy526;
+ if (yych <= 0x7F) goto yy2368;
+ if (yych <= 0xC1) goto yy1682;
+ goto yy2372;
}
} else {
if (yych <= 0xF0) {
- if (yych <= 0xE0) goto yy527;
- if (yych <= 0xEF) goto yy528;
- goto yy529;
+ if (yych <= 0xE0) goto yy2373;
+ if (yych <= 0xEF) goto yy2374;
+ goto yy2375;
} else {
- if (yych <= 0xF3) goto yy530;
- if (yych <= 0xF4) goto yy531;
- goto yy1;
+ if (yych <= 0xF3) goto yy2376;
+ if (yych <= 0xF4) goto yy2377;
+ goto yy1682;
}
}
}
-yy423:
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= ':') {
- if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
+yy2213:
+ yych = *++YYCURSOR;
+ if (yych == ',') goto yy2378;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2213;
+ goto yy1682;
+yy2214:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy1682;
+ goto yy2065;
} else {
- if (yych <= '.') {
- if (yych <= ',') goto yy4;
- goto yy46;
- } else {
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy532;
- goto yy148;
- }
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2065;
+ goto yy1682;
}
} else {
- if (yych <= '^') {
- if (yych <= '@') {
- if (yych <= '?') goto yy4;
- goto yy96;
- } else {
- if (yych <= 'F') goto yy532;
- if (yych <= 'Z') goto yy115;
- goto yy4;
- }
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy2065;
+ if (yych <= '^') goto yy1682;
+ goto yy2065;
} else {
- if (yych <= '`') {
- if (yych <= '_') goto yy46;
- goto yy4;
- } else {
- if (yych <= 'f') goto yy532;
- if (yych <= 'z') goto yy115;
- goto yy4;
- }
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'z') goto yy2065;
+ goto yy1682;
}
}
-yy424:
- yych = *++YYCURSOR;
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy533;
- goto yy1;
-yy425:
- yyaccept = 15;
+yy2215:
+ yyaccept = 7;
yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy1773;
+ if (yych <= '9') goto yy2379;
+ goto yy1773;
+ } else {
+ if (yych <= 'F') goto yy2379;
+ if (yych <= '`') goto yy1773;
+ if (yych <= 'f') goto yy2379;
+ goto yy1773;
+ }
+yy2216:
+ yych = *++YYCURSOR;
if (yych <= '9') {
if (yych <= '%') {
- if (yych <= '$') goto yy222;
- goto yy461;
+ if (yych <= '$') goto yy1682;
+ goto yy2265;
} else {
- if (yych <= '.') goto yy222;
- if (yych <= '/') goto yy189;
- goto yy192;
+ if (yych <= '.') goto yy1682;
+ if (yych <= '/') goto yy1873;
+ goto yy1876;
}
} else {
if (yych <= 'F') {
- if (yych <= ':') goto yy462;
- if (yych <= '@') goto yy222;
- goto yy192;
+ if (yych <= ':') goto yy2380;
+ if (yych <= '@') goto yy1682;
+ goto yy1876;
} else {
- if (yych <= '`') goto yy222;
- if (yych <= 'f') goto yy192;
- goto yy222;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy1876;
+ goto yy1682;
}
}
-yy426:
- yyaccept = 0;
+yy2217:
+ yyaccept = 24;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= ',') {
- if (yych <= '!') {
- if (yych <= '\f') {
- if (yych <= 0x00) {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= '@') {
+ if (yych <= '/') {
+ if (yych <= ',') goto yy1893;
+ if (yych <= '.') goto yy2066;
+ goto yy1893;
+ } else {
+ if (yych <= '9') goto yy2055;
+ if (yych <= ':') goto yy2066;
+ goto yy1893;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy2055;
+ if (yych <= '^') goto yy1893;
+ goto yy2055;
+ } else {
+ if (yych <= '`') goto yy1893;
+ if (yych <= 'z') goto yy2055;
+ goto yy1893;
+ }
+ }
+yy2218:
+ yych = *++YYCURSOR;
+ if (yych <= '9') {
+ if (yych <= '/') {
+ if (yych == '-') goto yy2065;
+ goto yy1893;
+ } else {
+ if (yych <= '0') goto yy2381;
+ if (yych <= '1') goto yy2382;
+ if (yych <= '2') goto yy2383;
+ goto yy2381;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') goto yy1893;
+ if (yych <= 'Z') goto yy2055;
+ goto yy1893;
+ } else {
+ if (yych == '`') goto yy1893;
+ if (yych <= 'z') goto yy2055;
+ goto yy1893;
+ }
+ }
+yy2219:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '_') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= ',') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy2217;
}
- goto yy4;
+ yyt2 = YYCURSOR;
+ goto yy2218;
} else {
- if (yych <= '\r') {
- yyt4 = YYCURSOR;
- goto yy221;
- }
- if (yych <= 0x1F) goto yy4;
- if (yych <= ' ') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
}
- yyt4 = YYCURSOR;
- goto yy223;
+ if (yych <= '9') goto yy2384;
+ yyt2 = YYCURSOR;
}
} else {
- if (yych <= '&') {
- if (yych <= '"') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= 'F') {
+ if (yych <= '?') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
- if (yych == '%') goto yy80;
- goto yy4;
- } else {
- if (yych <= '\'') {
- yyt4 = YYCURSOR;
- goto yy224;
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
}
- if (yych <= '*') {
- yyt4 = YYCURSOR;
- goto yy221;
+ goto yy2384;
+ } else {
+ if (yych <= 'Z') goto yy2055;
+ if (yych <= '^') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
- if (yych <= '+') goto yy80;
- yyt4 = YYCURSOR;
- goto yy223;
+ yyt2 = YYCURSOR;
+ goto yy2057;
}
}
} else {
- if (yych <= '?') {
- if (yych <= '9') {
- if (yych <= '-') goto yy46;
- if (yych <= '.') {
- yyt4 = YYCURSOR;
- goto yy230;
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
- if (yych <= '/') goto yy4;
- goto yy532;
+ if (yych <= 'f') goto yy2384;
+ goto yy2055;
} else {
- if (yych <= ':') {
- yyt3 = YYCURSOR;
- goto yy234;
- }
- if (yych <= ';') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
- if (yych <= '>') goto yy4;
- yyt4 = YYCURSOR;
- goto yy223;
+ if (yych <= 0xC1) goto yy1650;
+ yyt2 = YYCURSOR;
+ goto yy1900;
}
} else {
- if (yych <= '^') {
- if (yych <= '@') goto yy96;
- if (yych <= 'F') goto yy532;
- if (yych <= 'Z') goto yy115;
- goto yy4;
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy1902;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1903;
} else {
- if (yych <= '`') {
- if (yych <= '_') goto yy46;
- goto yy4;
- } else {
- if (yych <= 'f') goto yy534;
- if (yych <= 'z') goto yy326;
- goto yy4;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
}
+ goto yy1650;
}
}
}
-yy427:
- ++YYCURSOR;
-yy428:
- YYCURSOR = yyt1;
-#line 262 "../../lnav/src/data_scanner_re.re"
- { RET(DT_CONSTANT); }
-#line 14275 "../../lnav/src/data_scanner_re.cc"
-yy429:
+yy2220:
yych = *++YYCURSOR;
- if (yych <= '\f') {
- if (yych == '\t') goto yy427;
- goto yy428;
- } else {
- if (yych <= '\r') goto yy427;
- if (yych == ' ') goto yy427;
- goto yy428;
- }
-yy430:
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[1024+yych] & 16) {
- goto yy46;
- }
- if (yych <= ' ') {
- if (yych <= '\f') {
- if (yych == '\t') goto yy427;
- goto yy4;
+ if (yych <= ':') {
+ if (yych <= ' ') {
+ if (yych <= 0x1F) goto yy1682;
+ goto yy1892;
} else {
- if (yych <= '\r') goto yy427;
- if (yych <= 0x1F) goto yy4;
- goto yy427;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2284;
+ goto yy1935;
}
} else {
- if (yych <= '*') {
- if (yych == '%') goto yy80;
- goto yy4;
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy1682;
+ goto yy2284;
} else {
- if (yych <= '+') goto yy80;
- if (yych == '@') goto yy96;
- goto yy4;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2284;
+ goto yy1682;
}
}
-yy431:
- yyaccept = 23;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == '/') goto yy189;
- if (yych == ':') goto yy152;
- goto yy428;
-yy432:
- yyaccept = 23;
+yy2221:
+ yyaccept = 7;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 128) {
- goto yy137;
- }
- if (yych <= '*') {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy225;
- if (yych <= 0x08) goto yy428;
- if (yych <= '\n') goto yy225;
- goto yy428;
+ if (yych <= '_') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= ',') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy2217;
+ }
+ yyt2 = YYCURSOR;
+ goto yy2224;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
+ }
+ if (yych <= '9') goto yy2384;
+ yyt2 = YYCURSOR;
+ goto yy2220;
+ }
} else {
- if (yych <= 0x1F) {
- if (yych <= '\r') goto yy225;
- goto yy428;
+ if (yych <= 'F') {
+ if (yych <= '?') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
+ }
+ goto yy2384;
} else {
- if (yych <= '"') goto yy225;
- if (yych <= '&') goto yy428;
- goto yy225;
+ if (yych <= 'Z') goto yy2055;
+ if (yych <= '^') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ yyt2 = YYCURSOR;
+ goto yy2057;
}
}
} else {
- if (yych <= '.') {
- if (yych == ',') goto yy225;
- if (yych <= '-') goto yy428;
- yyt4 = YYCURSOR;
- goto yy226;
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= 'f') goto yy2384;
+ goto yy2055;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= 0xC1) goto yy1650;
+ yyt2 = YYCURSOR;
+ goto yy1900;
+ }
} else {
- if (yych <= ';') {
- if (yych <= '9') goto yy428;
- goto yy225;
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy1902;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1903;
} else {
- if (yych == '?') goto yy225;
- goto yy428;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1650;
}
}
}
-yy433:
- yyaccept = 0;
+yy2222:
+ yyaccept = 7;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '.') {
- if (yych <= '!') {
- if (yych <= '\r') {
- if (yych <= 0x08) {
- if (yych <= 0x00) {
- yyt4 = YYCURSOR;
- goto yy221;
- }
- goto yy3;
- } else {
- if (yych <= '\n') {
- yyt4 = YYCURSOR;
- goto yy221;
- }
- if (yych <= '\f') goto yy3;
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= '_') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= ',') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy2217;
}
+ yyt2 = YYCURSOR;
+ goto yy2218;
} else {
- if (yych <= 0x1B) {
- if (yych <= 0x1A) goto yy3;
- goto yy5;
- } else {
- if (yych <= 0x1F) goto yy3;
- if (yych <= ' ') {
- yyt4 = YYCURSOR;
- goto yy221;
- }
- yyt4 = YYCURSOR;
- goto yy223;
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
}
+ if (yych <= '9') goto yy2385;
+ yyt2 = YYCURSOR;
+ goto yy2220;
}
} else {
- if (yych <= '&') {
- if (yych <= '#') {
- if (yych <= '"') {
- yyt4 = YYCURSOR;
- goto yy221;
- }
- goto yy5;
- } else {
- if (yych <= '$') goto yy3;
- if (yych <= '%') goto yy80;
- goto yy5;
+ if (yych <= 'F') {
+ if (yych <= '?') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
}
+ goto yy2384;
} else {
- if (yych <= '+') {
- if (yych <= '\'') {
- yyt4 = YYCURSOR;
- goto yy224;
- }
- if (yych <= '*') {
- yyt4 = YYCURSOR;
- goto yy221;
- }
- goto yy80;
- } else {
- if (yych <= ',') {
- yyt4 = YYCURSOR;
- goto yy223;
- }
- if (yych <= '-') goto yy46;
- yyt4 = YYCURSOR;
- goto yy230;
+ if (yych <= 'Z') goto yy2055;
+ if (yych <= '^') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
+ yyt2 = YYCURSOR;
+ goto yy2057;
}
}
} else {
- if (yych <= '`') {
- if (yych <= '>') {
- if (yych <= '9') {
- if (yych <= '/') goto yy3;
- goto yy46;
- } else {
- if (yych <= ':') {
- yyt3 = YYCURSOR;
- goto yy535;
- }
- if (yych <= ';') {
- yyt4 = YYCURSOR;
- goto yy221;
- }
- goto yy5;
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
+ if (yych <= 'f') goto yy2384;
+ goto yy2055;
} else {
- if (yych <= 'Z') {
- if (yych <= '?') {
- yyt4 = YYCURSOR;
- goto yy223;
- }
- if (yych <= '@') goto yy96;
- goto yy46;
- } else {
- if (yych == '_') goto yy46;
- goto yy5;
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
+ if (yych <= 0xC1) goto yy1650;
+ yyt2 = YYCURSOR;
+ goto yy1900;
}
} else {
- if (yych <= 0xDF) {
- if (yych <= '~') {
- if (yych <= 'z') goto yy433;
- goto yy5;
- } else {
- if (yych <= 0x7F) goto yy3;
- if (yych <= 0xC1) goto yy5;
- goto yy56;
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1901;
}
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy1902;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1903;
} else {
- if (yych <= 0xF0) {
- if (yych <= 0xE0) goto yy57;
- if (yych <= 0xEF) goto yy58;
- goto yy59;
- } else {
- if (yych <= 0xF3) goto yy60;
- if (yych <= 0xF4) goto yy61;
- goto yy5;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
}
+ goto yy1650;
}
}
}
-yy434:
- ++YYCURSOR;
-yy435:
- YYCURSOR = yyt1;
-#line 172 "../../lnav/src/data_scanner_re.re"
- { RET(DT_TIME); }
-#line 14484 "../../lnav/src/data_scanner_re.cc"
-yy436:
- yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy434;
- goto yy1;
-yy437:
- yych = *++YYCURSOR;
- if (yych <= 0x9F) goto yy1;
- if (yych <= 0xBF) goto yy436;
- goto yy1;
-yy438:
- yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy436;
- goto yy1;
-yy439:
- yych = *++YYCURSOR;
- if (yych <= 0x8F) goto yy1;
- if (yych <= 0xBF) goto yy438;
- goto yy1;
-yy440:
- yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy438;
- goto yy1;
-yy441:
- yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0x8F) goto yy438;
- goto yy1;
-yy442:
- yych = *++YYCURSOR;
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy536;
- goto yy1;
-yy443:
- yych = *++YYCURSOR;
- if (yych == 'r') goto yy537;
- goto yy100;
-yy444:
- yyaccept = 5;
+yy2223:
+ yyaccept = 7;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= ',') {
- if (yych <= 0x1F) {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy24;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy24;
- goto yy4;
+ if (yych <= '^') {
+ if (yych <= '9') {
+ if (yych <= '.') {
+ if (yych <= ',') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy2217;
+ }
+ yyt2 = YYCURSOR;
+ goto yy2218;
} else {
- if (yych <= '\r') goto yy24;
- if (yych == 0x1B) goto yy24;
- goto yy4;
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
+ }
+ if (yych <= '5') goto yy2385;
+ goto yy2384;
}
} else {
- if (yych <= '#') {
- if (yych == '!') goto yy99;
- if (yych <= '"') goto yy24;
- goto yy99;
- } else {
- if (yych <= '&') {
- if (yych <= '$') goto yy101;
- goto yy99;
- } else {
- if (yych <= '\'') goto yy24;
- if (yych <= '*') goto yy99;
- goto yy24;
+ if (yych <= '@') {
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2220;
}
+ if (yych <= '?') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ yyt2 = YYCURSOR;
+ goto yy2128;
+ } else {
+ if (yych <= 'F') goto yy2384;
+ if (yych <= 'Z') goto yy2055;
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
}
} else {
- if (yych <= '_') {
- if (yych <= 'Z') {
- if (yych <= '9') goto yy101;
- if (yych <= ':') goto yy4;
- if (yych <= '?') goto yy24;
- goto yy101;
+ if (yych <= 0xC1) {
+ if (yych <= 'f') {
+ if (yych <= '_') {
+ yyt2 = YYCURSOR;
+ goto yy2057;
+ }
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2384;
} else {
- if (yych <= '\\') {
- if (yych <= '[') goto yy24;
- goto yy99;
- } else {
- if (yych <= ']') goto yy24;
- if (yych <= '^') goto yy99;
- goto yy101;
+ if (yych <= 'z') goto yy2055;
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
+ goto yy1650;
}
} else {
- if (yych <= '}') {
- if (yych <= '`') goto yy24;
- if (yych <= 'a') goto yy538;
- if (yych <= 'z') goto yy101;
- goto yy24;
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy1900;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1902;
} else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy99;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy24;
- if (yych <= 0xF4) goto yy4;
- goto yy24;
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy1903;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
}
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1650;
}
}
}
-yy445:
- yyaccept = 0;
+yy2224:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy1893;
+ goto yy2065;
+ } else {
+ if (yych <= '/') goto yy1893;
+ if (yych <= '9') goto yy2055;
+ goto yy1893;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy2055;
+ if (yych <= '^') goto yy1893;
+ goto yy2055;
+ } else {
+ if (yych <= '`') goto yy1893;
+ if (yych <= 'z') goto yy2055;
+ goto yy1893;
+ }
+ }
+yy2225:
+ yyaccept = 7;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '1') {
- if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= ',') goto yy1650;
+ if (yych <= '-') goto yy2065;
+ goto yy2214;
+ } else {
+ if (yych <= '/') goto yy1650;
+ if (yych <= '9') goto yy2055;
+ goto yy2047;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') goto yy1650;
+ if (yych <= 'Z') goto yy2055;
+ goto yy1650;
+ } else {
+ if (yych == '`') goto yy1650;
+ if (yych <= 'z') goto yy2055;
+ goto yy1650;
+ }
+ }
+yy2226:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2386;
+ goto yy1682;
+yy2227:
+ yyaccept = 22;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '9') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy1762;
+ goto yy2265;
+ } else {
+ if (yych <= '.') goto yy1762;
+ if (yych <= '/') goto yy1873;
+ goto yy1876;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= ':') goto yy2380;
+ if (yych <= '@') goto yy1762;
+ goto yy1876;
+ } else {
+ if (yych <= '`') goto yy1762;
+ if (yych <= 'f') goto yy1876;
+ goto yy1762;
+ }
+ }
+yy2228:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy1761;
+ goto yy1697;
+ } else {
+ if (yych == '+') goto yy1697;
+ goto yy1761;
+ }
} else {
if (yych <= '.') {
- if (yych <= ',') goto yy4;
- goto yy46;
+ if (yych <= '-') goto yy1729;
+ yyt3 = YYCURSOR;
+ goto yy1928;
} else {
- if (yych <= '/') goto yy4;
- if (yych <= '0') goto yy539;
- goto yy540;
+ if (yych <= '/') goto yy1731;
+ if (yych <= '9') goto yy2379;
+ yyt3 = YYCURSOR;
+ goto yy1932;
}
}
} else {
- if (yych <= 'Z') {
- if (yych <= '9') {
- if (yych <= '2') goto yy541;
- goto yy539;
+ if (yych <= '^') {
+ if (yych <= '@') {
+ if (yych <= '?') goto yy1761;
+ goto yy1737;
} else {
- if (yych <= '?') goto yy4;
- if (yych <= '@') goto yy96;
- goto yy46;
+ if (yych <= 'F') goto yy2379;
+ if (yych <= 'Z') goto yy1772;
+ goto yy1761;
}
} else {
- if (yych <= '_') {
- if (yych <= '^') goto yy4;
- goto yy46;
+ if (yych <= '`') {
+ if (yych <= '_') goto yy1659;
+ goto yy1761;
} else {
- if (yych <= '`') goto yy4;
- if (yych <= 'z') goto yy46;
- goto yy4;
+ if (yych <= 'f') goto yy2387;
+ if (yych <= 'z') goto yy2062;
+ goto yy1761;
}
}
}
-yy446:
- yyaccept = 20;
- yych = *(YYMARKER = ++YYCURSOR);
+yy2229:
+ ++YYCURSOR;
+ goto yy2068;
+yy2230:
+ yych = *++YYCURSOR;
+ if (yych <= '\f') {
+ if (yych == '\t') goto yy2229;
+ goto yy2068;
+ } else {
+ if (yych <= '\r') goto yy2229;
+ if (yych == ' ') goto yy2229;
+ goto yy2068;
+ }
+yy2231:
+ yych = *++YYCURSOR;
if (yych <= '-') {
- if (yych <= 0x1B) {
- if (yych <= '\n') {
- if (yych <= 0x00) goto yy345;
- if (yych <= 0x08) goto yy4;
- goto yy345;
+ if (yych <= '\r') {
+ if (yych == '\t') goto yy2229;
+ if (yych <= '\f') goto yy1698;
+ goto yy2229;
+ } else {
+ if (yych == ' ') goto yy2229;
+ if (yych <= ',') goto yy1698;
+ goto yy1921;
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '/') goto yy1698;
+ if (yych <= '9') goto yy1922;
+ if (yych <= '@') goto yy1698;
+ goto yy1922;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy1698;
+ goto yy1922;
} else {
- if (yych == '\r') goto yy345;
- if (yych <= 0x1A) goto yy4;
- goto yy345;
+ if (yych <= '`') goto yy1698;
+ if (yych <= 'z') goto yy1922;
+ goto yy1698;
}
+ }
+ }
+yy2232:
+ yyaccept = 33;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '/') goto yy1873;
+ if (yych == ':') goto yy1935;
+ goto yy2068;
+yy2233:
+ yyaccept = 33;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '+') {
+ if (yych <= '\r') {
+ if (yych <= 0x08) goto yy2068;
+ if (yych <= '\n') goto yy1761;
+ if (yych <= '\f') goto yy2068;
+ goto yy1761;
} else {
- if (yych <= '%') {
- if (yych <= 0x1F) goto yy4;
- if (yych <= '#') goto yy345;
- if (yych <= '$') goto yy4;
- goto yy80;
+ if (yych <= '"') {
+ if (yych <= 0x1F) goto yy2068;
+ goto yy1761;
} else {
- if (yych == '+') goto yy80;
- if (yych <= ',') goto yy345;
- goto yy255;
+ if (yych <= '&') goto yy2068;
+ if (yych <= '*') goto yy1761;
+ goto yy2068;
}
}
} else {
- if (yych <= '^') {
- if (yych <= ':') {
- if (yych <= '.') goto yy445;
- if (yych <= '/') goto yy4;
- if (yych >= ':') goto yy4;
+ if (yych <= ';') {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy1761;
+ goto yy2068;
} else {
- if (yych <= '?') goto yy345;
- if (yych <= '@') goto yy96;
- if (yych >= '[') goto yy345;
+ if (yych <= '.') goto yy1761;
+ if (yych <= '9') goto yy2068;
+ goto yy1761;
}
} else {
- if (yych <= '~') {
- if (yych == '`') goto yy345;
- if (yych >= '{') goto yy345;
+ if (yych <= '?') {
+ if (yych <= '>') goto yy2068;
+ goto yy1761;
} else {
- if (yych <= 0x7F) goto yy4;
- if (yych <= 0xC1) goto yy345;
- if (yych <= 0xF4) goto yy4;
- goto yy345;
+ if (yych <= '`') goto yy2068;
+ if (yych <= 'z') goto yy1761;
+ goto yy2068;
}
}
}
-yy447:
- yyaccept = 20;
+yy2234:
+ yyaccept = 23;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '9') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy345;
- if (yych <= 0x08) goto yy3;
- if (yych <= '\n') goto yy345;
- goto yy3;
+ if (yybm_init[768+yych] & 4) {
+ goto yy1943;
+ }
+ if (yych <= '+') {
+ if (yych <= 0x1A) {
+ if (yych <= '\n') {
+ if (yych <= 0x00) goto yy1806;
+ if (yych <= 0x08) goto yy1700;
+ if (yych <= '\t') {
+ yyt3 = YYCURSOR;
+ goto yy1939;
+ }
+ yyt3 = YYCURSOR;
+ goto yy1918;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') goto yy345;
- goto yy3;
+ if (yych <= '\r') {
+ if (yych <= '\f') goto yy1700;
+ yyt3 = YYCURSOR;
+ goto yy1939;
} else {
- if (yych <= 0x1B) goto yy345;
- if (yych <= 0x1F) goto yy3;
- goto yy345;
+ if (yych == 0x16) goto yy1806;
+ goto yy1700;
}
}
} else {
- if (yych <= '+') {
- if (yych <= '$') goto yy3;
- if (yych <= '%') goto yy80;
- if (yych <= '*') goto yy345;
- goto yy80;
+ if (yych <= '!') {
+ if (yych <= 0x1B) goto yy1806;
+ if (yych <= 0x1F) goto yy1700;
+ if (yych <= ' ') {
+ yyt3 = YYCURSOR;
+ goto yy1939;
+ }
+ yyt3 = YYCURSOR;
+ goto yy1940;
} else {
- if (yych <= '-') {
- if (yych <= ',') goto yy345;
- goto yy255;
+ if (yych <= '&') {
+ if (yych <= '"') {
+ yyt3 = YYCURSOR;
+ goto yy1939;
+ }
+ goto yy1700;
} else {
- if (yych <= '.') goto yy350;
- if (yych <= '/') goto yy3;
- goto yy447;
+ if (yych <= '\'') goto yy2073;
+ if (yych <= '*') {
+ yyt3 = YYCURSOR;
+ goto yy1939;
+ }
+ goto yy1700;
}
}
}
} else {
- if (yych <= '~') {
- if (yych <= 'Z') {
- if (yych <= ':') goto yy62;
- if (yych <= '?') goto yy345;
- if (yych <= '@') goto yy96;
- goto yy447;
+ if (yych <= '\\') {
+ if (yych <= '9') {
+ if (yych <= ',') {
+ yyt3 = YYCURSOR;
+ goto yy1940;
+ }
+ if (yych == '.') {
+ yyt3 = YYCURSOR;
+ goto yy1942;
+ }
+ goto yy1700;
} else {
- if (yych <= '_') {
- if (yych <= '^') goto yy345;
- goto yy447;
+ if (yych <= '>') {
+ if (yych <= ';') {
+ yyt3 = YYCURSOR;
+ goto yy1939;
+ }
+ goto yy1700;
} else {
- if (yych <= '`') goto yy345;
- if (yych <= 'z') goto yy447;
- goto yy345;
+ if (yych <= '?') {
+ yyt3 = YYCURSOR;
+ goto yy1940;
+ }
+ if (yych <= '[') goto yy1700;
+ goto yy1703;
}
}
} else {
if (yych <= 0xE0) {
- if (yych <= 0x7F) goto yy3;
- if (yych <= 0xC1) goto yy345;
- if (yych <= 0xDF) goto yy56;
- goto yy57;
+ if (yych <= 0x7F) goto yy1700;
+ if (yych <= 0xC1) goto yy1806;
+ if (yych <= 0xDF) goto yy1704;
+ goto yy1705;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy58;
- goto yy59;
+ if (yych <= 0xEF) goto yy1706;
+ goto yy1707;
} else {
- if (yych <= 0xF3) goto yy60;
- if (yych <= 0xF4) goto yy61;
- goto yy345;
+ if (yych <= 0xF3) goto yy1708;
+ if (yych <= 0xF4) goto yy1709;
+ goto yy1806;
}
}
}
}
-yy448:
- yyaccept = 20;
+yy2235:
+ yyaccept = 14;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '.') {
- if (yych <= 0x1F) {
+ if (yych <= ',') {
+ if (yych <= '!') {
if (yych <= '\f') {
- if (yych <= 0x00) goto yy345;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy345;
- goto yy4;
+ if (yych <= 0x08) {
+ yyt3 = YYCURSOR;
+ goto yy1762;
+ }
+ if (yych <= '\n') {
+ yyt3 = YYCURSOR;
+ goto yy1918;
+ }
+ yyt3 = YYCURSOR;
+ goto yy1762;
} else {
- if (yych <= '\r') goto yy345;
- if (yych == 0x1B) goto yy345;
- goto yy4;
+ if (yych <= '\r') {
+ yyt3 = YYCURSOR;
+ goto yy1918;
+ }
+ if (yych <= 0x1F) {
+ yyt3 = YYCURSOR;
+ goto yy1762;
+ }
+ if (yych <= ' ') {
+ yyt3 = YYCURSOR;
+ goto yy1918;
+ }
+ yyt3 = YYCURSOR;
+ goto yy1919;
}
} else {
- if (yych <= '*') {
- if (yych <= '#') goto yy345;
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy80;
- goto yy345;
+ if (yych <= '&') {
+ if (yych <= '"') {
+ yyt3 = YYCURSOR;
+ goto yy1918;
+ }
+ if (yych == '%') goto yy1697;
+ yyt3 = YYCURSOR;
+ goto yy1762;
} else {
- if (yych <= '+') goto yy80;
- if (yych <= ',') goto yy345;
- if (yych <= '-') goto yy255;
- goto yy445;
+ if (yych <= '\'') goto yy1760;
+ if (yych <= '*') {
+ yyt3 = YYCURSOR;
+ goto yy1918;
+ }
+ if (yych <= '+') goto yy1697;
+ yyt3 = YYCURSOR;
+ goto yy1919;
}
}
} else {
- if (yych <= '^') {
- if (yych <= ':') {
- if (yych <= '/') goto yy4;
- if (yych <= '5') goto yy446;
- if (yych <= '9') goto yy447;
- goto yy4;
+ if (yych <= '>') {
+ if (yych <= '/') {
+ if (yych <= '-') goto yy1729;
+ if (yych <= '.') {
+ yyt3 = YYCURSOR;
+ goto yy2388;
+ }
+ goto yy1731;
} else {
- if (yych <= '?') goto yy345;
- if (yych <= '@') goto yy96;
- if (yych <= 'Z') goto yy447;
- goto yy345;
+ if (yych <= '9') goto yy1745;
+ if (yych <= ':') {
+ yyt3 = YYCURSOR;
+ goto yy2389;
+ }
+ if (yych <= ';') {
+ yyt3 = YYCURSOR;
+ goto yy1918;
+ }
+ yyt3 = YYCURSOR;
+ goto yy1762;
}
} else {
- if (yych <= '~') {
- if (yych == '`') goto yy345;
- if (yych <= 'z') goto yy447;
- goto yy345;
+ if (yych <= '^') {
+ if (yych <= '?') {
+ yyt3 = YYCURSOR;
+ goto yy1919;
+ }
+ if (yych <= '@') goto yy1737;
+ if (yych <= 'Z') goto yy1745;
+ yyt3 = YYCURSOR;
+ goto yy1762;
} else {
- if (yych <= 0x7F) goto yy4;
- if (yych <= 0xC1) goto yy345;
- if (yych <= 0xF4) goto yy4;
- goto yy345;
+ if (yych <= '_') goto yy1745;
+ if (yych <= '`') {
+ yyt3 = YYCURSOR;
+ goto yy1762;
+ }
+ if (yych <= 'z') goto yy2235;
+ yyt3 = YYCURSOR;
+ goto yy1762;
}
}
}
-yy449:
- yyaccept = 24;
+yy2236:
+ ++YYCURSOR;
+yy2237:
+ YYCURSOR = yyt1;
+#line 294 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_TIME); }
+#line 58652 "../../lnav/src/data_scanner_re.cc"
+yy2238:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2236;
+ goto yy1682;
+yy2239:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy1682;
+ if (yych <= 0xBF) goto yy2238;
+ goto yy1682;
+yy2240:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2238;
+ goto yy1682;
+yy2241:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy1682;
+ if (yych <= 0xBF) goto yy2240;
+ goto yy1682;
+yy2242:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2240;
+ goto yy1682;
+yy2243:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0x8F) goto yy2240;
+ goto yy1682;
+yy2244:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2390;
+ goto yy1682;
+yy2245:
+ yych = *++YYCURSOR;
+ if (yych == 'B') goto yy2081;
+ if (yych == 'b') goto yy2081;
+ goto yy1698;
+yy2246:
+ yych = *++YYCURSOR;
+ if (yych <= 'a') {
+ if (yych == 'B') goto yy2081;
+ goto yy1698;
+ } else {
+ if (yych <= 'b') goto yy2081;
+ if (yych == 'n') goto yy2081;
+ goto yy1698;
+ }
+yy2247:
+ yych = *++YYCURSOR;
+ if (yych == '+') goto yy1889;
+ if (yych == '-') goto yy1889;
+ goto yy1698;
+yy2248:
+ yyaccept = 28;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '9') {
- if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych >= '+') goto yy80;
+ if (yybm_init[1024+yych] & 128) {
+ goto yy1850;
+ }
+ if (yych <= 0xE0) {
+ if (yych <= '*') {
+ if (yych <= 0x00) goto yy1967;
+ goto yy1964;
} else {
- if (yych <= ',') goto yy450;
- if (yych <= '.') goto yy80;
- if (yych >= '0') goto yy449;
+ if (yych <= 0xC1) goto yy1967;
+ if (yych <= 0xDF) goto yy1852;
+ goto yy1853;
}
} else {
- if (yych <= '^') {
- if (yych <= '?') goto yy450;
- if (yych <= '@') goto yy82;
- if (yych <= 'Z') goto yy80;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy1854;
+ goto yy1855;
} else {
- if (yych == '`') goto yy450;
- if (yych <= 'z') goto yy80;
+ if (yych <= 0xF3) goto yy1856;
+ if (yych <= 0xF4) goto yy1857;
+ goto yy1967;
}
}
-yy450:
-#line 249 "../../lnav/src/data_scanner_re.re"
- { RET(DT_NUMBER); }
-#line 14829 "../../lnav/src/data_scanner_re.cc"
-yy451:
- yyaccept = 24;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '9') {
- if (yych <= 0x1F) {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy450;
- if (yych <= 0x08) goto yy3;
- if (yych <= '\n') goto yy450;
- goto yy3;
- } else {
- if (yych <= '\r') goto yy450;
- if (yych == 0x1B) goto yy450;
- goto yy3;
- }
+yy2249:
+ yych = *++YYCURSOR;
+ if (yych == 'a') goto yy2391;
+ goto yy1722;
+yy2250:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '1') {
+ if (yych <= '/') goto yy1698;
+ if (yych <= '0') goto yy2392;
+ goto yy2393;
} else {
- if (yych <= '*') {
- if (yych <= '#') goto yy450;
- if (yych <= '$') goto yy3;
- if (yych <= '%') goto yy80;
- goto yy450;
- } else {
- if (yych <= ',') {
- if (yych <= '+') goto yy80;
- goto yy450;
- } else {
- if (yych <= '.') goto yy46;
- if (yych <= '/') goto yy3;
- goto yy451;
- }
- }
+ if (yych <= '2') goto yy2394;
+ if (yych <= '9') goto yy2392;
+ goto yy1698;
}
} else {
- if (yych <= '~') {
- if (yych <= 'Z') {
- if (yych <= ':') goto yy62;
- if (yych <= '?') goto yy450;
- if (yych <= '@') goto yy96;
- goto yy344;
- } else {
- if (yych <= '_') {
- if (yych <= '^') goto yy450;
- goto yy344;
- } else {
- if (yych <= '`') goto yy450;
- if (yych <= 'z') goto yy344;
- goto yy450;
- }
- }
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy1745;
+ if (yych <= '^') goto yy1698;
+ goto yy1745;
} else {
- if (yych <= 0xE0) {
- if (yych <= 0x7F) goto yy3;
- if (yych <= 0xC1) goto yy450;
- if (yych <= 0xDF) goto yy56;
- goto yy57;
- } else {
- if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy58;
- goto yy59;
- } else {
- if (yych <= 0xF3) goto yy60;
- if (yych <= 0xF4) goto yy61;
- goto yy450;
- }
- }
+ if (yych <= '`') goto yy1698;
+ if (yych <= 'z') goto yy1745;
+ goto yy1698;
}
}
-yy452:
- yych = *++YYCURSOR;
- if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy542;
- if (yych <= ':') goto yy152;
- goto yy1;
- } else {
- if (yych <= 'F') goto yy542;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy542;
- goto yy1;
- }
-yy453:
- yyaccept = 0;
+yy2251:
+ yyaccept = 29;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych == '/') goto yy543;
- goto yy4;
-yy454:
- yych = *++YYCURSOR;
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy544;
- goto yy1;
-yy455:
- yyaccept = 0;
+ if (yych == '.') goto yy2250;
+ goto yy2253;
+yy2252:
+ yyaccept = 29;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '/') {
+yy2253:
+ if (yych <= '9') {
if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
+ if (yych == '%') goto yy1697;
+ if (yych <= '*') goto yy2095;
+ goto yy1697;
} else {
- if (yych <= ',') goto yy4;
- if (yych <= '-') goto yy545;
- if (yych <= '.') goto yy46;
- goto yy4;
+ if (yych <= '-') {
+ if (yych <= ',') goto yy2095;
+ goto yy1969;
+ } else {
+ if (yych <= '.') goto yy2101;
+ if (yych <= '/') goto yy1731;
+ goto yy2252;
+ }
}
} else {
if (yych <= 'Z') {
- if (yych <= '9') goto yy546;
- if (yych <= '?') goto yy4;
- if (yych <= '@') goto yy96;
- goto yy46;
+ if (yych <= ':') goto yy1881;
+ if (yych <= '?') goto yy2095;
+ if (yych <= '@') goto yy1737;
+ goto yy2252;
} else {
if (yych <= '_') {
- if (yych <= '^') goto yy4;
- goto yy46;
+ if (yych <= '^') goto yy2095;
+ goto yy2252;
} else {
- if (yych <= '`') goto yy4;
- if (yych <= 'z') goto yy46;
- goto yy4;
+ if (yych <= '`') goto yy2095;
+ if (yych <= 'z') goto yy2252;
+ goto yy2095;
}
}
}
-yy456:
- yyaccept = 0;
+yy2254:
+ yyaccept = 29;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '.') goto yy4;
- if (yych <= '/') goto yy547;
- if (yych <= '9') goto yy548;
- goto yy4;
-yy457:
- yyaccept = 11;
+ if (yych == '.') goto yy2250;
+ if (yych <= '/') goto yy2253;
+ if (yych <= '5') goto yy2251;
+ goto yy2253;
+yy2255:
+ yyaccept = 21;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
- }
- if (yych <= '9') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy109;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy109;
- goto yy4;
- } else {
- if (yych <= 0x1A) {
- if (yych <= '\r') goto yy109;
- goto yy4;
- } else {
- if (yych <= 0x1B) goto yy109;
- if (yych <= 0x1F) goto yy4;
- goto yy109;
- }
- }
- } else {
- if (yych <= ',') {
- if (yych <= '%') {
- if (yych <= '$') goto yy4;
- goto yy105;
- } else {
- if (yych == '+') goto yy80;
- goto yy109;
- }
- } else {
- if (yych <= '.') {
- if (yych <= '-') goto yy46;
- goto yy266;
- } else {
- if (yych <= '/') goto yy4;
- if (yych <= '7') goto yy549;
- goto yy550;
- }
- }
- }
+ switch (yych) {
+ case '%':
+ case '+':
+ case '-':
+ case '.':
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'E':
+ case 'F':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'e':
+ case 'f':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy1697;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy2255;
+ case '@': goto yy1699;
+ case 'B':
+ case 'S':
+ case 'b':
+ case 's': goto yy2081;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy2083;
+ case 'm': goto yy2084;
+ case 'p':
+ case 'u': goto yy2085;
+ default: goto yy1861;
+ }
+yy2256:
+ yyaccept = 21;
+ yych = *(YYMARKER = ++YYCURSOR);
+ switch (yych) {
+ case '%':
+ case '+': goto yy1697;
+ case '-':
+ case '.': goto yy1729;
+ case '/': goto yy1731;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy2256;
+ case ':': goto yy1881;
+ case '@': goto yy1737;
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'E':
+ case 'F':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'e':
+ case 'f':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy2093;
+ case 'B':
+ case 'S':
+ case 'b':
+ case 's': goto yy2395;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy2396;
+ case 'm': goto yy2397;
+ case 'p':
+ case 'u': goto yy2398;
+ default: goto yy1861;
+ }
+yy2257:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2399;
+ if (yych <= ':') goto yy1731;
+ goto yy1682;
} else {
- if (yych <= '_') {
- if (yych <= 'D') {
- if (yych <= ':') goto yy148;
- if (yych <= '?') goto yy109;
- if (yych <= '@') goto yy96;
- goto yy551;
- } else {
- if (yych <= 'F') {
- if (yych <= 'E') goto yy552;
- goto yy551;
- } else {
- if (yych <= 'Z') goto yy115;
- if (yych <= '^') goto yy109;
- goto yy46;
- }
- }
- } else {
- if (yych <= 'z') {
- if (yych <= 'd') {
- if (yych <= '`') goto yy109;
- goto yy551;
- } else {
- if (yych <= 'e') goto yy552;
- if (yych <= 'f') goto yy551;
- goto yy115;
- }
- } else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy109;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy109;
- if (yych <= 0xF4) goto yy4;
- goto yy109;
- }
- }
- }
+ if (yych <= 'F') goto yy2399;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2399;
+ goto yy1682;
}
-yy458:
- yyaccept = 6;
+yy2258:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
+ if (yych == '/') goto yy2400;
+ goto yy1865;
+yy2259:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2401;
+ goto yy1682;
+yy2260:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '-') goto yy2402;
+ if (yych <= '/') goto yy1746;
+ if (yych <= '9') goto yy2403;
+ goto yy1746;
+yy2261:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '.') goto yy1865;
+ if (yych <= '/') goto yy2404;
+ if (yych <= '9') goto yy2405;
+ goto yy1865;
+yy2262:
+ yyaccept = 11;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
}
if (yych <= '9') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy26;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy26;
- goto yy4;
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy1733;
+ goto yy1727;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') goto yy26;
- goto yy4;
- } else {
- if (yych <= 0x1B) goto yy26;
- if (yych <= 0x1F) goto yy4;
- goto yy26;
- }
+ if (yych == '+') goto yy1697;
+ goto yy1733;
}
} else {
- if (yych <= '+') {
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy105;
- if (yych <= '*') goto yy26;
- goto yy80;
+ if (yych <= '.') {
+ if (yych <= '-') goto yy1729;
+ goto yy1985;
} else {
- if (yych <= '-') {
- if (yych <= ',') goto yy26;
- goto yy46;
- } else {
- if (yych <= '.') goto yy266;
- if (yych <= '/') goto yy4;
- goto yy550;
- }
+ if (yych <= '/') goto yy1731;
+ if (yych <= '7') goto yy2406;
+ goto yy2407;
}
}
} else {
- if (yych <= '_') {
- if (yych <= 'D') {
- if (yych <= ':') goto yy148;
- if (yych <= '?') goto yy26;
- if (yych <= '@') goto yy96;
- goto yy551;
+ if (yych <= 'Z') {
+ if (yych <= '?') {
+ if (yych <= ':') goto yy1879;
+ goto yy1733;
} else {
- if (yych <= 'F') {
- if (yych <= 'E') goto yy552;
- goto yy551;
- } else {
- if (yych <= 'Z') goto yy115;
- if (yych <= '^') goto yy26;
- goto yy46;
- }
+ if (yych <= '@') goto yy1737;
+ if (yych <= 'F') goto yy2408;
+ goto yy1742;
}
} else {
- if (yych <= 'z') {
- if (yych <= 'd') {
- if (yych <= '`') goto yy26;
- goto yy551;
- } else {
- if (yych <= 'e') goto yy552;
- if (yych <= 'f') goto yy551;
- goto yy115;
- }
+ if (yych <= '`') {
+ if (yych == '_') goto yy1745;
+ goto yy1733;
} else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy26;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy26;
- if (yych <= 0xF4) goto yy4;
- goto yy26;
- }
+ if (yych <= 'f') goto yy2408;
+ if (yych <= 'z') goto yy1742;
+ goto yy1733;
}
}
}
-yy459:
+yy2263:
yyaccept = 12;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '/') {
- if (yych <= 0x1F) {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy113;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy113;
- goto yy4;
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ if (yych <= ':') {
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy1735;
+ goto yy1727;
} else {
- if (yych <= '\r') goto yy113;
- if (yych == 0x1B) goto yy113;
- goto yy4;
+ if (yych == '+') goto yy1697;
+ goto yy1735;
}
} else {
- if (yych <= '*') {
- if (yych <= '#') goto yy113;
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy80;
- goto yy113;
+ if (yych <= '.') {
+ if (yych <= '-') goto yy1729;
+ goto yy1985;
} else {
- if (yych <= '+') goto yy80;
- if (yych <= ',') goto yy113;
- if (yych <= '.') goto yy46;
- goto yy4;
+ if (yych <= '/') goto yy1731;
+ if (yych <= '9') goto yy2407;
+ goto yy1879;
}
}
} else {
- if (yych <= '_') {
+ if (yych <= '^') {
if (yych <= '@') {
- if (yych <= '9') goto yy551;
- if (yych <= ':') goto yy148;
- if (yych <= '?') goto yy113;
- goto yy96;
+ if (yych <= '?') goto yy1735;
+ goto yy1737;
} else {
- if (yych <= 'F') goto yy551;
- if (yych <= 'Z') goto yy115;
- if (yych <= '^') goto yy113;
- goto yy46;
+ if (yych <= 'F') goto yy2408;
+ if (yych <= 'Z') goto yy1742;
+ goto yy1735;
}
} else {
- if (yych <= '~') {
- if (yych <= '`') goto yy113;
- if (yych <= 'f') goto yy551;
- if (yych <= 'z') goto yy115;
- goto yy113;
+ if (yych <= '`') {
+ if (yych <= '_') goto yy1745;
+ goto yy1735;
} else {
- if (yych <= 0x7F) goto yy4;
- if (yych <= 0xC1) goto yy113;
- if (yych <= 0xF4) goto yy4;
- goto yy113;
+ if (yych <= 'f') goto yy2408;
+ if (yych <= 'z') goto yy1742;
+ goto yy1735;
}
}
}
-yy460:
+yy2264:
yyaccept = 12;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '.') {
- if (yych <= 0x1F) {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy113;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy113;
- goto yy4;
- } else {
- if (yych <= '\r') goto yy113;
- if (yych == 0x1B) goto yy113;
- goto yy4;
- }
+ if (yych <= '?') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1743;
+ if (yych <= '*') goto yy1735;
+ goto yy1743;
} else {
- if (yych <= '*') {
- if (yych <= '#') goto yy113;
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy80;
- goto yy113;
+ if (yych <= '/') {
+ if (yych <= ',') goto yy1735;
+ goto yy1743;
} else {
- if (yych <= '+') goto yy194;
- if (yych <= ',') goto yy113;
- if (yych <= '-') goto yy251;
- goto yy46;
+ if (yych <= '9') goto yy2408;
+ if (yych <= ':') goto yy1743;
+ goto yy1735;
}
}
} else {
if (yych <= '^') {
- if (yych <= '?') {
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy551;
- if (yych <= ':') goto yy148;
- goto yy113;
- } else {
- if (yych <= '@') goto yy96;
- if (yych <= 'F') goto yy551;
- if (yych <= 'Z') goto yy115;
- goto yy113;
- }
+ if (yych <= '@') goto yy1743;
+ if (yych <= 'F') goto yy2408;
+ if (yych <= 'Z') goto yy1743;
+ goto yy1735;
} else {
- if (yych <= 'z') {
- if (yych <= '_') goto yy46;
- if (yych <= '`') goto yy113;
- if (yych <= 'f') goto yy551;
- goto yy115;
+ if (yych <= '`') {
+ if (yych <= '_') goto yy1743;
+ goto yy1735;
} else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy113;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy113;
- if (yych <= 0xF4) goto yy4;
- goto yy113;
- }
+ if (yych <= 'f') goto yy2408;
+ if (yych <= 'z') goto yy1743;
+ goto yy1735;
}
}
}
-yy461:
+yy2265:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy553;
- goto yy1;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2409;
+ goto yy1682;
} else {
- if (yych <= 'Z') goto yy553;
- if (yych <= '`') goto yy1;
- if (yych <= 'z') goto yy553;
- goto yy1;
+ if (yych <= 'Z') goto yy2409;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'z') goto yy2409;
+ goto yy1682;
}
-yy462:
+yy2266:
yych = *++YYCURSOR;
- if (yych <= '?') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) {
- yyt2 = YYCURSOR;
- goto yy198;
- }
- if (yych <= 0x08) {
- yyt2 = YYCURSOR;
- goto yy284;
- }
- if (yych <= '\n') {
+ if (yych <= '_') {
+ if (yych <= '9') {
+ if (yych <= '0') {
+ if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- yyt2 = YYCURSOR;
- goto yy284;
+ goto yy2410;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') {
- yyt2 = YYCURSOR;
- goto yy198;
- }
- yyt2 = YYCURSOR;
- goto yy284;
- } else {
- if (yych <= 0x1B) {
- yyt2 = YYCURSOR;
- goto yy198;
- }
- if (yych <= 0x1F) {
- yyt2 = YYCURSOR;
- goto yy284;
- }
- yyt2 = YYCURSOR;
- goto yy198;
- }
+ if (yych <= '1') goto yy2411;
+ if (yych <= '2') goto yy2412;
+ goto yy2410;
}
} else {
- if (yych <= '0') {
- if (yych <= '$') {
- yyt2 = YYCURSOR;
- goto yy284;
- }
- if (yych <= ',') {
+ if (yych <= 'F') {
+ if (yych <= ':') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1897;
}
- if (yych <= '/') {
+ if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1892;
}
- goto yy554;
+ goto yy2413;
} else {
- if (yych <= '2') {
- if (yych <= '1') goto yy555;
- goto yy556;
- } else {
- if (yych <= '9') goto yy554;
- if (yych <= ':') goto yy1;
+ if (yych <= 'Z') goto yy1864;
+ if (yych <= '^') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
+ yyt2 = YYCURSOR;
+ goto yy2007;
}
}
} else {
- if (yych <= '~') {
- if (yych <= '^') {
- if (yych <= '@') {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1892;
}
- if (yych <= 'F') goto yy557;
- if (yych <= 'Z') goto yy3;
- yyt2 = YYCURSOR;
- goto yy198;
+ if (yych <= 'f') goto yy2413;
+ goto yy1864;
} else {
- if (yych <= '`') {
- if (yych <= '_') {
- yyt2 = YYCURSOR;
- goto yy284;
- }
- yyt2 = YYCURSOR;
- goto yy198;
- } else {
- if (yych <= 'f') goto yy557;
- if (yych <= 'z') goto yy3;
+ if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
+ if (yych <= 0xC1) goto yy1682;
+ yyt2 = YYCURSOR;
+ goto yy1900;
}
} else {
- if (yych <= 0xE0) {
- if (yych <= 0x7F) {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1901;
}
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) {
+ if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy289;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy290;
+ goto yy1903;
} else {
- if (yych <= 0xF0) {
- if (yych <= 0xEF) {
- yyt2 = YYCURSOR;
- goto yy291;
- }
+ if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy292;
- } else {
- if (yych <= 0xF3) {
- yyt2 = YYCURSOR;
- goto yy293;
- }
- if (yych <= 0xF4) {
- yyt2 = YYCURSOR;
- goto yy294;
- }
- goto yy1;
+ goto yy1904;
}
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1682;
}
}
}
-yy463:
- yyaccept = 25;
+yy2267:
+ yyaccept = 34;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '@') {
- if (yych <= '/') goto yy435;
- if (yych <= '9') goto yy542;
- goto yy435;
+ if (yych <= '/') goto yy2237;
+ if (yych <= '9') goto yy2399;
+ goto yy2237;
} else {
- if (yych <= 'F') goto yy542;
- if (yych <= '`') goto yy435;
- if (yych <= 'f') goto yy542;
- goto yy435;
+ if (yych <= 'F') goto yy2399;
+ if (yych <= '`') goto yy2237;
+ if (yych <= 'f') goto yy2399;
+ goto yy2237;
}
-yy464:
- yyaccept = 25;
+yy2268:
+ yyaccept = 34;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '@') {
- if (yych <= '/') goto yy435;
- if (yych <= '9') goto yy468;
- if (yych <= ':') goto yy282;
- goto yy435;
+ if (yych <= '/') goto yy2237;
+ if (yych <= '9') goto yy2272;
+ if (yych <= ':') goto yy2001;
+ goto yy2237;
} else {
- if (yych <= 'F') goto yy468;
- if (yych <= '`') goto yy435;
- if (yych <= 'f') goto yy468;
- goto yy435;
+ if (yych <= 'F') goto yy2272;
+ if (yych <= '`') goto yy2237;
+ if (yych <= 'f') goto yy2272;
+ goto yy2237;
}
-yy465:
+yy2269:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy558;
- if (yych <= ':') goto yy375;
- goto yy1;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2414;
+ if (yych <= ':') goto yy2127;
+ goto yy1682;
} else {
- if (yych <= 'F') goto yy559;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy559;
- goto yy1;
+ if (yych <= 'F') goto yy2415;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2415;
+ goto yy1682;
}
-yy466:
+yy2270:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy542;
- goto yy1;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2399;
+ goto yy1682;
} else {
- if (yych <= 'F') goto yy542;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy542;
- goto yy1;
+ if (yych <= 'F') goto yy2399;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2399;
+ goto yy1682;
}
-yy467:
+yy2271:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy559;
- if (yych <= ':') goto yy375;
- goto yy1;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2415;
+ if (yych <= ':') goto yy2127;
+ goto yy1682;
} else {
- if (yych <= 'F') goto yy559;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy559;
- goto yy1;
+ if (yych <= 'F') goto yy2415;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2415;
+ goto yy1682;
}
-yy468:
+yy2272:
yych = *++YYCURSOR;
- if (yych == ':') goto yy282;
- goto yy1;
-yy469:
+ if (yych == ':') goto yy2001;
+ goto yy1682;
+yy2273:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy560;
- if (yych <= ':') goto yy471;
- goto yy1;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2416;
+ if (yych <= ':') goto yy2275;
+ goto yy1682;
} else {
- if (yych <= 'F') goto yy470;
- if (yych <= '`') goto yy1;
- if (yych >= 'g') goto yy1;
+ if (yych <= 'F') goto yy2274;
+ if (yych <= '`') goto yy1682;
+ if (yych >= 'g') goto yy1682;
}
-yy470:
+yy2274:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy561;
- if (yych >= ';') goto yy1;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2417;
+ if (yych >= ';') goto yy1682;
} else {
- if (yych <= 'F') goto yy561;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy561;
- goto yy1;
+ if (yych <= 'F') goto yy2417;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2417;
+ goto yy1682;
}
-yy471:
+yy2275:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy562;
- if (yych <= ':') goto yy563;
- goto yy1;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2418;
+ if (yych <= ':') goto yy2419;
+ goto yy1682;
} else {
- if (yych <= 'F') goto yy562;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy562;
- goto yy1;
+ if (yych <= 'F') goto yy2418;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2418;
+ goto yy1682;
}
-yy472:
+yy2276:
yych = *++YYCURSOR;
if (yych <= 'f') {
if (yych <= ':') {
if (yych <= '.') {
if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- yyt1 = YYCURSOR;
- goto yy297;
+ yyt4 = YYCURSOR;
+ goto yy2420;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '9') goto yy564;
- goto yy565;
+ if (yych <= '9') goto yy2421;
+ yyt4 = YYCURSOR;
+ goto yy2422;
}
} else {
if (yych <= 'F') {
if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy566;
+ goto yy2423;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy566;
+ goto yy2423;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy473:
+yy2277:
yych = *++YYCURSOR;
if (yych <= 'f') {
if (yych <= ':') {
if (yych <= '.') {
if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- yyt1 = YYCURSOR;
- goto yy297;
+ yyt4 = YYCURSOR;
+ goto yy2420;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '9') goto yy567;
- goto yy565;
+ if (yych <= '9') goto yy2424;
+ yyt4 = YYCURSOR;
+ goto yy2422;
}
} else {
if (yych <= 'F') {
if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy566;
+ goto yy2423;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy566;
+ goto yy2423;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy474:
+yy2278:
yych = *++YYCURSOR;
if (yych <= '`') {
if (yych <= '5') {
if (yych <= '.') {
if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- yyt1 = YYCURSOR;
- goto yy297;
+ yyt4 = YYCURSOR;
+ goto yy2420;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '4') goto yy567;
- goto yy568;
+ if (yych <= '4') goto yy2424;
+ goto yy2425;
}
} else {
if (yych <= '@') {
- if (yych <= '9') goto yy564;
- if (yych <= ':') goto yy565;
+ if (yych <= '9') goto yy2421;
+ if (yych <= ':') {
+ yyt4 = YYCURSOR;
+ goto yy2422;
+ }
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 'F') goto yy566;
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'F') goto yy2423;
+ if (yych <= 'Z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
}
} else {
if (yych <= 0xDF) {
if (yych <= 'z') {
- if (yych <= 'f') goto yy566;
- goto yy1;
+ if (yych <= 'f') goto yy2423;
+ goto yy1682;
} else {
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy475:
+yy2279:
yych = *++YYCURSOR;
if (yych <= 'z') {
if (yych <= '@') {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
+ }
+ if (yych <= '9') goto yy2423;
+ if (yych <= ':') {
+ yyt4 = YYCURSOR;
+ goto yy2422;
}
- if (yych <= '9') goto yy566;
- if (yych <= ':') goto yy565;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
if (yych <= 'Z') {
- if (yych <= 'F') goto yy566;
- goto yy1;
+ if (yych <= 'F') goto yy2423;
+ goto yy1682;
} else {
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 'f') goto yy566;
- goto yy1;
+ if (yych <= 'f') goto yy2423;
+ goto yy1682;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy476:
- yyaccept = 0;
+yy2280:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych == '.') goto yy569;
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy570;
- goto yy4;
-yy477:
- yyaccept = 0;
+ if (yych == '.') goto yy2426;
+ if (yych <= '/') goto yy1865;
+ if (yych <= '9') goto yy2427;
+ goto yy1865;
+yy2281:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych == '.') goto yy569;
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy476;
- goto yy4;
-yy478:
- yyaccept = 0;
+ if (yych == '.') goto yy2426;
+ if (yych <= '/') goto yy1865;
+ if (yych <= '9') goto yy2280;
+ goto yy1865;
+yy2282:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '/') {
- if (yych == '.') goto yy569;
- goto yy4;
+ if (yych == '.') goto yy2426;
+ goto yy1865;
} else {
- if (yych <= '4') goto yy476;
- if (yych <= '5') goto yy571;
- if (yych <= '9') goto yy570;
- goto yy4;
+ if (yych <= '4') goto yy2280;
+ if (yych <= '5') goto yy2428;
+ if (yych <= '9') goto yy2427;
+ goto yy1865;
}
-yy479:
- yyaccept = 0;
+yy2283:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '@') {
- if (yych <= 0x1F) {
- if (yych <= '\f') {
- if (yych <= 0x00) {
+ if (yych <= '`') {
+ if (yych <= '?') {
+ if (yych <= '/') {
+ if (yych <= ',') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 0x08) {
+ yyt2 = YYCURSOR;
+ goto yy2128;
+ } else {
+ if (yych <= '9') goto yy2429;
+ if (yych <= ':') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy2131;
}
- if (yych <= '\n') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy2128;
}
- yyt2 = YYCURSOR;
- goto yy284;
+ if (yych <= 'F') goto yy2429;
+ goto yy1864;
} else {
- if (yych <= '\r') {
+ if (yych == '_') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy2007;
}
- if (yych == 0x1B) {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= 'f') goto yy2429;
+ goto yy1864;
+ } else {
+ if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
+ if (yych <= 0xC1) goto yy1741;
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1900;
}
} else {
- if (yych <= '/') {
- if (yych == '$') {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1901;
}
- if (yych <= ',') {
+ if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1903;
} else {
- if (yych <= '9') goto yy572;
- if (yych <= ':') goto yy378;
- if (yych <= '?') {
+ if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1904;
}
- yyt2 = YYCURSOR;
- goto yy284;
- }
- }
- } else {
- if (yych <= '~') {
- if (yych <= '_') {
- if (yych <= 'F') goto yy572;
- if (yych <= 'Z') goto yy3;
- if (yych <= '^') {
+ if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1905;
}
+ goto yy1741;
+ }
+ }
+ }
+yy2284:
+ yych = *++YYCURSOR;
+ if (yych <= 'z') {
+ if (yych <= '@') {
+ if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1892;
+ }
+ if (yych <= '9') goto yy2430;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2431;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= 'F') goto yy2430;
+ goto yy1682;
} else {
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 'f') goto yy572;
- if (yych <= 'z') goto yy3;
+ if (yych <= 'f') goto yy2430;
+ goto yy1682;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy1900;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1901;
} else {
- if (yych <= 0xE0) {
- if (yych <= 0x7F) {
- yyt2 = YYCURSOR;
- goto yy284;
- }
- if (yych <= 0xC1) goto yy5;
- if (yych <= 0xDF) {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy289;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy290;
+ goto yy1903;
} else {
- if (yych <= 0xF0) {
- if (yych <= 0xEF) {
- yyt2 = YYCURSOR;
- goto yy291;
- }
+ if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy292;
- } else {
- if (yych <= 0xF3) {
- yyt2 = YYCURSOR;
- goto yy293;
- }
- if (yych <= 0xF4) {
- yyt2 = YYCURSOR;
- goto yy294;
- }
- goto yy5;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
}
+ goto yy1682;
}
}
}
-yy480:
- yyaccept = 0;
+yy2285:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '?') {
- if (yych <= 0x1F) {
- if (yych <= '\f') {
- if (yych <= 0x00) {
- yyt2 = YYCURSOR;
- goto yy198;
- }
- if (yych <= 0x08) {
+ if (yych <= '_') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= ',') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1892;
}
- if (yych <= '\n') {
+ if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy2128;
}
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy2129;
} else {
- if (yych <= '\r') {
- yyt2 = YYCURSOR;
- goto yy198;
- }
- if (yych == 0x1B) {
+ if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy2128;
}
+ if (yych <= '9') goto yy2429;
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy2131;
}
} else {
- if (yych <= '-') {
- if (yych == '$') {
+ if (yych <= 'F') {
+ if (yych <= '?') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1892;
}
- if (yych <= ',') {
+ if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy2128;
}
- yyt2 = YYCURSOR;
- goto yy284;
+ goto yy2429;
} else {
- if (yych <= '/') {
- if (yych <= '.') {
- yyt2 = YYCURSOR;
- goto yy376;
- }
- yyt2 = YYCURSOR;
- goto yy284;
- } else {
- if (yych <= '9') goto yy572;
- if (yych <= ':') goto yy378;
+ if (yych <= 'Z') goto yy1864;
+ if (yych <= '^') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
+ yyt2 = YYCURSOR;
+ goto yy2007;
}
}
} else {
- if (yych <= '~') {
- if (yych <= '^') {
- if (yych <= '@') {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1892;
}
- if (yych <= 'F') goto yy572;
- if (yych <= 'Z') goto yy3;
- yyt2 = YYCURSOR;
- goto yy198;
+ if (yych <= 'f') goto yy2429;
+ goto yy1864;
} else {
- if (yych <= '`') {
- if (yych <= '_') {
- yyt2 = YYCURSOR;
- goto yy284;
- }
- yyt2 = YYCURSOR;
- goto yy198;
- } else {
- if (yych <= 'f') goto yy572;
- if (yych <= 'z') goto yy3;
+ if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
+ if (yych <= 0xC1) goto yy1741;
+ yyt2 = YYCURSOR;
+ goto yy1900;
}
} else {
- if (yych <= 0xE0) {
- if (yych <= 0x7F) {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1901;
}
- if (yych <= 0xC1) goto yy5;
- if (yych <= 0xDF) {
+ if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy289;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy290;
+ goto yy1903;
} else {
- if (yych <= 0xF0) {
- if (yych <= 0xEF) {
- yyt2 = YYCURSOR;
- goto yy291;
- }
+ if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy292;
- } else {
- if (yych <= 0xF3) {
- yyt2 = YYCURSOR;
- goto yy293;
- }
- if (yych <= 0xF4) {
- yyt2 = YYCURSOR;
- goto yy294;
- }
- goto yy5;
+ goto yy1904;
}
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1741;
}
}
}
-yy481:
+yy2286:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == 'B') goto yy2137;
+ if (yych == 'b') goto yy2137;
+ goto yy1973;
+yy2287:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'a') {
+ if (yych == 'B') goto yy2137;
+ goto yy1973;
+ } else {
+ if (yych <= 'b') goto yy2137;
+ if (yych == 'n') goto yy2137;
+ goto yy1973;
+ }
+yy2288:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ switch (yych) {
+ case '%': goto yy1727;
+ case '+': goto yy1697;
+ case '-': goto yy1729;
+ case '.': goto yy2019;
+ case '/': goto yy1731;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy2432;
+ case ':': goto yy1879;
+ case '@': goto yy1737;
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f': goto yy2408;
+ case 'B':
+ case 'b': goto yy2433;
+ case 'E':
+ case 'e': goto yy2434;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy1740;
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy1742;
+ case 'S':
+ case 's': goto yy1744;
+ case '_': goto yy1745;
+ case 'm': goto yy1747;
+ case 'p':
+ case 'u': goto yy1748;
+ default: goto yy1635;
+ }
+yy2289:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '?') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1743;
+ if (yych <= '*') goto yy1635;
+ goto yy1743;
+ } else {
+ if (yych <= '/') {
+ if (yych <= ',') goto yy1635;
+ goto yy1743;
+ } else {
+ if (yych <= '9') goto yy2408;
+ if (yych <= ':') goto yy1743;
+ goto yy1635;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') goto yy1743;
+ if (yych <= 'F') goto yy2408;
+ if (yych <= 'Z') goto yy1743;
+ goto yy1635;
+ } else {
+ if (yych <= '`') {
+ if (yych <= '_') goto yy1743;
+ goto yy1635;
+ } else {
+ if (yych <= 'f') goto yy2408;
+ if (yych <= 'z') goto yy1743;
+ goto yy1635;
+ }
+ }
+ }
+yy2290:
+ yyaccept = 12;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1743;
+ if (yych <= '*') goto yy1735;
+ goto yy1889;
+ } else {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy1735;
+ goto yy2016;
+ } else {
+ if (yych <= '/') goto yy1743;
+ if (yych <= '9') goto yy2408;
+ goto yy1743;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') {
+ if (yych <= '?') goto yy1735;
+ goto yy1743;
+ } else {
+ if (yych <= 'F') goto yy2408;
+ if (yych <= 'Z') goto yy1743;
+ goto yy1735;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych <= '_') goto yy1743;
+ goto yy1735;
+ } else {
+ if (yych <= 'f') goto yy2408;
+ if (yych <= 'z') goto yy1743;
+ goto yy1735;
+ }
+ }
+ }
+yy2291:
+ yych = *++YYCURSOR;
+ if (yych == 'B') goto yy2148;
+ if (yych == 'b') goto yy2148;
+ goto yy1698;
+yy2292:
+ yych = *++YYCURSOR;
+ if (yych <= 'a') {
+ if (yych == 'B') goto yy2148;
+ goto yy1698;
+ } else {
+ if (yych <= 'b') goto yy2148;
+ if (yych == 'n') goto yy2148;
+ goto yy1698;
+ }
+yy2293:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == 'B') goto yy2154;
+ if (yych == 'b') goto yy2154;
+ goto yy1746;
+yy2294:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'a') {
+ if (yych == 'B') goto yy2154;
+ goto yy1746;
+ } else {
+ if (yych <= 'b') goto yy2154;
+ if (yych == 'n') goto yy2154;
+ goto yy1746;
+ }
+yy2295:
yych = *++YYCURSOR;
if (yych <= '1') {
- if (yych <= '/') goto yy1;
- if (yych <= '0') goto yy573;
- goto yy574;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '0') goto yy2435;
+ goto yy2436;
} else {
- if (yych <= '2') goto yy575;
- if (yych <= '9') goto yy573;
- goto yy1;
+ if (yych <= '2') goto yy2437;
+ if (yych <= '9') goto yy2435;
+ goto yy1682;
}
-yy482:
+yy2296:
yych = *++YYCURSOR;
- if (yych == '.') goto yy481;
- goto yy1;
-yy483:
+ if (yych == '.') goto yy2295;
+ goto yy1682;
+yy2297:
yych = *++YYCURSOR;
- if (yych == '.') goto yy481;
- if (yych <= '/') goto yy1;
- if (yych <= '5') goto yy482;
- goto yy1;
-yy484:
+ if (yych == '.') goto yy2295;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '5') goto yy2296;
+ goto yy1682;
+yy2298:
yych = *++YYCURSOR;
if (yych <= 0x7F) {
if (yych <= '@') {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
+ }
+ if (yych <= '9') goto yy1682;
+ if (yych <= ':') {
+ yyt1 = YYCURSOR;
+ goto yy2022;
}
- if (yych <= '9') goto yy1;
- if (yych <= ':') goto yy299;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
} else {
if (yych <= 0xF0) {
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
}
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
-yy485:
+yy2299:
yych = *++YYCURSOR;
if (yych <= 'z') {
if (yych <= '@') {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '9') goto yy576;
+ if (yych <= '9') goto yy2438;
if (yych >= ';') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
+ yyt2 = YYCURSOR;
} else {
if (yych <= 'Z') {
- if (yych <= 'F') goto yy576;
- goto yy1;
+ if (yych <= 'F') goto yy2438;
+ goto yy1682;
} else {
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 'f') goto yy576;
- goto yy1;
+ if (yych <= 'f') goto yy2438;
+ goto yy1682;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy486:
+yy2300:
yych = *++YYCURSOR;
- if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy475;
- goto yy1;
+ if (yych <= '9') {
+ if (yych == ' ') goto yy1892;
+ if (yych <= '/') goto yy1682;
+ goto yy2284;
} else {
- if (yych <= 'F') goto yy475;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy475;
- goto yy1;
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy1682;
+ goto yy2284;
+ } else {
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2284;
+ goto yy1682;
+ }
}
-yy487:
+yy2301:
yych = *++YYCURSOR;
if (yych <= 0x7F) {
if (yych <= '@') {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
+ }
+ if (yych <= '9') goto yy1682;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2439;
}
- if (yych <= '9') goto yy1;
- if (yych <= ':') goto yy577;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
} else {
if (yych <= 0xF0) {
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
}
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
-yy488:
+yy2302:
yych = *++YYCURSOR;
if (yych <= '!') {
if (yych <= '\f') {
- if (yych == '\t') goto yy488;
- goto yy1;
+ if (yych == '\t') goto yy2302;
+ goto yy1682;
} else {
- if (yych <= '\r') goto yy488;
- if (yych == ' ') goto yy488;
- goto yy1;
+ if (yych <= '\r') goto yy2302;
+ if (yych == ' ') goto yy2302;
+ goto yy1682;
}
} else {
if (yych <= '\'') {
- if (yych <= '"') goto yy306;
- if (yych <= '&') goto yy1;
- goto yy307;
+ if (yych <= '"') goto yy2029;
+ if (yych <= '&') goto yy1682;
+ goto yy2030;
} else {
- if (yych <= '<') goto yy1;
- if (yych <= '=') goto yy408;
- if (yych <= '>') goto yy309;
- goto yy1;
+ if (yych <= '<') goto yy1682;
+ if (yych <= '=') goto yy2198;
+ if (yych <= '>') goto yy2033;
+ goto yy1682;
}
}
-yy489:
+yy2303:
yych = *++YYCURSOR;
if (yych <= ',') {
if (yych <= 0x1F) {
if (yych <= '\t') {
- if (yych <= 0x08) goto yy1;
- goto yy578;
+ if (yych <= 0x08) goto yy1682;
+ goto yy2440;
} else {
- if (yych == '\r') goto yy578;
- goto yy1;
+ if (yych == '\r') goto yy2440;
+ goto yy1682;
}
} else {
if (yych <= '"') {
- if (yych <= ' ') goto yy578;
- if (yych <= '!') goto yy1;
- goto yy306;
+ if (yych <= ' ') goto yy2440;
+ if (yych <= '!') goto yy1682;
+ goto yy2029;
} else {
- if (yych == '\'') goto yy307;
- goto yy1;
+ if (yych == '\'') goto yy2030;
+ goto yy1682;
}
}
} else {
if (yych <= '@') {
if (yych <= ':') {
- if (yych <= '-') goto yy390;
- if (yych <= '/') goto yy1;
- goto yy390;
+ if (yych <= '-') goto yy2166;
+ if (yych <= '/') goto yy1682;
+ goto yy2166;
} else {
- if (yych == '>') goto yy309;
- goto yy1;
+ if (yych == '>') goto yy2033;
+ goto yy1682;
}
} else {
if (yych <= '_') {
- if (yych <= 'Z') goto yy390;
- if (yych <= '^') goto yy1;
- goto yy390;
+ if (yych <= 'Z') goto yy2166;
+ if (yych <= '^') goto yy1682;
+ goto yy2166;
} else {
- if (yych <= '`') goto yy1;
- if (yych <= 'z') goto yy390;
- goto yy1;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'z') goto yy2166;
+ goto yy1682;
}
}
}
-yy490:
+yy2304:
+ yych = *++YYCURSOR;
+ if (yych <= 0xDF) {
+ if (yych <= '-') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= ',') goto yy2183;
+ goto yy2441;
+ } else {
+ if (yych <= 0x7F) goto yy2183;
+ if (yych <= 0xC1) goto yy1682;
+ goto yy2191;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy2192;
+ if (yych <= 0xEF) goto yy2193;
+ goto yy2194;
+ } else {
+ if (yych <= 0xF3) goto yy2195;
+ if (yych <= 0xF4) goto yy2196;
+ goto yy1682;
+ }
+ }
+yy2305:
+ yych = *++YYCURSOR;
+ if (yych <= '<') {
+ if (yych <= '!') {
+ if (yych <= '\f') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '\t') goto yy2442;
+ goto yy2183;
+ } else {
+ if (yych <= '\r') goto yy2442;
+ if (yych == ' ') goto yy2442;
+ goto yy2183;
+ }
+ } else {
+ if (yych <= ',') {
+ if (yych <= '"') goto yy2186;
+ if (yych == '\'') goto yy2187;
+ goto yy2183;
+ } else {
+ if (yych <= '-') goto yy2443;
+ if (yych <= '/') goto yy2183;
+ if (yych >= ';') goto yy2183;
+ }
+ }
+ } else {
+ if (yych <= 'z') {
+ if (yych <= 'Z') {
+ if (yych <= '=') goto yy2189;
+ if (yych <= '>') goto yy2190;
+ if (yych <= '@') goto yy2183;
+ } else {
+ if (yych == '_') goto yy2306;
+ if (yych <= '`') goto yy2183;
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy2183;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2191;
+ goto yy2192;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy2193;
+ goto yy2194;
+ } else {
+ if (yych <= 0xF3) goto yy2195;
+ if (yych <= 0xF4) goto yy2196;
+ goto yy1682;
+ }
+ }
+ }
+ }
+yy2306:
+ yych = *++YYCURSOR;
+ if (yych <= ':') {
+ if (yych <= '!') {
+ if (yych <= '\f') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '\t') goto yy2442;
+ goto yy2183;
+ } else {
+ if (yych <= '\r') goto yy2442;
+ if (yych == ' ') goto yy2442;
+ goto yy2183;
+ }
+ } else {
+ if (yych <= ')') {
+ if (yych <= '"') goto yy2186;
+ if (yych == '\'') goto yy2187;
+ goto yy2183;
+ } else {
+ if (yych <= ',') {
+ if (yych <= '*') goto yy1682;
+ goto yy2183;
+ } else {
+ if (yych <= '-') goto yy2305;
+ if (yych <= '/') goto yy2183;
+ goto yy2306;
+ }
+ }
+ }
+ } else {
+ if (yych <= 'z') {
+ if (yych <= '@') {
+ if (yych <= '<') goto yy2183;
+ if (yych <= '=') goto yy2189;
+ if (yych <= '>') goto yy2190;
+ goto yy2183;
+ } else {
+ if (yych <= '^') {
+ if (yych <= 'Z') goto yy2306;
+ goto yy2183;
+ } else {
+ if (yych == '`') goto yy2183;
+ goto yy2306;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy2183;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2191;
+ goto yy2192;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy2193;
+ goto yy2194;
+ } else {
+ if (yych <= 0xF3) goto yy2195;
+ if (yych <= 0xF4) goto yy2196;
+ goto yy1682;
+ }
+ }
+ }
+ }
+yy2307:
+ yych = *++YYCURSOR;
+ if (yybm_init[512+yych] & 128) {
+ goto yy2307;
+ }
+ if (yych <= 0xC1) {
+ if (yych <= '*') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= '"') goto yy2444;
+ goto yy2167;
+ } else {
+ if (yych <= '-') goto yy2308;
+ if (yych <= '\\') goto yy2309;
+ goto yy1682;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy2310;
+ if (yych <= 0xE0) goto yy2311;
+ goto yy2312;
+ } else {
+ if (yych <= 0xF0) goto yy2313;
+ if (yych <= 0xF3) goto yy2314;
+ if (yych <= 0xF4) goto yy2315;
+ goto yy1682;
+ }
+ }
+yy2308:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) {
+ if (yych <= ',') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '"') goto yy2444;
+ goto yy2307;
+ } else {
+ if (yych <= '-') goto yy2445;
+ if (yych != '\\') goto yy2307;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2310;
+ if (yych <= 0xE0) goto yy2311;
+ goto yy2312;
+ } else {
+ if (yych <= 0xF0) goto yy2313;
+ if (yych <= 0xF3) goto yy2314;
+ if (yych <= 0xF4) goto yy2315;
+ goto yy1682;
+ }
+ }
+yy2309:
+ yych = *++YYCURSOR;
+ if (yych <= 0xC1) {
+ if (yych <= '*') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= ')') goto yy2307;
+ goto yy2167;
+ } else {
+ if (yych == '-') goto yy2308;
+ if (yych <= 0x7F) goto yy2307;
+ goto yy1682;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy2310;
+ if (yych <= 0xE0) goto yy2311;
+ goto yy2312;
+ } else {
+ if (yych <= 0xF0) goto yy2313;
+ if (yych <= 0xF3) goto yy2314;
+ if (yych <= 0xF4) goto yy2315;
+ goto yy1682;
+ }
+ }
+yy2310:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2307;
+ goto yy1682;
+yy2311:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy1682;
+ if (yych <= 0xBF) goto yy2310;
+ goto yy1682;
+yy2312:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2310;
+ goto yy1682;
+yy2313:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy1682;
+ if (yych <= 0xBF) goto yy2312;
+ goto yy1682;
+yy2314:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2312;
+ goto yy1682;
+yy2315:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0x8F) goto yy2312;
+ goto yy1682;
+yy2316:
+ yych = *++YYCURSOR;
+ if (yybm_init[256+yych] & 1) {
+ goto yy2316;
+ }
+ if (yych <= 0xC1) {
+ if (yych <= '*') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= '\'') goto yy2444;
+ goto yy2175;
+ } else {
+ if (yych <= '-') goto yy2317;
+ if (yych <= '\\') goto yy2318;
+ goto yy1682;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy2319;
+ if (yych <= 0xE0) goto yy2320;
+ goto yy2321;
+ } else {
+ if (yych <= 0xF0) goto yy2322;
+ if (yych <= 0xF3) goto yy2323;
+ if (yych <= 0xF4) goto yy2324;
+ goto yy1682;
+ }
+ }
+yy2317:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) {
+ if (yych <= ',') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '\'') goto yy2444;
+ goto yy2316;
+ } else {
+ if (yych <= '-') goto yy2446;
+ if (yych != '\\') goto yy2316;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2319;
+ if (yych <= 0xE0) goto yy2320;
+ goto yy2321;
+ } else {
+ if (yych <= 0xF0) goto yy2322;
+ if (yych <= 0xF3) goto yy2323;
+ if (yych <= 0xF4) goto yy2324;
+ goto yy1682;
+ }
+ }
+yy2318:
+ yych = *++YYCURSOR;
+ if (yych <= 0xC1) {
+ if (yych <= '*') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= ')') goto yy2316;
+ goto yy2175;
+ } else {
+ if (yych == '-') goto yy2317;
+ if (yych <= 0x7F) goto yy2316;
+ goto yy1682;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy2319;
+ if (yych <= 0xE0) goto yy2320;
+ goto yy2321;
+ } else {
+ if (yych <= 0xF0) goto yy2322;
+ if (yych <= 0xF3) goto yy2323;
+ if (yych <= 0xF4) goto yy2324;
+ goto yy1682;
+ }
+ }
+yy2319:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2316;
+ goto yy1682;
+yy2320:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy1682;
+ if (yych <= 0xBF) goto yy2319;
+ goto yy1682;
+yy2321:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2319;
+ goto yy1682;
+yy2322:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy1682;
+ if (yych <= 0xBF) goto yy2321;
+ goto yy1682;
+yy2323:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2321;
+ goto yy1682;
+yy2324:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0x8F) goto yy2321;
+ goto yy1682;
+yy2325:
+ yych = *++YYCURSOR;
+ if (yybm_init[256+yych] & 2) {
+ goto yy2325;
+ }
+ if (yych <= '=') {
+ if (yych <= ' ') {
+ if (yych <= '\t') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= 0x08) goto yy2183;
+ goto yy2185;
+ } else {
+ if (yych == '\r') goto yy2185;
+ if (yych <= 0x1F) goto yy2183;
+ goto yy2185;
+ }
+ } else {
+ if (yych <= '\'') {
+ if (yych == '"') goto yy2186;
+ if (yych <= '&') goto yy2183;
+ goto yy2187;
+ } else {
+ if (yych <= '/') goto yy2183;
+ if (yych <= ':') goto yy2031;
+ if (yych <= '<') goto yy2183;
+ goto yy2189;
+ }
+ }
+ } else {
+ if (yych <= 0x7F) {
+ if (yych <= '^') {
+ if (yych <= '>') goto yy2447;
+ if (yych <= '@') goto yy2183;
+ if (yych <= 'Z') goto yy2031;
+ goto yy2183;
+ } else {
+ if (yych == '`') goto yy2183;
+ if (yych <= 'z') goto yy2031;
+ goto yy2183;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2191;
+ if (yych <= 0xE0) goto yy2192;
+ goto yy2193;
+ } else {
+ if (yych <= 0xF0) goto yy2194;
+ if (yych <= 0xF3) goto yy2195;
+ if (yych <= 0xF4) goto yy2196;
+ goto yy1682;
+ }
+ }
+ }
+yy2326:
+ yych = *++YYCURSOR;
+ if (yybm_init[256+yych] & 4) {
+ goto yy2326;
+ }
+ if (yych <= 0xC1) {
+ if (yych <= '\'') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych >= '#') goto yy2328;
+ } else {
+ if (yych <= '*') goto yy2329;
+ if (yych <= '-') goto yy2330;
+ if (yych <= '>') goto yy2190;
+ goto yy1682;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy2331;
+ if (yych <= 0xE0) goto yy2332;
+ goto yy2333;
+ } else {
+ if (yych <= 0xF0) goto yy2334;
+ if (yych <= 0xF3) goto yy2335;
+ if (yych <= 0xF4) goto yy2336;
+ goto yy1682;
+ }
+ }
+yy2327:
+ yych = *++YYCURSOR;
+ if (yybm_init[256+yych] & 8) {
+ goto yy2327;
+ }
+ if (yych <= 0xC1) {
+ if (yych <= '*') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= '\'') goto yy2449;
+ goto yy2337;
+ } else {
+ if (yych <= '-') goto yy2450;
+ if (yych <= '>') goto yy2451;
+ goto yy1682;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy2452;
+ if (yych <= 0xE0) goto yy2453;
+ goto yy2454;
+ } else {
+ if (yych <= 0xF0) goto yy2455;
+ if (yych <= 0xF3) goto yy2456;
+ if (yych <= 0xF4) goto yy2457;
+ goto yy1682;
+ }
+ }
+yy2328:
yych = *++YYCURSOR;
- if (yybm[0+yych] & 1) {
- goto yy490;
+ if (yybm_init[256+yych] & 16) {
+ goto yy2328;
+ }
+ if (yych <= 0xC1) {
+ if (yych <= '*') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= '"') goto yy2449;
+ goto yy2338;
+ } else {
+ if (yych <= '-') goto yy2458;
+ if (yych <= '>') goto yy2459;
+ goto yy1682;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy2460;
+ if (yych <= 0xE0) goto yy2461;
+ goto yy2462;
+ } else {
+ if (yych <= 0xF0) goto yy2463;
+ if (yych <= 0xF3) goto yy2464;
+ if (yych <= 0xF4) goto yy2465;
+ goto yy1682;
+ }
+ }
+yy2329:
+ yych = *++YYCURSOR;
+ if (yybm_init[256+yych] & 32) {
+ goto yy2329;
}
if (yych <= 0xDF) {
if (yych <= '\'') {
- if (yych <= 0x00) goto yy1;
- if (yych >= '#') goto yy492;
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= '"') goto yy2337;
+ goto yy2338;
} else {
- if (yych <= '>') goto yy309;
- if (yych <= 0xC1) goto yy1;
- goto yy493;
+ if (yych <= '>') goto yy2033;
+ if (yych <= 0xC1) goto yy1682;
+ goto yy2339;
}
} else {
if (yych <= 0xF0) {
- if (yych <= 0xE0) goto yy494;
- if (yych <= 0xEF) goto yy495;
- goto yy496;
+ if (yych <= 0xE0) goto yy2340;
+ if (yych <= 0xEF) goto yy2341;
+ goto yy2342;
} else {
- if (yych <= 0xF3) goto yy497;
- if (yych <= 0xF4) goto yy498;
- goto yy1;
+ if (yych <= 0xF3) goto yy2343;
+ if (yych <= 0xF4) goto yy2344;
+ goto yy1682;
}
}
-yy491:
+yy2330:
yych = *++YYCURSOR;
- if (yybm[0+yych] & 2) {
- goto yy491;
+ if (yych <= '>') {
+ if (yych <= '&') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '"') goto yy2327;
+ goto yy2326;
+ } else {
+ if (yych <= ',') {
+ if (yych <= '\'') goto yy2328;
+ goto yy2326;
+ } else {
+ if (yych <= '-') goto yy2466;
+ if (yych <= '=') goto yy2326;
+ goto yy2190;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy2326;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych >= 0xE0) goto yy2332;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy2333;
+ goto yy2334;
+ } else {
+ if (yych <= 0xF3) goto yy2335;
+ if (yych <= 0xF4) goto yy2336;
+ goto yy1682;
+ }
+ }
+ }
+yy2331:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2326;
+ goto yy1682;
+yy2332:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy1682;
+ if (yych <= 0xBF) goto yy2331;
+ goto yy1682;
+yy2333:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2331;
+ goto yy1682;
+yy2334:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy1682;
+ if (yych <= 0xBF) goto yy2333;
+ goto yy1682;
+yy2335:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2333;
+ goto yy1682;
+yy2336:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0x8F) goto yy2333;
+ goto yy1682;
+yy2337:
+ yych = *++YYCURSOR;
+ if (yybm_init[256+yych] & 64) {
+ goto yy2337;
}
if (yych <= 0xDF) {
- if (yych <= '>') {
- if (yych <= 0x00) goto yy1;
- if (yych <= '\'') goto yy579;
- goto yy580;
+ if (yych <= '\'') {
+ if (yych <= 0x00) goto yy1682;
+ goto yy2467;
} else {
- if (yych <= '\\') goto yy581;
- if (yych <= 0xC1) goto yy1;
- goto yy582;
+ if (yych <= '>') goto yy2468;
+ if (yych <= 0xC1) goto yy1682;
+ goto yy2469;
}
} else {
if (yych <= 0xF0) {
- if (yych <= 0xE0) goto yy583;
- if (yych <= 0xEF) goto yy584;
- goto yy585;
+ if (yych <= 0xE0) goto yy2470;
+ if (yych <= 0xEF) goto yy2471;
+ goto yy2472;
} else {
- if (yych <= 0xF3) goto yy586;
- if (yych <= 0xF4) goto yy587;
- goto yy1;
+ if (yych <= 0xF3) goto yy2473;
+ if (yych <= 0xF4) goto yy2474;
+ goto yy1682;
}
}
-yy492:
+yy2338:
yych = *++YYCURSOR;
- if (yybm[0+yych] & 4) {
- goto yy492;
+ if (yybm_init[256+yych] & 128) {
+ goto yy2338;
}
if (yych <= 0xDF) {
- if (yych <= '>') {
- if (yych <= 0x00) goto yy1;
- if (yych <= '"') goto yy579;
- goto yy588;
+ if (yych <= '"') {
+ if (yych <= 0x00) goto yy1682;
+ goto yy2467;
} else {
- if (yych <= '\\') goto yy589;
- if (yych <= 0xC1) goto yy1;
- goto yy590;
+ if (yych <= '>') goto yy2475;
+ if (yych <= 0xC1) goto yy1682;
+ goto yy2476;
}
} else {
if (yych <= 0xF0) {
- if (yych <= 0xE0) goto yy591;
- if (yych <= 0xEF) goto yy592;
- goto yy593;
+ if (yych <= 0xE0) goto yy2477;
+ if (yych <= 0xEF) goto yy2478;
+ goto yy2479;
} else {
- if (yych <= 0xF3) goto yy594;
- if (yych <= 0xF4) goto yy595;
- goto yy1;
+ if (yych <= 0xF3) goto yy2480;
+ if (yych <= 0xF4) goto yy2481;
+ goto yy1682;
}
}
-yy493:
+yy2339:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy490;
- goto yy1;
-yy494:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2329;
+ goto yy1682;
+yy2340:
yych = *++YYCURSOR;
- if (yych <= 0x9F) goto yy1;
- if (yych <= 0xBF) goto yy493;
- goto yy1;
-yy495:
+ if (yych <= 0x9F) goto yy1682;
+ if (yych <= 0xBF) goto yy2339;
+ goto yy1682;
+yy2341:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy493;
- goto yy1;
-yy496:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2339;
+ goto yy1682;
+yy2342:
yych = *++YYCURSOR;
- if (yych <= 0x8F) goto yy1;
- if (yych <= 0xBF) goto yy495;
- goto yy1;
-yy497:
+ if (yych <= 0x8F) goto yy1682;
+ if (yych <= 0xBF) goto yy2341;
+ goto yy1682;
+yy2343:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy495;
- goto yy1;
-yy498:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2341;
+ goto yy1682;
+yy2344:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0x8F) goto yy495;
- goto yy1;
-yy499:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0x8F) goto yy2341;
+ goto yy1682;
+yy2345:
yych = *++YYCURSOR;
- if (yybm[0+yych] & 8) {
- goto yy499;
+ if (yybm_init[0+yych] & 1) {
+ goto yy2345;
}
if (yych <= 0x7F) {
if (yych <= '<') {
- if (yych <= 0x00) goto yy1;
- if (yych != '/') goto yy410;
+ if (yych <= 0x00) goto yy1682;
+ if (yych != '/') goto yy2200;
} else {
- if (yych <= '=') goto yy411;
- if (yych <= '>') goto yy216;
- if (yych >= '@') goto yy410;
+ if (yych <= '=') goto yy2201;
+ if (yych <= '>') goto yy1912;
+ if (yych >= '@') goto yy2200;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy414;
- if (yych <= 0xE0) goto yy415;
- goto yy416;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2204;
+ if (yych <= 0xE0) goto yy2205;
+ goto yy2206;
} else {
- if (yych <= 0xF0) goto yy417;
- if (yych <= 0xF3) goto yy418;
- if (yych <= 0xF4) goto yy419;
- goto yy1;
+ if (yych <= 0xF0) goto yy2207;
+ if (yych <= 0xF3) goto yy2208;
+ if (yych <= 0xF4) goto yy2209;
+ goto yy1682;
}
}
-yy500:
+yy2346:
yych = *++YYCURSOR;
- if (yybm[256+yych] & 32) {
- goto yy410;
+ if (yybm_init[512+yych] & 16) {
+ goto yy2200;
}
if (yych <= 'z') {
if (yych <= '/') {
- if (yych <= 0x00) goto yy1;
- if (yych <= '-') goto yy499;
- goto yy500;
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= '-') goto yy2345;
+ goto yy2346;
} else {
- if (yych <= ':') goto yy499;
- if (yych <= '>') goto yy314;
- if (yych <= '?') goto yy500;
- goto yy499;
+ if (yych <= ':') goto yy2345;
+ if (yych <= '>') goto yy2038;
+ if (yych <= '?') goto yy2346;
+ goto yy2345;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy414;
- if (yych <= 0xE0) goto yy415;
- goto yy416;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2204;
+ if (yych <= 0xE0) goto yy2205;
+ goto yy2206;
} else {
- if (yych <= 0xF0) goto yy417;
- if (yych <= 0xF3) goto yy418;
- if (yych <= 0xF4) goto yy419;
- goto yy1;
+ if (yych <= 0xF0) goto yy2207;
+ if (yych <= 0xF3) goto yy2208;
+ if (yych <= 0xF4) goto yy2209;
+ goto yy1682;
}
}
-yy501:
+yy2347:
yych = *++YYCURSOR;
if (yych <= '>') {
if (yych <= '!') {
if (yych <= '\f') {
- if (yych <= 0x00) goto yy1;
- if (yych == '\t') goto yy501;
- goto yy412;
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '\t') goto yy2347;
+ goto yy2202;
} else {
- if (yych <= '\r') goto yy501;
- if (yych == ' ') goto yy501;
- goto yy412;
+ if (yych <= '\r') goto yy2347;
+ if (yych == ' ') goto yy2347;
+ goto yy2202;
}
} else {
if (yych <= '.') {
- if (yych <= '"') goto yy410;
- if (yych == '-') goto yy501;
- goto yy412;
+ if (yych <= '"') goto yy2200;
+ if (yych == '-') goto yy2347;
+ goto yy2202;
} else {
if (yych <= ':') {
- if (yych >= '0') goto yy501;
+ if (yych >= '0') goto yy2347;
} else {
- if (yych <= '<') goto yy412;
- if (yych <= '=') goto yy596;
- goto yy503;
+ if (yych <= '<') goto yy2202;
+ if (yych <= '=') goto yy2482;
+ goto yy2349;
}
}
}
} else {
if (yych <= 'z') {
if (yych <= '[') {
- if (yych <= '?') goto yy502;
- if (yych <= '@') goto yy412;
- if (yych <= 'Z') goto yy501;
- goto yy412;
+ if (yych <= '?') goto yy2348;
+ if (yych <= '@') goto yy2202;
+ if (yych <= 'Z') goto yy2347;
+ goto yy2202;
} else {
if (yych <= '^') {
- if (yych <= '\\') goto yy504;
- goto yy412;
+ if (yych <= '\\') goto yy2350;
+ goto yy2202;
} else {
- if (yych == '`') goto yy412;
- goto yy501;
+ if (yych == '`') goto yy2202;
+ goto yy2347;
}
}
} else {
if (yych <= 0xE0) {
- if (yych <= 0x7F) goto yy412;
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy505;
- goto yy506;
+ if (yych <= 0x7F) goto yy2202;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2351;
+ goto yy2352;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy507;
- goto yy508;
+ if (yych <= 0xEF) goto yy2353;
+ goto yy2354;
} else {
- if (yych <= 0xF3) goto yy509;
- if (yych <= 0xF4) goto yy510;
- goto yy1;
+ if (yych <= 0xF3) goto yy2355;
+ if (yych <= 0xF4) goto yy2356;
+ goto yy1682;
}
}
}
}
-yy502:
+yy2348:
yych = *++YYCURSOR;
- if (yybm[256+yych] & 64) {
- goto yy412;
+ if (yybm_init[512+yych] & 32) {
+ goto yy2202;
}
if (yych <= '\\') {
if (yych <= '/') {
- if (yych <= 0x00) goto yy1;
- if (yych <= '"') goto yy410;
- if (yych <= '-') goto yy501;
- goto yy502;
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= '"') goto yy2200;
+ if (yych <= '-') goto yy2347;
+ goto yy2348;
} else {
if (yych <= '>') {
- if (yych <= ':') goto yy501;
- goto yy597;
+ if (yych <= ':') goto yy2347;
+ goto yy2483;
} else {
- if (yych <= '?') goto yy502;
- if (yych <= 'Z') goto yy501;
- goto yy504;
+ if (yych <= '?') goto yy2348;
+ if (yych <= 'Z') goto yy2347;
+ goto yy2350;
}
}
} else {
if (yych <= 0xE0) {
- if (yych <= 'z') goto yy501;
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy505;
- goto yy506;
+ if (yych <= 'z') goto yy2347;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2351;
+ goto yy2352;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy507;
- goto yy508;
+ if (yych <= 0xEF) goto yy2353;
+ goto yy2354;
} else {
- if (yych <= 0xF3) goto yy509;
- if (yych <= 0xF4) goto yy510;
- goto yy1;
+ if (yych <= 0xF3) goto yy2355;
+ if (yych <= 0xF4) goto yy2356;
+ goto yy1682;
}
}
}
-yy503:
- yyaccept = 26;
+yy2349:
+ yyaccept = 35;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 0xC1) {
if (yych <= '"') {
- if (yych <= 0x00) goto yy217;
- if (yych <= '!') goto yy598;
- goto yy599;
+ if (yych <= 0x00) goto yy1913;
+ if (yych <= '!') goto yy2484;
+ goto yy2485;
} else {
- if (yych == '\\') goto yy600;
- if (yych <= 0x7F) goto yy598;
- goto yy217;
+ if (yych == '\\') goto yy2486;
+ if (yych <= 0x7F) goto yy2484;
+ goto yy1913;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xDF) goto yy601;
- if (yych <= 0xE0) goto yy602;
- goto yy603;
+ if (yych <= 0xDF) goto yy2487;
+ if (yych <= 0xE0) goto yy2488;
+ goto yy2489;
} else {
- if (yych <= 0xF0) goto yy604;
- if (yych <= 0xF3) goto yy605;
- if (yych <= 0xF4) goto yy606;
- goto yy217;
+ if (yych <= 0xF0) goto yy2490;
+ if (yych <= 0xF3) goto yy2491;
+ if (yych <= 0xF4) goto yy2492;
+ goto yy1913;
}
}
-yy504:
+yy2350:
yych = *++YYCURSOR;
- if (yych <= 'Z') {
- if (yych <= '.') {
- if (yych <= '\n') {
- if (yych <= 0x00) goto yy598;
- if (yych <= '\t') goto yy412;
- goto yy410;
+ if (yych <= '^') {
+ if (yych <= ':') {
+ if (yych <= '-') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= ',') goto yy2202;
+ goto yy2347;
} else {
- if (yych == '-') goto yy501;
- goto yy412;
+ if (yych <= '.') goto yy2202;
+ if (yych <= '/') goto yy2348;
+ goto yy2347;
}
} else {
- if (yych <= '=') {
- if (yych <= '/') goto yy502;
- if (yych <= ':') goto yy501;
- goto yy412;
+ if (yych <= '?') {
+ if (yych <= '=') goto yy2202;
+ if (yych <= '>') goto yy2349;
+ goto yy2348;
} else {
- if (yych <= '>') goto yy503;
- if (yych <= '?') goto yy502;
- if (yych <= '@') goto yy412;
- goto yy501;
+ if (yych <= '@') goto yy2202;
+ if (yych <= 'Z') goto yy2347;
+ goto yy2202;
}
}
} else {
- if (yych <= 0xC1) {
- if (yych <= '`') {
- if (yych == '_') goto yy501;
- goto yy412;
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych == '`') goto yy2202;
+ goto yy2347;
} else {
- if (yych <= 'z') goto yy501;
- if (yych <= 0x7F) goto yy412;
- goto yy1;
+ if (yych <= 0x7F) goto yy2202;
+ if (yych <= 0xC1) goto yy1682;
}
} else {
- if (yych <= 0xEF) {
- if (yych <= 0xDF) goto yy505;
- if (yych <= 0xE0) goto yy506;
- goto yy507;
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy2352;
+ if (yych <= 0xEF) goto yy2353;
+ goto yy2354;
} else {
- if (yych <= 0xF0) goto yy508;
- if (yych <= 0xF3) goto yy509;
- if (yych <= 0xF4) goto yy510;
- goto yy1;
+ if (yych <= 0xF3) goto yy2355;
+ if (yych <= 0xF4) goto yy2356;
+ goto yy1682;
}
}
}
-yy505:
+yy2351:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy412;
- goto yy1;
-yy506:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2202;
+ goto yy1682;
+yy2352:
yych = *++YYCURSOR;
- if (yych <= 0x9F) goto yy1;
- if (yych <= 0xBF) goto yy505;
- goto yy1;
-yy507:
+ if (yych <= 0x9F) goto yy1682;
+ if (yych <= 0xBF) goto yy2351;
+ goto yy1682;
+yy2353:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy505;
- goto yy1;
-yy508:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2351;
+ goto yy1682;
+yy2354:
yych = *++YYCURSOR;
- if (yych <= 0x8F) goto yy1;
- if (yych <= 0xBF) goto yy507;
- goto yy1;
-yy509:
+ if (yych <= 0x8F) goto yy1682;
+ if (yych <= 0xBF) goto yy2353;
+ goto yy1682;
+yy2355:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy507;
- goto yy1;
-yy510:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2353;
+ goto yy1682;
+yy2356:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0x8F) goto yy507;
- goto yy1;
-yy511:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0x8F) goto yy2353;
+ goto yy1682;
+yy2357:
yych = *++YYCURSOR;
if (yych <= '>') {
if (yych <= '&') {
if (yych <= '\f') {
- if (yych <= 0x00) goto yy1;
- if (yych == '\t') goto yy511;
- goto yy413;
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '\t') goto yy2357;
+ goto yy2203;
} else {
- if (yych <= '\r') goto yy511;
- if (yych == ' ') goto yy511;
- goto yy413;
+ if (yych <= '\r') goto yy2357;
+ if (yych == ' ') goto yy2357;
+ goto yy2203;
}
} else {
if (yych <= '.') {
- if (yych <= '\'') goto yy410;
- if (yych == '-') goto yy511;
- goto yy413;
+ if (yych <= '\'') goto yy2200;
+ if (yych == '-') goto yy2357;
+ goto yy2203;
} else {
if (yych <= ':') {
- if (yych >= '0') goto yy511;
+ if (yych >= '0') goto yy2357;
} else {
- if (yych <= '<') goto yy413;
- if (yych <= '=') goto yy607;
- goto yy513;
+ if (yych <= '<') goto yy2203;
+ if (yych <= '=') goto yy2493;
+ goto yy2359;
}
}
}
} else {
if (yych <= 'z') {
if (yych <= '[') {
- if (yych <= '?') goto yy512;
- if (yych <= '@') goto yy413;
- if (yych <= 'Z') goto yy511;
- goto yy413;
+ if (yych <= '?') goto yy2358;
+ if (yych <= '@') goto yy2203;
+ if (yych <= 'Z') goto yy2357;
+ goto yy2203;
} else {
if (yych <= '^') {
- if (yych <= '\\') goto yy514;
- goto yy413;
+ if (yych <= '\\') goto yy2360;
+ goto yy2203;
} else {
- if (yych == '`') goto yy413;
- goto yy511;
+ if (yych == '`') goto yy2203;
+ goto yy2357;
}
}
} else {
if (yych <= 0xE0) {
- if (yych <= 0x7F) goto yy413;
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy515;
- goto yy516;
+ if (yych <= 0x7F) goto yy2203;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2361;
+ goto yy2362;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy517;
- goto yy518;
+ if (yych <= 0xEF) goto yy2363;
+ goto yy2364;
} else {
- if (yych <= 0xF3) goto yy519;
- if (yych <= 0xF4) goto yy520;
- goto yy1;
+ if (yych <= 0xF3) goto yy2365;
+ if (yych <= 0xF4) goto yy2366;
+ goto yy1682;
}
}
}
}
-yy512:
+yy2358:
yych = *++YYCURSOR;
- if (yybm[256+yych] & 128) {
- goto yy413;
+ if (yybm_init[512+yych] & 64) {
+ goto yy2203;
}
if (yych <= '\\') {
if (yych <= '/') {
- if (yych <= 0x00) goto yy1;
- if (yych <= '\'') goto yy410;
- if (yych <= '-') goto yy511;
- goto yy512;
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= '\'') goto yy2200;
+ if (yych <= '-') goto yy2357;
+ goto yy2358;
} else {
if (yych <= '>') {
- if (yych <= ':') goto yy511;
- goto yy608;
+ if (yych <= ':') goto yy2357;
+ goto yy2494;
} else {
- if (yych <= '?') goto yy512;
- if (yych <= 'Z') goto yy511;
- goto yy514;
+ if (yych <= '?') goto yy2358;
+ if (yych <= 'Z') goto yy2357;
+ goto yy2360;
}
}
} else {
if (yych <= 0xE0) {
- if (yych <= 'z') goto yy511;
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy515;
- goto yy516;
+ if (yych <= 'z') goto yy2357;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2361;
+ goto yy2362;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy517;
- goto yy518;
+ if (yych <= 0xEF) goto yy2363;
+ goto yy2364;
} else {
- if (yych <= 0xF3) goto yy519;
- if (yych <= 0xF4) goto yy520;
- goto yy1;
+ if (yych <= 0xF3) goto yy2365;
+ if (yych <= 0xF4) goto yy2366;
+ goto yy1682;
}
}
}
-yy513:
- yyaccept = 26;
+yy2359:
+ yyaccept = 35;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 0xC1) {
if (yych <= '\'') {
- if (yych <= 0x00) goto yy217;
- if (yych <= '&') goto yy609;
- goto yy599;
+ if (yych <= 0x00) goto yy1913;
+ if (yych <= '&') goto yy2495;
+ goto yy2485;
} else {
- if (yych == '\\') goto yy610;
- if (yych <= 0x7F) goto yy609;
- goto yy217;
+ if (yych == '\\') goto yy2496;
+ if (yych <= 0x7F) goto yy2495;
+ goto yy1913;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xDF) goto yy611;
- if (yych <= 0xE0) goto yy612;
- goto yy613;
+ if (yych <= 0xDF) goto yy2497;
+ if (yych <= 0xE0) goto yy2498;
+ goto yy2499;
} else {
- if (yych <= 0xF0) goto yy614;
- if (yych <= 0xF3) goto yy615;
- if (yych <= 0xF4) goto yy616;
- goto yy217;
+ if (yych <= 0xF0) goto yy2500;
+ if (yych <= 0xF3) goto yy2501;
+ if (yych <= 0xF4) goto yy2502;
+ goto yy1913;
}
}
-yy514:
+yy2360:
yych = *++YYCURSOR;
- if (yych <= 'Z') {
- if (yych <= '.') {
- if (yych <= '\n') {
- if (yych <= 0x00) goto yy609;
- if (yych <= '\t') goto yy413;
- goto yy410;
+ if (yych <= '^') {
+ if (yych <= ':') {
+ if (yych <= '-') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= ',') goto yy2203;
+ goto yy2357;
} else {
- if (yych == '-') goto yy511;
- goto yy413;
+ if (yych <= '.') goto yy2203;
+ if (yych <= '/') goto yy2358;
+ goto yy2357;
}
} else {
- if (yych <= '=') {
- if (yych <= '/') goto yy512;
- if (yych <= ':') goto yy511;
- goto yy413;
+ if (yych <= '?') {
+ if (yych <= '=') goto yy2203;
+ if (yych <= '>') goto yy2359;
+ goto yy2358;
} else {
- if (yych <= '>') goto yy513;
- if (yych <= '?') goto yy512;
- if (yych <= '@') goto yy413;
- goto yy511;
+ if (yych <= '@') goto yy2203;
+ if (yych <= 'Z') goto yy2357;
+ goto yy2203;
}
}
} else {
- if (yych <= 0xC1) {
- if (yych <= '`') {
- if (yych == '_') goto yy511;
- goto yy413;
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych == '`') goto yy2203;
+ goto yy2357;
} else {
- if (yych <= 'z') goto yy511;
- if (yych <= 0x7F) goto yy413;
- goto yy1;
+ if (yych <= 0x7F) goto yy2203;
+ if (yych <= 0xC1) goto yy1682;
}
} else {
- if (yych <= 0xEF) {
- if (yych <= 0xDF) goto yy515;
- if (yych <= 0xE0) goto yy516;
- goto yy517;
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy2362;
+ if (yych <= 0xEF) goto yy2363;
+ goto yy2364;
} else {
- if (yych <= 0xF0) goto yy518;
- if (yych <= 0xF3) goto yy519;
- if (yych <= 0xF4) goto yy520;
- goto yy1;
+ if (yych <= 0xF3) goto yy2365;
+ if (yych <= 0xF4) goto yy2366;
+ goto yy1682;
}
}
}
-yy515:
+yy2361:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy413;
- goto yy1;
-yy516:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2203;
+ goto yy1682;
+yy2362:
yych = *++YYCURSOR;
- if (yych <= 0x9F) goto yy1;
- if (yych <= 0xBF) goto yy515;
- goto yy1;
-yy517:
+ if (yych <= 0x9F) goto yy1682;
+ if (yych <= 0xBF) goto yy2361;
+ goto yy1682;
+yy2363:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy515;
- goto yy1;
-yy518:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2361;
+ goto yy1682;
+yy2364:
yych = *++YYCURSOR;
- if (yych <= 0x8F) goto yy1;
- if (yych <= 0xBF) goto yy517;
- goto yy1;
-yy519:
+ if (yych <= 0x8F) goto yy1682;
+ if (yych <= 0xBF) goto yy2363;
+ goto yy1682;
+yy2365:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy517;
- goto yy1;
-yy520:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2363;
+ goto yy1682;
+yy2366:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0x8F) goto yy517;
- goto yy1;
-yy521:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0x8F) goto yy2363;
+ goto yy1682;
+yy2367:
yych = *++YYCURSOR;
if (yych <= ' ') {
if (yych <= '\f') {
- if (yych == '\t') goto yy521;
- goto yy1;
+ if (yych == '\t') goto yy2367;
+ goto yy1682;
} else {
- if (yych <= '\r') goto yy521;
- if (yych <= 0x1F) goto yy1;
- goto yy521;
+ if (yych <= '\r') goto yy2367;
+ if (yych <= 0x1F) goto yy1682;
+ goto yy2367;
}
} else {
if (yych <= '<') {
- if (yych == '/') goto yy215;
- goto yy1;
+ if (yych == '/') goto yy1911;
+ goto yy1682;
} else {
- if (yych <= '=') goto yy422;
- if (yych == '?') goto yy215;
- goto yy1;
+ if (yych <= '=') goto yy2212;
+ if (yych == '?') goto yy1911;
+ goto yy1682;
}
}
-yy522:
+yy2368:
yych = *++YYCURSOR;
if (yych <= '^') {
if (yych <= ':') {
if (yych <= '-') {
- if (yych <= 0x00) goto yy1;
- if (yych <= ',') goto yy522;
- goto yy617;
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= ',') goto yy2368;
+ goto yy2503;
} else {
- if (yych <= '.') goto yy522;
- if (yych <= '/') goto yy618;
- goto yy617;
+ if (yych <= '.') goto yy2368;
+ if (yych <= '/') goto yy2504;
+ goto yy2503;
}
} else {
if (yych <= '?') {
- if (yych <= '=') goto yy522;
- if (yych <= '>') goto yy1;
- goto yy618;
+ if (yych <= '=') goto yy2368;
+ if (yych <= '>') goto yy1682;
+ goto yy2504;
} else {
- if (yych <= '@') goto yy522;
- if (yych <= 'Z') goto yy617;
- goto yy522;
+ if (yych <= '@') goto yy2368;
+ if (yych <= 'Z') goto yy2503;
+ goto yy2368;
}
}
} else {
if (yych <= 0xDF) {
if (yych <= 'z') {
- if (yych == '`') goto yy522;
- goto yy617;
+ if (yych == '`') goto yy2368;
+ goto yy2503;
} else {
- if (yych <= 0x7F) goto yy522;
- if (yych <= 0xC1) goto yy1;
- goto yy526;
+ if (yych <= 0x7F) goto yy2368;
+ if (yych <= 0xC1) goto yy1682;
+ goto yy2372;
}
} else {
if (yych <= 0xF0) {
- if (yych <= 0xE0) goto yy527;
- if (yych <= 0xEF) goto yy528;
- goto yy529;
+ if (yych <= 0xE0) goto yy2373;
+ if (yych <= 0xEF) goto yy2374;
+ goto yy2375;
} else {
- if (yych <= 0xF3) goto yy530;
- if (yych <= 0xF4) goto yy531;
- goto yy1;
+ if (yych <= 0xF3) goto yy2376;
+ if (yych <= 0xF4) goto yy2377;
+ goto yy1682;
}
}
}
-yy523:
+yy2369:
yych = *++YYCURSOR;
if (yych <= '=') {
if (yych <= '!') {
if (yych <= '\f') {
- if (yych <= 0x00) goto yy1;
- if (yych == '\t') goto yy523;
- goto yy522;
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '\t') goto yy2369;
+ goto yy2368;
} else {
- if (yych <= '\r') goto yy523;
- if (yych == ' ') goto yy523;
- goto yy522;
+ if (yych <= '\r') goto yy2369;
+ if (yych == ' ') goto yy2369;
+ goto yy2368;
}
} else {
if (yych <= ',') {
- if (yych <= '"') goto yy524;
- if (yych == '\'') goto yy525;
- goto yy522;
+ if (yych <= '"') goto yy2370;
+ if (yych == '\'') goto yy2371;
+ goto yy2368;
} else {
if (yych <= '.') {
- if (yych <= '-') goto yy617;
- goto yy522;
+ if (yych <= '-') goto yy2503;
+ goto yy2368;
} else {
- if (yych <= '/') goto yy618;
- if (yych <= ':') goto yy617;
- goto yy522;
+ if (yych <= '/') goto yy2504;
+ if (yych <= ':') goto yy2503;
+ goto yy2368;
}
}
}
} else {
if (yych <= 'z') {
if (yych <= 'Z') {
- if (yych <= '>') goto yy1;
- if (yych <= '?') goto yy618;
- if (yych <= '@') goto yy522;
- goto yy617;
+ if (yych <= '>') goto yy1682;
+ if (yych <= '?') goto yy2504;
+ if (yych <= '@') goto yy2368;
+ goto yy2503;
} else {
- if (yych == '_') goto yy617;
- if (yych <= '`') goto yy522;
- goto yy617;
+ if (yych == '_') goto yy2503;
+ if (yych <= '`') goto yy2368;
+ goto yy2503;
}
} else {
if (yych <= 0xE0) {
- if (yych <= 0x7F) goto yy522;
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy526;
- goto yy527;
+ if (yych <= 0x7F) goto yy2368;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2372;
+ goto yy2373;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy528;
- goto yy529;
+ if (yych <= 0xEF) goto yy2374;
+ goto yy2375;
} else {
- if (yych <= 0xF3) goto yy530;
- if (yych <= 0xF4) goto yy531;
- goto yy1;
+ if (yych <= 0xF3) goto yy2376;
+ if (yych <= 0xF4) goto yy2377;
+ goto yy1682;
}
}
}
}
-yy524:
+yy2370:
yych = *++YYCURSOR;
if (yych <= '[') {
if (yych <= '/') {
if (yych <= '"') {
- if (yych <= 0x00) goto yy1;
- if (yych <= '!') goto yy524;
- goto yy522;
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= '!') goto yy2370;
+ goto yy2368;
} else {
- if (yych == '-') goto yy619;
- if (yych <= '.') goto yy524;
- goto yy620;
+ if (yych == '-') goto yy2505;
+ if (yych <= '.') goto yy2370;
+ goto yy2506;
}
} else {
if (yych <= '>') {
- if (yych <= ':') goto yy619;
- if (yych <= '=') goto yy524;
- goto yy621;
+ if (yych <= ':') goto yy2505;
+ if (yych <= '=') goto yy2370;
+ goto yy2507;
} else {
- if (yych <= '?') goto yy620;
- if (yych <= '@') goto yy524;
- if (yych <= 'Z') goto yy619;
- goto yy524;
+ if (yych <= '?') goto yy2506;
+ if (yych <= '@') goto yy2370;
+ if (yych <= 'Z') goto yy2505;
+ goto yy2370;
}
}
} else {
if (yych <= 0xC1) {
if (yych <= '_') {
- if (yych <= '\\') goto yy622;
- if (yych <= '^') goto yy524;
- goto yy619;
+ if (yych <= '\\') goto yy2508;
+ if (yych <= '^') goto yy2370;
+ goto yy2505;
} else {
- if (yych <= '`') goto yy524;
- if (yych <= 'z') goto yy619;
- if (yych <= 0x7F) goto yy524;
- goto yy1;
+ if (yych <= '`') goto yy2370;
+ if (yych <= 'z') goto yy2505;
+ if (yych <= 0x7F) goto yy2370;
+ goto yy1682;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xDF) goto yy623;
- if (yych <= 0xE0) goto yy624;
- goto yy625;
+ if (yych <= 0xDF) goto yy2509;
+ if (yych <= 0xE0) goto yy2510;
+ goto yy2511;
} else {
- if (yych <= 0xF0) goto yy626;
- if (yych <= 0xF3) goto yy627;
- if (yych <= 0xF4) goto yy628;
- goto yy1;
+ if (yych <= 0xF0) goto yy2512;
+ if (yych <= 0xF3) goto yy2513;
+ if (yych <= 0xF4) goto yy2514;
+ goto yy1682;
}
}
}
-yy525:
+yy2371:
yych = *++YYCURSOR;
if (yych <= '[') {
if (yych <= '/') {
if (yych <= '\'') {
- if (yych <= 0x00) goto yy1;
- if (yych <= '&') goto yy525;
- goto yy522;
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= '&') goto yy2371;
+ goto yy2368;
} else {
- if (yych == '-') goto yy629;
- if (yych <= '.') goto yy525;
- goto yy630;
+ if (yych == '-') goto yy2515;
+ if (yych <= '.') goto yy2371;
+ goto yy2516;
}
} else {
if (yych <= '>') {
- if (yych <= ':') goto yy629;
- if (yych <= '=') goto yy525;
- goto yy631;
+ if (yych <= ':') goto yy2515;
+ if (yych <= '=') goto yy2371;
+ goto yy2517;
} else {
- if (yych <= '?') goto yy630;
- if (yych <= '@') goto yy525;
- if (yych <= 'Z') goto yy629;
- goto yy525;
+ if (yych <= '?') goto yy2516;
+ if (yych <= '@') goto yy2371;
+ if (yych <= 'Z') goto yy2515;
+ goto yy2371;
}
}
} else {
if (yych <= 0xC1) {
if (yych <= '_') {
- if (yych <= '\\') goto yy632;
- if (yych <= '^') goto yy525;
- goto yy629;
+ if (yych <= '\\') goto yy2518;
+ if (yych <= '^') goto yy2371;
+ goto yy2515;
} else {
- if (yych <= '`') goto yy525;
- if (yych <= 'z') goto yy629;
- if (yych <= 0x7F) goto yy525;
- goto yy1;
+ if (yych <= '`') goto yy2371;
+ if (yych <= 'z') goto yy2515;
+ if (yych <= 0x7F) goto yy2371;
+ goto yy1682;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xDF) goto yy633;
- if (yych <= 0xE0) goto yy634;
- goto yy635;
+ if (yych <= 0xDF) goto yy2519;
+ if (yych <= 0xE0) goto yy2520;
+ goto yy2521;
} else {
- if (yych <= 0xF0) goto yy636;
- if (yych <= 0xF3) goto yy637;
- if (yych <= 0xF4) goto yy638;
- goto yy1;
+ if (yych <= 0xF0) goto yy2522;
+ if (yych <= 0xF3) goto yy2523;
+ if (yych <= 0xF4) goto yy2524;
+ goto yy1682;
}
}
}
-yy526:
+yy2372:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy522;
- goto yy1;
-yy527:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2368;
+ goto yy1682;
+yy2373:
yych = *++YYCURSOR;
- if (yych <= 0x9F) goto yy1;
- if (yych <= 0xBF) goto yy526;
- goto yy1;
-yy528:
+ if (yych <= 0x9F) goto yy1682;
+ if (yych <= 0xBF) goto yy2372;
+ goto yy1682;
+yy2374:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy526;
- goto yy1;
-yy529:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2372;
+ goto yy1682;
+yy2375:
yych = *++YYCURSOR;
- if (yych <= 0x8F) goto yy1;
- if (yych <= 0xBF) goto yy528;
- goto yy1;
-yy530:
+ if (yych <= 0x8F) goto yy1682;
+ if (yych <= 0xBF) goto yy2374;
+ goto yy1682;
+yy2376:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy528;
- goto yy1;
-yy531:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2374;
+ goto yy1682;
+yy2377:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0x8F) goto yy528;
- goto yy1;
-yy532:
- yyaccept = 0;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0x8F) goto yy2374;
+ goto yy1682;
+yy2378:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2525;
+ goto yy1682;
+yy2379:
+ yyaccept = 7;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= ':') {
- if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy1773;
+ if (yych <= '9') goto yy2526;
+ goto yy1773;
+ } else {
+ if (yych <= 'F') goto yy2526;
+ if (yych <= '`') goto yy1773;
+ if (yych <= 'f') goto yy2526;
+ goto yy1773;
+ }
+yy2380:
+ yych = *++YYCURSOR;
+ if (yych <= '^') {
+ if (yych <= '2') {
+ if (yych <= '/') {
+ if (yych == '-') {
+ yyt2 = YYCURSOR;
+ goto yy2050;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ } else {
+ if (yych <= '0') goto yy2527;
+ if (yych <= '1') goto yy2528;
+ goto yy2529;
+ }
} else {
- if (yych <= '.') {
- if (yych <= ',') goto yy4;
- goto yy46;
+ if (yych <= '@') {
+ if (yych <= '9') goto yy2527;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1897;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1892;
} else {
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy639;
- goto yy148;
+ if (yych <= 'F') goto yy2530;
+ if (yych <= 'Z') goto yy2055;
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
}
} else {
- if (yych <= '^') {
- if (yych <= '@') {
- if (yych <= '?') goto yy4;
- goto yy96;
+ if (yych <= 0xC1) {
+ if (yych <= 'f') {
+ if (yych <= '_') {
+ yyt2 = YYCURSOR;
+ goto yy2057;
+ }
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2530;
} else {
- if (yych <= 'F') goto yy639;
- if (yych <= 'Z') goto yy115;
- goto yy4;
+ if (yych <= 'z') goto yy2055;
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy1682;
}
} else {
- if (yych <= '`') {
- if (yych <= '_') goto yy46;
- goto yy4;
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy1900;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1902;
} else {
- if (yych <= 'f') goto yy639;
- if (yych <= 'z') goto yy115;
- goto yy4;
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy1903;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1682;
}
}
}
-yy533:
- yych = *++YYCURSOR;
- if (yych == ' ') goto yy640;
- goto yy1;
-yy534:
- yyaccept = 0;
+yy2381:
+ yyaccept = 7;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= ',') {
- if (yych <= '!') {
- if (yych <= '\f') {
- if (yych <= 0x00) {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych == '.') goto yy2531;
+ if (yych <= '/') goto yy2056;
+ if (yych <= '9') goto yy2532;
+ goto yy2056;
+yy2382:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '.') goto yy2531;
+ if (yych <= '/') goto yy2056;
+ if (yych <= '9') goto yy2381;
+ goto yy2056;
+yy2383:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '/') {
+ if (yych == '.') goto yy2531;
+ goto yy2056;
+ } else {
+ if (yych <= '4') goto yy2381;
+ if (yych <= '5') goto yy2533;
+ if (yych <= '9') goto yy2532;
+ goto yy2056;
+ }
+yy2384:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '_') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= ',') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy2217;
}
- goto yy4;
+ yyt2 = YYCURSOR;
+ goto yy2224;
} else {
- if (yych <= '\r') {
- yyt4 = YYCURSOR;
- goto yy221;
- }
- if (yych <= 0x1F) goto yy4;
- if (yych <= ' ') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
}
- yyt4 = YYCURSOR;
- goto yy223;
+ if (yych <= '9') goto yy2534;
+ yyt2 = YYCURSOR;
+ goto yy2220;
}
} else {
- if (yych <= '&') {
- if (yych <= '"') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= 'F') {
+ if (yych <= '?') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
- if (yych == '%') goto yy80;
- goto yy4;
- } else {
- if (yych <= '\'') {
- yyt4 = YYCURSOR;
- goto yy224;
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
}
- if (yych <= '*') {
- yyt4 = YYCURSOR;
- goto yy221;
+ goto yy2534;
+ } else {
+ if (yych <= 'Z') goto yy2055;
+ if (yych <= '^') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
- if (yych <= '+') goto yy80;
- yyt4 = YYCURSOR;
- goto yy223;
+ yyt2 = YYCURSOR;
+ goto yy2057;
}
}
} else {
- if (yych <= '?') {
- if (yych <= '9') {
- if (yych <= '-') goto yy46;
- if (yych <= '.') {
- yyt4 = YYCURSOR;
- goto yy230;
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
- if (yych <= '/') goto yy4;
- goto yy639;
+ if (yych <= 'f') goto yy2534;
+ goto yy2055;
} else {
- if (yych <= ':') {
- yyt3 = YYCURSOR;
- goto yy234;
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
- if (yych <= ';') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= 0xC1) goto yy1650;
+ yyt2 = YYCURSOR;
+ goto yy1900;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1901;
}
- if (yych <= '>') goto yy4;
- yyt4 = YYCURSOR;
- goto yy223;
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy1902;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1903;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1650;
+ }
+ }
+ }
+yy2385:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '_') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= ',') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy2217;
+ }
+ yyt2 = YYCURSOR;
+ goto yy2218;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
+ }
+ if (yych <= '9') goto yy2534;
+ yyt2 = YYCURSOR;
+ goto yy2220;
}
} else {
- if (yych <= '^') {
- if (yych <= '@') goto yy96;
- if (yych <= 'F') goto yy639;
- if (yych <= 'Z') goto yy115;
- goto yy4;
+ if (yych <= 'F') {
+ if (yych <= '?') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
+ }
+ goto yy2534;
} else {
+ if (yych <= 'Z') goto yy2055;
+ if (yych <= '^') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ yyt2 = YYCURSOR;
+ goto yy2057;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
if (yych <= '`') {
- if (yych <= '_') goto yy46;
- goto yy4;
- } else {
- if (yych <= 'f') goto yy641;
- if (yych <= 'z') goto yy326;
- goto yy4;
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= 'f') goto yy2534;
+ goto yy2055;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= 0xC1) goto yy1650;
+ yyt2 = YYCURSOR;
+ goto yy1900;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy1902;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1903;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
}
+ goto yy1650;
}
}
}
-yy535:
- yyaccept = 15;
+yy2386:
+ yych = *++YYCURSOR;
+ if (yych == ' ') goto yy2535;
+ goto yy1682;
+yy2387:
+ yyaccept = 14;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych == ':') goto yy152;
- goto yy222;
-yy536:
+ if (yych <= ':') {
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy1761;
+ goto yy1697;
+ } else {
+ if (yych == '+') goto yy1697;
+ goto yy1761;
+ }
+ } else {
+ if (yych <= '.') {
+ if (yych <= '-') goto yy1729;
+ yyt3 = YYCURSOR;
+ goto yy1928;
+ } else {
+ if (yych <= '/') goto yy1731;
+ if (yych <= '9') goto yy2526;
+ yyt3 = YYCURSOR;
+ goto yy1932;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') {
+ if (yych <= '?') goto yy1761;
+ goto yy1737;
+ } else {
+ if (yych <= 'F') goto yy2526;
+ if (yych <= 'Z') goto yy1772;
+ goto yy1761;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych <= '_') goto yy1659;
+ goto yy1761;
+ } else {
+ if (yych <= 'f') goto yy2536;
+ if (yych <= 'z') goto yy2062;
+ goto yy1761;
+ }
+ }
+ }
+yy2388:
+ yych = *++YYCURSOR;
+ if (yych <= '/') {
+ if (yych <= '\f') {
+ if (yych == '\t') goto yy1918;
+ goto yy1698;
+ } else {
+ if (yych <= '\r') goto yy1918;
+ if (yych == ' ') goto yy1918;
+ goto yy1698;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '9') goto yy1745;
+ if (yych <= '@') goto yy1698;
+ if (yych <= 'Z') goto yy1745;
+ goto yy1698;
+ } else {
+ if (yych == '`') goto yy1698;
+ if (yych <= 'z') goto yy1745;
+ goto yy1698;
+ }
+ }
+yy2389:
+ yyaccept = 22;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == ':') goto yy1731;
+ goto yy1762;
+yy2390:
yych = *++YYCURSOR;
if (yych <= 0xC1) {
if (yych <= '9') {
if (yych == '.') {
yyt2 = YYCURSOR;
- goto yy644;
+ goto yy2539;
}
yyt2 = YYCURSOR;
- goto yy642;
+ goto yy2537;
} else {
- if (yych <= ':') goto yy1;
+ if (yych <= ':') goto yy1682;
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy642;
+ goto yy2537;
}
- goto yy1;
+ goto yy1682;
}
} else {
if (yych <= 0xEF) {
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy645;
+ goto yy2540;
}
if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy646;
+ goto yy2541;
}
yyt2 = YYCURSOR;
- goto yy647;
+ goto yy2542;
} else {
if (yych <= 0xF0) {
yyt2 = YYCURSOR;
- goto yy648;
+ goto yy2543;
}
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy649;
+ goto yy2544;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy650;
+ goto yy2545;
}
- goto yy1;
+ goto yy1682;
}
}
-yy537:
+yy2391:
yych = *++YYCURSOR;
- if (yych == 'a') goto yy651;
- goto yy100;
-yy538:
- yyaccept = 5;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '9') {
- if (yych <= ' ') {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy24;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy24;
- goto yy4;
- } else {
- if (yych <= 0x1A) {
- if (yych <= '\r') goto yy24;
- goto yy4;
- } else {
- if (yych <= 0x1B) goto yy24;
- if (yych <= 0x1F) goto yy4;
- goto yy24;
- }
- }
- } else {
- if (yych <= '$') {
- if (yych == '"') goto yy24;
- if (yych <= '#') goto yy99;
- goto yy101;
- } else {
- if (yych <= '\'') {
- if (yych <= '&') goto yy99;
- goto yy24;
- } else {
- if (yych <= '*') goto yy99;
- if (yych <= ',') goto yy24;
- goto yy101;
- }
- }
- }
- } else {
- if (yych <= '`') {
- if (yych <= '[') {
- if (yych <= ':') goto yy4;
- if (yych <= '?') goto yy24;
- if (yych <= 'Z') goto yy101;
- goto yy24;
- } else {
- if (yych <= ']') {
- if (yych <= '\\') goto yy99;
- goto yy24;
- } else {
- if (yych <= '^') goto yy99;
- if (yych <= '_') goto yy101;
- goto yy24;
- }
- }
- } else {
- if (yych <= '}') {
- if (yych == 'm') goto yy652;
- if (yych <= 'z') goto yy101;
- goto yy24;
- } else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy99;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy24;
- if (yych <= 0xF4) goto yy4;
- goto yy24;
- }
- }
- }
- }
-yy539:
- yyaccept = 20;
+ if (yych == 'm') goto yy2546;
+ goto yy1722;
+yy2392:
+ yyaccept = 29;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '9') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) {
- yyt1 = YYCURSOR;
- goto yy653;
- }
- if (yych <= 0x08) {
- yyt1 = YYCURSOR;
- goto yy655;
- }
- if (yych <= '\n') {
+ if (yych <= 'Z') {
+ if (yych <= '-') {
+ if (yych <= '*') {
+ if (yych == '%') {
yyt1 = YYCURSOR;
- goto yy653;
+ goto yy2549;
}
yyt1 = YYCURSOR;
- goto yy655;
+ goto yy2547;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') {
- yyt1 = YYCURSOR;
- goto yy653;
- }
+ if (yych <= '+') {
yyt1 = YYCURSOR;
- goto yy655;
- } else {
- if (yych <= 0x1B) {
- yyt1 = YYCURSOR;
- goto yy653;
- }
- if (yych <= 0x1F) {
- yyt1 = YYCURSOR;
- goto yy655;
- }
+ goto yy2549;
+ }
+ if (yych <= ',') {
yyt1 = YYCURSOR;
- goto yy653;
+ goto yy2547;
}
+ yyt1 = YYCURSOR;
+ goto yy2550;
}
} else {
- if (yych <= '+') {
- if (yych <= '$') {
- yyt1 = YYCURSOR;
- goto yy655;
- }
- if (yych <= '%') {
+ if (yych <= '9') {
+ if (yych <= '.') {
yyt1 = YYCURSOR;
- goto yy656;
+ goto yy2551;
}
- if (yych <= '*') {
+ if (yych <= '/') {
yyt1 = YYCURSOR;
- goto yy653;
+ goto yy2552;
}
- yyt1 = YYCURSOR;
- goto yy656;
+ goto yy2553;
} else {
- if (yych <= '-') {
- if (yych <= ',') {
- yyt1 = YYCURSOR;
- goto yy653;
- }
- yyt1 = YYCURSOR;
- goto yy657;
- } else {
- if (yych <= '.') {
- yyt1 = YYCURSOR;
- goto yy658;
- }
- if (yych <= '/') {
- yyt1 = YYCURSOR;
- goto yy655;
- }
- goto yy659;
- }
- }
- }
- } else {
- if (yych <= '~') {
- if (yych <= 'Z') {
if (yych <= ':') {
yyt1 = YYCURSOR;
- goto yy660;
+ goto yy2554;
}
if (yych <= '?') {
yyt1 = YYCURSOR;
- goto yy653;
+ goto yy2547;
}
if (yych <= '@') {
yyt1 = YYCURSOR;
- goto yy661;
+ goto yy2555;
}
yyt1 = YYCURSOR;
- goto yy662;
+ goto yy2556;
+ }
+ }
+ } else {
+ if (yych <= 0xC1) {
+ if (yych <= '`') {
+ if (yych == '_') {
+ yyt1 = YYCURSOR;
+ goto yy2556;
+ }
+ yyt1 = YYCURSOR;
+ goto yy2547;
} else {
- if (yych <= '_') {
- if (yych <= '^') {
- yyt1 = YYCURSOR;
- goto yy653;
- }
+ if (yych <= 'z') {
yyt1 = YYCURSOR;
- goto yy662;
- } else {
- if (yych <= '`') {
- yyt1 = YYCURSOR;
- goto yy653;
- }
- if (yych <= 'z') {
- yyt1 = YYCURSOR;
- goto yy662;
- }
+ goto yy2556;
+ }
+ if (yych <= 0x7F) {
yyt1 = YYCURSOR;
- goto yy653;
+ goto yy2547;
}
+ goto yy2095;
}
} else {
- if (yych <= 0xE0) {
- if (yych <= 0x7F) {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
yyt1 = YYCURSOR;
- goto yy655;
+ goto yy2557;
}
- if (yych <= 0xC1) goto yy345;
- if (yych <= 0xDF) {
+ if (yych <= 0xE0) {
yyt1 = YYCURSOR;
- goto yy663;
+ goto yy2558;
}
yyt1 = YYCURSOR;
- goto yy664;
+ goto yy2559;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) {
- yyt1 = YYCURSOR;
- goto yy665;
- }
yyt1 = YYCURSOR;
- goto yy666;
- } else {
- if (yych <= 0xF3) {
- yyt1 = YYCURSOR;
- goto yy667;
- }
- if (yych <= 0xF4) {
- yyt1 = YYCURSOR;
- goto yy668;
- }
- goto yy345;
+ goto yy2560;
}
- }
- }
- }
-yy540:
- yyaccept = 20;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '9') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) {
+ if (yych <= 0xF3) {
yyt1 = YYCURSOR;
- goto yy653;
+ goto yy2561;
}
- if (yych <= 0x08) {
+ if (yych <= 0xF4) {
yyt1 = YYCURSOR;
- goto yy655;
+ goto yy2562;
}
- if (yych <= '\n') {
+ goto yy2095;
+ }
+ }
+ }
+yy2393:
+ yyaccept = 29;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'Z') {
+ if (yych <= '-') {
+ if (yych <= '*') {
+ if (yych == '%') {
yyt1 = YYCURSOR;
- goto yy653;
+ goto yy2549;
}
yyt1 = YYCURSOR;
- goto yy655;
+ goto yy2547;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') {
- yyt1 = YYCURSOR;
- goto yy653;
- }
+ if (yych <= '+') {
yyt1 = YYCURSOR;
- goto yy655;
- } else {
- if (yych <= 0x1B) {
- yyt1 = YYCURSOR;
- goto yy653;
- }
- if (yych <= 0x1F) {
- yyt1 = YYCURSOR;
- goto yy655;
- }
+ goto yy2549;
+ }
+ if (yych <= ',') {
yyt1 = YYCURSOR;
- goto yy653;
+ goto yy2547;
}
+ yyt1 = YYCURSOR;
+ goto yy2550;
}
} else {
- if (yych <= '+') {
- if (yych <= '$') {
- yyt1 = YYCURSOR;
- goto yy655;
- }
- if (yych <= '%') {
+ if (yych <= '9') {
+ if (yych <= '.') {
yyt1 = YYCURSOR;
- goto yy656;
+ goto yy2551;
}
- if (yych <= '*') {
+ if (yych <= '/') {
yyt1 = YYCURSOR;
- goto yy653;
+ goto yy2552;
}
- yyt1 = YYCURSOR;
- goto yy656;
+ goto yy2392;
} else {
- if (yych <= '-') {
- if (yych <= ',') {
- yyt1 = YYCURSOR;
- goto yy653;
- }
- yyt1 = YYCURSOR;
- goto yy657;
- } else {
- if (yych <= '.') {
- yyt1 = YYCURSOR;
- goto yy658;
- }
- if (yych <= '/') {
- yyt1 = YYCURSOR;
- goto yy655;
- }
- goto yy539;
- }
- }
- }
- } else {
- if (yych <= '~') {
- if (yych <= 'Z') {
if (yych <= ':') {
yyt1 = YYCURSOR;
- goto yy660;
+ goto yy2554;
}
if (yych <= '?') {
yyt1 = YYCURSOR;
- goto yy653;
+ goto yy2547;
}
if (yych <= '@') {
yyt1 = YYCURSOR;
- goto yy661;
+ goto yy2555;
}
yyt1 = YYCURSOR;
- goto yy662;
+ goto yy2556;
+ }
+ }
+ } else {
+ if (yych <= 0xC1) {
+ if (yych <= '`') {
+ if (yych == '_') {
+ yyt1 = YYCURSOR;
+ goto yy2556;
+ }
+ yyt1 = YYCURSOR;
+ goto yy2547;
} else {
- if (yych <= '_') {
- if (yych <= '^') {
- yyt1 = YYCURSOR;
- goto yy653;
- }
+ if (yych <= 'z') {
yyt1 = YYCURSOR;
- goto yy662;
- } else {
- if (yych <= '`') {
- yyt1 = YYCURSOR;
- goto yy653;
- }
- if (yych <= 'z') {
- yyt1 = YYCURSOR;
- goto yy662;
- }
+ goto yy2556;
+ }
+ if (yych <= 0x7F) {
yyt1 = YYCURSOR;
- goto yy653;
+ goto yy2547;
}
+ goto yy2095;
}
} else {
- if (yych <= 0xE0) {
- if (yych <= 0x7F) {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
yyt1 = YYCURSOR;
- goto yy655;
+ goto yy2557;
}
- if (yych <= 0xC1) goto yy345;
- if (yych <= 0xDF) {
+ if (yych <= 0xE0) {
yyt1 = YYCURSOR;
- goto yy663;
+ goto yy2558;
}
yyt1 = YYCURSOR;
- goto yy664;
+ goto yy2559;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) {
- yyt1 = YYCURSOR;
- goto yy665;
- }
yyt1 = YYCURSOR;
- goto yy666;
- } else {
- if (yych <= 0xF3) {
- yyt1 = YYCURSOR;
- goto yy667;
- }
- if (yych <= 0xF4) {
- yyt1 = YYCURSOR;
- goto yy668;
- }
- goto yy345;
+ goto yy2560;
+ }
+ if (yych <= 0xF3) {
+ yyt1 = YYCURSOR;
+ goto yy2561;
+ }
+ if (yych <= 0xF4) {
+ yyt1 = YYCURSOR;
+ goto yy2562;
}
+ goto yy2095;
}
}
}
-yy541:
- yyaccept = 20;
+yy2394:
+ yyaccept = 29;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '5') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) {
+ if (yych <= '@') {
+ if (yych <= '.') {
+ if (yych <= '*') {
+ if (yych == '%') {
yyt1 = YYCURSOR;
- goto yy653;
+ goto yy2549;
}
- if (yych <= 0x08) {
+ yyt1 = YYCURSOR;
+ goto yy2547;
+ } else {
+ if (yych <= '+') {
yyt1 = YYCURSOR;
- goto yy655;
+ goto yy2549;
}
- if (yych <= '\n') {
+ if (yych <= ',') {
yyt1 = YYCURSOR;
- goto yy653;
+ goto yy2547;
}
- yyt1 = YYCURSOR;
- goto yy655;
- } else {
- if (yych <= 0x1A) {
- if (yych <= '\r') {
- yyt1 = YYCURSOR;
- goto yy653;
- }
- yyt1 = YYCURSOR;
- goto yy655;
- } else {
- if (yych <= 0x1B) {
- yyt1 = YYCURSOR;
- goto yy653;
- }
- if (yych <= 0x1F) {
- yyt1 = YYCURSOR;
- goto yy655;
- }
+ if (yych <= '-') {
yyt1 = YYCURSOR;
- goto yy653;
+ goto yy2550;
}
+ yyt1 = YYCURSOR;
+ goto yy2551;
}
} else {
- if (yych <= ',') {
- if (yych <= '%') {
- if (yych <= '$') {
- yyt1 = YYCURSOR;
- goto yy655;
- }
- yyt1 = YYCURSOR;
- goto yy656;
- } else {
- if (yych == '+') {
- yyt1 = YYCURSOR;
- goto yy656;
- }
+ if (yych <= '5') {
+ if (yych <= '/') {
yyt1 = YYCURSOR;
- goto yy653;
+ goto yy2552;
}
+ if (yych <= '4') goto yy2392;
+ goto yy2563;
} else {
- if (yych <= '.') {
- if (yych <= '-') {
- yyt1 = YYCURSOR;
- goto yy657;
- }
+ if (yych <= '9') goto yy2553;
+ if (yych <= ':') {
yyt1 = YYCURSOR;
- goto yy658;
- } else {
- if (yych <= '/') {
- yyt1 = YYCURSOR;
- goto yy655;
- }
- if (yych <= '4') goto yy539;
- goto yy669;
+ goto yy2554;
}
+ if (yych <= '?') {
+ yyt1 = YYCURSOR;
+ goto yy2547;
+ }
+ yyt1 = YYCURSOR;
+ goto yy2555;
}
}
} else {
- if (yych <= 'z') {
- if (yych <= '@') {
- if (yych <= '9') goto yy659;
- if (yych <= ':') {
+ if (yych <= 0xC1) {
+ if (yych <= '_') {
+ if (yych <= 'Z') {
yyt1 = YYCURSOR;
- goto yy660;
+ goto yy2556;
}
- if (yych <= '?') {
+ if (yych <= '^') {
yyt1 = YYCURSOR;
- goto yy653;
+ goto yy2547;
}
yyt1 = YYCURSOR;
- goto yy661;
+ goto yy2556;
} else {
- if (yych <= '^') {
- if (yych <= 'Z') {
- yyt1 = YYCURSOR;
- goto yy662;
- }
+ if (yych <= '`') {
yyt1 = YYCURSOR;
- goto yy653;
- } else {
- if (yych == '`') {
- yyt1 = YYCURSOR;
- goto yy653;
- }
+ goto yy2547;
+ }
+ if (yych <= 'z') {
+ yyt1 = YYCURSOR;
+ goto yy2556;
+ }
+ if (yych <= 0x7F) {
yyt1 = YYCURSOR;
- goto yy662;
+ goto yy2547;
}
+ goto yy2095;
}
} else {
- if (yych <= 0xE0) {
- if (yych <= 0x7F) {
- if (yych <= '~') {
- yyt1 = YYCURSOR;
- goto yy653;
- }
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
yyt1 = YYCURSOR;
- goto yy655;
- } else {
- if (yych <= 0xC1) goto yy345;
- if (yych <= 0xDF) {
- yyt1 = YYCURSOR;
- goto yy663;
- }
+ goto yy2557;
+ }
+ if (yych <= 0xE0) {
yyt1 = YYCURSOR;
- goto yy664;
+ goto yy2558;
}
+ yyt1 = YYCURSOR;
+ goto yy2559;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) {
- yyt1 = YYCURSOR;
- goto yy665;
- }
yyt1 = YYCURSOR;
- goto yy666;
- } else {
- if (yych <= 0xF3) {
- yyt1 = YYCURSOR;
- goto yy667;
- }
- if (yych <= 0xF4) {
- yyt1 = YYCURSOR;
- goto yy668;
- }
- goto yy345;
+ goto yy2560;
}
+ if (yych <= 0xF3) {
+ yyt1 = YYCURSOR;
+ goto yy2561;
+ }
+ if (yych <= 0xF4) {
+ yyt1 = YYCURSOR;
+ goto yy2562;
+ }
+ goto yy2095;
}
}
}
-yy542:
- yych = *++YYCURSOR;
- if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy670;
- goto yy1;
- } else {
- if (yych <= 'F') goto yy670;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy670;
- goto yy1;
- }
-yy543:
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy671;
- goto yy4;
-yy544:
- yych = *++YYCURSOR;
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy672;
- goto yy1;
-yy545:
- yyaccept = 0;
+yy2395:
+ yyaccept = 21;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '9') {
- if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
+ if (yych <= ':') {
+ if (yych <= '*') {
+ if (yych == '%') goto yy2094;
+ goto yy1861;
} else {
- if (yych <= ',') goto yy4;
- if (yych <= '.') goto yy46;
- if (yych <= '/') goto yy4;
- goto yy673;
+ if (yych == ',') goto yy1861;
+ goto yy2094;
}
} else {
if (yych <= '^') {
- if (yych <= '?') goto yy4;
- if (yych <= '@') goto yy96;
- if (yych <= 'Z') goto yy46;
- goto yy4;
+ if (yych <= '?') goto yy1861;
+ if (yych <= 'Z') goto yy2094;
+ goto yy1861;
} else {
- if (yych == '`') goto yy4;
- if (yych <= 'z') goto yy46;
- goto yy4;
+ if (yych == '`') goto yy1861;
+ if (yych <= 'z') goto yy2094;
+ goto yy1861;
}
}
-yy546:
- yyaccept = 0;
+yy2396:
+ yyaccept = 29;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '/') {
- if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
- } else {
- if (yych <= ',') goto yy4;
- if (yych <= '-') goto yy545;
- if (yych <= '.') goto yy46;
- goto yy4;
- }
+ if (yych <= 'a') {
+ if (yych == 'B') goto yy2395;
+ goto yy2094;
} else {
- if (yych <= 'Z') {
- if (yych <= '9') goto yy46;
- if (yych <= '?') goto yy4;
- if (yych <= '@') goto yy96;
- goto yy46;
- } else {
- if (yych <= '_') {
- if (yych <= '^') goto yy4;
- goto yy46;
- } else {
- if (yych <= '`') goto yy4;
- if (yych <= 'z') goto yy46;
- goto yy4;
- }
- }
+ if (yych <= 'b') goto yy2395;
+ if (yych == 'i') goto yy2564;
+ goto yy2094;
}
-yy547:
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy675;
- goto yy4;
-yy548:
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == '/') goto yy547;
- goto yy4;
-yy549:
- yyaccept = 11;
+yy2397:
+ yyaccept = 21;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
- }
- if (yych <= '9') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy109;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy109;
- goto yy4;
+ if (yych <= 'S') {
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy1861;
+ goto yy2094;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') goto yy109;
- goto yy4;
- } else {
- if (yych <= 0x1B) goto yy109;
- if (yych <= 0x1F) goto yy4;
- goto yy109;
- }
+ if (yych == '+') goto yy2094;
+ goto yy1861;
}
} else {
- if (yych <= ',') {
- if (yych <= '%') {
- if (yych <= '$') goto yy4;
- goto yy105;
- } else {
- if (yych == '+') goto yy80;
- goto yy109;
- }
+ if (yych <= 'A') {
+ if (yych <= ':') goto yy2094;
+ if (yych <= '?') goto yy1861;
+ goto yy2094;
} else {
- if (yych <= '.') {
- if (yych <= '-') goto yy46;
- goto yy266;
- } else {
- if (yych <= '/') goto yy4;
- if (yych <= '7') goto yy676;
- goto yy677;
- }
+ if (yych <= 'B') goto yy2395;
+ if (yych <= 'R') goto yy2094;
+ goto yy2395;
}
}
} else {
- if (yych <= '_') {
- if (yych <= 'D') {
- if (yych <= ':') goto yy148;
- if (yych <= '?') goto yy109;
- if (yych <= '@') goto yy96;
- goto yy678;
+ if (yych <= 'b') {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy2094;
+ if (yych <= '^') goto yy1861;
+ goto yy2094;
} else {
- if (yych <= 'F') {
- if (yych <= 'E') goto yy679;
- goto yy678;
- } else {
- if (yych <= 'Z') goto yy115;
- if (yych <= '^') goto yy109;
- goto yy46;
- }
+ if (yych <= '`') goto yy1861;
+ if (yych <= 'a') goto yy2094;
+ goto yy2395;
}
} else {
- if (yych <= 'z') {
- if (yych <= 'd') {
- if (yych <= '`') goto yy109;
- goto yy678;
- } else {
- if (yych <= 'e') goto yy679;
- if (yych <= 'f') goto yy678;
- goto yy115;
- }
+ if (yych <= 'r') {
+ if (yych == 'i') goto yy2565;
+ goto yy2094;
} else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy109;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy109;
- if (yych <= 0xF4) goto yy4;
- goto yy109;
- }
+ if (yych <= 's') goto yy2395;
+ if (yych <= 'z') goto yy2094;
+ goto yy1861;
}
}
}
-yy550:
- yyaccept = 6;
+yy2398:
+ yyaccept = 29;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == 'S') goto yy2395;
+ if (yych == 's') goto yy2395;
+ goto yy2094;
+yy2399:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2566;
+ goto yy1682;
+ } else {
+ if (yych <= 'F') goto yy2566;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2566;
+ goto yy1682;
+ }
+yy2400:
+ yych = *++YYCURSOR;
+ if (yych <= 'Z') {
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2567;
+ if (yych <= '@') goto yy1682;
+ goto yy1864;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy1682;
+ goto yy1864;
+ } else {
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'z') goto yy1864;
+ goto yy1682;
+ }
+ }
+yy2401:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2568;
+ goto yy1682;
+yy2402:
+ yych = *++YYCURSOR;
+ if (yych <= 'Z') {
+ if (yych <= '/') goto yy1698;
+ if (yych <= '9') goto yy2569;
+ if (yych <= '@') goto yy1698;
+ goto yy1745;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy1698;
+ goto yy1745;
+ } else {
+ if (yych <= '`') goto yy1698;
+ if (yych <= 'z') goto yy1745;
+ goto yy1698;
+ }
+ }
+yy2403:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '-') goto yy2402;
+ goto yy1746;
+yy2404:
+ yych = *++YYCURSOR;
+ if (yych <= 'Z') {
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2571;
+ if (yych <= '@') goto yy1682;
+ goto yy1864;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy1682;
+ goto yy1864;
+ } else {
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'z') goto yy1864;
+ goto yy1682;
+ }
+ }
+yy2405:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '/') goto yy2404;
+ goto yy1865;
+yy2406:
+ yyaccept = 11;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
}
if (yych <= '9') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy26;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy26;
- goto yy4;
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy1733;
+ goto yy1727;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') goto yy26;
- goto yy4;
- } else {
- if (yych <= 0x1B) goto yy26;
- if (yych <= 0x1F) goto yy4;
- goto yy26;
- }
+ if (yych == '+') goto yy1697;
+ goto yy1733;
}
} else {
- if (yych <= '+') {
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy105;
- if (yych <= '*') goto yy26;
- goto yy80;
+ if (yych <= '.') {
+ if (yych <= '-') goto yy1729;
+ goto yy1985;
} else {
- if (yych <= '-') {
- if (yych <= ',') goto yy26;
- goto yy46;
- } else {
- if (yych <= '.') goto yy266;
- if (yych <= '/') goto yy4;
- goto yy677;
- }
+ if (yych <= '/') goto yy1731;
+ if (yych <= '7') goto yy2572;
+ goto yy2573;
}
}
} else {
- if (yych <= '_') {
- if (yych <= 'D') {
- if (yych <= ':') goto yy148;
- if (yych <= '?') goto yy26;
- if (yych <= '@') goto yy96;
- goto yy678;
+ if (yych <= 'Z') {
+ if (yych <= '?') {
+ if (yych <= ':') goto yy1879;
+ goto yy1733;
} else {
- if (yych <= 'F') {
- if (yych <= 'E') goto yy679;
- goto yy678;
- } else {
- if (yych <= 'Z') goto yy115;
- if (yych <= '^') goto yy26;
- goto yy46;
- }
+ if (yych <= '@') goto yy1737;
+ if (yych <= 'F') goto yy2574;
+ goto yy1742;
}
} else {
- if (yych <= 'z') {
- if (yych <= 'd') {
- if (yych <= '`') goto yy26;
- goto yy678;
- } else {
- if (yych <= 'e') goto yy679;
- if (yych <= 'f') goto yy678;
- goto yy115;
- }
+ if (yych <= '`') {
+ if (yych == '_') goto yy1745;
+ goto yy1733;
} else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy26;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy26;
- if (yych <= 0xF4) goto yy4;
- goto yy26;
- }
+ if (yych <= 'f') goto yy2574;
+ if (yych <= 'z') goto yy1742;
+ goto yy1733;
}
}
}
-yy551:
+yy2407:
yyaccept = 12;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '/') {
- if (yych <= 0x1F) {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy113;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy113;
- goto yy4;
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ if (yych <= ':') {
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy1735;
+ goto yy1727;
} else {
- if (yych <= '\r') goto yy113;
- if (yych == 0x1B) goto yy113;
- goto yy4;
+ if (yych == '+') goto yy1697;
+ goto yy1735;
}
} else {
- if (yych <= '*') {
- if (yych <= '#') goto yy113;
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy80;
- goto yy113;
+ if (yych <= '.') {
+ if (yych <= '-') goto yy1729;
+ goto yy1985;
} else {
- if (yych <= '+') goto yy80;
- if (yych <= ',') goto yy113;
- if (yych <= '.') goto yy46;
- goto yy4;
+ if (yych <= '/') goto yy1731;
+ if (yych <= '9') goto yy2573;
+ goto yy1879;
}
}
} else {
- if (yych <= '_') {
+ if (yych <= '^') {
if (yych <= '@') {
- if (yych <= '9') goto yy678;
- if (yych <= ':') goto yy148;
- if (yych <= '?') goto yy113;
- goto yy96;
+ if (yych <= '?') goto yy1735;
+ goto yy1737;
} else {
- if (yych <= 'F') goto yy678;
- if (yych <= 'Z') goto yy115;
- if (yych <= '^') goto yy113;
- goto yy46;
+ if (yych <= 'F') goto yy2574;
+ if (yych <= 'Z') goto yy1742;
+ goto yy1735;
}
} else {
- if (yych <= '~') {
- if (yych <= '`') goto yy113;
- if (yych <= 'f') goto yy678;
- if (yych <= 'z') goto yy115;
- goto yy113;
+ if (yych <= '`') {
+ if (yych <= '_') goto yy1745;
+ goto yy1735;
} else {
- if (yych <= 0x7F) goto yy4;
- if (yych <= 0xC1) goto yy113;
- if (yych <= 0xF4) goto yy4;
- goto yy113;
+ if (yych <= 'f') goto yy2574;
+ if (yych <= 'z') goto yy1742;
+ goto yy1735;
}
}
}
-yy552:
+yy2408:
yyaccept = 12;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '.') {
- if (yych <= 0x1F) {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy113;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy113;
- goto yy4;
- } else {
- if (yych <= '\r') goto yy113;
- if (yych == 0x1B) goto yy113;
- goto yy4;
- }
+ if (yych <= '?') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1743;
+ if (yych <= '*') goto yy1735;
+ goto yy1743;
} else {
- if (yych <= '*') {
- if (yych <= '#') goto yy113;
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy80;
- goto yy113;
+ if (yych <= '/') {
+ if (yych <= ',') goto yy1735;
+ goto yy1743;
} else {
- if (yych <= '+') goto yy194;
- if (yych <= ',') goto yy113;
- if (yych <= '-') goto yy251;
- goto yy46;
+ if (yych <= '9') goto yy2574;
+ if (yych <= ':') goto yy1743;
+ goto yy1735;
}
}
} else {
if (yych <= '^') {
- if (yych <= '?') {
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy678;
- if (yych <= ':') goto yy148;
- goto yy113;
- } else {
- if (yych <= '@') goto yy96;
- if (yych <= 'F') goto yy678;
- if (yych <= 'Z') goto yy115;
- goto yy113;
- }
+ if (yych <= '@') goto yy1743;
+ if (yych <= 'F') goto yy2574;
+ if (yych <= 'Z') goto yy1743;
+ goto yy1735;
} else {
- if (yych <= 'z') {
- if (yych <= '_') goto yy46;
- if (yych <= '`') goto yy113;
- if (yych <= 'f') goto yy678;
- goto yy115;
+ if (yych <= '`') {
+ if (yych <= '_') goto yy1743;
+ goto yy1735;
} else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy113;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy113;
- if (yych <= 0xF4) goto yy4;
- goto yy113;
- }
+ if (yych <= 'f') goto yy2574;
+ if (yych <= 'z') goto yy1743;
+ goto yy1735;
}
}
}
-yy553:
+yy2409:
yych = *++YYCURSOR;
if (yych <= 0x7F) {
if (yych <= '@') {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
+ }
+ if (yych <= '9') goto yy2409;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1897;
}
- if (yych <= '9') goto yy553;
- if (yych <= ':') goto yy1;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 'Z') goto yy553;
+ if (yych <= 'Z') goto yy2409;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 'z') goto yy553;
+ if (yych <= 'z') goto yy2409;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
} else {
if (yych <= 0xF0) {
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
}
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
-yy554:
- yyaccept = 0;
+yy2410:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '?') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) {
- yyt2 = YYCURSOR;
- goto yy198;
- }
- if (yych <= 0x08) {
- yyt2 = YYCURSOR;
- goto yy284;
- }
- if (yych <= '\n') {
- yyt2 = YYCURSOR;
- goto yy198;
+ if (yych <= '^') {
+ if (yych <= '/') {
+ if (yych <= ',') {
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy2575;
}
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1892;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') {
- yyt2 = YYCURSOR;
- goto yy198;
- }
- yyt2 = YYCURSOR;
- goto yy284;
- } else {
- if (yych <= 0x1B) {
- yyt2 = YYCURSOR;
- goto yy198;
- }
- if (yych <= 0x1F) {
- yyt2 = YYCURSOR;
- goto yy284;
- }
+ if (yych == '.') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy2129;
}
+ yyt2 = YYCURSOR;
+ goto yy2128;
}
} else {
- if (yych <= '-') {
- if (yych <= '$') {
- yyt2 = YYCURSOR;
- goto yy284;
- }
- if (yych <= '%') {
+ if (yych <= '?') {
+ if (yych <= '9') goto yy2576;
+ if (yych <= ':') {
yyt1 = YYCURSOR;
- goto yy680;
- }
- if (yych <= ',') {
- yyt2 = YYCURSOR;
- goto yy198;
+ goto yy2577;
}
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1892;
} else {
- if (yych <= '/') {
- if (yych <= '.') {
- yyt2 = YYCURSOR;
- goto yy376;
- }
- yyt2 = YYCURSOR;
- goto yy284;
- } else {
- if (yych <= '9') goto yy681;
- if (yych <= ':') goto yy682;
+ if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy2128;
}
+ if (yych <= 'F') goto yy2578;
+ if (yych <= 'Z') goto yy1864;
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
}
} else {
- if (yych <= '~') {
- if (yych <= '^') {
- if (yych <= '@') {
+ if (yych <= 0xC1) {
+ if (yych <= 'f') {
+ if (yych <= '_') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy2007;
}
- if (yych <= 'F') goto yy683;
- if (yych <= 'Z') goto yy3;
- yyt2 = YYCURSOR;
- goto yy198;
- } else {
if (yych <= '`') {
- if (yych <= '_') {
- yyt2 = YYCURSOR;
- goto yy284;
- }
yyt2 = YYCURSOR;
- goto yy198;
- } else {
- if (yych <= 'f') goto yy683;
- if (yych <= 'z') goto yy3;
+ goto yy1892;
+ }
+ goto yy2578;
+ } else {
+ if (yych <= 'z') goto yy1864;
+ if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
+ goto yy1741;
}
} else {
- if (yych <= 0xE0) {
- if (yych <= 0x7F) {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1900;
}
- if (yych <= 0xC1) goto yy5;
- if (yych <= 0xDF) {
+ if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy289;
+ goto yy1901;
}
yyt2 = YYCURSOR;
- goto yy290;
+ goto yy1902;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) {
- yyt2 = YYCURSOR;
- goto yy291;
- }
yyt2 = YYCURSOR;
- goto yy292;
- } else {
- if (yych <= 0xF3) {
- yyt2 = YYCURSOR;
- goto yy293;
- }
- if (yych <= 0xF4) {
- yyt2 = YYCURSOR;
- goto yy294;
- }
- goto yy5;
+ goto yy1903;
}
- }
- }
- }
-yy555:
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '?') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) {
+ if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1904;
}
- if (yych <= 0x08) {
+ if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1905;
}
- if (yych <= '\n') {
- yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1741;
+ }
+ }
+ }
+yy2411:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '^') {
+ if (yych <= '/') {
+ if (yych <= ',') {
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy2575;
}
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1892;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') {
- yyt2 = YYCURSOR;
- goto yy198;
- }
- yyt2 = YYCURSOR;
- goto yy284;
- } else {
- if (yych <= 0x1B) {
- yyt2 = YYCURSOR;
- goto yy198;
- }
- if (yych <= 0x1F) {
- yyt2 = YYCURSOR;
- goto yy284;
- }
+ if (yych == '.') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy2129;
}
+ yyt2 = YYCURSOR;
+ goto yy2128;
}
} else {
- if (yych <= '-') {
- if (yych <= '$') {
- yyt2 = YYCURSOR;
- goto yy284;
- }
- if (yych <= '%') {
+ if (yych <= '?') {
+ if (yych <= '9') goto yy2579;
+ if (yych <= ':') {
yyt1 = YYCURSOR;
- goto yy680;
- }
- if (yych <= ',') {
- yyt2 = YYCURSOR;
- goto yy198;
+ goto yy2577;
}
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1892;
} else {
- if (yych <= '/') {
- if (yych <= '.') {
- yyt2 = YYCURSOR;
- goto yy376;
- }
- yyt2 = YYCURSOR;
- goto yy284;
- } else {
- if (yych <= '9') goto yy684;
- if (yych <= ':') goto yy682;
+ if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy2128;
}
+ if (yych <= 'F') goto yy2578;
+ if (yych <= 'Z') goto yy1864;
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
}
} else {
- if (yych <= '~') {
- if (yych <= '^') {
- if (yych <= '@') {
+ if (yych <= 0xC1) {
+ if (yych <= 'f') {
+ if (yych <= '_') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy2007;
}
- if (yych <= 'F') goto yy683;
- if (yych <= 'Z') goto yy3;
- yyt2 = YYCURSOR;
- goto yy198;
- } else {
if (yych <= '`') {
- if (yych <= '_') {
- yyt2 = YYCURSOR;
- goto yy284;
- }
yyt2 = YYCURSOR;
- goto yy198;
- } else {
- if (yych <= 'f') goto yy683;
- if (yych <= 'z') goto yy3;
+ goto yy1892;
+ }
+ goto yy2578;
+ } else {
+ if (yych <= 'z') goto yy1864;
+ if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
+ goto yy1741;
}
} else {
- if (yych <= 0xE0) {
- if (yych <= 0x7F) {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1900;
}
- if (yych <= 0xC1) goto yy5;
- if (yych <= 0xDF) {
+ if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy289;
+ goto yy1901;
}
yyt2 = YYCURSOR;
- goto yy290;
+ goto yy1902;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) {
- yyt2 = YYCURSOR;
- goto yy291;
- }
yyt2 = YYCURSOR;
- goto yy292;
- } else {
- if (yych <= 0xF3) {
- yyt2 = YYCURSOR;
- goto yy293;
- }
- if (yych <= 0xF4) {
- yyt2 = YYCURSOR;
- goto yy294;
- }
- goto yy5;
+ goto yy1903;
}
- }
- }
- }
-yy556:
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= ':') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) {
+ if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1904;
}
- if (yych <= 0x08) {
+ if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1905;
}
- if (yych <= '\n') {
- yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1741;
+ }
+ }
+ }
+yy2412:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'Z') {
+ if (yych <= '4') {
+ if (yych <= ',') {
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy2575;
}
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1892;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') {
- yyt2 = YYCURSOR;
- goto yy198;
- }
+ if (yych == '.') {
yyt2 = YYCURSOR;
- goto yy284;
- } else {
- if (yych <= 0x1B) {
- yyt2 = YYCURSOR;
- goto yy198;
- }
- if (yych <= 0x1F) {
- yyt2 = YYCURSOR;
- goto yy284;
- }
+ goto yy2129;
+ }
+ if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy2128;
}
+ goto yy2579;
}
} else {
- if (yych <= '.') {
- if (yych <= '%') {
- if (yych <= '$') {
- yyt2 = YYCURSOR;
- goto yy284;
- }
- yyt1 = YYCURSOR;
- goto yy680;
- } else {
- if (yych <= ',') {
- yyt2 = YYCURSOR;
- goto yy198;
- }
- if (yych <= '-') {
- yyt2 = YYCURSOR;
- goto yy284;
- }
+ if (yych <= ':') {
+ if (yych <= '5') goto yy2580;
+ if (yych <= '9') goto yy2576;
+ yyt1 = YYCURSOR;
+ goto yy2577;
+ } else {
+ if (yych <= '?') {
yyt2 = YYCURSOR;
- goto yy376;
+ goto yy1892;
}
- } else {
- if (yych <= '4') {
- if (yych <= '/') {
- yyt2 = YYCURSOR;
- goto yy284;
- }
- goto yy684;
- } else {
- if (yych <= '5') goto yy685;
- if (yych <= '9') goto yy681;
- goto yy682;
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
}
+ if (yych <= 'F') goto yy2578;
+ goto yy1864;
}
}
} else {
- if (yych <= 'z') {
- if (yych <= 'Z') {
- if (yych <= '?') {
- yyt2 = YYCURSOR;
- goto yy198;
- }
- if (yych <= '@') {
+ if (yych <= 0xC1) {
+ if (yych <= '`') {
+ if (yych == '_') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy2007;
}
- if (yych <= 'F') goto yy683;
- goto yy3;
+ yyt2 = YYCURSOR;
+ goto yy1892;
} else {
- if (yych <= '_') {
- if (yych <= '^') {
- yyt2 = YYCURSOR;
- goto yy198;
- }
+ if (yych <= 'f') goto yy2578;
+ if (yych <= 'z') goto yy1864;
+ if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy284;
- } else {
- if (yych <= '`') {
- yyt2 = YYCURSOR;
- goto yy198;
- }
- if (yych <= 'f') goto yy683;
- goto yy3;
+ goto yy1892;
}
+ goto yy1741;
}
} else {
- if (yych <= 0xE0) {
- if (yych <= 0x7F) {
- if (yych <= '~') {
- yyt2 = YYCURSOR;
- goto yy198;
- }
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy284;
- } else {
- if (yych <= 0xC1) goto yy5;
- if (yych <= 0xDF) {
- yyt2 = YYCURSOR;
- goto yy289;
- }
+ goto yy1900;
+ }
+ if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy290;
+ goto yy1901;
}
+ yyt2 = YYCURSOR;
+ goto yy1902;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) {
- yyt2 = YYCURSOR;
- goto yy291;
- }
yyt2 = YYCURSOR;
- goto yy292;
- } else {
- if (yych <= 0xF3) {
- yyt2 = YYCURSOR;
- goto yy293;
- }
- if (yych <= 0xF4) {
- yyt2 = YYCURSOR;
- goto yy294;
- }
- goto yy5;
+ goto yy1903;
}
- }
- }
- }
-yy557:
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '@') {
- if (yych <= 0x1F) {
- if (yych <= '\f') {
- if (yych <= 0x00) {
+ if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1904;
}
- if (yych <= 0x08) {
+ if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1905;
}
- if (yych <= '\n') {
- yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1741;
+ }
+ }
+ }
+yy2413:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '_') {
+ if (yych <= ':') {
+ if (yych <= ',') {
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy2575;
}
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1892;
} else {
- if (yych <= '\r') {
- yyt2 = YYCURSOR;
- goto yy198;
- }
- if (yych == 0x1B) {
+ if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy2128;
}
- yyt2 = YYCURSOR;
- goto yy284;
+ if (yych <= '9') goto yy2578;
+ yyt1 = YYCURSOR;
+ goto yy2577;
}
} else {
- if (yych <= ',') {
- if (yych <= '#') {
+ if (yych <= 'F') {
+ if (yych <= '?') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '$') {
+ if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy2128;
}
- if (yych <= '%') {
- yyt1 = YYCURSOR;
- goto yy680;
- }
- yyt2 = YYCURSOR;
- goto yy198;
+ goto yy2578;
} else {
- if (yych <= '9') {
- if (yych <= '/') {
- yyt2 = YYCURSOR;
- goto yy284;
- }
- goto yy683;
- } else {
- if (yych <= ':') goto yy682;
- if (yych <= '?') {
- yyt2 = YYCURSOR;
- goto yy198;
- }
+ if (yych <= 'Z') goto yy1864;
+ if (yych <= '^') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1892;
}
+ yyt2 = YYCURSOR;
+ goto yy2007;
}
}
} else {
- if (yych <= '~') {
- if (yych <= '_') {
- if (yych <= 'F') goto yy683;
- if (yych <= 'Z') goto yy3;
- if (yych <= '^') {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- yyt2 = YYCURSOR;
- goto yy284;
+ if (yych <= 'f') goto yy2578;
+ goto yy1864;
} else {
- if (yych <= '`') {
+ if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 'f') goto yy683;
- if (yych <= 'z') goto yy3;
+ if (yych <= 0xC1) goto yy1741;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1900;
}
} else {
- if (yych <= 0xE0) {
- if (yych <= 0x7F) {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1901;
}
- if (yych <= 0xC1) goto yy5;
- if (yych <= 0xDF) {
+ if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy289;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy290;
+ goto yy1903;
} else {
- if (yych <= 0xF0) {
- if (yych <= 0xEF) {
- yyt2 = YYCURSOR;
- goto yy291;
- }
+ if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy292;
- } else {
- if (yych <= 0xF3) {
- yyt2 = YYCURSOR;
- goto yy293;
- }
- if (yych <= 0xF4) {
- yyt2 = YYCURSOR;
- goto yy294;
- }
- goto yy5;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
}
+ goto yy1741;
}
}
}
-yy558:
+yy2414:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy686;
- if (yych <= ':') goto yy471;
- goto yy1;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2581;
+ if (yych <= ':') goto yy2275;
+ goto yy1682;
} else {
- if (yych <= 'F') goto yy687;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy687;
- goto yy1;
+ if (yych <= 'F') goto yy2582;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2582;
+ goto yy1682;
}
-yy559:
+yy2415:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy687;
- if (yych <= ':') goto yy471;
- goto yy1;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2582;
+ if (yych <= ':') goto yy2275;
+ goto yy1682;
} else {
- if (yych <= 'F') goto yy687;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy687;
- goto yy1;
+ if (yych <= 'F') goto yy2582;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2582;
+ goto yy1682;
}
-yy560:
+yy2416:
yych = *++YYCURSOR;
if (yych <= 'f') {
if (yych <= '9') {
if (yych == '.') {
yyt2 = YYCURSOR;
- goto yy644;
+ goto yy2539;
}
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy642;
+ goto yy2537;
}
yyt1 = YYCURSOR;
- goto yy688;
+ goto yy2583;
} else {
if (yych <= '@') {
- if (yych <= ':') goto yy471;
+ if (yych <= ':') goto yy2275;
yyt2 = YYCURSOR;
- goto yy642;
+ goto yy2537;
} else {
if (yych <= 'F') {
yyt1 = YYCURSOR;
- goto yy688;
+ goto yy2583;
}
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy642;
+ goto yy2537;
}
yyt1 = YYCURSOR;
- goto yy688;
+ goto yy2583;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy642;
+ goto yy2537;
}
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy645;
+ goto yy2540;
}
yyt2 = YYCURSOR;
- goto yy646;
+ goto yy2541;
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy647;
+ goto yy2542;
}
yyt2 = YYCURSOR;
- goto yy648;
+ goto yy2543;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy649;
+ goto yy2544;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy650;
+ goto yy2545;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy561:
+yy2417:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy689;
- if (yych <= ':') goto yy471;
- goto yy1;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2584;
+ if (yych <= ':') goto yy2275;
+ goto yy1682;
} else {
- if (yych <= 'F') goto yy689;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy689;
- goto yy1;
+ if (yych <= 'F') goto yy2584;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2584;
+ goto yy1682;
}
-yy562:
+yy2418:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy690;
- if (yych <= ':') goto yy691;
- goto yy1;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2585;
+ if (yych <= ':') goto yy2586;
+ goto yy1682;
} else {
- if (yych <= 'F') goto yy690;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy690;
- goto yy1;
+ if (yych <= 'F') goto yy2585;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2585;
+ goto yy1682;
}
-yy563:
+yy2419:
yych = *++YYCURSOR;
if (yych <= '`') {
if (yych <= '9') {
if (yych <= '0') {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy692;
+ goto yy2587;
} else {
- if (yych <= '1') goto yy693;
- if (yych <= '2') goto yy694;
- goto yy692;
+ if (yych <= '1') goto yy2588;
+ if (yych <= '2') goto yy2589;
+ goto yy2587;
}
} else {
if (yych <= '@') {
- if (yych <= ':') goto yy1;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1897;
+ }
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 'F') goto yy695;
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'F') goto yy2590;
+ if (yych <= 'Z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
}
} else {
if (yych <= 0xDF) {
if (yych <= 'z') {
- if (yych <= 'f') goto yy695;
- goto yy1;
+ if (yych <= 'f') goto yy2590;
+ goto yy1682;
} else {
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy564:
+yy2420:
+ yyaccept = 36;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '1') {
+ if (yych <= '/') {
+ yyt2 = yyt4;
+ goto yy1893;
+ }
+ if (yych <= '0') goto yy2159;
+ goto yy2160;
+ } else {
+ if (yych <= '2') goto yy2161;
+ if (yych <= '9') goto yy2159;
+ yyt2 = yyt4;
+ goto yy1893;
+ }
+yy2421:
yych = *++YYCURSOR;
if (yych <= 'f') {
if (yych <= ':') {
if (yych <= '.') {
if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- yyt1 = YYCURSOR;
- goto yy297;
+ yyt4 = YYCURSOR;
+ goto yy2420;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '9') goto yy696;
+ if (yych <= '9') goto yy2591;
+ yyt4 = YYCURSOR;
}
} else {
if (yych <= 'F') {
if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy696;
+ goto yy2591;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy696;
+ goto yy2591;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy565:
+yy2422:
yych = *++YYCURSOR;
- if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy695;
- goto yy1;
+ if (yych <= '9') {
+ if (yych == ' ') {
+ yyt2 = yyt4;
+ goto yy1892;
+ }
+ if (yych <= '/') goto yy1682;
+ goto yy2590;
} else {
- if (yych <= 'F') goto yy695;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy695;
- goto yy1;
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy1682;
+ goto yy2590;
+ } else {
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2590;
+ goto yy1682;
+ }
}
-yy566:
+yy2423:
yych = *++YYCURSOR;
if (yych <= 'z') {
if (yych <= '@') {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
+ }
+ if (yych <= '9') goto yy2591;
+ if (yych <= ':') {
+ yyt4 = YYCURSOR;
+ goto yy2422;
}
- if (yych <= '9') goto yy696;
- if (yych <= ':') goto yy565;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
if (yych <= 'Z') {
- if (yych <= 'F') goto yy696;
- goto yy1;
+ if (yych <= 'F') goto yy2591;
+ goto yy1682;
} else {
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 'f') goto yy696;
- goto yy1;
+ if (yych <= 'f') goto yy2591;
+ goto yy1682;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy567:
+yy2424:
yych = *++YYCURSOR;
if (yych <= 'f') {
if (yych <= ':') {
if (yych <= '.') {
if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- yyt1 = YYCURSOR;
- goto yy297;
+ yyt4 = YYCURSOR;
+ goto yy2420;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '9') goto yy697;
- goto yy565;
+ if (yych <= '9') goto yy2592;
+ yyt4 = YYCURSOR;
+ goto yy2422;
}
} else {
if (yych <= 'F') {
if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy696;
+ goto yy2591;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy696;
+ goto yy2591;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy568:
+yy2425:
yych = *++YYCURSOR;
if (yych <= '`') {
if (yych <= '9') {
if (yych <= '.') {
if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- yyt1 = YYCURSOR;
- goto yy297;
+ yyt4 = YYCURSOR;
+ goto yy2420;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '5') goto yy697;
- goto yy696;
+ if (yych <= '5') goto yy2592;
+ goto yy2591;
}
} else {
if (yych <= '@') {
- if (yych <= ':') goto yy565;
+ if (yych <= ':') {
+ yyt4 = YYCURSOR;
+ goto yy2422;
+ }
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 'F') goto yy696;
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'F') goto yy2591;
+ if (yych <= 'Z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
}
} else {
if (yych <= 0xDF) {
if (yych <= 'z') {
- if (yych <= 'f') goto yy696;
- goto yy1;
+ if (yych <= 'f') goto yy2591;
+ goto yy1682;
} else {
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy569:
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '1') {
- if (yych <= '/') goto yy4;
- if (yych <= '0') goto yy698;
- goto yy699;
+yy2426:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '1') {
+ if (yych <= '/') goto yy1682;
+ if (yych <= '0') goto yy2593;
+ goto yy2594;
+ } else {
+ if (yych <= '2') goto yy2595;
+ if (yych <= '9') goto yy2593;
+ goto yy1682;
+ }
} else {
- if (yych <= '2') goto yy700;
- if (yych <= '9') goto yy698;
- goto yy4;
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy1864;
+ if (yych <= '^') goto yy1682;
+ goto yy1864;
+ } else {
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'z') goto yy1864;
+ goto yy1682;
+ }
}
-yy570:
- yyaccept = 0;
+yy2427:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych == '.') goto yy569;
- goto yy4;
-yy571:
- yyaccept = 0;
+ if (yych == '.') goto yy2426;
+ goto yy1865;
+yy2428:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych == '.') goto yy569;
- if (yych <= '/') goto yy4;
- if (yych <= '5') goto yy570;
- goto yy4;
-yy572:
- yyaccept = 0;
+ if (yych == '.') goto yy2426;
+ if (yych <= '/') goto yy1865;
+ if (yych <= '5') goto yy2427;
+ goto yy1865;
+yy2429:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '?') {
- if (yych <= 0x1B) {
- if (yych <= '\n') {
- if (yych <= 0x00) {
- yyt2 = YYCURSOR;
- goto yy198;
- }
- if (yych <= 0x08) {
+ if (yych <= '`') {
+ if (yych <= '?') {
+ if (yych <= '/') {
+ if (yych <= ',') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1892;
}
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy2128;
} else {
- if (yych == '\r') {
- yyt2 = YYCURSOR;
- goto yy198;
- }
- if (yych <= 0x1A) {
+ if (yych <= '9') goto yy1864;
+ if (yych <= ':') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy2131;
}
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
} else {
- if (yych <= ',') {
- if (yych <= 0x1F) {
- yyt2 = YYCURSOR;
- goto yy284;
- }
- if (yych == '$') {
+ if (yych <= 'Z') {
+ if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy2128;
}
- yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1864;
} else {
- if (yych <= '/') {
+ if (yych == '_') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy2007;
}
- if (yych <= '9') goto yy3;
- if (yych <= ':') goto yy378;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
}
} else {
- if (yych <= 0x7F) {
- if (yych <= '_') {
- if (yych <= '@') {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy1864;
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ } else {
+ if (yych <= 0xC1) goto yy1741;
+ if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1900;
}
- if (yych <= 'Z') goto yy3;
- if (yych <= '^') {
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1903;
} else {
- if (yych <= '`') {
+ if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1904;
}
- if (yych <= 'z') goto yy3;
- if (yych <= '~') {
+ if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1905;
}
+ goto yy1741;
+ }
+ }
+ }
+yy2430:
+ yych = *++YYCURSOR;
+ if (yych <= 'z') {
+ if (yych <= '@') {
+ if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1892;
+ }
+ if (yych <= '9') goto yy2596;
+ if (yych >= ';') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
+ yyt2 = YYCURSOR;
} else {
- if (yych <= 0xEF) {
- if (yych <= 0xC1) goto yy5;
- if (yych <= 0xDF) {
+ if (yych <= 'Z') {
+ if (yych <= 'F') goto yy2596;
+ goto yy1682;
+ } else {
+ if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy289;
+ goto yy1892;
}
- if (yych <= 0xE0) {
+ if (yych <= 'f') goto yy2596;
+ goto yy1682;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy1900;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy290;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy291;
+ goto yy1903;
} else {
- if (yych <= 0xF0) {
- yyt2 = YYCURSOR;
- goto yy292;
- }
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy293;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy294;
+ goto yy1905;
}
- goto yy5;
+ goto yy1682;
}
}
}
-yy573:
+yy2431:
yych = *++YYCURSOR;
- if (yych == '.') goto yy701;
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy702;
- goto yy1;
-yy574:
+ if (yych <= '9') {
+ if (yych == ' ') goto yy1892;
+ if (yych <= '/') goto yy1682;
+ goto yy2590;
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy1682;
+ goto yy2590;
+ } else {
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2590;
+ goto yy1682;
+ }
+ }
+yy2432:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ switch (yych) {
+ case '%': goto yy1727;
+ case '+': goto yy1697;
+ case '-': goto yy1729;
+ case '.': goto yy2019;
+ case '/': goto yy1731;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy2597;
+ case ':': goto yy1879;
+ case '@': goto yy1737;
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f': goto yy2574;
+ case 'B':
+ case 'b': goto yy2598;
+ case 'E':
+ case 'e': goto yy2599;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy1740;
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy1742;
+ case 'S':
+ case 's': goto yy1744;
+ case '_': goto yy1745;
+ case 'm': goto yy1747;
+ case 'p':
+ case 'u': goto yy1748;
+ default: goto yy1635;
+ }
+yy2433:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '?') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1743;
+ if (yych <= '*') goto yy1635;
+ goto yy1743;
+ } else {
+ if (yych <= '/') {
+ if (yych <= ',') goto yy1635;
+ goto yy1743;
+ } else {
+ if (yych <= '9') goto yy2574;
+ if (yych <= ':') goto yy1743;
+ goto yy1635;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') goto yy1743;
+ if (yych <= 'F') goto yy2574;
+ if (yych <= 'Z') goto yy1743;
+ goto yy1635;
+ } else {
+ if (yych <= '`') {
+ if (yych <= '_') goto yy1743;
+ goto yy1635;
+ } else {
+ if (yych <= 'f') goto yy2574;
+ if (yych <= 'z') goto yy1743;
+ goto yy1635;
+ }
+ }
+ }
+yy2434:
+ yyaccept = 12;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1743;
+ if (yych <= '*') goto yy1735;
+ goto yy1889;
+ } else {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy1735;
+ goto yy2016;
+ } else {
+ if (yych <= '/') goto yy1743;
+ if (yych <= '9') goto yy2574;
+ goto yy1743;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') {
+ if (yych <= '?') goto yy1735;
+ goto yy1743;
+ } else {
+ if (yych <= 'F') goto yy2574;
+ if (yych <= 'Z') goto yy1743;
+ goto yy1735;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych <= '_') goto yy1743;
+ goto yy1735;
+ } else {
+ if (yych <= 'f') goto yy2574;
+ if (yych <= 'z') goto yy1743;
+ goto yy1735;
+ }
+ }
+ }
+yy2435:
yych = *++YYCURSOR;
- if (yych == '.') goto yy701;
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy573;
- goto yy1;
-yy575:
+ if (yych == '.') goto yy2600;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2601;
+ goto yy1682;
+yy2436:
+ yych = *++YYCURSOR;
+ if (yych == '.') goto yy2600;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2435;
+ goto yy1682;
+yy2437:
yych = *++YYCURSOR;
if (yych <= '/') {
- if (yych == '.') goto yy701;
- goto yy1;
+ if (yych == '.') goto yy2600;
+ goto yy1682;
} else {
- if (yych <= '4') goto yy573;
- if (yych <= '5') goto yy703;
- if (yych <= '9') goto yy702;
- goto yy1;
+ if (yych <= '4') goto yy2435;
+ if (yych <= '5') goto yy2602;
+ if (yych <= '9') goto yy2601;
+ goto yy1682;
}
-yy576:
+yy2438:
yych = *++YYCURSOR;
if (yych <= 'z') {
if (yych <= '@') {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
+ }
+ if (yych <= '9') goto yy2603;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2300;
}
- if (yych <= '9') goto yy704;
- if (yych <= ':') goto yy486;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
if (yych <= 'Z') {
- if (yych <= 'F') goto yy704;
- goto yy1;
+ if (yych <= 'F') goto yy2603;
+ goto yy1682;
} else {
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 'f') goto yy704;
- goto yy1;
+ if (yych <= 'f') goto yy2603;
+ goto yy1682;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy577:
+yy2439:
yych = *++YYCURSOR;
- if (yych <= '9') {
- if (yych <= '0') {
- if (yych <= '/') goto yy1;
- goto yy705;
+ if (yych <= '2') {
+ if (yych <= '/') {
+ if (yych == ' ') goto yy1892;
+ goto yy1682;
} else {
- if (yych <= '1') goto yy706;
- if (yych <= '2') goto yy707;
- goto yy708;
+ if (yych <= '0') goto yy2604;
+ if (yych <= '1') goto yy2605;
+ goto yy2606;
}
} else {
if (yych <= 'F') {
- if (yych <= '@') goto yy1;
- goto yy387;
+ if (yych <= '9') goto yy2607;
+ if (yych <= '@') goto yy1682;
+ goto yy2163;
} else {
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy387;
- goto yy1;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2163;
+ goto yy1682;
}
}
-yy578:
+yy2440:
yych = *++YYCURSOR;
if (yych <= ' ') {
if (yych <= '\f') {
- if (yych == '\t') goto yy578;
- goto yy1;
+ if (yych == '\t') goto yy2440;
+ goto yy1682;
} else {
- if (yych <= '\r') goto yy578;
- if (yych <= 0x1F) goto yy1;
- goto yy578;
+ if (yych <= '\r') goto yy2440;
+ if (yych <= 0x1F) goto yy1682;
+ goto yy2440;
}
} else {
if (yych <= '&') {
- if (yych == '"') goto yy306;
- goto yy1;
+ if (yych == '"') goto yy2029;
+ goto yy1682;
} else {
- if (yych <= '\'') goto yy307;
- if (yych == '>') goto yy309;
- goto yy1;
+ if (yych <= '\'') goto yy2030;
+ if (yych == '>') goto yy2033;
+ goto yy1682;
}
}
-yy579:
+yy2441:
+ yych = *++YYCURSOR;
+ if (yych <= 0xC1) {
+ if (yych <= '-') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= ',') goto yy2183;
+ goto yy2441;
+ } else {
+ if (yych == '>') goto yy2447;
+ if (yych <= 0x7F) goto yy2183;
+ goto yy1682;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy2191;
+ if (yych <= 0xE0) goto yy2192;
+ goto yy2193;
+ } else {
+ if (yych <= 0xF0) goto yy2194;
+ if (yych <= 0xF3) goto yy2195;
+ if (yych <= 0xF4) goto yy2196;
+ goto yy1682;
+ }
+ }
+yy2442:
yych = *++YYCURSOR;
- if (yybm[0+yych] & 32) {
- goto yy579;
+ if (yych <= '*') {
+ if (yych <= 0x1F) {
+ if (yych <= '\t') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= 0x08) goto yy2183;
+ goto yy2442;
+ } else {
+ if (yych == '\r') goto yy2442;
+ goto yy2183;
+ }
+ } else {
+ if (yych <= '"') {
+ if (yych <= ' ') goto yy2442;
+ if (yych <= '!') goto yy2183;
+ goto yy2186;
+ } else {
+ if (yych == '\'') goto yy2187;
+ if (yych <= ')') goto yy2183;
+ goto yy1682;
+ }
+ }
+ } else {
+ if (yych <= 0xC1) {
+ if (yych <= '<') {
+ if (yych == '-') goto yy2304;
+ goto yy2183;
+ } else {
+ if (yych <= '=') goto yy2189;
+ if (yych <= '>') goto yy2190;
+ if (yych <= 0x7F) goto yy2183;
+ goto yy1682;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy2191;
+ if (yych <= 0xE0) goto yy2192;
+ goto yy2193;
+ } else {
+ if (yych <= 0xF0) goto yy2194;
+ if (yych <= 0xF3) goto yy2195;
+ if (yych <= 0xF4) goto yy2196;
+ goto yy1682;
+ }
+ }
}
- if (yych <= 0xDF) {
- if (yych <= '>') {
- if (yych <= 0x00) goto yy1;
- goto yy709;
+yy2443:
+ yych = *++YYCURSOR;
+ if (yych <= '<') {
+ if (yych <= '!') {
+ if (yych <= '\f') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '\t') goto yy2442;
+ goto yy2183;
+ } else {
+ if (yych <= '\r') goto yy2442;
+ if (yych == ' ') goto yy2442;
+ goto yy2183;
+ }
} else {
- if (yych <= '\\') goto yy710;
- if (yych <= 0xC1) goto yy1;
- goto yy711;
+ if (yych <= ',') {
+ if (yych <= '"') goto yy2186;
+ if (yych == '\'') goto yy2187;
+ goto yy2183;
+ } else {
+ if (yych <= '-') goto yy2443;
+ if (yych <= '/') goto yy2183;
+ if (yych <= ':') goto yy2306;
+ goto yy2183;
+ }
}
} else {
- if (yych <= 0xF0) {
- if (yych <= 0xE0) goto yy712;
- if (yych <= 0xEF) goto yy713;
- goto yy714;
+ if (yych <= 'z') {
+ if (yych <= 'Z') {
+ if (yych <= '=') goto yy2189;
+ if (yych <= '>') goto yy2447;
+ if (yych <= '@') goto yy2183;
+ goto yy2306;
+ } else {
+ if (yych == '_') goto yy2306;
+ if (yych <= '`') goto yy2183;
+ goto yy2306;
+ }
} else {
- if (yych <= 0xF3) goto yy715;
- if (yych <= 0xF4) goto yy716;
- goto yy1;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy2183;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2191;
+ goto yy2192;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy2193;
+ goto yy2194;
+ } else {
+ if (yych <= 0xF3) goto yy2195;
+ if (yych <= 0xF4) goto yy2196;
+ goto yy1682;
+ }
+ }
}
}
-yy580:
- yyaccept = 27;
+yy2444:
+ yych = *++YYCURSOR;
+ if (yych <= ':') {
+ if (yych <= '!') {
+ if (yych <= '\f') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '\t') goto yy2608;
+ goto yy2183;
+ } else {
+ if (yych <= '\r') goto yy2608;
+ if (yych == ' ') goto yy2608;
+ goto yy2183;
+ }
+ } else {
+ if (yych <= ')') {
+ if (yych <= '"') goto yy2186;
+ if (yych == '\'') goto yy2187;
+ goto yy2183;
+ } else {
+ if (yych <= ',') {
+ if (yych <= '*') goto yy1682;
+ goto yy2183;
+ } else {
+ if (yych <= '-') goto yy2305;
+ if (yych <= '/') goto yy2183;
+ goto yy2306;
+ }
+ }
+ }
+ } else {
+ if (yych <= 'z') {
+ if (yych <= 'Z') {
+ if (yych == '>') goto yy2190;
+ if (yych <= '@') goto yy2183;
+ goto yy2306;
+ } else {
+ if (yych == '_') goto yy2306;
+ if (yych <= '`') goto yy2183;
+ goto yy2306;
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy2183;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2191;
+ goto yy2192;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy2193;
+ goto yy2194;
+ } else {
+ if (yych <= 0xF3) goto yy2195;
+ if (yych <= 0xF4) goto yy2196;
+ goto yy1682;
+ }
+ }
+ }
+ }
+yy2445:
+ yych = *++YYCURSOR;
+ if (yych <= '\\') {
+ if (yych <= ',') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '"') goto yy2444;
+ goto yy2307;
+ } else {
+ if (yych <= '=') {
+ if (yych <= '-') goto yy2445;
+ goto yy2307;
+ } else {
+ if (yych <= '>') goto yy2609;
+ if (yych <= '[') goto yy2307;
+ goto yy2309;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy2307;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2310;
+ goto yy2311;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy2312;
+ goto yy2313;
+ } else {
+ if (yych <= 0xF3) goto yy2314;
+ if (yych <= 0xF4) goto yy2315;
+ goto yy1682;
+ }
+ }
+ }
+yy2446:
+ yych = *++YYCURSOR;
+ if (yych <= '\\') {
+ if (yych <= ',') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '\'') goto yy2444;
+ goto yy2316;
+ } else {
+ if (yych <= '=') {
+ if (yych <= '-') goto yy2446;
+ goto yy2316;
+ } else {
+ if (yych <= '>') goto yy2610;
+ if (yych <= '[') goto yy2316;
+ goto yy2318;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy2316;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2319;
+ goto yy2320;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy2321;
+ goto yy2322;
+ } else {
+ if (yych <= 0xF3) goto yy2323;
+ if (yych <= 0xF4) goto yy2324;
+ goto yy1682;
+ }
+ }
+ }
+yy2447:
+ yyaccept = 37;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[256+yych] & 8) {
- goto yy391;
+ if (yybm_init[512+yych] & 8) {
+ goto yy2183;
+ }
+ if (yych <= 0xE0) {
+ if (yych <= '-') {
+ if (yych >= '+') goto yy2304;
+ } else {
+ if (yych <= 0xC1) goto yy2448;
+ if (yych <= 0xDF) goto yy2191;
+ goto yy2192;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy2193;
+ goto yy2194;
+ } else {
+ if (yych <= 0xF3) goto yy2195;
+ if (yych <= 0xF4) goto yy2196;
+ }
+ }
+yy2448:
+#line 248 "../../lnav/src/data_scanner_re.re"
+ {
+ CAPTURE(DT_COMMENT);
+ if (tf == text_format_t::TF_DIFF) {
+ auto sf = this->to_string_fragment(cap_all);
+ auto split_res = sf.split_when(string_fragment::tag1{'\n'});
+ cap_all.c_end = split_res.first.sf_end;
+ cap_inner.c_end = split_res.first.sf_end;
+ this->ds_next_offset = cap_all.c_end;
+ }
+ return tokenize_result{token_out, cap_all, cap_inner, this->ds_input.data()};
+ }
+#line 64379 "../../lnav/src/data_scanner_re.cc"
+yy2449:
+ yych = *++YYCURSOR;
+ if (yybm_init[0+yych] & 4) {
+ goto yy2449;
}
if (yych <= 0xDF) {
- if (yych <= '"') {
- if (yych <= 0x00) goto yy310;
- goto yy489;
+ if (yych <= '-') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= '*') goto yy2467;
+ goto yy2611;
} else {
- if (yych <= '\\') goto yy392;
- if (yych <= 0xC1) goto yy310;
- goto yy393;
+ if (yych <= '>') goto yy2612;
+ if (yych <= 0xC1) goto yy1682;
+ goto yy2613;
}
} else {
if (yych <= 0xF0) {
- if (yych <= 0xE0) goto yy394;
- if (yych <= 0xEF) goto yy395;
- goto yy396;
+ if (yych <= 0xE0) goto yy2614;
+ if (yych <= 0xEF) goto yy2615;
+ goto yy2616;
} else {
- if (yych <= 0xF3) goto yy397;
- if (yych <= 0xF4) goto yy398;
- goto yy310;
+ if (yych <= 0xF3) goto yy2617;
+ if (yych <= 0xF4) goto yy2618;
+ goto yy1682;
}
}
-yy581:
+yy2450:
yych = *++YYCURSOR;
if (yych <= 0x7F) {
- if (yych <= '&') {
- if (yych <= 0x00) goto yy391;
- if (yych == '\n') goto yy490;
- goto yy491;
+ if (yych <= ',') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '\'') goto yy2449;
+ goto yy2327;
} else {
- if (yych <= '\'') goto yy579;
- if (yych == '>') goto yy580;
- goto yy491;
+ if (yych <= '-') goto yy2619;
+ if (yych != '>') goto yy2327;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy582;
- if (yych <= 0xE0) goto yy583;
- goto yy584;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2452;
+ if (yych <= 0xE0) goto yy2453;
+ goto yy2454;
} else {
- if (yych <= 0xF0) goto yy585;
- if (yych <= 0xF3) goto yy586;
- if (yych <= 0xF4) goto yy587;
- goto yy1;
+ if (yych <= 0xF0) goto yy2455;
+ if (yych <= 0xF3) goto yy2456;
+ if (yych <= 0xF4) goto yy2457;
+ goto yy1682;
}
}
-yy582:
+yy2451:
+ yyaccept = 32;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[512+yych] & 128) {
+ goto yy2307;
+ }
+ if (yych <= 0xC1) {
+ if (yych <= '*') {
+ if (yych <= 0x00) goto yy2034;
+ if (yych <= '"') goto yy2444;
+ goto yy2167;
+ } else {
+ if (yych <= '-') goto yy2308;
+ if (yych <= '\\') goto yy2309;
+ goto yy2034;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy2310;
+ if (yych <= 0xE0) goto yy2311;
+ goto yy2312;
+ } else {
+ if (yych <= 0xF0) goto yy2313;
+ if (yych <= 0xF3) goto yy2314;
+ if (yych <= 0xF4) goto yy2315;
+ goto yy2034;
+ }
+ }
+yy2452:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy491;
- goto yy1;
-yy583:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2327;
+ goto yy1682;
+yy2453:
yych = *++YYCURSOR;
- if (yych <= 0x9F) goto yy1;
- if (yych <= 0xBF) goto yy582;
- goto yy1;
-yy584:
+ if (yych <= 0x9F) goto yy1682;
+ if (yych <= 0xBF) goto yy2452;
+ goto yy1682;
+yy2454:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy582;
- goto yy1;
-yy585:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2452;
+ goto yy1682;
+yy2455:
yych = *++YYCURSOR;
- if (yych <= 0x8F) goto yy1;
- if (yych <= 0xBF) goto yy584;
- goto yy1;
-yy586:
+ if (yych <= 0x8F) goto yy1682;
+ if (yych <= 0xBF) goto yy2454;
+ goto yy1682;
+yy2456:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy584;
- goto yy1;
-yy587:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2454;
+ goto yy1682;
+yy2457:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0x8F) goto yy584;
- goto yy1;
-yy588:
- yyaccept = 27;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0x8F) goto yy2454;
+ goto yy1682;
+yy2458:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) {
+ if (yych <= ',') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '"') goto yy2449;
+ goto yy2328;
+ } else {
+ if (yych <= '-') goto yy2620;
+ if (yych != '>') goto yy2328;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2460;
+ if (yych <= 0xE0) goto yy2461;
+ goto yy2462;
+ } else {
+ if (yych <= 0xF0) goto yy2463;
+ if (yych <= 0xF3) goto yy2464;
+ if (yych <= 0xF4) goto yy2465;
+ goto yy1682;
+ }
+ }
+yy2459:
+ yyaccept = 32;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[256+yych] & 16) {
- goto yy399;
+ if (yybm_init[256+yych] & 1) {
+ goto yy2316;
}
- if (yych <= 0xDF) {
- if (yych <= '\'') {
- if (yych <= 0x00) goto yy310;
- goto yy489;
+ if (yych <= 0xC1) {
+ if (yych <= '*') {
+ if (yych <= 0x00) goto yy2034;
+ if (yych <= '\'') goto yy2444;
+ goto yy2175;
} else {
- if (yych <= '\\') goto yy400;
- if (yych <= 0xC1) goto yy310;
- goto yy401;
+ if (yych <= '-') goto yy2317;
+ if (yych <= '\\') goto yy2318;
+ goto yy2034;
}
} else {
- if (yych <= 0xF0) {
- if (yych <= 0xE0) goto yy402;
- if (yych <= 0xEF) goto yy403;
- goto yy404;
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy2319;
+ if (yych <= 0xE0) goto yy2320;
+ goto yy2321;
} else {
- if (yych <= 0xF3) goto yy405;
- if (yych <= 0xF4) goto yy406;
- goto yy310;
+ if (yych <= 0xF0) goto yy2322;
+ if (yych <= 0xF3) goto yy2323;
+ if (yych <= 0xF4) goto yy2324;
+ goto yy2034;
}
}
-yy589:
+yy2460:
yych = *++YYCURSOR;
- if (yych <= 0x7F) {
- if (yych <= '!') {
- if (yych <= 0x00) goto yy399;
- if (yych == '\n') goto yy490;
- goto yy492;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2328;
+ goto yy1682;
+yy2461:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy1682;
+ if (yych <= 0xBF) goto yy2460;
+ goto yy1682;
+yy2462:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2460;
+ goto yy1682;
+yy2463:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy1682;
+ if (yych <= 0xBF) goto yy2462;
+ goto yy1682;
+yy2464:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2462;
+ goto yy1682;
+yy2465:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0x8F) goto yy2462;
+ goto yy1682;
+yy2466:
+ yych = *++YYCURSOR;
+ if (yych <= '>') {
+ if (yych <= '&') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '"') goto yy2327;
+ goto yy2326;
} else {
- if (yych <= '"') goto yy579;
- if (yych == '>') goto yy588;
- goto yy492;
+ if (yych <= ',') {
+ if (yych <= '\'') goto yy2328;
+ goto yy2326;
+ } else {
+ if (yych <= '-') goto yy2466;
+ if (yych <= '=') goto yy2326;
+ goto yy2447;
+ }
}
} else {
- if (yych <= 0xEF) {
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy590;
- if (yych <= 0xE0) goto yy591;
- goto yy592;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy2326;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2331;
+ goto yy2332;
} else {
- if (yych <= 0xF0) goto yy593;
- if (yych <= 0xF3) goto yy594;
- if (yych <= 0xF4) goto yy595;
- goto yy1;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy2333;
+ goto yy2334;
+ } else {
+ if (yych <= 0xF3) goto yy2335;
+ if (yych <= 0xF4) goto yy2336;
+ goto yy1682;
+ }
}
}
-yy590:
+yy2467:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy492;
- goto yy1;
-yy591:
+ if (yybm_init[0+yych] & 8) {
+ goto yy2467;
+ }
+ if (yych <= 0xE0) {
+ if (yych <= '>') {
+ if (yych <= 0x00) goto yy1682;
+ goto yy2621;
+ } else {
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2622;
+ goto yy2623;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy2624;
+ goto yy2625;
+ } else {
+ if (yych <= 0xF3) goto yy2626;
+ if (yych <= 0xF4) goto yy2627;
+ goto yy1682;
+ }
+ }
+yy2468:
+ yyaccept = 32;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[512+yych] & 2) {
+ goto yy2167;
+ }
+ if (yych <= 0xDF) {
+ if (yych <= '"') {
+ if (yych <= 0x00) goto yy2034;
+ goto yy2303;
+ } else {
+ if (yych <= '\\') goto yy2168;
+ if (yych <= 0xC1) goto yy2034;
+ goto yy2169;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy2170;
+ if (yych <= 0xEF) goto yy2171;
+ goto yy2172;
+ } else {
+ if (yych <= 0xF3) goto yy2173;
+ if (yych <= 0xF4) goto yy2174;
+ goto yy2034;
+ }
+ }
+yy2469:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2337;
+ goto yy1682;
+yy2470:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy1682;
+ if (yych <= 0xBF) goto yy2469;
+ goto yy1682;
+yy2471:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2469;
+ goto yy1682;
+yy2472:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy1682;
+ if (yych <= 0xBF) goto yy2471;
+ goto yy1682;
+yy2473:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2471;
+ goto yy1682;
+yy2474:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0x8F) goto yy2471;
+ goto yy1682;
+yy2475:
+ yyaccept = 32;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[512+yych] & 4) {
+ goto yy2175;
+ }
+ if (yych <= 0xDF) {
+ if (yych <= '\'') {
+ if (yych <= 0x00) goto yy2034;
+ goto yy2303;
+ } else {
+ if (yych <= '\\') goto yy2176;
+ if (yych <= 0xC1) goto yy2034;
+ goto yy2177;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy2178;
+ if (yych <= 0xEF) goto yy2179;
+ goto yy2180;
+ } else {
+ if (yych <= 0xF3) goto yy2181;
+ if (yych <= 0xF4) goto yy2182;
+ goto yy2034;
+ }
+ }
+yy2476:
yych = *++YYCURSOR;
- if (yych <= 0x9F) goto yy1;
- if (yych <= 0xBF) goto yy590;
- goto yy1;
-yy592:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2338;
+ goto yy1682;
+yy2477:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy590;
- goto yy1;
-yy593:
+ if (yych <= 0x9F) goto yy1682;
+ if (yych <= 0xBF) goto yy2476;
+ goto yy1682;
+yy2478:
yych = *++YYCURSOR;
- if (yych <= 0x8F) goto yy1;
- if (yych <= 0xBF) goto yy592;
- goto yy1;
-yy594:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2476;
+ goto yy1682;
+yy2479:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy592;
- goto yy1;
-yy595:
+ if (yych <= 0x8F) goto yy1682;
+ if (yych <= 0xBF) goto yy2478;
+ goto yy1682;
+yy2480:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0x8F) goto yy592;
- goto yy1;
-yy596:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2478;
+ goto yy1682;
+yy2481:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0x8F) goto yy2478;
+ goto yy1682;
+yy2482:
yych = *++YYCURSOR;
if (yych <= '?') {
if (yych <= '&') {
if (yych <= '\f') {
- if (yych <= 0x00) goto yy1;
- if (yych == '\t') goto yy596;
- goto yy412;
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '\t') goto yy2482;
+ goto yy2202;
} else {
- if (yych <= '\r') goto yy596;
- if (yych == ' ') goto yy596;
- goto yy412;
+ if (yych <= '\r') goto yy2482;
+ if (yych == ' ') goto yy2482;
+ goto yy2202;
}
} else {
if (yych <= '.') {
- if (yych <= '\'') goto yy717;
- if (yych == '-') goto yy501;
- goto yy412;
+ if (yych <= '\'') goto yy2628;
+ if (yych == '-') goto yy2347;
+ goto yy2202;
} else {
if (yych <= ':') {
- if (yych <= '/') goto yy502;
- goto yy501;
+ if (yych <= '/') goto yy2348;
+ goto yy2347;
} else {
- if (yych <= '=') goto yy412;
- if (yych <= '>') goto yy503;
- goto yy502;
+ if (yych <= '=') goto yy2202;
+ if (yych <= '>') goto yy2349;
+ goto yy2348;
}
}
}
} else {
if (yych <= 'z') {
if (yych <= '\\') {
- if (yych <= '@') goto yy412;
- if (yych <= 'Z') goto yy501;
- if (yych <= '[') goto yy412;
- goto yy504;
+ if (yych <= '@') goto yy2202;
+ if (yych <= 'Z') goto yy2347;
+ if (yych <= '[') goto yy2202;
+ goto yy2350;
} else {
- if (yych == '_') goto yy501;
- if (yych <= '`') goto yy412;
- goto yy501;
+ if (yych == '_') goto yy2347;
+ if (yych <= '`') goto yy2202;
+ goto yy2347;
}
} else {
if (yych <= 0xE0) {
- if (yych <= 0x7F) goto yy412;
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy505;
- goto yy506;
+ if (yych <= 0x7F) goto yy2202;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2351;
+ goto yy2352;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy507;
- goto yy508;
+ if (yych <= 0xEF) goto yy2353;
+ goto yy2354;
} else {
- if (yych <= 0xF3) goto yy509;
- if (yych <= 0xF4) goto yy510;
- goto yy1;
+ if (yych <= 0xF3) goto yy2355;
+ if (yych <= 0xF4) goto yy2356;
+ goto yy1682;
}
}
}
}
-yy597:
- yyaccept = 28;
+yy2483:
+ yyaccept = 38;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 0xC1) {
if (yych <= '"') {
- if (yych <= 0x00) goto yy315;
- if (yych >= '"') goto yy599;
+ if (yych <= 0x00) goto yy2039;
+ if (yych >= '"') goto yy2485;
} else {
- if (yych == '\\') goto yy600;
- if (yych >= 0x80) goto yy315;
+ if (yych == '\\') goto yy2486;
+ if (yych >= 0x80) goto yy2039;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xDF) goto yy601;
- if (yych <= 0xE0) goto yy602;
- goto yy603;
+ if (yych <= 0xDF) goto yy2487;
+ if (yych <= 0xE0) goto yy2488;
+ goto yy2489;
} else {
- if (yych <= 0xF0) goto yy604;
- if (yych <= 0xF3) goto yy605;
- if (yych <= 0xF4) goto yy606;
- goto yy315;
+ if (yych <= 0xF0) goto yy2490;
+ if (yych <= 0xF3) goto yy2491;
+ if (yych <= 0xF4) goto yy2492;
+ goto yy2039;
}
}
-yy598:
+yy2484:
yych = *++YYCURSOR;
if (yych <= 0xC1) {
if (yych <= '"') {
- if (yych <= 0x00) goto yy1;
- if (yych <= '!') goto yy598;
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= '!') goto yy2484;
} else {
- if (yych == '\\') goto yy600;
- if (yych <= 0x7F) goto yy598;
- goto yy1;
+ if (yych == '\\') goto yy2486;
+ if (yych <= 0x7F) goto yy2484;
+ goto yy1682;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xDF) goto yy601;
- if (yych <= 0xE0) goto yy602;
- goto yy603;
+ if (yych <= 0xDF) goto yy2487;
+ if (yych <= 0xE0) goto yy2488;
+ goto yy2489;
} else {
- if (yych <= 0xF0) goto yy604;
- if (yych <= 0xF3) goto yy605;
- if (yych <= 0xF4) goto yy606;
- goto yy1;
+ if (yych <= 0xF0) goto yy2490;
+ if (yych <= 0xF3) goto yy2491;
+ if (yych <= 0xF4) goto yy2492;
+ goto yy1682;
}
}
-yy599:
+yy2485:
yych = *++YYCURSOR;
if (yych <= '/') {
if (yych <= 0x1F) {
if (yych <= '\t') {
- if (yych <= 0x08) goto yy1;
- goto yy718;
+ if (yych <= 0x08) goto yy1682;
+ goto yy2629;
} else {
- if (yych == '\r') goto yy718;
- goto yy1;
+ if (yych == '\r') goto yy2629;
+ goto yy1682;
}
} else {
if (yych <= ',') {
- if (yych <= ' ') goto yy718;
- goto yy1;
+ if (yych <= ' ') goto yy2629;
+ goto yy1682;
} else {
- if (yych <= '-') goto yy311;
- if (yych <= '.') goto yy1;
- goto yy215;
+ if (yych <= '-') goto yy2035;
+ if (yych <= '.') goto yy1682;
+ goto yy1911;
}
}
} else {
if (yych <= '@') {
if (yych <= '=') {
- if (yych <= ':') goto yy311;
- goto yy1;
+ if (yych <= ':') goto yy2035;
+ goto yy1682;
} else {
- if (yych <= '>') goto yy216;
- if (yych <= '?') goto yy215;
- goto yy1;
+ if (yych <= '>') goto yy1912;
+ if (yych <= '?') goto yy1911;
+ goto yy1682;
}
} else {
if (yych <= '_') {
- if (yych <= 'Z') goto yy311;
- if (yych <= '^') goto yy1;
- goto yy311;
+ if (yych <= 'Z') goto yy2035;
+ if (yych <= '^') goto yy1682;
+ goto yy2035;
} else {
- if (yych <= '`') goto yy1;
- if (yych <= 'z') goto yy311;
- goto yy1;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'z') goto yy2035;
+ goto yy1682;
}
}
}
-yy600:
+yy2486:
yych = *++YYCURSOR;
- if (yych <= 0xDF) {
- if (yych <= '\n') {
- if (yych <= '\t') goto yy598;
- goto yy1;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 0x00) goto yy1682;
+ goto yy2484;
} else {
- if (yych <= 0x7F) goto yy598;
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych >= 0xE0) goto yy2488;
}
} else {
if (yych <= 0xF0) {
- if (yych <= 0xE0) goto yy602;
- if (yych <= 0xEF) goto yy603;
- goto yy604;
+ if (yych <= 0xEF) goto yy2489;
+ goto yy2490;
} else {
- if (yych <= 0xF3) goto yy605;
- if (yych <= 0xF4) goto yy606;
- goto yy1;
+ if (yych <= 0xF3) goto yy2491;
+ if (yych <= 0xF4) goto yy2492;
+ goto yy1682;
}
}
-yy601:
+yy2487:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy598;
- goto yy1;
-yy602:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2484;
+ goto yy1682;
+yy2488:
yych = *++YYCURSOR;
- if (yych <= 0x9F) goto yy1;
- if (yych <= 0xBF) goto yy601;
- goto yy1;
-yy603:
+ if (yych <= 0x9F) goto yy1682;
+ if (yych <= 0xBF) goto yy2487;
+ goto yy1682;
+yy2489:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy601;
- goto yy1;
-yy604:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2487;
+ goto yy1682;
+yy2490:
yych = *++YYCURSOR;
- if (yych <= 0x8F) goto yy1;
- if (yych <= 0xBF) goto yy603;
- goto yy1;
-yy605:
+ if (yych <= 0x8F) goto yy1682;
+ if (yych <= 0xBF) goto yy2489;
+ goto yy1682;
+yy2491:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy603;
- goto yy1;
-yy606:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2489;
+ goto yy1682;
+yy2492:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0x8F) goto yy603;
- goto yy1;
-yy607:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0x8F) goto yy2489;
+ goto yy1682;
+yy2493:
yych = *++YYCURSOR;
if (yych <= '?') {
if (yych <= '!') {
if (yych <= '\f') {
- if (yych <= 0x00) goto yy1;
- if (yych == '\t') goto yy607;
- goto yy413;
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '\t') goto yy2493;
+ goto yy2203;
} else {
- if (yych <= '\r') goto yy607;
- if (yych == ' ') goto yy607;
- goto yy413;
+ if (yych <= '\r') goto yy2493;
+ if (yych == ' ') goto yy2493;
+ goto yy2203;
}
} else {
if (yych <= '.') {
- if (yych <= '"') goto yy717;
- if (yych == '-') goto yy511;
- goto yy413;
+ if (yych <= '"') goto yy2628;
+ if (yych == '-') goto yy2357;
+ goto yy2203;
} else {
if (yych <= ':') {
- if (yych <= '/') goto yy512;
- goto yy511;
+ if (yych <= '/') goto yy2358;
+ goto yy2357;
} else {
- if (yych <= '=') goto yy413;
- if (yych <= '>') goto yy513;
- goto yy512;
+ if (yych <= '=') goto yy2203;
+ if (yych <= '>') goto yy2359;
+ goto yy2358;
}
}
}
} else {
if (yych <= 'z') {
if (yych <= '\\') {
- if (yych <= '@') goto yy413;
- if (yych <= 'Z') goto yy511;
- if (yych <= '[') goto yy413;
- goto yy514;
+ if (yych <= '@') goto yy2203;
+ if (yych <= 'Z') goto yy2357;
+ if (yych <= '[') goto yy2203;
+ goto yy2360;
} else {
- if (yych == '_') goto yy511;
- if (yych <= '`') goto yy413;
- goto yy511;
+ if (yych == '_') goto yy2357;
+ if (yych <= '`') goto yy2203;
+ goto yy2357;
}
} else {
if (yych <= 0xE0) {
- if (yych <= 0x7F) goto yy413;
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy515;
- goto yy516;
+ if (yych <= 0x7F) goto yy2203;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2361;
+ goto yy2362;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy517;
- goto yy518;
+ if (yych <= 0xEF) goto yy2363;
+ goto yy2364;
} else {
- if (yych <= 0xF3) goto yy519;
- if (yych <= 0xF4) goto yy520;
- goto yy1;
+ if (yych <= 0xF3) goto yy2365;
+ if (yych <= 0xF4) goto yy2366;
+ goto yy1682;
}
}
}
}
-yy608:
- yyaccept = 28;
+yy2494:
+ yyaccept = 38;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 0xC1) {
if (yych <= '\'') {
- if (yych <= 0x00) goto yy315;
- if (yych >= '\'') goto yy599;
+ if (yych <= 0x00) goto yy2039;
+ if (yych >= '\'') goto yy2485;
} else {
- if (yych == '\\') goto yy610;
- if (yych >= 0x80) goto yy315;
+ if (yych == '\\') goto yy2496;
+ if (yych >= 0x80) goto yy2039;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xDF) goto yy611;
- if (yych <= 0xE0) goto yy612;
- goto yy613;
+ if (yych <= 0xDF) goto yy2497;
+ if (yych <= 0xE0) goto yy2498;
+ goto yy2499;
} else {
- if (yych <= 0xF0) goto yy614;
- if (yych <= 0xF3) goto yy615;
- if (yych <= 0xF4) goto yy616;
- goto yy315;
+ if (yych <= 0xF0) goto yy2500;
+ if (yych <= 0xF3) goto yy2501;
+ if (yych <= 0xF4) goto yy2502;
+ goto yy2039;
}
}
-yy609:
+yy2495:
yych = *++YYCURSOR;
if (yych <= 0xC1) {
if (yych <= '\'') {
- if (yych <= 0x00) goto yy1;
- if (yych <= '&') goto yy609;
- goto yy599;
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= '&') goto yy2495;
+ goto yy2485;
} else {
- if (yych == '\\') goto yy610;
- if (yych <= 0x7F) goto yy609;
- goto yy1;
+ if (yych == '\\') goto yy2496;
+ if (yych <= 0x7F) goto yy2495;
+ goto yy1682;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xDF) goto yy611;
- if (yych <= 0xE0) goto yy612;
- goto yy613;
+ if (yych <= 0xDF) goto yy2497;
+ if (yych <= 0xE0) goto yy2498;
+ goto yy2499;
} else {
- if (yych <= 0xF0) goto yy614;
- if (yych <= 0xF3) goto yy615;
- if (yych <= 0xF4) goto yy616;
- goto yy1;
+ if (yych <= 0xF0) goto yy2500;
+ if (yych <= 0xF3) goto yy2501;
+ if (yych <= 0xF4) goto yy2502;
+ goto yy1682;
}
}
-yy610:
+yy2496:
yych = *++YYCURSOR;
- if (yych <= 0xDF) {
- if (yych <= '\n') {
- if (yych <= '\t') goto yy609;
- goto yy1;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 0x00) goto yy1682;
+ goto yy2495;
} else {
- if (yych <= 0x7F) goto yy609;
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych >= 0xE0) goto yy2498;
}
} else {
if (yych <= 0xF0) {
- if (yych <= 0xE0) goto yy612;
- if (yych <= 0xEF) goto yy613;
- goto yy614;
+ if (yych <= 0xEF) goto yy2499;
+ goto yy2500;
} else {
- if (yych <= 0xF3) goto yy615;
- if (yych <= 0xF4) goto yy616;
- goto yy1;
+ if (yych <= 0xF3) goto yy2501;
+ if (yych <= 0xF4) goto yy2502;
+ goto yy1682;
}
}
-yy611:
+yy2497:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy609;
- goto yy1;
-yy612:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2495;
+ goto yy1682;
+yy2498:
yych = *++YYCURSOR;
- if (yych <= 0x9F) goto yy1;
- if (yych <= 0xBF) goto yy611;
- goto yy1;
-yy613:
+ if (yych <= 0x9F) goto yy1682;
+ if (yych <= 0xBF) goto yy2497;
+ goto yy1682;
+yy2499:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy611;
- goto yy1;
-yy614:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2497;
+ goto yy1682;
+yy2500:
yych = *++YYCURSOR;
- if (yych <= 0x8F) goto yy1;
- if (yych <= 0xBF) goto yy613;
- goto yy1;
-yy615:
+ if (yych <= 0x8F) goto yy1682;
+ if (yych <= 0xBF) goto yy2499;
+ goto yy1682;
+yy2501:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy613;
- goto yy1;
-yy616:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2499;
+ goto yy1682;
+yy2502:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0x8F) goto yy613;
- goto yy1;
-yy617:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0x8F) goto yy2499;
+ goto yy1682;
+yy2503:
yych = *++YYCURSOR;
if (yych <= '>') {
if (yych <= ' ') {
if (yych <= '\t') {
- if (yych <= 0x00) goto yy1;
- if (yych <= 0x08) goto yy522;
- goto yy617;
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= 0x08) goto yy2368;
+ goto yy2503;
} else {
- if (yych == '\r') goto yy617;
- if (yych <= 0x1F) goto yy522;
- goto yy617;
+ if (yych == '\r') goto yy2503;
+ if (yych <= 0x1F) goto yy2368;
+ goto yy2503;
}
} else {
if (yych <= '/') {
- if (yych == '-') goto yy617;
- if (yych <= '.') goto yy522;
+ if (yych == '-') goto yy2503;
+ if (yych <= '.') goto yy2368;
} else {
- if (yych <= ':') goto yy617;
- if (yych <= '<') goto yy522;
- if (yych <= '=') goto yy523;
- goto yy1;
+ if (yych <= ':') goto yy2503;
+ if (yych <= '<') goto yy2368;
+ if (yych <= '=') goto yy2369;
+ goto yy1682;
}
}
} else {
if (yych <= 0x7F) {
if (yych <= '^') {
- if (yych <= '?') goto yy618;
- if (yych <= '@') goto yy522;
- if (yych <= 'Z') goto yy617;
- goto yy522;
+ if (yych <= '?') goto yy2504;
+ if (yych <= '@') goto yy2368;
+ if (yych <= 'Z') goto yy2503;
+ goto yy2368;
} else {
- if (yych == '`') goto yy522;
- if (yych <= 'z') goto yy617;
- goto yy522;
+ if (yych == '`') goto yy2368;
+ if (yych <= 'z') goto yy2503;
+ goto yy2368;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy526;
- if (yych <= 0xE0) goto yy527;
- goto yy528;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2372;
+ if (yych <= 0xE0) goto yy2373;
+ goto yy2374;
} else {
- if (yych <= 0xF0) goto yy529;
- if (yych <= 0xF3) goto yy530;
- if (yych <= 0xF4) goto yy531;
- goto yy1;
+ if (yych <= 0xF0) goto yy2375;
+ if (yych <= 0xF3) goto yy2376;
+ if (yych <= 0xF4) goto yy2377;
+ goto yy1682;
}
}
}
-yy618:
+yy2504:
yych = *++YYCURSOR;
if (yych <= '^') {
if (yych <= ':') {
if (yych <= '-') {
- if (yych <= 0x00) goto yy1;
- if (yych <= ',') goto yy522;
- goto yy617;
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= ',') goto yy2368;
+ goto yy2503;
} else {
- if (yych <= '.') goto yy522;
- if (yych <= '/') goto yy618;
- goto yy617;
+ if (yych <= '.') goto yy2368;
+ if (yych <= '/') goto yy2504;
+ goto yy2503;
}
} else {
if (yych <= '?') {
- if (yych <= '=') goto yy522;
- if (yych <= '>') goto yy314;
- goto yy618;
+ if (yych <= '=') goto yy2368;
+ if (yych <= '>') goto yy2038;
+ goto yy2504;
} else {
- if (yych <= '@') goto yy522;
- if (yych <= 'Z') goto yy617;
- goto yy522;
+ if (yych <= '@') goto yy2368;
+ if (yych <= 'Z') goto yy2503;
+ goto yy2368;
}
}
} else {
if (yych <= 0xDF) {
if (yych <= 'z') {
- if (yych == '`') goto yy522;
- goto yy617;
+ if (yych == '`') goto yy2368;
+ goto yy2503;
} else {
- if (yych <= 0x7F) goto yy522;
- if (yych <= 0xC1) goto yy1;
- goto yy526;
+ if (yych <= 0x7F) goto yy2368;
+ if (yych <= 0xC1) goto yy1682;
+ goto yy2372;
}
} else {
if (yych <= 0xF0) {
- if (yych <= 0xE0) goto yy527;
- if (yych <= 0xEF) goto yy528;
- goto yy529;
+ if (yych <= 0xE0) goto yy2373;
+ if (yych <= 0xEF) goto yy2374;
+ goto yy2375;
} else {
- if (yych <= 0xF3) goto yy530;
- if (yych <= 0xF4) goto yy531;
- goto yy1;
+ if (yych <= 0xF3) goto yy2376;
+ if (yych <= 0xF4) goto yy2377;
+ goto yy1682;
}
}
}
-yy619:
+yy2505:
yych = *++YYCURSOR;
if (yych <= '>') {
if (yych <= '!') {
if (yych <= '\f') {
- if (yych <= 0x00) goto yy1;
- if (yych == '\t') goto yy619;
- goto yy524;
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '\t') goto yy2505;
+ goto yy2370;
} else {
- if (yych <= '\r') goto yy619;
- if (yych == ' ') goto yy619;
- goto yy524;
+ if (yych <= '\r') goto yy2505;
+ if (yych == ' ') goto yy2505;
+ goto yy2370;
}
} else {
if (yych <= '.') {
- if (yych <= '"') goto yy522;
- if (yych == '-') goto yy619;
- goto yy524;
+ if (yych <= '"') goto yy2368;
+ if (yych == '-') goto yy2505;
+ goto yy2370;
} else {
if (yych <= ':') {
- if (yych >= '0') goto yy619;
+ if (yych >= '0') goto yy2505;
} else {
- if (yych <= '<') goto yy524;
- if (yych <= '=') goto yy719;
- goto yy621;
+ if (yych <= '<') goto yy2370;
+ if (yych <= '=') goto yy2630;
+ goto yy2507;
}
}
}
} else {
if (yych <= 'z') {
if (yych <= '[') {
- if (yych <= '?') goto yy620;
- if (yych <= '@') goto yy524;
- if (yych <= 'Z') goto yy619;
- goto yy524;
+ if (yych <= '?') goto yy2506;
+ if (yych <= '@') goto yy2370;
+ if (yych <= 'Z') goto yy2505;
+ goto yy2370;
} else {
if (yych <= '^') {
- if (yych <= '\\') goto yy622;
- goto yy524;
+ if (yych <= '\\') goto yy2508;
+ goto yy2370;
} else {
- if (yych == '`') goto yy524;
- goto yy619;
+ if (yych == '`') goto yy2370;
+ goto yy2505;
}
}
} else {
if (yych <= 0xE0) {
- if (yych <= 0x7F) goto yy524;
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy623;
- goto yy624;
+ if (yych <= 0x7F) goto yy2370;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2509;
+ goto yy2510;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy625;
- goto yy626;
+ if (yych <= 0xEF) goto yy2511;
+ goto yy2512;
} else {
- if (yych <= 0xF3) goto yy627;
- if (yych <= 0xF4) goto yy628;
- goto yy1;
+ if (yych <= 0xF3) goto yy2513;
+ if (yych <= 0xF4) goto yy2514;
+ goto yy1682;
}
}
}
}
-yy620:
+yy2506:
yych = *++YYCURSOR;
if (yych <= '[') {
if (yych <= '/') {
if (yych <= '"') {
- if (yych <= 0x00) goto yy1;
- if (yych <= '!') goto yy524;
- goto yy522;
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= '!') goto yy2370;
+ goto yy2368;
} else {
- if (yych == '-') goto yy619;
- if (yych <= '.') goto yy524;
- goto yy620;
+ if (yych == '-') goto yy2505;
+ if (yych <= '.') goto yy2370;
+ goto yy2506;
}
} else {
if (yych <= '>') {
- if (yych <= ':') goto yy619;
- if (yych <= '=') goto yy524;
- goto yy720;
+ if (yych <= ':') goto yy2505;
+ if (yych <= '=') goto yy2370;
+ goto yy2631;
} else {
- if (yych <= '?') goto yy620;
- if (yych <= '@') goto yy524;
- if (yych <= 'Z') goto yy619;
- goto yy524;
+ if (yych <= '?') goto yy2506;
+ if (yych <= '@') goto yy2370;
+ if (yych <= 'Z') goto yy2505;
+ goto yy2370;
}
}
} else {
if (yych <= 0xC1) {
if (yych <= '_') {
- if (yych <= '\\') goto yy622;
- if (yych <= '^') goto yy524;
- goto yy619;
+ if (yych <= '\\') goto yy2508;
+ if (yych <= '^') goto yy2370;
+ goto yy2505;
} else {
- if (yych <= '`') goto yy524;
- if (yych <= 'z') goto yy619;
- if (yych <= 0x7F) goto yy524;
- goto yy1;
+ if (yych <= '`') goto yy2370;
+ if (yych <= 'z') goto yy2505;
+ if (yych <= 0x7F) goto yy2370;
+ goto yy1682;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xDF) goto yy623;
- if (yych <= 0xE0) goto yy624;
- goto yy625;
+ if (yych <= 0xDF) goto yy2509;
+ if (yych <= 0xE0) goto yy2510;
+ goto yy2511;
} else {
- if (yych <= 0xF0) goto yy626;
- if (yych <= 0xF3) goto yy627;
- if (yych <= 0xF4) goto yy628;
- goto yy1;
+ if (yych <= 0xF0) goto yy2512;
+ if (yych <= 0xF3) goto yy2513;
+ if (yych <= 0xF4) goto yy2514;
+ goto yy1682;
}
}
}
-yy621:
+yy2507:
yych = *++YYCURSOR;
if (yych <= 0xC1) {
if (yych <= '"') {
- if (yych <= 0x00) goto yy1;
- if (yych <= '!') goto yy621;
- goto yy721;
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= '!') goto yy2507;
+ goto yy2632;
} else {
- if (yych == '\\') goto yy722;
- if (yych <= 0x7F) goto yy621;
- goto yy1;
+ if (yych == '\\') goto yy2633;
+ if (yych <= 0x7F) goto yy2507;
+ goto yy1682;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xDF) goto yy723;
- if (yych <= 0xE0) goto yy724;
- goto yy725;
+ if (yych <= 0xDF) goto yy2634;
+ if (yych <= 0xE0) goto yy2635;
+ goto yy2636;
} else {
- if (yych <= 0xF0) goto yy726;
- if (yych <= 0xF3) goto yy727;
- if (yych <= 0xF4) goto yy728;
- goto yy1;
+ if (yych <= 0xF0) goto yy2637;
+ if (yych <= 0xF3) goto yy2638;
+ if (yych <= 0xF4) goto yy2639;
+ goto yy1682;
}
}
-yy622:
+yy2508:
yych = *++YYCURSOR;
- if (yych <= 'Z') {
- if (yych <= '.') {
- if (yych <= '\n') {
- if (yych <= 0x00) goto yy621;
- if (yych <= '\t') goto yy524;
- goto yy522;
+ if (yych <= '^') {
+ if (yych <= ':') {
+ if (yych <= '-') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= ',') goto yy2370;
+ goto yy2505;
} else {
- if (yych == '-') goto yy619;
- goto yy524;
+ if (yych <= '.') goto yy2370;
+ if (yych <= '/') goto yy2506;
+ goto yy2505;
}
} else {
- if (yych <= '=') {
- if (yych <= '/') goto yy620;
- if (yych <= ':') goto yy619;
- goto yy524;
+ if (yych <= '?') {
+ if (yych <= '=') goto yy2370;
+ if (yych <= '>') goto yy2507;
+ goto yy2506;
} else {
- if (yych <= '>') goto yy621;
- if (yych <= '?') goto yy620;
- if (yych <= '@') goto yy524;
- goto yy619;
+ if (yych <= '@') goto yy2370;
+ if (yych <= 'Z') goto yy2505;
+ goto yy2370;
}
}
} else {
- if (yych <= 0xC1) {
- if (yych <= '`') {
- if (yych == '_') goto yy619;
- goto yy524;
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych == '`') goto yy2370;
+ goto yy2505;
} else {
- if (yych <= 'z') goto yy619;
- if (yych <= 0x7F) goto yy524;
- goto yy1;
+ if (yych <= 0x7F) goto yy2370;
+ if (yych <= 0xC1) goto yy1682;
}
} else {
- if (yych <= 0xEF) {
- if (yych <= 0xDF) goto yy623;
- if (yych <= 0xE0) goto yy624;
- goto yy625;
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy2510;
+ if (yych <= 0xEF) goto yy2511;
+ goto yy2512;
} else {
- if (yych <= 0xF0) goto yy626;
- if (yych <= 0xF3) goto yy627;
- if (yych <= 0xF4) goto yy628;
- goto yy1;
+ if (yych <= 0xF3) goto yy2513;
+ if (yych <= 0xF4) goto yy2514;
+ goto yy1682;
}
}
}
-yy623:
+yy2509:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy524;
- goto yy1;
-yy624:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2370;
+ goto yy1682;
+yy2510:
yych = *++YYCURSOR;
- if (yych <= 0x9F) goto yy1;
- if (yych <= 0xBF) goto yy623;
- goto yy1;
-yy625:
+ if (yych <= 0x9F) goto yy1682;
+ if (yych <= 0xBF) goto yy2509;
+ goto yy1682;
+yy2511:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy623;
- goto yy1;
-yy626:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2509;
+ goto yy1682;
+yy2512:
yych = *++YYCURSOR;
- if (yych <= 0x8F) goto yy1;
- if (yych <= 0xBF) goto yy625;
- goto yy1;
-yy627:
+ if (yych <= 0x8F) goto yy1682;
+ if (yych <= 0xBF) goto yy2511;
+ goto yy1682;
+yy2513:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy625;
- goto yy1;
-yy628:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2511;
+ goto yy1682;
+yy2514:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0x8F) goto yy625;
- goto yy1;
-yy629:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0x8F) goto yy2511;
+ goto yy1682;
+yy2515:
yych = *++YYCURSOR;
if (yych <= '>') {
if (yych <= '&') {
if (yych <= '\f') {
- if (yych <= 0x00) goto yy1;
- if (yych == '\t') goto yy629;
- goto yy525;
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '\t') goto yy2515;
+ goto yy2371;
} else {
- if (yych <= '\r') goto yy629;
- if (yych == ' ') goto yy629;
- goto yy525;
+ if (yych <= '\r') goto yy2515;
+ if (yych == ' ') goto yy2515;
+ goto yy2371;
}
} else {
if (yych <= '.') {
- if (yych <= '\'') goto yy522;
- if (yych == '-') goto yy629;
- goto yy525;
+ if (yych <= '\'') goto yy2368;
+ if (yych == '-') goto yy2515;
+ goto yy2371;
} else {
if (yych <= ':') {
- if (yych >= '0') goto yy629;
+ if (yych >= '0') goto yy2515;
} else {
- if (yych <= '<') goto yy525;
- if (yych <= '=') goto yy729;
- goto yy631;
+ if (yych <= '<') goto yy2371;
+ if (yych <= '=') goto yy2640;
+ goto yy2517;
}
}
}
} else {
if (yych <= 'z') {
if (yych <= '[') {
- if (yych <= '?') goto yy630;
- if (yych <= '@') goto yy525;
- if (yych <= 'Z') goto yy629;
- goto yy525;
+ if (yych <= '?') goto yy2516;
+ if (yych <= '@') goto yy2371;
+ if (yych <= 'Z') goto yy2515;
+ goto yy2371;
} else {
if (yych <= '^') {
- if (yych <= '\\') goto yy632;
- goto yy525;
+ if (yych <= '\\') goto yy2518;
+ goto yy2371;
} else {
- if (yych == '`') goto yy525;
- goto yy629;
+ if (yych == '`') goto yy2371;
+ goto yy2515;
}
}
} else {
if (yych <= 0xE0) {
- if (yych <= 0x7F) goto yy525;
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy633;
- goto yy634;
+ if (yych <= 0x7F) goto yy2371;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2519;
+ goto yy2520;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy635;
- goto yy636;
+ if (yych <= 0xEF) goto yy2521;
+ goto yy2522;
} else {
- if (yych <= 0xF3) goto yy637;
- if (yych <= 0xF4) goto yy638;
- goto yy1;
+ if (yych <= 0xF3) goto yy2523;
+ if (yych <= 0xF4) goto yy2524;
+ goto yy1682;
}
}
}
}
-yy630:
+yy2516:
yych = *++YYCURSOR;
if (yych <= '[') {
if (yych <= '/') {
if (yych <= '\'') {
- if (yych <= 0x00) goto yy1;
- if (yych <= '&') goto yy525;
- goto yy522;
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= '&') goto yy2371;
+ goto yy2368;
} else {
- if (yych == '-') goto yy629;
- if (yych <= '.') goto yy525;
- goto yy630;
+ if (yych == '-') goto yy2515;
+ if (yych <= '.') goto yy2371;
+ goto yy2516;
}
} else {
if (yych <= '>') {
- if (yych <= ':') goto yy629;
- if (yych <= '=') goto yy525;
- goto yy730;
+ if (yych <= ':') goto yy2515;
+ if (yych <= '=') goto yy2371;
+ goto yy2641;
} else {
- if (yych <= '?') goto yy630;
- if (yych <= '@') goto yy525;
- if (yych <= 'Z') goto yy629;
- goto yy525;
+ if (yych <= '?') goto yy2516;
+ if (yych <= '@') goto yy2371;
+ if (yych <= 'Z') goto yy2515;
+ goto yy2371;
}
}
} else {
if (yych <= 0xC1) {
if (yych <= '_') {
- if (yych <= '\\') goto yy632;
- if (yych <= '^') goto yy525;
- goto yy629;
+ if (yych <= '\\') goto yy2518;
+ if (yych <= '^') goto yy2371;
+ goto yy2515;
} else {
- if (yych <= '`') goto yy525;
- if (yych <= 'z') goto yy629;
- if (yych <= 0x7F) goto yy525;
- goto yy1;
+ if (yych <= '`') goto yy2371;
+ if (yych <= 'z') goto yy2515;
+ if (yych <= 0x7F) goto yy2371;
+ goto yy1682;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xDF) goto yy633;
- if (yych <= 0xE0) goto yy634;
- goto yy635;
+ if (yych <= 0xDF) goto yy2519;
+ if (yych <= 0xE0) goto yy2520;
+ goto yy2521;
} else {
- if (yych <= 0xF0) goto yy636;
- if (yych <= 0xF3) goto yy637;
- if (yych <= 0xF4) goto yy638;
- goto yy1;
+ if (yych <= 0xF0) goto yy2522;
+ if (yych <= 0xF3) goto yy2523;
+ if (yych <= 0xF4) goto yy2524;
+ goto yy1682;
}
}
}
-yy631:
+yy2517:
yych = *++YYCURSOR;
if (yych <= 0xC1) {
if (yych <= '\'') {
- if (yych <= 0x00) goto yy1;
- if (yych <= '&') goto yy631;
- goto yy721;
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= '&') goto yy2517;
+ goto yy2632;
} else {
- if (yych == '\\') goto yy731;
- if (yych <= 0x7F) goto yy631;
- goto yy1;
+ if (yych == '\\') goto yy2642;
+ if (yych <= 0x7F) goto yy2517;
+ goto yy1682;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xDF) goto yy732;
- if (yych <= 0xE0) goto yy733;
- goto yy734;
+ if (yych <= 0xDF) goto yy2643;
+ if (yych <= 0xE0) goto yy2644;
+ goto yy2645;
} else {
- if (yych <= 0xF0) goto yy735;
- if (yych <= 0xF3) goto yy736;
- if (yych <= 0xF4) goto yy737;
- goto yy1;
+ if (yych <= 0xF0) goto yy2646;
+ if (yych <= 0xF3) goto yy2647;
+ if (yych <= 0xF4) goto yy2648;
+ goto yy1682;
}
}
-yy632:
+yy2518:
yych = *++YYCURSOR;
- if (yych <= 'Z') {
- if (yych <= '.') {
- if (yych <= '\n') {
- if (yych <= 0x00) goto yy631;
- if (yych <= '\t') goto yy525;
- goto yy522;
+ if (yych <= '^') {
+ if (yych <= ':') {
+ if (yych <= '-') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= ',') goto yy2371;
+ goto yy2515;
} else {
- if (yych == '-') goto yy629;
- goto yy525;
+ if (yych <= '.') goto yy2371;
+ if (yych <= '/') goto yy2516;
+ goto yy2515;
}
} else {
- if (yych <= '=') {
- if (yych <= '/') goto yy630;
- if (yych <= ':') goto yy629;
- goto yy525;
+ if (yych <= '?') {
+ if (yych <= '=') goto yy2371;
+ if (yych <= '>') goto yy2517;
+ goto yy2516;
} else {
- if (yych <= '>') goto yy631;
- if (yych <= '?') goto yy630;
- if (yych <= '@') goto yy525;
- goto yy629;
+ if (yych <= '@') goto yy2371;
+ if (yych <= 'Z') goto yy2515;
+ goto yy2371;
}
}
} else {
- if (yych <= 0xC1) {
- if (yych <= '`') {
- if (yych == '_') goto yy629;
- goto yy525;
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych == '`') goto yy2371;
+ goto yy2515;
} else {
- if (yych <= 'z') goto yy629;
- if (yych <= 0x7F) goto yy525;
- goto yy1;
+ if (yych <= 0x7F) goto yy2371;
+ if (yych <= 0xC1) goto yy1682;
}
} else {
- if (yych <= 0xEF) {
- if (yych <= 0xDF) goto yy633;
- if (yych <= 0xE0) goto yy634;
- goto yy635;
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy2520;
+ if (yych <= 0xEF) goto yy2521;
+ goto yy2522;
} else {
- if (yych <= 0xF0) goto yy636;
- if (yych <= 0xF3) goto yy637;
- if (yych <= 0xF4) goto yy638;
- goto yy1;
+ if (yych <= 0xF3) goto yy2523;
+ if (yych <= 0xF4) goto yy2524;
+ goto yy1682;
}
}
}
-yy633:
+yy2519:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy525;
- goto yy1;
-yy634:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2371;
+ goto yy1682;
+yy2520:
yych = *++YYCURSOR;
- if (yych <= 0x9F) goto yy1;
- if (yych <= 0xBF) goto yy633;
- goto yy1;
-yy635:
+ if (yych <= 0x9F) goto yy1682;
+ if (yych <= 0xBF) goto yy2519;
+ goto yy1682;
+yy2521:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy633;
- goto yy1;
-yy636:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2519;
+ goto yy1682;
+yy2522:
yych = *++YYCURSOR;
- if (yych <= 0x8F) goto yy1;
- if (yych <= 0xBF) goto yy635;
- goto yy1;
-yy637:
+ if (yych <= 0x8F) goto yy1682;
+ if (yych <= 0xBF) goto yy2521;
+ goto yy1682;
+yy2523:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy635;
- goto yy1;
-yy638:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2521;
+ goto yy1682;
+yy2524:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0x8F) goto yy635;
- goto yy1;
-yy639:
- yyaccept = 0;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0x8F) goto yy2521;
+ goto yy1682;
+yy2525:
+ yych = *++YYCURSOR;
+ if (yych == ' ') goto yy2649;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2525;
+ goto yy1682;
+yy2526:
+ yyaccept = 7;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= ':') {
- if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy1773;
+ if (yych <= '9') goto yy2650;
+ goto yy1773;
+ } else {
+ if (yych <= 'F') goto yy2650;
+ if (yych <= '`') goto yy1773;
+ if (yych <= 'f') goto yy2650;
+ goto yy1773;
+ }
+yy2527:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '^') {
+ if (yych <= '/') {
+ if (yych <= ',') {
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy2575;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ } else {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy2217;
+ }
+ if (yych <= '.') {
+ yyt2 = YYCURSOR;
+ goto yy2218;
+ }
+ yyt2 = YYCURSOR;
+ goto yy2128;
+ }
} else {
- if (yych <= '.') {
- if (yych <= ',') goto yy4;
- goto yy46;
+ if (yych <= '?') {
+ if (yych <= '9') goto yy2651;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2652;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1892;
} else {
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy738;
- goto yy148;
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
+ }
+ if (yych <= 'F') goto yy2653;
+ if (yych <= 'Z') goto yy2055;
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
}
} else {
- if (yych <= '^') {
- if (yych <= '@') {
- if (yych <= '?') goto yy4;
- goto yy96;
+ if (yych <= 0xC1) {
+ if (yych <= 'f') {
+ if (yych <= '_') {
+ yyt2 = YYCURSOR;
+ goto yy2057;
+ }
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2653;
} else {
- if (yych <= 'F') goto yy738;
- if (yych <= 'Z') goto yy115;
- goto yy4;
+ if (yych <= 'z') goto yy2055;
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy1650;
}
} else {
- if (yych <= '`') {
- if (yych <= '_') goto yy46;
- goto yy4;
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy1900;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1902;
} else {
- if (yych <= 'f') goto yy738;
- if (yych <= 'z') goto yy115;
- goto yy4;
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy1903;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1650;
}
}
}
-yy640:
- yych = *++YYCURSOR;
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy739;
- goto yy1;
-yy641:
- yyaccept = 0;
+yy2528:
+ yyaccept = 7;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= ',') {
- if (yych <= '!') {
- if (yych <= '\f') {
- if (yych <= 0x00) {
- yyt4 = YYCURSOR;
- goto yy221;
- }
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= '^') {
+ if (yych <= '/') {
+ if (yych <= ',') {
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy2575;
}
- goto yy4;
+ yyt2 = YYCURSOR;
+ goto yy1892;
} else {
- if (yych <= '\r') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy2217;
}
- if (yych <= 0x1F) goto yy4;
- if (yych <= ' ') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= '.') {
+ yyt2 = YYCURSOR;
+ goto yy2218;
}
- yyt4 = YYCURSOR;
- goto yy223;
+ yyt2 = YYCURSOR;
+ goto yy2128;
}
} else {
- if (yych <= '&') {
- if (yych <= '"') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= '?') {
+ if (yych <= '9') goto yy2654;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2652;
}
- if (yych == '%') goto yy80;
- goto yy4;
+ yyt2 = YYCURSOR;
+ goto yy1892;
} else {
- if (yych <= '\'') {
- yyt4 = YYCURSOR;
- goto yy224;
- }
- if (yych <= '*') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
}
- if (yych <= '+') goto yy80;
- yyt4 = YYCURSOR;
- goto yy223;
+ if (yych <= 'F') goto yy2653;
+ if (yych <= 'Z') goto yy2055;
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
}
} else {
- if (yych <= '?') {
- if (yych <= '9') {
- if (yych <= '-') goto yy46;
- if (yych <= '.') {
- yyt4 = YYCURSOR;
- goto yy230;
+ if (yych <= 0xC1) {
+ if (yych <= 'f') {
+ if (yych <= '_') {
+ yyt2 = YYCURSOR;
+ goto yy2057;
}
- if (yych <= '/') goto yy4;
- goto yy738;
- } else {
- if (yych <= ':') {
- yyt3 = YYCURSOR;
- goto yy234;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
- if (yych <= ';') {
- yyt4 = YYCURSOR;
- goto yy221;
+ goto yy2653;
+ } else {
+ if (yych <= 'z') goto yy2055;
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
- if (yych <= '>') goto yy4;
- yyt4 = YYCURSOR;
- goto yy223;
+ goto yy1650;
}
} else {
- if (yych <= '^') {
- if (yych <= '@') goto yy96;
- if (yych <= 'F') goto yy738;
- if (yych <= 'Z') goto yy115;
- goto yy4;
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy1900;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1902;
} else {
- if (yych <= '`') {
- if (yych <= '_') goto yy46;
- goto yy4;
- } else {
- if (yych <= 'f') goto yy740;
- if (yych <= 'z') goto yy326;
- goto yy4;
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy1903;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
}
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1650;
}
}
}
-yy642:
- ++YYCURSOR;
- yyt1 = yyt2;
-yy643:
- YYCURSOR = yyt1;
-#line 173 "../../lnav/src/data_scanner_re.re"
- { RET(DT_TIME); }
-#line 20685 "../../lnav/src/data_scanner_re.cc"
-yy644:
- yyaccept = 29;
- yych = *(YYMARKER = ++YYCURSOR);
- yyt1 = yyt2;
- if (yych <= '/') goto yy643;
- if (yych <= '9') goto yy741;
- goto yy643;
-yy645:
- yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy642;
- goto yy1;
-yy646:
- yych = *++YYCURSOR;
- if (yych <= 0x9F) goto yy1;
- if (yych <= 0xBF) goto yy645;
- goto yy1;
-yy647:
- yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy645;
- goto yy1;
-yy648:
- yych = *++YYCURSOR;
- if (yych <= 0x8F) goto yy1;
- if (yych <= 0xBF) goto yy647;
- goto yy1;
-yy649:
- yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy647;
- goto yy1;
-yy650:
- yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0x8F) goto yy647;
- goto yy1;
-yy651:
- yych = *++YYCURSOR;
- if (yych == 'm') goto yy742;
- goto yy100;
-yy652:
- yyaccept = 5;
+yy2529:
+ yyaccept = 7;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 16) {
- goto yy101;
- }
- if (yych <= '\'') {
- if (yych <= 0x1A) {
- if (yych <= '\n') {
- if (yych <= 0x00) goto yy24;
- if (yych <= 0x08) goto yy4;
- goto yy24;
+ if (yych <= 'Z') {
+ if (yych <= '4') {
+ if (yych <= ',') {
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy2575;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1892;
} else {
- if (yych == '\r') goto yy24;
- goto yy4;
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy2217;
+ }
+ if (yych <= '.') {
+ yyt2 = YYCURSOR;
+ goto yy2218;
+ }
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
+ }
+ goto yy2654;
}
} else {
- if (yych <= ' ') {
- if (yych <= 0x1B) goto yy24;
- if (yych <= 0x1F) goto yy4;
- goto yy743;
+ if (yych <= ':') {
+ if (yych <= '5') goto yy2655;
+ if (yych <= '9') goto yy2651;
+ yyt2 = YYCURSOR;
+ goto yy2652;
} else {
- if (yych == '"') goto yy24;
- if (yych <= '&') goto yy99;
- goto yy24;
+ if (yych <= '?') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
+ }
+ if (yych <= 'F') goto yy2653;
+ goto yy2055;
}
}
} else {
- if (yych <= ']') {
- if (yych <= ':') {
- if (yych <= '*') goto yy99;
- if (yych <= ',') goto yy24;
- goto yy4;
+ if (yych <= 0xC1) {
+ if (yych <= '`') {
+ if (yych == '_') {
+ yyt2 = YYCURSOR;
+ goto yy2057;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1892;
} else {
- if (yych == '\\') goto yy99;
- goto yy24;
+ if (yych <= 'f') goto yy2653;
+ if (yych <= 'z') goto yy2055;
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy1650;
}
} else {
- if (yych <= '~') {
- if (yych <= '^') goto yy99;
- if (yych <= '}') goto yy24;
- goto yy99;
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy1900;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1902;
} else {
- if (yych <= 0x7F) goto yy4;
- if (yych <= 0xC1) goto yy24;
- if (yych <= 0xF4) goto yy4;
- goto yy24;
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy1903;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1650;
}
}
}
-yy653:
- ++YYCURSOR;
-yy654:
- YYCURSOR = yyt1;
-#line 230 "../../lnav/src/data_scanner_re.re"
- {
- RET(DT_IPV4_ADDRESS);
- }
-#line 20785 "../../lnav/src/data_scanner_re.cc"
-yy655:
- yyaccept = 30;
+yy2530:
+ yyaccept = 7;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= ',') {
- if (yych <= '\r') {
- if (yych <= 0x08) {
- if (yych <= 0x00) goto yy654;
- goto yy4;
+ if (yych <= '^') {
+ if (yych <= '/') {
+ if (yych <= ',') {
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy2575;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1892;
} else {
- if (yych <= '\n') goto yy654;
- if (yych <= '\f') goto yy4;
- goto yy654;
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy2217;
+ }
+ if (yych <= '.') {
+ yyt2 = YYCURSOR;
+ goto yy2224;
+ }
+ yyt2 = YYCURSOR;
+ goto yy2128;
}
} else {
- if (yych <= 0x1F) {
- if (yych == 0x1B) goto yy654;
- goto yy4;
+ if (yych <= '?') {
+ if (yych <= '9') goto yy2653;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2652;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1892;
} else {
- if (yych == '$') goto yy4;
- goto yy654;
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
+ }
+ if (yych <= 'F') goto yy2653;
+ if (yych <= 'Z') goto yy2055;
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
}
} else {
- if (yych <= '`') {
- if (yych <= 'Z') {
- if (yych <= ':') goto yy4;
- if (yych <= '?') goto yy654;
- goto yy4;
+ if (yych <= 0xC1) {
+ if (yych <= 'f') {
+ if (yych <= '_') {
+ yyt2 = YYCURSOR;
+ goto yy2057;
+ }
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2653;
} else {
- if (yych == '_') goto yy4;
- goto yy654;
+ if (yych <= 'z') goto yy2055;
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy1650;
}
} else {
- if (yych <= 0x7F) {
- if (yych <= 'z') goto yy4;
- if (yych <= '~') goto yy654;
- goto yy4;
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy1900;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1902;
} else {
- if (yych <= 0xC1) goto yy654;
- if (yych <= 0xF4) goto yy4;
- goto yy654;
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy1903;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1650;
}
}
}
-yy656:
- yyaccept = 30;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '/') {
- if (yych <= '*') {
- if (yych == '%') goto yy81;
- goto yy654;
+yy2531:
+ yych = *++YYCURSOR;
+ if (yych <= '9') {
+ if (yych <= '/') {
+ if (yych == '-') goto yy2065;
+ goto yy1682;
} else {
- if (yych == ',') goto yy654;
- if (yych <= '.') goto yy81;
- goto yy654;
+ if (yych <= '0') goto yy2656;
+ if (yych <= '1') goto yy2657;
+ if (yych <= '2') goto yy2658;
+ goto yy2656;
}
} else {
if (yych <= '^') {
- if (yych <= '9') goto yy81;
- if (yych <= '?') goto yy654;
- if (yych <= 'Z') goto yy81;
- goto yy654;
+ if (yych <= '@') goto yy1682;
+ if (yych <= 'Z') goto yy2055;
+ goto yy1682;
} else {
- if (yych == '`') goto yy654;
- if (yych <= 'z') goto yy81;
- goto yy654;
+ if (yych == '`') goto yy1682;
+ if (yych <= 'z') goto yy2055;
+ goto yy1682;
}
}
-yy657:
- yyaccept = 30;
+yy2532:
+ yyaccept = 7;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '.') {
- if (yych <= 0x1B) {
- if (yych <= '\n') {
- if (yych <= 0x00) goto yy654;
- if (yych <= 0x08) goto yy4;
- goto yy654;
+ if (yych == '.') goto yy2531;
+ goto yy2056;
+yy2533:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '.') goto yy2531;
+ if (yych <= '/') goto yy2056;
+ if (yych <= '5') goto yy2532;
+ goto yy2056;
+yy2534:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '_') {
+ if (yych <= '9') {
+ if (yych <= '-') {
+ if (yych <= ',') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ yyt2 = YYCURSOR;
+ goto yy2217;
} else {
- if (yych == '\r') goto yy654;
- if (yych <= 0x1A) goto yy4;
- goto yy654;
+ if (yych <= '.') {
+ yyt2 = YYCURSOR;
+ goto yy2224;
+ }
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
+ }
+ goto yy2055;
}
} else {
- if (yych <= '%') {
- if (yych <= 0x1F) goto yy4;
- if (yych <= '#') goto yy654;
- if (yych <= '$') goto yy4;
- goto yy80;
+ if (yych <= '@') {
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2220;
+ }
+ if (yych <= '?') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ yyt2 = YYCURSOR;
+ goto yy2128;
} else {
- if (yych == '+') goto yy80;
- if (yych <= ',') goto yy654;
- goto yy46;
+ if (yych <= 'Z') goto yy2055;
+ if (yych <= '^') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ yyt2 = YYCURSOR;
+ goto yy2057;
}
}
} else {
- if (yych <= '^') {
- if (yych <= ':') {
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy344;
- goto yy4;
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2055;
} else {
- if (yych <= '?') goto yy654;
- if (yych <= '@') goto yy96;
- if (yych <= 'Z') goto yy344;
- goto yy654;
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= 0xC1) goto yy1650;
+ yyt2 = YYCURSOR;
+ goto yy1900;
}
} else {
- if (yych <= '~') {
- if (yych == '`') goto yy654;
- if (yych <= 'z') goto yy344;
- goto yy654;
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy1902;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1903;
} else {
- if (yych <= 0x7F) goto yy4;
- if (yych <= 0xC1) goto yy654;
- if (yych <= 0xF4) goto yy4;
- goto yy654;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1650;
}
}
}
-yy658:
- yyaccept = 30;
+yy2535:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2659;
+ goto yy1682;
+yy2536:
+ yyaccept = 14;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '.') {
- if (yych <= 0x1B) {
- if (yych <= '\n') {
- if (yych <= 0x00) goto yy654;
- if (yych <= 0x08) goto yy4;
- goto yy654;
+ if (yych <= ':') {
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy1761;
+ goto yy1697;
} else {
- if (yych == '\r') goto yy654;
- if (yych <= 0x1A) goto yy4;
- goto yy654;
+ if (yych == '+') goto yy1697;
+ goto yy1761;
}
} else {
- if (yych <= '%') {
- if (yych <= 0x1F) goto yy4;
- if (yych <= '#') goto yy654;
- if (yych <= '$') goto yy4;
- goto yy80;
+ if (yych <= '.') {
+ if (yych <= '-') goto yy1729;
+ yyt3 = YYCURSOR;
+ goto yy1928;
} else {
- if (yych == '+') goto yy80;
- if (yych <= ',') goto yy654;
- goto yy46;
+ if (yych <= '/') goto yy1731;
+ if (yych <= '9') goto yy2650;
+ yyt3 = YYCURSOR;
+ goto yy1932;
}
}
} else {
if (yych <= '^') {
- if (yych <= ':') {
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy447;
- goto yy4;
+ if (yych <= '@') {
+ if (yych <= '?') goto yy1761;
+ goto yy1737;
} else {
- if (yych <= '?') goto yy654;
- if (yych <= '@') goto yy96;
- if (yych <= 'Z') goto yy46;
- goto yy654;
+ if (yych <= 'F') goto yy2650;
+ if (yych <= 'Z') goto yy1772;
+ goto yy1761;
}
} else {
- if (yych <= '~') {
- if (yych == '`') goto yy654;
- if (yych <= 'z') goto yy46;
- goto yy654;
+ if (yych <= '`') {
+ if (yych <= '_') goto yy1659;
+ goto yy1761;
} else {
- if (yych <= 0x7F) goto yy4;
- if (yych <= 0xC1) goto yy654;
- if (yych <= 0xF4) goto yy4;
- goto yy654;
+ if (yych <= 'f') goto yy2660;
+ if (yych <= 'z') goto yy2062;
+ goto yy1761;
}
}
}
-yy659:
- yyaccept = 20;
+yy2537:
+ ++YYCURSOR;
+ yyt1 = yyt2;
+yy2538:
+ YYCURSOR = yyt1;
+#line 295 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_TIME); }
+#line 66182 "../../lnav/src/data_scanner_re.cc"
+yy2539:
+ yyaccept = 39;
+ yych = *(YYMARKER = ++YYCURSOR);
+ yyt1 = yyt2;
+ if (yych <= '/') goto yy2538;
+ if (yych <= '9') goto yy2661;
+ goto yy2538;
+yy2540:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2537;
+ goto yy1682;
+yy2541:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy1682;
+ if (yych <= 0xBF) goto yy2540;
+ goto yy1682;
+yy2542:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2540;
+ goto yy1682;
+yy2543:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy1682;
+ if (yych <= 0xBF) goto yy2542;
+ goto yy1682;
+yy2544:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2542;
+ goto yy1682;
+yy2545:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0x8F) goto yy2542;
+ goto yy1682;
+yy2546:
+ yyaccept = 9;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == ' ') goto yy2662;
+ goto yy1722;
+yy2547:
+ ++YYCURSOR;
+yy2548:
+ YYCURSOR = yyt1;
+#line 385 "../../lnav/src/data_scanner_re.re"
+ {
+ RET(DT_IPV4_ADDRESS);
+ }
+#line 66233 "../../lnav/src/data_scanner_re.cc"
+yy2549:
+ yyaccept = 40;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '/') {
+ if (yych <= '*') {
+ if (yych == '%') goto yy1698;
+ goto yy2548;
+ } else {
+ if (yych == ',') goto yy2548;
+ if (yych <= '.') goto yy1698;
+ goto yy2548;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '9') goto yy1698;
+ if (yych <= '?') goto yy2548;
+ if (yych <= 'Z') goto yy1698;
+ goto yy2548;
+ } else {
+ if (yych == '`') goto yy2548;
+ if (yych <= 'z') goto yy1698;
+ goto yy2548;
+ }
+ }
+yy2550:
+ yyaccept = 40;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '9') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) {
- yyt1 = YYCURSOR;
- goto yy653;
- }
- if (yych <= 0x08) {
- yyt1 = YYCURSOR;
- goto yy655;
- }
- if (yych <= '\n') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1697;
+ if (yych <= '*') goto yy2548;
+ goto yy1697;
+ } else {
+ if (yych <= ',') goto yy2548;
+ if (yych <= '.') goto yy1697;
+ if (yych <= '/') goto yy2548;
+ goto yy2093;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '?') goto yy2548;
+ if (yych <= '@') goto yy1699;
+ if (yych <= 'Z') goto yy2093;
+ goto yy2548;
+ } else {
+ if (yych == '`') goto yy2548;
+ if (yych <= 'z') goto yy2093;
+ goto yy2548;
+ }
+ }
+yy2551:
+ yyaccept = 40;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '9') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1697;
+ if (yych <= '*') goto yy2548;
+ goto yy1697;
+ } else {
+ if (yych <= ',') goto yy2548;
+ if (yych <= '.') goto yy1697;
+ if (yych <= '/') goto yy2548;
+ goto yy2252;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '?') goto yy2548;
+ if (yych <= '@') goto yy1699;
+ if (yych <= 'Z') goto yy1745;
+ goto yy2548;
+ } else {
+ if (yych == '`') goto yy2548;
+ if (yych <= 'z') goto yy1745;
+ goto yy2548;
+ }
+ }
+yy2552:
+ yych = *++YYCURSOR;
+ if (yych <= 'Z') {
+ if (yych <= '/') goto yy2548;
+ if (yych <= '9') goto yy1864;
+ if (yych <= '@') goto yy2548;
+ goto yy1864;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy2548;
+ goto yy1864;
+ } else {
+ if (yych <= '`') goto yy2548;
+ if (yych <= 'z') goto yy1864;
+ goto yy2548;
+ }
+ }
+yy2553:
+ yyaccept = 29;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'Z') {
+ if (yych <= '-') {
+ if (yych <= '*') {
+ if (yych == '%') {
yyt1 = YYCURSOR;
- goto yy653;
+ goto yy2549;
}
yyt1 = YYCURSOR;
- goto yy655;
+ goto yy2547;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') {
- yyt1 = YYCURSOR;
- goto yy653;
- }
+ if (yych <= '+') {
yyt1 = YYCURSOR;
- goto yy655;
- } else {
- if (yych <= 0x1B) {
- yyt1 = YYCURSOR;
- goto yy653;
- }
- if (yych <= 0x1F) {
- yyt1 = YYCURSOR;
- goto yy655;
- }
+ goto yy2549;
+ }
+ if (yych <= ',') {
yyt1 = YYCURSOR;
- goto yy653;
+ goto yy2547;
}
+ yyt1 = YYCURSOR;
+ goto yy2550;
}
} else {
- if (yych <= '+') {
- if (yych <= '$') {
- yyt1 = YYCURSOR;
- goto yy655;
- }
- if (yych <= '%') {
+ if (yych <= '9') {
+ if (yych <= '.') {
yyt1 = YYCURSOR;
- goto yy656;
+ goto yy2551;
}
- if (yych <= '*') {
+ if (yych <= '/') {
yyt1 = YYCURSOR;
- goto yy653;
+ goto yy2552;
}
- yyt1 = YYCURSOR;
- goto yy656;
+ goto yy2252;
} else {
- if (yych <= '-') {
- if (yych <= ',') {
- yyt1 = YYCURSOR;
- goto yy653;
- }
- yyt1 = YYCURSOR;
- goto yy657;
- } else {
- if (yych <= '.') {
- yyt1 = YYCURSOR;
- goto yy658;
- }
- if (yych <= '/') {
- yyt1 = YYCURSOR;
- goto yy655;
- }
- goto yy447;
- }
- }
- }
- } else {
- if (yych <= '~') {
- if (yych <= 'Z') {
if (yych <= ':') {
yyt1 = YYCURSOR;
- goto yy660;
+ goto yy2554;
}
if (yych <= '?') {
yyt1 = YYCURSOR;
- goto yy653;
+ goto yy2547;
}
if (yych <= '@') {
yyt1 = YYCURSOR;
- goto yy661;
+ goto yy2555;
}
yyt1 = YYCURSOR;
- goto yy662;
+ goto yy2556;
+ }
+ }
+ } else {
+ if (yych <= 0xC1) {
+ if (yych <= '`') {
+ if (yych == '_') {
+ yyt1 = YYCURSOR;
+ goto yy2556;
+ }
+ yyt1 = YYCURSOR;
+ goto yy2547;
} else {
- if (yych <= '_') {
- if (yych <= '^') {
- yyt1 = YYCURSOR;
- goto yy653;
- }
+ if (yych <= 'z') {
yyt1 = YYCURSOR;
- goto yy662;
- } else {
- if (yych <= '`') {
- yyt1 = YYCURSOR;
- goto yy653;
- }
- if (yych <= 'z') {
- yyt1 = YYCURSOR;
- goto yy662;
- }
+ goto yy2556;
+ }
+ if (yych <= 0x7F) {
yyt1 = YYCURSOR;
- goto yy653;
+ goto yy2547;
}
+ goto yy2095;
}
} else {
- if (yych <= 0xE0) {
- if (yych <= 0x7F) {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
yyt1 = YYCURSOR;
- goto yy655;
+ goto yy2557;
}
- if (yych <= 0xC1) goto yy345;
- if (yych <= 0xDF) {
+ if (yych <= 0xE0) {
yyt1 = YYCURSOR;
- goto yy663;
+ goto yy2558;
}
yyt1 = YYCURSOR;
- goto yy664;
+ goto yy2559;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) {
- yyt1 = YYCURSOR;
- goto yy665;
- }
yyt1 = YYCURSOR;
- goto yy666;
- } else {
- if (yych <= 0xF3) {
- yyt1 = YYCURSOR;
- goto yy667;
- }
- if (yych <= 0xF4) {
- yyt1 = YYCURSOR;
- goto yy668;
- }
- goto yy345;
+ goto yy2560;
+ }
+ if (yych <= 0xF3) {
+ yyt1 = YYCURSOR;
+ goto yy2561;
}
+ if (yych <= 0xF4) {
+ yyt1 = YYCURSOR;
+ goto yy2562;
+ }
+ goto yy2095;
}
}
}
-yy660:
- yyaccept = 30;
+yy2554:
+ yyaccept = 40;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych == ':') goto yy152;
- goto yy654;
-yy661:
- yyaccept = 30;
+ if (yych == ':') goto yy1731;
+ goto yy2548;
+yy2555:
+ yyaccept = 40;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '/') {
- if (yych <= 0x1A) {
- if (yych <= '\n') {
- if (yych <= 0x00) goto yy654;
- if (yych <= 0x08) goto yy4;
- goto yy654;
- } else {
- if (yych == '\r') goto yy654;
- goto yy4;
- }
+ if (yych <= '@') {
+ if (yych <= '.') {
+ if (yych <= ',') goto yy2548;
+ goto yy1802;
} else {
- if (yych <= '#') {
- if (yych <= 0x1B) goto yy654;
- if (yych <= 0x1F) goto yy4;
- goto yy654;
- } else {
- if (yych <= '$') goto yy4;
- if (yych <= ',') goto yy654;
- if (yych <= '.') goto yy174;
- goto yy4;
- }
+ if (yych <= '/') goto yy2548;
+ if (yych <= '9') goto yy1877;
+ goto yy2548;
}
} else {
if (yych <= '_') {
- if (yych <= '?') {
- if (yych <= '9') goto yy174;
- if (yych <= ':') goto yy4;
- goto yy654;
- } else {
- if (yych <= '@') goto yy4;
- if (yych <= 'Z') goto yy174;
- if (yych <= '^') goto yy654;
- goto yy4;
- }
+ if (yych <= 'Z') goto yy1877;
+ if (yych <= '^') goto yy2548;
+ goto yy1864;
} else {
- if (yych <= '~') {
- if (yych <= '`') goto yy654;
- if (yych <= 'z') goto yy174;
- goto yy654;
- } else {
- if (yych <= 0x7F) goto yy4;
- if (yych <= 0xC1) goto yy654;
- if (yych <= 0xF4) goto yy4;
- goto yy654;
- }
+ if (yych <= '`') goto yy2548;
+ if (yych <= 'z') goto yy1877;
+ goto yy2548;
}
}
-yy662:
- yyaccept = 30;
+yy2556:
+ yyaccept = 40;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '-') {
- if (yych <= 0x1B) {
- if (yych <= '\n') {
- if (yych <= 0x00) goto yy654;
- if (yych <= 0x08) goto yy4;
- goto yy654;
- } else {
- if (yych == '\r') goto yy654;
- if (yych <= 0x1A) goto yy4;
- goto yy654;
- }
+ if (yych <= ':') {
+ if (yych <= '*') {
+ if (yych == '%') goto yy2253;
+ goto yy2548;
} else {
- if (yych <= '%') {
- if (yych <= 0x1F) goto yy4;
- if (yych <= '#') goto yy654;
- if (yych <= '$') goto yy4;
- goto yy80;
- } else {
- if (yych == '+') goto yy80;
- if (yych <= ',') goto yy654;
- goto yy255;
- }
+ if (yych == ',') goto yy2548;
+ goto yy2253;
}
} else {
if (yych <= '^') {
- if (yych <= ':') {
- if (yych <= '.') goto yy350;
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy447;
- goto yy4;
- } else {
- if (yych <= '?') goto yy654;
- if (yych <= '@') goto yy96;
- if (yych <= 'Z') goto yy447;
- goto yy654;
- }
- } else {
- if (yych <= '~') {
- if (yych == '`') goto yy654;
- if (yych <= 'z') goto yy447;
- goto yy654;
- } else {
- if (yych <= 0x7F) goto yy4;
- if (yych <= 0xC1) goto yy654;
- if (yych <= 0xF4) goto yy4;
- goto yy654;
- }
- }
- }
-yy663:
- yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy655;
- goto yy1;
-yy664:
- yych = *++YYCURSOR;
- if (yych <= 0x9F) goto yy1;
- if (yych <= 0xBF) goto yy663;
- goto yy1;
-yy665:
- yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy663;
- goto yy1;
-yy666:
- yych = *++YYCURSOR;
- if (yych <= 0x8F) goto yy1;
- if (yych <= 0xBF) goto yy665;
- goto yy1;
-yy667:
- yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy665;
- goto yy1;
-yy668:
- yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0x8F) goto yy665;
- goto yy1;
-yy669:
- yyaccept = 20;
+ if (yych <= '?') goto yy2548;
+ if (yych <= 'Z') goto yy2253;
+ goto yy2548;
+ } else {
+ if (yych == '`') goto yy2548;
+ if (yych <= 'z') goto yy2253;
+ goto yy2548;
+ }
+ }
+yy2557:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2547;
+ goto yy1682;
+yy2558:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy1682;
+ if (yych <= 0xBF) goto yy2557;
+ goto yy1682;
+yy2559:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2557;
+ goto yy1682;
+yy2560:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy1682;
+ if (yych <= 0xBF) goto yy2559;
+ goto yy1682;
+yy2561:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2559;
+ goto yy1682;
+yy2562:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0x8F) goto yy2559;
+ goto yy1682;
+yy2563:
+ yyaccept = 29;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '5') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) {
- yyt1 = YYCURSOR;
- goto yy653;
- }
- if (yych <= 0x08) {
- yyt1 = YYCURSOR;
- goto yy655;
- }
- if (yych <= '\n') {
+ if (yych <= '@') {
+ if (yych <= '-') {
+ if (yych <= '*') {
+ if (yych == '%') {
yyt1 = YYCURSOR;
- goto yy653;
+ goto yy2549;
}
yyt1 = YYCURSOR;
- goto yy655;
+ goto yy2547;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') {
- yyt1 = YYCURSOR;
- goto yy653;
- }
+ if (yych <= '+') {
yyt1 = YYCURSOR;
- goto yy655;
- } else {
- if (yych <= 0x1B) {
- yyt1 = YYCURSOR;
- goto yy653;
- }
- if (yych <= 0x1F) {
- yyt1 = YYCURSOR;
- goto yy655;
- }
+ goto yy2549;
+ }
+ if (yych <= ',') {
yyt1 = YYCURSOR;
- goto yy653;
+ goto yy2547;
}
+ yyt1 = YYCURSOR;
+ goto yy2550;
}
} else {
- if (yych <= '+') {
- if (yych <= '$') {
+ if (yych <= '5') {
+ if (yych <= '.') {
yyt1 = YYCURSOR;
- goto yy655;
+ goto yy2551;
}
- if (yych <= '%') {
+ if (yych <= '/') {
yyt1 = YYCURSOR;
- goto yy656;
+ goto yy2552;
}
- if (yych <= '*') {
+ goto yy2553;
+ } else {
+ if (yych <= '9') goto yy2252;
+ if (yych <= ':') {
yyt1 = YYCURSOR;
- goto yy653;
+ goto yy2554;
}
- yyt1 = YYCURSOR;
- goto yy656;
- } else {
- if (yych <= '-') {
- if (yych <= ',') {
- yyt1 = YYCURSOR;
- goto yy653;
- }
+ if (yych <= '?') {
yyt1 = YYCURSOR;
- goto yy657;
- } else {
- if (yych <= '.') {
- yyt1 = YYCURSOR;
- goto yy658;
- }
- if (yych <= '/') {
- yyt1 = YYCURSOR;
- goto yy655;
- }
- goto yy659;
+ goto yy2547;
}
+ yyt1 = YYCURSOR;
+ goto yy2555;
}
}
} else {
- if (yych <= 'z') {
- if (yych <= '@') {
- if (yych <= '9') goto yy447;
- if (yych <= ':') {
+ if (yych <= 0xC1) {
+ if (yych <= '_') {
+ if (yych <= 'Z') {
yyt1 = YYCURSOR;
- goto yy660;
+ goto yy2556;
}
- if (yych <= '?') {
+ if (yych <= '^') {
yyt1 = YYCURSOR;
- goto yy653;
+ goto yy2547;
}
yyt1 = YYCURSOR;
- goto yy661;
+ goto yy2556;
} else {
- if (yych <= '^') {
- if (yych <= 'Z') {
- yyt1 = YYCURSOR;
- goto yy662;
- }
+ if (yych <= '`') {
yyt1 = YYCURSOR;
- goto yy653;
- } else {
- if (yych == '`') {
- yyt1 = YYCURSOR;
- goto yy653;
- }
+ goto yy2547;
+ }
+ if (yych <= 'z') {
yyt1 = YYCURSOR;
- goto yy662;
+ goto yy2556;
}
+ if (yych <= 0x7F) {
+ yyt1 = YYCURSOR;
+ goto yy2547;
+ }
+ goto yy2095;
}
} else {
- if (yych <= 0xE0) {
- if (yych <= 0x7F) {
- if (yych <= '~') {
- yyt1 = YYCURSOR;
- goto yy653;
- }
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
yyt1 = YYCURSOR;
- goto yy655;
- } else {
- if (yych <= 0xC1) goto yy345;
- if (yych <= 0xDF) {
- yyt1 = YYCURSOR;
- goto yy663;
- }
+ goto yy2557;
+ }
+ if (yych <= 0xE0) {
yyt1 = YYCURSOR;
- goto yy664;
+ goto yy2558;
}
+ yyt1 = YYCURSOR;
+ goto yy2559;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) {
- yyt1 = YYCURSOR;
- goto yy665;
- }
yyt1 = YYCURSOR;
- goto yy666;
- } else {
- if (yych <= 0xF3) {
- yyt1 = YYCURSOR;
- goto yy667;
- }
- if (yych <= 0xF4) {
- yyt1 = YYCURSOR;
- goto yy668;
- }
- goto yy345;
+ goto yy2560;
+ }
+ if (yych <= 0xF3) {
+ yyt1 = YYCURSOR;
+ goto yy2561;
}
+ if (yych <= 0xF4) {
+ yyt1 = YYCURSOR;
+ goto yy2562;
+ }
+ goto yy2095;
}
}
}
-yy670:
- yyaccept = 21;
+yy2564:
+ yyaccept = 29;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych == '-') goto yy466;
- if (yych == ':') goto yy466;
- goto yy354;
-yy671:
- yyaccept = 0;
+ if (yych == 'B') goto yy2395;
+ if (yych == 'b') goto yy2395;
+ goto yy2094;
+yy2565:
+ yyaccept = 29;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy744;
- goto yy4;
-yy672:
- yych = *++YYCURSOR;
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy745;
- goto yy1;
-yy673:
- yyaccept = 31;
+ if (yych <= 'a') {
+ if (yych == 'B') goto yy2395;
+ goto yy2094;
+ } else {
+ if (yych <= 'b') goto yy2395;
+ if (yych == 'n') goto yy2395;
+ goto yy2094;
+ }
+yy2566:
+ yyaccept = 30;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '.') {
- if (yych <= 0x1F) {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy674;
- if (yych <= 0x08) goto yy4;
- if (yych >= '\v') goto yy4;
- } else {
- if (yych <= '\r') goto yy674;
- if (yych != 0x1B) goto yy4;
- }
+ if (yych == '-') goto yy2270;
+ if (yych == ':') goto yy2270;
+ goto yy2107;
+yy2567:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '/') goto yy1865;
+ if (yych <= '9') goto yy2663;
+ goto yy1865;
+yy2568:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2664;
+ goto yy1682;
+yy2569:
+ yyaccept = 41;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '9') {
+ if (yych <= '%') {
+ if (yych == ' ') goto yy2665;
+ if (yych >= '%') goto yy1746;
} else {
- if (yych <= '%') {
- if (yych <= ' ') goto yy746;
- if (yych <= '#') goto yy674;
- if (yych <= '$') goto yy4;
- goto yy80;
+ if (yych <= '+') {
+ if (yych >= '+') goto yy1746;
} else {
- if (yych == '+') goto yy80;
- if (yych >= '-') goto yy46;
+ if (yych <= ',') goto yy2570;
+ if (yych <= '/') goto yy1746;
+ goto yy2666;
}
}
} else {
if (yych <= 'Z') {
if (yych <= '?') {
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy747;
- if (yych <= ':') goto yy4;
+ if (yych <= ':') goto yy1746;
} else {
- if (yych <= '@') goto yy96;
- if (yych == 'T') goto yy748;
- goto yy46;
+ if (yych == 'T') goto yy2667;
+ goto yy1746;
}
} else {
- if (yych <= 'z') {
- if (yych == '_') goto yy46;
- if (yych >= 'a') goto yy46;
+ if (yych <= '_') {
+ if (yych >= '_') goto yy1746;
} else {
- if (yych <= 0x7F) {
- if (yych >= 0x7F) goto yy4;
- } else {
- if (yych <= 0xC1) goto yy674;
- if (yych <= 0xF4) goto yy4;
- }
+ if (yych <= '`') goto yy2570;
+ if (yych <= 'z') goto yy1746;
}
}
}
-yy674:
-#line 187 "../../lnav/src/data_scanner_re.re"
+yy2570:
+#line 309 "../../lnav/src/data_scanner_re.re"
{
RET(DT_DATE);
}
-#line 21464 "../../lnav/src/data_scanner_re.cc"
-yy675:
- yyaccept = 31;
+#line 66686 "../../lnav/src/data_scanner_re.cc"
+yy2571:
+ yyaccept = 41;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '9') {
- if (yych <= 0x1B) {
- if (yych <= '\n') {
- if (yych <= 0x00) goto yy674;
- if (yych <= 0x08) goto yy4;
- goto yy674;
- } else {
- if (yych == '\r') goto yy674;
- if (yych <= 0x1A) goto yy4;
- goto yy674;
- }
+ if (yych <= '?') {
+ if (yych <= ',') {
+ if (yych == ' ') goto yy2665;
+ goto yy2570;
} else {
- if (yych <= '#') {
- if (yych <= 0x1F) goto yy4;
- if (yych <= ' ') goto yy746;
- goto yy674;
- } else {
- if (yych <= '$') goto yy4;
- if (yych <= ',') goto yy674;
- if (yych <= '/') goto yy4;
- goto yy749;
- }
+ if (yych <= '/') goto yy1865;
+ if (yych <= '9') goto yy2668;
+ if (yych <= ':') goto yy1865;
+ goto yy2570;
}
} else {
- if (yych <= '_') {
- if (yych <= 'S') {
- if (yych <= ':') goto yy4;
- if (yych <= '?') goto yy674;
- goto yy4;
- } else {
- if (yych <= 'T') goto yy750;
- if (yych <= 'Z') goto yy4;
- if (yych <= '^') goto yy674;
- goto yy4;
- }
+ if (yych <= '^') {
+ if (yych == 'T') goto yy2669;
+ if (yych <= 'Z') goto yy1865;
+ goto yy2570;
} else {
- if (yych <= '~') {
- if (yych <= '`') goto yy674;
- if (yych <= 'z') goto yy4;
- goto yy674;
- } else {
- if (yych <= 0x7F) goto yy4;
- if (yych <= 0xC1) goto yy674;
- if (yych <= 0xF4) goto yy4;
- goto yy674;
- }
+ if (yych == '`') goto yy2570;
+ if (yych <= 'z') goto yy1865;
+ goto yy2570;
}
}
-yy676:
+yy2572:
yyaccept = 11;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
- }
- if (yych <= '9') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy109;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy109;
- goto yy4;
- } else {
- if (yych <= 0x1A) {
- if (yych <= '\r') goto yy109;
- goto yy4;
- } else {
- if (yych <= 0x1B) goto yy109;
- if (yych <= 0x1F) goto yy4;
- goto yy109;
- }
- }
- } else {
- if (yych <= ',') {
- if (yych <= '%') {
- if (yych <= '$') goto yy4;
- goto yy105;
- } else {
- if (yych == '+') goto yy80;
- goto yy109;
- }
- } else {
- if (yych <= '.') {
- if (yych <= '-') goto yy751;
- goto yy266;
- } else {
- if (yych <= '/') goto yy4;
- if (yych <= '7') goto yy752;
- goto yy753;
- }
- }
- }
- } else {
- if (yych <= '_') {
- if (yych <= 'D') {
- if (yych <= ':') goto yy148;
- if (yych <= '?') goto yy109;
- if (yych <= '@') goto yy96;
- goto yy196;
- } else {
- if (yych <= 'F') {
- if (yych <= 'E') goto yy754;
- goto yy196;
- } else {
- if (yych <= 'Z') goto yy115;
- if (yych <= '^') goto yy109;
- goto yy46;
- }
- }
- } else {
- if (yych <= 'z') {
- if (yych <= 'd') {
- if (yych <= '`') goto yy109;
- goto yy196;
- } else {
- if (yych <= 'e') goto yy754;
- if (yych <= 'f') goto yy196;
- goto yy115;
- }
- } else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy109;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy109;
- if (yych <= 0xF4) goto yy4;
- goto yy109;
- }
- }
- }
- }
-yy677:
- yyaccept = 6;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
}
- if (yych <= '9') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy26;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy26;
- goto yy4;
- } else {
- if (yych <= 0x1A) {
- if (yych <= '\r') goto yy26;
- goto yy4;
- } else {
- if (yych <= 0x1B) goto yy26;
- if (yych <= 0x1F) goto yy4;
- goto yy26;
- }
- }
+ if (yych <= '7') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1727;
+ if (yych <= '*') goto yy1733;
+ goto yy1884;
} else {
- if (yych <= '+') {
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy105;
- if (yych <= '*') goto yy26;
- goto yy80;
+ if (yych <= '-') {
+ if (yych <= ',') goto yy1733;
+ goto yy2670;
} else {
- if (yych <= '-') {
- if (yych <= ',') goto yy26;
- goto yy751;
- } else {
- if (yych <= '.') goto yy266;
- if (yych <= '/') goto yy4;
- goto yy753;
- }
+ if (yych <= '.') goto yy1985;
+ if (yych <= '/') goto yy1884;
+ goto yy2671;
}
}
} else {
- if (yych <= '_') {
- if (yych <= 'D') {
- if (yych <= ':') goto yy148;
- if (yych <= '?') goto yy26;
- if (yych <= '@') goto yy96;
- goto yy196;
- } else {
- if (yych <= 'F') {
- if (yych <= 'E') goto yy754;
- goto yy196;
- } else {
- if (yych <= 'Z') goto yy115;
- if (yych <= '^') goto yy26;
- goto yy46;
- }
- }
+ if (yych <= 'Z') {
+ if (yych <= '9') goto yy2672;
+ if (yych <= ':') goto yy1884;
+ if (yych <= '?') goto yy1733;
+ goto yy1884;
} else {
- if (yych <= 'z') {
- if (yych <= 'd') {
- if (yych <= '`') goto yy26;
- goto yy196;
- } else {
- if (yych <= 'e') goto yy754;
- if (yych <= 'f') goto yy196;
- goto yy115;
- }
+ if (yych <= '_') {
+ if (yych <= '^') goto yy1733;
+ goto yy1884;
} else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy26;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy26;
- if (yych <= 0xF4) goto yy4;
- goto yy26;
- }
+ if (yych <= '`') goto yy1733;
+ if (yych <= 'z') goto yy1884;
+ goto yy1733;
}
}
}
-yy678:
+yy2573:
yyaccept = 12;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '.') {
- if (yych <= 0x1F) {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy113;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy113;
- goto yy4;
- } else {
- if (yych <= '\r') goto yy113;
- if (yych == 0x1B) goto yy113;
- goto yy4;
- }
- } else {
- if (yych <= '*') {
- if (yych <= '#') goto yy113;
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy80;
- goto yy113;
- } else {
- if (yych <= '+') goto yy80;
- if (yych <= ',') goto yy113;
- if (yych <= '-') goto yy751;
- goto yy46;
- }
- }
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ if (yych <= '-') {
+ if (yych == '%') goto yy1727;
+ if (yych <= ',') goto yy1884;
+ goto yy2670;
} else {
- if (yych <= '^') {
- if (yych <= '?') {
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy196;
- if (yych <= ':') goto yy148;
- goto yy113;
- } else {
- if (yych <= '@') goto yy96;
- if (yych <= 'F') goto yy196;
- if (yych <= 'Z') goto yy115;
- goto yy113;
- }
- } else {
- if (yych <= 'z') {
- if (yych <= '_') goto yy46;
- if (yych <= '`') goto yy113;
- if (yych <= 'f') goto yy196;
- goto yy115;
- } else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy113;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy113;
- if (yych <= 0xF4) goto yy4;
- goto yy113;
- }
- }
- }
+ if (yych <= '.') goto yy1985;
+ if (yych <= '/') goto yy1884;
+ if (yych <= '9') goto yy2672;
+ goto yy1884;
}
-yy679:
+yy2574:
yyaccept = 12;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '.') {
- if (yych <= 0x1F) {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy113;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy113;
- goto yy4;
- } else {
- if (yych <= '\r') goto yy113;
- if (yych == 0x1B) goto yy113;
- goto yy4;
- }
- } else {
- if (yych <= '*') {
- if (yych <= '#') goto yy113;
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy80;
- goto yy113;
- } else {
- if (yych <= '+') goto yy194;
- if (yych <= ',') goto yy113;
- if (yych <= '-') goto yy755;
- goto yy46;
- }
- }
- } else {
- if (yych <= '^') {
- if (yych <= '?') {
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy196;
- if (yych <= ':') goto yy148;
- goto yy113;
- } else {
- if (yych <= '@') goto yy96;
- if (yych <= 'F') goto yy196;
- if (yych <= 'Z') goto yy115;
- goto yy113;
- }
- } else {
- if (yych <= 'z') {
- if (yych <= '_') goto yy46;
- if (yych <= '`') goto yy113;
- if (yych <= 'f') goto yy196;
- goto yy115;
- } else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy113;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy113;
- if (yych <= 0xF4) goto yy4;
- goto yy113;
- }
- }
- }
- }
-yy680:
- yyaccept = 18;
+ if (yych == '-') goto yy2670;
+ goto yy1884;
+yy2575:
+ yyaccept = 25;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '@') {
if (yych <= '/') {
yyt2 = yyt1;
- goto yy199;
+ goto yy1893;
}
- if (yych <= '9') goto yy553;
+ if (yych <= '9') goto yy2409;
yyt2 = yyt1;
- goto yy199;
+ goto yy1893;
} else {
- if (yych <= 'Z') goto yy553;
+ if (yych <= 'Z') goto yy2409;
if (yych <= '`') {
yyt2 = yyt1;
- goto yy199;
+ goto yy1893;
}
- if (yych <= 'z') goto yy553;
+ if (yych <= 'z') goto yy2409;
yyt2 = yyt1;
- goto yy199;
+ goto yy1893;
}
-yy681:
- yyaccept = 0;
+yy2576:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '?') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) {
- yyt2 = YYCURSOR;
- goto yy198;
- }
- if (yych <= 0x08) {
- yyt2 = YYCURSOR;
- goto yy284;
- }
- if (yych <= '\n') {
- yyt2 = YYCURSOR;
- goto yy198;
+ if (yych <= '^') {
+ if (yych <= '/') {
+ if (yych <= ',') {
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy2575;
}
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1892;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') {
- yyt2 = YYCURSOR;
- goto yy198;
- }
- yyt2 = YYCURSOR;
- goto yy284;
- } else {
- if (yych <= 0x1B) {
- yyt2 = YYCURSOR;
- goto yy198;
- }
- if (yych <= 0x1F) {
- yyt2 = YYCURSOR;
- goto yy284;
- }
+ if (yych == '.') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy2129;
}
+ yyt2 = YYCURSOR;
+ goto yy2128;
}
} else {
- if (yych <= '-') {
- if (yych <= '$') {
- yyt2 = YYCURSOR;
- goto yy284;
- }
- if (yych <= '%') {
- yyt1 = YYCURSOR;
- goto yy680;
- }
- if (yych <= ',') {
+ if (yych <= '?') {
+ if (yych <= '9') goto yy2673;
+ if (yych >= ';') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- yyt2 = YYCURSOR;
- goto yy284;
+ yyt1 = YYCURSOR;
} else {
- if (yych <= '/') {
- if (yych <= '.') {
- yyt2 = YYCURSOR;
- goto yy376;
- }
+ if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy284;
- } else {
- if (yych <= '9') goto yy756;
- if (yych >= ';') {
- yyt2 = YYCURSOR;
- goto yy198;
- }
+ goto yy2128;
}
+ if (yych <= 'F') goto yy2673;
+ if (yych <= 'Z') goto yy1864;
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
}
} else {
- if (yych <= '~') {
- if (yych <= '^') {
- if (yych <= '@') {
+ if (yych <= 0xC1) {
+ if (yych <= 'f') {
+ if (yych <= '_') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy2007;
}
- if (yych <= 'F') goto yy756;
- if (yych <= 'Z') goto yy3;
- yyt2 = YYCURSOR;
- goto yy198;
- } else {
if (yych <= '`') {
- if (yych <= '_') {
- yyt2 = YYCURSOR;
- goto yy284;
- }
yyt2 = YYCURSOR;
- goto yy198;
- } else {
- if (yych <= 'f') goto yy756;
- if (yych <= 'z') goto yy3;
+ goto yy1892;
+ }
+ goto yy2673;
+ } else {
+ if (yych <= 'z') goto yy1864;
+ if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
+ goto yy1741;
}
} else {
- if (yych <= 0xE0) {
- if (yych <= 0x7F) {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1900;
}
- if (yych <= 0xC1) goto yy5;
- if (yych <= 0xDF) {
+ if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy289;
+ goto yy1901;
}
yyt2 = YYCURSOR;
- goto yy290;
+ goto yy1902;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) {
- yyt2 = YYCURSOR;
- goto yy291;
- }
yyt2 = YYCURSOR;
- goto yy292;
- } else {
- if (yych <= 0xF3) {
- yyt2 = YYCURSOR;
- goto yy293;
- }
- if (yych <= 0xF4) {
- yyt2 = YYCURSOR;
- goto yy294;
- }
- goto yy5;
+ goto yy1903;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
}
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1741;
}
}
}
-yy682:
+yy2577:
yych = *++YYCURSOR;
- if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy757;
- if (yych <= ':') goto yy152;
- goto yy1;
+ if (yych <= ':') {
+ if (yych <= ' ') {
+ if (yych <= 0x1F) goto yy1682;
+ yyt2 = yyt1;
+ goto yy1892;
+ } else {
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2674;
+ goto yy1731;
+ }
} else {
- if (yych <= 'F') goto yy757;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy757;
- goto yy1;
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy1682;
+ goto yy2674;
+ } else {
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2674;
+ goto yy1682;
+ }
}
-yy683:
- yyaccept = 0;
+yy2578:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '@') {
- if (yych <= 0x1F) {
- if (yych <= '\f') {
- if (yych <= 0x00) {
- yyt2 = YYCURSOR;
- goto yy198;
- }
- if (yych <= 0x08) {
- yyt2 = YYCURSOR;
- goto yy284;
- }
- if (yych <= '\n') {
- yyt2 = YYCURSOR;
- goto yy198;
+ if (yych <= '_') {
+ if (yych <= ':') {
+ if (yych <= ',') {
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy2575;
}
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1892;
} else {
- if (yych <= '\r') {
- yyt2 = YYCURSOR;
- goto yy198;
- }
- if (yych == 0x1B) {
+ if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy2128;
}
- yyt2 = YYCURSOR;
- goto yy284;
+ if (yych <= '9') goto yy2673;
+ yyt1 = YYCURSOR;
+ goto yy2577;
}
} else {
- if (yych <= ',') {
- if (yych <= '#') {
+ if (yych <= 'F') {
+ if (yych <= '?') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '$') {
+ if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy2128;
}
- if (yych <= '%') {
- yyt1 = YYCURSOR;
- goto yy680;
- }
- yyt2 = YYCURSOR;
- goto yy198;
+ goto yy2673;
} else {
- if (yych <= '9') {
- if (yych <= '/') {
- yyt2 = YYCURSOR;
- goto yy284;
- }
- goto yy756;
- } else {
- if (yych <= ':') goto yy682;
- if (yych <= '?') {
- yyt2 = YYCURSOR;
- goto yy198;
- }
+ if (yych <= 'Z') goto yy1864;
+ if (yych <= '^') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1892;
}
+ yyt2 = YYCURSOR;
+ goto yy2007;
}
}
} else {
- if (yych <= '~') {
- if (yych <= '_') {
- if (yych <= 'F') goto yy756;
- if (yych <= 'Z') goto yy3;
- if (yych <= '^') {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- yyt2 = YYCURSOR;
- goto yy284;
+ if (yych <= 'f') goto yy2673;
+ goto yy1864;
} else {
- if (yych <= '`') {
+ if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 'f') goto yy756;
- if (yych <= 'z') goto yy3;
+ if (yych <= 0xC1) goto yy1741;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1900;
}
} else {
- if (yych <= 0xE0) {
- if (yych <= 0x7F) {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1901;
}
- if (yych <= 0xC1) goto yy5;
- if (yych <= 0xDF) {
+ if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy289;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy290;
+ goto yy1903;
} else {
- if (yych <= 0xF0) {
- if (yych <= 0xEF) {
- yyt2 = YYCURSOR;
- goto yy291;
- }
+ if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy292;
- } else {
- if (yych <= 0xF3) {
- yyt2 = YYCURSOR;
- goto yy293;
- }
- if (yych <= 0xF4) {
- yyt2 = YYCURSOR;
- goto yy294;
- }
- goto yy5;
+ goto yy1904;
}
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1741;
}
}
}
-yy684:
- yyaccept = 0;
+yy2579:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '?') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) {
- yyt2 = YYCURSOR;
- goto yy198;
- }
- if (yych <= 0x08) {
- yyt2 = YYCURSOR;
- goto yy284;
- }
- if (yych <= '\n') {
- yyt2 = YYCURSOR;
- goto yy198;
+ if (yych <= '^') {
+ if (yych <= '/') {
+ if (yych <= ',') {
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy2575;
}
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1892;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') {
- yyt2 = YYCURSOR;
- goto yy198;
- }
- yyt2 = YYCURSOR;
- goto yy284;
- } else {
- if (yych <= 0x1B) {
- yyt2 = YYCURSOR;
- goto yy198;
- }
- if (yych <= 0x1F) {
- yyt2 = YYCURSOR;
- goto yy284;
- }
+ if (yych == '.') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy2129;
}
+ yyt2 = YYCURSOR;
+ goto yy2128;
}
} else {
- if (yych <= '-') {
- if (yych <= '$') {
- yyt2 = YYCURSOR;
- goto yy284;
- }
- if (yych <= '%') {
+ if (yych <= '?') {
+ if (yych <= '9') goto yy2675;
+ if (yych <= ':') {
yyt1 = YYCURSOR;
- goto yy680;
- }
- if (yych <= ',') {
- yyt2 = YYCURSOR;
- goto yy198;
+ goto yy2577;
}
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1892;
} else {
- if (yych <= '/') {
- if (yych <= '.') {
- yyt2 = YYCURSOR;
- goto yy376;
- }
- yyt2 = YYCURSOR;
- goto yy284;
- } else {
- if (yych <= '9') goto yy758;
- if (yych <= ':') goto yy682;
+ if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy2128;
}
+ if (yych <= 'F') goto yy2673;
+ if (yych <= 'Z') goto yy1864;
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
}
} else {
- if (yych <= '~') {
- if (yych <= '^') {
- if (yych <= '@') {
+ if (yych <= 0xC1) {
+ if (yych <= 'f') {
+ if (yych <= '_') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy2007;
}
- if (yych <= 'F') goto yy756;
- if (yych <= 'Z') goto yy3;
- yyt2 = YYCURSOR;
- goto yy198;
- } else {
if (yych <= '`') {
- if (yych <= '_') {
- yyt2 = YYCURSOR;
- goto yy284;
- }
yyt2 = YYCURSOR;
- goto yy198;
- } else {
- if (yych <= 'f') goto yy756;
- if (yych <= 'z') goto yy3;
+ goto yy1892;
+ }
+ goto yy2673;
+ } else {
+ if (yych <= 'z') goto yy1864;
+ if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
+ goto yy1741;
}
} else {
- if (yych <= 0xE0) {
- if (yych <= 0x7F) {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1900;
}
- if (yych <= 0xC1) goto yy5;
- if (yych <= 0xDF) {
+ if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy289;
+ goto yy1901;
}
yyt2 = YYCURSOR;
- goto yy290;
+ goto yy1902;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) {
- yyt2 = YYCURSOR;
- goto yy291;
- }
yyt2 = YYCURSOR;
- goto yy292;
- } else {
- if (yych <= 0xF3) {
- yyt2 = YYCURSOR;
- goto yy293;
- }
- if (yych <= 0xF4) {
- yyt2 = YYCURSOR;
- goto yy294;
- }
- goto yy5;
+ goto yy1903;
}
- }
- }
- }
-yy685:
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= ':') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) {
+ if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1904;
}
- if (yych <= 0x08) {
+ if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1905;
}
- if (yych <= '\n') {
- yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1741;
+ }
+ }
+ }
+yy2580:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'Z') {
+ if (yych <= '/') {
+ if (yych <= ',') {
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy2575;
}
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1892;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') {
- yyt2 = YYCURSOR;
- goto yy198;
- }
- yyt2 = YYCURSOR;
- goto yy284;
- } else {
- if (yych <= 0x1B) {
- yyt2 = YYCURSOR;
- goto yy198;
- }
- if (yych <= 0x1F) {
- yyt2 = YYCURSOR;
- goto yy284;
- }
+ if (yych == '.') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy2129;
}
+ yyt2 = YYCURSOR;
+ goto yy2128;
}
} else {
- if (yych <= '-') {
- if (yych <= '$') {
- yyt2 = YYCURSOR;
- goto yy284;
- }
- if (yych <= '%') {
- yyt1 = YYCURSOR;
- goto yy680;
- }
- if (yych <= ',') {
+ if (yych <= ':') {
+ if (yych <= '5') goto yy2675;
+ if (yych <= '9') goto yy2673;
+ yyt1 = YYCURSOR;
+ goto yy2577;
+ } else {
+ if (yych <= '?') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- yyt2 = YYCURSOR;
- goto yy284;
- } else {
- if (yych <= '/') {
- if (yych <= '.') {
- yyt2 = YYCURSOR;
- goto yy376;
- }
+ if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy284;
- } else {
- if (yych <= '5') goto yy758;
- if (yych <= '9') goto yy756;
- goto yy682;
+ goto yy2128;
}
+ if (yych <= 'F') goto yy2673;
+ goto yy1864;
}
}
} else {
- if (yych <= 'z') {
- if (yych <= 'Z') {
- if (yych <= '?') {
- yyt2 = YYCURSOR;
- goto yy198;
- }
- if (yych <= '@') {
+ if (yych <= 0xC1) {
+ if (yych <= '`') {
+ if (yych == '_') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy2007;
}
- if (yych <= 'F') goto yy756;
- goto yy3;
+ yyt2 = YYCURSOR;
+ goto yy1892;
} else {
- if (yych <= '_') {
- if (yych <= '^') {
- yyt2 = YYCURSOR;
- goto yy198;
- }
+ if (yych <= 'f') goto yy2673;
+ if (yych <= 'z') goto yy1864;
+ if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy284;
- } else {
- if (yych <= '`') {
- yyt2 = YYCURSOR;
- goto yy198;
- }
- if (yych <= 'f') goto yy756;
- goto yy3;
+ goto yy1892;
}
+ goto yy1741;
}
} else {
- if (yych <= 0xE0) {
- if (yych <= 0x7F) {
- if (yych <= '~') {
- yyt2 = YYCURSOR;
- goto yy198;
- }
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy284;
- } else {
- if (yych <= 0xC1) goto yy5;
- if (yych <= 0xDF) {
- yyt2 = YYCURSOR;
- goto yy289;
- }
+ goto yy1900;
+ }
+ if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy290;
+ goto yy1901;
}
+ yyt2 = YYCURSOR;
+ goto yy1902;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) {
- yyt2 = YYCURSOR;
- goto yy291;
- }
yyt2 = YYCURSOR;
- goto yy292;
- } else {
- if (yych <= 0xF3) {
- yyt2 = YYCURSOR;
- goto yy293;
- }
- if (yych <= 0xF4) {
- yyt2 = YYCURSOR;
- goto yy294;
- }
- goto yy5;
+ goto yy1903;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
}
+ goto yy1741;
}
}
}
-yy686:
- yyaccept = 21;
+yy2581:
+ yyaccept = 30;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '`') {
if (yych <= '/') {
if (yych <= ',') {
yyt2 = YYCURSOR;
- goto yy642;
+ goto yy2537;
}
if (yych <= '-') {
yyt1 = YYCURSOR;
- goto yy759;
+ goto yy2676;
}
if (yych <= '.') {
yyt2 = YYCURSOR;
- goto yy644;
+ goto yy2539;
}
yyt2 = YYCURSOR;
- goto yy642;
+ goto yy2537;
} else {
if (yych <= ':') {
if (yych <= '9') {
yyt1 = YYCURSOR;
- goto yy688;
+ goto yy2583;
}
- goto yy760;
+ goto yy2677;
} else {
if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy642;
+ goto yy2537;
}
if (yych <= 'F') {
yyt1 = YYCURSOR;
- goto yy688;
+ goto yy2583;
}
yyt2 = YYCURSOR;
- goto yy642;
+ goto yy2537;
}
}
} else {
@@ -22402,11758 +67201,15601 @@ yy686:
if (yych <= 0x7F) {
if (yych <= 'f') {
yyt1 = YYCURSOR;
- goto yy688;
+ goto yy2583;
}
yyt2 = YYCURSOR;
- goto yy642;
+ goto yy2537;
} else {
- if (yych <= 0xC1) goto yy354;
+ if (yych <= 0xC1) goto yy2107;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy645;
+ goto yy2540;
}
yyt2 = YYCURSOR;
- goto yy646;
+ goto yy2541;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy647;
+ goto yy2542;
}
yyt2 = YYCURSOR;
- goto yy648;
+ goto yy2543;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy649;
+ goto yy2544;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy650;
+ goto yy2545;
}
- goto yy354;
+ goto yy2107;
}
}
}
-yy687:
- yyaccept = 21;
+yy2582:
+ yyaccept = 30;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ':') {
if (yych <= '-') {
- if (yych <= ',') goto yy354;
- goto yy466;
+ if (yych <= ',') goto yy2107;
+ goto yy2270;
} else {
- if (yych <= '/') goto yy354;
- if (yych <= '9') goto yy561;
- goto yy760;
+ if (yych <= '/') goto yy2107;
+ if (yych <= '9') goto yy2417;
+ goto yy2677;
}
} else {
if (yych <= 'F') {
- if (yych <= '@') goto yy354;
- goto yy561;
+ if (yych <= '@') goto yy2107;
+ goto yy2417;
} else {
- if (yych <= '`') goto yy354;
- if (yych <= 'f') goto yy561;
- goto yy354;
+ if (yych <= '`') goto yy2107;
+ if (yych <= 'f') goto yy2417;
+ goto yy2107;
}
}
-yy688:
- yyaccept = 29;
+yy2583:
+ yyaccept = 39;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '@') {
- if (yych <= '/') goto yy643;
- if (yych <= '9') goto yy689;
- if (yych <= ':') goto yy471;
- goto yy643;
+ if (yych <= '/') goto yy2538;
+ if (yych <= '9') goto yy2584;
+ if (yych <= ':') goto yy2275;
+ goto yy2538;
} else {
- if (yych <= 'F') goto yy689;
- if (yych <= '`') goto yy643;
- if (yych >= 'g') goto yy643;
+ if (yych <= 'F') goto yy2584;
+ if (yych <= '`') goto yy2538;
+ if (yych >= 'g') goto yy2538;
}
-yy689:
+yy2584:
yych = *++YYCURSOR;
- if (yych == ':') goto yy471;
- goto yy1;
-yy690:
+ if (yych == ':') goto yy2275;
+ goto yy1682;
+yy2585:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy761;
- if (yych >= ';') goto yy1;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2678;
+ if (yych >= ';') goto yy1682;
} else {
- if (yych <= 'F') goto yy761;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy761;
- goto yy1;
+ if (yych <= 'F') goto yy2678;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2678;
+ goto yy1682;
}
-yy691:
+yy2586:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy762;
- if (yych <= ':') goto yy763;
- goto yy1;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2679;
+ if (yych <= ':') goto yy2680;
+ goto yy1682;
} else {
- if (yych <= 'F') goto yy762;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy762;
- goto yy1;
+ if (yych <= 'F') goto yy2679;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2679;
+ goto yy1682;
}
-yy692:
+yy2587:
yych = *++YYCURSOR;
if (yych <= 'f') {
if (yych <= ':') {
if (yych <= '.') {
if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- yyt1 = YYCURSOR;
- goto yy297;
+ yyt4 = YYCURSOR;
+ goto yy2420;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '9') goto yy764;
- goto yy765;
+ if (yych <= '9') goto yy2681;
+ yyt2 = YYCURSOR;
+ goto yy2682;
}
} else {
if (yych <= 'F') {
if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy766;
+ goto yy2683;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy766;
+ goto yy2683;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy693:
+yy2588:
yych = *++YYCURSOR;
if (yych <= 'f') {
if (yych <= ':') {
if (yych <= '.') {
if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- yyt1 = YYCURSOR;
- goto yy297;
+ yyt4 = YYCURSOR;
+ goto yy2420;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '9') goto yy767;
- goto yy765;
+ if (yych <= '9') goto yy2684;
+ yyt2 = YYCURSOR;
+ goto yy2682;
}
} else {
if (yych <= 'F') {
if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy766;
+ goto yy2683;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy766;
+ goto yy2683;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy694:
+yy2589:
yych = *++YYCURSOR;
if (yych <= '`') {
if (yych <= '5') {
if (yych <= '.') {
if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- yyt1 = YYCURSOR;
- goto yy297;
+ yyt4 = YYCURSOR;
+ goto yy2420;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '4') goto yy767;
- goto yy768;
+ if (yych <= '4') goto yy2684;
+ goto yy2685;
}
} else {
if (yych <= '@') {
- if (yych <= '9') goto yy764;
- if (yych <= ':') goto yy765;
+ if (yych <= '9') goto yy2681;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2682;
+ }
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 'F') goto yy766;
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'F') goto yy2683;
+ if (yych <= 'Z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
}
} else {
if (yych <= 0xDF) {
if (yych <= 'z') {
- if (yych <= 'f') goto yy766;
- goto yy1;
+ if (yych <= 'f') goto yy2683;
+ goto yy1682;
} else {
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy695:
+yy2590:
yych = *++YYCURSOR;
if (yych <= 'z') {
if (yych <= '@') {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
+ }
+ if (yych <= '9') goto yy2683;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2682;
}
- if (yych <= '9') goto yy766;
- if (yych <= ':') goto yy765;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
if (yych <= 'Z') {
- if (yych <= 'F') goto yy766;
- goto yy1;
+ if (yych <= 'F') goto yy2683;
+ goto yy1682;
} else {
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 'f') goto yy766;
- goto yy1;
+ if (yych <= 'f') goto yy2683;
+ goto yy1682;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy696:
+yy2591:
yych = *++YYCURSOR;
if (yych <= 'z') {
if (yych <= '@') {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
+ }
+ if (yych <= '9') goto yy2686;
+ if (yych <= ':') {
+ yyt4 = YYCURSOR;
+ goto yy2422;
}
- if (yych <= '9') goto yy769;
- if (yych <= ':') goto yy565;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
if (yych <= 'Z') {
- if (yych <= 'F') goto yy769;
- goto yy1;
+ if (yych <= 'F') goto yy2686;
+ goto yy1682;
} else {
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 'f') goto yy769;
- goto yy1;
+ if (yych <= 'f') goto yy2686;
+ goto yy1682;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy697:
+yy2592:
yych = *++YYCURSOR;
if (yych <= 'f') {
if (yych <= ':') {
if (yych <= '.') {
if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- yyt1 = YYCURSOR;
- goto yy297;
+ yyt4 = YYCURSOR;
+ goto yy2420;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '9') goto yy769;
- goto yy565;
+ if (yych <= '9') goto yy2686;
+ yyt4 = YYCURSOR;
+ goto yy2422;
}
} else {
if (yych <= 'F') {
if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy769;
+ goto yy2686;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy769;
+ goto yy2686;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy698:
- yyaccept = 0;
+yy2593:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych == '.') goto yy770;
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy771;
- goto yy4;
-yy699:
- yyaccept = 0;
+ if (yych == '.') goto yy2687;
+ if (yych <= '/') goto yy1865;
+ if (yych <= '9') goto yy2688;
+ goto yy1865;
+yy2594:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych == '.') goto yy770;
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy698;
- goto yy4;
-yy700:
- yyaccept = 0;
+ if (yych == '.') goto yy2687;
+ if (yych <= '/') goto yy1865;
+ if (yych <= '9') goto yy2593;
+ goto yy1865;
+yy2595:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '/') {
- if (yych == '.') goto yy770;
- goto yy4;
+ if (yych == '.') goto yy2687;
+ goto yy1865;
} else {
- if (yych <= '4') goto yy698;
- if (yych <= '5') goto yy772;
- if (yych <= '9') goto yy771;
- goto yy4;
+ if (yych <= '4') goto yy2593;
+ if (yych <= '5') goto yy2689;
+ if (yych <= '9') goto yy2688;
+ goto yy1865;
}
-yy701:
+yy2596:
+ yych = *++YYCURSOR;
+ if (yych <= 'z') {
+ if (yych <= '@') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= '9') goto yy2690;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2431;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= 'F') goto yy2690;
+ goto yy1682;
+ } else {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= 'f') goto yy2690;
+ goto yy1682;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy1900;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy1902;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1903;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1682;
+ }
+ }
+ }
+yy2597:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ switch (yych) {
+ case '%': goto yy1727;
+ case '+':
+ case '/':
+ case ':':
+ case '@':
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy1884;
+ case '-': goto yy2670;
+ case '.': goto yy2019;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy2691;
+ case 'B':
+ case 'b': goto yy2692;
+ case 'E':
+ case 'e': goto yy2693;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy1740;
+ case 'S':
+ case 's': goto yy1744;
+ case 'm': goto yy1747;
+ case 'p':
+ case 'u': goto yy1748;
+ default: goto yy1635;
+ }
+yy2598:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= '*') {
+ if (yych == '%') goto yy1884;
+ goto yy1635;
+ } else {
+ if (yych <= '+') goto yy1884;
+ if (yych <= ',') goto yy1635;
+ if (yych <= '-') goto yy2670;
+ goto yy1884;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '?') goto yy1635;
+ if (yych <= 'Z') goto yy1884;
+ goto yy1635;
+ } else {
+ if (yych == '`') goto yy1635;
+ if (yych <= 'z') goto yy1884;
+ goto yy1635;
+ }
+ }
+yy2599:
+ yyaccept = 12;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '+') goto yy1889;
+ if (yych == '-') goto yy2694;
+ goto yy1884;
+yy2600:
yych = *++YYCURSOR;
if (yych <= '1') {
- if (yych <= '/') goto yy1;
- if (yych <= '0') goto yy773;
- goto yy774;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '0') goto yy2695;
+ goto yy2696;
} else {
- if (yych <= '2') goto yy775;
- if (yych <= '9') goto yy773;
- goto yy1;
+ if (yych <= '2') goto yy2697;
+ if (yych <= '9') goto yy2695;
+ goto yy1682;
}
-yy702:
+yy2601:
yych = *++YYCURSOR;
- if (yych == '.') goto yy701;
- goto yy1;
-yy703:
+ if (yych == '.') goto yy2600;
+ goto yy1682;
+yy2602:
yych = *++YYCURSOR;
- if (yych == '.') goto yy701;
- if (yych <= '/') goto yy1;
- if (yych <= '5') goto yy702;
- goto yy1;
-yy704:
+ if (yych == '.') goto yy2600;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '5') goto yy2601;
+ goto yy1682;
+yy2603:
yych = *++YYCURSOR;
if (yych <= 0x7F) {
if (yych <= '@') {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
+ }
+ if (yych <= '9') goto yy1682;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2300;
}
- if (yych <= '9') goto yy1;
- if (yych <= ':') goto yy486;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
} else {
if (yych <= 0xF0) {
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
}
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
-yy705:
+yy2604:
yych = *++YYCURSOR;
if (yych <= 'f') {
if (yych <= ':') {
if (yych <= '.') {
if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
yyt1 = YYCURSOR;
- goto yy297;
+ goto yy2020;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '9') goto yy776;
- goto yy777;
+ if (yych <= '9') goto yy2698;
+ yyt2 = YYCURSOR;
+ goto yy2699;
}
} else {
if (yych <= 'F') {
if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy485;
+ goto yy2299;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy485;
+ goto yy2299;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy706:
+yy2605:
yych = *++YYCURSOR;
if (yych <= 'f') {
if (yych <= ':') {
if (yych <= '.') {
if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
yyt1 = YYCURSOR;
- goto yy297;
+ goto yy2020;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '9') goto yy778;
- goto yy486;
+ if (yych <= '9') goto yy2700;
+ yyt2 = YYCURSOR;
+ goto yy2300;
}
} else {
if (yych <= 'F') {
if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy485;
+ goto yy2299;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy485;
+ goto yy2299;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy707:
+yy2606:
yych = *++YYCURSOR;
if (yych <= '`') {
if (yych <= '5') {
if (yych <= '.') {
if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
yyt1 = YYCURSOR;
- goto yy297;
+ goto yy2020;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '4') goto yy778;
- goto yy779;
+ if (yych <= '4') goto yy2700;
+ goto yy2701;
}
} else {
if (yych <= '@') {
- if (yych <= '9') goto yy776;
- if (yych <= ':') goto yy486;
+ if (yych <= '9') goto yy2698;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2300;
+ }
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 'F') goto yy485;
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'F') goto yy2299;
+ if (yych <= 'Z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
}
} else {
if (yych <= 0xDF) {
if (yych <= 'z') {
- if (yych <= 'f') goto yy485;
- goto yy1;
+ if (yych <= 'f') goto yy2299;
+ goto yy1682;
} else {
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy708:
+yy2607:
yych = *++YYCURSOR;
if (yych <= 'f') {
if (yych <= ':') {
if (yych <= '.') {
if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
yyt1 = YYCURSOR;
- goto yy297;
+ goto yy2020;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '9') goto yy776;
- goto yy486;
+ if (yych <= '9') goto yy2698;
+ yyt2 = YYCURSOR;
+ goto yy2300;
}
} else {
if (yych <= 'F') {
if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy485;
+ goto yy2299;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy485;
+ goto yy2299;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy709:
- yyaccept = 27;
+yy2608:
+ yych = *++YYCURSOR;
+ if (yych <= '*') {
+ if (yych <= 0x1F) {
+ if (yych <= '\t') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= 0x08) goto yy2183;
+ goto yy2608;
+ } else {
+ if (yych == '\r') goto yy2608;
+ goto yy2183;
+ }
+ } else {
+ if (yych <= '"') {
+ if (yych <= ' ') goto yy2608;
+ if (yych <= '!') goto yy2183;
+ goto yy2186;
+ } else {
+ if (yych == '\'') goto yy2187;
+ if (yych <= ')') goto yy2183;
+ goto yy1682;
+ }
+ }
+ } else {
+ if (yych <= 0xC1) {
+ if (yych <= '=') {
+ if (yych == '-') goto yy2304;
+ goto yy2183;
+ } else {
+ if (yych <= '>') goto yy2190;
+ if (yych <= 0x7F) goto yy2183;
+ goto yy1682;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy2191;
+ if (yych <= 0xE0) goto yy2192;
+ goto yy2193;
+ } else {
+ if (yych <= 0xF0) goto yy2194;
+ if (yych <= 0xF3) goto yy2195;
+ if (yych <= 0xF4) goto yy2196;
+ goto yy1682;
+ }
+ }
+ }
+yy2609:
+ yyaccept = 37;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[0+yych] & 128) {
- goto yy780;
+ if (yybm_init[512+yych] & 128) {
+ goto yy2307;
}
- if (yych <= 0xDF) {
- if (yych <= '\'') {
- if (yych <= 0x00) goto yy310;
- if (yych <= '"') goto yy781;
- goto yy782;
+ if (yych <= 0xC1) {
+ if (yych <= '*') {
+ if (yych <= 0x00) goto yy2448;
+ if (yych <= '"') goto yy2444;
+ goto yy2167;
} else {
- if (yych <= '\\') goto yy783;
- if (yych <= 0xC1) goto yy310;
- goto yy784;
+ if (yych <= '-') goto yy2308;
+ if (yych <= '\\') goto yy2309;
+ goto yy2448;
}
} else {
- if (yych <= 0xF0) {
- if (yych <= 0xE0) goto yy785;
- if (yych <= 0xEF) goto yy786;
- goto yy787;
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy2310;
+ if (yych <= 0xE0) goto yy2311;
+ goto yy2312;
} else {
- if (yych <= 0xF3) goto yy788;
- if (yych <= 0xF4) goto yy789;
- goto yy310;
+ if (yych <= 0xF0) goto yy2313;
+ if (yych <= 0xF3) goto yy2314;
+ if (yych <= 0xF4) goto yy2315;
+ goto yy2448;
}
}
-yy710:
+yy2610:
+ yyaccept = 37;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[256+yych] & 1) {
+ goto yy2316;
+ }
+ if (yych <= 0xC1) {
+ if (yych <= '*') {
+ if (yych <= 0x00) goto yy2448;
+ if (yych <= '\'') goto yy2444;
+ goto yy2175;
+ } else {
+ if (yych <= '-') goto yy2317;
+ if (yych <= '\\') goto yy2318;
+ goto yy2448;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy2319;
+ if (yych <= 0xE0) goto yy2320;
+ goto yy2321;
+ } else {
+ if (yych <= 0xF0) goto yy2322;
+ if (yych <= 0xF3) goto yy2323;
+ if (yych <= 0xF4) goto yy2324;
+ goto yy2448;
+ }
+ }
+yy2611:
yych = *++YYCURSOR;
if (yych <= 0xC1) {
- if (yych <= '\n') {
- if (yych <= 0x00) goto yy780;
- if (yych <= '\t') goto yy579;
- goto yy490;
+ if (yych <= '-') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= ',') goto yy2449;
+ goto yy2702;
} else {
- if (yych == '>') goto yy709;
- if (yych <= 0x7F) goto yy579;
- goto yy1;
+ if (yych == '>') goto yy2612;
+ if (yych <= 0x7F) goto yy2449;
+ goto yy1682;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xDF) goto yy711;
- if (yych <= 0xE0) goto yy712;
- goto yy713;
+ if (yych <= 0xDF) goto yy2613;
+ if (yych <= 0xE0) goto yy2614;
+ goto yy2615;
} else {
- if (yych <= 0xF0) goto yy714;
- if (yych <= 0xF3) goto yy715;
- if (yych <= 0xF4) goto yy716;
- goto yy1;
+ if (yych <= 0xF0) goto yy2616;
+ if (yych <= 0xF3) goto yy2617;
+ if (yych <= 0xF4) goto yy2618;
+ goto yy1682;
}
}
-yy711:
+yy2612:
+ yyaccept = 32;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[0+yych] & 32) {
+ goto yy2703;
+ }
+ if (yych <= 0xC1) {
+ if (yych <= '\'') {
+ if (yych <= 0x00) goto yy2034;
+ if (yych <= '"') goto yy2704;
+ goto yy2705;
+ } else {
+ if (yych <= '*') goto yy2706;
+ if (yych <= '-') goto yy2707;
+ if (yych <= '\\') goto yy2708;
+ goto yy2034;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy2709;
+ if (yych <= 0xE0) goto yy2710;
+ goto yy2711;
+ } else {
+ if (yych <= 0xF0) goto yy2712;
+ if (yych <= 0xF3) goto yy2713;
+ if (yych <= 0xF4) goto yy2714;
+ goto yy2034;
+ }
+ }
+yy2613:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy579;
- goto yy1;
-yy712:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2449;
+ goto yy1682;
+yy2614:
yych = *++YYCURSOR;
- if (yych <= 0x9F) goto yy1;
- if (yych <= 0xBF) goto yy711;
- goto yy1;
-yy713:
+ if (yych <= 0x9F) goto yy1682;
+ if (yych <= 0xBF) goto yy2613;
+ goto yy1682;
+yy2615:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy711;
- goto yy1;
-yy714:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2613;
+ goto yy1682;
+yy2616:
yych = *++YYCURSOR;
- if (yych <= 0x8F) goto yy1;
- if (yych <= 0xBF) goto yy713;
- goto yy1;
-yy715:
+ if (yych <= 0x8F) goto yy1682;
+ if (yych <= 0xBF) goto yy2615;
+ goto yy1682;
+yy2617:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy713;
- goto yy1;
-yy716:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2615;
+ goto yy1682;
+yy2618:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0x8F) goto yy713;
- goto yy1;
-yy717:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0x8F) goto yy2615;
+ goto yy1682;
+yy2619:
yych = *++YYCURSOR;
- if (yybm[0+yych] & 64) {
- goto yy717;
+ if (yych <= 0x7F) {
+ if (yych <= ',') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '\'') goto yy2449;
+ goto yy2327;
+ } else {
+ if (yych <= '-') goto yy2619;
+ if (yych == '>') goto yy2609;
+ goto yy2327;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2452;
+ if (yych <= 0xE0) goto yy2453;
+ goto yy2454;
+ } else {
+ if (yych <= 0xF0) goto yy2455;
+ if (yych <= 0xF3) goto yy2456;
+ if (yych <= 0xF4) goto yy2457;
+ goto yy1682;
+ }
+ }
+yy2620:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) {
+ if (yych <= ',') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '"') goto yy2449;
+ goto yy2328;
+ } else {
+ if (yych <= '-') goto yy2620;
+ if (yych == '>') goto yy2610;
+ goto yy2328;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2460;
+ if (yych <= 0xE0) goto yy2461;
+ goto yy2462;
+ } else {
+ if (yych <= 0xF0) goto yy2463;
+ if (yych <= 0xF3) goto yy2464;
+ if (yych <= 0xF4) goto yy2465;
+ goto yy1682;
+ }
+ }
+yy2621:
+ yyaccept = 32;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[0+yych] & 64) {
+ goto yy2706;
+ }
+ if (yych <= 0xDF) {
+ if (yych <= '\'') {
+ if (yych <= 0x00) goto yy2034;
+ if (yych <= '"') goto yy2715;
+ goto yy2716;
+ } else {
+ if (yych <= '\\') goto yy2717;
+ if (yych <= 0xC1) goto yy2034;
+ goto yy2718;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy2719;
+ if (yych <= 0xEF) goto yy2720;
+ goto yy2721;
+ } else {
+ if (yych <= 0xF3) goto yy2722;
+ if (yych <= 0xF4) goto yy2723;
+ goto yy2034;
+ }
+ }
+yy2622:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2467;
+ goto yy1682;
+yy2623:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy1682;
+ if (yych <= 0xBF) goto yy2622;
+ goto yy1682;
+yy2624:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2622;
+ goto yy1682;
+yy2625:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy1682;
+ if (yych <= 0xBF) goto yy2624;
+ goto yy1682;
+yy2626:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2624;
+ goto yy1682;
+yy2627:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0x8F) goto yy2624;
+ goto yy1682;
+yy2628:
+ yych = *++YYCURSOR;
+ if (yybm_init[0+yych] & 16) {
+ goto yy2628;
}
if (yych <= 'Z') {
if (yych <= '-') {
- if (yych <= 0x00) goto yy1;
- if (yych <= '"') goto yy413;
- if (yych <= '\'') goto yy412;
- goto yy790;
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= '"') goto yy2203;
+ if (yych <= '\'') goto yy2202;
+ goto yy2724;
} else {
if (yych <= ':') {
- if (yych <= '/') goto yy791;
- goto yy790;
+ if (yych <= '/') goto yy2725;
+ goto yy2724;
} else {
- if (yych <= '>') goto yy792;
- if (yych <= '?') goto yy791;
- goto yy790;
+ if (yych <= '>') goto yy2726;
+ if (yych <= '?') goto yy2725;
+ goto yy2724;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 'z') {
- if (yych <= '\\') goto yy793;
- goto yy790;
+ if (yych <= '\\') goto yy2727;
+ goto yy2724;
} else {
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy794;
- goto yy795;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2728;
+ goto yy2729;
}
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy796;
- goto yy797;
+ if (yych <= 0xEF) goto yy2730;
+ goto yy2731;
} else {
- if (yych <= 0xF3) goto yy798;
- if (yych <= 0xF4) goto yy799;
- goto yy1;
+ if (yych <= 0xF3) goto yy2732;
+ if (yych <= 0xF4) goto yy2733;
+ goto yy1682;
}
}
}
-yy718:
+yy2629:
yych = *++YYCURSOR;
if (yych <= ' ') {
if (yych <= '\f') {
- if (yych == '\t') goto yy718;
- goto yy1;
+ if (yych == '\t') goto yy2629;
+ goto yy1682;
} else {
- if (yych <= '\r') goto yy718;
- if (yych <= 0x1F) goto yy1;
- goto yy718;
+ if (yych <= '\r') goto yy2629;
+ if (yych <= 0x1F) goto yy1682;
+ goto yy2629;
}
} else {
if (yych <= '=') {
- if (yych == '/') goto yy215;
- goto yy1;
+ if (yych == '/') goto yy1911;
+ goto yy1682;
} else {
- if (yych <= '>') goto yy216;
- if (yych <= '?') goto yy215;
- goto yy1;
+ if (yych <= '>') goto yy1912;
+ if (yych <= '?') goto yy1911;
+ goto yy1682;
}
}
-yy719:
+yy2630:
yych = *++YYCURSOR;
if (yych <= '?') {
if (yych <= '&') {
if (yych <= '\f') {
- if (yych <= 0x00) goto yy1;
- if (yych == '\t') goto yy719;
- goto yy524;
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '\t') goto yy2630;
+ goto yy2370;
} else {
- if (yych <= '\r') goto yy719;
- if (yych == ' ') goto yy719;
- goto yy524;
+ if (yych <= '\r') goto yy2630;
+ if (yych == ' ') goto yy2630;
+ goto yy2370;
}
} else {
if (yych <= '.') {
- if (yych <= '\'') goto yy800;
- if (yych == '-') goto yy619;
- goto yy524;
+ if (yych <= '\'') goto yy2734;
+ if (yych == '-') goto yy2505;
+ goto yy2370;
} else {
if (yych <= ':') {
- if (yych <= '/') goto yy620;
- goto yy619;
+ if (yych <= '/') goto yy2506;
+ goto yy2505;
} else {
- if (yych <= '=') goto yy524;
- if (yych <= '>') goto yy621;
- goto yy620;
+ if (yych <= '=') goto yy2370;
+ if (yych <= '>') goto yy2507;
+ goto yy2506;
}
}
}
} else {
if (yych <= 'z') {
if (yych <= '\\') {
- if (yych <= '@') goto yy524;
- if (yych <= 'Z') goto yy619;
- if (yych <= '[') goto yy524;
- goto yy622;
+ if (yych <= '@') goto yy2370;
+ if (yych <= 'Z') goto yy2505;
+ if (yych <= '[') goto yy2370;
+ goto yy2508;
} else {
- if (yych == '_') goto yy619;
- if (yych <= '`') goto yy524;
- goto yy619;
+ if (yych == '_') goto yy2505;
+ if (yych <= '`') goto yy2370;
+ goto yy2505;
}
} else {
if (yych <= 0xE0) {
- if (yych <= 0x7F) goto yy524;
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy623;
- goto yy624;
+ if (yych <= 0x7F) goto yy2370;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2509;
+ goto yy2510;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy625;
- goto yy626;
+ if (yych <= 0xEF) goto yy2511;
+ goto yy2512;
} else {
- if (yych <= 0xF3) goto yy627;
- if (yych <= 0xF4) goto yy628;
- goto yy1;
+ if (yych <= 0xF3) goto yy2513;
+ if (yych <= 0xF4) goto yy2514;
+ goto yy1682;
}
}
}
}
-yy720:
- yyaccept = 28;
+yy2631:
+ yyaccept = 38;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 0xC1) {
if (yych <= '"') {
- if (yych <= 0x00) goto yy315;
- if (yych <= '!') goto yy621;
+ if (yych <= 0x00) goto yy2039;
+ if (yych <= '!') goto yy2507;
} else {
- if (yych == '\\') goto yy722;
- if (yych <= 0x7F) goto yy621;
- goto yy315;
+ if (yych == '\\') goto yy2633;
+ if (yych <= 0x7F) goto yy2507;
+ goto yy2039;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xDF) goto yy723;
- if (yych <= 0xE0) goto yy724;
- goto yy725;
+ if (yych <= 0xDF) goto yy2634;
+ if (yych <= 0xE0) goto yy2635;
+ goto yy2636;
} else {
- if (yych <= 0xF0) goto yy726;
- if (yych <= 0xF3) goto yy727;
- if (yych <= 0xF4) goto yy728;
- goto yy315;
+ if (yych <= 0xF0) goto yy2637;
+ if (yych <= 0xF3) goto yy2638;
+ if (yych <= 0xF4) goto yy2639;
+ goto yy2039;
}
}
-yy721:
+yy2632:
yych = *++YYCURSOR;
if (yych <= '/') {
if (yych <= 0x1F) {
if (yych <= '\t') {
- if (yych <= 0x08) goto yy1;
- goto yy801;
+ if (yych <= 0x08) goto yy1682;
+ goto yy2735;
} else {
- if (yych == '\r') goto yy801;
- goto yy1;
+ if (yych == '\r') goto yy2735;
+ goto yy1682;
}
} else {
if (yych <= ',') {
- if (yych <= ' ') goto yy801;
- goto yy1;
+ if (yych <= ' ') goto yy2735;
+ goto yy1682;
} else {
- if (yych <= '-') goto yy420;
- if (yych <= '.') goto yy1;
- goto yy215;
+ if (yych <= '-') goto yy2210;
+ if (yych <= '.') goto yy1682;
+ goto yy1911;
}
}
} else {
if (yych <= 'Z') {
if (yych <= '>') {
- if (yych <= ':') goto yy420;
- goto yy1;
+ if (yych <= ':') goto yy2210;
+ goto yy1682;
} else {
- if (yych <= '?') goto yy215;
- if (yych <= '@') goto yy1;
- goto yy420;
+ if (yych <= '?') goto yy1911;
+ if (yych <= '@') goto yy1682;
+ goto yy2210;
}
} else {
if (yych <= '_') {
- if (yych <= '^') goto yy1;
- goto yy420;
+ if (yych <= '^') goto yy1682;
+ goto yy2210;
} else {
- if (yych <= '`') goto yy1;
- if (yych <= 'z') goto yy420;
- goto yy1;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'z') goto yy2210;
+ goto yy1682;
}
}
}
-yy722:
+yy2633:
yych = *++YYCURSOR;
- if (yych <= 0xDF) {
- if (yych <= '\n') {
- if (yych <= '\t') goto yy621;
- goto yy1;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 0x00) goto yy1682;
+ goto yy2507;
} else {
- if (yych <= 0x7F) goto yy621;
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych >= 0xE0) goto yy2635;
}
} else {
if (yych <= 0xF0) {
- if (yych <= 0xE0) goto yy724;
- if (yych <= 0xEF) goto yy725;
- goto yy726;
+ if (yych <= 0xEF) goto yy2636;
+ goto yy2637;
} else {
- if (yych <= 0xF3) goto yy727;
- if (yych <= 0xF4) goto yy728;
- goto yy1;
+ if (yych <= 0xF3) goto yy2638;
+ if (yych <= 0xF4) goto yy2639;
+ goto yy1682;
}
}
-yy723:
+yy2634:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy621;
- goto yy1;
-yy724:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2507;
+ goto yy1682;
+yy2635:
yych = *++YYCURSOR;
- if (yych <= 0x9F) goto yy1;
- if (yych <= 0xBF) goto yy723;
- goto yy1;
-yy725:
+ if (yych <= 0x9F) goto yy1682;
+ if (yych <= 0xBF) goto yy2634;
+ goto yy1682;
+yy2636:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy723;
- goto yy1;
-yy726:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2634;
+ goto yy1682;
+yy2637:
yych = *++YYCURSOR;
- if (yych <= 0x8F) goto yy1;
- if (yych <= 0xBF) goto yy725;
- goto yy1;
-yy727:
+ if (yych <= 0x8F) goto yy1682;
+ if (yych <= 0xBF) goto yy2636;
+ goto yy1682;
+yy2638:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy725;
- goto yy1;
-yy728:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2636;
+ goto yy1682;
+yy2639:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0x8F) goto yy725;
- goto yy1;
-yy729:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0x8F) goto yy2636;
+ goto yy1682;
+yy2640:
yych = *++YYCURSOR;
if (yych <= '?') {
if (yych <= '!') {
if (yych <= '\f') {
- if (yych <= 0x00) goto yy1;
- if (yych == '\t') goto yy729;
- goto yy525;
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '\t') goto yy2640;
+ goto yy2371;
} else {
- if (yych <= '\r') goto yy729;
- if (yych == ' ') goto yy729;
- goto yy525;
+ if (yych <= '\r') goto yy2640;
+ if (yych == ' ') goto yy2640;
+ goto yy2371;
}
} else {
if (yych <= '.') {
- if (yych <= '"') goto yy800;
- if (yych == '-') goto yy629;
- goto yy525;
+ if (yych <= '"') goto yy2734;
+ if (yych == '-') goto yy2515;
+ goto yy2371;
} else {
if (yych <= ':') {
- if (yych <= '/') goto yy630;
- goto yy629;
+ if (yych <= '/') goto yy2516;
+ goto yy2515;
} else {
- if (yych <= '=') goto yy525;
- if (yych <= '>') goto yy631;
- goto yy630;
+ if (yych <= '=') goto yy2371;
+ if (yych <= '>') goto yy2517;
+ goto yy2516;
}
}
}
} else {
if (yych <= 'z') {
if (yych <= '\\') {
- if (yych <= '@') goto yy525;
- if (yych <= 'Z') goto yy629;
- if (yych <= '[') goto yy525;
- goto yy632;
+ if (yych <= '@') goto yy2371;
+ if (yych <= 'Z') goto yy2515;
+ if (yych <= '[') goto yy2371;
+ goto yy2518;
} else {
- if (yych == '_') goto yy629;
- if (yych <= '`') goto yy525;
- goto yy629;
+ if (yych == '_') goto yy2515;
+ if (yych <= '`') goto yy2371;
+ goto yy2515;
}
} else {
if (yych <= 0xE0) {
- if (yych <= 0x7F) goto yy525;
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy633;
- goto yy634;
+ if (yych <= 0x7F) goto yy2371;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2519;
+ goto yy2520;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy635;
- goto yy636;
+ if (yych <= 0xEF) goto yy2521;
+ goto yy2522;
} else {
- if (yych <= 0xF3) goto yy637;
- if (yych <= 0xF4) goto yy638;
- goto yy1;
+ if (yych <= 0xF3) goto yy2523;
+ if (yych <= 0xF4) goto yy2524;
+ goto yy1682;
}
}
}
}
-yy730:
- yyaccept = 28;
+yy2641:
+ yyaccept = 38;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 0xC1) {
if (yych <= '\'') {
- if (yych <= 0x00) goto yy315;
- if (yych <= '&') goto yy631;
- goto yy721;
+ if (yych <= 0x00) goto yy2039;
+ if (yych <= '&') goto yy2517;
+ goto yy2632;
} else {
- if (yych == '\\') goto yy731;
- if (yych <= 0x7F) goto yy631;
- goto yy315;
+ if (yych == '\\') goto yy2642;
+ if (yych <= 0x7F) goto yy2517;
+ goto yy2039;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xDF) goto yy732;
- if (yych <= 0xE0) goto yy733;
- goto yy734;
+ if (yych <= 0xDF) goto yy2643;
+ if (yych <= 0xE0) goto yy2644;
+ goto yy2645;
} else {
- if (yych <= 0xF0) goto yy735;
- if (yych <= 0xF3) goto yy736;
- if (yych <= 0xF4) goto yy737;
- goto yy315;
+ if (yych <= 0xF0) goto yy2646;
+ if (yych <= 0xF3) goto yy2647;
+ if (yych <= 0xF4) goto yy2648;
+ goto yy2039;
}
}
-yy731:
+yy2642:
yych = *++YYCURSOR;
- if (yych <= 0xDF) {
- if (yych <= '\n') {
- if (yych <= '\t') goto yy631;
- goto yy1;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 0x00) goto yy1682;
+ goto yy2517;
} else {
- if (yych <= 0x7F) goto yy631;
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych >= 0xE0) goto yy2644;
}
} else {
if (yych <= 0xF0) {
- if (yych <= 0xE0) goto yy733;
- if (yych <= 0xEF) goto yy734;
- goto yy735;
+ if (yych <= 0xEF) goto yy2645;
+ goto yy2646;
} else {
- if (yych <= 0xF3) goto yy736;
- if (yych <= 0xF4) goto yy737;
- goto yy1;
+ if (yych <= 0xF3) goto yy2647;
+ if (yych <= 0xF4) goto yy2648;
+ goto yy1682;
}
}
-yy732:
+yy2643:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy631;
- goto yy1;
-yy733:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2517;
+ goto yy1682;
+yy2644:
yych = *++YYCURSOR;
- if (yych <= 0x9F) goto yy1;
- if (yych <= 0xBF) goto yy732;
- goto yy1;
-yy734:
+ if (yych <= 0x9F) goto yy1682;
+ if (yych <= 0xBF) goto yy2643;
+ goto yy1682;
+yy2645:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy732;
- goto yy1;
-yy735:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2643;
+ goto yy1682;
+yy2646:
yych = *++YYCURSOR;
- if (yych <= 0x8F) goto yy1;
- if (yych <= 0xBF) goto yy734;
- goto yy1;
-yy736:
+ if (yych <= 0x8F) goto yy1682;
+ if (yych <= 0xBF) goto yy2645;
+ goto yy1682;
+yy2647:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy734;
- goto yy1;
-yy737:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2645;
+ goto yy1682;
+yy2648:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0x8F) goto yy734;
- goto yy1;
-yy738:
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 64) {
- goto yy115;
- }
- if (yych <= '.') {
- if (yych <= '*') {
- if (yych == '%') goto yy80;
- goto yy4;
- } else {
- if (yych <= '+') goto yy80;
- if (yych <= ',') goto yy4;
- if (yych <= '-') goto yy751;
- goto yy46;
- }
- } else {
- if (yych <= '?') {
- if (yych <= '/') goto yy4;
- if (yych <= ':') goto yy148;
- goto yy4;
- } else {
- if (yych <= '@') goto yy96;
- if (yych == '_') goto yy46;
- goto yy4;
- }
- }
-yy739:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0x8F) goto yy2645;
+ goto yy1682;
+yy2649:
yych = *++YYCURSOR;
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy802;
- goto yy1;
-yy740:
- yyaccept = 0;
+ if (yych == '+') goto yy2736;
+ goto yy1682;
+yy2650:
+ yyaccept = 7;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '+') {
- if (yych <= ' ') {
- if (yych <= '\n') {
- if (yych <= 0x00) {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych == '-') goto yy2670;
+ goto yy1773;
+yy2651:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '^') {
+ if (yych <= '/') {
+ if (yych <= ',') {
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy2575;
}
- if (yych <= 0x08) goto yy4;
- yyt4 = YYCURSOR;
- goto yy221;
+ yyt2 = YYCURSOR;
+ goto yy1892;
} else {
- if (yych == '\r') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy2217;
}
- if (yych <= 0x1F) goto yy4;
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= '.') {
+ yyt2 = YYCURSOR;
+ goto yy2218;
+ }
+ yyt2 = YYCURSOR;
+ goto yy2128;
}
} else {
- if (yych <= '%') {
- if (yych <= '!') {
- yyt4 = YYCURSOR;
- goto yy223;
- }
- if (yych <= '"') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= '?') {
+ if (yych <= '9') goto yy2737;
+ if (yych >= ';') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
- if (yych <= '$') goto yy4;
- goto yy80;
+ yyt2 = YYCURSOR;
} else {
- if (yych <= '&') goto yy4;
- if (yych <= '\'') {
- yyt4 = YYCURSOR;
- goto yy224;
- }
- if (yych <= '*') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
}
- goto yy80;
+ if (yych <= 'F') goto yy2737;
+ if (yych <= 'Z') goto yy2055;
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
}
} else {
- if (yych <= '>') {
- if (yych <= '/') {
- if (yych <= ',') {
- yyt4 = YYCURSOR;
- goto yy223;
+ if (yych <= 0xC1) {
+ if (yych <= 'f') {
+ if (yych <= '_') {
+ yyt2 = YYCURSOR;
+ goto yy2057;
}
- if (yych <= '-') goto yy751;
- if (yych <= '.') {
- yyt4 = YYCURSOR;
- goto yy230;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
- goto yy4;
+ goto yy2737;
} else {
- if (yych <= '9') goto yy115;
- if (yych <= ':') {
- yyt3 = YYCURSOR;
- goto yy234;
- }
- if (yych <= ';') {
- yyt4 = YYCURSOR;
- goto yy221;
+ if (yych <= 'z') goto yy2055;
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
- goto yy4;
+ goto yy1650;
}
} else {
- if (yych <= '^') {
- if (yych <= '?') {
- yyt4 = YYCURSOR;
- goto yy223;
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy1900;
}
- if (yych <= '@') goto yy96;
- if (yych <= 'Z') goto yy115;
- goto yy4;
- } else {
- if (yych <= '_') goto yy46;
- if (yych <= '`') goto yy4;
- if (yych <= 'z') goto yy326;
- goto yy4;
- }
- }
- }
-yy741:
- yych = *++YYCURSOR;
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy803;
- goto yy1;
-yy742:
- yyaccept = 5;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych != ' ') goto yy100;
-yy743:
- yych = *++YYCURSOR;
- if (yych == 'F') goto yy804;
- goto yy1;
-yy744:
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy805;
- goto yy4;
-yy745:
- yych = *++YYCURSOR;
- if (yych == ' ') goto yy806;
- goto yy1;
-yy746:
- yych = *++YYCURSOR;
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy807;
- goto yy1;
-yy747:
- yyaccept = 31;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '.') {
- if (yych <= 0x1F) {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy674;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy674;
- goto yy4;
- } else {
- if (yych <= '\r') goto yy674;
- if (yych == 0x1B) goto yy674;
- goto yy4;
- }
- } else {
- if (yych <= '%') {
- if (yych <= ' ') goto yy746;
- if (yych <= '#') goto yy674;
- if (yych <= '$') goto yy4;
- goto yy80;
- } else {
- if (yych == '+') goto yy80;
- if (yych <= ',') goto yy674;
- goto yy46;
- }
- }
- } else {
- if (yych <= 'Z') {
- if (yych <= '?') {
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy46;
- if (yych <= ':') goto yy4;
- goto yy674;
- } else {
- if (yych <= '@') goto yy96;
- if (yych != 'T') goto yy46;
- }
- } else {
- if (yych <= 'z') {
- if (yych == '_') goto yy46;
- if (yych <= '`') goto yy674;
- goto yy46;
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1902;
} else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy674;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy674;
- if (yych <= 0xF4) goto yy4;
- goto yy674;
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy1903;
}
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1650;
}
}
}
-yy748:
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '9') {
- if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
+yy2652:
+ yych = *++YYCURSOR;
+ if (yych <= ':') {
+ if (yych <= ' ') {
+ if (yych <= 0x1F) goto yy1682;
+ goto yy1892;
} else {
- if (yych <= ',') goto yy4;
- if (yych <= '.') goto yy46;
- if (yych <= '/') goto yy4;
- goto yy808;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2674;
+ goto yy1935;
}
} else {
- if (yych <= '^') {
- if (yych <= '?') goto yy4;
- if (yych <= '@') goto yy96;
- if (yych <= 'Z') goto yy46;
- goto yy4;
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy1682;
+ goto yy2674;
} else {
- if (yych == '`') goto yy4;
- if (yych <= 'z') goto yy46;
- goto yy4;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2674;
+ goto yy1682;
}
}
-yy749:
- yyaccept = 31;
+yy2653:
+ yyaccept = 7;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= ':') {
- if (yych <= 0x1A) {
- if (yych <= '\n') {
- if (yych <= 0x00) goto yy674;
- if (yych <= 0x08) goto yy4;
- goto yy674;
+ if (yych <= '^') {
+ if (yych <= '/') {
+ if (yych <= ',') {
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy2575;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1892;
} else {
- if (yych == '\r') goto yy674;
- goto yy4;
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy2217;
+ }
+ if (yych <= '.') {
+ yyt2 = YYCURSOR;
+ goto yy2224;
+ }
+ yyt2 = YYCURSOR;
+ goto yy2128;
}
} else {
- if (yych <= ' ') {
- if (yych <= 0x1B) goto yy674;
- if (yych <= 0x1F) goto yy4;
- goto yy746;
+ if (yych <= '?') {
+ if (yych <= '9') goto yy2737;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2652;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1892;
} else {
- if (yych == '$') goto yy4;
- if (yych <= ',') goto yy674;
- goto yy4;
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
+ }
+ if (yych <= 'F') goto yy2737;
+ if (yych <= 'Z') goto yy2055;
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
}
} else {
- if (yych <= '_') {
- if (yych <= 'T') {
- if (yych <= '?') goto yy674;
- if (yych <= 'S') goto yy4;
+ if (yych <= 0xC1) {
+ if (yych <= 'f') {
+ if (yych <= '_') {
+ yyt2 = YYCURSOR;
+ goto yy2057;
+ }
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2737;
} else {
- if (yych <= 'Z') goto yy4;
- if (yych <= '^') goto yy674;
- goto yy4;
+ if (yych <= 'z') goto yy2055;
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy1650;
}
} else {
- if (yych <= '~') {
- if (yych <= '`') goto yy674;
- if (yych <= 'z') goto yy4;
- goto yy674;
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy1900;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1902;
} else {
- if (yych <= 0x7F) goto yy4;
- if (yych <= 0xC1) goto yy674;
- if (yych <= 0xF4) goto yy4;
- goto yy674;
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy1903;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1650;
}
}
}
-yy750:
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy809;
- goto yy4;
-yy751:
- yyaccept = 0;
+yy2654:
+ yyaccept = 7;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '?') {
- if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
+ if (yych <= '^') {
+ if (yych <= '/') {
+ if (yych <= ',') {
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy2575;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ } else {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy2217;
+ }
+ if (yych <= '.') {
+ yyt2 = YYCURSOR;
+ goto yy2218;
+ }
+ yyt2 = YYCURSOR;
+ goto yy2128;
+ }
} else {
- if (yych <= '.') {
- if (yych <= ',') goto yy4;
- goto yy46;
+ if (yych <= '?') {
+ if (yych <= '9') goto yy2738;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2652;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1892;
} else {
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy810;
- goto yy4;
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
+ }
+ if (yych <= 'F') goto yy2737;
+ if (yych <= 'Z') goto yy2055;
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
}
} else {
- if (yych <= '^') {
- if (yych <= '@') goto yy96;
- if (yych <= 'F') goto yy810;
- if (yych <= 'Z') goto yy46;
- goto yy4;
+ if (yych <= 0xC1) {
+ if (yych <= 'f') {
+ if (yych <= '_') {
+ yyt2 = YYCURSOR;
+ goto yy2057;
+ }
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2737;
+ } else {
+ if (yych <= 'z') goto yy2055;
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy1650;
+ }
} else {
- if (yych <= '`') {
- if (yych <= '_') goto yy46;
- goto yy4;
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy1900;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1902;
} else {
- if (yych <= 'f') goto yy810;
- if (yych <= 'z') goto yy46;
- goto yy4;
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy1903;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1650;
}
}
}
-yy752:
- yyaccept = 11;
+yy2655:
+ yyaccept = 7;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
- }
- if (yych <= '9') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy109;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy109;
- goto yy4;
+ if (yych <= 'Z') {
+ if (yych <= '/') {
+ if (yych <= ',') {
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy2575;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1892;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') goto yy109;
- goto yy4;
- } else {
- if (yych <= 0x1B) goto yy109;
- if (yych <= 0x1F) goto yy4;
- goto yy109;
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy2217;
}
+ if (yych <= '.') {
+ yyt2 = YYCURSOR;
+ goto yy2218;
+ }
+ yyt2 = YYCURSOR;
+ goto yy2128;
}
} else {
- if (yych <= ',') {
- if (yych <= '%') {
- if (yych <= '$') goto yy4;
- goto yy105;
- } else {
- if (yych == '+') goto yy80;
- goto yy109;
- }
+ if (yych <= ':') {
+ if (yych <= '5') goto yy2738;
+ if (yych <= '9') goto yy2737;
+ yyt2 = YYCURSOR;
+ goto yy2652;
} else {
- if (yych <= '.') {
- if (yych <= '-') goto yy46;
- goto yy266;
- } else {
- if (yych <= '/') goto yy4;
- if (yych <= '7') goto yy811;
- goto yy812;
+ if (yych <= '?') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
}
+ if (yych <= 'F') goto yy2737;
+ goto yy2055;
}
}
} else {
- if (yych <= '_') {
- if (yych <= 'D') {
- if (yych <= ':') goto yy148;
- if (yych <= '?') goto yy109;
- if (yych <= '@') goto yy96;
- goto yy196;
+ if (yych <= 0xC1) {
+ if (yych <= '`') {
+ if (yych == '_') {
+ yyt2 = YYCURSOR;
+ goto yy2057;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1892;
} else {
- if (yych <= 'F') {
- if (yych <= 'E') goto yy754;
- goto yy196;
- } else {
- if (yych <= 'Z') goto yy115;
- if (yych <= '^') goto yy109;
- goto yy46;
+ if (yych <= 'f') goto yy2737;
+ if (yych <= 'z') goto yy2055;
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
+ goto yy1650;
}
} else {
- if (yych <= 'z') {
- if (yych <= 'd') {
- if (yych <= '`') goto yy109;
- goto yy196;
- } else {
- if (yych <= 'e') goto yy754;
- if (yych <= 'f') goto yy196;
- goto yy115;
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy1900;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1901;
}
+ yyt2 = YYCURSOR;
+ goto yy1902;
} else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy109;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy109;
- if (yych <= 0xF4) goto yy4;
- goto yy109;
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy1903;
}
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1650;
}
}
}
-yy753:
- yyaccept = 6;
+yy2656:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '.') goto yy2739;
+ if (yych <= '/') goto yy2056;
+ if (yych <= '9') goto yy2740;
+ goto yy2056;
+yy2657:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '.') goto yy2739;
+ if (yych <= '/') goto yy2056;
+ if (yych <= '9') goto yy2656;
+ goto yy2056;
+yy2658:
+ yyaccept = 7;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
+ if (yych <= '/') {
+ if (yych == '.') goto yy2739;
+ goto yy2056;
+ } else {
+ if (yych <= '4') goto yy2656;
+ if (yych <= '5') goto yy2741;
+ if (yych <= '9') goto yy2740;
+ goto yy2056;
}
+yy2659:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2742;
+ goto yy1682;
+yy2660:
+ yyaccept = 14;
+ yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '9') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy26;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy26;
- goto yy4;
- } else {
- if (yych <= 0x1A) {
- if (yych <= '\r') goto yy26;
- goto yy4;
- } else {
- if (yych <= 0x1B) goto yy26;
- if (yych <= 0x1F) goto yy4;
- goto yy26;
- }
- }
+ if (yych <= '+') {
+ if (yych == '%') goto yy1697;
+ if (yych <= '*') goto yy1761;
+ goto yy1697;
} else {
- if (yych <= '+') {
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy105;
- if (yych <= '*') goto yy26;
- goto yy80;
+ if (yych <= '-') {
+ if (yych <= ',') goto yy1761;
+ goto yy2670;
} else {
- if (yych <= '-') {
- if (yych <= ',') goto yy26;
- goto yy46;
- } else {
- if (yych <= '.') goto yy266;
- if (yych <= '/') goto yy4;
- goto yy812;
+ if (yych <= '.') {
+ yyt3 = YYCURSOR;
+ goto yy1928;
}
+ if (yych <= '/') goto yy1731;
+ goto yy1772;
}
}
} else {
- if (yych <= '_') {
- if (yych <= 'D') {
- if (yych <= ':') goto yy148;
- if (yych <= '?') goto yy26;
- if (yych <= '@') goto yy96;
- goto yy196;
- } else {
- if (yych <= 'F') {
- if (yych >= 'F') goto yy196;
- } else {
- if (yych <= 'Z') goto yy115;
- if (yych <= '^') goto yy26;
- goto yy46;
- }
+ if (yych <= 'Z') {
+ if (yych <= ':') {
+ yyt3 = YYCURSOR;
+ goto yy1932;
}
+ if (yych <= '?') goto yy1761;
+ if (yych <= '@') goto yy1737;
+ goto yy1772;
} else {
- if (yych <= 'z') {
- if (yych <= 'd') {
- if (yych <= '`') goto yy26;
- goto yy196;
- } else {
- if (yych <= 'e') goto yy754;
- if (yych <= 'f') goto yy196;
- goto yy115;
- }
+ if (yych <= '_') {
+ if (yych <= '^') goto yy1761;
+ goto yy1659;
} else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy26;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy26;
- if (yych <= 0xF4) goto yy4;
- goto yy26;
- }
+ if (yych <= '`') goto yy1761;
+ if (yych <= 'z') goto yy2062;
+ goto yy1761;
}
}
}
-yy754:
- yyaccept = 12;
+yy2661:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2743;
+ goto yy1682;
+yy2662:
+ yych = *++YYCURSOR;
+ if (yych == 'F') goto yy2744;
+ goto yy1682;
+yy2663:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '.') {
- if (yych <= 0x1F) {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy113;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy113;
- goto yy4;
- } else {
- if (yych <= '\r') goto yy113;
- if (yych == 0x1B) goto yy113;
- goto yy4;
- }
+ if (yych <= '/') goto yy1865;
+ if (yych <= '9') goto yy2745;
+ goto yy1865;
+yy2664:
+ yych = *++YYCURSOR;
+ if (yych == ' ') goto yy2746;
+ goto yy1682;
+yy2665:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2747;
+ goto yy1682;
+yy2666:
+ yyaccept = 41;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= '%') {
+ if (yych == ' ') goto yy2665;
+ if (yych <= '$') goto yy2570;
+ goto yy1746;
} else {
- if (yych <= '*') {
- if (yych <= '#') goto yy113;
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy80;
- goto yy113;
+ if (yych == '+') goto yy1746;
+ if (yych <= ',') goto yy2570;
+ goto yy1746;
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '?') goto yy2570;
+ if (yych != 'T') goto yy1746;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy2570;
+ goto yy1746;
} else {
- if (yych <= '+') goto yy194;
- if (yych <= ',') goto yy113;
- if (yych <= '-') goto yy251;
- goto yy46;
+ if (yych <= '`') goto yy2570;
+ if (yych <= 'z') goto yy1746;
+ goto yy2570;
}
}
+ }
+yy2667:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '/') goto yy1746;
+ if (yych <= '9') goto yy2748;
+ goto yy1746;
+yy2668:
+ yyaccept = 41;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'S') {
+ if (yych <= ',') {
+ if (yych == ' ') goto yy2665;
+ goto yy2570;
+ } else {
+ if (yych <= ':') goto yy1865;
+ if (yych <= '?') goto yy2570;
+ goto yy1865;
+ }
} else {
if (yych <= '^') {
- if (yych <= '?') {
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy196;
- if (yych <= ':') goto yy148;
- goto yy113;
- } else {
- if (yych <= '@') goto yy96;
- if (yych <= 'F') goto yy196;
- if (yych <= 'Z') goto yy115;
- goto yy113;
- }
+ if (yych <= 'T') goto yy2669;
+ if (yych <= 'Z') goto yy1865;
+ goto yy2570;
} else {
- if (yych <= 'z') {
- if (yych <= '_') goto yy46;
- if (yych <= '`') goto yy113;
- if (yych <= 'f') goto yy196;
- goto yy115;
- } else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy113;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy113;
- if (yych <= 0xF4) goto yy4;
- goto yy113;
- }
- }
+ if (yych == '`') goto yy2570;
+ if (yych <= 'z') goto yy1865;
+ goto yy2570;
}
}
-yy755:
- yyaccept = 0;
+yy2669:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '?') {
+ if (yych <= '/') goto yy1865;
+ if (yych <= '9') goto yy2749;
+ goto yy1865;
+yy2670:
+ yych = *++YYCURSOR;
+ if (yych <= 'Z') {
+ if (yych <= '9') {
+ if (yych <= '/') goto yy1698;
+ goto yy2750;
+ } else {
+ if (yych <= '@') goto yy1698;
+ if (yych <= 'F') goto yy2750;
+ goto yy1745;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych == '_') goto yy1745;
+ goto yy1698;
+ } else {
+ if (yych <= 'f') goto yy2750;
+ if (yych <= 'z') goto yy1745;
+ goto yy1698;
+ }
+ }
+yy2671:
+ yyaccept = 11;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ if (yych <= '7') {
if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
+ if (yych == '%') goto yy1727;
+ if (yych <= '*') goto yy1733;
+ goto yy1884;
} else {
- if (yych <= '.') {
- if (yych <= ',') goto yy4;
- goto yy46;
+ if (yych <= '-') {
+ if (yych <= ',') goto yy1733;
+ goto yy1884;
} else {
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy813;
- goto yy4;
+ if (yych <= '.') goto yy1985;
+ if (yych <= '/') goto yy1884;
+ goto yy2751;
}
}
} else {
- if (yych <= '^') {
- if (yych <= '@') goto yy96;
- if (yych <= 'F') goto yy810;
- if (yych <= 'Z') goto yy46;
- goto yy4;
+ if (yych <= 'Z') {
+ if (yych <= '9') goto yy2752;
+ if (yych <= ':') goto yy1884;
+ if (yych <= '?') goto yy1733;
+ goto yy1884;
} else {
- if (yych <= '`') {
- if (yych <= '_') goto yy46;
- goto yy4;
+ if (yych <= '_') {
+ if (yych <= '^') goto yy1733;
+ goto yy1884;
} else {
- if (yych <= 'f') goto yy810;
- if (yych <= 'z') goto yy46;
- goto yy4;
+ if (yych <= '`') goto yy1733;
+ if (yych <= 'z') goto yy1884;
+ goto yy1733;
}
}
}
-yy756:
- yyaccept = 0;
+yy2672:
+ yyaccept = 12;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '@') {
- if (yych <= 0x1F) {
- if (yych <= '\f') {
- if (yych <= 0x00) {
- yyt2 = YYCURSOR;
- goto yy198;
- }
- if (yych <= 0x08) {
- yyt2 = YYCURSOR;
- goto yy284;
- }
- if (yych <= '\n') {
- yyt2 = YYCURSOR;
- goto yy198;
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ if (yych <= '-') {
+ if (yych == '%') goto yy1727;
+ goto yy1884;
+ } else {
+ if (yych <= '.') goto yy1985;
+ if (yych <= '/') goto yy1884;
+ if (yych <= '9') goto yy2752;
+ goto yy1884;
+ }
+yy2673:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '_') {
+ if (yych <= ':') {
+ if (yych <= ',') {
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy2575;
}
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1892;
} else {
- if (yych <= '\r') {
- yyt2 = YYCURSOR;
- goto yy198;
- }
- if (yych == 0x1B) {
+ if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy2128;
}
- yyt2 = YYCURSOR;
- goto yy284;
+ if (yych <= '9') goto yy2753;
+ yyt1 = YYCURSOR;
+ goto yy2577;
}
} else {
- if (yych <= ',') {
- if (yych <= '#') {
+ if (yych <= 'F') {
+ if (yych <= '?') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '$') {
+ if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy284;
- }
- if (yych <= '%') {
- yyt1 = YYCURSOR;
- goto yy680;
+ goto yy2128;
}
- yyt2 = YYCURSOR;
- goto yy198;
+ goto yy2753;
} else {
- if (yych <= '9') {
- if (yych <= '/') {
- yyt2 = YYCURSOR;
- goto yy284;
- }
- goto yy814;
- } else {
- if (yych <= ':') goto yy682;
- if (yych <= '?') {
- yyt2 = YYCURSOR;
- goto yy198;
- }
+ if (yych <= 'Z') goto yy1864;
+ if (yych <= '^') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1892;
}
+ yyt2 = YYCURSOR;
+ goto yy2007;
}
}
} else {
- if (yych <= '~') {
- if (yych <= '_') {
- if (yych <= 'F') goto yy814;
- if (yych <= 'Z') goto yy3;
- if (yych <= '^') {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- yyt2 = YYCURSOR;
- goto yy284;
+ if (yych <= 'f') goto yy2753;
+ goto yy1864;
} else {
- if (yych <= '`') {
+ if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 'f') goto yy814;
- if (yych <= 'z') goto yy3;
+ if (yych <= 0xC1) goto yy1741;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1900;
}
} else {
- if (yych <= 0xE0) {
- if (yych <= 0x7F) {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1901;
}
- if (yych <= 0xC1) goto yy5;
- if (yych <= 0xDF) {
+ if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy289;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy290;
+ goto yy1903;
} else {
- if (yych <= 0xF0) {
- if (yych <= 0xEF) {
- yyt2 = YYCURSOR;
- goto yy291;
- }
+ if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy292;
- } else {
- if (yych <= 0xF3) {
- yyt2 = YYCURSOR;
- goto yy293;
- }
- if (yych <= 0xF4) {
- yyt2 = YYCURSOR;
- goto yy294;
- }
- goto yy5;
+ goto yy1904;
}
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1741;
}
}
}
-yy757:
+yy2674:
yych = *++YYCURSOR;
if (yych <= 'f') {
if (yych <= ':') {
if (yych <= '%') {
if (yych <= '$') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
yyt1 = YYCURSOR;
- goto yy680;
+ goto yy2575;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '9') goto yy815;
- goto yy816;
+ if (yych <= '9') goto yy2754;
+ yyt2 = YYCURSOR;
+ goto yy2755;
}
} else {
if (yych <= 'F') {
if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy815;
+ goto yy2754;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy815;
+ goto yy2754;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy758:
- yyaccept = 0;
+yy2675:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '?') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) {
- yyt2 = YYCURSOR;
- goto yy198;
- }
- if (yych <= 0x08) {
- yyt2 = YYCURSOR;
- goto yy284;
- }
- if (yych <= '\n') {
- yyt2 = YYCURSOR;
- goto yy198;
+ if (yych <= '^') {
+ if (yych <= '/') {
+ if (yych <= ',') {
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy2575;
}
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1892;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') {
- yyt2 = YYCURSOR;
- goto yy198;
- }
- yyt2 = YYCURSOR;
- goto yy284;
- } else {
- if (yych <= 0x1B) {
- yyt2 = YYCURSOR;
- goto yy198;
- }
- if (yych <= 0x1F) {
- yyt2 = YYCURSOR;
- goto yy284;
- }
+ if (yych == '.') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy2129;
}
+ yyt2 = YYCURSOR;
+ goto yy2128;
}
} else {
- if (yych <= '-') {
- if (yych <= '$') {
- yyt2 = YYCURSOR;
- goto yy284;
- }
- if (yych <= '%') {
+ if (yych <= '?') {
+ if (yych <= '9') goto yy2753;
+ if (yych <= ':') {
yyt1 = YYCURSOR;
- goto yy680;
- }
- if (yych <= ',') {
- yyt2 = YYCURSOR;
- goto yy198;
+ goto yy2577;
}
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1892;
} else {
- if (yych <= '/') {
- if (yych <= '.') {
- yyt2 = YYCURSOR;
- goto yy376;
- }
- yyt2 = YYCURSOR;
- goto yy284;
- } else {
- if (yych <= '9') goto yy814;
- if (yych <= ':') goto yy682;
+ if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy2128;
}
+ if (yych <= 'F') goto yy2753;
+ if (yych <= 'Z') goto yy1864;
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
}
} else {
- if (yych <= '~') {
- if (yych <= '^') {
- if (yych <= '@') {
+ if (yych <= 0xC1) {
+ if (yych <= 'f') {
+ if (yych <= '_') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy2007;
}
- if (yych <= 'F') goto yy814;
- if (yych <= 'Z') goto yy3;
- yyt2 = YYCURSOR;
- goto yy198;
- } else {
if (yych <= '`') {
- if (yych <= '_') {
- yyt2 = YYCURSOR;
- goto yy284;
- }
yyt2 = YYCURSOR;
- goto yy198;
- } else {
- if (yych <= 'f') goto yy814;
- if (yych <= 'z') goto yy3;
+ goto yy1892;
+ }
+ goto yy2753;
+ } else {
+ if (yych <= 'z') goto yy1864;
+ if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
+ goto yy1741;
}
} else {
- if (yych <= 0xE0) {
- if (yych <= 0x7F) {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1900;
}
- if (yych <= 0xC1) goto yy5;
- if (yych <= 0xDF) {
+ if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy289;
+ goto yy1901;
}
yyt2 = YYCURSOR;
- goto yy290;
+ goto yy1902;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) {
- yyt2 = YYCURSOR;
- goto yy291;
- }
yyt2 = YYCURSOR;
- goto yy292;
- } else {
- if (yych <= 0xF3) {
- yyt2 = YYCURSOR;
- goto yy293;
- }
- if (yych <= 0xF4) {
- yyt2 = YYCURSOR;
- goto yy294;
- }
- goto yy5;
+ goto yy1903;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
}
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1741;
}
}
}
-yy759:
- yyaccept = 29;
+yy2676:
+ yyaccept = 39;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '@') {
- if (yych <= '/') goto yy643;
- if (yych <= '9') goto yy542;
- goto yy643;
+ if (yych <= '/') goto yy2538;
+ if (yych <= '9') goto yy2399;
+ goto yy2538;
} else {
- if (yych <= 'F') goto yy542;
- if (yych <= '`') goto yy643;
- if (yych <= 'f') goto yy542;
- goto yy643;
+ if (yych <= 'F') goto yy2399;
+ if (yych <= '`') goto yy2538;
+ if (yych <= 'f') goto yy2399;
+ goto yy2538;
}
-yy760:
+yy2677:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy817;
- if (yych <= ':') goto yy563;
- goto yy1;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2756;
+ if (yych <= ':') goto yy2419;
+ goto yy1682;
} else {
- if (yych <= 'F') goto yy817;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy817;
- goto yy1;
+ if (yych <= 'F') goto yy2756;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2756;
+ goto yy1682;
}
-yy761:
+yy2678:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy818;
- if (yych <= ':') goto yy691;
- goto yy1;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2757;
+ if (yych <= ':') goto yy2586;
+ goto yy1682;
} else {
- if (yych <= 'F') goto yy818;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy818;
- goto yy1;
+ if (yych <= 'F') goto yy2757;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2757;
+ goto yy1682;
}
-yy762:
+yy2679:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy819;
- if (yych <= ':') goto yy820;
- goto yy1;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2758;
+ if (yych <= ':') goto yy2759;
+ goto yy1682;
} else {
- if (yych <= 'F') goto yy819;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy819;
- goto yy1;
+ if (yych <= 'F') goto yy2758;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2758;
+ goto yy1682;
}
-yy763:
+yy2680:
yych = *++YYCURSOR;
if (yych <= '`') {
if (yych <= '9') {
if (yych <= '0') {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy821;
+ goto yy2760;
} else {
- if (yych <= '1') goto yy822;
- if (yych <= '2') goto yy823;
- goto yy821;
+ if (yych <= '1') goto yy2761;
+ if (yych <= '2') goto yy2762;
+ goto yy2760;
}
} else {
if (yych <= '@') {
- if (yych <= ':') goto yy1;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1897;
+ }
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 'F') goto yy824;
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'F') goto yy2763;
+ if (yych <= 'Z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
}
} else {
if (yych <= 0xDF) {
if (yych <= 'z') {
- if (yych <= 'f') goto yy824;
- goto yy1;
+ if (yych <= 'f') goto yy2763;
+ goto yy1682;
} else {
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy764:
+yy2681:
yych = *++YYCURSOR;
if (yych <= 'f') {
if (yych <= ':') {
if (yych <= '.') {
if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- yyt1 = YYCURSOR;
- goto yy297;
+ yyt4 = YYCURSOR;
+ goto yy2420;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '9') goto yy825;
+ if (yych <= '9') goto yy2764;
+ yyt2 = YYCURSOR;
}
} else {
if (yych <= 'F') {
if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy825;
+ goto yy2764;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy825;
+ goto yy2764;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy765:
+yy2682:
yych = *++YYCURSOR;
- if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy824;
- goto yy1;
+ if (yych <= '9') {
+ if (yych == ' ') goto yy1892;
+ if (yych <= '/') goto yy1682;
+ goto yy2763;
} else {
- if (yych <= 'F') goto yy824;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy824;
- goto yy1;
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy1682;
+ goto yy2763;
+ } else {
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2763;
+ goto yy1682;
+ }
}
-yy766:
+yy2683:
yych = *++YYCURSOR;
if (yych <= 'z') {
if (yych <= '@') {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
+ }
+ if (yych <= '9') goto yy2764;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2682;
}
- if (yych <= '9') goto yy825;
- if (yych <= ':') goto yy765;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
if (yych <= 'Z') {
- if (yych <= 'F') goto yy825;
- goto yy1;
+ if (yych <= 'F') goto yy2764;
+ goto yy1682;
} else {
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 'f') goto yy825;
- goto yy1;
+ if (yych <= 'f') goto yy2764;
+ goto yy1682;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy767:
+yy2684:
yych = *++YYCURSOR;
if (yych <= 'f') {
if (yych <= ':') {
if (yych <= '.') {
if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- yyt1 = YYCURSOR;
- goto yy297;
+ yyt4 = YYCURSOR;
+ goto yy2420;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '9') goto yy826;
- goto yy765;
+ if (yych <= '9') goto yy2765;
+ yyt2 = YYCURSOR;
+ goto yy2682;
}
} else {
if (yych <= 'F') {
if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy825;
+ goto yy2764;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy825;
+ goto yy2764;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy768:
+yy2685:
yych = *++YYCURSOR;
if (yych <= '`') {
if (yych <= '9') {
if (yych <= '.') {
if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- yyt1 = YYCURSOR;
- goto yy297;
+ yyt4 = YYCURSOR;
+ goto yy2420;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '5') goto yy826;
- goto yy825;
+ if (yych <= '5') goto yy2765;
+ goto yy2764;
}
} else {
if (yych <= '@') {
- if (yych <= ':') goto yy765;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2682;
+ }
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 'F') goto yy825;
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'F') goto yy2764;
+ if (yych <= 'Z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
}
} else {
if (yych <= 0xDF) {
if (yych <= 'z') {
- if (yych <= 'f') goto yy825;
- goto yy1;
+ if (yych <= 'f') goto yy2764;
+ goto yy1682;
} else {
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy769:
+yy2686:
yych = *++YYCURSOR;
if (yych <= 0x7F) {
if (yych <= '@') {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
+ }
+ if (yych <= '9') goto yy1682;
+ if (yych <= ':') {
+ yyt4 = YYCURSOR;
+ goto yy2422;
}
- if (yych <= '9') goto yy1;
- if (yych <= ':') goto yy565;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
} else {
if (yych <= 0xF0) {
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
}
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
-yy770:
- yyaccept = 0;
+yy2687:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '1') {
+ if (yych <= '/') goto yy1682;
+ if (yych <= '0') goto yy2766;
+ goto yy2767;
+ } else {
+ if (yych <= '2') goto yy2768;
+ if (yych <= '9') goto yy2766;
+ goto yy1682;
+ }
+ } else {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy1864;
+ if (yych <= '^') goto yy1682;
+ goto yy1864;
+ } else {
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'z') goto yy1864;
+ goto yy1682;
+ }
+ }
+yy2688:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '1') {
- if (yych <= '/') goto yy4;
- if (yych <= '0') goto yy827;
- goto yy828;
+ if (yych == '.') goto yy2687;
+ goto yy1865;
+yy2689:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '.') goto yy2687;
+ if (yych <= '/') goto yy1865;
+ if (yych <= '5') goto yy2688;
+ goto yy1865;
+yy2690:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) {
+ if (yych <= '@') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= '9') goto yy1682;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2431;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ } else {
+ if (yych <= 'Z') goto yy1682;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= 'z') goto yy1682;
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
} else {
- if (yych <= '2') goto yy829;
- if (yych <= '9') goto yy827;
- goto yy4;
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy1900;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1902;
+ } else {
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy1903;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1682;
+ }
}
-yy771:
- yyaccept = 0;
+yy2691:
+ yyaccept = 3;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych == '.') goto yy770;
- goto yy4;
-yy772:
- yyaccept = 0;
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ switch (yych) {
+ case '%': goto yy1727;
+ case '+':
+ case '-':
+ case '/':
+ case ':':
+ case '@':
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy1884;
+ case '.': goto yy2019;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy2769;
+ case 'B':
+ case 'b': goto yy2692;
+ case 'E':
+ case 'e': goto yy2693;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy1740;
+ case 'S':
+ case 's': goto yy1744;
+ case 'm': goto yy1747;
+ case 'p':
+ case 'u': goto yy1748;
+ default: goto yy1635;
+ }
+yy2692:
+ yyaccept = 3;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych == '.') goto yy770;
- if (yych <= '/') goto yy4;
- if (yych <= '5') goto yy771;
- goto yy4;
-yy773:
+ if (yych <= ':') {
+ if (yych <= '*') {
+ if (yych == '%') goto yy1884;
+ goto yy1635;
+ } else {
+ if (yych == ',') goto yy1635;
+ goto yy1884;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '?') goto yy1635;
+ if (yych <= 'Z') goto yy1884;
+ goto yy1635;
+ } else {
+ if (yych == '`') goto yy1635;
+ if (yych <= 'z') goto yy1884;
+ goto yy1635;
+ }
+ }
+yy2693:
+ yyaccept = 12;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '+') goto yy1889;
+ if (yych == '-') goto yy2016;
+ goto yy1884;
+yy2694:
+ yych = *++YYCURSOR;
+ if (yych <= 'Z') {
+ if (yych <= '9') {
+ if (yych <= '/') goto yy1698;
+ goto yy2770;
+ } else {
+ if (yych <= '@') goto yy1698;
+ if (yych <= 'F') goto yy2750;
+ goto yy1745;
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych == '_') goto yy1745;
+ goto yy1698;
+ } else {
+ if (yych <= 'f') goto yy2750;
+ if (yych <= 'z') goto yy1745;
+ goto yy1698;
+ }
+ }
+yy2695:
yych = *++YYCURSOR;
if (yych <= 0x7F) {
if (yych <= '@') {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
+ }
+ if (yych <= '9') goto yy2771;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1897;
}
- if (yych <= '9') goto yy830;
- if (yych <= ':') goto yy1;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
} else {
if (yych <= 0xF0) {
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
}
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
-yy774:
+yy2696:
yych = *++YYCURSOR;
if (yych <= 0x7F) {
if (yych <= '@') {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
+ }
+ if (yych <= '9') goto yy2695;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1897;
}
- if (yych <= '9') goto yy773;
- if (yych <= ':') goto yy1;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
} else {
if (yych <= 0xF0) {
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
}
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
-yy775:
+yy2697:
yych = *++YYCURSOR;
if (yych <= 'z') {
if (yych <= '9') {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '4') goto yy773;
- if (yych <= '5') goto yy831;
- goto yy830;
+ if (yych <= '4') goto yy2695;
+ if (yych <= '5') goto yy2772;
+ goto yy2771;
} else {
if (yych <= '@') {
- if (yych <= ':') goto yy1;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1897;
+ }
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy1;
+ goto yy1682;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy776:
+yy2698:
yych = *++YYCURSOR;
if (yych <= 'f') {
if (yych <= ':') {
if (yych <= '.') {
if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
yyt1 = YYCURSOR;
- goto yy297;
+ goto yy2020;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '9') goto yy576;
- goto yy486;
+ if (yych <= '9') goto yy2438;
+ yyt2 = YYCURSOR;
+ goto yy2300;
}
} else {
if (yych <= 'F') {
if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy576;
+ goto yy2438;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy576;
+ goto yy2438;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy777:
+yy2699:
yych = *++YYCURSOR;
- if (yych <= '9') {
- if (yych <= '0') {
- if (yych <= '/') goto yy1;
- goto yy832;
+ if (yych <= '2') {
+ if (yych <= '/') {
+ if (yych == ' ') goto yy1892;
+ goto yy1682;
} else {
- if (yych <= '1') goto yy473;
- if (yych <= '2') goto yy474;
- goto yy472;
+ if (yych <= '0') goto yy2773;
+ if (yych <= '1') goto yy2774;
+ goto yy2775;
}
} else {
if (yych <= 'F') {
- if (yych <= '@') goto yy1;
- goto yy475;
+ if (yych <= '9') goto yy2776;
+ if (yych <= '@') goto yy1682;
+ goto yy2284;
} else {
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy475;
- goto yy1;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2284;
+ goto yy1682;
}
}
-yy778:
+yy2700:
yych = *++YYCURSOR;
if (yych <= 'f') {
if (yych <= ':') {
if (yych <= '.') {
if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
yyt1 = YYCURSOR;
- goto yy297;
+ goto yy2020;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '9') goto yy833;
- goto yy486;
+ if (yych <= '9') goto yy2777;
+ yyt2 = YYCURSOR;
+ goto yy2300;
}
} else {
if (yych <= 'F') {
if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy576;
+ goto yy2438;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy576;
+ goto yy2438;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy779:
+yy2701:
yych = *++YYCURSOR;
if (yych <= '`') {
if (yych <= '9') {
if (yych <= '.') {
if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
yyt1 = YYCURSOR;
- goto yy297;
+ goto yy2020;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '5') goto yy833;
- goto yy576;
+ if (yych <= '5') goto yy2777;
+ goto yy2438;
}
} else {
if (yych <= '@') {
- if (yych <= ':') goto yy486;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2300;
+ }
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 'F') goto yy576;
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'F') goto yy2438;
+ if (yych <= 'Z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
}
} else {
if (yych <= 0xDF) {
if (yych <= 'z') {
- if (yych <= 'f') goto yy576;
- goto yy1;
+ if (yych <= 'f') goto yy2438;
+ goto yy1682;
} else {
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy780:
+yy2702:
yych = *++YYCURSOR;
- if (yybm[0+yych] & 128) {
- goto yy780;
+ if (yych <= 0xC1) {
+ if (yych <= '-') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= ',') goto yy2449;
+ goto yy2702;
+ } else {
+ if (yych == '>') goto yy2778;
+ if (yych <= 0x7F) goto yy2449;
+ goto yy1682;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy2613;
+ if (yych <= 0xE0) goto yy2614;
+ goto yy2615;
+ } else {
+ if (yych <= 0xF0) goto yy2616;
+ if (yych <= 0xF3) goto yy2617;
+ if (yych <= 0xF4) goto yy2618;
+ goto yy1682;
+ }
+ }
+yy2703:
+ yych = *++YYCURSOR;
+ if (yybm_init[0+yych] & 32) {
+ goto yy2703;
+ }
+ if (yych <= 0xC1) {
+ if (yych <= '\'') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych >= '#') goto yy2705;
+ } else {
+ if (yych <= '*') goto yy2706;
+ if (yych <= '-') goto yy2707;
+ if (yych <= '\\') goto yy2708;
+ goto yy1682;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy2709;
+ if (yych <= 0xE0) goto yy2710;
+ goto yy2711;
+ } else {
+ if (yych <= 0xF0) goto yy2712;
+ if (yych <= 0xF3) goto yy2713;
+ if (yych <= 0xF4) goto yy2714;
+ goto yy1682;
+ }
+ }
+yy2704:
+ yych = *++YYCURSOR;
+ if (yych <= '=') {
+ if (yych <= '"') {
+ if (yych <= '\f') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '\t') goto yy2779;
+ goto yy2316;
+ } else {
+ if (yych <= 0x1F) {
+ if (yych <= '\r') goto yy2779;
+ goto yy2316;
+ } else {
+ if (yych <= ' ') goto yy2779;
+ if (yych <= '!') goto yy2316;
+ goto yy2780;
+ }
+ }
+ } else {
+ if (yych <= '*') {
+ if (yych == '\'') goto yy2781;
+ if (yych <= ')') goto yy2316;
+ goto yy2175;
+ } else {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy2316;
+ goto yy2782;
+ } else {
+ if (yych <= '/') goto yy2316;
+ if (yych <= ':') goto yy2783;
+ goto yy2316;
+ }
+ }
+ }
+ } else {
+ if (yych <= 'z') {
+ if (yych <= '[') {
+ if (yych <= '>') goto yy2459;
+ if (yych <= '@') goto yy2316;
+ if (yych <= 'Z') goto yy2783;
+ goto yy2316;
+ } else {
+ if (yych <= '^') {
+ if (yych <= '\\') goto yy2318;
+ goto yy2316;
+ } else {
+ if (yych == '`') goto yy2316;
+ goto yy2783;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy2316;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2319;
+ goto yy2320;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy2321;
+ goto yy2322;
+ } else {
+ if (yych <= 0xF3) goto yy2323;
+ if (yych <= 0xF4) goto yy2324;
+ goto yy1682;
+ }
+ }
+ }
+ }
+yy2705:
+ yych = *++YYCURSOR;
+ if (yych <= '=') {
+ if (yych <= '"') {
+ if (yych <= '\f') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '\t') goto yy2784;
+ goto yy2307;
+ } else {
+ if (yych <= 0x1F) {
+ if (yych <= '\r') goto yy2784;
+ goto yy2307;
+ } else {
+ if (yych <= ' ') goto yy2784;
+ if (yych <= '!') goto yy2307;
+ goto yy2785;
+ }
+ }
+ } else {
+ if (yych <= '*') {
+ if (yych == '\'') goto yy2786;
+ if (yych <= ')') goto yy2307;
+ goto yy2167;
+ } else {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy2307;
+ goto yy2787;
+ } else {
+ if (yych <= '/') goto yy2307;
+ if (yych <= ':') goto yy2788;
+ goto yy2307;
+ }
+ }
+ }
+ } else {
+ if (yych <= 'z') {
+ if (yych <= '[') {
+ if (yych <= '>') goto yy2451;
+ if (yych <= '@') goto yy2307;
+ if (yych <= 'Z') goto yy2788;
+ goto yy2307;
+ } else {
+ if (yych <= '^') {
+ if (yych <= '\\') goto yy2309;
+ goto yy2307;
+ } else {
+ if (yych == '`') goto yy2307;
+ goto yy2788;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy2307;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2310;
+ goto yy2311;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy2312;
+ goto yy2313;
+ } else {
+ if (yych <= 0xF3) goto yy2314;
+ if (yych <= 0xF4) goto yy2315;
+ goto yy1682;
+ }
+ }
+ }
+ }
+yy2706:
+ yych = *++YYCURSOR;
+ if (yybm_init[0+yych] & 64) {
+ goto yy2706;
}
if (yych <= 0xDF) {
if (yych <= '\'') {
- if (yych <= 0x00) goto yy1;
- if (yych >= '#') goto yy782;
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= '"') goto yy2715;
+ goto yy2716;
} else {
- if (yych <= '\\') goto yy783;
- if (yych <= 0xC1) goto yy1;
- goto yy784;
+ if (yych <= '\\') goto yy2717;
+ if (yych <= 0xC1) goto yy1682;
+ goto yy2718;
}
} else {
if (yych <= 0xF0) {
- if (yych <= 0xE0) goto yy785;
- if (yych <= 0xEF) goto yy786;
- goto yy787;
+ if (yych <= 0xE0) goto yy2719;
+ if (yych <= 0xEF) goto yy2720;
+ goto yy2721;
} else {
- if (yych <= 0xF3) goto yy788;
- if (yych <= 0xF4) goto yy789;
- goto yy1;
+ if (yych <= 0xF3) goto yy2722;
+ if (yych <= 0xF4) goto yy2723;
+ goto yy1682;
}
}
-yy781:
+yy2707:
+ yych = *++YYCURSOR;
+ if (yych <= '\\') {
+ if (yych <= '&') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '"') goto yy2704;
+ goto yy2703;
+ } else {
+ if (yych <= ',') {
+ if (yych <= '\'') goto yy2705;
+ goto yy2703;
+ } else {
+ if (yych <= '-') goto yy2789;
+ if (yych <= '[') goto yy2703;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy2703;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2709;
+ goto yy2710;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy2711;
+ goto yy2712;
+ } else {
+ if (yych <= 0xF3) goto yy2713;
+ if (yych <= 0xF4) goto yy2714;
+ goto yy1682;
+ }
+ }
+ }
+yy2708:
+ yych = *++YYCURSOR;
+ if (yych <= 0xC1) {
+ if (yych <= '*') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= ')') goto yy2703;
+ goto yy2706;
+ } else {
+ if (yych == '-') goto yy2707;
+ if (yych <= 0x7F) goto yy2703;
+ goto yy1682;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy2709;
+ if (yych <= 0xE0) goto yy2710;
+ goto yy2711;
+ } else {
+ if (yych <= 0xF0) goto yy2712;
+ if (yych <= 0xF3) goto yy2713;
+ if (yych <= 0xF4) goto yy2714;
+ goto yy1682;
+ }
+ }
+yy2709:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2703;
+ goto yy1682;
+yy2710:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy1682;
+ if (yych <= 0xBF) goto yy2709;
+ goto yy1682;
+yy2711:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2709;
+ goto yy1682;
+yy2712:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy1682;
+ if (yych <= 0xBF) goto yy2711;
+ goto yy1682;
+yy2713:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2711;
+ goto yy1682;
+yy2714:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0x8F) goto yy2711;
+ goto yy1682;
+yy2715:
yych = *++YYCURSOR;
if (yych <= '>') {
if (yych <= '!') {
if (yych <= '\f') {
- if (yych <= 0x00) goto yy1;
- if (yych == '\t') goto yy834;
- goto yy399;
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '\t') goto yy2790;
+ goto yy2175;
} else {
- if (yych <= '\r') goto yy834;
- if (yych == ' ') goto yy834;
- goto yy399;
+ if (yych <= '\r') goto yy2790;
+ if (yych == ' ') goto yy2790;
+ goto yy2175;
}
} else {
if (yych <= ',') {
- if (yych <= '"') goto yy835;
- if (yych == '\'') goto yy836;
- goto yy399;
+ if (yych <= '"') goto yy2791;
+ if (yych == '\'') goto yy2792;
+ goto yy2175;
} else {
if (yych <= '/') {
- if (yych <= '-') goto yy837;
- goto yy399;
+ if (yych <= '-') goto yy2793;
+ goto yy2175;
} else {
- if (yych <= ':') goto yy837;
- if (yych <= '=') goto yy399;
- goto yy588;
+ if (yych <= ':') goto yy2793;
+ if (yych <= '=') goto yy2175;
+ goto yy2475;
}
}
}
} else {
if (yych <= 'z') {
if (yych <= '\\') {
- if (yych <= '@') goto yy399;
- if (yych <= 'Z') goto yy837;
- if (yych <= '[') goto yy399;
- goto yy400;
+ if (yych <= '@') goto yy2175;
+ if (yych <= 'Z') goto yy2793;
+ if (yych <= '[') goto yy2175;
+ goto yy2176;
} else {
- if (yych == '_') goto yy837;
- if (yych <= '`') goto yy399;
- goto yy837;
+ if (yych == '_') goto yy2793;
+ if (yych <= '`') goto yy2175;
+ goto yy2793;
}
} else {
if (yych <= 0xE0) {
- if (yych <= 0x7F) goto yy399;
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy401;
- goto yy402;
+ if (yych <= 0x7F) goto yy2175;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2177;
+ goto yy2178;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy403;
- goto yy404;
+ if (yych <= 0xEF) goto yy2179;
+ goto yy2180;
} else {
- if (yych <= 0xF3) goto yy405;
- if (yych <= 0xF4) goto yy406;
- goto yy1;
+ if (yych <= 0xF3) goto yy2181;
+ if (yych <= 0xF4) goto yy2182;
+ goto yy1682;
}
}
}
}
-yy782:
+yy2716:
yych = *++YYCURSOR;
if (yych <= '>') {
if (yych <= '!') {
if (yych <= '\f') {
- if (yych <= 0x00) goto yy1;
- if (yych == '\t') goto yy838;
- goto yy391;
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '\t') goto yy2794;
+ goto yy2167;
} else {
- if (yych <= '\r') goto yy838;
- if (yych == ' ') goto yy838;
- goto yy391;
+ if (yych <= '\r') goto yy2794;
+ if (yych == ' ') goto yy2794;
+ goto yy2167;
}
} else {
if (yych <= ',') {
- if (yych <= '"') goto yy839;
- if (yych == '\'') goto yy840;
- goto yy391;
+ if (yych <= '"') goto yy2795;
+ if (yych == '\'') goto yy2796;
+ goto yy2167;
} else {
if (yych <= '/') {
- if (yych <= '-') goto yy841;
- goto yy391;
+ if (yych <= '-') goto yy2797;
+ goto yy2167;
} else {
- if (yych <= ':') goto yy841;
- if (yych <= '=') goto yy391;
- goto yy580;
+ if (yych <= ':') goto yy2797;
+ if (yych <= '=') goto yy2167;
+ goto yy2468;
}
}
}
} else {
if (yych <= 'z') {
if (yych <= '\\') {
- if (yych <= '@') goto yy391;
- if (yych <= 'Z') goto yy841;
- if (yych <= '[') goto yy391;
- goto yy392;
+ if (yych <= '@') goto yy2167;
+ if (yych <= 'Z') goto yy2797;
+ if (yych <= '[') goto yy2167;
+ goto yy2168;
} else {
- if (yych == '_') goto yy841;
- if (yych <= '`') goto yy391;
- goto yy841;
+ if (yych == '_') goto yy2797;
+ if (yych <= '`') goto yy2167;
+ goto yy2797;
}
} else {
if (yych <= 0xE0) {
- if (yych <= 0x7F) goto yy391;
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy393;
- goto yy394;
+ if (yych <= 0x7F) goto yy2167;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2169;
+ goto yy2170;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy395;
- goto yy396;
+ if (yych <= 0xEF) goto yy2171;
+ goto yy2172;
} else {
- if (yych <= 0xF3) goto yy397;
- if (yych <= 0xF4) goto yy398;
- goto yy1;
+ if (yych <= 0xF3) goto yy2173;
+ if (yych <= 0xF4) goto yy2174;
+ goto yy1682;
}
}
}
}
-yy783:
+yy2717:
yych = *++YYCURSOR;
- if (yych <= 0xDF) {
- if (yych <= '\n') {
- if (yych <= '\t') goto yy780;
- goto yy1;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 0x00) goto yy1682;
+ goto yy2706;
} else {
- if (yych <= 0x7F) goto yy780;
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych >= 0xE0) goto yy2719;
}
} else {
if (yych <= 0xF0) {
- if (yych <= 0xE0) goto yy785;
- if (yych <= 0xEF) goto yy786;
- goto yy787;
+ if (yych <= 0xEF) goto yy2720;
+ goto yy2721;
} else {
- if (yych <= 0xF3) goto yy788;
- if (yych <= 0xF4) goto yy789;
- goto yy1;
+ if (yych <= 0xF3) goto yy2722;
+ if (yych <= 0xF4) goto yy2723;
+ goto yy1682;
}
}
-yy784:
+yy2718:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy780;
- goto yy1;
-yy785:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2706;
+ goto yy1682;
+yy2719:
yych = *++YYCURSOR;
- if (yych <= 0x9F) goto yy1;
- if (yych <= 0xBF) goto yy784;
- goto yy1;
-yy786:
+ if (yych <= 0x9F) goto yy1682;
+ if (yych <= 0xBF) goto yy2718;
+ goto yy1682;
+yy2720:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy784;
- goto yy1;
-yy787:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2718;
+ goto yy1682;
+yy2721:
yych = *++YYCURSOR;
- if (yych <= 0x8F) goto yy1;
- if (yych <= 0xBF) goto yy786;
- goto yy1;
-yy788:
+ if (yych <= 0x8F) goto yy1682;
+ if (yych <= 0xBF) goto yy2720;
+ goto yy1682;
+yy2722:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy786;
- goto yy1;
-yy789:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2720;
+ goto yy1682;
+yy2723:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0x8F) goto yy786;
- goto yy1;
-yy790:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0x8F) goto yy2720;
+ goto yy1682;
+yy2724:
yych = *++YYCURSOR;
if (yych <= '=') {
if (yych <= '"') {
if (yych <= '\f') {
- if (yych <= 0x00) goto yy1;
- if (yych == '\t') goto yy790;
- goto yy717;
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '\t') goto yy2724;
+ goto yy2628;
} else {
if (yych <= 0x1F) {
- if (yych <= '\r') goto yy790;
- goto yy717;
+ if (yych <= '\r') goto yy2724;
+ goto yy2628;
} else {
- if (yych <= ' ') goto yy790;
- if (yych <= '!') goto yy717;
- goto yy413;
+ if (yych <= ' ') goto yy2724;
+ if (yych <= '!') goto yy2628;
+ goto yy2203;
}
}
} else {
if (yych <= '-') {
- if (yych == '\'') goto yy412;
- if (yych <= ',') goto yy717;
- goto yy790;
+ if (yych == '\'') goto yy2202;
+ if (yych <= ',') goto yy2628;
+ goto yy2724;
} else {
if (yych <= '/') {
- if (yych <= '.') goto yy717;
+ if (yych <= '.') goto yy2628;
} else {
- if (yych <= ':') goto yy790;
- if (yych <= '<') goto yy717;
- goto yy842;
+ if (yych <= ':') goto yy2724;
+ if (yych <= '<') goto yy2628;
+ goto yy2798;
}
}
}
} else {
if (yych <= '`') {
if (yych <= 'Z') {
- if (yych <= '>') goto yy792;
- if (yych <= '?') goto yy791;
- if (yych <= '@') goto yy717;
- goto yy790;
+ if (yych <= '>') goto yy2726;
+ if (yych <= '?') goto yy2725;
+ if (yych <= '@') goto yy2628;
+ goto yy2724;
} else {
if (yych <= '\\') {
- if (yych <= '[') goto yy717;
- goto yy793;
+ if (yych <= '[') goto yy2628;
+ goto yy2727;
} else {
- if (yych == '_') goto yy790;
- goto yy717;
+ if (yych == '_') goto yy2724;
+ goto yy2628;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= 'z') goto yy790;
- goto yy717;
+ if (yych <= 'z') goto yy2724;
+ goto yy2628;
} else {
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy794;
- goto yy795;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2728;
+ goto yy2729;
}
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy796;
- goto yy797;
+ if (yych <= 0xEF) goto yy2730;
+ goto yy2731;
} else {
- if (yych <= 0xF3) goto yy798;
- if (yych <= 0xF4) goto yy799;
- goto yy1;
+ if (yych <= 0xF3) goto yy2732;
+ if (yych <= 0xF4) goto yy2733;
+ goto yy1682;
}
}
}
}
-yy791:
+yy2725:
yych = *++YYCURSOR;
- if (yybm[0+yych] & 64) {
- goto yy717;
+ if (yybm_init[0+yych] & 16) {
+ goto yy2628;
}
if (yych <= 'Z') {
if (yych <= '-') {
- if (yych <= 0x00) goto yy1;
- if (yych <= '"') goto yy413;
- if (yych <= '\'') goto yy412;
- goto yy790;
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= '"') goto yy2203;
+ if (yych <= '\'') goto yy2202;
+ goto yy2724;
} else {
if (yych <= ':') {
- if (yych <= '/') goto yy791;
- goto yy790;
+ if (yych <= '/') goto yy2725;
+ goto yy2724;
} else {
- if (yych <= '>') goto yy843;
- if (yych <= '?') goto yy791;
- goto yy790;
+ if (yych <= '>') goto yy2799;
+ if (yych <= '?') goto yy2725;
+ goto yy2724;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 'z') {
- if (yych <= '\\') goto yy793;
- goto yy790;
+ if (yych <= '\\') goto yy2727;
+ goto yy2724;
} else {
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy794;
- goto yy795;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2728;
+ goto yy2729;
}
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy796;
- goto yy797;
+ if (yych <= 0xEF) goto yy2730;
+ goto yy2731;
} else {
- if (yych <= 0xF3) goto yy798;
- if (yych <= 0xF4) goto yy799;
- goto yy1;
+ if (yych <= 0xF3) goto yy2732;
+ if (yych <= 0xF4) goto yy2733;
+ goto yy1682;
}
}
}
-yy792:
- yyaccept = 26;
+yy2726:
+ yyaccept = 35;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 0x7F) {
if (yych <= '&') {
- if (yych <= 0x00) goto yy217;
- if (yych == '"') goto yy845;
- goto yy844;
+ if (yych <= 0x00) goto yy1913;
+ if (yych == '"') goto yy2801;
+ goto yy2800;
} else {
- if (yych <= '\'') goto yy846;
- if (yych == '\\') goto yy847;
- goto yy844;
+ if (yych <= '\'') goto yy2802;
+ if (yych == '\\') goto yy2803;
+ goto yy2800;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xC1) goto yy217;
- if (yych <= 0xDF) goto yy848;
- if (yych <= 0xE0) goto yy849;
- goto yy850;
- } else {
- if (yych <= 0xF0) goto yy851;
- if (yych <= 0xF3) goto yy852;
- if (yych <= 0xF4) goto yy853;
- goto yy217;
+ if (yych <= 0xC1) goto yy1913;
+ if (yych <= 0xDF) goto yy2804;
+ if (yych <= 0xE0) goto yy2805;
+ goto yy2806;
+ } else {
+ if (yych <= 0xF0) goto yy2807;
+ if (yych <= 0xF3) goto yy2808;
+ if (yych <= 0xF4) goto yy2809;
+ goto yy1913;
}
}
-yy793:
+yy2727:
yych = *++YYCURSOR;
- if (yych <= 'Z') {
- if (yych <= '.') {
- if (yych <= '\n') {
- if (yych <= 0x00) goto yy844;
- if (yych <= '\t') goto yy717;
- goto yy410;
+ if (yych <= '^') {
+ if (yych <= ':') {
+ if (yych <= '-') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= ',') goto yy2628;
+ goto yy2724;
} else {
- if (yych == '-') goto yy790;
- goto yy717;
+ if (yych <= '.') goto yy2628;
+ if (yych <= '/') goto yy2725;
+ goto yy2724;
}
} else {
- if (yych <= '=') {
- if (yych <= '/') goto yy791;
- if (yych <= ':') goto yy790;
- goto yy717;
+ if (yych <= '?') {
+ if (yych <= '=') goto yy2628;
+ if (yych <= '>') goto yy2726;
+ goto yy2725;
} else {
- if (yych <= '>') goto yy792;
- if (yych <= '?') goto yy791;
- if (yych <= '@') goto yy717;
- goto yy790;
+ if (yych <= '@') goto yy2628;
+ if (yych <= 'Z') goto yy2724;
+ goto yy2628;
}
}
} else {
- if (yych <= 0xC1) {
- if (yych <= '`') {
- if (yych == '_') goto yy790;
- goto yy717;
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych == '`') goto yy2628;
+ goto yy2724;
} else {
- if (yych <= 'z') goto yy790;
- if (yych <= 0x7F) goto yy717;
- goto yy1;
+ if (yych <= 0x7F) goto yy2628;
+ if (yych <= 0xC1) goto yy1682;
}
} else {
- if (yych <= 0xEF) {
- if (yych <= 0xDF) goto yy794;
- if (yych <= 0xE0) goto yy795;
- goto yy796;
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy2729;
+ if (yych <= 0xEF) goto yy2730;
+ goto yy2731;
} else {
- if (yych <= 0xF0) goto yy797;
- if (yych <= 0xF3) goto yy798;
- if (yych <= 0xF4) goto yy799;
- goto yy1;
+ if (yych <= 0xF3) goto yy2732;
+ if (yych <= 0xF4) goto yy2733;
+ goto yy1682;
}
}
}
-yy794:
+yy2728:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy717;
- goto yy1;
-yy795:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2628;
+ goto yy1682;
+yy2729:
yych = *++YYCURSOR;
- if (yych <= 0x9F) goto yy1;
- if (yych <= 0xBF) goto yy794;
- goto yy1;
-yy796:
+ if (yych <= 0x9F) goto yy1682;
+ if (yych <= 0xBF) goto yy2728;
+ goto yy1682;
+yy2730:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy794;
- goto yy1;
-yy797:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2728;
+ goto yy1682;
+yy2731:
yych = *++YYCURSOR;
- if (yych <= 0x8F) goto yy1;
- if (yych <= 0xBF) goto yy796;
- goto yy1;
-yy798:
+ if (yych <= 0x8F) goto yy1682;
+ if (yych <= 0xBF) goto yy2730;
+ goto yy1682;
+yy2732:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy796;
- goto yy1;
-yy799:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2730;
+ goto yy1682;
+yy2733:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0x8F) goto yy796;
- goto yy1;
-yy800:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0x8F) goto yy2730;
+ goto yy1682;
+yy2734:
yych = *++YYCURSOR;
if (yych <= 'Z') {
if (yych <= '-') {
if (yych <= '"') {
- if (yych <= 0x00) goto yy1;
- if (yych <= '!') goto yy800;
- goto yy525;
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= '!') goto yy2734;
+ goto yy2371;
} else {
- if (yych == '\'') goto yy524;
- if (yych <= ',') goto yy800;
- goto yy854;
+ if (yych == '\'') goto yy2370;
+ if (yych <= ',') goto yy2734;
+ goto yy2810;
}
} else {
if (yych <= '=') {
- if (yych <= '.') goto yy800;
- if (yych <= '/') goto yy855;
- if (yych <= ':') goto yy854;
- goto yy800;
+ if (yych <= '.') goto yy2734;
+ if (yych <= '/') goto yy2811;
+ if (yych <= ':') goto yy2810;
+ goto yy2734;
} else {
- if (yych <= '>') goto yy856;
- if (yych <= '?') goto yy855;
- if (yych <= '@') goto yy800;
- goto yy854;
+ if (yych <= '>') goto yy2812;
+ if (yych <= '?') goto yy2811;
+ if (yych <= '@') goto yy2734;
+ goto yy2810;
}
}
} else {
if (yych <= 0x7F) {
if (yych <= '^') {
- if (yych == '\\') goto yy857;
- goto yy800;
+ if (yych == '\\') goto yy2813;
+ goto yy2734;
} else {
- if (yych == '`') goto yy800;
- if (yych <= 'z') goto yy854;
- goto yy800;
+ if (yych == '`') goto yy2734;
+ if (yych <= 'z') goto yy2810;
+ goto yy2734;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy858;
- if (yych <= 0xE0) goto yy859;
- goto yy860;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2814;
+ if (yych <= 0xE0) goto yy2815;
+ goto yy2816;
} else {
- if (yych <= 0xF0) goto yy861;
- if (yych <= 0xF3) goto yy862;
- if (yych <= 0xF4) goto yy863;
- goto yy1;
+ if (yych <= 0xF0) goto yy2817;
+ if (yych <= 0xF3) goto yy2818;
+ if (yych <= 0xF4) goto yy2819;
+ goto yy1682;
}
}
}
-yy801:
+yy2735:
yych = *++YYCURSOR;
if (yych <= 0x1F) {
if (yych <= '\t') {
- if (yych <= 0x08) goto yy1;
- goto yy801;
+ if (yych <= 0x08) goto yy1682;
+ goto yy2735;
} else {
- if (yych == '\r') goto yy801;
- goto yy1;
+ if (yych == '\r') goto yy2735;
+ goto yy1682;
}
} else {
if (yych <= '/') {
- if (yych <= ' ') goto yy801;
- if (yych <= '.') goto yy1;
- goto yy215;
+ if (yych <= ' ') goto yy2735;
+ if (yych <= '.') goto yy1682;
+ goto yy1911;
} else {
- if (yych == '?') goto yy215;
- goto yy1;
+ if (yych == '?') goto yy1911;
+ goto yy1682;
}
}
-yy802:
- yych = *++YYCURSOR;
- if (yych == ':') goto yy864;
- goto yy1;
-yy803:
- yych = *++YYCURSOR;
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy865;
- goto yy1;
-yy804:
+yy2736:
yych = *++YYCURSOR;
- if (yych == 'i') goto yy866;
- goto yy1;
-yy805:
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy749;
- goto yy4;
-yy806:
- yych = *++YYCURSOR;
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy867;
- goto yy1;
-yy807:
- yych = *++YYCURSOR;
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy868;
- goto yy1;
-yy808:
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '9') {
- if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
- } else {
- if (yych <= ',') goto yy4;
- if (yych <= '.') goto yy46;
- if (yych <= '/') goto yy4;
- goto yy869;
- }
- } else {
- if (yych <= '^') {
- if (yych <= '?') goto yy4;
- if (yych <= '@') goto yy96;
- if (yych <= 'Z') goto yy46;
- goto yy4;
- } else {
- if (yych == '`') goto yy4;
- if (yych <= 'z') goto yy46;
- goto yy4;
- }
- }
-yy809:
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy870;
- goto yy4;
-yy810:
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '?') {
- if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
- } else {
- if (yych <= '.') {
- if (yych <= ',') goto yy4;
- goto yy46;
- } else {
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy871;
- goto yy4;
- }
- }
- } else {
- if (yych <= '^') {
- if (yych <= '@') goto yy96;
- if (yych <= 'F') goto yy871;
- if (yych <= 'Z') goto yy46;
- goto yy4;
- } else {
- if (yych <= '`') {
- if (yych <= '_') goto yy46;
- goto yy4;
- } else {
- if (yych <= 'f') goto yy871;
- if (yych <= 'z') goto yy46;
- goto yy4;
- }
- }
- }
-yy811:
- yyaccept = 11;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2820;
+ goto yy1682;
+yy2737:
+ yyaccept = 7;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
- }
- if (yych <= '9') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy109;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy109;
- goto yy4;
+ if (yych <= '^') {
+ if (yych <= '/') {
+ if (yych <= ',') {
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy2575;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1892;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') goto yy109;
- goto yy4;
- } else {
- if (yych <= 0x1B) goto yy109;
- if (yych <= 0x1F) goto yy4;
- goto yy109;
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy2217;
}
+ if (yych <= '.') {
+ yyt2 = YYCURSOR;
+ goto yy2224;
+ }
+ yyt2 = YYCURSOR;
+ goto yy2128;
}
} else {
- if (yych <= ',') {
- if (yych <= '%') {
- if (yych <= '$') goto yy4;
- goto yy105;
- } else {
- if (yych == '+') goto yy80;
- goto yy109;
+ if (yych <= '?') {
+ if (yych <= '9') goto yy2821;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2652;
}
+ yyt2 = YYCURSOR;
+ goto yy1892;
} else {
- if (yych <= '.') {
- if (yych <= '-') goto yy46;
- goto yy266;
- } else {
- if (yych <= '/') goto yy4;
- if (yych <= '7') goto yy872;
- goto yy873;
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
}
+ if (yych <= 'F') goto yy2821;
+ if (yych <= 'Z') goto yy2055;
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
}
} else {
- if (yych <= '_') {
- if (yych <= 'D') {
- if (yych <= ':') goto yy148;
- if (yych <= '?') goto yy109;
- if (yych <= '@') goto yy96;
- goto yy196;
+ if (yych <= 0xC1) {
+ if (yych <= 'f') {
+ if (yych <= '_') {
+ yyt2 = YYCURSOR;
+ goto yy2057;
+ }
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2821;
} else {
- if (yych <= 'F') {
- if (yych <= 'E') goto yy754;
- goto yy196;
- } else {
- if (yych <= 'Z') goto yy115;
- if (yych <= '^') goto yy109;
- goto yy46;
+ if (yych <= 'z') goto yy2055;
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
+ goto yy1650;
}
} else {
- if (yych <= 'z') {
- if (yych <= 'd') {
- if (yych <= '`') goto yy109;
- goto yy196;
- } else {
- if (yych <= 'e') goto yy754;
- if (yych <= 'f') goto yy196;
- goto yy115;
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy1900;
}
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1902;
} else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy109;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy109;
- if (yych <= 0xF4) goto yy4;
- goto yy109;
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy1903;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
}
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1650;
}
}
}
-yy812:
- yyaccept = 6;
+yy2738:
+ yyaccept = 7;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
- }
- if (yych <= '9') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy26;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy26;
- goto yy4;
+ if (yych <= '^') {
+ if (yych <= '/') {
+ if (yych <= ',') {
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy2575;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1892;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') goto yy26;
- goto yy4;
- } else {
- if (yych <= 0x1B) goto yy26;
- if (yych <= 0x1F) goto yy4;
- goto yy26;
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy2217;
+ }
+ if (yych <= '.') {
+ yyt2 = YYCURSOR;
+ goto yy2218;
}
+ yyt2 = YYCURSOR;
+ goto yy2128;
}
} else {
- if (yych <= '+') {
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy105;
- if (yych <= '*') goto yy26;
- goto yy80;
+ if (yych <= '?') {
+ if (yych <= '9') goto yy2821;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2652;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1892;
} else {
- if (yych <= '-') {
- if (yych <= ',') goto yy26;
- goto yy46;
- } else {
- if (yych <= '.') goto yy266;
- if (yych <= '/') goto yy4;
- goto yy873;
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
}
+ if (yych <= 'F') goto yy2821;
+ if (yych <= 'Z') goto yy2055;
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
}
} else {
- if (yych <= '_') {
- if (yych <= 'D') {
- if (yych <= ':') goto yy148;
- if (yych <= '?') goto yy26;
- if (yych <= '@') goto yy96;
- goto yy196;
+ if (yych <= 0xC1) {
+ if (yych <= 'f') {
+ if (yych <= '_') {
+ yyt2 = YYCURSOR;
+ goto yy2057;
+ }
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2821;
} else {
- if (yych <= 'F') {
- if (yych <= 'E') goto yy754;
- goto yy196;
- } else {
- if (yych <= 'Z') goto yy115;
- if (yych <= '^') goto yy26;
- goto yy46;
+ if (yych <= 'z') goto yy2055;
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
+ goto yy1650;
}
} else {
- if (yych <= 'z') {
- if (yych <= 'd') {
- if (yych <= '`') goto yy26;
- goto yy196;
- } else {
- if (yych <= 'e') goto yy754;
- if (yych <= 'f') goto yy196;
- goto yy115;
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy1900;
+ }
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1901;
}
+ yyt2 = YYCURSOR;
+ goto yy1902;
} else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy26;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy26;
- if (yych <= 0xF4) goto yy4;
- goto yy26;
+ if (yych <= 0xF0) {
+ yyt2 = YYCURSOR;
+ goto yy1903;
+ }
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
}
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1650;
}
}
}
-yy813:
- yyaccept = 6;
+yy2739:
+ yych = *++YYCURSOR;
+ if (yych <= '9') {
+ if (yych <= '/') {
+ if (yych == '-') goto yy2065;
+ goto yy1682;
+ } else {
+ if (yych <= '0') goto yy2822;
+ if (yych <= '1') goto yy2823;
+ if (yych <= '2') goto yy2824;
+ goto yy2822;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') goto yy1682;
+ if (yych <= 'Z') goto yy2055;
+ goto yy1682;
+ } else {
+ if (yych == '`') goto yy1682;
+ if (yych <= 'z') goto yy2055;
+ goto yy1682;
+ }
+ }
+yy2740:
+ yyaccept = 7;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '/') {
- if (yych <= 0x1F) {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy26;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy26;
- goto yy4;
- } else {
- if (yych <= '\r') goto yy26;
- if (yych == 0x1B) goto yy26;
- goto yy4;
- }
+ if (yych == '.') goto yy2739;
+ goto yy2056;
+yy2741:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '.') goto yy2739;
+ if (yych <= '/') goto yy2056;
+ if (yych <= '5') goto yy2740;
+ goto yy2056;
+yy2742:
+ yych = *++YYCURSOR;
+ if (yych == ':') goto yy2825;
+ goto yy1682;
+yy2743:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2826;
+ goto yy1682;
+yy2744:
+ yych = *++YYCURSOR;
+ if (yych == 'i') goto yy2827;
+ goto yy1682;
+yy2745:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '/') goto yy1865;
+ if (yych <= '9') goto yy2668;
+ goto yy1865;
+yy2746:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2828;
+ goto yy1682;
+yy2747:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2829;
+ goto yy1682;
+yy2748:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '/') goto yy1746;
+ if (yych <= '9') goto yy2830;
+ goto yy1746;
+yy2749:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '/') goto yy1865;
+ if (yych <= '9') goto yy2831;
+ goto yy1865;
+yy2750:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy1746;
+ if (yych <= '9') goto yy2832;
+ goto yy1746;
+ } else {
+ if (yych <= 'F') goto yy2832;
+ if (yych <= '`') goto yy1746;
+ if (yych <= 'f') goto yy2832;
+ goto yy1746;
+ }
+yy2751:
+ yyaccept = 11;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ if (yych <= '7') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1727;
+ if (yych <= '*') goto yy1733;
+ goto yy1884;
} else {
- if (yych <= '*') {
- if (yych <= '#') goto yy26;
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy80;
- goto yy26;
+ if (yych <= '-') {
+ if (yych <= ',') goto yy1733;
+ goto yy1884;
} else {
- if (yych <= '+') goto yy80;
- if (yych <= ',') goto yy26;
- if (yych <= '.') goto yy46;
- goto yy4;
+ if (yych <= '.') goto yy1985;
+ if (yych <= '/') goto yy1884;
+ goto yy2833;
}
}
} else {
- if (yych <= '_') {
- if (yych <= '@') {
- if (yych <= '9') goto yy874;
- if (yych <= ':') goto yy4;
- if (yych <= '?') goto yy26;
- goto yy96;
- } else {
- if (yych <= 'F') goto yy871;
- if (yych <= 'Z') goto yy46;
- if (yych <= '^') goto yy26;
- goto yy46;
- }
+ if (yych <= 'Z') {
+ if (yych <= '9') goto yy2834;
+ if (yych <= ':') goto yy1884;
+ if (yych <= '?') goto yy1733;
+ goto yy1884;
} else {
- if (yych <= '~') {
- if (yych <= '`') goto yy26;
- if (yych <= 'f') goto yy871;
- if (yych <= 'z') goto yy46;
- goto yy26;
+ if (yych <= '_') {
+ if (yych <= '^') goto yy1733;
+ goto yy1884;
} else {
- if (yych <= 0x7F) goto yy4;
- if (yych <= 0xC1) goto yy26;
- if (yych <= 0xF4) goto yy4;
- goto yy26;
+ if (yych <= '`') goto yy1733;
+ if (yych <= 'z') goto yy1884;
+ goto yy1733;
}
}
}
-yy814:
- yyaccept = 0;
+yy2752:
+ yyaccept = 12;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '?') {
- if (yych <= 0x1F) {
- if (yych <= '\f') {
- if (yych <= 0x00) {
- yyt2 = YYCURSOR;
- goto yy198;
- }
- if (yych <= 0x08) {
- yyt2 = YYCURSOR;
- goto yy284;
- }
- if (yych <= '\n') {
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ if (yych <= '-') {
+ if (yych == '%') goto yy1727;
+ goto yy1884;
+ } else {
+ if (yych <= '.') goto yy1985;
+ if (yych <= '/') goto yy1884;
+ if (yych <= '9') goto yy2834;
+ goto yy1884;
+ }
+yy2753:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '_') {
+ if (yych <= '9') {
+ if (yych <= '%') {
+ if (yych <= '$') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- yyt2 = YYCURSOR;
- goto yy284;
+ yyt1 = YYCURSOR;
+ goto yy2575;
} else {
- if (yych <= '\r') {
+ if (yych <= ',') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych == 0x1B) {
+ if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy2128;
}
- yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1864;
}
} else {
- if (yych <= ',') {
- if (yych <= '#') {
- yyt2 = YYCURSOR;
- goto yy198;
+ if (yych <= '@') {
+ if (yych <= ':') {
+ yyt1 = YYCURSOR;
+ goto yy2577;
}
- if (yych <= '$') {
+ if (yych <= '?') {
yyt2 = YYCURSOR;
- goto yy284;
- }
- if (yych <= '%') {
- yyt1 = YYCURSOR;
- goto yy680;
+ goto yy1892;
}
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy2128;
} else {
- if (yych <= '/') {
+ if (yych <= 'Z') goto yy1864;
+ if (yych <= '^') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1892;
}
- if (yych <= '9') goto yy3;
- if (yych <= ':') goto yy682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy2007;
}
}
} else {
- if (yych <= 0x7F) {
- if (yych <= '_') {
- if (yych <= '@') {
- yyt2 = YYCURSOR;
- goto yy284;
- }
- if (yych <= 'Z') goto yy3;
- if (yych <= '^') {
- yyt2 = YYCURSOR;
- goto yy198;
- }
- yyt2 = YYCURSOR;
- goto yy284;
- } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 'z') goto yy3;
- if (yych <= '~') {
+ goto yy1864;
+ } else {
+ if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
+ if (yych <= 0xC1) goto yy1741;
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1900;
}
} else {
- if (yych <= 0xEF) {
- if (yych <= 0xC1) goto yy5;
- if (yych <= 0xDF) {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy289;
+ goto yy1901;
}
- if (yych <= 0xE0) {
+ if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy290;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy291;
+ goto yy1903;
} else {
- if (yych <= 0xF0) {
- yyt2 = YYCURSOR;
- goto yy292;
- }
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy293;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy294;
+ goto yy1905;
}
- goto yy5;
+ goto yy1741;
}
}
}
-yy815:
+yy2754:
yych = *++YYCURSOR;
if (yych <= 'f') {
if (yych <= ':') {
if (yych <= '%') {
if (yych <= '$') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
yyt1 = YYCURSOR;
- goto yy680;
+ goto yy2575;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '9') goto yy875;
+ if (yych <= '9') goto yy2835;
+ yyt2 = YYCURSOR;
}
} else {
if (yych <= 'F') {
if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy875;
+ goto yy2835;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy875;
+ goto yy2835;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy816:
+yy2755:
yych = *++YYCURSOR;
- if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy876;
- goto yy1;
+ if (yych <= '9') {
+ if (yych == ' ') goto yy1892;
+ if (yych <= '/') goto yy1682;
+ goto yy2836;
} else {
- if (yych <= 'F') goto yy876;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy876;
- goto yy1;
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy1682;
+ goto yy2836;
+ } else {
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2836;
+ goto yy1682;
+ }
}
-yy817:
+yy2756:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy877;
- if (yych <= ':') goto yy691;
- goto yy1;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2837;
+ if (yych <= ':') goto yy2586;
+ goto yy1682;
} else {
- if (yych <= 'F') goto yy877;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy877;
- goto yy1;
+ if (yych <= 'F') goto yy2837;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2837;
+ goto yy1682;
}
-yy818:
+yy2757:
yych = *++YYCURSOR;
- if (yych == ':') goto yy691;
- goto yy1;
-yy819:
+ if (yych == ':') goto yy2586;
+ goto yy1682;
+yy2758:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy878;
- if (yych >= ';') goto yy1;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2838;
+ if (yych >= ';') goto yy1682;
} else {
- if (yych <= 'F') goto yy878;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy878;
- goto yy1;
+ if (yych <= 'F') goto yy2838;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2838;
+ goto yy1682;
}
-yy820:
+yy2759:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy879;
- if (yych <= ':') goto yy880;
- goto yy1;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2839;
+ if (yych <= ':') goto yy2840;
+ goto yy1682;
} else {
- if (yych <= 'F') goto yy879;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy879;
- goto yy1;
+ if (yych <= 'F') goto yy2839;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2839;
+ goto yy1682;
}
-yy821:
+yy2760:
yych = *++YYCURSOR;
if (yych <= 'f') {
if (yych <= ':') {
if (yych <= '.') {
if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- yyt1 = YYCURSOR;
- goto yy297;
+ yyt4 = YYCURSOR;
+ goto yy2420;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '9') goto yy881;
- goto yy882;
+ if (yych <= '9') goto yy2841;
+ yyt2 = YYCURSOR;
+ goto yy2842;
}
} else {
if (yych <= 'F') {
if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy883;
+ goto yy2843;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy883;
+ goto yy2843;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy822:
+yy2761:
yych = *++YYCURSOR;
if (yych <= 'f') {
if (yych <= ':') {
if (yych <= '.') {
if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- yyt1 = YYCURSOR;
- goto yy297;
+ yyt4 = YYCURSOR;
+ goto yy2420;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '9') goto yy884;
- goto yy882;
+ if (yych <= '9') goto yy2844;
+ yyt2 = YYCURSOR;
+ goto yy2842;
}
} else {
if (yych <= 'F') {
if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy883;
+ goto yy2843;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy883;
+ goto yy2843;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy823:
+yy2762:
yych = *++YYCURSOR;
if (yych <= '`') {
if (yych <= '5') {
if (yych <= '.') {
if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- yyt1 = YYCURSOR;
- goto yy297;
+ yyt4 = YYCURSOR;
+ goto yy2420;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '4') goto yy884;
- goto yy885;
+ if (yych <= '4') goto yy2844;
+ goto yy2845;
}
} else {
if (yych <= '@') {
- if (yych <= '9') goto yy881;
- if (yych <= ':') goto yy882;
+ if (yych <= '9') goto yy2841;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2842;
+ }
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 'F') goto yy883;
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'F') goto yy2843;
+ if (yych <= 'Z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
}
} else {
if (yych <= 0xDF) {
if (yych <= 'z') {
- if (yych <= 'f') goto yy883;
- goto yy1;
+ if (yych <= 'f') goto yy2843;
+ goto yy1682;
} else {
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy824:
+yy2763:
yych = *++YYCURSOR;
if (yych <= 'z') {
if (yych <= '@') {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
+ }
+ if (yych <= '9') goto yy2843;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2842;
}
- if (yych <= '9') goto yy883;
- if (yych <= ':') goto yy882;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
if (yych <= 'Z') {
- if (yych <= 'F') goto yy883;
- goto yy1;
+ if (yych <= 'F') goto yy2843;
+ goto yy1682;
} else {
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 'f') goto yy883;
- goto yy1;
+ if (yych <= 'f') goto yy2843;
+ goto yy1682;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy825:
+yy2764:
yych = *++YYCURSOR;
if (yych <= 'z') {
if (yych <= '@') {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
+ }
+ if (yych <= '9') goto yy2846;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2682;
}
- if (yych <= '9') goto yy886;
- if (yych <= ':') goto yy765;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
if (yych <= 'Z') {
- if (yych <= 'F') goto yy886;
- goto yy1;
+ if (yych <= 'F') goto yy2846;
+ goto yy1682;
} else {
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 'f') goto yy886;
- goto yy1;
+ if (yych <= 'f') goto yy2846;
+ goto yy1682;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy826:
+yy2765:
yych = *++YYCURSOR;
if (yych <= 'f') {
if (yych <= ':') {
if (yych <= '.') {
if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- yyt1 = YYCURSOR;
- goto yy297;
+ yyt4 = YYCURSOR;
+ goto yy2420;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '9') goto yy886;
- goto yy765;
+ if (yych <= '9') goto yy2846;
+ yyt2 = YYCURSOR;
+ goto yy2682;
}
} else {
if (yych <= 'F') {
if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy886;
+ goto yy2846;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy886;
+ goto yy2846;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy827:
- yyaccept = 0;
+yy2766:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '?') {
- if (yych <= 0x1B) {
- if (yych <= '\n') {
- if (yych <= 0x00) {
- yyt2 = YYCURSOR;
- goto yy198;
- }
- if (yych <= 0x08) {
+ if (yych <= '`') {
+ if (yych <= '?') {
+ if (yych <= '/') {
+ if (yych <= ',') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1892;
}
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy2128;
} else {
- if (yych == '\r') {
- yyt2 = YYCURSOR;
- goto yy198;
- }
- if (yych <= 0x1A) {
+ if (yych <= '9') goto yy2847;
+ if (yych <= ':') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy2848;
}
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
} else {
- if (yych <= ',') {
- if (yych <= 0x1F) {
- yyt2 = YYCURSOR;
- goto yy284;
- }
- if (yych == '$') {
+ if (yych <= 'Z') {
+ if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy2128;
}
- yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1864;
} else {
- if (yych <= '/') {
+ if (yych == '_') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy2007;
}
- if (yych <= '9') goto yy887;
- if (yych <= ':') goto yy62;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
}
} else {
- if (yych <= 0x7F) {
- if (yych <= '_') {
- if (yych <= '@') {
- yyt2 = YYCURSOR;
- goto yy284;
- }
- if (yych <= 'Z') goto yy3;
- if (yych <= '^') {
- yyt2 = YYCURSOR;
- goto yy198;
- }
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy1864;
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1892;
} else {
- if (yych <= '`') {
- yyt2 = YYCURSOR;
- goto yy198;
- }
- if (yych <= 'z') goto yy3;
- if (yych <= '~') {
+ if (yych <= 0xC1) goto yy1741;
+ if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1901;
}
} else {
- if (yych <= 0xEF) {
- if (yych <= 0xC1) goto yy5;
- if (yych <= 0xDF) {
- yyt2 = YYCURSOR;
- goto yy289;
- }
- if (yych <= 0xE0) {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy290;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy291;
+ goto yy1903;
} else {
- if (yych <= 0xF0) {
- yyt2 = YYCURSOR;
- goto yy292;
- }
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy293;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy294;
+ goto yy1905;
}
- goto yy5;
+ goto yy1741;
}
}
}
-yy828:
- yyaccept = 0;
+yy2767:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '?') {
- if (yych <= 0x1B) {
- if (yych <= '\n') {
- if (yych <= 0x00) {
- yyt2 = YYCURSOR;
- goto yy198;
- }
- if (yych <= 0x08) {
+ if (yych <= '`') {
+ if (yych <= '?') {
+ if (yych <= '/') {
+ if (yych <= ',') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1892;
}
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy2128;
} else {
- if (yych == '\r') {
- yyt2 = YYCURSOR;
- goto yy198;
- }
- if (yych <= 0x1A) {
+ if (yych <= '9') goto yy2766;
+ if (yych <= ':') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy2848;
}
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
} else {
- if (yych <= ',') {
- if (yych <= 0x1F) {
- yyt2 = YYCURSOR;
- goto yy284;
- }
- if (yych == '$') {
+ if (yych <= 'Z') {
+ if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy2128;
}
- yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1864;
} else {
- if (yych <= '/') {
+ if (yych == '_') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy2007;
}
- if (yych <= '9') goto yy827;
- if (yych <= ':') goto yy62;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
}
} else {
- if (yych <= 0x7F) {
- if (yych <= '_') {
- if (yych <= '@') {
- yyt2 = YYCURSOR;
- goto yy284;
- }
- if (yych <= 'Z') goto yy3;
- if (yych <= '^') {
- yyt2 = YYCURSOR;
- goto yy198;
- }
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy1864;
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1892;
} else {
- if (yych <= '`') {
- yyt2 = YYCURSOR;
- goto yy198;
- }
- if (yych <= 'z') goto yy3;
- if (yych <= '~') {
+ if (yych <= 0xC1) goto yy1741;
+ if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1901;
}
} else {
- if (yych <= 0xEF) {
- if (yych <= 0xC1) goto yy5;
- if (yych <= 0xDF) {
- yyt2 = YYCURSOR;
- goto yy289;
- }
- if (yych <= 0xE0) {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy290;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy291;
+ goto yy1903;
} else {
- if (yych <= 0xF0) {
- yyt2 = YYCURSOR;
- goto yy292;
- }
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy293;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy294;
+ goto yy1905;
}
- goto yy5;
+ goto yy1741;
}
}
}
-yy829:
- yyaccept = 0;
+yy2768:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= ':') {
- if (yych <= 0x1F) {
- if (yych <= '\f') {
- if (yych <= 0x00) {
- yyt2 = YYCURSOR;
- goto yy198;
- }
- if (yych <= 0x08) {
- yyt2 = YYCURSOR;
- goto yy284;
- }
- if (yych <= '\n') {
+ if (yych <= '_') {
+ if (yych <= '9') {
+ if (yych <= '/') {
+ if (yych <= ',') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy2128;
} else {
- if (yych <= '\r') {
- yyt2 = YYCURSOR;
- goto yy198;
- }
- if (yych == 0x1B) {
- yyt2 = YYCURSOR;
- goto yy198;
- }
- yyt2 = YYCURSOR;
- goto yy284;
+ if (yych <= '4') goto yy2766;
+ if (yych <= '5') goto yy2849;
+ goto yy2847;
}
} else {
- if (yych <= '/') {
- if (yych == '$') {
+ if (yych <= '@') {
+ if (yych <= ':') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy2848;
}
- if (yych <= ',') {
+ if (yych <= '?') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy2128;
} else {
- if (yych <= '4') goto yy827;
- if (yych <= '5') goto yy888;
- if (yych <= '9') goto yy887;
- goto yy62;
+ if (yych <= 'Z') goto yy1864;
+ if (yych <= '^') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ yyt2 = YYCURSOR;
+ goto yy2007;
}
}
} else {
- if (yych <= '~') {
- if (yych <= '^') {
- if (yych <= '?') {
- yyt2 = YYCURSOR;
- goto yy198;
- }
- if (yych <= '@') {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1892;
}
- if (yych <= 'Z') goto yy3;
- yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1864;
} else {
- if (yych <= '_') {
- yyt2 = YYCURSOR;
- goto yy284;
- }
- if (yych <= '`') {
+ if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 'z') goto yy3;
+ if (yych <= 0xC1) goto yy1741;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1900;
}
} else {
- if (yych <= 0xE0) {
- if (yych <= 0x7F) {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1901;
}
- if (yych <= 0xC1) goto yy5;
- if (yych <= 0xDF) {
+ if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy289;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy290;
+ goto yy1903;
} else {
- if (yych <= 0xF0) {
- if (yych <= 0xEF) {
- yyt2 = YYCURSOR;
- goto yy291;
- }
+ if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy292;
- } else {
- if (yych <= 0xF3) {
- yyt2 = YYCURSOR;
- goto yy293;
- }
- if (yych <= 0xF4) {
- yyt2 = YYCURSOR;
- goto yy294;
- }
- goto yy5;
+ goto yy1904;
}
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1741;
}
}
}
-yy830:
+yy2769:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ switch (yych) {
+ case '%': goto yy1727;
+ case '+':
+ case '-':
+ case '/':
+ case ':':
+ case '@':
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy1884;
+ case '.': goto yy2019;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy2850;
+ case 'B':
+ case 'b': goto yy2692;
+ case 'E':
+ case 'e': goto yy2693;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy1740;
+ case 'S':
+ case 's': goto yy1744;
+ case 'm': goto yy1747;
+ case 'p':
+ case 'u': goto yy1748;
+ default: goto yy1635;
+ }
+yy2770:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ switch (yych) {
+ case '%':
+ case '+':
+ case '-':
+ case '.':
+ case '/':
+ case ':':
+ case '@':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy1746;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy2851;
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'E':
+ case 'F':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'e':
+ case 'f': goto yy2832;
+ case 'B':
+ case 'b': goto yy2852;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy2153;
+ case 'S':
+ case 's': goto yy2154;
+ case 'm': goto yy2155;
+ case 'p':
+ case 'u': goto yy2156;
+ default: goto yy1635;
+ }
+yy2771:
yych = *++YYCURSOR;
if (yych <= 0x7F) {
if (yych <= '@') {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
+ }
+ if (yych <= '9') goto yy1682;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1897;
}
- if (yych <= ':') goto yy1;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
} else {
if (yych <= 0xF0) {
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
}
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
-yy831:
+yy2772:
yych = *++YYCURSOR;
- if (yych <= 0x7F) {
- if (yych <= '@') {
+ if (yych <= 'z') {
+ if (yych <= ':') {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '5') goto yy830;
- if (yych <= ':') goto yy1;
+ if (yych <= '5') goto yy2771;
+ if (yych <= '9') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1897;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 'z') goto yy1;
- yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1682;
}
} else {
- if (yych <= 0xEF) {
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1892;
}
- if (yych <= 0xE0) {
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1901;
} else {
if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy1902;
+ }
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1682;
}
- if (yych <= 0xF3) {
+ }
+ }
+yy2773:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ yyt1 = YYCURSOR;
+ goto yy2020;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= '9') goto yy2853;
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy2854;
}
- if (yych <= 0xF4) {
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2430;
+ } else {
+ if (yych <= 'Z') goto yy1682;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2430;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy1682;
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ } else {
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy1900;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy1902;
+ }
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1903;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1682;
}
- goto yy1;
}
}
-yy832:
+yy2774:
yych = *++YYCURSOR;
if (yych <= 'f') {
if (yych <= ':') {
if (yych <= '.') {
if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
yyt1 = YYCURSOR;
- goto yy297;
+ goto yy2020;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '9') goto yy564;
- goto yy889;
+ if (yych <= '9') goto yy2855;
+ yyt2 = YYCURSOR;
+ goto yy2431;
}
} else {
if (yych <= 'F') {
if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy566;
+ goto yy2430;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy566;
+ goto yy2430;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy833:
+yy2775:
+ yych = *++YYCURSOR;
+ if (yych <= '`') {
+ if (yych <= '5') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ yyt1 = YYCURSOR;
+ goto yy2020;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= '4') goto yy2855;
+ goto yy2856;
+ }
+ } else {
+ if (yych <= '@') {
+ if (yych <= '9') goto yy2853;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2431;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ } else {
+ if (yych <= 'F') goto yy2430;
+ if (yych <= 'Z') goto yy1682;
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= 'f') goto yy2430;
+ goto yy1682;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= 0xC1) goto yy1682;
+ yyt2 = YYCURSOR;
+ goto yy1900;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy1902;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1903;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1682;
+ }
+ }
+ }
+yy2776:
yych = *++YYCURSOR;
if (yych <= 'f') {
if (yych <= ':') {
if (yych <= '.') {
if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
yyt1 = YYCURSOR;
- goto yy297;
+ goto yy2020;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '9') goto yy704;
- goto yy486;
+ if (yych <= '9') goto yy2853;
+ yyt2 = YYCURSOR;
+ goto yy2431;
}
} else {
if (yych <= 'F') {
if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy704;
+ goto yy2430;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy704;
+ goto yy2430;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy834:
+yy2777:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ yyt1 = YYCURSOR;
+ goto yy2020;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= '9') goto yy2603;
+ yyt2 = YYCURSOR;
+ goto yy2300;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2603;
+ } else {
+ if (yych <= 'Z') goto yy1682;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2603;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy1682;
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ } else {
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy1900;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy1902;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1903;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1682;
+ }
+ }
+ }
+yy2778:
+ yyaccept = 37;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[0+yych] & 32) {
+ goto yy2703;
+ }
+ if (yych <= 0xC1) {
+ if (yych <= '\'') {
+ if (yych <= 0x00) goto yy2448;
+ if (yych <= '"') goto yy2704;
+ goto yy2705;
+ } else {
+ if (yych <= '*') goto yy2706;
+ if (yych <= '-') goto yy2707;
+ if (yych <= '\\') goto yy2708;
+ goto yy2448;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy2709;
+ if (yych <= 0xE0) goto yy2710;
+ goto yy2711;
+ } else {
+ if (yych <= 0xF0) goto yy2712;
+ if (yych <= 0xF3) goto yy2713;
+ if (yych <= 0xF4) goto yy2714;
+ goto yy2448;
+ }
+ }
+yy2779:
+ yych = *++YYCURSOR;
+ if (yych <= ',') {
+ if (yych <= ' ') {
+ if (yych <= '\t') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= 0x08) goto yy2316;
+ goto yy2779;
+ } else {
+ if (yych == '\r') goto yy2779;
+ if (yych <= 0x1F) goto yy2316;
+ goto yy2779;
+ }
+ } else {
+ if (yych <= '&') {
+ if (yych != '"') goto yy2316;
+ } else {
+ if (yych <= '\'') goto yy2781;
+ if (yych == '*') goto yy2175;
+ goto yy2316;
+ }
+ }
+ } else {
+ if (yych <= 0xC1) {
+ if (yych <= '>') {
+ if (yych <= '-') goto yy2317;
+ if (yych <= '=') goto yy2316;
+ goto yy2459;
+ } else {
+ if (yych == '\\') goto yy2318;
+ if (yych <= 0x7F) goto yy2316;
+ goto yy1682;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy2319;
+ if (yych <= 0xE0) goto yy2320;
+ goto yy2321;
+ } else {
+ if (yych <= 0xF0) goto yy2322;
+ if (yych <= 0xF3) goto yy2323;
+ if (yych <= 0xF4) goto yy2324;
+ goto yy1682;
+ }
+ }
+ }
+yy2780:
+ yych = *++YYCURSOR;
+ if (yybm_init[0+yych] & 32) {
+ goto yy2703;
+ }
+ if (yych <= 0xC1) {
+ if (yych <= '\'') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= '"') goto yy2316;
+ goto yy2705;
+ } else {
+ if (yych <= '*') goto yy2706;
+ if (yych <= '-') goto yy2707;
+ if (yych <= '\\') goto yy2708;
+ goto yy1682;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy2709;
+ if (yych <= 0xE0) goto yy2710;
+ goto yy2711;
+ } else {
+ if (yych <= 0xF0) goto yy2712;
+ if (yych <= 0xF3) goto yy2713;
+ if (yych <= 0xF4) goto yy2714;
+ goto yy1682;
+ }
+ }
+yy2781:
+ yych = *++YYCURSOR;
+ if (yych <= '=') {
+ if (yych <= '"') {
+ if (yych <= '\f') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '\t') goto yy2779;
+ goto yy2316;
+ } else {
+ if (yych <= 0x1F) {
+ if (yych <= '\r') goto yy2779;
+ goto yy2316;
+ } else {
+ if (yych <= ' ') goto yy2779;
+ if (yych <= '!') goto yy2316;
+ goto yy2780;
+ }
+ }
+ } else {
+ if (yych <= '*') {
+ if (yych == '\'') goto yy2187;
+ if (yych <= ')') goto yy2316;
+ goto yy2175;
+ } else {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy2316;
+ } else {
+ if (yych <= '/') goto yy2316;
+ if (yych <= ':') goto yy2783;
+ goto yy2316;
+ }
+ }
+ }
+ } else {
+ if (yych <= 'z') {
+ if (yych <= '[') {
+ if (yych <= '>') goto yy2459;
+ if (yych <= '@') goto yy2316;
+ if (yych <= 'Z') goto yy2783;
+ goto yy2316;
+ } else {
+ if (yych <= '^') {
+ if (yych <= '\\') goto yy2318;
+ goto yy2316;
+ } else {
+ if (yych == '`') goto yy2316;
+ goto yy2783;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy2316;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2319;
+ goto yy2320;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy2321;
+ goto yy2322;
+ } else {
+ if (yych <= 0xF3) goto yy2323;
+ if (yych <= 0xF4) goto yy2324;
+ goto yy1682;
+ }
+ }
+ }
+ }
+yy2782:
+ yych = *++YYCURSOR;
+ if (yych <= '=') {
+ if (yych <= '!') {
+ if (yych <= '\f') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '\t') goto yy2857;
+ goto yy2316;
+ } else {
+ if (yych <= '\r') goto yy2857;
+ if (yych == ' ') goto yy2857;
+ goto yy2316;
+ }
+ } else {
+ if (yych <= ',') {
+ if (yych <= '"') goto yy2780;
+ if (yych == '\'') goto yy2781;
+ goto yy2316;
+ } else {
+ if (yych <= '/') {
+ if (yych <= '-') goto yy2858;
+ goto yy2316;
+ } else {
+ if (yych <= ':') goto yy2783;
+ if (yych <= '<') goto yy2316;
+ goto yy2859;
+ }
+ }
+ }
+ } else {
+ if (yych <= 'z') {
+ if (yych <= '[') {
+ if (yych <= '>') goto yy2459;
+ if (yych <= '@') goto yy2316;
+ if (yych >= '[') goto yy2316;
+ } else {
+ if (yych <= '^') {
+ if (yych <= '\\') goto yy2318;
+ goto yy2316;
+ } else {
+ if (yych == '`') goto yy2316;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy2316;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2319;
+ goto yy2320;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy2321;
+ goto yy2322;
+ } else {
+ if (yych <= 0xF3) goto yy2323;
+ if (yych <= 0xF4) goto yy2324;
+ goto yy1682;
+ }
+ }
+ }
+ }
+yy2783:
+ yych = *++YYCURSOR;
+ if (yych <= '<') {
+ if (yych <= '"') {
+ if (yych <= '\f') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '\t') goto yy2857;
+ goto yy2316;
+ } else {
+ if (yych <= 0x1F) {
+ if (yych <= '\r') goto yy2857;
+ goto yy2316;
+ } else {
+ if (yych <= ' ') goto yy2857;
+ if (yych <= '!') goto yy2316;
+ goto yy2780;
+ }
+ }
+ } else {
+ if (yych <= '*') {
+ if (yych == '\'') goto yy2781;
+ if (yych <= ')') goto yy2316;
+ goto yy2175;
+ } else {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy2316;
+ goto yy2782;
+ } else {
+ if (yych <= '/') goto yy2316;
+ if (yych <= ':') goto yy2783;
+ goto yy2316;
+ }
+ }
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych <= 'Z') {
+ if (yych <= '=') goto yy2859;
+ if (yych <= '>') goto yy2459;
+ if (yych <= '@') goto yy2316;
+ goto yy2783;
+ } else {
+ if (yych <= '\\') {
+ if (yych <= '[') goto yy2316;
+ goto yy2318;
+ } else {
+ if (yych == '_') goto yy2783;
+ goto yy2316;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy2783;
+ goto yy2316;
+ } else {
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2319;
+ goto yy2320;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy2321;
+ goto yy2322;
+ } else {
+ if (yych <= 0xF3) goto yy2323;
+ if (yych <= 0xF4) goto yy2324;
+ goto yy1682;
+ }
+ }
+ }
+ }
+yy2784:
+ yych = *++YYCURSOR;
+ if (yych <= ',') {
+ if (yych <= ' ') {
+ if (yych <= '\t') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= 0x08) goto yy2307;
+ goto yy2784;
+ } else {
+ if (yych == '\r') goto yy2784;
+ if (yych <= 0x1F) goto yy2307;
+ goto yy2784;
+ }
+ } else {
+ if (yych <= '&') {
+ if (yych != '"') goto yy2307;
+ } else {
+ if (yych <= '\'') goto yy2786;
+ if (yych == '*') goto yy2167;
+ goto yy2307;
+ }
+ }
+ } else {
+ if (yych <= 0xC1) {
+ if (yych <= '>') {
+ if (yych <= '-') goto yy2308;
+ if (yych <= '=') goto yy2307;
+ goto yy2451;
+ } else {
+ if (yych == '\\') goto yy2309;
+ if (yych <= 0x7F) goto yy2307;
+ goto yy1682;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy2310;
+ if (yych <= 0xE0) goto yy2311;
+ goto yy2312;
+ } else {
+ if (yych <= 0xF0) goto yy2313;
+ if (yych <= 0xF3) goto yy2314;
+ if (yych <= 0xF4) goto yy2315;
+ goto yy1682;
+ }
+ }
+ }
+yy2785:
+ yych = *++YYCURSOR;
+ if (yych <= '=') {
+ if (yych <= '"') {
+ if (yych <= '\f') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '\t') goto yy2784;
+ goto yy2307;
+ } else {
+ if (yych <= 0x1F) {
+ if (yych <= '\r') goto yy2784;
+ goto yy2307;
+ } else {
+ if (yych <= ' ') goto yy2784;
+ if (yych <= '!') goto yy2307;
+ goto yy2186;
+ }
+ }
+ } else {
+ if (yych <= '*') {
+ if (yych == '\'') goto yy2786;
+ if (yych <= ')') goto yy2307;
+ goto yy2167;
+ } else {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy2307;
+ goto yy2787;
+ } else {
+ if (yych <= '/') goto yy2307;
+ if (yych <= ':') goto yy2788;
+ goto yy2307;
+ }
+ }
+ }
+ } else {
+ if (yych <= 'z') {
+ if (yych <= '[') {
+ if (yych <= '>') goto yy2451;
+ if (yych <= '@') goto yy2307;
+ if (yych <= 'Z') goto yy2788;
+ goto yy2307;
+ } else {
+ if (yych <= '^') {
+ if (yych <= '\\') goto yy2309;
+ goto yy2307;
+ } else {
+ if (yych == '`') goto yy2307;
+ goto yy2788;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy2307;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2310;
+ goto yy2311;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy2312;
+ goto yy2313;
+ } else {
+ if (yych <= 0xF3) goto yy2314;
+ if (yych <= 0xF4) goto yy2315;
+ goto yy1682;
+ }
+ }
+ }
+ }
+yy2786:
+ yych = *++YYCURSOR;
+ if (yybm_init[0+yych] & 32) {
+ goto yy2703;
+ }
+ if (yych <= 0xC1) {
+ if (yych <= '\'') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= '"') goto yy2704;
+ goto yy2307;
+ } else {
+ if (yych <= '*') goto yy2706;
+ if (yych <= '-') goto yy2707;
+ if (yych <= '\\') goto yy2708;
+ goto yy1682;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy2709;
+ if (yych <= 0xE0) goto yy2710;
+ goto yy2711;
+ } else {
+ if (yych <= 0xF0) goto yy2712;
+ if (yych <= 0xF3) goto yy2713;
+ if (yych <= 0xF4) goto yy2714;
+ goto yy1682;
+ }
+ }
+yy2787:
+ yych = *++YYCURSOR;
+ if (yych <= '=') {
+ if (yych <= '!') {
+ if (yych <= '\f') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '\t') goto yy2860;
+ goto yy2307;
+ } else {
+ if (yych <= '\r') goto yy2860;
+ if (yych == ' ') goto yy2860;
+ goto yy2307;
+ }
+ } else {
+ if (yych <= ',') {
+ if (yych <= '"') goto yy2785;
+ if (yych == '\'') goto yy2786;
+ goto yy2307;
+ } else {
+ if (yych <= '/') {
+ if (yych <= '-') goto yy2861;
+ goto yy2307;
+ } else {
+ if (yych <= ':') goto yy2788;
+ if (yych <= '<') goto yy2307;
+ goto yy2862;
+ }
+ }
+ }
+ } else {
+ if (yych <= 'z') {
+ if (yych <= '[') {
+ if (yych <= '>') goto yy2451;
+ if (yych <= '@') goto yy2307;
+ if (yych >= '[') goto yy2307;
+ } else {
+ if (yych <= '^') {
+ if (yych <= '\\') goto yy2309;
+ goto yy2307;
+ } else {
+ if (yych == '`') goto yy2307;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy2307;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2310;
+ goto yy2311;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy2312;
+ goto yy2313;
+ } else {
+ if (yych <= 0xF3) goto yy2314;
+ if (yych <= 0xF4) goto yy2315;
+ goto yy1682;
+ }
+ }
+ }
+ }
+yy2788:
+ yych = *++YYCURSOR;
+ if (yych <= '<') {
+ if (yych <= '"') {
+ if (yych <= '\f') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '\t') goto yy2860;
+ goto yy2307;
+ } else {
+ if (yych <= 0x1F) {
+ if (yych <= '\r') goto yy2860;
+ goto yy2307;
+ } else {
+ if (yych <= ' ') goto yy2860;
+ if (yych <= '!') goto yy2307;
+ goto yy2785;
+ }
+ }
+ } else {
+ if (yych <= '*') {
+ if (yych == '\'') goto yy2786;
+ if (yych <= ')') goto yy2307;
+ goto yy2167;
+ } else {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy2307;
+ goto yy2787;
+ } else {
+ if (yych <= '/') goto yy2307;
+ if (yych <= ':') goto yy2788;
+ goto yy2307;
+ }
+ }
+ }
+ } else {
+ if (yych <= '`') {
+ if (yych <= 'Z') {
+ if (yych <= '=') goto yy2862;
+ if (yych <= '>') goto yy2451;
+ if (yych <= '@') goto yy2307;
+ goto yy2788;
+ } else {
+ if (yych <= '\\') {
+ if (yych <= '[') goto yy2307;
+ goto yy2309;
+ } else {
+ if (yych == '_') goto yy2788;
+ goto yy2307;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy2788;
+ goto yy2307;
+ } else {
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2310;
+ goto yy2311;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy2312;
+ goto yy2313;
+ } else {
+ if (yych <= 0xF3) goto yy2314;
+ if (yych <= 0xF4) goto yy2315;
+ goto yy1682;
+ }
+ }
+ }
+ }
+yy2789:
+ yych = *++YYCURSOR;
+ if (yych <= '[') {
+ if (yych <= '\'') {
+ if (yych <= '!') {
+ if (yych <= 0x00) goto yy1682;
+ goto yy2703;
+ } else {
+ if (yych <= '"') goto yy2704;
+ if (yych <= '&') goto yy2703;
+ goto yy2705;
+ }
+ } else {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy2703;
+ goto yy2789;
+ } else {
+ if (yych == '>') goto yy2778;
+ goto yy2703;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= '\\') goto yy2708;
+ goto yy2703;
+ } else {
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2709;
+ goto yy2710;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy2711;
+ goto yy2712;
+ } else {
+ if (yych <= 0xF3) goto yy2713;
+ if (yych <= 0xF4) goto yy2714;
+ goto yy1682;
+ }
+ }
+ }
+yy2790:
yych = *++YYCURSOR;
if (yych <= '=') {
if (yych <= 0x1F) {
if (yych <= '\t') {
- if (yych <= 0x00) goto yy1;
- if (yych <= 0x08) goto yy399;
- goto yy834;
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= 0x08) goto yy2175;
+ goto yy2790;
} else {
- if (yych == '\r') goto yy834;
- goto yy399;
+ if (yych == '\r') goto yy2790;
+ goto yy2175;
}
} else {
if (yych <= '"') {
- if (yych <= ' ') goto yy834;
- if (yych <= '!') goto yy399;
+ if (yych <= ' ') goto yy2790;
+ if (yych <= '!') goto yy2175;
} else {
- if (yych == '\'') goto yy836;
- goto yy399;
+ if (yych == '\'') goto yy2792;
+ goto yy2175;
}
}
} else {
if (yych <= 0xDF) {
if (yych <= '\\') {
- if (yych <= '>') goto yy588;
- if (yych <= '[') goto yy399;
- goto yy400;
+ if (yych <= '>') goto yy2475;
+ if (yych <= '[') goto yy2175;
+ goto yy2176;
} else {
- if (yych <= 0x7F) goto yy399;
- if (yych <= 0xC1) goto yy1;
- goto yy401;
+ if (yych <= 0x7F) goto yy2175;
+ if (yych <= 0xC1) goto yy1682;
+ goto yy2177;
}
} else {
if (yych <= 0xF0) {
- if (yych <= 0xE0) goto yy402;
- if (yych <= 0xEF) goto yy403;
- goto yy404;
+ if (yych <= 0xE0) goto yy2178;
+ if (yych <= 0xEF) goto yy2179;
+ goto yy2180;
} else {
- if (yych <= 0xF3) goto yy405;
- if (yych <= 0xF4) goto yy406;
- goto yy1;
+ if (yych <= 0xF3) goto yy2181;
+ if (yych <= 0xF4) goto yy2182;
+ goto yy1682;
}
}
}
-yy835:
+yy2791:
yych = *++YYCURSOR;
- if (yybm[0+yych] & 128) {
- goto yy780;
+ if (yybm_init[0+yych] & 64) {
+ goto yy2706;
}
if (yych <= 0xDF) {
if (yych <= '\'') {
- if (yych <= 0x00) goto yy1;
- if (yych <= '"') goto yy399;
- goto yy782;
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= '"') goto yy2175;
+ goto yy2716;
} else {
- if (yych <= '\\') goto yy783;
- if (yych <= 0xC1) goto yy1;
- goto yy784;
+ if (yych <= '\\') goto yy2717;
+ if (yych <= 0xC1) goto yy1682;
+ goto yy2718;
}
} else {
if (yych <= 0xF0) {
- if (yych <= 0xE0) goto yy785;
- if (yych <= 0xEF) goto yy786;
- goto yy787;
+ if (yych <= 0xE0) goto yy2719;
+ if (yych <= 0xEF) goto yy2720;
+ goto yy2721;
} else {
- if (yych <= 0xF3) goto yy788;
- if (yych <= 0xF4) goto yy789;
- goto yy1;
+ if (yych <= 0xF3) goto yy2722;
+ if (yych <= 0xF4) goto yy2723;
+ goto yy1682;
}
}
-yy836:
+yy2792:
yych = *++YYCURSOR;
if (yych <= '>') {
if (yych <= '!') {
if (yych <= '\f') {
- if (yych <= 0x00) goto yy1;
- if (yych == '\t') goto yy834;
- goto yy399;
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '\t') goto yy2790;
+ goto yy2175;
} else {
- if (yych <= '\r') goto yy834;
- if (yych == ' ') goto yy834;
- goto yy399;
+ if (yych <= '\r') goto yy2790;
+ if (yych == ' ') goto yy2790;
+ goto yy2175;
}
} else {
if (yych <= ',') {
- if (yych <= '"') goto yy835;
- if (yych == '\'') goto yy307;
- goto yy399;
+ if (yych <= '"') goto yy2791;
+ if (yych == '\'') goto yy2030;
+ goto yy2175;
} else {
if (yych <= '/') {
- if (yych >= '.') goto yy399;
+ if (yych >= '.') goto yy2175;
} else {
- if (yych <= ':') goto yy837;
- if (yych <= '=') goto yy399;
- goto yy588;
+ if (yych <= ':') goto yy2793;
+ if (yych <= '=') goto yy2175;
+ goto yy2475;
}
}
}
} else {
if (yych <= 'z') {
if (yych <= '\\') {
- if (yych <= '@') goto yy399;
- if (yych <= 'Z') goto yy837;
- if (yych <= '[') goto yy399;
- goto yy400;
+ if (yych <= '@') goto yy2175;
+ if (yych <= 'Z') goto yy2793;
+ if (yych <= '[') goto yy2175;
+ goto yy2176;
} else {
- if (yych == '_') goto yy837;
- if (yych <= '`') goto yy399;
+ if (yych == '_') goto yy2793;
+ if (yych <= '`') goto yy2175;
}
} else {
if (yych <= 0xE0) {
- if (yych <= 0x7F) goto yy399;
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy401;
- goto yy402;
+ if (yych <= 0x7F) goto yy2175;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2177;
+ goto yy2178;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy403;
- goto yy404;
+ if (yych <= 0xEF) goto yy2179;
+ goto yy2180;
} else {
- if (yych <= 0xF3) goto yy405;
- if (yych <= 0xF4) goto yy406;
- goto yy1;
+ if (yych <= 0xF3) goto yy2181;
+ if (yych <= 0xF4) goto yy2182;
+ goto yy1682;
}
}
}
}
-yy837:
+yy2793:
yych = *++YYCURSOR;
if (yych <= '=') {
if (yych <= '!') {
if (yych <= '\f') {
- if (yych <= 0x00) goto yy1;
- if (yych == '\t') goto yy890;
- goto yy399;
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '\t') goto yy2863;
+ goto yy2175;
} else {
- if (yych <= '\r') goto yy890;
- if (yych == ' ') goto yy890;
- goto yy399;
+ if (yych <= '\r') goto yy2863;
+ if (yych == ' ') goto yy2863;
+ goto yy2175;
}
} else {
if (yych <= ',') {
- if (yych <= '"') goto yy835;
- if (yych == '\'') goto yy836;
- goto yy399;
+ if (yych <= '"') goto yy2791;
+ if (yych == '\'') goto yy2792;
+ goto yy2175;
} else {
if (yych <= '/') {
- if (yych <= '-') goto yy837;
- goto yy399;
+ if (yych <= '-') goto yy2793;
+ goto yy2175;
} else {
- if (yych <= ':') goto yy837;
- if (yych <= '<') goto yy399;
- goto yy891;
+ if (yych <= ':') goto yy2793;
+ if (yych <= '<') goto yy2175;
+ goto yy2864;
}
}
}
} else {
if (yych <= 'z') {
if (yych <= '[') {
- if (yych <= '>') goto yy588;
- if (yych <= '@') goto yy399;
- if (yych <= 'Z') goto yy837;
- goto yy399;
+ if (yych <= '>') goto yy2475;
+ if (yych <= '@') goto yy2175;
+ if (yych <= 'Z') goto yy2793;
+ goto yy2175;
} else {
if (yych <= '^') {
- if (yych <= '\\') goto yy400;
- goto yy399;
+ if (yych <= '\\') goto yy2176;
+ goto yy2175;
} else {
- if (yych == '`') goto yy399;
- goto yy837;
+ if (yych == '`') goto yy2175;
+ goto yy2793;
}
}
} else {
if (yych <= 0xE0) {
- if (yych <= 0x7F) goto yy399;
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy401;
- goto yy402;
+ if (yych <= 0x7F) goto yy2175;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2177;
+ goto yy2178;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy403;
- goto yy404;
+ if (yych <= 0xEF) goto yy2179;
+ goto yy2180;
} else {
- if (yych <= 0xF3) goto yy405;
- if (yych <= 0xF4) goto yy406;
- goto yy1;
+ if (yych <= 0xF3) goto yy2181;
+ if (yych <= 0xF4) goto yy2182;
+ goto yy1682;
}
}
}
}
-yy838:
+yy2794:
yych = *++YYCURSOR;
if (yych <= '=') {
if (yych <= 0x1F) {
if (yych <= '\t') {
- if (yych <= 0x00) goto yy1;
- if (yych <= 0x08) goto yy391;
- goto yy838;
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= 0x08) goto yy2167;
+ goto yy2794;
} else {
- if (yych == '\r') goto yy838;
- goto yy391;
+ if (yych == '\r') goto yy2794;
+ goto yy2167;
}
} else {
if (yych <= '"') {
- if (yych <= ' ') goto yy838;
- if (yych <= '!') goto yy391;
+ if (yych <= ' ') goto yy2794;
+ if (yych <= '!') goto yy2167;
} else {
- if (yych == '\'') goto yy840;
- goto yy391;
+ if (yych == '\'') goto yy2796;
+ goto yy2167;
}
}
} else {
if (yych <= 0xDF) {
if (yych <= '\\') {
- if (yych <= '>') goto yy580;
- if (yych <= '[') goto yy391;
- goto yy392;
+ if (yych <= '>') goto yy2468;
+ if (yych <= '[') goto yy2167;
+ goto yy2168;
} else {
- if (yych <= 0x7F) goto yy391;
- if (yych <= 0xC1) goto yy1;
- goto yy393;
+ if (yych <= 0x7F) goto yy2167;
+ if (yych <= 0xC1) goto yy1682;
+ goto yy2169;
}
} else {
if (yych <= 0xF0) {
- if (yych <= 0xE0) goto yy394;
- if (yych <= 0xEF) goto yy395;
- goto yy396;
+ if (yych <= 0xE0) goto yy2170;
+ if (yych <= 0xEF) goto yy2171;
+ goto yy2172;
} else {
- if (yych <= 0xF3) goto yy397;
- if (yych <= 0xF4) goto yy398;
- goto yy1;
+ if (yych <= 0xF3) goto yy2173;
+ if (yych <= 0xF4) goto yy2174;
+ goto yy1682;
}
}
}
-yy839:
+yy2795:
yych = *++YYCURSOR;
if (yych <= '>') {
if (yych <= '!') {
if (yych <= '\f') {
- if (yych <= 0x00) goto yy1;
- if (yych == '\t') goto yy838;
- goto yy391;
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '\t') goto yy2794;
+ goto yy2167;
} else {
- if (yych <= '\r') goto yy838;
- if (yych == ' ') goto yy838;
- goto yy391;
+ if (yych <= '\r') goto yy2794;
+ if (yych == ' ') goto yy2794;
+ goto yy2167;
}
} else {
if (yych <= ',') {
- if (yych <= '"') goto yy306;
- if (yych != '\'') goto yy391;
+ if (yych <= '"') goto yy2029;
+ if (yych != '\'') goto yy2167;
} else {
if (yych <= '/') {
- if (yych <= '-') goto yy841;
- goto yy391;
+ if (yych <= '-') goto yy2797;
+ goto yy2167;
} else {
- if (yych <= ':') goto yy841;
- if (yych <= '=') goto yy391;
- goto yy580;
+ if (yych <= ':') goto yy2797;
+ if (yych <= '=') goto yy2167;
+ goto yy2468;
}
}
}
} else {
if (yych <= 'z') {
if (yych <= '\\') {
- if (yych <= '@') goto yy391;
- if (yych <= 'Z') goto yy841;
- if (yych <= '[') goto yy391;
- goto yy392;
+ if (yych <= '@') goto yy2167;
+ if (yych <= 'Z') goto yy2797;
+ if (yych <= '[') goto yy2167;
+ goto yy2168;
} else {
- if (yych == '_') goto yy841;
- if (yych <= '`') goto yy391;
- goto yy841;
+ if (yych == '_') goto yy2797;
+ if (yych <= '`') goto yy2167;
+ goto yy2797;
}
} else {
if (yych <= 0xE0) {
- if (yych <= 0x7F) goto yy391;
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy393;
- goto yy394;
+ if (yych <= 0x7F) goto yy2167;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2169;
+ goto yy2170;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy395;
- goto yy396;
+ if (yych <= 0xEF) goto yy2171;
+ goto yy2172;
} else {
- if (yych <= 0xF3) goto yy397;
- if (yych <= 0xF4) goto yy398;
- goto yy1;
+ if (yych <= 0xF3) goto yy2173;
+ if (yych <= 0xF4) goto yy2174;
+ goto yy1682;
}
}
}
}
-yy840:
+yy2796:
yych = *++YYCURSOR;
- if (yybm[0+yych] & 128) {
- goto yy780;
+ if (yybm_init[0+yych] & 64) {
+ goto yy2706;
}
if (yych <= 0xDF) {
if (yych <= '\'') {
- if (yych <= 0x00) goto yy1;
- if (yych <= '"') goto yy781;
- goto yy391;
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= '"') goto yy2715;
+ goto yy2167;
} else {
- if (yych <= '\\') goto yy783;
- if (yych <= 0xC1) goto yy1;
- goto yy784;
+ if (yych <= '\\') goto yy2717;
+ if (yych <= 0xC1) goto yy1682;
+ goto yy2718;
}
} else {
if (yych <= 0xF0) {
- if (yych <= 0xE0) goto yy785;
- if (yych <= 0xEF) goto yy786;
- goto yy787;
+ if (yych <= 0xE0) goto yy2719;
+ if (yych <= 0xEF) goto yy2720;
+ goto yy2721;
} else {
- if (yych <= 0xF3) goto yy788;
- if (yych <= 0xF4) goto yy789;
- goto yy1;
+ if (yych <= 0xF3) goto yy2722;
+ if (yych <= 0xF4) goto yy2723;
+ goto yy1682;
}
}
-yy841:
+yy2797:
yych = *++YYCURSOR;
if (yych <= '=') {
if (yych <= '!') {
if (yych <= '\f') {
- if (yych <= 0x00) goto yy1;
- if (yych == '\t') goto yy892;
- goto yy391;
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '\t') goto yy2865;
+ goto yy2167;
} else {
- if (yych <= '\r') goto yy892;
- if (yych == ' ') goto yy892;
- goto yy391;
+ if (yych <= '\r') goto yy2865;
+ if (yych == ' ') goto yy2865;
+ goto yy2167;
}
} else {
if (yych <= ',') {
- if (yych <= '"') goto yy839;
- if (yych == '\'') goto yy840;
- goto yy391;
+ if (yych <= '"') goto yy2795;
+ if (yych == '\'') goto yy2796;
+ goto yy2167;
} else {
if (yych <= '/') {
- if (yych <= '-') goto yy841;
- goto yy391;
+ if (yych <= '-') goto yy2797;
+ goto yy2167;
} else {
- if (yych <= ':') goto yy841;
- if (yych <= '<') goto yy391;
- goto yy893;
+ if (yych <= ':') goto yy2797;
+ if (yych <= '<') goto yy2167;
+ goto yy2866;
}
}
}
} else {
if (yych <= 'z') {
if (yych <= '[') {
- if (yych <= '>') goto yy580;
- if (yych <= '@') goto yy391;
- if (yych <= 'Z') goto yy841;
- goto yy391;
+ if (yych <= '>') goto yy2468;
+ if (yych <= '@') goto yy2167;
+ if (yych <= 'Z') goto yy2797;
+ goto yy2167;
} else {
if (yych <= '^') {
- if (yych <= '\\') goto yy392;
- goto yy391;
+ if (yych <= '\\') goto yy2168;
+ goto yy2167;
} else {
- if (yych == '`') goto yy391;
- goto yy841;
+ if (yych == '`') goto yy2167;
+ goto yy2797;
}
}
} else {
if (yych <= 0xE0) {
- if (yych <= 0x7F) goto yy391;
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy393;
- goto yy394;
+ if (yych <= 0x7F) goto yy2167;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2169;
+ goto yy2170;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy395;
- goto yy396;
+ if (yych <= 0xEF) goto yy2171;
+ goto yy2172;
} else {
- if (yych <= 0xF3) goto yy397;
- if (yych <= 0xF4) goto yy398;
- goto yy1;
+ if (yych <= 0xF3) goto yy2173;
+ if (yych <= 0xF4) goto yy2174;
+ goto yy1682;
}
}
}
}
-yy842:
+yy2798:
yych = *++YYCURSOR;
if (yych <= '@') {
if (yych <= ',') {
if (yych <= '\f') {
- if (yych <= 0x00) goto yy1;
- if (yych == '\t') goto yy842;
- goto yy717;
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '\t') goto yy2798;
+ goto yy2628;
} else {
- if (yych <= '\r') goto yy842;
- if (yych == ' ') goto yy842;
- goto yy717;
+ if (yych <= '\r') goto yy2798;
+ if (yych == ' ') goto yy2798;
+ goto yy2628;
}
} else {
if (yych <= ':') {
- if (yych <= '-') goto yy790;
- if (yych <= '.') goto yy717;
- if (yych <= '/') goto yy791;
- goto yy790;
+ if (yych <= '-') goto yy2724;
+ if (yych <= '.') goto yy2628;
+ if (yych <= '/') goto yy2725;
+ goto yy2724;
} else {
- if (yych <= '=') goto yy717;
- if (yych <= '>') goto yy792;
- if (yych <= '?') goto yy791;
- goto yy717;
+ if (yych <= '=') goto yy2628;
+ if (yych <= '>') goto yy2726;
+ if (yych <= '?') goto yy2725;
+ goto yy2628;
}
}
} else {
if (yych <= 0x7F) {
if (yych <= '^') {
- if (yych <= 'Z') goto yy790;
- if (yych == '\\') goto yy793;
- goto yy717;
+ if (yych <= 'Z') goto yy2724;
+ if (yych == '\\') goto yy2727;
+ goto yy2628;
} else {
- if (yych == '`') goto yy717;
- if (yych <= 'z') goto yy790;
- goto yy717;
+ if (yych == '`') goto yy2628;
+ if (yych <= 'z') goto yy2724;
+ goto yy2628;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy794;
- if (yych <= 0xE0) goto yy795;
- goto yy796;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2728;
+ if (yych <= 0xE0) goto yy2729;
+ goto yy2730;
} else {
- if (yych <= 0xF0) goto yy797;
- if (yych <= 0xF3) goto yy798;
- if (yych <= 0xF4) goto yy799;
- goto yy1;
+ if (yych <= 0xF0) goto yy2731;
+ if (yych <= 0xF3) goto yy2732;
+ if (yych <= 0xF4) goto yy2733;
+ goto yy1682;
}
}
}
-yy843:
- yyaccept = 28;
+yy2799:
+ yyaccept = 38;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 0x7F) {
if (yych <= '&') {
- if (yych <= 0x00) goto yy315;
- if (yych == '"') goto yy845;
+ if (yych <= 0x00) goto yy2039;
+ if (yych == '"') goto yy2801;
} else {
- if (yych <= '\'') goto yy846;
- if (yych == '\\') goto yy847;
+ if (yych <= '\'') goto yy2802;
+ if (yych == '\\') goto yy2803;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xC1) goto yy315;
- if (yych <= 0xDF) goto yy848;
- if (yych <= 0xE0) goto yy849;
- goto yy850;
- } else {
- if (yych <= 0xF0) goto yy851;
- if (yych <= 0xF3) goto yy852;
- if (yych <= 0xF4) goto yy853;
- goto yy315;
+ if (yych <= 0xC1) goto yy2039;
+ if (yych <= 0xDF) goto yy2804;
+ if (yych <= 0xE0) goto yy2805;
+ goto yy2806;
+ } else {
+ if (yych <= 0xF0) goto yy2807;
+ if (yych <= 0xF3) goto yy2808;
+ if (yych <= 0xF4) goto yy2809;
+ goto yy2039;
}
}
-yy844:
+yy2800:
yych = *++YYCURSOR;
if (yych <= 0x7F) {
if (yych <= '&') {
- if (yych <= 0x00) goto yy1;
- if (yych != '"') goto yy844;
+ if (yych <= 0x00) goto yy1682;
+ if (yych != '"') goto yy2800;
} else {
- if (yych <= '\'') goto yy846;
- if (yych == '\\') goto yy847;
- goto yy844;
+ if (yych <= '\'') goto yy2802;
+ if (yych == '\\') goto yy2803;
+ goto yy2800;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy848;
- if (yych <= 0xE0) goto yy849;
- goto yy850;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2804;
+ if (yych <= 0xE0) goto yy2805;
+ goto yy2806;
} else {
- if (yych <= 0xF0) goto yy851;
- if (yych <= 0xF3) goto yy852;
- if (yych <= 0xF4) goto yy853;
- goto yy1;
+ if (yych <= 0xF0) goto yy2807;
+ if (yych <= 0xF3) goto yy2808;
+ if (yych <= 0xF4) goto yy2809;
+ goto yy1682;
}
}
-yy845:
+yy2801:
yych = *++YYCURSOR;
if (yych <= '?') {
if (yych <= '&') {
if (yych <= '\f') {
- if (yych <= 0x00) goto yy1;
- if (yych == '\t') goto yy894;
- goto yy609;
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '\t') goto yy2867;
+ goto yy2495;
} else {
- if (yych <= '\r') goto yy894;
- if (yych == ' ') goto yy894;
- goto yy609;
+ if (yych <= '\r') goto yy2867;
+ if (yych == ' ') goto yy2867;
+ goto yy2495;
}
} else {
if (yych <= '.') {
- if (yych <= '\'') goto yy599;
- if (yych == '-') goto yy895;
- goto yy609;
+ if (yych <= '\'') goto yy2485;
+ if (yych == '-') goto yy2868;
+ goto yy2495;
} else {
if (yych <= ':') {
- if (yych <= '/') goto yy896;
- goto yy895;
+ if (yych <= '/') goto yy2869;
+ goto yy2868;
} else {
- if (yych <= '=') goto yy609;
- if (yych <= '>') goto yy513;
- goto yy896;
+ if (yych <= '=') goto yy2495;
+ if (yych <= '>') goto yy2359;
+ goto yy2869;
}
}
}
} else {
if (yych <= 'z') {
if (yych <= '\\') {
- if (yych <= '@') goto yy609;
- if (yych <= 'Z') goto yy895;
- if (yych <= '[') goto yy609;
- goto yy610;
+ if (yych <= '@') goto yy2495;
+ if (yych <= 'Z') goto yy2868;
+ if (yych <= '[') goto yy2495;
+ goto yy2496;
} else {
- if (yych == '_') goto yy895;
- if (yych <= '`') goto yy609;
- goto yy895;
+ if (yych == '_') goto yy2868;
+ if (yych <= '`') goto yy2495;
+ goto yy2868;
}
} else {
if (yych <= 0xE0) {
- if (yych <= 0x7F) goto yy609;
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy611;
- goto yy612;
+ if (yych <= 0x7F) goto yy2495;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2497;
+ goto yy2498;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy613;
- goto yy614;
+ if (yych <= 0xEF) goto yy2499;
+ goto yy2500;
} else {
- if (yych <= 0xF3) goto yy615;
- if (yych <= 0xF4) goto yy616;
- goto yy1;
+ if (yych <= 0xF3) goto yy2501;
+ if (yych <= 0xF4) goto yy2502;
+ goto yy1682;
}
}
}
}
-yy846:
+yy2802:
yych = *++YYCURSOR;
if (yych <= '?') {
if (yych <= '!') {
if (yych <= '\f') {
- if (yych <= 0x00) goto yy1;
- if (yych == '\t') goto yy897;
- goto yy598;
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '\t') goto yy2870;
+ goto yy2484;
} else {
- if (yych <= '\r') goto yy897;
- if (yych == ' ') goto yy897;
- goto yy598;
+ if (yych <= '\r') goto yy2870;
+ if (yych == ' ') goto yy2870;
+ goto yy2484;
}
} else {
if (yych <= '.') {
- if (yych <= '"') goto yy599;
- if (yych == '-') goto yy898;
- goto yy598;
+ if (yych <= '"') goto yy2485;
+ if (yych == '-') goto yy2871;
+ goto yy2484;
} else {
if (yych <= ':') {
- if (yych <= '/') goto yy899;
- goto yy898;
+ if (yych <= '/') goto yy2872;
+ goto yy2871;
} else {
- if (yych <= '=') goto yy598;
- if (yych <= '>') goto yy503;
- goto yy899;
+ if (yych <= '=') goto yy2484;
+ if (yych <= '>') goto yy2349;
+ goto yy2872;
}
}
}
} else {
if (yych <= 'z') {
if (yych <= '\\') {
- if (yych <= '@') goto yy598;
- if (yych <= 'Z') goto yy898;
- if (yych <= '[') goto yy598;
- goto yy600;
+ if (yych <= '@') goto yy2484;
+ if (yych <= 'Z') goto yy2871;
+ if (yych <= '[') goto yy2484;
+ goto yy2486;
} else {
- if (yych == '_') goto yy898;
- if (yych <= '`') goto yy598;
- goto yy898;
+ if (yych == '_') goto yy2871;
+ if (yych <= '`') goto yy2484;
+ goto yy2871;
}
} else {
if (yych <= 0xE0) {
- if (yych <= 0x7F) goto yy598;
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy601;
- goto yy602;
+ if (yych <= 0x7F) goto yy2484;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2487;
+ goto yy2488;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy603;
- goto yy604;
+ if (yych <= 0xEF) goto yy2489;
+ goto yy2490;
} else {
- if (yych <= 0xF3) goto yy605;
- if (yych <= 0xF4) goto yy606;
- goto yy1;
+ if (yych <= 0xF3) goto yy2491;
+ if (yych <= 0xF4) goto yy2492;
+ goto yy1682;
}
}
}
}
-yy847:
+yy2803:
yych = *++YYCURSOR;
- if (yych <= 0xDF) {
- if (yych <= '\n') {
- if (yych <= '\t') goto yy844;
- goto yy1;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 0x00) goto yy1682;
+ goto yy2800;
} else {
- if (yych <= 0x7F) goto yy844;
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych >= 0xE0) goto yy2805;
}
} else {
if (yych <= 0xF0) {
- if (yych <= 0xE0) goto yy849;
- if (yych <= 0xEF) goto yy850;
- goto yy851;
+ if (yych <= 0xEF) goto yy2806;
+ goto yy2807;
} else {
- if (yych <= 0xF3) goto yy852;
- if (yych <= 0xF4) goto yy853;
- goto yy1;
+ if (yych <= 0xF3) goto yy2808;
+ if (yych <= 0xF4) goto yy2809;
+ goto yy1682;
}
}
-yy848:
+yy2804:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy844;
- goto yy1;
-yy849:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2800;
+ goto yy1682;
+yy2805:
yych = *++YYCURSOR;
- if (yych <= 0x9F) goto yy1;
- if (yych <= 0xBF) goto yy848;
- goto yy1;
-yy850:
+ if (yych <= 0x9F) goto yy1682;
+ if (yych <= 0xBF) goto yy2804;
+ goto yy1682;
+yy2806:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy848;
- goto yy1;
-yy851:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2804;
+ goto yy1682;
+yy2807:
yych = *++YYCURSOR;
- if (yych <= 0x8F) goto yy1;
- if (yych <= 0xBF) goto yy850;
- goto yy1;
-yy852:
+ if (yych <= 0x8F) goto yy1682;
+ if (yych <= 0xBF) goto yy2806;
+ goto yy1682;
+yy2808:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy850;
- goto yy1;
-yy853:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2806;
+ goto yy1682;
+yy2809:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0x8F) goto yy850;
- goto yy1;
-yy854:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0x8F) goto yy2806;
+ goto yy1682;
+yy2810:
yych = *++YYCURSOR;
if (yych <= '=') {
if (yych <= '"') {
if (yych <= '\f') {
- if (yych <= 0x00) goto yy1;
- if (yych == '\t') goto yy854;
- goto yy800;
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '\t') goto yy2810;
+ goto yy2734;
} else {
if (yych <= 0x1F) {
- if (yych <= '\r') goto yy854;
- goto yy800;
+ if (yych <= '\r') goto yy2810;
+ goto yy2734;
} else {
- if (yych <= ' ') goto yy854;
- if (yych <= '!') goto yy800;
- goto yy525;
+ if (yych <= ' ') goto yy2810;
+ if (yych <= '!') goto yy2734;
+ goto yy2371;
}
}
} else {
if (yych <= '-') {
- if (yych == '\'') goto yy524;
- if (yych <= ',') goto yy800;
- goto yy854;
+ if (yych == '\'') goto yy2370;
+ if (yych <= ',') goto yy2734;
+ goto yy2810;
} else {
if (yych <= '/') {
- if (yych <= '.') goto yy800;
+ if (yych <= '.') goto yy2734;
} else {
- if (yych <= ':') goto yy854;
- if (yych <= '<') goto yy800;
- goto yy900;
+ if (yych <= ':') goto yy2810;
+ if (yych <= '<') goto yy2734;
+ goto yy2873;
}
}
}
} else {
if (yych <= '`') {
if (yych <= 'Z') {
- if (yych <= '>') goto yy856;
- if (yych <= '?') goto yy855;
- if (yych <= '@') goto yy800;
- goto yy854;
+ if (yych <= '>') goto yy2812;
+ if (yych <= '?') goto yy2811;
+ if (yych <= '@') goto yy2734;
+ goto yy2810;
} else {
if (yych <= '\\') {
- if (yych <= '[') goto yy800;
- goto yy857;
+ if (yych <= '[') goto yy2734;
+ goto yy2813;
} else {
- if (yych == '_') goto yy854;
- goto yy800;
+ if (yych == '_') goto yy2810;
+ goto yy2734;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= 'z') goto yy854;
- goto yy800;
+ if (yych <= 'z') goto yy2810;
+ goto yy2734;
} else {
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy858;
- goto yy859;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2814;
+ goto yy2815;
}
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy860;
- goto yy861;
+ if (yych <= 0xEF) goto yy2816;
+ goto yy2817;
} else {
- if (yych <= 0xF3) goto yy862;
- if (yych <= 0xF4) goto yy863;
- goto yy1;
+ if (yych <= 0xF3) goto yy2818;
+ if (yych <= 0xF4) goto yy2819;
+ goto yy1682;
}
}
}
}
-yy855:
+yy2811:
yych = *++YYCURSOR;
if (yych <= 'Z') {
if (yych <= '-') {
if (yych <= '"') {
- if (yych <= 0x00) goto yy1;
- if (yych <= '!') goto yy800;
- goto yy525;
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= '!') goto yy2734;
+ goto yy2371;
} else {
- if (yych == '\'') goto yy524;
- if (yych <= ',') goto yy800;
- goto yy854;
+ if (yych == '\'') goto yy2370;
+ if (yych <= ',') goto yy2734;
+ goto yy2810;
}
} else {
if (yych <= '=') {
- if (yych <= '.') goto yy800;
- if (yych <= '/') goto yy855;
- if (yych <= ':') goto yy854;
- goto yy800;
+ if (yych <= '.') goto yy2734;
+ if (yych <= '/') goto yy2811;
+ if (yych <= ':') goto yy2810;
+ goto yy2734;
} else {
- if (yych <= '>') goto yy901;
- if (yych <= '?') goto yy855;
- if (yych <= '@') goto yy800;
- goto yy854;
+ if (yych <= '>') goto yy2874;
+ if (yych <= '?') goto yy2811;
+ if (yych <= '@') goto yy2734;
+ goto yy2810;
}
}
} else {
if (yych <= 0x7F) {
if (yych <= '^') {
- if (yych == '\\') goto yy857;
- goto yy800;
+ if (yych == '\\') goto yy2813;
+ goto yy2734;
} else {
- if (yych == '`') goto yy800;
- if (yych <= 'z') goto yy854;
- goto yy800;
+ if (yych == '`') goto yy2734;
+ if (yych <= 'z') goto yy2810;
+ goto yy2734;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy858;
- if (yych <= 0xE0) goto yy859;
- goto yy860;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2814;
+ if (yych <= 0xE0) goto yy2815;
+ goto yy2816;
} else {
- if (yych <= 0xF0) goto yy861;
- if (yych <= 0xF3) goto yy862;
- if (yych <= 0xF4) goto yy863;
- goto yy1;
+ if (yych <= 0xF0) goto yy2817;
+ if (yych <= 0xF3) goto yy2818;
+ if (yych <= 0xF4) goto yy2819;
+ goto yy1682;
}
}
}
-yy856:
+yy2812:
yych = *++YYCURSOR;
if (yych <= 0x7F) {
if (yych <= '&') {
- if (yych <= 0x00) goto yy1;
- if (yych == '"') goto yy902;
- goto yy856;
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '"') goto yy2875;
+ goto yy2812;
} else {
- if (yych <= '\'') goto yy903;
- if (yych == '\\') goto yy904;
- goto yy856;
+ if (yych <= '\'') goto yy2876;
+ if (yych == '\\') goto yy2877;
+ goto yy2812;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy905;
- if (yych <= 0xE0) goto yy906;
- goto yy907;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2878;
+ if (yych <= 0xE0) goto yy2879;
+ goto yy2880;
} else {
- if (yych <= 0xF0) goto yy908;
- if (yych <= 0xF3) goto yy909;
- if (yych <= 0xF4) goto yy910;
- goto yy1;
+ if (yych <= 0xF0) goto yy2881;
+ if (yych <= 0xF3) goto yy2882;
+ if (yych <= 0xF4) goto yy2883;
+ goto yy1682;
}
}
-yy857:
+yy2813:
yych = *++YYCURSOR;
- if (yych <= 'Z') {
- if (yych <= '.') {
- if (yych <= '\n') {
- if (yych <= 0x00) goto yy856;
- if (yych <= '\t') goto yy800;
- goto yy522;
+ if (yych <= '^') {
+ if (yych <= ':') {
+ if (yych <= '-') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= ',') goto yy2734;
+ goto yy2810;
} else {
- if (yych == '-') goto yy854;
- goto yy800;
+ if (yych <= '.') goto yy2734;
+ if (yych <= '/') goto yy2811;
+ goto yy2810;
}
} else {
- if (yych <= '=') {
- if (yych <= '/') goto yy855;
- if (yych <= ':') goto yy854;
- goto yy800;
+ if (yych <= '?') {
+ if (yych <= '=') goto yy2734;
+ if (yych <= '>') goto yy2812;
+ goto yy2811;
} else {
- if (yych <= '>') goto yy856;
- if (yych <= '?') goto yy855;
- if (yych <= '@') goto yy800;
- goto yy854;
+ if (yych <= '@') goto yy2734;
+ if (yych <= 'Z') goto yy2810;
+ goto yy2734;
}
}
} else {
- if (yych <= 0xC1) {
- if (yych <= '`') {
- if (yych == '_') goto yy854;
- goto yy800;
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych == '`') goto yy2734;
+ goto yy2810;
} else {
- if (yych <= 'z') goto yy854;
- if (yych <= 0x7F) goto yy800;
- goto yy1;
+ if (yych <= 0x7F) goto yy2734;
+ if (yych <= 0xC1) goto yy1682;
}
} else {
- if (yych <= 0xEF) {
- if (yych <= 0xDF) goto yy858;
- if (yych <= 0xE0) goto yy859;
- goto yy860;
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) goto yy2815;
+ if (yych <= 0xEF) goto yy2816;
+ goto yy2817;
} else {
- if (yych <= 0xF0) goto yy861;
- if (yych <= 0xF3) goto yy862;
- if (yych <= 0xF4) goto yy863;
- goto yy1;
+ if (yych <= 0xF3) goto yy2818;
+ if (yych <= 0xF4) goto yy2819;
+ goto yy1682;
}
}
}
-yy858:
+yy2814:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy800;
- goto yy1;
-yy859:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2734;
+ goto yy1682;
+yy2815:
yych = *++YYCURSOR;
- if (yych <= 0x9F) goto yy1;
- if (yych <= 0xBF) goto yy858;
- goto yy1;
-yy860:
+ if (yych <= 0x9F) goto yy1682;
+ if (yych <= 0xBF) goto yy2814;
+ goto yy1682;
+yy2816:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy858;
- goto yy1;
-yy861:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2814;
+ goto yy1682;
+yy2817:
yych = *++YYCURSOR;
- if (yych <= 0x8F) goto yy1;
- if (yych <= 0xBF) goto yy860;
- goto yy1;
-yy862:
+ if (yych <= 0x8F) goto yy1682;
+ if (yych <= 0xBF) goto yy2816;
+ goto yy1682;
+yy2818:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy860;
- goto yy1;
-yy863:
- yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0x8F) goto yy860;
- goto yy1;
-yy864:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2816;
+ goto yy1682;
+yy2819:
yych = *++YYCURSOR;
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy911;
- goto yy1;
-yy865:
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0x8F) goto yy2816;
+ goto yy1682;
+yy2820:
yych = *++YYCURSOR;
- if (yych <= 0xDF) {
- if (yych <= ':') {
- if (yych <= '/') {
+ if (yych == ',') goto yy2884;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2820;
+ goto yy1682;
+yy2821:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '^') {
+ if (yych <= '/') {
+ if (yych <= ',') {
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy2575;
+ }
yyt2 = YYCURSOR;
- goto yy642;
- }
- if (yych <= '9') {
- yyt1 = YYCURSOR;
- goto yy912;
+ goto yy1892;
+ } else {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy2217;
+ }
+ if (yych <= '.') {
+ yyt2 = YYCURSOR;
+ goto yy2224;
+ }
+ yyt2 = YYCURSOR;
+ goto yy2128;
}
- goto yy1;
} else {
- if (yych <= 0x7F) {
+ if (yych <= '?') {
+ if (yych <= '9') goto yy2055;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2652;
+ }
yyt2 = YYCURSOR;
- goto yy642;
+ goto yy1892;
+ } else {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
+ }
+ if (yych <= 'Z') goto yy2055;
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
- if (yych <= 0xC1) goto yy1;
- yyt2 = YYCURSOR;
- goto yy645;
}
} else {
- if (yych <= 0xF0) {
- if (yych <= 0xE0) {
- yyt2 = YYCURSOR;
- goto yy646;
- }
- if (yych <= 0xEF) {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= '_') {
+ yyt2 = YYCURSOR;
+ goto yy2057;
+ }
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2055;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= 0xC1) goto yy1650;
yyt2 = YYCURSOR;
- goto yy647;
+ goto yy1900;
}
- yyt2 = YYCURSOR;
- goto yy648;
} else {
- if (yych <= 0xF3) {
- yyt2 = YYCURSOR;
- goto yy649;
- }
- if (yych <= 0xF4) {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy1902;
+ }
yyt2 = YYCURSOR;
- goto yy650;
+ goto yy1903;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1650;
}
- goto yy1;
}
}
-yy866:
- yych = *++YYCURSOR;
- if (yych == 'l') goto yy913;
- goto yy1;
-yy867:
- yych = *++YYCURSOR;
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy914;
- goto yy1;
-yy868:
- yych = *++YYCURSOR;
- if (yych == ':') goto yy915;
- goto yy1;
-yy869:
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[1024+yych] & 16) {
- goto yy46;
- }
- if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
- } else {
- if (yych <= ':') {
- if (yych <= '/') goto yy4;
- goto yy916;
- } else {
- if (yych == '@') goto yy96;
- goto yy4;
- }
- }
-yy870:
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == ':') goto yy916;
- goto yy4;
-yy871:
- yyaccept = 0;
+yy2822:
+ yyaccept = 7;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '?') {
- if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
+ if (yych <= '_') {
+ if (yych <= '9') {
+ if (yych <= '-') {
+ if (yych <= ',') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ yyt2 = YYCURSOR;
+ goto yy2217;
+ } else {
+ if (yych <= '.') {
+ yyt2 = YYCURSOR;
+ goto yy2224;
+ }
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
+ }
+ goto yy2885;
+ }
} else {
- if (yych <= '.') {
- if (yych <= ',') goto yy4;
- goto yy46;
+ if (yych <= '@') {
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2886;
+ }
+ if (yych <= '?') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ yyt2 = YYCURSOR;
+ goto yy2128;
} else {
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy917;
- goto yy4;
+ if (yych <= 'Z') goto yy2055;
+ if (yych <= '^') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ yyt2 = YYCURSOR;
+ goto yy2057;
}
}
} else {
- if (yych <= '^') {
- if (yych <= '@') goto yy96;
- if (yych <= 'F') goto yy917;
- if (yych <= 'Z') goto yy46;
- goto yy4;
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2055;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= 0xC1) goto yy1650;
+ yyt2 = YYCURSOR;
+ goto yy1900;
+ }
} else {
- if (yych <= '`') {
- if (yych <= '_') goto yy46;
- goto yy4;
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy1902;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1903;
} else {
- if (yych <= 'f') goto yy917;
- if (yych <= 'z') goto yy46;
- goto yy4;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1650;
}
}
}
-yy872:
- yyaccept = 11;
+yy2823:
+ yyaccept = 7;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
- }
- if (yych <= '9') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy109;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy109;
- goto yy4;
+ if (yych <= '_') {
+ if (yych <= '9') {
+ if (yych <= '-') {
+ if (yych <= ',') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ yyt2 = YYCURSOR;
+ goto yy2217;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') goto yy109;
- goto yy4;
- } else {
- if (yych <= 0x1B) goto yy109;
- if (yych <= 0x1F) goto yy4;
- goto yy109;
+ if (yych <= '.') {
+ yyt2 = YYCURSOR;
+ goto yy2224;
}
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
+ }
+ goto yy2822;
}
} else {
- if (yych <= ',') {
- if (yych <= '%') {
- if (yych <= '$') goto yy4;
- goto yy105;
- } else {
- if (yych == '+') goto yy80;
- goto yy109;
+ if (yych <= '@') {
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2886;
+ }
+ if (yych <= '?') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
+ yyt2 = YYCURSOR;
+ goto yy2128;
} else {
- if (yych <= '.') {
- if (yych <= '-') goto yy46;
- goto yy266;
- } else {
- if (yych <= '/') goto yy4;
- if (yych <= '7') goto yy918;
- goto yy919;
+ if (yych <= 'Z') goto yy2055;
+ if (yych <= '^') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
+ yyt2 = YYCURSOR;
+ goto yy2057;
}
}
} else {
- if (yych <= '_') {
- if (yych <= 'D') {
- if (yych <= ':') goto yy148;
- if (yych <= '?') goto yy109;
- if (yych <= '@') goto yy96;
- goto yy196;
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2055;
} else {
- if (yych <= 'F') {
- if (yych <= 'E') goto yy754;
- goto yy196;
- } else {
- if (yych <= 'Z') goto yy115;
- if (yych <= '^') goto yy109;
- goto yy46;
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
+ if (yych <= 0xC1) goto yy1650;
+ yyt2 = YYCURSOR;
+ goto yy1900;
}
} else {
- if (yych <= 'z') {
- if (yych <= 'd') {
- if (yych <= '`') goto yy109;
- goto yy196;
- } else {
- if (yych <= 'e') goto yy754;
- if (yych <= 'f') goto yy196;
- goto yy115;
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1901;
}
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy1902;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1903;
} else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy109;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy109;
- if (yych <= 0xF4) goto yy4;
- goto yy109;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
}
+ goto yy1650;
}
}
}
-yy873:
- yyaccept = 6;
+yy2824:
+ yyaccept = 7;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
- }
- if (yych <= '9') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy26;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy26;
- goto yy4;
+ if (yych <= '^') {
+ if (yych <= '5') {
+ if (yych <= '.') {
+ if (yych <= ',') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy2217;
+ }
+ yyt2 = YYCURSOR;
+ goto yy2224;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') goto yy26;
- goto yy4;
- } else {
- if (yych <= 0x1B) goto yy26;
- if (yych <= 0x1F) goto yy4;
- goto yy26;
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
}
+ if (yych <= '4') goto yy2822;
+ goto yy2887;
}
} else {
- if (yych <= '+') {
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy105;
- if (yych <= '*') goto yy26;
- goto yy80;
+ if (yych <= '?') {
+ if (yych <= '9') goto yy2885;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2886;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1892;
} else {
- if (yych <= '-') {
- if (yych <= ',') goto yy26;
- goto yy46;
- } else {
- if (yych <= '.') goto yy266;
- if (yych <= '/') goto yy4;
- goto yy919;
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
}
+ if (yych <= 'Z') goto yy2055;
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
}
} else {
- if (yych <= '_') {
- if (yych <= 'D') {
- if (yych <= ':') goto yy148;
- if (yych <= '?') goto yy26;
- if (yych <= '@') goto yy96;
- goto yy196;
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= '_') {
+ yyt2 = YYCURSOR;
+ goto yy2057;
+ }
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2055;
} else {
- if (yych <= 'F') {
- if (yych <= 'E') goto yy754;
- goto yy196;
- } else {
- if (yych <= 'Z') goto yy115;
- if (yych <= '^') goto yy26;
- goto yy46;
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
+ if (yych <= 0xC1) goto yy1650;
+ yyt2 = YYCURSOR;
+ goto yy1900;
}
} else {
- if (yych <= 'z') {
- if (yych <= 'd') {
- if (yych <= '`') goto yy26;
- goto yy196;
- } else {
- if (yych <= 'e') goto yy754;
- if (yych <= 'f') goto yy196;
- goto yy115;
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy1902;
}
+ yyt2 = YYCURSOR;
+ goto yy1903;
} else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy26;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy26;
- if (yych <= 0xF4) goto yy4;
- goto yy26;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
}
+ goto yy1650;
}
}
}
-yy874:
- yyaccept = 6;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '/') {
- if (yych <= 0x1F) {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy26;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy26;
- goto yy4;
- } else {
- if (yych <= '\r') goto yy26;
- if (yych == 0x1B) goto yy26;
- goto yy4;
+yy2825:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2888;
+ goto yy1682;
+yy2826:
+ yych = *++YYCURSOR;
+ if (yych <= 0xDF) {
+ if (yych <= ':') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy2537;
+ }
+ if (yych <= '9') {
+ yyt1 = YYCURSOR;
+ goto yy2889;
}
+ goto yy1682;
} else {
- if (yych <= '*') {
- if (yych <= '#') goto yy26;
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy80;
- goto yy26;
- } else {
- if (yych <= '+') goto yy80;
- if (yych <= ',') goto yy26;
- if (yych <= '.') goto yy46;
- goto yy4;
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy2537;
}
+ if (yych <= 0xC1) goto yy1682;
+ yyt2 = YYCURSOR;
+ goto yy2540;
}
} else {
- if (yych <= '_') {
- if (yych <= '@') {
- if (yych <= '9') goto yy920;
- if (yych <= ':') goto yy4;
- if (yych <= '?') goto yy26;
- goto yy96;
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy2541;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy2542;
+ }
+ yyt2 = YYCURSOR;
+ goto yy2543;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy2544;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy2545;
+ }
+ goto yy1682;
+ }
+ }
+yy2827:
+ yych = *++YYCURSOR;
+ if (yych == 'l') goto yy2890;
+ goto yy1682;
+yy2828:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2891;
+ goto yy1682;
+yy2829:
+ yych = *++YYCURSOR;
+ if (yych == ':') goto yy2892;
+ goto yy1682;
+yy2830:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == ':') goto yy2893;
+ goto yy1746;
+yy2831:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == ':') goto yy2893;
+ goto yy1865;
+yy2832:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy1746;
+ if (yych <= '9') goto yy2894;
+ goto yy1746;
+ } else {
+ if (yych <= 'F') goto yy2894;
+ if (yych <= '`') goto yy1746;
+ if (yych <= 'f') goto yy2894;
+ goto yy1746;
+ }
+yy2833:
+ yyaccept = 11;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ if (yych <= '7') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1727;
+ if (yych <= '*') goto yy1733;
+ goto yy1884;
+ } else {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy1733;
+ goto yy1884;
} else {
- if (yych <= 'F') goto yy917;
- if (yych <= 'Z') goto yy46;
- if (yych <= '^') goto yy26;
- goto yy46;
+ if (yych <= '.') goto yy1985;
+ if (yych <= '/') goto yy1884;
+ goto yy2895;
}
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '9') goto yy2896;
+ if (yych <= ':') goto yy1884;
+ if (yych <= '?') goto yy1733;
+ goto yy1884;
} else {
- if (yych <= '~') {
- if (yych <= '`') goto yy26;
- if (yych <= 'f') goto yy917;
- if (yych <= 'z') goto yy46;
- goto yy26;
+ if (yych <= '_') {
+ if (yych <= '^') goto yy1733;
+ goto yy1884;
} else {
- if (yych <= 0x7F) goto yy4;
- if (yych <= 0xC1) goto yy26;
- if (yych <= 0xF4) goto yy4;
- goto yy26;
+ if (yych <= '`') goto yy1733;
+ if (yych <= 'z') goto yy1884;
+ goto yy1733;
}
}
}
-yy875:
+yy2834:
+ yyaccept = 12;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ if (yych <= '-') {
+ if (yych == '%') goto yy1727;
+ goto yy1884;
+ } else {
+ if (yych <= '.') goto yy1985;
+ if (yych <= '/') goto yy1884;
+ if (yych <= '9') goto yy2896;
+ goto yy1884;
+ }
+yy2835:
yych = *++YYCURSOR;
if (yych <= 'f') {
if (yych <= ':') {
if (yych <= '%') {
if (yych <= '$') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
yyt1 = YYCURSOR;
- goto yy680;
+ goto yy2575;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '9') goto yy921;
- goto yy816;
+ if (yych <= '9') goto yy2897;
+ yyt2 = YYCURSOR;
+ goto yy2755;
}
} else {
if (yych <= 'F') {
if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy921;
+ goto yy2897;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy921;
+ goto yy2897;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy876:
+yy2836:
yych = *++YYCURSOR;
if (yych <= 'f') {
if (yych <= ':') {
if (yych <= '%') {
if (yych <= '$') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
yyt1 = YYCURSOR;
- goto yy680;
+ goto yy2575;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '9') goto yy922;
- goto yy923;
+ if (yych <= '9') goto yy2898;
+ yyt2 = YYCURSOR;
+ goto yy2899;
}
} else {
if (yych <= 'F') {
if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy922;
+ goto yy2898;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy922;
+ goto yy2898;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy877:
- yyaccept = 21;
+yy2837:
+ yyaccept = 30;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ':') {
if (yych <= '-') {
- if (yych <= ',') goto yy354;
- goto yy466;
+ if (yych <= ',') goto yy2107;
+ goto yy2270;
} else {
- if (yych <= '/') goto yy354;
- if (yych <= '9') goto yy761;
- goto yy924;
+ if (yych <= '/') goto yy2107;
+ if (yych <= '9') goto yy2678;
+ goto yy2900;
}
} else {
if (yych <= 'F') {
- if (yych <= '@') goto yy354;
- goto yy761;
+ if (yych <= '@') goto yy2107;
+ goto yy2678;
} else {
- if (yych <= '`') goto yy354;
- if (yych <= 'f') goto yy761;
- goto yy354;
+ if (yych <= '`') goto yy2107;
+ if (yych <= 'f') goto yy2678;
+ goto yy2107;
}
}
-yy878:
+yy2838:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy925;
- if (yych <= ':') goto yy820;
- goto yy1;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2901;
+ if (yych <= ':') goto yy2759;
+ goto yy1682;
} else {
- if (yych <= 'F') goto yy925;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy925;
- goto yy1;
+ if (yych <= 'F') goto yy2901;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2901;
+ goto yy1682;
}
-yy879:
+yy2839:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy926;
- if (yych <= ':') goto yy927;
- goto yy1;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2902;
+ if (yych <= ':') goto yy2903;
+ goto yy1682;
} else {
- if (yych <= 'F') goto yy926;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy926;
- goto yy1;
+ if (yych <= 'F') goto yy2902;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2902;
+ goto yy1682;
}
-yy880:
+yy2840:
yych = *++YYCURSOR;
if (yych <= 'z') {
if (yych <= '@') {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
+ }
+ if (yych <= '9') goto yy2904;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1897;
}
- if (yych <= '9') goto yy928;
- if (yych <= ':') goto yy1;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
if (yych <= 'Z') {
- if (yych <= 'F') goto yy928;
- goto yy1;
+ if (yych <= 'F') goto yy2904;
+ goto yy1682;
} else {
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 'f') goto yy928;
- goto yy1;
+ if (yych <= 'f') goto yy2904;
+ goto yy1682;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy881:
+yy2841:
yych = *++YYCURSOR;
if (yych <= 'f') {
if (yych <= ':') {
if (yych <= '.') {
if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- yyt1 = YYCURSOR;
- goto yy297;
+ yyt4 = YYCURSOR;
+ goto yy2420;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '9') goto yy929;
+ if (yych <= '9') goto yy2905;
+ yyt2 = YYCURSOR;
}
} else {
if (yych <= 'F') {
if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy929;
+ goto yy2905;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy929;
+ goto yy2905;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy882:
+yy2842:
yych = *++YYCURSOR;
- if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy928;
- goto yy1;
+ if (yych <= '9') {
+ if (yych == ' ') goto yy1892;
+ if (yych <= '/') goto yy1682;
+ goto yy2904;
} else {
- if (yych <= 'F') goto yy928;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy928;
- goto yy1;
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy1682;
+ goto yy2904;
+ } else {
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2904;
+ goto yy1682;
+ }
}
-yy883:
+yy2843:
yych = *++YYCURSOR;
if (yych <= 'z') {
if (yych <= '@') {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
+ }
+ if (yych <= '9') goto yy2905;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2842;
}
- if (yych <= '9') goto yy929;
- if (yych <= ':') goto yy882;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
if (yych <= 'Z') {
- if (yych <= 'F') goto yy929;
- goto yy1;
+ if (yych <= 'F') goto yy2905;
+ goto yy1682;
} else {
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 'f') goto yy929;
- goto yy1;
+ if (yych <= 'f') goto yy2905;
+ goto yy1682;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy884:
+yy2844:
yych = *++YYCURSOR;
if (yych <= 'f') {
if (yych <= ':') {
if (yych <= '.') {
if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- yyt1 = YYCURSOR;
- goto yy297;
+ yyt4 = YYCURSOR;
+ goto yy2420;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '9') goto yy930;
- goto yy882;
+ if (yych <= '9') goto yy2906;
+ yyt2 = YYCURSOR;
+ goto yy2842;
}
} else {
if (yych <= 'F') {
if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy929;
+ goto yy2905;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy929;
+ goto yy2905;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy885:
+yy2845:
yych = *++YYCURSOR;
if (yych <= '`') {
if (yych <= '9') {
if (yych <= '.') {
if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- yyt1 = YYCURSOR;
- goto yy297;
+ yyt4 = YYCURSOR;
+ goto yy2420;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '5') goto yy930;
- goto yy929;
+ if (yych <= '5') goto yy2906;
+ goto yy2905;
}
} else {
if (yych <= '@') {
- if (yych <= ':') goto yy882;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2842;
+ }
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 'F') goto yy929;
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'F') goto yy2905;
+ if (yych <= 'Z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
}
} else {
if (yych <= 0xDF) {
if (yych <= 'z') {
- if (yych <= 'f') goto yy929;
- goto yy1;
+ if (yych <= 'f') goto yy2905;
+ goto yy1682;
} else {
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy886:
+yy2846:
yych = *++YYCURSOR;
if (yych <= 0x7F) {
if (yych <= '@') {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
+ }
+ if (yych <= '9') goto yy1682;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2682;
}
- if (yych <= '9') goto yy1;
- if (yych <= ':') goto yy765;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
} else {
if (yych <= 0xF0) {
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
}
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
-yy887:
- yyaccept = 0;
+yy2847:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '@') {
- if (yych <= 0x1B) {
- if (yych <= '\n') {
- if (yych <= 0x00) {
+ if (yych <= '`') {
+ if (yych <= '?') {
+ if (yych <= '/') {
+ if (yych <= ',') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 0x08) {
+ yyt2 = YYCURSOR;
+ goto yy2128;
+ } else {
+ if (yych <= '9') goto yy1864;
+ if (yych >= ';') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1892;
}
yyt2 = YYCURSOR;
- goto yy198;
- } else {
- if (yych == '\r') {
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy2128;
}
- if (yych <= 0x1A) {
+ goto yy1864;
+ } else {
+ if (yych == '_') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy2007;
}
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- } else {
- if (yych <= ',') {
- if (yych <= 0x1F) {
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy1864;
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ } else {
+ if (yych <= 0xC1) goto yy1741;
+ if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1900;
}
- if (yych == '$') {
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1903;
} else {
- if (yych <= '/') {
+ if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1904;
}
- if (yych <= ':') goto yy4;
- if (yych <= '?') {
+ if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1905;
}
- yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1741;
}
}
- } else {
- if (yych <= 0x7F) {
- if (yych <= '_') {
- if (yych <= 'Z') goto yy4;
- if (yych <= '^') {
+ }
+yy2848:
+ yych = *++YYCURSOR;
+ if (yych == ' ') goto yy1892;
+ if (yych == ':') goto yy1731;
+ goto yy1682;
+yy2849:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '_') {
+ if (yych <= ':') {
+ if (yych <= '/') {
+ if (yych <= ',') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy2128;
+ } else {
+ if (yych <= '5') goto yy2847;
+ if (yych <= '9') goto yy1864;
+ yyt2 = YYCURSOR;
+ goto yy2848;
+ }
+ } else {
+ if (yych <= '@') {
+ if (yych <= '?') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ yyt2 = YYCURSOR;
+ goto yy2128;
} else {
+ if (yych <= 'Z') goto yy1864;
+ if (yych <= '^') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ yyt2 = YYCURSOR;
+ goto yy2007;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 'z') goto yy4;
- if (yych <= '~') {
+ goto yy1864;
+ } else {
+ if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
+ if (yych <= 0xC1) goto yy1741;
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1900;
}
} else {
- if (yych <= 0xEF) {
- if (yych <= 0xC1) goto yy4;
- if (yych <= 0xDF) {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy289;
+ goto yy1901;
}
- if (yych <= 0xE0) {
+ if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy290;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy291;
+ goto yy1903;
} else {
- if (yych <= 0xF0) {
- yyt2 = YYCURSOR;
- goto yy292;
- }
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy293;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy294;
+ goto yy1905;
}
- goto yy4;
+ goto yy1741;
}
}
}
-yy888:
- yyaccept = 0;
+yy2850:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ switch (yych) {
+ case '%': goto yy1727;
+ case '+':
+ case '-':
+ case '/':
+ case ':':
+ case '@':
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy1884;
+ case '.': goto yy2019;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy2907;
+ case 'B':
+ case 'b': goto yy2692;
+ case 'E':
+ case 'e': goto yy2693;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy1740;
+ case 'S':
+ case 's': goto yy1744;
+ case 'm': goto yy1747;
+ case 'p':
+ case 'u': goto yy1748;
+ default: goto yy1635;
+ }
+yy2851:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ switch (yych) {
+ case '%':
+ case '+':
+ case '-':
+ case '.':
+ case '/':
+ case ':':
+ case '@':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy1746;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy2908;
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'E':
+ case 'F':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'e':
+ case 'f': goto yy2894;
+ case 'B':
+ case 'b': goto yy2909;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy2153;
+ case 'S':
+ case 's': goto yy2154;
+ case 'm': goto yy2155;
+ case 'p':
+ case 'u': goto yy2156;
+ default: goto yy1635;
+ }
+yy2852:
+ yyaccept = 3;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '?') {
- if (yych <= 0x1B) {
- if (yych <= '\n') {
- if (yych <= 0x00) {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1746;
+ if (yych <= '*') goto yy1635;
+ goto yy1746;
+ } else {
+ if (yych <= '/') {
+ if (yych <= ',') goto yy1635;
+ goto yy1746;
+ } else {
+ if (yych <= '9') goto yy2894;
+ if (yych <= ':') goto yy1746;
+ goto yy1635;
+ }
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '@') goto yy1746;
+ if (yych <= 'F') goto yy2894;
+ if (yych <= 'Z') goto yy1746;
+ goto yy1635;
+ } else {
+ if (yych <= '`') {
+ if (yych <= '_') goto yy1746;
+ goto yy1635;
+ } else {
+ if (yych <= 'f') goto yy2894;
+ if (yych <= 'z') goto yy1746;
+ goto yy1635;
+ }
+ }
+ }
+yy2853:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 0x08) {
+ yyt1 = YYCURSOR;
+ goto yy2020;
+ } else {
+ if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1892;
}
+ if (yych <= '9') goto yy2596;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy2431;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2596;
} else {
- if (yych == '\r') {
+ if (yych <= 'Z') goto yy1682;
+ if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 0x1A) {
+ goto yy2596;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy1682;
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ } else {
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1901;
}
} else {
- if (yych <= ',') {
- if (yych <= 0x1F) {
- yyt2 = YYCURSOR;
- goto yy284;
- }
- if (yych == '$') {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1903;
} else {
- if (yych <= '/') {
+ if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1904;
}
- if (yych <= '5') goto yy887;
- if (yych <= ':') goto yy4;
- yyt2 = YYCURSOR;
- goto yy198;
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1682;
}
}
+ }
+yy2854:
+ yych = *++YYCURSOR;
+ if (yych <= '2') {
+ if (yych <= '/') {
+ if (yych == ' ') goto yy1892;
+ goto yy1682;
+ } else {
+ if (yych <= '0') goto yy2910;
+ if (yych <= '1') goto yy2911;
+ goto yy2912;
+ }
} else {
- if (yych <= 0x7F) {
- if (yych <= '_') {
- if (yych <= '@') {
+ if (yych <= 'F') {
+ if (yych <= '9') goto yy2913;
+ if (yych <= '@') goto yy1682;
+ goto yy2590;
+ } else {
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2590;
+ goto yy1682;
+ }
+ }
+yy2855:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1892;
}
- if (yych <= 'Z') goto yy4;
- if (yych <= '^') {
+ yyt1 = YYCURSOR;
+ goto yy2020;
+ } else {
+ if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
+ if (yych <= '9') goto yy2914;
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy2431;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2596;
} else {
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 'z') goto yy4;
- if (yych <= '~') {
+ goto yy2596;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy1682;
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ } else {
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy284;
+ goto yy1901;
}
} else {
- if (yych <= 0xEF) {
- if (yych <= 0xC1) goto yy4;
- if (yych <= 0xDF) {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy289;
+ goto yy1902;
}
- if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1903;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1682;
+ }
+ }
+ }
+yy2856:
+ yych = *++YYCURSOR;
+ if (yych <= '`') {
+ if (yych <= '9') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ yyt1 = YYCURSOR;
+ goto yy2020;
+ } else {
+ if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy290;
+ goto yy1892;
+ }
+ if (yych <= '5') goto yy2914;
+ goto yy2596;
+ }
+ } else {
+ if (yych <= '@') {
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2431;
}
yyt2 = YYCURSOR;
- goto yy291;
+ goto yy1892;
} else {
- if (yych <= 0xF0) {
+ if (yych <= 'F') goto yy2596;
+ if (yych <= 'Z') goto yy1682;
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= 'f') goto yy2596;
+ goto yy1682;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= 0xC1) goto yy1682;
+ yyt2 = YYCURSOR;
+ goto yy1900;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
+ if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy292;
+ goto yy1902;
}
+ yyt2 = YYCURSOR;
+ goto yy1903;
+ } else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy293;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy294;
+ goto yy1905;
}
- goto yy4;
+ goto yy1682;
}
}
}
-yy889:
+yy2857:
yych = *++YYCURSOR;
- if (yych <= '9') {
- if (yych <= '0') {
- if (yych <= '/') goto yy1;
- goto yy931;
+ if (yych <= ',') {
+ if (yych <= ' ') {
+ if (yych <= '\t') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= 0x08) goto yy2316;
+ goto yy2857;
+ } else {
+ if (yych == '\r') goto yy2857;
+ if (yych <= 0x1F) goto yy2316;
+ goto yy2857;
+ }
} else {
- if (yych <= '1') goto yy693;
- if (yych <= '2') goto yy694;
- goto yy692;
+ if (yych <= '&') {
+ if (yych == '"') goto yy2780;
+ goto yy2316;
+ } else {
+ if (yych <= '\'') goto yy2781;
+ if (yych == '*') goto yy2175;
+ goto yy2316;
+ }
}
} else {
- if (yych <= 'F') {
- if (yych <= '@') goto yy1;
- goto yy695;
+ if (yych <= 0x7F) {
+ if (yych <= '=') {
+ if (yych <= '-') goto yy2317;
+ if (yych <= '<') goto yy2316;
+ goto yy2859;
+ } else {
+ if (yych <= '>') goto yy2459;
+ if (yych == '\\') goto yy2318;
+ goto yy2316;
+ }
} else {
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy695;
- goto yy1;
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2319;
+ if (yych <= 0xE0) goto yy2320;
+ goto yy2321;
+ } else {
+ if (yych <= 0xF0) goto yy2322;
+ if (yych <= 0xF3) goto yy2323;
+ if (yych <= 0xF4) goto yy2324;
+ goto yy1682;
+ }
}
}
-yy890:
+yy2858:
+ yych = *++YYCURSOR;
+ if (yych <= '=') {
+ if (yych <= '!') {
+ if (yych <= '\f') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '\t') goto yy2857;
+ goto yy2316;
+ } else {
+ if (yych <= '\r') goto yy2857;
+ if (yych == ' ') goto yy2857;
+ goto yy2316;
+ }
+ } else {
+ if (yych <= ',') {
+ if (yych <= '"') goto yy2780;
+ if (yych == '\'') goto yy2781;
+ goto yy2316;
+ } else {
+ if (yych <= '/') {
+ if (yych <= '-') goto yy2858;
+ goto yy2316;
+ } else {
+ if (yych <= ':') goto yy2783;
+ if (yych <= '<') goto yy2316;
+ }
+ }
+ }
+ } else {
+ if (yych <= 'z') {
+ if (yych <= '[') {
+ if (yych <= '>') goto yy2610;
+ if (yych <= '@') goto yy2316;
+ if (yych <= 'Z') goto yy2783;
+ goto yy2316;
+ } else {
+ if (yych <= '^') {
+ if (yych <= '\\') goto yy2318;
+ goto yy2316;
+ } else {
+ if (yych == '`') goto yy2316;
+ goto yy2783;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy2316;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2319;
+ goto yy2320;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy2321;
+ goto yy2322;
+ } else {
+ if (yych <= 0xF3) goto yy2323;
+ if (yych <= 0xF4) goto yy2324;
+ goto yy1682;
+ }
+ }
+ }
+ }
+yy2859:
+ yych = *++YYCURSOR;
+ if (yybm_init[256+yych] & 16) {
+ goto yy2328;
+ }
+ if (yych <= 0xC1) {
+ if (yych <= '*') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= '"') goto yy2449;
+ goto yy2338;
+ } else {
+ if (yych <= '-') goto yy2458;
+ if (yych <= '>') goto yy2316;
+ goto yy1682;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy2460;
+ if (yych <= 0xE0) goto yy2461;
+ goto yy2462;
+ } else {
+ if (yych <= 0xF0) goto yy2463;
+ if (yych <= 0xF3) goto yy2464;
+ if (yych <= 0xF4) goto yy2465;
+ goto yy1682;
+ }
+ }
+yy2860:
+ yych = *++YYCURSOR;
+ if (yych <= ',') {
+ if (yych <= ' ') {
+ if (yych <= '\t') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= 0x08) goto yy2307;
+ goto yy2860;
+ } else {
+ if (yych == '\r') goto yy2860;
+ if (yych <= 0x1F) goto yy2307;
+ goto yy2860;
+ }
+ } else {
+ if (yych <= '&') {
+ if (yych == '"') goto yy2785;
+ goto yy2307;
+ } else {
+ if (yych <= '\'') goto yy2786;
+ if (yych == '*') goto yy2167;
+ goto yy2307;
+ }
+ }
+ } else {
+ if (yych <= 0x7F) {
+ if (yych <= '=') {
+ if (yych <= '-') goto yy2308;
+ if (yych <= '<') goto yy2307;
+ goto yy2862;
+ } else {
+ if (yych <= '>') goto yy2451;
+ if (yych == '\\') goto yy2309;
+ goto yy2307;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2310;
+ if (yych <= 0xE0) goto yy2311;
+ goto yy2312;
+ } else {
+ if (yych <= 0xF0) goto yy2313;
+ if (yych <= 0xF3) goto yy2314;
+ if (yych <= 0xF4) goto yy2315;
+ goto yy1682;
+ }
+ }
+ }
+yy2861:
+ yych = *++YYCURSOR;
+ if (yych <= '=') {
+ if (yych <= '!') {
+ if (yych <= '\f') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '\t') goto yy2860;
+ goto yy2307;
+ } else {
+ if (yych <= '\r') goto yy2860;
+ if (yych == ' ') goto yy2860;
+ goto yy2307;
+ }
+ } else {
+ if (yych <= ',') {
+ if (yych <= '"') goto yy2785;
+ if (yych == '\'') goto yy2786;
+ goto yy2307;
+ } else {
+ if (yych <= '/') {
+ if (yych <= '-') goto yy2861;
+ goto yy2307;
+ } else {
+ if (yych <= ':') goto yy2788;
+ if (yych <= '<') goto yy2307;
+ }
+ }
+ }
+ } else {
+ if (yych <= 'z') {
+ if (yych <= '[') {
+ if (yych <= '>') goto yy2609;
+ if (yych <= '@') goto yy2307;
+ if (yych <= 'Z') goto yy2788;
+ goto yy2307;
+ } else {
+ if (yych <= '^') {
+ if (yych <= '\\') goto yy2309;
+ goto yy2307;
+ } else {
+ if (yych == '`') goto yy2307;
+ goto yy2788;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) goto yy2307;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2310;
+ goto yy2311;
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy2312;
+ goto yy2313;
+ } else {
+ if (yych <= 0xF3) goto yy2314;
+ if (yych <= 0xF4) goto yy2315;
+ goto yy1682;
+ }
+ }
+ }
+ }
+yy2862:
+ yych = *++YYCURSOR;
+ if (yybm_init[256+yych] & 8) {
+ goto yy2327;
+ }
+ if (yych <= 0xC1) {
+ if (yych <= '*') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= '\'') goto yy2449;
+ goto yy2337;
+ } else {
+ if (yych <= '-') goto yy2450;
+ if (yych <= '>') goto yy2307;
+ goto yy1682;
+ }
+ } else {
+ if (yych <= 0xEF) {
+ if (yych <= 0xDF) goto yy2452;
+ if (yych <= 0xE0) goto yy2453;
+ goto yy2454;
+ } else {
+ if (yych <= 0xF0) goto yy2455;
+ if (yych <= 0xF3) goto yy2456;
+ if (yych <= 0xF4) goto yy2457;
+ goto yy1682;
+ }
+ }
+yy2863:
yych = *++YYCURSOR;
if (yych <= '<') {
if (yych <= 0x1F) {
if (yych <= '\t') {
- if (yych <= 0x00) goto yy1;
- if (yych <= 0x08) goto yy399;
- goto yy890;
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= 0x08) goto yy2175;
+ goto yy2863;
} else {
- if (yych == '\r') goto yy890;
- goto yy399;
+ if (yych == '\r') goto yy2863;
+ goto yy2175;
}
} else {
if (yych <= '"') {
- if (yych <= ' ') goto yy890;
- if (yych <= '!') goto yy399;
- goto yy835;
+ if (yych <= ' ') goto yy2863;
+ if (yych <= '!') goto yy2175;
+ goto yy2791;
} else {
- if (yych == '\'') goto yy836;
- goto yy399;
+ if (yych == '\'') goto yy2792;
+ goto yy2175;
}
}
} else {
if (yych <= 0xC1) {
if (yych <= '[') {
- if (yych <= '=') goto yy891;
- if (yych <= '>') goto yy588;
- goto yy399;
+ if (yych <= '=') goto yy2864;
+ if (yych <= '>') goto yy2475;
+ goto yy2175;
} else {
- if (yych <= '\\') goto yy400;
- if (yych <= 0x7F) goto yy399;
- goto yy1;
+ if (yych <= '\\') goto yy2176;
+ if (yych <= 0x7F) goto yy2175;
+ goto yy1682;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xDF) goto yy401;
- if (yych <= 0xE0) goto yy402;
- goto yy403;
+ if (yych <= 0xDF) goto yy2177;
+ if (yych <= 0xE0) goto yy2178;
+ goto yy2179;
} else {
- if (yych <= 0xF0) goto yy404;
- if (yych <= 0xF3) goto yy405;
- if (yych <= 0xF4) goto yy406;
- goto yy1;
+ if (yych <= 0xF0) goto yy2180;
+ if (yych <= 0xF3) goto yy2181;
+ if (yych <= 0xF4) goto yy2182;
+ goto yy1682;
}
}
}
-yy891:
+yy2864:
yych = *++YYCURSOR;
- if (yybm[0+yych] & 4) {
- goto yy492;
+ if (yybm_init[256+yych] & 128) {
+ goto yy2338;
}
if (yych <= 0xDF) {
- if (yych <= '>') {
- if (yych <= 0x00) goto yy1;
- if (yych <= '"') goto yy579;
- goto yy399;
+ if (yych <= '"') {
+ if (yych <= 0x00) goto yy1682;
+ goto yy2467;
} else {
- if (yych <= '\\') goto yy589;
- if (yych <= 0xC1) goto yy1;
- goto yy590;
+ if (yych <= '>') goto yy2175;
+ if (yych <= 0xC1) goto yy1682;
+ goto yy2476;
}
} else {
if (yych <= 0xF0) {
- if (yych <= 0xE0) goto yy591;
- if (yych <= 0xEF) goto yy592;
- goto yy593;
+ if (yych <= 0xE0) goto yy2477;
+ if (yych <= 0xEF) goto yy2478;
+ goto yy2479;
} else {
- if (yych <= 0xF3) goto yy594;
- if (yych <= 0xF4) goto yy595;
- goto yy1;
+ if (yych <= 0xF3) goto yy2480;
+ if (yych <= 0xF4) goto yy2481;
+ goto yy1682;
}
}
-yy892:
+yy2865:
yych = *++YYCURSOR;
if (yych <= '<') {
if (yych <= 0x1F) {
if (yych <= '\t') {
- if (yych <= 0x00) goto yy1;
- if (yych <= 0x08) goto yy391;
- goto yy892;
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= 0x08) goto yy2167;
+ goto yy2865;
} else {
- if (yych == '\r') goto yy892;
- goto yy391;
+ if (yych == '\r') goto yy2865;
+ goto yy2167;
}
} else {
if (yych <= '"') {
- if (yych <= ' ') goto yy892;
- if (yych <= '!') goto yy391;
- goto yy839;
+ if (yych <= ' ') goto yy2865;
+ if (yych <= '!') goto yy2167;
+ goto yy2795;
} else {
- if (yych == '\'') goto yy840;
- goto yy391;
+ if (yych == '\'') goto yy2796;
+ goto yy2167;
}
}
} else {
if (yych <= 0xC1) {
if (yych <= '[') {
- if (yych <= '=') goto yy893;
- if (yych <= '>') goto yy580;
- goto yy391;
+ if (yych <= '=') goto yy2866;
+ if (yych <= '>') goto yy2468;
+ goto yy2167;
} else {
- if (yych <= '\\') goto yy392;
- if (yych <= 0x7F) goto yy391;
- goto yy1;
+ if (yych <= '\\') goto yy2168;
+ if (yych <= 0x7F) goto yy2167;
+ goto yy1682;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xDF) goto yy393;
- if (yych <= 0xE0) goto yy394;
- goto yy395;
+ if (yych <= 0xDF) goto yy2169;
+ if (yych <= 0xE0) goto yy2170;
+ goto yy2171;
} else {
- if (yych <= 0xF0) goto yy396;
- if (yych <= 0xF3) goto yy397;
- if (yych <= 0xF4) goto yy398;
- goto yy1;
+ if (yych <= 0xF0) goto yy2172;
+ if (yych <= 0xF3) goto yy2173;
+ if (yych <= 0xF4) goto yy2174;
+ goto yy1682;
}
}
}
-yy893:
+yy2866:
yych = *++YYCURSOR;
- if (yybm[0+yych] & 2) {
- goto yy491;
+ if (yybm_init[256+yych] & 64) {
+ goto yy2337;
}
if (yych <= 0xDF) {
- if (yych <= '>') {
- if (yych <= 0x00) goto yy1;
- if (yych <= '\'') goto yy579;
- goto yy391;
+ if (yych <= '\'') {
+ if (yych <= 0x00) goto yy1682;
+ goto yy2467;
} else {
- if (yych <= '\\') goto yy581;
- if (yych <= 0xC1) goto yy1;
- goto yy582;
+ if (yych <= '>') goto yy2167;
+ if (yych <= 0xC1) goto yy1682;
+ goto yy2469;
}
} else {
if (yych <= 0xF0) {
- if (yych <= 0xE0) goto yy583;
- if (yych <= 0xEF) goto yy584;
- goto yy585;
+ if (yych <= 0xE0) goto yy2470;
+ if (yych <= 0xEF) goto yy2471;
+ goto yy2472;
} else {
- if (yych <= 0xF3) goto yy586;
- if (yych <= 0xF4) goto yy587;
- goto yy1;
+ if (yych <= 0xF3) goto yy2473;
+ if (yych <= 0xF4) goto yy2474;
+ goto yy1682;
}
}
-yy894:
+yy2867:
yych = *++YYCURSOR;
if (yych <= '=') {
if (yych <= 0x1F) {
if (yych <= '\t') {
- if (yych <= 0x00) goto yy1;
- if (yych <= 0x08) goto yy609;
- goto yy894;
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= 0x08) goto yy2495;
+ goto yy2867;
} else {
- if (yych == '\r') goto yy894;
- goto yy609;
+ if (yych == '\r') goto yy2867;
+ goto yy2495;
}
} else {
if (yych <= '\'') {
- if (yych <= ' ') goto yy894;
- if (yych <= '&') goto yy609;
- goto yy599;
+ if (yych <= ' ') goto yy2867;
+ if (yych <= '&') goto yy2495;
+ goto yy2485;
} else {
- if (yych == '/') goto yy896;
- goto yy609;
+ if (yych == '/') goto yy2869;
+ goto yy2495;
}
}
} else {
if (yych <= 0xC1) {
if (yych <= '[') {
- if (yych <= '>') goto yy513;
- if (yych <= '?') goto yy896;
- goto yy609;
+ if (yych <= '>') goto yy2359;
+ if (yych <= '?') goto yy2869;
+ goto yy2495;
} else {
- if (yych <= '\\') goto yy610;
- if (yych <= 0x7F) goto yy609;
- goto yy1;
+ if (yych <= '\\') goto yy2496;
+ if (yych <= 0x7F) goto yy2495;
+ goto yy1682;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xDF) goto yy611;
- if (yych <= 0xE0) goto yy612;
- goto yy613;
+ if (yych <= 0xDF) goto yy2497;
+ if (yych <= 0xE0) goto yy2498;
+ goto yy2499;
} else {
- if (yych <= 0xF0) goto yy614;
- if (yych <= 0xF3) goto yy615;
- if (yych <= 0xF4) goto yy616;
- goto yy1;
+ if (yych <= 0xF0) goto yy2500;
+ if (yych <= 0xF3) goto yy2501;
+ if (yych <= 0xF4) goto yy2502;
+ goto yy1682;
}
}
}
-yy895:
+yy2868:
yych = *++YYCURSOR;
if (yych <= '>') {
if (yych <= '&') {
if (yych <= '\f') {
- if (yych <= 0x00) goto yy1;
- if (yych == '\t') goto yy932;
- goto yy609;
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '\t') goto yy2915;
+ goto yy2495;
} else {
- if (yych <= '\r') goto yy932;
- if (yych == ' ') goto yy932;
- goto yy609;
+ if (yych <= '\r') goto yy2915;
+ if (yych == ' ') goto yy2915;
+ goto yy2495;
}
} else {
if (yych <= '.') {
- if (yych <= '\'') goto yy599;
- if (yych == '-') goto yy895;
- goto yy609;
+ if (yych <= '\'') goto yy2485;
+ if (yych == '-') goto yy2868;
+ goto yy2495;
} else {
if (yych <= ':') {
- if (yych >= '0') goto yy895;
+ if (yych >= '0') goto yy2868;
} else {
- if (yych <= '<') goto yy609;
- if (yych <= '=') goto yy933;
- goto yy513;
+ if (yych <= '<') goto yy2495;
+ if (yych <= '=') goto yy2916;
+ goto yy2359;
}
}
}
} else {
if (yych <= 'z') {
if (yych <= '[') {
- if (yych <= '?') goto yy896;
- if (yych <= '@') goto yy609;
- if (yych <= 'Z') goto yy895;
- goto yy609;
+ if (yych <= '?') goto yy2869;
+ if (yych <= '@') goto yy2495;
+ if (yych <= 'Z') goto yy2868;
+ goto yy2495;
} else {
if (yych <= '^') {
- if (yych <= '\\') goto yy610;
- goto yy609;
+ if (yych <= '\\') goto yy2496;
+ goto yy2495;
} else {
- if (yych == '`') goto yy609;
- goto yy895;
+ if (yych == '`') goto yy2495;
+ goto yy2868;
}
}
} else {
if (yych <= 0xE0) {
- if (yych <= 0x7F) goto yy609;
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy611;
- goto yy612;
+ if (yych <= 0x7F) goto yy2495;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2497;
+ goto yy2498;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy613;
- goto yy614;
+ if (yych <= 0xEF) goto yy2499;
+ goto yy2500;
} else {
- if (yych <= 0xF3) goto yy615;
- if (yych <= 0xF4) goto yy616;
- goto yy1;
+ if (yych <= 0xF3) goto yy2501;
+ if (yych <= 0xF4) goto yy2502;
+ goto yy1682;
}
}
}
}
-yy896:
+yy2869:
yych = *++YYCURSOR;
if (yych <= 0x7F) {
if (yych <= '=') {
- if (yych <= 0x00) goto yy1;
- if (yych == '\'') goto yy599;
- goto yy609;
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '\'') goto yy2485;
+ goto yy2495;
} else {
- if (yych <= '>') goto yy608;
- if (yych == '\\') goto yy610;
- goto yy609;
+ if (yych <= '>') goto yy2494;
+ if (yych == '\\') goto yy2496;
+ goto yy2495;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy611;
- if (yych <= 0xE0) goto yy612;
- goto yy613;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2497;
+ if (yych <= 0xE0) goto yy2498;
+ goto yy2499;
} else {
- if (yych <= 0xF0) goto yy614;
- if (yych <= 0xF3) goto yy615;
- if (yych <= 0xF4) goto yy616;
- goto yy1;
+ if (yych <= 0xF0) goto yy2500;
+ if (yych <= 0xF3) goto yy2501;
+ if (yych <= 0xF4) goto yy2502;
+ goto yy1682;
}
}
-yy897:
+yy2870:
yych = *++YYCURSOR;
if (yych <= '=') {
if (yych <= 0x1F) {
if (yych <= '\t') {
- if (yych <= 0x00) goto yy1;
- if (yych <= 0x08) goto yy598;
- goto yy897;
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= 0x08) goto yy2484;
+ goto yy2870;
} else {
- if (yych == '\r') goto yy897;
- goto yy598;
+ if (yych == '\r') goto yy2870;
+ goto yy2484;
}
} else {
if (yych <= '"') {
- if (yych <= ' ') goto yy897;
- if (yych <= '!') goto yy598;
- goto yy599;
+ if (yych <= ' ') goto yy2870;
+ if (yych <= '!') goto yy2484;
+ goto yy2485;
} else {
- if (yych == '/') goto yy899;
- goto yy598;
+ if (yych == '/') goto yy2872;
+ goto yy2484;
}
}
} else {
if (yych <= 0xC1) {
if (yych <= '[') {
- if (yych <= '>') goto yy503;
- if (yych <= '?') goto yy899;
- goto yy598;
+ if (yych <= '>') goto yy2349;
+ if (yych <= '?') goto yy2872;
+ goto yy2484;
} else {
- if (yych <= '\\') goto yy600;
- if (yych <= 0x7F) goto yy598;
- goto yy1;
+ if (yych <= '\\') goto yy2486;
+ if (yych <= 0x7F) goto yy2484;
+ goto yy1682;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xDF) goto yy601;
- if (yych <= 0xE0) goto yy602;
- goto yy603;
+ if (yych <= 0xDF) goto yy2487;
+ if (yych <= 0xE0) goto yy2488;
+ goto yy2489;
} else {
- if (yych <= 0xF0) goto yy604;
- if (yych <= 0xF3) goto yy605;
- if (yych <= 0xF4) goto yy606;
- goto yy1;
+ if (yych <= 0xF0) goto yy2490;
+ if (yych <= 0xF3) goto yy2491;
+ if (yych <= 0xF4) goto yy2492;
+ goto yy1682;
}
}
}
-yy898:
+yy2871:
yych = *++YYCURSOR;
if (yych <= '>') {
if (yych <= '!') {
if (yych <= '\f') {
- if (yych <= 0x00) goto yy1;
- if (yych == '\t') goto yy934;
- goto yy598;
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '\t') goto yy2917;
+ goto yy2484;
} else {
- if (yych <= '\r') goto yy934;
- if (yych == ' ') goto yy934;
- goto yy598;
+ if (yych <= '\r') goto yy2917;
+ if (yych == ' ') goto yy2917;
+ goto yy2484;
}
} else {
if (yych <= '.') {
- if (yych <= '"') goto yy599;
- if (yych == '-') goto yy898;
- goto yy598;
+ if (yych <= '"') goto yy2485;
+ if (yych == '-') goto yy2871;
+ goto yy2484;
} else {
if (yych <= ':') {
- if (yych >= '0') goto yy898;
+ if (yych >= '0') goto yy2871;
} else {
- if (yych <= '<') goto yy598;
- if (yych <= '=') goto yy935;
- goto yy503;
+ if (yych <= '<') goto yy2484;
+ if (yych <= '=') goto yy2918;
+ goto yy2349;
}
}
}
} else {
if (yych <= 'z') {
if (yych <= '[') {
- if (yych <= '?') goto yy899;
- if (yych <= '@') goto yy598;
- if (yych <= 'Z') goto yy898;
- goto yy598;
+ if (yych <= '?') goto yy2872;
+ if (yych <= '@') goto yy2484;
+ if (yych <= 'Z') goto yy2871;
+ goto yy2484;
} else {
if (yych <= '^') {
- if (yych <= '\\') goto yy600;
- goto yy598;
+ if (yych <= '\\') goto yy2486;
+ goto yy2484;
} else {
- if (yych == '`') goto yy598;
- goto yy898;
+ if (yych == '`') goto yy2484;
+ goto yy2871;
}
}
} else {
if (yych <= 0xE0) {
- if (yych <= 0x7F) goto yy598;
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy601;
- goto yy602;
+ if (yych <= 0x7F) goto yy2484;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2487;
+ goto yy2488;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy603;
- goto yy604;
+ if (yych <= 0xEF) goto yy2489;
+ goto yy2490;
} else {
- if (yych <= 0xF3) goto yy605;
- if (yych <= 0xF4) goto yy606;
- goto yy1;
+ if (yych <= 0xF3) goto yy2491;
+ if (yych <= 0xF4) goto yy2492;
+ goto yy1682;
}
}
}
}
-yy899:
+yy2872:
yych = *++YYCURSOR;
if (yych <= 0x7F) {
if (yych <= '=') {
- if (yych <= 0x00) goto yy1;
- if (yych == '"') goto yy599;
- goto yy598;
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '"') goto yy2485;
+ goto yy2484;
} else {
- if (yych <= '>') goto yy597;
- if (yych == '\\') goto yy600;
- goto yy598;
+ if (yych <= '>') goto yy2483;
+ if (yych == '\\') goto yy2486;
+ goto yy2484;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy601;
- if (yych <= 0xE0) goto yy602;
- goto yy603;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2487;
+ if (yych <= 0xE0) goto yy2488;
+ goto yy2489;
} else {
- if (yych <= 0xF0) goto yy604;
- if (yych <= 0xF3) goto yy605;
- if (yych <= 0xF4) goto yy606;
- goto yy1;
+ if (yych <= 0xF0) goto yy2490;
+ if (yych <= 0xF3) goto yy2491;
+ if (yych <= 0xF4) goto yy2492;
+ goto yy1682;
}
}
-yy900:
+yy2873:
yych = *++YYCURSOR;
if (yych <= '@') {
if (yych <= ',') {
if (yych <= '\f') {
- if (yych <= 0x00) goto yy1;
- if (yych == '\t') goto yy900;
- goto yy800;
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '\t') goto yy2873;
+ goto yy2734;
} else {
- if (yych <= '\r') goto yy900;
- if (yych == ' ') goto yy900;
- goto yy800;
+ if (yych <= '\r') goto yy2873;
+ if (yych == ' ') goto yy2873;
+ goto yy2734;
}
} else {
if (yych <= ':') {
- if (yych <= '-') goto yy854;
- if (yych <= '.') goto yy800;
- if (yych <= '/') goto yy855;
- goto yy854;
+ if (yych <= '-') goto yy2810;
+ if (yych <= '.') goto yy2734;
+ if (yych <= '/') goto yy2811;
+ goto yy2810;
} else {
- if (yych <= '=') goto yy800;
- if (yych <= '>') goto yy856;
- if (yych <= '?') goto yy855;
- goto yy800;
+ if (yych <= '=') goto yy2734;
+ if (yych <= '>') goto yy2812;
+ if (yych <= '?') goto yy2811;
+ goto yy2734;
}
}
} else {
if (yych <= 0x7F) {
if (yych <= '^') {
- if (yych <= 'Z') goto yy854;
- if (yych == '\\') goto yy857;
- goto yy800;
+ if (yych <= 'Z') goto yy2810;
+ if (yych == '\\') goto yy2813;
+ goto yy2734;
} else {
- if (yych == '`') goto yy800;
- if (yych <= 'z') goto yy854;
- goto yy800;
+ if (yych == '`') goto yy2734;
+ if (yych <= 'z') goto yy2810;
+ goto yy2734;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy858;
- if (yych <= 0xE0) goto yy859;
- goto yy860;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2814;
+ if (yych <= 0xE0) goto yy2815;
+ goto yy2816;
} else {
- if (yych <= 0xF0) goto yy861;
- if (yych <= 0xF3) goto yy862;
- if (yych <= 0xF4) goto yy863;
- goto yy1;
+ if (yych <= 0xF0) goto yy2817;
+ if (yych <= 0xF3) goto yy2818;
+ if (yych <= 0xF4) goto yy2819;
+ goto yy1682;
}
}
}
-yy901:
- yyaccept = 28;
+yy2874:
+ yyaccept = 38;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 0x7F) {
if (yych <= '&') {
- if (yych <= 0x00) goto yy315;
- if (yych != '"') goto yy856;
+ if (yych <= 0x00) goto yy2039;
+ if (yych != '"') goto yy2812;
} else {
- if (yych <= '\'') goto yy903;
- if (yych == '\\') goto yy904;
- goto yy856;
+ if (yych <= '\'') goto yy2876;
+ if (yych == '\\') goto yy2877;
+ goto yy2812;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xC1) goto yy315;
- if (yych <= 0xDF) goto yy905;
- if (yych <= 0xE0) goto yy906;
- goto yy907;
- } else {
- if (yych <= 0xF0) goto yy908;
- if (yych <= 0xF3) goto yy909;
- if (yych <= 0xF4) goto yy910;
- goto yy315;
+ if (yych <= 0xC1) goto yy2039;
+ if (yych <= 0xDF) goto yy2878;
+ if (yych <= 0xE0) goto yy2879;
+ goto yy2880;
+ } else {
+ if (yych <= 0xF0) goto yy2881;
+ if (yych <= 0xF3) goto yy2882;
+ if (yych <= 0xF4) goto yy2883;
+ goto yy2039;
}
}
-yy902:
+yy2875:
yych = *++YYCURSOR;
if (yych <= '?') {
if (yych <= '&') {
if (yych <= '\f') {
- if (yych <= 0x00) goto yy1;
- if (yych == '\t') goto yy936;
- goto yy631;
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '\t') goto yy2919;
+ goto yy2517;
} else {
- if (yych <= '\r') goto yy936;
- if (yych == ' ') goto yy936;
- goto yy631;
+ if (yych <= '\r') goto yy2919;
+ if (yych == ' ') goto yy2919;
+ goto yy2517;
}
} else {
if (yych <= '.') {
- if (yych <= '\'') goto yy721;
- if (yych == '-') goto yy937;
- goto yy631;
+ if (yych <= '\'') goto yy2632;
+ if (yych == '-') goto yy2920;
+ goto yy2517;
} else {
- if (yych <= '/') goto yy938;
- if (yych <= ':') goto yy937;
- if (yych <= '>') goto yy631;
- goto yy938;
+ if (yych <= '/') goto yy2921;
+ if (yych <= ':') goto yy2920;
+ if (yych <= '>') goto yy2517;
+ goto yy2921;
}
}
} else {
if (yych <= 'z') {
if (yych <= '\\') {
- if (yych <= '@') goto yy631;
- if (yych <= 'Z') goto yy937;
- if (yych <= '[') goto yy631;
- goto yy731;
+ if (yych <= '@') goto yy2517;
+ if (yych <= 'Z') goto yy2920;
+ if (yych <= '[') goto yy2517;
+ goto yy2642;
} else {
- if (yych == '_') goto yy937;
- if (yych <= '`') goto yy631;
- goto yy937;
+ if (yych == '_') goto yy2920;
+ if (yych <= '`') goto yy2517;
+ goto yy2920;
}
} else {
if (yych <= 0xE0) {
- if (yych <= 0x7F) goto yy631;
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy732;
- goto yy733;
+ if (yych <= 0x7F) goto yy2517;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2643;
+ goto yy2644;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy734;
- goto yy735;
+ if (yych <= 0xEF) goto yy2645;
+ goto yy2646;
} else {
- if (yych <= 0xF3) goto yy736;
- if (yych <= 0xF4) goto yy737;
- goto yy1;
+ if (yych <= 0xF3) goto yy2647;
+ if (yych <= 0xF4) goto yy2648;
+ goto yy1682;
}
}
}
}
-yy903:
+yy2876:
yych = *++YYCURSOR;
if (yych <= '?') {
if (yych <= '!') {
if (yych <= '\f') {
- if (yych <= 0x00) goto yy1;
- if (yych == '\t') goto yy939;
- goto yy621;
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '\t') goto yy2922;
+ goto yy2507;
} else {
- if (yych <= '\r') goto yy939;
- if (yych == ' ') goto yy939;
- goto yy621;
+ if (yych <= '\r') goto yy2922;
+ if (yych == ' ') goto yy2922;
+ goto yy2507;
}
} else {
if (yych <= '.') {
- if (yych <= '"') goto yy721;
- if (yych == '-') goto yy940;
- goto yy621;
+ if (yych <= '"') goto yy2632;
+ if (yych == '-') goto yy2923;
+ goto yy2507;
} else {
- if (yych <= '/') goto yy941;
- if (yych <= ':') goto yy940;
- if (yych <= '>') goto yy621;
- goto yy941;
+ if (yych <= '/') goto yy2924;
+ if (yych <= ':') goto yy2923;
+ if (yych <= '>') goto yy2507;
+ goto yy2924;
}
}
} else {
if (yych <= 'z') {
if (yych <= '\\') {
- if (yych <= '@') goto yy621;
- if (yych <= 'Z') goto yy940;
- if (yych <= '[') goto yy621;
- goto yy722;
+ if (yych <= '@') goto yy2507;
+ if (yych <= 'Z') goto yy2923;
+ if (yych <= '[') goto yy2507;
+ goto yy2633;
} else {
- if (yych == '_') goto yy940;
- if (yych <= '`') goto yy621;
- goto yy940;
+ if (yych == '_') goto yy2923;
+ if (yych <= '`') goto yy2507;
+ goto yy2923;
}
} else {
if (yych <= 0xE0) {
- if (yych <= 0x7F) goto yy621;
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy723;
- goto yy724;
+ if (yych <= 0x7F) goto yy2507;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2634;
+ goto yy2635;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy725;
- goto yy726;
+ if (yych <= 0xEF) goto yy2636;
+ goto yy2637;
} else {
- if (yych <= 0xF3) goto yy727;
- if (yych <= 0xF4) goto yy728;
- goto yy1;
+ if (yych <= 0xF3) goto yy2638;
+ if (yych <= 0xF4) goto yy2639;
+ goto yy1682;
}
}
}
}
-yy904:
+yy2877:
yych = *++YYCURSOR;
- if (yych <= 0xDF) {
- if (yych <= '\n') {
- if (yych <= '\t') goto yy856;
- goto yy1;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 0x00) goto yy1682;
+ goto yy2812;
} else {
- if (yych <= 0x7F) goto yy856;
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych >= 0xE0) goto yy2879;
}
} else {
if (yych <= 0xF0) {
- if (yych <= 0xE0) goto yy906;
- if (yych <= 0xEF) goto yy907;
- goto yy908;
+ if (yych <= 0xEF) goto yy2880;
+ goto yy2881;
+ } else {
+ if (yych <= 0xF3) goto yy2882;
+ if (yych <= 0xF4) goto yy2883;
+ goto yy1682;
+ }
+ }
+yy2878:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2812;
+ goto yy1682;
+yy2879:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy1682;
+ if (yych <= 0xBF) goto yy2878;
+ goto yy1682;
+yy2880:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2878;
+ goto yy1682;
+yy2881:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy1682;
+ if (yych <= 0xBF) goto yy2880;
+ goto yy1682;
+yy2882:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy2880;
+ goto yy1682;
+yy2883:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0x8F) goto yy2880;
+ goto yy1682;
+yy2884:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2925;
+ goto yy1682;
+yy2885:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '_') {
+ if (yych <= '9') {
+ if (yych <= '-') {
+ if (yych <= ',') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ yyt2 = YYCURSOR;
+ goto yy2217;
+ } else {
+ if (yych <= '.') {
+ yyt2 = YYCURSOR;
+ goto yy2224;
+ }
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
+ }
+ goto yy2055;
+ }
} else {
- if (yych <= 0xF3) goto yy909;
- if (yych <= 0xF4) goto yy910;
- goto yy1;
+ if (yych <= '@') {
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2886;
+ }
+ if (yych <= '?') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ yyt2 = YYCURSOR;
+ goto yy2128;
+ } else {
+ if (yych <= 'Z') goto yy2055;
+ if (yych <= '^') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ yyt2 = YYCURSOR;
+ goto yy2057;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2055;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= 0xC1) goto yy1650;
+ yyt2 = YYCURSOR;
+ goto yy1900;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy1902;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1903;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1650;
+ }
}
}
-yy905:
- yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy856;
- goto yy1;
-yy906:
- yych = *++YYCURSOR;
- if (yych <= 0x9F) goto yy1;
- if (yych <= 0xBF) goto yy905;
- goto yy1;
-yy907:
- yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy905;
- goto yy1;
-yy908:
+yy2886:
yych = *++YYCURSOR;
- if (yych <= 0x8F) goto yy1;
- if (yych <= 0xBF) goto yy907;
- goto yy1;
-yy909:
- yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy907;
- goto yy1;
-yy910:
- yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0x8F) goto yy907;
- goto yy1;
-yy911:
+ if (yych == ' ') goto yy1892;
+ if (yych == ':') goto yy1935;
+ goto yy1682;
+yy2887:
+ yyaccept = 7;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '^') {
+ if (yych <= '5') {
+ if (yych <= '-') {
+ if (yych <= ',') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ yyt2 = YYCURSOR;
+ goto yy2217;
+ } else {
+ if (yych <= '.') {
+ yyt2 = YYCURSOR;
+ goto yy2224;
+ }
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
+ }
+ goto yy2885;
+ }
+ } else {
+ if (yych <= '?') {
+ if (yych <= '9') goto yy2055;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2886;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ } else {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy2128;
+ }
+ if (yych <= 'Z') goto yy2055;
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= '_') {
+ yyt2 = YYCURSOR;
+ goto yy2057;
+ }
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2055;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= 0xC1) goto yy1650;
+ yyt2 = YYCURSOR;
+ goto yy1900;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy1902;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1903;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1650;
+ }
+ }
+ }
+yy2888:
yych = *++YYCURSOR;
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy942;
- goto yy1;
-yy912:
- yyaccept = 29;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2926;
+ goto yy1682;
+yy2889:
+ yyaccept = 39;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 0xDF) {
if (yych <= ':') {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy642;
+ goto yy2537;
}
if (yych <= '9') {
yyt1 = YYCURSOR;
- goto yy944;
+ goto yy2928;
}
- goto yy643;
+ goto yy2538;
} else {
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy642;
+ goto yy2537;
}
- if (yych <= 0xC1) goto yy643;
+ if (yych <= 0xC1) goto yy2538;
yyt2 = YYCURSOR;
- goto yy645;
+ goto yy2540;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy646;
+ goto yy2541;
}
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy647;
+ goto yy2542;
}
yyt2 = YYCURSOR;
- goto yy648;
+ goto yy2543;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy649;
+ goto yy2544;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy650;
+ goto yy2545;
}
- goto yy643;
+ goto yy2538;
}
}
-yy913:
+yy2890:
yych = *++YYCURSOR;
- if (yych == 'e') goto yy945;
- goto yy1;
-yy914:
+ if (yych == 'e') goto yy2929;
+ goto yy1682;
+yy2891:
yych = *++YYCURSOR;
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy946;
- goto yy1;
-yy915:
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2930;
+ goto yy1682;
+yy2892:
yych = *++YYCURSOR;
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy947;
- goto yy1;
-yy916:
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2931;
+ goto yy1682;
+yy2893:
yych = *++YYCURSOR;
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy947;
- if (yych <= ':') goto yy152;
- goto yy1;
-yy917:
- yyaccept = 0;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2931;
+ if (yych <= ':') goto yy1731;
+ goto yy1682;
+yy2894:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '?') {
+ if (yych <= '@') {
+ if (yych <= '/') goto yy1746;
+ if (yych <= '9') goto yy2932;
+ goto yy1746;
+ } else {
+ if (yych <= 'F') goto yy2932;
+ if (yych <= '`') goto yy1746;
+ if (yych <= 'f') goto yy2932;
+ goto yy1746;
+ }
+yy2895:
+ yyaccept = 11;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ if (yych <= '7') {
if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
+ if (yych == '%') goto yy1727;
+ if (yych <= '*') goto yy1733;
+ goto yy1884;
} else {
- if (yych <= '.') {
- if (yych <= ',') goto yy4;
- goto yy46;
+ if (yych <= '-') {
+ if (yych <= ',') goto yy1733;
+ goto yy1884;
} else {
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy948;
- goto yy4;
+ if (yych <= '.') goto yy1985;
+ if (yych <= '/') goto yy1884;
+ goto yy2933;
}
}
} else {
- if (yych <= '^') {
- if (yych <= '@') goto yy96;
- if (yych <= 'F') goto yy948;
- if (yych <= 'Z') goto yy46;
- goto yy4;
+ if (yych <= 'Z') {
+ if (yych <= '9') goto yy2934;
+ if (yych <= ':') goto yy1884;
+ if (yych <= '?') goto yy1733;
+ goto yy1884;
} else {
- if (yych <= '`') {
- if (yych <= '_') goto yy46;
- goto yy4;
+ if (yych <= '_') {
+ if (yych <= '^') goto yy1733;
+ goto yy1884;
} else {
- if (yych <= 'f') goto yy948;
- if (yych <= 'z') goto yy46;
- goto yy4;
+ if (yych <= '`') goto yy1733;
+ if (yych <= 'z') goto yy1884;
+ goto yy1733;
}
}
}
-yy918:
- yyaccept = 11;
+yy2896:
+ yyaccept = 12;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
}
- if (yych <= '9') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy109;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy109;
- goto yy4;
- } else {
- if (yych <= 0x1A) {
- if (yych <= '\r') goto yy109;
- goto yy4;
- } else {
- if (yych <= 0x1B) goto yy109;
- if (yych <= 0x1F) goto yy4;
- goto yy109;
- }
+ if (yych <= '-') {
+ if (yych == '%') goto yy1727;
+ goto yy1884;
+ } else {
+ if (yych <= '.') goto yy1985;
+ if (yych <= '/') goto yy1884;
+ if (yych <= '9') goto yy2934;
+ goto yy1884;
+ }
+yy2897:
+ yych = *++YYCURSOR;
+ if (yych <= 'z') {
+ if (yych <= '9') {
+ if (yych == '%') {
+ yyt1 = YYCURSOR;
+ goto yy2575;
}
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy1682;
} else {
- if (yych <= ',') {
- if (yych <= '%') {
- if (yych <= '$') goto yy4;
- goto yy105;
- } else {
- if (yych == '+') goto yy80;
- goto yy109;
+ if (yych <= '@') {
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2755;
}
+ yyt2 = YYCURSOR;
+ goto yy1892;
} else {
- if (yych <= '.') {
- if (yych <= '-') goto yy46;
- goto yy266;
- } else {
- if (yych <= '/') goto yy4;
- if (yych <= '7') goto yy949;
- goto yy950;
+ if (yych <= 'Z') goto yy1682;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
+ goto yy1682;
}
}
} else {
- if (yych <= '_') {
- if (yych <= 'D') {
- if (yych <= ':') goto yy148;
- if (yych <= '?') goto yy109;
- if (yych <= '@') goto yy96;
- goto yy196;
- } else {
- if (yych <= 'F') {
- if (yych <= 'E') goto yy754;
- goto yy196;
- } else {
- if (yych <= 'Z') goto yy115;
- if (yych <= '^') goto yy109;
- goto yy46;
- }
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy1900;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1901;
} else {
- if (yych <= 'z') {
- if (yych <= 'd') {
- if (yych <= '`') goto yy109;
- goto yy196;
- } else {
- if (yych <= 'e') goto yy754;
- if (yych <= 'f') goto yy196;
- goto yy115;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy1902;
}
+ yyt2 = YYCURSOR;
+ goto yy1903;
} else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy109;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy109;
- if (yych <= 0xF4) goto yy4;
- goto yy109;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
}
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1682;
}
}
}
-yy919:
- yyaccept = 6;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
- }
- if (yych <= '9') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy26;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy26;
- goto yy4;
+yy2898:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '%') {
+ if (yych <= '$') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ yyt1 = YYCURSOR;
+ goto yy2575;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') goto yy26;
- goto yy4;
- } else {
- if (yych <= 0x1B) goto yy26;
- if (yych <= 0x1F) goto yy4;
- goto yy26;
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
+ if (yych <= '9') goto yy2935;
+ yyt2 = YYCURSOR;
}
} else {
- if (yych <= '+') {
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy105;
- if (yych <= '*') goto yy26;
- goto yy80;
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2935;
} else {
- if (yych <= '-') {
- if (yych <= ',') goto yy26;
- goto yy46;
- } else {
- if (yych <= '.') goto yy266;
- if (yych <= '/') goto yy4;
- goto yy950;
+ if (yych <= 'Z') goto yy1682;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
+ goto yy2935;
}
}
} else {
- if (yych <= '_') {
- if (yych <= 'D') {
- if (yych <= ':') goto yy148;
- if (yych <= '?') goto yy26;
- if (yych <= '@') goto yy96;
- goto yy196;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy1682;
+ yyt2 = YYCURSOR;
+ goto yy1892;
} else {
- if (yych <= 'F') {
- if (yych <= 'E') goto yy754;
- goto yy196;
- } else {
- if (yych <= 'Z') goto yy115;
- if (yych <= '^') goto yy26;
- goto yy46;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy1900;
}
+ yyt2 = YYCURSOR;
+ goto yy1901;
}
} else {
- if (yych <= 'z') {
- if (yych <= 'd') {
- if (yych <= '`') goto yy26;
- goto yy196;
- } else {
- if (yych <= 'e') goto yy754;
- if (yych <= 'f') goto yy196;
- goto yy115;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy1902;
}
+ yyt2 = YYCURSOR;
+ goto yy1903;
} else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy26;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy26;
- if (yych <= 0xF4) goto yy4;
- goto yy26;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
}
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1682;
}
}
}
-yy920:
- yyaccept = 6;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '/') {
- if (yych <= 0x1F) {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy26;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy26;
- goto yy4;
- } else {
- if (yych <= '\r') goto yy26;
- if (yych == 0x1B) goto yy26;
- goto yy4;
+yy2899:
+ yych = *++YYCURSOR;
+ if (yych <= '9') {
+ if (yych == ' ') goto yy1892;
+ if (yych <= '/') goto yy1682;
+ goto yy2936;
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy1682;
+ goto yy2936;
+ } else {
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2936;
+ goto yy1682;
+ }
+ }
+yy2900:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2937;
+ if (yych <= ':') goto yy2680;
+ goto yy1682;
+ } else {
+ if (yych <= 'F') goto yy2937;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2937;
+ goto yy1682;
+ }
+yy2901:
+ yych = *++YYCURSOR;
+ if (yych == ':') goto yy2759;
+ goto yy1682;
+yy2902:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2938;
+ if (yych >= ';') goto yy1682;
+ } else {
+ if (yych <= 'F') goto yy2938;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2938;
+ goto yy1682;
+ }
+yy2903:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2939;
+ if (yych <= ':') goto yy2940;
+ goto yy1682;
+ } else {
+ if (yych <= 'F') goto yy2939;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2939;
+ goto yy1682;
+ }
+yy2904:
+ yych = *++YYCURSOR;
+ if (yych <= 'z') {
+ if (yych <= '@') {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= '9') goto yy2941;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2942;
}
+ yyt2 = YYCURSOR;
+ goto yy1892;
} else {
- if (yych <= '*') {
- if (yych <= '#') goto yy26;
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy80;
- goto yy26;
+ if (yych <= 'Z') {
+ if (yych <= 'F') goto yy2941;
+ goto yy1682;
} else {
- if (yych <= '+') goto yy80;
- if (yych <= ',') goto yy26;
- if (yych <= '.') goto yy46;
- goto yy4;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= 'f') goto yy2941;
+ goto yy1682;
}
}
} else {
- if (yych <= '_') {
- if (yych <= '@') {
- if (yych <= '9') goto yy951;
- if (yych <= ':') goto yy4;
- if (yych <= '?') goto yy26;
- goto yy96;
- } else {
- if (yych <= 'F') goto yy948;
- if (yych <= 'Z') goto yy46;
- if (yych <= '^') goto yy26;
- goto yy46;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy1900;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1901;
} else {
- if (yych <= '~') {
- if (yych <= '`') goto yy26;
- if (yych <= 'f') goto yy948;
- if (yych <= 'z') goto yy46;
- goto yy26;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy1902;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1903;
} else {
- if (yych <= 0x7F) goto yy4;
- if (yych <= 0xC1) goto yy26;
- if (yych <= 0xF4) goto yy4;
- goto yy26;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1682;
}
}
}
-yy921:
+yy2905:
yych = *++YYCURSOR;
if (yych <= 'z') {
- if (yych <= '9') {
- if (yych == '%') {
- yyt1 = YYCURSOR;
- goto yy680;
- }
+ if (yych <= '@') {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy1;
- } else {
- if (yych <= '@') {
- if (yych <= ':') goto yy816;
+ if (yych <= '9') goto yy2943;
+ if (yych <= ':') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy2842;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= 'F') goto yy2943;
+ goto yy1682;
} else {
- if (yych <= 'Z') goto yy1;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy1;
+ if (yych <= 'f') goto yy2943;
+ goto yy1682;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy922:
+yy2906:
yych = *++YYCURSOR;
if (yych <= 'f') {
if (yych <= ':') {
- if (yych <= '%') {
- if (yych <= '$') {
+ if (yych <= '.') {
+ if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- yyt1 = YYCURSOR;
- goto yy680;
+ yyt4 = YYCURSOR;
+ goto yy2420;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '9') goto yy952;
+ if (yych <= '9') goto yy2943;
+ yyt2 = YYCURSOR;
+ goto yy2842;
}
} else {
if (yych <= 'F') {
if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy952;
+ goto yy2943;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy952;
+ goto yy2943;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy923:
- yych = *++YYCURSOR;
- if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy953;
- goto yy1;
- } else {
- if (yych <= 'F') goto yy953;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy953;
- goto yy1;
- }
-yy924:
- yych = *++YYCURSOR;
- if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy954;
- if (yych <= ':') goto yy763;
- goto yy1;
- } else {
- if (yych <= 'F') goto yy954;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy954;
- goto yy1;
- }
-yy925:
- yych = *++YYCURSOR;
- if (yych == ':') goto yy820;
- goto yy1;
-yy926:
- yych = *++YYCURSOR;
- if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy955;
- if (yych >= ';') goto yy1;
- } else {
- if (yych <= 'F') goto yy955;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy955;
- goto yy1;
- }
-yy927:
- yych = *++YYCURSOR;
- if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy956;
- if (yych <= ':') goto yy957;
- goto yy1;
+yy2907:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ switch (yych) {
+ case '%': goto yy1727;
+ case '+':
+ case '-':
+ case '/':
+ case ':':
+ case '@':
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy1884;
+ case '.': goto yy2019;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy2944;
+ case 'B':
+ case 'b': goto yy2692;
+ case 'E':
+ case 'e': goto yy2693;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy1740;
+ case 'S':
+ case 's': goto yy1744;
+ case 'm': goto yy1747;
+ case 'p':
+ case 'u': goto yy1748;
+ default: goto yy1635;
+ }
+yy2908:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ switch (yych) {
+ case '%':
+ case '+':
+ case '-':
+ case '.':
+ case '/':
+ case ':':
+ case '@':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy1746;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy2945;
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'E':
+ case 'F':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'e':
+ case 'f': goto yy2932;
+ case 'B':
+ case 'b': goto yy2946;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy2153;
+ case 'S':
+ case 's': goto yy2154;
+ case 'm': goto yy2155;
+ case 'p':
+ case 'u': goto yy2156;
+ default: goto yy1635;
+ }
+yy2909:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '?') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1746;
+ if (yych <= '*') goto yy1635;
+ goto yy1746;
+ } else {
+ if (yych <= '/') {
+ if (yych <= ',') goto yy1635;
+ goto yy1746;
+ } else {
+ if (yych <= '9') goto yy2932;
+ if (yych <= ':') goto yy1746;
+ goto yy1635;
+ }
+ }
} else {
- if (yych <= 'F') goto yy956;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy956;
- goto yy1;
+ if (yych <= '^') {
+ if (yych <= '@') goto yy1746;
+ if (yych <= 'F') goto yy2932;
+ if (yych <= 'Z') goto yy1746;
+ goto yy1635;
+ } else {
+ if (yych <= '`') {
+ if (yych <= '_') goto yy1746;
+ goto yy1635;
+ } else {
+ if (yych <= 'f') goto yy2932;
+ if (yych <= 'z') goto yy1746;
+ goto yy1635;
+ }
+ }
}
-yy928:
+yy2910:
yych = *++YYCURSOR;
- if (yych <= 'z') {
- if (yych <= '@') {
- if (yych <= '/') {
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ yyt1 = YYCURSOR;
+ goto yy2020;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= '9') goto yy2947;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy2948;
}
- if (yych <= '9') goto yy958;
- if (yych <= ':') goto yy959;
- yyt2 = YYCURSOR;
- goto yy198;
} else {
- if (yych <= 'Z') {
- if (yych <= 'F') goto yy958;
- goto yy1;
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2683;
} else {
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 'f') goto yy958;
- goto yy1;
+ goto yy2683;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
- }
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) {
+ goto yy1892;
+ } else {
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy1900;
+ }
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1901;
}
- yyt2 = YYCURSOR;
- goto yy206;
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy929:
+yy2911:
yych = *++YYCURSOR;
- if (yych <= 'z') {
- if (yych <= '@') {
- if (yych <= '/') {
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ yyt1 = YYCURSOR;
+ goto yy2020;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= '9') goto yy2949;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy2682;
}
- if (yych <= '9') goto yy960;
- if (yych <= ':') goto yy882;
- yyt2 = YYCURSOR;
- goto yy198;
} else {
- if (yych <= 'Z') {
- if (yych <= 'F') goto yy960;
- goto yy1;
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2683;
} else {
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 'f') goto yy960;
- goto yy1;
+ goto yy2683;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
+ } else {
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy1900;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1901;
}
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) {
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy1902;
+ }
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1903;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1682;
+ }
+ }
+ }
+yy2912:
+ yych = *++YYCURSOR;
+ if (yych <= '`') {
+ if (yych <= '5') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ yyt1 = YYCURSOR;
+ goto yy2020;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= '4') goto yy2949;
+ goto yy2950;
+ }
+ } else {
+ if (yych <= '@') {
+ if (yych <= '9') goto yy2947;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2682;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ } else {
+ if (yych <= 'F') goto yy2683;
+ if (yych <= 'Z') goto yy1682;
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= 'f') goto yy2683;
+ goto yy1682;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= 0xC1) goto yy1682;
+ yyt2 = YYCURSOR;
+ goto yy1900;
}
- yyt2 = YYCURSOR;
- goto yy206;
} else {
if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy930:
+yy2913:
yych = *++YYCURSOR;
if (yych <= 'f') {
if (yych <= ':') {
if (yych <= '.') {
if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
yyt1 = YYCURSOR;
- goto yy297;
+ goto yy2020;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '9') goto yy960;
- goto yy882;
+ if (yych <= '9') goto yy2947;
+ yyt2 = YYCURSOR;
+ goto yy2682;
}
} else {
if (yych <= 'F') {
if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy960;
+ goto yy2683;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy960;
+ goto yy2683;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy931:
+yy2914:
yych = *++YYCURSOR;
if (yych <= 'f') {
if (yych <= ':') {
if (yych <= '.') {
if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
yyt1 = YYCURSOR;
- goto yy297;
+ goto yy2020;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '9') goto yy764;
- goto yy961;
+ if (yych <= '9') goto yy2690;
+ yyt2 = YYCURSOR;
+ goto yy2431;
}
} else {
if (yych <= 'F') {
if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy766;
+ goto yy2690;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy766;
+ goto yy2690;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy932:
+yy2915:
yych = *++YYCURSOR;
if (yych <= '=') {
if (yych <= 0x1F) {
if (yych <= '\t') {
- if (yych <= 0x00) goto yy1;
- if (yych <= 0x08) goto yy609;
- goto yy932;
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= 0x08) goto yy2495;
+ goto yy2915;
} else {
- if (yych == '\r') goto yy932;
- goto yy609;
+ if (yych == '\r') goto yy2915;
+ goto yy2495;
}
} else {
if (yych <= '\'') {
- if (yych <= ' ') goto yy932;
- if (yych <= '&') goto yy609;
- goto yy599;
+ if (yych <= ' ') goto yy2915;
+ if (yych <= '&') goto yy2495;
+ goto yy2485;
} else {
- if (yych == '/') goto yy896;
- if (yych <= '<') goto yy609;
+ if (yych == '/') goto yy2869;
+ if (yych <= '<') goto yy2495;
}
}
} else {
if (yych <= 0xC1) {
if (yych <= '[') {
- if (yych <= '>') goto yy513;
- if (yych <= '?') goto yy896;
- goto yy609;
+ if (yych <= '>') goto yy2359;
+ if (yych <= '?') goto yy2869;
+ goto yy2495;
} else {
- if (yych <= '\\') goto yy610;
- if (yych <= 0x7F) goto yy609;
- goto yy1;
+ if (yych <= '\\') goto yy2496;
+ if (yych <= 0x7F) goto yy2495;
+ goto yy1682;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xDF) goto yy611;
- if (yych <= 0xE0) goto yy612;
- goto yy613;
+ if (yych <= 0xDF) goto yy2497;
+ if (yych <= 0xE0) goto yy2498;
+ goto yy2499;
} else {
- if (yych <= 0xF0) goto yy614;
- if (yych <= 0xF3) goto yy615;
- if (yych <= 0xF4) goto yy616;
- goto yy1;
+ if (yych <= 0xF0) goto yy2500;
+ if (yych <= 0xF3) goto yy2501;
+ if (yych <= 0xF4) goto yy2502;
+ goto yy1682;
}
}
}
-yy933:
+yy2916:
yych = *++YYCURSOR;
if (yych <= '>') {
if (yych <= '\r') {
if (yych <= 0x08) {
- if (yych <= 0x00) goto yy1;
- goto yy413;
+ if (yych <= 0x00) goto yy1682;
+ goto yy2203;
} else {
- if (yych <= '\t') goto yy607;
- if (yych <= '\f') goto yy413;
- goto yy607;
+ if (yych <= '\t') goto yy2493;
+ if (yych <= '\f') goto yy2203;
+ goto yy2493;
}
} else {
if (yych <= '!') {
- if (yych == ' ') goto yy607;
- goto yy413;
+ if (yych == ' ') goto yy2493;
+ goto yy2203;
} else {
- if (yych <= '"') goto yy717;
- if (yych <= '=') goto yy413;
- goto yy609;
+ if (yych <= '"') goto yy2628;
+ if (yych <= '=') goto yy2203;
+ goto yy2495;
}
}
} else {
if (yych <= 0xDF) {
if (yych <= '\\') {
- if (yych <= '[') goto yy413;
- goto yy514;
+ if (yych <= '[') goto yy2203;
+ goto yy2360;
} else {
- if (yych <= 0x7F) goto yy413;
- if (yych <= 0xC1) goto yy1;
- goto yy515;
+ if (yych <= 0x7F) goto yy2203;
+ if (yych <= 0xC1) goto yy1682;
+ goto yy2361;
}
} else {
if (yych <= 0xF0) {
- if (yych <= 0xE0) goto yy516;
- if (yych <= 0xEF) goto yy517;
- goto yy518;
+ if (yych <= 0xE0) goto yy2362;
+ if (yych <= 0xEF) goto yy2363;
+ goto yy2364;
} else {
- if (yych <= 0xF3) goto yy519;
- if (yych <= 0xF4) goto yy520;
- goto yy1;
+ if (yych <= 0xF3) goto yy2365;
+ if (yych <= 0xF4) goto yy2366;
+ goto yy1682;
}
}
}
-yy934:
+yy2917:
yych = *++YYCURSOR;
if (yych <= '=') {
if (yych <= 0x1F) {
if (yych <= '\t') {
- if (yych <= 0x00) goto yy1;
- if (yych <= 0x08) goto yy598;
- goto yy934;
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= 0x08) goto yy2484;
+ goto yy2917;
} else {
- if (yych == '\r') goto yy934;
- goto yy598;
+ if (yych == '\r') goto yy2917;
+ goto yy2484;
}
} else {
if (yych <= '"') {
- if (yych <= ' ') goto yy934;
- if (yych <= '!') goto yy598;
- goto yy599;
+ if (yych <= ' ') goto yy2917;
+ if (yych <= '!') goto yy2484;
+ goto yy2485;
} else {
- if (yych == '/') goto yy899;
- if (yych <= '<') goto yy598;
+ if (yych == '/') goto yy2872;
+ if (yych <= '<') goto yy2484;
}
}
} else {
if (yych <= 0xC1) {
if (yych <= '[') {
- if (yych <= '>') goto yy503;
- if (yych <= '?') goto yy899;
- goto yy598;
+ if (yych <= '>') goto yy2349;
+ if (yych <= '?') goto yy2872;
+ goto yy2484;
} else {
- if (yych <= '\\') goto yy600;
- if (yych <= 0x7F) goto yy598;
- goto yy1;
+ if (yych <= '\\') goto yy2486;
+ if (yych <= 0x7F) goto yy2484;
+ goto yy1682;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xDF) goto yy601;
- if (yych <= 0xE0) goto yy602;
- goto yy603;
+ if (yych <= 0xDF) goto yy2487;
+ if (yych <= 0xE0) goto yy2488;
+ goto yy2489;
} else {
- if (yych <= 0xF0) goto yy604;
- if (yych <= 0xF3) goto yy605;
- if (yych <= 0xF4) goto yy606;
- goto yy1;
+ if (yych <= 0xF0) goto yy2490;
+ if (yych <= 0xF3) goto yy2491;
+ if (yych <= 0xF4) goto yy2492;
+ goto yy1682;
}
}
}
-yy935:
+yy2918:
yych = *++YYCURSOR;
if (yych <= '>') {
if (yych <= '\r') {
if (yych <= 0x08) {
- if (yych <= 0x00) goto yy1;
- goto yy412;
+ if (yych <= 0x00) goto yy1682;
+ goto yy2202;
} else {
- if (yych <= '\t') goto yy596;
- if (yych <= '\f') goto yy412;
- goto yy596;
+ if (yych <= '\t') goto yy2482;
+ if (yych <= '\f') goto yy2202;
+ goto yy2482;
}
} else {
if (yych <= '&') {
- if (yych == ' ') goto yy596;
- goto yy412;
+ if (yych == ' ') goto yy2482;
+ goto yy2202;
} else {
- if (yych <= '\'') goto yy717;
- if (yych <= '=') goto yy412;
- goto yy598;
+ if (yych <= '\'') goto yy2628;
+ if (yych <= '=') goto yy2202;
+ goto yy2484;
}
}
} else {
if (yych <= 0xDF) {
if (yych <= '\\') {
- if (yych <= '[') goto yy412;
- goto yy504;
+ if (yych <= '[') goto yy2202;
+ goto yy2350;
} else {
- if (yych <= 0x7F) goto yy412;
- if (yych <= 0xC1) goto yy1;
- goto yy505;
+ if (yych <= 0x7F) goto yy2202;
+ if (yych <= 0xC1) goto yy1682;
+ goto yy2351;
}
} else {
if (yych <= 0xF0) {
- if (yych <= 0xE0) goto yy506;
- if (yych <= 0xEF) goto yy507;
- goto yy508;
+ if (yych <= 0xE0) goto yy2352;
+ if (yych <= 0xEF) goto yy2353;
+ goto yy2354;
} else {
- if (yych <= 0xF3) goto yy509;
- if (yych <= 0xF4) goto yy510;
- goto yy1;
+ if (yych <= 0xF3) goto yy2355;
+ if (yych <= 0xF4) goto yy2356;
+ goto yy1682;
}
}
}
-yy936:
+yy2919:
yych = *++YYCURSOR;
if (yych <= '>') {
if (yych <= 0x1F) {
if (yych <= '\t') {
- if (yych <= 0x00) goto yy1;
- if (yych <= 0x08) goto yy631;
- goto yy936;
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= 0x08) goto yy2517;
+ goto yy2919;
} else {
- if (yych == '\r') goto yy936;
- goto yy631;
+ if (yych == '\r') goto yy2919;
+ goto yy2517;
}
} else {
if (yych <= '\'') {
- if (yych <= ' ') goto yy936;
- if (yych <= '&') goto yy631;
- goto yy721;
+ if (yych <= ' ') goto yy2919;
+ if (yych <= '&') goto yy2517;
+ goto yy2632;
} else {
- if (yych == '/') goto yy938;
- goto yy631;
+ if (yych == '/') goto yy2921;
+ goto yy2517;
}
}
} else {
if (yych <= 0xDF) {
if (yych <= '\\') {
- if (yych <= '?') goto yy938;
- if (yych <= '[') goto yy631;
- goto yy731;
+ if (yych <= '?') goto yy2921;
+ if (yych <= '[') goto yy2517;
+ goto yy2642;
} else {
- if (yych <= 0x7F) goto yy631;
- if (yych <= 0xC1) goto yy1;
- goto yy732;
+ if (yych <= 0x7F) goto yy2517;
+ if (yych <= 0xC1) goto yy1682;
+ goto yy2643;
}
} else {
if (yych <= 0xF0) {
- if (yych <= 0xE0) goto yy733;
- if (yych <= 0xEF) goto yy734;
- goto yy735;
+ if (yych <= 0xE0) goto yy2644;
+ if (yych <= 0xEF) goto yy2645;
+ goto yy2646;
} else {
- if (yych <= 0xF3) goto yy736;
- if (yych <= 0xF4) goto yy737;
- goto yy1;
+ if (yych <= 0xF3) goto yy2647;
+ if (yych <= 0xF4) goto yy2648;
+ goto yy1682;
}
}
}
-yy937:
+yy2920:
yych = *++YYCURSOR;
if (yych <= '>') {
if (yych <= '&') {
if (yych <= '\f') {
- if (yych <= 0x00) goto yy1;
- if (yych == '\t') goto yy962;
- goto yy631;
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '\t') goto yy2951;
+ goto yy2517;
} else {
- if (yych <= '\r') goto yy962;
- if (yych == ' ') goto yy962;
- goto yy631;
+ if (yych <= '\r') goto yy2951;
+ if (yych == ' ') goto yy2951;
+ goto yy2517;
}
} else {
if (yych <= '.') {
- if (yych <= '\'') goto yy721;
- if (yych == '-') goto yy937;
- goto yy631;
+ if (yych <= '\'') goto yy2632;
+ if (yych == '-') goto yy2920;
+ goto yy2517;
} else {
if (yych <= ':') {
- if (yych >= '0') goto yy937;
+ if (yych >= '0') goto yy2920;
} else {
- if (yych == '=') goto yy963;
- goto yy631;
+ if (yych == '=') goto yy2952;
+ goto yy2517;
}
}
}
} else {
if (yych <= 'z') {
if (yych <= '[') {
- if (yych <= '?') goto yy938;
- if (yych <= '@') goto yy631;
- if (yych <= 'Z') goto yy937;
- goto yy631;
+ if (yych <= '?') goto yy2921;
+ if (yych <= '@') goto yy2517;
+ if (yych <= 'Z') goto yy2920;
+ goto yy2517;
} else {
if (yych <= '^') {
- if (yych <= '\\') goto yy731;
- goto yy631;
+ if (yych <= '\\') goto yy2642;
+ goto yy2517;
} else {
- if (yych == '`') goto yy631;
- goto yy937;
+ if (yych == '`') goto yy2517;
+ goto yy2920;
}
}
} else {
if (yych <= 0xE0) {
- if (yych <= 0x7F) goto yy631;
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy732;
- goto yy733;
+ if (yych <= 0x7F) goto yy2517;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2643;
+ goto yy2644;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy734;
- goto yy735;
+ if (yych <= 0xEF) goto yy2645;
+ goto yy2646;
} else {
- if (yych <= 0xF3) goto yy736;
- if (yych <= 0xF4) goto yy737;
- goto yy1;
+ if (yych <= 0xF3) goto yy2647;
+ if (yych <= 0xF4) goto yy2648;
+ goto yy1682;
}
}
}
}
-yy938:
+yy2921:
yych = *++YYCURSOR;
if (yych <= 0x7F) {
if (yych <= '=') {
- if (yych <= 0x00) goto yy1;
- if (yych == '\'') goto yy721;
- goto yy631;
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '\'') goto yy2632;
+ goto yy2517;
} else {
- if (yych <= '>') goto yy730;
- if (yych == '\\') goto yy731;
- goto yy631;
+ if (yych <= '>') goto yy2641;
+ if (yych == '\\') goto yy2642;
+ goto yy2517;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy732;
- if (yych <= 0xE0) goto yy733;
- goto yy734;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2643;
+ if (yych <= 0xE0) goto yy2644;
+ goto yy2645;
} else {
- if (yych <= 0xF0) goto yy735;
- if (yych <= 0xF3) goto yy736;
- if (yych <= 0xF4) goto yy737;
- goto yy1;
+ if (yych <= 0xF0) goto yy2646;
+ if (yych <= 0xF3) goto yy2647;
+ if (yych <= 0xF4) goto yy2648;
+ goto yy1682;
}
}
-yy939:
+yy2922:
yych = *++YYCURSOR;
if (yych <= '>') {
if (yych <= 0x1F) {
if (yych <= '\t') {
- if (yych <= 0x00) goto yy1;
- if (yych <= 0x08) goto yy621;
- goto yy939;
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= 0x08) goto yy2507;
+ goto yy2922;
} else {
- if (yych == '\r') goto yy939;
- goto yy621;
+ if (yych == '\r') goto yy2922;
+ goto yy2507;
}
} else {
if (yych <= '"') {
- if (yych <= ' ') goto yy939;
- if (yych <= '!') goto yy621;
- goto yy721;
+ if (yych <= ' ') goto yy2922;
+ if (yych <= '!') goto yy2507;
+ goto yy2632;
} else {
- if (yych == '/') goto yy941;
- goto yy621;
+ if (yych == '/') goto yy2924;
+ goto yy2507;
}
}
} else {
if (yych <= 0xDF) {
if (yych <= '\\') {
- if (yych <= '?') goto yy941;
- if (yych <= '[') goto yy621;
- goto yy722;
+ if (yych <= '?') goto yy2924;
+ if (yych <= '[') goto yy2507;
+ goto yy2633;
} else {
- if (yych <= 0x7F) goto yy621;
- if (yych <= 0xC1) goto yy1;
- goto yy723;
+ if (yych <= 0x7F) goto yy2507;
+ if (yych <= 0xC1) goto yy1682;
+ goto yy2634;
}
} else {
if (yych <= 0xF0) {
- if (yych <= 0xE0) goto yy724;
- if (yych <= 0xEF) goto yy725;
- goto yy726;
+ if (yych <= 0xE0) goto yy2635;
+ if (yych <= 0xEF) goto yy2636;
+ goto yy2637;
} else {
- if (yych <= 0xF3) goto yy727;
- if (yych <= 0xF4) goto yy728;
- goto yy1;
+ if (yych <= 0xF3) goto yy2638;
+ if (yych <= 0xF4) goto yy2639;
+ goto yy1682;
}
}
}
-yy940:
+yy2923:
yych = *++YYCURSOR;
if (yych <= '>') {
if (yych <= '!') {
if (yych <= '\f') {
- if (yych <= 0x00) goto yy1;
- if (yych == '\t') goto yy964;
- goto yy621;
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '\t') goto yy2953;
+ goto yy2507;
} else {
- if (yych <= '\r') goto yy964;
- if (yych == ' ') goto yy964;
- goto yy621;
+ if (yych <= '\r') goto yy2953;
+ if (yych == ' ') goto yy2953;
+ goto yy2507;
}
} else {
if (yych <= '.') {
- if (yych <= '"') goto yy721;
- if (yych == '-') goto yy940;
- goto yy621;
+ if (yych <= '"') goto yy2632;
+ if (yych == '-') goto yy2923;
+ goto yy2507;
} else {
if (yych <= ':') {
- if (yych >= '0') goto yy940;
+ if (yych >= '0') goto yy2923;
} else {
- if (yych == '=') goto yy965;
- goto yy621;
+ if (yych == '=') goto yy2954;
+ goto yy2507;
}
}
}
} else {
if (yych <= 'z') {
if (yych <= '[') {
- if (yych <= '?') goto yy941;
- if (yych <= '@') goto yy621;
- if (yych <= 'Z') goto yy940;
- goto yy621;
+ if (yych <= '?') goto yy2924;
+ if (yych <= '@') goto yy2507;
+ if (yych <= 'Z') goto yy2923;
+ goto yy2507;
} else {
if (yych <= '^') {
- if (yych <= '\\') goto yy722;
- goto yy621;
+ if (yych <= '\\') goto yy2633;
+ goto yy2507;
} else {
- if (yych == '`') goto yy621;
- goto yy940;
+ if (yych == '`') goto yy2507;
+ goto yy2923;
}
}
} else {
if (yych <= 0xE0) {
- if (yych <= 0x7F) goto yy621;
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy723;
- goto yy724;
+ if (yych <= 0x7F) goto yy2507;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2634;
+ goto yy2635;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xEF) goto yy725;
- goto yy726;
+ if (yych <= 0xEF) goto yy2636;
+ goto yy2637;
} else {
- if (yych <= 0xF3) goto yy727;
- if (yych <= 0xF4) goto yy728;
- goto yy1;
+ if (yych <= 0xF3) goto yy2638;
+ if (yych <= 0xF4) goto yy2639;
+ goto yy1682;
}
}
}
}
-yy941:
+yy2924:
yych = *++YYCURSOR;
if (yych <= 0x7F) {
if (yych <= '=') {
- if (yych <= 0x00) goto yy1;
- if (yych == '"') goto yy721;
- goto yy621;
+ if (yych <= 0x00) goto yy1682;
+ if (yych == '"') goto yy2632;
+ goto yy2507;
} else {
- if (yych <= '>') goto yy720;
- if (yych == '\\') goto yy722;
- goto yy621;
+ if (yych <= '>') goto yy2631;
+ if (yych == '\\') goto yy2633;
+ goto yy2507;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xC1) goto yy1;
- if (yych <= 0xDF) goto yy723;
- if (yych <= 0xE0) goto yy724;
- goto yy725;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) goto yy2634;
+ if (yych <= 0xE0) goto yy2635;
+ goto yy2636;
} else {
- if (yych <= 0xF0) goto yy726;
- if (yych <= 0xF3) goto yy727;
- if (yych <= 0xF4) goto yy728;
- goto yy1;
+ if (yych <= 0xF0) goto yy2637;
+ if (yych <= 0xF3) goto yy2638;
+ if (yych <= 0xF4) goto yy2639;
+ goto yy1682;
}
}
-yy942:
- yyaccept = 32;
+yy2925:
+ yych = *++YYCURSOR;
+ if (yych == ' ') goto yy2955;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2925;
+ goto yy1682;
+yy2926:
+ yyaccept = 42;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych == ':') goto yy966;
-yy943:
-#line 184 "../../lnav/src/data_scanner_re.re"
+ if (yych == ':') goto yy2956;
+yy2927:
+#line 306 "../../lnav/src/data_scanner_re.re"
{
RET(DT_DATE_TIME);
}
-#line 31412 "../../lnav/src/data_scanner_re.cc"
-yy944:
- yyaccept = 29;
+#line 79298 "../../lnav/src/data_scanner_re.cc"
+yy2928:
+ yyaccept = 39;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 0xDF) {
if (yych <= ':') {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy642;
+ goto yy2537;
}
if (yych <= '9') {
yyt1 = YYCURSOR;
- goto yy967;
+ goto yy2957;
}
- goto yy643;
+ goto yy2538;
} else {
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy642;
+ goto yy2537;
}
- if (yych <= 0xC1) goto yy643;
+ if (yych <= 0xC1) goto yy2538;
yyt2 = YYCURSOR;
- goto yy645;
+ goto yy2540;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy646;
+ goto yy2541;
}
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy647;
+ goto yy2542;
}
yyt2 = YYCURSOR;
- goto yy648;
+ goto yy2543;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy649;
+ goto yy2544;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy650;
+ goto yy2545;
}
- goto yy643;
+ goto yy2538;
}
}
-yy945:
+yy2929:
yych = *++YYCURSOR;
- if (yych == 's') goto yy968;
- goto yy1;
-yy946:
+ if (yych == 's') goto yy2958;
+ goto yy1682;
+yy2930:
yych = *++YYCURSOR;
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy969;
- goto yy1;
-yy947:
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2959;
+ goto yy1682;
+yy2931:
yych = *++YYCURSOR;
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy970;
- goto yy1;
-yy948:
- yyaccept = 0;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2960;
+ goto yy1682;
+yy2932:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '/') {
- if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
- } else {
- if (yych <= ',') goto yy4;
- if (yych <= '-') goto yy972;
- if (yych <= '.') goto yy46;
- goto yy4;
- }
- } else {
- if (yych <= 'Z') {
- if (yych <= '9') goto yy46;
- if (yych <= '?') goto yy4;
- if (yych <= '@') goto yy96;
- goto yy46;
- } else {
- if (yych <= '_') {
- if (yych <= '^') goto yy4;
- goto yy46;
- } else {
- if (yych <= '`') goto yy4;
- if (yych <= 'z') goto yy46;
- goto yy4;
- }
- }
- }
-yy949:
+ if (yych == '-') goto yy2962;
+ goto yy1746;
+yy2933:
yyaccept = 11;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
}
- if (yych <= '9') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy109;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy109;
- goto yy4;
- } else {
- if (yych <= 0x1A) {
- if (yych <= '\r') goto yy109;
- goto yy4;
- } else {
- if (yych <= 0x1B) goto yy109;
- if (yych <= 0x1F) goto yy4;
- goto yy109;
- }
- }
+ if (yych <= '7') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1727;
+ if (yych <= '*') goto yy1733;
+ goto yy1884;
} else {
- if (yych <= ',') {
- if (yych <= '%') {
- if (yych <= '$') goto yy4;
- goto yy105;
- } else {
- if (yych == '+') goto yy80;
- goto yy109;
- }
+ if (yych <= '-') {
+ if (yych <= ',') goto yy1733;
+ goto yy1884;
} else {
- if (yych <= '.') {
- if (yych <= '-') goto yy46;
- goto yy266;
- } else {
- if (yych <= '/') goto yy4;
- if (yych <= '7') goto yy973;
- goto yy974;
- }
+ if (yych <= '.') goto yy1985;
+ if (yych <= '/') goto yy1884;
+ goto yy2963;
}
}
} else {
- if (yych <= '_') {
- if (yych <= 'D') {
- if (yych <= ':') goto yy148;
- if (yych <= '?') goto yy109;
- if (yych <= '@') goto yy96;
- goto yy196;
- } else {
- if (yych <= 'F') {
- if (yych <= 'E') goto yy754;
- goto yy196;
- } else {
- if (yych <= 'Z') goto yy115;
- if (yych <= '^') goto yy109;
- goto yy46;
- }
- }
+ if (yych <= 'Z') {
+ if (yych <= '9') goto yy2964;
+ if (yych <= ':') goto yy1884;
+ if (yych <= '?') goto yy1733;
+ goto yy1884;
} else {
- if (yych <= 'z') {
- if (yych <= 'd') {
- if (yych <= '`') goto yy109;
- goto yy196;
- } else {
- if (yych <= 'e') goto yy754;
- if (yych <= 'f') goto yy196;
- goto yy115;
- }
+ if (yych <= '_') {
+ if (yych <= '^') goto yy1733;
+ goto yy1884;
} else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy109;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy109;
- if (yych <= 0xF4) goto yy4;
- goto yy109;
- }
+ if (yych <= '`') goto yy1733;
+ if (yych <= 'z') goto yy1884;
+ goto yy1733;
}
}
}
-yy950:
- yyaccept = 6;
+yy2934:
+ yyaccept = 12;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
}
- if (yych <= '9') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy26;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy26;
- goto yy4;
- } else {
- if (yych <= 0x1A) {
- if (yych <= '\r') goto yy26;
- goto yy4;
- } else {
- if (yych <= 0x1B) goto yy26;
- if (yych <= 0x1F) goto yy4;
- goto yy26;
- }
- }
- } else {
- if (yych <= '+') {
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy105;
- if (yych <= '*') goto yy26;
- goto yy80;
- } else {
- if (yych <= '-') {
- if (yych <= ',') goto yy26;
- goto yy46;
- } else {
- if (yych <= '.') goto yy266;
- if (yych <= '/') goto yy4;
- goto yy974;
- }
- }
- }
- } else {
- if (yych <= '_') {
- if (yych <= 'D') {
- if (yych <= ':') goto yy148;
- if (yych <= '?') goto yy26;
- if (yych <= '@') goto yy96;
- goto yy196;
- } else {
- if (yych <= 'F') {
- if (yych <= 'E') goto yy754;
- goto yy196;
- } else {
- if (yych <= 'Z') goto yy115;
- if (yych <= '^') goto yy26;
- goto yy46;
- }
- }
- } else {
- if (yych <= 'z') {
- if (yych <= 'd') {
- if (yych <= '`') goto yy26;
- goto yy196;
- } else {
- if (yych <= 'e') goto yy754;
- if (yych <= 'f') goto yy196;
- goto yy115;
- }
- } else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy26;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy26;
- if (yych <= 0xF4) goto yy4;
- goto yy26;
- }
- }
- }
- }
-yy951:
- yyaccept = 6;
- yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '-') {
- if (yych <= 0x1B) {
- if (yych <= '\n') {
- if (yych <= 0x00) goto yy26;
- if (yych <= 0x08) goto yy4;
- goto yy26;
- } else {
- if (yych == '\r') goto yy26;
- if (yych <= 0x1A) goto yy4;
- goto yy26;
- }
- } else {
- if (yych <= '%') {
- if (yych <= 0x1F) goto yy4;
- if (yych <= '#') goto yy26;
- if (yych <= '$') goto yy4;
- goto yy80;
- } else {
- if (yych == '+') goto yy80;
- if (yych <= ',') goto yy26;
- goto yy972;
- }
- }
+ if (yych == '%') goto yy1727;
+ goto yy1884;
} else {
- if (yych <= '^') {
- if (yych <= ':') {
- if (yych <= '.') goto yy46;
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy340;
- goto yy4;
- } else {
- if (yych <= '?') goto yy26;
- if (yych <= '@') goto yy96;
- if (yych <= 'Z') goto yy46;
- goto yy26;
- }
- } else {
- if (yych <= '~') {
- if (yych == '`') goto yy26;
- if (yych <= 'z') goto yy46;
- goto yy26;
- } else {
- if (yych <= 0x7F) goto yy4;
- if (yych <= 0xC1) goto yy26;
- if (yych <= 0xF4) goto yy4;
- goto yy26;
- }
- }
+ if (yych <= '.') goto yy1985;
+ if (yych <= '/') goto yy1884;
+ if (yych <= '9') goto yy2964;
+ goto yy1884;
}
-yy952:
+yy2935:
yych = *++YYCURSOR;
if (yych <= 'f') {
if (yych <= ':') {
if (yych <= '%') {
if (yych <= '$') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
yyt1 = YYCURSOR;
- goto yy680;
+ goto yy2575;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '9') goto yy975;
- goto yy923;
+ if (yych <= '9') goto yy2965;
+ yyt2 = YYCURSOR;
+ goto yy2899;
}
} else {
if (yych <= 'F') {
if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy975;
+ goto yy2965;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy975;
+ goto yy2965;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy953:
+yy2936:
yych = *++YYCURSOR;
if (yych <= 'f') {
if (yych <= ':') {
if (yych <= '%') {
if (yych <= '$') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
yyt1 = YYCURSOR;
- goto yy680;
+ goto yy2575;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '9') goto yy976;
- goto yy882;
+ if (yych <= '9') goto yy2966;
+ yyt2 = YYCURSOR;
+ goto yy2842;
}
} else {
if (yych <= 'F') {
if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy976;
+ goto yy2966;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy976;
+ goto yy2966;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy954:
+yy2937:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy977;
- if (yych <= ':') goto yy820;
- goto yy1;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2967;
+ if (yych <= ':') goto yy2759;
+ goto yy1682;
} else {
- if (yych <= 'F') goto yy977;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy977;
- goto yy1;
+ if (yych <= 'F') goto yy2967;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2967;
+ goto yy1682;
}
-yy955:
+yy2938:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy978;
- if (yych <= ':') goto yy927;
- goto yy1;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2968;
+ if (yych <= ':') goto yy2903;
+ goto yy1682;
} else {
- if (yych <= 'F') goto yy978;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy978;
- goto yy1;
+ if (yych <= 'F') goto yy2968;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2968;
+ goto yy1682;
}
-yy956:
+yy2939:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy979;
- if (yych <= ':') goto yy980;
- goto yy1;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2969;
+ if (yych <= ':') goto yy2970;
+ goto yy1682;
} else {
- if (yych <= 'F') goto yy979;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy979;
- goto yy1;
+ if (yych <= 'F') goto yy2969;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2969;
+ goto yy1682;
}
-yy957:
+yy2940:
yych = *++YYCURSOR;
if (yych <= 'z') {
if (yych <= '@') {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
+ }
+ if (yych <= '9') goto yy2971;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1897;
}
- if (yych <= '9') goto yy981;
- if (yych <= ':') goto yy1;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
if (yych <= 'Z') {
- if (yych <= 'F') goto yy981;
- goto yy1;
+ if (yych <= 'F') goto yy2971;
+ goto yy1682;
} else {
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 'f') goto yy981;
- goto yy1;
+ if (yych <= 'f') goto yy2971;
+ goto yy1682;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy958:
+yy2941:
yych = *++YYCURSOR;
if (yych <= 'z') {
if (yych <= '@') {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '9') goto yy982;
+ if (yych <= '9') goto yy2972;
if (yych >= ';') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
+ yyt2 = YYCURSOR;
} else {
if (yych <= 'Z') {
- if (yych <= 'F') goto yy982;
- goto yy1;
+ if (yych <= 'F') goto yy2972;
+ goto yy1682;
} else {
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 'f') goto yy982;
- goto yy1;
+ if (yych <= 'f') goto yy2972;
+ goto yy1682;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy959:
+yy2942:
yych = *++YYCURSOR;
- if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy981;
- goto yy1;
+ if (yych <= '9') {
+ if (yych == ' ') goto yy1892;
+ if (yych <= '/') goto yy1682;
+ goto yy2971;
} else {
- if (yych <= 'F') goto yy981;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy981;
- goto yy1;
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy1682;
+ goto yy2971;
+ } else {
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2971;
+ goto yy1682;
+ }
}
-yy960:
+yy2943:
yych = *++YYCURSOR;
if (yych <= 0x7F) {
if (yych <= '@') {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
+ }
+ if (yych <= '9') goto yy1682;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2842;
}
- if (yych <= '9') goto yy1;
- if (yych <= ':') goto yy882;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
} else {
if (yych <= 0xF0) {
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
}
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
-yy961:
+yy2944:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ switch (yych) {
+ case '%': goto yy1727;
+ case '+':
+ case '-':
+ case '/':
+ case ':':
+ case '@':
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy1884;
+ case '.': goto yy2019;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy2973;
+ case 'B':
+ case 'b': goto yy2692;
+ case 'E':
+ case 'e': goto yy2693;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy1740;
+ case 'S':
+ case 's': goto yy1744;
+ case 'm': goto yy1747;
+ case 'p':
+ case 'u': goto yy1748;
+ default: goto yy1635;
+ }
+yy2945:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '-') goto yy2962;
+ goto yy2147;
+yy2946:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= '*') {
+ if (yych == '%') goto yy1746;
+ goto yy1635;
+ } else {
+ if (yych <= '+') goto yy1746;
+ if (yych <= ',') goto yy1635;
+ if (yych <= '-') goto yy2962;
+ goto yy1746;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '?') goto yy1635;
+ if (yych <= 'Z') goto yy1746;
+ goto yy1635;
+ } else {
+ if (yych == '`') goto yy1635;
+ if (yych <= 'z') goto yy1746;
+ goto yy1635;
+ }
+ }
+yy2947:
yych = *++YYCURSOR;
- if (yych <= '9') {
- if (yych <= '0') {
- if (yych <= '/') goto yy1;
- goto yy983;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ yyt1 = YYCURSOR;
+ goto yy2020;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= '9') goto yy2764;
+ yyt2 = YYCURSOR;
+ goto yy2682;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2764;
+ } else {
+ if (yych <= 'Z') goto yy1682;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2764;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy1682;
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ } else {
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy1900;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy1902;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1903;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1682;
+ }
+ }
+ }
+yy2948:
+ yych = *++YYCURSOR;
+ if (yych <= '2') {
+ if (yych <= '/') {
+ if (yych == ' ') goto yy1892;
+ goto yy1682;
} else {
- if (yych <= '1') goto yy822;
- if (yych <= '2') goto yy823;
- goto yy821;
+ if (yych <= '0') goto yy2974;
+ if (yych <= '1') goto yy2975;
+ goto yy2976;
}
} else {
if (yych <= 'F') {
- if (yych <= '@') goto yy1;
- goto yy824;
+ if (yych <= '9') goto yy2977;
+ if (yych <= '@') goto yy1682;
+ goto yy2763;
} else {
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy824;
- goto yy1;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2763;
+ goto yy1682;
}
}
-yy962:
+yy2949:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ yyt1 = YYCURSOR;
+ goto yy2020;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= '9') goto yy2978;
+ yyt2 = YYCURSOR;
+ goto yy2682;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2764;
+ } else {
+ if (yych <= 'Z') goto yy1682;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2764;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy1682;
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ } else {
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy1900;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy1902;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1903;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1682;
+ }
+ }
+ }
+yy2950:
+ yych = *++YYCURSOR;
+ if (yych <= '`') {
+ if (yych <= '9') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ yyt1 = YYCURSOR;
+ goto yy2020;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= '5') goto yy2978;
+ goto yy2764;
+ }
+ } else {
+ if (yych <= '@') {
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2682;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ } else {
+ if (yych <= 'F') goto yy2764;
+ if (yych <= 'Z') goto yy1682;
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= 'f') goto yy2764;
+ goto yy1682;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= 0xC1) goto yy1682;
+ yyt2 = YYCURSOR;
+ goto yy1900;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy1902;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1903;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1682;
+ }
+ }
+ }
+yy2951:
yych = *++YYCURSOR;
if (yych <= '=') {
if (yych <= 0x1F) {
if (yych <= '\t') {
- if (yych <= 0x00) goto yy1;
- if (yych <= 0x08) goto yy631;
- goto yy962;
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= 0x08) goto yy2517;
+ goto yy2951;
} else {
- if (yych == '\r') goto yy962;
- goto yy631;
+ if (yych == '\r') goto yy2951;
+ goto yy2517;
}
} else {
if (yych <= '\'') {
- if (yych <= ' ') goto yy962;
- if (yych <= '&') goto yy631;
- goto yy721;
+ if (yych <= ' ') goto yy2951;
+ if (yych <= '&') goto yy2517;
+ goto yy2632;
} else {
- if (yych == '/') goto yy938;
- if (yych <= '<') goto yy631;
+ if (yych == '/') goto yy2921;
+ if (yych <= '<') goto yy2517;
}
}
} else {
if (yych <= 0xC1) {
if (yych <= '[') {
- if (yych == '?') goto yy938;
- goto yy631;
+ if (yych == '?') goto yy2921;
+ goto yy2517;
} else {
- if (yych <= '\\') goto yy731;
- if (yych <= 0x7F) goto yy631;
- goto yy1;
+ if (yych <= '\\') goto yy2642;
+ if (yych <= 0x7F) goto yy2517;
+ goto yy1682;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xDF) goto yy732;
- if (yych <= 0xE0) goto yy733;
- goto yy734;
+ if (yych <= 0xDF) goto yy2643;
+ if (yych <= 0xE0) goto yy2644;
+ goto yy2645;
} else {
- if (yych <= 0xF0) goto yy735;
- if (yych <= 0xF3) goto yy736;
- if (yych <= 0xF4) goto yy737;
- goto yy1;
+ if (yych <= 0xF0) goto yy2646;
+ if (yych <= 0xF3) goto yy2647;
+ if (yych <= 0xF4) goto yy2648;
+ goto yy1682;
}
}
}
-yy963:
+yy2952:
yych = *++YYCURSOR;
if (yych <= '>') {
if (yych <= '\r') {
if (yych <= 0x08) {
- if (yych <= 0x00) goto yy1;
- goto yy525;
+ if (yych <= 0x00) goto yy1682;
+ goto yy2371;
} else {
- if (yych <= '\t') goto yy729;
- if (yych <= '\f') goto yy525;
- goto yy729;
+ if (yych <= '\t') goto yy2640;
+ if (yych <= '\f') goto yy2371;
+ goto yy2640;
}
} else {
if (yych <= '!') {
- if (yych == ' ') goto yy729;
- goto yy525;
+ if (yych == ' ') goto yy2640;
+ goto yy2371;
} else {
- if (yych <= '"') goto yy800;
- if (yych <= '=') goto yy525;
- goto yy631;
+ if (yych <= '"') goto yy2734;
+ if (yych <= '=') goto yy2371;
+ goto yy2517;
}
}
} else {
if (yych <= 0xDF) {
if (yych <= '\\') {
- if (yych <= '[') goto yy525;
- goto yy632;
+ if (yych <= '[') goto yy2371;
+ goto yy2518;
} else {
- if (yych <= 0x7F) goto yy525;
- if (yych <= 0xC1) goto yy1;
- goto yy633;
+ if (yych <= 0x7F) goto yy2371;
+ if (yych <= 0xC1) goto yy1682;
+ goto yy2519;
}
} else {
if (yych <= 0xF0) {
- if (yych <= 0xE0) goto yy634;
- if (yych <= 0xEF) goto yy635;
- goto yy636;
+ if (yych <= 0xE0) goto yy2520;
+ if (yych <= 0xEF) goto yy2521;
+ goto yy2522;
} else {
- if (yych <= 0xF3) goto yy637;
- if (yych <= 0xF4) goto yy638;
- goto yy1;
+ if (yych <= 0xF3) goto yy2523;
+ if (yych <= 0xF4) goto yy2524;
+ goto yy1682;
}
}
}
-yy964:
+yy2953:
yych = *++YYCURSOR;
if (yych <= '=') {
if (yych <= 0x1F) {
if (yych <= '\t') {
- if (yych <= 0x00) goto yy1;
- if (yych <= 0x08) goto yy621;
- goto yy964;
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= 0x08) goto yy2507;
+ goto yy2953;
} else {
- if (yych == '\r') goto yy964;
- goto yy621;
+ if (yych == '\r') goto yy2953;
+ goto yy2507;
}
} else {
if (yych <= '"') {
- if (yych <= ' ') goto yy964;
- if (yych <= '!') goto yy621;
- goto yy721;
+ if (yych <= ' ') goto yy2953;
+ if (yych <= '!') goto yy2507;
+ goto yy2632;
} else {
- if (yych == '/') goto yy941;
- if (yych <= '<') goto yy621;
+ if (yych == '/') goto yy2924;
+ if (yych <= '<') goto yy2507;
}
}
} else {
if (yych <= 0xC1) {
if (yych <= '[') {
- if (yych == '?') goto yy941;
- goto yy621;
+ if (yych == '?') goto yy2924;
+ goto yy2507;
} else {
- if (yych <= '\\') goto yy722;
- if (yych <= 0x7F) goto yy621;
- goto yy1;
+ if (yych <= '\\') goto yy2633;
+ if (yych <= 0x7F) goto yy2507;
+ goto yy1682;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xDF) goto yy723;
- if (yych <= 0xE0) goto yy724;
- goto yy725;
+ if (yych <= 0xDF) goto yy2634;
+ if (yych <= 0xE0) goto yy2635;
+ goto yy2636;
} else {
- if (yych <= 0xF0) goto yy726;
- if (yych <= 0xF3) goto yy727;
- if (yych <= 0xF4) goto yy728;
- goto yy1;
+ if (yych <= 0xF0) goto yy2637;
+ if (yych <= 0xF3) goto yy2638;
+ if (yych <= 0xF4) goto yy2639;
+ goto yy1682;
}
}
}
-yy965:
+yy2954:
yych = *++YYCURSOR;
if (yych <= '>') {
if (yych <= '\r') {
if (yych <= 0x08) {
- if (yych <= 0x00) goto yy1;
- goto yy524;
+ if (yych <= 0x00) goto yy1682;
+ goto yy2370;
} else {
- if (yych <= '\t') goto yy719;
- if (yych <= '\f') goto yy524;
- goto yy719;
+ if (yych <= '\t') goto yy2630;
+ if (yych <= '\f') goto yy2370;
+ goto yy2630;
}
} else {
if (yych <= '&') {
- if (yych == ' ') goto yy719;
- goto yy524;
+ if (yych == ' ') goto yy2630;
+ goto yy2370;
} else {
- if (yych <= '\'') goto yy800;
- if (yych <= '=') goto yy524;
- goto yy621;
+ if (yych <= '\'') goto yy2734;
+ if (yych <= '=') goto yy2370;
+ goto yy2507;
}
}
} else {
if (yych <= 0xDF) {
if (yych <= '\\') {
- if (yych <= '[') goto yy524;
- goto yy622;
+ if (yych <= '[') goto yy2370;
+ goto yy2508;
} else {
- if (yych <= 0x7F) goto yy524;
- if (yych <= 0xC1) goto yy1;
- goto yy623;
+ if (yych <= 0x7F) goto yy2370;
+ if (yych <= 0xC1) goto yy1682;
+ goto yy2509;
}
} else {
if (yych <= 0xF0) {
- if (yych <= 0xE0) goto yy624;
- if (yych <= 0xEF) goto yy625;
- goto yy626;
+ if (yych <= 0xE0) goto yy2510;
+ if (yych <= 0xEF) goto yy2511;
+ goto yy2512;
} else {
- if (yych <= 0xF3) goto yy627;
- if (yych <= 0xF4) goto yy628;
- goto yy1;
+ if (yych <= 0xF3) goto yy2513;
+ if (yych <= 0xF4) goto yy2514;
+ goto yy1682;
}
}
}
-yy966:
+yy2955:
yych = *++YYCURSOR;
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy984;
- goto yy1;
-yy967:
- yyaccept = 29;
+ if (yych == '@') goto yy2979;
+ goto yy1682;
+yy2956:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2980;
+ goto yy1682;
+yy2957:
+ yyaccept = 39;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 0xDF) {
if (yych <= ':') {
if (yych <= '9') {
yyt2 = YYCURSOR;
- goto yy642;
+ goto yy2537;
}
- goto yy643;
+ goto yy2538;
} else {
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy642;
+ goto yy2537;
}
- if (yych <= 0xC1) goto yy643;
+ if (yych <= 0xC1) goto yy2538;
yyt2 = YYCURSOR;
- goto yy645;
+ goto yy2540;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy646;
+ goto yy2541;
}
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy647;
+ goto yy2542;
}
yyt2 = YYCURSOR;
- goto yy648;
+ goto yy2543;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy649;
+ goto yy2544;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy650;
+ goto yy2545;
}
- goto yy643;
+ goto yy2538;
}
}
-yy968:
- yyaccept = 5;
+yy2958:
+ yyaccept = 9;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych == ' ') goto yy985;
- goto yy100;
-yy969:
- yych = *++YYCURSOR;
- if (yych == ' ') goto yy986;
- goto yy1;
-yy970:
- yyaccept = 33;
+ if (yych == ' ') goto yy2981;
+ goto yy1722;
+yy2959:
+ yych = *++YYCURSOR;
+ if (yych == ' ') goto yy2982;
+ goto yy1682;
+yy2960:
+ yyaccept = 43;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych == ':') goto yy987;
-yy971:
-#line 181 "../../lnav/src/data_scanner_re.re"
+ if (yych == ':') goto yy2983;
+yy2961:
+#line 303 "../../lnav/src/data_scanner_re.re"
{
RET(DT_DATE_TIME);
}
-#line 32346 "../../lnav/src/data_scanner_re.cc"
-yy972:
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '?') {
- if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
+#line 80389 "../../lnav/src/data_scanner_re.cc"
+yy2962:
+ yych = *++YYCURSOR;
+ if (yych <= 'Z') {
+ if (yych <= '9') {
+ if (yych <= '/') goto yy1698;
+ goto yy2984;
} else {
- if (yych <= '.') {
- if (yych <= ',') goto yy4;
- goto yy46;
- } else {
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy988;
- goto yy4;
- }
+ if (yych <= '@') goto yy1698;
+ if (yych <= 'F') goto yy2984;
+ goto yy1745;
}
} else {
- if (yych <= '^') {
- if (yych <= '@') goto yy96;
- if (yych <= 'F') goto yy988;
- if (yych <= 'Z') goto yy46;
- goto yy4;
+ if (yych <= '`') {
+ if (yych == '_') goto yy1745;
+ goto yy1698;
} else {
- if (yych <= '`') {
- if (yych <= '_') goto yy46;
- goto yy4;
- } else {
- if (yych <= 'f') goto yy988;
- if (yych <= 'z') goto yy46;
- goto yy4;
- }
+ if (yych <= 'f') goto yy2984;
+ if (yych <= 'z') goto yy1745;
+ goto yy1698;
}
}
-yy973:
+yy2963:
yyaccept = 11;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
}
- if (yych <= '9') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy109;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy109;
- goto yy4;
- } else {
- if (yych <= 0x1A) {
- if (yych <= '\r') goto yy109;
- goto yy4;
- } else {
- if (yych <= 0x1B) goto yy109;
- if (yych <= 0x1F) goto yy4;
- goto yy109;
- }
- }
+ if (yych <= '7') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1727;
+ if (yych <= '*') goto yy1733;
+ goto yy1884;
} else {
- if (yych <= ',') {
- if (yych <= '%') {
- if (yych <= '$') goto yy4;
- goto yy105;
- } else {
- if (yych == '+') goto yy80;
- goto yy109;
- }
+ if (yych <= '-') {
+ if (yych <= ',') goto yy1733;
+ goto yy1884;
} else {
- if (yych <= '.') {
- if (yych <= '-') goto yy46;
- goto yy266;
- } else {
- if (yych <= '/') goto yy4;
- if (yych <= '7') goto yy989;
- goto yy990;
- }
+ if (yych <= '.') goto yy1985;
+ if (yych <= '/') goto yy1884;
+ goto yy2985;
}
}
} else {
- if (yych <= '_') {
- if (yych <= 'D') {
- if (yych <= ':') goto yy148;
- if (yych <= '?') goto yy109;
- if (yych <= '@') goto yy96;
- goto yy196;
- } else {
- if (yych <= 'F') {
- if (yych <= 'E') goto yy754;
- goto yy196;
- } else {
- if (yych <= 'Z') goto yy115;
- if (yych <= '^') goto yy109;
- goto yy46;
- }
- }
+ if (yych <= 'Z') {
+ if (yych <= '9') goto yy2986;
+ if (yych <= ':') goto yy1884;
+ if (yych <= '?') goto yy1733;
+ goto yy1884;
} else {
- if (yych <= 'z') {
- if (yych <= 'd') {
- if (yych <= '`') goto yy109;
- goto yy196;
- } else {
- if (yych <= 'e') goto yy754;
- if (yych <= 'f') goto yy196;
- goto yy115;
- }
+ if (yych <= '_') {
+ if (yych <= '^') goto yy1733;
+ goto yy1884;
} else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy109;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy109;
- if (yych <= 0xF4) goto yy4;
- goto yy109;
- }
+ if (yych <= '`') goto yy1733;
+ if (yych <= 'z') goto yy1884;
+ goto yy1733;
}
}
}
-yy974:
- yyaccept = 6;
+yy2964:
+ yyaccept = 12;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
}
- if (yych <= '9') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy26;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy26;
- goto yy4;
- } else {
- if (yych <= 0x1A) {
- if (yych <= '\r') goto yy26;
- goto yy4;
- } else {
- if (yych <= 0x1B) goto yy26;
- if (yych <= 0x1F) goto yy4;
- goto yy26;
- }
- }
- } else {
- if (yych <= '+') {
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy105;
- if (yych <= '*') goto yy26;
- goto yy80;
- } else {
- if (yych <= '-') {
- if (yych <= ',') goto yy26;
- goto yy46;
- } else {
- if (yych <= '.') goto yy266;
- if (yych <= '/') goto yy4;
- goto yy990;
- }
- }
- }
+ if (yych <= '-') {
+ if (yych == '%') goto yy1727;
+ goto yy1884;
} else {
- if (yych <= '_') {
- if (yych <= 'D') {
- if (yych <= ':') goto yy148;
- if (yych <= '?') goto yy26;
- if (yych <= '@') goto yy96;
- goto yy196;
- } else {
- if (yych <= 'F') {
- if (yych <= 'E') goto yy754;
- goto yy196;
- } else {
- if (yych <= 'Z') goto yy115;
- if (yych <= '^') goto yy26;
- goto yy46;
- }
- }
- } else {
- if (yych <= 'z') {
- if (yych <= 'd') {
- if (yych <= '`') goto yy26;
- goto yy196;
- } else {
- if (yych <= 'e') goto yy754;
- if (yych <= 'f') goto yy196;
- goto yy115;
- }
- } else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy26;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy26;
- if (yych <= 0xF4) goto yy4;
- goto yy26;
- }
- }
- }
+ if (yych <= '.') goto yy1985;
+ if (yych <= '/') goto yy1884;
+ if (yych <= '9') goto yy2986;
+ goto yy1884;
}
-yy975:
+yy2965:
yych = *++YYCURSOR;
if (yych <= 'z') {
if (yych <= '9') {
if (yych == '%') {
yyt1 = YYCURSOR;
- goto yy680;
+ goto yy2575;
}
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy1;
+ goto yy1682;
} else {
if (yych <= '@') {
- if (yych <= ':') goto yy923;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2899;
+ }
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy1;
+ goto yy1682;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy976:
+yy2966:
yych = *++YYCURSOR;
if (yych <= 'f') {
if (yych <= ':') {
if (yych <= '%') {
if (yych <= '$') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
yyt1 = YYCURSOR;
- goto yy680;
+ goto yy2575;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '9') goto yy991;
- goto yy882;
+ if (yych <= '9') goto yy2987;
+ yyt2 = YYCURSOR;
+ goto yy2842;
}
} else {
if (yych <= 'F') {
if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy991;
+ goto yy2987;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy991;
+ goto yy2987;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy977:
- yyaccept = 21;
+yy2967:
+ yyaccept = 30;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ':') {
if (yych <= '-') {
- if (yych <= ',') goto yy354;
- goto yy466;
+ if (yych <= ',') goto yy2107;
+ goto yy2270;
} else {
- if (yych <= '/') goto yy354;
- if (yych <= '9') goto yy878;
- goto yy992;
+ if (yych <= '/') goto yy2107;
+ if (yych <= '9') goto yy2838;
+ goto yy2988;
}
} else {
if (yych <= 'F') {
- if (yych <= '@') goto yy354;
- goto yy878;
+ if (yych <= '@') goto yy2107;
+ goto yy2838;
} else {
- if (yych <= '`') goto yy354;
- if (yych <= 'f') goto yy878;
- goto yy354;
+ if (yych <= '`') goto yy2107;
+ if (yych <= 'f') goto yy2838;
+ goto yy2107;
}
}
-yy978:
+yy2968:
yych = *++YYCURSOR;
- if (yych == ':') goto yy927;
- goto yy1;
-yy979:
+ if (yych == ':') goto yy2903;
+ goto yy1682;
+yy2969:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy993;
- if (yych >= ';') goto yy1;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2989;
+ if (yych >= ';') goto yy1682;
} else {
- if (yych <= 'F') goto yy993;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy993;
- goto yy1;
+ if (yych <= 'F') goto yy2989;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2989;
+ goto yy1682;
}
-yy980:
+yy2970:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy981;
- if (yych <= ':') goto yy830;
- goto yy1;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2971;
+ if (yych <= ':') goto yy2771;
+ goto yy1682;
} else {
- if (yych <= 'F') goto yy981;
- if (yych <= '`') goto yy1;
- if (yych >= 'g') goto yy1;
+ if (yych <= 'F') goto yy2971;
+ if (yych <= '`') goto yy1682;
+ if (yych >= 'g') goto yy1682;
}
-yy981:
+yy2971:
yych = *++YYCURSOR;
if (yych <= 'z') {
if (yych <= '@') {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
+ }
+ if (yych <= '9') goto yy2990;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1897;
}
- if (yych <= '9') goto yy994;
- if (yych <= ':') goto yy1;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
if (yych <= 'Z') {
- if (yych <= 'F') goto yy994;
- goto yy1;
+ if (yych <= 'F') goto yy2990;
+ goto yy1682;
} else {
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 'f') goto yy994;
- goto yy1;
+ if (yych <= 'f') goto yy2990;
+ goto yy1682;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy982:
+yy2972:
yych = *++YYCURSOR;
if (yych <= 'z') {
if (yych <= '@') {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
+ }
+ if (yych <= '9') goto yy2991;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2942;
}
- if (yych <= '9') goto yy995;
- if (yych <= ':') goto yy959;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
if (yych <= 'Z') {
- if (yych <= 'F') goto yy995;
- goto yy1;
+ if (yych <= 'F') goto yy2991;
+ goto yy1682;
} else {
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 'f') goto yy995;
- goto yy1;
+ if (yych <= 'f') goto yy2991;
+ goto yy1682;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy983:
+yy2973:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ switch (yych) {
+ case '%': goto yy1727;
+ case '+':
+ case '-':
+ case '/':
+ case ':':
+ case '@':
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy1884;
+ case '.': goto yy2019;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy2992;
+ case 'B':
+ case 'b': goto yy2692;
+ case 'E':
+ case 'e': goto yy2693;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy1740;
+ case 'S':
+ case 's': goto yy1744;
+ case 'm': goto yy1747;
+ case 'p':
+ case 'u': goto yy1748;
+ default: goto yy1635;
+ }
+yy2974:
yych = *++YYCURSOR;
if (yych <= 'f') {
if (yych <= ':') {
if (yych <= '.') {
if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
yyt1 = YYCURSOR;
- goto yy297;
+ goto yy2020;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '9') goto yy881;
- goto yy996;
+ if (yych <= '9') goto yy2993;
+ yyt2 = YYCURSOR;
+ goto yy2994;
}
} else {
if (yych <= 'F') {
if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy883;
+ goto yy2843;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy883;
+ goto yy2843;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy984:
+yy2975:
yych = *++YYCURSOR;
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy997;
- goto yy1;
-yy985:
- yych = *++YYCURSOR;
- if (yych == '(') goto yy998;
- goto yy1;
-yy986:
- yych = *++YYCURSOR;
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy999;
- goto yy1;
-yy987:
- yych = *++YYCURSOR;
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy1000;
- goto yy1;
-yy988:
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '?') {
- if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
- } else {
+ if (yych <= 'f') {
+ if (yych <= ':') {
if (yych <= '.') {
- if (yych <= ',') goto yy4;
- goto yy46;
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ yyt1 = YYCURSOR;
+ goto yy2020;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= '9') goto yy2995;
+ yyt2 = YYCURSOR;
+ goto yy2842;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2843;
} else {
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy1001;
- goto yy4;
+ if (yych <= 'Z') goto yy1682;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2843;
}
}
} else {
- if (yych <= '^') {
- if (yych <= '@') goto yy96;
- if (yych <= 'F') goto yy1001;
- if (yych <= 'Z') goto yy46;
- goto yy4;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy1682;
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ } else {
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy1900;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
} else {
- if (yych <= '`') {
- if (yych <= '_') goto yy46;
- goto yy4;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy1902;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1903;
} else {
- if (yych <= 'f') goto yy1001;
- if (yych <= 'z') goto yy46;
- goto yy4;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1682;
}
}
}
-yy989:
- yyaccept = 11;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
+yy2976:
+ yych = *++YYCURSOR;
+ if (yych <= '`') {
+ if (yych <= '5') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ yyt1 = YYCURSOR;
+ goto yy2020;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= '4') goto yy2995;
+ goto yy2996;
+ }
+ } else {
+ if (yych <= '@') {
+ if (yych <= '9') goto yy2993;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2842;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ } else {
+ if (yych <= 'F') goto yy2843;
+ if (yych <= 'Z') goto yy1682;
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= 'f') goto yy2843;
+ goto yy1682;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= 0xC1) goto yy1682;
+ yyt2 = YYCURSOR;
+ goto yy1900;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy1902;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1903;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1682;
+ }
+ }
}
- if (yych <= '9') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy109;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy109;
- goto yy4;
+yy2977:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ yyt1 = YYCURSOR;
+ goto yy2020;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') goto yy109;
- goto yy4;
- } else {
- if (yych <= 0x1B) goto yy109;
- if (yych <= 0x1F) goto yy4;
- goto yy109;
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
+ if (yych <= '9') goto yy2993;
+ yyt2 = YYCURSOR;
+ goto yy2842;
}
} else {
- if (yych <= ',') {
- if (yych <= '%') {
- if (yych <= '$') goto yy4;
- goto yy105;
- } else {
- if (yych == '+') goto yy80;
- goto yy109;
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
+ goto yy2843;
} else {
- if (yych <= '.') {
- if (yych <= '-') goto yy46;
- goto yy266;
- } else {
- if (yych <= '/') goto yy4;
- if (yych <= '7') goto yy1002;
- goto yy1003;
+ if (yych <= 'Z') goto yy1682;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
+ goto yy2843;
}
}
} else {
- if (yych <= '_') {
- if (yych <= 'D') {
- if (yych <= ':') goto yy148;
- if (yych <= '?') goto yy109;
- if (yych <= '@') goto yy96;
- goto yy196;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy1682;
+ yyt2 = YYCURSOR;
+ goto yy1892;
} else {
- if (yych <= 'F') {
- if (yych <= 'E') goto yy754;
- goto yy196;
- } else {
- if (yych <= 'Z') goto yy115;
- if (yych <= '^') goto yy109;
- goto yy46;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy1900;
}
+ yyt2 = YYCURSOR;
+ goto yy1901;
}
} else {
- if (yych <= 'z') {
- if (yych <= 'd') {
- if (yych <= '`') goto yy109;
- goto yy196;
- } else {
- if (yych <= 'e') goto yy754;
- if (yych <= 'f') goto yy196;
- goto yy115;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy1902;
}
+ yyt2 = YYCURSOR;
+ goto yy1903;
} else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy109;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy109;
- if (yych <= 0xF4) goto yy4;
- goto yy109;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
}
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1682;
}
}
}
-yy990:
- yyaccept = 6;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
- }
- if (yych <= '9') {
- if (yych <= '#') {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy26;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy26;
- goto yy4;
+yy2978:
+ yych = *++YYCURSOR;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ yyt1 = YYCURSOR;
+ goto yy2020;
} else {
- if (yych <= 0x1A) {
- if (yych <= '\r') goto yy26;
- goto yy4;
- } else {
- if (yych <= 0x1B) goto yy26;
- if (yych <= 0x1F) goto yy4;
- goto yy26;
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
+ if (yych <= '9') goto yy2846;
+ yyt2 = YYCURSOR;
+ goto yy2682;
}
} else {
- if (yych <= '+') {
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy105;
- if (yych <= '*') goto yy26;
- goto yy80;
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2846;
} else {
- if (yych <= '-') {
- if (yych <= ',') goto yy26;
- goto yy46;
- } else {
- if (yych <= '.') goto yy266;
- if (yych <= '/') goto yy4;
- goto yy1003;
+ if (yych <= 'Z') goto yy1682;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
+ goto yy2846;
}
}
} else {
- if (yych <= '_') {
- if (yych <= 'D') {
- if (yych <= ':') goto yy148;
- if (yych <= '?') goto yy26;
- if (yych <= '@') goto yy96;
- goto yy196;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy1682;
+ yyt2 = YYCURSOR;
+ goto yy1892;
} else {
- if (yych <= 'F') {
- if (yych <= 'E') goto yy754;
- goto yy196;
- } else {
- if (yych <= 'Z') goto yy115;
- if (yych <= '^') goto yy26;
- goto yy46;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy1900;
}
+ yyt2 = YYCURSOR;
+ goto yy1901;
}
} else {
- if (yych <= 'z') {
- if (yych <= 'd') {
- if (yych <= '`') goto yy26;
- goto yy196;
- } else {
- if (yych <= 'e') goto yy754;
- if (yych <= 'f') goto yy196;
- goto yy115;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy1902;
}
+ yyt2 = YYCURSOR;
+ goto yy1903;
} else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy26;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy26;
- if (yych <= 0xF4) goto yy4;
- goto yy26;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
}
+ goto yy1682;
}
}
}
-yy991:
+yy2979:
+ yych = *++YYCURSOR;
+ if (yych == '@') goto yy2997;
+ goto yy1682;
+yy2980:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy2998;
+ goto yy1682;
+yy2981:
+ yych = *++YYCURSOR;
+ if (yych == '(') goto yy2999;
+ goto yy1682;
+yy2982:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy3000;
+ goto yy1682;
+yy2983:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy3001;
+ goto yy1682;
+yy2984:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy1746;
+ if (yych <= '9') goto yy3002;
+ goto yy1746;
+ } else {
+ if (yych <= 'F') goto yy3002;
+ if (yych <= '`') goto yy1746;
+ if (yych <= 'f') goto yy3002;
+ goto yy1746;
+ }
+yy2985:
+ yyaccept = 11;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ if (yych <= '7') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1727;
+ if (yych <= '*') goto yy1733;
+ goto yy1884;
+ } else {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy1733;
+ goto yy1884;
+ } else {
+ if (yych <= '.') goto yy1985;
+ if (yych <= '/') goto yy1884;
+ goto yy3003;
+ }
+ }
+ } else {
+ if (yych <= 'Z') {
+ if (yych <= '9') goto yy3004;
+ if (yych <= ':') goto yy1884;
+ if (yych <= '?') goto yy1733;
+ goto yy1884;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy1733;
+ goto yy1884;
+ } else {
+ if (yych <= '`') goto yy1733;
+ if (yych <= 'z') goto yy1884;
+ goto yy1733;
+ }
+ }
+ }
+yy2986:
+ yyaccept = 12;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ if (yych <= '-') {
+ if (yych == '%') goto yy1727;
+ goto yy1884;
+ } else {
+ if (yych <= '.') goto yy1985;
+ if (yych <= '/') goto yy1884;
+ if (yych <= '9') goto yy3004;
+ goto yy1884;
+ }
+yy2987:
yych = *++YYCURSOR;
if (yych <= 'f') {
if (yych <= ':') {
if (yych <= '%') {
if (yych <= '$') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
yyt1 = YYCURSOR;
- goto yy680;
+ goto yy2575;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '9') goto yy1004;
- goto yy882;
+ if (yych <= '9') goto yy3005;
+ yyt2 = YYCURSOR;
+ goto yy2842;
}
} else {
if (yych <= 'F') {
if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy1004;
+ goto yy3005;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy1004;
+ goto yy3005;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy992:
+yy2988:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy1005;
- if (yych <= ':') goto yy880;
- goto yy1;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy3006;
+ if (yych <= ':') goto yy2840;
+ goto yy1682;
} else {
- if (yych <= 'F') goto yy1005;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy1005;
- goto yy1;
+ if (yych <= 'F') goto yy3006;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy3006;
+ goto yy1682;
}
-yy993:
+yy2989:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy1006;
- if (yych <= ':') goto yy980;
- goto yy1;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy3007;
+ if (yych <= ':') goto yy2970;
+ goto yy1682;
} else {
- if (yych <= 'F') goto yy1006;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy1006;
- goto yy1;
+ if (yych <= 'F') goto yy3007;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy3007;
+ goto yy1682;
}
-yy994:
+yy2990:
yych = *++YYCURSOR;
if (yych <= 'z') {
if (yych <= '@') {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
+ }
+ if (yych <= '9') goto yy3008;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1897;
}
- if (yych <= '9') goto yy1007;
- if (yych <= ':') goto yy1;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
if (yych <= 'Z') {
- if (yych <= 'F') goto yy1007;
- goto yy1;
+ if (yych <= 'F') goto yy3008;
+ goto yy1682;
} else {
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 'f') goto yy1007;
- goto yy1;
+ if (yych <= 'f') goto yy3008;
+ goto yy1682;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy995:
+yy2991:
yych = *++YYCURSOR;
if (yych <= 0x7F) {
if (yych <= '@') {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
+ }
+ if (yych <= '9') goto yy1682;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2942;
}
- if (yych <= '9') goto yy1;
- if (yych <= ':') goto yy959;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
} else {
if (yych <= 0xF0) {
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
}
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
-yy996:
+yy2992:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ switch (yych) {
+ case '%': goto yy1727;
+ case '+':
+ case '-':
+ case '/':
+ case ':':
+ case '@':
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy1884;
+ case '.': goto yy2019;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy3009;
+ case 'B':
+ case 'b': goto yy2692;
+ case 'E':
+ case 'e': goto yy2693;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy1740;
+ case 'S':
+ case 's': goto yy1744;
+ case 'm': goto yy1747;
+ case 'p':
+ case 'u': goto yy1748;
+ default: goto yy1635;
+ }
+yy2993:
yych = *++YYCURSOR;
- if (yych <= '9') {
- if (yych <= '0') {
- if (yych <= '/') goto yy1;
- goto yy1008;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ yyt1 = YYCURSOR;
+ goto yy2020;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= '9') goto yy2905;
+ yyt2 = YYCURSOR;
+ goto yy2842;
+ }
} else {
- if (yych <= '1') goto yy1009;
- if (yych <= '2') goto yy1010;
- goto yy1008;
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2905;
+ } else {
+ if (yych <= 'Z') goto yy1682;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2905;
+ }
}
} else {
- if (yych <= 'F') {
- if (yych <= '@') goto yy1;
- goto yy928;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy1682;
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ } else {
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy1900;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
} else {
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy928;
- goto yy1;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy1902;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1903;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1682;
+ }
}
}
-yy997:
- yyaccept = 32;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == '.') goto yy1011;
- goto yy943;
-yy998:
+yy2994:
yych = *++YYCURSOR;
- if (yych == 'x') goto yy1012;
- goto yy1;
-yy999:
- yych = *++YYCURSOR;
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy1013;
- goto yy1;
-yy1000:
+ if (yych <= '2') {
+ if (yych <= '/') {
+ if (yych == ' ') goto yy1892;
+ goto yy1682;
+ } else {
+ if (yych <= '0') goto yy3010;
+ if (yych <= '1') goto yy3011;
+ goto yy3012;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '9') goto yy3010;
+ if (yych <= '@') goto yy1682;
+ goto yy2904;
+ } else {
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2904;
+ goto yy1682;
+ }
+ }
+yy2995:
yych = *++YYCURSOR;
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy1014;
- goto yy1;
-yy1001:
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '?') {
- if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
+ if (yych <= 'f') {
+ if (yych <= ':') {
+ if (yych <= '.') {
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ yyt1 = YYCURSOR;
+ goto yy2020;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= '9') goto yy3013;
+ yyt2 = YYCURSOR;
+ goto yy2842;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2905;
+ } else {
+ if (yych <= 'Z') goto yy1682;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2905;
+ }
+ }
+ } else {
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy1682;
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ } else {
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy1900;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
} else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy1902;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1903;
+ } else {
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1682;
+ }
+ }
+ }
+yy2996:
+ yych = *++YYCURSOR;
+ if (yych <= '`') {
+ if (yych <= '9') {
if (yych <= '.') {
- if (yych <= ',') goto yy4;
- goto yy46;
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ yyt1 = YYCURSOR;
+ goto yy2020;
+ } else {
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= '5') goto yy3013;
+ goto yy2905;
+ }
+ } else {
+ if (yych <= '@') {
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2842;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1892;
} else {
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy1015;
- goto yy4;
+ if (yych <= 'F') goto yy2905;
+ if (yych <= 'Z') goto yy1682;
+ yyt2 = YYCURSOR;
+ goto yy1892;
}
}
} else {
- if (yych <= '^') {
- if (yych <= '@') goto yy96;
- if (yych <= 'F') goto yy1015;
- if (yych <= 'Z') goto yy46;
- goto yy4;
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych <= 'f') goto yy2905;
+ goto yy1682;
+ } else {
+ if (yych <= 0x7F) {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= 0xC1) goto yy1682;
+ yyt2 = YYCURSOR;
+ goto yy1900;
+ }
} else {
- if (yych <= '`') {
- if (yych <= '_') goto yy46;
- goto yy4;
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy1902;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1903;
} else {
- if (yych <= 'f') goto yy1015;
- if (yych <= 'z') goto yy46;
- goto yy4;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1682;
}
}
}
-yy1002:
+yy2997:
+ yych = *++YYCURSOR;
+ if (yych == ' ') goto yy3014;
+ goto yy1682;
+yy2998:
+ yyaccept = 42;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '.') goto yy3015;
+ goto yy2927;
+yy2999:
+ yych = *++YYCURSOR;
+ if (yych == 'x') goto yy3016;
+ goto yy1682;
+yy3000:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy3017;
+ goto yy1682;
+yy3001:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy3018;
+ goto yy1682;
+yy3002:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy1746;
+ if (yych <= '9') goto yy3019;
+ goto yy1746;
+ } else {
+ if (yych <= 'F') goto yy3019;
+ if (yych <= '`') goto yy1746;
+ if (yych <= 'f') goto yy3019;
+ goto yy1746;
+ }
+yy3003:
yyaccept = 11;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '?') {
- if (yych <= '#') {
- if (yych <= '\r') {
- if (yych <= 0x08) {
- if (yych <= 0x00) {
- yyt1 = YYCURSOR;
- goto yy1016;
- }
- yyt1 = YYCURSOR;
- goto yy1018;
- } else {
- if (yych <= '\n') {
- yyt1 = YYCURSOR;
- goto yy1016;
- }
- if (yych <= '\f') {
- yyt1 = YYCURSOR;
- goto yy1018;
- }
+ if (yych <= 'F') {
+ if (yych <= ',') {
+ if (yych <= '$') {
+ if (yych == ' ') {
yyt1 = YYCURSOR;
- goto yy1016;
+ goto yy3022;
}
+ yyt1 = YYCURSOR;
+ goto yy3020;
} else {
- if (yych <= 0x1B) {
- if (yych <= 0x1A) {
- yyt1 = YYCURSOR;
- goto yy1018;
- }
+ if (yych <= '%') {
yyt1 = YYCURSOR;
- goto yy1016;
- } else {
- if (yych <= 0x1F) {
- yyt1 = YYCURSOR;
- goto yy1018;
- }
- if (yych <= ' ') {
- yyt1 = YYCURSOR;
- goto yy1019;
- }
+ goto yy3023;
+ }
+ if (yych == '+') {
yyt1 = YYCURSOR;
- goto yy1016;
+ goto yy3023;
}
+ yyt1 = YYCURSOR;
+ goto yy3020;
}
} else {
- if (yych <= ',') {
- if (yych <= '%') {
- if (yych <= '$') {
- yyt1 = YYCURSOR;
- goto yy1018;
- }
+ if (yych <= '9') {
+ if (yych <= '-') {
yyt1 = YYCURSOR;
- goto yy1020;
- } else {
- if (yych == '+') {
- yyt1 = YYCURSOR;
- goto yy1020;
- }
+ goto yy3024;
+ }
+ if (yych <= '.') {
yyt1 = YYCURSOR;
- goto yy1016;
+ goto yy3025;
}
- } else {
if (yych <= '/') {
- if (yych <= '-') {
- yyt1 = YYCURSOR;
- goto yy1021;
- }
- if (yych <= '.') {
- yyt1 = YYCURSOR;
- goto yy1022;
- }
yyt1 = YYCURSOR;
- goto yy1018;
- } else {
- if (yych <= '9') goto yy1024;
- if (yych <= ':') {
- yyt1 = YYCURSOR;
- goto yy1026;
- }
+ goto yy3026;
+ }
+ goto yy3028;
+ } else {
+ if (yych <= ':') {
yyt1 = YYCURSOR;
- goto yy1016;
+ goto yy3030;
}
+ if (yych <= '?') {
+ yyt1 = YYCURSOR;
+ goto yy3020;
+ }
+ if (yych <= '@') {
+ yyt1 = YYCURSOR;
+ goto yy3031;
+ }
+ yyt1 = YYCURSOR;
+ goto yy3032;
}
}
} else {
- if (yych <= 'f') {
- if (yych <= 'Z') {
- if (yych <= 'D') {
- if (yych <= '@') {
- yyt1 = YYCURSOR;
- goto yy1027;
- }
+ if (yych <= 0x7F) {
+ if (yych <= '_') {
+ if (yych <= 'Z') {
yyt1 = YYCURSOR;
- goto yy1028;
- } else {
- if (yych <= 'E') {
- yyt1 = YYCURSOR;
- goto yy1029;
- }
- if (yych <= 'F') {
- yyt1 = YYCURSOR;
- goto yy1028;
- }
+ goto yy3033;
+ }
+ if (yych <= '^') {
yyt1 = YYCURSOR;
- goto yy1030;
+ goto yy3020;
}
+ yyt1 = YYCURSOR;
+ goto yy3034;
} else {
if (yych <= '`') {
- if (yych == '_') {
- yyt1 = YYCURSOR;
- goto yy1021;
- }
yyt1 = YYCURSOR;
- goto yy1016;
- } else {
- if (yych == 'e') {
- yyt1 = YYCURSOR;
- goto yy1029;
- }
+ goto yy3020;
+ }
+ if (yych <= 'f') {
yyt1 = YYCURSOR;
- goto yy1028;
+ goto yy3032;
}
+ if (yych <= 'z') {
+ yyt1 = YYCURSOR;
+ goto yy3033;
+ }
+ yyt1 = YYCURSOR;
+ goto yy3020;
}
} else {
- if (yych <= 0xDF) {
- if (yych <= '~') {
- if (yych <= 'z') {
- yyt1 = YYCURSOR;
- goto yy1030;
- }
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy3028;
+ if (yych <= 0xDF) {
yyt1 = YYCURSOR;
- goto yy1016;
- } else {
- if (yych <= 0x7F) {
- yyt1 = YYCURSOR;
- goto yy1018;
- }
- if (yych <= 0xC1) goto yy1024;
+ goto yy3035;
+ }
+ if (yych <= 0xE0) {
yyt1 = YYCURSOR;
- goto yy1031;
+ goto yy3036;
}
+ yyt1 = YYCURSOR;
+ goto yy3037;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xE0) {
- yyt1 = YYCURSOR;
- goto yy1032;
- }
- if (yych <= 0xEF) {
- yyt1 = YYCURSOR;
- goto yy1033;
- }
yyt1 = YYCURSOR;
- goto yy1034;
- } else {
- if (yych <= 0xF3) {
- yyt1 = YYCURSOR;
- goto yy1035;
- }
- if (yych <= 0xF4) {
- yyt1 = YYCURSOR;
- goto yy1036;
- }
- goto yy1024;
+ goto yy3038;
+ }
+ if (yych <= 0xF3) {
+ yyt1 = YYCURSOR;
+ goto yy3039;
}
+ if (yych <= 0xF4) {
+ yyt1 = YYCURSOR;
+ goto yy3040;
+ }
+ goto yy3028;
}
}
}
-yy1003:
- yyaccept = 6;
+yy3004:
+ yyaccept = 12;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '?') {
- if (yych <= '#') {
- if (yych <= '\r') {
- if (yych <= 0x08) {
- if (yych <= 0x00) {
- yyt1 = YYCURSOR;
- goto yy1016;
- }
- yyt1 = YYCURSOR;
- goto yy1018;
- } else {
- if (yych <= '\n') {
- yyt1 = YYCURSOR;
- goto yy1016;
- }
- if (yych <= '\f') {
- yyt1 = YYCURSOR;
- goto yy1018;
- }
+ if (yych <= 'F') {
+ if (yych <= ',') {
+ if (yych <= '$') {
+ if (yych == ' ') {
yyt1 = YYCURSOR;
- goto yy1016;
+ goto yy3022;
}
+ yyt1 = YYCURSOR;
+ goto yy3020;
} else {
- if (yych <= 0x1B) {
- if (yych <= 0x1A) {
- yyt1 = YYCURSOR;
- goto yy1018;
- }
+ if (yych <= '%') {
yyt1 = YYCURSOR;
- goto yy1016;
- } else {
- if (yych <= 0x1F) {
- yyt1 = YYCURSOR;
- goto yy1018;
- }
- if (yych <= ' ') {
- yyt1 = YYCURSOR;
- goto yy1019;
- }
+ goto yy3023;
+ }
+ if (yych == '+') {
yyt1 = YYCURSOR;
- goto yy1016;
+ goto yy3023;
}
+ yyt1 = YYCURSOR;
+ goto yy3020;
}
} else {
- if (yych <= ',') {
- if (yych <= '%') {
- if (yych <= '$') {
- yyt1 = YYCURSOR;
- goto yy1018;
- }
+ if (yych <= '9') {
+ if (yych <= '-') {
yyt1 = YYCURSOR;
- goto yy1020;
- } else {
- if (yych == '+') {
- yyt1 = YYCURSOR;
- goto yy1020;
- }
+ goto yy3024;
+ }
+ if (yych <= '.') {
yyt1 = YYCURSOR;
- goto yy1016;
+ goto yy3025;
}
- } else {
if (yych <= '/') {
- if (yych <= '-') {
- yyt1 = YYCURSOR;
- goto yy1021;
- }
- if (yych <= '.') {
- yyt1 = YYCURSOR;
- goto yy1022;
- }
yyt1 = YYCURSOR;
- goto yy1018;
- } else {
- if (yych <= '9') goto yy1025;
- if (yych <= ':') {
- yyt1 = YYCURSOR;
- goto yy1026;
- }
+ goto yy3026;
+ }
+ goto yy3029;
+ } else {
+ if (yych <= ':') {
+ yyt1 = YYCURSOR;
+ goto yy3030;
+ }
+ if (yych <= '?') {
+ yyt1 = YYCURSOR;
+ goto yy3020;
+ }
+ if (yych <= '@') {
yyt1 = YYCURSOR;
- goto yy1016;
+ goto yy3031;
}
+ yyt1 = YYCURSOR;
+ goto yy3032;
}
}
} else {
- if (yych <= 'f') {
- if (yych <= 'Z') {
- if (yych <= 'D') {
- if (yych <= '@') {
- yyt1 = YYCURSOR;
- goto yy1027;
- }
+ if (yych <= 0x7F) {
+ if (yych <= '_') {
+ if (yych <= 'Z') {
yyt1 = YYCURSOR;
- goto yy1028;
- } else {
- if (yych <= 'E') {
- yyt1 = YYCURSOR;
- goto yy1029;
- }
- if (yych <= 'F') {
- yyt1 = YYCURSOR;
- goto yy1028;
- }
+ goto yy3033;
+ }
+ if (yych <= '^') {
yyt1 = YYCURSOR;
- goto yy1030;
+ goto yy3020;
}
+ yyt1 = YYCURSOR;
+ goto yy3034;
} else {
if (yych <= '`') {
- if (yych == '_') {
- yyt1 = YYCURSOR;
- goto yy1021;
- }
yyt1 = YYCURSOR;
- goto yy1016;
- } else {
- if (yych == 'e') {
- yyt1 = YYCURSOR;
- goto yy1029;
- }
+ goto yy3020;
+ }
+ if (yych <= 'f') {
yyt1 = YYCURSOR;
- goto yy1028;
+ goto yy3032;
}
+ if (yych <= 'z') {
+ yyt1 = YYCURSOR;
+ goto yy3033;
+ }
+ yyt1 = YYCURSOR;
+ goto yy3020;
}
} else {
- if (yych <= 0xDF) {
- if (yych <= '~') {
- if (yych <= 'z') {
- yyt1 = YYCURSOR;
- goto yy1030;
- }
+ if (yych <= 0xEF) {
+ if (yych <= 0xC1) goto yy1735;
+ if (yych <= 0xDF) {
yyt1 = YYCURSOR;
- goto yy1016;
- } else {
- if (yych <= 0x7F) {
- yyt1 = YYCURSOR;
- goto yy1018;
- }
- if (yych <= 0xC1) goto yy26;
+ goto yy3035;
+ }
+ if (yych <= 0xE0) {
yyt1 = YYCURSOR;
- goto yy1031;
+ goto yy3036;
}
+ yyt1 = YYCURSOR;
+ goto yy3037;
} else {
if (yych <= 0xF0) {
- if (yych <= 0xE0) {
- yyt1 = YYCURSOR;
- goto yy1032;
- }
- if (yych <= 0xEF) {
- yyt1 = YYCURSOR;
- goto yy1033;
- }
yyt1 = YYCURSOR;
- goto yy1034;
- } else {
- if (yych <= 0xF3) {
- yyt1 = YYCURSOR;
- goto yy1035;
- }
- if (yych <= 0xF4) {
- yyt1 = YYCURSOR;
- goto yy1036;
- }
- goto yy26;
+ goto yy3038;
+ }
+ if (yych <= 0xF3) {
+ yyt1 = YYCURSOR;
+ goto yy3039;
}
+ if (yych <= 0xF4) {
+ yyt1 = YYCURSOR;
+ goto yy3040;
+ }
+ goto yy1735;
}
}
}
-yy1004:
+yy3005:
yych = *++YYCURSOR;
if (yych <= 'z') {
if (yych <= '9') {
if (yych == '%') {
yyt1 = YYCURSOR;
- goto yy680;
+ goto yy2575;
}
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy1;
+ goto yy1682;
} else {
if (yych <= '@') {
- if (yych <= ':') goto yy882;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2842;
+ }
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy1;
+ goto yy1682;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy1005:
+yy3006:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy1037;
- if (yych <= ':') goto yy927;
- goto yy1;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy3041;
+ if (yych <= ':') goto yy2903;
+ goto yy1682;
} else {
- if (yych <= 'F') goto yy1037;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy1037;
- goto yy1;
+ if (yych <= 'F') goto yy3041;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy3041;
+ goto yy1682;
}
-yy1006:
+yy3007:
yych = *++YYCURSOR;
- if (yych == ':') goto yy980;
- goto yy1;
-yy1007:
+ if (yych == ':') goto yy2970;
+ goto yy1682;
+yy3008:
yych = *++YYCURSOR;
if (yych <= 'z') {
if (yych <= '@') {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
+ }
+ if (yych <= '9') goto yy2771;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1897;
}
- if (yych <= '9') goto yy830;
- if (yych <= ':') goto yy1;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
if (yych <= 'Z') {
- if (yych <= 'F') goto yy830;
- goto yy1;
+ if (yych <= 'F') goto yy2771;
+ goto yy1682;
} else {
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 'f') goto yy830;
- goto yy1;
+ if (yych <= 'f') goto yy2771;
+ goto yy1682;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy1008:
+yy3009:
+ yyaccept = 3;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '^') {
+ if (yych <= ':') {
+ if (yych <= '+') {
+ if (yych <= '$') {
+ if (yych == ' ') {
+ yyt1 = YYCURSOR;
+ goto yy3022;
+ }
+ yyt1 = YYCURSOR;
+ goto yy3020;
+ } else {
+ if (yych <= '%') {
+ yyt1 = YYCURSOR;
+ goto yy3023;
+ }
+ if (yych <= '*') {
+ yyt1 = YYCURSOR;
+ goto yy3020;
+ }
+ yyt1 = YYCURSOR;
+ goto yy3023;
+ }
+ } else {
+ if (yych <= '.') {
+ if (yych <= ',') {
+ yyt1 = YYCURSOR;
+ goto yy3020;
+ }
+ if (yych <= '-') {
+ yyt1 = YYCURSOR;
+ goto yy3024;
+ }
+ yyt1 = YYCURSOR;
+ goto yy3042;
+ } else {
+ if (yych <= '/') {
+ yyt1 = YYCURSOR;
+ goto yy3026;
+ }
+ if (yych <= '9') goto yy3043;
+ yyt1 = YYCURSOR;
+ goto yy3030;
+ }
+ }
+ } else {
+ if (yych <= 'G') {
+ if (yych <= 'D') {
+ if (yych <= '?') {
+ yyt1 = YYCURSOR;
+ goto yy3020;
+ }
+ if (yych <= '@') {
+ yyt1 = YYCURSOR;
+ goto yy3031;
+ }
+ yyt1 = YYCURSOR;
+ goto yy3032;
+ } else {
+ if (yych <= 'E') {
+ yyt1 = YYCURSOR;
+ goto yy3044;
+ }
+ if (yych <= 'F') {
+ yyt1 = YYCURSOR;
+ goto yy3032;
+ }
+ yyt1 = YYCURSOR;
+ goto yy3045;
+ }
+ } else {
+ if (yych <= 'L') {
+ if (yych == 'K') {
+ yyt1 = YYCURSOR;
+ goto yy3045;
+ }
+ yyt1 = YYCURSOR;
+ goto yy3033;
+ } else {
+ if (yych <= 'M') {
+ yyt1 = YYCURSOR;
+ goto yy3045;
+ }
+ if (yych <= 'Z') {
+ yyt1 = YYCURSOR;
+ goto yy3033;
+ }
+ yyt1 = YYCURSOR;
+ goto yy3020;
+ }
+ }
+ }
+ } else {
+ if (yych <= 'p') {
+ if (yych <= 'g') {
+ if (yych <= 'd') {
+ if (yych <= '_') {
+ yyt1 = YYCURSOR;
+ goto yy3034;
+ }
+ if (yych <= '`') {
+ yyt1 = YYCURSOR;
+ goto yy3020;
+ }
+ yyt1 = YYCURSOR;
+ goto yy3032;
+ } else {
+ if (yych <= 'e') {
+ yyt1 = YYCURSOR;
+ goto yy3044;
+ }
+ if (yych <= 'f') {
+ yyt1 = YYCURSOR;
+ goto yy3032;
+ }
+ yyt1 = YYCURSOR;
+ goto yy3045;
+ }
+ } else {
+ if (yych <= 'l') {
+ if (yych == 'k') {
+ yyt1 = YYCURSOR;
+ goto yy3045;
+ }
+ yyt1 = YYCURSOR;
+ goto yy3033;
+ } else {
+ if (yych <= 'm') {
+ yyt1 = YYCURSOR;
+ goto yy3046;
+ }
+ if (yych <= 'o') {
+ yyt1 = YYCURSOR;
+ goto yy3033;
+ }
+ yyt1 = YYCURSOR;
+ goto yy3047;
+ }
+ }
+ } else {
+ if (yych <= 0xDF) {
+ if (yych <= 'z') {
+ if (yych == 'u') {
+ yyt1 = YYCURSOR;
+ goto yy3047;
+ }
+ yyt1 = YYCURSOR;
+ goto yy3033;
+ } else {
+ if (yych <= 0x7F) {
+ yyt1 = YYCURSOR;
+ goto yy3020;
+ }
+ if (yych <= 0xC1) goto yy1635;
+ yyt1 = YYCURSOR;
+ goto yy3035;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt1 = YYCURSOR;
+ goto yy3036;
+ }
+ if (yych <= 0xEF) {
+ yyt1 = YYCURSOR;
+ goto yy3037;
+ }
+ yyt1 = YYCURSOR;
+ goto yy3038;
+ } else {
+ if (yych <= 0xF3) {
+ yyt1 = YYCURSOR;
+ goto yy3039;
+ }
+ if (yych <= 0xF4) {
+ yyt1 = YYCURSOR;
+ goto yy3040;
+ }
+ goto yy1635;
+ }
+ }
+ }
+ }
+yy3010:
yych = *++YYCURSOR;
if (yych <= 'f') {
if (yych <= ':') {
if (yych <= '.') {
if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
yyt1 = YYCURSOR;
- goto yy297;
+ goto yy2020;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '9') goto yy1038;
- goto yy959;
+ if (yych <= '9') goto yy3048;
+ yyt2 = YYCURSOR;
+ goto yy2942;
}
} else {
if (yych <= 'F') {
if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy958;
+ goto yy2941;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy958;
+ goto yy2941;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy1009:
+yy3011:
yych = *++YYCURSOR;
if (yych <= 'f') {
if (yych <= ':') {
if (yych <= '.') {
if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
yyt1 = YYCURSOR;
- goto yy297;
+ goto yy2020;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '9') goto yy1039;
- goto yy959;
+ if (yych <= '9') goto yy3049;
+ yyt2 = YYCURSOR;
+ goto yy2942;
}
} else {
if (yych <= 'F') {
if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy958;
+ goto yy2941;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy958;
+ goto yy2941;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy1010:
+yy3012:
yych = *++YYCURSOR;
if (yych <= '`') {
if (yych <= '5') {
if (yych <= '.') {
if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
yyt1 = YYCURSOR;
- goto yy297;
+ goto yy2020;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '4') goto yy1039;
- goto yy1040;
+ if (yych <= '4') goto yy3049;
+ goto yy3050;
}
} else {
if (yych <= '@') {
- if (yych <= '9') goto yy1038;
- if (yych <= ':') goto yy959;
+ if (yych <= '9') goto yy3048;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2942;
+ }
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 'F') goto yy958;
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'F') goto yy2941;
+ if (yych <= 'Z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
}
} else {
if (yych <= 0xDF) {
if (yych <= 'z') {
- if (yych <= 'f') goto yy958;
- goto yy1;
+ if (yych <= 'f') goto yy2941;
+ goto yy1682;
} else {
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy1011:
- yych = *++YYCURSOR;
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy1041;
- goto yy1;
-yy1012:
+yy3013:
yych = *++YYCURSOR;
- if (yych == '8') goto yy1042;
- goto yy1;
-yy1013:
- yych = *++YYCURSOR;
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy1043;
- goto yy1;
-yy1014:
- yyaccept = 33;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == '.') goto yy1044;
- goto yy971;
-yy1015:
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '?') {
- if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
- } else {
+ if (yych <= 'f') {
+ if (yych <= ':') {
if (yych <= '.') {
- if (yych <= ',') goto yy4;
- goto yy46;
+ if (yych <= '-') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ yyt1 = YYCURSOR;
+ goto yy2020;
} else {
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy1045;
- goto yy4;
+ if (yych <= '/') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ if (yych <= '9') goto yy2943;
+ yyt2 = YYCURSOR;
+ goto yy2842;
+ }
+ } else {
+ if (yych <= 'F') {
+ if (yych <= '@') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2943;
+ } else {
+ if (yych <= 'Z') goto yy1682;
+ if (yych <= '`') {
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ }
+ goto yy2943;
}
}
} else {
- if (yych <= '^') {
- if (yych <= '@') goto yy96;
- if (yych <= 'F') goto yy1045;
- if (yych <= 'Z') goto yy46;
- goto yy4;
+ if (yych <= 0xE0) {
+ if (yych <= 0x7F) {
+ if (yych <= 'z') goto yy1682;
+ yyt2 = YYCURSOR;
+ goto yy1892;
+ } else {
+ if (yych <= 0xC1) goto yy1682;
+ if (yych <= 0xDF) {
+ yyt2 = YYCURSOR;
+ goto yy1900;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1901;
+ }
} else {
- if (yych <= '`') {
- if (yych <= '_') goto yy46;
- goto yy4;
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) {
+ yyt2 = YYCURSOR;
+ goto yy1902;
+ }
+ yyt2 = YYCURSOR;
+ goto yy1903;
} else {
- if (yych <= 'f') goto yy1045;
- if (yych <= 'z') goto yy46;
- goto yy4;
+ if (yych <= 0xF3) {
+ yyt2 = YYCURSOR;
+ goto yy1904;
+ }
+ if (yych <= 0xF4) {
+ yyt2 = YYCURSOR;
+ goto yy1905;
+ }
+ goto yy1682;
}
}
}
-yy1016:
+yy3014:
+ yych = *++YYCURSOR;
+ if (yych <= 0xDF) {
+ if (yych <= '\n') {
+ if (yych <= 0x00) goto yy1682;
+ if (yych <= '\t') {
+ yyt1 = YYCURSOR;
+ goto yy3051;
+ }
+ goto yy1682;
+ } else {
+ if (yych <= 0x7F) {
+ yyt1 = YYCURSOR;
+ goto yy3051;
+ }
+ if (yych <= 0xC1) goto yy1682;
+ yyt1 = YYCURSOR;
+ goto yy3052;
+ }
+ } else {
+ if (yych <= 0xF0) {
+ if (yych <= 0xE0) {
+ yyt1 = YYCURSOR;
+ goto yy3053;
+ }
+ if (yych <= 0xEF) {
+ yyt1 = YYCURSOR;
+ goto yy3054;
+ }
+ yyt1 = YYCURSOR;
+ goto yy3055;
+ } else {
+ if (yych <= 0xF3) {
+ yyt1 = YYCURSOR;
+ goto yy3056;
+ }
+ if (yych <= 0xF4) {
+ yyt1 = YYCURSOR;
+ goto yy3057;
+ }
+ goto yy1682;
+ }
+ }
+yy3015:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy3058;
+ goto yy1682;
+yy3016:
+ yych = *++YYCURSOR;
+ if (yych == '8') goto yy3059;
+ goto yy1682;
+yy3017:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy3060;
+ goto yy1682;
+yy3018:
+ yyaccept = 43;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '.') goto yy3061;
+ goto yy2961;
+yy3019:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy1746;
+ if (yych <= '9') goto yy3062;
+ goto yy1746;
+ } else {
+ if (yych <= 'F') goto yy3062;
+ if (yych <= '`') goto yy1746;
+ if (yych <= 'f') goto yy3062;
+ goto yy1746;
+ }
+yy3020:
++YYCURSOR;
-yy1017:
+yy3021:
YYCURSOR = yyt1;
-#line 236 "../../lnav/src/data_scanner_re.re"
+#line 391 "../../lnav/src/data_scanner_re.re"
{
CAPTURE(DT_CREDIT_CARD_NUMBER);
if (!this->is_credit_card(this->to_string_fragment(cap_all))) {
@@ -34162,1935 +82804,1676 @@ yy1017:
cap_inner.c_end = cap_inner.c_begin + 4;
}
this->ds_next_offset = cap_all.c_end;
- token_out = DT_NUMBER;
+ token_out = DT_HEX_DUMP;
}
return tokenize_result{token_out, cap_all, cap_inner, this->ds_input.data()};
}
-#line 34170 "../../lnav/src/data_scanner_re.cc"
-yy1018:
- yyaccept = 34;
+#line 82812 "../../lnav/src/data_scanner_re.cc"
+yy3022:
+ yyaccept = 44;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= ',') {
- if (yych <= '\r') {
- if (yych <= 0x08) {
- if (yych <= 0x00) goto yy1017;
- goto yy4;
- } else {
- if (yych <= '\n') goto yy1017;
- if (yych <= '\f') goto yy4;
- goto yy1017;
- }
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ if (yych == '%') goto yy1859;
+ goto yy3021;
+yy3023:
+ yyaccept = 44;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '/') {
+ if (yych <= '*') {
+ if (yych == '%') goto yy1698;
+ goto yy3021;
} else {
- if (yych <= 0x1F) {
- if (yych == 0x1B) goto yy1017;
- goto yy4;
- } else {
- if (yych == '$') goto yy4;
- goto yy1017;
- }
+ if (yych == ',') goto yy3021;
+ if (yych <= '.') goto yy1698;
+ goto yy3021;
}
} else {
- if (yych <= '`') {
- if (yych <= 'Z') {
- if (yych <= ':') goto yy4;
- if (yych <= '?') goto yy1017;
- goto yy4;
- } else {
- if (yych == '_') goto yy4;
- goto yy1017;
- }
+ if (yych <= '^') {
+ if (yych <= '9') goto yy1698;
+ if (yych <= '?') goto yy3021;
+ if (yych <= 'Z') goto yy1698;
+ goto yy3021;
} else {
- if (yych <= 0x7F) {
- if (yych <= 'z') goto yy4;
- if (yych <= '~') goto yy1017;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy1017;
- if (yych <= 0xF4) goto yy4;
- goto yy1017;
- }
+ if (yych == '`') goto yy3021;
+ if (yych <= 'z') goto yy1698;
+ goto yy3021;
}
}
-yy1019:
- yyaccept = 34;
+yy3024:
+ yyaccept = 44;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
+ if (yych <= '9') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1697;
+ if (yych <= '*') goto yy3021;
+ goto yy1697;
+ } else {
+ if (yych <= ',') goto yy3021;
+ if (yych <= '.') goto yy1697;
+ if (yych <= '/') goto yy3021;
+ goto yy1745;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '?') goto yy3021;
+ if (yych <= '@') goto yy1699;
+ if (yych <= 'Z') goto yy1745;
+ goto yy3021;
+ } else {
+ if (yych == '`') goto yy3021;
+ if (yych <= 'z') goto yy1745;
+ goto yy3021;
+ }
}
- if (yych == '%') goto yy177;
- goto yy1017;
-yy1020:
- yyaccept = 34;
+yy3025:
+ yyaccept = 44;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '/') {
- if (yych <= '*') {
- if (yych == '%') goto yy81;
- goto yy1017;
+ if (yych <= '9') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1697;
+ if (yych <= '*') goto yy3021;
+ goto yy1697;
} else {
- if (yych == ',') goto yy1017;
- if (yych <= '.') goto yy81;
- goto yy1017;
+ if (yych <= ',') goto yy3021;
+ if (yych <= '.') goto yy1697;
+ if (yych <= '/') goto yy3021;
+ goto yy2111;
}
} else {
if (yych <= '^') {
- if (yych <= '9') goto yy81;
- if (yych <= '?') goto yy1017;
- if (yych <= 'Z') goto yy81;
- goto yy1017;
+ if (yych <= '?') goto yy3021;
+ if (yych <= '@') goto yy1699;
+ if (yych <= 'Z') goto yy1745;
+ goto yy3021;
} else {
- if (yych == '`') goto yy1017;
- if (yych <= 'z') goto yy81;
- goto yy1017;
+ if (yych == '`') goto yy3021;
+ if (yych <= 'z') goto yy1745;
+ goto yy3021;
}
}
-yy1021:
- yyaccept = 34;
+yy3026:
+ yych = *++YYCURSOR;
+ if (yych <= 'Z') {
+ if (yych <= '/') goto yy3021;
+ if (yych <= '9') goto yy1864;
+ if (yych <= '@') goto yy3021;
+ goto yy1864;
+ } else {
+ if (yych <= '_') {
+ if (yych <= '^') goto yy3021;
+ goto yy1864;
+ } else {
+ if (yych <= '`') goto yy3021;
+ if (yych <= 'z') goto yy1864;
+ goto yy3021;
+ }
+ }
+yy3027:
+ yyaccept = 11;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[1024+yych] & 16) {
- goto yy46;
+yy3028:
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
}
- if (yych <= '%') {
- if (yych <= '\r') {
- if (yych <= 0x08) {
- if (yych <= 0x00) goto yy1017;
- goto yy4;
+ if (yych <= '9') {
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy1733;
+ goto yy1727;
} else {
- if (yych <= '\n') goto yy1017;
- if (yych <= '\f') goto yy4;
- goto yy1017;
+ if (yych == '+') goto yy1697;
+ goto yy1733;
}
} else {
- if (yych <= 0x1F) {
- if (yych == 0x1B) goto yy1017;
- goto yy4;
+ if (yych <= '.') {
+ if (yych <= '-') goto yy1729;
+ goto yy1985;
} else {
- if (yych <= '#') goto yy1017;
- if (yych <= '$') goto yy4;
- goto yy80;
+ if (yych <= '/') goto yy1731;
+ if (yych <= '7') goto yy3027;
}
}
} else {
- if (yych <= '?') {
- if (yych <= '+') {
- if (yych <= '*') goto yy1017;
- goto yy80;
+ if (yych <= 'Z') {
+ if (yych <= '?') {
+ if (yych <= ':') goto yy1879;
+ goto yy1733;
} else {
- if (yych <= ',') goto yy1017;
- if (yych <= ':') goto yy4;
- goto yy1017;
+ if (yych <= '@') goto yy1737;
+ if (yych <= 'F') goto yy1883;
+ goto yy1742;
}
} else {
- if (yych <= 0x7F) {
- if (yych <= '@') goto yy96;
- if (yych <= '~') goto yy1017;
- goto yy4;
+ if (yych <= '`') {
+ if (yych == '_') goto yy1745;
+ goto yy1733;
} else {
- if (yych <= 0xC1) goto yy1017;
- if (yych <= 0xF4) goto yy4;
- goto yy1017;
+ if (yych <= 'f') goto yy1883;
+ if (yych <= 'z') goto yy1742;
+ goto yy1733;
}
}
}
-yy1022:
- yyaccept = 34;
+yy3029:
+ yyaccept = 12;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '.') {
- if (yych <= 0x1B) {
- if (yych <= '\n') {
- if (yych <= 0x00) goto yy1017;
- if (yych <= 0x08) goto yy4;
- goto yy1017;
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ if (yych <= ':') {
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy1735;
+ goto yy1727;
} else {
- if (yych == '\r') goto yy1017;
- if (yych <= 0x1A) goto yy4;
- goto yy1017;
+ if (yych == '+') goto yy1697;
+ goto yy1735;
}
} else {
- if (yych <= '%') {
- if (yych <= 0x1F) goto yy4;
- if (yych <= '#') goto yy1017;
- if (yych <= '$') goto yy4;
- goto yy80;
+ if (yych <= '.') {
+ if (yych <= '-') goto yy1729;
+ goto yy1985;
} else {
- if (yych == '+') goto yy80;
- if (yych <= ',') goto yy1017;
- goto yy46;
+ if (yych <= '/') goto yy1731;
+ if (yych <= '9') goto yy3029;
+ goto yy1879;
}
}
} else {
if (yych <= '^') {
- if (yych <= ':') {
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy359;
- goto yy4;
+ if (yych <= '@') {
+ if (yych <= '?') goto yy1735;
+ goto yy1737;
} else {
- if (yych <= '?') goto yy1017;
- if (yych <= '@') goto yy96;
- if (yych <= 'Z') goto yy46;
- goto yy1017;
+ if (yych <= 'F') goto yy1883;
+ if (yych <= 'Z') goto yy1742;
+ goto yy1735;
}
} else {
- if (yych <= '~') {
- if (yych == '`') goto yy1017;
- if (yych <= 'z') goto yy46;
- goto yy1017;
+ if (yych <= '`') {
+ if (yych <= '_') goto yy1745;
+ goto yy1735;
} else {
- if (yych <= 0x7F) goto yy4;
- if (yych <= 0xC1) goto yy1017;
- if (yych <= 0xF4) goto yy4;
- goto yy1017;
+ if (yych <= 'f') goto yy1883;
+ if (yych <= 'z') goto yy1742;
+ goto yy1735;
}
}
}
-yy1023:
- yyaccept = 11;
+yy3030:
+ yyaccept = 44;
yych = *(YYMARKER = ++YYCURSOR);
-yy1024:
- if (yybm[768+yych] & 32) {
- goto yy103;
- }
- if (yych <= '?') {
- if (yych <= '$') {
- if (yych <= '\r') {
- if (yych <= 0x08) {
- if (yych <= 0x00) goto yy109;
- goto yy3;
- } else {
- if (yych <= '\n') goto yy109;
- if (yych <= '\f') goto yy3;
- goto yy109;
- }
- } else {
- if (yych <= 0x1B) {
- if (yych <= 0x1A) goto yy3;
- goto yy109;
- } else {
- if (yych <= 0x1F) goto yy3;
- if (yych <= '#') goto yy109;
- goto yy3;
- }
- }
+ if (yych == '/') goto yy1873;
+ if (yych == ':') goto yy1731;
+ goto yy3021;
+yy3031:
+ yyaccept = 44;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '.') {
+ if (yych <= ',') goto yy3021;
+ goto yy1802;
} else {
- if (yych <= '-') {
- if (yych <= '*') {
- if (yych <= '%') goto yy105;
- goto yy109;
- } else {
- if (yych <= '+') goto yy80;
- if (yych <= ',') goto yy109;
- goto yy46;
- }
- } else {
- if (yych <= '7') {
- if (yych <= '.') goto yy266;
- if (yych <= '/') goto yy3;
- goto yy1023;
- } else {
- if (yych <= '9') goto yy1025;
- if (yych <= ':') goto yy148;
- goto yy109;
- }
- }
+ if (yych <= '/') goto yy3021;
+ if (yych <= '9') goto yy1877;
+ goto yy3021;
}
} else {
- if (yych <= 'f') {
- if (yych <= 'Z') {
- if (yych <= 'D') {
- if (yych <= '@') goto yy96;
- goto yy196;
- } else {
- if (yych <= 'E') goto yy754;
- if (yych <= 'F') goto yy196;
- goto yy115;
- }
- } else {
- if (yych <= '`') {
- if (yych == '_') goto yy46;
- goto yy109;
- } else {
- if (yych == 'e') goto yy754;
- goto yy196;
- }
- }
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy1877;
+ if (yych <= '^') goto yy3021;
+ goto yy1864;
} else {
- if (yych <= 0xDF) {
- if (yych <= '~') {
- if (yych <= 'z') goto yy115;
- goto yy109;
- } else {
- if (yych <= 0x7F) goto yy3;
- if (yych <= 0xC1) goto yy109;
- goto yy56;
- }
- } else {
- if (yych <= 0xF0) {
- if (yych <= 0xE0) goto yy57;
- if (yych <= 0xEF) goto yy58;
- goto yy59;
- } else {
- if (yych <= 0xF3) goto yy60;
- if (yych <= 0xF4) goto yy61;
- goto yy109;
- }
- }
+ if (yych <= '`') goto yy3021;
+ if (yych <= 'z') goto yy1877;
+ goto yy3021;
}
}
-yy1025:
- yyaccept = 6;
+yy3032:
+ yyaccept = 44;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 32) {
- goto yy103;
+ if (yych <= ':') {
+ if (yych <= '*') {
+ if (yych == '%') goto yy1884;
+ goto yy3021;
+ } else {
+ if (yych == ',') goto yy3021;
+ goto yy1884;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '?') goto yy3021;
+ if (yych <= 'Z') goto yy1884;
+ goto yy3021;
+ } else {
+ if (yych == '`') goto yy3021;
+ if (yych <= 'z') goto yy1884;
+ goto yy3021;
+ }
}
- if (yych <= '@') {
- if (yych <= '$') {
- if (yych <= '\r') {
- if (yych <= 0x08) {
- if (yych <= 0x00) goto yy26;
- goto yy3;
- } else {
- if (yych <= '\n') goto yy26;
- if (yych <= '\f') goto yy3;
- goto yy26;
- }
- } else {
- if (yych <= 0x1B) {
- if (yych <= 0x1A) goto yy3;
- goto yy26;
- } else {
- if (yych <= 0x1F) goto yy3;
- if (yych <= '#') goto yy26;
- goto yy3;
- }
- }
+yy3033:
+ yyaccept = 44;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= '*') {
+ if (yych == '%') goto yy1743;
+ goto yy3021;
} else {
- if (yych <= '-') {
- if (yych <= '*') {
- if (yych <= '%') goto yy105;
- goto yy26;
- } else {
- if (yych <= '+') goto yy80;
- if (yych <= ',') goto yy26;
- goto yy46;
- }
- } else {
- if (yych <= '9') {
- if (yych <= '.') goto yy266;
- if (yych <= '/') goto yy3;
- goto yy1025;
- } else {
- if (yych <= ':') goto yy148;
- if (yych <= '?') goto yy26;
- goto yy96;
- }
- }
+ if (yych == ',') goto yy3021;
+ goto yy1743;
}
} else {
- if (yych <= 'f') {
- if (yych <= '^') {
- if (yych <= 'E') {
- if (yych <= 'D') goto yy196;
- goto yy754;
- } else {
- if (yych <= 'F') goto yy196;
- if (yych <= 'Z') goto yy115;
- goto yy26;
- }
- } else {
- if (yych <= '`') {
- if (yych <= '_') goto yy46;
- goto yy26;
- } else {
- if (yych == 'e') goto yy754;
- goto yy196;
- }
- }
+ if (yych <= '^') {
+ if (yych <= '?') goto yy3021;
+ if (yych <= 'Z') goto yy1743;
+ goto yy3021;
} else {
- if (yych <= 0xDF) {
- if (yych <= '~') {
- if (yych <= 'z') goto yy115;
- goto yy26;
- } else {
- if (yych <= 0x7F) goto yy3;
- if (yych <= 0xC1) goto yy26;
- goto yy56;
- }
- } else {
- if (yych <= 0xF0) {
- if (yych <= 0xE0) goto yy57;
- if (yych <= 0xEF) goto yy58;
- goto yy59;
- } else {
- if (yych <= 0xF3) goto yy60;
- if (yych <= 0xF4) goto yy61;
- goto yy26;
- }
- }
+ if (yych == '`') goto yy3021;
+ if (yych <= 'z') goto yy1743;
+ goto yy3021;
}
}
-yy1026:
- yyaccept = 34;
+yy3034:
+ yyaccept = 44;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych == '/') goto yy189;
- if (yych == ':') goto yy152;
- goto yy1017;
-yy1027:
- yyaccept = 34;
+ if (yych <= ':') {
+ if (yych <= '*') {
+ if (yych == '%') goto yy1746;
+ goto yy3021;
+ } else {
+ if (yych == ',') goto yy3021;
+ goto yy1746;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '?') goto yy3021;
+ if (yych <= 'Z') goto yy1746;
+ goto yy3021;
+ } else {
+ if (yych == '`') goto yy3021;
+ if (yych <= 'z') goto yy1746;
+ goto yy3021;
+ }
+ }
+yy3035:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy3020;
+ goto yy1682;
+yy3036:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy1682;
+ if (yych <= 0xBF) goto yy3035;
+ goto yy1682;
+yy3037:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy3035;
+ goto yy1682;
+yy3038:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy1682;
+ if (yych <= 0xBF) goto yy3037;
+ goto yy1682;
+yy3039:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy3037;
+ goto yy1682;
+yy3040:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0x8F) goto yy3037;
+ goto yy1682;
+yy3041:
+ yyaccept = 30;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '/') {
- if (yych <= 0x1A) {
- if (yych <= '\n') {
- if (yych <= 0x00) goto yy1017;
- if (yych <= 0x08) goto yy4;
- goto yy1017;
- } else {
- if (yych == '\r') goto yy1017;
- goto yy4;
- }
+ if (yych <= ':') {
+ if (yych <= '-') {
+ if (yych <= ',') goto yy2107;
+ goto yy2270;
} else {
- if (yych <= '#') {
- if (yych <= 0x1B) goto yy1017;
- if (yych <= 0x1F) goto yy4;
- goto yy1017;
- } else {
- if (yych <= '$') goto yy4;
- if (yych <= ',') goto yy1017;
- if (yych <= '.') goto yy174;
- goto yy4;
- }
+ if (yych <= '/') goto yy2107;
+ if (yych <= '9') goto yy2938;
+ goto yy3063;
}
} else {
- if (yych <= '_') {
- if (yych <= '?') {
- if (yych <= '9') goto yy174;
- if (yych <= ':') goto yy4;
- goto yy1017;
- } else {
- if (yych <= '@') goto yy4;
- if (yych <= 'Z') goto yy174;
- if (yych <= '^') goto yy1017;
- goto yy4;
- }
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy2107;
+ goto yy2938;
} else {
- if (yych <= '~') {
- if (yych <= '`') goto yy1017;
- if (yych <= 'z') goto yy174;
- goto yy1017;
- } else {
- if (yych <= 0x7F) goto yy4;
- if (yych <= 0xC1) goto yy1017;
- if (yych <= 0xF4) goto yy4;
- goto yy1017;
- }
+ if (yych <= '`') goto yy2107;
+ if (yych <= 'f') goto yy2938;
+ goto yy2107;
}
}
-yy1028:
- yyaccept = 34;
+yy3042:
+ yyaccept = 44;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '/') {
- if (yych <= 0x1F) {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy1017;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy1017;
- goto yy4;
- } else {
- if (yych <= '\r') goto yy1017;
- if (yych == 0x1B) goto yy1017;
- goto yy4;
- }
+ if (yych <= '9') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1697;
+ if (yych <= '*') goto yy3021;
+ goto yy1697;
} else {
- if (yych <= '*') {
- if (yych <= '#') goto yy1017;
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy80;
- goto yy1017;
- } else {
- if (yych <= '+') goto yy80;
- if (yych <= ',') goto yy1017;
- if (yych <= '.') goto yy46;
- goto yy4;
- }
+ if (yych <= ',') goto yy3021;
+ if (yych <= '.') goto yy1697;
+ if (yych <= '/') goto yy3021;
+ goto yy2157;
}
} else {
- if (yych <= '_') {
- if (yych <= '@') {
- if (yych <= '9') goto yy196;
- if (yych <= ':') goto yy148;
- if (yych <= '?') goto yy1017;
- goto yy96;
- } else {
- if (yych <= 'F') goto yy196;
- if (yych <= 'Z') goto yy115;
- if (yych <= '^') goto yy1017;
- goto yy46;
- }
+ if (yych <= '^') {
+ if (yych <= '?') goto yy3021;
+ if (yych <= '@') goto yy1699;
+ if (yych <= 'Z') goto yy1745;
+ goto yy3021;
} else {
- if (yych <= '~') {
- if (yych <= '`') goto yy1017;
- if (yych <= 'f') goto yy196;
- if (yych <= 'z') goto yy115;
- goto yy1017;
- } else {
- if (yych <= 0x7F) goto yy4;
- if (yych <= 0xC1) goto yy1017;
- if (yych <= 0xF4) goto yy4;
- goto yy1017;
- }
+ if (yych == '`') goto yy3021;
+ if (yych <= 'z') goto yy1745;
+ goto yy3021;
}
}
-yy1029:
- yyaccept = 34;
+yy3043:
+ yyaccept = 3;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '.') {
- if (yych <= 0x1F) {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy1017;
- if (yych <= 0x08) goto yy4;
- if (yych <= '\n') goto yy1017;
- goto yy4;
- } else {
- if (yych <= '\r') goto yy1017;
- if (yych == 0x1B) goto yy1017;
- goto yy4;
- }
+ if (yybm_init[1024+yych] & 1) {
+ goto yy1725;
+ }
+ switch (yych) {
+ case '%': goto yy1727;
+ case '+': goto yy1697;
+ case '-': goto yy1729;
+ case '.': goto yy2019;
+ case '/': goto yy1731;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy3043;
+ case ':': goto yy1879;
+ case '@': goto yy1737;
+ case 'A':
+ case 'C':
+ case 'D':
+ case 'F':
+ case 'a':
+ case 'c':
+ case 'd':
+ case 'f': goto yy1883;
+ case 'B':
+ case 'b': goto yy2692;
+ case 'E':
+ case 'e': goto yy2693;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy1740;
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'L':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'l':
+ case 'n':
+ case 'o':
+ case 'q':
+ case 'r':
+ case 't':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy1742;
+ case 'S':
+ case 's': goto yy1744;
+ case '_': goto yy1745;
+ case 'm': goto yy1747;
+ case 'p':
+ case 'u': goto yy1748;
+ default: goto yy1635;
+ }
+yy3044:
+ yyaccept = 44;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= '*') {
+ if (yych == '%') goto yy1884;
+ goto yy3021;
} else {
- if (yych <= '*') {
- if (yych <= '#') goto yy1017;
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy80;
- goto yy1017;
+ if (yych <= '+') goto yy1889;
+ if (yych <= ',') goto yy3021;
+ if (yych <= '-') goto yy2016;
+ goto yy1884;
+ }
+ } else {
+ if (yych <= '^') {
+ if (yych <= '?') goto yy3021;
+ if (yych <= 'Z') goto yy1884;
+ goto yy3021;
+ } else {
+ if (yych == '`') goto yy3021;
+ if (yych <= 'z') goto yy1884;
+ goto yy3021;
+ }
+ }
+yy3045:
+ yyaccept = 44;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'B') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1743;
+ if (yych <= '*') goto yy3021;
+ goto yy1743;
+ } else {
+ if (yych <= ':') {
+ if (yych <= ',') goto yy3021;
+ goto yy1743;
} else {
- if (yych <= '+') goto yy194;
- if (yych <= ',') goto yy1017;
- if (yych <= '-') goto yy251;
- goto yy46;
+ if (yych <= '?') goto yy3021;
+ if (yych <= 'A') goto yy1743;
+ goto yy1744;
}
}
} else {
- if (yych <= '^') {
- if (yych <= '?') {
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy196;
- if (yych <= ':') goto yy148;
- goto yy1017;
+ if (yych <= 'a') {
+ if (yych <= '^') {
+ if (yych <= 'Z') goto yy1743;
+ goto yy3021;
} else {
- if (yych <= '@') goto yy96;
- if (yych <= 'F') goto yy196;
- if (yych <= 'Z') goto yy115;
- goto yy1017;
+ if (yych == '`') goto yy3021;
+ goto yy1743;
}
} else {
- if (yych <= 'z') {
- if (yych <= '_') goto yy46;
- if (yych <= '`') goto yy1017;
- if (yych <= 'f') goto yy196;
- goto yy115;
+ if (yych <= 'h') {
+ if (yych <= 'b') goto yy1744;
+ goto yy1743;
} else {
- if (yych <= 0x7F) {
- if (yych <= '~') goto yy1017;
- goto yy4;
- } else {
- if (yych <= 0xC1) goto yy1017;
- if (yych <= 0xF4) goto yy4;
- goto yy1017;
- }
+ if (yych <= 'i') goto yy1880;
+ if (yych <= 'z') goto yy1743;
+ goto yy3021;
}
}
}
-yy1030:
- yyaccept = 34;
+yy3046:
+ yyaccept = 44;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[768+yych] & 64) {
- goto yy115;
- }
- if (yych <= '+') {
- if (yych <= 0x1A) {
- if (yych <= '\n') {
- if (yych <= 0x00) goto yy1017;
- if (yych <= 0x08) goto yy4;
- goto yy1017;
+ if (yych <= 'S') {
+ if (yych <= ',') {
+ if (yych <= '%') {
+ if (yych <= '$') goto yy3021;
+ goto yy1743;
} else {
- if (yych == '\r') goto yy1017;
- goto yy4;
+ if (yych == '+') goto yy1743;
+ goto yy3021;
}
} else {
- if (yych <= '#') {
- if (yych <= 0x1B) goto yy1017;
- if (yych <= 0x1F) goto yy4;
- goto yy1017;
+ if (yych <= 'A') {
+ if (yych <= ':') goto yy1743;
+ if (yych <= '?') goto yy3021;
+ goto yy1743;
} else {
- if (yych <= '$') goto yy4;
- if (yych <= '%') goto yy80;
- if (yych <= '*') goto yy1017;
- goto yy80;
+ if (yych <= 'B') goto yy1744;
+ if (yych <= 'R') goto yy1743;
+ goto yy1744;
}
}
} else {
- if (yych <= '@') {
- if (yych <= '/') {
- if (yych <= ',') goto yy1017;
- if (yych <= '.') goto yy46;
- goto yy4;
+ if (yych <= 'b') {
+ if (yych <= '_') {
+ if (yych <= 'Z') goto yy1743;
+ if (yych <= '^') goto yy3021;
+ goto yy1743;
} else {
- if (yych <= ':') goto yy148;
- if (yych <= '?') goto yy1017;
- goto yy96;
+ if (yych <= '`') goto yy3021;
+ if (yych <= 'a') goto yy1743;
+ goto yy1744;
}
} else {
- if (yych <= '~') {
- if (yych == '_') goto yy46;
- goto yy1017;
+ if (yych <= 'r') {
+ if (yych == 'i') goto yy1882;
+ goto yy1743;
} else {
- if (yych <= 0x7F) goto yy4;
- if (yych <= 0xC1) goto yy1017;
- if (yych <= 0xF4) goto yy4;
- goto yy1017;
+ if (yych <= 's') goto yy1744;
+ if (yych <= 'z') goto yy1743;
+ goto yy3021;
}
}
}
-yy1031:
- yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy1018;
- goto yy1;
-yy1032:
- yych = *++YYCURSOR;
- if (yych <= 0x9F) goto yy1;
- if (yych <= 0xBF) goto yy1031;
- goto yy1;
-yy1033:
- yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy1031;
- goto yy1;
-yy1034:
- yych = *++YYCURSOR;
- if (yych <= 0x8F) goto yy1;
- if (yych <= 0xBF) goto yy1033;
- goto yy1;
-yy1035:
- yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy1033;
- goto yy1;
-yy1036:
- yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0x8F) goto yy1033;
- goto yy1;
-yy1037:
- yyaccept = 21;
+yy3047:
+ yyaccept = 44;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= ':') {
- if (yych <= '-') {
- if (yych <= ',') goto yy354;
- goto yy466;
+ if (yych <= 'R') {
+ if (yych <= '+') {
+ if (yych == '%') goto yy1743;
+ if (yych <= '*') goto yy3021;
+ goto yy1743;
} else {
- if (yych <= '/') goto yy354;
- if (yych <= '9') goto yy955;
- goto yy1046;
+ if (yych <= ',') goto yy3021;
+ if (yych <= ':') goto yy1743;
+ if (yych <= '?') goto yy3021;
+ goto yy1743;
}
} else {
- if (yych <= 'F') {
- if (yych <= '@') goto yy354;
- goto yy955;
+ if (yych <= '_') {
+ if (yych <= 'S') goto yy1744;
+ if (yych <= 'Z') goto yy1743;
+ if (yych <= '^') goto yy3021;
+ goto yy1743;
} else {
- if (yych <= '`') goto yy354;
- if (yych <= 'f') goto yy955;
- goto yy354;
+ if (yych <= 'r') {
+ if (yych <= '`') goto yy3021;
+ goto yy1743;
+ } else {
+ if (yych <= 's') goto yy1744;
+ if (yych <= 'z') goto yy1743;
+ goto yy3021;
+ }
}
}
-yy1038:
+yy3048:
yych = *++YYCURSOR;
if (yych <= 'f') {
if (yych <= ':') {
if (yych <= '.') {
if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
yyt1 = YYCURSOR;
- goto yy297;
+ goto yy2020;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '9') goto yy982;
- goto yy959;
+ if (yych <= '9') goto yy2972;
+ yyt2 = YYCURSOR;
+ goto yy2942;
}
} else {
if (yych <= 'F') {
if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy982;
+ goto yy2972;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy982;
+ goto yy2972;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy1039:
+yy3049:
yych = *++YYCURSOR;
if (yych <= 'f') {
if (yych <= ':') {
if (yych <= '.') {
if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
yyt1 = YYCURSOR;
- goto yy297;
+ goto yy2020;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '9') goto yy1047;
- goto yy959;
+ if (yych <= '9') goto yy3064;
+ yyt2 = YYCURSOR;
+ goto yy2942;
}
} else {
if (yych <= 'F') {
if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy982;
+ goto yy2972;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy982;
+ goto yy2972;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy1040:
+yy3050:
yych = *++YYCURSOR;
if (yych <= '`') {
if (yych <= '9') {
if (yych <= '.') {
if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
yyt1 = YYCURSOR;
- goto yy297;
+ goto yy2020;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '5') goto yy1047;
- goto yy982;
+ if (yych <= '5') goto yy3064;
+ goto yy2972;
}
} else {
if (yych <= '@') {
- if (yych <= ':') goto yy959;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy2942;
+ }
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 'F') goto yy982;
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'F') goto yy2972;
+ if (yych <= 'Z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
}
} else {
if (yych <= 0xDF) {
if (yych <= 'z') {
- if (yych <= 'f') goto yy982;
- goto yy1;
+ if (yych <= 'f') goto yy2972;
+ goto yy1682;
} else {
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xE0) {
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy1041:
- yych = *++YYCURSOR;
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy1048;
- goto yy1;
-yy1042:
- yych = *++YYCURSOR;
- if (yych == '6') goto yy1049;
- goto yy1;
-yy1043:
+yy3051:
yych = *++YYCURSOR;
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy1050;
- goto yy1;
-yy1044:
- yych = *++YYCURSOR;
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy1051;
- goto yy1;
-yy1045:
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '/') {
- if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
+ if (yybm_init[0+yych] & 128) {
+ goto yy3051;
+ }
+ if (yych <= 0xE0) {
+ if (yych <= '\n') {
+ if (yych <= 0x00) goto yy1682;
+ goto yy3065;
} else {
- if (yych <= ',') goto yy4;
- if (yych <= '-') goto yy1052;
- if (yych <= '.') goto yy46;
- goto yy4;
+ if (yych <= 0xC1) goto yy1682;
+ if (yych >= 0xE0) goto yy3053;
}
} else {
- if (yych <= 'Z') {
- if (yych <= '9') goto yy46;
- if (yych <= '?') goto yy4;
- if (yych <= '@') goto yy96;
- goto yy46;
- } else {
- if (yych <= '_') {
- if (yych <= '^') goto yy4;
- goto yy46;
- } else {
- if (yych <= '`') goto yy4;
- if (yych <= 'z') goto yy46;
- goto yy4;
- }
- }
- }
-yy1046:
+ if (yych <= 0xF0) {
+ if (yych <= 0xEF) goto yy3054;
+ goto yy3055;
+ } else {
+ if (yych <= 0xF3) goto yy3056;
+ if (yych <= 0xF4) goto yy3057;
+ goto yy1682;
+ }
+ }
+yy3052:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy3051;
+ goto yy1682;
+yy3053:
+ yych = *++YYCURSOR;
+ if (yych <= 0x9F) goto yy1682;
+ if (yych <= 0xBF) goto yy3052;
+ goto yy1682;
+yy3054:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy3052;
+ goto yy1682;
+yy3055:
+ yych = *++YYCURSOR;
+ if (yych <= 0x8F) goto yy1682;
+ if (yych <= 0xBF) goto yy3054;
+ goto yy1682;
+yy3056:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0xBF) goto yy3054;
+ goto yy1682;
+yy3057:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy1682;
+ if (yych <= 0x8F) goto yy3054;
+ goto yy1682;
+yy3058:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy3066;
+ goto yy1682;
+yy3059:
+ yych = *++YYCURSOR;
+ if (yych == '6') goto yy3067;
+ goto yy1682;
+yy3060:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy3068;
+ goto yy1682;
+yy3061:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy3069;
+ goto yy1682;
+yy3062:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == '-') goto yy3070;
+ goto yy1746;
+yy3063:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy1053;
- if (yych <= ':') goto yy957;
- goto yy1;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy3071;
+ if (yych <= ':') goto yy2940;
+ goto yy1682;
} else {
- if (yych <= 'F') goto yy1053;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy1053;
- goto yy1;
+ if (yych <= 'F') goto yy3071;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy3071;
+ goto yy1682;
}
-yy1047:
+yy3064:
yych = *++YYCURSOR;
if (yych <= 'f') {
if (yych <= ':') {
if (yych <= '.') {
if (yych <= '-') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
yyt1 = YYCURSOR;
- goto yy297;
+ goto yy2020;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '9') goto yy995;
- goto yy959;
+ if (yych <= '9') goto yy2991;
+ yyt2 = YYCURSOR;
+ goto yy2942;
}
} else {
if (yych <= 'F') {
if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy995;
+ goto yy2991;
} else {
- if (yych <= 'Z') goto yy1;
+ if (yych <= 'Z') goto yy1682;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy995;
+ goto yy2991;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= 'z') goto yy1;
+ if (yych <= 'z') goto yy1682;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy1048:
+yy3065:
+ ++YYCURSOR;
+ hunk_heading = yyt1;
+#line 358 "../../lnav/src/data_scanner_re.re"
+ {
+ CAPTURE(DT_DIFF_HUNK_HEADING);
+ cap_inner.c_begin = hunk_heading.val - this->ds_input.udata();
+ cap_inner.c_end -= 1;
+ this->ds_bol = true;
+ return tokenize_result{token_out, cap_all, cap_inner, this->ds_input.data()};
+ }
+#line 83786 "../../lnav/src/data_scanner_re.cc"
+yy3066:
yych = *++YYCURSOR;
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy1054;
- goto yy1;
-yy1049:
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy3072;
+ goto yy1682;
+yy3067:
yych = *++YYCURSOR;
- if (yych == ')') goto yy99;
- goto yy1;
-yy1050:
+ if (yych == ')') goto yy1721;
+ goto yy1682;
+yy3068:
yych = *++YYCURSOR;
if (yych <= 0xDF) {
if (yych <= '9') {
if (yych <= '/') {
yyt1 = YYCURSOR;
- goto yy1016;
+ goto yy3020;
}
- goto yy1;
+ goto yy1682;
} else {
if (yych <= 0x7F) {
yyt1 = YYCURSOR;
- goto yy1016;
+ goto yy3020;
}
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
yyt1 = YYCURSOR;
- goto yy1055;
+ goto yy3035;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xE0) {
yyt1 = YYCURSOR;
- goto yy1056;
+ goto yy3036;
}
if (yych <= 0xEF) {
yyt1 = YYCURSOR;
- goto yy1057;
+ goto yy3037;
}
yyt1 = YYCURSOR;
- goto yy1058;
+ goto yy3038;
} else {
if (yych <= 0xF3) {
yyt1 = YYCURSOR;
- goto yy1059;
+ goto yy3039;
}
if (yych <= 0xF4) {
yyt1 = YYCURSOR;
- goto yy1060;
+ goto yy3040;
}
- goto yy1;
+ goto yy1682;
}
}
-yy1051:
+yy3069:
yych = *++YYCURSOR;
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy1061;
- goto yy1;
-yy1052:
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '?') {
- if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy3073;
+ goto yy1682;
+yy3070:
+ yych = *++YYCURSOR;
+ if (yych <= 'Z') {
+ if (yych <= '9') {
+ if (yych <= '/') goto yy1698;
+ goto yy3074;
} else {
- if (yych <= '.') {
- if (yych <= ',') goto yy4;
- goto yy46;
- } else {
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy1062;
- goto yy4;
- }
+ if (yych <= '@') goto yy1698;
+ if (yych <= 'F') goto yy3074;
+ goto yy1745;
}
} else {
- if (yych <= '^') {
- if (yych <= '@') goto yy96;
- if (yych <= 'F') goto yy1062;
- if (yych <= 'Z') goto yy46;
- goto yy4;
+ if (yych <= '`') {
+ if (yych == '_') goto yy1745;
+ goto yy1698;
} else {
- if (yych <= '`') {
- if (yych <= '_') goto yy46;
- goto yy4;
- } else {
- if (yych <= 'f') goto yy1062;
- if (yych <= 'z') goto yy46;
- goto yy4;
- }
+ if (yych <= 'f') goto yy3074;
+ if (yych <= 'z') goto yy1745;
+ goto yy1698;
}
}
-yy1053:
+yy3071:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy1063;
- if (yych <= ':') goto yy980;
- goto yy1;
- } else {
- if (yych <= 'F') goto yy1063;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy1063;
- goto yy1;
- }
-yy1054:
- yych = *++YYCURSOR;
- if (yych <= '/') goto yy943;
- if (yych <= '9') goto yy1064;
- goto yy943;
-yy1055:
- yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy1016;
- goto yy1;
-yy1056:
- yych = *++YYCURSOR;
- if (yych <= 0x9F) goto yy1;
- if (yych <= 0xBF) goto yy1055;
- goto yy1;
-yy1057:
- yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy1055;
- goto yy1;
-yy1058:
- yych = *++YYCURSOR;
- if (yych <= 0x8F) goto yy1;
- if (yych <= 0xBF) goto yy1057;
- goto yy1;
-yy1059:
- yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0xBF) goto yy1057;
- goto yy1;
-yy1060:
- yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy1;
- if (yych <= 0x8F) goto yy1057;
- goto yy1;
-yy1061:
- yych = *++YYCURSOR;
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy1065;
- goto yy1;
-yy1062:
- yyaccept = 0;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy3075;
+ if (yych <= ':') goto yy2970;
+ goto yy1682;
+ } else {
+ if (yych <= 'F') goto yy3075;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy3075;
+ goto yy1682;
+ }
+yy3072:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy2927;
+ if (yych <= '9') goto yy3076;
+ goto yy2927;
+yy3073:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy3077;
+ goto yy1682;
+yy3074:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '?') {
- if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
- } else {
- if (yych <= '.') {
- if (yych <= ',') goto yy4;
- goto yy46;
- } else {
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy1066;
- goto yy4;
- }
- }
+ if (yych <= '@') {
+ if (yych <= '/') goto yy1746;
+ if (yych <= '9') goto yy3078;
+ goto yy1746;
} else {
- if (yych <= '^') {
- if (yych <= '@') goto yy96;
- if (yych <= 'F') goto yy1066;
- if (yych <= 'Z') goto yy46;
- goto yy4;
- } else {
- if (yych <= '`') {
- if (yych <= '_') goto yy46;
- goto yy4;
- } else {
- if (yych <= 'f') goto yy1066;
- if (yych <= 'z') goto yy46;
- goto yy4;
- }
- }
+ if (yych <= 'F') goto yy3078;
+ if (yych <= '`') goto yy1746;
+ if (yych <= 'f') goto yy3078;
+ goto yy1746;
}
-yy1063:
- yyaccept = 21;
+yy3075:
+ yyaccept = 30;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ':') {
if (yych <= '-') {
- if (yych <= ',') goto yy354;
- goto yy466;
+ if (yych <= ',') goto yy2107;
+ goto yy2270;
} else {
- if (yych <= '/') goto yy354;
- if (yych <= '9') goto yy993;
- goto yy1067;
+ if (yych <= '/') goto yy2107;
+ if (yych <= '9') goto yy2989;
+ goto yy3079;
}
} else {
if (yych <= 'F') {
- if (yych <= '@') goto yy354;
- goto yy993;
+ if (yych <= '@') goto yy2107;
+ goto yy2989;
} else {
- if (yych <= '`') goto yy354;
- if (yych <= 'f') goto yy993;
- goto yy354;
+ if (yych <= '`') goto yy2107;
+ if (yych <= 'f') goto yy2989;
+ goto yy2107;
}
}
-yy1064:
+yy3076:
yych = *++YYCURSOR;
- if (yych <= '/') goto yy943;
- if (yych <= '9') goto yy1068;
- goto yy943;
-yy1065:
+ if (yych <= '/') goto yy2927;
+ if (yych <= '9') goto yy3080;
+ goto yy2927;
+yy3077:
yych = *++YYCURSOR;
- if (yych <= '/') goto yy971;
- if (yych <= '9') goto yy1069;
- goto yy971;
-yy1066:
- yyaccept = 0;
+ if (yych <= '/') goto yy2961;
+ if (yych <= '9') goto yy3081;
+ goto yy2961;
+yy3078:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '?') {
- if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
- } else {
- if (yych <= '.') {
- if (yych <= ',') goto yy4;
- goto yy46;
- } else {
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy1070;
- goto yy4;
- }
- }
- } else {
- if (yych <= '^') {
- if (yych <= '@') goto yy96;
- if (yych <= 'F') goto yy1070;
- if (yych <= 'Z') goto yy46;
- goto yy4;
- } else {
- if (yych <= '`') {
- if (yych <= '_') goto yy46;
- goto yy4;
- } else {
- if (yych <= 'f') goto yy1070;
- if (yych <= 'z') goto yy46;
- goto yy4;
- }
- }
- }
-yy1067:
- yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy1;
- if (yych <= '9') goto yy1071;
- if (yych <= ':') goto yy830;
- goto yy1;
+ if (yych <= '/') goto yy1746;
+ if (yych <= '9') goto yy3082;
+ goto yy1746;
} else {
- if (yych <= 'F') goto yy1071;
- if (yych <= '`') goto yy1;
- if (yych <= 'f') goto yy1071;
- goto yy1;
+ if (yych <= 'F') goto yy3082;
+ if (yych <= '`') goto yy1746;
+ if (yych <= 'f') goto yy3082;
+ goto yy1746;
}
-yy1068:
- yych = *++YYCURSOR;
- if (yych <= '/') goto yy943;
- if (yych <= '9') goto yy1072;
- goto yy943;
-yy1069:
+yy3079:
yych = *++YYCURSOR;
- if (yych <= '/') goto yy971;
- if (yych <= '9') goto yy1073;
- goto yy971;
-yy1070:
- yyaccept = 0;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy1682;
+ if (yych <= '9') goto yy3083;
+ if (yych <= ':') goto yy2771;
+ goto yy1682;
+ } else {
+ if (yych <= 'F') goto yy3083;
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy3083;
+ goto yy1682;
+ }
+yy3080:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy2927;
+ if (yych <= '9') goto yy3084;
+ goto yy2927;
+yy3081:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy2961;
+ if (yych <= '9') goto yy3085;
+ goto yy2961;
+yy3082:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '?') {
- if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
- } else {
- if (yych <= '.') {
- if (yych <= ',') goto yy4;
- goto yy46;
- } else {
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy1074;
- goto yy4;
- }
- }
+ if (yych <= '@') {
+ if (yych <= '/') goto yy1746;
+ if (yych <= '9') goto yy3086;
+ goto yy1746;
} else {
- if (yych <= '^') {
- if (yych <= '@') goto yy96;
- if (yych <= 'F') goto yy1074;
- if (yych <= 'Z') goto yy46;
- goto yy4;
- } else {
- if (yych <= '`') {
- if (yych <= '_') goto yy46;
- goto yy4;
- } else {
- if (yych <= 'f') goto yy1074;
- if (yych <= 'z') goto yy46;
- goto yy4;
- }
- }
+ if (yych <= 'F') goto yy3086;
+ if (yych <= '`') goto yy1746;
+ if (yych <= 'f') goto yy3086;
+ goto yy1746;
}
-yy1071:
+yy3083:
yych = *++YYCURSOR;
if (yych <= 'z') {
if (yych <= '@') {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
+ }
+ if (yych <= '9') goto yy3087;
+ if (yych <= ':') {
+ yyt2 = YYCURSOR;
+ goto yy1897;
}
- if (yych <= '9') goto yy1075;
- if (yych <= ':') goto yy1;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
if (yych <= 'Z') {
- if (yych <= 'F') goto yy1075;
- goto yy1;
+ if (yych <= 'F') goto yy3087;
+ goto yy1682;
} else {
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 'f') goto yy1075;
- goto yy1;
+ if (yych <= 'f') goto yy3087;
+ goto yy1682;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= 0xC1) goto yy1;
+ if (yych <= 0xC1) goto yy1682;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy1;
+ goto yy1682;
}
}
}
-yy1072:
+yy3084:
++YYCURSOR;
- goto yy943;
-yy1073:
+ goto yy2927;
+yy3085:
yych = *++YYCURSOR;
- if (yych <= '/') goto yy971;
- if (yych <= '9') goto yy1076;
- goto yy971;
-yy1074:
- yyaccept = 0;
+ if (yych <= '/') goto yy2961;
+ if (yych <= '9') goto yy3088;
+ goto yy2961;
+yy3086:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '/') {
- if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
- } else {
- if (yych <= ',') goto yy4;
- if (yych <= '-') goto yy1077;
- if (yych <= '.') goto yy46;
- goto yy4;
- }
- } else {
- if (yych <= 'Z') {
- if (yych <= '9') goto yy46;
- if (yych <= '?') goto yy4;
- if (yych <= '@') goto yy96;
- goto yy46;
- } else {
- if (yych <= '_') {
- if (yych <= '^') goto yy4;
- goto yy46;
- } else {
- if (yych <= '`') goto yy4;
- if (yych <= 'z') goto yy46;
- goto yy4;
- }
- }
- }
-yy1075:
- yyaccept = 21;
+ if (yych == '-') goto yy3089;
+ goto yy1746;
+yy3087:
+ yyaccept = 30;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 'f') {
if (yych <= ':') {
if (yych <= '-') {
if (yych <= ',') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
yyt2 = YYCURSOR;
- goto yy1078;
+ goto yy3090;
} else {
if (yych <= '/') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- if (yych <= '9') goto yy1007;
- goto yy466;
+ if (yych <= '9') goto yy3008;
+ yyt2 = YYCURSOR;
+ goto yy3091;
}
} else {
if (yych <= 'F') {
if (yych <= '@') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy1007;
+ goto yy3008;
} else {
- if (yych <= 'Z') goto yy354;
+ if (yych <= 'Z') goto yy2107;
if (yych <= '`') {
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
}
- goto yy1007;
+ goto yy3008;
}
}
} else {
if (yych <= 0xE0) {
if (yych <= 0x7F) {
- if (yych <= 'z') goto yy354;
+ if (yych <= 'z') goto yy2107;
yyt2 = YYCURSOR;
- goto yy198;
+ goto yy1892;
} else {
- if (yych <= 0xC1) goto yy354;
+ if (yych <= 0xC1) goto yy2107;
if (yych <= 0xDF) {
yyt2 = YYCURSOR;
- goto yy205;
+ goto yy1900;
}
yyt2 = YYCURSOR;
- goto yy206;
+ goto yy1901;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xEF) {
yyt2 = YYCURSOR;
- goto yy207;
+ goto yy1902;
}
yyt2 = YYCURSOR;
- goto yy208;
+ goto yy1903;
} else {
if (yych <= 0xF3) {
yyt2 = YYCURSOR;
- goto yy209;
+ goto yy1904;
}
if (yych <= 0xF4) {
yyt2 = YYCURSOR;
- goto yy210;
+ goto yy1905;
}
- goto yy354;
+ goto yy2107;
}
}
}
-yy1076:
+yy3088:
++YYCURSOR;
- goto yy971;
-yy1077:
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '?') {
- if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
+ goto yy2961;
+yy3089:
+ yych = *++YYCURSOR;
+ if (yych <= 'Z') {
+ if (yych <= '9') {
+ if (yych <= '/') goto yy1698;
+ goto yy3092;
} else {
- if (yych <= '.') {
- if (yych <= ',') goto yy4;
- goto yy46;
- } else {
- if (yych <= '/') goto yy4;
- if (yych <= '9') goto yy1079;
- goto yy4;
- }
+ if (yych <= '@') goto yy1698;
+ if (yych <= 'F') goto yy3092;
+ goto yy1745;
}
} else {
- if (yych <= '^') {
- if (yych <= '@') goto yy96;
- if (yych <= 'F') goto yy1079;
- if (yych <= 'Z') goto yy46;
- goto yy4;
+ if (yych <= '`') {
+ if (yych == '_') goto yy1745;
+ goto yy1698;
} else {
- if (yych <= '`') {
- if (yych <= '_') goto yy46;
- goto yy4;
- } else {
- if (yych <= 'f') goto yy1079;
- if (yych <= 'z') goto yy46;
- goto yy4;
- }
+ if (yych <= 'f') goto yy3092;
+ if (yych <= 'z') goto yy1745;
+ goto yy1698;
}
}
-yy1078:
- yyaccept = 17;
+yy3090:
+ yyaccept = 24;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '@') {
- if (yych <= '/') goto yy199;
- if (yych <= '9') goto yy542;
- goto yy199;
+ if (yych <= '/') goto yy1893;
+ if (yych <= '9') goto yy2399;
+ goto yy1893;
} else {
- if (yych <= 'F') goto yy542;
- if (yych <= '`') goto yy199;
- if (yych <= 'f') goto yy542;
- goto yy199;
+ if (yych <= 'F') goto yy2399;
+ if (yych <= '`') goto yy1893;
+ if (yych <= 'f') goto yy2399;
+ goto yy1893;
}
-yy1079:
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '?') {
- if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
- } else {
- if (yych <= '.') {
- if (yych <= ',') goto yy4;
- goto yy46;
- } else {
- if (yych <= '/') goto yy4;
- if (yych >= ':') goto yy4;
- }
- }
+yy3091:
+ yych = *++YYCURSOR;
+ if (yych <= '9') {
+ if (yych == ' ') goto yy1892;
+ if (yych <= '/') goto yy1682;
+ goto yy2399;
} else {
- if (yych <= '^') {
- if (yych <= '@') goto yy96;
- if (yych <= 'F') goto yy1080;
- if (yych <= 'Z') goto yy46;
- goto yy4;
+ if (yych <= 'F') {
+ if (yych <= '@') goto yy1682;
+ goto yy2399;
} else {
- if (yych <= '`') {
- if (yych <= '_') goto yy46;
- goto yy4;
- } else {
- if (yych <= 'f') goto yy1080;
- if (yych <= 'z') goto yy46;
- goto yy4;
- }
+ if (yych <= '`') goto yy1682;
+ if (yych <= 'f') goto yy2399;
+ goto yy1682;
}
}
-yy1080:
- yyaccept = 0;
+yy3092:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '?') {
- if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
- } else {
- if (yych <= '.') {
- if (yych <= ',') goto yy4;
- goto yy46;
- } else {
- if (yych <= '/') goto yy4;
- if (yych >= ':') goto yy4;
- }
- }
+ if (yych <= '@') {
+ if (yych <= '/') goto yy1746;
+ if (yych >= ':') goto yy1746;
} else {
- if (yych <= '^') {
- if (yych <= '@') goto yy96;
- if (yych <= 'F') goto yy1081;
- if (yych <= 'Z') goto yy46;
- goto yy4;
- } else {
- if (yych <= '`') {
- if (yych <= '_') goto yy46;
- goto yy4;
- } else {
- if (yych <= 'f') goto yy1081;
- if (yych <= 'z') goto yy46;
- goto yy4;
- }
- }
+ if (yych <= 'F') goto yy3093;
+ if (yych <= '`') goto yy1746;
+ if (yych >= 'g') goto yy1746;
}
-yy1081:
- yyaccept = 0;
+yy3093:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '?') {
- if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
- } else {
- if (yych <= '.') {
- if (yych <= ',') goto yy4;
- goto yy46;
- } else {
- if (yych <= '/') goto yy4;
- if (yych >= ':') goto yy4;
- }
- }
+ if (yych <= '@') {
+ if (yych <= '/') goto yy1746;
+ if (yych >= ':') goto yy1746;
} else {
- if (yych <= '^') {
- if (yych <= '@') goto yy96;
- if (yych <= 'F') goto yy1082;
- if (yych <= 'Z') goto yy46;
- goto yy4;
- } else {
- if (yych <= '`') {
- if (yych <= '_') goto yy46;
- goto yy4;
- } else {
- if (yych <= 'f') goto yy1082;
- if (yych <= 'z') goto yy46;
- goto yy4;
- }
- }
+ if (yych <= 'F') goto yy3094;
+ if (yych <= '`') goto yy1746;
+ if (yych >= 'g') goto yy1746;
}
-yy1082:
- yyaccept = 0;
+yy3094:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '?') {
- if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
- } else {
- if (yych <= '.') {
- if (yych <= ',') goto yy4;
- goto yy46;
- } else {
- if (yych <= '/') goto yy4;
- if (yych >= ':') goto yy4;
- }
- }
+ if (yych <= '@') {
+ if (yych <= '/') goto yy1746;
+ if (yych >= ':') goto yy1746;
} else {
- if (yych <= '^') {
- if (yych <= '@') goto yy96;
- if (yych <= 'F') goto yy1083;
- if (yych <= 'Z') goto yy46;
- goto yy4;
- } else {
- if (yych <= '`') {
- if (yych <= '_') goto yy46;
- goto yy4;
- } else {
- if (yych <= 'f') goto yy1083;
- if (yych <= 'z') goto yy46;
- goto yy4;
- }
- }
+ if (yych <= 'F') goto yy3095;
+ if (yych <= '`') goto yy1746;
+ if (yych >= 'g') goto yy1746;
}
-yy1083:
- yyaccept = 0;
+yy3095:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '?') {
- if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
- } else {
- if (yych <= '.') {
- if (yych <= ',') goto yy4;
- goto yy46;
- } else {
- if (yych <= '/') goto yy4;
- if (yych >= ':') goto yy4;
- }
- }
+ if (yych <= '@') {
+ if (yych <= '/') goto yy1746;
+ if (yych >= ':') goto yy1746;
} else {
- if (yych <= '^') {
- if (yych <= '@') goto yy96;
- if (yych <= 'F') goto yy1084;
- if (yych <= 'Z') goto yy46;
- goto yy4;
- } else {
- if (yych <= '`') {
- if (yych <= '_') goto yy46;
- goto yy4;
- } else {
- if (yych <= 'f') goto yy1084;
- if (yych <= 'z') goto yy46;
- goto yy4;
- }
- }
+ if (yych <= 'F') goto yy3096;
+ if (yych <= '`') goto yy1746;
+ if (yych >= 'g') goto yy1746;
}
-yy1084:
- yyaccept = 0;
+yy3096:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '?') {
- if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
- } else {
- if (yych <= '.') {
- if (yych <= ',') goto yy4;
- goto yy46;
- } else {
- if (yych <= '/') goto yy4;
- if (yych >= ':') goto yy4;
- }
- }
+ if (yych <= '@') {
+ if (yych <= '/') goto yy1746;
+ if (yych >= ':') goto yy1746;
} else {
- if (yych <= '^') {
- if (yych <= '@') goto yy96;
- if (yych <= 'F') goto yy1085;
- if (yych <= 'Z') goto yy46;
- goto yy4;
- } else {
- if (yych <= '`') {
- if (yych <= '_') goto yy46;
- goto yy4;
- } else {
- if (yych <= 'f') goto yy1085;
- if (yych <= 'z') goto yy46;
- goto yy4;
- }
- }
+ if (yych <= 'F') goto yy3097;
+ if (yych <= '`') goto yy1746;
+ if (yych >= 'g') goto yy1746;
}
-yy1085:
- yyaccept = 0;
+yy3097:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '?') {
- if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
- } else {
- if (yych <= '.') {
- if (yych <= ',') goto yy4;
- goto yy46;
- } else {
- if (yych <= '/') goto yy4;
- if (yych >= ':') goto yy4;
- }
- }
+ if (yych <= '@') {
+ if (yych <= '/') goto yy1746;
+ if (yych >= ':') goto yy1746;
} else {
- if (yych <= '^') {
- if (yych <= '@') goto yy96;
- if (yych <= 'F') goto yy1086;
- if (yych <= 'Z') goto yy46;
- goto yy4;
- } else {
- if (yych <= '`') {
- if (yych <= '_') goto yy46;
- goto yy4;
- } else {
- if (yych <= 'f') goto yy1086;
- if (yych <= 'z') goto yy46;
- goto yy4;
- }
- }
+ if (yych <= 'F') goto yy3098;
+ if (yych <= '`') goto yy1746;
+ if (yych >= 'g') goto yy1746;
}
-yy1086:
- yyaccept = 0;
+yy3098:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '?') {
- if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
- } else {
- if (yych <= '.') {
- if (yych <= ',') goto yy4;
- goto yy46;
- } else {
- if (yych <= '/') goto yy4;
- if (yych >= ':') goto yy4;
- }
- }
+ if (yych <= '@') {
+ if (yych <= '/') goto yy1746;
+ if (yych >= ':') goto yy1746;
} else {
- if (yych <= '^') {
- if (yych <= '@') goto yy96;
- if (yych <= 'F') goto yy1087;
- if (yych <= 'Z') goto yy46;
- goto yy4;
- } else {
- if (yych <= '`') {
- if (yych <= '_') goto yy46;
- goto yy4;
- } else {
- if (yych <= 'f') goto yy1087;
- if (yych <= 'z') goto yy46;
- goto yy4;
- }
- }
+ if (yych <= 'F') goto yy3099;
+ if (yych <= '`') goto yy1746;
+ if (yych >= 'g') goto yy1746;
}
-yy1087:
- yyaccept = 0;
+yy3099:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '?') {
- if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
- } else {
- if (yych <= '.') {
- if (yych <= ',') goto yy4;
- goto yy46;
- } else {
- if (yych <= '/') goto yy4;
- if (yych >= ':') goto yy4;
- }
- }
+ if (yych <= '@') {
+ if (yych <= '/') goto yy1746;
+ if (yych >= ':') goto yy1746;
} else {
- if (yych <= '^') {
- if (yych <= '@') goto yy96;
- if (yych <= 'F') goto yy1088;
- if (yych <= 'Z') goto yy46;
- goto yy4;
- } else {
- if (yych <= '`') {
- if (yych <= '_') goto yy46;
- goto yy4;
- } else {
- if (yych <= 'f') goto yy1088;
- if (yych <= 'z') goto yy46;
- goto yy4;
- }
- }
+ if (yych <= 'F') goto yy3100;
+ if (yych <= '`') goto yy1746;
+ if (yych >= 'g') goto yy1746;
}
-yy1088:
- yyaccept = 0;
+yy3100:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '?') {
- if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
- } else {
- if (yych <= '.') {
- if (yych <= ',') goto yy4;
- goto yy46;
- } else {
- if (yych <= '/') goto yy4;
- if (yych >= ':') goto yy4;
- }
- }
+ if (yych <= '@') {
+ if (yych <= '/') goto yy1746;
+ if (yych >= ':') goto yy1746;
} else {
- if (yych <= '^') {
- if (yych <= '@') goto yy96;
- if (yych <= 'F') goto yy1089;
- if (yych <= 'Z') goto yy46;
- goto yy4;
- } else {
- if (yych <= '`') {
- if (yych <= '_') goto yy46;
- goto yy4;
- } else {
- if (yych <= 'f') goto yy1089;
- if (yych <= 'z') goto yy46;
- goto yy4;
- }
- }
+ if (yych <= 'F') goto yy3101;
+ if (yych <= '`') goto yy1746;
+ if (yych >= 'g') goto yy1746;
}
-yy1089:
- yyaccept = 0;
+yy3101:
+ yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '?') {
- if (yych <= '+') {
- if (yych == '%') goto yy80;
- if (yych <= '*') goto yy4;
- goto yy80;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy1746;
+ if (yych >= ':') goto yy1746;
+ } else {
+ if (yych <= 'F') goto yy3102;
+ if (yych <= '`') goto yy1746;
+ if (yych >= 'g') goto yy1746;
+ }
+yy3102:
+ yyaccept = 13;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '@') {
+ if (yych <= '/') goto yy1746;
+ if (yych >= ':') goto yy1746;
+ } else {
+ if (yych <= 'F') goto yy3103;
+ if (yych <= '`') goto yy1746;
+ if (yych >= 'g') goto yy1746;
+ }
+yy3103:
+ yyaccept = 45;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= ':') {
+ if (yych <= '*') {
+ if (yych == '%') goto yy1746;
} else {
- if (yych <= '.') {
- if (yych <= ',') goto yy4;
- goto yy46;
- } else {
- if (yych <= '/') goto yy4;
- if (yych >= ':') goto yy4;
- }
+ if (yych != ',') goto yy1746;
}
} else {
if (yych <= '^') {
- if (yych <= '@') goto yy96;
- if (yych <= 'F') goto yy1090;
- if (yych <= 'Z') goto yy46;
- goto yy4;
+ if (yych <= '?') goto yy3104;
+ if (yych <= 'Z') goto yy1746;
} else {
- if (yych <= '`') {
- if (yych <= '_') goto yy46;
- goto yy4;
- } else {
- if (yych <= 'f') goto yy1090;
- if (yych <= 'z') goto yy46;
- goto yy4;
- }
+ if (yych == '`') goto yy3104;
+ if (yych <= 'z') goto yy1746;
}
}
-yy1090:
- yyaccept = 35;
+yy3104:
+#line 389 "../../lnav/src/data_scanner_re.re"
+ { RET(DT_UUID); }
+#line 84324 "../../lnav/src/data_scanner_re.cc"
+/* *********************************** */
+yyc_dbldocstring:
+ yych = *YYCURSOR;
+ if (yych <= 0x00) goto yy3106;
+ if (yych == '"') goto yy3109;
+ goto yy3107;
+yy3106:
+ ++YYCURSOR;
+#line 204 "../../lnav/src/data_scanner_re.re"
+ {
+ CAPTURE(DT_QUOTED_STRING);
+ cap_inner.c_end -= 3;
+ return tokenize_result{token_out, cap_all, cap_inner, this->ds_input.data()};
+ }
+#line 84339 "../../lnav/src/data_scanner_re.cc"
+yy3107:
+ ++YYCURSOR;
+yy3108:
+#line 210 "../../lnav/src/data_scanner_re.re"
+ {
+ goto yyc_dbldocstring;
+ }
+#line 84347 "../../lnav/src/data_scanner_re.cc"
+yy3109:
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych != '"') goto yy3108;
+ yych = *++YYCURSOR;
+ if (yych == '"') goto yy3106;
+ YYCURSOR = YYMARKER;
+ goto yy3108;
+/* *********************************** */
+yyc_sdocstring:
+ yych = *YYCURSOR;
+ if (yych <= 0x00) goto yy3111;
+ if (yych == '\'') goto yy3114;
+ goto yy3112;
+yy3111:
+ ++YYCURSOR;
+#line 227 "../../lnav/src/data_scanner_re.re"
+ {
+ CAPTURE(DT_QUOTED_STRING);
+ cap_inner.c_end -= 3;
+ return tokenize_result{token_out, cap_all, cap_inner, this->ds_input.data()};
+ }
+#line 84369 "../../lnav/src/data_scanner_re.cc"
+yy3112:
+ ++YYCURSOR;
+yy3113:
+#line 233 "../../lnav/src/data_scanner_re.re"
+ {
+ goto yyc_sdocstring;
+ }
+#line 84377 "../../lnav/src/data_scanner_re.cc"
+yy3114:
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych != '\'') goto yy3113;
+ yych = *++YYCURSOR;
+ if (yych == '\'') goto yy3111;
+ YYCURSOR = YYMARKER;
+ goto yy3113;
+/* *********************************** */
+yyc_units:
+ yych = *YYCURSOR;
+ switch (yych) {
+ case 'B':
+ case 'S':
+ case 'b':
+ case 's': goto yy3118;
+ case 'G':
+ case 'K':
+ case 'M':
+ case 'g':
+ case 'k': goto yy3120;
+ case 'm': goto yy3121;
+ case 'p':
+ case 'u': goto yy3122;
+ default: goto yy3116;
+ }
+yy3116:
+ ++YYCURSOR;
+yy3117:
+#line 173 "../../lnav/src/data_scanner_re.re"
+ { return nonstd::nullopt; }
+#line 84408 "../../lnav/src/data_scanner_re.cc"
+yy3118:
+ ++YYCURSOR;
+yy3119:
+#line 423 "../../lnav/src/data_scanner_re.re"
+ {
+ RET(DT_UNIT);
+ }
+#line 84416 "../../lnav/src/data_scanner_re.cc"
+yy3120:
+ yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[1024+yych] & 16) {
- goto yy46;
+ if (yych <= 'a') {
+ if (yych == 'B') goto yy3118;
+ goto yy3117;
+ } else {
+ if (yych <= 'b') goto yy3118;
+ if (yych == 'i') goto yy3123;
+ goto yy3117;
}
- if (yych <= '%') {
- if (yych <= '\r') {
- if (yych <= 0x08) {
- if (yych >= 0x01) goto yy4;
- } else {
- if (yych <= '\n') goto yy1091;
- if (yych <= '\f') goto yy4;
- }
+yy3121:
+ yyaccept = 1;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 'a') {
+ if (yych <= 'B') {
+ if (yych <= 'A') goto yy3119;
+ goto yy3118;
} else {
- if (yych <= 0x1F) {
- if (yych != 0x1B) goto yy4;
- } else {
- if (yych <= '#') goto yy1091;
- if (yych <= '$') goto yy4;
- goto yy80;
- }
+ if (yych == 'S') goto yy3118;
+ goto yy3119;
}
} else {
- if (yych <= '?') {
- if (yych <= '+') {
- if (yych >= '+') goto yy80;
- } else {
- if (yych <= ',') goto yy1091;
- if (yych <= ':') goto yy4;
- }
+ if (yych <= 'i') {
+ if (yych <= 'b') goto yy3118;
+ if (yych <= 'h') goto yy3119;
+ goto yy3125;
} else {
- if (yych <= 0x7F) {
- if (yych <= '@') goto yy96;
- if (yych >= 0x7F) goto yy4;
- } else {
- if (yych <= 0xC1) goto yy1091;
- if (yych <= 0xF4) goto yy4;
- }
+ if (yych == 's') goto yy3118;
+ goto yy3119;
}
}
-yy1091:
-#line 234 "../../lnav/src/data_scanner_re.re"
- { RET(DT_UUID); }
-#line 36093 "../../lnav/src/data_scanner_re.cc"
+yy3122:
+ yych = *++YYCURSOR;
+ if (yych == 'S') goto yy3118;
+ if (yych == 's') goto yy3118;
+ goto yy3117;
+yy3123:
+ yych = *++YYCURSOR;
+ if (yych == 'B') goto yy3118;
+ if (yych == 'b') goto yy3118;
+yy3124:
+ YYCURSOR = YYMARKER;
+ if (yyaccept == 0) {
+ goto yy3117;
+ } else {
+ goto yy3119;
+ }
+yy3125:
+ yych = *++YYCURSOR;
+ if (yych <= 'a') {
+ if (yych == 'B') goto yy3118;
+ goto yy3124;
+ } else {
+ if (yych <= 'b') goto yy3118;
+ if (yych == 'n') goto yy3118;
+ goto yy3124;
+ }
}
-#line 276 "../../lnav/src/data_scanner_re.re"
+#line 478 "../../lnav/src/data_scanner_re.re"
+
+ return nonstd::nullopt;
}
diff --git a/src/data_scanner_re.re b/src/data_scanner_re.re
index 904aa9f..f287158 100644
--- a/src/data_scanner_re.re
+++ b/src/data_scanner_re.re
@@ -35,7 +35,9 @@
#include "config.h"
#include "data_scanner.hh"
-nonstd::optional<data_scanner::tokenize_result> data_scanner::tokenize2()
+/*!conditions:re2c*/
+
+nonstd::optional<data_scanner::tokenize_result> data_scanner::tokenize_int(text_format_t tf)
{
data_token_t token_out = DT_INVALID;
capture_t cap_all;
@@ -100,8 +102,30 @@ nonstd::optional<data_scanner::tokenize_result> data_scanner::tokenize2()
_YYCURSOR yyt2;
_YYCURSOR yyt3;
_YYCURSOR yyt4;
+ _YYCURSOR hunk_heading;
const YYCTYPE *YYLIMIT = (const unsigned char *) this->ds_input.end();
const YYCTYPE *YYMARKER = YYCURSOR;
+ class _yycond {
+ public:
+ int operator()() const {
+ return this->val;
+ }
+
+ void operator=(int v) {
+ this->val = v;
+ }
+
+ int val{yycinit};
+ } c;
+
+ if (this->ds_bol) {
+ c = yycbol;
+ }
+ this->ds_bol = false;
+ if (this->ds_units) {
+ c = yycunits;
+ }
+ this->ds_units = false;
YYCURSOR.lim = YYLIMIT;
@@ -112,14 +136,19 @@ nonstd::optional<data_scanner::tokenize_result> data_scanner::tokenize2()
/*!re2c
re2c:yyfill:enable = 0;
- re2c:flags:tags = 1;
+ re2c:sentinel = 0;
+ re2c:define:YYCTYPE = uint8_t;
+ re2c:define:YYGETCONDITION = "c";
+ re2c:define:YYSETCONDITION = "c = @@;";
+ re2c:tags = 1;
SPACE = [ \t\r];
ALPHA = [a-zA-Z];
ESC = "\x1b";
NUM = [0-9];
ALPHANUM = [a-zA-Z0-9_];
- EOF = "\x00";
+ EOF = "";
+ SYN = "\x16";
IPV4SEG = ("25"[0-5]|("2"[0-4]|"1"{0,1}[0-9]){0,1}[0-9]);
IPV4ADDR = (IPV4SEG"."){3,3}IPV4SEG;
IPV6SEG = [0-9a-fA-F]{1,4};
@@ -137,12 +166,19 @@ nonstd::optional<data_scanner::tokenize_result> data_scanner::tokenize2()
"::"('ffff'(":0"{1,4}){0,1}":"){0,1}IPV4ADDR|
(IPV6SEG":"){1,4}":"IPV4ADDR
);
+ UNITS = (([mup]?("s"|"S"))|(([kKmMgG]"i"?)?[bB])|("m"|"min"));
- EOF { return nonstd::nullopt; }
+ <init, bol> EOF { return nonstd::nullopt; }
+ <init, bol> [\x00] { return nonstd::nullopt; }
+ <*> * { return nonstd::nullopt; }
+ <init, bol> SYN+ {
+ RET(DT_ZERO_WIDTH_SPACE);
+ }
- ("u"|"r")?'"'('\\'.|[^\x00\x1b"\\]|'""')*'"' {
+ <init, bol> ("f"|"u"|"r")?'"'('\\'[^\x00]|[^\x00\x16\x1b\n"\\]|'""')*'"' {
CAPTURE(DT_QUOTED_STRING);
switch (this->ds_input[cap_inner.c_begin]) {
+ case 'f':
case 'u':
case 'r':
cap_inner.c_begin += 1;
@@ -152,12 +188,98 @@ nonstd::optional<data_scanner::tokenize_result> data_scanner::tokenize2()
cap_inner.c_end -= 1;
return tokenize_result{token_out, cap_all, cap_inner, this->ds_input.data()};
}
- [a-qstv-zA-QSTV-Z]"'" {
- CAPTURE(DT_WORD);
+ <init, bol> ("f"|"u"|"r")?'"""' {
+ CAPTURE(DT_QUOTED_STRING);
+ switch (this->ds_input[cap_inner.c_begin]) {
+ case 'f':
+ case 'u':
+ case 'r':
+ cap_inner.c_begin += 1;
+ break;
+ }
+ cap_inner.c_begin += 3;
+ goto yyc_dbldocstring;
}
- ("u"|"r")?"'"('\\'.|"''"|[^\x00\x1b'\\])*"'"/[^sS] {
+
+ <dbldocstring> ([\x00]|'"""') {
+ CAPTURE(DT_QUOTED_STRING);
+ cap_inner.c_end -= 3;
+ return tokenize_result{token_out, cap_all, cap_inner, this->ds_input.data()};
+ }
+
+ <dbldocstring> * {
+ goto yyc_dbldocstring;
+ }
+
+ <init, bol> ("f"|"u"|"r")?"'''" {
CAPTURE(DT_QUOTED_STRING);
switch (this->ds_input[cap_inner.c_begin]) {
+ case 'f':
+ case 'u':
+ case 'r':
+ cap_inner.c_begin += 1;
+ break;
+ }
+ cap_inner.c_begin += 3;
+ goto yyc_sdocstring;
+ }
+
+ <sdocstring> ([\x00]|"'''") {
+ CAPTURE(DT_QUOTED_STRING);
+ cap_inner.c_end -= 3;
+ return tokenize_result{token_out, cap_all, cap_inner, this->ds_input.data()};
+ }
+
+ <sdocstring> * {
+ goto yyc_sdocstring;
+ }
+
+ <init, bol> "/*" ([^\x00*]|"*"+[^\x00/])* "*"+ "/" {
+ CAPTURE(DT_COMMENT);
+ if (tf == text_format_t::TF_DIFF) {
+ auto sf = this->to_string_fragment(cap_all);
+ auto split_res = sf.split_when(string_fragment::tag1{'\n'});
+ cap_all.c_end = split_res.first.sf_end;
+ cap_inner.c_end = split_res.first.sf_end;
+ this->ds_next_offset = cap_all.c_end;
+ }
+ return tokenize_result{token_out, cap_all, cap_inner, this->ds_input.data()};
+ }
+ <init, bol> "<!--" ([^\x00*]|"-"+[^\x00>])* "-"{2,} ">" {
+ CAPTURE(DT_COMMENT);
+ if (tf == text_format_t::TF_DIFF) {
+ auto sf = this->to_string_fragment(cap_all);
+ auto split_res = sf.split_when(string_fragment::tag1{'\n'});
+ cap_all.c_end = split_res.first.sf_end;
+ cap_inner.c_end = split_res.first.sf_end;
+ this->ds_next_offset = cap_all.c_end;
+ }
+ return tokenize_result{token_out, cap_all, cap_inner, this->ds_input.data()};
+ }
+ <init, bol> "#[" "="* "[" ([^\x00\]]|"]" [^\x00=\]])* "]" "="* "]" {
+ CAPTURE(DT_COMMENT);
+ if (tf == text_format_t::TF_DIFF) {
+ auto sf = this->to_string_fragment(cap_all);
+ auto split_res = sf.split_when(string_fragment::tag1{'\n'});
+ cap_all.c_end = split_res.first.sf_end;
+ cap_inner.c_end = split_res.first.sf_end;
+ this->ds_next_offset = cap_all.c_end;
+ }
+ return tokenize_result{token_out, cap_all, cap_inner, this->ds_input.data()};
+ }
+
+ <init, bol> ("f"|"u"|"r")?"'"('\\'[^\x00]|"''"|[^\x00\x16\x1b\n'\\])*"'"/[^sS] {
+ CAPTURE(DT_QUOTED_STRING);
+ if (tf == text_format_t::TF_RUST) {
+ auto sf = this->to_string_fragment(cap_all);
+ auto split_res = sf.split_when([](char ch) { return ch != '\'' && !isalnum(ch); });
+ cap_all.c_end = split_res.first.sf_end - this->ds_input.sf_begin;
+ cap_inner.c_end = split_res.first.sf_end - this->ds_input.sf_begin;
+ this->ds_next_offset = cap_all.c_end;
+ return tokenize_result{DT_SYMBOL, cap_all, cap_inner, this->ds_input.data()};
+ }
+ switch (this->ds_input[cap_inner.c_begin]) {
+ case 'f':
case 'u':
case 'r':
cap_inner.c_begin += 1;
@@ -167,73 +289,106 @@ nonstd::optional<data_scanner::tokenize_result> data_scanner::tokenize2()
cap_inner.c_end -= 1;
return tokenize_result{token_out, cap_all, cap_inner, this->ds_input.data()};
}
- [a-zA-Z0-9]+":/""/"?[^\x00\x1b\r\n\t '"[\](){}]+[/a-zA-Z0-9\-=&?%] { RET(DT_URL); }
- ("/"|"./"|"../"|[A-Z]":\\"|"\\\\")("Program Files"(" (x86)")?)?[a-zA-Z0-9_\.\-\~/\\!@#$%^&*()]* { RET(DT_PATH); }
- (SPACE|NUM)NUM":"NUM{2}/[^:] { RET(DT_TIME); }
- (SPACE|NUM)NUM?":"NUM{2}":"NUM{2}("."NUM{3,6})?/[^:] { RET(DT_TIME); }
- [0-9a-fA-F][0-9a-fA-F]((":"|"-")[0-9a-fA-F][0-9a-fA-F])+ {
+ <init, bol> [a-zA-Z0-9]+":/""/"?[^\x00\x16\x1b\r\n\t '"[\](){}]+[/a-zA-Z0-9\-=&?%] { RET(DT_URL); }
+ <init, bol> ("/"|"./"|"../"|[A-Z]":\\"|"\\\\")("Program Files"(" (x86)")?)?[a-zA-Z0-9_\.\-\~/\\!@#$%^&*()]* { RET(DT_PATH); }
+ <init, bol> (SPACE|NUM)NUM":"NUM{2}/[^:] { RET(DT_TIME); }
+ <init, bol> (SPACE|NUM)NUM?":"NUM{2}":"NUM{2}("."NUM{3,6})?/[^:] { RET(DT_TIME); }
+ <init, bol> [0-9a-fA-F][0-9a-fA-F]((":"|"-")[0-9a-fA-F][0-9a-fA-F])+ {
if ((YYCURSOR.val - (this->ds_input.udata() + this->ds_next_offset)) == 17) {
RET(DT_MAC_ADDRESS);
} else {
RET(DT_HEX_DUMP);
}
}
- (NUM{4}"/"NUM{1,2}"/"NUM{1,2}|NUM{4}"-"NUM{1,2}"-"NUM{1,2}|NUM{2}"/"ALPHA{3}"/"NUM{4})("T"|" ")NUM{2}":"NUM{2}(":"NUM{2}("."NUM{3,6})?)? {
+ <init, bol> (NUM{4}"/"NUM{1,2}"/"NUM{1,2}|NUM{4}"-"NUM{1,2}"-"NUM{1,2}|NUM{2}"/"ALPHA{3}"/"NUM{4})("T"|" ")NUM{2}":"NUM{2}(":"NUM{2}("."NUM{3,6})?)? {
RET(DT_DATE_TIME);
}
- ALPHA{3}(" "NUM|" "NUM{2})" "NUM{2}":"NUM{2}(":"NUM{2}("."NUM{3,6})?)? {
+ <init, bol> ALPHA{3}(" "NUM|" "NUM{2})" "NUM{2}":"NUM{2}(":"NUM{2}("."NUM{3,6})?)? {
RET(DT_DATE_TIME);
}
- (NUM{4}"/"NUM{1,2}"/"NUM{1,2}|NUM{4}"-"NUM{1,2}"-"NUM{1,2}|NUM{2}"/"ALPHA{3}"/"NUM{4}) {
+ <init, bol> (NUM{4}"/"NUM{1,2}"/"NUM{1,2}|NUM{4}"-"NUM{1,2}"-"NUM{1,2}|NUM{2}"/"ALPHA{3}"/"NUM{4}) {
RET(DT_DATE);
}
- IPV6ADDR/[^:a-zA-Z0-9] { RET(DT_IPV6_ADDRESS); }
+ <init, bol> IPV6ADDR/(": "|[^:a-zA-Z0-9]) { RET(DT_IPV6_ADDRESS); }
- "<!"[a-zA-Z0-9_:\-]+SPACE*([a-zA-Z0-9_:\-]+(SPACE*'='SPACE*('"'(('\\'.|[^\x00"\\])+)'"'|"'"(('\\'.|[^\x00'\\])+)"'"|[^\x00>]+))?|SPACE*('"'(('\\'.|[^\x00"\\])+)'"'|"'"(('\\'.|[^\x00'\\])+)"'"))*SPACE*">" {
+ <init, bol> "<!"[a-zA-Z0-9_:\-]+SPACE*([a-zA-Z0-9_:\-]+(SPACE*'='SPACE*('"'(('\\'[^\x00]|[^\x00"\\])+)'"'|"'"(('\\'[^\x00]|[^\x00'\\])+)"'"|[^\x00>]+))?|SPACE*('"'(('\\'[^\x00]|[^\x00"\\])+)'"'|"'"(('\\'[^\x00]|[^\x00'\\])+)"'"))*SPACE*">" {
RET(DT_XML_DECL_TAG);
}
- "<""?"?[a-zA-Z0-9_:\-]+SPACE*([a-zA-Z0-9_:\-]+(SPACE*'='SPACE*('"'(('\\'.|[^\x00"\\])+)'"'|"'"(('\\'.|[^\x00'\\])+)"'"|[^\x00>]+))?)*SPACE*("/"|"?")">" {
+ <init, bol> "<""?"?[a-zA-Z0-9_:\-]+SPACE*([a-zA-Z0-9_:\-]+(SPACE*'='SPACE*('"'(('\\'[^\x00]|[^\x00"\\])+)'"'|"'"(('\\'[^\x00]|[^\x00'\\])+)"'"|[^\x00>]+))?)*SPACE*("/"|"?")">" {
RET(DT_XML_EMPTY_TAG);
}
- "<"[a-zA-Z0-9_:\-]+SPACE*([a-zA-Z0-9_:\-]+(SPACE*"="SPACE*('"'(('\\'.|[^\x00"\\])+)'"'|"'"(('\\'.|[^\x00'\\])+)"'"|[^\x00>]+))?)*SPACE*">" {
+ <init, bol> "<"[a-zA-Z0-9_:\-]+SPACE*([a-zA-Z0-9_:\-]+(SPACE*"="SPACE*('"'(('\\'[^\x00]|[^\x00"\\])+)'"'|"'"(('\\'[^\x00]|[^\x00'\\])+)"'"|[^\x00>]+))?)*SPACE*">" {
RET(DT_XML_OPEN_TAG);
}
- "</"[a-zA-Z0-9_:\-]+SPACE*">" {
+ <init, bol> "</"[a-zA-Z0-9_:\-]+SPACE*">" {
RET(DT_XML_CLOSE_TAG);
}
- "\n"[A-Z][A-Z _\-0-9]+"\n" {
- RET(DT_H1);
+ <bol> [A-Z][A-Z _\-0-9]+"\n" {
+ CAPTURE(DT_H1);
+ cap_inner.c_end -= 1;
+ this->ds_bol = true;
+ return tokenize_result{token_out, cap_all, cap_inner, this->ds_input.data()};
}
- ESC"["[0-9=;?]*[a-zA-Z] {
+ <bol> "["[^\x00\n]+"]\n" {
+ CAPTURE(DT_H1);
+ cap_inner.c_end -= 1;
+ this->ds_bol = true;
+ return tokenize_result{token_out, cap_all, cap_inner, this->ds_input.data()};
+ }
+
+ <bol> "diff --git "[^\x00\n]+"\n" {
+ CAPTURE(DT_H1);
+ cap_inner.c_end = cap_inner.c_begin;
+ this->ds_bol = true;
+ return tokenize_result{token_out, cap_all, cap_inner, this->ds_input.data()};
+ }
+
+ <bol> "--- "[^\x00\n]+"\n+++ "[^\x00\n]+"\n" {
+ CAPTURE(DT_DIFF_FILE_HEADER);
+ cap_inner.c_end -= 1;
+ this->ds_bol = true;
+ return tokenize_result{token_out, cap_all, cap_inner, this->ds_input.data()};
+ }
+
+ <init, bol> "@@ -"[0-9]+","[0-9]+" +"[0-9]+","[0-9]+" @@ " @hunk_heading ([^\x00\n]+)"\n" {
+ CAPTURE(DT_DIFF_HUNK_HEADING);
+ cap_inner.c_begin = hunk_heading.val - this->ds_input.udata();
+ cap_inner.c_end -= 1;
+ this->ds_bol = true;
+ return tokenize_result{token_out, cap_all, cap_inner, this->ds_input.data()};
+ }
+
+ <init, bol> ESC"["[0-9=;?]*[a-zA-Z] {
RET(DT_CSI);
}
- ":" { RET(DT_COLON); }
- "=" { RET(DT_EQUALS); }
- "," { RET(DT_COMMA); }
- ";" { RET(DT_SEMI); }
- "()" | "{}" | "[]" { RET(DT_EMPTY_CONTAINER); }
- "{" { RET(DT_LCURLY); }
- "}" { RET(DT_RCURLY); }
- "[" { RET(DT_LSQUARE); }
- "]" { RET(DT_RSQUARE); }
- "(" { RET(DT_LPAREN); }
- ")" { RET(DT_RPAREN); }
- "<" { RET(DT_LANGLE); }
- ">" { RET(DT_RANGLE); }
-
- IPV4ADDR/[^0-9] {
+ <init, bol> ":" { RET(DT_COLON); }
+ <init, bol> "=" { RET(DT_EQUALS); }
+ <init, bol> "," { RET(DT_COMMA); }
+ <init, bol> ";" { RET(DT_SEMI); }
+ <init, bol> "--"/[^\-] { RET(DT_EMDASH); }
+ <init, bol> "()" | "{}" | "[]" { RET(DT_EMPTY_CONTAINER); }
+ <init, bol> "{" { RET(DT_LCURLY); }
+ <init, bol> "}" { RET(DT_RCURLY); }
+ <init, bol> "[" { RET(DT_LSQUARE); }
+ <init, bol> "]" { RET(DT_RSQUARE); }
+ <init, bol> "(" { RET(DT_LPAREN); }
+ <init, bol> ")" { RET(DT_RPAREN); }
+ <init, bol> "<" { RET(DT_LANGLE); }
+ <init, bol> ">" { RET(DT_RANGLE); }
+
+ <init, bol> IPV4ADDR/[^0-9] {
RET(DT_IPV4_ADDRESS);
}
- [0-9a-fA-F]{8}("-"[0-9a-fA-F]{4}){3}"-"[0-9a-fA-F]{12} { RET(DT_UUID); }
+ <init, bol> [0-9a-fA-F]{8}("-"[0-9a-fA-F]{4}){3}"-"[0-9a-fA-F]{12} { RET(DT_UUID); }
- (NUM{4}" "NUM{4}" "NUM{4}" "NUM{4}|NUM{16})/[^0-9] {
+ <init, bol> (NUM{4}" "NUM{4}" "NUM{4}" "NUM{4}|NUM{16})/[^0-9] {
CAPTURE(DT_CREDIT_CARD_NUMBER);
if (!this->is_credit_card(this->to_string_fragment(cap_all))) {
if (cap_all.length() > 16) {
@@ -241,37 +396,86 @@ nonstd::optional<data_scanner::tokenize_result> data_scanner::tokenize2()
cap_inner.c_end = cap_inner.c_begin + 4;
}
this->ds_next_offset = cap_all.c_end;
- token_out = DT_NUMBER;
+ token_out = DT_HEX_DUMP;
}
return tokenize_result{token_out, cap_all, cap_inner, this->ds_input.data()};
}
- [0-9]"."[0-9]+'e'[\-\+][0-9]+ { RET(DT_NUMBER); }
+ <init, bol> ("-"|"+")?[0-9]"."[0-9]+([eE][\-\+][0-9]+)?UNITS? {
+ CAPTURE(DT_NUMBER);
+ auto sf = this->to_string_fragment(cap_all);
+ if (isalpha(sf.back())) {
+ while (isalpha(sf.back())) {
+ sf.pop_back();
+ }
+ cap_all.c_end = sf.sf_end - this->ds_input.sf_begin;
+ cap_inner.c_end = sf.sf_end - this->ds_input.sf_begin;
+ this->ds_next_offset = cap_all.c_end;
+ this->ds_units = true;
+ }
+ return tokenize_result{DT_NUMBER, cap_all, cap_inner, this->ds_input.data()};
+ }
- [0-9]+("."[0-9]+[a-zA-Z0-9_]*){2,}("-"[a-zA-Z0-9_]+)?|[0-9]+("."[0-9]+[a-zA-Z0-9_]*)+"-"[a-zA-Z0-9_]+ {
+ <init, bol> [0-9]+("."[0-9]+[a-zA-Z0-9_]*){2,}("-"[a-zA-Z0-9_]+)?|[0-9]+("."[0-9]+[a-zA-Z0-9_]*)+"-"[a-zA-Z0-9_]+ {
RET(DT_VERSION_NUMBER);
}
- "-"?"0"[0-7]+ { RET(DT_OCTAL_NUMBER); }
- "-"?[0-9]+("."[0-9]+)?[ ]*"%" { RET(DT_PERCENTAGE); }
- "-"?[0-9]+("."[0-9]+)?([eE][\-+][0-9]+)? { RET(DT_NUMBER); }
- "-"?("0x"|[0-9])[0-9a-fA-F]+ { RET(DT_HEX_NUMBER); }
+ <units> UNITS {
+ RET(DT_UNIT);
+ }
+
+ <init, bol> "-"?"0"[0-7]+ { RET(DT_OCTAL_NUMBER); }
+ <init, bol> "-"?[0-9]+("."[0-9]+)?[ ]*"%" { RET(DT_PERCENTAGE); }
+ <init, bol> ("0"|("-"|"+")?[1-9][0-9]*("."[0-9]+)?([eE][\-+][0-9]+)?)UNITS? {
+ CAPTURE(DT_NUMBER);
+ auto sf = this->to_string_fragment(cap_all);
+ if (isalpha(sf.back())) {
+ while (isalpha(sf.back())) {
+ sf.pop_back();
+ }
+ cap_all.c_end = sf.sf_end - this->ds_input.sf_begin;
+ cap_inner.c_end = sf.sf_end - this->ds_input.sf_begin;
+ this->ds_next_offset = cap_all.c_end;
+ this->ds_units = true;
+ }
+ return tokenize_result{DT_NUMBER, cap_all, cap_inner, this->ds_input.data()};
+ }
+ <init, bol> "-"?("0x"|[0-9])[0-9a-fA-F]+ { RET(DT_HEX_NUMBER); }
+
+ <init, bol> [a-zA-Z0-9\._%+-]+"@"[a-zA-Z0-9\.-]+"."[a-zA-Z]+ { RET(DT_EMAIL); }
+
+ <init, bol> "true"|"True"|"TRUE"|"false"|"False"|"FALSE"|"None"|"null"|"NULL"/([\r\n\t \(\)!\*:;'\"\?,]|[\.\!,\?]SPACE|EOF) { RET(DT_CONSTANT); }
- [a-zA-Z0-9\._%+-]+"@"[a-zA-Z0-9\.-]+"."[a-zA-Z]+ { RET(DT_EMAIL); }
+ <init, bol> ("re-")?[a-zA-Z][a-z']+/([\r\n\t \(\)!\*:;'\"\?,]|[\.\!,\?]SPACE|EOF) { RET(DT_WORD); }
- "true"|"True"|"TRUE"|"false"|"False"|"FALSE"|"None"|"null"|"NULL"/([\r\n\t \(\)!\*:;'\"\?,]|[\.\!,\?]SPACE|EOF) { RET(DT_CONSTANT); }
+ <init, bol> [aAI] { RET(DT_WORD); }
- ("re-")?[a-zA-Z][a-z']+/([\r\n\t \(\)!\*:;'\"\?,]|[\.\!,\?]SPACE|EOF) { RET(DT_WORD); }
+ <init, bol> ("--"|"++")[a-zA-Z0-9]+("-"[a-zA-Z0-9]+)* {
+ RET(DT_SYMBOL);
+ }
- [^\x00\x1b"; \t\r\n:=,\(\)\{\}\[\]\+#!%\^&\*'\?<>\~`\|\.\\][^\x00\x1b"; \t\r\n:=,\(\)\{\}\[\]\+#!%\^&\*'\?<>\~`\|\\]*("::"[^\x00\x1b"; \r\n\t:=,\(\)\{\}\[\]\+#!%\^&\*'\?<>\~`\|\\]+)* {
+ <init, bol> ("-"|"+")[a-zA-Z0-9]+/[\x00 \t\r\n] {
RET(DT_SYMBOL);
}
- ("\r"?"\n"|"\\n") { RET(DT_LINE); }
- SPACE+ { RET(DT_WHITE); }
- "." { RET(DT_DOT); }
- "\\". { RET(DT_ESCAPED_CHAR); }
- . { RET(DT_GARBAGE); }
+ <init, bol> [a-zA-Z_][a-zA-Z0-9_]*(("::"|".")[a-zA-Z_0-9\-]+)* {
+ RET(DT_SYMBOL);
+ }
+
+ <init, bol> [a-zA-Z0-9_]+(("::"|"."|"-"|"@"|"/")[a-zA-Z0-9_]+)* {
+ RET(DT_ID);
+ }
+
+ <init, bol> ("\r"?"\n"|"\\n") {
+ this->ds_bol = true;
+ RET(DT_LINE);
+ }
+ <init, bol> SPACE+ { RET(DT_WHITE); }
+ <init, bol> "." { RET(DT_DOT); }
+ <init, bol> "\\". { RET(DT_ESCAPED_CHAR); }
+ <init, bol> . { RET(DT_GARBAGE); }
*/
+
+ return nonstd::nullopt;
}
diff --git a/src/db_sub_source.cc b/src/db_sub_source.cc
index 795bda8..9453876 100644
--- a/src/db_sub_source.cc
+++ b/src/db_sub_source.cc
@@ -27,10 +27,9 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <regex>
-
#include "db_sub_source.hh"
+#include "base/ansi_scrubber.hh"
#include "base/date_time_scanner.hh"
#include "base/itertools.hh"
#include "base/time_util.hh"
@@ -40,7 +39,6 @@
const char db_label_source::NULL_STR[] = "<NULL>";
-constexpr size_t MAX_COLUMN_WIDTH = 120;
constexpr size_t MAX_JSON_WIDTH = 16 * 1024;
void
@@ -55,15 +53,17 @@ db_label_source::text_value_for_line(textview_curses& tc,
*/
label_out.clear();
- if (row >= (int) this->dls_rows.size()) {
+ this->dls_ansi_attrs.clear();
+ if (row < 0_vl || row >= (int) this->dls_rows.size()) {
return;
}
for (int lpc = 0; lpc < (int) this->dls_rows[row].size(); lpc++) {
- auto actual_col_size
- = std::min(MAX_COLUMN_WIDTH, this->dls_headers[lpc].hm_column_size);
+ auto actual_col_size = std::min(this->dls_max_column_width,
+ this->dls_headers[lpc].hm_column_size);
auto cell_str = scrub_ws(this->dls_rows[row][lpc]);
-
- truncate_to(cell_str, MAX_COLUMN_WIDTH);
+ string_attrs_t cell_attrs;
+ scrub_ansi_string(cell_str, &cell_attrs);
+ truncate_to(cell_str, this->dls_max_column_width);
auto cell_length
= utf8_string_length(cell_str).unwrapOr(actual_col_size);
@@ -72,11 +72,15 @@ db_label_source::text_value_for_line(textview_curses& tc,
if (this->dls_headers[lpc].hm_column_type != SQLITE3_TEXT) {
label_out.append(padding, ' ');
}
+ shift_string_attrs(cell_attrs, 0, label_out.size());
label_out.append(cell_str);
if (this->dls_headers[lpc].hm_column_type == SQLITE3_TEXT) {
label_out.append(padding, ' ');
}
label_out.append(1, ' ');
+
+ this->dls_ansi_attrs.insert(
+ this->dls_ansi_attrs.end(), cell_attrs.begin(), cell_attrs.end());
}
}
@@ -88,12 +92,20 @@ db_label_source::text_attrs_for_line(textview_curses& tc,
struct line_range lr(0, 0);
const struct line_range lr2(0, -1);
- if (row >= (int) this->dls_rows.size()) {
+ if (row < 0_vl || row >= (int) this->dls_rows.size()) {
return;
}
+ sa = this->dls_ansi_attrs;
+ auto alt_row_index = row % 4;
+ if (alt_row_index == 2 || alt_row_index == 3) {
+ sa.emplace_back(lr2, VC_ROLE.value(role_t::VCR_ALT_ROW));
+ }
for (size_t lpc = 0; lpc < this->dls_headers.size() - 1; lpc++) {
- if (row % 2 == 0) {
- sa.emplace_back(lr2, VC_STYLE.value(text_attrs{A_BOLD}));
+ const auto& hm = this->dls_headers[lpc];
+
+ if (hm.hm_graphable) {
+ lr.lr_end += this->dls_cell_width[lpc];
+ sa.emplace_back(lr, VC_ROLE.value(role_t::VCR_NUMBER));
}
lr.lr_start += this->dls_cell_width[lpc];
lr.lr_end = lr.lr_start + 1;
@@ -101,17 +113,29 @@ db_label_source::text_attrs_for_line(textview_curses& tc,
lr.lr_start += 1;
}
- int left = 0;
+ for (const auto& attr : sa) {
+ require_ge(attr.sa_range.lr_start, 0);
+ }
+ int cell_start = 0;
for (size_t lpc = 0; lpc < this->dls_headers.size(); lpc++) {
auto row_view = scn::string_view{this->dls_rows[row][lpc]};
const auto& hm = this->dls_headers[lpc];
+ int left = cell_start;
if (hm.hm_graphable) {
auto num_scan_res = scn::scan_value<double>(row_view);
if (num_scan_res) {
- this->dls_chart.chart_attrs_for_value(
- tc, left, hm.hm_name, num_scan_res.value(), sa);
+ hm.hm_chart.chart_attrs_for_value(tc,
+ left,
+ this->dls_cell_width[lpc],
+ hm.hm_name,
+ num_scan_res.value(),
+ sa);
+
+ for (const auto& attr : sa) {
+ require_ge(attr.sa_range.lr_start, 0);
+ }
}
}
if (row_view.length() > 2 && row_view.length() < MAX_JSON_WIDTH
@@ -132,16 +156,25 @@ db_label_source::text_attrs_for_line(textview_curses& tc,
= scn::scan_value<double>(jpw_value.wt_value);
if (num_scan_res) {
- this->dls_chart.chart_attrs_for_value(
+ hm.hm_chart.chart_attrs_for_value(
tc,
left,
+ this->dls_cell_width[lpc],
jpw_value.wt_ptr,
num_scan_res.value(),
sa);
+ for (const auto& attr : sa) {
+ require_ge(attr.sa_range.lr_start, 0);
+ }
}
}
}
}
+ cell_start += this->dls_cell_width[lpc] + 1;
+ }
+
+ for (const auto& attr : sa) {
+ require_ge(attr.sa_range.lr_start, 0);
}
}
@@ -158,9 +191,13 @@ db_label_source::push_header(const std::string& colstr,
hm.hm_column_size = utf8_string_length(colstr).unwrapOr(colstr.length());
hm.hm_column_type = type;
hm.hm_graphable = graphable;
- if (colstr == "log_time") {
+ if (graphable) {
+ hm.hm_column_size = std::max(hm.hm_column_size, size_t{10});
+ }
+ if (colstr == "log_time" || colstr == "min(log_time)") {
this->dls_time_column_index = this->dls_headers.size() - 1;
}
+ hm.hm_chart.with_show_state(stacked_bar_chart_base::show_all{});
}
void
@@ -221,9 +258,9 @@ db_label_source::push_column(const scoped_value_t& sv)
&& this->dls_headers[index].hm_graphable)
{
if (sv.is<int64_t>()) {
- this->dls_chart.add_value(hm.hm_name, sv.get<int64_t>());
+ hm.hm_chart.add_value(hm.hm_name, sv.get<int64_t>());
} else {
- this->dls_chart.add_value(hm.hm_name, sv.get<double>());
+ hm.hm_chart.add_value(hm.hm_name, sv.get<double>());
}
} else if (col_sf.length() > 2
&& ((col_sf.startswith("{") && col_sf.endswith("}"))
@@ -241,20 +278,20 @@ db_label_source::push_column(const scoped_value_t& sv)
auto num_scan_res = scn::scan_value<double>(jpw_value.wt_value);
if (num_scan_res) {
- this->dls_chart.add_value(jpw_value.wt_ptr,
- num_scan_res.value());
- this->dls_chart.with_attrs_for_ident(
+ hm.hm_chart.add_value(jpw_value.wt_ptr,
+ num_scan_res.value());
+ hm.hm_chart.with_attrs_for_ident(
jpw_value.wt_ptr, vc.attrs_for_ident(jpw_value.wt_ptr));
}
}
}
}
+ hm.hm_chart.next_row();
}
void
db_label_source::clear()
{
- this->dls_chart.clear();
this->dls_headers.clear();
this->dls_rows.clear();
this->dls_time_column.clear();
@@ -282,26 +319,48 @@ db_label_source::row_for_time(struct timeval time_bucket)
return nonstd::nullopt;
}
-size_t
-db_overlay_source::list_overlay_count(const listview_curses& lv)
+nonstd::optional<text_time_translator::row_info>
+db_label_source::time_for_row(vis_line_t row)
+{
+ if ((row < 0_vl) || (((size_t) row) >= this->dls_time_column.size())) {
+ return nonstd::nullopt;
+ }
+
+ return row_info{this->dls_time_column[row], row};
+}
+
+nonstd::optional<attr_line_t>
+db_overlay_source::list_header_for_overlay(const listview_curses& lv,
+ vis_line_t line)
+{
+ attr_line_t retval;
+
+ retval.append(" JSON column details");
+ return retval;
+}
+
+void
+db_overlay_source::list_value_for_overlay(const listview_curses& lv,
+ vis_line_t row,
+ std::vector<attr_line_t>& value_out)
{
size_t retval = 1;
if (!this->dos_active || lv.get_inner_height() == 0) {
- this->dos_lines.clear();
+ return;
+ }
- return retval;
+ if (row != lv.get_selection()) {
+ return;
}
auto& vc = view_colors::singleton();
- auto top = lv.get_top();
- const auto& cols = this->dos_labels->dls_rows[top];
+ const auto& cols = this->dos_labels->dls_rows[row];
unsigned long width;
vis_line_t height;
lv.get_dimensions(height, width);
- this->dos_lines.clear();
for (size_t col = 0; col < cols.size(); col++) {
const char* col_value = cols[col];
size_t col_len = strlen(col_value);
@@ -321,21 +380,23 @@ db_overlay_source::list_overlay_count(const listview_curses& lv)
{
const std::string& header
= this->dos_labels->dls_headers[col].hm_name;
- this->dos_lines.emplace_back(" JSON Column: " + header);
+ value_out.emplace_back(" Column: " + header);
retval += 1;
}
stacked_bar_chart<std::string> chart;
- int start_line = this->dos_lines.size();
+ int start_line = value_out.size();
- chart.with_stacking_enabled(false).with_margins(3, 0);
+ chart.with_stacking_enabled(false)
+ .with_margins(3, 0)
+ .with_show_state(stacked_bar_chart_base::show_all{});
for (auto& jpw_value : jpw.jpw_values) {
- this->dos_lines.emplace_back(" " + jpw_value.wt_ptr + " = "
- + jpw_value.wt_value);
+ value_out.emplace_back(" " + jpw_value.wt_ptr + " = "
+ + jpw_value.wt_value);
- string_attrs_t& sa = this->dos_lines.back().get_attrs();
+ auto& sa = value_out.back().get_attrs();
struct line_range lr(1, 2);
sa.emplace_back(lr, VC_GRAPHIC.value(ACS_LTEE));
@@ -370,20 +431,24 @@ db_overlay_source::list_overlay_count(const listview_curses& lv)
auto num_scan_res = scn::scan_value<double>(iter->wt_value);
if (num_scan_res) {
- auto& sa = this->dos_lines[curr_line].get_attrs();
+ auto& sa = value_out[curr_line].get_attrs();
int left = 3;
- chart.chart_attrs_for_value(
- lv, left, iter->wt_ptr, num_scan_res.value(), sa);
+ chart.chart_attrs_for_value(lv,
+ left,
+ width,
+ iter->wt_ptr,
+ num_scan_res.value(),
+ sa);
}
}
}
}
if (retval > 1) {
- this->dos_lines.emplace_back("");
+ value_out.emplace_back("");
- string_attrs_t& sa = this->dos_lines.back().get_attrs();
+ string_attrs_t& sa = value_out.back().get_attrs();
struct line_range lr(1, 2);
sa.emplace_back(lr, VC_GRAPHIC.value(ACS_LLCORNER));
@@ -393,65 +458,60 @@ db_overlay_source::list_overlay_count(const listview_curses& lv)
retval += 1;
}
-
- return retval;
}
bool
-db_overlay_source::list_value_for_overlay(const listview_curses& lv,
- int y,
- int bottom,
- vis_line_t row,
- attr_line_t& value_out)
+db_overlay_source::list_static_overlay(const listview_curses& lv,
+ int y,
+ int bottom,
+ attr_line_t& value_out)
{
- if (y == 0) {
- this->list_overlay_count(lv);
- std::string& line = value_out.get_string();
- db_label_source* dls = this->dos_labels;
- string_attrs_t& sa = value_out.get_attrs();
+ if (y != 0) {
+ return false;
+ }
- for (size_t lpc = 0; lpc < this->dos_labels->dls_headers.size(); lpc++)
- {
- auto actual_col_size = std::min(
- MAX_COLUMN_WIDTH, dls->dls_headers[lpc].hm_column_size);
- std::string cell_title = dls->dls_headers[lpc].hm_name;
-
- truncate_to(cell_title, MAX_COLUMN_WIDTH);
-
- auto cell_length
- = utf8_string_length(cell_title).unwrapOr(actual_col_size);
- int before, total_fill = actual_col_size - cell_length;
- auto line_len_before = line.length();
-
- before = total_fill / 2;
- total_fill -= before;
- line.append(before, ' ');
- line.append(cell_title);
- line.append(total_fill, ' ');
- line.append(1, ' ');
-
- struct line_range header_range(line_len_before, line.length());
-
- text_attrs attrs;
- if (this->dos_labels->dls_headers[lpc].hm_graphable) {
- attrs = dls->dls_headers[lpc].hm_title_attrs
- | text_attrs{A_REVERSE};
- } else {
- attrs.ta_attrs = A_UNDERLINE;
- }
- sa.emplace_back(header_range, VC_STYLE.value(text_attrs{attrs}));
- }
+ auto& line = value_out.get_string();
+ auto* dls = this->dos_labels;
+ auto& sa = value_out.get_attrs();
- struct line_range lr(0);
+ for (size_t lpc = 0; lpc < this->dos_labels->dls_headers.size(); lpc++) {
+ auto actual_col_size = std::min(dls->dls_max_column_width,
+ dls->dls_headers[lpc].hm_column_size);
+ std::string cell_title = dls->dls_headers[lpc].hm_name;
+ string_attrs_t cell_attrs;
+ scrub_ansi_string(cell_title, &cell_attrs);
+ truncate_to(cell_title, dls->dls_max_column_width);
- sa.emplace_back(lr, VC_STYLE.value(text_attrs{A_BOLD | A_UNDERLINE}));
- return true;
- } else if (this->dos_active && y >= 2
- && ((size_t) y) < (this->dos_lines.size() + 2))
- {
- value_out = this->dos_lines[y - 2];
- return true;
+ auto cell_length
+ = utf8_string_length(cell_title).unwrapOr(actual_col_size);
+ int before, total_fill = actual_col_size - cell_length;
+ auto line_len_before = line.length();
+
+ before = total_fill / 2;
+ total_fill -= before;
+ line.append(before, ' ');
+ shift_string_attrs(cell_attrs, 0, line.size());
+ line.append(cell_title);
+ line.append(total_fill, ' ');
+ struct line_range header_range(line_len_before, line.length());
+
+ line.append(1, ' ');
+
+ require_ge(header_range.lr_start, 0);
+
+ text_attrs attrs;
+ if (this->dos_labels->dls_headers[lpc].hm_graphable) {
+ attrs
+ = dls->dls_headers[lpc].hm_title_attrs | text_attrs{A_REVERSE};
+ } else {
+ attrs.ta_attrs = A_UNDERLINE;
+ }
+ sa.emplace_back(header_range, VC_STYLE.value(attrs));
+ sa.insert(sa.end(), cell_attrs.begin(), cell_attrs.end());
}
- return false;
+ struct line_range lr(0);
+
+ sa.emplace_back(lr, VC_STYLE.value(text_attrs{A_BOLD | A_UNDERLINE}));
+ return true;
}
diff --git a/src/db_sub_source.hh b/src/db_sub_source.hh
index d727989..d233498 100644
--- a/src/db_sub_source.hh
+++ b/src/db_sub_source.hh
@@ -89,14 +89,7 @@ public:
nonstd::optional<vis_line_t> row_for_time(
struct timeval time_bucket) override;
- nonstd::optional<struct timeval> time_for_row(vis_line_t row) override
- {
- if ((row < 0_vl) || (((size_t) row) >= this->dls_time_column.size())) {
- return nonstd::nullopt;
- }
-
- return this->dls_time_column[row];
- }
+ nonstd::optional<row_info> time_for_row(vis_line_t row) override;
struct header_meta {
explicit header_meta(std::string name) : hm_name(std::move(name)) {}
@@ -112,9 +105,10 @@ public:
bool hm_graphable{false};
size_t hm_column_size{0};
text_attrs hm_title_attrs;
+ stacked_bar_chart<std::string> hm_chart;
};
- stacked_bar_chart<std::string> dls_chart;
+ size_t dls_max_column_width{120};
std::vector<header_meta> dls_headers;
std::vector<std::vector<const char*>> dls_rows;
std::vector<struct timeval> dls_time_column;
@@ -123,22 +117,36 @@ public:
nonstd::optional<size_t> dls_time_column_invalidated_at;
std::unique_ptr<ArenaAlloc::Alloc<char>> dls_allocator{
std::make_unique<ArenaAlloc::Alloc<char>>(64 * 1024)};
+ string_attrs_t dls_ansi_attrs;
static const char NULL_STR[];
};
class db_overlay_source : public list_overlay_source {
public:
- size_t list_overlay_count(const listview_curses& lv);
+ bool list_static_overlay(const listview_curses& lv,
+ int y,
+ int bottom,
+ attr_line_t& value_out) override;
+
+ void list_value_for_overlay(const listview_curses& lv,
+ vis_line_t line,
+ std::vector<attr_line_t>& value_out) override;
+
+ nonstd::optional<attr_line_t> list_header_for_overlay(
+ const listview_curses& lv, vis_line_t line) override;
- bool list_value_for_overlay(const listview_curses& lv,
- int y,
- int bottom,
- vis_line_t row,
- attr_line_t& value_out) override;
+ void set_show_details_in_overlay(bool val) override
+ {
+ this->dos_active = val;
+ }
+
+ bool get_show_details_in_overlay() const override
+ {
+ return this->dos_active;
+ }
bool dos_active{false};
db_label_source* dos_labels{nullptr};
- std::vector<attr_line_t> dos_lines;
};
#endif
diff --git a/src/document.sections.cc b/src/document.sections.cc
index 04eb516..57820fb 100644
--- a/src/document.sections.cc
+++ b/src/document.sections.cc
@@ -27,6 +27,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <algorithm>
#include <utility>
#include <vector>
@@ -50,6 +51,7 @@ hier_node::lookup_child(section_key_t key) const
if (iter != this->hn_named_children.end()) {
return iter->second;
}
+
return nullptr;
},
[this](size_t index) -> hier_node* {
@@ -60,6 +62,117 @@ hier_node::lookup_child(section_key_t key) const
}));
}
+nonstd::optional<size_t>
+hier_node::child_index(const hier_node* hn) const
+{
+ size_t retval = 0;
+
+ for (const auto& child : this->hn_children) {
+ if (child.get() == hn) {
+ return retval;
+ }
+ retval += 1;
+ }
+
+ return nonstd::nullopt;
+}
+
+nonstd::optional<hier_node::child_neighbors_result>
+hier_node::child_neighbors(const lnav::document::hier_node* hn,
+ file_off_t offset) const
+{
+ auto index_opt = this->child_index(hn);
+ if (!index_opt) {
+ return nonstd::nullopt;
+ }
+
+ hier_node::child_neighbors_result retval;
+
+ if (index_opt.value() == 0) {
+ if (this->hn_parent != nullptr) {
+ auto parent_neighbors_opt
+ = this->hn_parent->child_neighbors(this, offset);
+
+ if (parent_neighbors_opt) {
+ retval.cnr_previous = parent_neighbors_opt->cnr_previous;
+ }
+ } else {
+ retval.cnr_previous = hn;
+ }
+ } else {
+ const auto* prev_hn = this->hn_children[index_opt.value() - 1].get();
+
+ if (hn->hn_line_number == 0
+ || (hn->hn_line_number - prev_hn->hn_line_number) > 1)
+ {
+ retval.cnr_previous = prev_hn;
+ } else if (this->hn_parent != nullptr) {
+ auto parent_neighbors_opt
+ = this->hn_parent->child_neighbors(this, offset);
+
+ if (parent_neighbors_opt) {
+ retval.cnr_previous = parent_neighbors_opt->cnr_previous;
+ }
+ }
+ }
+
+ if (index_opt.value() == this->hn_children.size() - 1) {
+ if (this->hn_parent != nullptr) {
+ auto parent_neighbors_opt
+ = this->hn_parent->child_neighbors(this, offset);
+
+ if (parent_neighbors_opt) {
+ retval.cnr_next = parent_neighbors_opt->cnr_next;
+ }
+ } else if (!hn->hn_children.empty()) {
+ for (const auto& child : hn->hn_children) {
+ if (child->hn_start > offset) {
+ retval.cnr_next = child.get();
+ break;
+ }
+ }
+ }
+ } else {
+ const auto* next_hn = this->hn_children[index_opt.value() + 1].get();
+
+ if (next_hn->hn_start > offset
+ && (hn->hn_line_number == 0
+ || (next_hn->hn_line_number - hn->hn_line_number) > 1))
+ {
+ retval.cnr_next = next_hn;
+ } else if (this->hn_parent != nullptr) {
+ auto parent_neighbors_opt
+ = this->hn_parent->child_neighbors(this, offset);
+
+ if (parent_neighbors_opt) {
+ retval.cnr_next = parent_neighbors_opt->cnr_next;
+ }
+ }
+ }
+
+ return retval;
+}
+
+nonstd::optional<hier_node::child_neighbors_result>
+hier_node::line_neighbors(size_t ln) const
+{
+ if (this->hn_children.empty()) {
+ return nonstd::nullopt;
+ }
+
+ hier_node::child_neighbors_result retval;
+
+ for (const auto& child : this->hn_children) {
+ if (child->hn_line_number > ln) {
+ retval.cnr_next = child.get();
+ break;
+ }
+ retval.cnr_previous = child.get();
+ }
+
+ return retval;
+}
+
nonstd::optional<const hier_node*>
hier_node::lookup_path(const hier_node* root,
const std::vector<section_key_t>& path)
@@ -81,15 +194,33 @@ hier_node::lookup_path(const hier_node* root,
return retval;
}
+std::vector<section_key_t>
+metadata::path_for_range(size_t start, size_t stop)
+{
+ std::vector<section_key_t> retval;
+
+ this->m_sections_tree.visit_overlapping(
+ start, stop, [&retval](const lnav::document::section_interval_t& iv) {
+ retval.emplace_back(iv.value);
+ });
+ return retval;
+}
+
struct metadata_builder {
std::vector<section_interval_t> mb_intervals;
+ std::vector<section_type_interval_t> mb_type_intervals;
std::unique_ptr<hier_node> mb_root_node;
+ std::set<size_t> mb_indents;
+ text_format_t mb_text_format{text_format_t::TF_UNKNOWN};
metadata to_metadata() &&
{
return {
std::move(this->mb_intervals),
std::move(this->mb_root_node),
+ std::move(this->mb_type_intervals),
+ std::move(this->mb_indents),
+ this->mb_text_format,
};
}
};
@@ -169,16 +300,18 @@ discover_metadata_int(const attr_line_t& al, metadata_builder& mb)
new_open_intervals.emplace_back(std::move(oi));
}
}
- auto* parent_node = new_open_intervals.empty()
- ? root_node.get()
- : new_open_intervals.back().oi_node.get();
- new_open_intervals.emplace_back(role_num,
- hdr_attr.sa_range.lr_start,
- al.get_substring(hdr_attr.sa_range));
- new_open_intervals.back().oi_node->hn_parent = parent_node;
- new_open_intervals.back().oi_node->hn_start
- = hdr_attr.sa_range.lr_start;
-
+ if (!hdr_attr.sa_range.empty()) {
+ auto* parent_node = new_open_intervals.empty()
+ ? root_node.get()
+ : new_open_intervals.back().oi_node.get();
+ new_open_intervals.emplace_back(
+ role_num,
+ hdr_attr.sa_range.lr_start,
+ al.get_substring(hdr_attr.sa_range));
+ new_open_intervals.back().oi_node->hn_parent = parent_node;
+ new_open_intervals.back().oi_node->hn_start
+ = hdr_attr.sa_range.lr_start;
+ }
open_intervals = std::move(new_open_intervals);
}
@@ -210,6 +343,18 @@ discover_metadata_int(const attr_line_t& al, metadata_builder& mb)
interval.stop += stop_off_iter->sa_value.get<int64_t>();
}
}
+ for (auto& interval : mb.mb_type_intervals) {
+ auto start_off_iter = find_string_attr_containing(
+ orig_attrs, &SA_ORIGIN_OFFSET, interval.start);
+ if (start_off_iter != orig_attrs.end()) {
+ interval.start += start_off_iter->sa_value.get<int64_t>();
+ }
+ auto stop_off_iter = find_string_attr_containing(
+ orig_attrs, &SA_ORIGIN_OFFSET, interval.stop - 1);
+ if (stop_off_iter != orig_attrs.end()) {
+ interval.stop += stop_off_iter->sa_value.get<int64_t>();
+ }
+ }
hier_node::depth_first(root_node.get(), [&orig_attrs](hier_node* node) {
auto off_opt
@@ -220,6 +365,16 @@ discover_metadata_int(const attr_line_t& al, metadata_builder& mb)
}
});
+ hier_node::depth_first(
+ mb.mb_root_node.get(), [&orig_attrs](hier_node* node) {
+ auto off_opt = get_string_attr(
+ orig_attrs, &SA_ORIGIN_OFFSET, node->hn_start);
+
+ if (off_opt) {
+ node->hn_start += off_opt.value()->sa_value.get<int64_t>();
+ }
+ });
+
if (!root_node->hn_children.empty()
|| !root_node->hn_named_children.empty())
{
@@ -239,8 +394,8 @@ discover_metadata(const attr_line_t& al)
class structure_walker {
public:
- explicit structure_walker(attr_line_t& al, line_range lr)
- : sw_line(al), sw_range(lr),
+ explicit structure_walker(attr_line_t& al, line_range lr, text_format_t tf)
+ : sw_line(al), sw_range(lr), sw_text_format(tf),
sw_scanner(string_fragment::from_str_range(
al.get_string(), lr.lr_start, lr.lr_end))
{
@@ -248,25 +403,62 @@ public:
this->sw_hier_nodes.push_back(std::make_unique<hier_node>());
}
+ bool is_structured_text() const
+ {
+ switch (this->sw_text_format) {
+ case text_format_t::TF_JSON:
+ case text_format_t::TF_YAML:
+ case text_format_t::TF_TOML:
+ case text_format_t::TF_LOG:
+ case text_format_t::TF_UNKNOWN:
+ return true;
+ default:
+ return false;
+ }
+ }
+
metadata walk()
{
metadata_builder mb;
- size_t garbage_count = 0;
- while (garbage_count < 1000) {
- auto tokenize_res = this->sw_scanner.tokenize2();
+ mb.mb_text_format = this->sw_text_format;
+ while (true) {
+ auto tokenize_res
+ = this->sw_scanner.tokenize2(this->sw_text_format);
if (!tokenize_res) {
break;
}
auto dt = tokenize_res->tr_token;
- element el(tokenize_res->tr_token, tokenize_res->tr_capture);
+ element el(dt, tokenize_res->tr_capture);
+ const auto& inner_cap = tokenize_res->tr_inner_capture;
+
+#if 0
+ printf("tok %s %s\n",
+ data_scanner::token2name(dt),
+ tokenize_res->to_string().c_str());
+#endif
+ if (dt != DT_WHITE) {
+ this->sw_at_start = false;
+ }
switch (dt) {
case DT_XML_DECL_TAG:
case DT_XML_EMPTY_TAG:
this->sw_values.emplace_back(el);
break;
+ case DT_COMMENT:
+ this->sw_type_intervals.emplace_back(
+ el.e_capture.c_begin,
+ el.e_capture.c_end,
+ section_types_t::comment);
+ this->sw_line.get_attrs().emplace_back(
+ line_range{
+ this->sw_range.lr_start + el.e_capture.c_begin,
+ this->sw_range.lr_start + el.e_capture.c_end,
+ },
+ VC_ROLE.value(role_t::VCR_COMMENT));
+ break;
case DT_XML_OPEN_TAG:
this->flush_values();
this->sw_interval_state.back().is_start
@@ -274,22 +466,32 @@ public:
this->sw_interval_state.back().is_line_number
= this->sw_line_number;
this->sw_interval_state.back().is_name
- = tokenize_res->to_string();
+ = tokenize_res->to_string_fragment()
+ .to_unquoted_string();
this->sw_depth += 1;
this->sw_interval_state.resize(this->sw_depth + 1);
this->sw_hier_nodes.push_back(
std::make_unique<hier_node>());
+ this->sw_container_tokens.push_back(to_closer(dt));
break;
case DT_XML_CLOSE_TAG: {
auto term = this->flush_values();
if (this->sw_depth > 0) {
- if (term) {
- this->append_child_node(term);
- }
- this->sw_interval_state.pop_back();
- this->sw_hier_stage
- = std::move(this->sw_hier_nodes.back());
- this->sw_hier_nodes.pop_back();
+ auto found = false;
+ do {
+ if (this->sw_container_tokens.back() == dt) {
+ found = true;
+ }
+ if (term) {
+ this->append_child_node(term);
+ term = nonstd::nullopt;
+ }
+ this->sw_interval_state.pop_back();
+ this->sw_hier_stage
+ = std::move(this->sw_hier_nodes.back());
+ this->sw_hier_nodes.pop_back();
+ this->sw_container_tokens.pop_back();
+ } while (!found);
}
this->append_child_node(el.e_capture);
if (this->sw_depth > 0) {
@@ -301,77 +503,196 @@ public:
case DT_H1: {
this->sw_line.get_attrs().emplace_back(
line_range{
- this->sw_range.lr_start + el.e_capture.c_begin + 1,
- this->sw_range.lr_start + el.e_capture.c_end - 1,
+ this->sw_range.lr_start + inner_cap.c_begin,
+ this->sw_range.lr_start + inner_cap.c_end,
+ },
+ VC_ROLE.value(role_t::VCR_H1));
+ this->sw_line_number += 1;
+ break;
+ }
+ case DT_DIFF_FILE_HEADER: {
+ auto sf = this->sw_scanner.to_string_fragment(inner_cap);
+ auto split_res = sf.split_pair(string_fragment::tag1{'\n'});
+ auto file1 = split_res->first.consume_n(4).value();
+ auto file2 = split_res->second.consume_n(4).value();
+ if ((file1 == "/dev/null" || file1.startswith("a/"))
+ && file2.startswith("b/"))
+ {
+ if (file1 != "/dev/null") {
+ file1 = file1.consume_n(2).value();
+ }
+ file2 = file2.consume_n(2).value();
+ }
+ this->sw_line.get_attrs().emplace_back(
+ line_range{
+ this->sw_range.lr_start
+ + tokenize_res->tr_capture.c_begin,
+ this->sw_range.lr_start
+ + tokenize_res->tr_capture.c_begin,
},
VC_ROLE.value(role_t::VCR_H1));
+ if (file1 == "/dev/null" || file1 == file2) {
+ this->sw_line.get_attrs().emplace_back(
+ line_range{
+ this->sw_range.lr_start + file2.sf_begin,
+ this->sw_range.lr_start + file2.sf_end,
+ },
+ VC_ROLE.value(role_t::VCR_H1));
+ } else {
+ this->sw_line.get_attrs().emplace_back(
+ line_range{
+ this->sw_range.lr_start + inner_cap.c_begin,
+ this->sw_range.lr_start + inner_cap.c_end,
+ },
+ VC_ROLE.value(role_t::VCR_H1));
+ }
this->sw_line_number += 2;
break;
}
+ case DT_DIFF_HUNK_HEADING: {
+ this->sw_line.get_attrs().emplace_back(
+ line_range{
+ this->sw_range.lr_start
+ + tokenize_res->tr_capture.c_begin,
+ this->sw_range.lr_start
+ + tokenize_res->tr_capture.c_begin,
+ },
+ VC_ROLE.value(role_t::VCR_H2));
+ this->sw_line.get_attrs().emplace_back(
+ line_range{
+ this->sw_range.lr_start + inner_cap.c_begin,
+ this->sw_range.lr_start + inner_cap.c_end,
+ },
+ VC_ROLE.value(role_t::VCR_H2));
+ this->sw_line_number += 1;
+ break;
+ }
case DT_LCURLY:
case DT_LSQUARE:
case DT_LPAREN: {
- this->flush_values();
- // this->append_child_node(term);
- this->sw_depth += 1;
- this->sw_interval_state.back().is_start
- = el.e_capture.c_begin;
- this->sw_interval_state.back().is_line_number
- = this->sw_line_number;
- this->sw_interval_state.resize(this->sw_depth + 1);
- this->sw_hier_nodes.push_back(
- std::make_unique<hier_node>());
+ if (this->is_structured_text()) {
+ this->flush_values();
+ // this->append_child_node(term);
+ this->sw_depth += 1;
+ this->sw_interval_state.back().is_start
+ = el.e_capture.c_begin;
+ this->sw_interval_state.back().is_line_number
+ = this->sw_line_number;
+ this->sw_interval_state.resize(this->sw_depth + 1);
+ this->sw_hier_nodes.push_back(
+ std::make_unique<hier_node>());
+ this->sw_container_tokens.push_back(to_closer(dt));
+ } else {
+ this->sw_values.emplace_back(el);
+ }
break;
}
case DT_RCURLY:
case DT_RSQUARE:
- case DT_RPAREN: {
- auto term = this->flush_values();
- if (this->sw_depth > 0) {
- this->append_child_node(term);
- this->sw_depth -= 1;
- this->sw_interval_state.pop_back();
- this->sw_hier_stage
- = std::move(this->sw_hier_nodes.back());
- this->sw_hier_nodes.pop_back();
- if (this->sw_interval_state.back().is_start) {
- data_scanner::capture_t obj_cap = {
- static_cast<int>(this->sw_interval_state.back()
- .is_start.value()),
- el.e_capture.c_end,
- };
-
- auto sf
- = this->sw_scanner.to_string_fragment(obj_cap);
- if (!sf.find('\n')) {
- this->sw_hier_stage->hn_named_children.clear();
- this->sw_hier_stage->hn_children.clear();
- while (!this->sw_intervals.empty()
- && this->sw_intervals.back().start
- > obj_cap.c_begin)
- {
- this->sw_intervals.pop_back();
+ case DT_RPAREN:
+ if (this->is_structured_text()
+ && !this->sw_container_tokens.empty()
+ && std::find(this->sw_container_tokens.begin(),
+ this->sw_container_tokens.end(),
+ dt)
+ != this->sw_container_tokens.end())
+ {
+ auto term = this->flush_values();
+ if (this->sw_depth > 0) {
+ auto found = false;
+ do {
+ if (this->sw_container_tokens.back() == dt) {
+ found = true;
}
- }
+ this->append_child_node(term);
+ term = nonstd::nullopt;
+ this->sw_depth -= 1;
+ this->sw_interval_state.pop_back();
+ this->sw_hier_stage
+ = std::move(this->sw_hier_nodes.back());
+ this->sw_hier_nodes.pop_back();
+ if (this->sw_interval_state.back().is_start) {
+ data_scanner::capture_t obj_cap = {
+ static_cast<int>(
+ this->sw_interval_state.back()
+ .is_start.value()),
+ el.e_capture.c_end,
+ };
+
+ auto sf
+ = this->sw_scanner.to_string_fragment(
+ obj_cap);
+ if (!sf.find('\n')) {
+ this->sw_hier_stage->hn_named_children
+ .clear();
+ this->sw_hier_stage->hn_children
+ .clear();
+ while (
+ !this->sw_intervals.empty()
+ && this->sw_intervals.back().start
+ > obj_cap.c_begin)
+ {
+ this->sw_intervals.pop_back();
+ }
+ }
+ }
+ this->sw_container_tokens.pop_back();
+ } while (!found);
}
}
this->sw_values.emplace_back(el);
break;
- }
case DT_COMMA:
- if (this->sw_depth > 0) {
- auto term = this->flush_values();
- this->append_child_node(term);
+ if (this->is_structured_text()) {
+ if (this->sw_depth > 0) {
+ auto term = this->flush_values();
+ this->append_child_node(term);
+ }
+ } else {
+ this->sw_values.emplace_back(el);
}
break;
case DT_LINE:
this->sw_line_number += 1;
+ this->sw_at_start = true;
break;
case DT_WHITE:
+ if (this->sw_at_start) {
+ size_t indent_size = 0;
+
+ for (auto ch : tokenize_res->to_string_fragment()) {
+ if (ch == '\t') {
+ do {
+ indent_size += 1;
+ } while (indent_size % 8);
+ } else {
+ indent_size += 1;
+ }
+ }
+ this->sw_indents.insert(indent_size);
+ this->sw_at_start = false;
+ }
+ break;
+ case DT_ZERO_WIDTH_SPACE:
break;
default:
- if (dt == DT_GARBAGE) {
- garbage_count += 1;
+ if (dt == DT_QUOTED_STRING) {
+ auto quoted_sf = tokenize_res->to_string_fragment();
+
+ if (quoted_sf.find('\n')) {
+ this->sw_type_intervals.emplace_back(
+ el.e_capture.c_begin,
+ el.e_capture.c_end,
+ section_types_t::multiline_string);
+ this->sw_line.get_attrs().emplace_back(
+ line_range{
+ this->sw_range.lr_start
+ + el.e_capture.c_begin,
+ this->sw_range.lr_start
+ + el.e_capture.c_end,
+ },
+ VC_ROLE.value(role_t::VCR_STRING));
+ }
}
this->sw_values.emplace_back(el);
break;
@@ -394,8 +715,31 @@ public:
this->sw_hier_stage->hn_parent = nullptr;
}
+ if (!this->sw_indents.empty()) {
+ auto low_indent_iter = this->sw_indents.begin();
+
+ if (*low_indent_iter == 1) {
+ // adding guides for small indents is noisy, drop for now
+ this->sw_indents.clear();
+ } else {
+ auto lcm = *low_indent_iter;
+
+ for (auto indent_iter = this->sw_indents.begin();
+ indent_iter != this->sw_indents.end();)
+ {
+ if ((*indent_iter % lcm) == 0) {
+ ++indent_iter;
+ } else {
+ indent_iter = this->sw_indents.erase(indent_iter);
+ }
+ }
+ }
+ }
+
mb.mb_root_node = std::move(this->sw_hier_stage);
mb.mb_intervals = std::move(this->sw_intervals);
+ mb.mb_type_intervals = std::move(this->sw_type_intervals);
+ mb.mb_indents = std::move(this->sw_indents);
discover_metadata_int(this->sw_line, mb);
@@ -447,7 +791,7 @@ private:
this->sw_interval_state.back().is_name
= this->sw_scanner
.to_string_fragment(last_key.value())
- .to_string();
+ .to_unquoted_string();
if (!this->sw_interval_state.back().is_name.empty()) {
this->sw_interval_state.back().is_start
= static_cast<ssize_t>(
@@ -487,18 +831,22 @@ private:
auto new_key = ivstate.is_name.empty()
? lnav::document::section_key_t{top_node->hn_children.size()}
: lnav::document::section_key_t{ivstate.is_name};
- this->sw_intervals.emplace_back(iv_start, iv_stop, new_key);
auto* retval = new_node.get();
new_node->hn_parent = top_node;
- new_node->hn_start = this->sw_intervals.back().start;
+ new_node->hn_start = iv_start;
new_node->hn_line_number = ivstate.is_line_number;
- if (!ivstate.is_name.empty()) {
- top_node->hn_named_children.insert({
- ivstate.is_name,
- retval,
- });
+ if (this->sw_depth == 1
+ || new_node->hn_line_number != top_node->hn_line_number)
+ {
+ this->sw_intervals.emplace_back(iv_start, iv_stop, new_key);
+ if (!ivstate.is_name.empty()) {
+ top_node->hn_named_children.insert({
+ ivstate.is_name,
+ retval,
+ });
+ }
+ top_node->hn_children.emplace_back(std::move(new_node));
}
- top_node->hn_children.emplace_back(std::move(new_node));
ivstate.is_start = nonstd::nullopt;
ivstate.is_line_number = 0;
ivstate.is_name.clear();
@@ -506,20 +854,25 @@ private:
attr_line_t& sw_line;
line_range sw_range;
+ text_format_t sw_text_format;
data_scanner sw_scanner;
int sw_depth{0};
size_t sw_line_number{0};
+ bool sw_at_start{true};
+ std::set<size_t> sw_indents;
std::vector<element> sw_values{};
+ std::vector<data_token_t> sw_container_tokens;
std::vector<interval_state> sw_interval_state;
std::vector<lnav::document::section_interval_t> sw_intervals;
+ std::vector<lnav::document::section_type_interval_t> sw_type_intervals;
std::vector<std::unique_ptr<lnav::document::hier_node>> sw_hier_nodes;
std::unique_ptr<lnav::document::hier_node> sw_hier_stage;
};
metadata
-discover_structure(attr_line_t& al, struct line_range lr)
+discover_structure(attr_line_t& al, struct line_range lr, text_format_t tf)
{
- return structure_walker(al, lr).walk();
+ return structure_walker(al, lr, tf).walk();
}
std::vector<breadcrumb::possibility>
@@ -542,3 +895,31 @@ metadata::possibility_provider(const std::vector<section_key_t>& path)
} // namespace document
} // namespace lnav
+
+namespace fmt {
+auto
+formatter<lnav::document::section_key_t>::format(
+ const lnav::document::section_key_t& key,
+ fmt::format_context& ctx) -> decltype(ctx.out()) const
+{
+ return key.match(
+ [this, &ctx](const std::string& str) {
+ return formatter<string_view>::format(str, ctx);
+ },
+ [&ctx](size_t index) {
+ return format_to(ctx.out(), FMT_STRING("{}"), index);
+ });
+}
+
+auto
+formatter<std::vector<lnav::document::section_key_t>>::format(
+ const std::vector<lnav::document::section_key_t>& path,
+ fmt::format_context& ctx) -> decltype(ctx.out()) const
+{
+ for (const auto& part : path) {
+ format_to(ctx.out(), FMT_STRING("\uff1a"));
+ format_to(ctx.out(), FMT_STRING("{}"), part);
+ }
+ return ctx.out();
+}
+} // namespace fmt
diff --git a/src/document.sections.hh b/src/document.sections.hh
index 94cd01a..9129cf5 100644
--- a/src/document.sections.hh
+++ b/src/document.sections.hh
@@ -31,6 +31,7 @@
#define lnav_attr_line_breadcrumbs_hh
#include <map>
+#include <set>
#include <string>
#include <vector>
@@ -40,6 +41,7 @@
#include "intervaltree/IntervalTree.h"
#include "mapbox/variant.hpp"
#include "optional.hpp"
+#include "text_format.hh"
namespace lnav {
namespace document {
@@ -48,6 +50,16 @@ using section_key_t = mapbox::util::variant<std::string, size_t>;
using section_interval_t = interval_tree::Interval<file_off_t, section_key_t>;
using sections_tree_t = interval_tree::IntervalTree<file_off_t, section_key_t>;
+enum class section_types_t {
+ comment,
+ multiline_string,
+};
+
+using section_type_interval_t
+ = interval_tree::Interval<file_off_t, section_types_t>;
+using section_types_tree_t
+ = interval_tree::IntervalTree<file_off_t, section_types_t>;
+
struct hier_node {
hier_node* hn_parent{nullptr};
file_off_t hn_start{0};
@@ -57,6 +69,18 @@ struct hier_node {
nonstd::optional<hier_node*> lookup_child(section_key_t key) const;
+ nonstd::optional<size_t> child_index(const hier_node* hn) const;
+
+ struct child_neighbors_result {
+ nonstd::optional<const hier_node*> cnr_previous;
+ nonstd::optional<const hier_node*> cnr_next;
+ };
+
+ nonstd::optional<child_neighbors_result> child_neighbors(
+ const hier_node* hn, file_off_t offset) const;
+
+ nonstd::optional<child_neighbors_result> line_neighbors(size_t ln) const;
+
nonstd::optional<size_t> find_line_number(const std::string& str) const
{
auto iter = this->hn_named_children.find(str);
@@ -101,6 +125,11 @@ struct hier_node {
struct metadata {
sections_tree_t m_sections_tree;
std::unique_ptr<hier_node> m_sections_root;
+ section_types_tree_t m_section_types_tree;
+ std::set<size_t> m_indents;
+ text_format_t m_text_format{text_format_t::TF_UNKNOWN};
+
+ std::vector<section_key_t> path_for_range(size_t start, size_t stop);
std::vector<breadcrumb::possibility> possibility_provider(
const std::vector<section_key_t>& path);
@@ -108,9 +137,26 @@ struct metadata {
metadata discover_metadata(const attr_line_t& al);
-metadata discover_structure(attr_line_t& al, struct line_range lr);
+metadata discover_structure(attr_line_t& al,
+ struct line_range lr,
+ text_format_t tf = text_format_t::TF_UNKNOWN);
} // namespace document
} // namespace lnav
+namespace fmt {
+template<>
+struct formatter<lnav::document::section_key_t> : formatter<string_view> {
+ auto format(const lnav::document::section_key_t& p, format_context& ctx)
+ -> decltype(ctx.out()) const;
+};
+
+template<>
+struct formatter<std::vector<lnav::document::section_key_t>>
+ : formatter<string_view> {
+ auto format(const std::vector<lnav::document::section_key_t>& p,
+ format_context& ctx) -> decltype(ctx.out()) const;
+};
+} // namespace fmt
+
#endif
diff --git a/src/dump_internals.cc b/src/dump_internals.cc
index 8317769..fe4904d 100644
--- a/src/dump_internals.cc
+++ b/src/dump_internals.cc
@@ -29,6 +29,7 @@
#include "dump_internals.hh"
+#include "bound_tags.hh"
#include "lnav.events.hh"
#include "lnav.hh"
#include "lnav_config.hh"
@@ -42,6 +43,9 @@ namespace lnav {
void
dump_internals(const char* internals_dir)
{
+ static const auto* sql_cmd_map
+ = injector::get<readline_context::command_map_t*, sql_cmd_map_tag>();
+
for (const auto* handlers :
std::initializer_list<const json_path_container*>{
&lnav_config_handlers,
@@ -77,16 +81,23 @@ dump_internals(const char* internals_dir)
auto sql_ref_path = ghc::filesystem::path(internals_dir) / "sql-ref.rst";
auto sql_file = std::unique_ptr<FILE, decltype(&fclose)>(
fopen(sql_ref_path.c_str(), "w+"), fclose);
- std::set<help_text*> unique_sql_help;
+ std::set<const help_text*> unique_sql_help;
if (sql_file != nullptr) {
- for (auto& sql : sqlite_function_help) {
+ for (const auto& sql : sqlite_function_help) {
if (unique_sql_help.find(sql.second) != unique_sql_help.end()) {
continue;
}
unique_sql_help.insert(sql.second);
format_help_text_for_rst(*sql.second, eval_example, sql_file.get());
}
+ for (const auto& cmd_pair : *sql_cmd_map) {
+ if (cmd_pair.second->c_help.ht_name == nullptr) {
+ continue;
+ }
+ format_help_text_for_rst(
+ cmd_pair.second->c_help, eval_example, sql_file.get());
+ }
}
}
diff --git a/src/elem_to_json.cc b/src/elem_to_json.cc
index 4b04dfb..fc05424 100644
--- a/src/elem_to_json.cc
+++ b/src/elem_to_json.cc
@@ -27,8 +27,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <algorithm>
-
#include "elem_to_json.hh"
#include "base/itertools.hh"
@@ -43,7 +41,11 @@ element_to_json(yajl_gen gen, data_parser& dp, const data_parser::element& elem)
switch (elem.value_token()) {
case DT_NUMBER: {
- yajl_gen_number(gen, value_str, value_len);
+ auto leading_plus = value_str[0] == '+';
+
+ yajl_gen_number(gen,
+ leading_plus ? value_str + 1 : value_str,
+ leading_plus ? value_len - 1 : value_len);
break;
}
case DNT_GROUP: {
@@ -51,6 +53,11 @@ element_to_json(yajl_gen gen, data_parser& dp, const data_parser::element& elem)
gen, dp, elem.get_value_elem().e_sub_elements, false);
break;
}
+ case DNT_MEASUREMENT: {
+ elements_to_json(
+ gen, dp, elem.get_value_elem().e_sub_elements, false);
+ break;
+ }
case DNT_PAIR: {
const data_parser::element& pair_elem = elem.get_pair_elem();
const auto key_str
diff --git a/src/environ_vtab.cc b/src/environ_vtab.cc
index 1265f4c..168935c 100644
--- a/src/environ_vtab.cc
+++ b/src/environ_vtab.cc
@@ -46,6 +46,8 @@ CREATE TABLE environ (
);
)";
+namespace {
+
struct env_vtab {
sqlite3_vtab base;
sqlite3* db;
@@ -71,7 +73,7 @@ vt_create(sqlite3* db,
/* Allocate the sqlite3_vtab/vtab structure itself */
p_vt = (env_vtab*) sqlite3_malloc(sizeof(*p_vt));
- if (p_vt == NULL) {
+ if (p_vt == nullptr) {
return SQLITE_NOMEM;
}
@@ -126,11 +128,11 @@ vt_open(sqlite3_vtab* p_svt, sqlite3_vtab_cursor** pp_cursor)
{
env_vtab* p_vt = (env_vtab*) p_svt;
- p_vt->base.zErrMsg = NULL;
+ p_vt->base.zErrMsg = nullptr;
env_vtab_cursor* p_cur = (env_vtab_cursor*) new env_vtab_cursor();
- if (p_cur == NULL) {
+ if (p_cur == nullptr) {
return SQLITE_NOMEM;
} else {
*pp_cursor = (sqlite3_vtab_cursor*) p_cur;
@@ -158,7 +160,7 @@ vt_eof(sqlite3_vtab_cursor* cur)
{
env_vtab_cursor* vc = (env_vtab_cursor*) cur;
- return vc->env_cursor[0] == NULL;
+ return vc->env_cursor[0] == nullptr;
}
static int
@@ -166,7 +168,7 @@ vt_next(sqlite3_vtab_cursor* cur)
{
env_vtab_cursor* vc = (env_vtab_cursor*) cur;
- if (vc->env_cursor[0] != NULL) {
+ if (vc->env_cursor[0] != nullptr) {
vc->env_cursor += 1;
}
@@ -309,26 +311,28 @@ static sqlite3_module vtab_module = {
vt_column, /* xColumn - read data */
vt_rowid, /* xRowid - read data */
vt_update, /* xUpdate - write data */
- NULL, /* xBegin - begin transaction */
- NULL, /* xSync - sync transaction */
- NULL, /* xCommit - commit transaction */
- NULL, /* xRollback - rollback transaction */
- NULL, /* xFindFunction - function overloading */
+ nullptr, /* xBegin - begin transaction */
+ nullptr, /* xSync - sync transaction */
+ nullptr, /* xCommit - commit transaction */
+ nullptr, /* xRollback - rollback transaction */
+ nullptr, /* xFindFunction - function overloading */
};
+} // namespace
+
int
register_environ_vtab(sqlite3* db)
{
auto_mem<char, sqlite3_free> errmsg;
int rc;
- rc = sqlite3_create_module(db, "environ_vtab_impl", &vtab_module, NULL);
+ rc = sqlite3_create_module(db, "environ_vtab_impl", &vtab_module, nullptr);
ensure(rc == SQLITE_OK);
if ((rc = sqlite3_exec(
db,
"CREATE VIRTUAL TABLE environ USING environ_vtab_impl()",
- NULL,
- NULL,
+ nullptr,
+ nullptr,
errmsg.out()))
!= SQLITE_OK)
{
diff --git a/src/extension-functions.cc b/src/extension-functions.cc
index 461a382..e3ab985 100644
--- a/src/extension-functions.cc
+++ b/src/extension-functions.cc
@@ -106,7 +106,7 @@ Original code 2006 June 05 by relicoder.
*/
-//#include "config.h"
+// #include "config.h"
// #define COMPILE_SQLITE_EXTENSIONS_AS_LOADABLE_MODULE 1
#define HAVE_ACOSH 1
@@ -2550,6 +2550,7 @@ common_extension_functions(struct FuncDef** basic_funcs,
reverseFunc,
help_text("reverse")
.sql_function()
+ .with_prql_path({"text", "reverse"})
.with_summary("Returns the reverse of the given string.")
.with_parameter({"str", "The string to reverse."})
.with_tags({"string"})
diff --git a/src/field_overlay_source.cc b/src/field_overlay_source.cc
index ad4c312..821a8b9 100644
--- a/src/field_overlay_source.cc
+++ b/src/field_overlay_source.cc
@@ -29,27 +29,33 @@
#include "field_overlay_source.hh"
-#include "base/ansi_scrubber.hh"
#include "base/humanize.time.hh"
#include "base/snippet_highlighters.hh"
+#include "command_executor.hh"
#include "config.h"
+#include "log.annotate.hh"
#include "log_format_ext.hh"
#include "log_vtab_impl.hh"
#include "md2attr_line.hh"
+#include "ptimec.hh"
#include "readline_highlighters.hh"
-#include "relative_time.hh"
#include "vtab_module.hh"
#include "vtab_module_json.hh"
+using namespace md4cpp::literals;
+using namespace lnav::roles::literals;
+
json_string extract(const char* str);
void
-field_overlay_source::build_field_lines(const listview_curses& lv)
+field_overlay_source::build_field_lines(const listview_curses& lv,
+ vis_line_t row)
{
auto& lss = this->fos_lss;
auto& vc = view_colors::singleton();
this->fos_lines.clear();
+ this->fos_row_to_field_meta.clear();
if (lss.text_line_count() == 0) {
this->fos_log_helper.clear();
@@ -57,7 +63,7 @@ field_overlay_source::build_field_lines(const listview_curses& lv)
return;
}
- content_line_t cl = lss.at(lv.get_selection());
+ content_line_t cl = lss.at(row);
std::shared_ptr<logfile> file = lss.find(cl);
auto ll = file->begin() + cl;
auto format = file->get_format();
@@ -72,13 +78,11 @@ field_overlay_source::build_field_lines(const listview_curses& lv)
display = display || this->fos_contexts.top().c_show;
}
- this->build_meta_line(lv, this->fos_lines, lv.get_top());
-
if (!display) {
return;
}
- if (!this->fos_log_helper.parse_line(lv.get_selection())) {
+ if (!this->fos_log_helper.parse_line(row)) {
return;
}
@@ -132,7 +136,7 @@ field_overlay_source::build_field_lines(const listview_curses& lv)
time_lr.lr_end = time_str.length();
time_line.with_attr(
string_attr(time_lr, VC_STYLE.value(text_attrs{A_BOLD})));
- time_str.append(" -- ");
+ time_str.append(" \u2014 ");
time_lr.lr_start = time_str.length();
time_str.append(humanize::time::point::from_tv(ll->get_timeval())
.with_convert_to_local(true)
@@ -155,14 +159,13 @@ field_overlay_source::build_field_lines(const listview_curses& lv)
dts.set_base_time(format->lf_date_time.dts_base_time,
format->lf_date_time.dts_base_tm.et_tm);
+ dts.dts_zoned_to_local = format->lf_date_time.dts_zoned_to_local;
if (format->lf_date_time.scan(time_src,
time_range.length(),
format->get_timestamp_formats(),
&tm,
- actual_tv,
- false)
- || dts.scan(
- time_src, time_range.length(), nullptr, &tm, actual_tv, false))
+ actual_tv)
+ || dts.scan(time_src, time_range.length(), nullptr, &tm, actual_tv))
{
sql_strftime(
orig_timestamp, sizeof(orig_timestamp), actual_tv, 'T');
@@ -210,10 +213,15 @@ field_overlay_source::build_field_lines(const listview_curses& lv)
time_line.append(" Format: ")
.append(lnav::roles::symbol(
ts_formats[format->lf_date_time.dts_fmt_lock]));
+ if (format->lf_date_time.dts_default_zone != nullptr) {
+ time_line.append(" Default Zone: ")
+ .append(lnav::roles::symbol(
+ format->lf_date_time.dts_default_zone->name()));
+ }
}
if ((!this->fos_contexts.empty() && this->fos_contexts.top().c_show)
- || diff_tv.tv_sec > 0)
+ || diff_tv.tv_sec > 0 || ll->is_time_skewed())
{
this->fos_lines.emplace_back(time_line);
}
@@ -228,11 +236,16 @@ field_overlay_source::build_field_lines(const listview_curses& lv)
}
this->fos_unknown_key_size = 0;
- for (auto& ldh_line_value : this->fos_log_helper.ldh_line_values.lvv_values)
+ for (const auto& ldh_line_value :
+ this->fos_log_helper.ldh_line_values.lvv_values)
{
auto& meta = ldh_line_value.lv_meta;
int this_key_size = meta.lvm_name.size();
+ if (!meta.lvm_column.is<logline_value_meta::table_column>()) {
+ continue;
+ }
+
if (!this->fos_contexts.empty()) {
this_key_size += this->fos_contexts.top().c_prefix.length();
}
@@ -280,16 +293,21 @@ field_overlay_source::build_field_lines(const listview_curses& lv)
const log_format* last_format = nullptr;
- for (auto& lv : this->fos_log_helper.ldh_line_values.lvv_values) {
- if (!lv.lv_meta.lvm_format) {
+ for (const auto& lv : this->fos_log_helper.ldh_line_values.lvv_values) {
+ const auto& meta = lv.lv_meta;
+ if (!meta.lvm_format) {
+ continue;
+ }
+
+ if (!meta.lvm_column.is<logline_value_meta::table_column>()) {
continue;
}
- auto* curr_format = lv.lv_meta.lvm_format.value();
+ auto* curr_format = meta.lvm_format.value();
auto* curr_elf = dynamic_cast<external_log_format*>(curr_format);
const auto format_name = curr_format->get_name().to_string();
attr_line_t al;
- std::string str, value_str = lv.to_string();
+ std::string value_str = lv.to_string();
if (curr_format != last_format) {
this->fos_lines.emplace_back(" Known message fields for table "
@@ -302,86 +320,106 @@ field_overlay_source::build_field_lines(const listview_curses& lv)
}
std::string field_name, orig_field_name;
- if (lv.lv_meta.lvm_struct_name.empty()) {
- if (curr_elf && curr_elf->elf_body_field == lv.lv_meta.lvm_name) {
+ line_range hl_range;
+ al.append(" ").append("|", VC_GRAPHIC.value(ACS_LTEE)).append(" ");
+ if (meta.lvm_struct_name.empty()) {
+ if (curr_elf && curr_elf->elf_body_field == meta.lvm_name) {
field_name = LOG_BODY;
} else if (curr_elf
- && curr_elf->lf_timestamp_field == lv.lv_meta.lvm_name)
+ && curr_elf->lf_timestamp_field == meta.lvm_name)
{
field_name = LOG_TIME;
} else {
- field_name = lv.lv_meta.lvm_name.to_string();
+ field_name = meta.lvm_name.to_string();
}
orig_field_name = field_name;
if (!this->fos_contexts.empty()) {
field_name = this->fos_contexts.top().c_prefix + field_name;
}
- str = " " + field_name;
- } else {
- auto_mem<char, sqlite3_free> jgetter;
+ if (meta.is_hidden()) {
+ al.append("\u25c7"_comment);
+ } else {
+ al.append("\u25c6"_ok);
+ }
+ al.append(" ");
+
+ switch (meta.to_chart_type()) {
+ case chart_type_t::none:
+ al.append(" ");
+ break;
+ case chart_type_t::hist:
+ case chart_type_t::spectro:
+ al.append(":bar_chart:"_emoji).append(" ");
+ break;
+ }
+ auto prefix_len = al.utf8_length_or_length();
+ hl_range.lr_start = al.get_string().length();
+ al.append(field_name);
+ hl_range.lr_end = al.get_string().length();
+ al.pad_to(prefix_len + this->fos_known_key_size);
- jgetter = sqlite3_mprintf(" jget(%s, '/%q')",
- lv.lv_meta.lvm_struct_name.get(),
- lv.lv_meta.lvm_name.get());
- str = jgetter;
- }
- str.append(this->fos_known_key_size - (str.length() - 3), ' ');
- str += " = " + value_str;
-
- al.with_string(str);
- if (lv.lv_meta.lvm_struct_name.empty()) {
- auto prefix_len = field_name.length() - orig_field_name.length();
- al.with_attr(string_attr(
- line_range(3 + prefix_len, 3 + prefix_len + field_name.size()),
- VC_STYLE.value(vc.attrs_for_ident(orig_field_name))));
+ this->fos_row_to_field_meta.emplace(this->fos_lines.size(), meta);
} else {
- al.with_attr(string_attr(
- line_range(8, 8 + lv.lv_meta.lvm_struct_name.size()),
- VC_STYLE.value(
- vc.attrs_for_ident(lv.lv_meta.lvm_struct_name))));
+ auto jget_str = lnav::sql::mprintf("jget(%s, '/%q')",
+ meta.lvm_struct_name.get(),
+ meta.lvm_name.get());
+ hl_range.lr_start = al.get_string().length();
+ al.append(jget_str.in());
+ hl_range.lr_end = al.get_string().length();
}
+ readline_sqlite_highlighter_int(al, -1, hl_range);
+
+ al.append(" = ").append(scrub_ws(value_str.c_str()));
this->fos_lines.emplace_back(al);
- this->add_key_line_attrs(this->fos_known_key_size);
- if (lv.lv_meta.lvm_kind == value_kind_t::VALUE_STRUCT) {
+ if (meta.lvm_kind == value_kind_t::VALUE_STRUCT) {
json_string js = extract(value_str.c_str());
al.clear()
.append(" extract(")
- .append(lv.lv_meta.lvm_name.get(),
- VC_STYLE.value(vc.attrs_for_ident(lv.lv_meta.lvm_name)))
+ .append(meta.lvm_name.get(),
+ VC_STYLE.value(vc.attrs_for_ident(meta.lvm_name)))
.append(")")
- .append(this->fos_known_key_size - lv.lv_meta.lvm_name.size()
- - 9 + 3,
+ .append(this->fos_known_key_size - meta.lvm_name.size() - 9 + 3,
' ')
.append(" = ")
- .append(
- string_fragment::from_bytes(js.js_content.in(), js.js_len));
+ .append(scrub_ws(string_fragment::from_bytes(js.js_content.in(),
+ js.js_len)));
this->fos_lines.emplace_back(al);
this->add_key_line_attrs(this->fos_known_key_size);
}
}
- std::map<const intern_string_t, json_ptr_walk::walk_list_t>::iterator
- json_iter;
-
- if (!this->fos_log_helper.ldh_json_pairs.empty()) {
+ if (!this->fos_log_helper.ldh_extra_json.empty()
+ || !this->fos_log_helper.ldh_json_pairs.empty())
+ {
this->fos_lines.emplace_back(" JSON fields:");
}
- for (json_iter = this->fos_log_helper.ldh_json_pairs.begin();
- json_iter != this->fos_log_helper.ldh_json_pairs.end();
- ++json_iter)
- {
- json_ptr_walk::walk_list_t& jpairs = json_iter->second;
+ for (const auto& extra_pair : this->fos_log_helper.ldh_extra_json) {
+ auto qname = lnav::sql::mprintf("%Q", extra_pair.first.c_str());
+ auto key_line = attr_line_t(" jget(log_raw_text, ")
+ .append(qname.in())
+ .append(")");
+ readline_sqlite_highlighter(key_line, 0);
+ auto key_size = key_line.length();
+ key_line.append(" = ").append(scrub_ws(extra_pair.second));
+ this->fos_lines.emplace_back(key_line);
+ this->add_key_line_attrs(key_size - 3);
+ }
+
+ for (const auto& jpairs_map : this->fos_log_helper.ldh_json_pairs) {
+ const auto& jpairs = jpairs_map.second;
for (size_t lpc = 0; lpc < jpairs.size(); lpc++) {
- this->fos_lines.emplace_back(
- " "
- + this->fos_log_helper.format_json_getter(json_iter->first, lpc)
- + " = " + jpairs[lpc].wt_value);
- this->add_key_line_attrs(0);
+ auto key_line = attr_line_t(" ").append(
+ this->fos_log_helper.format_json_getter(jpairs_map.first, lpc));
+ readline_sqlite_highlighter(key_line, 0);
+ auto key_size = key_line.length();
+ key_line.append(" = ").append(scrub_ws(jpairs[lpc].wt_value));
+ this->fos_lines.emplace_back(key_line);
+ this->add_key_line_attrs(key_size - 3);
}
}
@@ -390,28 +428,26 @@ field_overlay_source::build_field_lines(const listview_curses& lv)
}
for (const auto& xml_pair : this->fos_log_helper.ldh_xml_pairs) {
- auto_mem<char, sqlite3_free> qname;
- auto_mem<char, sqlite3_free> xp_call;
-
- qname = sql_quote_ident(xml_pair.first.first.get());
- xp_call = sqlite3_mprintf(
- "xpath(%Q, %s)", xml_pair.first.second.c_str(), qname.in());
- this->fos_lines.emplace_back(fmt::format(
- FMT_STRING(" {} = {}"), xp_call.in(), xml_pair.second));
- this->add_key_line_attrs(0);
- }
-
- if (!this->fos_contexts.empty()
- && !this->fos_contexts.top().c_show_discovered)
- {
- return;
+ auto qname = sql_quote_ident(xml_pair.first.first.get());
+ auto xp_call = lnav::sql::mprintf(
+ "xpath(%Q, %s.%s)",
+ xml_pair.first.second.c_str(),
+ this->fos_log_helper.ldh_file->get_format()->get_name().c_str(),
+ qname.in());
+ auto key_line = attr_line_t(" ").append(xp_call.in());
+ readline_sqlite_highlighter(key_line, 0);
+ auto key_size = key_line.length();
+ key_line.append(" = ").append(scrub_ws(xml_pair.second));
+ this->fos_lines.emplace_back(key_line);
+ this->add_key_line_attrs(key_size - 3);
}
if (this->fos_log_helper.ldh_parser->dp_pairs.empty()) {
this->fos_lines.emplace_back(" No discovered message fields");
} else {
this->fos_lines.emplace_back(
- " Discovered fields for logline table from message format: ");
+ " Discovered fields for logline table from message "
+ "format: ");
this->fos_lines.back().with_attr(
string_attr(line_range(23, 23 + 7),
VC_STYLE.value(vc.attrs_for_ident("logline"))));
@@ -450,13 +486,43 @@ field_overlay_source::build_meta_line(const listview_curses& lv,
{
auto line_meta_opt = this->fos_lss.find_bookmark_metadata(row);
+ if (!this->fos_contexts.empty()
+ && this->fos_contexts.top().c_show_applicable_annotations)
+ {
+ auto file_and_line = this->fos_lss.find_line_with_file(row);
+
+ if (file_and_line && !file_and_line->second->is_continued()) {
+ auto applicable_anno = lnav::log::annotate::applicable(row);
+ if (!applicable_anno.empty()
+ && (!line_meta_opt
+ || line_meta_opt.value()->bm_annotations.la_pairs.empty()))
+ {
+ auto anno_msg
+ = attr_line_t(" ")
+ .append(":memo:"_emoji)
+ .append(" Annotations available, ")
+ .append(lv.get_selection() == row
+ ? "use "
+ : "focus on this line and use ")
+ .append(":annotate"_quoted_code)
+ .append(" to apply them")
+ .append(lv.get_selection() == row ? " to this line"
+ : "")
+ .with_attr_for_all(
+ VC_ROLE.value(role_t::VCR_COMMENT));
+
+ dst.emplace_back(anno_msg);
+ }
+ }
+ }
+
if (!line_meta_opt) {
return;
}
+ const auto* tc = dynamic_cast<const textview_curses*>(&lv);
auto& vc = view_colors::singleton();
const auto& line_meta = *(line_meta_opt.value());
size_t filename_width = this->fos_lss.get_filename_offset();
- const auto* tc = dynamic_cast<const textview_curses*>(&lv);
if (!line_meta.bm_comment.empty()) {
const auto* lead = line_meta.bm_tags.empty() ? " \u2514 " : " \u251c ";
@@ -474,6 +540,9 @@ field_overlay_source::build_meta_line(const listview_curses& lv,
}
auto comment_lines = al.rtrim().split_lines();
+ if (comment_lines.back().empty()) {
+ comment_lines.pop_back();
+ }
for (size_t lpc = 0; lpc < comment_lines.size(); lpc++) {
auto& comment_line = comment_lines[lpc];
@@ -524,12 +593,63 @@ field_overlay_source::build_meta_line(const listview_curses& lv,
}
dst.emplace_back(al);
}
+ if (!line_meta.bm_annotations.la_pairs.empty()) {
+ for (const auto& anno_pair : line_meta.bm_annotations.la_pairs) {
+ attr_line_t al;
+ md2attr_line mdal;
+
+ dst.push_back(
+ attr_line_t()
+ .append(filename_width, ' ')
+ .appendf(FMT_STRING(" \u251c {}:"), anno_pair.first)
+ .with_attr_for_all(VC_ROLE.value(role_t::VCR_COMMENT)));
+
+ auto parse_res = md4cpp::parse(anno_pair.second, mdal);
+ if (parse_res.isOk()) {
+ al.append(parse_res.unwrap());
+ } else {
+ log_error("%d: cannot convert annotation to markdown: %s",
+ (int) row,
+ parse_res.unwrapErr().c_str());
+ al.append(anno_pair.second);
+ }
+
+ auto anno_lines = al.rtrim().split_lines();
+ if (anno_lines.back().empty()) {
+ anno_lines.pop_back();
+ }
+ for (size_t lpc = 0; lpc < anno_lines.size(); lpc++) {
+ auto& anno_line = anno_lines[lpc];
+
+ if (lpc == 0 && anno_line.empty()) {
+ continue;
+ }
+ // anno_line.with_attr_for_all(VC_ROLE.value(role_t::VCR_COMMENT));
+ anno_line.insert(0,
+ lpc == anno_lines.size() - 1
+ ? " \u2570 "_comment
+ : " \u2502 "_comment);
+ anno_line.insert(0, filename_width, ' ');
+ if (tc != nullptr) {
+ auto hl = tc->get_highlights();
+ auto hl_iter
+ = hl.find({highlight_source_t::PREVIEW, "search"});
+
+ if (hl_iter != hl.end()) {
+ hl_iter->second.annotate(anno_line, filename_width);
+ }
+ }
+
+ dst.emplace_back(anno_line);
+ }
+ }
+ }
}
void
field_overlay_source::add_key_line_attrs(int key_size, bool last_line)
{
- string_attrs_t& sa = this->fos_lines.back().get_attrs();
+ auto& sa = this->fos_lines.back().get_attrs();
struct line_range lr(1, 2);
int64_t graphic = (int64_t) (last_line ? ACS_LLCORNER : ACS_LTEE);
sa.emplace_back(lr, VC_GRAPHIC.value(graphic));
@@ -539,36 +659,51 @@ field_overlay_source::add_key_line_attrs(int key_size, bool last_line)
sa.emplace_back(lr, VC_STYLE.value(text_attrs{A_BOLD}));
}
-bool
-field_overlay_source::list_value_for_overlay(const listview_curses& lv,
- int y,
- int bottom,
- vis_line_t row,
- attr_line_t& value_out)
+void
+field_overlay_source::list_value_for_overlay(
+ const listview_curses& lv,
+ vis_line_t row,
+ std::vector<attr_line_t>& value_out)
{
- if (y == 0) {
- this->build_field_lines(lv);
- return false;
- }
-
- if (1 <= y && y <= (int) this->fos_lines.size()) {
- value_out = this->fos_lines[y - 1];
- return true;
- }
-
- if (!this->fos_meta_lines.empty() && this->fos_meta_lines_row == row - 1_vl)
- {
- value_out = this->fos_meta_lines.front();
- this->fos_meta_lines.erase(this->fos_meta_lines.begin());
-
- return true;
+ if (row == lv.get_selection()) {
+ this->build_field_lines(lv, row);
+ value_out = this->fos_lines;
}
+ this->build_meta_line(lv, value_out, row);
+}
- if (row < lv.get_inner_height()) {
- this->fos_meta_lines.clear();
- this->build_meta_line(lv, this->fos_meta_lines, row);
- this->fos_meta_lines_row = row;
+nonstd::optional<attr_line_t>
+field_overlay_source::list_header_for_overlay(const listview_curses& lv,
+ vis_line_t vl)
+{
+ attr_line_t retval;
+
+ retval.append(this->fos_lss.get_filename_offset(), ' ');
+ if (this->fos_contexts.top().c_show) {
+ retval
+ .appendf(FMT_STRING("\u258C Line {:L} parser details. "
+ "Press "),
+ (int) vl)
+ .append("p"_hotkey)
+ .append(" to hide this panel.");
+ } else {
+ retval.append("\u258C Line ")
+ .append(
+ lnav::roles::number(fmt::format(FMT_STRING("{:L}"), (int) vl)))
+ .append(" metadata");
+ }
+
+ if (lv.get_overlay_selection()) {
+ retval.append(" ")
+ .append("SPC"_hotkey)
+ .append(": hide/show field ")
+ .append("Esc"_hotkey)
+ .append(": exit this panel");
+ } else {
+ retval.append(" Press ")
+ .append("CTRL-]"_hotkey)
+ .append(" to focus on this panel");
}
- return false;
+ return retval;
}
diff --git a/src/field_overlay_source.hh b/src/field_overlay_source.hh
index ab1d17f..34410fc 100644
--- a/src/field_overlay_source.hh
+++ b/src/field_overlay_source.hh
@@ -36,51 +36,72 @@
#include "listview_curses.hh"
#include "log_data_helper.hh"
#include "logfile_sub_source.hh"
+#include "text_overlay_menu.hh"
#include "textfile_sub_source.hh"
-class field_overlay_source : public list_overlay_source {
+class field_overlay_source : public text_overlay_menu {
public:
explicit field_overlay_source(logfile_sub_source& lss,
textfile_sub_source& tss)
- : fos_lss(lss), fos_tss(tss), fos_log_helper(lss)
+ : fos_lss(lss), fos_log_helper(lss)
{
}
void add_key_line_attrs(int key_size, bool last_line = false);
- bool list_value_for_overlay(const listview_curses& lv,
- int y,
- int bottom,
+ void reset() override
+ {
+ this->fos_lines.clear();
+ this->fos_meta_lines.clear();
+ }
+
+ nonstd::optional<attr_line_t> list_header_for_overlay(
+ const listview_curses& lv, vis_line_t vl) override;
+
+ void list_value_for_overlay(const listview_curses& lv,
vis_line_t row,
- attr_line_t& value_out) override;
+ std::vector<attr_line_t>& value_out) override;
- void build_field_lines(const listview_curses& lv);
+ void build_field_lines(const listview_curses& lv, vis_line_t row);
void build_meta_line(const listview_curses& lv,
std::vector<attr_line_t>& dst,
vis_line_t row);
+ void set_show_details_in_overlay(bool val) override
+ {
+ this->fos_contexts.top().c_show = val;
+ }
+
+ bool get_show_details_in_overlay() const override
+ {
+ return this->fos_contexts.top().c_show;
+ }
+
struct context {
- context(std::string prefix, bool show, bool show_discovered)
+ context(std::string prefix,
+ bool show,
+ bool show_discovered,
+ bool show_applicable_annotations)
: c_prefix(std::move(prefix)), c_show(show),
- c_show_discovered(show_discovered)
+ c_show_discovered(show_discovered),
+ c_show_applicable_annotations(show_applicable_annotations)
{
}
std::string c_prefix;
bool c_show{false};
bool c_show_discovered{true};
+ bool c_show_applicable_annotations{true};
};
- bool fos_show_status{true};
std::stack<context> fos_contexts;
logfile_sub_source& fos_lss;
- textfile_sub_source& fos_tss;
log_data_helper fos_log_helper;
int fos_known_key_size{0};
int fos_unknown_key_size{0};
std::vector<attr_line_t> fos_lines;
- vis_line_t fos_meta_lines_row{0_vl};
std::vector<attr_line_t> fos_meta_lines;
+ std::map<size_t, logline_value_meta> fos_row_to_field_meta;
};
#endif // LNAV_FIELD_OVERLAY_SOURCE_H
diff --git a/src/file_collection.cc b/src/file_collection.cc
index 19e71c2..96ec69d 100644
--- a/src/file_collection.cc
+++ b/src/file_collection.cc
@@ -35,21 +35,29 @@
#include <glob.h>
+#include "base/fs_util.hh"
#include "base/humanize.network.hh"
#include "base/isc.hh"
#include "base/itertools.hh"
#include "base/opt_util.hh"
#include "base/string_util.hh"
#include "config.h"
-#include "lnav_util.hh"
+#include "file_converter_manager.hh"
#include "logfile.hh"
-#include "pcap_manager.hh"
#include "service_tags.hh"
#include "tailer/tailer.looper.hh"
static std::mutex REALPATH_CACHE_MUTEX;
static std::unordered_map<std::string, std::string> REALPATH_CACHE;
+void
+child_poller::send_sigint()
+{
+ if (this->cp_child) {
+ kill(this->cp_child->in(), SIGINT);
+ }
+}
+
child_poll_result_t
child_poller::poll(file_collection& fc)
{
@@ -72,6 +80,38 @@ child_poller::poll(file_collection& fc)
});
}
+file_collection::limits_t::limits_t()
+{
+ static constexpr rlim_t RESERVED_FDS = 32;
+
+ struct rlimit rl;
+
+ if (getrlimit(RLIMIT_NOFILE, &rl) == 0) {
+ this->l_fds = rl.rlim_cur;
+ } else {
+ log_error("getrlimit() failed -- %s", strerror(errno));
+
+ this->l_fds = 8192;
+ }
+
+ if (this->l_fds < RESERVED_FDS) {
+ this->l_open_files = this->l_fds;
+ } else {
+ this->l_open_files = this->l_fds - RESERVED_FDS;
+ }
+
+ log_info(
+ "fd limit: %zu; open file limit: %zu", this->l_fds, this->l_open_files);
+}
+
+const file_collection::limits_t&
+file_collection::get_limits()
+{
+ static const limits_t INSTANCE;
+
+ return INSTANCE;
+}
+
void
file_collection::close_files(const std::vector<std::shared_ptr<logfile>>& files)
{
@@ -116,25 +156,28 @@ file_collection::regenerate_unique_file_names()
upg.generate();
this->fc_largest_path_length = 0;
- for (const auto& pair : this->fc_name_to_errors) {
- auto path = ghc::filesystem::path(pair.first).filename().string();
+ {
+ safe::ReadAccess<safe_name_to_errors> errs(*this->fc_name_to_errors);
+
+ for (const auto& pair : *errs) {
+ auto path = ghc::filesystem::path(pair.first).filename().string();
- if (path.length() > this->fc_largest_path_length) {
- this->fc_largest_path_length = path.length();
+ if (path.length() > this->fc_largest_path_length) {
+ this->fc_largest_path_length = path.length();
+ }
}
}
for (const auto& lf : this->fc_files) {
const auto& path = lf->get_unique_path();
- if (path.length() > this->fc_largest_path_length) {
- this->fc_largest_path_length = path.length();
+ if (path.native().length() > this->fc_largest_path_length) {
+ this->fc_largest_path_length = path.native().length();
}
}
for (const auto& pair : this->fc_other_files) {
switch (pair.second.ofd_format) {
case file_format_t::UNKNOWN:
case file_format_t::ARCHIVE:
- case file_format_t::PCAP:
case file_format_t::SQLITE_DB: {
auto bn = ghc::filesystem::path(pair.first).filename().string();
if (bn.length() > this->fc_largest_path_length) {
@@ -155,19 +198,31 @@ file_collection::regenerate_unique_file_names()
void
file_collection::merge(file_collection& other)
{
+ bool do_regen = !other.fc_files.empty() || !other.fc_other_files.empty()
+ || !other.fc_name_to_errors->readAccess()->empty();
+
this->fc_recursive = this->fc_recursive || other.fc_recursive;
this->fc_rotated = this->fc_rotated || other.fc_rotated;
this->fc_synced_files.insert(other.fc_synced_files.begin(),
other.fc_synced_files.end());
- this->fc_name_to_errors.insert(other.fc_name_to_errors.begin(),
- other.fc_name_to_errors.end());
- this->fc_file_names.insert(
- std::make_move_iterator(other.fc_file_names.begin()),
- std::make_move_iterator(other.fc_file_names.end()));
+
+ std::map<std::string, file_error_info> new_errors;
+ {
+ safe::ReadAccess<safe_name_to_errors> errs(*other.fc_name_to_errors);
+
+ new_errors.insert(errs->cbegin(), errs->cend());
+ }
+ {
+ safe::WriteAccess<safe_name_to_errors> errs(*this->fc_name_to_errors);
+
+ errs->insert(new_errors.begin(), new_errors.end());
+ }
+ this->fc_file_names.insert(other.fc_file_names.begin(),
+ other.fc_file_names.end());
if (!other.fc_files.empty()) {
for (const auto& lf : other.fc_files) {
- this->fc_name_to_errors.erase(lf->get_filename());
+ this->fc_name_to_errors->writeAccess()->erase(lf->get_filename());
}
this->fc_files.insert(
this->fc_files.end(), other.fc_files.begin(), other.fc_files.end());
@@ -187,13 +242,17 @@ file_collection::merge(file_collection& other)
std::make_move_iterator(other.fc_child_pollers.end()));
other.fc_child_pollers.clear();
}
+
+ if (do_regen) {
+ this->regenerate_unique_file_names();
+ }
}
/**
* Functor used to compare files based on their device and inode number.
*/
struct same_file {
- explicit same_file(const struct stat& stat) : sf_stat(stat){};
+ explicit same_file(const struct stat& stat) : sf_stat(stat) {}
/**
* Compare the given log file against the 'stat' given in the constructor.
@@ -203,7 +262,20 @@ struct same_file {
*/
bool operator()(const std::shared_ptr<logfile>& lf) const
{
- return !lf->is_closed() && this->sf_stat.st_dev == lf->get_stat().st_dev
+ if (lf->is_closed()) {
+ return false;
+ }
+
+ const auto& lf_loo = lf->get_open_options();
+
+ if (lf_loo.loo_temp_dev != 0
+ && this->sf_stat.st_dev == lf_loo.loo_temp_dev
+ && this->sf_stat.st_ino == lf_loo.loo_temp_ino)
+ {
+ return true;
+ }
+
+ return this->sf_stat.st_dev == lf->get_stat().st_dev
&& this->sf_stat.st_ino == lf->get_stat().st_ino;
}
@@ -219,33 +291,20 @@ struct same_file {
* @param fd An already-opened descriptor for 'filename'.
* @param required Specifies whether or not the file must exist and be valid.
*/
-std::future<file_collection>
+nonstd::optional<std::future<file_collection>>
file_collection::watch_logfile(const std::string& filename,
logfile_open_options& loo,
bool required)
{
- file_collection retval;
struct stat st;
int rc;
+ auto filename_key = loo.loo_filename.empty() ? filename : loo.loo_filename;
if (this->fc_closed_files.count(filename)) {
- return lnav::futures::make_ready_future(std::move(retval));
+ return nonstd::nullopt;
}
- if (loo.loo_fd != -1) {
- rc = fstat(loo.loo_fd, &st);
- if (rc == 0) {
- loo.with_stat_for_temp(st);
- }
- } else if (loo.loo_temp_file) {
- memset(&st, 0, sizeof(st));
- st.st_dev = loo.loo_temp_dev;
- st.st_ino = loo.loo_temp_ino;
- st.st_mode = S_IFREG;
- rc = 0;
- } else {
- rc = stat(filename.c_str(), &st);
- }
+ rc = stat(filename.c_str(), &st);
if (rc == 0) {
if (S_ISDIR(st.st_mode) && this->fc_recursive) {
@@ -253,34 +312,52 @@ file_collection::watch_logfile(const std::string& filename,
if (this->fc_file_names.find(wilddir) == this->fc_file_names.end())
{
- retval.fc_file_names.emplace(wilddir, logfile_open_options());
+ file_collection retval;
+
+ retval.fc_file_names.emplace(
+ wilddir,
+ logfile_open_options()
+ .with_non_utf_visibility(false)
+ .with_visible_size_limit(256 * 1024));
+ return lnav::futures::make_ready_future(std::move(retval));
}
- return lnav::futures::make_ready_future(std::move(retval));
+ return nonstd::nullopt;
}
if (!S_ISREG(st.st_mode)) {
if (required) {
rc = -1;
errno = EINVAL;
} else {
- return lnav::futures::make_ready_future(std::move(retval));
+ return nonstd::nullopt;
}
}
- auto err_iter = this->fc_name_to_errors.find(filename);
- if (err_iter != this->fc_name_to_errors.end()) {
- if (err_iter->second.fei_mtime != st.st_mtime) {
- this->fc_name_to_errors.erase(err_iter);
+ {
+ safe::WriteAccess<safe_name_to_errors> errs(
+ *this->fc_name_to_errors);
+
+ auto err_iter = errs->find(filename_key);
+ if (err_iter != errs->end()) {
+ if (err_iter->second.fei_mtime != st.st_mtime) {
+ errs->erase(err_iter);
+ }
}
}
}
if (rc == -1) {
if (required) {
- retval.fc_name_to_errors.emplace(filename,
- file_error_info{
- time(nullptr),
- std::string(strerror(errno)),
- });
+ log_error("failed to open required file: %s -- %s",
+ filename.c_str(),
+ strerror(errno));
+ file_collection retval;
+ retval.fc_name_to_errors->writeAccess()->emplace(
+ filename,
+ file_error_info{
+ time(nullptr),
+ std::string(strerror(errno)),
+ });
+ return lnav::futures::make_ready_future(std::move(retval));
}
- return lnav::futures::make_ready_future(std::move(retval));
+ return nonstd::nullopt;
}
if (this->fc_new_stats | lnav::itertools::find_if([&st](const auto& elem) {
@@ -289,7 +366,7 @@ file_collection::watch_logfile(const std::string& filename,
{
// this file is probably a link that we have already scanned in this
// pass.
- return lnav::futures::make_ready_future(std::move(retval));
+ return nonstd::nullopt;
}
this->fc_new_stats.emplace_back(st);
@@ -299,92 +376,41 @@ file_collection::watch_logfile(const std::string& filename,
if (file_iter == this->fc_files.end()) {
if (this->fc_other_files.find(filename) != this->fc_other_files.end()) {
- return lnav::futures::make_ready_future(std::move(retval));
+ return nonstd::nullopt;
}
require(this->fc_progress.get() != nullptr);
auto func = [filename,
st,
- loo2 = std::move(loo),
+ loo,
prog = this->fc_progress,
errs = this->fc_name_to_errors]() mutable {
file_collection retval;
- if (errs.find(filename) != errs.end()) {
- // The file is broken, no reason to try and reopen
- return retval;
+ {
+ safe::ReadAccess<safe_name_to_errors> errs_inner(*errs);
+
+ if (errs_inner->find(filename) != errs_inner->end()) {
+ // The file is broken, no reason to try and reopen
+ return retval;
+ }
}
- auto ff = loo2.loo_temp_file ? file_format_t::UNKNOWN
- : detect_file_format(filename);
+ auto ff = detect_file_format(filename);
- loo2.loo_file_format = ff;
+ loo.loo_file_format = ff;
switch (ff) {
case file_format_t::SQLITE_DB:
retval.fc_other_files[filename].ofd_format = ff;
break;
- case file_format_t::PCAP: {
- auto res = pcap_manager::convert(filename);
-
- if (res.isOk()) {
- auto convert_res = res.unwrap();
-
- loo2.with_fd(std::move(convert_res.cr_destination));
- retval.fc_child_pollers.emplace_back(child_poller{
- std::move(convert_res.cr_child),
- [filename,
- st,
- error_queue = convert_res.cr_error_queue](
- auto& fc, auto& child) {
- if (child.was_normal_exit()
- && child.exit_status() == EXIT_SUCCESS)
- {
- log_info("pcap[%d] exited normally",
- child.in());
- return;
- }
- log_error("pcap[%d] exited with %d",
- child.in(),
- child.status());
- fc.fc_name_to_errors.emplace(
- filename,
- file_error_info{
- st.st_mtime,
- fmt::format(
- FMT_STRING("{}"),
- fmt::join(*error_queue, "\n")),
- });
- },
- });
- auto open_res = logfile::open(filename, loo2);
- if (open_res.isOk()) {
- retval.fc_files.push_back(open_res.unwrap());
- } else {
- retval.fc_name_to_errors.emplace(
- filename,
- file_error_info{
- st.st_mtime,
- open_res.unwrapErr(),
- });
- }
- } else {
- retval.fc_name_to_errors.emplace(filename,
- file_error_info{
- st.st_mtime,
- res.unwrapErr(),
- });
- }
- break;
- }
-
case file_format_t::ARCHIVE: {
nonstd::optional<
std::list<archive_manager::extract_progress>::iterator>
prog_iter_opt;
- if (loo2.loo_source == logfile_name_source::ARCHIVE) {
+ if (loo.loo_source == logfile_name_source::ARCHIVE) {
// Don't try to open nested archives
return retval;
}
@@ -431,11 +457,12 @@ file_collection::watch_logfile(const std::string& filename,
log_error("archive extraction failed: %s",
res.unwrapErr().c_str());
retval.clear();
- retval.fc_name_to_errors.emplace(filename,
- file_error_info{
- st.st_mtime,
- res.unwrapErr(),
- });
+ retval.fc_name_to_errors->writeAccess()->emplace(
+ filename,
+ file_error_info{
+ st.st_mtime,
+ res.unwrapErr(),
+ });
} else {
retval.fc_other_files[filename] = ff;
}
@@ -448,14 +475,66 @@ file_collection::watch_logfile(const std::string& filename,
break;
}
- default:
+ default: {
+ auto filename_to_open = filename;
+
+ auto eff = detect_mime_type(filename);
+
+ if (eff) {
+ auto cr = file_converter_manager::convert(eff.value(),
+ filename);
+
+ if (cr.isErr()) {
+ retval.fc_name_to_errors->writeAccess()->emplace(
+ filename,
+ file_error_info{
+ st.st_mtime,
+ cr.unwrapErr(),
+ });
+ break;
+ }
+
+ auto convert_res = cr.unwrap();
+ retval.fc_child_pollers.emplace_back(child_poller{
+ filename,
+ std::move(convert_res.cr_child),
+ [filename,
+ st,
+ error_queue = convert_res.cr_error_queue](
+ auto& fc, auto& child) {
+ if (child.was_normal_exit()
+ && child.exit_status() == EXIT_SUCCESS)
+ {
+ log_info("converter[%d] exited normally",
+ child.in());
+ return;
+ }
+ log_error("converter[%d] exited with %d",
+ child.in(),
+ child.status());
+ fc.fc_name_to_errors->writeAccess()->emplace(
+ filename,
+ file_error_info{
+ st.st_mtime,
+ fmt::format(
+ FMT_STRING("{}"),
+ fmt::join(*error_queue, "\n")),
+ });
+ },
+ });
+ loo.with_filename(filename);
+ loo.with_stat_for_temp(st);
+ loo.loo_format_name = eff->eff_format_name;
+ filename_to_open = convert_res.cr_destination;
+ }
+
log_info("loading new file: filename=%s", filename.c_str());
- auto open_res = logfile::open(filename, loo2);
+ auto open_res = logfile::open(filename_to_open, loo);
if (open_res.isOk()) {
retval.fc_files.push_back(open_res.unwrap());
} else {
- retval.fc_name_to_errors.emplace(
+ retval.fc_name_to_errors->writeAccess()->emplace(
filename,
file_error_info{
st.st_mtime,
@@ -463,6 +542,7 @@ file_collection::watch_logfile(const std::string& filename,
});
}
break;
+ }
}
return retval;
@@ -477,10 +557,13 @@ file_collection::watch_logfile(const std::string& filename,
/* The file is already loaded, but has been found under a different
* name. We just need to update the stored file name.
*/
+ file_collection retval;
+
retval.fc_renamed_files.emplace_back(lf, filename);
+ return lnav::futures::make_ready_future(std::move(retval));
}
- return lnav::futures::make_ready_future(std::move(retval));
+ return nonstd::nullopt;
}
/**
@@ -506,11 +589,13 @@ file_collection::expand_filename(
}
}
- if (is_url(path.c_str())) {
+ if (is_url(path)) {
return;
}
- if (glob(path.c_str(), GLOB_NOCHECK, nullptr, gl.inout()) == 0) {
+ auto filename_key = loo.loo_filename.empty() ? path : loo.loo_filename;
+ auto glob_flags = lnav::filesystem::is_glob(path) ? 0 : GLOB_NOCHECK;
+ if (glob(path.c_str(), glob_flags, nullptr, gl.inout()) == 0) {
int lpc;
if (gl->gl_pathc == 1 /*&& gl.gl_matchc == 0*/) {
@@ -579,17 +664,30 @@ file_collection::expand_filename(
file_collection retval;
if (gl->gl_pathc == 1) {
- retval.fc_name_to_errors.emplace(path,
- file_error_info{
- time(nullptr),
- errmsg,
- });
+ if (this->fc_name_to_errors->readAccess()->count(
+ filename_key)
+ == 0)
+ {
+ log_error("failed to find path: %s -- %s",
+ filename_key.c_str(),
+ errmsg);
+ retval.fc_name_to_errors->writeAccess()
+ ->emplace(filename_key,
+ file_error_info{
+ time(nullptr),
+ errmsg,
+ });
+ }
} else {
- retval.fc_name_to_errors.emplace(path_str,
- file_error_info{
- time(nullptr),
- errmsg,
- });
+ log_error("failed to find path: %s -- %s",
+ path_str.c_str(),
+ errmsg);
+ retval.fc_name_to_errors->writeAccess()->emplace(
+ path_str,
+ file_error_info{
+ time(nullptr),
+ errmsg,
+ });
}
fq.push_back(lnav::futures::make_ready_future(
std::move(retval)));
@@ -603,7 +701,16 @@ file_collection::expand_filename(
}
if (required || access(iter->second.c_str(), R_OK) == 0) {
- fq.push_back(watch_logfile(iter->second, loo, required));
+ auto future_opt = watch_logfile(iter->second, loo, required);
+ if (future_opt) {
+ auto fut = std::move(future_opt.value());
+ if (fq.push_back(std::move(fut))
+ == lnav::futures::future_queue<
+ file_collection>::processor_result_t::interrupt)
+ {
+ break;
+ }
+ }
}
}
}
@@ -614,18 +721,48 @@ file_collection::rescan_files(bool required)
{
file_collection retval;
lnav::futures::future_queue<file_collection> fq(
- [&retval](auto& fc) { retval.merge(fc); });
+ [this, &retval](std::future<file_collection>& fc) {
+ try {
+ auto v = fc.get();
+ retval.merge(v);
+ } catch (const std::exception& e) {
+ log_error("rescan future exception: %s", e.what());
+ } catch (...) {
+ log_error("unknown exception thrown by rescan future");
+ }
+
+ if (retval.fc_files.size() < 100
+ && this->fc_files.size() + retval.fc_files.size()
+ < get_limits().l_open_files)
+ {
+ return lnav::futures::future_queue<
+ file_collection>::processor_result_t::ok;
+ }
+ return lnav::futures::future_queue<
+ file_collection>::processor_result_t::interrupt;
+ });
for (auto& pair : this->fc_file_names) {
- if (!pair.second.loo_temp_file) {
+ if (this->fc_files.size() + retval.fc_files.size()
+ >= get_limits().l_open_files)
+ {
+ log_debug("too many files open, breaking...");
+ break;
+ }
+
+ if (pair.second.loo_piper) {
+ this->expand_filename(
+ fq,
+ pair.second.loo_piper->get_out_pattern().string(),
+ pair.second,
+ required);
+ } else {
this->expand_filename(fq, pair.first, pair.second, required);
if (this->fc_rotated) {
std::string path = pair.first + ".*";
this->expand_filename(fq, path, pair.second, false);
}
- } else if (pair.second.loo_fd.get() != -1) {
- fq.push_back(watch_logfile(pair.first, pair.second, required));
}
if (retval.fc_files.size() >= 100) {
@@ -647,3 +784,54 @@ file_collection::request_close(const std::shared_ptr<logfile>& lf)
lf->close();
this->fc_files_generation += 1;
}
+
+size_t
+file_collection::active_pipers() const
+{
+ size_t retval = 0;
+ for (const auto& pair : this->fc_file_names) {
+ if (pair.second.loo_piper && !pair.second.loo_piper->is_finished()) {
+ retval += 1;
+ }
+ }
+
+ return retval;
+}
+
+size_t
+file_collection::finished_pipers()
+{
+ size_t retval = 0;
+
+ for (auto& pair : this->fc_file_names) {
+ if (pair.second.loo_piper) {
+ retval += pair.second.loo_piper->consume_finished();
+ }
+ }
+
+ return retval;
+}
+
+file_collection
+file_collection::copy()
+{
+ file_collection retval;
+
+ retval.merge(*this);
+ retval.fc_progress = this->fc_progress;
+ return retval;
+}
+
+size_t
+file_collection::other_file_format_count(file_format_t ff) const
+{
+ size_t retval = 0;
+
+ for (const auto& pair : this->fc_other_files) {
+ if (pair.second.ofd_format == ff) {
+ retval += 1;
+ }
+ }
+
+ return retval;
+}
diff --git a/src/file_collection.hh b/src/file_collection.hh
index 926f8f1..9ff260d 100644
--- a/src/file_collection.hh
+++ b/src/file_collection.hh
@@ -39,12 +39,14 @@
#include <string>
#include <utility>
+#include <sys/resource.h>
+
#include "archive_manager.hh"
+#include "base/auto_pid.hh"
#include "base/future_util.hh"
#include "file_format.hh"
#include "logfile_fwd.hh"
#include "safe/safe.h"
-#include "tailer/tailer.looper.hh"
struct tailer_progress {
std::string tp_message;
@@ -53,6 +55,11 @@ struct tailer_progress {
struct scan_progress {
std::list<archive_manager::extract_progress> sp_extractions;
std::map<std::string, tailer_progress> sp_tailers;
+
+ bool empty() const
+ {
+ return this->sp_extractions.empty() && this->sp_tailers.empty();
+ }
};
using safe_scan_progress = safe::Safe<scan_progress>;
@@ -73,6 +80,8 @@ struct file_error_info {
const std::string fei_description;
};
+using safe_name_to_errors = safe::Safe<std::map<std::string, file_error_info>>;
+
struct file_collection;
enum class child_poll_result_t {
@@ -83,16 +92,18 @@ enum class child_poll_result_t {
class child_poller {
public:
explicit child_poller(
+ nonstd::optional<std::string> filename,
auto_pid<process_state::running> child,
std::function<void(file_collection&,
auto_pid<process_state::finished>&)> finalizer)
- : cp_child(std::move(child)), cp_finalizer(std::move(finalizer))
+ : cp_filename(filename), cp_child(std::move(child)),
+ cp_finalizer(std::move(finalizer))
{
ensure(this->cp_finalizer);
}
child_poller(child_poller&& other) noexcept
- : cp_child(std::move(other.cp_child)),
+ : cp_filename(other.cp_filename), cp_child(std::move(other.cp_child)),
cp_finalizer(std::move(other.cp_finalizer))
{
ensure(this->cp_finalizer);
@@ -102,6 +113,7 @@ public:
{
require(other.cp_finalizer);
+ this->cp_filename = other.cp_filename;
this->cp_child = std::move(other.cp_child);
this->cp_finalizer = std::move(other.cp_finalizer);
@@ -114,9 +126,17 @@ public:
child_poller& operator=(const child_poller&) = delete;
+ const nonstd::optional<std::string>& get_filename() const
+ {
+ return this->cp_filename;
+ }
+
+ void send_sigint();
+
child_poll_result_t poll(file_collection& fc);
private:
+ nonstd::optional<std::string> cp_filename;
nonstd::optional<auto_pid<process_state::running>> cp_child;
std::function<void(file_collection&, auto_pid<process_state::finished>&)>
cp_finalizer;
@@ -128,7 +148,8 @@ struct file_collection {
bool fc_recursive{false};
bool fc_rotated{false};
- std::map<std::string, file_error_info> fc_name_to_errors;
+ std::shared_ptr<safe_name_to_errors> fc_name_to_errors{
+ std::make_shared<safe_name_to_errors>()};
std::map<std::string, logfile_open_options> fc_file_names;
std::vector<std::shared_ptr<logfile>> fc_files;
int fc_files_generation{0};
@@ -137,19 +158,39 @@ struct file_collection {
std::set<std::string> fc_closed_files;
std::map<std::string, other_file_descriptor> fc_other_files;
std::set<std::string> fc_synced_files;
- std::shared_ptr<safe_scan_progress> fc_progress;
+ std::shared_ptr<safe_scan_progress> fc_progress{
+ std::make_shared<safe_scan_progress>()};
std::vector<struct stat> fc_new_stats;
std::list<child_poller> fc_child_pollers;
size_t fc_largest_path_length{0};
- file_collection()
- : fc_progress(std::make_shared<safe::Safe<scan_progress>>())
+ struct limits_t {
+ limits_t();
+
+ rlim_t l_fds;
+ rlim_t l_open_files;
+ };
+
+ static const limits_t& get_limits();
+
+ file_collection() = default;
+ file_collection(const file_collection&) = delete;
+ file_collection& operator=(const file_collection&) = delete;
+ file_collection(file_collection&&) = default;
+
+ file_collection copy();
+
+ bool empty() const
{
+ return this->fc_name_to_errors->readAccess()->empty()
+ && this->fc_file_names.empty() && this->fc_files.empty()
+ && this->fc_progress->readAccess()->empty()
+ && this->fc_other_files.empty();
}
void clear()
{
- this->fc_name_to_errors.clear();
+ this->fc_name_to_errors->writeAccess()->clear();
this->fc_file_names.clear();
this->fc_files.clear();
this->fc_closed_files.clear();
@@ -157,6 +198,13 @@ struct file_collection {
this->fc_new_stats.clear();
}
+ bool is_below_open_file_limit() const
+ {
+ return this->fc_files.size() < get_limits().l_open_files;
+ }
+
+ size_t other_file_format_count(file_format_t ff) const;
+
file_collection rescan_files(bool required = false);
void expand_filename(lnav::futures::future_queue<file_collection>& fq,
@@ -164,9 +212,8 @@ struct file_collection {
logfile_open_options& loo,
bool required);
- std::future<file_collection> watch_logfile(const std::string& filename,
- logfile_open_options& loo,
- bool required);
+ nonstd::optional<std::future<file_collection>> watch_logfile(
+ const std::string& filename, logfile_open_options& loo, bool required);
void merge(file_collection& other);
@@ -175,6 +222,10 @@ struct file_collection {
void close_files(const std::vector<std::shared_ptr<logfile>>& files);
void regenerate_unique_file_names();
+
+ size_t active_pipers() const;
+
+ size_t finished_pipers();
};
#endif
diff --git a/src/pcap_manager.cc b/src/file_converter_manager.cc
index dbe304a..6f01652 100644
--- a/src/pcap_manager.cc
+++ b/src/file_converter_manager.cc
@@ -25,69 +25,87 @@
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @file pcap_manager.cc
*/
#include <memory>
#include <thread>
#include <vector>
-#include "pcap_manager.hh"
+#include "file_converter_manager.hh"
#include <unistd.h>
#include "base/fs_util.hh"
+#include "base/injector.hh"
+#include "base/paths.hh"
#include "config.h"
#include "line_buffer.hh"
+#include "piper.looper.cfg.hh"
+
+namespace file_converter_manager {
+
+static const ghc::filesystem::path&
+cache_dir()
+{
+ static auto INSTANCE = lnav::paths::workdir() / "conversion";
-namespace pcap_manager {
+ return INSTANCE;
+}
Result<convert_result, std::string>
-convert(const std::string& filename)
+convert(const external_file_format& eff, const std::string& filename)
{
- log_info("attempting to convert pcap file -- %s", filename.c_str());
+ log_info("attempting to convert file -- %s", filename.c_str());
+ ghc::filesystem::create_directories(cache_dir());
auto outfile = TRY(lnav::filesystem::open_temp_file(
- ghc::filesystem::temp_directory_path() / "lnav.pcap.XXXXXX"));
- ghc::filesystem::remove(outfile.first);
+ cache_dir()
+ / fmt::format(FMT_STRING("{}.XXXXXX"), eff.eff_format_name)));
auto err_pipe = TRY(auto_pipe::for_child_fd(STDERR_FILENO));
auto child = TRY(lnav::pid::from_fork());
err_pipe.after_fork(child.in());
if (child.in_child()) {
- auto dev_null = open("/dev/null", O_RDONLY);
+ auto dev_null = open("/dev/null", O_RDONLY | O_CLOEXEC);
dup2(dev_null, STDIN_FILENO);
- dup2(outfile.second.release(), STDOUT_FILENO);
- setenv("TZ", "UTC", 1);
+ dup2(outfile.second.get(), STDOUT_FILENO);
+ outfile.second.reset();
+
+ auto new_path = lnav::filesystem::build_path({
+ eff.eff_source_path.parent_path(),
+ lnav::paths::dotlnav() / "formats/default",
+ });
+ setenv("PATH", new_path.c_str(), 1);
+ log_info("invoking converter: %s (PATH=%s)",
+ eff.eff_converter.c_str(),
+ new_path.c_str());
+ auto format_str = eff.eff_format_name;
const char* args[] = {
- "tshark",
- "-T",
- "ek",
- "-P",
- "-V",
- "-t",
- "ad",
- "-r",
+ eff.eff_converter.c_str(),
+ format_str.c_str(),
filename.c_str(),
nullptr,
};
- execvp("tshark", (char**) args);
+ execvp(eff.eff_converter.c_str(), (char**) args);
if (errno == ENOENT) {
fprintf(stderr,
- "pcap support requires 'tshark' v3+ to be installed\n");
+ "cannot find converter: %s\n",
+ eff.eff_converter.c_str());
} else {
- fprintf(
- stderr, "failed to execute 'tshark' -- %s\n", strerror(errno));
+ fprintf(stderr,
+ "failed to execute converter: %s -- %s\n",
+ eff.eff_converter.c_str(),
+ strerror(errno));
}
_exit(EXIT_FAILURE);
}
auto error_queue = std::make_shared<std::vector<std::string>>();
std::thread err_reader([err = std::move(err_pipe.read_end()),
+ converter = eff.eff_converter,
error_queue,
child_pid = child.in()]() mutable {
line_buffer lb;
@@ -108,7 +126,7 @@ convert(const std::string& filename)
done = true;
} else {
lb.read_range(li.li_file_range)
- .then([error_queue, child_pid](auto sbr) {
+ .then([converter, error_queue, child_pid](auto sbr) {
auto line_str = string_fragment(
sbr.get_data(), 0, sbr.length())
.trim("\n");
@@ -116,7 +134,8 @@ convert(const std::string& filename)
error_queue->emplace_back(line_str.to_string());
}
- log_debug("pcap[%d]: %.*s",
+ log_debug("%s[%d]: %.*s",
+ converter.c_str(),
child_pid,
line_str.length(),
line_str.data());
@@ -131,9 +150,37 @@ convert(const std::string& filename)
return Ok(convert_result{
std::move(child),
- std::move(outfile.second),
+ outfile.first,
error_queue,
});
}
-} // namespace pcap_manager
+void
+cleanup()
+{
+ (void) std::async(std::launch::async, []() {
+ const auto& cfg = injector::get<const lnav::piper::config&>();
+ auto now = std::chrono::system_clock::now();
+ auto cache_path = cache_dir();
+ std::vector<ghc::filesystem::path> to_remove;
+
+ for (const auto& entry :
+ ghc::filesystem::directory_iterator(cache_path))
+ {
+ auto mtime = ghc::filesystem::last_write_time(entry.path());
+ auto exp_time = mtime + cfg.c_ttl;
+ if (now < exp_time) {
+ continue;
+ }
+
+ to_remove.emplace_back(entry);
+ }
+
+ for (auto& entry : to_remove) {
+ log_debug("removing conversion: %s", entry.c_str());
+ ghc::filesystem::remove_all(entry);
+ }
+ });
+}
+
+} // namespace file_converter_manager
diff --git a/src/pcap_manager.hh b/src/file_converter_manager.hh
index 319dfdc..281f195 100644
--- a/src/pcap_manager.hh
+++ b/src/file_converter_manager.hh
@@ -25,12 +25,10 @@
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @file pcap_manager.hh
*/
-#ifndef lnav_pcap_manager_hh
-#define lnav_pcap_manager_hh
+#ifndef lnav_file_converter_manager_hh
+#define lnav_file_converter_manager_hh
#include <string>
#include <vector>
@@ -38,17 +36,22 @@
#include "base/auto_fd.hh"
#include "base/auto_pid.hh"
#include "base/result.h"
+#include "file_format.hh"
+#include "ghc/filesystem.hpp"
-namespace pcap_manager {
+namespace file_converter_manager {
struct convert_result {
auto_pid<process_state::running> cr_child;
- auto_fd cr_destination;
+ ghc::filesystem::path cr_destination;
std::shared_ptr<std::vector<std::string>> cr_error_queue;
};
-Result<convert_result, std::string> convert(const std::string& filename);
+Result<convert_result, std::string> convert(const external_file_format& eff,
+ const std::string& filename);
+
+void cleanup();
-} // namespace pcap_manager
+} // namespace file_converter_manager
#endif
diff --git a/src/file_format.cc b/src/file_format.cc
index d82b78c..9858c26 100644
--- a/src/file_format.cc
+++ b/src/file_format.cc
@@ -29,8 +29,6 @@
* @file file_format.hh
*/
-#include <unordered_map>
-
#include "file_format.hh"
#include "archive_manager.hh"
@@ -40,77 +38,37 @@
#include "base/lnav_log.hh"
#include "config.h"
-static bool
-is_pcap_header(uint8_t* buffer)
-{
- size_t offset = 0;
- if (buffer[0] == 0x0a && buffer[1] == 0x0d && buffer[2] == 0x0d
- && buffer[3] == 0x0a)
- {
- offset += sizeof(uint32_t) * 2;
- if (buffer[offset + 0] == 0x1a && buffer[offset + 1] == 0x2b
- && buffer[offset + 2] == 0x3c && buffer[offset + 3] == 0x4d)
- {
- return true;
- }
-
- if (buffer[offset + 0] == 0x4d && buffer[offset + 1] == 0x3c
- && buffer[offset + 2] == 0x2b && buffer[offset + 3] == 0x1a)
- {
- return true;
- }
- return false;
- }
-
- if (buffer[0] == 0xa1 && buffer[1] == 0xb2 && buffer[2] == 0xc3
- && buffer[3] == 0xd4)
- {
- return true;
- }
-
- if (buffer[0] == 0xd4 && buffer[1] == 0xc3 && buffer[2] == 0xb2
- && buffer[3] == 0xa1)
- {
- return true;
- }
-
- if (buffer[0] == 0xa1 && buffer[1] == 0xb2 && buffer[2] == 0x3c
- && buffer[3] == 0x4d)
- {
- return true;
- }
-
- if (buffer[0] == 0x4d && buffer[1] == 0x3c && buffer[2] == 0xb2
- && buffer[3] == 0xa1)
- {
- return true;
- }
-
- return false;
-}
-
file_format_t
detect_file_format(const ghc::filesystem::path& filename)
{
- if (archive_manager::is_archive(filename)) {
+ auto describe_res = archive_manager::describe(filename);
+ if (describe_res.isOk()
+ && describe_res.unwrap().is<archive_manager::archive_info>())
+ {
return file_format_t::ARCHIVE;
}
file_format_t retval = file_format_t::UNKNOWN;
- auto_fd fd;
-
- if ((fd = lnav::filesystem::openp(filename, O_RDONLY)) != -1) {
+ auto open_res = lnav::filesystem::open_file(filename, O_RDONLY);
+ if (open_res.isErr()) {
+ log_error("unable to open file for format detection: %s -- %s",
+ filename.c_str(),
+ open_res.unwrapErr().c_str());
+ } else {
+ auto fd = open_res.unwrap();
uint8_t buffer[32];
- ssize_t rc;
+ auto rc = read(fd, buffer, sizeof(buffer));
- if ((rc = read(fd, buffer, sizeof(buffer))) > 0) {
+ if (rc < 0) {
+ log_error("unable to read file for format detection: %s -- %s",
+ filename.c_str(),
+ strerror(errno));
+ } else {
static auto SQLITE3_HEADER = "SQLite format 3";
- auto header_frag = string_fragment(buffer, 0, rc);
+ auto header_frag = string_fragment::from_bytes(buffer, rc);
if (header_frag.startswith(SQLITE3_HEADER)) {
retval = file_format_t::SQLITE_DB;
- } else if (rc > 24 && is_pcap_header(buffer)) {
- retval = file_format_t::PCAP;
}
}
}
diff --git a/src/file_format.hh b/src/file_format.hh
index a8eb3e4..d74347b 100644
--- a/src/file_format.hh
+++ b/src/file_format.hh
@@ -34,17 +34,26 @@
#include "fmt/format.h"
#include "ghc/filesystem.hpp"
+#include "optional.hpp"
enum class file_format_t : int {
UNKNOWN,
SQLITE_DB,
ARCHIVE,
- PCAP,
REMOTE,
};
+struct external_file_format {
+ std::string eff_format_name;
+ std::string eff_converter;
+ ghc::filesystem::path eff_source_path;
+};
+
file_format_t detect_file_format(const ghc::filesystem::path& filename);
+nonstd::optional<external_file_format> detect_mime_type(
+ const ghc::filesystem::path& filename);
+
namespace fmt {
template<>
struct formatter<file_format_t> : formatter<string_view> {
@@ -59,9 +68,6 @@ struct formatter<file_format_t> : formatter<string_view> {
case file_format_t::ARCHIVE:
name = "\U0001F5C4 Archive";
break;
- case file_format_t::PCAP:
- name = "\U0001F5A5 Pcap";
- break;
case file_format_t::REMOTE:
name = "\U0001F5A5 Remote";
break;
diff --git a/src/file_options.cc b/src/file_options.cc
new file mode 100644
index 0000000..8d83f87
--- /dev/null
+++ b/src/file_options.cc
@@ -0,0 +1,144 @@
+/**
+ * Copyright (c) 2023, Timothy Stack
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of Timothy Stack nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ''AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "file_options.hh"
+
+#include <fnmatch.h>
+
+#include "base/lnav_log.hh"
+#include "yajlpp/yajlpp.hh"
+#include "yajlpp/yajlpp_def.hh"
+
+namespace lnav {
+
+static const typed_json_path_container<file_options> options_handlers = {
+ yajlpp::property_handler("default-zone")
+ .with_synopsis("<zone>")
+ .with_description("The default zone for log messages if the timestamp "
+ "does not include a zone.")
+ .with_example("America/Los_Angeles")
+ .for_field(&file_options::fo_default_zone),
+};
+
+static const typed_json_path_container<file_options_collection>
+ pattern_to_options_handlers = {
+ yajlpp::pattern_property_handler("(?<path>[^/]+)")
+ .with_description("Path or glob pattern")
+ .with_children(options_handlers)
+ .for_field(&file_options_collection::foc_pattern_to_options),
+};
+
+static const typed_json_path_container<file_options_collection>
+ collection_handlers = {
+ yajlpp::property_handler("paths")
+ .with_description("Mapping of file paths or glob patterns to the "
+ "associated options")
+ .with_children(pattern_to_options_handlers),
+};
+
+bool
+file_options::operator==(const lnav::file_options& rhs) const
+{
+ return this->fo_default_zone.pp_value == rhs.fo_default_zone.pp_value;
+}
+
+json_string
+file_options::to_json_string() const
+{
+ return options_handlers.to_json_string(*this);
+}
+
+Result<file_options_collection, std::vector<lnav::console::user_message>>
+file_options_collection::from_json(intern_string_t src,
+ const string_fragment& frag)
+{
+ return collection_handlers.parser_for(src).of(frag);
+}
+
+std::string
+file_options_collection::to_json() const
+{
+ return collection_handlers.formatter_for(*this)
+ .with_config(yajl_gen_beautify, true)
+ .to_string();
+}
+
+nonstd::optional<std::pair<std::string, file_options>>
+file_options_collection::match(const std::string& path) const
+{
+ auto iter = this->foc_pattern_to_options.find(path);
+ if (iter != this->foc_pattern_to_options.end()) {
+ return *iter;
+ }
+
+ for (const auto& pair : this->foc_pattern_to_options) {
+ auto rc = fnmatch(pair.first.c_str(), path.c_str(), FNM_PATHNAME);
+
+ if (rc == 0) {
+ return pair;
+ }
+ if (rc != FNM_NOMATCH) {
+ log_error("fnmatch('%s', '%s') failed -- %s",
+ pair.first.c_str(),
+ path.c_str(),
+ strerror(errno));
+ }
+ }
+
+ return nonstd::nullopt;
+}
+
+nonstd::optional<std::pair<std::string, file_options>>
+file_options_hier::match(const ghc::filesystem::path& path) const
+{
+ static const auto ROOT_PATH = ghc::filesystem::path("/");
+
+ auto lookup_path = path.parent_path();
+
+ while (true) {
+ const auto iter = this->foh_path_to_collection.find(lookup_path);
+ if (iter != this->foh_path_to_collection.end()) {
+ return iter->second.match(path.string());
+ }
+
+ auto next_lookup_path = lookup_path.parent_path();
+ if (lookup_path == next_lookup_path) {
+ if (lookup_path != ROOT_PATH) {
+ // remote paths won't end with root, so try that
+ next_lookup_path = ROOT_PATH;
+ } else {
+ break;
+ }
+ }
+ lookup_path = next_lookup_path;
+ }
+ return nonstd::nullopt;
+}
+
+} // namespace lnav
diff --git a/src/file_options.hh b/src/file_options.hh
new file mode 100644
index 0000000..7102593
--- /dev/null
+++ b/src/file_options.hh
@@ -0,0 +1,81 @@
+/**
+ * Copyright (c) 2023, Timothy Stack
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of Timothy Stack nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ''AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef lnav_file_options_hh
+#define lnav_file_options_hh
+
+#include <map>
+
+#include "base/lnav.console.hh"
+#include "base/result.h"
+#include "date/tz.h"
+#include "ghc/filesystem.hpp"
+#include "mapbox/variant.hpp"
+#include "safe/safe.h"
+#include "yajlpp/yajlpp.hh"
+
+namespace lnav {
+
+struct file_options {
+ positioned_property<const date::time_zone*> fo_default_zone{nullptr};
+
+ bool empty() const { return this->fo_default_zone.pp_value == nullptr; }
+
+ json_string to_json_string() const;
+
+ bool operator==(const file_options& rhs) const;
+};
+
+struct file_options_collection {
+ static Result<file_options_collection,
+ std::vector<lnav::console::user_message>>
+ from_json(intern_string_t src, const string_fragment& frag);
+
+ std::map<std::string, file_options> foc_pattern_to_options;
+
+ nonstd::optional<std::pair<std::string, file_options>> match(
+ const std::string& path) const;
+
+ std::string to_json() const;
+};
+
+struct file_options_hier {
+ std::map<ghc::filesystem::path, file_options_collection>
+ foh_path_to_collection;
+ size_t foh_generation{0};
+
+ nonstd::optional<std::pair<std::string, file_options>> match(
+ const ghc::filesystem::path& path) const;
+};
+
+using safe_file_options_hier = safe::Safe<file_options_hier>;
+
+} // namespace lnav
+
+#endif
diff --git a/src/file_vtab.cc b/src/file_vtab.cc
index aab5d5b..7fb9bde 100644
--- a/src/file_vtab.cc
+++ b/src/file_vtab.cc
@@ -40,6 +40,9 @@
#include "logfile.hh"
#include "session_data.hh"
#include "vtab_module.hh"
+#include "vtab_module_json.hh"
+
+namespace {
struct lnav_file : public tvt_iterator_cursor<lnav_file> {
using iterator = std::vector<std::shared_ptr<logfile>>::iterator;
@@ -56,6 +59,8 @@ CREATE TABLE lnav_file (
format text, -- The log file format for the file.
lines integer, -- The number of lines in the file.
time_offset integer, -- The millisecond offset for timestamps.
+ options_path TEXT, -- The matched path for the file options.
+ options TEXT, -- The effective options for the file.
content BLOB HIDDEN -- The contents of the file.
);
@@ -108,6 +113,36 @@ CREATE TABLE lnav_file (
break;
}
case 8: {
+ if (sqlite3_vtab_nochange(ctx)) {
+ return SQLITE_OK;
+ }
+
+ auto opts = lf->get_file_options();
+ if (opts) {
+ to_sqlite(ctx, opts.value().first);
+ } else {
+ sqlite3_result_null(ctx);
+ }
+ break;
+ }
+ case 9: {
+ if (sqlite3_vtab_nochange(ctx)) {
+ return SQLITE_OK;
+ }
+
+ auto opts = lf->get_file_options();
+ if (opts) {
+ to_sqlite(ctx, opts.value().second.to_json_string());
+ } else {
+ sqlite3_result_null(ctx);
+ }
+ break;
+ }
+ case 10: {
+ if (sqlite3_vtab_nochange(ctx)) {
+ return SQLITE_OK;
+ }
+
auto& cfg = injector::get<const file_vtab::config&>();
auto lf_stat = lf->get_stat();
@@ -115,8 +150,7 @@ CREATE TABLE lnav_file (
sqlite3_result_error(ctx, "file is too large", -1);
} else {
auto fd = lf->get_fd();
- auto_mem<char> buf;
- buf = (char*) malloc(lf_stat.st_size);
+ auto buf = auto_mem<char>::malloc(lf_stat.st_size);
auto rc = pread(fd, buf, lf_stat.st_size, 0);
if (rc == -1) {
@@ -183,6 +217,8 @@ CREATE TABLE lnav_file (
const char* format,
int64_t lines,
int64_t time_offset,
+ const char* options_path,
+ const char* options,
const char* content)
{
auto lf = this->lf_collection.fc_files[rowid];
@@ -203,18 +239,20 @@ CREATE TABLE lnav_file (
= this->lf_collection.fc_file_names.find(lf->get_filename());
if (iter != this->lf_collection.fc_file_names.end()) {
- auto loo = std::move(iter->second);
+ auto loo = iter->second;
this->lf_collection.fc_file_names.erase(iter);
loo.loo_include_in_session = true;
- this->lf_collection.fc_file_names[path] = std::move(loo);
- lf->set_filename(path);
- this->lf_collection.regenerate_unique_file_names();
-
- init_session();
- load_session();
+ this->lf_collection.fc_file_names[path] = loo;
}
+
+ lf->set_filename(path);
+ lf->set_include_in_session(true);
+ this->lf_collection.regenerate_unique_file_names();
+
+ init_session();
+ load_session();
}
return SQLITE_OK;
@@ -343,3 +381,5 @@ static auto file_binder
static auto file_meta_binder = injector::bind_multiple<vtab_module_base>()
.add<injectable_lnav_file_metadata>();
+
+} // namespace
diff --git a/src/files_sub_source.cc b/src/files_sub_source.cc
index 03d0303..4f2fff2 100644
--- a/src/files_sub_source.cc
+++ b/src/files_sub_source.cc
@@ -30,6 +30,8 @@
#include "files_sub_source.hh"
#include "base/ansi_scrubber.hh"
+#include "base/attr_line.builder.hh"
+#include "base/fs_util.hh"
#include "base/humanize.hh"
#include "base/humanize.network.hh"
#include "base/opt_util.hh"
@@ -37,6 +39,9 @@
#include "config.h"
#include "lnav.hh"
#include "mapbox/variant.hpp"
+#include "sql_util.hh"
+
+using namespace lnav::roles::literals;
namespace files_model {
files_list_selection
@@ -45,14 +50,18 @@ from_selection(vis_line_t sel_vis)
auto& fc = lnav_data.ld_active_files;
int sel = (int) sel_vis;
- if (sel < fc.fc_name_to_errors.size()) {
- auto iter = fc.fc_name_to_errors.begin();
+ {
+ safe::ReadAccess<safe_name_to_errors> errs(*fc.fc_name_to_errors);
- std::advance(iter, sel);
- return error_selection::build(sel, iter);
- }
+ if (sel < errs->size()) {
+ auto iter = errs->begin();
- sel -= fc.fc_name_to_errors.size();
+ std::advance(iter, sel);
+ return error_selection::build(sel, iter->first);
+ }
+
+ sel -= errs->size();
+ }
if (sel < fc.fc_other_files.size()) {
auto iter = fc.fc_other_files.begin();
@@ -92,6 +101,7 @@ files_sub_source::list_input_handle_key(listview_curses& lv, int ch)
auto& lss = lnav_data.ld_log_source;
auto lf = *fs.sb_iter;
+ lf->set_indexing(true);
lss.find_data(lf) | [](auto ld) {
ld->set_visibility(true);
lnav_data.ld_log_source.text_filters_changed();
@@ -131,6 +141,7 @@ files_sub_source::list_input_handle_key(listview_curses& lv, int ch)
auto lf = *fs.sb_iter;
lss.find_data(lf) | [](auto ld) {
+ ld->get_file_ptr()->set_indexing(!ld->ld_visible);
ld->set_visibility(!ld->ld_visible);
};
@@ -138,6 +149,10 @@ files_sub_source::list_input_handle_key(listview_curses& lv, int ch)
auto tss = top_view->get_sub_source();
if (tss != nullptr) {
+ if (tss != &lss) {
+ lss.text_filters_changed();
+ lnav_data.ld_views[LNV_LOG].reload_data();
+ }
tss->text_filters_changed();
top_view->reload_data();
}
@@ -166,11 +181,11 @@ files_sub_source::list_input_handle_key(listview_curses& lv, int ch)
[&](files_model::error_selection& es) {
auto& fc = lnav_data.ld_active_files;
- fc.fc_file_names.erase(es.sb_iter->first);
+ fc.fc_file_names.erase(es.sb_iter);
auto name_iter = fc.fc_file_names.begin();
while (name_iter != fc.fc_file_names.end()) {
- if (name_iter->first == es.sb_iter->first) {
+ if (name_iter->first == es.sb_iter) {
name_iter = fc.fc_file_names.erase(name_iter);
continue;
}
@@ -181,8 +196,7 @@ files_sub_source::list_input_handle_key(listview_curses& lv, int ch)
if (rp_opt) {
auto rp = *rp_opt;
- if (fmt::to_string(rp.home()) == es.sb_iter->first)
- {
+ if (fmt::to_string(rp.home()) == es.sb_iter) {
fc.fc_other_files.erase(name_iter->first);
name_iter = fc.fc_file_names.erase(name_iter);
continue;
@@ -191,7 +205,7 @@ files_sub_source::list_input_handle_key(listview_curses& lv, int ch)
++name_iter;
}
- fc.fc_name_to_errors.erase(es.sb_iter);
+ fc.fc_name_to_errors->writeAccess()->erase(es.sb_iter);
fc.fc_invalidate_merge = true;
lv.reload_data();
},
@@ -214,9 +228,10 @@ size_t
files_sub_source::text_line_count()
{
const auto& fc = lnav_data.ld_active_files;
+ auto retval = fc.fc_name_to_errors->readAccess()->size()
+ + fc.fc_other_files.size() + fc.fc_files.size();
- return fc.fc_name_to_errors.size() + fc.fc_other_files.size()
- + fc.fc_files.size();
+ return retval;
}
size_t
@@ -231,47 +246,83 @@ files_sub_source::text_value_for_line(textview_curses& tc,
std::string& value_out,
text_sub_source::line_flags_t flags)
{
+ bool selected
+ = lnav_data.ld_mode == ln_mode_t::FILES && line == tc.get_selection();
const auto dim = tc.get_dimensions();
const auto& fc = lnav_data.ld_active_files;
auto filename_width
= std::min(fc.fc_largest_path_length,
std::max((size_t) 40, (size_t) dim.second - 30));
- if (line < fc.fc_name_to_errors.size()) {
- auto iter = fc.fc_name_to_errors.begin();
- std::advance(iter, line);
- auto path = ghc::filesystem::path(iter->first);
- auto fn = path.filename().string();
+ this->fss_curr_line.clear();
+ auto& al = this->fss_curr_line;
+ attr_line_builder alb(al);
- truncate_to(fn, filename_width);
- value_out = fmt::format(FMT_STRING(" {:<{}} {}"),
- fn,
- filename_width,
- iter->second.fei_description);
- return;
+ if (selected) {
+ al.append(" ", VC_GRAPHIC.value(ACS_RARROW));
+ } else {
+ al.append(" ");
}
+ {
+ safe::ReadAccess<safe_name_to_errors> errs(*fc.fc_name_to_errors);
+
+ if (line < errs->size()) {
+ auto iter = std::next(errs->begin(), line);
+ auto path = ghc::filesystem::path(iter->first);
+ auto fn = fmt::to_string(path.filename());
+
+ truncate_to(fn, filename_width);
+ al.append(" ");
+ {
+ auto ag = alb.with_attr(VC_ROLE.value(role_t::VCR_ERROR));
+
+ al.appendf(FMT_STRING("{:<{}}"), fn, filename_width);
+ }
+ al.append(" ").append(iter->second.fei_description);
+ if (selected) {
+ al.with_attr_for_all(
+ VC_ROLE.value(role_t::VCR_DISABLED_FOCUSED));
+ }
+
+ value_out = al.get_string();
+ return;
+ }
- line -= fc.fc_name_to_errors.size();
+ line -= errs->size();
+ }
if (line < fc.fc_other_files.size()) {
- auto iter = fc.fc_other_files.begin();
- std::advance(iter, line);
+ auto iter = std::next(fc.fc_other_files.begin(), line);
auto path = ghc::filesystem::path(iter->first);
- auto fn = path.string();
+ auto fn = fmt::to_string(path);
truncate_to(fn, filename_width);
- value_out = fmt::format(FMT_STRING(" {:<{}} {:14} {}"),
- fn,
- filename_width,
- iter->second.ofd_format,
- iter->second.ofd_description);
+ al.append(" ");
+ {
+ auto ag = alb.with_attr(VC_ROLE.value(role_t::VCR_FILE));
+
+ al.appendf(FMT_STRING("{:<{}}"), fn, filename_width);
+ }
+ al.append(" ")
+ .appendf(FMT_STRING("{:14}"), iter->second.ofd_format)
+ .append(" ")
+ .append(iter->second.ofd_description);
+ if (selected) {
+ al.with_attr_for_all(VC_ROLE.value(role_t::VCR_DISABLED_FOCUSED));
+ }
+ if (line == fc.fc_other_files.size() - 1) {
+ al.with_attr_for_all(VC_STYLE.value(text_attrs{A_UNDERLINE}));
+ }
+
+ value_out = al.get_string();
return;
}
line -= fc.fc_other_files.size();
const auto& lf = fc.fc_files[line];
- auto fn = lf->get_unique_path();
+ auto ld_opt = lnav_data.ld_log_source.find_data(lf);
+ auto fn = fmt::to_string(ghc::filesystem::path(lf->get_unique_path()));
char start_time[64] = "", end_time[64] = "";
std::vector<std::string> file_notes;
@@ -283,14 +334,38 @@ files_sub_source::text_value_for_line(textview_curses& tc,
for (const auto& pair : lf->get_notes()) {
file_notes.push_back(pair.second);
}
- value_out = fmt::format(FMT_STRING(" {:<{}} {:>8} {} \u2014 {} {}"),
- fn,
- filename_width,
- humanize::file_size(lf->get_index_size(),
- humanize::alignment::columnar),
- start_time,
- end_time,
- fmt::join(file_notes, "; "));
+
+ al.append(" ");
+ if (ld_opt) {
+ if (ld_opt.value()->ld_visible) {
+ al.append("\u25c6"_ok);
+ } else {
+ al.append("\u25c7"_comment);
+ }
+ } else {
+ al.append("\u25c6"_comment);
+ }
+ al.append(" ");
+ al.appendf(FMT_STRING("{:<{}}"), fn, filename_width);
+ al.append(" ");
+ {
+ auto ag = alb.with_attr(VC_ROLE.value(role_t::VCR_NUMBER));
+
+ al.appendf(FMT_STRING("{:>8}"),
+ humanize::file_size(lf->get_index_size(),
+ humanize::alignment::columnar));
+ }
+ al.append(" ")
+ .append(start_time)
+ .append(" \u2014 ")
+ .append(end_time)
+ .append(" ")
+ .appendf(FMT_STRING("{}"), fmt::join(file_notes, "; "));
+ if (selected) {
+ al.with_attr_for_all(VC_ROLE.value(role_t::VCR_FOCUSED));
+ }
+
+ value_out = al.get_string();
this->fss_last_line_len
= filename_width + 23 + strlen(start_time) + strlen(end_time);
}
@@ -300,72 +375,7 @@ files_sub_source::text_attrs_for_line(textview_curses& tc,
int line,
string_attrs_t& value_out)
{
- bool selected
- = lnav_data.ld_mode == ln_mode_t::FILES && line == tc.get_selection();
- const auto& fc = lnav_data.ld_active_files;
- const auto dim = tc.get_dimensions();
- auto filename_width
- = std::min(fc.fc_largest_path_length,
- std::max((size_t) 40, (size_t) dim.second - 30));
-
- if (selected) {
- value_out.emplace_back(line_range{0, 1}, VC_GRAPHIC.value(ACS_RARROW));
- }
-
- if (line < fc.fc_name_to_errors.size()) {
- if (selected) {
- value_out.emplace_back(line_range{0, -1},
- VC_ROLE.value(role_t::VCR_DISABLED_FOCUSED));
- }
-
- value_out.emplace_back(line_range{4 + (int) filename_width, -1},
- VC_ROLE_FG.value(role_t::VCR_ERROR));
- return;
- }
- line -= fc.fc_name_to_errors.size();
-
- if (line < fc.fc_other_files.size()) {
- if (selected) {
- value_out.emplace_back(line_range{0, -1},
- VC_ROLE.value(role_t::VCR_DISABLED_FOCUSED));
- }
- if (line == fc.fc_other_files.size() - 1) {
- value_out.emplace_back(line_range{0, -1},
- VC_STYLE.value(text_attrs{A_UNDERLINE}));
- }
- return;
- }
-
- line -= fc.fc_other_files.size();
-
- if (selected) {
- value_out.emplace_back(line_range{0, -1},
- VC_ROLE.value(role_t::VCR_FOCUSED));
- }
-
- auto& lss = lnav_data.ld_log_source;
- auto& lf = fc.fc_files[line];
- auto ld_opt = lss.find_data(lf);
-
- chtype visible = ACS_DIAMOND;
- if (ld_opt && !ld_opt.value()->ld_visible) {
- visible = ' ';
- }
- value_out.emplace_back(line_range{2, 3}, VC_GRAPHIC.value(visible));
- if (visible == ACS_DIAMOND) {
- value_out.emplace_back(line_range{2, 3},
- VC_FOREGROUND.value(COLOR_GREEN));
- }
-
- auto lr = line_range{
- (int) filename_width + 3 + 4,
- (int) filename_width + 3 + 10,
- };
- value_out.emplace_back(lr, VC_STYLE.value(text_attrs{A_BOLD}));
-
- lr.lr_start = this->fss_last_line_len;
- lr.lr_end = -1;
- value_out.emplace_back(lr, VC_FOREGROUND.value(COLOR_YELLOW));
+ value_out = this->fss_curr_line.get_attrs();
}
size_t
@@ -388,45 +398,60 @@ spinner_index()
}
bool
-files_overlay_source::list_value_for_overlay(const listview_curses& lv,
- int y,
- int bottom,
- vis_line_t line,
- attr_line_t& value_out)
+files_overlay_source::list_static_overlay(const listview_curses& lv,
+ int y,
+ int bottom,
+ attr_line_t& value_out)
{
- if (y == 0) {
- static const char PROG[] = "-\\|/";
- constexpr size_t PROG_SIZE = sizeof(PROG) - 1;
-
- auto& fc = lnav_data.ld_active_files;
- auto fc_prog = fc.fc_progress;
- safe::WriteAccess<safe_scan_progress> sp(*fc_prog);
-
- if (!sp->sp_extractions.empty()) {
- const auto& prog = sp->sp_extractions.front();
-
- value_out.with_ansi_string(fmt::format(
- "{} Extracting " ANSI_COLOR(COLOR_CYAN) "{}" ANSI_NORM
- "... {:>8}/{}",
- PROG[spinner_index() % PROG_SIZE],
- prog.ep_path.filename().string(),
- humanize::file_size(prog.ep_out_size,
- humanize::alignment::none),
- humanize::file_size(prog.ep_total_size,
- humanize::alignment::none)));
- return true;
- }
- if (!sp->sp_tailers.empty()) {
- auto first_iter = sp->sp_tailers.begin();
-
- value_out.with_ansi_string(fmt::format(
- "{} Connecting to " ANSI_COLOR(COLOR_CYAN) "{}" ANSI_NORM
- ": {}",
- PROG[spinner_index() % PROG_SIZE],
- first_iter->first,
- first_iter->second.tp_message));
- return true;
- }
+ if (y != 0) {
+ return false;
+ }
+ static const char PROG[] = "-\\|/";
+ constexpr size_t PROG_SIZE = sizeof(PROG) - 1;
+
+ auto& fc = lnav_data.ld_active_files;
+ auto fc_prog = fc.fc_progress;
+ safe::WriteAccess<safe_scan_progress> sp(*fc_prog);
+
+ if (!sp->sp_extractions.empty()) {
+ const auto& prog = sp->sp_extractions.front();
+
+ value_out.with_ansi_string(fmt::format(
+ "{} Extracting " ANSI_COLOR(COLOR_CYAN) "{}" ANSI_NORM
+ "... {:>8}/{}",
+ PROG[spinner_index() % PROG_SIZE],
+ prog.ep_path.filename().string(),
+ humanize::file_size(prog.ep_out_size, humanize::alignment::none),
+ humanize::file_size(prog.ep_total_size,
+ humanize::alignment::none)));
+ return true;
}
+ if (!sp->sp_tailers.empty()) {
+ auto first_iter = sp->sp_tailers.begin();
+
+ value_out.with_ansi_string(fmt::format(
+ "{} Connecting to " ANSI_COLOR(COLOR_CYAN) "{}" ANSI_NORM ": {}",
+ PROG[spinner_index() % PROG_SIZE],
+ first_iter->first,
+ first_iter->second.tp_message));
+ return true;
+ }
+
+ return false;
+}
+
+bool
+files_sub_source::text_handle_mouse(
+ textview_curses& tc,
+ const listview_curses::display_line_content_t&,
+ mouse_event& me)
+{
+ if (me.is_click_in(mouse_button_t::BUTTON_LEFT, 1, 3)) {
+ this->list_input_handle_key(tc, ' ');
+ }
+ if (me.is_double_click_in(mouse_button_t::BUTTON_LEFT, line_range{4, -1})) {
+ this->list_input_handle_key(tc, '\r');
+ }
+
return false;
}
diff --git a/src/files_sub_source.hh b/src/files_sub_source.hh
index 7c3b325..90bcb02 100644
--- a/src/files_sub_source.hh
+++ b/src/files_sub_source.hh
@@ -35,7 +35,8 @@
class files_sub_source
: public text_sub_source
- , public list_input_delegate {
+ , public list_input_delegate
+ , public text_delegate {
public:
files_sub_source();
@@ -60,21 +61,24 @@ public:
int line,
line_flags_t raw) override;
+ bool text_handle_mouse(textview_curses& tc,
+ const listview_curses::display_line_content_t&,
+ mouse_event& me) override;
+
size_t fss_last_line_len{0};
+ attr_line_t fss_curr_line;
};
struct files_overlay_source : public list_overlay_source {
- bool list_value_for_overlay(const listview_curses& lv,
- int y,
- int bottom,
- vis_line_t line,
- attr_line_t& value_out) override;
+ bool list_static_overlay(const listview_curses& lv,
+ int y,
+ int bottom,
+ attr_line_t& value_out) override;
};
namespace files_model {
-struct no_selection {
-};
+struct no_selection {};
template<typename C, typename T>
struct selection_base {
@@ -91,21 +95,16 @@ struct selection_base {
}
};
-struct error_selection
- : public selection_base<error_selection,
- std::map<std::string, file_error_info>::iterator> {
-};
+struct error_selection : public selection_base<error_selection, std::string> {};
struct other_selection
: public selection_base<
other_selection,
- std::map<std::string, other_file_descriptor>::iterator> {
-};
+ std::map<std::string, other_file_descriptor>::iterator> {};
struct file_selection
: public selection_base<file_selection,
- std::vector<std::shared_ptr<logfile>>::iterator> {
-};
+ std::vector<std::shared_ptr<logfile>>::iterator> {};
using files_list_selection = mapbox::util::
variant<no_selection, error_selection, other_selection, file_selection>;
diff --git a/src/filter_observer.cc b/src/filter_observer.cc
index cbe1c8f..b8f15d9 100644
--- a/src/filter_observer.cc
+++ b/src/filter_observer.cc
@@ -48,7 +48,7 @@ line_filter_observer::logline_new_lines(const logfile& lf,
}
for (; ll_begin != ll_end; ++ll_begin) {
- auto sbr_copy = sbr;
+ auto sbr_copy = sbr.clone();
if (lf.get_format() != nullptr) {
lf.get_format()->get_subline(*ll_begin, sbr_copy);
}
diff --git a/src/filter_observer.hh b/src/filter_observer.hh
index 1e1c302..763e6bd 100644
--- a/src/filter_observer.hh
+++ b/src/filter_observer.hh
@@ -50,7 +50,7 @@ public:
}
void logline_new_lines(const logfile& lf,
- logfile::const_iterator ll_begin,
+ logfile::const_iterator ll_baegin,
logfile::const_iterator ll_end,
const shared_buffer_ref& sbr) override;
diff --git a/src/filter_status_source.cc b/src/filter_status_source.cc
index cbc56c0..d284d58 100644
--- a/src/filter_status_source.cc
+++ b/src/filter_status_source.cc
@@ -37,7 +37,7 @@
#include "lnav.hh"
static auto TOGGLE_MSG = "Press " ANSI_BOLD("TAB") " to edit ";
-static auto EXIT_MSG = "Press " ANSI_BOLD("q") " to exit ";
+static auto EXIT_MSG = "Press " ANSI_BOLD("ESC") " to exit ";
static auto CREATE_HELP = ANSI_BOLD("i") "/" ANSI_BOLD("o") ": Create in/out";
static auto ENABLE_HELP = ANSI_BOLD("SPC") ": ";
@@ -54,6 +54,8 @@ filter_status_source::filter_status_source()
this->tss_fields[TSF_TITLE].set_role(role_t::VCR_STATUS_TITLE);
this->tss_fields[TSF_TITLE].set_value(" " ANSI_ROLE("T") "ext Filters ",
role_t::VCR_STATUS_TITLE_HOTKEY);
+ this->tss_fields[TSF_TITLE].on_click
+ = [](status_field&) { set_view_mode(ln_mode_t::FILTER); };
this->tss_fields[TSF_STITCH_TITLE].set_width(2);
this->tss_fields[TSF_STITCH_TITLE].set_stitch_value(
@@ -73,6 +75,8 @@ filter_status_source::filter_status_source()
role_t::VCR_STATUS_DISABLED_TITLE);
this->tss_fields[TSF_FILES_TITLE].set_value(" " ANSI_ROLE("F") "iles ",
role_t::VCR_STATUS_HOTKEY);
+ this->tss_fields[TSF_FILES_TITLE].on_click
+ = [](status_field&) { set_view_mode(ln_mode_t::FILES); };
this->tss_fields[TSF_FILES_RIGHT_STITCH].set_width(2);
this->tss_fields[TSF_FILES_RIGHT_STITCH].set_stitch_value(
@@ -122,7 +126,8 @@ filter_status_source::statusview_fields()
} else {
this->tss_fields[TSF_FILES_TITLE].set_value(" " ANSI_ROLE("F") "iles ",
role_t::VCR_STATUS_HOTKEY);
- if (lnav_data.ld_active_files.fc_name_to_errors.empty()) {
+ if (lnav_data.ld_active_files.fc_name_to_errors->readAccess()->empty())
+ {
this->tss_fields[TSF_FILES_TITLE].set_role(
role_t::VCR_STATUS_DISABLED_TITLE);
} else {
@@ -130,12 +135,13 @@ filter_status_source::statusview_fields()
role_t::VCR_ALERT_STATUS);
auto& fc = lnav_data.ld_active_files;
- if (fc.fc_name_to_errors.size() == 1) {
+ if (fc.fc_name_to_errors->readAccess()->size() == 1) {
this->tss_error.set_value(" error: a file cannot be opened ");
} else {
this->tss_error.set_value(
" error: %u files cannot be opened ",
- lnav_data.ld_active_files.fc_name_to_errors.size());
+ lnav_data.ld_active_files.fc_name_to_errors->readAccess()
+ ->size());
}
}
this->tss_fields[TSF_FILES_RIGHT_STITCH].set_stitch_value(
@@ -181,7 +187,7 @@ status_field&
filter_status_source::statusview_value_for_field(int field)
{
if (field == TSF_FILTERED
- && !lnav_data.ld_active_files.fc_name_to_errors.empty())
+ && !lnav_data.ld_active_files.fc_name_to_errors->readAccess()->empty())
{
return this->tss_error;
}
diff --git a/src/filter_sub_source.cc b/src/filter_sub_source.cc
index 10e53a1..a3c566a 100644
--- a/src/filter_sub_source.cc
+++ b/src/filter_sub_source.cc
@@ -29,20 +29,23 @@
#include "filter_sub_source.hh"
+#include "base/attr_line.builder.hh"
#include "base/enum_util.hh"
#include "base/func_util.hh"
#include "base/opt_util.hh"
+#include "bound_tags.hh"
#include "config.h"
#include "lnav.hh"
#include "readline_highlighters.hh"
#include "readline_possibilities.hh"
+#include "sql_util.hh"
using namespace lnav::roles::literals;
filter_sub_source::filter_sub_source(std::shared_ptr<readline_curses> editor)
: fss_editor(editor)
{
- this->fss_editor->set_left(25);
+ this->fss_editor->set_x(25);
this->fss_editor->set_width(-1);
this->fss_editor->set_save_history(!(lnav_data.ld_flags & LNF_SECURE_MODE));
this->fss_regex_context.set_highlighter(readline_regex_highlighter)
@@ -68,12 +71,21 @@ filter_sub_source::filter_sub_source(std::shared_ptr<readline_curses> editor)
this->fss_match_view.set_default_role(role_t::VCR_POPUP);
}
+void
+filter_sub_source::register_view(textview_curses* tc)
+{
+ text_sub_source::register_view(tc);
+ tc->add_child_view(this->fss_editor.get());
+ tc->add_child_view(&this->fss_match_view);
+}
+
bool
filter_sub_source::list_input_handle_key(listview_curses& lv, int ch)
{
if (this->fss_editing) {
switch (ch) {
- case KEY_CTRL_RBRACKET:
+ case KEY_ESCAPE:
+ case KEY_CTRL(']'):
this->fss_editor->abort();
return true;
default:
@@ -148,9 +160,9 @@ filter_sub_source::list_input_handle_key(listview_curses& lv, int ch)
return true;
}
case 'i': {
- textview_curses* top_view = *lnav_data.ld_view_stack.top();
- text_sub_source* tss = top_view->get_sub_source();
- filter_stack& fs = tss->get_filters();
+ auto* top_view = *lnav_data.ld_view_stack.top();
+ auto* tss = top_view->get_sub_source();
+ auto& fs = tss->get_filters();
auto filter_index = fs.next_index();
if (!filter_index) {
@@ -166,6 +178,7 @@ filter_sub_source::list_input_handle_key(listview_curses& lv, int ch)
lv.reload_data();
this->fss_editing = true;
+ this->tss_view->vc_enabled = false;
add_view_text_possibilities(this->fss_editor.get(),
filter_lang_t::REGEX,
@@ -201,6 +214,7 @@ filter_sub_source::list_input_handle_key(listview_curses& lv, int ch)
lv.reload_data();
this->fss_editing = true;
+ this->tss_view->vc_enabled = false;
add_view_text_possibilities(this->fss_editor.get(),
filter_lang_t::REGEX,
@@ -230,6 +244,7 @@ filter_sub_source::list_input_handle_key(listview_curses& lv, int ch)
auto tf = *(fs.begin() + lv.get_selection());
this->fss_editing = true;
+ this->tss_view->vc_enabled = false;
auto tq = tf->get_lang() == filter_lang_t::SQL
? text_quoting::sql
@@ -275,12 +290,15 @@ size_t
filter_sub_source::text_line_count()
{
return (lnav_data.ld_view_stack.top() |
- [](auto tc) {
- text_sub_source* tss = tc->get_sub_source();
- filter_stack& fs = tss->get_filters();
-
- return nonstd::make_optional(fs.size());
- })
+ [](auto tc) -> nonstd::optional<size_t> {
+ text_sub_source* tss = tc->get_sub_source();
+
+ if (tss == nullptr) {
+ return nonstd::nullopt;
+ }
+ auto& fs = tss->get_filters();
+ return nonstd::make_optional(fs.size());
+ })
.value_or(0);
}
@@ -309,17 +327,34 @@ filter_sub_source::text_value_for_line(textview_curses& tc,
auto* tss = top_view->get_sub_source();
auto& fs = tss->get_filters();
auto tf = *(fs.begin() + line);
+ bool selected
+ = lnav_data.ld_mode == ln_mode_t::FILTER && line == tc.get_selection();
- value_out = " ";
+ this->fss_curr_line.clear();
+ auto& al = this->fss_curr_line;
+ attr_line_builder alb(al);
+
+ if (selected) {
+ al.append(" ", VC_GRAPHIC.value(ACS_RARROW));
+ } else {
+ al.append(" ");
+ }
+ al.append(" ");
+ if (tf->is_enabled()) {
+ al.append("\u25c6"_ok);
+ } else {
+ al.append("\u25c7"_comment);
+ }
+ al.append(" ");
switch (tf->get_type()) {
case text_filter::INCLUDE:
- value_out.append(" IN ");
+ al.append(" ").append(lnav::roles::ok("IN")).append(" ");
break;
case text_filter::EXCLUDE:
if (tf->get_lang() == filter_lang_t::REGEX) {
- value_out.append("OUT ");
+ al.append(lnav::roles::error("OUT")).append(" ");
} else {
- value_out.append(" ");
+ al.append(" ");
}
break;
default:
@@ -327,60 +362,19 @@ filter_sub_source::text_value_for_line(textview_curses& tc,
break;
}
- if (this->fss_editing && line == tc.get_selection()) {
- fmt::format_to(
- std::back_inserter(value_out), FMT_STRING("{:>9} hits | "), "-");
- } else {
- fmt::format_to(std::back_inserter(value_out),
- FMT_STRING("{:>9L} hits | "),
- tss->get_filtered_count_for(tf->get_index()));
- }
-
- value_out.append(tf->get_id());
-}
-
-void
-filter_sub_source::text_attrs_for_line(textview_curses& tc,
- int line,
- string_attrs_t& value_out)
-{
- textview_curses* top_view = *lnav_data.ld_view_stack.top();
- text_sub_source* tss = top_view->get_sub_source();
- filter_stack& fs = tss->get_filters();
- auto tf = *(fs.begin() + line);
- bool selected
- = lnav_data.ld_mode == ln_mode_t::FILTER && line == tc.get_selection();
-
- if (selected) {
- value_out.emplace_back(line_range{0, 1}, VC_GRAPHIC.value(ACS_RARROW));
- }
-
- chtype enabled = tf->is_enabled() ? ACS_DIAMOND : ' ';
-
- line_range lr{2, 3};
- value_out.emplace_back(lr, VC_GRAPHIC.value(enabled));
- if (tf->is_enabled()) {
- value_out.emplace_back(lr, VC_FOREGROUND.value(COLOR_GREEN));
- }
-
- if (selected) {
- value_out.emplace_back(line_range{0, -1},
- VC_ROLE.value(role_t::VCR_FOCUSED));
+ {
+ auto ag = alb.with_attr(VC_ROLE.value(role_t::VCR_NUMBER));
+ if (this->fss_editing && line == tc.get_selection()) {
+ alb.appendf(FMT_STRING("{:>9}"), "-");
+ } else {
+ alb.appendf(FMT_STRING("{:>9}"),
+ tss->get_filtered_count_for(tf->get_index()));
+ }
}
- role_t fg_role = tf->get_type() == text_filter::INCLUDE ? role_t::VCR_OK
- : role_t::VCR_ERROR;
- value_out.emplace_back(line_range{4, 7}, VC_ROLE.value(fg_role));
- value_out.emplace_back(line_range{4, 7},
- VC_STYLE.value(text_attrs{A_BOLD}));
-
- value_out.emplace_back(line_range{8, 17},
- VC_STYLE.value(text_attrs{A_BOLD}));
- value_out.emplace_back(line_range{23, 24}, VC_GRAPHIC.value(ACS_VLINE));
+ al.append(" hits ").append("|", VC_GRAPHIC.value(ACS_VLINE)).append(" ");
attr_line_t content{tf->get_id()};
- auto& content_attrs = content.get_attrs();
-
switch (tf->get_lang()) {
case filter_lang_t::REGEX:
readline_regex_highlighter(content, content.length());
@@ -391,10 +385,21 @@ filter_sub_source::text_attrs_for_line(textview_curses& tc,
case filter_lang_t::NONE:
break;
}
+ al.append(content);
+
+ if (selected) {
+ al.with_attr_for_all(VC_ROLE.value(role_t::VCR_FOCUSED));
+ }
- shift_string_attrs(content_attrs, 0, 25);
- value_out.insert(
- value_out.end(), content_attrs.begin(), content_attrs.end());
+ value_out = al.get_string();
+}
+
+void
+filter_sub_source::text_attrs_for_line(textview_curses& tc,
+ int line,
+ string_attrs_t& value_out)
+{
+ value_out = this->fss_curr_line.get_attrs();
}
size_t
@@ -428,25 +433,35 @@ filter_sub_source::rl_change(readline_curses* rc)
case filter_lang_t::NONE:
break;
case filter_lang_t::REGEX: {
- auto regex_res
- = lnav::pcre2pp::code::from(new_value, PCRE2_CASELESS);
-
- if (regex_res.isErr()) {
- auto pe = regex_res.unwrapErr();
- lnav_data.ld_filter_help_status_source.fss_error.set_value(
- "error: %s", pe.get_message().c_str());
+ if (new_value.empty()) {
+ auto sugg = top_view->get_current_search();
+ if (top_view->tc_selected_text) {
+ sugg = top_view->tc_selected_text->sti_value;
+ }
+ if (fs.get_filter(sugg) == nullptr) {
+ this->fss_editor->set_suggestion(sugg);
+ }
} else {
- auto& hm = top_view->get_highlights();
- highlighter hl(regex_res.unwrap().to_shared());
- auto role = tf->get_type() == text_filter::EXCLUDE
- ? role_t::VCR_DIFF_DELETE
- : role_t::VCR_DIFF_ADD;
- hl.with_role(role);
- hl.with_attrs(text_attrs{A_BLINK | A_REVERSE});
-
- hm[{highlight_source_t::PREVIEW, "preview"}] = hl;
- top_view->set_needs_update();
- lnav_data.ld_filter_help_status_source.fss_error.clear();
+ auto regex_res
+ = lnav::pcre2pp::code::from(new_value, PCRE2_CASELESS);
+
+ if (regex_res.isErr()) {
+ auto pe = regex_res.unwrapErr();
+ lnav_data.ld_filter_help_status_source.fss_error.set_value(
+ "error: %s", pe.get_message().c_str());
+ } else {
+ auto& hm = top_view->get_highlights();
+ highlighter hl(regex_res.unwrap().to_shared());
+ auto role = tf->get_type() == text_filter::EXCLUDE
+ ? role_t::VCR_DIFF_DELETE
+ : role_t::VCR_DIFF_ADD;
+ hl.with_role(role);
+ hl.with_attrs(text_attrs{A_BLINK | A_REVERSE});
+
+ hm[{highlight_source_t::PREVIEW, "preview"}] = hl;
+ top_view->set_needs_update();
+ lnav_data.ld_filter_help_status_source.fss_error.clear();
+ }
}
break;
}
@@ -579,6 +594,7 @@ filter_sub_source::rl_perform(readline_curses* rc)
lnav_data.ld_log_source.set_preview_sql_filter(nullptr);
lnav_data.ld_filter_help_status_source.fss_prompt.clear();
this->fss_editing = false;
+ this->tss_view->vc_enabled = true;
this->fss_editor->set_visible(false);
top_view->reload_data();
this->tss_view->reload_data();
@@ -602,6 +618,7 @@ filter_sub_source::rl_abort(readline_curses* rc)
this->tss_view->reload_data();
this->fss_editor->set_visible(false);
this->fss_editing = false;
+ this->tss_view->vc_enabled = true;
this->tss_view->set_needs_update();
tf->set_enabled(this->fss_filter_state);
tss->text_filters_changed();
@@ -643,7 +660,7 @@ filter_sub_source::rl_display_matches(readline_curses* rc)
this->fss_match_view.set_window(this->tss_view->get_window());
this->fss_match_view.set_y(rc->get_y() + 1);
- this->fss_match_view.set_x(rc->get_left() + rc->get_match_start());
+ this->fss_match_view.set_x(rc->get_x() + rc->get_match_start());
this->fss_match_view.set_width(width + 3);
this->fss_match_view.set_needs_update();
this->fss_match_view.reload_data();
@@ -667,3 +684,25 @@ filter_sub_source::list_input_handle_scroll_out(listview_curses& lv)
lnav_data.ld_mode = ln_mode_t::PAGING;
lnav_data.ld_filter_view.reload_data();
}
+
+bool
+filter_sub_source::text_handle_mouse(
+ textview_curses& tc,
+ const listview_curses::display_line_content_t&,
+ mouse_event& me)
+{
+ if (this->fss_editing) {
+ return true;
+ }
+ if (me.is_click_in(mouse_button_t::BUTTON_LEFT, 1, 3)) {
+ this->list_input_handle_key(tc, ' ');
+ }
+ if (me.is_click_in(mouse_button_t::BUTTON_LEFT, 4, 7)) {
+ this->list_input_handle_key(tc, 't');
+ }
+ if (me.is_double_click_in(mouse_button_t::BUTTON_LEFT, line_range{25, -1}))
+ {
+ this->list_input_handle_key(tc, '\r');
+ }
+ return true;
+}
diff --git a/src/filter_sub_source.hh b/src/filter_sub_source.hh
index 11587da..6f16bdc 100644
--- a/src/filter_sub_source.hh
+++ b/src/filter_sub_source.hh
@@ -37,7 +37,8 @@
class filter_sub_source
: public text_sub_source
- , public list_input_delegate {
+ , public list_input_delegate
+ , public text_delegate {
public:
filter_sub_source(std::shared_ptr<readline_curses> editor);
@@ -52,6 +53,8 @@ public:
void list_input_handle_scroll_out(listview_curses& lv) override;
+ void register_view(textview_curses* tc) override;
+
size_t text_line_count() override;
size_t text_line_width(textview_curses& curses) override;
@@ -69,6 +72,10 @@ public:
int line,
line_flags_t raw) override;
+ bool text_handle_mouse(textview_curses& tc,
+ const listview_curses::display_line_content_t&,
+ mouse_event& me) override;
+
void rl_change(readline_curses* rc);
void rl_perform(readline_curses* rc);
@@ -84,6 +91,7 @@ public:
std::shared_ptr<readline_curses> fss_editor;
plain_text_source fss_match_source;
textview_curses fss_match_view;
+ attr_line_t fss_curr_line;
bool fss_editing{false};
bool fss_filter_state{false};
diff --git a/src/fmtlib/fmt/args.h b/src/fmtlib/fmt/args.h
index a3966d1..2d684e7 100644
--- a/src/fmtlib/fmt/args.h
+++ b/src/fmtlib/fmt/args.h
@@ -1,4 +1,4 @@
-// Formatting library for C++ - dynamic format arguments
+// Formatting library for C++ - dynamic argument lists
//
// Copyright (c) 2012 - present, Victor Zverovich
// All rights reserved.
diff --git a/src/fmtlib/fmt/chrono.h b/src/fmtlib/fmt/chrono.h
index 55e8a50..ff3e144 100644
--- a/src/fmtlib/fmt/chrono.h
+++ b/src/fmtlib/fmt/chrono.h
@@ -377,8 +377,8 @@ auto write_encoded_tm_str(OutputIt out, string_view in, const std::locale& loc)
unit_t unit;
write_codecvt(unit, in, loc);
// In UTF-8 is used one to four one-byte code units.
- unicode_to_utf8<code_unit, basic_memory_buffer<char, unit_t::max_size * 4>>
- u;
+ auto u =
+ to_utf8<code_unit, basic_memory_buffer<char, unit_t::max_size * 4>>();
if (!u.convert({unit.buf, to_unsigned(unit.end - unit.buf)}))
FMT_THROW(format_error("failed to format time"));
return copy_str<char>(u.c_str(), u.c_str() + u.size(), out);
@@ -519,7 +519,7 @@ inline std::tm gmtime(std::time_t time) {
}
#endif
};
- dispatcher gt(time);
+ auto gt = dispatcher(time);
// Too big time values may be unsupported.
if (!gt.run()) FMT_THROW(format_error("time_t value out of range"));
return gt.tm_;
@@ -530,50 +530,7 @@ inline std::tm gmtime(
return gmtime(std::chrono::system_clock::to_time_t(time_point));
}
-FMT_BEGIN_DETAIL_NAMESPACE
-
-// DEPRECATED!
-template <typename Char>
-FMT_CONSTEXPR auto parse_align(const Char* begin, const Char* end,
- format_specs<Char>& specs) -> const Char* {
- FMT_ASSERT(begin != end, "");
- auto align = align::none;
- auto p = begin + code_point_length(begin);
- if (end - p <= 0) p = begin;
- for (;;) {
- switch (to_ascii(*p)) {
- case '<':
- align = align::left;
- break;
- case '>':
- align = align::right;
- break;
- case '^':
- align = align::center;
- break;
- }
- if (align != align::none) {
- if (p != begin) {
- auto c = *begin;
- if (c == '}') return begin;
- if (c == '{') {
- throw_format_error("invalid fill character '{'");
- return begin;
- }
- specs.fill = {begin, to_unsigned(p - begin)};
- begin = p + 1;
- } else {
- ++begin;
- }
- break;
- } else if (p == begin) {
- break;
- }
- p = begin;
- }
- specs.align = align;
- return begin;
-}
+namespace detail {
// Writes two-digit numbers a, b and c separated by sep to buf.
// The method by Pavel Novikov based on
@@ -1997,7 +1954,7 @@ struct chrono_formatter {
}
};
-FMT_END_DETAIL_NAMESPACE
+} // namespace detail
#if defined(__cpp_lib_chrono) && __cpp_lib_chrono >= 201907
using weekday = std::chrono::weekday;
@@ -2047,80 +2004,67 @@ template <typename Char> struct formatter<weekday, Char> {
template <typename Rep, typename Period, typename Char>
struct formatter<std::chrono::duration<Rep, Period>, Char> {
private:
- format_specs<Char> specs;
- int precision = -1;
- using arg_ref_type = detail::arg_ref<Char>;
- arg_ref_type width_ref;
- arg_ref_type precision_ref;
- bool localized = false;
- basic_string_view<Char> format_str;
- using duration = std::chrono::duration<Rep, Period>;
+ format_specs<Char> specs_;
+ detail::arg_ref<Char> width_ref_;
+ detail::arg_ref<Char> precision_ref_;
+ bool localized_ = false;
+ basic_string_view<Char> format_str_;
- using iterator = typename basic_format_parse_context<Char>::iterator;
- struct parse_range {
- iterator begin;
- iterator end;
- };
-
- FMT_CONSTEXPR parse_range do_parse(basic_format_parse_context<Char>& ctx) {
- auto begin = ctx.begin(), end = ctx.end();
- if (begin == end || *begin == '}') return {begin, begin};
+ public:
+ FMT_CONSTEXPR auto parse(basic_format_parse_context<Char>& ctx)
+ -> decltype(ctx.begin()) {
+ auto it = ctx.begin(), end = ctx.end();
+ if (it == end || *it == '}') return it;
- begin = detail::parse_align(begin, end, specs);
- if (begin == end) return {begin, begin};
+ it = detail::parse_align(it, end, specs_);
+ if (it == end) return it;
- begin = detail::parse_dynamic_spec(begin, end, specs.width, width_ref, ctx);
- if (begin == end) return {begin, begin};
+ it = detail::parse_dynamic_spec(it, end, specs_.width, width_ref_, ctx);
+ if (it == end) return it;
auto checker = detail::chrono_format_checker();
- if (*begin == '.') {
+ if (*it == '.') {
checker.has_precision_integral = !std::is_floating_point<Rep>::value;
- begin =
- detail::parse_precision(begin, end, precision, precision_ref, ctx);
+ it = detail::parse_precision(it, end, specs_.precision, precision_ref_,
+ ctx);
}
- if (begin != end && *begin == 'L') {
- ++begin;
- localized = true;
+ if (it != end && *it == 'L') {
+ localized_ = true;
+ ++it;
}
- end = detail::parse_chrono_format(begin, end, checker);
- return {begin, end};
- }
-
- public:
- FMT_CONSTEXPR auto parse(basic_format_parse_context<Char>& ctx)
- -> decltype(ctx.begin()) {
- auto range = do_parse(ctx);
- format_str = basic_string_view<Char>(
- &*range.begin, detail::to_unsigned(range.end - range.begin));
- return range.end;
+ end = detail::parse_chrono_format(it, end, checker);
+ format_str_ = {it, detail::to_unsigned(end - it)};
+ return end;
}
template <typename FormatContext>
- auto format(const duration& d, FormatContext& ctx) const
+ auto format(std::chrono::duration<Rep, Period> d, FormatContext& ctx) const
-> decltype(ctx.out()) {
- auto specs_copy = specs;
- auto precision_copy = precision;
- auto begin = format_str.begin(), end = format_str.end();
+ auto specs = specs_;
+ auto precision = specs.precision;
+ specs.precision = -1;
+ auto begin = format_str_.begin(), end = format_str_.end();
// As a possible future optimization, we could avoid extra copying if width
// is not specified.
- basic_memory_buffer<Char> buf;
+ auto buf = basic_memory_buffer<Char>();
auto out = std::back_inserter(buf);
- detail::handle_dynamic_spec<detail::width_checker>(specs_copy.width,
- width_ref, ctx);
- detail::handle_dynamic_spec<detail::precision_checker>(precision_copy,
- precision_ref, ctx);
+ detail::handle_dynamic_spec<detail::width_checker>(specs.width, width_ref_,
+ ctx);
+ detail::handle_dynamic_spec<detail::precision_checker>(precision,
+ precision_ref_, ctx);
if (begin == end || *begin == '}') {
- out = detail::format_duration_value<Char>(out, d.count(), precision_copy);
+ out = detail::format_duration_value<Char>(out, d.count(), precision);
detail::format_duration_unit<Char, Period>(out);
} else {
- detail::chrono_formatter<FormatContext, decltype(out), Rep, Period> f(
- ctx, out, d);
- f.precision = precision_copy;
- f.localized = localized;
+ using chrono_formatter =
+ detail::chrono_formatter<FormatContext, decltype(out), Rep, Period>;
+ auto f = chrono_formatter(ctx, out, d);
+ f.precision = precision;
+ f.localized = localized_;
detail::parse_chrono_format(begin, end, f);
}
return detail::write(
- ctx.out(), basic_string_view<Char>(buf.data(), buf.size()), specs_copy);
+ ctx.out(), basic_string_view<Char>(buf.data(), buf.size()), specs);
}
};
@@ -2128,21 +2072,23 @@ template <typename Char, typename Duration>
struct formatter<std::chrono::time_point<std::chrono::system_clock, Duration>,
Char> : formatter<std::tm, Char> {
FMT_CONSTEXPR formatter() {
- this->format_str = detail::string_literal<Char, '%', 'F', ' ', '%', 'T'>{};
+ this->format_str_ = detail::string_literal<Char, '%', 'F', ' ', '%', 'T'>{};
}
template <typename FormatContext>
auto format(std::chrono::time_point<std::chrono::system_clock, Duration> val,
FormatContext& ctx) const -> decltype(ctx.out()) {
using period = typename Duration::period;
- if (period::num != 1 || period::den != 1 ||
- std::is_floating_point<typename Duration::rep>::value) {
+ if (detail::const_check(
+ period::num != 1 || period::den != 1 ||
+ std::is_floating_point<typename Duration::rep>::value)) {
const auto epoch = val.time_since_epoch();
auto subsecs = std::chrono::duration_cast<Duration>(
epoch - std::chrono::duration_cast<std::chrono::seconds>(epoch));
if (subsecs.count() < 0) {
- auto second = std::chrono::seconds(1);
+ auto second =
+ std::chrono::duration_cast<Duration>(std::chrono::seconds(1));
if (epoch.count() < ((Duration::min)() + second).count())
FMT_THROW(format_error("duration is too small"));
subsecs += second;
@@ -2164,7 +2110,7 @@ template <typename Char, typename Duration>
struct formatter<std::chrono::local_time<Duration>, Char>
: formatter<std::tm, Char> {
FMT_CONSTEXPR formatter() {
- this->format_str = detail::string_literal<Char, '%', 'F', ' ', '%', 'T'>{};
+ this->format_str_ = detail::string_literal<Char, '%', 'F', ' ', '%', 'T'>{};
}
template <typename FormatContext>
@@ -2207,51 +2153,46 @@ struct formatter<std::chrono::time_point<std::chrono::utc_clock, Duration>,
template <typename Char> struct formatter<std::tm, Char> {
private:
- format_specs<Char> specs;
- detail::arg_ref<Char> width_ref;
+ format_specs<Char> specs_;
+ detail::arg_ref<Char> width_ref_;
protected:
- basic_string_view<Char> format_str;
-
- FMT_CONSTEXPR auto do_parse(basic_format_parse_context<Char>& ctx)
- -> decltype(ctx.begin()) {
- auto begin = ctx.begin(), end = ctx.end();
- if (begin == end || *begin == '}') return begin;
-
- begin = detail::parse_align(begin, end, specs);
- if (begin == end) return end;
-
- begin = detail::parse_dynamic_spec(begin, end, specs.width, width_ref, ctx);
- if (begin == end) return end;
-
- end = detail::parse_chrono_format(begin, end, detail::tm_format_checker());
- // Replace default format_str only if the new spec is not empty.
- if (end != begin) format_str = {begin, detail::to_unsigned(end - begin)};
- return end;
- }
+ basic_string_view<Char> format_str_;
template <typename FormatContext, typename Duration>
auto do_format(const std::tm& tm, FormatContext& ctx,
const Duration* subsecs) const -> decltype(ctx.out()) {
- auto specs_copy = specs;
- basic_memory_buffer<Char> buf;
+ auto specs = specs_;
+ auto buf = basic_memory_buffer<Char>();
auto out = std::back_inserter(buf);
- detail::handle_dynamic_spec<detail::width_checker>(specs_copy.width,
- width_ref, ctx);
+ detail::handle_dynamic_spec<detail::width_checker>(specs.width, width_ref_,
+ ctx);
- const auto loc_ref = ctx.locale();
+ auto loc_ref = ctx.locale();
detail::get_locale loc(static_cast<bool>(loc_ref), loc_ref);
auto w =
detail::tm_writer<decltype(out), Char, Duration>(loc, out, tm, subsecs);
- detail::parse_chrono_format(format_str.begin(), format_str.end(), w);
+ detail::parse_chrono_format(format_str_.begin(), format_str_.end(), w);
return detail::write(
- ctx.out(), basic_string_view<Char>(buf.data(), buf.size()), specs_copy);
+ ctx.out(), basic_string_view<Char>(buf.data(), buf.size()), specs);
}
public:
FMT_CONSTEXPR auto parse(basic_format_parse_context<Char>& ctx)
-> decltype(ctx.begin()) {
- return this->do_parse(ctx);
+ auto it = ctx.begin(), end = ctx.end();
+ if (it == end || *it == '}') return it;
+
+ it = detail::parse_align(it, end, specs_);
+ if (it == end) return it;
+
+ it = detail::parse_dynamic_spec(it, end, specs_.width, width_ref_, ctx);
+ if (it == end) return it;
+
+ end = detail::parse_chrono_format(it, end, detail::tm_format_checker());
+ // Replace the default format_str only if the new spec is not empty.
+ if (end != it) format_str_ = {it, detail::to_unsigned(end - it)};
+ return end;
}
template <typename FormatContext>
diff --git a/src/fmtlib/fmt/color.h b/src/fmtlib/fmt/color.h
index d175448..8697e1c 100644
--- a/src/fmtlib/fmt/color.h
+++ b/src/fmtlib/fmt/color.h
@@ -203,7 +203,7 @@ struct rgb {
uint8_t b;
};
-FMT_BEGIN_DETAIL_NAMESPACE
+namespace detail {
// color is a struct of either a rgb color or a terminal color.
struct color_type {
@@ -225,8 +225,7 @@ struct color_type {
uint32_t rgb_color;
} value;
};
-
-FMT_END_DETAIL_NAMESPACE
+} // namespace detail
/** A text style consisting of foreground and background colors and emphasis. */
class text_style {
@@ -323,7 +322,7 @@ FMT_CONSTEXPR inline text_style operator|(emphasis lhs, emphasis rhs) noexcept {
return text_style(lhs) | rhs;
}
-FMT_BEGIN_DETAIL_NAMESPACE
+namespace detail {
template <typename Char> struct ansi_color_escape {
FMT_CONSTEXPR ansi_color_escape(detail::color_type text_color,
@@ -457,7 +456,7 @@ void vformat_to(buffer<Char>& buf, const text_style& ts,
if (has_style) detail::reset_color<Char>(buf);
}
-FMT_END_DETAIL_NAMESPACE
+} // namespace detail
inline void vprint(std::FILE* f, const text_style& ts, string_view fmt,
format_args args) {
diff --git a/src/fmtlib/fmt/compile.h b/src/fmtlib/fmt/compile.h
index 94e13c0..a4c7e49 100644
--- a/src/fmtlib/fmt/compile.h
+++ b/src/fmtlib/fmt/compile.h
@@ -19,84 +19,6 @@ FMT_CONSTEXPR inline counting_iterator copy_str(InputIt begin, InputIt end,
return it + (end - begin);
}
-template <typename OutputIt> class truncating_iterator_base {
- protected:
- OutputIt out_;
- size_t limit_;
- size_t count_ = 0;
-
- truncating_iterator_base() : out_(), limit_(0) {}
-
- truncating_iterator_base(OutputIt out, size_t limit)
- : out_(out), limit_(limit) {}
-
- public:
- using iterator_category = std::output_iterator_tag;
- using value_type = typename std::iterator_traits<OutputIt>::value_type;
- using difference_type = std::ptrdiff_t;
- using pointer = void;
- using reference = void;
- FMT_UNCHECKED_ITERATOR(truncating_iterator_base);
-
- OutputIt base() const { return out_; }
- size_t count() const { return count_; }
-};
-
-// An output iterator that truncates the output and counts the number of objects
-// written to it.
-template <typename OutputIt,
- typename Enable = typename std::is_void<
- typename std::iterator_traits<OutputIt>::value_type>::type>
-class truncating_iterator;
-
-template <typename OutputIt>
-class truncating_iterator<OutputIt, std::false_type>
- : public truncating_iterator_base<OutputIt> {
- mutable typename truncating_iterator_base<OutputIt>::value_type blackhole_;
-
- public:
- using value_type = typename truncating_iterator_base<OutputIt>::value_type;
-
- truncating_iterator() = default;
-
- truncating_iterator(OutputIt out, size_t limit)
- : truncating_iterator_base<OutputIt>(out, limit) {}
-
- truncating_iterator& operator++() {
- if (this->count_++ < this->limit_) ++this->out_;
- return *this;
- }
-
- truncating_iterator operator++(int) {
- auto it = *this;
- ++*this;
- return it;
- }
-
- value_type& operator*() const {
- return this->count_ < this->limit_ ? *this->out_ : blackhole_;
- }
-};
-
-template <typename OutputIt>
-class truncating_iterator<OutputIt, std::true_type>
- : public truncating_iterator_base<OutputIt> {
- public:
- truncating_iterator() = default;
-
- truncating_iterator(OutputIt out, size_t limit)
- : truncating_iterator_base<OutputIt>(out, limit) {}
-
- template <typename T> truncating_iterator& operator=(T val) {
- if (this->count_++ < this->limit_) *this->out_++ = val;
- return *this;
- }
-
- truncating_iterator& operator++() { return *this; }
- truncating_iterator& operator++(int) { return *this; }
- truncating_iterator& operator*() { return *this; }
-};
-
// A compile-time string which is compiled into fast formatting code.
class compiled_string {};
@@ -196,7 +118,8 @@ template <typename Char> struct code_unit {
template <typename OutputIt, typename... Args>
constexpr OutputIt format(OutputIt out, const Args&...) const {
- return write<Char>(out, value);
+ *out++ = value;
+ return out;
}
};
@@ -220,7 +143,12 @@ template <typename Char, typename T, int N> struct field {
template <typename OutputIt, typename... Args>
constexpr OutputIt format(OutputIt out, const Args&... args) const {
- return write<Char>(out, get_arg_checked<T, N>(args...));
+ const T& arg = get_arg_checked<T, N>(args...);
+ if constexpr (std::is_convertible_v<T, basic_string_view<Char>>) {
+ auto s = basic_string_view<Char>(arg);
+ return copy_str<Char>(s.begin(), s.end(), out);
+ }
+ return write<Char>(out, arg);
}
};
@@ -448,20 +376,18 @@ constexpr auto compile_format_string(S format_str) {
} else if constexpr (arg_id_result.arg_id.kind == arg_id_kind::name) {
constexpr auto arg_index =
get_arg_index_by_name(arg_id_result.arg_id.val.name, Args{});
- if constexpr (arg_index != invalid_arg_index) {
+ if constexpr (arg_index >= 0) {
constexpr auto next_id =
ID != manual_indexing_id ? ID + 1 : manual_indexing_id;
return parse_replacement_field_then_tail<
decltype(get_type<arg_index, Args>::value), Args, arg_id_end_pos,
arg_index, next_id>(format_str);
- } else {
- if constexpr (c == '}') {
- return parse_tail<Args, arg_id_end_pos + 1, ID>(
- runtime_named_field<char_type>{arg_id_result.arg_id.val.name},
- format_str);
- } else if constexpr (c == ':') {
- return unknown_format(); // no type info for specs parsing
- }
+ } else if constexpr (c == '}') {
+ return parse_tail<Args, arg_id_end_pos + 1, ID>(
+ runtime_named_field<char_type>{arg_id_result.arg_id.val.name},
+ format_str);
+ } else if constexpr (c == ':') {
+ return unknown_format(); // no type info for specs parsing
}
}
}
@@ -564,9 +490,10 @@ template <typename OutputIt, typename S, typename... Args,
FMT_ENABLE_IF(detail::is_compiled_string<S>::value)>
format_to_n_result<OutputIt> format_to_n(OutputIt out, size_t n,
const S& format_str, Args&&... args) {
- auto it = fmt::format_to(detail::truncating_iterator<OutputIt>(out, n),
- format_str, std::forward<Args>(args)...);
- return {it.base(), it.count()};
+ using traits = detail::fixed_buffer_traits;
+ auto buf = detail::iterator_buffer<OutputIt, char, traits>(out, n);
+ format_to(std::back_inserter(buf), format_str, std::forward<Args>(args)...);
+ return {buf.out(), buf.count()};
}
template <typename S, typename... Args,
diff --git a/src/fmtlib/fmt/core.h b/src/fmtlib/fmt/core.h
index 46723d5..f9e3b7d 100644
--- a/src/fmtlib/fmt/core.h
+++ b/src/fmtlib/fmt/core.h
@@ -13,11 +13,12 @@
#include <cstring> // std::strlen
#include <iterator>
#include <limits>
+#include <memory> // std::addressof
#include <string>
#include <type_traits>
// The fmt library version in the form major * 10000 + minor * 100 + patch.
-#define FMT_VERSION 100000
+#define FMT_VERSION 100101
#if defined(__clang__) && !defined(__ibmxl__)
# define FMT_CLANG_VERSION (__clang_major__ * 100 + __clang_minor__)
@@ -92,7 +93,7 @@
#ifndef FMT_USE_CONSTEXPR
# if (FMT_HAS_FEATURE(cxx_relaxed_constexpr) || FMT_MSC_VERSION >= 1912 || \
(FMT_GCC_VERSION >= 600 && FMT_CPLUSPLUS >= 201402L)) && \
- !FMT_ICC_VERSION && !defined(__NVCC__)
+ !FMT_ICC_VERSION && (!defined(__NVCC__) || FMT_CPLUSPLUS >= 202002L)
# define FMT_USE_CONSTEXPR 1
# else
# define FMT_USE_CONSTEXPR 0
@@ -162,9 +163,6 @@
# endif
#endif
-// An inline std::forward replacement.
-#define FMT_FORWARD(...) static_cast<decltype(__VA_ARGS__)&&>(__VA_ARGS__)
-
#ifdef _MSC_VER
# define FMT_UNCHECKED_ITERATOR(It) \
using _Unchecked_type = It // Mark iterator as checked.
@@ -181,8 +179,8 @@
}
#endif
-#ifndef FMT_MODULE_EXPORT
-# define FMT_MODULE_EXPORT
+#ifndef FMT_EXPORT
+# define FMT_EXPORT
# define FMT_BEGIN_EXPORT
# define FMT_END_EXPORT
#endif
@@ -244,12 +242,6 @@
# endif
#endif
-#if defined __cpp_inline_variables && __cpp_inline_variables >= 201606L
-# define FMT_INLINE_VARIABLE inline
-#else
-# define FMT_INLINE_VARIABLE
-#endif
-
// Enable minimal optimizations for more compact code in debug mode.
FMT_GCC_PRAGMA("GCC push_options")
#if !defined(__OPTIMIZE__) && !defined(__NVCOMPILER) && !defined(__LCC__) && \
@@ -276,6 +268,11 @@ template <typename T> using type_identity_t = typename type_identity<T>::type;
template <typename T>
using underlying_t = typename std::underlying_type<T>::type;
+// Checks whether T is a container with contiguous storage.
+template <typename T> struct is_contiguous : std::false_type {};
+template <typename Char>
+struct is_contiguous<std::basic_string<Char>> : std::true_type {};
+
struct monostate {
constexpr monostate() {}
};
@@ -289,8 +286,11 @@ struct monostate {
# define FMT_ENABLE_IF(...) fmt::enable_if_t<(__VA_ARGS__), int> = 0
#endif
+// This is defined in core.h instead of format.h to avoid injecting in std.
+// It is a template to avoid undesirable implicit conversions to std::byte.
#ifdef __cpp_lib_byte
-inline auto format_as(std::byte b) -> unsigned char {
+template <typename T, FMT_ENABLE_IF(std::is_same<T, std::byte>::value)>
+inline auto format_as(T b) -> unsigned char {
return static_cast<unsigned char>(b);
}
#endif
@@ -394,7 +394,7 @@ FMT_CONSTEXPR inline auto is_utf8() -> bool {
compiled with a different ``-std`` option than the client code (which is not
recommended).
*/
-FMT_MODULE_EXPORT
+FMT_EXPORT
template <typename Char> class basic_string_view {
private:
const Char* data_;
@@ -497,11 +497,11 @@ template <typename Char> class basic_string_view {
}
};
-FMT_MODULE_EXPORT
+FMT_EXPORT
using string_view = basic_string_view<char>;
/** Specifies if ``T`` is a character type. Can be specialized by users. */
-FMT_MODULE_EXPORT
+FMT_EXPORT
template <typename T> struct is_char : std::false_type {};
template <> struct is_char<char> : std::true_type {};
@@ -639,6 +639,9 @@ struct error_handler {
};
} // namespace detail
+/** Throws ``format_error`` with a given message. */
+using detail::throw_format_error;
+
/** String's character type. */
template <typename S> using char_t = typename detail::char_t_impl<S>::type;
@@ -649,7 +652,7 @@ template <typename S> using char_t = typename detail::char_t_impl<S>::type;
You can use the ``format_parse_context`` type alias for ``char`` instead.
\endrst
*/
-FMT_MODULE_EXPORT
+FMT_EXPORT
template <typename Char> class basic_format_parse_context {
private:
basic_string_view<Char> format_str_;
@@ -715,7 +718,7 @@ template <typename Char> class basic_format_parse_context {
FMT_CONSTEXPR void check_dynamic_spec(int arg_id);
};
-FMT_MODULE_EXPORT
+FMT_EXPORT
using format_parse_context = basic_format_parse_context<char>;
namespace detail {
@@ -756,72 +759,6 @@ class compile_parse_context : public basic_format_parse_context<Char> {
#endif
}
};
-} // namespace detail
-
-template <typename Char>
-FMT_CONSTEXPR void basic_format_parse_context<Char>::do_check_arg_id(int id) {
- // Argument id is only checked at compile-time during parsing because
- // formatting has its own validation.
- if (detail::is_constant_evaluated() &&
- (!FMT_GCC_VERSION || FMT_GCC_VERSION >= 1200)) {
- using context = detail::compile_parse_context<Char>;
- if (id >= static_cast<context*>(this)->num_args())
- detail::throw_format_error("argument not found");
- }
-}
-
-template <typename Char>
-FMT_CONSTEXPR void basic_format_parse_context<Char>::check_dynamic_spec(
- int arg_id) {
- if (detail::is_constant_evaluated() &&
- (!FMT_GCC_VERSION || FMT_GCC_VERSION >= 1200)) {
- using context = detail::compile_parse_context<Char>;
- static_cast<context*>(this)->check_dynamic_spec(arg_id);
- }
-}
-
-FMT_MODULE_EXPORT template <typename Context> class basic_format_arg;
-FMT_MODULE_EXPORT template <typename Context> class basic_format_args;
-FMT_MODULE_EXPORT template <typename Context> class dynamic_format_arg_store;
-
-// A formatter for objects of type T.
-FMT_MODULE_EXPORT
-template <typename T, typename Char = char, typename Enable = void>
-struct formatter {
- // A deleted default constructor indicates a disabled formatter.
- formatter() = delete;
-};
-
-// Specifies if T has an enabled formatter specialization. A type can be
-// formattable even if it doesn't have a formatter e.g. via a conversion.
-template <typename T, typename Context>
-using has_formatter =
- std::is_constructible<typename Context::template formatter_type<T>>;
-
-// Checks whether T is a container with contiguous storage.
-template <typename T> struct is_contiguous : std::false_type {};
-template <typename Char>
-struct is_contiguous<std::basic_string<Char>> : std::true_type {};
-
-class appender;
-
-namespace detail {
-
-template <typename Context, typename T>
-constexpr auto has_const_formatter_impl(T*)
- -> decltype(typename Context::template formatter_type<T>().format(
- std::declval<const T&>(), std::declval<Context&>()),
- true) {
- return true;
-}
-template <typename Context>
-constexpr auto has_const_formatter_impl(...) -> bool {
- return false;
-}
-template <typename T, typename Context>
-constexpr auto has_const_formatter() -> bool {
- return has_const_formatter_impl<Context>(static_cast<T*>(nullptr));
-}
// Extracts a reference to the container from back_insert_iterator.
template <typename Container>
@@ -903,10 +840,8 @@ template <typename T> class buffer {
/** Returns the capacity of this buffer. */
constexpr auto capacity() const noexcept -> size_t { return capacity_; }
- /** Returns a pointer to the buffer data. */
+ /** Returns a pointer to the buffer data (not null-terminated). */
FMT_CONSTEXPR auto data() noexcept -> T* { return ptr_; }
-
- /** Returns a pointer to the buffer data. */
FMT_CONSTEXPR auto data() const noexcept -> const T* { return ptr_; }
/** Clears this buffer. */
@@ -1099,6 +1034,79 @@ template <typename T = char> class counting_buffer final : public buffer<T> {
auto count() -> size_t { return count_ + this->size(); }
};
+} // namespace detail
+
+template <typename Char>
+FMT_CONSTEXPR void basic_format_parse_context<Char>::do_check_arg_id(int id) {
+ // Argument id is only checked at compile-time during parsing because
+ // formatting has its own validation.
+ if (detail::is_constant_evaluated() &&
+ (!FMT_GCC_VERSION || FMT_GCC_VERSION >= 1200)) {
+ using context = detail::compile_parse_context<Char>;
+ if (id >= static_cast<context*>(this)->num_args())
+ detail::throw_format_error("argument not found");
+ }
+}
+
+template <typename Char>
+FMT_CONSTEXPR void basic_format_parse_context<Char>::check_dynamic_spec(
+ int arg_id) {
+ if (detail::is_constant_evaluated() &&
+ (!FMT_GCC_VERSION || FMT_GCC_VERSION >= 1200)) {
+ using context = detail::compile_parse_context<Char>;
+ static_cast<context*>(this)->check_dynamic_spec(arg_id);
+ }
+}
+
+FMT_EXPORT template <typename Context> class basic_format_arg;
+FMT_EXPORT template <typename Context> class basic_format_args;
+FMT_EXPORT template <typename Context> class dynamic_format_arg_store;
+
+// A formatter for objects of type T.
+FMT_EXPORT
+template <typename T, typename Char = char, typename Enable = void>
+struct formatter {
+ // A deleted default constructor indicates a disabled formatter.
+ formatter() = delete;
+};
+
+// Specifies if T has an enabled formatter specialization. A type can be
+// formattable even if it doesn't have a formatter e.g. via a conversion.
+template <typename T, typename Context>
+using has_formatter =
+ std::is_constructible<typename Context::template formatter_type<T>>;
+
+// An output iterator that appends to a buffer.
+// It is used to reduce symbol sizes for the common case.
+class appender : public std::back_insert_iterator<detail::buffer<char>> {
+ using base = std::back_insert_iterator<detail::buffer<char>>;
+
+ public:
+ using std::back_insert_iterator<detail::buffer<char>>::back_insert_iterator;
+ appender(base it) noexcept : base(it) {}
+ FMT_UNCHECKED_ITERATOR(appender);
+
+ auto operator++() noexcept -> appender& { return *this; }
+ auto operator++(int) noexcept -> appender { return *this; }
+};
+
+namespace detail {
+
+template <typename Context, typename T>
+constexpr auto has_const_formatter_impl(T*)
+ -> decltype(typename Context::template formatter_type<T>().format(
+ std::declval<const T&>(), std::declval<Context&>()),
+ true) {
+ return true;
+}
+template <typename Context>
+constexpr auto has_const_formatter_impl(...) -> bool {
+ return false;
+}
+template <typename T, typename Context>
+constexpr auto has_const_formatter() -> bool {
+ return has_const_formatter_impl<Context>(static_cast<T*>(nullptr));
+}
template <typename T>
using buffer_appender = conditional_t<std::is_same<T, char>::value, appender,
@@ -1274,9 +1282,9 @@ template <typename Context> class value {
FMT_INLINE value(const named_arg_info<char_type>* args, size_t size)
: named_args{args, size} {}
- template <typename T> FMT_CONSTEXPR FMT_INLINE value(T& val) {
- using value_type = remove_cvref_t<T>;
- custom.value = const_cast<value_type*>(&val);
+ template <typename T> FMT_CONSTEXPR20 FMT_INLINE value(T& val) {
+ using value_type = remove_const_t<T>;
+ custom.value = const_cast<value_type*>(std::addressof(val));
// Get the formatter type through the context to allow different contexts
// have different extension points, e.g. `formatter<T>` for `format` and
// `printf_formatter<T>` for `printf`.
@@ -1301,9 +1309,6 @@ template <typename Context> class value {
}
};
-template <typename Context, typename T>
-FMT_CONSTEXPR auto make_arg(T&& value) -> basic_format_arg<Context>;
-
// To minimize the number of types we need to deal with, long is translated
// either to int or to long long depending on its size.
enum { long_short = sizeof(long) == sizeof(int) };
@@ -1415,9 +1420,8 @@ template <typename Context> struct arg_mapper {
FMT_ENABLE_IF(
std::is_pointer<T>::value || std::is_member_pointer<T>::value ||
std::is_function<typename std::remove_pointer<T>::type>::value ||
- (std::is_convertible<const T&, const void*>::value &&
- !std::is_convertible<const T&, const char_type*>::value &&
- !has_formatter<T, Context>::value))>
+ (std::is_array<T>::value &&
+ !std::is_convertible<T, const char_type*>::value))>
FMT_CONSTEXPR auto map(const T&) -> unformattable_pointer {
return {};
}
@@ -1435,30 +1439,28 @@ template <typename Context> struct arg_mapper {
return map(format_as(val));
}
- template <typename T, typename U = remove_cvref_t<T>>
- struct formattable
- : bool_constant<has_const_formatter<U, Context>() ||
- (has_formatter<U, Context>::value &&
- !std::is_const<remove_reference_t<T>>::value)> {};
+ template <typename T, typename U = remove_const_t<T>>
+ struct formattable : bool_constant<has_const_formatter<U, Context>() ||
+ (has_formatter<U, Context>::value &&
+ !std::is_const<T>::value)> {};
template <typename T, FMT_ENABLE_IF(formattable<T>::value)>
- FMT_CONSTEXPR FMT_INLINE auto do_map(T&& val) -> T& {
+ FMT_CONSTEXPR FMT_INLINE auto do_map(T& val) -> T& {
return val;
}
template <typename T, FMT_ENABLE_IF(!formattable<T>::value)>
- FMT_CONSTEXPR FMT_INLINE auto do_map(T&&) -> unformattable {
+ FMT_CONSTEXPR FMT_INLINE auto do_map(T&) -> unformattable {
return {};
}
- template <typename T, typename U = remove_cvref_t<T>,
+ template <typename T, typename U = remove_const_t<T>,
FMT_ENABLE_IF((std::is_class<U>::value || std::is_enum<U>::value ||
std::is_union<U>::value) &&
!is_string<U>::value && !is_char<U>::value &&
!is_named_arg<U>::value &&
!std::is_arithmetic<format_as_t<U>>::value)>
- FMT_CONSTEXPR FMT_INLINE auto map(T&& val)
- -> decltype(this->do_map(std::forward<T>(val))) {
- return do_map(std::forward<T>(val));
+ FMT_CONSTEXPR FMT_INLINE auto map(T& val) -> decltype(this->do_map(val)) {
+ return do_map(val);
}
template <typename T, FMT_ENABLE_IF(is_named_arg<T>::value)>
@@ -1481,22 +1483,121 @@ enum { packed_arg_bits = 4 };
enum { max_packed_args = 62 / packed_arg_bits };
enum : unsigned long long { is_unpacked_bit = 1ULL << 63 };
enum : unsigned long long { has_named_args_bit = 1ULL << 62 };
-} // namespace detail
-// An output iterator that appends to a buffer.
-// It is used to reduce symbol sizes for the common case.
-class appender : public std::back_insert_iterator<detail::buffer<char>> {
- using base = std::back_insert_iterator<detail::buffer<char>>;
+template <typename Char, typename InputIt>
+auto copy_str(InputIt begin, InputIt end, appender out) -> appender {
+ get_container(out).append(begin, end);
+ return out;
+}
+template <typename Char, typename InputIt>
+auto copy_str(InputIt begin, InputIt end,
+ std::back_insert_iterator<std::string> out)
+ -> std::back_insert_iterator<std::string> {
+ get_container(out).append(begin, end);
+ return out;
+}
+
+template <typename Char, typename R, typename OutputIt>
+FMT_CONSTEXPR auto copy_str(R&& rng, OutputIt out) -> OutputIt {
+ return detail::copy_str<Char>(rng.begin(), rng.end(), out);
+}
+
+#if FMT_GCC_VERSION && FMT_GCC_VERSION < 500
+// A workaround for gcc 4.8 to make void_t work in a SFINAE context.
+template <typename...> struct void_t_impl { using type = void; };
+template <typename... T> using void_t = typename void_t_impl<T...>::type;
+#else
+template <typename...> using void_t = void;
+#endif
+
+template <typename It, typename T, typename Enable = void>
+struct is_output_iterator : std::false_type {};
+
+template <typename It, typename T>
+struct is_output_iterator<
+ It, T,
+ void_t<typename std::iterator_traits<It>::iterator_category,
+ decltype(*std::declval<It>() = std::declval<T>())>>
+ : std::true_type {};
+
+template <typename It> struct is_back_insert_iterator : std::false_type {};
+template <typename Container>
+struct is_back_insert_iterator<std::back_insert_iterator<Container>>
+ : std::true_type {};
+
+// A type-erased reference to an std::locale to avoid a heavy <locale> include.
+class locale_ref {
+ private:
+ const void* locale_; // A type-erased pointer to std::locale.
public:
- using std::back_insert_iterator<detail::buffer<char>>::back_insert_iterator;
- appender(base it) noexcept : base(it) {}
- FMT_UNCHECKED_ITERATOR(appender);
+ constexpr FMT_INLINE locale_ref() : locale_(nullptr) {}
+ template <typename Locale> explicit locale_ref(const Locale& loc);
- auto operator++() noexcept -> appender& { return *this; }
- auto operator++(int) noexcept -> appender { return *this; }
+ explicit operator bool() const noexcept { return locale_ != nullptr; }
+
+ template <typename Locale> auto get() const -> Locale;
};
+template <typename> constexpr auto encode_types() -> unsigned long long {
+ return 0;
+}
+
+template <typename Context, typename Arg, typename... Args>
+constexpr auto encode_types() -> unsigned long long {
+ return static_cast<unsigned>(mapped_type_constant<Arg, Context>::value) |
+ (encode_types<Context, Args...>() << packed_arg_bits);
+}
+
+#if defined(__cpp_if_constexpr)
+// This type is intentionally undefined, only used for errors
+template <typename T, typename Char> struct type_is_unformattable_for;
+#endif
+
+template <bool PACKED, typename Context, typename T, FMT_ENABLE_IF(PACKED)>
+FMT_CONSTEXPR FMT_INLINE auto make_arg(T& val) -> value<Context> {
+ using arg_type = remove_cvref_t<decltype(arg_mapper<Context>().map(val))>;
+
+ constexpr bool formattable_char =
+ !std::is_same<arg_type, unformattable_char>::value;
+ static_assert(formattable_char, "Mixing character types is disallowed.");
+
+ // Formatting of arbitrary pointers is disallowed. If you want to format a
+ // pointer cast it to `void*` or `const void*`. In particular, this forbids
+ // formatting of `[const] volatile char*` printed as bool by iostreams.
+ constexpr bool formattable_pointer =
+ !std::is_same<arg_type, unformattable_pointer>::value;
+ static_assert(formattable_pointer,
+ "Formatting of non-void pointers is disallowed.");
+
+ constexpr bool formattable = !std::is_same<arg_type, unformattable>::value;
+#if defined(__cpp_if_constexpr)
+ if constexpr (!formattable) {
+ type_is_unformattable_for<T, typename Context::char_type> _;
+ }
+#endif
+ static_assert(
+ formattable,
+ "Cannot format an argument. To make type T formattable provide a "
+ "formatter<T> specialization: https://fmt.dev/latest/api.html#udt");
+ return {arg_mapper<Context>().map(val)};
+}
+
+template <typename Context, typename T>
+FMT_CONSTEXPR auto make_arg(T& val) -> basic_format_arg<Context> {
+ auto arg = basic_format_arg<Context>();
+ arg.type_ = mapped_type_constant<T, Context>::value;
+ arg.value_ = make_arg<true, Context>(val);
+ return arg;
+}
+
+template <bool PACKED, typename Context, typename T, FMT_ENABLE_IF(!PACKED)>
+FMT_CONSTEXPR inline auto make_arg(T& val) -> basic_format_arg<Context> {
+ return make_arg<Context>(val);
+}
+} // namespace detail
+FMT_BEGIN_EXPORT
+
// A formatting argument. It is a trivially copyable/constructible type to
// allow storage in basic_memory_buffer.
template <typename Context> class basic_format_arg {
@@ -1505,7 +1606,7 @@ template <typename Context> class basic_format_arg {
detail::type type_;
template <typename ContextType, typename T>
- friend FMT_CONSTEXPR auto detail::make_arg(T&& value)
+ friend FMT_CONSTEXPR auto detail::make_arg(T& value)
-> basic_format_arg<ContextType>;
template <typename Visitor, typename Ctx>
@@ -1559,7 +1660,7 @@ template <typename Context> class basic_format_arg {
``vis(value)`` will be called with the value of type ``double``.
\endrst
*/
-FMT_MODULE_EXPORT
+// DEPRECATED!
template <typename Visitor, typename Context>
FMT_CONSTEXPR FMT_INLINE auto visit_format_arg(
Visitor&& vis, const basic_format_arg<Context>& arg) -> decltype(vis(0)) {
@@ -1601,124 +1702,6 @@ FMT_CONSTEXPR FMT_INLINE auto visit_format_arg(
return vis(monostate());
}
-namespace detail {
-
-template <typename Char, typename InputIt>
-auto copy_str(InputIt begin, InputIt end, appender out) -> appender {
- get_container(out).append(begin, end);
- return out;
-}
-
-template <typename Char, typename R, typename OutputIt>
-FMT_CONSTEXPR auto copy_str(R&& rng, OutputIt out) -> OutputIt {
- return detail::copy_str<Char>(rng.begin(), rng.end(), out);
-}
-
-#if FMT_GCC_VERSION && FMT_GCC_VERSION < 500
-// A workaround for gcc 4.8 to make void_t work in a SFINAE context.
-template <typename...> struct void_t_impl { using type = void; };
-template <typename... T> using void_t = typename void_t_impl<T...>::type;
-#else
-template <typename...> using void_t = void;
-#endif
-
-template <typename It, typename T, typename Enable = void>
-struct is_output_iterator : std::false_type {};
-
-template <typename It, typename T>
-struct is_output_iterator<
- It, T,
- void_t<typename std::iterator_traits<It>::iterator_category,
- decltype(*std::declval<It>() = std::declval<T>())>>
- : std::true_type {};
-
-template <typename It> struct is_back_insert_iterator : std::false_type {};
-template <typename Container>
-struct is_back_insert_iterator<std::back_insert_iterator<Container>>
- : std::true_type {};
-
-template <typename It>
-struct is_contiguous_back_insert_iterator : std::false_type {};
-template <typename Container>
-struct is_contiguous_back_insert_iterator<std::back_insert_iterator<Container>>
- : is_contiguous<Container> {};
-template <>
-struct is_contiguous_back_insert_iterator<appender> : std::true_type {};
-
-// A type-erased reference to an std::locale to avoid a heavy <locale> include.
-class locale_ref {
- private:
- const void* locale_; // A type-erased pointer to std::locale.
-
- public:
- constexpr FMT_INLINE locale_ref() : locale_(nullptr) {}
- template <typename Locale> explicit locale_ref(const Locale& loc);
-
- explicit operator bool() const noexcept { return locale_ != nullptr; }
-
- template <typename Locale> auto get() const -> Locale;
-};
-
-template <typename> constexpr auto encode_types() -> unsigned long long {
- return 0;
-}
-
-template <typename Context, typename Arg, typename... Args>
-constexpr auto encode_types() -> unsigned long long {
- return static_cast<unsigned>(mapped_type_constant<Arg, Context>::value) |
- (encode_types<Context, Args...>() << packed_arg_bits);
-}
-
-template <typename Context, typename T>
-FMT_CONSTEXPR FMT_INLINE auto make_value(T&& val) -> value<Context> {
- auto&& arg = arg_mapper<Context>().map(FMT_FORWARD(val));
- using arg_type = remove_cvref_t<decltype(arg)>;
-
- constexpr bool formattable_char =
- !std::is_same<arg_type, unformattable_char>::value;
- static_assert(formattable_char, "Mixing character types is disallowed.");
-
- // Formatting of arbitrary pointers is disallowed. If you want to format a
- // pointer cast it to `void*` or `const void*`. In particular, this forbids
- // formatting of `[const] volatile char*` printed as bool by iostreams.
- constexpr bool formattable_pointer =
- !std::is_same<arg_type, unformattable_pointer>::value;
- static_assert(formattable_pointer,
- "Formatting of non-void pointers is disallowed.");
-
- constexpr bool formattable = !std::is_same<arg_type, unformattable>::value;
- static_assert(
- formattable,
- "Cannot format an argument. To make type T formattable provide a "
- "formatter<T> specialization: https://fmt.dev/latest/api.html#udt");
- return {arg};
-}
-
-template <typename Context, typename T>
-FMT_CONSTEXPR auto make_arg(T&& value) -> basic_format_arg<Context> {
- auto arg = basic_format_arg<Context>();
- arg.type_ = mapped_type_constant<T, Context>::value;
- arg.value_ = make_value<Context>(value);
- return arg;
-}
-
-// The DEPRECATED type template parameter is there to avoid an ODR violation
-// when using a fallback formatter in one translation unit and an implicit
-// conversion in another (not recommended).
-template <bool IS_PACKED, typename Context, type, typename T,
- FMT_ENABLE_IF(IS_PACKED)>
-FMT_CONSTEXPR FMT_INLINE auto make_arg(T&& val) -> value<Context> {
- return make_value<Context>(val);
-}
-
-template <bool IS_PACKED, typename Context, type, typename T,
- FMT_ENABLE_IF(!IS_PACKED)>
-FMT_CONSTEXPR inline auto make_arg(T&& value) -> basic_format_arg<Context> {
- return make_arg<Context>(value);
-}
-} // namespace detail
-FMT_BEGIN_EXPORT
-
// Formatting context.
template <typename OutputIt, typename Char> class basic_format_context {
private:
@@ -1778,7 +1761,7 @@ using format_context = buffer_context<char>;
template <typename T, typename Char = char>
using is_formattable = bool_constant<!std::is_base_of<
detail::unformattable, decltype(detail::arg_mapper<buffer_context<Char>>()
- .map(std::declval<T>()))>::value>;
+ .map(std::declval<T&>()))>::value>;
/**
\rst
@@ -1796,7 +1779,7 @@ class format_arg_store
{
private:
static const size_t num_args = sizeof...(Args);
- static const size_t num_named_args = detail::count_named_args<Args...>();
+ static constexpr size_t num_named_args = detail::count_named_args<Args...>();
static const bool is_packed = num_args <= detail::max_packed_args;
using value_type = conditional_t<is_packed, detail::value<Context>,
@@ -1817,16 +1800,14 @@ class format_arg_store
public:
template <typename... T>
- FMT_CONSTEXPR FMT_INLINE format_arg_store(T&&... args)
+ FMT_CONSTEXPR FMT_INLINE format_arg_store(T&... args)
:
#if FMT_GCC_VERSION && FMT_GCC_VERSION < 409
basic_format_args<Context>(*this),
#endif
- data_{detail::make_arg<
- is_packed, Context,
- detail::mapped_type_constant<remove_cvref_t<T>, Context>::value>(
- FMT_FORWARD(args))...} {
- detail::init_named_args(data_.named_args(), 0, 0, args...);
+ data_{detail::make_arg<is_packed, Context>(args)...} {
+ if (detail::const_check(num_named_args != 0))
+ detail::init_named_args(data_.named_args(), 0, 0, args...);
}
};
@@ -1834,14 +1815,15 @@ class format_arg_store
\rst
Constructs a `~fmt::format_arg_store` object that contains references to
arguments and can be implicitly converted to `~fmt::format_args`. `Context`
- can be omitted in which case it defaults to `~fmt::context`.
+ can be omitted in which case it defaults to `~fmt::format_context`.
See `~fmt::arg` for lifetime considerations.
\endrst
*/
+// Arguments are taken by lvalue references to avoid some lifetime issues.
template <typename Context = format_context, typename... T>
-constexpr auto make_format_args(T&&... args)
+constexpr auto make_format_args(T&... args)
-> format_arg_store<Context, remove_cvref_t<T>...> {
- return {FMT_FORWARD(args)...};
+ return {args...};
}
/**
@@ -1869,7 +1851,7 @@ FMT_END_EXPORT
``vformat``::
void vlog(string_view format_str, format_args args); // OK
- format_args args = make_format_args(42); // Error: dangling reference
+ format_args args = make_format_args(); // Error: dangling reference
\endrst
*/
template <typename Context> class basic_format_args {
@@ -1986,7 +1968,7 @@ template <typename Context> class basic_format_args {
/** An alias to ``basic_format_args<format_context>``. */
// A separate type would result in shorter symbols but break ABI compatibility
// between clang and gcc on ARM (#1919).
-FMT_MODULE_EXPORT using format_args = basic_format_args<format_context>;
+FMT_EXPORT using format_args = basic_format_args<format_context>;
// We cannot use enum classes as bit fields because of a gcc bug, so we put them
// in namespaces instead (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61414).
@@ -2558,7 +2540,17 @@ FMT_CONSTEXPR auto parse_format_specs(ParseContext& ctx)
mapped_type_constant<T, context>::value != type::custom_type,
decltype(arg_mapper<context>().map(std::declval<const T&>())),
typename strip_named_arg<T>::type>;
+#if defined(__cpp_if_constexpr)
+ if constexpr (std::is_default_constructible_v<
+ formatter<mapped_type, char_type>>) {
+ return formatter<mapped_type, char_type>().parse(ctx);
+ } else {
+ type_is_unformattable_for<T, char_type> _;
+ return ctx.begin();
+ }
+#else
return formatter<mapped_type, char_type>().parse(ctx);
+#endif
}
// Checks char specs and returns true iff the presentation type is char-like.
@@ -2574,8 +2566,6 @@ FMT_CONSTEXPR auto check_char_specs(const format_specs<Char>& specs) -> bool {
return true;
}
-constexpr FMT_INLINE_VARIABLE int invalid_arg_index = -1;
-
#if FMT_USE_NONTYPE_TEMPLATE_ARGS
template <int N, typename T, typename... Args, typename Char>
constexpr auto get_arg_index_by_name(basic_string_view<Char> name) -> int {
@@ -2585,7 +2575,7 @@ constexpr auto get_arg_index_by_name(basic_string_view<Char> name) -> int {
if constexpr (sizeof...(Args) > 0)
return get_arg_index_by_name<N + 1, Args...>(name);
(void)name; // Workaround an MSVC bug about "unused" parameter.
- return invalid_arg_index;
+ return -1;
}
#endif
@@ -2596,7 +2586,7 @@ FMT_CONSTEXPR auto get_arg_index_by_name(basic_string_view<Char> name) -> int {
return get_arg_index_by_name<0, Args...>(name);
#endif
(void)name;
- return invalid_arg_index;
+ return -1;
}
template <typename Char, typename... Args> class format_string_checker {
@@ -2610,15 +2600,15 @@ template <typename Char, typename... Args> class format_string_checker {
// needed for compile-time checks: https://godbolt.org/z/GvWzcTjh1.
using parse_func = const Char* (*)(parse_context_type&);
+ type types_[num_args > 0 ? static_cast<size_t>(num_args) : 1];
parse_context_type context_;
parse_func parse_funcs_[num_args > 0 ? static_cast<size_t>(num_args) : 1];
- type types_[num_args > 0 ? static_cast<size_t>(num_args) : 1];
public:
explicit FMT_CONSTEXPR format_string_checker(basic_string_view<Char> fmt)
- : context_(fmt, num_args, types_),
- parse_funcs_{&parse_format_specs<Args, parse_context_type>...},
- types_{mapped_type_constant<Args, buffer_context<Char>>::value...} {}
+ : types_{mapped_type_constant<Args, buffer_context<Char>>::value...},
+ context_(fmt, num_args, types_),
+ parse_funcs_{&parse_format_specs<Args, parse_context_type>...} {}
FMT_CONSTEXPR void on_text(const Char*, const Char*) {}
@@ -2629,7 +2619,7 @@ template <typename Char, typename... Args> class format_string_checker {
FMT_CONSTEXPR auto on_arg_id(basic_string_view<Char> id) -> int {
#if FMT_USE_NONTYPE_TEMPLATE_ARGS
auto index = get_arg_index_by_name<Args...>(id);
- if (index == invalid_arg_index) on_error("named argument is not found");
+ if (index < 0) on_error("named argument is not found");
return index;
#else
(void)id;
@@ -2638,7 +2628,9 @@ template <typename Char, typename... Args> class format_string_checker {
#endif
}
- FMT_CONSTEXPR void on_replacement_field(int, const Char*) {}
+ FMT_CONSTEXPR void on_replacement_field(int id, const Char* begin) {
+ on_format_specs(id, begin, begin); // Call parse() on empty specs.
+ }
FMT_CONSTEXPR auto on_format_specs(int id, const Char* begin, const Char*)
-> const Char* {
@@ -2721,27 +2713,6 @@ struct formatter<T, Char,
-> decltype(ctx.out());
};
-#define FMT_FORMAT_AS(Type, Base) \
- template <typename Char> \
- struct formatter<Type, Char> : formatter<Base, Char> { \
- template <typename FormatContext> \
- auto format(const Type& val, FormatContext& ctx) const \
- -> decltype(ctx.out()) { \
- return formatter<Base, Char>::format(static_cast<Base>(val), ctx); \
- } \
- }
-
-FMT_FORMAT_AS(signed char, int);
-FMT_FORMAT_AS(unsigned char, unsigned);
-FMT_FORMAT_AS(short, int);
-FMT_FORMAT_AS(unsigned short, unsigned);
-FMT_FORMAT_AS(long, long long);
-FMT_FORMAT_AS(unsigned long, unsigned long long);
-FMT_FORMAT_AS(Char*, const Char*);
-FMT_FORMAT_AS(std::basic_string<Char>, basic_string_view<Char>);
-FMT_FORMAT_AS(std::nullptr_t, const void*);
-FMT_FORMAT_AS(detail::std_string_view<Char>, basic_string_view<Char>);
-
template <typename Char = char> struct runtime_format_string {
basic_string_view<Char> str;
};
diff --git a/src/fmtlib/fmt/format-inl.h b/src/fmtlib/fmt/format-inl.h
index 5bae3c7..dac2d43 100644
--- a/src/fmtlib/fmt/format-inl.h
+++ b/src/fmtlib/fmt/format-inl.h
@@ -1128,16 +1128,12 @@ bool is_left_endpoint_integer_shorter_interval(int exponent) noexcept {
}
// Remove trailing zeros from n and return the number of zeros removed (float)
-FMT_INLINE int remove_trailing_zeros(uint32_t& n) noexcept {
+FMT_INLINE int remove_trailing_zeros(uint32_t& n, int s = 0) noexcept {
FMT_ASSERT(n != 0, "");
// Modular inverse of 5 (mod 2^32): (mod_inv_5 * 5) mod 2^32 = 1.
- // See https://github.com/fmtlib/fmt/issues/3163 for more details.
- const uint32_t mod_inv_5 = 0xcccccccd;
- // Casts are needed to workaround a bug in MSVC 19.22 and older.
- const uint32_t mod_inv_25 =
- static_cast<uint32_t>(uint64_t(mod_inv_5) * mod_inv_5);
+ constexpr uint32_t mod_inv_5 = 0xcccccccd;
+ constexpr uint32_t mod_inv_25 = 0xc28f5c29; // = mod_inv_5 * mod_inv_5
- int s = 0;
while (true) {
auto q = rotr(n * mod_inv_25, 2);
if (q > max_value<uint32_t>() / 100) break;
@@ -1162,32 +1158,17 @@ FMT_INLINE int remove_trailing_zeros(uint64_t& n) noexcept {
// Is n is divisible by 10^8?
if ((nm.high() & ((1ull << (90 - 64)) - 1)) == 0 && nm.low() < magic_number) {
- // If yes, work with the quotient.
+ // If yes, work with the quotient...
auto n32 = static_cast<uint32_t>(nm.high() >> (90 - 64));
-
- const uint32_t mod_inv_5 = 0xcccccccd;
- const uint32_t mod_inv_25 = mod_inv_5 * mod_inv_5;
-
- int s = 8;
- while (true) {
- auto q = rotr(n32 * mod_inv_25, 2);
- if (q > max_value<uint32_t>() / 100) break;
- n32 = q;
- s += 2;
- }
- auto q = rotr(n32 * mod_inv_5, 1);
- if (q <= max_value<uint32_t>() / 10) {
- n32 = q;
- s |= 1;
- }
-
+ // ... and use the 32 bit variant of the function
+ int s = remove_trailing_zeros(n32, 8);
n = n32;
return s;
}
// If n is not divisible by 10^8, work with n itself.
- const uint64_t mod_inv_5 = 0xcccccccccccccccd;
- const uint64_t mod_inv_25 = mod_inv_5 * mod_inv_5;
+ constexpr uint64_t mod_inv_5 = 0xcccccccccccccccd;
+ constexpr uint64_t mod_inv_25 = 0x8f5c28f5c28f5c29; // = mod_inv_5 * mod_inv_5
int s = 0;
while (true) {
@@ -1458,7 +1439,7 @@ FMT_FUNC bool write_console(std::FILE* f, string_view text) {
auto u16 = utf8_to_utf16(text);
auto written = dword();
return WriteConsoleW(reinterpret_cast<void*>(_get_osfhandle(fd)), u16.c_str(),
- static_cast<uint32_t>(u16.size()), &written, nullptr);
+ static_cast<uint32_t>(u16.size()), &written, nullptr) != 0;
}
// Print assuming legacy (non-Unicode) encoding.
diff --git a/src/fmtlib/fmt/format.h b/src/fmtlib/fmt/format.h
index ed8b29e..87a34b9 100644
--- a/src/fmtlib/fmt/format.h
+++ b/src/fmtlib/fmt/format.h
@@ -48,9 +48,10 @@
#include "core.h"
-#ifndef FMT_BEGIN_DETAIL_NAMESPACE
-# define FMT_BEGIN_DETAIL_NAMESPACE namespace detail {
-# define FMT_END_DETAIL_NAMESPACE }
+#if defined __cpp_inline_variables && __cpp_inline_variables >= 201606L
+# define FMT_INLINE_VARIABLE inline
+#else
+# define FMT_INLINE_VARIABLE
#endif
#if FMT_HAS_CPP17_ATTRIBUTE(fallthrough)
@@ -78,16 +79,24 @@
# endif
#endif
-#if FMT_GCC_VERSION
-# define FMT_GCC_VISIBILITY_HIDDEN __attribute__((visibility("hidden")))
-#else
-# define FMT_GCC_VISIBILITY_HIDDEN
+#ifndef FMT_NO_UNIQUE_ADDRESS
+# if FMT_CPLUSPLUS >= 202002L
+# if FMT_HAS_CPP_ATTRIBUTE(no_unique_address)
+# define FMT_NO_UNIQUE_ADDRESS [[no_unique_address]]
+// VS2019 v16.10 and later except clang-cl (https://reviews.llvm.org/D110485)
+# elif (FMT_MSC_VERSION >= 1929) && !FMT_CLANG_VERSION
+# define FMT_NO_UNIQUE_ADDRESS [[msvc::no_unique_address]]
+# endif
+# endif
+#endif
+#ifndef FMT_NO_UNIQUE_ADDRESS
+# define FMT_NO_UNIQUE_ADDRESS
#endif
-#ifdef __NVCC__
-# define FMT_CUDA_VERSION (__CUDACC_VER_MAJOR__ * 100 + __CUDACC_VER_MINOR__)
+#if FMT_GCC_VERSION || defined(__clang__)
+# define FMT_VISIBILITY(value) __attribute__((visibility(value)))
#else
-# define FMT_CUDA_VERSION 0
+# define FMT_VISIBILITY(value)
#endif
#ifdef __has_builtin
@@ -120,10 +129,8 @@ FMT_END_NAMESPACE
# define FMT_THROW(x) throw x
# endif
# else
-# define FMT_THROW(x) \
- do { \
- FMT_ASSERT(false, (x).what()); \
- } while (false)
+# define FMT_THROW(x) \
+ ::fmt::detail::assert_fail(__FILE__, __LINE__, (x).what())
# endif
#endif
@@ -362,8 +369,6 @@ class uint128_fallback {
private:
uint64_t lo_, hi_;
- friend uint128_fallback umul128(uint64_t x, uint64_t y) noexcept;
-
public:
constexpr uint128_fallback(uint64_t hi, uint64_t lo) : lo_(lo), hi_(hi) {}
constexpr uint128_fallback(uint64_t value = 0) : lo_(value), hi_(0) {}
@@ -536,6 +541,8 @@ FMT_INLINE void assume(bool condition) {
(void)condition;
#if FMT_HAS_BUILTIN(__builtin_assume) && !FMT_ICC_VERSION
__builtin_assume(condition);
+#elif FMT_GCC_VERSION
+ if (!condition) __builtin_unreachable();
#endif
}
@@ -554,20 +561,6 @@ inline auto get_data(Container& c) -> typename Container::value_type* {
return c.data();
}
-#if defined(_SECURE_SCL) && _SECURE_SCL
-// Make a checked iterator to avoid MSVC warnings.
-template <typename T> using checked_ptr = stdext::checked_array_iterator<T*>;
-template <typename T>
-constexpr auto make_checked(T* p, size_t size) -> checked_ptr<T> {
- return {p, size};
-}
-#else
-template <typename T> using checked_ptr = T*;
-template <typename T> constexpr auto make_checked(T* p, size_t) -> T* {
- return p;
-}
-#endif
-
// Attempts to reserve space for n extra characters in the output range.
// Returns a pointer to the reserved range or a reference to it.
template <typename Container, FMT_ENABLE_IF(is_contiguous<Container>::value)>
@@ -575,12 +568,12 @@ template <typename Container, FMT_ENABLE_IF(is_contiguous<Container>::value)>
__attribute__((no_sanitize("undefined")))
#endif
inline auto
-reserve(std::back_insert_iterator<Container> it, size_t n)
- -> checked_ptr<typename Container::value_type> {
+reserve(std::back_insert_iterator<Container> it, size_t n) ->
+ typename Container::value_type* {
Container& c = get_container(it);
size_t size = c.size();
c.resize(size + n);
- return make_checked(get_data(c) + size, n);
+ return get_data(c) + size;
}
template <typename T>
@@ -612,8 +605,8 @@ template <typename T> auto to_pointer(buffer_appender<T> it, size_t n) -> T* {
}
template <typename Container, FMT_ENABLE_IF(is_contiguous<Container>::value)>
-inline auto base_iterator(std::back_insert_iterator<Container>& it,
- checked_ptr<typename Container::value_type>)
+inline auto base_iterator(std::back_insert_iterator<Container> it,
+ typename Container::value_type*)
-> std::back_insert_iterator<Container> {
return it;
}
@@ -881,7 +874,7 @@ void buffer<T>::append(const U* begin, const U* end) {
try_reserve(size_ + count);
auto free_cap = capacity_ - size_;
if (free_cap < count) count = free_cap;
- std::uninitialized_copy_n(begin, count, make_checked(ptr_ + size_, count));
+ std::uninitialized_copy_n(begin, count, ptr_ + size_);
size_ += count;
begin += count;
}
@@ -926,8 +919,8 @@ class basic_memory_buffer final : public detail::buffer<T> {
private:
T store_[SIZE];
- // Don't inherit from Allocator avoid generating type_info for it.
- Allocator alloc_;
+ // Don't inherit from Allocator to avoid generating type_info for it.
+ FMT_NO_UNIQUE_ADDRESS Allocator alloc_;
// Deallocate memory allocated by the buffer.
FMT_CONSTEXPR20 void deallocate() {
@@ -948,9 +941,10 @@ class basic_memory_buffer final : public detail::buffer<T> {
T* old_data = this->data();
T* new_data =
std::allocator_traits<Allocator>::allocate(alloc_, new_capacity);
+ // Suppress a bogus -Wstringop-overflow in gcc 13.1 (#3481).
+ detail::assume(this->size() <= new_capacity);
// The following code doesn't throw, so the raw pointer above doesn't leak.
- std::uninitialized_copy(old_data, old_data + this->size(),
- detail::make_checked(new_data, new_capacity));
+ std::uninitialized_copy_n(old_data, this->size(), new_data);
this->set(new_data, new_capacity);
// deallocate must not throw according to the standard, but even if it does,
// the buffer already uses the new storage and will deallocate it in
@@ -978,8 +972,7 @@ class basic_memory_buffer final : public detail::buffer<T> {
size_t size = other.size(), capacity = other.capacity();
if (data == other.store_) {
this->set(store_, capacity);
- detail::copy_str<T>(other.store_, other.store_ + size,
- detail::make_checked(store_, capacity));
+ detail::copy_str<T>(other.store_, other.store_ + size, store_);
} else {
this->set(data, capacity);
// Set pointer to the inline array so that delete is not called
@@ -1044,6 +1037,7 @@ namespace detail {
FMT_API bool write_console(std::FILE* f, string_view text);
FMT_API void print(std::FILE*, string_view);
} // namespace detail
+
FMT_BEGIN_EXPORT
// Suppress a misleading warning in older versions of clang.
@@ -1052,7 +1046,7 @@ FMT_BEGIN_EXPORT
#endif
/** An error reported from a formatting function. */
-class FMT_API format_error : public std::runtime_error {
+class FMT_VISIBILITY("default") format_error : public std::runtime_error {
public:
using std::runtime_error::runtime_error;
};
@@ -1128,7 +1122,7 @@ template <typename Locale> class format_facet : public Locale::facet {
}
};
-FMT_BEGIN_DETAIL_NAMESPACE
+namespace detail {
// Returns true if value is negative, false otherwise.
// Same as `value < 0` but doesn't produce warnings if T is an unsigned type.
@@ -1257,7 +1251,7 @@ FMT_CONSTEXPR auto count_digits(UInt n) -> int {
FMT_INLINE auto do_count_digits(uint32_t n) -> int {
// An optimization by Kendall Willets from https://bit.ly/3uOIQrB.
// This increments the upper 32 bits (log10(T) - 1) when >= T is added.
-# define FMT_INC(T) (((sizeof(# T) - 1ull) << 32) - T)
+# define FMT_INC(T) (((sizeof(#T) - 1ull) << 32) - T)
static constexpr uint64_t table[] = {
FMT_INC(0), FMT_INC(0), FMT_INC(0), // 8
FMT_INC(10), FMT_INC(10), FMT_INC(10), // 64
@@ -1393,8 +1387,8 @@ FMT_CONSTEXPR auto format_uint(Char* buffer, UInt value, int num_digits,
}
template <unsigned BASE_BITS, typename Char, typename It, typename UInt>
-inline auto format_uint(It out, UInt value, int num_digits, bool upper = false)
- -> It {
+FMT_CONSTEXPR inline auto format_uint(It out, UInt value, int num_digits,
+ bool upper = false) -> It {
if (auto ptr = to_pointer<Char>(out, to_unsigned(num_digits))) {
format_uint<BASE_BITS>(ptr, value, num_digits, upper);
return out;
@@ -1418,19 +1412,20 @@ class utf8_to_utf16 {
auto str() const -> std::wstring { return {&buffer_[0], size()}; }
};
+enum class to_utf8_error_policy { abort, replace };
+
// A converter from UTF-16/UTF-32 (host endian) to UTF-8.
-template <typename WChar, typename Buffer = memory_buffer>
-class unicode_to_utf8 {
+template <typename WChar, typename Buffer = memory_buffer> class to_utf8 {
private:
Buffer buffer_;
public:
- unicode_to_utf8() {}
- explicit unicode_to_utf8(basic_string_view<WChar> s) {
+ to_utf8() {}
+ explicit to_utf8(basic_string_view<WChar> s,
+ to_utf8_error_policy policy = to_utf8_error_policy::abort) {
static_assert(sizeof(WChar) == 2 || sizeof(WChar) == 4,
"Expect utf16 or utf32");
-
- if (!convert(s))
+ if (!convert(s, policy))
FMT_THROW(std::runtime_error(sizeof(WChar) == 2 ? "invalid utf16"
: "invalid utf32"));
}
@@ -1442,23 +1437,28 @@ class unicode_to_utf8 {
// Performs conversion returning a bool instead of throwing exception on
// conversion error. This method may still throw in case of memory allocation
// error.
- bool convert(basic_string_view<WChar> s) {
- if (!convert(buffer_, s)) return false;
+ bool convert(basic_string_view<WChar> s,
+ to_utf8_error_policy policy = to_utf8_error_policy::abort) {
+ if (!convert(buffer_, s, policy)) return false;
buffer_.push_back(0);
return true;
}
- static bool convert(Buffer& buf, basic_string_view<WChar> s) {
+ static bool convert(
+ Buffer& buf, basic_string_view<WChar> s,
+ to_utf8_error_policy policy = to_utf8_error_policy::abort) {
for (auto p = s.begin(); p != s.end(); ++p) {
uint32_t c = static_cast<uint32_t>(*p);
if (sizeof(WChar) == 2 && c >= 0xd800 && c <= 0xdfff) {
- // surrogate pair
+ // Handle a surrogate pair.
++p;
if (p == s.end() || (c & 0xfc00) != 0xd800 || (*p & 0xfc00) != 0xdc00) {
- return false;
+ if (policy == to_utf8_error_policy::abort) return false;
+ buf.append(string_view("\xEF\xBF\xBD"));
+ --p;
+ } else {
+ c = (c << 10) + static_cast<uint32_t>(*p) - 0x35fdc00;
}
- c = (c << 10) + static_cast<uint32_t>(*p) - 0x35fdc00;
- }
- if (c < 0x80) {
+ } else if (c < 0x80) {
buf.push_back(static_cast<char>(c));
} else if (c < 0x800) {
buf.push_back(static_cast<char>(0xc0 | (c >> 6)));
@@ -1486,9 +1486,9 @@ inline uint128_fallback umul128(uint64_t x, uint64_t y) noexcept {
auto p = static_cast<uint128_opt>(x) * static_cast<uint128_opt>(y);
return {static_cast<uint64_t>(p >> 64), static_cast<uint64_t>(p)};
#elif defined(_MSC_VER) && defined(_M_X64)
- auto result = uint128_fallback();
- result.lo_ = _umul128(x, y, &result.hi_);
- return result;
+ auto hi = uint64_t();
+ auto lo = _umul128(x, y, &hi);
+ return {hi, lo};
#else
const uint64_t mask = static_cast<uint64_t>(max_value<uint32_t>());
@@ -1737,119 +1737,31 @@ FMT_CONSTEXPR inline fp operator*(fp x, fp y) {
}
template <typename T = void> struct basic_data {
- // Normalized 64-bit significands of pow(10, k), for k = -348, -340, ..., 340.
- // These are generated by support/compute-powers.py.
- static constexpr uint64_t pow10_significands[87] = {
- 0xfa8fd5a0081c0288, 0xbaaee17fa23ebf76, 0x8b16fb203055ac76,
- 0xcf42894a5dce35ea, 0x9a6bb0aa55653b2d, 0xe61acf033d1a45df,
- 0xab70fe17c79ac6ca, 0xff77b1fcbebcdc4f, 0xbe5691ef416bd60c,
- 0x8dd01fad907ffc3c, 0xd3515c2831559a83, 0x9d71ac8fada6c9b5,
- 0xea9c227723ee8bcb, 0xaecc49914078536d, 0x823c12795db6ce57,
- 0xc21094364dfb5637, 0x9096ea6f3848984f, 0xd77485cb25823ac7,
- 0xa086cfcd97bf97f4, 0xef340a98172aace5, 0xb23867fb2a35b28e,
- 0x84c8d4dfd2c63f3b, 0xc5dd44271ad3cdba, 0x936b9fcebb25c996,
- 0xdbac6c247d62a584, 0xa3ab66580d5fdaf6, 0xf3e2f893dec3f126,
- 0xb5b5ada8aaff80b8, 0x87625f056c7c4a8b, 0xc9bcff6034c13053,
- 0x964e858c91ba2655, 0xdff9772470297ebd, 0xa6dfbd9fb8e5b88f,
- 0xf8a95fcf88747d94, 0xb94470938fa89bcf, 0x8a08f0f8bf0f156b,
- 0xcdb02555653131b6, 0x993fe2c6d07b7fac, 0xe45c10c42a2b3b06,
- 0xaa242499697392d3, 0xfd87b5f28300ca0e, 0xbce5086492111aeb,
- 0x8cbccc096f5088cc, 0xd1b71758e219652c, 0x9c40000000000000,
- 0xe8d4a51000000000, 0xad78ebc5ac620000, 0x813f3978f8940984,
- 0xc097ce7bc90715b3, 0x8f7e32ce7bea5c70, 0xd5d238a4abe98068,
- 0x9f4f2726179a2245, 0xed63a231d4c4fb27, 0xb0de65388cc8ada8,
- 0x83c7088e1aab65db, 0xc45d1df942711d9a, 0x924d692ca61be758,
- 0xda01ee641a708dea, 0xa26da3999aef774a, 0xf209787bb47d6b85,
- 0xb454e4a179dd1877, 0x865b86925b9bc5c2, 0xc83553c5c8965d3d,
- 0x952ab45cfa97a0b3, 0xde469fbd99a05fe3, 0xa59bc234db398c25,
- 0xf6c69a72a3989f5c, 0xb7dcbf5354e9bece, 0x88fcf317f22241e2,
- 0xcc20ce9bd35c78a5, 0x98165af37b2153df, 0xe2a0b5dc971f303a,
- 0xa8d9d1535ce3b396, 0xfb9b7cd9a4a7443c, 0xbb764c4ca7a44410,
- 0x8bab8eefb6409c1a, 0xd01fef10a657842c, 0x9b10a4e5e9913129,
- 0xe7109bfba19c0c9d, 0xac2820d9623bf429, 0x80444b5e7aa7cf85,
- 0xbf21e44003acdd2d, 0x8e679c2f5e44ff8f, 0xd433179d9c8cb841,
- 0x9e19db92b4e31ba9, 0xeb96bf6ebadf77d9, 0xaf87023b9bf0ee6b,
- };
-
-#if FMT_GCC_VERSION && FMT_GCC_VERSION < 409
-# pragma GCC diagnostic push
-# pragma GCC diagnostic ignored "-Wnarrowing"
-#endif
- // Binary exponents of pow(10, k), for k = -348, -340, ..., 340, corresponding
- // to significands above.
- static constexpr int16_t pow10_exponents[87] = {
- -1220, -1193, -1166, -1140, -1113, -1087, -1060, -1034, -1007, -980, -954,
- -927, -901, -874, -847, -821, -794, -768, -741, -715, -688, -661,
- -635, -608, -582, -555, -529, -502, -475, -449, -422, -396, -369,
- -343, -316, -289, -263, -236, -210, -183, -157, -130, -103, -77,
- -50, -24, 3, 30, 56, 83, 109, 136, 162, 189, 216,
- 242, 269, 295, 322, 348, 375, 402, 428, 455, 481, 508,
- 534, 561, 588, 614, 641, 667, 694, 720, 747, 774, 800,
- 827, 853, 880, 907, 933, 960, 986, 1013, 1039, 1066};
-#if FMT_GCC_VERSION && FMT_GCC_VERSION < 409
-# pragma GCC diagnostic pop
-#endif
-
- static constexpr uint64_t power_of_10_64[20] = {
- 1, FMT_POWERS_OF_10(1ULL), FMT_POWERS_OF_10(1000000000ULL),
- 10000000000000000000ULL};
-
// For checking rounding thresholds.
// The kth entry is chosen to be the smallest integer such that the
// upper 32-bits of 10^(k+1) times it is strictly bigger than 5 * 10^k.
static constexpr uint32_t fractional_part_rounding_thresholds[8] = {
- 2576980378, // ceil(2^31 + 2^32/10^1)
- 2190433321, // ceil(2^31 + 2^32/10^2)
- 2151778616, // ceil(2^31 + 2^32/10^3)
- 2147913145, // ceil(2^31 + 2^32/10^4)
- 2147526598, // ceil(2^31 + 2^32/10^5)
- 2147487943, // ceil(2^31 + 2^32/10^6)
- 2147484078, // ceil(2^31 + 2^32/10^7)
- 2147483691 // ceil(2^31 + 2^32/10^8)
+ 2576980378U, // ceil(2^31 + 2^32/10^1)
+ 2190433321U, // ceil(2^31 + 2^32/10^2)
+ 2151778616U, // ceil(2^31 + 2^32/10^3)
+ 2147913145U, // ceil(2^31 + 2^32/10^4)
+ 2147526598U, // ceil(2^31 + 2^32/10^5)
+ 2147487943U, // ceil(2^31 + 2^32/10^6)
+ 2147484078U, // ceil(2^31 + 2^32/10^7)
+ 2147483691U // ceil(2^31 + 2^32/10^8)
};
};
+// This is a struct rather than an alias to avoid shadowing warnings in gcc.
+struct data : basic_data<> {};
#if FMT_CPLUSPLUS < 201703L
-template <typename T> constexpr uint64_t basic_data<T>::pow10_significands[];
-template <typename T> constexpr int16_t basic_data<T>::pow10_exponents[];
-template <typename T> constexpr uint64_t basic_data<T>::power_of_10_64[];
template <typename T>
constexpr uint32_t basic_data<T>::fractional_part_rounding_thresholds[];
#endif
-// This is a struct rather than an alias to avoid shadowing warnings in gcc.
-struct data : basic_data<> {};
-
-// Returns a cached power of 10 `c_k = c_k.f * pow(2, c_k.e)` such that its
-// (binary) exponent satisfies `min_exponent <= c_k.e <= min_exponent + 28`.
-FMT_CONSTEXPR inline fp get_cached_power(int min_exponent,
- int& pow10_exponent) {
- const int shift = 32;
- // log10(2) = 0x0.4d104d427de7fbcc...
- const int64_t significand = 0x4d104d427de7fbcc;
- int index = static_cast<int>(
- ((min_exponent + fp::num_significand_bits - 1) * (significand >> shift) +
- ((int64_t(1) << shift) - 1)) // ceil
- >> 32 // arithmetic shift
- );
- // Decimal exponent of the first (smallest) cached power of 10.
- const int first_dec_exp = -348;
- // Difference between 2 consecutive decimal exponents in cached powers of 10.
- const int dec_exp_step = 8;
- index = (index - first_dec_exp - 1) / dec_exp_step + 1;
- pow10_exponent = first_dec_exp + index * dec_exp_step;
- // Using *(x + index) instead of x[index] avoids an issue with some compilers
- // using the EDG frontend (e.g. nvhpc/22.3 in C++17 mode).
- return {*(data::pow10_significands + index),
- *(data::pow10_exponents + index)};
-}
-
-template <typename T>
+template <typename T, bool doublish = num_bits<T>() == num_bits<double>()>
using convert_float_result =
- conditional_t<std::is_same<T, float>::value ||
- std::numeric_limits<T>::digits ==
- std::numeric_limits<double>::digits,
- double, T>;
+ conditional_t<std::is_same<T, float>::value || doublish, double, T>;
template <typename T>
constexpr auto convert_float(T value) -> convert_float_result<T> {
@@ -1970,7 +1882,7 @@ inline auto find_escape(const char* begin, const char* end)
[] { \
/* Use the hidden visibility as a workaround for a GCC bug (#1973). */ \
/* Use a macro-like name to avoid shadowing warnings. */ \
- struct FMT_GCC_VISIBILITY_HIDDEN FMT_COMPILE_STRING : base { \
+ struct FMT_VISIBILITY("hidden") FMT_COMPILE_STRING : base { \
using char_type FMT_MAYBE_UNUSED = fmt::remove_cvref_t<decltype(s[0])>; \
FMT_MAYBE_UNUSED FMT_CONSTEXPR explicit \
operator fmt::basic_string_view<char_type>() const { \
@@ -2475,6 +2387,49 @@ FMT_CONSTEXPR auto write(OutputIt out, T value) -> OutputIt {
return base_iterator(out, it);
}
+// DEPRECATED!
+template <typename Char>
+FMT_CONSTEXPR auto parse_align(const Char* begin, const Char* end,
+ format_specs<Char>& specs) -> const Char* {
+ FMT_ASSERT(begin != end, "");
+ auto align = align::none;
+ auto p = begin + code_point_length(begin);
+ if (end - p <= 0) p = begin;
+ for (;;) {
+ switch (to_ascii(*p)) {
+ case '<':
+ align = align::left;
+ break;
+ case '>':
+ align = align::right;
+ break;
+ case '^':
+ align = align::center;
+ break;
+ }
+ if (align != align::none) {
+ if (p != begin) {
+ auto c = *begin;
+ if (c == '}') return begin;
+ if (c == '{') {
+ throw_format_error("invalid fill character '{'");
+ return begin;
+ }
+ specs.fill = {begin, to_unsigned(p - begin)};
+ begin = p + 1;
+ } else {
+ ++begin;
+ }
+ break;
+ } else if (p == begin) {
+ break;
+ }
+ p = begin;
+ }
+ specs.align = align;
+ return begin;
+}
+
// A floating-point presentation format.
enum class float_format : unsigned char {
general, // General: exponent notation or fixed point based on magnitude.
@@ -2833,78 +2788,6 @@ FMT_INLINE FMT_CONSTEXPR bool signbit(T value) {
return std::signbit(static_cast<double>(value));
}
-enum class round_direction { unknown, up, down };
-
-// Given the divisor (normally a power of 10), the remainder = v % divisor for
-// some number v and the error, returns whether v should be rounded up, down, or
-// whether the rounding direction can't be determined due to error.
-// error should be less than divisor / 2.
-FMT_CONSTEXPR inline round_direction get_round_direction(uint64_t divisor,
- uint64_t remainder,
- uint64_t error) {
- FMT_ASSERT(remainder < divisor, ""); // divisor - remainder won't overflow.
- FMT_ASSERT(error < divisor, ""); // divisor - error won't overflow.
- FMT_ASSERT(error < divisor - error, ""); // error * 2 won't overflow.
- // Round down if (remainder + error) * 2 <= divisor.
- if (remainder <= divisor - remainder && error * 2 <= divisor - remainder * 2)
- return round_direction::down;
- // Round up if (remainder - error) * 2 >= divisor.
- if (remainder >= error &&
- remainder - error >= divisor - (remainder - error)) {
- return round_direction::up;
- }
- return round_direction::unknown;
-}
-
-namespace digits {
-enum result {
- more, // Generate more digits.
- done, // Done generating digits.
- error // Digit generation cancelled due to an error.
-};
-}
-
-struct gen_digits_handler {
- char* buf;
- int size;
- int precision;
- int exp10;
- bool fixed;
-
- FMT_CONSTEXPR digits::result on_digit(char digit, uint64_t divisor,
- uint64_t remainder, uint64_t error,
- bool integral) {
- FMT_ASSERT(remainder < divisor, "");
- buf[size++] = digit;
- if (!integral && error >= remainder) return digits::error;
- if (size < precision) return digits::more;
- if (!integral) {
- // Check if error * 2 < divisor with overflow prevention.
- // The check is not needed for the integral part because error = 1
- // and divisor > (1 << 32) there.
- if (error >= divisor || error >= divisor - error) return digits::error;
- } else {
- FMT_ASSERT(error == 1 && divisor > 2, "");
- }
- auto dir = get_round_direction(divisor, remainder, error);
- if (dir != round_direction::up)
- return dir == round_direction::down ? digits::done : digits::error;
- ++buf[size - 1];
- for (int i = size - 1; i > 0 && buf[i] > '9'; --i) {
- buf[i] = '0';
- ++buf[i - 1];
- }
- if (buf[0] > '9') {
- buf[0] = '1';
- if (fixed)
- buf[size++] = '0';
- else
- ++exp10;
- }
- return digits::done;
- }
-};
-
inline FMT_CONSTEXPR20 void adjust_precision(int& precision, int exp10) {
// Adjust fixed precision by exponent because it is relative to decimal
// point.
@@ -2913,101 +2796,6 @@ inline FMT_CONSTEXPR20 void adjust_precision(int& precision, int exp10) {
precision += exp10;
}
-// Generates output using the Grisu digit-gen algorithm.
-// error: the size of the region (lower, upper) outside of which numbers
-// definitely do not round to value (Delta in Grisu3).
-FMT_INLINE FMT_CONSTEXPR20 auto grisu_gen_digits(fp value, uint64_t error,
- int& exp,
- gen_digits_handler& handler)
- -> digits::result {
- const fp one(1ULL << -value.e, value.e);
- // The integral part of scaled value (p1 in Grisu) = value / one. It cannot be
- // zero because it contains a product of two 64-bit numbers with MSB set (due
- // to normalization) - 1, shifted right by at most 60 bits.
- auto integral = static_cast<uint32_t>(value.f >> -one.e);
- FMT_ASSERT(integral != 0, "");
- FMT_ASSERT(integral == value.f >> -one.e, "");
- // The fractional part of scaled value (p2 in Grisu) c = value % one.
- uint64_t fractional = value.f & (one.f - 1);
- exp = count_digits(integral); // kappa in Grisu.
- // Non-fixed formats require at least one digit and no precision adjustment.
- if (handler.fixed) {
- adjust_precision(handler.precision, exp + handler.exp10);
- // Check if precision is satisfied just by leading zeros, e.g.
- // format("{:.2f}", 0.001) gives "0.00" without generating any digits.
- if (handler.precision <= 0) {
- if (handler.precision < 0) return digits::done;
- // Divide by 10 to prevent overflow.
- uint64_t divisor = data::power_of_10_64[exp - 1] << -one.e;
- auto dir = get_round_direction(divisor, value.f / 10, error * 10);
- if (dir == round_direction::unknown) return digits::error;
- handler.buf[handler.size++] = dir == round_direction::up ? '1' : '0';
- return digits::done;
- }
- }
- // Generate digits for the integral part. This can produce up to 10 digits.
- do {
- uint32_t digit = 0;
- auto divmod_integral = [&](uint32_t divisor) {
- digit = integral / divisor;
- integral %= divisor;
- };
- // This optimization by Milo Yip reduces the number of integer divisions by
- // one per iteration.
- switch (exp) {
- case 10:
- divmod_integral(1000000000);
- break;
- case 9:
- divmod_integral(100000000);
- break;
- case 8:
- divmod_integral(10000000);
- break;
- case 7:
- divmod_integral(1000000);
- break;
- case 6:
- divmod_integral(100000);
- break;
- case 5:
- divmod_integral(10000);
- break;
- case 4:
- divmod_integral(1000);
- break;
- case 3:
- divmod_integral(100);
- break;
- case 2:
- divmod_integral(10);
- break;
- case 1:
- digit = integral;
- integral = 0;
- break;
- default:
- FMT_ASSERT(false, "invalid number of digits");
- }
- --exp;
- auto remainder = (static_cast<uint64_t>(integral) << -one.e) + fractional;
- auto result = handler.on_digit(static_cast<char>('0' + digit),
- data::power_of_10_64[exp] << -one.e,
- remainder, error, true);
- if (result != digits::more) return result;
- } while (exp > 0);
- // Generate digits for the fractional part.
- for (;;) {
- fractional *= 10;
- error *= 10;
- char digit = static_cast<char>('0' + (fractional >> -one.e));
- fractional &= one.f - 1;
- --exp;
- auto result = handler.on_digit(digit, one.f, fractional, error, false);
- if (result != digits::more) return result;
- }
-}
-
class bigint {
private:
// A bigint is stored as an array of bigits (big digits), with bigit at index
@@ -3108,7 +2896,7 @@ class bigint {
auto size = other.bigits_.size();
bigits_.resize(size);
auto data = other.bigits_.data();
- std::copy(data, data + size, make_checked(bigits_.data(), size));
+ copy_str<bigit>(data, data + size, bigits_.data());
exp_ = other.exp_;
}
@@ -3322,6 +3110,7 @@ FMT_CONSTEXPR20 inline void format_dragon(basic_fp<uint128_t> value,
}
int even = static_cast<int>((value.f & 1) == 0);
if (!upper) upper = &lower;
+ bool shortest = num_digits < 0;
if ((flags & dragon::fixup) != 0) {
if (add_compare(numerator, *upper, denominator) + even <= 0) {
--exp10;
@@ -3334,7 +3123,7 @@ FMT_CONSTEXPR20 inline void format_dragon(basic_fp<uint128_t> value,
if ((flags & dragon::fixed) != 0) adjust_precision(num_digits, exp10 + 1);
}
// Invariant: value == (numerator / denominator) * pow(10, exp10).
- if (num_digits < 0) {
+ if (shortest) {
// Generate the shortest representation.
num_digits = 0;
char* data = buf.data();
@@ -3364,7 +3153,7 @@ FMT_CONSTEXPR20 inline void format_dragon(basic_fp<uint128_t> value,
}
// Generate the given number of digits.
exp10 -= num_digits - 1;
- if (num_digits == 0) {
+ if (num_digits <= 0) {
denominator *= 10;
auto digit = add_compare(numerator, numerator, denominator) > 0 ? '1' : '0';
buf.push_back(digit);
@@ -3389,7 +3178,8 @@ FMT_CONSTEXPR20 inline void format_dragon(basic_fp<uint128_t> value,
}
if (buf[0] == overflow) {
buf[0] = '1';
- ++exp10;
+ if ((flags & dragon::fixed) != 0) buf.push_back('0');
+ else ++exp10;
}
return;
}
@@ -3508,7 +3298,7 @@ FMT_CONSTEXPR20 auto format_float(Float value, int precision, float_specs specs,
int exp = 0;
bool use_dragon = true;
unsigned dragon_flags = 0;
- if (!is_fast_float<Float>()) {
+ if (!is_fast_float<Float>() || is_constant_evaluated()) {
const auto inv_log2_10 = 0.3010299956639812; // 1 / log2(10)
using info = dragonbox::float_info<decltype(converted_value)>;
const auto f = basic_fp<typename info::carrier_uint>(converted_value);
@@ -3516,10 +3306,11 @@ FMT_CONSTEXPR20 auto format_float(Float value, int precision, float_specs specs,
// 10^(exp - 1) <= value < 10^exp or 10^exp <= value < 10^(exp + 1).
// This is based on log10(value) == log2(value) / log2(10) and approximation
// of log2(value) by e + num_fraction_bits idea from double-conversion.
- exp = static_cast<int>(
- std::ceil((f.e + count_digits<1>(f.f) - 1) * inv_log2_10 - 1e-10));
+ auto e = (f.e + count_digits<1>(f.f) - 1) * inv_log2_10 - 1e-10;
+ exp = static_cast<int>(e);
+ if (e > exp) ++exp; // Compute ceil.
dragon_flags = dragon::fixup;
- } else if (!is_constant_evaluated() && precision < 0) {
+ } else if (precision < 0) {
// Use Dragonbox for the shortest format.
if (specs.binary32) {
auto dec = dragonbox::to_decimal(static_cast<float>(value));
@@ -3529,25 +3320,6 @@ FMT_CONSTEXPR20 auto format_float(Float value, int precision, float_specs specs,
auto dec = dragonbox::to_decimal(static_cast<double>(value));
write<char>(buffer_appender<char>(buf), dec.significand);
return dec.exponent;
- } else if (is_constant_evaluated()) {
- // Use Grisu + Dragon4 for the given precision:
- // https://www.cs.tufts.edu/~nr/cs257/archive/florian-loitsch/printf.pdf.
- const int min_exp = -60; // alpha in Grisu.
- int cached_exp10 = 0; // K in Grisu.
- fp normalized = normalize(fp(converted_value));
- const auto cached_pow = get_cached_power(
- min_exp - (normalized.e + fp::num_significand_bits), cached_exp10);
- normalized = normalized * cached_pow;
- gen_digits_handler handler{buf.data(), 0, precision, -cached_exp10, fixed};
- if (grisu_gen_digits(normalized, 1, exp, handler) != digits::error &&
- !is_constant_evaluated()) {
- exp += handler.exp10;
- buf.try_resize(to_unsigned(handler.size));
- use_dragon = false;
- } else {
- exp += handler.size - cached_exp10 - 1;
- precision = handler.precision;
- }
} else {
// Extract significand bits and exponent bits.
using info = dragonbox::float_info<double>;
@@ -3566,7 +3338,7 @@ FMT_CONSTEXPR20 auto format_float(Float value, int precision, float_specs specs,
significand <<= 1;
} else {
// Normalize subnormal inputs.
- FMT_ASSERT(significand != 0, "zeros should not appear hear");
+ FMT_ASSERT(significand != 0, "zeros should not appear here");
int shift = countl_zero(significand);
FMT_ASSERT(shift >= num_bits<uint64_t>() - num_significand_bits<double>(),
"");
@@ -3603,9 +3375,7 @@ FMT_CONSTEXPR20 auto format_float(Float value, int precision, float_specs specs,
}
// Compute the actual number of decimal digits to print.
- if (fixed) {
- adjust_precision(precision, exp + digits_in_the_first_segment);
- }
+ if (fixed) adjust_precision(precision, exp + digits_in_the_first_segment);
// Use Dragon4 only when there might be not enough digits in the first
// segment.
@@ -4091,8 +3861,7 @@ FMT_CONSTEXPR auto get_dynamic_spec(FormatArg arg, ErrorHandler eh) -> int {
}
template <typename Context, typename ID>
-FMT_CONSTEXPR auto get_arg(Context& ctx, ID id) ->
- typename Context::format_arg {
+FMT_CONSTEXPR auto get_arg(Context& ctx, ID id) -> decltype(ctx.arg(id)) {
auto arg = ctx.arg(id);
if (!arg) ctx.on_error("argument not found");
return arg;
@@ -4117,15 +3886,6 @@ FMT_CONSTEXPR void handle_dynamic_spec(int& value,
}
#if FMT_USE_USER_DEFINED_LITERALS
-template <typename Char> struct udl_formatter {
- basic_string_view<Char> str;
-
- template <typename... T>
- auto operator()(T&&... args) const -> std::basic_string<Char> {
- return vformat(str, fmt::make_format_args<buffer_context<Char>>(args...));
- }
-};
-
# if FMT_USE_NONTYPE_TEMPLATE_ARGS
template <typename T, typename Char, size_t N,
fmt::detail_exported::fixed_string<Char, N> Str>
@@ -4179,28 +3939,28 @@ FMT_API void format_error_code(buffer<char>& out, int error_code,
FMT_API void report_error(format_func func, int error_code,
const char* message) noexcept;
-FMT_END_DETAIL_NAMESPACE
+} // namespace detail
FMT_API auto vsystem_error(int error_code, string_view format_str,
format_args args) -> std::system_error;
/**
- \rst
- Constructs :class:`std::system_error` with a message formatted with
- ``fmt::format(fmt, args...)``.
+ \rst
+ Constructs :class:`std::system_error` with a message formatted with
+ ``fmt::format(fmt, args...)``.
*error_code* is a system error code as given by ``errno``.
- **Example**::
-
- // This throws std::system_error with the description
- // cannot open file 'madeup': No such file or directory
- // or similar (system message may vary).
- const char* filename = "madeup";
- std::FILE* file = std::fopen(filename, "r");
- if (!file)
- throw fmt::system_error(errno, "cannot open file '{}'", filename);
- \endrst
-*/
+ **Example**::
+
+ // This throws std::system_error with the description
+ // cannot open file 'madeup': No such file or directory
+ // or similar (system message may vary).
+ const char* filename = "madeup";
+ std::FILE* file = std::fopen(filename, "r");
+ if (!file)
+ throw fmt::system_error(errno, "cannot open file '{}'", filename);
+ \endrst
+ */
template <typename... T>
auto system_error(int error_code, format_string<T...> fmt, T&&... args)
-> std::system_error {
@@ -4292,8 +4052,8 @@ class format_int {
template <typename T, typename Char>
struct formatter<T, Char, enable_if_t<detail::has_format_as<T>::value>>
- : private formatter<detail::format_as_t<T>> {
- using base = formatter<detail::format_as_t<T>>;
+ : private formatter<detail::format_as_t<T>, Char> {
+ using base = formatter<detail::format_as_t<T>, Char>;
using base::parse;
template <typename FormatContext>
@@ -4302,22 +4062,24 @@ struct formatter<T, Char, enable_if_t<detail::has_format_as<T>::value>>
}
};
-template <typename Char>
-struct formatter<void*, Char> : formatter<const void*, Char> {
- template <typename FormatContext>
- auto format(void* val, FormatContext& ctx) const -> decltype(ctx.out()) {
- return formatter<const void*, Char>::format(val, ctx);
- }
-};
+#define FMT_FORMAT_AS(Type, Base) \
+ template <typename Char> \
+ struct formatter<Type, Char> : formatter<Base, Char> {}
+
+FMT_FORMAT_AS(signed char, int);
+FMT_FORMAT_AS(unsigned char, unsigned);
+FMT_FORMAT_AS(short, int);
+FMT_FORMAT_AS(unsigned short, unsigned);
+FMT_FORMAT_AS(long, detail::long_type);
+FMT_FORMAT_AS(unsigned long, detail::ulong_type);
+FMT_FORMAT_AS(Char*, const Char*);
+FMT_FORMAT_AS(std::basic_string<Char>, basic_string_view<Char>);
+FMT_FORMAT_AS(std::nullptr_t, const void*);
+FMT_FORMAT_AS(detail::std_string_view<Char>, basic_string_view<Char>);
+FMT_FORMAT_AS(void*, const void*);
template <typename Char, size_t N>
-struct formatter<Char[N], Char> : formatter<basic_string_view<Char>, Char> {
- template <typename FormatContext>
- FMT_CONSTEXPR auto format(const Char* val, FormatContext& ctx) const
- -> decltype(ctx.out()) {
- return formatter<basic_string_view<Char>, Char>::format(val, ctx);
- }
-};
+struct formatter<Char[N], Char> : formatter<basic_string_view<Char>, Char> {};
/**
\rst
@@ -4393,7 +4155,9 @@ template <> struct formatter<bytes> {
};
// group_digits_view is not derived from view because it copies the argument.
-template <typename T> struct group_digits_view { T value; };
+template <typename T> struct group_digits_view {
+ T value;
+};
/**
\rst
@@ -4523,7 +4287,8 @@ auto join(Range&& range, string_view sep)
std::string answer = fmt::to_string(42);
\endrst
*/
-template <typename T, FMT_ENABLE_IF(!std::is_integral<T>::value)>
+template <typename T, FMT_ENABLE_IF(!std::is_integral<T>::value &&
+ !detail::has_format_as<T>::value)>
inline auto to_string(const T& value) -> std::string {
auto buffer = memory_buffer();
detail::write<char>(appender(buffer), value);
@@ -4548,7 +4313,15 @@ FMT_NODISCARD auto to_string(const basic_memory_buffer<Char, SIZE>& buf)
return std::basic_string<Char>(buf.data(), size);
}
-FMT_BEGIN_DETAIL_NAMESPACE
+template <typename T, FMT_ENABLE_IF(!std::is_integral<T>::value &&
+ detail::has_format_as<T>::value)>
+inline auto to_string(const T& value) -> std::string {
+ return to_string(format_as(value));
+}
+
+FMT_END_EXPORT
+
+namespace detail {
template <typename Char>
void vformat_to(buffer<Char>& buf, basic_string_view<Char> fmt,
@@ -4619,6 +4392,8 @@ void vformat_to(buffer<Char>& buf, basic_string_view<Char> fmt,
detail::parse_format_string<false>(fmt, format_handler(out, fmt, args, loc));
}
+FMT_BEGIN_EXPORT
+
#ifndef FMT_HEADER_ONLY
extern template FMT_API void vformat_to(buffer<char>&, string_view,
typename vformat_args<>::type,
@@ -4631,7 +4406,7 @@ extern template FMT_API auto decimal_point_impl(locale_ref) -> char;
extern template FMT_API auto decimal_point_impl(locale_ref) -> wchar_t;
#endif // FMT_HEADER_ONLY
-FMT_END_DETAIL_NAMESPACE
+} // namespace detail
#if FMT_USE_USER_DEFINED_LITERALS
inline namespace literals {
diff --git a/src/fmtlib/fmt/os.h b/src/fmtlib/fmt/os.h
index ec29040..2126424 100644
--- a/src/fmtlib/fmt/os.h
+++ b/src/fmtlib/fmt/os.h
@@ -123,10 +123,10 @@ using wcstring_view = basic_cstring_view<wchar_t>;
#ifdef _WIN32
FMT_API const std::error_category& system_category() noexcept;
-FMT_BEGIN_DETAIL_NAMESPACE
+namespace detail {
FMT_API void format_windows_error(buffer<char>& out, int error_code,
const char* message) noexcept;
-FMT_END_DETAIL_NAMESPACE
+}
FMT_API std::system_error vwindows_error(int error_code, string_view format_str,
format_args args);
@@ -328,7 +328,7 @@ class FMT_API file {
// Returns the memory page size.
long getpagesize();
-FMT_BEGIN_DETAIL_NAMESPACE
+namespace detail {
struct buffer_size {
buffer_size() = default;
@@ -387,7 +387,7 @@ class file_buffer final : public buffer<char> {
}
};
-FMT_END_DETAIL_NAMESPACE
+} // namespace detail
// Added {} below to work around default constructor error known to
// occur in Xcode versions 7.2.1 and 8.2.1.
diff --git a/src/fmtlib/fmt/ostream.h b/src/fmtlib/fmt/ostream.h
index ce65909..a112fe7 100644
--- a/src/fmtlib/fmt/ostream.h
+++ b/src/fmtlib/fmt/ostream.h
@@ -155,7 +155,7 @@ inline void vprint_directly(std::ostream& os, string_view format_str,
} // namespace detail
-FMT_MODULE_EXPORT template <typename Char>
+FMT_EXPORT template <typename Char>
void vprint(std::basic_ostream<Char>& os,
basic_string_view<type_identity_t<Char>> format_str,
basic_format_args<buffer_context<type_identity_t<Char>>> args) {
@@ -174,7 +174,7 @@ void vprint(std::basic_ostream<Char>& os,
fmt::print(cerr, "Don't {}!", "panic");
\endrst
*/
-FMT_MODULE_EXPORT template <typename... T>
+FMT_EXPORT template <typename... T>
void print(std::ostream& os, format_string<T...> fmt, T&&... args) {
const auto& vargs = fmt::make_format_args(args...);
if (detail::is_utf8())
@@ -183,7 +183,7 @@ void print(std::ostream& os, format_string<T...> fmt, T&&... args) {
detail::vprint_directly(os, fmt, vargs);
}
-FMT_MODULE_EXPORT
+FMT_EXPORT
template <typename... Args>
void print(std::wostream& os,
basic_format_string<wchar_t, type_identity_t<Args>...> fmt,
@@ -191,12 +191,12 @@ void print(std::wostream& os,
vprint(os, fmt, fmt::make_format_args<buffer_context<wchar_t>>(args...));
}
-FMT_MODULE_EXPORT template <typename... T>
+FMT_EXPORT template <typename... T>
void println(std::ostream& os, format_string<T...> fmt, T&&... args) {
fmt::print(os, "{}\n", fmt::format(fmt, std::forward<T>(args)...));
}
-FMT_MODULE_EXPORT
+FMT_EXPORT
template <typename... Args>
void println(std::wostream& os,
basic_format_string<wchar_t, type_identity_t<Args>...> fmt,
diff --git a/src/fmtlib/fmt/printf.h b/src/fmtlib/fmt/printf.h
index 554715e..adef6ad 100644
--- a/src/fmtlib/fmt/printf.h
+++ b/src/fmtlib/fmt/printf.h
@@ -18,20 +18,14 @@ FMT_BEGIN_EXPORT
template <typename T> struct printf_formatter { printf_formatter() = delete; };
-template <typename Char>
-class basic_printf_parse_context : public basic_format_parse_context<Char> {
- using basic_format_parse_context<Char>::basic_format_parse_context;
-};
-
-template <typename OutputIt, typename Char> class basic_printf_context {
+template <typename Char> class basic_printf_context {
private:
- OutputIt out_;
+ detail::buffer_appender<Char> out_;
basic_format_args<basic_printf_context> args_;
public:
using char_type = Char;
- using format_arg = basic_format_arg<basic_printf_context>;
- using parse_context_type = basic_printf_parse_context<Char>;
+ using parse_context_type = basic_format_parse_context<Char>;
template <typename T> using formatter_type = printf_formatter<T>;
/**
@@ -40,68 +34,68 @@ template <typename OutputIt, typename Char> class basic_printf_context {
stored in the context object so make sure they have appropriate lifetimes.
\endrst
*/
- basic_printf_context(OutputIt out,
+ basic_printf_context(detail::buffer_appender<Char> out,
basic_format_args<basic_printf_context> args)
: out_(out), args_(args) {}
- OutputIt out() { return out_; }
- void advance_to(OutputIt it) { out_ = it; }
+ auto out() -> detail::buffer_appender<Char> { return out_; }
+ void advance_to(detail::buffer_appender<Char>) {}
- detail::locale_ref locale() { return {}; }
+ auto locale() -> detail::locale_ref { return {}; }
- format_arg arg(int id) const { return args_.get(id); }
+ auto arg(int id) const -> basic_format_arg<basic_printf_context> {
+ return args_.get(id);
+ }
FMT_CONSTEXPR void on_error(const char* message) {
detail::error_handler().on_error(message);
}
};
-FMT_BEGIN_DETAIL_NAMESPACE
+namespace detail {
// Checks if a value fits in int - used to avoid warnings about comparing
// signed and unsigned integers.
template <bool IsSigned> struct int_checker {
- template <typename T> static bool fits_in_int(T value) {
+ template <typename T> static auto fits_in_int(T value) -> bool {
unsigned max = max_value<int>();
return value <= max;
}
- static bool fits_in_int(bool) { return true; }
+ static auto fits_in_int(bool) -> bool { return true; }
};
template <> struct int_checker<true> {
- template <typename T> static bool fits_in_int(T value) {
+ template <typename T> static auto fits_in_int(T value) -> bool {
return value >= (std::numeric_limits<int>::min)() &&
value <= max_value<int>();
}
- static bool fits_in_int(int) { return true; }
+ static auto fits_in_int(int) -> bool { return true; }
};
-class printf_precision_handler {
- public:
+struct printf_precision_handler {
template <typename T, FMT_ENABLE_IF(std::is_integral<T>::value)>
- int operator()(T value) {
+ auto operator()(T value) -> int {
if (!int_checker<std::numeric_limits<T>::is_signed>::fits_in_int(value))
throw_format_error("number is too big");
return (std::max)(static_cast<int>(value), 0);
}
template <typename T, FMT_ENABLE_IF(!std::is_integral<T>::value)>
- int operator()(T) {
+ auto operator()(T) -> int {
throw_format_error("precision is not integer");
return 0;
}
};
// An argument visitor that returns true iff arg is a zero integer.
-class is_zero_int {
- public:
+struct is_zero_int {
template <typename T, FMT_ENABLE_IF(std::is_integral<T>::value)>
- bool operator()(T value) {
+ auto operator()(T value) -> bool {
return value == 0;
}
template <typename T, FMT_ENABLE_IF(!std::is_integral<T>::value)>
- bool operator()(T) {
+ auto operator()(T) -> bool {
return false;
}
};
@@ -132,22 +126,23 @@ template <typename T, typename Context> class arg_converter {
if (const_check(sizeof(target_type) <= sizeof(int))) {
// Extra casts are used to silence warnings.
if (is_signed) {
- arg_ = detail::make_arg<Context>(
- static_cast<int>(static_cast<target_type>(value)));
+ auto n = static_cast<int>(static_cast<target_type>(value));
+ arg_ = detail::make_arg<Context>(n);
} else {
using unsigned_type = typename make_unsigned_or_bool<target_type>::type;
- arg_ = detail::make_arg<Context>(
- static_cast<unsigned>(static_cast<unsigned_type>(value)));
+ auto n = static_cast<unsigned>(static_cast<unsigned_type>(value));
+ arg_ = detail::make_arg<Context>(n);
}
} else {
if (is_signed) {
// glibc's printf doesn't sign extend arguments of smaller types:
// std::printf("%lld", -42); // prints "4294967254"
// but we don't have to do the same because it's a UB.
- arg_ = detail::make_arg<Context>(static_cast<long long>(value));
+ auto n = static_cast<long long>(value);
+ arg_ = detail::make_arg<Context>(n);
} else {
- arg_ = detail::make_arg<Context>(
- static_cast<typename make_unsigned_or_bool<U>::type>(value));
+ auto n = static_cast<typename make_unsigned_or_bool<U>::type>(value);
+ arg_ = detail::make_arg<Context>(n);
}
}
}
@@ -175,8 +170,8 @@ template <typename Context> class char_converter {
template <typename T, FMT_ENABLE_IF(std::is_integral<T>::value)>
void operator()(T value) {
- arg_ = detail::make_arg<Context>(
- static_cast<typename Context::char_type>(value));
+ auto c = static_cast<typename Context::char_type>(value);
+ arg_ = detail::make_arg<Context>(c);
}
template <typename T, FMT_ENABLE_IF(!std::is_integral<T>::value)>
@@ -186,8 +181,8 @@ template <typename Context> class char_converter {
// An argument visitor that return a pointer to a C string if argument is a
// string or null otherwise.
template <typename Char> struct get_cstring {
- template <typename T> const Char* operator()(T) { return nullptr; }
- const Char* operator()(const Char* s) { return s; }
+ template <typename T> auto operator()(T) -> const Char* { return nullptr; }
+ auto operator()(const Char* s) -> const Char* { return s; }
};
// Checks if an argument is a valid printf width specifier and sets
@@ -200,7 +195,7 @@ template <typename Char> class printf_width_handler {
explicit printf_width_handler(format_specs<Char>& specs) : specs_(specs) {}
template <typename T, FMT_ENABLE_IF(std::is_integral<T>::value)>
- unsigned operator()(T value) {
+ auto operator()(T value) -> unsigned {
auto width = static_cast<uint32_or_64_or_128_t<T>>(value);
if (detail::is_negative(value)) {
specs_.align = align::left;
@@ -212,7 +207,7 @@ template <typename Char> class printf_width_handler {
}
template <typename T, FMT_ENABLE_IF(!std::is_integral<T>::value)>
- unsigned operator()(T) {
+ auto operator()(T) -> unsigned {
throw_format_error("width is not integer");
return 0;
}
@@ -227,80 +222,85 @@ auto make_arg_formatter(buffer_appender<Char> iter, format_specs<Char>& s)
}
// The ``printf`` argument formatter.
-template <typename OutputIt, typename Char>
+template <typename Char>
class printf_arg_formatter : public arg_formatter<Char> {
private:
using base = arg_formatter<Char>;
- using context_type = basic_printf_context<OutputIt, Char>;
+ using context_type = basic_printf_context<Char>;
context_type& context_;
- OutputIt write_null_pointer(bool is_string = false) {
+ void write_null_pointer(bool is_string = false) {
auto s = this->specs;
s.type = presentation_type::none;
- return write_bytes(this->out, is_string ? "(null)" : "(nil)", s);
+ write_bytes(this->out, is_string ? "(null)" : "(nil)", s);
}
public:
- printf_arg_formatter(OutputIt iter, format_specs<Char>& s, context_type& ctx)
+ printf_arg_formatter(buffer_appender<Char> iter, format_specs<Char>& s,
+ context_type& ctx)
: base(make_arg_formatter(iter, s)), context_(ctx) {}
- OutputIt operator()(monostate value) { return base::operator()(value); }
+ void operator()(monostate value) { base::operator()(value); }
template <typename T, FMT_ENABLE_IF(detail::is_integral<T>::value)>
- OutputIt operator()(T value) {
+ void operator()(T value) {
// MSVC2013 fails to compile separate overloads for bool and Char so use
// std::is_same instead.
- if (std::is_same<T, Char>::value) {
- format_specs<Char> fmt_specs = this->specs;
- if (fmt_specs.type != presentation_type::none &&
- fmt_specs.type != presentation_type::chr) {
- return (*this)(static_cast<int>(value));
- }
- fmt_specs.sign = sign::none;
- fmt_specs.alt = false;
- fmt_specs.fill[0] = ' '; // Ignore '0' flag for char types.
- // align::numeric needs to be overwritten here since the '0' flag is
- // ignored for non-numeric types
- if (fmt_specs.align == align::none || fmt_specs.align == align::numeric)
- fmt_specs.align = align::right;
- return write<Char>(this->out, static_cast<Char>(value), fmt_specs);
+ if (!std::is_same<T, Char>::value) {
+ base::operator()(value);
+ return;
}
- return base::operator()(value);
+ format_specs<Char> fmt_specs = this->specs;
+ if (fmt_specs.type != presentation_type::none &&
+ fmt_specs.type != presentation_type::chr) {
+ return (*this)(static_cast<int>(value));
+ }
+ fmt_specs.sign = sign::none;
+ fmt_specs.alt = false;
+ fmt_specs.fill[0] = ' '; // Ignore '0' flag for char types.
+ // align::numeric needs to be overwritten here since the '0' flag is
+ // ignored for non-numeric types
+ if (fmt_specs.align == align::none || fmt_specs.align == align::numeric)
+ fmt_specs.align = align::right;
+ write<Char>(this->out, static_cast<Char>(value), fmt_specs);
}
template <typename T, FMT_ENABLE_IF(std::is_floating_point<T>::value)>
- OutputIt operator()(T value) {
- return base::operator()(value);
+ void operator()(T value) {
+ base::operator()(value);
}
/** Formats a null-terminated C string. */
- OutputIt operator()(const char* value) {
- if (value) return base::operator()(value);
- return write_null_pointer(this->specs.type != presentation_type::pointer);
+ void operator()(const char* value) {
+ if (value)
+ base::operator()(value);
+ else
+ write_null_pointer(this->specs.type != presentation_type::pointer);
}
/** Formats a null-terminated wide C string. */
- OutputIt operator()(const wchar_t* value) {
- if (value) return base::operator()(value);
- return write_null_pointer(this->specs.type != presentation_type::pointer);
+ void operator()(const wchar_t* value) {
+ if (value)
+ base::operator()(value);
+ else
+ write_null_pointer(this->specs.type != presentation_type::pointer);
}
- OutputIt operator()(basic_string_view<Char> value) {
- return base::operator()(value);
- }
+ void operator()(basic_string_view<Char> value) { base::operator()(value); }
/** Formats a pointer. */
- OutputIt operator()(const void* value) {
- return value ? base::operator()(value) : write_null_pointer();
+ void operator()(const void* value) {
+ if (value)
+ base::operator()(value);
+ else
+ write_null_pointer();
}
/** Formats an argument of a custom (user-defined) type. */
- OutputIt operator()(typename basic_format_arg<context_type>::handle handle) {
- auto parse_ctx =
- basic_printf_parse_context<Char>(basic_string_view<Char>());
+ void operator()(typename basic_format_arg<context_type>::handle handle) {
+ auto parse_ctx = basic_format_parse_context<Char>({});
handle.format(parse_ctx, context_);
- return this->out;
}
};
@@ -318,9 +318,7 @@ void parse_flags(format_specs<Char>& specs, const Char*& it, const Char* end) {
specs.fill[0] = '0';
break;
case ' ':
- if (specs.sign != sign::plus) {
- specs.sign = sign::space;
- }
+ if (specs.sign != sign::plus) specs.sign = sign::space;
break;
case '#':
specs.alt = true;
@@ -332,8 +330,8 @@ void parse_flags(format_specs<Char>& specs, const Char*& it, const Char* end) {
}
template <typename Char, typename GetArg>
-int parse_header(const Char*& it, const Char* end, format_specs<Char>& specs,
- GetArg get_arg) {
+auto parse_header(const Char*& it, const Char* end, format_specs<Char>& specs,
+ GetArg get_arg) -> int {
int arg_index = -1;
Char c = *it;
if (c >= '0' && c <= '9') {
@@ -414,8 +412,8 @@ void vprintf(buffer<Char>& buf, basic_string_view<Char> format,
basic_format_args<Context> args) {
using iterator = buffer_appender<Char>;
auto out = iterator(buf);
- auto context = basic_printf_context<iterator, Char>(out, args);
- auto parse_ctx = basic_printf_parse_context<Char>(format);
+ auto context = basic_printf_context<Char>(out, args);
+ auto parse_ctx = basic_format_parse_context<Char>(format);
// Returns the argument with specified index or, if arg_index is -1, the next
// argument.
@@ -437,12 +435,11 @@ void vprintf(buffer<Char>& buf, basic_string_view<Char> format,
}
Char c = *it++;
if (it != end && *it == c) {
- out = write(out, basic_string_view<Char>(start, to_unsigned(it - start)));
+ write(out, basic_string_view<Char>(start, to_unsigned(it - start)));
start = ++it;
continue;
}
- out =
- write(out, basic_string_view<Char>(start, to_unsigned(it - 1 - start)));
+ write(out, basic_string_view<Char>(start, to_unsigned(it - 1 - start)));
auto specs = format_specs<Char>();
specs.align = align::right;
@@ -469,16 +466,17 @@ void vprintf(buffer<Char>& buf, basic_string_view<Char> format,
auto arg = get_arg(arg_index);
// For d, i, o, u, x, and X conversion specifiers, if a precision is
// specified, the '0' flag is ignored
- if (specs.precision >= 0 && arg.is_integral())
- specs.fill[0] =
- ' '; // Ignore '0' flag for non-numeric types or if '-' present.
+ if (specs.precision >= 0 && arg.is_integral()) {
+ // Ignore '0' for non-numeric types or if '-' present.
+ specs.fill[0] = ' ';
+ }
if (specs.precision >= 0 && arg.type() == type::cstring_type) {
auto str = visit_format_arg(get_cstring<Char>(), arg);
auto str_end = str + specs.precision;
auto nul = std::find(str, str_end, Char());
- arg = make_arg<basic_printf_context<iterator, Char>>(
- basic_string_view<Char>(
- str, to_unsigned(nul != str_end ? nul - str : specs.precision)));
+ auto sv = basic_string_view<Char>(
+ str, to_unsigned(nul != str_end ? nul - str : specs.precision));
+ arg = make_arg<basic_printf_context<Char>>(sv);
}
if (specs.alt && visit_format_arg(is_zero_int(), arg)) specs.alt = false;
if (specs.fill[0] == '0') {
@@ -540,8 +538,7 @@ void vprintf(buffer<Char>& buf, basic_string_view<Char> format,
type = 'd';
break;
case 'c':
- visit_format_arg(
- char_converter<basic_printf_context<iterator, Char>>(arg), arg);
+ visit_format_arg(char_converter<basic_printf_context<Char>>(arg), arg);
break;
}
}
@@ -552,19 +549,14 @@ void vprintf(buffer<Char>& buf, basic_string_view<Char> format,
start = it;
// Format argument.
- out = visit_format_arg(
- printf_arg_formatter<iterator, Char>(out, specs, context), arg);
+ visit_format_arg(printf_arg_formatter<Char>(out, specs, context), arg);
}
write(out, basic_string_view<Char>(start, to_unsigned(it - start)));
}
-FMT_END_DETAIL_NAMESPACE
-
-template <typename Char>
-using basic_printf_context_t =
- basic_printf_context<detail::buffer_appender<Char>, Char>;
+} // namespace detail
-using printf_context = basic_printf_context_t<char>;
-using wprintf_context = basic_printf_context_t<wchar_t>;
+using printf_context = basic_printf_context<char>;
+using wprintf_context = basic_printf_context<wchar_t>;
using printf_args = basic_format_args<printf_context>;
using wprintf_args = basic_format_args<wprintf_context>;
@@ -581,25 +573,20 @@ inline auto make_printf_args(const T&... args)
return {args...};
}
-/**
- \rst
- Constructs an `~fmt::format_arg_store` object that contains references to
- arguments and can be implicitly converted to `~fmt::wprintf_args`.
- \endrst
- */
+// DEPRECATED!
template <typename... T>
inline auto make_wprintf_args(const T&... args)
-> format_arg_store<wprintf_context, T...> {
return {args...};
}
-template <typename S, typename Char = char_t<S>>
+template <typename Char>
inline auto vsprintf(
- const S& fmt,
- basic_format_args<basic_printf_context_t<type_identity_t<Char>>> args)
+ basic_string_view<Char> fmt,
+ basic_format_args<basic_printf_context<type_identity_t<Char>>> args)
-> std::basic_string<Char> {
auto buf = basic_memory_buffer<Char>();
- detail::vprintf(buf, detail::to_string_view(fmt), args);
+ detail::vprintf(buf, fmt, args);
return to_string(buf);
}
@@ -615,18 +602,17 @@ inline auto vsprintf(
template <typename S, typename... T,
typename Char = enable_if_t<detail::is_string<S>::value, char_t<S>>>
inline auto sprintf(const S& fmt, const T&... args) -> std::basic_string<Char> {
- using context = basic_printf_context_t<Char>;
return vsprintf(detail::to_string_view(fmt),
- fmt::make_format_args<context>(args...));
+ fmt::make_format_args<basic_printf_context<Char>>(args...));
}
-template <typename S, typename Char = char_t<S>>
+template <typename Char>
inline auto vfprintf(
- std::FILE* f, const S& fmt,
- basic_format_args<basic_printf_context_t<type_identity_t<Char>>> args)
+ std::FILE* f, basic_string_view<Char> fmt,
+ basic_format_args<basic_printf_context<type_identity_t<Char>>> args)
-> int {
auto buf = basic_memory_buffer<Char>();
- detail::vprintf(buf, detail::to_string_view(fmt), args);
+ detail::vprintf(buf, fmt, args);
size_t size = buf.size();
return std::fwrite(buf.data(), sizeof(Char), size, f) < size
? -1
@@ -644,17 +630,16 @@ inline auto vfprintf(
*/
template <typename S, typename... T, typename Char = char_t<S>>
inline auto fprintf(std::FILE* f, const S& fmt, const T&... args) -> int {
- using context = basic_printf_context_t<Char>;
return vfprintf(f, detail::to_string_view(fmt),
- fmt::make_format_args<context>(args...));
+ fmt::make_format_args<basic_printf_context<Char>>(args...));
}
-template <typename S, typename Char = char_t<S>>
-inline auto vprintf(
- const S& fmt,
- basic_format_args<basic_printf_context_t<type_identity_t<Char>>> args)
+template <typename Char>
+FMT_DEPRECATED inline auto vprintf(
+ basic_string_view<Char> fmt,
+ basic_format_args<basic_printf_context<type_identity_t<Char>>> args)
-> int {
- return vfprintf(stdout, detail::to_string_view(fmt), args);
+ return vfprintf(stdout, fmt, args);
}
/**
@@ -666,11 +651,14 @@ inline auto vprintf(
fmt::printf("Elapsed time: %.2f seconds", 1.23);
\endrst
*/
-template <typename S, typename... T, FMT_ENABLE_IF(detail::is_string<S>::value)>
-inline auto printf(const S& fmt, const T&... args) -> int {
- return vprintf(
- detail::to_string_view(fmt),
- fmt::make_format_args<basic_printf_context_t<char_t<S>>>(args...));
+template <typename... T>
+inline auto printf(string_view fmt, const T&... args) -> int {
+ return vfprintf(stdout, fmt, make_printf_args(args...));
+}
+template <typename... T>
+FMT_DEPRECATED inline auto printf(basic_string_view<wchar_t> fmt,
+ const T&... args) -> int {
+ return vfprintf(stdout, fmt, make_wprintf_args(args...));
}
FMT_END_EXPORT
diff --git a/src/fmtlib/fmt/ranges.h b/src/fmtlib/fmt/ranges.h
index 266b9e1..65beba5 100644
--- a/src/fmtlib/fmt/ranges.h
+++ b/src/fmtlib/fmt/ranges.h
@@ -668,8 +668,11 @@ template <typename Container> struct all {
} // namespace detail
template <typename T, typename Char>
-struct formatter<T, Char,
- enable_if_t<detail::is_container_adaptor_like<T>::value>>
+struct formatter<
+ T, Char,
+ enable_if_t<conjunction<detail::is_container_adaptor_like<T>,
+ bool_constant<range_format_kind<T, Char>::value ==
+ range_format::disabled>>::value>>
: formatter<detail::all<typename T::container_type>, Char> {
using all = detail::all<typename T::container_type>;
template <typename FormatContext>
diff --git a/src/fmtlib/fmt/std.h b/src/fmtlib/fmt/std.h
index 4c2a28c..b4e055c 100644
--- a/src/fmtlib/fmt/std.h
+++ b/src/fmtlib/fmt/std.h
@@ -8,6 +8,8 @@
#ifndef FMT_STD_H_
#define FMT_STD_H_
+#include <atomic>
+#include <bitset>
#include <cstdlib>
#include <exception>
#include <memory>
@@ -15,7 +17,9 @@
#include <type_traits>
#include <typeinfo>
#include <utility>
+#include <vector>
+#include "format.h"
#include "ostream.h"
#if FMT_HAS_INCLUDE(<version>)
@@ -44,27 +48,48 @@
# endif
#endif
+// Check if typeid is available.
+#ifndef FMT_USE_TYPEID
+// __RTTI is for EDG compilers. In MSVC typeid is available without RTTI.
+# if defined(__GXX_RTTI) || FMT_HAS_FEATURE(cxx_rtti) || FMT_MSC_VERSION || \
+ defined(__INTEL_RTTI__) || defined(__RTTI)
+# define FMT_USE_TYPEID 1
+# else
+# define FMT_USE_TYPEID 0
+# endif
+#endif
+
#ifdef __cpp_lib_filesystem
FMT_BEGIN_NAMESPACE
namespace detail {
+template <typename Char> auto get_path_string(const std::filesystem::path& p) {
+ return p.string<Char>();
+}
+
template <typename Char>
void write_escaped_path(basic_memory_buffer<Char>& quoted,
const std::filesystem::path& p) {
write_escaped_string<Char>(std::back_inserter(quoted), p.string<Char>());
}
+
# ifdef _WIN32
template <>
+inline auto get_path_string<char>(const std::filesystem::path& p) {
+ return to_utf8<wchar_t>(p.native(), to_utf8_error_policy::replace);
+}
+
+template <>
inline void write_escaped_path<char>(memory_buffer& quoted,
const std::filesystem::path& p) {
auto buf = basic_memory_buffer<wchar_t>();
write_escaped_string<wchar_t>(std::back_inserter(buf), p.native());
- // Convert UTF-16 to UTF-8.
- if (!unicode_to_utf8<wchar_t>::convert(quoted, {buf.data(), buf.size()}))
- FMT_THROW(std::runtime_error("invalid utf16"));
+ bool valid = to_utf8<wchar_t>::convert(quoted, {buf.data(), buf.size()});
+ FMT_ASSERT(valid, "invalid utf16");
}
-# endif
+# endif // _WIN32
+
template <>
inline void write_escaped_path<std::filesystem::path::value_type>(
basic_memory_buffer<std::filesystem::path::value_type>& quoted,
@@ -75,36 +100,59 @@ inline void write_escaped_path<std::filesystem::path::value_type>(
} // namespace detail
-FMT_MODULE_EXPORT
-template <typename Char>
-struct formatter<std::filesystem::path, Char>
- : formatter<basic_string_view<Char>> {
+FMT_EXPORT
+template <typename Char> struct formatter<std::filesystem::path, Char> {
+ private:
+ format_specs<Char> specs_;
+ detail::arg_ref<Char> width_ref_;
+ bool debug_ = false;
+
+ public:
+ FMT_CONSTEXPR void set_debug_format(bool set = true) { debug_ = set; }
+
template <typename ParseContext> FMT_CONSTEXPR auto parse(ParseContext& ctx) {
- auto out = formatter<basic_string_view<Char>>::parse(ctx);
- this->set_debug_format(false);
- return out;
+ auto it = ctx.begin(), end = ctx.end();
+ if (it == end) return it;
+
+ it = detail::parse_align(it, end, specs_);
+ if (it == end) return it;
+
+ it = detail::parse_dynamic_spec(it, end, specs_.width, width_ref_, ctx);
+ if (it != end && *it == '?') {
+ debug_ = true;
+ ++it;
+ }
+ return it;
}
+
template <typename FormatContext>
- auto format(const std::filesystem::path& p, FormatContext& ctx) const ->
- typename FormatContext::iterator {
+ auto format(const std::filesystem::path& p, FormatContext& ctx) const {
+ auto specs = specs_;
+ detail::handle_dynamic_spec<detail::width_checker>(specs.width, width_ref_,
+ ctx);
+ if (!debug_) {
+ auto s = detail::get_path_string<Char>(p);
+ return detail::write(ctx.out(), basic_string_view<Char>(s), specs);
+ }
auto quoted = basic_memory_buffer<Char>();
detail::write_escaped_path(quoted, p);
- return formatter<basic_string_view<Char>>::format(
- basic_string_view<Char>(quoted.data(), quoted.size()), ctx);
+ return detail::write(ctx.out(),
+ basic_string_view<Char>(quoted.data(), quoted.size()),
+ specs);
}
};
FMT_END_NAMESPACE
#endif
FMT_BEGIN_NAMESPACE
-FMT_MODULE_EXPORT
+FMT_EXPORT
template <typename Char>
struct formatter<std::thread::id, Char> : basic_ostream_formatter<Char> {};
FMT_END_NAMESPACE
#ifdef __cpp_lib_optional
FMT_BEGIN_NAMESPACE
-FMT_MODULE_EXPORT
+FMT_EXPORT
template <typename T, typename Char>
struct formatter<std::optional<T>, Char,
std::enable_if_t<is_formattable<T, Char>::value>> {
@@ -148,22 +196,6 @@ FMT_END_NAMESPACE
#ifdef __cpp_lib_variant
FMT_BEGIN_NAMESPACE
-FMT_MODULE_EXPORT
-template <typename Char> struct formatter<std::monostate, Char> {
- template <typename ParseContext>
- FMT_CONSTEXPR auto parse(ParseContext& ctx) -> decltype(ctx.begin()) {
- return ctx.begin();
- }
-
- template <typename FormatContext>
- auto format(const std::monostate&, FormatContext& ctx) const
- -> decltype(ctx.out()) {
- auto out = ctx.out();
- out = detail::write<Char>(out, "monostate");
- return out;
- }
-};
-
namespace detail {
template <typename T>
@@ -197,6 +229,7 @@ auto write_variant_alternative(OutputIt out, const T& v) -> OutputIt {
}
} // namespace detail
+
template <typename T> struct is_variant_like {
static constexpr const bool value = detail::is_variant_like_<T>::value;
};
@@ -206,7 +239,21 @@ template <typename T, typename C> struct is_variant_formattable {
detail::is_variant_formattable_<T, C>::value;
};
-FMT_MODULE_EXPORT
+FMT_EXPORT
+template <typename Char> struct formatter<std::monostate, Char> {
+ template <typename ParseContext>
+ FMT_CONSTEXPR auto parse(ParseContext& ctx) -> decltype(ctx.begin()) {
+ return ctx.begin();
+ }
+
+ template <typename FormatContext>
+ auto format(const std::monostate&, FormatContext& ctx) const
+ -> decltype(ctx.out()) {
+ return detail::write<Char>(ctx.out(), "monostate");
+ }
+};
+
+FMT_EXPORT
template <typename Variant, typename Char>
struct formatter<
Variant, Char,
@@ -223,13 +270,14 @@ struct formatter<
auto out = ctx.out();
out = detail::write<Char>(out, "variant(");
- try {
+ FMT_TRY {
std::visit(
[&](const auto& v) {
out = detail::write_variant_alternative<Char>(out, v);
},
value);
- } catch (const std::bad_variant_access&) {
+ }
+ FMT_CATCH(const std::bad_variant_access&) {
detail::write<Char>(out, "valueless by exception");
}
*out++ = ')';
@@ -240,7 +288,7 @@ FMT_END_NAMESPACE
#endif // __cpp_lib_variant
FMT_BEGIN_NAMESPACE
-FMT_MODULE_EXPORT
+FMT_EXPORT
template <typename Char> struct formatter<std::error_code, Char> {
template <typename ParseContext>
FMT_CONSTEXPR auto parse(ParseContext& ctx) -> decltype(ctx.begin()) {
@@ -258,7 +306,7 @@ template <typename Char> struct formatter<std::error_code, Char> {
}
};
-FMT_MODULE_EXPORT
+FMT_EXPORT
template <typename T, typename Char>
struct formatter<
T, Char,
@@ -274,7 +322,7 @@ struct formatter<
if (it == end || *it == '}') return it;
if (*it == 't') {
++it;
- with_typename_ = true;
+ with_typename_ = FMT_USE_TYPEID != 0;
}
return it;
}
@@ -287,8 +335,9 @@ struct formatter<
if (!with_typename_)
return detail::write_bytes(out, string_view(ex.what()), spec);
+#if FMT_USE_TYPEID
const std::type_info& ti = typeid(ex);
-#ifdef FMT_HAS_ABI_CXA_DEMANGLE
+# ifdef FMT_HAS_ABI_CXA_DEMANGLE
int status = 0;
std::size_t size = 0;
std::unique_ptr<char, decltype(&std::free)> demangled_name_ptr(
@@ -327,23 +376,90 @@ struct formatter<
demangled_name_view = string_view(ti.name());
}
out = detail::write_bytes(out, demangled_name_view, spec);
-#elif FMT_MSC_VERSION
+# elif FMT_MSC_VERSION
string_view demangled_name_view(ti.name());
if (demangled_name_view.starts_with("class "))
demangled_name_view.remove_prefix(6);
else if (demangled_name_view.starts_with("struct "))
demangled_name_view.remove_prefix(7);
out = detail::write_bytes(out, demangled_name_view, spec);
-#else
+# else
out = detail::write_bytes(out, string_view(ti.name()), spec);
+# endif
+ *out++ = ':';
+ *out++ = ' ';
+ return detail::write_bytes(out, string_view(ex.what()), spec);
#endif
- out = detail::write<Char>(out, Char(':'));
- out = detail::write<Char>(out, Char(' '));
- out = detail::write_bytes(out, string_view(ex.what()), spec);
+ }
+};
- return out;
+namespace detail {
+
+template <typename T, typename Enable = void>
+struct has_flip : std::false_type {};
+
+template <typename T>
+struct has_flip<T, void_t<decltype(std::declval<T>().flip())>>
+ : std::true_type {};
+
+template <typename T> struct is_bit_reference_like {
+ static constexpr const bool value =
+ std::is_convertible<T, bool>::value &&
+ std::is_nothrow_assignable<T, bool>::value && has_flip<T>::value;
+};
+
+#ifdef _LIBCPP_VERSION
+
+// Workaround for libc++ incompatibility with C++ standard.
+// According to the Standard, `bitset::operator[] const` returns bool.
+template <typename C>
+struct is_bit_reference_like<std::__bit_const_reference<C>> {
+ static constexpr const bool value = true;
+};
+
+#endif
+
+} // namespace detail
+
+// We can't use std::vector<bool, Allocator>::reference and
+// std::bitset<N>::reference because the compiler can't deduce Allocator and N
+// in partial specialization.
+FMT_EXPORT
+template <typename BitRef, typename Char>
+struct formatter<BitRef, Char,
+ enable_if_t<detail::is_bit_reference_like<BitRef>::value>>
+ : formatter<bool, Char> {
+ template <typename FormatContext>
+ FMT_CONSTEXPR auto format(const BitRef& v, FormatContext& ctx) const
+ -> decltype(ctx.out()) {
+ return formatter<bool, Char>::format(v, ctx);
+ }
+};
+
+FMT_EXPORT
+template <typename T, typename Char>
+struct formatter<std::atomic<T>, Char,
+ enable_if_t<is_formattable<T, Char>::value>>
+ : formatter<T, Char> {
+ template <typename FormatContext>
+ auto format(const std::atomic<T>& v, FormatContext& ctx) const
+ -> decltype(ctx.out()) {
+ return formatter<T, Char>::format(v.load(), ctx);
}
};
-FMT_END_NAMESPACE
+#ifdef __cpp_lib_atomic_flag_test
+FMT_EXPORT
+template <typename Char>
+struct formatter<std::atomic_flag, Char>
+ : formatter<bool, Char> {
+ template <typename FormatContext>
+ auto format(const std::atomic_flag& v, FormatContext& ctx) const
+ -> decltype(ctx.out()) {
+ return formatter<bool, Char>::format(v.test(), ctx);
+ }
+};
+#endif // __cpp_lib_atomic_flag_test
+
+FMT_END_NAMESPACE
#endif // FMT_STD_H_
diff --git a/src/fmtlib/fmt/xchar.h b/src/fmtlib/fmt/xchar.h
index 4b87f8d..625ec36 100644
--- a/src/fmtlib/fmt/xchar.h
+++ b/src/fmtlib/fmt/xchar.h
@@ -62,9 +62,9 @@ template <> struct is_char<detail::char8_type> : std::true_type {};
template <> struct is_char<char16_t> : std::true_type {};
template <> struct is_char<char32_t> : std::true_type {};
-template <typename... Args>
-constexpr format_arg_store<wformat_context, Args...> make_wformat_args(
- const Args&... args) {
+template <typename... T>
+constexpr format_arg_store<wformat_context, T...> make_wformat_args(
+ const T&... args) {
return {args...};
}
@@ -99,9 +99,9 @@ template <typename Char, FMT_ENABLE_IF(!std::is_same<Char, char>::value)>
auto vformat(basic_string_view<Char> format_str,
basic_format_args<buffer_context<type_identity_t<Char>>> args)
-> std::basic_string<Char> {
- basic_memory_buffer<Char> buffer;
- detail::vformat_to(buffer, format_str, args);
- return to_string(buffer);
+ auto buf = basic_memory_buffer<Char>();
+ detail::vformat_to(buf, format_str, args);
+ return to_string(buf);
}
template <typename... T>
@@ -111,10 +111,10 @@ auto format(wformat_string<T...> fmt, T&&... args) -> std::wstring {
// Pass char_t as a default template parameter instead of using
// std::basic_string<char_t<S>> to reduce the symbol size.
-template <typename S, typename... Args, typename Char = char_t<S>,
+template <typename S, typename... T, typename Char = char_t<S>,
FMT_ENABLE_IF(!std::is_same<Char, char>::value &&
!std::is_same<Char, wchar_t>::value)>
-auto format(const S& format_str, Args&&... args) -> std::basic_string<Char> {
+auto format(const S& format_str, T&&... args) -> std::basic_string<Char> {
return vformat(detail::to_string_view(format_str),
fmt::make_format_args<buffer_context<Char>>(args...));
}
@@ -129,11 +129,10 @@ inline auto vformat(
return detail::vformat(loc, detail::to_string_view(format_str), args);
}
-template <typename Locale, typename S, typename... Args,
- typename Char = char_t<S>,
+template <typename Locale, typename S, typename... T, typename Char = char_t<S>,
FMT_ENABLE_IF(detail::is_locale<Locale>::value&&
detail::is_exotic_char<Char>::value)>
-inline auto format(const Locale& loc, const S& format_str, Args&&... args)
+inline auto format(const Locale& loc, const S& format_str, T&&... args)
-> std::basic_string<Char> {
return detail::vformat(loc, detail::to_string_view(format_str),
fmt::make_format_args<buffer_context<Char>>(args...));
@@ -150,11 +149,11 @@ auto vformat_to(OutputIt out, const S& format_str,
return detail::get_iterator(buf, out);
}
-template <typename OutputIt, typename S, typename... Args,
+template <typename OutputIt, typename S, typename... T,
typename Char = char_t<S>,
FMT_ENABLE_IF(detail::is_output_iterator<OutputIt, Char>::value&&
detail::is_exotic_char<Char>::value)>
-inline auto format_to(OutputIt out, const S& fmt, Args&&... args) -> OutputIt {
+inline auto format_to(OutputIt out, const S& fmt, T&&... args) -> OutputIt {
return vformat_to(out, detail::to_string_view(fmt),
fmt::make_format_args<buffer_context<Char>>(args...));
}
@@ -174,12 +173,12 @@ inline auto vformat_to(
}
template <
- typename OutputIt, typename Locale, typename S, typename... Args,
+ typename OutputIt, typename Locale, typename S, typename... T,
typename Char = char_t<S>,
bool enable = detail::is_output_iterator<OutputIt, Char>::value&&
detail::is_locale<Locale>::value&& detail::is_exotic_char<Char>::value>
inline auto format_to(OutputIt out, const Locale& loc, const S& format_str,
- Args&&... args) ->
+ T&&... args) ->
typename std::enable_if<enable, OutputIt>::type {
return vformat_to(out, loc, detail::to_string_view(format_str),
fmt::make_format_args<buffer_context<Char>>(args...));
@@ -192,36 +191,36 @@ inline auto vformat_to_n(
OutputIt out, size_t n, basic_string_view<Char> format_str,
basic_format_args<buffer_context<type_identity_t<Char>>> args)
-> format_to_n_result<OutputIt> {
- detail::iterator_buffer<OutputIt, Char, detail::fixed_buffer_traits> buf(out,
- n);
+ using traits = detail::fixed_buffer_traits;
+ auto buf = detail::iterator_buffer<OutputIt, Char, traits>(out, n);
detail::vformat_to(buf, format_str, args);
return {buf.out(), buf.count()};
}
-template <typename OutputIt, typename S, typename... Args,
+template <typename OutputIt, typename S, typename... T,
typename Char = char_t<S>,
FMT_ENABLE_IF(detail::is_output_iterator<OutputIt, Char>::value&&
detail::is_exotic_char<Char>::value)>
-inline auto format_to_n(OutputIt out, size_t n, const S& fmt,
- const Args&... args) -> format_to_n_result<OutputIt> {
+inline auto format_to_n(OutputIt out, size_t n, const S& fmt, T&&... args)
+ -> format_to_n_result<OutputIt> {
return vformat_to_n(out, n, detail::to_string_view(fmt),
fmt::make_format_args<buffer_context<Char>>(args...));
}
-template <typename S, typename... Args, typename Char = char_t<S>,
+template <typename S, typename... T, typename Char = char_t<S>,
FMT_ENABLE_IF(detail::is_exotic_char<Char>::value)>
-inline auto formatted_size(const S& fmt, Args&&... args) -> size_t {
- detail::counting_buffer<Char> buf;
+inline auto formatted_size(const S& fmt, T&&... args) -> size_t {
+ auto buf = detail::counting_buffer<Char>();
detail::vformat_to(buf, detail::to_string_view(fmt),
fmt::make_format_args<buffer_context<Char>>(args...));
return buf.count();
}
inline void vprint(std::FILE* f, wstring_view fmt, wformat_args args) {
- wmemory_buffer buffer;
- detail::vformat_to(buffer, fmt, args);
- buffer.push_back(L'\0');
- if (std::fputws(buffer.data(), f) == -1)
+ auto buf = wmemory_buffer();
+ detail::vformat_to(buf, fmt, args);
+ buf.push_back(L'\0');
+ if (std::fputws(buf.data(), f) == -1)
FMT_THROW(system_error(errno, FMT_STRING("cannot write to file")));
}
diff --git a/src/fmtlib/os.cc b/src/fmtlib/os.cc
index 01732b3..bca410e 100644
--- a/src/fmtlib/os.cc
+++ b/src/fmtlib/os.cc
@@ -18,6 +18,10 @@
# include <sys/stat.h>
# include <sys/types.h>
+# ifdef _WRS_KERNEL // VxWorks7 kernel
+# include <ioLib.h> // getpagesize
+# endif
+
# ifndef _WIN32
# include <unistd.h>
# else
@@ -110,9 +114,9 @@ class utf8_system_category final : public std::error_category {
public:
const char* name() const noexcept override { return "system"; }
std::string message(int error_code) const override {
- system_message msg(error_code);
+ auto&& msg = system_message(error_code);
if (msg) {
- unicode_to_utf8<wchar_t> utf8_message;
+ auto utf8_message = to_utf8<wchar_t>();
if (utf8_message.convert(msg)) {
return utf8_message.str();
}
@@ -137,12 +141,12 @@ std::system_error vwindows_error(int err_code, string_view format_str,
void detail::format_windows_error(detail::buffer<char>& out, int error_code,
const char* message) noexcept {
FMT_TRY {
- system_message msg(error_code);
+ auto&& msg = system_message(error_code);
if (msg) {
- unicode_to_utf8<wchar_t> utf8_message;
+ auto utf8_message = to_utf8<wchar_t>();
if (utf8_message.convert(msg)) {
- fmt::format_to(buffer_appender<char>(out), FMT_STRING("{}: {}"),
- message, string_view(utf8_message));
+ fmt::format_to(appender(out), FMT_STRING("{}: {}"), message,
+ string_view(utf8_message));
return;
}
}
@@ -337,9 +341,8 @@ file file::open_windows_file(wcstring_view path, int oflag) {
int fd = -1;
auto err = _wsopen_s(&fd, path.c_str(), oflag, _SH_DENYNO, default_open_mode);
if (fd == -1) {
- FMT_THROW(
- system_error(err, FMT_STRING("cannot open file {}"),
- detail::unicode_to_utf8<wchar_t>(path.c_str()).c_str()));
+ FMT_THROW(system_error(err, FMT_STRING("cannot open file {}"),
+ detail::to_utf8<wchar_t>(path.c_str()).c_str()));
}
return file(fd);
}
@@ -352,7 +355,12 @@ long getpagesize() {
GetSystemInfo(&si);
return si.dwPageSize;
# else
+# ifdef _WRS_KERNEL
+ long size = FMT_POSIX_CALL(getpagesize());
+# else
long size = FMT_POSIX_CALL(sysconf(_SC_PAGESIZE));
+# endif
+
if (size < 0)
FMT_THROW(system_error(errno, FMT_STRING("cannot get memory page size")));
return size;
diff --git a/src/formats/access_log.json b/src/formats/access_log.json
index 6a5b020..b71d210 100644
--- a/src/formats/access_log.json
+++ b/src/formats/access_log.json
@@ -111,6 +111,9 @@
{
"line": "10.112.2.3 - - [16/Sep/2022:00:53:14 +0200] \"POST /api/v4/jobs/request HTTP/1.1\" 204 0 \"\" \"gitlab-runner 15.3.0 (15-3-stable; go1.19; linux/amd64)\" -",
"level": "info"
+ },
+ {
+ "line": "172.18.0.1 - - [29/Aug/2023 22:02:58] \"GET / HTTP/1.1\" 200 -"
}
]
}
diff --git a/src/formats/block_log.json b/src/formats/block_log.json
index aaba6d8..3450d8a 100644
--- a/src/formats/block_log.json
+++ b/src/formats/block_log.json
@@ -8,7 +8,7 @@
"pattern": "^(?<timestamp>\\S{3,8} \\w{3}\\s+\\d{1,2} \\d{2}:\\d{2}:\\d{2} \\w+ \\d{4})\\s*(?<body>.*)$"
},
"sq-brackets": {
- "pattern": "^\\[(?<timestamp>\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{3,6})?)Z?\\]\\s*(?<body>.*)$"
+ "pattern": "^\\[(?<timestamp>\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{3,6})?(?:Z|[-+]\\d{2}:?\\d{2})?)\\]\\s*(?<body>.*)$"
}
},
"sample": [
diff --git a/src/formats/bunyan_log.json b/src/formats/bunyan_log.json
index 4902d19..92bd7b3 100644
--- a/src/formats/bunyan_log.json
+++ b/src/formats/bunyan_log.json
@@ -1,6 +1,6 @@
{
"$schema": "https://lnav.org/schemas/format-v1.schema.json",
- "bunyan": {
+ "bunyan_log": {
"title": "Bunyan log",
"url": "https://github.com/trentm/node-bunyan",
"description": "Bunyan JSON logging library for node.js",
diff --git a/src/formats/cloudvm_ram_log.json b/src/formats/cloudvm_ram_log.json
index 723cdaa..e129344 100644
--- a/src/formats/cloudvm_ram_log.json
+++ b/src/formats/cloudvm_ram_log.json
@@ -5,7 +5,7 @@
"description": "Periodic dumps of ram sizes",
"regex": {
"std": {
- "pattern": "========== Start of cloudvm ram size dump at (?<timestamp>[^=]+)==========(?<body>.*)"
+ "pattern": "========== Start of cloudvm ram size dump at (?<timestamp>[^=]+) ==========(?<body>.*)"
}
},
"sample": [
diff --git a/src/formats/esx_syslog_log.json b/src/formats/esx_syslog_log.json
index 85fa881..e92612a 100644
--- a/src/formats/esx_syslog_log.json
+++ b/src/formats/esx_syslog_log.json
@@ -5,7 +5,7 @@
"description": "Format specific to the ESXi syslog",
"regex": {
"std": {
- "pattern": "^(?<timestamp>(?:\\S{3,8}\\s+\\d{1,2} \\d{2}:\\d{2}:\\d{2}|\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{3})?Z))\\s+(?<level>\\w+)\\((?<syslog_pri>\\d+)\\)(?:\\[\\+\\]|\\+)?(?:(?: (?<log_syslog_tag>(?<log_procname>(?:[^\\[:]+|[^:]+))(?:\\[(?<log_pid>\\d+)\\])?):\\s*(?<body>.*))$|:?(?:(?: ---)? last message repeated \\d+ times?(?: ---)?))"
+ "pattern": "^(?<timestamp>(?:\\S{3,8}\\s+\\d{1,2} \\d{2}:\\d{2}:\\d{2}|\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{3})?Z))\\s+(?<level>\\w+)\\((?<syslog_pri>\\d+)\\)(?:\\[\\+\\]|\\+)?(?:(?: (?<log_syslog_tag>(?<log_procname>(?:[^\\[:]+|[^:]+))(?:\\[(?<log_pid>\\d+)\\])?):\\s*(?:\\w+ \\[(?<logger>[^ ]+)(?: op[iI][dD]=(?<opid>[^ \\]]+))?\\]\\s*)?(?<body>.*))$|:?(?:(?: ---)? last message repeated \\d+ times?(?: ---)?))"
},
"host": {
"pattern": "^(?<timestamp>(?:\\S{3,8}\\s+\\d{1,2} \\d{2}:\\d{2}:\\d{2}|\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{3})?Z))\\s+(?<level>\\w+)\\((?<syslog_pri>\\d+)\\)(?:\\[\\+\\]|\\+)?(?:(?: (?<log_syslog_tag>(?:host-(?<log_pid>\\d+))?)\\s+(?<body>.*))$|:?(?:(?: ---)? last message repeated \\d+ times?(?: ---)?))"
@@ -23,7 +23,20 @@
"critical": "^Cr$",
"fatal": "^(?:Al|Em)$"
},
- "opid-field": "log_syslog_tag",
+ "opid-field": "opid",
+ "opid": {
+ "subid": "log_syslog_tag",
+ "description": {
+ "settingsd": {
+ "format": [
+ {
+ "field": "body",
+ "extractor": "^Authz::Invoke method: (.+)"
+ }
+ ]
+ }
+ }
+ },
"time-field": "new_time",
"multiline": false,
"value": {
@@ -41,6 +54,10 @@
"log_syslog_tag": {
"kind": "string"
},
+ "opid": {
+ "kind": "string",
+ "identifier": true
+ },
"syslog_pri": {
"kind": "string"
},
@@ -60,6 +77,15 @@
},
{
"line": "2022-06-01T13:42:40.681Z In(05) host-16250 <analytics> Skip service health check. State STOPPED, Curr request 0"
+ },
+ {
+ "line": "2023-08-09T14:42:43.094Z In(14) settingsd[263657]: debug [ConfigStore:c5f9ac2700 opId=cabbdb94-0afb-4d23-9203-e901779b9b04] [RunCommand] About to run command /usr/bin/python /usr/lib/vmware/lifecycle/bin/imagemanagerctl.py VIB --list-all"
+ },
+ {
+ "line": "2022-05-17T07:39:38.357Z In(9) watchdog-vobd[1001390409]: Executing '/usr/lib/vmware/vob/bin/vobd ++securitydom=vobdDom'"
+ },
+ {
+ "line": "2023-11-07T19:17:28.030Z In(14) settingsd[2099680]: [Ticket] Deleted ticket /var/run/vmware/tickets/vmtck-31182534-c078-88"
}
]
}
diff --git a/src/formats/formats.am b/src/formats/formats.am
index 9b3d8a9..7896364 100644
--- a/src/formats/formats.am
+++ b/src/formats/formats.am
@@ -15,11 +15,14 @@ FORMAT_FILES = \
$(srcdir)/%reldir%/error_log.json \
$(srcdir)/%reldir%/esx_syslog_log.json \
$(srcdir)/%reldir%/fsck_hfs_log.json \
+ $(srcdir)/%reldir%/github_events_log.json \
$(srcdir)/%reldir%/glog_log.json \
$(srcdir)/%reldir%/haproxy_log.json \
$(srcdir)/%reldir%/java_log.json \
$(srcdir)/%reldir%/journald_json_log.json \
$(srcdir)/%reldir%/katello_log.json \
+ $(srcdir)/%reldir%/nextcloud_log.json \
+ $(srcdir)/%reldir%/nextflow_log.json \
$(srcdir)/%reldir%/openam_log.json \
$(srcdir)/%reldir%/openamdb_log.json \
$(srcdir)/%reldir%/openstack_log.json \
@@ -27,6 +30,7 @@ FORMAT_FILES = \
$(srcdir)/%reldir%/papertrail_log.json \
$(srcdir)/%reldir%/pcap_log.json \
$(srcdir)/%reldir%/procstate_log.json \
+ $(srcdir)/%reldir%/redis_log.json \
$(srcdir)/%reldir%/snaplogic_log.json \
$(srcdir)/%reldir%/sssd_log.json \
$(srcdir)/%reldir%/strace_log.json \
@@ -42,5 +46,6 @@ FORMAT_FILES = \
$(srcdir)/%reldir%/vmw_log.json \
$(srcdir)/%reldir%/vmw_vc_svc_log.json \
$(srcdir)/%reldir%/vmw_py_log.json \
+ $(srcdir)/%reldir%/vpostgres_log.json \
$(srcdir)/%reldir%/xmlrpc_log.json \
$()
diff --git a/src/formats/github_events_log.json b/src/formats/github_events_log.json
new file mode 100644
index 0000000..a68e9bd
--- /dev/null
+++ b/src/formats/github_events_log.json
@@ -0,0 +1,194 @@
+{
+ "$schema": "https://lnav.org/schemas/format-v1.schema.json",
+ "github_events_log": {
+ "title": "GitHub Events Log",
+ "description": "Format for the public GitHub timeline from gharchive.org",
+ "url": "https://gharchive.org",
+ "file-type": "json",
+ "timestamp-field": "created_at",
+ "opid-field": "actor/display_login",
+ "line-format": [
+ {
+ "field": "__timestamp__"
+ },
+ {
+ "prefix": " ",
+ "field": "type"
+ },
+ {
+ "prefix": " ",
+ "field": "actor/display_login"
+ },
+ {
+ "prefix": " ",
+ "field": "payload/action",
+ "default-value": ""
+ },
+ {
+ "prefix": " ",
+ "field": "payload/member/login",
+ "suffix": " to",
+ "default-value": ""
+ },
+ {
+ "prefix": " committed \u201c",
+ "field": "payload/commits#/message",
+ "suffix": "\u201d to",
+ "default-value": ""
+ },
+ {
+ "prefix": " forked ",
+ "field": "payload/forkee/full_name",
+ "suffix": " from",
+ "default-value": ""
+ },
+ {
+ "prefix": " review ",
+ "field": "payload/review/id",
+ "suffix": " for",
+ "default-value": ""
+ },
+ {
+ "prefix": " pull-request #",
+ "field": "payload/pull_request/number",
+ "default-value": ""
+ },
+ {
+ "prefix": " \u201c",
+ "field": "payload/pull_request/title",
+ "suffix": "\u201d in",
+ "default-value": ""
+ },
+ {
+ "prefix": " issue #",
+ "field": "payload/issue/number",
+ "default-value": ""
+ },
+ {
+ "prefix": " \u201c",
+ "field": "payload/issue/title",
+ "suffix": "\u201d in",
+ "default-value": ""
+ },
+ {
+ "prefix": " ",
+ "field": "payload/ref_type",
+ "default-value": ""
+ },
+ {
+ "prefix": " off ",
+ "field": "payload/master_branch",
+ "suffix": " in",
+ "default-value": ""
+ },
+ {
+ "prefix": " ",
+ "field": "payload/pages#/action",
+ "default-value": ""
+ },
+ {
+ "prefix": " page ",
+ "field": "payload/pages#/title",
+ "suffix": " in",
+ "default-value": ""
+ },
+ {
+ "prefix": " ",
+ "field": "payload/release/name",
+ "suffix": " in",
+ "default-value": ""
+ },
+ {
+ "prefix": " ",
+ "field": "repo/name",
+ "default-value": ""
+ }
+ ],
+ "value": {
+ "id": {
+ "kind": "string",
+ "identifier": true,
+ "hidden": true
+ },
+ "type": {
+ "kind": "string",
+ "identifier": true
+ },
+ "actor": {
+ "kind": "json",
+ "hidden": true
+ },
+ "actor/display_login": {
+ "kind": "string",
+ "identifier": true
+ },
+ "org": {
+ "kind": "json",
+ "hidden": true
+ },
+ "payload": {
+ "kind": "json",
+ "hidden": true
+ },
+ "payload/action": {
+ "kind": "string"
+ },
+ "payload/commits#/message": {
+ "kind": "string"
+ },
+ "payload/forkee/full_name": {
+ "kind": "string"
+ },
+ "payload/master_branch": {
+ "kind": "string",
+ "identifier": true
+ },
+ "payload/member/login": {
+ "kind": "string",
+ "identifier": true
+ },
+ "payload/pull_request/number": {
+ "kind": "integer",
+ "identifier": true
+ },
+ "payload/pull_request/title": {
+ "kind": "string"
+ },
+ "payload/issue/number": {
+ "kind": "integer",
+ "identifier": true
+ },
+ "payload/issue/title": {
+ "kind": "string"
+ },
+ "payload/pages#/action": {
+ "kind": "string"
+ },
+ "payload/pages#/title": {
+ "kind": "string"
+ },
+ "payload/ref_type": {
+ "kind": "string"
+ },
+ "payload/release/name": {
+ "kind": "string"
+ },
+ "payload/review/id": {
+ "kind": "integer",
+ "identifier": true
+ },
+ "public": {
+ "kind": "boolean",
+ "hidden": true
+ },
+ "repo": {
+ "kind": "json",
+ "hidden": true
+ },
+ "repo/name": {
+ "kind": "string",
+ "identifier": true
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/src/formats/java_log.json b/src/formats/java_log.json
index 0d6297a..d9c036a 100644
--- a/src/formats/java_log.json
+++ b/src/formats/java_log.json
@@ -12,40 +12,53 @@
"pattern": "^(?<level>\\w+)\\s+\\|\\s+jvm (?<jvm_no>\\d+)\\s+\\|\\s(?<timestamp>\\d{4}/\\d{2}/\\d{2} \\d{2}:\\d{2}:\\d{2})\\s+\\| JVMDUMP\\w+\\s(?<body>.*)$"
},
"tasko": {
- "pattern": "^(?<timestamp>\\d{4}-\\d{2}-\\d{2}( |T)\\d{2}:\\d{2}:\\d{2}(,|\\.)\\d{3}Z?)\\s+\\[(?<thread>[\\w\\-\\.]+)\\]\\s+(?<level>ERROR|WARN|INFO|DEBUG)\\s+(?<class>[\\w.]+)\\s+(-\\s+)?(?<body>.*)$"
+ "pattern": "^(?<timestamp>\\d{4}-\\d{2}-\\d{2}( |T)\\d{2}:\\d{2}:\\d{2}(,|\\.)\\d{3}(?:Z|[-+]\\d{2}:?\\d{2})?)\\s+\\[(?<thread>[\\w\\-\\.]+)\\]\\s+(?<level>ERROR|WARN|INFO|DEBUG|TRACE)\\s+(?<class>[\\w.]+)\\s+(-\\s+)?(?<body>.*)$"
},
"prefix-brackets": {
- "pattern": "^\\[(?<timestamp>\\d{4}-\\d{2}-\\d{2}( |T)\\d{2}:\\d{2}:\\d{2}(,|\\.)\\d{3}Z?)\\s+(?<thread>[\\w\\-\\.]+)\\s+(?<level>ERROR|WARN|INFO|DEBUG)\\s+(?<class>[\\w.]+)(?:\\s+opId=(?<opid>[^\\]]*))?\\]\\s*(-\\s+)?(?<body>.*)$"
+ "pattern": "^\\[(?<timestamp>\\d{4}-\\d{2}-\\d{2}( |T)\\d{2}:\\d{2}:\\d{2}(,|\\.)\\d{3}(?:Z|[-+]\\d{2}:?\\d{2})?)\\s+(?<thread>[\\w\\-\\.]+)\\s+(?<level>ERROR|WARN|INFO|DEBUG|TRACE)\\s+(?<class>[\\w.]+)(?:\\s+opId=(?<opid>[^\\]]*))?\\]\\s*(-\\s+)?(?<body>.*)$"
},
"in-brackets": {
- "pattern": "^(?<timestamp>\\d{4}-\\d{2}-\\d{2}( |T)\\d{2}:\\d{2}:\\d{2}(,|\\.)\\d{3}Z?)\\s+\\[(?<thread>[\\w\\-\\.]+)(?:\\s+(?:\\[\\]|null))?\\s+(?<level>ERROR|WARN|INFO|DEBUG)\\s+(?<class>[\\w.]+)(?:\\s+opId=(?<opid>[^\\]]*))?\\]\\s*(-\\s+)?(?<body>.*)$"
+ "pattern": "^(?<timestamp>\\d{4}-\\d{2}-\\d{2}( |T)\\d{2}:\\d{2}:\\d{2}(,|\\.)\\d{3}(?:Z|[-+]\\d{2}:?\\d{2})?)\\s+\\[(?<thread>[\\w\\-\\.]+)(?:\\s+(?:\\[\\]|null))?\\s+(?<level>ERROR|WARN|INFO|DEBUG|TRACE)\\s+(?<class>[\\w.]+)(?:\\s+opId=(?<opid>[^\\]]*))?\\]\\s*(-\\s+)?(?<body>.*)$"
},
"nobrackets": {
- "pattern": "^(?<timestamp>\\d{4}-\\d{2}-\\d{2}( |T)\\d{2}:\\d{2}:\\d{2}(,|\\.)\\d{3}Z?)\\s+(?<thread>[\\w\\-\\.]+)\\s+(?<level>ERROR|WARN|INFO|DEBUG)\\s+(?<class>[\\w.]+)\\s+(-\\s+)?(?<body>.*)$"
+ "pattern": "^(?<timestamp>\\d{4}-\\d{2}-\\d{2}( |T)\\d{2}:\\d{2}:\\d{2}(,|\\.)\\d{3}(?:Z|[-+]\\d{2}:?\\d{2})?)\\s+(?<thread>[\\w\\-\\.]+) (?:operationID=(?<opid>\\S+))?\\s+(?<level>ERROR|WARN|INFO|DEBUG|TRACE)\\s+(?<class>[\\w.]+)\\s+(-\\s+)?(?<body>.*)$"
},
"vmw1": {
- "pattern": "^(?<timestamp>\\d{4}-\\d{2}-\\d{2}( |T)\\d{2}:\\d{2}:\\d{2}(,|\\.)\\d{3}Z?)\\s*\\|\\s*(?<level>ERROR|WARN|INFO|DEBUG)\\s*\\|\\s*(?<thread>[^\\|]+)\\s*\\|\\s*(?<srcfile>[^\\|]+)\\s*\\|\\s*(?<srcline>\\d+)\\s*\\|\\s*(?<body>.*)$"
+ "pattern": "^(?<timestamp>\\d{4}-\\d{2}-\\d{2}( |T)\\d{2}:\\d{2}:\\d{2}(,|\\.)\\d{3}(?:Z|[-+]\\d{2}:?\\d{2})?)\\s*\\|\\s*(?<level>ERROR|WARN|INFO|DEBUG|TRACE)\\s*\\|\\s*(?<thread>[^\\|]+)\\s*\\|\\s*(?<srcfile>[^\\|]+)\\s*\\|\\s*(?<srcline>\\d+)\\s*\\|\\s*(?<body>.*)$"
},
"vmw2": {
- "pattern": "^\\[(?<timestamp>\\d{4}-\\d{2}-\\d{2}( |T)\\d{2}:\\d{2}:\\d{2}(,|\\.)\\d{3}Z?)\\]\\s*(?<level>ERROR|WARN|INFO|DEBUG)\\s*\\d+\\[(?<thread>[^\\]]+)\\]\\s+-\\s+(?<class>[^\\(]+)\\.(?<method>\\w+)\\((?<srcfile>[^:]+):(?<srcline>\\d+)\\)\\s+-\\s+(?<body>.*)$"
+ "pattern": "^\\[(?<timestamp>\\d{4}-\\d{2}-\\d{2}( |T)\\d{2}:\\d{2}:\\d{2}(,|\\.)\\d{3}(?:Z|[-+]\\d{2}:?\\d{2})?)\\]\\s*(?<level>ERROR|WARN|INFO|DEBUG|TRACE)\\s*\\d+\\[(?<thread>[^\\]]+)\\]\\s+-\\s+(?<class>[^\\(]+)\\.(?<method>\\w+)\\((?<srcfile>[^:]+):(?<srcline>\\d+)\\)\\s+-\\s+(?<body>.*)$"
},
"vmw3": {
- "pattern": "^(?<timestamp>\\d{4}-\\d{2}-\\d{2}( |T)\\d{2}:\\d{2}:\\d{2}(,|\\.)\\d{3}Z?)\\s*\\|\\s*(?<level>ERROR|WARN|INFO|DEBUG)\\s*\\|\\s*(?<thread>[^\\|]+)\\s*\\|\\s*(?<class>[^\\|]+)\\s*\\|\\s+(?!\\d+\\s*\\|)(?<body>.*)$"
+ "pattern": "^(?<timestamp>\\d{4}-\\d{2}-\\d{2}( |T)\\d{2}:\\d{2}:\\d{2}(,|\\.)\\d{3}(?:Z|[-+]\\d{2}:?\\d{2})?)\\s*\\|\\s*(?<level>ERROR|WARN|INFO|DEBUG|TRACE)\\s*\\|\\s*(?<thread>[^\\|]+)\\s*\\|\\s*(?<class>[a-zA-Z_\\.][^\\|]+)\\s*\\|\\s+(?!\\d+\\s*\\|)(?<body>.*)$"
},
"vmw-sso": {
- "pattern": "^(?<timestamp>\\d{4}-\\d{2}-\\d{2}( |T)\\d{2}:\\d{2}:\\d{2}(,|\\.)\\d{3}Z?)\\s+(?<level>ERROR|WARN|INFO|DEBUG)\\s+[\\w\\-]+\\[\\d+:(?<thread>[^\\]]+)\\]\\s+\\[CorId=(?<corid>[^\\s\\]]*)(?:\\s+OpId=(?<opid>[^\\]]*))?\\]\\s+\\[(?<class>[^\\]]+)\\]\\s+(?<body>.*)$"
+ "pattern": "^(?<timestamp>\\d{4}-\\d{2}-\\d{2}( |T)\\d{2}:\\d{2}:\\d{2}(,|\\.)\\d{3}(?:Z|[-+]\\d{2}:?\\d{2})?)\\s+(?<level>ERROR|WARN|INFO|DEBUG|TRACE)\\s+[\\w\\-]+\\[\\d+:(?<thread>[^\\]]+)\\]\\s+\\[CorId=(?<corid>[^\\s\\]]*)(?:\\s+OpId=(?<opid>[^\\]]*))?\\]\\s+\\[(?<class>[^\\]]+)\\]\\s+(?<body>.*)$"
},
"vmw-sps": {
- "pattern": "^(?<timestamp>\\d{4}-\\d{2}-\\d{2}( |T)\\d{2}:\\d{2}:\\d{2}(,|\\.)\\d{3}Z?)\\s+\\[(?<thread>[^\\]]+)\\]\\s+(?<level>ERROR|WARN|INFO|DEBUG)\\s+opId=(?<opid>\\S*)\\s+(?<class>\\S+)\\s+-\\s+(?<body>.*)$"
+ "pattern": "^(?<timestamp>\\d{4}-\\d{2}-\\d{2}( |T)\\d{2}:\\d{2}:\\d{2}(,|\\.)\\d{3}(?:Z|[-+]\\d{2}:?\\d{2})?)\\s+\\[(?<thread>[^\\]]+)\\]\\s+(?<level>ERROR|WARN|INFO|DEBUG|TRACE)\\s+opId=(?<opid>\\S*)\\s+(?<class>\\S+)\\s+-\\s+(?<body>.*)$"
}
},
"level-field": "level",
"opid-field": "opid",
+ "opid": {
+ "description": {
+ "license": {
+ "format": [
+ {
+ "field": "body",
+ "extractor": "Invoking (.+)"
+ }
+ ]
+ }
+ }
+ },
"level": {
"error": "ERROR",
"warning": "WARN",
"debug": "DEBUG",
- "info": "INFO"
+ "info": "INFO",
+ "trace": "TRACE"
},
"value": {
"function": {
@@ -141,6 +154,12 @@
},
{
"line": "2022-06-01T13:42:32.742Z INFO sts-default[23:localhost-startStop-1] [CorId= OpId=] [com.vmware.identity.idm.server.provider.PooledLdapConnectionFactory] New connection created in pool PooledLdapConnectionIdentity [tenantName=null, username=vc.vlcm.com@vsphere.local, authType=SRP, useGCPort=false, connectionString=ldap://vc.vlcm.com:389]"
+ },
+ {
+ "line": "2023-07-18T20:10:41.345-0700 | DEBUG | opId-229b032d-ed17-4675-b01d-4868ea35d1b9 | cls-background-executor-4 | SessionManagerImpl | Invalidated 0 expired sessions."
+ },
+ {
+ "line": "2023-07-19T03:05:51.879Z invocation-vmomi-executor-1 operationID=4e543097-1a DEBUG vim.vmomi.server.impl.InvocationTask Invoking com.vmware.vim.binding.vim.LicenseManager.getEvaluation"
}
]
}
diff --git a/src/formats/nextcloud_log.json b/src/formats/nextcloud_log.json
new file mode 100644
index 0000000..9806ee0
--- /dev/null
+++ b/src/formats/nextcloud_log.json
@@ -0,0 +1,79 @@
+{
+ "$schema": "https://lnav.org/schemas/format-v1.schema.json",
+ "nextcloud": {
+ "title": "Nextcloud server logs",
+ "description": "Nextcloud JSON server logs audit.log, flow.log, and nextcloud.log",
+ "url": "https://docs.nextcloud.com/server/stable/admin_manual/configuration_server/logging_configuration.html?highlight=logging#log-field-breakdown",
+ "json": true,
+ "opid-field": "reqId",
+ "level-field": "level",
+ "body-field": "message",
+ "hide-extra": true,
+ "level": {
+ "debug": 0,
+ "info": 1,
+ "warning": 2,
+ "error": 3,
+ "fatal": 4
+ },
+ "timestamp-field": "time",
+ "convert-to-local-time": true,
+ "multiline": false,
+ "value": {
+ "exception": {
+ "kind": "json"
+ },
+ "app": {
+ "kind": "string",
+ "identifier": true
+ },
+ "reqId": {
+ "kind": "string",
+ "identifier": true
+ },
+ "remoteAddr": {
+ "kind": "string",
+ "identifier": true
+ },
+ "url": {
+ "kind": "string"
+ },
+ "method": {
+ "kind": "string"
+ },
+ "user": {
+ "kind": "string",
+ "identifier": true
+ }
+ },
+ "line-format": [
+ {
+ "field": "__timestamp__"
+ },
+ " ",
+ {
+ "field": "reqId",
+ "max-width": 3,
+ "overflow": "truncate"
+ },
+ " ",
+ {
+ "field": "remoteAddr",
+ "min-width": 15
+ },
+ " ",
+ {
+ "field": "__level__",
+ "text-transform": "uppercase"
+ },
+ " ",
+ {
+ "field": "app"
+ },
+ " ",
+ {
+ "field": "message"
+ }
+ ]
+ }
+}
diff --git a/src/formats/nextflow_log.json b/src/formats/nextflow_log.json
new file mode 100644
index 0000000..c4dc39c
--- /dev/null
+++ b/src/formats/nextflow_log.json
@@ -0,0 +1,33 @@
+{
+ "$schema": "https://lnav.org/schemas/format-v1.schema.json",
+ "nextflow_log": {
+ "title": "Nextflow log format",
+ "description": "Format file for nextflow.io logs",
+ "url": [
+ "https://nextflow.io/docs/latest/cli.html#execution-logs"
+ ],
+ "regex": {
+ "std": {
+ "pattern": "(?<timestamp>\\w{3}-\\d{2} \\d{2}:\\d{2}:\\d{2}\\.\\d{3}) \\[(?<thread>[^\\]]+)\\] (?<level>[^ ]+)\\s+(?<module>[^ ]+) - (?<body>.*)"
+ }
+ },
+ "timestamp-format": [
+ "%b-%d %H:%M:%S"
+ ],
+ "value": {
+ "module": {
+ "kind": "string",
+ "identifier": true
+ },
+ "thread": {
+ "kind": "string",
+ "identifier": true
+ }
+ },
+ "sample": [
+ {
+ "line": "Mar-18 21:41:15.684 [main] DEBUG nextflow.cli.Launcher - $> nextflow run nf-core/rnaseq -profile test,docker --outdir results"
+ }
+ ]
+ }
+}
diff --git a/src/formats/pcap_log.json b/src/formats/pcap_log.json
index 8ae73e2..a9e86ef 100644
--- a/src/formats/pcap_log.json
+++ b/src/formats/pcap_log.json
@@ -4,11 +4,17 @@
"json": true,
"title": "Packet Capture",
"description": "Internal format for pcap files",
- "mime-types": [
- "application/vnd.tcpdump.pcap"
- ],
- "multiline": false,
"convert-to-local-time": true,
+ "converter": {
+ "header": {
+ "expr": {
+ "pcapng": ":header REGEXP '^0a0d0d0a.{8}(?:1a2b3c4d|4d3c2b1a).*'",
+ "pcap": ":header REGEXP '^(?:a1b2c3d4|d4c3b2a1|a1b23c4d|4d3cb2a1).*'"
+ },
+ "size": 24
+ },
+ "command": "pcap_log-converter.sh"
+ },
"line-format": [
{
"field": "time"
diff --git a/src/formats/procstate_log.json b/src/formats/procstate_log.json
index 74332dd..c6fe727 100644
--- a/src/formats/procstate_log.json
+++ b/src/formats/procstate_log.json
@@ -5,7 +5,7 @@
"description": "Periodic dumps of process state",
"regex": {
"std": {
- "pattern": "========== Start of system state dump at (?<timestamp>[^=]+)==========(?<body>.*)"
+ "pattern": "========== Start of system state dump at (?<timestamp>[^=]+) ==========(?<body>.*)"
}
},
"sample": [
@@ -15,7 +15,7 @@
],
"search-table": {
"procstate_procs": {
- "pattern": "^(?<user>\\S+)\\s+(?<pid>\\d+)\\s+(?<cpu_pct>\\d+(?:\\.\\d+)?)\\s+(?<mem_pct>\\d+(?:\\.\\d+)?)\\s+(?<vsz>\\d+)\\s+(?<rss>\\d+)\\s(?<tty>\\S+)\\s+(?<stat>\\S+)\\s+(?<start_time>\\S+)\\s+(?<cpu_time>\\S+)\\s+(?<cmd>(?<cmd_name>[^ \\n]+)(?: (?<cmd_args>[^\\n]+))?)$"
+ "pattern": "^(?<user>\\S+)\\s+(?:(?<ppid>\\d+)\\s+)?(?<pid>\\d+)\\s+(?<cpu_pct>\\d+(?:\\.\\d+)?)\\s+(?<mem_pct>\\d+(?:\\.\\d+)?)\\s+(?<vsz>\\d+)\\s+(?<rss>\\d+)\\s(?<tty>\\S+)\\s+(?<stat>\\S+)\\s+(?<start_time>\\S+)\\s+(?<cpu_time>\\S+)(?:\\s+(?<maj_flt>\\d+)\\s+(?<min_flt>\\d+))?\\s+(?<cmd>(?<cmd_name>[^ \\n]+)(?: (?<cmd_args>[^\\n]+))?)$"
}
}
}
diff --git a/src/formats/redis_log.json b/src/formats/redis_log.json
new file mode 100644
index 0000000..faf9a5b
--- /dev/null
+++ b/src/formats/redis_log.json
@@ -0,0 +1,59 @@
+{
+ "$schema": "https://lnav.org/schemas/format-v1.schema.json",
+ "redis_log": {
+ "title": "Redis",
+ "url": [
+ "https://redis.com",
+ "https://build47.com/redis-log-format-levels/"
+ ],
+ "description": "The Redis database",
+ "regex": {
+ "v2.x": {
+ "pattern": "\\[(?<pid>\\d+)\\]\\s+(?<timestamp>\\d{1,2} [a-zA-Z]{3} \\d{2}:\\d{2}:\\d{2}\\.\\d{3})\\s+(?<level>[\\.\\-\\*\\#])\\s+(?<body>.*)"
+ },
+ "v3.x": {
+ "pattern": "(?<pid>\\d+):(?<role>[XCSM])\\s+(?<timestamp>\\d{1,2} [a-zA-Z]{3} \\d{4} \\d{2}:\\d{2}:\\d{2}\\.\\d{3})\\s+(?<level>[\\.\\*\\#\\-])\\s+(?<body>.*)"
+ },
+ "sig": {
+ "pattern": "(?<pid>\\d+):(?<role>signal-handler) \\((?<timestamp>\\d+)\\) (?<body>.*)"
+ }
+ },
+ "timestamp-format": [
+ "%s",
+ "%d %b %Y %H:%M:%S.%L",
+ "%d %b %H:%M:%S.%L"
+ ],
+ "level": {
+ "debug": "^\\.$",
+ "trace": "^-$",
+ "notice": "^\\*$",
+ "warning": "^#$"
+ },
+ "value": {
+ "level": {
+ "kind": "string"
+ },
+ "pid": {
+ "kind": "string",
+ "identifier": true
+ },
+ "role": {
+ "kind": "string"
+ },
+ "timestamp": {
+ "kind": "string"
+ }
+ },
+ "sample": [
+ {
+ "line": "1:M 29 Aug 2023 13:47:38.984 * monotonic clock: POSIX clock_gettime"
+ },
+ {
+ "line": "1:signal-handler (1693279182) Received SIGTERM scheduling shutdown..."
+ },
+ {
+ "line": "[3574] 13 Apr 12:52:30.731 # Sentinel runid is 2e3b1eed9e95d760e1853e047a33bf4f8ac16c59"
+ }
+ ]
+ }
+}
diff --git a/src/formats/sssd_log.json b/src/formats/sssd_log.json
index 04f3a77..9728285 100644
--- a/src/formats/sssd_log.json
+++ b/src/formats/sssd_log.json
@@ -6,18 +6,39 @@
"url": "http://fedorahosted.org/sssd",
"regex": {
"core": {
- "pattern": "^\\((?<timestamp>\\S{3,8} \\S{3,8} ( \\d|\\d{2}) \\d{2}:\\d{2}:\\d{2} \\d{4})\\) \\[sssd\\] \\[(?<function>\\w+)\\] \\((?<debug_level>0x[0-9a-fA-F]{4})\\): (?<body>.*)$"
+ "pattern": "^\\((?<timestamp>\\S{3,8} \\S{3,8} ( \\d|\\d{2}) \\d{2}:\\d{2}:\\d{2}(?:(?:\\.|:)\\d{6})? \\d{4})\\) \\[(?<service>\\w+)\\] \\[(?<function>\\w+)\\] \\((?<debug_level>0x[0-9a-fA-F]{4})\\): (?<body>.*)$"
},
"module": {
- "pattern": "^\\((?<timestamp>\\S{3,8} \\S{3,8} ( \\d|\\d{2}) \\d{2}:\\d{2}:\\d{2} \\d{4})\\) \\[sssd(?<module>\\[.*?\\])\\] \\[(?<function>\\w+)\\] \\((?<debug_level>0x[0-9a-fA-F]{4})\\): (?<body>.*)$"
+ "pattern": "^\\((?<timestamp>\\S{3,8} \\S{3,8} ( \\d|\\d{2}) \\d{2}:\\d{2}:\\d{2}(?:(?:\\.|:)\\d{6})? \\d{4})\\) \\[(?<service>\\w+)(?<module>\\[.*?\\])\\] \\[(?<function>\\w+)\\] \\((?<debug_level>0x[0-9a-fA-F]{4})\\): (?<body>.*)$"
+ },
+ "new-ts": {
+ "pattern": "^\\((?<timestamp>\\d{4}-\\d{2}-\\d{2} [ 0-9]{2}:\\d{2}:\\d{2}(?:(?:\\.|:)\\d{6})?)\\): \\[(?<service>\\w+)(?<module>\\[.*?\\])?\\] \\[(?<function>\\w+)\\] \\((?<debug_level>0x[0-9a-fA-F]{4})\\): (?<body>.*)$"
}
},
+ "level-field": "debug_level",
+ "level": {
+ "fatal": "0x0010",
+ "critical": "0x0020",
+ "error": "0x0040",
+ "warning": "0x0080",
+ "debug": "0x0200",
+ "debug2": "0x0400",
+ "debug3": "0x1000",
+ "debug4": "0x2000",
+ "trace": "0x4000"
+ },
"value": {
+ "service": {
+ "kind": "string",
+ "identifier": true
+ },
"module": {
- "kind": "string"
+ "kind": "string",
+ "identifier": true
},
"function": {
- "kind": "string"
+ "kind": "string",
+ "identifier": true
},
"debug_level": {
"kind": "string"
@@ -32,6 +53,19 @@
},
{
"line": "(Tue Mar 31 05:58:38 2015) [sssd] [start_service] (0x0100): Queueing service LDAP for startup"
+ },
+ {
+ "line": "(Tue Jul 14 11:01:17:259149 2020) [sssd] [sss_ini_call_validators] (0x0020): [rule/allowed_sections]: Section [prompting/password] is not allowed. Check for typos."
+ },
+ {
+ "line": "(2022-06-08 8:52:40): [be[ipa.example.com]] [sysdb_add_user] (0x0040): [RID#3] Group named aduser@example.com already exists in an MPG domain <-----",
+ "level": "error"
+ },
+ {
+ "line": "(2022-06-14 0:31:43): [pam] [sss_process_init] (0x0010): fatal error setting up backend connector"
+ },
+ {
+ "line": "(2022-06-14 0:31:47): [nss] [sbus_reconnect_attempt] (0x0020): Unable to connect to D-Bus"
}
]
}
diff --git a/src/formats/strace_log.json b/src/formats/strace_log.json
index 46c3a44..4f8f0bf 100644
--- a/src/formats/strace_log.json
+++ b/src/formats/strace_log.json
@@ -7,7 +7,7 @@
"multiline": false,
"regex": {
"std": {
- "pattern": "^(?<timestamp>\\d{2}:\\d{2}:\\d{2}\\.\\d{6}) (?<syscall>\\w+)\\((?<body>.*)\\)\\s+=\\s+(?<rc>[-\\w]+)(?: (?<errno>\\w+) \\([^\\)]+\\))?(?: <(?<duration>\\d+\\.\\d+)>)?$"
+ "pattern": "^(?<timestamp>\\d{2}:\\d{2}:\\d{2}\\.\\d{6}|\\d+\\.\\d{6}) (?<syscall>\\w+)\\((?<body>.*)\\)\\s+=\\s+(?<rc>[-\\w]+)(?: (?<errno>\\w+) \\([^\\)]+\\))?(?: <(?<duration>\\d+\\.\\d+)>)?$"
}
},
"level-field": "errno",
@@ -38,6 +38,9 @@
},
{
"line": "08:09:33.815943 access(\"/etc/ld.so.nohwcap\", F_OK) = -1 ENOENT (No such file or directory) <0.000019>"
+ },
+ {
+ "line": "1695668091.895450 execve(\"/tmp/lnav\", [\"/tmp/lnav\"], [/* 21 vars */]) = 0"
}
]
}
diff --git a/src/formats/vmk_log.json b/src/formats/vmk_log.json
index 5d93def..962575e 100644
--- a/src/formats/vmk_log.json
+++ b/src/formats/vmk_log.json
@@ -7,12 +7,21 @@
"regex": {
"std": {
"pattern": "^(?<timestamp>\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z) cpu(?<cpu>\\d+):(?<world_id>\\d+)(?: opID=(?<opid>[^\\)]+))?\\)((?:(?<level>WARNING|ALERT)|(?<subsystem>[^:]+)): )?(?<body>.*)"
+ },
+ "syslog": {
+ "pattern": "^(?<timestamp>(?:\\S{3,8}\\s+\\d{1,2} \\d{2}:\\d{2}:\\d{2}|\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{3})?Z))\\s+(?<level>\\w+)\\((?<syslog_pri>\\d+)\\)(?:\\[\\+\\]|\\+)? (?:vmkernel|vmkwarning):\\s* (?:cpu(?<cpu>\\d+):(?<world_id>\\d+)(?: opID=(?<opid>[^\\)]+))?\\))?((?:(?:WARNING|ALERT)|(?<subsystem>[^:]+)): )?(?<body>.*)"
}
},
+ "ordered-by-time": false,
"level-field": "level",
"level": {
- "error": "ALERT",
- "warning": "WARNING"
+ "debug": "^Db$",
+ "info": "^In$",
+ "notice": "^No$",
+ "warning": "^(?:Wa|WARNING)$",
+ "error": "^(?:Er|ALERT)$",
+ "critical": "^Cr$",
+ "fatal": "^(?:Al|Em)$"
},
"max-unrecognized-lines": 15000,
"opid-field": "opid",
@@ -45,6 +54,12 @@
},
{
"line": "2022-06-02T02:16:57.414Z cpu31:1001392590 opID=827cfaf)<unk>: UWVMKSyscall: ForkExec:2408: hostd-worker: Found params <group=hostd-tmp,mem=10>"
+ },
+ {
+ "line": "2023-08-08T15:08:36.834Z Wa(180) vmkwarning: cpu0:263421 opID=a03fc439)WARNING: Sched: vm 265285: 6404: could not create container group, status: Admission check failed for memory resource"
+ },
+ {
+ "line": "2023-08-08T14:13:55Z In(182) vmkernel: VMB: 65: Reserved 4 MPNs starting @ 0x4c1"
}
]
}
diff --git a/src/formats/vmw_log.json b/src/formats/vmw_log.json
index c5c5f7b..4f4299f 100644
--- a/src/formats/vmw_log.json
+++ b/src/formats/vmw_log.json
@@ -6,13 +6,13 @@
"url": "https://kb.vmware.com/kb/2004201",
"regex": {
"6.0+": {
- "pattern": "^(?:\\[#\\d+\\] )?(?<timestamp>\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}(?:Z|[-+]\\d{2}:\\d{2})) (?<level>\\w+)(?:\\(\\d+\\)+)? (?<prc>[\\w\\-]+)\\[(?<tid>\\w+)\\]:? (?:\\w+ -\\[\\d+\\] )?\\[(?<src>\\w+@\\d+)(?:\\s+sub=(?<sub>.*?(?!\\w+=)))?(?:\\s+item=(?<item>[\\w\\.\\-@/:]+))?(?: req=(?<req>[^ \\]]+))?(?: opI(?:D|d)=(?<opid>(?:req=)?[\\w@ \\-\\.:]+?(?!\\w+=)))?(?: sid=(?<sid>[^ \\]]+))?(?: user=(?<user>[^ \\]<]+(?:<[^>]+>)?))?(?: update=(?<vpxa_update>\\d+))?(?:\\s+reason=(?<reason>[^\\]]+))?\\]\\s+(?<body>.*)$"
+ "pattern": "^(?:\\[#\\d+\\] )?(?<timestamp>\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}(?:Z|[-+]\\d{2}:\\d{2})) (?<level>\\w+)(?:\\(\\d+\\)+)? (?<prc>[\\w\\-]+)\\[(?<tid>\\w+)\\]:? (?:\\w+ -\\[\\d+\\] )?\\[(?<src>[a-zA-Z][\\w:]*(?:@\\d+)?)(?:\\s+sub=(?<sub>.*?(?!\\w+=)))?(?:\\s+item=(?<item>[\\w\\.\\-@/:]+))?(?: req=(?<req>[^ \\]]+))?(?: opI(?:D|d)=(?<opid>(?:req=)?[\\w@ \\-\\.:]+?(?!\\w+=)))?(?: sid=(?<sid>[^ \\]]+))?(?: user=(?<user>[^ \\]<]+(?:<[^>]+>)?))?(?: update=(?<vpxa_update>\\d+))?(?:\\s+reason=(?<reason>[^\\]]+))?\\]\\s+(?:\\[(?<file>[^ ]+)\\s+(?<line>\\d+)\\]\\s+)?(?<body>.*)$"
},
"6.0+-nosrc": {
"pattern": "^(?<timestamp>\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}(?:Z|[-+]\\d{2}:\\d{2})) (?<level>\\w+)(?:\\(\\d+\\)+)? (?<prc>[\\w\\-]+)\\[(?<tid>\\w+)\\]:? \\[(?:opI(?:D|d)=(?<opid>[^\\]]+))\\]\\s*(?<body>.*)$"
},
"section": {
- "pattern": "^(?<timestamp>\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}(?:Z|[-+]\\d{2}:\\d{2})) (?:- last log rotation time, \\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}(?:Z|[-+]\\d{2}:\\d{2}))?\\s*(ESX KMX Agent started.|(?:- time the service was last started(?: \\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z)?, )?Section for (?:[^,]+), pid=(?<tid>\\w+).*)"
+ "pattern": "^(?<timestamp>\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}(?:Z|[-+]\\d{2}:\\d{2})) (?:- last log rotation time, \\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}(?:Z|[-+]\\d{2}:\\d{2}))?\\s*(ESX KMX Agent started.|(?:- time the service was last started(?: \\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}(?:Z|[-+]\\d{2}:\\d{2}))?, )?Section for (?:[^,]+), pid=(?<tid>\\w+).*)"
},
"esx-section": {
"pattern": "^(?<timestamp>\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}(?:Z|[-+]\\d{2}:\\d{2})) (?<level>\\w+)(?:\\(\\d+\\)+) (?<prc>[\\w\\-]+)\\[(?<tid>\\w+)\\]: (?:Logs rotated. \\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}(?:Z|[-+]\\d{2}:\\d{2}))?(?:- last log rotation time, \\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}(?:Z|[-+]\\d{2}:\\d{2}))?\\s*(ESX KMX Agent started.|(?:- time the service was last started(?: \\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z)?, )?Section for (?:[^,]+), pid=(?:\\w+).*)"
@@ -29,6 +29,9 @@
"hdr-ftr": {
"pattern": "^(?<timestamp>\\d{4}-\\d{2}-\\d{2}(T| )\\d{2}:\\d{2}:\\d{2}(?:.|,)\\d{3}(?:Z|[-+]\\d{2}:\\d{2})) \\[(?<prc>[^\\[]+)\\[(?<tid>\\w+)\\]:\\s+(?<body>.*)\\]$"
},
+ "is-log": {
+ "pattern": "^(?<timestamp>\\d{4}-\\d{2}-\\d{2}(T| )\\d{2}:\\d{2}:\\d{2}(?:.|,)\\d{3}(?:Z|[-+]\\d{2}:\\d{2})?) (?<level>\\w+) (?<prc>[^\\[]+)\\[(?<tid>\\d+)\\]\\s+\\[(?<file>[^ ]+) (?<line>\\d+)\\]\\s+(?<body>.*)"
+ },
"pylog": {
"pattern": "^(?<timestamp>\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{3})?(?:Z|[-+]\\d{2}:\\d{2})) (?<prc>[^:]+):\\s+(?<tid>\\d+):\\s+(?<comp>[^:]+):(?<line>\\d+)?\\s+(?<level>\\w+):?\\s+(?<body>.*)(?:\\n.*)?$"
},
@@ -53,6 +56,102 @@
"fatal": "^(?i)(?:alert|fatal|panic|Al|Em)$"
},
"opid-field": "opid",
+ "opid": {
+ "subid": "tid",
+ "sub-description": {
+ "vum": {
+ "format": [
+ {
+ "field": "sub",
+ "extractor": "^(?!VumVapi::Utils).*$"
+ }
+ ]
+ }
+ },
+ "description": {
+ "vum": {
+ "format": [
+ {
+ "field": "body",
+ "extractor": "RequireAdminUserAuthz::Invoke Method is (.*)",
+ "suffix": "("
+ },
+ {
+ "prefix": "",
+ "field": "body",
+ "extractor": "PrivCheck: Resource:((?!com)[^,]+)|Entity Priv Result:()"
+ },
+ {
+ "prefix": ") - ",
+ "field": "body",
+ "extractor": "PrivCheck: Resource:(?:com[^,]+), User:([^,]+)"
+ },
+ {
+ "prefix": "",
+ "field": "body",
+ "extractor": "()Invoking method com\\..*"
+ }
+ ]
+ },
+ "esxtokend": {
+ "format": [
+ {
+ "field": "body",
+ "extractor": "Invoke-MethodId: (.*)"
+ }
+ ]
+ },
+ "hostd": {
+ "format": [
+ {
+ "field": "body",
+ "extractor": "New request: target='([^']+)'"
+ },
+ {
+ "prefix": ".",
+ "field": "body",
+ "extractor": "New request: target='[^']+', method='([^']+)'"
+ }
+ ]
+ },
+ "vpxd-invoking": {
+ "format": [
+ {
+ "field": "body",
+ "extractor": "Invoking; <<[^,]+, <[^>]+>, <[^>]+>>, [^,]+, ([^,]+),"
+ }
+ ]
+ },
+ "vpxd-lro": {
+ "format": [
+ {
+ "field": "body",
+ "extractor": "\\[VpxLRO\\] -- BEGIN (?:[^ ]+) -- (?:[^ ]*) -- ([^ ]+)"
+ }
+ ]
+ },
+ "vpxd-item": {
+ "format": [
+ {
+ "field": "item"
+ }
+ ]
+ },
+ "vsan": {
+ "format": [
+ {
+ "field": "body",
+ "extractor": "Invoking '[^']+' on '([^']+)'"
+ },
+ {
+ "prefix": ".",
+ "field": "body",
+ "extractor": "Invoking '([^']+)' on '[^']+'"
+ }
+ ]
+ }
+ }
+ },
"value": {
"prc": {
"kind": "string",
@@ -64,7 +163,8 @@
},
"src": {
"kind": "string",
- "identifier": true
+ "identifier": true,
+ "hidden": true
},
"comp": {
"kind": "string",
@@ -141,6 +241,17 @@
"pattern": "^Expected equality of these values:"
}
},
+ "partitions": {
+ "test-partition": {
+ "description": "Partition for gtest sections",
+ "paths": [
+ {
+ "glob": "*/test.log"
+ }
+ ],
+ "pattern": "^\\[ RUN \\] ([^\\n]+)"
+ }
+ },
"sample": [
{
"line": "2021-05-24T20:31:05.671Z - last log rotation time, 2021-05-24T09:30:02.683Z - time the service was last started, Section for VMware ESX, pid=1000080910, version=7.0.3, build=0, option=DEBUG"
@@ -235,6 +346,15 @@
},
{
"line": "2022-06-02T03:20:05.107Z Db(167) Hostd[1001392035]: [Originator@6876 sub=AdapterServer opID=531c52d7-9d8a sid=52806149 user=vpxuser:<no user>] New request: target='vim.HostSystem:ha-host', method='retrieveInternalCapability', session='52806149-fe15-f6ff-7685-353ae5d93dcc'"
+ },
+ {
+ "line": "2022-06-02T11:49:41.274Z INFO vsan-mgmt[51740] [VsanVcObjectHelper::wrapper opID=SWI-2230eb26-8c37] Ready to get single executor result for the key ['_QuerySpaceUsage', 'vsan-cluster-space-report-system', 'domain-c115', '', 'False'] in timeout 600\n2022-06-02T12:23:46.807Z [pool-2-thread-18] INFO opId= com.vmware.vim.storage.common.task.CustomThreadPoolExecutor - [VLSI-client] Request took 4 millis to execute.\n2022-06-02T12:26:24.319Z INFO vsan-mgmt[16622] [VsanVcPerformanceManagerImpl::QueryClusterHealth opID=21fcddd1] CMMDS primary exists but no stats primary, check node information again.\n2022-06-02T12:26:27.109Z info vsanvcmgmtd[38723] [vSAN@6876 sub=CnsSync] Sync ds:///vmfs/volumes/5f65bf61-0e36b15d-fbd6-005056a00b50/: startVClock = 0, fullSync = true"
+ },
+ {
+ "line": "2023-08-04T11:01:42.873-07:00 info vmware-vum-server[192680] [Originator@6876 sub=Libs] lib/ssl: OpenSSL using FIPS provider"
+ },
+ {
+ "line": "2023-10-28 02:56:46,013 INFO imageService[139745105131968] [imageService 1092] Image service is initialized"
}
]
}
diff --git a/src/formats/vmw_py_log.json b/src/formats/vmw_py_log.json
index 0ce5ed4..d4cfe5d 100644
--- a/src/formats/vmw_py_log.json
+++ b/src/formats/vmw_py_log.json
@@ -38,7 +38,10 @@
"line": "2022-06-01T13:23:25.515 [2376]DEBUG:vmware.vherd.base.detwist:method = com.vmware.appliance.version1.networking.interfaces.list, args = ()"
},
{
- "line": "2022-06-01T13:23:25.31 [2376]DEBUG:com.vmware.vherd.base.detwist:method = com.vmware.appliance.version1.system.version.get, args = ()"
+ "line": "2022-06-01T13:23:25.310 [2376]DEBUG:com.vmware.vherd.base.detwist:method = com.vmware.appliance.version1.system.version.get, args = ()"
+ },
+ {
+ "line": "2023-07-19T02:47:11 AM UTC [1670]DEBUG:firewall-reload:Processing system service 'sshd' firewall rules."
}
]
}
diff --git a/src/formats/vmw_vc_svc_log.json b/src/formats/vmw_vc_svc_log.json
index ed507f7..430152e 100644
--- a/src/formats/vmw_vc_svc_log.json
+++ b/src/formats/vmw_vc_svc_log.json
@@ -6,10 +6,54 @@
"url": "https://docs.vmware.com/en/VMware-vSphere/7.0/vmware-vsphere-with-tanzu/GUID-2A989D79-463C-4EC8-A5F2-CDC3A2C827FB.html",
"regex": {
"std": {
- "pattern": "^(?<timestamp>\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z)\\s+(?<level>\\w+)\\s+(?<module>\\w+)\\s\\[(?<srcfile>[^:]+):(?<srcline>\\d+)\\](\\s+\\[opID=(?<opid>[^\\]]+)\\])?\\s+(?<body>.*)"
+ "pattern": "^(?<timestamp>\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{1,3}Z)\\s+(?<level>\\w+)\\s+(?<module>\\w+)\\s\\[(?<srcfile>[^:]+):(?<srcline>\\d+)\\](\\s+\\[opID=(?<opid>[^\\]]+)\\])?\\s+(?<body>.*)"
}
},
"opid-field": "opid",
+ "opid": {
+ "description": {
+ "get-changes": {
+ "format": [
+ {
+ "field": "body",
+ "extractor": "(GetChanges for sequence token: \\d+)"
+ }
+ ]
+ },
+ "resource-model-query": {
+ "format": [
+ {
+ "field": "body",
+ "extractor": "ResourceModel query"
+ }
+ ]
+ },
+ "create-session": {
+ "format": [
+ {
+ "field": "body",
+ "extractor": "(Created session for .*)"
+ }
+ ]
+ },
+ "delete-session": {
+ "format": [
+ {
+ "field": "body",
+ "extractor": "Deleting session for .*"
+ }
+ ]
+ },
+ "vlcm-download": {
+ "format": [
+ {
+ "field": "body",
+ "extractor": "Validating the URL: .*(/[^/]+)"
+ }
+ ]
+ }
+ }
+ },
"value": {
"body": {
"kind": "string"
@@ -42,6 +86,10 @@
{
"line": "2022-06-02T08:35:17.031Z info vlcm [logger/teelogger.go:47] [opID=vapi] Loading Introspection Services",
"level": "info"
+ },
+ {
+ "line": "2023-07-19T03:05:15.97Z info vlcm [serviceconfig/config.go:377] Getting timeout properties for deployment type: tiny",
+ "level": "info"
}
]
}
diff --git a/src/formats/vpostgres_log.json b/src/formats/vpostgres_log.json
new file mode 100644
index 0000000..9a7132b
--- /dev/null
+++ b/src/formats/vpostgres_log.json
@@ -0,0 +1,51 @@
+{
+ "$schema": "https://lnav.org/schemas/format-v1.schema.json",
+ "vpostgres_log": {
+ "title": "VMWare PostgreSQL",
+ "description": "Format for vpostgresql log files with format '%m %c %x %d %u %r %p %l'",
+ "url": [
+ "https://www.postgresql.org/docs/current/runtime-config-logging.html#GUC-LOG-LINE-PREFIX"
+ ],
+ "regex": {
+ "std": {
+ "pattern": "(?<timestamp>\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}\\.\\d{3} \\S+) (?<session_id>[^ ]*) (?<transaction_id>[^ ]*) (?<db_name>[^ ]*) (?<user>[^ ]*) (?<remote_pair>[^ ]*) (?<pid>[^ ]+) (?<num_line>\\d+)(?<level>[^:]+):\\s+(?<body>.*)"
+ }
+ },
+ "opid-field": "session_id",
+ "value": {
+ "db_name": {
+ "kind": "string",
+ "identifier": true
+ },
+ "pid": {
+ "kind": "string",
+ "identifier": true
+ },
+ "remote_pair": {
+ "kind": "string",
+ "identifier": true
+ },
+ "session_id": {
+ "kind": "string",
+ "identifier": true
+ },
+ "transaction_id": {
+ "kind": "string",
+ "identifier": true
+ },
+ "user": {
+ "kind": "string",
+ "identifier": true
+ },
+ "num_line": {
+ "kind": "integer",
+ "foreign-key": true
+ }
+ },
+ "sample": [
+ {
+ "line": "2023-07-25 02:14:09.790 UTC 64bf2ff1.21fc1e 0 VCDB vumuser [local] 2227230 5LOG: disconnection: session time: 0:00:00.012 user=vumuser database=VCDB host=[local]"
+ }
+ ]
+ }
+}
diff --git a/src/fs-extension-functions.cc b/src/fs-extension-functions.cc
index a9d34fc..cbc2366 100644
--- a/src/fs-extension-functions.cc
+++ b/src/fs-extension-functions.cc
@@ -29,24 +29,30 @@
* @file fs-extension-functions.cc
*/
+#include <future>
#include <string>
#include <errno.h>
-#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <sys/param.h>
#include <sys/stat.h>
#include <unistd.h>
+#include "base/auto_fd.hh"
+#include "base/auto_mem.hh"
+#include "base/auto_pid.hh"
+#include "base/injector.hh"
+#include "base/lnav.console.hh"
+#include "base/opt_util.hh"
+#include "bound_tags.hh"
#include "config.h"
#include "sqlite-extension-func.hh"
#include "sqlite3.h"
#include "vtab_module.hh"
+#include "yajlpp/yajlpp_def.hh"
-using namespace mapbox;
-
-static util::variant<const char*, string_fragment>
+static mapbox::util::variant<const char*, string_fragment>
sql_basename(const char* path_in)
{
int text_end = -1;
@@ -72,7 +78,7 @@ sql_basename(const char* path_in)
}
}
-static util::variant<const char*, string_fragment>
+static mapbox::util::variant<const char*, string_fragment>
sql_dirname(const char* path_in)
{
ssize_t text_end;
@@ -161,6 +167,158 @@ sql_realpath(const char* path)
return resolved_path;
}
+struct shell_exec_options {
+ std::map<std::string, nonstd::optional<std::string>> po_env;
+};
+
+static const json_path_container shell_exec_env_handlers = {
+ yajlpp::pattern_property_handler(R"((?<name>[^=]+))")
+ .for_field(&shell_exec_options::po_env),
+};
+
+static const typed_json_path_container<shell_exec_options>
+ shell_exec_option_handlers = {
+ yajlpp::property_handler("env").with_children(shell_exec_env_handlers),
+};
+
+static blob_auto_buffer
+sql_shell_exec(const char* cmd,
+ nonstd::optional<string_fragment> input,
+ nonstd::optional<string_fragment> opts_json)
+{
+ static const intern_string_t SRC = intern_string::lookup("options");
+
+ static auto& lnav_flags = injector::get<unsigned long&, lnav_flags_tag>();
+
+ if (lnav_flags & LNF_SECURE_MODE) {
+ throw sqlite_func_error("not available in secure mode");
+ }
+
+ shell_exec_options options;
+
+ if (opts_json) {
+ auto parse_res
+ = shell_exec_option_handlers.parser_for(SRC).of(opts_json.value());
+
+ if (parse_res.isErr()) {
+ throw lnav::console::user_message::error(
+ "invalid options parameter")
+ .with_reason(parse_res.unwrapErr()[0]);
+ }
+
+ options = parse_res.unwrap();
+ }
+
+ auto child_fds_res
+ = auto_pipe::for_child_fds(STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO);
+ if (child_fds_res.isErr()) {
+ throw lnav::console::user_message::error("cannot open child pipes")
+ .with_reason(child_fds_res.unwrapErr());
+ }
+ auto child_pid_res = lnav::pid::from_fork();
+ if (child_pid_res.isErr()) {
+ throw lnav::console::user_message::error("cannot fork()")
+ .with_reason(child_pid_res.unwrapErr());
+ }
+
+ auto child_fds = child_fds_res.unwrap();
+ auto child_pid = child_pid_res.unwrap();
+
+ for (auto& child_fd : child_fds) {
+ child_fd.after_fork(child_pid.in());
+ }
+
+ if (child_pid.in_child()) {
+ const char* args[] = {
+ getenv_opt("SHELL").value_or("bash"),
+ "-c",
+ cmd,
+ nullptr,
+ };
+
+ for (const auto& epair : options.po_env) {
+ if (epair.second.has_value()) {
+ setenv(epair.first.c_str(), epair.second->c_str(), 1);
+ } else {
+ unsetenv(epair.first.c_str());
+ }
+ }
+
+ execvp(args[0], (char**) args);
+ _exit(EXIT_FAILURE);
+ }
+
+ auto out_reader = std::async(
+ std::launch::async, [out_fd = std::move(child_fds[1].read_end())]() {
+ auto buffer = auto_buffer::alloc(4096);
+
+ while (true) {
+ if (buffer.available() < 4096) {
+ buffer.expand_by(4096);
+ }
+
+ auto rc
+ = read(out_fd, buffer.next_available(), buffer.available());
+ if (rc < 0) {
+ break;
+ }
+ if (rc == 0) {
+ break;
+ }
+ buffer.resize_by(rc);
+ }
+
+ return buffer;
+ });
+
+ auto err_reader = std::async(
+ std::launch::async, [err_fd = std::move(child_fds[2].read_end())]() {
+ auto buffer = auto_buffer::alloc(4096);
+
+ while (true) {
+ if (buffer.available() < 4096) {
+ buffer.expand_by(4096);
+ }
+
+ auto rc
+ = read(err_fd, buffer.next_available(), buffer.available());
+ if (rc < 0) {
+ break;
+ }
+ if (rc == 0) {
+ break;
+ }
+ buffer.resize_by(rc);
+ }
+
+ return buffer;
+ });
+
+ if (input) {
+ child_fds[0].write_end().write_fully(input.value());
+ }
+ child_fds[0].close();
+
+ auto retval = blob_auto_buffer{out_reader.get()};
+
+ auto finished_child = std::move(child_pid).wait_for_child();
+
+ if (!finished_child.was_normal_exit()) {
+ throw sqlite_func_error("child failed with signal {}",
+ finished_child.term_signal());
+ }
+
+ if (finished_child.exit_status() != EXIT_SUCCESS) {
+ throw lnav::console::user_message::error(
+ attr_line_t("child failed with exit code ")
+ .append(lnav::roles::number(
+ fmt::to_string(finished_child.exit_status()))))
+ .with_reason(err_reader.get().to_string());
+ }
+
+ return retval;
+}
+
int
fs_extension_functions(struct FuncDef** basic_funcs,
struct FuncDefAgg** agg_funcs)
@@ -170,6 +328,7 @@ fs_extension_functions(struct FuncDef** basic_funcs,
sqlite_func_adapter<decltype(&sql_basename), sql_basename>::builder(
help_text("basename", "Extract the base portion of a pathname.")
.sql_function()
+ .with_prql_path({"fs", "basename"})
.with_parameter({"path", "The path"})
.with_tags({"filename"})
.with_example({"To get the base of a plain file name",
@@ -183,12 +342,18 @@ fs_extension_functions(struct FuncDef** basic_funcs,
.with_example({"To get the base of a Windows path",
"SELECT basename('foo\\bar')"})
.with_example({"To get the base of the root directory",
- "SELECT basename('/')"})),
+ "SELECT basename('/')"})
+ .with_example({
+ "To get the base of a path",
+ "from [{p='foo/bar'}] | select { fs.basename p }",
+ help_example::language::prql,
+ })),
sqlite_func_adapter<decltype(&sql_dirname), sql_dirname>::builder(
help_text("dirname", "Extract the directory portion of a pathname.")
.sql_function()
.with_parameter({"path", "The path"})
+ .with_prql_path({"fs", "dirname"})
.with_tags({"filename"})
.with_example({"To get the directory of a relative file path",
"SELECT dirname('foo/bar')"})
@@ -205,6 +370,7 @@ fs_extension_functions(struct FuncDef** basic_funcs,
sqlite_func_adapter<decltype(&sql_joinpath), sql_joinpath>::builder(
help_text("joinpath", "Join components of a path together.")
.sql_function()
+ .with_prql_path({"fs", "join"})
.with_parameter(
help_text(
"path",
@@ -233,6 +399,7 @@ fs_extension_functions(struct FuncDef** basic_funcs,
sqlite_func_adapter<decltype(&sql_readlink), sql_readlink>::builder(
help_text("readlink", "Read the target of a symbolic link.")
.sql_function()
+ .with_prql_path({"fs", "readlink"})
.with_parameter({"path", "The path to the symbolic link."})
.with_tags({"filename"})),
@@ -243,9 +410,37 @@ fs_extension_functions(struct FuncDef** basic_funcs,
"symbolic links and "
"resolving '.' and '..' references.")
.sql_function()
+ .with_prql_path({"fs", "realpath"})
.with_parameter({"path", "The path to resolve."})
.with_tags({"filename"})),
+ sqlite_func_adapter<decltype(&sql_shell_exec), sql_shell_exec>::builder(
+ help_text("shell_exec",
+ "Executes a shell command and returns its output.")
+ .sql_function()
+ .with_prql_path({"shell", "exec"})
+ .with_parameter({"cmd", "The command to execute."})
+ .with_parameter(help_text{
+ "input",
+ "A blob of data to write to the command's standard input."}
+ .optional())
+ .with_parameter(
+ help_text{"options",
+ "A JSON object containing options for the "
+ "execution with the following properties:"}
+ .optional()
+ .with_parameter(help_text{
+ "env",
+ "An object containing the environment variables "
+ "to set or, if NULL, to unset."}
+ .optional()))
+ .with_tags({"shell"}))
+ .with_flags(
+#ifdef SQLITE_DIRECTONLY
+ SQLITE_DIRECTONLY |
+#endif
+ SQLITE_UTF8),
+
/*
* TODO: add other functions like normpath, ...
*/
diff --git a/src/fstat_vtab.cc b/src/fstat_vtab.cc
index 09567c7..ac88547 100644
--- a/src/fstat_vtab.cc
+++ b/src/fstat_vtab.cc
@@ -36,13 +36,18 @@
#include <sys/stat.h>
#include "base/auto_mem.hh"
+#include "base/fs_util.hh"
#include "base/injector.hh"
#include "base/lnav_log.hh"
#include "bound_tags.hh"
#include "config.h"
+#include "ghc/filesystem.hpp"
+#include "sql_help.hh"
#include "sql_util.hh"
#include "vtab_module.hh"
+namespace {
+
enum {
FSTAT_COL_PARENT,
FSTAT_COL_NAME,
@@ -62,7 +67,9 @@ enum {
FSTAT_COL_ATIME,
FSTAT_COL_MTIME,
FSTAT_COL_CTIME,
+ FSTAT_COL_ERROR,
FSTAT_COL_PATTERN,
+ FSTAT_COL_DATA,
};
/**
@@ -71,6 +78,7 @@ enum {
struct fstat_table {
static constexpr const char* NAME = "fstat";
static constexpr const char* CREATE_STMT = R"(
+-- The fstat() table-valued function allows you to query the file system.
CREATE TABLE fstat (
st_parent TEXT,
st_name TEXT,
@@ -90,7 +98,9 @@ CREATE TABLE fstat (
st_atime DATETIME,
st_mtime DATETIME,
st_ctime DATETIME,
- pattern TEXT HIDDEN
+ error TEXT,
+ pattern TEXT HIDDEN,
+ data BLOB HIDDEN
);
)";
@@ -100,20 +110,20 @@ CREATE TABLE fstat (
static_root_mem<glob_t, globfree> c_glob;
size_t c_path_index{0};
struct stat c_stat;
+ std::string c_error;
- cursor(sqlite3_vtab* vt) : base({vt})
+ explicit cursor(sqlite3_vtab* vt) : base({vt})
{
memset(&this->c_stat, 0, sizeof(this->c_stat));
}
void load_stat()
{
- while ((this->c_path_index < this->c_glob->gl_pathc)
- && lstat(this->c_glob->gl_pathv[this->c_path_index],
- &this->c_stat)
- == -1)
- {
- this->c_path_index += 1;
+ auto rc = lstat(this->c_glob->gl_pathv[this->c_path_index],
+ &this->c_stat);
+
+ if (rc == -1) {
+ this->c_error = strerror(errno);
}
}
@@ -169,13 +179,23 @@ CREATE TABLE fstat (
break;
}
case FSTAT_COL_DEV:
- sqlite3_result_int(ctx, vc.c_stat.st_dev);
+ if (vc.c_error.empty()) {
+ sqlite3_result_int(ctx, vc.c_stat.st_dev);
+ } else {
+ sqlite3_result_null(ctx);
+ }
break;
case FSTAT_COL_INO:
- sqlite3_result_int64(ctx, vc.c_stat.st_ino);
+ if (vc.c_error.empty()) {
+ sqlite3_result_int64(ctx, vc.c_stat.st_ino);
+ } else {
+ sqlite3_result_null(ctx);
+ }
break;
case FSTAT_COL_TYPE:
- if (S_ISREG(vc.c_stat.st_mode)) {
+ if (!vc.c_error.empty()) {
+ sqlite3_result_null(ctx);
+ } else if (S_ISREG(vc.c_stat.st_mode)) {
sqlite3_result_text(ctx, "reg", 3, SQLITE_STATIC);
} else if (S_ISBLK(vc.c_stat.st_mode)) {
sqlite3_result_text(ctx, "blk", 3, SQLITE_STATIC);
@@ -192,60 +212,124 @@ CREATE TABLE fstat (
}
break;
case FSTAT_COL_MODE:
- sqlite3_result_int(ctx, vc.c_stat.st_mode & 0777);
+ if (vc.c_error.empty()) {
+ sqlite3_result_int(ctx, vc.c_stat.st_mode & 0777);
+ } else {
+ sqlite3_result_null(ctx);
+ }
break;
case FSTAT_COL_NLINK:
- sqlite3_result_int(ctx, vc.c_stat.st_nlink);
+ if (vc.c_error.empty()) {
+ sqlite3_result_int(ctx, vc.c_stat.st_nlink);
+ } else {
+ sqlite3_result_null(ctx);
+ }
break;
case FSTAT_COL_UID:
- sqlite3_result_int(ctx, vc.c_stat.st_uid);
+ if (vc.c_error.empty()) {
+ sqlite3_result_int(ctx, vc.c_stat.st_uid);
+ } else {
+ sqlite3_result_null(ctx);
+ }
break;
case FSTAT_COL_USER: {
- struct passwd* pw = getpwuid(vc.c_stat.st_uid);
-
- if (pw != nullptr) {
- sqlite3_result_text(ctx, pw->pw_name, -1, SQLITE_TRANSIENT);
+ if (vc.c_error.empty()) {
+ struct passwd* pw = getpwuid(vc.c_stat.st_uid);
+
+ if (pw != nullptr) {
+ sqlite3_result_text(
+ ctx, pw->pw_name, -1, SQLITE_TRANSIENT);
+ } else {
+ sqlite3_result_int(ctx, vc.c_stat.st_uid);
+ }
} else {
- sqlite3_result_int(ctx, vc.c_stat.st_uid);
+ sqlite3_result_null(ctx);
}
break;
}
case FSTAT_COL_GID:
- sqlite3_result_int(ctx, vc.c_stat.st_gid);
+ if (vc.c_error.empty()) {
+ sqlite3_result_int(ctx, vc.c_stat.st_gid);
+ } else {
+ sqlite3_result_null(ctx);
+ }
break;
case FSTAT_COL_GROUP: {
- struct group* gr = getgrgid(vc.c_stat.st_gid);
-
- if (gr != nullptr) {
- sqlite3_result_text(ctx, gr->gr_name, -1, SQLITE_TRANSIENT);
+ if (vc.c_error.empty()) {
+ struct group* gr = getgrgid(vc.c_stat.st_gid);
+
+ if (gr != nullptr) {
+ sqlite3_result_text(
+ ctx, gr->gr_name, -1, SQLITE_TRANSIENT);
+ } else {
+ sqlite3_result_int(ctx, vc.c_stat.st_gid);
+ }
} else {
- sqlite3_result_int(ctx, vc.c_stat.st_gid);
+ sqlite3_result_null(ctx);
}
break;
}
case FSTAT_COL_RDEV:
- sqlite3_result_int(ctx, vc.c_stat.st_rdev);
+ if (vc.c_error.empty()) {
+ sqlite3_result_int(ctx, vc.c_stat.st_rdev);
+ } else {
+ sqlite3_result_null(ctx);
+ }
break;
case FSTAT_COL_SIZE:
- sqlite3_result_int64(ctx, vc.c_stat.st_size);
+ if (vc.c_error.empty()) {
+ sqlite3_result_int64(ctx, vc.c_stat.st_size);
+ } else {
+ sqlite3_result_null(ctx);
+ }
break;
case FSTAT_COL_BLKSIZE:
- sqlite3_result_int(ctx, vc.c_stat.st_blksize);
+ if (vc.c_error.empty()) {
+ sqlite3_result_int(ctx, vc.c_stat.st_blksize);
+ } else {
+ sqlite3_result_null(ctx);
+ }
break;
case FSTAT_COL_BLOCKS:
- sqlite3_result_int(ctx, vc.c_stat.st_blocks);
+ if (vc.c_error.empty()) {
+ sqlite3_result_int(ctx, vc.c_stat.st_blocks);
+ } else {
+ sqlite3_result_null(ctx);
+ }
break;
case FSTAT_COL_ATIME:
- sql_strftime(time_buf, sizeof(time_buf), vc.c_stat.st_atime, 0);
- sqlite3_result_text(ctx, time_buf, -1, SQLITE_TRANSIENT);
+ if (vc.c_error.empty()) {
+ sql_strftime(
+ time_buf, sizeof(time_buf), vc.c_stat.st_atime, 0);
+ sqlite3_result_text(ctx, time_buf, -1, SQLITE_TRANSIENT);
+ } else {
+ sqlite3_result_null(ctx);
+ }
break;
case FSTAT_COL_MTIME:
- sql_strftime(time_buf, sizeof(time_buf), vc.c_stat.st_mtime, 0);
- sqlite3_result_text(ctx, time_buf, -1, SQLITE_TRANSIENT);
+ if (vc.c_error.empty()) {
+ sql_strftime(
+ time_buf, sizeof(time_buf), vc.c_stat.st_mtime, 0);
+ sqlite3_result_text(ctx, time_buf, -1, SQLITE_TRANSIENT);
+ } else {
+ sqlite3_result_null(ctx);
+ }
break;
case FSTAT_COL_CTIME:
- sql_strftime(time_buf, sizeof(time_buf), vc.c_stat.st_ctime, 0);
- sqlite3_result_text(ctx, time_buf, -1, SQLITE_TRANSIENT);
+ if (vc.c_error.empty()) {
+ sql_strftime(
+ time_buf, sizeof(time_buf), vc.c_stat.st_ctime, 0);
+ sqlite3_result_text(ctx, time_buf, -1, SQLITE_TRANSIENT);
+ } else {
+ sqlite3_result_null(ctx);
+ }
+ break;
+ case FSTAT_COL_ERROR:
+ if (vc.c_error.empty()) {
+ sqlite3_result_null(ctx);
+ } else {
+ to_sqlite(ctx, vc.c_error);
+ }
break;
case FSTAT_COL_PATTERN:
sqlite3_result_text(ctx,
@@ -253,6 +337,47 @@ CREATE TABLE fstat (
vc.c_pattern.length(),
SQLITE_TRANSIENT);
break;
+ case FSTAT_COL_DATA: {
+ auto fs_path = ghc::filesystem::path{path};
+ if (!vc.c_error.empty()) {
+ sqlite3_result_null(ctx);
+ } else if (S_ISREG(vc.c_stat.st_mode)) {
+ auto open_res
+ = lnav::filesystem::open_file(fs_path, O_RDONLY);
+
+ if (open_res.isErr()) {
+ log_error("unable to read file: %s -- %s",
+ path,
+ open_res.unwrapErr().c_str());
+ sqlite3_result_null(ctx);
+ } else {
+ auto buffer = auto_buffer::alloc(vc.c_stat.st_size);
+ auto fd = open_res.unwrap();
+
+ while (true) {
+ if (buffer.available() == 0) {
+ buffer.expand_by(4096);
+ }
+ auto rc = read(fd,
+ buffer.next_available(),
+ buffer.available());
+
+ if (rc <= 0) {
+ break;
+ }
+ buffer.resize_by(rc);
+ }
+ to_sqlite(ctx, blob_auto_buffer{std::move(buffer)});
+ }
+ } else if (S_ISLNK(vc.c_stat.st_mode)) {
+ auto link_path = ghc::filesystem::read_symlink(fs_path);
+
+ to_sqlite(ctx, link_path.string());
+ } else {
+ sqlite3_result_null(ctx);
+ }
+ break;
+ }
}
return SQLITE_OK;
@@ -323,14 +448,17 @@ rcFilter(sqlite3_vtab_cursor* pVtabCursor,
const char* pattern = (const char*) sqlite3_value_text(argv[0]);
pCur->c_pattern = pattern;
- switch (glob(pattern,
+
+ auto glob_flags = GLOB_ERR;
+ if (!lnav::filesystem::is_glob(pCur->c_pattern)) {
+ glob_flags |= GLOB_NOCHECK;
+ }
+
#ifdef GLOB_TILDE
- GLOB_TILDE |
+ glob_flags |= GLOB_TILDE;
#endif
- GLOB_ERR,
- nullptr,
- pCur->c_glob.inout()))
- {
+
+ switch (glob(pattern, glob_flags, nullptr, pCur->c_glob.inout())) {
case GLOB_NOSPACE:
pVtabCursor->pVtab->zErrMsg
= sqlite3_mprintf("No space to perform glob()");
@@ -344,10 +472,57 @@ rcFilter(sqlite3_vtab_cursor* pVtabCursor,
return SQLITE_OK;
}
+} // namespace
+
int
register_fstat_vtab(sqlite3* db)
{
static vtab_module<tvt_no_update<fstat_table>> FSTAT_MODULE;
+ static auto fstat_help
+ = help_text("fstat",
+ "A table-valued function for getting information about "
+ "file paths/globs")
+ .sql_table_valued_function()
+ .with_parameter(
+ {"pattern", "The file path or glob pattern to query."})
+ .with_result(
+ {"st_parent", "The parent path of the directory entry"})
+ .with_result({"st_name", "The name of the directory entry"})
+ .with_result({"st_dev", "The device number"})
+ .with_result({"st_ino", "The inode number"})
+ .with_result(help_text{"st_type", "The type of the entry"}
+ .with_enum_values({
+ "reg",
+ "blk",
+ "chr",
+ "dir",
+ "fifo",
+ "lnk",
+ "sock",
+ }))
+ .with_result({"st_mode", "The protection mode"})
+ .with_result(
+ {"st_nlink", "The number of hard links to the entry"})
+ .with_result({"st_uid", "The ID of the owning user"})
+ .with_result({"st_user", "The user name"})
+ .with_result({"st_gid", "The ID of the owning group"})
+ .with_result({"st_group", "The group name"})
+ .with_result({"st_rdev", "The device type"})
+ .with_result({"st_size", "The size of the entry in bytes"})
+ .with_result({"st_blksize", "The optimal size for I/O"})
+ .with_result({"st_blocks", "Blocks allocated for the file"})
+ .with_result({"st_atime", "The last access time"})
+ .with_result({"st_mtime", "The last modified time"})
+ .with_result({"st_ctime", "The creation time"})
+ .with_result({"error",
+ "Error message if there was a problem looking up "
+ "the entry"})
+ .with_result({"data", "The contents of the file"})
+ .with_example(help_example{
+ "To read a file and raise an error if there is a problem",
+ "SELECT ifnull(data, raise_error('cannot read: ' || st_name, "
+ "error)) FROM fstat('/non-existent')",
+ });
int rc;
@@ -361,6 +536,8 @@ register_fstat_vtab(sqlite3* db)
}
rc = FSTAT_MODULE.create(db, "fstat");
+ sqlite_function_help.emplace("fstat", &fstat_help);
+ fstat_help.index_tags();
ensure(rc == SQLITE_OK);
diff --git a/src/gantt_source.cc b/src/gantt_source.cc
new file mode 100644
index 0000000..7d9f81d
--- /dev/null
+++ b/src/gantt_source.cc
@@ -0,0 +1,972 @@
+/**
+ * Copyright (c) 2023, Timothy Stack
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of Timothy Stack nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ''AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <chrono>
+
+#include "gantt_source.hh"
+
+#include <time.h>
+
+#include "base/humanize.hh"
+#include "base/humanize.time.hh"
+#include "base/itertools.hh"
+#include "base/math_util.hh"
+#include "command_executor.hh"
+#include "intervaltree/IntervalTree.h"
+#include "lnav_util.hh"
+#include "md4cpp.hh"
+#include "sql_util.hh"
+
+using namespace std::chrono_literals;
+using namespace lnav::roles::literals;
+using namespace md4cpp::literals;
+
+static const std::vector<std::chrono::seconds> TIME_SPANS = {
+ 5min,
+ 15min,
+ 1h,
+ 2h,
+ 4h,
+ 8h,
+ 24h,
+ 7 * 24h,
+ 30 * 24h,
+ 365 * 24h,
+};
+
+static constexpr size_t MAX_OPID_WIDTH = 60;
+
+size_t
+abbrev_ftime(char* datebuf,
+ size_t db_size,
+ const struct tm& lb_tm,
+ const struct tm& dt)
+{
+ char lb_fmt[32] = " ";
+ bool same = true;
+
+ if (lb_tm.tm_year == dt.tm_year) {
+ strcat(lb_fmt, " ");
+ } else {
+ same = false;
+ strcat(lb_fmt, "%Y");
+ }
+ if (same && lb_tm.tm_mon == dt.tm_mon) {
+ strcat(lb_fmt, " ");
+ } else {
+ if (!same) {
+ strcat(lb_fmt, "-");
+ }
+ same = false;
+ strcat(lb_fmt, "%m");
+ }
+ if (same && lb_tm.tm_mday == dt.tm_mday) {
+ strcat(lb_fmt, " ");
+ } else {
+ if (!same) {
+ strcat(lb_fmt, "-");
+ }
+ same = false;
+ strcat(lb_fmt, "%d");
+ }
+ if (same && lb_tm.tm_hour == dt.tm_hour) {
+ strcat(lb_fmt, " ");
+ } else {
+ if (!same) {
+ strcat(lb_fmt, "T");
+ }
+ same = false;
+ strcat(lb_fmt, "%H");
+ }
+ if (same && lb_tm.tm_min == dt.tm_min) {
+ strcat(lb_fmt, " ");
+ } else {
+ if (!same) {
+ strcat(lb_fmt, ":");
+ }
+ same = false;
+ strcat(lb_fmt, "%M");
+ }
+ return strftime(datebuf, db_size, lb_fmt, &dt);
+}
+
+gantt_header_overlay::gantt_header_overlay(std::shared_ptr<gantt_source> src)
+ : gho_src(src)
+{
+}
+
+bool
+gantt_header_overlay::list_static_overlay(const listview_curses& lv,
+ int y,
+ int bottom,
+ attr_line_t& value_out)
+{
+ if (y >= 3) {
+ return false;
+ }
+
+ if (this->gho_src->gs_time_order.empty()) {
+ if (y == 0) {
+ value_out.append("No operations found"_error);
+ return true;
+ }
+
+ return false;
+ }
+
+ auto lb = this->gho_src->gs_lower_bound;
+ struct tm lb_tm;
+ auto ub = this->gho_src->gs_upper_bound;
+ struct tm ub_tm;
+ auto bounds = this->gho_src->get_time_bounds_for(lv.get_selection());
+
+ if (bounds.first < lb) {
+ lb = bounds.first;
+ }
+ if (ub < bounds.second) {
+ ub = bounds.second;
+ }
+
+ secs2tm(lb.tv_sec, &lb_tm);
+ secs2tm(ub.tv_sec, &ub_tm);
+
+ struct tm sel_lb_tm;
+ secs2tm(bounds.first.tv_sec, &sel_lb_tm);
+ struct tm sel_ub_tm;
+ secs2tm(bounds.second.tv_sec, &sel_ub_tm);
+
+ auto width = lv.get_dimensions().second - 1;
+
+ char datebuf[64];
+
+ if (y == 0) {
+ double span = ub.tv_sec - lb.tv_sec;
+ double per_ch = span / (double) width;
+ strftime(datebuf, sizeof(datebuf), " %Y-%m-%dT%H:%M", &lb_tm);
+ value_out.append(datebuf);
+
+ auto duration_str = humanize::time::duration::from_tv(ub - lb)
+ .with_resolution(1min)
+ .to_string();
+ auto duration_pos = width / 2 - duration_str.size() / 2;
+ value_out.pad_to(duration_pos).append(duration_str);
+
+ auto upper_size
+ = strftime(datebuf, sizeof(datebuf), "%Y-%m-%dT%H:%M ", &ub_tm);
+ auto upper_pos = width - upper_size;
+
+ value_out.pad_to(upper_pos).append(datebuf);
+
+ auto lr = line_range{};
+ if (lb.tv_sec < bounds.first.tv_sec) {
+ auto start_diff = bounds.first.tv_sec - lb.tv_sec;
+ lr.lr_start = start_diff / per_ch;
+ } else {
+ lr.lr_start = 0;
+ }
+ if (lb.tv_sec < bounds.second.tv_sec) {
+ auto start_diff = bounds.second.tv_sec - lb.tv_sec;
+ lr.lr_end = start_diff / per_ch;
+ } else {
+ lr.lr_end = 1;
+ }
+ if (lr.lr_start == lr.lr_end) {
+ lr.lr_end += 1;
+ }
+
+ value_out.get_attrs().emplace_back(
+ lr, VC_ROLE.value(role_t::VCR_CURSOR_LINE));
+ value_out.with_attr_for_all(VC_ROLE.value(role_t::VCR_STATUS_INFO));
+ } else if (y == 1) {
+ abbrev_ftime(datebuf, sizeof(datebuf), lb_tm, sel_lb_tm);
+ value_out.appendf(FMT_STRING(" {}"), datebuf);
+
+ auto duration_str
+ = humanize::time::duration::from_tv(bounds.second - bounds.first)
+ .with_resolution(1min)
+ .to_string();
+ auto duration_pos = width / 2 - duration_str.size() / 2;
+ value_out.pad_to(duration_pos).append(duration_str);
+
+ auto upper_size
+ = abbrev_ftime(datebuf, sizeof(datebuf), ub_tm, sel_ub_tm);
+ auto upper_pos = width - upper_size - 1;
+ value_out.pad_to(upper_pos).append(datebuf);
+ value_out.with_attr_for_all(VC_ROLE.value(role_t::VCR_CURSOR_LINE));
+ } else {
+ value_out.append(" Duration "_h1)
+ .append("|", VC_GRAPHIC.value(ACS_VLINE))
+ .append(" ")
+ .append("\u2718"_error)
+ .append("\u25b2"_warning)
+ .append(" ")
+ .append("|", VC_GRAPHIC.value(ACS_VLINE))
+ .append(" Operation"_h1);
+ auto hdr_attrs = text_attrs{};
+ hdr_attrs.ta_attrs = A_UNDERLINE;
+ value_out.get_attrs().emplace_back(line_range{0, -1},
+ VC_STYLE.value(hdr_attrs));
+ value_out.with_attr_for_all(VC_ROLE.value(role_t::VCR_STATUS_INFO));
+ }
+
+ return true;
+}
+void
+gantt_header_overlay::list_value_for_overlay(
+ const listview_curses& lv,
+ vis_line_t line,
+ std::vector<attr_line_t>& value_out)
+{
+ if (!this->gho_show_details) {
+ return;
+ }
+
+ if (lv.get_selection() != line) {
+ return;
+ }
+
+ if (line >= this->gho_src->gs_time_order.size()) {
+ return;
+ }
+
+ const auto& row = this->gho_src->gs_time_order[line].get();
+
+ if (row.or_value.otr_sub_ops.size() <= 1) {
+ return;
+ }
+
+ auto width = lv.get_dimensions().second;
+
+ if (width < 37) {
+ return;
+ }
+
+ width -= 37;
+ double span = row.or_value.otr_range.duration().count();
+ double per_ch = span / (double) width;
+
+ for (const auto& sub : row.or_value.otr_sub_ops) {
+ value_out.resize(value_out.size() + 1);
+
+ auto& al = value_out.back();
+ auto& attrs = al.get_attrs();
+ auto total_msgs = sub.ostr_level_stats.lls_total_count;
+ auto duration = sub.ostr_range.tr_end - sub.ostr_range.tr_begin;
+ auto duration_str = fmt::format(
+ FMT_STRING(" {: >13}"),
+ humanize::time::duration::from_tv(duration).to_string());
+ al.pad_to(14)
+ .append(duration_str, VC_ROLE.value(role_t::VCR_OFFSET_TIME))
+ .append(" ")
+ .append(lnav::roles::error(humanize::sparkline(
+ sub.ostr_level_stats.lls_error_count, total_msgs)))
+ .append(lnav::roles::warning(humanize::sparkline(
+ sub.ostr_level_stats.lls_warning_count, total_msgs)))
+ .append(" ")
+ .append(lnav::roles::identifier(sub.ostr_subid.to_string()))
+ .append(row.or_max_subid_width
+ - sub.ostr_subid.utf8_length().unwrapOr(
+ row.or_max_subid_width),
+ ' ')
+ .append(sub.ostr_description);
+ al.with_attr_for_all(VC_ROLE.value(role_t::VCR_COMMENT));
+
+ auto start_diff = (double) to_mstime(sub.ostr_range.tr_begin
+ - row.or_value.otr_range.tr_begin);
+ auto end_diff = (double) to_mstime(sub.ostr_range.tr_end
+ - row.or_value.otr_range.tr_begin);
+
+ auto lr = line_range{
+ (int) (32 + (start_diff / per_ch)),
+ (int) (32 + (end_diff / per_ch)),
+ line_range::unit::codepoint,
+ };
+
+ if (lr.lr_start == lr.lr_end) {
+ lr.lr_end += 1;
+ }
+
+ auto block_attrs = text_attrs{};
+ block_attrs.ta_attrs = A_REVERSE;
+ attrs.emplace_back(lr, VC_STYLE.value(block_attrs));
+ }
+ if (!value_out.empty()) {
+ text_attrs ta_under;
+
+ ta_under.ta_attrs = A_UNDERLINE;
+ value_out.back().get_attrs().emplace_back(line_range{0, -1},
+ VC_STYLE.value(ta_under));
+ }
+}
+nonstd::optional<attr_line_t>
+gantt_header_overlay::list_header_for_overlay(const listview_curses& lv,
+ vis_line_t line)
+{
+ if (lv.get_overlay_selection()) {
+ return attr_line_t("\u258C Sub-operations: Press ")
+ .append("Esc"_hotkey)
+ .append(" to exit this panel");
+ }
+ return attr_line_t("\u258C Sub-operations: Press ")
+ .append("CTRL-]"_hotkey)
+ .append(" to focus on this panel");
+}
+
+gantt_source::gantt_source(textview_curses& log_view,
+ logfile_sub_source& lss,
+ plain_text_source& preview_source,
+ gantt_status_source& preview_status_source)
+ : gs_log_view(log_view), gs_lss(lss), gs_preview_source(preview_source),
+ gs_preview_status_source(preview_status_source)
+{
+ this->tss_supports_filtering = true;
+}
+
+std::pair<timeval, timeval>
+gantt_source::get_time_bounds_for(int line)
+{
+ static const int CONTEXT_LINES = 5;
+
+ const auto& low_row
+ = this->gs_time_order[std::max(0, line - CONTEXT_LINES)].get();
+ const auto& sel_row = this->gs_time_order[line].get();
+ const auto& high_row
+ = this->gs_time_order[std::min(line + CONTEXT_LINES,
+ (int) this->gs_time_order.size() - 1)]
+ .get();
+ auto high_tv_sec = std::max(sel_row.or_value.otr_range.tr_end.tv_sec,
+ high_row.or_value.otr_range.tr_begin.tv_sec);
+
+ auto duration = std::chrono::seconds{
+ high_tv_sec - low_row.or_value.otr_range.tr_begin.tv_sec};
+ auto span_iter
+ = std::upper_bound(TIME_SPANS.begin(), TIME_SPANS.end(), duration);
+ if (span_iter == TIME_SPANS.end()) {
+ --span_iter;
+ }
+ auto round_to = (*span_iter) == 5min
+ ? 60
+ : ((*span_iter) == 15min ? 60 * 15 : 60 * 60);
+ auto span_secs = span_iter->count() - round_to;
+ struct timeval lower_tv = {
+ rounddown(low_row.or_value.otr_range.tr_begin.tv_sec, round_to),
+ 0,
+ };
+ lower_tv.tv_sec -= span_secs / 2;
+ struct timeval upper_tv = {
+ static_cast<time_t>(roundup(high_tv_sec, round_to)),
+ 0,
+ };
+ upper_tv.tv_sec += span_secs / 2;
+
+ return {lower_tv, upper_tv};
+}
+
+size_t
+gantt_source::text_line_count()
+{
+ return this->gs_time_order.size();
+}
+
+void
+gantt_source::text_value_for_line(textview_curses& tc,
+ int line,
+ std::string& value_out,
+ text_sub_source::line_flags_t flags)
+{
+ if (line < this->gs_time_order.size()) {
+ const auto& row = this->gs_time_order[line].get();
+ auto duration
+ = row.or_value.otr_range.tr_end - row.or_value.otr_range.tr_begin;
+ auto duration_str = fmt::format(
+ FMT_STRING(" {: >13}"),
+ humanize::time::duration::from_tv(duration).to_string());
+
+ this->gs_rendered_line.clear();
+
+ auto total_msgs = row.or_value.otr_level_stats.lls_total_count;
+ auto truncated_name = row.or_name.to_string();
+ truncate_to(truncated_name, MAX_OPID_WIDTH);
+ this->gs_rendered_line
+ .append(duration_str, VC_ROLE.value(role_t::VCR_OFFSET_TIME))
+ .append(" ")
+ .append(lnav::roles::error(humanize::sparkline(
+ row.or_value.otr_level_stats.lls_error_count, total_msgs)))
+ .append(lnav::roles::warning(humanize::sparkline(
+ row.or_value.otr_level_stats.lls_warning_count, total_msgs)))
+ .append(" ")
+ .append(lnav::roles::identifier(truncated_name))
+ .append(this->gs_opid_width
+ - utf8_string_length(truncated_name)
+ .unwrapOr(this->gs_opid_width),
+ ' ')
+ .append(row.or_description);
+ this->gs_rendered_line.with_attr_for_all(
+ VC_ROLE.value(role_t::VCR_COMMENT));
+
+ value_out = this->gs_rendered_line.get_string();
+ }
+}
+
+void
+gantt_source::text_attrs_for_line(textview_curses& tc,
+ int line,
+ string_attrs_t& value_out)
+{
+ if (line < this->gs_time_order.size()) {
+ const auto& row = this->gs_time_order[line].get();
+
+ value_out = this->gs_rendered_line.get_attrs();
+
+ auto lr = line_range{-1, -1, line_range::unit::codepoint};
+ auto sel_bounds = this->get_time_bounds_for(tc.get_selection());
+
+ if (row.or_value.otr_range.tr_begin <= sel_bounds.second
+ && sel_bounds.first <= row.or_value.otr_range.tr_end)
+ {
+ static const int INDENT = 22;
+
+ auto width = tc.get_dimensions().second;
+
+ if (width > INDENT) {
+ width -= INDENT;
+ double span
+ = sel_bounds.second.tv_sec - sel_bounds.first.tv_sec;
+ double per_ch = span / (double) width;
+
+ if (row.or_value.otr_range.tr_begin <= sel_bounds.first) {
+ lr.lr_start = INDENT;
+ } else {
+ auto start_diff = row.or_value.otr_range.tr_begin.tv_sec
+ - sel_bounds.first.tv_sec;
+
+ lr.lr_start = INDENT + start_diff / per_ch;
+ }
+
+ if (sel_bounds.second < row.or_value.otr_range.tr_end) {
+ lr.lr_end = -1;
+ } else {
+ auto end_diff = row.or_value.otr_range.tr_end.tv_sec
+ - sel_bounds.first.tv_sec;
+
+ lr.lr_end = INDENT + end_diff / per_ch;
+ if (lr.lr_start == lr.lr_end) {
+ lr.lr_end += 1;
+ }
+ }
+
+ auto block_attrs = text_attrs{};
+ block_attrs.ta_attrs = A_REVERSE;
+ value_out.emplace_back(lr, VC_STYLE.value(block_attrs));
+ }
+ }
+ auto alt_row_index = line % 4;
+ if (alt_row_index == 2 || alt_row_index == 3) {
+ value_out.emplace_back(line_range{0, -1},
+ VC_ROLE.value(role_t::VCR_ALT_ROW));
+ }
+ }
+}
+
+size_t
+gantt_source::text_size_for_line(textview_curses& tc,
+ int line,
+ text_sub_source::line_flags_t raw)
+{
+ return this->gs_total_width;
+}
+
+void
+gantt_source::rebuild_indexes()
+{
+ auto& bm = this->tss_view->get_bookmarks();
+ auto& bm_errs = bm[&logfile_sub_source::BM_ERRORS];
+ auto& bm_warns = bm[&logfile_sub_source::BM_WARNINGS];
+
+ bm_errs.clear();
+ bm_warns.clear();
+
+ this->gs_lower_bound = {};
+ this->gs_upper_bound = {};
+ this->gs_opid_width = 0;
+ this->gs_total_width = 0;
+ this->gs_filtered_count = 0;
+ this->gs_active_opids.clear();
+ this->gs_descriptions.clear();
+ this->gs_subid_map.clear();
+ this->gs_allocator.reset();
+ this->gs_preview_source.clear();
+ this->gs_preview_status_source.get_description().clear();
+
+ auto min_log_time_opt = this->gs_lss.get_min_log_time();
+ auto max_log_time_opt = this->gs_lss.get_max_log_time();
+ auto max_desc_width = size_t{0};
+
+ for (const auto& ld : this->gs_lss) {
+ if (ld->get_file_ptr() == nullptr) {
+ continue;
+ }
+ if (!ld->is_visible()) {
+ continue;
+ }
+
+ auto format = ld->get_file_ptr()->get_format();
+ safe::ReadAccess<logfile::safe_opid_state> r_opid_map(
+ ld->get_file_ptr()->get_opids());
+ for (const auto& pair : r_opid_map->los_opid_ranges) {
+ auto& otr = pair.second;
+ auto active_iter = this->gs_active_opids.find(pair.first);
+ if (active_iter == this->gs_active_opids.end()) {
+ auto opid = pair.first.to_owned(this->gs_allocator);
+ auto active_emp_res = this->gs_active_opids.emplace(
+ opid,
+ opid_row{
+ opid,
+ otr,
+ string_fragment::invalid(),
+ });
+ active_iter = active_emp_res.first;
+ } else {
+ active_iter->second.or_value |= otr;
+ }
+
+ auto& row = active_iter->second;
+ for (auto& sub : active_iter->second.or_value.otr_sub_ops) {
+ auto subid_iter = this->gs_subid_map.find(sub.ostr_subid);
+
+ if (subid_iter == this->gs_subid_map.end()) {
+ subid_iter = this->gs_subid_map
+ .emplace(sub.ostr_subid.to_owned(
+ this->gs_allocator),
+ true)
+ .first;
+ }
+ sub.ostr_subid = subid_iter->first;
+ if (sub.ostr_subid.length()
+ > active_iter->second.or_max_subid_width)
+ {
+ active_iter->second.or_max_subid_width
+ = sub.ostr_subid.length();
+ }
+ }
+
+ if (otr.otr_description.lod_id) {
+ auto desc_id = otr.otr_description.lod_id.value();
+ auto desc_def_iter
+ = format->lf_opid_description_def->find(desc_id);
+
+ if (desc_def_iter == format->lf_opid_description_def->end()) {
+ log_error("cannot find description: %s",
+ active_iter->first.data());
+ } else {
+ auto desc_key
+ = opid_description_def_key{format->get_name(), desc_id};
+ auto desc_defs_iter
+ = row.or_description_defs.odd_defs.find(desc_key);
+ if (desc_defs_iter
+ == row.or_description_defs.odd_defs.end())
+ {
+ row.or_description_defs.odd_defs.insert(
+ desc_key, desc_def_iter->second);
+ }
+
+ auto& all_descs = active_iter->second.or_descriptions;
+ auto& curr_desc_m = all_descs[desc_key];
+ const auto& new_desc_v = otr.otr_description.lod_elements;
+
+ for (const auto& desc_pair : new_desc_v) {
+ curr_desc_m[desc_pair.first] = desc_pair.second;
+ }
+ }
+ } else {
+ ensure(otr.otr_description.lod_elements.empty());
+ }
+ active_iter->second.or_value.otr_description.lod_elements.clear();
+ }
+ }
+
+ size_t filtered_in_count = 0;
+ for (const auto& filt : this->tss_filters) {
+ if (!filt->is_enabled()) {
+ continue;
+ }
+ if (filt->get_type() == text_filter::INCLUDE) {
+ filtered_in_count += 1;
+ }
+ }
+ this->gs_filter_hits = {};
+ this->gs_time_order.clear();
+ this->gs_time_order.reserve(this->gs_active_opids.size());
+ for (auto& pair : this->gs_active_opids) {
+ auto& otr = pair.second.or_value;
+ std::string full_desc;
+ const auto& desc_defs = pair.second.or_description_defs.odd_defs;
+ for (auto& desc : pair.second.or_descriptions) {
+ auto desc_def_iter = desc_defs.find(desc.first);
+ if (desc_def_iter == desc_defs.end()) {
+ continue;
+ }
+ const auto& desc_def = desc_def_iter->second;
+ full_desc = desc_def.to_string(desc.second);
+ }
+ pair.second.or_descriptions.clear();
+ auto full_desc_sf = string_fragment::from_str(full_desc);
+ auto desc_sf_iter = this->gs_descriptions.find(full_desc_sf);
+ if (desc_sf_iter == this->gs_descriptions.end()) {
+ full_desc_sf = string_fragment::from_str(full_desc).to_owned(
+ this->gs_allocator);
+ }
+ pair.second.or_description = full_desc_sf;
+
+ shared_buffer sb_opid;
+ shared_buffer_ref sbr_opid;
+ sbr_opid.share(
+ sb_opid, pair.second.or_name.data(), pair.second.or_name.length());
+ shared_buffer sb_desc;
+ shared_buffer_ref sbr_desc;
+ sbr_desc.share(sb_desc, full_desc.c_str(), full_desc.length());
+ if (this->tss_apply_filters) {
+ auto filtered_in = false;
+ auto filtered_out = false;
+ for (const auto& filt : this->tss_filters) {
+ if (!filt->is_enabled()) {
+ continue;
+ }
+ for (const auto sbr : {&sbr_opid, &sbr_desc}) {
+ if (filt->matches(nonstd::nullopt, *sbr)) {
+ this->gs_filter_hits[filt->get_index()] += 1;
+ switch (filt->get_type()) {
+ case text_filter::INCLUDE:
+ filtered_in = true;
+ break;
+ case text_filter::EXCLUDE:
+ filtered_out = true;
+ break;
+ default:
+ break;
+ }
+ }
+ }
+ }
+
+ if (min_log_time_opt
+ && otr.otr_range.tr_end < min_log_time_opt.value())
+ {
+ filtered_out = true;
+ }
+ if (max_log_time_opt
+ && max_log_time_opt.value() < otr.otr_range.tr_begin)
+ {
+ filtered_out = true;
+ }
+
+ if ((filtered_in_count > 0 && !filtered_in) || filtered_out) {
+ this->gs_filtered_count += 1;
+ continue;
+ }
+ }
+
+ if (pair.second.or_name.length() > this->gs_opid_width) {
+ this->gs_opid_width = pair.second.or_name.length();
+ }
+ if (full_desc.size() > max_desc_width) {
+ max_desc_width = full_desc.size();
+ }
+
+ if (this->gs_lower_bound.tv_sec == 0
+ || pair.second.or_value.otr_range.tr_begin < this->gs_lower_bound)
+ {
+ this->gs_lower_bound = pair.second.or_value.otr_range.tr_begin;
+ }
+ if (this->gs_upper_bound.tv_sec == 0
+ || this->gs_upper_bound < pair.second.or_value.otr_range.tr_end)
+ {
+ this->gs_upper_bound = pair.second.or_value.otr_range.tr_end;
+ }
+ this->gs_time_order.emplace_back(pair.second);
+ }
+ std::stable_sort(this->gs_time_order.begin(),
+ this->gs_time_order.end(),
+ std::less<const opid_row>{});
+ for (size_t lpc = 0; lpc < this->gs_time_order.size(); lpc++) {
+ const auto& row = this->gs_time_order[lpc].get();
+ if (row.or_value.otr_level_stats.lls_error_count > 0) {
+ bm_errs.insert_once(vis_line_t(lpc));
+ } else if (row.or_value.otr_level_stats.lls_warning_count > 0) {
+ bm_warns.insert_once(vis_line_t(lpc));
+ }
+ }
+
+ this->gs_opid_width = std::min(this->gs_opid_width, MAX_OPID_WIDTH);
+ this->gs_total_width
+ = std::max<size_t>(22 + this->gs_opid_width + max_desc_width,
+ 1 + 16 + 5 + 8 + 5 + 16 + 1 /* header */);
+
+ this->tss_view->set_needs_update();
+}
+
+nonstd::optional<vis_line_t>
+gantt_source::row_for_time(struct timeval time_bucket)
+{
+ auto iter = this->gs_time_order.begin();
+ while (true) {
+ if (iter == this->gs_time_order.end()) {
+ return nonstd::nullopt;
+ }
+
+ if (iter->get().or_value.otr_range.contains_inclusive(time_bucket)) {
+ break;
+ }
+ ++iter;
+ }
+
+ auto closest_iter = iter;
+ auto closest_diff = time_bucket - iter->get().or_value.otr_range.tr_begin;
+ for (; iter != this->gs_time_order.end(); ++iter) {
+ if (time_bucket < iter->get().or_value.otr_range.tr_begin) {
+ break;
+ }
+ if (!iter->get().or_value.otr_range.contains_inclusive(time_bucket)) {
+ continue;
+ }
+
+ auto diff = time_bucket - iter->get().or_value.otr_range.tr_begin;
+ if (diff < closest_diff) {
+ closest_iter = iter;
+ closest_diff = diff;
+ }
+
+ for (const auto& sub : iter->get().or_value.otr_sub_ops) {
+ if (!sub.ostr_range.contains_inclusive(time_bucket)) {
+ continue;
+ }
+
+ diff = time_bucket - sub.ostr_range.tr_begin;
+ if (diff < closest_diff) {
+ closest_iter = iter;
+ closest_diff = diff;
+ }
+ }
+ }
+
+ return vis_line_t(std::distance(this->gs_time_order.begin(), closest_iter));
+}
+
+nonstd::optional<text_time_translator::row_info>
+gantt_source::time_for_row(vis_line_t row)
+{
+ if (row >= this->gs_time_order.size()) {
+ return nonstd::nullopt;
+ }
+
+ const auto& otr = this->gs_time_order[row].get().or_value;
+
+ if (this->tss_view->get_selection() == row) {
+ auto ov_sel = this->tss_view->get_overlay_selection();
+
+ if (ov_sel && ov_sel.value() < otr.otr_sub_ops.size()) {
+ return row_info{
+ otr.otr_sub_ops[ov_sel.value()].ostr_range.tr_begin,
+ row,
+ };
+ }
+ }
+
+ return row_info{
+ otr.otr_range.tr_begin,
+ row,
+ };
+}
+
+size_t
+gantt_source::text_line_width(textview_curses& curses)
+{
+ return this->gs_total_width;
+}
+
+void
+gantt_source::text_selection_changed(textview_curses& tc)
+{
+ static const size_t MAX_PREVIEW_LINES = 5;
+
+ auto sel = tc.get_selection();
+
+ this->gs_preview_source.clear();
+ if (sel >= this->gs_time_order.size()) {
+ return;
+ }
+
+ const auto& row = this->gs_time_order[sel].get();
+ auto low_tv = row.or_value.otr_range.tr_begin;
+ auto high_tv = row.or_value.otr_range.tr_end;
+ auto id_sf = row.or_name;
+ auto level_stats = row.or_value.otr_level_stats;
+ auto ov_sel = tc.get_overlay_selection();
+ if (ov_sel) {
+ const auto& sub = row.or_value.otr_sub_ops[ov_sel.value()];
+ id_sf = sub.ostr_subid;
+ low_tv = sub.ostr_range.tr_begin;
+ high_tv = sub.ostr_range.tr_end;
+ level_stats = sub.ostr_level_stats;
+ }
+ high_tv.tv_sec += 1;
+ auto low_vl = this->gs_lss.row_for_time(low_tv);
+ auto high_vl = this->gs_lss.row_for_time(high_tv).value_or(
+ this->gs_lss.text_line_count());
+
+ if (!low_vl) {
+ return;
+ }
+
+ auto preview_content = attr_line_t();
+ auto msgs_remaining = size_t{MAX_PREVIEW_LINES};
+ auto win = this->gs_lss.window_at(low_vl.value(), high_vl);
+ auto id_hash = hash_str(row.or_name.data(), row.or_name.length());
+ for (const auto& msg_line : win) {
+ if (!msg_line.get_logline().match_opid_hash(id_hash)) {
+ continue;
+ }
+
+ const auto& lvv = msg_line.get_values();
+ if (!lvv.lvv_opid_value) {
+ continue;
+ }
+ auto opid_sf = lvv.lvv_opid_value.value();
+
+ if (opid_sf == row.or_name) {
+ std::vector<attr_line_t> rows_al(1);
+
+ this->gs_log_view.listview_value_for_rows(
+ this->gs_log_view, msg_line.get_vis_line(), rows_al);
+
+ preview_content.append(rows_al[0]).append("\n");
+ msgs_remaining -= 1;
+ if (msgs_remaining == 0) {
+ break;
+ }
+ }
+ }
+
+ while (msgs_remaining > 0) {
+ preview_content.append("\u2800\n");
+ msgs_remaining -= 1;
+ }
+
+ this->gs_preview_source.replace_with(preview_content);
+ this->gs_preview_status_source.get_description().set_value(
+ " ID %.*s", id_sf.length(), id_sf.data());
+ auto err_count = level_stats.lls_error_count;
+ if (err_count == 0) {
+ this->gs_preview_status_source
+ .statusview_value_for_field(gantt_status_source::TSF_ERRORS)
+ .set_value("");
+ } else if (err_count > 1) {
+ this->gs_preview_status_source
+ .statusview_value_for_field(gantt_status_source::TSF_ERRORS)
+ .set_value("%'d errors", err_count);
+ } else {
+ this->gs_preview_status_source
+ .statusview_value_for_field(gantt_status_source::TSF_ERRORS)
+ .set_value("%'d error", err_count);
+ }
+ this->gs_preview_status_source
+ .statusview_value_for_field(gantt_status_source::TSF_TOTAL)
+ .set_value("%'d messages ", level_stats.lls_total_count);
+}
+
+void
+gantt_source::text_filters_changed()
+{
+ this->rebuild_indexes();
+
+ if (this->tss_view != nullptr) {
+ this->tss_view->reload_data();
+ this->tss_view->redo_search();
+ }
+}
+
+int
+gantt_source::get_filtered_count() const
+{
+ return this->gs_filtered_count;
+}
+
+int
+gantt_source::get_filtered_count_for(size_t filter_index) const
+{
+ return this->gs_filter_hits[filter_index];
+}
+
+static std::vector<breadcrumb::possibility>
+timestamp_poss()
+{
+ const static std::vector<breadcrumb::possibility> retval = {
+ breadcrumb::possibility{"-1 day"},
+ breadcrumb::possibility{"-1h"},
+ breadcrumb::possibility{"-30m"},
+ breadcrumb::possibility{"-15m"},
+ breadcrumb::possibility{"-5m"},
+ breadcrumb::possibility{"-1m"},
+ breadcrumb::possibility{"+1m"},
+ breadcrumb::possibility{"+5m"},
+ breadcrumb::possibility{"+15m"},
+ breadcrumb::possibility{"+30m"},
+ breadcrumb::possibility{"+1h"},
+ breadcrumb::possibility{"+1 day"},
+ };
+
+ return retval;
+}
+
+void
+gantt_source::text_crumbs_for_line(int line,
+ std::vector<breadcrumb::crumb>& crumbs)
+{
+ text_sub_source::text_crumbs_for_line(line, crumbs);
+
+ if (line >= this->gs_time_order.size()) {
+ return;
+ }
+
+ const auto& row = this->gs_time_order[line].get();
+ char ts[64];
+
+ sql_strftime(ts, sizeof(ts), row.or_value.otr_range.tr_begin, 'T');
+
+ crumbs.emplace_back(
+ std::string(ts),
+ timestamp_poss,
+ [ec = this->gs_exec_context](const auto& ts) {
+ ec->execute(fmt::format(FMT_STRING(":goto {}"),
+ ts.template get<std::string>()));
+ });
+ crumbs.back().c_expected_input
+ = breadcrumb::crumb::expected_input_t::anything;
+ crumbs.back().c_search_placeholder = "(Enter an absolute or relative time)";
+}
diff --git a/src/gantt_source.hh b/src/gantt_source.hh
new file mode 100644
index 0000000..cc76447
--- /dev/null
+++ b/src/gantt_source.hh
@@ -0,0 +1,199 @@
+/**
+ * Copyright (c) 2023, Timothy Stack
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of Timothy Stack nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ''AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef lnav_gantt_source_hh
+#define lnav_gantt_source_hh
+
+#include "base/map_util.hh"
+#include "gantt_status_source.hh"
+#include "logfile_sub_source.hh"
+#include "plain_text_source.hh"
+#include "text_overlay_menu.hh"
+#include "textview_curses.hh"
+
+class gantt_source
+ : public text_sub_source
+ , public text_time_translator {
+public:
+ explicit gantt_source(textview_curses& log_view,
+ logfile_sub_source& lss,
+ plain_text_source& preview_source,
+ gantt_status_source& preview_status_source);
+
+ size_t text_line_count() override;
+
+ size_t text_line_width(textview_curses& curses) override;
+
+ void text_value_for_line(textview_curses& tc,
+ int line,
+ std::string& value_out,
+ line_flags_t flags) override;
+
+ void text_attrs_for_line(textview_curses& tc,
+ int line,
+ string_attrs_t& value_out) override;
+
+ size_t text_size_for_line(textview_curses& tc,
+ int line,
+ line_flags_t raw) override;
+
+ void text_selection_changed(textview_curses& tc) override;
+
+ void text_filters_changed() override;
+ int get_filtered_count() const override;
+ int get_filtered_count_for(size_t filter_index) const override;
+
+ void text_crumbs_for_line(int line,
+ std::vector<breadcrumb::crumb>& crumbs) override;
+
+ nonstd::optional<vis_line_t> row_for_time(
+ struct timeval time_bucket) override;
+ nonstd::optional<row_info> time_for_row(vis_line_t row) override;
+
+ void rebuild_indexes();
+
+ std::pair<timeval, timeval> get_time_bounds_for(int line);
+
+ textview_curses& gs_log_view;
+ logfile_sub_source& gs_lss;
+ plain_text_source& gs_preview_source;
+ gantt_status_source& gs_preview_status_source;
+ ArenaAlloc::Alloc<char> gs_allocator{64 * 1024};
+
+ struct opid_description_def_key {
+ intern_string_t oddk_format_name;
+ intern_string_t oddk_desc_name;
+
+ bool operator<(const opid_description_def_key& rhs) const
+ {
+ if (this->oddk_format_name < rhs.oddk_format_name) {
+ return true;
+ }
+ if (this->oddk_format_name == rhs.oddk_format_name) {
+ return this->oddk_desc_name < rhs.oddk_desc_name;
+ }
+
+ return false;
+ }
+ };
+
+ struct opid_description_defs {
+ lnav::map::small<opid_description_def_key, log_format::opid_descriptors>
+ odd_defs;
+ };
+
+ using gantt_subid_map
+ = robin_hood::unordered_map<string_fragment,
+ bool,
+ frag_hasher,
+ std::equal_to<string_fragment>>;
+
+ gantt_subid_map gs_subid_map;
+
+ struct opid_row {
+ string_fragment or_name;
+ opid_time_range or_value;
+ string_fragment or_description;
+ opid_description_defs or_description_defs;
+ lnav::map::small<opid_description_def_key,
+ lnav::map::small<size_t, std::string>>
+ or_descriptions;
+ size_t or_max_subid_width{0};
+
+ bool operator<(const opid_row& rhs) const
+ {
+ if (this->or_value.otr_range < rhs.or_value.otr_range) {
+ return true;
+ }
+ if (this->or_value.otr_range.tr_begin
+ == rhs.or_value.otr_range.tr_begin
+ && this->or_name < rhs.or_name)
+ {
+ return true;
+ }
+
+ return false;
+ }
+ };
+
+ using gantt_opid_row_map
+ = robin_hood::unordered_map<string_fragment,
+ opid_row,
+ frag_hasher,
+ std::equal_to<string_fragment>>;
+ using gantt_desc_map
+ = robin_hood::unordered_set<string_fragment,
+ frag_hasher,
+ std::equal_to<string_fragment>>;
+
+ attr_line_t gs_rendered_line;
+ size_t gs_opid_width{0};
+ size_t gs_total_width{0};
+ gantt_opid_row_map gs_active_opids;
+ gantt_desc_map gs_descriptions;
+ std::vector<std::reference_wrapper<opid_row>> gs_time_order;
+ struct timeval gs_lower_bound {};
+ struct timeval gs_upper_bound {};
+ size_t gs_filtered_count{0};
+ std::array<size_t, logfile_filter_state::MAX_FILTERS> gs_filter_hits{};
+ exec_context* gs_exec_context;
+};
+
+class gantt_header_overlay : public text_overlay_menu {
+public:
+ explicit gantt_header_overlay(std::shared_ptr<gantt_source> src);
+
+ bool list_static_overlay(const listview_curses& lv,
+ int y,
+ int bottom,
+ attr_line_t& value_out) override;
+
+ nonstd::optional<attr_line_t> list_header_for_overlay(
+ const listview_curses& lv, vis_line_t line) override;
+
+ void list_value_for_overlay(const listview_curses& lv,
+ vis_line_t line,
+ std::vector<attr_line_t>& value_out) override;
+
+ void set_show_details_in_overlay(bool val) override
+ {
+ this->gho_show_details = val;
+ }
+
+ bool get_show_details_in_overlay() const override
+ {
+ return this->gho_show_details;
+ }
+
+private:
+ bool gho_show_details{false};
+ std::shared_ptr<gantt_source> gho_src;
+};
+
+#endif
diff --git a/src/gantt_status_source.hh b/src/gantt_status_source.hh
new file mode 100644
index 0000000..ef94845
--- /dev/null
+++ b/src/gantt_status_source.hh
@@ -0,0 +1,82 @@
+/**
+ * Copyright (c) 2023, Timothy Stack
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of Timothy Stack nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ''AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef lnav_gantt_status_source_hh
+#define lnav_gantt_status_source_hh
+
+#include <string>
+
+#include "statusview_curses.hh"
+
+class gantt_status_source : public status_data_source {
+public:
+ typedef enum {
+ TSF_TITLE,
+ TSF_STITCH_TITLE,
+ TSF_DESCRIPTION,
+ TSF_TOTAL,
+ TSF_ERRORS,
+
+ TSF__MAX
+ } field_t;
+
+ gantt_status_source()
+ {
+ this->tss_fields[TSF_TITLE].set_width(16);
+ this->tss_fields[TSF_TITLE].set_role(role_t::VCR_STATUS_TITLE);
+ this->tss_fields[TSF_TITLE].set_value(" Operation Logs ");
+ this->tss_fields[TSF_STITCH_TITLE].set_width(2);
+ this->tss_fields[TSF_STITCH_TITLE].set_stitch_value(
+ role_t::VCR_STATUS_STITCH_TITLE_TO_NORMAL,
+ role_t::VCR_STATUS_STITCH_NORMAL_TO_TITLE);
+ this->tss_fields[TSF_DESCRIPTION].set_share(1);
+ this->tss_fields[TSF_ERRORS].right_justify(true);
+ this->tss_fields[TSF_ERRORS].set_role(role_t::VCR_ALERT_STATUS);
+ this->tss_fields[TSF_ERRORS].set_width(16);
+ this->tss_fields[TSF_TOTAL].right_justify(true);
+ this->tss_fields[TSF_TOTAL].set_width(20);
+ }
+
+ size_t statusview_fields() override { return TSF__MAX; }
+
+ status_field& statusview_value_for_field(int field) override
+ {
+ return this->tss_fields[field];
+ }
+
+ status_field& get_description()
+ {
+ return this->tss_fields[TSF_DESCRIPTION];
+ }
+
+private:
+ status_field tss_fields[TSF__MAX];
+};
+
+#endif
diff --git a/src/grep_proc.cc b/src/grep_proc.cc
index e67ae2b..cb3d087 100644
--- a/src/grep_proc.cc
+++ b/src/grep_proc.cc
@@ -45,6 +45,7 @@
#include "base/string_util.hh"
#include "config.h"
#include "lnav_util.hh"
+#include "scn/scn.h"
#include "vis_line.hh"
template<typename LineType>
@@ -270,17 +271,18 @@ grep_proc<LineType>::cleanup()
template<typename LineType>
void
-grep_proc<LineType>::dispatch_line(char* line)
+grep_proc<LineType>::dispatch_line(const string_fragment& line)
{
- int start, end, capture_start;
+ int start, end;
- require(line != nullptr);
+ require(line.is_valid());
- if (sscanf(line, "h%d", this->gp_highest_line.out()) == 1) {
- } else if (sscanf(line, "%d", this->gp_last_line.out()) == 1) {
+ auto sv = line.to_string_view();
+ if (scn::scan(sv, "h{}", this->gp_highest_line.lvalue())) {
+ } else if (scn::scan(sv, "{}", this->gp_last_line.lvalue())) {
/* Starting a new line with matches. */
ensure(this->gp_last_line >= 0);
- } else if (sscanf(line, "[%d:%d]", &start, &end) == 2) {
+ } else if (scn::scan(sv, "[{}:{}]", start, end)) {
require(start >= 0);
require(end >= 0);
@@ -288,25 +290,30 @@ grep_proc<LineType>::dispatch_line(char* line)
if (this->gp_sink != nullptr) {
this->gp_sink->grep_match(*this, this->gp_last_line, start, end);
}
- } else if (sscanf(line, "(%d:%d)%n", &start, &end, &capture_start) == 2) {
- require(start == -1 || start >= 0);
- require(end >= 0);
-
- /* Pass the captured strings to the sink delegate. */
- if (this->gp_sink != nullptr) {
- this->gp_sink->grep_capture(
- *this,
- this->gp_last_line,
- start,
- end,
- start < 0 ? nullptr : &line[capture_start]);
- }
} else if (line[0] == '/') {
if (this->gp_sink != nullptr) {
this->gp_sink->grep_match_end(*this, this->gp_last_line);
}
} else {
- log_error("bad line from child -- %s", line);
+ auto scan_res = scn::scan(sv, "({}:{})", start, end);
+ if (scan_res) {
+ require(start == -1 || start >= 0);
+ require(end >= 0);
+
+ /* Pass the captured strings to the sink delegate. */
+ if (this->gp_sink != nullptr) {
+ this->gp_sink->grep_capture(
+ *this,
+ this->gp_last_line,
+ start,
+ end,
+ start < 0
+ ? string_fragment{}
+ : to_string_fragment(scan_res.range_as_string_view()));
+ }
+ } else {
+ log_error("bad line from child -- %s", line);
+ }
}
}
@@ -369,13 +376,8 @@ grep_proc<LineType>::check_poll_set(const std::vector<struct pollfd>& pollfds)
this->gp_pipe_range = li.li_file_range;
this->gp_line_buffer.read_range(li.li_file_range)
.then([this](auto sbr) {
- auto_mem<char> buf;
-
- buf = (char*) malloc(sbr.length() + 1);
sbr.rtrim(is_line_ending);
- memcpy(buf, sbr.get_data(), sbr.length());
- buf[sbr.length()] = '\0';
- this->dispatch_line(buf);
+ this->dispatch_line(sbr.to_string_fragment());
});
loop_count += 1;
diff --git a/src/grep_proc.hh b/src/grep_proc.hh
index 58010e3..ccc6df8 100644
--- a/src/grep_proc.hh
+++ b/src/grep_proc.hh
@@ -148,9 +148,11 @@ public:
LineType line,
int start,
int end,
- char* capture){};
+ const string_fragment& capture)
+ {
+ }
- virtual void grep_match_end(grep_proc<LineType>& gp, LineType line){};
+ virtual void grep_match_end(grep_proc<LineType>& gp, LineType line) {}
};
/**
@@ -255,7 +257,7 @@ protected:
/**
* Dispatch a line received from the child.
*/
- void dispatch_line(char* line);
+ void dispatch_line(const string_fragment& line);
/**
* Free any resources used by the object and make sure the child has been
diff --git a/src/hasher.hh b/src/hasher.hh
new file mode 100644
index 0000000..075f726
--- /dev/null
+++ b/src/hasher.hh
@@ -0,0 +1,111 @@
+/**
+ * Copyright (c) 2023, Timothy Stack
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of Timothy Stack nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ''AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef lnav_hasher_hh
+#define lnav_hasher_hh
+
+#include <stdint.h>
+
+#include "base/auto_mem.hh"
+#include "base/intern_string.hh"
+#include "byte_array.hh"
+#include "spookyhash/SpookyV2.h"
+
+class hasher {
+public:
+ using array_t = byte_array<2, uint64_t>;
+ static constexpr size_t STRING_SIZE = array_t::STRING_SIZE;
+
+ hasher() { this->h_context.Init(0, 0); }
+
+ hasher& update(const std::string& str)
+ {
+ this->h_context.Update(str.data(), str.length());
+
+ return *this;
+ }
+
+ hasher& update(const string_fragment& str)
+ {
+ this->h_context.Update(str.data(), str.length());
+
+ return *this;
+ }
+
+ hasher& update(const char* bits, size_t len)
+ {
+ this->h_context.Update(bits, len);
+
+ return *this;
+ }
+
+ hasher& update(int64_t value)
+ {
+ value = SPOOKYHASH_LITTLE_ENDIAN_64(value);
+ this->h_context.Update(&value, sizeof(value));
+
+ return *this;
+ }
+
+ array_t to_array()
+ {
+ uint64_t h1;
+ uint64_t h2;
+ array_t retval;
+
+ this->h_context.Final(&h1, &h2);
+ *retval.out(0) = SPOOKYHASH_LITTLE_ENDIAN_64(h1);
+ *retval.out(1) = SPOOKYHASH_LITTLE_ENDIAN_64(h2);
+ return retval;
+ }
+
+ void to_string(auto_buffer& buf)
+ {
+ array_t bits = this->to_array();
+
+ bits.to_string(std::back_inserter(buf));
+ }
+
+ std::string to_string()
+ {
+ array_t bits = this->to_array();
+ return bits.to_string();
+ }
+
+ std::string to_uuid_string()
+ {
+ array_t bits = this->to_array();
+ return bits.to_uuid_string();
+ }
+
+private:
+ SpookyHash h_context;
+};
+
+#endif
diff --git a/src/help.md b/src/help.md
index 8a8e8fa..9dafca2 100644
--- a/src/help.md
+++ b/src/help.md
@@ -49,19 +49,14 @@ not have to manually specify the log file format. The currently
supported formats are: syslog, apache, strace, tcsh history, and
generic log files with timestamps.
-Lnav will also display data piped in on the standard input. The
-following options are available when doing so:
-
-* `-t` Prepend timestamps to the lines of data being read in
- on the standard input.
-* `-w file` Write the contents of the standard input to this file.
+Lnav will also display data piped in on the standard input.
To automatically execute queries or lnav commands after the files
have been loaded, you can use the following options:
* `-c cmd` A command, query, or file to execute. The first character
determines the type of operation: a colon (`:`) is used for the
- built-in commands; a semi-colon (`;`) for SQL queries; and a
+ built-in commands; a semi-colon (`;`) for SQL/PRQL queries; and a
pipe symbol (`|`) for executing a file containing other
commands. For example, to open the file "foo.log" and go
to the tenth line in the file, you can do:
@@ -224,7 +219,7 @@ that you can always use `q` to pop the top view off of the stack.
| o/O | Move forward/backward to the log message with a matching 'operation ID' (opid) field. |
| u/U | Move forward/backward through any user bookmarks you have added using the 'm' key. This hotkey will also jump to the start of any log partitions that have been created with the 'partition-name' command. |
| s/S | Move to the next/previous "slow down" in the log message rate. A slow down is detected by measuring how quickly the message rate has changed over the previous several messages. For example, if one message is logged every second for five seconds and then the last message arrives five seconds later, the last message will be highlighted as a slow down. |
-| {/} | Move to the previous/next location in history. Whenever you jump to a new location in the view, the location will be added to the history. The history is not updated when using only the arrow keys. |
+| {/} | Move to the previous/next section in the view. In the LOG view, this moves through partitions. In other views, it moves through sections of documents. |
### Chronological Navigation
@@ -318,14 +313,14 @@ If you are using Xterm, or a compatible terminal, you can use the mouse to
mark lines of text and move the view by grabbing the scrollbar.
NOTE: You need to manually enable this feature by setting the LNAV_EXP
-environment variable to "mouse". F2 toggles mouse support.
+environment variable to "mouse". `F2` toggles mouse support.
-## SQL Queries (experimental)
+## Log Analysis
Lnav has support for performing SQL queries on log files using the
-Sqlite3 "virtual" table feature. For all supported log file types,
+SQLite3 "virtual" table feature. For all supported log file types,
lnav will create tables that can be queried using the subset of SQL
-that is supported by Sqlite3. For example, to get the top ten URLs
+that is supported by SQLite3. For example, to get the top ten URLs
being accessed in any loaded Apache log files, you can execute:
```lnav
@@ -420,6 +415,37 @@ example of a top ten query into the "/tmp/topten.db" file, you can do:
LIMIT 10;
```
+### PRQL Support
+
+The Pipelined Relational Query Language
+[(PRQL)](https://prql-lang.org) is an alternative database query
+language that compiles to SQL. The main advantage of PRQL,
+in the context of lnav, is that it is easier to work with
+interactively compared to SQL. For example, lnav can provide
+previews of different stages of the pipeline and provide more
+accurate tab-completions for the columns in the result set.
+
+You can execute a PRQL query in the SQL prompt. A PRQL query
+starts with the `from` keyword that specifies the table to use as
+a data source. The next stage of a pipeline is started by entering
+a pipe symbol (`|`) followed by a
+[PRQL transform](https://prql-lang.org/book/reference/stdlib/transforms/index.html).
+As you build the query in the prompt, lnav will display any relevant
+help and preview for the current and previous stages of the pipeline.
+
+Using the top ten URLs query from earlier as an example, the PRQL
+version would be as follows:
+
+```lnav
+;from access_log | stats.count_by cs_uri_stem | take 10
+```
+
+The first stage selects the data source, the web `access_log` table
+in this case. The `stats.count_by` transform is a convenience
+provided by lnav that groups by the given column, counts the rows
+in each group, and sorts by count in descending order. The `take 10`
+turns into the `LIMIT 10`.
+
## Dynamic logline Table (experimental)
(NOTE: This feature is still very new and not completely reliable yet,
diff --git a/src/help_text.cc b/src/help_text.cc
index a409979..a056ed1 100644
--- a/src/help_text.cc
+++ b/src/help_text.cc
@@ -96,10 +96,26 @@ help_text::with_opposites(
return *this;
}
+help_text&
+help_text::with_prql_path(
+ const std::initializer_list<const char*>& prql) noexcept
+{
+ this->ht_prql_path = prql;
+ return *this;
+}
+
+std::multimap<std::string, help_text*>&
+help_text::tag_map()
+{
+ static std::multimap<std::string, help_text*> retval;
+
+ return retval;
+}
+
void
help_text::index_tags()
{
for (const auto& tag : this->ht_tags) {
- TAGGED.insert(std::make_pair(tag, this));
+ tag_map().insert(std::make_pair(tag, this));
}
}
diff --git a/src/help_text.hh b/src/help_text.hh
index 81dc8fb..7b38ec2 100644
--- a/src/help_text.hh
+++ b/src/help_text.hh
@@ -44,6 +44,8 @@ enum class help_context_t {
HC_SQL_INFIX,
HC_SQL_FUNCTION,
HC_SQL_TABLE_VALUED_FUNCTION,
+ HC_PRQL_TRANSFORM,
+ HC_PRQL_FUNCTION,
};
enum class help_function_type_t {
@@ -68,8 +70,14 @@ enum class help_parameter_format_t {
};
struct help_example {
+ enum class language {
+ undefined,
+ prql,
+ };
+
const char* he_description{nullptr};
const char* he_cmd{nullptr};
+ language he_language{language::undefined};
};
struct help_text {
@@ -89,6 +97,8 @@ struct help_text {
std::vector<const char*> ht_tags;
std::vector<const char*> ht_opposites;
help_function_type_t ht_function_type{help_function_type_t::HFT_REGULAR};
+ std::vector<const char*> ht_prql_path;
+ const char* ht_default_value{nullptr};
void* ht_impl{nullptr};
help_text() = default;
@@ -145,6 +155,18 @@ struct help_text {
return *this;
}
+ help_text& prql_transform() noexcept
+ {
+ this->ht_context = help_context_t::HC_PRQL_TRANSFORM;
+ return *this;
+ }
+
+ help_text& prql_function() noexcept
+ {
+ this->ht_context = help_context_t::HC_PRQL_FUNCTION;
+ return *this;
+ }
+
help_text& with_summary(const char* summary) noexcept
{
this->ht_summary = summary;
@@ -177,6 +199,12 @@ struct help_text {
help_text& with_example(const help_example& example) noexcept;
+ help_text& with_default_value(const char* defval)
+ {
+ this->ht_default_value = defval;
+ return *this;
+ }
+
help_text& optional() noexcept
{
this->ht_nargs = help_nargs_t::HN_OPTIONAL;
@@ -210,6 +238,9 @@ struct help_text {
help_text& with_opposites(
const std::initializer_list<const char*>& opps) noexcept;
+ help_text& with_prql_path(
+ const std::initializer_list<const char*>& prql) noexcept;
+
template<typename F>
help_text& with_impl(F impl)
{
@@ -219,7 +250,7 @@ struct help_text {
void index_tags();
- static std::multimap<std::string, help_text*> TAGGED;
+ static std::multimap<std::string, help_text*>& tag_map();
};
#endif
diff --git a/src/help_text_formatter.cc b/src/help_text_formatter.cc
index e0b92a0..5d3b8a2 100644
--- a/src/help_text_formatter.cc
+++ b/src/help_text_formatter.cc
@@ -42,18 +42,17 @@
using namespace lnav::roles::literals;
-std::multimap<std::string, help_text*> help_text::TAGGED;
-
static std::vector<help_text*>
get_related(const help_text& ht)
{
std::vector<help_text*> retval;
for (const auto& tag : ht.ht_tags) {
- auto tagged = help_text::TAGGED.equal_range(tag);
+ auto tagged = help_text::tag_map().equal_range(tag);
for (auto tag_iter = tagged.first; tag_iter != tagged.second;
- ++tag_iter) {
+ ++tag_iter)
+ {
if (tag_iter->second == &ht) {
continue;
}
@@ -349,6 +348,88 @@ format_help_text_for_term(const help_text& ht,
}
break;
}
+ case help_context_t::HC_PRQL_TRANSFORM: {
+ auto line_start = out.al_string.length();
+
+ out.append(";").append(lnav::roles::symbol(ht.ht_name));
+ for (const auto& param : ht.ht_parameters) {
+ out.append(" ");
+ if (param.ht_nargs == help_nargs_t::HN_OPTIONAL) {
+ out.append(lnav::roles::symbol(param.ht_name));
+ out.append(":");
+ if (param.ht_default_value) {
+ out.append(param.ht_default_value);
+ } else {
+ out.append("null");
+ }
+ } else {
+ if (param.ht_group_start) {
+ out.append(param.ht_group_start);
+ }
+ out.append(lnav::roles::variable(param.ht_name));
+ }
+ if (param.ht_nargs == help_nargs_t::HN_ONE_OR_MORE) {
+ out.append("1"_variable);
+ out.append(" [");
+ out.append("..."_variable);
+ out.append(" ");
+ out.append(lnav::roles::variable(param.ht_name));
+ out.append("N"_variable);
+ out.append("]");
+ }
+ if (param.ht_group_end) {
+ out.append(param.ht_group_end);
+ }
+ }
+ out.with_attr(string_attr{
+ line_range{(int) line_start, (int) out.get_string().length()},
+ VC_ROLE.value(role_t::VCR_H3),
+ });
+ if (htc != help_text_content::synopsis) {
+ alb.append("\n")
+ .append(lnav::roles::table_border(
+ repeat("\u2550", tws.tws_width)))
+ .append("\n")
+ .indent(body_indent)
+ .append(attr_line_t::from_ansi_str(ht.ht_summary),
+ &tws.with_indent(body_indent + 2))
+ .append("\n");
+ }
+ break;
+ }
+ case help_context_t::HC_PRQL_FUNCTION: {
+ auto line_start = out.al_string.length();
+
+ out.append(lnav::roles::symbol(ht.ht_name));
+ for (const auto& param : ht.ht_parameters) {
+ out.append(" ");
+ out.append(lnav::roles::variable(param.ht_name));
+ if (param.ht_nargs == help_nargs_t::HN_ONE_OR_MORE) {
+ out.append("1"_variable);
+ out.append(" [");
+ out.append("..."_variable);
+ out.append(" ");
+ out.append(lnav::roles::variable(param.ht_name));
+ out.append("N"_variable);
+ out.append("]");
+ }
+ }
+ out.with_attr(string_attr{
+ line_range{(int) line_start, (int) out.get_string().length()},
+ VC_ROLE.value(role_t::VCR_H3),
+ });
+ if (htc != help_text_content::synopsis) {
+ alb.append("\n")
+ .append(lnav::roles::table_border(
+ repeat("\u2550", tws.tws_width)))
+ .append("\n")
+ .indent(body_indent)
+ .append(attr_line_t::from_ansi_str(ht.ht_summary),
+ &tws.with_indent(body_indent + 2))
+ .append("\n");
+ }
+ break;
+ }
default:
break;
}
@@ -377,6 +458,32 @@ format_help_text_for_term(const help_text& ht,
.append(attr_line_t::from_ansi_str(param.ht_summary),
&(tws.with_indent(2 + max_param_name_width + 3)))
.append("\n");
+ if (!param.ht_enum_values.empty()) {
+ alb.indent(body_indent + max_param_name_width)
+ .append(" ")
+ .append("Values"_h5)
+ .append(": ");
+ auto initial = true;
+ for (const auto* ename : param.ht_enum_values) {
+ if (!initial) {
+ alb.append("|");
+ }
+ alb.append(lnav::roles::symbol(ename));
+ initial = false;
+ }
+ alb.append("\n");
+ }
+ if (!param.ht_parameters.empty()) {
+ for (const auto& sub_param : param.ht_parameters) {
+ alb.indent(body_indent + max_param_name_width + 3)
+ .append(lnav::roles::variable(sub_param.ht_name))
+ .append(" - ")
+ .append(
+ attr_line_t::from_ansi_str(sub_param.ht_summary),
+ &(tws.with_indent(2 + max_param_name_width + 5)))
+ .append("\n");
+ }
+ }
}
}
if (htc == help_text_content::full && !ht.ht_results.empty()) {
@@ -448,7 +555,8 @@ void
format_example_text_for_term(const help_text& ht,
const help_example_to_attr_line_fun_t eval,
size_t width,
- attr_line_t& out)
+ attr_line_t& out,
+ help_example::language lang)
{
if (ht.ht_example.empty()) {
return;
@@ -460,6 +568,10 @@ format_example_text_for_term(const help_text& ht,
out.append(ht.ht_example.size() == 1 ? "Example"_h4 : "Examples"_h4)
.append("\n");
for (const auto& ex : ht.ht_example) {
+ if (ex.he_language != lang) {
+ continue;
+ }
+
attr_line_t ex_line(ex.he_cmd);
const char* prompt = "";
text_wrap_settings tws;
@@ -479,6 +591,8 @@ format_example_text_for_term(const help_text& ht,
case help_context_t::HC_SQL_KEYWORD:
case help_context_t::HC_SQL_FUNCTION:
case help_context_t::HC_SQL_TABLE_VALUED_FUNCTION:
+ case help_context_t::HC_PRQL_TRANSFORM:
+ case help_context_t::HC_PRQL_FUNCTION:
readline_sqlite_highlighter(ex_line, 0);
prompt = ";";
break;
@@ -488,6 +602,8 @@ format_example_text_for_term(const help_text& ht,
ex_line.pad_to(50).with_attr_for_all(
VC_ROLE.value(role_t::VCR_QUOTED_CODE));
+ auto ex_result
+ = eval(ht, ex).with_attr_for_all(SA_PREFORMATTED.value());
alb.append("#")
.append(fmt::to_string(count))
.append(" ")
@@ -498,7 +614,7 @@ format_example_text_for_term(const help_text& ht,
.append(ex_line, &tws.with_indent(3).with_padding_indent(3))
.append("\n")
.indent(3)
- .append(eval(ht, ex), &tws.with_indent(3))
+ .append(ex_result, &tws.with_indent(0))
.append("\n");
count += 1;
@@ -516,7 +632,14 @@ link_name(const help_text& ht)
if (is_sql_infix) {
scrubbed_name = "infix";
} else {
- scrubbed_name = ht.ht_name;
+ if (ht.ht_context == help_context_t::HC_PRQL_TRANSFORM) {
+ scrubbed_name += "prql_";
+ }
+ scrubbed_name += ht.ht_name;
+ if (scrubbed_name[0] == '.') {
+ scrubbed_name.erase(scrubbed_name.begin());
+ scrubbed_name.insert(0, "dot_");
+ }
}
if (ht.ht_function_type == help_function_type_t::HFT_AGGREGATE) {
scrubbed_name += "_agg";
@@ -549,7 +672,7 @@ format_help_text_for_rst(const help_text& ht,
return;
}
- bool is_sql_func = false, is_sql = false;
+ bool is_sql_func = false, is_sql = false, is_prql = false;
switch (ht.ht_context) {
case help_context_t::HC_COMMAND:
prefix = ":";
@@ -567,6 +690,12 @@ format_help_text_for_rst(const help_text& ht,
is_sql = true;
prefix = "";
break;
+ case help_context_t::HC_PRQL_TRANSFORM:
+ case help_context_t::HC_PRQL_FUNCTION:
+ is_sql = true;
+ is_prql = true;
+ prefix = "";
+ break;
default:
prefix = "";
break;
@@ -599,6 +728,11 @@ format_help_text_for_rst(const help_text& ht,
out_count += fmt::fprintf(rst_file, "\\[");
}
out_count += fmt::fprintf(rst_file, "%s", param.ht_name);
+ if (is_prql && param.ht_default_value) {
+ out_count += fmt::fprintf(rst_file, ":");
+ out_count
+ += fmt::fprintf(rst_file, "%s", param.ht_default_value);
+ }
if (param.ht_nargs == help_nargs_t::HN_OPTIONAL) {
out_count += fmt::fprintf(rst_file, "\\]");
}
@@ -616,6 +750,13 @@ format_help_text_for_rst(const help_text& ht,
fmt::fprintf(rst_file, " %s\n", ht.ht_summary);
fmt::fprintf(rst_file, "\n");
+
+ if (!ht.ht_prql_path.empty()) {
+ fmt::print(rst_file,
+ FMT_STRING(" **PRQL Name**: {}\n\n"),
+ fmt::join(ht.ht_prql_path, "."));
+ }
+
if (ht.ht_description != nullptr) {
fmt::fprintf(rst_file, " %s\n", ht.ht_description);
}
@@ -637,6 +778,20 @@ format_help_text_for_rst(const help_text& ht,
param.ht_name,
param.ht_nargs == help_nargs_t::HN_REQUIRED ? "\\*" : "",
param.ht_summary);
+
+ if (!param.ht_parameters.empty()) {
+ fprintf(rst_file, "\n");
+ for (const auto& sub_param : param.ht_parameters) {
+ fmt::fprintf(
+ rst_file,
+ " * **%s%s** --- %s\n",
+ sub_param.ht_name,
+ sub_param.ht_nargs == help_nargs_t::HN_REQUIRED
+ ? "\\*"
+ : "",
+ sub_param.ht_summary);
+ }
+ }
}
}
fmt::fprintf(rst_file, "\n");
diff --git a/src/help_text_formatter.hh b/src/help_text_formatter.hh
index 2963695..677d579 100644
--- a/src/help_text_formatter.hh
+++ b/src/help_text_formatter.hh
@@ -52,7 +52,9 @@ void format_help_text_for_term(const help_text& ht,
void format_example_text_for_term(const help_text& ht,
help_example_to_attr_line_fun_t eval,
size_t width,
- attr_line_t& out);
+ attr_line_t& out,
+ help_example::language lang
+ = help_example::language::undefined);
void format_help_text_for_rst(const help_text& ht,
help_example_to_attr_line_fun_t eval,
diff --git a/src/highlighter.cc b/src/highlighter.cc
index fc7b455..a8291cd 100644
--- a/src/highlighter.cc
+++ b/src/highlighter.cc
@@ -30,6 +30,8 @@
#include "highlighter.hh"
#include "config.h"
+#include "pcrepp/pcre2pp.hh"
+#include "view_curses.hh"
highlighter&
highlighter::operator=(const highlighter& other)
diff --git a/src/highlighter.hh b/src/highlighter.hh
index 25e8087..2b8c72c 100644
--- a/src/highlighter.hh
+++ b/src/highlighter.hh
@@ -35,10 +35,10 @@
#include <set>
#include <utility>
-#include "optional.hpp"
-#include "pcrepp/pcre2pp.hh"
+#include "base/attr_line.hh"
+#include "pcrepp/pcre2pp_fwd.hh"
+#include "styling.hh"
#include "text_format.hh"
-#include "view_curses.hh"
struct highlighter {
highlighter() = default;
diff --git a/src/hist_source.cc b/src/hist_source.cc
index f48ccc1..9881916 100644
--- a/src/hist_source.cc
+++ b/src/hist_source.cc
@@ -67,9 +67,13 @@ hist_source2::text_value_for_line(textview_curses& tc,
std::string& value_out,
text_sub_source::line_flags_t flags)
{
- bucket_t& bucket = this->find_bucket(row);
+ auto& bucket = this->find_bucket(row);
struct tm bucket_tm;
+ if (this->hs_needs_flush) {
+ this->end_of_row();
+ }
+
value_out.clear();
if (gmtime_r(&bucket.b_time, &bucket_tm) != nullptr) {
fmt::format_to(std::back_inserter(value_out),
@@ -92,16 +96,24 @@ hist_source2::text_attrs_for_line(textview_curses& tc,
int row,
string_attrs_t& value_out)
{
- bucket_t& bucket = this->find_bucket(row);
+ auto& bucket = this->find_bucket(row);
+ auto dim = tc.get_dimensions();
+ auto width = dim.second;
int left = 0;
for (int lpc = 0; lpc < HT__MAX; lpc++) {
this->hs_chart.chart_attrs_for_value(tc,
left,
+ width,
(const hist_type_t) lpc,
bucket.b_values[lpc].hv_value,
value_out);
}
+ auto alt_row_index = row % 4;
+ if (alt_row_index == 2 || alt_row_index == 3) {
+ value_out.emplace_back(line_range{0, -1},
+ VC_ROLE.value(role_t::VCR_ALT_ROW));
+ }
}
void
@@ -109,11 +121,7 @@ hist_source2::add_value(time_t row,
hist_source2::hist_type_t htype,
double value)
{
- if (row < this->hs_last_row) {
- log_error("time mismatch %ld %ld", row, this->hs_last_row);
- }
-
- require(row >= this->hs_last_row);
+ require_ge(row, this->hs_last_row);
row = rounddown(row, this->hs_time_slice);
if (row != this->hs_last_row) {
@@ -126,14 +134,16 @@ hist_source2::add_value(time_t row,
auto& bucket = this->find_bucket(this->hs_last_bucket);
bucket.b_time = row;
bucket.b_values[htype].hv_value += value;
+
+ this->hs_needs_flush = true;
}
void
hist_source2::init()
{
- view_colors& vc = view_colors::singleton();
+ auto& vc = view_colors::singleton();
- this->hs_chart
+ this->hs_chart.with_show_state(stacked_bar_chart_base::show_all{})
.with_attrs_for_ident(HT_NORMAL, vc.attrs_for_role(role_t::VCR_TEXT))
.with_attrs_for_ident(HT_WARNING,
vc.attrs_for_role(role_t::VCR_WARNING))
@@ -156,16 +166,17 @@ void
hist_source2::end_of_row()
{
if (this->hs_last_bucket >= 0) {
- bucket_t& last_bucket = this->find_bucket(this->hs_last_bucket);
+ auto& last_bucket = this->find_bucket(this->hs_last_bucket);
for (int lpc = 0; lpc < HT__MAX; lpc++) {
this->hs_chart.add_value((const hist_type_t) lpc,
last_bucket.b_values[lpc].hv_value);
}
+ this->hs_chart.next_row();
}
}
-nonstd::optional<struct timeval>
+nonstd::optional<text_time_translator::row_info>
hist_source2::time_for_row(vis_line_t row)
{
if (row < 0 || row > this->hs_line_count) {
@@ -174,7 +185,7 @@ hist_source2::time_for_row(vis_line_t row)
bucket_t& bucket = this->find_bucket(row);
- return timeval{bucket.b_time, 0};
+ return row_info{timeval{bucket.b_time, 0}, row};
}
hist_source2::bucket_t&
diff --git a/src/hist_source.hh b/src/hist_source.hh
index a6399ad..81245af 100644
--- a/src/hist_source.hh
+++ b/src/hist_source.hh
@@ -92,7 +92,14 @@ public:
return *this;
}
- bool attrs_in_use(const text_attrs& attrs) const {
+ stacked_bar_chart& with_show_state(show_state ss)
+ {
+ this->sbc_show_state = ss;
+ return *this;
+ }
+
+ bool attrs_in_use(const text_attrs& attrs) const
+ {
for (const auto& ident : this->sbc_idents) {
if (ident.ci_attrs == attrs) {
return true;
@@ -168,6 +175,7 @@ public:
void chart_attrs_for_value(const listview_curses& lc,
int& left,
+ unsigned long width,
const T& ident,
double value,
string_attrs_t& value_out) const
@@ -177,10 +185,9 @@ public:
require(ident_iter != this->sbc_ident_lookup.end());
size_t ident_index = ident_iter->second;
- unsigned long width, avail_width;
+ unsigned long avail_width;
bucket_stats_t overall_stats;
struct line_range lr;
- vis_line_t height;
lr.lr_unit = line_range::unit::codepoint;
@@ -193,30 +200,41 @@ public:
return;
}
- lc.get_dimensions(height, width);
-
for (size_t lpc = 0; lpc < this->sbc_idents.size(); lpc++) {
if (this->sbc_show_state.template is<show_all>()
|| lpc == (size_t) ident_to_show)
{
- overall_stats.merge(this->sbc_idents[lpc].ci_stats,
- this->sbc_do_stacking);
+ overall_stats.merge(this->sbc_idents[lpc].ci_stats);
}
}
+ if (this->sbc_max_row_value > overall_stats.bs_max_value) {
+ overall_stats.bs_max_value = this->sbc_max_row_value;
+ }
+ if (this->sbc_row_sum > overall_stats.bs_max_value) {
+ overall_stats.bs_max_value = this->sbc_row_sum;
+ }
if (this->sbc_show_state.template is<show_all>()) {
- avail_width = width - this->sbc_idents.size();
+ if (this->sbc_idents.size() == 1) {
+ avail_width = width;
+ } else if (width < this->sbc_max_row_items) {
+ avail_width = 0;
+ } else {
+ avail_width = width;
+ }
} else {
avail_width = width - 1;
}
- avail_width -= this->sbc_left + this->sbc_right;
+ if (avail_width > (this->sbc_left + this->sbc_right)) {
+ avail_width -= this->sbc_left + this->sbc_right;
+ }
lr.lr_start = left;
const auto& ci = this->sbc_idents[ident_index];
int amount;
- if (value == 0.0) {
+ if (value == 0.0 || avail_width < 0) {
amount = 0;
} else if ((overall_stats.bs_max_value - 0.01) <= value
&& value <= (overall_stats.bs_max_value + 0.01))
@@ -228,6 +246,7 @@ public:
amount = (int) rint(percent * avail_width);
amount = std::max(1, amount);
}
+ require_ge(amount, 0);
lr.lr_end = left = lr.lr_start + amount;
if (!ci.ci_attrs.empty() && !lr.empty()) {
@@ -241,13 +260,35 @@ public:
{
this->sbc_idents.clear();
this->sbc_ident_lookup.clear();
- this->sbc_show_state = show_all();
+ this->sbc_show_state = show_none();
+ this->sbc_row_sum = 0;
+ this->sbc_row_items = 0;
+ this->sbc_max_row_value = 0;
+ this->sbc_max_row_items = 0;
}
void add_value(const T& ident, double amount = 1.0)
{
struct chart_ident& ci = this->find_ident(ident);
ci.ci_stats.update(amount);
+ this->sbc_row_sum += amount;
+ if (ci.ci_last_seen_row != this->sbc_row_counter) {
+ ci.ci_last_seen_row = this->sbc_row_counter;
+ this->sbc_row_items += 1;
+ }
+ }
+
+ void next_row()
+ {
+ if (this->sbc_row_sum > this->sbc_max_row_value) {
+ this->sbc_max_row_value = this->sbc_row_sum;
+ }
+ if (this->sbc_row_items > this->sbc_max_row_items) {
+ this->sbc_max_row_items = this->sbc_row_items;
+ }
+ this->sbc_row_sum = 0;
+ this->sbc_row_items = 0;
+ this->sbc_row_counter += 1;
}
struct bucket_stats_t {
@@ -256,15 +297,10 @@ public:
{
}
- void merge(const bucket_stats_t& rhs, bool do_stacking)
+ void merge(const bucket_stats_t& rhs)
{
this->bs_min_value = std::min(this->bs_min_value, rhs.bs_min_value);
- if (do_stacking) {
- this->bs_max_value += rhs.bs_max_value;
- } else {
- this->bs_max_value
- = std::max(this->bs_max_value, rhs.bs_max_value);
- }
+ this->bs_max_value = std::max(this->bs_max_value, rhs.bs_max_value);
}
double width() const
@@ -296,6 +332,7 @@ protected:
T ci_ident;
text_attrs ci_attrs;
bucket_stats_t ci_stats;
+ ssize_t ci_last_seen_row{-1};
};
struct chart_ident& find_ident(const T& ident)
@@ -313,7 +350,13 @@ protected:
unsigned long sbc_left{0}, sbc_right{0};
std::vector<struct chart_ident> sbc_idents;
std::unordered_map<T, unsigned int> sbc_ident_lookup;
- show_state sbc_show_state{show_all()};
+ show_state sbc_show_state{show_none()};
+
+ ssize_t sbc_row_counter{0};
+ double sbc_row_sum{0};
+ size_t sbc_row_items{0};
+ double sbc_max_row_value{0};
+ size_t sbc_max_row_items{0};
};
class hist_source2
@@ -368,7 +411,7 @@ public:
return 0;
}
- nonstd::optional<struct timeval> time_for_row(vis_line_t row) override;
+ nonstd::optional<row_info> time_for_row(vis_line_t row) override;
nonstd::optional<vis_line_t> row_for_time(
struct timeval tv_bucket) override;
@@ -403,6 +446,7 @@ private:
time_t hs_last_row;
std::map<int64_t, struct bucket_block> hs_blocks;
stacked_bar_chart<hist_type_t> hs_chart;
+ bool hs_needs_flush{false};
};
#endif
diff --git a/src/hotkeys.cc b/src/hotkeys.cc
index dd3af90..742998f 100644
--- a/src/hotkeys.cc
+++ b/src/hotkeys.cc
@@ -38,18 +38,12 @@
#include "bound_tags.hh"
#include "command_executor.hh"
#include "config.h"
-#include "environ_vtab.hh"
#include "field_overlay_source.hh"
#include "lnav.hh"
#include "lnav_config.hh"
-#include "lnav_util.hh"
-#include "log_data_helper.hh"
-#include "plain_text_source.hh"
-#include "readline_highlighters.hh"
#include "shlex.hh"
#include "sql_util.hh"
-#include "sysclip.hh"
-#include "termios_guard.hh"
+#include "sqlitepp.client.hh"
#include "xterm_mouse.hh"
using namespace lnav::roles::literals;
@@ -151,8 +145,7 @@ key_sql_callback(exec_context& ec, sqlite3_stmt* stmt)
bool
handle_keyseq(const char* keyseq)
{
- key_map& km = lnav_config.lc_active_keymap;
-
+ const auto& km = lnav_config.lc_active_keymap;
const auto& iter = km.km_seq_to_cmd.find(keyseq);
if (iter == km.km_seq_to_cmd.end()) {
return false;
@@ -162,16 +155,23 @@ handle_keyseq(const char* keyseq)
exec_context ec(&values, key_sql_callback, pipe_callback);
auto& var_stack = ec.ec_local_vars;
+ ec.ec_label_source_stack.push_back(&lnav_data.ld_db_row_source);
ec.ec_global_vars = lnav_data.ld_exec_context.ec_global_vars;
ec.ec_error_callback_stack
= lnav_data.ld_exec_context.ec_error_callback_stack;
var_stack.push(std::map<std::string, scoped_value_t>());
+ // XXX push another so it doesn't look like interactive use
+ var_stack.push(std::map<std::string, scoped_value_t>());
auto& vars = var_stack.top();
vars["keyseq"] = keyseq;
const auto& kc = iter->second;
- log_debug("executing key sequence %s: %s", keyseq, kc.kc_cmd.c_str());
- auto result = execute_any(ec, kc.kc_cmd);
+ log_debug(
+ "executing key sequence %s: %s", keyseq, kc.kc_cmd.pp_value.c_str());
+ auto sg = ec.enter_source(kc.kc_cmd.pp_location.sl_source,
+ kc.kc_cmd.pp_location.sl_line_number,
+ kc.kc_cmd.pp_value);
+ auto result = execute_any(ec, kc.kc_cmd.pp_value);
if (result.isOk()) {
lnav_data.ld_rl_view->set_value(result.unwrap());
} else {
@@ -198,7 +198,7 @@ handle_keyseq(const char* keyseq)
}
bool
-handle_paging_key(int ch)
+handle_paging_key(int ch, const char* keyseq)
{
if (lnav_data.ld_view_stack.empty()) {
return false;
@@ -206,12 +206,16 @@ handle_paging_key(int ch)
textview_curses* tc = *lnav_data.ld_view_stack.top();
exec_context& ec = lnav_data.ld_exec_context;
- logfile_sub_source* lss = nullptr;
text_sub_source* tc_tss = tc->get_sub_source();
bookmarks<vis_line_t>::type& bm = tc->get_bookmarks();
- auto keyseq = fmt::format(FMT_STRING("x{:02x}"), ch);
- if (handle_keyseq(keyseq.c_str())) {
+ if (tc->get_overlay_selection()) {
+ if (tc->handle_key(ch)) {
+ return true;
+ }
+ }
+
+ if (handle_keyseq(keyseq)) {
return true;
}
@@ -219,7 +223,8 @@ handle_paging_key(int ch)
return true;
}
- lss = dynamic_cast<logfile_sub_source*>(tc->get_sub_source());
+ auto lss = dynamic_cast<logfile_sub_source*>(tc->get_sub_source());
+ auto text_accel_p = dynamic_cast<text_accel_source*>(tc->get_sub_source());
/* process the command keystroke */
switch (ch) {
@@ -252,8 +257,8 @@ handle_paging_key(int ch)
lnav_data.ld_last_view = nullptr;
if (src_view != nullptr && dst_view != nullptr) {
src_view->time_for_row(top_tc->get_selection()) |
- [dst_view, tc](auto top_time) {
- dst_view->row_for_time(top_time) |
+ [dst_view, tc](auto top_ri) {
+ dst_view->row_for_time(top_ri.ri_time) |
[tc](auto row) { tc->set_selection(row); };
};
}
@@ -265,16 +270,27 @@ handle_paging_key(int ch)
if (xterm_mouse::is_available()) {
auto& mouse_i = injector::get<xterm_mouse&>();
mouse_i.set_enabled(!mouse_i.is_enabled());
- auto um = lnav::console::user_message::ok(
- attr_line_t("mouse mode -- ")
- .append(mouse_i.is_enabled() ? "enabled"_symbol
- : "disabled"_symbol));
+
+ auto al = attr_line_t("mouse mode -- ")
+ .append(mouse_i.is_enabled() ? "enabled"_symbol
+ : "disabled"_symbol);
+ if (mouse_i.is_enabled()
+ && lnav_config.lc_mouse_mode == lnav_mouse_mode::disabled)
+ {
+ al.append(" -- enable permanently with ")
+ .append(":config /ui/mouse/mode enabled"_quoted_code);
+
+ auto clear_note = prepare_stmt(lnav_data.ld_db, R"(
+DELETE FROM lnav_user_notifications WHERE id = 'org.lnav.mouse-support'
+)");
+ clear_note.unwrap().execute();
+ }
+ auto um = lnav::console::user_message::ok(al);
lnav_data.ld_rl_view->set_attr_value(um.to_attr_line());
} else {
lnav_data.ld_rl_view->set_value(
"error: mouse support is not available, make sure your "
- "TERM is set to "
- "xterm or xterm-256color");
+ "TERM is set to xterm or xterm-256color");
}
break;
@@ -303,7 +319,8 @@ handle_paging_key(int ch)
} else {
alerter::singleton().chime("no more search hits to the right");
}
- } break;
+ break;
+ }
case '<':
if (tc->get_left() == 0) {
@@ -377,36 +394,45 @@ handle_paging_key(int ch)
break;
case 'J':
- if (lnav_data.ld_last_user_mark.find(tc)
- == lnav_data.ld_last_user_mark.end()
- || !tc->is_line_visible(
- vis_line_t(lnav_data.ld_last_user_mark[tc])))
- {
- lnav_data.ld_select_start[tc] = tc->get_selection();
- lnav_data.ld_last_user_mark[tc] = tc->get_selection();
- } else {
- vis_line_t height;
- unsigned long width;
-
- tc->get_dimensions(height, width);
- if (lnav_data.ld_last_user_mark[tc] > (tc->get_bottom() - 2)
- && tc->get_selection() + height < tc->get_inner_height())
- {
- tc->shift_top(1_vl);
+ if (tc->is_selectable()) {
+ if (tc->get_selection() >= 0_vl) {
+ tc->toggle_user_mark(&textview_curses::BM_USER,
+ tc->get_selection());
+ lnav_data.ld_select_start[tc] = tc->get_selection();
+ lnav_data.ld_last_user_mark[tc] = tc->get_selection();
+ if (tc->get_selection() + 1_vl < tc->get_inner_height()) {
+ tc->set_selection(tc->get_selection() + 1_vl);
+ }
}
- if (lnav_data.ld_last_user_mark[tc] + 1
- >= tc->get_inner_height())
+ } else {
+ if (lnav_data.ld_last_user_mark.find(tc)
+ == lnav_data.ld_last_user_mark.end()
+ || !tc->is_line_visible(
+ vis_line_t(lnav_data.ld_last_user_mark[tc])))
{
- break;
+ lnav_data.ld_select_start[tc] = tc->get_selection();
+ lnav_data.ld_last_user_mark[tc] = tc->get_selection();
+ } else {
+ vis_line_t height;
+ unsigned long width;
+
+ tc->get_dimensions(height, width);
+ if (lnav_data.ld_last_user_mark[tc] > (tc->get_bottom() - 2)
+ && tc->get_selection() + height
+ < tc->get_inner_height())
+ {
+ tc->shift_top(1_vl);
+ }
+ if (lnav_data.ld_last_user_mark[tc] + 1
+ >= tc->get_inner_height())
+ {
+ break;
+ }
+ lnav_data.ld_last_user_mark[tc] += 1;
}
- lnav_data.ld_last_user_mark[tc] += 1;
- }
- tc->toggle_user_mark(&textview_curses::BM_USER,
- vis_line_t(lnav_data.ld_last_user_mark[tc]));
- if (tc->is_selectable()
- && tc->get_selection() + 1_vl < tc->get_inner_height())
- {
- tc->set_selection(tc->get_selection() + 1_vl);
+ tc->toggle_user_mark(
+ &textview_curses::BM_USER,
+ vis_line_t(lnav_data.ld_last_user_mark[tc]));
}
tc->reload_data();
@@ -485,20 +511,28 @@ handle_paging_key(int ch)
#endif
case 's':
- if (lss) {
- auto next_top = tc->get_selection() + 2_vl;
+ if (text_accel_p && text_accel_p->is_time_offset_supported()) {
+ auto next_top = tc->get_selection() + 1_vl;
+
+ if (!tc->is_selectable()) {
+ next_top += 1_vl;
+ }
- if (!lss->is_time_offset_enabled()) {
+ if (!text_accel_p->is_time_offset_enabled()) {
lnav_data.ld_rl_view->set_alt_value(
HELP_MSG_1(T, "to disable elapsed-time mode"));
}
- lss->set_time_offset(true);
+ text_accel_p->set_time_offset(true);
while (next_top < tc->get_inner_height()) {
- if (!lss->find_line(lss->at(next_top))->is_message()) {
- } else if (lss->get_line_accel_direction(next_top)
+ if (!text_accel_p->text_accel_get_line(next_top)
+ ->is_message())
+ {
+ } else if (text_accel_p->get_line_accel_direction(next_top)
== log_accel::A_DECEL)
{
- --next_top;
+ if (!tc->is_selectable()) {
+ --next_top;
+ }
tc->set_selection(next_top);
break;
}
@@ -509,20 +543,27 @@ handle_paging_key(int ch)
break;
case 'S':
- if (lss) {
+ if (text_accel_p && text_accel_p->is_time_offset_supported()) {
auto next_top = tc->get_selection();
- if (!lss->is_time_offset_enabled()) {
+ if (tc->is_selectable() && next_top > 0_vl) {
+ next_top -= 1_vl;
+ }
+ if (!text_accel_p->is_time_offset_enabled()) {
lnav_data.ld_rl_view->set_alt_value(
HELP_MSG_1(T, "to disable elapsed-time mode"));
}
- lss->set_time_offset(true);
+ text_accel_p->set_time_offset(true);
while (0 <= next_top && next_top < tc->get_inner_height()) {
- if (!lss->find_line(lss->at(next_top))->is_message()) {
- } else if (lss->get_line_accel_direction(next_top)
+ if (!text_accel_p->text_accel_get_line(next_top)
+ ->is_message())
+ {
+ } else if (text_accel_p->get_line_accel_direction(next_top)
== log_accel::A_DECEL)
{
- --next_top;
+ if (!tc->is_selectable()) {
+ --next_top;
+ }
tc->set_selection(next_top);
break;
}
@@ -552,9 +593,9 @@ handle_paging_key(int ch)
if (lss) {
const int step = 24 * 60 * 60;
lss->time_for_row(tc->get_selection()) |
- [lss, tc](auto first_time) {
+ [lss, tc](auto first_ri) {
lss->find_from_time(
- roundup_size(first_time.tv_sec, step))
+ roundup_size(first_ri.ri_time.tv_sec, step))
| [tc](auto line) { tc->set_selection(line); };
};
}
@@ -563,8 +604,9 @@ handle_paging_key(int ch)
case ')':
if (lss) {
lss->time_for_row(tc->get_selection()) |
- [lss, tc](auto first_time) {
- time_t day = rounddown(first_time.tv_sec, 24 * 60 * 60);
+ [lss, tc](auto first_ri) {
+ time_t day
+ = rounddown(first_ri.ri_time.tv_sec, 24 * 60 * 60);
lss->find_from_time(day) | [tc](auto line) {
if (line != 0_vl) {
--line;
@@ -581,9 +623,9 @@ handle_paging_key(int ch)
"the top of the log has been reached");
} else if (lss) {
lss->time_for_row(tc->get_selection()) |
- [lss, ch, tc](auto first_time) {
+ [lss, ch, tc](auto first_ri) {
int step = ch == 'D' ? (24 * 60 * 60) : (60 * 60);
- time_t top_time = first_time.tv_sec;
+ time_t top_time = first_ri.ri_time.tv_sec;
lss->find_from_time(top_time - step) | [tc](auto line) {
if (line != 0_vl) {
--line;
@@ -599,9 +641,9 @@ handle_paging_key(int ch)
case 'd':
if (lss) {
lss->time_for_row(tc->get_selection()) |
- [ch, lss, tc](auto first_time) {
+ [ch, lss, tc](auto first_ri) {
int step = ch == 'd' ? (24 * 60 * 60) : (60 * 60);
- lss->find_from_time(first_time.tv_sec + step) |
+ lss->find_from_time(first_ri.ri_time.tv_sec + step) |
[tc](auto line) { tc->set_selection(line); };
};
@@ -618,9 +660,9 @@ handle_paging_key(int ch)
auto& start_line = start_helper.move_to_msg_start();
start_helper.annotate();
- struct line_range opid_range = find_string_attr_range(
- start_helper.lh_string_attrs, &logline::L_OPID);
- if (!opid_range.is_valid()) {
+ const auto& opid_opt
+ = start_helper.lh_line_values.lvv_opid_value;
+ if (!opid_opt) {
alerter::singleton().chime(
"Log message does not contain an opid");
lnav_data.ld_rl_view->set_attr_value(
@@ -654,19 +696,10 @@ handle_paging_key(int ch)
continue;
}
next_helper.annotate();
- struct line_range opid_next_range
- = find_string_attr_range(
- next_helper.lh_string_attrs, &logline::L_OPID);
- const char* start_opid
- = start_helper.lh_line_values.lvv_sbr.get_data_at(
- opid_range.lr_start);
- const char* next_opid
- = next_helper.lh_line_values.lvv_sbr.get_data_at(
- opid_next_range.lr_start);
- if (opid_range.length() != opid_next_range.length()
- || memcmp(
- start_opid, next_opid, opid_range.length())
- != 0)
+ const auto& next_opid_opt
+ = next_helper.lh_line_values.lvv_opid_value;
+ if (next_opid_opt
+ && opid_opt.value() != next_opid_opt.value())
{
continue;
}
@@ -677,14 +710,12 @@ handle_paging_key(int ch)
lnav_data.ld_rl_view->set_value("");
tc->set_selection(next_helper.lh_current_line);
} else {
- const auto opid_str
- = start_helper.to_string(opid_range);
-
lnav_data.ld_rl_view->set_attr_value(
lnav::console::user_message::error(
attr_line_t(
"No more messages found with opid: ")
- .append(lnav::roles::symbol(opid_str)))
+ .append(
+ lnav::roles::symbol(opid_opt.value())))
.to_attr_line());
alerter::singleton().chime(
"no more messages found with opid");
@@ -693,24 +724,6 @@ handle_paging_key(int ch)
}
break;
- case 'p':
- if (tc == &lnav_data.ld_views[LNV_LOG]) {
- auto* fos = dynamic_cast<field_overlay_source*>(
- tc->get_overlay_source());
- auto& top_context = fos->fos_contexts.top();
- top_context.c_show = !top_context.c_show;
- tc->set_sync_selection_and_top(top_context.c_show);
- tc->set_needs_update();
- } else if (tc == &lnav_data.ld_views[LNV_DB]) {
- auto* dos = dynamic_cast<db_overlay_source*>(
- tc->get_overlay_source());
-
- dos->dos_active = !dos->dos_active;
- tc->set_sync_selection_and_top(dos->dos_active);
- tc->set_needs_update();
- }
- break;
-
case 't':
if (lnav_data.ld_text_source.current_file() == nullptr) {
alerter::singleton().chime("No text files loaded");
@@ -723,15 +736,6 @@ handle_paging_key(int ch)
}
break;
- case 'T':
- lnav_data.ld_log_source.toggle_time_offset();
- if (lss && lss->is_time_offset_enabled()) {
- lnav_data.ld_rl_view->set_alt_value(HELP_MSG_2(
- s, S, "to move forward/backward through slow downs"));
- }
- tc->reload_data();
- break;
-
case 'I': {
auto& hist_tc = lnav_data.ld_views[LNV_HISTOGRAM];
@@ -741,12 +745,13 @@ handle_paging_key(int ch)
if (src_view != nullptr) {
src_view->time_for_row(tc->get_selection()) |
- [](auto log_top) {
- lnav_data.ld_hist_source2.row_for_time(log_top) |
- [](auto row) {
- lnav_data.ld_views[LNV_HISTOGRAM]
- .set_selection(row);
- };
+ [](auto log_top_ri) {
+ lnav_data.ld_hist_source2.row_for_time(
+ log_top_ri.ri_time)
+ | [](auto row) {
+ lnav_data.ld_views[LNV_HISTOGRAM]
+ .set_selection(row);
+ };
};
}
} else {
@@ -761,10 +766,10 @@ handle_paging_key(int ch)
auto curr_top_time_opt
= dst_view->time_for_row(top_tc->get_selection());
if (hist_top_time_opt && curr_top_time_opt
- && hs.row_for_time(hist_top_time_opt.value())
- != hs.row_for_time(curr_top_time_opt.value()))
+ && hs.row_for_time(hist_top_time_opt->ri_time)
+ != hs.row_for_time(curr_top_time_opt->ri_time))
{
- dst_view->row_for_time(hist_top_time_opt.value()) |
+ dst_view->row_for_time(hist_top_time_opt->ri_time) |
[top_tc](auto new_top) {
top_tc->set_selection(new_top);
top_tc->set_needs_update();
@@ -855,28 +860,6 @@ handle_paging_key(int ch)
case '\t':
case KEY_BTAB:
if (tc == &lnav_data.ld_views[LNV_DB]) {
- auto& chart = lnav_data.ld_db_row_source.dls_chart;
- const auto& state = chart.show_next_ident(
- ch == '\t' ? stacked_bar_chart_base::direction::forward
- : stacked_bar_chart_base::direction::backward);
-
- state.match(
- [&](stacked_bar_chart_base::show_none) {
- lnav_data.ld_rl_view->set_value("Graphing no values");
- },
- [&](stacked_bar_chart_base::show_all) {
- lnav_data.ld_rl_view->set_value("Graphing all values");
- },
- [&](stacked_bar_chart_base::show_one) {
- std::string colname;
-
- chart.get_ident_to_show(colname);
- lnav_data.ld_rl_view->set_value(
- "Graphing column " ANSI_BOLD_START + colname
- + ANSI_NORM);
- });
-
- tc->reload_data();
} else if (tc == &lnav_data.ld_views[LNV_SPECTRO]) {
lnav_data.ld_mode = ln_mode_t::SPECTRO_DETAILS;
} else if (tc_tss != nullptr && tc_tss->tss_supports_filtering) {
@@ -909,15 +892,6 @@ handle_paging_key(int ch)
}
break;
- case 'x':
- if (tc->toggle_hide_fields()) {
- lnav_data.ld_rl_view->set_value("Showing hidden fields");
- } else {
- lnav_data.ld_rl_view->set_value("Hiding hidden fields");
- }
- tc->set_needs_update();
- break;
-
case 'r':
case 'R':
if (lss != nullptr) {
@@ -963,20 +937,13 @@ handle_paging_key(int ch)
done = true;
}
} while (!done);
- tc->set_top(vl);
+ tc->set_selection(vl);
lnav_data.ld_rl_view->set_value(" " + rt.to_string());
}
}
break;
- case KEY_CTRL_W:
- execute_command(ec,
- lnav_data.ld_views[LNV_LOG].get_word_wrap()
- ? "disable-word-wrap"
- : "enable-word-wrap");
- break;
-
- case KEY_CTRL_P:
+ case KEY_CTRL('p'):
lnav_data.ld_preview_hidden = !lnav_data.ld_preview_hidden;
break;
diff --git a/src/hotkeys.hh b/src/hotkeys.hh
index 3bbe060..97b031c 100644
--- a/src/hotkeys.hh
+++ b/src/hotkeys.hh
@@ -31,6 +31,6 @@
#define LNAV_HOTKEYS_H
bool handle_keyseq(const char* keyseq);
-bool handle_paging_key(int ch);
+bool handle_paging_key(int ch, const char* keyseq);
#endif // LNAV_HOTKEYS_H
diff --git a/src/init.sql b/src/init.sql
index ef75775..f504209 100644
--- a/src/init.sql
+++ b/src/init.sql
@@ -69,9 +69,9 @@ INSERT INTO http_status_codes VALUES (511, 'Network Authentication Required');
CREATE TABLE lnav_example_log
(
log_line INTEGER PRIMARY KEY,
- log_part TEXT collate naturalnocase,
- log_time datetime,
- log_actual_time datetime hidden,
+ log_part TEXT COLLATE naturalnocase,
+ log_time DATETIME,
+ log_actual_time DATETIME hidden,
log_idle_msecs int,
log_level TEXT collate loglevel,
log_mark boolean,
@@ -94,17 +94,17 @@ FROM lnav_views
WHERE name = (SELECT name FROM lnav_view_stack ORDER BY rowid DESC LIMIT 1);
INSERT INTO lnav_example_log
-VALUES (0, null, '2017-02-03T04:05:06.100', '2017-02-03T04:05:06.100', 0,
- 'info', 0, null, null, null, 'hw', 2, 1486094706000, '/tmp/log',
+VALUES (0, NULL, '2017-02-03T04:05:06.100', '2017-02-03T04:05:06.100', 0,
+ 'info', 0, NULL, NULL, NULL, 'hw', 2, 1486094706000, '/tmp/log',
'2017-02-03T04:05:06.100 hw(2): Hello, World!', 'Hello, World!'),
- (1, null, '2017-02-03T04:05:06.200', '2017-02-03T04:05:06.200', 100,
- 'error', 0, null, null, null, 'gw', 4, 1486094706000, '/tmp/log',
+ (1, NULL, '2017-02-03T04:05:06.200', '2017-02-03T04:05:06.200', 100,
+ 'error', 0, NULL, NULL, NULL, 'gw', 4, 1486094706000, '/tmp/log',
'2017-02-03T04:05:06.200 gw(4): Goodbye, World!', 'Goodbye, World!'),
(2, 'new', '2017-02-03T04:25:06.200', '2017-02-03T04:25:06.200', 1200000,
- 'warn', 0, null, null, null, 'gw', 1, 1486095906000, '/tmp/log',
+ 'warn', 0, NULL, NULL, NULL, 'gw', 1, 1486095906000, '/tmp/log',
'2017-02-03T04:25:06.200 gw(1): Goodbye, World!', 'Goodbye, World!'),
(3, 'new', '2017-02-03T04:55:06.200', '2017-02-03T04:55:06.200', 1800000,
- 'debug', 0, null, null, null, 'gw', 10, 1486097706000, '/tmp/log',
+ 'debug', 0, NULL, NULL, NULL, 'gw', 10, 1486097706000, '/tmp/log',
'2017-02-03T04:55:06.200 gw(10): Goodbye, World!', 'Goodbye, World!');
CREATE TABLE lnav_user_notifications
@@ -128,8 +128,8 @@ CREATE TABLE lnav_user_notifications
);
INSERT INTO lnav_user_notifications (id, priority, expiration, message)
-VALUES ('org.lnav.breadcrumb.focus', -1, datetime('now', '+1 minute'),
- 'Press ENTER to focus on the breadcrumb bar');
+VALUES ('org.lnav.breadcrumb.focus', -1, DATETIME('now', '+2 minute'),
+ 'Press <span class="-lnav_status-styles_hotkey">${org.lnav.key.breadcrumb.focus}</span> to focus on the breadcrumb bar');
CREATE TABLE lnav_views_echo AS
SELECT name, top, "left", height, inner_height, top_time, search
diff --git a/src/input_dispatcher.cc b/src/input_dispatcher.cc
index 62c1f40..7df19aa 100644
--- a/src/input_dispatcher.cc
+++ b/src/input_dispatcher.cc
@@ -100,9 +100,14 @@ input_dispatcher::new_input(const struct timeval& current_time, int ch)
switch (this->id_escape_matcher(keyseq.data())) {
case escape_match_t::NONE: {
for (int lpc = 0; this->id_escape_buffer[lpc];
- lpc++) {
+ lpc++)
+ {
+ snprintf(keyseq.data(),
+ keyseq.size(),
+ "x%02x",
+ this->id_escape_buffer[lpc] & 0xff);
handled = this->id_key_handler(
- this->id_escape_buffer[lpc]);
+ this->id_escape_buffer[lpc], keyseq.data());
}
this->id_escape_index = 0;
break;
@@ -120,6 +125,13 @@ input_dispatcher::new_input(const struct timeval& current_time, int ch)
{
this->id_escape_index = 0;
}
+ } else if (ch > 0xff) {
+ if (KEY_F(0) <= ch && ch <= KEY_F(64)) {
+ snprintf(keyseq.data(), keyseq.size(), "f%d", ch - KEY_F0);
+ } else {
+ snprintf(keyseq.data(), keyseq.size(), "n%04o", ch);
+ }
+ handled = this->id_key_handler(ch, keyseq.data());
} else {
auto seq_size = utf::utf8::char_size([ch]() {
return std::make_pair(ch, 16);
@@ -127,7 +139,7 @@ input_dispatcher::new_input(const struct timeval& current_time, int ch)
if (seq_size == 1) {
snprintf(keyseq.data(), keyseq.size(), "x%02x", ch & 0xff);
- handled = this->id_key_handler(ch);
+ handled = this->id_key_handler(ch, keyseq.data());
} else {
this->reset_escape_buffer(ch, current_time, seq_size);
}
@@ -149,7 +161,8 @@ input_dispatcher::poll(const struct timeval& current_time)
timersub(&current_time, &this->id_escape_start_time, &diff);
if (escape_threshold < diff) {
- this->id_key_handler(KEY_CTRL_RBRACKET);
+ static const char ESC_KEYSEQ[] = "\x1b";
+ this->id_key_handler(KEY_ESCAPE, ESC_KEYSEQ);
this->id_escape_index = 0;
}
}
diff --git a/src/input_dispatcher.hh b/src/input_dispatcher.hh
index 6aa7059..0247e86 100644
--- a/src/input_dispatcher.hh
+++ b/src/input_dispatcher.hh
@@ -36,8 +36,7 @@
#include <sys/types.h>
-#define KEY_ESCAPE 0x1b
-#define KEY_CTRL_RBRACKET 0x1d
+#include "base/keycodes.hh"
class input_dispatcher {
public:
@@ -45,10 +44,7 @@ public:
void poll(const struct timeval& current_time);
- bool in_escape() const
- {
- return this->id_escape_index > 0;
- }
+ bool in_escape() const { return this->id_escape_index > 0; }
enum class escape_match_t {
NONE,
@@ -57,7 +53,7 @@ public:
};
std::function<escape_match_t(const char*)> id_escape_matcher;
- std::function<bool(int)> id_key_handler;
+ std::function<bool(int, const char*)> id_key_handler;
std::function<void(const char*)> id_escape_handler;
std::function<void()> id_mouse_handler;
std::function<void(const char*)> id_unhandled_handler;
diff --git a/src/internals/cmd-ref.rst b/src/internals/cmd-ref.rst
index 8509286..a8a10d5 100644
--- a/src/internals/cmd-ref.rst
+++ b/src/internals/cmd-ref.rst
@@ -44,7 +44,20 @@
:alt-msg Press t to switch to the text view
**See Also**
- :ref:`echo`, :ref:`eval`, :ref:`export_session_to`, :ref:`rebuild`, :ref:`redirect_to`, :ref:`write_csv_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_view_to`
+ :ref:`cd`, :ref:`echo`, :ref:`eval`, :ref:`export_session_to`, :ref:`rebuild`, :ref:`redirect_to`, :ref:`sh`, :ref:`write_csv_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_view_to`
+
+----
+
+
+.. _annotate:
+
+:annotate
+^^^^^^^^^
+
+ Analyze the focused log message and attach annotations
+
+ **See Also**
+ :ref:`comment`, :ref:`tag`
----
@@ -67,7 +80,23 @@
:append-to /tmp/interesting-lines.txt
**See Also**
- :ref:`echo`, :ref:`echoln`, :ref:`export_session_to`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`redirect_to`, :ref:`write_csv_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_view_to`
+ :ref:`dot_dump`, :ref:`dot_read`, :ref:`echo`, :ref:`echoln`, :ref:`export_session_to`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`redirect_to`, :ref:`write_csv_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_view_to`
+
+----
+
+
+.. _cd:
+
+:cd *dir*
+^^^^^^^^^
+
+ Change the current directory
+
+ **Parameters**
+ * **dir\*** --- The new current directory
+
+ **See Also**
+ :ref:`alt_msg`, :ref:`echo`, :ref:`eval`, :ref:`export_session_to`, :ref:`rebuild`, :ref:`redirect_to`, :ref:`sh`, :ref:`write_csv_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_view_to`
----
@@ -80,7 +109,23 @@
Clear the comment attached to the top log line
**See Also**
- :ref:`comment`, :ref:`tag`
+ :ref:`annotate`, :ref:`comment`, :ref:`tag`
+
+----
+
+
+.. _clear_file_timezone:
+
+:clear-file-timezone *pattern*
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+ Clear the timezone setting for the focused file or the given glob pattern.
+
+ **Parameters**
+ * **pattern\*** --- The glob pattern to match against files that should no longer use this timezone
+
+ **See Also**
+ :ref:`set_file_timezone`
----
@@ -147,10 +192,13 @@
.. _close:
-:close
-^^^^^^
+:close *path*
+^^^^^^^^^^^^^
- Close the top file in the view
+ Close the given file(s) or the top file in the view
+
+ **Parameters**
+ * **path** --- A path or glob pattern that specifies the files to close
----
@@ -174,7 +222,7 @@
:comment This is where it all went wrong
**See Also**
- :ref:`clear_comment`, :ref:`tag`
+ :ref:`annotate`, :ref:`clear_comment`, :ref:`tag`
----
@@ -209,6 +257,20 @@
----
+.. _convert_time_to:
+
+:convert-time-to *zone*
+^^^^^^^^^^^^^^^^^^^^^^^
+
+ Convert the focused timestamp to the given timezone
+
+ **Parameters**
+ * **zone\*** --- The timezone name
+
+
+----
+
+
.. _create_logline_table:
:create-logline-table *table-name*
@@ -354,7 +416,7 @@
:delete-tags #BUG123 #needs-review
**See Also**
- :ref:`comment`, :ref:`tag`
+ :ref:`annotate`, :ref:`comment`, :ref:`tag`
----
@@ -414,7 +476,7 @@
:echo Hello, World!
**See Also**
- :ref:`alt_msg`, :ref:`append_to`, :ref:`echoln`, :ref:`eval`, :ref:`export_session_to`, :ref:`export_session_to`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`rebuild`, :ref:`redirect_to`, :ref:`redirect_to`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`write_view_to`
+ :ref:`alt_msg`, :ref:`append_to`, :ref:`cd`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`echoln`, :ref:`eval`, :ref:`export_session_to`, :ref:`export_session_to`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`rebuild`, :ref:`redirect_to`, :ref:`redirect_to`, :ref:`sh`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`write_view_to`
----
@@ -473,7 +535,7 @@
:eval ;SELECT * FROM ${table}
**See Also**
- :ref:`alt_msg`, :ref:`echo`, :ref:`export_session_to`, :ref:`rebuild`, :ref:`redirect_to`, :ref:`write_csv_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_view_to`
+ :ref:`alt_msg`, :ref:`cd`, :ref:`echo`, :ref:`export_session_to`, :ref:`rebuild`, :ref:`redirect_to`, :ref:`sh`, :ref:`write_csv_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_view_to`
----
@@ -489,7 +551,7 @@
* **path\*** --- The path to the file to write
**See Also**
- :ref:`alt_msg`, :ref:`append_to`, :ref:`echo`, :ref:`echo`, :ref:`echoln`, :ref:`eval`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`rebuild`, :ref:`redirect_to`, :ref:`redirect_to`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`write_view_to`
+ :ref:`alt_msg`, :ref:`append_to`, :ref:`cd`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`echo`, :ref:`echo`, :ref:`echoln`, :ref:`eval`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`rebuild`, :ref:`redirect_to`, :ref:`redirect_to`, :ref:`sh`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`write_view_to`
----
@@ -605,7 +667,7 @@
:goto #screenshots
**See Also**
- :ref:`next_location`, :ref:`next_mark`, :ref:`prev_location`, :ref:`prev_mark`, :ref:`relative_goto`
+ :ref:`next_location`, :ref:`next_mark`, :ref:`next_section`, :ref:`prev_location`, :ref:`prev_mark`, :ref:`prev_section`, :ref:`relative_goto`
----
@@ -813,7 +875,7 @@
Move to the next position in the location history
**See Also**
- :ref:`goto`, :ref:`next_mark`, :ref:`prev_location`, :ref:`prev_mark`, :ref:`relative_goto`
+ :ref:`goto`, :ref:`next_mark`, :ref:`next_section`, :ref:`prev_location`, :ref:`prev_mark`, :ref:`prev_section`, :ref:`relative_goto`
----
@@ -836,7 +898,20 @@
:next-mark error
**See Also**
- :ref:`goto`, :ref:`hide_unmarked_lines`, :ref:`mark`, :ref:`next_location`, :ref:`prev_location`, :ref:`prev_mark`, :ref:`prev_mark`, :ref:`relative_goto`
+ :ref:`goto`, :ref:`hide_unmarked_lines`, :ref:`mark`, :ref:`next_location`, :ref:`next_section`, :ref:`prev_location`, :ref:`prev_mark`, :ref:`prev_mark`, :ref:`prev_section`, :ref:`relative_goto`
+
+----
+
+
+.. _next_section:
+
+:next-section
+^^^^^^^^^^^^^
+
+ Move to the next section in the document
+
+ **See Also**
+ :ref:`goto`, :ref:`next_location`, :ref:`next_mark`, :ref:`prev_location`, :ref:`prev_mark`, :ref:`prev_section`, :ref:`relative_goto`
----
@@ -894,7 +969,7 @@
:pipe-line-to *shell-cmd*
^^^^^^^^^^^^^^^^^^^^^^^^^
- Pipe the top line to the given shell command
+ Pipe the focused line to the given shell command. Any fields defined by the format will be set as environment variables.
**Parameters**
* **shell-cmd\*** --- The shell command-line to execute
@@ -907,7 +982,7 @@
:pipe-line-to sed -e 's/foo/bar/g'
**See Also**
- :ref:`append_to`, :ref:`echo`, :ref:`echoln`, :ref:`export_session_to`, :ref:`pipe_to`, :ref:`redirect_to`, :ref:`write_csv_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_view_to`
+ :ref:`append_to`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`echo`, :ref:`echoln`, :ref:`export_session_to`, :ref:`pipe_to`, :ref:`redirect_to`, :ref:`write_csv_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_view_to`
----
@@ -930,7 +1005,7 @@
:pipe-to sed -e s/foo/bar/g
**See Also**
- :ref:`append_to`, :ref:`echo`, :ref:`echoln`, :ref:`export_session_to`, :ref:`pipe_line_to`, :ref:`redirect_to`, :ref:`write_csv_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_view_to`
+ :ref:`append_to`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`echo`, :ref:`echoln`, :ref:`export_session_to`, :ref:`pipe_line_to`, :ref:`redirect_to`, :ref:`write_csv_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_view_to`
----
@@ -943,7 +1018,7 @@
Move to the previous position in the location history
**See Also**
- :ref:`goto`, :ref:`next_location`, :ref:`next_mark`, :ref:`prev_mark`, :ref:`relative_goto`
+ :ref:`goto`, :ref:`next_location`, :ref:`next_mark`, :ref:`next_section`, :ref:`prev_mark`, :ref:`prev_section`, :ref:`relative_goto`
----
@@ -966,7 +1041,20 @@
:prev-mark error
**See Also**
- :ref:`goto`, :ref:`hide_unmarked_lines`, :ref:`mark`, :ref:`next_location`, :ref:`next_mark`, :ref:`next_mark`, :ref:`prev_location`, :ref:`relative_goto`
+ :ref:`goto`, :ref:`hide_unmarked_lines`, :ref:`mark`, :ref:`next_location`, :ref:`next_mark`, :ref:`next_mark`, :ref:`next_section`, :ref:`prev_location`, :ref:`prev_section`, :ref:`relative_goto`
+
+----
+
+
+.. _prev_section:
+
+:prev-section
+^^^^^^^^^^^^^
+
+ Move to the previous section in the document
+
+ **See Also**
+ :ref:`goto`, :ref:`next_location`, :ref:`next_mark`, :ref:`next_section`, :ref:`prev_location`, :ref:`prev_mark`, :ref:`relative_goto`
----
@@ -1020,7 +1108,7 @@
Forcefully rebuild file indexes
**See Also**
- :ref:`alt_msg`, :ref:`echo`, :ref:`eval`, :ref:`export_session_to`, :ref:`redirect_to`, :ref:`write_csv_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_view_to`
+ :ref:`alt_msg`, :ref:`cd`, :ref:`echo`, :ref:`eval`, :ref:`export_session_to`, :ref:`redirect_to`, :ref:`sh`, :ref:`write_csv_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_view_to`
----
@@ -1043,7 +1131,7 @@
:redirect-to /tmp/script-output.txt
**See Also**
- :ref:`alt_msg`, :ref:`append_to`, :ref:`echo`, :ref:`echo`, :ref:`echoln`, :ref:`eval`, :ref:`export_session_to`, :ref:`export_session_to`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`rebuild`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`write_view_to`
+ :ref:`alt_msg`, :ref:`append_to`, :ref:`cd`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`echo`, :ref:`echo`, :ref:`echoln`, :ref:`eval`, :ref:`export_session_to`, :ref:`export_session_to`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`rebuild`, :ref:`sh`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`write_view_to`
----
@@ -1083,7 +1171,7 @@
:relative-goto -10%
**See Also**
- :ref:`goto`, :ref:`next_location`, :ref:`next_mark`, :ref:`prev_location`, :ref:`prev_mark`
+ :ref:`goto`, :ref:`next_location`, :ref:`next_mark`, :ref:`next_section`, :ref:`prev_location`, :ref:`prev_mark`, :ref:`prev_section`
----
@@ -1154,6 +1242,23 @@
----
+.. _set_file_timezone:
+
+:set-file-timezone *zone* *\[pattern\]*
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+ Set the timezone to use for log messages that do not include a timezone. The timezone is applied to the focused file or the given glob pattern.
+
+ **Parameters**
+ * **zone\*** --- The timezone name
+ * **pattern** --- The glob pattern to match against files that should use this timezone
+
+ **See Also**
+ :ref:`clear_file_timezone`
+
+----
+
+
.. _set_min_log_level:
:set-min-log-level *log-level*
@@ -1175,6 +1280,23 @@
----
+.. _sh:
+
+:sh *--name=<name>* *cmdline*
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+ Execute the given command-line and display the captured output
+
+ **Parameters**
+ * **--name=<name>\*** --- The name to give to the captured output
+ * **cmdline\*** --- The command-line to execute.
+
+ **See Also**
+ :ref:`alt_msg`, :ref:`cd`, :ref:`echo`, :ref:`eval`, :ref:`export_session_to`, :ref:`rebuild`, :ref:`redirect_to`, :ref:`write_csv_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_view_to`
+
+----
+
+
.. _show_fields:
:show-fields *field-name*
@@ -1330,7 +1452,7 @@
:tag #BUG123 #needs-review
**See Also**
- :ref:`comment`, :ref:`delete_tags`, :ref:`untag`
+ :ref:`annotate`, :ref:`comment`, :ref:`delete_tags`, :ref:`untag`
----
@@ -1408,7 +1530,7 @@
:untag #BUG123 #needs-review
**See Also**
- :ref:`comment`, :ref:`tag`
+ :ref:`annotate`, :ref:`comment`, :ref:`tag`
----
@@ -1432,7 +1554,7 @@
:write-table-to /tmp/table.txt
**See Also**
- :ref:`alt_msg`, :ref:`append_to`, :ref:`create_logline_table`, :ref:`create_search_table`, :ref:`echo`, :ref:`echo`, :ref:`echoln`, :ref:`eval`, :ref:`export_session_to`, :ref:`export_session_to`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`rebuild`, :ref:`redirect_to`, :ref:`redirect_to`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`write_view_to`, :ref:`write_view_to`
+ :ref:`alt_msg`, :ref:`append_to`, :ref:`cd`, :ref:`create_logline_table`, :ref:`create_search_table`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`echo`, :ref:`echo`, :ref:`echoln`, :ref:`eval`, :ref:`export_session_to`, :ref:`export_session_to`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`rebuild`, :ref:`redirect_to`, :ref:`redirect_to`, :ref:`sh`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`write_view_to`, :ref:`write_view_to`
----
@@ -1456,7 +1578,7 @@
:write-csv-to /tmp/table.csv
**See Also**
- :ref:`alt_msg`, :ref:`append_to`, :ref:`create_logline_table`, :ref:`create_search_table`, :ref:`echo`, :ref:`echo`, :ref:`echoln`, :ref:`eval`, :ref:`export_session_to`, :ref:`export_session_to`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`rebuild`, :ref:`redirect_to`, :ref:`redirect_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`write_view_to`, :ref:`write_view_to`
+ :ref:`alt_msg`, :ref:`append_to`, :ref:`cd`, :ref:`create_logline_table`, :ref:`create_search_table`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`echo`, :ref:`echo`, :ref:`echoln`, :ref:`eval`, :ref:`export_session_to`, :ref:`export_session_to`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`rebuild`, :ref:`redirect_to`, :ref:`redirect_to`, :ref:`sh`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`write_view_to`, :ref:`write_view_to`
----
@@ -1480,7 +1602,7 @@
:write-json-to /tmp/table.json
**See Also**
- :ref:`alt_msg`, :ref:`append_to`, :ref:`create_logline_table`, :ref:`create_search_table`, :ref:`echo`, :ref:`echo`, :ref:`echoln`, :ref:`eval`, :ref:`export_session_to`, :ref:`export_session_to`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`rebuild`, :ref:`redirect_to`, :ref:`redirect_to`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`write_view_to`, :ref:`write_view_to`
+ :ref:`alt_msg`, :ref:`append_to`, :ref:`cd`, :ref:`create_logline_table`, :ref:`create_search_table`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`echo`, :ref:`echo`, :ref:`echoln`, :ref:`eval`, :ref:`export_session_to`, :ref:`export_session_to`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`rebuild`, :ref:`redirect_to`, :ref:`redirect_to`, :ref:`sh`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`write_view_to`, :ref:`write_view_to`
----
@@ -1504,7 +1626,7 @@
:write-jsonlines-to /tmp/table.json
**See Also**
- :ref:`alt_msg`, :ref:`append_to`, :ref:`create_logline_table`, :ref:`create_search_table`, :ref:`echo`, :ref:`echo`, :ref:`echoln`, :ref:`eval`, :ref:`export_session_to`, :ref:`export_session_to`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`rebuild`, :ref:`redirect_to`, :ref:`redirect_to`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`write_view_to`, :ref:`write_view_to`
+ :ref:`alt_msg`, :ref:`append_to`, :ref:`cd`, :ref:`create_logline_table`, :ref:`create_search_table`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`echo`, :ref:`echo`, :ref:`echoln`, :ref:`eval`, :ref:`export_session_to`, :ref:`export_session_to`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`rebuild`, :ref:`redirect_to`, :ref:`redirect_to`, :ref:`sh`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`write_view_to`, :ref:`write_view_to`
----
@@ -1529,7 +1651,7 @@
:write-raw-to /tmp/table.txt
**See Also**
- :ref:`alt_msg`, :ref:`append_to`, :ref:`create_logline_table`, :ref:`create_search_table`, :ref:`echo`, :ref:`echo`, :ref:`echoln`, :ref:`eval`, :ref:`export_session_to`, :ref:`export_session_to`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`rebuild`, :ref:`redirect_to`, :ref:`redirect_to`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`write_view_to`, :ref:`write_view_to`
+ :ref:`alt_msg`, :ref:`append_to`, :ref:`cd`, :ref:`create_logline_table`, :ref:`create_search_table`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`echo`, :ref:`echo`, :ref:`echoln`, :ref:`eval`, :ref:`export_session_to`, :ref:`export_session_to`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`rebuild`, :ref:`redirect_to`, :ref:`redirect_to`, :ref:`sh`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`write_view_to`, :ref:`write_view_to`
----
@@ -1553,7 +1675,7 @@
:write-screen-to /tmp/table.txt
**See Also**
- :ref:`alt_msg`, :ref:`append_to`, :ref:`create_logline_table`, :ref:`create_search_table`, :ref:`echo`, :ref:`echo`, :ref:`echoln`, :ref:`eval`, :ref:`export_session_to`, :ref:`export_session_to`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`rebuild`, :ref:`redirect_to`, :ref:`redirect_to`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`write_view_to`, :ref:`write_view_to`
+ :ref:`alt_msg`, :ref:`append_to`, :ref:`cd`, :ref:`create_logline_table`, :ref:`create_search_table`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`echo`, :ref:`echo`, :ref:`echoln`, :ref:`eval`, :ref:`export_session_to`, :ref:`export_session_to`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`rebuild`, :ref:`redirect_to`, :ref:`redirect_to`, :ref:`sh`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_to`, :ref:`write_view_to`, :ref:`write_view_to`, :ref:`write_view_to`
----
@@ -1577,7 +1699,7 @@
:write-to /tmp/interesting-lines.txt
**See Also**
- :ref:`alt_msg`, :ref:`append_to`, :ref:`echo`, :ref:`echo`, :ref:`echoln`, :ref:`eval`, :ref:`export_session_to`, :ref:`export_session_to`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`rebuild`, :ref:`redirect_to`, :ref:`redirect_to`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_view_to`, :ref:`write_view_to`
+ :ref:`alt_msg`, :ref:`append_to`, :ref:`cd`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`echo`, :ref:`echo`, :ref:`echoln`, :ref:`eval`, :ref:`export_session_to`, :ref:`export_session_to`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`rebuild`, :ref:`redirect_to`, :ref:`redirect_to`, :ref:`sh`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_view_to`, :ref:`write_view_to`
----
@@ -1601,7 +1723,7 @@
:write-view-to /tmp/table.txt
**See Also**
- :ref:`alt_msg`, :ref:`append_to`, :ref:`create_logline_table`, :ref:`create_search_table`, :ref:`echo`, :ref:`echo`, :ref:`echoln`, :ref:`eval`, :ref:`export_session_to`, :ref:`export_session_to`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`rebuild`, :ref:`redirect_to`, :ref:`redirect_to`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_to`
+ :ref:`alt_msg`, :ref:`append_to`, :ref:`cd`, :ref:`create_logline_table`, :ref:`create_search_table`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`echo`, :ref:`echo`, :ref:`echoln`, :ref:`eval`, :ref:`export_session_to`, :ref:`export_session_to`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`rebuild`, :ref:`redirect_to`, :ref:`redirect_to`, :ref:`sh`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_csv_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_to`
----
diff --git a/src/internals/sql-ref.rst b/src/internals/sql-ref.rst
index bf1e0a6..641e93f 100644
--- a/src/internals/sql-ref.rst
+++ b/src/internals/sql-ref.rst
@@ -127,6 +127,8 @@ CASE *\[base-expr\]* WHEN *cmp-expr* ELSE *\[else-expr\]* END
**Parameters**
* **base-expr** --- The base expression that is used for comparison in the branches
* **cmp-expr** --- The expression to test if this branch should be taken
+
+ * **then-expr\*** --- The result for this branch.
* **else-expr** --- The result of this CASE if no branches matched.
**Examples**
@@ -157,8 +159,8 @@ expr COLLATE *collation-name*
.. code-block:: custsqlite
;SELECT ('a2' < 'a10'), ('a2' < 'a10' COLLATE naturalnocase)
- ('a2' < 'a10') ('a2' < 'a10' COLLATE naturalnocase)
- 0 1
+ ('a2' < 'a10') ('a2' <⋯nocase)
+ 0 1
----
@@ -180,6 +182,10 @@ DETACH DATABASE *schema-name*
.. code-block:: custsqlite
;DETACH DATABASE customers
+ ✘ error: SQL statement failed
+ reason: no such database: customers
+ --> command:1
+
----
@@ -395,6 +401,8 @@ UPDATE *table* SET *column-name* WHERE *\[cond\]*
**Parameters**
* **table\*** --- The table to update
* **column-name** --- The columns in the table to update.
+
+ * **expr\*** --- The values to place into the column.
* **cond** --- The condition used to determine whether a row should be updated.
**Examples**
@@ -487,6 +495,8 @@ anonymize(*value*)
Replace identifying information with random values.
+ **PRQL Name**: text.anonymize
+
**Parameters**
* **value\*** --- The text to anonymize
@@ -499,7 +509,7 @@ anonymize(*value*)
Aback, 10.0.0.1
**See Also**
- :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
+ :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`humanize_id`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`timezone`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
----
@@ -673,9 +683,9 @@ avg(*X*)
.. code-block:: custsqlite
;SELECT ex_procname, avg(ex_duration) FROM lnav_example_log GROUP BY ex_procname
- ex_procname avg(ex_duration)
- gw 5
- hw 2
+ ex_procname avg(ex_⋯ration)
+ gw 5
+ hw 2
**See Also**
:ref:`abs`, :ref:`acos`, :ref:`acosh`, :ref:`asin`, :ref:`asinh`, :ref:`atan2`, :ref:`atan`, :ref:`atanh`, :ref:`atn2`, :ref:`ceil`, :ref:`degrees`, :ref:`exp`, :ref:`floor`, :ref:`log10`, :ref:`log`, :ref:`max`, :ref:`min`, :ref:`pi`, :ref:`power`, :ref:`radians`, :ref:`round`, :ref:`sign`, :ref:`square`, :ref:`sum`, :ref:`total`
@@ -690,6 +700,8 @@ basename(*path*)
Extract the base portion of a pathname.
+ **PRQL Name**: fs.basename
+
**Parameters**
* **path\*** --- The path
@@ -736,6 +748,13 @@ basename(*path*)
;SELECT basename('/')
/
+ To get the base of a path:
+
+ .. code-block:: custsqlite
+
+ ;from [{p='foo/bar'}] | select { fs.basename p }
+ bar
+
**See Also**
:ref:`dirname`, :ref:`joinpath`, :ref:`readlink`, :ref:`realpath`
@@ -796,7 +815,7 @@ char(*X*)
HI
**See Also**
- :ref:`anonymize`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
+ :ref:`anonymize`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`humanize_id`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`timezone`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
----
@@ -829,7 +848,7 @@ charindex(*needle*, *haystack*, *\[start\]*)
0
**See Also**
- :ref:`anonymize`, :ref:`char`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
+ :ref:`anonymize`, :ref:`char`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`humanize_id`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`timezone`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
----
@@ -933,7 +952,7 @@ date(*timestring*, *modifier*)
2017-04-04
**See Also**
- :ref:`datetime`, :ref:`humanize_duration`, :ref:`julianday`, :ref:`strftime`, :ref:`time`, :ref:`timediff`, :ref:`timeslice`
+ :ref:`datetime`, :ref:`humanize_duration`, :ref:`julianday`, :ref:`strftime`, :ref:`time`, :ref:`timediff`, :ref:`timeslice`, :ref:`timezone`
----
@@ -972,7 +991,7 @@ datetime(*timestring*, *modifier*)
2017-04-04 21:37:22
**See Also**
- :ref:`date`, :ref:`humanize_duration`, :ref:`julianday`, :ref:`strftime`, :ref:`time`, :ref:`timediff`, :ref:`timeslice`
+ :ref:`date`, :ref:`humanize_duration`, :ref:`julianday`, :ref:`strftime`, :ref:`time`, :ref:`timediff`, :ref:`timeslice`, :ref:`timezone`
----
@@ -997,7 +1016,7 @@ decode(*value*, *algorithm*)
curl
**See Also**
- :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
+ :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`humanize_id`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`timezone`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
----
@@ -1046,6 +1065,8 @@ dirname(*path*)
Extract the directory portion of a pathname.
+ **PRQL Name**: fs.dirname
+
**Parameters**
* **path\*** --- The path
@@ -1102,7 +1123,7 @@ echoln(*value*)
* **value\*** --- The value to write to the current output file
**See Also**
- :ref:`append_to`, :ref:`echo`, :ref:`export_session_to`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`redirect_to`, :ref:`write_csv_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_view_to`
+ :ref:`append_to`, :ref:`dot_dump`, :ref:`dot_read`, :ref:`echo`, :ref:`export_session_to`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`redirect_to`, :ref:`write_csv_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_view_to`
----
@@ -1141,7 +1162,7 @@ encode(*value*, *algorithm*)
Hello%2C%20World%21
**See Also**
- :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
+ :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`humanize_id`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`timezone`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
----
@@ -1173,7 +1194,7 @@ endswith(*str*, *suffix*)
0
**See Also**
- :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
+ :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`humanize_id`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`timezone`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
----
@@ -1209,6 +1230,8 @@ extract(*str*)
Automatically Parse and extract data from a string
+ **PRQL Name**: text.discover
+
**Parameters**
* **str\*** --- The string to parse
@@ -1228,7 +1251,7 @@ extract(*str*)
{"col_0":1.0,"col_1":2.0}
**See Also**
- :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
+ :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`humanize_id`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`timezone`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
----
@@ -1273,6 +1296,31 @@ floor(*num*)
----
+.. _fstat:
+
+fstat(*pattern*)
+^^^^^^^^^^^^^^^^
+
+ A table-valued function for getting information about file paths/globs
+
+ **Parameters**
+ * **pattern\*** --- The file path or glob pattern to query.
+
+ **Examples**
+ To read a file and raise an error if there is a problem:
+
+ .. code-block:: custsqlite
+
+ ;SELECT ifnull(data, raise_error('cannot read: ' || st_name, error)) FROM fstat('/non-existent')
+ ✘ error: cannot read: non-existent
+ reason: No such file or directory
+ --> command:1
+
+
+
+----
+
+
.. _generate_series:
generate_series(*start*, *stop*, *\[step\]*)
@@ -1291,34 +1339,34 @@ generate_series(*start*, *stop*, *\[step\]*)
.. code-block:: custsqlite
;SELECT value FROM generate_series(10, 14)
- value
- 10
- 11
- 12
- 13
- 14
+ value
+ 10
+ 11
+ 12
+ 13
+ 14
To generate every other number in the range [10, 14]:
.. code-block:: custsqlite
;SELECT value FROM generate_series(10, 14, 2)
- value
- 10
- 12
- 14
+ value
+ 10
+ 12
+ 14
To count down from five to 1:
.. code-block:: custsqlite
;SELECT value FROM generate_series(1, 5, -1)
- value
- 5
- 4
- 3
- 2
- 1
+ value
+ 5
+ 4
+ 3
+ 2
+ 1
----
@@ -1331,6 +1379,8 @@ gethostbyaddr(*hostname*)
Get the hostname for the given IP address
+ **PRQL Name**: net.gethostbyaddr
+
**Parameters**
* **hostname\*** --- The IP address to lookup.
@@ -1355,6 +1405,8 @@ gethostbyname(*hostname*)
Get the IP address for the given hostname
+ **PRQL Name**: net.gethostbyname
+
**Parameters**
* **hostname\*** --- The DNS hostname to lookup.
@@ -1429,7 +1481,7 @@ group_concat(*X*, *\[sep\]*)
hw,gw
**See Also**
- :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
+ :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`humanize_id`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`timezone`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
----
@@ -1453,7 +1505,7 @@ group_spooky_hash(*str*)
4e7a190aead058cb123c94290f29c34a
**See Also**
- :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
+ :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`humanize_id`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`timezone`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
----
@@ -1469,7 +1521,7 @@ gunzip(*b*)
* **b** --- The blob to decompress
**See Also**
- :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
+ :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`humanize_id`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`timezone`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
----
@@ -1485,7 +1537,7 @@ gzip(*value*)
* **value** --- The value to compress
**See Also**
- :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
+ :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`humanize_id`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`timezone`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
----
@@ -1519,6 +1571,8 @@ humanize_duration(*secs*)
Format the given seconds value as an abbreviated duration string
+ **PRQL Name**: humanize.duration
+
**Parameters**
* **secs\*** --- The duration in seconds
@@ -1538,7 +1592,7 @@ humanize_duration(*secs*)
1s500
**See Also**
- :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`date`, :ref:`datetime`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`julianday`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`strftime`, :ref:`substr`, :ref:`time`, :ref:`timediff`, :ref:`timeslice`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
+ :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`date`, :ref:`datetime`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_file_size`, :ref:`humanize_id`, :ref:`instr`, :ref:`julianday`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`strftime`, :ref:`substr`, :ref:`time`, :ref:`timediff`, :ref:`timeslice`, :ref:`timezone`, :ref:`timezone`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
----
@@ -1550,6 +1604,8 @@ humanize_file_size(*value*)
Format the given file size as a human-friendly string
+ **PRQL Name**: humanize.file_size
+
**Parameters**
* **value\*** --- The file size to format
@@ -1562,7 +1618,33 @@ humanize_file_size(*value*)
10.0MB
**See Also**
- :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
+ :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_id`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`timezone`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
+
+----
+
+
+.. _humanize_id:
+
+humanize_id(*id*)
+^^^^^^^^^^^^^^^^^
+
+ Colorize the given ID using ANSI escape codes.
+
+ **PRQL Name**: humanize.id
+
+ **Parameters**
+ * **id\*** --- The identifier to color
+
+ **Examples**
+ To colorize the ID 'cluster1':
+
+ .. code-block:: custsqlite
+
+ ;SELECT humanize_id('cluster1')
+ cluster1
+
+ **See Also**
+ :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`timezone`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
----
@@ -1610,7 +1692,7 @@ instr(*haystack*, *needle*)
2
**See Also**
- :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
+ :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`humanize_id`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`timezone`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
----
@@ -1622,6 +1704,8 @@ jget(*json*, *ptr*, *\[default\]*)
Get the value from a JSON object using a JSON-Pointer.
+ **PRQL Name**: json.get
+
**Parameters**
* **json\*** --- The JSON object to query.
* **ptr\*** --- The JSON-Pointer to lookup in the object.
@@ -1650,7 +1734,7 @@ jget(*json*, *ptr*, *\[default\]*)
Hello
**See Also**
- :ref:`json_concat`, :ref:`json_contains`, :ref:`json_group_array`, :ref:`json_group_object`, :ref:`yaml_to_json`
+ :ref:`json_array_length`, :ref:`json_array`, :ref:`json_concat`, :ref:`json_contains`, :ref:`json_each`, :ref:`json_extract`, :ref:`json_group_array`, :ref:`json_group_object`, :ref:`json_insert`, :ref:`json_object`, :ref:`json_quote`, :ref:`json_remove`, :ref:`json_replace`, :ref:`json_set`, :ref:`json_tree`, :ref:`json_type`, :ref:`json_valid`, :ref:`json`, :ref:`yaml_to_json`
----
@@ -1662,6 +1746,8 @@ joinpath(*path*)
Join components of a path together.
+ **PRQL Name**: fs.join
+
**Parameters**
* **path** --- One or more path components to join together. If an argument starts with a forward or backward slash, it will be considered an absolute path and any preceding elements will be ignored.
@@ -1700,6 +1786,85 @@ joinpath(*path*)
----
+.. _json:
+
+json(*X*)
+^^^^^^^^^
+
+ Verifies that its argument is valid JSON and returns a minified version or throws an error.
+
+ **Parameters**
+ * **X\*** --- The string to interpret as JSON.
+
+ **See Also**
+ :ref:`jget`, :ref:`json_array_length`, :ref:`json_array`, :ref:`json_concat`, :ref:`json_contains`, :ref:`json_each`, :ref:`json_extract`, :ref:`json_group_array`, :ref:`json_group_object`, :ref:`json_insert`, :ref:`json_object`, :ref:`json_quote`, :ref:`json_remove`, :ref:`json_replace`, :ref:`json_set`, :ref:`json_tree`, :ref:`json_type`, :ref:`json_valid`, :ref:`yaml_to_json`
+
+----
+
+
+.. _json_array:
+
+json_array(*X*)
+^^^^^^^^^^^^^^^
+
+ Constructs a JSON array from its arguments.
+
+ **Parameters**
+ * **X** --- The values of the JSON array
+
+ **Examples**
+ To create an array of all types:
+
+ .. code-block:: custsqlite
+
+ ;SELECT json_array(NULL, 1, 2.1, 'three', json_array(4), json_object('five', 'six'))
+ [null,1,2.1,"three",[4],{"five":"six"}]
+
+ To create an empty array:
+
+ .. code-block:: custsqlite
+
+ ;SELECT json_array()
+ []
+
+ **See Also**
+ :ref:`jget`, :ref:`json_array_length`, :ref:`json_concat`, :ref:`json_contains`, :ref:`json_each`, :ref:`json_extract`, :ref:`json_group_array`, :ref:`json_group_object`, :ref:`json_insert`, :ref:`json_object`, :ref:`json_quote`, :ref:`json_remove`, :ref:`json_replace`, :ref:`json_set`, :ref:`json_tree`, :ref:`json_type`, :ref:`json_valid`, :ref:`json`, :ref:`yaml_to_json`
+
+----
+
+
+.. _json_array_length:
+
+json_array_length(*X*, *\[P\]*)
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+ Returns the length of a JSON array.
+
+ **Parameters**
+ * **X\*** --- The JSON object.
+ * **P** --- The path to the array in 'X'.
+
+ **Examples**
+ To get the length of an array:
+
+ .. code-block:: custsqlite
+
+ ;SELECT json_array_length('[1, 2, 3]')
+ 3
+
+ To get the length of a nested array:
+
+ .. code-block:: custsqlite
+
+ ;SELECT json_array_length('{"arr": [1, 2, 3]}', '$.arr')
+ 3
+
+ **See Also**
+ :ref:`jget`, :ref:`json_array`, :ref:`json_concat`, :ref:`json_contains`, :ref:`json_each`, :ref:`json_extract`, :ref:`json_group_array`, :ref:`json_group_object`, :ref:`json_insert`, :ref:`json_object`, :ref:`json_quote`, :ref:`json_remove`, :ref:`json_replace`, :ref:`json_set`, :ref:`json_tree`, :ref:`json_type`, :ref:`json_valid`, :ref:`json`, :ref:`yaml_to_json`
+
+----
+
+
.. _json_concat:
json_concat(*json*, *value*)
@@ -1707,6 +1872,8 @@ json_concat(*json*, *value*)
Returns an array with the given values concatenated onto the end. If the initial value is null, the result will be an array with the given elements. If the initial value is an array, the result will be an array with the given values at the end. If the initial value is not null or an array, the result will be an array with two elements: the initial value and the given value.
+ **PRQL Name**: json.concat
+
**Parameters**
* **json\*** --- The initial JSON value.
* **value** --- The value(s) to add to the end of the array.
@@ -1734,7 +1901,7 @@ json_concat(*json*, *value*)
[1,2,3,4,5]
**See Also**
- :ref:`jget`, :ref:`json_contains`, :ref:`json_group_array`, :ref:`json_group_object`, :ref:`yaml_to_json`
+ :ref:`jget`, :ref:`json_array_length`, :ref:`json_array`, :ref:`json_contains`, :ref:`json_each`, :ref:`json_extract`, :ref:`json_group_array`, :ref:`json_group_object`, :ref:`json_insert`, :ref:`json_object`, :ref:`json_quote`, :ref:`json_remove`, :ref:`json_replace`, :ref:`json_set`, :ref:`json_tree`, :ref:`json_type`, :ref:`json_valid`, :ref:`json`, :ref:`yaml_to_json`
----
@@ -1746,6 +1913,8 @@ json_contains(*json*, *value*)
Check if a JSON value contains the given element.
+ **PRQL Name**: json.contains
+
**Parameters**
* **json\*** --- The JSON value to query.
* **value\*** --- The value to look for in the first argument
@@ -1766,7 +1935,75 @@ json_contains(*json*, *value*)
1
**See Also**
- :ref:`jget`, :ref:`json_concat`, :ref:`json_group_array`, :ref:`json_group_object`, :ref:`yaml_to_json`
+ :ref:`jget`, :ref:`json_array_length`, :ref:`json_array`, :ref:`json_concat`, :ref:`json_each`, :ref:`json_extract`, :ref:`json_group_array`, :ref:`json_group_object`, :ref:`json_insert`, :ref:`json_object`, :ref:`json_quote`, :ref:`json_remove`, :ref:`json_replace`, :ref:`json_set`, :ref:`json_tree`, :ref:`json_type`, :ref:`json_valid`, :ref:`json`, :ref:`yaml_to_json`
+
+----
+
+
+.. _json_each:
+
+json_each(*X*, *\[P\]*)
+^^^^^^^^^^^^^^^^^^^^^^^
+
+ A table-valued-function that returns the children of the top-level JSON value
+
+ **Parameters**
+ * **X\*** --- The JSON value to query
+ * **P** --- The path to the value to query
+
+ **Examples**
+ To iterate over an array:
+
+ .. code-block:: custsqlite
+
+ ;SELECT * FROM json_each('[null,1,"two",{"three":4.5}]')
+ key value type atom id parent fullkey path
+ 0 <NULL> null <NULL> 2 <NULL> $[0] $
+ 1 1 integer 1 3 <NULL> $[1] $
+ 2 two text two 5 <NULL> $[2] $
+ 3 {"three":4.5} object <NULL> 9 <NULL> $[3] $
+
+ **See Also**
+ :ref:`jget`, :ref:`json_array_length`, :ref:`json_array`, :ref:`json_concat`, :ref:`json_contains`, :ref:`json_extract`, :ref:`json_group_array`, :ref:`json_group_object`, :ref:`json_insert`, :ref:`json_object`, :ref:`json_quote`, :ref:`json_remove`, :ref:`json_replace`, :ref:`json_set`, :ref:`json_tree`, :ref:`json_type`, :ref:`json_valid`, :ref:`json`, :ref:`yaml_to_json`
+
+----
+
+
+.. _json_extract:
+
+json_extract(*X*, *P*)
+^^^^^^^^^^^^^^^^^^^^^^
+
+ Returns the value(s) from the given JSON at the given path(s).
+
+ **Parameters**
+ * **X\*** --- The JSON value.
+ * **P** --- The path to extract.
+
+ **Examples**
+ To get a number:
+
+ .. code-block:: custsqlite
+
+ ;SELECT json_extract('{"num": 1}', '$.num')
+ 1
+
+ To get two numbers:
+
+ .. code-block:: custsqlite
+
+ ;SELECT json_extract('{"num": 1, "val": 2}', '$.num', '$.val')
+ [1,2]
+
+ To get an object:
+
+ .. code-block:: custsqlite
+
+ ;SELECT json_extract('{"obj": {"sub": 1}}', '$.obj')
+ {"sub":1}
+
+ **See Also**
+ :ref:`jget`, :ref:`json_array_length`, :ref:`json_array`, :ref:`json_concat`, :ref:`json_contains`, :ref:`json_each`, :ref:`json_group_array`, :ref:`json_group_object`, :ref:`json_insert`, :ref:`json_object`, :ref:`json_quote`, :ref:`json_remove`, :ref:`json_replace`, :ref:`json_set`, :ref:`json_tree`, :ref:`json_type`, :ref:`json_valid`, :ref:`json`, :ref:`yaml_to_json`
----
@@ -1778,6 +2015,8 @@ json_group_array(*value*)
Collect the given values from a query into a JSON array
+ **PRQL Name**: json.group_array
+
**Parameters**
* **value** --- The values to append to the array
@@ -1797,7 +2036,7 @@ json_group_array(*value*)
[1,2,3]
**See Also**
- :ref:`jget`, :ref:`json_concat`, :ref:`json_contains`, :ref:`json_group_object`, :ref:`yaml_to_json`
+ :ref:`jget`, :ref:`json_array_length`, :ref:`json_array`, :ref:`json_concat`, :ref:`json_contains`, :ref:`json_each`, :ref:`json_extract`, :ref:`json_group_object`, :ref:`json_insert`, :ref:`json_object`, :ref:`json_quote`, :ref:`json_remove`, :ref:`json_replace`, :ref:`json_set`, :ref:`json_tree`, :ref:`json_type`, :ref:`json_valid`, :ref:`json`, :ref:`yaml_to_json`
----
@@ -1809,6 +2048,8 @@ json_group_object(*name*, *value*)
Collect the given values from a query into a JSON object
+ **PRQL Name**: json.group_object
+
**Parameters**
* **name\*** --- The property name for the value
* **value** --- The value to add to the object
@@ -1829,7 +2070,316 @@ json_group_object(*name*, *value*)
{"a":1,"b":2}
**See Also**
- :ref:`jget`, :ref:`json_concat`, :ref:`json_contains`, :ref:`json_group_array`, :ref:`yaml_to_json`
+ :ref:`jget`, :ref:`json_array_length`, :ref:`json_array`, :ref:`json_concat`, :ref:`json_contains`, :ref:`json_each`, :ref:`json_extract`, :ref:`json_group_array`, :ref:`json_insert`, :ref:`json_object`, :ref:`json_quote`, :ref:`json_remove`, :ref:`json_replace`, :ref:`json_set`, :ref:`json_tree`, :ref:`json_type`, :ref:`json_valid`, :ref:`json`, :ref:`yaml_to_json`
+
+----
+
+
+.. _json_insert:
+
+json_insert(*X*, *P*, *Y*)
+^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+ Inserts values into a JSON object/array at the given locations, if it does not already exist
+
+ **Parameters**
+ * **X\*** --- The JSON value to update
+ * **P\*** --- The path to the insertion point. A '#' array index means append the value
+ * **Y\*** --- The value to insert
+
+ **Examples**
+ To append to an array:
+
+ .. code-block:: custsqlite
+
+ ;SELECT json_insert('[1, 2]', '$[#]', 3)
+ [1,2,3]
+
+ To update an object:
+
+ .. code-block:: custsqlite
+
+ ;SELECT json_insert('{"a": 1}', '$.b', 2)
+ {"a":1,"b":2}
+
+ To ensure a value is set:
+
+ .. code-block:: custsqlite
+
+ ;SELECT json_insert('{"a": 1}', '$.a', 2)
+ {"a":1}
+
+ To update multiple values:
+
+ .. code-block:: custsqlite
+
+ ;SELECT json_insert('{"a": 1}', '$.b', 2, '$.c', 3)
+ {"a":1,"b":2,"c":3}
+
+ **See Also**
+ :ref:`jget`, :ref:`json_array_length`, :ref:`json_array`, :ref:`json_concat`, :ref:`json_contains`, :ref:`json_each`, :ref:`json_extract`, :ref:`json_group_array`, :ref:`json_group_object`, :ref:`json_object`, :ref:`json_quote`, :ref:`json_remove`, :ref:`json_replace`, :ref:`json_set`, :ref:`json_tree`, :ref:`json_type`, :ref:`json_valid`, :ref:`json`, :ref:`yaml_to_json`
+
+----
+
+
+.. _json_object:
+
+json_object(*N*, *V*)
+^^^^^^^^^^^^^^^^^^^^^
+
+ Create a JSON object from the given arguments
+
+ **Parameters**
+ * **N\*** --- The property name
+ * **V\*** --- The property value
+
+ **Examples**
+ To create an object:
+
+ .. code-block:: custsqlite
+
+ ;SELECT json_object('a', 1, 'b', 'c')
+ {"a":1,"b":"c"}
+
+ To create an empty object:
+
+ .. code-block:: custsqlite
+
+ ;SELECT json_object()
+ {}
+
+ **See Also**
+ :ref:`jget`, :ref:`json_array_length`, :ref:`json_array`, :ref:`json_concat`, :ref:`json_contains`, :ref:`json_each`, :ref:`json_extract`, :ref:`json_group_array`, :ref:`json_group_object`, :ref:`json_insert`, :ref:`json_quote`, :ref:`json_remove`, :ref:`json_replace`, :ref:`json_set`, :ref:`json_tree`, :ref:`json_type`, :ref:`json_valid`, :ref:`json`, :ref:`yaml_to_json`
+
+----
+
+
+.. _json_quote:
+
+json_quote(*X*)
+^^^^^^^^^^^^^^^
+
+ Returns the JSON representation of the given value, if it is not already JSON
+
+ **Parameters**
+ * **X\*** --- The value to convert
+
+ **Examples**
+ To convert a string:
+
+ .. code-block:: custsqlite
+
+ ;SELECT json_quote('Hello, World!')
+ "Hello, World!"
+
+ To pass through an existing JSON value:
+
+ .. code-block:: custsqlite
+
+ ;SELECT json_quote(json('"Hello, World!"'))
+ "Hello, World!"
+
+ **See Also**
+ :ref:`jget`, :ref:`json_array_length`, :ref:`json_array`, :ref:`json_concat`, :ref:`json_contains`, :ref:`json_each`, :ref:`json_extract`, :ref:`json_group_array`, :ref:`json_group_object`, :ref:`json_insert`, :ref:`json_object`, :ref:`json_remove`, :ref:`json_replace`, :ref:`json_set`, :ref:`json_tree`, :ref:`json_type`, :ref:`json_valid`, :ref:`json`, :ref:`yaml_to_json`
+
+----
+
+
+.. _json_remove:
+
+json_remove(*X*, *P*)
+^^^^^^^^^^^^^^^^^^^^^
+
+ Removes paths from a JSON value
+
+ **Parameters**
+ * **X\*** --- The JSON value to update
+ * **P** --- The paths to remove
+
+ **Examples**
+ To remove elements of an array:
+
+ .. code-block:: custsqlite
+
+ ;SELECT json_remove('[1,2,3]', '$[1]', '$[1]')
+ [1]
+
+ To remove object properties:
+
+ .. code-block:: custsqlite
+
+ ;SELECT json_remove('{"a":1,"b":2}', '$.b')
+ {"a":1}
+
+ **See Also**
+ :ref:`jget`, :ref:`json_array_length`, :ref:`json_array`, :ref:`json_concat`, :ref:`json_contains`, :ref:`json_each`, :ref:`json_extract`, :ref:`json_group_array`, :ref:`json_group_object`, :ref:`json_insert`, :ref:`json_object`, :ref:`json_quote`, :ref:`json_replace`, :ref:`json_set`, :ref:`json_tree`, :ref:`json_type`, :ref:`json_valid`, :ref:`json`, :ref:`yaml_to_json`
+
+----
+
+
+.. _json_replace:
+
+json_replace(*X*, *P*, *Y*)
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+ Replaces existing values in a JSON object/array at the given locations
+
+ **Parameters**
+ * **X\*** --- The JSON value to update
+ * **P\*** --- The path to replace
+ * **Y\*** --- The new value for the property
+
+ **Examples**
+ To replace an existing value:
+
+ .. code-block:: custsqlite
+
+ ;SELECT json_replace('{"a": 1}', '$.a', 2)
+ {"a":2}
+
+ To replace a value without creating a new property:
+
+ .. code-block:: custsqlite
+
+ ;SELECT json_replace('{"a": 1}', '$.a', 2, '$.b', 3)
+ {"a":2}
+
+ **See Also**
+ :ref:`jget`, :ref:`json_array_length`, :ref:`json_array`, :ref:`json_concat`, :ref:`json_contains`, :ref:`json_each`, :ref:`json_extract`, :ref:`json_group_array`, :ref:`json_group_object`, :ref:`json_insert`, :ref:`json_object`, :ref:`json_quote`, :ref:`json_remove`, :ref:`json_set`, :ref:`json_tree`, :ref:`json_type`, :ref:`json_valid`, :ref:`json`, :ref:`yaml_to_json`
+
+----
+
+
+.. _json_set:
+
+json_set(*X*, *P*, *Y*)
+^^^^^^^^^^^^^^^^^^^^^^^
+
+ Inserts or replaces existing values in a JSON object/array at the given locations
+
+ **Parameters**
+ * **X\*** --- The JSON value to update
+ * **P\*** --- The path to the insertion point. A '#' array index means append the value
+ * **Y\*** --- The value to set
+
+ **Examples**
+ To replace an existing array element:
+
+ .. code-block:: custsqlite
+
+ ;SELECT json_set('[1, 2]', '$[1]', 3)
+ [1,3]
+
+ To replace a value and create a new property:
+
+ .. code-block:: custsqlite
+
+ ;SELECT json_set('{"a": 1}', '$.a', 2, '$.b', 3)
+ {"a":2,"b":3}
+
+ **See Also**
+ :ref:`jget`, :ref:`json_array_length`, :ref:`json_array`, :ref:`json_concat`, :ref:`json_contains`, :ref:`json_each`, :ref:`json_extract`, :ref:`json_group_array`, :ref:`json_group_object`, :ref:`json_insert`, :ref:`json_object`, :ref:`json_quote`, :ref:`json_remove`, :ref:`json_replace`, :ref:`json_tree`, :ref:`json_type`, :ref:`json_valid`, :ref:`json`, :ref:`yaml_to_json`
+
+----
+
+
+.. _json_tree:
+
+json_tree(*X*, *\[P\]*)
+^^^^^^^^^^^^^^^^^^^^^^^
+
+ A table-valued-function that recursively descends through a JSON value
+
+ **Parameters**
+ * **X\*** --- The JSON value to query
+ * **P** --- The path to the value to query
+
+ **Examples**
+ To iterate over an array:
+
+ .. code-block:: custsqlite
+
+ ;SELECT key,value,type,atom,fullkey,path FROM json_tree('[null,1,"two",{"three":4.5}]')
+ key value type atom fullkey path
+ <NULL> [null,1⋯":4.5}] array <NULL> $ $
+ 0 <NULL> null <NULL> $[0] $
+ 1 1 integer 1 $[1] $
+ 2 two text two $[2] $
+ 3 {"three":4.5} object <NULL> $[3] $
+ three 4.5 real 4.5 $[3].three $[3]
+
+ **See Also**
+ :ref:`jget`, :ref:`json_array_length`, :ref:`json_array`, :ref:`json_concat`, :ref:`json_contains`, :ref:`json_each`, :ref:`json_extract`, :ref:`json_group_array`, :ref:`json_group_object`, :ref:`json_insert`, :ref:`json_object`, :ref:`json_quote`, :ref:`json_remove`, :ref:`json_replace`, :ref:`json_set`, :ref:`json_type`, :ref:`json_valid`, :ref:`json`, :ref:`yaml_to_json`
+
+----
+
+
+.. _json_type:
+
+json_type(*X*, *\[P\]*)
+^^^^^^^^^^^^^^^^^^^^^^^
+
+ Returns the type of a JSON value
+
+ **Parameters**
+ * **X\*** --- The JSON value to query
+ * **P** --- The path to the value
+
+ **Examples**
+ To get the type of a value:
+
+ .. code-block:: custsqlite
+
+ ;SELECT json_type('[null,1,2.1,"three",{"four":5}]')
+ array
+
+ To get the type of an array element:
+
+ .. code-block:: custsqlite
+
+ ;SELECT json_type('[null,1,2.1,"three",{"four":5}]', '$[0]')
+ null
+
+ To get the type of a string:
+
+ .. code-block:: custsqlite
+
+ ;SELECT json_type('[null,1,2.1,"three",{"four":5}]', '$[3]')
+ text
+
+ **See Also**
+ :ref:`jget`, :ref:`json_array_length`, :ref:`json_array`, :ref:`json_concat`, :ref:`json_contains`, :ref:`json_each`, :ref:`json_extract`, :ref:`json_group_array`, :ref:`json_group_object`, :ref:`json_insert`, :ref:`json_object`, :ref:`json_quote`, :ref:`json_remove`, :ref:`json_replace`, :ref:`json_set`, :ref:`json_tree`, :ref:`json_valid`, :ref:`json`, :ref:`yaml_to_json`
+
+----
+
+
+.. _json_valid:
+
+json_valid(*X*)
+^^^^^^^^^^^^^^^
+
+ Tests if the given value is valid JSON
+
+ **Parameters**
+ * **X\*** --- The value to check
+
+ **Examples**
+ To check an empty string:
+
+ .. code-block:: custsqlite
+
+ ;SELECT json_valid('')
+ 0
+
+ To check a string:
+
+ .. code-block:: custsqlite
+
+ ;SELECT json_valid('"a"')
+ 1
+
+ **See Also**
+ :ref:`jget`, :ref:`json_array_length`, :ref:`json_array`, :ref:`json_concat`, :ref:`json_contains`, :ref:`json_each`, :ref:`json_extract`, :ref:`json_group_array`, :ref:`json_group_object`, :ref:`json_insert`, :ref:`json_object`, :ref:`json_quote`, :ref:`json_remove`, :ref:`json_replace`, :ref:`json_set`, :ref:`json_tree`, :ref:`json_type`, :ref:`json`, :ref:`yaml_to_json`
----
@@ -1868,7 +2418,7 @@ julianday(*timestring*, *modifier*)
2457848.400949074
**See Also**
- :ref:`date`, :ref:`datetime`, :ref:`humanize_duration`, :ref:`strftime`, :ref:`time`, :ref:`timediff`, :ref:`timeslice`
+ :ref:`date`, :ref:`datetime`, :ref:`humanize_duration`, :ref:`strftime`, :ref:`time`, :ref:`timediff`, :ref:`timeslice`, :ref:`timezone`
----
@@ -1963,7 +2513,7 @@ leftstr(*str*, *N*)
abc
**See Also**
- :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
+ :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`humanize_id`, :ref:`instr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`timezone`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
----
@@ -1987,7 +2537,7 @@ length(*str*)
3
**See Also**
- :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
+ :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`humanize_id`, :ref:`instr`, :ref:`leftstr`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`timezone`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
----
@@ -2059,6 +2609,8 @@ lnav_top_file()
Return the name of the file that the top line in the current view came from.
+ **PRQL Name**: lnav.view.top_file
+
----
@@ -2070,6 +2622,8 @@ lnav_version()
Return the current version of lnav
+ **PRQL Name**: lnav.version
+
----
@@ -2136,6 +2690,19 @@ log10(*x*)
----
+.. _log_msg_line:
+
+log_msg_line()
+^^^^^^^^^^^^^^
+
+ Return the starting line number of the focused log message.
+
+ **PRQL Name**: lnav.view.msg_line
+
+
+----
+
+
.. _log_top_datetime:
log_top_datetime()
@@ -2143,6 +2710,8 @@ log_top_datetime()
Return the timestamp of the line at the top of the log view.
+ **PRQL Name**: lnav.view.top_datetime
+
----
@@ -2152,7 +2721,9 @@ log_top_datetime()
log_top_line()
^^^^^^^^^^^^^^
- Return the line number at the top of the log view.
+ Return the number of the focused line of the log view.
+
+ **PRQL Name**: lnav.view.top_line
----
@@ -2165,6 +2736,8 @@ logfmt2json(*str*)
Convert a logfmt-encoded string into JSON
+ **PRQL Name**: logfmt.to_json
+
**Parameters**
* **str\*** --- The logfmt message to parse
@@ -2177,7 +2750,7 @@ logfmt2json(*str*)
{"foo":1,"bar":2,"name":"Rolo Tomassi"}
**See Also**
- :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
+ :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`humanize_id`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`timezone`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
----
@@ -2201,7 +2774,7 @@ lower(*str*)
abc
**See Also**
- :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
+ :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`humanize_id`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`timezone`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
----
@@ -2233,7 +2806,7 @@ ltrim(*str*, *\[chars\]*)
c
**See Also**
- :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
+ :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`humanize_id`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`timezone`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
----
@@ -2390,7 +2963,7 @@ padc(*str*, *len*)
abcdef ghi
**See Also**
- :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
+ :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`humanize_id`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`timezone`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
----
@@ -2422,7 +2995,7 @@ padl(*str*, *len*)
abcdef
**See Also**
- :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
+ :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`humanize_id`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`timezone`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
----
@@ -2454,7 +3027,7 @@ padr(*str*, *len*)
abcdefghi
**See Also**
- :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
+ :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`humanize_id`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`timezone`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
----
@@ -2475,17 +3048,17 @@ parse_url(*url*)
.. code-block:: custsqlite
;SELECT parse_url('https://example.com/search?q=hello%20world')
- {"scheme":"https","user":null,"password":null,"host":"example.com","port":null,"path":"/search","query":"q=hello%20world","parameters":{"q":"hello world"},"fragment":null}
+ {"scheme":"https","username":null,"password":null,"host":"example.com","port":null,"path":"/search","query":"q=hello%20world","parameters":{"q":"hello world"},"fragment":null}
To parse the URL 'https://alice@[fe80::14ff:4ee5:1215:2fb2]':
.. code-block:: custsqlite
;SELECT parse_url('https://alice@[fe80::14ff:4ee5:1215:2fb2]')
- {"scheme":"https","user":"alice","password":null,"host":"[fe80::14ff:4ee5:1215:2fb2]","port":null,"path":"/","query":null,"parameters":null,"fragment":null}
+ {"scheme":"https","username":"alice","password":null,"host":"[fe80::14ff:4ee5:1215:2fb2]","port":null,"path":"/","query":null,"parameters":null,"fragment":null}
**See Also**
- :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
+ :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`humanize_id`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`timezone`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
----
@@ -2583,7 +3156,7 @@ printf(*format*, *X*)
value: 00011
**See Also**
- :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
+ :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`humanize_id`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`timezone`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
----
@@ -2607,7 +3180,7 @@ proper(*str*)
Hello, World!
**See Also**
- :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
+ :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`humanize_id`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`timezone`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
----
@@ -2667,13 +3240,25 @@ radians(*degrees*)
.. _raise_error:
-raise_error(*msg*)
-^^^^^^^^^^^^^^^^^^
+raise_error(*msg*, *\[reason\]*)
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Raises an error with the given message when executed
**Parameters**
* **msg\*** --- The error message
+ * **reason** --- The reason the error occurred
+
+ **Examples**
+ To raise an error if a variable is not set:
+
+ .. code-block:: custsqlite
+
+ ;SELECT ifnull($val, raise_error('please set $val', 'because'))
+ ✘ error: please set $val
+ reason: because
+ --> command:1
+
----
@@ -2724,6 +3309,8 @@ readlink(*path*)
Read the target of a symbolic link.
+ **PRQL Name**: fs.readlink
+
**Parameters**
* **path\*** --- The path to the symbolic link.
@@ -2740,6 +3327,8 @@ realpath(*path*)
Returns the resolved version of the given path, expanding symbolic links and resolving '.' and '..' references.
+ **PRQL Name**: fs.realpath
+
**Parameters**
* **path\*** --- The path to resolve.
@@ -2790,7 +3379,7 @@ regexp_capture(*string*, *pattern*)
1 2 <NULL> 3 8 9 2
**See Also**
- :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
+ :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`humanize_id`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`timezone`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
----
@@ -2813,12 +3402,12 @@ regexp_capture_into_json(*string*, *pattern*, *\[options\]*)
.. code-block:: custsqlite
;SELECT * FROM regexp_capture_into_json('a=1; b=2', '(\w+)=(\d+)')
- match_index content
- 0 {"col_0":"a","col_1":1}
- 1 {"col_0":"b","col_1":2}
+ match_index content
+ 0 {"col_0⋯l_1":1}
+ 1 {"col_0⋯l_1":2}
**See Also**
- :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
+ :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`humanize_id`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`timezone`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
----
@@ -2830,6 +3419,8 @@ regexp_match(*re*, *str*)
Match a string against a regular expression and return the capture groups as JSON.
+ **PRQL Name**: text.regexp_match
+
**Parameters**
* **re\*** --- The regular expression to use
* **str\*** --- The string to test against the regular expression
@@ -2857,7 +3448,7 @@ regexp_match(*re*, *str*)
{"num":123,"str":"four"}
**See Also**
- :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_replace`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
+ :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`humanize_id`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_replace`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`timezone`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
----
@@ -2869,6 +3460,8 @@ regexp_replace(*str*, *re*, *repl*)
Replace the parts of a string that match a regular expression.
+ **PRQL Name**: text.regexp_replace
+
**Parameters**
* **str\*** --- The string to perform replacements on
* **re\*** --- The regular expression to match
@@ -2890,7 +3483,7 @@ regexp_replace(*str*, *re*, *repl*)
<123> <abc>
**See Also**
- :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_match`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
+ :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`humanize_id`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_match`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`timezone`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
----
@@ -2923,7 +3516,7 @@ replace(*str*, *old*, *replacement*)
zbc
**See Also**
- :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
+ :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`humanize_id`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`timezone`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
----
@@ -2948,7 +3541,7 @@ replicate(*str*, *N*)
abcabcabc
**See Also**
- :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
+ :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`humanize_id`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`timezone`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
----
@@ -2960,6 +3553,8 @@ reverse(*str*)
Returns the reverse of the given string.
+ **PRQL Name**: text.reverse
+
**Parameters**
* **str\*** --- The string to reverse.
@@ -2972,7 +3567,7 @@ reverse(*str*)
cba
**See Also**
- :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
+ :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`humanize_id`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`timezone`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
----
@@ -3004,7 +3599,7 @@ rightstr(*str*, *N*)
abc
**See Also**
- :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
+ :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`humanize_id`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`timezone`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
----
@@ -3061,11 +3656,11 @@ row_number()
.. code-block:: custsqlite
;SELECT row_number() OVER (PARTITION BY ex_procname ORDER BY log_line) AS msg_num, ex_procname, log_body FROM lnav_example_log
- msg_num ex_procname log_body
- 1 gw Goodbye, World!
- 2 gw Goodbye, World!
- 3 gw Goodbye, World!
- 1 hw Hello, World!
+ msg_num ex_procname log_body
+ 1 gw Goodbye, World!
+ 2 gw Goodbye, World!
+ 3 gw Goodbye, World!
+ 1 hw Hello, World!
**See Also**
:ref:`cume_dist`, :ref:`dense_rank`, :ref:`first_value`, :ref:`lag`, :ref:`last_value`, :ref:`lead`, :ref:`nth_value`, :ref:`ntile`, :ref:`percent_rank`, :ref:`rank`
@@ -3100,7 +3695,29 @@ rtrim(*str*, *\[chars\]*)
a
**See Also**
- :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
+ :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`humanize_id`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`timezone`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
+
+----
+
+
+.. _shell_exec:
+
+shell_exec(*cmd*, *\[input\]*, *\[options\]*)
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+ Executes a shell command and returns its output.
+
+ **PRQL Name**: shell.exec
+
+ **Parameters**
+ * **cmd\*** --- The command to execute.
+ * **input** --- A blob of data to write to the command's standard input.
+ * **options** --- A JSON object containing options for the execution with the following properties:
+
+ * **env** --- An object containing the environment variables to set or, if NULL, to unset.
+
+ **See Also**
+
----
@@ -3150,6 +3767,8 @@ sparkline(*value*, *\[upper\]*)
Function used to generate a sparkline bar chart. The non-aggregate version converts a single numeric value on a range to a bar chart character. The aggregate version returns a string with a bar character for every numeric input
+ **PRQL Name**: text.sparkline
+
**Parameters**
* **value\*** --- The numeric value to convert
* **upper** --- The upper bound of the numeric range. The non-aggregate version defaults to 100. The aggregate version uses the largest value in the inputs.
@@ -3170,7 +3789,7 @@ sparkline(*value*, *\[upper\]*)
▁▂▃▄▅▆▇█
**See Also**
- :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
+ :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`humanize_id`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`timezone`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
----
@@ -3215,7 +3834,7 @@ spooky_hash(*str*)
f96b3d9c1a19f4394c97a1b79b1880df
**See Also**
- :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
+ :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`humanize_id`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`timezone`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
----
@@ -3329,7 +3948,7 @@ startswith(*str*, *prefix*)
0
**See Also**
- :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
+ :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`humanize_id`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`strfilter`, :ref:`substr`, :ref:`timezone`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
----
@@ -3354,7 +3973,7 @@ strfilter(*source*, *include*)
bcbc
**See Also**
- :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
+ :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`humanize_id`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`substr`, :ref:`timezone`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
----
@@ -3394,7 +4013,7 @@ strftime(*format*, *timestring*, *modifier*)
Julian day: 2457848.400949074
**See Also**
- :ref:`date`, :ref:`datetime`, :ref:`humanize_duration`, :ref:`julianday`, :ref:`time`, :ref:`timediff`, :ref:`timeslice`
+ :ref:`date`, :ref:`datetime`, :ref:`humanize_duration`, :ref:`julianday`, :ref:`time`, :ref:`timediff`, :ref:`timeslice`, :ref:`timezone`
----
@@ -3441,7 +4060,7 @@ substr(*str*, *start*, *\[size\]*)
b
**See Also**
- :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
+ :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`humanize_id`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`timezone`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
----
@@ -3504,7 +4123,7 @@ time(*timestring*, *modifier*)
21:37:22
**See Also**
- :ref:`date`, :ref:`datetime`, :ref:`humanize_duration`, :ref:`julianday`, :ref:`strftime`, :ref:`timediff`, :ref:`timeslice`
+ :ref:`date`, :ref:`datetime`, :ref:`humanize_duration`, :ref:`julianday`, :ref:`strftime`, :ref:`timediff`, :ref:`timeslice`, :ref:`timezone`
----
@@ -3516,6 +4135,8 @@ timediff(*time1*, *time2*)
Compute the difference between two timestamps in seconds
+ **PRQL Name**: time.diff
+
**Parameters**
* **time1\*** --- The first timestamp
* **time2\*** --- The timestamp to subtract from the first
@@ -3536,7 +4157,7 @@ timediff(*time1*, *time2*)
86400
**See Also**
- :ref:`date`, :ref:`datetime`, :ref:`humanize_duration`, :ref:`julianday`, :ref:`strftime`, :ref:`time`, :ref:`timeslice`
+ :ref:`date`, :ref:`datetime`, :ref:`humanize_duration`, :ref:`julianday`, :ref:`strftime`, :ref:`time`, :ref:`timeslice`, :ref:`timezone`
----
@@ -3548,6 +4169,8 @@ timeslice(*time*, *slice*)
Return the start of the slice of time that the given timestamp falls in. If the time falls outside of the slice, NULL is returned.
+ **PRQL Name**: time.slice
+
**Parameters**
* **time\*** --- The timestamp to get the time slice for.
* **slice\*** --- The size of the time slices
@@ -3566,22 +4189,49 @@ timeslice(*time*, *slice*)
;SELECT timeslice(log_time_msecs, '5m') AS slice, count(1)
FROM lnav_example_log GROUP BY slice
- slice count(1)
- 2017-02-03 04:05:00.000 2
- 2017-02-03 04:25:00.000 1
- 2017-02-03 04:55:00.000 1
+ slice count(1)
+ 2017-02⋯:00.000 2
+ 2017-02⋯:00.000 1
+ 2017-02⋯:00.000 1
To group log messages by those before 4:30am and after:
.. code-block:: custsqlite
;SELECT timeslice(log_time_msecs, 'before 4:30am') AS slice, count(1) FROM lnav_example_log GROUP BY slice
- slice count(1)
- <NULL> 1
- 2017-02-03 00:00:00.000 3
+ slice count(1)
+ <NULL> 1
+ 2017-02⋯:00.000 3
**See Also**
- :ref:`date`, :ref:`datetime`, :ref:`humanize_duration`, :ref:`julianday`, :ref:`strftime`, :ref:`time`, :ref:`timediff`
+ :ref:`date`, :ref:`datetime`, :ref:`humanize_duration`, :ref:`julianday`, :ref:`strftime`, :ref:`time`, :ref:`timediff`, :ref:`timezone`
+
+----
+
+
+.. _timezone:
+
+timezone(*tz*, *ts*)
+^^^^^^^^^^^^^^^^^^^^
+
+ Convert a timestamp to the given timezone
+
+ **PRQL Name**: time.to_zone
+
+ **Parameters**
+ * **tz\*** --- The target timezone
+ * **ts\*** --- The source timestamp
+
+ **Examples**
+ To convert a time to America/Los_Angeles:
+
+ .. code-block:: custsqlite
+
+ ;SELECT timezone('America/Los_Angeles', '2022-03-02T10:00')
+ 2022-03-02T02:00:00.000000-0800
+
+ **See Also**
+ :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`date`, :ref:`datetime`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`humanize_id`, :ref:`instr`, :ref:`julianday`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`strftime`, :ref:`substr`, :ref:`time`, :ref:`timediff`, :ref:`timeslice`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
----
@@ -3648,7 +4298,7 @@ trim(*str*, *\[chars\]*)
abc
**See Also**
- :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
+ :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`humanize_id`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`timezone`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
----
@@ -3701,7 +4351,7 @@ unicode(*X*)
97
**See Also**
- :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
+ :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`humanize_id`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`timezone`, :ref:`trim`, :ref:`unparse_url`, :ref:`upper`, :ref:`xpath`
----
@@ -3739,7 +4389,7 @@ unparse_url(*obj*)
https://example.com/
**See Also**
- :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath`
+ :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`humanize_id`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`timezone`, :ref:`trim`, :ref:`unicode`, :ref:`upper`, :ref:`xpath`
----
@@ -3763,7 +4413,7 @@ upper(*str*)
ABC
**See Also**
- :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`xpath`
+ :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`humanize_id`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`timezone`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`xpath`
----
@@ -3785,9 +4435,9 @@ xpath(*xpath*, *xmldoc*)
.. code-block:: custsqlite
;SELECT * FROM xpath('/abc/def', '<abc><def a="b">Hello</def><def>Bye</def></abc>')
- result node_path node_attr node_text
- <def a="b">Hello</def>␊ /abc/def[1] {"a":"b"} Hello
- <def>Bye</def>␊ /abc/def[2] {} Bye
+ result node_path node_attr node_text
+ <def a=⋯</def>␊ /abc/def[1] {"a":"b"} Hello
+ <def>Bye</def>␊ /abc/def[2] {} Bye
To select all 'a' attributes on the path '/abc/def':
@@ -3806,7 +4456,7 @@ xpath(*xpath*, *xmldoc*)
Hello ★ /abc/def/text() {} Hello ★
**See Also**
- :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`
+ :ref:`anonymize`, :ref:`char`, :ref:`charindex`, :ref:`decode`, :ref:`encode`, :ref:`endswith`, :ref:`extract`, :ref:`group_concat`, :ref:`group_spooky_hash_agg`, :ref:`gunzip`, :ref:`gzip`, :ref:`humanize_duration`, :ref:`humanize_file_size`, :ref:`humanize_id`, :ref:`instr`, :ref:`leftstr`, :ref:`length`, :ref:`logfmt2json`, :ref:`lower`, :ref:`ltrim`, :ref:`padc`, :ref:`padl`, :ref:`padr`, :ref:`parse_url`, :ref:`printf`, :ref:`proper`, :ref:`regexp_capture_into_json`, :ref:`regexp_capture`, :ref:`regexp_match`, :ref:`regexp_replace`, :ref:`replace`, :ref:`replicate`, :ref:`reverse`, :ref:`rightstr`, :ref:`rtrim`, :ref:`sparkline`, :ref:`spooky_hash`, :ref:`startswith`, :ref:`strfilter`, :ref:`substr`, :ref:`timezone`, :ref:`trim`, :ref:`unicode`, :ref:`unparse_url`, :ref:`upper`
----
@@ -3818,6 +4468,8 @@ yaml_to_json(*yaml*)
Convert a YAML document to a JSON-encoded string
+ **PRQL Name**: yaml.to_json
+
**Parameters**
* **yaml\*** --- The YAML value to convert to JSON.
@@ -3830,7 +4482,7 @@ yaml_to_json(*yaml*)
{"abc": "def"}
**See Also**
- :ref:`jget`, :ref:`json_concat`, :ref:`json_contains`, :ref:`json_group_array`, :ref:`json_group_object`
+ :ref:`jget`, :ref:`json_array_length`, :ref:`json_array`, :ref:`json_concat`, :ref:`json_contains`, :ref:`json_each`, :ref:`json_extract`, :ref:`json_group_array`, :ref:`json_group_object`, :ref:`json_insert`, :ref:`json_object`, :ref:`json_quote`, :ref:`json_remove`, :ref:`json_replace`, :ref:`json_set`, :ref:`json_tree`, :ref:`json_type`, :ref:`json_valid`, :ref:`json`
----
@@ -3848,3 +4500,478 @@ zeroblob(*N*)
----
+
+.. _dot_dump:
+
+;.dump *path*
+^^^^^^^^^^^^^
+
+ Dump the contents of the database
+
+ **Parameters**
+ * **path\*** --- The path to the file to write
+
+ **See Also**
+ :ref:`append_to`, :ref:`dot_read`, :ref:`echo`, :ref:`echoln`, :ref:`export_session_to`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`redirect_to`, :ref:`write_csv_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_view_to`
+
+----
+
+
+.. _dot_msgformats:
+
+;.msgformats
+^^^^^^^^^^^^
+
+ Executes a query that will summarize the different message formats found in the logs
+
+
+----
+
+
+.. _dot_read:
+
+;.read *path*
+^^^^^^^^^^^^^
+
+ Execute the SQLite statements in the given file
+
+ **Parameters**
+ * **path\*** --- The path to the file to write
+
+ **See Also**
+ :ref:`append_to`, :ref:`dot_dump`, :ref:`echo`, :ref:`echoln`, :ref:`export_session_to`, :ref:`pipe_line_to`, :ref:`pipe_to`, :ref:`redirect_to`, :ref:`write_csv_to`, :ref:`write_json_to`, :ref:`write_jsonlines_to`, :ref:`write_raw_to`, :ref:`write_screen_to`, :ref:`write_table_to`, :ref:`write_to`, :ref:`write_view_to`
+
+----
+
+
+.. _dot_schema:
+
+;.schema
+^^^^^^^^
+
+ Switch to the SCHEMA view that contains a dump of the current database schema
+
+
+----
+
+
+.. _prql_aggregate:
+
+aggregate *expr*
+^^^^^^^^^^^^^^^^
+
+ PRQL transform to summarize many rows into one
+
+ **Parameters**
+ * **expr\*** --- The aggregate expression(s)
+
+ **Examples**
+ To group values into a JSON array:
+
+ .. code-block:: custsqlite
+
+ ;from [{a=1}, {a=2}] | aggregate { arr = json.group_array a }
+ [1,2]
+
+ **See Also**
+ :ref:`prql_append`, :ref:`prql_derive`, :ref:`prql_filter`, :ref:`prql_from`, :ref:`prql_group`, :ref:`prql_join`, :ref:`prql_select`, :ref:`prql_sort`, :ref:`prql_take`, :ref:`stats_average_of`, :ref:`stats_by`, :ref:`stats_count_by`, :ref:`stats_hist`, :ref:`stats_sum_of`, :ref:`utils_distinct`
+
+----
+
+
+.. _prql_append:
+
+append *table*
+^^^^^^^^^^^^^^
+
+ PRQL transform to concatenate tables together
+
+ **Parameters**
+ * **table\*** --- The table to use as a source
+
+ **See Also**
+ :ref:`prql_aggregate`, :ref:`prql_derive`, :ref:`prql_filter`, :ref:`prql_from`, :ref:`prql_group`, :ref:`prql_join`, :ref:`prql_select`, :ref:`prql_sort`, :ref:`prql_take`, :ref:`stats_average_of`, :ref:`stats_by`, :ref:`stats_count_by`, :ref:`stats_hist`, :ref:`stats_sum_of`, :ref:`utils_distinct`
+
+----
+
+
+.. _prql_derive:
+
+derive *column*
+^^^^^^^^^^^^^^^
+
+ PRQL transform to derive one or more columns
+
+ **Parameters**
+ * **column\*** --- The new column
+
+ **Examples**
+ To add a column that is a multiplication of another:
+
+ .. code-block:: custsqlite
+
+ ;from [{a=1}, {a=2}] | derive b = a * 2
+ a b
+ 1 2
+ 2 4
+
+ **See Also**
+ :ref:`prql_aggregate`, :ref:`prql_append`, :ref:`prql_filter`, :ref:`prql_from`, :ref:`prql_group`, :ref:`prql_join`, :ref:`prql_select`, :ref:`prql_sort`, :ref:`prql_take`, :ref:`stats_average_of`, :ref:`stats_by`, :ref:`stats_count_by`, :ref:`stats_hist`, :ref:`stats_sum_of`, :ref:`utils_distinct`
+
+----
+
+
+.. _prql_filter:
+
+filter *expr*
+^^^^^^^^^^^^^
+
+ PRQL transform to pick rows based on their values
+
+ **Parameters**
+ * **expr\*** --- The expression to evaluate over each row
+
+ **Examples**
+ To pick rows where 'a' is greater than one:
+
+ .. code-block:: custsqlite
+
+ ;from [{a=1}, {a=2}] | filter a > 1
+ 2
+
+ **See Also**
+ :ref:`prql_aggregate`, :ref:`prql_append`, :ref:`prql_derive`, :ref:`prql_from`, :ref:`prql_group`, :ref:`prql_join`, :ref:`prql_select`, :ref:`prql_sort`, :ref:`prql_take`, :ref:`stats_average_of`, :ref:`stats_by`, :ref:`stats_count_by`, :ref:`stats_hist`, :ref:`stats_sum_of`, :ref:`utils_distinct`
+
+----
+
+
+.. _prql_from:
+
+from *table*
+^^^^^^^^^^^^
+
+ PRQL command to specify a data source
+
+ **Parameters**
+ * **table\*** --- The table to use as a source
+
+ **Examples**
+ To pull data from the 'http_status_codes' database table:
+
+ .. code-block:: custsqlite
+
+ ;from http_status_codes | take 3
+ status message
+ 100 Continue
+ 101 Switchi⋯otocols
+ 102 Processing
+
+ To use an array literal as a source:
+
+ .. code-block:: custsqlite
+
+ ;from [{ col1=1, col2='abc' }, { col1=2, col2='def' }]
+ col1 col2
+ 1 abc
+ 2 def
+
+ **See Also**
+ :ref:`prql_aggregate`, :ref:`prql_append`, :ref:`prql_derive`, :ref:`prql_filter`, :ref:`prql_group`, :ref:`prql_join`, :ref:`prql_select`, :ref:`prql_sort`, :ref:`prql_take`, :ref:`stats_average_of`, :ref:`stats_by`, :ref:`stats_count_by`, :ref:`stats_hist`, :ref:`stats_sum_of`, :ref:`utils_distinct`
+
+----
+
+
+.. _prql_group:
+
+group *key_columns* *pipeline*
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+ PRQL transform to partition rows into groups
+
+ **Parameters**
+ * **key_columns\*** --- The columns that define the group
+ * **pipeline\*** --- The pipeline to execute over a group
+
+ **Examples**
+ To group by log_level and count the rows in each partition:
+
+ .. code-block:: custsqlite
+
+ ;from lnav_example_log | group { log_level } (aggregate { count this })
+ log_level COUNT(*)
+ debug 1
+ info 1
+ warn 1
+ error 1
+
+ **See Also**
+ :ref:`prql_aggregate`, :ref:`prql_append`, :ref:`prql_derive`, :ref:`prql_filter`, :ref:`prql_from`, :ref:`prql_join`, :ref:`prql_select`, :ref:`prql_sort`, :ref:`prql_take`, :ref:`stats_average_of`, :ref:`stats_by`, :ref:`stats_count_by`, :ref:`stats_hist`, :ref:`stats_sum_of`, :ref:`utils_distinct`
+
+----
+
+
+.. _prql_join:
+
+join *\[side:inner\]* *table* *condition*
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+ PRQL transform to add columns from another table
+
+ **Parameters**
+ * **side** --- Specifies which rows to include
+ * **table\*** --- The other table to join with the current rows
+ * **condition\*** --- The condition used to join rows
+
+ **See Also**
+ :ref:`prql_aggregate`, :ref:`prql_append`, :ref:`prql_derive`, :ref:`prql_filter`, :ref:`prql_from`, :ref:`prql_group`, :ref:`prql_select`, :ref:`prql_sort`, :ref:`prql_take`, :ref:`stats_average_of`, :ref:`stats_by`, :ref:`stats_count_by`, :ref:`stats_hist`, :ref:`stats_sum_of`, :ref:`utils_distinct`
+
+----
+
+
+.. _prql_select:
+
+select *expr*
+^^^^^^^^^^^^^
+
+ PRQL transform to pick and compute columns
+
+ **Parameters**
+ * **expr\*** --- The columns to include in the result set
+
+ **Examples**
+ To pick the 'b' column from the rows:
+
+ .. code-block:: custsqlite
+
+ ;from [{a=1, b='abc'}, {a=2, b='def'}] | select b
+ b
+ abc
+ def
+
+ To compute a new column from an input:
+
+ .. code-block:: custsqlite
+
+ ;from [{a=1}, {a=2}] | select b = a * 2
+ b
+ 2
+ 4
+
+ **See Also**
+ :ref:`prql_aggregate`, :ref:`prql_append`, :ref:`prql_derive`, :ref:`prql_filter`, :ref:`prql_from`, :ref:`prql_group`, :ref:`prql_join`, :ref:`prql_sort`, :ref:`prql_take`, :ref:`stats_average_of`, :ref:`stats_by`, :ref:`stats_count_by`, :ref:`stats_hist`, :ref:`stats_sum_of`, :ref:`utils_distinct`
+
+----
+
+
+.. _prql_sort:
+
+sort *expr*
+^^^^^^^^^^^
+
+ PRQL transform to sort rows
+
+ **Parameters**
+ * **expr\*** --- The values to use when ordering the result set
+
+ **Examples**
+ To sort the rows in descending order:
+
+ .. code-block:: custsqlite
+
+ ;from [{a=1}, {a=2}] | sort {-a}
+ a
+ 2
+ 1
+
+ **See Also**
+ :ref:`prql_aggregate`, :ref:`prql_append`, :ref:`prql_derive`, :ref:`prql_filter`, :ref:`prql_from`, :ref:`prql_group`, :ref:`prql_join`, :ref:`prql_select`, :ref:`prql_take`, :ref:`stats_average_of`, :ref:`stats_by`, :ref:`stats_count_by`, :ref:`stats_hist`, :ref:`stats_sum_of`, :ref:`utils_distinct`
+
+----
+
+
+.. _stats_average_of:
+
+stats.average_of *col*
+^^^^^^^^^^^^^^^^^^^^^^
+
+ Compute the average of col
+
+ **Parameters**
+ * **col\*** --- The column to average
+
+ **Examples**
+ To get the average of a:
+
+ .. code-block:: custsqlite
+
+ ;from [{a=1}, {a=1}, {a=2}] | stats.average_of a
+ 1.3333333333333333
+
+ **See Also**
+ :ref:`prql_aggregate`, :ref:`prql_append`, :ref:`prql_derive`, :ref:`prql_filter`, :ref:`prql_from`, :ref:`prql_group`, :ref:`prql_join`, :ref:`prql_select`, :ref:`prql_sort`, :ref:`prql_take`, :ref:`stats_by`, :ref:`stats_count_by`, :ref:`stats_hist`, :ref:`stats_sum_of`, :ref:`utils_distinct`
+
+----
+
+
+.. _stats_by:
+
+stats.by *col* *values*
+^^^^^^^^^^^^^^^^^^^^^^^
+
+ A shorthand for grouping and aggregating
+
+ **Parameters**
+ * **col\*** --- The column to sum
+ * **values\*** --- The aggregations to perform
+
+ **Examples**
+ To partition by a and get the sum of b:
+
+ .. code-block:: custsqlite
+
+ ;from [{a=1, b=1}, {a=1, b=1}, {a=2, b=1}] | stats.by a {sum b}
+ a COALESC⋯(b), 0)
+ 1 2
+ 2 1
+
+ **See Also**
+ :ref:`prql_aggregate`, :ref:`prql_append`, :ref:`prql_derive`, :ref:`prql_filter`, :ref:`prql_from`, :ref:`prql_group`, :ref:`prql_join`, :ref:`prql_select`, :ref:`prql_sort`, :ref:`prql_take`, :ref:`stats_average_of`, :ref:`stats_count_by`, :ref:`stats_hist`, :ref:`stats_sum_of`, :ref:`utils_distinct`
+
+----
+
+
+.. _stats_count_by:
+
+stats.count_by *column*
+^^^^^^^^^^^^^^^^^^^^^^^
+
+ Partition rows and count the number of rows in each partition
+
+ **Parameters**
+ * **column** --- The columns to group by
+
+ **Examples**
+ To count rows for a particular value of column 'a':
+
+ .. code-block:: custsqlite
+
+ ;from [{a=1}, {a=1}, {a=2}] | stats.count_by a
+ a total
+ 1 2
+ 2 1
+
+ **See Also**
+ :ref:`prql_aggregate`, :ref:`prql_append`, :ref:`prql_derive`, :ref:`prql_filter`, :ref:`prql_from`, :ref:`prql_group`, :ref:`prql_join`, :ref:`prql_select`, :ref:`prql_sort`, :ref:`prql_take`, :ref:`stats_average_of`, :ref:`stats_by`, :ref:`stats_hist`, :ref:`stats_sum_of`, :ref:`utils_distinct`
+
+----
+
+
+.. _stats_hist:
+
+stats.hist *col* *\[slice:'1h'\]* *\[top:10\]*
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+ Count the top values per bucket of time
+
+ **Parameters**
+ * **col\*** --- The column to count
+ * **slice** --- The time slice
+ * **top** --- The limit on the number of values to report
+
+ **Examples**
+ To chart the values of ex_procname over time:
+
+ .. code-block:: custsqlite
+
+ ;from lnav_example_log | stats.hist ex_procname
+ tslice v
+ 2017-02⋯:00.000 {"gw":3,"hw":1}
+
+ **See Also**
+ :ref:`prql_aggregate`, :ref:`prql_append`, :ref:`prql_derive`, :ref:`prql_filter`, :ref:`prql_from`, :ref:`prql_group`, :ref:`prql_join`, :ref:`prql_select`, :ref:`prql_sort`, :ref:`prql_take`, :ref:`stats_average_of`, :ref:`stats_by`, :ref:`stats_count_by`, :ref:`stats_sum_of`, :ref:`utils_distinct`
+
+----
+
+
+.. _stats_sum_of:
+
+stats.sum_of *col*
+^^^^^^^^^^^^^^^^^^
+
+ Compute the sum of col
+
+ **Parameters**
+ * **col\*** --- The column to sum
+
+ **Examples**
+ To get the sum of a:
+
+ .. code-block:: custsqlite
+
+ ;from [{a=1}, {a=1}, {a=2}] | stats.sum_of a
+ 4
+
+ **See Also**
+ :ref:`prql_aggregate`, :ref:`prql_append`, :ref:`prql_derive`, :ref:`prql_filter`, :ref:`prql_from`, :ref:`prql_group`, :ref:`prql_join`, :ref:`prql_select`, :ref:`prql_sort`, :ref:`prql_take`, :ref:`stats_average_of`, :ref:`stats_by`, :ref:`stats_count_by`, :ref:`stats_hist`, :ref:`utils_distinct`
+
+----
+
+
+.. _prql_take:
+
+take *n_or_range*
+^^^^^^^^^^^^^^^^^
+
+ PRQL command to pick rows based on their position
+
+ **Parameters**
+ * **n_or_range\*** --- The number of rows or range
+
+ **Examples**
+ To pick the first row:
+
+ .. code-block:: custsqlite
+
+ ;from [{a=1}, {a=2}, {a=3}] | take 1
+ 1
+
+ To pick the second and third rows:
+
+ .. code-block:: custsqlite
+
+ ;from [{a=1}, {a=2}, {a=3}] | take 2..3
+ a
+ 2
+ 3
+
+ **See Also**
+ :ref:`prql_aggregate`, :ref:`prql_append`, :ref:`prql_derive`, :ref:`prql_filter`, :ref:`prql_from`, :ref:`prql_group`, :ref:`prql_join`, :ref:`prql_select`, :ref:`prql_sort`, :ref:`stats_average_of`, :ref:`stats_by`, :ref:`stats_count_by`, :ref:`stats_hist`, :ref:`stats_sum_of`, :ref:`utils_distinct`
+
+----
+
+
+.. _utils_distinct:
+
+utils.distinct *col*
+^^^^^^^^^^^^^^^^^^^^
+
+ A shorthand for getting distinct values of col
+
+ **Parameters**
+ * **col\*** --- The column to sum
+
+ **Examples**
+ To get the distinct values of a:
+
+ .. code-block:: custsqlite
+
+ ;from [{a=1}, {a=1}, {a=2}] | utils.distinct a
+ a
+ 1
+ 2
+
+ **See Also**
+ :ref:`prql_aggregate`, :ref:`prql_append`, :ref:`prql_derive`, :ref:`prql_filter`, :ref:`prql_from`, :ref:`prql_group`, :ref:`prql_join`, :ref:`prql_select`, :ref:`prql_sort`, :ref:`prql_take`, :ref:`stats_average_of`, :ref:`stats_by`, :ref:`stats_count_by`, :ref:`stats_hist`, :ref:`stats_sum_of`
+
+----
+
diff --git a/src/json-extension-functions.cc b/src/json-extension-functions.cc
index 36dc290..034b713 100644
--- a/src/json-extension-functions.cc
+++ b/src/json-extension-functions.cc
@@ -43,10 +43,10 @@
#include "yajlpp/json_op.hh"
#include "yajlpp/yajlpp.hh"
-using namespace mapbox;
-
#define JSON_SUBTYPE 74 /* Ascii for "J" */
+namespace {
+
class sql_json_op : public json_op {
public:
explicit sql_json_op(json_ptr& ptr) : json_op(ptr){};
@@ -68,7 +68,8 @@ null_or_default(sqlite3_context* context, int argc, sqlite3_value* argv[])
}
struct contains_userdata {
- util::variant<string_fragment, sqlite3_int64, bool> cu_match_value{false};
+ mapbox::util::variant<string_fragment, sqlite3_int64, bool> cu_match_value{
+ false};
size_t cu_depth{0};
bool cu_result{false};
};
@@ -119,12 +120,10 @@ json_contains(vtab_types::nullable<const char> nullable_json_in,
}
const auto* json_in = nullable_json_in.n_value;
- auto_mem<yajl_handle_t> handle(yajl_free);
- yajl_callbacks cb;
- contains_userdata cu;
- memset(&cb, 0, sizeof(cb));
- handle = yajl_alloc(&cb, nullptr, &cu);
+ yajl_callbacks cb{};
+ contains_userdata cu;
+ auto handle = yajlpp::alloc_handle(&cb, &cu);
cb.yajl_start_array = +[](void* ctx) {
auto& cu = *((contains_userdata*) ctx);
@@ -266,17 +265,16 @@ sql_jget(sqlite3_context* context, int argc, sqlite3_value** argv)
return;
}
- const char* json_in = (const char*) sqlite3_value_text(argv[0]);
+ const auto json_in = from_sqlite<string_fragment>()(argc, argv, 0);
if (sqlite3_value_type(argv[1]) == SQLITE_NULL) {
- sqlite3_result_text(context, json_in, -1, SQLITE_TRANSIENT);
+ sqlite3_result_text(context, json_in.data(), -1, SQLITE_TRANSIENT);
return;
}
const char* ptr_in = (const char*) sqlite3_value_text(argv[1]);
json_ptr jp(ptr_in);
sql_json_op jo(jp);
- auto_mem<yajl_handle_t> handle(yajl_free);
unsigned char* err;
yajlpp_gen gen;
@@ -289,16 +287,15 @@ sql_jget(sqlite3_context* context, int argc, sqlite3_value** argv)
jo.jo_ptr_callbacks.yajl_number = gen_handle_number;
jo.jo_ptr_data = gen.get_handle();
- handle.reset(yajl_alloc(&json_op::ptr_callbacks, nullptr, &jo));
- switch (yajl_parse(
- handle.in(), (const unsigned char*) json_in, strlen(json_in)))
- {
+ auto handle = yajlpp::alloc_handle(&json_op::ptr_callbacks, &jo);
+ switch (yajl_parse(handle.in(), json_in.udata(), json_in.length())) {
case yajl_status_error: {
- err = yajl_get_error(handle.in(),
- 1,
- (const unsigned char*) json_in,
- strlen(json_in));
- sqlite3_result_error(context, (const char*) err, -1);
+ err = yajl_get_error(
+ handle.in(), 1, json_in.udata(), json_in.length());
+ auto um = lnav::console::user_message::error("invalid JSON")
+ .with_reason((const char*) err);
+
+ to_sqlite(context, um);
yajl_free_error(handle.in(), err);
return;
}
@@ -318,11 +315,12 @@ sql_jget(sqlite3_context* context, int argc, sqlite3_value** argv)
switch (yajl_complete_parse(handle.in())) {
case yajl_status_error: {
- err = yajl_get_error(handle.in(),
- 1,
- (const unsigned char*) json_in,
- strlen(json_in));
- sqlite3_result_error(context, (const char*) err, -1);
+ err = yajl_get_error(
+ handle.in(), 1, json_in.udata(), json_in.length());
+ auto um = lnav::console::user_message::error("invalid JSON")
+ .with_reason((const char*) err);
+
+ to_sqlite(context, um);
yajl_free_error(handle.in(), err);
return;
}
@@ -342,10 +340,7 @@ sql_jget(sqlite3_context* context, int argc, sqlite3_value** argv)
switch (jo.sjo_type) {
case SQLITE3_TEXT:
- sqlite3_result_text(context,
- jo.sjo_str.c_str(),
- jo.sjo_str.size(),
- SQLITE_TRANSIENT);
+ to_sqlite(context, jo.sjo_str);
return;
case SQLITE_NULL:
sqlite3_result_null(context);
@@ -358,7 +353,7 @@ sql_jget(sqlite3_context* context, int argc, sqlite3_value** argv)
return;
}
- string_fragment result = gen.to_string_fragment();
+ const auto result = gen.to_string_fragment();
if (result.empty()) {
null_or_default(context, argc, argv);
@@ -468,7 +463,6 @@ concat_gen_end_array(void* ctx)
static void
concat_gen_elements(yajl_gen gen, const unsigned char* text, size_t len)
{
- auto_mem<yajl_handle_t> handle(yajl_free);
yajl_callbacks callbacks = {nullptr};
concat_context cc{gen};
@@ -482,7 +476,7 @@ concat_gen_elements(yajl_gen gen, const unsigned char* text, size_t len)
callbacks.yajl_start_array = concat_gen_start_array;
callbacks.yajl_end_array = concat_gen_end_array;
- handle = yajl_alloc(&callbacks, nullptr, &cc);
+ auto handle = yajlpp::alloc_handle(&callbacks, &cc);
yajl_config(handle, yajl_allow_comments, 1);
if (yajl_parse(handle, (const unsigned char*) text, len) != yajl_status_ok
|| yajl_complete_parse(handle) != yajl_status_ok)
@@ -600,7 +594,7 @@ sql_json_group_object_step(sqlite3_context* context,
return;
}
- json_agg_context* jac = (json_agg_context*) sqlite3_aggregate_context(
+ auto* jac = (json_agg_context*) sqlite3_aggregate_context(
context, sizeof(json_agg_context));
if (jac->jac_yajl_gen == nullptr) {
@@ -662,8 +656,7 @@ sql_json_group_object_step(sqlite3_context* context,
static void
sql_json_group_object_final(sqlite3_context* context)
{
- json_agg_context* jac
- = (json_agg_context*) sqlite3_aggregate_context(context, 0);
+ auto* jac = (json_agg_context*) sqlite3_aggregate_context(context, 0);
if (jac == nullptr) {
sqlite3_result_text(context, "{}", -1, SQLITE_STATIC);
@@ -686,7 +679,7 @@ sql_json_group_array_step(sqlite3_context* context,
int argc,
sqlite3_value** argv)
{
- json_agg_context* jac = (json_agg_context*) sqlite3_aggregate_context(
+ auto* jac = (json_agg_context*) sqlite3_aggregate_context(
context, sizeof(json_agg_context));
if (jac->jac_yajl_gen == nullptr) {
@@ -759,6 +752,8 @@ sql_json_group_array_final(sqlite3_context* context)
}
}
+} // namespace
+
int
json_extension_functions(struct FuncDef** basic_funcs,
struct FuncDefAgg** agg_funcs)
@@ -778,6 +773,7 @@ json_extension_functions(struct FuncDef** basic_funcs,
"array with "
"two elements: the initial value and the given value.")
.sql_function()
+ .with_prql_path({"json", "concat"})
.with_parameter({"json", "The initial JSON value."})
.with_parameter(
help_text("value",
@@ -801,6 +797,7 @@ json_extension_functions(struct FuncDef** basic_funcs,
help_text("json_contains",
"Check if a JSON value contains the given element.")
.sql_function()
+ .with_prql_path({"json", "contains"})
.with_parameter({"json", "The JSON value to query."})
.with_parameter(
{"value", "The value to look for in the first argument"})
@@ -823,6 +820,7 @@ json_extension_functions(struct FuncDef** basic_funcs,
help_text("jget",
"Get the value from a JSON object using a JSON-Pointer.")
.sql_function()
+ .with_prql_path({"json", "get"})
.with_parameter({"json", "The JSON object to query."})
.with_parameter(
{"ptr", "The JSON-Pointer to lookup in the object."})
@@ -864,6 +862,7 @@ json_extension_functions(struct FuncDef** basic_funcs,
sql_json_group_object_final,
help_text("json_group_object")
.sql_function()
+ .with_prql_path({"json", "group_object"})
.with_summary(
"Collect the given values from a query into a JSON object")
.with_parameter(
@@ -888,6 +887,7 @@ json_extension_functions(struct FuncDef** basic_funcs,
sql_json_group_array_final,
help_text("json_group_array")
.sql_function()
+ .with_prql_path({"json", "group_array"})
.with_summary(
"Collect the given values from a query into a JSON array")
.with_parameter(
diff --git a/src/keymaps/default-keymap.json b/src/keymaps/default-keymap.json
index 4848f3e..34c63ac 100644
--- a/src/keymaps/default-keymap.json
+++ b/src/keymaps/default-keymap.json
@@ -11,9 +11,10 @@
"keymap_def_pop_view": "Press ${ansi_bold}q${ansi_norm} to return to the previous view",
"keymap_def_zoom": "Press ${ansi_bold}z${ansi_norm}/${ansi_bold}Z${ansi_norm} to zoom in/out",
"keymap_def_clear": "Press ${ansi_bold}C${ansi_norm} to clear marked messages",
- "keymap_def_prev_location": "Press ${ansi_bold}{${ansi_norm} to move to the previous location in history",
- "keymap_def_next_location": "Press ${ansi_bold}}${ansi_norm} to move to the next location in history",
- "keymap_def_next_mark": "Press ${ansi_bold}c${ansi_norm} to copy marked lines to the clipboard; press ${ansi_bold}C${ansi_norm} to clear marked lines"
+ "keymap_def_prev_section": "Press ${ansi_bold}{${ansi_norm} to move to the previous section in the view",
+ "keymap_def_next_section": "Press ${ansi_bold}}${ansi_norm} to move to the next section in the view",
+ "keymap_def_next_mark": "Press ${ansi_bold}c${ansi_norm} to copy marked lines to the clipboard; press ${ansi_bold}C${ansi_norm} to clear marked lines",
+ "keymap_def_time_offset": "Press ${ansi_bold}s${ansi_norm}/${ansi_bold}S${ansi_norm} to move forward/backward through slow downs"
},
"ui": {
"keymap-defs": {
@@ -76,7 +77,7 @@
"command": ";UPDATE lnav_views SET top = top + (height / 2), selection = (CASE movement WHEN 'top' THEN selection ELSE top + (height / 2) + (selection - top) END) WHERE name = (SELECT name FROM lnav_top_view)"
},
"x15": {
- "command": ";UPDATE lnav_views SET top = top - (height / 2), selection = (CASE movement WHEN 'top' THEN selection ELSE top - (height / 2) + (selection - top) END) WHERE name = (SELECT name FROM lnav_top_view)"
+ "command": ";UPDATE lnav_views SET top = max(0, top - (height / 2)), selection = (CASE movement WHEN 'top' THEN selection ELSE max(0, top - (height / 2) + (selection - top)) END) WHERE name = (SELECT name FROM lnav_top_view)"
},
"x3d": {
"command": ";UPDATE lnav_views SET paused = 1 - paused"
@@ -113,7 +114,7 @@
"alt-msg": "${keymap_def_alt_hour_boundary}"
},
"x63": {
- "command": ":write-to /dev/clipboard",
+ "command": "|lnav-copy-text",
"alt-msg": "${keymap_def_clear}"
},
"x67": {
@@ -131,6 +132,19 @@
"command": ":next-mark search",
"alt-msg": "${keymap_def_scroll_horiz}"
},
+ "x54": {
+ "command": ";UPDATE lnav_views SET options = json_set(options, '$.row-time-offset', CASE jget(options, '/row-time-offset', 'hide') WHEN 'hide' THEN 'show' ELSE 'hide' END) WHERE name = (SELECT name FROM lnav_top_view)",
+ "alt-msg": "${keymap_def_time_offset}"
+ },
+ "x70": {
+ "command": ";UPDATE lnav_views SET options = json_set(options, '$.row-details', CASE jget(options, '/row-details', 'hide') WHEN 'hide' THEN 'show' ELSE 'hide' END) WHERE name = (SELECT name FROM lnav_top_view)"
+ },
+ "x78": {
+ "command": ";UPDATE lnav_views SET options = json_set(options, '$.hidden-fields', CASE jget(options, '/hidden-fields', 'hide') WHEN 'hide' THEN 'show' ELSE 'hide' END) WHERE name = (SELECT name FROM lnav_top_view)"
+ },
+ "x17": {
+ "command": ";UPDATE lnav_views SET options = json_set(options, '$.word-wrap', CASE jget(options, '/word-wrap', 'none') WHEN 'none' THEN 'normal' ELSE 'none' END) WHERE name = (SELECT name FROM lnav_top_view)"
+ },
"x75": {
"command": ":next-mark",
"alt-msg": "${keymap_def_next_mark}"
@@ -139,11 +153,11 @@
"command": ":prev-mark"
},
"x7d": {
- "command": ":next-location",
+ "command": ":next-section",
"alt-msg": "${keymap_def_prev_location}"
},
"x7b": {
- "command": ":prev-location",
+ "command": ":prev-section",
"alt-msg": "${keymap_def_next_location}"
},
"x3f": {
@@ -157,6 +171,10 @@
"command": ":toggle-view pretty",
"alt-msg": "${keymap_def_pop_view}"
},
+ "x60": {
+ "id": "org.lnav.key.breadcrumb.focus",
+ "command": ":prompt breadcrumb"
+ },
"x76": {
"command": ":toggle-view db"
},
diff --git a/src/keymaps/sv-keymap.json b/src/keymaps/sv-keymap.json
index 7474b1f..b13e073 100644
--- a/src/keymaps/sv-keymap.json
+++ b/src/keymaps/sv-keymap.json
@@ -20,6 +20,14 @@
},
"x2b": {
"command": ";UPDATE lnav_views SET paused = 1 - paused"
+ },
+ "x60": {
+ "id": "",
+ "command": ":prompt breadcrumb"
+ },
+ "xc2xa7": {
+ "id": "org.lnav.key.breadcrumb.focus",
+ "command": ":prompt breadcrumb"
}
}
}
diff --git a/src/line_buffer.cc b/src/line_buffer.cc
index f370c02..a510169 100644
--- a/src/line_buffer.cc
+++ b/src/line_buffer.cc
@@ -57,8 +57,10 @@
#include "base/math_util.hh"
#include "base/paths.hh"
#include "fmtlib/fmt/format.h"
+#include "hasher.hh"
#include "line_buffer.hh"
-#include "lnav_util.hh"
+#include "piper.looper.hh"
+#include "scn/scn.h"
using namespace std::chrono_literals;
@@ -135,7 +137,7 @@ private:
#define SYNCPOINT_SIZE (1024 * 1024)
line_buffer::gz_indexed::gz_indexed()
{
- if ((this->inbuf = (Bytef*) malloc(Z_BUFSIZE)) == NULL) {
+ if ((this->inbuf = auto_mem<Bytef>::malloc(Z_BUFSIZE)) == NULL) {
throw std::bad_alloc();
}
}
@@ -191,7 +193,7 @@ line_buffer::gz_indexed::continue_stream()
}
void
-line_buffer::gz_indexed::open(int fd, header_data& hd)
+line_buffer::gz_indexed::open(int fd, lnav::gzip::header& hd)
{
this->close();
this->init_stream();
@@ -238,9 +240,9 @@ line_buffer::gz_indexed::open(int fd, header_data& hd)
log_debug("%d: no gzip header data", fd);
break;
case 1:
- hd.hd_mtime.tv_sec = gz_hd.time;
- hd.hd_name = std::string((char*) name);
- hd.hd_comment = std::string((char*) comment);
+ hd.h_mtime.tv_sec = gz_hd.time;
+ hd.h_name = std::string((char*) name);
+ hd.h_comment = std::string((char*) comment);
break;
default:
log_error("%d: failed to read gzip header data", fd);
@@ -408,7 +410,33 @@ line_buffer::set_fd(auto_fd& fd)
char gz_id[2 + 1 + 1 + 4];
if (pread(fd, gz_id, sizeof(gz_id), 0) == sizeof(gz_id)) {
- if (gz_id[0] == '\037' && gz_id[1] == '\213') {
+ auto piper_hdr_opt = lnav::piper::read_header(fd, gz_id);
+
+ if (piper_hdr_opt) {
+ static intern_string_t SRC = intern_string::lookup("piper");
+
+ auto meta_buf = std::move(piper_hdr_opt.value());
+
+ auto meta_sf = string_fragment::from_bytes(meta_buf.in(),
+ meta_buf.size());
+ auto meta_parse_res
+ = lnav::piper::header_handlers.parser_for(SRC).of(
+ meta_sf);
+ if (meta_parse_res.isErr()) {
+ log_error("failed to parse piper header: %s",
+ meta_parse_res.unwrapErr()[0]
+ .to_attr_line()
+ .get_string()
+ .c_str());
+ throw error(EINVAL);
+ }
+
+ this->lb_line_metadata = true;
+ this->lb_file_offset
+ = lnav::piper::HEADER_SIZE + meta_buf.size();
+ this->lb_piper_header_size = this->lb_file_offset;
+ this->lb_header = meta_parse_res.unwrap();
+ } else if (gz_id[0] == '\037' && gz_id[1] == '\213') {
int gzfd = dup(fd);
log_perror(fcntl(gzfd, F_SETFD, FD_CLOEXEC));
@@ -416,14 +444,19 @@ line_buffer::set_fd(auto_fd& fd)
close(gzfd);
throw error(errno);
}
- this->lb_gz_file.writeAccess()->open(gzfd, this->lb_header);
+ lnav::gzip::header hdr;
+
+ this->lb_gz_file.writeAccess()->open(gzfd, hdr);
this->lb_compressed = true;
- this->lb_file_time = this->lb_header.hd_mtime.tv_sec;
+ this->lb_file_time = hdr.h_mtime.tv_sec;
if (this->lb_file_time < 0) {
this->lb_file_time = 0;
}
this->lb_compressed_offset
= lseek(this->lb_fd, 0, SEEK_CUR);
+ if (!hdr.empty()) {
+ this->lb_header = std::move(hdr);
+ }
this->resize_buffer(INITIAL_COMPRESSED_BUFFER_SIZE);
}
#ifdef HAVE_BZLIB_H
@@ -763,7 +796,9 @@ line_buffer::fill_range(file_off_t start, ssize_t max_length)
this->lb_alt_line_has_ansi.clear();
this->lb_stats.s_used_preloads += 1;
}
- if (this->in_range(start) && this->in_range(start + max_length - 1)) {
+ if (this->in_range(start)
+ && (max_length == 0 || this->in_range(start + max_length - 1)))
+ {
/* Cache already has the data, nothing to do. */
retval = true;
if (!lnav::pid::in_child && this->lb_seekable && this->lb_buffer.full()
@@ -1022,11 +1057,16 @@ line_buffer::fill_range(file_off_t start, ssize_t max_length)
Result<line_info, std::string>
line_buffer::load_next_line(file_range prev_line)
{
+ const char* line_start = nullptr;
bool done = false;
line_info retval;
require(this->lb_fd != -1);
+ if (this->lb_line_metadata && prev_line.fr_offset == 0) {
+ prev_line.fr_offset = this->lb_piper_header_size;
+ }
+
auto offset = prev_line.next_offset();
ssize_t request_size = INITIAL_REQUEST_SIZE;
retval.li_file_range.fr_offset = offset;
@@ -1044,9 +1084,17 @@ line_buffer::load_next_line(file_range prev_line)
return Ok(retval);
}
}
+ if (prev_line.next_offset() == 0) {
+ auto is_utf_res = is_utf8(string_fragment::from_bytes(
+ this->lb_buffer.begin(), this->lb_buffer.size()));
+ this->lb_is_utf8 = is_utf_res.is_valid();
+ if (!this->lb_is_utf8) {
+ log_warning("input is not utf8 -- %s", is_utf_res.usr_message);
+ }
+ }
while (!done) {
auto old_retval_size = retval.li_file_range.fr_size;
- const char *line_start, *lf = nullptr;
+ const char* lf = nullptr;
/* Find the data in the cache and */
line_start = this->get_range(offset, retval.li_file_range.fr_size);
@@ -1177,16 +1225,40 @@ line_buffer::load_next_line(file_range prev_line)
= retval.li_utf8_scan_result.usr_has_ansi;
retval.li_file_range.fr_metadata.m_valid_utf
= retval.li_utf8_scan_result.is_valid();
+
+ if (this->lb_line_metadata) {
+ auto sv = scn::string_view{
+ line_start,
+ (size_t) retval.li_file_range.fr_size,
+ };
+
+ char level;
+ auto scan_res = scn::scan(sv,
+ "{}.{}:{};",
+ retval.li_timestamp.tv_sec,
+ retval.li_timestamp.tv_usec,
+ level);
+ if (scan_res) {
+ retval.li_timestamp.tv_sec
+ = lnav::to_local_time(date::sys_seconds{std::chrono::seconds{
+ retval.li_timestamp.tv_sec}})
+ .time_since_epoch()
+ .count();
+ retval.li_level = abbrev2level(&level, 1);
+ }
+ }
+
return Ok(retval);
}
Result<shared_buffer_ref, std::string>
-line_buffer::read_range(const file_range fr)
+line_buffer::read_range(file_range fr)
{
shared_buffer_ref retval;
const char* line_start;
file_ssize_t avail;
+#if 0
if (this->lb_last_line_offset != -1
&& fr.fr_offset > this->lb_last_line_offset)
{
@@ -1200,6 +1272,7 @@ line_buffer::read_range(const file_range fr)
fr.fr_offset,
this->lb_last_line_offset));
}
+#endif
if (!(this->in_range(fr.fr_offset)
&& this->in_range(fr.fr_offset + fr.fr_size - 1)))
@@ -1214,6 +1287,15 @@ line_buffer::read_range(const file_range fr)
return Err(fmt::format(
FMT_STRING("short-read (need: {}; avail: {})"), fr.fr_size, avail));
}
+ if (this->lb_line_metadata) {
+ auto new_start
+ = static_cast<const char*>(memchr(line_start, ';', fr.fr_size));
+ if (new_start) {
+ auto offset = new_start - line_start + 1;
+ line_start += offset;
+ fr.fr_size -= offset;
+ }
+ }
retval.share(this->lb_share_manager, line_start, fr.fr_size);
retval.get_metadata() = fr.fr_metadata;
@@ -1388,12 +1470,13 @@ line_buffer::cleanup_cache()
auto now = std::chrono::system_clock::now();
auto cache_path = line_buffer_cache_path();
std::vector<ghc::filesystem::path> to_remove;
+ std::error_code ec;
for (const auto& cache_subdir :
- ghc::filesystem::directory_iterator(cache_path))
+ ghc::filesystem::directory_iterator(cache_path, ec))
{
for (const auto& entry :
- ghc::filesystem::directory_iterator(cache_subdir))
+ ghc::filesystem::directory_iterator(cache_subdir, ec))
{
auto mtime = ghc::filesystem::last_write_time(entry.path());
auto exp_time = mtime + 1h;
@@ -1407,7 +1490,7 @@ line_buffer::cleanup_cache()
for (auto& entry : to_remove) {
log_debug("removing compressed file cache: %s", entry.c_str());
- ghc::filesystem::remove_all(entry);
+ ghc::filesystem::remove_all(entry, ec);
}
});
}
diff --git a/src/line_buffer.hh b/src/line_buffer.hh
index e0d3218..1569198 100644
--- a/src/line_buffer.hh
+++ b/src/line_buffer.hh
@@ -46,13 +46,20 @@
#include "base/auto_mem.hh"
#include "base/file_range.hh"
#include "base/is_utf8.hh"
-#include "base/lnav_log.hh"
+#include "base/lnav.gzip.hh"
+#include "base/piper.file.hh"
#include "base/result.h"
+#include "log_level.hh"
+#include "mapbox/variant.hpp"
#include "safe/safe.h"
#include "shared_buffer.hh"
struct line_info {
file_range li_file_range;
+ struct timeval li_timestamp {
+ 0, 0
+ };
+ log_level_t li_level{LEVEL_UNKNOWN};
bool li_partial{false};
utf8_scan_result li_utf8_scan_result{};
};
@@ -77,19 +84,6 @@ public:
int e_err;
};
- struct header_data {
- timeval hd_mtime{};
- auto_buffer hd_extra{auto_buffer::alloc(0)};
- std::string hd_name;
- std::string hd_comment;
-
- bool empty() const
- {
- return this->hd_mtime.tv_sec == 0 && this->hd_extra.empty()
- && this->hd_name.empty() && this->hd_comment.empty();
- }
- };
-
#define GZ_WINSIZE 32768U /*> gzip's max supported dictionary is 15-bits */
#define GZ_RAW_MODE (-15) /*> Raw inflate data mode */
#define GZ_HEADER_MODE (15 + 32) /*> Automatic zstd or gzip decoding */
@@ -117,7 +111,7 @@ public:
void close();
void init_stream();
void continue_stream();
- void open(int fd, header_data& hd);
+ void open(int fd, lnav::gzip::header& hd);
int stream_data(void* buf, size_t size);
void seek(off_t offset);
@@ -175,6 +169,10 @@ public:
bool is_compressed() const { return this->lb_compressed; }
+ bool is_header_utf8() const { return this->lb_is_utf8; }
+
+ bool has_line_metadata() const { return this->lb_line_metadata; }
+
file_off_t get_read_offset(file_off_t off) const
{
if (this->is_compressed()) {
@@ -255,10 +253,22 @@ public:
size_t get_buffer_size() const { return this->lb_buffer.size(); }
- const header_data& get_header_data() const { return this->lb_header; }
+ using file_header_t
+ = mapbox::util::variant<lnav::gzip::header, lnav::piper::header>;
+
+ const file_header_t& get_header_data() const { return this->lb_header; }
void enable_cache();
+ file_ssize_t get_piper_header_size() const
+ {
+ return this->lb_piper_header_size;
+ }
+
+ bool is_piper() const { return this->lb_piper_header_size > 0; }
+
+ size_t line_count_guess() const { return this->lb_line_starts.size(); }
+
static void cleanup_cache();
private:
@@ -331,6 +341,8 @@ private:
auto_fd lb_fd; /*< The file to read data from. */
safe_gz_indexed lb_gz_file; /*< File reader for gzipped files. */
bool lb_bz_file{false}; /*< Flag set for bzip2 compressed files. */
+ bool lb_line_metadata{false};
+ file_ssize_t lb_piper_header_size{0};
auto_buffer lb_buffer{auto_buffer::alloc(DEFAULT_LINE_BUFFER_SIZE)};
nonstd::optional<auto_buffer> lb_alt_buffer;
@@ -355,6 +367,7 @@ private:
time_t lb_file_time{0};
bool lb_seekable{false}; /*< Flag set for seekable file descriptors. */
bool lb_compressed{false};
+ bool lb_is_utf8{true};
file_off_t lb_last_line_offset{-1}; /*< */
std::vector<uint32_t> lb_line_starts;
@@ -364,7 +377,7 @@ private:
nonstd::optional<auto_fd> lb_cached_fd;
- header_data lb_header;
+ file_header_t lb_header{mapbox::util::no_init{}};
};
#endif
diff --git a/src/listview_curses.cc b/src/listview_curses.cc
index eb731ea..d7e028b 100644
--- a/src/listview_curses.cc
+++ b/src/listview_curses.cc
@@ -29,6 +29,7 @@
* @file listview_curses.cc
*/
+#include <chrono>
#include <cmath>
#include "listview_curses.hh"
@@ -36,13 +37,37 @@
#include <sys/time.h>
#include <time.h>
+#include "base/func_util.hh"
#include "base/lnav_log.hh"
#include "config.h"
+using namespace std::chrono_literals;
+
list_gutter_source listview_curses::DEFAULT_GUTTER_SOURCE;
listview_curses::listview_curses() : lv_scroll(noop_func{}) {}
+bool
+listview_curses::contains(int x, int y) const
+{
+ if (!this->vc_visible) {
+ return false;
+ }
+
+ if (view_curses::contains(x, y)) {
+ return true;
+ }
+
+ auto dim = this->get_dimensions();
+
+ if (this->vc_x <= x && x < this->vc_x + dim.second && this->vc_y <= y
+ && y < this->vc_y + dim.first)
+ {
+ return true;
+ }
+ return false;
+}
+
void
listview_curses::update_top_from_selection()
{
@@ -59,24 +84,20 @@ listview_curses::update_top_from_selection()
this->set_top(0_vl);
} else if (this->lv_sync_selection_and_top) {
this->set_top(this->lv_selection);
- } else if (this->lv_selection == this->get_inner_height() - 1_vl) {
- this->set_top(this->get_top_for_last_row());
- } else if (this->lv_selection
- >= (this->lv_top + height - this->lv_tail_space - 1_vl))
- {
- auto diff = this->lv_selection
- - (this->lv_top + height - this->lv_tail_space - 1_vl);
+ } else if (height <= this->lv_tail_space) {
+ this->set_top(this->lv_selection);
+ } else if (this->lv_selection > (this->lv_top + height - 1_vl)) {
+ auto diff = this->lv_selection - (this->lv_top + height - 1_vl);
if (height < 10 || diff < (height / 8_vl)) {
// for small differences between the bottom and the
// selection, just move a little bit.
- this->set_top(
- this->lv_selection - height + 1_vl + this->lv_tail_space, true);
+ this->set_top(this->lv_selection - height + 1_vl, true);
} else {
// for large differences, put the focus in the middle
this->set_top(this->lv_selection - height / 2_vl, true);
}
- } else if (this->lv_selection <= this->lv_top) {
+ } else if (this->lv_selection < this->lv_top) {
auto diff = this->lv_top - this->lv_selection;
if (this->lv_selection > 0 && (height < 10 || diff < (height / 8_vl))) {
@@ -94,22 +115,31 @@ listview_curses::reload_data()
{
if (this->lv_source == nullptr) {
this->lv_top = 0_vl;
+ this->lv_selection = -1_vl;
+ this->lv_focused_overlay_top = 0_vl;
+ this->lv_focused_overlay_selection = 0_vl;
this->lv_left = 0;
} else {
if (this->lv_top >= this->get_inner_height()) {
this->lv_top
= std::max(0_vl, vis_line_t(this->get_inner_height() - 1));
+ this->lv_focused_overlay_top = 0_vl;
+ this->lv_focused_overlay_selection = 0_vl;
}
if (this->lv_selectable) {
if (this->get_inner_height() == 0) {
- this->set_selection(0_vl);
+ this->set_selection_without_context(-1_vl);
} else if (this->lv_selection >= this->get_inner_height()) {
- this->set_selection(this->get_inner_height() - 1_vl);
+ this->set_selection_without_context(this->get_inner_height()
+ - 1_vl);
} else {
- auto curr_sel = this->lv_selection;
+ auto curr_sel = this->get_selection();
+ if (curr_sel == -1_vl) {
+ curr_sel = 0_vl;
+ }
this->lv_selection = -1_vl;
- this->set_selection(curr_sel);
+ this->set_selection_without_context(curr_sel);
}
this->update_top_from_selection();
@@ -156,39 +186,78 @@ listview_curses::handle_key(int ch)
case '\r':
case 'j':
case KEY_DOWN:
- if (this->is_selectable()) {
- this->shift_selection(1);
- } else {
- this->shift_top(1_vl);
- }
+ this->shift_selection(shift_amount_t::down_line);
break;
case 'k':
case KEY_UP:
- if (this->is_selectable()) {
- this->shift_selection(-1);
+ this->shift_selection(shift_amount_t::up_line);
+ break;
+
+ case 'q':
+ case KEY_ESCAPE:
+ if (this->lv_overlay_focused) {
+ this->lv_overlay_focused = false;
+ this->lv_source->listview_selection_changed(*this);
+ this->set_needs_update();
+ } else {
+ retval = false;
+ }
+ break;
+
+ case KEY_CTRL(']'):
+ if (this->lv_overlay_source != nullptr && !this->lv_overlay_focused)
+ {
+ std::vector<attr_line_t> overlay_content;
+ this->lv_overlay_source->list_value_for_overlay(
+ *this, this->get_selection(), overlay_content);
+ if (!overlay_content.empty()) {
+ this->lv_overlay_focused = !this->lv_overlay_focused;
+ this->lv_source->listview_selection_changed(*this);
+ this->set_needs_update();
+ }
} else {
- this->shift_top(-1_vl);
+ retval = false;
}
break;
case 'b':
case KEY_BACKSPACE:
case KEY_PPAGE:
+ if (this->lv_overlay_focused) {
+ this->shift_selection(shift_amount_t::up_page);
+ break;
+ }
+
if (this->lv_top == 0_vl && this->lv_selectable
&& this->lv_selection != 0_vl)
{
this->set_selection(0_vl);
} else {
- this->shift_top(
- -(this->rows_available(this->lv_top, RD_UP) - 1_vl));
+ auto shift_amount
+ = -(this->rows_available(this->lv_top, RD_UP) - 1_vl);
+ this->shift_top(shift_amount);
}
break;
case ' ':
case KEY_NPAGE: {
- auto rows_avail
- = this->rows_available(this->lv_top, RD_DOWN) - 1_vl;
+ if (this->lv_overlay_source != nullptr) {
+ std::vector<attr_line_t> overlay_content;
+ this->lv_overlay_source->list_value_for_overlay(
+ *this, this->get_selection(), overlay_content);
+ if (!overlay_content.empty()) {
+ this->shift_selection(shift_amount_t::down_page);
+ break;
+ }
+ }
+
+ auto rows_avail = this->rows_available(this->lv_top, RD_DOWN);
+ if (rows_avail == 0_vl) {
+ rows_avail = 2_vl;
+ } else if (rows_avail > 2_vl) {
+ rows_avail -= 1_vl;
+ }
auto top_for_last = this->get_top_for_last_row();
if ((this->lv_top < top_for_last)
@@ -198,6 +267,8 @@ listview_curses::handle_key(int ch)
if (this->lv_selection <= top_for_last) {
this->set_selection(top_for_last + 1_vl);
}
+ } else if (this->lv_top > top_for_last) {
+ this->set_top(top_for_last);
} else {
this->shift_top(rows_avail);
@@ -213,6 +284,14 @@ listview_curses::handle_key(int ch)
case 'g':
case KEY_HOME:
+ if (this->lv_overlay_focused) {
+ this->lv_focused_overlay_top = 0_vl;
+ this->lv_focused_overlay_selection = 0_vl;
+ this->lv_source->listview_selection_changed(*this);
+ this->set_needs_update();
+ break;
+ }
+
if (this->is_selectable()) {
this->set_selection(0_vl);
} else {
@@ -222,6 +301,23 @@ listview_curses::handle_key(int ch)
case 'G':
case KEY_END: {
+ if (this->lv_overlay_focused) {
+ std::vector<attr_line_t> overlay_content;
+ this->lv_overlay_source->list_value_for_overlay(
+ *this, this->get_selection(), overlay_content);
+ auto overlay_height
+ = this->get_overlay_height(overlay_content.size(), height);
+ auto ov_top_for_last = vis_line_t{
+ static_cast<int>(overlay_content.size() - overlay_height)};
+
+ this->lv_focused_overlay_top = ov_top_for_last;
+ this->lv_focused_overlay_selection
+ = vis_line_t(overlay_content.size() - 1);
+ this->lv_source->listview_selection_changed(*this);
+ this->set_needs_update();
+ break;
+ }
+
vis_line_t last_line(this->get_inner_height() - 1);
vis_line_t tail_bottom(this->get_top_for_last_row());
@@ -234,20 +330,23 @@ listview_curses::handle_key(int ch)
} else {
this->set_top(tail_bottom);
}
- } break;
+ break;
+ }
case ']': {
double tenth = ((double) this->get_inner_height()) / 10.0;
this->shift_top(vis_line_t((int) tenth));
- } break;
+ break;
+ }
case '[':
case 'B': {
double tenth = ((double) this->get_inner_height()) / 10.0;
this->shift_top(vis_line_t((int) -tenth));
- } break;
+ break;
+ }
default:
retval = false;
@@ -257,32 +356,70 @@ listview_curses::handle_key(int ch)
return retval;
}
-void
+vis_line_t
+listview_curses::get_overlay_top(vis_line_t row, size_t count, size_t total)
+{
+ if (row == this->get_selection()) {
+ if (this->lv_focused_overlay_selection >= total) {
+ this->lv_focused_overlay_selection = vis_line_t(total) - 1_vl;
+ }
+ if (this->lv_focused_overlay_selection < 0_vl) {
+ this->lv_focused_overlay_selection = 0_vl;
+ }
+ auto max_top = vis_line_t(total - count);
+ if (this->lv_focused_overlay_selection <= this->lv_focused_overlay_top)
+ {
+ this->lv_focused_overlay_top = this->lv_focused_overlay_selection;
+ if (this->lv_focused_overlay_top > 0_vl) {
+ this->lv_focused_overlay_top -= 1_vl;
+ }
+ }
+ if (this->lv_focused_overlay_selection
+ > (this->lv_focused_overlay_top + vis_line_t(count) - 2_vl))
+ {
+ this->lv_focused_overlay_top
+ = this->lv_focused_overlay_selection - vis_line_t(count) + 2_vl;
+ }
+ if (this->lv_focused_overlay_top > max_top) {
+ this->lv_focused_overlay_top = max_top;
+ }
+
+ return this->lv_focused_overlay_top;
+ }
+
+ return 0_vl;
+}
+
+bool
listview_curses::do_update()
{
- if (this->lv_window == nullptr || this->lv_height == 0) {
- view_curses::do_update();
- return;
+ bool retval = false;
+
+ if (this->lv_window == nullptr || this->lv_height == 0 || !this->vc_visible)
+ {
+ return view_curses::do_update();
}
+ std::vector<attr_line_t> row_overlay_content;
vis_line_t height;
unsigned long width;
- this->update_top_from_selection();
this->get_dimensions(height, width);
+ if (height <= 0) {
+ return retval;
+ }
+
+ this->update_top_from_selection();
while (this->vc_needs_update) {
auto& vc = view_colors::singleton();
vis_line_t row;
attr_line_t overlay_line;
struct line_range lr;
unsigned long wrap_width;
- int y = this->lv_y, bottom;
+ int y = this->vc_y, bottom;
auto role_attrs = vc.attrs_for_role(this->vc_default_role);
- if (height <= 0) {
- return;
- }
-
+ retval = true;
if (this->vc_width > 0) {
width = std::min((unsigned long) this->vc_width, width);
}
@@ -293,48 +430,178 @@ listview_curses::do_update()
}
size_t row_count = this->get_inner_height();
- size_t blank_rows = 0;
row = this->lv_top;
bottom = y + height;
std::vector<attr_line_t> rows(
std::min((size_t) height, row_count - (int) this->lv_top));
this->lv_source->listview_value_for_rows(*this, row, rows);
+ this->lv_display_lines.clear();
while (y < bottom) {
lr.lr_start = this->lv_left;
lr.lr_end = this->lv_left + wrap_width;
if (this->lv_overlay_source != nullptr
- && this->lv_overlay_source->list_value_for_overlay(
- *this,
- y - this->lv_y,
- bottom - this->lv_y,
- row,
- overlay_line))
+ && this->lv_overlay_source->list_static_overlay(
+ *this, y - this->vc_y, bottom - this->vc_y, overlay_line))
{
- mvwattrline(this->lv_window, y, this->lv_x, overlay_line, lr);
+ this->lv_display_lines.push_back(static_overlay_content{});
+ mvwattrline(this->lv_window, y, this->vc_x, overlay_line, lr);
overlay_line.clear();
++y;
} else if (row < (int) row_count) {
auto& al = rows[row - this->lv_top];
- size_t remaining = 0;
+ for (const auto& attr : al.get_attrs()) {
+ require_ge(attr.sa_range.lr_start, 0);
+ }
+
+ this->lv_display_lines.push_back(main_content{row});
+ view_curses::mvwattrline_result write_res;
do {
- remaining = mvwattrline(this->lv_window,
+ if (this->lv_word_wrap) {
+ mvwhline(this->lv_window, y, this->vc_x, ' ', width);
+ }
+ write_res = mvwattrline(this->lv_window,
y,
- this->lv_x,
+ this->vc_x,
al,
lr,
this->vc_default_role);
- if (this->lv_word_wrap) {
- mvwhline(this->lv_window,
- y,
- this->lv_x + wrap_width,
- ' ',
- width - wrap_width);
- }
- lr.lr_start += wrap_width;
- lr.lr_end += wrap_width;
+ lr.lr_start = write_res.mr_chars_out;
+ lr.lr_end = write_res.mr_chars_out + width - 1;
++y;
- } while (this->lv_word_wrap && y < bottom && remaining > 0);
+ } while (this->lv_word_wrap && y < bottom
+ && write_res.mr_bytes_remaining > 0);
+
+ if (this->lv_overlay_source != nullptr) {
+ row_overlay_content.clear();
+
+ lr.lr_start = this->lv_left;
+ lr.lr_end = this->lv_left + wrap_width;
+
+ auto ov_menu = this->lv_overlay_source->list_overlay_menu(
+ *this, row);
+ auto ov_menu_row = 0_vl;
+ for (auto& ov_menu_line : ov_menu) {
+ if (y >= bottom) {
+ break;
+ }
+
+ this->lv_display_lines.push_back(overlay_menu{
+ ov_menu_row,
+ });
+ mvwattrline(this->lv_window,
+ y,
+ this->vc_x,
+ ov_menu_line,
+ line_range{0, (int) wrap_width},
+ role_t::VCR_ALT_ROW);
+ ov_menu_row += 1_vl;
+ ++y;
+ }
+
+ this->lv_overlay_source->list_value_for_overlay(
+ *this, row, row_overlay_content);
+ auto overlay_height = this->get_overlay_height(
+ row_overlay_content.size(), height);
+ auto ov_height_remaining = overlay_height;
+ auto overlay_top = this->get_overlay_top(
+ row, overlay_height, row_overlay_content.size());
+ auto overlay_row = overlay_top;
+ if (row_overlay_content.size() > 1) {
+ auto hdr
+ = this->lv_overlay_source->list_header_for_overlay(
+ *this, row);
+ if (hdr) {
+ auto ov_hdr_attrs = text_attrs{};
+ ov_hdr_attrs.ta_attrs |= A_UNDERLINE;
+ auto ov_hdr = hdr.value().with_attr_for_all(
+ VC_STYLE.value(ov_hdr_attrs));
+ this->lv_display_lines.push_back(
+ static_overlay_content{});
+ mvwattrline(this->lv_window,
+ y,
+ this->vc_x,
+ ov_hdr,
+ lr,
+ role_t::VCR_STATUS_INFO);
+ ++y;
+ }
+ }
+ auto overlay_y = y;
+ while (ov_height_remaining > 0 && y < bottom) {
+ if (this->lv_overlay_focused
+ && row == this->get_selection()
+ && overlay_row
+ == this->lv_focused_overlay_selection)
+ {
+ row_overlay_content[overlay_row].with_attr_for_all(
+ VC_ROLE.value(role_t::VCR_CURSOR_LINE));
+ }
+ this->lv_display_lines.push_back(
+ overlay_content{row, overlay_row});
+ mvwattrline(this->lv_window,
+ y,
+ this->vc_x,
+ row_overlay_content[overlay_row],
+ lr,
+ role_t::VCR_ALT_ROW);
+ ov_height_remaining -= 1;
+ ++overlay_row;
+ ++y;
+ }
+
+ if (overlay_height != row_overlay_content.size()) {
+ double progress = 1.0;
+ double coverage = 1.0;
+ vis_line_t lines;
+
+ if (!row_overlay_content.empty()) {
+ progress = (double) overlay_top
+ / (double) row_overlay_content.size();
+ coverage = (double) overlay_height
+ / (double) row_overlay_content.size();
+ }
+
+ auto scroll_y = overlay_y
+ + (int) (progress * (double) overlay_height);
+ lines = vis_line_t(
+ scroll_y
+ + std::min(
+ (int) overlay_height,
+ (int) (coverage * (double) overlay_height)));
+
+ for (unsigned int gutter_y = overlay_y;
+ gutter_y < (overlay_y + overlay_height);
+ gutter_y++)
+ {
+ auto role = this->vc_default_role;
+ auto bar_role = role_t::VCR_SCROLLBAR;
+ text_attrs attrs;
+ chtype ch = gutter_y == overlay_y
+ ? ACS_URCORNER
+ : (gutter_y == (overlay_y + overlay_height - 1)
+ ? ACS_LRCORNER
+ : ACS_VLINE);
+
+ if (gutter_y >= (unsigned int) scroll_y
+ && gutter_y <= (unsigned int) lines)
+ {
+ role = bar_role;
+ }
+ attrs = vc.attrs_for_role(role);
+ wattr_set(this->lv_window,
+ attrs.ta_attrs,
+ vc.ensure_color_pair(attrs.ta_fg_color,
+ attrs.ta_bg_color),
+ nullptr);
+ mvwaddch(this->lv_window,
+ gutter_y,
+ this->vc_x + width - 2,
+ ch);
+ }
+ }
+ }
+
++row;
} else {
wattr_set(this->lv_window,
@@ -342,15 +609,14 @@ listview_curses::do_update()
vc.ensure_color_pair(role_attrs.ta_fg_color,
role_attrs.ta_bg_color),
nullptr);
- mvwhline(this->lv_window, y, this->lv_x, ' ', width);
+ this->lv_display_lines.push_back(empty_space{});
+ mvwhline(this->lv_window, y, this->vc_x, ' ', width);
++y;
- blank_rows += 1;
}
}
- if (this->lv_selectable && this->lv_selection >= 0
- && (row > this->lv_tail_space) && (blank_rows < this->lv_tail_space)
- && ((row - this->lv_tail_space) < this->lv_selection))
+ if (this->lv_selectable && !this->lv_sync_selection_and_top
+ && this->lv_selection >= 0 && row < this->lv_selection)
{
this->shift_top(this->lv_selection - row + this->lv_tail_space);
continue;
@@ -360,19 +626,18 @@ listview_curses::do_update()
double progress = 1.0;
double coverage = 1.0;
double adjusted_height = (double) row_count / (double) height;
- vis_line_t lines;
if (row_count > 0) {
progress = (double) this->lv_top / (double) row_count;
coverage = (double) height / (double) row_count;
}
- y = this->lv_y + (int) (progress * (double) height);
- lines = vis_line_t(
- y + std::min((int) height, (int) (coverage * (double) height)));
+ this->lv_scroll_top = (int) (progress * (double) height);
+ this->lv_scroll_bottom = this->lv_scroll_top
+ + std::min((int) height, (int) (coverage * (double) height));
- for (unsigned int gutter_y = this->lv_y;
- gutter_y < (this->lv_y + height);
+ for (unsigned int gutter_y = this->vc_y;
+ gutter_y < (this->vc_y + height);
gutter_y++)
{
int range_start = 0, range_end;
@@ -383,14 +648,14 @@ listview_curses::do_update()
if (row_count > 0) {
range_start
- = (double) (gutter_y - this->lv_y) * adjusted_height;
+ = (double) (gutter_y - this->vc_y) * adjusted_height;
}
range_end = range_start + adjusted_height;
this->lv_gutter_source->listview_gutter_value_for_range(
*this, range_start, range_end, ch, role, bar_role);
- if (gutter_y >= (unsigned int) y
- && gutter_y <= (unsigned int) lines)
+ if (gutter_y >= this->vc_y + this->lv_scroll_top
+ && gutter_y <= this->vc_y + this->lv_scroll_bottom)
{
role = bar_role;
}
@@ -400,63 +665,136 @@ listview_curses::do_update()
attrs.ta_attrs,
vc.ensure_color_pair(attrs.ta_fg_color, attrs.ta_bg_color),
nullptr);
- mvwaddch(this->lv_window, gutter_y, this->lv_x + width - 1, ch);
+ mvwaddch(this->lv_window, gutter_y, this->vc_x + width - 1, ch);
}
- wmove(this->lv_window, this->lv_y + height - 1, this->lv_x);
+ wmove(this->lv_window, this->vc_y + height - 1, this->vc_x);
}
if (this->lv_show_bottom_border) {
cchar_t row_ch[width];
- int y = this->lv_y + height - 1;
+ int bottom_y = this->vc_y + height - 1;
- mvwin_wchnstr(this->lv_window, y, this->lv_x, row_ch, width - 1);
+ mvwin_wchnstr(
+ this->lv_window, bottom_y, this->vc_x, row_ch, width - 1);
for (unsigned long lpc = 0; lpc < width - 1; lpc++) {
row_ch[lpc].attr |= A_UNDERLINE;
}
- mvwadd_wchnstr(this->lv_window, y, this->lv_x, row_ch, width - 1);
+ mvwadd_wchnstr(
+ this->lv_window, bottom_y, this->vc_x, row_ch, width - 1);
}
this->vc_needs_update = false;
}
- view_curses::do_update();
-
-#if 0
- else if (this->lv_overlay_needs_update && this->lv_overlay_source != NULL) {
- vis_line_t y(this->lv_y), height, bottom;
- attr_line_t overlay_line;
- unsigned long width, wrap_width;
- struct line_range lr;
-
- this->lv_overlay_source->list_overlay_count(*this);
- this->get_dimensions(height, width);
- wrap_width = width - (this->lv_word_wrap ? 1 : this->lv_show_scrollbar ? 1 : 0);
+ return view_curses::do_update() || retval;
+}
- lr.lr_start = this->lv_left;
- lr.lr_end = this->lv_left + wrap_width;
+void
+listview_curses::shift_selection(shift_amount_t sa)
+{
+ vis_line_t height;
+ unsigned long width;
- bottom = y + height;
- while (y < bottom) {
- if (this->lv_overlay_source->list_value_for_overlay(
- *this,
- y - vis_line_t(this->lv_y),
- overlay_line)) {
- this->mvwattrline(this->lv_window, y, this->lv_x, overlay_line, lr);
- overlay_line.clear();
+ this->get_dimensions(height, width);
+ if (this->lv_overlay_focused) {
+ vis_line_t focused = this->get_selection();
+ std::vector<attr_line_t> overlay_content;
+
+ this->lv_overlay_source->list_value_for_overlay(
+ *this, focused, overlay_content);
+ if (overlay_content.empty()) {
+ this->lv_overlay_focused = false;
+ this->lv_focused_overlay_top = 0_vl;
+ this->lv_focused_overlay_selection = 0_vl;
+ this->lv_source->listview_selection_changed(*this);
+ } else {
+ auto overlay_height
+ = this->get_overlay_height(overlay_content.size(), height);
+ auto ov_top_for_last = vis_line_t{
+ static_cast<int>(overlay_content.size() - overlay_height)};
+ switch (sa) {
+ case shift_amount_t::up_line:
+ if (this->lv_focused_overlay_selection > 0_vl) {
+ this->lv_focused_overlay_selection -= 1_vl;
+ }
+ break;
+ case shift_amount_t::up_page: {
+ if (this->lv_focused_overlay_selection > overlay_height) {
+ this->lv_focused_overlay_selection
+ -= vis_line_t{static_cast<int>(overlay_height - 1)};
+ } else {
+ this->lv_focused_overlay_selection = 0_vl;
+ }
+ break;
+ }
+ case shift_amount_t::down_line:
+ if (this->lv_focused_overlay_selection + 1
+ < overlay_content.size())
+ {
+ this->lv_focused_overlay_selection += 1_vl;
+ }
+ break;
+ case shift_amount_t::down_page: {
+ if (this->lv_focused_overlay_selection + overlay_height - 1
+ >= ov_top_for_last)
+ {
+ this->lv_focused_overlay_selection
+ = vis_line_t(overlay_content.size() - 1);
+ } else {
+ this->lv_focused_overlay_selection
+ += vis_line_t{static_cast<int>(overlay_height - 1)};
+ }
+ break;
+ }
+ default:
+ break;
}
- ++y;
+ this->lv_source->listview_selection_changed(*this);
+ this->set_needs_update();
+ return;
}
}
-#endif
-}
-void
-listview_curses::shift_selection(int offset)
-{
- vis_line_t new_selection = this->lv_selection + vis_line_t(offset);
+ auto offset = 0_vl;
+ switch (sa) {
+ case shift_amount_t::up_line:
+ offset = -1_vl;
+ break;
+ case shift_amount_t::up_page:
+ offset = -(height - 1_vl);
+ break;
+ case shift_amount_t::down_line:
+ offset = 1_vl;
+ break;
+ case shift_amount_t::down_page:
+ offset = height - 1_vl;
+ break;
+ }
+ if (this->is_selectable()) {
+ if (this->lv_selection == -1_vl) {
+ this->lv_selection = this->lv_top;
+ }
+ auto new_selection = this->lv_selection + vis_line_t(offset);
+
+ if (new_selection < 0_vl) {
+ new_selection = 0_vl;
+ } else if (new_selection >= this->get_inner_height()) {
+ auto rows_avail
+ = this->rows_available(this->lv_top, RD_DOWN) - 1_vl;
+ auto top_for_last = this->get_top_for_last_row();
- if (new_selection >= 0_vl && new_selection < this->get_inner_height()) {
+ if ((this->lv_top < top_for_last)
+ && (this->lv_top + rows_avail > top_for_last))
+ {
+ this->set_top(top_for_last);
+ if (this->lv_selection <= top_for_last) {
+ new_selection = top_for_last + 1_vl;
+ }
+ }
+ }
this->set_selection(new_selection);
+ } else {
+ this->shift_top(vis_line_t{offset});
}
}
@@ -469,6 +807,17 @@ scroll_polarity(mouse_button_t button)
bool
listview_curses::handle_mouse(mouse_event& me)
{
+ auto GUTTER_REPEAT_DELAY
+ = std::chrono::duration_cast<std::chrono::microseconds>(100ms).count();
+
+ if (view_curses::handle_mouse(me)) {
+ return true;
+ }
+
+ if (!this->vc_enabled) {
+ return false;
+ }
+
vis_line_t inner_height, height;
struct timeval diff;
unsigned long width;
@@ -479,50 +828,68 @@ listview_curses::handle_mouse(mouse_event& me)
switch (me.me_button) {
case mouse_button_t::BUTTON_SCROLL_UP:
- case mouse_button_t::BUTTON_SCROLL_DOWN:
- if (diff.tv_sec > 0 || diff.tv_usec > 80000) {
- this->lv_scroll_accel = 1;
- this->lv_scroll_velo = 0;
- } else {
- this->lv_scroll_accel += 2;
- }
- this->lv_scroll_velo += this->lv_scroll_accel;
-
- this->shift_top(vis_line_t(scroll_polarity(me.me_button)
- * this->lv_scroll_velo),
+ case mouse_button_t::BUTTON_SCROLL_DOWN: {
+ this->shift_top(vis_line_t(scroll_polarity(me.me_button) * 2_vl),
true);
- break;
+ return true;
+ }
default:
break;
}
- this->lv_mouse_time = me.me_time;
-
if (me.me_button != mouse_button_t::BUTTON_LEFT || inner_height == 0
- || (this->lv_mouse_mode != lv_mode_t::DRAG
- && me.me_x < (int) (width - 2)))
+ || (me.me_press_x < (int) (width - 2)))
{
return false;
}
+ if (me.is_double_click_in(mouse_button_t::BUTTON_LEFT,
+ line_range{(int) width - 2, (int) width}))
+ {
+ auto pct = (double) inner_height / (double) height;
+ auto new_top = (int) floor(((double) me.me_y * pct) + 0.5);
+ this->set_top(vis_line_t(new_top), true);
+ this->lv_mouse_mode = lv_mode_t::NONE;
+ return true;
+ }
+
+ switch (this->lv_mouse_mode) {
+ case lv_mode_t::NONE: {
+ if (me.me_x < (int) (width - 2)) {
+ return false;
+ }
+ break;
+ }
+ case lv_mode_t::DRAG:
+ break;
+ case lv_mode_t::UP:
+ case lv_mode_t::DOWN:
+ if (me.me_x < (int) (width - 2)) {
+ return true;
+ }
+ break;
+ }
+ if (me.me_state != mouse_button_state_t::BUTTON_STATE_RELEASED
+ && this->lv_mouse_mode != lv_mode_t::DRAG && diff.tv_sec == 0
+ && diff.tv_usec < GUTTER_REPEAT_DELAY)
+ {
+ return true;
+ }
+ this->lv_mouse_time = me.me_time;
+
if (me.me_state == mouse_button_state_t::BUTTON_STATE_RELEASED) {
this->lv_mouse_y = -1;
this->lv_mouse_mode = lv_mode_t::NONE;
return true;
}
- int scroll_top, scroll_bottom, shift_amount = 0, new_top = 0;
- double top_pct, bot_pct, pct;
-
- top_pct = (double) this->get_top() / (double) inner_height;
- bot_pct = (double) this->get_bottom() / (double) inner_height;
- scroll_top = (this->get_y() + (int) (top_pct * (double) height));
- scroll_bottom = (this->get_y() + (int) (bot_pct * (double) height));
+ int shift_amount = 0;
if (this->lv_mouse_mode == lv_mode_t::NONE) {
- if ((scroll_top - 1) <= me.me_y && me.me_y <= (scroll_bottom + 1)) {
+ if (this->lv_scroll_top <= me.me_y && me.me_y <= this->lv_scroll_bottom)
+ {
this->lv_mouse_mode = lv_mode_t::DRAG;
- this->lv_mouse_y = me.me_y - scroll_top;
- } else if (me.me_y < scroll_top) {
+ this->lv_mouse_y = me.me_y - this->lv_scroll_top;
+ } else if (me.me_y < this->lv_scroll_top) {
this->lv_mouse_mode = lv_mode_t::UP;
} else {
this->lv_mouse_mode = lv_mode_t::DOWN;
@@ -535,27 +902,28 @@ listview_curses::handle_mouse(mouse_event& me)
break;
case lv_mode_t::UP:
- if (me.me_y < scroll_top) {
+ if (me.me_y < this->lv_scroll_top) {
shift_amount = -1 * height;
}
break;
case lv_mode_t::DOWN:
- if (me.me_y > scroll_bottom) {
+ if (me.me_y > this->lv_scroll_bottom) {
shift_amount = height;
}
break;
- case lv_mode_t::DRAG:
- pct = (double) inner_height / (double) height;
- new_top = me.me_y - this->get_y() - this->lv_mouse_y;
+ case lv_mode_t::DRAG: {
+ auto pct = (double) inner_height / (double) height;
+ auto new_top = me.me_y - this->lv_mouse_y;
new_top = (int) floor(((double) new_top * pct) + 0.5);
- this->set_top(vis_line_t(new_top));
+ this->set_top(vis_line_t(new_top), true);
break;
+ }
}
if (shift_amount != 0) {
- this->shift_top(vis_line_t(shift_amount));
+ this->shift_top(vis_line_t(shift_amount), true);
}
return true;
@@ -576,11 +944,14 @@ listview_curses::set_top(vis_line_t top, bool suppress_flash)
} else if (this->lv_top != top) {
auto old_top = this->lv_top;
this->lv_top = top;
+ this->lv_focused_overlay_top = 0_vl;
+ this->lv_focused_overlay_selection = 0_vl;
if (this->lv_selectable) {
if (this->lv_selection < 0_vl) {
+ this->set_selection_without_context(top);
} else if (this->lv_selection < top) {
auto sel_diff = this->lv_selection - old_top;
- this->set_selection(top + sel_diff);
+ this->set_selection_without_context(top + sel_diff);
} else {
auto sel_diff = this->lv_selection - old_top;
auto bot = this->get_bottom();
@@ -589,9 +960,15 @@ listview_curses::set_top(vis_line_t top, bool suppress_flash)
this->get_dimensions(height, width);
- if (bot != -1_vl && (bot - top) >= (height - 1)) {
- if (this->lv_selection > (bot - this->lv_tail_space)) {
- this->set_selection(top + sel_diff);
+ if (bot == -1_vl) {
+ this->set_selection_without_context(this->lv_top);
+ } else if (this->lv_selection < this->lv_top
+ || bot < this->lv_selection)
+ {
+ if (top + sel_diff > bot) {
+ this->set_selection_without_context(bot);
+ } else {
+ this->set_selection_without_context(top + sel_diff);
}
}
}
@@ -656,7 +1033,7 @@ listview_curses::rows_available(vis_line_t line,
}
void
-listview_curses::set_selection(vis_line_t sel)
+listview_curses::set_selection_without_context(vis_line_t sel)
{
if (this->lv_selectable) {
if (this->lv_selection == sel) {
@@ -664,6 +1041,9 @@ listview_curses::set_selection(vis_line_t sel)
}
if (sel == -1_vl) {
this->lv_selection = sel;
+ this->lv_overlay_focused = false;
+ this->lv_focused_overlay_top = 0_vl;
+ this->lv_focused_overlay_selection = 0_vl;
this->lv_source->listview_selection_changed(*this);
this->set_needs_update();
this->invoke_scroll();
@@ -699,16 +1079,36 @@ listview_curses::set_selection(vis_line_t sel)
if (this->lv_sync_selection_and_top) {
this->lv_top = sel;
}
+ this->lv_overlay_focused = false;
+ this->lv_focused_overlay_top = 0_vl;
+ this->lv_focused_overlay_selection = 0_vl;
this->lv_source->listview_selection_changed(*this);
this->set_needs_update();
this->invoke_scroll();
}
}
- } else {
+ } else if (sel >= 0_vl) {
this->set_top(sel);
}
}
+void
+listview_curses::set_selection(vis_line_t sel)
+{
+ this->set_selection_without_context(sel);
+
+ auto dim = this->get_dimensions();
+ if (this->lv_selection > 0 && this->lv_selection <= this->lv_top) {
+ this->set_top(this->lv_selection - 1_vl);
+ } else if (dim.first > this->lv_tail_space
+ && (this->lv_selection
+ > (this->lv_top + (dim.first - 1_vl) - this->lv_tail_space)))
+ {
+ this->set_top(this->lv_selection + this->lv_tail_space
+ - (dim.first - 1_vl));
+ }
+}
+
vis_line_t
listview_curses::get_top_for_last_row()
{
@@ -731,3 +1131,81 @@ listview_curses::get_top_for_last_row()
return retval;
}
+
+vis_line_t
+listview_curses::shift_top(vis_line_t offset, bool suppress_flash)
+{
+ if (offset < 0 && this->lv_top == 0) {
+ if (suppress_flash == false) {
+ alerter::singleton().chime("the top of the view has been reached");
+ }
+ } else {
+ this->set_top(std::max(0_vl, this->lv_top + offset), suppress_flash);
+ }
+
+ return this->lv_top;
+}
+
+void
+listview_curses::set_left(int left)
+{
+ if (this->lv_left == left || left < 0) {
+ return;
+ }
+
+ if (left > this->lv_left) {
+ unsigned long width;
+ vis_line_t height;
+
+ this->get_dimensions(height, width);
+ if (this->lv_show_scrollbar) {
+ width -= 1;
+ }
+ if ((this->get_inner_width() - this->lv_left) <= width) {
+ alerter::singleton().chime(
+ "the maximum width of the view has been reached");
+ return;
+ }
+ }
+
+ this->lv_left = left;
+ this->invoke_scroll();
+ this->set_needs_update();
+}
+
+size_t
+listview_curses::get_overlay_height(size_t total, vis_line_t view_height)
+{
+ return std::min(total, static_cast<size_t>(2 * (view_height / 3)));
+}
+
+void
+listview_curses::set_overlay_selection(nonstd::optional<vis_line_t> sel)
+{
+ if (sel) {
+ if (sel.value() == this->lv_focused_overlay_selection) {
+ return;
+ }
+
+ std::vector<attr_line_t> overlay_content;
+ this->lv_overlay_source->list_value_for_overlay(
+ *this, this->get_selection(), overlay_content);
+ if (!overlay_content.empty()) {
+ this->lv_overlay_focused = true;
+ if (sel.value() < 0) {
+ this->lv_focused_overlay_selection = 0_vl;
+ } else if (sel.value() >= overlay_content.size()) {
+ this->lv_focused_overlay_selection
+ = vis_line_t(overlay_content.size());
+ } else {
+ this->lv_focused_overlay_selection = sel.value();
+ }
+ }
+ } else {
+ this->lv_overlay_focused = false;
+ this->lv_focused_overlay_top = 0_vl;
+ this->lv_focused_overlay_selection = 0_vl;
+ }
+ this->lv_source->listview_selection_changed(*this);
+ this->set_needs_update();
+}
diff --git a/src/listview_curses.hh b/src/listview_curses.hh
index bf375bc..6e003e4 100644
--- a/src/listview_curses.hh
+++ b/src/listview_curses.hh
@@ -39,7 +39,6 @@
#include <sys/types.h>
-#include "base/func_util.hh"
#include "view_curses.hh"
#include "vis_line.hh"
@@ -105,12 +104,37 @@ class list_overlay_source {
public:
virtual ~list_overlay_source() = default;
- virtual bool list_value_for_overlay(const listview_curses& lv,
- int y,
- int bottom,
+ virtual void reset() {}
+
+ virtual bool list_static_overlay(const listview_curses& lv,
+ int y,
+ int bottom,
+ attr_line_t& value_out)
+ {
+ return false;
+ }
+
+ virtual std::vector<attr_line_t> list_overlay_menu(
+ const listview_curses& lv, vis_line_t line)
+ {
+ return {};
+ }
+
+ virtual nonstd::optional<attr_line_t> list_header_for_overlay(
+ const listview_curses& lv, vis_line_t line)
+ {
+ return nonstd::nullopt;
+ }
+
+ virtual void list_value_for_overlay(const listview_curses& lv,
vis_line_t line,
- attr_line_t& value_out)
- = 0;
+ std::vector<attr_line_t>& value_out)
+ {
+ }
+
+ virtual void set_show_details_in_overlay(bool val) {}
+
+ virtual bool get_show_details_in_overlay() const { return false; }
};
class list_input_delegate {
@@ -166,7 +190,7 @@ public:
}
/** @return The overlay source delegate. */
- list_overlay_source* get_overlay_source()
+ list_overlay_source* get_overlay_source() const
{
return this->lv_overlay_source;
}
@@ -207,21 +231,41 @@ public:
void set_selection(vis_line_t sel);
- void shift_selection(int offset);
+ void set_selection_without_context(vis_line_t sel);
+
+ enum class shift_amount_t {
+ up_line,
+ up_page,
+ down_line,
+ down_page,
+ };
+
+ void shift_selection(shift_amount_t sa);
vis_line_t get_selection() const
{
- if (this->lv_selectable) {
+ if (this->lv_selectable && this->lv_selection != -1_vl) {
return this->lv_selection;
}
return this->lv_top;
}
+ nonstd::optional<vis_line_t> get_overlay_selection() const
+ {
+ if (this->lv_overlay_focused) {
+ return this->lv_focused_overlay_selection;
+ }
+
+ return nonstd::nullopt;
+ }
+
+ void set_overlay_selection(nonstd::optional<vis_line_t> sel);
+
void set_sync_selection_and_top(bool value)
{
- this->lv_sync_selection_and_top = value;
- if (value) {
- this->set_top(this->get_selection());
+ if (this->lv_sync_selection_and_top != value) {
+ this->lv_sync_selection_and_top = value;
+ this->set_needs_update();
}
}
@@ -251,7 +295,7 @@ public:
vis_line_t rows_available(vis_line_t line, row_direction_t dir) const;
template<typename F>
- auto map_top_row(F func) ->
+ auto map_top_row(F func) const ->
typename std::result_of<F(const attr_line_t&)>::type
{
if (this->lv_top >= this->get_inner_height()) {
@@ -260,7 +304,8 @@ public:
std::vector<attr_line_t> top_line{1};
- this->lv_source->listview_value_for_rows(*this, this->lv_top, top_line);
+ this->lv_source->listview_value_for_rows(
+ *this, this->get_selection(), top_line);
return func(top_line[0]);
}
@@ -270,26 +315,6 @@ public:
/** @return The curses window this view is attached to. */
WINDOW* get_window() const { return this->lv_window; }
- void set_y(unsigned int y)
- {
- if (y != this->lv_y) {
- this->lv_y = y;
- this->set_needs_update();
- }
- }
-
- unsigned int get_y() const { return this->lv_y; }
-
- void set_x(unsigned int x)
- {
- if (x != this->lv_x) {
- this->lv_x = x;
- this->set_needs_update();
- }
- }
-
- unsigned int get_x() const { return this->lv_x; }
-
/**
* Set the line number to be displayed at the top of the view. If the
* value is invalid, flash() will be called. If the value is valid, the
@@ -330,20 +355,7 @@ public:
* @param suppress_flash Don't call flash() if the offset is out-of-bounds.
* @return The final value of top.
*/
- vis_line_t shift_top(vis_line_t offset, bool suppress_flash = false)
- {
- if (offset < 0 && this->lv_top == 0) {
- if (suppress_flash == false) {
- alerter::singleton().chime(
- "the top of the view has been reached");
- }
- } else {
- this->set_top(std::max(0_vl, this->lv_top + offset),
- suppress_flash);
- }
-
- return this->lv_top;
- }
+ vis_line_t shift_top(vis_line_t offset, bool suppress_flash = false);
/**
* Set the column number to be displayed at the left of the view. If the
@@ -352,31 +364,10 @@ public:
*
* @param left The new value for left.
*/
- void set_left(unsigned int left)
- {
- if (this->lv_left == left) {
- return;
- }
-
- if (left > this->lv_left) {
- unsigned long width;
- vis_line_t height;
-
- this->get_dimensions(height, width);
- if ((this->get_inner_width() - this->lv_left) <= width) {
- alerter::singleton().chime(
- "the maximum width of the view has been reached");
- return;
- }
- }
-
- this->lv_left = left;
- this->invoke_scroll();
- this->set_needs_update();
- }
+ void set_left(int left);
/** @return The column number that is displayed at the left. */
- unsigned int get_left() const { return this->lv_left; }
+ int get_left() const { return this->lv_left; }
/**
* Shift the value of left by the given value.
@@ -384,7 +375,7 @@ public:
* @param offset The amount to change top by.
* @return The final value of top.
*/
- unsigned int shift_left(int offset)
+ int shift_left(int offset)
{
if (this->lv_word_wrap) {
alerter::singleton().chime(
@@ -454,7 +445,7 @@ public:
getmaxyx(this->lv_window, height, width_out);
if (this->lv_height < 0) {
height_out = vis_line_t(height) + this->lv_height
- - vis_line_t(this->lv_y);
+ - vis_line_t(this->vc_y);
if (height_out < 0_vl) {
height_out = 0_vl;
}
@@ -462,8 +453,8 @@ public:
height_out = this->lv_height;
}
}
- if (this->lv_x < width_out) {
- width_out -= this->lv_x;
+ if (this->vc_x < width_out) {
+ width_out -= this->vc_x;
} else {
width_out = 0;
}
@@ -490,9 +481,11 @@ public:
/**
* Query the data source and draw the visible lines on the display.
*/
- void do_update();
+ bool do_update() override;
+
+ bool handle_mouse(mouse_event& me) override;
- bool handle_mouse(mouse_event& me);
+ bool contains(int x, int y) const override;
listview_curses& set_tail_space(vis_line_t space)
{
@@ -503,20 +496,42 @@ public:
vis_line_t get_tail_space() const { return this->lv_tail_space; }
- void log_state()
+ void log_state() override
{
log_debug("listview_curses=%p", this);
- log_debug(" lv_title=%s", this->lv_title.c_str());
- log_debug(" lv_y=%u", this->lv_y);
- log_debug(" lv_top=%d", (int) this->lv_top);
- log_debug(" lv_left=%d", (int) this->lv_left);
- log_debug(" lv_height=%d", this->lv_height);
- log_debug(" lv_selection=%d", (int) this->lv_selection);
- log_debug(" inner_height=%d", (int) this->get_inner_height());
+ log_debug(
+ " lv_title=%s; vc_y=%u; lv_top=%d; lv_left=%d; lv_height=%d; "
+ "lv_selection=%d; inner_height=%d",
+ this->lv_title.c_str(),
+ this->vc_y,
+ (int) this->lv_top,
+ this->lv_left,
+ this->lv_height,
+ (int) this->lv_selection,
+ (int) this->get_inner_height());
}
virtual void invoke_scroll() { this->lv_scroll(this); }
+ struct main_content {
+ vis_line_t mc_line;
+ };
+ struct static_overlay_content {};
+ struct overlay_menu {
+ vis_line_t om_line;
+ };
+ struct overlay_content {
+ vis_line_t oc_main_line;
+ vis_line_t oc_line;
+ };
+ struct empty_space {};
+
+ using display_line_content_t = mapbox::util::variant<main_content,
+ overlay_menu,
+ static_overlay_content,
+ overlay_content,
+ empty_space>;
+
protected:
void delegate_scroll_out()
{
@@ -527,6 +542,9 @@ protected:
void update_top_from_selection();
+ vis_line_t get_overlay_top(vis_line_t row, size_t count, size_t total);
+ size_t get_overlay_height(size_t total, vis_line_t view_height);
+
enum class lv_mode_t {
NONE,
DOWN,
@@ -542,11 +560,12 @@ protected:
list_overlay_source* lv_overlay_source{nullptr};
action lv_scroll; /*< The scroll action. */
WINDOW* lv_window{nullptr}; /*< The window that contains this view. */
- unsigned int lv_x{0};
- unsigned int lv_y{0}; /*< The y offset of this view. */
vis_line_t lv_top{0}; /*< The line at the top of the view. */
- unsigned int lv_left{0}; /*< The column at the left of the view. */
+ int lv_left{0}; /*< The column at the left of the view. */
vis_line_t lv_height{0}; /*< The abs/rel height of the view. */
+ bool lv_overlay_focused{false};
+ vis_line_t lv_focused_overlay_top{0_vl};
+ vis_line_t lv_focused_overlay_selection{0_vl};
int lv_history_position{0};
bool lv_overlay_needs_update{true};
bool lv_show_scrollbar{true}; /*< Draw the scrollbar in the view. */
@@ -565,6 +584,10 @@ protected:
int lv_mouse_y{-1};
lv_mode_t lv_mouse_mode{lv_mode_t::NONE};
vis_line_t lv_tail_space{1};
+
+ std::vector<display_line_content_t> lv_display_lines;
+ unsigned int lv_scroll_top{0};
+ unsigned int lv_scroll_bottom{0};
};
#endif
diff --git a/src/lnav.cc b/src/lnav.cc
index 6d56b4d..136f61f 100644
--- a/src/lnav.cc
+++ b/src/lnav.cc
@@ -36,21 +36,14 @@
# include <alloca.h>
#endif
-#include <errno.h>
-#include <fcntl.h>
-#include <glob.h>
#include <locale.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/time.h>
-#include <sys/types.h>
#include <sys/wait.h>
-#include <termios.h>
-#include <time.h>
#include <unistd.h>
#include "config.h"
@@ -60,7 +53,6 @@
# define _WCHAR_H_CPLUSPLUS_98_CONFORMANCE_
#endif
#include <algorithm>
-#include <functional>
#include <map>
#include <memory>
#include <set>
@@ -75,9 +67,9 @@
#include "all_logs_vtab.hh"
#include "base/ansi_scrubber.hh"
+#include "base/ansi_vars.hh"
#include "base/fs_util.hh"
#include "base/func_util.hh"
-#include "base/future_util.hh"
#include "base/humanize.hh"
#include "base/humanize.time.hh"
#include "base/injector.bind.hh"
@@ -87,16 +79,18 @@
#include "base/lnav_log.hh"
#include "base/paths.hh"
#include "base/string_util.hh"
-#include "bookmarks.hh"
#include "bottom_status_source.hh"
#include "bound_tags.hh"
#include "breadcrumb_curses.hh"
#include "CLI/CLI.hpp"
+#include "date/tz.h"
#include "dump_internals.hh"
#include "environ_vtab.hh"
+#include "file_converter_manager.hh"
+#include "file_options.hh"
#include "filter_sub_source.hh"
#include "fstat_vtab.hh"
-#include "grep_proc.hh"
+#include "gantt_source.hh"
#include "hist_source.hh"
#include "init-sql.h"
#include "listview_curses.hh"
@@ -114,7 +108,8 @@
#include "log_vtab_impl.hh"
#include "logfile.hh"
#include "logfile_sub_source.hh"
-#include "piper_proc.hh"
+#include "md4cpp.hh"
+#include "piper.looper.hh"
#include "readline_curses.hh"
#include "readline_highlighters.hh"
#include "regexp_vtab.hh"
@@ -137,7 +132,6 @@
#include "view_helpers.examples.hh"
#include "view_helpers.hist.hh"
#include "views_vtab.hh"
-#include "vt52_curses.hh"
#include "xpath_vtab.hh"
#include "xterm_mouse.hh"
@@ -155,12 +149,10 @@
#include "command_executor.hh"
#include "field_overlay_source.hh"
#include "hotkeys.hh"
-#include "log_actions.hh"
#include "readline_callbacks.hh"
#include "readline_possibilities.hh"
-#include "shlex.hh"
#include "url_loader.hh"
-#include "yajlpp/yajlpp.hh"
+#include "yajlpp/json_ptr.hh"
#ifndef SYSCONFDIR
# define SYSCONFDIR "/usr/etc"
@@ -168,6 +160,7 @@
using namespace std::literals::chrono_literals;
using namespace lnav::roles::literals;
+using namespace md4cpp::literals;
static std::vector<std::string> DEFAULT_FILES;
static auto intern_lifetime = intern_string::get_table_lifetime();
@@ -201,25 +194,15 @@ const std::vector<std::string> lnav_zoom_strings = {
};
static const std::vector<std::string> DEFAULT_DB_KEY_NAMES = {
- "match_index",
- "capture_index",
- "capture_count",
- "range_start",
- "range_stop",
- "inode",
- "device",
- "inode",
- "rowid",
- "st_dev",
- "st_ino",
- "st_mode",
- "st_rdev",
- "st_uid",
- "st_gid",
+ "$id", "capture_count", "capture_index",
+ "device", "enabled", "filter_id",
+ "id", "inode", "key",
+ "match_index", "parent", "range_start",
+ "range_stop", "rowid", "st_dev",
+ "st_gid", "st_ino", "st_mode",
+ "st_rdev", "st_uid",
};
-const static file_ssize_t MAX_STDIN_CAPTURE_SIZE = 10 * 1024 * 1024;
-
static auto bound_pollable_supervisor
= injector::bind<pollable_supervisor>::to_singleton();
@@ -236,6 +219,9 @@ static auto bound_lnav_flags
= injector::bind<unsigned long, lnav_flags_tag>::to_instance(
&lnav_data.ld_flags);
+static auto bound_lnav_exec_context
+ = injector::bind<exec_context>::to_instance(&lnav_data.ld_exec_context);
+
static auto bound_last_rel_time
= injector::bind<relative_time, last_relative_time_tag>::to_singleton();
@@ -245,6 +231,8 @@ static auto bound_xterm_mouse = injector::bind<xterm_mouse>::to_singleton();
static auto bound_scripts = injector::bind<available_scripts>::to_singleton();
+static auto bound_crumbs = injector::bind<breadcrumb_curses>::to_singleton();
+
static auto bound_curl
= injector::bind_multiple<isc::service_base>()
.add_singleton<curl_looper, services::curl_streamer_t>();
@@ -256,6 +244,9 @@ static auto bound_tailer
static auto bound_main = injector::bind_multiple<static_service>()
.add_singleton<main_looper, services::main_t>();
+static auto bound_file_options_hier
+ = injector::bind<lnav::safe_file_options_hier>::to_singleton();
+
namespace injector {
template<>
void
@@ -288,41 +279,18 @@ force_linking(services::main_t anno)
}
} // namespace injector
-static breadcrumb_curses breadcrumb_view;
-
struct lnav_data_t lnav_data;
bool
setup_logline_table(exec_context& ec)
{
- // Hidden columns don't show up in the table_info pragma.
- static const char* hidden_table_columns[] = {
- "log_time_msecs",
- "log_path",
- "log_text",
- "log_body",
-
- nullptr,
- };
-
- textview_curses& log_view = lnav_data.ld_views[LNV_LOG];
+ auto& log_view = lnav_data.ld_views[LNV_LOG];
bool retval = false;
- bool update_possibilities
- = (lnav_data.ld_rl_view != nullptr && ec.ec_local_vars.size() == 1);
-
- if (update_possibilities) {
- lnav_data.ld_rl_view->clear_possibilities(ln_mode_t::SQL, "*");
- add_view_text_possibilities(lnav_data.ld_rl_view,
- ln_mode_t::SQL,
- "*",
- &log_view,
- text_quoting::sql);
- }
if (log_view.get_inner_height()) {
static intern_string_t logline = intern_string::lookup("logline");
- vis_line_t vl = log_view.get_selection();
- content_line_t cl = lnav_data.ld_log_source.at_base(vl);
+ auto vl = log_view.get_selection();
+ auto cl = lnav_data.ld_log_source.at_base(vl);
lnav_data.ld_vtab_manager->unregister_vtab(logline);
lnav_data.ld_vtab_manager->register_vtab(
@@ -331,26 +299,6 @@ setup_logline_table(exec_context& ec)
cl,
logline));
- if (update_possibilities) {
- log_data_helper ldh(lnav_data.ld_log_source);
-
- ldh.parse_line(cl);
-
- std::map<const intern_string_t,
- json_ptr_walk::walk_list_t>::const_iterator pair_iter;
- for (pair_iter = ldh.ldh_json_pairs.begin();
- pair_iter != ldh.ldh_json_pairs.end();
- ++pair_iter)
- {
- for (size_t lpc = 0; lpc < pair_iter->second.size(); lpc++) {
- lnav_data.ld_rl_view->add_possibility(
- ln_mode_t::SQL,
- "*",
- ldh.format_json_getter(pair_iter->first, lpc));
- }
- }
- }
-
retval = true;
}
@@ -358,60 +306,6 @@ setup_logline_table(exec_context& ec)
db_key_names = DEFAULT_DB_KEY_NAMES;
- if (update_possibilities) {
- add_env_possibilities(ln_mode_t::SQL);
-
- lnav_data.ld_rl_view->add_possibility(ln_mode_t::SQL,
- "*",
- std::begin(sql_keywords),
- std::end(sql_keywords));
- lnav_data.ld_rl_view->add_possibility(
- ln_mode_t::SQL, "*", sql_function_names);
- lnav_data.ld_rl_view->add_possibility(
- ln_mode_t::SQL, "*", hidden_table_columns);
-
- for (int lpc = 0; sqlite_registration_funcs[lpc]; lpc++) {
- struct FuncDef* basic_funcs;
- struct FuncDefAgg* agg_funcs;
-
- sqlite_registration_funcs[lpc](&basic_funcs, &agg_funcs);
- for (int lpc2 = 0; basic_funcs && basic_funcs[lpc2].zName; lpc2++) {
- const FuncDef& func_def = basic_funcs[lpc2];
-
- lnav_data.ld_rl_view->add_possibility(
- ln_mode_t::SQL,
- "*",
- std::string(func_def.zName) + (func_def.nArg ? "(" : "()"));
- }
- for (int lpc2 = 0; agg_funcs && agg_funcs[lpc2].zName; lpc2++) {
- const FuncDefAgg& func_def = agg_funcs[lpc2];
-
- lnav_data.ld_rl_view->add_possibility(
- ln_mode_t::SQL,
- "*",
- std::string(func_def.zName) + (func_def.nArg ? "(" : "()"));
- }
- }
-
- for (const auto& pair : sqlite_function_help) {
- switch (pair.second->ht_context) {
- case help_context_t::HC_SQL_FUNCTION:
- case help_context_t::HC_SQL_TABLE_VALUED_FUNCTION: {
- std::string poss = pair.first
- + (pair.second->ht_parameters.empty() ? "()" : ("("));
-
- lnav_data.ld_rl_view->add_possibility(
- ln_mode_t::SQL, "*", poss);
- break;
- }
- default:
- break;
- }
- }
- }
-
- walk_sqlite_metadata(lnav_data.ld_db.in(), lnav_sql_meta_callbacks);
-
for (const auto& iter : *lnav_data.ld_vtab_manager) {
iter.second->get_foreign_keys(db_key_names);
}
@@ -454,10 +348,7 @@ append_default_files()
static void
sigint(int sig)
{
- static size_t counter = 0;
-
- lnav_data.ld_looping = false;
- counter += 1;
+ auto counter = lnav_data.ld_sigint_count.fetch_add(1);
if (counter >= 3) {
abort();
}
@@ -476,16 +367,22 @@ sigchld(int sig)
}
static void
-handle_rl_key(int ch)
+handle_rl_key(int ch, const char* keyseq)
{
switch (ch) {
+ case KEY_F(2):
+ if (xterm_mouse::is_available()) {
+ auto& mouse_i = injector::get<xterm_mouse&>();
+ mouse_i.set_enabled(!mouse_i.is_enabled());
+ }
+ break;
case KEY_PPAGE:
case KEY_NPAGE:
- case KEY_CTRL_P:
- handle_paging_key(ch);
+ case KEY_CTRL('p'):
+ handle_paging_key(ch, keyseq);
break;
- case KEY_CTRL_RBRACKET:
+ case KEY_CTRL(']'):
lnav_data.ld_rl_view->abort();
break;
@@ -543,11 +440,14 @@ usage()
ex3_term.append(lnav::roles::ok("$"))
.append(" ")
- .append(lnav::roles::file("make"))
- .append(" 2>&1 | ")
.append(lnav::roles::file("lnav"))
.append(" ")
- .append("-t"_symbol)
+ .append("-e"_symbol)
+ .append(" '")
+ .append(lnav::roles::file("make"))
+ .append(" ")
+ .append("-j4"_symbol)
+ .append("' ")
.pad_to(40)
.with_attr_for_all(VC_ROLE.value(role_t::VCR_QUOTED_CODE));
@@ -623,19 +523,6 @@ make it easier to navigate through files quickly.
.append(" ")
.append("Load older rotated log files as well.\n")
.append(" ")
- .append("-t"_symbol)
- .append(" ")
- .append(R"(Prepend timestamps to the lines of data being read in
- from the standard input.
-)")
- .append(" ")
- .append("-w"_symbol)
- .append(" ")
- .append("file"_variable)
- .append(" ")
- .append("Write the contents of the standard input to this file.\n")
- .append("\n")
- .append(" ")
.append("-c"_symbol)
.append(" ")
.append("cmd"_variable)
@@ -648,6 +535,16 @@ make it easier to navigate through files quickly.
.append(" ")
.append("Execute the commands in the given file.\n")
.append(" ")
+ .append("-e"_symbol)
+ .append(" ")
+ .append("cmd"_variable)
+ .append(" ")
+ .append("Execute a shell command-line.\n")
+ .append(" ")
+ .append("-t"_symbol)
+ .append(" ")
+ .append("Treat data piped into standard in as a log file.\n")
+ .append(" ")
.append("-n"_symbol)
.append(" ")
.append("Run without the curses UI. (headless mode)\n")
@@ -658,10 +555,7 @@ make it easier to navigate through files quickly.
.append(" ")
.append("-q"_symbol)
.append(" ")
- .append(
- R"(Do not print the log messages after executing all
- of the commands.
-)")
+ .append("Do not print informational messages.\n")
.append("\n")
.append("Optional arguments"_h2)
.append("\n")
@@ -704,7 +598,7 @@ make it easier to navigate through files quickly.
.append("\u2022"_list_glyph)
.append(" To watch the output of ")
.append(lnav::roles::file("make"))
- .append(" with timestamps prepended:\n")
+ .append(":\n")
.append(" ")
.append(ex3_term)
.append("\n\n")
@@ -712,28 +606,42 @@ make it easier to navigate through files quickly.
.append("\n ")
.append("\u2022"_list_glyph)
.append(" Format files are read from:")
- .append("\n \U0001F4C2 ")
+ .append("\n ")
+ .append(":open_file_folder:"_emoji)
+ .append(" ")
.append(lnav::roles::file("/etc/lnav"))
- .append("\n \U0001F4C2 ")
+ .append("\n ")
+ .append(":open_file_folder:"_emoji)
+ .append(" ")
.append(lnav::roles::file(SYSCONFDIR "/lnav"))
.append("\n ")
.append("\u2022"_list_glyph)
.append(" Configuration, session, and format files are stored in:\n")
- .append(" \U0001F4C2 ")
+ .append(" ")
+ .append(":open_file_folder:"_emoji)
+ .append(" ")
.append(lnav::roles::file(lnav::paths::dotlnav().string()))
.append("\n\n ")
.append("\u2022"_list_glyph)
- .append(" Local copies of remote files and files extracted from\n")
- .append(" archives are stored in:\n")
- .append(" \U0001F4C2 ")
+ .append(" Local copies of remote files, files extracted from\n")
+ .append(" archives, execution output, and so on are stored in:\n")
+ .append(" ")
+ .append(":open_file_folder:"_emoji)
+ .append(" ")
.append(lnav::roles::file(lnav::paths::workdir().string()))
.append("\n\n")
.append("Documentation"_h1)
- .append(": https://docs.lnav.org\n")
+ .append(": ")
+ .append("https://docs.lnav.org"_hyperlink)
+ .append("\n")
.append("Contact"_h1)
.append("\n")
- .append(" \U0001F4AC https://github.com/tstack/lnav/discussions\n")
- .appendf(FMT_STRING(" \U0001F4EB {}\n"), PACKAGE_BUGREPORT)
+ .append(" ")
+ .append(":speech_balloon:"_emoji)
+ .append(" https://github.com/tstack/lnav/discussions\n")
+ .append(" ")
+ .append(":mailbox:"_emoji)
+ .appendf(FMT_STRING(" {}\n"), PACKAGE_BUGREPORT)
.append("Version"_h1)
.appendf(FMT_STRING(": {}"), VCS_PACKAGE_STRING);
@@ -743,7 +651,7 @@ make it easier to navigate through files quickly.
static void
clear_last_user_mark(listview_curses* lv)
{
- textview_curses* tc = (textview_curses*) lv;
+ auto* tc = (textview_curses*) lv;
if (lnav_data.ld_select_start.find(tc) != lnav_data.ld_select_start.end()
&& !tc->is_line_visible(vis_line_t(lnav_data.ld_last_user_mark[tc])))
{
@@ -766,52 +674,19 @@ update_view_position(listview_curses* lv)
};
}
-class lnav_behavior : public mouse_behavior {
-public:
- void mouse_event(int button, bool release, int x, int y) override
- {
- textview_curses* tc = *(lnav_data.ld_view_stack.top());
- struct mouse_event me;
-
- switch (button & xterm_mouse::XT_BUTTON__MASK) {
- case xterm_mouse::XT_BUTTON1:
- me.me_button = mouse_button_t::BUTTON_LEFT;
- break;
- case xterm_mouse::XT_BUTTON2:
- me.me_button = mouse_button_t::BUTTON_MIDDLE;
- break;
- case xterm_mouse::XT_BUTTON3:
- me.me_button = mouse_button_t::BUTTON_RIGHT;
- break;
- case xterm_mouse::XT_SCROLL_UP:
- me.me_button = mouse_button_t::BUTTON_SCROLL_UP;
- break;
- case xterm_mouse::XT_SCROLL_DOWN:
- me.me_button = mouse_button_t::BUTTON_SCROLL_DOWN;
- break;
- }
-
- if (button & xterm_mouse::XT_DRAG_FLAG) {
- me.me_state = mouse_button_state_t::BUTTON_STATE_DRAGGED;
- } else if (release) {
- me.me_state = mouse_button_state_t::BUTTON_STATE_RELEASED;
- } else {
- me.me_state = mouse_button_state_t::BUTTON_STATE_PRESSED;
- }
-
- gettimeofday(&me.me_time, nullptr);
- me.me_x = x - 1;
- me.me_y = y - tc->get_y() - 1;
-
- tc->handle_mouse(me);
- }
-};
-
static bool
-handle_config_ui_key(int ch)
+handle_config_ui_key(int ch, const char* keyseq)
{
bool retval = false;
+ if (ch == KEY_F(2)) {
+ if (xterm_mouse::is_available()) {
+ auto& mouse_i = injector::get<xterm_mouse&>();
+ mouse_i.set_enabled(!mouse_i.is_enabled());
+ }
+ return retval;
+ }
+
switch (lnav_data.ld_mode) {
case ln_mode_t::FILES:
retval = lnav_data.ld_files_view.handle_key(ch);
@@ -840,7 +715,7 @@ handle_config_ui_key(int ch)
} else {
new_mode = ln_mode_t::FILES;
}
- } else if (ch == 'q') {
+ } else if (ch == 'q' || ch == KEY_ESCAPE) {
new_mode = ln_mode_t::PAGING;
}
@@ -855,15 +730,17 @@ handle_config_ui_key(int ch)
lnav_data.ld_filter_view.reload_data();
lnav_data.ld_status[LNS_FILTER].set_needs_update();
} else {
- return handle_paging_key(ch);
+ return handle_paging_key(ch, keyseq);
}
return true;
}
static bool
-handle_key(int ch)
+handle_key(int ch, const char* keyseq)
{
+ static auto* breadcrumb_view = injector::get<breadcrumb_curses*>();
+
lnav_data.ld_input_state.push_back(ch);
switch (ch) {
@@ -872,16 +749,10 @@ handle_key(int ch)
default: {
switch (lnav_data.ld_mode) {
case ln_mode_t::PAGING:
- if (ch == KEY_ENTER || ch == '\n' || ch == '\r') {
- breadcrumb_view.focus();
- lnav_data.ld_mode = ln_mode_t::BREADCRUMBS;
- return true;
- }
-
- return handle_paging_key(ch);
+ return handle_paging_key(ch, keyseq);
case ln_mode_t::BREADCRUMBS:
- if (!breadcrumb_view.handle_key(ch)) {
+ if (ch == '`' || !breadcrumb_view->handle_key(ch)) {
lnav_data.ld_mode = ln_mode_t::PAGING;
lnav_data.ld_view_stack.set_needs_update();
return true;
@@ -890,7 +761,7 @@ handle_key(int ch)
case ln_mode_t::FILTER:
case ln_mode_t::FILES:
- return handle_config_ui_key(ch);
+ return handle_config_ui_key(ch, keyseq);
case ln_mode_t::SPECTRO_DETAILS: {
if (ch == '\t' || ch == 'q') {
@@ -929,12 +800,13 @@ handle_key(int ch)
case ln_mode_t::SQL:
case ln_mode_t::EXEC:
case ln_mode_t::USER:
- handle_rl_key(ch);
+ handle_rl_key(ch, keyseq);
break;
case ln_mode_t::BUSY:
switch (ch) {
- case KEY_CTRL_RBRACKET:
+ case KEY_ESCAPE:
+ case KEY_CTRL(']'):
log_vtab_data.lvd_looping = false;
break;
}
@@ -982,18 +854,6 @@ match_escape_seq(const char* keyseq)
static void
gather_pipers()
{
- for (auto iter = lnav_data.ld_pipers.begin();
- iter != lnav_data.ld_pipers.end();)
- {
- pid_t child_pid = (*iter)->get_child_pid();
- if ((*iter)->has_exited()) {
- log_info("child piper has exited -- %d", child_pid);
- iter = lnav_data.ld_pipers.erase(iter);
- } else {
- ++iter;
- }
- }
-
for (auto iter = lnav_data.ld_child_pollers.begin();
iter != lnav_data.ld_child_pollers.end();)
{
@@ -1007,21 +867,37 @@ gather_pipers()
}
}
-static void
-wait_for_pipers()
+void
+wait_for_pipers(nonstd::optional<timeval> deadline)
{
+ static const auto MAX_SLEEP_TIME = std::chrono::milliseconds(300);
+ auto sleep_time = std::chrono::milliseconds(10);
+
for (;;) {
gather_pipers();
- if (lnav_data.ld_pipers.empty() && lnav_data.ld_child_pollers.empty()) {
+ auto piper_count = lnav_data.ld_active_files.active_pipers();
+ if (piper_count == 0 && lnav_data.ld_child_pollers.empty()) {
log_debug("all pipers finished");
break;
}
- usleep(10000);
+ if (deadline && (deadline.value() < current_timeval())) {
+ break;
+ }
+ // Use usleep() since it is defined to be interruptable by a signal.
+ auto urc = usleep(
+ std::chrono::duration_cast<std::chrono::microseconds>(sleep_time)
+ .count());
+ if (urc == -1 && errno == EINTR) {
+ log_trace("wait_for_pipers(): sleep interrupted");
+ }
rebuild_indexes();
- log_debug("%d pipers and %d children still active",
- lnav_data.ld_pipers.size(),
+ log_debug("%d pipers and %d children are still active",
+ piper_count,
lnav_data.ld_child_pollers.size());
+ if (sleep_time < MAX_SLEEP_TIME) {
+ sleep_time = sleep_time * 2;
+ }
}
}
@@ -1075,10 +951,55 @@ struct refresh_status_bars {
};
static void
+check_for_file_zones()
+{
+ auto with_tz_count = 0;
+ std::vector<std::string> without_tz_files;
+
+ for (const auto& lf : lnav_data.ld_active_files.fc_files) {
+ auto format = lf->get_format_ptr();
+ if (format == nullptr) {
+ continue;
+ }
+
+ if (format->lf_timestamp_flags & ETF_ZONE_SET
+ || format->lf_date_time.dts_default_zone != nullptr)
+ {
+ with_tz_count += 1;
+ } else {
+ without_tz_files.emplace_back(lf->get_unique_path());
+ }
+ }
+ if (with_tz_count > 0 && !without_tz_files.empty()) {
+ auto note
+ = attr_line_t("The file(s) without a zone: ")
+ .join(
+ without_tz_files, VC_ROLE.value(role_t::VCR_FILE), ", ");
+ auto um
+ = lnav::console::user_message::warning(
+ "Some messages may not be sorted by time correctly")
+ .with_reason(
+ "There are one or more files whose messages do not have "
+ "a timezone in their timestamps mixed in with files that "
+ "do have timezones")
+ .with_note(note)
+ .with_help(
+ attr_line_t("Use the ")
+ .append(":set-file-timezone"_symbol)
+ .append(
+ " command to set the zone for messages in files "
+ "that do not include a zone in the timestamp"));
+
+ lnav_data.ld_exec_context.ec_error_callback_stack.back()(um);
+ }
+}
+
+static void
looper()
{
static auto* ps = injector::get<pollable_supervisor*>();
static auto* filter_source = injector::get<filter_sub_source*>();
+ static auto* breadcrumb_view = injector::get<breadcrumb_curses*>();
try {
auto* sql_cmd_map = injector::get<readline_context::command_map_t*,
@@ -1113,7 +1034,8 @@ looper()
sql_context.set_highlighter(readline_sqlite_highlighter)
.set_quote_chars("\"")
.with_readline_var((char**) &rl_completer_word_break_characters,
- " \t\n(),");
+ " \t\n(),")
+ .with_splitter(prql_splitter);
exec_context.set_highlighter(readline_shlex_highlighter);
lnav_data.ld_log_source.lss_sorting_observer
@@ -1209,10 +1131,30 @@ looper()
}
auto echo_views_stmt = echo_views_stmt_res.unwrap();
+ if (xterm_mouse::is_available()
+ && lnav_config.lc_mouse_mode == lnav_mouse_mode::disabled)
+ {
+ auto mouse_note = prepare_stmt(lnav_data.ld_db, R"(
+INSERT INTO lnav_user_notifications (id, priority, expiration, message)
+VALUES ('org.lnav.mouse-support', -1, DATETIME('now', '+1 minute'),
+ 'Press <span class="-lnav_status-styles_hotkey">F2</span> to enable mouse support');
+)");
+ if (mouse_note.isErr()) {
+ lnav::console::print(
+ stderr,
+ lnav::console::user_message::error(
+ "unable to prepare INSERT statement for "
+ "lnav_user_notifications table")
+ .with_reason(mouse_note.unwrapErr()));
+ return;
+ }
+
+ mouse_note.unwrap().execute();
+ }
+
(void) signal(SIGINT, sigint);
(void) signal(SIGTERM, sigint);
(void) signal(SIGWINCH, sigwinch);
- (void) signal(SIGCHLD, sigchld);
auto create_screen_res = screen_curses::create();
@@ -1231,6 +1173,8 @@ looper()
auto_fd errpipe[2];
auto_fd::pipe(errpipe);
+ errpipe[0].close_on_exec();
+ errpipe[1].close_on_exec();
dup2(errpipe[1], STDERR_FILENO);
errpipe[1].reset();
log_pipe_err(errpipe[0]);
@@ -1238,10 +1182,12 @@ looper()
ui_periodic_timer::singleton();
- auto mouse_i = injector::get<xterm_mouse&>();
+ auto& mouse_i = injector::get<xterm_mouse&>();
mouse_i.set_behavior(&lb);
- mouse_i.set_enabled(check_experimental("mouse"));
+ mouse_i.set_enabled(check_experimental("mouse")
+ || lnav_config.lc_mouse_mode
+ == lnav_mouse_mode::enabled);
lnav_data.ld_window = sc.get_window();
keypad(stdscr, TRUE);
@@ -1287,7 +1233,8 @@ looper()
setup_highlights(lnav_data.ld_views[LNV_TEXT].get_highlights());
setup_highlights(lnav_data.ld_views[LNV_SCHEMA].get_highlights());
setup_highlights(lnav_data.ld_views[LNV_PRETTY].get_highlights());
- setup_highlights(lnav_data.ld_preview_view.get_highlights());
+ setup_highlights(lnav_data.ld_preview_view[0].get_highlights());
+ setup_highlights(lnav_data.ld_preview_view[1].get_highlights());
for (const auto& format : log_format::get_root_formats()) {
for (auto& hl : format->lf_highlighters) {
@@ -1309,7 +1256,6 @@ looper()
execute_examples();
rlc->set_window(lnav_data.ld_window);
- rlc->set_y(-1);
rlc->set_focus_action(rl_focus);
rlc->set_change_action(rl_change);
rlc->set_perform_action(rl_callback);
@@ -1342,9 +1288,15 @@ looper()
vsb.push_back(sb);
- breadcrumb_view.set_y(1);
- breadcrumb_view.set_window(lnav_data.ld_window);
- breadcrumb_view.set_line_source(lnav_crumb_source);
+ breadcrumb_view->on_focus
+ = [](breadcrumb_curses&) { set_view_mode(ln_mode_t::BREADCRUMBS); };
+ breadcrumb_view->on_blur = [](breadcrumb_curses&) {
+ set_view_mode(ln_mode_t::PAGING);
+ lnav_data.ld_view_stack.set_needs_update();
+ };
+ breadcrumb_view->set_y(1);
+ breadcrumb_view->set_window(lnav_data.ld_window);
+ breadcrumb_view->set_line_source(lnav_crumb_source);
auto event_handler = [](auto&& tc) {
auto top_view = lnav_data.ld_view_stack.top();
@@ -1360,8 +1312,17 @@ looper()
lnav_data.ld_views[lpc].set_scroll_action(sb);
lnav_data.ld_views[lpc].set_search_action(update_hits);
lnav_data.ld_views[lpc].tc_cursor_role = role_t::VCR_CURSOR_LINE;
+ lnav_data.ld_views[lpc].tc_disabled_cursor_role
+ = role_t::VCR_DISABLED_CURSOR_LINE;
lnav_data.ld_views[lpc].tc_state_event_handler = event_handler;
}
+ lnav_data.ld_views[LNV_DB].set_supports_marks(true);
+ lnav_data.ld_views[LNV_HELP].set_supports_marks(true);
+ lnav_data.ld_views[LNV_HISTOGRAM].set_supports_marks(true);
+ lnav_data.ld_views[LNV_LOG].set_supports_marks(true);
+ lnav_data.ld_views[LNV_TEXT].set_supports_marks(true);
+ lnav_data.ld_views[LNV_SCHEMA].set_supports_marks(true);
+ lnav_data.ld_views[LNV_PRETTY].set_supports_marks(true);
lnav_data.ld_doc_view.set_window(lnav_data.ld_window);
lnav_data.ld_doc_view.set_show_scrollbar(false);
@@ -1371,13 +1332,17 @@ looper()
lnav_data.ld_match_view.set_window(lnav_data.ld_window);
- lnav_data.ld_preview_view.set_window(lnav_data.ld_window);
- lnav_data.ld_preview_view.set_show_scrollbar(false);
+ lnav_data.ld_preview_view[0].set_window(lnav_data.ld_window);
+ lnav_data.ld_preview_view[0].set_show_scrollbar(false);
+ lnav_data.ld_preview_view[1].set_window(lnav_data.ld_window);
+ lnav_data.ld_preview_view[1].set_show_scrollbar(false);
+ lnav_data.ld_filter_view.set_title("Text Filters");
lnav_data.ld_filter_view.set_selectable(true);
lnav_data.ld_filter_view.set_window(lnav_data.ld_window);
lnav_data.ld_filter_view.set_show_scrollbar(true);
+ lnav_data.ld_files_view.set_title("Files");
lnav_data.ld_files_view.set_selectable(true);
lnav_data.ld_files_view.set_window(lnav_data.ld_window);
lnav_data.ld_files_view.set_show_scrollbar(true);
@@ -1387,6 +1352,7 @@ looper()
lnav_data.ld_user_message_view.set_window(lnav_data.ld_window);
+ lnav_data.ld_spectro_details_view.set_title("spectro-details");
lnav_data.ld_spectro_details_view.set_window(lnav_data.ld_window);
lnav_data.ld_spectro_details_view.set_show_scrollbar(true);
lnav_data.ld_spectro_details_view.set_height(5_vl);
@@ -1405,16 +1371,49 @@ looper()
lnav_data.ld_spectro_source->ss_exec_context
= &lnav_data.ld_exec_context;
+ lnav_data.ld_gantt_details_view.set_title("gantt-details");
+ lnav_data.ld_gantt_details_view.set_window(lnav_data.ld_window);
+ lnav_data.ld_gantt_details_view.set_show_scrollbar(false);
+ lnav_data.ld_gantt_details_view.set_height(5_vl);
+ lnav_data.ld_gantt_details_view.set_sub_source(
+ &lnav_data.ld_gantt_details_source);
+
auto top_status_lifetime
= injector::bind<top_status_source>::to_scoped_singleton();
auto top_source = injector::get<std::shared_ptr<top_status_source>>();
- lnav_data.ld_status[LNS_TOP].set_top(0);
+ lnav_data.ld_bottom_source.get_field(bottom_status_source::BSF_HELP)
+ .on_click
+ = [](status_field&) { ensure_view(&lnav_data.ld_views[LNV_HELP]); };
+ lnav_data.ld_bottom_source
+ .get_field(bottom_status_source::BSF_LINE_NUMBER)
+ .on_click
+ = [](status_field&) {
+ auto cmd = fmt::format(
+ FMT_STRING("prompt command : 'goto {}'"),
+ (int) lnav_data.ld_view_stack.top().value()->get_top());
+
+ execute_command(lnav_data.ld_exec_context, cmd);
+ };
+ lnav_data.ld_bottom_source
+ .get_field(bottom_status_source::BSF_SEARCH_TERM)
+ .on_click
+ = [](status_field&) {
+ auto term = lnav_data.ld_view_stack.top()
+ .value()
+ ->get_current_search();
+ auto cmd
+ = fmt::format(FMT_STRING("prompt search / '{}'"), term);
+
+ execute_command(lnav_data.ld_exec_context, cmd);
+ };
+
+ lnav_data.ld_status[LNS_TOP].set_y(0);
lnav_data.ld_status[LNS_TOP].set_default_role(
role_t::VCR_INACTIVE_STATUS);
lnav_data.ld_status[LNS_TOP].set_data_source(top_source.get());
- lnav_data.ld_status[LNS_BOTTOM].set_top(-(rlc->get_height() + 1));
+ lnav_data.ld_status[LNS_BOTTOM].set_y(-(rlc->get_height() + 1));
for (auto& stat_bar : lnav_data.ld_status) {
stat_bar.set_window(lnav_data.ld_window);
}
@@ -1426,12 +1425,17 @@ looper()
&lnav_data.ld_filter_help_status_source);
lnav_data.ld_status[LNS_DOC].set_data_source(
&lnav_data.ld_doc_status_source);
- lnav_data.ld_status[LNS_PREVIEW].set_data_source(
- &lnav_data.ld_preview_status_source);
+ lnav_data.ld_status[LNS_PREVIEW0].set_data_source(
+ &lnav_data.ld_preview_status_source[0]);
+ lnav_data.ld_status[LNS_PREVIEW1].set_data_source(
+ &lnav_data.ld_preview_status_source[1]);
lnav_data.ld_spectro_status_source
= std::make_unique<spectro_status_source>();
lnav_data.ld_status[LNS_SPECTRO].set_data_source(
lnav_data.ld_spectro_status_source.get());
+ lnav_data.ld_status[LNS_GANTT].set_enabled(false);
+ lnav_data.ld_status[LNS_GANTT].set_data_source(
+ &lnav_data.ld_gantt_status_source);
lnav_data.ld_match_view.set_show_bottom_border(true);
lnav_data.ld_user_message_view.set_show_bottom_border(true);
@@ -1469,13 +1473,13 @@ looper()
// pre-filled with a suggestion that the user can complete.
// This quick-fix key could be used for other stuff as well
lnav_data.ld_rl_view->set_value(fmt::format(
- ANSI_CSI ANSI_COLOR_PARAM(
+ FMT_STRING(ANSI_CSI ANSI_COLOR_PARAM(
COLOR_YELLOW) ";" ANSI_BOLD_PARAM ANSI_CHAR_ATTR
"Unrecognized key" ANSI_NORM
", bind to a command using "
"\u2014 " ANSI_BOLD(
":config") " /ui/keymap-defs/{}/{}/"
- "command <cmd>",
+ "command <cmd>"),
encoded_name,
keyseq));
alerter::singleton().chime("unrecognized key");
@@ -1499,15 +1503,13 @@ looper()
timer.start_fade(index_counter, 1);
- file_collection active_copy;
- log_debug("rescan started %p", &active_copy);
- active_copy.merge(lnav_data.ld_active_files);
- active_copy.fc_progress = lnav_data.ld_active_files.fc_progress;
- std::future<file_collection> rescan_future
- = std::async(std::launch::async,
- &file_collection::rescan_files,
- std::move(active_copy),
- false);
+ std::future<file_collection> rescan_future;
+
+ log_debug("rescan started");
+ rescan_future = std::async(std::launch::async,
+ &file_collection::rescan_files,
+ lnav_data.ld_active_files.copy(),
+ false);
bool initial_rescan_completed = false;
int session_stage = 0;
@@ -1529,7 +1531,8 @@ looper()
gettimeofday(&current_time, nullptr);
top_source->update_time(current_time);
- lnav_data.ld_preview_view.set_needs_update();
+ lnav_data.ld_preview_view[0].set_needs_update();
+ lnav_data.ld_preview_view[1].set_needs_update();
layout_views();
@@ -1538,16 +1541,14 @@ looper()
&& rescan_future.wait_for(scan_timeout)
== std::future_status::ready)
{
+ auto ui_now = ui_clock::now();
auto new_files = rescan_future.get();
- if (!initial_rescan_completed && new_files.fc_file_names.empty()
- && new_files.fc_files.empty()
- && lnav_data.ld_active_files.fc_progress->readAccess()
- ->sp_tailers.empty())
- {
+ if (!initial_rescan_completed && new_files.empty()) {
initial_rescan_completed = true;
log_debug("initial rescan rebuild");
- changes += rebuild_indexes(loop_deadline);
+ auto rebuild_res = rebuild_indexes(loop_deadline);
+ changes += rebuild_res.rir_changes;
load_session();
if (session_data.sd_save_time) {
std::string ago;
@@ -1566,9 +1567,9 @@ looper()
lnav_data.ld_session_loaded = true;
session_stage += 1;
- loop_deadline = ui_clock::now();
+ loop_deadline = ui_now;
log_debug("file count %d",
- lnav_data.ld_active_files.fc_files.size())
+ lnav_data.ld_active_files.fc_files.size());
}
update_active_files(new_files);
if (!initial_rescan_completed) {
@@ -1580,21 +1581,20 @@ looper()
}
}
- active_copy.clear();
rescan_future = std::future<file_collection>{};
- next_rescan_time = ui_clock::now() + 333ms;
+ next_rescan_time = ui_now + 333ms;
}
if (!rescan_future.valid()
- && (session_stage < 2 || ui_clock::now() >= next_rescan_time))
+ && (session_stage < 2
+ || (lnav_data.ld_active_files.is_below_open_file_limit()
+ && ui_clock::now() >= next_rescan_time)))
{
- active_copy.clear();
- active_copy.merge(lnav_data.ld_active_files);
- active_copy.fc_progress = lnav_data.ld_active_files.fc_progress;
rescan_future = std::async(std::launch::async,
&file_collection::rescan_files,
- std::move(active_copy),
+ lnav_data.ld_active_files.copy(),
false);
+ loop_deadline = ui_clock::now() + 10ms;
}
{
@@ -1607,7 +1607,8 @@ looper()
if (initial_rescan_completed) {
if (ui_now >= next_rebuild_time) {
auto text_file_count = lnav_data.ld_text_source.size();
- changes += rebuild_indexes(loop_deadline);
+ auto rebuild_res = rebuild_indexes(loop_deadline);
+ changes += rebuild_res.rir_changes;
if (!changes && ui_clock::now() < loop_deadline) {
next_rebuild_time = ui_clock::now() + 333ms;
}
@@ -1627,16 +1628,20 @@ looper()
}
if (lnav_data.ld_mode == ln_mode_t::BREADCRUMBS
- && breadcrumb_view.get_needs_update())
+ && breadcrumb_view->get_needs_update())
{
lnav_data.ld_view_stack.set_needs_update();
}
- lnav_data.ld_view_stack.do_update();
+ if (lnav_data.ld_view_stack.do_update()) {
+ breadcrumb_view->set_needs_update();
+ }
lnav_data.ld_doc_view.do_update();
lnav_data.ld_example_view.do_update();
lnav_data.ld_match_view.do_update();
- lnav_data.ld_preview_view.do_update();
+ lnav_data.ld_preview_view[0].do_update();
+ lnav_data.ld_preview_view[1].do_update();
lnav_data.ld_spectro_details_view.do_update();
+ lnav_data.ld_gantt_details_view.do_update();
lnav_data.ld_user_message_view.do_update();
if (ui_clock::now() >= next_status_update_time) {
echo_views_stmt.execute();
@@ -1649,7 +1654,7 @@ looper()
if (filter_source->fss_editing) {
filter_source->fss_match_view.set_needs_update();
}
- breadcrumb_view.do_update();
+ breadcrumb_view->do_update();
// These updates need to be done last so their readline views can
// put the cursor in the right place.
switch (lnav_data.ld_mode) {
@@ -1704,7 +1709,7 @@ looper()
auto poll_to
= (!changes && ui_now < loop_deadline && session_stage >= 1)
? std::chrono::duration_cast<std::chrono::milliseconds>(
- loop_deadline - ui_now)
+ loop_deadline - ui_now)
: 0ms;
if (initial_rescan_completed
@@ -1718,6 +1723,11 @@ looper()
gettimeofday(&current_time, nullptr);
lnav_data.ld_input_dispatcher.poll(current_time);
+ if (lb.lb_last_view != nullptr) {
+ lb.lb_last_event.me_time = current_time;
+ lb.lb_last_view->handle_mouse(lb.lb_last_event);
+ }
+
if (rc < 0) {
switch (errno) {
case 0:
@@ -1806,7 +1816,7 @@ looper()
case ln_mode_t::PAGING:
case ln_mode_t::FILTER:
case ln_mode_t::FILES:
- next_rescan_time = next_status_update_time + 1s;
+ next_rescan_time = next_status_update_time;
next_rebuild_time = next_rescan_time;
break;
default:
@@ -1814,7 +1824,8 @@ looper()
}
}
if (old_file_names_size
- != lnav_data.ld_active_files.fc_file_names.size())
+ != lnav_data.ld_active_files.fc_file_names.size()
+ || lnav_data.ld_active_files.finished_pipers() > 0)
{
next_rescan_time = ui_clock::now();
next_rebuild_time = next_rescan_time;
@@ -1837,21 +1848,14 @@ looper()
timer.start_fade(index_counter, 3);
}
// log_debug("initial build rebuild");
- changes += rebuild_indexes(loop_deadline);
- if (!lnav_data.ld_initial_build
- && lnav_data.ld_log_source.text_line_count() == 0
- && lnav_data.ld_text_source.text_line_count() > 0)
- {
- ensure_view(&lnav_data.ld_views[LNV_TEXT]);
- lnav_data.ld_rl_view->set_alt_value(HELP_MSG_2(
- f, F, "to switch to the next/previous file"));
- }
+ auto rebuild_res = rebuild_indexes(loop_deadline);
+ changes += rebuild_res.rir_changes;
if (lnav_data.ld_view_stack.top().value_or(nullptr)
== &lnav_data.ld_views[LNV_TEXT]
&& lnav_data.ld_text_source.empty()
&& lnav_data.ld_log_source.text_line_count() > 0)
{
- textview_curses* tc_log = &lnav_data.ld_views[LNV_LOG];
+ auto* tc_log = &lnav_data.ld_views[LNV_LOG];
lnav_data.ld_view_stack.pop_back();
lnav_data.ld_views[LNV_LOG].set_top(
@@ -1881,10 +1885,14 @@ looper()
{
lnav_data.ld_initial_build = true;
}
- if (lnav_data.ld_log_source.text_line_count() > 0
- || lnav_data.ld_text_source.text_line_count() > 0
- || !lnav_data.ld_active_files.fc_other_files.empty())
+ if (rebuild_res.rir_completed
+ && (lnav_data.ld_log_source.text_line_count() > 0
+ || lnav_data.ld_text_source.text_line_count() > 0
+ || lnav_data.ld_active_files.other_file_format_count(
+ file_format_t::SQLITE_DB)
+ > 0))
{
+ log_debug("initial build completed");
lnav_data.ld_initial_build = true;
}
@@ -1915,52 +1923,46 @@ looper()
line_buffer::cleanup_cache();
archive_manager::cleanup_cache();
tailer::cleanup_cache();
+ lnav::piper::cleanup();
+ file_converter_manager::cleanup();
ran_cleanup = true;
}
}
- if (session_stage == 1
+ if (session_stage == 1 && lnav_data.ld_initial_build
&& (lnav_data.ld_active_files.fc_file_names.empty()
|| lnav_data.ld_log_source.text_line_count() > 0
|| lnav_data.ld_text_source.text_line_count() > 0
|| !lnav_data.ld_active_files.fc_other_files.empty()))
{
- log_debug("restoring view states");
- for (size_t view_index = 0; view_index < LNV__MAX;
- view_index++)
- {
- const auto& vs
- = session_data.sd_view_states[view_index];
- auto& tview = lnav_data.ld_views[view_index];
-
- if (vs.vs_top >= 0
- && (view_index == LNV_LOG
- || tview.get_top() == 0_vl))
+ lnav::session::restore_view_states();
+ if (lnav_data.ld_mode == ln_mode_t::FILES) {
+ if (lnav_data.ld_log_source.text_line_count() == 0
+ && lnav_data.ld_text_source.text_line_count() > 0
+ && lnav_data.ld_view_stack.size() == 1)
{
- log_info("restoring %s view top: %d",
- lnav_view_strings[view_index],
- vs.vs_top);
- lnav_data.ld_views[view_index].set_top(
- vis_line_t(vs.vs_top));
- if (vs.vs_selection) {
- lnav_data.ld_views[view_index].set_selection(
- vis_line_t(vs.vs_selection.value()));
- }
+ log_debug("no logs, just text...");
+ ensure_view(&lnav_data.ld_views[LNV_TEXT]);
+ lnav_data.ld_rl_view->set_alt_value(HELP_MSG_2(
+ f, F, "to switch to the next/previous file"));
}
- }
- if (lnav_data.ld_mode == ln_mode_t::FILES) {
- if (lnav_data.ld_active_files.fc_name_to_errors.empty())
+ if (lnav_data.ld_active_files.fc_name_to_errors
+ ->readAccess()
+ ->empty())
{
log_info("switching to paging!");
lnav_data.ld_mode = ln_mode_t::PAGING;
lnav_data.ld_active_files.fc_files
| lnav::itertools::for_each(
&logfile::dump_stats);
+
+ check_for_file_zones();
} else {
lnav_data.ld_files_view.set_selection(0_vl);
}
}
session_stage += 1;
+ lnav_data.ld_exec_phase = lnav_exec_phase::INTERACTIVE;
load_time_bookmarks();
}
}
@@ -1986,6 +1988,10 @@ looper()
}
gather_pipers();
+
+ next_rescan_time = ui_clock::now();
+ next_rebuild_time = next_rescan_time;
+ next_status_update_time = next_rescan_time;
}
if (lnav_data.ld_view_stack.empty()
@@ -1996,6 +2002,48 @@ looper()
{
lnav_data.ld_looping = false;
}
+
+ if (lnav_data.ld_sigint_count > 0) {
+ bool found_piper = false;
+
+ lnav_data.ld_sigint_count = 0;
+ if (!lnav_data.ld_view_stack.empty()) {
+ auto* tc = *lnav_data.ld_view_stack.top();
+
+ if (tc->get_inner_height() > 0_vl) {
+ std::vector<attr_line_t> rows(1);
+
+ tc->get_data_source()->listview_value_for_rows(
+ *tc, tc->get_selection(), rows);
+ auto& sa = rows[0].get_attrs();
+ auto line_attr_opt
+ = get_string_attr(sa, logline::L_FILE);
+ if (line_attr_opt) {
+ auto lf = line_attr_opt.value().get();
+
+ log_debug("file name when SIGINT: %s",
+ lf->get_filename().c_str());
+ for (auto& cp : lnav_data.ld_child_pollers) {
+ auto cp_name = cp.get_filename();
+
+ if (!cp_name) {
+ log_debug("no child_poller");
+ continue;
+ }
+
+ if (lf->get_filename() == cp_name.value()) {
+ log_debug("found it, sending signal!");
+ cp.send_sigint();
+ found_piper = true;
+ }
+ }
+ }
+ }
+ }
+ if (!found_piper) {
+ lnav_data.ld_looping = false;
+ }
+ }
}
} catch (readline_curses::error& e) {
log_error("error: %s", strerror(e.e_err));
@@ -2100,39 +2148,28 @@ print_user_msgs(std::vector<lnav::console::user_message> error_list,
return retval;
}
-enum class verbosity_t : int {
- quiet,
- standard,
- verbose,
-};
-
-struct stdin_options_t {
- ghc::filesystem::path so_out;
- bool so_timestamp{false};
- auto_fd so_out_fd;
-};
+verbosity_t verbosity = verbosity_t::standard;
int
main(int argc, char* argv[])
{
std::vector<lnav::console::user_message> config_errors;
std::vector<lnav::console::user_message> loader_errors;
- exec_context& ec = lnav_data.ld_exec_context;
+ auto& ec = lnav_data.ld_exec_context;
int retval = EXIT_SUCCESS;
- std::shared_ptr<piper_proc> stdin_reader;
- stdin_options_t stdin_opts;
- bool exec_stdin = false, load_stdin = false, stdin_captured = false;
+ bool exec_stdin = false, load_stdin = false;
mode_flags_t mode_flags;
const char* LANG = getenv("LANG");
- ghc::filesystem::path stdin_tmp_path;
- verbosity_t verbosity = verbosity_t::standard;
if (LANG == nullptr || strcmp(LANG, "C") == 0) {
setenv("LANG", "en_US.UTF-8", 1);
}
+ ec.ec_label_source_stack.push_back(&lnav_data.ld_db_row_source);
+
(void) signal(SIGPIPE, SIG_IGN);
+ (void) signal(SIGCHLD, sigchld);
setlocale(LC_ALL, "");
try {
std::locale::global(std::locale(""));
@@ -2148,6 +2185,58 @@ main(int argc, char* argv[])
lnav_data.ld_flags |= LNF_SECURE_MODE;
}
+ // Set PAGER so that stuff run from `:sh` will just dump their
+ // output for lnav to display. One example would be `man`, as
+ // in `:sh man ls`.
+ setenv("PAGER", "cat", 1);
+ setenv("LNAV_HOME_DIR", lnav::paths::dotlnav().c_str(), 1);
+ setenv("LNAV_WORK_DIR", lnav::paths::workdir().c_str(), 1);
+
+ try {
+ auto& safe_options_hier
+ = injector::get<lnav::safe_file_options_hier&>();
+
+ auto opt_path = lnav::paths::dotlnav() / "file-options.json";
+ auto read_res = lnav::filesystem::read_file(opt_path);
+ auto curr_tz = date::get_tzdb().current_zone();
+ auto options_coll = lnav::file_options_collection{};
+
+ if (read_res.isOk()) {
+ intern_string_t opt_path_src = intern_string::lookup(opt_path);
+ auto parse_res = lnav::file_options_collection::from_json(
+ opt_path_src, read_res.unwrap());
+ if (parse_res.isErr()) {
+ for (const auto& um : parse_res.unwrapErr()) {
+ lnav::console::print(stderr, um);
+ }
+ return EXIT_FAILURE;
+ }
+
+ options_coll = parse_res.unwrap();
+ }
+
+ safe::WriteAccess<lnav::safe_file_options_hier> options_hier(
+ safe_options_hier);
+
+ options_hier->foh_generation += 1;
+ auto_mem<char> var_path;
+
+ var_path = realpath("/var/log", nullptr);
+ options_coll.foc_pattern_to_options[fmt::format(FMT_STRING("{}/*"),
+ var_path.in())]
+ = lnav::file_options{
+ {
+ intern_string_t{},
+ source_location{},
+ curr_tz,
+ },
+ };
+ options_hier->foh_path_to_collection.emplace(ghc::filesystem::path("/"),
+ options_coll);
+ } catch (const std::runtime_error& e) {
+ log_error("failed to setup tz: %s", e.what());
+ }
+
lnav_data.ld_exec_context.ec_sql_callback = sql_callback;
lnav_data.ld_exec_context.ec_pipe_callback = pipe_callback;
@@ -2204,6 +2293,8 @@ main(int argc, char* argv[])
SELECT tbl_name FROM sqlite_master WHERE sql LIKE 'CREATE VIRTUAL TABLE%'
)";
+ lnav_data.ld_child_pollers.clear();
+
for (auto& lf : lnav_data.ld_active_files.fc_files) {
lf->close();
}
@@ -2287,6 +2378,21 @@ SELECT tbl_name FROM sqlite_master WHERE sql LIKE 'CREATE VIRTUAL TABLE%'
lnav_data.ld_debug_log_name,
"Write debug messages to the given file.")
->type_name("FILE");
+ app.add_option("-I", lnav_data.ld_config_paths, "include paths")
+ ->check(CLI::ExistingDirectory)
+ ->check([&arg_errors](std::string inc_path) -> std::string {
+ if (access(inc_path.c_str(), X_OK) != 0) {
+ arg_errors.emplace_back(
+ lnav::console::user_message::error(
+ attr_line_t("invalid configuration directory: ")
+ .append(lnav::roles::file(inc_path)))
+ .with_errno_reason());
+ return "unreadable";
+ }
+
+ return std::string();
+ })
+ ->allow_extra_args(false);
app.add_flag("-q{0},-v{2}", verbosity, "Control the verbosity");
app.set_version_flag("-V,--version");
app.footer(fmt::format(FMT_STRING("Version: {}"), VCS_PACKAGE_STRING));
@@ -2295,34 +2401,18 @@ SELECT tbl_name FROM sqlite_master WHERE sql LIKE 'CREATE VIRTUAL TABLE%'
if (argc < 2 || strcmp(argv[1], "-m") != 0) {
app.add_flag("-H", lnav_data.ld_show_help_view, "show help");
- app.add_option("-I", lnav_data.ld_config_paths, "include paths")
- ->check(CLI::ExistingDirectory)
- ->check([&arg_errors](std::string inc_path) -> std::string {
- if (access(inc_path.c_str(), X_OK) != 0) {
- arg_errors.emplace_back(
- lnav::console::user_message::error(
- attr_line_t("invalid configuration directory: ")
- .append(lnav::roles::file(inc_path)))
- .with_errno_reason());
- return "unreadable";
- }
-
- return std::string();
- })
- ->allow_extra_args(false);
app.add_flag("-C", mode_flags.mf_check_configs, "check");
auto* install_flag
= app.add_flag("-i", mode_flags.mf_install, "install");
app.add_flag("-u", mode_flags.mf_update_formats, "update");
- auto* write_flag = app.add_option("-w", stdin_opts.so_out, "write");
- auto* ts_flag
- = app.add_flag("-t", stdin_opts.so_timestamp, "timestamp");
auto* no_default_flag
= app.add_flag("-N", mode_flags.mf_no_default, "no def");
auto* rotated_flag = app.add_flag(
"-R", lnav_data.ld_active_files.fc_rotated, "rotated");
auto* recurse_flag = app.add_flag(
"-r", lnav_data.ld_active_files.fc_recursive, "recurse");
+ auto* as_log_flag
+ = app.add_flag("-t", lnav_data.ld_treat_stdin_as_log, "as-log");
app.add_flag("-W", mode_flags.mf_print_warnings);
auto* headless_flag = app.add_flag(
"-n",
@@ -2391,15 +2481,25 @@ SELECT tbl_name FROM sqlite_master WHERE sql LIKE 'CREATE VIRTUAL TABLE%'
->allow_extra_args(false)
->each(file_appender);
+ auto shexec_appender = [&mode_flags](std::string cmd) {
+ mode_flags.mf_no_default = true;
+ lnav_data.ld_commands.emplace_back(
+ fmt::format(FMT_STRING(":sh {}"), cmd));
+ };
+ auto* cmdline_opt = app.add_option("-e")
+ ->each(shexec_appender)
+ ->allow_extra_args(false)
+ ->trigger_on_parse(true);
+
install_flag->needs(file_opt);
- install_flag->excludes(write_flag,
- ts_flag,
- no_default_flag,
+ install_flag->excludes(no_default_flag,
+ as_log_flag,
rotated_flag,
recurse_flag,
headless_flag,
cmd_opt,
- exec_file_opt);
+ exec_file_opt,
+ cmdline_opt);
}
auto is_mmode = argc >= 2 && strcmp(argv[1], "-m") == 0;
@@ -2411,13 +2511,13 @@ SELECT tbl_name FROM sqlite_master WHERE sql LIKE 'CREATE VIRTUAL TABLE%'
}
} catch (const CLI::CallForHelp& e) {
if (is_mmode) {
- fmt::print("{}\n", app.help());
+ fmt::print(FMT_STRING("{}\n"), app.help());
} else {
usage();
}
return EXIT_SUCCESS;
} catch (const CLI::CallForVersion& e) {
- fmt::print("{}\n", VCS_PACKAGE_STRING);
+ fmt::print(FMT_STRING("{}\n"), VCS_PACKAGE_STRING);
return EXIT_SUCCESS;
} catch (const CLI::ParseError& e) {
if (!arg_errors.empty()) {
@@ -2444,7 +2544,9 @@ SELECT tbl_name FROM sqlite_master WHERE sql LIKE 'CREATE VIRTUAL TABLE%'
}
lnav_log_file = make_optional_from_nullable(
- fopen(lnav_data.ld_debug_log_name.c_str(), "a"));
+ fopen(lnav_data.ld_debug_log_name.c_str(), "ae"));
+ lnav_log_file |
+ [](auto* file) { fcntl(fileno(file), F_SETFD, FD_CLOEXEC); };
log_info("lnav started");
{
@@ -2459,6 +2561,7 @@ SELECT tbl_name FROM sqlite_master WHERE sql LIKE 'CREATE VIRTUAL TABLE%'
}
load_config(lnav_data.ld_config_paths, config_errors);
+
if (!config_errors.empty()) {
if (print_user_msgs(config_errors, mode_flags) != EXIT_SUCCESS) {
return EXIT_FAILURE;
@@ -2484,15 +2587,20 @@ SELECT tbl_name FROM sqlite_master WHERE sql LIKE 'CREATE VIRTUAL TABLE%'
= attr_line_t("the ")
.append("-i"_symbol)
.append(
- " option expects one or more log format definition "
- "files to install in your lnav configuration "
+ " option expects one or more log format "
+ "definition "
+ "files to install in your lnav "
+ "configuration "
"directory");
const auto install_help
= attr_line_t(
- "log format definitions are JSON files that tell lnav "
+ "log format definitions are JSON files that "
+ "tell lnav "
"how to understand log files\n")
.append(
- "See: https://docs.lnav.org/en/latest/formats.html");
+ "See: "
+ "https://docs.lnav.org/en/latest/"
+ "formats.html");
lnav::console::print(stderr,
lnav::console::user_message::error(
@@ -2502,7 +2610,7 @@ SELECT tbl_name FROM sqlite_master WHERE sql LIKE 'CREATE VIRTUAL TABLE%'
return EXIT_FAILURE;
}
- for (auto& file_path : file_args) {
+ for (const auto& file_path : file_args) {
if (endswith(file_path, ".git")) {
if (!install_from_git(file_path)) {
return EXIT_FAILURE;
@@ -2592,44 +2700,64 @@ SELECT tbl_name FROM sqlite_master WHERE sql LIKE 'CREATE VIRTUAL TABLE%'
? configs_installed_path
: formats_installed_path)
/ dst_name;
- auto_fd in_fd, out_fd;
- if ((in_fd = open(file_path.c_str(), O_RDONLY)) == -1) {
- perror("unable to open file to install");
- } else if ((out_fd = lnav::filesystem::openp(
- dst_path, O_WRONLY | O_CREAT | O_TRUNC, 0644))
- == -1)
- {
- fprintf(stderr,
- "error: unable to open destination: %s -- %s\n",
- dst_path.c_str(),
- strerror(errno));
- } else {
- char buffer[2048];
- ssize_t rc;
-
- while ((rc = read(in_fd, buffer, sizeof(buffer))) > 0) {
- ssize_t remaining = rc, written;
-
- while (remaining > 0) {
- written = write(out_fd, buffer, rc);
- if (written == -1) {
- fprintf(stderr,
- "error: unable to install file -- %s\n",
- strerror(errno));
- exit(EXIT_FAILURE);
- }
+ auto read_res = lnav::filesystem::read_file(file_path);
+ if (read_res.isErr()) {
+ auto um = lnav::console::user_message::error(
+ attr_line_t("cannot read file to install -- ")
+ .append(lnav::roles::file(file_path)))
+ .with_reason(read_res.unwrap());
- remaining -= written;
- }
+ lnav::console::print(stderr, um);
+ return EXIT_FAILURE;
+ }
+
+ auto file_content = read_res.unwrap();
+
+ auto read_dst_res = lnav::filesystem::read_file(dst_path);
+ if (read_dst_res.isOk()) {
+ auto dst_content = read_dst_res.unwrap();
+
+ if (dst_content == file_content) {
+ auto um = lnav::console::user_message::info(
+ attr_line_t("file is already installed at -- ")
+ .append(lnav::roles::file(dst_path)));
+
+ lnav::console::print(stdout, um);
+
+ return EXIT_SUCCESS;
}
+ }
- lnav::console::print(
- stderr,
- lnav::console::user_message::ok(
- attr_line_t("installed -- ")
- .append(lnav::roles::file(dst_path))));
+ auto write_res = lnav::filesystem::write_file(
+ dst_path,
+ file_content,
+ {lnav::filesystem::write_file_options::backup_existing});
+ if (write_res.isErr()) {
+ auto um = lnav::console::user_message::error(
+ attr_line_t("failed to install file to -- ")
+ .append(lnav::roles::file(dst_path)))
+ .with_reason(write_res.unwrapErr());
+
+ lnav::console::print(stderr, um);
+ return EXIT_FAILURE;
}
+
+ auto write_file_res = write_res.unwrap();
+ auto um = lnav::console::user_message::ok(
+ attr_line_t("installed -- ")
+ .append(lnav::roles::file(dst_path)));
+ if (write_file_res.wfr_backup_path) {
+ um.with_note(
+ attr_line_t("the previously installed ")
+ .append_quoted(
+ lnav::roles::file(dst_path.filename().string()))
+ .append(" was backed up to -- ")
+ .append(lnav::roles::file(
+ write_file_res.wfr_backup_path.value().string())));
+ }
+
+ lnav::console::print(stdout, um);
}
return EXIT_SUCCESS;
}
@@ -2644,9 +2772,9 @@ SELECT tbl_name FROM sqlite_master WHERE sql LIKE 'CREATE VIRTUAL TABLE%'
}
}
- /* If we statically linked against an ncurses library that had a non-
- * standard path to the terminfo database, we need to set this variable
- * so that it will try the default path.
+ /* If we statically linked against an ncurses library that had a
+ * non-standard path to the terminfo database, we need to set this
+ * variable so that it will try the default path.
*/
setenv("TERMINFO_DIRS",
"/usr/share/terminfo:/lib/terminfo:/usr/share/lib/terminfo",
@@ -2662,12 +2790,10 @@ SELECT tbl_name FROM sqlite_master WHERE sql LIKE 'CREATE VIRTUAL TABLE%'
.set_word_wrap(false);
auto log_fos = new field_overlay_source(lnav_data.ld_log_source,
lnav_data.ld_text_source);
- if (lnav_data.ld_flags & LNF_HEADLESS) {
- log_fos->fos_show_status = false;
- }
- log_fos->fos_contexts.emplace("", false, true);
+ log_fos->fos_contexts.emplace("", false, true, true);
lnav_data.ld_views[LNV_LOG]
.set_sub_source(&lnav_data.ld_log_source)
+#if 0
.set_delegate(std::make_shared<action_delegate>(
lnav_data.ld_log_source,
[](auto child_pid) { lnav_data.ld_children.push_back(child_pid); },
@@ -2677,17 +2803,23 @@ SELECT tbl_name FROM sqlite_master WHERE sql LIKE 'CREATE VIRTUAL TABLE%'
pp->get_fd());
lnav_data.ld_files_to_front.template emplace_back(desc, 0_vl);
}))
+#endif
.add_input_delegate(lnav_data.ld_log_source)
.set_tail_space(2_vl)
.set_overlay_source(log_fos);
auto sel_reload_delegate = [](textview_curses& tc) {
- if (lnav_config.lc_ui_movement.mode == config_movement_mode::CURSOR) {
+ if (!(lnav_data.ld_flags & LNF_HEADLESS)
+ && lnav_config.lc_ui_movement.mode == config_movement_mode::CURSOR)
+ {
tc.set_selectable(true);
}
};
lnav_data.ld_views[LNV_LOG].set_reload_config_delegate(sel_reload_delegate);
lnav_data.ld_views[LNV_PRETTY].set_reload_config_delegate(
sel_reload_delegate);
+ auto text_header_source
+ = std::make_shared<textfile_header_overlay>(&lnav_data.ld_text_source);
+ lnav_data.ld_views[LNV_TEXT].set_overlay_source(text_header_source.get());
lnav_data.ld_views[LNV_TEXT].set_sub_source(&lnav_data.ld_text_source);
lnav_data.ld_views[LNV_TEXT].set_reload_config_delegate(
sel_reload_delegate);
@@ -2696,6 +2828,10 @@ SELECT tbl_name FROM sqlite_master WHERE sql LIKE 'CREATE VIRTUAL TABLE%'
.set_sub_source(&lnav_data.ld_hist_source2);
lnav_data.ld_views[LNV_DB].set_sub_source(&lnav_data.ld_db_row_source);
lnav_data.ld_db_overlay.dos_labels = &lnav_data.ld_db_row_source;
+ lnav_data.ld_db_preview_overlay_source[0].dos_labels
+ = &lnav_data.ld_db_preview_source[0];
+ lnav_data.ld_db_preview_overlay_source[1].dos_labels
+ = &lnav_data.ld_db_preview_source[1];
lnav_data.ld_views[LNV_DB]
.set_reload_config_delegate(sel_reload_delegate)
.set_overlay_source(&lnav_data.ld_db_overlay);
@@ -2707,15 +2843,32 @@ SELECT tbl_name FROM sqlite_master WHERE sql LIKE 'CREATE VIRTUAL TABLE%'
.add_input_delegate(*lnav_data.ld_spectro_source)
.set_tail_space(4_vl);
lnav_data.ld_views[LNV_SPECTRO].set_selectable(true);
+ auto gantt_view_source
+ = std::make_shared<gantt_source>(lnav_data.ld_views[LNV_LOG],
+ lnav_data.ld_log_source,
+ lnav_data.ld_gantt_details_source,
+ lnav_data.ld_gantt_status_source);
+ gantt_view_source->gs_exec_context = &lnav_data.ld_exec_context;
+ auto gantt_header_source
+ = std::make_shared<gantt_header_overlay>(gantt_view_source);
+ lnav_data.ld_views[LNV_GANTT]
+ .set_sub_source(gantt_view_source.get())
+ .set_overlay_source(gantt_header_source.get())
+ .set_tail_space(4_vl);
+ lnav_data.ld_views[LNV_GANTT].set_selectable(true);
+
+ auto _gantt_cleanup = finally([] {
+ lnav_data.ld_views[LNV_GANTT].set_sub_source(nullptr);
+ lnav_data.ld_views[LNV_GANTT].set_overlay_source(nullptr);
+ });
lnav_data.ld_doc_view.set_sub_source(&lnav_data.ld_doc_source);
lnav_data.ld_example_view.set_sub_source(&lnav_data.ld_example_source);
lnav_data.ld_match_view.set_sub_source(&lnav_data.ld_match_source);
- lnav_data.ld_preview_view.set_sub_source(&lnav_data.ld_preview_source);
+ lnav_data.ld_preview_view[0].set_sub_source(
+ &lnav_data.ld_preview_source[0]);
lnav_data.ld_filter_view.set_sub_source(filter_source)
- .add_input_delegate(*filter_source)
- .add_child_view(&filter_source->fss_match_view)
- .add_child_view(filter_source->fss_editor.get());
+ .add_input_delegate(*filter_source);
lnav_data.ld_files_view.set_sub_source(&lnav_data.ld_files_source)
.add_input_delegate(lnav_data.ld_files_source);
lnav_data.ld_user_message_view.set_sub_source(
@@ -2761,6 +2914,9 @@ SELECT tbl_name FROM sqlite_master WHERE sql LIKE 'CREATE VIRTUAL TABLE%'
lnav_data.ld_vtab_manager->register_vtab(
std::make_shared<log_format_vtab_impl>(
*log_format::find_root_format("generic_log")));
+ lnav_data.ld_vtab_manager->register_vtab(
+ std::make_shared<log_format_vtab_impl>(
+ *log_format::find_root_format("lnav_piper_log")));
for (auto& iter : log_format::get_root_formats()) {
auto lvi = iter->get_vtab_impl();
@@ -2803,6 +2959,7 @@ SELECT tbl_name FROM sqlite_master WHERE sql LIKE 'CREATE VIRTUAL TABLE%'
lnav_data.ld_mode = ln_mode_t::PAGING;
if ((isatty(STDIN_FILENO) || is_dev_null(STDIN_FILENO)) && file_args.empty()
+ && lnav_data.ld_active_files.fc_file_names.empty()
&& !mode_flags.mf_no_default)
{
char start_dir[FILENAME_MAX];
@@ -2837,56 +2994,63 @@ SELECT tbl_name FROM sqlite_master WHERE sql LIKE 'CREATE VIRTUAL TABLE%'
load_stdin = true;
}
- for (auto& file_path : file_args) {
- auto file_path_without_trailer = file_path;
+ for (const auto& file_path_str : file_args) {
+ auto file_path_without_trailer = file_path_str;
auto file_loc = file_location_t{mapbox::util::no_init{}};
auto_mem<char> abspath;
struct stat st;
- auto colon_index = file_path.rfind(':');
+ auto colon_index = file_path_str.rfind(':');
if (colon_index != std::string::npos) {
- auto top_range = scn::string_view{&file_path[colon_index + 1],
- &(*file_path.cend())};
+ auto top_range = scn::string_view{&file_path_str[colon_index + 1],
+ &(*file_path_str.cend())};
auto scan_res = scn::scan_value<int>(top_range);
if (scan_res) {
- file_path_without_trailer = file_path.substr(0, colon_index);
+ file_path_without_trailer
+ = file_path_str.substr(0, colon_index);
file_loc = vis_line_t(scan_res.value());
} else {
log_warning(
- "failed to parse line number from file path with colon: %s",
- file_path.c_str());
+ "failed to parse line number from file path "
+ "with colon: %s",
+ file_path_str.c_str());
}
}
- auto hash_index = file_path.rfind('#');
+ auto hash_index = file_path_str.rfind('#');
if (hash_index != std::string::npos) {
- file_loc = file_path.substr(hash_index);
- file_path_without_trailer = file_path.substr(0, hash_index);
- }
- if (stat(file_path_without_trailer.c_str(), &st) == 0) {
- file_path = file_path_without_trailer;
+ file_loc = file_path_str.substr(hash_index);
+ file_path_without_trailer = file_path_str.substr(0, hash_index);
}
+ auto file_path = ghc::filesystem::path(
+ stat(file_path_without_trailer.c_str(), &st) == 0
+ ? file_path_without_trailer
+ : file_path_str);
- if (file_path == "-") {
+ if (file_path_str == "-") {
load_stdin = true;
}
#ifdef HAVE_LIBCURL
- else if (is_url(file_path))
+ else if (is_url(file_path_str))
{
- auto ul = std::make_shared<url_loader>(file_path);
+ auto ul = std::make_shared<url_loader>(file_path_str);
- lnav_data.ld_active_files.fc_file_names[file_path].with_fd(
- ul->copy_fd());
+ lnav_data.ld_active_files.fc_file_names[ul->get_path()]
+ .with_filename(file_path);
isc::to<curl_looper&, services::curl_streamer_t>().send(
[ul](auto& clooper) { clooper.add_request(ul); });
+ } else if (file_path_str.find("://") != std::string::npos) {
+ lnav_data.ld_commands.insert(
+ lnav_data.ld_commands.begin(),
+ fmt::format(FMT_STRING(":open {}"), file_path_str));
}
#endif
- else if (is_glob(file_path))
+ else if (lnav::filesystem::is_glob(file_path))
{
lnav_data.ld_active_files.fc_file_names[file_path].with_tail(
!(lnav_data.ld_flags & LNF_HEADLESS));
- } else if (stat(file_path.c_str(), &st) == -1) {
- if (file_path.find(':') != std::string::npos) {
+ } else if (lnav::filesystem::statp(file_path, &st) == -1) {
+ if (file_path_str.find(':') != std::string::npos) {
lnav_data.ld_active_files.fc_file_names[file_path].with_tail(
!(lnav_data.ld_flags & LNF_HEADLESS));
} else {
@@ -2909,7 +3073,8 @@ SELECT tbl_name FROM sqlite_master WHERE sql LIKE 'CREATE VIRTUAL TABLE%'
} else if (S_ISFIFO(st.st_mode)) {
auto_fd fifo_fd;
- if ((fifo_fd = open(file_path.c_str(), O_RDONLY)) == -1) {
+ if ((fifo_fd = lnav::filesystem::openp(file_path, O_RDONLY)) == -1)
+ {
lnav::console::print(
stderr,
lnav::console::user_message::error(
@@ -2918,25 +3083,15 @@ SELECT tbl_name FROM sqlite_master WHERE sql LIKE 'CREATE VIRTUAL TABLE%'
.with_errno_reason());
retval = EXIT_FAILURE;
} else {
- auto fifo_tmp_fd
- = lnav::filesystem::open_temp_file(
- ghc::filesystem::temp_directory_path()
- / "lnav.fifo.XXXXXX")
- .map([](auto&& pair) {
- ghc::filesystem::remove(pair.first);
-
- return std::move(pair.second);
- })
- .expect("Cannot create temporary file for FIFO");
- auto fifo_piper = std::make_shared<piper_proc>(
- std::move(fifo_fd), false, std::move(fifo_tmp_fd));
- auto fifo_out_fd = fifo_piper->get_fd();
auto desc = fmt::format(FMT_STRING("FIFO [{}]"),
lnav_data.ld_fifo_counter++);
+ auto create_piper_res = lnav::piper::create_looper(
+ desc, std::move(fifo_fd), auto_fd{});
- lnav_data.ld_active_files.fc_file_names[desc].with_fd(
- std::move(fifo_out_fd));
- lnav_data.ld_pipers.push_back(fifo_piper);
+ if (create_piper_res.isOk()) {
+ lnav_data.ld_active_files.fc_file_names[desc].with_piper(
+ create_piper_res.unwrap());
+ }
}
} else if ((abspath = realpath(file_path.c_str(), nullptr)) == nullptr)
{
@@ -2952,7 +3107,8 @@ SELECT tbl_name FROM sqlite_master WHERE sql LIKE 'CREATE VIRTUAL TABLE%'
dir_wild + "/*", logfile_open_options());
} else {
lnav_data.ld_active_files.fc_file_names.emplace(
- abspath.in(), logfile_open_options());
+ abspath.in(),
+ logfile_open_options().with_init_location(file_loc));
if (file_loc.valid()) {
lnav_data.ld_files_to_front.emplace_back(abspath.in(),
file_loc);
@@ -2997,7 +3153,8 @@ SELECT tbl_name FROM sqlite_master WHERE sql LIKE 'CREATE VIRTUAL TABLE%'
std::string partial_line(sbr.get_data(), partial_len);
fprintf(stderr,
- "error:%s:%ld:line did not match format %s\n",
+ "error:%s:%ld:line did not match format "
+ "%s\n",
lf->get_filename().c_str(),
line_number,
fmt->get_pattern_path(line_number).c_str());
@@ -3039,44 +3196,66 @@ SELECT tbl_name FROM sqlite_master WHERE sql LIKE 'CREATE VIRTUAL TABLE%'
retval = EXIT_FAILURE;
}
+ nonstd::optional<std::string> stdin_url;
+ ghc::filesystem::path stdin_dir;
if (load_stdin && !isatty(STDIN_FILENO) && !is_dev_null(STDIN_FILENO)
&& !exec_stdin)
{
- if (stdin_opts.so_out.empty()) {
- auto pattern
- = lnav::paths::dotlnav() / "stdin-captures/stdin.XXXXXX";
+ static const std::string STDIN_NAME = "stdin";
+ struct stat stdin_st;
- auto open_result = lnav::filesystem::open_temp_file(pattern);
- if (open_result.isErr()) {
- fprintf(stderr,
- "Unable to open temporary file for stdin: %s",
- open_result.unwrapErr().c_str());
- return EXIT_FAILURE;
+ if (fstat(STDIN_FILENO, &stdin_st) == -1) {
+ lnav::console::print(
+ stderr,
+ lnav::console::user_message::error("unable to stat() stdin")
+ .with_errno_reason());
+ retval = EXIT_FAILURE;
+ } else if (S_ISFIFO(stdin_st.st_mode)) {
+ struct pollfd pfd[1];
+
+ pfd[0].fd = STDIN_FILENO;
+ pfd[0].events = POLLIN;
+ pfd[0].revents = 0;
+ auto prc = poll(pfd, 1, 0);
+
+ if (prc == 0 || (pfd[0].revents & POLLIN)) {
+ auto stdin_piper_res = lnav::piper::create_looper(
+ STDIN_NAME, auto_fd::dup_of(STDIN_FILENO), auto_fd{});
+ if (stdin_piper_res.isOk()) {
+ auto stdin_piper = stdin_piper_res.unwrap();
+ stdin_url = stdin_piper.get_url();
+ stdin_dir = stdin_piper.get_out_dir();
+ auto& loo = lnav_data.ld_active_files
+ .fc_file_names[stdin_piper.get_name()];
+ loo.with_piper(stdin_piper).with_include_in_session(false);
+ if (lnav_data.ld_treat_stdin_as_log) {
+ loo.with_text_format(text_format_t::TF_LOG);
+ }
+ }
}
+ } else if (S_ISREG(stdin_st.st_mode)) {
+ // The shell connected a file directly, just open it up
+ // and add it in here.
+ auto loo = logfile_open_options{}
+ .with_filename(STDIN_NAME)
+ .with_include_in_session(false);
+
+ auto open_res
+ = logfile::open(STDIN_NAME, loo, auto_fd::dup_of(STDIN_FILENO));
- auto temp_pair = open_result.unwrap();
- stdin_tmp_path = temp_pair.first;
- stdin_opts.so_out_fd = std::move(temp_pair.second);
- } else {
- auto open_res = lnav::filesystem::create_file(
- stdin_opts.so_out, O_RDWR | O_TRUNC, 0600);
if (open_res.isErr()) {
- fmt::print(stderr, "error: {}\n", open_res.unwrapErr());
- return EXIT_FAILURE;
- }
+ lnav::console::print(
+ stderr,
+ lnav::console::user_message::error("unable to open stdin")
+ .with_reason(open_res.unwrapErr()));
+ retval = EXIT_FAILURE;
+ } else {
+ file_collection fc;
- stdin_opts.so_out_fd = open_res.unwrap();
+ fc.fc_files.emplace_back(open_res.unwrap());
+ update_active_files(fc);
+ }
}
-
- stdin_captured = true;
- stdin_reader
- = std::make_shared<piper_proc>(auto_fd(STDIN_FILENO),
- stdin_opts.so_timestamp,
- std::move(stdin_opts.so_out_fd));
- lnav_data.ld_active_files.fc_file_names["stdin"]
- .with_fd(stdin_reader->get_fd())
- .with_include_in_session(false);
- lnav_data.ld_pipers.push_back(stdin_reader);
}
if (!isatty(STDIN_FILENO) && isatty(STDOUT_FILENO)) {
@@ -3085,7 +3264,7 @@ SELECT tbl_name FROM sqlite_master WHERE sql LIKE 'CREATE VIRTUAL TABLE%'
}
}
- if (retval == EXIT_SUCCESS
+ if (retval == EXIT_SUCCESS && lnav_data.ld_active_files.fc_files.empty()
&& lnav_data.ld_active_files.fc_file_names.empty()
&& lnav_data.ld_commands.empty()
&& !(lnav_data.ld_show_help_view || mode_flags.mf_no_default))
@@ -3094,11 +3273,10 @@ SELECT tbl_name FROM sqlite_master WHERE sql LIKE 'CREATE VIRTUAL TABLE%'
stderr,
lnav::console::user_message::error("nothing to do")
.with_reason("no files given or default files found")
- .with_help(
- attr_line_t("use the ")
- .append_quoted(lnav::roles::keyword("-N"))
- .append(
- " option to open lnav without loading any files")));
+ .with_help(attr_line_t("use the ")
+ .append_quoted(lnav::roles::keyword("-N"))
+ .append(" option to open lnav without "
+ "loading any files")));
retval = EXIT_FAILURE;
}
@@ -3145,6 +3323,26 @@ SELECT tbl_name FROM sqlite_master WHERE sql LIKE 'CREATE VIRTUAL TABLE%'
log_info(" %s", file_iter->first.c_str());
}
+ if (!(lnav_data.ld_flags & LNF_HEADLESS)
+ && verbosity == verbosity_t::quiet && load_stdin
+ && lnav_data.ld_active_files.fc_file_names.size() == 1)
+ {
+ rescan_files(true);
+ gather_pipers();
+ auto rebuild_res = rebuild_indexes(ui_clock::now() + 15ms);
+ if (rebuild_res.rir_completed
+ && lnav_data.ld_child_pollers.empty())
+ {
+ rebuild_indexes_repeatedly();
+ if (lnav_data.ld_active_files.fc_files.empty()
+ || lnav_data.ld_active_files.fc_files[0]->size() < 24)
+ {
+ lnav_data.ld_flags |= LNF_HEADLESS;
+ verbosity = verbosity_t::standard;
+ }
+ }
+ }
+
if (lnav_data.ld_flags & LNF_HEADLESS) {
std::vector<
std::pair<Result<std::string, lnav::console::user_message>,
@@ -3153,21 +3351,29 @@ SELECT tbl_name FROM sqlite_master WHERE sql LIKE 'CREATE VIRTUAL TABLE%'
textview_curses *log_tc, *text_tc, *tc;
bool output_view = true;
+ log_fos->fos_contexts.top().c_show_applicable_annotations
+ = false;
+
view_colors::init(true);
rescan_files(true);
- if (!lnav_data.ld_active_files.fc_name_to_errors.empty()) {
- for (const auto& pair :
- lnav_data.ld_active_files.fc_name_to_errors)
- {
- lnav::console::print(
- stderr,
- lnav::console::user_message::error(
- attr_line_t("unable to open file: ")
- .append(lnav::roles::file(pair.first)))
- .with_reason(pair.second.fei_description));
- }
+ wait_for_pipers();
+ rescan_files(true);
+ rebuild_indexes_repeatedly();
+ {
+ safe::WriteAccess<safe_name_to_errors> errs(
+ *lnav_data.ld_active_files.fc_name_to_errors);
+ if (!errs->empty()) {
+ for (const auto& pair : *errs) {
+ lnav::console::print(
+ stderr,
+ lnav::console::user_message::error(
+ attr_line_t("unable to open file: ")
+ .append(lnav::roles::file(pair.first)))
+ .with_reason(pair.second.fei_description));
+ }
- return EXIT_FAILURE;
+ return EXIT_FAILURE;
+ }
}
init_session();
lnav_data.ld_exec_context.set_output("stdout", stdout, nullptr);
@@ -3197,23 +3403,30 @@ SELECT tbl_name FROM sqlite_master WHERE sql LIKE 'CREATE VIRTUAL TABLE%'
archive_manager::cleanup_cache();
tailer::cleanup_cache();
line_buffer::cleanup_cache();
+ lnav::piper::cleanup();
+ file_converter_manager::cleanup();
wait_for_pipers();
+ rescan_files(true);
isc::to<curl_looper&, services::curl_streamer_t>()
.send_and_wait(
[](auto& clooper) { clooper.process_all(); });
rebuild_indexes_repeatedly();
wait_for_children();
- if (!lnav_data.ld_active_files.fc_name_to_errors.empty()) {
- for (const auto& pair :
- lnav_data.ld_active_files.fc_name_to_errors)
- {
- fprintf(stderr,
- "error: unable to open file: %s -- %s\n",
- pair.first.c_str(),
- pair.second.fei_description.c_str());
- }
+ {
+ safe::WriteAccess<safe_name_to_errors> errs(
+ *lnav_data.ld_active_files.fc_name_to_errors);
+ if (!errs->empty()) {
+ for (const auto& pair : *errs) {
+ lnav::console::print(
+ stderr,
+ lnav::console::user_message::error(
+ attr_line_t("unable to open file: ")
+ .append(lnav::roles::file(pair.first)))
+ .with_reason(pair.second.fei_description));
+ }
- return EXIT_FAILURE;
+ return EXIT_FAILURE;
+ }
}
for (const auto& lf : lnav_data.ld_active_files.fc_files) {
@@ -3270,21 +3483,19 @@ SELECT tbl_name FROM sqlite_master WHERE sql LIKE 'CREATE VIRTUAL TABLE%'
}
auto* los = tc->get_overlay_source();
+ attr_line_t ov_al;
+ while (los != nullptr && tc->get_inner_height() > 0_vl
+ && los->list_static_overlay(
+ *tc, y, tc->get_inner_height(), ov_al))
+ {
+ write_line_to(stdout, ov_al);
+ ov_al.clear();
+ ++y;
+ }
vis_line_t vl;
- for (vl = tc->get_top(); vl < tc->get_inner_height();
- ++vl, ++y)
+ for (vl = tc->get_top(); vl < tc->get_inner_height(); ++vl)
{
- attr_line_t al;
-
- while (los != nullptr
- && los->list_value_for_overlay(
- *tc, y, tc->get_inner_height(), vl, al))
- {
- write_line_to(stdout, al);
- ++y;
- }
-
std::vector<attr_line_t> rows(1);
tc->listview_value_for_rows(*tc, vl, rows);
if (suppress_empty_lines && rows[0].empty()) {
@@ -3292,17 +3503,14 @@ SELECT tbl_name FROM sqlite_master WHERE sql LIKE 'CREATE VIRTUAL TABLE%'
}
write_line_to(stdout, rows[0]);
- }
- {
- attr_line_t al;
- while (los != nullptr
- && los->list_value_for_overlay(
- *tc, y, tc->get_inner_height(), vl, al)
- && !al.empty())
- {
- write_line_to(stdout, al);
- ++y;
+ std::vector<attr_line_t> row_overlay_content;
+ if (los != nullptr) {
+ los->list_value_for_overlay(
+ *tc, vl, row_overlay_content);
+ for (const auto& ov_row : row_overlay_content) {
+ write_line_to(stdout, ov_row);
+ }
}
}
}
@@ -3330,56 +3538,30 @@ SELECT tbl_name FROM sqlite_master WHERE sql LIKE 'CREATE VIRTUAL TABLE%'
fprintf(stderr, "error: %s\n", e.what());
}
- // When reading from stdin, tell the user where the capture file is
- // stored so they can look at it later.
- if (stdin_captured && stdin_opts.so_out.empty()
- && !(lnav_data.ld_flags & LNF_HEADLESS))
+ // When reading from stdin, tell the user where the capture
+ // file is stored so they can look at it later.
+ if (stdin_url && !(lnav_data.ld_flags & LNF_HEADLESS)
+ && verbosity != verbosity_t::quiet)
{
- auto stdin_fd = stdin_reader->get_fd();
- struct stat stdin_stat;
- nonstd::optional<file_ssize_t> stdin_size;
-
- // NB: the file can be deleted by the time we get here
- fchmod(stdin_fd.get(), S_IRUSR);
- if (fstat(stdin_fd.get(), &stdin_stat) != -1) {
- stdin_size = stdin_stat.st_size;
- }
- if (!ghc::filesystem::exists(stdin_tmp_path)
- || verbosity == verbosity_t::quiet || !stdin_size
- || stdin_size.value() == 0
- || stdin_size.value() > MAX_STDIN_CAPTURE_SIZE)
+ file_size_t stdin_size = 0;
+ for (const auto& ent :
+ ghc::filesystem::directory_iterator(stdin_dir))
{
- std::error_code rm_err_code;
-
- log_info("not saving stdin capture -- %s (size=%d)",
- stdin_tmp_path.c_str(),
- stdin_size.value_or(-1));
- ghc::filesystem::remove(stdin_tmp_path, rm_err_code);
- } else {
- auto home = getenv_opt("HOME");
- auto path_str = stdin_tmp_path.string();
-
- if (home && startswith(path_str, home.value())) {
- path_str = path_str.substr(strlen(home.value()));
- if (path_str[0] != '/') {
- path_str.insert(0, 1, '/');
- }
- path_str.insert(0, 1, '~');
- }
-
- lnav::console::print(
- stderr,
- lnav::console::user_message::info(
- attr_line_t()
- .append(lnav::roles::number(humanize::file_size(
- stdin_size.value(), humanize::alignment::none)))
- .append(" of data from stdin was captured and "
- "will be saved for one day. You can "
- "reopen it by running:\n")
- .appendf(FMT_STRING(" {} "),
- lnav_data.ld_program_name)
- .append(lnav::roles::file(path_str))));
+ stdin_size += ent.file_size();
}
+
+ lnav::console::print(
+ stderr,
+ lnav::console::user_message::info(
+ attr_line_t()
+ .append(lnav::roles::number(humanize::file_size(
+ stdin_size, humanize::alignment::none)))
+ .append(" of data from stdin was captured and "
+ "will be saved for one day. You can "
+ "reopen it by running:\n")
+ .appendf(FMT_STRING(" {} "),
+ lnav_data.ld_program_name)
+ .append(lnav::roles::file(stdin_url.value()))));
}
}
diff --git a/src/lnav.hh b/src/lnav.hh
index e235067..b260333 100644
--- a/src/lnav.hh
+++ b/src/lnav.hh
@@ -34,20 +34,14 @@
#include <list>
#include <map>
-#include <memory>
-#include <set>
-#include <stack>
#include <unordered_map>
#include <signal.h>
#include <sys/time.h>
-#include "archive_manager.hh"
#include "base/ansi_scrubber.hh"
-#include "base/future_util.hh"
#include "base/isc.hh"
#include "bottom_status_source.hh"
-#include "bound_tags.hh"
#include "command_executor.hh"
#include "config.h"
#include "db_sub_source.hh"
@@ -55,20 +49,14 @@
#include "file_collection.hh"
#include "files_sub_source.hh"
#include "filter_status_source.hh"
-#include "grep_highlighter.hh"
+#include "gantt_status_source.hh"
#include "hist_source.hh"
#include "input_dispatcher.hh"
-#include "listview_curses.hh"
-#include "log_format_loader.hh"
#include "log_vtab_impl.hh"
-#include "logfile.hh"
-#include "piper_proc.hh"
#include "plain_text_source.hh"
#include "preview_status_source.hh"
#include "readline_curses.hh"
-#include "relative_time.hh"
-#include "safe/safe.h"
-#include "sql_util.hh"
+#include "sqlitepp.hh"
#include "statusview_curses.hh"
#include "textfile_sub_source.hh"
#include "view_helpers.hh"
@@ -85,8 +73,10 @@ typedef enum {
LNS_FILTER,
LNS_FILTER_HELP,
LNS_DOC,
- LNS_PREVIEW,
+ LNS_PREVIEW0,
+ LNS_PREVIEW1,
LNS_SPECTRO,
+ LNS_GANTT,
LNS__MAX
} lnav_status_t;
@@ -157,7 +147,12 @@ struct key_repeat_history {
};
};
-using file_location_t = mapbox::util::variant<vis_line_t, std::string>;
+enum class lnav_exec_phase : int {
+ INIT,
+ PRELOAD,
+ LOADING,
+ INTERACTIVE,
+};
struct lnav_data_t {
std::map<std::string, std::list<session_pair_t>> ld_session_id;
@@ -174,7 +169,8 @@ struct lnav_data_t {
std::list<child_poller> ld_child_pollers;
std::list<std::pair<std::string, file_location_t>> ld_files_to_front;
bool ld_stdout_used;
- sig_atomic_t ld_looping;
+ std::atomic_uint32_t ld_sigint_count{0};
+ sig_atomic_t ld_looping{true};
sig_atomic_t ld_winched;
sig_atomic_t ld_child_terminated;
unsigned long ld_flags;
@@ -187,8 +183,9 @@ struct lnav_data_t {
filter_status_source ld_filter_status_source;
filter_help_status_source ld_filter_help_status_source;
doc_status_source ld_doc_status_source;
- preview_status_source ld_preview_status_source;
+ preview_status_source ld_preview_status_source[2];
std::unique_ptr<spectro_status_source> ld_spectro_status_source;
+ gantt_status_source ld_gantt_status_source;
bool ld_preview_hidden;
int64_t ld_preview_generation{0};
action_broadcaster<listview_curses> ld_scroll_broadcaster;
@@ -206,14 +203,16 @@ struct lnav_data_t {
textview_curses ld_example_view;
plain_text_source ld_match_source;
textview_curses ld_match_view;
- plain_text_source ld_preview_source;
- textview_curses ld_preview_view;
+ plain_text_source ld_preview_source[2];
+ textview_curses ld_preview_view[2];
plain_text_source ld_user_message_source;
textview_curses ld_user_message_view;
std::chrono::time_point<std::chrono::steady_clock>
ld_user_message_expiration;
textview_curses ld_spectro_details_view;
plain_text_source ld_spectro_no_details_source;
+ textview_curses ld_gantt_details_view;
+ plain_text_source ld_gantt_details_source;
view_stack<textview_curses> ld_view_stack;
textview_curses* ld_last_view;
@@ -233,6 +232,8 @@ struct lnav_data_t {
db_label_source ld_db_row_source;
db_overlay_source ld_db_overlay;
+ db_label_source ld_db_preview_source[2];
+ db_overlay_source ld_db_preview_overlay_source[2];
std::vector<std::string> ld_db_key_names;
vis_line_t ld_last_pretty_print_top;
@@ -243,7 +244,6 @@ struct lnav_data_t {
std::unordered_map<std::string, std::string> ld_table_ddl;
std::list<pid_t> ld_children;
- std::list<std::shared_ptr<piper_proc>> ld_pipers;
input_state_tracker ld_input_state;
input_dispatcher ld_input_dispatcher;
@@ -256,6 +256,8 @@ struct lnav_data_t {
bool ld_initial_build{false};
bool ld_show_help_view{false};
+ bool ld_treat_stdin_as_log{false};
+ lnav_exec_phase ld_exec_phase{lnav_exec_phase::INIT};
lnav::func::scoped_cb ld_status_refresher;
@@ -270,17 +272,27 @@ class main_looper
public:
};
+enum class verbosity_t : int {
+ quiet,
+ standard,
+ verbose,
+};
+
extern struct lnav_data_t lnav_data;
+extern verbosity_t verbosity;
extern readline_context::command_map_t lnav_commands;
extern const int ZOOM_LEVELS[];
extern const ssize_t ZOOM_COUNT;
+#define HELP_MSG_CTRL(x, msg) "Press '" ANSI_BOLD("CTRL-" #x) "' " msg
+
#define HELP_MSG_1(x, msg) "Press '" ANSI_BOLD(#x) "' " msg
#define HELP_MSG_2(x, y, msg) "Press " ANSI_BOLD(#x) "/" ANSI_BOLD(#y) " " msg
bool setup_logline_table(exec_context& ec);
void wait_for_children();
+void wait_for_pipers(nonstd::optional<timeval> deadline = nonstd::nullopt);
#endif
diff --git a/src/lnav.indexing.cc b/src/lnav.indexing.cc
index d2a68d7..345d5df 100644
--- a/src/lnav.indexing.cc
+++ b/src/lnav.indexing.cc
@@ -29,12 +29,15 @@
#include "lnav.indexing.hh"
+#include "bound_tags.hh"
#include "lnav.events.hh"
#include "lnav.hh"
#include "service_tags.hh"
#include "session_data.hh"
+#include "sql_util.hh"
using namespace std::chrono_literals;
+using namespace lnav::roles::literals;
/**
* Observer for loading progress that updates the bottom status bar.
@@ -87,7 +90,7 @@ do_observer_update(const std::shared_ptr<logfile>& lf)
}
lnav_data.ld_status_refresher();
if (lf && lnav_data.ld_mode == ln_mode_t::FILES
- && !lnav_data.ld_initial_build)
+ && lnav_data.ld_exec_phase < lnav_exec_phase::INTERACTIVE)
{
auto& fc = lnav_data.ld_active_files;
auto iter = std::find(fc.fc_files.begin(), fc.fc_files.end(), lf);
@@ -131,6 +134,12 @@ public:
void promote_file(const std::shared_ptr<logfile>& lf) override
{
+ auto& ftf = lnav_data.ld_files_to_front;
+
+ ftf.remove_if([&lf](const auto& elem) {
+ return elem.first == lf->get_filename()
+ || elem.first == lf->get_open_options().loo_filename;
+ });
if (lnav_data.ld_log_source.insert_file(lf)) {
this->did_promotion = true;
log_info("promoting text file to log file: %s (%s)",
@@ -167,8 +176,11 @@ public:
void scanned_file(const std::shared_ptr<logfile>& lf) override
{
- if (!lnav_data.ld_files_to_front.empty()
- && lnav_data.ld_files_to_front.front().first == lf->get_filename())
+ const auto& ftf = lnav_data.ld_files_to_front;
+
+ if (!ftf.empty()
+ && (ftf.front().first == lf->get_filename()
+ || ftf.front().first == lf->get_open_options().loo_filename))
{
this->front_file = lf;
this->front_top = lnav_data.ld_files_to_front.front().second;
@@ -177,21 +189,26 @@ public:
}
}
+ void renamed_file(const std::shared_ptr<logfile>& lf) override
+ {
+ lnav_data.ld_active_files.regenerate_unique_file_names();
+ }
+
std::shared_ptr<logfile> front_file;
file_location_t front_top;
bool did_promotion{false};
};
-size_t
+rebuild_indexes_result_t
rebuild_indexes(nonstd::optional<ui_clock::time_point> deadline)
{
logfile_sub_source& lss = lnav_data.ld_log_source;
textview_curses& log_view = lnav_data.ld_views[LNV_LOG];
textview_curses& text_view = lnav_data.ld_views[LNV_TEXT];
bool scroll_downs[LNV__MAX];
- size_t retval = 0;
+ rebuild_indexes_result_t retval;
- for (int lpc = 0; lpc < LNV__MAX; lpc++) {
+ for (auto lpc : {LNV_LOG, LNV_TEXT}) {
auto& view = lnav_data.ld_views[lpc];
if (view.is_selectable()) {
@@ -214,9 +231,13 @@ rebuild_indexes(nonstd::optional<ui_clock::time_point> deadline)
auto* tss = &lnav_data.ld_text_source;
textfile_callback cb;
- if (tss->rescan_files(cb, deadline)) {
+ auto rescan_res = tss->rescan_files(cb, deadline);
+ if (rescan_res.rr_new_data) {
text_view.reload_data();
- retval += 1;
+ retval.rir_changes += rescan_res.rr_new_data;
+ }
+ if (!rescan_res.rr_scan_completed) {
+ retval.rir_completed = false;
}
if (cb.front_file != nullptr) {
@@ -250,8 +271,10 @@ rebuild_indexes(nonstd::optional<ui_clock::time_point> deadline)
if (new_top_opt) {
log_info(" setting requested top line: %d",
(int) new_top_opt.value());
- text_view.set_top(new_top_opt.value());
+ text_view.set_selection(new_top_opt.value());
log_info(" actual top is now: %d", (int) text_view.get_top());
+ log_info(" actual selection is now: %d",
+ (int) text_view.get_selection());
scroll_downs[LNV_TEXT] = false;
} else {
log_warning("could not jump to requested line");
@@ -313,11 +336,12 @@ rebuild_indexes(nonstd::optional<ui_clock::time_point> deadline)
for_each(pair.second.begin(),
pair.second.end(),
[&dupe_name](auto& lf) {
- log_info("Hiding duplicate file: %s",
- lf->get_filename().c_str());
- lf->mark_as_duplicate(dupe_name);
- lnav_data.ld_log_source.find_data(lf) |
- [](auto ld) { ld->set_visibility(false); };
+ if (lf->mark_as_duplicate(dupe_name)) {
+ log_info("Hiding duplicate file: %s",
+ lf->get_filename().c_str());
+ lnav_data.ld_log_source.find_data(lf) |
+ [](auto ld) { ld->set_visibility(false); };
+ }
});
reload = true;
}
@@ -327,10 +351,10 @@ rebuild_indexes(nonstd::optional<ui_clock::time_point> deadline)
}
}
- retval += 1;
+ retval.rir_changes += 1;
}
- for (int lpc = 0; lpc < LNV__MAX; lpc++) {
+ for (auto lpc : {LNV_LOG, LNV_TEXT}) {
auto& scroll_view = lnav_data.ld_views[lpc];
if (scroll_downs[lpc]) {
@@ -348,9 +372,19 @@ rebuild_indexes(nonstd::optional<ui_clock::time_point> deadline)
}
}
- lnav_data.ld_view_stack.top() | [](auto tc) {
- lnav_data.ld_filter_status_source.update_filtered(tc->get_sub_source());
- lnav_data.ld_scroll_broadcaster(tc);
+ lnav_data.ld_view_stack.top() | [&closed_files, &retval](auto tc) {
+ if (!closed_files.empty() && tc == &lnav_data.ld_views[LNV_GANTT]) {
+ auto* gantt_source = lnav_data.ld_views[LNV_GANTT].get_sub_source();
+ if (gantt_source != nullptr) {
+ gantt_source->text_filters_changed();
+ }
+ }
+
+ auto* tss = tc->get_sub_source();
+ lnav_data.ld_filter_status_source.update_filtered(tss);
+ if (retval.rir_changes > 0) {
+ lnav_data.ld_scroll_broadcaster(tc);
+ }
};
return retval;
@@ -359,7 +393,9 @@ rebuild_indexes(nonstd::optional<ui_clock::time_point> deadline)
void
rebuild_indexes_repeatedly()
{
- for (size_t attempt = 0; attempt < 10 && rebuild_indexes() > 0; attempt++) {
+ for (size_t attempt = 0; attempt < 10 && rebuild_indexes().rir_changes > 0;
+ attempt++)
+ {
log_info("continuing to rebuild indexes...");
}
}
@@ -375,6 +411,9 @@ update_active_files(file_collection& new_files)
return true;
}
+ bool was_below_open_file_limit
+ = lnav_data.ld_active_files.is_below_open_file_limit();
+
for (const auto& lf : new_files.fc_files) {
lf->set_logfile_observer(&obs);
lnav_data.ld_text_source.push_back(lf);
@@ -389,11 +428,6 @@ update_active_files(file_collection& new_files)
}
}
lnav_data.ld_active_files.merge(new_files);
- if (!new_files.fc_files.empty() || !new_files.fc_other_files.empty()
- || !new_files.fc_name_to_errors.empty())
- {
- lnav_data.ld_active_files.regenerate_unique_file_names();
- }
lnav_data.ld_child_pollers.insert(
lnav_data.ld_child_pollers.begin(),
std::make_move_iterator(
@@ -409,6 +443,25 @@ update_active_files(file_collection& new_files)
};
});
+ if (was_below_open_file_limit
+ && !lnav_data.ld_active_files.is_below_open_file_limit())
+ {
+ auto um
+ = lnav::console::user_message::error("Unable to open more files")
+ .with_reason(
+ attr_line_t("The file-descriptor limit of ")
+ .append(lnav::roles::number(fmt::to_string(
+ file_collection::get_limits().l_fds)))
+ .append(" is too low to support opening more files"))
+ .with_help(
+ attr_line_t("Use ")
+ .append("ulimit -n"_quoted_code)
+ .append(
+ " to increase the limit before running lnav"));
+
+ lnav_data.ld_exec_context.ec_error_callback_stack.back()(um);
+ }
+
return true;
}
@@ -430,7 +483,9 @@ rescan_files(bool req)
continue;
}
- if (lnav_data.ld_active_files.fc_name_to_errors.count(pair.first)) {
+ if (lnav_data.ld_active_files.fc_name_to_errors->readAccess()
+ ->count(pair.first))
+ {
continue;
}
@@ -440,7 +495,8 @@ rescan_files(bool req)
all_synced = false;
}
}
- if (!lnav_data.ld_active_files.fc_name_to_errors.empty()) {
+ if (!lnav_data.ld_active_files.fc_name_to_errors->readAccess()->empty())
+ {
return false;
}
if (!all_synced) {
diff --git a/src/lnav.indexing.hh b/src/lnav.indexing.hh
index a37745b..d694e38 100644
--- a/src/lnav.indexing.hh
+++ b/src/lnav.indexing.hh
@@ -35,8 +35,14 @@
#include "optional.hpp"
void rebuild_hist();
-size_t rebuild_indexes(nonstd::optional<ui_clock::time_point> deadline
- = nonstd::nullopt);
+
+struct rebuild_indexes_result_t {
+ size_t rir_changes{0};
+ bool rir_completed{true};
+};
+
+rebuild_indexes_result_t rebuild_indexes(
+ nonstd::optional<ui_clock::time_point> deadline = nonstd::nullopt);
void rebuild_indexes_repeatedly();
bool rescan_files(bool required = false);
bool update_active_files(file_collection& new_files);
diff --git a/src/lnav.management_cli.cc b/src/lnav.management_cli.cc
index 71d3994..48828d4 100644
--- a/src/lnav.management_cli.cc
+++ b/src/lnav.management_cli.cc
@@ -27,18 +27,25 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <queue>
-
#include "lnav.management_cli.hh"
+#include "base/fs_util.hh"
+#include "base/humanize.hh"
+#include "base/humanize.time.hh"
#include "base/itertools.hh"
+#include "base/paths.hh"
#include "base/result.h"
#include "base/string_util.hh"
+#include "file_options.hh"
+#include "fmt/chrono.h"
#include "fmt/format.h"
#include "itertools.similar.hh"
+#include "lnav.hh"
+#include "lnav_config.hh"
#include "log_format.hh"
#include "log_format_ext.hh"
#include "mapbox/variant.hpp"
+#include "piper.looper.hh"
#include "regex101.import.hh"
#include "session_data.hh"
@@ -61,12 +68,117 @@ symbol_reducer(const std::string& elem, attr_line_t& accum)
inline attr_line_t&
subcmd_reducer(const CLI::App* app, attr_line_t& accum)
{
- return accum.append("\n \u2022 ")
+ return accum.append("\n ")
+ .append("\u2022"_list_glyph)
+ .append(" ")
.append(lnav::roles::keyword(app->get_name()))
.append(": ")
.append(app->get_description());
}
+struct subcmd_config_t {
+ using action_t = std::function<perform_result_t(const subcmd_config_t&)>;
+
+ CLI::App* sc_config_app{nullptr};
+ action_t sc_action;
+ std::string sc_path;
+
+ static perform_result_t default_action(const subcmd_config_t& sc)
+ {
+ auto um = console::user_message::error(
+ "expecting an operation related to the regex101.com integration");
+ um.with_help(
+ sc.sc_config_app->get_subcommands({})
+ | lnav::itertools::fold(
+ subcmd_reducer, attr_line_t{"the available operations are:"}));
+
+ return {um};
+ }
+
+ static perform_result_t get_action(const subcmd_config_t&)
+ {
+ auto config_str = dump_config();
+ auto um = console::user_message::raw(config_str);
+
+ return {um};
+ }
+
+ static perform_result_t blame_action(const subcmd_config_t&)
+ {
+ auto blame = attr_line_t();
+
+ for (const auto& pair : lnav_config_locations) {
+ blame.appendf(FMT_STRING("{} -> {}:{}\n"),
+ pair.first,
+ pair.second.sl_source,
+ pair.second.sl_line_number);
+ }
+
+ auto um = console::user_message::raw(blame.rtrim());
+
+ return {um};
+ }
+
+ static perform_result_t file_options_action(const subcmd_config_t& sc)
+ {
+ auto& safe_options_hier
+ = injector::get<lnav::safe_file_options_hier&>();
+
+ if (sc.sc_path.empty()) {
+ auto um = lnav::console::user_message::error(
+ "Expecting a file path to check for options");
+
+ return {um};
+ }
+
+ safe::ReadAccess<lnav::safe_file_options_hier> options_hier(
+ safe_options_hier);
+
+ auto realpath_res = lnav::filesystem::realpath(sc.sc_path);
+ if (realpath_res.isErr()) {
+ auto um = lnav::console::user_message::error(
+ attr_line_t("Unable to get full path for file: ")
+ .append(lnav::roles::file(sc.sc_path)))
+ .with_reason(realpath_res.unwrapErr());
+
+ return {um};
+ }
+ auto full_path = realpath_res.unwrap();
+ auto file_opts = options_hier->match(full_path);
+ if (file_opts) {
+ auto content = attr_line_t().append(
+ file_opts->second.to_json_string().to_string_fragment());
+ auto um = lnav::console::user_message::raw(content);
+ perform_result_t retval;
+
+ retval.emplace_back(um);
+
+ return retval;
+ }
+
+ auto um
+ = lnav::console::user_message::info(
+ attr_line_t("no options found for file: ")
+ .append(lnav::roles::file(full_path.string())))
+ .with_help(
+ attr_line_t("Use the ")
+ .append(":set-file-timezone"_symbol)
+ .append(
+ " command to set the zone for messages in files "
+ "that do not include a zone in the timestamp"));
+
+ return {um};
+ }
+
+ subcmd_config_t& set_action(action_t act)
+ {
+ if (!this->sc_action) {
+ this->sc_action = std::move(act);
+ }
+ return *this;
+ }
+};
+
struct subcmd_format_t {
using action_t = std::function<perform_result_t(const subcmd_format_t&)>;
@@ -622,6 +734,283 @@ struct subcmd_format_t {
}
};
+struct subcmd_piper_t {
+ using action_t = std::function<perform_result_t(const subcmd_piper_t&)>;
+
+ CLI::App* sp_app{nullptr};
+ action_t sp_action;
+
+ subcmd_piper_t& set_action(action_t act)
+ {
+ if (!this->sp_action) {
+ this->sp_action = std::move(act);
+ }
+ return *this;
+ }
+
+ static perform_result_t default_action(const subcmd_piper_t& sp)
+ {
+ auto um = console::user_message::error(
+ "expecting an operation related to piper storage");
+ um.with_help(
+ sp.sp_app->get_subcommands({})
+ | lnav::itertools::fold(
+ subcmd_reducer, attr_line_t{"the available operations are:"}));
+
+ return {um};
+ }
+
+ static perform_result_t list_action(const subcmd_piper_t&)
+ {
+ static const intern_string_t SRC = intern_string::lookup("piper");
+ static const auto DOT_HEADER = ghc::filesystem::path(".header");
+
+ struct item {
+ lnav::piper::header i_header;
+ std::string i_url;
+ file_size_t i_total_size{0};
+ };
+
+ file_size_t grand_total{0};
+ std::vector<item> items;
+ std::error_code ec;
+
+ for (const auto& instance_dir : ghc::filesystem::directory_iterator(
+ lnav::piper::storage_path(), ec))
+ {
+ if (!instance_dir.is_directory()) {
+ log_warning("piper directory entry is not a directory: %s",
+ instance_dir.path().c_str());
+ continue;
+ }
+
+ nonstd::optional<lnav::piper::header> hdr_opt;
+ auto url = fmt::format(FMT_STRING("piper://{}"),
+ instance_dir.path().filename().string());
+ file_size_t total_size{0};
+ auto hdr_path = instance_dir / DOT_HEADER;
+ if (ghc::filesystem::exists(hdr_path)) {
+ auto hdr_read_res = lnav::filesystem::read_file(hdr_path);
+ if (hdr_read_res.isOk()) {
+ auto parse_res
+ = lnav::piper::header_handlers.parser_for(SRC).of(
+ hdr_read_res.unwrap());
+ if (parse_res.isOk()) {
+ hdr_opt = parse_res.unwrap();
+ } else {
+ log_error("failed to parse header: %s -- %s",
+ hdr_path.c_str(),
+ parse_res.unwrapErr()[0]
+ .to_attr_line()
+ .get_string()
+ .c_str());
+ }
+ } else {
+ log_error("failed to read header file: %s -- %s",
+ hdr_path.c_str(),
+ hdr_read_res.unwrapErr().c_str());
+ }
+ }
+
+ for (const auto& entry :
+ ghc::filesystem::directory_iterator(instance_dir.path()))
+ {
+ if (entry.path().filename() == DOT_HEADER) {
+ continue;
+ }
+
+ total_size += entry.file_size();
+ char buffer[lnav::piper::HEADER_SIZE];
+
+ auto entry_open_res
+ = lnav::filesystem::open_file(entry.path(), O_RDONLY);
+ if (entry_open_res.isErr()) {
+ log_warning("unable to open piper file: %s -- %s",
+ entry.path().c_str(),
+ entry_open_res.unwrapErr().c_str());
+ continue;
+ }
+
+ auto entry_fd = entry_open_res.unwrap();
+ if (read(entry_fd, buffer, sizeof(buffer)) != sizeof(buffer)) {
+ log_warning("piper file is too small: %s",
+ entry.path().c_str());
+ continue;
+ }
+ auto hdr_bits_opt = lnav::piper::read_header(entry_fd, buffer);
+ if (!hdr_bits_opt) {
+ log_warning("could not read piper header: %s",
+ entry.path().c_str());
+ continue;
+ }
+
+ auto hdr_buf = std::move(hdr_bits_opt.value());
+
+ total_size -= hdr_buf.size();
+ auto hdr_sf
+ = string_fragment::from_bytes(hdr_buf.in(), hdr_buf.size());
+ auto hdr_parse_res
+ = lnav::piper::header_handlers.parser_for(SRC).of(hdr_sf);
+ if (hdr_parse_res.isErr()) {
+ log_error("failed to parse piper header: %s",
+ hdr_parse_res.unwrapErr()[0]
+ .to_attr_line()
+ .get_string()
+ .c_str());
+ continue;
+ }
+
+ auto hdr = hdr_parse_res.unwrap();
+
+ if (!hdr_opt || hdr < hdr_opt.value()) {
+ hdr_opt = hdr;
+ }
+ }
+
+ if (hdr_opt) {
+ items.emplace_back(item{hdr_opt.value(), url, total_size});
+ }
+
+ grand_total += total_size;
+ }
+
+ if (ec && ec.value() != ENOENT) {
+ auto um = lnav::console::user_message::error(
+ attr_line_t("unable to access piper directory: ")
+ .append(lnav::roles::file(
+ lnav::piper::storage_path().string())))
+ .with_reason(ec.message());
+ return {um};
+ }
+
+ if (items.empty()) {
+ if (verbosity != verbosity_t::quiet) {
+ auto um
+ = lnav::console::user_message::info(
+ attr_line_t("no piper captures were found in:\n\t")
+ .append(lnav::roles::file(
+ lnav::piper::storage_path().string())))
+ .with_help(
+ attr_line_t("You can create a capture by "
+ "piping data into ")
+ .append(lnav::roles::file("lnav"))
+ .append(" or using the ")
+ .append_quoted(lnav::roles::symbol(":sh"))
+ .append(" command"));
+ return {um};
+ }
+
+ return {};
+ }
+
+ auto txt
+ = items
+ | lnav::itertools::sort_with([](const item& lhs, const item& rhs) {
+ if (lhs.i_header < rhs.i_header) {
+ return true;
+ }
+
+ if (rhs.i_header < lhs.i_header) {
+ return false;
+ }
+
+ return lhs.i_url < rhs.i_url;
+ })
+ | lnav::itertools::map([](const item& it) {
+ auto ago = humanize::time::point::from_tv(it.i_header.h_ctime)
+ .as_time_ago();
+ auto retval = attr_line_t()
+ .append(lnav::roles::list_glyph(
+ fmt::format(FMT_STRING("{:>18}"), ago)))
+ .append(" ")
+ .append(lnav::roles::file(it.i_url))
+ .append(" ")
+ .append(lnav::roles::number(fmt::format(
+ FMT_STRING("{:>8}"),
+ humanize::file_size(
+ it.i_total_size,
+ humanize::alignment::columnar))))
+ .append(" ")
+ .append_quoted(lnav::roles::comment(
+ it.i_header.h_name))
+ .append("\n");
+ if (verbosity == verbosity_t::verbose) {
+ auto env_al
+ = it.i_header.h_env
+ | lnav::itertools::map([](const auto& pair) {
+ return attr_line_t()
+ .append(lnav::roles::identifier(pair.first))
+ .append("=")
+ .append(pair.second)
+ .append("\n");
+ })
+ | lnav::itertools::fold(
+ [](const auto& elem, auto& accum) {
+ if (!accum.empty()) {
+ accum.append(28, ' ');
+ }
+ return accum.append(elem);
+ },
+ attr_line_t());
+
+ retval.append(23, ' ')
+ .append("cwd: ")
+ .append(lnav::roles::file(it.i_header.h_cwd))
+ .append("\n")
+ .append(23, ' ')
+ .append("env: ")
+ .append(env_al);
+ }
+ return retval;
+ })
+ | lnav::itertools::fold(
+ [](const auto& elem, auto& accum) {
+ return accum.append(elem);
+ },
+ attr_line_t{});
+ txt.rtrim();
+
+ perform_result_t retval;
+ if (verbosity != verbosity_t::quiet) {
+ auto extra_um
+ = lnav::console::user_message::info(
+ attr_line_t(
+ "the following piper captures were found in:\n\t")
+ .append(lnav::roles::file(
+ lnav::piper::storage_path().string())))
+ .with_note(
+ attr_line_t("The captures currently consume ")
+ .append(lnav::roles::number(humanize::file_size(
+ grand_total, humanize::alignment::none)))
+ .append(" of disk space. File sizes include "
+ "associated metadata."))
+ .with_help(
+ "You can reopen a capture by passing the piper URL "
+ "to lnav");
+ retval.emplace_back(extra_um);
+ }
+ retval.emplace_back(lnav::console::user_message::raw(txt));
+
+ return retval;
+ }
+
+ static perform_result_t clean_action(const subcmd_piper_t&)
+ {
+ std::error_code ec;
+
+ ghc::filesystem::remove_all(lnav::piper::storage_path(), ec);
+ if (ec) {
+ return {
+ lnav::console::user_message::error(
+ "unable to remove piper storage directory")
+ .with_reason(ec.message()),
+ };
+ }
+
+ return {};
+ }
+};
+
struct subcmd_regex101_t {
using action_t = std::function<perform_result_t(const subcmd_regex101_t&)>;
@@ -663,18 +1052,18 @@ struct subcmd_regex101_t {
};
}
- auto entries
- = get_res.unwrap() | lnav::itertools::map([](const auto& elem) {
+ auto entries = get_res.unwrap()
+ | lnav::itertools::map([](const auto& elem) {
return fmt::format(
FMT_STRING(" format {} regex {} regex101\n"),
elem.re_format_name,
elem.re_regex_name);
})
| lnav::itertools::fold(
- [](const auto& elem, auto& accum) {
- return accum.append(elem);
- },
- attr_line_t{});
+ [](const auto& elem, auto& accum) {
+ return accum.append(elem);
+ },
+ attr_line_t{});
auto um = console::user_message::ok(
entries.add_header("the following regex101 entries were found:\n")
@@ -711,8 +1100,11 @@ struct subcmd_regex101_t {
}
};
-using operations_v
- = mapbox::util::variant<no_subcmd_t, subcmd_format_t, subcmd_regex101_t>;
+using operations_v = mapbox::util::variant<no_subcmd_t,
+ subcmd_config_t,
+ subcmd_format_t,
+ subcmd_piper_t,
+ subcmd_regex101_t>;
class operations {
public:
@@ -730,10 +1122,43 @@ describe_cli(CLI::App& app, int argc, char* argv[])
app.add_flag("-m", "Switch to the management CLI mode.");
+ subcmd_config_t config_args;
subcmd_format_t format_args;
+ subcmd_piper_t piper_args;
subcmd_regex101_t regex101_args;
{
+ auto* subcmd_config
+ = app.add_subcommand("config",
+ "perform operations on the lnav configuration")
+ ->callback([&]() {
+ config_args.set_action(subcmd_config_t::default_action);
+ retval->o_ops = config_args;
+ });
+ config_args.sc_config_app = subcmd_config;
+
+ subcmd_config->add_subcommand("get", "print the current configuration")
+ ->callback(
+ [&]() { config_args.set_action(subcmd_config_t::get_action); });
+
+ subcmd_config
+ ->add_subcommand("blame",
+ "print the configuration options and their source")
+ ->callback([&]() {
+ config_args.set_action(subcmd_config_t::blame_action);
+ });
+
+ auto* sub_file_options = subcmd_config->add_subcommand(
+ "file-options", "print the options applied to specific files");
+
+ sub_file_options->add_option(
+ "path", config_args.sc_path, "the path to the file");
+ sub_file_options->callback([&]() {
+ config_args.set_action(subcmd_config_t::file_options_action);
+ });
+ }
+
+ {
auto* subcmd_format
= app.add_subcommand("format",
"perform operations on log file formats")
@@ -837,6 +1262,25 @@ describe_cli(CLI::App& app, int argc, char* argv[])
}
{
+ auto* subcmd_piper
+ = app.add_subcommand("piper", "perform operations on piper storage")
+ ->callback([&]() {
+ piper_args.set_action(subcmd_piper_t::default_action);
+ retval->o_ops = piper_args;
+ });
+ piper_args.sp_app = subcmd_piper;
+
+ subcmd_piper
+ ->add_subcommand("list", "print the available piper captures")
+ ->callback(
+ [&]() { piper_args.set_action(subcmd_piper_t::list_action); });
+
+ subcmd_piper->add_subcommand("clean", "remove all piper captures")
+ ->callback(
+ [&]() { piper_args.set_action(subcmd_piper_t::clean_action); });
+ }
+
+ {
auto* subcmd_regex101
= app.add_subcommand("regex101",
"create and edit log message regular "
@@ -902,7 +1346,9 @@ perform(std::shared_ptr<operations> opts)
return {um};
},
+ [](const subcmd_config_t& sc) { return sc.sc_action(sc); },
[](const subcmd_format_t& sf) { return sf.sf_action(sf); },
+ [](const subcmd_piper_t& sp) { return sp.sp_action(sp); },
[](const subcmd_regex101_t& sr) { return sr.sr_action(sr); });
}
diff --git a/src/lnav_commands.cc b/src/lnav_commands.cc
index d766d99..18f440b 100644
--- a/src/lnav_commands.cc
+++ b/src/lnav_commands.cc
@@ -44,6 +44,7 @@
#include "base/attr_line.builder.hh"
#include "base/auto_mem.hh"
#include "base/fs_util.hh"
+#include "base/humanize.hh"
#include "base/humanize.network.hh"
#include "base/injector.hh"
#include "base/isc.hh"
@@ -51,20 +52,27 @@
#include "base/paths.hh"
#include "base/string_util.hh"
#include "bound_tags.hh"
+#include "breadcrumb_curses.hh"
#include "command_executor.hh"
#include "config.h"
#include "curl_looper.hh"
+#include "date/tz.h"
#include "db_sub_source.hh"
#include "field_overlay_source.hh"
#include "fmt/printf.h"
+#include "hasher.hh"
+#include "itertools.similar.hh"
#include "lnav.indexing.hh"
#include "lnav_commands.hh"
#include "lnav_config.hh"
#include "lnav_util.hh"
+#include "log.annotate.hh"
#include "log_data_helper.hh"
#include "log_data_table.hh"
+#include "log_format_loader.hh"
#include "log_search_table.hh"
#include "log_search_table_fwd.hh"
+#include "ptimec.hh"
#include "readline_callbacks.hh"
#include "readline_curses.hh"
#include "readline_highlighters.hh"
@@ -80,13 +88,27 @@
#include "sysclip.hh"
#include "tailer/tailer.looper.hh"
#include "text_anonymizer.hh"
+#include "url_handler.cfg.hh"
#include "url_loader.hh"
#include "yajl/api/yajl_parse.h"
#include "yajlpp/json_op.hh"
#include "yajlpp/yajlpp.hh"
+#if !CURL_AT_LEAST_VERSION(7, 80, 0)
+extern "C"
+{
+const char* curl_url_strerror(CURLUcode error);
+}
+#endif
+
using namespace lnav::roles::literals;
+inline attr_line_t&
+symbol_reducer(const std::string& elem, attr_line_t& accum)
+{
+ return accum.append("\n ").append(lnav::roles::symbol(elem));
+}
+
static std::string
remaining_args(const std::string& cmdline,
const std::vector<std::string>& args,
@@ -261,7 +283,10 @@ com_unix_time(exec_context& ec,
char* rest;
u_time = time(nullptr);
- log_time = *localtime(&u_time);
+ if (localtime_r(&u_time, &log_time) == nullptr) {
+ return ec.make_error(
+ "invalid epoch time: {} -- {}", u_time, strerror(errno));
+ }
log_time.tm_isdst = -1;
@@ -282,7 +307,10 @@ com_unix_time(exec_context& ec,
u_time = mktime(&log_time);
parsed = true;
} else if (sscanf(args[1].c_str(), "%ld", &u_time)) {
- log_time = *localtime(&u_time);
+ if (localtime_r(&u_time, &log_time) == nullptr) {
+ return ec.make_error(
+ "invalid epoch time: {} -- {}", args[1], strerror(errno));
+ }
parsed = true;
}
@@ -293,7 +321,7 @@ com_unix_time(exec_context& ec,
strftime(ftime,
sizeof(ftime),
"%a %b %d %H:%M:%S %Y %z %Z",
- localtime(&u_time));
+ localtime_r(&u_time, &log_time));
len = strlen(ftime);
snprintf(ftime + len, sizeof(ftime) - len, " -- %ld", u_time);
retval = std::string(ftime);
@@ -308,6 +336,321 @@ com_unix_time(exec_context& ec,
}
static Result<std::string, lnav::console::user_message>
+com_set_file_timezone(exec_context& ec,
+ std::string cmdline,
+ std::vector<std::string>& args)
+{
+ static const intern_string_t SRC = intern_string::lookup("args");
+ std::string retval;
+
+ if (args.empty()) {
+ args.emplace_back("timezone");
+ return Ok(retval);
+ }
+
+ if (args.size() == 1) {
+ return ec.make_error("expecting a timezone name");
+ }
+
+ auto* tc = *lnav_data.ld_view_stack.top();
+ auto* lss = dynamic_cast<logfile_sub_source*>(tc->get_sub_source());
+
+ if (lss != nullptr) {
+ if (lss->text_line_count() == 0) {
+ return ec.make_error("no log messages to examine");
+ }
+
+ auto line_pair = lss->find_line_with_file(lss->at(tc->get_selection()));
+ if (!line_pair) {
+ return ec.make_error(FMT_STRING("cannot find line: {}"),
+ (int) tc->get_selection());
+ }
+
+ shlex lexer(cmdline);
+ auto split_res = lexer.split(ec.create_resolver());
+ if (split_res.isErr()) {
+ auto split_err = split_res.unwrapErr();
+ auto um = lnav::console::user_message::error(
+ "unable to parse arguments")
+ .with_reason(split_err.te_msg)
+ .with_snippet(lnav::console::snippet::from(
+ SRC, lexer.to_attr_line(split_err)));
+
+ return Err(um);
+ }
+
+ auto split_args
+ = split_res.unwrap() | lnav::itertools::map([](const auto& elem) {
+ return elem.se_value;
+ });
+ try {
+ const auto* tz = date::locate_zone(split_args[1]);
+ auto pattern = split_args.size() == 2
+ ? line_pair->first->get_filename()
+ : ghc::filesystem::path(split_args[2]);
+
+ if (!ec.ec_dry_run) {
+ static auto& safe_options_hier
+ = injector::get<lnav::safe_file_options_hier&>();
+
+ safe::WriteAccess<lnav::safe_file_options_hier> options_hier(
+ safe_options_hier);
+
+ options_hier->foh_generation += 1;
+ auto& coll = options_hier->foh_path_to_collection["/"];
+
+ log_info("setting timezone for %s to %s",
+ pattern.c_str(),
+ args[1].c_str());
+ coll.foc_pattern_to_options[pattern] = lnav::file_options{
+ {intern_string_t{}, source_location{}, tz},
+ };
+
+ auto opt_path = lnav::paths::dotlnav() / "file-options.json";
+ auto coll_str = coll.to_json();
+ lnav::filesystem::write_file(opt_path, coll_str);
+ }
+ } catch (const std::runtime_error& e) {
+ attr_line_t note;
+
+ try {
+ note = (date::get_tzdb().zones
+ | lnav::itertools::map(&date::time_zone::name)
+ | lnav::itertools::similar_to(split_args[1])
+ | lnav::itertools::fold(symbol_reducer, attr_line_t{}))
+ .add_header("did you mean one of the following?");
+ } catch (const std::runtime_error& e) {
+ log_error("unable to get timezones: %s", e.what());
+ }
+ auto um = lnav::console::user_message::error(
+ attr_line_t()
+ .append_quoted(split_args[1])
+ .append(" is not a valid timezone"))
+ .with_reason(e.what())
+ .with_note(note);
+ return Err(um);
+ }
+ } else {
+ return ec.make_error(
+ ":set-file-timezone is only supported for the LOG view");
+ }
+
+ return Ok(retval);
+}
+
+static readline_context::prompt_result_t
+com_set_file_timezone_prompt(exec_context& ec, const std::string& cmdline)
+{
+ auto* tc = *lnav_data.ld_view_stack.top();
+ auto* lss = dynamic_cast<logfile_sub_source*>(tc->get_sub_source());
+
+ if (lss == nullptr || lss->text_line_count() == 0) {
+ return {};
+ }
+
+ shlex lexer(cmdline);
+ auto split_res = lexer.split(ec.create_resolver());
+ if (split_res.isErr()) {
+ return {};
+ }
+
+ auto line_pair = lss->find_line_with_file(lss->at(tc->get_selection()));
+ if (!line_pair) {
+ return {};
+ }
+
+ auto elems = split_res.unwrap();
+ auto pattern_arg = line_pair->first->get_filename();
+ if (elems.size() == 1) {
+ try {
+ static auto& safe_options_hier
+ = injector::get<lnav::safe_file_options_hier&>();
+
+ safe::ReadAccess<lnav::safe_file_options_hier> options_hier(
+ safe_options_hier);
+ auto file_zone = date::get_tzdb().current_zone()->name();
+ auto match_res = options_hier->match(pattern_arg);
+ if (match_res) {
+ file_zone = match_res->second.fo_default_zone.pp_value->name();
+ pattern_arg = match_res->first;
+
+ auto new_prompt = fmt::format(FMT_STRING("{} {} {}"),
+ trim(cmdline),
+ file_zone,
+ pattern_arg);
+
+ return {new_prompt};
+ }
+
+ return {"", file_zone + " "};
+ } catch (const std::runtime_error& e) {
+ log_error("cannot get timezones: %s", e.what());
+ }
+ }
+ auto arg_path = ghc::filesystem::path(pattern_arg);
+ auto arg_parent = arg_path.parent_path().string() + "/";
+ if (elems.size() == 2 && endswith(cmdline, " ")) {
+ return {"", arg_parent};
+ }
+ if (elems.size() == 3 && elems.back().se_value == arg_parent) {
+ return {"", arg_path.filename().string()};
+ }
+
+ return {};
+}
+
+static readline_context::prompt_result_t
+com_clear_file_timezone_prompt(exec_context& ec, const std::string& cmdline)
+{
+ std::string retval;
+
+ auto* tc = *lnav_data.ld_view_stack.top();
+ auto* lss = dynamic_cast<logfile_sub_source*>(tc->get_sub_source());
+
+ if (lss != nullptr && lss->text_line_count() > 0) {
+ auto line_pair = lss->find_line_with_file(lss->at(tc->get_selection()));
+ if (line_pair) {
+ try {
+ static auto& safe_options_hier
+ = injector::get<lnav::safe_file_options_hier&>();
+
+ safe::ReadAccess<lnav::safe_file_options_hier> options_hier(
+ safe_options_hier);
+ auto file_zone = date::get_tzdb().current_zone()->name();
+ auto pattern_arg = line_pair->first->get_filename();
+ auto match_res
+ = options_hier->match(line_pair->first->get_filename());
+ if (match_res) {
+ file_zone
+ = match_res->second.fo_default_zone.pp_value->name();
+ pattern_arg = match_res->first;
+ }
+
+ retval = fmt::format(
+ FMT_STRING("{} {}"), trim(cmdline), pattern_arg);
+ } catch (const std::runtime_error& e) {
+ log_error("cannot get timezones: %s", e.what());
+ }
+ }
+ }
+
+ return {retval};
+}
+
+static Result<std::string, lnav::console::user_message>
+com_clear_file_timezone(exec_context& ec,
+ std::string cmdline,
+ std::vector<std::string>& args)
+{
+ std::string retval;
+
+ if (args.empty()) {
+ args.emplace_back("file-with-zone");
+ return Ok(retval);
+ }
+
+ if (args.size() != 2) {
+ return ec.make_error("expecting a single file path or pattern");
+ }
+
+ auto* tc = *lnav_data.ld_view_stack.top();
+ auto* lss = dynamic_cast<logfile_sub_source*>(tc->get_sub_source());
+
+ if (lss != nullptr) {
+ if (!ec.ec_dry_run) {
+ static auto& safe_options_hier
+ = injector::get<lnav::safe_file_options_hier&>();
+
+ safe::WriteAccess<lnav::safe_file_options_hier> options_hier(
+ safe_options_hier);
+
+ options_hier->foh_generation += 1;
+ auto& coll = options_hier->foh_path_to_collection["/"];
+ const auto iter = coll.foc_pattern_to_options.find(args[1]);
+
+ if (iter == coll.foc_pattern_to_options.end()) {
+ return ec.make_error(FMT_STRING("no timezone set for: {}"),
+ args[1]);
+ }
+
+ log_info("clearing timezone for %s", args[1].c_str());
+ iter->second.fo_default_zone.pp_value = nullptr;
+ if (iter->second.empty()) {
+ coll.foc_pattern_to_options.erase(iter);
+ }
+
+ auto opt_path = lnav::paths::dotlnav() / "file-options.json";
+ auto coll_str = coll.to_json();
+ lnav::filesystem::write_file(opt_path, coll_str);
+ }
+ } else {
+ return ec.make_error(
+ ":clear-file-timezone is only supported for the LOG view");
+ }
+
+ return Ok(retval);
+}
+
+static Result<std::string, lnav::console::user_message>
+com_convert_time_to(exec_context& ec,
+ std::string cmdline,
+ std::vector<std::string>& args)
+{
+ std::string retval;
+
+ if (args.empty()) {
+ args.emplace_back("timezone");
+ return Ok(retval);
+ }
+
+ if (args.size() == 1) {
+ return ec.make_error("expecting a timezone name");
+ }
+
+ const auto* tc = *lnav_data.ld_view_stack.top();
+ auto* lss = dynamic_cast<logfile_sub_source*>(tc->get_sub_source());
+
+ if (lss != nullptr) {
+ if (lss->text_line_count() == 0) {
+ return ec.make_error("no log messages to examine");
+ }
+
+ const auto* ll = lss->find_line(lss->at(tc->get_selection()));
+ try {
+ auto* dst_tz = date::locate_zone(args[1]);
+ auto utime = date::local_time<std::chrono::seconds>{
+ std::chrono::seconds{ll->get_time()}};
+ auto cz_time = lnav::to_sys_time(utime);
+ auto dz_time = date::make_zoned(dst_tz, cz_time);
+ auto etime = std::chrono::duration_cast<std::chrono::seconds>(
+ dz_time.get_local_time().time_since_epoch());
+ char ftime[128];
+ sql_strftime(
+ ftime, sizeof(ftime), etime.count(), ll->get_millis(), 'T');
+ retval = ftime;
+
+ off_t off = 0;
+ exttm tm;
+ tm.et_flags |= ETF_ZONE_SET;
+ tm.et_gmtoff = dz_time.get_info().offset.count();
+ ftime_Z(ftime, off, sizeof(ftime), tm);
+ ftime[off] = '\0';
+ retval.append(" ");
+ retval.append(ftime);
+ } catch (const std::runtime_error& e) {
+ return ec.make_error(FMT_STRING("Unable to get timezone: {} -- {}"),
+ args[1],
+ e.what());
+ }
+ } else {
+ return ec.make_error(
+ ":convert-time-to is only supported for the LOG view");
+ }
+
+ return Ok(retval);
+}
+
+static Result<std::string, lnav::console::user_message>
com_current_time(exec_context& ec,
std::string cmdline,
std::vector<std::string>& args)
@@ -356,6 +699,7 @@ com_goto(exec_context& ec, std::string cmdline, std::vector<std::string>& args)
std::string all_args = remaining_args(cmdline, args);
auto* tc = *lnav_data.ld_view_stack.top();
nonstd::optional<vis_line_t> dst_vl;
+ auto is_location = false;
if (startswith(all_args, "#")) {
auto* ta = dynamic_cast<text_anchors*>(tc->get_sub_source());
@@ -368,6 +712,7 @@ com_goto(exec_context& ec, std::string cmdline, std::vector<std::string>& args)
if (!dst_vl) {
return ec.make_error("unable to find anchor: {}", all_args);
}
+ is_location = true;
}
auto* ttt = dynamic_cast<text_time_translator*>(tc->get_sub_source());
@@ -383,7 +728,7 @@ com_goto(exec_context& ec, std::string cmdline, std::vector<std::string>& args)
auto top_time_opt = ttt->time_for_row(tc->get_selection());
if (top_time_opt) {
- auto top_time_tv = top_time_opt.value();
+ auto top_time_tv = top_time_opt.value().ri_time;
struct tm top_tm;
localtime_r(&top_time_tv.tv_sec, &top_tm);
@@ -404,7 +749,7 @@ com_goto(exec_context& ec, std::string cmdline, std::vector<std::string>& args)
if (!tv_opt) {
return ec.make_error("cannot get time for the top row");
}
- tv = tv_opt.value();
+ tv = tv_opt.value().ri_time;
vis_line_t vl = tc->get_selection(), new_vl;
bool done = false;
@@ -485,7 +830,10 @@ com_goto(exec_context& ec, std::string cmdline, std::vector<std::string>& args)
alb.append("^");
if (unmatched_size > 1) {
- alb.append(unmatched_size - 2, '-').append("^");
+ if (unmatched_size > 2) {
+ alb.append(unmatched_size - 2, '-');
+ }
+ alb.append("^");
}
alb.append(" unrecognized input");
}
@@ -509,8 +857,7 @@ com_goto(exec_context& ec, std::string cmdline, std::vector<std::string>& args)
{
tm.et_nsec = 0;
}
- tv.tv_sec = tm2sec(&tm.et_tm);
- tv.tv_usec = tm.et_nsec / 1000;
+ tv = tm.to_timeval();
dst_vl = ttt->row_for_time(tv);
} else if (sscanf(args[1].c_str(), "%f%n", &value, &consumed) == 1) {
if (args[1][consumed] == '%') {
@@ -534,7 +881,7 @@ com_goto(exec_context& ec, std::string cmdline, std::vector<std::string>& args)
return Err(um);
}
- dst_vl | [&ec, tc, &retval](auto new_top) {
+ dst_vl | [&ec, tc, &retval, is_location](auto new_top) {
if (ec.ec_dry_run) {
retval = "info: will move to line "
+ std::to_string((int) new_top);
@@ -542,6 +889,9 @@ com_goto(exec_context& ec, std::string cmdline, std::vector<std::string>& args)
tc->get_sub_source()->get_location_history() |
[new_top](auto lh) { lh->loc_history_append(new_top); };
tc->set_selection(new_top);
+ if (tc->is_selectable() && is_location) {
+ tc->set_top(new_top - 2_vl, false);
+ }
retval = "";
}
@@ -576,7 +926,8 @@ com_relative_goto(exec_context& ec,
retval = "info: shifting top by " + std::to_string(line_offset)
+ " lines";
} else {
- tc->shift_top(vis_line_t(line_offset), true);
+ tc->set_selection(tc->get_selection()
+ + vis_line_t(line_offset));
retval = "";
}
@@ -591,6 +942,40 @@ com_relative_goto(exec_context& ec,
}
static Result<std::string, lnav::console::user_message>
+com_annotate(exec_context& ec,
+ std::string cmdline,
+ std::vector<std::string>& args)
+{
+ std::string retval;
+
+ if (args.empty()) {
+ } else if (!ec.ec_dry_run) {
+ auto* tc = *lnav_data.ld_view_stack.top();
+ auto* lss = dynamic_cast<logfile_sub_source*>(tc->get_sub_source());
+
+ if (lss != nullptr) {
+ auto sel = tc->get_selection();
+ auto applicable_annos = lnav::log::annotate::applicable(sel);
+
+ if (applicable_annos.empty()) {
+ return ec.make_error(
+ "no annotations available for this log message");
+ }
+
+ auto apply_res = lnav::log::annotate::apply(sel, applicable_annos);
+ if (apply_res.isErr()) {
+ return Err(apply_res.unwrapErr());
+ }
+ } else {
+ return ec.make_error(
+ ":annotate is only supported for the LOG view");
+ }
+ }
+
+ return Ok(retval);
+}
+
+static Result<std::string, lnav::console::user_message>
com_mark(exec_context& ec, std::string cmdline, std::vector<std::string>& args)
{
std::string retval;
@@ -660,7 +1045,7 @@ com_mark_expr(exec_context& ec,
if (set_res.isErr()) {
return Err(set_res.unwrapErr());
}
- lnav_data.ld_preview_status_source.get_description().set_value(
+ lnav_data.ld_preview_status_source[0].get_description().set_value(
"Matches are highlighted in the text view");
} else {
auto set_res = lss.set_sql_marker(expr, stmt.release());
@@ -674,18 +1059,20 @@ com_mark_expr(exec_context& ec,
return Ok(retval);
}
-static std::string
+static readline_context::prompt_result_t
com_mark_expr_prompt(exec_context& ec, const std::string& cmdline)
{
textview_curses* tc = *lnav_data.ld_view_stack.top();
if (tc != &lnav_data.ld_views[LNV_LOG]) {
- return "";
+ return {""};
}
- return fmt::format(FMT_STRING("{} {}"),
- trim(cmdline),
- trim(lnav_data.ld_log_source.get_sql_marker_text()));
+ return {
+ fmt::format(FMT_STRING("{} {}"),
+ trim(cmdline),
+ trim(lnav_data.ld_log_source.get_sql_marker_text())),
+ };
}
static Result<std::string, lnav::console::user_message>
@@ -829,13 +1216,80 @@ com_goto_location(exec_context& ec,
? lh->loc_history_back(tc->get_selection())
: lh->loc_history_forward(tc->get_selection());
}
- | [tc](auto new_top) { tc->set_selection(new_top); };
+ | [tc](auto new_top) {
+ tc->set_selection(new_top);
+ if (tc->is_selectable()) {
+ tc->set_top(new_top - 2_vl, false);
+ }
+ };
};
}
return Ok(retval);
}
+static Result<std::string, lnav::console::user_message>
+com_next_section(exec_context& ec,
+ std::string cmdline,
+ std::vector<std::string>& args)
+{
+ std::string retval;
+
+ if (args.empty()) {
+ } else if (!ec.ec_dry_run) {
+ auto* tc = *lnav_data.ld_view_stack.top();
+ auto* ta = dynamic_cast<text_anchors*>(tc->get_sub_source());
+
+ if (ta == nullptr) {
+ return ec.make_error("view does not support sections");
+ }
+
+ auto adj_opt = ta->adjacent_anchor(tc->get_selection(),
+ text_anchors::direction::next);
+ if (!adj_opt) {
+ return ec.make_error("no next section found");
+ }
+
+ tc->set_selection(adj_opt.value());
+ if (tc->is_selectable()) {
+ tc->set_top(adj_opt.value() - 2_vl, false);
+ }
+ }
+
+ return Ok(retval);
+}
+
+static Result<std::string, lnav::console::user_message>
+com_prev_section(exec_context& ec,
+ std::string cmdline,
+ std::vector<std::string>& args)
+{
+ std::string retval;
+
+ if (args.empty()) {
+ } else if (!ec.ec_dry_run) {
+ auto* tc = *lnav_data.ld_view_stack.top();
+ auto* ta = dynamic_cast<text_anchors*>(tc->get_sub_source());
+
+ if (ta == nullptr) {
+ return ec.make_error("view does not support sections");
+ }
+
+ auto adj_opt = ta->adjacent_anchor(tc->get_selection(),
+ text_anchors::direction::prev);
+ if (!adj_opt) {
+ return ec.make_error("no previous section found");
+ }
+
+ tc->set_selection(adj_opt.value());
+ if (tc->is_selectable()) {
+ tc->set_top(adj_opt.value() - 2_vl, false);
+ }
+ }
+
+ return Ok(retval);
+}
+
static bool
csv_needs_quoting(const std::string& str)
{
@@ -909,15 +1363,14 @@ json_write_row(yajl_gen handle,
case SQLITE_TEXT:
switch (hm.hm_sub_type) {
case 74: {
- auto_mem<yajl_handle_t> parse_handle(yajl_free);
unsigned char* err;
json_ptr jp("");
json_op jo(jp);
jo.jo_ptr_callbacks = json_op::gen_callbacks;
jo.jo_ptr_data = handle;
- parse_handle.reset(
- yajl_alloc(&json_op::ptr_callbacks, nullptr, &jo));
+ auto parse_handle = yajlpp::alloc_handle(
+ &json_op::ptr_callbacks, &jo);
const unsigned char* json_in
= (const unsigned char*) dls.dls_rows[row][col];
@@ -962,14 +1415,14 @@ json_write_row(yajl_gen handle,
default:
obj_map.gen(anonymize
? ta.next(string_fragment::from_c_str(
- dls.dls_rows[row][col]))
+ dls.dls_rows[row][col]))
: dls.dls_rows[row][col]);
break;
}
break;
default:
obj_map.gen(anonymize ? ta.next(string_fragment::from_c_str(
- dls.dls_rows[row][col]))
+ dls.dls_rows[row][col]))
: dls.dls_rows[row][col]);
break;
}
@@ -981,6 +1434,8 @@ com_save_to(exec_context& ec,
std::string cmdline,
std::vector<std::string>& args)
{
+ static const intern_string_t SRC = intern_string::lookup("path");
+
FILE *outfile = nullptr, *toclose = nullptr;
const char* mode = "";
std::string fn, retval;
@@ -995,13 +1450,22 @@ com_save_to(exec_context& ec,
fn = trim(remaining_args(cmdline, args));
- std::vector<std::string> split_args;
shlex lexer(fn);
- if (!lexer.split(split_args, ec.create_resolver())) {
- return ec.make_error("unable to parse arguments");
+ auto split_args_res = lexer.split(ec.create_resolver());
+ if (split_args_res.isErr()) {
+ auto split_err = split_args_res.unwrapErr();
+ auto um
+ = lnav::console::user_message::error("unable to parse file name")
+ .with_reason(split_err.te_msg)
+ .with_snippet(lnav::console::snippet::from(
+ SRC, lexer.to_attr_line(split_err)));
+
+ return Err(um);
}
+ auto split_args = split_args_res.unwrap()
+ | lnav::itertools::map([](const auto& elem) { return elem.se_value; });
auto anon_iter
= std::find(split_args.begin(), split_args.end(), "--anonymize");
if (anon_iter != split_args.end()) {
@@ -1031,9 +1495,9 @@ com_save_to(exec_context& ec,
}
if (args[0] == "append-to") {
- mode = "a";
+ mode = "ae";
} else {
- mode = "w";
+ mode = "we";
}
auto& dls = lnav_data.ld_db_row_source;
@@ -1259,31 +1723,33 @@ com_save_to(exec_context& ec,
} else if (args[0] == "write-screen-to") {
bool wrapped = tc->get_word_wrap();
vis_line_t orig_top = tc->get_top();
+ auto inner_height = tc->get_inner_height();
tc->set_word_wrap(to_term);
vis_line_t top = tc->get_top();
vis_line_t bottom = tc->get_bottom();
- if (lnav_data.ld_flags & LNF_HEADLESS && tc->get_inner_height() > 0_vl)
- {
- bottom = tc->get_inner_height() - 1_vl;
+ if (lnav_data.ld_flags & LNF_HEADLESS && inner_height > 0_vl) {
+ bottom = inner_height - 1_vl;
}
+ auto screen_height = inner_height == 0 ? 0 : bottom - top + 1;
auto y = 0_vl;
auto wrapped_count = 0_vl;
- std::vector<attr_line_t> rows(bottom - top + 1);
+ std::vector<attr_line_t> rows(screen_height);
auto dim = tc->get_dimensions();
attr_line_t ov_al;
auto* los = tc->get_overlay_source();
+ while (
+ los != nullptr
+ && los->list_static_overlay(*tc, y, tc->get_inner_height(), ov_al))
+ {
+ write_line_to(outfile, ov_al);
+ ov_al.clear();
+ ++y;
+ }
tc->listview_value_for_rows(*tc, top, rows);
for (auto& al : rows) {
- while (los != nullptr
- && los->list_value_for_overlay(
- *tc, y, tc->get_inner_height(), top, ov_al))
- {
- write_line_to(outfile, ov_al);
- ++y;
- }
wrapped_count += vis_line_t((al.length() - 1) / (dim.second - 2));
if (anonymize) {
al.al_attrs.clear();
@@ -1291,17 +1757,18 @@ com_save_to(exec_context& ec,
}
write_line_to(outfile, al);
+ ++y;
+ if (los != nullptr) {
+ std::vector<attr_line_t> row_overlay_content;
+ los->list_value_for_overlay(*tc, top, row_overlay_content);
+ for (const auto& ov_row : row_overlay_content) {
+ write_line_to(outfile, ov_row);
+ line_count += 1;
+ ++y;
+ }
+ }
line_count += 1;
++top;
- ++y;
- }
- while (los != nullptr
- && los->list_value_for_overlay(
- *tc, y, tc->get_inner_height(), top, ov_al)
- && !ov_al.empty())
- {
- write_line_to(outfile, ov_al);
- ++y;
}
tc->set_word_wrap(wrapped);
@@ -1411,10 +1878,25 @@ com_save_to(exec_context& ec,
tc->set_word_wrap(wrapped);
} else {
auto* los = tc->get_overlay_source();
+ auto* fos = dynamic_cast<field_overlay_source*>(los);
std::vector<attr_line_t> rows(1);
attr_line_t ov_al;
size_t count = 0;
+ if (fos != nullptr) {
+ fos->fos_contexts.push(
+ field_overlay_source::context{"", false, false, false});
+ }
+
+ auto y = 0_vl;
+ while (
+ los != nullptr
+ && los->list_static_overlay(*tc, y, tc->get_inner_height(), ov_al))
+ {
+ write_line_to(outfile, ov_al);
+ ov_al.clear();
+ ++y;
+ }
for (auto iter = all_user_marks.begin(); iter != all_user_marks.end();
iter++, count++)
{
@@ -1428,17 +1910,22 @@ com_save_to(exec_context& ec,
}
write_line_to(outfile, rows[0]);
- auto y = 1_vl;
- while (los != nullptr
- && los->list_value_for_overlay(
- *tc, y, tc->get_inner_height(), *iter, ov_al))
- {
- write_line_to(outfile, ov_al);
- ++y;
+ y = 0_vl;
+ if (los != nullptr) {
+ std::vector<attr_line_t> row_overlay_content;
+ los->list_value_for_overlay(*tc, (*iter), row_overlay_content);
+ for (const auto& ov_row : row_overlay_content) {
+ write_line_to(outfile, ov_row);
+ line_count += 1;
+ ++y;
+ }
}
-
line_count += 1;
}
+
+ if (fos != nullptr) {
+ fos->fos_contexts.pop();
+ }
}
fflush(outfile);
@@ -1457,10 +1944,13 @@ com_save_to(exec_context& ec,
attr_line_t al(std::string(buffer, rc));
- lnav_data.ld_preview_source.replace_with(al)
+ lnav_data.ld_preview_view[0].set_sub_source(
+ &lnav_data.ld_preview_source[0]);
+ lnav_data.ld_preview_source[0]
+ .replace_with(al)
.set_text_format(detect_text_format(al.get_string()))
.truncate_to(10);
- lnav_data.ld_preview_status_source.get_description().set_value(
+ lnav_data.ld_preview_status_source[0].get_description().set_value(
"First lines of file: %s", split_args[0].c_str());
} else {
retval = fmt::format(FMT_STRING("info: Wrote {:L} rows to {}"),
@@ -1502,18 +1992,63 @@ com_pipe_to(exec_context& ec,
auto* tc = *lnav_data.ld_view_stack.top();
auto bv = combined_user_marks(tc->get_bookmarks());
bool pipe_line_to = (args[0] == "pipe-line-to");
+ auto path_v = ec.ec_path_stack;
+ std::map<std::string, std::string> extra_env;
+
+ if (pipe_line_to && tc == &lnav_data.ld_views[LNV_LOG]) {
+ log_data_helper ldh(lnav_data.ld_log_source);
+ char tmp_str[64];
+
+ ldh.parse_line(ec.ec_top_line, true);
+ auto format = ldh.ldh_file->get_format();
+ auto source_path = format->get_source_path();
+ path_v.insert(path_v.end(), source_path.begin(), source_path.end());
+
+ extra_env["log_line"] = fmt::to_string((int) ec.ec_top_line);
+ sql_strftime(tmp_str, sizeof(tmp_str), ldh.ldh_line->get_timeval());
+ extra_env["log_time"] = tmp_str;
+ extra_env["log_path"] = ldh.ldh_file->get_filename();
+ extra_env["log_level"] = ldh.ldh_line->get_level_name();
+ if (ldh.ldh_line_values.lvv_opid_value) {
+ extra_env["log_opid"] = ldh.ldh_line_values.lvv_opid_value.value();
+ }
+ auto read_res = ldh.ldh_file->read_raw_message(ldh.ldh_line);
+ if (read_res.isOk()) {
+ auto raw_text = to_string(read_res.unwrap());
+ extra_env["log_raw_text"] = raw_text;
+ }
+ for (auto& ldh_line_value : ldh.ldh_line_values.lvv_values) {
+ extra_env[ldh_line_value.lv_meta.lvm_name.to_string()]
+ = ldh_line_value.to_string();
+ }
+ auto iter = ldh.ldh_parser->dp_pairs.begin();
+ for (size_t lpc = 0; lpc < ldh.ldh_parser->dp_pairs.size();
+ lpc++, ++iter)
+ {
+ std::string colname = ldh.ldh_parser->get_element_string(
+ iter->e_sub_elements->front());
+ colname = ldh.ldh_namer->add_column(colname).to_string();
+ std::string val = ldh.ldh_parser->get_element_string(
+ iter->e_sub_elements->back());
+ extra_env[colname] = val;
+ }
+ }
std::string cmd = trim(remaining_args(cmdline, args));
- auto_pipe in_pipe(STDIN_FILENO);
- auto_pipe out_pipe(STDOUT_FILENO);
+ auto for_child_res = auto_pipe::for_child_fds(STDIN_FILENO, STDOUT_FILENO);
+
+ if (for_child_res.isErr()) {
+ return ec.make_error(FMT_STRING("unable to open pipe to child: {}"),
+ for_child_res.unwrapErr());
+ }
- in_pipe.open();
- out_pipe.open();
+ auto child_fds = for_child_res.unwrap();
pid_t child_pid = fork();
- in_pipe.after_fork(child_pid);
- out_pipe.after_fork(child_pid);
+ for (auto& child_fd : child_fds) {
+ child_fd.after_fork(child_pid);
+ }
switch (child_pid) {
case -1:
@@ -1521,55 +2056,22 @@ com_pipe_to(exec_context& ec,
strerror(errno));
case 0: {
- const char* args[] = {
+ const char* exec_args[] = {
"sh",
"-c",
cmd.c_str(),
nullptr,
};
- auto path_v = ec.ec_path_stack;
std::string path;
dup2(STDOUT_FILENO, STDERR_FILENO);
path_v.emplace_back(lnav::paths::dotlnav() / "formats/default");
- if (pipe_line_to && tc == &lnav_data.ld_views[LNV_LOG]) {
- logfile_sub_source& lss = lnav_data.ld_log_source;
- log_data_helper ldh(lss);
- char tmp_str[64];
-
- ldh.parse_line(ec.ec_top_line, true);
- auto format = ldh.ldh_file->get_format();
- auto source_path = format->get_source_path();
- path_v.insert(
- path_v.end(), source_path.begin(), source_path.end());
-
- snprintf(tmp_str, sizeof(tmp_str), "%d", (int) ec.ec_top_line);
- setenv("log_line", tmp_str, 1);
- sql_strftime(
- tmp_str, sizeof(tmp_str), ldh.ldh_line->get_timeval());
- setenv("log_time", tmp_str, 1);
- setenv("log_path", ldh.ldh_file->get_filename().c_str(), 1);
- for (auto& ldh_line_value : ldh.ldh_line_values.lvv_values) {
- setenv(ldh_line_value.lv_meta.lvm_name.get(),
- ldh_line_value.to_string().c_str(),
- 1);
- }
- auto iter = ldh.ldh_parser->dp_pairs.begin();
- for (size_t lpc = 0; lpc < ldh.ldh_parser->dp_pairs.size();
- lpc++, ++iter)
- {
- std::string colname = ldh.ldh_parser->get_element_string(
- iter->e_sub_elements->front());
- colname = ldh.ldh_namer->add_column(colname).to_string();
- std::string val = ldh.ldh_parser->get_element_string(
- iter->e_sub_elements->back());
- setenv(colname.c_str(), val.c_str(), 1);
- }
- }
-
setenv("PATH", lnav::filesystem::build_path(path_v).c_str(), 1);
- execvp(args[0], (char* const*) args);
+ for (const auto& pair : extra_env) {
+ setenv(pair.first.c_str(), pair.second.c_str(), 1);
+ }
+ execvp(exec_args[0], (char* const*) exec_args);
_exit(1);
break;
}
@@ -1578,15 +2080,13 @@ com_pipe_to(exec_context& ec,
bookmark_vector<vis_line_t>::iterator iter;
std::string line;
- in_pipe.read_end().close_on_exec();
- in_pipe.write_end().close_on_exec();
-
lnav_data.ld_children.push_back(child_pid);
std::future<std::string> reader;
- if (out_pipe.read_end() != -1) {
- reader = ec.ec_pipe_callback(ec, cmdline, out_pipe.read_end());
+ if (child_fds[1].read_end() != -1) {
+ reader
+ = ec.ec_pipe_callback(ec, cmdline, child_fds[1].read_end());
}
if (pipe_line_to) {
@@ -1599,37 +2099,41 @@ com_pipe_to(exec_context& ec,
shared_buffer_ref sbr;
lf->read_full_message(lf->message_start(lf->begin() + cl),
sbr);
- if (write(in_pipe.write_end(), sbr.get_data(), sbr.length())
+ if (write(child_fds[0].write_end(),
+ sbr.get_data(),
+ sbr.length())
== -1)
{
return ec.make_error("Unable to write to pipe -- {}",
strerror(errno));
}
- log_perror(write(in_pipe.write_end(), "\n", 1));
+ log_perror(write(child_fds[0].write_end(), "\n", 1));
} else {
tc->grep_value_for_line(tc->get_top(), line);
- if (write(in_pipe.write_end(), line.c_str(), line.size())
+ if (write(
+ child_fds[0].write_end(), line.c_str(), line.size())
== -1)
{
return ec.make_error("Unable to write to pipe -- {}",
strerror(errno));
}
- log_perror(write(in_pipe.write_end(), "\n", 1));
+ log_perror(write(child_fds[0].write_end(), "\n", 1));
}
} else {
for (iter = bv.begin(); iter != bv.end(); iter++) {
tc->grep_value_for_line(*iter, line);
- if (write(in_pipe.write_end(), line.c_str(), line.size())
+ if (write(
+ child_fds[0].write_end(), line.c_str(), line.size())
== -1)
{
return ec.make_error("Unable to write to pipe -- {}",
strerror(errno));
}
- log_perror(write(in_pipe.write_end(), "\n", 1));
+ log_perror(write(child_fds[0].write_end(), "\n", 1));
}
}
- in_pipe.write_end().reset();
+ child_fds[0].write_end().reset();
if (reader.valid()) {
retval = reader.get();
@@ -1647,6 +2151,8 @@ com_redirect_to(exec_context& ec,
std::string cmdline,
std::vector<std::string>& args)
{
+ static const intern_string_t SRC = intern_string::lookup("path");
+
if (args.empty()) {
args.emplace_back("filename");
return Ok(std::string());
@@ -1662,16 +2168,21 @@ com_redirect_to(exec_context& ec,
}
std::string fn = trim(remaining_args(cmdline, args));
- std::vector<std::string> split_args;
shlex lexer(fn);
- scoped_resolver scopes = {
- &ec.ec_local_vars.top(),
- &ec.ec_global_vars,
- };
- if (!lexer.split(split_args, scopes)) {
- return ec.make_error("unable to parse arguments");
+ auto split_args_res = lexer.split(ec.create_resolver());
+ if (split_args_res.isErr()) {
+ auto split_err = split_args_res.unwrapErr();
+ auto um
+ = lnav::console::user_message::error("unable to parse file name")
+ .with_reason(split_err.te_msg)
+ .with_snippet(lnav::console::snippet::from(
+ SRC, lexer.to_attr_line(split_err)));
+
+ return Err(um);
}
+ auto split_args = split_args_res.unwrap()
+ | lnav::itertools::map([](const auto& elem) { return elem.se_value; });
if (split_args.size() > 1) {
return ec.make_error("more than one file name was matched");
}
@@ -1750,7 +2261,7 @@ com_highlight(exec_context& ec,
if (ec.ec_dry_run) {
hm[{highlight_source_t::PREVIEW, "preview"}] = hl;
- lnav_data.ld_preview_status_source.get_description().set_value(
+ lnav_data.ld_preview_status_source[0].get_description().set_value(
"Matches are highlighted in the view");
retval = "";
@@ -1870,9 +2381,12 @@ com_filter(exec_context& ec,
}
if (ec.ec_dry_run) {
if (args[0] == "filter-in" && !fs.empty()) {
- lnav_data.ld_preview_status_source.get_description().set_value(
- "Match preview for :filter-in only works if there are no "
- "other filters");
+ lnav_data.ld_preview_status_source[0]
+ .get_description()
+ .set_value(
+ "Match preview for :filter-in only works if there are "
+ "no "
+ "other filters");
retval = "";
} else {
auto& hm = tc->get_highlights();
@@ -1885,9 +2399,11 @@ com_filter(exec_context& ec,
hm[{highlight_source_t::PREVIEW, "preview"}] = hl;
tc->reload_data();
- lnav_data.ld_preview_status_source.get_description().set_value(
- "Matches are highlighted in %s in the text view",
- role == role_t::VCR_DIFF_DELETE ? "red" : "green");
+ lnav_data.ld_preview_status_source[0]
+ .get_description()
+ .set_value(
+ "Matches are highlighted in %s in the text view",
+ role == role_t::VCR_DIFF_DELETE ? "red" : "green");
retval = "";
}
@@ -1918,6 +2434,24 @@ com_filter(exec_context& ec,
return Ok(retval);
}
+static readline_context::prompt_result_t
+com_filter_prompt(exec_context& ec, const std::string& cmdline)
+{
+ const auto* tc = lnav_data.ld_view_stack.top().value();
+ std::vector<std::string> args;
+
+ split_ws(cmdline, args);
+ if (args.size() > 1) {
+ return {};
+ }
+
+ if (tc->tc_selected_text) {
+ return {"", tc->tc_selected_text->sti_value};
+ }
+
+ return {"", tc->get_current_search()};
+}
+
static Result<std::string, lnav::console::user_message>
com_delete_filter(exec_context& ec,
std::string cmdline,
@@ -2074,7 +2608,7 @@ com_filter_expr(exec_context& ec,
if (set_res.isErr()) {
return Err(set_res.unwrapErr());
}
- lnav_data.ld_preview_status_source.get_description().set_value(
+ lnav_data.ld_preview_status_source[0].get_description().set_value(
"Matches are highlighted in the text view");
} else {
lnav_data.ld_log_source.set_preview_sql_filter(nullptr);
@@ -2094,18 +2628,20 @@ com_filter_expr(exec_context& ec,
return Ok(retval);
}
-static std::string
+static readline_context::prompt_result_t
com_filter_expr_prompt(exec_context& ec, const std::string& cmdline)
{
- textview_curses* tc = *lnav_data.ld_view_stack.top();
+ auto* tc = *lnav_data.ld_view_stack.top();
if (tc != &lnav_data.ld_views[LNV_LOG]) {
- return "";
+ return {""};
}
- return fmt::format(FMT_STRING("{} {}"),
- trim(cmdline),
- trim(lnav_data.ld_log_source.get_sql_filter_text()));
+ return {
+ fmt::format(FMT_STRING("{} {}"),
+ trim(cmdline),
+ trim(lnav_data.ld_log_source.get_sql_filter_text())),
+ };
}
static Result<std::string, lnav::console::user_message>
@@ -2187,9 +2723,12 @@ com_create_logline_table(exec_context& ec,
if (ec.ec_dry_run) {
attr_line_t al(ldt->get_table_statement());
- lnav_data.ld_preview_status_source.get_description().set_value(
- "The following table will be created:");
- lnav_data.ld_preview_source.replace_with(al).set_text_format(
+ lnav_data.ld_preview_status_source[0]
+ .get_description()
+ .set_value("The following table will be created:");
+ lnav_data.ld_preview_view[0].set_sub_source(
+ &lnav_data.ld_preview_source[0]);
+ lnav_data.ld_preview_source[0].replace_with(al).set_text_format(
text_format_t::TF_SQL);
return Ok(std::string());
@@ -2304,10 +2843,12 @@ com_create_search_table(exec_context& ec,
attr_line_t al(lst->get_table_statement());
- lnav_data.ld_preview_status_source.get_description().set_value(
+ lnav_data.ld_preview_status_source[0].get_description().set_value(
"The following table will be created:");
- lnav_data.ld_preview_source.replace_with(al).set_text_format(
+ lnav_data.ld_preview_view[0].set_sub_source(
+ &lnav_data.ld_preview_source[0]);
+ lnav_data.ld_preview_source[0].replace_with(al).set_text_format(
text_format_t::TF_SQL);
return Ok(std::string());
@@ -2444,6 +2985,7 @@ com_session(exec_context& ec,
static Result<std::string, lnav::console::user_message>
com_open(exec_context& ec, std::string cmdline, std::vector<std::string>& args)
{
+ static const intern_string_t SRC = intern_string::lookup("path");
std::string retval;
if (args.empty()) {
@@ -2465,19 +3007,30 @@ com_open(exec_context& ec, std::string cmdline, std::vector<std::string>& args)
pat = trim(remaining_args(cmdline, args));
- std::vector<std::string> split_args;
shlex lexer(pat);
- scoped_resolver scopes = {
- &ec.ec_local_vars.top(),
- &ec.ec_global_vars,
- };
-
- if (!lexer.split(split_args, scopes)) {
- return ec.make_error("unable to parse arguments");
+ auto split_args_res = lexer.split(ec.create_resolver());
+ if (split_args_res.isErr()) {
+ auto split_err = split_args_res.unwrapErr();
+ auto um
+ = lnav::console::user_message::error("unable to parse file names")
+ .with_reason(split_err.te_msg)
+ .with_snippet(lnav::console::snippet::from(
+ SRC, lexer.to_attr_line(split_err)));
+
+ return Err(um);
}
+ auto split_args = split_args_res.unwrap()
+ | lnav::itertools::map([](const auto& elem) { return elem.se_value; });
+
std::vector<std::pair<std::string, file_location_t>> files_to_front;
std::vector<std::string> closed_files;
+ logfile_open_options loo;
+
+ auto prov = ec.get_provenance<exec_context::file_open>();
+ if (prov) {
+ loo.with_filename(prov->fo_name);
+ }
for (auto fn : split_args) {
file_location_t file_loc;
@@ -2498,6 +3051,7 @@ com_open(exec_context& ec, std::string cmdline, std::vector<std::string>& args)
file_loc = fn.substr(hash_index);
fn = fn.substr(0, hash_index);
}
+ loo.with_init_location(file_loc);
}
auto file_iter = lnav_data.ld_active_files.fc_files.begin();
@@ -2520,6 +3074,7 @@ com_open(exec_context& ec, std::string cmdline, std::vector<std::string>& args)
if (file_iter == lnav_data.ld_active_files.fc_files.end()) {
auto_mem<char> abspath;
struct stat st;
+ size_t url_index;
if (is_url(fn.c_str())) {
#ifndef HAVE_LIBCURL
@@ -2528,8 +3083,9 @@ com_open(exec_context& ec, std::string cmdline, std::vector<std::string>& args)
if (!ec.ec_dry_run) {
auto ul = std::make_shared<url_loader>(fn);
- lnav_data.ld_active_files.fc_file_names[fn].with_fd(
- ul->copy_fd());
+ lnav_data.ld_active_files.fc_file_names[ul->get_path()]
+ .with_filename(fn)
+ .with_init_location(file_loc);
isc::to<curl_looper&, services::curl_streamer_t>().send(
[ul](auto& clooper) { clooper.add_request(ul); });
lnav_data.ld_files_to_front.emplace_back(fn, file_loc);
@@ -2538,12 +3094,69 @@ com_open(exec_context& ec, std::string cmdline, std::vector<std::string>& args)
retval = "";
}
#endif
- } else if (is_glob(fn.c_str())) {
- fc.fc_file_names.emplace(fn, logfile_open_options());
+ } else if ((url_index = fn.find("://")) != std::string::npos) {
+ const auto& cfg
+ = injector::get<const lnav::url_handler::config&>();
+ const auto HOST_REGEX
+ = lnav::pcre2pp::code::from_const("://(?:\\?|$)");
+
+ auto find_res = HOST_REGEX.find_in(fn).ignore_error();
+ if (find_res) {
+ fn.insert(url_index + 3, "localhost");
+ }
+
+ auto_mem<CURLU> cu(curl_url_cleanup);
+ cu = curl_url();
+ auto set_rc = curl_url_set(
+ cu, CURLUPART_URL, fn.c_str(), CURLU_NON_SUPPORT_SCHEME);
+ if (set_rc != CURLUE_OK) {
+ return Err(lnav::console::user_message::error(
+ attr_line_t("invalid URL: ")
+ .append(lnav::roles::file(fn)))
+ .with_reason(curl_url_strerror(set_rc)));
+ }
+
+ auto_mem<char> scheme_part(curl_free);
+ auto get_rc
+ = curl_url_get(cu, CURLUPART_SCHEME, scheme_part.out(), 0);
+ if (get_rc != CURLUE_OK) {
+ return Err(lnav::console::user_message::error(
+ attr_line_t("cannot get scheme from URL: ")
+ .append(lnav::roles::file(fn)))
+ .with_reason(curl_url_strerror(set_rc)));
+ }
+
+ auto proto_iter = cfg.c_schemes.find(scheme_part.in());
+ if (proto_iter == cfg.c_schemes.end()) {
+ return Err(
+ lnav::console::user_message::error(
+ attr_line_t("no defined handler for URL scheme: ")
+ .append(lnav::roles::file(scheme_part.in())))
+ .with_reason(curl_url_strerror(set_rc)));
+ }
+
+ auto path_and_args
+ = fmt::format(FMT_STRING("{} {}"),
+ proto_iter->second.p_handler.pp_value,
+ fn);
+
+ exec_context::provenance_guard pg(&ec,
+ exec_context::file_open{fn});
+
+ auto exec_res = execute_file(ec, path_and_args);
+ if (exec_res.isErr()) {
+ return exec_res;
+ }
+
+ retval = "info: watching -- " + fn;
+ } else if (lnav::filesystem::is_glob(fn.c_str())) {
+ fc.fc_file_names.emplace(fn, loo);
+ files_to_front.emplace_back(
+ loo.loo_filename.empty() ? fn : loo.loo_filename, file_loc);
retval = "info: watching -- " + fn;
} else if (stat(fn.c_str(), &st) == -1) {
if (fn.find(':') != std::string::npos) {
- fc.fc_file_names.emplace(fn, logfile_open_options());
+ fc.fc_file_names.emplace(fn, loo);
retval = "info: watching -- " + fn;
} else {
auto um = lnav::console::user_message::error(
@@ -2571,25 +3184,23 @@ com_open(exec_context& ec, std::string cmdline, std::vector<std::string>& args)
} else if (ec.ec_dry_run) {
retval = "";
} else {
- auto fifo_piper = std::make_shared<piper_proc>(
- std::move(fifo_fd),
- false,
- lnav::filesystem::open_temp_file(
- ghc::filesystem::temp_directory_path()
- / "lnav.fifo.XXXXXX")
- .map([](auto pair) {
- ghc::filesystem::remove(pair.first);
-
- return pair;
- })
- .expect("Cannot create temporary file for FIFO")
- .second);
- auto fifo_out_fd = fifo_piper->get_fd();
auto desc = fmt::format(FMT_STRING("FIFO [{}]"),
lnav_data.ld_fifo_counter++);
- lnav_data.ld_active_files.fc_file_names[desc].with_fd(
- std::move(fifo_out_fd));
- lnav_data.ld_pipers.push_back(fifo_piper);
+ if (prov) {
+ desc = prov->fo_name;
+ }
+ auto create_piper_res = lnav::piper::create_looper(
+ desc, std::move(fifo_fd), auto_fd{});
+ if (create_piper_res.isErr()) {
+ auto um = lnav::console::user_message::error(
+ attr_line_t("cannot create piper: ")
+ .append(lnav::roles::file(fn)))
+ .with_reason(create_piper_res.unwrapErr())
+ .with_snippets(ec.ec_source);
+ return Err(um);
+ }
+ lnav_data.ld_active_files.fc_file_names[desc].with_piper(
+ create_piper_res.unwrap());
}
} else if ((abspath = realpath(fn.c_str(), nullptr)) == nullptr) {
auto um = lnav::console::user_message::error(
@@ -2607,8 +3218,7 @@ com_open(exec_context& ec, std::string cmdline, std::vector<std::string>& args)
if (dir_wild[dir_wild.size() - 1] == '/') {
dir_wild.resize(dir_wild.size() - 1);
}
- fc.fc_file_names.emplace(dir_wild + "/*",
- logfile_open_options());
+ fc.fc_file_names.emplace(dir_wild + "/*", loo);
retval = "info: watching -- " + dir_wild;
} else if (!S_ISREG(st.st_mode)) {
auto um = lnav::console::user_message::error(
@@ -2632,7 +3242,7 @@ com_open(exec_context& ec, std::string cmdline, std::vector<std::string>& args)
return Err(um);
} else {
fn = abspath.in();
- fc.fc_file_names.emplace(fn, logfile_open_options());
+ fc.fc_file_names.emplace(fn, loo);
retval = "info: opened -- " + fn;
files_to_front.emplace_back(fn, file_loc);
@@ -2646,31 +3256,37 @@ com_open(exec_context& ec, std::string cmdline, std::vector<std::string>& args)
}
if (ec.ec_dry_run) {
- lnav_data.ld_preview_source.clear();
+ lnav_data.ld_preview_view[0].set_sub_source(
+ &lnav_data.ld_preview_source[0]);
+ lnav_data.ld_preview_source[0].clear();
if (!fc.fc_file_names.empty()) {
auto iter = fc.fc_file_names.begin();
- std::string fn = iter->first;
- auto_fd preview_fd;
+ std::string fn_str = iter->first;
- if (fn.find(':') != std::string::npos) {
+ if (fn_str.find(':') != std::string::npos) {
auto id = lnav_data.ld_preview_generation;
- lnav_data.ld_preview_status_source.get_description()
+ lnav_data.ld_preview_status_source[0]
+ .get_description()
.set_cylon(true)
- .set_value("Loading %s...", fn.c_str());
- lnav_data.ld_preview_source.clear();
+ .set_value("Loading %s...", fn_str.c_str());
+ lnav_data.ld_preview_view[0].set_sub_source(
+ &lnav_data.ld_preview_source[0]);
+ lnav_data.ld_preview_source[0].clear();
isc::to<tailer::looper&, services::remote_tailer_t>().send(
- [id, fn](auto& tlooper) {
- auto rp_opt = humanize::network::path::from_str(fn);
+ [id, fn_str](auto& tlooper) {
+ auto rp_opt = humanize::network::path::from_str(fn_str);
if (rp_opt) {
tlooper.load_preview(id, *rp_opt);
}
});
- lnav_data.ld_preview_view.set_needs_update();
- } else if (is_glob(fn.c_str())) {
+ lnav_data.ld_preview_view[0].set_needs_update();
+ } else if (lnav::filesystem::is_glob(fn_str)) {
static_root_mem<glob_t, globfree> gl;
- if (glob(fn.c_str(), GLOB_NOCHECK, nullptr, gl.inout()) == 0) {
+ if (glob(fn_str.c_str(), GLOB_NOCHECK, nullptr, gl.inout())
+ == 0)
+ {
attr_line_t al;
for (size_t lpc = 0; lpc < gl->gl_pathc && lpc < 10; lpc++)
@@ -2683,45 +3299,134 @@ com_open(exec_context& ec, std::string cmdline, std::vector<std::string>& args)
std::to_string(gl->gl_pathc - 10)))
.append(" files not shown ...");
}
- lnav_data.ld_preview_status_source.get_description()
+ lnav_data.ld_preview_status_source[0]
+ .get_description()
.set_value("The following files will be loaded:");
- lnav_data.ld_preview_source.replace_with(al);
+ lnav_data.ld_preview_view[0].set_sub_source(
+ &lnav_data.ld_preview_source[0]);
+ lnav_data.ld_preview_source[0].replace_with(al);
} else {
- return ec.make_error("failed to evaluate glob -- {}", fn);
+ return ec.make_error("failed to evaluate glob -- {}",
+ fn_str);
}
- } else if ((preview_fd = open(fn.c_str(), O_RDONLY)) == -1) {
- return ec.make_error(
- "unable to open file3: {} -- {}", fn, strerror(errno));
} else {
- line_buffer lb;
+ auto fn = ghc::filesystem::path(fn_str);
+ auto detect_res = detect_file_format(fn);
attr_line_t al;
- file_range range;
- std::string lines;
-
- lb.set_fd(preview_fd);
- for (int lpc = 0; lpc < 10; lpc++) {
- auto load_result = lb.load_next_line(range);
-
- if (load_result.isErr()) {
+ attr_line_builder alb(al);
+
+ switch (detect_res) {
+ case file_format_t::ARCHIVE: {
+ auto describe_res = archive_manager::describe(fn);
+
+ if (describe_res.isOk()) {
+ auto arc_res = describe_res.unwrap();
+
+ if (arc_res.is<archive_manager::archive_info>()) {
+ auto ai
+ = arc_res
+ .get<archive_manager::archive_info>();
+ auto lines_remaining = size_t{9};
+
+ al.append("Archive: ")
+ .append(
+ lnav::roles::symbol(ai.ai_format_name))
+ .append("\n");
+ for (const auto& entry : ai.ai_entries) {
+ if (lines_remaining == 0) {
+ break;
+ }
+ lines_remaining -= 1;
+
+ char timebuf[64];
+ sql_strftime(timebuf,
+ sizeof(timebuf),
+ entry.e_mtime,
+ 0,
+ 'T');
+ al.append(" ")
+ .append(entry.e_mode)
+ .append(" ")
+ .appendf(
+ FMT_STRING("{:>8}"),
+ humanize::file_size(
+ entry.e_size.value(),
+ humanize::alignment::columnar))
+ .append(" ")
+ .append(timebuf)
+ .append(" ")
+ .append(lnav::roles::file(entry.e_name))
+ .append("\n");
+ }
+ }
+ } else {
+ al.append(describe_res.unwrapErr());
+ }
break;
}
+ case file_format_t::UNKNOWN: {
+ auto open_res
+ = lnav::filesystem::open_file(fn, O_RDONLY);
+
+ if (open_res.isErr()) {
+ return ec.make_error("unable to open -- {}", fn);
+ }
+ auto preview_fd = open_res.unwrap();
+ line_buffer lb;
+ file_range range;
+
+ lb.set_fd(preview_fd);
+ for (int lpc = 0; lpc < 10; lpc++) {
+ auto load_result = lb.load_next_line(range);
+
+ if (load_result.isErr()) {
+ break;
+ }
- auto li = load_result.unwrap();
+ auto li = load_result.unwrap();
- range = li.li_file_range;
- auto read_result = lb.read_range(range);
- if (read_result.isErr()) {
+ range = li.li_file_range;
+ if (!li.li_utf8_scan_result.is_valid()) {
+ range.fr_size = 16;
+ }
+ auto read_result = lb.read_range(range);
+ if (read_result.isErr()) {
+ break;
+ }
+
+ auto sbr = read_result.unwrap();
+ auto sf = sbr.to_string_fragment();
+ if (li.li_utf8_scan_result.is_valid()) {
+ alb.append(sf);
+ } else {
+ {
+ auto ag = alb.with_attr(
+ VC_ROLE.value(role_t::VCR_FILE_OFFSET));
+ alb.appendf(FMT_STRING("{: >16x} "),
+ range.fr_offset);
+ }
+ alb.append_as_hexdump(sf);
+ alb.append("\n");
+ }
+ }
+ break;
+ }
+ case file_format_t::SQLITE_DB: {
+ alb.append(fmt::to_string(detect_res));
+ break;
+ }
+ case file_format_t::REMOTE: {
break;
}
-
- auto sbr = read_result.unwrap();
- lines.append(sbr.get_data(), sbr.length());
}
- lnav_data.ld_preview_source.replace_with(al.with_string(lines))
- .set_text_format(detect_text_format(al.get_string()));
- lnav_data.ld_preview_status_source.get_description().set_value(
- "For file: %s", fn.c_str());
+ lnav_data.ld_preview_view[0].set_sub_source(
+ &lnav_data.ld_preview_source[0]);
+ lnav_data.ld_preview_source[0].replace_with(al).set_text_format(
+ detect_text_format(al.get_string()));
+ lnav_data.ld_preview_status_source[0]
+ .get_description()
+ .set_value("For file: %s", fn.c_str());
}
}
} else {
@@ -2741,50 +3446,103 @@ com_open(exec_context& ec, std::string cmdline, std::vector<std::string>& args)
static Result<std::string, lnav::console::user_message>
com_close(exec_context& ec, std::string cmdline, std::vector<std::string>& args)
{
+ static const intern_string_t SRC = intern_string::lookup("path");
std::string retval;
if (args.empty()) {
- } else {
- textview_curses* tc = *lnav_data.ld_view_stack.top();
- nonstd::optional<ghc::filesystem::path> actual_path;
- std::string fn;
+ args.emplace_back("loaded-files");
+ return Ok(retval);
+ }
- if (tc == &lnav_data.ld_views[LNV_TEXT]) {
- textfile_sub_source& tss = lnav_data.ld_text_source;
+ auto* tc = *lnav_data.ld_view_stack.top();
+ std::vector<nonstd::optional<ghc::filesystem::path>> actual_path_v;
+ std::vector<std::string> fn_v;
- if (tss.empty()) {
- return ec.make_error("no text files are opened");
- } else {
- fn = tss.current_file()->get_filename();
- lnav_data.ld_active_files.request_close(tss.current_file());
+ if (args.size() > 1) {
+ auto lexer = shlex(cmdline);
- if (tss.size() == 1) {
- lnav_data.ld_view_stack.pop_back();
- }
+ auto split_args_res = lexer.split(ec.create_resolver());
+ if (split_args_res.isErr()) {
+ auto split_err = split_args_res.unwrapErr();
+ auto um = lnav::console::user_message::error(
+ "unable to parse file name")
+ .with_reason(split_err.te_msg)
+ .with_snippet(lnav::console::snippet::from(
+ SRC, lexer.to_attr_line(split_err)));
+
+ return Err(um);
+ }
+
+ auto args = split_args_res.unwrap()
+ | lnav::itertools::map(
+ [](const auto& elem) { return elem.se_value; });
+ args.erase(args.begin());
+
+ for (const auto& lf : lnav_data.ld_active_files.fc_files) {
+ if (lf.get() == nullptr) {
+ continue;
}
- } else if (tc == &lnav_data.ld_views[LNV_LOG]) {
- if (tc->get_inner_height() == 0) {
- return ec.make_error("no log files loaded");
- } else {
- logfile_sub_source& lss = lnav_data.ld_log_source;
- vis_line_t vl = tc->get_selection();
- content_line_t cl = lss.at(vl);
- std::shared_ptr<logfile> lf = lss.find(cl);
- actual_path = lf->get_actual_path();
- fn = lf->get_filename();
- if (!ec.ec_dry_run) {
- lnav_data.ld_active_files.request_close(lf);
- }
+ auto find_iter
+ = find_if(args.begin(), args.end(), [&lf](const auto& arg) {
+ return fnmatch(arg.c_str(), lf->get_filename().c_str(), 0)
+ == 0;
+ });
+
+ if (find_iter == args.end()) {
+ continue;
+ }
+
+ actual_path_v.push_back(lf->get_actual_path());
+ fn_v.emplace_back(lf->get_filename());
+ if (!ec.ec_dry_run) {
+ lnav_data.ld_active_files.request_close(lf);
+ }
+ }
+ } else if (tc == &lnav_data.ld_views[LNV_TEXT]) {
+ auto& tss = lnav_data.ld_text_source;
+
+ if (tss.empty()) {
+ return ec.make_error("no text files are opened");
+ } else if (!ec.ec_dry_run) {
+ auto lf = tss.current_file();
+ actual_path_v.emplace_back(lf->get_actual_path());
+ fn_v.emplace_back(lf->get_filename());
+ lnav_data.ld_active_files.request_close(lf);
+
+ if (tss.size() == 1) {
+ lnav_data.ld_view_stack.pop_back();
}
} else {
- return ec.make_error(
- "close must be run in the log or text file views");
+ retval = fmt::format(FMT_STRING("closing -- {}"),
+ tss.current_file()->get_filename());
}
- if (!fn.empty()) {
- if (ec.ec_dry_run) {
- retval = "";
- } else {
+ } else if (tc == &lnav_data.ld_views[LNV_LOG]) {
+ if (tc->get_inner_height() == 0) {
+ return ec.make_error("no log files loaded");
+ } else {
+ auto& lss = lnav_data.ld_log_source;
+ auto vl = tc->get_selection();
+ auto cl = lss.at(vl);
+ auto lf = lss.find(cl);
+
+ actual_path_v.push_back(lf->get_actual_path());
+ fn_v.emplace_back(lf->get_filename());
+ if (!ec.ec_dry_run) {
+ lnav_data.ld_active_files.request_close(lf);
+ }
+ }
+ } else {
+ return ec.make_error("close must be run in the log or text file views");
+ }
+ if (!fn_v.empty()) {
+ if (ec.ec_dry_run) {
+ retval = "";
+ } else {
+ for (size_t lpc = 0; lpc < actual_path_v.size(); lpc++) {
+ const auto& fn = fn_v[lpc];
+ const auto& actual_path = actual_path_v[lpc];
+
if (is_url(fn.c_str())) {
isc::to<curl_looper&, services::curl_streamer_t>().send(
[fn](auto& clooper) { clooper.close_request(fn); });
@@ -2794,8 +3552,9 @@ com_close(exec_context& ec, std::string cmdline, std::vector<std::string>& args)
actual_path.value().string());
}
lnav_data.ld_active_files.fc_closed_files.insert(fn);
- retval = "info: closed -- " + fn;
}
+ retval = fmt::format(FMT_STRING("info: closed -- {}"),
+ fmt::join(fn_v, ", "));
}
}
@@ -2807,6 +3566,7 @@ com_file_visibility(exec_context& ec,
std::string cmdline,
std::vector<std::string>& args)
{
+ static const intern_string_t SRC = intern_string::lookup("path");
bool only_this_file = false;
bool make_visible;
std::string retval;
@@ -2821,11 +3581,11 @@ com_file_visibility(exec_context& ec,
}
if (args.size() == 1 || only_this_file) {
- textview_curses* tc = *lnav_data.ld_view_stack.top();
+ auto* tc = *lnav_data.ld_view_stack.top();
std::shared_ptr<logfile> lf;
if (tc == &lnav_data.ld_views[LNV_TEXT]) {
- textfile_sub_source& tss = lnav_data.ld_text_source;
+ const auto& tss = lnav_data.ld_text_source;
if (tss.empty()) {
return ec.make_error("no text files are opened");
@@ -2848,8 +3608,10 @@ com_file_visibility(exec_context& ec,
if (only_this_file) {
for (const auto& ld : lnav_data.ld_log_source) {
ld->set_visibility(false);
+ ld->get_file_ptr()->set_indexing(false);
}
}
+ lf->set_indexing(make_visible);
lnav_data.ld_log_source.find_data(lf) |
[make_visible](auto ld) { ld->set_visibility(make_visible); };
tc->get_sub_source()->text_filters_changed();
@@ -2858,10 +3620,25 @@ com_file_visibility(exec_context& ec,
make_visible ? "showing" : "hiding",
lf->get_filename());
} else {
+ auto* top_tc = *lnav_data.ld_view_stack.top();
int text_file_count = 0, log_file_count = 0;
auto lexer = shlex(cmdline);
- lexer.split(args, ec.create_resolver());
+ auto split_args_res = lexer.split(ec.create_resolver());
+ if (split_args_res.isErr()) {
+ auto split_err = split_args_res.unwrapErr();
+ auto um = lnav::console::user_message::error(
+ "unable to parse file name")
+ .with_reason(split_err.te_msg)
+ .with_snippet(lnav::console::snippet::from(
+ SRC, lexer.to_attr_line(split_err)));
+
+ return Err(um);
+ }
+
+ auto args = split_args_res.unwrap()
+ | lnav::itertools::map(
+ [](const auto& elem) { return elem.se_value; });
args.erase(args.begin());
for (const auto& lf : lnav_data.ld_active_files.fc_files) {
@@ -2887,6 +3664,7 @@ com_file_visibility(exec_context& ec,
if (!ec.ec_dry_run) {
ld_opt | [make_visible](auto ld) {
+ ld->get_file_ptr()->set_indexing(make_visible);
ld->set_visibility(make_visible);
};
}
@@ -2900,6 +3678,11 @@ com_file_visibility(exec_context& ec,
lnav_data.ld_views[LNV_LOG]
.get_sub_source()
->text_filters_changed();
+ if (top_tc == &lnav_data.ld_views[LNV_GANTT]) {
+ lnav_data.ld_views[LNV_GANTT]
+ .get_sub_source()
+ ->text_filters_changed();
+ }
}
if (!ec.ec_dry_run && text_file_count > 0) {
lnav_data.ld_views[LNV_TEXT]
@@ -3007,13 +3790,13 @@ com_comment(exec_context& ec,
return Ok(retval);
}
-static std::string
+static readline_context::prompt_result_t
com_comment_prompt(exec_context& ec, const std::string& cmdline)
{
- textview_curses* tc = *lnav_data.ld_view_stack.top();
+ auto* tc = *lnav_data.ld_view_stack.top();
if (tc != &lnav_data.ld_views[LNV_LOG]) {
- return "";
+ return {""};
}
auto& lss = lnav_data.ld_log_source;
@@ -3024,10 +3807,10 @@ com_comment_prompt(exec_context& ec, const std::string& cmdline)
auto buf = auto_buffer::alloc(trimmed_comment.size() + 16);
quote_content(buf, trimmed_comment, 0);
- return trim(cmdline) + " " + buf.to_string();
+ return {trim(cmdline) + " " + buf.to_string()};
}
- return "";
+ return {""};
}
static Result<std::string, lnav::console::user_message>
@@ -3046,7 +3829,8 @@ com_clear_comment(exec_context& ec,
if (tc != &lnav_data.ld_views[LNV_LOG]) {
return ec.make_error(
- "The :clear-comment command only works in the log view");
+ "The :clear-comment command only works in the log "
+ "view");
}
auto& lss = lnav_data.ld_log_source;
@@ -3055,10 +3839,12 @@ com_clear_comment(exec_context& ec,
bookmark_metadata& line_meta = *(line_meta_opt.value());
line_meta.bm_comment.clear();
- if (line_meta.empty()) {
- lss.erase_bookmark_metadata(tc->get_selection());
+ if (line_meta.empty(bookmark_metadata::categories::notes)) {
tc->set_user_mark(
&textview_curses::BM_META, tc->get_selection(), false);
+ if (line_meta.empty(bookmark_metadata::categories::any)) {
+ lss.erase_bookmark_metadata(tc->get_selection());
+ }
}
lss.set_line_meta_changed();
@@ -3138,7 +3924,7 @@ com_untag(exec_context& ec, std::string cmdline, std::vector<std::string>& args)
auto line_meta_opt = lss.find_bookmark_metadata(tc->get_selection());
if (line_meta_opt) {
- bookmark_metadata& line_meta = *(line_meta_opt.value());
+ auto& line_meta = *(line_meta_opt.value());
for (size_t lpc = 1; lpc < args.size(); lpc++) {
std::string tag = args[lpc];
@@ -3148,7 +3934,7 @@ com_untag(exec_context& ec, std::string cmdline, std::vector<std::string>& args)
}
line_meta.remove_tag(tag);
}
- if (line_meta.empty()) {
+ if (line_meta.empty(bookmark_metadata::categories::notes)) {
tc->set_user_mark(
&textview_curses::BM_META, tc->get_selection(), false);
}
@@ -3184,7 +3970,8 @@ com_delete_tags(exec_context& ec,
if (tc != &lnav_data.ld_views[LNV_LOG]) {
return ec.make_error(
- "The :delete-tag command only works in the log view");
+ "The :delete-tag command only works in the log "
+ "view");
}
auto& known_tags = bookmark_metadata::KNOWN_TAGS;
@@ -3220,12 +4007,15 @@ com_delete_tags(exec_context& ec,
line_meta->remove_tag(tag);
}
- if (line_meta->empty()) {
- lss.erase_bookmark_metadata(*iter);
- size_t off = distance(vbm.begin(), iter);
+ if (line_meta->empty(bookmark_metadata::categories::notes)) {
+ size_t off = std::distance(vbm.begin(), iter);
+ auto vl = *iter;
+ tc->set_user_mark(&textview_curses::BM_META, vl, false);
+ if (line_meta->empty(bookmark_metadata::categories::any)) {
+ lss.erase_bookmark_metadata(vl);
+ }
- tc->set_user_mark(&textview_curses::BM_META, *iter, false);
- iter = next(vbm.begin(), off);
+ iter = std::next(vbm.begin(), off);
} else {
++iter;
}
@@ -3258,7 +4048,7 @@ com_partition_name(exec_context& ec,
args[1] = trim(remaining_args(cmdline, args));
tc.set_user_mark(
- &textview_curses::BM_META, tc.get_selection(), true);
+ &textview_curses::BM_PARTITION, tc.get_selection(), true);
auto& line_meta = lss.get_bookmark_metadata(tc.get_selection());
@@ -3284,7 +4074,7 @@ com_clear_partition(exec_context& ec,
} else if (args.size() == 1) {
textview_curses& tc = lnav_data.ld_views[LNV_LOG];
logfile_sub_source& lss = lnav_data.ld_log_source;
- auto& bv = tc.get_bookmarks()[&textview_curses::BM_META];
+ auto& bv = tc.get_bookmarks()[&textview_curses::BM_PARTITION];
nonstd::optional<vis_line_t> part_start;
if (binary_search(bv.begin(), bv.end(), tc.get_selection())) {
@@ -3300,10 +4090,12 @@ com_clear_partition(exec_context& ec,
auto& line_meta = lss.get_bookmark_metadata(part_start.value());
line_meta.bm_name.clear();
- if (line_meta.empty()) {
- lss.erase_bookmark_metadata(part_start.value());
+ if (line_meta.empty(bookmark_metadata::categories::partition)) {
tc.set_user_mark(
- &textview_curses::BM_META, part_start.value(), false);
+ &textview_curses::BM_PARTITION, part_start.value(), false);
+ if (line_meta.empty(bookmark_metadata::categories::any)) {
+ lss.erase_bookmark_metadata(part_start.value());
+ }
}
retval = "info: cleared partition name";
@@ -3453,7 +4245,8 @@ com_summarize(exec_context& ec,
query += ",";
}
query_frag = sqlite3_mprintf(
- " \"count_%s\" desc, \"c_%s\" collate naturalnocase asc",
+ " \"count_%s\" desc, \"c_%s\" collate "
+ "naturalnocase asc",
iter->c_str(),
iter->c_str());
query += query_frag;
@@ -3638,7 +4431,7 @@ com_zoom_to(exec_context& ec,
auto old_time_opt = lnav_data.ld_hist_source2.time_for_row(
lnav_data.ld_views[LNV_HISTOGRAM].get_top());
if (old_time_opt) {
- old_time = old_time_opt.value();
+ old_time = old_time_opt.value().ri_time;
rebuild_hist();
lnav_data.ld_hist_source2.row_for_time(old_time) |
[](auto new_top) {
@@ -3659,7 +4452,7 @@ com_zoom_to(exec_context& ec,
spectro_view.reload_data();
if (old_time_opt) {
lnav_data.ld_spectro_source->row_for_time(
- old_time_opt.value())
+ old_time_opt.value().ri_time)
| [](auto new_top) {
lnav_data.ld_views[LNV_SPECTRO].set_selection(
new_top);
@@ -3709,6 +4502,7 @@ com_load_session(exec_context& ec,
if (args.empty()) {
} else if (!ec.ec_dry_run) {
load_session();
+ lnav::session::restore_view_states();
lnav_data.ld_views[LNV_LOG].reload_data();
}
@@ -3755,10 +4549,11 @@ com_export_session_to(exec_context& ec,
tcsetattr(1, TCSANOW, &curr_termios);
setvbuf(stdout, nullptr, _IONBF, 0);
to_term = true;
- fprintf(
- outfile,
- "\n---------------- Press any key to exit lo-fi display "
- "----------------\n\n");
+ fprintf(outfile,
+ "\n---------------- Press any key to exit "
+ "lo-fi "
+ "display "
+ "----------------\n\n");
} else {
outfile = auto_mem<FILE>::leak(ec_out.value());
}
@@ -3881,7 +4676,9 @@ com_toggle_field(exec_context& ec,
if (hide) {
if (lnav_data.ld_rl_view != nullptr) {
lnav_data.ld_rl_view->set_alt_value(
- HELP_MSG_1(x, "to quickly show hidden fields"));
+ HELP_MSG_1(x,
+ "to quickly show hidden "
+ "fields"));
}
}
tc->set_needs_update();
@@ -3915,35 +4712,38 @@ com_hide_line(exec_context& ec,
if (args.empty()) {
args.emplace_back("move-time");
} else if (args.size() == 1) {
- textview_curses* tc = *lnav_data.ld_view_stack.top();
- logfile_sub_source& lss = lnav_data.ld_log_source;
+ auto* tc = *lnav_data.ld_view_stack.top();
+ auto& lss = lnav_data.ld_log_source;
if (tc == &lnav_data.ld_views[LNV_LOG]) {
- struct timeval min_time, max_time;
- bool have_min_time = lss.get_min_log_time(min_time);
- bool have_max_time = lss.get_max_log_time(max_time);
+ auto min_time_opt = lss.get_min_log_time();
+ auto max_time_opt = lss.get_max_log_time();
char min_time_str[32], max_time_str[32];
- if (have_min_time) {
- sql_strftime(min_time_str, sizeof(min_time_str), min_time);
+ if (min_time_opt) {
+ sql_strftime(
+ min_time_str, sizeof(min_time_str), min_time_opt.value());
}
- if (have_max_time) {
- sql_strftime(max_time_str, sizeof(max_time_str), max_time);
+ if (max_time_opt) {
+ sql_strftime(
+ max_time_str, sizeof(max_time_str), max_time_opt.value());
}
- if (have_min_time && have_max_time) {
+ if (min_time_opt && max_time_opt) {
retval
- = fmt::format("info: hiding lines before {} and after {}",
+ = fmt::format(FMT_STRING("info: hiding lines before {} and "
+ "after {}"),
min_time_str,
max_time_str);
- } else if (have_min_time) {
- retval
- = fmt::format("info: hiding lines before {}", min_time_str);
- } else if (have_max_time) {
- retval
- = fmt::format("info: hiding lines after {}", max_time_str);
+ } else if (min_time_opt) {
+ retval = fmt::format(FMT_STRING("info: hiding lines before {}"),
+ min_time_str);
+ } else if (max_time_opt) {
+ retval = fmt::format(FMT_STRING("info: hiding lines after {}"),
+ max_time_str);
} else {
retval
- = "info: no lines hidden by time, pass an absolute or "
+ = "info: no lines hidden by time, pass an "
+ "absolute or "
"relative time";
}
} else {
@@ -3952,55 +4752,55 @@ com_hide_line(exec_context& ec,
}
} else if (args.size() >= 2) {
std::string all_args = remaining_args(cmdline, args);
- textview_curses* tc = *lnav_data.ld_view_stack.top();
- logfile_sub_source& lss = lnav_data.ld_log_source;
+ auto* tc = *lnav_data.ld_view_stack.top();
+ auto* ttt = dynamic_cast<text_time_translator*>(tc->get_sub_source());
+ auto& lss = lnav_data.ld_log_source;
date_time_scanner dts;
- struct timeval tv;
- bool tv_set = false;
+ struct timeval tv_abs;
+ nonstd::optional<timeval> tv_opt;
auto parse_res = relative_time::from_str(all_args);
if (parse_res.isOk()) {
- if (tc == &lnav_data.ld_views[LNV_LOG]) {
+ if (ttt != nullptr) {
if (tc->get_inner_height() > 0) {
- content_line_t cl;
struct exttm tm;
- vis_line_t vl;
- logline* ll;
-
- vl = tc->get_selection();
- cl = lnav_data.ld_log_source.at(vl);
- ll = lnav_data.ld_log_source.find_line(cl);
- ll->to_exttm(tm);
- tv = parse_res.unwrap().adjust(tm).to_timeval();
- tv_set = true;
+ auto vl = tc->get_selection();
+ auto log_vl_ri = ttt->time_for_row(vl);
+ if (log_vl_ri) {
+ tm = exttm::from_tv(log_vl_ri.value().ri_time);
+ tv_opt = parse_res.unwrap().adjust(tm).to_timeval();
+ }
}
} else {
return ec.make_error(
- "relative time values only work in the log view");
- }
- } else if (dts.convert_to_timeval(all_args, tv)) {
- if (tc == &lnav_data.ld_views[LNV_LOG]) {
- tv_set = true;
- } else {
- return ec.make_error("time values only work in the log view");
+ "relative time values only work in a "
+ "time-based view");
}
+ } else if (dts.convert_to_timeval(all_args, tv_abs)) {
+ tv_opt = tv_abs;
}
- if (tv_set && !ec.ec_dry_run) {
+ if (tv_opt && !ec.ec_dry_run) {
char time_text[256];
std::string relation;
- sql_strftime(time_text, sizeof(time_text), tv);
+ sql_strftime(time_text, sizeof(time_text), tv_opt.value());
if (args[0] == "hide-lines-before") {
- lss.set_min_log_time(tv);
+ lss.set_min_log_time(tv_opt.value());
relation = "before";
} else {
- lss.set_max_log_time(tv);
+ lss.set_max_log_time(tv_opt.value());
relation = "after";
}
- retval = "info: hiding lines " + relation + " " + time_text;
+ if (ttt != nullptr && tc != &lnav_data.ld_views[LNV_LOG]) {
+ tc->get_sub_source()->text_filters_changed();
+ tc->reload_data();
+ }
+
+ retval = fmt::format(
+ FMT_STRING("info: hiding lines {} {}"), relation, time_text);
}
}
@@ -4085,6 +4885,219 @@ com_rebuild(exec_context& ec,
}
static Result<std::string, lnav::console::user_message>
+com_cd(exec_context& ec, std::string cmdline, std::vector<std::string>& args)
+{
+ static const intern_string_t SRC = intern_string::lookup("path");
+
+ if (args.empty()) {
+ args.emplace_back("dirname");
+ return Ok(std::string());
+ }
+
+ if (lnav_data.ld_flags & LNF_SECURE_MODE) {
+ return ec.make_error("{} -- unavailable in secure mode", args[0]);
+ }
+
+ std::vector<std::string> word_exp;
+ std::string pat;
+
+ pat = trim(remaining_args(cmdline, args));
+
+ shlex lexer(pat);
+ auto split_args_res = lexer.split(ec.create_resolver());
+ if (split_args_res.isErr()) {
+ auto split_err = split_args_res.unwrapErr();
+ auto um
+ = lnav::console::user_message::error("unable to parse file name")
+ .with_reason(split_err.te_msg)
+ .with_snippet(lnav::console::snippet::from(
+ SRC, lexer.to_attr_line(split_err)));
+
+ return Err(um);
+ }
+
+ auto split_args = split_args_res.unwrap()
+ | lnav::itertools::map([](const auto& elem) { return elem.se_value; });
+
+ if (split_args.size() != 1) {
+ return ec.make_error("expecting a single argument");
+ }
+
+ struct stat st;
+
+ if (stat(split_args[0].c_str(), &st) != 0) {
+ return Err(ec.make_error_msg("cannot access -- {}", split_args[0])
+ .with_errno_reason());
+ }
+
+ if (!S_ISDIR(st.st_mode)) {
+ return ec.make_error("{} is not a directory", split_args[0]);
+ }
+
+ if (!ec.ec_dry_run) {
+ chdir(split_args[0].c_str());
+ }
+
+ return Ok(std::string());
+}
+
+static Result<std::string, lnav::console::user_message>
+com_sh(exec_context& ec, std::string cmdline, std::vector<std::string>& args)
+{
+ if (args.empty()) {
+ args.emplace_back("filename");
+ return Ok(std::string());
+ }
+
+ if (lnav_data.ld_flags & LNF_SECURE_MODE) {
+ return ec.make_error("{} -- unavailable in secure mode", args[0]);
+ }
+
+ static size_t EXEC_COUNT = 0;
+
+ if (!ec.ec_dry_run) {
+ nonstd::optional<std::string> name_flag;
+
+ shlex lexer(cmdline);
+ auto cmd_start = args[0].size();
+ auto split_res = lexer.split(ec.create_resolver());
+ if (split_res.isOk()) {
+ auto flags = split_res.unwrap();
+ if (flags.size() >= 2) {
+ static const char* NAME_FLAG = "--name=";
+
+ if (startswith(flags[1].se_value, NAME_FLAG)) {
+ name_flag = flags[1].se_value.substr(strlen(NAME_FLAG));
+ cmd_start = flags[1].se_origin.sf_end;
+ }
+ }
+ }
+
+ auto carg = trim(cmdline.substr(cmd_start));
+
+ log_info("executing: %s", carg.c_str());
+
+ auto child_fds_res
+ = auto_pipe::for_child_fds(STDOUT_FILENO, STDERR_FILENO);
+ if (child_fds_res.isErr()) {
+ auto um = lnav::console::user_message::error(
+ "unable to create child pipes")
+ .with_reason(child_fds_res.unwrapErr());
+ ec.add_error_context(um);
+ return Err(um);
+ }
+ auto child_res = lnav::pid::from_fork();
+ if (child_res.isErr()) {
+ auto um
+ = lnav::console::user_message::error("unable to fork() child")
+ .with_reason(child_res.unwrapErr());
+ ec.add_error_context(um);
+ return Err(um);
+ }
+
+ auto child_fds = child_fds_res.unwrap();
+ auto child = child_res.unwrap();
+ for (auto& child_fd : child_fds) {
+ child_fd.after_fork(child.in());
+ }
+ if (child.in_child()) {
+ auto dev_null = open("/dev/null", O_RDONLY | O_CLOEXEC);
+
+ dup2(dev_null, STDIN_FILENO);
+ const char* exec_args[] = {
+ getenv_opt("SHELL").value_or("bash"),
+ "-c",
+ carg.c_str(),
+ nullptr,
+ };
+
+ for (const auto& pair : ec.ec_local_vars.top()) {
+ pair.second.match(
+ [&pair](const std::string& val) {
+ setenv(pair.first.c_str(), val.c_str(), 1);
+ },
+ [&pair](const string_fragment& sf) {
+ setenv(pair.first.c_str(), sf.to_string().c_str(), 1);
+ },
+ [](null_value_t) {},
+ [&pair](int64_t val) {
+ setenv(
+ pair.first.c_str(), fmt::to_string(val).c_str(), 1);
+ },
+ [&pair](double val) {
+ setenv(
+ pair.first.c_str(), fmt::to_string(val).c_str(), 1);
+ });
+ }
+
+ execvp(exec_args[0], (char**) exec_args);
+ _exit(EXIT_FAILURE);
+ }
+
+ std::string display_name;
+ auto open_prov = ec.get_provenance<exec_context::file_open>();
+ if (open_prov) {
+ if (name_flag) {
+ display_name = fmt::format(
+ FMT_STRING("{}/{}"), open_prov->fo_name, name_flag.value());
+ } else {
+ display_name = open_prov->fo_name;
+ }
+ } else if (name_flag) {
+ display_name = name_flag.value();
+ } else {
+ display_name
+ = fmt::format(FMT_STRING("[{}] {}"), EXEC_COUNT++, carg);
+ }
+
+ auto name_base = display_name;
+ size_t name_counter = 0;
+
+ while (true) {
+ auto fn_iter
+ = lnav_data.ld_active_files.fc_file_names.find(display_name);
+ if (fn_iter == lnav_data.ld_active_files.fc_file_names.end()) {
+ break;
+ }
+ name_counter += 1;
+ display_name
+ = fmt::format(FMT_STRING("{} [{}]"), name_base, name_counter);
+ }
+
+ auto create_piper_res
+ = lnav::piper::create_looper(display_name,
+ std::move(child_fds[0].read_end()),
+ std::move(child_fds[1].read_end()));
+
+ if (create_piper_res.isErr()) {
+ auto um
+ = lnav::console::user_message::error("unable to create piper")
+ .with_reason(create_piper_res.unwrapErr());
+ ec.add_error_context(um);
+ return Err(um);
+ }
+
+ lnav_data.ld_active_files.fc_file_names[display_name].with_piper(
+ create_piper_res.unwrap());
+ lnav_data.ld_child_pollers.emplace_back(child_poller{
+ display_name,
+ std::move(child),
+ [](auto& fc, auto& child) {},
+ });
+ lnav_data.ld_files_to_front.emplace_back(display_name,
+ file_location_t{});
+
+ if (lnav_data.ld_rl_view != nullptr) {
+ lnav_data.ld_rl_view->set_alt_value(
+ HELP_MSG_CTRL(C, "to send SIGINT to child process"));
+ }
+ return Ok(fmt::format(FMT_STRING("info: executing -- {}"), carg));
+ }
+
+ return Ok(std::string());
+}
+
+static Result<std::string, lnav::console::user_message>
com_shexec(exec_context& ec,
std::string cmdline,
std::vector<std::string>& args)
@@ -4159,9 +5172,11 @@ com_echo(exec_context& ec, std::string cmdline, std::vector<std::string>& args)
auto ec_out = ec.get_output();
if (ec.ec_dry_run) {
- lnav_data.ld_preview_status_source.get_description().set_value(
+ lnav_data.ld_preview_status_source[0].get_description().set_value(
"The text to output:");
- lnav_data.ld_preview_source.replace_with(attr_line_t(retval));
+ lnav_data.ld_preview_view[0].set_sub_source(
+ &lnav_data.ld_preview_source[0]);
+ lnav_data.ld_preview_source[0].replace_with(attr_line_t(retval));
retval = "";
} else if (ec_out) {
FILE* outfile = *ec_out;
@@ -4243,35 +5258,23 @@ com_eval(exec_context& ec, std::string cmdline, std::vector<std::string>& args)
if (ec.ec_dry_run) {
attr_line_t al(expanded_cmd);
- lnav_data.ld_preview_status_source.get_description().set_value(
+ lnav_data.ld_preview_status_source[0].get_description().set_value(
"The command to be executed:");
- lnav_data.ld_preview_source.replace_with(al);
+ lnav_data.ld_preview_view[0].set_sub_source(
+ &lnav_data.ld_preview_source[0]);
+ lnav_data.ld_preview_source[0].replace_with(al);
return Ok(std::string());
}
auto src_guard = ec.enter_source(EVAL_SRC, 1, expanded_cmd);
- std::string alt_msg;
- switch (expanded_cmd[0]) {
- case ':':
- return execute_command(ec, expanded_cmd.substr(1));
- case ';':
- return execute_sql(ec, expanded_cmd.substr(1), alt_msg);
- case '|':
- return execute_file(ec, expanded_cmd.substr(1));
- case '/': {
- auto search_cmd = expanded_cmd.substr(1);
- lnav_data.ld_view_stack.top() |
- [&search_cmd](auto tc) { tc->execute_search(search_cmd); };
- break;
- }
- default:
- return ec.make_error(
- "expecting argument to start with ':', ';', '/', "
- "or '|' to signify a command, SQL query, or script to "
- "execute");
+ auto content = string_fragment::from_str(expanded_cmd);
+ multiline_executor me(ec, ":eval");
+ for (auto line : content.split_lines()) {
+ TRY(me.push_back(line));
}
+ retval = TRY(me.final());
} else {
return ec.make_error("expecting a command or query to evaluate");
}
@@ -4292,14 +5295,16 @@ com_config(exec_context& ec,
static const auto INPUT_SRC = intern_string::lookup("input");
yajlpp_parse_context ypc(INPUT_SRC, &lnav_config_handlers);
- std::vector<lnav::console::user_message> errors;
+ std::vector<lnav::console::user_message> errors, errors_ignored;
std::string option = args[1];
lnav_config = rollback_lnav_config;
ypc.set_path(option)
.with_obj(lnav_config)
.with_error_reporter([&errors](const auto& ypc, auto msg) {
- errors.push_back(msg);
+ if (msg.um_level == lnav::console::user_message::level::error) {
+ errors.push_back(msg);
+ }
});
ypc.ypc_active_paths.insert(option);
ypc.update_callbacks();
@@ -4331,10 +5336,14 @@ com_config(exec_context& ec,
if (ec.ec_dry_run) {
attr_line_t al(old_value);
- lnav_data.ld_preview_source.replace_with(al)
+ lnav_data.ld_preview_view[0].set_sub_source(
+ &lnav_data.ld_preview_source[0]);
+ lnav_data.ld_preview_source[0]
+ .replace_with(al)
.set_text_format(detect_text_format(old_value))
.truncate_to(10);
- lnav_data.ld_preview_status_source.get_description()
+ lnav_data.ld_preview_status_source[0]
+ .get_description()
.set_value("Value of option: %s", option.c_str());
char help_text[1024];
@@ -4401,8 +5410,18 @@ com_config(exec_context& ec,
return ec.make_error("unhandled type");
}
+ while (!errors.empty()) {
+ if (errors.back().um_level
+ == lnav::console::user_message::level::error)
+ {
+ break;
+ } else {
+ errors.pop_back();
+ }
+ }
+
if (!errors.empty()) {
- return Err(errors[0]);
+ return Err(errors.back());
}
if (changed) {
@@ -4412,10 +5431,20 @@ com_config(exec_context& ec,
= ec.ec_source.back().s_location;
reload_config(errors);
+ while (!errors.empty()) {
+ if (errors.back().um_level
+ == lnav::console::user_message::level::error)
+ {
+ break;
+ } else {
+ errors.pop_back();
+ }
+ }
+
if (!errors.empty()) {
lnav_config = rollback_lnav_config;
- reload_config(errors);
- return Err(errors[0]);
+ reload_config(errors_ignored);
+ return Err(errors.back());
}
if (!ec.ec_dry_run) {
retval = "info: changed config option -- " + option;
@@ -4531,6 +5560,7 @@ com_spectrogram(exec_context& ec,
}
if (found) {
+ lnav_data.ld_views[LNV_SPECTRO].reload_data();
ss.text_selection_changed(lnav_data.ld_views[LNV_SPECTRO]);
ensure_view(&lnav_data.ld_views[LNV_SPECTRO]);
@@ -4559,6 +5589,12 @@ com_quit(exec_context& ec, std::string cmdline, std::vector<std::string>& args)
}
static void
+breadcrumb_prompt(std::vector<std::string>& args)
+{
+ set_view_mode(ln_mode_t::BREADCRUMBS);
+}
+
+static void
command_prompt(std::vector<std::string>& args)
{
auto* tc = *lnav_data.ld_view_stack.top();
@@ -4658,6 +5694,9 @@ command_prompt(std::vector<std::string>& args)
rollback_lnav_config = lnav_config;
lnav_data.ld_doc_status_source.set_title("Command Help");
+ lnav_data.ld_doc_status_source.set_description(
+ " See " ANSI_BOLD("https://docs.lnav.org/en/latest/"
+ "commands.html") " for more details");
add_view_text_possibilities(lnav_data.ld_rl_view,
ln_mode_t::COMMAND,
"filter",
@@ -4672,6 +5711,7 @@ command_prompt(std::vector<std::string>& args)
add_tag_possibilities();
add_file_possibilities();
add_recent_netlocs_possibilities();
+ add_tz_possibilities(ln_mode_t::COMMAND);
auto* ta = dynamic_cast<text_anchors*>(tc->get_sub_source());
if (ta != nullptr) {
@@ -4687,6 +5727,8 @@ command_prompt(std::vector<std::string>& args)
lnav_data.ld_rl_view->focus(ln_mode_t::COMMAND,
cget(args, 2).value_or(":"),
cget(args, 3).value_or(""));
+
+ rl_set_help();
}
static void
@@ -4727,6 +5769,7 @@ search_prompt(std::vector<std::string>& args)
cget(args, 2).value_or("/"),
cget(args, 3).value_or(""));
lnav_data.ld_doc_status_source.set_title("Syntax Help");
+ lnav_data.ld_doc_status_source.set_description("");
rl_set_help();
lnav_data.ld_bottom_source.set_prompt(
"Search for: "
@@ -4760,7 +5803,7 @@ search_files_prompt(std::vector<std::string>& args)
lnav_data.ld_mode = ln_mode_t::SEARCH_FILES;
for (const auto& lf : lnav_data.ld_active_files.fc_files) {
- auto path = lnav::pcre2pp::quote(lf->get_unique_path());
+ auto path = lnav::pcre2pp::quote(lf->get_unique_path().string());
lnav_data.ld_rl_view->add_possibility(
ln_mode_t::SEARCH_FILES, "*", path);
}
@@ -4794,8 +5837,8 @@ search_spectro_details_prompt(std::vector<std::string>& args)
static void
sql_prompt(std::vector<std::string>& args)
{
- textview_curses* tc = *lnav_data.ld_view_stack.top();
- textview_curses& log_view = lnav_data.ld_views[LNV_LOG];
+ auto* tc = *lnav_data.ld_view_stack.top();
+ auto& log_view = lnav_data.ld_views[LNV_LOG];
lnav_data.ld_exec_context.ec_top_line = tc->get_selection();
@@ -4806,6 +5849,9 @@ sql_prompt(std::vector<std::string>& args)
cget(args, 3).value_or(""));
lnav_data.ld_doc_status_source.set_title("Query Help");
+ lnav_data.ld_doc_status_source.set_description(
+ "See " ANSI_BOLD("https://docs.lnav.org/en/latest/"
+ "sqlext.html") " for more details");
rl_set_help();
lnav_data.ld_bottom_source.update_loading(0, 0);
lnav_data.ld_status[LNS_BOTTOM].do_update();
@@ -4816,6 +5862,8 @@ sql_prompt(std::vector<std::string>& args)
tc->reload_data();
lnav_data.ld_bottom_source.set_prompt(
"Enter an SQL query: (Press " ANSI_BOLD("CTRL+]") " to abort)");
+
+ add_sqlite_possibilities();
}
static void
@@ -4841,6 +5889,7 @@ com_prompt(exec_context& ec,
{
static std::map<std::string, std::function<void(std::vector<std::string>&)>>
PROMPT_TYPES = {
+ {"breadcrumb", breadcrumb_prompt},
{"command", command_prompt},
{"script", script_prompt},
{"search", search_prompt},
@@ -4853,25 +5902,40 @@ com_prompt(exec_context& ec,
if (args.empty()) {
} else if (!ec.ec_dry_run) {
- args.clear();
+ static const intern_string_t SRC = intern_string::lookup("flags");
auto lexer = shlex(cmdline);
- lexer.split(args, ec.create_resolver());
+ auto split_args_res = lexer.split(ec.create_resolver());
+ if (split_args_res.isErr()) {
+ auto split_err = split_args_res.unwrapErr();
+ auto um
+ = lnav::console::user_message::error("unable to parse prompt")
+ .with_reason(split_err.te_msg)
+ .with_snippet(lnav::console::snippet::from(
+ SRC, lexer.to_attr_line(split_err)));
+
+ return Err(um);
+ }
- auto alt_flag = std::find(args.begin(), args.end(), "--alt");
+ auto split_args = split_args_res.unwrap()
+ | lnav::itertools::map(
+ [](const auto& elem) { return elem.se_value; });
+
+ auto alt_flag
+ = std::find(split_args.begin(), split_args.end(), "--alt");
auto is_alt = false;
- if (alt_flag != args.end()) {
- args.erase(alt_flag);
+ if (alt_flag != split_args.end()) {
+ split_args.erase(alt_flag);
is_alt = true;
}
- auto prompter = PROMPT_TYPES.find(args[1]);
+ auto prompter = PROMPT_TYPES.find(split_args[1]);
if (prompter == PROMPT_TYPES.end()) {
- return ec.make_error("Unknown prompt type: {}", args[1]);
+ return ec.make_error("Unknown prompt type: {}", split_args[1]);
}
- prompter->second(args);
+ prompter->second(split_args);
lnav_data.ld_rl_view->set_alt_focus(is_alt);
}
return Ok(std::string());
@@ -4883,16 +5947,22 @@ readline_context::command_t STD_COMMANDS[] = {
help_text(":prompt")
.with_summary("Open the given prompt")
- .with_parameter(
- {"type",
- "The type of prompt -- command, script, search, sql, user"})
- .with_parameter(
- help_text(
- "--alt",
- "Perform the alternate action for this prompt by default")
- .optional())
- .with_parameter(
- help_text("prompt", "The prompt to display").optional())
+ .with_parameter({"type",
+ "The type of prompt -- command, script, "
+ "search, sql, user"})
+ .with_parameter(help_text("--alt",
+ "Perform the alternate action "
+ "for this prompt by default")
+ .optional())
+ .with_parameter(help_text("prompt", "The prompt to display")
+ .with_enum_values({
+ "breadcrumb",
+ "command",
+ "script",
+ "search",
+ "sql",
+ })
+ .optional())
.with_parameter(
help_text("initial-value",
"The initial value to fill in for the prompt")
@@ -4928,6 +5998,44 @@ readline_context::command_t STD_COMMANDS[] = {
.with_parameter(help_text("seconds", "The epoch timestamp to convert")
.with_format(help_parameter_format_t::HPF_INTEGER))
.with_example({"To convert the epoch time 1490191111", "1490191111"})},
+ {
+ "convert-time-to",
+ com_convert_time_to,
+ help_text(":convert-time-to")
+ .with_summary("Convert the focused timestamp to the "
+ "given timezone")
+ .with_parameter(help_text("zone", "The timezone name")),
+ },
+ {
+ "set-file-timezone",
+ com_set_file_timezone,
+ help_text(":set-file-timezone")
+ .with_summary("Set the timezone to use for log messages that do "
+ "not include a timezone. The timezone is applied "
+ "to "
+ "the focused file or the given glob pattern.")
+ .with_parameter({"zone", "The timezone name"})
+ .with_parameter(help_text{"pattern",
+ "The glob pattern to match against "
+ "files that should use this timezone"}
+ .optional())
+ .with_tags({"file-options"}),
+ com_set_file_timezone_prompt,
+ },
+ {
+ "clear-file-timezone",
+ com_clear_file_timezone,
+ help_text(":clear-file-timezone")
+ .with_summary("Clear the timezone setting for the "
+ "focused file or "
+ "the given glob pattern.")
+ .with_parameter(help_text{"pattern",
+ "The glob pattern to match against files "
+ "that should "
+ "no longer use this timezone"})
+ .with_tags({"file-options"}),
+ com_clear_file_timezone_prompt,
+ },
{"current-time",
com_current_time,
@@ -4946,7 +6054,8 @@ readline_context::command_t STD_COMMANDS[] = {
.with_examples(
{{"To go to line 22", "22"},
{"To go to the line 75% of the way into the view", "75%"},
- {"To go to the first message on the first day of 2017",
+ {"To go to the first message on the first day of "
+ "2017",
"2017-01-01"},
{"To go to the Screenshots section", "#screenshots"}})
.with_tags({"navigation"})},
@@ -4961,12 +6070,23 @@ readline_context::command_t STD_COMMANDS[] = {
{"To move 10 percent back in the view", "-10%"},
})
.with_tags({"navigation"})},
+
+ {
+ "annotate",
+ com_annotate,
+
+ help_text(":annotate")
+ .with_summary("Analyze the focused log message and "
+ "attach annotations")
+ .with_tags({"metadata"}),
+ },
+
{"mark",
com_mark,
help_text(":mark")
- .with_summary(
- "Toggle the bookmark state for the top line in the current view")
+ .with_summary("Toggle the bookmark state for the top line in the "
+ "current view")
.with_tags({"bookmarks"})},
{
"mark-expr",
@@ -4974,16 +6094,18 @@ readline_context::command_t STD_COMMANDS[] = {
help_text(":mark-expr")
.with_summary("Set the bookmark expression")
- .with_parameter(help_text(
- "expr",
- "The SQL expression to evaluate for each log message. "
- "The message values can be accessed using column names "
- "prefixed with a colon"))
+ .with_parameter(help_text("expr",
+ "The SQL expression to evaluate for each "
+ "log message. "
+ "The message values can be accessed "
+ "using column names "
+ "prefixed with a colon"))
.with_opposites({"clear-mark-expr"})
.with_tags({"bookmarks"})
- .with_example(
- {"To mark lines from 'dhclient' that mention 'eth0'",
- ":log_procname = 'dhclient' AND :log_body LIKE '%eth0%'"}),
+ .with_example({"To mark lines from 'dhclient' that "
+ "mention 'eth0'",
+ ":log_procname = 'dhclient' AND "
+ ":log_body LIKE '%eth0%'"}),
com_mark_expr_prompt,
},
@@ -4998,8 +6120,8 @@ readline_context::command_t STD_COMMANDS[] = {
com_goto_mark,
help_text(":next-mark")
- .with_summary(
- "Move to the next bookmark of the given type in the current view")
+ .with_summary("Move to the next bookmark of the given type in the "
+ "current view")
.with_parameter(help_text("type",
"The type of bookmark -- error, warning, "
"search, user, file, meta")
@@ -5010,7 +6132,8 @@ readline_context::command_t STD_COMMANDS[] = {
com_goto_mark,
help_text(":prev-mark")
- .with_summary("Move to the previous bookmark of the given type in the "
+ .with_summary("Move to the previous bookmark of the given "
+ "type in the "
"current view")
.with_parameter(help_text("type",
"The type of bookmark -- error, warning, "
@@ -5028,8 +6151,27 @@ readline_context::command_t STD_COMMANDS[] = {
com_goto_location,
help_text(":prev-location")
- .with_summary("Move to the previous position in the location history")
+ .with_summary("Move to the previous position in the "
+ "location history")
.with_tags({"navigation"})},
+
+ {
+ "next-section",
+ com_next_section,
+
+ help_text(":next-section")
+ .with_summary("Move to the next section in the document")
+ .with_tags({"navigation"}),
+ },
+ {
+ "prev-section",
+ com_prev_section,
+
+ help_text(":prev-section")
+ .with_summary("Move to the previous section in the document")
+ .with_tags({"navigation"}),
+ },
+
{"help",
com_help,
@@ -5038,21 +6180,23 @@ readline_context::command_t STD_COMMANDS[] = {
com_toggle_field,
help_text(":hide-fields")
- .with_summary(
- "Hide log message fields by replacing them with an ellipsis")
+ .with_summary("Hide log message fields by replacing them "
+ "with an ellipsis")
.with_parameter(
help_text("field-name",
- "The name of the field to hide in the format for the "
+ "The name of the field to hide in the format for "
+ "the "
"top log line. "
- "A qualified name can be used where the field name is "
+ "A qualified name can be used where the field "
+ "name is "
"prefixed "
"by the format name and a dot to hide any field.")
.one_or_more())
.with_example(
{"To hide the log_procname fields in all formats", "log_procname"})
- .with_example(
- {"To hide only the log_procname field in the syslog format",
- "syslog_log.log_procname"})
+ .with_example({"To hide only the log_procname field in "
+ "the syslog format",
+ "syslog_log.log_procname"})
.with_tags({"display"})},
{"show-fields",
com_toggle_field,
@@ -5092,8 +6236,8 @@ readline_context::command_t STD_COMMANDS[] = {
com_show_lines,
help_text(":show-lines-before-and-after")
- .with_summary(
- "Show lines that were hidden by the 'hide-lines' commands")
+ .with_summary("Show lines that were hidden by the "
+ "'hide-lines' commands")
.with_opposites({"hide-lines-before", "hide-lines-after"})
.with_tags({"filtering"})},
{"hide-unmarked-lines",
@@ -5113,7 +6257,8 @@ readline_context::command_t STD_COMMANDS[] = {
com_highlight,
help_text(":highlight")
- .with_summary("Add coloring to log messages fragments that match the "
+ .with_summary("Add coloring to log messages fragments "
+ "that match the "
"given regular expression")
.with_parameter(
help_text("pattern", "The regular expression to match"))
@@ -5125,37 +6270,45 @@ readline_context::command_t STD_COMMANDS[] = {
help_text(":clear-highlight")
.with_summary("Remove a previously set highlight regular expression")
- .with_parameter(help_text(
- "pattern",
- "The regular expression previously used with :highlight"))
+ .with_parameter(help_text("pattern",
+ "The regular expression previously used "
+ "with :highlight"))
.with_tags({"display"})
.with_opposites({"highlight"})
.with_example(
{"To clear the highlight with the pattern 'foobar'", "foobar"})},
- {"filter-in",
- com_filter,
+ {
+ "filter-in",
+ com_filter,
- help_text(":filter-in")
- .with_summary("Only show lines that match the given regular "
- "expression in the current view")
- .with_parameter(
- help_text("pattern", "The regular expression to match"))
- .with_tags({"filtering"})
- .with_example({"To filter out log messages that do not have the "
- "string 'dhclient'",
- "dhclient"})},
- {"filter-out",
- com_filter,
-
- help_text(":filter-out")
- .with_summary("Remove lines that match the given regular expression "
- "in the current view")
- .with_parameter(
- help_text("pattern", "The regular expression to match"))
- .with_tags({"filtering"})
- .with_example({"To filter out log messages that contain the string "
- "'last message repeated'",
- "last message repeated"})},
+ help_text(":filter-in")
+ .with_summary("Only show lines that match the given regular "
+ "expression in the current view")
+ .with_parameter(
+ help_text("pattern", "The regular expression to match"))
+ .with_tags({"filtering"})
+ .with_example({"To filter out log messages that do not have the "
+ "string 'dhclient'",
+ "dhclient"}),
+ com_filter_prompt,
+ },
+ {
+ "filter-out",
+ com_filter,
+
+ help_text(":filter-out")
+ .with_summary("Remove lines that match the given "
+ "regular expression "
+ "in the current view")
+ .with_parameter(
+ help_text("pattern", "The regular expression to match"))
+ .with_tags({"filtering"})
+ .with_example({"To filter out log messages that "
+ "contain the string "
+ "'last message repeated'",
+ "last message repeated"}),
+ com_filter_prompt,
+ },
{"delete-filter",
com_delete_filter,
@@ -5166,29 +6319,34 @@ readline_context::command_t STD_COMMANDS[] = {
help_text("pattern", "The regular expression to match"))
.with_opposites({"filter-in", "filter-out"})
.with_tags({"filtering"})
- .with_example(
- {"To delete the filter with the pattern 'last message repeated'",
- "last message repeated"})},
+ .with_example({"To delete the filter with the pattern 'last "
+ "message repeated'",
+ "last message repeated"})},
{
"filter-expr",
com_filter_expr,
help_text(":filter-expr")
.with_summary("Set the filter expression")
- .with_parameter(help_text(
- "expr",
- "The SQL expression to evaluate for each log message. "
- "The message values can be accessed using column names "
- "prefixed with a colon"))
+ .with_parameter(help_text("expr",
+ "The SQL expression to evaluate for each "
+ "log message. "
+ "The message values can be accessed "
+ "using column names "
+ "prefixed with a colon"))
.with_opposites({"clear-filter-expr"})
.with_tags({"filtering"})
.with_example({"To set a filter expression that matched syslog "
"messages from 'syslogd'",
":log_procname = 'syslogd'"})
- .with_example(
- {"To set a filter expression that matches log messages where "
- "'id' is followed by a number and contains the string 'foo'",
- ":log_body REGEXP 'id\\d+' AND :log_body REGEXP 'foo'"}),
+ .with_example({"To set a filter expression that "
+ "matches log messages "
+ "where "
+ "'id' is followed by a number and "
+ "contains the string "
+ "'foo'",
+ ":log_body REGEXP 'id\\d+' AND "
+ ":log_body REGEXP 'foo'"}),
com_filter_expr_prompt,
},
@@ -5203,26 +6361,27 @@ readline_context::command_t STD_COMMANDS[] = {
com_save_to,
help_text(":append-to")
- .with_summary(
- "Append marked lines in the current view to the given file")
+ .with_summary("Append marked lines in the current view to "
+ "the given file")
.with_parameter(help_text("path", "The path to the file to append to"))
.with_tags({"io"})
- .with_example(
- {"To append marked lines to the file /tmp/interesting-lines.txt",
- "/tmp/interesting-lines.txt"})},
+ .with_example({"To append marked lines to the file "
+ "/tmp/interesting-lines.txt",
+ "/tmp/interesting-lines.txt"})},
{"write-to",
com_save_to,
help_text(":write-to")
- .with_summary("Overwrite the given file with any marked lines in the "
+ .with_summary("Overwrite the given file with any marked "
+ "lines in the "
"current view")
.with_parameter(
help_text("--anonymize", "Anonymize the lines").optional())
.with_parameter(help_text("path", "The path to the file to write"))
.with_tags({"io", "scripting"})
- .with_example(
- {"To write marked lines to the file /tmp/interesting-lines.txt",
- "/tmp/interesting-lines.txt"})},
+ .with_example({"To write marked lines to the file "
+ "/tmp/interesting-lines.txt",
+ "/tmp/interesting-lines.txt"})},
{"write-csv-to",
com_save_to,
@@ -5249,20 +6408,21 @@ readline_context::command_t STD_COMMANDS[] = {
com_save_to,
help_text(":write-jsonlines-to")
- .with_summary(
- "Write SQL results to the given file in JSON Lines format")
+ .with_summary("Write SQL results to the given file in "
+ "JSON Lines format")
.with_parameter(
help_text("--anonymize", "Anonymize the JSON values").optional())
.with_parameter(help_text("path", "The path to the file to write"))
.with_tags({"io", "scripting", "sql"})
- .with_example({"To write SQL results as JSON Lines to /tmp/table.json",
+ .with_example({"To write SQL results as JSON Lines to "
+ "/tmp/table.json",
"/tmp/table.json"})},
{"write-table-to",
com_save_to,
help_text(":write-table-to")
- .with_summary(
- "Write SQL results to the given file in a tabular format")
+ .with_summary("Write SQL results to the given file in a "
+ "tabular format")
.with_parameter(
help_text("--anonymize", "Anonymize the table contents")
.optional())
@@ -5274,10 +6434,10 @@ readline_context::command_t STD_COMMANDS[] = {
com_save_to,
help_text(":write-raw-to")
- .with_summary(
- "In the log view, write the original log file content "
- "of the marked messages to the file. In the DB view, "
- "the contents of the cells are written to the output file.")
+ .with_summary("In the log view, write the original log file content "
+ "of the marked messages to the file. In the DB view, "
+ "the contents of the cells are written to the output "
+ "file.")
.with_parameter(help_text("--view={log,db}",
"The view to use as the source of data")
.optional())
@@ -5285,9 +6445,9 @@ readline_context::command_t STD_COMMANDS[] = {
help_text("--anonymize", "Anonymize the lines").optional())
.with_parameter(help_text("path", "The path to the file to write"))
.with_tags({"io", "scripting", "sql"})
- .with_example(
- {"To write the marked lines in the log view to /tmp/table.txt",
- "/tmp/table.txt"})},
+ .with_example({"To write the marked lines in the log view "
+ "to /tmp/table.txt",
+ "/tmp/table.txt"})},
{"write-view-to",
com_save_to,
@@ -5326,7 +6486,10 @@ readline_context::command_t STD_COMMANDS[] = {
com_pipe_to,
help_text(":pipe-line-to")
- .with_summary("Pipe the top line to the given shell command")
+ .with_summary("Pipe the focused line to the given shell "
+ "command. Any fields "
+ "defined by the format will be set as "
+ "environment variables.")
.with_parameter(
help_text("shell-cmd", "The shell command-line to execute"))
.with_tags({"io"})
@@ -5338,12 +6501,11 @@ readline_context::command_t STD_COMMANDS[] = {
help_text(":redirect-to")
.with_summary("Redirect the output of commands that write to "
"stdout to the given file")
- .with_parameter(
- help_text(
- "path",
- "The path to the file to write."
- " If not specified, the current redirect will be cleared")
- .optional())
+ .with_parameter(help_text("path",
+ "The path to the file to write."
+ " If not specified, the current redirect "
+ "will be cleared")
+ .optional())
.with_tags({"io", "scripting"})
.with_example({"To write the output of lnav commands to the file "
"/tmp/script-output.txt",
@@ -5357,7 +6519,8 @@ readline_context::command_t STD_COMMANDS[] = {
"pattern", "The regular expression used in the filter command"))
.with_tags({"filtering"})
.with_opposites({"disable-filter"})
- .with_example({"To enable the disabled filter with the pattern 'last "
+ .with_example({"To enable the disabled filter with the "
+ "pattern 'last "
"message repeated'",
"last message repeated"})},
{"disable-filter",
@@ -5369,9 +6532,9 @@ readline_context::command_t STD_COMMANDS[] = {
"pattern", "The regular expression used in the filter command"))
.with_tags({"filtering"})
.with_opposites({"filter-out", "filter-in"})
- .with_example(
- {"To disable the filter with the pattern 'last message repeated'",
- "last message repeated"})},
+ .with_example({"To disable the filter with the pattern 'last "
+ "message repeated'",
+ "last message repeated"})},
{"enable-word-wrap",
com_enable_word_wrap,
@@ -5389,13 +6552,14 @@ readline_context::command_t STD_COMMANDS[] = {
com_create_logline_table,
help_text(":create-logline-table")
- .with_summary("Create an SQL table using the top line of the log view "
+ .with_summary("Create an SQL table using the top line of "
+ "the log view "
"as a template")
.with_parameter(help_text("table-name", "The name for the new table"))
.with_tags({"vtables", "sql"})
- .with_example(
- {"To create a logline-style table named 'task_durations'",
- "task_durations"})},
+ .with_example({"To create a logline-style table named "
+ "'task_durations'",
+ "task_durations"})},
{"delete-logline-table",
com_delete_logline_table,
@@ -5405,9 +6569,9 @@ readline_context::command_t STD_COMMANDS[] = {
help_text("table-name", "The name of the table to delete"))
.with_opposites({"delete-logline-table"})
.with_tags({"vtables", "sql"})
- .with_example(
- {"To delete the logline-style table named 'task_durations'",
- "task_durations"})},
+ .with_example({"To delete the logline-style table named "
+ "'task_durations'",
+ "task_durations"})},
{"create-search-table",
com_create_search_table,
@@ -5416,16 +6580,18 @@ readline_context::command_t STD_COMMANDS[] = {
.with_parameter(
help_text("table-name", "The name of the table to create"))
.with_parameter(
- help_text(
- "pattern",
- "The regular expression used to capture the table columns. "
- "If not given, the current search pattern is used.")
+ help_text("pattern",
+ "The regular expression used to capture the table "
+ "columns. "
+ "If not given, the current search pattern is "
+ "used.")
.optional())
.with_tags({"vtables", "sql"})
- .with_example(
- {"To create a table named 'task_durations' that matches log "
- "messages with the pattern 'duration=(?<duration>\\d+)'",
- R"(task_durations duration=(?<duration>\d+))"})},
+ .with_example({"To create a table named 'task_durations' that "
+ "matches log "
+ "messages with the pattern "
+ "'duration=(?<duration>\\d+)'",
+ R"(task_durations duration=(?<duration>\d+))"})},
{"delete-search-table",
com_delete_search_table,
@@ -5441,10 +6607,10 @@ readline_context::command_t STD_COMMANDS[] = {
com_open,
help_text(":open")
- .with_summary(
- "Open the given file(s) in lnav. Opening files on machines "
- "accessible via SSH can be done using the syntax: "
- "[user@]host:/path/to/logs")
+ .with_summary("Open the given file(s) in lnav. Opening files on "
+ "machines "
+ "accessible via SSH can be done using the syntax: "
+ "[user@]host:/path/to/logs")
.with_parameter(
help_text{"path", "The path to the file to open"}.one_or_more())
.with_example({"To open the file '/path/to/file'", "/path/to/file"})
@@ -5457,8 +6623,9 @@ readline_context::command_t STD_COMMANDS[] = {
.with_summary("Hide the given file(s) and skip indexing until it "
"is shown again. If no path is given, the current "
"file in the view is hidden")
- .with_parameter(help_text{
- "path", "A path or glob pattern that specifies the files to hide"}
+ .with_parameter(help_text{"path",
+ "A path or glob pattern that "
+ "specifies the files to hide"}
.zero_or_more())
.with_opposites({"show-file"})},
{"show-file",
@@ -5466,9 +6633,9 @@ readline_context::command_t STD_COMMANDS[] = {
help_text(":show-file")
.with_summary("Show the given file(s) and resume indexing.")
- .with_parameter(help_text{
- "path",
- "The path or glob pattern that specifies the files to show"}
+ .with_parameter(help_text{"path",
+ "The path or glob pattern that "
+ "specifies the files to show"}
.zero_or_more())
.with_opposites({"hide-file"})},
{"show-only-this-file",
@@ -5481,18 +6648,24 @@ readline_context::command_t STD_COMMANDS[] = {
com_close,
help_text(":close")
- .with_summary("Close the top file in the view")
+ .with_summary("Close the given file(s) or the top file in the view")
+ .with_parameter(help_text{"path",
+ "A path or glob pattern that "
+ "specifies the files to close"}
+ .zero_or_more())
.with_opposites({"open"})},
{
"comment",
com_comment,
help_text(":comment")
- .with_summary(
- "Attach a comment to the top log line. The comment will be "
- "displayed right below the log message it is associated with. "
- "The comment can be formatted using markdown and you can add "
- "new-lines with '\\n'.")
+ .with_summary("Attach a comment to the top log line. The "
+ "comment will be "
+ "displayed right below the log message it is "
+ "associated with. "
+ "The comment can be formatted using markdown and "
+ "you can add "
+ "new-lines with '\\n'.")
.with_parameter(help_text("text", "The comment text"))
.with_example({"To add the comment 'This is where it all went "
"wrong' to the top line",
@@ -5527,7 +6700,8 @@ readline_context::command_t STD_COMMANDS[] = {
help_text(":untag")
.with_summary("Detach tags from the top log line")
.with_parameter(help_text("tag", "The tags to detach").one_or_more())
- .with_example({"To remove the tags '#BUG123' and '#needs-review' from "
+ .with_example({"To remove the tags '#BUG123' and "
+ "'#needs-review' from "
"the top line",
"#BUG123 #needs-review"})
.with_opposites({"tag"})
@@ -5538,7 +6712,8 @@ readline_context::command_t STD_COMMANDS[] = {
help_text(":delete-tags")
.with_summary("Remove the given tags from all log lines")
.with_parameter(help_text("tag", "The tags to delete").one_or_more())
- .with_example({"To remove the tags '#BUG123' and '#needs-review' from "
+ .with_example({"To remove the tags '#BUG123' and "
+ "'#needs-review' from "
"all log lines",
"#BUG123 #needs-review"})
.with_opposites({"tag"})
@@ -5563,23 +6738,24 @@ readline_context::command_t STD_COMMANDS[] = {
com_session,
help_text(":session")
- .with_summary(
- "Add the given command to the session file (~/.lnav/session)")
+ .with_summary("Add the given command to the session file "
+ "(~/.lnav/session)")
.with_parameter(help_text("lnav-command", "The lnav command to save."))
- .with_example(
- {"To add the command ':highlight foobar' to the session file",
- ":highlight foobar"})},
+ .with_example({"To add the command ':highlight foobar' to "
+ "the session file",
+ ":highlight foobar"})},
{"summarize",
com_summarize,
help_text(":summarize")
- .with_summary("Execute a SQL query that computes the characteristics "
+ .with_summary("Execute a SQL query that computes the "
+ "characteristics "
"of the values in the given column")
.with_parameter(
help_text("column-name", "The name of the column to analyze."))
- .with_example(
- {"To get a summary of the sc_bytes column in the access_log table",
- "sc_bytes"})},
+ .with_example({"To get a summary of the sc_bytes column in the "
+ "access_log table",
+ "sc_bytes"})},
{"switch-to-view",
com_switch_to_view,
@@ -5592,12 +6768,13 @@ readline_context::command_t STD_COMMANDS[] = {
com_switch_to_view,
help_text(":toggle-view")
- .with_summary(
- "Switch to the given view or, if it is already displayed, "
- "switch to the previous view")
+ .with_summary("Switch to the given view or, if it is "
+ "already displayed, "
+ "switch to the previous view")
.with_parameter(help_text(
"view-name", "The name of the view to toggle the display of."))
- .with_example({"To switch to the 'schema' view if it is not displayed "
+ .with_example({"To switch to the 'schema' view if it is "
+ "not displayed "
"or switch back to the previous view",
"schema"})},
{"toggle-filtering",
@@ -5658,15 +6835,17 @@ readline_context::command_t STD_COMMANDS[] = {
com_echo,
help_text(":echo")
- .with_summary(
- "Echo the given message to the screen or, if :redirect-to has "
- "been called, to output file specified in the redirect. "
- "Variable substitution is performed on the message. Use a "
- "backslash to escape any special characters, like '$'")
- .with_parameter(
- help_text("-n",
- "Do not print a line-feed at the end of the output")
- .optional())
+ .with_summary("Echo the given message to the screen or, if "
+ ":redirect-to has "
+ "been called, to output file specified in the "
+ "redirect. "
+ "Variable substitution is performed on the message. "
+ "Use a "
+ "backslash to escape any special characters, like '$'")
+ .with_parameter(help_text("-n",
+ "Do not print a line-feed at "
+ "the end of the output")
+ .optional())
.with_parameter(help_text("msg", "The message to display"))
.with_tags({"io", "scripting"})
.with_example({"To output 'Hello, World!'", "Hello, World!"})},
@@ -5691,6 +6870,31 @@ readline_context::command_t STD_COMMANDS[] = {
.with_tags({"scripting"})
.with_examples({{"To substitute the table name from a variable",
";SELECT * FROM ${table}"}})},
+
+ {
+ "sh",
+ com_sh,
+
+ help_text(":sh")
+ .with_summary("Execute the given command-line and display the "
+ "captured output")
+ .with_parameter(help_text(
+ "--name=<name>", "The name to give to the captured output"))
+ .with_parameter(
+ help_text("cmdline", "The command-line to execute."))
+ .with_tags({"scripting"}),
+ },
+
+ {
+ "cd",
+ com_cd,
+
+ help_text(":cd")
+ .with_summary("Change the current directory")
+ .with_parameter(help_text("dir", "The new current directory"))
+ .with_tags({"scripting"}),
+ },
+
{"config",
com_config,
@@ -5701,9 +6905,9 @@ readline_context::command_t STD_COMMANDS[] = {
"The value to write. If not given, the "
"current value is returned")
.optional())
- .with_example(
- {"To read the configuration of the '/ui/clock-format' option",
- "/ui/clock-format"})
+ .with_example({"To read the configuration of the "
+ "'/ui/clock-format' option",
+ "/ui/clock-format"})
.with_example({"To set the '/ui/dim-text' option to 'false'",
"/ui/dim-text false"})
.with_tags({"configuration"})},
@@ -5725,9 +6929,9 @@ readline_context::command_t STD_COMMANDS[] = {
"using a spectrogram")
.with_parameter(help_text(
"field-name", "The name of the numeric field to visualize."))
- .with_example(
- {"To visualize the sc_bytes field in the access_log format",
- "sc_bytes"})},
+ .with_example({"To visualize the sc_bytes field in the "
+ "access_log format",
+ "sc_bytes"})},
{"quit",
com_quit,
diff --git a/src/lnav_config.cc b/src/lnav_config.cc
index e706f75..e8f91d3 100644
--- a/src/lnav_config.cc
+++ b/src/lnav_config.cc
@@ -56,8 +56,10 @@
#include "base/paths.hh"
#include "base/string_util.hh"
#include "bin2c.hh"
+#include "command_executor.hh"
#include "config.h"
#include "default-config.h"
+#include "scn/scn.h"
#include "styling.hh"
#include "view_curses.hh"
#include "yajlpp/yajlpp.hh"
@@ -81,21 +83,33 @@ lnav_config_listener* lnav_config_listener::LISTENER_LIST;
static auto a = injector::bind<archive_manager::config>::to_instance(
+[]() { return &lnav_config.lc_archive_manager; });
+static auto dtc = injector::bind<date_time_scanner_ns::config>::to_instance(
+ +[]() { return &lnav_config.lc_log_date_time; });
+
static auto fvc = injector::bind<file_vtab::config>::to_instance(
+[]() { return &lnav_config.lc_file_vtab; });
static auto lc = injector::bind<lnav::logfile::config>::to_instance(
+[]() { return &lnav_config.lc_logfile; });
+static auto p = injector::bind<lnav::piper::config>::to_instance(
+ +[]() { return &lnav_config.lc_piper; });
+
static auto tc = injector::bind<tailer::config>::to_instance(
+[]() { return &lnav_config.lc_tailer; });
static auto scc = injector::bind<sysclip::config>::to_instance(
+[]() { return &lnav_config.lc_sysclip; });
+static auto uh = injector::bind<lnav::url_handler::config>::to_instance(
+ +[]() { return &lnav_config.lc_url_handlers; });
+
static auto lsc = injector::bind<logfile_sub_source_ns::config>::to_instance(
+[]() { return &lnav_config.lc_log_source; });
+static auto annoc = injector::bind<lnav::log::annotate::config>::to_instance(
+ +[]() { return &lnav_config.lc_log_annotations; });
+
static auto tssc = injector::bind<top_status_source_cfg>::to_instance(
+[]() { return &lnav_config.lc_top_status_cfg; });
@@ -134,7 +148,11 @@ ensure_dotlnav()
for (const auto* sub_path : subdirs) {
auto full_path = path / sub_path;
- log_perror(mkdir(full_path.c_str(), 0755));
+ if (mkdir(full_path.c_str(), 0755) == -1 && errno != EEXIST) {
+ log_error("unable to make directory: %s -- %s",
+ full_path.c_str(),
+ strerror(errno));
+ }
}
auto crash_dir_path = path / "crash";
@@ -240,19 +258,23 @@ install_from_git(const std::string& repo)
}
auto finished_child = std::move(git_cmd).wait_for_child();
-
if (!finished_child.was_normal_exit() || finished_child.exit_status() != 0)
{
return false;
}
+ if (ghc::filesystem::is_directory(local_formats_path)
+ || ghc::filesystem::is_directory(local_configs_path))
+ {
+ return false;
+ }
if (!ghc::filesystem::is_directory(local_staging_path)) {
auto um
= lnav::console::user_message::error(
attr_line_t("failed to install git repo: ")
.append(lnav::roles::file(repo)))
.with_reason(
- attr_line_t("git failed to create the local directory")
+ attr_line_t("git failed to create the local directory ")
.append(
lnav::roles::file(local_staging_path.string())));
lnav::console::print(stderr, um);
@@ -362,13 +384,11 @@ update_installs_from_git()
git_dir.string());
int ret = system(pull_cmd.c_str());
if (ret == -1) {
- std::cerr << "Failed to spawn command "
- << "\"" << pull_cmd << "\": " << strerror(errno)
- << std::endl;
+ std::cerr << "Failed to spawn command " << "\"" << pull_cmd
+ << "\": " << strerror(errno) << std::endl;
retval = false;
} else if (ret > 0) {
- std::cerr << "Command "
- << "\"" << pull_cmd
+ std::cerr << "Command " << "\"" << pull_cmd
<< "\" failed: " << strerror(errno) << std::endl;
retval = false;
}
@@ -379,7 +399,7 @@ update_installs_from_git()
if (!found) {
printf(
"No formats from git repositories found, "
- "use 'lnav -i extra' to install third-party foramts\n");
+ "use 'lnav -i extra' to install third-party formats\n");
}
return retval;
@@ -468,12 +488,17 @@ config_error_reporter(const yajlpp_parse_context& ypc,
}
static const struct json_path_container key_command_handlers = {
+ yajlpp::property_handler("id")
+ .with_synopsis("<id>")
+ .with_description(
+ "The identifier that can be used to refer to this key")
+ .for_field(&key_command::kc_id),
yajlpp::property_handler("command")
.with_synopsis("<command>")
.with_description(
"The command to execute for the given key sequence. Use a script "
"to execute more complicated operations.")
- .with_pattern("^[:|;].*")
+ .with_pattern("^$|^[:|;].*")
.with_example(":goto next hour")
.for_field(&key_command::kc_cmd),
yajlpp::property_handler("alt-msg")
@@ -495,6 +520,14 @@ static const struct json_path_container keymap_def_handlers = {
[](const yajlpp_provider_context& ypc, key_map* km) {
auto& retval = km->km_seq_to_cmd[ypc.get_substr("key_seq")];
+ if (ypc.ypc_parse_context != nullptr) {
+ retval.kc_cmd.pp_path
+ = ypc.ypc_parse_context->get_full_path();
+ retval.kc_cmd.pp_location.sl_source
+ = ypc.ypc_parse_context->ypc_source;
+ retval.kc_cmd.pp_location.sl_line_number
+ = ypc.ypc_parse_context->get_line_number();
+ }
return &retval;
})
.with_path_provider<key_map>(
@@ -541,6 +574,23 @@ static const struct json_path_container movement_handlers = {
.for_field<>(&_lnav_config::lc_ui_movement, &movement_config::mode),
};
+static const json_path_handler_base::enum_value_t _mouse_mode_values[] = {
+ {"disabled", lnav_mouse_mode::disabled},
+ {"enabled", lnav_mouse_mode::enabled},
+
+ json_path_handler_base::ENUM_TERMINATOR,
+};
+
+static const struct json_path_container mouse_handlers = {
+ yajlpp::property_handler("mode")
+ .with_synopsis("enabled|disabled")
+ .with_enum_values(_mouse_mode_values)
+ .with_example("enabled")
+ .with_example("disabled")
+ .with_description("Overall control for mouse support")
+ .for_field<>(&_lnav_config::lc_mouse_mode),
+};
+
static const struct json_path_container global_var_handlers = {
yajlpp::pattern_property_handler("(?<var_name>\\w+)")
.with_synopsis("<name>")
@@ -595,6 +645,10 @@ static const struct json_path_container theme_styles_handlers = {
.with_description("Styling for plain text")
.for_child(&lnav_theme::lt_style_text)
.with_children(style_config_handlers),
+ yajlpp::property_handler("selected-text")
+ .with_description("Styling for text selected in a view")
+ .for_child(&lnav_theme::lt_style_selected_text)
+ .with_children(style_config_handlers),
yajlpp::property_handler("alt-text")
.with_description("Styling for plain text when alternating")
.for_child(&lnav_theme::lt_style_alt_text)
@@ -623,6 +677,10 @@ static const struct json_path_container theme_styles_handlers = {
.with_description("Styling for the cursor line in the main view")
.for_child(&lnav_theme::lt_style_cursor_line)
.with_children(style_config_handlers),
+ yajlpp::property_handler("disabled-cursor-line")
+ .with_description("Styling for the cursor line when it is disabled")
+ .for_child(&lnav_theme::lt_style_disabled_cursor_line)
+ .with_children(style_config_handlers),
yajlpp::property_handler("adjusted-time")
.with_description("Styling for timestamps that have been adjusted")
.for_child(&lnav_theme::lt_style_adjusted_time)
@@ -632,8 +690,12 @@ static const struct json_path_container theme_styles_handlers = {
"Styling for timestamps that are different from the received time")
.for_child(&lnav_theme::lt_style_skewed_time)
.with_children(style_config_handlers),
+ yajlpp::property_handler("file-offset")
+ .with_description("Styling for a file offset")
+ .for_child(&lnav_theme::lt_style_file_offset)
+ .with_children(style_config_handlers),
yajlpp::property_handler("offset-time")
- .with_description("Styling for hidden fields")
+ .with_description("Styling for the elapsed time column")
.for_child(&lnav_theme::lt_style_offset_time)
.with_children(style_config_handlers),
yajlpp::property_handler("invalid-msg")
@@ -660,6 +722,12 @@ static const struct json_path_container theme_styles_handlers = {
.with_description("Styling for top-level headers")
.with_obj_provider<style_config, lnav_theme>(
[](const yajlpp_provider_context& ypc, lnav_theme* root) {
+ if (ypc.ypc_parse_context != nullptr
+ && root->lt_style_header[0].pp_path.empty())
+ {
+ root->lt_style_header[0].pp_path
+ = ypc.ypc_parse_context->get_full_path();
+ }
return &root->lt_style_header[0].pp_value;
})
.with_children(style_config_handlers),
@@ -667,6 +735,12 @@ static const struct json_path_container theme_styles_handlers = {
.with_description("Styling for 2nd-level headers")
.with_obj_provider<style_config, lnav_theme>(
[](const yajlpp_provider_context& ypc, lnav_theme* root) {
+ if (ypc.ypc_parse_context != nullptr
+ && root->lt_style_header[1].pp_path.empty())
+ {
+ root->lt_style_header[1].pp_path
+ = ypc.ypc_parse_context->get_full_path();
+ }
return &root->lt_style_header[1].pp_value;
})
.with_children(style_config_handlers),
@@ -674,6 +748,12 @@ static const struct json_path_container theme_styles_handlers = {
.with_description("Styling for 3rd-level headers")
.with_obj_provider<style_config, lnav_theme>(
[](const yajlpp_provider_context& ypc, lnav_theme* root) {
+ if (ypc.ypc_parse_context != nullptr
+ && root->lt_style_header[2].pp_path.empty())
+ {
+ root->lt_style_header[2].pp_path
+ = ypc.ypc_parse_context->get_full_path();
+ }
return &root->lt_style_header[2].pp_value;
})
.with_children(style_config_handlers),
@@ -681,6 +761,12 @@ static const struct json_path_container theme_styles_handlers = {
.with_description("Styling for 4th-level headers")
.with_obj_provider<style_config, lnav_theme>(
[](const yajlpp_provider_context& ypc, lnav_theme* root) {
+ if (ypc.ypc_parse_context != nullptr
+ && root->lt_style_header[3].pp_path.empty())
+ {
+ root->lt_style_header[3].pp_path
+ = ypc.ypc_parse_context->get_full_path();
+ }
return &root->lt_style_header[3].pp_value;
})
.with_children(style_config_handlers),
@@ -688,6 +774,12 @@ static const struct json_path_container theme_styles_handlers = {
.with_description("Styling for 5th-level headers")
.with_obj_provider<style_config, lnav_theme>(
[](const yajlpp_provider_context& ypc, lnav_theme* root) {
+ if (ypc.ypc_parse_context != nullptr
+ && root->lt_style_header[4].pp_path.empty())
+ {
+ root->lt_style_header[4].pp_path
+ = ypc.ypc_parse_context->get_full_path();
+ }
return &root->lt_style_header[4].pp_value;
})
.with_children(style_config_handlers),
@@ -695,6 +787,12 @@ static const struct json_path_container theme_styles_handlers = {
.with_description("Styling for 6th-level headers")
.with_obj_provider<style_config, lnav_theme>(
[](const yajlpp_provider_context& ypc, lnav_theme* root) {
+ if (ypc.ypc_parse_context != nullptr
+ && root->lt_style_header[5].pp_path.empty())
+ {
+ root->lt_style_header[5].pp_path
+ = ypc.ypc_parse_context->get_full_path();
+ }
return &root->lt_style_header[5].pp_value;
})
.with_children(style_config_handlers),
@@ -742,9 +840,17 @@ static const struct json_path_container theme_styles_handlers = {
.with_description("Styling for snippet borders")
.for_child(&lnav_theme::lt_style_snippet_border)
.with_children(style_config_handlers),
+ yajlpp::property_handler("indent-guide")
+ .with_description("Styling for indent guide lines")
+ .for_child(&lnav_theme::lt_style_indent_guide)
+ .with_children(style_config_handlers),
};
static const struct json_path_container theme_syntax_styles_handlers = {
+ yajlpp::property_handler("inline-code")
+ .with_description("Styling for inline code blocks")
+ .for_child(&lnav_theme::lt_style_inline_code)
+ .with_children(style_config_handlers),
yajlpp::property_handler("quoted-code")
.with_description("Styling for quoted code blocks")
.for_child(&lnav_theme::lt_style_quoted_code)
@@ -778,10 +884,35 @@ static const struct json_path_container theme_syntax_styles_handlers = {
.with_description("Styling for symbols in source files")
.for_child(&lnav_theme::lt_style_symbol)
.with_children(style_config_handlers),
+ yajlpp::property_handler("null")
+ .with_description("Styling for nulls in source files")
+ .for_child(&lnav_theme::lt_style_null)
+ .with_children(style_config_handlers),
+ yajlpp::property_handler("ascii-control")
+ .with_description(
+ "Styling for ASCII control characters in source files")
+ .for_child(&lnav_theme::lt_style_ascii_ctrl)
+ .with_children(style_config_handlers),
+ yajlpp::property_handler("non-ascii")
+ .with_description("Styling for non-ASCII characters in source files")
+ .for_child(&lnav_theme::lt_style_non_ascii)
+ .with_children(style_config_handlers),
yajlpp::property_handler("number")
.with_description("Styling for numbers in source files")
.for_child(&lnav_theme::lt_style_number)
.with_children(style_config_handlers),
+ yajlpp::property_handler("type")
+ .with_description("Styling for types in source files")
+ .for_child(&lnav_theme::lt_style_type)
+ .with_children(style_config_handlers),
+ yajlpp::property_handler("function")
+ .with_description("Styling for functions in source files")
+ .for_child(&lnav_theme::lt_style_function)
+ .with_children(style_config_handlers),
+ yajlpp::property_handler("separators-references-accessors")
+ .with_description("Styling for sigils in source files")
+ .for_child(&lnav_theme::lt_style_sep_ref_acc)
+ .with_children(style_config_handlers),
yajlpp::property_handler("re-special")
.with_description(
"Styling for special characters in regular expressions")
@@ -876,6 +1007,10 @@ static const struct json_path_container theme_status_styles_handlers = {
.with_description("Styling for hotkey highlights of status bars")
.for_child(&lnav_theme::lt_style_status_hotkey)
.with_children(style_config_handlers),
+ yajlpp::property_handler("suggestion")
+ .with_description("Styling for suggested values")
+ .for_child(&lnav_theme::lt_style_suggestion)
+ .with_children(style_config_handlers),
};
static const struct json_path_container theme_log_level_styles_handlers = {
@@ -1029,6 +1164,9 @@ static const struct json_path_container ui_handlers = {
yajlpp::property_handler("theme-defs")
.with_description("Theme definitions.")
.with_children(theme_defs_handlers),
+ yajlpp::property_handler("mouse")
+ .with_description("Mouse-related settings")
+ .with_children(mouse_handlers),
yajlpp::property_handler("movement")
.with_description("Log file cursor movement mode settings")
.with_children(movement_handlers),
@@ -1057,6 +1195,27 @@ static const struct json_path_container archive_handlers = {
&archive_manager::config::amc_cache_ttl),
};
+static const struct json_path_container piper_handlers = {
+ yajlpp::property_handler("max-size")
+ .with_synopsis("<bytes>")
+ .with_description("The maximum size of a capture file")
+ .with_min_value(128)
+ .for_field(&_lnav_config::lc_piper, &lnav::piper::config::c_max_size),
+ yajlpp::property_handler("rotations")
+ .with_synopsis("<count>")
+ .with_min_value(2)
+ .with_description("The number of rotated files to keep")
+ .for_field(&_lnav_config::lc_piper, &lnav::piper::config::c_rotations),
+ yajlpp::property_handler("ttl")
+ .with_synopsis("<duration>")
+ .with_description(
+ "The time-to-live for captured data, expressed as a duration "
+ "(e.g. '3d' for three days)")
+ .with_example("3d")
+ .with_example("12h")
+ .for_field(&_lnav_config::lc_piper, &lnav::piper::config::c_ttl),
+};
+
static const struct json_path_container file_vtab_handlers = {
yajlpp::property_handler("max-content-size")
.with_synopsis("<bytes>")
@@ -1211,7 +1370,7 @@ static const struct json_path_container log_source_watch_expr_handlers = {
};
static const struct json_path_container log_source_watch_handlers = {
- yajlpp::pattern_property_handler("(?<watch_name>[\\w\\-]+)")
+ yajlpp::pattern_property_handler("(?<watch_name>[\\w\\.\\-]+)")
.with_synopsis("<name>")
.with_description("A log message watch expression")
.with_obj_provider<logfile_sub_source_ns::watch_expression,
@@ -1235,16 +1394,98 @@ static const struct json_path_container log_source_watch_handlers = {
.with_children(log_source_watch_expr_handlers),
};
+static const struct json_path_container annotation_handlers = {
+ yajlpp::property_handler("description")
+ .with_synopsis("<text>")
+ .with_description("A description of this annotation")
+ .for_field(&lnav::log::annotate::annotation_def::a_description),
+ yajlpp::property_handler("condition")
+ .with_synopsis("<SQL-expression>")
+ .with_description(
+ "The SQLite expression to execute for a log message that "
+ "determines whether or not this annotation is applicable. The "
+ "expression is evaluated the same way as a filter expression")
+ .with_min_length(1)
+ .for_field(&lnav::log::annotate::annotation_def::a_condition),
+ yajlpp::property_handler("handler")
+ .with_synopsis("<script>")
+ .with_description("The script to execute to generate the annotation "
+ "content. A JSON object with the log message content "
+ "will be sent to the script on the standard input")
+ .with_min_length(1)
+ .for_field(&lnav::log::annotate::annotation_def::a_handler),
+};
+
+static const struct json_path_container annotations_handlers = {
+ yajlpp::pattern_property_handler(R"((?<annotation_name>[\w\.\-]+))")
+ .with_obj_provider<lnav::log::annotate::annotation_def, _lnav_config>(
+ [](const yajlpp_provider_context& ypc, _lnav_config* root) {
+ auto* retval = &(root->lc_log_annotations
+ .a_definitions[ypc.get_substr_i(0)]);
+
+ return retval;
+ })
+ .with_path_provider<_lnav_config>(
+ [](struct _lnav_config* cfg, std::vector<std::string>& paths_out) {
+ for (const auto& iter : cfg->lc_log_annotations.a_definitions) {
+ paths_out.emplace_back(iter.first.to_string());
+ }
+ })
+ .with_children(annotation_handlers),
+};
+
+static const struct json_path_container log_date_time_handlers = {
+ yajlpp::property_handler("convert-zoned-to-local")
+ .with_description("Convert timestamps with ")
+ .with_pattern(R"(^[\w\-]+(?!\.lnav)$)")
+ .for_field(&_lnav_config::lc_log_date_time,
+ &date_time_scanner_ns::config::c_zoned_to_local),
+};
+
static const struct json_path_container log_source_handlers = {
+ yajlpp::property_handler("date-time")
+ .with_description("Settings related to log message dates and times")
+ .with_children(log_date_time_handlers),
yajlpp::property_handler("watch-expressions")
.with_description("Log message watch expressions")
.with_children(log_source_watch_handlers),
+ yajlpp::property_handler("annotations").with_children(annotations_handlers),
+};
+
+static const struct json_path_container url_scheme_handlers = {
+ yajlpp::property_handler("handler")
+ .with_description(
+ "The name of the lnav script that can handle URLs "
+ "with of this scheme. This should not include the '.lnav' suffix.")
+ .with_pattern(R"(^[\w\-]+(?!\.lnav)$)")
+ .for_field(&lnav::url_handler::scheme::p_handler),
+};
+
+static const struct json_path_container url_handlers = {
+ yajlpp::pattern_property_handler(R"((?<url_scheme>[a-z][\w\-\+\.]+))")
+ .with_description("Definition of a custom URL scheme")
+ .with_obj_provider<lnav::url_handler::scheme, _lnav_config>(
+ [](const yajlpp_provider_context& ypc, _lnav_config* root) {
+ auto& retval = root->lc_url_handlers
+ .c_schemes[ypc.get_substr("url_scheme")];
+ return &retval;
+ })
+ .with_path_provider<_lnav_config>(
+ [](struct _lnav_config* cfg, std::vector<std::string>& paths_out) {
+ for (const auto& iter : cfg->lc_url_handlers.c_schemes) {
+ paths_out.emplace_back(iter.first);
+ }
+ })
+ .with_children(url_scheme_handlers),
};
static const struct json_path_container tuning_handlers = {
yajlpp::property_handler("archive-manager")
.with_description("Settings related to opening archive files")
.with_children(archive_handlers),
+ yajlpp::property_handler("piper")
+ .with_description("Settings related to capturing piped data")
+ .with_children(piper_handlers),
yajlpp::property_handler("file-vtab")
.with_description("Settings related to the lnav_file virtual-table")
.with_children(file_vtab_handlers),
@@ -1257,6 +1498,9 @@ static const struct json_path_container tuning_handlers = {
yajlpp::property_handler("clipboard")
.with_description("Settings related to the clipboard")
.with_children(sysclip_handlers),
+ yajlpp::property_handler("url-scheme")
+ .with_description("Settings related to custom URL handling")
+ .with_children(url_handlers),
};
const char* DEFAULT_CONFIG_SCHEMA
@@ -1288,10 +1532,10 @@ read_id(yajlpp_parse_context* ypc, const unsigned char* str, size_t len)
}
ypc->report_error(
lnav::console::user_message::error(
- attr_line_t("'")
- .append(lnav::roles::symbol(file_id))
+ attr_line_t()
+ .append_quoted(lnav::roles::symbol(file_id))
.append(
- "' is not a supported configuration $schema version"))
+ " is not a supported configuration $schema version"))
.with_snippet(ypc->get_snippet())
.with_note(notes)
.with_help(handler->get_help_text(ypc)));
@@ -1326,14 +1570,74 @@ const json_path_container lnav_config_handlers = json_path_container {
class active_key_map_listener : public lnav_config_listener {
public:
+ active_key_map_listener() : lnav_config_listener(__FILE__) {}
+
void reload_config(error_reporter& reporter) override
{
lnav_config.lc_active_keymap = lnav_config.lc_ui_keymaps["default"];
for (const auto& pair :
lnav_config.lc_ui_keymaps[lnav_config.lc_ui_keymap].km_seq_to_cmd)
{
- lnav_config.lc_active_keymap.km_seq_to_cmd[pair.first]
- = pair.second;
+ if (pair.second.kc_cmd.pp_value.empty()) {
+ lnav_config.lc_active_keymap.km_seq_to_cmd.erase(pair.first);
+ } else {
+ lnav_config.lc_active_keymap.km_seq_to_cmd[pair.first]
+ = pair.second;
+ }
+ }
+
+ auto& ec = injector::get<exec_context&>();
+ for (const auto& pair : lnav_config.lc_active_keymap.km_seq_to_cmd) {
+ if (pair.second.kc_id.empty()) {
+ continue;
+ }
+
+ auto keyseq_sf = string_fragment::from_str(pair.first);
+ std::string keystr;
+ if (keyseq_sf.startswith("f")) {
+ auto sv = keyseq_sf.to_string_view();
+ int32_t value;
+ auto scan_res = scn::scan(sv, "f{}", value);
+ if (!scan_res) {
+ log_error("invalid function key sequence: %s", keyseq_sf);
+ continue;
+ }
+ if (value < 0 || value > 64) {
+ log_error("invalid function key number: %s", keyseq_sf);
+ continue;
+ }
+
+ keystr = toupper(pair.first);
+ } else {
+ auto sv
+ = string_fragment::from_str(pair.first).to_string_view();
+ while (!sv.empty()) {
+ int32_t value;
+ auto scan_res = scn::scan(sv, "x{:2x}", value);
+ if (!scan_res) {
+ log_error("invalid key sequence: %s",
+ pair.first.c_str());
+ break;
+ }
+ auto ch = (char) (value & 0xff);
+ switch (ch) {
+ case '\t':
+ keystr.append("TAB");
+ break;
+ case '\r':
+ keystr.append("ENTER");
+ break;
+ default:
+ keystr.push_back(ch);
+ break;
+ }
+ sv = scan_res.range_as_string_view();
+ }
+ }
+
+ if (!keystr.empty()) {
+ ec.ec_global_vars[pair.second.kc_id] = keystr;
+ }
}
}
};
@@ -1398,11 +1702,10 @@ load_config_from(_lnav_config& lconfig,
.with_errno_reason());
}
} else {
- auto_mem<yajl_handle_t> handle(yajl_free);
char buffer[2048];
ssize_t rc = -1;
- handle = yajl_alloc(&ypc.ypc_callbacks, nullptr, &ypc);
+ auto handle = yajlpp::alloc_handle(&ypc.ypc_callbacks, &ypc);
yajl_config(handle, yajl_allow_comments, 1);
yajl_config(handle, yajl_allow_multiple_values, 1);
ypc.ypc_handle = handle;
@@ -1438,10 +1741,10 @@ load_default_config(struct _lnav_config& config_obj,
{
yajlpp_parse_context ypc_builtin(intern_string::lookup(bsf.get_name()),
&lnav_config_handlers);
- auto_mem<yajl_handle_t> handle(yajl_free);
struct config_userdata ud(errors);
- handle = yajl_alloc(&ypc_builtin.ypc_callbacks, nullptr, &ypc_builtin);
+ auto handle
+ = yajlpp::alloc_handle(&ypc_builtin.ypc_callbacks, &ypc_builtin);
ypc_builtin.ypc_locations = &lnav_config_locations;
ypc_builtin.with_handle(handle);
ypc_builtin.with_obj(config_obj);
@@ -1455,9 +1758,7 @@ load_default_config(struct _lnav_config& config_obj,
yajl_config(handle, yajl_allow_comments, 1);
yajl_config(handle, yajl_allow_multiple_values, 1);
- if (ypc_builtin.parse(bsf.to_string_fragment()) == yajl_status_ok) {
- ypc_builtin.complete_parse();
- }
+ ypc_builtin.parse_doc(bsf.to_string_fragment());
return path == "*" || ypc_builtin.ypc_active_paths.empty();
}
@@ -1541,6 +1842,19 @@ load_config(const std::vector<ghc::filesystem::path>& extra_paths,
rollback_lnav_config = lnav_config;
}
+std::string
+dump_config()
+{
+ yajlpp_gen gen;
+ yajlpp_gen_context ygc(gen, lnav_config_handlers);
+
+ yajl_gen_config(gen, yajl_gen_beautify, true);
+ ygc.with_obj(lnav_config);
+ ygc.gen();
+
+ return gen.to_string_fragment().to_string();
+}
+
void
reset_config(const std::string& path)
{
@@ -1627,36 +1941,46 @@ save_config()
void
reload_config(std::vector<lnav::console::user_message>& errors)
{
- lnav_config_listener* curr = lnav_config_listener::LISTENER_LIST;
+ auto* curr = lnav_config_listener::LISTENER_LIST;
while (curr != nullptr) {
auto reporter = [&errors](const void* cfg_value,
const lnav::console::user_message& errmsg) {
+ log_error("configuration error: %s",
+ errmsg.to_attr_line().get_string().c_str());
auto cb = [&cfg_value, &errors, &errmsg](
const json_path_handler_base& jph,
const std::string& path,
- void* mem) {
+ const void* mem) {
if (mem != cfg_value) {
return;
}
auto loc_iter
= lnav_config_locations.find(intern_string::lookup(path));
- if (loc_iter == lnav_config_locations.end()) {
- return;
+ auto has_loc = loc_iter != lnav_config_locations.end();
+ auto um = has_loc
+ ? lnav::console::user_message::error(
+ attr_line_t()
+ .append("invalid value for property ")
+ .append_quoted(lnav::roles::symbol(path)))
+ .with_reason(errmsg)
+ : errmsg;
+ um.with_help(jph.get_help_text(path));
+
+ if (has_loc) {
+ um.with_snippet(
+ lnav::console::snippet::from(loc_iter->second.sl_source,
+ "")
+ .with_line(loc_iter->second.sl_line_number));
+ } else {
+ um.um_message
+ = attr_line_t()
+ .append("missing value for property ")
+ .append_quoted(lnav::roles::symbol(path));
}
- errors.emplace_back(
- lnav::console::user_message::error(
- attr_line_t()
- .append("invalid value for property ")
- .append_quoted(lnav::roles::symbol(path)))
- .with_reason(errmsg)
- .with_snippet(
- lnav::console::snippet::from(
- loc_iter->second.sl_source, "")
- .with_line(loc_iter->second.sl_line_number))
- .with_help(jph.get_help_text(path)));
+ errors.emplace_back(um);
};
for (const auto& jph : lnav_config_handlers.jpc_children) {
diff --git a/src/lnav_config.hh b/src/lnav_config.hh
index 8341eca..2408006 100644
--- a/src/lnav_config.hh
+++ b/src/lnav_config.hh
@@ -36,23 +36,26 @@
#include <map>
#include <set>
#include <string>
-#include <unordered_map>
#include <vector>
#include "archive_manager.cfg.hh"
+#include "base/date_time_scanner.cfg.hh"
#include "base/file_range.hh"
#include "base/lnav.console.hh"
#include "base/result.h"
#include "file_vtab.cfg.hh"
#include "ghc/filesystem.hpp"
#include "lnav_config_fwd.hh"
+#include "log.annotate.cfg.hh"
#include "log_level.hh"
#include "logfile.cfg.hh"
#include "logfile_sub_source.cfg.hh"
+#include "piper.looper.cfg.hh"
#include "styling.hh"
#include "sysclip.cfg.hh"
#include "tailer/tailer.looper.cfg.hh"
#include "top_status_source.cfg.hh"
+#include "url_handler.cfg.hh"
/**
* Check if an experimental feature should be enabled by
@@ -77,7 +80,8 @@ bool update_installs_from_git();
void install_extra_formats();
struct key_command {
- std::string kc_cmd;
+ std::string kc_id;
+ positioned_property<std::string> kc_cmd;
std::string kc_alt_msg;
};
@@ -94,6 +98,11 @@ struct movement_config {
config_movement_mode mode{config_movement_mode::TOP};
};
+enum class lnav_mouse_mode {
+ disabled,
+ enabled,
+};
+
struct _lnav_config {
top_status_source_cfg lc_top_status_cfg;
bool lc_ui_dim_text;
@@ -101,7 +110,8 @@ struct _lnav_config {
std::string lc_ui_keymap;
std::string lc_ui_theme;
movement_config lc_ui_movement;
- std::unordered_map<std::string, key_map> lc_ui_keymaps;
+ lnav_mouse_mode lc_mouse_mode;
+ std::map<std::string, key_map> lc_ui_keymaps;
std::map<std::string, std::string> lc_ui_key_overrides;
std::map<std::string, std::string> lc_global_vars;
std::map<std::string, lnav_theme> lc_ui_theme_defs;
@@ -109,11 +119,15 @@ struct _lnav_config {
key_map lc_active_keymap;
archive_manager::config lc_archive_manager;
+ date_time_scanner_ns::config lc_log_date_time;
+ lnav::piper::config lc_piper;
file_vtab::config lc_file_vtab;
lnav::logfile::config lc_logfile;
tailer::config lc_tailer;
sysclip::config lc_sysclip;
+ lnav::url_handler::config lc_url_handlers;
logfile_sub_source_ns::config lc_log_source;
+ lnav::log::annotate::config lc_log_annotations;
};
extern struct _lnav_config lnav_config;
@@ -139,6 +153,8 @@ void reload_config(std::vector<lnav::console::user_message>& errors);
std::string save_config();
+std::string dump_config();
+
extern const char* DEFAULT_FORMAT_SCHEMA;
extern const std::set<std::string> SUPPORTED_FORMAT_SCHEMAS;
diff --git a/src/lnav_config_fwd.hh b/src/lnav_config_fwd.hh
index 0b371a3..0f7df3f 100644
--- a/src/lnav_config_fwd.hh
+++ b/src/lnav_config_fwd.hh
@@ -42,10 +42,17 @@ public:
using error_reporter = const std::function<void(
const void*, const lnav::console::user_message& msg)>;
- lnav_config_listener()
+ template<typename T, std::size_t N>
+ lnav_config_listener(const T (&src_file)[N])
+ : lcl_name(string_fragment::from_const(src_file))
{
- this->lcl_next = LISTENER_LIST;
- LISTENER_LIST = this;
+ auto** curr = &LISTENER_LIST;
+
+ while (*curr != nullptr && (*curr)->lcl_name < this->lcl_name) {
+ curr = &(*curr)->lcl_next;
+ }
+ this->lcl_next = *curr;
+ *curr = this;
}
virtual ~lnav_config_listener() = default;
@@ -54,7 +61,8 @@ public:
virtual void unload_config() {}
- static void unload_all() {
+ static void unload_all()
+ {
auto* lcl = LISTENER_LIST;
while (lcl != nullptr) {
lcl->unload_config();
@@ -65,6 +73,7 @@ public:
static lnav_config_listener* LISTENER_LIST;
lnav_config_listener* lcl_next;
+ string_fragment lcl_name;
};
#endif
diff --git a/src/lnav_util.cc b/src/lnav_util.cc
index e5540d9..97ccd03 100644
--- a/src/lnav_util.cc
+++ b/src/lnav_util.cc
@@ -150,7 +150,8 @@ to_json(yajlpp_gen& gen, const attr_line_t& al)
},
[&](const bookmark_metadata* bm) { elem_map.gen(""); },
[&](const timespec& ts) { elem_map.gen(""); },
- [&](const string_fragment& sf) { elem_map.gen(sf); });
+ [&](const string_fragment& sf) { elem_map.gen(sf); },
+ [&](const block_elem_t& be) { elem_map.gen(""); });
}
}
}
@@ -215,6 +216,14 @@ to_json(const lnav::console::user_message& um)
to_json(gen, snip.s_content);
}
}
+ root_map.gen("notes");
+ {
+ yajlpp_array notes_array(gen);
+
+ for (const auto& note : um.um_notes) {
+ to_json(gen, note);
+ }
+ }
root_map.gen("help");
to_json(gen, um.um_help);
}
@@ -317,6 +326,9 @@ static const typed_json_path_container<console::user_message>
yajlpp::property_handler("snippets#")
.for_field(&console::user_message::um_snippets)
.with_children(snippet_handlers),
+ yajlpp::property_handler("notes#")
+ .for_field(&console::user_message::um_notes)
+ .with_children(attr_line_handlers),
yajlpp::property_handler("help")
.for_child(&console::user_message::um_help)
.with_children(attr_line_handlers),
diff --git a/src/lnav_util.hh b/src/lnav_util.hh
index 5edb537..13b5ac6 100644
--- a/src/lnav_util.hh
+++ b/src/lnav_util.hh
@@ -52,12 +52,9 @@
#include "base/intern_string.hh"
#include "base/lnav.console.hh"
#include "base/result.h"
-#include "byte_array.hh"
#include "config.h"
#include "fmt/format.h"
#include "optional.hpp"
-#include "ptimec.hh"
-#include "spookyhash/SpookyV2.h"
#if SIZEOF_OFF_T == 8
# define FORMAT_OFF_T "%lld"
@@ -67,77 +64,6 @@
# error "off_t has unhandled size..."
#endif
-class hasher {
-public:
- using array_t = byte_array<2, uint64_t>;
- static constexpr size_t STRING_SIZE = array_t::STRING_SIZE;
-
- hasher() { this->h_context.Init(0, 0); }
-
- hasher& update(const std::string& str)
- {
- this->h_context.Update(str.data(), str.length());
-
- return *this;
- }
-
- hasher& update(const string_fragment& str)
- {
- this->h_context.Update(str.data(), str.length());
-
- return *this;
- }
-
- hasher& update(const char* bits, size_t len)
- {
- this->h_context.Update(bits, len);
-
- return *this;
- }
-
- hasher& update(int64_t value)
- {
- value = SPOOKYHASH_LITTLE_ENDIAN_64(value);
- this->h_context.Update(&value, sizeof(value));
-
- return *this;
- }
-
- array_t to_array()
- {
- uint64_t h1;
- uint64_t h2;
- array_t retval;
-
- this->h_context.Final(&h1, &h2);
- *retval.out(0) = SPOOKYHASH_LITTLE_ENDIAN_64(h1);
- *retval.out(1) = SPOOKYHASH_LITTLE_ENDIAN_64(h2);
- return retval;
- }
-
- void to_string(auto_buffer& buf)
- {
- array_t bits = this->to_array();
-
- bits.to_string(std::back_inserter(buf));
- }
-
- std::string to_string()
- {
- array_t bits = this->to_array();
- return bits.to_string();
- }
-
- std::string to_uuid_string()
- {
- array_t bits = this->to_array();
- return bits.to_uuid_string();
- }
-
-private:
- SpookyHash h_context;
-};
-
bool change_to_parent_dir();
bool next_format(const char* const fmt[], int& index, int& locked_index);
@@ -155,14 +81,6 @@ to_string(const char* s)
}
} // namespace std
-inline bool
-is_glob(const std::string& fn)
-{
- return (fn.find('*') != std::string::npos
- || fn.find('?') != std::string::npos
- || fn.find('[') != std::string::npos);
-}
-
inline void
rusagesub(const struct rusage& left,
const struct rusage& right,
diff --git a/src/log.annotate.cc b/src/log.annotate.cc
new file mode 100644
index 0000000..3b4ffcb
--- /dev/null
+++ b/src/log.annotate.cc
@@ -0,0 +1,407 @@
+/**
+ * Copyright (c) 2023, Timothy Stack
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of Timothy Stack nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ''AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <future>
+
+#include "log.annotate.hh"
+
+#include "base/auto_fd.hh"
+#include "base/auto_pid.hh"
+#include "base/fs_util.hh"
+#include "base/paths.hh"
+#include "line_buffer.hh"
+#include "lnav.hh"
+#include "log_data_helper.hh"
+#include "md4cpp.hh"
+#include "readline_highlighters.hh"
+#include "yajlpp/yajlpp.hh"
+
+namespace lnav {
+namespace log {
+namespace annotate {
+
+struct compiled_cond_expr {
+ auto_mem<sqlite3_stmt> cce_stmt{sqlite3_finalize};
+ bool cce_enabled{true};
+};
+
+struct expressions : public lnav_config_listener {
+ expressions() : lnav_config_listener(__FILE__) {}
+
+ void reload_config(error_reporter& reporter) override
+ {
+ auto& lnav_db = injector::get<auto_sqlite3&>();
+
+ if (lnav_db.in() == nullptr) {
+ log_warning("db not initialized yet!");
+ return;
+ }
+
+ const auto& cfg = injector::get<const config&>();
+
+ this->e_cond_exprs.clear();
+ for (const auto& pair : cfg.a_definitions) {
+ if (pair.second.a_handler.pp_value.empty()) {
+ auto um
+ = lnav::console::user_message::error(
+ "no handler specified for annotation")
+ .with_reason("Every annotation requires a handler");
+ reporter(&pair.second.a_handler, um);
+ continue;
+ }
+
+ auto stmt_str = fmt::format(FMT_STRING("SELECT 1 WHERE {}"),
+ pair.second.a_condition);
+ compiled_cond_expr cce;
+
+ log_info("preparing annotation condition expression: %s",
+ stmt_str.c_str());
+ auto retcode = sqlite3_prepare_v2(lnav_db,
+ stmt_str.c_str(),
+ stmt_str.size(),
+ cce.cce_stmt.out(),
+ nullptr);
+ if (retcode != SQLITE_OK) {
+ auto sql_al = attr_line_t(pair.second.a_condition)
+ .with_attr_for_all(SA_PREFORMATTED.value())
+ .with_attr_for_all(
+ VC_ROLE.value(role_t::VCR_QUOTED_CODE));
+ readline_sqlite_highlighter(sql_al, -1);
+ intern_string_t cond_expr_path = intern_string::lookup(
+ fmt::format(FMT_STRING("/log/annotations/{}/condition"),
+ pair.first));
+ auto snippet = lnav::console::snippet::from(
+ source_location(cond_expr_path), sql_al);
+
+ auto um = lnav::console::user_message::error(
+ "SQL expression is invalid")
+ .with_reason(sqlite3_errmsg(lnav_db))
+ .with_snippet(snippet);
+
+ reporter(&pair.second.a_condition, um);
+ continue;
+ }
+
+ this->e_cond_exprs.emplace(pair.first, std::move(cce));
+ }
+ }
+
+ void unload_config() override { this->e_cond_exprs.clear(); }
+
+ std::map<intern_string_t, compiled_cond_expr> e_cond_exprs;
+};
+
+static expressions exprs;
+
+std::vector<intern_string_t>
+applicable(vis_line_t vl)
+{
+ std::vector<intern_string_t> retval;
+ auto& lss = lnav_data.ld_log_source;
+ auto cl = lss.at(vl);
+ auto ld = lss.find_data(cl);
+ log_data_helper ldh(lss);
+
+ ldh.parse_line(vl, true);
+ for (auto& expr : exprs.e_cond_exprs) {
+ if (!expr.second.cce_enabled) {
+ continue;
+ }
+
+ auto eval_res
+ = lss.eval_sql_filter(expr.second.cce_stmt.in(), ld, ldh.ldh_line);
+
+ if (eval_res.isErr()) {
+ log_error("eval failed: %s",
+ eval_res.unwrapErr().to_attr_line().get_string().c_str());
+ expr.second.cce_enabled = false;
+ } else {
+ if (eval_res.unwrap()) {
+ retval.emplace_back(expr.first);
+ }
+ }
+ }
+ return retval;
+}
+
+Result<void, lnav::console::user_message>
+apply(vis_line_t vl, std::vector<intern_string_t> annos)
+{
+ const auto& cfg = injector::get<const config&>();
+ auto& lss = lnav_data.ld_log_source;
+ auto cl = lss.at(vl);
+ auto ld = lss.find_data(cl);
+ auto lf = (*ld)->get_file();
+ logmsg_annotations la;
+ log_data_helper ldh(lss);
+
+ if (!ldh.parse_line(vl, true)) {
+ log_error("failed to parse line %d", vl);
+ return Err(lnav::console::user_message::error("Failed to parse line"));
+ }
+ auto line_number = content_line_t{ldh.ldh_line_index - ldh.ldh_y_offset};
+ lss.set_user_mark(&textview_curses::BM_META,
+ content_line_t{ldh.ldh_source_line - ldh.ldh_y_offset});
+
+ yajlpp_gen gen;
+
+ {
+ auto bm_opt = lss.find_bookmark_metadata(vl);
+ yajlpp_map root(gen);
+
+ root.gen("log_line");
+ root.gen((int64_t) vl);
+ root.gen("log_tags");
+ {
+ yajlpp_array tag_array(gen);
+
+ if (bm_opt) {
+ const auto& bm = *(bm_opt.value());
+
+ for (const auto& tag : bm.bm_tags) {
+ tag_array.gen(tag);
+ }
+ }
+ }
+ root.gen("log_path");
+ root.gen(lf->get_filename().native());
+ root.gen("log_format");
+ root.gen(lf->get_format_name());
+ root.gen("log_format_regex");
+ root.gen(lf->get_format()->get_pattern_name(line_number));
+ root.gen("log_msg");
+ root.gen(ldh.ldh_line_values.lvv_sbr.to_string_fragment());
+ for (const auto& val : ldh.ldh_line_values.lvv_values) {
+ root.gen(val.lv_meta.lvm_name);
+ switch (val.lv_meta.lvm_kind) {
+ case value_kind_t::VALUE_NULL:
+ root.gen();
+ break;
+ case value_kind_t::VALUE_INTEGER:
+ root.gen(val.lv_value.i);
+ break;
+ case value_kind_t::VALUE_FLOAT:
+ root.gen(val.lv_value.d);
+ break;
+ case value_kind_t::VALUE_BOOLEAN:
+ root.gen(val.lv_value.i ? true : false);
+ break;
+ default:
+ root.gen(val.to_string());
+ break;
+ }
+ }
+ }
+
+ for (const auto& anno : annos) {
+ auto iter = cfg.a_definitions.find(anno);
+ if (iter == cfg.a_definitions.end()) {
+ log_error("unknown annotation: %s", anno.c_str());
+ continue;
+ }
+
+ la.la_pairs[anno.to_string()] = "Loading...";
+ auto child_fds_res = auto_pipe::for_child_fds(
+ STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO);
+ if (child_fds_res.isErr()) {
+ auto um
+ = lnav::console::user_message::error("unable to create pipes")
+ .with_reason(child_fds_res.unwrapErr());
+ return Err(um);
+ }
+
+ auto child_res = lnav::pid::from_fork();
+ if (child_res.isErr()) {
+ auto um
+ = lnav::console::user_message::error("unable to fork() child")
+ .with_reason(child_res.unwrapErr());
+ return Err(um);
+ }
+
+ auto child_fds = child_fds_res.unwrap();
+
+ auto child = child_res.unwrap();
+ for (auto& child_fd : child_fds) {
+ child_fd.after_fork(child.in());
+ }
+ if (child.in_child()) {
+ const char* exec_args[] = {
+ getenv_opt("SHELL").value_or("bash"),
+ "-c",
+ iter->second.a_handler.pp_value.c_str(),
+ nullptr,
+ };
+
+ std::vector<ghc::filesystem::path> path_v;
+
+ auto src_path
+ = ghc::filesystem::path(
+ iter->second.a_handler.pp_location.sl_source.to_string())
+ .parent_path();
+ path_v.push_back(src_path);
+ path_v.push_back(lnav::paths::dotlnav() / "formats/default");
+ auto path_var = lnav::filesystem::build_path(path_v);
+
+ log_debug("annotate PATH: %s", path_var.c_str());
+ setenv("PATH", path_var.c_str(), 1);
+ execvp(exec_args[0], (char**) exec_args);
+ _exit(EXIT_FAILURE);
+ }
+
+ auto out_reader = std::async(
+ std::launch::async,
+ [out_fd = std::move(child_fds[1].read_end())]() mutable {
+ std::string retval;
+ file_range last_range;
+ line_buffer lb;
+
+ lb.set_fd(out_fd);
+ while (true) {
+ auto load_res = lb.load_next_line(last_range);
+ if (load_res.isErr()) {
+ log_error("unable to load next line: %s",
+ load_res.unwrapErr().c_str());
+ break;
+ }
+
+ auto li = load_res.unwrap();
+ if (li.li_file_range.empty()) {
+ break;
+ }
+ auto read_res = lb.read_range(li.li_file_range);
+ if (read_res.isErr()) {
+ log_error("unable to read next line: %s",
+ load_res.unwrapErr().c_str());
+ break;
+ }
+
+ auto sbr = read_res.unwrap();
+ retval.append(sbr.get_data(), sbr.length());
+
+ last_range = li.li_file_range;
+ }
+
+ return retval;
+ });
+
+ auto err_reader = std::async(
+ std::launch::async,
+ [err_fd = std::move(child_fds[2].read_end()),
+ handler = iter->second.a_handler.pp_value]() mutable {
+ std::string retval;
+ file_range last_range;
+ line_buffer lb;
+
+ lb.set_fd(err_fd);
+ while (true) {
+ auto load_res = lb.load_next_line(last_range);
+ if (load_res.isErr()) {
+ log_error("unable to load next line: %s",
+ load_res.unwrapErr().c_str());
+ break;
+ }
+
+ auto li = load_res.unwrap();
+ if (li.li_file_range.empty()) {
+ break;
+ }
+ auto read_res = lb.read_range(li.li_file_range);
+ if (read_res.isErr()) {
+ log_error("unable to read next line: %s",
+ load_res.unwrapErr().c_str());
+ break;
+ }
+
+ auto sbr = read_res.unwrap();
+ retval.append(sbr.get_data(), sbr.length());
+ sbr.rtrim(is_line_ending);
+ log_debug("%s: %.*s",
+ handler.c_str(),
+ sbr.length(),
+ sbr.get_data());
+
+ last_range = li.li_file_range;
+ }
+
+ return retval;
+ });
+
+ auto write_res
+ = child_fds[0].write_end().write_fully(gen.to_string_fragment());
+ if (write_res.isErr()) {
+ log_error("bah %s", write_res.unwrapErr().c_str());
+ }
+ child_fds[0].write_end().reset();
+ auto finalizer = [anno,
+ out_reader1 = out_reader.share(),
+ err_reader1 = err_reader.share(),
+ lf,
+ line_number,
+ handler = iter->second.a_handler.pp_value](
+ auto& fc,
+ auto_pid<process_state::finished>& child) mutable {
+ auto& line_anno
+ = lf->get_bookmark_metadata()[line_number].bm_annotations;
+ auto content = out_reader1.get();
+ if (!child.was_normal_exit()) {
+ content.append(fmt::format(
+ FMT_STRING(
+ "\n\n\u2718 annotation handler \u201c{}\u201d failed "
+ "with signal {}:\n\n<pre>\n{}\n</pre>\n"),
+ handler,
+ child.term_signal(),
+ err_reader1.get()));
+ } else if (child.exit_status() != 0) {
+ content.append(fmt::format(
+ FMT_STRING(
+ "\n\n<span "
+ "class=\"-lnav_log-level-styles_error\">"
+ "\u2718 annotation handler \u201c{}\u201d exited "
+ "with status {}:</span>\n\n<pre>{}</pre>"),
+ handler,
+ child.exit_status(),
+ md4cpp::escape_html(err_reader1.get())));
+ }
+ line_anno.la_pairs[anno.to_string()] = content;
+ lnav_data.ld_views[LNV_LOG].reload_data();
+ lnav_data.ld_views[LNV_LOG].set_needs_update();
+ };
+
+ lnav_data.ld_child_pollers.emplace_back(
+ (*ld)->get_file_ptr()->get_filename(),
+ std::move(child),
+ std::move(finalizer));
+ }
+ lf->get_bookmark_metadata()[line_number].bm_annotations = la;
+ return Ok();
+}
+
+} // namespace annotate
+} // namespace log
+} // namespace lnav
diff --git a/src/log.annotate.cfg.hh b/src/log.annotate.cfg.hh
new file mode 100644
index 0000000..d643c9b
--- /dev/null
+++ b/src/log.annotate.cfg.hh
@@ -0,0 +1,57 @@
+/**
+ * Copyright (c) 2023, Timothy Stack
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of Timothy Stack nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ''AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef lnav_log_annotate_cfg_hh
+#define lnav_log_annotate_cfg_hh
+
+#include <map>
+#include <string>
+
+#include "base/intern_string.hh"
+#include "yajlpp/yajlpp.hh"
+
+namespace lnav {
+namespace log {
+namespace annotate {
+
+struct annotation_def {
+ std::string a_description;
+ std::string a_condition;
+ positioned_property<std::string> a_handler;
+};
+
+struct config {
+ std::map<intern_string_t, annotation_def> a_definitions;
+};
+
+} // namespace annotate
+} // namespace log
+} // namespace lnav
+
+#endif
diff --git a/src/log.annotate.hh b/src/log.annotate.hh
new file mode 100644
index 0000000..757db89
--- /dev/null
+++ b/src/log.annotate.hh
@@ -0,0 +1,53 @@
+/**
+ * Copyright (c) 2023, Timothy Stack
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of Timothy Stack nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ''AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef lnav_log_annotate_hh
+#define lnav_log_annotate_hh
+
+#include <string>
+
+#include "base/lnav.console.hh"
+#include "base/result.h"
+#include "log.annotate.cfg.hh"
+#include "vis_line.hh"
+
+namespace lnav {
+namespace log {
+namespace annotate {
+
+std::vector<intern_string_t> applicable(vis_line_t vl);
+
+Result<void, lnav::console::user_message> apply(
+ vis_line_t vl, std::vector<intern_string_t> annos);
+
+} // namespace annotate
+} // namespace log
+} // namespace lnav
+
+#endif
diff --git a/src/log.watch.cc b/src/log.watch.cc
index e90b2eb..c4e5826 100644
--- a/src/log.watch.cc
+++ b/src/log.watch.cc
@@ -39,6 +39,7 @@
#include "logfile_sub_source.cfg.hh"
#include "readline_highlighters.hh"
#include "sql_util.hh"
+#include "sqlitepp.hh"
namespace lnav {
namespace log {
@@ -50,6 +51,8 @@ struct compiled_watch_expr {
};
struct expressions : public lnav_config_listener {
+ expressions() : lnav_config_listener(__FILE__) {}
+
void reload_config(error_reporter& reporter) override
{
auto& lnav_db = injector::get<auto_sqlite3&>();
@@ -98,9 +101,7 @@ struct expressions : public lnav_config_listener {
}
}
- void unload_config() override {
- this->e_watch_exprs.clear();
- }
+ void unload_config() override { this->e_watch_exprs.clear(); }
std::map<std::string, compiled_watch_expr> e_watch_exprs;
};
@@ -192,7 +193,7 @@ eval_with(logfile& lf, logfile::iterator ll)
sqlite3_bind_text(stmt,
lpc + 1,
filename.c_str(),
- filename.length(),
+ filename.native().length(),
SQLITE_STATIC);
continue;
}
@@ -201,7 +202,7 @@ eval_with(logfile& lf, logfile::iterator ll)
sqlite3_bind_text(stmt,
lpc + 1,
filename.c_str(),
- filename.length(),
+ filename.native().length(),
SQLITE_STATIC);
continue;
}
@@ -230,15 +231,11 @@ eval_with(logfile& lf, logfile::iterator ll)
continue;
}
if (strcmp(name, ":log_opid") == 0) {
- auto opid_attr_opt = get_string_attr(sa, logline::L_OPID);
- if (opid_attr_opt) {
- const auto& sar
- = opid_attr_opt.value().saw_string_attr->sa_range;
-
+ if (values.lvv_opid_value) {
sqlite3_bind_text(stmt,
lpc + 1,
- values.lvv_sbr.get_data_at(sar.lr_start),
- sar.length(),
+ values.lvv_opid_value->c_str(),
+ values.lvv_opid_value->length(),
SQLITE_STATIC);
} else {
sqlite3_bind_null(stmt, lpc + 1);
diff --git a/src/log_actions.cc b/src/log_actions.cc
index 6e47440..02a3c91 100644
--- a/src/log_actions.cc
+++ b/src/log_actions.cc
@@ -27,13 +27,14 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "log_actions.hh"
+#if 0
+# include "log_actions.hh"
-#include "base/fs_util.hh"
-#include "base/injector.hh"
-#include "bound_tags.hh"
-#include "config.h"
-#include "piper_proc.hh"
+# include "base/fs_util.hh"
+# include "base/injector.hh"
+# include "bound_tags.hh"
+# include "config.h"
+# include "piper_proc.hh"
std::string
action_delegate::execute_action(const std::string& action_name)
@@ -235,3 +236,4 @@ action_delegate::text_handle_mouse(textview_curses& tc, mouse_event& me)
return retval;
}
+#endif
diff --git a/src/log_actions.hh b/src/log_actions.hh
index 02dc476..cdbb0e2 100644
--- a/src/log_actions.hh
+++ b/src/log_actions.hh
@@ -30,11 +30,12 @@
#ifndef log_actions_hh
#define log_actions_hh
-#include <functional>
-#include <utility>
+#if 0
+# include <functional>
+# include <utility>
-#include "log_data_helper.hh"
-#include "logfile_sub_source.hh"
+# include "log_data_helper.hh"
+# include "logfile_sub_source.hh"
class piper_proc;
@@ -63,5 +64,6 @@ private:
int ad_press_value{-1};
size_t ad_line_index{0};
};
+#endif
#endif
diff --git a/src/log_data_helper.cc b/src/log_data_helper.cc
index ade077a..2828883 100644
--- a/src/log_data_helper.cc
+++ b/src/log_data_helper.cc
@@ -41,6 +41,7 @@ log_data_helper::clear()
this->ldh_parser.reset();
this->ldh_scanner.reset();
this->ldh_namer.reset();
+ this->ldh_extra_json.clear();
this->ldh_json_pairs.clear();
this->ldh_xml_pairs.clear();
this->ldh_line_attrs.clear();
@@ -63,9 +64,11 @@ log_data_helper::parse_line(content_line_t line, bool allow_middle)
}
this->ldh_line = ll;
if (!ll->is_message()) {
+ log_warning("failed to parse line %d", line);
this->ldh_parser.reset();
this->ldh_scanner.reset();
this->ldh_namer.reset();
+ this->ldh_extra_json.clear();
this->ldh_json_pairs.clear();
this->ldh_xml_pairs.clear();
this->ldh_line_attrs.clear();
@@ -95,6 +98,7 @@ log_data_helper::parse_line(content_line_t line, bool allow_middle)
this->ldh_parser->parse();
this->ldh_namer
= std::make_unique<column_namer>(column_namer::language::SQL);
+ this->ldh_extra_json.clear();
this->ldh_json_pairs.clear();
this->ldh_xml_pairs.clear();
@@ -104,8 +108,28 @@ log_data_helper::parse_line(content_line_t line, bool allow_middle)
}
for (auto& ldh_line_value : this->ldh_line_values.lvv_values) {
+ if (ldh_line_value.lv_meta.lvm_name == format->lf_timestamp_field) {
+ continue;
+ }
+ if (ldh_line_value.lv_meta.lvm_column
+ .is<logline_value_meta::external_column>())
+ {
+ char buf[ldh_line_value.lv_meta.lvm_name.size() + 2];
+
+ auto rc = fmt::format_to(
+ buf, FMT_STRING("/{}"), ldh_line_value.lv_meta.lvm_name);
+ *rc = '\0';
+ this->ldh_extra_json[intern_string::lookup(buf, -1)]
+ = ldh_line_value.to_string();
+ continue;
+ }
+
switch (ldh_line_value.lv_meta.lvm_kind) {
case value_kind_t::VALUE_JSON: {
+ if (!ldh_line_value.lv_meta.lvm_struct_name.empty()) {
+ continue;
+ }
+
json_ptr_walk jpw;
if (jpw.parse(ldh_line_value.text_value(),
@@ -200,15 +224,13 @@ log_data_helper::get_line_bounds(size_t& line_index_out,
std::string
log_data_helper::format_json_getter(const intern_string_t field, int index)
{
- auto_mem<char, sqlite3_free> qname;
- auto_mem<char, sqlite3_free> jget;
std::string retval;
- qname = sql_quote_ident(field.get());
- jget = sqlite3_mprintf("jget(%s,%Q)",
- qname.in(),
- this->ldh_json_pairs[field][index].wt_ptr.c_str());
- retval = std::string(jget);
+ auto qname = sql_quote_ident(field.get());
+ retval
+ = lnav::sql::mprintf("jget(%s,%Q)",
+ qname.in(),
+ this->ldh_json_pairs[field][index].wt_ptr.c_str());
return retval;
}
diff --git a/src/log_data_helper.hh b/src/log_data_helper.hh
index 235a4d8..e6f3ab6 100644
--- a/src/log_data_helper.hh
+++ b/src/log_data_helper.hh
@@ -83,6 +83,7 @@ public:
std::unique_ptr<column_namer> ldh_namer;
string_attrs_t ldh_line_attrs;
logline_value_vector ldh_line_values;
+ std::map<const intern_string_t, std::string> ldh_extra_json;
std::map<const intern_string_t, json_ptr_walk::walk_list_t> ldh_json_pairs;
std::map<std::pair<const intern_string_t, std::string>, std::string>
ldh_xml_pairs;
diff --git a/src/log_data_table.cc b/src/log_data_table.cc
index 384d7ce..f0e05e8 100644
--- a/src/log_data_table.cc
+++ b/src/log_data_table.cc
@@ -29,6 +29,7 @@
#include "log_data_table.hh"
+#include "column_namer.hh"
#include "config.h"
#include "scn/scn.h"
@@ -102,8 +103,10 @@ log_data_table::get_columns_int()
collator = "naturalnocase";
break;
}
- metas.emplace_back(
- intern_string::lookup(colname), kind, cols.size(), format.get());
+ metas.emplace_back(intern_string::lookup(colname),
+ kind,
+ logline_value_meta::table_column{cols.size()},
+ format.get());
cols.emplace_back(colname, sql_type, collator);
}
this->ldt_schema_id = dp.dp_schema_id;
diff --git a/src/log_data_table.hh b/src/log_data_table.hh
index 1ca3942..d95e5de 100644
--- a/src/log_data_table.hh
+++ b/src/log_data_table.hh
@@ -35,10 +35,8 @@
#include <string>
#include <vector>
-#include "column_namer.hh"
#include "data_parser.hh"
#include "log_vtab_impl.hh"
-#include "logfile.hh"
#include "logfile_sub_source.hh"
class log_data_table : public log_vtab_impl {
diff --git a/src/log_format.cc b/src/log_format.cc
index dd18f60..0569d39 100644
--- a/src/log_format.cc
+++ b/src/log_format.cc
@@ -27,13 +27,17 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <algorithm>
#include <memory>
#include <fnmatch.h>
#include <stdio.h>
#include <string.h>
+#include "base/fs_util.hh"
#include "base/is_utf8.hh"
+#include "base/map_util.hh"
+#include "base/opt_util.hh"
#include "base/snippet_highlighters.hh"
#include "base/string_util.hh"
#include "command_executor.hh"
@@ -44,8 +48,11 @@
#include "log_search_table.hh"
#include "log_vtab_impl.hh"
#include "ptimec.hh"
+#include "readline_highlighters.hh"
#include "scn/scn.h"
#include "sql_util.hh"
+#include "sqlite-extension-func.hh"
+#include "sqlitepp.hh"
#include "yajlpp/yajlpp.hh"
#include "yajlpp/yajlpp_def.hh"
@@ -65,6 +72,199 @@ external_log_format::mod_map_t external_log_format::MODULE_FORMATS;
std::vector<std::shared_ptr<external_log_format>>
external_log_format::GRAPH_ORDERED_FORMATS;
+static const uint32_t DATE_TIME_SET_FLAGS = ETF_YEAR_SET | ETF_MONTH_SET
+ | ETF_DAY_SET | ETF_HOUR_SET | ETF_MINUTE_SET | ETF_SECOND_SET;
+
+log_level_stats&
+log_level_stats::operator|=(const log_level_stats& rhs)
+{
+ this->lls_error_count += rhs.lls_error_count;
+ this->lls_warning_count += rhs.lls_warning_count;
+ this->lls_total_count += rhs.lls_total_count;
+
+ return *this;
+}
+
+log_op_description&
+log_op_description::operator|=(const log_op_description& rhs)
+{
+ if (!this->lod_id && rhs.lod_id) {
+ this->lod_id = rhs.lod_id;
+ }
+ if (this->lod_elements.size() < rhs.lod_elements.size()) {
+ this->lod_elements = rhs.lod_elements;
+ }
+
+ return *this;
+}
+
+opid_time_range&
+opid_time_range::operator|=(const opid_time_range& rhs)
+{
+ this->otr_range |= rhs.otr_range;
+ this->otr_description |= rhs.otr_description;
+ this->otr_level_stats |= rhs.otr_level_stats;
+ for (const auto& rhs_sub : rhs.otr_sub_ops) {
+ bool found = false;
+
+ for (auto& sub : this->otr_sub_ops) {
+ if (sub.ostr_subid == rhs_sub.ostr_subid) {
+ sub.ostr_range |= rhs_sub.ostr_range;
+ found = true;
+ }
+ }
+ if (!found) {
+ this->otr_sub_ops.emplace_back(rhs_sub);
+ }
+ }
+ std::stable_sort(this->otr_sub_ops.begin(), this->otr_sub_ops.end());
+
+ return *this;
+}
+
+void
+log_level_stats::update_msg_count(log_level_t lvl)
+{
+ switch (lvl) {
+ case LEVEL_FATAL:
+ case LEVEL_CRITICAL:
+ case LEVEL_ERROR:
+ this->lls_error_count += 1;
+ break;
+ case LEVEL_WARNING:
+ this->lls_warning_count += 1;
+ break;
+ default:
+ break;
+ }
+ this->lls_total_count += 1;
+}
+
+void
+opid_time_range::close_sub_ops(const string_fragment& subid)
+{
+ for (auto& other_sub : this->otr_sub_ops) {
+ if (other_sub.ostr_subid == subid) {
+ other_sub.ostr_open = false;
+ }
+ }
+}
+
+opid_sub_time_range*
+log_opid_state::sub_op_in_use(ArenaAlloc::Alloc<char>& alloc,
+ log_opid_map::iterator& op_iter,
+ const string_fragment& subid,
+ const timeval& tv,
+ log_level_t level)
+{
+ const auto& opid = op_iter->first;
+ auto sub_iter = this->los_sub_in_use.find(subid);
+ if (sub_iter == this->los_sub_in_use.end()) {
+ auto emp_res
+ = this->los_sub_in_use.emplace(subid.to_owned(alloc), opid);
+
+ sub_iter = emp_res.first;
+ }
+
+ auto retval = sub_iter->first;
+ if (sub_iter->second != opid) {
+ auto other_otr
+ = lnav::map::find(this->los_opid_ranges, sub_iter->second);
+ if (other_otr) {
+ other_otr->get().close_sub_ops(retval);
+ }
+ }
+ sub_iter->second = opid;
+
+ auto& otr = op_iter->second;
+ auto sub_op_iter = otr.otr_sub_ops.rbegin();
+ for (; sub_op_iter != otr.otr_sub_ops.rend(); ++sub_op_iter) {
+ if (sub_op_iter->ostr_open && sub_op_iter->ostr_subid == retval) {
+ break;
+ }
+ }
+ if (sub_op_iter == otr.otr_sub_ops.rend()) {
+ otr.otr_sub_ops.emplace_back(opid_sub_time_range{
+ retval,
+ time_range{tv, tv},
+ });
+ otr.otr_sub_ops.back().ostr_level_stats.update_msg_count(level);
+
+ return &otr.otr_sub_ops.back();
+ } else {
+ sub_op_iter->ostr_range.extend_to(tv);
+ sub_op_iter->ostr_level_stats.update_msg_count(level);
+ return &(*sub_op_iter);
+ }
+}
+
+nonstd::optional<std::string>
+log_format::opid_descriptor::matches(const string_fragment& sf) const
+{
+ if (this->od_extractor.pp_value) {
+ static thread_local auto desc_md
+ = lnav::pcre2pp::match_data::unitialized();
+
+ auto desc_match_res = this->od_extractor.pp_value->capture_from(sf)
+ .into(desc_md)
+ .matches(PCRE2_NO_UTF_CHECK | PCRE2_ANCHORED)
+ .ignore_error();
+ if (desc_match_res) {
+ return desc_md.to_string();
+ }
+
+ return nonstd::nullopt;
+ }
+ return sf.to_string();
+}
+
+std::string
+log_format::opid_descriptors::to_string(
+ const lnav::map::small<size_t, std::string>& lod) const
+{
+ std::string retval;
+
+ for (size_t lpc = 0; lpc < this->od_descriptors->size(); lpc++) {
+ retval.append(this->od_descriptors->at(lpc).od_prefix);
+ auto iter = lod.find(lpc);
+ if (iter != lod.end()) {
+ retval.append(iter->second);
+ }
+ retval.append(this->od_descriptors->at(lpc).od_suffix);
+ }
+
+ return retval;
+}
+
+chart_type_t
+logline_value_meta::to_chart_type() const
+{
+ auto retval = chart_type_t::hist;
+ switch (this->lvm_kind) {
+ case value_kind_t::VALUE_NULL:
+ retval = chart_type_t::none;
+ break;
+ case value_kind_t::VALUE_INTEGER:
+ if (!this->lvm_identifier && !this->lvm_foreign_key) {
+ retval = chart_type_t::spectro;
+ }
+ break;
+ case value_kind_t::VALUE_FLOAT:
+ retval = chart_type_t::spectro;
+ break;
+ case value_kind_t::VALUE_XML:
+ case value_kind_t::VALUE_JSON:
+ case value_kind_t::VALUE_BOOLEAN:
+ case value_kind_t::VALUE_TIMESTAMP:
+ retval = chart_type_t::none;
+ break;
+ default:
+ break;
+ }
+
+ return retval;
+}
+
struct line_range
logline_value::origin_in_full_msg(const char* msg, ssize_t len) const
{
@@ -254,6 +454,152 @@ log_format::get_root_formats()
return lf_root_formats;
}
+void
+external_log_format::update_op_description(
+ const std::map<intern_string_t, opid_descriptors>& desc_defs,
+ log_op_description& lod,
+ const pattern* fpat,
+ const lnav::pcre2pp::match_data& md)
+{
+ nonstd::optional<std::string> desc_elem_str;
+ if (!lod.lod_id) {
+ for (const auto& desc_def_pair : desc_defs) {
+ if (lod.lod_id) {
+ break;
+ }
+ for (const auto& desc_def : *desc_def_pair.second.od_descriptors) {
+ auto desc_field_index_iter = fpat->p_value_name_to_index.find(
+ desc_def.od_field.pp_value);
+
+ if (desc_field_index_iter == fpat->p_value_name_to_index.end())
+ {
+ continue;
+ }
+ auto desc_cap_opt = md[desc_field_index_iter->second];
+
+ if (!desc_cap_opt) {
+ continue;
+ }
+
+ desc_elem_str = desc_def.matches(desc_cap_opt.value());
+ if (desc_elem_str) {
+ lod.lod_id = desc_def_pair.first;
+ }
+ }
+ }
+ }
+ if (lod.lod_id) {
+ const auto& desc_def_v
+ = *desc_defs.find(lod.lod_id.value())->second.od_descriptors;
+ auto& desc_v = lod.lod_elements;
+
+ if (desc_def_v.size() == desc_v.size()) {
+ return;
+ }
+ for (size_t desc_def_index = 0; desc_def_index < desc_def_v.size();
+ desc_def_index++)
+ {
+ const auto& desc_def = desc_def_v[desc_def_index];
+ auto found_desc = desc_v.begin();
+
+ for (; found_desc != desc_v.end(); ++found_desc) {
+ if (found_desc->first == desc_def_index) {
+ break;
+ }
+ }
+ auto desc_field_index_iter
+ = fpat->p_value_name_to_index.find(desc_def.od_field.pp_value);
+
+ if (desc_field_index_iter == fpat->p_value_name_to_index.end()) {
+ continue;
+ }
+ auto desc_cap_opt = md[desc_field_index_iter->second];
+ if (!desc_cap_opt) {
+ continue;
+ }
+
+ if (!desc_elem_str) {
+ desc_elem_str = desc_def.matches(desc_cap_opt.value());
+ }
+ if (desc_elem_str) {
+ if (found_desc == desc_v.end()) {
+ desc_v.emplace_back(desc_def_index, desc_elem_str.value());
+ } else if (!desc_elem_str->empty()) {
+ found_desc->second.append(desc_def.od_joiner);
+ found_desc->second.append(desc_elem_str.value());
+ }
+ }
+ desc_elem_str = nonstd::nullopt;
+ }
+ }
+}
+
+void
+external_log_format::update_op_description(
+ const std::map<intern_string_t, opid_descriptors>& desc_defs,
+ log_op_description& lod)
+{
+ nonstd::optional<std::string> desc_elem_str;
+ if (!lod.lod_id) {
+ for (const auto& desc_def_pair : desc_defs) {
+ if (lod.lod_id) {
+ break;
+ }
+ for (const auto& desc_def : *desc_def_pair.second.od_descriptors) {
+ auto desc_cap_iter
+ = this->lf_desc_captures.find(desc_def.od_field.pp_value);
+
+ if (desc_cap_iter == this->lf_desc_captures.end()) {
+ continue;
+ }
+ desc_elem_str = desc_def.matches(desc_cap_iter->second);
+ if (desc_elem_str) {
+ lod.lod_id = desc_def_pair.first;
+ }
+ }
+ }
+ }
+ if (lod.lod_id) {
+ const auto& desc_def_v
+ = *desc_defs.find(lod.lod_id.value())->second.od_descriptors;
+ auto& desc_v = lod.lod_elements;
+
+ if (desc_def_v.size() != desc_v.size()) {
+ for (size_t desc_def_index = 0; desc_def_index < desc_def_v.size();
+ desc_def_index++)
+ {
+ const auto& desc_def = desc_def_v[desc_def_index];
+ auto found_desc = desc_v.begin();
+
+ for (; found_desc != desc_v.end(); ++found_desc) {
+ if (found_desc->first == desc_def_index) {
+ break;
+ }
+ }
+ auto desc_cap_iter
+ = this->lf_desc_captures.find(desc_def.od_field.pp_value);
+ if (desc_cap_iter == this->lf_desc_captures.end()) {
+ continue;
+ }
+
+ if (!desc_elem_str) {
+ desc_elem_str = desc_def.matches(desc_cap_iter->second);
+ }
+ if (desc_elem_str) {
+ if (found_desc == desc_v.end()) {
+ desc_v.emplace_back(desc_def_index,
+ desc_elem_str.value());
+ } else if (!desc_elem_str->empty()) {
+ found_desc->second.append(desc_def.od_joiner);
+ found_desc->second.append(desc_elem_str.value());
+ }
+ }
+ desc_elem_str = nonstd::nullopt;
+ }
+ }
+ }
+}
+
static bool
next_format(
const std::vector<std::shared_ptr<external_log_format::pattern>>& patterns,
@@ -277,7 +623,7 @@ next_format(
}
bool
-log_format::next_format(pcre_format* fmt, int& index, int& locked_index)
+log_format::next_format(const pcre_format* fmt, int& index, int& locked_index)
{
bool retval = true;
@@ -298,7 +644,7 @@ log_format::next_format(pcre_format* fmt, int& index, int& locked_index)
const char*
log_format::log_scanf(uint32_t line_number,
string_fragment line,
- pcre_format* fmt,
+ const pcre_format* fmt,
const char* time_fmt[],
struct exttm* tm_out,
struct timeval* tv_out,
@@ -327,6 +673,33 @@ log_format::log_scanf(uint32_t line_number,
retval = this->lf_date_time.scan(
ts->data(), ts->length(), nullptr, tm_out, *tv_out);
+ if (retval == nullptr) {
+ auto ls = this->lf_date_time.unlock();
+ retval = this->lf_date_time.scan(
+ ts->data(), ts->length(), nullptr, tm_out, *tv_out);
+ if (retval != nullptr) {
+ auto old_flags
+ = this->lf_timestamp_flags & DATE_TIME_SET_FLAGS;
+ auto new_flags = tm_out->et_flags & DATE_TIME_SET_FLAGS;
+
+ // It is unlikely a valid timestamp would lose much
+ // precision.
+ if (new_flags != old_flags) {
+ retval = nullptr;
+ }
+ }
+ if (retval == nullptr) {
+ this->lf_date_time.relock(ls);
+ } else {
+ log_debug(
+ "%d: changed time format to '%s' due to %.*s",
+ line_number,
+ PTIMEC_FORMAT_STR[this->lf_date_time.dts_fmt_lock],
+ ts->length(),
+ ts->data());
+ }
+ }
+
if (retval) {
*ts_out = ts.value();
*level_out = md[2];
@@ -372,7 +745,7 @@ log_format::check_for_new_year(std::vector<logline>& dst,
off_month = 1;
} else if (!(etm.et_flags & ETF_DAY_SET) && (diff >= (60 * 60))) {
off_day = 1;
- } else if (!(etm.et_flags & ETF_DAY_SET)) {
+ } else if (!(etm.et_flags & ETF_HOUR_SET) && (diff >= 60)) {
off_hour = 1;
} else {
do_change = false;
@@ -448,6 +821,9 @@ struct json_log_userdata {
uint32_t jlu_quality{0};
shared_buffer_ref& jlu_shared_buffer;
scan_batch_context* jlu_batch_context;
+ nonstd::optional<string_fragment> jlu_opid_frag;
+ nonstd::optional<std::string> jlu_subid;
+ struct exttm jlu_exttm;
};
static int read_json_field(yajlpp_parse_context* ypc,
@@ -498,33 +874,44 @@ read_json_number(yajlpp_parse_context* ypc,
tv.tv_sec = val / divisor;
tv.tv_usec = fmod(val, divisor) * (1000000.0 / divisor);
- if (jlu->jlu_format->lf_date_time.dts_local_time) {
- struct tm ltm;
- localtime_r(&tv.tv_sec, &ltm);
-#ifdef HAVE_STRUCT_TM_TM_ZONE
- ltm.tm_zone = nullptr;
-#endif
- ltm.tm_isdst = 0;
- tv.tv_sec = tm2sec(&ltm);
+ jlu->jlu_format->lf_date_time.to_localtime(tv.tv_sec, jlu->jlu_exttm);
+ tv.tv_sec = tm2sec(&jlu->jlu_exttm.et_tm);
+ jlu->jlu_exttm.et_gmtoff
+ = jlu->jlu_format->lf_date_time.dts_local_offset_cache;
+ jlu->jlu_exttm.et_flags
+ |= ETF_MACHINE_ORIENTED | ETF_SUB_NOT_IN_FORMAT | ETF_ZONE_SET;
+ if (divisor == 1000) {
+ jlu->jlu_exttm.et_flags |= ETF_MILLIS_SET;
+ } else {
+ jlu->jlu_exttm.et_flags |= ETF_MICROS_SET;
}
+ jlu->jlu_exttm.et_nsec = jlu->jlu_exttm.et_nsec = tv.tv_usec * 1000;
jlu->jlu_base_line->set_time(tv);
} else if (jlu->jlu_format->lf_subsecond_field == field_name) {
uint64_t millis = 0;
+ jlu->jlu_exttm.et_flags &= ~(ETF_MICROS_SET | ETF_MILLIS_SET);
switch (jlu->jlu_format->lf_subsecond_unit.value()) {
case log_format::subsecond_unit::milli:
millis = val;
+ jlu->jlu_exttm.et_nsec = val * 1000000;
+ jlu->jlu_exttm.et_flags |= ETF_MILLIS_SET;
break;
case log_format::subsecond_unit::micro:
millis = std::chrono::duration_cast<std::chrono::milliseconds>(
std::chrono::microseconds((int64_t) val))
.count();
+ jlu->jlu_exttm.et_nsec = val * 1000;
+ jlu->jlu_exttm.et_flags |= ETF_MICROS_SET;
break;
case log_format::subsecond_unit::nano:
millis = std::chrono::duration_cast<std::chrono::milliseconds>(
std::chrono::nanoseconds((int64_t) val))
.count();
+ jlu->jlu_exttm.et_nsec = val;
+ jlu->jlu_exttm.et_flags |= ETF_NANOS_SET;
break;
}
+ jlu->jlu_exttm.et_flags |= ETF_SUB_NOT_IN_FORMAT;
jlu->jlu_base_line->set_millis(millis);
} else if (jlu->jlu_format->elf_level_field == field_name) {
if (jlu->jlu_format->elf_level_pairs.empty()) {
@@ -636,6 +1023,42 @@ rewrite_json_int(yajlpp_parse_context* ypc, long long val)
json_log_userdata* jlu = (json_log_userdata*) ypc->ypc_userdata;
const intern_string_t field_name = ypc->get_path();
+ if (jlu->jlu_format->lf_timestamp_field == field_name) {
+ long long divisor = jlu->jlu_format->elf_timestamp_divisor;
+ struct timeval tv;
+
+ tv.tv_sec = val / divisor;
+ tv.tv_usec = fmod(val, divisor) * (1000000.0 / divisor);
+ jlu->jlu_format->lf_date_time.to_localtime(tv.tv_sec, jlu->jlu_exttm);
+ jlu->jlu_exttm.et_gmtoff
+ = jlu->jlu_format->lf_date_time.dts_local_offset_cache;
+ jlu->jlu_exttm.et_flags |= ETF_MACHINE_ORIENTED | ETF_SUB_NOT_IN_FORMAT
+ | ETF_ZONE_SET | ETF_Z_FOR_UTC;
+ if (divisor == 1) {
+ jlu->jlu_exttm.et_flags |= ETF_MICROS_SET;
+ } else {
+ jlu->jlu_exttm.et_flags |= ETF_MILLIS_SET;
+ }
+ jlu->jlu_exttm.et_nsec = jlu->jlu_exttm.et_nsec = tv.tv_usec * 1000;
+ } else if (jlu->jlu_format->lf_subsecond_field == field_name) {
+ jlu->jlu_exttm.et_flags &= ~(ETF_MICROS_SET | ETF_MILLIS_SET);
+ switch (jlu->jlu_format->lf_subsecond_unit.value()) {
+ case log_format::subsecond_unit::milli:
+ jlu->jlu_exttm.et_nsec = val * 1000000;
+ jlu->jlu_exttm.et_flags |= ETF_MILLIS_SET;
+ break;
+ case log_format::subsecond_unit::micro:
+ jlu->jlu_exttm.et_nsec = val * 1000;
+ jlu->jlu_exttm.et_flags |= ETF_MICROS_SET;
+ break;
+ case log_format::subsecond_unit::nano:
+ jlu->jlu_exttm.et_nsec = val;
+ jlu->jlu_exttm.et_flags |= ETF_NANOS_SET;
+ break;
+ }
+ jlu->jlu_exttm.et_flags |= ETF_SUB_NOT_IN_FORMAT;
+ }
+
if (!ypc->is_level(1) && !jlu->jlu_format->has_value_def(field_name)) {
return 1;
}
@@ -652,6 +1075,42 @@ rewrite_json_double(yajlpp_parse_context* ypc, double val)
json_log_userdata* jlu = (json_log_userdata*) ypc->ypc_userdata;
const intern_string_t field_name = ypc->get_path();
+ if (jlu->jlu_format->lf_timestamp_field == field_name) {
+ long long divisor = jlu->jlu_format->elf_timestamp_divisor;
+ struct timeval tv;
+
+ tv.tv_sec = val / divisor;
+ tv.tv_usec = fmod(val, divisor) * (1000000.0 / divisor);
+ jlu->jlu_format->lf_date_time.to_localtime(tv.tv_sec, jlu->jlu_exttm);
+ jlu->jlu_exttm.et_gmtoff
+ = jlu->jlu_format->lf_date_time.dts_local_offset_cache;
+ jlu->jlu_exttm.et_flags |= ETF_MACHINE_ORIENTED | ETF_SUB_NOT_IN_FORMAT
+ | ETF_ZONE_SET | ETF_Z_FOR_UTC;
+ if (divisor == 1) {
+ jlu->jlu_exttm.et_flags |= ETF_MICROS_SET;
+ } else {
+ jlu->jlu_exttm.et_flags |= ETF_MILLIS_SET;
+ }
+ jlu->jlu_exttm.et_nsec = jlu->jlu_exttm.et_nsec = tv.tv_usec * 1000;
+ } else if (jlu->jlu_format->lf_subsecond_field == field_name) {
+ jlu->jlu_exttm.et_flags &= ~(ETF_MICROS_SET | ETF_MILLIS_SET);
+ switch (jlu->jlu_format->lf_subsecond_unit.value()) {
+ case log_format::subsecond_unit::milli:
+ jlu->jlu_exttm.et_nsec = val * 1000000;
+ jlu->jlu_exttm.et_flags |= ETF_MILLIS_SET;
+ break;
+ case log_format::subsecond_unit::micro:
+ jlu->jlu_exttm.et_nsec = val * 1000;
+ jlu->jlu_exttm.et_flags |= ETF_MICROS_SET;
+ break;
+ case log_format::subsecond_unit::nano:
+ jlu->jlu_exttm.et_nsec = val;
+ jlu->jlu_exttm.et_flags |= ETF_NANOS_SET;
+ break;
+ }
+ jlu->jlu_exttm.et_flags |= ETF_SUB_NOT_IN_FORMAT;
+ }
+
if (!ypc->is_level(1) && !jlu->jlu_format->has_value_def(field_name)) {
return 1;
}
@@ -715,6 +1174,17 @@ external_log_format::scan(logfile& lf,
shared_buffer_ref& sbr,
scan_batch_context& sbc)
{
+ if (dst.empty()) {
+ auto file_options = lf.get_file_options();
+
+ if (file_options) {
+ this->lf_date_time.dts_default_zone
+ = file_options->second.fo_default_zone.pp_value;
+ } else {
+ this->lf_date_time.dts_default_zone = nullptr;
+ }
+ }
+
if (this->elf_type == elf_type_t::ELF_TYPE_JSON) {
logline ll(li.li_file_range.fr_offset, 0, 0, LEVEL_INFO);
auto line_frag = sbr.to_string_fragment();
@@ -734,10 +1204,6 @@ external_log_format::scan(logfile& lf,
yajl_handle handle = this->jlf_yajl_handle.get();
json_log_userdata jlu(sbr, &sbc);
- if (!this->lf_specialized && dst.size() >= 3) {
- return log_format::scan_no_match{"file is not JSON-lines"};
- }
-
if (li.li_partial) {
log_debug("skipping partial line at offset %d",
li.li_file_range.fr_offset);
@@ -750,6 +1216,9 @@ external_log_format::scan(logfile& lf,
const auto* line_data = (const unsigned char*) sbr.get_data();
+ this->lf_desc_captures.clear();
+ this->lf_desc_allocator.reset();
+
yajl_reset(handle);
ypc.set_static_handler(json_log_handlers.jpc_children[0]);
ypc.ypc_userdata = &jlu;
@@ -777,6 +1246,56 @@ external_log_format::scan(logfile& lf,
"JSON message does not have expected timestamp property"};
}
+ if (jlu.jlu_opid_frag) {
+ this->jlf_line_values.lvv_opid_value
+ = jlu.jlu_opid_frag->to_string();
+ auto opid_iter = sbc.sbc_opids.los_opid_ranges.find(
+ jlu.jlu_opid_frag.value());
+ if (opid_iter == sbc.sbc_opids.los_opid_ranges.end()) {
+ auto otr = opid_time_range{
+ time_range{ll.get_timeval(), ll.get_timeval()},
+ };
+ auto emplace_res = sbc.sbc_opids.los_opid_ranges.emplace(
+ jlu.jlu_opid_frag.value(), otr);
+ opid_iter = emplace_res.first;
+ } else {
+ opid_iter->second.otr_range.extend_to(ll.get_timeval());
+ }
+
+ opid_iter->second.otr_level_stats.update_msg_count(
+ ll.get_msg_level());
+
+ if (jlu.jlu_subid) {
+ auto subid_frag
+ = string_fragment::from_str(jlu.jlu_subid.value());
+
+ auto* ostr
+ = sbc.sbc_opids.sub_op_in_use(sbc.sbc_allocator,
+ opid_iter,
+ subid_frag,
+ ll.get_timeval(),
+ ll.get_msg_level());
+ if (ostr != nullptr && ostr->ostr_description.empty()) {
+ log_op_description sub_desc;
+ this->update_op_description(
+ *this->lf_subid_description_def, sub_desc);
+ if (!sub_desc.lod_elements.empty()) {
+ auto& sub_desc_def
+ = this->lf_subid_description_def->at(
+ sub_desc.lod_id.value());
+ ostr->ostr_description
+ = sub_desc_def.to_string(sub_desc.lod_elements);
+ }
+ }
+ }
+
+ auto& otr = opid_iter->second;
+ this->update_op_description(*this->lf_opid_description_def,
+ otr.otr_description);
+ } else {
+ this->jlf_line_values.lvv_opid_value = nonstd::nullopt;
+ }
+
jlu.jlu_sub_line_count += this->jlf_line_format_init_count;
for (int lpc = 0; lpc < jlu.jlu_sub_line_count; lpc++) {
ll.set_sub_offset(lpc);
@@ -852,6 +1371,7 @@ external_log_format::scan(logfile& lf,
auto level_cap = md[fpat->p_level_field_index];
auto mod_cap = md[fpat->p_module_field_index];
auto opid_cap = md[fpat->p_opid_field_index];
+ auto subid_cap = md[fpat->p_subid_field_index];
auto body_cap = md[fpat->p_body_field_index];
const char* last;
struct exttm log_time_tm;
@@ -870,14 +1390,20 @@ external_log_format::scan(logfile& lf,
ts = string_fragment::from_bytes(combined_datetime_buf, ts_str_len);
}
- if ((last = this->lf_date_time.scan(ts->data(),
- ts->length(),
- this->get_timestamp_formats(),
- &log_time_tm,
- log_tv))
- == nullptr)
+ auto level = this->convert_level(
+ level_cap.value_or(string_fragment::invalid()), &sbc);
+
+ if (!ts) {
+ level = log_level_t::LEVEL_INVALID;
+ } else if ((last
+ = this->lf_date_time.scan(ts->data(),
+ ts->length(),
+ this->get_timestamp_formats(),
+ &log_time_tm,
+ log_tv))
+ == nullptr)
{
- this->lf_date_time.unlock();
+ auto ls = this->lf_date_time.unlock();
if ((last = this->lf_date_time.scan(ts->data(),
ts->length(),
this->get_timestamp_formats(),
@@ -885,15 +1411,43 @@ external_log_format::scan(logfile& lf,
log_tv))
== nullptr)
{
+ this->lf_date_time.relock(ls);
continue;
}
- }
+ if (last != nullptr) {
+ auto old_flags = this->lf_timestamp_flags & DATE_TIME_SET_FLAGS;
+ auto new_flags = log_time_tm.et_flags & DATE_TIME_SET_FLAGS;
- auto level = this->convert_level(
- level_cap.value_or(string_fragment::invalid()), &sbc);
+ // It is unlikely a valid timestamp would lose much
+ // precision.
+ if (new_flags != old_flags) {
+ continue;
+ }
+ }
+
+ log_debug("%s:%d: date-time re-locked to %d",
+ lf.get_unique_path().c_str(),
+ dst.size(),
+ this->lf_date_time.dts_fmt_lock);
+ }
this->lf_timestamp_flags = log_time_tm.et_flags;
+ if (!(this->lf_timestamp_flags
+ & (ETF_MILLIS_SET | ETF_MICROS_SET | ETF_NANOS_SET))
+ && !dst.empty() && dst.back().get_time() == log_tv.tv_sec
+ && dst.back().get_millis() != 0)
+ {
+ auto log_ms = std::chrono::milliseconds(dst.back().get_millis());
+
+ log_time_tm.et_nsec
+ = std::chrono::duration_cast<std::chrono::nanoseconds>(log_ms)
+ .count();
+ log_tv.tv_usec
+ = std::chrono::duration_cast<std::chrono::microseconds>(log_ms)
+ .count();
+ }
+
if (!((log_time_tm.et_flags & ETF_DAY_SET)
&& (log_time_tm.et_flags & ETF_MONTH_SET)
&& (log_time_tm.et_flags & ETF_YEAR_SET)))
@@ -902,17 +1456,43 @@ external_log_format::scan(logfile& lf,
}
if (opid_cap && !opid_cap->empty()) {
- {
- auto opid_iter = sbc.sbc_opids.find(opid_cap.value());
+ auto opid_iter
+ = sbc.sbc_opids.los_opid_ranges.find(opid_cap.value());
+
+ if (opid_iter == sbc.sbc_opids.los_opid_ranges.end()) {
+ auto opid_copy = opid_cap->to_owned(sbc.sbc_allocator);
+ auto otr = opid_time_range{time_range{log_tv, log_tv}};
+ auto emplace_res
+ = sbc.sbc_opids.los_opid_ranges.emplace(opid_copy, otr);
+ opid_iter = emplace_res.first;
+ } else {
+ opid_iter->second.otr_range.extend_to(log_tv);
+ }
- if (opid_iter == sbc.sbc_opids.end()) {
- auto opid_copy = opid_cap->to_owned(sbc.sbc_allocator);
- auto otr = opid_time_range{log_tv, log_tv};
- sbc.sbc_opids.emplace(opid_copy, otr);
- } else {
- opid_iter->second.otr_end = log_tv;
+ auto& otr = opid_iter->second;
+
+ otr.otr_level_stats.update_msg_count(level);
+
+ if (subid_cap && !subid_cap->empty()) {
+ auto* ostr = sbc.sbc_opids.sub_op_in_use(sbc.sbc_allocator,
+ opid_iter,
+ subid_cap.value(),
+ log_tv,
+ level);
+ if (ostr != nullptr && ostr->ostr_description.empty()) {
+ log_op_description sub_desc;
+ this->update_op_description(
+ *this->lf_subid_description_def, sub_desc, fpat, md);
+ if (!sub_desc.lod_elements.empty()) {
+ auto& sub_desc_def = this->lf_subid_description_def->at(
+ sub_desc.lod_id.value());
+ ostr->ostr_description
+ = sub_desc_def.to_string(sub_desc.lod_elements);
+ }
}
}
+ this->update_op_description(
+ *this->lf_opid_description_def, otr.otr_description, fpat, md);
opid = hash_str(opid_cap->data(), opid_cap->length());
}
@@ -999,10 +1579,29 @@ external_log_format::scan(logfile& lf,
}
}
- auto scan_res
- = scn::scan_value<double>(num_cap->to_string_view());
- if (scan_res) {
- auto dvalue = scan_res.value();
+ nonstd::optional<double> dvalue_opt;
+ switch (vd.vd_meta.lvm_kind) {
+ case value_kind_t::VALUE_INTEGER: {
+ auto scan_res = scn::scan_value<int64_t>(
+ num_cap->to_string_view());
+ if (scan_res) {
+ dvalue_opt = scan_res.value();
+ }
+ break;
+ }
+ case value_kind_t::VALUE_FLOAT: {
+ auto scan_res = scn::scan_value<double>(
+ num_cap->to_string_view());
+ if (scan_res) {
+ dvalue_opt = scan_res.value();
+ }
+ break;
+ }
+ default:
+ break;
+ }
+ if (dvalue_opt) {
+ auto dvalue = dvalue_opt.value();
if (scaling != nullptr) {
scaling->scale(dvalue);
}
@@ -1018,10 +1617,12 @@ external_log_format::scan(logfile& lf,
if (orig_lock != curr_fmt) {
uint32_t lock_line;
- log_debug("%zu: changing pattern lock %d -> %d",
+ log_debug("%s:%zu: changing pattern lock %d -> (%d)%s",
+ lf.get_unique_path().c_str(),
dst.size() - 1,
orig_lock,
- curr_fmt);
+ curr_fmt,
+ this->elf_pattern_order[curr_fmt]->p_name.c_str());
if (this->lf_pattern_locks.empty()) {
lock_line = 0;
} else {
@@ -1112,7 +1713,7 @@ external_log_format::annotate(uint64_t line_number,
values = this->jlf_line_values;
sa = this->jlf_line_attrs;
} else {
- values.lvv_sbr = this->jlf_line_values.lvv_sbr;
+ values.lvv_sbr = this->jlf_line_values.lvv_sbr.clone();
for (const auto& llv : this->jlf_line_values.lvv_values) {
if (this->jlf_cached_sub_range.contains(llv.lv_origin)) {
values.lvv_values.emplace_back(llv);
@@ -1124,6 +1725,9 @@ external_log_format::annotate(uint64_t line_number,
for (const auto& attr : this->jlf_line_attrs) {
if (this->jlf_cached_sub_range.contains(attr.sa_range)) {
sa.emplace_back(attr);
+ sa.back().sa_range.shift(
+ this->jlf_cached_sub_range.lr_start,
+ -this->jlf_cached_sub_range.lr_start);
}
}
}
@@ -1177,9 +1781,10 @@ external_log_format::annotate(uint64_t line_number,
}
auto opid_cap = md[pat.p_opid_field_index];
- if (opid_cap) {
+ if (opid_cap && !opid_cap->empty()) {
sa.emplace_back(to_line_range(opid_cap.value()),
logline::L_OPID.value());
+ values.lvv_opid_value = opid_cap->to_string();
}
}
@@ -1273,7 +1878,8 @@ external_log_format::rewrite(exec_context& ec,
++iter)
{
if (!iter->lv_origin.is_valid()) {
- log_debug("not rewriting value with invalid origin -- %s",
+ log_debug("%d: not rewriting value with invalid origin -- %s",
+ ec.ec_top_line,
iter->lv_meta.lvm_name.get());
continue;
}
@@ -1295,24 +1901,49 @@ external_log_format::rewrite(exec_context& ec,
vd_iter->second->vd_rewrite_src_name, 1, vd.vd_rewriter);
std::string field_value;
- auto exec_res = execute_any(ec, vd.vd_rewriter);
- if (exec_res.isOk()) {
- field_value = exec_res.unwrap();
- } else {
- field_value = exec_res.unwrapErr().to_attr_line().get_string();
+ auto_mem<FILE> tmpout(fclose);
+
+ tmpout = std::tmpfile();
+ if (!tmpout) {
+ log_error("unable to create temporary file");
+ return;
+ }
+ fcntl(fileno(tmpout), F_SETFD, FD_CLOEXEC);
+ auto fd_copy = auto_fd::dup_of(fileno(tmpout));
+ fd_copy.close_on_exec();
+ auto ec_out = std::make_pair(tmpout.release(), fclose);
+ {
+ exec_context::output_guard og(ec, "tmp", ec_out);
+
+ auto exec_res = execute_any(ec, vd.vd_rewriter);
+ if (exec_res.isOk()) {
+ field_value = exec_res.unwrap();
+ } else {
+ field_value = exec_res.unwrapErr().to_attr_line().get_string();
+ }
+ }
+ struct stat st;
+ fstat(fd_copy.get(), &st);
+ if (st.st_size > 0) {
+ auto buf = auto_buffer::alloc(st.st_size);
+
+ buf.resize(st.st_size);
+ pread(fd_copy.get(), buf.in(), st.st_size, 0);
+ field_value = buf.to_string();
}
value_out.erase(iter->lv_origin.lr_start, iter->lv_origin.length());
int32_t shift_amount
= ((int32_t) field_value.length()) - iter->lv_origin.length();
+ auto orig_lr = iter->lv_origin;
value_out.insert(iter->lv_origin.lr_start, field_value);
for (shift_iter = values.lvv_values.begin();
shift_iter != values.lvv_values.end();
++shift_iter)
{
- shift_iter->lv_origin.shift(iter->lv_origin.lr_start, shift_amount);
+ shift_iter->lv_origin.shift_range(orig_lr, shift_amount);
}
- shift_string_attrs(sa, iter->lv_origin.lr_start, shift_amount);
+ shift_string_attrs(sa, orig_lr, shift_amount);
}
}
@@ -1321,37 +1952,78 @@ read_json_field(yajlpp_parse_context* ypc, const unsigned char* str, size_t len)
{
json_log_userdata* jlu = (json_log_userdata*) ypc->ypc_userdata;
const intern_string_t field_name = ypc->get_path();
- struct exttm tm_out;
struct timeval tv_out;
+ auto frag = string_fragment::from_bytes(str, len);
if (jlu->jlu_format->lf_timestamp_field == field_name) {
- jlu->jlu_format->lf_date_time.scan(
+ const auto* last = jlu->jlu_format->lf_date_time.scan(
(const char*) str,
len,
jlu->jlu_format->get_timestamp_formats(),
- &tm_out,
+ &jlu->jlu_exttm,
tv_out);
- // Leave off the machine oriented flag since we convert it anyhow
- jlu->jlu_format->lf_timestamp_flags
- = tm_out.et_flags & ~ETF_MACHINE_ORIENTED;
- jlu->jlu_base_line->set_time(tv_out);
+ if (last == nullptr) {
+ auto ls = jlu->jlu_format->lf_date_time.unlock();
+ if ((last = jlu->jlu_format->lf_date_time.scan(
+ (const char*) str,
+ len,
+ jlu->jlu_format->get_timestamp_formats(),
+ &jlu->jlu_exttm,
+ tv_out))
+ == nullptr)
+ {
+ jlu->jlu_format->lf_date_time.relock(ls);
+ }
+ if (last != nullptr) {
+ auto old_flags
+ = jlu->jlu_format->lf_timestamp_flags & DATE_TIME_SET_FLAGS;
+ auto new_flags = jlu->jlu_exttm.et_flags & DATE_TIME_SET_FLAGS;
+
+ // It is unlikely a valid timestamp would lose much
+ // precision.
+ if (new_flags != old_flags) {
+ last = nullptr;
+ }
+ }
+ }
+ if (last != nullptr) {
+ jlu->jlu_format->lf_timestamp_flags = jlu->jlu_exttm.et_flags;
+ jlu->jlu_base_line->set_time(tv_out);
+ }
} else if (jlu->jlu_format->elf_level_pointer.pp_value != nullptr) {
if (jlu->jlu_format->elf_level_pointer.pp_value
->find_in(field_name.to_string_fragment(), PCRE2_NO_UTF_CHECK)
.ignore_error()
.has_value())
{
- jlu->jlu_base_line->set_level(jlu->jlu_format->convert_level(
- string_fragment::from_bytes(str, len), jlu->jlu_batch_context));
+ jlu->jlu_base_line->set_level(
+ jlu->jlu_format->convert_level(frag, jlu->jlu_batch_context));
}
}
if (jlu->jlu_format->elf_level_field == field_name) {
- jlu->jlu_base_line->set_level(jlu->jlu_format->convert_level(
- string_fragment::from_bytes(str, len), jlu->jlu_batch_context));
+ jlu->jlu_base_line->set_level(
+ jlu->jlu_format->convert_level(frag, jlu->jlu_batch_context));
}
if (jlu->jlu_format->elf_opid_field == field_name) {
uint8_t opid = hash_str((const char*) str, len);
jlu->jlu_base_line->set_opid(opid);
+
+ auto& sbc = *jlu->jlu_batch_context;
+ auto opid_iter = sbc.sbc_opids.los_opid_ranges.find(frag);
+ if (opid_iter == sbc.sbc_opids.los_opid_ranges.end()) {
+ jlu->jlu_opid_frag = frag.to_owned(sbc.sbc_allocator);
+ } else {
+ jlu->jlu_opid_frag = opid_iter->first;
+ }
+ }
+ if (jlu->jlu_format->elf_subid_field == field_name) {
+ jlu->jlu_subid = frag.to_string();
+ }
+
+ if (jlu->jlu_format->lf_desc_fields.contains(field_name)) {
+ auto frag_copy = frag.to_owned(jlu->jlu_format->lf_desc_allocator);
+
+ jlu->jlu_format->lf_desc_captures.emplace(field_name, frag_copy);
}
jlu->add_sub_lines_for(
@@ -1369,25 +2041,55 @@ rewrite_json_field(yajlpp_parse_context* ypc,
json_log_userdata* jlu = (json_log_userdata*) ypc->ypc_userdata;
const intern_string_t field_name = ypc->get_path();
+ if (jlu->jlu_format->elf_opid_field == field_name) {
+ auto frag = string_fragment::from_bytes(str, len);
+ jlu->jlu_format->jlf_line_values.lvv_opid_value = frag.to_string();
+ }
if (jlu->jlu_format->lf_timestamp_field == field_name) {
char time_buf[64];
// TODO add a timeval kind to logline_value
- if (jlu->jlu_line->is_time_skewed()) {
+ if (jlu->jlu_line->is_time_skewed()
+ || (jlu->jlu_format->lf_timestamp_flags
+ & (ETF_MICROS_SET | ETF_NANOS_SET | ETF_ZONE_SET)))
+ {
struct timeval tv;
- struct exttm tm;
- jlu->jlu_format->lf_date_time.scan(
+ const auto* last = jlu->jlu_format->lf_date_time.scan(
(const char*) str,
len,
jlu->jlu_format->get_timestamp_formats(),
- &tm,
+ &jlu->jlu_exttm,
tv);
- sql_strftime(time_buf, sizeof(time_buf), tv, 'T');
+ if (last == nullptr) {
+ auto ls = jlu->jlu_format->lf_date_time.unlock();
+ if ((last = jlu->jlu_format->lf_date_time.scan(
+ (const char*) str,
+ len,
+ jlu->jlu_format->get_timestamp_formats(),
+ &jlu->jlu_exttm,
+ tv))
+ == nullptr)
+ {
+ jlu->jlu_format->lf_date_time.relock(ls);
+ }
+ }
+ jlu->jlu_format->lf_date_time.ftime(
+ time_buf,
+ sizeof(time_buf),
+ jlu->jlu_format->get_timestamp_formats(),
+ jlu->jlu_exttm);
} else {
sql_strftime(
time_buf, sizeof(time_buf), jlu->jlu_line->get_timeval(), 'T');
}
+ if (jlu->jlu_exttm.et_flags & ETF_ZONE_SET
+ && jlu->jlu_format->lf_date_time.dts_zoned_to_local)
+ {
+ jlu->jlu_exttm.et_flags &= ~ETF_Z_IS_UTC;
+ }
+ jlu->jlu_exttm.et_gmtoff
+ = jlu->jlu_format->lf_date_time.dts_local_offset_cache;
jlu->jlu_format->jlf_line_values.lvv_values.emplace_back(
jlu->jlu_format->get_value_meta(field_name,
value_kind_t::VALUE_TEXT),
@@ -1396,8 +2098,10 @@ rewrite_json_field(yajlpp_parse_context* ypc,
auto str_offset = (int) ((const char*) str - jlu->jlu_line_value);
if (field_name == jlu->jlu_format->elf_body_field) {
jlu->jlu_format->jlf_line_values.lvv_values.emplace_back(
- jlu->jlu_format->get_value_meta(body_name,
- value_kind_t::VALUE_TEXT),
+ logline_value_meta(body_name,
+ value_kind_t::VALUE_TEXT,
+ logline_value_meta::internal_column{},
+ jlu->jlu_format),
string_fragment::from_byte_range(
jlu->jlu_shared_buffer.get_data(),
str_offset,
@@ -1416,8 +2120,10 @@ rewrite_json_field(yajlpp_parse_context* ypc,
} else {
if (field_name == jlu->jlu_format->elf_body_field) {
jlu->jlu_format->jlf_line_values.lvv_values.emplace_back(
- jlu->jlu_format->get_value_meta(body_name,
- value_kind_t::VALUE_TEXT),
+ logline_value_meta(body_name,
+ value_kind_t::VALUE_TEXT,
+ logline_value_meta::internal_column{},
+ jlu->jlu_format),
std::string{(const char*) str, len});
}
if (!ypc->is_level(1) && !jlu->jlu_format->has_value_def(field_name)) {
@@ -1466,7 +2172,7 @@ external_log_format::get_subline(const logline& ll,
sbr.share(this->jlf_share_manager,
&this->jlf_cached_line[0],
this->jlf_cached_line.size());
- this->jlf_line_values.lvv_sbr = sbr;
+ this->jlf_line_values.lvv_sbr = sbr.clone();
this->jlf_line_attrs.emplace_back(
line_range{0, -1},
SA_INVALID.value(fmt::format(
@@ -1520,15 +2226,18 @@ external_log_format::get_subline(const logline& ll,
struct line_range lr;
memset(used_values, 0, sizeof(used_values));
-
for (lv_iter = this->jlf_line_values.lvv_values.begin();
lv_iter != this->jlf_line_values.lvv_values.end();
++lv_iter)
{
lv_iter->lv_meta.lvm_format = this;
}
+ if (jlu.jlu_opid_frag) {
+ this->jlf_line_values.lvv_opid_value
+ = jlu.jlu_opid_frag->to_string();
+ }
- int sub_offset = 1 + this->jlf_line_format_init_count;
+ int sub_offset = this->jlf_line_format_init_count;
for (const auto& jfe : this->jlf_line_format) {
static const intern_string_t ts_field
= intern_string::lookup("__timestamp__", -1);
@@ -1549,6 +2258,14 @@ external_log_format::get_subline(const logline& ll,
logline_value_cmp(&jfe.jfe_value.pp_value));
if (lv_iter != this->jlf_line_values.lvv_values.end()) {
auto str = lv_iter->to_string();
+ value_def* vd = nullptr;
+
+ if (lv_iter->lv_meta.lvm_values_index) {
+ vd = this->elf_value_def_order
+ [lv_iter->lv_meta.lvm_values_index
+ .value()]
+ .get();
+ }
while (endswith(str, "\n")) {
str.pop_back();
}
@@ -1563,15 +2280,13 @@ external_log_format::get_subline(const logline& ll,
switch (jfe.jfe_overflow) {
case json_format_element::overflow_t::
ABBREV: {
- this->json_append_to_cache(str.c_str(),
- str.size());
- size_t new_size = abbreviate_str(
- &this->jlf_cached_line[lr.lr_start],
- str.size(),
- jfe.jfe_max_width);
-
- this->jlf_cached_line.resize(
- lr.lr_start + new_size);
+ size_t new_size
+ = abbreviate_str(&str[0],
+ str.size(),
+ jfe.jfe_max_width);
+ str.resize(new_size);
+ this->json_append(
+ jfe, vd, str.data(), str.size());
break;
}
case json_format_element::overflow_t::
@@ -1594,16 +2309,19 @@ external_log_format::get_subline(const logline& ll,
rest);
break;
}
+ case json_format_element::overflow_t::
+ LASTWORD: {
+ size_t new_size
+ = last_word_str(&str[0],
+ str.size(),
+ jfe.jfe_max_width);
+ str.resize(new_size);
+ this->json_append(
+ jfe, vd, str.data(), str.size());
+ break;
+ }
}
} else {
- value_def* vd = nullptr;
-
- if (lv_iter->lv_meta.lvm_values_index) {
- vd = this->elf_value_def_order
- [lv_iter->lv_meta.lvm_values_index
- .value()]
- .get();
- }
sub_offset
+= std::count(str.begin(), str.end(), '\n');
this->json_append(
@@ -1627,12 +2345,14 @@ external_log_format::get_subline(const logline& ll,
this->jlf_line_attrs.emplace_back(
lr, SA_BODY.value());
} else if (lv_iter->lv_meta.lvm_name
- == this->elf_opid_field)
+ == this->elf_opid_field
+ && !lr.empty())
{
this->jlf_line_attrs.emplace_back(
lr, logline::L_OPID.value());
}
lv_iter->lv_origin = lr;
+ lv_iter->lv_sub_offset = sub_offset;
used_values[std::distance(
this->jlf_line_values.lvv_values.begin(),
lv_iter)]
@@ -1645,14 +2365,22 @@ external_log_format::get_subline(const logline& ll,
struct line_range lr;
ssize_t ts_len;
char ts[64];
+ struct exttm et;
+ ll.to_exttm(et);
+ et.et_nsec += jlu.jlu_exttm.et_nsec % 1000000;
+ et.et_gmtoff = jlu.jlu_exttm.et_gmtoff;
+ et.et_flags |= jlu.jlu_exttm.et_flags;
+ if (!jfe.jfe_prefix.empty()) {
+ this->json_append_to_cache(jfe.jfe_prefix);
+ }
if (jfe.jfe_ts_format.empty()) {
- ts_len = sql_strftime(
- ts, sizeof(ts), ll.get_timeval(), 'T');
+ ts_len = this->lf_date_time.ftime(
+ ts,
+ sizeof(ts),
+ this->get_timestamp_formats(),
+ et);
} else {
- struct exttm et;
-
- ll.to_exttm(et);
ts_len = ftime_fmt(ts,
sizeof(ts),
jfe.jfe_ts_format.c_str(),
@@ -1676,6 +2404,9 @@ external_log_format::get_subline(const logline& ll,
lv_iter)]
= true;
}
+ if (!jfe.jfe_suffix.empty()) {
+ this->json_append_to_cache(jfe.jfe_suffix);
+ }
} else if (jfe.jfe_value.pp_value == level_field
|| jfe.jfe_value.pp_value
== this->elf_level_field)
@@ -1747,6 +2478,7 @@ external_log_format::get_subline(const logline& ll,
}
}
this->json_append_to_cache("\n", 1);
+ sub_offset += 1;
for (size_t lpc = 0; lpc < this->jlf_line_values.lvv_values.size();
lpc++)
@@ -1786,6 +2518,13 @@ external_log_format::get_subline(const logline& ll,
break;
}
}
+ lv.lv_origin.lr_end = this->jlf_cached_line.size() - 1;
+ if (lv.lv_meta.lvm_name == this->elf_opid_field
+ && !lv.lv_origin.empty())
+ {
+ this->jlf_line_attrs.emplace_back(lv.lv_origin,
+ logline::L_OPID.value());
+ }
}
}
@@ -1833,7 +2572,148 @@ external_log_format::get_subline(const logline& ll,
sbr.get_metadata().m_has_ansi = ll.has_ansi();
this->jlf_cached_sub_range.lr_start = this_off;
this->jlf_cached_sub_range.lr_end = next_off;
- this->jlf_line_values.lvv_sbr = sbr;
+ this->jlf_line_values.lvv_sbr = sbr.clone();
+}
+
+struct compiled_header_expr {
+ auto_mem<sqlite3_stmt> che_stmt{sqlite3_finalize};
+ bool che_enabled{true};
+};
+
+struct format_header_expressions : public lnav_config_listener {
+ format_header_expressions() : lnav_config_listener(__FILE__) {}
+
+ auto_sqlite3 e_db;
+ std::map<intern_string_t, std::map<std::string, compiled_header_expr>>
+ e_header_exprs;
+};
+
+using safe_format_header_expressions = safe::Safe<format_header_expressions>;
+
+static safe_format_header_expressions format_header_exprs;
+
+nonstd::optional<external_file_format>
+detect_mime_type(const ghc::filesystem::path& filename)
+{
+ uint8_t buffer[1024];
+ size_t buffer_size = 0;
+
+ {
+ auto_fd fd;
+
+ if ((fd = lnav::filesystem::openp(filename, O_RDONLY)) == -1) {
+ return nonstd::nullopt;
+ }
+
+ ssize_t rc;
+
+ if ((rc = read(fd, buffer, sizeof(buffer))) == -1) {
+ return nonstd::nullopt;
+ }
+ buffer_size = rc;
+ }
+
+ auto hexbuf = auto_buffer::alloc(buffer_size * 2);
+
+ for (size_t lpc = 0; lpc < buffer_size; lpc++) {
+ fmt::format_to(
+ std::back_inserter(hexbuf), FMT_STRING("{:02x}"), buffer[lpc]);
+ }
+
+ safe::WriteAccess<safe_format_header_expressions> in(format_header_exprs);
+
+ for (const auto& format : log_format::get_root_formats()) {
+ auto elf = std::dynamic_pointer_cast<external_log_format>(format);
+ if (elf == nullptr) {
+ continue;
+ }
+
+ if (elf->elf_converter.c_header.h_exprs.he_exprs.empty()) {
+ continue;
+ }
+
+ if (buffer_size < elf->elf_converter.c_header.h_size) {
+ log_debug(
+ "%s: file content too small (%d) for header detection: %s",
+ filename.c_str(),
+ buffer_size,
+ elf->get_name().get());
+ continue;
+ }
+ for (const auto& hpair : elf->elf_converter.c_header.h_exprs.he_exprs) {
+ auto& he = in->e_header_exprs[elf->get_name()][hpair.first];
+
+ if (!he.che_enabled) {
+ continue;
+ }
+
+ auto* stmt = he.che_stmt.in();
+
+ if (stmt == nullptr) {
+ continue;
+ }
+ sqlite3_reset(stmt);
+ auto count = sqlite3_bind_parameter_count(stmt);
+ for (int lpc = 0; lpc < count; lpc++) {
+ const auto* name = sqlite3_bind_parameter_name(stmt, lpc + 1);
+
+ if (name[0] == '$') {
+ const char* env_value;
+
+ if ((env_value = getenv(&name[1])) != nullptr) {
+ sqlite3_bind_text(
+ stmt, lpc + 1, env_value, -1, SQLITE_STATIC);
+ }
+ continue;
+ }
+ if (strcmp(name, ":header") == 0) {
+ sqlite3_bind_text(stmt,
+ lpc + 1,
+ hexbuf.in(),
+ hexbuf.size(),
+ SQLITE_STATIC);
+ continue;
+ }
+ if (strcmp(name, ":filepath") == 0) {
+ sqlite3_bind_text(
+ stmt, lpc + 1, filename.c_str(), -1, SQLITE_STATIC);
+ continue;
+ }
+ }
+
+ auto step_res = sqlite3_step(stmt);
+
+ switch (step_res) {
+ case SQLITE_OK:
+ case SQLITE_DONE:
+ continue;
+ case SQLITE_ROW:
+ break;
+ default: {
+ log_error(
+ "failed to execute file-format header expression: "
+ "%s:%s -- %s",
+ elf->get_name().get(),
+ hpair.first.c_str(),
+ sqlite3_errmsg(in->e_db));
+ he.che_enabled = false;
+ continue;
+ }
+ }
+
+ log_info("detected format for: %s -- %s (header-expr: %s)",
+ filename.c_str(),
+ elf->get_name().get(),
+ hpair.first.c_str());
+ return external_file_format{
+ elf->get_name().to_string(),
+ elf->elf_converter.c_command.pp_value,
+ elf->elf_converter.c_command.pp_location.sl_source.to_string(),
+ };
+ }
+ }
+
+ return nonstd::nullopt;
}
void
@@ -1843,10 +2723,14 @@ external_log_format::build(std::vector<lnav::console::user_message>& errors)
auto& vd = this->elf_value_defs[this->lf_timestamp_field];
if (vd.get() == nullptr) {
vd = std::make_shared<external_log_format::value_def>(
- this->lf_timestamp_field, value_kind_t::VALUE_TEXT, -1, this);
+ this->lf_timestamp_field,
+ value_kind_t::VALUE_TEXT,
+ logline_value_meta::internal_column{},
+ this);
}
vd->vd_meta.lvm_name = this->lf_timestamp_field;
vd->vd_meta.lvm_kind = value_kind_t::VALUE_TEXT;
+ vd->vd_meta.lvm_column = logline_value_meta::internal_column{};
vd->vd_internal = true;
}
if (startswith(this->elf_level_field.get(), "/")) {
@@ -1860,20 +2744,28 @@ external_log_format::build(std::vector<lnav::console::user_message>& errors)
auto& vd = this->elf_value_defs[this->elf_level_field];
if (vd.get() == nullptr) {
vd = std::make_shared<external_log_format::value_def>(
- this->elf_level_field, value_kind_t::VALUE_TEXT, -1, this);
+ this->elf_level_field,
+ value_kind_t::VALUE_TEXT,
+ logline_value_meta::internal_column{},
+ this);
}
vd->vd_meta.lvm_name = this->elf_level_field;
vd->vd_meta.lvm_kind = value_kind_t::VALUE_TEXT;
+ vd->vd_meta.lvm_column = logline_value_meta::internal_column{};
vd->vd_internal = true;
}
if (!this->elf_body_field.empty()) {
auto& vd = this->elf_value_defs[this->elf_body_field];
if (vd.get() == nullptr) {
vd = std::make_shared<external_log_format::value_def>(
- this->elf_body_field, value_kind_t::VALUE_TEXT, -1, this);
+ this->elf_body_field,
+ value_kind_t::VALUE_TEXT,
+ logline_value_meta::internal_column{},
+ this);
}
vd->vd_meta.lvm_name = this->elf_body_field;
vd->vd_meta.lvm_kind = value_kind_t::VALUE_TEXT;
+ vd->vd_meta.lvm_column = logline_value_meta::internal_column{};
vd->vd_internal = true;
}
@@ -1913,6 +2805,9 @@ external_log_format::build(std::vector<lnav::console::user_message>& errors)
if (name == this->elf_opid_field) {
pat.p_opid_field_index = named_cap.get_index();
}
+ if (name == this->elf_subid_field) {
+ pat.p_subid_field_index = named_cap.get_index();
+ }
if (name == this->elf_body_field) {
pat.p_body_field_index = named_cap.get_index();
}
@@ -1929,12 +2824,17 @@ external_log_format::build(std::vector<lnav::console::user_message>& errors)
} else {
ivd.ivd_unit_field_index = -1;
}
- if (!vd->vd_internal && vd->vd_meta.lvm_column == -1) {
- vd->vd_meta.lvm_column = this->elf_column_count++;
+ if (!vd->vd_internal
+ && !vd->vd_meta.lvm_column
+ .is<logline_value_meta::table_column>())
+ {
+ vd->vd_meta.lvm_column = logline_value_meta::table_column{
+ this->elf_column_count++};
}
ivd.ivd_value_def = vd;
pat.p_value_by_index.push_back(ivd);
}
+ pat.p_value_name_to_index[name] = named_cap.get_index();
}
stable_sort(pat.p_value_by_index.begin(), pat.p_value_by_index.end());
@@ -1943,7 +2843,7 @@ external_log_format::build(std::vector<lnav::console::user_message>& errors)
auto& ivd = pat.p_value_by_index[lpc];
auto vd = ivd.ivd_value_def;
- if (!vd->vd_foreign_key && !vd->vd_meta.lvm_identifier) {
+ if (!vd->vd_meta.lvm_foreign_key && !vd->vd_meta.lvm_identifier) {
switch (vd->vd_meta.lvm_kind) {
case value_kind_t::VALUE_INTEGER:
case value_kind_t::VALUE_FLOAT:
@@ -1955,6 +2855,16 @@ external_log_format::build(std::vector<lnav::console::user_message>& errors)
}
}
+ if (!pat.p_module_format && pat.p_timestamp_field_index == -1) {
+ errors.emplace_back(
+ lnav::console::user_message::error(
+ attr_line_t("invalid pattern: ")
+ .append_quoted(lnav::roles::symbol(pat.p_config_path)))
+ .with_reason("no timestamp capture found in the pattern")
+ .with_snippets(this->get_snippets())
+ .with_help("all log messages need a timestamp"));
+ }
+
if (!this->elf_level_field.empty() && pat.p_level_field_index == -1) {
log_warning("%s:level field '%s' not found in pattern",
pat.p_config_path.c_str(),
@@ -1988,6 +2898,9 @@ external_log_format::build(std::vector<lnav::console::user_message>& errors)
.with_snippets(this->get_snippets()));
}
if (this->elf_type == elf_type_t::ELF_TYPE_JSON) {
+ this->lf_multiline = true;
+ this->lf_structured = true;
+ this->lf_formatted_lines = true;
this->jlf_parse_context
= std::make_shared<yajlpp_parse_context>(this->elf_name);
this->jlf_yajl_handle.reset(
@@ -1998,7 +2911,6 @@ external_log_format::build(std::vector<lnav::console::user_message>& errors)
yajl_config(
this->jlf_yajl_handle.get(), yajl_dont_validate_strings, 1);
}
-
} else {
if (this->elf_patterns.empty()) {
errors.emplace_back(lnav::console::user_message::error(
@@ -2013,12 +2925,79 @@ external_log_format::build(std::vector<lnav::console::user_message>& errors)
stable_sort(this->elf_level_pairs.begin(), this->elf_level_pairs.end());
+ {
+ safe::WriteAccess<safe_format_header_expressions> hexprs(
+ format_header_exprs);
+
+ if (hexprs->e_db.in() == nullptr) {
+ if (sqlite3_open(":memory:", hexprs->e_db.out()) != SQLITE_OK) {
+ log_error("unable to open memory DB");
+ return;
+ }
+ register_sqlite_funcs(hexprs->e_db.in(), sqlite_registration_funcs);
+ }
+
+ for (const auto& hpair : this->elf_converter.c_header.h_exprs.he_exprs)
+ {
+ auto stmt_str
+ = fmt::format(FMT_STRING("SELECT 1 WHERE {}"), hpair.second);
+ compiled_header_expr che;
+
+ log_info("preparing file-format header expression: %s",
+ stmt_str.c_str());
+ auto retcode = sqlite3_prepare_v2(hexprs->e_db.in(),
+ stmt_str.c_str(),
+ stmt_str.size(),
+ che.che_stmt.out(),
+ nullptr);
+ if (retcode != SQLITE_OK) {
+ auto sql_al = attr_line_t(hpair.second)
+ .with_attr_for_all(SA_PREFORMATTED.value())
+ .with_attr_for_all(
+ VC_ROLE.value(role_t::VCR_QUOTED_CODE));
+ readline_sqlite_highlighter(sql_al, -1);
+ intern_string_t watch_expr_path = intern_string::lookup(
+ fmt::format(FMT_STRING("/{}/converter/header/expr/{}"),
+ this->elf_name,
+ hpair.first));
+ auto snippet = lnav::console::snippet::from(
+ source_location(watch_expr_path), sql_al);
+
+ auto um = lnav::console::user_message::error(
+ "SQL expression is invalid")
+ .with_reason(sqlite3_errmsg(hexprs->e_db.in()))
+ .with_snippet(snippet);
+
+ errors.emplace_back(um);
+ continue;
+ }
+
+ hexprs->e_header_exprs[this->elf_name][hpair.first]
+ = std::move(che);
+ }
+
+ if (!this->elf_converter.c_header.h_exprs.he_exprs.empty()
+ && this->elf_converter.c_command.pp_value.empty())
+ {
+ auto um = lnav::console::user_message::error(
+ "A command is required when a converter is defined")
+ .with_help(
+ "The converter command transforms the file "
+ "into a format that can be consumed by lnav")
+ .with_snippets(this->get_snippets());
+ errors.emplace_back(um);
+ }
+ }
+
for (auto& vd : this->elf_value_def_order) {
std::vector<std::string>::iterator act_iter;
vd->vd_meta.lvm_format = this;
- if (!vd->vd_internal && vd->vd_meta.lvm_column == -1) {
- vd->vd_meta.lvm_column = this->elf_column_count++;
+ if (!vd->vd_internal
+ && !vd->vd_meta.lvm_column.is<logline_value_meta::table_column>())
+ {
+ vd->vd_meta.lvm_column
+ = logline_value_meta::table_column{this->elf_column_count++};
}
if (vd->vd_meta.lvm_kind == value_kind_t::VALUE_UNKNOWN) {
@@ -2108,6 +3087,44 @@ external_log_format::build(std::vector<lnav::console::user_message>& errors)
}
}
+ for (const auto& opid_desc_pair : *this->lf_opid_description_def) {
+ for (const auto& opid_desc : *opid_desc_pair.second.od_descriptors) {
+ auto iter = this->elf_value_defs.find(opid_desc.od_field.pp_value);
+ if (iter == this->elf_value_defs.end()) {
+ errors.emplace_back(
+ lnav::console::user_message::error(
+ attr_line_t("invalid opid description field ")
+ .append_quoted(lnav::roles::symbol(
+ opid_desc.od_field.pp_path.to_string())))
+ .with_reason(
+ attr_line_t("unknown value name ")
+ .append_quoted(opid_desc.od_field.pp_value))
+ .with_snippets(this->get_snippets()));
+ } else {
+ this->lf_desc_fields.insert(iter->first);
+ }
+ }
+ }
+
+ for (const auto& subid_desc_pair : *this->lf_subid_description_def) {
+ for (const auto& subid_desc : *subid_desc_pair.second.od_descriptors) {
+ auto iter = this->elf_value_defs.find(subid_desc.od_field.pp_value);
+ if (iter == this->elf_value_defs.end()) {
+ errors.emplace_back(
+ lnav::console::user_message::error(
+ attr_line_t("invalid subid description field ")
+ .append_quoted(lnav::roles::symbol(
+ subid_desc.od_field.pp_path.to_string())))
+ .with_reason(
+ attr_line_t("unknown value name ")
+ .append_quoted(subid_desc.od_field.pp_value))
+ .with_snippets(this->get_snippets()));
+ } else {
+ this->lf_desc_fields.insert(iter->first);
+ }
+ }
+ }
+
if (this->elf_type == elf_type_t::ELF_TYPE_TEXT
&& this->elf_samples.empty())
{
@@ -2218,14 +3235,46 @@ external_log_format::build(std::vector<lnav::console::user_message>& errors)
if (ts_cap && ts_cap->sf_begin == 0) {
pat.p_timestamp_end = ts_cap->sf_end;
}
- if (ts_cap
- && dts.scan(ts_cap->data(),
- ts_cap->length(),
- custom_formats,
- &tm,
- tv)
- == nullptr)
- {
+ const char* dts_scan_res = nullptr;
+
+ if (ts_cap) {
+ dts_scan_res = dts.scan(
+ ts_cap->data(), ts_cap->length(), custom_formats, &tm, tv);
+ }
+ if (dts_scan_res != nullptr) {
+ if (dts_scan_res != ts_cap->data() + ts_cap->length()) {
+ auto match_len = dts_scan_res - ts_cap->data();
+ auto notes = attr_line_t("the used timestamp format: ");
+ if (custom_formats == nullptr) {
+ notes.append(PTIMEC_FORMATS[dts.dts_fmt_lock].pf_fmt);
+ } else {
+ notes.append(custom_formats[dts.dts_fmt_lock]);
+ }
+ notes.append("\n ")
+ .append(ts_cap.value())
+ .append("\n")
+ .append(2 + match_len, ' ')
+ .append("^ matched up to here"_snippet_border);
+ auto um
+ = lnav::console::user_message::warning(
+ attr_line_t("timestamp was not fully matched: ")
+ .append_quoted(ts_cap.value()))
+ .with_snippet(elf_sample.s_line.to_snippet())
+ .with_note(notes);
+
+ errors.emplace_back(um);
+ }
+ } else if (!ts_cap) {
+ errors.emplace_back(
+ lnav::console::user_message::error(
+ attr_line_t("invalid sample log message: ")
+ .append(lnav::to_json(elf_sample.s_line.pp_value)))
+ .with_reason(attr_line_t("timestamp was not captured"))
+ .with_snippet(elf_sample.s_line.to_snippet())
+ .with_help(attr_line_t(
+ "A timestamp needs to be captured in order for a "
+ "line to be recognized as a log message")));
+ } else {
attr_line_t notes;
if (custom_formats == nullptr) {
@@ -2557,7 +3606,7 @@ external_log_format::build(std::vector<lnav::console::user_message>& errors)
elf_value_def->vd_meta.lvm_values_index
= nonstd::make_optional(value_def_index++);
- if (elf_value_def->vd_foreign_key
+ if (elf_value_def->vd_meta.lvm_foreign_key
|| elf_value_def->vd_meta.lvm_identifier)
{
continue;
@@ -2784,18 +3833,21 @@ public:
auto type_pair = log_vtab_impl::logline_value_to_sqlite_type(
vd->vd_meta.lvm_kind);
- if (vd->vd_meta.lvm_column == -1) {
+ if (!vd->vd_meta.lvm_column.is<logline_value_meta::table_column>())
+ {
continue;
}
- require(0 <= vd->vd_meta.lvm_column
- && vd->vd_meta.lvm_column < elf.elf_column_count);
+ auto col
+ = vd->vd_meta.lvm_column.get<logline_value_meta::table_column>()
+ .value;
+ require(0 <= col && col < elf.elf_column_count);
- cols[vd->vd_meta.lvm_column].vc_name = vd->vd_meta.lvm_name.get();
- cols[vd->vd_meta.lvm_column].vc_type = type_pair.first;
- cols[vd->vd_meta.lvm_column].vc_subtype = type_pair.second;
- cols[vd->vd_meta.lvm_column].vc_collator = vd->vd_collate;
- cols[vd->vd_meta.lvm_column].vc_comment = vd->vd_description;
+ cols[col].vc_name = vd->vd_meta.lvm_name.get();
+ cols[col].vc_type = type_pair.first;
+ cols[col].vc_subtype = type_pair.second;
+ cols[col].vc_collator = vd->vd_collate;
+ cols[col].vc_comment = vd->vd_description;
}
}
@@ -2804,7 +3856,7 @@ public:
log_vtab_impl::get_foreign_keys(keys_inout);
for (const auto& elf_value_def : this->elt_format.elf_value_defs) {
- if (elf_value_def.second->vd_foreign_key) {
+ if (elf_value_def.second->vd_meta.lvm_foreign_key) {
keys_inout.emplace_back(elf_value_def.first.to_string());
}
}
@@ -2838,7 +3890,7 @@ public:
intern_string_t mod_name;
this->vi_attrs.clear();
- values.lvv_sbr = line;
+ values.lvv_sbr = line.clone();
format->annotate(cl, this->vi_attrs, values, false);
this->elt_container_body
= find_string_attr_range(this->vi_attrs, &SA_BODY);
@@ -2949,16 +4001,6 @@ external_log_format::match_name(const std::string& filename)
.has_value();
}
-bool
-external_log_format::match_mime_type(const file_format_t ff) const
-{
- if (ff == file_format_t::UNKNOWN && this->elf_mime_types.empty()) {
- return true;
- }
-
- return this->elf_mime_types.count(ff) == 1;
-}
-
auto
external_log_format::value_line_count(const intern_string_t ist,
bool top_level,
@@ -2968,7 +4010,16 @@ external_log_format::value_line_count(const intern_string_t ist,
{
const auto iter = this->elf_value_defs.find(ist);
value_line_count_result retval;
- if (str != nullptr) {
+
+ if (iter == this->elf_value_defs.end()) {
+ if (this->jlf_hide_extra || !top_level) {
+ retval.vlcr_count = 0;
+ }
+
+ return retval;
+ }
+
+ if (str != nullptr && !val) {
auto frag = string_fragment::from_bytes(str, len);
while (frag.endswith("\n")) {
frag.pop_back();
@@ -2987,14 +4038,6 @@ external_log_format::value_line_count(const intern_string_t ist,
}
}
- if (iter == this->elf_value_defs.end()) {
- if (this->jlf_hide_extra || !top_level) {
- retval.vlcr_count = 0;
- }
-
- return retval;
- }
-
if (iter->second->vd_meta.lvm_values_index) {
auto& lvs = this->lf_value_stats[iter->second->vd_meta.lvm_values_index
.value()];
@@ -3006,6 +4049,11 @@ external_log_format::value_line_count(const intern_string_t ist,
}
}
+ if (iter->second->vd_meta.is_hidden()) {
+ retval.vlcr_count = 0;
+ return retval;
+ }
+
if (std::find_if(this->jlf_line_format.begin(),
this->jlf_line_format.end(),
json_field_cmp(json_log_field::VARIABLE, ist))
@@ -3015,10 +4063,6 @@ external_log_format::value_line_count(const intern_string_t ist,
retval.vlcr_count -= 1;
}
- if (iter->second->vd_meta.is_hidden()) {
- retval.vlcr_count = 0;
- }
-
return retval;
}
@@ -3091,7 +4135,8 @@ external_log_format::get_value_meta(intern_string_t field_name,
auto iter = this->elf_value_defs.find(field_name);
if (iter == this->elf_value_defs.end()) {
- auto retval = logline_value_meta(field_name, kind, -1, this);
+ auto retval = logline_value_meta(
+ field_name, kind, logline_value_meta::external_column{}, this);
retval.lvm_hidden = this->jlf_hide_extra;
return retval;
@@ -3161,6 +4206,10 @@ external_log_format::get_pattern_name(uint64_t line_number) const
int
log_format::pattern_index_for_line(uint64_t line_number) const
{
+ if (this->lf_pattern_locks.empty()) {
+ return -1;
+ }
+
auto iter = lower_bound(this->lf_pattern_locks.cbegin(),
this->lf_pattern_locks.cend(),
line_number,
@@ -3188,7 +4237,9 @@ log_format::get_pattern_name(uint64_t line_number) const
char pat_str[128];
int pat_index = this->pattern_index_for_line(line_number);
- snprintf(pat_str, sizeof(pat_str), "builtin (%d)", pat_index);
+ auto to_n_res = fmt::format_to_n(
+ pat_str, sizeof(pat_str) - 1, FMT_STRING("builtin ({})"), pat_index);
+ pat_str[to_n_res.size] = '\0';
return intern_string::lookup(pat_str);
}
@@ -3332,5 +4383,11 @@ format_tag_def::path_restriction::matches(const char* fn) const
return fnmatch(this->p_glob.c_str(), fn, 0) == 0;
}
+bool
+format_partition_def::path_restriction::matches(const char* fn) const
+{
+ return fnmatch(this->p_glob.c_str(), fn, 0) == 0;
+}
+
/* XXX */
#include "log_format_impls.cc"
diff --git a/src/log_format.hh b/src/log_format.hh
index fdca056..8766558 100644
--- a/src/log_format.hh
+++ b/src/log_format.hh
@@ -108,10 +108,34 @@ enum class value_kind_t : int {
VALUE__MAX
};
+enum class chart_type_t {
+ none,
+ hist,
+ spectro,
+};
+
struct logline_value_meta {
+ struct internal_column {
+ bool operator==(const internal_column&) const { return true; }
+ };
+ struct external_column {
+ bool operator==(const external_column&) const { return true; }
+ };
+ struct table_column {
+ size_t value;
+
+ bool operator==(const table_column& rhs) const
+ {
+ return this->value == rhs.value;
+ }
+ };
+
+ using column_t
+ = mapbox::util::variant<internal_column, external_column, table_column>;
+
logline_value_meta(intern_string_t name,
value_kind_t kind,
- int col = -1,
+ column_t col = external_column{},
const nonstd::optional<log_format*>& format
= nonstd::nullopt)
: lvm_name(name), lvm_kind(kind), lvm_column(col), lvm_format(format)
@@ -132,11 +156,14 @@ struct logline_value_meta {
return *this;
}
+ chart_type_t to_chart_type() const;
+
intern_string_t lvm_name;
value_kind_t lvm_kind;
- int lvm_column{-1};
+ column_t lvm_column{external_column{}};
nonstd::optional<size_t> lvm_values_index;
bool lvm_identifier{false};
+ bool lvm_foreign_key{false};
bool lvm_hidden{false};
nonstd::optional<bool> lvm_user_hidden;
bool lvm_from_module{false};
@@ -254,10 +281,29 @@ struct logline_value_vector {
{
this->lvv_values.clear();
this->lvv_sbr.disown();
+ this->lvv_opid_value = nonstd::nullopt;
+ }
+
+ logline_value_vector() {}
+
+ logline_value_vector(const logline_value_vector& other)
+ : lvv_sbr(other.lvv_sbr.clone()), lvv_values(other.lvv_values),
+ lvv_opid_value(other.lvv_opid_value)
+ {
+ }
+
+ logline_value_vector& operator=(const logline_value_vector& other)
+ {
+ this->lvv_sbr = other.lvv_sbr.clone();
+ this->lvv_values = other.lvv_values;
+ this->lvv_opid_value = other.lvv_opid_value;
+
+ return *this;
}
shared_buffer_ref lvv_sbr;
std::vector<logline_value> lvv_values;
+ nonstd::optional<std::string> lvv_opid_value;
};
struct logline_value_stats {
@@ -284,8 +330,9 @@ struct logline_value_stats {
};
struct logline_value_cmp {
- explicit logline_value_cmp(const intern_string_t* name = nullptr,
- int col = -1)
+ explicit logline_value_cmp(
+ const intern_string_t* name = nullptr,
+ nonstd::optional<logline_value_meta::column_t> col = nonstd::nullopt)
: lvc_name(name), lvc_column(col)
{
}
@@ -297,15 +344,16 @@ struct logline_value_cmp {
if (this->lvc_name != nullptr) {
retval = retval && ((*this->lvc_name) == lv.lv_meta.lvm_name);
}
- if (this->lvc_column != -1) {
- retval = retval && (this->lvc_column == lv.lv_meta.lvm_column);
+ if (this->lvc_column) {
+ retval
+ = retval && (this->lvc_column.value() == lv.lv_meta.lvm_column);
}
return retval;
}
const intern_string_t* lvc_name;
- int lvc_column;
+ nonstd::optional<logline_value_meta::column_t> lvc_column;
};
class log_vtab_impl;
@@ -352,14 +400,6 @@ public:
virtual bool match_name(const std::string& filename) { return true; }
- virtual bool match_mime_type(const file_format_t ff) const
- {
- if (ff == file_format_t::UNKNOWN) {
- return true;
- }
- return false;
- }
-
struct scan_match {
uint32_t sm_quality;
};
@@ -458,6 +498,11 @@ public:
return false;
}
+ virtual std::map<intern_string_t, logline_value_meta> get_field_states()
+ {
+ return {};
+ }
+
const char* const* get_timestamp_formats() const
{
if (this->lf_timestamp_format.empty()) {
@@ -525,6 +570,8 @@ public:
std::string lf_description;
uint8_t lf_mod_index{0};
bool lf_multiline{true};
+ bool lf_structured{false};
+ bool lf_formatted_lines{false};
date_time_scanner lf_date_time;
date_time_scanner lf_time_scanner;
std::vector<pattern_for_lines> lf_pattern_locks;
@@ -544,6 +591,50 @@ public:
std::map<const intern_string_t, std::shared_ptr<format_tag_def>>
lf_tag_defs;
+ std::map<const intern_string_t, std::shared_ptr<format_partition_def>>
+ lf_partition_defs;
+
+ struct opid_descriptor {
+ positioned_property<intern_string_t> od_field;
+ factory_container<lnav::pcre2pp::code> od_extractor;
+ std::string od_prefix{" "};
+ std::string od_suffix;
+ std::string od_joiner{", "};
+
+ nonstd::optional<std::string> matches(const string_fragment& sf) const;
+ };
+
+ struct opid_descriptors {
+ std::shared_ptr<std::vector<opid_descriptor>> od_descriptors;
+
+ std::string to_string(
+ const lnav::map::small<size_t, std::string>& lod) const;
+ };
+
+ std::shared_ptr<std::map<intern_string_t, opid_descriptors>>
+ lf_opid_description_def{
+ std::make_shared<std::map<intern_string_t, opid_descriptors>>()};
+
+ std::shared_ptr<std::map<intern_string_t, opid_descriptors>>
+ lf_subid_description_def{
+ std::make_shared<std::map<intern_string_t, opid_descriptors>>()};
+
+ ArenaAlloc::Alloc<char> lf_desc_allocator{2 * 1024};
+
+ using desc_field_set
+ = robin_hood::unordered_set<intern_string_t,
+ intern_hasher,
+ std::equal_to<intern_string_t>>;
+
+ desc_field_set lf_desc_fields;
+
+ using desc_cap_map
+ = robin_hood::unordered_map<intern_string_t,
+ string_fragment,
+ intern_hasher,
+ std::equal_to<intern_string_t>>;
+ desc_cap_map lf_desc_captures;
+
protected:
static std::vector<std::shared_ptr<log_format>> lf_root_formats;
@@ -563,11 +654,13 @@ protected:
int pf_timestamp_index{-1};
};
- static bool next_format(pcre_format* fmt, int& index, int& locked_index);
+ static bool next_format(const pcre_format* fmt,
+ int& index,
+ int& locked_index);
const char* log_scanf(uint32_t line_number,
string_fragment line,
- pcre_format* fmt,
+ const pcre_format* fmt,
const char* time_fmt[],
struct exttm* tm_out,
struct timeval* tv_out,
diff --git a/src/log_format_ext.hh b/src/log_format_ext.hh
index f1022b7..35361b3 100644
--- a/src/log_format_ext.hh
+++ b/src/log_format_ext.hh
@@ -52,7 +52,7 @@ public:
struct value_def {
value_def(intern_string_t name,
value_kind_t kind,
- int col,
+ logline_value_meta::column_t col,
log_format* format)
: vd_meta(name, kind, col, format)
{
@@ -68,7 +68,6 @@ public:
logline_value_meta vd_meta;
std::string vd_collate;
- bool vd_foreign_key{false};
intern_string_t vd_unit_field;
std::map<const intern_string_t, scaling_factor> vd_unit_scaling;
bool vd_internal{false};
@@ -104,12 +103,14 @@ public:
int>::with_default_args<PCRE2_DOTALL>
p_pcre;
std::vector<indexed_value_def> p_value_by_index;
+ std::map<intern_string_t, int> p_value_name_to_index;
std::vector<int> p_numeric_value_indexes;
int p_timestamp_field_index{-1};
int p_time_field_index{-1};
int p_level_field_index{-1};
int p_module_field_index{-1};
int p_opid_field_index{-1};
+ int p_subid_field_index{-1};
int p_body_field_index{-1};
int p_timestamp_end{-1};
bool p_module_format{false};
@@ -141,8 +142,6 @@ public:
bool match_name(const std::string& filename) override;
- bool match_mime_type(const file_format_t ff) const override;
-
scan_result_t scan(logfile& lf,
std::vector<logline>& dst,
const line_info& offset,
@@ -171,6 +170,17 @@ public:
bool hide_field(const intern_string_t field_name, bool val) override;
+ std::map<intern_string_t, logline_value_meta> get_field_states() override
+ {
+ std::map<intern_string_t, logline_value_meta> retval;
+
+ for (const auto& vd : this->elf_value_defs) {
+ retval.emplace(vd.first, vd.second->vd_meta);
+ }
+
+ return retval;
+ }
+
std::shared_ptr<log_format> specialized(int fmt_lock) override;
const logline_value_stats* stats_for_value(
@@ -220,6 +230,7 @@ public:
ABBREV,
TRUNCATE,
DOTDOT,
+ LASTWORD,
};
enum class transform_t {
@@ -313,7 +324,6 @@ public:
std::vector<ghc::filesystem::path> elf_format_source_order;
std::map<intern_string_t, int> elf_format_sources;
std::list<intern_string_t> elf_collision;
- std::set<file_format_t> elf_mime_types;
factory_container<lnav::pcre2pp::code> elf_filename_pcre;
std::map<std::string, std::shared_ptr<pattern>> elf_patterns;
std::vector<std::shared_ptr<pattern>> elf_pattern_order;
@@ -331,19 +341,37 @@ public:
std::vector<std::shared_ptr<value_def>> elf_value_def_order;
std::vector<std::shared_ptr<value_def>> elf_numeric_value_defs;
- int elf_column_count{0};
+ size_t elf_column_count{0};
double elf_timestamp_divisor{1.0};
intern_string_t elf_level_field;
factory_container<lnav::pcre2pp::code> elf_level_pointer;
intern_string_t elf_body_field;
intern_string_t elf_module_id_field;
intern_string_t elf_opid_field;
+ intern_string_t elf_subid_field;
std::map<log_level_t, level_pattern> elf_level_patterns;
std::vector<std::pair<int64_t, log_level_t>> elf_level_pairs;
bool elf_container{false};
bool elf_has_module_format{false};
bool elf_builtin_format{false};
+ struct header_exprs {
+ std::map<std::string, std::string> he_exprs;
+ };
+
+ struct header {
+ header_exprs h_exprs;
+ size_t h_size{32};
+ };
+
+ struct converter {
+ std::string c_type;
+ header c_header;
+ positioned_property<std::string> c_command;
+ };
+
+ converter elf_converter;
+
using search_table_pcre2pp
= factory_container<lnav::pcre2pp::code, int>::with_default_args<
log_search_table_ns::PATTERN_OPTIONS>;
@@ -365,6 +393,16 @@ public:
elf_type_t elf_type{elf_type_t::ELF_TYPE_TEXT};
+ void update_op_description(
+ const std::map<intern_string_t, opid_descriptors>& desc_def,
+ log_op_description& lod,
+ const pattern* fpat,
+ const lnav::pcre2pp::match_data& md);
+
+ void update_op_description(
+ const std::map<intern_string_t, opid_descriptors>& desc_def,
+ log_op_description& lod);
+
void json_append_to_cache(const char* value, ssize_t len)
{
if (len <= 0) {
diff --git a/src/log_format_fwd.hh b/src/log_format_fwd.hh
index 8b9d301..dbcc356 100644
--- a/src/log_format_fwd.hh
+++ b/src/log_format_fwd.hh
@@ -38,19 +38,54 @@
#include "ArenaAlloc/arenaalloc.h"
#include "base/file_range.hh"
+#include "base/map_util.hh"
#include "base/string_attr_type.hh"
#include "byte_array.hh"
#include "log_level.hh"
#include "pcrepp/pcre2pp.hh"
-#include "ptimec.hh"
#include "robin_hood/robin_hood.h"
#include "yajlpp/yajlpp.hh"
class log_format;
+struct log_level_stats {
+ uint32_t lls_error_count{0};
+ uint32_t lls_warning_count{0};
+ uint32_t lls_total_count{0};
+
+ log_level_stats& operator|=(const log_level_stats& rhs);
+ void update_msg_count(log_level_t lvl);
+};
+
+struct log_op_description {
+ nonstd::optional<intern_string_t> lod_id;
+ lnav::map::small<size_t, std::string> lod_elements;
+
+ log_op_description& operator|=(const log_op_description& rhs);
+};
+
+struct opid_sub_time_range {
+ string_fragment ostr_subid;
+ time_range ostr_range;
+ bool ostr_open{true};
+ log_level_stats ostr_level_stats;
+ std::string ostr_description;
+
+ bool operator<(const opid_sub_time_range& rhs) const
+ {
+ return this->ostr_range < rhs.ostr_range;
+ }
+};
+
struct opid_time_range {
- struct timeval otr_begin;
- struct timeval otr_end;
+ time_range otr_range;
+ log_level_stats otr_level_stats;
+ log_op_description otr_description;
+ std::vector<opid_sub_time_range> otr_sub_ops;
+
+ void close_sub_ops(const string_fragment& subid);
+
+ opid_time_range& operator|=(const opid_time_range& rhs);
};
using log_opid_map = robin_hood::unordered_map<string_fragment,
@@ -58,9 +93,25 @@ using log_opid_map = robin_hood::unordered_map<string_fragment,
frag_hasher,
std::equal_to<string_fragment>>;
+using sub_opid_map = robin_hood::unordered_map<string_fragment,
+ string_fragment,
+ frag_hasher,
+ std::equal_to<string_fragment>>;
+
+struct log_opid_state {
+ log_opid_map los_opid_ranges;
+ sub_opid_map los_sub_in_use;
+
+ opid_sub_time_range* sub_op_in_use(ArenaAlloc::Alloc<char>& alloc,
+ log_opid_map::iterator& op_iter,
+ const string_fragment& subid,
+ const timeval& tv,
+ log_level_t level);
+};
+
struct scan_batch_context {
ArenaAlloc::Alloc<char>& sbc_allocator;
- log_opid_map sbc_opids;
+ log_opid_state sbc_opids;
std::string sbc_cached_level_strings[4];
log_level_t sbc_cached_level_values[4];
size_t sbc_cached_level_count{0};
@@ -95,7 +146,7 @@ public:
uint8_t opid = 0)
: ll_offset(off), ll_has_ansi(false), ll_time(t), ll_millis(millis),
ll_opid(opid), ll_sub_offset(0), ll_valid_utf(1), ll_level(lev),
- ll_module_id(mod), ll_expr_mark(0)
+ ll_module_id(mod), ll_meta_mark(0), ll_expr_mark(0)
{
memset(this->ll_schema, 0, sizeof(this->ll_schema));
}
@@ -106,7 +157,8 @@ public:
uint8_t mod = 0,
uint8_t opid = 0)
: ll_offset(off), ll_has_ansi(false), ll_opid(opid), ll_sub_offset(0),
- ll_valid_utf(1), ll_level(lev), ll_module_id(mod), ll_expr_mark(0)
+ ll_valid_utf(1), ll_level(lev), ll_module_id(mod), ll_meta_mark(0),
+ ll_expr_mark(0)
{
this->set_time(tv);
memset(this->ll_schema, 0, sizeof(this->ll_schema));
@@ -175,6 +227,10 @@ public:
bool is_marked() const { return this->ll_level & LEVEL_MARK; }
+ void set_meta_mark(bool val) { this->ll_meta_mark = val; }
+
+ bool is_meta_marked() const { return this->ll_meta_mark; }
+
void set_expr_mark(bool val) { this->ll_expr_mark = val; }
bool is_expr_marked() const { return this->ll_expr_mark; }
@@ -230,6 +286,17 @@ public:
uint8_t get_opid() const { return this->ll_opid; }
+ bool match_opid_hash(unsigned long hash) const
+ {
+ struct {
+ unsigned int value : 6;
+ } reduced = {
+ (unsigned int) hash,
+ };
+
+ return this->ll_opid == reduced.value;
+ }
+
/**
* @return True if there is a schema value set for this log line.
*/
@@ -305,7 +372,8 @@ private:
unsigned int ll_sub_offset : 15;
unsigned int ll_valid_utf : 1;
uint8_t ll_level;
- uint8_t ll_module_id : 7;
+ uint8_t ll_module_id : 6;
+ uint8_t ll_meta_mark : 1;
uint8_t ll_expr_mark : 1;
char ll_schema[2];
};
@@ -327,4 +395,23 @@ struct format_tag_def {
log_level_t ftd_level{LEVEL_UNKNOWN};
};
+struct format_partition_def {
+ explicit format_partition_def(std::string name) : fpd_name(std::move(name))
+ {
+ }
+
+ struct path_restriction {
+ std::string p_glob;
+
+ bool matches(const char* fn) const;
+ };
+
+ std::string fpd_name;
+ std::string fpd_description;
+ std::vector<path_restriction> fpd_paths;
+ factory_container<lnav::pcre2pp::code, int>::with_default_args<PCRE2_DOTALL>
+ fpd_pattern;
+ log_level_t fpd_level{LEVEL_UNKNOWN};
+};
+
#endif
diff --git a/src/log_format_impls.cc b/src/log_format_impls.cc
index 96d37f5..3bd45ad 100644
--- a/src/log_format_impls.cc
+++ b/src/log_format_impls.cc
@@ -41,17 +41,89 @@
#include "config.h"
#include "formats/logfmt/logfmt.parser.hh"
#include "log_vtab_impl.hh"
+#include "scn/scn.h"
#include "sql_util.hh"
#include "yajlpp/yajlpp.hh"
+class piper_log_format : public log_format {
+public:
+ const intern_string_t get_name() const override
+ {
+ static const intern_string_t RETVAL
+ = intern_string::lookup("lnav_piper_log");
+
+ return RETVAL;
+ }
+
+ scan_result_t scan(logfile& lf,
+ std::vector<logline>& dst,
+ const line_info& li,
+ shared_buffer_ref& sbr,
+ scan_batch_context& sbc) override
+ {
+ if (lf.has_line_metadata()
+ && lf.get_text_format() == text_format_t::TF_LOG)
+ {
+ dst.emplace_back(
+ li.li_file_range.fr_offset, li.li_timestamp, li.li_level);
+ return scan_match{100};
+ }
+
+ return scan_no_match{""};
+ }
+
+ void annotate(uint64_t line_number,
+ string_attrs_t& sa,
+ logline_value_vector& values,
+ bool annotate_module) const override
+ {
+ auto lr = line_range{0, 0};
+ sa.emplace_back(lr, logline::L_TIMESTAMP.value());
+ }
+
+ void get_subline(const logline& ll,
+ shared_buffer_ref& sbr,
+ bool full_message) override
+ {
+ this->plf_cached_line.resize(23);
+ sql_strftime(this->plf_cached_line.data(),
+ this->plf_cached_line.size(),
+ ll.get_timeval(),
+ 'T');
+ this->plf_cached_line.push_back(' ');
+ const auto prefix_len = this->plf_cached_line.size();
+ this->plf_cached_line.resize(this->plf_cached_line.size()
+ + sbr.length());
+ memcpy(
+ &this->plf_cached_line[prefix_len], sbr.get_data(), sbr.length());
+
+ sbr.share(this->plf_share_manager,
+ this->plf_cached_line.data(),
+ this->plf_cached_line.size());
+ }
+
+ std::shared_ptr<log_format> specialized(int fmt_lock) override
+ {
+ auto retval = std::make_shared<piper_log_format>(*this);
+
+ retval->lf_specialized = true;
+ return retval;
+ }
+
+private:
+ shared_buffer plf_share_manager;
+ std::vector<char> plf_cached_line;
+};
+
class generic_log_format : public log_format {
- static pcre_format* get_pcre_log_formats()
+public:
+ static const pcre_format* get_pcre_log_formats()
{
- static pcre_format log_fmt[] = {
+ static const pcre_format log_fmt[] = {
pcre_format(
"^(?:\\*\\*\\*\\s+)?(?<timestamp>@[0-9a-zA-Z]{16,24})(.*)"),
pcre_format(
- "^(?:\\*\\*\\*\\s+)?(?<timestamp>[\\dTZ: +/\\-,\\.-]+)([^:]+)"),
+ R"(^(?:\*\*\*\s+)?(?<timestamp>(?:\s|\d{4}[\-\/]\d{2}[\-\/]\d{2}|T|\d{1,2}:\d{2}(?::\d{2}(?:[\.,]\d{1,6})?)?|Z|[+\-]\d{2}:?\d{2}|(?!ERR|INFO|WARN)[A-Z]{3,4})+)(?:\s+|[:|])([^:]+))"),
pcre_format(
"^(?:\\*\\*\\*\\s+)?(?<timestamp>[\\w:+/\\.-]+) \\[\\w (.*)"),
pcre_format("^(?:\\*\\*\\*\\s+)?(?<timestamp>[\\w:,/\\.-]+) (.*)"),
@@ -88,7 +160,10 @@ class generic_log_format : public log_format {
const intern_string_t get_name() const override
{
- return intern_string::lookup("generic_log");
+ static const intern_string_t RETVAL
+ = intern_string::lookup("generic_log");
+
+ return RETVAL;
}
scan_result_t scan(logfile& lf,
@@ -103,6 +178,17 @@ class generic_log_format : public log_format {
nonstd::optional<string_fragment> level;
const char* last_pos;
+ if (dst.empty()) {
+ auto file_options = lf.get_file_options();
+
+ if (file_options) {
+ this->lf_date_time.dts_default_zone
+ = file_options->second.fo_default_zone.pp_value;
+ } else {
+ this->lf_date_time.dts_default_zone = nullptr;
+ }
+ }
+
if ((last_pos = this->log_scanf(dst.size(),
sbr.to_string_fragment(),
get_pcre_log_formats(),
@@ -126,6 +212,24 @@ class generic_log_format : public log_format {
this->check_for_new_year(dst, log_time, log_tv);
}
+ if (!(this->lf_timestamp_flags
+ & (ETF_MILLIS_SET | ETF_MICROS_SET | ETF_NANOS_SET))
+ && !dst.empty() && dst.back().get_time() == log_tv.tv_sec
+ && dst.back().get_millis() != 0)
+ {
+ auto log_ms
+ = std::chrono::milliseconds(dst.back().get_millis());
+
+ log_time.et_nsec
+ = std::chrono::duration_cast<std::chrono::nanoseconds>(
+ log_ms)
+ .count();
+ log_tv.tv_usec
+ = std::chrono::duration_cast<std::chrono::microseconds>(
+ log_ms)
+ .count();
+ }
+
dst.emplace_back(li.li_file_range.fr_offset, log_tv, level_val);
return scan_match{0};
}
@@ -140,7 +244,7 @@ class generic_log_format : public log_format {
{
auto& line = values.lvv_sbr;
int pat_index = this->pattern_index_for_line(line_number);
- auto& fmt = get_pcre_log_formats()[pat_index];
+ const auto& fmt = get_pcre_log_formats()[pat_index];
int prefix_len = 0;
auto md = fmt.pcre->create_match_data();
auto match_res = fmt.pcre->capture_from(line.to_string_fragment())
@@ -151,16 +255,25 @@ class generic_log_format : public log_format {
return;
}
- auto lr = to_line_range(md[fmt.pf_timestamp_index].value());
+ auto ts_cap = md[fmt.pf_timestamp_index].value();
+ auto lr = to_line_range(ts_cap.trim());
sa.emplace_back(lr, logline::L_TIMESTAMP.value());
- prefix_len = lr.lr_end;
+ values.lvv_values.emplace_back(TS_META, line, lr);
+ values.lvv_values.back().lv_meta.lvm_format = (log_format*) this;
+
+ prefix_len = ts_cap.sf_end;
auto level_cap = md[2];
if (level_cap) {
if (string2level(level_cap->data(), level_cap->length(), true)
!= LEVEL_UNKNOWN)
{
prefix_len = level_cap->sf_end;
+
+ values.lvv_values.emplace_back(
+ LEVEL_META, line, to_line_range(level_cap->trim()));
+ values.lvv_values.back().lv_meta.lvm_format
+ = (log_format*) this;
}
}
@@ -180,6 +293,41 @@ class generic_log_format : public log_format {
retval->lf_specialized = true;
return retval;
}
+
+ bool hide_field(const intern_string_t field_name, bool val) override
+ {
+ if (field_name == TS_META.lvm_name) {
+ TS_META.lvm_user_hidden = val;
+ return true;
+ } else if (field_name == LEVEL_META.lvm_name) {
+ LEVEL_META.lvm_user_hidden = val;
+ return true;
+ }
+ return false;
+ }
+
+ std::map<intern_string_t, logline_value_meta> get_field_states() override
+ {
+ return {
+ {TS_META.lvm_name, TS_META},
+ {LEVEL_META.lvm_name, LEVEL_META},
+ };
+ }
+
+private:
+ static logline_value_meta TS_META;
+ static logline_value_meta LEVEL_META;
+};
+
+logline_value_meta generic_log_format::TS_META{
+ intern_string::lookup("log_time"),
+ value_kind_t::VALUE_TEXT,
+ logline_value_meta::table_column{2},
+};
+logline_value_meta generic_log_format::LEVEL_META{
+ intern_string::lookup("log_level"),
+ value_kind_t::VALUE_TEXT,
+ logline_value_meta::table_column{4},
};
std::string
@@ -324,22 +472,29 @@ class bro_log_format : public log_format {
public:
struct field_def {
logline_value_meta fd_meta;
+ logline_value_meta* fd_root_meta;
std::string fd_collator;
nonstd::optional<size_t> fd_numeric_index;
explicit field_def(const intern_string_t name,
- int col,
+ size_t col,
log_format* format)
- : fd_meta(name, value_kind_t::VALUE_TEXT, col, format)
+ : fd_meta(name,
+ value_kind_t::VALUE_TEXT,
+ logline_value_meta::table_column{col},
+ format),
+ fd_root_meta(&FIELD_META.find(name)->second)
{
}
field_def& with_kind(value_kind_t kind,
bool identifier = false,
+ bool foreign_key = false,
const std::string& collator = "")
{
this->fd_meta.lvm_kind = kind;
this->fd_meta.lvm_identifier = identifier;
+ this->fd_meta.lvm_foreign_key = foreign_key;
this->fd_collator = collator;
return *this;
}
@@ -351,10 +506,26 @@ public:
}
};
+ static std::unordered_map<const intern_string_t, logline_value_meta>
+ FIELD_META;
+
+ static const intern_string_t get_opid_desc()
+ {
+ static const intern_string_t RETVAL = intern_string::lookup("std");
+
+ return RETVAL;
+ }
+
bro_log_format()
{
+ this->lf_structured = true;
this->lf_is_self_describing = true;
this->lf_time_ordered = false;
+
+ auto desc_v = std::make_shared<std::vector<opid_descriptor>>();
+ desc_v->emplace({});
+ this->lf_opid_description_def->emplace(get_opid_desc(),
+ opid_descriptors{desc_v});
}
const intern_string_t get_name() const override
@@ -373,12 +544,15 @@ public:
scan_result_t scan_int(std::vector<logline>& dst,
const line_info& li,
- shared_buffer_ref& sbr)
+ shared_buffer_ref& sbr,
+ scan_batch_context& sbc)
{
static const intern_string_t STATUS_CODE
= intern_string::lookup("bro_status_code");
static const intern_string_t TS = intern_string::lookup("bro_ts");
static const intern_string_t UID = intern_string::lookup("bro_uid");
+ static const intern_string_t ID_ORIG_H
+ = intern_string::lookup("bro_id_orig_h");
separated_string ss(sbr.get_data(), sbr.length());
struct timeval tv;
@@ -386,6 +560,8 @@ public:
bool found_ts = false;
log_level_t level = LEVEL_INFO;
uint8_t opid = 0;
+ auto opid_cap = string_fragment::invalid();
+ auto host_cap = string_fragment::invalid();
ss.with_separator(this->blf_separator.get());
@@ -410,29 +586,28 @@ public:
found_ts = true;
}
} else if (STATUS_CODE == fd.fd_meta.lvm_name) {
- string_fragment sf = *iter;
+ const auto sf = *iter;
if (!sf.empty() && sf[0] >= '4') {
level = LEVEL_ERROR;
}
} else if (UID == fd.fd_meta.lvm_name) {
- string_fragment sf = *iter;
+ opid_cap = *iter;
- opid = hash_str(sf.data(), sf.length());
+ opid = hash_str(opid_cap.data(), opid_cap.length());
+ } else if (ID_ORIG_H == fd.fd_meta.lvm_name) {
+ host_cap = *iter;
}
if (fd.fd_numeric_index) {
switch (fd.fd_meta.lvm_kind) {
case value_kind_t::VALUE_INTEGER:
case value_kind_t::VALUE_FLOAT: {
- string_fragment sf = *iter;
- char field_copy[sf.length() + 1];
- double val;
-
- if (sscanf(sf.to_string(field_copy), "%lf", &val) == 1)
- {
+ const auto sv = (*iter).to_string_view();
+ auto scan_float_res = scn::scan_value<double>(sv);
+ if (scan_float_res) {
this->lf_value_stats[fd.fd_numeric_index.value()]
- .add_value(val);
+ .add_value(scan_float_res.value());
}
break;
}
@@ -448,6 +623,31 @@ public:
ll.set_ignore(true);
}
}
+
+ if (opid_cap.is_valid()) {
+ auto opid_iter = sbc.sbc_opids.los_opid_ranges.find(opid_cap);
+
+ if (opid_iter == sbc.sbc_opids.los_opid_ranges.end()) {
+ auto opid_copy = opid_cap.to_owned(sbc.sbc_allocator);
+ auto otr = opid_time_range{time_range{tv, tv}};
+ auto emplace_res
+ = sbc.sbc_opids.los_opid_ranges.emplace(opid_copy, otr);
+ opid_iter = emplace_res.first;
+ } else {
+ opid_iter->second.otr_range.extend_to(tv);
+ }
+
+ opid_iter->second.otr_level_stats.update_msg_count(level);
+
+ auto& otr = opid_iter->second;
+ if (!otr.otr_description.lod_id && host_cap.is_valid()
+ && otr.otr_description.lod_elements.empty())
+ {
+ otr.otr_description.lod_id = get_opid_desc();
+ otr.otr_description.lod_elements.emplace_back(
+ 0, host_cap.to_string());
+ }
+ }
dst.emplace_back(li.li_file_range.fr_offset, tv, level, 0, opid);
return scan_match{0};
}
@@ -463,8 +663,19 @@ public:
static const auto SEP_RE
= lnav::pcre2pp::code::from_const(R"(^#separator\s+(.+))");
+ if (dst.empty()) {
+ auto file_options = lf.get_file_options();
+
+ if (file_options) {
+ this->lf_date_time.dts_default_zone
+ = file_options->second.fo_default_zone.pp_value;
+ } else {
+ this->lf_date_time.dts_default_zone = nullptr;
+ }
+ }
+
if (!this->blf_format_name.empty()) {
- return this->scan_int(dst, li, sbr);
+ return this->scan_int(dst, li, sbr, sbc);
}
if (dst.empty() || dst.size() > 20 || sbr.empty()
@@ -531,10 +742,18 @@ public:
this->blf_format_name = intern_string::lookup(full_name);
} else if (directive == "#fields" && this->blf_field_defs.empty()) {
do {
+ auto field_name
+ = intern_string::lookup("bro_" + sql_safe_ident(*iter));
+ auto common_iter = FIELD_META.find(field_name);
+ if (common_iter == FIELD_META.end()) {
+ FIELD_META.emplace(field_name,
+ logline_value_meta{
+ field_name,
+ value_kind_t::VALUE_TEXT,
+ });
+ }
this->blf_field_defs.emplace_back(
- intern_string::lookup("bro_" + sql_safe_ident(*iter)),
- this->blf_field_defs.size(),
- this);
+ field_name, this->blf_field_defs.size(), this);
++iter;
} while (iter != ss.end());
} else if (directive == "#types") {
@@ -551,12 +770,14 @@ public:
"bro_referrer",
"bro_resp_fuids",
"bro_service",
- "bro_status_code",
"bro_uid",
"bro_uri",
"bro_user_agent",
"bro_username",
};
+ static const char* KNOWN_FOREIGN[] = {
+ "bro_status_code",
+ };
int numeric_count = 0;
@@ -575,7 +796,12 @@ public:
bool ident = std::binary_search(std::begin(KNOWN_IDS),
std::end(KNOWN_IDS),
fd.fd_meta.lvm_name);
- fd.with_kind(value_kind_t::VALUE_INTEGER, ident)
+ bool foreign
+ = std::binary_search(std::begin(KNOWN_FOREIGN),
+ std::end(KNOWN_FOREIGN),
+ fd.fd_meta.lvm_name);
+ fd.with_kind(
+ value_kind_t::VALUE_INTEGER, ident, foreign)
.with_numeric_index(numeric_count);
numeric_count += 1;
} else if (field_type == "bool") {
@@ -601,8 +827,7 @@ public:
if (!this->blf_format_name.empty() && !this->blf_separator.empty()
&& !this->blf_field_defs.empty())
{
- dst.clear();
- return this->scan_int(dst, li, sbr);
+ return this->scan_int(dst, li, sbr, sbc);
}
this->blf_format_name.clear();
@@ -651,6 +876,8 @@ public:
} else {
values.lvv_values.emplace_back(fd.fd_meta);
}
+ values.lvv_values.back().lv_meta.lvm_user_hidden
+ = fd.fd_root_meta->lvm_user_hidden;
}
}
@@ -675,20 +902,27 @@ public:
bool hide_field(const intern_string_t field_name, bool val) override
{
- auto fd_iter
- = std::find_if(this->blf_field_defs.begin(),
- this->blf_field_defs.end(),
- [field_name](const field_def& elem) {
- return elem.fd_meta.lvm_name == field_name;
- });
- if (fd_iter == this->blf_field_defs.end()) {
+ auto fd_iter = FIELD_META.find(field_name);
+ if (fd_iter == FIELD_META.end()) {
return false;
}
- fd_iter->fd_meta.lvm_user_hidden = val;
+ fd_iter->second.lvm_user_hidden = val;
+
return true;
}
+ std::map<intern_string_t, logline_value_meta> get_field_states() override
+ {
+ std::map<intern_string_t, logline_value_meta> retval;
+
+ for (const auto& fd : FIELD_META) {
+ retval.emplace(fd.first, fd.second);
+ }
+
+ return retval;
+ }
+
std::shared_ptr<log_format> specialized(int fmt_lock = -1) override
{
auto retval = std::make_shared<bro_log_format>(*this);
@@ -707,9 +941,8 @@ public:
void get_columns(std::vector<vtab_column>& cols) const override
{
for (const auto& fd : this->blt_format.blf_field_defs) {
- std::pair<int, unsigned int> type_pair
- = log_vtab_impl::logline_value_to_sqlite_type(
- fd.fd_meta.lvm_kind);
+ auto type_pair = log_vtab_impl::logline_value_to_sqlite_type(
+ fd.fd_meta.lvm_kind);
cols.emplace_back(fd.fd_meta.lvm_name.to_string(),
type_pair.first,
@@ -726,7 +959,7 @@ public:
this->log_vtab_impl::get_foreign_keys(keys_inout);
for (const auto& fd : this->blt_format.blf_field_defs) {
- if (fd.fd_meta.lvm_identifier) {
+ if (fd.fd_meta.lvm_identifier || fd.fd_meta.lvm_foreign_key) {
keys_inout.push_back(fd.fd_meta.lvm_name.to_string());
}
}
@@ -775,6 +1008,9 @@ public:
std::vector<field_def> blf_field_defs;
};
+std::unordered_map<const intern_string_t, logline_value_meta>
+ bro_log_format::FIELD_META;
+
struct ws_separated_string {
const char* ss_str;
size_t ss_len;
@@ -877,6 +1113,7 @@ public:
struct field_def {
const intern_string_t fd_name;
logline_value_meta fd_meta;
+ logline_value_meta* fd_root_meta{nullptr};
std::string fd_collator;
nonstd::optional<size_t> fd_numeric_index;
@@ -892,19 +1129,21 @@ public:
{
}
- field_def(int col,
+ field_def(size_t col,
const char* name,
value_kind_t kind,
bool ident = false,
+ bool foreign_key = false,
std::string coll = "")
: fd_name(intern_string::lookup(name)),
fd_meta(
intern_string::lookup(sql_safe_ident(string_fragment(name))),
kind,
- col),
+ logline_value_meta::table_column{col}),
fd_collator(std::move(coll))
{
this->fd_meta.lvm_identifier = ident;
+ this->fd_meta.lvm_foreign_key = foreign_key;
}
field_def& with_kind(value_kind_t kind,
@@ -924,6 +1163,9 @@ public:
}
};
+ static std::unordered_map<const intern_string_t, logline_value_meta>
+ FIELD_META;
+
struct field_to_struct_t {
field_to_struct_t(const char* prefix, const char* struct_name)
: fs_prefix(prefix),
@@ -942,6 +1184,7 @@ public:
{
this->lf_is_self_describing = true;
this->lf_time_ordered = false;
+ this->lf_structured = true;
}
const intern_string_t get_name() const override
@@ -990,7 +1233,7 @@ public:
break;
}
- const field_def& fd = this->wlf_field_defs[iter.index()];
+ const auto& fd = this->wlf_field_defs[iter.index()];
string_fragment sf = *iter;
if (sf.startswith("#")) {
@@ -1051,13 +1294,12 @@ public:
switch (fd.fd_meta.lvm_kind) {
case value_kind_t::VALUE_INTEGER:
case value_kind_t::VALUE_FLOAT: {
- char field_copy[sf.length() + 1];
- double val;
+ auto scan_float_res
+ = scn::scan_value<double>(sf.to_string_view());
- if (sscanf(sf.to_string(field_copy), "%lf", &val) == 1)
- {
+ if (scan_float_res) {
this->lf_value_stats[fd.fd_numeric_index.value()]
- .add_value(val);
+ .add_value(scan_float_res.value());
}
break;
}
@@ -1079,9 +1321,7 @@ public:
tm.et_tm.tm_yday = date_tm.et_tm.tm_yday;
}
- tv.tv_sec = tm2sec(&tm.et_tm);
- tv.tv_usec = tm.et_nsec / 1000;
-
+ tv = tm.to_timeval();
if (!this->lf_specialized) {
for (auto& ll : dst) {
ll.set_ignore(true);
@@ -1108,6 +1348,17 @@ public:
return scan_incomplete{};
}
+ if (dst.empty()) {
+ auto file_options = lf.get_file_options();
+
+ if (file_options) {
+ this->lf_date_time.dts_default_zone
+ = file_options->second.fo_default_zone.pp_value;
+ } else {
+ this->lf_date_time.dts_default_zone = nullptr;
+ }
+ }
+
if (!this->wlf_format_name.empty()) {
return this->scan_int(dst, li, sbr);
}
@@ -1131,8 +1382,7 @@ public:
auto line = next_read_result.unwrap();
ws_separated_string ss(line.get_data(), line.length());
auto iter = ss.begin();
-
- string_fragment directive = *iter;
+ const auto directive = *iter;
if (directive.empty() || directive[0] != '#') {
continue;
@@ -1170,9 +1420,25 @@ public:
[&sf](auto elem) { return sf == elem.fd_name; });
if (field_iter != end(KNOWN_FIELDS)) {
this->wlf_field_defs.emplace_back(*field_iter);
+ auto& fd = this->wlf_field_defs.back();
+ auto common_iter = FIELD_META.find(fd.fd_meta.lvm_name);
+ if (common_iter == FIELD_META.end()) {
+ auto emp_res = FIELD_META.emplace(
+ fd.fd_meta.lvm_name, fd.fd_meta);
+ common_iter = emp_res.first;
+ }
+ fd.fd_root_meta = &common_iter->second;
} else if (sf == "date" || sf == "time") {
this->wlf_field_defs.emplace_back(
intern_string::lookup(sf));
+ auto& fd = this->wlf_field_defs.back();
+ auto common_iter = FIELD_META.find(fd.fd_meta.lvm_name);
+ if (common_iter == FIELD_META.end()) {
+ auto emp_res = FIELD_META.emplace(
+ fd.fd_meta.lvm_name, fd.fd_meta);
+ common_iter = emp_res.first;
+ }
+ fd.fd_root_meta = &common_iter->second;
} else {
const auto fs_iter = std::find_if(
begin(KNOWN_STRUCT_FIELDS),
@@ -1181,27 +1447,30 @@ public:
return sf.startswith(elem.fs_prefix);
});
if (fs_iter != end(KNOWN_STRUCT_FIELDS)) {
- auto field_name
+ const intern_string_t field_name
= intern_string::lookup(sf.substr(3));
this->wlf_field_defs.emplace_back(
field_name,
logline_value_meta(
field_name,
value_kind_t::VALUE_TEXT,
- KNOWN_FIELDS.size() + 1
+ logline_value_meta::table_column{
+ KNOWN_FIELDS.size() + 1
+ std::distance(
begin(KNOWN_STRUCT_FIELDS),
- fs_iter),
+ fs_iter)},
this)
.with_struct_name(fs_iter->fs_struct_name));
} else {
- auto field_name = intern_string::lookup(sf);
+ const intern_string_t field_name
+ = intern_string::lookup(sf);
this->wlf_field_defs.emplace_back(
field_name,
logline_value_meta(
field_name,
value_kind_t::VALUE_TEXT,
- KNOWN_FIELDS.size() + X_FIELDS_IDX,
+ logline_value_meta::table_column{
+ KNOWN_FIELDS.size() + X_FIELDS_IDX},
this)
.with_struct_name(X_FIELDS_NAME));
}
@@ -1253,7 +1522,7 @@ public:
return;
}
- const field_def& fd = this->wlf_field_defs[iter.index()];
+ const auto& fd = this->wlf_field_defs[iter.index()];
if (sf == "-") {
sf.invalidate();
@@ -1275,6 +1544,10 @@ public:
} else {
values.lvv_values.emplace_back(fd.fd_meta);
}
+ if (fd.fd_root_meta != nullptr) {
+ values.lvv_values.back().lv_meta.lvm_user_hidden
+ = fd.fd_root_meta->lvm_user_hidden;
+ }
}
}
@@ -1299,20 +1572,27 @@ public:
bool hide_field(const intern_string_t field_name, bool val) override
{
- auto fd_iter
- = std::find_if(this->wlf_field_defs.begin(),
- this->wlf_field_defs.end(),
- [field_name](const field_def& elem) {
- return elem.fd_meta.lvm_name == field_name;
- });
- if (fd_iter == this->wlf_field_defs.end()) {
+ auto fd_iter = FIELD_META.find(field_name);
+ if (fd_iter == FIELD_META.end()) {
return false;
}
- fd_iter->fd_meta.lvm_user_hidden = val;
+ fd_iter->second.lvm_user_hidden = val;
+
return true;
}
+ std::map<intern_string_t, logline_value_meta> get_field_states() override
+ {
+ std::map<intern_string_t, logline_value_meta> retval;
+
+ for (const auto& fd : FIELD_META) {
+ retval.emplace(fd.first, fd.second);
+ }
+
+ return retval;
+ }
+
std::shared_ptr<log_format> specialized(int fmt_lock = -1) override
{
auto retval = std::make_shared<w3c_log_format>(*this);
@@ -1356,7 +1636,7 @@ public:
this->log_vtab_impl::get_foreign_keys(keys_inout);
for (const auto& fd : KNOWN_FIELDS) {
- if (fd.fd_meta.lvm_identifier) {
+ if (fd.fd_meta.lvm_identifier || fd.fd_meta.lvm_foreign_key) {
keys_inout.push_back(fd.fd_meta.lvm_name.to_string());
}
}
@@ -1402,7 +1682,10 @@ public:
std::vector<field_def> wlf_field_defs;
};
-static int KNOWN_FIELD_INDEX = 0;
+std::unordered_map<const intern_string_t, logline_value_meta>
+ w3c_log_format::FIELD_META;
+
+static size_t KNOWN_FIELD_INDEX = 0;
const std::vector<w3c_log_format::field_def> w3c_log_format::KNOWN_FIELDS = {
{
KNOWN_FIELD_INDEX++,
@@ -1415,6 +1698,7 @@ const std::vector<w3c_log_format::field_def> w3c_log_format::KNOWN_FIELDS = {
"c-ip",
value_kind_t::VALUE_TEXT,
true,
+ false,
"ipaddress",
},
{
@@ -1434,6 +1718,7 @@ const std::vector<w3c_log_format::field_def> w3c_log_format::KNOWN_FIELDS = {
"cs-uri-stem",
value_kind_t::VALUE_TEXT,
true,
+ false,
"naturalnocase",
},
{
@@ -1459,6 +1744,7 @@ const std::vector<w3c_log_format::field_def> w3c_log_format::KNOWN_FIELDS = {
"s-ip",
value_kind_t::VALUE_TEXT,
true,
+ false,
"ipaddress",
},
{
@@ -1490,6 +1776,7 @@ const std::vector<w3c_log_format::field_def> w3c_log_format::KNOWN_FIELDS = {
"sc-status",
value_kind_t::VALUE_INTEGER,
false,
+ true,
},
{
KNOWN_FIELD_INDEX++,
@@ -1551,7 +1838,7 @@ class logfmt_format : public log_format {
public:
const intern_string_t get_name() const override
{
- const static auto NAME = intern_string::lookup("logfmt_log");
+ const static intern_string_t NAME = intern_string::lookup("logfmt_log");
return NAME;
}
@@ -1589,6 +1876,17 @@ public:
bool done = false;
logfmt_pair_handler lph(this->lf_date_time);
+ if (dst.empty()) {
+ auto file_options = lf.get_file_options();
+
+ if (file_options) {
+ this->lf_date_time.dts_default_zone
+ = file_options->second.fo_default_zone.pp_value;
+ } else {
+ this->lf_date_time.dts_default_zone = nullptr;
+ }
+ }
+
while (!done) {
auto parse_result = p.step();
@@ -1685,7 +1983,8 @@ public:
kvp.first),
value_kind_t::
VALUE_INTEGER,
- 0,
+ logline_value_meta::
+ table_column{0},
(log_format*) this}
.with_struct_name(FIELDS_NAME);
values.lvv_values.emplace_back(lvm, bv.bv_value);
@@ -1698,7 +1997,8 @@ public:
kvp.first),
value_kind_t::
VALUE_INTEGER,
- 0,
+ logline_value_meta::
+ table_column{0},
(log_format*) this}
.with_struct_name(FIELDS_NAME);
values.lvv_values.emplace_back(lvm, iv.iv_value);
@@ -1711,7 +2011,8 @@ public:
kvp.first),
value_kind_t::
VALUE_INTEGER,
- 0,
+ logline_value_meta::
+ table_column{0},
(log_format*) this}
.with_struct_name(FIELDS_NAME);
values.lvv_values.emplace_back(lvm, fv.fv_value);
@@ -1732,8 +2033,9 @@ public:
} else if (kvp.first == "level") {
} else if (kvp.first == "msg") {
sa.emplace_back(value_lr, SA_BODY.value());
- } else if (!kvp.second.is<logfmt::parser::int_value>()
- && !kvp.second.is<logfmt::parser::bool_value>())
+ } else if (kvp.second.is<logfmt::parser::quoted_value>()
+ || kvp.second
+ .is<logfmt::parser::unquoted_value>())
{
auto lvm
= logline_value_meta{intern_string::lookup(
@@ -1741,7 +2043,8 @@ public:
value_frag.startswith("\"")
? value_kind_t::VALUE_JSON
: value_kind_t::VALUE_TEXT,
- 0,
+ logline_value_meta::
+ table_column{0},
(log_format*) this}
.with_struct_name(FIELDS_NAME);
values.lvv_values.emplace_back(lvm, value_frag);
@@ -1772,4 +2075,5 @@ static auto format_binder = injector::bind_multiple<log_format>()
.add<logfmt_format>()
.add<bro_log_format>()
.add<w3c_log_format>()
- .add<generic_log_format>();
+ .add<generic_log_format>()
+ .add<piper_log_format>();
diff --git a/src/log_format_loader.cc b/src/log_format_loader.cc
index 4e75b0b..c354479 100644
--- a/src/log_format_loader.cc
+++ b/src/log_format_loader.cc
@@ -34,8 +34,6 @@
#include "log_format_loader.hh"
-#include <errno.h>
-#include <fcntl.h>
#include <glob.h>
#include <libgen.h>
#include <sys/stat.h>
@@ -53,6 +51,7 @@
#include "fmt/format.h"
#include "lnav_config.hh"
#include "log_format_ext.hh"
+#include "sql_execute.hh"
#include "sql_util.hh"
#include "yajlpp/yajlpp.hh"
#include "yajlpp/yajlpp_def.hh"
@@ -139,7 +138,10 @@ value_def_provider(const yajlpp_provider_context& ypc, external_log_format* elf)
if (iter == elf->elf_value_defs.end()) {
retval = std::make_shared<external_log_format::value_def>(
- value_name, value_kind_t::VALUE_TEXT, -1, elf);
+ value_name,
+ value_kind_t::VALUE_TEXT,
+ logline_value_meta::external_column{},
+ elf);
elf->elf_value_defs[value_name] = retval;
elf->elf_value_def_order.emplace_back(retval);
} else {
@@ -169,6 +171,26 @@ format_tag_def_provider(const yajlpp_provider_context& ypc,
return retval.get();
}
+static format_partition_def*
+format_partition_def_provider(const yajlpp_provider_context& ypc,
+ external_log_format* elf)
+{
+ const intern_string_t partition_name = ypc.get_substr_i(0);
+
+ auto iter = elf->lf_partition_defs.find(partition_name);
+ std::shared_ptr<format_partition_def> retval;
+
+ if (iter == elf->lf_partition_defs.end()) {
+ retval = std::make_shared<format_partition_def>(
+ partition_name.to_string());
+ elf->lf_partition_defs[partition_name] = retval;
+ } else {
+ retval = iter->second;
+ }
+
+ return retval.get();
+}
+
static scaling_factor*
scaling_factor_provider(const yajlpp_provider_context& ypc,
external_log_format::value_def* value_def)
@@ -281,11 +303,6 @@ read_format_field(yajlpp_parse_context* ypc,
} else if (field_name == "module-field") {
elf->elf_module_id_field = intern_string::lookup(value);
elf->elf_container = true;
- } else if (field_name == "mime-types") {
- auto value_opt = ypc->ypc_current_handler->to_enum_value(value);
- if (value_opt) {
- elf->elf_mime_types.insert((file_format_t) *value_opt);
- }
}
return 1;
@@ -439,6 +456,8 @@ static const json_path_handler_base::enum_value_t OVERFLOW_ENUM[] = {
{"truncate",
external_log_format::json_format_element::overflow_t::TRUNCATE},
{"dot-dot", external_log_format::json_format_element::overflow_t::DOTDOT},
+ {"last-word",
+ external_log_format::json_format_element::overflow_t::LASTWORD},
json_path_handler_base::ENUM_TERMINATOR,
};
@@ -598,7 +617,8 @@ static const struct json_path_container value_def_handlers = {
.with_synopsis("<bool>")
.with_description("Indicates whether or not this field should be "
"treated as a foreign key for row in another table")
- .for_field(&external_log_format::value_def::vd_foreign_key),
+ .for_field(&external_log_format::value_def::vd_meta,
+ &logline_value_meta::lvm_foreign_key),
yajlpp::property_handler("hidden")
.with_synopsis("<bool>")
@@ -762,6 +782,35 @@ static const struct json_path_container tag_handlers = {
.with_children(format_tag_def_handlers),
};
+static const struct json_path_container format_partition_def_handlers = {
+ yajlpp::property_handler("paths#")
+ .with_description("Restrict partitioning to the given paths")
+ .for_field(&format_partition_def::fpd_paths)
+ .with_children(tag_path_handlers),
+ yajlpp::property_handler("pattern")
+ .with_synopsis("<regex>")
+ .with_description("The regular expression to match against the body of "
+ "the log message")
+ .with_example("\\w+ is down")
+ .for_field(&format_partition_def::fpd_pattern),
+ yajlpp::property_handler("description")
+ .with_synopsis("<string>")
+ .with_description("A description of this partition")
+ .for_field(&format_partition_def::fpd_description),
+ json_path_handler("level")
+ .with_synopsis("<log-level>")
+ .with_description("Constrain hits to log messages with this level")
+ .with_enum_values(LEVEL_ENUM)
+ .for_field(&format_partition_def::fpd_level),
+};
+
+static const struct json_path_container partition_handlers = {
+ yajlpp::pattern_property_handler(R"((?<partition_type>[\w:;\._\-]+))")
+ .with_description("The type of partition to apply")
+ .with_obj_provider(format_partition_def_provider)
+ .with_children(format_partition_def_handlers),
+};
+
static const struct json_path_container highlight_handlers = {
yajlpp::pattern_property_handler(R"((?<highlight_name>[^/]+))")
.with_description("The definition of a highlight")
@@ -820,13 +869,93 @@ static const struct json_path_container search_table_handlers = {
.with_children(search_table_def_handlers),
};
-static const json_path_handler_base::enum_value_t MIME_TYPE_ENUM[] = {
- {
- "application/vnd.tcpdump.pcap",
- file_format_t::PCAP,
- },
+static const struct json_path_container header_expr_handlers = {
+ yajlpp::pattern_property_handler(R"((?<header_expr_name>\w+))")
+ .with_description("SQLite expression")
+ .for_field(&external_log_format::header_exprs::he_exprs),
+};
- json_path_handler_base::ENUM_TERMINATOR,
+static const struct json_path_container header_handlers = {
+ yajlpp::property_handler("expr")
+ .with_description("The expressions used to check if a file header "
+ "matches this file format")
+ .for_child(&external_log_format::header::h_exprs)
+ .with_children(header_expr_handlers),
+ yajlpp::property_handler("size")
+ .with_description("The minimum size required for this header type")
+ .for_field(&external_log_format::header::h_size),
+};
+
+static const struct json_path_container converter_handlers = {
+ yajlpp::property_handler("type")
+ .with_description("The MIME type")
+ .for_field(&external_log_format::converter::c_type),
+ yajlpp::property_handler("header")
+ .with_description("File header detection definitions")
+ .for_child(&external_log_format::converter::c_header)
+ .with_children(header_handlers),
+ yajlpp::property_handler("command")
+ .with_description("The script used to convert the file")
+ .with_pattern(R"([\w\.\-]+)")
+ .for_field(&external_log_format::converter::c_command),
+};
+
+static const struct json_path_container opid_descriptor_handlers = {
+ yajlpp::property_handler("field")
+ .with_synopsis("<name>")
+ .with_description("The field to include in the operation description")
+ .for_field(&log_format::opid_descriptor::od_field),
+ yajlpp::property_handler("extractor")
+ .with_synopsis("<regex>")
+ .with_description(
+ "The regex used to extract content for the operation description")
+ .for_field(&log_format::opid_descriptor::od_extractor),
+ yajlpp::property_handler("prefix")
+ .with_description(
+ "A string to prepend to this field in the description")
+ .for_field(&log_format::opid_descriptor::od_prefix),
+ yajlpp::property_handler("suffix")
+ .with_description("A string to append to this field in the description")
+ .for_field(&log_format::opid_descriptor::od_suffix),
+ yajlpp::property_handler("joiner")
+ .with_description("A string to insert between instances of this field "
+ "when the field is found more than once")
+ .for_field(&log_format::opid_descriptor::od_joiner),
+};
+
+static const struct json_path_container opid_description_format_handlers = {
+ yajlpp::property_handler("format#")
+ .with_description("Defines the elements of this operation description")
+ .for_field(&log_format::opid_descriptors::od_descriptors)
+ .with_children(opid_descriptor_handlers),
+};
+
+static const struct json_path_container opid_description_handlers = {
+ yajlpp::pattern_property_handler(R"((?<opid_descriptor>[\w\.\-]+))")
+ .with_description("A type of description for this operation")
+ .for_field(&log_format::lf_opid_description_def)
+ .with_children(opid_description_format_handlers),
+};
+
+static const struct json_path_container subid_description_handlers = {
+ yajlpp::pattern_property_handler(R"((?<subid_descriptor>[\w\.\-]+))")
+ .with_description("A type of description for this sub-operation")
+ .for_field(&log_format::lf_subid_description_def)
+ .with_children(opid_description_format_handlers),
+};
+
+static const struct json_path_container opid_handlers = {
+ yajlpp::property_handler("subid")
+ .with_description("The field that holds the ID for a sub-operation")
+ .for_field(&external_log_format::elf_subid_field),
+ yajlpp::property_handler("description")
+ .with_description(
+ "Define how to construct a description of an operation")
+ .with_children(opid_description_handlers),
+ yajlpp::property_handler("sub-description")
+ .with_description(
+ "Define how to construct a description of a sub-operation")
+ .with_children(subid_description_handlers),
};
const struct json_path_container format_handlers = {
@@ -838,14 +967,16 @@ const struct json_path_container format_handlers = {
json_path_handler("json", read_format_bool)
.with_description(
R"(Indicates that log files are JSON-encoded (deprecated, use "file-type": "json"))"),
- json_path_handler("convert-to-local-time", read_format_bool)
+ json_path_handler("convert-to-local-time")
.with_description("Indicates that displayed timestamps should "
- "automatically be converted to local time"),
- json_path_handler("hide-extra", read_format_bool)
+ "automatically be converted to local time")
+ .for_field(&external_log_format::lf_date_time,
+ &date_time_scanner::dts_local_time),
+ json_path_handler("hide-extra")
.with_description(
"Specifies whether extra values in JSON logs should be displayed")
.for_field(&external_log_format::jlf_hide_extra),
- json_path_handler("multiline", read_format_bool)
+ json_path_handler("multiline")
.with_description("Indicates that log messages can span multiple lines")
.for_field(&log_format::lf_multiline),
json_path_handler("timestamp-divisor", read_format_double)
@@ -857,9 +988,11 @@ const struct json_path_container format_handlers = {
.with_description("A regular expression that restricts this format to "
"log files with a matching name")
.for_field(&external_log_format::elf_filename_pcre),
- json_path_handler("mime-types#", read_format_field)
- .with_description("A list of mime-types this format should be used for")
- .with_enum_values(MIME_TYPE_ENUM),
+ json_path_handler("converter")
+ .with_description("Describes how the file format can be detected and "
+ "converted to a log that can be understood by lnav")
+ .for_child(&external_log_format::elf_converter)
+ .with_children(converter_handlers),
json_path_handler("level-field")
.with_description(
"The name of the level field in the log message pattern")
@@ -896,7 +1029,7 @@ const struct json_path_container format_handlers = {
.with_description("A URL with more information about this log format"),
json_path_handler("title", read_format_field)
.with_description("The human-readable name for this log format"),
- json_path_handler("description", read_format_field)
+ json_path_handler("description")
.with_description("A longer description of this log format")
.for_field(&external_log_format::lf_description),
json_path_handler("timestamp-format#", read_format_field)
@@ -904,10 +1037,13 @@ const struct json_path_container format_handlers = {
json_path_handler("module-field", read_format_field)
.with_description(
"The name of the module field in the log message pattern"),
- json_path_handler("opid-field", read_format_field)
+ json_path_handler("opid-field")
.with_description(
"The name of the operation-id field in the log message pattern")
.for_field(&external_log_format::elf_opid_field),
+ yajlpp::property_handler("opid")
+ .with_description("Definitions related to operations found in logs")
+ .with_children(opid_handlers),
yajlpp::property_handler("ordered-by-time")
.with_synopsis("<bool>")
.with_description(
@@ -926,6 +1062,11 @@ const struct json_path_container format_handlers = {
.with_description("The tags to automatically apply to log messages")
.with_children(tag_handlers),
+ yajlpp::property_handler("partitions")
+ .with_description(
+ "The partitions to automatically apply to log messages")
+ .with_children(partition_handlers),
+
yajlpp::property_handler("action").with_children(action_handlers),
yajlpp::property_handler("sample#")
.with_description("An array of sample log messages to be tested "
@@ -1447,22 +1588,25 @@ static void
find_format_in_path(const ghc::filesystem::path& path,
available_scripts& scripts)
{
- auto format_path = path / "formats/*/*.lnav";
- static_root_mem<glob_t, globfree> gl;
+ for (auto format_path :
+ {path / "formats/*/*.lnav", path / "configs/*/*.lnav"})
+ {
+ static_root_mem<glob_t, globfree> gl;
- log_debug("Searching for script in path: %s", format_path.c_str());
- if (glob(format_path.c_str(), 0, nullptr, gl.inout()) == 0) {
- for (int lpc = 0; lpc < (int) gl->gl_pathc; lpc++) {
- const char* filename = basename(gl->gl_pathv[lpc]);
- auto script_name = std::string(filename, strlen(filename) - 5);
- struct script_metadata meta;
+ log_debug("Searching for script in path: %s", format_path.c_str());
+ if (glob(format_path.c_str(), 0, nullptr, gl.inout()) == 0) {
+ for (int lpc = 0; lpc < (int) gl->gl_pathc; lpc++) {
+ const char* filename = basename(gl->gl_pathv[lpc]);
+ auto script_name = std::string(filename, strlen(filename) - 5);
+ struct script_metadata meta;
- meta.sm_path = gl->gl_pathv[lpc];
- meta.sm_name = script_name;
- extract_metadata_from_file(meta);
- scripts.as_scripts[script_name].push_back(meta);
+ meta.sm_path = gl->gl_pathv[lpc];
+ meta.sm_name = script_name;
+ extract_metadata_from_file(meta);
+ scripts.as_scripts[script_name].push_back(meta);
- log_debug(" found script: %s", meta.sm_path.c_str());
+ log_debug(" found script: %s", meta.sm_path.c_str());
+ }
}
}
}
diff --git a/src/log_level_re.cc b/src/log_level_re.cc
index d6fbeef..a53f294 100644
--- a/src/log_level_re.cc
+++ b/src/log_level_re.cc
@@ -1,4 +1,4 @@
-/* Generated by re2c 2.0.3 on Wed Jan 27 16:33:33 2021 */
+/* Generated by re2c 3.1 on Mon Apr 1 11:22:38 2024 */
#line 1 "../../lnav/src/log_level_re.re"
/**
* Copyright (c) 2018, Timothy Stack
@@ -23,696 +23,506 @@
* DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "log_level.hh"
+#include "config.h"
#include <string.h>
-#include "config.h"
+#include "log_level.hh"
-log_level_t
-string2level(const char* levelstr, ssize_t len, bool exact)
+log_level_t string2level(const char *levelstr, ssize_t len, bool exact)
{
log_level_t retval = LEVEL_UNKNOWN;
- if (len == (ssize_t) -1) {
+ if (len == (ssize_t)-1) {
len = strlen(levelstr);
}
- if (((len == 1) || ((len > 1) && (levelstr[1] == ' ')))
- && (retval = abbrev2level(levelstr, 1)) != LEVEL_UNKNOWN)
- {
+ if (((len == 1) || ((len > 1) && (levelstr[1] == ' '))) &&
+ (retval = abbrev2level(levelstr, 1)) != LEVEL_UNKNOWN) {
return retval;
}
-#define YYCTYPE unsigned char
-#define RET(tok) \
- { \
+# define YYCTYPE unsigned char
+# define RET(tok) { \
return tok; \
}
- const YYCTYPE* YYCURSOR = (const unsigned char*) levelstr;
- const YYCTYPE* YYLIMIT = (const unsigned char*) levelstr + len;
- const YYCTYPE* YYMARKER = YYCURSOR;
- const YYCTYPE* debug_level = nullptr;
+ const YYCTYPE *YYCURSOR = (const unsigned char *) levelstr;
+ const YYCTYPE *YYLIMIT = (const unsigned char *) levelstr + len;
+ const YYCTYPE *YYMARKER = YYCURSOR;
+ const YYCTYPE *debug_level = nullptr;
+
+# define YYPEEK() (YYCURSOR < YYLIMIT ? *YYCURSOR : 0)
+# define YYSKIP() ++YYCURSOR
+# define YYBACKUP() YYMARKER = YYCURSOR
+# define YYRESTORE() YYCURSOR = YYMARKER
+# define YYSTAGP(x) x = YYCURSOR - 1
-#define YYPEEK() (YYCURSOR < YYLIMIT ? *YYCURSOR : 0)
-#define YYSKIP() ++YYCURSOR
-#define YYBACKUP() YYMARKER = YYCURSOR
-#define YYRESTORE() YYCURSOR = YYMARKER
-#define YYSTAGP(x) x = YYCURSOR - 1
+
+#line 69 "../../lnav/src/log_level_re.cc"
+#line 65 "../../lnav/src/log_level_re.re"
-loop
- :
-#line 71 "../../lnav/src/log_level_re.cc"
+ loop:
+
+#line 74 "../../lnav/src/log_level_re.cc"
{
- YYCTYPE yych;
- unsigned int yyaccept = 0;
- yych = YYPEEK();
- switch (yych) {
- case 0x00:
- goto yy2;
- case 'C':
- case 'c':
- goto yy6;
- case 'D':
- case 'd':
- goto yy7;
- case 'E':
- case 'e':
- goto yy8;
- case 'F':
- case 'f':
- goto yy9;
- case 'I':
- case 'i':
- goto yy10;
- case 'N':
- case 'n':
- goto yy11;
- case 'S':
- case 's':
- goto yy12;
- case 'T':
- case 't':
- goto yy13;
- case 'W':
- case 'w':
- goto yy14;
- default:
- goto yy4;
- }
+ YYCTYPE yych;
+ unsigned int yyaccept = 0;
+ yych = YYPEEK();
+ if (yych <= 'W') {
+ if (yych <= 'H') {
+ if (yych <= 'C') {
+ if (yych <= 0x00) goto yy1;
+ if (yych <= 'B') goto yy2;
+ goto yy4;
+ } else {
+ if (yych <= 'D') goto yy5;
+ if (yych <= 'E') goto yy6;
+ if (yych <= 'F') goto yy7;
+ goto yy2;
+ }
+ } else {
+ if (yych <= 'R') {
+ if (yych <= 'I') goto yy8;
+ if (yych == 'N') goto yy9;
+ goto yy2;
+ } else {
+ if (yych <= 'S') goto yy10;
+ if (yych <= 'T') goto yy11;
+ if (yych <= 'V') goto yy2;
+ goto yy12;
+ }
+ }
+ } else {
+ if (yych <= 'i') {
+ if (yych <= 'd') {
+ if (yych <= 'b') goto yy2;
+ if (yych <= 'c') goto yy4;
+ goto yy5;
+ } else {
+ if (yych <= 'e') goto yy6;
+ if (yych <= 'f') goto yy7;
+ if (yych <= 'h') goto yy2;
+ goto yy8;
+ }
+ } else {
+ if (yych <= 's') {
+ if (yych == 'n') goto yy9;
+ if (yych <= 'r') goto yy2;
+ goto yy10;
+ } else {
+ if (yych <= 't') goto yy11;
+ if (yych == 'w') goto yy12;
+ goto yy2;
+ }
+ }
+ }
+yy1:
+ YYSKIP();
+#line 74 "../../lnav/src/log_level_re.re"
+ { RET(LEVEL_UNKNOWN); }
+#line 131 "../../lnav/src/log_level_re.cc"
yy2:
- YYSKIP();
-#line 73 "../../lnav/src/log_level_re.re"
- {
- RET(LEVEL_UNKNOWN);
- }
-#line 102 "../../lnav/src/log_level_re.cc"
+ YYSKIP();
+yy3:
+#line 101 "../../lnav/src/log_level_re.re"
+ { goto loop; }
+#line 137 "../../lnav/src/log_level_re.cc"
yy4:
- YYSKIP();
-yy5
- :
-#line 100 "../../lnav/src/log_level_re.re"
-{
- goto loop;
-}
-#line 108 "../../lnav/src/log_level_re.cc"
+ yyaccept = 0;
+ YYSKIP();
+ YYBACKUP();
+ yych = YYPEEK();
+ if (yych == 'R') goto yy13;
+ if (yych == 'r') goto yy13;
+ goto yy3;
+yy5:
+ yyaccept = 0;
+ YYSKIP();
+ YYBACKUP();
+ yych = YYPEEK();
+ if (yych == 'E') goto yy15;
+ if (yych == 'e') goto yy15;
+ goto yy3;
yy6:
- yyaccept = 0;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'R':
- case 'r':
- goto yy15;
- default:
- goto yy5;
- }
+ yyaccept = 0;
+ YYSKIP();
+ YYBACKUP();
+ yych = YYPEEK();
+ if (yych == 'R') goto yy16;
+ if (yych == 'r') goto yy16;
+ goto yy3;
yy7:
- yyaccept = 0;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'E':
- case 'e':
- goto yy17;
- default:
- goto yy5;
- }
+ yyaccept = 0;
+ YYSKIP();
+ YYBACKUP();
+ yych = YYPEEK();
+ if (yych == 'A') goto yy17;
+ if (yych == 'a') goto yy17;
+ goto yy3;
yy8:
- yyaccept = 0;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'R':
- case 'r':
- goto yy18;
- default:
- goto yy5;
- }
+ yyaccept = 0;
+ YYSKIP();
+ YYBACKUP();
+ yych = YYPEEK();
+ if (yych == 'N') goto yy18;
+ if (yych == 'n') goto yy18;
+ goto yy3;
yy9:
- yyaccept = 0;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'A':
- case 'a':
- goto yy19;
- default:
- goto yy5;
- }
+ yyaccept = 0;
+ YYSKIP();
+ YYBACKUP();
+ yych = YYPEEK();
+ if (yych == 'O') goto yy19;
+ if (yych == 'o') goto yy19;
+ goto yy3;
yy10:
- yyaccept = 0;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'N':
- case 'n':
- goto yy20;
- default:
- goto yy5;
- }
+ yyaccept = 0;
+ YYSKIP();
+ YYBACKUP();
+ yych = YYPEEK();
+ if (yych <= 'T') {
+ if (yych == 'E') goto yy20;
+ if (yych <= 'S') goto yy3;
+ goto yy21;
+ } else {
+ if (yych <= 'e') {
+ if (yych <= 'd') goto yy3;
+ goto yy20;
+ } else {
+ if (yych == 't') goto yy21;
+ goto yy3;
+ }
+ }
yy11:
- yyaccept = 0;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'O':
- case 'o':
- goto yy21;
- default:
- goto yy5;
- }
+ yyaccept = 0;
+ YYSKIP();
+ YYBACKUP();
+ yych = YYPEEK();
+ if (yych == 'R') goto yy22;
+ if (yych == 'r') goto yy22;
+ goto yy3;
yy12:
- yyaccept = 0;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'E':
- case 'e':
- goto yy22;
- case 'T':
- case 't':
- goto yy23;
- default:
- goto yy5;
- }
+ yyaccept = 0;
+ YYSKIP();
+ YYBACKUP();
+ yych = YYPEEK();
+ if (yych == 'A') goto yy23;
+ if (yych == 'a') goto yy23;
+ goto yy3;
yy13:
- yyaccept = 0;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'R':
- case 'r':
- goto yy24;
- default:
- goto yy5;
- }
+ YYSKIP();
+ yych = YYPEEK();
+ if (yych == 'I') goto yy24;
+ if (yych == 'i') goto yy24;
yy14:
- yyaccept = 0;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'A':
- case 'a':
- goto yy25;
- default:
- goto yy5;
- }
+ YYRESTORE();
+ if (yyaccept <= 1) {
+ if (yyaccept == 0) {
+ goto yy3;
+ } else {
+ goto yy27;
+ }
+ } else {
+ goto yy45;
+ }
yy15:
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 'I':
- case 'i':
- goto yy26;
- default:
- goto yy16;
- }
+ YYSKIP();
+ yych = YYPEEK();
+ if (yych == 'B') goto yy25;
+ if (yych == 'b') goto yy25;
+ goto yy14;
yy16:
- YYRESTORE();
- switch (yyaccept) {
- case 0:
- goto yy5;
- case 1:
- goto yy29;
- default:
- goto yy48;
- }
+ YYSKIP();
+ yych = YYPEEK();
+ if (yych == 'R') goto yy26;
+ if (yych == 'r') goto yy26;
+ goto yy14;
yy17:
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 'B':
- case 'b':
- goto yy27;
- default:
- goto yy16;
- }
+ YYSKIP();
+ yych = YYPEEK();
+ if (yych == 'T') goto yy28;
+ if (yych == 't') goto yy28;
+ goto yy14;
yy18:
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 'R':
- case 'r':
- goto yy28;
- default:
- goto yy16;
- }
+ YYSKIP();
+ yych = YYPEEK();
+ if (yych == 'F') goto yy29;
+ if (yych == 'f') goto yy29;
+ goto yy14;
yy19:
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 'T':
- case 't':
- goto yy30;
- default:
- goto yy16;
- }
+ YYSKIP();
+ yych = YYPEEK();
+ if (yych == 'T') goto yy30;
+ if (yych == 't') goto yy30;
+ goto yy14;
yy20:
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 'F':
- case 'f':
- goto yy31;
- default:
- goto yy16;
- }
+ YYSKIP();
+ yych = YYPEEK();
+ if (yych == 'V') goto yy31;
+ if (yych == 'v') goto yy31;
+ goto yy14;
yy21:
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 'T':
- case 't':
- goto yy32;
- default:
- goto yy16;
- }
+ YYSKIP();
+ yych = YYPEEK();
+ if (yych == 'A') goto yy32;
+ if (yych == 'a') goto yy32;
+ goto yy14;
yy22:
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 'V':
- case 'v':
- goto yy33;
- default:
- goto yy16;
- }
+ YYSKIP();
+ yych = YYPEEK();
+ if (yych == 'A') goto yy33;
+ if (yych == 'a') goto yy33;
+ goto yy14;
yy23:
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 'A':
- case 'a':
- goto yy34;
- default:
- goto yy16;
- }
+ YYSKIP();
+ yych = YYPEEK();
+ if (yych == 'R') goto yy34;
+ if (yych == 'r') goto yy34;
+ goto yy14;
yy24:
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 'A':
- case 'a':
- goto yy35;
- default:
- goto yy16;
- }
+ YYSKIP();
+ yych = YYPEEK();
+ if (yych == 'T') goto yy35;
+ if (yych == 't') goto yy35;
+ goto yy14;
yy25:
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 'R':
- case 'r':
- goto yy36;
- default:
- goto yy16;
- }
+ YYSKIP();
+ yych = YYPEEK();
+ if (yych == 'U') goto yy36;
+ if (yych == 'u') goto yy36;
+ goto yy14;
yy26:
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 'T':
- case 't':
- goto yy37;
- default:
- goto yy16;
- }
+ yyaccept = 1;
+ YYSKIP();
+ YYBACKUP();
+ yych = YYPEEK();
+ if (yych == 'O') goto yy37;
+ if (yych == 'o') goto yy37;
yy27:
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 'U':
- case 'u':
- goto yy38;
- default:
- goto yy16;
- }
+#line 97 "../../lnav/src/log_level_re.re"
+ { RET(LEVEL_ERROR); }
+#line 312 "../../lnav/src/log_level_re.cc"
yy28:
- yyaccept = 1;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'O':
- case 'o':
- goto yy39;
- default:
- goto yy29;
- }
-yy29
- :
-#line 96 "../../lnav/src/log_level_re.re"
-{
- RET(LEVEL_ERROR);
-}
-#line 320 "../../lnav/src/log_level_re.cc"
+ YYSKIP();
+ yych = YYPEEK();
+ if (yych == 'A') goto yy38;
+ if (yych == 'a') goto yy38;
+ goto yy14;
+yy29:
+ YYSKIP();
+ yych = YYPEEK();
+ if (yych == 'O') goto yy39;
+ if (yych == 'o') goto yy39;
+ goto yy14;
yy30:
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 'A':
- case 'a':
- goto yy40;
- default:
- goto yy16;
- }
+ YYSKIP();
+ yych = YYPEEK();
+ if (yych == 'I') goto yy40;
+ if (yych == 'i') goto yy40;
+ goto yy14;
yy31:
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 'O':
- case 'o':
- goto yy41;
- default:
- goto yy16;
- }
+ YYSKIP();
+ yych = YYPEEK();
+ if (yych == 'E') goto yy41;
+ if (yych == 'e') goto yy41;
+ goto yy14;
yy32:
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 'I':
- case 'i':
- goto yy43;
- default:
- goto yy16;
- }
+ YYSKIP();
+ yych = YYPEEK();
+ if (yych == 'T') goto yy42;
+ if (yych == 't') goto yy42;
+ goto yy14;
yy33:
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 'E':
- case 'e':
- goto yy44;
- default:
- goto yy16;
- }
+ YYSKIP();
+ yych = YYPEEK();
+ if (yych == 'C') goto yy43;
+ if (yych == 'c') goto yy43;
+ goto yy14;
yy34:
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 'T':
- case 't':
- goto yy45;
- default:
- goto yy16;
- }
+ YYSKIP();
+ yych = YYPEEK();
+ if (yych == 'N') goto yy44;
+ if (yych == 'n') goto yy44;
+ goto yy14;
yy35:
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 'C':
- case 'c':
- goto yy46;
- default:
- goto yy16;
- }
+ YYSKIP();
+ yych = YYPEEK();
+ if (yych == 'I') goto yy46;
+ if (yych == 'i') goto yy46;
+ goto yy14;
yy36:
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 'N':
- case 'n':
- goto yy47;
- default:
- goto yy16;
- }
+ YYSKIP();
+ yych = YYPEEK();
+ if (yych == 'G') goto yy47;
+ if (yych == 'g') goto yy47;
+ goto yy14;
yy37:
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 'I':
- case 'i':
- goto yy49;
- default:
- goto yy16;
- }
+ YYSKIP();
+ yych = YYPEEK();
+ if (yych == 'R') goto yy49;
+ if (yych == 'r') goto yy49;
+ goto yy14;
yy38:
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 'G':
- case 'g':
- goto yy50;
- default:
- goto yy16;
- }
+ YYSKIP();
+ yych = YYPEEK();
+ if (yych == 'L') goto yy50;
+ if (yych == 'l') goto yy50;
+ goto yy14;
yy39:
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 'R':
- case 'r':
- goto yy52;
- default:
- goto yy16;
- }
+ YYSKIP();
+#line 93 "../../lnav/src/log_level_re.re"
+ { RET(LEVEL_INFO); }
+#line 383 "../../lnav/src/log_level_re.cc"
yy40:
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 'L':
- case 'l':
- goto yy53;
- default:
- goto yy16;
- }
+ YYSKIP();
+ yych = YYPEEK();
+ if (yych == 'C') goto yy51;
+ if (yych == 'c') goto yy51;
+ goto yy14;
yy41:
- YYSKIP();
-#line 92 "../../lnav/src/log_level_re.re"
- {
- RET(LEVEL_INFO);
- }
-#line 413 "../../lnav/src/log_level_re.cc"
+ YYSKIP();
+ yych = YYPEEK();
+ if (yych == 'R') goto yy52;
+ if (yych == 'r') goto yy52;
+ goto yy14;
+yy42:
+ YYSKIP();
+ yych = YYPEEK();
+ if (yych == 'S') goto yy53;
+ if (yych == 's') goto yy53;
+ goto yy14;
yy43:
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 'C':
- case 'c':
- goto yy55;
- default:
- goto yy16;
- }
+ YYSKIP();
+ yych = YYPEEK();
+ if (yych == 'E') goto yy54;
+ if (yych == 'e') goto yy54;
+ goto yy14;
yy44:
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 'R':
- case 'r':
- goto yy56;
- default:
- goto yy16;
- }
+ yyaccept = 2;
+ YYSKIP();
+ YYBACKUP();
+ yych = YYPEEK();
+ if (yych == 'I') goto yy55;
+ if (yych == 'i') goto yy55;
yy45:
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 'S':
- case 's':
- goto yy57;
- default:
- goto yy16;
- }
+#line 96 "../../lnav/src/log_level_re.re"
+ { RET(LEVEL_WARNING); }
+#line 418 "../../lnav/src/log_level_re.cc"
yy46:
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 'E':
- case 'e':
- goto yy59;
- default:
- goto yy16;
- }
+ YYSKIP();
+ yych = YYPEEK();
+ if (yych == 'C') goto yy56;
+ if (yych == 'c') goto yy56;
+ goto yy14;
yy47:
- yyaccept = 2;
- YYSKIP();
- YYBACKUP();
- yych = YYPEEK();
- switch (yych) {
- case 'I':
- case 'i':
- goto yy61;
- default:
- goto yy48;
- }
-yy48
- :
-#line 95 "../../lnav/src/log_level_re.re"
-{
- RET(LEVEL_WARNING);
-}
-#line 459 "../../lnav/src/log_level_re.cc"
+ YYSKIP();
+ yych = YYPEEK();
+ if (yych <= '1') goto yy48;
+ if (yych <= '5') goto yy57;
+yy48:
+ YYSTAGP(debug_level);
+#line 76 "../../lnav/src/log_level_re.re"
+ {
+ if (debug_level == nullptr) {
+ RET(LEVEL_DEBUG);
+ }
+ switch (*debug_level) {
+ case '2':
+ RET(LEVEL_DEBUG2);
+ case '3':
+ RET(LEVEL_DEBUG3);
+ case '4':
+ RET(LEVEL_DEBUG4);
+ case '5':
+ RET(LEVEL_DEBUG5);
+ default:
+ RET(LEVEL_DEBUG);
+ }
+ }
+#line 450 "../../lnav/src/log_level_re.cc"
yy49:
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 'C':
- case 'c':
- goto yy62;
- default:
- goto yy16;
- }
+ YYSKIP();
+ goto yy27;
yy50:
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case '2':
- case '3':
- case '4':
- case '5':
- goto yy63;
- default:
- goto yy51;
- }
+ YYSKIP();
+#line 100 "../../lnav/src/log_level_re.re"
+ { RET(LEVEL_FATAL); }
+#line 458 "../../lnav/src/log_level_re.cc"
yy51:
- YYSTAGP(debug_level);
-#line 75 "../../lnav/src/log_level_re.re"
- {
- if (debug_level == nullptr) {
- RET(LEVEL_DEBUG);
- }
- switch (*debug_level) {
- case '2':
- RET(LEVEL_DEBUG2);
- case '3':
- RET(LEVEL_DEBUG3);
- case '4':
- RET(LEVEL_DEBUG4);
- case '5':
- RET(LEVEL_DEBUG5);
- default:
- RET(LEVEL_DEBUG);
- }
- }
-#line 498 "../../lnav/src/log_level_re.cc"
+ YYSKIP();
+ yych = YYPEEK();
+ if (yych == 'E') goto yy58;
+ if (yych == 'e') goto yy58;
+ goto yy14;
yy52:
- YYSKIP();
- goto yy29;
+ YYSKIP();
+ yych = YYPEEK();
+ if (yych == 'E') goto yy59;
+ if (yych == 'e') goto yy59;
+ goto yy14;
yy53:
- YYSKIP();
-#line 99 "../../lnav/src/log_level_re.re"
- {
- RET(LEVEL_FATAL);
- }
-#line 506 "../../lnav/src/log_level_re.cc"
+ YYSKIP();
+#line 95 "../../lnav/src/log_level_re.re"
+ { RET(LEVEL_STATS); }
+#line 475 "../../lnav/src/log_level_re.cc"
+yy54:
+ YYSKIP();
+#line 75 "../../lnav/src/log_level_re.re"
+ { RET(LEVEL_TRACE); }
+#line 480 "../../lnav/src/log_level_re.cc"
yy55:
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 'E':
- case 'e':
- goto yy64;
- default:
- goto yy16;
- }
+ YYSKIP();
+ yych = YYPEEK();
+ if (yych == 'N') goto yy60;
+ if (yych == 'n') goto yy60;
+ goto yy14;
yy56:
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 'E':
- case 'e':
- goto yy66;
- default:
- goto yy16;
- }
+ YYSKIP();
+ yych = YYPEEK();
+ if (yych == 'A') goto yy61;
+ if (yych == 'a') goto yy61;
+ goto yy14;
yy57:
- YYSKIP();
+ YYSKIP();
+ goto yy48;
+yy58:
+ YYSKIP();
#line 94 "../../lnav/src/log_level_re.re"
- {
- RET(LEVEL_STATS);
- }
-#line 527 "../../lnav/src/log_level_re.cc"
+ { RET(LEVEL_NOTICE); }
+#line 500 "../../lnav/src/log_level_re.cc"
yy59:
- YYSKIP();
-#line 74 "../../lnav/src/log_level_re.re"
- {
- RET(LEVEL_TRACE);
- }
-#line 532 "../../lnav/src/log_level_re.cc"
+ YYSKIP();
+#line 99 "../../lnav/src/log_level_re.re"
+ { RET(LEVEL_CRITICAL); }
+#line 505 "../../lnav/src/log_level_re.cc"
+yy60:
+ YYSKIP();
+ yych = YYPEEK();
+ if (yych == 'G') goto yy62;
+ if (yych == 'g') goto yy62;
+ goto yy14;
yy61:
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 'N':
- case 'n':
- goto yy68;
- default:
- goto yy16;
- }
+ YYSKIP();
+ yych = YYPEEK();
+ if (yych == 'L') goto yy63;
+ if (yych == 'l') goto yy63;
+ goto yy14;
yy62:
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 'A':
- case 'a':
- goto yy69;
- default:
- goto yy16;
- }
+ YYSKIP();
+ goto yy45;
yy63:
- YYSKIP();
- goto yy51;
-yy64:
- YYSKIP();
-#line 93 "../../lnav/src/log_level_re.re"
- {
- RET(LEVEL_NOTICE);
- }
-#line 556 "../../lnav/src/log_level_re.cc"
-yy66:
- YYSKIP();
+ YYSKIP();
#line 98 "../../lnav/src/log_level_re.re"
- {
- RET(LEVEL_CRITICAL);
- }
-#line 561 "../../lnav/src/log_level_re.cc"
-yy68:
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 'G':
- case 'g':
- goto yy70;
- default:
- goto yy16;
- }
-yy69:
- YYSKIP();
- yych = YYPEEK();
- switch (yych) {
- case 'L':
- case 'l':
- goto yy71;
- default:
- goto yy16;
- }
-yy70:
- YYSKIP();
- goto yy48;
-yy71:
- YYSKIP();
-#line 97 "../../lnav/src/log_level_re.re"
- {
- RET(LEVEL_CRITICAL);
- }
-#line 585 "../../lnav/src/log_level_re.cc"
+ { RET(LEVEL_CRITICAL); }
+#line 525 "../../lnav/src/log_level_re.cc"
}
-#line 102 "../../lnav/src/log_level_re.re"
+#line 103 "../../lnav/src/log_level_re.re"
+
}
diff --git a/src/log_level_re.re b/src/log_level_re.re
index 87c9e18..63cd5d6 100644
--- a/src/log_level_re.re
+++ b/src/log_level_re.re
@@ -65,6 +65,7 @@ log_level_t string2level(const char *levelstr, ssize_t len, bool exact)
/*!stags:re2c format = 'const unsigned char *@@;'; */
loop:
/*!re2c
+ re2c:tags = 1;
re2c:yyfill:enable = 0;
re2c:flags:input = custom;
diff --git a/src/log_search_table.cc b/src/log_search_table.cc
index ccd53f6..427aab6 100644
--- a/src/log_search_table.cc
+++ b/src/log_search_table.cc
@@ -54,19 +54,23 @@ log_search_table::get_columns_int(std::vector<vtab_column>& cols) const
this->lst_format_column_count = this->lst_column_metas.size();
cols.resize(this->lst_column_metas.size());
for (const auto& meta : this->lst_column_metas) {
- if (meta.lvm_column == -1) {
+ if (!meta.lvm_column.is<logline_value_meta::table_column>()) {
continue;
}
+ auto col
+ = meta.lvm_column.get<logline_value_meta::table_column>().value;
auto type_pair
= log_vtab_impl::logline_value_to_sqlite_type(meta.lvm_kind);
- cols[meta.lvm_column].vc_name = meta.lvm_name.to_string();
- cols[meta.lvm_column].vc_type = type_pair.first;
- cols[meta.lvm_column].vc_subtype = type_pair.second;
+ cols[col].vc_name = meta.lvm_name.to_string();
+ cols[col].vc_type = type_pair.first;
+ cols[col].vc_subtype = type_pair.second;
}
}
this->lst_column_metas.emplace_back(
- match_index_name, value_kind_t::VALUE_INTEGER, cols.size());
+ match_index_name,
+ value_kind_t::VALUE_INTEGER,
+ logline_value_meta::table_column{cols.size()});
cols.emplace_back(MATCH_INDEX, SQLITE_INTEGER);
cn.add_column(string_fragment::from_const("__all__"));
auto captures = this->lst_regex->get_captures();
@@ -86,19 +90,19 @@ log_search_table::get_columns_int(std::vector<vtab_column>& cols) const
this->lst_column_metas.emplace_back(
intern_string::lookup(colname),
value_kind_t::VALUE_FLOAT,
- cols.size());
+ logline_value_meta::table_column{cols.size()});
break;
case SQLITE_INTEGER:
this->lst_column_metas.emplace_back(
intern_string::lookup(colname),
value_kind_t::VALUE_INTEGER,
- cols.size());
+ logline_value_meta::table_column{cols.size()});
break;
default:
this->lst_column_metas.emplace_back(
intern_string::lookup(colname),
value_kind_t::VALUE_TEXT,
- cols.size());
+ logline_value_meta::table_column{cols.size()});
break;
}
}
diff --git a/src/log_vtab_impl.cc b/src/log_vtab_impl.cc
index 7325675..0f905fc 100644
--- a/src/log_vtab_impl.cc
+++ b/src/log_vtab_impl.cc
@@ -33,7 +33,9 @@
#include "base/itertools.hh"
#include "base/lnav_log.hh"
#include "base/string_util.hh"
+#include "bookmarks.json.hh"
#include "config.h"
+#include "hasher.hh"
#include "lnav_util.hh"
#include "logfile_sub_source.hh"
#include "sql_util.hh"
@@ -53,21 +55,22 @@ static struct log_cursor log_cursor_latest;
thread_local _log_vtab_data log_vtab_data;
static const char* LOG_COLUMNS = R"( (
- log_line INTEGER, -- The line number for the log message
- log_part TEXT COLLATE naturalnocase, -- The partition the message is in
+ log_line INTEGER, -- The line number for the log message
log_time DATETIME, -- The adjusted timestamp for the log message
- log_actual_time DATETIME HIDDEN, -- The timestamp from the original log file for this message
- log_idle_msecs INTEGER, -- The difference in time between this messages and the previous
log_level TEXT COLLATE loglevel, -- The log message level
- log_mark BOOLEAN, -- True if the log message was marked
- log_comment TEXT, -- The comment for this message
- log_tags TEXT, -- A JSON list of tags for this message
- log_filters TEXT, -- A JSON list of filter IDs that matched this message
-- BEGIN Format-specific fields:
)";
static const char* LOG_FOOTER_COLUMNS = R"(
-- END Format-specific fields
+ log_part TEXT COLLATE naturalnocase, -- The partition the message is in
+ log_actual_time DATETIME HIDDEN, -- The timestamp from the original log file for this message
+ log_idle_msecs INTEGER, -- The difference in time between this messages and the previous
+ log_mark BOOLEAN, -- True if the log message was marked
+ log_comment TEXT, -- The comment for this message
+ log_tags TEXT, -- A JSON list of tags for this message
+ log_annotations TEXT, -- A JSON object of annotations for this messages
+ log_filters TEXT, -- A JSON list of filter IDs that matched this message
log_opid TEXT HIDDEN, -- The message's OPID
log_format TEXT HIDDEN, -- The name of the log file format
log_format_regex TEXT HIDDEN, -- The name of the regex used to parse this log message
@@ -81,6 +84,14 @@ static const char* LOG_FOOTER_COLUMNS = R"(
)";
enum class log_footer_columns : uint32_t {
+ partition,
+ actual_time,
+ idle_msecs,
+ mark,
+ comment,
+ tags,
+ annotations,
+ filters,
opid,
format,
format_regex,
@@ -108,8 +119,6 @@ log_vtab_impl::get_table_statement()
max_name_len = std::max(max_name_len, iter->vc_name.length());
}
for (iter = cols.begin(); iter != cols.end(); iter++) {
- auto_mem<char, sqlite3_free> coldecl;
- auto_mem<char, sqlite3_free> colname;
std::string comment;
require(!iter->vc_name.empty());
@@ -118,8 +127,8 @@ log_vtab_impl::get_table_statement()
comment.append(" -- ").append(iter->vc_comment);
}
- colname = sql_quote_ident(iter->vc_name.c_str());
- coldecl = sqlite3_mprintf(
+ auto colname = sql_quote_ident(iter->vc_name.c_str());
+ auto coldecl = lnav::sql::mprintf(
" %-*s %-7s %s COLLATE %-15Q,%s\n",
max_name_len,
colname.in(),
@@ -154,7 +163,7 @@ log_vtab_impl::get_table_statement()
oss << ");\n";
- log_debug("log_vtab_impl.get_table_statement() -> %s", oss.str().c_str());
+ log_trace("log_vtab_impl.get_table_statement() -> %s", oss.str().c_str());
return oss.str();
}
@@ -206,6 +215,7 @@ log_vtab_impl::get_foreign_keys(std::vector<std::string>& keys_inout) const
keys_inout.emplace_back("log_mark");
keys_inout.emplace_back("log_time_msecs");
keys_inout.emplace_back("log_top_line()");
+ keys_inout.emplace_back("log_msg_line()");
}
void
@@ -291,6 +301,12 @@ struct log_vtab {
textview_curses* tc{nullptr};
logfile_sub_source* lss{nullptr};
std::shared_ptr<log_vtab_impl> vi;
+
+ size_t footer_index(log_footer_columns col) const
+ {
+ return VT_COL_MAX + this->vi->vi_column_count
+ + lnav::enums::to_underlying(col);
+ }
};
struct vtab_cursor {
@@ -458,7 +474,8 @@ populate_indexed_columns(vtab_cursor* vc, log_vtab* vt)
vt->vi->extract(lf, line_number, vc->line_values);
}
- int sub_col = ic.cc_column - VT_COL_MAX;
+ auto sub_col = logline_value_meta::table_column{
+ (size_t) (ic.cc_column - VT_COL_MAX)};
auto lv_iter = find_if(vc->line_values.lvv_values.begin(),
vc->line_values.lvv_values.end(),
logline_value_cmp(nullptr, sub_col));
@@ -622,37 +639,6 @@ vt_column(sqlite3_vtab_cursor* cur, sqlite3_context* ctx, int col)
break;
}
- case VT_COL_PARTITION: {
- auto& vb = vt->tc->get_bookmarks();
- const auto& bv = vb[&textview_curses::BM_META];
-
- if (bv.empty()) {
- sqlite3_result_null(ctx);
- } else {
- vis_line_t curr_line(vc->log_cursor.lc_curr_line);
- auto iter = lower_bound(bv.begin(), bv.end(), curr_line + 1_vl);
-
- if (iter != bv.begin()) {
- --iter;
- auto line_meta_opt = vt->lss->find_bookmark_metadata(*iter);
- if (line_meta_opt
- && !line_meta_opt.value()->bm_name.empty())
- {
- sqlite3_result_text(
- ctx,
- line_meta_opt.value()->bm_name.c_str(),
- line_meta_opt.value()->bm_name.size(),
- SQLITE_TRANSIENT);
- } else {
- sqlite3_result_null(ctx);
- }
- } else {
- sqlite3_result_null(ctx);
- }
- }
- break;
- }
-
case VT_COL_LOG_TIME: {
char buffer[64];
@@ -662,63 +648,6 @@ vt_column(sqlite3_vtab_cursor* cur, sqlite3_context* ctx, int col)
break;
}
- case VT_COL_LOG_ACTUAL_TIME: {
- char buffer[64];
-
- if (ll->is_time_skewed()) {
- if (vc->line_values.lvv_values.empty()) {
- vc->cache_msg(lf, ll);
- require(vc->line_values.lvv_sbr.get_data() != nullptr);
- vt->vi->extract(lf, line_number, vc->line_values);
- }
-
- struct line_range time_range;
-
- time_range = find_string_attr_range(vt->vi->vi_attrs,
- &logline::L_TIMESTAMP);
-
- const auto* time_src
- = vc->line_values.lvv_sbr.get_data() + time_range.lr_start;
- struct timeval actual_tv;
- struct exttm tm;
-
- if (lf->get_format()->lf_date_time.scan(
- time_src,
- time_range.length(),
- lf->get_format()->get_timestamp_formats(),
- &tm,
- actual_tv,
- false))
- {
- sql_strftime(buffer, sizeof(buffer), actual_tv);
- }
- } else {
- sql_strftime(
- buffer, sizeof(buffer), ll->get_time(), ll->get_millis());
- }
- sqlite3_result_text(ctx, buffer, strlen(buffer), SQLITE_TRANSIENT);
- break;
- }
-
- case VT_COL_IDLE_MSECS:
- if (vc->log_cursor.lc_curr_line == 0) {
- sqlite3_result_int64(ctx, 0);
- } else {
- content_line_t prev_cl(
- vt->lss->at(vis_line_t(vc->log_cursor.lc_curr_line - 1)));
- auto prev_lf = vt->lss->find(prev_cl);
- auto prev_ll = prev_lf->begin() + prev_cl;
- uint64_t prev_time, curr_line_time;
-
- prev_time = prev_ll->get_time() * 1000ULL;
- prev_time += prev_ll->get_millis();
- curr_line_time = ll->get_time() * 1000ULL;
- curr_line_time += ll->get_millis();
- // require(curr_line_time >= prev_time);
- sqlite3_result_int64(ctx, curr_line_time - prev_time);
- }
- break;
-
case VT_COL_LEVEL: {
const char* level_name = ll->get_level_name();
@@ -727,91 +656,208 @@ vt_column(sqlite3_vtab_cursor* cur, sqlite3_context* ctx, int col)
break;
}
- case VT_COL_MARK: {
- sqlite3_result_int(ctx, ll->is_marked());
- break;
- }
+ default:
+ if (col > (VT_COL_MAX + vt->vi->vi_column_count - 1)) {
+ auto footer_column = static_cast<log_footer_columns>(
+ col - (VT_COL_MAX + vt->vi->vi_column_count - 1) - 1);
- case VT_COL_LOG_COMMENT: {
- auto line_meta_opt
- = vt->lss->find_bookmark_metadata(vc->log_cursor.lc_curr_line);
- if (!line_meta_opt || line_meta_opt.value()->bm_comment.empty()) {
- sqlite3_result_null(ctx);
- } else {
- const auto& meta = *(line_meta_opt.value());
- sqlite3_result_text(ctx,
- meta.bm_comment.c_str(),
- meta.bm_comment.length(),
- SQLITE_TRANSIENT);
- }
- break;
- }
+ switch (footer_column) {
+ case log_footer_columns::partition: {
+ auto& vb = vt->tc->get_bookmarks();
+ const auto& bv = vb[&textview_curses::BM_PARTITION];
- case VT_COL_LOG_TAGS: {
- auto line_meta_opt
- = vt->lss->find_bookmark_metadata(vc->log_cursor.lc_curr_line);
- if (!line_meta_opt || line_meta_opt.value()->bm_tags.empty()) {
- sqlite3_result_null(ctx);
- } else {
- const auto& meta = *(line_meta_opt.value());
+ if (bv.empty()) {
+ sqlite3_result_null(ctx);
+ } else {
+ vis_line_t curr_line(vc->log_cursor.lc_curr_line);
+ auto iter = lower_bound(
+ bv.begin(), bv.end(), curr_line + 1_vl);
+
+ if (iter != bv.begin()) {
+ --iter;
+ auto line_meta_opt
+ = vt->lss->find_bookmark_metadata(*iter);
+ if (line_meta_opt
+ && !line_meta_opt.value()->bm_name.empty())
+ {
+ sqlite3_result_text(
+ ctx,
+ line_meta_opt.value()->bm_name.c_str(),
+ line_meta_opt.value()->bm_name.size(),
+ SQLITE_TRANSIENT);
+ } else {
+ sqlite3_result_null(ctx);
+ }
+ } else {
+ sqlite3_result_null(ctx);
+ }
+ }
+ break;
+ }
+ case log_footer_columns::actual_time: {
+ char buffer[64];
+
+ if (ll->is_time_skewed()) {
+ if (vc->line_values.lvv_values.empty()) {
+ vc->cache_msg(lf, ll);
+ require(vc->line_values.lvv_sbr.get_data()
+ != nullptr);
+ vt->vi->extract(
+ lf, line_number, vc->line_values);
+ }
- yajlpp_gen gen;
+ struct line_range time_range;
- yajl_gen_config(gen, yajl_gen_beautify, false);
+ time_range = find_string_attr_range(
+ vt->vi->vi_attrs, &logline::L_TIMESTAMP);
- {
- yajlpp_array arr(gen);
+ const auto* time_src
+ = vc->line_values.lvv_sbr.get_data()
+ + time_range.lr_start;
+ struct timeval actual_tv;
+ struct exttm tm;
- for (const auto& str : meta.bm_tags) {
- arr.gen(str);
+ if (lf->get_format()->lf_date_time.scan(
+ time_src,
+ time_range.length(),
+ lf->get_format()->get_timestamp_formats(),
+ &tm,
+ actual_tv,
+ false))
+ {
+ sql_strftime(buffer, sizeof(buffer), actual_tv);
+ }
+ } else {
+ sql_strftime(buffer,
+ sizeof(buffer),
+ ll->get_time(),
+ ll->get_millis());
+ }
+ sqlite3_result_text(
+ ctx, buffer, strlen(buffer), SQLITE_TRANSIENT);
+ break;
}
- }
-
- to_sqlite(ctx, json_string(gen));
- }
- break;
- }
+ case log_footer_columns::idle_msecs: {
+ if (vc->log_cursor.lc_curr_line == 0) {
+ sqlite3_result_int64(ctx, 0);
+ } else {
+ content_line_t prev_cl(vt->lss->at(
+ vis_line_t(vc->log_cursor.lc_curr_line - 1)));
+ auto prev_lf = vt->lss->find(prev_cl);
+ auto prev_ll = prev_lf->begin() + prev_cl;
+ uint64_t prev_time, curr_line_time;
+
+ prev_time = prev_ll->get_time() * 1000ULL;
+ prev_time += prev_ll->get_millis();
+ curr_line_time = ll->get_time() * 1000ULL;
+ curr_line_time += ll->get_millis();
+ // require(curr_line_time >= prev_time);
+ sqlite3_result_int64(ctx,
+ curr_line_time - prev_time);
+ }
+ break;
+ }
+ case log_footer_columns::mark: {
+ sqlite3_result_int(ctx, ll->is_marked());
+ break;
+ }
+ case log_footer_columns::comment: {
+ auto line_meta_opt = vt->lss->find_bookmark_metadata(
+ vc->log_cursor.lc_curr_line);
+ if (!line_meta_opt
+ || line_meta_opt.value()->bm_comment.empty())
+ {
+ sqlite3_result_null(ctx);
+ } else {
+ const auto& meta = *(line_meta_opt.value());
+ sqlite3_result_text(ctx,
+ meta.bm_comment.c_str(),
+ meta.bm_comment.length(),
+ SQLITE_TRANSIENT);
+ }
+ break;
+ }
+ case log_footer_columns::tags: {
+ auto line_meta_opt = vt->lss->find_bookmark_metadata(
+ vc->log_cursor.lc_curr_line);
+ if (!line_meta_opt
+ || line_meta_opt.value()->bm_tags.empty())
+ {
+ sqlite3_result_null(ctx);
+ } else {
+ const auto& meta = *(line_meta_opt.value());
- case VT_COL_FILTERS: {
- const auto& filter_mask
- = (*ld)->ld_filter_state.lfo_filter_state.tfs_mask;
+ yajlpp_gen gen;
- if (!filter_mask[line_number]) {
- sqlite3_result_null(ctx);
- } else {
- const auto& filters = vt->lss->get_filters();
- yajlpp_gen gen;
+ yajl_gen_config(gen, yajl_gen_beautify, false);
- yajl_gen_config(gen, yajl_gen_beautify, false);
+ {
+ yajlpp_array arr(gen);
- {
- yajlpp_array arr(gen);
+ for (const auto& str : meta.bm_tags) {
+ arr.gen(str);
+ }
+ }
- for (const auto& filter : filters) {
- if (filter->lf_deleted) {
- continue;
+ to_sqlite(ctx, json_string(gen));
+ }
+ break;
+ }
+ case log_footer_columns::annotations: {
+ if (sqlite3_vtab_nochange(ctx)) {
+ return SQLITE_OK;
}
- uint32_t mask = (1UL << filter->get_index());
-
- if (filter_mask[line_number] & mask) {
- arr.gen(filter->get_index());
+ auto line_meta_opt = vt->lss->find_bookmark_metadata(
+ vc->log_cursor.lc_curr_line);
+ if (!line_meta_opt
+ || line_meta_opt.value()
+ ->bm_annotations.la_pairs.empty())
+ {
+ sqlite3_result_null(ctx);
+ } else {
+ const auto& meta = *(line_meta_opt.value());
+ to_sqlite(
+ ctx,
+ logmsg_annotations_handlers.to_json_string(
+ meta.bm_annotations));
}
+ break;
}
- }
+ case log_footer_columns::filters: {
+ const auto& filter_mask
+ = (*ld)->ld_filter_state.lfo_filter_state.tfs_mask;
- to_sqlite(ctx, gen.to_string_fragment());
- sqlite3_result_subtype(ctx, JSON_SUBTYPE);
- }
- break;
- }
+ if (!filter_mask[line_number]) {
+ sqlite3_result_null(ctx);
+ } else {
+ const auto& filters = vt->lss->get_filters();
+ yajlpp_gen gen;
- default:
- if (col > (VT_COL_MAX + vt->vi->vi_column_count - 1)) {
- auto footer_column = static_cast<log_footer_columns>(
- col - (VT_COL_MAX + vt->vi->vi_column_count - 1) - 1);
+ yajl_gen_config(gen, yajl_gen_beautify, false);
- switch (footer_column) {
+ {
+ yajlpp_array arr(gen);
+
+ for (const auto& filter : filters) {
+ if (filter->lf_deleted) {
+ continue;
+ }
+
+ uint32_t mask
+ = (1UL << filter->get_index());
+
+ if (filter_mask[line_number] & mask) {
+ arr.gen(filter->get_index());
+ }
+ }
+ }
+
+ to_sqlite(ctx, gen.to_string_fragment());
+ sqlite3_result_subtype(ctx, JSON_SUBTYPE);
+ }
+ break;
+ }
case log_footer_columns::opid: {
if (vc->line_values.lvv_values.empty()) {
vc->cache_msg(lf, ll);
@@ -820,16 +866,9 @@ vt_column(sqlite3_vtab_cursor* cur, sqlite3_context* ctx, int col)
vt->vi->extract(lf, line_number, vc->line_values);
}
- auto opid_opt = get_string_attr(vt->vi->vi_attrs,
- logline::L_OPID);
- if (opid_opt) {
- auto opid_range
- = opid_opt.value().saw_string_attr->sa_range;
-
- to_sqlite(
- ctx,
- vc->line_values.lvv_sbr.to_string_fragment(
- opid_range.lr_start, opid_range.length()));
+ if (vc->line_values.lvv_opid_value) {
+ to_sqlite(ctx,
+ vc->line_values.lvv_opid_value.value());
} else {
sqlite3_result_null(ctx);
}
@@ -859,15 +898,19 @@ vt_column(sqlite3_vtab_cursor* cur, sqlite3_context* ctx, int col)
case log_footer_columns::path: {
const auto& fn = lf->get_filename();
- sqlite3_result_text(
- ctx, fn.c_str(), fn.length(), SQLITE_STATIC);
+ sqlite3_result_text(ctx,
+ fn.c_str(),
+ fn.native().length(),
+ SQLITE_STATIC);
break;
}
case log_footer_columns::unique_path: {
const auto& fn = lf->get_unique_path();
- sqlite3_result_text(
- ctx, fn.c_str(), fn.length(), SQLITE_STATIC);
+ sqlite3_result_text(ctx,
+ fn.c_str(),
+ fn.native().length(),
+ SQLITE_STATIC);
break;
}
case log_footer_columns::text: {
@@ -958,7 +1001,8 @@ vt_column(sqlite3_vtab_cursor* cur, sqlite3_context* ctx, int col)
vt->vi->extract(lf, line_number, vc->line_values);
}
- int sub_col = col - VT_COL_MAX;
+ auto sub_col = logline_value_meta::table_column{
+ (size_t) (col - VT_COL_MAX)};
auto lv_iter = find_if(vc->line_values.lvv_values.begin(),
vc->line_values.lvv_values.end(),
logline_value_cmp(nullptr, sub_col));
@@ -1179,7 +1223,7 @@ log_cursor::update(unsigned char op, vis_line_t vl, constraint_t cons)
case SQLITE_INDEX_CONSTRAINT_LE:
if (vl < 0_vl) {
this->lc_curr_line = this->lc_end_line;
- } else {
+ } else if (vl < this->lc_end_line) {
this->lc_end_line
= vl + (cons == constraint_t::unique ? 1_vl : 0_vl);
}
@@ -1187,7 +1231,7 @@ log_cursor::update(unsigned char op, vis_line_t vl, constraint_t cons)
case SQLITE_INDEX_CONSTRAINT_LT:
if (vl <= 0_vl) {
this->lc_curr_line = this->lc_end_line;
- } else {
+ } else if (vl < this->lc_end_line) {
this->lc_end_line = vl;
}
break;
@@ -1250,19 +1294,19 @@ log_cursor::string_constraint::matches(const std::string& sf) const
}
}
-struct time_range {
- nonstd::optional<timeval> tr_begin;
- nonstd::optional<timeval> tr_end;
+struct vtab_time_range {
+ nonstd::optional<timeval> vtr_begin;
+ nonstd::optional<timeval> vtr_end;
- bool empty() const { return !this->tr_begin && !this->tr_end; }
+ bool empty() const { return !this->vtr_begin && !this->vtr_end; }
void add(const timeval& tv)
{
- if (!this->tr_begin || tv < this->tr_begin) {
- this->tr_begin = tv;
+ if (!this->vtr_begin || tv < this->vtr_begin) {
+ this->vtr_begin = tv;
}
- if (!this->tr_end || this->tr_end < tv) {
- this->tr_end = tv;
+ if (!this->vtr_end || this->vtr_end < tv) {
+ this->vtr_end = tv;
}
}
};
@@ -1310,7 +1354,7 @@ vt_filter(sqlite3_vtab_cursor* p_vtc,
p_cur->log_cursor.lc_curr_line = 0_vl;
p_cur->log_cursor.lc_end_line = vis_line_t(vt->lss->text_line_count());
- nonstd::optional<time_range> log_time_range;
+ nonstd::optional<vtab_time_range> log_time_range;
nonstd::optional<log_cursor::opid_hash> opid_val;
std::vector<log_cursor::string_constraint> log_path_constraints;
std::vector<log_cursor::string_constraint> log_unique_path_constraints;
@@ -1363,23 +1407,23 @@ vt_filter(sqlite3_vtab_cursor* p_vtc,
case SQLITE_INDEX_CONSTRAINT_EQ:
case SQLITE_INDEX_CONSTRAINT_IS:
if (!log_time_range) {
- log_time_range = time_range{};
+ log_time_range = vtab_time_range{};
}
log_time_range->add(tv);
break;
case SQLITE_INDEX_CONSTRAINT_GT:
case SQLITE_INDEX_CONSTRAINT_GE:
if (!log_time_range) {
- log_time_range = time_range{};
+ log_time_range = vtab_time_range{};
}
- log_time_range->tr_begin = tv;
+ log_time_range->vtr_begin = tv;
break;
case SQLITE_INDEX_CONSTRAINT_LT:
case SQLITE_INDEX_CONSTRAINT_LE:
if (!log_time_range) {
- log_time_range = time_range{};
+ log_time_range = vtab_time_range{};
}
- log_time_range->tr_end = tv;
+ log_time_range->vtr_end = tv;
break;
}
}
@@ -1407,23 +1451,23 @@ vt_filter(sqlite3_vtab_cursor* p_vtc,
case SQLITE_INDEX_CONSTRAINT_EQ:
case SQLITE_INDEX_CONSTRAINT_IS:
if (!log_time_range) {
- log_time_range = time_range{};
+ log_time_range = vtab_time_range{};
}
log_time_range->add(tv);
break;
case SQLITE_INDEX_CONSTRAINT_GT:
case SQLITE_INDEX_CONSTRAINT_GE:
if (!log_time_range) {
- log_time_range = time_range{};
+ log_time_range = vtab_time_range{};
}
- log_time_range->tr_begin = tv;
+ log_time_range->vtr_begin = tv;
break;
case SQLITE_INDEX_CONSTRAINT_LT:
case SQLITE_INDEX_CONSTRAINT_LE:
if (!log_time_range) {
- log_time_range = time_range{};
+ log_time_range = vtab_time_range{};
}
- log_time_range->tr_end = tv;
+ log_time_range->vtr_end = tv;
break;
}
break;
@@ -1455,21 +1499,24 @@ vt_filter(sqlite3_vtab_cursor* p_vtc,
auto opid = from_sqlite<string_fragment>()(
argc, argv, lpc);
if (!log_time_range) {
- log_time_range = time_range{};
+ log_time_range = vtab_time_range{};
}
for (const auto& file_data : *vt->lss) {
if (file_data->get_file_ptr() == nullptr) {
continue;
}
- safe::ReadAccess<logfile::safe_opid_map>
+ safe::ReadAccess<logfile::safe_opid_state>
r_opid_map(
file_data->get_file_ptr()->get_opids());
- const auto& iter = r_opid_map->find(opid);
- if (iter == r_opid_map->end()) {
+ const auto& iter
+ = r_opid_map->los_opid_ranges.find(opid);
+ if (iter == r_opid_map->los_opid_ranges.end()) {
continue;
}
- log_time_range->add(iter->second.otr_begin);
- log_time_range->add(iter->second.otr_end);
+ log_time_range->add(
+ iter->second.otr_range.tr_begin);
+ log_time_range->add(
+ iter->second.otr_range.tr_end);
}
opid_val = log_cursor::opid_hash{
@@ -1489,7 +1536,7 @@ vt_filter(sqlite3_vtab_cursor* p_vtc,
auto found = false;
if (!log_time_range) {
- log_time_range = time_range{};
+ log_time_range = vtab_time_range{};
}
for (const auto& file_data : *vt->lss) {
auto* lf = file_data->get_file_ptr();
@@ -1522,7 +1569,7 @@ vt_filter(sqlite3_vtab_cursor* p_vtc,
auto found = false;
if (!log_time_range) {
- log_time_range = time_range{};
+ log_time_range = vtab_time_range{};
}
for (const auto& file_data : *vt->lss) {
auto* lf = file_data->get_file_ptr();
@@ -1545,6 +1592,14 @@ vt_filter(sqlite3_vtab_cursor* p_vtc,
}
break;
}
+ case log_footer_columns::partition:
+ case log_footer_columns::actual_time:
+ case log_footer_columns::idle_msecs:
+ case log_footer_columns::mark:
+ case log_footer_columns::comment:
+ case log_footer_columns::tags:
+ case log_footer_columns::annotations:
+ case log_footer_columns::filters:
case log_footer_columns::text:
case log_footer_columns::body:
case log_footer_columns::raw_text:
@@ -1654,25 +1709,25 @@ vt_filter(sqlite3_vtab_cursor* p_vtc,
} else if (log_time_range->empty()) {
p_cur->log_cursor.lc_curr_line = p_cur->log_cursor.lc_end_line;
} else {
- if (log_time_range->tr_begin) {
+ if (log_time_range->vtr_begin) {
auto vl_opt
- = vt->lss->row_for_time(log_time_range->tr_begin.value());
+ = vt->lss->row_for_time(log_time_range->vtr_begin.value());
if (!vl_opt) {
p_cur->log_cursor.lc_curr_line = p_cur->log_cursor.lc_end_line;
} else {
p_cur->log_cursor.lc_curr_line = vl_opt.value();
}
}
- if (log_time_range->tr_end) {
+ if (log_time_range->vtr_end) {
auto vl_max_opt
- = vt->lss->row_for_time(log_time_range->tr_end.value());
+ = vt->lss->row_for_time(log_time_range->vtr_end.value());
if (vl_max_opt) {
p_cur->log_cursor.lc_end_line = vl_max_opt.value();
for (const auto& msg_info :
vt->lss->window_at(vl_max_opt.value(),
vis_line_t(vt->lss->text_line_count())))
{
- if (log_time_range->tr_end.value()
+ if (log_time_range->vtr_end.value()
< msg_info.get_logline().get_timeval())
{
break;
@@ -1829,6 +1884,14 @@ vt_best_index(sqlite3_vtab* tab, sqlite3_index_info* p_info)
sql_constraint_op_name(op)));
break;
}
+ case log_footer_columns::partition:
+ case log_footer_columns::actual_time:
+ case log_footer_columns::idle_msecs:
+ case log_footer_columns::mark:
+ case log_footer_columns::comment:
+ case log_footer_columns::tags:
+ case log_footer_columns::annotations:
+ case log_footer_columns::filters:
case log_footer_columns::text:
case log_footer_columns::body:
case log_footer_columns::raw_text:
@@ -1911,13 +1974,18 @@ vt_update(sqlite3_vtab* tab,
&& sqlite3_value_int64(argv[0]) == sqlite3_value_int64(argv[1]))
{
int64_t rowid = sqlite3_value_int64(argv[0]) >> 8;
- int val = sqlite3_value_int(argv[2 + VT_COL_MARK]);
+ int val = sqlite3_value_int(
+ argv[2 + vt->footer_index(log_footer_columns::mark)]);
vis_line_t vrowid(rowid);
- const auto* part_name = sqlite3_value_text(argv[2 + VT_COL_PARTITION]);
- const auto* log_comment
- = sqlite3_value_text(argv[2 + VT_COL_LOG_COMMENT]);
- const auto* log_tags = sqlite3_value_text(argv[2 + VT_COL_LOG_TAGS]);
+ const auto* part_name = sqlite3_value_text(
+ argv[2 + vt->footer_index(log_footer_columns::partition)]);
+ const auto* log_comment = sqlite3_value_text(
+ argv[2 + vt->footer_index(log_footer_columns::comment)]);
+ const auto log_tags = from_sqlite<nonstd::optional<string_fragment>>()(
+ argc, argv, 2 + vt->footer_index(log_footer_columns::tags));
+ const auto log_annos = from_sqlite<nonstd::optional<string_fragment>>()(
+ argc, argv, 2 + vt->footer_index(log_footer_columns::annotations));
bookmark_metadata tmp_bm;
if (log_tags) {
@@ -1936,7 +2004,7 @@ vt_update(sqlite3_vtab* tab,
errors.emplace_back(msg);
})
.with_obj(tmp_bm);
- ypc.parse_doc(string_fragment{log_tags});
+ ypc.parse_doc(log_tags.value());
if (!errors.empty()) {
auto top_error = lnav::console::user_message::error(
attr_line_t("invalid value for ")
@@ -1945,30 +2013,53 @@ vt_update(sqlite3_vtab* tab,
.append_quoted(lnav::roles::symbol(
vt->vi->get_name().to_string())))
.with_reason(errors[0].to_attr_line({}));
- auto json_error = lnav::to_json(top_error);
- tab->zErrMsg
- = sqlite3_mprintf("lnav-error:%s", json_error.c_str());
+ set_vtable_errmsg(tab, top_error);
+ return SQLITE_ERROR;
+ }
+ }
+ if (log_annos) {
+ static const intern_string_t SRC
+ = intern_string::lookup("log_annotations");
+
+ auto parse_res = logmsg_annotations_handlers.parser_for(SRC).of(
+ log_annos.value());
+ if (parse_res.isErr()) {
+ set_vtable_errmsg(tab, parse_res.unwrapErr()[0]);
return SQLITE_ERROR;
}
+
+ tmp_bm.bm_annotations = parse_res.unwrap();
}
- auto& bv = vt->tc->get_bookmarks()[&textview_curses::BM_META];
- bool has_meta = part_name != nullptr || log_comment != nullptr
- || log_tags != nullptr;
+ auto& bv_meta = vt->tc->get_bookmarks()[&textview_curses::BM_META];
+ bool has_meta = log_comment != nullptr || log_tags.has_value()
+ || log_annos.has_value();
- if (binary_search(bv.begin(), bv.end(), vrowid) && !has_meta) {
+ if (std::binary_search(bv_meta.begin(), bv_meta.end(), vrowid)
+ && !has_meta)
+ {
vt->tc->set_user_mark(&textview_curses::BM_META, vrowid, false);
- vt->lss->erase_bookmark_metadata(vrowid);
vt->lss->set_line_meta_changed();
}
+ if (!has_meta && part_name == nullptr) {
+ vt->lss->erase_bookmark_metadata(vrowid);
+ }
+
+ if (part_name) {
+ auto& line_meta = vt->lss->get_bookmark_metadata(vrowid);
+ line_meta.bm_name = std::string((const char*) part_name);
+ vt->tc->set_user_mark(&textview_curses::BM_PARTITION, vrowid, true);
+ } else {
+ vt->tc->set_user_mark(
+ &textview_curses::BM_PARTITION, vrowid, false);
+ }
+
if (has_meta) {
auto& line_meta = vt->lss->get_bookmark_metadata(vrowid);
vt->tc->set_user_mark(&textview_curses::BM_META, vrowid, true);
- if (part_name) {
- line_meta.bm_name = std::string((const char*) part_name);
- } else {
+ if (part_name == nullptr) {
line_meta.bm_name.clear();
}
if (log_comment) {
@@ -1988,6 +2079,15 @@ vt_update(sqlite3_vtab* tab,
} else {
line_meta.bm_tags.clear();
}
+ if (log_annos) {
+ line_meta.bm_annotations = std::move(tmp_bm.bm_annotations);
+ } else if (!sqlite3_value_nochange(
+ argv[2
+ + vt->footer_index(
+ log_footer_columns::annotations)]))
+ {
+ line_meta.bm_annotations.la_pairs.clear();
+ }
vt->lss->set_line_meta_changed();
}
diff --git a/src/log_vtab_impl.hh b/src/log_vtab_impl.hh
index 8ac03eb..bbd5b4c 100644
--- a/src/log_vtab_impl.hh
+++ b/src/log_vtab_impl.hh
@@ -44,15 +44,8 @@ class textview_curses;
enum {
VT_COL_LINE_NUMBER,
- VT_COL_PARTITION,
VT_COL_LOG_TIME,
- VT_COL_LOG_ACTUAL_TIME,
- VT_COL_IDLE_MSECS,
VT_COL_LEVEL,
- VT_COL_MARK,
- VT_COL_LOG_COMMENT,
- VT_COL_LOG_TAGS,
- VT_COL_FILTERS,
VT_COL_MAX
};
diff --git a/src/logfile.cc b/src/logfile.cc
index 32aa196..0384535 100644
--- a/src/logfile.cc
+++ b/src/logfile.cc
@@ -35,7 +35,6 @@
#include <errno.h>
#include <fcntl.h>
-#include <stdio.h>
#include <string.h>
#include <sys/param.h>
#include <sys/resource.h>
@@ -43,49 +42,55 @@
#include <time.h>
#include "base/ansi_scrubber.hh"
+#include "base/date_time_scanner.cfg.hh"
#include "base/fs_util.hh"
#include "base/injector.hh"
#include "base/string_util.hh"
#include "config.h"
+#include "file_options.hh"
+#include "hasher.hh"
#include "lnav_util.hh"
#include "log.watch.hh"
#include "log_format.hh"
#include "logfile.cfg.hh"
+#include "piper.looper.hh"
#include "yajlpp/yajlpp_def.hh"
static auto intern_lifetime = intern_string::get_table_lifetime();
static const size_t INDEX_RESERVE_INCREMENT = 1024;
-static const typed_json_path_container<line_buffer::header_data>
- file_header_handlers = {
- yajlpp::property_handler("name").for_field(
- &line_buffer::header_data::hd_name),
+static const typed_json_path_container<lnav::gzip::header> file_header_handlers
+ = {
+ yajlpp::property_handler("name").for_field(&lnav::gzip::header::h_name),
yajlpp::property_handler("mtime").for_field(
- &line_buffer::header_data::hd_mtime),
+ &lnav::gzip::header::h_mtime),
yajlpp::property_handler("comment").for_field(
- &line_buffer::header_data::hd_comment),
+ &lnav::gzip::header::h_comment),
};
Result<std::shared_ptr<logfile>, std::string>
-logfile::open(std::string filename, logfile_open_options& loo)
+logfile::open(ghc::filesystem::path filename,
+ const logfile_open_options& loo,
+ auto_fd fd)
{
require(!filename.empty());
auto lf = std::shared_ptr<logfile>(new logfile(std::move(filename), loo));
memset(&lf->lf_stat, 0, sizeof(lf->lf_stat));
- if (lf->lf_options.loo_fd == -1) {
- char resolved_path[PATH_MAX];
+ ghc::filesystem::path resolved_path;
- errno = 0;
- if (realpath(lf->lf_filename.c_str(), resolved_path) == nullptr) {
+ if (!fd.has_value()) {
+ auto rp_res = lnav::filesystem::realpath(lf->lf_filename);
+ if (rp_res.isErr()) {
return Err(fmt::format(FMT_STRING("realpath({}) failed with: {}"),
lf->lf_filename,
- strerror(errno)));
+ rp_res.unwrapErr()));
}
- if (stat(resolved_path, &lf->lf_stat) == -1) {
+ resolved_path = rp_res.unwrap();
+ if (lnav::filesystem::statp(resolved_path, &lf->lf_stat) == -1) {
return Err(fmt::format(FMT_STRING("stat({}) failed with: {}"),
lf->lf_filename,
strerror(errno)));
@@ -93,31 +98,35 @@ logfile::open(std::string filename, logfile_open_options& loo)
if (!S_ISREG(lf->lf_stat.st_mode)) {
return Err(fmt::format(FMT_STRING("{} is not a regular file"),
- lf->lf_filename,
- strerror(errno)));
- }
-
- if ((lf->lf_options.loo_fd = ::open(resolved_path, O_RDONLY)) == -1) {
- return Err(fmt::format(FMT_STRING("open({}) failed with: {}"),
- lf->lf_filename,
- strerror(errno)));
+ lf->lf_filename));
}
+ }
- lf->lf_options.loo_fd.close_on_exec();
-
- log_info("Creating logfile: fd=%d; size=%" PRId64 "; mtime=%" PRId64
- "; filename=%s",
- (int) lf->lf_options.loo_fd,
- (long long) lf->lf_stat.st_size,
- (long long) lf->lf_stat.st_mtime,
- lf->lf_filename.c_str());
-
+ auto_fd lf_fd;
+ if (fd.has_value()) {
+ lf_fd = std::move(fd);
+ } else if ((lf_fd
+ = lnav::filesystem::openp(resolved_path, O_RDONLY | O_CLOEXEC))
+ == -1)
+ {
+ return Err(fmt::format(FMT_STRING("open({}) failed with: {}"),
+ lf->lf_filename,
+ strerror(errno)));
+ } else {
lf->lf_actual_path = lf->lf_filename;
lf->lf_valid_filename = true;
- } else {
- log_perror(fstat(lf->lf_options.loo_fd, &lf->lf_stat));
- lf->lf_named_file = false;
- lf->lf_valid_filename = false;
+ }
+
+ lf_fd.close_on_exec();
+
+ log_info("Creating logfile: fd=%d; size=%" PRId64 "; mtime=%" PRId64
+ "; filename=%s",
+ (int) lf_fd,
+ (long long) lf->lf_stat.st_size,
+ (long long) lf->lf_stat.st_mtime,
+ lf->lf_filename.c_str());
+ if (lf->lf_actual_path) {
+ log_info(" actual_path=%s", lf->lf_actual_path->c_str());
}
if (!lf->lf_options.loo_filename.empty()) {
@@ -126,29 +135,101 @@ logfile::open(std::string filename, logfile_open_options& loo)
}
lf->lf_content_id = hasher().update(lf->lf_filename).to_string();
- lf->lf_line_buffer.set_fd(lf->lf_options.loo_fd);
+ lf->lf_line_buffer.set_fd(lf_fd);
lf->lf_index.reserve(INDEX_RESERVE_INCREMENT);
lf->lf_indexing = lf->lf_options.loo_is_visible;
+ lf->lf_text_format
+ = lf->lf_options.loo_text_format.value_or(text_format_t::TF_UNKNOWN);
const auto& hdr = lf->lf_line_buffer.get_header_data();
- if (!hdr.empty()) {
- lf->lf_embedded_metadata["net.zlib.gzip.header"]
- = {text_format_t::TF_JSON, file_header_handlers.to_string(hdr)};
+ if (hdr.valid()) {
+ log_info("%s: has header %d", lf->lf_filename.c_str(), hdr.valid());
+ hdr.match(
+ [&lf](const lnav::gzip::header& gzhdr) {
+ if (!gzhdr.empty()) {
+ lf->lf_embedded_metadata["net.zlib.gzip.header"] = {
+ text_format_t::TF_JSON,
+ file_header_handlers.to_string(gzhdr),
+ };
+ }
+ },
+ [&lf](const lnav::piper::header& phdr) {
+ lf->lf_embedded_metadata["org.lnav.piper.header"] = {
+ text_format_t::TF_JSON,
+ lnav::piper::header_handlers.to_string(phdr),
+ };
+ log_debug("setting file name: %s", phdr.h_name.c_str());
+ lf->set_filename(phdr.h_name);
+ lf->lf_valid_filename = false;
+ });
}
+ lf->file_options_have_changed();
+
ensure(lf->invariant());
return Ok(lf);
}
-logfile::logfile(std::string filename, logfile_open_options& loo)
- : lf_filename(std::move(filename)), lf_options(std::move(loo))
+logfile::logfile(ghc::filesystem::path filename,
+ const logfile_open_options& loo)
+ : lf_filename(std::move(filename)), lf_options(loo)
{
- this->lf_opids.writeAccess()->reserve(64);
+ this->lf_opids.writeAccess()->los_opid_ranges.reserve(64);
}
-logfile::~logfile() {}
+logfile::~logfile()
+{
+ log_info("destructing logfile: %s", this->lf_filename.c_str());
+}
+
+bool
+logfile::file_options_have_changed()
+{
+ static auto& safe_options_hier
+ = injector::get<lnav::safe_file_options_hier&>();
+
+ bool tz_changed = false;
+
+ {
+ safe::ReadAccess<lnav::safe_file_options_hier> options_hier(
+ safe_options_hier);
+
+ if (this->lf_file_options_generation == options_hier->foh_generation) {
+ return false;
+ }
+ auto new_options = options_hier->match(this->get_filename());
+ if (this->lf_file_options == new_options) {
+ this->lf_file_options_generation = options_hier->foh_generation;
+ return false;
+ }
+
+ this->lf_file_options = new_options;
+ log_info("%s: file options have changed", this->lf_filename.c_str());
+ if (this->lf_file_options) {
+ log_info(
+ " tz=%s",
+ this->lf_file_options->second.fo_default_zone.pp_value->name()
+ .c_str());
+ if (this->lf_file_options->second.fo_default_zone.pp_value
+ != nullptr
+ && this->lf_format != nullptr
+ && !(this->lf_format->lf_timestamp_flags & ETF_ZONE_SET))
+ {
+ tz_changed = true;
+ }
+ } else if (this->lf_format != nullptr
+ && !(this->lf_format->lf_timestamp_flags & ETF_ZONE_SET)
+ && this->lf_format->lf_date_time.dts_default_zone != nullptr)
+ {
+ tz_changed = true;
+ }
+ this->lf_file_options_generation = options_hier->foh_generation;
+ }
+
+ return tz_changed;
+}
bool
logfile::exists() const
@@ -238,6 +319,7 @@ logfile::process_prefix(shared_buffer_ref& sbr,
this->lf_index.size(),
li.li_file_range.fr_offset,
li.li_file_range.fr_size);
+ auto starting_index_size = this->lf_index.size();
size_t prev_index_size = this->lf_index.size();
for (const auto& curr : root_formats) {
if (this->lf_index.size()
@@ -260,7 +342,10 @@ logfile::process_prefix(shared_buffer_ref& sbr,
this->lf_mismatched_formats.insert(curr->get_name());
continue;
}
- if (!curr->match_mime_type(this->lf_options.loo_file_format)) {
+ if (this->lf_options.loo_format_name
+ && !(curr->get_name()
+ == this->lf_options.loo_format_name.value()))
+ {
if (li.li_file_range.fr_offset == 0) {
log_debug("(%s) does not match file format: %s",
curr->get_name().get(),
@@ -355,19 +440,46 @@ logfile::process_prefix(shared_buffer_ref& sbr,
this->lf_applicable_taggers.emplace_back(td_pair.second);
}
+ for (auto& pd_pair : this->lf_format->lf_partition_defs) {
+ bool matches = pd_pair.second->fpd_paths.empty();
+ for (const auto& pr : pd_pair.second->fpd_paths) {
+ if (pr.matches(this->lf_filename.c_str())) {
+ matches = true;
+ break;
+ }
+ }
+ if (!matches) {
+ continue;
+ }
+
+ log_info(
+ "%s: found applicable partition definition "
+ "/%s/partitions/%s",
+ this->lf_filename.c_str(),
+ this->lf_format->get_name().get(),
+ pd_pair.second->fpd_name.c_str());
+ this->lf_applicable_partitioners.emplace_back(pd_pair.second);
+ }
+
/*
* We'll go ahead and assume that any previous lines were
* written out at the same time as the last one, so we need to
* go back and update everything.
*/
- auto& last_line = this->lf_index[this->lf_index.size() - 1];
+ const auto& last_line = this->lf_index.back();
- for (size_t lpc = 0; lpc < this->lf_index.size() - 1; lpc++) {
+ require_lt(starting_index_size, this->lf_index.size());
+ for (size_t lpc = 0; lpc < starting_index_size; lpc++) {
if (this->lf_format->lf_multiline) {
this->lf_index[lpc].set_time(last_line.get_time());
this->lf_index[lpc].set_millis(last_line.get_millis());
+ if (this->lf_format->lf_structured) {
+ this->lf_index[lpc].set_ignore(true);
+ }
} else {
- this->lf_index[lpc].set_ignore(true);
+ this->lf_index[lpc].set_time(last_line.get_time());
+ this->lf_index[lpc].set_millis(last_line.get_millis());
+ this->lf_index[lpc].set_level(LEVEL_INVALID);
}
}
@@ -416,8 +528,15 @@ logfile::process_prefix(shared_buffer_ref& sbr,
short last_millis = 0;
uint8_t last_mod = 0, last_opid = 0;
- if (!this->lf_index.empty()) {
- logline& ll = this->lf_index.back();
+ if (this->lf_format == nullptr && li.li_timestamp.tv_sec != 0) {
+ last_time = li.li_timestamp.tv_sec;
+ last_millis
+ = std::chrono::duration_cast<std::chrono::milliseconds>(
+ std::chrono::microseconds(li.li_timestamp.tv_usec))
+ .count();
+ last_level = li.li_level;
+ } else if (!this->lf_index.empty()) {
+ const auto& ll = this->lf_index.back();
/*
* Assume this line is part of the previous one(s) and copy the
@@ -448,6 +567,9 @@ logfile::process_prefix(shared_buffer_ref& sbr,
logfile::rebuild_result_t
logfile::rebuild_index(nonstd::optional<ui_clock::time_point> deadline)
{
+ static const auto& dts_cfg
+ = injector::get<const date_time_scanner_ns::config&>();
+
if (!this->lf_indexing) {
if (this->lf_sort_needed) {
this->lf_sort_needed = false;
@@ -456,7 +578,11 @@ logfile::rebuild_index(nonstd::optional<ui_clock::time_point> deadline)
return rebuild_result_t::NO_NEW_LINES;
}
- if (this->lf_format != nullptr && this->lf_format->format_changed()) {
+ if (this->file_options_have_changed()
+ || (this->lf_format != nullptr
+ && (this->lf_zoned_to_local_state != dts_cfg.c_zoned_to_local
+ || this->lf_format->format_changed())))
+ {
log_info("%s: format has changed, rebuilding",
this->lf_filename.c_str());
this->lf_index.clear();
@@ -464,7 +590,16 @@ logfile::rebuild_index(nonstd::optional<ui_clock::time_point> deadline)
this->lf_partial_line = false;
this->lf_longest_line = 0;
this->lf_sort_needed = true;
+ {
+ safe::WriteAccess<logfile::safe_opid_state> writable_opid_map(
+ this->lf_opids);
+
+ writable_opid_map->los_opid_ranges.clear();
+ writable_opid_map->los_sub_in_use.clear();
+ }
+ this->lf_allocator.reset();
}
+ this->lf_zoned_to_local_state = dts_cfg.c_zoned_to_local;
auto retval = rebuild_result_t::NO_NEW_LINES;
struct stat st;
@@ -497,6 +632,11 @@ logfile::rebuild_index(nonstd::optional<ui_clock::time_point> deadline)
this->lf_stat.st_mtime);
this->close();
return rebuild_result_t::NO_NEW_LINES;
+ }
+
+ if (this->lf_text_format == text_format_t::TF_BINARY) {
+ this->lf_index_size = st.st_size;
+ this->lf_stat = st;
} else if (this->lf_line_buffer.is_data_available(this->lf_index_size,
st.st_size))
{
@@ -589,7 +729,7 @@ logfile::rebuild_index(nonstd::optional<ui_clock::time_point> deadline)
"loading file... %s:%d", this->lf_filename.c_str(), begin_size);
}
scan_batch_context sbc{this->lf_allocator};
- sbc.sbc_opids.reserve(32);
+ sbc.sbc_opids.los_opid_ranges.reserve(32);
auto prev_range = file_range{off};
while (limit > 0) {
auto load_result = this->lf_line_buffer.load_next_line(prev_range);
@@ -646,19 +786,38 @@ logfile::rebuild_index(nonstd::optional<ui_clock::time_point> deadline)
if (old_size == 0
&& this->lf_text_format == text_format_t::TF_UNKNOWN)
{
- file_range fr = this->lf_line_buffer.get_available();
+ auto fr = this->lf_line_buffer.get_available();
auto avail_data = this->lf_line_buffer.read_range(fr);
this->lf_text_format
= avail_data
- .map([path = this->get_path()](
- const shared_buffer_ref& avail_sbr)
+ .map([path = this->get_path(),
+ this](const shared_buffer_ref& avail_sbr)
-> text_format_t {
- return detect_text_format(
- avail_sbr.to_string_fragment(), path);
+ auto sbr_str = to_string(avail_sbr);
+
+ if (this->lf_line_buffer.is_piper()) {
+ auto lines
+ = string_fragment::from_str(sbr_str)
+ .split_lines();
+ for (auto line_iter = lines.rbegin();
+ // XXX rejigger read_range() for
+ // multi-line reads
+ std::next(line_iter) != lines.rend();
+ ++line_iter)
+ {
+ sbr_str.erase(line_iter->sf_begin, 22);
+ }
+ }
+ if (is_utf8(sbr_str).is_valid()) {
+ auto new_size = erase_ansi_escapes(sbr_str);
+ sbr_str.resize(new_size);
+ }
+ return detect_text_format(sbr_str, path);
})
.unwrapOr(text_format_t::TF_UNKNOWN);
- log_debug("setting text format to %d", this->lf_text_format);
+ log_debug("setting text format to %s",
+ fmt::to_string(this->lf_text_format).c_str());
}
if (!li.li_utf8_scan_result.is_valid()
&& this->lf_text_format != text_format_t::TF_MARKDOWN
@@ -687,7 +846,8 @@ logfile::rebuild_index(nonstd::optional<ui_clock::time_point> deadline)
}
this->lf_longest_line
- = std::max(this->lf_longest_line, sbr.length());
+ = std::max(this->lf_longest_line,
+ li.li_utf8_scan_result.usr_column_width_guess);
this->lf_partial_line = li.li_partial;
sort_needed = this->process_prefix(sbr, li, sbc) || sort_needed;
@@ -732,33 +892,60 @@ logfile::rebuild_index(nonstd::optional<ui_clock::time_point> deadline)
}
#endif
if (this->lf_format) {
- if (!this->lf_applicable_taggers.empty()) {
- auto sf = sbr.to_string_fragment();
+ auto sf = sbr.to_string_fragment();
- for (const auto& td : this->lf_applicable_taggers) {
- auto curr_ll = this->end() - 1;
+ for (const auto& td : this->lf_applicable_taggers) {
+ auto curr_ll = this->end() - 1;
+
+ if (td->ftd_level != LEVEL_UNKNOWN
+ && td->ftd_level != curr_ll->get_msg_level())
+ {
+ continue;
+ }
- if (td->ftd_level != LEVEL_UNKNOWN
- && td->ftd_level != curr_ll->get_msg_level())
- {
- continue;
+ if (td->ftd_pattern.pp_value
+ ->find_in(sf, PCRE2_NO_UTF_CHECK)
+ .ignore_error()
+ .has_value())
+ {
+ while (curr_ll->is_continued()) {
+ --curr_ll;
}
+ curr_ll->set_meta_mark(true);
+ auto line_number = static_cast<uint32_t>(
+ std::distance(this->begin(), curr_ll));
+
+ this->lf_bookmark_metadata[line_number].add_tag(
+ td->ftd_name);
+ }
+ }
+
+ for (const auto& pd : this->lf_applicable_partitioners) {
+ static thread_local auto part_md
+ = lnav::pcre2pp::match_data::unitialized();
+
+ auto curr_ll = this->end() - 1;
- if (td->ftd_pattern.pp_value
- ->find_in(sf, PCRE2_NO_UTF_CHECK)
- .ignore_error()
- .has_value())
- {
- curr_ll->set_mark(true);
- while (curr_ll->is_continued()) {
- --curr_ll;
- }
- auto line_number = static_cast<uint32_t>(
- std::distance(this->begin(), curr_ll));
-
- this->lf_bookmark_metadata[line_number].add_tag(
- td->ftd_name);
+ if (pd->fpd_level != LEVEL_UNKNOWN
+ && pd->fpd_level != curr_ll->get_msg_level())
+ {
+ continue;
+ }
+
+ auto match_res = pd->fpd_pattern.pp_value->capture_from(sf)
+ .into(part_md)
+ .matches(PCRE2_NO_UTF_CHECK)
+ .ignore_error();
+ if (match_res) {
+ while (curr_ll->is_continued()) {
+ --curr_ll;
}
+ curr_ll->set_meta_mark(true);
+ auto line_number = static_cast<uint32_t>(
+ std::distance(this->begin(), curr_ll));
+
+ this->lf_bookmark_metadata[line_number].bm_name
+ = part_md.to_string();
}
}
@@ -824,26 +1011,25 @@ logfile::rebuild_index(nonstd::optional<ui_clock::time_point> deadline)
this->lf_stat = st;
{
- safe::WriteAccess<logfile::safe_opid_map> writable_opid_map(
+ safe::WriteAccess<logfile::safe_opid_state> writable_opid_map(
this->lf_opids);
- for (const auto& opid_pair : sbc.sbc_opids) {
- auto opid_iter = writable_opid_map->find(opid_pair.first);
+ for (const auto& opid_pair : sbc.sbc_opids.los_opid_ranges) {
+ auto opid_iter
+ = writable_opid_map->los_opid_ranges.find(opid_pair.first);
- if (opid_iter == writable_opid_map->end()) {
- writable_opid_map->emplace(opid_pair);
+ if (opid_iter == writable_opid_map->los_opid_ranges.end()) {
+ writable_opid_map->los_opid_ranges.emplace(opid_pair);
} else {
- if (opid_pair.second.otr_begin
- < opid_iter->second.otr_begin)
- {
- opid_iter->second.otr_begin
- = opid_pair.second.otr_begin;
- }
- if (opid_iter->second.otr_end < opid_pair.second.otr_end) {
- opid_iter->second.otr_end = opid_pair.second.otr_end;
- }
+ opid_iter->second |= opid_pair.second;
}
}
+ log_debug(
+ "%s: opid_map size: count=%zu; sizeof(otr)=%zu; alloc=%zu",
+ this->lf_filename.c_str(),
+ writable_opid_map->los_opid_ranges.size(),
+ sizeof(opid_time_range),
+ this->lf_allocator.getNumBytesAllocated());
}
if (sort_needed) {
@@ -902,10 +1088,30 @@ logfile::read_file()
return Err(std::string("file is too large to read"));
}
- auto retval
- = TRY(this->lf_line_buffer.read_range({0, this->lf_stat.st_size}));
+ auto retval = std::string();
+ retval.reserve(this->lf_stat.st_size);
+
+ retval.append(this->lf_line_buffer.get_piper_header_size(), '\x16');
+ for (auto iter = this->begin(); iter != this->end(); ++iter) {
+ auto fr = this->get_file_range(iter);
+ auto sbr = TRY(this->lf_line_buffer.read_range(fr));
+
+ if (this->lf_line_buffer.is_piper()) {
+ retval.append(22, '\x16');
+ }
+ retval.append(sbr.get_data(), sbr.length());
+ if (retval.size() < this->lf_stat.st_size) {
+ retval.push_back('\n');
+ }
+ }
+
+ return Ok(std::move(retval));
+}
- return Ok(to_string(retval));
+Result<shared_buffer_ref, std::string>
+logfile::read_range(file_range fr)
+{
+ return this->lf_line_buffer.read_range(fr);
}
void
@@ -929,9 +1135,13 @@ logfile::read_full_message(logfile::const_iterator ll,
auto read_result = this->lf_line_buffer.read_range(range_for_line);
if (read_result.isErr()) {
- log_error("unable to read range %d:%d",
+ auto errmsg = read_result.unwrapErr();
+ log_error("%s:%d:unable to read range %d:%d -- %s",
+ this->get_unique_path().c_str(),
+ std::distance(this->cbegin(), ll),
range_for_line.fr_offset,
- range_for_line.fr_size);
+ range_for_line.fr_size,
+ errmsg.c_str());
return;
}
msg_out = read_result.unwrap();
@@ -1067,14 +1277,21 @@ logfile::find_from_time(const timeval& tv) const
return retval;
}
-void
+bool
logfile::mark_as_duplicate(const std::string& name)
{
+ safe::WriteAccess<safe_notes> notes(this->lf_notes);
+
+ auto iter = notes->find(note_type::duplicate);
+ if (iter != notes->end()) {
+ return false;
+ }
+
this->lf_indexing = false;
this->lf_options.loo_is_visible = false;
- this->lf_notes.writeAccess()->emplace(
- note_type::duplicate,
- fmt::format(FMT_STRING("hiding duplicate of {}"), name));
+ notes->emplace(note_type::duplicate,
+ fmt::format(FMT_STRING("hiding duplicate of {}"), name));
+ return true;
}
void
diff --git a/src/logfile.hh b/src/logfile.hh
index 8c711a0..e936e79 100644
--- a/src/logfile.hh
+++ b/src/logfile.hh
@@ -1,4 +1,3 @@
-
/**
* Copyright (c) 2007-2012, Timothy Stack
*
@@ -49,6 +48,7 @@
#include "base/result.h"
#include "bookmarks.hh"
#include "byte_array.hh"
+#include "file_options.hh"
#include "ghc/filesystem.hpp"
#include "line_buffer.hh"
#include "log_format_fwd.hh"
@@ -114,7 +114,9 @@ public:
* descriptor needs to be seekable.
*/
static Result<std::shared_ptr<logfile>, std::string> open(
- std::string filename, logfile_open_options& loo);
+ ghc::filesystem::path filename,
+ const logfile_open_options& loo,
+ auto_fd fd = auto_fd{});
~logfile() override;
@@ -126,7 +128,10 @@ public:
}
/** @return The filename as given in the constructor. */
- const std::string& get_filename() const { return this->lf_filename; }
+ const ghc::filesystem::path& get_filename() const
+ {
+ return this->lf_filename;
+ }
/** @return The filename as given in the constructor, excluding the path
* prefix. */
@@ -146,6 +151,11 @@ public:
bool is_compressed() const { return this->lf_line_buffer.is_compressed(); }
+ bool has_line_metadata() const
+ {
+ return this->lf_line_buffer.has_line_metadata();
+ }
+
bool is_valid_filename() const { return this->lf_valid_filename; }
file_off_t get_index_size() const { return this->lf_index_size; }
@@ -164,6 +174,8 @@ public:
text_format_t get_text_format() const { return this->lf_text_format; }
+ void set_text_format(text_format_t tf) { this->lf_text_format = tf; }
+
/**
* @return The last modified time of the file when the file was last
* indexed.
@@ -188,13 +200,18 @@ public:
this->adjust_content_time(-1, tv);
}
- void mark_as_duplicate(const std::string& name);
+ bool mark_as_duplicate(const std::string& name);
const logfile_open_options& get_open_options() const
{
return this->lf_options;
}
+ void set_include_in_session(bool enabled)
+ {
+ this->lf_options.with_include_in_session(enabled);
+ }
+
void reset_state();
bool is_time_adjusted() const
@@ -240,6 +257,8 @@ public:
Result<std::string, std::string> read_file();
+ Result<shared_buffer_ref, std::string> read_range(file_range fr);
+
iterator line_base(iterator ll)
{
auto retval = ll;
@@ -283,6 +302,11 @@ public:
};
}
+ file_off_t get_line_content_offset(const_iterator ll)
+ {
+ return ll->get_offset() + (this->lf_line_buffer.is_piper() ? 22 : 0);
+ }
+
void read_full_message(const_iterator ll,
shared_buffer_ref& msg_out,
int max_lines = 50);
@@ -337,6 +361,8 @@ public:
bool is_indexing() const { return this->lf_indexing; }
+ void set_indexing(bool val) { this->lf_indexing = val; }
+
/** Check the invariants for this object. */
bool invariant()
{
@@ -358,9 +384,9 @@ public:
note_map get_notes() const { return *this->lf_notes.readAccess(); }
- using safe_opid_map = safe::Safe<log_opid_map>;
+ using safe_opid_state = safe::Safe<log_opid_state>;
- safe_opid_map& get_opids() { return this->lf_opids; }
+ safe_opid_state& get_opids() { return this->lf_opids; }
void quiesce() { this->lf_line_buffer.quiesce(); }
@@ -384,6 +410,12 @@ public:
return this->lf_embedded_metadata;
}
+ nonstd::optional<std::pair<std::string, lnav::file_options>>
+ get_file_options() const
+ {
+ return this->lf_file_options;
+ }
+
protected:
/**
* Process a line from the file.
@@ -399,9 +431,11 @@ protected:
void set_format_base_time(log_format* lf);
private:
- logfile(std::string filename, logfile_open_options& loo);
+ logfile(ghc::filesystem::path filename, const logfile_open_options& loo);
+
+ bool file_options_have_changed();
- std::string lf_filename;
+ ghc::filesystem::path lf_filename;
logfile_open_options lf_options;
logfile_activity lf_activity;
bool lf_named_file{true};
@@ -423,13 +457,14 @@ private:
bool lf_is_closed{false};
bool lf_indexing{true};
bool lf_partial_line{false};
+ bool lf_zoned_to_local_state{true};
logline_observer* lf_logline_observer{nullptr};
logfile_observer* lf_logfile_observer{nullptr};
size_t lf_longest_line{0};
text_format_t lf_text_format{text_format_t::TF_UNKNOWN};
uint32_t lf_out_of_time_order_count{0};
safe_notes lf_notes;
- safe_opid_map lf_opids;
+ safe_opid_state lf_opids;
size_t lf_watch_count{0};
ArenaAlloc::Alloc<char> lf_allocator{64 * 1024};
nonstd::optional<time_t> lf_cached_base_time;
@@ -440,7 +475,12 @@ private:
robin_hood::unordered_map<uint32_t, bookmark_metadata> lf_bookmark_metadata;
std::vector<std::shared_ptr<format_tag_def>> lf_applicable_taggers;
+ std::vector<std::shared_ptr<format_partition_def>>
+ lf_applicable_partitioners;
std::map<std::string, metadata> lf_embedded_metadata;
+ size_t lf_file_options_generation{0};
+ nonstd::optional<std::pair<std::string, lnav::file_options>>
+ lf_file_options;
};
class logline_observer {
diff --git a/src/logfile_fwd.hh b/src/logfile_fwd.hh
index 4ea8fea..4d169f3 100644
--- a/src/logfile_fwd.hh
+++ b/src/logfile_fwd.hh
@@ -37,6 +37,9 @@
#include "base/auto_fd.hh"
#include "file_format.hh"
+#include "piper.looper.hh"
+#include "text_format.hh"
+#include "vis_line.hh"
using ui_clock = std::chrono::steady_clock;
@@ -52,10 +55,11 @@ enum class logfile_name_source {
REMOTE,
};
+using file_location_t = mapbox::util::variant<vis_line_t, std::string>;
+
struct logfile_open_options_base {
std::string loo_filename;
logfile_name_source loo_source{logfile_name_source::USER};
- bool loo_temp_file{false};
dev_t loo_temp_dev{0};
ino_t loo_temp_ino{0};
bool loo_detect_format{true};
@@ -65,6 +69,10 @@ struct logfile_open_options_base {
ssize_t loo_visible_size_limit{-1};
bool loo_tail{true};
file_format_t loo_file_format{file_format_t::UNKNOWN};
+ nonstd::optional<std::string> loo_format_name;
+ nonstd::optional<text_format_t> loo_text_format;
+ nonstd::optional<lnav::piper::running_handle> loo_piper;
+ file_location_t loo_init_location{mapbox::util::no_init{}};
};
struct logfile_open_options : public logfile_open_options_base {
@@ -82,14 +90,6 @@ struct logfile_open_options : public logfile_open_options_base {
return *this;
}
- logfile_open_options& with_fd(auto_fd fd)
- {
- this->loo_fd = std::move(fd);
- this->loo_temp_file = true;
-
- return *this;
- }
-
logfile_open_options& with_stat_for_temp(const struct stat& st)
{
this->loo_temp_dev = st.st_dev;
@@ -131,7 +131,7 @@ struct logfile_open_options : public logfile_open_options_base {
this->loo_non_utf_is_visible = val;
return *this;
- };
+ }
logfile_open_options& with_visible_size_limit(ssize_t val)
{
@@ -154,7 +154,27 @@ struct logfile_open_options : public logfile_open_options_base {
return *this;
}
- auto_fd loo_fd;
+ logfile_open_options& with_piper(lnav::piper::running_handle handle)
+ {
+ this->loo_piper = handle;
+ this->loo_filename = handle.get_name();
+
+ return *this;
+ }
+
+ logfile_open_options& with_init_location(file_location_t fl)
+ {
+ this->loo_init_location = fl;
+
+ return *this;
+ }
+
+ logfile_open_options& with_text_format(text_format_t tf)
+ {
+ this->loo_text_format = tf;
+
+ return *this;
+ }
};
#endif
diff --git a/src/logfile_sub_source.cc b/src/logfile_sub_source.cc
index aa356f9..b78b00c 100644
--- a/src/logfile_sub_source.cc
+++ b/src/logfile_sub_source.cc
@@ -35,23 +35,26 @@
#include <sqlite3.h>
#include "base/ansi_scrubber.hh"
-#include "base/humanize.time.hh"
-#include "base/injector.hh"
+#include "base/ansi_vars.hh"
+#include "base/fs_util.hh"
#include "base/itertools.hh"
#include "base/string_util.hh"
-#include "bound_tags.hh"
+#include "bookmarks.json.hh"
#include "command_executor.hh"
#include "config.h"
+#include "field_overlay_source.hh"
#include "k_merge_tree.h"
+#include "lnav_util.hh"
#include "log_accel.hh"
-#include "logfile_sub_source.cfg.hh"
#include "md2attr_line.hh"
-#include "readline_highlighters.hh"
-#include "relative_time.hh"
+#include "ptimec.hh"
+#include "shlex.hh"
#include "sql_util.hh"
#include "vtab_module.hh"
#include "yajlpp/yajlpp.hh"
+using namespace lnav::roles::literals;
+
const bookmark_type_t logfile_sub_source::BM_ERRORS("error");
const bookmark_type_t logfile_sub_source::BM_WARNINGS("warning");
const bookmark_type_t logfile_sub_source::BM_FILES("file");
@@ -63,7 +66,7 @@ pretty_sql_callback(exec_context& ec, sqlite3_stmt* stmt)
return 0;
}
- int ncols = sqlite3_column_count(stmt);
+ const auto ncols = sqlite3_column_count(stmt);
for (int lpc = 0; lpc < ncols; lpc++) {
if (!ec.ec_accumulator->empty()) {
@@ -78,6 +81,44 @@ pretty_sql_callback(exec_context& ec, sqlite3_stmt* stmt)
ec.ec_accumulator->append(res);
}
+ for (int lpc = 0; lpc < ncols; lpc++) {
+ const auto* colname = sqlite3_column_name(stmt, lpc);
+ auto* raw_value = sqlite3_column_value(stmt, lpc);
+ auto value_type = sqlite3_value_type(raw_value);
+ scoped_value_t value;
+
+ switch (value_type) {
+ case SQLITE_INTEGER:
+ value = (int64_t) sqlite3_value_int64(raw_value);
+ break;
+ case SQLITE_FLOAT:
+ value = sqlite3_value_double(raw_value);
+ break;
+ case SQLITE_NULL:
+ value = null_value_t{};
+ break;
+ default:
+ value = string_fragment::from_bytes(
+ sqlite3_value_text(raw_value),
+ sqlite3_value_bytes(raw_value));
+ break;
+ }
+ if (!ec.ec_local_vars.empty() && !ec.ec_dry_run) {
+ if (sql_ident_needs_quote(colname)) {
+ continue;
+ }
+ auto& vars = ec.ec_local_vars.top();
+
+ if (vars.find(colname) != vars.end()) {
+ continue;
+ }
+
+ if (value.is<string_fragment>()) {
+ value = value.get<string_fragment>().to_string();
+ }
+ vars[colname] = value;
+ }
+ }
return 0;
}
@@ -140,13 +181,46 @@ logfile_sub_source::find(const char* fn, content_line_t& line_base)
return retval;
}
+struct filtered_logline_cmp {
+ filtered_logline_cmp(const logfile_sub_source& lc) : llss_controller(lc) {}
+
+ bool operator()(const uint32_t& lhs, const uint32_t& rhs) const
+ {
+ content_line_t cl_lhs = (content_line_t) llss_controller.lss_index[lhs];
+ content_line_t cl_rhs = (content_line_t) llss_controller.lss_index[rhs];
+ logline* ll_lhs = this->llss_controller.find_line(cl_lhs);
+ logline* ll_rhs = this->llss_controller.find_line(cl_rhs);
+
+ if (ll_lhs == nullptr) {
+ return true;
+ }
+ if (ll_rhs == nullptr) {
+ return false;
+ }
+ return (*ll_lhs) < (*ll_rhs);
+ }
+
+ bool operator()(const uint32_t& lhs, const struct timeval& rhs) const
+ {
+ content_line_t cl_lhs = (content_line_t) llss_controller.lss_index[lhs];
+ logline* ll_lhs = this->llss_controller.find_line(cl_lhs);
+
+ if (ll_lhs == nullptr) {
+ return true;
+ }
+ return (*ll_lhs) < rhs;
+ }
+
+ const logfile_sub_source& llss_controller;
+};
+
nonstd::optional<vis_line_t>
logfile_sub_source::find_from_time(const struct timeval& start) const
{
- auto lb = lower_bound(this->lss_filtered_index.begin(),
- this->lss_filtered_index.end(),
- start,
- filtered_logline_cmp(*this));
+ auto lb = std::lower_bound(this->lss_filtered_index.begin(),
+ this->lss_filtered_index.end(),
+ start,
+ filtered_logline_cmp(*this));
if (lb != this->lss_filtered_index.end()) {
return vis_line_t(lb - this->lss_filtered_index.begin());
}
@@ -160,6 +234,11 @@ logfile_sub_source::text_value_for_line(textview_curses& tc,
std::string& value_out,
line_flags_t flags)
{
+ if (this->lss_indexing_in_progress) {
+ value_out = "";
+ return;
+ }
+
content_line_t line(0);
require_ge(row, 0);
@@ -224,10 +303,12 @@ logfile_sub_source::text_value_for_line(textview_curses& tc,
exec_context ec(
&this->lss_token_values, pretty_sql_callback, pretty_pipe_callback);
std::string rewritten_line;
+ db_label_source rewrite_label_source;
ec.with_perms(exec_context::perm_t::READ_ONLY);
ec.ec_local_vars.push(std::map<std::string, scoped_value_t>());
ec.ec_top_line = vis_line_t(row);
+ ec.ec_label_source_stack.push_back(&rewrite_label_source);
add_ansi_vars(ec.ec_global_vars);
add_global_vars(ec);
format->rewrite(ec, sbr, this->lss_token_attrs, rewritten_line);
@@ -235,10 +316,19 @@ logfile_sub_source::text_value_for_line(textview_curses& tc,
value_out = this->lss_token_value;
}
- if ((this->lss_token_file->is_time_adjusted()
- || format->lf_timestamp_flags & ETF_MACHINE_ORIENTED
- || !(format->lf_timestamp_flags & ETF_DAY_SET)
- || !(format->lf_timestamp_flags & ETF_MONTH_SET))
+ {
+ auto lr = line_range{0, (int) this->lss_token_value.length()};
+ this->lss_token_attrs.emplace_back(lr, SA_ORIGINAL_LINE.value());
+ }
+
+ if (!this->lss_token_line->is_continued() && !format->lf_formatted_lines
+ && (this->lss_token_file->is_time_adjusted()
+ || ((format->lf_timestamp_flags & ETF_ZONE_SET
+ || format->lf_date_time.dts_default_zone != nullptr)
+ && format->lf_date_time.dts_zoned_to_local)
+ || format->lf_timestamp_flags & ETF_MACHINE_ORIENTED
+ || !(format->lf_timestamp_flags & ETF_DAY_SET)
+ || !(format->lf_timestamp_flags & ETF_MONTH_SET))
&& format->lf_date_time.dts_fmt_lock != -1)
{
auto time_attr
@@ -256,8 +346,10 @@ logfile_sub_source::text_value_for_line(textview_curses& tc,
|| !(format->lf_timestamp_flags & ETF_MONTH_SET))
{
adjusted_time = this->lss_token_line->get_timeval();
- fmt = "%Y-%m-%d %H:%M:%S.%f";
- if (format->lf_timestamp_flags & ETF_MICROS_SET) {
+ if (format->lf_timestamp_flags
+ & (ETF_MICROS_SET | ETF_NANOS_SET))
+ {
+ fmt = "%Y-%m-%d %H:%M:%S.%f";
struct timeval actual_tv;
struct exttm tm;
if (format->lf_date_time.scan(
@@ -270,6 +362,10 @@ logfile_sub_source::text_value_for_line(textview_curses& tc,
{
adjusted_time.tv_usec = actual_tv.tv_usec;
}
+ } else if (format->lf_timestamp_flags & ETF_MILLIS_SET) {
+ fmt = "%Y-%m-%d %H:%M:%S.%L";
+ } else {
+ fmt = "%Y-%m-%d %H:%M:%S";
}
gmtime_r(&adjusted_time.tv_sec, &adjusted_tm.et_tm);
adjusted_tm.et_nsec
@@ -284,6 +380,14 @@ logfile_sub_source::text_value_for_line(textview_curses& tc,
= std::chrono::duration_cast<std::chrono::nanoseconds>(
std::chrono::microseconds{adjusted_time.tv_usec})
.count();
+ adjusted_tm.et_flags = format->lf_timestamp_flags;
+ if (format->lf_timestamp_flags & ETF_ZONE_SET
+ && format->lf_date_time.dts_zoned_to_local)
+ {
+ adjusted_tm.et_flags &= ~ETF_Z_IS_UTC;
+ }
+ adjusted_tm.et_gmtoff
+ = format->lf_date_time.dts_local_offset_cache;
len = format->lf_date_time.ftime(
buffer,
sizeof(buffer),
@@ -303,14 +407,14 @@ logfile_sub_source::text_value_for_line(textview_curses& tc,
std::string name;
if (this->lss_flags & F_FILENAME) {
file_offset_end = this->lss_filename_width;
- name = this->lss_token_file->get_filename();
+ name = fmt::to_string(this->lss_token_file->get_filename());
if (file_offset_end < name.size()) {
file_offset_end = name.size();
this->lss_filename_width = name.size();
}
} else {
file_offset_end = this->lss_basename_width;
- name = this->lss_token_file->get_unique_path();
+ name = fmt::to_string(this->lss_token_file->get_unique_path());
if (file_offset_end < name.size()) {
file_offset_end = name.size();
this->lss_basename_width = name.size();
@@ -324,35 +428,12 @@ logfile_sub_source::text_value_for_line(textview_curses& tc,
value_out.insert(0, 1, ' ');
}
- if (this->lss_flags & F_TIME_OFFSET) {
- auto curr_tv = this->lss_token_line->get_timeval();
- struct timeval diff_tv;
+ if (this->tas_display_time_offset) {
auto row_vl = vis_line_t(row);
-
- auto prev_umark
- = tc.get_bookmarks()[&textview_curses::BM_USER].prev(row_vl);
- auto next_umark
- = tc.get_bookmarks()[&textview_curses::BM_USER].next(row_vl);
- auto prev_emark
- = tc.get_bookmarks()[&textview_curses::BM_USER_EXPR].prev(row_vl);
- auto next_emark
- = tc.get_bookmarks()[&textview_curses::BM_USER_EXPR].next(row_vl);
- if (!prev_umark && !prev_emark && (next_umark || next_emark)) {
- auto next_line = this->find_line(this->at(
- std::max(next_umark.value_or(0), next_emark.value_or(0))));
-
- diff_tv = curr_tv - next_line->get_timeval();
- } else {
- auto prev_row
- = std::max(prev_umark.value_or(0), prev_emark.value_or(0));
- auto first_line = this->find_line(this->at(prev_row));
- auto start_tv = first_line->get_timeval();
- diff_tv = curr_tv - start_tv;
- }
-
- auto relstr = humanize::time::duration::from_tv(diff_tv).to_string();
+ auto relstr = this->get_time_offset_for_line(tc, row_vl);
value_out = fmt::format(FMT_STRING("{: >12}|{}"), relstr, value_out);
}
+
this->lss_in_value_for_line = false;
}
@@ -361,6 +442,10 @@ logfile_sub_source::text_attrs_for_line(textview_curses& lv,
int row,
string_attrs_t& value_out)
{
+ if (this->lss_indexing_in_progress) {
+ return;
+ }
+
view_colors& vc = view_colors::singleton();
logline* next_line = nullptr;
struct line_range lr;
@@ -383,8 +468,7 @@ logfile_sub_source::text_attrs_for_line(textview_curses& lv,
const auto& line_values = this->lss_token_values;
lr.lr_start = 0;
- lr.lr_end = this->lss_token_value.length();
- value_out.emplace_back(lr, SA_ORIGINAL_LINE.value());
+ lr.lr_end = -1;
value_out.emplace_back(
lr, SA_LEVEL.value(this->lss_token_line->get_msg_level()));
@@ -459,8 +543,7 @@ logfile_sub_source::text_attrs_for_line(textview_curses& lv,
value_out.emplace_back(lr, VC_GRAPHIC.value(graph));
if (!(this->lss_token_flags & RF_FULL)) {
- bookmark_vector<vis_line_t>& bv_search
- = bm[&textview_curses::BM_SEARCH];
+ auto& bv_search = bm[&textview_curses::BM_SEARCH];
if (binary_search(std::begin(bv_search),
std::end(bv_search),
@@ -492,7 +575,7 @@ logfile_sub_source::text_attrs_for_line(textview_curses& lv,
this->lss_token_file->get_filename())));
}
- if (this->lss_flags & F_TIME_OFFSET) {
+ if (this->tas_display_time_offset) {
time_offset_end = 13;
lr.lr_start = 0;
lr.lr_end = time_offset_end;
@@ -526,20 +609,15 @@ logfile_sub_source::text_attrs_for_line(textview_curses& lv,
lr, SA_FORMAT.value(this->lss_token_file->get_format()->get_name()));
{
- const auto& bv = lv.get_bookmarks()[&textview_curses::BM_META];
- bookmark_vector<vis_line_t>::const_iterator bv_iter;
-
- bv_iter = lower_bound(bv.begin(), bv.end(), vis_line_t(row + 1));
- if (bv_iter != bv.begin()) {
- --bv_iter;
- auto line_meta_opt = this->find_bookmark_metadata(*bv_iter);
-
- if (line_meta_opt && !line_meta_opt.value()->bm_name.empty()) {
- lr.lr_start = 0;
- lr.lr_end = -1;
- value_out.emplace_back(
- lr, logline::L_PARTITION.value(line_meta_opt.value()));
- }
+ auto line_meta_context = this->get_bookmark_metadata_context(
+ vis_line_t(row + 1), bookmark_metadata::categories::partition);
+ if (line_meta_context.bmc_current_metadata) {
+ lr.lr_start = 0;
+ lr.lr_end = -1;
+ value_out.emplace_back(
+ lr,
+ logline::L_PARTITION.value(
+ line_meta_context.bmc_current_metadata.value()));
}
auto line_meta_opt = this->find_bookmark_metadata(vis_line_t(row));
@@ -620,6 +698,53 @@ logfile_sub_source::text_attrs_for_line(textview_curses& lv,
}
}
+struct logline_cmp {
+ logline_cmp(logfile_sub_source& lc) : llss_controller(lc) {}
+
+ bool operator()(const content_line_t& lhs, const content_line_t& rhs) const
+ {
+ logline* ll_lhs = this->llss_controller.find_line(lhs);
+ logline* ll_rhs = this->llss_controller.find_line(rhs);
+
+ return (*ll_lhs) < (*ll_rhs);
+ }
+
+ bool operator()(const uint32_t& lhs, const uint32_t& rhs) const
+ {
+ content_line_t cl_lhs = (content_line_t) llss_controller.lss_index[lhs];
+ content_line_t cl_rhs = (content_line_t) llss_controller.lss_index[rhs];
+ logline* ll_lhs = this->llss_controller.find_line(cl_lhs);
+ logline* ll_rhs = this->llss_controller.find_line(cl_rhs);
+
+ return (*ll_lhs) < (*ll_rhs);
+ }
+#if 0
+ bool operator()(const indexed_content &lhs, const indexed_content &rhs)
+ {
+ logline *ll_lhs = this->llss_controller.find_line(lhs.ic_value);
+ logline *ll_rhs = this->llss_controller.find_line(rhs.ic_value);
+
+ return (*ll_lhs) < (*ll_rhs);
+ }
+#endif
+
+ bool operator()(const content_line_t& lhs, const time_t& rhs) const
+ {
+ logline* ll_lhs = this->llss_controller.find_line(lhs);
+
+ return *ll_lhs < rhs;
+ }
+
+ bool operator()(const content_line_t& lhs, const struct timeval& rhs) const
+ {
+ logline* ll_lhs = this->llss_controller.find_line(lhs);
+
+ return *ll_lhs < rhs;
+ }
+
+ logfile_sub_source& llss_controller;
+};
+
logfile_sub_source::rebuild_result
logfile_sub_source::rebuild_index(
nonstd::optional<ui_clock::time_point> deadline)
@@ -628,6 +753,9 @@ logfile_sub_source::rebuild_index(
return rebuild_result::rr_no_change;
}
+ this->lss_indexing_in_progress = true;
+ auto fin = finally([this]() { this->lss_indexing_in_progress = false; });
+
iterator iter;
size_t total_lines = 0;
bool full_sort = false;
@@ -641,6 +769,7 @@ logfile_sub_source::rebuild_index(
if (force) {
log_debug("forced to full rebuild");
retval = rebuild_result::rr_full_rebuild;
+ full_sort = true;
}
std::vector<size_t> file_order(this->lss_files.size());
@@ -678,6 +807,7 @@ logfile_sub_source::rebuild_index(
ld.ld_file_index);
force = true;
retval = rebuild_result::rr_full_rebuild;
+ full_sort = true;
}
} else {
if (time_left && deadline && ui_clock::now() > deadline.value()) {
@@ -733,6 +863,11 @@ logfile_sub_source::rebuild_index(
{
lowest_tv = new_file_line.get_timeval();
}
+ } else {
+ log_debug(
+ "already doing full rebuild, doing "
+ "full_sort as well");
+ full_sort = true;
}
}
}
@@ -757,8 +892,12 @@ logfile_sub_source::rebuild_index(
}
if (this->lss_index.reserve(total_lines)) {
+ // The index array was reallocated, just do a full sort/rebuild since
+ // it's been cleared out.
+ log_debug("expanding index capacity %zu", this->lss_index.ba_capacity);
force = true;
retval = rebuild_result::rr_full_rebuild;
+ full_sort = true;
}
auto& vis_bm = this->tss_view->get_bookmarks();
@@ -854,12 +993,13 @@ logfile_sub_source::rebuild_index(
if (lf == nullptr) {
continue;
}
- this->lss_longest_line = std::max(this->lss_longest_line,
- lf->get_longest_line_length());
- this->lss_basename_width = std::max(this->lss_basename_width,
- lf->get_unique_path().size());
- this->lss_filename_width
- = std::max(this->lss_filename_width, lf->get_filename().size());
+ this->lss_longest_line = std::max(
+ this->lss_longest_line, lf->get_longest_line_length() + 1);
+ this->lss_basename_width
+ = std::max(this->lss_basename_width,
+ lf->get_unique_path().native().size());
+ this->lss_filename_width = std::max(
+ this->lss_filename_width, lf->get_filename().native().size());
}
if (full_sort) {
@@ -873,13 +1013,41 @@ logfile_sub_source::rebuild_index(
for (size_t line_index = 0; line_index < lf->size();
line_index++)
{
- if ((*lf)[line_index].is_ignored()) {
+ const auto lf_iter
+ = ld->get_file_ptr()->begin() + line_index;
+ if (lf_iter->is_ignored()) {
continue;
}
content_line_t con_line(
ld->ld_file_index * MAX_LINES_PER_FILE + line_index);
+ if (lf_iter->is_meta_marked()) {
+ auto start_iter = lf_iter;
+ while (start_iter->is_continued()) {
+ --start_iter;
+ }
+ int start_index
+ = start_iter - ld->get_file_ptr()->begin();
+ content_line_t start_con_line(ld->ld_file_index
+ * MAX_LINES_PER_FILE
+ + start_index);
+
+ auto& line_meta
+ = ld->get_file_ptr()
+ ->get_bookmark_metadata()[start_index];
+ if (line_meta.has(bookmark_metadata::categories::notes))
+ {
+ this->lss_user_marks[&textview_curses::BM_META]
+ .insert_once(start_con_line);
+ }
+ if (line_meta.has(
+ bookmark_metadata::categories::partition))
+ {
+ this->lss_user_marks[&textview_curses::BM_PARTITION]
+ .insert_once(start_con_line);
+ }
+ }
this->lss_index.push_back(con_line);
}
}
@@ -932,7 +1100,7 @@ logfile_sub_source::rebuild_index(
content_line_t con_line(file_index * MAX_LINES_PER_FILE
+ line_index);
- if (lf_iter->is_marked()) {
+ if (lf_iter->is_meta_marked()) {
auto start_iter = lf_iter;
while (start_iter->is_continued()) {
--start_iter;
@@ -942,9 +1110,20 @@ logfile_sub_source::rebuild_index(
content_line_t start_con_line(
file_index * MAX_LINES_PER_FILE + start_index);
- this->lss_user_marks[&textview_curses::BM_META]
- .insert_once(start_con_line);
- lf_iter->set_mark(false);
+ auto& line_meta
+ = ld->get_file_ptr()
+ ->get_bookmark_metadata()[start_index];
+ if (line_meta.has(bookmark_metadata::categories::notes))
+ {
+ this->lss_user_marks[&textview_curses::BM_META]
+ .insert_once(start_con_line);
+ }
+ if (line_meta.has(
+ bookmark_metadata::categories::partition))
+ {
+ this->lss_user_marks[&textview_curses::BM_PARTITION]
+ .insert_once(start_con_line);
+ }
}
this->lss_index.push_back(con_line);
}
@@ -985,7 +1164,7 @@ logfile_sub_source::rebuild_index(
index_index < this->lss_index.size();
index_index++)
{
- content_line_t cl = (content_line_t) this->lss_index[index_index];
+ const auto cl = (content_line_t) this->lss_index[index_index];
uint64_t line_number;
auto ld = this->find_data(cl, line_number);
@@ -1028,6 +1207,8 @@ logfile_sub_source::rebuild_index(
}
}
+ this->lss_indexing_in_progress = false;
+
if (this->lss_index_delegate != nullptr) {
this->lss_index_delegate->index_complete(*this);
}
@@ -1060,7 +1241,7 @@ logfile_sub_source::rebuild_index(
void
logfile_sub_source::text_update_marks(vis_bookmarks& bm)
{
- std::shared_ptr<logfile> last_file;
+ logfile* last_file = nullptr;
vis_line_t vl;
bm[&BM_WARNINGS].clear();
@@ -1074,7 +1255,7 @@ logfile_sub_source::text_update_marks(vis_bookmarks& bm)
for (; vl < (int) this->lss_filtered_index.size(); ++vl) {
const content_line_t orig_cl = this->at(vl);
content_line_t cl = orig_cl;
- auto lf = this->find(cl);
+ auto lf = this->find_file_ptr(cl);
for (auto& lss_user_mark : this->lss_user_marks) {
if (binary_search(lss_user_mark.second.begin(),
@@ -1117,29 +1298,6 @@ logfile_sub_source::text_update_marks(vis_bookmarks& bm)
}
}
-log_accel::direction_t
-logfile_sub_source::get_line_accel_direction(vis_line_t vl)
-{
- log_accel la;
-
- while (vl >= 0) {
- logline* curr_line = this->find_line(this->at(vl));
-
- if (!curr_line->is_message()) {
- --vl;
- continue;
- }
-
- if (!la.add_point(curr_line->get_time_in_millis())) {
- break;
- }
-
- --vl;
- }
-
- return la.get_direction();
-}
-
void
logfile_sub_source::text_filters_changed()
{
@@ -1226,6 +1384,68 @@ bool
logfile_sub_source::list_input_handle_key(listview_curses& lv, int ch)
{
switch (ch) {
+ case ' ': {
+ auto ov_vl = lv.get_overlay_selection();
+ if (ov_vl) {
+ auto* fos = dynamic_cast<field_overlay_source*>(
+ lv.get_overlay_source());
+ auto iter = fos->fos_row_to_field_meta.find(ov_vl.value());
+ if (iter != fos->fos_row_to_field_meta.end()) {
+ auto find_res = this->find_line_with_file(lv.get_top());
+ if (find_res) {
+ auto file_and_line = find_res.value();
+ auto* format = file_and_line.first->get_format_ptr();
+ auto fstates = format->get_field_states();
+ auto state_iter = fstates.find(iter->second.lvm_name);
+ if (state_iter != fstates.end()) {
+ format->hide_field(iter->second.lvm_name,
+ !state_iter->second.is_hidden());
+ lv.set_needs_update();
+ }
+ }
+ }
+ return true;
+ }
+ return false;
+ }
+ case '#': {
+ auto ov_vl = lv.get_overlay_selection();
+ if (ov_vl) {
+ auto* fos = dynamic_cast<field_overlay_source*>(
+ lv.get_overlay_source());
+ auto iter = fos->fos_row_to_field_meta.find(ov_vl.value());
+ if (iter != fos->fos_row_to_field_meta.end()) {
+ const auto& meta = iter->second;
+ std::string cmd;
+
+ switch (meta.to_chart_type()) {
+ case chart_type_t::none:
+ break;
+ case chart_type_t::hist: {
+ auto prql = fmt::format(
+ FMT_STRING(
+ "from {} | stats.hist {} slice:'1h'"),
+ meta.lvm_format.value()->get_name(),
+ meta.lvm_name);
+ cmd = fmt::format(FMT_STRING(":prompt sql ; '{}'"),
+ shlex::escape(prql));
+ break;
+ }
+ case chart_type_t::spectro:
+ cmd = fmt::format(FMT_STRING(":spectrogram {}"),
+ meta.lvm_name);
+ break;
+ }
+ if (!cmd.empty()) {
+ this->lss_exec_context
+ ->with_provenance(exec_context::mouse_input{})
+ ->execute(cmd);
+ }
+ }
+ return true;
+ }
+ return false;
+ }
case 'h':
case 'H':
case KEY_SLEFT:
@@ -1258,6 +1478,24 @@ logfile_sub_source::get_grepper()
(grep_proc_sink<vis_line_t>*) &this->lss_meta_grepper);
}
+/**
+ * Functor for comparing the ld_file field of the logfile_data struct.
+ */
+struct logfile_data_eq {
+ explicit logfile_data_eq(std::shared_ptr<logfile> lf)
+ : lde_file(std::move(lf))
+ {
+ }
+
+ bool operator()(
+ const std::unique_ptr<logfile_sub_source::logfile_data>& ld) const
+ {
+ return this->lde_file == ld->get_file();
+ }
+
+ std::shared_ptr<logfile> lde_file;
+};
+
bool
logfile_sub_source::insert_file(const std::shared_ptr<logfile>& lf)
{
@@ -1483,6 +1721,26 @@ logfile_sub_source::eval_sql_filter(sqlite3_stmt* stmt,
}
continue;
}
+ if (strcmp(name, ":log_annotations") == 0) {
+ const auto& bm = lf->get_bookmark_metadata();
+ auto line_number
+ = static_cast<uint32_t>(std::distance(lf->cbegin(), ll));
+ auto bm_iter = bm.find(line_number);
+ if (bm_iter != bm.end()
+ && !bm_iter->second.bm_annotations.la_pairs.empty())
+ {
+ const auto& meta = bm_iter->second;
+ auto anno_str = logmsg_annotations_handlers.to_string(
+ meta.bm_annotations);
+
+ sqlite3_bind_text(stmt,
+ lpc + 1,
+ anno_str.c_str(),
+ anno_str.length(),
+ SQLITE_TRANSIENT);
+ }
+ continue;
+ }
if (strcmp(name, ":log_tags") == 0) {
const auto& bm = lf->get_bookmark_metadata();
auto line_number
@@ -1529,7 +1787,7 @@ logfile_sub_source::eval_sql_filter(sqlite3_stmt* stmt,
sqlite3_bind_text(stmt,
lpc + 1,
filename.c_str(),
- filename.length(),
+ filename.native().length(),
SQLITE_STATIC);
continue;
}
@@ -1538,7 +1796,7 @@ logfile_sub_source::eval_sql_filter(sqlite3_stmt* stmt,
sqlite3_bind_text(stmt,
lpc + 1,
filename.c_str(),
- filename.length(),
+ filename.native().length(),
SQLITE_STATIC);
continue;
}
@@ -1565,14 +1823,11 @@ logfile_sub_source::eval_sql_filter(sqlite3_stmt* stmt,
}
if (strcmp(name, ":log_opid") == 0) {
auto opid_attr_opt = get_string_attr(sa, logline::L_OPID);
- if (opid_attr_opt) {
- const auto& sar
- = opid_attr_opt.value().saw_string_attr->sa_range;
-
+ if (values.lvv_opid_value) {
sqlite3_bind_text(stmt,
lpc + 1,
- sbr.get_data_at(sar.lr_start),
- sar.length(),
+ values.lvv_opid_value->c_str(),
+ values.lvv_opid_value->length(),
SQLITE_STATIC);
} else {
sqlite3_bind_null(stmt, lpc + 1);
@@ -1714,11 +1969,6 @@ logfile_sub_source::text_clear_marks(const bookmark_type_t* bm)
for (iter = this->lss_user_marks[bm].begin();
iter != this->lss_user_marks[bm].end();)
{
- auto line_meta_opt = this->find_bookmark_metadata(*iter);
- if (line_meta_opt) {
- ++iter;
- continue;
- }
this->find_line(*iter)->set_mark(false);
iter = this->lss_user_marks[bm].erase(iter);
}
@@ -1891,25 +2141,30 @@ log_location_history::loc_history_forward(vis_line_t current_top)
}
bool
-sql_filter::matches(const logfile& lf,
- logfile::const_iterator ll,
+sql_filter::matches(nonstd::optional<line_source> ls_opt,
const shared_buffer_ref& line)
{
- if (!ll->is_message()) {
+ if (!ls_opt) {
+ return false;
+ }
+
+ auto ls = ls_opt;
+
+ if (!ls->ls_line->is_message()) {
return false;
}
if (this->sf_filter_stmt == nullptr) {
return false;
}
- auto lfp = lf.shared_from_this();
+ auto lfp = ls->ls_file.shared_from_this();
auto ld = this->sf_log_source.find_data_i(lfp);
if (ld == this->sf_log_source.end()) {
return false;
}
- auto eval_res
- = this->sf_log_source.eval_sql_filter(this->sf_filter_stmt, ld, ll);
+ auto eval_res = this->sf_log_source.eval_sql_filter(
+ this->sf_filter_stmt, ld, ls->ls_line);
if (eval_res.unwrapOr(true)) {
return false;
}
@@ -1949,6 +2204,21 @@ logfile_sub_source::meta_grepper::grep_value_for_line(vis_line_t line,
value_out.append(tag);
value_out.append("\x1c");
}
+ value_out.append("\x1c");
+ for (const auto& pair : bm.bm_annotations.la_pairs) {
+ value_out.append(pair.first);
+ value_out.append("\x1c");
+
+ md2attr_line mdal;
+
+ auto parse_res = md4cpp::parse(pair.second, mdal);
+ if (parse_res.isOk()) {
+ value_out.append(parse_res.unwrap().get_string());
+ } else {
+ value_out.append(pair.second);
+ }
+ value_out.append("\x1c");
+ }
}
return !this->lmg_done;
@@ -1958,8 +2228,8 @@ vis_line_t
logfile_sub_source::meta_grepper::grep_initial_line(vis_line_t start,
vis_line_t highest)
{
- vis_bookmarks& bm = this->lmg_source.tss_view->get_bookmarks();
- bookmark_vector<vis_line_t>& bv = bm[&textview_curses::BM_META];
+ auto& bm = this->lmg_source.tss_view->get_bookmarks();
+ auto& bv = bm[&textview_curses::BM_META];
if (bv.empty()) {
return -1_vl;
@@ -1970,8 +2240,8 @@ logfile_sub_source::meta_grepper::grep_initial_line(vis_line_t start,
void
logfile_sub_source::meta_grepper::grep_next_line(vis_line_t& line)
{
- vis_bookmarks& bm = this->lmg_source.tss_view->get_bookmarks();
- bookmark_vector<vis_line_t>& bv = bm[&textview_curses::BM_META];
+ auto& bm = this->lmg_source.tss_view->get_bookmarks();
+ auto& bv = bm[&textview_curses::BM_META];
auto line_opt = bv.next(vis_line_t(line));
if (!line_opt) {
@@ -2132,6 +2402,21 @@ timestamp_poss()
return retval;
}
+static attr_line_t
+to_display(const std::shared_ptr<logfile>& lf)
+{
+ attr_line_t retval;
+
+ if (lf->get_open_options().loo_piper) {
+ if (!lf->get_open_options().loo_piper->is_finished()) {
+ retval.append("\u21bb "_list_glyph);
+ }
+ }
+ retval.append(lf->get_unique_path());
+
+ return retval;
+}
+
void
logfile_sub_source::text_crumbs_for_line(int line,
std::vector<breadcrumb::crumb>& crumbs)
@@ -2142,7 +2427,43 @@ logfile_sub_source::text_crumbs_for_line(int line,
return;
}
- auto line_pair_opt = this->find_line_with_file(vis_line_t(line));
+ auto vl = vis_line_t(line);
+ auto bmc = this->get_bookmark_metadata_context(
+ vl, bookmark_metadata::categories::partition);
+ if (bmc.bmc_current_metadata) {
+ const auto& name = bmc.bmc_current_metadata.value()->bm_name;
+ auto key = text_anchors::to_anchor_string(name);
+ auto display = attr_line_t()
+ .append("\u2291 "_symbol)
+ .append(lnav::roles::variable(name));
+ crumbs.emplace_back(
+ key,
+ display,
+ [this]() -> std::vector<breadcrumb::possibility> {
+ auto& vb = this->tss_view->get_bookmarks();
+ const auto& bv = vb[&textview_curses::BM_PARTITION];
+ std::vector<breadcrumb::possibility> retval;
+
+ for (const auto& vl : bv) {
+ auto meta_opt = this->find_bookmark_metadata(vl);
+ if (!meta_opt || meta_opt.value()->bm_name.empty()) {
+ continue;
+ }
+
+ const auto& name = meta_opt.value()->bm_name;
+ retval.emplace_back(text_anchors::to_anchor_string(name),
+ name);
+ }
+
+ return retval;
+ },
+ [ec = this->lss_exec_context](const auto& part) {
+ ec->execute(fmt::format(FMT_STRING(":goto {}"),
+ part.template get<std::string>()));
+ });
+ }
+
+ auto line_pair_opt = this->find_line_with_file(vl);
if (!line_pair_opt) {
return;
}
@@ -2180,7 +2501,8 @@ logfile_sub_source::text_crumbs_for_line(int line,
return breadcrumb::possibility{
elem.to_string(),
};
- });
+ })
+ | lnav::itertools::to_vector();
},
[ec = this->lss_exec_context](const auto& format_name) {
static const std::string MOVE_STMT = R"(;UPDATE lnav_views
@@ -2198,9 +2520,7 @@ logfile_sub_source::text_crumbs_for_line(int line,
auto file_line_number = std::distance(lf->begin(), msg_start_iter);
crumbs.emplace_back(
lf->get_unique_path(),
- attr_line_t()
- .append(lf->get_unique_path())
- .appendf(FMT_STRING("[{:L}]"), file_line_number),
+ to_display(lf).appendf(FMT_STRING("[{:L}]"), file_line_number),
[this]() -> std::vector<breadcrumb::possibility> {
return this->lss_files
| lnav::itertools::filter_in([](const auto& file_data) {
@@ -2209,8 +2529,7 @@ logfile_sub_source::text_crumbs_for_line(int line,
| lnav::itertools::map([](const auto& file_data) {
return breadcrumb::possibility{
file_data->get_file_ptr()->get_unique_path(),
- attr_line_t(
- file_data->get_file_ptr()->get_unique_path()),
+ to_display(file_data->get_file()),
};
});
},
@@ -2254,10 +2573,10 @@ logfile_sub_source::text_crumbs_for_line(int line,
if (file_data->get_file_ptr() == nullptr) {
continue;
}
- safe::ReadAccess<logfile::safe_opid_map> r_opid_map(
+ safe::ReadAccess<logfile::safe_opid_state> r_opid_map(
file_data->get_file_ptr()->get_opids());
- for (const auto& pair : *r_opid_map) {
+ for (const auto& pair : r_opid_map->los_opid_ranges) {
retval.emplace_back(pair.first.to_string());
}
}
@@ -2424,8 +2743,62 @@ logfile_sub_source::get_bookmark_metadata(content_line_t cl)
return line_pair.first->get_bookmark_metadata()[line_number];
}
+logfile_sub_source::bookmark_metadata_context
+logfile_sub_source::get_bookmark_metadata_context(
+ vis_line_t vl, bookmark_metadata::categories desired) const
+{
+ const auto& vb = this->tss_view->get_bookmarks();
+ const auto bv_iter
+ = vb.find(desired == bookmark_metadata::categories::partition
+ ? &textview_curses::BM_PARTITION
+ : &textview_curses::BM_META);
+ if (bv_iter == vb.end()) {
+ return bookmark_metadata_context{};
+ }
+
+ const auto& bv = bv_iter->second;
+ auto vl_iter = std::lower_bound(bv.begin(), bv.end(), vl + 1_vl);
+
+ nonstd::optional<vis_line_t> next_line;
+ for (auto next_vl_iter = vl_iter; next_vl_iter != bv.end(); ++next_vl_iter)
+ {
+ auto bm_opt = this->find_bookmark_metadata(*next_vl_iter);
+ if (!bm_opt) {
+ continue;
+ }
+
+ if (bm_opt.value()->has(desired)) {
+ next_line = *next_vl_iter;
+ break;
+ }
+ }
+ if (vl_iter == bv.begin()) {
+ return bookmark_metadata_context{
+ nonstd::nullopt, nonstd::nullopt, next_line};
+ }
+
+ --vl_iter;
+ while (true) {
+ auto bm_opt = this->find_bookmark_metadata(*vl_iter);
+ if (bm_opt) {
+ if (bm_opt.value()->has(desired)) {
+ return bookmark_metadata_context{
+ *vl_iter, bm_opt.value(), next_line};
+ }
+ }
+
+ if (vl_iter == bv.begin()) {
+ return bookmark_metadata_context{
+ nonstd::nullopt, nonstd::nullopt, next_line};
+ }
+ --vl_iter;
+ }
+ return bookmark_metadata_context{
+ nonstd::nullopt, nonstd::nullopt, next_line};
+}
+
nonstd::optional<bookmark_metadata*>
-logfile_sub_source::find_bookmark_metadata(content_line_t cl)
+logfile_sub_source::find_bookmark_metadata(content_line_t cl) const
{
auto line_pair = this->find_line_with_file(cl).value();
auto line_number = static_cast<uint32_t>(
@@ -2465,3 +2838,240 @@ logfile_sub_source::clear_bookmark_metadata()
ld->get_file_ptr()->get_bookmark_metadata().clear();
}
}
+
+void
+logfile_sub_source::increase_line_context()
+{
+ auto old_flags = this->lss_flags;
+
+ if (this->lss_flags & F_FILENAME) {
+ // Nothing to do
+ } else if (this->lss_flags & F_BASENAME) {
+ this->lss_flags &= ~F_NAME_MASK;
+ this->lss_flags |= F_FILENAME;
+ } else {
+ this->lss_flags |= F_BASENAME;
+ }
+ if (old_flags != this->lss_flags) {
+ this->clear_line_size_cache();
+ }
+}
+
+bool
+logfile_sub_source::decrease_line_context()
+{
+ auto old_flags = this->lss_flags;
+
+ if (this->lss_flags & F_FILENAME) {
+ this->lss_flags &= ~F_NAME_MASK;
+ this->lss_flags |= F_BASENAME;
+ } else if (this->lss_flags & F_BASENAME) {
+ this->lss_flags &= ~F_NAME_MASK;
+ }
+ if (old_flags != this->lss_flags) {
+ this->clear_line_size_cache();
+
+ return true;
+ }
+
+ return false;
+}
+
+size_t
+logfile_sub_source::get_filename_offset() const
+{
+ if (this->lss_flags & F_FILENAME) {
+ return this->lss_filename_width;
+ } else if (this->lss_flags & F_BASENAME) {
+ return this->lss_basename_width;
+ }
+
+ return 0;
+}
+
+void
+logfile_sub_source::clear_min_max_log_times()
+{
+ if (this->lss_min_log_time.tv_sec != 0
+ || this->lss_min_log_time.tv_usec != 0
+ || this->lss_max_log_time.tv_sec != std::numeric_limits<time_t>::max()
+ || this->lss_max_log_time.tv_usec != 0)
+ {
+ memset(&this->lss_min_log_time, 0, sizeof(this->lss_min_log_time));
+ this->lss_max_log_time.tv_sec = std::numeric_limits<time_t>::max();
+ this->lss_max_log_time.tv_usec = 0;
+ this->text_filters_changed();
+ }
+}
+
+size_t
+logfile_sub_source::file_count() const
+{
+ size_t retval = 0;
+ const_iterator iter;
+
+ for (iter = this->cbegin(); iter != this->cend(); ++iter) {
+ if (*iter != nullptr && (*iter)->get_file() != nullptr) {
+ retval += 1;
+ }
+ }
+
+ return retval;
+}
+
+size_t
+logfile_sub_source::text_size_for_line(textview_curses& tc,
+ int row,
+ text_sub_source::line_flags_t flags)
+{
+ size_t index = row % LINE_SIZE_CACHE_SIZE;
+
+ if (this->lss_line_size_cache[index].first != row) {
+ std::string value;
+
+ this->text_value_for_line(tc, row, value, flags);
+ scrub_ansi_string(value, nullptr);
+ this->lss_line_size_cache[index].second
+ = string_fragment::from_str(value).column_width();
+ this->lss_line_size_cache[index].first = row;
+ }
+ return this->lss_line_size_cache[index].second;
+}
+
+int
+logfile_sub_source::get_filtered_count_for(size_t filter_index) const
+{
+ int retval = 0;
+
+ for (const auto& ld : this->lss_files) {
+ retval += ld->ld_filter_state.lfo_filter_state
+ .tfs_filter_hits[filter_index];
+ }
+
+ return retval;
+}
+
+nonstd::optional<vis_line_t>
+logfile_sub_source::row_for(const row_info& ri)
+{
+ auto lb = std::lower_bound(this->lss_filtered_index.begin(),
+ this->lss_filtered_index.end(),
+ ri.ri_time,
+ filtered_logline_cmp(*this));
+ if (lb != this->lss_filtered_index.end()) {
+ auto first_lb = lb;
+ while (true) {
+ auto cl = this->lss_index[*lb];
+ if (content_line_t(ri.ri_id) == cl) {
+ first_lb = lb;
+ break;
+ }
+ auto ll = this->find_line(cl);
+ if (ll->get_timeval() != ri.ri_time) {
+ break;
+ }
+ ++lb;
+ }
+
+ return vis_line_t(first_lb - this->lss_filtered_index.begin());
+ }
+
+ return nonstd::nullopt;
+}
+
+nonstd::optional<vis_line_t>
+logfile_sub_source::row_for_anchor(const std::string& id)
+{
+ auto& vb = this->tss_view->get_bookmarks();
+ const auto& bv = vb[&textview_curses::BM_PARTITION];
+
+ for (const auto& vl : bv) {
+ auto meta_opt = this->find_bookmark_metadata(vl);
+ if (!meta_opt || meta_opt.value()->bm_name.empty()) {
+ continue;
+ }
+
+ const auto& name = meta_opt.value()->bm_name;
+ if (id == text_anchors::to_anchor_string(name)) {
+ return vl;
+ }
+ }
+
+ return nonstd::nullopt;
+}
+
+nonstd::optional<vis_line_t>
+logfile_sub_source::adjacent_anchor(vis_line_t vl, text_anchors::direction dir)
+{
+ auto bmc = this->get_bookmark_metadata_context(
+ vl, bookmark_metadata::categories::partition);
+ switch (dir) {
+ case text_anchors::direction::prev: {
+ if (bmc.bmc_current && bmc.bmc_current.value() != vl) {
+ return bmc.bmc_current;
+ }
+ if (!bmc.bmc_current || bmc.bmc_current.value() == 0_vl) {
+ return 0_vl;
+ }
+ auto prev_bmc = this->get_bookmark_metadata_context(
+ bmc.bmc_current.value() - 1_vl,
+ bookmark_metadata::categories::partition);
+ if (!prev_bmc.bmc_current) {
+ return 0_vl;
+ }
+ return prev_bmc.bmc_current;
+ }
+ case text_anchors::direction::next:
+ return bmc.bmc_next_line;
+ }
+ return nonstd::nullopt;
+}
+
+nonstd::optional<std::string>
+logfile_sub_source::anchor_for_row(vis_line_t vl)
+{
+ auto line_meta = this->get_bookmark_metadata_context(
+ vl, bookmark_metadata::categories::partition);
+ if (!line_meta.bmc_current_metadata) {
+ return nonstd::nullopt;
+ }
+
+ return text_anchors::to_anchor_string(
+ line_meta.bmc_current_metadata.value()->bm_name);
+}
+
+std::unordered_set<std::string>
+logfile_sub_source::get_anchors()
+{
+ auto& vb = this->tss_view->get_bookmarks();
+ const auto& bv = vb[&textview_curses::BM_PARTITION];
+ std::unordered_set<std::string> retval;
+
+ for (const auto& vl : bv) {
+ auto meta_opt = this->find_bookmark_metadata(vl);
+ if (!meta_opt || meta_opt.value()->bm_name.empty()) {
+ continue;
+ }
+
+ const auto& name = meta_opt.value()->bm_name;
+ retval.emplace(text_anchors::to_anchor_string(name));
+ }
+
+ return retval;
+}
+
+bool
+logfile_sub_source::text_handle_mouse(
+ textview_curses& tc,
+ const listview_curses::display_line_content_t& mouse_line,
+ mouse_event& me)
+{
+ if (tc.get_overlay_selection()) {
+ if (me.is_click_in(mouse_button_t::BUTTON_LEFT, 2, 4)) {
+ this->list_input_handle_key(tc, ' ');
+ } else if (me.is_click_in(mouse_button_t::BUTTON_LEFT, 5, 6)) {
+ this->list_input_handle_key(tc, '#');
+ }
+ }
+ return true;
+}
diff --git a/src/logfile_sub_source.hh b/src/logfile_sub_source.hh
index ec032c8..a82db60 100644
--- a/src/logfile_sub_source.hh
+++ b/src/logfile_sub_source.hh
@@ -33,23 +33,16 @@
#define logfile_sub_source_hh
#include <array>
-#include <list>
-#include <map>
-#include <sstream>
#include <utility>
#include <vector>
#include <limits.h>
-#include "base/lnav.console.hh"
-#include "base/lnav_log.hh"
#include "base/time_util.hh"
#include "big_array.hh"
#include "bookmarks.hh"
#include "document.sections.hh"
#include "filter_observer.hh"
-#include "lnav_config_fwd.hh"
-#include "log_accel.hh"
#include "log_format.hh"
#include "logfile.hh"
#include "strong_int.hh"
@@ -80,39 +73,6 @@ public:
virtual void index_complete(logfile_sub_source& lss) {}
};
-class pcre_filter : public text_filter {
-public:
- pcre_filter(type_t type,
- const std::string& id,
- size_t index,
- std::shared_ptr<lnav::pcre2pp::code> code)
- : text_filter(type, filter_lang_t::REGEX, id, index),
- pf_pcre(std::move(code))
- {
- }
-
- ~pcre_filter() override = default;
-
- bool matches(const logfile& lf,
- logfile::const_iterator ll,
- const shared_buffer_ref& line) override
- {
- return this->pf_pcre->find_in(line.to_string_fragment())
- .ignore_error()
- .has_value();
- }
-
- std::string to_command() const override
- {
- return (this->lf_type == text_filter::INCLUDE ? "filter-in "
- : "filter-out ")
- + this->lf_id;
- }
-
-protected:
- std::shared_ptr<lnav::pcre2pp::code> pf_pcre;
-};
-
class sql_filter : public text_filter {
public:
sql_filter(logfile_sub_source& lss,
@@ -124,8 +84,7 @@ public:
this->sf_filter_stmt = stmt;
}
- bool matches(const logfile& lf,
- logfile::const_iterator ll,
+ bool matches(nonstd::optional<line_source> ls,
const shared_buffer_ref& line) override;
std::string to_command() const override;
@@ -240,7 +199,10 @@ private:
class logfile_sub_source
: public text_sub_source
, public text_time_translator
- , public list_input_delegate {
+ , public text_accel_source
+ , public list_input_delegate
+ , public text_anchors
+ , public text_delegate {
public:
const static bookmark_type_t BM_ERRORS;
const static bookmark_type_t BM_WARNINGS;
@@ -252,72 +214,11 @@ public:
~logfile_sub_source() = default;
- void toggle_time_offset()
- {
- this->lss_flags ^= F_TIME_OFFSET;
- this->clear_line_size_cache();
- }
-
- void increase_line_context()
- {
- auto old_flags = this->lss_flags;
-
- if (this->lss_flags & F_FILENAME) {
- // Nothing to do
- } else if (this->lss_flags & F_BASENAME) {
- this->lss_flags &= ~F_NAME_MASK;
- this->lss_flags |= F_FILENAME;
- } else {
- this->lss_flags |= F_BASENAME;
- }
- if (old_flags != this->lss_flags) {
- this->clear_line_size_cache();
- }
- }
-
- bool decrease_line_context()
- {
- auto old_flags = this->lss_flags;
-
- if (this->lss_flags & F_FILENAME) {
- this->lss_flags &= ~F_NAME_MASK;
- this->lss_flags |= F_BASENAME;
- } else if (this->lss_flags & F_BASENAME) {
- this->lss_flags &= ~F_NAME_MASK;
- }
- if (old_flags != this->lss_flags) {
- this->clear_line_size_cache();
-
- return true;
- }
-
- return false;
- }
+ void increase_line_context();
- size_t get_filename_offset() const
- {
- if (this->lss_flags & F_FILENAME) {
- return this->lss_filename_width;
- } else if (this->lss_flags & F_BASENAME) {
- return this->lss_basename_width;
- }
+ bool decrease_line_context();
- return 0;
- }
-
- void set_time_offset(bool enabled)
- {
- if (enabled)
- this->lss_flags |= F_TIME_OFFSET;
- else
- this->lss_flags &= ~F_TIME_OFFSET;
- this->clear_line_size_cache();
- }
-
- bool is_time_offset_enabled() const
- {
- return (bool) (this->lss_flags & F_TIME_OFFSET);
- }
+ size_t get_filename_offset() const;
bool is_filename_enabled() const
{
@@ -341,11 +242,15 @@ public:
}
}
- bool get_min_log_time(struct timeval& tv_out) const
+ nonstd::optional<timeval> get_min_log_time() const
{
- tv_out = this->lss_min_log_time;
- return (this->lss_min_log_time.tv_sec != 0
- || this->lss_min_log_time.tv_usec != 0);
+ if (this->lss_min_log_time.tv_sec == 0
+ && this->lss_min_log_time.tv_usec == 0)
+ {
+ return nonstd::nullopt;
+ }
+
+ return this->lss_min_log_time;
}
void set_min_log_time(const struct timeval& tv)
@@ -356,12 +261,15 @@ public:
}
}
- bool get_max_log_time(struct timeval& tv_out) const
+ nonstd::optional<timeval> get_max_log_time() const
{
- tv_out = this->lss_max_log_time;
- return (this->lss_max_log_time.tv_sec
- != std::numeric_limits<time_t>::max()
- || this->lss_max_log_time.tv_usec != 0);
+ if (this->lss_max_log_time.tv_sec == std::numeric_limits<time_t>::max()
+ && this->lss_max_log_time.tv_usec == 0)
+ {
+ return nonstd::nullopt;
+ }
+
+ return this->lss_max_log_time;
}
void set_max_log_time(struct timeval& tv)
@@ -372,20 +280,7 @@ public:
}
}
- void clear_min_max_log_times()
- {
- if (this->lss_min_log_time.tv_sec != 0
- || this->lss_min_log_time.tv_usec != 0
- || this->lss_max_log_time.tv_sec
- != std::numeric_limits<time_t>::max()
- || this->lss_max_log_time.tv_usec != 0)
- {
- memset(&this->lss_min_log_time, 0, sizeof(this->lss_min_log_time));
- this->lss_max_log_time.tv_sec = std::numeric_limits<time_t>::max();
- this->lss_max_log_time.tv_usec = 0;
- this->text_filters_changed();
- }
- }
+ void clear_min_max_log_times();
bool list_input_handle_key(listview_curses& lv, int ch);
@@ -406,19 +301,7 @@ public:
return this->lss_longest_line;
}
- size_t file_count() const
- {
- size_t retval = 0;
- const_iterator iter;
-
- for (iter = this->cbegin(); iter != this->cend(); ++iter) {
- if (*iter != nullptr && (*iter)->get_file() != nullptr) {
- retval += 1;
- }
- }
-
- return retval;
- }
+ size_t file_count() const;
bool empty() const { return this->lss_filtered_index.empty(); }
@@ -431,19 +314,7 @@ public:
int row,
string_attrs_t& value_out);
- size_t text_size_for_line(textview_curses& tc, int row, line_flags_t flags)
- {
- size_t index = row % LINE_SIZE_CACHE_SIZE;
-
- if (this->lss_line_size_cache[index].first != row) {
- std::string value;
-
- this->text_value_for_line(tc, row, value, flags);
- this->lss_line_size_cache[index].second = value.size();
- this->lss_line_size_cache[index].first = row;
- }
- return this->lss_line_size_cache[index].second;
- }
+ size_t text_size_for_line(textview_curses& tc, int row, line_flags_t flags);
void text_mark(const bookmark_type_t* bm, vis_line_t line, bool added);
@@ -482,10 +353,22 @@ public:
return this->get_bookmark_metadata(this->at(vl));
}
+ struct bookmark_metadata_context {
+ nonstd::optional<vis_line_t> bmc_current;
+ nonstd::optional<bookmark_metadata*> bmc_current_metadata;
+ nonstd::optional<vis_line_t> bmc_next_line;
+ };
+
+ bookmark_metadata_context get_bookmark_metadata_context(
+ vis_line_t vl,
+ bookmark_metadata::categories desired
+ = bookmark_metadata::categories::any) const;
+
nonstd::optional<bookmark_metadata*> find_bookmark_metadata(
- content_line_t cl);
+ content_line_t cl) const;
- nonstd::optional<bookmark_metadata*> find_bookmark_metadata(vis_line_t vl)
+ nonstd::optional<bookmark_metadata*> find_bookmark_metadata(
+ vis_line_t vl) const
{
return this->find_bookmark_metadata(this->at(vl));
}
@@ -504,17 +387,7 @@ public:
return this->lss_index.size() - this->lss_filtered_index.size();
}
- int get_filtered_count_for(size_t filter_index) const
- {
- int retval = 0;
-
- for (const auto& ld : this->lss_files) {
- retval += ld->ld_filter_state.lfo_filter_state
- .tfs_filter_hits[filter_index];
- }
-
- return retval;
- }
+ int get_filtered_count_for(size_t filter_index) const;
Result<void, lnav::console::user_message> set_sql_filter(
std::string stmt_str, sqlite3_stmt* stmt);
@@ -554,7 +427,7 @@ public:
return retval;
}
- logfile* find_file_ptr(content_line_t& line)
+ logfile* find_file_ptr(content_line_t& line) const
{
auto retval
= this->lss_files[line / MAX_LINES_PER_FILE]->get_file_ptr();
@@ -566,7 +439,7 @@ public:
logline* find_line(content_line_t line) const
{
logline* retval = nullptr;
- std::shared_ptr<logfile> lf = this->find(line);
+ auto lf = this->find_file_ptr(line);
if (lf != nullptr) {
auto ll_iter = lf->begin() + line;
@@ -618,14 +491,20 @@ public:
nonstd::optional<vis_line_t> find_from_content(content_line_t cl);
- nonstd::optional<struct timeval> time_for_row(vis_line_t row)
+ nonstd::optional<row_info> time_for_row(vis_line_t row)
{
- if (row < (ssize_t) this->text_line_count()) {
- return this->find_line(this->at(row))->get_timeval();
+ if (row >= 0_vl && row < (ssize_t) this->text_line_count()) {
+ auto cl = this->at(row);
+ return row_info{
+ this->find_line(cl)->get_timeval(),
+ (int64_t) cl,
+ };
}
return nonstd::nullopt;
}
+ nonstd::optional<vis_line_t> row_for(const row_info& ri);
+
nonstd::optional<vis_line_t> row_for_time(struct timeval time_bucket)
{
return this->find_from_time(time_bucket);
@@ -650,8 +529,6 @@ public:
return logline_window(*this, start_vl, end_vl);
}
- log_accel::direction_t get_line_accel_direction(vis_line_t vl);
-
/**
* Container for logfile references that keeps of how many lines in the
* logfile have been indexed.
@@ -812,6 +689,10 @@ public:
void text_crumbs_for_line(int line, std::vector<breadcrumb::crumb>& crumbs);
+ bool text_handle_mouse(textview_curses& tc,
+ const listview_curses::display_line_content_t&,
+ mouse_event& me);
+
Result<bool, lnav::console::user_message> eval_sql_filter(
sqlite3_stmt* stmt, iterator ld, logfile::const_iterator ll);
@@ -823,6 +704,8 @@ public:
void set_exec_context(exec_context* ec) { this->lss_exec_context = ec; }
+ exec_context* get_exec_context() const { return this->lss_exec_context; }
+
static const uint64_t MAX_CONTENT_LINES = (1ULL << 40) - 1;
static const uint64_t MAX_LINES_PER_FILE = 256 * 1024 * 1024;
static const uint64_t MAX_FILES = (MAX_CONTENT_LINES / MAX_LINES_PER_FILE);
@@ -834,25 +717,6 @@ public:
void quiesce();
-private:
- static const size_t LINE_SIZE_CACHE_SIZE = 512;
-
- enum {
- B_SCRUB,
- B_TIME_OFFSET,
- B_FILENAME,
- B_BASENAME,
- };
-
- enum {
- F_SCRUB = (1UL << B_SCRUB),
- F_TIME_OFFSET = (1UL << B_TIME_OFFSET),
- F_FILENAME = (1UL << B_FILENAME),
- F_BASENAME = (1UL << B_BASENAME),
-
- F_NAME_MASK = (F_FILENAME | F_BASENAME),
- };
-
struct __attribute__((__packed__)) indexed_content {
indexed_content() = default;
@@ -866,101 +730,39 @@ private:
uint64_t ic_value : 40;
};
- struct logline_cmp {
- logline_cmp(logfile_sub_source& lc) : llss_controller(lc) {}
-
- bool operator()(const content_line_t& lhs,
- const content_line_t& rhs) const
- {
- logline* ll_lhs = this->llss_controller.find_line(lhs);
- logline* ll_rhs = this->llss_controller.find_line(rhs);
-
- return (*ll_lhs) < (*ll_rhs);
- }
-
- bool operator()(const uint32_t& lhs, const uint32_t& rhs) const
- {
- content_line_t cl_lhs
- = (content_line_t) llss_controller.lss_index[lhs];
- content_line_t cl_rhs
- = (content_line_t) llss_controller.lss_index[rhs];
- logline* ll_lhs = this->llss_controller.find_line(cl_lhs);
- logline* ll_rhs = this->llss_controller.find_line(cl_rhs);
-
- return (*ll_lhs) < (*ll_rhs);
- }
-#if 0
- bool operator()(const indexed_content &lhs, const indexed_content &rhs)
- {
- logline *ll_lhs = this->llss_controller.find_line(lhs.ic_value);
- logline *ll_rhs = this->llss_controller.find_line(rhs.ic_value);
-
- return (*ll_lhs) < (*ll_rhs);
- }
-#endif
-
- bool operator()(const content_line_t& lhs, const time_t& rhs) const
- {
- logline* ll_lhs = this->llss_controller.find_line(lhs);
+ big_array<indexed_content> lss_index;
- return *ll_lhs < rhs;
- }
+ nonstd::optional<vis_line_t> row_for_anchor(const std::string& id);
- bool operator()(const content_line_t& lhs,
- const struct timeval& rhs) const
- {
- logline* ll_lhs = this->llss_controller.find_line(lhs);
+ nonstd::optional<vis_line_t> adjacent_anchor(vis_line_t vl, direction dir);
- return *ll_lhs < rhs;
- }
+ nonstd::optional<std::string> anchor_for_row(vis_line_t vl);
- logfile_sub_source& llss_controller;
- };
+ std::unordered_set<std::string> get_anchors();
- struct filtered_logline_cmp {
- filtered_logline_cmp(const logfile_sub_source& lc) : llss_controller(lc)
- {
- }
-
- bool operator()(const uint32_t& lhs, const uint32_t& rhs) const
- {
- content_line_t cl_lhs
- = (content_line_t) llss_controller.lss_index[lhs];
- content_line_t cl_rhs
- = (content_line_t) llss_controller.lss_index[rhs];
- logline* ll_lhs = this->llss_controller.find_line(cl_lhs);
- logline* ll_rhs = this->llss_controller.find_line(cl_rhs);
-
- return (*ll_lhs) < (*ll_rhs);
- }
+protected:
+ void text_accel_display_changed() { this->clear_line_size_cache(); }
- bool operator()(const uint32_t& lhs, const struct timeval& rhs) const
- {
- content_line_t cl_lhs
- = (content_line_t) llss_controller.lss_index[lhs];
- logline* ll_lhs = this->llss_controller.find_line(cl_lhs);
+ logline* text_accel_get_line(vis_line_t vl)
+ {
+ return this->find_line(this->at(vl));
+ }
- return (*ll_lhs) < rhs;
- }
+private:
+ static const size_t LINE_SIZE_CACHE_SIZE = 512;
- const logfile_sub_source& llss_controller;
+ enum {
+ B_SCRUB,
+ B_FILENAME,
+ B_BASENAME,
};
- /**
- * Functor for comparing the ld_file field of the logfile_data struct.
- */
- struct logfile_data_eq {
- explicit logfile_data_eq(std::shared_ptr<logfile> lf)
- : lde_file(std::move(lf))
- {
- }
-
- bool operator()(const std::unique_ptr<logfile_data>& ld) const
- {
- return this->lde_file == ld->get_file();
- }
+ enum {
+ F_SCRUB = (1UL << B_SCRUB),
+ F_FILENAME = (1UL << B_FILENAME),
+ F_BASENAME = (1UL << B_BASENAME),
- std::shared_ptr<logfile> lde_file;
+ F_NAME_MASK = (F_FILENAME | F_BASENAME),
};
void clear_line_size_cache()
@@ -977,7 +779,6 @@ private:
bool lss_force_rebuild{false};
std::vector<std::unique_ptr<logfile_data>> lss_files;
- big_array<indexed_content> lss_index;
std::vector<uint32_t> lss_filtered_index;
auto_mem<sqlite3_stmt> lss_preview_filter_stmt{sqlite3_finalize};
@@ -1016,6 +817,8 @@ private:
bool lss_in_value_for_line{false};
bool lss_line_meta_changed{false};
+
+ bool lss_indexing_in_progress{false};
};
#endif
diff --git a/src/md2attr_line.cc b/src/md2attr_line.cc
index a208616..7c58ae1 100644
--- a/src/md2attr_line.cc
+++ b/src/md2attr_line.cc
@@ -32,12 +32,38 @@
#include "base/attr_line.builder.hh"
#include "base/itertools.hh"
#include "base/lnav_log.hh"
+#include "base/map_util.hh"
+#include "document.sections.hh"
#include "pcrepp/pcre2pp.hh"
#include "pugixml/pugixml.hpp"
#include "readline_highlighters.hh"
+#include "text_format.hh"
+#include "textfile_highlighters.hh"
#include "view_curses.hh"
using namespace lnav::roles::literals;
+using namespace md4cpp::literals;
+
+static const std::map<string_fragment, text_format_t> CODE_NAME_TO_TEXT_FORMAT
+ = {
+ {"c"_frag, text_format_t::TF_C_LIKE},
+ {"c++"_frag, text_format_t::TF_C_LIKE},
+ {"java"_frag, text_format_t::TF_JAVA},
+ {"python"_frag, text_format_t::TF_PYTHON},
+ {"rust"_frag, text_format_t::TF_RUST},
+ {"toml"_frag, text_format_t::TF_TOML},
+ {"yaml"_frag, text_format_t::TF_YAML},
+ {"xml"_frag, text_format_t::TF_XML},
+};
+
+static highlight_map_t
+get_highlight_map()
+{
+ highlight_map_t retval;
+
+ setup_highlights(retval);
+ return retval;
+}
void
md2attr_line::flush_footnotes()
@@ -54,14 +80,17 @@ md2attr_line::flush_footnotes()
block_text.append("\n");
for (auto& foot : this->ml_footnotes) {
- block_text.append(lnav::string::attrs::preformatted(" "))
- .append("\u258c"_footnote_border)
- .append(lnav::roles::footnote_text(
- index < 10 && this->ml_footnotes.size() >= 10 ? " " : ""))
- .append(lnav::roles::footnote_text(
- fmt::format(FMT_STRING("[{}] - "), index)))
- .append(foot.pad_to(longest_foot))
- .append("\n");
+ auto footline
+ = attr_line_t(" ")
+ .append("\u258c"_footnote_border)
+ .append(lnav::roles::footnote_text(
+ index < 10 && this->ml_footnotes.size() >= 10 ? " " : ""))
+ .append(lnav::roles::footnote_text(
+ fmt::format(FMT_STRING("[{}] - "), index)))
+ .append(foot.pad_to(longest_foot))
+ .with_attr_for_all(SA_PREFORMATTED.value());
+
+ block_text.append(footline).append("\n");
index += 1;
}
this->ml_footnotes.clear();
@@ -191,9 +220,26 @@ md2attr_line::leave_block(const md4cpp::event_handler::block& bl)
auto lang_sf = string_fragment::from_bytes(code_detail->lang.text,
code_detail->lang.size);
- if (lang_sf == "lnav") {
+ auto tf_opt = lnav::map::find(CODE_NAME_TO_TEXT_FORMAT, lang_sf);
+ if (tf_opt) {
+ static const auto highlighters = get_highlight_map();
+
+ lnav::document::discover_structure(
+ block_text, line_range{0, -1}, tf_opt.value());
+ for (const auto& hl_pair : highlighters) {
+ const auto& hl = hl_pair.second;
+
+ if (!hl.h_text_formats.empty()
+ && hl.h_text_formats.count(tf_opt.value()) == 0)
+ {
+ continue;
+ }
+ hl.annotate(block_text, 0);
+ }
+ } else if (lang_sf == "lnav") {
readline_lnav_highlighter(block_text, block_text.length());
- } else if (lang_sf == "sql" || lang_sf == "sqlite") {
+ } else if (lang_sf == "sql" || lang_sf == "sqlite" || lang_sf == "prql")
+ {
readline_sqlite_highlighter(block_text, block_text.length());
} else if (lang_sf == "shell" || lang_sf == "bash") {
readline_shlex_highlighter(block_text, block_text.length());
@@ -421,6 +467,8 @@ md2attr_line::enter_span(const md4cpp::event_handler::span& sp)
if (sp.is<span_code>()) {
last_block.append(" ");
this->ml_code_depth += 1;
+ } else if (sp.is<MD_SPAN_IMG_DETAIL*>()) {
+ last_block.append(":framed_picture:"_emoji).append(" ");
}
return Ok();
}
@@ -438,7 +486,7 @@ md2attr_line::leave_span(const md4cpp::event_handler::span& sp)
};
last_block.with_attr({
lr,
- VC_ROLE.value(role_t::VCR_QUOTED_CODE),
+ VC_ROLE.value(role_t::VCR_INLINE_CODE),
});
last_block.with_attr({
lr,
@@ -476,7 +524,14 @@ md2attr_line::leave_span(const md4cpp::event_handler::span& sp)
} else if (sp.is<MD_SPAN_A_DETAIL*>()) {
auto* a_detail = sp.get<MD_SPAN_A_DETAIL*>();
auto href_str = std::string(a_detail->href.text, a_detail->href.size);
-
+ line_range lr{
+ static_cast<int>(this->ml_span_starts.back()),
+ static_cast<int>(last_block.length()),
+ };
+ last_block.with_attr({
+ lr,
+ VC_HYPERLINK.value(href_str),
+ });
this->append_url_footnote(href_str);
} else if (sp.is<MD_SPAN_IMG_DETAIL*>()) {
auto* img_detail = sp.get<MD_SPAN_IMG_DETAIL*>();
@@ -488,11 +543,291 @@ md2attr_line::leave_span(const md4cpp::event_handler::span& sp)
return Ok();
}
+enum class border_side {
+ left,
+ right,
+};
+
+enum class border_line_width {
+ thin,
+ medium,
+ thick,
+};
+
+static const char*
+left_border_string(border_line_width width)
+{
+ switch (width) {
+ case border_line_width::thin:
+ return "\u258F";
+ case border_line_width::medium:
+ return "\u258E";
+ case border_line_width::thick:
+ return "\u258C";
+ }
+}
+
+static const char*
+right_border_string(border_line_width width)
+{
+ switch (width) {
+ case border_line_width::thin:
+ return "\u2595";
+ case border_line_width::medium:
+ return "\u2595";
+ case border_line_width::thick:
+ return "\u2590";
+ }
+}
+
+static attr_line_t
+span_style_border(border_side side, const string_fragment& value)
+{
+ static const auto NAME_THIN = string_fragment::from_const("thin");
+ static const auto NAME_MEDIUM = string_fragment::from_const("medium");
+ static const auto NAME_THICK = string_fragment::from_const("thick");
+ static const auto NAME_SOLID = string_fragment::from_const("solid");
+ static const auto NAME_DASHED = string_fragment::from_const("dashed");
+ static const auto NAME_DOTTED = string_fragment::from_const("dotted");
+ static const auto& vc = view_colors::singleton();
+
+ text_attrs border_attrs;
+ auto border_sf = value;
+ auto width = border_line_width::thick;
+ auto ch = side == border_side::left ? left_border_string(width)
+ : right_border_string(width);
+
+ while (!border_sf.empty()) {
+ auto border_split_res
+ = border_sf.split_when(string_fragment::tag1{' '});
+ auto bval = border_split_res.first;
+
+ if (bval == NAME_THIN) {
+ width = border_line_width::thin;
+ } else if (bval == NAME_MEDIUM) {
+ width = border_line_width::medium;
+ } else if (bval == NAME_THICK) {
+ width = border_line_width::thick;
+ } else if (bval == NAME_DOTTED) {
+ ch = "\u250A";
+ } else if (bval == NAME_DASHED) {
+ ch = "\u254F";
+ } else if (bval == NAME_SOLID) {
+ ch = side == border_side::left ? left_border_string(width)
+ : right_border_string(width);
+ } else {
+ auto color_res = styling::color_unit::from_str(bval);
+ if (color_res.isErr()) {
+ log_error("invalid border color: %.*s -- %s",
+ bval.length(),
+ bval.data(),
+ color_res.unwrapErr().c_str());
+ } else {
+ border_attrs.ta_fg_color = vc.match_color(color_res.unwrap());
+ }
+ }
+ border_sf = border_split_res.second;
+ }
+ return attr_line_t(ch).with_attr_for_all(VC_STYLE.value(border_attrs));
+}
+
+attr_line_t
+md2attr_line::to_attr_line(const pugi::xml_node& doc)
+{
+ static const auto NAME_IMG = string_fragment::from_const("img");
+ static const auto NAME_SPAN = string_fragment::from_const("span");
+ static const auto NAME_PRE = string_fragment::from_const("pre");
+ static const auto NAME_FG = string_fragment::from_const("color");
+ static const auto NAME_BG = string_fragment::from_const("background-color");
+ static const auto NAME_FONT_WEIGHT
+ = string_fragment::from_const("font-weight");
+ static const auto NAME_TEXT_DECO
+ = string_fragment::from_const("text-decoration");
+ static const auto NAME_BORDER_LEFT
+ = string_fragment::from_const("border-left");
+ static const auto NAME_BORDER_RIGHT
+ = string_fragment::from_const("border-right");
+ static const auto& vc = view_colors::singleton();
+
+ attr_line_t retval;
+ if (doc.children().empty()) {
+ retval.append(doc.text().get());
+ }
+ for (const auto& child : doc.children()) {
+ if (child.name() == NAME_IMG) {
+ nonstd::optional<std::string> src_href;
+ std::string link_label;
+ auto img_src = child.attribute("src");
+ auto img_alt = child.attribute("alt");
+ if (img_alt) {
+ link_label = img_alt.value();
+ } else if (img_src) {
+ link_label = ghc::filesystem::path(img_src.value())
+ .filename()
+ .string();
+ } else {
+ link_label = "img";
+ }
+
+ if (img_src) {
+ auto src_value = std::string(img_src.value());
+ if (is_url(src_value)) {
+ src_href = src_value;
+ } else {
+ auto src_path = ghc::filesystem::path(src_value);
+ std::error_code ec;
+
+ if (src_path.is_relative() && this->ml_source_path) {
+ src_path = this->ml_source_path.value().parent_path()
+ / src_path;
+ }
+ auto canon_path = ghc::filesystem::canonical(src_path, ec);
+ if (!ec) {
+ src_path = canon_path;
+ }
+
+ src_href = fmt::format(FMT_STRING("file://{}"),
+ src_path.string());
+ }
+ }
+
+ if (src_href) {
+ retval.append(":framed_picture:"_emoji)
+ .append(" ")
+ .append(
+ lnav::string::attrs::href(link_label, src_href.value()))
+ .appendf(FMT_STRING("[{}]"), this->ml_footnotes.size() + 1);
+
+ auto href
+ = attr_line_t()
+ .append(lnav::roles::hyperlink(src_href.value()))
+ .append(" ");
+ href.with_attr_for_all(
+ VC_ROLE.value(role_t::VCR_FOOTNOTE_TEXT));
+ href.with_attr_for_all(SA_PREFORMATTED.value());
+ this->ml_footnotes.emplace_back(href);
+ } else {
+ retval.append(link_label);
+ }
+ } else if (child.name() == NAME_SPAN) {
+ nonstd::optional<attr_line_t> left_border;
+ nonstd::optional<attr_line_t> right_border;
+ auto styled_span = attr_line_t(child.text().get());
+
+ auto span_class = child.attribute("class");
+ if (span_class) {
+ auto cl_iter = vc.vc_class_to_role.find(span_class.value());
+
+ if (cl_iter == vc.vc_class_to_role.end()) {
+ log_error("unknown span class: %s", span_class.value());
+ } else {
+ styled_span.with_attr_for_all(cl_iter->second);
+ }
+ }
+ text_attrs ta;
+ auto span_style = child.attribute("style");
+ if (span_style) {
+ auto style_sf = string_fragment::from_c_str(span_style.value());
+
+ while (!style_sf.empty()) {
+ auto split_res
+ = style_sf.split_when(string_fragment::tag1{';'});
+ auto colon_split_res = split_res.first.split_pair(
+ string_fragment::tag1{':'});
+ if (colon_split_res) {
+ auto key = colon_split_res->first.trim();
+ auto value = colon_split_res->second.trim();
+
+ if (key == NAME_FG) {
+ auto color_res
+ = styling::color_unit::from_str(value);
+
+ if (color_res.isErr()) {
+ log_error("invalid color: %.*s -- %s",
+ value.length(),
+ value.data(),
+ color_res.unwrapErr().c_str());
+ } else {
+ ta.ta_fg_color
+ = vc.match_color(color_res.unwrap());
+ }
+ } else if (key == NAME_BG) {
+ auto color_res
+ = styling::color_unit::from_str(value);
+
+ if (color_res.isErr()) {
+ log_error(
+ "invalid background-color: %.*s -- %s",
+ value.length(),
+ value.data(),
+ color_res.unwrapErr().c_str());
+ } else {
+ ta.ta_bg_color
+ = vc.match_color(color_res.unwrap());
+ }
+ } else if (key == NAME_FONT_WEIGHT) {
+ if (value == "bold" || value == "bolder") {
+ ta.ta_attrs |= A_BOLD;
+ }
+ } else if (key == NAME_TEXT_DECO) {
+ auto deco_sf = value;
+
+ while (!deco_sf.empty()) {
+ auto deco_split_res = deco_sf.split_when(
+ string_fragment::tag1{' '});
+
+ if (deco_split_res.first.trim() == "underline")
+ {
+ ta.ta_attrs |= A_UNDERLINE;
+ }
+
+ deco_sf = deco_split_res.second;
+ }
+ } else if (key == NAME_BORDER_LEFT) {
+ left_border
+ = span_style_border(border_side::left, value);
+ } else if (key == NAME_BORDER_RIGHT) {
+ right_border
+ = span_style_border(border_side::right, value);
+ }
+ }
+ style_sf = split_res.second;
+ }
+ if (!ta.empty()) {
+ styled_span.with_attr_for_all(VC_STYLE.value(ta));
+ }
+ }
+ if (left_border) {
+ retval.append(left_border.value());
+ }
+ retval.append(styled_span);
+ if (right_border) {
+ retval.append(right_border.value());
+ }
+ } else if (child.name() == NAME_PRE) {
+ auto pre_al = attr_line_t();
+
+ for (const auto& sub : child.children()) {
+ auto child_al = this->to_attr_line(sub);
+ if (pre_al.empty() && startswith(child_al.get_string(), "\n")) {
+ child_al.erase(0, 1);
+ }
+ pre_al.append(child_al);
+ }
+ pre_al.with_attr_for_all(SA_PREFORMATTED.value());
+ retval.append(pre_al);
+ } else {
+ retval.append(child.text().get());
+ }
+ }
+
+ return retval;
+}
+
Result<void, std::string>
md2attr_line::text(MD_TEXTTYPE tt, const string_fragment& sf)
{
static const auto& entity_map = md4cpp::get_xml_entity_map();
- static const auto& vc = view_colors::singleton();
auto& last_block = this->ml_blocks.back();
@@ -516,41 +851,102 @@ md2attr_line::text(MD_TEXTTYPE tt, const string_fragment& sf)
break;
}
case MD_TEXT_HTML: {
+ auto last_block_start_length = last_block.length();
last_block.append(sf);
- if (sf.startswith("<span ")) {
- this->ml_html_span_starts.push_back(last_block.length()
- - sf.length());
- } else if (sf == "</span>" && !this->ml_html_span_starts.empty()) {
- std::string html_span = last_block.get_string().substr(
- this->ml_html_span_starts.back());
-
- pugi::xml_document doc;
-
- auto load_res = doc.load_string(html_span.c_str());
- if (load_res) {
- auto span = doc.child("span");
- if (span) {
- auto styled_span = attr_line_t(span.text().get());
-
- auto span_class = span.attribute("class");
- if (span_class) {
- auto cl_iter
- = vc.vc_class_to_role.find(span_class.value());
-
- if (cl_iter == vc.vc_class_to_role.end()) {
- log_error("unknown span class: %s",
- span_class.value());
- } else {
- styled_span.with_attr_for_all(cl_iter->second);
- }
- }
- last_block.erase(this->ml_html_span_starts.back());
- last_block.append(styled_span);
- }
+
+ struct open_tag {
+ std::string ot_name;
+ };
+ struct close_tag {
+ std::string ct_name;
+ };
+ struct empty_tag {};
+
+ mapbox::util::variant<open_tag, close_tag, empty_tag> tag{
+ mapbox::util::no_init{}};
+
+ if (sf.startswith("</")) {
+ tag = close_tag{
+ sf.substr(2)
+ .split_when(string_fragment::tag1{'>'})
+ .first.to_string(),
+ };
+ } else if (sf.startswith("<")) {
+ if (sf.endswith("/>")) {
+ tag = empty_tag{};
} else {
- log_error("failed to parse: %s", load_res.description());
+ tag = open_tag{
+ sf.substr(1)
+ .split_when(
+ [](char ch) { return ch == ' ' || ch == '>'; })
+ .first.to_string(),
+ };
}
- this->ml_html_span_starts.pop_back();
+ }
+
+ if (tag.valid()) {
+ tag.match(
+ [this, last_block_start_length](const open_tag& ot) {
+ if (!this->ml_html_starts.empty()) {
+ return;
+ }
+ this->ml_html_starts.emplace_back(
+ ot.ot_name, last_block_start_length);
+ },
+ [this, &last_block](const close_tag& ct) {
+ if (this->ml_html_starts.empty()) {
+ return;
+ }
+ if (this->ml_html_starts.back().first != ct.ct_name) {
+ return;
+ }
+
+ const auto html_span = last_block.get_string().substr(
+ this->ml_html_starts.back().second);
+
+ pugi::xml_document doc;
+
+ auto load_res = doc.load_string(html_span.c_str());
+ if (!load_res) {
+ log_error("XML parsing failure at %d: %s",
+ load_res.offset,
+ load_res.description());
+
+ auto sf = string_fragment::from_str(html_span);
+ auto error_line = sf.find_boundaries_around(
+ load_res.offset, string_fragment::tag1{'\n'});
+ log_error(" %.*s",
+ error_line.length(),
+ error_line.data());
+ } else {
+ last_block.erase(
+ this->ml_html_starts.back().second);
+ last_block.append(this->to_attr_line(doc));
+ }
+ this->ml_html_starts.pop_back();
+ },
+ [this, &sf, &last_block, last_block_start_length](
+ const empty_tag&) {
+ const auto html_span = sf.to_string();
+
+ pugi::xml_document doc;
+
+ auto load_res = doc.load_string(html_span.c_str());
+ if (!load_res) {
+ log_error("XML parsing failure at %d: %s",
+ load_res.offset,
+ load_res.description());
+
+ auto error_line = sf.find_boundaries_around(
+ load_res.offset, string_fragment::tag1{'\n'});
+ log_error(" %.*s",
+ error_line.length(),
+ error_line.data());
+ } else {
+ last_block.erase(last_block_start_length);
+ last_block.append(this->to_attr_line(doc));
+ }
+ });
}
break;
}
diff --git a/src/md2attr_line.hh b/src/md2attr_line.hh
index 9f1f977..212b3ac 100644
--- a/src/md2attr_line.hh
+++ b/src/md2attr_line.hh
@@ -34,6 +34,10 @@
#include "ghc/filesystem.hpp"
#include "md4cpp.hh"
+namespace pugi {
+class xml_node;
+}
+
class md2attr_line : public md4cpp::typed_event_handler<attr_line_t> {
public:
md2attr_line() { this->ml_blocks.resize(1); }
@@ -77,13 +81,14 @@ private:
void append_url_footnote(std::string href);
void flush_footnotes();
+ attr_line_t to_attr_line(const pugi::xml_node& doc);
nonstd::optional<ghc::filesystem::path> ml_source_path;
std::vector<attr_line_t> ml_blocks;
std::vector<list_block_t> ml_list_stack;
std::vector<table_t> ml_tables;
std::vector<size_t> ml_span_starts;
- std::vector<size_t> ml_html_span_starts;
+ std::vector<std::pair<std::string, size_t>> ml_html_starts;
std::vector<attr_line_t> ml_footnotes;
int32_t ml_code_depth{0};
};
diff --git a/src/md4cpp.cc b/src/md4cpp.cc
index 04ca900..24cb8e6 100644
--- a/src/md4cpp.cc
+++ b/src/md4cpp.cc
@@ -120,6 +120,38 @@ get_emoji_map()
return retval;
}
+std::string
+escape_html(const std::string& content)
+{
+ std::string retval;
+
+ retval.reserve(content.size());
+ for (auto ch : content) {
+ switch (ch) {
+ case '"':
+ retval.append("&quot;");
+ break;
+ case '\'':
+ retval.append("&apos;");
+ break;
+ case '<':
+ retval.append("&lt;");
+ break;
+ case '>':
+ retval.append("&gt;");
+ break;
+ case '&':
+ retval.append("&amp;");
+ break;
+ default:
+ retval.push_back(ch);
+ break;
+ }
+ }
+
+ return retval;
+}
+
struct parse_userdata {
event_handler& pu_handler;
std::string pu_error_msg;
diff --git a/src/md4cpp.hh b/src/md4cpp.hh
index 99d09e0..8014b0c 100644
--- a/src/md4cpp.hh
+++ b/src/md4cpp.hh
@@ -139,6 +139,23 @@ const xml_entity_map& get_xml_entity_map();
const emoji_map& get_emoji_map();
+std::string escape_html(const std::string& content);
+
+namespace literals {
+
+inline std::string operator"" _emoji(const char* str, std::size_t len)
+{
+ const auto& em = get_emoji_map();
+ const auto key = std::string(str, len);
+
+ auto iter = em.em_shortname2emoji.find(key);
+ assert(iter != em.em_shortname2emoji.end());
+
+ return iter->second.get().e_value;
+}
+
+} // namespace literals
+
} // namespace md4cpp
#endif
diff --git a/src/network-extension-functions.cc b/src/network-extension-functions.cc
index 6164a40..af5641a 100644
--- a/src/network-extension-functions.cc
+++ b/src/network-extension-functions.cc
@@ -141,6 +141,7 @@ network_extension_functions(struct FuncDef** basic_funcs,
help_text("gethostbyname",
"Get the IP address for the given hostname")
.sql_function()
+ .with_prql_path({"net", "gethostbyname"})
.with_parameter({"hostname", "The DNS hostname to lookup."})
.with_tags({"net"})
.with_example({
@@ -153,6 +154,7 @@ network_extension_functions(struct FuncDef** basic_funcs,
help_text("gethostbyaddr",
"Get the hostname for the given IP address")
.sql_function()
+ .with_prql_path({"net", "gethostbyaddr"})
.with_parameter({"hostname", "The IP address to lookup."})
.with_tags({"net"})
.with_example({
diff --git a/src/pcrepp/CMakeLists.txt b/src/pcrepp/CMakeLists.txt
index 1af8845..b85ca4c 100644
--- a/src/pcrepp/CMakeLists.txt
+++ b/src/pcrepp/CMakeLists.txt
@@ -1,6 +1,7 @@
add_library(pcrepp STATIC
../config.h.in
pcre2pp.hh
+ pcre2pp_fwd.hh
pcre2pp.cc)
target_include_directories(pcrepp PUBLIC . .. ../third-party/scnlib/include
diff --git a/src/pcrepp/Makefile.am b/src/pcrepp/Makefile.am
index 72e8319..d3f3feb 100644
--- a/src/pcrepp/Makefile.am
+++ b/src/pcrepp/Makefile.am
@@ -16,7 +16,8 @@ AM_CXXFLAGS = $(CODE_COVERAGE_CXXFLAGS)
noinst_LIBRARIES = libpcrepp.a
noinst_HEADERS = \
- pcre2pp.hh
+ pcre2pp.hh \
+ pcre2pp_fwd.hh
libpcrepp_a_SOURCES = \
pcre2pp.cc
diff --git a/src/pcrepp/pcre2pp.cc b/src/pcrepp/pcre2pp.cc
index c7429d1..1249876 100644
--- a/src/pcrepp/pcre2pp.cc
+++ b/src/pcrepp/pcre2pp.cc
@@ -32,23 +32,28 @@
#include "pcre2pp.hh"
#include "config.h"
+#include "ww898/cp_utf8.hpp"
namespace lnav {
namespace pcre2pp {
std::string
-quote(const char* unquoted)
+match_data::to_string() const
{
std::string retval;
- for (int lpc = 0; unquoted[lpc]; lpc++) {
- if (isalnum(unquoted[lpc]) || unquoted[lpc] == '_'
- || unquoted[lpc] & 0x80)
- {
- retval.push_back(unquoted[lpc]);
- } else {
- retval.push_back('\\');
- retval.push_back(unquoted[lpc]);
+ if (this->get_count() == 1) {
+ auto cap = (*this)[0];
+ retval.append(cap->data(), cap->length());
+ } else {
+ for (size_t lpc = 1; lpc < this->get_count(); lpc++) {
+ auto cap = (*this)[lpc];
+
+ if (!cap) {
+ continue;
+ }
+
+ retval.append(cap->data(), cap->length());
}
}
@@ -321,7 +326,7 @@ code::replace(string_fragment str, const char* repl) const
}
}
if (remaining.is_valid()) {
- retval.append(str.data(), remaining.sf_begin, std::string::npos);
+ retval.append(remaining.data(), 0, remaining.length());
}
return retval;
diff --git a/src/pcrepp/pcre2pp.hh b/src/pcrepp/pcre2pp.hh
index 59a2cf1..ae39871 100644
--- a/src/pcrepp/pcre2pp.hh
+++ b/src/pcrepp/pcre2pp.hh
@@ -46,14 +46,6 @@
namespace lnav {
namespace pcre2pp {
-std::string quote(const char* unquoted);
-
-inline std::string
-quote(const std::string& unquoted)
-{
- return quote(unquoted.c_str());
-}
-
class code;
struct capture_builder;
class matcher;
@@ -108,6 +100,8 @@ public:
uint32_t get_capacity() const { return this->md_ovector_count; }
+ std::string to_string() const;
+
private:
friend matcher;
friend code;
@@ -254,11 +248,20 @@ public:
template<typename T, std::size_t N>
static code from_const(const T (&str)[N], int options = 0)
{
- return from(string_fragment::from_const(str), options).unwrap();
+ auto res = from(string_fragment::from_const(str), options);
+
+ if (res.isErr()) {
+ fprintf(stderr, "failed to compile constant regex: %s\n", str);
+ fprintf(stderr, " %s\n", res.unwrapErr().get_message().c_str());
+ }
+
+ return res.unwrap();
}
const std::string& get_pattern() const { return this->p_pattern; }
+ std::string to_string() const { return this->p_pattern; }
+
named_captures get_named_captures() const;
const char* get_name_for_capture(size_t index) const;
diff --git a/src/pcrepp/pcre2pp_fwd.hh b/src/pcrepp/pcre2pp_fwd.hh
new file mode 100644
index 0000000..91a6122
--- /dev/null
+++ b/src/pcrepp/pcre2pp_fwd.hh
@@ -0,0 +1,41 @@
+/**
+ * Copyright (c) 2023, Timothy Stack
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of Timothy Stack nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ''AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef lnav_pcre2pp_fwd_hh
+#define lnav_pcre2pp_fwd_hh
+
+namespace lnav {
+namespace pcre2pp {
+
+class code;
+
+}
+} // namespace lnav
+
+#endif
diff --git a/src/piper.looper.cc b/src/piper.looper.cc
new file mode 100644
index 0000000..91cc19f
--- /dev/null
+++ b/src/piper.looper.cc
@@ -0,0 +1,485 @@
+/**
+ * Copyright (c) 2023, Timothy Stack
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of Timothy Stack nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ''AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <chrono>
+
+#include "piper.looper.hh"
+
+#include <arpa/inet.h>
+#include <poll.h>
+
+#include "base/fs_util.hh"
+#include "base/injector.hh"
+#include "base/time_util.hh"
+#include "config.h"
+#include "hasher.hh"
+#include "line_buffer.hh"
+#include "pcrepp/pcre2pp.hh"
+#include "piper.looper.cfg.hh"
+
+using namespace std::chrono_literals;
+
+static ssize_t
+write_timestamp(int fd, log_level_t level, off_t woff)
+{
+ char time_str[64];
+ struct timeval tv;
+
+ gettimeofday(&tv, nullptr);
+ auto fmt_res = fmt::format_to_n(time_str,
+ sizeof(time_str),
+ FMT_STRING("{: 12}.{:06}:{};"),
+ tv.tv_sec,
+ tv.tv_usec,
+ level_names[level][0]);
+
+ return pwrite(fd, time_str, fmt_res.size, woff);
+}
+
+extern char** environ;
+
+namespace lnav {
+namespace piper {
+
+const json_path_container header_env_handlers = {
+ yajlpp::pattern_property_handler("(?<name>.*)")
+ .with_synopsis("<name>")
+ .for_field(&lnav::piper::header::h_env),
+};
+
+const typed_json_path_container<lnav::piper::header> header_handlers = {
+ yajlpp::property_handler("name").for_field(&lnav::piper::header::h_name),
+ yajlpp::property_handler("ctime").for_field(&lnav::piper::header::h_ctime),
+ yajlpp::property_handler("cwd").for_field(&lnav::piper::header::h_cwd),
+ yajlpp::property_handler("env").with_children(header_env_handlers),
+};
+
+static std::map<std::string, std::string>
+environ_to_map()
+{
+ static const auto SENSITIVE_VARS
+ = lnav::pcre2pp::code::from_const(R"((?i)token|pass)");
+
+ std::map<std::string, std::string> retval;
+
+ for (size_t lpc = 0; environ[lpc]; lpc++) {
+ auto full_sf = string_fragment::from_c_str(environ[lpc]);
+ auto pair_opt = full_sf.split_pair(string_fragment::tag1{'='});
+
+ if (!pair_opt) {
+ continue;
+ }
+ if (SENSITIVE_VARS.find_in(pair_opt->first).ignore_error()) {
+ retval[pair_opt->first.to_string()] = "******";
+ } else {
+ retval[pair_opt->first.to_string()] = pair_opt->second.to_string();
+ }
+ }
+
+ return retval;
+}
+
+looper::looper(std::string name, auto_fd stdout_fd, auto_fd stderr_fd)
+ : l_name(std::move(name)), l_cwd(ghc::filesystem::current_path().string()),
+ l_env(environ_to_map()), l_stdout(std::move(stdout_fd)),
+ l_stderr(std::move(stderr_fd))
+{
+ size_t count = 0;
+ do {
+ this->l_out_dir
+ = storage_path()
+ / fmt::format(
+ FMT_STRING("p-{}-{:03}"),
+ hasher().update(getmstime()).update(l_name).to_string(),
+ count);
+ count += 1;
+ } while (ghc::filesystem::exists(this->l_out_dir));
+ ghc::filesystem::create_directories(this->l_out_dir);
+ this->l_future = std::async(std::launch::async, [this]() { this->loop(); });
+}
+
+looper::~looper()
+{
+ log_info("piper destructed, shutting down: %s", this->l_name.c_str());
+ this->l_looping = false;
+ this->l_future.wait();
+}
+
+enum class read_mode_t {
+ binary,
+ line,
+};
+
+void
+looper::loop()
+{
+ static const auto FORCE_MTIME_UPDATE_DURATION = 8h;
+
+ const auto& cfg = injector::get<const config&>();
+ struct pollfd pfd[2];
+ struct {
+ line_buffer lb;
+ file_range last_range;
+ pollfd* pfd{nullptr};
+ log_level_t cf_level{LEVEL_INFO};
+ read_mode_t cf_read_mode{read_mode_t::line};
+
+ void reset_pfd()
+ {
+ this->pfd->fd = this->lb.get_fd();
+ this->pfd->events = POLLIN;
+ this->pfd->revents = 0;
+ }
+ } captured_fds[2];
+ off_t woff = 0, last_woff = 0;
+ auto_fd outfd;
+ size_t rotate_count = 0;
+
+ log_info("starting loop to capture: %s (%d %d)",
+ this->l_name.c_str(),
+ this->l_stdout.get(),
+ this->l_stderr.get());
+ this->l_stdout.non_blocking();
+ captured_fds[0].lb.set_fd(this->l_stdout);
+ if (this->l_stderr.has_value()) {
+ this->l_stderr.non_blocking();
+ captured_fds[1].lb.set_fd(this->l_stderr);
+ }
+ captured_fds[1].cf_level = LEVEL_ERROR;
+ auto last_write = std::chrono::system_clock::now();
+ do {
+ static const auto TIMEOUT
+ = std::chrono::duration_cast<std::chrono::milliseconds>(1s).count();
+
+ size_t used_pfds = 0;
+ for (auto& cap : captured_fds) {
+ if (cap.lb.get_fd() != -1 && cap.lb.is_pipe()
+ && !cap.lb.is_pipe_closed())
+ {
+ cap.pfd = &pfd[used_pfds];
+ used_pfds += 1;
+ cap.reset_pfd();
+ } else {
+ cap.pfd = nullptr;
+ }
+ }
+
+ if (used_pfds == 0) {
+ log_info("inputs consumed, breaking loop: %s",
+ this->l_name.c_str());
+ this->l_looping = false;
+ break;
+ }
+
+ auto poll_rc = poll(pfd, used_pfds, TIMEOUT);
+ if (poll_rc == 0) {
+ // update the timestamp to keep the file alive from any
+ // cleanup processes
+ if (outfd.has_value()) {
+ auto now = std::chrono::system_clock::now();
+
+ if ((now - last_write) >= FORCE_MTIME_UPDATE_DURATION) {
+ last_write = now;
+ log_perror(futimes(outfd.get(), nullptr));
+ }
+ }
+ continue;
+ } else {
+ last_write = std::chrono::system_clock::now();
+ }
+ for (auto& cap : captured_fds) {
+ while (this->l_looping) {
+ if (cap.pfd == nullptr
+ || !(cap.pfd->revents & (POLLIN | POLLHUP)))
+ {
+ break;
+ }
+
+ if (cap.cf_read_mode == read_mode_t::binary) {
+ char buffer[8192];
+ auto read_rc
+ = read(cap.lb.get_fd(), buffer, sizeof(buffer));
+
+ if (read_rc < 0) {
+ if (errno == EAGAIN) {
+ break;
+ }
+ log_error("failed to read next chunk: %s -- %s",
+ this->l_name.c_str(),
+ strerror(errno));
+ this->l_looping = false;
+ } else if (read_rc == 0) {
+ this->l_looping = false;
+ } else {
+ auto rc = write(outfd.get(), buffer, read_rc);
+ if (rc != read_rc) {
+ log_error(
+ "failed to write to capture file: %s -- %s",
+ this->l_name.c_str(),
+ strerror(errno));
+ }
+ }
+ continue;
+ }
+
+ auto load_result = cap.lb.load_next_line(cap.last_range);
+
+ if (load_result.isErr()) {
+ log_error("failed to load next line: %s -- %s",
+ this->l_name.c_str(),
+ load_result.unwrapErr().c_str());
+ this->l_looping = false;
+ break;
+ }
+
+ auto li = load_result.unwrap();
+
+ if (cap.last_range.fr_offset == 0 && !cap.lb.is_header_utf8()) {
+ log_info("switching capture to binary mode: %s",
+ this->l_name.c_str());
+ cap.cf_read_mode = read_mode_t::binary;
+
+ auto out_path = this->l_out_dir / "out.0";
+ log_info("creating binary capture file: %s -- %s",
+ this->l_name.c_str(),
+ out_path.c_str());
+ auto create_res = lnav::filesystem::create_file(
+ out_path, O_WRONLY | O_CLOEXEC | O_TRUNC, 0600);
+ if (create_res.isErr()) {
+ log_error("unable to open capture file: %s -- %s",
+ this->l_name.c_str(),
+ create_res.unwrapErr().c_str());
+ break;
+ }
+
+ auto hdr_path = this->l_out_dir / ".header";
+ auto hdr = header{
+ current_timeval(),
+ this->l_name,
+ this->l_cwd,
+ this->l_env,
+ };
+ auto write_hdr_res = lnav::filesystem::write_file(
+ hdr_path, header_handlers.to_string(hdr));
+ if (write_hdr_res.isErr()) {
+ log_error("unable to write header file: %s -- %s",
+ hdr_path.c_str(),
+ write_hdr_res.unwrapErr().c_str());
+ break;
+ }
+
+ outfd = create_res.unwrap();
+ auto header_avail = cap.lb.get_available();
+ auto read_res = cap.lb.read_range(header_avail);
+ if (read_res.isOk()) {
+ auto sbr = read_res.unwrap();
+ write(outfd.get(), sbr.get_data(), sbr.length());
+ } else {
+ log_error("failed to get header data: %s -- %s",
+ this->l_name.c_str(),
+ read_res.unwrapErr().c_str());
+ }
+ continue;
+ }
+
+ if (li.li_partial && !cap.lb.is_pipe_closed()) {
+ break;
+ }
+
+ if (li.li_file_range.empty()) {
+ break;
+ }
+
+ auto read_result = cap.lb.read_range(li.li_file_range);
+
+ if (read_result.isErr()) {
+ log_error("failed to read next line: %s -- %s",
+ this->l_name.c_str(),
+ read_result.unwrapErr().c_str());
+ this->l_looping = false;
+ break;
+ }
+
+ auto sbr = read_result.unwrap();
+
+ if (woff > last_woff && woff >= cfg.c_max_size) {
+ log_info(
+ "capture file has reached max size, rotating: %s -- "
+ "%lld",
+ this->l_name.c_str(),
+ woff);
+ outfd.reset();
+ }
+
+ if (!outfd.has_value()) {
+ auto out_path = this->l_out_dir
+ / fmt::format(FMT_STRING("out.{}"),
+ rotate_count % cfg.c_rotations);
+ log_info("creating capturing file: %s -- %s",
+ this->l_name.c_str(),
+ out_path.c_str());
+ auto create_res = lnav::filesystem::create_file(
+ out_path, O_WRONLY | O_CLOEXEC | O_TRUNC, 0600);
+ if (create_res.isErr()) {
+ log_error("unable to open capture file: %s -- %s",
+ this->l_name.c_str(),
+ create_res.unwrapErr().c_str());
+ break;
+ }
+
+ outfd = create_res.unwrap();
+ rotate_count += 1;
+
+ auto hdr = header{
+ current_timeval(),
+ this->l_name,
+ this->l_cwd,
+ this->l_env,
+ };
+
+ woff = 0;
+ auto hdr_str = header_handlers.to_string(hdr);
+ uint32_t meta_size = htonl(hdr_str.length());
+ auto prc = write(
+ outfd.get(), HEADER_MAGIC, sizeof(HEADER_MAGIC));
+ if (prc < sizeof(HEADER_MAGIC)) {
+ log_error("unable to write file header: %s -- %s",
+ this->l_name.c_str(),
+ strerror(errno));
+ break;
+ }
+ woff += prc;
+ prc = write(outfd.get(), &meta_size, sizeof(meta_size));
+ if (prc < sizeof(meta_size)) {
+ log_error("unable to write file header: %s -- %s",
+ this->l_name.c_str(),
+ strerror(errno));
+ break;
+ }
+ woff += prc;
+ prc = write(outfd.get(), hdr_str.c_str(), hdr_str.size());
+ if (prc < hdr_str.size()) {
+ log_error("unable to write file header: %s -- %s",
+ this->l_name.c_str(),
+ strerror(errno));
+ break;
+ }
+ woff += prc;
+ }
+
+ ssize_t wrc;
+
+ last_woff = woff;
+ wrc = write_timestamp(outfd.get(), cap.cf_level, woff);
+ if (wrc == -1) {
+ log_error("unable to write timestamp: %s -- %s",
+ this->l_name.c_str(),
+ strerror(errno));
+ this->l_looping = false;
+ break;
+ }
+ woff += wrc;
+
+ /* Need to do pwrite here since the fd is used by the main
+ * lnav process as well.
+ */
+ wrc = pwrite(outfd.get(), sbr.get_data(), sbr.length(), woff);
+ if (wrc == -1) {
+ log_error("unable to write captured data: %s -- %s",
+ this->l_name.c_str(),
+ strerror(errno));
+ this->l_looping = false;
+ break;
+ }
+ woff += wrc;
+
+ cap.last_range = li.li_file_range;
+ if (li.li_partial && sbr.get_data()[sbr.length() - 1] != '\n'
+ && (cap.last_range.next_offset() != cap.lb.get_file_size()))
+ {
+ woff = last_woff;
+ }
+ }
+ }
+ } while (this->l_looping);
+
+ log_info("exiting loop to capture: %s", this->l_name.c_str());
+}
+
+Result<handle<state::running>, std::string>
+create_looper(std::string name, auto_fd stdout_fd, auto_fd stderr_fd)
+{
+ return Ok(handle<state::running>(std::make_shared<looper>(
+ name, std::move(stdout_fd), std::move(stderr_fd))));
+}
+
+void
+cleanup()
+{
+ (void) std::async(std::launch::async, []() {
+ const auto& cfg = injector::get<const config&>();
+ auto now = std::chrono::system_clock::now();
+ auto cache_path = storage_path();
+ std::vector<ghc::filesystem::path> to_remove;
+
+ for (const auto& cache_subdir :
+ ghc::filesystem::directory_iterator(cache_path))
+ {
+ auto mtime = ghc::filesystem::last_write_time(cache_subdir.path());
+ auto exp_time = mtime + cfg.c_ttl;
+ if (now < exp_time) {
+ continue;
+ }
+
+ bool is_recent = false;
+
+ for (const auto& entry :
+ ghc::filesystem::directory_iterator(cache_subdir))
+ {
+ auto mtime = ghc::filesystem::last_write_time(entry.path());
+ auto exp_time = mtime + cfg.c_ttl;
+ if (now < exp_time) {
+ is_recent = true;
+ break;
+ }
+ }
+ if (!is_recent) {
+ to_remove.emplace_back(cache_subdir);
+ }
+ }
+
+ for (auto& entry : to_remove) {
+ log_debug("removing piper directory: %s", entry.c_str());
+ ghc::filesystem::remove_all(entry);
+ }
+ });
+}
+
+} // namespace piper
+} // namespace lnav
diff --git a/src/piper.looper.cfg.hh b/src/piper.looper.cfg.hh
new file mode 100644
index 0000000..b974028
--- /dev/null
+++ b/src/piper.looper.cfg.hh
@@ -0,0 +1,47 @@
+/**
+ * Copyright (c) 2023, Timothy Stack
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of Timothy Stack nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ''AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef piper_looper_cfg_hh
+#define piper_looper_cfg_hh
+
+#include <stdint.h>
+
+namespace lnav {
+namespace piper {
+
+struct config {
+ uint64_t c_max_size{10ULL * 1024ULL * 1024ULL};
+ uint32_t c_rotations{4};
+ std::chrono::seconds c_ttl{std::chrono::hours(48)};
+};
+
+} // namespace piper
+} // namespace lnav
+
+#endif
diff --git a/src/piper.looper.hh b/src/piper.looper.hh
new file mode 100644
index 0000000..fae45e0
--- /dev/null
+++ b/src/piper.looper.hh
@@ -0,0 +1,152 @@
+/**
+ * Copyright (c) 2023, Timothy Stack
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of Timothy Stack nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ''AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef piper_looper_hh
+#define piper_looper_hh
+
+#include <future>
+#include <memory>
+#include <string>
+
+#include "base/auto_fd.hh"
+#include "base/piper.file.hh"
+#include "base/result.h"
+#include "ghc/filesystem.hpp"
+#include "yajlpp/yajlpp_def.hh"
+
+namespace lnav {
+namespace piper {
+
+enum class state {
+ running,
+ finished,
+};
+
+class looper {
+public:
+ looper(std::string name, auto_fd stdout_fd, auto_fd stderr_fd);
+
+ ~looper();
+
+ std::string get_name() const { return this->l_name; }
+
+ ghc::filesystem::path get_out_dir() const { return this->l_out_dir; }
+
+ ghc::filesystem::path get_out_pattern() const
+ {
+ return this->l_out_dir / "out.*";
+ }
+
+ std::string get_url() const
+ {
+ return fmt::format(FMT_STRING("piper://{}"),
+ this->l_out_dir.filename().string());
+ }
+
+ bool is_finished() const
+ {
+ return this->l_future.wait_for(std::chrono::seconds(0))
+ == std::future_status::ready;
+ }
+
+ size_t consume_finished()
+ {
+ if (!this->is_finished()) {
+ return 0;
+ }
+
+ if (this->l_finished.fetch_or(1) == 0) {
+ return 1;
+ }
+ return 0;
+ }
+
+private:
+ void loop();
+
+ std::atomic<bool> l_looping{true};
+ const std::string l_name;
+ const std::string l_cwd;
+ const std::map<std::string, std::string> l_env;
+ ghc::filesystem::path l_out_dir;
+ auto_fd l_stdout;
+ auto_fd l_stderr;
+ std::future<void> l_future;
+ std::atomic<int> l_finished{0};
+};
+
+template<state LooperState>
+class handle {
+public:
+ explicit handle(std::shared_ptr<looper> looper)
+ : h_looper(std::move(looper))
+ {
+ }
+
+ std::string get_name() const { return this->h_looper->get_name(); }
+
+ ghc::filesystem::path get_out_dir() const
+ {
+ return this->h_looper->get_out_dir();
+ }
+
+ ghc::filesystem::path get_out_pattern() const
+ {
+ return this->h_looper->get_out_pattern();
+ }
+
+ std::string get_url() const { return this->h_looper->get_url(); }
+
+ bool is_finished() const { return this->h_looper->is_finished(); }
+
+ size_t consume_finished() { return this->h_looper->consume_finished(); }
+
+ bool operator==(const handle& other) const
+ {
+ return this->h_looper.get() == other.h_looper.get();
+ }
+
+private:
+ std::shared_ptr<looper> h_looper;
+};
+
+extern const typed_json_path_container<lnav::piper::header> header_handlers;
+
+using running_handle = handle<state::running>;
+
+Result<handle<state::running>, std::string> create_looper(std::string name,
+ auto_fd stdout_fd,
+ auto_fd stderr_fd);
+
+void cleanup();
+
+} // namespace piper
+} // namespace lnav
+
+#endif
diff --git a/src/piper_proc.cc b/src/piper_proc.cc
deleted file mode 100644
index 396f175..0000000
--- a/src/piper_proc.cc
+++ /dev/null
@@ -1,237 +0,0 @@
-/**
- * Copyright (c) 2007-2012, Timothy Stack
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * * Neither the name of Timothy Stack nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ''AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @file piper_proc.cc
- */
-
-#include "piper_proc.hh"
-
-#include <errno.h>
-#include <fcntl.h>
-#include <poll.h>
-#include <signal.h>
-#include <stdio.h>
-#include <string.h>
-#include <sys/time.h>
-#include <sys/wait.h>
-#include <unistd.h>
-
-#include "base/fs_util.hh"
-#include "base/lnav_log.hh"
-#include "config.h"
-#include "line_buffer.hh"
-
-using namespace std::chrono_literals;
-
-static const char* STDIN_EOF_MSG = "---- END-OF-STDIN ----";
-
-static ssize_t
-write_timestamp(int fd, off_t woff)
-{
- char time_str[64];
- struct timeval tv;
- char ms_str[10];
-
- gettimeofday(&tv, nullptr);
- strftime(time_str, sizeof(time_str), "%FT%T", localtime(&tv.tv_sec));
- snprintf(ms_str, sizeof(ms_str), ".%03d", (int) (tv.tv_usec / 1000));
- strcat(time_str, ms_str);
- strcat(time_str, " ");
- return pwrite(fd, time_str, strlen(time_str), woff);
-}
-
-piper_proc::piper_proc(auto_fd pipefd, bool timestamp, auto_fd filefd)
- : pp_fd(std::move(filefd)), pp_child(-1)
-{
- require(pipefd.get() >= 0);
- require(this->pp_fd.get() >= 0);
-
- log_perror(fcntl(this->pp_fd.get(), F_SETFD, FD_CLOEXEC));
-
- this->pp_child = fork();
- switch (this->pp_child) {
- case -1:
- throw error(errno);
-
- case 0: {
- line_buffer lb;
- off_t woff = 0, last_woff = 0;
- file_range last_range;
-
- auto open_res = lnav::filesystem::open_file("/dev/null", O_RDWR);
- if (open_res.isErr()) {
- fprintf(stderr,
- "unable to open /dev/null: %s\n",
- open_res.unwrapErr().c_str());
- exit(EXIT_FAILURE);
- }
- auto nullfd = open_res.unwrap();
- if (pipefd != STDIN_FILENO) {
- dup2(nullfd, STDIN_FILENO);
- }
- dup2(nullfd, STDOUT_FILENO);
- for (int fd_to_close = 0; fd_to_close < 1024; fd_to_close++) {
- int flags;
-
- if (fd_to_close == this->pp_fd.get()) {
- continue;
- }
- if ((flags = fcntl(fd_to_close, F_GETFD)) == -1) {
- continue;
- }
- if (flags & FD_CLOEXEC) {
- close(fd_to_close);
- }
- }
- log_perror(fcntl(pipefd.get(), F_SETFL, O_NONBLOCK));
- lb.set_fd(pipefd);
- do {
- static const auto TIMEOUT
- = std::chrono::duration_cast<std::chrono::milliseconds>(1s)
- .count();
- struct pollfd pfd = {lb.get_fd(), POLLIN, 0};
-
- auto poll_rc = poll(&pfd, 1, TIMEOUT);
- if (poll_rc == 0) {
- // update the timestamp to keep the file alive from any
- // cleanup processes
- log_perror(futimes(this->pp_fd.get(), nullptr));
- continue;
- }
- while (true) {
- auto load_result = lb.load_next_line(last_range);
-
- if (load_result.isErr()) {
- break;
- }
-
- auto li = load_result.unwrap();
-
- if (li.li_partial && !lb.is_pipe_closed()) {
- break;
- }
-
- if (li.li_file_range.empty()) {
- break;
- }
-
- auto read_result = lb.read_range(li.li_file_range);
-
- if (read_result.isErr()) {
- break;
- }
-
- auto sbr = read_result.unwrap();
-
- ssize_t wrc;
-
- last_woff = woff;
- if (timestamp) {
- wrc = write_timestamp(this->pp_fd, woff);
- if (wrc == -1) {
- perror("Unable to write to output file for stdin");
- break;
- }
- woff += wrc;
- }
-
- /* Need to do pwrite here since the fd is used by the main
- * lnav process as well.
- */
- wrc = pwrite(
- this->pp_fd, sbr.get_data(), sbr.length(), woff);
- if (wrc == -1) {
- perror("Unable to write to output file for stdin");
- break;
- }
- woff += wrc;
-
- last_range = li.li_file_range;
- if (li.li_partial
- && sbr.get_data()[sbr.length() - 1] != '\n'
- && (last_range.next_offset() != lb.get_file_size()))
- {
- woff = last_woff;
- }
- }
- } while (lb.is_pipe() && !lb.is_pipe_closed());
-
- if (timestamp) {
- ssize_t wrc;
-
- wrc = write_timestamp(this->pp_fd, woff);
- if (wrc == -1) {
- perror("Unable to write to output file for stdin");
- break;
- }
- woff += wrc;
- wrc = pwrite(
- this->pp_fd, STDIN_EOF_MSG, strlen(STDIN_EOF_MSG), woff);
- if (wrc == -1) {
- perror("Unable to write to output file for stdin");
- break;
- }
- }
- }
- _exit(0);
- break;
-
- default:
- break;
- }
-}
-
-bool
-piper_proc::has_exited()
-{
- if (this->pp_child > 0) {
- int rc, status;
-
- rc = waitpid(this->pp_child, &status, WNOHANG);
- if (rc == -1 || rc == 0) {
- return false;
- }
- this->pp_child = -1;
- }
-
- return true;
-}
-
-piper_proc::~piper_proc()
-{
- if (this->pp_child > 0) {
- int status;
-
- kill(this->pp_child, SIGTERM);
- while (waitpid(this->pp_child, &status, 0) < 0 && (errno == EINTR)) {
- ;
- }
-
- this->pp_child = -1;
- }
-}
diff --git a/src/plain_text_source.cc b/src/plain_text_source.cc
index 632a541..608c623 100644
--- a/src/plain_text_source.cc
+++ b/src/plain_text_source.cc
@@ -31,6 +31,7 @@
#include "base/itertools.hh"
#include "config.h"
+#include "scn/scn.h"
static std::vector<plain_text_source::text_line>
to_text_line(const std::vector<attr_line_t>& lines)
@@ -79,14 +80,44 @@ plain_text_source::replace_with(const attr_line_t& text_lines)
{
this->tds_lines.clear();
this->tds_doc_sections = lnav::document::discover_metadata(text_lines);
+ file_off_t off = 0;
+ auto lines = text_lines.split_lines();
+ while (!lines.empty() && lines.back().empty()) {
+ lines.pop_back();
+ }
+ for (auto& line : lines) {
+ auto line_len = line.length() + 1;
+ this->tds_lines.emplace_back(off, std::move(line));
+ off += line_len;
+ }
+ this->tds_longest_line = this->compute_longest_line();
+ if (this->tss_view != nullptr) {
+ this->tss_view->set_needs_update();
+ }
+ return *this;
+}
+plain_text_source&
+plain_text_source::replace_with_mutable(attr_line_t& text_lines,
+ text_format_t tf)
+{
+ this->tds_lines.clear();
+ this->tds_doc_sections
+ = lnav::document::discover_structure(text_lines, line_range{0, -1}, tf);
file_off_t off = 0;
- for (auto& line : text_lines.split_lines()) {
+ auto lines = text_lines.split_lines();
+ while (!lines.empty() && lines.back().empty()) {
+ lines.pop_back();
+ }
+ for (auto& line : lines) {
auto line_len = line.length() + 1;
this->tds_lines.emplace_back(off, std::move(line));
off += line_len;
}
this->tds_longest_line = this->compute_longest_line();
+ if (this->tss_view != nullptr) {
+ this->tss_view->set_needs_update();
+ }
return *this;
}
@@ -99,6 +130,24 @@ plain_text_source::replace_with(const std::vector<std::string>& text_lines)
off += str.length() + 1;
}
this->tds_longest_line = this->compute_longest_line();
+ if (this->tss_view != nullptr) {
+ this->tss_view->set_needs_update();
+ }
+ return *this;
+}
+
+plain_text_source&
+plain_text_source::replace_with(const std::vector<attr_line_t>& text_lines)
+{
+ file_off_t off = 0;
+ for (const auto& al : text_lines) {
+ this->tds_lines.emplace_back(off, al);
+ off += al.length() + 1;
+ }
+ this->tds_longest_line = this->compute_longest_line();
+ if (this->tss_view != nullptr) {
+ this->tss_view->set_needs_update();
+ }
return *this;
}
@@ -108,6 +157,9 @@ plain_text_source::clear()
this->tds_lines.clear();
this->tds_longest_line = 0;
this->tds_text_format = text_format_t::TF_UNKNOWN;
+ if (this->tss_view != nullptr) {
+ this->tss_view->set_needs_update();
+ }
}
plain_text_source&
@@ -116,6 +168,9 @@ plain_text_source::truncate_to(size_t max_lines)
while (this->tds_lines.size() > max_lines) {
this->tds_lines.pop_back();
}
+ if (this->tss_view != nullptr) {
+ this->tss_view->set_needs_update();
+ }
return *this;
}
@@ -132,6 +187,18 @@ plain_text_source::text_value_for_line(textview_curses& tc,
text_sub_source::line_flags_t flags)
{
value_out = this->tds_lines[row].tl_value.get_string();
+ this->tds_line_indent_size = 0;
+ for (const auto& ch : value_out) {
+ if (ch == ' ') {
+ this->tds_line_indent_size += 1;
+ } else if (ch == '\t') {
+ do {
+ this->tds_line_indent_size += 1;
+ } while (this->tds_line_indent_size % 8);
+ } else {
+ break;
+ }
+ }
}
void
@@ -146,6 +213,18 @@ plain_text_source::text_attrs_for_line(textview_curses& tc,
value_out.emplace_back(line_range{0, -1},
VC_STYLE.value(text_attrs{A_REVERSE}));
}
+ for (const auto& indent : this->tds_doc_sections.m_indents) {
+ if (indent < this->tds_line_indent_size) {
+ auto guide_lr = line_range{
+ (int) indent,
+ (int) (indent + 1),
+ line_range::unit::codepoint,
+ };
+ value_out.emplace_back(guide_lr,
+ VC_BLOCK_ELEM.value(block_elem_t{
+ L'\u258f', role_t::VCR_INDENT_GUIDE}));
+ }
+ }
}
size_t
@@ -247,7 +326,11 @@ plain_text_source::text_crumbs_for_line(int line,
}
this->line_for_offset(sib_iter->second->hn_start) |
[this](const auto new_top) {
- this->tss_view->set_top(new_top);
+ this->tss_view->set_selection(new_top);
+ if (this->tss_view->is_selectable()) {
+ this->tss_view->set_top(new_top - 2_vl,
+ false);
+ }
};
},
[this, parent_node](size_t index) {
@@ -258,6 +341,10 @@ plain_text_source::text_crumbs_for_line(int line,
this->line_for_offset(sib->hn_start) |
[this](const auto new_top) {
this->tss_view->set_selection(new_top);
+ if (this->tss_view->is_selectable()) {
+ this->tss_view->set_top(new_top - 2_vl,
+ false);
+ }
};
});
});
@@ -284,7 +371,7 @@ plain_text_source::text_crumbs_for_line(int line,
if (child_iter != curr_node->hn_named_children.end()) {
this->line_for_offset(child_iter->second->hn_start) |
[this](const auto new_top) {
- this->tss_view->set_top(new_top);
+ this->tss_view->set_selection(new_top);
};
}
},
@@ -292,7 +379,7 @@ plain_text_source::text_crumbs_for_line(int line,
auto* child = curr_node->hn_children[index].get();
this->line_for_offset(child->hn_start) |
[this](const auto new_top) {
- this->tss_view->set_top(new_top);
+ this->tss_view->set_selection(new_top);
};
});
};
@@ -313,16 +400,47 @@ plain_text_source::row_for_anchor(const std::string& id)
return retval;
}
+ const auto& meta = this->tds_doc_sections;
+
+ auto is_ptr = startswith(id, "#/");
+ if (is_ptr) {
+ auto hier_sf = string_fragment::from_str(id).consume_n(2).value();
+ std::vector<lnav::document::section_key_t> path;
+
+ while (!hier_sf.empty()) {
+ auto comp_pair = hier_sf.split_when(string_fragment::tag1{'/'});
+ auto scan_res
+ = scn::scan_value<int64_t>(comp_pair.first.to_string_view());
+ if (scan_res && scan_res.empty()) {
+ path.emplace_back(scan_res.value());
+ } else {
+ path.emplace_back(json_ptr::decode(comp_pair.first));
+ }
+ hier_sf = comp_pair.second;
+ }
+
+ auto lookup_res = lnav::document::hier_node::lookup_path(
+ meta.m_sections_root.get(), path);
+ if (lookup_res) {
+ retval = this->line_for_offset(lookup_res.value()->hn_start);
+ }
+
+ return retval;
+ }
+
lnav::document::hier_node::depth_first(
- this->tds_doc_sections.m_sections_root.get(),
+ meta.m_sections_root.get(),
[this, &id, &retval](const lnav::document::hier_node* node) {
for (const auto& child_pair : node->hn_named_children) {
- auto child_anchor
+ const auto& child_anchor
= text_anchors::to_anchor_string(child_pair.first);
- if (child_anchor == id) {
- retval = this->line_for_offset(child_pair.second->hn_start);
+ if (child_anchor != id) {
+ continue;
}
+
+ retval = this->line_for_offset(child_pair.second->hn_start);
+ break;
}
});
@@ -358,16 +476,130 @@ plain_text_source::anchor_for_row(vis_line_t vl)
}
const auto& tl = this->tds_lines[vl];
+ auto& md = this->tds_doc_sections;
+ auto path_for_line = md.path_for_range(
+ tl.tl_offset, tl.tl_offset + tl.tl_value.al_string.length());
- this->tds_doc_sections.m_sections_tree.visit_overlapping(
- tl.tl_offset, [&retval](const lnav::document::section_interval_t& iv) {
- retval = iv.value.match(
- [](const std::string& str) {
- return nonstd::make_optional(
- text_anchors::to_anchor_string(str));
- },
- [](size_t) { return nonstd::nullopt; });
- });
+ if (path_for_line.empty()) {
+ return nonstd::nullopt;
+ }
- return retval;
+ if ((path_for_line.size() == 1
+ || this->tds_text_format == text_format_t::TF_MARKDOWN)
+ && path_for_line.back().is<std::string>())
+ {
+ return text_anchors::to_anchor_string(
+ path_for_line.back().get<std::string>());
+ }
+
+ auto comps = path_for_line | lnav::itertools::map([](const auto& elem) {
+ return elem.match(
+ [](const std::string& str) {
+ return json_ptr::encode_str(str);
+ },
+ [](size_t index) { return fmt::to_string(index); });
+ });
+
+ return fmt::format(FMT_STRING("#/{}"),
+ fmt::join(comps.begin(), comps.end(), "/"));
+}
+
+nonstd::optional<vis_line_t>
+plain_text_source::adjacent_anchor(vis_line_t vl, text_anchors::direction dir)
+{
+ if (vl > this->tds_lines.size()
+ || this->tds_doc_sections.m_sections_root == nullptr)
+ {
+ return nonstd::nullopt;
+ }
+
+ const auto& tl = this->tds_lines[vl];
+ auto path_for_line = this->tds_doc_sections.path_for_range(
+ tl.tl_offset, tl.tl_offset + tl.tl_value.al_string.length());
+
+ auto& md = this->tds_doc_sections;
+ if (path_for_line.empty()) {
+ auto neighbors_res = md.m_sections_root->line_neighbors(vl);
+ if (!neighbors_res) {
+ return nonstd::nullopt;
+ }
+
+ switch (dir) {
+ case text_anchors::direction::prev: {
+ if (neighbors_res->cnr_previous) {
+ return this->line_for_offset(
+ neighbors_res->cnr_previous.value()->hn_start);
+ }
+ break;
+ }
+ case text_anchors::direction::next: {
+ if (neighbors_res->cnr_next) {
+ return this->line_for_offset(
+ neighbors_res->cnr_next.value()->hn_start);
+ } else if (!md.m_sections_root->hn_children.empty()) {
+ return this->line_for_offset(
+ md.m_sections_root->hn_children[0]->hn_start);
+ }
+ break;
+ }
+ }
+ return nonstd::nullopt;
+ }
+
+ auto last_key = path_for_line.back();
+ path_for_line.pop_back();
+
+ auto parent_opt = lnav::document::hier_node::lookup_path(
+ md.m_sections_root.get(), path_for_line);
+ if (!parent_opt) {
+ return nonstd::nullopt;
+ }
+ auto parent = parent_opt.value();
+
+ auto child_hn = parent->lookup_child(last_key);
+ if (!child_hn) {
+ // XXX "should not happen"
+ return nonstd::nullopt;
+ }
+
+ auto neighbors_res = parent->child_neighbors(
+ child_hn.value(), tl.tl_offset + tl.tl_value.al_string.length() + 1);
+ if (!neighbors_res) {
+ return nonstd::nullopt;
+ }
+
+ if (neighbors_res->cnr_previous && last_key.is<std::string>()) {
+ auto neighbor_sub
+ = neighbors_res->cnr_previous.value()->lookup_child(last_key);
+ if (neighbor_sub) {
+ neighbors_res->cnr_previous = neighbor_sub;
+ }
+ }
+
+ if (neighbors_res->cnr_next && last_key.is<std::string>()) {
+ auto neighbor_sub
+ = neighbors_res->cnr_next.value()->lookup_child(last_key);
+ if (neighbor_sub) {
+ neighbors_res->cnr_next = neighbor_sub;
+ }
+ }
+
+ switch (dir) {
+ case text_anchors::direction::prev: {
+ if (neighbors_res->cnr_previous) {
+ return this->line_for_offset(
+ neighbors_res->cnr_previous.value()->hn_start);
+ }
+ break;
+ }
+ case text_anchors::direction::next: {
+ if (neighbors_res->cnr_next) {
+ return this->line_for_offset(
+ neighbors_res->cnr_next.value()->hn_start);
+ }
+ break;
+ }
+ }
+
+ return nonstd::nullopt;
}
diff --git a/src/plain_text_source.hh b/src/plain_text_source.hh
index 3cddb1c..5f39525 100644
--- a/src/plain_text_source.hh
+++ b/src/plain_text_source.hh
@@ -73,10 +73,15 @@ public:
return *this;
}
+ plain_text_source& replace_with_mutable(attr_line_t& text_lines,
+ text_format_t tf);
+
plain_text_source& replace_with(const attr_line_t& text_lines);
plain_text_source& replace_with(const std::vector<std::string>& text_lines);
+ plain_text_source& replace_with(const std::vector<attr_line_t>& text_lines);
+
void clear();
plain_text_source& truncate_to(size_t max_lines);
@@ -121,6 +126,8 @@ public:
nonstd::optional<vis_line_t> row_for_anchor(const std::string& id) override;
nonstd::optional<std::string> anchor_for_row(vis_line_t vl) override;
std::unordered_set<std::string> get_anchors() override;
+ nonstd::optional<vis_line_t> adjacent_anchor(vis_line_t vl,
+ direction dir) override;
protected:
size_t compute_longest_line();
@@ -131,6 +138,7 @@ protected:
text_format_t tds_text_format{text_format_t::TF_UNKNOWN};
size_t tds_longest_line{0};
bool tds_reverse_selection{false};
+ size_t tds_line_indent_size{0};
lnav::document::metadata tds_doc_sections;
};
diff --git a/src/pretty_printer.cc b/src/pretty_printer.cc
index 2ff3e11..0e9ec0e 100644
--- a/src/pretty_printer.cc
+++ b/src/pretty_printer.cc
@@ -29,6 +29,10 @@
#include "pretty_printer.hh"
+#include <sys/types.h>
+
+#include "base/auto_mem.hh"
+#include "base/intern_string.hh"
#include "base/string_util.hh"
#include "config.h"
@@ -73,14 +77,14 @@ pretty_printer::append_to(attr_line_t& al)
= this->pp_stream.tellp();
this->pp_interval_state.back().is_name
= tok_res->to_string();
- this->descend();
+ this->descend(DT_XML_CLOSE_TAG);
} else {
this->pp_values.emplace_back(el);
}
continue;
case DT_XML_CLOSE_TAG:
this->flush_values();
- this->ascend();
+ this->ascend(el.e_token);
this->append_child_node();
this->write_element(el);
this->start_new_line();
@@ -90,7 +94,7 @@ pretty_printer::append_to(attr_line_t& al)
case DT_LPAREN:
this->flush_values(true);
this->pp_values.emplace_back(el);
- this->descend();
+ this->descend(to_closer(el.e_token));
this->pp_interval_state.back().is_start
= this->pp_stream.tellp();
continue;
@@ -101,7 +105,7 @@ pretty_printer::append_to(attr_line_t& al)
if (this->pp_body_lines.top()) {
this->start_new_line();
}
- this->ascend();
+ this->ascend(el.e_token);
this->write_element(el);
continue;
case DT_COMMA:
@@ -131,13 +135,17 @@ pretty_printer::append_to(attr_line_t& al)
this->pp_values.emplace_back(el);
}
while (this->pp_depth > 0) {
- this->ascend();
+ this->ascend(this->pp_container_tokens.back());
}
this->flush_values();
attr_line_t combined;
combined.get_string() = this->pp_stream.str();
- combined.get_attrs() = this->pp_attrs;
+ auto& attrs = combined.get_attrs();
+ attrs = this->pp_attrs;
+ attrs.insert(
+ attrs.end(), this->pp_post_attrs.begin(), this->pp_post_attrs.end());
+ this->pp_post_attrs.clear();
if (!al.empty()) {
al.append("\n");
@@ -163,11 +171,16 @@ pretty_printer::append_to(attr_line_t& al)
void
pretty_printer::write_element(const pretty_printer::element& el)
{
+ ssize_t start_size = this->pp_stream.tellp();
if (this->pp_leading_indent == 0 && this->pp_line_length == 0
&& el.e_token == DT_WHITE)
{
if (this->pp_depth == 0) {
this->pp_soft_indent += el.e_capture.length();
+ } else {
+ auto shift_cover = line_range{(int) start_size, (int) start_size};
+ shift_string_attrs(
+ this->pp_attrs, shift_cover, -el.e_capture.length());
}
return;
}
@@ -183,12 +196,12 @@ pretty_printer::write_element(const pretty_printer::element& el)
}
return;
}
+ int indent_size = 0;
if (this->pp_line_length == 0) {
- this->append_indent();
+ indent_size = this->append_indent();
}
- ssize_t start_size = this->pp_stream.tellp();
if (el.e_token == DT_QUOTED_STRING) {
- auto_mem<char> unquoted_str((char*) malloc(el.e_capture.length() + 1));
+ auto unquoted_str = auto_mem<char>::malloc(el.e_capture.length() + 1);
const char* start
= this->pp_scanner->to_string_fragment(el.e_capture).data();
auto unq_len = unquote(unquoted_str.in(), start, el.e_capture.length());
@@ -222,11 +235,9 @@ pretty_printer::write_element(const pretty_printer::element& el)
}
} else {
this->pp_stream << this->pp_scanner->to_string_fragment(el.e_capture);
- int shift_amount
- = start_size - el.e_capture.c_begin - this->pp_shift_accum;
- shift_string_attrs(this->pp_attrs, el.e_capture.c_begin, shift_amount);
- this->pp_shift_accum = start_size - el.e_capture.c_begin;
}
+ auto shift_cover = line_range{(int) start_size, (int) start_size};
+ shift_string_attrs(this->pp_attrs, shift_cover, indent_size);
this->pp_line_length += el.e_capture.length();
if (el.e_token == DT_LINE) {
this->pp_line_length = 0;
@@ -234,18 +245,23 @@ pretty_printer::write_element(const pretty_printer::element& el)
}
}
-void
+int
pretty_printer::append_indent()
{
+ auto start_size = this->pp_stream.tellp();
this->pp_stream << std::string(
this->pp_leading_indent + this->pp_soft_indent, ' ');
this->pp_soft_indent = 0;
- if (this->pp_stream.tellp() == this->pp_leading_indent) {
- return;
- }
- for (int lpc = 0; lpc < this->pp_depth; lpc++) {
- this->pp_stream << " ";
+ if (this->pp_stream.tellp() != this->pp_leading_indent) {
+ for (int lpc = 0; lpc < this->pp_depth; lpc++) {
+ this->pp_stream << " ";
+ }
+ if (this->pp_depth > 0) {
+ this->pp_indents.insert(this->pp_leading_indent
+ + 4 * this->pp_depth);
+ }
}
+ return (this->pp_stream.tellp() - start_size);
}
bool
@@ -286,7 +302,11 @@ pretty_printer::flush_values(bool start_on_depth)
&& (el.e_token == DT_LSQUARE || el.e_token == DT_LCURLY))
{
if (this->pp_line_length > 0) {
+ ssize_t start_size = this->pp_stream.tellp();
this->pp_stream << std::endl;
+ auto shift_cover
+ = line_range{(int) start_size, (int) start_size};
+ shift_string_attrs(this->pp_attrs, shift_cover, 1);
}
this->pp_line_length = 0;
}
@@ -302,43 +322,66 @@ pretty_printer::start_new_line()
{
bool has_output;
+ ssize_t start_size = this->pp_stream.tellp();
if (this->pp_line_length > 0) {
this->pp_stream << std::endl;
+ auto shift_cover = line_range{(int) start_size, (int) start_size};
+ shift_string_attrs(this->pp_attrs, shift_cover, 1);
this->pp_line_length = 0;
}
has_output = this->flush_values();
if (has_output && this->pp_line_length > 0) {
+ start_size = this->pp_stream.tellp();
this->pp_stream << std::endl;
+ auto shift_cover = line_range{(int) start_size, (int) start_size};
+ shift_string_attrs(this->pp_attrs, shift_cover, 1);
}
this->pp_line_length = 0;
this->pp_body_lines.top() += 1;
}
void
-pretty_printer::ascend()
+pretty_printer::ascend(data_token_t dt)
{
if (this->pp_depth > 0) {
- int lines = this->pp_body_lines.top();
- this->pp_depth -= 1;
- this->pp_body_lines.pop();
- this->pp_body_lines.top() += lines;
-
- if (!this->pp_is_xml) {
- this->append_child_node();
+ if (this->pp_container_tokens.back() != dt
+ && std::find(this->pp_container_tokens.begin(),
+ this->pp_container_tokens.end(),
+ dt)
+ == this->pp_container_tokens.end())
+ {
+ return;
}
- this->pp_interval_state.pop_back();
- this->pp_hier_stage = std::move(this->pp_hier_nodes.back());
- this->pp_hier_nodes.pop_back();
+
+ auto found = false;
+ do {
+ if (this->pp_container_tokens.back() == dt) {
+ found = true;
+ }
+ int lines = this->pp_body_lines.top();
+ this->pp_depth -= 1;
+ this->pp_body_lines.pop();
+ this->pp_body_lines.top() += lines;
+
+ if (!this->pp_is_xml) {
+ this->append_child_node();
+ }
+ this->pp_interval_state.pop_back();
+ this->pp_hier_stage = std::move(this->pp_hier_nodes.back());
+ this->pp_hier_nodes.pop_back();
+ this->pp_container_tokens.pop_back();
+ } while (!found);
} else {
this->pp_body_lines.top() = 0;
}
}
void
-pretty_printer::descend()
+pretty_printer::descend(data_token_t dt)
{
this->pp_depth += 1;
this->pp_body_lines.push(0);
+ this->pp_container_tokens.push_back(dt);
this->pp_interval_state.resize(this->pp_depth + 1);
this->pp_hier_nodes.push_back(
std::make_unique<lnav::document::hier_node>());
diff --git a/src/pretty_printer.hh b/src/pretty_printer.hh
index f10b946..495eb4e 100644
--- a/src/pretty_printer.hh
+++ b/src/pretty_printer.hh
@@ -31,19 +31,16 @@
#define pretty_printer_hh
#include <deque>
-#include <map>
#include <sstream>
#include <stack>
-#include <utility>
+#include <string>
#include <vector>
-#include <sys/types.h>
-
#include "base/attr_line.hh"
#include "base/file_range.hh"
-#include "base/opt_util.hh"
#include "data_scanner.hh"
#include "document.sections.hh"
+#include "optional.hpp"
class pretty_printer {
public:
@@ -97,16 +94,18 @@ public:
return std::move(this->pp_hier_stage);
}
+ std::set<size_t> take_indents() { return std::move(this->pp_indents); }
+
private:
- void descend();
+ void descend(data_token_t dt);
- void ascend();
+ void ascend(data_token_t dt);
void start_new_line();
bool flush_values(bool start_on_depth = false);
- void append_indent();
+ int append_indent();
void write_element(const element& el);
@@ -121,9 +120,11 @@ private:
int pp_depth{0};
int pp_line_length{0};
int pp_soft_indent{0};
+ std::vector<data_token_t> pp_container_tokens{};
std::stack<int> pp_body_lines{};
data_scanner* pp_scanner;
string_attrs_t pp_attrs;
+ string_attrs_t pp_post_attrs;
std::ostringstream pp_stream;
std::deque<element> pp_values{};
int pp_shift_accum{0};
@@ -132,6 +133,7 @@ private:
std::vector<lnav::document::section_interval_t> pp_intervals;
std::vector<std::unique_ptr<lnav::document::hier_node>> pp_hier_nodes;
std::unique_ptr<lnav::document::hier_node> pp_hier_stage;
+ std::set<size_t> pp_indents;
};
#endif
diff --git a/src/preview_status_source.hh b/src/preview_status_source.hh
index 25622b0..6f7dae3 100644
--- a/src/preview_status_source.hh
+++ b/src/preview_status_source.hh
@@ -60,22 +60,19 @@ public:
this->tss_fields[TSF_TOGGLE].set_width(strlen(TOGGLE_MSG) + 1);
this->tss_fields[TSF_TOGGLE].set_value(TOGGLE_MSG);
this->tss_fields[TSF_TOGGLE].right_justify(true);
- };
+ }
- size_t statusview_fields() override
- {
- return TSF__MAX;
- };
+ size_t statusview_fields() override { return TSF__MAX; }
status_field& statusview_value_for_field(int field) override
{
return this->tss_fields[field];
- };
+ }
status_field& get_description()
{
return this->tss_fields[TSF_DESCRIPTION];
- };
+ }
private:
status_field tss_fields[TSF__MAX];
diff --git a/src/prql/prql.am b/src/prql/prql.am
new file mode 100644
index 0000000..f53487a
--- /dev/null
+++ b/src/prql/prql.am
@@ -0,0 +1,5 @@
+
+PRQL_FILES = \
+ $(srcdir)/%reldir%/stats.prql \
+ $(srcdir)/%reldir%/utils.prql \
+ $()
diff --git a/src/prql/stats.prql b/src/prql/stats.prql
new file mode 100644
index 0000000..bce69f4
--- /dev/null
+++ b/src/prql/stats.prql
@@ -0,0 +1,48 @@
+let count_by = func column rel <relation> -> <relation> (
+ rel
+ group {column} (aggregate {total = count this})
+ sort {-total}
+)
+
+let average_of = func column rel <relation> -> <relation> (
+ rel
+ aggregate {value = average column}
+)
+
+let sum_of = func column rel <relation> -> <relation> (
+ (rel | aggregate {total = sum column})
+)
+
+let by = func column values rel <relation> -> <relation> (
+ rel
+ group {column} (aggregate values)
+)
+
+let hist = func column slice:'1h' top:10 rel <relation> -> (
+ rel
+ group { tslice = (time.slice log_time_msecs slice), column } (
+ aggregate { total = count this }
+ )
+ group { tslice } (
+ window (
+ sort {-total}
+ derive {rn = row_number column}
+ )
+ )
+ derive top_value = case [
+ rn < top => column,
+ rn >= top => 'Other',
+ ]
+ group { tslice, top_value } (
+ aggregate { total2 = sum total }
+ )
+ group { tslice } (
+ window (
+ sort {-total2}
+ # XXX The `take` here is necessary to workaround a
+ # PRQL issue where the above sort is dropped entirely
+ take top
+ aggregate { v = json.group_object top_value total2 }
+ )
+ )
+)
diff --git a/src/prql/utils.prql b/src/prql/utils.prql
new file mode 100644
index 0000000..326f5ba
--- /dev/null
+++ b/src/prql/utils.prql
@@ -0,0 +1,5 @@
+let distinct = func column rel <relation> -> <relation> (
+ rel
+ select {column}
+ group {column} (take 1)
+)
diff --git a/src/ptimec.c b/src/ptimec.c
index 45059d6..7ac648b 100644
--- a/src/ptimec.c
+++ b/src/ptimec.c
@@ -21,8 +21,8 @@
* DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
@@ -30,17 +30,19 @@
*/
#include <stdio.h>
-#include <string.h>
#include <stdlib.h>
+#include <string.h>
-const char *PRELUDE = "\
+const char* PRELUDE
+ = "\
#include <time.h>\n\
#include <sys/types.h>\n\
#include \"ptimec.hh\"\n\
\n\
";
-char *escape_char(char ch)
+char*
+escape_char(char ch)
{
static char charstr[4];
@@ -54,7 +56,8 @@ char *escape_char(char ch)
return charstr;
}
-int main(int argc, char *argv[])
+int
+main(int argc, char* argv[])
{
int retval = EXIT_SUCCESS;
@@ -78,12 +81,14 @@ int main(int argc, char *argv[])
case 'Z':
if (arg[index + 2]) {
printf(
- " if (!ptime_upto('%s', str, off, len)) "
+ " if (!ptime_Z_upto(dst, str, off, len, "
+ "'%s')) "
"return false;\n",
escape_char(arg[index + 2]));
} else {
printf(
- " if (!ptime_upto_end(str, off, len)) "
+ " if (!ptime_Z_upto_end(dst, str, off, "
+ "len)) "
"return false;\n");
}
arg += 1;
@@ -99,11 +104,12 @@ int main(int argc, char *argv[])
" if (!ptime_%c(dst, str, off, len)) return "
"false;\n",
arg[index + 1]);
- arg += 1;
- break;
+ arg += 1;
+ break;
}
} else {
- printf(" if (!ptime_char('%s', str, off, len)) return false;\n",
+ printf(
+ " if (!ptime_char('%s', str, off, len)) return false;\n",
escape_char(arg[index]));
}
}
@@ -111,10 +117,12 @@ int main(int argc, char *argv[])
printf("}\n\n");
}
for (int lpc = 1; lpc < argc; lpc++) {
- const char *arg = argv[lpc];
+ const char* arg = argv[lpc];
- printf("void ftime_f%d(char *dst, off_t &off_inout, size_t len, const struct exttm &tm) {\n",
- lpc);
+ printf(
+ "void ftime_f%d(char *dst, off_t &off_inout, size_t len, const "
+ "struct exttm &tm) {\n",
+ lpc);
for (int index = 0; arg[index]; arg++) {
if (arg[index] == '%') {
switch (arg[index + 1]) {
@@ -137,8 +145,12 @@ int main(int argc, char *argv[])
printf("}\n\n");
}
+ size_t default_format_index = 0;
printf("struct ptime_fmt PTIMEC_FORMATS[] = {\n");
for (int lpc = 1; lpc < argc; lpc++) {
+ if (strcmp(argv[lpc], "%Y-%m-%dT%H:%M:%S") == 0) {
+ default_format_index = lpc - 1;
+ }
printf(" { \"%s\", ptime_f%d, ftime_f%d },\n", argv[lpc], lpc, lpc);
}
printf("\n");
@@ -153,5 +165,8 @@ int main(int argc, char *argv[])
printf(" nullptr\n");
printf("};\n");
+ printf("\n");
+ printf("size_t PTIMEC_DEFAULT_FMT_INDEX = %zu;\n", default_format_index);
+
return retval;
}
diff --git a/src/ptimec.hh b/src/ptimec.hh
index 9db6b0c..527b33d 100644
--- a/src/ptimec.hh
+++ b/src/ptimec.hh
@@ -202,11 +202,6 @@ ftime_a(char* dst, off_t& off_inout, ssize_t len, const struct exttm& tm)
}
inline void
-ftime_Z(char* dst, off_t& off_inout, ssize_t len, const struct exttm& tm)
-{
-}
-
-inline void
ftime_b(char* dst, off_t& off_inout, ssize_t len, const struct exttm& tm)
{
switch (tm.et_tm.tm_mon) {
@@ -287,10 +282,13 @@ ptime_S(struct exttm* dst, const char* str, off_t& off_inout, ssize_t len)
}
dst->et_tm.tm_sec
= (str[off_inout] - '0') * 10 + (str[off_inout + 1] - '0');
+ if (dst->et_tm.tm_sec < 0 || dst->et_tm.tm_sec >= 60) {
+ return false;
+ }
dst->et_flags |= ETF_SECOND_SET;
});
- return (dst->et_tm.tm_sec >= 0 && dst->et_tm.tm_sec <= 59);
+ return true;
}
inline void
@@ -323,7 +321,7 @@ ptime_s(struct exttm* dst, const char* str, off_t& off_inout, ssize_t len)
secs2tm(epoch, &dst->et_tm);
dst->et_flags = ETF_DAY_SET | ETF_MONTH_SET | ETF_YEAR_SET | ETF_HOUR_SET
| ETF_MINUTE_SET | ETF_SECOND_SET | ETF_MACHINE_ORIENTED
- | ETF_EPOCH_TIME;
+ | ETF_EPOCH_TIME | ETF_ZONE_SET;
return (epoch > 0);
}
@@ -381,7 +379,7 @@ ptime_q(struct exttm* dst, const char* str, off_t& off_inout, ssize_t len)
secs2tm(epoch, &dst->et_tm);
dst->et_flags = ETF_DAY_SET | ETF_MONTH_SET | ETF_YEAR_SET | ETF_HOUR_SET
| ETF_MINUTE_SET | ETF_SECOND_SET | ETF_MACHINE_ORIENTED
- | ETF_EPOCH_TIME;
+ | ETF_EPOCH_TIME | ETF_ZONE_SET;
return (epoch > 0);
}
@@ -398,20 +396,42 @@ ftime_q(char* dst, off_t& off_inout, ssize_t len, const struct exttm& tm)
inline bool
ptime_L(struct exttm* dst, const char* str, off_t& off_inout, ssize_t len)
{
+ auto avail = len - off_inout;
int ms = 0;
- PTIME_CONSUME(3, {
- char c0 = str[off_inout];
- char c1 = str[off_inout + 1];
- char c2 = str[off_inout + 2];
- if (!isdigit(c0) || !isdigit(c1) || !isdigit(c2)) {
- return false;
- }
- ms = ((str[off_inout] - '0') * 100 + (str[off_inout + 1] - '0') * 10
- + (str[off_inout + 2] - '0'));
- });
+ if (avail >= 3 && isdigit(str[off_inout + 2])) {
+ PTIME_CONSUME(3, {
+ char c0 = str[off_inout];
+ char c1 = str[off_inout + 1];
+ char c2 = str[off_inout + 2];
+ if (!isdigit(c0) || !isdigit(c1) || !isdigit(c2)) {
+ return false;
+ }
+ ms = ((str[off_inout] - '0') * 100 + (str[off_inout + 1] - '0') * 10
+ + (str[off_inout + 2] - '0'));
+ });
+ } else if (avail >= 2 && isdigit(str[off_inout + 1])) {
+ PTIME_CONSUME(2, {
+ char c0 = str[off_inout];
+ char c1 = str[off_inout + 1];
+ if (!isdigit(c0) || !isdigit(c1)) {
+ return false;
+ }
+ ms = ((str[off_inout] - '0') * 100
+ + (str[off_inout + 1] - '0') * 10);
+ });
+ } else {
+ PTIME_CONSUME(1, {
+ char c0 = str[off_inout];
+ if (!isdigit(c0)) {
+ return false;
+ }
+ ms = (str[off_inout] - '0') * 100;
+ });
+ }
if ((ms >= 0 && ms <= 999)) {
+ dst->et_flags |= ETF_MILLIS_SET;
dst->et_nsec = ms * 1000000;
return true;
}
@@ -457,8 +477,14 @@ ptime_H(struct exttm* dst, const char* str, off_t& off_inout, ssize_t len)
if (str[off_inout + 1] > '9') {
return false;
}
- dst->et_tm.tm_hour
- = (str[off_inout] - '0') * 10 + (str[off_inout + 1] - '0');
+ if (isdigit(str[off_inout])) {
+ dst->et_tm.tm_hour = (str[off_inout] - '0') * 10;
+ } else if (str[off_inout] == ' ') {
+ dst->et_tm.tm_hour = 0;
+ } else {
+ return false;
+ }
+ dst->et_tm.tm_hour += (str[off_inout + 1] - '0');
dst->et_flags |= ETF_HOUR_SET;
});
@@ -493,8 +519,9 @@ ptime_i(struct exttm* dst, const char* str, off_t& off_inout, ssize_t len)
secs2tm(epoch, &dst->et_tm);
dst->et_flags = ETF_DAY_SET | ETF_MONTH_SET | ETF_YEAR_SET | ETF_HOUR_SET
- | ETF_MINUTE_SET | ETF_SECOND_SET | ETF_MACHINE_ORIENTED
- | ETF_EPOCH_TIME;
+ | ETF_MINUTE_SET | ETF_SECOND_SET | ETF_MILLIS_SET
+ | ETF_MACHINE_ORIENTED | ETF_EPOCH_TIME | ETF_ZONE_SET
+ | ETF_SUB_NOT_IN_FORMAT;
return (epoch_ms > 0);
}
@@ -530,8 +557,9 @@ ptime_6(struct exttm* dst, const char* str, off_t& off_inout, ssize_t len)
secs2tm(epoch, &dst->et_tm);
dst->et_flags = ETF_DAY_SET | ETF_MONTH_SET | ETF_YEAR_SET | ETF_HOUR_SET
- | ETF_MINUTE_SET | ETF_SECOND_SET | ETF_MACHINE_ORIENTED
- | ETF_EPOCH_TIME;
+ | ETF_MINUTE_SET | ETF_SECOND_SET | ETF_MICROS_SET
+ | ETF_MACHINE_ORIENTED | ETF_EPOCH_TIME | ETF_ZONE_SET
+ | ETF_SUB_NOT_IN_FORMAT | ETF_Z_FOR_UTC;
return (epoch_us > 0);
}
@@ -553,8 +581,14 @@ ptime_I(struct exttm* dst, const char* str, off_t& off_inout, ssize_t len)
if (str[off_inout + 1] > '9') {
return false;
}
- dst->et_tm.tm_hour
- = (str[off_inout] - '0') * 10 + (str[off_inout + 1] - '0');
+ if (isdigit(str[off_inout])) {
+ dst->et_tm.tm_hour = (str[off_inout] - '0') * 10;
+ } else if (str[off_inout] == ' ') {
+ dst->et_tm.tm_hour = 0;
+ } else {
+ return false;
+ }
+ dst->et_tm.tm_hour += (str[off_inout + 1] - '0');
if (dst->et_tm.tm_hour < 1 || dst->et_tm.tm_hour > 12) {
return false;
@@ -725,7 +759,7 @@ ptime_l(struct exttm* dst, const char* str, off_t& off_inout, ssize_t len)
dst->et_tm.tm_hour = 0;
- if ((off_inout + 1) > len) {
+ if ((off_inout + 1) >= len) {
return false;
}
@@ -734,7 +768,7 @@ ptime_l(struct exttm* dst, const char* str, off_t& off_inout, ssize_t len)
off_inout += 1;
}
- if ((off_inout + 1) > len) {
+ if ((off_inout + 1) >= len) {
off_inout = orig_off;
return false;
}
@@ -747,7 +781,13 @@ ptime_l(struct exttm* dst, const char* str, off_t& off_inout, ssize_t len)
dst->et_tm.tm_hour = str[off_inout] - '0';
off_inout += 1;
+ if (!consumed_space && (off_inout + 1) >= len) {
+ off_inout = orig_off;
+ return false;
+ }
+
if (consumed_space || str[off_inout] < '0' || str[off_inout] > '9') {
+ dst->et_flags |= ETF_HOUR_SET;
return true;
}
@@ -756,11 +796,10 @@ ptime_l(struct exttm* dst, const char* str, off_t& off_inout, ssize_t len)
off_inout += 1;
if (dst->et_tm.tm_hour >= 0 && dst->et_tm.tm_hour <= 23) {
+ dst->et_flags |= ETF_HOUR_SET;
return true;
}
- dst->et_flags |= ETF_HOUR_SET;
-
off_inout = orig_off;
return false;
}
@@ -880,8 +919,71 @@ ftime_y(char* dst, off_t& off_inout, ssize_t len, const struct exttm& tm)
}
inline bool
+ptime_Z_upto(struct exttm* dst,
+ const char* str,
+ off_t& off_inout,
+ ssize_t len,
+ char term)
+{
+ auto avail = len - off_inout;
+
+ if (avail >= 3 && str[off_inout + 0] == 'U' && str[off_inout + 1] == 'T'
+ && str[off_inout + 2] == 'C')
+ {
+ PTIME_CONSUME(3, { dst->et_flags |= ETF_ZONE_SET | ETF_Z_IS_UTC; });
+ dst->et_gmtoff = 0;
+ return true;
+ }
+ if (avail >= 3 && str[off_inout + 0] == 'G' && str[off_inout + 1] == 'M'
+ && str[off_inout + 2] == 'T')
+ {
+ PTIME_CONSUME(3, { dst->et_flags |= ETF_ZONE_SET | ETF_Z_IS_GMT; });
+ dst->et_gmtoff = 0;
+ return true;
+ }
+
+ return ptime_upto(term, str, off_inout, len);
+}
+
+inline bool
+ptime_Z_upto_end(struct exttm* dst,
+ const char* str,
+ off_t& off_inout,
+ ssize_t len)
+{
+ auto avail = len - off_inout;
+
+ if (avail >= 3 && str[off_inout + 0] == 'U' && str[off_inout + 1] == 'T'
+ && str[off_inout + 2] == 'C')
+ {
+ PTIME_CONSUME(3, { dst->et_flags |= ETF_ZONE_SET | ETF_Z_IS_UTC; });
+ dst->et_gmtoff = 0;
+ return true;
+ }
+ if (avail >= 3 && str[off_inout + 0] == 'G' && str[off_inout + 1] == 'M'
+ && str[off_inout + 2] == 'T')
+ {
+ PTIME_CONSUME(3, { dst->et_flags |= ETF_ZONE_SET | ETF_Z_IS_GMT; });
+ dst->et_gmtoff = 0;
+ return true;
+ }
+
+ return ptime_upto_end(str, off_inout, len);
+}
+
+inline bool
ptime_z(struct exttm* dst, const char* str, off_t& off_inout, ssize_t len)
{
+ if (off_inout + 1 <= len && str[off_inout] == 'Z') {
+ off_inout += 1;
+ dst->et_flags |= ETF_ZONE_SET | ETF_Z_FOR_UTC;
+#ifdef HAVE_STRUCT_TM_TM_ZONE
+ dst->et_tm.tm_gmtoff = 0;
+#endif
+ dst->et_gmtoff = 0;
+ return true;
+ }
+
int consume_amount = 5;
if ((off_inout + 6) <= len && str[off_inout + 3] == ':') {
@@ -907,6 +1009,10 @@ ptime_z(struct exttm* dst, const char* str, off_t& off_inout, ssize_t len)
mins = ((str[off_inout + skip_colon + 3] - '0') * 10
+ (str[off_inout + skip_colon + 4] - '0') * 1)
* 60;
+ if (skip_colon) {
+ dst->et_flags |= ETF_Z_COLON;
+ }
+ dst->et_flags |= ETF_ZONE_SET;
dst->et_gmtoff = sign * (hours + mins);
#ifdef HAVE_STRUCT_TM_TM_ZONE
dst->et_tm.tm_gmtoff = sign * (hours + mins);
@@ -919,6 +1025,15 @@ ptime_z(struct exttm* dst, const char* str, off_t& off_inout, ssize_t len)
inline void
ftime_z(char* dst, off_t& off_inout, ssize_t len, const struct exttm& tm)
{
+ if (!(tm.et_flags & ETF_ZONE_SET)) {
+ return;
+ }
+
+ if (tm.et_gmtoff == 0 && tm.et_flags & ETF_Z_FOR_UTC) {
+ PTIME_APPEND('Z');
+ return;
+ }
+
long gmtoff = std::abs(tm.et_gmtoff) / 60;
if (tm.et_gmtoff < 0) {
@@ -932,27 +1047,82 @@ ftime_z(char* dst, off_t& off_inout, ssize_t len, const struct exttm& tm)
PTIME_APPEND('0' + ((hours / 10) % 10));
PTIME_APPEND('0' + ((hours / 1) % 10));
+ if (tm.et_flags & ETF_Z_COLON) {
+ PTIME_APPEND(':');
+ }
PTIME_APPEND('0' + ((mins / 10) % 10));
PTIME_APPEND('0' + ((mins / 1) % 10));
}
+inline void
+ftime_Z(char* dst, off_t& off_inout, ssize_t len, const struct exttm& tm)
+{
+ if (tm.et_flags & ETF_Z_IS_UTC) {
+ PTIME_APPEND('U');
+ PTIME_APPEND('T');
+ PTIME_APPEND('C');
+ } else if (tm.et_flags & ETF_Z_IS_GMT) {
+ PTIME_APPEND('G');
+ PTIME_APPEND('M');
+ PTIME_APPEND('T');
+ } else if (tm.et_flags & ETF_ZONE_SET) {
+ ftime_z(dst, off_inout, len, tm);
+ }
+}
+
inline bool
ptime_f(struct exttm* dst, const char* str, off_t& off_inout, ssize_t len)
{
- PTIME_CONSUME(6, {
- for (int lpc = 0; lpc < 6; lpc++) {
- if (str[off_inout + lpc] < '0' || str[off_inout + lpc] > '9') {
- return false;
+ auto avail = len - off_inout;
+
+ if (avail >= 6 && isdigit(str[off_inout + 4])
+ && isdigit(str[off_inout + 5]))
+ {
+ PTIME_CONSUME(6, {
+ for (int lpc = 0; lpc < 6; lpc++) {
+ if (str[off_inout + lpc] < '0' || str[off_inout + lpc] > '9') {
+ return false;
+ }
}
- }
- dst->et_nsec = ((str[off_inout + 0] - '0') * 100000
- + (str[off_inout + 1] - '0') * 10000
- + (str[off_inout + 2] - '0') * 1000
- + (str[off_inout + 3] - '0') * 100
- + (str[off_inout + 4] - '0') * 10
- + (str[off_inout + 5] - '0') * 1)
- * 1000;
- });
+ dst->et_flags |= ETF_MICROS_SET;
+ dst->et_nsec = ((str[off_inout + 0] - '0') * 100000
+ + (str[off_inout + 1] - '0') * 10000
+ + (str[off_inout + 2] - '0') * 1000
+ + (str[off_inout + 3] - '0') * 100
+ + (str[off_inout + 4] - '0') * 10
+ + (str[off_inout + 5] - '0') * 1)
+ * 1000;
+ });
+ } else if (avail >= 5 && isdigit(str[off_inout + 4])) {
+ PTIME_CONSUME(5, {
+ for (int lpc = 0; lpc < 5; lpc++) {
+ if (str[off_inout + lpc] < '0' || str[off_inout + lpc] > '9') {
+ return false;
+ }
+ }
+ dst->et_flags |= ETF_MICROS_SET;
+ dst->et_nsec = ((str[off_inout + 0] - '0') * 100000
+ + (str[off_inout + 1] - '0') * 10000
+ + (str[off_inout + 2] - '0') * 1000
+ + (str[off_inout + 3] - '0') * 100
+ + (str[off_inout + 4] - '0') * 10)
+ * 1000;
+ });
+ } else {
+ PTIME_CONSUME(4, {
+ for (int lpc = 0; lpc < 4; lpc++) {
+ if (str[off_inout + lpc] < '0' || str[off_inout + lpc] > '9') {
+ return false;
+ }
+ }
+ dst->et_flags |= ETF_MICROS_SET;
+ dst->et_nsec = ((str[off_inout + 0] - '0') * 100000
+ + (str[off_inout + 1] - '0') * 10000
+ + (str[off_inout + 2] - '0') * 1000
+ + (str[off_inout + 3] - '0') * 100)
+ * 1000;
+ });
+ }
return true;
}
@@ -979,6 +1149,7 @@ ptime_N(struct exttm* dst, const char* str, off_t& off_inout, ssize_t len)
return false;
}
}
+ dst->et_flags |= ETF_NANOS_SET;
dst->et_nsec = ((str[off_inout + 0] - '0') * 100000000
+ (str[off_inout + 1] - '0') * 10000000
+ (str[off_inout + 2] - '0') * 1000000
@@ -1082,8 +1253,8 @@ ptime_at(struct exttm* dst, const char* str, off_t& off_inout, ssize_t len)
}
dst->et_flags |= ETF_DAY_SET | ETF_MONTH_SET | ETF_YEAR_SET | ETF_HOUR_SET
- | ETF_MINUTE_SET | ETF_SECOND_SET | ETF_MACHINE_ORIENTED
- | ETF_EPOCH_TIME;
+ | ETF_MINUTE_SET | ETF_SECOND_SET | ETF_NANOS_SET | ETF_MACHINE_ORIENTED
+ | ETF_EPOCH_TIME | ETF_ZONE_SET;
return true;
}
@@ -1116,4 +1287,6 @@ extern struct ptime_fmt PTIMEC_FORMATS[];
extern const char* PTIMEC_FORMAT_STR[];
+extern size_t PTIMEC_DEFAULT_FMT_INDEX;
+
#endif
diff --git a/src/ptimec_rt.cc b/src/ptimec_rt.cc
index adceaa8..a38dc37 100644
--- a/src/ptimec_rt.cc
+++ b/src/ptimec_rt.cc
@@ -29,8 +29,6 @@
* @file ptimec_rt.cc
*/
-#include <algorithm>
-
#include "ptimec.hh"
#include <string.h>
diff --git a/src/readline_callbacks.cc b/src/readline_callbacks.cc
index 34a188f..6a751c7 100644
--- a/src/readline_callbacks.cc
+++ b/src/readline_callbacks.cc
@@ -27,37 +27,40 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "base/fs_util.hh"
#include "base/humanize.network.hh"
#include "base/injector.hh"
+#include "base/paths.hh"
+#include "bound_tags.hh"
#include "command_executor.hh"
#include "config.h"
#include "field_overlay_source.hh"
#include "help_text_formatter.hh"
#include "lnav.hh"
#include "lnav_config.hh"
-#include "lnav_util.hh"
#include "log_format_loader.hh"
#include "plain_text_source.hh"
#include "readline_curses.hh"
#include "readline_highlighters.hh"
#include "service_tags.hh"
#include "sql_help.hh"
-#include "sqlite-extension-func.hh"
#include "tailer/tailer.looper.hh"
#include "view_helpers.examples.hh"
#include "vtab_module.hh"
#include "yajlpp/yajlpp.hh"
using namespace std::chrono_literals;
+using namespace lnav::roles::literals;
#define ABORT_MSG "(Press " ANSI_BOLD("CTRL+]") " to abort)"
-#define STR_HELPER(x) #x
-#define STR(x) STR_HELPER(x)
-
-#define ANSI_RE(msg) ANSI_CSI "1;3" STR(COLOR_CYAN) "m" msg ANSI_NORM
-#define ANSI_CLS(msg) ANSI_CSI "1;3" STR(COLOR_MAGENTA) "m" msg ANSI_NORM
-#define ANSI_KW(msg) ANSI_CSI "3" STR(COLOR_BLUE) "m" msg ANSI_NORM
+#define ANSI_RE(msg) \
+ ANSI_CSI ANSI_BOLD_PARAM ";" ANSI_COLOR_PARAM(COLOR_CYAN) "m" msg ANSI_NORM
+#define ANSI_CLS(msg) \
+ ANSI_CSI ANSI_BOLD_PARAM \
+ ";" ANSI_COLOR_PARAM(COLOR_MAGENTA) "m" msg ANSI_NORM
+#define ANSI_KW(msg) \
+ ANSI_CSI ANSI_BOLD_PARAM ";" ANSI_COLOR_PARAM(COLOR_BLUE) "m" msg ANSI_NORM
#define ANSI_REV(msg) ANSI_CSI "7m" msg ANSI_NORM
#define ANSI_STR(msg) ANSI_CSI "32m" msg ANSI_NORM
@@ -96,6 +99,18 @@ const char *RE_EXAMPLE =
" " ANSI_RE("(?-i)") "ABC matches " ANSI_STR("'ABC'") " and " ANSI_UNDERLINE("not") " " ANSI_STR("'abc'")
;
+const char* CMD_HELP =
+ " " ANSI_KW(":goto") " Go to a line #, timestamp, etc...\n"
+ " " ANSI_KW(":filter-out") " Filter out lines that match a pattern\n"
+ " " ANSI_KW(":hide-lines-before") " Hide lines before a timestamp\n"
+ " " ANSI_KW(":open") " Open another file/directory\n";
+
+const char* CMD_EXAMPLE =
+ ANSI_UNDERLINE("Examples") "\n"
+ " " ANSI_KW(":goto") " 123\n"
+ " " ANSI_KW(":filter-out") " spam\n"
+ " " ANSI_KW(":hide-lines-before") " here\n";
+
const char *SQL_HELP =
" " ANSI_KW("SELECT") " Select rows from a table "
" " ANSI_KW("DELETE") " Delete rows from a table\n"
@@ -114,8 +129,41 @@ const char *SQL_EXAMPLE =
" SELECT * FROM logline LIMIT 10"
;
+const char *PRQL_HELP =
+ " " ANSI_KW("from") " Specify a data source "
+ " " ANSI_KW("derive") " Derive one or more columns\n"
+ " " ANSI_KW("select") " Select one or more columns "
+ " " ANSI_KW("aggregate") " Summary many rows into one\n"
+ " " ANSI_KW("group") " Partition rows into groups "
+ " " ANSI_KW("filter") " Pick rows based on their values\n"
+ ;
+
+const char *PRQL_EXAMPLE =
+ ANSI_UNDERLINE("Examples") "\n"
+ " from %s | stats.count_by { log_level }\n"
+ " from %s | filter log_line == lnav.view.top_line\n"
+ ;
+
static const char* LNAV_CMD_PROMPT = "Enter an lnav command: " ABORT_MSG;
+static attr_line_t
+format_sql_example(const char* sql_example_fmt)
+{
+ auto& log_view = lnav_data.ld_views[LNV_LOG];
+ auto* lss = (logfile_sub_source*) log_view.get_sub_source();
+ attr_line_t retval;
+
+ if (log_view.get_inner_height() > 0) {
+ auto cl = lss->at(log_view.get_top());
+ auto lf = lss->find(cl);
+ const auto* format_name = lf->get_format()->get_name().get();
+
+ retval.with_ansi_string(sql_example_fmt, format_name, format_name);
+ readline_sqlite_highlighter(retval, 0);
+ }
+ return retval;
+}
+
void
rl_set_help()
{
@@ -126,24 +174,16 @@ rl_set_help()
break;
}
case ln_mode_t::SQL: {
- textview_curses& log_view = lnav_data.ld_views[LNV_LOG];
- auto* lss = (logfile_sub_source*) log_view.get_sub_source();
- attr_line_t example_al;
-
- if (log_view.get_inner_height() > 0) {
- auto cl = lss->at(log_view.get_top());
- auto lf = lss->find(cl);
- const auto* format_name = lf->get_format()->get_name().get();
-
- example_al.with_ansi_string(
- SQL_EXAMPLE, format_name, format_name);
- readline_sqlite_highlighter(example_al, 0);
- }
-
+ auto example_al = format_sql_example(SQL_EXAMPLE);
lnav_data.ld_doc_source.replace_with(SQL_HELP);
lnav_data.ld_example_source.replace_with(example_al);
break;
}
+ case ln_mode_t::COMMAND: {
+ lnav_data.ld_doc_source.replace_with(CMD_HELP);
+ lnav_data.ld_example_source.replace_with(CMD_EXAMPLE);
+ break;
+ }
default:
break;
}
@@ -152,9 +192,9 @@ rl_set_help()
static bool
rl_sql_help(readline_curses* rc)
{
- attr_line_t al(rc->get_line_buffer());
- const string_attrs_t& sa = al.get_attrs();
- size_t x = rc->get_x();
+ auto al = attr_line_t(rc->get_line_buffer());
+ const auto& sa = al.get_attrs();
+ size_t x = rc->get_cursor_x();
bool has_doc = false;
if (x > 0) {
@@ -164,11 +204,15 @@ rl_sql_help(readline_curses* rc)
annotate_sql_statement(al);
auto avail_help = find_sql_help_for_line(al, x);
+ auto lang = help_example::language::undefined;
+ if (lnav::sql::is_prql(al.get_string())) {
+ lang = help_example::language::prql;
+ }
if (!avail_help.empty()) {
size_t help_count = avail_help.size();
- textview_curses& dtc = lnav_data.ld_doc_view;
- textview_curses& etc = lnav_data.ld_example_view;
+ auto& dtc = lnav_data.ld_doc_view;
+ auto& etc = lnav_data.ld_example_view;
unsigned long doc_width, ex_width;
vis_line_t doc_height, ex_height;
attr_line_t doc_al, ex_al;
@@ -185,7 +229,7 @@ rl_sql_help(readline_curses* rc)
: help_text_content::full);
if (help_count == 1) {
format_example_text_for_term(
- *ht, eval_example, std::min(70UL, ex_width), ex_al);
+ *ht, eval_example, std::min(70UL, ex_width), ex_al, lang);
} else {
doc_al.append("\n");
}
@@ -204,6 +248,10 @@ rl_sql_help(readline_curses* rc)
auto ident_iter = find_string_attr_containing(
sa, &SQL_IDENTIFIER_ATTR, al.nearest_text(x));
+ if (ident_iter == sa.end()) {
+ ident_iter = find_string_attr_containing(
+ sa, &lnav::sql::PRQL_IDENTIFIER_ATTR, al.nearest_text(x));
+ }
if (ident_iter != sa.end()) {
auto ident = al.get_substring(ident_iter->sa_range);
auto intern_ident = intern_string::lookup(ident);
@@ -224,10 +272,14 @@ rl_sql_help(readline_curses* rc)
}
if (!ddl.empty()) {
- lnav_data.ld_preview_source.replace_with(ddl)
+ lnav_data.ld_preview_view[0].set_sub_source(
+ &lnav_data.ld_preview_source[0]);
+ lnav_data.ld_preview_view[0].set_overlay_source(nullptr);
+ lnav_data.ld_preview_source[0]
+ .replace_with(ddl)
.set_text_format(text_format_t::TF_SQL)
.truncate_to(30);
- lnav_data.ld_preview_status_source.get_description().set_value(
+ lnav_data.ld_preview_status_source[0].get_description().set_value(
"Definition for table -- %s", ident.c_str());
}
}
@@ -248,19 +300,50 @@ rl_change(readline_curses* rc)
"show-fields",
};
- textview_curses* tc = get_textview_for_mode(lnav_data.ld_mode);
+ auto* tc = get_textview_for_mode(lnav_data.ld_mode);
tc->get_highlights().erase({highlight_source_t::PREVIEW, "preview"});
tc->get_highlights().erase({highlight_source_t::PREVIEW, "bodypreview"});
lnav_data.ld_log_source.set_preview_sql_filter(nullptr);
lnav_data.ld_user_message_source.clear();
- lnav_data.ld_preview_source.clear();
- lnav_data.ld_preview_status_source.get_description()
- .set_cylon(false)
- .clear();
switch (lnav_data.ld_mode) {
+ case ln_mode_t::SEARCH: {
+ if (rc->get_line_buffer().empty() && tc->tc_selected_text) {
+ rc->set_suggestion(tc->tc_selected_text->sti_value);
+ }
+ break;
+ }
+ case ln_mode_t::SQL: {
+ static const auto* sql_cmd_map
+ = injector::get<readline_context::command_map_t*,
+ sql_cmd_map_tag>();
+
+ const auto line = rc->get_line_buffer();
+ std::vector<std::string> args;
+
+ if (!lnav::sql::is_prql(line)) {
+ clear_preview();
+ }
+
+ split_ws(line, args);
+ if (!args.empty()) {
+ auto cmd_iter = sql_cmd_map->find(args[0]);
+ if (cmd_iter != sql_cmd_map->end()) {
+ const auto* sql_cmd = cmd_iter->second;
+ if (sql_cmd->c_prompt != nullptr) {
+ const auto prompt_res = sql_cmd->c_prompt(
+ lnav_data.ld_exec_context, line);
+
+ rc->set_suggestion(prompt_res.pr_suggestion);
+ }
+ }
+ }
+ break;
+ }
case ln_mode_t::COMMAND: {
+ clear_preview();
+
static std::string last_command;
static int generation = 0;
@@ -307,13 +390,11 @@ rl_change(readline_curses* rc)
if (!args.empty()) {
iter = lnav_commands.find(args[0]);
}
- if (iter == lnav_commands.end()) {
- lnav_data.ld_doc_source.clear();
- lnav_data.ld_example_source.clear();
- lnav_data.ld_preview_source.clear();
- lnav_data.ld_preview_status_source.get_description()
- .set_cylon(false)
- .clear();
+ if (iter == lnav_commands.end()
+ || (args.size() == 1 && !endswith(line, " ")))
+ {
+ lnav_data.ld_doc_source.replace_with(CMD_HELP);
+ lnav_data.ld_example_source.replace_with(CMD_EXAMPLE);
lnav_data.ld_bottom_source.set_prompt(LNAV_CMD_PROMPT);
lnav_data.ld_bottom_source.grep_error("");
} else if (args[0] == "config" && args.size() > 1) {
@@ -342,12 +423,12 @@ rl_change(readline_curses* rc)
} else if ((args[0] != "filter-expr" && args[0] != "mark-expr")
|| !rl_sql_help(rc))
{
- readline_context::command_t& cmd = *iter->second;
- const help_text& ht = cmd.c_help;
+ const auto& cmd = *iter->second;
+ const auto& ht = cmd.c_help;
if (ht.ht_name) {
- textview_curses& dtc = lnav_data.ld_doc_view;
- textview_curses& etc = lnav_data.ld_example_view;
+ auto& dtc = lnav_data.ld_doc_view;
+ auto& etc = lnav_data.ld_example_view;
unsigned long width;
vis_line_t height;
attr_line_t al;
@@ -364,15 +445,17 @@ rl_change(readline_curses* rc)
etc.set_needs_update();
}
- if (cmd.c_prompt != nullptr && generation == 0
- && trim(line) == args[0])
- {
- const auto new_prompt
+ if (cmd.c_prompt != nullptr) {
+ const auto prompt_res
= cmd.c_prompt(lnav_data.ld_exec_context, line);
- if (!new_prompt.empty()) {
- rc->rewrite_line(line.length(), new_prompt);
+ if (generation == 0 && trim(line) == args[0]
+ && !prompt_res.pr_new_prompt.empty())
+ {
+ rc->rewrite_line(line.length(),
+ prompt_res.pr_new_prompt);
}
+ rc->set_suggestion(prompt_res.pr_suggestion);
}
lnav_data.ld_bottom_source.grep_error("");
@@ -381,6 +464,8 @@ rl_change(readline_curses* rc)
break;
}
case ln_mode_t::EXEC: {
+ clear_preview();
+
const auto line = rc->get_line_buffer();
size_t name_end = line.find(' ');
const auto script_name = line.substr(0, name_end);
@@ -413,7 +498,7 @@ rl_change(readline_curses* rc)
static void
rl_search_internal(readline_curses* rc, ln_mode_t mode, bool complete = false)
{
- textview_curses* tc = get_textview_for_mode(mode);
+ auto* tc = get_textview_for_mode(mode);
std::string term_val;
std::string name;
@@ -440,10 +525,7 @@ rl_search_internal(readline_curses* rc, ln_mode_t mode, bool complete = false)
lnav_data.ld_exec_context.ec_dry_run = true;
lnav_data.ld_preview_generation += 1;
- lnav_data.ld_preview_status_source.get_description()
- .set_cylon(false)
- .clear();
- lnav_data.ld_preview_source.clear();
+ clear_preview();
auto result = execute_command(lnav_data.ld_exec_context,
rc->get_value().get_string());
@@ -463,20 +545,215 @@ rl_search_internal(readline_curses* rc, ln_mode_t mode, bool complete = false)
result.unwrapErr().um_message.get_string());
}
- lnav_data.ld_preview_view.reload_data();
+ lnav_data.ld_preview_view[0].reload_data();
lnav_data.ld_exec_context.ec_dry_run = false;
return;
}
case ln_mode_t::SQL: {
- term_val = trim(rc->get_value().get_string() + ";");
+ term_val = trim(rc->get_value().get_string());
if (!term_val.empty() && term_val[0] == '.') {
lnav_data.ld_bottom_source.grep_error("");
- } else if (!sqlite3_complete(term_val.c_str())) {
+ } else if (lnav::sql::is_prql(term_val)) {
+ std::string alt_msg;
+
+ lnav_data.ld_doc_source.replace_with(PRQL_HELP);
+ lnav_data.ld_example_source.replace_with(
+ format_sql_example(PRQL_EXAMPLE));
+ lnav_data.ld_db_preview_source[0].clear();
+ lnav_data.ld_db_preview_source[1].clear();
+ rc->clear_possibilities(ln_mode_t::SQL, "prql-expr");
+
+ auto orig_prql_stmt = attr_line_t(term_val);
+ orig_prql_stmt.rtrim("| \r\n\t");
+ annotate_sql_statement(orig_prql_stmt);
+ auto cursor_x = rc->get_cursor_x();
+ if (cursor_x > orig_prql_stmt.get_string().length()) {
+ cursor_x = orig_prql_stmt.length() - 1;
+ }
+ auto curr_stage_iter
+ = find_string_attr_containing(orig_prql_stmt.get_attrs(),
+ &lnav::sql::PRQL_STAGE_ATTR,
+ cursor_x);
+ auto curr_stage_prql = orig_prql_stmt.subline(
+ 0, curr_stage_iter->sa_range.lr_end);
+ for (auto riter = curr_stage_prql.get_attrs().rbegin();
+ riter != curr_stage_prql.get_attrs().rend();
+ ++riter)
+ {
+ if (riter->sa_type != &lnav::sql::PRQL_STAGE_ATTR
+ || riter->sa_range.lr_start == 0)
+ {
+ continue;
+ }
+ curr_stage_prql.insert(riter->sa_range.lr_start,
+ "| take 10000 ");
+ }
+ curr_stage_prql.rtrim();
+ curr_stage_prql.append(" | take 5");
+ log_debug("preview prql: %s",
+ curr_stage_prql.get_string().c_str());
+
+ size_t curr_stage_index = 0;
+ if (curr_stage_iter->sa_range.lr_start > 0) {
+ auto prev_stage_iter = find_string_attr_containing(
+ orig_prql_stmt.get_attrs(),
+ &lnav::sql::PRQL_STAGE_ATTR,
+ curr_stage_iter->sa_range.lr_start - 1);
+ auto prev_stage_prql = orig_prql_stmt.subline(
+ 0, prev_stage_iter->sa_range.lr_end);
+ for (auto riter = prev_stage_prql.get_attrs().rbegin();
+ riter != prev_stage_prql.get_attrs().rend();
+ ++riter)
+ {
+ if (riter->sa_type != &lnav::sql::PRQL_STAGE_ATTR
+ || riter->sa_range.lr_start == 0)
+ {
+ continue;
+ }
+ prev_stage_prql.insert(riter->sa_range.lr_start,
+ "| take 10000 ");
+ }
+ prev_stage_prql.append(" | take 5");
+
+ curr_stage_index = 1;
+ auto db_guard = lnav_data.ld_exec_context.enter_db_source(
+ &lnav_data.ld_db_preview_source[0]);
+ auto exec_res = execute_sql(lnav_data.ld_exec_context,
+ prev_stage_prql.get_string(),
+ alt_msg);
+ lnav_data.ld_preview_status_source[0]
+ .get_description()
+ .set_value("Result for query: %s",
+ prev_stage_prql.get_string().c_str());
+ if (exec_res.isOk()) {
+ for (const auto& hdr :
+ lnav_data.ld_db_preview_source[0].dls_headers)
+ {
+ rc->add_possibility(
+ ln_mode_t::SQL,
+ "prql-expr",
+ lnav::prql::quote_ident(hdr.hm_name));
+ }
+
+ lnav_data.ld_preview_view[0].set_sub_source(
+ &lnav_data.ld_db_preview_source[0]);
+ lnav_data.ld_preview_view[0].set_overlay_source(
+ &lnav_data.ld_db_preview_overlay_source[0]);
+ } else {
+ lnav_data.ld_preview_source[0].replace_with(
+ exec_res.unwrapErr().to_attr_line());
+ lnav_data.ld_preview_view[0].set_sub_source(
+ &lnav_data.ld_preview_source[0]);
+ lnav_data.ld_preview_view[0].set_overlay_source(
+ nullptr);
+ }
+ }
+
+ auto db_guard = lnav_data.ld_exec_context.enter_db_source(
+ &lnav_data.ld_db_preview_source[curr_stage_index]);
+ auto exec_res = execute_sql(lnav_data.ld_exec_context,
+ curr_stage_prql.get_string(),
+ alt_msg);
+ auto err = exec_res.isErr()
+ ? exec_res.unwrapErr()
+ : lnav::console::user_message::ok({});
+ if (exec_res.isErr()) {
+ lnav_data.ld_bottom_source.grep_error(
+ err.um_reason.get_string());
+
+ curr_stage_prql.erase(curr_stage_prql.get_string().length()
+ - 9);
+ auto near = curr_stage_prql.get_string().length() - 1;
+ while (near > 0) {
+ auto paren_iter = rfind_string_attr_if(
+ curr_stage_prql.get_attrs(),
+ near,
+ [](const string_attr& sa) {
+ return sa.sa_type
+ == &lnav::sql::PRQL_UNTERMINATED_PAREN_ATTR;
+ });
+
+ if (paren_iter == curr_stage_prql.get_attrs().end()) {
+ break;
+ }
+ switch (
+ curr_stage_prql
+ .get_string()[paren_iter->sa_range.lr_start])
+ {
+ case '(':
+ curr_stage_prql.append(")");
+ break;
+ case '{':
+ curr_stage_prql.append("}");
+ break;
+ }
+ near = paren_iter->sa_range.lr_start - 1;
+ }
+
+ curr_stage_prql.append(" | take 5");
+ auto exec_termed_res
+ = execute_sql(lnav_data.ld_exec_context,
+ curr_stage_prql.get_string(),
+ alt_msg);
+ if (exec_termed_res.isErr()) {
+ err = exec_termed_res.unwrapErr();
+ }
+ } else {
+ lnav_data.ld_bottom_source.grep_error("");
+ }
+
+ rc->add_possibility(
+ ln_mode_t::SQL, "prql-expr", lnav::sql::prql_keywords);
+ for (const auto& pair : lnav::sql::prql_functions) {
+ rc->add_possibility(
+ ln_mode_t::SQL, "prql-expr", pair.first);
+ }
+
+ rl_sql_help(rc);
+
+ lnav_data.ld_preview_status_source[curr_stage_index]
+ .get_description()
+ .set_value("Result for query: %s",
+ curr_stage_prql.get_string().c_str());
+ if (!lnav_data.ld_db_preview_source[curr_stage_index]
+ .dls_headers.empty())
+ {
+ if (curr_stage_index == 0) {
+ for (const auto& hdr :
+ lnav_data.ld_db_preview_source[curr_stage_index]
+ .dls_headers)
+ {
+ rc->add_possibility(
+ ln_mode_t::SQL,
+ "prql-expr",
+ lnav::prql::quote_ident(hdr.hm_name));
+ }
+ }
+
+ lnav_data.ld_preview_view[curr_stage_index].set_sub_source(
+ &lnav_data.ld_db_preview_source[curr_stage_index]);
+ lnav_data.ld_preview_view[curr_stage_index]
+ .set_overlay_source(
+ &lnav_data.ld_db_preview_overlay_source
+ [curr_stage_index]);
+ } else if (exec_res.isErr()) {
+ lnav_data.ld_preview_source[curr_stage_index].replace_with(
+ err.to_attr_line());
+ lnav_data.ld_preview_view[curr_stage_index].set_sub_source(
+ &lnav_data.ld_preview_source[curr_stage_index]);
+ lnav_data.ld_preview_view[curr_stage_index]
+ .set_overlay_source(nullptr);
+ }
+ return;
+ }
+
+ term_val += ";";
+ if (!sqlite3_complete(term_val.c_str())) {
lnav_data.ld_bottom_source.grep_error(
- "sql error: incomplete statement");
+ "SQL error: incomplete statement");
} else {
auto_mem<sqlite3_stmt> stmt(sqlite3_finalize);
int retcode;
@@ -491,7 +768,7 @@ rl_search_internal(readline_curses* rc, ln_mode_t mode, bool complete = false)
const char* errmsg = sqlite3_errmsg(lnav_data.ld_db);
lnav_data.ld_bottom_source.grep_error(
- fmt::format(FMT_STRING("sql error: {}"), errmsg));
+ fmt::format(FMT_STRING("SQL error: {}"), errmsg));
} else {
lnav_data.ld_bottom_source.grep_error("");
}
@@ -499,7 +776,6 @@ rl_search_internal(readline_curses* rc, ln_mode_t mode, bool complete = false)
if (!rl_sql_help(rc)) {
rl_set_help();
- lnav_data.ld_preview_source.clear();
}
return;
}
@@ -538,10 +814,7 @@ lnav_rl_abort(readline_curses* rc)
lnav_data.ld_bottom_source.set_prompt("");
lnav_data.ld_example_source.clear();
lnav_data.ld_doc_source.clear();
- lnav_data.ld_preview_status_source.get_description()
- .set_cylon(false)
- .clear();
- lnav_data.ld_preview_source.clear();
+ clear_preview();
tc->get_highlights().erase({highlight_source_t::PREVIEW, "preview"});
tc->get_highlights().erase({highlight_source_t::PREVIEW, "bodypreview"});
lnav_data.ld_log_source.set_preview_sql_filter(nullptr);
@@ -576,10 +849,7 @@ rl_callback_int(readline_curses* rc, bool is_alt)
lnav_data.ld_bottom_source.set_prompt("");
lnav_data.ld_doc_source.clear();
lnav_data.ld_example_source.clear();
- lnav_data.ld_preview_status_source.get_description()
- .set_cylon(false)
- .clear();
- lnav_data.ld_preview_source.clear();
+ clear_preview();
tc->get_highlights().erase({highlight_source_t::PREVIEW, "preview"});
tc->get_highlights().erase({highlight_source_t::PREVIEW, "bodypreview"});
lnav_data.ld_log_source.set_preview_sql_filter(nullptr);
@@ -697,13 +967,21 @@ rl_callback_int(readline_curses* rc, bool is_alt)
break;
case ln_mode_t::SQL: {
+ auto sql_str = rc->get_value().get_string();
ec.ec_source.back().s_content
- = fmt::format(FMT_STRING(";{}"), rc->get_value().get_string());
+ = fmt::format(FMT_STRING(";{}"), sql_str);
readline_lnav_highlighter(ec.ec_source.back().s_content, -1);
ec.ec_source.back().s_content.with_attr_for_all(
VC_ROLE.value(role_t::VCR_QUOTED_CODE));
- auto result
- = execute_sql(ec, rc->get_value().get_string(), alt_msg);
+
+ rc->set_attr_value(
+ lnav::console::user_message::info(
+ attr_line_t("executing SQL statement, press ")
+ .append("CTRL+]"_hotkey)
+ .append(" to cancel"))
+ .to_attr_line());
+ rc->set_needs_update();
+ auto result = execute_sql(ec, sql_str, alt_msg);
auto& dls = lnav_data.ld_db_row_source;
attr_line_t prompt;
@@ -736,23 +1014,28 @@ rl_callback_int(readline_curses* rc, bool is_alt)
}
case ln_mode_t::EXEC: {
- auto_mem<FILE> tmpout(fclose);
-
- tmpout = std::tmpfile();
+ std::error_code errc;
+ ghc::filesystem::create_directories(lnav::paths::workdir(), errc);
+ auto open_temp_res = lnav::filesystem::open_temp_file(
+ lnav::paths::workdir() / "exec.XXXXXX");
- if (!tmpout) {
+ if (open_temp_res.isErr()) {
rc->set_value(fmt::format(
FMT_STRING("Unable to open temporary output file: {}"),
- strerror(errno)));
+ open_temp_res.unwrapErr()));
} else {
- auto fd_copy = auto_fd::dup_of(fileno(tmpout));
char desc[256], timestamp[32];
time_t current_time = time(nullptr);
const auto path_and_args = rc->get_value();
+ auto tmp_pair = open_temp_res.unwrap();
+ auto fd_copy = tmp_pair.second.dup();
{
exec_context::output_guard og(
- ec, "tmp", std::make_pair(tmpout.release(), fclose));
+ ec,
+ "tmp",
+ std::make_pair(fdopen(tmp_pair.second.release(), "w"),
+ fclose));
auto exec_res
= execute_file(ec, path_and_args.get_string());
@@ -770,22 +1053,24 @@ rl_callback_int(readline_curses* rc, bool is_alt)
}
}
+ tm current_tm;
struct stat st;
if (fstat(fd_copy, &st) != -1 && st.st_size > 0) {
strftime(timestamp,
sizeof(timestamp),
"%a %b %d %H:%M:%S %Z",
- localtime(&current_time));
+ localtime_r(&current_time, &current_tm));
snprintf(desc,
sizeof(desc),
"Output of %s (%s)",
path_and_args.get_string().c_str(),
timestamp);
- lnav_data.ld_active_files.fc_file_names[desc]
- .with_fd(std::move(fd_copy))
+ lnav_data.ld_active_files.fc_file_names[tmp_pair.first]
+ .with_filename(desc)
.with_include_in_session(false)
- .with_detect_format(false);
+ .with_detect_format(false)
+ .with_init_location(0_vl);
lnav_data.ld_files_to_front.emplace_back(desc, 0_vl);
if (lnav_data.ld_rl_view != nullptr) {
@@ -890,7 +1175,7 @@ rl_focus(readline_curses* rc)
auto fos = (field_overlay_source*) lnav_data.ld_views[LNV_LOG]
.get_overlay_source();
- fos->fos_contexts.emplace("", false, true);
+ fos->fos_contexts.emplace("", false, true, true);
get_textview_for_mode(lnav_data.ld_mode)->save_current_search();
}
@@ -902,7 +1187,33 @@ rl_blur(readline_curses* rc)
.get_overlay_source();
fos->fos_contexts.pop();
- lnav_data.ld_views[LNV_LOG].set_sync_selection_and_top(
- fos->fos_contexts.top().c_show);
+ for (auto& tc : lnav_data.ld_views) {
+ tc.set_sync_selection_and_top(false);
+ }
lnav_data.ld_preview_generation += 1;
}
+
+readline_context::split_result_t
+prql_splitter(readline_context& rc, const std::string& cmdline)
+{
+ auto stmt = attr_line_t(cmdline);
+ readline_context::split_result_t retval;
+ readline_context::stage st;
+
+ lnav::sql::annotate_prql_statement(stmt);
+ for (const auto& attr : stmt.get_attrs()) {
+ if (attr.sa_type == &lnav::sql::PRQL_STAGE_ATTR) {
+ } else if (attr.sa_type == &lnav::sql::PRQL_PIPE_ATTR) {
+ retval.sr_stages.emplace_back(st);
+ st.s_args.clear();
+ } else {
+ st.s_args.emplace_back(attr.sa_range);
+ }
+ }
+ if (!cmdline.empty() && isspace(cmdline.back())) {
+ st.s_args.emplace_back(cmdline.length(), cmdline.length());
+ }
+ retval.sr_stages.emplace_back(st);
+
+ return retval;
+}
diff --git a/src/readline_callbacks.hh b/src/readline_callbacks.hh
index d89f4b1..65429c2 100644
--- a/src/readline_callbacks.hh
+++ b/src/readline_callbacks.hh
@@ -30,6 +30,8 @@
#ifndef LNAV_READLINE_CALLBACKS_HH
#define LNAV_READLINE_CALLBACKS_HH
+#include "readline_curses.hh"
+
void rl_set_help();
void rl_change(readline_curses* rc);
void rl_search(readline_curses* rc);
@@ -42,6 +44,9 @@ void rl_completion_request(readline_curses* rc);
void rl_focus(readline_curses* rc);
void rl_blur(readline_curses* rc);
+readline_context::split_result_t prql_splitter(readline_context& rc,
+ const std::string& cmdline);
+
extern const char* RE_HELP;
extern const char* RE_EXAMPLE;
extern const char* SQL_HELP;
diff --git a/src/readline_context.hh b/src/readline_context.hh
index 047cf56..99f1742 100644
--- a/src/readline_context.hh
+++ b/src/readline_context.hh
@@ -44,7 +44,7 @@
class attr_line_t;
struct exec_context;
-typedef void (*readline_highlighter_t)(attr_line_t& line, int x);
+using readline_highlighter_t = void (*)(attr_line_t& line, int x);
/**
* Container for information related to different readline contexts. Since
@@ -53,30 +53,50 @@ typedef void (*readline_highlighter_t)(attr_line_t& line, int x);
*/
class readline_context {
public:
- typedef Result<std::string, lnav::console::user_message> (*command_func_t)(
+ using command_func_t = Result<std::string, lnav::console::user_message> (*)(
exec_context& ec, std::string cmdline, std::vector<std::string>& args);
- typedef std::string (*prompt_func_t)(exec_context& ec,
- const std::string& cmdline);
- typedef struct _command_t {
+
+ struct prompt_result_t {
+ std::string pr_new_prompt;
+ std::string pr_suggestion;
+ };
+
+ struct stage {
+ std::vector<line_range> s_args;
+ };
+
+ struct split_result_t {
+ std::vector<stage> sr_stages;
+ };
+
+ using prompt_func_t
+ = prompt_result_t (*)(exec_context& ec, const std::string& cmdline);
+ using splitter_func_t
+ = split_result_t (*)(readline_context& rc, const std::string& cmdline);
+ using command_t = struct _command_t {
const char* c_name;
command_func_t c_func;
struct help_text c_help;
prompt_func_t c_prompt{nullptr};
+ std::string c_provides;
+ std::set<std::string> c_dependencies;
_command_t(const char* name,
command_func_t func,
help_text help = {},
- prompt_func_t prompt = nullptr) noexcept
+ prompt_func_t prompt = nullptr,
+ std::string provides = {},
+ std::set<std::string> deps = {}) noexcept
: c_name(name), c_func(func), c_help(std::move(help)),
- c_prompt(prompt)
+ c_prompt(prompt), c_provides(provides), c_dependencies(deps)
{
}
_command_t(command_func_t func) noexcept : c_name("anon"), c_func(func)
{
}
- } command_t;
+ };
typedef std::map<std::string, command_t*> command_map_t;
readline_context(std::string name,
@@ -87,6 +107,8 @@ public:
void load();
+ void set_history();
+
void save();
void add_possibility(const std::string& type, const std::string& value)
@@ -113,10 +135,7 @@ public:
return *this;
}
- int get_append_character() const
- {
- return this->rc_append_character;
- }
+ int get_append_character() const { return this->rc_append_character; }
readline_context& set_highlighter(readline_highlighter_t hl)
{
@@ -143,6 +162,12 @@ public:
return this->rc_highlighter;
}
+ readline_context& with_splitter(splitter_func_t sf)
+ {
+ this->rc_splitter = sf;
+ return *this;
+ }
+
static int command_complete(int, int);
std::map<std::string, std::string> rc_prefixes;
@@ -173,11 +198,13 @@ private:
HISTORY_STATE rc_history;
std::map<std::string, std::set<std::string>> rc_possibilities;
std::map<std::string, std::vector<std::string>> rc_prototypes;
+ std::map<std::string, command_t*> rc_commands;
bool rc_case_sensitive;
- int rc_append_character;
+ int rc_append_character{' '};
const char* rc_quote_chars;
readline_highlighter_t rc_highlighter;
std::vector<readline_var> rc_vars;
+ splitter_func_t rc_splitter{nullptr};
};
#endif
diff --git a/src/readline_curses.cc b/src/readline_curses.cc
index f74a45c..326b453 100644
--- a/src/readline_curses.cc
+++ b/src/readline_curses.cc
@@ -30,9 +30,11 @@
*/
#include <errno.h>
+#include <fcntl.h>
#include <signal.h>
#include <stdlib.h>
#include <string.h>
+#include <sys/ioctl.h>
#include <sys/socket.h>
#include <sys/wait.h>
#include <unistd.h>
@@ -56,12 +58,13 @@
#include "base/ansi_scrubber.hh"
#include "base/auto_mem.hh"
+#include "base/fs_util.hh"
+#include "base/itertools.hh"
#include "base/lnav_log.hh"
#include "base/paths.hh"
#include "base/string_util.hh"
#include "fmt/format.h"
#include "fts_fuzzy_match.hh"
-#include "lnav_util.hh"
#include "readline_curses.hh"
#include "shlex.hh"
#include "spookyhash/SpookyV2.h"
@@ -89,6 +92,8 @@ static const char* RL_INIT[] = {
"set menu-complete-display-prefix on",
"TAB: menu-complete",
"\"\\e[Z\": menu-complete-backward",
+ "\"\\eC\": lnav-forward-complete",
+ "\"\\C-f\": lnav-forward-complete",
};
readline_context* readline_context::loaded_context;
@@ -97,6 +102,7 @@ static std::string last_match_str;
static bool last_match_str_valid;
static bool arg_needs_shlex;
static nonstd::optional<std::string> rewrite_line_start;
+static std::string rc_local_suggestion;
static void
sigalrm(int sig)
@@ -235,10 +241,10 @@ readline_context::completion_generator(const char* text_in, int state)
if (arg_needs_shlex) {
shlex arg_lexer(text_str);
- std::map<std::string, std::string> scope;
+ std::map<std::string, scoped_value_t> scope;
std::string result;
- if (arg_lexer.eval(result, scope)) {
+ if (arg_lexer.eval(result, scoped_resolver{&scope})) {
text_str = result;
}
}
@@ -364,28 +370,75 @@ readline_context::attempted_completion(const char* text, int start, int end)
{
char** retval = nullptr;
+ log_info("completion start %d:%d -- %s", start, end, text);
+
+ auto at_start = start == 0;
+ auto cmd_start = 0;
+ auto cmd_key = std::string("__command");
+ if (loaded_context->rc_splitter != nullptr) {
+ auto split_res
+ = loaded_context->rc_splitter(*loaded_context, rl_line_buffer);
+
+ readline_context::command_t* last_cmd = nullptr;
+ for (const auto& stage : split_res.sr_stages) {
+ if (stage.s_args.empty()) {
+ continue;
+ }
+
+ if (stage.s_args.front().lr_start == start) {
+ at_start = true;
+ break;
+ }
+ if (start <= stage.s_args.back().lr_end) {
+ cmd_start = stage.s_args.front().lr_start;
+ }
+ auto cmd_lr = stage.s_args.front();
+ auto cmd_name = std::string(&rl_line_buffer[cmd_lr.lr_start],
+ cmd_lr.length());
+ auto cmd_iter = loaded_context->rc_commands.find(cmd_name);
+ if (cmd_iter == loaded_context->rc_commands.end()) {
+ continue;
+ }
+ last_cmd = cmd_iter->second;
+ }
+ if (last_cmd != nullptr && !last_cmd->c_provides.empty()) {
+ cmd_key
+ = fmt::format(FMT_STRING("__command_{}"), last_cmd->c_provides);
+ }
+ }
+
completion_start = start;
- if (start == 0
- && loaded_context->rc_possibilities.find("__command")
- != loaded_context->rc_possibilities.end())
+ if (text[0] == '\0' && !rc_local_suggestion.empty()) {
+ static std::set<std::string> suggestion_possibilities;
+
+ suggestion_possibilities.clear();
+ suggestion_possibilities.emplace(rc_local_suggestion);
+ arg_possibilities = &suggestion_possibilities;
+ rl_completion_append_character = 0;
+ } else if (at_start
+ && loaded_context->rc_possibilities.find(cmd_key)
+ != loaded_context->rc_possibilities.end())
{
- arg_possibilities = &loaded_context->rc_possibilities["__command"];
+ arg_possibilities = &loaded_context->rc_possibilities[cmd_key];
arg_needs_shlex = false;
rl_completion_append_character = loaded_context->rc_append_character;
} else {
char* space;
std::string cmd;
- std::vector<std::string> prefix;
int point = rl_point;
while (point > 0 && rl_line_buffer[point] != ' ') {
point -= 1;
}
shlex lexer(rl_line_buffer, point);
- std::map<std::string, std::string> scope;
+ std::map<std::string, scoped_value_t> scope;
arg_possibilities = nullptr;
rl_completion_append_character = 0;
- if (lexer.split(prefix, scope)) {
+ auto split_res = lexer.split(scoped_resolver{&scope});
+ if (split_res.isOk()) {
+ auto prefix = split_res.unwrap()
+ | lnav::itertools::map(
+ [](const auto& elem) { return elem.se_value; });
auto prefix2
= fmt::format(FMT_STRING("{}"), fmt::join(prefix, "\x1f"));
auto prefix_iter = loaded_context->rc_prefixes.find(prefix2);
@@ -398,12 +451,12 @@ readline_context::attempted_completion(const char* text, int start, int end)
}
if (arg_possibilities == nullptr) {
- space = strchr(rl_line_buffer, ' ');
+ space = strchr(&rl_line_buffer[cmd_start], ' ');
if (space == nullptr) {
space = rl_line_buffer + strlen(rl_line_buffer);
}
- cmd = std::string(rl_line_buffer, space - rl_line_buffer);
-
+ cmd = std::string(&rl_line_buffer[cmd_start],
+ space - &rl_line_buffer[cmd_start]);
auto iter = loaded_context->rc_prototypes.find(cmd);
if (iter == loaded_context->rc_prototypes.end()) {
@@ -416,71 +469,107 @@ readline_context::attempted_completion(const char* text, int start, int end)
= loaded_context->rc_append_character;
}
} else {
- std::vector<std::string>& proto
- = loaded_context->rc_prototypes[cmd];
+ auto& proto = loaded_context->rc_prototypes[cmd];
if (proto.empty()) {
arg_possibilities = nullptr;
- } else if (proto[0] == "filename") {
+ } else if (proto[0] == "dirname") {
shlex fn_lexer(rl_line_buffer, rl_point);
- std::vector<std::string> fn_list;
- int found = 0;
-
- fn_lexer.split(fn_list, scope);
-
- const auto& last_fn = fn_list.size() <= 1 ? ""
- : fn_list.back();
+ auto split_res = fn_lexer.split(scoped_resolver{&scope});
+ if (split_res.isOk()) {
+ auto fn_list = split_res.unwrap();
+ const auto& last_fn = fn_list.size() <= 1
+ ? ""
+ : fn_list.back().se_value;
- if (last_fn.find(':') != std::string::npos) {
- auto rp_iter = loaded_context->rc_possibilities.find(
- "remote-path");
- if (rp_iter != loaded_context->rc_possibilities.end()) {
- for (const auto& poss : rp_iter->second) {
- if (startswith(poss, last_fn.c_str())) {
- found += 1;
- }
- }
- if (found) {
- arg_possibilities = &rp_iter->second;
- arg_needs_shlex = false;
- }
- }
- if (!found || (endswith(last_fn, "/") && found == 1)) {
- char msg[2048];
-
- snprintf(
- msg, sizeof(msg), "\t:%s", last_fn.c_str());
- sendstring(child_this->rc_command_pipe[1],
- msg,
- strlen(msg));
- }
- }
- if (!found) {
- static std::set<std::string> file_name_set;
+ static std::set<std::string> dir_name_set;
- file_name_set.clear();
+ dir_name_set.clear();
auto_mem<char> completed_fn;
int fn_state = 0;
- auto recent_netlocs_iter
- = loaded_context->rc_possibilities.find(
- "recent-netlocs");
- if (recent_netlocs_iter
- != loaded_context->rc_possibilities.end())
- {
- file_name_set.insert(
- recent_netlocs_iter->second.begin(),
- recent_netlocs_iter->second.end());
- }
while ((completed_fn = rl_filename_completion_function(
last_fn.c_str(), fn_state))
!= nullptr)
{
- file_name_set.insert(completed_fn.in());
+ dir_name_set.insert(completed_fn.in());
fn_state += 1;
}
- arg_possibilities = &file_name_set;
+ arg_possibilities = &dir_name_set;
arg_needs_shlex = true;
+ } else {
+ arg_possibilities = nullptr;
+ }
+ } else if (proto[0] == "filename") {
+ shlex fn_lexer(rl_line_buffer, rl_point);
+ int found = 0;
+
+ auto split_res = fn_lexer.split(scoped_resolver{&scope});
+ if (split_res.isOk()) {
+ auto fn_list = split_res.unwrap();
+ const auto& last_fn = fn_list.size() <= 1
+ ? ""
+ : fn_list.back().se_value;
+
+ if (last_fn.find(':') != std::string::npos) {
+ auto rp_iter
+ = loaded_context->rc_possibilities.find(
+ "remote-path");
+ if (rp_iter
+ != loaded_context->rc_possibilities.end())
+ {
+ for (const auto& poss : rp_iter->second) {
+ if (startswith(poss, last_fn.c_str())) {
+ found += 1;
+ }
+ }
+ if (found) {
+ arg_possibilities = &rp_iter->second;
+ arg_needs_shlex = false;
+ }
+ }
+ if (!found
+ || (endswith(last_fn, "/") && found == 1))
+ {
+ char msg[2048];
+
+ snprintf(
+ msg, sizeof(msg), "\t:%s", last_fn.c_str());
+ sendstring(child_this->rc_command_pipe[1],
+ msg,
+ strlen(msg));
+ }
+ }
+ if (!found) {
+ static std::set<std::string> file_name_set;
+
+ file_name_set.clear();
+ auto_mem<char> completed_fn;
+ int fn_state = 0;
+ auto recent_netlocs_iter
+ = loaded_context->rc_possibilities.find(
+ "recent-netlocs");
+
+ if (recent_netlocs_iter
+ != loaded_context->rc_possibilities.end())
+ {
+ file_name_set.insert(
+ recent_netlocs_iter->second.begin(),
+ recent_netlocs_iter->second.end());
+ }
+ while (
+ (completed_fn = rl_filename_completion_function(
+ last_fn.c_str(), fn_state))
+ != nullptr)
+ {
+ file_name_set.insert(completed_fn.in());
+ fn_state += 1;
+ }
+ arg_possibilities = &file_name_set;
+ arg_needs_shlex = true;
+ }
+ } else {
+ arg_possibilities = nullptr;
}
} else {
arg_possibilities
@@ -500,6 +589,22 @@ readline_context::attempted_completion(const char* text, int start, int end)
}
static int
+lnav_forward_complete(int count, int key)
+{
+ if (!rc_local_suggestion.empty() && rl_point == rl_end) {
+ rl_extend_line_buffer(strlen(rl_line_buffer)
+ + rc_local_suggestion.size() + 1);
+ strcat(rl_line_buffer, rc_local_suggestion.c_str());
+ rl_point = strlen(rl_line_buffer);
+ rl_end = rl_point;
+ rc_local_suggestion.clear();
+ return 0;
+ }
+
+ return rl_forward_char(count, key);
+}
+
+static int
rubout_char_or_abort(int count, int key)
{
if (rl_line_buffer[0] == '\0') {
@@ -546,8 +651,24 @@ readline_context::readline_context(std::string name,
for (iter = commands->begin(); iter != commands->end(); ++iter) {
std::string cmd = iter->first;
+ auto cmd_complete = cmd;
+ const auto& ht = iter->second->c_help;
- this->rc_possibilities["__command"].insert(cmd);
+ if (!ht.ht_parameters.empty()
+ && ht.ht_parameters.front().ht_group_start != nullptr)
+ {
+ cmd_complete.append(" ");
+ cmd_complete.append(ht.ht_parameters.front().ht_group_start);
+ }
+ if (iter->second->c_dependencies.empty()) {
+ this->rc_possibilities["__command"].insert(cmd_complete);
+ } else {
+ for (const auto& dep : iter->second->c_dependencies) {
+ auto cmd_key = fmt::format(FMT_STRING("__command_{}"), dep);
+ this->rc_possibilities[cmd_key].insert(cmd_complete);
+ }
+ }
+ this->rc_commands[cmd] = iter->second;
iter->second->c_func(
INIT_EXEC_CONTEXT, cmd, this->rc_prototypes[cmd]);
}
@@ -560,8 +681,12 @@ readline_context::readline_context(std::string name,
auto hpath = (config_dir / this->rc_name).string() + ".history";
read_history(hpath.c_str());
this->save();
+}
- this->rc_append_character = ' ';
+void
+readline_context::set_history()
+{
+ history_set_history_state(&this->rc_history);
}
void
@@ -690,7 +815,9 @@ readline_curses::start()
}
this->rc_command_pipe[RCF_MASTER] = sp[RCF_MASTER];
+ this->rc_command_pipe[RCF_MASTER].close_on_exec();
this->rc_command_pipe[RCF_SLAVE] = sp[RCF_SLAVE];
+ this->rc_command_pipe[RCF_SLAVE].close_on_exec();
if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &ws) == -1) {
throw error(errno);
@@ -699,21 +826,61 @@ readline_curses::start()
if (this->vc_width > 0) {
ws.ws_col = this->vc_width;
} else if (this->vc_width < 0) {
- ws.ws_col -= this->vc_left;
+ ws.ws_col -= this->vc_x;
ws.ws_col += this->vc_width;
}
- if (openpty(this->rc_pty[RCF_MASTER].out(),
- this->rc_pty[RCF_SLAVE].out(),
- nullptr,
- nullptr,
- &ws)
- < 0)
+
+ auto openpt_res = auto_fd::openpt(O_NOCTTY | O_RDWR);
+ if (openpt_res.isErr()) {
+ log_error("readline_curses: cannot open pty -- %s",
+ openpt_res.unwrapErr().c_str());
+ throw error(errno);
+ }
+
+ this->rc_pty[RCF_MASTER] = openpt_res.unwrap();
+ log_perror(grantpt(this->rc_pty[RCF_MASTER]));
+ log_perror(unlockpt(this->rc_pty[RCF_MASTER]));
+ char slave_path_str[PATH_MAX];
+ if (ptsname_r(
+ this->rc_pty[RCF_MASTER], slave_path_str, sizeof(slave_path_str))
+ == -1)
{
- perror("error: failed to open terminal(openpty)");
+ perror("ptsname_r");
+ throw error(errno);
+ }
+
+ auto slave_path = ghc::filesystem::path(slave_path_str);
+ std::error_code ec;
+ if (!ghc::filesystem::exists(slave_path, ec)) {
+ log_warning("ptsname_r() result does not exist -- %s", slave_path_str);
+#ifdef TIOCGPTN
+ int ptn = 0;
+ if (ioctl(this->rc_pty[RCF_MASTER], TIOCGPTN, &ptn) == 0) {
+ snprintf(
+ slave_path_str, sizeof(slave_path_str), "/dev/ttyp%d", ptn);
+ slave_path = ghc::filesystem::path(slave_path_str);
+ log_warning("... trying %s", slave_path.c_str());
+ }
+#endif
+ }
+ auto slave_open_res = lnav::filesystem::open_file(
+ slave_path, O_RDWR | O_NOCTTY | O_CLOEXEC);
+ if (slave_open_res.isErr()) {
+ log_error("open pseudo failed -- %s",
+ slave_open_res.unwrapErr().c_str());
+ throw error(errno);
+ }
+ this->rc_pty[RCF_SLAVE] = slave_open_res.unwrap();
+
+ if (ioctl(this->rc_pty[RCF_SLAVE], TIOCSWINSZ, &ws) == -1) {
throw error(errno);
}
+ this->rc_pty[RCF_MASTER].close_on_exec();
+ this->rc_pty[RCF_SLAVE].close_on_exec();
+
if ((this->rc_child = fork()) == -1) {
+ log_error("fork() failed -- %s", strerror(errno));
throw error(errno);
}
@@ -731,7 +898,7 @@ readline_curses::start()
signal(SIGALRM, sigalrm);
signal(SIGWINCH, sigwinch);
- signal(SIGINT, sigterm);
+ signal(SIGINT, SIG_IGN);
signal(SIGTERM, sigterm);
dup2(this->rc_pty[RCF_SLAVE], STDIN_FILENO);
@@ -743,6 +910,7 @@ readline_curses::start()
using_history();
stifle_history(HISTORY_SIZE);
+ rl_add_defun("lnav-forward-complete", lnav_forward_complete, -1);
rl_add_defun("rubout-char-or-abort", rubout_char_or_abort, '\b');
rl_add_defun("alt-done", alt_done_func, '\x0a');
// rl_add_defun("command-complete", readline_context::command_complete,
@@ -750,7 +918,10 @@ readline_curses::start()
for (const auto* init_cmd : RL_INIT) {
snprintf(buffer, sizeof(buffer), "%s", init_cmd);
- rl_parse_and_bind(buffer); /* NOTE: buffer is modified */
+ /* NOTE: buffer is modified */
+ if (rl_parse_and_bind(buffer)) {
+ log_error("rl_parse_and_bind(%s) failed", init_cmd);
+ }
}
child_this = this;
@@ -767,6 +938,8 @@ readline_curses::start()
maxfd = std::max(STDIN_FILENO, this->rc_command_pipe[RCF_SLAVE].get());
+ static uint64_t last_h1, last_h2;
+
while (looping) {
fd_set ready_rfds;
int rc;
@@ -785,8 +958,6 @@ readline_curses::start()
}
} else {
if (FD_ISSET(STDIN_FILENO, &ready_rfds)) {
- static uint64_t last_h1, last_h2;
-
struct itimerval itv;
itv.it_value.tv_sec = 0;
@@ -794,7 +965,6 @@ readline_curses::start()
itv.it_interval.tv_sec = 0;
itv.it_interval.tv_usec = 0;
setitimer(ITIMER_REAL, &itv, nullptr);
-
rl_callback_read_char();
if (RL_ISSTATE(RL_STATE_DONE) && !got_line) {
got_line = 1;
@@ -842,14 +1012,17 @@ readline_curses::start()
if (h1 == last_h1 && h2 == last_h2) {
// do nothing
- } else if (sendcmd(this->rc_command_pipe[RCF_SLAVE],
- complete_done ? 'l' : 'c',
- rl_line_buffer,
- rl_end)
- != 0)
- {
- perror("line: write failed");
- _exit(1);
+ } else {
+ rc_local_suggestion.clear();
+ if (sendcmd(this->rc_command_pipe[RCF_SLAVE],
+ complete_done ? 'l' : 'c',
+ rl_line_buffer,
+ rl_end)
+ != 0)
+ {
+ perror("line: write failed");
+ _exit(1);
+ }
}
last_h1 = h1;
last_h2 = h2;
@@ -862,7 +1035,7 @@ readline_curses::start()
}
}
if (FD_ISSET(this->rc_command_pipe[RCF_SLAVE], &ready_rfds)) {
- char msg[1024 + 1];
+ char msg[8 + MAXPATHLEN + 1024];
if ((rc = recvstring(this->rc_command_pipe[RCF_SLAVE],
msg,
@@ -871,11 +1044,31 @@ readline_curses::start()
{
looping = false;
} else {
- int context, prompt_start = 0;
+ int context, prompt_start = 0, new_point = 0;
char type[1024];
msg[rc] = '\0';
- if (sscanf(msg, "i:%d:%n", &rl_point, &prompt_start) == 1) {
+ if (startswith(msg, "cd:")) {
+ const char* cwd = &msg[3];
+
+ log_perror(chdir(cwd));
+ } else if (startswith(msg, "sugg:")) {
+ rc_local_suggestion = &msg[5];
+ } else if (sscanf(msg, "x:%d", &new_point) == 1) {
+ if (rl_prompt) {
+ new_point -= strlen(rl_prompt);
+ }
+ if (new_point < 0) {
+ new_point = 0;
+ }
+ if (new_point > rl_end) {
+ new_point = rl_end;
+ }
+ rl_point = new_point;
+ rl_redisplay();
+ } else if (sscanf(msg, "i:%d:%n", &rl_point, &prompt_start)
+ == 1)
+ {
const char* initial = &msg[prompt_start];
rl_extend_line_buffer(strlen(initial) + 1);
@@ -978,6 +1171,11 @@ readline_curses::start()
this->rc_contexts[context]->rem_possibility(
std::string(type), std::string(&msg[prompt_start]));
+ } else if (sscanf(msg, "ah:%d:%n", &context, &prompt_start)
+ == 1)
+ {
+ this->rc_contexts[context]->set_history();
+ add_history(&msg[prompt_start]);
} else if (sscanf(msg, "cpre:%d", &context) == 1) {
this->rc_contexts[context]->rc_prefixes.clear();
} else if (sscanf(msg, "cp:%d:%s", &context, type)) {
@@ -1020,6 +1218,7 @@ readline_curses::start()
struct winsize new_ws;
if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &new_ws) == -1) {
+ log_error("ioctl() failed -- %s", strerror(errno));
throw error(errno);
}
got_winch = 0;
@@ -1110,6 +1309,23 @@ readline_curses::line_ready(const char* line)
}
void
+readline_curses::append_to_history(int context, const std::string& line)
+{
+ if (line.empty()) {
+ return;
+ }
+
+ char buffer[2048];
+ snprintf(buffer, sizeof(buffer), "ah:%d:%s", context, line.c_str());
+ if (sendstring(
+ this->rc_command_pipe[RCF_MASTER], buffer, strlen(buffer) + 1)
+ == -1)
+ {
+ perror("add_possibility: write failed");
+ }
+}
+
+void
readline_curses::check_poll_set(const std::vector<struct pollfd>& pollfds)
{
int rc;
@@ -1119,10 +1335,10 @@ readline_curses::check_poll_set(const std::vector<struct pollfd>& pollfds)
rc = read(this->rc_pty[RCF_MASTER], buffer, sizeof(buffer));
if (rc > 0) {
- int old_x = this->vc_x;
+ int old_x = this->vc_cursor_x;
this->map_output(buffer, rc);
- if (this->vc_x != old_x) {
+ if (this->vc_cursor_x != old_x) {
this->rc_change(this);
}
}
@@ -1205,9 +1421,10 @@ readline_curses::check_poll_set(const std::vector<struct pollfd>& pollfds)
this->rc_blur(this);
break;
- case 'l':
+ case 'l': {
this->rc_line_buffer = &msg[2];
if (this->rc_active_context != -1) {
+ this->rc_suggestion.clear();
this->rc_change(this);
}
this->rc_matches.clear();
@@ -1215,9 +1432,11 @@ readline_curses::check_poll_set(const std::vector<struct pollfd>& pollfds)
this->rc_display_match(this);
}
break;
+ }
case 'c':
this->rc_line_buffer = &msg[2];
+ this->rc_suggestion.clear();
this->rc_change(this);
this->rc_display_match(this);
break;
@@ -1247,12 +1466,21 @@ readline_curses::focus(int context,
const std::string& prompt,
const std::string& initial)
{
- char buffer[1024];
+ char cwd[MAXPATHLEN + 1024];
+ char buffer[8 + sizeof(cwd)];
curs_set(1);
this->rc_active_context = context;
+ getcwd(cwd, sizeof(cwd));
+ snprintf(buffer, sizeof(buffer), "cd:%s", cwd);
+ if (sendstring(
+ this->rc_command_pipe[RCF_MASTER], buffer, strlen(buffer) + 1)
+ == -1)
+ {
+ perror("focus: write failed");
+ }
snprintf(buffer, sizeof(buffer), "f:%d:%s", context, prompt.c_str());
if (sendstring(
this->rc_command_pipe[RCF_MASTER], buffer, strlen(buffer) + 1)
@@ -1260,8 +1488,13 @@ readline_curses::focus(int context,
{
perror("focus: write failed");
}
- wmove(this->vc_window, this->get_actual_y(), this->vc_left);
- wclrtoeol(this->vc_window);
+ auto al = attr_line_t();
+ al.append(lnav::roles::suggestion(this->rc_suggestion));
+ view_curses::mvwattrline(this->vc_window,
+ this->get_actual_y(),
+ this->vc_x,
+ al,
+ line_range{0, (int) this->get_actual_width()});
if (!initial.empty()) {
this->rewrite_line(initial.size(), initial);
}
@@ -1284,11 +1517,27 @@ readline_curses::rewrite_line(int pos, const std::string& value)
}
void
+readline_curses::set_suggestion(const std::string& value)
+{
+ char buffer[1024];
+
+ snprintf(buffer, sizeof(buffer), "sugg:%s", value.c_str());
+ if (sendstring(
+ this->rc_command_pipe[RCF_MASTER], buffer, strlen(buffer) + 1)
+ == -1)
+ {
+ perror("set_suggestion: write failed");
+ }
+ this->rc_suggestion = value;
+ this->set_needs_update();
+}
+
+void
readline_curses::abort()
{
char buffer[1024];
- this->vc_x = 0;
+ this->vc_cursor_x = 0;
snprintf(buffer, sizeof(buffer), "a");
if (sendstring(this->rc_command_pipe[RCF_MASTER], buffer, strlen(buffer))
== -1)
@@ -1393,11 +1642,11 @@ readline_curses::clear_possibilities(int context, std::string type)
}
}
-void
+bool
readline_curses::do_update()
{
if (!this->vc_visible || this->vc_window == nullptr) {
- return;
+ return false;
}
auto actual_width = this->get_actual_width();
@@ -1407,7 +1656,7 @@ readline_curses::do_update()
attr_line_t alt_al;
auto& vc = view_colors::singleton();
- wmove(this->vc_window, this->get_actual_y(), this->vc_left);
+ wmove(this->vc_window, this->get_actual_y(), this->vc_x);
auto attrs = vc.attrs_for_role(role_t::VCR_TEXT);
wattr_set(this->vc_window,
attrs.ta_attrs,
@@ -1435,35 +1684,58 @@ readline_curses::do_update()
lr.lr_end = this->rc_value.length();
view_curses::mvwattrline(this->vc_window,
this->get_actual_y(),
- this->vc_left,
+ this->vc_x,
this->rc_value,
lr);
- this->set_x(0);
+ this->set_cursor_x(0);
}
if (this->rc_active_context != -1) {
- readline_context* rc = this->rc_contexts[this->rc_active_context];
- readline_highlighter_t hl = rc->get_highlighter();
- attr_line_t al = this->vc_line;
+ auto* rc = this->rc_contexts[this->rc_active_context];
+ auto hl = rc->get_highlighter();
+ auto al = this->vc_line;
if (hl != nullptr) {
- hl(al, this->vc_left + this->vc_x);
+ hl(al, this->vc_x + this->vc_cursor_x);
}
+ al.append(lnav::roles::suggestion(this->rc_suggestion));
view_curses::mvwattrline(this->vc_window,
this->get_actual_y(),
- this->vc_left,
+ this->vc_x,
al,
line_range{0, (int) actual_width});
- wmove(
- this->vc_window, this->get_actual_y(), this->vc_left + this->vc_x);
+ wmove(this->vc_window,
+ this->get_actual_y(),
+ this->vc_x + this->vc_cursor_x);
+ }
+
+ return true;
+}
+
+bool
+readline_curses::handle_mouse(mouse_event& me)
+{
+ if (this->rc_active_context == -1) {
+ return false;
+ }
+
+ char buffer[32];
+
+ snprintf(buffer, sizeof(buffer), "x:%d", me.me_x);
+ if (sendstring(
+ this->rc_command_pipe[RCF_MASTER], buffer, strlen(buffer) + 1)
+ == -1)
+ {
+ perror("handle_mouse: write failed");
}
+ return true;
}
std::string
readline_curses::get_match_string() const
{
- auto len = std::min((size_t) this->vc_x, this->rc_line_buffer.size())
+ auto len = std::min((size_t) this->vc_cursor_x, this->rc_line_buffer.size())
- this->rc_match_start;
auto* context = this->get_active_context();
@@ -1520,15 +1792,17 @@ readline_curses::window_change()
struct winsize ws;
if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &ws) == -1) {
+ log_error("ioctl() failed -- %s", strerror(errno));
throw error(errno);
}
if (this->vc_width > 0) {
ws.ws_col = this->vc_width;
} else if (this->vc_width < 0) {
- ws.ws_col -= this->vc_left;
+ ws.ws_col -= this->vc_x;
ws.ws_col += this->vc_width;
}
if (ioctl(this->rc_pty[RCF_MASTER], TIOCSWINSZ, &ws) == -1) {
+ log_error("ioctl() failed -- %s", strerror(errno));
throw error(errno);
}
kill(this->rc_child, SIGWINCH);
diff --git a/src/readline_curses.hh b/src/readline_curses.hh
index 55b2ff3..ac9f572 100644
--- a/src/readline_curses.hh
+++ b/src/readline_curses.hh
@@ -171,6 +171,10 @@ public:
void rewrite_line(int pos, const std::string& value);
+ void set_suggestion(const std::string& value);
+
+ bool is_active() const { return this->rc_active_context != -1; }
+
readline_context* get_active_context() const
{
require(this->rc_active_context != -1);
@@ -184,7 +188,9 @@ public:
void start();
- void do_update() override;
+ bool do_update() override;
+
+ bool handle_mouse(mouse_event& me) override;
void window_change();
@@ -272,6 +278,8 @@ public:
this->clear_possibilities(lnav::enums::to_underlying(context), args...);
}
+ void append_to_history(int context, const std::string& line);
+
const std::vector<std::string>& get_matches() const
{
return this->rc_matches;
@@ -328,6 +336,7 @@ private:
bool rc_is_alt_focus{false};
bool rc_ready_for_input{false};
std::string rc_remote_complete_path;
+ std::string rc_suggestion;
action rc_focus;
action rc_change;
diff --git a/src/readline_highlighters.cc b/src/readline_highlighters.cc
index 58c537c..9fe8418 100644
--- a/src/readline_highlighters.cc
+++ b/src/readline_highlighters.cc
@@ -41,10 +41,6 @@
#include "sql_util.hh"
#include "view_curses.hh"
-static void readline_sqlite_highlighter_int(attr_line_t& al,
- int x,
- line_range sub);
-
static bool
is_bracket(const std::string& str, int index, bool is_lit)
{
@@ -237,12 +233,13 @@ readline_command_highlighter(attr_line_t& al, int x)
al, x, line_range{0, (int) al.get_string().length()});
}
-static void
+void
readline_sqlite_highlighter_int(attr_line_t& al, int x, line_range sub)
{
static const char* brackets[] = {
"[]",
"()",
+ "{}",
nullptr,
};
@@ -260,10 +257,14 @@ readline_sqlite_highlighter_int(attr_line_t& al, int x, line_range sub)
sub.lr_start + attr.sa_range.lr_end,
};
if (attr.sa_type == &SQL_COMMAND_ATTR
- || attr.sa_type == &SQL_KEYWORD_ATTR)
+ || attr.sa_type == &SQL_KEYWORD_ATTR
+ || attr.sa_type == &lnav::sql::PRQL_KEYWORD_ATTR
+ || attr.sa_type == &lnav::sql::PRQL_TRANSFORM_ATTR)
{
alb.overlay_attr(lr, VC_ROLE.value(role_t::VCR_KEYWORD));
- } else if (attr.sa_type == &SQL_IDENTIFIER_ATTR) {
+ } else if (attr.sa_type == &SQL_IDENTIFIER_ATTR
+ || attr.sa_type == &lnav::sql::PRQL_IDENTIFIER_ATTR)
+ {
if (!attr.sa_range.contains(x) && attr.sa_range.lr_end != x) {
alb.overlay_attr(lr, VC_ROLE.value(role_t::VCR_IDENTIFIER));
}
@@ -271,7 +272,9 @@ readline_sqlite_highlighter_int(attr_line_t& al, int x, line_range sub)
alb.overlay_attr(
line_range{lr.lr_start, (int) line.find('(', lr.lr_start)},
VC_ROLE.value(role_t::VCR_SYMBOL));
- } else if (attr.sa_type == &SQL_NUMBER_ATTR) {
+ } else if (attr.sa_type == &SQL_NUMBER_ATTR
+ || attr.sa_type == &lnav::sql::PRQL_NUMBER_ATTR)
+ {
alb.overlay_attr(lr, VC_ROLE.value(role_t::VCR_NUMBER));
} else if (attr.sa_type == &SQL_STRING_ATTR) {
if (lr.length() > 1 && al.al_string[lr.lr_end - 1] == '\'') {
@@ -282,9 +285,15 @@ readline_sqlite_highlighter_int(attr_line_t& al, int x, line_range sub)
alb.overlay_attr_for_char(lr.lr_start,
VC_ROLE.value(role_t::VCR_ERROR));
}
- } else if (attr.sa_type == &SQL_OPERATOR_ATTR) {
+ } else if (attr.sa_type == &lnav::sql::PRQL_STRING_ATTR) {
+ alb.overlay_attr(lr, VC_ROLE.value(role_t::VCR_STRING));
+ } else if (attr.sa_type == &SQL_OPERATOR_ATTR
+ || attr.sa_type == &lnav::sql::PRQL_OPERATOR_ATTR)
+ {
alb.overlay_attr(lr, VC_ROLE.value(role_t::VCR_SYMBOL));
- } else if (attr.sa_type == &SQL_COMMENT_ATTR) {
+ } else if (attr.sa_type == &SQL_COMMENT_ATTR
+ || attr.sa_type == &lnav::sql::PRQL_COMMENT_ATTR)
+ {
alb.overlay_attr(lr, VC_ROLE.value(role_t::VCR_COMMENT));
}
}
@@ -306,63 +315,77 @@ readline_shlex_highlighter_int(attr_line_t& al, int x, line_range sub)
{
attr_line_builder alb(al);
const auto& str = al.get_string();
- string_fragment cap;
- shlex_token_t token;
nonstd::optional<int> quote_start;
shlex lexer(string_fragment{al.al_string.data(), sub.lr_start, sub.lr_end});
+ bool done = false;
+
+ while (!done) {
+ auto tokenize_res = lexer.tokenize();
+ if (tokenize_res.isErr()) {
+ auto te = tokenize_res.unwrapErr();
+
+ alb.overlay_attr(line_range(sub.lr_start + te.te_source.sf_begin,
+ sub.lr_start + te.te_source.sf_end),
+ VC_STYLE.value(text_attrs{A_REVERSE}));
+ alb.overlay_attr(line_range(sub.lr_start + te.te_source.sf_begin,
+ sub.lr_start + te.te_source.sf_end),
+ VC_ROLE.value(role_t::VCR_ERROR));
+ return;
+ }
- while (lexer.tokenize(cap, token)) {
- switch (token) {
- case shlex_token_t::ST_ERROR:
- alb.overlay_attr(line_range(sub.lr_start + cap.sf_begin,
- sub.lr_start + cap.sf_end),
- VC_STYLE.value(text_attrs{A_REVERSE}));
- alb.overlay_attr(line_range(sub.lr_start + cap.sf_begin,
- sub.lr_start + cap.sf_end),
- VC_ROLE.value(role_t::VCR_ERROR));
+ auto token = tokenize_res.unwrap();
+ switch (token.tr_token) {
+ case shlex_token_t::eof:
+ done = true;
break;
- case shlex_token_t::ST_TILDE:
- case shlex_token_t::ST_ESCAPE:
- alb.overlay_attr(line_range(sub.lr_start + cap.sf_begin,
- sub.lr_start + cap.sf_end),
- VC_ROLE.value(role_t::VCR_SYMBOL));
+ case shlex_token_t::tilde:
+ case shlex_token_t::escape:
+ alb.overlay_attr(
+ line_range(sub.lr_start + token.tr_frag.sf_begin,
+ sub.lr_start + token.tr_frag.sf_end),
+ VC_ROLE.value(role_t::VCR_SYMBOL));
break;
- case shlex_token_t::ST_DOUBLE_QUOTE_START:
- case shlex_token_t::ST_SINGLE_QUOTE_START:
- quote_start = sub.lr_start + cap.sf_begin;
+ case shlex_token_t::double_quote_start:
+ case shlex_token_t::single_quote_start:
+ quote_start = sub.lr_start + token.tr_frag.sf_begin;
break;
- case shlex_token_t::ST_DOUBLE_QUOTE_END:
- case shlex_token_t::ST_SINGLE_QUOTE_END:
+ case shlex_token_t::double_quote_end:
+ case shlex_token_t::single_quote_end:
alb.overlay_attr(
- line_range(quote_start.value(), sub.lr_start + cap.sf_end),
+ line_range(quote_start.value(),
+ sub.lr_start + token.tr_frag.sf_end),
VC_ROLE.value(role_t::VCR_STRING));
quote_start = nonstd::nullopt;
break;
- case shlex_token_t::ST_VARIABLE_REF:
- case shlex_token_t::ST_QUOTED_VARIABLE_REF: {
- int extra = token == shlex_token_t::ST_VARIABLE_REF ? 0 : 1;
- auto ident = str.substr(sub.lr_start + cap.sf_begin + 1 + extra,
- cap.length() - 1 - extra * 2);
+ case shlex_token_t::variable_ref:
+ case shlex_token_t::quoted_variable_ref: {
+ int extra = token.tr_token == shlex_token_t::variable_ref ? 0
+ : 1;
+ auto ident = str.substr(
+ sub.lr_start + token.tr_frag.sf_begin + 1 + extra,
+ token.tr_frag.length() - 1 - extra * 2);
alb.overlay_attr(
- line_range(sub.lr_start + cap.sf_begin,
- sub.lr_start + cap.sf_begin + 1 + extra),
+ line_range(
+ sub.lr_start + token.tr_frag.sf_begin,
+ sub.lr_start + token.tr_frag.sf_begin + 1 + extra),
VC_ROLE.value(role_t::VCR_SYMBOL));
alb.overlay_attr(
- line_range(sub.lr_start + cap.sf_begin + 1 + extra,
- sub.lr_start + cap.sf_end - extra),
- VC_ROLE.value(
- x == sub.lr_start + cap.sf_end
- || (cap.sf_begin <= x && x < cap.sf_end)
- ? role_t::VCR_SYMBOL
- : role_t::VCR_IDENTIFIER));
+ line_range(
+ sub.lr_start + token.tr_frag.sf_begin + 1 + extra,
+ sub.lr_start + token.tr_frag.sf_end - extra),
+ VC_ROLE.value(x == sub.lr_start + token.tr_frag.sf_end
+ || (token.tr_frag.sf_begin <= x
+ && x < token.tr_frag.sf_end)
+ ? role_t::VCR_SYMBOL
+ : role_t::VCR_IDENTIFIER));
if (extra) {
alb.overlay_attr_for_char(
- sub.lr_start + cap.sf_end - 1,
+ sub.lr_start + token.tr_frag.sf_end - 1,
VC_ROLE.value(role_t::VCR_SYMBOL));
}
break;
}
- case shlex_token_t::ST_WHITESPACE:
+ case shlex_token_t::whitespace:
break;
}
}
diff --git a/src/readline_highlighters.hh b/src/readline_highlighters.hh
index e2b83dd..78b9075 100644
--- a/src/readline_highlighters.hh
+++ b/src/readline_highlighters.hh
@@ -38,6 +38,7 @@ void readline_regex_highlighter(attr_line_t& line, int x);
void readline_command_highlighter(attr_line_t& line, int x);
+void readline_sqlite_highlighter_int(attr_line_t& line, int x, line_range sub);
void readline_sqlite_highlighter(attr_line_t& line, int x);
void readline_shlex_highlighter_int(attr_line_t& al, int x, line_range sub);
diff --git a/src/readline_possibilities.cc b/src/readline_possibilities.cc
index f0b8f17..0ba2d8f 100644
--- a/src/readline_possibilities.cc
+++ b/src/readline_possibilities.cc
@@ -32,12 +32,16 @@
#include "readline_possibilities.hh"
+#include "base/fs_util.hh"
#include "base/isc.hh"
#include "base/opt_util.hh"
#include "config.h"
#include "data_parser.hh"
+#include "date/tz.h"
#include "lnav.hh"
#include "lnav_config.hh"
+#include "log_data_helper.hh"
+#include "log_format_ext.hh"
#include "service_tags.hh"
#include "session_data.hh"
#include "sql_help.hh"
@@ -69,15 +73,57 @@ handle_db_list(void* ptr, int ncols, char** colvalues, char** colnames)
return 0;
}
+static size_t
+files_with_format(log_format* format)
+{
+ auto retval = size_t{0};
+ for (const auto& lf : lnav_data.ld_active_files.fc_files) {
+ if (lf->get_format_name() == format->get_name()) {
+ retval += 1;
+ }
+ }
+
+ return retval;
+}
+
static int
handle_table_list(void* ptr, int ncols, char** colvalues, char** colnames)
{
if (lnav_data.ld_rl_view != nullptr) {
std::string table_name = colvalues[0];
+ intern_string_t table_intern = intern_string::lookup(table_name);
+ auto format = log_format::find_root_format(table_name.c_str());
+ auto add_poss = true;
+
+ if (format != nullptr) {
+ if (files_with_format(format.get()) == 0) {
+ add_poss = false;
+ }
+ } else if (sqlite_function_help.count(table_name) != 0) {
+ add_poss = false;
+ } else {
+ for (const auto& lf : log_format::get_root_formats()) {
+ auto* elf = dynamic_cast<external_log_format*>(lf.get());
+ if (elf == nullptr) {
+ continue;
+ }
+
+ if (elf->elf_search_tables.find(table_intern)
+ != elf->elf_search_tables.end()
+ && files_with_format(lf.get()) == 0)
+ {
+ add_poss = false;
+ }
+ }
+ }
- if (sqlite_function_help.count(table_name) == 0) {
+ if (add_poss) {
lnav_data.ld_rl_view->add_possibility(
- ln_mode_t::SQL, "*", colvalues[0]);
+ ln_mode_t::SQL, "*", table_name);
+ lnav_data.ld_rl_view->add_possibility(
+ ln_mode_t::SQL,
+ "prql-table",
+ lnav::prql::quote_ident(std::move(table_name)));
}
lnav_data.ld_table_ddl[colvalues[0]] = colvalues[1];
@@ -152,9 +198,8 @@ add_text_possibilities(readline_curses* rlc,
switch (tq) {
case text_quoting::sql: {
auto token_value = tok_res->to_string();
- auto_mem<char, sqlite3_free> quoted_token;
-
- quoted_token = sqlite3_mprintf("%Q", token_value.c_str());
+ auto quoted_token
+ = lnav::sql::mprintf("%Q", token_value.c_str());
rlc->add_possibility(context, type, std::string(quoted_token));
break;
}
@@ -265,9 +310,7 @@ add_filter_expr_possibilities(readline_curses* rlc,
continue;
}
- auto_mem<char> ident(sqlite3_free);
-
- ident = sql_quote_ident(lv.lv_meta.lvm_name.get());
+ auto ident = sql_quote_ident(lv.lv_meta.lvm_name.get());
auto bound_name = fmt::format(FMT_STRING(":{}"), ident.in());
rlc->add_possibility(context, type, bound_name);
switch (lv.lv_meta.lvm_kind) {
@@ -377,15 +420,17 @@ add_file_possibilities()
rc->clear_possibilities(ln_mode_t::COMMAND, "visible-files");
rc->clear_possibilities(ln_mode_t::COMMAND, "hidden-files");
+ rc->clear_possibilities(ln_mode_t::COMMAND, "loaded-files");
for (const auto& lf : lnav_data.ld_active_files.fc_files) {
if (lf.get() == nullptr) {
continue;
}
- lnav_data.ld_log_source.find_data(lf) | [&lf, rc](auto ld) {
- auto escaped_fn
- = std::regex_replace(lf->get_filename(), sh_escape, R"(\\\1)");
+ auto escaped_fn = fmt::to_string(lf->get_filename());
+ rc->add_possibility(ln_mode_t::COMMAND, "loaded-files", escaped_fn);
+
+ lnav_data.ld_log_source.find_data(lf) | [&escaped_fn, rc](auto ld) {
rc->add_possibility(
ln_mode_t::COMMAND,
ld->is_visible() ? "visible-files" : "hidden-files",
@@ -420,7 +465,7 @@ add_config_possibilities()
std::set<std::string> visited;
auto cb = [rc, &visited](const json_path_handler_base& jph,
const std::string& path,
- void* mem) {
+ const void* mem) {
if (jph.jph_children) {
const auto named_caps = jph.jph_regex->get_named_captures();
@@ -481,10 +526,10 @@ add_tag_possibilities()
if (lnav_data.ld_view_stack.top().value_or(nullptr)
== &lnav_data.ld_views[LNV_LOG])
{
- logfile_sub_source& lss = lnav_data.ld_log_source;
+ auto& lss = lnav_data.ld_log_source;
if (lss.text_line_count() > 0) {
auto line_meta_opt = lss.find_bookmark_metadata(
- lnav_data.ld_views[LNV_LOG].get_top());
+ lnav_data.ld_views[LNV_LOG].get_selection());
if (line_meta_opt) {
rc->add_possibility(ln_mode_t::COMMAND,
"line-tags",
@@ -504,7 +549,143 @@ add_recent_netlocs_possibilities()
isc::to<tailer::looper&, services::remote_tailer_t>().send_and_wait(
[&netlocs](auto& tlooper) { netlocs = tlooper.active_netlocs(); });
- netlocs.insert(session_data.sd_recent_netlocs.begin(),
- session_data.sd_recent_netlocs.end());
+ netlocs.insert(recent_refs.rr_netlocs.begin(),
+ recent_refs.rr_netlocs.end());
rc->add_possibility(ln_mode_t::COMMAND, "recent-netlocs", netlocs);
}
+
+void
+add_tz_possibilities(ln_mode_t context)
+{
+ auto* rc = lnav_data.ld_rl_view;
+
+ rc->clear_possibilities(context, "timezone");
+ for (const auto& tz : date::get_tzdb().zones) {
+ rc->add_possibility(context, "timezone", tz.name());
+ }
+
+ {
+ static auto& safe_options_hier
+ = injector::get<lnav::safe_file_options_hier&>();
+
+ safe::ReadAccess<lnav::safe_file_options_hier> options_hier(
+ safe_options_hier);
+ rc->clear_possibilities(context, "file-with-zone");
+ for (const auto& hier_pair : options_hier->foh_path_to_collection) {
+ for (const auto& coll_pair :
+ hier_pair.second.foc_pattern_to_options)
+ {
+ rc->add_possibility(context, "file-with-zone", coll_pair.first);
+ }
+ }
+ }
+}
+
+void
+add_sqlite_possibilities()
+{
+ // Hidden columns don't show up in the table_info pragma.
+ static const char* hidden_table_columns[] = {
+ "log_time_msecs",
+ "log_path",
+ "log_text",
+ "log_body",
+
+ nullptr,
+ };
+
+ auto& log_view = lnav_data.ld_views[LNV_LOG];
+
+ add_env_possibilities(ln_mode_t::SQL);
+
+ lnav_data.ld_rl_view->add_possibility(
+ ln_mode_t::SQL, "prql-expr", lnav::sql::prql_keywords);
+ for (const auto& pair : lnav::sql::prql_functions) {
+ lnav_data.ld_rl_view->add_possibility(
+ ln_mode_t::SQL, "prql-expr", pair.first);
+ }
+
+ if (log_view.get_inner_height() > 0) {
+ log_data_helper ldh(lnav_data.ld_log_source);
+ auto vl = log_view.get_selection();
+ auto cl = lnav_data.ld_log_source.at_base(vl);
+
+ ldh.parse_line(cl);
+
+ for (const auto& jextra : ldh.ldh_extra_json) {
+ lnav_data.ld_rl_view->add_possibility(
+ ln_mode_t::SQL,
+ "*",
+ lnav::sql::mprintf("%Q", jextra.first.c_str()).in());
+ }
+ for (const auto& jpair : ldh.ldh_json_pairs) {
+ for (const auto& wt : jpair.second) {
+ lnav_data.ld_rl_view->add_possibility(
+ ln_mode_t::SQL,
+ "*",
+ lnav::sql::mprintf("%Q", wt.wt_ptr.c_str()).in());
+ }
+ }
+ for (const auto& xml_pair : ldh.ldh_xml_pairs) {
+ lnav_data.ld_rl_view->add_possibility(
+ ln_mode_t::SQL,
+ "*",
+ lnav::sql::mprintf("%Q", xml_pair.first.second.c_str()).in());
+ }
+ }
+
+ lnav_data.ld_rl_view->clear_possibilities(ln_mode_t::SQL, "*");
+ add_view_text_possibilities(lnav_data.ld_rl_view,
+ ln_mode_t::SQL,
+ "*",
+ &log_view,
+ text_quoting::sql);
+
+ lnav_data.ld_rl_view->add_possibility(
+ ln_mode_t::SQL, "*", std::begin(sql_keywords), std::end(sql_keywords));
+ lnav_data.ld_rl_view->add_possibility(
+ ln_mode_t::SQL, "*", sql_function_names);
+ lnav_data.ld_rl_view->add_possibility(
+ ln_mode_t::SQL, "*", hidden_table_columns);
+
+ for (int lpc = 0; sqlite_registration_funcs[lpc]; lpc++) {
+ struct FuncDef* basic_funcs;
+ struct FuncDefAgg* agg_funcs;
+
+ sqlite_registration_funcs[lpc](&basic_funcs, &agg_funcs);
+ for (int lpc2 = 0; basic_funcs && basic_funcs[lpc2].zName; lpc2++) {
+ const FuncDef& func_def = basic_funcs[lpc2];
+
+ lnav_data.ld_rl_view->add_possibility(
+ ln_mode_t::SQL,
+ "*",
+ std::string(func_def.zName) + (func_def.nArg ? "(" : "()"));
+ }
+ for (int lpc2 = 0; agg_funcs && agg_funcs[lpc2].zName; lpc2++) {
+ const FuncDefAgg& func_def = agg_funcs[lpc2];
+
+ lnav_data.ld_rl_view->add_possibility(
+ ln_mode_t::SQL,
+ "*",
+ std::string(func_def.zName) + (func_def.nArg ? "(" : "()"));
+ }
+ }
+
+ for (const auto& pair : sqlite_function_help) {
+ switch (pair.second->ht_context) {
+ case help_context_t::HC_SQL_FUNCTION:
+ case help_context_t::HC_SQL_TABLE_VALUED_FUNCTION: {
+ std::string poss = pair.first
+ + (pair.second->ht_parameters.empty() ? "()" : ("("));
+
+ lnav_data.ld_rl_view->add_possibility(
+ ln_mode_t::SQL, "*", poss);
+ break;
+ }
+ default:
+ break;
+ }
+ }
+
+ walk_sqlite_metadata(lnav_data.ld_db.in(), lnav_sql_meta_callbacks);
+}
diff --git a/src/readline_possibilities.hh b/src/readline_possibilities.hh
index df5255b..8f812b2 100644
--- a/src/readline_possibilities.hh
+++ b/src/readline_possibilities.hh
@@ -39,6 +39,7 @@
enum class text_quoting {
none,
sql,
+ prql,
regex,
};
@@ -79,6 +80,8 @@ void add_config_possibilities();
void add_tag_possibilities();
void add_file_possibilities();
void add_recent_netlocs_possibilities();
+void add_tz_possibilities(ln_mode_t context);
+void add_sqlite_possibilities();
extern struct sqlite_metadata_callbacks lnav_sql_meta_callbacks;
diff --git a/src/regex101.client.cc b/src/regex101.client.cc
index 73871cc..5806b23 100644
--- a/src/regex101.client.cc
+++ b/src/regex101.client.cc
@@ -31,6 +31,7 @@
#include <curl/curl.h>
+#include "base/itertools.hh"
#include "config.h"
#include "curl_looper.hh"
#include "ghc/filesystem.hpp"
@@ -58,6 +59,7 @@ static const json_path_container UNIT_TEST_HANDLERS = {
};
static const typed_json_path_container<entry> ENTRY_HANDLERS = {
+ yajlpp::property_handler("dateCreated").for_field(&entry::e_date_created),
yajlpp::property_handler("regex").for_field(&entry::e_regex),
yajlpp::property_handler("testString").for_field(&entry::e_test_string),
yajlpp::property_handler("flags").for_field(&entry::e_flags),
@@ -124,6 +126,7 @@ upsert(entry& en)
auto parse_res
= RESPONSE_HANDLERS.parser_for(intern_string::lookup(cr.get_name()))
+ .with_ignore_unused(true)
.of(response);
if (parse_res.isOk()) {
return Ok(parse_res.unwrap());
@@ -137,14 +140,14 @@ upsert(entry& en)
struct retrieve_entity {
std::string re_permalink_fragment;
- int32_t re_versions{1};
+ std::vector<int32_t> re_versions;
};
static const typed_json_path_container<retrieve_entity> RETRIEVE_ENTITY_HANDLERS
= {
yajlpp::property_handler("permalinkFragment")
.for_field(&retrieve_entity::re_permalink_fragment),
- yajlpp::property_handler("versions")
+ yajlpp::property_handler("versions#")
.for_field(&retrieve_entity::re_versions),
};
@@ -187,6 +190,7 @@ retrieve(const std::string& permalink)
auto parse_res
= RETRIEVE_ENTITY_HANDLERS
.parser_for(intern_string::lookup(entry_req.get_name()))
+ .with_ignore_unused(true)
.of(response);
if (parse_res.isErr()) {
@@ -201,11 +205,12 @@ retrieve(const std::string& permalink)
auto entry_value = parse_res.unwrap();
- if (entry_value.re_versions == 0) {
+ auto latest_version = entry_value.re_versions | lnav::itertools::max();
+ if (!latest_version) {
return no_entry{};
}
- auto version_url = entry_url / fmt::to_string(entry_value.re_versions);
+ auto version_url = entry_url / fmt::to_string(latest_version.value());
curl_request version_req(version_url.string());
curl_easy_setopt(version_req, CURLOPT_URL, version_req.get_name().c_str());
@@ -224,6 +229,7 @@ retrieve(const std::string& permalink)
auto version_parse_res
= ENTRY_HANDLERS
.parser_for(intern_string::lookup(version_req.get_name()))
+ .with_ignore_unused(true)
.of(version_response);
if (version_parse_res.isErr()) {
diff --git a/src/regex101.client.hh b/src/regex101.client.hh
index 14c1ac9..87476ed 100644
--- a/src/regex101.client.hh
+++ b/src/regex101.client.hh
@@ -56,6 +56,7 @@ struct unit_test {
};
struct entry {
+ std::string e_date_created;
std::string e_regex;
std::string e_test_string;
std::string e_flags{"gs"};
diff --git a/src/regexp_vtab.cc b/src/regexp_vtab.cc
index 5324194..d992ea9 100644
--- a/src/regexp_vtab.cc
+++ b/src/regexp_vtab.cc
@@ -31,6 +31,7 @@
# include <alloca.h>
#endif
+#include "base/lnav.console.into.hh"
#include "base/lnav_log.hh"
#include "column_namer.hh"
#include "config.h"
@@ -39,10 +40,13 @@
#include "scn/scn.h"
#include "sql_help.hh"
#include "sql_util.hh"
+#include "sqlitepp.hh"
#include "vtab_module.hh"
#include "yajlpp/yajlpp.hh"
#include "yajlpp/yajlpp_def.hh"
+namespace {
+
enum {
RC_COL_MATCH_INDEX,
RC_COL_INDEX,
@@ -238,9 +242,12 @@ rcFilter(sqlite3_vtab_cursor* pVtabCursor,
auto pattern = from_sqlite<string_fragment>()(argc, argv, 1);
auto compile_res = lnav::pcre2pp::code::from(pattern);
if (compile_res.isErr()) {
- pVtabCursor->pVtab->zErrMsg
- = sqlite3_mprintf("Invalid regular expression: %s",
- compile_res.unwrapErr().get_message().c_str());
+ static const intern_string_t PATTERN_SRC
+ = intern_string::lookup("pattern");
+
+ set_vtable_errmsg(pVtabCursor->pVtab,
+ lnav::console::to_user_message(
+ PATTERN_SRC, compile_res.unwrapErr()));
return SQLITE_ERROR;
}
@@ -486,9 +493,12 @@ rcjFilter(sqlite3_vtab_cursor* pVtabCursor,
auto pattern = from_sqlite<string_fragment>()(argc, argv, 1);
auto compile_res = lnav::pcre2pp::code::from(pattern);
if (compile_res.isErr()) {
- pVtabCursor->pVtab->zErrMsg
- = sqlite3_mprintf("Invalid regular expression: %s",
- compile_res.unwrapErr().get_message().c_str());
+ static const intern_string_t PATTERN_SRC
+ = intern_string::lookup("pattern");
+
+ set_vtable_errmsg(pVtabCursor->pVtab,
+ lnav::console::to_user_message(
+ PATTERN_SRC, compile_res.unwrapErr()));
return SQLITE_ERROR;
}
@@ -508,8 +518,7 @@ rcjFilter(sqlite3_vtab_cursor* pVtabCursor,
"unable to parse flags")
.with_reason(parse_res.unwrapErr()[0]);
- pVtabCursor->pVtab->zErrMsg = sqlite3_mprintf(
- "%s%s", sqlitepp::ERROR_PREFIX, lnav::to_json(um).c_str());
+ set_vtable_errmsg(pVtabCursor->pVtab, um);
return SQLITE_ERROR;
}
@@ -542,6 +551,8 @@ rcjFilter(sqlite3_vtab_cursor* pVtabCursor,
return SQLITE_OK;
}
+} // namespace
+
int
register_regexp_vtab(sqlite3* db)
{
diff --git a/src/relative_time.cc b/src/relative_time.cc
index e6f1118..6024dc5 100644
--- a/src/relative_time.cc
+++ b/src/relative_time.cc
@@ -31,6 +31,7 @@
#include "relative_time.hh"
+#include "base/lnav_log.hh"
#include "base/time_util.hh"
#include "config.h"
#include "pcrepp/pcre2pp.hh"
@@ -294,7 +295,8 @@ relative_time::from_str(string_fragment str)
bool found = false;
for (int lpc = 0; lpc < RTT__MAX && !found; lpc++) {
- static thread_local auto md = lnav::pcre2pp::match_data::unitialized();
+ static thread_local auto md
+ = lnav::pcre2pp::match_data::unitialized();
token_t token = (token_t) lpc;
auto match_res = MATCHERS[lpc]
@@ -1115,7 +1117,7 @@ relative_time::to_microseconds() const
etm.et_tm.tm_min = this->rt_field[RTF_MINUTES].value;
etm.et_tm.tm_sec = this->rt_field[RTF_SECONDS].value;
- auto epoch_secs = std::chrono::seconds(tm2sec(&etm.et_tm));
+ auto epoch_secs = std::chrono::seconds(etm.to_timeval().tv_sec);
retval
= std::chrono::duration_cast<std::chrono::microseconds>(epoch_secs)
.count();
diff --git a/src/relative_time.hh b/src/relative_time.hh
index 7334217..1310dd9 100644
--- a/src/relative_time.hh
+++ b/src/relative_time.hh
@@ -42,7 +42,7 @@
#include "base/intern_string.hh"
#include "base/result.h"
-#include "ptimec.hh"
+#include "base/time_util.hh"
class relative_time {
public:
diff --git a/src/root-config.json b/src/root-config.json
index f907d63..cc7e8c5 100644
--- a/src/root-config.json
+++ b/src/root-config.json
@@ -6,8 +6,23 @@
"default-colors": true,
"keymap": "default",
"theme": "default",
+ "mouse": {
+ "mode": "disabled"
+ },
"movement": {
- "mode": "top"
+ "mode": "cursor"
+ }
+ },
+ "log": {
+ "date-time": {
+ "convert-zoned-to-local": true
+ },
+ "annotations": {
+ "com.vmware.vmacore.backtrace": {
+ "description": "Convert a vmacore backtrace into human-readable text",
+ "condition": ":log_body LIKE '%[context]%[/context]%'",
+ "handler": "com.vmware.btresolver.py"
+ }
}
},
"tuning": {
@@ -26,6 +41,11 @@
"transfer-command": "cat > {0:} && chmod ugo+rx ./{0:}"
}
},
+ "piper": {
+ "max-size": 10485760,
+ "rotations": 4,
+ "ttl": "2d"
+ },
"clipboard": {
"impls": {
"MacOS": {
@@ -74,6 +94,23 @@
}
}
}
+ },
+ "url-scheme": {
+ "docker": {
+ "handler": "docker-url-handler"
+ },
+ "docker-compose": {
+ "handler": "docker-compose-url-handler"
+ },
+ "journald": {
+ "handler": "journald-url-handler"
+ },
+ "piper": {
+ "handler": "piper-url-handler"
+ },
+ "podman": {
+ "handler": "docker-url-handler"
+ }
}
}
}
diff --git a/src/scripts/com.vmware.btresolver.py b/src/scripts/com.vmware.btresolver.py
new file mode 100755
index 0000000..b5c7deb
--- /dev/null
+++ b/src/scripts/com.vmware.btresolver.py
@@ -0,0 +1,60 @@
+#!/usr/bin/env python3
+
+import sys
+import html
+import time
+import json
+import urllib.request
+
+sys.stderr.write("reading stdin\n")
+inj = json.load(sys.stdin)
+sys.stderr.write("reading stdin done\n")
+
+if False:
+ print("Hello, World!")
+ sys.exit()
+
+RESOLVING_SERVICE_URL = "http://btresolver.eng.vmware.com:80/"
+DEFAULT_TIMEOUT = 10
+
+req_url = "%s%s" % (RESOLVING_SERVICE_URL, "async_resolve_text_bts")
+log_msg = inj['log_msg']
+index = log_msg.find('[context]')
+if index != -1:
+ log_msg = log_msg[index:]
+body = json.dumps([log_msg])
+req = urllib.request.Request(req_url, body.encode('utf-8'))
+resp = urllib.request.urlopen(req, timeout=DEFAULT_TIMEOUT)
+resolve_content = json.loads(resp.read())
+
+sys.stderr.write("resolve %s\n" % resolve_content)
+if not resolve_content['success']:
+ print(resolve_content['errorString'])
+ sys.exit(1)
+
+time.sleep(0.5)
+
+delay = 1
+
+done = False
+while not done:
+ get_url = "%s%s" % (RESOLVING_SERVICE_URL, "get_task")
+ body = resolve_content['returnValue']['TaskIds'][0]
+ get_req = urllib.request.Request(get_url, body.encode('utf-8'))
+ get_resp = urllib.request.urlopen(get_req, timeout=DEFAULT_TIMEOUT)
+ get_content = json.loads(get_resp.read())
+ sys.stderr.write("get %s\n" % get_content)
+ if get_content['returnValue']['state'] == 'RUNNING':
+ if get_content['returnValue']['exception'] is None:
+ time.sleep(delay)
+ if delay < 10:
+ delay = delay * 2
+ else:
+ print("<pre>\n%s</pre>" % html.escape(get_content['returnValue']['exception']))
+ done = True
+ elif get_content['returnValue']['state'] == 'COMPLETED':
+ if get_content['returnValue'].get('output') is not None:
+ print("<pre>\n%s</pre>" % html.escape(get_content['returnValue']['output']))
+ elif get_content['returnValue'].get('exception') is not None:
+ print("<pre>\n%s</pre>" % html.escape(get_content['returnValue']['exception']))
+ done = True
diff --git a/src/scripts/docker-url-handler.lnav b/src/scripts/docker-url-handler.lnav
new file mode 100755
index 0000000..a8e9597
--- /dev/null
+++ b/src/scripts/docker-url-handler.lnav
@@ -0,0 +1,62 @@
+#
+# @synopsis: docker-url-handler
+# @description: Internal script to handle opening docker/podman URLs
+#
+
+;SELECT jget(url, '/scheme') AS docker_scheme,
+ jget(url, '/host') AS docker_hostname,
+ jget(url, '/path') AS docker_path
+ FROM (SELECT parse_url($1) AS url)
+
+;SELECT substr($docker_path, 2) AS docker_relpath
+
+;SELECT CASE
+ $docker_hostname
+ WHEN 'compose' THEN (
+ SELECT group_concat(
+ printf(
+ ':sh --name=%s %s-compose -f %s logs --no-log-prefix -f %s',
+ compose_services.key,
+ $docker_scheme,
+ $docker_relpath,
+ compose_services.key
+ ),
+ char(10)
+ ) AS cmds
+ FROM fstat($docker_relpath) AS st,
+ regexp_capture(
+ ifnull(
+ st.data,
+ raise_error(
+ 'Cannot read compose configuration: ' || $docker_relpath,
+ st.error
+ )
+ ),
+ '(?m)(?:^---$)?((?:(?:.|\n)(?!^(?:---|\.\.\.)$))+)'
+ ) AS ydoc,
+ json_each(
+ yaml_to_json(
+ ydoc.content
+ ),
+ '$.services'
+ ) as compose_services
+ WHERE ydoc.match_index = 0
+ AND ydoc.capture_index = 1
+ )
+ ELSE CASE
+ $docker_path
+ WHEN '/' THEN printf(
+ ':sh %s logs -f %s',
+ $docker_scheme,
+ $docker_hostname
+ )
+ ELSE printf(
+ ':sh %s exec %s tail -n +0 -F "%s"',
+ $docker_scheme,
+ $docker_hostname,
+ $docker_path
+ )
+ END
+ END AS cmds
+
+:eval ${cmds}
diff --git a/src/scripts/journald-url-handler.lnav b/src/scripts/journald-url-handler.lnav
new file mode 100644
index 0000000..904237c
--- /dev/null
+++ b/src/scripts/journald-url-handler.lnav
@@ -0,0 +1,33 @@
+#
+# @synopsis: journald-url-handler
+# @description: Internal script to handle opening journald URLs
+#
+
+;SELECT
+ jget(url, '/scheme') AS jscheme,
+ jget(url, '/host') AS jhost,
+ jget(url, '/parameters') as jparams
+ FROM (SELECT parse_url($1) AS url)
+
+;SELECT
+ printf(':sh journalctl --output=json -f %s %s',
+ CASE $jhost
+ WHEN 'localhost' THEN
+ ''
+ ELSE
+ '-m ' || $jhost
+ END,
+ (SELECT group_concat(
+ CASE length(key)
+ WHEN 1 THEN
+ '-' || key || ' '
+ ELSE
+ '--' || key || '='
+ END ||
+ value,
+ ' ')
+ FROM json_each($jparams)
+ )
+ ) AS cmds
+
+:eval ${cmds}
diff --git a/src/scripts/lnav-copy-text.lnav b/src/scripts/lnav-copy-text.lnav
new file mode 100644
index 0000000..541409e
--- /dev/null
+++ b/src/scripts/lnav-copy-text.lnav
@@ -0,0 +1,15 @@
+#
+# @synopsis: lnav-copy-text
+# @description: Copy text from the top view
+#
+
+;SELECT jget(selected_text, '/value') AS content FROM lnav_top_view
+;SELECT CASE
+ WHEN $content IS NULL THEN
+ ':write-to -'
+ ELSE
+ ':echo -n ${content}'
+ END AS cmd
+
+:redirect-to /dev/clipboard
+:eval ${cmd}
diff --git a/src/scripts/pcap_log-converter.sh b/src/scripts/pcap_log-converter.sh
new file mode 100755
index 0000000..80148e9
--- /dev/null
+++ b/src/scripts/pcap_log-converter.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+# Check that tshark is installed and return a nice message.
+if ! command -v tshark > /dev/null; then
+ echo "pcap support requires 'tshark' v3+ to be installed" > /dev/stderr
+ exit 1
+fi
+
+# We want tshark output to come in UTC
+export TZ=UTC
+
+# Use tshark to convert the pcap file into a JSON-lines log file
+exec tshark -T ek -P -V -t ad -r $2
diff --git a/src/scripts/piper-url-handler.lnav b/src/scripts/piper-url-handler.lnav
new file mode 100755
index 0000000..f186767
--- /dev/null
+++ b/src/scripts/piper-url-handler.lnav
@@ -0,0 +1,8 @@
+#
+# @synopsis: piper-url-handler
+# @description: Internal script to handle opening piper URLs
+#
+
+;SELECT jget(url, '/host') AS uhost FROM (SELECT parse_url($1) AS url)
+
+:open ${LNAV_WORK_DIR}/piper/$uhost/out.*
diff --git a/src/scripts/scripts.am b/src/scripts/scripts.am
index 50e10fd..32d0cd8 100644
--- a/src/scripts/scripts.am
+++ b/src/scripts/scripts.am
@@ -1,12 +1,18 @@
BUILTIN_LNAVSCRIPTS = \
$(srcdir)/scripts/dhclient-summary.lnav \
+ $(srcdir)/scripts/docker-url-handler.lnav \
+ $(srcdir)/scripts/journald-url-handler.lnav \
+ $(srcdir)/scripts/lnav-copy-text.lnav \
$(srcdir)/scripts/lnav-pop-view.lnav \
$(srcdir)/scripts/partition-by-boot.lnav \
+ $(srcdir)/scripts/piper-url-handler.lnav \
$(srcdir)/scripts/rename-stdin.lnav \
$(srcdir)/scripts/search-for.lnav \
$()
BUILTIN_SHSCRIPTS = \
+ $(srcdir)/scripts/com.vmware.btresolver.py \
$(srcdir)/scripts/dump-pid.sh \
+ $(srcdir)/scripts/pcap_log-converter.sh \
$()
diff --git a/src/service_tags.hh b/src/service_tags.hh
index 6d13427..702b13b 100644
--- a/src/service_tags.hh
+++ b/src/service_tags.hh
@@ -34,14 +34,11 @@
namespace services {
-struct main_t {
-};
-struct ui_t {
-};
-struct curl_streamer_t {
-};
-struct remote_tailer_t {
-};
+struct main_t {};
+struct ui_t {};
+struct curl_streamer_t {};
+struct remote_tailer_t {};
+struct url_handler_t {};
} // namespace services
diff --git a/src/session.export.cc b/src/session.export.cc
index d408c50..75550d1 100644
--- a/src/session.export.cc
+++ b/src/session.export.cc
@@ -42,6 +42,7 @@ struct log_message_session_state {
bool lmss_mark;
nonstd::optional<std::string> lmss_comment;
nonstd::optional<std::string> lmss_tags;
+ nonstd::optional<std::string> lmss_annotations;
std::string lmss_hash;
};
@@ -57,7 +58,8 @@ struct from_sqlite<log_message_session_state> {
from_sqlite<bool>()(argc, argv, argi + 2),
from_sqlite<nonstd::optional<std::string>>()(argc, argv, argi + 3),
from_sqlite<nonstd::optional<std::string>>()(argc, argv, argi + 4),
- from_sqlite<std::string>()(argc, argv, argi + 5),
+ from_sqlite<nonstd::optional<std::string>>()(argc, argv, argi + 5),
+ from_sqlite<std::string>()(argc, argv, argi + 6),
};
}
};
@@ -178,9 +180,12 @@ export_to(FILE* file)
static auto& lnav_db = injector::get<auto_sqlite3&>();
static const char* BOOKMARK_QUERY = R"(
-SELECT log_time_msecs, log_format, log_mark, log_comment, log_tags, log_line_hash
+SELECT log_time_msecs, log_format, log_mark, log_comment, log_tags, log_annotations, log_line_hash
FROM all_logs
- WHERE log_mark = 1 OR log_comment IS NOT NULL OR log_tags IS NOT NULL
+ WHERE log_mark = 1 OR
+ log_comment IS NOT NULL OR
+ log_tags IS NOT NULL OR
+ log_annotations IS NOT NULL
)";
static const char* FILTER_QUERY = R"(
@@ -267,7 +272,6 @@ SELECT content_id, format, time_offset FROM lnav_file
const auto& open_opts = name_pair.second;
if (!open_opts.loo_is_visible || !open_opts.loo_include_in_session
- || open_opts.loo_temp_file
|| open_opts.loo_source != logfile_name_source::USER)
{
continue;
@@ -320,13 +324,15 @@ SELECT content_id, format, time_offset FROM lnav_file
FMT_STRING(";UPDATE all_logs "
"SET log_mark = {}, "
"log_comment = {}, "
- "log_tags = {} "
+ "log_tags = {}, "
+ "log_annotations = {} "
"WHERE log_time_msecs = {} AND "
"log_format = {} AND "
"log_line_hash = {}\n"),
lmss.lmss_mark ? "1" : "0",
sqlitepp::quote(lmss.lmss_comment).in(),
sqlitepp::quote(lmss.lmss_tags).in(),
+ sqlitepp::quote(lmss.lmss_annotations).in(),
lmss.lmss_time_msecs,
sqlitepp::quote(lmss.lmss_format).in(),
sqlitepp::quote(lmss.lmss_hash).in());
@@ -431,14 +437,15 @@ SELECT content_id, format, time_offset FROM lnav_file
level_names[min_level]);
}
- struct timeval min_time, max_time;
char tsbuf[128];
- if (lss->get_min_log_time(min_time)) {
- sql_strftime(tsbuf, sizeof(tsbuf), min_time, 'T');
+ auto min_time_opt = lss->get_min_log_time();
+ if (min_time_opt) {
+ sql_strftime(tsbuf, sizeof(tsbuf), min_time_opt.value(), 'T');
fmt::print(file, FMT_STRING(":hide-lines-before {}\n"), tsbuf);
}
- if (lss->get_max_log_time(max_time)) {
- sql_strftime(tsbuf, sizeof(tsbuf), max_time, 'T');
+ auto max_time_opt = lss->get_max_log_time();
+ if (max_time_opt) {
+ sql_strftime(tsbuf, sizeof(tsbuf), max_time_opt.value(), 'T');
fmt::print(file, FMT_STRING(":hide-lines-after {}\n"), tsbuf);
}
for (const auto& ld : *lss) {
diff --git a/src/session_data.cc b/src/session_data.cc
index 73cb7f8..1b57da4 100644
--- a/src/session_data.cc
+++ b/src/session_data.cc
@@ -34,7 +34,6 @@
#include "session_data.hh"
-#include <fcntl.h>
#include <glob.h>
#include <stdio.h>
#include <sys/types.h>
@@ -44,11 +43,13 @@
#include "base/isc.hh"
#include "base/opt_util.hh"
#include "base/paths.hh"
+#include "bookmarks.json.hh"
+#include "bound_tags.hh"
#include "command_executor.hh"
#include "config.h"
+#include "hasher.hh"
#include "lnav.events.hh"
#include "lnav.hh"
-#include "lnav_util.hh"
#include "log_format_ext.hh"
#include "logfile.hh"
#include "service_tags.hh"
@@ -59,7 +60,8 @@
#include "yajlpp/yajlpp.hh"
#include "yajlpp/yajlpp_def.hh"
-struct session_data_t session_data;
+session_data_t session_data;
+recent_refs_t recent_refs;
static const char* LOG_METADATA_NAME = "log_metadata.db";
@@ -73,6 +75,7 @@ CREATE TABLE IF NOT EXISTS bookmarks (
access_time datetime DEFAULT CURRENT_TIMESTAMP,
comment text DEFAULT '',
tags text DEFAULT '',
+ annotations text DEFAULT NULL,
PRIMARY KEY (log_time, log_format, log_hash, session_time)
);
@@ -125,13 +128,28 @@ static const char* NETLOC_LRU_STMT
static const char* UPGRADE_STMTS[] = {
R"(ALTER TABLE bookmarks ADD COLUMN comment text DEFAULT '';)",
R"(ALTER TABLE bookmarks ADD COLUMN tags text DEFAULT '';)",
+ R"(ALTER TABLE bookmarks ADD COLUMN annotations text DEFAULT NULL;)",
};
static const size_t MAX_SESSIONS = 8;
static const size_t MAX_SESSION_FILE_COUNT = 256;
-static std::vector<content_line_t> marked_session_lines;
-static std::vector<content_line_t> offset_session_lines;
+struct session_line {
+ session_line(struct timeval tv,
+ intern_string_t format_name,
+ std::string line_hash)
+ : sl_time(tv), sl_format_name(format_name),
+ sl_line_hash(std::move(line_hash))
+ {
+ }
+
+ struct timeval sl_time;
+ intern_string_t sl_format_name;
+ std::string sl_line_hash;
+};
+
+static std::vector<session_line> marked_session_lines;
+static std::vector<session_line> offset_session_lines;
static bool
bind_line(sqlite3* db,
@@ -139,7 +157,7 @@ bind_line(sqlite3* db,
content_line_t cl,
time_t session_time)
{
- logfile_sub_source& lss = lnav_data.ld_log_source;
+ auto& lss = lnav_data.ld_log_source;
auto lf = lss.find(cl);
if (lf == nullptr) {
@@ -175,7 +193,9 @@ bind_line(sqlite3* db,
struct session_file_info {
session_file_info(int timestamp, std::string id, std::string path)
: sfi_timestamp(timestamp), sfi_id(std::move(id)),
- sfi_path(std::move(path)){};
+ sfi_path(std::move(path))
+ {
+ }
bool operator<(const session_file_info& other) const
{
@@ -186,7 +206,7 @@ struct session_file_info {
return true;
}
return false;
- };
+ }
int sfi_timestamp;
std::string sfi_id;
@@ -279,6 +299,7 @@ init_session()
{
lnav_data.ld_session_time = time(nullptr);
lnav_data.ld_session_id.clear();
+ session_data.sd_view_states[LNV_LOG].vs_top = -1;
}
static nonstd::optional<std::string>
@@ -294,6 +315,17 @@ compute_session_id()
has_files = true;
h.update(ld_file_name.first);
}
+ for (auto& lf : lnav_data.ld_active_files.fc_files) {
+ if (lf->is_valid_filename()) {
+ continue;
+ }
+ if (!lf->get_open_options().loo_include_in_session) {
+ continue;
+ }
+
+ has_files = true;
+ h.update(lf->get_filename());
+ }
if (!has_files) {
return nonstd::nullopt;
}
@@ -371,6 +403,24 @@ scan_sessions()
void
load_time_bookmarks()
{
+ static const char* BOOKMARK_STMT = R"(
+ SELECT
+ log_time,
+ log_format,
+ log_hash,
+ session_time,
+ part_name,
+ access_time,
+ comment,
+ tags,
+ annotations,
+ session_time=? AS same_session
+ FROM bookmarks WHERE
+ log_time BETWEEN ? AND ? AND
+ log_format = ?
+ ORDER BY same_session DESC, session_time DESC
+)";
+
logfile_sub_source& lss = lnav_data.ld_log_source;
auto_sqlite3 db;
auto db_path = lnav::paths::dotlnav() / LOG_METADATA_NAME;
@@ -412,7 +462,7 @@ load_time_bookmarks()
while (!done) {
done = netloc_stmt.fetch_row<std::string>().match(
[](const std::string& netloc) {
- session_data.sd_recent_netlocs.insert(netloc);
+ recent_refs.rr_netlocs.insert(netloc);
return false;
},
[](const prepared_stmt::fetch_error& fe) {
@@ -424,16 +474,7 @@ load_time_bookmarks()
}
}
- if (sqlite3_prepare_v2(
- db.in(),
- "SELECT log_time, log_format, log_hash, session_time, part_name, "
- "access_time, comment,"
- " tags, session_time=? as same_session FROM bookmarks WHERE "
- " log_time between ? and ? and log_format = ? "
- " ORDER BY same_session DESC, session_time DESC",
- -1,
- stmt.out(),
- nullptr)
+ if (sqlite3_prepare_v2(db.in(), BOOKMARK_STMT, -1, stmt.out(), nullptr)
!= SQLITE_OK)
{
log_error("could not prepare bookmark select statement -- %s",
@@ -446,6 +487,7 @@ load_time_bookmarks()
++file_iter)
{
auto lf = (*file_iter)->get_file();
+ const auto* format = lf->get_format_ptr();
content_line_t base_content_line;
if (lf == nullptr) {
@@ -471,7 +513,6 @@ load_time_bookmarks()
date_time_scanner dts;
bool done = false;
- std::string line;
int64_t last_mark_time = -1;
while (!done) {
@@ -494,6 +535,7 @@ load_time_bookmarks()
= (const char*) sqlite3_column_text(stmt.in(), 6);
const char* tags
= (const char*) sqlite3_column_text(stmt.in(), 7);
+ const auto annotations = sqlite3_column_text(stmt.in(), 8);
int64_t mark_time = sqlite3_column_int64(stmt.in(), 3);
struct timeval log_tv;
struct exttm log_tm;
@@ -509,21 +551,29 @@ load_time_bookmarks()
continue;
}
- if (!dts.scan(
- log_time, strlen(log_time), NULL, &log_tm, log_tv))
+ if (dts.scan(log_time,
+ strlen(log_time),
+ nullptr,
+ &log_tm,
+ log_tv)
+ == nullptr)
{
+ log_warning("bad log time: %s", log_time);
continue;
}
- auto line_iter
- = lower_bound(lf->begin(), lf->end(), log_tv);
+ auto line_iter = format->lf_time_ordered
+ ? std::lower_bound(lf->begin(), lf->end(), log_tv)
+ : lf->begin();
while (line_iter != lf->end()) {
- struct timeval line_tv = line_iter->get_timeval();
+ const auto line_tv = line_iter->get_timeval();
- if ((line_tv.tv_sec != log_tv.tv_sec)
- || (line_tv.tv_usec != log_tv.tv_usec))
- {
- break;
+ if (line_tv != log_tv) {
+ if (format->lf_time_ordered) {
+ break;
+ }
+ ++line_iter;
+ continue;
}
auto cl = content_line_t(
@@ -542,65 +592,93 @@ load_time_bookmarks()
.update(cl)
.to_string();
- if (line_hash == log_hash) {
- auto& bm_meta = lf->get_bookmark_metadata();
- auto line_number = static_cast<uint32_t>(
- std::distance(lf->begin(), line_iter));
- content_line_t line_cl = content_line_t(
- base_content_line + line_number);
- bool meta = false;
-
- if (part_name != nullptr && part_name[0] != '\0') {
- lss.set_user_mark(&textview_curses::BM_META,
- line_cl);
- bm_meta[line_number].bm_name = part_name;
- meta = true;
- }
- if (comment != nullptr && comment[0] != '\0') {
+ if (line_hash != log_hash) {
+ ++line_iter;
+ continue;
+ }
+ auto& bm_meta = lf->get_bookmark_metadata();
+ auto line_number = static_cast<uint32_t>(
+ std::distance(lf->begin(), line_iter));
+ content_line_t line_cl
+ = content_line_t(base_content_line + line_number);
+ bool meta = false;
+
+ if (part_name != nullptr && part_name[0] != '\0') {
+ lss.set_user_mark(&textview_curses::BM_PARTITION,
+ line_cl);
+ bm_meta[line_number].bm_name = part_name;
+ meta = true;
+ }
+ if (comment != nullptr && comment[0] != '\0') {
+ lss.set_user_mark(&textview_curses::BM_META,
+ line_cl);
+ bm_meta[line_number].bm_comment = comment;
+ meta = true;
+ }
+ if (tags != nullptr && tags[0] != '\0') {
+ auto_mem<yajl_val_s> tag_list(yajl_tree_free);
+ char error_buffer[1024];
+
+ tag_list = yajl_tree_parse(
+ tags, error_buffer, sizeof(error_buffer));
+ if (!YAJL_IS_ARRAY(tag_list.in())) {
+ log_error("invalid tags column: %s", tags);
+ } else {
lss.set_user_mark(&textview_curses::BM_META,
line_cl);
- bm_meta[line_number].bm_comment = comment;
- meta = true;
- }
- if (tags != nullptr && tags[0] != '\0') {
- auto_mem<yajl_val_s> tag_list(yajl_tree_free);
- char error_buffer[1024];
-
- tag_list = yajl_tree_parse(
- tags, error_buffer, sizeof(error_buffer));
- if (!YAJL_IS_ARRAY(tag_list.in())) {
- log_error("invalid tags column: %s", tags);
- } else {
- lss.set_user_mark(&textview_curses::BM_META,
- line_cl);
- for (size_t lpc = 0;
- lpc < tag_list.in()->u.array.len;
- lpc++)
- {
- yajl_val elem
- = tag_list.in()
- ->u.array.values[lpc];
-
- if (!YAJL_IS_STRING(elem)) {
- continue;
- }
- bookmark_metadata::KNOWN_TAGS.insert(
- elem->u.string);
- bm_meta[line_number].add_tag(
- elem->u.string);
+ for (size_t lpc = 0;
+ lpc < tag_list.in()->u.array.len;
+ lpc++)
+ {
+ yajl_val elem
+ = tag_list.in()->u.array.values[lpc];
+
+ if (!YAJL_IS_STRING(elem)) {
+ continue;
}
+ bookmark_metadata::KNOWN_TAGS.insert(
+ elem->u.string);
+ bm_meta[line_number].add_tag(
+ elem->u.string);
}
- meta = true;
}
- if (!meta) {
- marked_session_lines.push_back(line_cl);
- lss.set_user_mark(&textview_curses::BM_USER,
+ meta = true;
+ }
+ if (annotations != nullptr && annotations[0] != '\0') {
+ static const intern_string_t SRC
+ = intern_string::lookup("annotations");
+
+ const auto anno_sf
+ = string_fragment::from_c_str(annotations);
+ auto parse_res
+ = logmsg_annotations_handlers.parser_for(SRC)
+ .of(anno_sf);
+ if (parse_res.isErr()) {
+ log_error(
+ "unable to parse annotations JSON -- "
+ "%s",
+ parse_res.unwrapErr()[0]
+ .to_attr_line()
+ .get_string()
+ .c_str());
+ } else {
+ lss.set_user_mark(&textview_curses::BM_META,
line_cl);
+ bm_meta[line_number].bm_annotations
+ = parse_res.unwrap();
+ meta = true;
}
- reload_needed = true;
}
-
- ++line_iter;
+ if (!meta) {
+ marked_session_lines.emplace_back(
+ lf->original_line_time(line_iter),
+ format->get_name(),
+ line_hash);
+ lss.set_user_mark(&textview_curses::BM_USER,
+ line_cl);
+ }
+ reload_needed = true;
+ break;
}
break;
}
@@ -719,11 +797,12 @@ load_time_bookmarks()
if (lf->get_content_id() == log_hash) {
int file_line
= std::distance(lf->begin(), line_iter);
- content_line_t line_cl
- = content_line_t(base_content_line + file_line);
struct timeval offset;
- offset_session_lines.push_back(line_cl);
+ offset_session_lines.emplace_back(
+ lf->original_line_time(line_iter),
+ lf->get_format_ptr()->get_name(),
+ log_hash);
offset.tv_sec = sqlite3_column_int64(stmt.in(), 4);
offset.tv_usec = sqlite3_column_int64(stmt.in(), 5);
lf->adjust_content_time(file_line, offset);
@@ -761,136 +840,32 @@ read_files(yajlpp_parse_context* ypc, const unsigned char* str, size_t len)
return 1;
}
-static int
-read_current_search(yajlpp_parse_context* ypc,
- const unsigned char* str,
- size_t len)
-{
- const auto regex = std::string((const char*) str, len);
- const char** view_name;
- int view_index;
-
- view_name = find(lnav_view_strings,
- lnav_view_strings + LNV__MAX,
- ypc->get_path_fragment(-2));
- view_index = view_name - lnav_view_strings;
-
- if (view_index < LNV__MAX && !regex.empty()) {
- lnav_data.ld_views[view_index].execute_search(regex);
- lnav_data.ld_views[view_index].set_follow_search_for(-1, {});
- }
-
- return 1;
-}
-
-static int
-read_top_line(yajlpp_parse_context* ypc, long long value)
-{
- const char** view_name;
- int view_index;
-
- view_name = find(lnav_view_strings,
- lnav_view_strings + LNV__MAX,
- ypc->get_path_fragment(-2));
- view_index = view_name - lnav_view_strings;
- if (view_index < LNV__MAX) {
- session_data.sd_view_states[view_index].vs_top = value;
- }
-
- return 1;
-}
-
-static int
-read_focused_line(yajlpp_parse_context* ypc, long long value)
-{
- const char** view_name;
- int view_index;
-
- view_name = find(lnav_view_strings,
- lnav_view_strings + LNV__MAX,
- ypc->get_path_fragment(-2));
- view_index = view_name - lnav_view_strings;
- if (view_index < LNV__MAX) {
- session_data.sd_view_states[view_index].vs_selection = value;
- }
-
- return 1;
-}
-
-static int
-read_word_wrap(yajlpp_parse_context* ypc, int value)
-{
- const char** view_name;
- int view_index;
-
- view_name = find(lnav_view_strings,
- lnav_view_strings + LNV__MAX,
- ypc->get_path_fragment(-2));
- view_index = view_name - lnav_view_strings;
- if (view_index == LNV_HELP) {
- } else if (view_index < LNV__MAX) {
- textview_curses& tc = lnav_data.ld_views[view_index];
-
- tc.set_word_wrap(value);
- }
-
- return 1;
-}
-
-static int
-read_filtering(yajlpp_parse_context* ypc, int value)
-{
- const char** view_name;
- int view_index;
-
- view_name = find(lnav_view_strings,
- lnav_view_strings + LNV__MAX,
- ypc->get_path_fragment(-2));
- view_index = view_name - lnav_view_strings;
- if (view_index == LNV_HELP) {
- } else if (view_index < LNV__MAX) {
- textview_curses& tc = lnav_data.ld_views[view_index];
-
- if (tc.get_sub_source() != nullptr) {
- tc.get_sub_source()->tss_apply_filters = value;
- }
- }
-
- return 1;
-}
-
-static int
-read_commands(yajlpp_parse_context* ypc, const unsigned char* str, size_t len)
-{
- std::string cmdline = std::string((const char*) str, len);
- const char** view_name;
- int view_index;
-
- view_name = find(lnav_view_strings,
- lnav_view_strings + LNV__MAX,
- ypc->get_path_fragment(-3));
- view_index = view_name - lnav_view_strings;
- bool active = ensure_view(&lnav_data.ld_views[view_index]);
- execute_command(lnav_data.ld_exec_context, cmdline);
- if (!active) {
- lnav_data.ld_view_stack.pop_back();
- }
-
- return 1;
-}
-
static const struct json_path_container view_def_handlers = {
- json_path_handler("top_line", read_top_line),
- json_path_handler("focused_line", read_focused_line),
- json_path_handler("search", read_current_search),
- json_path_handler("word_wrap", read_word_wrap),
- json_path_handler("filtering", read_filtering),
- json_path_handler("commands#", read_commands),
+ json_path_handler("top_line").for_field(&view_state::vs_top),
+ json_path_handler("focused_line").for_field(&view_state::vs_selection),
+ json_path_handler("search").for_field(&view_state::vs_search),
+ json_path_handler("word_wrap").for_field(&view_state::vs_word_wrap),
+ json_path_handler("filtering").for_field(&view_state::vs_filtering),
+ json_path_handler("commands#").for_field(&view_state::vs_commands),
};
static const struct json_path_container view_handlers = {
- yajlpp::pattern_property_handler("([^/]+)").with_children(
- view_def_handlers),
+ yajlpp::pattern_property_handler("(?<view_name>[\\w\\-]+)")
+ .with_obj_provider<view_state, session_data_t>(
+ +[](const yajlpp_provider_context& ypc, session_data_t* root) {
+ const char** view_name;
+ int view_index;
+
+ view_name = find(lnav_view_strings,
+ lnav_view_strings + LNV__MAX,
+ ypc.get_substr("view_name"));
+ view_index = view_name - lnav_view_strings;
+ if (view_index < LNV__MAX) {
+ return &root->sd_view_states[view_index];
+ }
+ return (view_state*) nullptr;
+ })
+ .with_children(view_def_handlers),
};
static const struct json_path_container file_state_handlers = {
@@ -902,14 +877,15 @@ static const struct json_path_container file_state_handlers = {
static const struct json_path_container file_states_handlers = {
yajlpp::pattern_property_handler(R"((?<filename>[^/]+))")
.with_description("Map of file names to file state objects")
- .with_obj_provider<file_state, void>([](const auto& ypc, auto* root) {
- auto fn = ypc.get_substr("filename");
- return &session_data.sd_file_states[fn];
- })
+ .with_obj_provider<file_state, session_data_t>(
+ [](const auto& ypc, session_data_t* root) {
+ auto fn = ypc.get_substr("filename");
+ return &root->sd_file_states[fn];
+ })
.with_children(file_state_handlers),
};
-static const struct json_path_container view_info_handlers = {
+static const typed_json_path_container<session_data_t> view_info_handlers = {
yajlpp::property_handler("save-time")
.for_field(&session_data_t::sd_save_time),
yajlpp::property_handler("time-offset")
@@ -922,35 +898,54 @@ static const struct json_path_container view_info_handlers = {
void
load_session()
{
+ log_info("BEGIN load_session");
load_time_bookmarks();
scan_sessions() | [](const auto pair) {
- yajl_handle handle;
- auto_fd fd;
-
lnav_data.ld_session_load_time = pair.first.second;
- session_data.sd_save_time = pair.first.second;
const auto& view_info_path = pair.second;
-
- yajlpp_parse_context ypc(intern_string::lookup(view_info_path.string()),
- &view_info_handlers);
- ypc.with_obj(session_data);
- handle = yajl_alloc(&ypc.ypc_callbacks, nullptr, &ypc);
+ auto view_info_src = intern_string::lookup(view_info_path.string());
load_time_bookmarks();
- if ((fd = lnav::filesystem::openp(view_info_path, O_RDONLY)) < 0) {
- perror("cannot open session file");
- } else {
- unsigned char buffer[1024];
- ssize_t rc;
+ auto open_res = lnav::filesystem::open_file(view_info_path, O_RDONLY);
+ if (open_res.isErr()) {
+ log_error("cannot open session file: %s -- %s",
+ view_info_path.c_str(),
+ open_res.unwrapErr().c_str());
+ return;
+ }
- log_info("loading session file: %s", view_info_path.c_str());
- while ((rc = read(fd, buffer, sizeof(buffer))) > 0) {
- yajl_parse(handle, buffer, rc);
+ auto fd = open_res.unwrap();
+ unsigned char buffer[1024];
+ ssize_t rc;
+
+ log_info("loading session file: %s", view_info_path.c_str());
+ auto parser = view_info_handlers.parser_for(view_info_src);
+ while ((rc = read(fd, buffer, sizeof(buffer))) > 0) {
+ auto buf_frag = string_fragment::from_bytes(buffer, rc);
+ auto parse_res = parser.consume(buf_frag);
+ if (parse_res.isErr()) {
+ log_error("failed to load session: %s -- %s",
+ view_info_path.c_str(),
+ parse_res.unwrapErr()[0]
+ .to_attr_line()
+ .get_string()
+ .c_str());
+ return;
}
- yajl_complete_parse(handle);
}
- yajl_free(handle);
+
+ auto complete_res = parser.complete();
+ if (complete_res.isErr()) {
+ log_error("failed to load session: %s -- %s",
+ view_info_path.c_str(),
+ complete_res.unwrapErr()[0]
+ .to_attr_line()
+ .get_string()
+ .c_str());
+ return;
+ }
+ session_data = complete_res.unwrap();
bool log_changes = false, text_changes = false;
@@ -964,16 +959,15 @@ load_session()
log_debug("found state for file: %s %d",
lf->get_content_id().c_str(),
iter->second.fs_is_visible);
- lnav_data.ld_log_source.find_data(lf) | [iter](auto ld) {
- ld->set_visibility(iter->second.fs_is_visible);
- };
- if (!iter->second.fs_is_visible) {
- if (lf->get_format() != nullptr) {
- log_changes = true;
- } else {
- text_changes = true;
- }
- }
+ lnav_data.ld_log_source.find_data(lf) |
+ [iter, &log_changes](auto ld) {
+ if (ld->ld_visible != iter->second.fs_is_visible) {
+ ld->get_file_ptr()->set_indexing(
+ iter->second.fs_is_visible);
+ ld->set_visibility(iter->second.fs_is_visible);
+ log_changes = true;
+ }
+ };
}
if (log_changes) {
@@ -986,6 +980,8 @@ load_session()
lnav::events::publish(lnav_data.ld_db.in(),
lnav::events::session::loaded{});
+
+ log_info("END load_session");
}
static void
@@ -1001,13 +997,41 @@ save_user_bookmarks(sqlite3* db,
sqlite3_stmt* stmt,
bookmark_vector<content_line_t>& user_marks)
{
- logfile_sub_source& lss = lnav_data.ld_log_source;
- bookmark_vector<content_line_t>::iterator iter;
+ auto& lss = lnav_data.ld_log_source;
- for (iter = user_marks.begin(); iter != user_marks.end(); ++iter) {
+ for (auto iter = user_marks.begin(); iter != user_marks.end(); ++iter) {
content_line_t cl = *iter;
auto line_meta_opt = lss.find_bookmark_metadata(cl);
- if (!bind_line(db, stmt, cl, lnav_data.ld_session_time)) {
+ auto lf = lss.find(cl);
+ if (lf == nullptr) {
+ continue;
+ }
+
+ sqlite3_clear_bindings(stmt);
+
+ auto line_iter = lf->begin() + cl;
+ auto read_result = lf->read_line(line_iter);
+
+ if (read_result.isErr()) {
+ continue;
+ }
+
+ auto line_hash = read_result
+ .map([cl](auto sbr) {
+ return hasher()
+ .update(sbr.get_data(), sbr.length())
+ .update(cl)
+ .to_string();
+ })
+ .unwrap();
+
+ if (bind_values(stmt,
+ lf->original_line_time(line_iter),
+ lf->get_format()->get_name(),
+ line_hash,
+ lnav_data.ld_session_time)
+ != SQLITE_OK)
+ {
continue;
}
@@ -1019,8 +1043,8 @@ save_user_bookmarks(sqlite3* db,
return;
}
} else {
- bookmark_metadata& line_meta = *(line_meta_opt.value());
- if (line_meta.empty()) {
+ const auto& line_meta = *(line_meta_opt.value());
+ if (line_meta.empty(bookmark_metadata::categories::any)) {
continue;
}
@@ -1071,6 +1095,25 @@ save_user_bookmarks(sqlite3* db,
log_error("could not bind tags -- %s", sqlite3_errmsg(db));
return;
}
+
+ if (!line_meta.bm_annotations.la_pairs.empty()) {
+ auto anno_str = logmsg_annotations_handlers.to_string(
+ line_meta.bm_annotations);
+
+ if (sqlite3_bind_text(stmt,
+ 8,
+ anno_str.c_str(),
+ anno_str.length(),
+ SQLITE_TRANSIENT)
+ != SQLITE_OK)
+ {
+ log_error("could not bind annotations -- %s",
+ sqlite3_errmsg(db));
+ return;
+ }
+ } else {
+ sqlite3_bind_null(stmt, 8);
+ }
}
if (sqlite3_step(stmt) != SQLITE_DONE) {
@@ -1079,7 +1122,9 @@ save_user_bookmarks(sqlite3* db,
return;
}
- marked_session_lines.push_back(cl);
+ marked_session_lines.emplace_back(lf->original_line_time(line_iter),
+ lf->get_format_ptr()->get_name(),
+ line_hash);
sqlite3_reset(stmt);
}
@@ -1142,7 +1187,7 @@ save_time_bookmarks()
sqlite3_reset(stmt.in());
}
- session_data.sd_recent_netlocs.insert(netlocs.begin(), netlocs.end());
+ recent_refs.rr_netlocs.insert(netlocs.begin(), netlocs.end());
}
logfile_sub_source& lss = lnav_data.ld_log_source;
@@ -1163,10 +1208,14 @@ save_time_bookmarks()
}
for (auto& marked_session_line : marked_session_lines) {
- if (!bind_line(db.in(),
- stmt.in(),
- marked_session_line,
- lnav_data.ld_session_time))
+ sqlite3_clear_bindings(stmt.in());
+
+ if (bind_values(stmt,
+ marked_session_line.sl_time,
+ marked_session_line.sl_format_name,
+ marked_session_line.sl_line_hash,
+ lnav_data.ld_session_time)
+ != SQLITE_OK)
{
continue;
}
@@ -1185,8 +1234,8 @@ save_time_bookmarks()
if (sqlite3_prepare_v2(db.in(),
"REPLACE INTO bookmarks"
" (log_time, log_format, log_hash, session_time, "
- "part_name, comment, tags)"
- " VALUES (?, ?, ?, ?, ?, ?, ?)",
+ "part_name, comment, tags, annotations)"
+ " VALUES (?, ?, ?, ?, ?, ?, ?, ?)",
-1,
stmt.out(),
nullptr)
@@ -1240,7 +1289,11 @@ save_time_bookmarks()
}
save_user_bookmarks(db.in(), stmt.in(), bm[&textview_curses::BM_USER]);
- save_user_bookmarks(db.in(), stmt.in(), bm[&textview_curses::BM_META]);
+ auto all_meta_marks = bm[&textview_curses::BM_META];
+ const auto& bm_parts = bm[&textview_curses::BM_PARTITION];
+ all_meta_marks.insert(
+ all_meta_marks.end(), bm_parts.begin(), bm_parts.end());
+ save_user_bookmarks(db.in(), stmt.in(), all_meta_marks);
if (sqlite3_prepare_v2(db.in(),
"DELETE FROM time_offset WHERE "
@@ -1257,10 +1310,14 @@ save_time_bookmarks()
}
for (auto& offset_session_line : offset_session_lines) {
- if (!bind_line(db.in(),
- stmt.in(),
- offset_session_line,
- lnav_data.ld_session_time))
+ sqlite3_clear_bindings(stmt.in());
+
+ if (bind_values(stmt,
+ offset_session_line.sl_time,
+ offset_session_line.sl_format_name,
+ offset_session_line.sl_line_hash,
+ lnav_data.ld_session_time)
+ != SQLITE_OK)
{
continue;
}
@@ -1452,7 +1509,7 @@ save_session_with_id(const std::string& session_id)
for (auto& lf : lnav_data.ld_active_files.fc_files) {
auto ld_opt = lnav_data.ld_log_source.find_data(lf);
- file_states.gen(lf->get_filename());
+ file_states.gen(lf->get_filename().native());
{
yajlpp_map file_state(handle);
@@ -1469,7 +1526,7 @@ save_session_with_id(const std::string& session_id)
yajlpp_map top_view_map(handle);
for (int lpc = 0; lpc < LNV__MAX; lpc++) {
- textview_curses& tc = lnav_data.ld_views[lpc];
+ auto& tc = lnav_data.ld_views[lpc];
unsigned long width;
vis_line_t height;
@@ -1540,47 +1597,44 @@ save_session_with_id(const std::string& session_id)
for (const auto& format :
log_format::get_root_formats())
{
- auto* elf = dynamic_cast<external_log_format*>(
- format.get());
-
- if (elf == nullptr) {
- continue;
- }
+ auto field_states = format->get_field_states();
- for (const auto& vd : elf->elf_value_defs) {
- if (!vd.second->vd_meta.lvm_user_hidden) {
+ for (const auto& fs_pair : field_states) {
+ if (!fs_pair.second.lvm_user_hidden) {
continue;
}
- if (vd.second->vd_meta.lvm_user_hidden.value())
- {
- cmd_array.gen("hide-fields "
- + elf->get_name().to_string()
- + "." + vd.first.to_string());
- } else if (vd.second->vd_meta.lvm_hidden) {
- cmd_array.gen("show-fields "
- + elf->get_name().to_string()
- + "." + vd.first.to_string());
+ if (fs_pair.second.lvm_user_hidden.value()) {
+ cmd_array.gen(
+ "hide-fields "
+ + format->get_name().to_string() + "."
+ + fs_pair.first.to_string());
+ } else if (fs_pair.second.lvm_hidden) {
+ cmd_array.gen(
+ "show-fields "
+ + format->get_name().to_string() + "."
+ + fs_pair.first.to_string());
}
}
}
- logfile_sub_source& lss = lnav_data.ld_log_source;
+ auto& lss = lnav_data.ld_log_source;
- struct timeval min_time, max_time;
- bool have_min_time = lss.get_min_log_time(min_time);
- bool have_max_time = lss.get_max_log_time(max_time);
+ auto min_time_opt = lss.get_min_log_time();
+ auto max_time_opt = lss.get_max_log_time();
char min_time_str[32], max_time_str[32];
- sql_strftime(
- min_time_str, sizeof(min_time_str), min_time);
- if (have_min_time) {
+ if (min_time_opt) {
+ sql_strftime(min_time_str,
+ sizeof(min_time_str),
+ min_time_opt.value());
cmd_array.gen("hide-lines-before "
+ std::string(min_time_str));
}
- if (have_max_time) {
- sql_strftime(
- max_time_str, sizeof(max_time_str), max_time);
+ if (max_time_opt) {
+ sql_strftime(max_time_str,
+ sizeof(max_time_str),
+ max_time_opt.value());
cmd_array.gen("hide-lines-after "
+ std::string(max_time_str));
}
@@ -1701,6 +1755,89 @@ reset_session()
}
void
+lnav::session::restore_view_states()
+{
+ log_debug("restoring view states");
+ for (size_t view_index = 0; view_index < LNV__MAX; view_index++) {
+ const auto& vs = session_data.sd_view_states[view_index];
+ auto& tview = lnav_data.ld_views[view_index];
+ bool has_loc = false;
+
+ if (view_index == LNV_TEXT) {
+ auto lf = lnav_data.ld_text_source.current_file();
+ if (lf != nullptr) {
+ has_loc = lf->get_open_options().loo_init_location.valid();
+ if (!has_loc) {
+ switch (lf->get_text_format()) {
+ case text_format_t::TF_UNKNOWN:
+ case text_format_t::TF_LOG:
+ break;
+ default:
+ if (vs.vs_top == 0 && tview.get_top() > 0) {
+ log_debug("setting to 0");
+ tview.set_top(0_vl);
+ }
+ break;
+ }
+ }
+ }
+ }
+
+ if (!has_loc && vs.vs_top >= 0
+ && (view_index == LNV_LOG || tview.get_top() == 0_vl
+ || tview.get_top() == tview.get_top_for_last_row()))
+ {
+ log_info("restoring %s view top: %d",
+ lnav_view_strings[view_index],
+ vs.vs_top);
+ lnav_data.ld_views[view_index].set_top(vis_line_t(vs.vs_top), true);
+ lnav_data.ld_views[view_index].set_selection(-1_vl);
+ }
+ if (!has_loc && vs.vs_selection) {
+ log_info("restoring %s view selection: %d",
+ lnav_view_strings[view_index],
+ vs.vs_selection.value());
+ lnav_data.ld_views[view_index].set_selection(
+ vis_line_t(vs.vs_selection.value()));
+ }
+
+ if (!vs.vs_search.empty()) {
+ tview.execute_search(vs.vs_search);
+ tview.set_follow_search_for(-1, {});
+ }
+ tview.set_word_wrap(vs.vs_word_wrap);
+ if (tview.get_sub_source() != nullptr) {
+ tview.get_sub_source()->tss_apply_filters = vs.vs_filtering;
+ }
+ for (const auto& cmdline : vs.vs_commands) {
+ auto active = ensure_view(&tview);
+ auto exec_cmd_res
+ = execute_command(lnav_data.ld_exec_context, cmdline);
+ if (exec_cmd_res.isOk()) {
+ log_info("Result: %s", exec_cmd_res.unwrap().c_str());
+ } else {
+ log_error("Result: %s",
+ exec_cmd_res.unwrapErr()
+ .to_attr_line()
+ .get_string()
+ .c_str());
+ }
+ if (!active) {
+ lnav_data.ld_view_stack.pop_back();
+ lnav_data.ld_view_stack.top() | [](auto* tc) {
+ // XXX
+ if (tc == &lnav_data.ld_views[LNV_GANTT]) {
+ auto tss = tc->get_sub_source();
+ tss->text_filters_changed();
+ tc->reload_data();
+ }
+ };
+ }
+ }
+ }
+}
+
+void
lnav::session::regex101::insert_entry(const lnav::session::regex101::entry& ei)
{
constexpr const char* STMT = R"(
diff --git a/src/session_data.hh b/src/session_data.hh
index b380d3e..6eda213 100644
--- a/src/session_data.hh
+++ b/src/session_data.hh
@@ -48,17 +48,25 @@ struct file_state {
struct view_state {
int64_t vs_top{0};
nonstd::optional<int64_t> vs_selection;
+ std::string vs_search;
+ bool vs_word_wrap{false};
+ bool vs_filtering{true};
+ std::vector<std::string> vs_commands;
};
struct session_data_t {
uint64_t sd_save_time{0};
bool sd_time_offset{false};
std::map<std::string, file_state> sd_file_states;
- std::set<std::string> sd_recent_netlocs;
view_state sd_view_states[LNV__MAX];
};
+struct recent_refs_t {
+ std::set<std::string> rr_netlocs;
+};
+
extern struct session_data_t session_data;
+extern struct recent_refs_t recent_refs;
void init_session();
void load_session();
@@ -68,6 +76,9 @@ void reset_session();
namespace lnav {
namespace session {
+
+void restore_view_states();
+
namespace regex101 {
struct entry {
diff --git a/src/shared_buffer.cc b/src/shared_buffer.cc
index 39e21be..ff51750 100644
--- a/src/shared_buffer.cc
+++ b/src/shared_buffer.cc
@@ -40,19 +40,15 @@
#include "base/ansi_scrubber.hh"
#include "shared_buffer.hh"
-static const bool DEBUG_TRACE = false;
-
void
shared_buffer_ref::share(shared_buffer& sb, const char* data, size_t len)
{
-#ifdef HAVE_EXECINFO_H
- if (DEBUG_TRACE) {
- void* frames[128];
- int rc;
+#if SHARED_BUFFER_TRACE
+ void* frames[128];
+ int rc;
- rc = backtrace(frames, 128);
- this->sb_backtrace.reset(backtrace_symbols(frames, rc));
- }
+ rc = backtrace(frames, 128);
+ this->sb_backtrace.reset(backtrace_symbols(frames, rc));
#endif
this->disown();
@@ -95,8 +91,36 @@ shared_buffer_ref::shared_buffer_ref(shared_buffer_ref&& other) noexcept
this->sb_data = nullptr;
this->sb_length = 0;
} else if (other.sb_owner != nullptr) {
- auto owner_ref_iter = std::find(other.sb_owner->sb_refs.begin(),
- other.sb_owner->sb_refs.end(),
+ auto owner_ref_iter = std::find(other.sb_owner->sb_refs.rbegin(),
+ other.sb_owner->sb_refs.rend(),
+ &other);
+ *owner_ref_iter = this;
+ this->sb_owner = std::exchange(other.sb_owner, nullptr);
+ this->sb_data = std::exchange(other.sb_data, nullptr);
+ this->sb_length = std::exchange(other.sb_length, 0);
+ } else {
+ this->sb_owner = nullptr;
+ this->sb_data = other.sb_data;
+ this->sb_length = other.sb_length;
+ other.sb_data = nullptr;
+ other.sb_length = 0;
+ }
+ this->sb_metadata = other.sb_metadata;
+ other.sb_metadata = {};
+}
+
+shared_buffer_ref&
+shared_buffer_ref::operator=(shared_buffer_ref&& other)
+{
+ this->disown();
+
+ if (other.sb_data == nullptr) {
+ this->sb_owner = nullptr;
+ this->sb_data = nullptr;
+ this->sb_length = 0;
+ } else if (other.sb_owner != nullptr) {
+ auto owner_ref_iter = std::find(other.sb_owner->sb_refs.rbegin(),
+ other.sb_owner->sb_refs.rend(),
&other);
*owner_ref_iter = this;
this->sb_owner = std::exchange(other.sb_owner, nullptr);
@@ -111,6 +135,8 @@ shared_buffer_ref::shared_buffer_ref(shared_buffer_ref&& other) noexcept
}
this->sb_metadata = other.sb_metadata;
other.sb_metadata = {};
+
+ return *this;
}
bool
@@ -190,7 +216,7 @@ shared_buffer_ref::widen(narrow_result old_data_length)
void
shared_buffer_ref::erase_ansi()
{
- if (!this->sb_metadata.m_has_ansi) {
+ if (!this->sb_metadata.m_valid_utf || !this->sb_metadata.m_has_ansi) {
return;
}
diff --git a/src/shared_buffer.hh b/src/shared_buffer.hh
index e0029e9..5fe26d0 100644
--- a/src/shared_buffer.hh
+++ b/src/shared_buffer.hh
@@ -39,15 +39,17 @@
#include <string.h>
#include <sys/types.h>
-#include "base/attr_line.hh"
#include "base/auto_mem.hh"
#include "base/file_range.hh"
#include "base/intern_string.hh"
+#include "base/line_range.hh"
#include "base/lnav_log.hh"
#include "scn/util/string_view.h"
class shared_buffer;
+#define SHARED_BUFFER_TRACE 0
+
struct shared_buffer_ref {
public:
shared_buffer_ref(char* data = nullptr, size_t len = 0)
@@ -57,28 +59,23 @@ public:
~shared_buffer_ref() { this->disown(); }
- shared_buffer_ref(const shared_buffer_ref& other)
- {
- this->sb_owner = nullptr;
- this->sb_data = nullptr;
- this->sb_length = 0;
- this->sb_metadata = file_range::metadata{};
-
- this->copy_ref(other);
- }
+ shared_buffer_ref(const shared_buffer_ref& other) = delete;
shared_buffer_ref(shared_buffer_ref&& other) noexcept;
- shared_buffer_ref& operator=(const shared_buffer_ref& other)
+ shared_buffer_ref& operator=(const shared_buffer_ref& other) = delete;
+
+ shared_buffer_ref clone() const
{
- if (this != &other) {
- this->disown();
- this->copy_ref(other);
- }
+ shared_buffer_ref retval;
- return *this;
+ retval.copy_ref(*this);
+
+ return retval;
}
+ shared_buffer_ref& operator=(shared_buffer_ref&& other);
+
bool empty() const
{
return this->sb_data == nullptr || this->sb_length == 0;
@@ -165,7 +162,9 @@ public:
private:
void copy_ref(const shared_buffer_ref& other);
+#if SHARED_BUFFER_TRACE
auto_mem<char*> sb_backtrace;
+#endif
file_range::metadata sb_metadata;
shared_buffer* sb_owner;
const char* sb_data;
@@ -194,20 +193,6 @@ public:
std::vector<shared_buffer_ref*> sb_refs;
};
-struct tmp_shared_buffer {
- explicit tmp_shared_buffer(const char* str, size_t len = -1)
- {
- if (len == (size_t) -1) {
- len = strlen(str);
- }
-
- this->tsb_ref.share(this->tsb_manager, (char*) str, len);
- };
-
- shared_buffer tsb_manager;
- shared_buffer_ref tsb_ref;
-};
-
inline std::string
to_string(const shared_buffer_ref& sbr)
{
diff --git a/src/shlex.cc b/src/shlex.cc
index 8da44bb..d33924e 100644
--- a/src/shlex.cc
+++ b/src/shlex.cc
@@ -34,42 +34,70 @@
#endif
#include "config.h"
+#include "pcrepp/pcre2pp.hh"
#include "shlex.hh"
-bool
-shlex::tokenize(string_fragment& cap_out, shlex_token_t& token_out)
+using namespace lnav::roles::literals;
+
+std::string
+shlex::escape(std::string s)
+{
+ static const auto SH_CHARS = lnav::pcre2pp::code::from_const("'");
+
+ return SH_CHARS.replace(s, "\\'");
+}
+
+attr_line_t
+shlex::to_attr_line(const shlex::tokenize_error_t& te) const
+{
+ return attr_line_t()
+ .append(string_fragment::from_bytes(this->s_str, this->s_len))
+ .append("\n")
+ .pad_to(te.te_source.sf_begin)
+ .append("^"_snippet_border);
+}
+
+Result<shlex::tokenize_result_t, shlex::tokenize_error_t>
+shlex::tokenize()
{
+ tokenize_result_t retval;
+
+ retval.tr_frag.sf_string = this->s_str;
while (this->s_index < this->s_len) {
switch (this->s_str[this->s_index]) {
case '\\':
- cap_out.sf_begin = this->s_index;
+ retval.tr_frag.sf_begin = this->s_index;
if (this->s_index + 1 < this->s_len) {
- token_out = shlex_token_t::ST_ESCAPE;
+ retval.tr_token = shlex_token_t::escape;
this->s_index += 2;
- cap_out.sf_end = this->s_index;
+ retval.tr_frag.sf_end = this->s_index;
} else {
this->s_index += 1;
- cap_out.sf_end = this->s_index;
- token_out = shlex_token_t::ST_ERROR;
+ retval.tr_frag.sf_end = this->s_index;
+
+ return Err(tokenize_error_t{
+ "invalid escape",
+ retval.tr_frag,
+ });
}
- return true;
+ return Ok(retval);
case '\"':
if (!this->s_ignore_quotes) {
switch (this->s_state) {
case state_t::STATE_NORMAL:
- cap_out.sf_begin = this->s_index;
+ retval.tr_frag.sf_begin = this->s_index;
this->s_index += 1;
- cap_out.sf_end = this->s_index;
- token_out = shlex_token_t::ST_DOUBLE_QUOTE_START;
+ retval.tr_frag.sf_end = this->s_index;
+ retval.tr_token = shlex_token_t::double_quote_start;
this->s_state = state_t::STATE_IN_DOUBLE_QUOTE;
- return true;
+ return Ok(retval);
case state_t::STATE_IN_DOUBLE_QUOTE:
- cap_out.sf_begin = this->s_index;
+ retval.tr_frag.sf_begin = this->s_index;
this->s_index += 1;
- cap_out.sf_end = this->s_index;
- token_out = shlex_token_t::ST_DOUBLE_QUOTE_END;
+ retval.tr_frag.sf_end = this->s_index;
+ retval.tr_token = shlex_token_t::double_quote_end;
this->s_state = state_t::STATE_NORMAL;
- return true;
+ return Ok(retval);
default:
break;
}
@@ -79,19 +107,19 @@ shlex::tokenize(string_fragment& cap_out, shlex_token_t& token_out)
if (!this->s_ignore_quotes) {
switch (this->s_state) {
case state_t::STATE_NORMAL:
- cap_out.sf_begin = this->s_index;
+ retval.tr_frag.sf_begin = this->s_index;
this->s_index += 1;
- cap_out.sf_end = this->s_index;
- token_out = shlex_token_t::ST_SINGLE_QUOTE_START;
+ retval.tr_frag.sf_end = this->s_index;
+ retval.tr_token = shlex_token_t::single_quote_start;
this->s_state = state_t::STATE_IN_SINGLE_QUOTE;
- return true;
+ return Ok(retval);
case state_t::STATE_IN_SINGLE_QUOTE:
- cap_out.sf_begin = this->s_index;
+ retval.tr_frag.sf_begin = this->s_index;
this->s_index += 1;
- cap_out.sf_end = this->s_index;
- token_out = shlex_token_t::ST_SINGLE_QUOTE_END;
+ retval.tr_frag.sf_end = this->s_index;
+ retval.tr_token = shlex_token_t::single_quote_end;
this->s_state = state_t::STATE_NORMAL;
- return true;
+ return Ok(retval);
default:
break;
}
@@ -100,9 +128,10 @@ shlex::tokenize(string_fragment& cap_out, shlex_token_t& token_out)
case '$':
switch (this->s_state) {
case state_t::STATE_NORMAL:
- case state_t::STATE_IN_DOUBLE_QUOTE:
- this->scan_variable_ref(cap_out, token_out);
- return true;
+ case state_t::STATE_IN_DOUBLE_QUOTE: {
+ auto rc = TRY(this->scan_variable_ref());
+ return Ok(rc);
+ }
default:
break;
}
@@ -110,7 +139,7 @@ shlex::tokenize(string_fragment& cap_out, shlex_token_t& token_out)
case '~':
switch (this->s_state) {
case state_t::STATE_NORMAL:
- cap_out.sf_begin = this->s_index;
+ retval.tr_frag.sf_begin = this->s_index;
this->s_index += 1;
while (this->s_index < this->s_len
&& (isalnum(this->s_str[this->s_index])
@@ -119,9 +148,9 @@ shlex::tokenize(string_fragment& cap_out, shlex_token_t& token_out)
{
this->s_index += 1;
}
- cap_out.sf_end = this->s_index;
- token_out = shlex_token_t::ST_TILDE;
- return true;
+ retval.tr_frag.sf_end = this->s_index;
+ retval.tr_token = shlex_token_t::tilde;
+ return Ok(retval);
default:
break;
}
@@ -130,13 +159,15 @@ shlex::tokenize(string_fragment& cap_out, shlex_token_t& token_out)
case '\t':
switch (this->s_state) {
case state_t::STATE_NORMAL:
- cap_out.sf_begin = this->s_index;
- while (isspace(this->s_str[this->s_index])) {
+ retval.tr_frag.sf_begin = this->s_index;
+ while (this->s_index < this->s_len
+ && isspace(this->s_str[this->s_index]))
+ {
this->s_index += 1;
}
- cap_out.sf_end = this->s_index;
- token_out = shlex_token_t::ST_WHITESPACE;
- return true;
+ retval.tr_frag.sf_end = this->s_index;
+ retval.tr_token = shlex_token_t::whitespace;
+ return Ok(retval);
default:
break;
}
@@ -148,29 +179,47 @@ shlex::tokenize(string_fragment& cap_out, shlex_token_t& token_out)
this->s_index += 1;
}
- return false;
+ if (this->s_state != state_t::STATE_NORMAL) {
+ retval.tr_frag.sf_begin = this->s_index;
+ retval.tr_frag.sf_end = this->s_len;
+ return Err(tokenize_error_t{
+ "non-terminated string",
+ retval.tr_frag,
+ });
+ }
+
+ retval.tr_frag.sf_begin = this->s_len;
+ retval.tr_frag.sf_end = this->s_len;
+ retval.tr_token = shlex_token_t::eof;
+ return Ok(retval);
}
-void
-shlex::scan_variable_ref(string_fragment& cap_out, shlex_token_t& token_out)
+Result<shlex::tokenize_result_t, shlex::tokenize_error_t>
+shlex::scan_variable_ref()
{
- cap_out.sf_begin = this->s_index;
+ tokenize_result_t retval;
+
+ retval.tr_frag.sf_string = this->s_str;
+
+ retval.tr_frag.sf_begin = this->s_index;
this->s_index += 1;
if (this->s_index >= this->s_len) {
- cap_out.sf_end = this->s_index;
- token_out = shlex_token_t::ST_ERROR;
- return;
+ retval.tr_frag.sf_end = this->s_index;
+ return Err(tokenize_error_t{
+ "invalid variable reference",
+ retval.tr_frag,
+ });
}
if (this->s_str[this->s_index] == '{') {
- token_out = shlex_token_t::ST_QUOTED_VARIABLE_REF;
+ retval.tr_token = shlex_token_t::quoted_variable_ref;
this->s_index += 1;
} else {
- token_out = shlex_token_t::ST_VARIABLE_REF;
+ retval.tr_token = shlex_token_t::variable_ref;
}
while (this->s_index < this->s_len) {
- if (token_out == shlex_token_t::ST_VARIABLE_REF) {
+ if (retval.tr_token == shlex_token_t::variable_ref) {
if (isalnum(this->s_str[this->s_index])
|| this->s_str[this->s_index] == '#'
|| this->s_str[this->s_index] == '_')
@@ -188,14 +237,19 @@ shlex::scan_variable_ref(string_fragment& cap_out, shlex_token_t& token_out)
}
}
- cap_out.sf_end = this->s_index;
- if (token_out == shlex_token_t::ST_QUOTED_VARIABLE_REF
+ retval.tr_frag.sf_end = this->s_index;
+ if (retval.tr_token == shlex_token_t::quoted_variable_ref
&& this->s_str[this->s_index - 1] != '}')
{
- cap_out.sf_begin += 1;
- cap_out.sf_end = cap_out.sf_begin + 1;
- token_out = shlex_token_t::ST_ERROR;
+ retval.tr_frag.sf_begin += 1;
+ retval.tr_frag.sf_end = retval.tr_frag.sf_begin + 1;
+ return Err(tokenize_error_t{
+ "missing closing curly-brace in variable reference",
+ retval.tr_frag,
+ });
}
+
+ return Ok(retval);
}
void
@@ -216,3 +270,159 @@ shlex::resolve_home_dir(std::string& result, string_fragment cap) const
}
}
}
+
+bool
+shlex::eval(std::string& result, const scoped_resolver& vars)
+{
+ result.clear();
+
+ int last_index = 0;
+ bool done = false;
+
+ while (!done) {
+ auto tokenize_res = this->tokenize();
+ if (tokenize_res.isErr()) {
+ return false;
+ }
+ auto token = tokenize_res.unwrap();
+
+ result.append(&this->s_str[last_index],
+ token.tr_frag.sf_begin - last_index);
+ switch (token.tr_token) {
+ case shlex_token_t::eof:
+ done = true;
+ break;
+ case shlex_token_t::escape:
+ result.append(1, this->s_str[token.tr_frag.sf_begin + 1]);
+ break;
+ case shlex_token_t::whitespace:
+ result.append(&this->s_str[token.tr_frag.sf_begin],
+ token.tr_frag.length());
+ break;
+ case shlex_token_t::variable_ref:
+ case shlex_token_t::quoted_variable_ref: {
+ int extra = token.tr_token == shlex_token_t::variable_ref ? 0
+ : 1;
+ const std::string var_name(
+ &this->s_str[token.tr_frag.sf_begin + 1 + extra],
+ token.tr_frag.length() - 1 - extra * 2);
+ auto local_var = vars.find(var_name);
+ const char* var_value = getenv(var_name.c_str());
+
+ if (local_var != vars.end()) {
+ result.append(fmt::to_string(local_var->second));
+ } else if (var_value != nullptr) {
+ result.append(var_value);
+ }
+ break;
+ }
+ case shlex_token_t::tilde:
+ this->resolve_home_dir(result, token.tr_frag);
+ break;
+ case shlex_token_t::double_quote_start:
+ case shlex_token_t::double_quote_end:
+ result.append("\"");
+ break;
+ case shlex_token_t::single_quote_start:
+ case shlex_token_t::single_quote_end:
+ result.append("'");
+ break;
+ default:
+ break;
+ }
+ last_index = token.tr_frag.sf_end;
+ }
+
+ result.append(&this->s_str[last_index], this->s_len - last_index);
+
+ return true;
+}
+
+Result<std::vector<shlex::split_element_t>, shlex::tokenize_error_t>
+shlex::split(const scoped_resolver& vars)
+{
+ std::vector<split_element_t> retval;
+ int last_index = 0;
+ bool start_new = true;
+ bool done = false;
+
+ while (this->s_index < this->s_len && isspace(this->s_str[this->s_index])) {
+ this->s_index += 1;
+ }
+ if (this->s_index == this->s_len) {
+ return Ok(retval);
+ }
+ while (!done) {
+ auto tokenize_res = TRY(this->tokenize());
+
+ if (start_new) {
+ if (last_index < this->s_len) {
+ retval.emplace_back(split_element_t{
+ string_fragment::from_byte_range(
+ this->s_str, last_index, tokenize_res.tr_frag.sf_begin),
+ "",
+ });
+ }
+ start_new = false;
+ } else if (tokenize_res.tr_token != shlex_token_t::whitespace) {
+ retval.back().se_origin.sf_end = tokenize_res.tr_frag.sf_end;
+ } else {
+ retval.back().se_origin.sf_end = tokenize_res.tr_frag.sf_begin;
+ }
+ retval.back().se_value.append(
+ &this->s_str[last_index],
+ tokenize_res.tr_frag.sf_begin - last_index);
+ switch (tokenize_res.tr_token) {
+ case shlex_token_t::eof:
+ done = true;
+ break;
+ case shlex_token_t::escape:
+ retval.back().se_value.append(
+ 1, this->s_str[tokenize_res.tr_frag.sf_begin + 1]);
+ break;
+ case shlex_token_t::whitespace:
+ start_new = true;
+ break;
+ case shlex_token_t::variable_ref:
+ case shlex_token_t::quoted_variable_ref: {
+ int extra = tokenize_res.tr_token == shlex_token_t::variable_ref
+ ? 0
+ : 1;
+ std::string var_name(
+ &this->s_str[tokenize_res.tr_frag.sf_begin + 1 + extra],
+ tokenize_res.tr_frag.length() - 1 - extra * 2);
+ auto local_var = vars.find(var_name);
+ const char* var_value = getenv(var_name.c_str());
+
+ if (local_var != vars.end()) {
+ retval.back().se_value.append(
+ fmt::to_string(local_var->second));
+ } else if (var_value != nullptr) {
+ retval.back().se_value.append(var_value);
+ }
+ break;
+ }
+ case shlex_token_t::tilde:
+ this->resolve_home_dir(retval.back().se_value,
+ tokenize_res.tr_frag);
+ break;
+ default:
+ break;
+ }
+ last_index = tokenize_res.tr_frag.sf_end;
+ }
+
+ if (last_index < this->s_len) {
+ if (start_new || retval.empty()) {
+ retval.emplace_back(split_element_t{
+ string_fragment::from_byte_range(
+ this->s_str, last_index, this->s_len),
+ "",
+ });
+ }
+ retval.back().se_value.append(&this->s_str[last_index],
+ this->s_len - last_index);
+ }
+
+ return Ok(retval);
+}
diff --git a/src/shlex.hh b/src/shlex.hh
index 2317a2c..b51d86f 100644
--- a/src/shlex.hh
+++ b/src/shlex.hh
@@ -32,32 +32,36 @@
#ifndef LNAV_SHLEX_HH_H
#define LNAV_SHLEX_HH_H
+#include <functional>
#include <map>
#include <string>
#include <vector>
#include <pwd.h>
+#include "base/attr_line.hh"
#include "base/intern_string.hh"
#include "base/opt_util.hh"
#include "shlex.resolver.hh"
enum class shlex_token_t {
- ST_ERROR,
- ST_WHITESPACE,
- ST_ESCAPE,
- ST_DOUBLE_QUOTE_START,
- ST_DOUBLE_QUOTE_END,
- ST_SINGLE_QUOTE_START,
- ST_SINGLE_QUOTE_END,
- ST_VARIABLE_REF,
- ST_QUOTED_VARIABLE_REF,
- ST_TILDE,
+ eof,
+ whitespace,
+ escape,
+ double_quote_start,
+ double_quote_end,
+ single_quote_start,
+ single_quote_end,
+ variable_ref,
+ quoted_variable_ref,
+ tilde,
};
class shlex {
public:
- shlex(const char* str, size_t len) : s_str(str), s_len(len){};
+ static std::string escape(std::string s);
+
+ shlex(const char* str, size_t len) : s_str(str), s_len(len) {}
explicit shlex(const string_fragment& sf)
: s_str(sf.data()), s_len(sf.length())
@@ -65,7 +69,9 @@ public:
}
explicit shlex(const std::string& str)
- : s_str(str.c_str()), s_len(str.size()){};
+ : s_str(str.c_str()), s_len(str.size())
+ {
+ }
shlex& with_ignore_quotes(bool val)
{
@@ -73,128 +79,27 @@ public:
return *this;
}
- bool tokenize(string_fragment& cap_out, shlex_token_t& token_out);
+ struct tokenize_result_t {
+ shlex_token_t tr_token;
+ string_fragment tr_frag;
+ };
- template<typename Resolver = scoped_resolver>
- bool eval(std::string& result, const Resolver& vars)
- {
- result.clear();
-
- string_fragment cap;
- shlex_token_t token;
- int last_index = 0;
-
- while (this->tokenize(cap, token)) {
- result.append(&this->s_str[last_index], cap.sf_begin - last_index);
- switch (token) {
- case shlex_token_t::ST_ERROR:
- return false;
- case shlex_token_t::ST_ESCAPE:
- result.append(1, this->s_str[cap.sf_begin + 1]);
- break;
- case shlex_token_t::ST_WHITESPACE:
- result.append(&this->s_str[cap.sf_begin], cap.length());
- break;
- case shlex_token_t::ST_VARIABLE_REF:
- case shlex_token_t::ST_QUOTED_VARIABLE_REF: {
- int extra = token == shlex_token_t::ST_VARIABLE_REF ? 0 : 1;
- std::string var_name(&this->s_str[cap.sf_begin + 1 + extra],
- cap.length() - 1 - extra * 2);
- auto local_var = vars.find(var_name);
- const char* var_value = getenv(var_name.c_str());
-
- if (local_var != vars.end()) {
- result.append(fmt::to_string(local_var->second));
- } else if (var_value != nullptr) {
- result.append(var_value);
- }
- break;
- }
- case shlex_token_t::ST_TILDE:
- this->resolve_home_dir(result, cap);
- break;
- case shlex_token_t::ST_DOUBLE_QUOTE_START:
- case shlex_token_t::ST_DOUBLE_QUOTE_END:
- result.append("\"");
- break;
- case shlex_token_t::ST_SINGLE_QUOTE_START:
- case shlex_token_t::ST_SINGLE_QUOTE_END:
- result.append("'");
- break;
- default:
- break;
- }
- last_index = cap.sf_end;
- }
-
- result.append(&this->s_str[last_index], this->s_len - last_index);
-
- return true;
- }
+ struct tokenize_error_t {
+ const char* te_msg{nullptr};
+ string_fragment te_source;
+ };
- template<typename Resolver>
- bool split(std::vector<std::string>& result, const Resolver& vars)
- {
- result.clear();
-
- string_fragment cap;
- shlex_token_t token;
- int last_index = 0;
- bool start_new = true;
-
- while (isspace(this->s_str[this->s_index])) {
- this->s_index += 1;
- }
- while (this->tokenize(cap, token)) {
- if (start_new) {
- result.emplace_back("");
- start_new = false;
- }
- result.back().append(&this->s_str[last_index],
- cap.sf_begin - last_index);
- switch (token) {
- case shlex_token_t::ST_ERROR:
- return false;
- case shlex_token_t::ST_ESCAPE:
- result.back().append(1, this->s_str[cap.sf_begin + 1]);
- break;
- case shlex_token_t::ST_WHITESPACE:
- start_new = true;
- break;
- case shlex_token_t::ST_VARIABLE_REF:
- case shlex_token_t::ST_QUOTED_VARIABLE_REF: {
- int extra = token == shlex_token_t::ST_VARIABLE_REF ? 0 : 1;
- std::string var_name(&this->s_str[cap.sf_begin + 1 + extra],
- cap.length() - 1 - extra * 2);
- auto local_var = vars.find(var_name);
- const char* var_value = getenv(var_name.c_str());
-
- if (local_var != vars.end()) {
- result.back().append(fmt::to_string(local_var->second));
- } else if (var_value != nullptr) {
- result.back().append(var_value);
- }
- break;
- }
- case shlex_token_t::ST_TILDE:
- this->resolve_home_dir(result.back(), cap);
- break;
- default:
- break;
- }
- last_index = cap.sf_end;
- }
-
- if (last_index < this->s_len) {
- if (start_new || result.empty()) {
- result.emplace_back("");
- }
- result.back().append(&this->s_str[last_index],
- this->s_len - last_index);
- }
-
- return true;
- }
+ Result<tokenize_result_t, tokenize_error_t> tokenize();
+
+ bool eval(std::string& result, const scoped_resolver& vars);
+
+ struct split_element_t {
+ string_fragment se_origin;
+ std::string se_value;
+ };
+
+ Result<std::vector<split_element_t>, tokenize_error_t> split(
+ const scoped_resolver& vars);
void reset()
{
@@ -202,10 +107,12 @@ public:
this->s_state = state_t::STATE_NORMAL;
}
- void scan_variable_ref(string_fragment& cap_out, shlex_token_t& token_out);
+ Result<tokenize_result_t, tokenize_error_t> scan_variable_ref();
void resolve_home_dir(std::string& result, string_fragment cap) const;
+ attr_line_t to_attr_line(const tokenize_error_t& te) const;
+
enum class state_t {
STATE_NORMAL,
STATE_IN_DOUBLE_QUOTE,
diff --git a/src/shlex.resolver.hh b/src/shlex.resolver.hh
index 404d142..50afa24 100644
--- a/src/shlex.resolver.hh
+++ b/src/shlex.resolver.hh
@@ -37,10 +37,10 @@
#include <vector>
#include "base/intern_string.hh"
+#include "base/types.hh"
#include "fmt/format.h"
#include "mapbox/variant.hpp"
-struct null_value_t {};
using scoped_value_t = mapbox::util::
variant<std::string, string_fragment, int64_t, double, null_value_t>;
@@ -65,7 +65,7 @@ struct formatter<scoped_value_t> : formatter<std::string> {
class scoped_resolver {
public:
scoped_resolver(
- std::initializer_list<std::map<std::string, scoped_value_t>*> l)
+ std::initializer_list<const std::map<std::string, scoped_value_t>*> l)
{
this->sr_stack.insert(this->sr_stack.end(), l.begin(), l.end());
}
diff --git a/src/spectro_impls.cc b/src/spectro_impls.cc
index c9f9412..7ad78e4 100644
--- a/src/spectro_impls.cc
+++ b/src/spectro_impls.cc
@@ -82,7 +82,7 @@ public:
return this->fss_time_delegate->row_for_time(time_bucket);
}
- nonstd::optional<struct timeval> time_for_row(vis_line_t row) override
+ nonstd::optional<row_info> time_for_row(vis_line_t row) override
{
return this->fss_lines | lnav::itertools::nth(row)
| lnav::itertools::flat_map([this](const auto row) {
@@ -90,17 +90,14 @@ public:
});
}
- bool list_value_for_overlay(const listview_curses& lv,
- int y,
- int bottom,
+ void list_value_for_overlay(const listview_curses& lv,
vis_line_t line,
- attr_line_t& value_out) override
+ std::vector<attr_line_t>& value_out) override
{
if (this->fss_overlay_delegate != nullptr) {
- return this->fss_overlay_delegate->list_value_for_overlay(
- lv, y, bottom, line, value_out);
+ this->fss_overlay_delegate->list_value_for_overlay(
+ lv, line, value_out);
}
- return false;
}
text_sub_source* fss_delegate;
@@ -348,7 +345,6 @@ db_spectro_value_source::update_stats()
this->dsvs_stats.clear();
auto& dls = lnav_data.ld_db_row_source;
- auto& chart = dls.dls_chart;
this->dsvs_column_index = dls.column_name_to_index(this->dsvs_colname);
@@ -441,12 +437,20 @@ db_spectro_value_source::update_stats()
return;
}
- auto bs = chart.get_stats_for(this->dsvs_colname);
-
this->dsvs_begin_time = dls.dls_time_column.front().tv_sec;
this->dsvs_end_time = dls.dls_time_column.back().tv_sec;
- this->dsvs_stats.lvs_min_value = bs.bs_min_value;
- this->dsvs_stats.lvs_max_value = bs.bs_max_value;
+
+ auto find_res
+ = dls.dls_headers | lnav::itertools::find_if([this](const auto& elem) {
+ return elem.hm_name == this->dsvs_colname;
+ });
+ if (find_res) {
+ auto hm = find_res.value();
+ auto& bs = hm->hm_chart.get_stats_for(this->dsvs_colname);
+ this->dsvs_stats.lvs_min_value = bs.bs_min_value;
+ this->dsvs_stats.lvs_max_value = bs.bs_max_value;
+ }
+
this->dsvs_stats.lvs_count = dls.dls_rows.size();
}
diff --git a/src/spectro_source.cc b/src/spectro_source.cc
index e0dc802..5a694dc 100644
--- a/src/spectro_source.cc
+++ b/src/spectro_source.cc
@@ -33,7 +33,6 @@
#include "base/ansi_scrubber.hh"
#include "base/math_util.hh"
-#include "command_executor.hh"
#include "config.h"
nonstd::optional<size_t>
@@ -83,7 +82,7 @@ spectrogram_source::list_input_handle_key(listview_curses& lv, int ch)
return true;
}
auto begin_time = begin_time_opt.value();
- struct timeval end_time = begin_time;
+ struct timeval end_time = begin_time.ri_time;
end_time.tv_sec += this->ss_granularity;
double range_min, range_max, column_size;
@@ -94,7 +93,7 @@ spectrogram_source::list_input_handle_key(listview_curses& lv, int ch)
+ this->ss_cursor_column.value_or(0) * column_size;
range_max = range_min + column_size;
this->ss_value_source->spectro_mark((textview_curses&) lv,
- begin_time.tv_sec,
+ begin_time.ri_time.tv_sec,
end_time.tv_sec,
range_min,
range_max);
@@ -103,7 +102,7 @@ spectrogram_source::list_input_handle_key(listview_curses& lv, int ch)
return true;
}
- case KEY_CTRL_A: {
+ case KEY_CTRL('a'): {
if (this->ss_value_source != nullptr) {
this->ss_cursor_column = 0;
this->text_selection_changed((textview_curses&) lv);
@@ -112,7 +111,7 @@ spectrogram_source::list_input_handle_key(listview_curses& lv, int ch)
return true;
}
- case KEY_CTRL_E: {
+ case KEY_CTRL('e'): {
if (this->ss_value_source != nullptr) {
this->ss_cursor_column = INT_MAX;
this->text_selection_changed((textview_curses&) lv);
@@ -133,6 +132,7 @@ spectrogram_source::list_input_handle_key(listview_curses& lv, int ch)
this->text_attrs_for_line((textview_curses&) lv, sel, sa);
if (sa.empty()) {
+ this->ss_details_source.reset();
this->ss_cursor_column = nonstd::nullopt;
return true;
}
@@ -166,6 +166,7 @@ spectrogram_source::list_input_handle_key(listview_curses& lv, int ch)
}
}
this->ss_cursor_column = current->sa_range.lr_start;
+ this->ss_details_source.reset();
lv.reload_data();
@@ -177,152 +178,120 @@ spectrogram_source::list_input_handle_key(listview_curses& lv, int ch)
}
bool
-spectrogram_source::list_value_for_overlay(const listview_curses& lv,
- int y,
- int bottom,
- vis_line_t row,
- attr_line_t& value_out)
+spectrogram_source::text_handle_mouse(
+ textview_curses& tc,
+ const listview_curses::display_line_content_t&,
+ mouse_event& me)
{
- vis_line_t height;
- unsigned long width;
-
- lv.get_dimensions(height, width);
- width -= 2;
+ auto sel = tc.get_selection();
+ const auto& s_row = this->load_row(tc, sel);
- if (y > 0) {
- auto sel = lv.get_selection();
- auto selected_y = sel - lv.get_top() + 2;
+ for (int lpc = 0; lpc <= (int) s_row.sr_width; lpc++) {
+ int col_value = s_row.sr_values[lpc].rb_counter;
- if (y == selected_y && this->ss_cursor_column) {
- const auto& s_row = this->load_row(lv, sel);
- const auto& bucket
- = s_row.sr_values[this->ss_cursor_column.value()];
- auto& sb = this->ss_cached_bounds;
- spectrogram_request sr(sb);
-
- auto sel_time = rounddown(sb.sb_begin_time, this->ss_granularity)
- + sel * this->ss_granularity;
- sr.sr_width = width;
- sr.sr_begin_time = sel_time;
- sr.sr_end_time = sel_time + this->ss_granularity;
- sr.sr_column_size = (sb.sb_max_value_out - sb.sb_min_value_out)
- / (double) (width - 1);
- auto range_min = sb.sb_min_value_out
- + this->ss_cursor_column.value() * sr.sr_column_size;
- auto range_max = range_min + sr.sr_column_size;
-
- auto desc
- = attr_line_t()
- .append(lnav::roles::number(
- fmt::to_string(bucket.rb_counter)))
- .append(fmt::format(FMT_STRING(" value{} in the range "),
- bucket.rb_counter == 1 ? "" : "s"))
- .append(lnav::roles::number(
- fmt::format(FMT_STRING("{:.2Lf}"), range_min)))
- .append("-")
- .append(lnav::roles::number(
- fmt::format(FMT_STRING("{:.2Lf}"), range_max)))
- .append(" ");
- auto mark_offset = this->ss_cursor_column.value();
- auto mark_is_before = true;
-
- value_out.al_attrs.emplace_back(
- line_range{0, -1}, VC_ROLE.value(role_t::VCR_STATUS_INFO));
- if (desc.length() + 8 > width) {
- desc.clear();
- }
+ if (col_value == 0) {
+ continue;
+ }
- if (this->ss_cursor_column.value() + desc.length() + 1 > width) {
- mark_offset -= desc.length();
- mark_is_before = false;
- }
- value_out.append(mark_offset, ' ');
- if (mark_is_before) {
- value_out.append("\u25b2 ");
- }
- value_out.append(desc);
- if (!mark_is_before) {
- value_out.append("\u25b2 ");
- }
+ auto lr = line_range{lpc, lpc + 1};
+ if (me.is_click_in(mouse_button_t::BUTTON_LEFT, lr)) {
+ this->ss_cursor_column = lr.lr_start;
+ this->ss_details_source.reset();
- if (this->ss_details_view != nullptr) {
- if (s_row.sr_details_source_provider) {
- auto row_details_source = s_row.sr_details_source_provider(
- sr, range_min, range_max);
-
- this->ss_details_view->set_sub_source(
- row_details_source.get());
- this->ss_details_source = std::move(row_details_source);
- auto* overlay_source = dynamic_cast<list_overlay_source*>(
- this->ss_details_source.get());
- if (overlay_source != nullptr) {
- this->ss_details_view->set_overlay_source(
- overlay_source);
- }
- } else {
- this->ss_details_view->set_sub_source(
- this->ss_no_details_source);
- this->ss_details_view->set_overlay_source(nullptr);
- }
- }
+ tc.reload_data();
return true;
}
-
- return false;
}
- auto& line = value_out.get_string();
- char buf[128];
+ return false;
+}
- this->cache_bounds();
+void
+spectrogram_source::list_value_for_overlay(const listview_curses& lv,
+ vis_line_t row,
+ std::vector<attr_line_t>& value_out)
+{
+ vis_line_t height;
+ unsigned long width;
- if (this->ss_cached_line_count == 0) {
- value_out
- .append(lnav::roles::error("error: no data available, use the "))
- .append_quoted(lnav::roles::keyword(":spectrogram"))
- .append(lnav::roles::error(" command to visualize numeric data"));
- return true;
- }
+ lv.get_dimensions(height, width);
+ width -= 2;
- auto& sb = this->ss_cached_bounds;
- auto& st = this->ss_cached_thresholds;
+ auto sel = lv.get_selection();
+
+ if (row == sel && this->ss_cursor_column) {
+ const auto& s_row = this->load_row(lv, sel);
+ const auto& bucket = s_row.sr_values[this->ss_cursor_column.value()];
+ auto& sb = this->ss_cached_bounds;
+ spectrogram_request sr(sb);
+ attr_line_t retval;
+
+ auto sel_time = rounddown(sb.sb_begin_time, this->ss_granularity)
+ + sel * this->ss_granularity;
+ sr.sr_width = width;
+ sr.sr_begin_time = sel_time;
+ sr.sr_end_time = sel_time + this->ss_granularity;
+ sr.sr_column_size = (sb.sb_max_value_out - sb.sb_min_value_out)
+ / (double) (width - 1);
+ auto range_min = sb.sb_min_value_out
+ + this->ss_cursor_column.value() * sr.sr_column_size;
+ auto range_max = range_min + sr.sr_column_size;
+
+ auto desc
+ = attr_line_t()
+ .append(
+ lnav::roles::number(fmt::to_string(bucket.rb_counter)))
+ .append(fmt::format(FMT_STRING(" value{} in the range "),
+ bucket.rb_counter == 1 ? "" : "s"))
+ .append(lnav::roles::number(
+ fmt::format(FMT_STRING("{:.2Lf}"), range_min)))
+ .append("-")
+ .append(lnav::roles::number(
+ fmt::format(FMT_STRING("{:.2Lf}"), range_max)))
+ .append(" ");
+ auto mark_offset = this->ss_cursor_column.value();
+ auto mark_is_before = true;
+
+ retval.al_attrs.emplace_back(line_range{0, -1},
+ VC_ROLE.value(role_t::VCR_STATUS_INFO));
+ if (desc.length() + 8 > width) {
+ desc.clear();
+ }
- snprintf(buf, sizeof(buf), "Min: %'.10lg", sb.sb_min_value_out);
- line = buf;
+ if (this->ss_cursor_column.value() + desc.length() + 1 > width) {
+ mark_offset -= desc.length();
+ mark_is_before = false;
+ }
+ retval.append(mark_offset, ' ');
+ if (mark_is_before) {
+ retval.append("\u25b2 ");
+ }
+ retval.append(desc);
+ if (!mark_is_before) {
+ retval.append("\u25b2 ");
+ }
- snprintf(buf,
- sizeof(buf),
- ANSI_ROLE(" ") " 1-%'d " ANSI_ROLE(" ") " %'d-%'d " ANSI_ROLE(
- " ") " %'d+",
- role_t::VCR_LOW_THRESHOLD,
- st.st_green_threshold - 1,
- role_t::VCR_MED_THRESHOLD,
- st.st_green_threshold,
- st.st_yellow_threshold - 1,
- role_t::VCR_HIGH_THRESHOLD,
- st.st_yellow_threshold);
- auto buflen = strlen(buf);
- if (line.length() + buflen + 20 < width) {
- line.append(width / 2 - buflen / 3 - line.length(), ' ');
- } else {
- line.append(" ");
- }
- line.append(buf);
- scrub_ansi_string(line, &value_out.get_attrs());
+ if (this->ss_details_view != nullptr) {
+ if (s_row.sr_details_source_provider) {
+ auto row_details_source = s_row.sr_details_source_provider(
+ sr, range_min, range_max);
+
+ this->ss_details_view->set_sub_source(row_details_source.get());
+ this->ss_details_source = std::move(row_details_source);
+ auto* overlay_source = dynamic_cast<list_overlay_source*>(
+ this->ss_details_source.get());
+ if (overlay_source != nullptr) {
+ this->ss_details_view->set_overlay_source(overlay_source);
+ }
+ } else {
+ this->ss_details_view->set_sub_source(
+ this->ss_no_details_source);
+ this->ss_details_view->set_overlay_source(nullptr);
+ }
+ }
- snprintf(buf, sizeof(buf), "Max: %'.10lg", sb.sb_max_value_out);
- buflen = strlen(buf);
- if (line.length() + buflen + 4 < width) {
- line.append(width - buflen - line.length() - 2, ' ');
- } else {
- line.append(" ");
+ value_out.emplace_back(retval);
}
- line.append(buf);
-
- value_out.with_attr(string_attr(line_range(0, -1),
- VC_STYLE.value(text_attrs{A_UNDERLINE})));
-
- return true;
}
size_t
@@ -351,7 +320,7 @@ spectrogram_source::text_line_width(textview_curses& tc)
return width;
}
-nonstd::optional<struct timeval>
+nonstd::optional<text_time_translator::row_info>
spectrogram_source::time_for_row(vis_line_t row)
{
if (this->ss_details_source != nullptr) {
@@ -366,7 +335,7 @@ spectrogram_source::time_for_row(vis_line_t row)
return this->time_for_row_int(row);
}
-nonstd::optional<struct timeval>
+nonstd::optional<text_time_translator::row_info>
spectrogram_source::time_for_row_int(vis_line_t row)
{
struct timeval retval {
@@ -378,7 +347,7 @@ spectrogram_source::time_for_row_int(vis_line_t row)
= rounddown(this->ss_cached_bounds.sb_begin_time, this->ss_granularity)
+ row * this->ss_granularity;
- return retval;
+ return row_info{retval, row};
}
nonstd::optional<vis_line_t>
@@ -419,9 +388,9 @@ spectrogram_source::text_value_for_line(textview_curses& tc,
value_out.clear();
return;
}
- auto row_time = row_time_opt.value();
+ auto ri = row_time_opt.value();
- gmtime_r(&row_time.tv_sec, &tm);
+ gmtime_r(&ri.ri_time.tv_sec, &tm);
strftime(tm_buffer, sizeof(tm_buffer), " %a %b %d %H:%M:%S", &tm);
value_out = tm_buffer;
@@ -464,6 +433,12 @@ spectrogram_source::text_attrs_for_line(textview_curses& tc,
}
value_out.emplace_back(line_range(lpc, lpc + 1), VC_ROLE.value(role));
}
+
+ auto alt_row_index = row % 4;
+ if (alt_row_index == 2 || alt_row_index == 3) {
+ value_out.emplace_back(line_range{0, -1},
+ VC_ROLE.value(role_t::VCR_ALT_ROW));
+ }
}
void
@@ -582,12 +557,86 @@ spectrogram_source::text_selection_changed(textview_curses& tc)
{
if (this->ss_value_source == nullptr || this->text_line_count() == 0) {
this->ss_cursor_column = nonstd::nullopt;
+ this->ss_details_source.reset();
return;
}
+ if (tc.get_selection() == -1_vl) {
+ tc.set_selection(0_vl);
+ }
const auto& s_row = this->load_row(tc, tc.get_selection());
this->ss_cursor_column
= s_row.nearest_column(this->ss_cursor_column.value_or(0));
+ this->ss_details_source.reset();
+}
+
+bool
+spectrogram_source::list_static_overlay(const listview_curses& lv,
+ int y,
+ int bottom,
+ attr_line_t& value_out)
+{
+ if (y != 0) {
+ return false;
+ }
+
+ auto& line = value_out.get_string();
+ vis_line_t height;
+ unsigned long width;
+ char buf[128];
+
+ lv.get_dimensions(height, width);
+ width -= 2;
+
+ this->cache_bounds();
+
+ if (this->ss_cached_line_count == 0) {
+ value_out
+ .append(lnav::roles::error("error: no data available, use the "))
+ .append_quoted(lnav::roles::keyword(":spectrogram"))
+ .append(lnav::roles::error(" command to visualize numeric data"));
+ return true;
+ }
+
+ auto& sb = this->ss_cached_bounds;
+ auto& st = this->ss_cached_thresholds;
+
+ snprintf(buf, sizeof(buf), "Min: %'.10lg", sb.sb_min_value_out);
+ line = buf;
+
+ snprintf(buf,
+ sizeof(buf),
+ ANSI_ROLE(" ") " 1-%'d " ANSI_ROLE(" ") " %'d-%'d " ANSI_ROLE(
+ " ") " %'d+",
+ role_t::VCR_LOW_THRESHOLD,
+ st.st_green_threshold - 1,
+ role_t::VCR_MED_THRESHOLD,
+ st.st_green_threshold,
+ st.st_yellow_threshold - 1,
+ role_t::VCR_HIGH_THRESHOLD,
+ st.st_yellow_threshold);
+ auto buflen = strlen(buf);
+ if (line.length() + buflen + 20 < width) {
+ line.append(width / 2 - buflen / 3 - line.length(), ' ');
+ } else {
+ line.append(" ");
+ }
+ line.append(buf);
+ scrub_ansi_string(line, &value_out.get_attrs());
+
+ snprintf(buf, sizeof(buf), "Max: %'.10lg", sb.sb_max_value_out);
+ buflen = strlen(buf);
+ if (line.length() + buflen + 4 < width) {
+ line.append(width - buflen - line.length() - 2, ' ');
+ } else {
+ line.append(" ");
+ }
+ line.append(buf);
+
+ value_out.with_attr(string_attr(line_range(0, -1),
+ VC_STYLE.value(text_attrs{A_UNDERLINE})));
+
+ return true;
}
spectro_status_source::spectro_status_source()
diff --git a/src/spectro_source.hh b/src/spectro_source.hh
index c337ef1..d861b5b 100644
--- a/src/spectro_source.hh
+++ b/src/spectro_source.hh
@@ -117,7 +117,8 @@ class spectrogram_source
: public text_sub_source
, public text_time_translator
, public list_overlay_source
- , public list_input_delegate {
+ , public list_input_delegate
+ , public text_delegate {
public:
~spectrogram_source() override = default;
@@ -130,11 +131,18 @@ public:
bool list_input_handle_key(listview_curses& lv, int ch) override;
- bool list_value_for_overlay(const listview_curses& lv,
- int y,
- int bottom,
+ bool text_handle_mouse(textview_curses& tc,
+ const listview_curses::display_line_content_t&,
+ mouse_event& me) override;
+
+ bool list_static_overlay(const listview_curses& lv,
+ int y,
+ int bottom,
+ attr_line_t& value_out) override;
+
+ void list_value_for_overlay(const listview_curses& lv,
vis_line_t row,
- attr_line_t& value_out) override;
+ std::vector<attr_line_t>& value_out) override;
size_t text_line_count() override;
@@ -151,7 +159,7 @@ public:
void text_selection_changed(textview_curses& tc) override;
- nonstd::optional<struct timeval> time_for_row(vis_line_t row) override;
+ nonstd::optional<row_info> time_for_row(vis_line_t row) override;
nonstd::optional<vis_line_t> row_for_time(
struct timeval time_bucket) override;
@@ -167,7 +175,7 @@ public:
void cache_bounds();
- nonstd::optional<struct timeval> time_for_row_int(vis_line_t row);
+ nonstd::optional<row_info> time_for_row_int(vis_line_t row);
const spectrogram_row& load_row(const listview_curses& lv, int row);
diff --git a/src/sql_commands.cc b/src/sql_commands.cc
index e145331..34f0603 100644
--- a/src/sql_commands.cc
+++ b/src/sql_commands.cc
@@ -30,12 +30,15 @@
#include "base/auto_mem.hh"
#include "base/fs_util.hh"
#include "base/injector.bind.hh"
+#include "base/itertools.hh"
#include "base/lnav_log.hh"
#include "bound_tags.hh"
#include "command_executor.hh"
#include "config.h"
+#include "lnav.hh"
#include "readline_context.hh"
#include "shlex.hh"
+#include "sql_help.hh"
#include "sqlite-extension-func.hh"
#include "sqlitepp.hh"
#include "view_helpers.hh"
@@ -88,6 +91,7 @@ sql_cmd_read(exec_context& ec,
std::string cmdline,
std::vector<std::string>& args)
{
+ static const intern_string_t SRC = intern_string::lookup("cmdline");
static auto& lnav_db = injector::get<auto_sqlite3&>();
static auto& lnav_flags = injector::get<unsigned long&, lnav_flags_tag>();
@@ -102,13 +106,23 @@ sql_cmd_read(exec_context& ec,
return ec.make_error("{} -- unavailable in secure mode", args[0]);
}
- std::vector<std::string> split_args;
shlex lexer(cmdline);
- if (!lexer.split(split_args, ec.create_resolver())) {
- return ec.make_error("unable to parse arguments");
+ auto split_args_res = lexer.split(ec.create_resolver());
+ if (split_args_res.isErr()) {
+ auto split_err = split_args_res.unwrapErr();
+ auto um
+ = lnav::console::user_message::error("unable to parse file name")
+ .with_reason(split_err.te_msg)
+ .with_snippet(lnav::console::snippet::from(
+ SRC, lexer.to_attr_line(split_err)));
+
+ return Err(um);
}
+ auto split_args = split_args_res.unwrap()
+ | lnav::itertools::map([](const auto& elem) { return elem.se_value; });
+
for (size_t lpc = 1; lpc < split_args.size(); lpc++) {
auto read_res = lnav::filesystem::read_file(split_args[lpc]);
@@ -166,6 +180,36 @@ sql_cmd_schema(exec_context& ec,
}
static Result<std::string, lnav::console::user_message>
+sql_cmd_msgformats(exec_context& ec,
+ std::string cmdline,
+ std::vector<std::string>& args)
+{
+ static const std::string MSG_FORMAT_STMT = R"(
+SELECT count(*) AS total,
+ min(log_line) AS log_line,
+ min(log_time) AS log_time,
+ humanize_duration(timediff(max(log_time), min(log_time))) AS duration,
+ group_concat(DISTINCT log_format) AS log_formats,
+ log_msg_format
+ FROM all_logs
+ WHERE log_msg_format != ''
+ GROUP BY log_msg_format
+ HAVING total > 1
+ ORDER BY total DESC, log_line ASC
+)";
+
+ std::string retval;
+
+ if (args.empty()) {
+ return Ok(retval);
+ }
+
+ std::string alt;
+
+ return execute_sql(ec, MSG_FORMAT_STMT, alt);
+}
+
+static Result<std::string, lnav::console::user_message>
sql_cmd_generic(exec_context& ec,
std::string cmdline,
std::vector<std::string>& args)
@@ -180,6 +224,184 @@ sql_cmd_generic(exec_context& ec,
return Ok(retval);
}
+static Result<std::string, lnav::console::user_message>
+prql_cmd_from(exec_context& ec,
+ std::string cmdline,
+ std::vector<std::string>& args)
+{
+ std::string retval;
+
+ if (args.empty()) {
+ args.emplace_back("prql-table");
+ return Ok(retval);
+ }
+
+ return Ok(retval);
+}
+
+static readline_context::prompt_result_t
+prql_cmd_from_prompt(exec_context& ec, const std::string& cmdline)
+{
+ if (!endswith(cmdline, "from ")) {
+ return {};
+ }
+
+ auto* tc = *lnav_data.ld_view_stack.top();
+ auto* lss = dynamic_cast<logfile_sub_source*>(tc->get_sub_source());
+
+ if (lss == nullptr || lss->text_line_count() == 0) {
+ return {};
+ }
+
+ auto line_pair = lss->find_line_with_file(lss->at(tc->get_selection()));
+ if (!line_pair) {
+ return {};
+ }
+
+ auto format_name
+ = line_pair->first->get_format_ptr()->get_name().to_string();
+ return {
+ "",
+ lnav::prql::quote_ident(format_name) + " ",
+ };
+}
+
+static Result<std::string, lnav::console::user_message>
+prql_cmd_aggregate(exec_context& ec,
+ std::string cmdline,
+ std::vector<std::string>& args)
+{
+ std::string retval;
+
+ if (args.empty()) {
+ args.emplace_back("prql-expr");
+ return Ok(retval);
+ }
+
+ return Ok(retval);
+}
+
+static Result<std::string, lnav::console::user_message>
+prql_cmd_append(exec_context& ec,
+ std::string cmdline,
+ std::vector<std::string>& args)
+{
+ std::string retval;
+
+ if (args.empty()) {
+ args.emplace_back("prql-table");
+ return Ok(retval);
+ }
+
+ return Ok(retval);
+}
+
+static Result<std::string, lnav::console::user_message>
+prql_cmd_derive(exec_context& ec,
+ std::string cmdline,
+ std::vector<std::string>& args)
+{
+ std::string retval;
+
+ if (args.empty()) {
+ args.emplace_back("prql-expr");
+ return Ok(retval);
+ }
+
+ return Ok(retval);
+}
+
+static Result<std::string, lnav::console::user_message>
+prql_cmd_filter(exec_context& ec,
+ std::string cmdline,
+ std::vector<std::string>& args)
+{
+ std::string retval;
+
+ if (args.empty()) {
+ args.emplace_back("prql-expr");
+ return Ok(retval);
+ }
+
+ return Ok(retval);
+}
+
+static Result<std::string, lnav::console::user_message>
+prql_cmd_group(exec_context& ec,
+ std::string cmdline,
+ std::vector<std::string>& args)
+{
+ std::string retval;
+
+ if (args.empty()) {
+ args.emplace_back("prql-expr");
+ args.emplace_back("prql-source");
+ return Ok(retval);
+ }
+
+ return Ok(retval);
+}
+
+static Result<std::string, lnav::console::user_message>
+prql_cmd_join(exec_context& ec,
+ std::string cmdline,
+ std::vector<std::string>& args)
+{
+ std::string retval;
+
+ if (args.empty()) {
+ args.emplace_back("prql-table");
+ args.emplace_back("prql-expr");
+ return Ok(retval);
+ }
+
+ return Ok(retval);
+}
+
+static Result<std::string, lnav::console::user_message>
+prql_cmd_select(exec_context& ec,
+ std::string cmdline,
+ std::vector<std::string>& args)
+{
+ std::string retval;
+
+ if (args.empty()) {
+ args.emplace_back("prql-expr");
+ return Ok(retval);
+ }
+
+ return Ok(retval);
+}
+
+static Result<std::string, lnav::console::user_message>
+prql_cmd_sort(exec_context& ec,
+ std::string cmdline,
+ std::vector<std::string>& args)
+{
+ std::string retval;
+
+ if (args.empty()) {
+ args.emplace_back("prql-expr");
+ return Ok(retval);
+ }
+
+ return Ok(retval);
+}
+
+static Result<std::string, lnav::console::user_message>
+prql_cmd_take(exec_context& ec,
+ std::string cmdline,
+ std::vector<std::string>& args)
+{
+ std::string retval;
+
+ if (args.empty()) {
+ return Ok(retval);
+ }
+
+ return Ok(retval);
+}
+
static readline_context::command_t sql_commands[] = {
{
".dump",
@@ -193,8 +415,11 @@ static readline_context::command_t sql_commands[] = {
},
{
".msgformats",
- sql_cmd_schema,
- help_text(".msgformats", "df").sql_command(),
+ sql_cmd_msgformats,
+ help_text(".msgformats",
+ "Executes a query that will summarize the different message "
+ "formats found in the logs")
+ .sql_command(),
},
{
".read",
@@ -250,6 +475,313 @@ static readline_context::command_t sql_commands[] = {
"WITH",
sql_cmd_generic,
},
+ {
+ "from",
+ prql_cmd_from,
+ help_text("from")
+ .prql_transform()
+ .with_tags({"prql"})
+ .with_summary("PRQL command to specify a data source")
+ .with_parameter({"table", "The table to use as a source"})
+ .with_example({
+ "To pull data from the 'http_status_codes' database table",
+ "from http_status_codes | take 3",
+ help_example::language::prql,
+ })
+ .with_example({
+ "To use an array literal as a source",
+ "from [{ col1=1, col2='abc' }, { col1=2, col2='def' }]",
+ help_example::language::prql,
+ }),
+ prql_cmd_from_prompt,
+ "prql-source",
+ },
+ {
+ "aggregate",
+ prql_cmd_aggregate,
+ help_text("aggregate")
+ .prql_transform()
+ .with_tags({"prql"})
+ .with_summary("PRQL transform to summarize many rows into one")
+ .with_parameter(
+ help_text{"expr", "The aggregate expression(s)"}.with_grouping(
+ "{", "}"))
+ .with_example({
+ "To group values into a JSON array",
+ "from [{a=1}, {a=2}] | aggregate { arr = json.group_array a }",
+ help_example::language::prql,
+ }),
+ nullptr,
+ "prql-source",
+ {"prql-source"},
+ },
+ {
+ "append",
+ prql_cmd_append,
+ help_text("append")
+ .prql_transform()
+ .with_tags({"prql"})
+ .with_summary("PRQL transform to concatenate tables together")
+ .with_parameter({"table", "The table to use as a source"}),
+ nullptr,
+ "prql-source",
+ {"prql-source"},
+ },
+ {
+ "derive",
+ prql_cmd_derive,
+ help_text("derive")
+ .prql_transform()
+ .with_tags({"prql"})
+ .with_summary("PRQL transform to derive one or more columns")
+ .with_parameter(
+ help_text{"column", "The new column"}.with_grouping("{", "}"))
+ .with_example({
+ "To add a column that is a multiplication of another",
+ "from [{a=1}, {a=2}] | derive b = a * 2",
+ help_example::language::prql,
+ }),
+ nullptr,
+ "prql-source",
+ {"prql-source"},
+ },
+ {
+ "filter",
+ prql_cmd_filter,
+ help_text("filter")
+ .prql_transform()
+ .with_tags({"prql"})
+ .with_summary("PRQL transform to pick rows based on their values")
+ .with_parameter(
+ {"expr", "The expression to evaluate over each row"})
+ .with_example({
+ "To pick rows where 'a' is greater than one",
+ "from [{a=1}, {a=2}] | filter a > 1",
+ help_example::language::prql,
+ }),
+ nullptr,
+ "prql-source",
+ {"prql-source"},
+ },
+ {
+ "group",
+ prql_cmd_group,
+ help_text("group")
+ .prql_transform()
+ .with_tags({"prql"})
+ .with_summary("PRQL transform to partition rows into groups")
+ .with_parameter(
+ help_text{"key_columns", "The columns that define the group"}
+ .with_grouping("{", "}"))
+ .with_parameter(
+ help_text{"pipeline", "The pipeline to execute over a group"}
+ .with_grouping("(", ")"))
+ .with_example({
+ "To group by log_level and count the rows in each partition",
+ "from lnav_example_log | group { log_level } (aggregate { "
+ "count this })",
+ help_example::language::prql,
+ }),
+ nullptr,
+ "prql-source",
+ {"prql-source"},
+ },
+ {
+ "join",
+ prql_cmd_join,
+ help_text("join")
+ .prql_transform()
+ .with_tags({"prql"})
+ .with_summary("PRQL transform to add columns from another table")
+ .with_parameter(
+ help_text{"side", "Specifies which rows to include"}
+ .with_enum_values({"inner", "left", "right", "full"})
+ .with_default_value("inner")
+ .optional())
+ .with_parameter(
+ {"table", "The other table to join with the current rows"})
+ .with_parameter(
+ help_text{"condition", "The condition used to join rows"}
+ .with_grouping("(", ")")),
+ nullptr,
+ "prql-source",
+ {"prql-source"},
+ },
+ {
+ "select",
+ prql_cmd_select,
+ help_text("select")
+ .prql_transform()
+ .with_tags({"prql"})
+ .with_summary("PRQL transform to pick and compute columns")
+ .with_parameter(
+ help_text{"expr", "The columns to include in the result set"}
+ .with_grouping("{", "}"))
+ .with_example({
+ "To pick the 'b' column from the rows",
+ "from [{a=1, b='abc'}, {a=2, b='def'}] | select b",
+ help_example::language::prql,
+ })
+ .with_example({
+ "To compute a new column from an input",
+ "from [{a=1}, {a=2}] | select b = a * 2",
+ help_example::language::prql,
+ }),
+ nullptr,
+ "prql-source",
+ {"prql-source"},
+ },
+ {
+ "stats.average_of",
+ prql_cmd_sort,
+ help_text("stats.average_of", "Compute the average of col")
+ .prql_function()
+ .with_tags({"prql"})
+ .with_parameter(help_text{"col", "The column to average"})
+ .with_example({
+ "To get the average of a",
+ "from [{a=1}, {a=1}, {a=2}] | stats.average_of a",
+ help_example::language::prql,
+ }),
+ nullptr,
+ "prql-source",
+ {"prql-source"},
+ },
+ {
+ "stats.count_by",
+ prql_cmd_sort,
+ help_text(
+ "stats.count_by",
+ "Partition rows and count the number of rows in each partition")
+ .prql_function()
+ .with_tags({"prql"})
+ .with_parameter(help_text{"column", "The columns to group by"}
+ .one_or_more()
+ .with_grouping("{", "}"))
+ .with_example({
+ "To count rows for a particular value of column 'a'",
+ "from [{a=1}, {a=1}, {a=2}] | stats.count_by a",
+ help_example::language::prql,
+ }),
+ nullptr,
+ "prql-source",
+ {"prql-source"},
+ },
+ {
+ "stats.hist",
+ prql_cmd_sort,
+ help_text("stats.hist", "Count the top values per bucket of time")
+ .prql_function()
+ .with_tags({"prql"})
+ .with_parameter(help_text{"col", "The column to count"})
+ .with_parameter(help_text{"slice", "The time slice"}
+ .optional()
+ .with_default_value("'1h'"))
+ .with_parameter(
+ help_text{"top", "The limit on the number of values to report"}
+ .optional()
+ .with_default_value("10"))
+ .with_example({
+ "To chart the values of ex_procname over time",
+ "from lnav_example_log | stats.hist ex_procname",
+ help_example::language::prql,
+ }),
+ nullptr,
+ "prql-source",
+ {"prql-source"},
+ },
+ {
+ "stats.sum_of",
+ prql_cmd_sort,
+ help_text("stats.sum_of", "Compute the sum of col")
+ .prql_function()
+ .with_tags({"prql"})
+ .with_parameter(help_text{"col", "The column to sum"})
+ .with_example({
+ "To get the sum of a",
+ "from [{a=1}, {a=1}, {a=2}] | stats.sum_of a",
+ help_example::language::prql,
+ }),
+ nullptr,
+ "prql-source",
+ {"prql-source"},
+ },
+ {
+ "stats.by",
+ prql_cmd_sort,
+ help_text("stats.by", "A shorthand for grouping and aggregating")
+ .prql_function()
+ .with_tags({"prql"})
+ .with_parameter(help_text{"col", "The column to sum"})
+ .with_parameter(help_text{"values", "The aggregations to perform"})
+ .with_example({
+ "To partition by a and get the sum of b",
+ "from [{a=1, b=1}, {a=1, b=1}, {a=2, b=1}] | stats.by a "
+ "{sum b}",
+ help_example::language::prql,
+ }),
+ nullptr,
+ "prql-source",
+ {"prql-source"},
+ },
+ {
+ "sort",
+ prql_cmd_sort,
+ help_text("sort")
+ .prql_transform()
+ .with_tags({"prql"})
+ .with_summary("PRQL transform to sort rows")
+ .with_parameter(help_text{
+ "expr", "The values to use when ordering the result set"}
+ .with_grouping("{", "}"))
+ .with_example({
+ "To sort the rows in descending order",
+ "from [{a=1}, {a=2}] | sort {-a}",
+ help_example::language::prql,
+ }),
+ nullptr,
+ "prql-source",
+ {"prql-source"},
+ },
+ {
+ "take",
+ prql_cmd_take,
+ help_text("take")
+ .prql_transform()
+ .with_tags({"prql"})
+ .with_summary("PRQL command to pick rows based on their position")
+ .with_parameter({"n_or_range", "The number of rows or range"})
+ .with_example({
+ "To pick the first row",
+ "from [{a=1}, {a=2}, {a=3}] | take 1",
+ help_example::language::prql,
+ })
+ .with_example({
+ "To pick the second and third rows",
+ "from [{a=1}, {a=2}, {a=3}] | take 2..3",
+ help_example::language::prql,
+ }),
+ nullptr,
+ "prql-source",
+ {"prql-source"},
+ },
+ {
+ "utils.distinct",
+ prql_cmd_sort,
+ help_text("utils.distinct",
+ "A shorthand for getting distinct values of col")
+ .prql_function()
+ .with_tags({"prql"})
+ .with_parameter(help_text{"col", "The column to sum"})
+ .with_example({
+ "To get the distinct values of a",
+ "from [{a=1}, {a=1}, {a=2}] | utils.distinct a",
+ help_example::language::prql,
+ }),
+ nullptr,
+ "prql-source",
+ {"prql-source"},
+ },
};
static readline_context::command_map_t sql_cmd_map;
@@ -259,6 +791,9 @@ static auto bound_sql_cmd_map
sql_cmd_map_tag>::to_instance(+[]() {
for (auto& cmd : sql_commands) {
sql_cmd_map[cmd.c_name] = &cmd;
+ if (cmd.c_help.ht_name) {
+ cmd.c_help.index_tags();
+ }
}
return &sql_cmd_map;
diff --git a/src/sql_execute.hh b/src/sql_execute.hh
new file mode 100644
index 0000000..48d6d0b
--- /dev/null
+++ b/src/sql_execute.hh
@@ -0,0 +1,47 @@
+/**
+ * Copyright (c) 2023, Timothy Stack
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of Timothy Stack nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ''AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef lnav_sql_execute_hh
+#define lnav_sql_execute_hh
+
+#include <vector>
+
+#include <sqlite3.h>
+
+#include "base/lnav.console.hh"
+#include "shlex.resolver.hh"
+
+void sql_execute_script(
+ sqlite3* db,
+ const std::map<std::string, scoped_value_t>& global_vars,
+ const char* src_name,
+ const char* script,
+ std::vector<lnav::console::user_message>& errors);
+
+#endif
diff --git a/src/sql_help.hh b/src/sql_help.hh
index 08bcc51..4eaa77d 100644
--- a/src/sql_help.hh
+++ b/src/sql_help.hh
@@ -33,6 +33,7 @@
#define sql_help_hh
#include <map>
+#include <set>
#include "base/attr_line.hh"
#include "help_text.hh"
@@ -50,10 +51,45 @@ extern string_attr_type<void> SQL_COMMENT_ATTR;
void annotate_sql_statement(attr_line_t& al_inout);
-extern std::multimap<std::string, help_text*> sqlite_function_help;
+extern std::multimap<std::string, const help_text*> sqlite_function_help;
std::string sql_keyword_re();
std::vector<const help_text*> find_sql_help_for_line(const attr_line_t& al,
size_t x);
+namespace lnav {
+namespace sql {
+
+extern string_attr_type<void> PRQL_STAGE_ATTR;
+extern string_attr_type<void> PRQL_TRANSFORM_ATTR;
+extern string_attr_type<void> PRQL_KEYWORD_ATTR;
+extern string_attr_type<void> PRQL_IDENTIFIER_ATTR;
+extern string_attr_type<void> PRQL_FQID_ATTR;
+extern string_attr_type<void> PRQL_PIPE_ATTR;
+extern string_attr_type<void> PRQL_DOT_ATTR;
+extern string_attr_type<void> PRQL_STRING_ATTR;
+extern string_attr_type<void> PRQL_NUMBER_ATTR;
+extern string_attr_type<void> PRQL_OPERATOR_ATTR;
+extern string_attr_type<void> PRQL_PAREN_ATTR;
+extern string_attr_type<void> PRQL_UNTERMINATED_PAREN_ATTR;
+extern string_attr_type<void> PRQL_GARBAGE_ATTR;
+extern string_attr_type<void> PRQL_COMMENT_ATTR;
+
+bool is_prql(const string_fragment& sf);
+
+void annotate_prql_statement(attr_line_t& al);
+
+extern const char* prql_keywords[];
+extern std::multimap<std::string, const help_text*> prql_functions;
+
+} // namespace sql
+
+namespace prql {
+
+std::string quote_ident(std::string id);
+
+}
+
+} // namespace lnav
+
#endif
diff --git a/src/sql_util.cc b/src/sql_util.cc
index 97a5344..ce17d9b 100644
--- a/src/sql_util.cc
+++ b/src/sql_util.cc
@@ -29,30 +29,28 @@
* @file sql_util.cc
*/
-#include <algorithm>
#include <regex>
#include <vector>
#include "sql_util.hh"
#include <ctype.h>
-#include <stdio.h>
+#include <stdarg.h>
#include <string.h>
#include "base/auto_mem.hh"
#include "base/injector.hh"
#include "base/lnav_log.hh"
#include "base/string_util.hh"
-#include "base/time_util.hh"
#include "bound_tags.hh"
#include "config.h"
#include "lnav_util.hh"
#include "pcrepp/pcre2pp.hh"
#include "readline_context.hh"
#include "readline_highlighters.hh"
-#include "shlex.resolver.hh"
+#include "sql_execute.hh"
#include "sql_help.hh"
-#include "sqlite-extension-func.hh"
+#include "sqlitepp.hh"
using namespace lnav::roles::literals;
@@ -287,7 +285,7 @@ const std::unordered_map<unsigned char, const char*> sql_constraint_names = {
#endif
};
-std::multimap<std::string, help_text*> sqlite_function_help;
+std::multimap<std::string, const help_text*> sqlite_function_help;
static int
handle_db_list(void* ptr, int ncols, char** colvalues, char** colnames)
@@ -463,14 +461,15 @@ schema_foreign_key_list(void* ptr, int ncols, char** colvalues, char** colnames)
void
dump_sqlite_schema(sqlite3* db, std::string& schema_out)
{
- struct sqlite_metadata_callbacks schema_sql_meta_callbacks
- = {schema_collation_list,
- schema_db_list,
- schema_table_list,
- schema_table_info,
- schema_foreign_key_list,
- &schema_out,
- {}};
+ struct sqlite_metadata_callbacks schema_sql_meta_callbacks = {
+ schema_collation_list,
+ schema_db_list,
+ schema_table_list,
+ schema_table_info,
+ schema_foreign_key_list,
+ &schema_out,
+ {},
+ };
walk_sqlite_metadata(db, schema_sql_meta_callbacks);
}
@@ -575,12 +574,12 @@ sql_ident_needs_quote(const char* ident)
return false;
}
-char*
+auto_mem<char, sqlite3_free>
sql_quote_ident(const char* ident)
{
bool needs_quote = false;
size_t quote_count = 0, alloc_size;
- char* retval;
+ auto_mem<char, sqlite3_free> retval;
for (int lpc = 0; ident[lpc]; lpc++) {
if ((lpc == 0 && isdigit(ident[lpc]))
@@ -594,8 +593,8 @@ sql_quote_ident(const char* ident)
}
alloc_size = strlen(ident) + quote_count * 2 + (needs_quote ? 2 : 0) + 1;
- if ((retval = (char*) sqlite3_malloc(alloc_size)) == NULL) {
- retval = NULL;
+ if ((retval = (char*) sqlite3_malloc(alloc_size)) == nullptr) {
+ retval = nullptr;
} else {
char* curr = retval;
@@ -675,7 +674,7 @@ annotate_sql_with_error(sqlite3* db, const char* sql, const char* tail)
if (erroff != -1) {
auto line_with_error
- = string_fragment(retval.get_string())
+ = string_fragment::from_str(retval.get_string())
.find_boundaries_around(erroff, string_fragment::tag1{'\n'});
auto erroff_in_line = erroff - line_with_error.sf_begin;
@@ -1024,8 +1023,12 @@ annotate_sql_statement(attr_line_t& al)
&SQL_STRING_ATTR,
},
{
+ lnav::pcre2pp::code::from_const(R"(\A0x[0-9a-fA-F]+)"),
+ &SQL_NUMBER_ATTR,
+ },
+ {
lnav::pcre2pp::code::from_const(
- R"(\A-?\d+(?:\.\d*(?:[eE][\-\+]?\d+)?)?|0x[0-9a-fA-F]+$)"),
+ R"(\A-?\d+(?:\.\d+)?(?:[eE][\-\+]?\d+)?)"),
&SQL_NUMBER_ATTR,
},
{
@@ -1039,7 +1042,8 @@ annotate_sql_statement(attr_line_t& al)
&SQL_COMMENT_ATTR,
},
{
- lnav::pcre2pp::code::from_const(R"(\A(\*|<|>|=|!|\-|\+|\|\|))"),
+ lnav::pcre2pp::code::from_const(
+ R"(\A(\*|\->{1,2}|<|>|=|!|\-|\+|\|\|))"),
&SQL_OPERATOR_ATTR,
},
{
@@ -1055,6 +1059,11 @@ annotate_sql_statement(attr_line_t& al)
auto& line = al.get_string();
auto& sa = al.get_attrs();
+ if (lnav::sql::is_prql(line)) {
+ lnav::sql::annotate_prql_statement(al);
+ return;
+ }
+
auto cmd_find_res
= cmd_pattern.find_in(line, PCRE2_ANCHORED).ignore_error();
if (cmd_find_res) {
@@ -1136,6 +1145,9 @@ annotate_sql_statement(attr_line_t& al)
std::vector<const help_text*>
find_sql_help_for_line(const attr_line_t& al, size_t x)
{
+ static const auto* sql_cmd_map
+ = injector::get<readline_context::command_map_t*, sql_cmd_map_tag>();
+
std::vector<const help_text*> retval;
const auto& sa = al.get_attrs();
std::string name;
@@ -1144,10 +1156,7 @@ find_sql_help_for_line(const attr_line_t& al, size_t x)
{
auto sa_opt = get_string_attr(al.get_attrs(), &SQL_COMMAND_ATTR);
-
if (sa_opt) {
- auto* sql_cmd_map = injector::get<readline_context::command_map_t*,
- sql_cmd_map_tag>();
auto cmd_name = al.get_substring((*sa_opt)->sa_range);
auto cmd_iter = sql_cmd_map->find(cmd_name);
@@ -1155,6 +1164,36 @@ find_sql_help_for_line(const attr_line_t& al, size_t x)
return {&cmd_iter->second->c_help};
}
}
+
+ auto prql_trans_iter = find_string_attr_containing(
+ al.get_attrs(), &lnav::sql::PRQL_TRANSFORM_ATTR, x);
+ if (prql_trans_iter != al.get_attrs().end()) {
+ auto cmd_name = al.get_substring(prql_trans_iter->sa_range);
+ auto cmd_iter = sql_cmd_map->find(cmd_name);
+
+ if (cmd_iter != sql_cmd_map->end()) {
+ return {&cmd_iter->second->c_help};
+ }
+ }
+ }
+
+ auto prql_fqid_iter = find_string_attr_containing(
+ al.get_attrs(), &lnav::sql ::PRQL_FQID_ATTR, x);
+ if (prql_fqid_iter != al.get_attrs().end()) {
+ auto fqid = al.get_substring(prql_fqid_iter->sa_range);
+ auto cmd_iter = sql_cmd_map->find(fqid);
+ if (cmd_iter != sql_cmd_map->end()) {
+ return {&cmd_iter->second->c_help};
+ }
+
+ auto func_pair = lnav::sql::prql_functions.equal_range(fqid);
+
+ for (auto func_iter = func_pair.first; func_iter != func_pair.second;
+ ++func_iter)
+ {
+ retval.emplace_back(func_iter->second);
+ return retval;
+ }
}
std::vector<std::string> kw;
@@ -1218,3 +1257,312 @@ find_sql_help_for_line(const attr_line_t& al, size_t x)
return retval;
}
+
+namespace lnav {
+namespace sql {
+
+auto_mem<char, sqlite3_free>
+mprintf(const char* fmt, ...)
+{
+ auto_mem<char, sqlite3_free> retval;
+ va_list args;
+
+ va_start(args, fmt);
+ retval = sqlite3_vmprintf(fmt, args);
+ va_end(args);
+
+ return retval;
+}
+
+bool
+is_prql(const string_fragment& sf)
+{
+ auto trimmed = sf.trim().skip(string_fragment::tag1{';'});
+
+ return (trimmed.startswith("let ") || trimmed.startswith("from"));
+}
+
+const char* prql_transforms[] = {
+ "aggregate",
+ "append",
+ "derive",
+ "filter",
+ "from",
+ "group",
+ "join",
+ "loop",
+ "select",
+ "sort",
+ "take",
+ "window",
+
+ nullptr,
+};
+
+const char* prql_keywords[] = {
+ "average", "avg", "case", "count", "count_distinct", "false", "func",
+ "into", "let", "max", "min", "module", "null", "prql",
+ "stddev", "sum", "true", "type",
+
+ nullptr,
+};
+
+std::string
+prql_keyword_re()
+{
+ std::string retval = "(?:";
+ bool first = true;
+
+ for (const char* kw : prql_keywords) {
+ if (kw == nullptr) {
+ break;
+ }
+ if (!first) {
+ retval.append("|");
+ } else {
+ first = false;
+ }
+ retval.append("\\b");
+ retval.append(kw);
+ retval.append("\\b");
+ }
+ retval += ")";
+
+ return retval;
+}
+
+std::string
+prql_transform_re()
+{
+ std::string retval = "(?:";
+ bool first = true;
+
+ for (const char* kw : prql_transforms) {
+ if (kw == nullptr) {
+ break;
+ }
+ if (!first) {
+ retval.append("|");
+ } else {
+ first = false;
+ }
+ retval.append("\\b");
+ retval.append(kw);
+ retval.append("\\b");
+ }
+ retval += ")";
+
+ return retval;
+}
+
+string_attr_type<void> PRQL_STAGE_ATTR("prql_stage");
+string_attr_type<void> PRQL_TRANSFORM_ATTR("prql_transform");
+string_attr_type<void> PRQL_KEYWORD_ATTR("prql_keyword");
+string_attr_type<void> PRQL_IDENTIFIER_ATTR("prql_ident");
+string_attr_type<void> PRQL_FQID_ATTR("prql_fqid");
+string_attr_type<void> PRQL_DOT_ATTR("prql_dot");
+string_attr_type<void> PRQL_PIPE_ATTR("prql_pipe");
+string_attr_type<void> PRQL_STRING_ATTR("prql_string");
+string_attr_type<void> PRQL_NUMBER_ATTR("prql_number");
+string_attr_type<void> PRQL_OPERATOR_ATTR("prql_oper");
+string_attr_type<void> PRQL_PAREN_ATTR("prql_paren");
+string_attr_type<void> PRQL_UNTERMINATED_PAREN_ATTR("prql_unterminated_paren");
+string_attr_type<void> PRQL_GARBAGE_ATTR("prql_garbage");
+string_attr_type<void> PRQL_COMMENT_ATTR("prql_comment");
+
+void
+annotate_prql_statement(attr_line_t& al)
+{
+ static const std::string keyword_re_str = R"(\A)" + prql_keyword_re();
+ static const std::string transform_re_str = R"(\A)" + prql_transform_re();
+
+ static const struct {
+ lnav::pcre2pp::code re;
+ string_attr_type<void>* type;
+ } PATTERNS[] = {
+ {
+ lnav::pcre2pp::code::from_const(R"(\A(?:\[|\]|\{|\}|\(|\)))"),
+ &PRQL_PAREN_ATTR,
+ },
+ {
+ lnav::pcre2pp::code::from(transform_re_str).unwrap(),
+ &PRQL_TRANSFORM_ATTR,
+ },
+ {
+ lnav::pcre2pp::code::from(keyword_re_str).unwrap(),
+ &PRQL_KEYWORD_ATTR,
+ },
+ {
+ lnav::pcre2pp::code::from_const(R"(\A(?:f|r|s)?'([^']|\\.)*')"),
+ &PRQL_STRING_ATTR,
+ },
+ {
+ lnav::pcre2pp::code::from_const(R"(\A(?:f|r|s)?"([^\"]|\\.)*")"),
+ &PRQL_STRING_ATTR,
+ },
+ {
+ lnav::pcre2pp::code::from_const(R"(\A0x[0-9a-fA-F]+)"),
+ &PRQL_NUMBER_ATTR,
+ },
+ {
+ lnav::pcre2pp::code::from_const(
+ R"(\A-?\d+(?:\.\d+)?(?:[eE][\-\+]?\d+)?)"),
+ &PRQL_NUMBER_ATTR,
+ },
+ {
+ lnav::pcre2pp::code::from_const(
+ R"(\A(?:(?:(?:\$)?\b[a-z_]\w*)|`([^`]+)`))", PCRE2_CASELESS),
+ &PRQL_IDENTIFIER_ATTR,
+ },
+ {
+ lnav::pcre2pp::code::from_const(R"(\A#.*)"),
+ &PRQL_COMMENT_ATTR,
+ },
+ {
+ lnav::pcre2pp::code::from_const(
+ R"(\A(\*|\->{1,2}|<|>|=>|={1,2}|\|\||&&|!|\-|\+|~=|\.\.|,|\?\?))"),
+ &PRQL_OPERATOR_ATTR,
+ },
+ {
+ lnav::pcre2pp::code::from_const(R"(\A\|)"),
+ &PRQL_PIPE_ATTR,
+ },
+ {
+ lnav::pcre2pp::code::from_const(R"(\A\.)"),
+ &PRQL_DOT_ATTR,
+ },
+ {
+ lnav::pcre2pp::code::from_const(R"(\A.)"),
+ &PRQL_GARBAGE_ATTR,
+ },
+ };
+
+ static const auto ws_pattern = lnav::pcre2pp::code::from_const(R"(\A\s+)");
+
+ const auto& line = al.get_string();
+ auto& sa = al.get_attrs();
+ auto remaining = string_fragment::from_str(line);
+ while (!remaining.empty()) {
+ auto ws_find_res = ws_pattern.find_in(remaining).ignore_error();
+ if (ws_find_res) {
+ remaining = ws_find_res->f_remaining;
+ continue;
+ }
+ for (const auto& pat : PATTERNS) {
+ auto pat_find_res = pat.re.find_in(remaining).ignore_error();
+ if (pat_find_res) {
+ sa.emplace_back(to_line_range(pat_find_res->f_all),
+ pat.type->value());
+ remaining = pat_find_res->f_remaining;
+ break;
+ }
+ }
+ }
+
+ auto stages = std::vector<int>{};
+ std::vector<std::pair<char, int>> groups;
+ std::vector<line_range> fqids;
+ nonstd::optional<line_range> id_start;
+ bool saw_id_dot = false;
+ for (const auto& attr : sa) {
+ if (groups.empty() && attr.sa_type == &PRQL_PIPE_ATTR) {
+ stages.push_back(attr.sa_range.lr_start);
+ }
+ if (!id_start) {
+ if (attr.sa_type == &PRQL_IDENTIFIER_ATTR) {
+ id_start = attr.sa_range;
+ saw_id_dot = false;
+ }
+ } else if (!saw_id_dot) {
+ if (attr.sa_type == &PRQL_DOT_ATTR) {
+ saw_id_dot = true;
+ } else {
+ fqids.emplace_back(id_start.value());
+ id_start = nonstd::nullopt;
+ saw_id_dot = false;
+ }
+ } else {
+ if (attr.sa_type == &PRQL_IDENTIFIER_ATTR) {
+ id_start = line_range{
+ id_start.value().lr_start,
+ attr.sa_range.lr_end,
+ };
+ } else {
+ id_start = nonstd::nullopt;
+ }
+ saw_id_dot = false;
+ }
+ if (attr.sa_type != &PRQL_PAREN_ATTR) {
+ continue;
+ }
+
+ auto ch = line[attr.sa_range.lr_start];
+ switch (ch) {
+ case '(':
+ case '{':
+ case '[':
+ groups.emplace_back(ch, attr.sa_range.lr_start);
+ break;
+ case ')':
+ if (!groups.empty() && groups.back().first == '(') {
+ groups.pop_back();
+ }
+ break;
+ case '}':
+ if (!groups.empty() && groups.back().first == '{') {
+ groups.pop_back();
+ }
+ break;
+ case ']':
+ if (!groups.empty() && groups.back().first == '[') {
+ groups.pop_back();
+ }
+ break;
+ }
+ }
+ if (id_start) {
+ fqids.emplace_back(id_start.value());
+ }
+ int prev_stage_index = 0;
+ for (auto stage_index : stages) {
+ sa.emplace_back(line_range{prev_stage_index, stage_index},
+ PRQL_STAGE_ATTR.value());
+ prev_stage_index = stage_index;
+ }
+ sa.emplace_back(
+ line_range{prev_stage_index, (int) al.get_string().length()},
+ PRQL_STAGE_ATTR.value());
+ for (const auto& group : groups) {
+ sa.emplace_back(line_range{group.second, group.second + 1},
+ PRQL_UNTERMINATED_PAREN_ATTR.value());
+ }
+ for (const auto& fqid_range : fqids) {
+ sa.emplace_back(fqid_range, PRQL_FQID_ATTR.value());
+ }
+
+ stable_sort(sa.begin(), sa.end());
+}
+
+} // namespace sql
+
+namespace prql {
+
+std::string
+quote_ident(std::string id)
+{
+ static const auto PLAIN_NAME
+ = pcre2pp::code::from_const("^[a-zA-Z_][a-zA-Z_0-9]*$");
+
+ if (PLAIN_NAME.find_in(id).ignore_error()) {
+ return id;
+ }
+
+ auto buf = auto_buffer::alloc(id.length() + 8);
+ quote_content(buf, id, '`');
+
+ return fmt::format(FMT_STRING("`{}`"), buf.in());
+}
+
+} // namespace prql
+
+} // namespace lnav
diff --git a/src/sql_util.hh b/src/sql_util.hh
index 361942c..db6a3e0 100644
--- a/src/sql_util.hh
+++ b/src/sql_util.hh
@@ -41,10 +41,9 @@
#include <sys/time.h>
#include <time.h>
+#include "base/attr_line.hh"
#include "base/intern_string.hh"
-#include "base/lnav.console.hh"
#include "base/time_util.hh"
-#include "sqlitepp.hh"
extern const char* sql_keywords[145];
extern const char* sql_function_names[];
@@ -105,17 +104,10 @@ void sql_install_logger();
bool sql_ident_needs_quote(const char* ident);
-char* sql_quote_ident(const char* ident);
+auto_mem<char, sqlite3_free> sql_quote_ident(const char* ident);
std::string sql_safe_ident(const string_fragment& ident);
-void sql_execute_script(
- sqlite3* db,
- const std::map<std::string, scoped_value_t>& global_vars,
- const char* src_name,
- const char* script,
- std::vector<lnav::console::user_message>& errors);
-
int guess_type_from_pcre(const std::string& pattern, std::string& collator);
const char* sqlite3_type_to_string(int type);
@@ -133,4 +125,12 @@ int sqlite_authorizer(void* pUserData,
const char* detail3,
const char* detail4);
+namespace lnav {
+namespace sql {
+
+auto_mem<char, sqlite3_free> mprintf(const char* fmt, ...);
+
+}
+} // namespace lnav
+
#endif
diff --git a/src/sqlite-extension-func.cc b/src/sqlite-extension-func.cc
index 3a02f14..f6c5af5 100644
--- a/src/sqlite-extension-func.cc
+++ b/src/sqlite-extension-func.cc
@@ -32,6 +32,7 @@
#include "sqlite-extension-func.hh"
#include "base/auto_mem.hh"
+#include "base/itertools.hh"
#include "base/lnav_log.hh"
#include "base/string_util.hh"
#include "config.h"
@@ -46,6 +47,17 @@ int sqlite3_series_init(sqlite3* db,
const sqlite3_api_routines* pApi);
}
+#ifdef HAVE_RUST_DEPS
+rust::Vec<prqlc::SourceTreeElement> sqlite_extension_prql;
+#endif
+
+namespace lnav {
+namespace sql {
+std::multimap<std::string, const help_text*> prql_functions;
+
+}
+} // namespace lnav
+
sqlite_registration_func_t sqlite_registration_funcs[] = {
common_extension_functions,
state_extension_functions,
@@ -59,9 +71,73 @@ sqlite_registration_func_t sqlite_registration_funcs[] = {
nullptr,
};
+struct prql_hier {
+ std::map<std::string, prql_hier> ph_modules;
+ std::map<std::string, std::string> ph_declarations;
+
+ void to_string(std::string& accum) const
+ {
+ for (const auto& mod_pair : this->ph_modules) {
+ accum.append("module ");
+ accum.append(mod_pair.first);
+ accum.append(" {\n");
+ mod_pair.second.to_string(accum);
+ accum.append("}\n");
+ }
+ for (const auto& decl_pair : this->ph_declarations) {
+ accum.append(decl_pair.second);
+ accum.append("\n");
+ }
+ }
+};
+
+static void
+register_help(prql_hier& phier, const help_text& ht)
+{
+ auto prql_fqid
+ = fmt::format(FMT_STRING("{}"), fmt::join(ht.ht_prql_path, "."));
+ lnav::sql::prql_functions.emplace(prql_fqid, &ht);
+
+ auto* curr_hier = &phier;
+ for (size_t name_index = 0; name_index < ht.ht_prql_path.size();
+ name_index++)
+ {
+ const auto& prql_name = ht.ht_prql_path[name_index];
+ if (name_index == ht.ht_prql_path.size() - 1) {
+ auto param_names
+ = ht.ht_parameters | lnav::itertools::map([](const auto& elem) {
+ if (elem.ht_nargs == help_nargs_t::HN_OPTIONAL) {
+ return fmt::format(FMT_STRING("{}:null"),
+ elem.ht_name);
+ }
+ return fmt::format(FMT_STRING("p_{}"), elem.ht_name);
+ });
+ auto func_args
+ = ht.ht_parameters | lnav::itertools::map([](const auto& elem) {
+ if (elem.ht_nargs == help_nargs_t::HN_OPTIONAL) {
+ return fmt::format(FMT_STRING("{{{}:0}}"),
+ elem.ht_name);
+ }
+ return fmt::format(FMT_STRING("{{p_{}:0}}"),
+ elem.ht_name);
+ });
+ curr_hier->ph_declarations[prql_name]
+ = fmt::format(FMT_STRING("let {} = func {} -> s\"{}({})\""),
+ prql_name,
+ fmt::join(param_names, " "),
+ ht.ht_name,
+ fmt::join(func_args, ", "));
+ } else {
+ curr_hier = &curr_hier->ph_modules[prql_name];
+ }
+ }
+}
+
int
register_sqlite_funcs(sqlite3* db, sqlite_registration_func_t* reg_funcs)
{
+ static bool help_registration_done = false;
+ prql_hier phier;
int lpc;
require(db != nullptr);
@@ -94,11 +170,16 @@ register_sqlite_funcs(sqlite3* db, sqlite_registration_func_t* reg_funcs)
nullptr,
nullptr);
- if (fd.fd_help.ht_context != help_context_t::HC_NONE) {
- help_text& ht = fd.fd_help;
+ if (!help_registration_done
+ && fd.fd_help.ht_context != help_context_t::HC_NONE)
+ {
+ auto& ht = fd.fd_help;
sqlite_function_help.insert(std::make_pair(ht.ht_name, &ht));
ht.index_tags();
+ if (!ht.ht_prql_path.empty()) {
+ register_help(phier, ht);
+ }
}
}
@@ -115,15 +196,35 @@ register_sqlite_funcs(sqlite3* db, sqlite_registration_func_t* reg_funcs)
agg_funcs[i].xStep,
agg_funcs[i].xFinalize);
- if (fda.fda_help.ht_context != help_context_t::HC_NONE) {
- help_text& ht = fda.fda_help;
+ if (!help_registration_done
+ && fda.fda_help.ht_context != help_context_t::HC_NONE)
+ {
+ auto& ht = fda.fda_help;
sqlite_function_help.insert(std::make_pair(ht.ht_name, &ht));
ht.index_tags();
+ if (!ht.ht_prql_path.empty()) {
+ register_help(phier, ht);
+ }
}
}
}
+#ifdef HAVE_RUST_DEPS
+ if (sqlite_extension_prql.empty()) {
+ require(phier.ph_declarations.empty());
+ for (const auto& mod_pair : phier.ph_modules) {
+ std::string content;
+
+ mod_pair.second.to_string(content);
+ sqlite_extension_prql.emplace_back(prqlc::SourceTreeElement{
+ fmt::format(FMT_STRING("{}.prql"), mod_pair.first),
+ content,
+ });
+ }
+ }
+#endif
+
static help_text builtin_funcs[] = {
help_text("abs", "Return the absolute value of the argument")
.sql_function()
@@ -744,11 +845,338 @@ register_sqlite_funcs(sqlite3* db, sqlite_registration_func_t* reg_funcs)
"SELECT value FROM generate_series(10, 14, 2)",
})
.with_example({"To count down from five to 1",
- "SELECT value FROM generate_series(1, 5, -1)"})};
+ "SELECT value FROM generate_series(1, 5, -1)"}),
+
+ help_text("json",
+ "Verifies that its argument is valid JSON and returns a "
+ "minified version or throws an error.")
+ .sql_function()
+ .with_parameter({"X", "The string to interpret as JSON."})
+ .with_tags({"json"}),
+
+ help_text("json_array", "Constructs a JSON array from its arguments.")
+ .sql_function()
+ .with_parameter(
+ help_text{"X", "The values of the JSON array"}.zero_or_more())
+ .with_tags({"json"})
+ .with_example({"To create an array of all types",
+ "SELECT json_array(NULL, 1, 2.1, 'three', "
+ "json_array(4), json_object('five', 'six'))"})
+ .with_example({"To create an empty array", "SELECT json_array()"}),
+
+ help_text("json_array_length", "Returns the length of a JSON array.")
+ .sql_function()
+ .with_parameter({"X", "The JSON object."})
+ .with_parameter(
+ help_text{"P", "The path to the array in 'X'."}.optional())
+ .with_tags({"json"})
+ .with_example({"To get the length of an array",
+ "SELECT json_array_length('[1, 2, 3]')"})
+ .with_example(
+ {"To get the length of a nested array",
+ "SELECT json_array_length('{\"arr\": [1, 2, 3]}', '$.arr')"}),
+
+ help_text(
+ "json_extract",
+ "Returns the value(s) from the given JSON at the given path(s).")
+ .sql_function()
+ .with_parameter({"X", "The JSON value."})
+ .with_parameter(
+ help_text{"P", "The path to extract."}.one_or_more())
+ .with_tags({"json"})
+ .with_example({"To get a number",
+ R"(SELECT json_extract('{"num": 1}', '$.num'))"})
+ .with_example(
+ {"To get two numbers",
+ R"(SELECT json_extract('{"num": 1, "val": 2}', '$.num', '$.val'))"})
+ .with_example(
+ {"To get an object",
+ R"(SELECT json_extract('{"obj": {"sub": 1}}', '$.obj'))"})
+#if 0 && SQLITE_VERSION_NUMBER >= 3038000
+ .with_example({"To get a JSON value using the short-hand",
+ R"(SELECT '{"a":"b"}' -> '$.a')"})
+ .with_example({"To get a SQL value using the short-hand",
+ R"(SELECT '{"a":"b"}' ->> '$.a')"})
+#endif
+ ,
+
+ help_text("json_insert",
+ "Inserts values into a JSON object/array at the given "
+ "locations, if it does not already exist")
+ .sql_function()
+ .with_parameter({"X", "The JSON value to update"})
+ .with_parameter({"P",
+ "The path to the insertion point. A '#' array "
+ "index means append the value"})
+ .with_parameter({"Y", "The value to insert"})
+ .with_tags({"json"})
+ .with_example({"To append to an array",
+ R"(SELECT json_insert('[1, 2]', '$[#]', 3))"})
+ .with_example({"To update an object",
+ R"(SELECT json_insert('{"a": 1}', '$.b', 2))"})
+ .with_example({"To ensure a value is set",
+ R"(SELECT json_insert('{"a": 1}', '$.a', 2))"})
+ .with_example(
+ {"To update multiple values",
+ R"(SELECT json_insert('{"a": 1}', '$.b', 2, '$.c', 3))"}),
+
+ help_text("json_replace",
+ "Replaces existing values in a JSON object/array at the "
+ "given locations")
+ .sql_function()
+ .with_parameter({"X", "The JSON value to update"})
+ .with_parameter({"P", "The path to replace"})
+ .with_parameter({"Y", "The new value for the property"})
+ .with_tags({"json"})
+ .with_example({"To replace an existing value",
+ R"(SELECT json_replace('{"a": 1}', '$.a', 2))"})
+ .with_example(
+ {"To replace a value without creating a new property",
+ R"(SELECT json_replace('{"a": 1}', '$.a', 2, '$.b', 3))"}),
+
+ help_text("json_set",
+ "Inserts or replaces existing values in a JSON object/array "
+ "at the given locations")
+ .sql_function()
+ .with_parameter({"X", "The JSON value to update"})
+ .with_parameter({"P",
+ "The path to the insertion point. A '#' array "
+ "index means append the value"})
+ .with_parameter({"Y", "The value to set"})
+ .with_tags({"json"})
+ .with_example({"To replace an existing array element",
+ R"(SELECT json_set('[1, 2]', '$[1]', 3))"})
+ .with_example(
+ {"To replace a value and create a new property",
+ R"(SELECT json_set('{"a": 1}', '$.a', 2, '$.b', 3))"}),
- for (auto& ht : builtin_funcs) {
- sqlite_function_help.insert(std::make_pair(ht.ht_name, &ht));
- ht.index_tags();
+ help_text("json_object",
+ "Create a JSON object from the given arguments")
+ .sql_function()
+ .with_parameter({"N", "The property name"})
+ .with_parameter({"V", "The property value"})
+ .with_tags({"json"})
+ .with_example(
+ {"To create an object", "SELECT json_object('a', 1, 'b', 'c')"})
+ .with_example(
+ {"To create an empty object", "SELECT json_object()"}),
+
+ help_text("json_remove", "Removes paths from a JSON value")
+ .sql_function()
+ .with_parameter({"X", "The JSON value to update"})
+ .with_parameter(help_text{"P", "The paths to remove"}.one_or_more())
+ .with_tags({"json"})
+ .with_example({"To remove elements of an array",
+ "SELECT json_remove('[1,2,3]', '$[1]', '$[1]')"})
+ .with_example({"To remove object properties",
+ R"(SELECT json_remove('{"a":1,"b":2}', '$.b'))"}),
+
+ help_text("json_type", "Returns the type of a JSON value")
+ .sql_function()
+ .with_parameter({"X", "The JSON value to query"})
+ .with_parameter(help_text{"P", "The path to the value"}.optional())
+ .with_tags({"json"})
+ .with_example(
+ {"To get the type of a value",
+ R"(SELECT json_type('[null,1,2.1,"three",{"four":5}]'))"})
+ .with_example(
+ {"To get the type of an array element",
+ R"(SELECT json_type('[null,1,2.1,"three",{"four":5}]', '$[0]'))"})
+ .with_example(
+ {"To get the type of a string",
+ R"(SELECT json_type('[null,1,2.1,"three",{"four":5}]', '$[3]'))"}),
+
+ help_text("json_valid", "Tests if the given value is valid JSON")
+ .sql_function()
+ .with_parameter({"X", "The value to check"})
+ .with_tags({"json"})
+ .with_example({"To check an empty string", "SELECT json_valid('')"})
+ .with_example({"To check a string", R"(SELECT json_valid('"a"'))"}),
+
+ help_text("json_quote",
+ "Returns the JSON representation of the given value, if it "
+ "is not already JSON")
+ .sql_function()
+ .with_parameter({"X", "The value to convert"})
+ .with_tags({"json"})
+ .with_example(
+ {"To convert a string", "SELECT json_quote('Hello, World!')"})
+ .with_example({"To pass through an existing JSON value",
+ R"(SELECT json_quote(json('"Hello, World!"')))"}),
+
+ help_text("json_each",
+ "A table-valued-function that returns the children of the "
+ "top-level JSON value")
+ .sql_table_valued_function()
+ .with_parameter({"X", "The JSON value to query"})
+ .with_parameter(
+ help_text{"P", "The path to the value to query"}.optional())
+ .with_result({"key",
+ "The array index for elements of an array or "
+ "property names of the object"})
+ .with_result({"value", "The value for the current element"})
+ .with_result({"type", "The type of the current element"})
+ .with_result(
+ {"atom",
+ "The SQL value of the element, if it is a primitive type"})
+ .with_result({"fullkey", "The path to the current element"})
+ .with_tags({"json"})
+ .with_example(
+ {"To iterate over an array",
+ R"(SELECT * FROM json_each('[null,1,"two",{"three":4.5}]'))"}),
+
+ help_text("json_tree",
+ "A table-valued-function that recursively descends through a "
+ "JSON value")
+ .sql_table_valued_function()
+ .with_parameter({"X", "The JSON value to query"})
+ .with_parameter(
+ help_text{"P", "The path to the value to query"}.optional())
+ .with_result({"key",
+ "The array index for elements of an array or "
+ "property names of the object"})
+ .with_result({"value", "The value for the current element"})
+ .with_result({"type", "The type of the current element"})
+ .with_result(
+ {"atom",
+ "The SQL value of the element, if it is a primitive type"})
+ .with_result({"fullkey", "The path to the current element"})
+ .with_result({"path", "The path to the container of this element"})
+ .with_tags({"json"})
+ .with_example(
+ {"To iterate over an array",
+ R"(SELECT key,value,type,atom,fullkey,path FROM json_tree('[null,1,"two",{"three":4.5}]'))"}),
+
+ help_text("text.contains", "Returns true if col contains sub")
+ .prql_function()
+ .with_parameter(
+ help_text{"sub", "The substring to look for in col"})
+ .with_parameter(help_text{"col", "The string to examine"})
+ .with_example({
+ "To check if 'Hello' contains 'lo'",
+ "from [{s='Hello'}] | select { s=text.contains 'lo' s }",
+ help_example::language::prql,
+ })
+ .with_example({
+ "To check if 'Goodbye' contains 'lo'",
+ "from [{s='Goodbye'}] | select { s=text.contains 'lo' s }",
+ help_example::language::prql,
+ }),
+ help_text("text.ends_with", "Returns true if col ends with suffix")
+ .prql_function()
+ .with_parameter(
+ help_text{"suffix", "The string to look for at the end of col"})
+ .with_parameter(help_text{"col", "The string to examine"})
+ .with_example({
+ "To check if 'Hello' ends with 'lo'",
+ "from [{s='Hello'}] | select { s=text.ends_with 'lo' s }",
+ help_example::language::prql,
+ })
+ .with_example({
+ "To check if 'Goodbye' ends with 'lo'",
+ "from [{s='Goodbye'}] | select { s=text.ends_with 'lo' s }",
+ help_example::language::prql,
+ }),
+ help_text("text.extract", "Extract a slice of a string")
+ .prql_function()
+ .with_parameter(help_text{
+ "idx",
+ "The starting index where the first character is index 1"})
+ .with_parameter(help_text{"len", "The length of the slice"})
+ .with_parameter(help_text{"str", "The string to extract from"})
+ .with_example({
+ "To extract a substring from s",
+ "from [{s='Hello, World!'}] | select { s=text.extract 1 5 s }",
+ help_example::language::prql,
+ }),
+ help_text("text.length", "Returns the number of characters in col")
+ .prql_function()
+ .with_parameter(help_text{"col", "The string to examine"})
+ .with_example({
+ "To count the number of characters in s",
+ "from [{s='Hello, World!'}] | select { s=text.length s }",
+ help_example::language::prql,
+ }),
+ help_text("text.lower", "Converts col to lowercase")
+ .prql_function()
+ .with_parameter(help_text{"col", "The string to convert"})
+ .with_example({
+ "To convert s to lowercase",
+ "from [{s='HELLO'}] | select { s=text.lower s }",
+ help_example::language::prql,
+ }),
+ help_text("text.ltrim", "Remove whitespace from the left side of col")
+ .prql_function()
+ .with_parameter(help_text{"col", "The string to trim"})
+ .with_example({
+ "To trim the left side of s",
+ "from [{s=' HELLO '}] | select { s=text.ltrim s }",
+ help_example::language::prql,
+ }),
+ help_text("text.replace",
+ "Replace all occurrences of before with after in col")
+ .prql_function()
+ .with_parameter(help_text{"before", "The string to find"})
+ .with_parameter(help_text{"after", "The replacement"})
+ .with_parameter(help_text{"col", "The string to trim"})
+ .with_example({
+ "To erase foo in s",
+ "from [{s='foobar'}] | select { s=text.replace 'foo' '' s }",
+ help_example::language::prql,
+ }),
+ help_text("text.rtrim", "Remove whitespace from the right side of col")
+ .prql_function()
+ .with_parameter(help_text{"col", "The string to trim"})
+ .with_example({
+ "To trim the right side of s",
+ "from [{s=' HELLO '}] | select { s=text.rtrim s }",
+ help_example::language::prql,
+ }),
+ help_text("text.starts_with", "Returns true if col starts with suffix")
+ .prql_function()
+ .with_parameter(help_text{
+ "suffix", "The string to look for at the start of col"})
+ .with_parameter(help_text{"col", "The string to examine"})
+ .with_example({
+ "To check if 'Hello' starts with 'lo'",
+ "from [{s='Hello'}] | select { s=text.starts_with 'He' s }",
+ help_example::language::prql,
+ })
+ .with_example({
+ "To check if 'Goodbye' starts with 'lo'",
+ "from [{s='Goodbye'}] | select { s=text.starts_with 'He' s }",
+ help_example::language::prql,
+ }),
+ help_text("text.trim", "Remove whitespace from the both sides of col")
+ .prql_function()
+ .with_parameter(help_text{"col", "The string to trim"})
+ .with_example({
+ "To trim s",
+ "from [{s=' HELLO '}] | select { s=text.trim s }",
+ help_example::language::prql,
+ }),
+ help_text("text.upper", "Converts col to uppercase")
+ .prql_function()
+ .with_parameter(help_text{"col", "The string to convert"})
+ .with_example({
+ "To convert s to uppercase",
+ "from [{s='hello'}] | select { s=text.upper s }",
+ help_example::language::prql,
+ }),
+ };
+
+ if (!help_registration_done) {
+ for (auto& ht : builtin_funcs) {
+ switch (ht.ht_context) {
+ case help_context_t::HC_PRQL_FUNCTION:
+ lnav::sql::prql_functions.emplace(ht.ht_name, &ht);
+ break;
+ default:
+ sqlite_function_help.emplace(ht.ht_name, &ht);
+ break;
+ }
+ ht.index_tags();
+ }
}
static help_text builtin_win_funcs[] = {
@@ -847,9 +1275,11 @@ register_sqlite_funcs(sqlite3* db, sqlite_registration_func_t* reg_funcs)
.with_tags({"window"}),
};
- for (auto& ht : builtin_win_funcs) {
- sqlite_function_help.insert(std::make_pair(ht.ht_name, &ht));
- ht.index_tags();
+ if (!help_registration_done) {
+ for (auto& ht : builtin_win_funcs) {
+ sqlite_function_help.insert(std::make_pair(ht.ht_name, &ht));
+ ht.index_tags();
+ }
}
static help_text idents[] = {
@@ -1152,16 +1582,20 @@ register_sqlite_funcs(sqlite3* db, sqlite_registration_func_t* reg_funcs)
.optional()),
};
- for (auto& ht : idents) {
- sqlite_function_help.insert(make_pair(toupper(ht.ht_name), &ht));
- for (const auto& param : ht.ht_parameters) {
- if (!param.ht_flag_name) {
- continue;
+ if (!help_registration_done) {
+ for (auto& ht : idents) {
+ sqlite_function_help.insert(make_pair(toupper(ht.ht_name), &ht));
+ for (const auto& param : ht.ht_parameters) {
+ if (!param.ht_flag_name) {
+ continue;
+ }
+ sqlite_function_help.insert(
+ make_pair(toupper(param.ht_flag_name), &ht));
}
- sqlite_function_help.insert(
- make_pair(toupper(param.ht_flag_name), &ht));
}
}
+ help_registration_done = true;
+
return 0;
}
diff --git a/src/sqlite-extension-func.hh b/src/sqlite-extension-func.hh
index 1e62a6a..fcae4fd 100644
--- a/src/sqlite-extension-func.hh
+++ b/src/sqlite-extension-func.hh
@@ -40,6 +40,10 @@
#include "help_text.hh"
+#ifdef HAVE_RUST_DEPS
+# include "prqlc.cxx.hh"
+#endif
+
struct FuncDef {
const char* zName{nullptr};
signed char nArg{0};
@@ -95,6 +99,10 @@ extern sqlite_registration_func_t sqlite_registration_funcs[];
int register_sqlite_funcs(sqlite3* db, sqlite_registration_func_t* reg_funcs);
+#ifdef HAVE_RUST_DEPS
+extern rust::Vec<prqlc::SourceTreeElement> sqlite_extension_prql;
+#endif
+
extern "C"
{
int sqlite3_db_dump(
diff --git a/src/sqlitepp.client.hh b/src/sqlitepp.client.hh
index 5a82756..46c4a64 100644
--- a/src/sqlitepp.client.hh
+++ b/src/sqlitepp.client.hh
@@ -103,7 +103,10 @@ bind_values(sqlite3_stmt* stmt, Args... args)
}
struct prepared_stmt {
- prepared_stmt(auto_mem<sqlite3_stmt> stmt) : ps_stmt(std::move(stmt)) {}
+ explicit prepared_stmt(auto_mem<sqlite3_stmt> stmt)
+ : ps_stmt(std::move(stmt))
+ {
+ }
Result<void, std::string> execute()
{
@@ -195,10 +198,12 @@ prepare_stmt(sqlite3* db, const char* sql, Args... args)
sqlite3_errmsg(db)));
}
- if (bind_values(retval.in(), args...) != SQLITE_OK) {
- return Err(
- fmt::format(FMT_STRING("unable to prepare SQL statement: {}"),
- sqlite3_errmsg(db)));
+ if (sizeof...(args) > 0) {
+ if (bind_values(retval.in(), args...) != SQLITE_OK) {
+ return Err(
+ fmt::format(FMT_STRING("unable to prepare SQL statement: {}"),
+ sqlite3_errmsg(db)));
+ }
}
return Ok(prepared_stmt{
diff --git a/src/sqlitepp.hh b/src/sqlitepp.hh
index 7845a23..0db2020 100644
--- a/src/sqlitepp.hh
+++ b/src/sqlitepp.hh
@@ -37,8 +37,9 @@
#include <sqlite3.h>
#include "base/auto_mem.hh"
+#include "base/intern_string.hh"
+#include "base/types.hh"
#include "optional.hpp"
-#include "shlex.resolver.hh"
/* XXX figure out how to do this with the template */
void sqlite_close_wrapper(void* mem);
diff --git a/src/state-extension-functions.cc b/src/state-extension-functions.cc
index b382471..e7aca12 100644
--- a/src/state-extension-functions.cc
+++ b/src/state-extension-functions.cc
@@ -48,7 +48,31 @@ sql_log_top_line()
if (tc.get_inner_height() == 0_vl) {
return nonstd::nullopt;
}
- return (int64_t) tc.get_top();
+ return (int64_t) tc.get_selection();
+}
+
+static nonstd::optional<int64_t>
+sql_log_msg_line()
+{
+ const auto& tc = lnav_data.ld_views[LNV_LOG];
+
+ if (tc.get_inner_height() == 0_vl) {
+ return nonstd::nullopt;
+ }
+
+ auto top_line = tc.get_selection();
+ auto line_pair_opt = lnav_data.ld_log_source.find_line_with_file(top_line);
+ if (!line_pair_opt) {
+ return nonstd::nullopt;
+ }
+
+ auto ll = line_pair_opt.value().second;
+ while (ll->is_continued()) {
+ --ll;
+ top_line -= 1_vl;
+ }
+
+ return (int64_t) top_line;
}
static nonstd::optional<std::string>
@@ -60,15 +84,15 @@ sql_log_top_datetime()
return nonstd::nullopt;
}
- auto top_time = lnav_data.ld_log_source.time_for_row(
- lnav_data.ld_views[LNV_LOG].get_top());
- if (!top_time) {
+ auto top_ri = lnav_data.ld_log_source.time_for_row(
+ lnav_data.ld_views[LNV_LOG].get_selection());
+ if (!top_ri) {
return nonstd::nullopt;
}
char buffer[64];
- sql_strftime(buffer, sizeof(buffer), top_time.value());
+ sql_strftime(buffer, sizeof(buffer), top_ri->ri_time);
return buffer;
}
@@ -99,9 +123,14 @@ sql_lnav_version()
}
static int64_t
-sql_error(const char* str)
+sql_error(const char* str, nonstd::optional<string_fragment> reason)
{
- throw sqlite_func_error("{}", str);
+ auto um = lnav::console::user_message::error(str);
+
+ if (reason) {
+ um.with_reason(reason->to_string());
+ }
+ throw um;
}
static nonstd::optional<std::string>
@@ -129,33 +158,53 @@ state_extension_functions(struct FuncDef** basic_funcs,
static struct FuncDef state_funcs[] = {
sqlite_func_adapter<decltype(&sql_log_top_line), sql_log_top_line>::
builder(
- help_text("log_top_line",
- "Return the line number at the top of the log view.")
- .sql_function()),
+ help_text(
+ "log_top_line",
+ "Return the number of the focused line of the log view.")
+ .sql_function()
+ .with_prql_path({"lnav", "view", "top_line"})),
+
+ sqlite_func_adapter<decltype(&sql_log_msg_line), sql_log_msg_line>::
+ builder(help_text("log_msg_line",
+ "Return the starting line number of the focused "
+ "log message.")
+ .sql_function()
+ .with_prql_path({"lnav", "view", "msg_line"})),
sqlite_func_adapter<decltype(&sql_log_top_datetime),
sql_log_top_datetime>::
builder(help_text("log_top_datetime",
"Return the timestamp of the line at the top of "
"the log view.")
- .sql_function()),
+ .sql_function()
+ .with_prql_path({"lnav", "view", "top_datetime"})),
sqlite_func_adapter<decltype(&sql_lnav_top_file), sql_lnav_top_file>::
builder(help_text("lnav_top_file",
"Return the name of the file that the top line "
"in the current view came from.")
- .sql_function()),
+ .sql_function()
+ .with_prql_path({"lnav", "view", "top_file"})),
sqlite_func_adapter<decltype(&sql_lnav_version), sql_lnav_version>::
builder(
help_text("lnav_version", "Return the current version of lnav")
- .sql_function()),
+ .sql_function()
+ .with_prql_path({"lnav", "version"})),
sqlite_func_adapter<decltype(&sql_error), sql_error>::builder(
help_text("raise_error",
"Raises an error with the given message when executed")
.sql_function()
- .with_parameter({"msg", "The error message"}))
+ .with_parameter({"msg", "The error message"})
+ .with_parameter(
+ help_text("reason", "The reason the error occurred")
+ .optional())
+ .with_example({
+ "To raise an error if a variable is not set",
+ "SELECT ifnull($val, raise_error('please set $val', "
+ "'because'))",
+ }))
.with_flags(SQLITE_UTF8),
sqlite_func_adapter<decltype(&sql_echoln), sql_echoln>::builder(
diff --git a/src/static_file_vtab.cc b/src/static_file_vtab.cc
index f884cb3..a953a8d 100644
--- a/src/static_file_vtab.cc
+++ b/src/static_file_vtab.cc
@@ -31,26 +31,17 @@
#include "static_file_vtab.hh"
-#include <stdlib.h>
#include <string.h>
#include "base/auto_mem.hh"
#include "base/fs_util.hh"
#include "base/lnav_log.hh"
-#include "base/paths.hh"
#include "config.h"
#include "ghc/filesystem.hpp"
#include "lnav.hh"
#include "vtab_module.hh"
-const char* const STATIC_FILE_CREATE_STMT = R"(
--- Access static files in the lnav configuration directories
-CREATE TABLE lnav_static_files (
- name TEXT PRIMARY KEY,
- filepath TEXT,
- content BLOB HIDDEN
-);
-)";
+namespace {
struct static_file_vtab {
sqlite3_vtab base;
@@ -163,7 +154,7 @@ sfvt_open(sqlite3_vtab* p_svt, sqlite3_vtab_cursor** pp_cursor)
{
static_file_vtab* p_vt = (static_file_vtab*) p_svt;
- p_vt->base.zErrMsg = NULL;
+ p_vt->base.zErrMsg = nullptr;
sf_vtab_cursor* p_cur = (sf_vtab_cursor*) new sf_vtab_cursor();
@@ -309,6 +300,17 @@ static sqlite3_module static_file_vtab_module = {
nullptr, /* xFindFunction - function overloading */
};
+} // namespace
+
+const char* const STATIC_FILE_CREATE_STMT = R"(
+-- Access static files in the lnav configuration directories
+CREATE TABLE lnav_static_files (
+ name TEXT PRIMARY KEY,
+ filepath TEXT,
+ content BLOB HIDDEN
+);
+)";
+
int
register_static_file_vtab(sqlite3* db)
{
diff --git a/src/statusview_curses.cc b/src/statusview_curses.cc
index f27bff0..c069f6d 100644
--- a/src/statusview_curses.cc
+++ b/src/statusview_curses.cc
@@ -35,9 +35,15 @@
#include "statusview_curses.hh"
#include "base/ansi_scrubber.hh"
+#include "base/itertools.hh"
#include "config.h"
void
+status_field::no_op_action(status_field&)
+{
+}
+
+void
status_field::set_value(std::string value)
{
auto& sa = this->sf_value.get_attrs();
@@ -61,7 +67,7 @@ status_field::do_cylon()
: (this->sf_width - (cycle_pos - this->sf_width) - 1);
auto stop = std::min(start + 3, this->sf_width);
struct line_range lr(std::max<long>(start, 0L), stop);
- auto& vc = view_colors::singleton();
+ const auto& vc = view_colors::singleton();
auto attrs = vc.attrs_for_role(role_t::VCR_ACTIVE_STATUS);
attrs.ta_attrs |= A_REVERSE;
@@ -84,21 +90,22 @@ status_field::set_stitch_value(role_t left, role_t right)
sa.emplace_back(lr, VC_ROLE.value(right));
}
-void
+bool
statusview_curses::do_update()
{
- int top, field, field_count, left = 0, right;
+ int top, left = 0, right;
auto& vc = view_colors::singleton();
unsigned long width, height;
+ this->sc_displayed_fields.clear();
if (!this->vc_visible || this->sc_window == nullptr) {
- return;
+ return false;
}
getmaxyx(this->sc_window, height, width);
this->window_change();
- top = this->sc_top < 0 ? height + this->sc_top : this->sc_top;
+ top = this->vc_y < 0 ? height + this->vc_y : this->vc_y;
right = width;
auto attrs = vc.attrs_for_role(
this->sc_enabled ? this->sc_default_role : role_t::VCR_INACTIVE_STATUS);
@@ -110,8 +117,8 @@ statusview_curses::do_update()
whline(this->sc_window, ' ', width);
if (this->sc_source != nullptr) {
- field_count = this->sc_source->statusview_fields();
- for (field = 0; field < field_count; field++) {
+ auto field_count = this->sc_source->statusview_fields();
+ for (size_t field = 0; field < field_count; field++) {
auto& sf = this->sc_source->statusview_value_for_field(field);
struct line_range lr(0, sf.get_width());
int x;
@@ -177,10 +184,16 @@ statusview_curses::do_update()
}
}
- mvwattrline(this->sc_window, top, x, val, lr, default_role);
+ auto write_res
+ = mvwattrline(this->sc_window, top, x, val, lr, default_role);
+ this->sc_displayed_fields.emplace_back(
+ line_range{x, static_cast<int>(x + write_res.mr_chars_out)},
+ field);
}
}
wmove(this->sc_window, top + 1, 0);
+
+ return true;
}
void
@@ -238,3 +251,23 @@ statusview_curses::window_change()
sf->set_width(actual_width);
}
}
+
+bool
+statusview_curses::handle_mouse(mouse_event& me)
+{
+ auto find_res = this->sc_displayed_fields
+ | lnav::itertools::find_if([&me](const auto& elem) {
+ return me.is_click_in(mouse_button_t::BUTTON_LEFT,
+ elem.df_range.lr_start,
+ elem.df_range.lr_end);
+ });
+
+ if (find_res) {
+ auto& sf = this->sc_source->statusview_value_for_field(
+ find_res.value()->df_field_index);
+
+ sf.on_click(sf);
+ }
+
+ return true;
+}
diff --git a/src/statusview_curses.hh b/src/statusview_curses.hh
index c9c5916..ff2bc93 100644
--- a/src/statusview_curses.hh
+++ b/src/statusview_curses.hh
@@ -42,6 +42,8 @@
*/
class status_field {
public:
+ using action = std::function<void(status_field&)>;
+
/**
* @param width The maximum width of the field in characters.
* @param role The color role for this field, defaults to VCR_STATUS.
@@ -121,6 +123,10 @@ public:
int get_share() const { return this->sf_share; }
+ static void no_op_action(status_field&);
+
+ action on_click{no_op_action};
+
protected:
ssize_t sf_width; /*< The maximum display width, in chars. */
ssize_t sf_min_width{0}; /*< The minimum display width, in chars. */
@@ -162,9 +168,6 @@ public:
void set_data_source(status_data_source* src) { this->sc_source = src; }
status_data_source* get_data_source() { return this->sc_source; }
- void set_top(int top) { this->sc_top = top; }
- int get_top() const { return this->sc_top; }
-
void set_window(WINDOW* win) { this->sc_window = win; }
WINDOW* get_window() { return this->sc_window; }
@@ -176,14 +179,27 @@ public:
void window_change();
- void do_update() override;
+ bool do_update() override;
+
+ bool handle_mouse(mouse_event& me) override;
private:
status_data_source* sc_source{nullptr};
WINDOW* sc_window{nullptr};
- int sc_top{0};
bool sc_enabled{true};
role_t sc_default_role{role_t::VCR_STATUS};
+
+ struct displayed_field {
+ displayed_field(line_range lr, size_t field_index)
+ : df_range(lr), df_field_index(field_index)
+ {
+ }
+
+ line_range df_range;
+ size_t df_field_index;
+ };
+
+ std::vector<displayed_field> sc_displayed_fields;
};
#endif
diff --git a/src/string-extension-functions.cc b/src/string-extension-functions.cc
index fccc7a9..59c5e83 100644
--- a/src/string-extension-functions.cc
+++ b/src/string-extension-functions.cc
@@ -35,6 +35,7 @@
#include "spookyhash/SpookyV2.h"
#include "sqlite-extension-func.hh"
#include "text_anonymizer.hh"
+#include "view_curses.hh"
#include "vtab_module.hh"
#include "vtab_module_json.hh"
#include "yajl/api/yajl_gen.h"
@@ -48,6 +49,35 @@
using namespace mapbox;
+enum class encode_algo {
+ base64,
+ hex,
+ uri,
+};
+
+template<>
+struct from_sqlite<encode_algo> {
+ inline encode_algo operator()(int argc, sqlite3_value** val, int argi)
+ {
+ const char* algo_name = (const char*) sqlite3_value_text(val[argi]);
+
+ if (strcasecmp(algo_name, "base64") == 0) {
+ return encode_algo::base64;
+ }
+ if (strcasecmp(algo_name, "hex") == 0) {
+ return encode_algo::hex;
+ }
+ if (strcasecmp(algo_name, "uri") == 0) {
+ return encode_algo::uri;
+ }
+
+ throw from_sqlite_conversion_error("value of 'base64', 'hex', or 'uri'",
+ argi);
+ }
+};
+
+namespace {
+
struct cache_entry {
std::shared_ptr<lnav::pcre2pp::code> re2;
std::shared_ptr<column_namer> cn{
@@ -176,24 +206,7 @@ regexp_match(string_fragment re, string_fragment str)
#endif
}
-json_string
-extract(const char* str)
-{
- data_scanner ds(str);
- data_parser dp(&ds);
-
- dp.parse();
- // dp.print(stderr, dp.dp_pairs);
-
- yajlpp_gen gen;
- yajl_gen_config(gen, yajl_gen_beautify, false);
-
- elements_to_json(gen, dp, &dp.dp_pairs);
-
- return json_string(gen);
-}
-
-json_string
+static json_string
logfmt2json(string_fragment line)
{
logfmt::parser p(line);
@@ -365,8 +378,8 @@ sparkline_final(sqlite3_context* context)
return;
}
- auto* retval = (char*) malloc(sc->sc_values.size() * 3 + 1);
- auto* start = retval;
+ auto retval = auto_mem<char>::malloc(sc->sc_values.size() * 3 + 1);
+ auto* start = retval.in();
for (const auto& value : sc->sc_values) {
auto bar = humanize::sparkline(value, sc->sc_max_value);
@@ -376,7 +389,7 @@ sparkline_final(sqlite3_context* context)
}
*start = '\0';
- sqlite3_result_text(context, retval, -1, free);
+ to_sqlite(context, std::move(retval));
sc->~sparkline_context();
}
@@ -448,33 +461,6 @@ sql_gzip(sqlite3_value* val)
return nonstd::nullopt;
}
-enum class encode_algo {
- base64,
- hex,
- uri,
-};
-
-template<>
-struct from_sqlite<encode_algo> {
- inline encode_algo operator()(int argc, sqlite3_value** val, int argi)
- {
- const char* algo_name = (const char*) sqlite3_value_text(val[argi]);
-
- if (strcasecmp(algo_name, "base64") == 0) {
- return encode_algo::base64;
- }
- if (strcasecmp(algo_name, "hex") == 0) {
- return encode_algo::hex;
- }
- if (strcasecmp(algo_name, "uri") == 0) {
- return encode_algo::uri;
- }
-
- throw from_sqlite_conversion_error("value of 'base64', 'hex', or 'uri'",
- argi);
- }
-};
-
#if defined(HAVE_LIBCURL)
static CURL*
get_curl_easy()
@@ -549,7 +535,7 @@ sql_encode(sqlite3_value* value, encode_algo algo)
for (int lpc = 0; lpc < text_len; lpc++) {
fmt::format_to(std::back_inserter(buf),
- FMT_STRING("{:x}"),
+ FMT_STRING("{:02x}"),
text[lpc]);
}
@@ -635,17 +621,18 @@ const char* curl_url_strerror(CURLUcode error);
#endif
static json_string
-sql_parse_url(string_fragment url_frag)
+sql_parse_url(std::string url)
{
static auto* CURL_HANDLE = get_curl_easy();
auto_mem<CURLU> cu(curl_url_cleanup);
cu = curl_url();
- auto rc = curl_url_set(cu, CURLUPART_URL, url_frag.data(), 0);
+ auto rc = curl_url_set(
+ cu, CURLUPART_URL, url.c_str(), CURLU_NON_SUPPORT_SCHEME);
if (rc != CURLUE_OK) {
throw lnav::console::user_message::error(
- attr_line_t("invalid URL: ").append_quoted(url_frag.to_string()))
+ attr_line_t("invalid URL: ").append(lnav::roles::file(url)))
.with_reason(curl_url_strerror(rc));
}
@@ -663,7 +650,7 @@ sql_parse_url(string_fragment url_frag)
} else {
root.gen();
}
- root.gen("user");
+ root.gen("username");
rc = curl_url_get(cu, CURLUPART_USER, url_part.out(), CURLU_URLDECODE);
if (rc == CURLUE_OK) {
root.gen(string_fragment::from_c_str(url_part.in()));
@@ -708,25 +695,26 @@ sql_parse_url(string_fragment url_frag)
robin_hood::unordered_set<std::string> seen_keys;
yajlpp_map query_map(gen);
+ for (size_t lpc = 0; url_part.in()[lpc]; lpc++) {
+ if (url_part.in()[lpc] == '+') {
+ url_part.in()[lpc] = ' ';
+ }
+ }
auto query_frag = string_fragment::from_c_str(url_part.in());
auto remaining = query_frag;
while (true) {
auto split_res
= remaining.split_when(string_fragment::tag1{'&'});
-
- if (!split_res) {
- break;
- }
-
auto_mem<char> kv_pair(curl_free);
- auto kv_pair_encoded = split_res->first;
+ auto kv_pair_encoded = split_res.first;
int out_len = 0;
kv_pair = curl_easy_unescape(CURL_HANDLE,
kv_pair_encoded.data(),
kv_pair_encoded.length(),
&out_len);
+
auto kv_pair_frag
= string_fragment::from_bytes(kv_pair.in(), out_len);
auto eq_index_opt = kv_pair_frag.find('=');
@@ -741,20 +729,20 @@ sql_parse_url(string_fragment url_frag)
query_map.gen(val);
}
} else {
- auto val_str = split_res->first.to_string();
+ auto val_str = split_res.first.to_string();
if (seen_keys.count(val_str) == 0) {
seen_keys.insert(val_str);
- query_map.gen(split_res->first);
+ query_map.gen(split_res.first);
query_map.gen();
}
}
- if (split_res->second.empty()) {
+ if (split_res.second.empty()) {
break;
}
- remaining = split_res->second;
+ remaining = split_res.second;
}
} else {
root.gen("query");
@@ -788,7 +776,7 @@ struct url_parts {
};
static const json_path_container url_params_handlers = {
- yajlpp::pattern_property_handler("(?<param>.+)")
+ yajlpp::pattern_property_handler("(?<param>.*)")
.for_field(&url_parts::up_parameters),
};
@@ -812,7 +800,7 @@ sql_unparse_url(string_fragment in)
auto parse_res = url_parts_handlers.parser_for(SRC).of(in);
if (parse_res.isErr()) {
- throw parse_res.unwrapErr();
+ throw parse_res.unwrapErr()[0];
}
auto up = parse_res.unwrap();
@@ -873,6 +861,36 @@ sql_unparse_url(string_fragment in)
return retval;
}
+} // namespace
+
+json_string
+extract(const char* str)
+{
+ data_scanner ds(str);
+ data_parser dp(&ds);
+
+ dp.parse();
+ // dp.print(stderr, dp.dp_pairs);
+
+ yajlpp_gen gen;
+ yajl_gen_config(gen, yajl_gen_beautify, false);
+
+ elements_to_json(gen, dp, &dp.dp_pairs);
+
+ return json_string(gen);
+}
+
+static std::string
+sql_humanize_id(string_fragment id)
+{
+ auto& vc = view_colors::singleton();
+ auto attrs = vc.attrs_for_ident(id.data(), id.length());
+
+ return fmt::format(FMT_STRING("\x1b[38;5;{}m{}\x1b[0m"),
+ attrs.ta_fg_color.value_or(COLOR_CYAN),
+ id);
+}
+
int
string_extension_functions(struct FuncDef** basic_funcs,
struct FuncDefAgg** agg_funcs)
@@ -892,6 +910,7 @@ string_extension_functions(struct FuncDef** basic_funcs,
"Match a string against a regular expression and return "
"the capture groups as JSON.")
.sql_function()
+ .with_prql_path({"text", "regexp_match"})
.with_parameter({"re", "The regular expression to use"})
.with_parameter({
"str",
@@ -919,6 +938,7 @@ string_extension_functions(struct FuncDef** basic_funcs,
"Replace the parts of a string that match a regular "
"expression.")
.sql_function()
+ .with_prql_path({"text", "regexp_replace"})
.with_parameter(
{"str", "The string to perform replacements on"})
.with_parameter({"re", "The regular expression to match"})
@@ -947,6 +967,7 @@ string_extension_functions(struct FuncDef** basic_funcs,
"humanize_file_size",
"Format the given file size as a human-friendly string")
.sql_function()
+ .with_prql_path({"humanize", "file_size"})
.with_parameter({"value", "The file size to format"})
.with_tags({"string"})
.with_example({
@@ -954,6 +975,18 @@ string_extension_functions(struct FuncDef** basic_funcs,
"SELECT humanize_file_size(10 * 1024 * 1024)",
})),
+ sqlite_func_adapter<decltype(&sql_humanize_id), sql_humanize_id>::
+ builder(help_text("humanize_id",
+ "Colorize the given ID using ANSI escape codes.")
+ .sql_function()
+ .with_prql_path({"humanize", "id"})
+ .with_parameter({"id", "The identifier to color"})
+ .with_tags({"string"})
+ .with_example({
+ "To colorize the ID 'cluster1'",
+ "SELECT humanize_id('cluster1')",
+ })),
+
sqlite_func_adapter<decltype(&humanize::sparkline),
humanize::sparkline>::
builder(
@@ -964,6 +997,7 @@ string_extension_functions(struct FuncDef** basic_funcs,
"aggregate version returns a string with a bar "
"character for every numeric input")
.sql_function()
+ .with_prql_path({"text", "sparkline"})
.with_parameter({"value", "The numeric value to convert"})
.with_parameter(help_text("upper",
"The upper bound of the numeric "
@@ -989,6 +1023,7 @@ string_extension_functions(struct FuncDef** basic_funcs,
help_text("anonymize",
"Replace identifying information with random values.")
.sql_function()
+ .with_prql_path({"text", "anonymize"})
.with_parameter({"value", "The text to anonymize"})
.with_tags({"string"})
.with_example({
@@ -1000,6 +1035,7 @@ string_extension_functions(struct FuncDef** basic_funcs,
help_text("extract",
"Automatically Parse and extract data from a string")
.sql_function()
+ .with_prql_path({"text", "discover"})
.with_parameter({"str", "The string to parse"})
.with_tags({"string"})
.with_example({
@@ -1015,6 +1051,7 @@ string_extension_functions(struct FuncDef** basic_funcs,
help_text("logfmt2json",
"Convert a logfmt-encoded string into JSON")
.sql_function()
+ .with_prql_path({"logfmt", "to_json"})
.with_parameter({"str", "The logfmt message to parse"})
.with_tags({"string"})
.with_example({
diff --git a/src/strong_int.hh b/src/strong_int.hh
index af18da9..36c0503 100644
--- a/src/strong_int.hh
+++ b/src/strong_int.hh
@@ -45,59 +45,55 @@ template<typename T, class DISTINCT>
class strong_int {
public:
explicit constexpr strong_int(T v = 0) noexcept : value(v){};
- operator const T&() const
- {
- return this->value;
- };
+ operator const T&() const { return this->value; }
strong_int operator+(const strong_int& rhs) const
{
return strong_int(this->value + rhs.value);
- };
+ }
strong_int operator-(const strong_int& rhs) const
{
return strong_int(this->value - rhs.value);
- };
+ }
strong_int operator/(const strong_int& rhs) const
{
return strong_int(this->value / rhs.value);
- };
+ }
bool operator<(const strong_int& rhs) const
{
return this->value < rhs.value;
- };
+ }
strong_int& operator+=(const strong_int& rhs)
{
this->value += rhs.value;
return *this;
- };
+ }
strong_int& operator-=(const strong_int& rhs)
{
this->value -= rhs.value;
return *this;
- };
+ }
strong_int& operator-()
{
this->value = -this->value;
return *this;
- };
+ }
strong_int& operator++()
{
this->value++;
return *this;
- };
+ }
strong_int& operator--()
{
this->value--;
return *this;
- };
+ }
bool operator==(const strong_int& rhs) const
{
return this->value == rhs.value;
- };
- T* out()
- {
- return &this->value;
- };
+ }
+ T* out() { return &this->value; }
+
+ T& lvalue() { return this->value; }
private:
T value;
diff --git a/src/styling.cc b/src/styling.cc
index 73e3db4..f408733 100644
--- a/src/styling.cc
+++ b/src/styling.cc
@@ -32,7 +32,9 @@
#include "styling.hh"
#include "ansi-palette-json.h"
+#include "base/from_trait.hh"
#include "config.h"
+#include "css-color-names-json.h"
#include "fmt/format.h"
#include "xterm-palette-json.h"
#include "yajlpp/yajlpp.hh"
@@ -53,19 +55,43 @@ static const struct json_path_container term_color_handler = {
.with_children(term_color_rgb_handler),
};
-static const struct json_path_container root_color_handler = {
- yajlpp::property_handler("#")
- .with_obj_provider<term_color, std::vector<term_color>>(
- [](const yajlpp_provider_context& ypc,
- std::vector<term_color>* palette) {
- if (ypc.ypc_index >= palette->size()) {
- palette->resize(ypc.ypc_index + 1);
- }
- return &((*palette)[ypc.ypc_index]);
- })
- .with_children(term_color_handler),
+static const typed_json_path_container<std::vector<term_color>>
+ root_color_handler = {
+ yajlpp::property_handler("#")
+ .with_obj_provider<term_color, std::vector<term_color>>(
+ [](const yajlpp_provider_context& ypc,
+ std::vector<term_color>* palette) {
+ if (ypc.ypc_index >= palette->size()) {
+ palette->resize(ypc.ypc_index + 1);
+ }
+ return &((*palette)[ypc.ypc_index]);
+ })
+ .with_children(term_color_handler),
+};
+
+struct css_color_names {
+ std::map<std::string, std::string> ccn_name_to_color;
+};
+
+static const typed_json_path_container<css_color_names> css_color_names_handlers
+ = {
+ yajlpp::pattern_property_handler("(?<css_color_name>.*)")
+ .for_field(&css_color_names::ccn_name_to_color),
};
+static const css_color_names&
+get_css_color_names()
+{
+ static const intern_string_t iname
+ = intern_string::lookup(css_color_names_json.get_name());
+ static const auto INSTANCE
+ = css_color_names_handlers.parser_for(iname)
+ .of(css_color_names_json.to_string_fragment())
+ .unwrap();
+
+ return INSTANCE;
+}
+
term_color_palette*
xterm_colors()
{
@@ -84,13 +110,23 @@ ansi_colors()
return &retval;
}
+template<>
Result<rgb_color, std::string>
-rgb_color::from_str(const string_fragment& sf)
+from(string_fragment sf)
{
if (sf.empty()) {
return Ok(rgb_color());
}
+ if (sf[0] != '#') {
+ const auto& css_colors = get_css_color_names();
+ const auto& iter = css_colors.ccn_name_to_color.find(sf.to_string());
+
+ if (iter != css_colors.ccn_name_to_color.end()) {
+ sf = string_fragment::from_str(iter->second);
+ }
+ }
+
rgb_color rgb_out;
if (sf[0] == '#') {
@@ -139,74 +175,29 @@ rgb_color::from_str(const string_fragment& sf)
sf));
}
-bool
-rgb_color::operator<(const rgb_color& rhs) const
-{
- if (rc_r < rhs.rc_r)
- return true;
- if (rhs.rc_r < rc_r)
- return false;
- if (rc_g < rhs.rc_g)
- return true;
- if (rhs.rc_g < rc_g)
- return false;
- return rc_b < rhs.rc_b;
-}
-
-bool
-rgb_color::operator>(const rgb_color& rhs) const
-{
- return rhs < *this;
-}
-
-bool
-rgb_color::operator<=(const rgb_color& rhs) const
-{
- return !(rhs < *this);
-}
-
-bool
-rgb_color::operator>=(const rgb_color& rhs) const
-{
- return !(*this < rhs);
-}
-
-bool
-rgb_color::operator==(const rgb_color& rhs) const
-{
- return rc_r == rhs.rc_r && rc_g == rhs.rc_g && rc_b == rhs.rc_b;
-}
-
-bool
-rgb_color::operator!=(const rgb_color& rhs) const
-{
- return !(rhs == *this);
-}
-
term_color_palette::term_color_palette(const char* name,
const string_fragment& json)
{
- yajlpp_parse_context ypc_xterm(intern_string::lookup(name),
- &root_color_handler);
- yajl_handle handle;
-
- handle = yajl_alloc(&ypc_xterm.ypc_callbacks, nullptr, &ypc_xterm);
- ypc_xterm.with_ignore_unused(true)
- .with_obj(this->tc_palette)
- .with_handle(handle);
- yajl_status st = ypc_xterm.parse(json);
- ensure(st == yajl_status_ok);
- st = ypc_xterm.complete_parse();
- ensure(st == yajl_status_ok);
- yajl_free(handle);
+ intern_string_t iname = intern_string::lookup(name);
+ auto parse_res
+ = root_color_handler.parser_for(iname).with_ignore_unused(true).of(
+ json);
+
+ if (parse_res.isErr()) {
+ log_error("failed to parse palette: %s -- %s",
+ name,
+ parse_res.unwrapErr()[0].to_attr_line().get_string().c_str());
+ }
+ require(parse_res.isOk());
+ this->tc_palette = parse_res.unwrap();
for (auto& xc : this->tc_palette) {
xc.xc_lab_color = lab_color(xc.xc_color);
}
}
short
-term_color_palette::match_color(const lab_color& to_match)
+term_color_palette::match_color(const lab_color& to_match) const
{
double lowest = 1000.0;
short lowest_id = -1;
@@ -230,7 +221,6 @@ term_color_palette::match_color(const lab_color& to_match)
}
namespace styling {
-
Result<color_unit, std::string>
color_unit::from_str(const string_fragment& sf)
{
@@ -238,7 +228,7 @@ color_unit::from_str(const string_fragment& sf)
return Ok(color_unit{semantic{}});
}
- auto retval = TRY(rgb_color::from_str(sf));
+ auto retval = TRY(from<rgb_color>(sf));
return Ok(color_unit{retval});
}
diff --git a/src/styling.hh b/src/styling.hh
index 001383a..b69418d 100644
--- a/src/styling.hh
+++ b/src/styling.hh
@@ -35,74 +35,13 @@
#include <utility>
#include <vector>
+#include "base/color_spaces.hh"
#include "base/intern_string.hh"
#include "base/result.h"
#include "log_level.hh"
#include "mapbox/variant.hpp"
#include "yajlpp/yajlpp.hh"
-
-struct rgb_color {
- static Result<rgb_color, std::string> from_str(const string_fragment& sf);
-
- explicit rgb_color(short r = -1, short g = -1, short b = -1)
- : rc_r(r), rc_g(g), rc_b(b)
- {
- }
-
- bool empty() const
- {
- return this->rc_r == -1 && this->rc_g == -1 && this->rc_b == -1;
- }
-
- bool operator==(const rgb_color& rhs) const;
-
- bool operator!=(const rgb_color& rhs) const;
-
- bool operator<(const rgb_color& rhs) const;
-
- bool operator>(const rgb_color& rhs) const;
-
- bool operator<=(const rgb_color& rhs) const;
-
- bool operator>=(const rgb_color& rhs) const;
-
- short rc_r;
- short rc_g;
- short rc_b;
-};
-
-struct lab_color {
- lab_color() : lc_l(0), lc_a(0), lc_b(0) {}
-
- explicit lab_color(const rgb_color& rgb);
-
- double deltaE(const lab_color& other) const;
-
- lab_color& operator=(const lab_color& other)
- {
- this->lc_l = other.lc_l;
- this->lc_a = other.lc_a;
- this->lc_b = other.lc_b;
-
- return *this;
- }
-
- bool operator==(const lab_color& rhs) const;
-
- bool operator!=(const lab_color& rhs) const;
-
- bool operator<(const lab_color& rhs) const;
-
- bool operator>(const lab_color& rhs) const;
-
- bool operator<=(const lab_color& rhs) const;
-
- bool operator>=(const lab_color& rhs) const;
-
- double lc_l;
- double lc_a;
- double lc_b;
-};
+#include "yajlpp/yajlpp_def.hh"
struct term_color {
short xc_id;
@@ -115,7 +54,7 @@ struct term_color {
struct term_color_palette {
term_color_palette(const char* name, const string_fragment& json);
- short match_color(const lab_color& to_match);
+ short match_color(const lab_color& to_match) const;
std::vector<term_color> tc_palette;
};
@@ -152,10 +91,16 @@ struct style_config {
std::string sc_background_color;
bool sc_underline{false};
bool sc_bold{false};
+
+ bool empty() const
+ {
+ return this->sc_color.empty() && this->sc_background_color.empty()
+ && !this->sc_underline && !this->sc_bold;
+ }
};
struct highlighter_config {
- std::string hc_regex;
+ factory_container<lnav::pcre2pp::code> hc_regex;
style_config hc_style;
};
@@ -174,9 +119,11 @@ struct lnav_theme {
positioned_property<style_config> lt_style_scrollbar;
positioned_property<style_config> lt_style_hidden;
positioned_property<style_config> lt_style_cursor_line;
+ positioned_property<style_config> lt_style_disabled_cursor_line;
positioned_property<style_config> lt_style_adjusted_time;
positioned_property<style_config> lt_style_skewed_time;
positioned_property<style_config> lt_style_offset_time;
+ positioned_property<style_config> lt_style_file_offset;
positioned_property<style_config> lt_style_invalid_msg;
positioned_property<style_config> lt_style_status_title;
positioned_property<style_config> lt_style_status_title_hotkey;
@@ -184,6 +131,7 @@ struct lnav_theme {
positioned_property<style_config> lt_style_status_subtitle;
positioned_property<style_config> lt_style_status_info;
positioned_property<style_config> lt_style_status_hotkey;
+ positioned_property<style_config> lt_style_inline_code;
positioned_property<style_config> lt_style_quoted_code;
positioned_property<style_config> lt_style_code_border;
positioned_property<style_config> lt_style_keyword;
@@ -192,7 +140,15 @@ struct lnav_theme {
positioned_property<style_config> lt_style_doc_directive;
positioned_property<style_config> lt_style_variable;
positioned_property<style_config> lt_style_symbol;
+ positioned_property<style_config> lt_style_null;
+ positioned_property<style_config> lt_style_ascii_ctrl;
+ positioned_property<style_config> lt_style_non_ascii;
positioned_property<style_config> lt_style_number;
+ positioned_property<style_config> lt_style_function;
+ positioned_property<style_config> lt_style_type;
+ positioned_property<style_config> lt_style_sep_ref_acc;
+ positioned_property<style_config> lt_style_suggestion;
+ positioned_property<style_config> lt_style_selected_text;
positioned_property<style_config> lt_style_re_special;
positioned_property<style_config> lt_style_re_repeat;
positioned_property<style_config> lt_style_diff_delete;
@@ -220,6 +176,7 @@ struct lnav_theme {
positioned_property<style_config> lt_style_footnote_border;
positioned_property<style_config> lt_style_footnote_text;
positioned_property<style_config> lt_style_snippet_border;
+ positioned_property<style_config> lt_style_indent_guide;
std::map<log_level_t, positioned_property<style_config>> lt_level_styles;
std::map<std::string, highlighter_config> lt_highlights;
};
diff --git a/src/tailer/Makefile.am b/src/tailer/Makefile.am
index bb8a39a..91aabf7 100644
--- a/src/tailer/Makefile.am
+++ b/src/tailer/Makefile.am
@@ -43,6 +43,7 @@ libtailerpp_a_CPPFLAGS = \
-I$(srcdir)/.. \
-I$(srcdir)/../fmtlib \
-I$(srcdir)/../third-party \
+ -I$(top_srcdir)/src/third-party/date/include \
-I$(top_srcdir)/src/third-party/scnlib/include
libtailerpp_a_SOURCES = \
@@ -56,6 +57,7 @@ libtailerservice_a_CPPFLAGS = \
-I$(srcdir)/.. \
-I$(srcdir)/../fmtlib \
-I$(srcdir)/../third-party \
+ -I$(top_srcdir)/src/third-party/date/include \
-I$(top_srcdir)/src/third-party/scnlib/include
libtailerservice_a_SOURCES = \
@@ -74,6 +76,7 @@ tailer_LDADD = libtailercommon.a
drive_tailer_CPPFLAGS = \
-I$(srcdir)/.. \
-I$(srcdir)/../fmtlib \
+ -I$(top_srcdir)/src/third-party/date/include \
-I$(top_srcdir)/src/third-party/scnlib/include
drive_tailer_SOURCES = \
diff --git a/src/tailer/tailer.ape b/src/tailer/tailer.ape
index 69ebc11..e279c26 100755
--- a/src/tailer/tailer.ape
+++ b/src/tailer/tailer.ape
Binary files differ
diff --git a/src/tailer/tailer.looper.cc b/src/tailer/tailer.looper.cc
index 82a9fdc..9986653 100644
--- a/src/tailer/tailer.looper.cc
+++ b/src/tailer/tailer.looper.cc
@@ -132,7 +132,7 @@ update_tailer_description(
iter->second.ofd_description = remote_uname;
}
- fc.fc_name_to_errors.erase(netloc);
+ fc.fc_name_to_errors->writeAccess()->erase(netloc);
});
}
@@ -225,10 +225,11 @@ tailer::looper::load_preview(int64_t id, const network::path& path)
if (lnav_data.ld_preview_generation != id) {
return;
}
- lnav_data.ld_preview_status_source.get_description()
+ lnav_data.ld_preview_status_source[0]
+ .get_description()
.set_cylon(false)
.clear();
- lnav_data.ld_preview_source.clear();
+ lnav_data.ld_preview_source[0].clear();
lnav_data.ld_bottom_source.grep_error(msg);
});
return;
@@ -539,7 +540,8 @@ tailer::looper::host_tailer::load_preview(int64_t id, const std::string& path)
if (lnav_data.ld_preview_generation != id) {
return;
}
- lnav_data.ld_preview_status_source.get_description()
+ lnav_data.ld_preview_status_source[0]
+ .get_description()
.set_cylon(false)
.set_value(msg);
});
@@ -787,9 +789,7 @@ tailer::looper::host_tailer::loop_body()
}
constexpr int64_t BUFFER_SIZE = 4 * 1024 * 1024;
- auto_mem<unsigned char> buffer;
-
- buffer = (unsigned char*) malloc(BUFFER_SIZE);
+ auto buffer = auto_mem<unsigned char>::malloc(BUFFER_SIZE);
auto remaining = pob.pob_length;
auto remaining_offset = pob.pob_offset;
tailer::hash_frag thf;
@@ -997,10 +997,11 @@ tailer::looper::host_tailer::loop_body()
ppe.ppe_id);
return;
}
- lnav_data.ld_preview_status_source.get_description()
+ lnav_data.ld_preview_status_source[0]
+ .get_description()
.set_cylon(false)
.clear();
- lnav_data.ld_preview_source.clear();
+ lnav_data.ld_preview_source[0].clear();
lnav_data.ld_bottom_source.grep_error(ppe.ppe_msg);
});
@@ -1017,12 +1018,14 @@ tailer::looper::host_tailer::loop_body()
}
std::string str(ppd.ppd_bits.begin(),
ppd.ppd_bits.end());
- lnav_data.ld_preview_status_source.get_description()
+ lnav_data.ld_preview_status_source[0]
+ .get_description()
.set_cylon(false)
.set_value("For file: %s:%s",
netloc.c_str(),
ppd.ppd_path.c_str());
- lnav_data.ld_preview_source.replace_with(str)
+ lnav_data.ld_preview_source[0]
+ .replace_with(str)
.set_text_format(detect_text_format(str));
});
return std::move(this->ht_state);
@@ -1151,11 +1154,11 @@ tailer::looper::report_error(std::string path, std::string msg)
isc::to<main_looper&, services::main_t>().send([=](auto& mlooper) {
file_collection fc;
- fc.fc_name_to_errors.emplace(path,
- file_error_info{
- {},
- msg,
- });
+ fc.fc_name_to_errors->writeAccess()->emplace(path,
+ file_error_info{
+ {},
+ msg,
+ });
update_active_files(fc);
lnav_data.ld_active_files.fc_progress->writeAccess()->sp_tailers.erase(
path);
diff --git a/src/term_extra.hh b/src/term_extra.hh
index 9740315..6193290 100644
--- a/src/term_extra.hh
+++ b/src/term_extra.hh
@@ -41,7 +41,7 @@
#include <unistd.h>
#include "listview_curses.hh"
-#include "log_format.hh"
+#include "log_format_fwd.hh"
#include "logfile.hh"
class term_extra {
@@ -69,8 +69,6 @@ public:
void update_title(listview_curses* lc)
{
- static const char* xterm_title_fmt = "\033]0;%s\007";
-
if (!this->te_enabled) {
return;
}
@@ -84,12 +82,12 @@ public:
auto line_attr_opt = get_string_attr(sa, logline::L_FILE);
if (line_attr_opt) {
auto lf = line_attr_opt.value().get();
- const std::string& filename = lf->get_unique_path();
+ const auto& filename = lf->get_unique_path();
if (filename != this->te_last_title) {
- std::string title = this->te_prefix + filename;
-
- printf(xterm_title_fmt, title.c_str());
+ fmt::print(FMT_STRING("\033]0;{}{}\007"),
+ this->te_prefix,
+ filename);
fflush(stdout);
this->te_last_title = filename;
@@ -101,9 +99,8 @@ public:
const std::string& view_title = lc->get_title();
if (view_title != this->te_last_title) {
- std::string title = this->te_prefix + view_title;
-
- printf(xterm_title_fmt, title.c_str());
+ fmt::print(
+ FMT_STRING("\033]0;{}{}\007"), this->te_prefix, view_title);
fflush(stdout);
this->te_last_title = view_title;
diff --git a/src/text_anonymizer.cc b/src/text_anonymizer.cc
index 39403bf..a9b1193 100644
--- a/src/text_anonymizer.cc
+++ b/src/text_anonymizer.cc
@@ -38,7 +38,7 @@
#include "data_scanner.hh"
#include "diseases-json.h"
#include "ghc/filesystem.hpp"
-#include "lnav_util.hh"
+#include "hasher.hh"
#include "pcrepp/pcre2pp.hh"
#include "words-json.h"
#include "yajlpp/yajlpp_def.hh"
@@ -508,6 +508,10 @@ text_anonymizer::next(string_fragment line)
break;
}
default: {
+ log_debug("tok_re %d %d:%d",
+ tok_res->tr_token,
+ tok_res->tr_capture.c_begin,
+ tok_res->tr_capture.c_end);
retval += tok_res->to_string();
break;
}
diff --git a/src/text_format.cc b/src/text_format.cc
index 0b72786..dc63cf6 100644
--- a/src/text_format.cc
+++ b/src/text_format.cc
@@ -29,8 +29,11 @@
* @file text_format.cc
*/
+#include <set>
+
#include "text_format.hh"
+#include "base/lnav_log.hh"
#include "config.h"
#include "pcrepp/pcre2pp.hh"
#include "yajl/api/yajl_parse.h"
@@ -39,37 +42,66 @@ text_format_t
detect_text_format(string_fragment sf,
nonstd::optional<ghc::filesystem::path> path)
{
- static const auto GZ_EXT = ghc::filesystem::path(".gz");
- static const auto BZ2_EXT = ghc::filesystem::path(".bz2");
+ static const std::set<ghc::filesystem::path> FILTER_EXTS = {
+ ".bz2",
+ ".gz",
+ ".lzma",
+ ".xz",
+ ".zst",
+ };
+ static const auto C_EXTS = std::set<ghc::filesystem::path>{
+ ".h",
+ ".hh",
+ ".hpp",
+ ".c",
+ ".cc",
+ ".cpp",
+ ".tpp",
+ };
+ static const auto PY_EXT = ghc::filesystem::path(".py");
+ static const auto RS_EXT = ghc::filesystem::path(".rs");
+ static const auto JAVA_EXT = ghc::filesystem::path(".java");
+ static const auto TOML_EXT = ghc::filesystem::path(".toml");
+ static const auto XML_EXT = ghc::filesystem::path(".xml");
+ static const auto YAML_EXT = ghc::filesystem::path(".yaml");
+ static const auto YML_EXT = ghc::filesystem::path(".yml");
+ static const auto MAKEFILE_STEM = ghc::filesystem::path("Makefile");
static const auto MD_EXT = ghc::filesystem::path(".md");
static const auto MARKDOWN_EXT = ghc::filesystem::path(".markdown");
+ static const auto SH_EXT = ghc::filesystem::path(".sh");
+
+ static const auto DIFF_MATCHERS = lnav::pcre2pp::code::from_const(
+ R"(^--- .*\n\+\+\+ .*\n)", PCRE2_MULTILINE);
static const auto MAN_MATCHERS = lnav::pcre2pp::code::from_const(
R"(^[A-Za-z][A-Za-z\-_\+0-9]+\(\d\)\s+)", PCRE2_MULTILINE);
- // XXX This is a pretty crude way of detecting format...
+ // XXX This is a pretty crude way of
+ // detecting format...
static const auto PYTHON_MATCHERS = lnav::pcre2pp::code::from_const(
"(?:"
- "^\\s*def\\s+\\w+\\([^)]*\\):[^\\n]*$|"
+ "^\\s*def\\s+\\w+\\([^)]*\\):"
+ "[^\\n]*$|"
"^\\s*try:[^\\n]*$"
")",
PCRE2_MULTILINE);
- static const auto RUST_MATCHERS
- = lnav::pcre2pp::code::from_const(R"(
+ static const auto RUST_MATCHERS = lnav::pcre2pp::code::from_const(
+ R"(
(?:
^\s*use\s+[\w+:\{\}]+;$|
-^\s*(?:pub)?\s+(?:const|enum|fn)\s+\w+.*$|
+^\s*(?:pub enum|pub const|(?:pub )?fn)\s+\w+.*$|
^\s*impl\s+\w+.*$
)
)",
- PCRE2_MULTILINE);
+ PCRE2_MULTILINE);
static const auto JAVA_MATCHERS = lnav::pcre2pp::code::from_const(
"(?:"
"^package\\s+|"
"^import\\s+|"
- "^\\s*(?:public)?\\s*class\\s*(\\w+\\s+)*\\s*{"
+ "^\\s*(?:public)?\\s*"
+ "class\\s*(\\w+\\s+)*\\s*{"
")",
PCRE2_MULTILINE);
@@ -77,15 +109,18 @@ detect_text_format(string_fragment sf,
"(?:"
"^#\\s*include\\s+|"
"^#\\s*define\\s+|"
- "^\\s*if\\s+\\([^)]+\\)[^\\n]*$|"
- "^\\s*(?:\\w+\\s+)*class \\w+ {"
+ "^\\s*if\\s+\\([^)]+\\)[^\\n]"
+ "*$|"
+ "^\\s*(?:\\w+\\s+)*class "
+ "\\w+ {"
")",
PCRE2_MULTILINE);
static const auto SQL_MATCHERS = lnav::pcre2pp::code::from_const(
"(?:"
"select\\s+.+\\s+from\\s+|"
- "insert\\s+into\\s+.+\\s+values"
+ "insert\\s+into\\s+.+\\s+"
+ "values"
")",
PCRE2_MULTILINE | PCRE2_CASELESS);
@@ -96,19 +131,55 @@ detect_text_format(string_fragment sf,
")",
PCRE2_MULTILINE | PCRE2_CASELESS);
- text_format_t retval = text_format_t::TF_UNKNOWN;
+ static const auto SH_MATCHERS
+ = lnav::pcre2pp::code::from_const("^#!.+sh\\b", PCRE2_MULTILINE);
if (path) {
- if (path->extension() == GZ_EXT) {
- path = path->stem();
- }
- if (path->extension() == BZ2_EXT) {
+ while (FILTER_EXTS.count(path->extension()) > 0) {
path = path->stem();
}
- if (path->extension() == MD_EXT || path->extension() == MARKDOWN_EXT) {
+ auto stem = path->stem();
+ auto ext = path->extension();
+ if (ext == MD_EXT || ext == MARKDOWN_EXT) {
return text_format_t::TF_MARKDOWN;
}
+
+ if (C_EXTS.count(ext) > 0) {
+ return text_format_t::TF_C_LIKE;
+ }
+
+ if (ext == PY_EXT) {
+ return text_format_t::TF_PYTHON;
+ }
+
+ if (ext == RS_EXT) {
+ return text_format_t::TF_RUST;
+ }
+
+ if (ext == TOML_EXT) {
+ return text_format_t::TF_TOML;
+ }
+
+ if (ext == JAVA_EXT) {
+ return text_format_t::TF_JAVA;
+ }
+
+ if (ext == YAML_EXT || ext == YML_EXT) {
+ return text_format_t::TF_YAML;
+ }
+
+ if (ext == XML_EXT) {
+ return text_format_t::TF_XML;
+ }
+
+ if (stem == MAKEFILE_STEM) {
+ return text_format_t::TF_MAKEFILE;
+ }
+
+ if (stem == SH_EXT) {
+ return text_format_t::TF_SHELL_SCRIPT;
+ }
}
{
@@ -120,6 +191,14 @@ detect_text_format(string_fragment sf,
}
}
+ if (DIFF_MATCHERS.find_in(sf).ignore_error()) {
+ return text_format_t::TF_DIFF;
+ }
+
+ if (SH_MATCHERS.find_in(sf).ignore_error()) {
+ return text_format_t::TF_SHELL_SCRIPT;
+ }
+
if (MAN_MATCHERS.find_in(sf).ignore_error()) {
return text_format_t::TF_MAN;
}
@@ -148,5 +227,33 @@ detect_text_format(string_fragment sf,
return text_format_t::TF_XML;
}
- return retval;
+ return text_format_t::TF_UNKNOWN;
+}
+
+nonstd::optional<text_format_meta_t>
+extract_text_meta(string_fragment sf, text_format_t tf)
+{
+ static const auto MAN_NAME = lnav::pcre2pp::code::from_const(
+ R"(^([A-Za-z][A-Za-z\-_\+0-9]+\(\d\))\s+)", PCRE2_MULTILINE);
+
+ switch (tf) {
+ case text_format_t::TF_MAN: {
+ static thread_local auto md
+ = lnav::pcre2pp::match_data::unitialized();
+
+ auto find_res
+ = MAN_NAME.capture_from(sf).into(md).matches().ignore_error();
+
+ if (find_res) {
+ return text_format_meta_t{
+ md.to_string(),
+ };
+ }
+ break;
+ }
+ default:
+ break;
+ }
+
+ return nonstd::nullopt;
}
diff --git a/src/text_format.hh b/src/text_format.hh
index a923fb3..b396629 100644
--- a/src/text_format.hh
+++ b/src/text_format.hh
@@ -47,6 +47,7 @@ enum class text_format_t {
TF_JAVA,
TF_JSON,
TF_LOG,
+ TF_MAKEFILE,
TF_MAN,
TF_MARKDOWN,
TF_PYTHON,
@@ -55,6 +56,8 @@ enum class text_format_t {
TF_XML,
TF_YAML,
TF_TOML,
+ TF_DIFF,
+ TF_SHELL_SCRIPT,
};
namespace fmt {
@@ -95,6 +98,9 @@ struct formatter<text_format_t> : formatter<string_view> {
case text_format_t::TF_JSON:
name = "application/json";
break;
+ case text_format_t::TF_MAKEFILE:
+ name = "text/x-makefile";
+ break;
case text_format_t::TF_MAN:
name = "text/man";
break;
@@ -107,6 +113,12 @@ struct formatter<text_format_t> : formatter<string_view> {
case text_format_t::TF_TOML:
name = "application/toml";
break;
+ case text_format_t::TF_DIFF:
+ name = "text/x-diff";
+ break;
+ case text_format_t::TF_SHELL_SCRIPT:
+ name = "text/x-shellscript";
+ break;
}
return formatter<string_view>::format(name, ctx);
}
@@ -122,4 +134,11 @@ text_format_t detect_text_format(string_fragment sf,
nonstd::optional<ghc::filesystem::path> path
= nonstd::nullopt);
+struct text_format_meta_t {
+ std::string tfm_filename;
+};
+
+nonstd::optional<text_format_meta_t> extract_text_meta(string_fragment sf,
+ text_format_t tf);
+
#endif
diff --git a/src/text_overlay_menu.cc b/src/text_overlay_menu.cc
new file mode 100644
index 0000000..d143e03
--- /dev/null
+++ b/src/text_overlay_menu.cc
@@ -0,0 +1,123 @@
+/**
+ * Copyright (c) 2024, Timothy Stack
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of Timothy Stack nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ''AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "text_overlay_menu.hh"
+
+#include "command_executor.hh"
+#include "config.h"
+#include "lnav.hh"
+#include "md4cpp.hh"
+#include "textview_curses.hh"
+
+using namespace md4cpp::literals;
+using namespace lnav::roles::literals;
+
+std::vector<attr_line_t>
+text_overlay_menu::list_overlay_menu(const listview_curses& lv, vis_line_t row)
+{
+ const auto* tc = dynamic_cast<const textview_curses*>(&lv);
+ std::vector<attr_line_t> retval;
+
+ if (!tc->tc_text_selection_active && tc->tc_selected_text) {
+ const auto& sti = tc->tc_selected_text.value();
+
+ if (sti.sti_line == row) {
+ auto title = " Filter Other "_status_title;
+ auto left = std::max(0, sti.sti_x - 2);
+ auto dim = lv.get_dimensions();
+
+ if (left + title.first.length() >= dim.second) {
+ left = dim.second - title.first.length() - 2;
+ }
+
+ this->tom_menu_items.clear();
+ retval.emplace_back(attr_line_t().pad_to(left).append(title));
+ {
+ attr_line_t al;
+
+ al.append(" ").append("\u2714 IN"_ok).append(" ");
+ int start = left;
+ this->tom_menu_items.emplace_back(
+ 1_vl,
+ line_range{start, start + (int) al.length()},
+ [](const std::string& value) {
+ auto cmd = fmt::format(FMT_STRING(":filter-in {}"),
+ lnav::pcre2pp::quote(value));
+ lnav_data.ld_exec_context
+ .with_provenance(exec_context::mouse_input{})
+ ->execute(cmd);
+ });
+ start += al.length();
+ al.append(":mag_right:"_emoji)
+ .append(" Search ")
+ .with_attr_for_all(VC_ROLE.value(role_t::VCR_STATUS));
+ this->tom_menu_items.emplace_back(
+ 1_vl,
+ line_range{start, start + (int) al.length()},
+ [](const std::string& value) {
+ auto cmd = fmt::format(FMT_STRING("/{}"),
+ lnav::pcre2pp::quote(value));
+ lnav_data.ld_exec_context
+ .with_provenance(exec_context::mouse_input{})
+ ->execute(cmd);
+ });
+ retval.emplace_back(attr_line_t().pad_to(left).append(al));
+ }
+ {
+ attr_line_t al;
+
+ al.append(" ").append("\u2718 OUT"_error).append(" ");
+ int start = left;
+ this->tom_menu_items.emplace_back(
+ 2_vl,
+ line_range{start, start + (int) al.length()},
+ [](const std::string& value) {
+ auto cmd = fmt::format(FMT_STRING(":filter-out {}"),
+ lnav::pcre2pp::quote(value));
+ lnav_data.ld_exec_context
+ .with_provenance(exec_context::mouse_input{})
+ ->execute(cmd);
+ });
+ start += al.length();
+ al.append(":clipboard:"_emoji)
+ .append(" Copy ")
+ .with_attr_for_all(VC_ROLE.value(role_t::VCR_STATUS));
+ this->tom_menu_items.emplace_back(
+ 2_vl,
+ line_range{start, start + (int) al.length()},
+ [](const std::string& value) {
+ lnav_data.ld_exec_context.execute("|lnav-copy-text");
+ });
+ retval.emplace_back(attr_line_t().pad_to(left).append(al));
+ }
+ }
+ }
+
+ return retval;
+}
diff --git a/src/text_overlay_menu.hh b/src/text_overlay_menu.hh
new file mode 100644
index 0000000..2abf16c
--- /dev/null
+++ b/src/text_overlay_menu.hh
@@ -0,0 +1,55 @@
+/**
+ * Copyright (c) 2024, Timothy Stack
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of Timothy Stack nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ''AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef lnav_text_overlay_menu_hh
+#define lnav_text_overlay_menu_hh
+
+#include "listview_curses.hh"
+
+class text_overlay_menu : public list_overlay_source {
+public:
+ std::vector<attr_line_t> list_overlay_menu(const listview_curses& lv,
+ vis_line_t line) override;
+
+ struct menu_item {
+ menu_item(vis_line_t line,
+ line_range range,
+ std::function<void(const std::string&)> action)
+ : mi_line(line), mi_range(range), mi_action(std::move(action))
+ {
+ }
+
+ vis_line_t mi_line;
+ line_range mi_range;
+ std::function<void(const std::string&)> mi_action;
+ };
+ std::vector<menu_item> tom_menu_items;
+};
+
+#endif
diff --git a/src/textfile_highlighters.cc b/src/textfile_highlighters.cc
index b0d2c52..46db3f1 100644
--- a/src/textfile_highlighters.cc
+++ b/src/textfile_highlighters.cc
@@ -37,7 +37,8 @@ template<typename T, std::size_t N>
static std::shared_ptr<lnav::pcre2pp::code>
xpcre_compile(const T (&pattern)[N], int options = 0)
{
- return lnav::pcre2pp::code::from_const(pattern, options).to_shared();
+ return lnav::pcre2pp::code::from_const(pattern, options | PCRE2_MULTILINE)
+ .to_shared();
}
void
@@ -93,6 +94,7 @@ setup_highlights(highlight_map_t& hm)
"\\bconst\\b|"
"\\bcontinue\\b|"
"\\bcrate\\b|"
+ "\\bdyn\\b|"
"\\belse\\b|"
"\\bif\\b|"
"\\bif let\\b|"
@@ -242,6 +244,16 @@ setup_highlights(highlight_map_t& hm)
.with_text_format(text_format_t::TF_JAVA)
.with_role(role_t::VCR_KEYWORD);
+ hm[{highlight_source_t::INTERNAL, "json.keyword"}]
+ = highlighter(xpcre_compile(R"((?:null|true|false))"))
+ .with_nestable(false)
+ .with_text_format(text_format_t::TF_JSON)
+ .with_role(role_t::VCR_KEYWORD);
+ hm[{highlight_source_t::INTERNAL, "json.number"}]
+ = highlighter(xpcre_compile(R"(-?\d+(?:\.\d+(?:[eE][+\-]?\d+)?)?)"))
+ .with_nestable(false)
+ .with_text_format(text_format_t::TF_JSON)
+ .with_role(role_t::VCR_NUMBER);
hm[{highlight_source_t::INTERNAL, "sql.0.comment"}]
= highlighter(xpcre_compile("(?:(?<=[\\s;])|^)--.*"))
.with_text_format(text_format_t::TF_SQL)
@@ -397,6 +409,14 @@ setup_highlights(highlight_map_t& hm)
hm[{highlight_source_t::INTERNAL, "1.strings"}]
= highlighter(xpcre_compile(R"((?<![A-WY-Za-qstv-z])'(?:\\.|[^'])*')"))
.with_nestable(false)
+ .with_text_format(text_format_t::TF_C_LIKE)
+ .with_text_format(text_format_t::TF_JAVA)
+ .with_text_format(text_format_t::TF_MARKDOWN)
+ .with_text_format(text_format_t::TF_PYTHON)
+ .with_text_format(text_format_t::TF_SQL)
+ .with_text_format(text_format_t::TF_XML)
+ .with_text_format(text_format_t::TF_YAML)
+ .with_text_format(text_format_t::TF_TOML)
.with_role(role_t::VCR_STRING);
hm[{highlight_source_t::INTERNAL, "1.stringb"}]
= highlighter(xpcre_compile("`(?:\\\\.|[^`])*`"))
@@ -411,10 +431,22 @@ setup_highlights(highlight_map_t& hm)
= highlighter(xpcre_compile("^\\@@ .*"))
.with_role(role_t::VCR_DIFF_SECTION);
hm[{highlight_source_t::INTERNAL, "0.comment"}]
+ = highlighter(xpcre_compile(R"((?<=[\s;]|^)//.*|/\*.*\*/|\(\*.*\*\))"))
+ .with_nestable(false)
+ .with_text_format(text_format_t::TF_C_LIKE)
+ .with_text_format(text_format_t::TF_JAVA)
+ .with_text_format(text_format_t::TF_RUST)
+ .with_role(role_t::VCR_COMMENT);
+ hm[{highlight_source_t::INTERNAL, ".comment"}]
= highlighter(
xpcre_compile(
- R"((?<=[\s;])//.*|/\*.*\*/|\(\*.*\*\)|^#\s*(?!include|if|ifndef|elif|else|endif|error|pragma|define|undef).*|\s+#.*|dnl.*)"))
+ R"((?:\s+#.*|^\s*#(?!\s*(?:include|if|ifndef|elif|else|endif|error|pragma|define|undef)\b).*|dnl.*))"))
.with_nestable(false)
+ .with_text_format(text_format_t::TF_SHELL_SCRIPT)
+ .with_text_format(text_format_t::TF_PYTHON)
+ .with_text_format(text_format_t::TF_MAKEFILE)
+ .with_text_format(text_format_t::TF_YAML)
+ .with_text_format(text_format_t::TF_TOML)
.with_role(role_t::VCR_COMMENT);
hm[{highlight_source_t::INTERNAL, "javadoc"}]
= highlighter(
@@ -431,6 +463,11 @@ setup_highlights(highlight_map_t& hm)
")"))
.with_nestable(false)
.with_role(role_t::VCR_VARIABLE);
+ hm[{highlight_source_t::INTERNAL, "yaml.var"}]
+ = highlighter(xpcre_compile("^\\s*(?:- )?[a-zA-Z_\\-]+:(?:\\s+|$)"))
+ .with_nestable(false)
+ .with_text_format(text_format_t::TF_YAML)
+ .with_role(role_t::VCR_VARIABLE);
hm[{highlight_source_t::INTERNAL, "rust.sym"}]
= highlighter(xpcre_compile("\\b[A-Z_][A-Z0-9_]+\\b"))
.with_nestable(false)
@@ -450,15 +487,90 @@ setup_highlights(highlight_map_t& hm)
hm[{highlight_source_t::INTERNAL, "cpp"}]
= highlighter(
xpcre_compile(
- R"(^#\s*(?:include|ifdef|ifndef|if|else|elif|error|endif|define|undef|pragma))"))
+ R"(^#\s*(?:include|ifdef|ifndef|if|else|elif|error|endif|define|undef|pragma)\b)"))
.with_nestable(false)
.with_text_format(text_format_t::TF_C_LIKE)
.with_text_format(text_format_t::TF_JAVA)
.with_role(role_t::VCR_KEYWORD);
+ hm[{highlight_source_t::INTERNAL, "shell"}]
+ = highlighter(xpcre_compile("(?:"
+ "\\bbreak\\b|"
+ "\\bcase\\b|"
+ "\\bcd\\b|"
+ "\\bcontinue\\b|"
+ "\\bdeclare\\b|"
+ "\\bdefault\\b|"
+ "\\bdo\\b|"
+ "\\bdone\\b|"
+ "\\becho\\b|"
+ "\\belif\\b|"
+ "\\belse\\b|"
+ "\\besac\\b|"
+ "\\beval\\b|"
+ "\\bexit\\b|"
+ "\\bexport\\b|"
+ "\\bfalse\\b|"
+ "\\bfi\\b|"
+ "\\bfor\\b|"
+ "\\bfunction\\b|"
+ "\\bif\\b|"
+ "\\bin\\b|"
+ "\\blocal\\b|"
+ "\\bprintf\\b|"
+ "\\bpwd\\b|"
+ "\\bread\\b|"
+ "\\breadonly\\b|"
+ "\\breturn\\b|"
+ "\\bset\\b|"
+ "\\bshift\\b|"
+ "\\bsource\\b|"
+ "\\btest\\b|"
+ "\\bthen\\b|"
+ "\\btrap\\b|"
+ "\\btrue\\b|"
+ "\\bunset\\b|"
+ "\\bunsetenv\\b|"
+ "\\buntil\\b|"
+ "\\bwhich\\b|"
+ "\\bwhile\\b"
+ ")"))
+ .with_nestable(false)
+ .with_text_format(text_format_t::TF_SHELL_SCRIPT)
+ .with_role(role_t::VCR_KEYWORD);
hm[{highlight_source_t::INTERNAL, "num"}]
= highlighter(xpcre_compile(R"(\b-?(?:\d+|0x[a-zA-Z0-9]+)\b)"))
.with_nestable(false)
.with_text_format(text_format_t::TF_C_LIKE)
.with_text_format(text_format_t::TF_JAVA)
+ .with_text_format(text_format_t::TF_YAML)
.with_role(role_t::VCR_NUMBER);
+ hm[{highlight_source_t::INTERNAL, "fun"}]
+ = highlighter(xpcre_compile(R"((\w+)\()"))
+ .with_nestable(false)
+ .with_text_format(text_format_t::TF_C_LIKE)
+ .with_text_format(text_format_t::TF_JAVA)
+ .with_text_format(text_format_t::TF_PYTHON)
+ .with_text_format(text_format_t::TF_RUST)
+ .with_text_format(text_format_t::TF_SQL)
+ .with_role(role_t::VCR_FUNCTION);
+ hm[{highlight_source_t::INTERNAL, "sep"}]
+ = highlighter(xpcre_compile(R"(\.|\s+&(?=\w)|(?<=\w)&\s+|::|\%\b)"))
+ .with_nestable(false)
+ .with_text_format(text_format_t::TF_C_LIKE)
+ .with_text_format(text_format_t::TF_JAVA)
+ .with_text_format(text_format_t::TF_PYTHON)
+ .with_text_format(text_format_t::TF_RUST)
+ .with_text_format(text_format_t::TF_SQL)
+ .with_role(role_t::VCR_SEP_REF_ACC);
+ hm[{highlight_source_t::INTERNAL, "type"}]
+ = highlighter(
+ xpcre_compile(
+ R"(\b(class|struct|enum(?:\s+class)?)\s+(\w+)\b|\b(\w+_t)\b)"))
+ .with_nestable(false)
+ .with_text_format(text_format_t::TF_C_LIKE)
+ .with_text_format(text_format_t::TF_JAVA)
+ .with_text_format(text_format_t::TF_PYTHON)
+ .with_text_format(text_format_t::TF_RUST)
+ .with_text_format(text_format_t::TF_SQL)
+ .with_role(role_t::VCR_TYPE);
}
diff --git a/src/textfile_sub_source.cc b/src/textfile_sub_source.cc
index 8c6ef5f..79643ff 100644
--- a/src/textfile_sub_source.cc
+++ b/src/textfile_sub_source.cc
@@ -27,16 +27,25 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <chrono>
+
#include "textfile_sub_source.hh"
+#include <date/date.h>
+
#include "base/ansi_scrubber.hh"
+#include "base/attr_line.builder.hh"
#include "base/fs_util.hh"
#include "base/injector.hh"
#include "base/itertools.hh"
+#include "base/map_util.hh"
+#include "base/math_util.hh"
#include "bound_tags.hh"
#include "config.h"
#include "lnav.events.hh"
#include "md2attr_line.hh"
+#include "scn/scn.h"
+#include "sql_util.hh"
#include "sqlitepp.hh"
using namespace lnav::roles::literals;
@@ -47,11 +56,21 @@ textfile_sub_source::text_line_count()
size_t retval = 0;
if (!this->tss_files.empty()) {
- std::shared_ptr<logfile> lf = this->current_file();
+ auto lf = this->current_file();
auto rend_iter = this->tss_rendered_files.find(lf->get_filename());
if (rend_iter == this->tss_rendered_files.end()) {
- auto* lfo = (line_filter_observer*) lf->get_logline_observer();
- retval = lfo->lfo_filter_state.tfs_index.size();
+ if (lf->get_text_format() == text_format_t::TF_BINARY) {
+ auto fsize = lf->get_stat().st_size;
+ retval = fsize / 16;
+ if (fsize % 16) {
+ retval += 1;
+ }
+ } else {
+ auto* lfo = (line_filter_observer*) lf->get_logline_observer();
+ if (lfo != nullptr) {
+ retval = lfo->lfo_filter_state.tfs_index.size();
+ }
+ }
} else {
retval = rend_iter->second.rf_text_source->text_line_count();
}
@@ -66,27 +85,80 @@ textfile_sub_source::text_value_for_line(textview_curses& tc,
std::string& value_out,
text_sub_source::line_flags_t flags)
{
- if (!this->tss_files.empty()) {
- std::shared_ptr<logfile> lf = this->current_file();
- auto rend_iter = this->tss_rendered_files.find(lf->get_filename());
- if (rend_iter == this->tss_rendered_files.end()) {
- auto* lfo = dynamic_cast<line_filter_observer*>(
- lf->get_logline_observer());
- if (line < 0 || line >= lfo->lfo_filter_state.tfs_index.size()) {
- value_out.clear();
+ if (this->tss_files.empty() || line < 0) {
+ value_out.clear();
+ return;
+ }
+
+ const auto lf = this->current_file();
+ auto rend_iter = this->tss_rendered_files.find(lf->get_filename());
+ if (rend_iter != this->tss_rendered_files.end()) {
+ rend_iter->second.rf_text_source->text_value_for_line(
+ tc, line, value_out, flags);
+ return;
+ }
+
+ if (lf->get_text_format() == text_format_t::TF_BINARY) {
+ this->tss_hex_line.clear();
+ auto fsize = lf->get_stat().st_size;
+ auto fr = file_range{line * 16};
+ fr.fr_size = std::min((file_ssize_t) 16, fsize - fr.fr_offset);
+
+ auto read_res = lf->read_range(fr);
+ if (read_res.isErr()) {
+ log_error("%s: failed to read range %lld:%lld -- %s",
+ lf->get_filename().c_str(),
+ fr.fr_offset,
+ fr.fr_size,
+ read_res.unwrapErr().c_str());
+ return;
+ }
+
+ auto sbr = read_res.unwrap();
+ auto sf = sbr.to_string_fragment();
+ attr_line_builder alb(this->tss_hex_line);
+ {
+ auto ag = alb.with_attr(VC_ROLE.value(role_t::VCR_FILE_OFFSET));
+ alb.appendf(FMT_STRING("{: >16x} "), fr.fr_offset);
+ }
+ alb.append_as_hexdump(sf);
+ auto alt_row_index = line % 4;
+ if (alt_row_index == 2 || alt_row_index == 3) {
+ this->tss_hex_line.with_attr_for_all(
+ VC_ROLE.value(role_t::VCR_ALT_ROW));
+ }
+
+ value_out = this->tss_hex_line.get_string();
+ return;
+ }
+
+ auto* lfo = dynamic_cast<line_filter_observer*>(lf->get_logline_observer());
+ if (lfo == nullptr || line >= lfo->lfo_filter_state.tfs_index.size()) {
+ value_out.clear();
+ return;
+ }
+
+ auto ll = lf->begin() + lfo->lfo_filter_state.tfs_index[line];
+ auto read_result = lf->read_line(ll);
+ this->tss_line_indent_size = 0;
+ if (read_result.isOk()) {
+ value_out = to_string(read_result.unwrap());
+ for (const auto& ch : value_out) {
+ if (ch == ' ') {
+ this->tss_line_indent_size += 1;
+ } else if (ch == '\t') {
+ do {
+ this->tss_line_indent_size += 1;
+ } while (this->tss_line_indent_size % 8);
} else {
- auto read_result = lf->read_line(
- lf->begin() + lfo->lfo_filter_state.tfs_index[line]);
- if (read_result.isOk()) {
- value_out = to_string(read_result.unwrap());
- }
+ break;
}
- } else {
- rend_iter->second.rf_text_source->text_value_for_line(
- tc, line, value_out, flags);
}
- } else {
- value_out.clear();
+ if (lf->has_line_metadata() && this->tas_display_time_offset) {
+ auto relstr = this->get_time_offset_for_line(tc, vis_line_t(line));
+ value_out
+ = fmt::format(FMT_STRING("{: >12}|{}"), relstr, value_out);
+ }
}
}
@@ -100,16 +172,109 @@ textfile_sub_source::text_attrs_for_line(textview_curses& tc,
return;
}
+ struct line_range lr;
+
+ lr.lr_start = 0;
+ lr.lr_end = -1;
auto rend_iter = this->tss_rendered_files.find(lf->get_filename());
if (rend_iter != this->tss_rendered_files.end()) {
rend_iter->second.rf_text_source->text_attrs_for_line(
tc, row, value_out);
- }
+ } else if (lf->get_text_format() == text_format_t::TF_BINARY) {
+ value_out = this->tss_hex_line.get_attrs();
+ } else {
+ auto* lfo
+ = dynamic_cast<line_filter_observer*>(lf->get_logline_observer());
+ if (lfo != nullptr && row >= 0
+ && row < lfo->lfo_filter_state.tfs_index.size())
+ {
+ auto ll = lf->begin() + lfo->lfo_filter_state.tfs_index[row];
+
+ value_out.emplace_back(lr, SA_LEVEL.value(ll->get_msg_level()));
+ if (lf->has_line_metadata() && this->tas_display_time_offset) {
+ auto time_offset_end = 13;
+ lr.lr_start = 0;
+ lr.lr_end = time_offset_end;
+
+ shift_string_attrs(value_out, 0, time_offset_end);
+
+ value_out.emplace_back(lr,
+ VC_ROLE.value(role_t::VCR_OFFSET_TIME));
+ value_out.emplace_back(line_range(12, 13),
+ VC_GRAPHIC.value(ACS_VLINE));
+
+ role_t bar_role = role_t::VCR_NONE;
+
+ switch (this->get_line_accel_direction(vis_line_t(row))) {
+ case log_accel::A_STEADY:
+ break;
+ case log_accel::A_DECEL:
+ bar_role = role_t::VCR_DIFF_DELETE;
+ break;
+ case log_accel::A_ACCEL:
+ bar_role = role_t::VCR_DIFF_ADD;
+ break;
+ }
+ if (bar_role != role_t::VCR_NONE) {
+ value_out.emplace_back(line_range(12, 13),
+ VC_ROLE.value(bar_role));
+ }
+ }
- struct line_range lr;
+ auto meta_opt
+ = lnav::map::find(this->tss_doc_metadata, lf->get_filename());
+ if (meta_opt) {
+ auto ll_next_iter = ll + 1;
+ auto end_offset = (ll_next_iter == lf->end())
+ ? lf->get_index_size() - 1
+ : ll_next_iter->get_offset() - 1;
+ const auto& meta = meta_opt.value().get();
+ meta.ms_metadata.m_section_types_tree.visit_overlapping(
+ lf->get_line_content_offset(ll),
+ end_offset,
+ [&value_out, &ll, &lf, end_offset](const auto& iv) {
+ auto ll_offset = lf->get_line_content_offset(ll);
+ auto lr = line_range{0, -1};
+ if (iv.start > ll_offset) {
+ lr.lr_start = iv.start - ll_offset;
+ }
+ if (iv.stop < end_offset) {
+ lr.lr_end = iv.stop - ll_offset;
+ } else {
+ lr.lr_end = end_offset - ll_offset;
+ }
+ auto role = role_t::VCR_NONE;
+ switch (iv.value) {
+ case lnav::document::section_types_t::comment:
+ role = role_t::VCR_COMMENT;
+ break;
+ case lnav::document::section_types_t::
+ multiline_string:
+ role = role_t::VCR_STRING;
+ break;
+ }
+ value_out.emplace_back(lr, VC_ROLE.value(role));
+ });
+ for (const auto& indent : meta.ms_metadata.m_indents) {
+ if (indent < this->tss_line_indent_size) {
+ auto guide_lr = line_range{
+ (int) indent,
+ (int) (indent + 1),
+ line_range::unit::codepoint,
+ };
+ if (this->tas_display_time_offset) {
+ guide_lr.shift(0, 13);
+ }
+ value_out.emplace_back(
+ guide_lr,
+ VC_BLOCK_ELEM.value(block_elem_t{
+ L'\u258f', role_t::VCR_INDENT_GUIDE}));
+ }
+ }
+ }
+ }
+ }
- lr.lr_start = 0;
- lr.lr_end = -1;
value_out.emplace_back(lr, logline::L_FILE.value(this->current_file()));
}
@@ -126,12 +291,18 @@ textfile_sub_source::text_size_for_line(textview_curses& tc,
if (rend_iter == this->tss_rendered_files.end()) {
auto* lfo = dynamic_cast<line_filter_observer*>(
lf->get_logline_observer());
- if (line < 0 || line >= lfo->lfo_filter_state.tfs_index.size()) {
+ if (lfo == nullptr || line < 0
+ || line >= lfo->lfo_filter_state.tfs_index.size())
+ {
} else {
- retval
- = lf->message_byte_length(
- lf->begin() + lfo->lfo_filter_state.tfs_index[line])
- .mlr_length;
+ auto read_res = lf->read_line(
+ lf->begin() + lfo->lfo_filter_state.tfs_index[line]);
+ if (read_res.isOk()) {
+ auto sbr = read_res.unwrap();
+ auto str = to_string(sbr);
+ scrub_ansi_string(str, nullptr);
+ retval = string_fragment::from_str(str).column_width();
+ }
}
} else {
retval = rend_iter->second.rf_text_source->text_size_for_line(
@@ -157,6 +328,7 @@ textfile_sub_source::to_front(const std::shared_ptr<logfile>& lf)
}
}
this->tss_files.push_front(lf);
+ this->set_time_offset(false);
this->tss_view->reload_data();
}
@@ -166,6 +338,7 @@ textfile_sub_source::rotate_left()
if (this->tss_files.size() > 1) {
this->tss_files.push_back(this->tss_files.front());
this->tss_files.pop_front();
+ this->set_time_offset(false);
this->tss_view->reload_data();
this->tss_view->redo_search();
}
@@ -177,6 +350,7 @@ textfile_sub_source::rotate_right()
if (this->tss_files.size() > 1) {
this->tss_files.push_front(this->tss_files.back());
this->tss_files.pop_back();
+ this->set_time_offset(false);
this->tss_view->reload_data();
this->tss_view->redo_search();
}
@@ -197,6 +371,7 @@ textfile_sub_source::remove(const std::shared_ptr<logfile>& lf)
detach_observer(lf);
}
}
+ this->set_time_offset(false);
}
void
@@ -210,18 +385,13 @@ textfile_sub_source::push_back(const std::shared_ptr<logfile>& lf)
void
textfile_sub_source::text_filters_changed()
{
- for (auto iter = this->tss_files.begin(); iter != this->tss_files.end();) {
- ++iter;
- }
- for (auto iter = this->tss_hidden_files.begin();
- iter != this->tss_hidden_files.end();)
- {
- ++iter;
+ auto lf = this->current_file();
+ if (lf == nullptr || lf->get_text_format() == text_format_t::TF_BINARY) {
+ return;
}
- std::shared_ptr<logfile> lf = this->current_file();
-
- if (lf == nullptr) {
+ auto rend_iter = this->tss_rendered_files.find(lf->get_filename());
+ if (rend_iter != this->tss_rendered_files.end()) {
return;
}
@@ -243,6 +413,37 @@ textfile_sub_source::text_filters_changed()
}
this->tss_view->redo_search();
+
+ auto iter = std::lower_bound(lfo->lfo_filter_state.tfs_index.begin(),
+ lfo->lfo_filter_state.tfs_index.end(),
+ this->tss_content_line);
+ auto vl = vis_line_t(
+ std::distance(lfo->lfo_filter_state.tfs_index.begin(), iter));
+ this->tss_view->set_selection(vl);
+}
+
+void
+textfile_sub_source::scroll_invoked(textview_curses* tc)
+{
+ auto lf = this->current_file();
+ if (lf == nullptr || lf->get_text_format() == text_format_t::TF_BINARY) {
+ return;
+ }
+
+ auto rend_iter = this->tss_rendered_files.find(lf->get_filename());
+ if (rend_iter != this->tss_rendered_files.end()) {
+ return;
+ }
+
+ auto line = tc->get_selection();
+ auto* lfo = dynamic_cast<line_filter_observer*>(lf->get_logline_observer());
+ if (lfo == nullptr || line < 0_vl
+ || line >= lfo->lfo_filter_state.tfs_index.size())
+ {
+ return;
+ }
+
+ this->tss_content_line = lfo->lfo_filter_state.tfs_index[line];
}
int
@@ -284,6 +485,21 @@ textfile_sub_source::get_text_format() const
return this->tss_files.front()->get_text_format();
}
+static attr_line_t
+to_display(const std::shared_ptr<logfile>& lf)
+{
+ attr_line_t retval;
+
+ if (lf->get_open_options().loo_piper) {
+ if (!lf->get_open_options().loo_piper->is_finished()) {
+ retval.append("\u21bb "_list_glyph);
+ }
+ }
+ retval.append(lf->get_unique_path());
+
+ return retval;
+}
+
void
textfile_sub_source::text_crumbs_for_line(
int line, std::vector<breadcrumb::crumb>& crumbs)
@@ -297,12 +513,12 @@ textfile_sub_source::text_crumbs_for_line(
auto lf = this->current_file();
crumbs.emplace_back(
lf->get_unique_path(),
- attr_line_t().append(lf->get_unique_path()),
+ to_display(lf),
[this]() {
return this->tss_files | lnav::itertools::map([](const auto& lf) {
return breadcrumb::possibility{
lf->get_unique_path(),
- attr_line_t(lf->get_unique_path()),
+ to_display(lf),
};
});
},
@@ -330,8 +546,27 @@ textfile_sub_source::text_crumbs_for_line(
rend_iter->second.rf_text_source->text_crumbs_for_line(line, crumbs);
}
+ if (lf->has_line_metadata()) {
+ auto* lfo
+ = dynamic_cast<line_filter_observer*>(lf->get_logline_observer());
+ if (line < 0 || line >= lfo->lfo_filter_state.tfs_index.size()) {
+ return;
+ }
+ auto ll_iter = lf->begin() + lfo->lfo_filter_state.tfs_index[line];
+ char ts[64];
+
+ sql_strftime(ts, sizeof(ts), ll_iter->get_timeval(), 'T');
+
+ crumbs.emplace_back(
+ std::string(ts),
+ []() -> std::vector<breadcrumb::possibility> { return {}; },
+ [](const auto& key) {});
+ }
auto meta_iter = this->tss_doc_metadata.find(lf->get_filename());
- if (meta_iter != this->tss_doc_metadata.end()) {
+ if (meta_iter == this->tss_doc_metadata.end()
+ || meta_iter->second.ms_metadata.m_sections_tree.empty())
+ {
+ } else {
auto* lfo
= dynamic_cast<line_filter_observer*>(lf->get_logline_observer());
if (line < 0 || line >= lfo->lfo_filter_state.tfs_index.size()) {
@@ -345,7 +580,7 @@ textfile_sub_source::text_crumbs_for_line(
const auto initial_size = crumbs.size();
meta_iter->second.ms_metadata.m_sections_tree.visit_overlapping(
- ll_iter->get_offset(),
+ lf->get_line_content_offset(ll_iter),
end_offset,
[&crumbs,
initial_size,
@@ -450,7 +685,7 @@ textfile_sub_source::text_crumbs_for_line(
}
}
-bool
+textfile_sub_source::rescan_result_t
textfile_sub_source::rescan_files(
textfile_sub_source::scan_callback& callback,
nonstd::optional<ui_clock::time_point> deadline)
@@ -458,7 +693,8 @@ textfile_sub_source::rescan_files(
static auto& lnav_db = injector::get<auto_sqlite3&>();
file_iterator iter;
- bool retval = false;
+ rescan_result_t retval;
+ size_t files_scanned = 0;
if (this->tss_view == nullptr || this->tss_view->is_paused()) {
return retval;
@@ -466,6 +702,13 @@ textfile_sub_source::rescan_files(
std::vector<std::shared_ptr<logfile>> closed_files;
for (iter = this->tss_files.begin(); iter != this->tss_files.end();) {
+ if (deadline && files_scanned > 0 && ui_clock::now() > deadline.value())
+ {
+ log_info("rescan_files() deadline reached, breaking...");
+ retval.rr_scan_completed = false;
+ break;
+ }
+
std::shared_ptr<logfile> lf = (*iter);
if (lf->is_closed()) {
@@ -477,6 +720,12 @@ textfile_sub_source::rescan_files(
continue;
}
+ if (!this->tss_completed_last_scan && lf->size() > 0) {
+ ++iter;
+ continue;
+ }
+ files_scanned += 1;
+
try {
const auto& st = lf->get_stat();
uint32_t old_size = lf->size();
@@ -491,10 +740,12 @@ textfile_sub_source::rescan_files(
continue;
}
+ bool new_data = false;
switch (new_text_data) {
case logfile::rebuild_result_t::NEW_LINES:
case logfile::rebuild_result_t::NEW_ORDER:
- retval = true;
+ new_data = true;
+ retval.rr_new_data += 1;
break;
default:
break;
@@ -546,9 +797,9 @@ textfile_sub_source::rescan_files(
} else if (content_sf.startswith("{")) {
yajlpp_parse_context ypc(
intern_string::lookup(lf->get_filename()));
- auto_mem<yajl_handle_t> handle(yajl_free);
+ auto handle
+ = yajlpp::alloc_handle(&ypc.ypc_callbacks, &ypc);
- handle = yajl_alloc(&ypc.ypc_callbacks, nullptr, &ypc);
yajl_config(
handle.in(), yajl_allow_trailing_garbage, 1);
ypc.with_ignore_unused(true)
@@ -584,6 +835,7 @@ textfile_sub_source::rescan_files(
rf.rf_mtime = st.st_mtime;
rf.rf_file_size = st.st_size;
rf.rf_text_source = std::make_unique<plain_text_source>();
+ rf.rf_text_source->set_text_format(lf->get_text_format());
rf.rf_text_source->register_view(this->tss_view);
if (parse_res.isOk()) {
auto& lf_meta = lf->get_embedded_metadata();
@@ -621,15 +873,28 @@ textfile_sub_source::rescan_files(
continue;
}
- if (!retval && lf->is_indexing()
+ if (lf->is_indexing()
&& lf->get_text_format() != text_format_t::TF_BINARY)
{
auto ms_iter = this->tss_doc_metadata.find(lf->get_filename());
- if (ms_iter != this->tss_doc_metadata.end()) {
- if (st.st_mtime != ms_iter->second.ms_mtime
- || st.st_size != ms_iter->second.ms_file_size)
+ if (!new_data && ms_iter != this->tss_doc_metadata.end()) {
+ // Only invalidate the meta if the file is small, or we
+ // found some meta previously.
+ if ((st.st_mtime != ms_iter->second.ms_mtime
+ || st.st_size != ms_iter->second.ms_file_size)
+ && (st.st_size < 10 * 1024
+ || !ms_iter->second.ms_metadata.m_sections_tree
+ .empty()))
{
+ log_debug(
+ "text file has changed, invalidating metadata. "
+ "old: {mtime: %d size: %zu}, new: {mtime: %d "
+ "size: %zu}",
+ ms_iter->second.ms_mtime,
+ ms_iter->second.ms_file_size,
+ st.st_mtime,
+ st.st_size);
this->tss_doc_metadata.erase(ms_iter);
ms_iter = this->tss_doc_metadata.end();
}
@@ -641,16 +906,28 @@ textfile_sub_source::rescan_files(
if (read_res.isOk()) {
auto content = attr_line_t(read_res.unwrap());
- log_info("generating metdata for: %s",
- lf->get_filename().c_str());
+ log_info("generating metadata for: %s (size=%zu)",
+ lf->get_filename().c_str(),
+ content.length());
scrub_ansi_string(content.get_string(),
&content.get_attrs());
+
+ auto text_meta = extract_text_meta(
+ content.get_string(), lf->get_text_format());
+ if (text_meta) {
+ lf->set_filename(text_meta->tfm_filename);
+ lf->set_include_in_session(true);
+ callback.renamed_file(lf);
+ }
+
this->tss_doc_metadata[lf->get_filename()]
= metadata_state{
st.st_mtime,
- static_cast<file_ssize_t>(st.st_size),
+ static_cast<file_ssize_t>(lf->get_index_size()),
lnav::document::discover_structure(
- content, line_range{0, -1}),
+ content,
+ line_range{0, -1},
+ lf->get_text_format()),
};
} else {
log_error(
@@ -660,7 +937,7 @@ textfile_sub_source::rescan_files(
this->tss_doc_metadata[lf->get_filename()]
= metadata_state{
st.st_mtime,
- static_cast<file_ssize_t>(st.st_size),
+ static_cast<file_ssize_t>(lf->get_index_size()),
{},
};
}
@@ -696,9 +973,10 @@ textfile_sub_source::rescan_files(
callback.closed_files(closed_files);
}
- if (retval) {
+ if (retval.rr_new_data) {
this->tss_view->search_new_data();
}
+ this->tss_completed_last_scan = retval.rr_scan_completed;
return retval;
}
@@ -715,6 +993,10 @@ textfile_sub_source::set_top_from_off(file_off_t off)
if (new_top_opt) {
this->tss_view->set_selection(vis_line_t(new_top_opt.value()));
+ if (this->tss_view->is_selectable()) {
+ this->tss_view->set_top(this->tss_view->get_selection() - 2_vl,
+ false);
+ }
}
};
}
@@ -731,7 +1013,7 @@ nonstd::optional<vis_line_t>
textfile_sub_source::row_for_anchor(const std::string& id)
{
auto lf = this->current_file();
- if (!lf) {
+ if (!lf || id.empty()) {
return nonstd::nullopt;
}
@@ -748,27 +1030,98 @@ textfile_sub_source::row_for_anchor(const std::string& id)
const auto& meta = iter->second.ms_metadata;
nonstd::optional<vis_line_t> retval;
+ auto is_ptr = startswith(id, "#/");
+ if (is_ptr) {
+ auto hier_sf = string_fragment::from_str(id).consume_n(2).value();
+ std::vector<lnav::document::section_key_t> path;
+
+ while (!hier_sf.empty()) {
+ auto comp_pair = hier_sf.split_when(string_fragment::tag1{'/'});
+ auto scan_res
+ = scn::scan_value<int64_t>(comp_pair.first.to_string_view());
+ if (scan_res && scan_res.empty()) {
+ path.emplace_back(scan_res.value());
+ } else {
+ path.emplace_back(json_ptr::decode(comp_pair.first));
+ }
+ hier_sf = comp_pair.second;
+ }
+
+ auto lookup_res = lnav::document::hier_node::lookup_path(
+ meta.m_sections_root.get(), path);
+ if (lookup_res) {
+ auto ll_opt = lf->line_for_offset(lookup_res.value()->hn_start);
+ if (ll_opt != lf->end()) {
+ retval
+ = vis_line_t(std::distance(lf->cbegin(), ll_opt.value()));
+ }
+ }
+
+ return retval;
+ }
+
lnav::document::hier_node::depth_first(
meta.m_sections_root.get(),
[lf, &id, &retval](const lnav::document::hier_node* node) {
for (const auto& child_pair : node->hn_named_children) {
- auto child_anchor
+ const auto& child_anchor
= text_anchors::to_anchor_string(child_pair.first);
- if (child_anchor == id) {
- auto ll_opt
- = lf->line_for_offset(child_pair.second->hn_start);
- if (ll_opt != lf->end()) {
- retval = vis_line_t(
- std::distance(lf->cbegin(), ll_opt.value()));
- }
+ if (child_anchor != id) {
+ continue;
+ }
+
+ auto ll_opt = lf->line_for_offset(child_pair.second->hn_start);
+ if (ll_opt != lf->end()) {
+ retval = vis_line_t(
+ std::distance(lf->cbegin(), ll_opt.value()));
}
+ break;
}
});
return retval;
}
+static void
+anchor_generator(std::unordered_set<std::string>& retval,
+ std::vector<std::string>& comps,
+ size_t& max_depth,
+ lnav::document::hier_node* hn)
+{
+ if (hn->hn_named_children.empty()) {
+ if (hn->hn_children.empty()) {
+ if (retval.size() >= 250 || comps.empty()) {
+ } else if (comps.size() == 1) {
+ retval.emplace(text_anchors::to_anchor_string(comps.front()));
+ } else {
+ retval.emplace(
+ fmt::format(FMT_STRING("#/{}"),
+ fmt::join(comps.begin(), comps.end(), "/")));
+ }
+ max_depth = std::max(max_depth, comps.size());
+ } else {
+ int index = 0;
+ for (const auto& child : hn->hn_children) {
+ comps.emplace_back(fmt::to_string(index));
+ anchor_generator(retval, comps, max_depth, child.get());
+ comps.pop_back();
+ }
+ }
+ } else {
+ for (const auto& child : hn->hn_named_children) {
+ comps.emplace_back(child.first);
+ anchor_generator(retval, comps, max_depth, child.second);
+ comps.pop_back();
+ }
+ if (max_depth > 1) {
+ retval.emplace(
+ fmt::format(FMT_STRING("#/{}"),
+ fmt::join(comps.begin(), comps.end(), "/")));
+ }
+ }
+}
+
std::unordered_set<std::string>
textfile_sub_source::get_anchors()
{
@@ -791,30 +1144,166 @@ textfile_sub_source::get_anchors()
const auto& meta = iter->second.ms_metadata;
- lnav::document::hier_node::depth_first(
- meta.m_sections_root.get(),
- [&retval](const lnav::document::hier_node* node) {
- if (retval.size() > 100) {
- return;
+ if (meta.m_sections_root == nullptr) {
+ return retval;
+ }
+
+ std::vector<std::string> comps;
+ size_t max_depth = 0;
+ anchor_generator(retval, comps, max_depth, meta.m_sections_root.get());
+
+ return retval;
+}
+
+static nonstd::optional<vis_line_t>
+to_vis_line(const std::shared_ptr<logfile>& lf, file_off_t off)
+{
+ auto ll_opt = lf->line_for_offset(off);
+ if (ll_opt != lf->end()) {
+ return vis_line_t(std::distance(lf->cbegin(), ll_opt.value()));
+ }
+
+ return nonstd::nullopt;
+}
+
+nonstd::optional<vis_line_t>
+textfile_sub_source::adjacent_anchor(vis_line_t vl, text_anchors::direction dir)
+{
+ auto lf = this->current_file();
+ if (!lf) {
+ return nonstd::nullopt;
+ }
+
+ log_debug("adjacent_anchor: %s:L%d:%s",
+ lf->get_filename().c_str(),
+ vl,
+ dir == text_anchors::direction::prev ? "prev" : "next");
+ auto rend_iter = this->tss_rendered_files.find(lf->get_filename());
+ if (rend_iter != this->tss_rendered_files.end()) {
+ return rend_iter->second.rf_text_source->adjacent_anchor(vl, dir);
+ }
+
+ auto iter = this->tss_doc_metadata.find(lf->get_filename());
+ if (iter == this->tss_doc_metadata.end()) {
+ log_debug(" no metadata available");
+ return nonstd::nullopt;
+ }
+
+ auto& md = iter->second.ms_metadata;
+ auto* lfo = dynamic_cast<line_filter_observer*>(lf->get_logline_observer());
+ if (vl >= lfo->lfo_filter_state.tfs_index.size()
+ || md.m_sections_root == nullptr)
+ {
+ return nonstd::nullopt;
+ }
+ auto ll_iter = lf->begin() + lfo->lfo_filter_state.tfs_index[vl];
+ auto line_offsets = lf->get_file_range(ll_iter, false);
+ log_debug(
+ " range %d:%d", line_offsets.fr_offset, line_offsets.next_offset());
+ auto path_for_line
+ = md.path_for_range(line_offsets.fr_offset, line_offsets.next_offset());
+
+ if (path_for_line.empty()) {
+ log_debug(" no path found");
+ auto neighbors_res = md.m_sections_root->line_neighbors(vl);
+ if (!neighbors_res) {
+ return nonstd::nullopt;
+ }
+
+ switch (dir) {
+ case text_anchors::direction::prev: {
+ if (neighbors_res->cnr_previous) {
+ return to_vis_line(
+ lf, neighbors_res->cnr_previous.value()->hn_start);
+ }
+ break;
}
+ case text_anchors::direction::next: {
+ if (neighbors_res->cnr_next) {
+ return to_vis_line(
+ lf, neighbors_res->cnr_next.value()->hn_start);
+ } else if (!md.m_sections_root->hn_children.empty()) {
+ return to_vis_line(
+ lf, md.m_sections_root->hn_children[0]->hn_start);
+ }
+ break;
+ }
+ }
+ return nonstd::nullopt;
+ }
- for (const auto& child_pair : node->hn_named_children) {
- retval.emplace(
- text_anchors::to_anchor_string(child_pair.first));
+ log_debug(" path for line: %s", fmt::to_string(path_for_line).c_str());
+ auto last_key = path_for_line.back();
+ path_for_line.pop_back();
+
+ auto parent_opt = lnav::document::hier_node::lookup_path(
+ md.m_sections_root.get(), path_for_line);
+ if (!parent_opt) {
+ log_debug(" no parent for path: %s",
+ fmt::to_string(path_for_line).c_str());
+ return nonstd::nullopt;
+ }
+ auto parent = parent_opt.value();
+
+ auto child_hn = parent->lookup_child(last_key);
+ if (!child_hn) {
+ // XXX "should not happen"
+ log_debug(" child not found");
+ return nonstd::nullopt;
+ }
+
+ auto neighbors_res = parent->child_neighbors(
+ child_hn.value(), line_offsets.next_offset() + 1);
+ if (!neighbors_res) {
+ log_debug(" no neighbors found");
+ return nonstd::nullopt;
+ }
+
+ log_debug(" neighbors p:%d n:%d",
+ neighbors_res->cnr_previous.has_value(),
+ neighbors_res->cnr_next.has_value());
+ if (neighbors_res->cnr_previous && last_key.is<std::string>()) {
+ auto neighbor_sub
+ = neighbors_res->cnr_previous.value()->lookup_child(last_key);
+ if (neighbor_sub) {
+ neighbors_res->cnr_previous = neighbor_sub;
+ }
+ }
+
+ if (neighbors_res->cnr_next && last_key.is<std::string>()) {
+ auto neighbor_sub
+ = neighbors_res->cnr_next.value()->lookup_child(last_key);
+ if (neighbor_sub) {
+ neighbors_res->cnr_next = neighbor_sub;
+ }
+ }
+
+ switch (dir) {
+ case text_anchors::direction::prev: {
+ if (neighbors_res->cnr_previous) {
+ return to_vis_line(
+ lf, neighbors_res->cnr_previous.value()->hn_start);
}
- });
+ break;
+ }
+ case text_anchors::direction::next: {
+ if (neighbors_res->cnr_next) {
+ return to_vis_line(lf,
+ neighbors_res->cnr_next.value()->hn_start);
+ }
+ break;
+ }
+ }
- return retval;
+ return nonstd::nullopt;
}
nonstd::optional<std::string>
textfile_sub_source::anchor_for_row(vis_line_t vl)
{
- nonstd::optional<std::string> retval;
-
auto lf = this->current_file();
if (!lf) {
- return retval;
+ return nonstd::nullopt;
}
auto rend_iter = this->tss_rendered_files.find(lf->get_filename());
@@ -824,31 +1313,41 @@ textfile_sub_source::anchor_for_row(vis_line_t vl)
auto iter = this->tss_doc_metadata.find(lf->get_filename());
if (iter == this->tss_doc_metadata.end()) {
- return retval;
+ return nonstd::nullopt;
}
auto* lfo = dynamic_cast<line_filter_observer*>(lf->get_logline_observer());
if (vl >= lfo->lfo_filter_state.tfs_index.size()) {
- return retval;
+ return nonstd::nullopt;
}
+ auto& md = iter->second.ms_metadata;
auto ll_iter = lf->begin() + lfo->lfo_filter_state.tfs_index[vl];
- auto ll_next_iter = ll_iter + 1;
- auto end_offset = (ll_next_iter == lf->end())
- ? lf->get_index_size() - 1
- : ll_next_iter->get_offset() - 1;
- iter->second.ms_metadata.m_sections_tree.visit_overlapping(
- ll_iter->get_offset(),
- end_offset,
- [&retval](const lnav::document::section_interval_t& iv) {
- retval = iv.value.match(
- [](const std::string& str) {
- return nonstd::make_optional(
- text_anchors::to_anchor_string(str));
- },
- [](size_t) { return nonstd::nullopt; });
- });
+ auto line_offsets = lf->get_file_range(ll_iter, false);
+ auto path_for_line
+ = md.path_for_range(line_offsets.fr_offset, line_offsets.next_offset());
- return retval;
+ if (path_for_line.empty()) {
+ return nonstd::nullopt;
+ }
+
+ if ((path_for_line.size() == 1
+ || md.m_text_format == text_format_t::TF_MARKDOWN)
+ && path_for_line.back().is<std::string>())
+ {
+ return text_anchors::to_anchor_string(
+ path_for_line.back().get<std::string>());
+ }
+
+ auto comps = path_for_line | lnav::itertools::map([](const auto& elem) {
+ return elem.match(
+ [](const std::string& str) {
+ return json_ptr::encode_str(str);
+ },
+ [](size_t index) { return fmt::to_string(index); });
+ });
+
+ return fmt::format(FMT_STRING("#/{}"),
+ fmt::join(comps.begin(), comps.end(), "/"));
}
bool
@@ -873,3 +1372,59 @@ textfile_sub_source::to_front(const std::string& filename)
return true;
}
+
+logline*
+textfile_sub_source::text_accel_get_line(vis_line_t vl)
+{
+ auto lf = this->current_file();
+ auto* lfo = dynamic_cast<line_filter_observer*>(lf->get_logline_observer());
+ return (lf->begin() + lfo->lfo_filter_state.tfs_index[vl]).base();
+}
+
+textfile_header_overlay::textfile_header_overlay(textfile_sub_source* src)
+ : tho_src(src)
+{
+}
+
+bool
+textfile_header_overlay::list_static_overlay(const listview_curses& lv,
+ int y,
+ int bottom,
+ attr_line_t& value_out)
+{
+ if (y != 0) {
+ return false;
+ }
+
+ auto lf = this->tho_src->current_file();
+ if (lf == nullptr) {
+ return false;
+ }
+
+ if (lf->get_text_format() != text_format_t::TF_BINARY) {
+ return false;
+ }
+
+ {
+ attr_line_builder alb(value_out);
+ {
+ auto ag = alb.with_attr(VC_ROLE.value(role_t::VCR_TABLE_HEADER));
+ alb.appendf(FMT_STRING("{:>16} "), "File Offset");
+ }
+ size_t byte_off = 0;
+ for (size_t lpc = 0; lpc < 16; lpc++) {
+ auto ag = alb.with_attr(VC_ROLE.value(role_t::VCR_FILE_OFFSET));
+ if (byte_off == 8) {
+ alb.append(" ");
+ }
+ alb.appendf(FMT_STRING(" {:0>2x}"), lpc);
+ byte_off += 1;
+ }
+ {
+ auto ag = alb.with_attr(VC_ROLE.value(role_t::VCR_TABLE_HEADER));
+ alb.appendf(FMT_STRING(" {:^17}"), "ASCII");
+ }
+ }
+ value_out.with_attr_for_all(VC_STYLE.value(text_attrs{A_UNDERLINE}));
+ return true;
+}
diff --git a/src/textfile_sub_source.hh b/src/textfile_sub_source.hh
index 724f7c7..e9b759e 100644
--- a/src/textfile_sub_source.hh
+++ b/src/textfile_sub_source.hh
@@ -36,19 +36,19 @@
#include "filter_observer.hh"
#include "logfile.hh"
#include "plain_text_source.hh"
+#include "text_overlay_menu.hh"
#include "textview_curses.hh"
class textfile_sub_source
: public text_sub_source
, public vis_location_history
+ , public text_accel_source
, public text_anchors {
public:
using file_iterator = std::deque<std::shared_ptr<logfile>>::iterator;
textfile_sub_source() { this->tss_supports_filtering = true; }
- ~textfile_sub_source() override = default;
-
bool empty() const { return this->tss_files.empty(); }
size_t size() const { return this->tss_files.size(); }
@@ -109,16 +109,24 @@ public:
class scan_callback {
public:
+ virtual ~scan_callback() = default;
+
virtual void closed_files(
const std::vector<std::shared_ptr<logfile>>& files)
= 0;
virtual void promote_file(const std::shared_ptr<logfile>& lf) = 0;
virtual void scanned_file(const std::shared_ptr<logfile>& lf) = 0;
+ virtual void renamed_file(const std::shared_ptr<logfile>& lf) = 0;
};
- bool rescan_files(scan_callback& callback,
- nonstd::optional<ui_clock::time_point> deadline
- = nonstd::nullopt);
+ struct rescan_result_t {
+ size_t rr_new_data{0};
+ bool rr_scan_completed{true};
+ };
+
+ rescan_result_t rescan_files(scan_callback& callback,
+ nonstd::optional<ui_clock::time_point> deadline
+ = nonstd::nullopt);
void text_filters_changed() override;
@@ -140,10 +148,27 @@ public:
nonstd::optional<std::string> anchor_for_row(vis_line_t vl) override;
+ nonstd::optional<vis_line_t> adjacent_anchor(vis_line_t vl,
+ direction dir) override;
+
std::unordered_set<std::string> get_anchors() override;
void quiesce() override;
+ bool is_time_offset_supported() const override
+ {
+ const auto lf = this->current_file();
+ if (lf != nullptr && lf->has_line_metadata()) {
+ return true;
+ }
+
+ return false;
+ }
+
+ logline* text_accel_get_line(vis_line_t vl) override;
+
+ void scroll_invoked(textview_curses* tc) override;
+
private:
void detach_observer(std::shared_ptr<logfile> lf)
{
@@ -168,6 +193,23 @@ private:
std::deque<std::shared_ptr<logfile>> tss_hidden_files;
std::unordered_map<std::string, rendered_file> tss_rendered_files;
std::unordered_map<std::string, metadata_state> tss_doc_metadata;
+ size_t tss_line_indent_size{0};
+ bool tss_completed_last_scan{true};
+ attr_line_t tss_hex_line;
+ int64_t tss_content_line{0};
+};
+
+class textfile_header_overlay : public text_overlay_menu {
+public:
+ explicit textfile_header_overlay(textfile_sub_source* src);
+
+ bool list_static_overlay(const listview_curses& lv,
+ int y,
+ int bottom,
+ attr_line_t& value_out) override;
+
+private:
+ textfile_sub_source* tho_src;
};
#endif
diff --git a/src/textview_curses.cc b/src/textview_curses.cc
index 6165f9e..c078366 100644
--- a/src/textview_curses.cc
+++ b/src/textview_curses.cc
@@ -33,15 +33,17 @@
#include "textview_curses.hh"
#include "base/ansi_scrubber.hh"
+#include "base/humanize.time.hh"
#include "base/injector.hh"
#include "base/time_util.hh"
#include "config.h"
-#include "data_parser.hh"
+#include "data_scanner.hh"
#include "fmt/format.h"
#include "lnav_config.hh"
-#include "log_format.hh"
+#include "log_format_fwd.hh"
#include "logfile.hh"
#include "shlex.hh"
+#include "text_overlay_menu.hh"
#include "view_curses.hh"
const auto REVERSE_SEARCH_OFFSET = 2000_vl;
@@ -81,7 +83,7 @@ text_filter::add_line(logfile_filter_state& lfs,
logfile::const_iterator ll,
const shared_buffer_ref& line)
{
- bool match_state = this->matches(*lfs.tfs_logfile, ll, line);
+ bool match_state = this->matches(line_source{*lfs.tfs_logfile, ll}, line);
if (ll->is_message()) {
this->end_of_message(lfs);
@@ -124,12 +126,66 @@ text_filter::end_of_message(logfile_filter_state& lfs)
lfs.tfs_lines_for_message[this->lf_index] = 0;
}
+log_accel::direction_t
+text_accel_source::get_line_accel_direction(vis_line_t vl)
+{
+ log_accel la;
+
+ while (vl >= 0) {
+ const auto* curr_line = this->text_accel_get_line(vl);
+
+ if (!curr_line->is_message()) {
+ --vl;
+ continue;
+ }
+
+ if (!la.add_point(curr_line->get_time_in_millis())) {
+ break;
+ }
+
+ --vl;
+ }
+
+ return la.get_direction();
+}
+
+std::string
+text_accel_source::get_time_offset_for_line(textview_curses& tc, vis_line_t vl)
+{
+ auto ll = this->text_accel_get_line(vl);
+ auto curr_tv = ll->get_timeval();
+ struct timeval diff_tv;
+
+ auto prev_umark = tc.get_bookmarks()[&textview_curses::BM_USER].prev(vl);
+ auto next_umark = tc.get_bookmarks()[&textview_curses::BM_USER].next(vl);
+ auto prev_emark
+ = tc.get_bookmarks()[&textview_curses::BM_USER_EXPR].prev(vl);
+ auto next_emark
+ = tc.get_bookmarks()[&textview_curses::BM_USER_EXPR].next(vl);
+ if (!prev_umark && !prev_emark && (next_umark || next_emark)) {
+ auto next_line = this->text_accel_get_line(
+ std::max(next_umark.value_or(0), next_emark.value_or(0)));
+
+ diff_tv = curr_tv - next_line->get_timeval();
+ } else {
+ auto prev_row
+ = std::max(prev_umark.value_or(0), prev_emark.value_or(0));
+ auto first_line = this->text_accel_get_line(prev_row);
+ auto start_tv = first_line->get_timeval();
+ diff_tv = curr_tv - start_tv;
+ }
+
+ return humanize::time::duration::from_tv(diff_tv).to_string();
+}
+
const bookmark_type_t textview_curses::BM_USER("user");
const bookmark_type_t textview_curses::BM_USER_EXPR("user-expr");
const bookmark_type_t textview_curses::BM_SEARCH("search");
const bookmark_type_t textview_curses::BM_META("meta");
+const bookmark_type_t textview_curses::BM_PARTITION("partition");
-textview_curses::textview_curses() : tc_search_action(noop_func{})
+textview_curses::textview_curses()
+ : lnav_config_listener(__FILE__), tc_search_action(noop_func{})
{
this->set_data_source(this);
}
@@ -155,11 +211,13 @@ textview_curses::reload_config(error_reporter& reporter)
iter = this->tc_highlights.erase(iter);
}
- std::map<std::string, std::string> vars;
+ std::map<std::string, scoped_value_t> vars;
auto curr_theme_iter
= lnav_config.lc_ui_theme_defs.find(lnav_config.lc_ui_theme);
if (curr_theme_iter != lnav_config.lc_ui_theme_defs.end()) {
- vars = curr_theme_iter->second.lt_vars;
+ for (const auto& vpair : curr_theme_iter->second.lt_vars) {
+ vars[vpair.first] = vpair.second;
+ }
}
for (const auto& theme_name : {DEFAULT_THEME_NAME, lnav_config.lc_ui_theme})
@@ -171,19 +229,7 @@ textview_curses::reload_config(error_reporter& reporter)
}
for (const auto& hl_pair : theme_iter->second.lt_highlights) {
- if (hl_pair.second.hc_regex.empty()) {
- continue;
- }
-
- auto regex = lnav::pcre2pp::code::from(hl_pair.second.hc_regex);
-
- if (regex.isErr()) {
- const static intern_string_t PATTERN_SRC
- = intern_string::lookup("pattern");
-
- auto ce = regex.unwrapErr();
- reporter(&hl_pair.second.hc_regex,
- lnav::console::to_user_message(PATTERN_SRC, ce));
+ if (hl_pair.second.hc_regex.pp_value == nullptr) {
continue;
}
@@ -194,8 +240,8 @@ textview_curses::reload_config(error_reporter& reporter)
fg1 = sc.sc_color;
bg1 = sc.sc_background_color;
- shlex(fg1).eval(fg_color, vars);
- shlex(bg1).eval(bg_color, vars);
+ shlex(fg1).eval(fg_color, scoped_resolver{&vars});
+ shlex(bg1).eval(bg_color, scoped_resolver{&vars});
auto fg = styling::color_unit::from_str(fg_color).unwrapOrElse(
[&](const auto& msg) {
@@ -228,7 +274,7 @@ textview_curses::reload_config(error_reporter& reporter)
attrs.ta_attrs |= A_UNDERLINE;
}
this->tc_highlights[{highlight_source_t::THEME, hl_pair.first}]
- = highlighter(regex.unwrap().to_shared())
+ = highlighter(hl_pair.second.hc_regex.pp_value)
.with_attrs(attrs)
.with_color(fg, bg)
.with_nestable(false);
@@ -241,8 +287,20 @@ textview_curses::reload_config(error_reporter& reporter)
}
void
+textview_curses::invoke_scroll()
+{
+ this->tc_selected_text = nonstd::nullopt;
+ if (this->tc_sub_source != nullptr) {
+ this->tc_sub_source->scroll_invoked(this);
+ }
+
+ listview_curses::invoke_scroll();
+}
+
+void
textview_curses::reload_data()
{
+ this->tc_selected_text = nonstd::nullopt;
if (this->tc_sub_source != nullptr) {
this->tc_sub_source->text_update_marks(this->tc_bookmarks);
}
@@ -352,79 +410,297 @@ textview_curses::handle_mouse(mouse_event& me)
unsigned long width;
vis_line_t height;
- if (this->tc_selection_start == -1_vl && listview_curses::handle_mouse(me))
- {
- return true;
+ if (!this->vc_visible || this->lv_height == 0) {
+ return false;
}
- if (this->tc_delegate != nullptr
- && this->tc_delegate->text_handle_mouse(*this, me))
- {
+ if (!this->tc_selection_start && listview_curses::handle_mouse(me)) {
return true;
}
- if (me.me_button != mouse_button_t::BUTTON_LEFT) {
- return false;
- }
-
- vis_line_t mouse_line(this->get_top() + me.me_y);
+ auto mouse_line = (me.me_y < 0 || me.me_y >= this->lv_display_lines.size())
+ ? empty_space{}
+ : this->lv_display_lines[me.me_y];
+ this->get_dimensions(height, width);
- if (mouse_line > this->get_bottom()) {
- mouse_line = this->get_bottom();
+ if (!mouse_line.is<overlay_menu>()
+ && (me.me_button != mouse_button_t::BUTTON_LEFT
+ || me.me_state != mouse_button_state_t::BUTTON_STATE_RELEASED))
+ {
+ this->tc_selected_text = nonstd::nullopt;
+ this->set_needs_update();
+ }
+
+ nonstd::optional<int> overlay_content_min_y;
+ nonstd::optional<int> overlay_content_max_y;
+ if (this->tc_press_line.is<overlay_content>()) {
+ auto main_line
+ = this->tc_press_line.get<overlay_content>().oc_main_line;
+ for (size_t lpc = 0; lpc < this->lv_display_lines.size(); lpc++) {
+ if (overlay_content_min_y
+ && !this->lv_display_lines[lpc].is<static_overlay_content>()
+ && !this->lv_display_lines[lpc].is<overlay_content>())
+ {
+ overlay_content_max_y = lpc;
+ break;
+ }
+ if (this->lv_display_lines[lpc].is<main_content>()) {
+ auto& mc = this->lv_display_lines[lpc].get<main_content>();
+ if (mc.mc_line == main_line) {
+ overlay_content_min_y = lpc;
+ }
+ }
+ }
+ if (overlay_content_min_y && !overlay_content_max_y) {
+ overlay_content_max_y = this->lv_display_lines.size();
+ }
}
- this->get_dimensions(height, width);
+ auto* sub_delegate = dynamic_cast<text_delegate*>(this->tc_sub_source);
switch (me.me_state) {
- case mouse_button_state_t::BUTTON_STATE_PRESSED:
- this->tc_selection_start = mouse_line;
- this->tc_selection_last = -1_vl;
- this->tc_selection_cleared = false;
- break;
- case mouse_button_state_t::BUTTON_STATE_DRAGGED:
- if (me.me_y <= 0) {
- this->shift_top(-1_vl);
- me.me_y = 0;
- mouse_line = this->get_top();
+ case mouse_button_state_t::BUTTON_STATE_PRESSED: {
+ this->tc_text_selection_active = true;
+ this->tc_press_line = mouse_line;
+ this->tc_press_left = this->lv_left + me.me_press_x;
+ if (!this->lv_selectable) {
+ this->set_selectable(true);
}
- if (me.me_y >= height
- && this->get_top() < this->get_top_for_last_row())
- {
- this->shift_top(1_vl);
- me.me_y = height;
- mouse_line = this->get_bottom();
+ mouse_line.match(
+ [this, &me, sub_delegate, &mouse_line](const main_content& mc) {
+ if (this->vc_enabled) {
+ if (this->tc_supports_marks
+ && me.me_button == mouse_button_t::BUTTON_LEFT
+ && me.is_modifier_pressed(
+ mouse_event::modifier_t::shift))
+ {
+ this->tc_selection_start = mc.mc_line;
+ }
+ this->set_selection_without_context(mc.mc_line);
+ this->tc_press_event = me;
+ }
+ if (this->tc_delegate != nullptr) {
+ this->tc_delegate->text_handle_mouse(
+ *this, mouse_line, me);
+ }
+ if (sub_delegate != nullptr) {
+ sub_delegate->text_handle_mouse(*this, mouse_line, me);
+ }
+ },
+ [](const overlay_menu& om) {},
+ [](const static_overlay_content& soc) {
+
+ },
+ [this](const overlay_content& oc) {
+ this->set_overlay_selection(oc.oc_line);
+ },
+ [](const empty_space& es) {});
+ break;
+ }
+ case mouse_button_state_t::BUTTON_STATE_DOUBLE_CLICK: {
+ if (!this->lv_selectable) {
+ this->set_selectable(true);
}
+ this->tc_text_selection_active = false;
+ mouse_line.match(
+ [this, &me, &mouse_line, sub_delegate](const main_content& mc) {
+ if (this->vc_enabled) {
+ if (this->tc_supports_marks
+ && me.me_button == mouse_button_t::BUTTON_LEFT)
+ {
+ attr_line_t al;
+
+ this->textview_value_for_row(mc.mc_line, al);
+ auto line_sf
+ = string_fragment::from_str(al.get_string());
+ auto cursor_sf = line_sf.sub_cell_range(
+ this->lv_left + me.me_x,
+ this->lv_left + me.me_x);
+ auto ds = data_scanner(line_sf);
+ auto tf = this->tc_sub_source->get_text_format();
+ while (true) {
+ auto tok_res = ds.tokenize2(tf);
+ if (!tok_res) {
+ break;
+ }
+
+ auto tok = tok_res.value();
+ auto tok_sf
+ = (tok.tr_token
+ == data_token_t::DT_QUOTED_STRING
+ && (cursor_sf.sf_begin
+ == tok.to_string_fragment()
+ .sf_begin
+ || cursor_sf.sf_begin
+ == tok.to_string_fragment()
+ .sf_end
+ - 1))
+ ? tok.to_string_fragment()
+ : tok.inner_string_fragment();
+ if (tok_sf.contains(cursor_sf)
+ && tok.tr_token != data_token_t::DT_WHITE)
+ {
+ auto group_tok
+ = ds.find_matching_bracket(tf, tok);
+ if (group_tok) {
+ tok_sf = group_tok.value()
+ .to_string_fragment();
+ }
+ this->tc_selected_text = selected_text_info{
+ me.me_x,
+ mc.mc_line,
+ line_range{
+ tok_sf.sf_begin,
+ tok_sf.sf_end,
+ },
+ tok_sf.to_string(),
+ };
+ this->set_needs_update();
+ break;
+ }
+ }
+ }
+ this->set_selection_without_context(mc.mc_line);
+ }
+ if (this->tc_delegate != nullptr) {
+ this->tc_delegate->text_handle_mouse(
+ *this, mouse_line, me);
+ }
+ if (sub_delegate != nullptr) {
+ sub_delegate->text_handle_mouse(*this, mouse_line, me);
+ }
+ },
+ [](const static_overlay_content& soc) {
- if (this->tc_selection_last == mouse_line)
- break;
+ },
+ [](const overlay_menu& om) {
- if (this->tc_selection_last != -1) {
- this->toggle_user_mark(&textview_curses::BM_USER,
- this->tc_selection_start,
- this->tc_selection_last);
- }
- if (this->tc_selection_start == mouse_line) {
- this->tc_selection_last = -1_vl;
+ },
+ [](const overlay_content& oc) {
+
+ },
+ [](const empty_space& es) {});
+ break;
+ }
+ case mouse_button_state_t::BUTTON_STATE_DRAGGED: {
+ this->tc_text_selection_active = true;
+ if (!this->vc_enabled) {
+ } else if (me.me_y == me.me_press_y) {
+ if (mouse_line.is<main_content>()) {
+ auto& mc = mouse_line.get<main_content>();
+ attr_line_t al;
+ auto low_x = std::min(this->tc_press_left,
+ (int) this->lv_left + me.me_x);
+ auto high_x = std::max(this->tc_press_left,
+ (int) this->lv_left + me.me_x);
+
+ this->set_selection_without_context(mc.mc_line);
+ if (this->tc_supports_marks
+ && me.me_button == mouse_button_t::BUTTON_LEFT)
+ {
+ this->textview_value_for_row(mc.mc_line, al);
+ auto line_sf
+ = string_fragment::from_str(al.get_string());
+ auto cursor_sf = line_sf.sub_cell_range(low_x, high_x);
+ if (me.me_x <= 1) {
+ this->set_left(this->lv_left - 1);
+ } else if (me.me_x >= width - 1) {
+ this->set_left(this->lv_left + 1);
+ }
+ if (!cursor_sf.empty()) {
+ this->tc_selected_text = {
+ me.me_x,
+ mc.mc_line,
+ line_range{
+ cursor_sf.sf_begin,
+ cursor_sf.sf_end,
+ },
+ cursor_sf.to_string(),
+ };
+ }
+ }
+ }
} else {
- if (!this->tc_selection_cleared) {
- if (this->tc_sub_source != nullptr) {
- this->tc_sub_source->text_clear_marks(&BM_USER);
+ if (this->tc_press_line.is<main_content>()) {
+ if (me.me_y < 0) {
+ this->shift_selection(
+ listview_curses::shift_amount_t::up_line);
+ } else if (me.me_y >= height) {
+ this->shift_selection(
+ listview_curses::shift_amount_t::down_line);
+ } else if (mouse_line.is<main_content>()) {
+ this->set_selection_without_context(
+ mouse_line.get<main_content>().mc_line);
+ }
+ } else if (this->tc_press_line.is<overlay_content>()
+ && overlay_content_min_y && overlay_content_max_y)
+ {
+ if (me.me_y < overlay_content_min_y.value()) {
+ this->set_overlay_selection(
+ this->get_overlay_selection().value_or(0_vl)
+ - 1_vl);
+ } else if (me.me_y >= overlay_content_max_y.value()) {
+ this->set_overlay_selection(
+ this->get_overlay_selection().value_or(0_vl)
+ + 1_vl);
+ } else if (mouse_line.is<overlay_content>()) {
+ this->set_overlay_selection(
+ mouse_line.get<overlay_content>().oc_line);
}
- this->tc_bookmarks[&BM_USER].clear();
-
- this->tc_selection_cleared = true;
}
- this->toggle_user_mark(
- &BM_USER, this->tc_selection_start, mouse_line);
- this->tc_selection_last = mouse_line;
}
- this->reload_data();
break;
- case mouse_button_state_t::BUTTON_STATE_RELEASED:
- this->tc_selection_start = -1_vl;
- this->tc_selection_last = -1_vl;
- this->tc_selection_cleared = false;
+ }
+ case mouse_button_state_t::BUTTON_STATE_RELEASED: {
+ auto* ov = this->get_overlay_source();
+ if (ov != nullptr && mouse_line.is<listview_curses::overlay_menu>()
+ && this->tc_selected_text)
+ {
+ auto* tom = dynamic_cast<text_overlay_menu*>(ov);
+ if (tom != nullptr) {
+ auto& om = mouse_line.get<listview_curses::overlay_menu>();
+ auto& sti = this->tc_selected_text.value();
+
+ for (const auto& mi : tom->tom_menu_items) {
+ if (om.om_line == mi.mi_line
+ && me.is_click_in(mouse_button_t::BUTTON_LEFT,
+ mi.mi_range))
+ {
+ mi.mi_action(sti.sti_value);
+ break;
+ }
+ }
+ }
+ }
+ this->tc_text_selection_active = false;
+ if (me.is_click_in(mouse_button_t::BUTTON_RIGHT, 0, INT_MAX)) {
+ auto* lov = this->get_overlay_source();
+ if (lov != nullptr) {
+ lov->set_show_details_in_overlay(
+ !lov->get_show_details_in_overlay());
+ }
+ }
+ if (this->vc_enabled) {
+ if (this->tc_selection_start) {
+ this->toggle_user_mark(&BM_USER,
+ this->tc_selection_start.value(),
+ this->get_selection());
+ this->reload_data();
+ }
+ this->tc_selection_start = nonstd::nullopt;
+ }
+ if (this->tc_delegate != nullptr) {
+ this->tc_delegate->text_handle_mouse(*this, mouse_line, me);
+ }
+ if (sub_delegate != nullptr) {
+ sub_delegate->text_handle_mouse(*this, mouse_line, me);
+ }
+ if (mouse_line.is<overlay_menu>()) {
+ this->tc_selected_text = nonstd::nullopt;
+ this->set_needs_update();
+ }
break;
+ }
}
return true;
@@ -441,6 +717,10 @@ textview_curses::textview_value_for_row(vis_line_t row, attr_line_t& value_out)
this->tc_sub_source->text_value_for_line(*this, row, str);
this->tc_sub_source->text_attrs_for_line(*this, row, sa);
+ for (const auto& attr : sa) {
+ require_ge(attr.sa_range.lr_start, 0);
+ }
+
scrub_ansi_string(str, &sa);
struct line_range body, orig_line;
@@ -461,11 +741,28 @@ textview_curses::textview_value_for_row(vis_line_t row, attr_line_t& value_out)
format_name = format_attr_opt.value().get();
}
- if (this->is_selectable() && row == this->get_selection()
- && this->tc_cursor_role)
+ if (this->is_selectable() && this->tc_cursor_role
+ && this->tc_disabled_cursor_role)
{
- sa.emplace_back(line_range{orig_line.lr_start, -1},
- VC_ROLE.value(this->tc_cursor_role.value()));
+ vis_line_t sel_start, sel_end;
+
+ sel_start = sel_end = this->get_selection();
+ if (this->tc_selection_start) {
+ if (this->tc_selection_start.value() < sel_end) {
+ sel_start = this->tc_selection_start.value();
+ } else {
+ sel_end = this->tc_selection_start.value();
+ }
+ }
+
+ if (sel_start <= row && row <= sel_end) {
+ auto role = this->get_overlay_selection()
+ ? this->tc_disabled_cursor_role.value()
+ : this->tc_cursor_role.value();
+
+ sa.emplace_back(line_range{orig_line.lr_start, -1},
+ VC_ROLE.value(role));
+ }
}
for (auto& tc_highlight : this->tc_highlights) {
@@ -502,65 +799,23 @@ textview_curses::textview_value_for_row(vis_line_t row, attr_line_t& value_out)
value_out.apply_hide();
}
-#if 0
- typedef std::map<std::string, role_t> key_map_t;
- static key_map_t key_roles;
-
- data_scanner ds(str);
- data_parser dp(&ds);
-
- dp.parse();
-
- for (list<data_parser::element>::iterator iter = dp.dp_stack.begin();
- iter != dp.dp_stack.end();
- ++iter) {
- view_colors &vc = view_colors::singleton();
-
- if (iter->e_token == DNT_PAIR) {
- list<data_parser::element>::iterator pair_iter;
- key_map_t::iterator km_iter;
- data_token_t value_token;
- struct line_range lr;
- string key;
-
- value_token =
- iter->e_sub_elements->back().e_sub_elements->front().e_token;
- if (value_token == DT_STRING) {
- continue;
- }
-
- lr.lr_start = iter->e_capture.c_begin;
- lr.lr_end = iter->e_capture.c_end;
-
- key = ds.get_input().get_substr(
- &iter->e_sub_elements->front().e_capture);
- if ((km_iter = key_roles.find(key)) == key_roles.end()) {
- key_roles[key] = vc.next_highlight();
- }
- /* fprintf(stderr, "key = %s\n", key.c_str()); */
- sa[lr].insert(make_string_attr("style",
- vc.attrs_for_role(key_roles[key])));
-
- pair_iter = iter->e_sub_elements->begin();
- ++pair_iter;
-
- lr.lr_start = pair_iter->e_capture.c_begin;
- lr.lr_end = pair_iter->e_capture.c_end;
- sa[lr].insert(make_string_attr("style",
- COLOR_PAIR(view_colors::VC_WHITE) |
- A_BOLD));
- }
- }
-#endif
-
const auto& user_marks = this->tc_bookmarks[&BM_USER];
const auto& user_expr_marks = this->tc_bookmarks[&BM_USER_EXPR];
- if (binary_search(user_marks.begin(), user_marks.end(), row)
- || binary_search(user_expr_marks.begin(), user_expr_marks.end(), row))
+ if (std::binary_search(user_marks.begin(), user_marks.end(), row)
+ || std::binary_search(
+ user_expr_marks.begin(), user_expr_marks.end(), row))
{
sa.emplace_back(line_range{orig_line.lr_start, -1},
VC_STYLE.value(text_attrs{A_REVERSE}));
}
+
+ if (this->tc_selected_text) {
+ const auto& sti = this->tc_selected_text.value();
+ if (sti.sti_line == row) {
+ sa.emplace_back(sti.sti_range,
+ VC_ROLE.value(role_t::VCR_SELECTED_TEXT));
+ }
+ }
}
void
@@ -822,11 +1077,21 @@ textview_curses::grep_value_for_line(vis_line_t line, std::string& value_out)
}
void
-text_time_translator::scroll_invoked(textview_curses* tc)
+text_sub_source::scroll_invoked(textview_curses* tc)
{
- if (tc->get_inner_height() > 0) {
+ auto* ttt = dynamic_cast<text_time_translator*>(this);
+
+ if (ttt != nullptr) {
+ ttt->ttt_scroll_invoked(tc);
+ }
+}
+
+void
+text_time_translator::ttt_scroll_invoked(textview_curses* tc)
+{
+ if (tc->get_inner_height() > 0 && tc->get_selection() >= 0_vl) {
this->time_for_row(tc->get_selection()) |
- [this](auto new_top_time) { this->ttt_top_time = new_top_time; };
+ [this](auto new_top_ri) { this->ttt_top_row_info = new_top_ri; };
}
}
@@ -834,34 +1099,19 @@ void
text_time_translator::data_reloaded(textview_curses* tc)
{
if (tc->get_inner_height() == 0) {
+ this->ttt_top_row_info = nonstd::nullopt;
return;
}
- if (tc->get_selection() > tc->get_inner_height()) {
- if (this->ttt_top_time.tv_sec != 0) {
- this->row_for_time(this->ttt_top_time) |
- [tc](auto new_top) { tc->set_selection(new_top); };
- }
- return;
+ if (this->ttt_top_row_info) {
+ this->row_for(this->ttt_top_row_info.value()) |
+ [tc](auto new_top) { tc->set_selection(new_top); };
}
- this->time_for_row(tc->get_selection()) | [this, tc](auto top_time) {
- if (top_time != this->ttt_top_time) {
- if (this->ttt_top_time.tv_sec != 0) {
- this->row_for_time(this->ttt_top_time) |
- [tc](auto new_top) { tc->set_selection(new_top); };
- }
- this->time_for_row(tc->get_selection()) |
- [this](auto new_top_time) {
- this->ttt_top_time = new_top_time;
- };
- }
- };
}
template class bookmark_vector<vis_line_t>;
bool
-empty_filter::matches(const logfile& lf,
- logfile::const_iterator ll,
+empty_filter::matches(nonstd::optional<line_source> ls,
const shared_buffer_ref& line)
{
return false;
diff --git a/src/textview_curses.hh b/src/textview_curses.hh
index 1fea398..4f80a01 100644
--- a/src/textview_curses.hh
+++ b/src/textview_curses.hh
@@ -43,6 +43,7 @@
#include "highlighter.hh"
#include "listview_curses.hh"
#include "lnav_config_fwd.hh"
+#include "log_accel.hh"
#include "logfile_fwd.hh"
#include "ring_span.hh"
#include "text_format.hh"
@@ -88,13 +89,8 @@ enum class filter_lang_t : int {
class text_filter {
public:
typedef enum {
- MAYBE,
INCLUDE,
EXCLUDE,
-
- LFT__MAX,
-
- LFT__MASK = (MAYBE | INCLUDE | EXCLUDE)
} type_t;
text_filter(type_t type, filter_lang_t lang, std::string id, size_t index)
@@ -123,8 +119,12 @@ public:
void end_of_message(logfile_filter_state& lfs);
- virtual bool matches(const logfile& lf,
- logfile_const_iterator ll,
+ struct line_source {
+ const logfile& ls_file;
+ logfile_const_iterator ls_line;
+ };
+
+ virtual bool matches(nonstd::optional<line_source> ls,
const shared_buffer_ref& line)
= 0;
@@ -149,13 +149,44 @@ public:
{
}
- bool matches(const logfile& lf,
- logfile_const_iterator ll,
+ bool matches(nonstd::optional<line_source> ls,
const shared_buffer_ref& line) override;
std::string to_command() const override;
};
+class pcre_filter : public text_filter {
+public:
+ pcre_filter(type_t type,
+ const std::string& id,
+ size_t index,
+ std::shared_ptr<lnav::pcre2pp::code> code)
+ : text_filter(type, filter_lang_t::REGEX, id, index),
+ pf_pcre(std::move(code))
+ {
+ }
+
+ ~pcre_filter() override = default;
+
+ bool matches(nonstd::optional<line_source> ls,
+ const shared_buffer_ref& line) override
+ {
+ return this->pf_pcre->find_in(line.to_string_fragment())
+ .ignore_error()
+ .has_value();
+ }
+
+ std::string to_command() const override
+ {
+ return (this->lf_type == text_filter::INCLUDE ? "filter-in "
+ : "filter-out ")
+ + this->lf_id;
+ }
+
+protected:
+ std::shared_ptr<lnav::pcre2pp::code> pf_pcre;
+};
+
class filter_stack {
public:
using iterator = std::vector<std::shared_ptr<text_filter>>::iterator;
@@ -219,22 +250,69 @@ private:
class text_time_translator {
public:
+ struct row_info {
+ struct timeval ri_time {
+ 0, 0
+ };
+ int64_t ri_id{-1};
+ };
+
virtual ~text_time_translator() = default;
virtual nonstd::optional<vis_line_t> row_for_time(
struct timeval time_bucket)
= 0;
- virtual nonstd::optional<struct timeval> time_for_row(vis_line_t row) = 0;
+ virtual nonstd::optional<vis_line_t> row_for(const row_info& ri)
+ {
+ return this->row_for_time(ri.ri_time);
+ }
- void scroll_invoked(textview_curses* tc);
+ virtual nonstd::optional<row_info> time_for_row(vis_line_t row) = 0;
void data_reloaded(textview_curses* tc);
+ void ttt_scroll_invoked(textview_curses* tc);
+
protected:
- struct timeval ttt_top_time {
- 0, 0
- };
+ nonstd::optional<row_info> ttt_top_row_info;
+};
+
+class text_accel_source {
+public:
+ virtual ~text_accel_source() = default;
+
+ virtual log_accel::direction_t get_line_accel_direction(vis_line_t vl);
+
+ void toggle_time_offset()
+ {
+ this->tas_display_time_offset = !this->tas_display_time_offset;
+ this->text_accel_display_changed();
+ }
+
+ void set_time_offset(bool enabled)
+ {
+ if (this->tas_display_time_offset != enabled) {
+ this->tas_display_time_offset = enabled;
+ this->text_accel_display_changed();
+ }
+ }
+
+ bool is_time_offset_enabled() const
+ {
+ return this->tas_display_time_offset;
+ }
+
+ virtual bool is_time_offset_supported() const { return true; }
+
+ virtual logline* text_accel_get_line(vis_line_t vl) = 0;
+
+ std::string get_time_offset_for_line(textview_curses& tc, vis_line_t vl);
+
+protected:
+ virtual void text_accel_display_changed() {}
+
+ bool tas_display_time_offset{false};
};
class text_anchors {
@@ -246,6 +324,17 @@ public:
virtual nonstd::optional<vis_line_t> row_for_anchor(const std::string& id)
= 0;
+ enum class direction {
+ prev,
+ next,
+ };
+
+ virtual nonstd::optional<vis_line_t> adjacent_anchor(vis_line_t vl,
+ direction dir)
+ {
+ return nonstd::nullopt;
+ }
+
virtual nonstd::optional<std::string> anchor_for_row(vis_line_t vl) = 0;
virtual std::unordered_set<std::string> get_anchors() = 0;
@@ -296,7 +385,7 @@ public:
{
}
- void register_view(textview_curses* tc) { this->tss_view = tc; }
+ virtual void register_view(textview_curses* tc) { this->tss_view = tc; }
/**
* @return The total number of lines available from the source.
@@ -417,6 +506,8 @@ public:
virtual void quiesce() {}
+ virtual void scroll_invoked(textview_curses* tc);
+
bool tss_supports_filtering{false};
bool tss_apply_filters{true};
@@ -460,9 +551,10 @@ class text_delegate {
public:
virtual ~text_delegate() = default;
- virtual void text_overlay(textview_curses& tc) {}
-
- virtual bool text_handle_mouse(textview_curses& tc, mouse_event& me)
+ virtual bool text_handle_mouse(
+ textview_curses& tc,
+ const listview_curses::display_line_content_t&,
+ mouse_event& me)
{
return false;
}
@@ -485,6 +577,7 @@ public:
const static bookmark_type_t BM_USER_EXPR;
const static bookmark_type_t BM_SEARCH;
const static bookmark_type_t BM_META;
+ const static bookmark_type_t BM_PARTITION;
textview_curses();
@@ -516,6 +609,12 @@ public:
text_sub_source* get_sub_source() const { return this->tc_sub_source; }
+ textview_curses& set_supports_marks(bool m)
+ {
+ this->tc_supports_marks = m;
+ return *this;
+ }
+
textview_curses& set_delegate(std::shared_ptr<text_delegate> del)
{
this->tc_delegate = del;
@@ -634,14 +733,6 @@ public:
void reload_data();
- void do_update()
- {
- this->listview_curses::do_update();
- if (this->tc_delegate != nullptr) {
- this->tc_delegate->text_overlay(*this);
- }
- }
-
bool toggle_hide_fields()
{
bool retval = this->tc_hide_fields;
@@ -653,6 +744,14 @@ public:
bool get_hide_fields() const { return this->tc_hide_fields; }
+ void set_hide_fields(bool val)
+ {
+ if (this->tc_hide_fields != val) {
+ this->tc_hide_fields = val;
+ this->set_needs_update();
+ }
+ }
+
void execute_search(const std::string& regex_orig);
void redo_search();
@@ -687,18 +786,7 @@ public:
void revert_search() { this->execute_search(this->tc_previous_search); }
- void invoke_scroll()
- {
- if (this->tc_sub_source != nullptr) {
- auto ttt = dynamic_cast<text_time_translator*>(this->tc_sub_source);
-
- if (ttt != nullptr) {
- ttt->scroll_invoked(this);
- }
- }
-
- listview_curses::invoke_scroll();
- }
+ void invoke_scroll();
textview_curses& set_reload_config_delegate(
std::function<void(textview_curses&)> func)
@@ -713,6 +801,19 @@ public:
std::function<void(textview_curses&)> tc_state_event_handler;
nonstd::optional<role_t> tc_cursor_role;
+ nonstd::optional<role_t> tc_disabled_cursor_role;
+
+ struct selected_text_info {
+ int sti_x;
+ int64_t sti_line;
+ line_range sti_range;
+ std::string sti_value;
+ };
+
+ nonstd::optional<selected_text_info> tc_selected_text;
+ bool tc_text_selection_active{false};
+ display_line_content_t tc_press_line;
+ int tc_press_left{0};
protected:
class grep_highlighter {
@@ -760,11 +861,11 @@ protected:
highlight_map_t tc_highlights;
std::set<highlight_source_t> tc_disabled_highlights;
- vis_line_t tc_selection_start{-1_vl};
- vis_line_t tc_selection_last{-1_vl};
- bool tc_selection_cleared{false};
+ nonstd::optional<vis_line_t> tc_selection_start;
+ mouse_event tc_press_event;
bool tc_hide_fields{true};
bool tc_paused{false};
+ bool tc_supports_marks{false};
std::string tc_current_search;
std::string tc_previous_search;
diff --git a/src/themes/default-theme.json b/src/themes/default-theme.json
index 5448ed1..a5f8569 100644
--- a/src/themes/default-theme.json
+++ b/src/themes/default-theme.json
@@ -11,18 +11,24 @@
"color": "Silver",
"background-color": "Black"
},
+ "selected-text": {
+ "background-color": "DarkCyan"
+ },
"identifier": {
"background-color": "",
"color": "semantic()"
},
"alt-text": {
- "color": "Silver",
- "bold": true
+ "background-color": "#262626"
},
"ok": {
"color": "Green",
"bold": true
},
+ "info": {
+ "color": "Maroon",
+ "bold": true
+ },
"error": {
"color": "Red",
"bold": true
@@ -36,11 +42,15 @@
"bold": true
},
"cursor-line": {
- "color": "Cyan",
+ "color": "Cyan1",
"background-color": "Red",
"bold": true,
"underline": true
},
+ "disabled-cursor-line": {
+ "color": "Cyan1",
+ "background-color": "#5f005f"
+ },
"adjusted-time": {
"color": "Maroon"
},
@@ -50,6 +60,9 @@
"offset-time": {
"color": "Teal"
},
+ "file-offset": {
+ "color": "Silver"
+ },
"invalid-msg": {
"color": "Yellow"
},
@@ -87,16 +100,62 @@
"h6": {
"underline": true
},
+ "hr": {
+ "color": "#444"
+ },
+ "hyperlink": {
+ "underline": true
+ },
"list-glyph": {
"color": "Yellow"
},
"breadcrumb": {
+ "color": "Teal",
+ "bold": true
+ },
+ "table-border": {
+ "color": "#444"
+ },
+ "table-header": {
+ "bold": true
+ },
+ "quote-border": {
+ "color": "#666",
+ "background-color": "#444"
+ },
+ "quoted-text": {
+ "background-color": "#444"
+ },
+ "footnote-border": {
+ "color": "Blue",
+ "background-color": "#444"
+ },
+ "footnote-text": {
+ "color": "#eee",
+ "background-color": "#444"
+ },
+ "snippet-border": {
"color": "Teal"
+ },
+ "indent-guide": {
+ "color": "#444"
}
},
"syntax-styles": {
+ "inline-code": {
+ "color": "Red",
+ "background-color": "#121212"
+ },
+ "quoted-code": {
+ "color": "Silver",
+ "background-color": "#121212"
+ },
+ "code-border": {
+ "color": "#444",
+ "background-color": "#121212"
+ },
"keyword": {
- "color": "Blue"
+ "color": "#00f"
},
"string": {
"color": "Green",
@@ -130,19 +189,37 @@
"color": "Maroon"
},
"spectrogram-low": {
- "background-color": "$green"
+ "background-color": "Green"
},
"spectrogram-medium": {
- "background-color": "$yellow"
+ "background-color": "Yellow"
},
"spectrogram-high": {
- "background-color": "$red"
+ "background-color": "Red"
},
"file": {
"color": "Blue"
},
+ "null": {
+ "color": "Silver"
+ },
+ "ascii-control": {
+ "color": "Green"
+ },
+ "non-ascii": {
+ "color": "Yellow"
+ },
"number": {
"bold": true
+ },
+ "function": {
+ "color": "Cyan1"
+ },
+ "separators-references-accessors": {
+ "color": "Silver"
+ },
+ "type": {
+ "color": "Blue"
}
},
"status-styles": {
diff --git a/src/themes/dracula.json b/src/themes/dracula.json
new file mode 100644
index 0000000..77cfeb5
--- /dev/null
+++ b/src/themes/dracula.json
@@ -0,0 +1,312 @@
+{
+ "$schema": "https://lnav.org/schemas/config-v1.schema.json",
+ "ui": {
+ "theme-defs": {
+ "dracula": {
+ "vars": {
+ "black": "#282A36",
+ "red": "#FF5555",
+ "green": "#50FA7B",
+ "yellow": "#F1FA8C",
+ "blue": "#BD93F9",
+ "magenta": "#FF79C6",
+ "cyan": "#8BE9FD",
+ "white": "#F8F8F2",
+ "orange": "#FFB86C",
+ "purple": "#BD93F9",
+ "pink": "#FF79C6",
+ "semantic_highlight_color": "semantic()"
+ },
+ "styles": {
+ "identifier": {
+ "color": "semantic()"
+ },
+ "text": {
+ "color": "#f6f6f6",
+ "background-color": "$black"
+ },
+ "selected-text": {
+ "background-color": "$cyan"
+ },
+ "alt-text": {
+ "background-color": "#1c1c1c"
+ },
+ "ok": {
+ "color": "$green",
+ "bold": true
+ },
+ "info": {
+ "color": "$magenta",
+ "bold": true
+ },
+ "error": {
+ "color": "$red",
+ "bold": true
+ },
+ "warning": {
+ "color": "$yellow",
+ "bold": true
+ },
+ "hidden": {
+ "color": "$yellow",
+ "bold": true
+ },
+ "cursor-line": {
+ "color": "$cyan",
+ "background-color": "#44475A",
+ "bold": true
+ },
+ "disabled-cursor-line": {
+ "color": "$cyan",
+ "background-color": "#2a2c38"
+ },
+ "adjusted-time": {
+ "color": "$magenta"
+ },
+ "skewed-time": {
+ "color": "$yellow"
+ },
+ "offset-time": {
+ "color": "$cyan"
+ },
+ "file-offset": {
+ "color": "#888"
+ },
+ "invalid-msg": {
+ "color": "$yellow"
+ },
+ "focused": {
+ "color": "$black",
+ "background-color": "$white"
+ },
+ "disabled-focused": {
+ "color": "$white",
+ "background-color": "#333"
+ },
+ "popup": {
+ "color": "$black",
+ "background-color": "$cyan"
+ },
+ "scrollbar": {
+ "color": "$black",
+ "background-color": "#888"
+ },
+ "h1": {
+ "color": "$purple",
+ "bold": true
+ },
+ "h2": {
+ "color": "$purple",
+ "underline": true
+ },
+ "h3": {
+ "color": "$purple"
+ },
+ "h4": {
+ "underline": true
+ },
+ "h5": {
+ "underline": true
+ },
+ "h6": {
+ "underline": true
+ },
+ "hr": {
+ "color": "#6272A4"
+ },
+ "hyperlink": {
+ "underline": true
+ },
+ "list-glyph": {
+ "color": "$cyan"
+ },
+ "breadcrumb": {
+ "color": "#99a",
+ "bold": true
+ },
+ "table-border": {
+ "color": "#444"
+ },
+ "table-header": {
+ "bold": true
+ },
+ "quote-border": {
+ "color": "#666",
+ "background-color": "#444"
+ },
+ "quoted-text": {
+ "color": "$yellow",
+ "background-color": "#444"
+ },
+ "footnote-border": {
+ "color": "$blue",
+ "background-color": "#444"
+ },
+ "footnote-text": {
+ "color": "$cyan",
+ "background-color": "#444"
+ },
+ "snippet-border": {
+ "color": "$cyan"
+ },
+ "indent-guide": {
+ "color": "#444"
+ }
+ },
+ "syntax-styles": {
+ "inline-code": {
+ "color": "$green",
+ "background-color": "#121212"
+ },
+ "quoted-code": {
+ "color": "$orange",
+ "background-color": "#121212"
+ },
+ "code-border": {
+ "color": "#444",
+ "background-color": "#121212"
+ },
+ "keyword": {
+ "color": "$pink",
+ "bold": true
+ },
+ "string": {
+ "color": "$yellow",
+ "bold": true
+ },
+ "comment": {
+ "color": "#6272A4"
+ },
+ "doc-directive": {
+ "color": "$pink"
+ },
+ "variable": {
+ "color": "$orange"
+ },
+ "symbol": {
+ "color": "#78dce8"
+ },
+ "re-special": {
+ "color": "$cyan"
+ },
+ "re-repeat": {
+ "color": "$yellow"
+ },
+ "diff-delete": {
+ "color": "#f00"
+ },
+ "diff-add": {
+ "color": "#0f0"
+ },
+ "diff-section": {
+ "color": "#6272A4"
+ },
+ "spectrogram-low": {
+ "background-color": "$green"
+ },
+ "spectrogram-medium": {
+ "background-color": "$yellow"
+ },
+ "spectrogram-high": {
+ "background-color": "$red"
+ },
+ "file": {
+ "color": "$blue"
+ },
+ "null": {
+ "color": "#888"
+ },
+ "ascii-control": {
+ "color": "$green"
+ },
+ "non-ascii": {
+ "color": "$yellow"
+ },
+ "number": {
+ "bold": true
+ },
+ "function": {
+ "color": "$green"
+ },
+ "separators-references-accessors": {
+ "color": "$pink"
+ },
+ "type": {
+ "color": "$cyan"
+ }
+ },
+ "status-styles": {
+ "disabled-title": {
+ "color": "#5394ec",
+ "background-color": "#353535",
+ "bold": true
+ },
+ "title": {
+ "color": "#f6f6f6",
+ "background-color": "#5394ec",
+ "bold": true
+ },
+ "subtitle": {
+ "color": "#555",
+ "background-color": "#66d9ee",
+ "bold": true
+ },
+ "info": {
+ "color": "#aaa",
+ "background-color": "#2f2f2f"
+ },
+ "title-hotkey": {
+ "color": "$black",
+ "background-color": "#5394ec",
+ "underline": true
+ },
+ "hotkey": {
+ "color": "#fff",
+ "underline": true
+ },
+ "text": {
+ "color": "#f6f6f6",
+ "background-color": "#353535"
+ },
+ "warn": {
+ "color": "$yellow",
+ "background-color": "#353535"
+ },
+ "alert": {
+ "color": "$red",
+ "background-color": "#353535"
+ },
+ "active": {
+ "color": "$green",
+ "background-color": "#353535"
+ },
+ "inactive": {
+ "color": "#555",
+ "background-color": "#2f2f2f"
+ },
+ "inactive-alert": {
+ "color": "$red",
+ "background-color": "#2f2f2f"
+ },
+ "suggestion": {
+ "color": "#888"
+ }
+ },
+ "log-level-styles": {
+ "warning": {
+ "color": "$yellow"
+ },
+ "error": {
+ "color": "$red"
+ },
+ "critical": {
+ "color": "$red"
+ },
+ "fatal": {
+ "color": "$red"
+ }
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/src/themes/eldar.json b/src/themes/eldar.json
index f46b6cf..3ba9f9f 100644
--- a/src/themes/eldar.json
+++ b/src/themes/eldar.json
@@ -12,6 +12,7 @@
"cyan": "#34e2e2",
"green": "#8ae234",
"white": "#ffffff",
+ "orange": "#ef8c29",
"semantic_highlight_color": "semantic()"
},
"styles": {
@@ -23,15 +24,20 @@
"color": "$white",
"background-color": ""
},
+ "selected-text": {
+ "background-color": "$cyan"
+ },
"alt-text": {
- "color": "$white",
- "background-color": "",
"bold": true
},
"ok": {
"color": "$green",
"bold": true
},
+ "info": {
+ "color": "$magenta",
+ "bold": true
+ },
"error": {
"color": "$red",
"bold": true
@@ -50,6 +56,10 @@
"bold": true,
"underline": true
},
+ "disabled-cursor-line": {
+ "color": "$cyan",
+ "background-color": "#5f005f"
+ },
"adjusted-time": {
"color": "$magenta"
},
@@ -59,9 +69,20 @@
"offset-time": {
"color": "$cyan"
},
+ "file-offset": {
+ "color": "#888"
+ },
"invalid-msg": {
"color": "$yellow"
},
+ "focused": {
+ "color": "$black",
+ "background-color": "$white"
+ },
+ "disabled-focused": {
+ "color": "$white",
+ "background-color": "#333"
+ },
"popup": {
"color": "$black",
"background-color": "Grey37"
@@ -87,9 +108,61 @@
},
"h6": {
"underline": true
+ },
+ "hr": {
+ "color": "#444"
+ },
+ "hyperlink": {
+ "underline": true
+ },
+ "list-glyph": {
+ "color": "$yellow"
+ },
+ "breadcrumb": {
+ "color": "#448",
+ "bold": true
+ },
+ "table-border": {
+ "color": "#444"
+ },
+ "table-header": {
+ "bold": true
+ },
+ "quote-border": {
+ "color": "#666",
+ "background-color": "#444"
+ },
+ "quoted-text": {
+ "background-color": "#444"
+ },
+ "footnote-border": {
+ "color": "$blue",
+ "background-color": "#444"
+ },
+ "footnote-text": {
+ "color": "#eee",
+ "background-color": "#444"
+ },
+ "snippet-border": {
+ "color": "$cyan"
+ },
+ "indent-guide": {
+ "color": "#444"
}
},
"syntax-styles": {
+ "inline-code": {
+ "color": "$red",
+ "background-color": "#121212"
+ },
+ "quoted-code": {
+ "color": "#eee",
+ "background-color": "#121212"
+ },
+ "code-border": {
+ "color": "#444",
+ "background-color": "#121212"
+ },
"keyword": {
"color": "$yellow"
},
@@ -138,9 +211,32 @@
},
"file": {
"color": "$blue"
+ },
+ "null": {
+ "color": "#888"
+ },
+ "ascii-control": {
+ "color": "$green"
+ },
+ "non-ascii": {
+ "color": "$yellow"
+ },
+ "function": {
+ "color": "$cyan"
+ },
+ "separators-references-accessors": {
+ "color": "$red"
+ },
+ "type": {
+ "color": "$blue"
}
},
"status-styles": {
+ "disabled-title": {
+ "color": "#5394ec",
+ "background-color": "#353535",
+ "bold": true
+ },
"title": {
"color": "$black",
"background-color": "$blue",
@@ -171,6 +267,15 @@
"color": "$black",
"background-color": "Grey"
},
+ "title-hotkey": {
+ "color": "$black",
+ "background-color": "#5394ec",
+ "underline": true
+ },
+ "hotkey": {
+ "color": "#fff",
+ "underline": true
+ },
"inactive": {
"color": "$black",
"background-color": "Grey"
@@ -178,6 +283,9 @@
"inactive-alert": {
"color": "$red",
"background-color": "Grey"
+ },
+ "suggestion": {
+ "color": "#888"
}
},
"log-level-styles": {
diff --git a/src/themes/grayscale.json b/src/themes/grayscale.json
index 4dcbe15..b2a4f9c 100644
--- a/src/themes/grayscale.json
+++ b/src/themes/grayscale.json
@@ -25,14 +25,16 @@
"background-color": ""
},
"alt-text": {
- "color": "",
- "background-color": "",
"bold": true
},
"ok": {
"color": "$green",
"bold": true
},
+ "info": {
+ "color": "#aaa",
+ "bold": true
+ },
"error": {
"color": "$red",
"bold": true
@@ -46,11 +48,15 @@
"bold": true
},
"cursor-line": {
- "color": "$cyan",
- "background-color": "$red",
+ "color": "#fff",
+ "background-color": "#555",
"bold": true,
"underline": true
},
+ "disabled-cursor-line": {
+ "color": "#888",
+ "background-color": "#333"
+ },
"adjusted-time": {
"color": "$magenta"
},
@@ -60,6 +66,9 @@
"offset-time": {
"color": "$cyan"
},
+ "file-offset": {
+ "color": "#888"
+ },
"invalid-msg": {
"color": "$yellow"
},
@@ -96,6 +105,66 @@
},
"h6": {
"underline": true
+ },
+ "hr": {
+ "color": "#444"
+ },
+ "hyperlink": {
+ "underline": true
+ },
+ "list-glyph": {
+ "color": "#444"
+ },
+ "breadcrumb": {
+ "color": "#999",
+ "bold": true
+ },
+ "table-border": {
+ "color": "#444"
+ },
+ "table-header": {
+ "bold": true
+ },
+ "quote-border": {
+ "color": "#666",
+ "background-color": "#444"
+ },
+ "quoted-text": {
+ "background-color": "#444"
+ },
+ "footnote-border": {
+ "color": "#888",
+ "background-color": "#444"
+ },
+ "footnote-text": {
+ "color": "#eee",
+ "background-color": "#444"
+ },
+ "snippet-border": {
+ "color": "#888"
+ },
+ "indent-guide": {
+ "color": "#444"
+ }
+ },
+ "syntax-styles": {
+ "comment": {
+ "color": "#888"
+ },
+ "doc-directive": {
+ "color": "#aaa"
+ },
+ "null": {
+ "color": "#888"
+ },
+ "ascii-control": {
+ "color": "#aaa"
+ },
+ "non-ascii": {
+ "color": "#ccc"
+ },
+ "number": {
+ "bold": true
}
},
"status-styles": {
@@ -150,6 +219,9 @@
"inactive-alert": {
"color": "$red",
"background-color": "#2f2f2f"
+ },
+ "suggestion": {
+ "color": "#888"
}
},
"log-level-styles": {
diff --git a/src/themes/monocai.json b/src/themes/monocai.json
index 6edb5ab..5b44087 100644
--- a/src/themes/monocai.json
+++ b/src/themes/monocai.json
@@ -12,6 +12,7 @@
"magenta": "#ae81ff",
"cyan": "#66d9ee",
"white": "#808080",
+ "orange": "#fc9867",
"semantic_highlight_color": "semantic()"
},
"styles": {
@@ -22,10 +23,11 @@
"color": "#f6f6f6",
"background-color": "$black"
},
+ "selected-text": {
+ "background-color": "$cyan"
+ },
"alt-text": {
- "color": "#f6f6f6",
- "background-color": "$black",
- "bold": true
+ "background-color": "#1c1c1c"
},
"ok": {
"color": "$green",
@@ -49,9 +51,12 @@
},
"cursor-line": {
"color": "$cyan",
- "background-color": "$red",
- "bold": true,
- "underline": true
+ "background-color": "#7f005f",
+ "bold": true
+ },
+ "disabled-cursor-line": {
+ "color": "$cyan",
+ "background-color": "#5f005f"
},
"adjusted-time": {
"color": "$magenta"
@@ -62,6 +67,9 @@
"offset-time": {
"color": "$cyan"
},
+ "file-offset": {
+ "color": "#888"
+ },
"invalid-msg": {
"color": "$yellow"
},
@@ -111,7 +119,8 @@
"color": "$yellow"
},
"breadcrumb": {
- "color": "#99a"
+ "color": "$orange",
+ "bold": true
},
"table-border": {
"color": "#444"
@@ -136,9 +145,16 @@
},
"snippet-border": {
"color": "$cyan"
+ },
+ "indent-guide": {
+ "color": "#444"
}
},
"syntax-styles": {
+ "inline-code": {
+ "color": "$red",
+ "background-color": "#121212"
+ },
"quoted-code": {
"color": "#eee",
"background-color": "#121212"
@@ -194,8 +210,26 @@
"file": {
"color": "$blue"
},
+ "null": {
+ "color": "#888"
+ },
+ "ascii-control": {
+ "color": "$green"
+ },
+ "non-ascii": {
+ "color": "$yellow"
+ },
"number": {
"bold": true
+ },
+ "function": {
+ "color": "$cyan"
+ },
+ "separators-references-accessors": {
+ "color": "$red"
+ },
+ "type": {
+ "color": "$blue"
}
},
"status-styles": {
@@ -250,6 +284,9 @@
"inactive-alert": {
"color": "$red",
"background-color": "#2f2f2f"
+ },
+ "suggestion": {
+ "color": "#888"
}
},
"log-level-styles": {
diff --git a/src/themes/night-owl.json b/src/themes/night-owl.json
index a4210c9..22e2d61 100644
--- a/src/themes/night-owl.json
+++ b/src/themes/night-owl.json
@@ -23,15 +23,20 @@
"color": "#d6deeb",
"background-color": "#011627"
},
+ "selected-text": {
+ "background-color": "$cyan"
+ },
"alt-text": {
- "color": "#d6deeb",
- "background-color": "#011627",
- "bold": true
+ "background-color": "#1c1c1c"
},
"ok": {
"color": "$green",
"bold": true
},
+ "info": {
+ "color": "$magenta",
+ "bold": true
+ },
"error": {
"color": "#ef5350",
"bold": true
@@ -50,6 +55,10 @@
"bold": true,
"underline": true
},
+ "disabled-cursor-line": {
+ "color": "$cyan",
+ "background-color": "#5f005f"
+ },
"adjusted-time": {
"color": "$magenta"
},
@@ -59,6 +68,9 @@
"offset-time": {
"color": "$cyan"
},
+ "file-offset": {
+ "color": "#888"
+ },
"invalid-msg": {
"color": "$yellow"
},
@@ -95,9 +107,61 @@
},
"h6": {
"underline": true
+ },
+ "hr": {
+ "color": "#444"
+ },
+ "hyperlink": {
+ "underline": true
+ },
+ "list-glyph": {
+ "color": "$yellow"
+ },
+ "breadcrumb": {
+ "color": "#2d5a80",
+ "bold": true
+ },
+ "table-border": {
+ "color": "#444"
+ },
+ "table-header": {
+ "bold": true
+ },
+ "quote-border": {
+ "color": "#666",
+ "background-color": "#444"
+ },
+ "quoted-text": {
+ "background-color": "#444"
+ },
+ "footnote-border": {
+ "color": "$blue",
+ "background-color": "#444"
+ },
+ "footnote-text": {
+ "color": "#eee",
+ "background-color": "#444"
+ },
+ "snippet-border": {
+ "color": "$cyan"
+ },
+ "indent-guide": {
+ "color": "#444"
}
},
"syntax-styles": {
+ "inline-code": {
+ "color": "$red",
+ "background-color": "#222"
+ },
+ "quoted-code": {
+ "color": "#eee",
+ "background-color": "#222"
+ },
+ "code-border": {
+ "color": "#444",
+ "background-color": "#222"
+ },
"keyword": {
"color": "#c792ea"
},
@@ -146,6 +210,24 @@
},
"file": {
"color": "#82aaff"
+ },
+ "null": {
+ "color": "#888"
+ },
+ "ascii-control": {
+ "color": "$green"
+ },
+ "non-ascii": {
+ "color": "$yellow"
+ },
+ "function": {
+ "color": "$cyan"
+ },
+ "separators-references-accessors": {
+ "color": "$red"
+ },
+ "type": {
+ "color": "$blue"
}
},
"status-styles": {
@@ -201,6 +283,9 @@
"background-color": "#2d5a80",
"bold": true,
"underline": true
+ },
+ "suggestion": {
+ "color": "#888"
}
},
"log-level-styles": {
diff --git a/src/themes/solarized-dark.json b/src/themes/solarized-dark.json
index 1590de0..f2d29a9 100644
--- a/src/themes/solarized-dark.json
+++ b/src/themes/solarized-dark.json
@@ -32,15 +32,20 @@
"color": "$base0",
"background-color": "$base03"
},
+ "selected-text": {
+ "background-color": "$cyan"
+ },
"alt-text": {
- "color": "$base0",
- "background-color": "$base03",
- "bold": true
+ "background-color": "$base02"
},
"ok": {
"color": "$green",
"bold": true
},
+ "info": {
+ "color": "$magenta",
+ "bold": true
+ },
"error": {
"color": "$red",
"bold": true
@@ -59,6 +64,10 @@
"bold": true,
"underline": true
},
+ "disabled-cursor-line": {
+ "color": "$cyan",
+ "background-color": "#5f005f"
+ },
"adjusted-time": {
"color": "$magenta"
},
@@ -68,6 +77,9 @@
"offset-time": {
"color": "$cyan"
},
+ "file-offset": {
+ "color": "#888"
+ },
"invalid-msg": {
"color": "$yellow"
},
@@ -104,9 +116,61 @@
},
"h6": {
"underline": true
+ },
+ "hr": {
+ "color": "#444"
+ },
+ "hyperlink": {
+ "underline": true
+ },
+ "list-glyph": {
+ "color": "$yellow"
+ },
+ "breadcrumb": {
+ "color": "#99a",
+ "bold": true
+ },
+ "table-border": {
+ "color": "#444"
+ },
+ "table-header": {
+ "bold": true
+ },
+ "quote-border": {
+ "color": "#666",
+ "background-color": "#444"
+ },
+ "quoted-text": {
+ "background-color": "#444"
+ },
+ "footnote-border": {
+ "color": "$blue",
+ "background-color": "#444"
+ },
+ "footnote-text": {
+ "color": "#eee",
+ "background-color": "#444"
+ },
+ "snippet-border": {
+ "color": "$cyan"
+ },
+ "indent-guide": {
+ "color": "#444"
}
},
"syntax-styles": {
+ "inline-code": {
+ "color": "$red",
+ "background-color": "#121212"
+ },
+ "quoted-code": {
+ "color": "#eee",
+ "background-color": "#121212"
+ },
+ "code-border": {
+ "color": "#444",
+ "background-color": "#121212"
+ },
"keyword": {
"color": "$yellow"
},
@@ -152,9 +216,35 @@
},
"file": {
"color": "$blue"
+ },
+ "null": {
+ "color": "#888"
+ },
+ "ascii-control": {
+ "color": "$green"
+ },
+ "non-ascii": {
+ "color": "$yellow"
+ },
+ "number": {
+ "bold": true
+ },
+ "function": {
+ "color": "$cyan"
+ },
+ "separators-references-accessors": {
+ "color": "$red"
+ },
+ "type": {
+ "color": "$blue"
}
},
"status-styles": {
+ "disabled-title": {
+ "color": "$base01",
+ "background-color": "$base03",
+ "bold": true
+ },
"title": {
"color": "$base02",
"background-color": "$blue",
@@ -185,6 +275,15 @@
"color": "$base1",
"background-color": "$base02"
},
+ "title-hotkey": {
+ "color": "$black",
+ "background-color": "#5394ec",
+ "underline": true
+ },
+ "hotkey": {
+ "color": "#fff",
+ "underline": true
+ },
"inactive": {
"color": "$base1",
"background-color": "$base02"
@@ -192,6 +291,9 @@
"inactive-alert": {
"color": "$red",
"background-color": "$base02"
+ },
+ "suggestion": {
+ "color": "$base02"
}
},
"log-level-styles": {
diff --git a/src/themes/solarized-light.json b/src/themes/solarized-light.json
index 3e7c575..081eed2 100644
--- a/src/themes/solarized-light.json
+++ b/src/themes/solarized-light.json
@@ -10,7 +10,7 @@
"base00": "#657b83",
"base0": "#839496",
"base1": "#93a1a1",
- "base2": "#eee8d5",
+ "base2": "#ededb0",
"base3": "#fdf6e3",
"black": "#002b36",
"yellow": "#b58900",
@@ -25,17 +25,17 @@
},
"styles": {
"identifier": {
- "background-color": "$base3",
"color": "semantic()"
},
"text": {
"color": "$base00",
"background-color": "$base3"
},
+ "selected-text": {
+ "background-color": "$cyan"
+ },
"alt-text": {
- "color": "$base00",
- "background-color": "$base3",
- "bold": true
+ "background-color": "$base2"
},
"ok": {
"color": "$green",
@@ -54,11 +54,15 @@
"bold": true
},
"cursor-line": {
- "color": "$cyan",
- "background-color": "$red",
+ "color": "$base0",
+ "background-color": "#fafa4a",
"bold": true,
"underline": true
},
+ "disabled-cursor-line": {
+ "color": "$cyan",
+ "background-color": "$yellow"
+ },
"adjusted-time": {
"color": "$magenta"
},
@@ -73,7 +77,7 @@
},
"popup": {
"color": "$base00",
- "background-color": "$base3"
+ "background-color": "$base2"
},
"scrollbar": {
"color": "$base3",
@@ -104,6 +108,46 @@
},
"h6": {
"underline": true
+ },
+ "hr": {
+ "color": "#444"
+ },
+ "hyperlink": {
+ "underline": true
+ },
+ "list-glyph": {
+ "color": "$yellow"
+ },
+ "breadcrumb": {
+ "color": "#99a",
+ "bold": true
+ },
+ "table-border": {
+ "color": "#444"
+ },
+ "table-header": {
+ "bold": true
+ },
+ "quote-border": {
+ "color": "#666",
+ "background-color": "#444"
+ },
+ "quoted-text": {
+ "background-color": "#444"
+ },
+ "footnote-border": {
+ "color": "$blue",
+ "background-color": "#444"
+ },
+ "footnote-text": {
+ "color": "#eee",
+ "background-color": "#444"
+ },
+ "snippet-border": {
+ "color": "$cyan"
+ },
+ "indent-guide": {
+ "color": "$base1"
}
},
"syntax-styles": {
@@ -157,7 +201,12 @@
"status-styles": {
"title": {
"color": "$base2",
- "background-color": "$base0",
+ "background-color": "$base00",
+ "bold": true
+ },
+ "disabled-title": {
+ "color": "$base2",
+ "background-color": "$base02",
"bold": true
},
"subtitle": {
@@ -192,6 +241,9 @@
"inactive-alert": {
"color": "$red",
"background-color": "$base03"
+ },
+ "suggestion": {
+ "color": "$base1"
}
},
"log-level-styles": {
diff --git a/src/themes/themes.am b/src/themes/themes.am
index 42eacb6..ca59b71 100644
--- a/src/themes/themes.am
+++ b/src/themes/themes.am
@@ -1,6 +1,7 @@
THEME_FILES = \
$(srcdir)/%reldir%/default-theme.json \
+ $(srcdir)/%reldir%/dracula.json \
$(srcdir)/%reldir%/eldar.json \
$(srcdir)/%reldir%/grayscale.json \
$(srcdir)/%reldir%/monocai.json \
diff --git a/src/third-party/ArenaAlloc/arenaalloc.h b/src/third-party/ArenaAlloc/arenaalloc.h
index dfd648d..fab4de0 100644
--- a/src/third-party/ArenaAlloc/arenaalloc.h
+++ b/src/third-party/ArenaAlloc/arenaalloc.h
@@ -1,11 +1,11 @@
// -*- c++ -*-
/******************************************************************************
* arenaalloc.h
- *
+ *
* Arena allocator based on the example logic provided by Nicolai Josuttis
* and available at http://www.josuttis.com/libbook/examples.html.
* This enhanced work is provided under the terms of the MIT license.
- *
+ *
*****************************************************************************/
#ifndef _ARENA_ALLOC_H
@@ -15,43 +15,40 @@
#include <memory>
#if __cplusplus >= 201103L
-#include <type_traits>
-#include <utility>
+# include <type_traits>
+# include <utility>
#endif
// Define macro ARENA_ALLOC_DEBUG to enable some tracing of the allocator
#include "arenaallocimpl.h"
-namespace ArenaAlloc
-{
-
- struct _newAllocatorImpl
- {
+namespace ArenaAlloc {
+
+struct _newAllocatorImpl {
// these two functions should be supported by a specialized
// allocator for shared memory or another source of specialized
// memory such as device mapped memory.
- void* allocate( size_t numBytes ) { return new char[ numBytes ]; }
- void deallocate( void* ptr ) { delete[]( (char*)ptr ); }
- };
-
- template <class T,
- class AllocatorImpl = _newAllocatorImpl,
- class MemblockImpl = _memblockimpl<AllocatorImpl> >
- class Alloc {
-
- private:
- MemblockImpl* m_impl;
-
- public:
+ void* allocate(size_t numBytes) { return new char[numBytes]; }
+ void deallocate(void* ptr) { delete[] ((char*) ptr); }
+};
+
+template<class T,
+ class AllocatorImpl = _newAllocatorImpl,
+ class MemblockImpl = _memblockimpl<AllocatorImpl> >
+class Alloc {
+private:
+ MemblockImpl* m_impl;
+
+public:
// type definitions
- typedef T value_type;
- typedef T* pointer;
+ typedef T value_type;
+ typedef T* pointer;
typedef const T* const_pointer;
- typedef T& reference;
+ typedef T& reference;
typedef const T& const_reference;
- typedef std::size_t size_type;
+ typedef std::size_t size_type;
typedef std::ptrdiff_t difference_type;
-
+
#if __cplusplus >= 201103L
// when containers are swapped, (i.e. vector.swap)
// swap the allocators also. This was not specified in c++98
@@ -64,123 +61,110 @@ namespace ArenaAlloc
typedef std::true_type propagate_on_container_swap;
// container moves should move the allocator also.
- typedef std::true_type propagate_on_container_move_assignment;
+ typedef std::true_type propagate_on_container_move_assignment;
#endif
-
+
// rebind allocator to type U
- template <class U>
+ template<class U>
struct rebind {
- typedef Alloc<U,AllocatorImpl,MemblockImpl> other;
+ typedef Alloc<U, AllocatorImpl, MemblockImpl> other;
};
-
+
// return address of values
- pointer address (reference value) const {
- return &value;
- }
- const_pointer address (const_reference value) const {
- return &value;
- }
+ pointer address(reference value) const { return &value; }
+ const_pointer address(const_reference value) const { return &value; }
- Alloc( std::size_t defaultSize = 32768, AllocatorImpl allocImpl = AllocatorImpl() ) throw():
- m_impl( MemblockImpl::create( defaultSize, allocImpl ) )
- {
- }
-
- Alloc(const Alloc& src) throw():
- m_impl( src.m_impl )
+ Alloc(std::size_t defaultSize = 32768,
+ AllocatorImpl allocImpl = AllocatorImpl()) throw()
+ : m_impl(MemblockImpl::create(defaultSize, allocImpl))
{
- m_impl->incrementRefCount();
}
-
- template <class U>
- Alloc (const Alloc<U,AllocatorImpl,MemblockImpl>& src) throw():
- m_impl( 0 )
+
+ Alloc(const Alloc& src) throw() : m_impl(src.m_impl)
{
- MemblockImpl::assign( src, m_impl );
- m_impl->incrementRefCount();
+ m_impl->incrementRefCount();
}
-
- ~Alloc() throw()
+
+ template<class U>
+ Alloc(const Alloc<U, AllocatorImpl, MemblockImpl>& src) throw() : m_impl(0)
{
- m_impl->decrementRefCount();
+ MemblockImpl::assign(src, m_impl);
+ m_impl->incrementRefCount();
}
+ ~Alloc() throw() { m_impl->decrementRefCount(); }
+
// return maximum number of elements that can be allocated
- size_type max_size () const throw()
+ size_type max_size() const throw()
{
- return std::numeric_limits<std::size_t>::max() / sizeof(T);
+ return std::numeric_limits<std::size_t>::max() / sizeof(T);
}
+ void reset() { m_impl->reset(); }
+
// allocate but don't initialize num elements of type T
- pointer allocate (size_type num, const void* = 0)
+ pointer allocate(size_type num, const void* = 0)
{
- return reinterpret_cast<pointer>( m_impl->allocate(num*sizeof(T)) );
+ return reinterpret_cast<pointer>(m_impl->allocate(num * sizeof(T)));
}
// initialize elements of allocated storage p with value value
#if __cplusplus >= 201103L
- // use c++11 style forwarding to construct the object
- template< typename P, typename... Args>
- void construct( P* obj, Args&&... args )
+ // use c++11 style forwarding to construct the object
+ template<typename P, typename... Args>
+ void construct(P* obj, Args&&... args)
{
- ::new((void*) obj ) P( std::forward<Args>( args )... );
+ ::new ((void*) obj) P(std::forward<Args>(args)...);
}
- template< typename P >
- void destroy( P* obj ) { obj->~P(); }
-
-#else
- void construct (pointer p, const T& value)
+ template<typename P>
+ void destroy(P* obj)
{
- new((void*)p)T(value);
+ obj->~P();
}
- void destroy (pointer p) { p->~T(); }
+
+#else
+ void construct(pointer p, const T& value) { new ((void*) p) T(value); }
+ void destroy(pointer p) { p->~T(); }
#endif
// deallocate storage p of deleted elements
- void deallocate (pointer p, size_type num)
- {
- m_impl->deallocate( p );
- }
-
- bool equals( const MemblockImpl * impl ) const
- {
- return impl == m_impl;
- }
-
- bool operator == ( const Alloc& t2 ) const
- {
- return m_impl == t2.m_impl;
- }
-
+ void deallocate(pointer p, size_type num) { m_impl->deallocate(p); }
+
+ bool equals(const MemblockImpl* impl) const { return impl == m_impl; }
+
+ bool operator==(const Alloc& t2) const { return m_impl == t2.m_impl; }
+
friend MemblockImpl;
-
- template< typename Other >
- bool operator == ( const Alloc< Other, AllocatorImpl, MemblockImpl >& t2 )
+
+ template<typename Other>
+ bool operator==(const Alloc<Other, AllocatorImpl, MemblockImpl>& t2)
{
- return t2.equals( m_impl );
+ return t2.equals(m_impl);
}
-
- template< typename Other >
- bool operator != ( const Alloc< Other, AllocatorImpl, MemblockImpl >& t2 )
+
+ template<typename Other>
+ bool operator!=(const Alloc<Other, AllocatorImpl, MemblockImpl>& t2)
{
- return !t2.equals( m_impl );
+ return !t2.equals(m_impl);
}
-
+
// These are extension functions not required for an stl allocator
size_t getNumAllocations() { return m_impl->getNumAllocations(); }
size_t getNumDeallocations() { return m_impl->getNumDeallocations(); }
- size_t getNumBytesAllocated() { return m_impl->getNumBytesAllocated(); }
- };
-
- template<typename A>
- template<typename T>
- void _memblockimpl<A>::assign( const Alloc<T,A, _memblockimpl<A> >& src, _memblockimpl<A> *& dest )
- {
- dest = const_cast<_memblockimpl<A>* >(src.m_impl);
- }
-
+ size_t getNumBytesAllocated() { return m_impl->getNumBytesAllocated(); }
+};
+
+template<typename A>
+template<typename T>
+void
+_memblockimpl<A>::assign(const Alloc<T, A, _memblockimpl<A> >& src,
+ _memblockimpl<A>*& dest)
+{
+ dest = const_cast<_memblockimpl<A>*>(src.m_impl);
}
+} // namespace ArenaAlloc
+
#endif
diff --git a/src/third-party/ArenaAlloc/arenaallocimpl.h b/src/third-party/ArenaAlloc/arenaallocimpl.h
index 879e0d2..39b9a17 100644
--- a/src/third-party/ArenaAlloc/arenaallocimpl.h
+++ b/src/third-party/ArenaAlloc/arenaallocimpl.h
@@ -1,7 +1,7 @@
// -*- c++ -*-
/******************************************************************************
** arenaallocimpl.h
- **
+ **
** Internal implementation types of the arena allocator
** MIT license
*****************************************************************************/
@@ -10,281 +10,300 @@
#define _ARENA_ALLOC_IMPL_H
#ifdef ARENA_ALLOC_DEBUG
-#include <stdio.h>
+# include <stdio.h>
#endif
#include <stdint.h>
-namespace ArenaAlloc
-{
+namespace ArenaAlloc {
- template< typename T, typename A, typename M >
- class Alloc;
-
- // internal structure for tracking memory blocks
- template < typename AllocImpl >
- struct _memblock
- {
+template<typename T, typename A, typename M>
+class Alloc;
+
+// internal structure for tracking memory blocks
+template<typename AllocImpl>
+struct _memblock {
// allocations are rounded up to a multiple of the size of this
- // struct to maintain proper alignment for any pointer and double
- // values stored in the allocation.
- // A future goal is to support even stricter alignment for example
- // to support cache alignment, special device dependent mappings,
- // or GPU ops.
- union _roundsize {
- double d;
- void* p;
- };
-
- _memblock* m_next{nullptr}; // blocks kept link listed for cleanup at end
- std::size_t m_bufferSize; // size of the buffer
- std::size_t m_index; // index of next allocatable byte in the block
- char* m_buffer; // pointer to large block to allocate from
-
- _memblock(std::size_t bufferSize, AllocImpl& allocImpl)
- : m_bufferSize(roundSize(bufferSize)), m_index(0),
- m_buffer(reinterpret_cast<char*>(allocImpl.allocate(
- bufferSize))) // this works b/c of order of decl
- {
- }
-
- std::size_t roundSize( std::size_t numBytes )
+ // struct to maintain proper alignment for any pointer and double
+ // values stored in the allocation.
+ // A future goal is to support even stricter alignment for example
+ // to support cache alignment, special device dependent mappings,
+ // or GPU ops.
+ union _roundsize {
+ double d;
+ void* p;
+ };
+
+ _memblock* m_next{nullptr}; // blocks kept link listed for cleanup at end
+ std::size_t m_bufferSize; // size of the buffer
+ std::size_t m_index; // index of next allocatable byte in the block
+ char* m_buffer; // pointer to large block to allocate from
+
+ _memblock(std::size_t bufferSize, AllocImpl& allocImpl)
+ : m_bufferSize(roundSize(bufferSize)), m_index(0),
+ m_buffer(reinterpret_cast<char*>(allocImpl.allocate(
+ bufferSize))) // this works b/c of order of decl
{
- // this is subject to overflow. calling logic should not permit
- // an attempt to allocate a really massive size.
- // i.e. an attempt to allocate 10s of terabytes should be an error
- return ( ( numBytes + sizeof( _roundsize ) - 1 ) /
- sizeof( _roundsize ) ) * sizeof( _roundsize );
}
- char * allocate( std::size_t numBytes )
+ std::size_t roundSize(std::size_t numBytes)
{
- std::size_t roundedSize = roundSize( numBytes );
- if( roundedSize + m_index > m_bufferSize )
- return 0;
-
- char * ptrToReturn = &m_buffer[ m_index ];
- m_index += roundedSize;
- return ptrToReturn;
+ // this is subject to overflow. calling logic should not permit
+ // an attempt to allocate a really massive size.
+ // i.e. an attempt to allocate 10s of terabytes should be an error
+ return ((numBytes + sizeof(_roundsize) - 1) / sizeof(_roundsize))
+ * sizeof(_roundsize);
}
-
- void dispose( AllocImpl& impl )
+
+ char* allocate(std::size_t numBytes)
{
- impl.deallocate( m_buffer );
+ std::size_t roundedSize = roundSize(numBytes);
+ if (roundedSize + m_index > m_bufferSize)
+ return 0;
+
+ char* ptrToReturn = &m_buffer[m_index];
+ m_index += roundedSize;
+ return ptrToReturn;
}
- ~_memblock()
- {
- }
- };
-
- template< typename AllocatorImpl, typename Derived >
- struct _memblockimplbase
- {
+ void reset() { this->m_index = 0; }
+
+ void dispose(AllocImpl& impl) { impl.deallocate(m_buffer); }
+
+ ~_memblock() {}
+};
+
+template<typename AllocatorImpl, typename Derived>
+struct _memblockimplbase {
AllocatorImpl m_alloc;
- std::size_t m_refCount; // when refs -> 0 delete this
+ std::size_t m_refCount; // when refs -> 0 delete this
std::size_t m_defaultSize;
-
- std::size_t m_numAllocate; // number of times allocate called
- std::size_t m_numDeallocate; // number of time deallocate called
- std::size_t m_numBytesAllocated; // A good estimate of amount of space used
-
- _memblock<AllocatorImpl> * m_head;
- _memblock<AllocatorImpl> * m_current;
+
+ std::size_t m_numAllocate; // number of times allocate called
+ std::size_t m_numDeallocate; // number of time deallocate called
+ std::size_t m_numBytesAllocated; // A good estimate of amount of space used
+
+ _memblock<AllocatorImpl>* m_head;
+ _memblock<AllocatorImpl>* m_current;
// round up 2 next power of 2 if not already
// a power of 2
- std::size_t roundpow2( std::size_t value )
+ std::size_t roundpow2(std::size_t value)
{
- // note this works because subtracting 1 is equivalent to
- // inverting the lowest set bit and complementing any
- // bits lower than that. only a power of 2
- // will yield 0 in the following check
- if( 0 == ( value & ( value - 1 ) ) )
- return value; // already a power of 2
-
- // fold t over itself. This will set all bits after the highest set bit of t to 1
- // who said bit twiddling wasn't practical?
- value |= value >> 1;
- value |= value >> 2;
- value |= value >> 4;
- value |= value >> 8;
- value |= value >> 16;
+ // note this works because subtracting 1 is equivalent to
+ // inverting the lowest set bit and complementing any
+ // bits lower than that. only a power of 2
+ // will yield 0 in the following check
+ if (0 == (value & (value - 1)))
+ return value; // already a power of 2
+
+ // fold t over itself. This will set all bits after the highest set bit
+ // of t to 1 who said bit twiddling wasn't practical?
+ value |= value >> 1;
+ value |= value >> 2;
+ value |= value >> 4;
+ value |= value >> 8;
+ value |= value >> 16;
#if SIZE_MAX > UINT32_MAX
- value |= value >> 32;
+ value |= value >> 32;
#endif
- return value + 1;
+ return value + 1;
}
- _memblockimplbase( std::size_t defaultSize, AllocatorImpl& allocator ):
- m_alloc( allocator ),
- m_refCount( 1 ),
- m_defaultSize( defaultSize ),
- m_numAllocate( 0 ),
- m_numDeallocate( 0 ),
- m_numBytesAllocated( 0 ),
- m_head( 0 ),
- m_current( 0 )
- {
- if( m_defaultSize < 256 )
- {
- m_defaultSize = 256; // anything less is academic. a more practical size is 4k or more
- }
- else if ( m_defaultSize > 1024UL*1024*1024*16 )
- {
- // when this becomes a problem, this package has succeeded beyond my wildest expectations
- m_defaultSize = 1024UL*1024*1024*16;
- }
-
- // for convenience block size should be a power of 2
- // round up to next power of 2
- m_defaultSize = roundpow2( m_defaultSize );
- allocateNewBlock( m_defaultSize );
+ _memblockimplbase(std::size_t defaultSize, AllocatorImpl& allocator)
+ : m_alloc(allocator), m_refCount(1), m_defaultSize(defaultSize),
+ m_numAllocate(0), m_numDeallocate(0), m_numBytesAllocated(0),
+ m_head(0), m_current(0)
+ {
+ if (m_defaultSize < 256) {
+ m_defaultSize = 256; // anything less is academic. a more practical
+ // size is 4k or more
+ } else if (m_defaultSize > 1024UL * 1024 * 1024 * 16) {
+ // when this becomes a problem, this package has succeeded beyond my
+ // wildest expectations
+ m_defaultSize = 1024UL * 1024 * 1024 * 16;
+ }
+
+ // for convenience block size should be a power of 2
+ // round up to next power of 2
+ m_defaultSize = roundpow2(m_defaultSize);
+ allocateNewBlock(m_defaultSize);
}
-
- char * allocate( std::size_t numBytes )
+
+ char* allocate(std::size_t numBytes)
{
- char * ptrToReturn = m_current->allocate( numBytes );
- if( !ptrToReturn )
- {
- allocateNewBlock( numBytes > m_defaultSize / 2 ? roundpow2( numBytes*2 ) :
- m_defaultSize );
-
- ptrToReturn = m_current->allocate( numBytes );
- }
-
+ char* ptrToReturn = m_current->allocate(numBytes);
+ if (!ptrToReturn) {
+ allocateNewBlock(numBytes > m_defaultSize / 2
+ ? roundpow2(numBytes * 2)
+ : m_defaultSize);
+
+ ptrToReturn = m_current->allocate(numBytes);
+ }
+
#ifdef ARENA_ALLOC_DEBUG
- fprintf( stdout, "_memblockimpl=%p allocated %ld bytes at address=%p\n", this, numBytes, ptrToReturn );
+ fprintf(stdout,
+ "_memblockimpl=%p allocated %ld bytes at address=%p\n",
+ this,
+ numBytes,
+ ptrToReturn);
#endif
- ++ m_numAllocate;
- m_numBytesAllocated += numBytes; // does not account for the small overhead in tracking the allocation
-
- return ptrToReturn;
+ ++m_numAllocate;
+ m_numBytesAllocated += numBytes; // does not account for the small
+ // overhead in tracking the allocation
+
+ return ptrToReturn;
}
-
- void allocateNewBlock( std::size_t blockSize )
- {
- _memblock<AllocatorImpl> * newBlock = new ( m_alloc.allocate( sizeof( _memblock<AllocatorImpl> ) ) )
- _memblock<AllocatorImpl>( blockSize, m_alloc );
-
-#ifdef ARENA_ALLOC_DEBUG
- fprintf( stdout, "_memblockimplbase=%p allocating a new block of size=%ld\n", this, blockSize );
-#endif
-
- if( m_head == 0 )
- {
- m_head = m_current = newBlock;
- }
- else
- {
- m_current->m_next = newBlock;
- m_current = newBlock;
- }
- }
-
- void deallocate( void * ptr )
+
+ void allocateNewBlock(std::size_t blockSize)
{
- ++ m_numDeallocate;
+ _memblock<AllocatorImpl>* newBlock
+ = new (m_alloc.allocate(sizeof(_memblock<AllocatorImpl>)))
+ _memblock<AllocatorImpl>(blockSize, m_alloc);
+
+#ifdef ARENA_ALLOC_DEBUG
+ fprintf(stdout,
+ "_memblockimplbase=%p allocating a new block of size=%ld\n",
+ this,
+ blockSize);
+#endif
+
+ if (m_head == 0) {
+ m_head = m_current = newBlock;
+ } else {
+ m_current->m_next = newBlock;
+ m_current = newBlock;
+ }
}
-
+
+ void deallocate(void* ptr) { ++m_numDeallocate; }
+
size_t getNumAllocations() { return m_numAllocate; }
size_t getNumDeallocations() { return m_numDeallocate; }
size_t getNumBytesAllocated() { return m_numBytesAllocated; }
-
+
void clear()
{
- _memblock<AllocatorImpl> * block = m_head;
- while( block )
- {
- _memblock<AllocatorImpl> * curr = block;
- block = block->m_next;
- curr->dispose( m_alloc );
- curr->~_memblock<AllocatorImpl>();
- m_alloc.deallocate( curr );
- }
- }
-
- // The ref counting model does not permit the sharing of
- // this object across multiple threads unless an external locking mechanism is applied
- // to ensure the atomicity of the reference count.
- void incrementRefCount()
- {
- ++m_refCount;
+ _memblock<AllocatorImpl>* block = m_head;
+ while (block) {
+ _memblock<AllocatorImpl>* curr = block;
+ block = block->m_next;
+ curr->dispose(m_alloc);
+ curr->~_memblock<AllocatorImpl>();
+ m_alloc.deallocate(curr);
+ }
+ }
+
+ void reset()
+ {
+ m_head->reset();
+ m_current = m_head;
+
+ this->m_numBytesAllocated = 0;
+
+ _memblock<AllocatorImpl>* block = m_head->m_next;
+ m_head->m_next = nullptr;
+ while (block) {
+ _memblock<AllocatorImpl>* curr = block;
+ block = block->m_next;
+ curr->dispose(m_alloc);
+ curr->~_memblock<AllocatorImpl>();
+ m_alloc.deallocate(curr);
+ }
+ }
+
+ // The ref counting model does not permit the sharing of
+ // this object across multiple threads unless an external locking mechanism
+ // is applied to ensure the atomicity of the reference count.
+ void incrementRefCount()
+ {
+ ++m_refCount;
#ifdef ARENA_ALLOC_DEBUG
- fprintf( stdout, "ref count on _memblockimplbase=%p incremented to %ld\n", this, m_refCount );
-#endif
+ fprintf(stdout,
+ "ref count on _memblockimplbase=%p incremented to %ld\n",
+ this,
+ m_refCount);
+#endif
}
void decrementRefCount()
{
- --m_refCount;
+ --m_refCount;
#ifdef ARENA_ALLOC_DEBUG
- fprintf( stdout, "ref count on _memblockimplbase=%p decremented to %ld\n", this, m_refCount );
-#endif
-
- if( m_refCount == 0 )
- {
- Derived::destroy( static_cast<Derived*>(this) );
- }
- }
- };
-
-
- // Each allocator points to an instance of _memblockimpl which
- // contains the list of _memblock objects and other tracking info
- // including a refcount.
- // This object is instantiated in space obtained from the allocator
- // implementation. The allocator implementation is the component
- // on which allocate/deallocate are called to obtain storage from.
- template< typename AllocatorImpl >
- struct _memblockimpl : public _memblockimplbase<AllocatorImpl, _memblockimpl<AllocatorImpl> >
- {
- private:
-
- typedef struct _memblockimplbase< AllocatorImpl, _memblockimpl<AllocatorImpl> > base_t;
- friend struct _memblockimplbase< AllocatorImpl, _memblockimpl<AllocatorImpl> >;
-
- // to get around some sticky access issues between Alloc<T1> and Alloc<T2> when sharing
- // the implementation.
- template <typename U, typename A, typename M >
+ fprintf(stdout,
+ "ref count on _memblockimplbase=%p decremented to %ld\n",
+ this,
+ m_refCount);
+#endif
+
+ if (m_refCount == 0) {
+ Derived::destroy(static_cast<Derived*>(this));
+ }
+ }
+};
+
+// Each allocator points to an instance of _memblockimpl which
+// contains the list of _memblock objects and other tracking info
+// including a refcount.
+// This object is instantiated in space obtained from the allocator
+// implementation. The allocator implementation is the component
+// on which allocate/deallocate are called to obtain storage from.
+template<typename AllocatorImpl>
+struct _memblockimpl
+ : public _memblockimplbase<AllocatorImpl, _memblockimpl<AllocatorImpl> > {
+private:
+ typedef struct _memblockimplbase<AllocatorImpl,
+ _memblockimpl<AllocatorImpl> >
+ base_t;
+ friend struct _memblockimplbase<AllocatorImpl,
+ _memblockimpl<AllocatorImpl> >;
+
+ // to get around some sticky access issues between Alloc<T1> and Alloc<T2>
+ // when sharing the implementation.
+ template<typename U, typename A, typename M>
friend class Alloc;
-
- template< typename T >
- static void assign( const Alloc<T,AllocatorImpl, _memblockimpl<AllocatorImpl> >& src,
- _memblockimpl *& dest );
-
- static _memblockimpl<AllocatorImpl> * create( size_t defaultSize, AllocatorImpl& alloc )
+
+ template<typename T>
+ static void assign(
+ const Alloc<T, AllocatorImpl, _memblockimpl<AllocatorImpl> >& src,
+ _memblockimpl*& dest);
+
+ static _memblockimpl<AllocatorImpl>* create(size_t defaultSize,
+ AllocatorImpl& alloc)
{
- return new ( alloc.allocate( sizeof( _memblockimpl ) ) ) _memblockimpl<AllocatorImpl>( defaultSize,
- alloc );
+ return new (alloc.allocate(sizeof(_memblockimpl)))
+ _memblockimpl<AllocatorImpl>(defaultSize, alloc);
}
-
- static void destroy( _memblockimpl<AllocatorImpl> * objToDestroy )
- {
- AllocatorImpl allocImpl = objToDestroy->m_alloc;
- objToDestroy-> ~_memblockimpl<AllocatorImpl>();
- allocImpl.deallocate( objToDestroy );
+
+ static void destroy(_memblockimpl<AllocatorImpl>* objToDestroy)
+ {
+ AllocatorImpl allocImpl = objToDestroy->m_alloc;
+ objToDestroy->~_memblockimpl<AllocatorImpl>();
+ allocImpl.deallocate(objToDestroy);
}
-
- _memblockimpl( std::size_t defaultSize, AllocatorImpl& allocImpl ):
- _memblockimplbase<AllocatorImpl, _memblockimpl<AllocatorImpl> >( defaultSize, allocImpl )
+
+ _memblockimpl(std::size_t defaultSize, AllocatorImpl& allocImpl)
+ : _memblockimplbase<AllocatorImpl, _memblockimpl<AllocatorImpl> >(
+ defaultSize, allocImpl)
{
#ifdef ARENA_ALLOC_DEBUG
- fprintf( stdout, "_memblockimpl=%p constructed with default size=%ld\n", this,
- base_t::m_defaultSize );
+ fprintf(stdout,
+ "_memblockimpl=%p constructed with default size=%ld\n",
+ this,
+ base_t::m_defaultSize);
#endif
}
-
- ~_memblockimpl( )
+
+ ~_memblockimpl()
{
#ifdef ARENA_ALLOC_DEBUG
- fprintf( stdout, "~memblockimpl() called on _memblockimpl=%p\n", this );
-#endif
- base_t::clear();
- }
- };
-}
+ fprintf(stdout, "~memblockimpl() called on _memblockimpl=%p\n", this);
+#endif
+ base_t::clear();
+ }
+};
+} // namespace ArenaAlloc
#endif
diff --git a/src/third-party/date/include/date/chrono_io.h b/src/third-party/date/include/date/chrono_io.h
new file mode 100644
index 0000000..21be404
--- /dev/null
+++ b/src/third-party/date/include/date/chrono_io.h
@@ -0,0 +1,34 @@
+#ifndef CHRONO_IO_H
+#define CHRONO_IO_H
+
+// The MIT License (MIT)
+//
+// Copyright (c) 2016, 2017 Howard Hinnant
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// Our apologies. When the previous paragraph was written, lowercase had not yet
+// been invented (that would involve another several millennia of evolution).
+// We did not mean to shout.
+
+// This functionality has moved to "date.h"
+
+#include "date.h"
+
+#endif // CHRONO_IO_H
diff --git a/src/third-party/date/include/date/date.h b/src/third-party/date/include/date/date.h
new file mode 100644
index 0000000..7b6b4e4
--- /dev/null
+++ b/src/third-party/date/include/date/date.h
@@ -0,0 +1,8200 @@
+#ifndef DATE_H
+#define DATE_H
+
+// The MIT License (MIT)
+//
+// Copyright (c) 2015, 2016, 2017 Howard Hinnant
+// Copyright (c) 2016 Adrian Colomitchi
+// Copyright (c) 2017 Florian Dang
+// Copyright (c) 2017 Paul Thompson
+// Copyright (c) 2018, 2019 Tomasz Kamiński
+// Copyright (c) 2019 Jiangang Zhuang
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// Our apologies. When the previous paragraph was written, lowercase had not yet
+// been invented (that would involve another several millennia of evolution).
+// We did not mean to shout.
+
+#ifndef HAS_STRING_VIEW
+# if __cplusplus >= 201703 || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L)
+# define HAS_STRING_VIEW 1
+# else
+# define HAS_STRING_VIEW 0
+# endif
+#endif // HAS_STRING_VIEW
+
+#include <cassert>
+#include <algorithm>
+#include <cctype>
+#include <chrono>
+#include <climits>
+#include <cmath>
+#include <cstddef>
+#include <cstdint>
+#include <cstdlib>
+#include <ctime>
+#include <ios>
+#include <istream>
+#include <iterator>
+#include <limits>
+#include <locale>
+#include <memory>
+#include <ostream>
+#include <ratio>
+#include <sstream>
+#include <stdexcept>
+#include <string>
+#if HAS_STRING_VIEW
+# include <string_view>
+#endif
+#include <utility>
+#include <type_traits>
+
+#ifdef __GNUC__
+# pragma GCC diagnostic push
+# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 7)
+# pragma GCC diagnostic ignored "-Wpedantic"
+# endif
+# if __GNUC__ < 5
+ // GCC 4.9 Bug 61489 Wrong warning with -Wmissing-field-initializers
+# pragma GCC diagnostic ignored "-Wmissing-field-initializers"
+# endif
+#endif
+
+#ifdef _MSC_VER
+# pragma warning(push)
+// warning C4127: conditional expression is constant
+# pragma warning(disable : 4127)
+#endif
+
+namespace date
+{
+
+//---------------+
+// Configuration |
+//---------------+
+
+#ifndef ONLY_C_LOCALE
+# define ONLY_C_LOCALE 0
+#endif
+
+#if defined(_MSC_VER) && (!defined(__clang__) || (_MSC_VER < 1910))
+// MSVC
+# ifndef _SILENCE_CXX17_UNCAUGHT_EXCEPTION_DEPRECATION_WARNING
+# define _SILENCE_CXX17_UNCAUGHT_EXCEPTION_DEPRECATION_WARNING
+# endif
+# if _MSC_VER < 1910
+// before VS2017
+# define CONSTDATA const
+# define CONSTCD11
+# define CONSTCD14
+# define NOEXCEPT _NOEXCEPT
+# else
+// VS2017 and later
+# define CONSTDATA constexpr const
+# define CONSTCD11 constexpr
+# define CONSTCD14 constexpr
+# define NOEXCEPT noexcept
+# endif
+
+#elif defined(__SUNPRO_CC) && __SUNPRO_CC <= 0x5150
+// Oracle Developer Studio 12.6 and earlier
+# define CONSTDATA constexpr const
+# define CONSTCD11 constexpr
+# define CONSTCD14
+# define NOEXCEPT noexcept
+
+#elif __cplusplus >= 201402
+// C++14
+# define CONSTDATA constexpr const
+# define CONSTCD11 constexpr
+# define CONSTCD14 constexpr
+# define NOEXCEPT noexcept
+#else
+// C++11
+# define CONSTDATA constexpr const
+# define CONSTCD11 constexpr
+# define CONSTCD14
+# define NOEXCEPT noexcept
+#endif
+
+#ifndef HAS_UNCAUGHT_EXCEPTIONS
+# if __cplusplus >= 201703 || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L)
+# define HAS_UNCAUGHT_EXCEPTIONS 1
+# else
+# define HAS_UNCAUGHT_EXCEPTIONS 0
+# endif
+#endif // HAS_UNCAUGHT_EXCEPTIONS
+
+#ifndef HAS_VOID_T
+# if __cplusplus >= 201703 || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L)
+# define HAS_VOID_T 1
+# else
+# define HAS_VOID_T 0
+# endif
+#endif // HAS_VOID_T
+
+// Protect from Oracle sun macro
+#ifdef sun
+# undef sun
+#endif
+
+// Work around for a NVCC compiler bug which causes it to fail
+// to compile std::ratio_{multiply,divide} when used directly
+// in the std::chrono::duration template instantiations below
+namespace detail {
+template <typename R1, typename R2>
+using ratio_multiply = decltype(std::ratio_multiply<R1, R2>{});
+
+template <typename R1, typename R2>
+using ratio_divide = decltype(std::ratio_divide<R1, R2>{});
+} // namespace detail
+
+//-----------+
+// Interface |
+//-----------+
+
+// durations
+
+using days = std::chrono::duration
+ <int, detail::ratio_multiply<std::ratio<24>, std::chrono::hours::period>>;
+
+using weeks = std::chrono::duration
+ <int, detail::ratio_multiply<std::ratio<7>, days::period>>;
+
+using years = std::chrono::duration
+ <int, detail::ratio_multiply<std::ratio<146097, 400>, days::period>>;
+
+using months = std::chrono::duration
+ <int, detail::ratio_divide<years::period, std::ratio<12>>>;
+
+// time_point
+
+template <class Duration>
+ using sys_time = std::chrono::time_point<std::chrono::system_clock, Duration>;
+
+using sys_days = sys_time<days>;
+using sys_seconds = sys_time<std::chrono::seconds>;
+
+struct local_t {};
+
+template <class Duration>
+ using local_time = std::chrono::time_point<local_t, Duration>;
+
+using local_seconds = local_time<std::chrono::seconds>;
+using local_days = local_time<days>;
+
+// types
+
+struct last_spec
+{
+ explicit last_spec() = default;
+};
+
+class day;
+class month;
+class year;
+
+class weekday;
+class weekday_indexed;
+class weekday_last;
+
+class month_day;
+class month_day_last;
+class month_weekday;
+class month_weekday_last;
+
+class year_month;
+
+class year_month_day;
+class year_month_day_last;
+class year_month_weekday;
+class year_month_weekday_last;
+
+// date composition operators
+
+CONSTCD11 year_month operator/(const year& y, const month& m) NOEXCEPT;
+CONSTCD11 year_month operator/(const year& y, int m) NOEXCEPT;
+
+CONSTCD11 month_day operator/(const day& d, const month& m) NOEXCEPT;
+CONSTCD11 month_day operator/(const day& d, int m) NOEXCEPT;
+CONSTCD11 month_day operator/(const month& m, const day& d) NOEXCEPT;
+CONSTCD11 month_day operator/(const month& m, int d) NOEXCEPT;
+CONSTCD11 month_day operator/(int m, const day& d) NOEXCEPT;
+
+CONSTCD11 month_day_last operator/(const month& m, last_spec) NOEXCEPT;
+CONSTCD11 month_day_last operator/(int m, last_spec) NOEXCEPT;
+CONSTCD11 month_day_last operator/(last_spec, const month& m) NOEXCEPT;
+CONSTCD11 month_day_last operator/(last_spec, int m) NOEXCEPT;
+
+CONSTCD11 month_weekday operator/(const month& m, const weekday_indexed& wdi) NOEXCEPT;
+CONSTCD11 month_weekday operator/(int m, const weekday_indexed& wdi) NOEXCEPT;
+CONSTCD11 month_weekday operator/(const weekday_indexed& wdi, const month& m) NOEXCEPT;
+CONSTCD11 month_weekday operator/(const weekday_indexed& wdi, int m) NOEXCEPT;
+
+CONSTCD11 month_weekday_last operator/(const month& m, const weekday_last& wdl) NOEXCEPT;
+CONSTCD11 month_weekday_last operator/(int m, const weekday_last& wdl) NOEXCEPT;
+CONSTCD11 month_weekday_last operator/(const weekday_last& wdl, const month& m) NOEXCEPT;
+CONSTCD11 month_weekday_last operator/(const weekday_last& wdl, int m) NOEXCEPT;
+
+CONSTCD11 year_month_day operator/(const year_month& ym, const day& d) NOEXCEPT;
+CONSTCD11 year_month_day operator/(const year_month& ym, int d) NOEXCEPT;
+CONSTCD11 year_month_day operator/(const year& y, const month_day& md) NOEXCEPT;
+CONSTCD11 year_month_day operator/(int y, const month_day& md) NOEXCEPT;
+CONSTCD11 year_month_day operator/(const month_day& md, const year& y) NOEXCEPT;
+CONSTCD11 year_month_day operator/(const month_day& md, int y) NOEXCEPT;
+
+CONSTCD11
+ year_month_day_last operator/(const year_month& ym, last_spec) NOEXCEPT;
+CONSTCD11
+ year_month_day_last operator/(const year& y, const month_day_last& mdl) NOEXCEPT;
+CONSTCD11
+ year_month_day_last operator/(int y, const month_day_last& mdl) NOEXCEPT;
+CONSTCD11
+ year_month_day_last operator/(const month_day_last& mdl, const year& y) NOEXCEPT;
+CONSTCD11
+ year_month_day_last operator/(const month_day_last& mdl, int y) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday
+operator/(const year_month& ym, const weekday_indexed& wdi) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday
+operator/(const year& y, const month_weekday& mwd) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday
+operator/(int y, const month_weekday& mwd) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday
+operator/(const month_weekday& mwd, const year& y) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday
+operator/(const month_weekday& mwd, int y) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday_last
+operator/(const year_month& ym, const weekday_last& wdl) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday_last
+operator/(const year& y, const month_weekday_last& mwdl) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday_last
+operator/(int y, const month_weekday_last& mwdl) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday_last
+operator/(const month_weekday_last& mwdl, const year& y) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday_last
+operator/(const month_weekday_last& mwdl, int y) NOEXCEPT;
+
+// Detailed interface
+
+// day
+
+class day
+{
+ unsigned char d_;
+
+public:
+ day() = default;
+ explicit CONSTCD11 day(unsigned d) NOEXCEPT;
+
+ CONSTCD14 day& operator++() NOEXCEPT;
+ CONSTCD14 day operator++(int) NOEXCEPT;
+ CONSTCD14 day& operator--() NOEXCEPT;
+ CONSTCD14 day operator--(int) NOEXCEPT;
+
+ CONSTCD14 day& operator+=(const days& d) NOEXCEPT;
+ CONSTCD14 day& operator-=(const days& d) NOEXCEPT;
+
+ CONSTCD11 explicit operator unsigned() const NOEXCEPT;
+ CONSTCD11 bool ok() const NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const day& x, const day& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const day& x, const day& y) NOEXCEPT;
+CONSTCD11 bool operator< (const day& x, const day& y) NOEXCEPT;
+CONSTCD11 bool operator> (const day& x, const day& y) NOEXCEPT;
+CONSTCD11 bool operator<=(const day& x, const day& y) NOEXCEPT;
+CONSTCD11 bool operator>=(const day& x, const day& y) NOEXCEPT;
+
+CONSTCD11 day operator+(const day& x, const days& y) NOEXCEPT;
+CONSTCD11 day operator+(const days& x, const day& y) NOEXCEPT;
+CONSTCD11 day operator-(const day& x, const days& y) NOEXCEPT;
+CONSTCD11 days operator-(const day& x, const day& y) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const day& d);
+
+// month
+
+class month
+{
+ unsigned char m_;
+
+public:
+ month() = default;
+ explicit CONSTCD11 month(unsigned m) NOEXCEPT;
+
+ CONSTCD14 month& operator++() NOEXCEPT;
+ CONSTCD14 month operator++(int) NOEXCEPT;
+ CONSTCD14 month& operator--() NOEXCEPT;
+ CONSTCD14 month operator--(int) NOEXCEPT;
+
+ CONSTCD14 month& operator+=(const months& m) NOEXCEPT;
+ CONSTCD14 month& operator-=(const months& m) NOEXCEPT;
+
+ CONSTCD11 explicit operator unsigned() const NOEXCEPT;
+ CONSTCD11 bool ok() const NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const month& x, const month& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const month& x, const month& y) NOEXCEPT;
+CONSTCD11 bool operator< (const month& x, const month& y) NOEXCEPT;
+CONSTCD11 bool operator> (const month& x, const month& y) NOEXCEPT;
+CONSTCD11 bool operator<=(const month& x, const month& y) NOEXCEPT;
+CONSTCD11 bool operator>=(const month& x, const month& y) NOEXCEPT;
+
+CONSTCD14 month operator+(const month& x, const months& y) NOEXCEPT;
+CONSTCD14 month operator+(const months& x, const month& y) NOEXCEPT;
+CONSTCD14 month operator-(const month& x, const months& y) NOEXCEPT;
+CONSTCD14 months operator-(const month& x, const month& y) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const month& m);
+
+// year
+
+class year
+{
+ short y_;
+
+public:
+ year() = default;
+ explicit CONSTCD11 year(int y) NOEXCEPT;
+
+ CONSTCD14 year& operator++() NOEXCEPT;
+ CONSTCD14 year operator++(int) NOEXCEPT;
+ CONSTCD14 year& operator--() NOEXCEPT;
+ CONSTCD14 year operator--(int) NOEXCEPT;
+
+ CONSTCD14 year& operator+=(const years& y) NOEXCEPT;
+ CONSTCD14 year& operator-=(const years& y) NOEXCEPT;
+
+ CONSTCD11 year operator-() const NOEXCEPT;
+ CONSTCD11 year operator+() const NOEXCEPT;
+
+ CONSTCD11 bool is_leap() const NOEXCEPT;
+
+ CONSTCD11 explicit operator int() const NOEXCEPT;
+ CONSTCD11 bool ok() const NOEXCEPT;
+
+ static CONSTCD11 year min() NOEXCEPT { return year{-32767}; }
+ static CONSTCD11 year max() NOEXCEPT { return year{32767}; }
+};
+
+CONSTCD11 bool operator==(const year& x, const year& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const year& x, const year& y) NOEXCEPT;
+CONSTCD11 bool operator< (const year& x, const year& y) NOEXCEPT;
+CONSTCD11 bool operator> (const year& x, const year& y) NOEXCEPT;
+CONSTCD11 bool operator<=(const year& x, const year& y) NOEXCEPT;
+CONSTCD11 bool operator>=(const year& x, const year& y) NOEXCEPT;
+
+CONSTCD11 year operator+(const year& x, const years& y) NOEXCEPT;
+CONSTCD11 year operator+(const years& x, const year& y) NOEXCEPT;
+CONSTCD11 year operator-(const year& x, const years& y) NOEXCEPT;
+CONSTCD11 years operator-(const year& x, const year& y) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year& y);
+
+// weekday
+
+class weekday
+{
+ unsigned char wd_;
+public:
+ weekday() = default;
+ explicit CONSTCD11 weekday(unsigned wd) NOEXCEPT;
+ CONSTCD14 weekday(const sys_days& dp) NOEXCEPT;
+ CONSTCD14 explicit weekday(const local_days& dp) NOEXCEPT;
+
+ CONSTCD14 weekday& operator++() NOEXCEPT;
+ CONSTCD14 weekday operator++(int) NOEXCEPT;
+ CONSTCD14 weekday& operator--() NOEXCEPT;
+ CONSTCD14 weekday operator--(int) NOEXCEPT;
+
+ CONSTCD14 weekday& operator+=(const days& d) NOEXCEPT;
+ CONSTCD14 weekday& operator-=(const days& d) NOEXCEPT;
+
+ CONSTCD11 bool ok() const NOEXCEPT;
+
+ CONSTCD11 unsigned c_encoding() const NOEXCEPT;
+ CONSTCD11 unsigned iso_encoding() const NOEXCEPT;
+
+ CONSTCD11 weekday_indexed operator[](unsigned index) const NOEXCEPT;
+ CONSTCD11 weekday_last operator[](last_spec) const NOEXCEPT;
+
+private:
+ static CONSTCD14 unsigned char weekday_from_days(int z) NOEXCEPT;
+
+ friend CONSTCD11 bool operator==(const weekday& x, const weekday& y) NOEXCEPT;
+ friend CONSTCD14 days operator-(const weekday& x, const weekday& y) NOEXCEPT;
+ friend CONSTCD14 weekday operator+(const weekday& x, const days& y) NOEXCEPT;
+ template<class CharT, class Traits>
+ friend std::basic_ostream<CharT, Traits>&
+ operator<<(std::basic_ostream<CharT, Traits>& os, const weekday& wd);
+ friend class weekday_indexed;
+};
+
+CONSTCD11 bool operator==(const weekday& x, const weekday& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const weekday& x, const weekday& y) NOEXCEPT;
+
+CONSTCD14 weekday operator+(const weekday& x, const days& y) NOEXCEPT;
+CONSTCD14 weekday operator+(const days& x, const weekday& y) NOEXCEPT;
+CONSTCD14 weekday operator-(const weekday& x, const days& y) NOEXCEPT;
+CONSTCD14 days operator-(const weekday& x, const weekday& y) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const weekday& wd);
+
+// weekday_indexed
+
+class weekday_indexed
+{
+ unsigned char wd_ : 4;
+ unsigned char index_ : 4;
+
+public:
+ weekday_indexed() = default;
+ CONSTCD11 weekday_indexed(const date::weekday& wd, unsigned index) NOEXCEPT;
+
+ CONSTCD11 date::weekday weekday() const NOEXCEPT;
+ CONSTCD11 unsigned index() const NOEXCEPT;
+ CONSTCD11 bool ok() const NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const weekday_indexed& x, const weekday_indexed& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const weekday_indexed& x, const weekday_indexed& y) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const weekday_indexed& wdi);
+
+// weekday_last
+
+class weekday_last
+{
+ date::weekday wd_;
+
+public:
+ explicit CONSTCD11 weekday_last(const date::weekday& wd) NOEXCEPT;
+
+ CONSTCD11 date::weekday weekday() const NOEXCEPT;
+ CONSTCD11 bool ok() const NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const weekday_last& x, const weekday_last& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const weekday_last& x, const weekday_last& y) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const weekday_last& wdl);
+
+namespace detail
+{
+
+struct unspecified_month_disambiguator {};
+
+} // namespace detail
+
+// year_month
+
+class year_month
+{
+ date::year y_;
+ date::month m_;
+
+public:
+ year_month() = default;
+ CONSTCD11 year_month(const date::year& y, const date::month& m) NOEXCEPT;
+
+ CONSTCD11 date::year year() const NOEXCEPT;
+ CONSTCD11 date::month month() const NOEXCEPT;
+
+ template<class = detail::unspecified_month_disambiguator>
+ CONSTCD14 year_month& operator+=(const months& dm) NOEXCEPT;
+ template<class = detail::unspecified_month_disambiguator>
+ CONSTCD14 year_month& operator-=(const months& dm) NOEXCEPT;
+ CONSTCD14 year_month& operator+=(const years& dy) NOEXCEPT;
+ CONSTCD14 year_month& operator-=(const years& dy) NOEXCEPT;
+
+ CONSTCD11 bool ok() const NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const year_month& x, const year_month& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const year_month& x, const year_month& y) NOEXCEPT;
+CONSTCD11 bool operator< (const year_month& x, const year_month& y) NOEXCEPT;
+CONSTCD11 bool operator> (const year_month& x, const year_month& y) NOEXCEPT;
+CONSTCD11 bool operator<=(const year_month& x, const year_month& y) NOEXCEPT;
+CONSTCD11 bool operator>=(const year_month& x, const year_month& y) NOEXCEPT;
+
+template<class = detail::unspecified_month_disambiguator>
+CONSTCD14 year_month operator+(const year_month& ym, const months& dm) NOEXCEPT;
+template<class = detail::unspecified_month_disambiguator>
+CONSTCD14 year_month operator+(const months& dm, const year_month& ym) NOEXCEPT;
+template<class = detail::unspecified_month_disambiguator>
+CONSTCD14 year_month operator-(const year_month& ym, const months& dm) NOEXCEPT;
+
+CONSTCD11 months operator-(const year_month& x, const year_month& y) NOEXCEPT;
+CONSTCD11 year_month operator+(const year_month& ym, const years& dy) NOEXCEPT;
+CONSTCD11 year_month operator+(const years& dy, const year_month& ym) NOEXCEPT;
+CONSTCD11 year_month operator-(const year_month& ym, const years& dy) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year_month& ym);
+
+// month_day
+
+class month_day
+{
+ date::month m_;
+ date::day d_;
+
+public:
+ month_day() = default;
+ CONSTCD11 month_day(const date::month& m, const date::day& d) NOEXCEPT;
+
+ CONSTCD11 date::month month() const NOEXCEPT;
+ CONSTCD11 date::day day() const NOEXCEPT;
+
+ CONSTCD14 bool ok() const NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const month_day& x, const month_day& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const month_day& x, const month_day& y) NOEXCEPT;
+CONSTCD11 bool operator< (const month_day& x, const month_day& y) NOEXCEPT;
+CONSTCD11 bool operator> (const month_day& x, const month_day& y) NOEXCEPT;
+CONSTCD11 bool operator<=(const month_day& x, const month_day& y) NOEXCEPT;
+CONSTCD11 bool operator>=(const month_day& x, const month_day& y) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const month_day& md);
+
+// month_day_last
+
+class month_day_last
+{
+ date::month m_;
+
+public:
+ CONSTCD11 explicit month_day_last(const date::month& m) NOEXCEPT;
+
+ CONSTCD11 date::month month() const NOEXCEPT;
+ CONSTCD11 bool ok() const NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const month_day_last& x, const month_day_last& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const month_day_last& x, const month_day_last& y) NOEXCEPT;
+CONSTCD11 bool operator< (const month_day_last& x, const month_day_last& y) NOEXCEPT;
+CONSTCD11 bool operator> (const month_day_last& x, const month_day_last& y) NOEXCEPT;
+CONSTCD11 bool operator<=(const month_day_last& x, const month_day_last& y) NOEXCEPT;
+CONSTCD11 bool operator>=(const month_day_last& x, const month_day_last& y) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const month_day_last& mdl);
+
+// month_weekday
+
+class month_weekday
+{
+ date::month m_;
+ date::weekday_indexed wdi_;
+public:
+ CONSTCD11 month_weekday(const date::month& m,
+ const date::weekday_indexed& wdi) NOEXCEPT;
+
+ CONSTCD11 date::month month() const NOEXCEPT;
+ CONSTCD11 date::weekday_indexed weekday_indexed() const NOEXCEPT;
+
+ CONSTCD11 bool ok() const NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const month_weekday& x, const month_weekday& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const month_weekday& x, const month_weekday& y) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const month_weekday& mwd);
+
+// month_weekday_last
+
+class month_weekday_last
+{
+ date::month m_;
+ date::weekday_last wdl_;
+
+public:
+ CONSTCD11 month_weekday_last(const date::month& m,
+ const date::weekday_last& wd) NOEXCEPT;
+
+ CONSTCD11 date::month month() const NOEXCEPT;
+ CONSTCD11 date::weekday_last weekday_last() const NOEXCEPT;
+
+ CONSTCD11 bool ok() const NOEXCEPT;
+};
+
+CONSTCD11
+ bool operator==(const month_weekday_last& x, const month_weekday_last& y) NOEXCEPT;
+CONSTCD11
+ bool operator!=(const month_weekday_last& x, const month_weekday_last& y) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const month_weekday_last& mwdl);
+
+// class year_month_day
+
+class year_month_day
+{
+ date::year y_;
+ date::month m_;
+ date::day d_;
+
+public:
+ year_month_day() = default;
+ CONSTCD11 year_month_day(const date::year& y, const date::month& m,
+ const date::day& d) NOEXCEPT;
+ CONSTCD14 year_month_day(const year_month_day_last& ymdl) NOEXCEPT;
+
+ CONSTCD14 year_month_day(sys_days dp) NOEXCEPT;
+ CONSTCD14 explicit year_month_day(local_days dp) NOEXCEPT;
+
+ template<class = detail::unspecified_month_disambiguator>
+ CONSTCD14 year_month_day& operator+=(const months& m) NOEXCEPT;
+ template<class = detail::unspecified_month_disambiguator>
+ CONSTCD14 year_month_day& operator-=(const months& m) NOEXCEPT;
+ CONSTCD14 year_month_day& operator+=(const years& y) NOEXCEPT;
+ CONSTCD14 year_month_day& operator-=(const years& y) NOEXCEPT;
+
+ CONSTCD11 date::year year() const NOEXCEPT;
+ CONSTCD11 date::month month() const NOEXCEPT;
+ CONSTCD11 date::day day() const NOEXCEPT;
+
+ CONSTCD14 operator sys_days() const NOEXCEPT;
+ CONSTCD14 explicit operator local_days() const NOEXCEPT;
+ CONSTCD14 bool ok() const NOEXCEPT;
+
+private:
+ static CONSTCD14 year_month_day from_days(days dp) NOEXCEPT;
+ CONSTCD14 days to_days() const NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const year_month_day& x, const year_month_day& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const year_month_day& x, const year_month_day& y) NOEXCEPT;
+CONSTCD11 bool operator< (const year_month_day& x, const year_month_day& y) NOEXCEPT;
+CONSTCD11 bool operator> (const year_month_day& x, const year_month_day& y) NOEXCEPT;
+CONSTCD11 bool operator<=(const year_month_day& x, const year_month_day& y) NOEXCEPT;
+CONSTCD11 bool operator>=(const year_month_day& x, const year_month_day& y) NOEXCEPT;
+
+template<class = detail::unspecified_month_disambiguator>
+CONSTCD14 year_month_day operator+(const year_month_day& ymd, const months& dm) NOEXCEPT;
+template<class = detail::unspecified_month_disambiguator>
+CONSTCD14 year_month_day operator+(const months& dm, const year_month_day& ymd) NOEXCEPT;
+template<class = detail::unspecified_month_disambiguator>
+CONSTCD14 year_month_day operator-(const year_month_day& ymd, const months& dm) NOEXCEPT;
+CONSTCD11 year_month_day operator+(const year_month_day& ymd, const years& dy) NOEXCEPT;
+CONSTCD11 year_month_day operator+(const years& dy, const year_month_day& ymd) NOEXCEPT;
+CONSTCD11 year_month_day operator-(const year_month_day& ymd, const years& dy) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year_month_day& ymd);
+
+// year_month_day_last
+
+class year_month_day_last
+{
+ date::year y_;
+ date::month_day_last mdl_;
+
+public:
+ CONSTCD11 year_month_day_last(const date::year& y,
+ const date::month_day_last& mdl) NOEXCEPT;
+
+ template<class = detail::unspecified_month_disambiguator>
+ CONSTCD14 year_month_day_last& operator+=(const months& m) NOEXCEPT;
+ template<class = detail::unspecified_month_disambiguator>
+ CONSTCD14 year_month_day_last& operator-=(const months& m) NOEXCEPT;
+ CONSTCD14 year_month_day_last& operator+=(const years& y) NOEXCEPT;
+ CONSTCD14 year_month_day_last& operator-=(const years& y) NOEXCEPT;
+
+ CONSTCD11 date::year year() const NOEXCEPT;
+ CONSTCD11 date::month month() const NOEXCEPT;
+ CONSTCD11 date::month_day_last month_day_last() const NOEXCEPT;
+ CONSTCD14 date::day day() const NOEXCEPT;
+
+ CONSTCD14 operator sys_days() const NOEXCEPT;
+ CONSTCD14 explicit operator local_days() const NOEXCEPT;
+ CONSTCD11 bool ok() const NOEXCEPT;
+};
+
+CONSTCD11
+ bool operator==(const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT;
+CONSTCD11
+ bool operator!=(const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT;
+CONSTCD11
+ bool operator< (const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT;
+CONSTCD11
+ bool operator> (const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT;
+CONSTCD11
+ bool operator<=(const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT;
+CONSTCD11
+ bool operator>=(const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT;
+
+template<class = detail::unspecified_month_disambiguator>
+CONSTCD14
+year_month_day_last
+operator+(const year_month_day_last& ymdl, const months& dm) NOEXCEPT;
+
+template<class = detail::unspecified_month_disambiguator>
+CONSTCD14
+year_month_day_last
+operator+(const months& dm, const year_month_day_last& ymdl) NOEXCEPT;
+
+CONSTCD11
+year_month_day_last
+operator+(const year_month_day_last& ymdl, const years& dy) NOEXCEPT;
+
+CONSTCD11
+year_month_day_last
+operator+(const years& dy, const year_month_day_last& ymdl) NOEXCEPT;
+
+template<class = detail::unspecified_month_disambiguator>
+CONSTCD14
+year_month_day_last
+operator-(const year_month_day_last& ymdl, const months& dm) NOEXCEPT;
+
+CONSTCD11
+year_month_day_last
+operator-(const year_month_day_last& ymdl, const years& dy) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year_month_day_last& ymdl);
+
+// year_month_weekday
+
+class year_month_weekday
+{
+ date::year y_;
+ date::month m_;
+ date::weekday_indexed wdi_;
+
+public:
+ year_month_weekday() = default;
+ CONSTCD11 year_month_weekday(const date::year& y, const date::month& m,
+ const date::weekday_indexed& wdi) NOEXCEPT;
+ CONSTCD14 year_month_weekday(const sys_days& dp) NOEXCEPT;
+ CONSTCD14 explicit year_month_weekday(const local_days& dp) NOEXCEPT;
+
+ template<class = detail::unspecified_month_disambiguator>
+ CONSTCD14 year_month_weekday& operator+=(const months& m) NOEXCEPT;
+ template<class = detail::unspecified_month_disambiguator>
+ CONSTCD14 year_month_weekday& operator-=(const months& m) NOEXCEPT;
+ CONSTCD14 year_month_weekday& operator+=(const years& y) NOEXCEPT;
+ CONSTCD14 year_month_weekday& operator-=(const years& y) NOEXCEPT;
+
+ CONSTCD11 date::year year() const NOEXCEPT;
+ CONSTCD11 date::month month() const NOEXCEPT;
+ CONSTCD11 date::weekday weekday() const NOEXCEPT;
+ CONSTCD11 unsigned index() const NOEXCEPT;
+ CONSTCD11 date::weekday_indexed weekday_indexed() const NOEXCEPT;
+
+ CONSTCD14 operator sys_days() const NOEXCEPT;
+ CONSTCD14 explicit operator local_days() const NOEXCEPT;
+ CONSTCD14 bool ok() const NOEXCEPT;
+
+private:
+ static CONSTCD14 year_month_weekday from_days(days dp) NOEXCEPT;
+ CONSTCD14 days to_days() const NOEXCEPT;
+};
+
+CONSTCD11
+ bool operator==(const year_month_weekday& x, const year_month_weekday& y) NOEXCEPT;
+CONSTCD11
+ bool operator!=(const year_month_weekday& x, const year_month_weekday& y) NOEXCEPT;
+
+template<class = detail::unspecified_month_disambiguator>
+CONSTCD14
+year_month_weekday
+operator+(const year_month_weekday& ymwd, const months& dm) NOEXCEPT;
+
+template<class = detail::unspecified_month_disambiguator>
+CONSTCD14
+year_month_weekday
+operator+(const months& dm, const year_month_weekday& ymwd) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday
+operator+(const year_month_weekday& ymwd, const years& dy) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday
+operator+(const years& dy, const year_month_weekday& ymwd) NOEXCEPT;
+
+template<class = detail::unspecified_month_disambiguator>
+CONSTCD14
+year_month_weekday
+operator-(const year_month_weekday& ymwd, const months& dm) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday
+operator-(const year_month_weekday& ymwd, const years& dy) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year_month_weekday& ymwdi);
+
+// year_month_weekday_last
+
+class year_month_weekday_last
+{
+ date::year y_;
+ date::month m_;
+ date::weekday_last wdl_;
+
+public:
+ CONSTCD11 year_month_weekday_last(const date::year& y, const date::month& m,
+ const date::weekday_last& wdl) NOEXCEPT;
+
+ template<class = detail::unspecified_month_disambiguator>
+ CONSTCD14 year_month_weekday_last& operator+=(const months& m) NOEXCEPT;
+ template<class = detail::unspecified_month_disambiguator>
+ CONSTCD14 year_month_weekday_last& operator-=(const months& m) NOEXCEPT;
+ CONSTCD14 year_month_weekday_last& operator+=(const years& y) NOEXCEPT;
+ CONSTCD14 year_month_weekday_last& operator-=(const years& y) NOEXCEPT;
+
+ CONSTCD11 date::year year() const NOEXCEPT;
+ CONSTCD11 date::month month() const NOEXCEPT;
+ CONSTCD11 date::weekday weekday() const NOEXCEPT;
+ CONSTCD11 date::weekday_last weekday_last() const NOEXCEPT;
+
+ CONSTCD14 operator sys_days() const NOEXCEPT;
+ CONSTCD14 explicit operator local_days() const NOEXCEPT;
+ CONSTCD11 bool ok() const NOEXCEPT;
+
+private:
+ CONSTCD14 days to_days() const NOEXCEPT;
+};
+
+CONSTCD11
+bool
+operator==(const year_month_weekday_last& x, const year_month_weekday_last& y) NOEXCEPT;
+
+CONSTCD11
+bool
+operator!=(const year_month_weekday_last& x, const year_month_weekday_last& y) NOEXCEPT;
+
+template<class = detail::unspecified_month_disambiguator>
+CONSTCD14
+year_month_weekday_last
+operator+(const year_month_weekday_last& ymwdl, const months& dm) NOEXCEPT;
+
+template<class = detail::unspecified_month_disambiguator>
+CONSTCD14
+year_month_weekday_last
+operator+(const months& dm, const year_month_weekday_last& ymwdl) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday_last
+operator+(const year_month_weekday_last& ymwdl, const years& dy) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday_last
+operator+(const years& dy, const year_month_weekday_last& ymwdl) NOEXCEPT;
+
+template<class = detail::unspecified_month_disambiguator>
+CONSTCD14
+year_month_weekday_last
+operator-(const year_month_weekday_last& ymwdl, const months& dm) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday_last
+operator-(const year_month_weekday_last& ymwdl, const years& dy) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year_month_weekday_last& ymwdl);
+
+#if !defined(_MSC_VER) || (_MSC_VER >= 1900)
+inline namespace literals
+{
+
+CONSTCD11 date::day operator "" _d(unsigned long long d) NOEXCEPT;
+CONSTCD11 date::year operator "" _y(unsigned long long y) NOEXCEPT;
+
+} // inline namespace literals
+#endif // !defined(_MSC_VER) || (_MSC_VER >= 1900)
+
+// CONSTDATA date::month January{1};
+// CONSTDATA date::month February{2};
+// CONSTDATA date::month March{3};
+// CONSTDATA date::month April{4};
+// CONSTDATA date::month May{5};
+// CONSTDATA date::month June{6};
+// CONSTDATA date::month July{7};
+// CONSTDATA date::month August{8};
+// CONSTDATA date::month September{9};
+// CONSTDATA date::month October{10};
+// CONSTDATA date::month November{11};
+// CONSTDATA date::month December{12};
+//
+// CONSTDATA date::weekday Sunday{0u};
+// CONSTDATA date::weekday Monday{1u};
+// CONSTDATA date::weekday Tuesday{2u};
+// CONSTDATA date::weekday Wednesday{3u};
+// CONSTDATA date::weekday Thursday{4u};
+// CONSTDATA date::weekday Friday{5u};
+// CONSTDATA date::weekday Saturday{6u};
+
+#if HAS_VOID_T
+
+template <class T, class = std::void_t<>>
+struct is_clock
+ : std::false_type
+{};
+
+template <class T>
+struct is_clock<T, std::void_t<decltype(T::now()), typename T::rep, typename T::period,
+ typename T::duration, typename T::time_point,
+ decltype(T::is_steady)>>
+ : std::true_type
+{};
+
+template<class T> inline constexpr bool is_clock_v = is_clock<T>::value;
+
+#endif // HAS_VOID_T
+
+//----------------+
+// Implementation |
+//----------------+
+
+// utilities
+namespace detail {
+
+template<class CharT, class Traits = std::char_traits<CharT>>
+class save_istream
+{
+protected:
+ std::basic_ios<CharT, Traits>& is_;
+ CharT fill_;
+ std::ios::fmtflags flags_;
+ std::streamsize precision_;
+ std::streamsize width_;
+ std::basic_ostream<CharT, Traits>* tie_;
+ std::locale loc_;
+
+public:
+ ~save_istream()
+ {
+ is_.fill(fill_);
+ is_.flags(flags_);
+ is_.precision(precision_);
+ is_.width(width_);
+ is_.imbue(loc_);
+ is_.tie(tie_);
+ }
+
+ save_istream(const save_istream&) = delete;
+ save_istream& operator=(const save_istream&) = delete;
+
+ explicit save_istream(std::basic_ios<CharT, Traits>& is)
+ : is_(is)
+ , fill_(is.fill())
+ , flags_(is.flags())
+ , precision_(is.precision())
+ , width_(is.width(0))
+ , tie_(is.tie(nullptr))
+ , loc_(is.getloc())
+ {
+ if (tie_ != nullptr)
+ tie_->flush();
+ }
+};
+
+template<class CharT, class Traits = std::char_traits<CharT>>
+class save_ostream
+ : private save_istream<CharT, Traits>
+{
+public:
+ ~save_ostream()
+ {
+ if ((this->flags_ & std::ios::unitbuf) &&
+#if HAS_UNCAUGHT_EXCEPTIONS
+ std::uncaught_exceptions() == 0 &&
+#else
+ !std::uncaught_exception() &&
+#endif
+ this->is_.good())
+ this->is_.rdbuf()->pubsync();
+ }
+
+ save_ostream(const save_ostream&) = delete;
+ save_ostream& operator=(const save_ostream&) = delete;
+
+ explicit save_ostream(std::basic_ios<CharT, Traits>& os)
+ : save_istream<CharT, Traits>(os)
+ {
+ }
+};
+
+template <class T>
+struct choose_trunc_type
+{
+ static const int digits = std::numeric_limits<T>::digits;
+ using type = typename std::conditional
+ <
+ digits < 32,
+ std::int32_t,
+ typename std::conditional
+ <
+ digits < 64,
+ std::int64_t,
+#ifdef __SIZEOF_INT128__
+ __int128
+#else
+ std::int64_t
+#endif
+ >::type
+ >::type;
+};
+
+template <class T>
+CONSTCD11
+inline
+typename std::enable_if
+<
+ !std::chrono::treat_as_floating_point<T>::value,
+ T
+>::type
+trunc(T t) NOEXCEPT
+{
+ return t;
+}
+
+template <class T>
+CONSTCD14
+inline
+typename std::enable_if
+<
+ std::chrono::treat_as_floating_point<T>::value,
+ T
+>::type
+trunc(T t) NOEXCEPT
+{
+ using std::numeric_limits;
+ using I = typename choose_trunc_type<T>::type;
+ CONSTDATA auto digits = numeric_limits<T>::digits;
+ static_assert(digits < numeric_limits<I>::digits, "");
+ CONSTDATA auto max = I{1} << (digits-1);
+ CONSTDATA auto min = -max;
+ const auto negative = t < T{0};
+ if (min <= t && t <= max && t != 0 && t == t)
+ {
+ t = static_cast<T>(static_cast<I>(t));
+ if (t == 0 && negative)
+ t = -t;
+ }
+ return t;
+}
+
+template <std::intmax_t Xp, std::intmax_t Yp>
+struct static_gcd
+{
+ static const std::intmax_t value = static_gcd<Yp, Xp % Yp>::value;
+};
+
+template <std::intmax_t Xp>
+struct static_gcd<Xp, 0>
+{
+ static const std::intmax_t value = Xp;
+};
+
+template <>
+struct static_gcd<0, 0>
+{
+ static const std::intmax_t value = 1;
+};
+
+template <class R1, class R2>
+struct no_overflow
+{
+private:
+ static const std::intmax_t gcd_n1_n2 = static_gcd<R1::num, R2::num>::value;
+ static const std::intmax_t gcd_d1_d2 = static_gcd<R1::den, R2::den>::value;
+ static const std::intmax_t n1 = R1::num / gcd_n1_n2;
+ static const std::intmax_t d1 = R1::den / gcd_d1_d2;
+ static const std::intmax_t n2 = R2::num / gcd_n1_n2;
+ static const std::intmax_t d2 = R2::den / gcd_d1_d2;
+#ifdef __cpp_constexpr
+ static const std::intmax_t max = std::numeric_limits<std::intmax_t>::max();
+#else
+ static const std::intmax_t max = LLONG_MAX;
+#endif
+
+ template <std::intmax_t Xp, std::intmax_t Yp, bool overflow>
+ struct mul // overflow == false
+ {
+ static const std::intmax_t value = Xp * Yp;
+ };
+
+ template <std::intmax_t Xp, std::intmax_t Yp>
+ struct mul<Xp, Yp, true>
+ {
+ static const std::intmax_t value = 1;
+ };
+
+public:
+ static const bool value = (n1 <= max / d2) && (n2 <= max / d1);
+ typedef std::ratio<mul<n1, d2, !value>::value,
+ mul<n2, d1, !value>::value> type;
+};
+
+} // detail
+
+// trunc towards zero
+template <class To, class Rep, class Period>
+CONSTCD11
+inline
+typename std::enable_if
+<
+ detail::no_overflow<Period, typename To::period>::value,
+ To
+>::type
+trunc(const std::chrono::duration<Rep, Period>& d)
+{
+ return To{detail::trunc(std::chrono::duration_cast<To>(d).count())};
+}
+
+template <class To, class Rep, class Period>
+CONSTCD11
+inline
+typename std::enable_if
+<
+ !detail::no_overflow<Period, typename To::period>::value,
+ To
+>::type
+trunc(const std::chrono::duration<Rep, Period>& d)
+{
+ using std::chrono::duration_cast;
+ using std::chrono::duration;
+ using rep = typename std::common_type<Rep, typename To::rep>::type;
+ return To{detail::trunc(duration_cast<To>(duration_cast<duration<rep>>(d)).count())};
+}
+
+#ifndef HAS_CHRONO_ROUNDING
+# if defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 190023918 || (_MSC_FULL_VER >= 190000000 && defined (__clang__)))
+# define HAS_CHRONO_ROUNDING 1
+# elif defined(__cpp_lib_chrono) && __cplusplus > 201402 && __cpp_lib_chrono >= 201510
+# define HAS_CHRONO_ROUNDING 1
+# elif defined(_LIBCPP_VERSION) && __cplusplus > 201402 && _LIBCPP_VERSION >= 3800
+# define HAS_CHRONO_ROUNDING 1
+# else
+# define HAS_CHRONO_ROUNDING 0
+# endif
+#endif // HAS_CHRONO_ROUNDING
+
+#if HAS_CHRONO_ROUNDING == 0
+
+// round down
+template <class To, class Rep, class Period>
+CONSTCD14
+inline
+typename std::enable_if
+<
+ detail::no_overflow<Period, typename To::period>::value,
+ To
+>::type
+floor(const std::chrono::duration<Rep, Period>& d)
+{
+ auto t = trunc<To>(d);
+ if (t > d)
+ return t - To{1};
+ return t;
+}
+
+template <class To, class Rep, class Period>
+CONSTCD14
+inline
+typename std::enable_if
+<
+ !detail::no_overflow<Period, typename To::period>::value,
+ To
+>::type
+floor(const std::chrono::duration<Rep, Period>& d)
+{
+ using rep = typename std::common_type<Rep, typename To::rep>::type;
+ return floor<To>(floor<std::chrono::duration<rep>>(d));
+}
+
+// round to nearest, to even on tie
+template <class To, class Rep, class Period>
+CONSTCD14
+inline
+To
+round(const std::chrono::duration<Rep, Period>& d)
+{
+ auto t0 = floor<To>(d);
+ auto t1 = t0 + To{1};
+ if (t1 == To{0} && t0 < To{0})
+ t1 = -t1;
+ auto diff0 = d - t0;
+ auto diff1 = t1 - d;
+ if (diff0 == diff1)
+ {
+ if (t0 - trunc<To>(t0/2)*2 == To{0})
+ return t0;
+ return t1;
+ }
+ if (diff0 < diff1)
+ return t0;
+ return t1;
+}
+
+// round up
+template <class To, class Rep, class Period>
+CONSTCD14
+inline
+To
+ceil(const std::chrono::duration<Rep, Period>& d)
+{
+ auto t = trunc<To>(d);
+ if (t < d)
+ return t + To{1};
+ return t;
+}
+
+template <class Rep, class Period,
+ class = typename std::enable_if
+ <
+ std::numeric_limits<Rep>::is_signed
+ >::type>
+CONSTCD11
+std::chrono::duration<Rep, Period>
+abs(std::chrono::duration<Rep, Period> d)
+{
+ return d >= d.zero() ? d : -d;
+}
+
+// round down
+template <class To, class Clock, class FromDuration>
+CONSTCD11
+inline
+std::chrono::time_point<Clock, To>
+floor(const std::chrono::time_point<Clock, FromDuration>& tp)
+{
+ using std::chrono::time_point;
+ return time_point<Clock, To>{date::floor<To>(tp.time_since_epoch())};
+}
+
+// round to nearest, to even on tie
+template <class To, class Clock, class FromDuration>
+CONSTCD11
+inline
+std::chrono::time_point<Clock, To>
+round(const std::chrono::time_point<Clock, FromDuration>& tp)
+{
+ using std::chrono::time_point;
+ return time_point<Clock, To>{round<To>(tp.time_since_epoch())};
+}
+
+// round up
+template <class To, class Clock, class FromDuration>
+CONSTCD11
+inline
+std::chrono::time_point<Clock, To>
+ceil(const std::chrono::time_point<Clock, FromDuration>& tp)
+{
+ using std::chrono::time_point;
+ return time_point<Clock, To>{ceil<To>(tp.time_since_epoch())};
+}
+
+#else // HAS_CHRONO_ROUNDING == 1
+
+using std::chrono::floor;
+using std::chrono::ceil;
+using std::chrono::round;
+using std::chrono::abs;
+
+#endif // HAS_CHRONO_ROUNDING
+
+namespace detail
+{
+
+template <class To, class Rep, class Period>
+CONSTCD14
+inline
+typename std::enable_if
+<
+ !std::chrono::treat_as_floating_point<typename To::rep>::value,
+ To
+>::type
+round_i(const std::chrono::duration<Rep, Period>& d)
+{
+ return round<To>(d);
+}
+
+template <class To, class Rep, class Period>
+CONSTCD14
+inline
+typename std::enable_if
+<
+ std::chrono::treat_as_floating_point<typename To::rep>::value,
+ To
+>::type
+round_i(const std::chrono::duration<Rep, Period>& d)
+{
+ return d;
+}
+
+template <class To, class Clock, class FromDuration>
+CONSTCD11
+inline
+std::chrono::time_point<Clock, To>
+round_i(const std::chrono::time_point<Clock, FromDuration>& tp)
+{
+ using std::chrono::time_point;
+ return time_point<Clock, To>{round_i<To>(tp.time_since_epoch())};
+}
+
+} // detail
+
+// trunc towards zero
+template <class To, class Clock, class FromDuration>
+CONSTCD11
+inline
+std::chrono::time_point<Clock, To>
+trunc(const std::chrono::time_point<Clock, FromDuration>& tp)
+{
+ using std::chrono::time_point;
+ return time_point<Clock, To>{trunc<To>(tp.time_since_epoch())};
+}
+
+// day
+
+CONSTCD11 inline day::day(unsigned d) NOEXCEPT : d_(static_cast<decltype(d_)>(d)) {}
+CONSTCD14 inline day& day::operator++() NOEXCEPT {++d_; return *this;}
+CONSTCD14 inline day day::operator++(int) NOEXCEPT {auto tmp(*this); ++(*this); return tmp;}
+CONSTCD14 inline day& day::operator--() NOEXCEPT {--d_; return *this;}
+CONSTCD14 inline day day::operator--(int) NOEXCEPT {auto tmp(*this); --(*this); return tmp;}
+CONSTCD14 inline day& day::operator+=(const days& d) NOEXCEPT {*this = *this + d; return *this;}
+CONSTCD14 inline day& day::operator-=(const days& d) NOEXCEPT {*this = *this - d; return *this;}
+CONSTCD11 inline day::operator unsigned() const NOEXCEPT {return d_;}
+CONSTCD11 inline bool day::ok() const NOEXCEPT {return 1 <= d_ && d_ <= 31;}
+
+CONSTCD11
+inline
+bool
+operator==(const day& x, const day& y) NOEXCEPT
+{
+ return static_cast<unsigned>(x) == static_cast<unsigned>(y);
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const day& x, const day& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+CONSTCD11
+inline
+bool
+operator<(const day& x, const day& y) NOEXCEPT
+{
+ return static_cast<unsigned>(x) < static_cast<unsigned>(y);
+}
+
+CONSTCD11
+inline
+bool
+operator>(const day& x, const day& y) NOEXCEPT
+{
+ return y < x;
+}
+
+CONSTCD11
+inline
+bool
+operator<=(const day& x, const day& y) NOEXCEPT
+{
+ return !(y < x);
+}
+
+CONSTCD11
+inline
+bool
+operator>=(const day& x, const day& y) NOEXCEPT
+{
+ return !(x < y);
+}
+
+CONSTCD11
+inline
+days
+operator-(const day& x, const day& y) NOEXCEPT
+{
+ return days{static_cast<days::rep>(static_cast<unsigned>(x)
+ - static_cast<unsigned>(y))};
+}
+
+CONSTCD11
+inline
+day
+operator+(const day& x, const days& y) NOEXCEPT
+{
+ return day{static_cast<unsigned>(x) + static_cast<unsigned>(y.count())};
+}
+
+CONSTCD11
+inline
+day
+operator+(const days& x, const day& y) NOEXCEPT
+{
+ return y + x;
+}
+
+CONSTCD11
+inline
+day
+operator-(const day& x, const days& y) NOEXCEPT
+{
+ return x + -y;
+}
+
+namespace detail
+{
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+low_level_fmt(std::basic_ostream<CharT, Traits>& os, const day& d)
+{
+ detail::save_ostream<CharT, Traits> _(os);
+ os.fill('0');
+ os.flags(std::ios::dec | std::ios::right);
+ os.width(2);
+ os << static_cast<unsigned>(d);
+ return os;
+}
+
+} // namespace detail
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const day& d)
+{
+ detail::low_level_fmt(os, d);
+ if (!d.ok())
+ os << " is not a valid day";
+ return os;
+}
+
+// month
+
+CONSTCD11 inline month::month(unsigned m) NOEXCEPT : m_(static_cast<decltype(m_)>(m)) {}
+CONSTCD14 inline month& month::operator++() NOEXCEPT {*this += months{1}; return *this;}
+CONSTCD14 inline month month::operator++(int) NOEXCEPT {auto tmp(*this); ++(*this); return tmp;}
+CONSTCD14 inline month& month::operator--() NOEXCEPT {*this -= months{1}; return *this;}
+CONSTCD14 inline month month::operator--(int) NOEXCEPT {auto tmp(*this); --(*this); return tmp;}
+
+CONSTCD14
+inline
+month&
+month::operator+=(const months& m) NOEXCEPT
+{
+ *this = *this + m;
+ return *this;
+}
+
+CONSTCD14
+inline
+month&
+month::operator-=(const months& m) NOEXCEPT
+{
+ *this = *this - m;
+ return *this;
+}
+
+CONSTCD11 inline month::operator unsigned() const NOEXCEPT {return m_;}
+CONSTCD11 inline bool month::ok() const NOEXCEPT {return 1 <= m_ && m_ <= 12;}
+
+CONSTCD11
+inline
+bool
+operator==(const month& x, const month& y) NOEXCEPT
+{
+ return static_cast<unsigned>(x) == static_cast<unsigned>(y);
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const month& x, const month& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+CONSTCD11
+inline
+bool
+operator<(const month& x, const month& y) NOEXCEPT
+{
+ return static_cast<unsigned>(x) < static_cast<unsigned>(y);
+}
+
+CONSTCD11
+inline
+bool
+operator>(const month& x, const month& y) NOEXCEPT
+{
+ return y < x;
+}
+
+CONSTCD11
+inline
+bool
+operator<=(const month& x, const month& y) NOEXCEPT
+{
+ return !(y < x);
+}
+
+CONSTCD11
+inline
+bool
+operator>=(const month& x, const month& y) NOEXCEPT
+{
+ return !(x < y);
+}
+
+CONSTCD14
+inline
+months
+operator-(const month& x, const month& y) NOEXCEPT
+{
+ auto const d = static_cast<unsigned>(x) - static_cast<unsigned>(y);
+ return months(d <= 11 ? d : d + 12);
+}
+
+CONSTCD14
+inline
+month
+operator+(const month& x, const months& y) NOEXCEPT
+{
+ auto const mu = static_cast<long long>(static_cast<unsigned>(x)) + y.count() - 1;
+ auto const yr = (mu >= 0 ? mu : mu-11) / 12;
+ return month{static_cast<unsigned>(mu - yr * 12 + 1)};
+}
+
+CONSTCD14
+inline
+month
+operator+(const months& x, const month& y) NOEXCEPT
+{
+ return y + x;
+}
+
+CONSTCD14
+inline
+month
+operator-(const month& x, const months& y) NOEXCEPT
+{
+ return x + -y;
+}
+
+namespace detail
+{
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+low_level_fmt(std::basic_ostream<CharT, Traits>& os, const month& m)
+{
+ if (m.ok())
+ {
+ CharT fmt[] = {'%', 'b', 0};
+ os << format(os.getloc(), fmt, m);
+ }
+ else
+ os << static_cast<unsigned>(m);
+ return os;
+}
+
+} // namespace detail
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const month& m)
+{
+ detail::low_level_fmt(os, m);
+ if (!m.ok())
+ os << " is not a valid month";
+ return os;
+}
+
+// year
+
+CONSTCD11 inline year::year(int y) NOEXCEPT : y_(static_cast<decltype(y_)>(y)) {}
+CONSTCD14 inline year& year::operator++() NOEXCEPT {++y_; return *this;}
+CONSTCD14 inline year year::operator++(int) NOEXCEPT {auto tmp(*this); ++(*this); return tmp;}
+CONSTCD14 inline year& year::operator--() NOEXCEPT {--y_; return *this;}
+CONSTCD14 inline year year::operator--(int) NOEXCEPT {auto tmp(*this); --(*this); return tmp;}
+CONSTCD14 inline year& year::operator+=(const years& y) NOEXCEPT {*this = *this + y; return *this;}
+CONSTCD14 inline year& year::operator-=(const years& y) NOEXCEPT {*this = *this - y; return *this;}
+CONSTCD11 inline year year::operator-() const NOEXCEPT {return year{-y_};}
+CONSTCD11 inline year year::operator+() const NOEXCEPT {return *this;}
+
+CONSTCD11
+inline
+bool
+year::is_leap() const NOEXCEPT
+{
+ return y_ % 4 == 0 && (y_ % 100 != 0 || y_ % 400 == 0);
+}
+
+CONSTCD11 inline year::operator int() const NOEXCEPT {return y_;}
+
+CONSTCD11
+inline
+bool
+year::ok() const NOEXCEPT
+{
+ return y_ != std::numeric_limits<short>::min();
+}
+
+CONSTCD11
+inline
+bool
+operator==(const year& x, const year& y) NOEXCEPT
+{
+ return static_cast<int>(x) == static_cast<int>(y);
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const year& x, const year& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+CONSTCD11
+inline
+bool
+operator<(const year& x, const year& y) NOEXCEPT
+{
+ return static_cast<int>(x) < static_cast<int>(y);
+}
+
+CONSTCD11
+inline
+bool
+operator>(const year& x, const year& y) NOEXCEPT
+{
+ return y < x;
+}
+
+CONSTCD11
+inline
+bool
+operator<=(const year& x, const year& y) NOEXCEPT
+{
+ return !(y < x);
+}
+
+CONSTCD11
+inline
+bool
+operator>=(const year& x, const year& y) NOEXCEPT
+{
+ return !(x < y);
+}
+
+CONSTCD11
+inline
+years
+operator-(const year& x, const year& y) NOEXCEPT
+{
+ return years{static_cast<int>(x) - static_cast<int>(y)};
+}
+
+CONSTCD11
+inline
+year
+operator+(const year& x, const years& y) NOEXCEPT
+{
+ return year{static_cast<int>(x) + y.count()};
+}
+
+CONSTCD11
+inline
+year
+operator+(const years& x, const year& y) NOEXCEPT
+{
+ return y + x;
+}
+
+CONSTCD11
+inline
+year
+operator-(const year& x, const years& y) NOEXCEPT
+{
+ return year{static_cast<int>(x) - y.count()};
+}
+
+namespace detail
+{
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+low_level_fmt(std::basic_ostream<CharT, Traits>& os, const year& y)
+{
+ detail::save_ostream<CharT, Traits> _(os);
+ os.fill('0');
+ os.flags(std::ios::dec | std::ios::internal);
+ os.width(4 + (y < year{0}));
+ os.imbue(std::locale::classic());
+ os << static_cast<int>(y);
+ return os;
+}
+
+} // namespace detail
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year& y)
+{
+ detail::low_level_fmt(os, y);
+ if (!y.ok())
+ os << " is not a valid year";
+ return os;
+}
+
+// weekday
+
+CONSTCD14
+inline
+unsigned char
+weekday::weekday_from_days(int z) NOEXCEPT
+{
+ auto u = static_cast<unsigned>(z);
+ return static_cast<unsigned char>(z >= -4 ? (u+4) % 7 : u % 7);
+}
+
+CONSTCD11
+inline
+weekday::weekday(unsigned wd) NOEXCEPT
+ : wd_(static_cast<decltype(wd_)>(wd != 7 ? wd : 0))
+ {}
+
+CONSTCD14
+inline
+weekday::weekday(const sys_days& dp) NOEXCEPT
+ : wd_(weekday_from_days(dp.time_since_epoch().count()))
+ {}
+
+CONSTCD14
+inline
+weekday::weekday(const local_days& dp) NOEXCEPT
+ : wd_(weekday_from_days(dp.time_since_epoch().count()))
+ {}
+
+CONSTCD14 inline weekday& weekday::operator++() NOEXCEPT {*this += days{1}; return *this;}
+CONSTCD14 inline weekday weekday::operator++(int) NOEXCEPT {auto tmp(*this); ++(*this); return tmp;}
+CONSTCD14 inline weekday& weekday::operator--() NOEXCEPT {*this -= days{1}; return *this;}
+CONSTCD14 inline weekday weekday::operator--(int) NOEXCEPT {auto tmp(*this); --(*this); return tmp;}
+
+CONSTCD14
+inline
+weekday&
+weekday::operator+=(const days& d) NOEXCEPT
+{
+ *this = *this + d;
+ return *this;
+}
+
+CONSTCD14
+inline
+weekday&
+weekday::operator-=(const days& d) NOEXCEPT
+{
+ *this = *this - d;
+ return *this;
+}
+
+CONSTCD11 inline bool weekday::ok() const NOEXCEPT {return wd_ <= 6;}
+
+CONSTCD11
+inline
+unsigned weekday::c_encoding() const NOEXCEPT
+{
+ return unsigned{wd_};
+}
+
+CONSTCD11
+inline
+unsigned weekday::iso_encoding() const NOEXCEPT
+{
+ return unsigned{((wd_ == 0u) ? 7u : wd_)};
+}
+
+CONSTCD11
+inline
+bool
+operator==(const weekday& x, const weekday& y) NOEXCEPT
+{
+ return x.wd_ == y.wd_;
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const weekday& x, const weekday& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+CONSTCD14
+inline
+days
+operator-(const weekday& x, const weekday& y) NOEXCEPT
+{
+ auto const wdu = x.wd_ - y.wd_;
+ auto const wk = (wdu >= 0 ? wdu : wdu-6) / 7;
+ return days{wdu - wk * 7};
+}
+
+CONSTCD14
+inline
+weekday
+operator+(const weekday& x, const days& y) NOEXCEPT
+{
+ auto const wdu = static_cast<long long>(static_cast<unsigned>(x.wd_)) + y.count();
+ auto const wk = (wdu >= 0 ? wdu : wdu-6) / 7;
+ return weekday{static_cast<unsigned>(wdu - wk * 7)};
+}
+
+CONSTCD14
+inline
+weekday
+operator+(const days& x, const weekday& y) NOEXCEPT
+{
+ return y + x;
+}
+
+CONSTCD14
+inline
+weekday
+operator-(const weekday& x, const days& y) NOEXCEPT
+{
+ return x + -y;
+}
+
+namespace detail
+{
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+low_level_fmt(std::basic_ostream<CharT, Traits>& os, const weekday& wd)
+{
+ if (wd.ok())
+ {
+ CharT fmt[] = {'%', 'a', 0};
+ os << format(fmt, wd);
+ }
+ else
+ os << wd.c_encoding();
+ return os;
+}
+
+} // namespace detail
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const weekday& wd)
+{
+ detail::low_level_fmt(os, wd);
+ if (!wd.ok())
+ os << " is not a valid weekday";
+ return os;
+}
+
+#if !defined(_MSC_VER) || (_MSC_VER >= 1900)
+inline namespace literals
+{
+
+CONSTCD11
+inline
+date::day
+operator "" _d(unsigned long long d) NOEXCEPT
+{
+ return date::day{static_cast<unsigned>(d)};
+}
+
+CONSTCD11
+inline
+date::year
+operator "" _y(unsigned long long y) NOEXCEPT
+{
+ return date::year(static_cast<int>(y));
+}
+#endif // !defined(_MSC_VER) || (_MSC_VER >= 1900)
+
+CONSTDATA date::last_spec last{};
+
+CONSTDATA date::month jan{1};
+CONSTDATA date::month feb{2};
+CONSTDATA date::month mar{3};
+CONSTDATA date::month apr{4};
+CONSTDATA date::month may{5};
+CONSTDATA date::month jun{6};
+CONSTDATA date::month jul{7};
+CONSTDATA date::month aug{8};
+CONSTDATA date::month sep{9};
+CONSTDATA date::month oct{10};
+CONSTDATA date::month nov{11};
+CONSTDATA date::month dec{12};
+
+CONSTDATA date::weekday sun{0u};
+CONSTDATA date::weekday mon{1u};
+CONSTDATA date::weekday tue{2u};
+CONSTDATA date::weekday wed{3u};
+CONSTDATA date::weekday thu{4u};
+CONSTDATA date::weekday fri{5u};
+CONSTDATA date::weekday sat{6u};
+
+#if !defined(_MSC_VER) || (_MSC_VER >= 1900)
+} // inline namespace literals
+#endif
+
+CONSTDATA date::month January{1};
+CONSTDATA date::month February{2};
+CONSTDATA date::month March{3};
+CONSTDATA date::month April{4};
+CONSTDATA date::month May{5};
+CONSTDATA date::month June{6};
+CONSTDATA date::month July{7};
+CONSTDATA date::month August{8};
+CONSTDATA date::month September{9};
+CONSTDATA date::month October{10};
+CONSTDATA date::month November{11};
+CONSTDATA date::month December{12};
+
+CONSTDATA date::weekday Monday{1};
+CONSTDATA date::weekday Tuesday{2};
+CONSTDATA date::weekday Wednesday{3};
+CONSTDATA date::weekday Thursday{4};
+CONSTDATA date::weekday Friday{5};
+CONSTDATA date::weekday Saturday{6};
+CONSTDATA date::weekday Sunday{7};
+
+// weekday_indexed
+
+CONSTCD11
+inline
+weekday
+weekday_indexed::weekday() const NOEXCEPT
+{
+ return date::weekday{static_cast<unsigned>(wd_)};
+}
+
+CONSTCD11 inline unsigned weekday_indexed::index() const NOEXCEPT {return index_;}
+
+CONSTCD11
+inline
+bool
+weekday_indexed::ok() const NOEXCEPT
+{
+ return weekday().ok() && 1 <= index_ && index_ <= 5;
+}
+
+#ifdef __GNUC__
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wconversion"
+#endif // __GNUC__
+
+CONSTCD11
+inline
+weekday_indexed::weekday_indexed(const date::weekday& wd, unsigned index) NOEXCEPT
+ : wd_(static_cast<decltype(wd_)>(static_cast<unsigned>(wd.wd_)))
+ , index_(static_cast<decltype(index_)>(index))
+ {}
+
+#ifdef __GNUC__
+# pragma GCC diagnostic pop
+#endif // __GNUC__
+
+namespace detail
+{
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+low_level_fmt(std::basic_ostream<CharT, Traits>& os, const weekday_indexed& wdi)
+{
+ return low_level_fmt(os, wdi.weekday()) << '[' << wdi.index() << ']';
+}
+
+} // namespace detail
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const weekday_indexed& wdi)
+{
+ detail::low_level_fmt(os, wdi);
+ if (!wdi.ok())
+ os << " is not a valid weekday_indexed";
+ return os;
+}
+
+CONSTCD11
+inline
+weekday_indexed
+weekday::operator[](unsigned index) const NOEXCEPT
+{
+ return {*this, index};
+}
+
+CONSTCD11
+inline
+bool
+operator==(const weekday_indexed& x, const weekday_indexed& y) NOEXCEPT
+{
+ return x.weekday() == y.weekday() && x.index() == y.index();
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const weekday_indexed& x, const weekday_indexed& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+// weekday_last
+
+CONSTCD11 inline date::weekday weekday_last::weekday() const NOEXCEPT {return wd_;}
+CONSTCD11 inline bool weekday_last::ok() const NOEXCEPT {return wd_.ok();}
+CONSTCD11 inline weekday_last::weekday_last(const date::weekday& wd) NOEXCEPT : wd_(wd) {}
+
+CONSTCD11
+inline
+bool
+operator==(const weekday_last& x, const weekday_last& y) NOEXCEPT
+{
+ return x.weekday() == y.weekday();
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const weekday_last& x, const weekday_last& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+namespace detail
+{
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+low_level_fmt(std::basic_ostream<CharT, Traits>& os, const weekday_last& wdl)
+{
+ return low_level_fmt(os, wdl.weekday()) << "[last]";
+}
+
+} // namespace detail
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const weekday_last& wdl)
+{
+ detail::low_level_fmt(os, wdl);
+ if (!wdl.ok())
+ os << " is not a valid weekday_last";
+ return os;
+}
+
+CONSTCD11
+inline
+weekday_last
+weekday::operator[](last_spec) const NOEXCEPT
+{
+ return weekday_last{*this};
+}
+
+// year_month
+
+CONSTCD11
+inline
+year_month::year_month(const date::year& y, const date::month& m) NOEXCEPT
+ : y_(y)
+ , m_(m)
+ {}
+
+CONSTCD11 inline year year_month::year() const NOEXCEPT {return y_;}
+CONSTCD11 inline month year_month::month() const NOEXCEPT {return m_;}
+CONSTCD11 inline bool year_month::ok() const NOEXCEPT {return y_.ok() && m_.ok();}
+
+template<class>
+CONSTCD14
+inline
+year_month&
+year_month::operator+=(const months& dm) NOEXCEPT
+{
+ *this = *this + dm;
+ return *this;
+}
+
+template<class>
+CONSTCD14
+inline
+year_month&
+year_month::operator-=(const months& dm) NOEXCEPT
+{
+ *this = *this - dm;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month&
+year_month::operator+=(const years& dy) NOEXCEPT
+{
+ *this = *this + dy;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month&
+year_month::operator-=(const years& dy) NOEXCEPT
+{
+ *this = *this - dy;
+ return *this;
+}
+
+CONSTCD11
+inline
+bool
+operator==(const year_month& x, const year_month& y) NOEXCEPT
+{
+ return x.year() == y.year() && x.month() == y.month();
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const year_month& x, const year_month& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+CONSTCD11
+inline
+bool
+operator<(const year_month& x, const year_month& y) NOEXCEPT
+{
+ return x.year() < y.year() ? true
+ : (x.year() > y.year() ? false
+ : (x.month() < y.month()));
+}
+
+CONSTCD11
+inline
+bool
+operator>(const year_month& x, const year_month& y) NOEXCEPT
+{
+ return y < x;
+}
+
+CONSTCD11
+inline
+bool
+operator<=(const year_month& x, const year_month& y) NOEXCEPT
+{
+ return !(y < x);
+}
+
+CONSTCD11
+inline
+bool
+operator>=(const year_month& x, const year_month& y) NOEXCEPT
+{
+ return !(x < y);
+}
+
+template<class>
+CONSTCD14
+inline
+year_month
+operator+(const year_month& ym, const months& dm) NOEXCEPT
+{
+ auto dmi = static_cast<int>(static_cast<unsigned>(ym.month())) - 1 + dm.count();
+ auto dy = (dmi >= 0 ? dmi : dmi-11) / 12;
+ dmi = dmi - dy * 12 + 1;
+ return (ym.year() + years(dy)) / month(static_cast<unsigned>(dmi));
+}
+
+template<class>
+CONSTCD14
+inline
+year_month
+operator+(const months& dm, const year_month& ym) NOEXCEPT
+{
+ return ym + dm;
+}
+
+template<class>
+CONSTCD14
+inline
+year_month
+operator-(const year_month& ym, const months& dm) NOEXCEPT
+{
+ return ym + -dm;
+}
+
+CONSTCD11
+inline
+months
+operator-(const year_month& x, const year_month& y) NOEXCEPT
+{
+ return (x.year() - y.year()) +
+ months(static_cast<unsigned>(x.month()) - static_cast<unsigned>(y.month()));
+}
+
+CONSTCD11
+inline
+year_month
+operator+(const year_month& ym, const years& dy) NOEXCEPT
+{
+ return (ym.year() + dy) / ym.month();
+}
+
+CONSTCD11
+inline
+year_month
+operator+(const years& dy, const year_month& ym) NOEXCEPT
+{
+ return ym + dy;
+}
+
+CONSTCD11
+inline
+year_month
+operator-(const year_month& ym, const years& dy) NOEXCEPT
+{
+ return ym + -dy;
+}
+
+namespace detail
+{
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+low_level_fmt(std::basic_ostream<CharT, Traits>& os, const year_month& ym)
+{
+ low_level_fmt(os, ym.year()) << '/';
+ return low_level_fmt(os, ym.month());
+}
+
+} // namespace detail
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year_month& ym)
+{
+ detail::low_level_fmt(os, ym);
+ if (!ym.ok())
+ os << " is not a valid year_month";
+ return os;
+}
+
+// month_day
+
+CONSTCD11
+inline
+month_day::month_day(const date::month& m, const date::day& d) NOEXCEPT
+ : m_(m)
+ , d_(d)
+ {}
+
+CONSTCD11 inline date::month month_day::month() const NOEXCEPT {return m_;}
+CONSTCD11 inline date::day month_day::day() const NOEXCEPT {return d_;}
+
+CONSTCD14
+inline
+bool
+month_day::ok() const NOEXCEPT
+{
+ CONSTDATA date::day d[] =
+ {
+ date::day(31), date::day(29), date::day(31),
+ date::day(30), date::day(31), date::day(30),
+ date::day(31), date::day(31), date::day(30),
+ date::day(31), date::day(30), date::day(31)
+ };
+ return m_.ok() && date::day{1} <= d_ && d_ <= d[static_cast<unsigned>(m_)-1];
+}
+
+CONSTCD11
+inline
+bool
+operator==(const month_day& x, const month_day& y) NOEXCEPT
+{
+ return x.month() == y.month() && x.day() == y.day();
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const month_day& x, const month_day& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+CONSTCD11
+inline
+bool
+operator<(const month_day& x, const month_day& y) NOEXCEPT
+{
+ return x.month() < y.month() ? true
+ : (x.month() > y.month() ? false
+ : (x.day() < y.day()));
+}
+
+CONSTCD11
+inline
+bool
+operator>(const month_day& x, const month_day& y) NOEXCEPT
+{
+ return y < x;
+}
+
+CONSTCD11
+inline
+bool
+operator<=(const month_day& x, const month_day& y) NOEXCEPT
+{
+ return !(y < x);
+}
+
+CONSTCD11
+inline
+bool
+operator>=(const month_day& x, const month_day& y) NOEXCEPT
+{
+ return !(x < y);
+}
+
+namespace detail
+{
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+low_level_fmt(std::basic_ostream<CharT, Traits>& os, const month_day& md)
+{
+ low_level_fmt(os, md.month()) << '/';
+ return low_level_fmt(os, md.day());
+}
+
+} // namespace detail
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const month_day& md)
+{
+ detail::low_level_fmt(os, md);
+ if (!md.ok())
+ os << " is not a valid month_day";
+ return os;
+}
+
+// month_day_last
+
+CONSTCD11 inline month month_day_last::month() const NOEXCEPT {return m_;}
+CONSTCD11 inline bool month_day_last::ok() const NOEXCEPT {return m_.ok();}
+CONSTCD11 inline month_day_last::month_day_last(const date::month& m) NOEXCEPT : m_(m) {}
+
+CONSTCD11
+inline
+bool
+operator==(const month_day_last& x, const month_day_last& y) NOEXCEPT
+{
+ return x.month() == y.month();
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const month_day_last& x, const month_day_last& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+CONSTCD11
+inline
+bool
+operator<(const month_day_last& x, const month_day_last& y) NOEXCEPT
+{
+ return x.month() < y.month();
+}
+
+CONSTCD11
+inline
+bool
+operator>(const month_day_last& x, const month_day_last& y) NOEXCEPT
+{
+ return y < x;
+}
+
+CONSTCD11
+inline
+bool
+operator<=(const month_day_last& x, const month_day_last& y) NOEXCEPT
+{
+ return !(y < x);
+}
+
+CONSTCD11
+inline
+bool
+operator>=(const month_day_last& x, const month_day_last& y) NOEXCEPT
+{
+ return !(x < y);
+}
+
+namespace detail
+{
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+low_level_fmt(std::basic_ostream<CharT, Traits>& os, const month_day_last& mdl)
+{
+ return low_level_fmt(os, mdl.month()) << "/last";
+}
+
+} // namespace detail
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const month_day_last& mdl)
+{
+ detail::low_level_fmt(os, mdl);
+ if (!mdl.ok())
+ os << " is not a valid month_day_last";
+ return os;
+}
+
+// month_weekday
+
+CONSTCD11
+inline
+month_weekday::month_weekday(const date::month& m,
+ const date::weekday_indexed& wdi) NOEXCEPT
+ : m_(m)
+ , wdi_(wdi)
+ {}
+
+CONSTCD11 inline month month_weekday::month() const NOEXCEPT {return m_;}
+
+CONSTCD11
+inline
+weekday_indexed
+month_weekday::weekday_indexed() const NOEXCEPT
+{
+ return wdi_;
+}
+
+CONSTCD11
+inline
+bool
+month_weekday::ok() const NOEXCEPT
+{
+ return m_.ok() && wdi_.ok();
+}
+
+CONSTCD11
+inline
+bool
+operator==(const month_weekday& x, const month_weekday& y) NOEXCEPT
+{
+ return x.month() == y.month() && x.weekday_indexed() == y.weekday_indexed();
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const month_weekday& x, const month_weekday& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+namespace detail
+{
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+low_level_fmt(std::basic_ostream<CharT, Traits>& os, const month_weekday& mwd)
+{
+ low_level_fmt(os, mwd.month()) << '/';
+ return low_level_fmt(os, mwd.weekday_indexed());
+}
+
+} // namespace detail
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const month_weekday& mwd)
+{
+ detail::low_level_fmt(os, mwd);
+ if (!mwd.ok())
+ os << " is not a valid month_weekday";
+ return os;
+}
+
+// month_weekday_last
+
+CONSTCD11
+inline
+month_weekday_last::month_weekday_last(const date::month& m,
+ const date::weekday_last& wdl) NOEXCEPT
+ : m_(m)
+ , wdl_(wdl)
+ {}
+
+CONSTCD11 inline month month_weekday_last::month() const NOEXCEPT {return m_;}
+
+CONSTCD11
+inline
+weekday_last
+month_weekday_last::weekday_last() const NOEXCEPT
+{
+ return wdl_;
+}
+
+CONSTCD11
+inline
+bool
+month_weekday_last::ok() const NOEXCEPT
+{
+ return m_.ok() && wdl_.ok();
+}
+
+CONSTCD11
+inline
+bool
+operator==(const month_weekday_last& x, const month_weekday_last& y) NOEXCEPT
+{
+ return x.month() == y.month() && x.weekday_last() == y.weekday_last();
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const month_weekday_last& x, const month_weekday_last& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+namespace detail
+{
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+low_level_fmt(std::basic_ostream<CharT, Traits>& os, const month_weekday_last& mwdl)
+{
+ low_level_fmt(os, mwdl.month()) << '/';
+ return low_level_fmt(os, mwdl.weekday_last());
+}
+
+} // namespace detail
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const month_weekday_last& mwdl)
+{
+ detail::low_level_fmt(os, mwdl);
+ if (!mwdl.ok())
+ os << " is not a valid month_weekday_last";
+ return os;
+}
+
+// year_month_day_last
+
+CONSTCD11
+inline
+year_month_day_last::year_month_day_last(const date::year& y,
+ const date::month_day_last& mdl) NOEXCEPT
+ : y_(y)
+ , mdl_(mdl)
+ {}
+
+template<class>
+CONSTCD14
+inline
+year_month_day_last&
+year_month_day_last::operator+=(const months& m) NOEXCEPT
+{
+ *this = *this + m;
+ return *this;
+}
+
+template<class>
+CONSTCD14
+inline
+year_month_day_last&
+year_month_day_last::operator-=(const months& m) NOEXCEPT
+{
+ *this = *this - m;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month_day_last&
+year_month_day_last::operator+=(const years& y) NOEXCEPT
+{
+ *this = *this + y;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month_day_last&
+year_month_day_last::operator-=(const years& y) NOEXCEPT
+{
+ *this = *this - y;
+ return *this;
+}
+
+CONSTCD11 inline year year_month_day_last::year() const NOEXCEPT {return y_;}
+CONSTCD11 inline month year_month_day_last::month() const NOEXCEPT {return mdl_.month();}
+
+CONSTCD11
+inline
+month_day_last
+year_month_day_last::month_day_last() const NOEXCEPT
+{
+ return mdl_;
+}
+
+CONSTCD14
+inline
+day
+year_month_day_last::day() const NOEXCEPT
+{
+ CONSTDATA date::day d[] =
+ {
+ date::day(31), date::day(28), date::day(31),
+ date::day(30), date::day(31), date::day(30),
+ date::day(31), date::day(31), date::day(30),
+ date::day(31), date::day(30), date::day(31)
+ };
+ return (month() != February || !y_.is_leap()) && mdl_.ok() ?
+ d[static_cast<unsigned>(month()) - 1] : date::day{29};
+}
+
+CONSTCD14
+inline
+year_month_day_last::operator sys_days() const NOEXCEPT
+{
+ return sys_days(year()/month()/day());
+}
+
+CONSTCD14
+inline
+year_month_day_last::operator local_days() const NOEXCEPT
+{
+ return local_days(year()/month()/day());
+}
+
+CONSTCD11
+inline
+bool
+year_month_day_last::ok() const NOEXCEPT
+{
+ return y_.ok() && mdl_.ok();
+}
+
+CONSTCD11
+inline
+bool
+operator==(const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT
+{
+ return x.year() == y.year() && x.month_day_last() == y.month_day_last();
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+CONSTCD11
+inline
+bool
+operator<(const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT
+{
+ return x.year() < y.year() ? true
+ : (x.year() > y.year() ? false
+ : (x.month_day_last() < y.month_day_last()));
+}
+
+CONSTCD11
+inline
+bool
+operator>(const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT
+{
+ return y < x;
+}
+
+CONSTCD11
+inline
+bool
+operator<=(const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT
+{
+ return !(y < x);
+}
+
+CONSTCD11
+inline
+bool
+operator>=(const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT
+{
+ return !(x < y);
+}
+
+namespace detail
+{
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+low_level_fmt(std::basic_ostream<CharT, Traits>& os, const year_month_day_last& ymdl)
+{
+ low_level_fmt(os, ymdl.year()) << '/';
+ return low_level_fmt(os, ymdl.month_day_last());
+}
+
+} // namespace detail
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year_month_day_last& ymdl)
+{
+ detail::low_level_fmt(os, ymdl);
+ if (!ymdl.ok())
+ os << " is not a valid year_month_day_last";
+ return os;
+}
+
+template<class>
+CONSTCD14
+inline
+year_month_day_last
+operator+(const year_month_day_last& ymdl, const months& dm) NOEXCEPT
+{
+ return (ymdl.year() / ymdl.month() + dm) / last;
+}
+
+template<class>
+CONSTCD14
+inline
+year_month_day_last
+operator+(const months& dm, const year_month_day_last& ymdl) NOEXCEPT
+{
+ return ymdl + dm;
+}
+
+template<class>
+CONSTCD14
+inline
+year_month_day_last
+operator-(const year_month_day_last& ymdl, const months& dm) NOEXCEPT
+{
+ return ymdl + (-dm);
+}
+
+CONSTCD11
+inline
+year_month_day_last
+operator+(const year_month_day_last& ymdl, const years& dy) NOEXCEPT
+{
+ return {ymdl.year()+dy, ymdl.month_day_last()};
+}
+
+CONSTCD11
+inline
+year_month_day_last
+operator+(const years& dy, const year_month_day_last& ymdl) NOEXCEPT
+{
+ return ymdl + dy;
+}
+
+CONSTCD11
+inline
+year_month_day_last
+operator-(const year_month_day_last& ymdl, const years& dy) NOEXCEPT
+{
+ return ymdl + (-dy);
+}
+
+// year_month_day
+
+CONSTCD11
+inline
+year_month_day::year_month_day(const date::year& y, const date::month& m,
+ const date::day& d) NOEXCEPT
+ : y_(y)
+ , m_(m)
+ , d_(d)
+ {}
+
+CONSTCD14
+inline
+year_month_day::year_month_day(const year_month_day_last& ymdl) NOEXCEPT
+ : y_(ymdl.year())
+ , m_(ymdl.month())
+ , d_(ymdl.day())
+ {}
+
+CONSTCD14
+inline
+year_month_day::year_month_day(sys_days dp) NOEXCEPT
+ : year_month_day(from_days(dp.time_since_epoch()))
+ {}
+
+CONSTCD14
+inline
+year_month_day::year_month_day(local_days dp) NOEXCEPT
+ : year_month_day(from_days(dp.time_since_epoch()))
+ {}
+
+CONSTCD11 inline year year_month_day::year() const NOEXCEPT {return y_;}
+CONSTCD11 inline month year_month_day::month() const NOEXCEPT {return m_;}
+CONSTCD11 inline day year_month_day::day() const NOEXCEPT {return d_;}
+
+template<class>
+CONSTCD14
+inline
+year_month_day&
+year_month_day::operator+=(const months& m) NOEXCEPT
+{
+ *this = *this + m;
+ return *this;
+}
+
+template<class>
+CONSTCD14
+inline
+year_month_day&
+year_month_day::operator-=(const months& m) NOEXCEPT
+{
+ *this = *this - m;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month_day&
+year_month_day::operator+=(const years& y) NOEXCEPT
+{
+ *this = *this + y;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month_day&
+year_month_day::operator-=(const years& y) NOEXCEPT
+{
+ *this = *this - y;
+ return *this;
+}
+
+CONSTCD14
+inline
+days
+year_month_day::to_days() const NOEXCEPT
+{
+ static_assert(std::numeric_limits<unsigned>::digits >= 18,
+ "This algorithm has not been ported to a 16 bit unsigned integer");
+ static_assert(std::numeric_limits<int>::digits >= 20,
+ "This algorithm has not been ported to a 16 bit signed integer");
+ auto const y = static_cast<int>(y_) - (m_ <= February);
+ auto const m = static_cast<unsigned>(m_);
+ auto const d = static_cast<unsigned>(d_);
+ auto const era = (y >= 0 ? y : y-399) / 400;
+ auto const yoe = static_cast<unsigned>(y - era * 400); // [0, 399]
+ auto const doy = (153*(m > 2 ? m-3 : m+9) + 2)/5 + d-1; // [0, 365]
+ auto const doe = yoe * 365 + yoe/4 - yoe/100 + doy; // [0, 146096]
+ return days{era * 146097 + static_cast<int>(doe) - 719468};
+}
+
+CONSTCD14
+inline
+year_month_day::operator sys_days() const NOEXCEPT
+{
+ return sys_days{to_days()};
+}
+
+CONSTCD14
+inline
+year_month_day::operator local_days() const NOEXCEPT
+{
+ return local_days{to_days()};
+}
+
+CONSTCD14
+inline
+bool
+year_month_day::ok() const NOEXCEPT
+{
+ if (!(y_.ok() && m_.ok()))
+ return false;
+ return date::day{1} <= d_ && d_ <= (y_ / m_ / last).day();
+}
+
+CONSTCD11
+inline
+bool
+operator==(const year_month_day& x, const year_month_day& y) NOEXCEPT
+{
+ return x.year() == y.year() && x.month() == y.month() && x.day() == y.day();
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const year_month_day& x, const year_month_day& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+CONSTCD11
+inline
+bool
+operator<(const year_month_day& x, const year_month_day& y) NOEXCEPT
+{
+ return x.year() < y.year() ? true
+ : (x.year() > y.year() ? false
+ : (x.month() < y.month() ? true
+ : (x.month() > y.month() ? false
+ : (x.day() < y.day()))));
+}
+
+CONSTCD11
+inline
+bool
+operator>(const year_month_day& x, const year_month_day& y) NOEXCEPT
+{
+ return y < x;
+}
+
+CONSTCD11
+inline
+bool
+operator<=(const year_month_day& x, const year_month_day& y) NOEXCEPT
+{
+ return !(y < x);
+}
+
+CONSTCD11
+inline
+bool
+operator>=(const year_month_day& x, const year_month_day& y) NOEXCEPT
+{
+ return !(x < y);
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year_month_day& ymd)
+{
+ detail::save_ostream<CharT, Traits> _(os);
+ os.fill('0');
+ os.flags(std::ios::dec | std::ios::right);
+ os.imbue(std::locale::classic());
+ os << static_cast<int>(ymd.year()) << '-';
+ os.width(2);
+ os << static_cast<unsigned>(ymd.month()) << '-';
+ os.width(2);
+ os << static_cast<unsigned>(ymd.day());
+ if (!ymd.ok())
+ os << " is not a valid year_month_day";
+ return os;
+}
+
+CONSTCD14
+inline
+year_month_day
+year_month_day::from_days(days dp) NOEXCEPT
+{
+ static_assert(std::numeric_limits<unsigned>::digits >= 18,
+ "This algorithm has not been ported to a 16 bit unsigned integer");
+ static_assert(std::numeric_limits<int>::digits >= 20,
+ "This algorithm has not been ported to a 16 bit signed integer");
+ auto const z = dp.count() + 719468;
+ auto const era = (z >= 0 ? z : z - 146096) / 146097;
+ auto const doe = static_cast<unsigned>(z - era * 146097); // [0, 146096]
+ auto const yoe = (doe - doe/1460 + doe/36524 - doe/146096) / 365; // [0, 399]
+ auto const y = static_cast<days::rep>(yoe) + era * 400;
+ auto const doy = doe - (365*yoe + yoe/4 - yoe/100); // [0, 365]
+ auto const mp = (5*doy + 2)/153; // [0, 11]
+ auto const d = doy - (153*mp+2)/5 + 1; // [1, 31]
+ auto const m = mp < 10 ? mp+3 : mp-9; // [1, 12]
+ return year_month_day{date::year{y + (m <= 2)}, date::month(m), date::day(d)};
+}
+
+template<class>
+CONSTCD14
+inline
+year_month_day
+operator+(const year_month_day& ymd, const months& dm) NOEXCEPT
+{
+ return (ymd.year() / ymd.month() + dm) / ymd.day();
+}
+
+template<class>
+CONSTCD14
+inline
+year_month_day
+operator+(const months& dm, const year_month_day& ymd) NOEXCEPT
+{
+ return ymd + dm;
+}
+
+template<class>
+CONSTCD14
+inline
+year_month_day
+operator-(const year_month_day& ymd, const months& dm) NOEXCEPT
+{
+ return ymd + (-dm);
+}
+
+CONSTCD11
+inline
+year_month_day
+operator+(const year_month_day& ymd, const years& dy) NOEXCEPT
+{
+ return (ymd.year() + dy) / ymd.month() / ymd.day();
+}
+
+CONSTCD11
+inline
+year_month_day
+operator+(const years& dy, const year_month_day& ymd) NOEXCEPT
+{
+ return ymd + dy;
+}
+
+CONSTCD11
+inline
+year_month_day
+operator-(const year_month_day& ymd, const years& dy) NOEXCEPT
+{
+ return ymd + (-dy);
+}
+
+// year_month_weekday
+
+CONSTCD11
+inline
+year_month_weekday::year_month_weekday(const date::year& y, const date::month& m,
+ const date::weekday_indexed& wdi)
+ NOEXCEPT
+ : y_(y)
+ , m_(m)
+ , wdi_(wdi)
+ {}
+
+CONSTCD14
+inline
+year_month_weekday::year_month_weekday(const sys_days& dp) NOEXCEPT
+ : year_month_weekday(from_days(dp.time_since_epoch()))
+ {}
+
+CONSTCD14
+inline
+year_month_weekday::year_month_weekday(const local_days& dp) NOEXCEPT
+ : year_month_weekday(from_days(dp.time_since_epoch()))
+ {}
+
+template<class>
+CONSTCD14
+inline
+year_month_weekday&
+year_month_weekday::operator+=(const months& m) NOEXCEPT
+{
+ *this = *this + m;
+ return *this;
+}
+
+template<class>
+CONSTCD14
+inline
+year_month_weekday&
+year_month_weekday::operator-=(const months& m) NOEXCEPT
+{
+ *this = *this - m;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month_weekday&
+year_month_weekday::operator+=(const years& y) NOEXCEPT
+{
+ *this = *this + y;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month_weekday&
+year_month_weekday::operator-=(const years& y) NOEXCEPT
+{
+ *this = *this - y;
+ return *this;
+}
+
+CONSTCD11 inline year year_month_weekday::year() const NOEXCEPT {return y_;}
+CONSTCD11 inline month year_month_weekday::month() const NOEXCEPT {return m_;}
+
+CONSTCD11
+inline
+weekday
+year_month_weekday::weekday() const NOEXCEPT
+{
+ return wdi_.weekday();
+}
+
+CONSTCD11
+inline
+unsigned
+year_month_weekday::index() const NOEXCEPT
+{
+ return wdi_.index();
+}
+
+CONSTCD11
+inline
+weekday_indexed
+year_month_weekday::weekday_indexed() const NOEXCEPT
+{
+ return wdi_;
+}
+
+CONSTCD14
+inline
+year_month_weekday::operator sys_days() const NOEXCEPT
+{
+ return sys_days{to_days()};
+}
+
+CONSTCD14
+inline
+year_month_weekday::operator local_days() const NOEXCEPT
+{
+ return local_days{to_days()};
+}
+
+CONSTCD14
+inline
+bool
+year_month_weekday::ok() const NOEXCEPT
+{
+ if (!y_.ok() || !m_.ok() || !wdi_.weekday().ok() || wdi_.index() < 1)
+ return false;
+ if (wdi_.index() <= 4)
+ return true;
+ auto d2 = wdi_.weekday() - date::weekday(static_cast<sys_days>(y_/m_/1)) +
+ days((wdi_.index()-1)*7 + 1);
+ return static_cast<unsigned>(d2.count()) <= static_cast<unsigned>((y_/m_/last).day());
+}
+
+CONSTCD14
+inline
+year_month_weekday
+year_month_weekday::from_days(days d) NOEXCEPT
+{
+ sys_days dp{d};
+ auto const wd = date::weekday(dp);
+ auto const ymd = year_month_day(dp);
+ return {ymd.year(), ymd.month(), wd[(static_cast<unsigned>(ymd.day())-1)/7+1]};
+}
+
+CONSTCD14
+inline
+days
+year_month_weekday::to_days() const NOEXCEPT
+{
+ auto d = sys_days(y_/m_/1);
+ return (d + (wdi_.weekday() - date::weekday(d) + days{(wdi_.index()-1)*7})
+ ).time_since_epoch();
+}
+
+CONSTCD11
+inline
+bool
+operator==(const year_month_weekday& x, const year_month_weekday& y) NOEXCEPT
+{
+ return x.year() == y.year() && x.month() == y.month() &&
+ x.weekday_indexed() == y.weekday_indexed();
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const year_month_weekday& x, const year_month_weekday& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year_month_weekday& ymwdi)
+{
+ detail::low_level_fmt(os, ymwdi.year()) << '/';
+ detail::low_level_fmt(os, ymwdi.month()) << '/';
+ detail::low_level_fmt(os, ymwdi.weekday_indexed());
+ if (!ymwdi.ok())
+ os << " is not a valid year_month_weekday";
+ return os;
+}
+
+template<class>
+CONSTCD14
+inline
+year_month_weekday
+operator+(const year_month_weekday& ymwd, const months& dm) NOEXCEPT
+{
+ return (ymwd.year() / ymwd.month() + dm) / ymwd.weekday_indexed();
+}
+
+template<class>
+CONSTCD14
+inline
+year_month_weekday
+operator+(const months& dm, const year_month_weekday& ymwd) NOEXCEPT
+{
+ return ymwd + dm;
+}
+
+template<class>
+CONSTCD14
+inline
+year_month_weekday
+operator-(const year_month_weekday& ymwd, const months& dm) NOEXCEPT
+{
+ return ymwd + (-dm);
+}
+
+CONSTCD11
+inline
+year_month_weekday
+operator+(const year_month_weekday& ymwd, const years& dy) NOEXCEPT
+{
+ return {ymwd.year()+dy, ymwd.month(), ymwd.weekday_indexed()};
+}
+
+CONSTCD11
+inline
+year_month_weekday
+operator+(const years& dy, const year_month_weekday& ymwd) NOEXCEPT
+{
+ return ymwd + dy;
+}
+
+CONSTCD11
+inline
+year_month_weekday
+operator-(const year_month_weekday& ymwd, const years& dy) NOEXCEPT
+{
+ return ymwd + (-dy);
+}
+
+// year_month_weekday_last
+
+CONSTCD11
+inline
+year_month_weekday_last::year_month_weekday_last(const date::year& y,
+ const date::month& m,
+ const date::weekday_last& wdl) NOEXCEPT
+ : y_(y)
+ , m_(m)
+ , wdl_(wdl)
+ {}
+
+template<class>
+CONSTCD14
+inline
+year_month_weekday_last&
+year_month_weekday_last::operator+=(const months& m) NOEXCEPT
+{
+ *this = *this + m;
+ return *this;
+}
+
+template<class>
+CONSTCD14
+inline
+year_month_weekday_last&
+year_month_weekday_last::operator-=(const months& m) NOEXCEPT
+{
+ *this = *this - m;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month_weekday_last&
+year_month_weekday_last::operator+=(const years& y) NOEXCEPT
+{
+ *this = *this + y;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month_weekday_last&
+year_month_weekday_last::operator-=(const years& y) NOEXCEPT
+{
+ *this = *this - y;
+ return *this;
+}
+
+CONSTCD11 inline year year_month_weekday_last::year() const NOEXCEPT {return y_;}
+CONSTCD11 inline month year_month_weekday_last::month() const NOEXCEPT {return m_;}
+
+CONSTCD11
+inline
+weekday
+year_month_weekday_last::weekday() const NOEXCEPT
+{
+ return wdl_.weekday();
+}
+
+CONSTCD11
+inline
+weekday_last
+year_month_weekday_last::weekday_last() const NOEXCEPT
+{
+ return wdl_;
+}
+
+CONSTCD14
+inline
+year_month_weekday_last::operator sys_days() const NOEXCEPT
+{
+ return sys_days{to_days()};
+}
+
+CONSTCD14
+inline
+year_month_weekday_last::operator local_days() const NOEXCEPT
+{
+ return local_days{to_days()};
+}
+
+CONSTCD11
+inline
+bool
+year_month_weekday_last::ok() const NOEXCEPT
+{
+ return y_.ok() && m_.ok() && wdl_.ok();
+}
+
+CONSTCD14
+inline
+days
+year_month_weekday_last::to_days() const NOEXCEPT
+{
+ auto const d = sys_days(y_/m_/last);
+ return (d - (date::weekday{d} - wdl_.weekday())).time_since_epoch();
+}
+
+CONSTCD11
+inline
+bool
+operator==(const year_month_weekday_last& x, const year_month_weekday_last& y) NOEXCEPT
+{
+ return x.year() == y.year() && x.month() == y.month() &&
+ x.weekday_last() == y.weekday_last();
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const year_month_weekday_last& x, const year_month_weekday_last& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year_month_weekday_last& ymwdl)
+{
+ detail::low_level_fmt(os, ymwdl.year()) << '/';
+ detail::low_level_fmt(os, ymwdl.month()) << '/';
+ detail::low_level_fmt(os, ymwdl.weekday_last());
+ if (!ymwdl.ok())
+ os << " is not a valid year_month_weekday_last";
+ return os;
+}
+
+template<class>
+CONSTCD14
+inline
+year_month_weekday_last
+operator+(const year_month_weekday_last& ymwdl, const months& dm) NOEXCEPT
+{
+ return (ymwdl.year() / ymwdl.month() + dm) / ymwdl.weekday_last();
+}
+
+template<class>
+CONSTCD14
+inline
+year_month_weekday_last
+operator+(const months& dm, const year_month_weekday_last& ymwdl) NOEXCEPT
+{
+ return ymwdl + dm;
+}
+
+template<class>
+CONSTCD14
+inline
+year_month_weekday_last
+operator-(const year_month_weekday_last& ymwdl, const months& dm) NOEXCEPT
+{
+ return ymwdl + (-dm);
+}
+
+CONSTCD11
+inline
+year_month_weekday_last
+operator+(const year_month_weekday_last& ymwdl, const years& dy) NOEXCEPT
+{
+ return {ymwdl.year()+dy, ymwdl.month(), ymwdl.weekday_last()};
+}
+
+CONSTCD11
+inline
+year_month_weekday_last
+operator+(const years& dy, const year_month_weekday_last& ymwdl) NOEXCEPT
+{
+ return ymwdl + dy;
+}
+
+CONSTCD11
+inline
+year_month_weekday_last
+operator-(const year_month_weekday_last& ymwdl, const years& dy) NOEXCEPT
+{
+ return ymwdl + (-dy);
+}
+
+// year_month from operator/()
+
+CONSTCD11
+inline
+year_month
+operator/(const year& y, const month& m) NOEXCEPT
+{
+ return {y, m};
+}
+
+CONSTCD11
+inline
+year_month
+operator/(const year& y, int m) NOEXCEPT
+{
+ return y / month(static_cast<unsigned>(m));
+}
+
+// month_day from operator/()
+
+CONSTCD11
+inline
+month_day
+operator/(const month& m, const day& d) NOEXCEPT
+{
+ return {m, d};
+}
+
+CONSTCD11
+inline
+month_day
+operator/(const day& d, const month& m) NOEXCEPT
+{
+ return m / d;
+}
+
+CONSTCD11
+inline
+month_day
+operator/(const month& m, int d) NOEXCEPT
+{
+ return m / day(static_cast<unsigned>(d));
+}
+
+CONSTCD11
+inline
+month_day
+operator/(int m, const day& d) NOEXCEPT
+{
+ return month(static_cast<unsigned>(m)) / d;
+}
+
+CONSTCD11 inline month_day operator/(const day& d, int m) NOEXCEPT {return m / d;}
+
+// month_day_last from operator/()
+
+CONSTCD11
+inline
+month_day_last
+operator/(const month& m, last_spec) NOEXCEPT
+{
+ return month_day_last{m};
+}
+
+CONSTCD11
+inline
+month_day_last
+operator/(last_spec, const month& m) NOEXCEPT
+{
+ return m/last;
+}
+
+CONSTCD11
+inline
+month_day_last
+operator/(int m, last_spec) NOEXCEPT
+{
+ return month(static_cast<unsigned>(m))/last;
+}
+
+CONSTCD11
+inline
+month_day_last
+operator/(last_spec, int m) NOEXCEPT
+{
+ return m/last;
+}
+
+// month_weekday from operator/()
+
+CONSTCD11
+inline
+month_weekday
+operator/(const month& m, const weekday_indexed& wdi) NOEXCEPT
+{
+ return {m, wdi};
+}
+
+CONSTCD11
+inline
+month_weekday
+operator/(const weekday_indexed& wdi, const month& m) NOEXCEPT
+{
+ return m / wdi;
+}
+
+CONSTCD11
+inline
+month_weekday
+operator/(int m, const weekday_indexed& wdi) NOEXCEPT
+{
+ return month(static_cast<unsigned>(m)) / wdi;
+}
+
+CONSTCD11
+inline
+month_weekday
+operator/(const weekday_indexed& wdi, int m) NOEXCEPT
+{
+ return m / wdi;
+}
+
+// month_weekday_last from operator/()
+
+CONSTCD11
+inline
+month_weekday_last
+operator/(const month& m, const weekday_last& wdl) NOEXCEPT
+{
+ return {m, wdl};
+}
+
+CONSTCD11
+inline
+month_weekday_last
+operator/(const weekday_last& wdl, const month& m) NOEXCEPT
+{
+ return m / wdl;
+}
+
+CONSTCD11
+inline
+month_weekday_last
+operator/(int m, const weekday_last& wdl) NOEXCEPT
+{
+ return month(static_cast<unsigned>(m)) / wdl;
+}
+
+CONSTCD11
+inline
+month_weekday_last
+operator/(const weekday_last& wdl, int m) NOEXCEPT
+{
+ return m / wdl;
+}
+
+// year_month_day from operator/()
+
+CONSTCD11
+inline
+year_month_day
+operator/(const year_month& ym, const day& d) NOEXCEPT
+{
+ return {ym.year(), ym.month(), d};
+}
+
+CONSTCD11
+inline
+year_month_day
+operator/(const year_month& ym, int d) NOEXCEPT
+{
+ return ym / day(static_cast<unsigned>(d));
+}
+
+CONSTCD11
+inline
+year_month_day
+operator/(const year& y, const month_day& md) NOEXCEPT
+{
+ return y / md.month() / md.day();
+}
+
+CONSTCD11
+inline
+year_month_day
+operator/(int y, const month_day& md) NOEXCEPT
+{
+ return year(y) / md;
+}
+
+CONSTCD11
+inline
+year_month_day
+operator/(const month_day& md, const year& y) NOEXCEPT
+{
+ return y / md;
+}
+
+CONSTCD11
+inline
+year_month_day
+operator/(const month_day& md, int y) NOEXCEPT
+{
+ return year(y) / md;
+}
+
+// year_month_day_last from operator/()
+
+CONSTCD11
+inline
+year_month_day_last
+operator/(const year_month& ym, last_spec) NOEXCEPT
+{
+ return {ym.year(), month_day_last{ym.month()}};
+}
+
+CONSTCD11
+inline
+year_month_day_last
+operator/(const year& y, const month_day_last& mdl) NOEXCEPT
+{
+ return {y, mdl};
+}
+
+CONSTCD11
+inline
+year_month_day_last
+operator/(int y, const month_day_last& mdl) NOEXCEPT
+{
+ return year(y) / mdl;
+}
+
+CONSTCD11
+inline
+year_month_day_last
+operator/(const month_day_last& mdl, const year& y) NOEXCEPT
+{
+ return y / mdl;
+}
+
+CONSTCD11
+inline
+year_month_day_last
+operator/(const month_day_last& mdl, int y) NOEXCEPT
+{
+ return year(y) / mdl;
+}
+
+// year_month_weekday from operator/()
+
+CONSTCD11
+inline
+year_month_weekday
+operator/(const year_month& ym, const weekday_indexed& wdi) NOEXCEPT
+{
+ return {ym.year(), ym.month(), wdi};
+}
+
+CONSTCD11
+inline
+year_month_weekday
+operator/(const year& y, const month_weekday& mwd) NOEXCEPT
+{
+ return {y, mwd.month(), mwd.weekday_indexed()};
+}
+
+CONSTCD11
+inline
+year_month_weekday
+operator/(int y, const month_weekday& mwd) NOEXCEPT
+{
+ return year(y) / mwd;
+}
+
+CONSTCD11
+inline
+year_month_weekday
+operator/(const month_weekday& mwd, const year& y) NOEXCEPT
+{
+ return y / mwd;
+}
+
+CONSTCD11
+inline
+year_month_weekday
+operator/(const month_weekday& mwd, int y) NOEXCEPT
+{
+ return year(y) / mwd;
+}
+
+// year_month_weekday_last from operator/()
+
+CONSTCD11
+inline
+year_month_weekday_last
+operator/(const year_month& ym, const weekday_last& wdl) NOEXCEPT
+{
+ return {ym.year(), ym.month(), wdl};
+}
+
+CONSTCD11
+inline
+year_month_weekday_last
+operator/(const year& y, const month_weekday_last& mwdl) NOEXCEPT
+{
+ return {y, mwdl.month(), mwdl.weekday_last()};
+}
+
+CONSTCD11
+inline
+year_month_weekday_last
+operator/(int y, const month_weekday_last& mwdl) NOEXCEPT
+{
+ return year(y) / mwdl;
+}
+
+CONSTCD11
+inline
+year_month_weekday_last
+operator/(const month_weekday_last& mwdl, const year& y) NOEXCEPT
+{
+ return y / mwdl;
+}
+
+CONSTCD11
+inline
+year_month_weekday_last
+operator/(const month_weekday_last& mwdl, int y) NOEXCEPT
+{
+ return year(y) / mwdl;
+}
+
+template <class Duration>
+struct fields;
+
+template <class CharT, class Traits, class Duration>
+std::basic_ostream<CharT, Traits>&
+to_stream(std::basic_ostream<CharT, Traits>& os, const CharT* fmt,
+ const fields<Duration>& fds, const std::string* abbrev = nullptr,
+ const std::chrono::seconds* offset_sec = nullptr);
+
+template <class CharT, class Traits, class Duration, class Alloc>
+std::basic_istream<CharT, Traits>&
+from_stream(std::basic_istream<CharT, Traits>& is, const CharT* fmt,
+ fields<Duration>& fds, std::basic_string<CharT, Traits, Alloc>* abbrev = nullptr,
+ std::chrono::minutes* offset = nullptr);
+
+// hh_mm_ss
+
+namespace detail
+{
+
+struct undocumented {explicit undocumented() = default;};
+
+// width<n>::value is the number of fractional decimal digits in 1/n
+// width<0>::value and width<1>::value are defined to be 0
+// If 1/n takes more than 18 fractional decimal digits,
+// the result is truncated to 19.
+// Example: width<2>::value == 1
+// Example: width<3>::value == 19
+// Example: width<4>::value == 2
+// Example: width<10>::value == 1
+// Example: width<1000>::value == 3
+template <std::uint64_t n, std::uint64_t d, unsigned w = 0,
+ bool should_continue = n%d != 0 && (w < 19)>
+struct width
+{
+ static_assert(d > 0, "width called with zero denominator");
+ static CONSTDATA unsigned value = 1 + width<n%d*10, d, w+1>::value;
+};
+
+template <std::uint64_t n, std::uint64_t d, unsigned w>
+struct width<n, d, w, false>
+{
+ static CONSTDATA unsigned value = 0;
+};
+
+template <unsigned exp>
+struct static_pow10
+{
+private:
+ static CONSTDATA std::uint64_t h = static_pow10<exp/2>::value;
+public:
+ static CONSTDATA std::uint64_t value = h * h * (exp % 2 ? 10 : 1);
+};
+
+template <>
+struct static_pow10<0>
+{
+ static CONSTDATA std::uint64_t value = 1;
+};
+
+template <class Duration>
+class decimal_format_seconds
+{
+ using CT = typename std::common_type<Duration, std::chrono::seconds>::type;
+ using rep = typename CT::rep;
+ static unsigned CONSTDATA trial_width =
+ detail::width<CT::period::num, CT::period::den>::value;
+public:
+ static unsigned CONSTDATA width = trial_width < 19 ? trial_width : 6u;
+ using precision = std::chrono::duration<rep,
+ std::ratio<1, static_pow10<width>::value>>;
+
+private:
+ std::chrono::seconds s_;
+ precision sub_s_;
+
+public:
+ CONSTCD11 decimal_format_seconds()
+ : s_()
+ , sub_s_()
+ {}
+
+ CONSTCD11 explicit decimal_format_seconds(const Duration& d) NOEXCEPT
+ : s_(std::chrono::duration_cast<std::chrono::seconds>(d))
+ , sub_s_(std::chrono::duration_cast<precision>(d - s_))
+ {}
+
+ CONSTCD14 std::chrono::seconds& seconds() NOEXCEPT {return s_;}
+ CONSTCD11 std::chrono::seconds seconds() const NOEXCEPT {return s_;}
+ CONSTCD11 precision subseconds() const NOEXCEPT {return sub_s_;}
+
+ CONSTCD14 precision to_duration() const NOEXCEPT
+ {
+ return s_ + sub_s_;
+ }
+
+ CONSTCD11 bool in_conventional_range() const NOEXCEPT
+ {
+ return sub_s_ < std::chrono::seconds{1} && s_ < std::chrono::minutes{1};
+ }
+
+ template <class CharT, class Traits>
+ friend
+ std::basic_ostream<CharT, Traits>&
+ operator<<(std::basic_ostream<CharT, Traits>& os, const decimal_format_seconds& x)
+ {
+ return x.print(os, std::chrono::treat_as_floating_point<rep>{});
+ }
+
+ template <class CharT, class Traits>
+ std::basic_ostream<CharT, Traits>&
+ print(std::basic_ostream<CharT, Traits>& os, std::true_type) const
+ {
+ date::detail::save_ostream<CharT, Traits> _(os);
+ std::chrono::duration<rep> d = s_ + sub_s_;
+ if (d < std::chrono::seconds{10})
+ os << '0';
+ os.precision(width+6);
+ os << std::fixed << d.count();
+ return os;
+ }
+
+ template <class CharT, class Traits>
+ std::basic_ostream<CharT, Traits>&
+ print(std::basic_ostream<CharT, Traits>& os, std::false_type) const
+ {
+ date::detail::save_ostream<CharT, Traits> _(os);
+ os.fill('0');
+ os.flags(std::ios::dec | std::ios::right);
+ os.width(2);
+ os << s_.count();
+ if (width > 0)
+ {
+#if !ONLY_C_LOCALE
+ os << std::use_facet<std::numpunct<CharT>>(os.getloc()).decimal_point();
+#else
+ os << '.';
+#endif
+ date::detail::save_ostream<CharT, Traits> _s(os);
+ os.imbue(std::locale::classic());
+ os.width(width);
+ os << sub_s_.count();
+ }
+ return os;
+ }
+};
+
+template <class Rep, class Period>
+inline
+CONSTCD11
+typename std::enable_if
+ <
+ std::numeric_limits<Rep>::is_signed,
+ std::chrono::duration<Rep, Period>
+ >::type
+abs(std::chrono::duration<Rep, Period> d)
+{
+ return d >= d.zero() ? +d : -d;
+}
+
+template <class Rep, class Period>
+inline
+CONSTCD11
+typename std::enable_if
+ <
+ !std::numeric_limits<Rep>::is_signed,
+ std::chrono::duration<Rep, Period>
+ >::type
+abs(std::chrono::duration<Rep, Period> d)
+{
+ return d;
+}
+
+} // namespace detail
+
+template <class Duration>
+class hh_mm_ss
+{
+ using dfs = detail::decimal_format_seconds<typename std::common_type<Duration,
+ std::chrono::seconds>::type>;
+
+ std::chrono::hours h_;
+ std::chrono::minutes m_;
+ dfs s_;
+ bool neg_;
+
+public:
+ static unsigned CONSTDATA fractional_width = dfs::width;
+ using precision = typename dfs::precision;
+
+ CONSTCD11 hh_mm_ss() NOEXCEPT
+ : hh_mm_ss(Duration::zero())
+ {}
+
+ CONSTCD11 explicit hh_mm_ss(Duration d) NOEXCEPT
+ : h_(std::chrono::duration_cast<std::chrono::hours>(detail::abs(d)))
+ , m_(std::chrono::duration_cast<std::chrono::minutes>(detail::abs(d)) - h_)
+ , s_(detail::abs(d) - h_ - m_)
+ , neg_(d < Duration::zero())
+ {}
+
+ CONSTCD11 std::chrono::hours hours() const NOEXCEPT {return h_;}
+ CONSTCD11 std::chrono::minutes minutes() const NOEXCEPT {return m_;}
+ CONSTCD11 std::chrono::seconds seconds() const NOEXCEPT {return s_.seconds();}
+ CONSTCD14 std::chrono::seconds&
+ seconds(detail::undocumented) NOEXCEPT {return s_.seconds();}
+ CONSTCD11 precision subseconds() const NOEXCEPT {return s_.subseconds();}
+ CONSTCD11 bool is_negative() const NOEXCEPT {return neg_;}
+
+ CONSTCD11 explicit operator precision() const NOEXCEPT {return to_duration();}
+ CONSTCD11 precision to_duration() const NOEXCEPT
+ {return (s_.to_duration() + m_ + h_) * (1-2*neg_);}
+
+ CONSTCD11 bool in_conventional_range() const NOEXCEPT
+ {
+ return !neg_ && h_ < days{1} && m_ < std::chrono::hours{1} &&
+ s_.in_conventional_range();
+ }
+
+private:
+
+ template <class charT, class traits>
+ friend
+ std::basic_ostream<charT, traits>&
+ operator<<(std::basic_ostream<charT, traits>& os, hh_mm_ss const& tod)
+ {
+ if (tod.is_negative())
+ os << '-';
+ if (tod.h_ < std::chrono::hours{10})
+ os << '0';
+ os << tod.h_.count() << ':';
+ if (tod.m_ < std::chrono::minutes{10})
+ os << '0';
+ os << tod.m_.count() << ':' << tod.s_;
+ return os;
+ }
+
+ template <class CharT, class Traits, class Duration2>
+ friend
+ std::basic_ostream<CharT, Traits>&
+ date::to_stream(std::basic_ostream<CharT, Traits>& os, const CharT* fmt,
+ const fields<Duration2>& fds, const std::string* abbrev,
+ const std::chrono::seconds* offset_sec);
+
+ template <class CharT, class Traits, class Duration2, class Alloc>
+ friend
+ std::basic_istream<CharT, Traits>&
+ date::from_stream(std::basic_istream<CharT, Traits>& is, const CharT* fmt,
+ fields<Duration2>& fds,
+ std::basic_string<CharT, Traits, Alloc>* abbrev, std::chrono::minutes* offset);
+};
+
+inline
+CONSTCD14
+bool
+is_am(std::chrono::hours const& h) NOEXCEPT
+{
+ using std::chrono::hours;
+ return hours{0} <= h && h < hours{12};
+}
+
+inline
+CONSTCD14
+bool
+is_pm(std::chrono::hours const& h) NOEXCEPT
+{
+ using std::chrono::hours;
+ return hours{12} <= h && h < hours{24};
+}
+
+inline
+CONSTCD14
+std::chrono::hours
+make12(std::chrono::hours h) NOEXCEPT
+{
+ using std::chrono::hours;
+ if (h < hours{12})
+ {
+ if (h == hours{0})
+ h = hours{12};
+ }
+ else
+ {
+ if (h != hours{12})
+ h = h - hours{12};
+ }
+ return h;
+}
+
+inline
+CONSTCD14
+std::chrono::hours
+make24(std::chrono::hours h, bool is_pm) NOEXCEPT
+{
+ using std::chrono::hours;
+ if (is_pm)
+ {
+ if (h != hours{12})
+ h = h + hours{12};
+ }
+ else if (h == hours{12})
+ h = hours{0};
+ return h;
+}
+
+template <class Duration>
+using time_of_day = hh_mm_ss<Duration>;
+
+template <class Rep, class Period>
+CONSTCD11
+inline
+hh_mm_ss<std::chrono::duration<Rep, Period>>
+make_time(const std::chrono::duration<Rep, Period>& d)
+{
+ return hh_mm_ss<std::chrono::duration<Rep, Period>>(d);
+}
+
+template <class CharT, class Traits, class Duration>
+inline
+typename std::enable_if
+<
+ std::ratio_less<typename Duration::period, days::period>::value
+ , std::basic_ostream<CharT, Traits>&
+>::type
+operator<<(std::basic_ostream<CharT, Traits>& os, const sys_time<Duration>& tp)
+{
+ auto const dp = date::floor<days>(tp);
+ return os << year_month_day(dp) << ' ' << make_time(tp-dp);
+}
+
+template <class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const sys_days& dp)
+{
+ return os << year_month_day(dp);
+}
+
+template <class CharT, class Traits, class Duration>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const local_time<Duration>& ut)
+{
+ return (os << sys_time<Duration>{ut.time_since_epoch()});
+}
+
+namespace detail
+{
+
+template <class CharT, std::size_t N>
+class string_literal;
+
+template <class CharT1, class CharT2, std::size_t N1, std::size_t N2>
+inline
+CONSTCD14
+string_literal<typename std::conditional<sizeof(CharT2) <= sizeof(CharT1), CharT1, CharT2>::type,
+ N1 + N2 - 1>
+operator+(const string_literal<CharT1, N1>& x, const string_literal<CharT2, N2>& y) NOEXCEPT;
+
+template <class CharT, std::size_t N>
+class string_literal
+{
+ CharT p_[N];
+
+ CONSTCD11 string_literal() NOEXCEPT
+ : p_{}
+ {}
+
+public:
+ using const_iterator = const CharT*;
+
+ string_literal(string_literal const&) = default;
+ string_literal& operator=(string_literal const&) = delete;
+
+ template <std::size_t N1 = 2,
+ class = typename std::enable_if<N1 == N>::type>
+ CONSTCD11 string_literal(CharT c) NOEXCEPT
+ : p_{c}
+ {
+ }
+
+ template <std::size_t N1 = 3,
+ class = typename std::enable_if<N1 == N>::type>
+ CONSTCD11 string_literal(CharT c1, CharT c2) NOEXCEPT
+ : p_{c1, c2}
+ {
+ }
+
+ template <std::size_t N1 = 4,
+ class = typename std::enable_if<N1 == N>::type>
+ CONSTCD11 string_literal(CharT c1, CharT c2, CharT c3) NOEXCEPT
+ : p_{c1, c2, c3}
+ {
+ }
+
+ CONSTCD14 string_literal(const CharT(&a)[N]) NOEXCEPT
+ : p_{}
+ {
+ for (std::size_t i = 0; i < N; ++i)
+ p_[i] = a[i];
+ }
+
+ template <class U = CharT,
+ class = typename std::enable_if<(1 < sizeof(U))>::type>
+ CONSTCD14 string_literal(const char(&a)[N]) NOEXCEPT
+ : p_{}
+ {
+ for (std::size_t i = 0; i < N; ++i)
+ p_[i] = a[i];
+ }
+
+ template <class CharT2,
+ class = typename std::enable_if<!std::is_same<CharT2, CharT>::value>::type>
+ CONSTCD14 string_literal(string_literal<CharT2, N> const& a) NOEXCEPT
+ : p_{}
+ {
+ for (std::size_t i = 0; i < N; ++i)
+ p_[i] = a[i];
+ }
+
+ CONSTCD11 const CharT* data() const NOEXCEPT {return p_;}
+ CONSTCD11 std::size_t size() const NOEXCEPT {return N-1;}
+
+ CONSTCD11 const_iterator begin() const NOEXCEPT {return p_;}
+ CONSTCD11 const_iterator end() const NOEXCEPT {return p_ + N-1;}
+
+ CONSTCD11 CharT const& operator[](std::size_t n) const NOEXCEPT
+ {
+ return p_[n];
+ }
+
+ template <class Traits>
+ friend
+ std::basic_ostream<CharT, Traits>&
+ operator<<(std::basic_ostream<CharT, Traits>& os, const string_literal& s)
+ {
+ return os << s.p_;
+ }
+
+ template <class CharT1, class CharT2, std::size_t N1, std::size_t N2>
+ friend
+ CONSTCD14
+ string_literal<typename std::conditional<sizeof(CharT2) <= sizeof(CharT1), CharT1, CharT2>::type,
+ N1 + N2 - 1>
+ operator+(const string_literal<CharT1, N1>& x, const string_literal<CharT2, N2>& y) NOEXCEPT;
+};
+
+template <class CharT>
+CONSTCD11
+inline
+string_literal<CharT, 3>
+operator+(const string_literal<CharT, 2>& x, const string_literal<CharT, 2>& y) NOEXCEPT
+{
+ return string_literal<CharT, 3>(x[0], y[0]);
+}
+
+template <class CharT>
+CONSTCD11
+inline
+string_literal<CharT, 4>
+operator+(const string_literal<CharT, 3>& x, const string_literal<CharT, 2>& y) NOEXCEPT
+{
+ return string_literal<CharT, 4>(x[0], x[1], y[0]);
+}
+
+template <class CharT1, class CharT2, std::size_t N1, std::size_t N2>
+CONSTCD14
+inline
+string_literal<typename std::conditional<sizeof(CharT2) <= sizeof(CharT1), CharT1, CharT2>::type,
+ N1 + N2 - 1>
+operator+(const string_literal<CharT1, N1>& x, const string_literal<CharT2, N2>& y) NOEXCEPT
+{
+ using CT = typename std::conditional<sizeof(CharT2) <= sizeof(CharT1), CharT1, CharT2>::type;
+
+ string_literal<CT, N1 + N2 - 1> r;
+ std::size_t i = 0;
+ for (; i < N1-1; ++i)
+ r.p_[i] = CT(x.p_[i]);
+ for (std::size_t j = 0; j < N2; ++j, ++i)
+ r.p_[i] = CT(y.p_[j]);
+
+ return r;
+}
+
+
+template <class CharT, class Traits, class Alloc, std::size_t N>
+inline
+std::basic_string<CharT, Traits, Alloc>
+operator+(std::basic_string<CharT, Traits, Alloc> x, const string_literal<CharT, N>& y)
+{
+ x.append(y.data(), y.size());
+ return x;
+}
+
+#if __cplusplus >= 201402 && (!defined(__EDG_VERSION__) || __EDG_VERSION__ > 411) \
+ && (!defined(__SUNPRO_CC) || __SUNPRO_CC > 0x5150)
+
+template <class CharT,
+ class = std::enable_if_t<std::is_same<CharT, char>::value ||
+ std::is_same<CharT, wchar_t>::value ||
+ std::is_same<CharT, char16_t>::value ||
+ std::is_same<CharT, char32_t>::value>>
+CONSTCD14
+inline
+string_literal<CharT, 2>
+msl(CharT c) NOEXCEPT
+{
+ return string_literal<CharT, 2>{c};
+}
+
+CONSTCD14
+inline
+std::size_t
+to_string_len(std::intmax_t i)
+{
+ std::size_t r = 0;
+ do
+ {
+ i /= 10;
+ ++r;
+ } while (i > 0);
+ return r;
+}
+
+template <std::intmax_t N>
+CONSTCD14
+inline
+std::enable_if_t
+<
+ N < 10,
+ string_literal<char, to_string_len(N)+1>
+>
+msl() NOEXCEPT
+{
+ return msl(char(N % 10 + '0'));
+}
+
+template <std::intmax_t N>
+CONSTCD14
+inline
+std::enable_if_t
+<
+ 10 <= N,
+ string_literal<char, to_string_len(N)+1>
+>
+msl() NOEXCEPT
+{
+ return msl<N/10>() + msl(char(N % 10 + '0'));
+}
+
+template <class CharT, std::intmax_t N, std::intmax_t D>
+CONSTCD14
+inline
+std::enable_if_t
+<
+ std::ratio<N, D>::type::den != 1,
+ string_literal<CharT, to_string_len(std::ratio<N, D>::type::num) +
+ to_string_len(std::ratio<N, D>::type::den) + 4>
+>
+msl(std::ratio<N, D>) NOEXCEPT
+{
+ using R = typename std::ratio<N, D>::type;
+ return msl(CharT{'['}) + msl<R::num>() + msl(CharT{'/'}) +
+ msl<R::den>() + msl(CharT{']'});
+}
+
+template <class CharT, std::intmax_t N, std::intmax_t D>
+CONSTCD14
+inline
+std::enable_if_t
+<
+ std::ratio<N, D>::type::den == 1,
+ string_literal<CharT, to_string_len(std::ratio<N, D>::type::num) + 3>
+>
+msl(std::ratio<N, D>) NOEXCEPT
+{
+ using R = typename std::ratio<N, D>::type;
+ return msl(CharT{'['}) + msl<R::num>() + msl(CharT{']'});
+}
+
+
+#else // __cplusplus < 201402 || (defined(__EDG_VERSION__) && __EDG_VERSION__ <= 411)
+
+inline
+std::string
+to_string(std::uint64_t x)
+{
+ return std::to_string(x);
+}
+
+template <class CharT>
+inline
+std::basic_string<CharT>
+to_string(std::uint64_t x)
+{
+ auto y = std::to_string(x);
+ return std::basic_string<CharT>(y.begin(), y.end());
+}
+
+template <class CharT, std::intmax_t N, std::intmax_t D>
+inline
+typename std::enable_if
+<
+ std::ratio<N, D>::type::den != 1,
+ std::basic_string<CharT>
+>::type
+msl(std::ratio<N, D>)
+{
+ using R = typename std::ratio<N, D>::type;
+ return std::basic_string<CharT>(1, '[') + to_string<CharT>(R::num) + CharT{'/'} +
+ to_string<CharT>(R::den) + CharT{']'};
+}
+
+template <class CharT, std::intmax_t N, std::intmax_t D>
+inline
+typename std::enable_if
+<
+ std::ratio<N, D>::type::den == 1,
+ std::basic_string<CharT>
+>::type
+msl(std::ratio<N, D>)
+{
+ using R = typename std::ratio<N, D>::type;
+ return std::basic_string<CharT>(1, '[') + to_string<CharT>(R::num) + CharT{']'};
+}
+
+#endif // __cplusplus < 201402 || (defined(__EDG_VERSION__) && __EDG_VERSION__ <= 411)
+
+template <class CharT>
+CONSTCD11
+inline
+string_literal<CharT, 2>
+msl(std::atto) NOEXCEPT
+{
+ return string_literal<CharT, 2>{'a'};
+}
+
+template <class CharT>
+CONSTCD11
+inline
+string_literal<CharT, 2>
+msl(std::femto) NOEXCEPT
+{
+ return string_literal<CharT, 2>{'f'};
+}
+
+template <class CharT>
+CONSTCD11
+inline
+string_literal<CharT, 2>
+msl(std::pico) NOEXCEPT
+{
+ return string_literal<CharT, 2>{'p'};
+}
+
+template <class CharT>
+CONSTCD11
+inline
+string_literal<CharT, 2>
+msl(std::nano) NOEXCEPT
+{
+ return string_literal<CharT, 2>{'n'};
+}
+
+template <class CharT>
+CONSTCD11
+inline
+typename std::enable_if
+<
+ std::is_same<CharT, char>::value,
+ string_literal<char, 3>
+>::type
+msl(std::micro) NOEXCEPT
+{
+ return string_literal<char, 3>{'\xC2', '\xB5'};
+}
+
+template <class CharT>
+CONSTCD11
+inline
+typename std::enable_if
+<
+ !std::is_same<CharT, char>::value,
+ string_literal<CharT, 2>
+>::type
+msl(std::micro) NOEXCEPT
+{
+ return string_literal<CharT, 2>{CharT{static_cast<unsigned char>('\xB5')}};
+}
+
+template <class CharT>
+CONSTCD11
+inline
+string_literal<CharT, 2>
+msl(std::milli) NOEXCEPT
+{
+ return string_literal<CharT, 2>{'m'};
+}
+
+template <class CharT>
+CONSTCD11
+inline
+string_literal<CharT, 2>
+msl(std::centi) NOEXCEPT
+{
+ return string_literal<CharT, 2>{'c'};
+}
+
+template <class CharT>
+CONSTCD11
+inline
+string_literal<CharT, 3>
+msl(std::deca) NOEXCEPT
+{
+ return string_literal<CharT, 3>{'d', 'a'};
+}
+
+template <class CharT>
+CONSTCD11
+inline
+string_literal<CharT, 2>
+msl(std::deci) NOEXCEPT
+{
+ return string_literal<CharT, 2>{'d'};
+}
+
+template <class CharT>
+CONSTCD11
+inline
+string_literal<CharT, 2>
+msl(std::hecto) NOEXCEPT
+{
+ return string_literal<CharT, 2>{'h'};
+}
+
+template <class CharT>
+CONSTCD11
+inline
+string_literal<CharT, 2>
+msl(std::kilo) NOEXCEPT
+{
+ return string_literal<CharT, 2>{'k'};
+}
+
+template <class CharT>
+CONSTCD11
+inline
+string_literal<CharT, 2>
+msl(std::mega) NOEXCEPT
+{
+ return string_literal<CharT, 2>{'M'};
+}
+
+template <class CharT>
+CONSTCD11
+inline
+string_literal<CharT, 2>
+msl(std::giga) NOEXCEPT
+{
+ return string_literal<CharT, 2>{'G'};
+}
+
+template <class CharT>
+CONSTCD11
+inline
+string_literal<CharT, 2>
+msl(std::tera) NOEXCEPT
+{
+ return string_literal<CharT, 2>{'T'};
+}
+
+template <class CharT>
+CONSTCD11
+inline
+string_literal<CharT, 2>
+msl(std::peta) NOEXCEPT
+{
+ return string_literal<CharT, 2>{'P'};
+}
+
+template <class CharT>
+CONSTCD11
+inline
+string_literal<CharT, 2>
+msl(std::exa) NOEXCEPT
+{
+ return string_literal<CharT, 2>{'E'};
+}
+
+template <class CharT, class Period>
+CONSTCD11
+inline
+auto
+get_units(Period p)
+ -> decltype(msl<CharT>(p) + string_literal<CharT, 2>{'s'})
+{
+ return msl<CharT>(p) + string_literal<CharT, 2>{'s'};
+}
+
+template <class CharT>
+CONSTCD11
+inline
+string_literal<CharT, 2>
+get_units(std::ratio<1>)
+{
+ return string_literal<CharT, 2>{'s'};
+}
+
+template <class CharT>
+CONSTCD11
+inline
+string_literal<CharT, 2>
+get_units(std::ratio<3600>)
+{
+ return string_literal<CharT, 2>{'h'};
+}
+
+template <class CharT>
+CONSTCD11
+inline
+string_literal<CharT, 4>
+get_units(std::ratio<60>)
+{
+ return string_literal<CharT, 4>{'m', 'i', 'n'};
+}
+
+template <class CharT>
+CONSTCD11
+inline
+string_literal<CharT, 2>
+get_units(std::ratio<86400>)
+{
+ return string_literal<CharT, 2>{'d'};
+}
+
+template <class CharT, class Traits = std::char_traits<CharT>>
+struct make_string;
+
+template <>
+struct make_string<char>
+{
+ template <class Rep>
+ static
+ std::string
+ from(Rep n)
+ {
+ return std::to_string(n);
+ }
+};
+
+template <class Traits>
+struct make_string<char, Traits>
+{
+ template <class Rep>
+ static
+ std::basic_string<char, Traits>
+ from(Rep n)
+ {
+ auto s = std::to_string(n);
+ return std::basic_string<char, Traits>(s.begin(), s.end());
+ }
+};
+
+template <>
+struct make_string<wchar_t>
+{
+ template <class Rep>
+ static
+ std::wstring
+ from(Rep n)
+ {
+ return std::to_wstring(n);
+ }
+};
+
+template <class Traits>
+struct make_string<wchar_t, Traits>
+{
+ template <class Rep>
+ static
+ std::basic_string<wchar_t, Traits>
+ from(Rep n)
+ {
+ auto s = std::to_wstring(n);
+ return std::basic_string<wchar_t, Traits>(s.begin(), s.end());
+ }
+};
+
+} // namespace detail
+
+// to_stream
+
+CONSTDATA year nanyear{-32768};
+
+template <class Duration>
+struct fields
+{
+ year_month_day ymd{nanyear/0/0};
+ weekday wd{8u};
+ hh_mm_ss<Duration> tod{};
+ bool has_tod = false;
+
+ fields() = default;
+
+ fields(year_month_day ymd_) : ymd(ymd_) {}
+ fields(weekday wd_) : wd(wd_) {}
+ fields(hh_mm_ss<Duration> tod_) : tod(tod_), has_tod(true) {}
+
+ fields(year_month_day ymd_, weekday wd_) : ymd(ymd_), wd(wd_) {}
+ fields(year_month_day ymd_, hh_mm_ss<Duration> tod_) : ymd(ymd_), tod(tod_),
+ has_tod(true) {}
+
+ fields(weekday wd_, hh_mm_ss<Duration> tod_) : wd(wd_), tod(tod_), has_tod(true) {}
+
+ fields(year_month_day ymd_, weekday wd_, hh_mm_ss<Duration> tod_)
+ : ymd(ymd_)
+ , wd(wd_)
+ , tod(tod_)
+ , has_tod(true)
+ {}
+};
+
+namespace detail
+{
+
+template <class CharT, class Traits, class Duration>
+unsigned
+extract_weekday(std::basic_ostream<CharT, Traits>& os, const fields<Duration>& fds)
+{
+ if (!fds.ymd.ok() && !fds.wd.ok())
+ {
+ // fds does not contain a valid weekday
+ os.setstate(std::ios::failbit);
+ return 8;
+ }
+ weekday wd;
+ if (fds.ymd.ok())
+ {
+ wd = weekday{sys_days(fds.ymd)};
+ if (fds.wd.ok() && wd != fds.wd)
+ {
+ // fds.ymd and fds.wd are inconsistent
+ os.setstate(std::ios::failbit);
+ return 8;
+ }
+ }
+ else
+ wd = fds.wd;
+ return static_cast<unsigned>((wd - Sunday).count());
+}
+
+template <class CharT, class Traits, class Duration>
+unsigned
+extract_month(std::basic_ostream<CharT, Traits>& os, const fields<Duration>& fds)
+{
+ if (!fds.ymd.month().ok())
+ {
+ // fds does not contain a valid month
+ os.setstate(std::ios::failbit);
+ return 0;
+ }
+ return static_cast<unsigned>(fds.ymd.month());
+}
+
+} // namespace detail
+
+#if ONLY_C_LOCALE
+
+namespace detail
+{
+
+inline
+std::pair<const std::string*, const std::string*>
+weekday_names()
+{
+ static const std::string nm[] =
+ {
+ "Sunday",
+ "Monday",
+ "Tuesday",
+ "Wednesday",
+ "Thursday",
+ "Friday",
+ "Saturday",
+ "Sun",
+ "Mon",
+ "Tue",
+ "Wed",
+ "Thu",
+ "Fri",
+ "Sat"
+ };
+ return std::make_pair(nm, nm+sizeof(nm)/sizeof(nm[0]));
+}
+
+inline
+std::pair<const std::string*, const std::string*>
+month_names()
+{
+ static const std::string nm[] =
+ {
+ "January",
+ "February",
+ "March",
+ "April",
+ "May",
+ "June",
+ "July",
+ "August",
+ "September",
+ "October",
+ "November",
+ "December",
+ "Jan",
+ "Feb",
+ "Mar",
+ "Apr",
+ "May",
+ "Jun",
+ "Jul",
+ "Aug",
+ "Sep",
+ "Oct",
+ "Nov",
+ "Dec"
+ };
+ return std::make_pair(nm, nm+sizeof(nm)/sizeof(nm[0]));
+}
+
+inline
+std::pair<const std::string*, const std::string*>
+ampm_names()
+{
+ static const std::string nm[] =
+ {
+ "AM",
+ "PM"
+ };
+ return std::make_pair(nm, nm+sizeof(nm)/sizeof(nm[0]));
+}
+
+template <class CharT, class Traits, class FwdIter>
+FwdIter
+scan_keyword(std::basic_istream<CharT, Traits>& is, FwdIter kb, FwdIter ke)
+{
+ size_t nkw = static_cast<size_t>(std::distance(kb, ke));
+ const unsigned char doesnt_match = '\0';
+ const unsigned char might_match = '\1';
+ const unsigned char does_match = '\2';
+ unsigned char statbuf[100];
+ unsigned char* status = statbuf;
+ std::unique_ptr<unsigned char, void(*)(void*)> stat_hold(0, free);
+ if (nkw > sizeof(statbuf))
+ {
+ status = (unsigned char*)std::malloc(nkw);
+ if (status == nullptr)
+ throw std::bad_alloc();
+ stat_hold.reset(status);
+ }
+ size_t n_might_match = nkw; // At this point, any keyword might match
+ size_t n_does_match = 0; // but none of them definitely do
+ // Initialize all statuses to might_match, except for "" keywords are does_match
+ unsigned char* st = status;
+ for (auto ky = kb; ky != ke; ++ky, ++st)
+ {
+ if (!ky->empty())
+ *st = might_match;
+ else
+ {
+ *st = does_match;
+ --n_might_match;
+ ++n_does_match;
+ }
+ }
+ // While there might be a match, test keywords against the next CharT
+ for (size_t indx = 0; is && n_might_match > 0; ++indx)
+ {
+ // Peek at the next CharT but don't consume it
+ auto ic = is.peek();
+ if (ic == EOF)
+ {
+ is.setstate(std::ios::eofbit);
+ break;
+ }
+ auto c = static_cast<char>(toupper(static_cast<unsigned char>(ic)));
+ bool consume = false;
+ // For each keyword which might match, see if the indx character is c
+ // If a match if found, consume c
+ // If a match is found, and that is the last character in the keyword,
+ // then that keyword matches.
+ // If the keyword doesn't match this character, then change the keyword
+ // to doesn't match
+ st = status;
+ for (auto ky = kb; ky != ke; ++ky, ++st)
+ {
+ if (*st == might_match)
+ {
+ if (c == static_cast<char>(toupper(static_cast<unsigned char>((*ky)[indx]))))
+ {
+ consume = true;
+ if (ky->size() == indx+1)
+ {
+ *st = does_match;
+ --n_might_match;
+ ++n_does_match;
+ }
+ }
+ else
+ {
+ *st = doesnt_match;
+ --n_might_match;
+ }
+ }
+ }
+ // consume if we matched a character
+ if (consume)
+ {
+ (void)is.get();
+ // If we consumed a character and there might be a matched keyword that
+ // was marked matched on a previous iteration, then such keywords
+ // are now marked as not matching.
+ if (n_might_match + n_does_match > 1)
+ {
+ st = status;
+ for (auto ky = kb; ky != ke; ++ky, ++st)
+ {
+ if (*st == does_match && ky->size() != indx+1)
+ {
+ *st = doesnt_match;
+ --n_does_match;
+ }
+ }
+ }
+ }
+ }
+ // We've exited the loop because we hit eof and/or we have no more "might matches".
+ // Return the first matching result
+ for (st = status; kb != ke; ++kb, ++st)
+ if (*st == does_match)
+ break;
+ if (kb == ke)
+ is.setstate(std::ios::failbit);
+ return kb;
+}
+
+} // namespace detail
+
+#endif // ONLY_C_LOCALE
+
+template <class CharT, class Traits, class Duration>
+std::basic_ostream<CharT, Traits>&
+to_stream(std::basic_ostream<CharT, Traits>& os, const CharT* fmt,
+ const fields<Duration>& fds, const std::string* abbrev,
+ const std::chrono::seconds* offset_sec)
+{
+#if ONLY_C_LOCALE
+ using detail::weekday_names;
+ using detail::month_names;
+ using detail::ampm_names;
+#endif
+ using detail::save_ostream;
+ using detail::get_units;
+ using detail::extract_weekday;
+ using detail::extract_month;
+ using std::ios;
+ using std::chrono::duration_cast;
+ using std::chrono::seconds;
+ using std::chrono::minutes;
+ using std::chrono::hours;
+ date::detail::save_ostream<CharT, Traits> ss(os);
+ os.fill(' ');
+ os.flags(std::ios::skipws | std::ios::dec);
+ os.width(0);
+ tm tm{};
+ bool insert_negative = fds.has_tod && fds.tod.to_duration() < Duration::zero();
+#if !ONLY_C_LOCALE
+ auto& facet = std::use_facet<std::time_put<CharT>>(os.getloc());
+#endif
+ const CharT* command = nullptr;
+ CharT modified = CharT{};
+ for (; *fmt; ++fmt)
+ {
+ switch (*fmt)
+ {
+ case 'a':
+ case 'A':
+ if (command)
+ {
+ if (modified == CharT{})
+ {
+ tm.tm_wday = static_cast<int>(extract_weekday(os, fds));
+ if (os.fail())
+ return os;
+#if !ONLY_C_LOCALE
+ const CharT f[] = {'%', *fmt};
+ facet.put(os, os, os.fill(), &tm, std::begin(f), std::end(f));
+#else // ONLY_C_LOCALE
+ os << weekday_names().first[tm.tm_wday+7*(*fmt == 'a')];
+#endif // ONLY_C_LOCALE
+ }
+ else
+ {
+ os << CharT{'%'} << modified << *fmt;
+ modified = CharT{};
+ }
+ command = nullptr;
+ }
+ else
+ os << *fmt;
+ break;
+ case 'b':
+ case 'B':
+ case 'h':
+ if (command)
+ {
+ if (modified == CharT{})
+ {
+ tm.tm_mon = static_cast<int>(extract_month(os, fds)) - 1;
+#if !ONLY_C_LOCALE
+ const CharT f[] = {'%', *fmt};
+ facet.put(os, os, os.fill(), &tm, std::begin(f), std::end(f));
+#else // ONLY_C_LOCALE
+ os << month_names().first[tm.tm_mon+12*(*fmt != 'B')];
+#endif // ONLY_C_LOCALE
+ }
+ else
+ {
+ os << CharT{'%'} << modified << *fmt;
+ modified = CharT{};
+ }
+ command = nullptr;
+ }
+ else
+ os << *fmt;
+ break;
+ case 'c':
+ case 'x':
+ if (command)
+ {
+ if (modified == CharT{'O'})
+ os << CharT{'%'} << modified << *fmt;
+ else
+ {
+ if (!fds.ymd.ok())
+ os.setstate(std::ios::failbit);
+ if (*fmt == 'c' && !fds.has_tod)
+ os.setstate(std::ios::failbit);
+#if !ONLY_C_LOCALE
+ tm = std::tm{};
+ auto const& ymd = fds.ymd;
+ auto ld = local_days(ymd);
+ if (*fmt == 'c')
+ {
+ tm.tm_sec = static_cast<int>(fds.tod.seconds().count());
+ tm.tm_min = static_cast<int>(fds.tod.minutes().count());
+ tm.tm_hour = static_cast<int>(fds.tod.hours().count());
+ }
+ tm.tm_mday = static_cast<int>(static_cast<unsigned>(ymd.day()));
+ tm.tm_mon = static_cast<int>(extract_month(os, fds) - 1);
+ tm.tm_year = static_cast<int>(ymd.year()) - 1900;
+ tm.tm_wday = static_cast<int>(extract_weekday(os, fds));
+ if (os.fail())
+ return os;
+ tm.tm_yday = static_cast<int>((ld - local_days(ymd.year()/1/1)).count());
+ CharT f[3] = {'%'};
+ auto fe = std::begin(f) + 1;
+ if (modified == CharT{'E'})
+ *fe++ = modified;
+ *fe++ = *fmt;
+ facet.put(os, os, os.fill(), &tm, std::begin(f), fe);
+#else // ONLY_C_LOCALE
+ if (*fmt == 'c')
+ {
+ auto wd = static_cast<int>(extract_weekday(os, fds));
+ os << weekday_names().first[static_cast<unsigned>(wd)+7]
+ << ' ';
+ os << month_names().first[extract_month(os, fds)-1+12] << ' ';
+ auto d = static_cast<int>(static_cast<unsigned>(fds.ymd.day()));
+ if (d < 10)
+ os << ' ';
+ os << d << ' '
+ << make_time(duration_cast<seconds>(fds.tod.to_duration()))
+ << ' ' << fds.ymd.year();
+
+ }
+ else // *fmt == 'x'
+ {
+ auto const& ymd = fds.ymd;
+ save_ostream<CharT, Traits> _(os);
+ os.fill('0');
+ os.flags(std::ios::dec | std::ios::right);
+ os.width(2);
+ os << static_cast<unsigned>(ymd.month()) << CharT{'/'};
+ os.width(2);
+ os << static_cast<unsigned>(ymd.day()) << CharT{'/'};
+ os.width(2);
+ os << static_cast<int>(ymd.year()) % 100;
+ }
+#endif // ONLY_C_LOCALE
+ }
+ command = nullptr;
+ modified = CharT{};
+ }
+ else
+ os << *fmt;
+ break;
+ case 'C':
+ if (command)
+ {
+ if (modified == CharT{'O'})
+ os << CharT{'%'} << modified << *fmt;
+ else
+ {
+ if (!fds.ymd.year().ok())
+ os.setstate(std::ios::failbit);
+ auto y = static_cast<int>(fds.ymd.year());
+#if !ONLY_C_LOCALE
+ if (modified == CharT{})
+#endif
+ {
+ save_ostream<CharT, Traits> _(os);
+ os.fill('0');
+ os.flags(std::ios::dec | std::ios::right);
+ if (y >= 0)
+ {
+ os.width(2);
+ os << y/100;
+ }
+ else
+ {
+ os << CharT{'-'};
+ os.width(2);
+ os << -(y-99)/100;
+ }
+ }
+#if !ONLY_C_LOCALE
+ else if (modified == CharT{'E'})
+ {
+ tm.tm_year = y - 1900;
+ CharT f[3] = {'%', 'E', 'C'};
+ facet.put(os, os, os.fill(), &tm, std::begin(f), std::end(f));
+ }
+#endif
+ }
+ command = nullptr;
+ modified = CharT{};
+ }
+ else
+ os << *fmt;
+ break;
+ case 'd':
+ case 'e':
+ if (command)
+ {
+ if (modified == CharT{'E'})
+ os << CharT{'%'} << modified << *fmt;
+ else
+ {
+ if (!fds.ymd.day().ok())
+ os.setstate(std::ios::failbit);
+ auto d = static_cast<int>(static_cast<unsigned>(fds.ymd.day()));
+#if !ONLY_C_LOCALE
+ if (modified == CharT{})
+#endif
+ {
+ save_ostream<CharT, Traits> _(os);
+ if (*fmt == CharT{'d'})
+ os.fill('0');
+ else
+ os.fill(' ');
+ os.flags(std::ios::dec | std::ios::right);
+ os.width(2);
+ os << d;
+ }
+#if !ONLY_C_LOCALE
+ else if (modified == CharT{'O'})
+ {
+ tm.tm_mday = d;
+ CharT f[3] = {'%', 'O', *fmt};
+ facet.put(os, os, os.fill(), &tm, std::begin(f), std::end(f));
+ }
+#endif
+ }
+ command = nullptr;
+ modified = CharT{};
+ }
+ else
+ os << *fmt;
+ break;
+ case 'D':
+ if (command)
+ {
+ if (modified == CharT{})
+ {
+ if (!fds.ymd.ok())
+ os.setstate(std::ios::failbit);
+ auto const& ymd = fds.ymd;
+ save_ostream<CharT, Traits> _(os);
+ os.fill('0');
+ os.flags(std::ios::dec | std::ios::right);
+ os.width(2);
+ os << static_cast<unsigned>(ymd.month()) << CharT{'/'};
+ os.width(2);
+ os << static_cast<unsigned>(ymd.day()) << CharT{'/'};
+ os.width(2);
+ os << static_cast<int>(ymd.year()) % 100;
+ }
+ else
+ {
+ os << CharT{'%'} << modified << *fmt;
+ modified = CharT{};
+ }
+ command = nullptr;
+ }
+ else
+ os << *fmt;
+ break;
+ case 'F':
+ if (command)
+ {
+ if (modified == CharT{})
+ {
+ if (!fds.ymd.ok())
+ os.setstate(std::ios::failbit);
+ auto const& ymd = fds.ymd;
+ save_ostream<CharT, Traits> _(os);
+ os.imbue(std::locale::classic());
+ os.fill('0');
+ os.flags(std::ios::dec | std::ios::right);
+ os.width(4);
+ os << static_cast<int>(ymd.year()) << CharT{'-'};
+ os.width(2);
+ os << static_cast<unsigned>(ymd.month()) << CharT{'-'};
+ os.width(2);
+ os << static_cast<unsigned>(ymd.day());
+ }
+ else
+ {
+ os << CharT{'%'} << modified << *fmt;
+ modified = CharT{};
+ }
+ command = nullptr;
+ }
+ else
+ os << *fmt;
+ break;
+ case 'g':
+ case 'G':
+ if (command)
+ {
+ if (modified == CharT{})
+ {
+ if (!fds.ymd.ok())
+ os.setstate(std::ios::failbit);
+ auto ld = local_days(fds.ymd);
+ auto y = year_month_day{ld + days{3}}.year();
+ auto start = local_days((y-years{1})/December/Thursday[last]) +
+ (Monday-Thursday);
+ if (ld < start)
+ --y;
+ if (*fmt == CharT{'G'})
+ os << y;
+ else
+ {
+ save_ostream<CharT, Traits> _(os);
+ os.fill('0');
+ os.flags(std::ios::dec | std::ios::right);
+ os.width(2);
+ os << std::abs(static_cast<int>(y)) % 100;
+ }
+ }
+ else
+ {
+ os << CharT{'%'} << modified << *fmt;
+ modified = CharT{};
+ }
+ command = nullptr;
+ }
+ else
+ os << *fmt;
+ break;
+ case 'H':
+ case 'I':
+ if (command)
+ {
+ if (modified == CharT{'E'})
+ os << CharT{'%'} << modified << *fmt;
+ else
+ {
+ if (!fds.has_tod)
+ os.setstate(std::ios::failbit);
+ if (insert_negative)
+ {
+ os << '-';
+ insert_negative = false;
+ }
+ auto hms = fds.tod;
+#if !ONLY_C_LOCALE
+ if (modified == CharT{})
+#endif
+ {
+ auto h = *fmt == CharT{'I'} ? date::make12(hms.hours()) : hms.hours();
+ if (h < hours{10})
+ os << CharT{'0'};
+ os << h.count();
+ }
+#if !ONLY_C_LOCALE
+ else if (modified == CharT{'O'})
+ {
+ const CharT f[] = {'%', modified, *fmt};
+ tm.tm_hour = static_cast<int>(hms.hours().count());
+ facet.put(os, os, os.fill(), &tm, std::begin(f), std::end(f));
+ }
+#endif
+ }
+ modified = CharT{};
+ command = nullptr;
+ }
+ else
+ os << *fmt;
+ break;
+ case 'j':
+ if (command)
+ {
+ if (modified == CharT{})
+ {
+ if (fds.ymd.ok() || fds.has_tod)
+ {
+ days doy;
+ if (fds.ymd.ok())
+ {
+ auto ld = local_days(fds.ymd);
+ auto y = fds.ymd.year();
+ doy = ld - local_days(y/January/1) + days{1};
+ }
+ else
+ {
+ doy = duration_cast<days>(fds.tod.to_duration());
+ }
+ save_ostream<CharT, Traits> _(os);
+ os.fill('0');
+ os.flags(std::ios::dec | std::ios::right);
+ os.width(3);
+ os << doy.count();
+ }
+ else
+ {
+ os.setstate(std::ios::failbit);
+ }
+ }
+ else
+ {
+ os << CharT{'%'} << modified << *fmt;
+ modified = CharT{};
+ }
+ command = nullptr;
+ }
+ else
+ os << *fmt;
+ break;
+ case 'm':
+ if (command)
+ {
+ if (modified == CharT{'E'})
+ os << CharT{'%'} << modified << *fmt;
+ else
+ {
+ if (!fds.ymd.month().ok())
+ os.setstate(std::ios::failbit);
+ auto m = static_cast<unsigned>(fds.ymd.month());
+#if !ONLY_C_LOCALE
+ if (modified == CharT{})
+#endif
+ {
+ if (m < 10)
+ os << CharT{'0'};
+ os << m;
+ }
+#if !ONLY_C_LOCALE
+ else if (modified == CharT{'O'})
+ {
+ const CharT f[] = {'%', modified, *fmt};
+ tm.tm_mon = static_cast<int>(m-1);
+ facet.put(os, os, os.fill(), &tm, std::begin(f), std::end(f));
+ }
+#endif
+ }
+ modified = CharT{};
+ command = nullptr;
+ }
+ else
+ os << *fmt;
+ break;
+ case 'M':
+ if (command)
+ {
+ if (modified == CharT{'E'})
+ os << CharT{'%'} << modified << *fmt;
+ else
+ {
+ if (!fds.has_tod)
+ os.setstate(std::ios::failbit);
+ if (insert_negative)
+ {
+ os << '-';
+ insert_negative = false;
+ }
+#if !ONLY_C_LOCALE
+ if (modified == CharT{})
+#endif
+ {
+ if (fds.tod.minutes() < minutes{10})
+ os << CharT{'0'};
+ os << fds.tod.minutes().count();
+ }
+#if !ONLY_C_LOCALE
+ else if (modified == CharT{'O'})
+ {
+ const CharT f[] = {'%', modified, *fmt};
+ tm.tm_min = static_cast<int>(fds.tod.minutes().count());
+ facet.put(os, os, os.fill(), &tm, std::begin(f), std::end(f));
+ }
+#endif
+ }
+ modified = CharT{};
+ command = nullptr;
+ }
+ else
+ os << *fmt;
+ break;
+ case 'n':
+ if (command)
+ {
+ if (modified == CharT{})
+ os << CharT{'\n'};
+ else
+ {
+ os << CharT{'%'} << modified << *fmt;
+ modified = CharT{};
+ }
+ command = nullptr;
+ }
+ else
+ os << *fmt;
+ break;
+ case 'p':
+ if (command)
+ {
+ if (modified == CharT{})
+ {
+ if (!fds.has_tod)
+ os.setstate(std::ios::failbit);
+#if !ONLY_C_LOCALE
+ const CharT f[] = {'%', *fmt};
+ tm.tm_hour = static_cast<int>(fds.tod.hours().count());
+ facet.put(os, os, os.fill(), &tm, std::begin(f), std::end(f));
+#else
+ if (date::is_am(fds.tod.hours()))
+ os << ampm_names().first[0];
+ else
+ os << ampm_names().first[1];
+#endif
+ }
+ else
+ {
+ os << CharT{'%'} << modified << *fmt;
+ }
+ modified = CharT{};
+ command = nullptr;
+ }
+ else
+ os << *fmt;
+ break;
+ case 'Q':
+ case 'q':
+ if (command)
+ {
+ if (modified == CharT{})
+ {
+ if (!fds.has_tod)
+ os.setstate(std::ios::failbit);
+ auto d = fds.tod.to_duration();
+ if (*fmt == 'q')
+ os << get_units<CharT>(typename decltype(d)::period::type{});
+ else
+ os << d.count();
+ }
+ else
+ {
+ os << CharT{'%'} << modified << *fmt;
+ }
+ modified = CharT{};
+ command = nullptr;
+ }
+ else
+ os << *fmt;
+ break;
+ case 'r':
+ if (command)
+ {
+ if (modified == CharT{})
+ {
+ if (!fds.has_tod)
+ os.setstate(std::ios::failbit);
+#if !ONLY_C_LOCALE
+ const CharT f[] = {'%', *fmt};
+ tm.tm_hour = static_cast<int>(fds.tod.hours().count());
+ tm.tm_min = static_cast<int>(fds.tod.minutes().count());
+ tm.tm_sec = static_cast<int>(fds.tod.seconds().count());
+ facet.put(os, os, os.fill(), &tm, std::begin(f), std::end(f));
+#else
+ hh_mm_ss<seconds> tod(duration_cast<seconds>(fds.tod.to_duration()));
+ save_ostream<CharT, Traits> _(os);
+ os.fill('0');
+ os.width(2);
+ os << date::make12(tod.hours()).count() << CharT{':'};
+ os.width(2);
+ os << tod.minutes().count() << CharT{':'};
+ os.width(2);
+ os << tod.seconds().count() << CharT{' '};
+ if (date::is_am(tod.hours()))
+ os << ampm_names().first[0];
+ else
+ os << ampm_names().first[1];
+#endif
+ }
+ else
+ {
+ os << CharT{'%'} << modified << *fmt;
+ }
+ modified = CharT{};
+ command = nullptr;
+ }
+ else
+ os << *fmt;
+ break;
+ case 'R':
+ if (command)
+ {
+ if (modified == CharT{})
+ {
+ if (!fds.has_tod)
+ os.setstate(std::ios::failbit);
+ if (fds.tod.hours() < hours{10})
+ os << CharT{'0'};
+ os << fds.tod.hours().count() << CharT{':'};
+ if (fds.tod.minutes() < minutes{10})
+ os << CharT{'0'};
+ os << fds.tod.minutes().count();
+ }
+ else
+ {
+ os << CharT{'%'} << modified << *fmt;
+ modified = CharT{};
+ }
+ command = nullptr;
+ }
+ else
+ os << *fmt;
+ break;
+ case 'S':
+ if (command)
+ {
+ if (modified == CharT{'E'})
+ os << CharT{'%'} << modified << *fmt;
+ else
+ {
+ if (!fds.has_tod)
+ os.setstate(std::ios::failbit);
+ if (insert_negative)
+ {
+ os << '-';
+ insert_negative = false;
+ }
+#if !ONLY_C_LOCALE
+ if (modified == CharT{})
+#endif
+ {
+ os << fds.tod.s_;
+ }
+#if !ONLY_C_LOCALE
+ else if (modified == CharT{'O'})
+ {
+ const CharT f[] = {'%', modified, *fmt};
+ tm.tm_sec = static_cast<int>(fds.tod.s_.seconds().count());
+ facet.put(os, os, os.fill(), &tm, std::begin(f), std::end(f));
+ }
+#endif
+ }
+ modified = CharT{};
+ command = nullptr;
+ }
+ else
+ os << *fmt;
+ break;
+ case 't':
+ if (command)
+ {
+ if (modified == CharT{})
+ os << CharT{'\t'};
+ else
+ {
+ os << CharT{'%'} << modified << *fmt;
+ modified = CharT{};
+ }
+ command = nullptr;
+ }
+ else
+ os << *fmt;
+ break;
+ case 'T':
+ if (command)
+ {
+ if (modified == CharT{})
+ {
+ if (!fds.has_tod)
+ os.setstate(std::ios::failbit);
+ os << fds.tod;
+ }
+ else
+ {
+ os << CharT{'%'} << modified << *fmt;
+ modified = CharT{};
+ }
+ command = nullptr;
+ }
+ else
+ os << *fmt;
+ break;
+ case 'u':
+ if (command)
+ {
+ if (modified == CharT{'E'})
+ os << CharT{'%'} << modified << *fmt;
+ else
+ {
+ auto wd = extract_weekday(os, fds);
+#if !ONLY_C_LOCALE
+ if (modified == CharT{})
+#endif
+ {
+ os << (wd != 0 ? wd : 7u);
+ }
+#if !ONLY_C_LOCALE
+ else if (modified == CharT{'O'})
+ {
+ const CharT f[] = {'%', modified, *fmt};
+ tm.tm_wday = static_cast<int>(wd);
+ facet.put(os, os, os.fill(), &tm, std::begin(f), std::end(f));
+ }
+#endif
+ }
+ modified = CharT{};
+ command = nullptr;
+ }
+ else
+ os << *fmt;
+ break;
+ case 'U':
+ if (command)
+ {
+ if (modified == CharT{'E'})
+ os << CharT{'%'} << modified << *fmt;
+ else
+ {
+ auto const& ymd = fds.ymd;
+ if (!ymd.ok())
+ os.setstate(std::ios::failbit);
+ auto ld = local_days(ymd);
+#if !ONLY_C_LOCALE
+ if (modified == CharT{})
+#endif
+ {
+ auto st = local_days(Sunday[1]/January/ymd.year());
+ if (ld < st)
+ os << CharT{'0'} << CharT{'0'};
+ else
+ {
+ auto wn = duration_cast<weeks>(ld - st).count() + 1;
+ if (wn < 10)
+ os << CharT{'0'};
+ os << wn;
+ }
+ }
+ #if !ONLY_C_LOCALE
+ else if (modified == CharT{'O'})
+ {
+ const CharT f[] = {'%', modified, *fmt};
+ tm.tm_year = static_cast<int>(ymd.year()) - 1900;
+ tm.tm_wday = static_cast<int>(extract_weekday(os, fds));
+ if (os.fail())
+ return os;
+ tm.tm_yday = static_cast<int>((ld - local_days(ymd.year()/1/1)).count());
+ facet.put(os, os, os.fill(), &tm, std::begin(f), std::end(f));
+ }
+#endif
+ }
+ modified = CharT{};
+ command = nullptr;
+ }
+ else
+ os << *fmt;
+ break;
+ case 'V':
+ if (command)
+ {
+ if (modified == CharT{'E'})
+ os << CharT{'%'} << modified << *fmt;
+ else
+ {
+ if (!fds.ymd.ok())
+ os.setstate(std::ios::failbit);
+ auto ld = local_days(fds.ymd);
+#if !ONLY_C_LOCALE
+ if (modified == CharT{})
+#endif
+ {
+ auto y = year_month_day{ld + days{3}}.year();
+ auto st = local_days((y-years{1})/12/Thursday[last]) +
+ (Monday-Thursday);
+ if (ld < st)
+ {
+ --y;
+ st = local_days((y - years{1})/12/Thursday[last]) +
+ (Monday-Thursday);
+ }
+ auto wn = duration_cast<weeks>(ld - st).count() + 1;
+ if (wn < 10)
+ os << CharT{'0'};
+ os << wn;
+ }
+#if !ONLY_C_LOCALE
+ else if (modified == CharT{'O'})
+ {
+ const CharT f[] = {'%', modified, *fmt};
+ auto const& ymd = fds.ymd;
+ tm.tm_year = static_cast<int>(ymd.year()) - 1900;
+ tm.tm_wday = static_cast<int>(extract_weekday(os, fds));
+ if (os.fail())
+ return os;
+ tm.tm_yday = static_cast<int>((ld - local_days(ymd.year()/1/1)).count());
+ facet.put(os, os, os.fill(), &tm, std::begin(f), std::end(f));
+ }
+#endif
+ }
+ modified = CharT{};
+ command = nullptr;
+ }
+ else
+ os << *fmt;
+ break;
+ case 'w':
+ if (command)
+ {
+ auto wd = extract_weekday(os, fds);
+ if (os.fail())
+ return os;
+#if !ONLY_C_LOCALE
+ if (modified == CharT{})
+#else
+ if (modified != CharT{'E'})
+#endif
+ {
+ os << wd;
+ }
+#if !ONLY_C_LOCALE
+ else if (modified == CharT{'O'})
+ {
+ const CharT f[] = {'%', modified, *fmt};
+ tm.tm_wday = static_cast<int>(wd);
+ facet.put(os, os, os.fill(), &tm, std::begin(f), std::end(f));
+ }
+#endif
+ else
+ {
+ os << CharT{'%'} << modified << *fmt;
+ }
+ modified = CharT{};
+ command = nullptr;
+ }
+ else
+ os << *fmt;
+ break;
+ case 'W':
+ if (command)
+ {
+ if (modified == CharT{'E'})
+ os << CharT{'%'} << modified << *fmt;
+ else
+ {
+ auto const& ymd = fds.ymd;
+ if (!ymd.ok())
+ os.setstate(std::ios::failbit);
+ auto ld = local_days(ymd);
+#if !ONLY_C_LOCALE
+ if (modified == CharT{})
+#endif
+ {
+ auto st = local_days(Monday[1]/January/ymd.year());
+ if (ld < st)
+ os << CharT{'0'} << CharT{'0'};
+ else
+ {
+ auto wn = duration_cast<weeks>(ld - st).count() + 1;
+ if (wn < 10)
+ os << CharT{'0'};
+ os << wn;
+ }
+ }
+#if !ONLY_C_LOCALE
+ else if (modified == CharT{'O'})
+ {
+ const CharT f[] = {'%', modified, *fmt};
+ tm.tm_year = static_cast<int>(ymd.year()) - 1900;
+ tm.tm_wday = static_cast<int>(extract_weekday(os, fds));
+ if (os.fail())
+ return os;
+ tm.tm_yday = static_cast<int>((ld - local_days(ymd.year()/1/1)).count());
+ facet.put(os, os, os.fill(), &tm, std::begin(f), std::end(f));
+ }
+#endif
+ }
+ modified = CharT{};
+ command = nullptr;
+ }
+ else
+ os << *fmt;
+ break;
+ case 'X':
+ if (command)
+ {
+ if (modified == CharT{'O'})
+ os << CharT{'%'} << modified << *fmt;
+ else
+ {
+ if (!fds.has_tod)
+ os.setstate(std::ios::failbit);
+#if !ONLY_C_LOCALE
+ tm = std::tm{};
+ tm.tm_sec = static_cast<int>(fds.tod.seconds().count());
+ tm.tm_min = static_cast<int>(fds.tod.minutes().count());
+ tm.tm_hour = static_cast<int>(fds.tod.hours().count());
+ CharT f[3] = {'%'};
+ auto fe = std::begin(f) + 1;
+ if (modified == CharT{'E'})
+ *fe++ = modified;
+ *fe++ = *fmt;
+ facet.put(os, os, os.fill(), &tm, std::begin(f), fe);
+#else
+ os << fds.tod;
+#endif
+ }
+ command = nullptr;
+ modified = CharT{};
+ }
+ else
+ os << *fmt;
+ break;
+ case 'y':
+ if (command)
+ {
+ if (!fds.ymd.year().ok())
+ os.setstate(std::ios::failbit);
+ auto y = static_cast<int>(fds.ymd.year());
+#if !ONLY_C_LOCALE
+ if (modified == CharT{})
+ {
+#endif
+ y = std::abs(y) % 100;
+ if (y < 10)
+ os << CharT{'0'};
+ os << y;
+#if !ONLY_C_LOCALE
+ }
+ else
+ {
+ const CharT f[] = {'%', modified, *fmt};
+ tm.tm_year = y - 1900;
+ facet.put(os, os, os.fill(), &tm, std::begin(f), std::end(f));
+ }
+#endif
+ modified = CharT{};
+ command = nullptr;
+ }
+ else
+ os << *fmt;
+ break;
+ case 'Y':
+ if (command)
+ {
+ if (modified == CharT{'O'})
+ os << CharT{'%'} << modified << *fmt;
+ else
+ {
+ if (!fds.ymd.year().ok())
+ os.setstate(std::ios::failbit);
+ auto y = fds.ymd.year();
+#if !ONLY_C_LOCALE
+ if (modified == CharT{})
+#endif
+ {
+ save_ostream<CharT, Traits> _(os);
+ os.imbue(std::locale::classic());
+ os << y;
+ }
+#if !ONLY_C_LOCALE
+ else if (modified == CharT{'E'})
+ {
+ const CharT f[] = {'%', modified, *fmt};
+ tm.tm_year = static_cast<int>(y) - 1900;
+ facet.put(os, os, os.fill(), &tm, std::begin(f), std::end(f));
+ }
+#endif
+ }
+ modified = CharT{};
+ command = nullptr;
+ }
+ else
+ os << *fmt;
+ break;
+ case 'z':
+ if (command)
+ {
+ if (offset_sec == nullptr)
+ {
+ // Can not format %z with unknown offset
+ os.setstate(ios::failbit);
+ return os;
+ }
+ auto m = duration_cast<minutes>(*offset_sec);
+ auto neg = m < minutes{0};
+ m = date::abs(m);
+ auto h = duration_cast<hours>(m);
+ m -= h;
+ if (neg)
+ os << CharT{'-'};
+ else
+ os << CharT{'+'};
+ if (h < hours{10})
+ os << CharT{'0'};
+ os << h.count();
+ if (modified != CharT{})
+ os << CharT{':'};
+ if (m < minutes{10})
+ os << CharT{'0'};
+ os << m.count();
+ command = nullptr;
+ modified = CharT{};
+ }
+ else
+ os << *fmt;
+ break;
+ case 'Z':
+ if (command)
+ {
+ if (modified == CharT{})
+ {
+ if (abbrev == nullptr)
+ {
+ // Can not format %Z with unknown time_zone
+ os.setstate(ios::failbit);
+ return os;
+ }
+ for (auto c : *abbrev)
+ os << CharT(c);
+ }
+ else
+ {
+ os << CharT{'%'} << modified << *fmt;
+ modified = CharT{};
+ }
+ command = nullptr;
+ }
+ else
+ os << *fmt;
+ break;
+ case 'E':
+ case 'O':
+ if (command)
+ {
+ if (modified == CharT{})
+ {
+ modified = *fmt;
+ }
+ else
+ {
+ os << CharT{'%'} << modified << *fmt;
+ command = nullptr;
+ modified = CharT{};
+ }
+ }
+ else
+ os << *fmt;
+ break;
+ case '%':
+ if (command)
+ {
+ if (modified == CharT{})
+ {
+ os << CharT{'%'};
+ command = nullptr;
+ }
+ else
+ {
+ os << CharT{'%'} << modified << CharT{'%'};
+ command = nullptr;
+ modified = CharT{};
+ }
+ }
+ else
+ command = fmt;
+ break;
+ default:
+ if (command)
+ {
+ os << CharT{'%'};
+ command = nullptr;
+ }
+ if (modified != CharT{})
+ {
+ os << modified;
+ modified = CharT{};
+ }
+ os << *fmt;
+ break;
+ }
+ }
+ if (command)
+ os << CharT{'%'};
+ if (modified != CharT{})
+ os << modified;
+ return os;
+}
+
+template <class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+to_stream(std::basic_ostream<CharT, Traits>& os, const CharT* fmt, const year& y)
+{
+ using CT = std::chrono::seconds;
+ fields<CT> fds{y/0/0};
+ return to_stream(os, fmt, fds);
+}
+
+template <class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+to_stream(std::basic_ostream<CharT, Traits>& os, const CharT* fmt, const month& m)
+{
+ using CT = std::chrono::seconds;
+ fields<CT> fds{m/0/nanyear};
+ return to_stream(os, fmt, fds);
+}
+
+template <class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+to_stream(std::basic_ostream<CharT, Traits>& os, const CharT* fmt, const day& d)
+{
+ using CT = std::chrono::seconds;
+ fields<CT> fds{d/0/nanyear};
+ return to_stream(os, fmt, fds);
+}
+
+template <class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+to_stream(std::basic_ostream<CharT, Traits>& os, const CharT* fmt, const weekday& wd)
+{
+ using CT = std::chrono::seconds;
+ fields<CT> fds{wd};
+ return to_stream(os, fmt, fds);
+}
+
+template <class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+to_stream(std::basic_ostream<CharT, Traits>& os, const CharT* fmt, const year_month& ym)
+{
+ using CT = std::chrono::seconds;
+ fields<CT> fds{ym/0};
+ return to_stream(os, fmt, fds);
+}
+
+template <class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+to_stream(std::basic_ostream<CharT, Traits>& os, const CharT* fmt, const month_day& md)
+{
+ using CT = std::chrono::seconds;
+ fields<CT> fds{md/nanyear};
+ return to_stream(os, fmt, fds);
+}
+
+template <class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+to_stream(std::basic_ostream<CharT, Traits>& os, const CharT* fmt,
+ const year_month_day& ymd)
+{
+ using CT = std::chrono::seconds;
+ fields<CT> fds{ymd};
+ return to_stream(os, fmt, fds);
+}
+
+template <class CharT, class Traits, class Rep, class Period>
+inline
+std::basic_ostream<CharT, Traits>&
+to_stream(std::basic_ostream<CharT, Traits>& os, const CharT* fmt,
+ const std::chrono::duration<Rep, Period>& d)
+{
+ using Duration = std::chrono::duration<Rep, Period>;
+ using CT = typename std::common_type<Duration, std::chrono::seconds>::type;
+ fields<CT> fds{hh_mm_ss<CT>{d}};
+ return to_stream(os, fmt, fds);
+}
+
+template <class CharT, class Traits, class Duration>
+std::basic_ostream<CharT, Traits>&
+to_stream(std::basic_ostream<CharT, Traits>& os, const CharT* fmt,
+ const local_time<Duration>& tp, const std::string* abbrev = nullptr,
+ const std::chrono::seconds* offset_sec = nullptr)
+{
+ using CT = typename std::common_type<Duration, std::chrono::seconds>::type;
+ auto ld = floor<days>(tp);
+ fields<CT> fds{year_month_day{ld}, hh_mm_ss<CT>{tp-local_seconds{ld}}};
+ return to_stream(os, fmt, fds, abbrev, offset_sec);
+}
+
+template <class CharT, class Traits, class Duration>
+std::basic_ostream<CharT, Traits>&
+to_stream(std::basic_ostream<CharT, Traits>& os, const CharT* fmt,
+ const sys_time<Duration>& tp)
+{
+ using std::chrono::seconds;
+ using CT = typename std::common_type<Duration, seconds>::type;
+ const std::string abbrev("UTC");
+ CONSTDATA seconds offset{0};
+ auto sd = floor<days>(tp);
+ fields<CT> fds{year_month_day{sd}, hh_mm_ss<CT>{tp-sys_seconds{sd}}};
+ return to_stream(os, fmt, fds, &abbrev, &offset);
+}
+
+// format
+
+template <class CharT, class Streamable>
+auto
+format(const std::locale& loc, const CharT* fmt, const Streamable& tp)
+ -> decltype(to_stream(std::declval<std::basic_ostream<CharT>&>(), fmt, tp),
+ std::basic_string<CharT>{})
+{
+ std::basic_ostringstream<CharT> os;
+ os.exceptions(std::ios::failbit | std::ios::badbit);
+ os.imbue(loc);
+ to_stream(os, fmt, tp);
+ return os.str();
+}
+
+template <class CharT, class Streamable>
+auto
+format(const CharT* fmt, const Streamable& tp)
+ -> decltype(to_stream(std::declval<std::basic_ostream<CharT>&>(), fmt, tp),
+ std::basic_string<CharT>{})
+{
+ std::basic_ostringstream<CharT> os;
+ os.exceptions(std::ios::failbit | std::ios::badbit);
+ to_stream(os, fmt, tp);
+ return os.str();
+}
+
+template <class CharT, class Traits, class Alloc, class Streamable>
+auto
+format(const std::locale& loc, const std::basic_string<CharT, Traits, Alloc>& fmt,
+ const Streamable& tp)
+ -> decltype(to_stream(std::declval<std::basic_ostream<CharT, Traits>&>(), fmt.c_str(), tp),
+ std::basic_string<CharT, Traits, Alloc>{})
+{
+ std::basic_ostringstream<CharT, Traits, Alloc> os;
+ os.exceptions(std::ios::failbit | std::ios::badbit);
+ os.imbue(loc);
+ to_stream(os, fmt.c_str(), tp);
+ return os.str();
+}
+
+template <class CharT, class Traits, class Alloc, class Streamable>
+auto
+format(const std::basic_string<CharT, Traits, Alloc>& fmt, const Streamable& tp)
+ -> decltype(to_stream(std::declval<std::basic_ostream<CharT, Traits>&>(), fmt.c_str(), tp),
+ std::basic_string<CharT, Traits, Alloc>{})
+{
+ std::basic_ostringstream<CharT, Traits, Alloc> os;
+ os.exceptions(std::ios::failbit | std::ios::badbit);
+ to_stream(os, fmt.c_str(), tp);
+ return os.str();
+}
+
+// parse
+
+namespace detail
+{
+
+template <class CharT, class Traits>
+bool
+read_char(std::basic_istream<CharT, Traits>& is, CharT fmt, std::ios::iostate& err)
+{
+ auto ic = is.get();
+ if (Traits::eq_int_type(ic, Traits::eof()) ||
+ !Traits::eq(Traits::to_char_type(ic), fmt))
+ {
+ err |= std::ios::failbit;
+ is.setstate(std::ios::failbit);
+ return false;
+ }
+ return true;
+}
+
+template <class CharT, class Traits>
+unsigned
+read_unsigned(std::basic_istream<CharT, Traits>& is, unsigned m = 1, unsigned M = 10)
+{
+ unsigned x = 0;
+ unsigned count = 0;
+ while (true)
+ {
+ auto ic = is.peek();
+ if (Traits::eq_int_type(ic, Traits::eof()))
+ break;
+ auto c = static_cast<char>(Traits::to_char_type(ic));
+ if (!('0' <= c && c <= '9'))
+ break;
+ (void)is.get();
+ ++count;
+ x = 10*x + static_cast<unsigned>(c - '0');
+ if (count == M)
+ break;
+ }
+ if (count < m)
+ is.setstate(std::ios::failbit);
+ return x;
+}
+
+template <class CharT, class Traits>
+int
+read_signed(std::basic_istream<CharT, Traits>& is, unsigned m = 1, unsigned M = 10)
+{
+ auto ic = is.peek();
+ if (!Traits::eq_int_type(ic, Traits::eof()))
+ {
+ auto c = static_cast<char>(Traits::to_char_type(ic));
+ if (('0' <= c && c <= '9') || c == '-' || c == '+')
+ {
+ if (c == '-' || c == '+')
+ (void)is.get();
+ auto x = static_cast<int>(read_unsigned(is, std::max(m, 1u), M));
+ if (!is.fail())
+ {
+ if (c == '-')
+ x = -x;
+ return x;
+ }
+ }
+ }
+ if (m > 0)
+ is.setstate(std::ios::failbit);
+ return 0;
+}
+
+template <class CharT, class Traits>
+long double
+read_long_double(std::basic_istream<CharT, Traits>& is, unsigned m = 1, unsigned M = 10)
+{
+ unsigned count = 0;
+ unsigned fcount = 0;
+ unsigned long long i = 0;
+ unsigned long long f = 0;
+ bool parsing_fraction = false;
+#if ONLY_C_LOCALE
+ typename Traits::int_type decimal_point = '.';
+#else
+ auto decimal_point = Traits::to_int_type(
+ std::use_facet<std::numpunct<CharT>>(is.getloc()).decimal_point());
+#endif
+ while (true)
+ {
+ auto ic = is.peek();
+ if (Traits::eq_int_type(ic, Traits::eof()))
+ break;
+ if (Traits::eq_int_type(ic, decimal_point))
+ {
+ decimal_point = Traits::eof();
+ parsing_fraction = true;
+ }
+ else
+ {
+ auto c = static_cast<char>(Traits::to_char_type(ic));
+ if (!('0' <= c && c <= '9'))
+ break;
+ if (!parsing_fraction)
+ {
+ i = 10*i + static_cast<unsigned>(c - '0');
+ }
+ else
+ {
+ f = 10*f + static_cast<unsigned>(c - '0');
+ ++fcount;
+ }
+ }
+ (void)is.get();
+ if (++count == M)
+ break;
+ }
+ if (count < m)
+ {
+ is.setstate(std::ios::failbit);
+ return 0;
+ }
+ return i + f/std::pow(10.L, fcount);
+}
+
+struct rs
+{
+ int& i;
+ unsigned m;
+ unsigned M;
+};
+
+struct ru
+{
+ int& i;
+ unsigned m;
+ unsigned M;
+};
+
+struct rld
+{
+ long double& i;
+ unsigned m;
+ unsigned M;
+};
+
+template <class CharT, class Traits>
+void
+read(std::basic_istream<CharT, Traits>&)
+{
+}
+
+template <class CharT, class Traits, class ...Args>
+void
+read(std::basic_istream<CharT, Traits>& is, CharT a0, Args&& ...args);
+
+template <class CharT, class Traits, class ...Args>
+void
+read(std::basic_istream<CharT, Traits>& is, rs a0, Args&& ...args);
+
+template <class CharT, class Traits, class ...Args>
+void
+read(std::basic_istream<CharT, Traits>& is, ru a0, Args&& ...args);
+
+template <class CharT, class Traits, class ...Args>
+void
+read(std::basic_istream<CharT, Traits>& is, int a0, Args&& ...args);
+
+template <class CharT, class Traits, class ...Args>
+void
+read(std::basic_istream<CharT, Traits>& is, rld a0, Args&& ...args);
+
+template <class CharT, class Traits, class ...Args>
+void
+read(std::basic_istream<CharT, Traits>& is, CharT a0, Args&& ...args)
+{
+ // No-op if a0 == CharT{}
+ if (a0 != CharT{})
+ {
+ auto ic = is.peek();
+ if (Traits::eq_int_type(ic, Traits::eof()))
+ {
+ is.setstate(std::ios::failbit | std::ios::eofbit);
+ return;
+ }
+ if (!Traits::eq(Traits::to_char_type(ic), a0))
+ {
+ is.setstate(std::ios::failbit);
+ return;
+ }
+ (void)is.get();
+ }
+ read(is, std::forward<Args>(args)...);
+}
+
+template <class CharT, class Traits, class ...Args>
+void
+read(std::basic_istream<CharT, Traits>& is, rs a0, Args&& ...args)
+{
+ auto x = read_signed(is, a0.m, a0.M);
+ if (is.fail())
+ return;
+ a0.i = x;
+ read(is, std::forward<Args>(args)...);
+}
+
+template <class CharT, class Traits, class ...Args>
+void
+read(std::basic_istream<CharT, Traits>& is, ru a0, Args&& ...args)
+{
+ auto x = read_unsigned(is, a0.m, a0.M);
+ if (is.fail())
+ return;
+ a0.i = static_cast<int>(x);
+ read(is, std::forward<Args>(args)...);
+}
+
+template <class CharT, class Traits, class ...Args>
+void
+read(std::basic_istream<CharT, Traits>& is, int a0, Args&& ...args)
+{
+ if (a0 != -1)
+ {
+ auto u = static_cast<unsigned>(a0);
+ CharT buf[std::numeric_limits<unsigned>::digits10+2u] = {};
+ auto e = buf;
+ do
+ {
+ *e++ = static_cast<CharT>(CharT(u % 10) + CharT{'0'});
+ u /= 10;
+ } while (u > 0);
+ std::reverse(buf, e);
+ for (auto p = buf; p != e && is.rdstate() == std::ios::goodbit; ++p)
+ read(is, *p);
+ }
+ if (is.rdstate() == std::ios::goodbit)
+ read(is, std::forward<Args>(args)...);
+}
+
+template <class CharT, class Traits, class ...Args>
+void
+read(std::basic_istream<CharT, Traits>& is, rld a0, Args&& ...args)
+{
+ auto x = read_long_double(is, a0.m, a0.M);
+ if (is.fail())
+ return;
+ a0.i = x;
+ read(is, std::forward<Args>(args)...);
+}
+
+template <class T, class CharT, class Traits>
+inline
+void
+checked_set(T& value, T from, T not_a_value, std::basic_ios<CharT, Traits>& is)
+{
+ if (!is.fail())
+ {
+ if (value == not_a_value)
+ value = std::move(from);
+ else if (value != from)
+ is.setstate(std::ios::failbit);
+ }
+}
+
+} // namespace detail;
+
+template <class CharT, class Traits, class Duration, class Alloc = std::allocator<CharT>>
+std::basic_istream<CharT, Traits>&
+from_stream(std::basic_istream<CharT, Traits>& is, const CharT* fmt,
+ fields<Duration>& fds, std::basic_string<CharT, Traits, Alloc>* abbrev,
+ std::chrono::minutes* offset)
+{
+ using std::numeric_limits;
+ using std::ios;
+ using std::chrono::duration;
+ using std::chrono::duration_cast;
+ using std::chrono::seconds;
+ using std::chrono::minutes;
+ using std::chrono::hours;
+ using detail::round_i;
+ typename std::basic_istream<CharT, Traits>::sentry ok{is, true};
+ if (ok)
+ {
+ date::detail::save_istream<CharT, Traits> ss(is);
+ is.fill(' ');
+ is.flags(std::ios::skipws | std::ios::dec);
+ is.width(0);
+#if !ONLY_C_LOCALE
+ auto& f = std::use_facet<std::time_get<CharT>>(is.getloc());
+ std::tm tm{};
+#endif
+ const CharT* command = nullptr;
+ auto modified = CharT{};
+ auto width = -1;
+
+ CONSTDATA int not_a_year = numeric_limits<short>::min();
+ CONSTDATA int not_a_2digit_year = 100;
+ CONSTDATA int not_a_century = not_a_year / 100;
+ CONSTDATA int not_a_month = 0;
+ CONSTDATA int not_a_day = 0;
+ CONSTDATA int not_a_hour = numeric_limits<int>::min();
+ CONSTDATA int not_a_hour_12_value = 0;
+ CONSTDATA int not_a_minute = not_a_hour;
+ CONSTDATA Duration not_a_second = Duration::min();
+ CONSTDATA int not_a_doy = -1;
+ CONSTDATA int not_a_weekday = 8;
+ CONSTDATA int not_a_week_num = 100;
+ CONSTDATA int not_a_ampm = -1;
+ CONSTDATA minutes not_a_offset = minutes::min();
+
+ int Y = not_a_year; // c, F, Y *
+ int y = not_a_2digit_year; // D, x, y *
+ int g = not_a_2digit_year; // g *
+ int G = not_a_year; // G *
+ int C = not_a_century; // C *
+ int m = not_a_month; // b, B, h, m, c, D, F, x *
+ int d = not_a_day; // c, d, D, e, F, x *
+ int j = not_a_doy; // j *
+ int wd = not_a_weekday; // a, A, u, w *
+ int H = not_a_hour; // c, H, R, T, X *
+ int I = not_a_hour_12_value; // I, r *
+ int p = not_a_ampm; // p, r *
+ int M = not_a_minute; // c, M, r, R, T, X *
+ Duration s = not_a_second; // c, r, S, T, X *
+ int U = not_a_week_num; // U *
+ int V = not_a_week_num; // V *
+ int W = not_a_week_num; // W *
+ std::basic_string<CharT, Traits, Alloc> temp_abbrev; // Z *
+ minutes temp_offset = not_a_offset; // z *
+
+ using detail::read;
+ using detail::rs;
+ using detail::ru;
+ using detail::rld;
+ using detail::checked_set;
+ for (; *fmt != CharT{} && !is.fail(); ++fmt)
+ {
+ switch (*fmt)
+ {
+ case 'a':
+ case 'A':
+ case 'u':
+ case 'w': // wd: a, A, u, w
+ if (command)
+ {
+ int trial_wd = not_a_weekday;
+ if (*fmt == 'a' || *fmt == 'A')
+ {
+ if (modified == CharT{})
+ {
+#if !ONLY_C_LOCALE
+ ios::iostate err = ios::goodbit;
+ f.get(is, nullptr, is, err, &tm, command, fmt+1);
+ is.setstate(err);
+ if (!is.fail())
+ trial_wd = tm.tm_wday;
+#else
+ auto nm = detail::weekday_names();
+ auto i = detail::scan_keyword(is, nm.first, nm.second) - nm.first;
+ if (!is.fail())
+ trial_wd = i % 7;
+#endif
+ }
+ else
+ read(is, CharT{'%'}, width, modified, *fmt);
+ }
+ else // *fmt == 'u' || *fmt == 'w'
+ {
+#if !ONLY_C_LOCALE
+ if (modified == CharT{})
+#else
+ if (modified != CharT{'E'})
+#endif
+ {
+ read(is, ru{trial_wd, 1, width == -1 ?
+ 1u : static_cast<unsigned>(width)});
+ if (!is.fail())
+ {
+ if (*fmt == 'u')
+ {
+ if (!(1 <= trial_wd && trial_wd <= 7))
+ {
+ trial_wd = not_a_weekday;
+ is.setstate(ios::failbit);
+ }
+ else if (trial_wd == 7)
+ trial_wd = 0;
+ }
+ else // *fmt == 'w'
+ {
+ if (!(0 <= trial_wd && trial_wd <= 6))
+ {
+ trial_wd = not_a_weekday;
+ is.setstate(ios::failbit);
+ }
+ }
+ }
+ }
+#if !ONLY_C_LOCALE
+ else if (modified == CharT{'O'})
+ {
+ ios::iostate err = ios::goodbit;
+ f.get(is, nullptr, is, err, &tm, command, fmt+1);
+ is.setstate(err);
+ if (!is.fail())
+ trial_wd = tm.tm_wday;
+ }
+#endif
+ else
+ read(is, CharT{'%'}, width, modified, *fmt);
+ }
+ if (trial_wd != not_a_weekday)
+ checked_set(wd, trial_wd, not_a_weekday, is);
+ }
+ else // !command
+ read(is, *fmt);
+ command = nullptr;
+ width = -1;
+ modified = CharT{};
+ break;
+ case 'b':
+ case 'B':
+ case 'h':
+ if (command)
+ {
+ if (modified == CharT{})
+ {
+ int ttm = not_a_month;
+#if !ONLY_C_LOCALE
+ ios::iostate err = ios::goodbit;
+ f.get(is, nullptr, is, err, &tm, command, fmt+1);
+ if ((err & ios::failbit) == 0)
+ ttm = tm.tm_mon + 1;
+ is.setstate(err);
+#else
+ auto nm = detail::month_names();
+ auto i = detail::scan_keyword(is, nm.first, nm.second) - nm.first;
+ if (!is.fail())
+ ttm = i % 12 + 1;
+#endif
+ checked_set(m, ttm, not_a_month, is);
+ }
+ else
+ read(is, CharT{'%'}, width, modified, *fmt);
+ command = nullptr;
+ width = -1;
+ modified = CharT{};
+ }
+ else
+ read(is, *fmt);
+ break;
+ case 'c':
+ if (command)
+ {
+ if (modified != CharT{'O'})
+ {
+#if !ONLY_C_LOCALE
+ ios::iostate err = ios::goodbit;
+ f.get(is, nullptr, is, err, &tm, command, fmt+1);
+ if ((err & ios::failbit) == 0)
+ {
+ checked_set(Y, tm.tm_year + 1900, not_a_year, is);
+ checked_set(m, tm.tm_mon + 1, not_a_month, is);
+ checked_set(d, tm.tm_mday, not_a_day, is);
+ checked_set(H, tm.tm_hour, not_a_hour, is);
+ checked_set(M, tm.tm_min, not_a_minute, is);
+ checked_set(s, duration_cast<Duration>(seconds{tm.tm_sec}),
+ not_a_second, is);
+ }
+ is.setstate(err);
+#else
+ // "%a %b %e %T %Y"
+ auto nm = detail::weekday_names();
+ auto i = detail::scan_keyword(is, nm.first, nm.second) - nm.first;
+ checked_set(wd, static_cast<int>(i % 7), not_a_weekday, is);
+ ws(is);
+ nm = detail::month_names();
+ i = detail::scan_keyword(is, nm.first, nm.second) - nm.first;
+ checked_set(m, static_cast<int>(i % 12 + 1), not_a_month, is);
+ ws(is);
+ int td = not_a_day;
+ read(is, rs{td, 1, 2});
+ checked_set(d, td, not_a_day, is);
+ ws(is);
+ using dfs = detail::decimal_format_seconds<Duration>;
+ CONSTDATA auto w = Duration::period::den == 1 ? 2 : 3 + dfs::width;
+ int tH;
+ int tM;
+ long double S;
+ read(is, ru{tH, 1, 2}, CharT{':'}, ru{tM, 1, 2},
+ CharT{':'}, rld{S, 1, w});
+ checked_set(H, tH, not_a_hour, is);
+ checked_set(M, tM, not_a_minute, is);
+ checked_set(s, round_i<Duration>(duration<long double>{S}),
+ not_a_second, is);
+ ws(is);
+ int tY = not_a_year;
+ read(is, rs{tY, 1, 4u});
+ checked_set(Y, tY, not_a_year, is);
+#endif
+ }
+ else
+ read(is, CharT{'%'}, width, modified, *fmt);
+ command = nullptr;
+ width = -1;
+ modified = CharT{};
+ }
+ else
+ read(is, *fmt);
+ break;
+ case 'x':
+ if (command)
+ {
+ if (modified != CharT{'O'})
+ {
+#if !ONLY_C_LOCALE
+ ios::iostate err = ios::goodbit;
+ f.get(is, nullptr, is, err, &tm, command, fmt+1);
+ if ((err & ios::failbit) == 0)
+ {
+ checked_set(Y, tm.tm_year + 1900, not_a_year, is);
+ checked_set(m, tm.tm_mon + 1, not_a_month, is);
+ checked_set(d, tm.tm_mday, not_a_day, is);
+ }
+ is.setstate(err);
+#else
+ // "%m/%d/%y"
+ int ty = not_a_2digit_year;
+ int tm = not_a_month;
+ int td = not_a_day;
+ read(is, ru{tm, 1, 2}, CharT{'/'}, ru{td, 1, 2}, CharT{'/'},
+ rs{ty, 1, 2});
+ checked_set(y, ty, not_a_2digit_year, is);
+ checked_set(m, tm, not_a_month, is);
+ checked_set(d, td, not_a_day, is);
+#endif
+ }
+ else
+ read(is, CharT{'%'}, width, modified, *fmt);
+ command = nullptr;
+ width = -1;
+ modified = CharT{};
+ }
+ else
+ read(is, *fmt);
+ break;
+ case 'X':
+ if (command)
+ {
+ if (modified != CharT{'O'})
+ {
+#if !ONLY_C_LOCALE
+ ios::iostate err = ios::goodbit;
+ f.get(is, nullptr, is, err, &tm, command, fmt+1);
+ if ((err & ios::failbit) == 0)
+ {
+ checked_set(H, tm.tm_hour, not_a_hour, is);
+ checked_set(M, tm.tm_min, not_a_minute, is);
+ checked_set(s, duration_cast<Duration>(seconds{tm.tm_sec}),
+ not_a_second, is);
+ }
+ is.setstate(err);
+#else
+ // "%T"
+ using dfs = detail::decimal_format_seconds<Duration>;
+ CONSTDATA auto w = Duration::period::den == 1 ? 2 : 3 + dfs::width;
+ int tH = not_a_hour;
+ int tM = not_a_minute;
+ long double S;
+ read(is, ru{tH, 1, 2}, CharT{':'}, ru{tM, 1, 2},
+ CharT{':'}, rld{S, 1, w});
+ checked_set(H, tH, not_a_hour, is);
+ checked_set(M, tM, not_a_minute, is);
+ checked_set(s, round_i<Duration>(duration<long double>{S}),
+ not_a_second, is);
+#endif
+ }
+ else
+ read(is, CharT{'%'}, width, modified, *fmt);
+ command = nullptr;
+ width = -1;
+ modified = CharT{};
+ }
+ else
+ read(is, *fmt);
+ break;
+ case 'C':
+ if (command)
+ {
+ int tC = not_a_century;
+#if !ONLY_C_LOCALE
+ if (modified == CharT{})
+ {
+#endif
+ read(is, rs{tC, 1, width == -1 ? 2u : static_cast<unsigned>(width)});
+#if !ONLY_C_LOCALE
+ }
+ else
+ {
+ ios::iostate err = ios::goodbit;
+ f.get(is, nullptr, is, err, &tm, command, fmt+1);
+ if ((err & ios::failbit) == 0)
+ {
+ auto tY = tm.tm_year + 1900;
+ tC = (tY >= 0 ? tY : tY-99) / 100;
+ }
+ is.setstate(err);
+ }
+#endif
+ checked_set(C, tC, not_a_century, is);
+ command = nullptr;
+ width = -1;
+ modified = CharT{};
+ }
+ else
+ read(is, *fmt);
+ break;
+ case 'D':
+ if (command)
+ {
+ if (modified == CharT{})
+ {
+ int tn = not_a_month;
+ int td = not_a_day;
+ int ty = not_a_2digit_year;
+ read(is, ru{tn, 1, 2}, CharT{'\0'}, CharT{'/'}, CharT{'\0'},
+ ru{td, 1, 2}, CharT{'\0'}, CharT{'/'}, CharT{'\0'},
+ rs{ty, 1, 2});
+ checked_set(y, ty, not_a_2digit_year, is);
+ checked_set(m, tn, not_a_month, is);
+ checked_set(d, td, not_a_day, is);
+ }
+ else
+ read(is, CharT{'%'}, width, modified, *fmt);
+ command = nullptr;
+ width = -1;
+ modified = CharT{};
+ }
+ else
+ read(is, *fmt);
+ break;
+ case 'F':
+ if (command)
+ {
+ if (modified == CharT{})
+ {
+ int tY = not_a_year;
+ int tn = not_a_month;
+ int td = not_a_day;
+ read(is, rs{tY, 1, width == -1 ? 4u : static_cast<unsigned>(width)},
+ CharT{'-'}, ru{tn, 1, 2}, CharT{'-'}, ru{td, 1, 2});
+ checked_set(Y, tY, not_a_year, is);
+ checked_set(m, tn, not_a_month, is);
+ checked_set(d, td, not_a_day, is);
+ }
+ else
+ read(is, CharT{'%'}, width, modified, *fmt);
+ command = nullptr;
+ width = -1;
+ modified = CharT{};
+ }
+ else
+ read(is, *fmt);
+ break;
+ case 'd':
+ case 'e':
+ if (command)
+ {
+#if !ONLY_C_LOCALE
+ if (modified == CharT{})
+#else
+ if (modified != CharT{'E'})
+#endif
+ {
+ int td = not_a_day;
+ read(is, rs{td, 1, width == -1 ? 2u : static_cast<unsigned>(width)});
+ checked_set(d, td, not_a_day, is);
+ }
+#if !ONLY_C_LOCALE
+ else if (modified == CharT{'O'})
+ {
+ ios::iostate err = ios::goodbit;
+ f.get(is, nullptr, is, err, &tm, command, fmt+1);
+ command = nullptr;
+ width = -1;
+ modified = CharT{};
+ if ((err & ios::failbit) == 0)
+ checked_set(d, tm.tm_mday, not_a_day, is);
+ is.setstate(err);
+ }
+#endif
+ else
+ read(is, CharT{'%'}, width, modified, *fmt);
+ command = nullptr;
+ width = -1;
+ modified = CharT{};
+ }
+ else
+ read(is, *fmt);
+ break;
+ case 'H':
+ if (command)
+ {
+#if !ONLY_C_LOCALE
+ if (modified == CharT{})
+#else
+ if (modified != CharT{'E'})
+#endif
+ {
+ int tH = not_a_hour;
+ read(is, ru{tH, 1, width == -1 ? 2u : static_cast<unsigned>(width)});
+ checked_set(H, tH, not_a_hour, is);
+ }
+#if !ONLY_C_LOCALE
+ else if (modified == CharT{'O'})
+ {
+ ios::iostate err = ios::goodbit;
+ f.get(is, nullptr, is, err, &tm, command, fmt+1);
+ if ((err & ios::failbit) == 0)
+ checked_set(H, tm.tm_hour, not_a_hour, is);
+ is.setstate(err);
+ }
+#endif
+ else
+ read(is, CharT{'%'}, width, modified, *fmt);
+ command = nullptr;
+ width = -1;
+ modified = CharT{};
+ }
+ else
+ read(is, *fmt);
+ break;
+ case 'I':
+ if (command)
+ {
+ if (modified == CharT{})
+ {
+ int tI = not_a_hour_12_value;
+ // reads in an hour into I, but most be in [1, 12]
+ read(is, rs{tI, 1, width == -1 ? 2u : static_cast<unsigned>(width)});
+ if (!(1 <= tI && tI <= 12))
+ is.setstate(ios::failbit);
+ checked_set(I, tI, not_a_hour_12_value, is);
+ }
+ else
+ read(is, CharT{'%'}, width, modified, *fmt);
+ command = nullptr;
+ width = -1;
+ modified = CharT{};
+ }
+ else
+ read(is, *fmt);
+ break;
+ case 'j':
+ if (command)
+ {
+ if (modified == CharT{})
+ {
+ int tj = not_a_doy;
+ read(is, ru{tj, 1, width == -1 ? 3u : static_cast<unsigned>(width)});
+ checked_set(j, tj, not_a_doy, is);
+ }
+ else
+ read(is, CharT{'%'}, width, modified, *fmt);
+ command = nullptr;
+ width = -1;
+ modified = CharT{};
+ }
+ else
+ read(is, *fmt);
+ break;
+ case 'M':
+ if (command)
+ {
+#if !ONLY_C_LOCALE
+ if (modified == CharT{})
+#else
+ if (modified != CharT{'E'})
+#endif
+ {
+ int tM = not_a_minute;
+ read(is, ru{tM, 1, width == -1 ? 2u : static_cast<unsigned>(width)});
+ checked_set(M, tM, not_a_minute, is);
+ }
+#if !ONLY_C_LOCALE
+ else if (modified == CharT{'O'})
+ {
+ ios::iostate err = ios::goodbit;
+ f.get(is, nullptr, is, err, &tm, command, fmt+1);
+ if ((err & ios::failbit) == 0)
+ checked_set(M, tm.tm_min, not_a_minute, is);
+ is.setstate(err);
+ }
+#endif
+ else
+ read(is, CharT{'%'}, width, modified, *fmt);
+ command = nullptr;
+ width = -1;
+ modified = CharT{};
+ }
+ else
+ read(is, *fmt);
+ break;
+ case 'm':
+ if (command)
+ {
+#if !ONLY_C_LOCALE
+ if (modified == CharT{})
+#else
+ if (modified != CharT{'E'})
+#endif
+ {
+ int tn = not_a_month;
+ read(is, rs{tn, 1, width == -1 ? 2u : static_cast<unsigned>(width)});
+ checked_set(m, tn, not_a_month, is);
+ }
+#if !ONLY_C_LOCALE
+ else if (modified == CharT{'O'})
+ {
+ ios::iostate err = ios::goodbit;
+ f.get(is, nullptr, is, err, &tm, command, fmt+1);
+ if ((err & ios::failbit) == 0)
+ checked_set(m, tm.tm_mon + 1, not_a_month, is);
+ is.setstate(err);
+ }
+#endif
+ else
+ read(is, CharT{'%'}, width, modified, *fmt);
+ command = nullptr;
+ width = -1;
+ modified = CharT{};
+ }
+ else
+ read(is, *fmt);
+ break;
+ case 'n':
+ case 't':
+ if (command)
+ {
+ if (modified == CharT{})
+ {
+ // %n matches a single white space character
+ // %t matches 0 or 1 white space characters
+ auto ic = is.peek();
+ if (Traits::eq_int_type(ic, Traits::eof()))
+ {
+ ios::iostate err = ios::eofbit;
+ if (*fmt == 'n')
+ err |= ios::failbit;
+ is.setstate(err);
+ break;
+ }
+ if (isspace(ic))
+ {
+ (void)is.get();
+ }
+ else if (*fmt == 'n')
+ is.setstate(ios::failbit);
+ }
+ else
+ read(is, CharT{'%'}, width, modified, *fmt);
+ command = nullptr;
+ width = -1;
+ modified = CharT{};
+ }
+ else
+ read(is, *fmt);
+ break;
+ case 'p':
+ if (command)
+ {
+ if (modified == CharT{})
+ {
+ int tp = not_a_ampm;
+#if !ONLY_C_LOCALE
+ tm = std::tm{};
+ tm.tm_hour = 1;
+ ios::iostate err = ios::goodbit;
+ f.get(is, nullptr, is, err, &tm, command, fmt+1);
+ is.setstate(err);
+ if (tm.tm_hour == 1)
+ tp = 0;
+ else if (tm.tm_hour == 13)
+ tp = 1;
+ else
+ is.setstate(err);
+#else
+ auto nm = detail::ampm_names();
+ auto i = detail::scan_keyword(is, nm.first, nm.second) - nm.first;
+ tp = static_cast<decltype(tp)>(i);
+#endif
+ checked_set(p, tp, not_a_ampm, is);
+ }
+ else
+ read(is, CharT{'%'}, width, modified, *fmt);
+ command = nullptr;
+ width = -1;
+ modified = CharT{};
+ }
+ else
+ read(is, *fmt);
+
+ break;
+ case 'r':
+ if (command)
+ {
+ if (modified == CharT{})
+ {
+#if !ONLY_C_LOCALE
+ ios::iostate err = ios::goodbit;
+ f.get(is, nullptr, is, err, &tm, command, fmt+1);
+ if ((err & ios::failbit) == 0)
+ {
+ checked_set(H, tm.tm_hour, not_a_hour, is);
+ checked_set(M, tm.tm_min, not_a_hour, is);
+ checked_set(s, duration_cast<Duration>(seconds{tm.tm_sec}),
+ not_a_second, is);
+ }
+ is.setstate(err);
+#else
+ // "%I:%M:%S %p"
+ using dfs = detail::decimal_format_seconds<Duration>;
+ CONSTDATA auto w = Duration::period::den == 1 ? 2 : 3 + dfs::width;
+ long double S;
+ int tI = not_a_hour_12_value;
+ int tM = not_a_minute;
+ read(is, ru{tI, 1, 2}, CharT{':'}, ru{tM, 1, 2},
+ CharT{':'}, rld{S, 1, w});
+ checked_set(I, tI, not_a_hour_12_value, is);
+ checked_set(M, tM, not_a_minute, is);
+ checked_set(s, round_i<Duration>(duration<long double>{S}),
+ not_a_second, is);
+ ws(is);
+ auto nm = detail::ampm_names();
+ auto i = detail::scan_keyword(is, nm.first, nm.second) - nm.first;
+ checked_set(p, static_cast<int>(i), not_a_ampm, is);
+#endif
+ }
+ else
+ read(is, CharT{'%'}, width, modified, *fmt);
+ command = nullptr;
+ width = -1;
+ modified = CharT{};
+ }
+ else
+ read(is, *fmt);
+ break;
+ case 'R':
+ if (command)
+ {
+ if (modified == CharT{})
+ {
+ int tH = not_a_hour;
+ int tM = not_a_minute;
+ read(is, ru{tH, 1, 2}, CharT{'\0'}, CharT{':'}, CharT{'\0'},
+ ru{tM, 1, 2}, CharT{'\0'});
+ checked_set(H, tH, not_a_hour, is);
+ checked_set(M, tM, not_a_minute, is);
+ }
+ else
+ read(is, CharT{'%'}, width, modified, *fmt);
+ command = nullptr;
+ width = -1;
+ modified = CharT{};
+ }
+ else
+ read(is, *fmt);
+ break;
+ case 'S':
+ if (command)
+ {
+ #if !ONLY_C_LOCALE
+ if (modified == CharT{})
+#else
+ if (modified != CharT{'E'})
+#endif
+ {
+ using dfs = detail::decimal_format_seconds<Duration>;
+ CONSTDATA auto w = Duration::period::den == 1 ? 2 : 3 + dfs::width;
+ long double S;
+ read(is, rld{S, 1, width == -1 ? w : static_cast<unsigned>(width)});
+ checked_set(s, round_i<Duration>(duration<long double>{S}),
+ not_a_second, is);
+ }
+#if !ONLY_C_LOCALE
+ else if (modified == CharT{'O'})
+ {
+ ios::iostate err = ios::goodbit;
+ f.get(is, nullptr, is, err, &tm, command, fmt+1);
+ if ((err & ios::failbit) == 0)
+ checked_set(s, duration_cast<Duration>(seconds{tm.tm_sec}),
+ not_a_second, is);
+ is.setstate(err);
+ }
+#endif
+ else
+ read(is, CharT{'%'}, width, modified, *fmt);
+ command = nullptr;
+ width = -1;
+ modified = CharT{};
+ }
+ else
+ read(is, *fmt);
+ break;
+ case 'T':
+ if (command)
+ {
+ if (modified == CharT{})
+ {
+ using dfs = detail::decimal_format_seconds<Duration>;
+ CONSTDATA auto w = Duration::period::den == 1 ? 2 : 3 + dfs::width;
+ int tH = not_a_hour;
+ int tM = not_a_minute;
+ long double S;
+ read(is, ru{tH, 1, 2}, CharT{':'}, ru{tM, 1, 2},
+ CharT{':'}, rld{S, 1, w});
+ checked_set(H, tH, not_a_hour, is);
+ checked_set(M, tM, not_a_minute, is);
+ checked_set(s, round_i<Duration>(duration<long double>{S}),
+ not_a_second, is);
+ }
+ else
+ read(is, CharT{'%'}, width, modified, *fmt);
+ command = nullptr;
+ width = -1;
+ modified = CharT{};
+ }
+ else
+ read(is, *fmt);
+ break;
+ case 'Y':
+ if (command)
+ {
+#if !ONLY_C_LOCALE
+ if (modified == CharT{})
+#else
+ if (modified != CharT{'O'})
+#endif
+ {
+ int tY = not_a_year;
+ read(is, rs{tY, 1, width == -1 ? 4u : static_cast<unsigned>(width)});
+ checked_set(Y, tY, not_a_year, is);
+ }
+#if !ONLY_C_LOCALE
+ else if (modified == CharT{'E'})
+ {
+ ios::iostate err = ios::goodbit;
+ f.get(is, nullptr, is, err, &tm, command, fmt+1);
+ if ((err & ios::failbit) == 0)
+ checked_set(Y, tm.tm_year + 1900, not_a_year, is);
+ is.setstate(err);
+ }
+#endif
+ else
+ read(is, CharT{'%'}, width, modified, *fmt);
+ command = nullptr;
+ width = -1;
+ modified = CharT{};
+ }
+ else
+ read(is, *fmt);
+ break;
+ case 'y':
+ if (command)
+ {
+#if !ONLY_C_LOCALE
+ if (modified == CharT{})
+#endif
+ {
+ int ty = not_a_2digit_year;
+ read(is, ru{ty, 1, width == -1 ? 2u : static_cast<unsigned>(width)});
+ checked_set(y, ty, not_a_2digit_year, is);
+ }
+#if !ONLY_C_LOCALE
+ else
+ {
+ ios::iostate err = ios::goodbit;
+ f.get(is, nullptr, is, err, &tm, command, fmt+1);
+ if ((err & ios::failbit) == 0)
+ checked_set(Y, tm.tm_year + 1900, not_a_year, is);
+ is.setstate(err);
+ }
+#endif
+ command = nullptr;
+ width = -1;
+ modified = CharT{};
+ }
+ else
+ read(is, *fmt);
+ break;
+ case 'g':
+ if (command)
+ {
+ if (modified == CharT{})
+ {
+ int tg = not_a_2digit_year;
+ read(is, ru{tg, 1, width == -1 ? 2u : static_cast<unsigned>(width)});
+ checked_set(g, tg, not_a_2digit_year, is);
+ }
+ else
+ read(is, CharT{'%'}, width, modified, *fmt);
+ command = nullptr;
+ width = -1;
+ modified = CharT{};
+ }
+ else
+ read(is, *fmt);
+ break;
+ case 'G':
+ if (command)
+ {
+ if (modified == CharT{})
+ {
+ int tG = not_a_year;
+ read(is, rs{tG, 1, width == -1 ? 4u : static_cast<unsigned>(width)});
+ checked_set(G, tG, not_a_year, is);
+ }
+ else
+ read(is, CharT{'%'}, width, modified, *fmt);
+ command = nullptr;
+ width = -1;
+ modified = CharT{};
+ }
+ else
+ read(is, *fmt);
+ break;
+ case 'U':
+ if (command)
+ {
+ if (modified == CharT{})
+ {
+ int tU = not_a_week_num;
+ read(is, ru{tU, 1, width == -1 ? 2u : static_cast<unsigned>(width)});
+ checked_set(U, tU, not_a_week_num, is);
+ }
+ else
+ read(is, CharT{'%'}, width, modified, *fmt);
+ command = nullptr;
+ width = -1;
+ modified = CharT{};
+ }
+ else
+ read(is, *fmt);
+ break;
+ case 'V':
+ if (command)
+ {
+ if (modified == CharT{})
+ {
+ int tV = not_a_week_num;
+ read(is, ru{tV, 1, width == -1 ? 2u : static_cast<unsigned>(width)});
+ checked_set(V, tV, not_a_week_num, is);
+ }
+ else
+ read(is, CharT{'%'}, width, modified, *fmt);
+ command = nullptr;
+ width = -1;
+ modified = CharT{};
+ }
+ else
+ read(is, *fmt);
+ break;
+ case 'W':
+ if (command)
+ {
+ if (modified == CharT{})
+ {
+ int tW = not_a_week_num;
+ read(is, ru{tW, 1, width == -1 ? 2u : static_cast<unsigned>(width)});
+ checked_set(W, tW, not_a_week_num, is);
+ }
+ else
+ read(is, CharT{'%'}, width, modified, *fmt);
+ command = nullptr;
+ width = -1;
+ modified = CharT{};
+ }
+ else
+ read(is, *fmt);
+ break;
+ case 'E':
+ case 'O':
+ if (command)
+ {
+ if (modified == CharT{})
+ {
+ modified = *fmt;
+ }
+ else
+ {
+ read(is, CharT{'%'}, width, modified, *fmt);
+ command = nullptr;
+ width = -1;
+ modified = CharT{};
+ }
+ }
+ else
+ read(is, *fmt);
+ break;
+ case '%':
+ if (command)
+ {
+ if (modified == CharT{})
+ read(is, *fmt);
+ else
+ read(is, CharT{'%'}, width, modified, *fmt);
+ command = nullptr;
+ width = -1;
+ modified = CharT{};
+ }
+ else
+ command = fmt;
+ break;
+ case 'z':
+ if (command)
+ {
+ int tH, tM;
+ minutes toff = not_a_offset;
+ bool neg = false;
+ auto ic = is.peek();
+ if (!Traits::eq_int_type(ic, Traits::eof()))
+ {
+ auto c = static_cast<char>(Traits::to_char_type(ic));
+ if (c == '-')
+ neg = true;
+ }
+ if (modified == CharT{})
+ {
+ read(is, rs{tH, 2, 2});
+ if (!is.fail())
+ toff = hours{std::abs(tH)};
+ if (is.good())
+ {
+ ic = is.peek();
+ if (!Traits::eq_int_type(ic, Traits::eof()))
+ {
+ auto c = static_cast<char>(Traits::to_char_type(ic));
+ if ('0' <= c && c <= '9')
+ {
+ read(is, ru{tM, 2, 2});
+ if (!is.fail())
+ toff += minutes{tM};
+ }
+ }
+ }
+ }
+ else
+ {
+ read(is, rs{tH, 1, 2});
+ if (!is.fail())
+ toff = hours{std::abs(tH)};
+ if (is.good())
+ {
+ ic = is.peek();
+ if (!Traits::eq_int_type(ic, Traits::eof()))
+ {
+ auto c = static_cast<char>(Traits::to_char_type(ic));
+ if (c == ':')
+ {
+ (void)is.get();
+ read(is, ru{tM, 2, 2});
+ if (!is.fail())
+ toff += minutes{tM};
+ }
+ }
+ }
+ }
+ if (neg)
+ toff = -toff;
+ checked_set(temp_offset, toff, not_a_offset, is);
+ command = nullptr;
+ width = -1;
+ modified = CharT{};
+ }
+ else
+ read(is, *fmt);
+ break;
+ case 'Z':
+ if (command)
+ {
+ if (modified == CharT{})
+ {
+ std::basic_string<CharT, Traits, Alloc> buf;
+ while (is.rdstate() == std::ios::goodbit)
+ {
+ auto i = is.rdbuf()->sgetc();
+ if (Traits::eq_int_type(i, Traits::eof()))
+ {
+ is.setstate(ios::eofbit);
+ break;
+ }
+ auto wc = Traits::to_char_type(i);
+ auto c = static_cast<char>(wc);
+ // is c a valid time zone name or abbreviation character?
+ if (!(CharT{1} < wc && wc < CharT{127}) || !(isalnum(c) ||
+ c == '_' || c == '/' || c == '-' || c == '+'))
+ break;
+ buf.push_back(c);
+ is.rdbuf()->sbumpc();
+ }
+ if (buf.empty())
+ is.setstate(ios::failbit);
+ checked_set(temp_abbrev, buf, {}, is);
+ }
+ else
+ read(is, CharT{'%'}, width, modified, *fmt);
+ command = nullptr;
+ width = -1;
+ modified = CharT{};
+ }
+ else
+ read(is, *fmt);
+ break;
+ default:
+ if (command)
+ {
+ if (width == -1 && modified == CharT{} && '0' <= *fmt && *fmt <= '9')
+ {
+ width = static_cast<char>(*fmt) - '0';
+ while ('0' <= fmt[1] && fmt[1] <= '9')
+ width = 10*width + static_cast<char>(*++fmt) - '0';
+ }
+ else
+ {
+ if (modified == CharT{})
+ read(is, CharT{'%'}, width, *fmt);
+ else
+ read(is, CharT{'%'}, width, modified, *fmt);
+ command = nullptr;
+ width = -1;
+ modified = CharT{};
+ }
+ }
+ else // !command
+ {
+ if (isspace(static_cast<unsigned char>(*fmt)))
+ {
+ // space matches 0 or more white space characters
+ if (is.good())
+ ws(is);
+ }
+ else
+ read(is, *fmt);
+ }
+ break;
+ }
+ }
+ // is.fail() || *fmt == CharT{}
+ if (is.rdstate() == ios::goodbit && command)
+ {
+ if (modified == CharT{})
+ read(is, CharT{'%'}, width);
+ else
+ read(is, CharT{'%'}, width, modified);
+ }
+ if (!is.fail())
+ {
+ if (y != not_a_2digit_year)
+ {
+ // Convert y and an optional C to Y
+ if (!(0 <= y && y <= 99))
+ goto broken;
+ if (C == not_a_century)
+ {
+ if (Y == not_a_year)
+ {
+ if (y >= 69)
+ C = 19;
+ else
+ C = 20;
+ }
+ else
+ {
+ C = (Y >= 0 ? Y : Y-100) / 100;
+ }
+ }
+ int tY;
+ if (C >= 0)
+ tY = 100*C + y;
+ else
+ tY = 100*(C+1) - (y == 0 ? 100 : y);
+ if (Y != not_a_year && Y != tY)
+ goto broken;
+ Y = tY;
+ }
+ if (g != not_a_2digit_year)
+ {
+ // Convert g and an optional C to G
+ if (!(0 <= g && g <= 99))
+ goto broken;
+ if (C == not_a_century)
+ {
+ if (G == not_a_year)
+ {
+ if (g >= 69)
+ C = 19;
+ else
+ C = 20;
+ }
+ else
+ {
+ C = (G >= 0 ? G : G-100) / 100;
+ }
+ }
+ int tG;
+ if (C >= 0)
+ tG = 100*C + g;
+ else
+ tG = 100*(C+1) - (g == 0 ? 100 : g);
+ if (G != not_a_year && G != tG)
+ goto broken;
+ G = tG;
+ }
+ if (Y < static_cast<int>(year::min()) || Y > static_cast<int>(year::max()))
+ Y = not_a_year;
+ bool computed = false;
+ if (G != not_a_year && V != not_a_week_num && wd != not_a_weekday)
+ {
+ year_month_day ymd_trial = sys_days(year{G-1}/December/Thursday[last]) +
+ (Monday-Thursday) + weeks{V-1} +
+ (weekday{static_cast<unsigned>(wd)}-Monday);
+ if (Y == not_a_year)
+ Y = static_cast<int>(ymd_trial.year());
+ else if (year{Y} != ymd_trial.year())
+ goto broken;
+ if (m == not_a_month)
+ m = static_cast<int>(static_cast<unsigned>(ymd_trial.month()));
+ else if (month(static_cast<unsigned>(m)) != ymd_trial.month())
+ goto broken;
+ if (d == not_a_day)
+ d = static_cast<int>(static_cast<unsigned>(ymd_trial.day()));
+ else if (day(static_cast<unsigned>(d)) != ymd_trial.day())
+ goto broken;
+ computed = true;
+ }
+ if (Y != not_a_year && U != not_a_week_num && wd != not_a_weekday)
+ {
+ year_month_day ymd_trial = sys_days(year{Y}/January/Sunday[1]) +
+ weeks{U-1} +
+ (weekday{static_cast<unsigned>(wd)} - Sunday);
+ if (Y == not_a_year)
+ Y = static_cast<int>(ymd_trial.year());
+ else if (year{Y} != ymd_trial.year())
+ goto broken;
+ if (m == not_a_month)
+ m = static_cast<int>(static_cast<unsigned>(ymd_trial.month()));
+ else if (month(static_cast<unsigned>(m)) != ymd_trial.month())
+ goto broken;
+ if (d == not_a_day)
+ d = static_cast<int>(static_cast<unsigned>(ymd_trial.day()));
+ else if (day(static_cast<unsigned>(d)) != ymd_trial.day())
+ goto broken;
+ computed = true;
+ }
+ if (Y != not_a_year && W != not_a_week_num && wd != not_a_weekday)
+ {
+ year_month_day ymd_trial = sys_days(year{Y}/January/Monday[1]) +
+ weeks{W-1} +
+ (weekday{static_cast<unsigned>(wd)} - Monday);
+ if (Y == not_a_year)
+ Y = static_cast<int>(ymd_trial.year());
+ else if (year{Y} != ymd_trial.year())
+ goto broken;
+ if (m == not_a_month)
+ m = static_cast<int>(static_cast<unsigned>(ymd_trial.month()));
+ else if (month(static_cast<unsigned>(m)) != ymd_trial.month())
+ goto broken;
+ if (d == not_a_day)
+ d = static_cast<int>(static_cast<unsigned>(ymd_trial.day()));
+ else if (day(static_cast<unsigned>(d)) != ymd_trial.day())
+ goto broken;
+ computed = true;
+ }
+ if (j != not_a_doy && Y != not_a_year)
+ {
+ auto ymd_trial = year_month_day{local_days(year{Y}/1/1) + days{j-1}};
+ if (m == 0)
+ m = static_cast<int>(static_cast<unsigned>(ymd_trial.month()));
+ else if (month(static_cast<unsigned>(m)) != ymd_trial.month())
+ goto broken;
+ if (d == 0)
+ d = static_cast<int>(static_cast<unsigned>(ymd_trial.day()));
+ else if (day(static_cast<unsigned>(d)) != ymd_trial.day())
+ goto broken;
+ j = not_a_doy;
+ }
+ auto ymd = year{Y}/m/d;
+ if (ymd.ok())
+ {
+ if (wd == not_a_weekday)
+ wd = static_cast<int>((weekday(sys_days(ymd)) - Sunday).count());
+ else if (wd != static_cast<int>((weekday(sys_days(ymd)) - Sunday).count()))
+ goto broken;
+ if (!computed)
+ {
+ if (G != not_a_year || V != not_a_week_num)
+ {
+ sys_days sd = ymd;
+ auto G_trial = year_month_day{sd + days{3}}.year();
+ auto start = sys_days((G_trial - years{1})/December/Thursday[last]) +
+ (Monday - Thursday);
+ if (sd < start)
+ {
+ --G_trial;
+ if (V != not_a_week_num)
+ start = sys_days((G_trial - years{1})/December/Thursday[last])
+ + (Monday - Thursday);
+ }
+ if (G != not_a_year && G != static_cast<int>(G_trial))
+ goto broken;
+ if (V != not_a_week_num)
+ {
+ auto V_trial = duration_cast<weeks>(sd - start).count() + 1;
+ if (V != V_trial)
+ goto broken;
+ }
+ }
+ if (U != not_a_week_num)
+ {
+ auto start = sys_days(Sunday[1]/January/ymd.year());
+ auto U_trial = floor<weeks>(sys_days(ymd) - start).count() + 1;
+ if (U != U_trial)
+ goto broken;
+ }
+ if (W != not_a_week_num)
+ {
+ auto start = sys_days(Monday[1]/January/ymd.year());
+ auto W_trial = floor<weeks>(sys_days(ymd) - start).count() + 1;
+ if (W != W_trial)
+ goto broken;
+ }
+ }
+ }
+ fds.ymd = ymd;
+ if (I != not_a_hour_12_value)
+ {
+ if (!(1 <= I && I <= 12))
+ goto broken;
+ if (p != not_a_ampm)
+ {
+ // p is in [0, 1] == [AM, PM]
+ // Store trial H in I
+ if (I == 12)
+ --p;
+ I += p*12;
+ // Either set H from I or make sure H and I are consistent
+ if (H == not_a_hour)
+ H = I;
+ else if (I != H)
+ goto broken;
+ }
+ else // p == not_a_ampm
+ {
+ // if H, make sure H and I could be consistent
+ if (H != not_a_hour)
+ {
+ if (I == 12)
+ {
+ if (H != 0 && H != 12)
+ goto broken;
+ }
+ else if (!(I == H || I == H+12))
+ {
+ goto broken;
+ }
+ }
+ else // I is ambiguous, AM or PM?
+ goto broken;
+ }
+ }
+ if (H != not_a_hour)
+ {
+ fds.has_tod = true;
+ fds.tod = hh_mm_ss<Duration>{hours{H}};
+ }
+ if (M != not_a_minute)
+ {
+ fds.has_tod = true;
+ fds.tod.m_ = minutes{M};
+ }
+ if (s != not_a_second)
+ {
+ fds.has_tod = true;
+ fds.tod.s_ = detail::decimal_format_seconds<Duration>{s};
+ }
+ if (j != not_a_doy)
+ {
+ fds.has_tod = true;
+ fds.tod.h_ += hours{days{j}};
+ }
+ if (wd != not_a_weekday)
+ fds.wd = weekday{static_cast<unsigned>(wd)};
+ if (abbrev != nullptr)
+ *abbrev = std::move(temp_abbrev);
+ if (offset != nullptr && temp_offset != not_a_offset)
+ *offset = temp_offset;
+ }
+ return is;
+ }
+broken:
+ is.setstate(ios::failbit);
+ return is;
+}
+
+template <class CharT, class Traits, class Alloc = std::allocator<CharT>>
+std::basic_istream<CharT, Traits>&
+from_stream(std::basic_istream<CharT, Traits>& is, const CharT* fmt, year& y,
+ std::basic_string<CharT, Traits, Alloc>* abbrev = nullptr,
+ std::chrono::minutes* offset = nullptr)
+{
+ using CT = std::chrono::seconds;
+ fields<CT> fds{};
+ from_stream(is, fmt, fds, abbrev, offset);
+ if (!fds.ymd.year().ok())
+ is.setstate(std::ios::failbit);
+ if (!is.fail())
+ y = fds.ymd.year();
+ return is;
+}
+
+template <class CharT, class Traits, class Alloc = std::allocator<CharT>>
+std::basic_istream<CharT, Traits>&
+from_stream(std::basic_istream<CharT, Traits>& is, const CharT* fmt, month& m,
+ std::basic_string<CharT, Traits, Alloc>* abbrev = nullptr,
+ std::chrono::minutes* offset = nullptr)
+{
+ using CT = std::chrono::seconds;
+ fields<CT> fds{};
+ from_stream(is, fmt, fds, abbrev, offset);
+ if (!fds.ymd.month().ok())
+ is.setstate(std::ios::failbit);
+ if (!is.fail())
+ m = fds.ymd.month();
+ return is;
+}
+
+template <class CharT, class Traits, class Alloc = std::allocator<CharT>>
+std::basic_istream<CharT, Traits>&
+from_stream(std::basic_istream<CharT, Traits>& is, const CharT* fmt, day& d,
+ std::basic_string<CharT, Traits, Alloc>* abbrev = nullptr,
+ std::chrono::minutes* offset = nullptr)
+{
+ using CT = std::chrono::seconds;
+ fields<CT> fds{};
+ from_stream(is, fmt, fds, abbrev, offset);
+ if (!fds.ymd.day().ok())
+ is.setstate(std::ios::failbit);
+ if (!is.fail())
+ d = fds.ymd.day();
+ return is;
+}
+
+template <class CharT, class Traits, class Alloc = std::allocator<CharT>>
+std::basic_istream<CharT, Traits>&
+from_stream(std::basic_istream<CharT, Traits>& is, const CharT* fmt, weekday& wd,
+ std::basic_string<CharT, Traits, Alloc>* abbrev = nullptr,
+ std::chrono::minutes* offset = nullptr)
+{
+ using CT = std::chrono::seconds;
+ fields<CT> fds{};
+ from_stream(is, fmt, fds, abbrev, offset);
+ if (!fds.wd.ok())
+ is.setstate(std::ios::failbit);
+ if (!is.fail())
+ wd = fds.wd;
+ return is;
+}
+
+template <class CharT, class Traits, class Alloc = std::allocator<CharT>>
+std::basic_istream<CharT, Traits>&
+from_stream(std::basic_istream<CharT, Traits>& is, const CharT* fmt, year_month& ym,
+ std::basic_string<CharT, Traits, Alloc>* abbrev = nullptr,
+ std::chrono::minutes* offset = nullptr)
+{
+ using CT = std::chrono::seconds;
+ fields<CT> fds{};
+ from_stream(is, fmt, fds, abbrev, offset);
+ if (!fds.ymd.month().ok())
+ is.setstate(std::ios::failbit);
+ if (!is.fail())
+ ym = fds.ymd.year()/fds.ymd.month();
+ return is;
+}
+
+template <class CharT, class Traits, class Alloc = std::allocator<CharT>>
+std::basic_istream<CharT, Traits>&
+from_stream(std::basic_istream<CharT, Traits>& is, const CharT* fmt, month_day& md,
+ std::basic_string<CharT, Traits, Alloc>* abbrev = nullptr,
+ std::chrono::minutes* offset = nullptr)
+{
+ using CT = std::chrono::seconds;
+ fields<CT> fds{};
+ from_stream(is, fmt, fds, abbrev, offset);
+ if (!fds.ymd.month().ok() || !fds.ymd.day().ok())
+ is.setstate(std::ios::failbit);
+ if (!is.fail())
+ md = fds.ymd.month()/fds.ymd.day();
+ return is;
+}
+
+template <class CharT, class Traits, class Alloc = std::allocator<CharT>>
+std::basic_istream<CharT, Traits>&
+from_stream(std::basic_istream<CharT, Traits>& is, const CharT* fmt,
+ year_month_day& ymd, std::basic_string<CharT, Traits, Alloc>* abbrev = nullptr,
+ std::chrono::minutes* offset = nullptr)
+{
+ using CT = std::chrono::seconds;
+ fields<CT> fds{};
+ from_stream(is, fmt, fds, abbrev, offset);
+ if (!fds.ymd.ok())
+ is.setstate(std::ios::failbit);
+ if (!is.fail())
+ ymd = fds.ymd;
+ return is;
+}
+
+template <class Duration, class CharT, class Traits, class Alloc = std::allocator<CharT>>
+std::basic_istream<CharT, Traits>&
+from_stream(std::basic_istream<CharT, Traits>& is, const CharT* fmt,
+ sys_time<Duration>& tp, std::basic_string<CharT, Traits, Alloc>* abbrev = nullptr,
+ std::chrono::minutes* offset = nullptr)
+{
+ using CT = typename std::common_type<Duration, std::chrono::seconds>::type;
+ using detail::round_i;
+ std::chrono::minutes offset_local{};
+ auto offptr = offset ? offset : &offset_local;
+ fields<CT> fds{};
+ fds.has_tod = true;
+ from_stream(is, fmt, fds, abbrev, offptr);
+ if (!fds.ymd.ok() || !fds.tod.in_conventional_range())
+ is.setstate(std::ios::failbit);
+ if (!is.fail())
+ tp = round_i<Duration>(sys_days(fds.ymd) - *offptr + fds.tod.to_duration());
+ return is;
+}
+
+template <class Duration, class CharT, class Traits, class Alloc = std::allocator<CharT>>
+std::basic_istream<CharT, Traits>&
+from_stream(std::basic_istream<CharT, Traits>& is, const CharT* fmt,
+ local_time<Duration>& tp, std::basic_string<CharT, Traits, Alloc>* abbrev = nullptr,
+ std::chrono::minutes* offset = nullptr)
+{
+ using CT = typename std::common_type<Duration, std::chrono::seconds>::type;
+ using detail::round_i;
+ fields<CT> fds{};
+ fds.has_tod = true;
+ from_stream(is, fmt, fds, abbrev, offset);
+ if (!fds.ymd.ok() || !fds.tod.in_conventional_range())
+ is.setstate(std::ios::failbit);
+ if (!is.fail())
+ tp = round_i<Duration>(local_seconds{local_days(fds.ymd)} + fds.tod.to_duration());
+ return is;
+}
+
+template <class Rep, class Period, class CharT, class Traits, class Alloc = std::allocator<CharT>>
+std::basic_istream<CharT, Traits>&
+from_stream(std::basic_istream<CharT, Traits>& is, const CharT* fmt,
+ std::chrono::duration<Rep, Period>& d,
+ std::basic_string<CharT, Traits, Alloc>* abbrev = nullptr,
+ std::chrono::minutes* offset = nullptr)
+{
+ using Duration = std::chrono::duration<Rep, Period>;
+ using CT = typename std::common_type<Duration, std::chrono::seconds>::type;
+ fields<CT> fds{};
+ from_stream(is, fmt, fds, abbrev, offset);
+ if (!fds.has_tod)
+ is.setstate(std::ios::failbit);
+ if (!is.fail())
+ d = std::chrono::duration_cast<Duration>(fds.tod.to_duration());
+ return is;
+}
+
+template <class Parsable, class CharT, class Traits = std::char_traits<CharT>,
+ class Alloc = std::allocator<CharT>>
+struct parse_manip
+{
+ const std::basic_string<CharT, Traits, Alloc> format_;
+ Parsable& tp_;
+ std::basic_string<CharT, Traits, Alloc>* abbrev_;
+ std::chrono::minutes* offset_;
+
+public:
+ parse_manip(std::basic_string<CharT, Traits, Alloc> format, Parsable& tp,
+ std::basic_string<CharT, Traits, Alloc>* abbrev = nullptr,
+ std::chrono::minutes* offset = nullptr)
+ : format_(std::move(format))
+ , tp_(tp)
+ , abbrev_(abbrev)
+ , offset_(offset)
+ {}
+
+};
+
+template <class Parsable, class CharT, class Traits, class Alloc>
+std::basic_istream<CharT, Traits>&
+operator>>(std::basic_istream<CharT, Traits>& is,
+ const parse_manip<Parsable, CharT, Traits, Alloc>& x)
+{
+ return from_stream(is, x.format_.c_str(), x.tp_, x.abbrev_, x.offset_);
+}
+
+template <class Parsable, class CharT, class Traits, class Alloc>
+inline
+auto
+parse(const std::basic_string<CharT, Traits, Alloc>& format, Parsable& tp)
+ -> decltype(from_stream(std::declval<std::basic_istream<CharT, Traits>&>(),
+ format.c_str(), tp),
+ parse_manip<Parsable, CharT, Traits, Alloc>{format, tp})
+{
+ return {format, tp};
+}
+
+template <class Parsable, class CharT, class Traits, class Alloc>
+inline
+auto
+parse(const std::basic_string<CharT, Traits, Alloc>& format, Parsable& tp,
+ std::basic_string<CharT, Traits, Alloc>& abbrev)
+ -> decltype(from_stream(std::declval<std::basic_istream<CharT, Traits>&>(),
+ format.c_str(), tp, &abbrev),
+ parse_manip<Parsable, CharT, Traits, Alloc>{format, tp, &abbrev})
+{
+ return {format, tp, &abbrev};
+}
+
+template <class Parsable, class CharT, class Traits, class Alloc>
+inline
+auto
+parse(const std::basic_string<CharT, Traits, Alloc>& format, Parsable& tp,
+ std::chrono::minutes& offset)
+ -> decltype(from_stream(std::declval<std::basic_istream<CharT, Traits>&>(),
+ format.c_str(), tp,
+ std::declval<std::basic_string<CharT, Traits, Alloc>*>(),
+ &offset),
+ parse_manip<Parsable, CharT, Traits, Alloc>{format, tp, nullptr, &offset})
+{
+ return {format, tp, nullptr, &offset};
+}
+
+template <class Parsable, class CharT, class Traits, class Alloc>
+inline
+auto
+parse(const std::basic_string<CharT, Traits, Alloc>& format, Parsable& tp,
+ std::basic_string<CharT, Traits, Alloc>& abbrev, std::chrono::minutes& offset)
+ -> decltype(from_stream(std::declval<std::basic_istream<CharT, Traits>&>(),
+ format.c_str(), tp, &abbrev, &offset),
+ parse_manip<Parsable, CharT, Traits, Alloc>{format, tp, &abbrev, &offset})
+{
+ return {format, tp, &abbrev, &offset};
+}
+
+// const CharT* formats
+
+template <class Parsable, class CharT>
+inline
+auto
+parse(const CharT* format, Parsable& tp)
+ -> decltype(from_stream(std::declval<std::basic_istream<CharT>&>(), format, tp),
+ parse_manip<Parsable, CharT>{format, tp})
+{
+ return {format, tp};
+}
+
+template <class Parsable, class CharT, class Traits, class Alloc>
+inline
+auto
+parse(const CharT* format, Parsable& tp, std::basic_string<CharT, Traits, Alloc>& abbrev)
+ -> decltype(from_stream(std::declval<std::basic_istream<CharT, Traits>&>(), format,
+ tp, &abbrev),
+ parse_manip<Parsable, CharT, Traits, Alloc>{format, tp, &abbrev})
+{
+ return {format, tp, &abbrev};
+}
+
+template <class Parsable, class CharT>
+inline
+auto
+parse(const CharT* format, Parsable& tp, std::chrono::minutes& offset)
+ -> decltype(from_stream(std::declval<std::basic_istream<CharT>&>(), format,
+ tp, std::declval<std::basic_string<CharT>*>(), &offset),
+ parse_manip<Parsable, CharT>{format, tp, nullptr, &offset})
+{
+ return {format, tp, nullptr, &offset};
+}
+
+template <class Parsable, class CharT, class Traits, class Alloc>
+inline
+auto
+parse(const CharT* format, Parsable& tp,
+ std::basic_string<CharT, Traits, Alloc>& abbrev, std::chrono::minutes& offset)
+ -> decltype(from_stream(std::declval<std::basic_istream<CharT, Traits>&>(), format,
+ tp, &abbrev, &offset),
+ parse_manip<Parsable, CharT, Traits, Alloc>{format, tp, &abbrev, &offset})
+{
+ return {format, tp, &abbrev, &offset};
+}
+
+// duration streaming
+
+template <class CharT, class Traits, class Rep, class Period>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os,
+ const std::chrono::duration<Rep, Period>& d)
+{
+ return os << detail::make_string<CharT, Traits>::from(d.count()) +
+ detail::get_units<CharT>(typename Period::type{});
+}
+
+} // namespace date
+
+#ifdef _MSC_VER
+# pragma warning(pop)
+#endif
+
+#ifdef __GNUC__
+# pragma GCC diagnostic pop
+#endif
+
+#endif // DATE_H
diff --git a/src/third-party/date/include/date/ios.h b/src/third-party/date/include/date/ios.h
new file mode 100644
index 0000000..ee54b9d
--- /dev/null
+++ b/src/third-party/date/include/date/ios.h
@@ -0,0 +1,50 @@
+//
+// ios.h
+// DateTimeLib
+//
+// The MIT License (MIT)
+//
+// Copyright (c) 2016 Alexander Kormanovsky
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+
+#ifndef ios_hpp
+#define ios_hpp
+
+#if __APPLE__
+# include <TargetConditionals.h>
+# if TARGET_OS_IPHONE
+# include <string>
+
+ namespace date
+ {
+ namespace iOSUtils
+ {
+
+ std::string get_tzdata_path();
+ std::string get_current_timezone();
+
+ } // namespace iOSUtils
+ } // namespace date
+
+# endif // TARGET_OS_IPHONE
+#else // !__APPLE__
+# define TARGET_OS_IPHONE 0
+#endif // !__APPLE__
+#endif // ios_hpp
diff --git a/src/third-party/date/include/date/islamic.h b/src/third-party/date/include/date/islamic.h
new file mode 100644
index 0000000..82ed659
--- /dev/null
+++ b/src/third-party/date/include/date/islamic.h
@@ -0,0 +1,3031 @@
+#ifndef ISLAMIC_H
+#define ISLAMIC_H
+
+// The MIT License (MIT)
+//
+// Copyright (c) 2016 Howard Hinnant
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// Our apologies. When the previous paragraph was written, lowercase had not yet
+// been invented (that would involve another several millennia of evolution).
+// We did not mean to shout.
+
+#include "date.h"
+
+namespace islamic
+{
+
+// durations
+
+using days = date::days;
+
+using weeks = date::weeks;
+
+using years = std::chrono::duration
+ <int, date::detail::ratio_multiply<std::ratio<10631, 30>, days::period>>;
+
+using months = std::chrono::duration
+ <int, date::detail::ratio_divide<years::period, std::ratio<12>>>;
+
+// time_point
+
+using sys_days = date::sys_days;
+using local_days = date::local_days;
+
+// types
+
+struct last_spec
+{
+ explicit last_spec() = default;
+};
+
+class day;
+class month;
+class year;
+
+class weekday;
+class weekday_indexed;
+class weekday_last;
+
+class month_day;
+class month_day_last;
+class month_weekday;
+class month_weekday_last;
+
+class year_month;
+
+class year_month_day;
+class year_month_day_last;
+class year_month_weekday;
+class year_month_weekday_last;
+
+// date composition operators
+
+CONSTCD11 year_month operator/(const year& y, const month& m) NOEXCEPT;
+CONSTCD11 year_month operator/(const year& y, int m) NOEXCEPT;
+
+CONSTCD11 month_day operator/(const day& d, const month& m) NOEXCEPT;
+CONSTCD11 month_day operator/(const day& d, int m) NOEXCEPT;
+CONSTCD11 month_day operator/(const month& m, const day& d) NOEXCEPT;
+CONSTCD11 month_day operator/(const month& m, int d) NOEXCEPT;
+CONSTCD11 month_day operator/(int m, const day& d) NOEXCEPT;
+
+CONSTCD11 month_day_last operator/(const month& m, last_spec) NOEXCEPT;
+CONSTCD11 month_day_last operator/(int m, last_spec) NOEXCEPT;
+CONSTCD11 month_day_last operator/(last_spec, const month& m) NOEXCEPT;
+CONSTCD11 month_day_last operator/(last_spec, int m) NOEXCEPT;
+
+CONSTCD11 month_weekday operator/(const month& m, const weekday_indexed& wdi) NOEXCEPT;
+CONSTCD11 month_weekday operator/(int m, const weekday_indexed& wdi) NOEXCEPT;
+CONSTCD11 month_weekday operator/(const weekday_indexed& wdi, const month& m) NOEXCEPT;
+CONSTCD11 month_weekday operator/(const weekday_indexed& wdi, int m) NOEXCEPT;
+
+CONSTCD11 month_weekday_last operator/(const month& m, const weekday_last& wdl) NOEXCEPT;
+CONSTCD11 month_weekday_last operator/(int m, const weekday_last& wdl) NOEXCEPT;
+CONSTCD11 month_weekday_last operator/(const weekday_last& wdl, const month& m) NOEXCEPT;
+CONSTCD11 month_weekday_last operator/(const weekday_last& wdl, int m) NOEXCEPT;
+
+CONSTCD11 year_month_day operator/(const year_month& ym, const day& d) NOEXCEPT;
+CONSTCD11 year_month_day operator/(const year_month& ym, int d) NOEXCEPT;
+CONSTCD11 year_month_day operator/(const year& y, const month_day& md) NOEXCEPT;
+CONSTCD11 year_month_day operator/(int y, const month_day& md) NOEXCEPT;
+CONSTCD11 year_month_day operator/(const month_day& md, const year& y) NOEXCEPT;
+CONSTCD11 year_month_day operator/(const month_day& md, int y) NOEXCEPT;
+
+CONSTCD11
+ year_month_day_last operator/(const year_month& ym, last_spec) NOEXCEPT;
+CONSTCD11
+ year_month_day_last operator/(const year& y, const month_day_last& mdl) NOEXCEPT;
+CONSTCD11
+ year_month_day_last operator/(int y, const month_day_last& mdl) NOEXCEPT;
+CONSTCD11
+ year_month_day_last operator/(const month_day_last& mdl, const year& y) NOEXCEPT;
+CONSTCD11
+ year_month_day_last operator/(const month_day_last& mdl, int y) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday
+operator/(const year_month& ym, const weekday_indexed& wdi) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday
+operator/(const year& y, const month_weekday& mwd) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday
+operator/(int y, const month_weekday& mwd) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday
+operator/(const month_weekday& mwd, const year& y) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday
+operator/(const month_weekday& mwd, int y) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday_last
+operator/(const year_month& ym, const weekday_last& wdl) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday_last
+operator/(const year& y, const month_weekday_last& mwdl) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday_last
+operator/(int y, const month_weekday_last& mwdl) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday_last
+operator/(const month_weekday_last& mwdl, const year& y) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday_last
+operator/(const month_weekday_last& mwdl, int y) NOEXCEPT;
+
+// Detailed interface
+
+// day
+
+class day
+{
+ unsigned char d_;
+
+public:
+ explicit CONSTCD11 day(unsigned d) NOEXCEPT;
+
+ CONSTCD14 day& operator++() NOEXCEPT;
+ CONSTCD14 day operator++(int) NOEXCEPT;
+ CONSTCD14 day& operator--() NOEXCEPT;
+ CONSTCD14 day operator--(int) NOEXCEPT;
+
+ CONSTCD14 day& operator+=(const days& d) NOEXCEPT;
+ CONSTCD14 day& operator-=(const days& d) NOEXCEPT;
+
+ CONSTCD11 explicit operator unsigned() const NOEXCEPT;
+ CONSTCD11 bool ok() const NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const day& x, const day& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const day& x, const day& y) NOEXCEPT;
+CONSTCD11 bool operator< (const day& x, const day& y) NOEXCEPT;
+CONSTCD11 bool operator> (const day& x, const day& y) NOEXCEPT;
+CONSTCD11 bool operator<=(const day& x, const day& y) NOEXCEPT;
+CONSTCD11 bool operator>=(const day& x, const day& y) NOEXCEPT;
+
+CONSTCD11 day operator+(const day& x, const days& y) NOEXCEPT;
+CONSTCD11 day operator+(const days& x, const day& y) NOEXCEPT;
+CONSTCD11 day operator-(const day& x, const days& y) NOEXCEPT;
+CONSTCD11 days operator-(const day& x, const day& y) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const day& d);
+
+// month
+
+class month
+{
+ unsigned char m_;
+
+public:
+ explicit CONSTCD11 month(unsigned m) NOEXCEPT;
+
+ CONSTCD14 month& operator++() NOEXCEPT;
+ CONSTCD14 month operator++(int) NOEXCEPT;
+ CONSTCD14 month& operator--() NOEXCEPT;
+ CONSTCD14 month operator--(int) NOEXCEPT;
+
+ CONSTCD14 month& operator+=(const months& m) NOEXCEPT;
+ CONSTCD14 month& operator-=(const months& m) NOEXCEPT;
+
+ CONSTCD11 explicit operator unsigned() const NOEXCEPT;
+ CONSTCD11 bool ok() const NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const month& x, const month& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const month& x, const month& y) NOEXCEPT;
+CONSTCD11 bool operator< (const month& x, const month& y) NOEXCEPT;
+CONSTCD11 bool operator> (const month& x, const month& y) NOEXCEPT;
+CONSTCD11 bool operator<=(const month& x, const month& y) NOEXCEPT;
+CONSTCD11 bool operator>=(const month& x, const month& y) NOEXCEPT;
+
+CONSTCD14 month operator+(const month& x, const months& y) NOEXCEPT;
+CONSTCD14 month operator+(const months& x, const month& y) NOEXCEPT;
+CONSTCD14 month operator-(const month& x, const months& y) NOEXCEPT;
+CONSTCD14 months operator-(const month& x, const month& y) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const month& m);
+
+// year
+
+class year
+{
+ short y_;
+
+public:
+ explicit CONSTCD11 year(int y) NOEXCEPT;
+
+ CONSTCD14 year& operator++() NOEXCEPT;
+ CONSTCD14 year operator++(int) NOEXCEPT;
+ CONSTCD14 year& operator--() NOEXCEPT;
+ CONSTCD14 year operator--(int) NOEXCEPT;
+
+ CONSTCD14 year& operator+=(const years& y) NOEXCEPT;
+ CONSTCD14 year& operator-=(const years& y) NOEXCEPT;
+
+ CONSTCD14 bool is_leap() const NOEXCEPT;
+
+ CONSTCD11 explicit operator int() const NOEXCEPT;
+ CONSTCD11 bool ok() const NOEXCEPT;
+
+ static CONSTCD11 year min() NOEXCEPT;
+ static CONSTCD11 year max() NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const year& x, const year& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const year& x, const year& y) NOEXCEPT;
+CONSTCD11 bool operator< (const year& x, const year& y) NOEXCEPT;
+CONSTCD11 bool operator> (const year& x, const year& y) NOEXCEPT;
+CONSTCD11 bool operator<=(const year& x, const year& y) NOEXCEPT;
+CONSTCD11 bool operator>=(const year& x, const year& y) NOEXCEPT;
+
+CONSTCD11 year operator+(const year& x, const years& y) NOEXCEPT;
+CONSTCD11 year operator+(const years& x, const year& y) NOEXCEPT;
+CONSTCD11 year operator-(const year& x, const years& y) NOEXCEPT;
+CONSTCD11 years operator-(const year& x, const year& y) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year& y);
+
+// weekday
+
+class weekday
+{
+ unsigned char wd_;
+public:
+ explicit CONSTCD11 weekday(unsigned wd) NOEXCEPT;
+ explicit weekday(int) = delete;
+ CONSTCD11 weekday(const sys_days& dp) NOEXCEPT;
+ CONSTCD11 explicit weekday(const local_days& dp) NOEXCEPT;
+
+ CONSTCD14 weekday& operator++() NOEXCEPT;
+ CONSTCD14 weekday operator++(int) NOEXCEPT;
+ CONSTCD14 weekday& operator--() NOEXCEPT;
+ CONSTCD14 weekday operator--(int) NOEXCEPT;
+
+ CONSTCD14 weekday& operator+=(const days& d) NOEXCEPT;
+ CONSTCD14 weekday& operator-=(const days& d) NOEXCEPT;
+
+ CONSTCD11 explicit operator unsigned() const NOEXCEPT;
+ CONSTCD11 bool ok() const NOEXCEPT;
+
+ CONSTCD11 weekday_indexed operator[](unsigned index) const NOEXCEPT;
+ CONSTCD11 weekday_last operator[](last_spec) const NOEXCEPT;
+
+private:
+ static CONSTCD11 unsigned char weekday_from_days(int z) NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const weekday& x, const weekday& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const weekday& x, const weekday& y) NOEXCEPT;
+
+CONSTCD14 weekday operator+(const weekday& x, const days& y) NOEXCEPT;
+CONSTCD14 weekday operator+(const days& x, const weekday& y) NOEXCEPT;
+CONSTCD14 weekday operator-(const weekday& x, const days& y) NOEXCEPT;
+CONSTCD14 days operator-(const weekday& x, const weekday& y) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const weekday& wd);
+
+// weekday_indexed
+
+class weekday_indexed
+{
+ unsigned char wd_ : 4;
+ unsigned char index_ : 4;
+
+public:
+ CONSTCD11 weekday_indexed(const islamic::weekday& wd, unsigned index) NOEXCEPT;
+
+ CONSTCD11 islamic::weekday weekday() const NOEXCEPT;
+ CONSTCD11 unsigned index() const NOEXCEPT;
+ CONSTCD11 bool ok() const NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const weekday_indexed& x, const weekday_indexed& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const weekday_indexed& x, const weekday_indexed& y) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const weekday_indexed& wdi);
+
+// weekday_last
+
+class weekday_last
+{
+ islamic::weekday wd_;
+
+public:
+ explicit CONSTCD11 weekday_last(const islamic::weekday& wd) NOEXCEPT;
+
+ CONSTCD11 islamic::weekday weekday() const NOEXCEPT;
+ CONSTCD11 bool ok() const NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const weekday_last& x, const weekday_last& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const weekday_last& x, const weekday_last& y) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const weekday_last& wdl);
+
+// year_month
+
+class year_month
+{
+ islamic::year y_;
+ islamic::month m_;
+
+public:
+ CONSTCD11 year_month(const islamic::year& y, const islamic::month& m) NOEXCEPT;
+
+ CONSTCD11 islamic::year year() const NOEXCEPT;
+ CONSTCD11 islamic::month month() const NOEXCEPT;
+
+ CONSTCD14 year_month& operator+=(const months& dm) NOEXCEPT;
+ CONSTCD14 year_month& operator-=(const months& dm) NOEXCEPT;
+ CONSTCD14 year_month& operator+=(const years& dy) NOEXCEPT;
+ CONSTCD14 year_month& operator-=(const years& dy) NOEXCEPT;
+
+ CONSTCD11 bool ok() const NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const year_month& x, const year_month& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const year_month& x, const year_month& y) NOEXCEPT;
+CONSTCD11 bool operator< (const year_month& x, const year_month& y) NOEXCEPT;
+CONSTCD11 bool operator> (const year_month& x, const year_month& y) NOEXCEPT;
+CONSTCD11 bool operator<=(const year_month& x, const year_month& y) NOEXCEPT;
+CONSTCD11 bool operator>=(const year_month& x, const year_month& y) NOEXCEPT;
+
+CONSTCD14 year_month operator+(const year_month& ym, const months& dm) NOEXCEPT;
+CONSTCD14 year_month operator+(const months& dm, const year_month& ym) NOEXCEPT;
+CONSTCD14 year_month operator-(const year_month& ym, const months& dm) NOEXCEPT;
+
+CONSTCD11 months operator-(const year_month& x, const year_month& y) NOEXCEPT;
+CONSTCD11 year_month operator+(const year_month& ym, const years& dy) NOEXCEPT;
+CONSTCD11 year_month operator+(const years& dy, const year_month& ym) NOEXCEPT;
+CONSTCD11 year_month operator-(const year_month& ym, const years& dy) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year_month& ym);
+
+// month_day
+
+class month_day
+{
+ islamic::month m_;
+ islamic::day d_;
+
+public:
+ CONSTCD11 month_day(const islamic::month& m, const islamic::day& d) NOEXCEPT;
+
+ CONSTCD11 islamic::month month() const NOEXCEPT;
+ CONSTCD11 islamic::day day() const NOEXCEPT;
+
+ CONSTCD14 bool ok() const NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const month_day& x, const month_day& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const month_day& x, const month_day& y) NOEXCEPT;
+CONSTCD11 bool operator< (const month_day& x, const month_day& y) NOEXCEPT;
+CONSTCD11 bool operator> (const month_day& x, const month_day& y) NOEXCEPT;
+CONSTCD11 bool operator<=(const month_day& x, const month_day& y) NOEXCEPT;
+CONSTCD11 bool operator>=(const month_day& x, const month_day& y) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const month_day& md);
+
+// month_day_last
+
+class month_day_last
+{
+ islamic::month m_;
+
+public:
+ CONSTCD11 explicit month_day_last(const islamic::month& m) NOEXCEPT;
+
+ CONSTCD11 islamic::month month() const NOEXCEPT;
+ CONSTCD11 bool ok() const NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const month_day_last& x, const month_day_last& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const month_day_last& x, const month_day_last& y) NOEXCEPT;
+CONSTCD11 bool operator< (const month_day_last& x, const month_day_last& y) NOEXCEPT;
+CONSTCD11 bool operator> (const month_day_last& x, const month_day_last& y) NOEXCEPT;
+CONSTCD11 bool operator<=(const month_day_last& x, const month_day_last& y) NOEXCEPT;
+CONSTCD11 bool operator>=(const month_day_last& x, const month_day_last& y) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const month_day_last& mdl);
+
+// month_weekday
+
+class month_weekday
+{
+ islamic::month m_;
+ islamic::weekday_indexed wdi_;
+public:
+ CONSTCD11 month_weekday(const islamic::month& m,
+ const islamic::weekday_indexed& wdi) NOEXCEPT;
+
+ CONSTCD11 islamic::month month() const NOEXCEPT;
+ CONSTCD11 islamic::weekday_indexed weekday_indexed() const NOEXCEPT;
+
+ CONSTCD11 bool ok() const NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const month_weekday& x, const month_weekday& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const month_weekday& x, const month_weekday& y) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const month_weekday& mwd);
+
+// month_weekday_last
+
+class month_weekday_last
+{
+ islamic::month m_;
+ islamic::weekday_last wdl_;
+
+public:
+ CONSTCD11 month_weekday_last(const islamic::month& m,
+ const islamic::weekday_last& wd) NOEXCEPT;
+
+ CONSTCD11 islamic::month month() const NOEXCEPT;
+ CONSTCD11 islamic::weekday_last weekday_last() const NOEXCEPT;
+
+ CONSTCD11 bool ok() const NOEXCEPT;
+};
+
+CONSTCD11
+ bool operator==(const month_weekday_last& x, const month_weekday_last& y) NOEXCEPT;
+CONSTCD11
+ bool operator!=(const month_weekday_last& x, const month_weekday_last& y) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const month_weekday_last& mwdl);
+
+// class year_month_day
+
+class year_month_day
+{
+ islamic::year y_;
+ islamic::month m_;
+ islamic::day d_;
+
+public:
+ CONSTCD11 year_month_day(const islamic::year& y, const islamic::month& m,
+ const islamic::day& d) NOEXCEPT;
+ CONSTCD14 year_month_day(const year_month_day_last& ymdl) NOEXCEPT;
+
+ CONSTCD14 year_month_day(sys_days dp) NOEXCEPT;
+ CONSTCD14 explicit year_month_day(local_days dp) NOEXCEPT;
+
+ CONSTCD14 year_month_day& operator+=(const months& m) NOEXCEPT;
+ CONSTCD14 year_month_day& operator-=(const months& m) NOEXCEPT;
+ CONSTCD14 year_month_day& operator+=(const years& y) NOEXCEPT;
+ CONSTCD14 year_month_day& operator-=(const years& y) NOEXCEPT;
+
+ CONSTCD11 islamic::year year() const NOEXCEPT;
+ CONSTCD11 islamic::month month() const NOEXCEPT;
+ CONSTCD11 islamic::day day() const NOEXCEPT;
+
+ CONSTCD14 operator sys_days() const NOEXCEPT;
+ CONSTCD14 explicit operator local_days() const NOEXCEPT;
+ CONSTCD14 bool ok() const NOEXCEPT;
+
+private:
+ static CONSTCD14 year_month_day from_days(days dp) NOEXCEPT;
+ CONSTCD14 days to_days() const NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const year_month_day& x, const year_month_day& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const year_month_day& x, const year_month_day& y) NOEXCEPT;
+CONSTCD11 bool operator< (const year_month_day& x, const year_month_day& y) NOEXCEPT;
+CONSTCD11 bool operator> (const year_month_day& x, const year_month_day& y) NOEXCEPT;
+CONSTCD11 bool operator<=(const year_month_day& x, const year_month_day& y) NOEXCEPT;
+CONSTCD11 bool operator>=(const year_month_day& x, const year_month_day& y) NOEXCEPT;
+
+CONSTCD14 year_month_day operator+(const year_month_day& ymd, const months& dm) NOEXCEPT;
+CONSTCD14 year_month_day operator+(const months& dm, const year_month_day& ymd) NOEXCEPT;
+CONSTCD14 year_month_day operator-(const year_month_day& ymd, const months& dm) NOEXCEPT;
+CONSTCD11 year_month_day operator+(const year_month_day& ymd, const years& dy) NOEXCEPT;
+CONSTCD11 year_month_day operator+(const years& dy, const year_month_day& ymd) NOEXCEPT;
+CONSTCD11 year_month_day operator-(const year_month_day& ymd, const years& dy) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year_month_day& ymd);
+
+// year_month_day_last
+
+class year_month_day_last
+{
+ islamic::year y_;
+ islamic::month_day_last mdl_;
+
+public:
+ CONSTCD11 year_month_day_last(const islamic::year& y,
+ const islamic::month_day_last& mdl) NOEXCEPT;
+
+ CONSTCD14 year_month_day_last& operator+=(const months& m) NOEXCEPT;
+ CONSTCD14 year_month_day_last& operator-=(const months& m) NOEXCEPT;
+ CONSTCD14 year_month_day_last& operator+=(const years& y) NOEXCEPT;
+ CONSTCD14 year_month_day_last& operator-=(const years& y) NOEXCEPT;
+
+ CONSTCD11 islamic::year year() const NOEXCEPT;
+ CONSTCD11 islamic::month month() const NOEXCEPT;
+ CONSTCD11 islamic::month_day_last month_day_last() const NOEXCEPT;
+ CONSTCD14 islamic::day day() const NOEXCEPT;
+
+ CONSTCD14 operator sys_days() const NOEXCEPT;
+ CONSTCD14 explicit operator local_days() const NOEXCEPT;
+ CONSTCD11 bool ok() const NOEXCEPT;
+};
+
+CONSTCD11
+ bool operator==(const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT;
+CONSTCD11
+ bool operator!=(const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT;
+CONSTCD11
+ bool operator< (const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT;
+CONSTCD11
+ bool operator> (const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT;
+CONSTCD11
+ bool operator<=(const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT;
+CONSTCD11
+ bool operator>=(const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT;
+
+CONSTCD14
+year_month_day_last
+operator+(const year_month_day_last& ymdl, const months& dm) NOEXCEPT;
+
+CONSTCD14
+year_month_day_last
+operator+(const months& dm, const year_month_day_last& ymdl) NOEXCEPT;
+
+CONSTCD11
+year_month_day_last
+operator+(const year_month_day_last& ymdl, const years& dy) NOEXCEPT;
+
+CONSTCD11
+year_month_day_last
+operator+(const years& dy, const year_month_day_last& ymdl) NOEXCEPT;
+
+CONSTCD14
+year_month_day_last
+operator-(const year_month_day_last& ymdl, const months& dm) NOEXCEPT;
+
+CONSTCD11
+year_month_day_last
+operator-(const year_month_day_last& ymdl, const years& dy) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year_month_day_last& ymdl);
+
+// year_month_weekday
+
+class year_month_weekday
+{
+ islamic::year y_;
+ islamic::month m_;
+ islamic::weekday_indexed wdi_;
+
+public:
+ CONSTCD11 year_month_weekday(const islamic::year& y, const islamic::month& m,
+ const islamic::weekday_indexed& wdi) NOEXCEPT;
+ CONSTCD14 year_month_weekday(const sys_days& dp) NOEXCEPT;
+ CONSTCD14 explicit year_month_weekday(const local_days& dp) NOEXCEPT;
+
+ CONSTCD14 year_month_weekday& operator+=(const months& m) NOEXCEPT;
+ CONSTCD14 year_month_weekday& operator-=(const months& m) NOEXCEPT;
+ CONSTCD14 year_month_weekday& operator+=(const years& y) NOEXCEPT;
+ CONSTCD14 year_month_weekday& operator-=(const years& y) NOEXCEPT;
+
+ CONSTCD11 islamic::year year() const NOEXCEPT;
+ CONSTCD11 islamic::month month() const NOEXCEPT;
+ CONSTCD11 islamic::weekday weekday() const NOEXCEPT;
+ CONSTCD11 unsigned index() const NOEXCEPT;
+ CONSTCD11 islamic::weekday_indexed weekday_indexed() const NOEXCEPT;
+
+ CONSTCD14 operator sys_days() const NOEXCEPT;
+ CONSTCD14 explicit operator local_days() const NOEXCEPT;
+ CONSTCD14 bool ok() const NOEXCEPT;
+
+private:
+ static CONSTCD14 year_month_weekday from_days(days dp) NOEXCEPT;
+ CONSTCD14 days to_days() const NOEXCEPT;
+};
+
+CONSTCD11
+ bool operator==(const year_month_weekday& x, const year_month_weekday& y) NOEXCEPT;
+CONSTCD11
+ bool operator!=(const year_month_weekday& x, const year_month_weekday& y) NOEXCEPT;
+
+CONSTCD14
+year_month_weekday
+operator+(const year_month_weekday& ymwd, const months& dm) NOEXCEPT;
+
+CONSTCD14
+year_month_weekday
+operator+(const months& dm, const year_month_weekday& ymwd) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday
+operator+(const year_month_weekday& ymwd, const years& dy) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday
+operator+(const years& dy, const year_month_weekday& ymwd) NOEXCEPT;
+
+CONSTCD14
+year_month_weekday
+operator-(const year_month_weekday& ymwd, const months& dm) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday
+operator-(const year_month_weekday& ymwd, const years& dy) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year_month_weekday& ymwdi);
+
+// year_month_weekday_last
+
+class year_month_weekday_last
+{
+ islamic::year y_;
+ islamic::month m_;
+ islamic::weekday_last wdl_;
+
+public:
+ CONSTCD11 year_month_weekday_last(const islamic::year& y, const islamic::month& m,
+ const islamic::weekday_last& wdl) NOEXCEPT;
+
+ CONSTCD14 year_month_weekday_last& operator+=(const months& m) NOEXCEPT;
+ CONSTCD14 year_month_weekday_last& operator-=(const months& m) NOEXCEPT;
+ CONSTCD14 year_month_weekday_last& operator+=(const years& y) NOEXCEPT;
+ CONSTCD14 year_month_weekday_last& operator-=(const years& y) NOEXCEPT;
+
+ CONSTCD11 islamic::year year() const NOEXCEPT;
+ CONSTCD11 islamic::month month() const NOEXCEPT;
+ CONSTCD11 islamic::weekday weekday() const NOEXCEPT;
+ CONSTCD11 islamic::weekday_last weekday_last() const NOEXCEPT;
+
+ CONSTCD14 operator sys_days() const NOEXCEPT;
+ CONSTCD14 explicit operator local_days() const NOEXCEPT;
+ CONSTCD11 bool ok() const NOEXCEPT;
+
+private:
+ CONSTCD14 days to_days() const NOEXCEPT;
+};
+
+CONSTCD11
+bool
+operator==(const year_month_weekday_last& x, const year_month_weekday_last& y) NOEXCEPT;
+
+CONSTCD11
+bool
+operator!=(const year_month_weekday_last& x, const year_month_weekday_last& y) NOEXCEPT;
+
+CONSTCD14
+year_month_weekday_last
+operator+(const year_month_weekday_last& ymwdl, const months& dm) NOEXCEPT;
+
+CONSTCD14
+year_month_weekday_last
+operator+(const months& dm, const year_month_weekday_last& ymwdl) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday_last
+operator+(const year_month_weekday_last& ymwdl, const years& dy) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday_last
+operator+(const years& dy, const year_month_weekday_last& ymwdl) NOEXCEPT;
+
+CONSTCD14
+year_month_weekday_last
+operator-(const year_month_weekday_last& ymwdl, const months& dm) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday_last
+operator-(const year_month_weekday_last& ymwdl, const years& dy) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year_month_weekday_last& ymwdl);
+
+#if !defined(_MSC_VER) || (_MSC_VER >= 1900)
+inline namespace literals
+{
+
+CONSTCD11 islamic::day operator "" _d(unsigned long long d) NOEXCEPT;
+CONSTCD11 islamic::year operator "" _y(unsigned long long y) NOEXCEPT;
+
+} // inline namespace literals
+#endif // !defined(_MSC_VER) || (_MSC_VER >= 1900)
+
+//----------------+
+// Implementation |
+//----------------+
+
+// day
+
+CONSTCD11 inline day::day(unsigned d) NOEXCEPT : d_(static_cast<unsigned char>(d)) {}
+CONSTCD14 inline day& day::operator++() NOEXCEPT {++d_; return *this;}
+CONSTCD14 inline day day::operator++(int) NOEXCEPT {auto tmp(*this); ++(*this); return tmp;}
+CONSTCD14 inline day& day::operator--() NOEXCEPT {--d_; return *this;}
+CONSTCD14 inline day day::operator--(int) NOEXCEPT {auto tmp(*this); --(*this); return tmp;}
+CONSTCD14 inline day& day::operator+=(const days& d) NOEXCEPT {*this = *this + d; return *this;}
+CONSTCD14 inline day& day::operator-=(const days& d) NOEXCEPT {*this = *this - d; return *this;}
+CONSTCD11 inline day::operator unsigned() const NOEXCEPT {return d_;}
+CONSTCD11 inline bool day::ok() const NOEXCEPT {return 1 <= d_ && d_ <= 30;}
+
+CONSTCD11
+inline
+bool
+operator==(const day& x, const day& y) NOEXCEPT
+{
+ return static_cast<unsigned>(x) == static_cast<unsigned>(y);
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const day& x, const day& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+CONSTCD11
+inline
+bool
+operator<(const day& x, const day& y) NOEXCEPT
+{
+ return static_cast<unsigned>(x) < static_cast<unsigned>(y);
+}
+
+CONSTCD11
+inline
+bool
+operator>(const day& x, const day& y) NOEXCEPT
+{
+ return y < x;
+}
+
+CONSTCD11
+inline
+bool
+operator<=(const day& x, const day& y) NOEXCEPT
+{
+ return !(y < x);
+}
+
+CONSTCD11
+inline
+bool
+operator>=(const day& x, const day& y) NOEXCEPT
+{
+ return !(x < y);
+}
+
+CONSTCD11
+inline
+days
+operator-(const day& x, const day& y) NOEXCEPT
+{
+ return days{static_cast<days::rep>(static_cast<unsigned>(x)
+ - static_cast<unsigned>(y))};
+}
+
+CONSTCD11
+inline
+day
+operator+(const day& x, const days& y) NOEXCEPT
+{
+ return day{static_cast<unsigned>(x) + static_cast<unsigned>(y.count())};
+}
+
+CONSTCD11
+inline
+day
+operator+(const days& x, const day& y) NOEXCEPT
+{
+ return y + x;
+}
+
+CONSTCD11
+inline
+day
+operator-(const day& x, const days& y) NOEXCEPT
+{
+ return x + -y;
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const day& d)
+{
+ date::detail::save_ostream<CharT, Traits> _(os);
+ os.fill('0');
+ os.flags(std::ios::dec | std::ios::right);
+ os.width(2);
+ os << static_cast<unsigned>(d);
+ return os;
+}
+
+// month
+
+CONSTCD11 inline month::month(unsigned m) NOEXCEPT : m_(static_cast<decltype(m_)>(m)) {}
+CONSTCD14 inline month& month::operator++() NOEXCEPT {if (++m_ == 13) m_ = 1; return *this;}
+CONSTCD14 inline month month::operator++(int) NOEXCEPT {auto tmp(*this); ++(*this); return tmp;}
+CONSTCD14 inline month& month::operator--() NOEXCEPT {if (--m_ == 0) m_ = 12; return *this;}
+CONSTCD14 inline month month::operator--(int) NOEXCEPT {auto tmp(*this); --(*this); return tmp;}
+
+CONSTCD14
+inline
+month&
+month::operator+=(const months& m) NOEXCEPT
+{
+ *this = *this + m;
+ return *this;
+}
+
+CONSTCD14
+inline
+month&
+month::operator-=(const months& m) NOEXCEPT
+{
+ *this = *this - m;
+ return *this;
+}
+
+CONSTCD11 inline month::operator unsigned() const NOEXCEPT {return m_;}
+CONSTCD11 inline bool month::ok() const NOEXCEPT {return 1 <= m_ && m_ <= 12;}
+
+CONSTCD11
+inline
+bool
+operator==(const month& x, const month& y) NOEXCEPT
+{
+ return static_cast<unsigned>(x) == static_cast<unsigned>(y);
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const month& x, const month& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+CONSTCD11
+inline
+bool
+operator<(const month& x, const month& y) NOEXCEPT
+{
+ return static_cast<unsigned>(x) < static_cast<unsigned>(y);
+}
+
+CONSTCD11
+inline
+bool
+operator>(const month& x, const month& y) NOEXCEPT
+{
+ return y < x;
+}
+
+CONSTCD11
+inline
+bool
+operator<=(const month& x, const month& y) NOEXCEPT
+{
+ return !(y < x);
+}
+
+CONSTCD11
+inline
+bool
+operator>=(const month& x, const month& y) NOEXCEPT
+{
+ return !(x < y);
+}
+
+CONSTCD14
+inline
+months
+operator-(const month& x, const month& y) NOEXCEPT
+{
+ auto const d = static_cast<unsigned>(x) - static_cast<unsigned>(y);
+ return months(d <= 11 ? d : d + 12);
+}
+
+CONSTCD14
+inline
+month
+operator+(const month& x, const months& y) NOEXCEPT
+{
+ auto const mu = static_cast<long long>(static_cast<unsigned>(x)) - 1 + y.count();
+ auto const yr = (mu >= 0 ? mu : mu-11) / 12;
+ return month{static_cast<unsigned>(mu - yr * 12 + 1)};
+}
+
+CONSTCD14
+inline
+month
+operator+(const months& x, const month& y) NOEXCEPT
+{
+ return y + x;
+}
+
+CONSTCD14
+inline
+month
+operator-(const month& x, const months& y) NOEXCEPT
+{
+ return x + -y;
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const month& m)
+{
+ switch (static_cast<unsigned>(m))
+ {
+ case 1:
+ os << "Muharram";
+ break;
+ case 2:
+ os << "Safar";
+ break;
+ case 3:
+ os << "Rabi' al-awwal";
+ break;
+ case 4:
+ os << "Rabi' al-thani";
+ break;
+ case 5:
+ os << "Jumada al-awwal";
+ break;
+ case 6:
+ os << "Jumada al-Thani";
+ break;
+ case 7:
+ os << "Rajab";
+ break;
+ case 8:
+ os << "Sha'ban";
+ break;
+ case 9:
+ os << "Ramadan";
+ break;
+ case 10:
+ os << "Shawwal";
+ break;
+ case 11:
+ os << "Dhu al-Qi'dah";
+ break;
+ case 12:
+ os << "Dhu al-Hijjah";
+ break;
+ default:
+ os << static_cast<unsigned>(m) << " is not a valid month";
+ break;
+ }
+ return os;
+}
+
+// year
+
+CONSTCD11 inline year::year(int y) NOEXCEPT : y_(static_cast<decltype(y_)>(y)) {}
+CONSTCD14 inline year& year::operator++() NOEXCEPT {++y_; return *this;}
+CONSTCD14 inline year year::operator++(int) NOEXCEPT {auto tmp(*this); ++(*this); return tmp;}
+CONSTCD14 inline year& year::operator--() NOEXCEPT {--y_; return *this;}
+CONSTCD14 inline year year::operator--(int) NOEXCEPT {auto tmp(*this); --(*this); return tmp;}
+CONSTCD14 inline year& year::operator+=(const years& y) NOEXCEPT {*this = *this + y; return *this;}
+CONSTCD14 inline year& year::operator-=(const years& y) NOEXCEPT {*this = *this - y; return *this;}
+
+CONSTCD14
+inline
+bool
+year::is_leap() const NOEXCEPT
+{
+ int y = y_ - 1;
+ const int era = (y >= 0 ? y : y-29) / 30;
+ const unsigned yoe = static_cast<unsigned>(y - era * 30);
+ switch (yoe)
+ {
+ case 1:
+ case 4:
+ case 6:
+ case 9:
+ case 12:
+ case 15:
+ case 17:
+ case 20:
+ case 23:
+ case 25:
+ case 28:
+ return true;
+ default:
+ return false;
+ }
+}
+
+CONSTCD11 inline year::operator int() const NOEXCEPT {return y_;}
+CONSTCD11 inline bool year::ok() const NOEXCEPT {return true;}
+
+CONSTCD11
+inline
+year
+year::min() NOEXCEPT
+{
+ return year{std::numeric_limits<short>::min()};
+}
+
+CONSTCD11
+inline
+year
+year::max() NOEXCEPT
+{
+ return year{std::numeric_limits<short>::max()};
+}
+
+CONSTCD11
+inline
+bool
+operator==(const year& x, const year& y) NOEXCEPT
+{
+ return static_cast<int>(x) == static_cast<int>(y);
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const year& x, const year& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+CONSTCD11
+inline
+bool
+operator<(const year& x, const year& y) NOEXCEPT
+{
+ return static_cast<int>(x) < static_cast<int>(y);
+}
+
+CONSTCD11
+inline
+bool
+operator>(const year& x, const year& y) NOEXCEPT
+{
+ return y < x;
+}
+
+CONSTCD11
+inline
+bool
+operator<=(const year& x, const year& y) NOEXCEPT
+{
+ return !(y < x);
+}
+
+CONSTCD11
+inline
+bool
+operator>=(const year& x, const year& y) NOEXCEPT
+{
+ return !(x < y);
+}
+
+CONSTCD11
+inline
+years
+operator-(const year& x, const year& y) NOEXCEPT
+{
+ return years{static_cast<int>(x) - static_cast<int>(y)};
+}
+
+CONSTCD11
+inline
+year
+operator+(const year& x, const years& y) NOEXCEPT
+{
+ return year{static_cast<int>(x) + y.count()};
+}
+
+CONSTCD11
+inline
+year
+operator+(const years& x, const year& y) NOEXCEPT
+{
+ return y + x;
+}
+
+CONSTCD11
+inline
+year
+operator-(const year& x, const years& y) NOEXCEPT
+{
+ return year{static_cast<int>(x) - y.count()};
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year& y)
+{
+ date::detail::save_ostream<CharT, Traits> _(os);
+ os.fill('0');
+ os.flags(std::ios::dec | std::ios::internal);
+ os.width(4 + (y < year{0}));
+ os << static_cast<int>(y);
+ return os;
+}
+
+// weekday
+
+CONSTCD11
+inline
+unsigned char
+weekday::weekday_from_days(int z) NOEXCEPT
+{
+ return static_cast<unsigned char>(static_cast<unsigned>(
+ z >= -4 ? (z+4) % 7 : (z+5) % 7 + 6));
+}
+
+CONSTCD11
+inline
+weekday::weekday(unsigned wd) NOEXCEPT
+ : wd_(static_cast<decltype(wd_)>(wd))
+ {}
+
+CONSTCD11
+inline
+weekday::weekday(const sys_days& dp) NOEXCEPT
+ : wd_(weekday_from_days(dp.time_since_epoch().count()))
+ {}
+
+CONSTCD11
+inline
+weekday::weekday(const local_days& dp) NOEXCEPT
+ : wd_(weekday_from_days(dp.time_since_epoch().count()))
+ {}
+
+CONSTCD14 inline weekday& weekday::operator++() NOEXCEPT {if (++wd_ == 7) wd_ = 0; return *this;}
+CONSTCD14 inline weekday weekday::operator++(int) NOEXCEPT {auto tmp(*this); ++(*this); return tmp;}
+CONSTCD14 inline weekday& weekday::operator--() NOEXCEPT {if (wd_-- == 0) wd_ = 6; return *this;}
+CONSTCD14 inline weekday weekday::operator--(int) NOEXCEPT {auto tmp(*this); --(*this); return tmp;}
+
+CONSTCD14
+inline
+weekday&
+weekday::operator+=(const days& d) NOEXCEPT
+{
+ *this = *this + d;
+ return *this;
+}
+
+CONSTCD14
+inline
+weekday&
+weekday::operator-=(const days& d) NOEXCEPT
+{
+ *this = *this - d;
+ return *this;
+}
+
+CONSTCD11
+inline
+weekday::operator unsigned() const NOEXCEPT
+{
+ return static_cast<unsigned>(wd_);
+}
+
+CONSTCD11 inline bool weekday::ok() const NOEXCEPT {return wd_ <= 6;}
+
+CONSTCD11
+inline
+bool
+operator==(const weekday& x, const weekday& y) NOEXCEPT
+{
+ return static_cast<unsigned>(x) == static_cast<unsigned>(y);
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const weekday& x, const weekday& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+CONSTCD14
+inline
+days
+operator-(const weekday& x, const weekday& y) NOEXCEPT
+{
+ auto const diff = static_cast<unsigned>(x) - static_cast<unsigned>(y);
+ return days{diff <= 6 ? diff : diff + 7};
+}
+
+CONSTCD14
+inline
+weekday
+operator+(const weekday& x, const days& y) NOEXCEPT
+{
+ auto const wdu = static_cast<long long>(static_cast<unsigned>(x)) + y.count();
+ auto const wk = (wdu >= 0 ? wdu : wdu-6) / 7;
+ return weekday{static_cast<unsigned>(wdu - wk * 7)};
+}
+
+CONSTCD14
+inline
+weekday
+operator+(const days& x, const weekday& y) NOEXCEPT
+{
+ return y + x;
+}
+
+CONSTCD14
+inline
+weekday
+operator-(const weekday& x, const days& y) NOEXCEPT
+{
+ return x + -y;
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const weekday& wd)
+{
+ switch (static_cast<unsigned>(wd))
+ {
+ case 0:
+ os << "al-Aḥad";
+ break;
+ case 1:
+ os << "al-Ithnayn";
+ break;
+ case 2:
+ os << "ath-Thulāthā’";
+ break;
+ case 3:
+ os << "al-Arba‘ā’";
+ break;
+ case 4:
+ os << "al-Khamīs";
+ break;
+ case 5:
+ os << "al-Jum‘ah";
+ break;
+ case 6:
+ os << "as-Sabt";
+ break;
+ default:
+ os << static_cast<unsigned>(wd) << " is not a valid weekday";
+ break;
+ }
+ return os;
+}
+
+#if !defined(_MSC_VER) || (_MSC_VER >= 1900)
+inline namespace literals
+{
+
+CONSTCD11
+inline
+islamic::day
+operator "" _d(unsigned long long d) NOEXCEPT
+{
+ return islamic::day{static_cast<unsigned>(d)};
+}
+
+CONSTCD11
+inline
+islamic::year
+operator "" _y(unsigned long long y) NOEXCEPT
+{
+ return islamic::year(static_cast<int>(y));
+}
+#endif // !defined(_MSC_VER) || (_MSC_VER >= 1900)
+
+CONSTDATA islamic::last_spec last{};
+
+#if !defined(_MSC_VER) || (_MSC_VER >= 1900)
+} // inline namespace literals
+#endif
+
+// weekday_indexed
+
+CONSTCD11
+inline
+weekday
+weekday_indexed::weekday() const NOEXCEPT
+{
+ return islamic::weekday{static_cast<unsigned>(wd_)};
+}
+
+CONSTCD11 inline unsigned weekday_indexed::index() const NOEXCEPT {return index_;}
+
+CONSTCD11
+inline
+bool
+weekday_indexed::ok() const NOEXCEPT
+{
+ return weekday().ok() && 1 <= index_ && index_ <= 5;
+}
+
+CONSTCD11
+inline
+weekday_indexed::weekday_indexed(const islamic::weekday& wd, unsigned index) NOEXCEPT
+ : wd_(static_cast<decltype(wd_)>(static_cast<unsigned>(wd)))
+ , index_(static_cast<decltype(index_)>(index))
+ {}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const weekday_indexed& wdi)
+{
+ return os << wdi.weekday() << '[' << wdi.index() << ']';
+}
+
+CONSTCD11
+inline
+weekday_indexed
+weekday::operator[](unsigned index) const NOEXCEPT
+{
+ return {*this, index};
+}
+
+CONSTCD11
+inline
+bool
+operator==(const weekday_indexed& x, const weekday_indexed& y) NOEXCEPT
+{
+ return x.weekday() == y.weekday() && x.index() == y.index();
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const weekday_indexed& x, const weekday_indexed& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+// weekday_last
+
+CONSTCD11 inline islamic::weekday weekday_last::weekday() const NOEXCEPT {return wd_;}
+CONSTCD11 inline bool weekday_last::ok() const NOEXCEPT {return wd_.ok();}
+CONSTCD11 inline weekday_last::weekday_last(const islamic::weekday& wd) NOEXCEPT : wd_(wd) {}
+
+CONSTCD11
+inline
+bool
+operator==(const weekday_last& x, const weekday_last& y) NOEXCEPT
+{
+ return x.weekday() == y.weekday();
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const weekday_last& x, const weekday_last& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const weekday_last& wdl)
+{
+ return os << wdl.weekday() << "[last]";
+}
+
+CONSTCD11
+inline
+weekday_last
+weekday::operator[](last_spec) const NOEXCEPT
+{
+ return weekday_last{*this};
+}
+
+// year_month
+
+CONSTCD11
+inline
+year_month::year_month(const islamic::year& y, const islamic::month& m) NOEXCEPT
+ : y_(y)
+ , m_(m)
+ {}
+
+CONSTCD11 inline year year_month::year() const NOEXCEPT {return y_;}
+CONSTCD11 inline month year_month::month() const NOEXCEPT {return m_;}
+CONSTCD11 inline bool year_month::ok() const NOEXCEPT {return y_.ok() && m_.ok();}
+
+CONSTCD14
+inline
+year_month&
+year_month::operator+=(const months& dm) NOEXCEPT
+{
+ *this = *this + dm;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month&
+year_month::operator-=(const months& dm) NOEXCEPT
+{
+ *this = *this - dm;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month&
+year_month::operator+=(const years& dy) NOEXCEPT
+{
+ *this = *this + dy;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month&
+year_month::operator-=(const years& dy) NOEXCEPT
+{
+ *this = *this - dy;
+ return *this;
+}
+
+CONSTCD11
+inline
+bool
+operator==(const year_month& x, const year_month& y) NOEXCEPT
+{
+ return x.year() == y.year() && x.month() == y.month();
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const year_month& x, const year_month& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+CONSTCD11
+inline
+bool
+operator<(const year_month& x, const year_month& y) NOEXCEPT
+{
+ return x.year() < y.year() ? true
+ : (x.year() > y.year() ? false
+ : (x.month() < y.month()));
+}
+
+CONSTCD11
+inline
+bool
+operator>(const year_month& x, const year_month& y) NOEXCEPT
+{
+ return y < x;
+}
+
+CONSTCD11
+inline
+bool
+operator<=(const year_month& x, const year_month& y) NOEXCEPT
+{
+ return !(y < x);
+}
+
+CONSTCD11
+inline
+bool
+operator>=(const year_month& x, const year_month& y) NOEXCEPT
+{
+ return !(x < y);
+}
+
+CONSTCD14
+inline
+year_month
+operator+(const year_month& ym, const months& dm) NOEXCEPT
+{
+ auto dmi = static_cast<int>(static_cast<unsigned>(ym.month())) - 1 + dm.count();
+ auto dy = (dmi >= 0 ? dmi : dmi-11) / 12;
+ dmi = dmi - dy * 12 + 1;
+ return (ym.year() + years(dy)) / month(static_cast<unsigned>(dmi));
+}
+
+CONSTCD14
+inline
+year_month
+operator+(const months& dm, const year_month& ym) NOEXCEPT
+{
+ return ym + dm;
+}
+
+CONSTCD14
+inline
+year_month
+operator-(const year_month& ym, const months& dm) NOEXCEPT
+{
+ return ym + -dm;
+}
+
+CONSTCD11
+inline
+months
+operator-(const year_month& x, const year_month& y) NOEXCEPT
+{
+ return (x.year() - y.year()) +
+ months(static_cast<unsigned>(x.month()) - static_cast<unsigned>(y.month()));
+}
+
+CONSTCD11
+inline
+year_month
+operator+(const year_month& ym, const years& dy) NOEXCEPT
+{
+ return (ym.year() + dy) / ym.month();
+}
+
+CONSTCD11
+inline
+year_month
+operator+(const years& dy, const year_month& ym) NOEXCEPT
+{
+ return ym + dy;
+}
+
+CONSTCD11
+inline
+year_month
+operator-(const year_month& ym, const years& dy) NOEXCEPT
+{
+ return ym + -dy;
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year_month& ym)
+{
+ return os << ym.year() << '/' << ym.month();
+}
+
+// month_day
+
+CONSTCD11
+inline
+month_day::month_day(const islamic::month& m, const islamic::day& d) NOEXCEPT
+ : m_(m)
+ , d_(d)
+ {}
+
+CONSTCD11 inline islamic::month month_day::month() const NOEXCEPT {return m_;}
+CONSTCD11 inline islamic::day month_day::day() const NOEXCEPT {return d_;}
+
+CONSTCD14
+inline
+bool
+month_day::ok() const NOEXCEPT
+{
+ CONSTDATA islamic::day d[] =
+ {30_d, 29_d, 30_d, 29_d, 30_d, 29_d, 30_d, 29_d, 30_d, 29_d, 30_d, 30_d};
+ return m_.ok() && 1_d <= d_ && d_ <= d[static_cast<unsigned>(m_)-1];
+}
+
+CONSTCD11
+inline
+bool
+operator==(const month_day& x, const month_day& y) NOEXCEPT
+{
+ return x.month() == y.month() && x.day() == y.day();
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const month_day& x, const month_day& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+CONSTCD11
+inline
+bool
+operator<(const month_day& x, const month_day& y) NOEXCEPT
+{
+ return x.month() < y.month() ? true
+ : (x.month() > y.month() ? false
+ : (x.day() < y.day()));
+}
+
+CONSTCD11
+inline
+bool
+operator>(const month_day& x, const month_day& y) NOEXCEPT
+{
+ return y < x;
+}
+
+CONSTCD11
+inline
+bool
+operator<=(const month_day& x, const month_day& y) NOEXCEPT
+{
+ return !(y < x);
+}
+
+CONSTCD11
+inline
+bool
+operator>=(const month_day& x, const month_day& y) NOEXCEPT
+{
+ return !(x < y);
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const month_day& md)
+{
+ return os << md.month() << '/' << md.day();
+}
+
+// month_day_last
+
+CONSTCD11 inline month month_day_last::month() const NOEXCEPT {return m_;}
+CONSTCD11 inline bool month_day_last::ok() const NOEXCEPT {return m_.ok();}
+CONSTCD11 inline month_day_last::month_day_last(const islamic::month& m) NOEXCEPT : m_(m) {}
+
+CONSTCD11
+inline
+bool
+operator==(const month_day_last& x, const month_day_last& y) NOEXCEPT
+{
+ return x.month() == y.month();
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const month_day_last& x, const month_day_last& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+CONSTCD11
+inline
+bool
+operator<(const month_day_last& x, const month_day_last& y) NOEXCEPT
+{
+ return x.month() < y.month();
+}
+
+CONSTCD11
+inline
+bool
+operator>(const month_day_last& x, const month_day_last& y) NOEXCEPT
+{
+ return y < x;
+}
+
+CONSTCD11
+inline
+bool
+operator<=(const month_day_last& x, const month_day_last& y) NOEXCEPT
+{
+ return !(y < x);
+}
+
+CONSTCD11
+inline
+bool
+operator>=(const month_day_last& x, const month_day_last& y) NOEXCEPT
+{
+ return !(x < y);
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const month_day_last& mdl)
+{
+ return os << mdl.month() << "/last";
+}
+
+// month_weekday
+
+CONSTCD11
+inline
+month_weekday::month_weekday(const islamic::month& m,
+ const islamic::weekday_indexed& wdi) NOEXCEPT
+ : m_(m)
+ , wdi_(wdi)
+ {}
+
+CONSTCD11 inline month month_weekday::month() const NOEXCEPT {return m_;}
+
+CONSTCD11
+inline
+weekday_indexed
+month_weekday::weekday_indexed() const NOEXCEPT
+{
+ return wdi_;
+}
+
+CONSTCD11
+inline
+bool
+month_weekday::ok() const NOEXCEPT
+{
+ return m_.ok() && wdi_.ok();
+}
+
+CONSTCD11
+inline
+bool
+operator==(const month_weekday& x, const month_weekday& y) NOEXCEPT
+{
+ return x.month() == y.month() && x.weekday_indexed() == y.weekday_indexed();
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const month_weekday& x, const month_weekday& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const month_weekday& mwd)
+{
+ return os << mwd.month() << '/' << mwd.weekday_indexed();
+}
+
+// month_weekday_last
+
+CONSTCD11
+inline
+month_weekday_last::month_weekday_last(const islamic::month& m,
+ const islamic::weekday_last& wdl) NOEXCEPT
+ : m_(m)
+ , wdl_(wdl)
+ {}
+
+CONSTCD11 inline month month_weekday_last::month() const NOEXCEPT {return m_;}
+
+CONSTCD11
+inline
+weekday_last
+month_weekday_last::weekday_last() const NOEXCEPT
+{
+ return wdl_;
+}
+
+CONSTCD11
+inline
+bool
+month_weekday_last::ok() const NOEXCEPT
+{
+ return m_.ok() && wdl_.ok();
+}
+
+CONSTCD11
+inline
+bool
+operator==(const month_weekday_last& x, const month_weekday_last& y) NOEXCEPT
+{
+ return x.month() == y.month() && x.weekday_last() == y.weekday_last();
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const month_weekday_last& x, const month_weekday_last& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const month_weekday_last& mwdl)
+{
+ return os << mwdl.month() << '/' << mwdl.weekday_last();
+}
+
+// year_month_day_last
+
+CONSTCD11
+inline
+year_month_day_last::year_month_day_last(const islamic::year& y,
+ const islamic::month_day_last& mdl) NOEXCEPT
+ : y_(y)
+ , mdl_(mdl)
+ {}
+
+CONSTCD14
+inline
+year_month_day_last&
+year_month_day_last::operator+=(const months& m) NOEXCEPT
+{
+ *this = *this + m;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month_day_last&
+year_month_day_last::operator-=(const months& m) NOEXCEPT
+{
+ *this = *this - m;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month_day_last&
+year_month_day_last::operator+=(const years& y) NOEXCEPT
+{
+ *this = *this + y;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month_day_last&
+year_month_day_last::operator-=(const years& y) NOEXCEPT
+{
+ *this = *this - y;
+ return *this;
+}
+
+CONSTCD11 inline year year_month_day_last::year() const NOEXCEPT {return y_;}
+CONSTCD11 inline month year_month_day_last::month() const NOEXCEPT {return mdl_.month();}
+
+CONSTCD11
+inline
+month_day_last
+year_month_day_last::month_day_last() const NOEXCEPT
+{
+ return mdl_;
+}
+
+CONSTCD14
+inline
+day
+year_month_day_last::day() const NOEXCEPT
+{
+ CONSTDATA islamic::day d[] =
+ {30_d, 29_d, 30_d, 29_d, 30_d, 29_d, 30_d, 29_d, 30_d, 29_d, 30_d, 29_d};
+ return month() != islamic::month(12) || !y_.is_leap() ?
+ d[static_cast<unsigned>(month())-1] : 30_d;
+}
+
+CONSTCD14
+inline
+year_month_day_last::operator sys_days() const NOEXCEPT
+{
+ return sys_days(year()/month()/day());
+}
+
+CONSTCD14
+inline
+year_month_day_last::operator local_days() const NOEXCEPT
+{
+ return local_days(year()/month()/day());
+}
+
+CONSTCD11
+inline
+bool
+year_month_day_last::ok() const NOEXCEPT
+{
+ return y_.ok() && mdl_.ok();
+}
+
+CONSTCD11
+inline
+bool
+operator==(const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT
+{
+ return x.year() == y.year() && x.month_day_last() == y.month_day_last();
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+CONSTCD11
+inline
+bool
+operator<(const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT
+{
+ return x.year() < y.year() ? true
+ : (x.year() > y.year() ? false
+ : (x.month_day_last() < y.month_day_last()));
+}
+
+CONSTCD11
+inline
+bool
+operator>(const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT
+{
+ return y < x;
+}
+
+CONSTCD11
+inline
+bool
+operator<=(const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT
+{
+ return !(y < x);
+}
+
+CONSTCD11
+inline
+bool
+operator>=(const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT
+{
+ return !(x < y);
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year_month_day_last& ymdl)
+{
+ return os << ymdl.year() << '/' << ymdl.month_day_last();
+}
+
+CONSTCD14
+inline
+year_month_day_last
+operator+(const year_month_day_last& ymdl, const months& dm) NOEXCEPT
+{
+ return (ymdl.year() / ymdl.month() + dm) / last;
+}
+
+CONSTCD14
+inline
+year_month_day_last
+operator+(const months& dm, const year_month_day_last& ymdl) NOEXCEPT
+{
+ return ymdl + dm;
+}
+
+CONSTCD14
+inline
+year_month_day_last
+operator-(const year_month_day_last& ymdl, const months& dm) NOEXCEPT
+{
+ return ymdl + (-dm);
+}
+
+CONSTCD11
+inline
+year_month_day_last
+operator+(const year_month_day_last& ymdl, const years& dy) NOEXCEPT
+{
+ return {ymdl.year()+dy, ymdl.month_day_last()};
+}
+
+CONSTCD11
+inline
+year_month_day_last
+operator+(const years& dy, const year_month_day_last& ymdl) NOEXCEPT
+{
+ return ymdl + dy;
+}
+
+CONSTCD11
+inline
+year_month_day_last
+operator-(const year_month_day_last& ymdl, const years& dy) NOEXCEPT
+{
+ return ymdl + (-dy);
+}
+
+// year_month_day
+
+CONSTCD11
+inline
+year_month_day::year_month_day(const islamic::year& y, const islamic::month& m,
+ const islamic::day& d) NOEXCEPT
+ : y_(y)
+ , m_(m)
+ , d_(d)
+ {}
+
+CONSTCD14
+inline
+year_month_day::year_month_day(const year_month_day_last& ymdl) NOEXCEPT
+ : y_(ymdl.year())
+ , m_(ymdl.month())
+ , d_(ymdl.day())
+ {}
+
+CONSTCD14
+inline
+year_month_day::year_month_day(sys_days dp) NOEXCEPT
+ : year_month_day(from_days(dp.time_since_epoch()))
+ {}
+
+CONSTCD14
+inline
+year_month_day::year_month_day(local_days dp) NOEXCEPT
+ : year_month_day(from_days(dp.time_since_epoch()))
+ {}
+
+CONSTCD11 inline year year_month_day::year() const NOEXCEPT {return y_;}
+CONSTCD11 inline month year_month_day::month() const NOEXCEPT {return m_;}
+CONSTCD11 inline day year_month_day::day() const NOEXCEPT {return d_;}
+
+CONSTCD14
+inline
+year_month_day&
+year_month_day::operator+=(const months& m) NOEXCEPT
+{
+ *this = *this + m;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month_day&
+year_month_day::operator-=(const months& m) NOEXCEPT
+{
+ *this = *this - m;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month_day&
+year_month_day::operator+=(const years& y) NOEXCEPT
+{
+ *this = *this + y;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month_day&
+year_month_day::operator-=(const years& y) NOEXCEPT
+{
+ *this = *this - y;
+ return *this;
+}
+
+CONSTCD14
+inline
+days
+year_month_day::to_days() const NOEXCEPT
+{
+ static_assert(std::numeric_limits<unsigned>::digits >= 18,
+ "This algorithm has not been ported to a 16 bit unsigned integer");
+ static_assert(std::numeric_limits<int>::digits >= 20,
+ "This algorithm has not been ported to a 16 bit signed integer");
+ auto const y = static_cast<int>(y_) - 1;
+ auto const m = static_cast<unsigned>(m_);
+ auto const d = static_cast<unsigned>(d_);
+ auto const era = (y >= 0 ? y : y-29) / 30;
+ auto const yoe = static_cast<unsigned>(y - era * 30); // [0, 29]
+ auto const doy = 29*(m-1) + m/2 + d-1; // [0, 354]
+ auto const doe = yoe * 354 + (11*(yoe+1)+3)/30 + doy; // [0, 10630]
+ return days{era * 10631 + static_cast<int>(doe) - 492148};
+}
+
+CONSTCD14
+inline
+year_month_day::operator sys_days() const NOEXCEPT
+{
+ return sys_days{to_days()};
+}
+
+CONSTCD14
+inline
+year_month_day::operator local_days() const NOEXCEPT
+{
+ return local_days{to_days()};
+}
+
+CONSTCD14
+inline
+bool
+year_month_day::ok() const NOEXCEPT
+{
+ if (!(y_.ok() && m_.ok()))
+ return false;
+ return 1_d <= d_ && d_ <= (y_/m_/last).day();
+}
+
+CONSTCD11
+inline
+bool
+operator==(const year_month_day& x, const year_month_day& y) NOEXCEPT
+{
+ return x.year() == y.year() && x.month() == y.month() && x.day() == y.day();
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const year_month_day& x, const year_month_day& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+CONSTCD11
+inline
+bool
+operator<(const year_month_day& x, const year_month_day& y) NOEXCEPT
+{
+ return x.year() < y.year() ? true
+ : (x.year() > y.year() ? false
+ : (x.month() < y.month() ? true
+ : (x.month() > y.month() ? false
+ : (x.day() < y.day()))));
+}
+
+CONSTCD11
+inline
+bool
+operator>(const year_month_day& x, const year_month_day& y) NOEXCEPT
+{
+ return y < x;
+}
+
+CONSTCD11
+inline
+bool
+operator<=(const year_month_day& x, const year_month_day& y) NOEXCEPT
+{
+ return !(y < x);
+}
+
+CONSTCD11
+inline
+bool
+operator>=(const year_month_day& x, const year_month_day& y) NOEXCEPT
+{
+ return !(x < y);
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year_month_day& ymd)
+{
+ date::detail::save_ostream<CharT, Traits> _(os);
+ os.fill('0');
+ os.flags(std::ios::dec | std::ios::right);
+ os << ymd.year() << '-';
+ os.width(2);
+ os << static_cast<unsigned>(ymd.month()) << '-';
+ os << ymd.day();
+ return os;
+}
+
+CONSTCD14
+inline
+year_month_day
+year_month_day::from_days(days dp) NOEXCEPT
+{
+ static_assert(std::numeric_limits<unsigned>::digits >= 18,
+ "This algorithm has not been ported to a 16 bit unsigned integer");
+ static_assert(std::numeric_limits<int>::digits >= 20,
+ "This algorithm has not been ported to a 16 bit signed integer");
+ auto const z = dp.count() + 492148;
+ auto const era = (z >= 0 ? z : z - 10630) / 10631;
+ auto const doe = static_cast<unsigned>(z - era * 10631); // [0, 10630]
+ auto const yoe = (30*doe + 10646)/10631 - 1; // [0, 29]
+ auto const y = static_cast<sys_days::rep>(yoe) + era * 30 + 1;
+ auto const doy = doe - (yoe * 354 + (11*(yoe+1)+3)/30); // [0, 354]
+ auto const m = (11*doy + 330) / 325; // [1, 12]
+ auto const d = doy - (29*(m-1) + m/2) + 1; // [1, 30]
+ return year_month_day{islamic::year{y}, islamic::month(m), islamic::day(d)};
+}
+
+CONSTCD14
+inline
+year_month_day
+operator+(const year_month_day& ymd, const months& dm) NOEXCEPT
+{
+ return (ymd.year() / ymd.month() + dm) / ymd.day();
+}
+
+CONSTCD14
+inline
+year_month_day
+operator+(const months& dm, const year_month_day& ymd) NOEXCEPT
+{
+ return ymd + dm;
+}
+
+CONSTCD14
+inline
+year_month_day
+operator-(const year_month_day& ymd, const months& dm) NOEXCEPT
+{
+ return ymd + (-dm);
+}
+
+CONSTCD11
+inline
+year_month_day
+operator+(const year_month_day& ymd, const years& dy) NOEXCEPT
+{
+ return (ymd.year() + dy) / ymd.month() / ymd.day();
+}
+
+CONSTCD11
+inline
+year_month_day
+operator+(const years& dy, const year_month_day& ymd) NOEXCEPT
+{
+ return ymd + dy;
+}
+
+CONSTCD11
+inline
+year_month_day
+operator-(const year_month_day& ymd, const years& dy) NOEXCEPT
+{
+ return ymd + (-dy);
+}
+
+// year_month_weekday
+
+CONSTCD11
+inline
+year_month_weekday::year_month_weekday(const islamic::year& y, const islamic::month& m,
+ const islamic::weekday_indexed& wdi)
+ NOEXCEPT
+ : y_(y)
+ , m_(m)
+ , wdi_(wdi)
+ {}
+
+CONSTCD14
+inline
+year_month_weekday::year_month_weekday(const sys_days& dp) NOEXCEPT
+ : year_month_weekday(from_days(dp.time_since_epoch()))
+ {}
+
+CONSTCD14
+inline
+year_month_weekday::year_month_weekday(const local_days& dp) NOEXCEPT
+ : year_month_weekday(from_days(dp.time_since_epoch()))
+ {}
+
+CONSTCD14
+inline
+year_month_weekday&
+year_month_weekday::operator+=(const months& m) NOEXCEPT
+{
+ *this = *this + m;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month_weekday&
+year_month_weekday::operator-=(const months& m) NOEXCEPT
+{
+ *this = *this - m;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month_weekday&
+year_month_weekday::operator+=(const years& y) NOEXCEPT
+{
+ *this = *this + y;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month_weekday&
+year_month_weekday::operator-=(const years& y) NOEXCEPT
+{
+ *this = *this - y;
+ return *this;
+}
+
+CONSTCD11 inline year year_month_weekday::year() const NOEXCEPT {return y_;}
+CONSTCD11 inline month year_month_weekday::month() const NOEXCEPT {return m_;}
+
+CONSTCD11
+inline
+weekday
+year_month_weekday::weekday() const NOEXCEPT
+{
+ return wdi_.weekday();
+}
+
+CONSTCD11
+inline
+unsigned
+year_month_weekday::index() const NOEXCEPT
+{
+ return wdi_.index();
+}
+
+CONSTCD11
+inline
+weekday_indexed
+year_month_weekday::weekday_indexed() const NOEXCEPT
+{
+ return wdi_;
+}
+
+CONSTCD14
+inline
+year_month_weekday::operator sys_days() const NOEXCEPT
+{
+ return sys_days{to_days()};
+}
+
+CONSTCD14
+inline
+year_month_weekday::operator local_days() const NOEXCEPT
+{
+ return local_days{to_days()};
+}
+
+CONSTCD14
+inline
+bool
+year_month_weekday::ok() const NOEXCEPT
+{
+ if (!y_.ok() || !m_.ok() || !wdi_.weekday().ok() || wdi_.index() < 1)
+ return false;
+ if (wdi_.index() <= 4)
+ return true;
+ auto d2 = wdi_.weekday() - islamic::weekday(y_/m_/1) + days((wdi_.index()-1)*7 + 1);
+ return static_cast<unsigned>(d2.count()) <= static_cast<unsigned>((y_/m_/last).day());
+}
+
+CONSTCD14
+inline
+year_month_weekday
+year_month_weekday::from_days(days d) NOEXCEPT
+{
+ sys_days dp{d};
+ auto const wd = islamic::weekday(dp);
+ auto const ymd = year_month_day(dp);
+ return {ymd.year(), ymd.month(), wd[(static_cast<unsigned>(ymd.day())-1)/7+1]};
+}
+
+CONSTCD14
+inline
+days
+year_month_weekday::to_days() const NOEXCEPT
+{
+ auto d = sys_days(y_/m_/1);
+ return (d + (wdi_.weekday() - islamic::weekday(d) + days{(wdi_.index()-1)*7})
+ ).time_since_epoch();
+}
+
+CONSTCD11
+inline
+bool
+operator==(const year_month_weekday& x, const year_month_weekday& y) NOEXCEPT
+{
+ return x.year() == y.year() && x.month() == y.month() &&
+ x.weekday_indexed() == y.weekday_indexed();
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const year_month_weekday& x, const year_month_weekday& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year_month_weekday& ymwdi)
+{
+ return os << ymwdi.year() << '/' << ymwdi.month()
+ << '/' << ymwdi.weekday_indexed();
+}
+
+CONSTCD14
+inline
+year_month_weekday
+operator+(const year_month_weekday& ymwd, const months& dm) NOEXCEPT
+{
+ return (ymwd.year() / ymwd.month() + dm) / ymwd.weekday_indexed();
+}
+
+CONSTCD14
+inline
+year_month_weekday
+operator+(const months& dm, const year_month_weekday& ymwd) NOEXCEPT
+{
+ return ymwd + dm;
+}
+
+CONSTCD14
+inline
+year_month_weekday
+operator-(const year_month_weekday& ymwd, const months& dm) NOEXCEPT
+{
+ return ymwd + (-dm);
+}
+
+CONSTCD11
+inline
+year_month_weekday
+operator+(const year_month_weekday& ymwd, const years& dy) NOEXCEPT
+{
+ return {ymwd.year()+dy, ymwd.month(), ymwd.weekday_indexed()};
+}
+
+CONSTCD11
+inline
+year_month_weekday
+operator+(const years& dy, const year_month_weekday& ymwd) NOEXCEPT
+{
+ return ymwd + dy;
+}
+
+CONSTCD11
+inline
+year_month_weekday
+operator-(const year_month_weekday& ymwd, const years& dy) NOEXCEPT
+{
+ return ymwd + (-dy);
+}
+
+// year_month_weekday_last
+
+CONSTCD11
+inline
+year_month_weekday_last::year_month_weekday_last(const islamic::year& y,
+ const islamic::month& m,
+ const islamic::weekday_last& wdl) NOEXCEPT
+ : y_(y)
+ , m_(m)
+ , wdl_(wdl)
+ {}
+
+CONSTCD14
+inline
+year_month_weekday_last&
+year_month_weekday_last::operator+=(const months& m) NOEXCEPT
+{
+ *this = *this + m;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month_weekday_last&
+year_month_weekday_last::operator-=(const months& m) NOEXCEPT
+{
+ *this = *this - m;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month_weekday_last&
+year_month_weekday_last::operator+=(const years& y) NOEXCEPT
+{
+ *this = *this + y;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month_weekday_last&
+year_month_weekday_last::operator-=(const years& y) NOEXCEPT
+{
+ *this = *this - y;
+ return *this;
+}
+
+CONSTCD11 inline year year_month_weekday_last::year() const NOEXCEPT {return y_;}
+CONSTCD11 inline month year_month_weekday_last::month() const NOEXCEPT {return m_;}
+
+CONSTCD11
+inline
+weekday
+year_month_weekday_last::weekday() const NOEXCEPT
+{
+ return wdl_.weekday();
+}
+
+CONSTCD11
+inline
+weekday_last
+year_month_weekday_last::weekday_last() const NOEXCEPT
+{
+ return wdl_;
+}
+
+CONSTCD14
+inline
+year_month_weekday_last::operator sys_days() const NOEXCEPT
+{
+ return sys_days{to_days()};
+}
+
+CONSTCD14
+inline
+year_month_weekday_last::operator local_days() const NOEXCEPT
+{
+ return local_days{to_days()};
+}
+
+CONSTCD11
+inline
+bool
+year_month_weekday_last::ok() const NOEXCEPT
+{
+ return y_.ok() && m_.ok() && wdl_.ok();
+}
+
+CONSTCD14
+inline
+days
+year_month_weekday_last::to_days() const NOEXCEPT
+{
+ auto const d = sys_days(y_/m_/last);
+ return (d - (islamic::weekday{d} - wdl_.weekday())).time_since_epoch();
+}
+
+CONSTCD11
+inline
+bool
+operator==(const year_month_weekday_last& x, const year_month_weekday_last& y) NOEXCEPT
+{
+ return x.year() == y.year() && x.month() == y.month() &&
+ x.weekday_last() == y.weekday_last();
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const year_month_weekday_last& x, const year_month_weekday_last& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year_month_weekday_last& ymwdl)
+{
+ return os << ymwdl.year() << '/' << ymwdl.month() << '/' << ymwdl.weekday_last();
+}
+
+CONSTCD14
+inline
+year_month_weekday_last
+operator+(const year_month_weekday_last& ymwdl, const months& dm) NOEXCEPT
+{
+ return (ymwdl.year() / ymwdl.month() + dm) / ymwdl.weekday_last();
+}
+
+CONSTCD14
+inline
+year_month_weekday_last
+operator+(const months& dm, const year_month_weekday_last& ymwdl) NOEXCEPT
+{
+ return ymwdl + dm;
+}
+
+CONSTCD14
+inline
+year_month_weekday_last
+operator-(const year_month_weekday_last& ymwdl, const months& dm) NOEXCEPT
+{
+ return ymwdl + (-dm);
+}
+
+CONSTCD11
+inline
+year_month_weekday_last
+operator+(const year_month_weekday_last& ymwdl, const years& dy) NOEXCEPT
+{
+ return {ymwdl.year()+dy, ymwdl.month(), ymwdl.weekday_last()};
+}
+
+CONSTCD11
+inline
+year_month_weekday_last
+operator+(const years& dy, const year_month_weekday_last& ymwdl) NOEXCEPT
+{
+ return ymwdl + dy;
+}
+
+CONSTCD11
+inline
+year_month_weekday_last
+operator-(const year_month_weekday_last& ymwdl, const years& dy) NOEXCEPT
+{
+ return ymwdl + (-dy);
+}
+
+// year_month from operator/()
+
+CONSTCD11
+inline
+year_month
+operator/(const year& y, const month& m) NOEXCEPT
+{
+ return {y, m};
+}
+
+CONSTCD11
+inline
+year_month
+operator/(const year& y, int m) NOEXCEPT
+{
+ return y / month(static_cast<unsigned>(m));
+}
+
+// month_day from operator/()
+
+CONSTCD11
+inline
+month_day
+operator/(const month& m, const day& d) NOEXCEPT
+{
+ return {m, d};
+}
+
+CONSTCD11
+inline
+month_day
+operator/(const day& d, const month& m) NOEXCEPT
+{
+ return m / d;
+}
+
+CONSTCD11
+inline
+month_day
+operator/(const month& m, int d) NOEXCEPT
+{
+ return m / day(static_cast<unsigned>(d));
+}
+
+CONSTCD11
+inline
+month_day
+operator/(int m, const day& d) NOEXCEPT
+{
+ return month(static_cast<unsigned>(m)) / d;
+}
+
+CONSTCD11 inline month_day operator/(const day& d, int m) NOEXCEPT {return m / d;}
+
+// month_day_last from operator/()
+
+CONSTCD11
+inline
+month_day_last
+operator/(const month& m, last_spec) NOEXCEPT
+{
+ return month_day_last{m};
+}
+
+CONSTCD11
+inline
+month_day_last
+operator/(last_spec, const month& m) NOEXCEPT
+{
+ return m/last;
+}
+
+CONSTCD11
+inline
+month_day_last
+operator/(int m, last_spec) NOEXCEPT
+{
+ return month(static_cast<unsigned>(m))/last;
+}
+
+CONSTCD11
+inline
+month_day_last
+operator/(last_spec, int m) NOEXCEPT
+{
+ return m/last;
+}
+
+// month_weekday from operator/()
+
+CONSTCD11
+inline
+month_weekday
+operator/(const month& m, const weekday_indexed& wdi) NOEXCEPT
+{
+ return {m, wdi};
+}
+
+CONSTCD11
+inline
+month_weekday
+operator/(const weekday_indexed& wdi, const month& m) NOEXCEPT
+{
+ return m / wdi;
+}
+
+CONSTCD11
+inline
+month_weekday
+operator/(int m, const weekday_indexed& wdi) NOEXCEPT
+{
+ return month(static_cast<unsigned>(m)) / wdi;
+}
+
+CONSTCD11
+inline
+month_weekday
+operator/(const weekday_indexed& wdi, int m) NOEXCEPT
+{
+ return m / wdi;
+}
+
+// month_weekday_last from operator/()
+
+CONSTCD11
+inline
+month_weekday_last
+operator/(const month& m, const weekday_last& wdl) NOEXCEPT
+{
+ return {m, wdl};
+}
+
+CONSTCD11
+inline
+month_weekday_last
+operator/(const weekday_last& wdl, const month& m) NOEXCEPT
+{
+ return m / wdl;
+}
+
+CONSTCD11
+inline
+month_weekday_last
+operator/(int m, const weekday_last& wdl) NOEXCEPT
+{
+ return month(static_cast<unsigned>(m)) / wdl;
+}
+
+CONSTCD11
+inline
+month_weekday_last
+operator/(const weekday_last& wdl, int m) NOEXCEPT
+{
+ return m / wdl;
+}
+
+// year_month_day from operator/()
+
+CONSTCD11
+inline
+year_month_day
+operator/(const year_month& ym, const day& d) NOEXCEPT
+{
+ return {ym.year(), ym.month(), d};
+}
+
+CONSTCD11
+inline
+year_month_day
+operator/(const year_month& ym, int d) NOEXCEPT
+{
+ return ym / day(static_cast<unsigned>(d));
+}
+
+CONSTCD11
+inline
+year_month_day
+operator/(const year& y, const month_day& md) NOEXCEPT
+{
+ return y / md.month() / md.day();
+}
+
+CONSTCD11
+inline
+year_month_day
+operator/(int y, const month_day& md) NOEXCEPT
+{
+ return year(y) / md;
+}
+
+CONSTCD11
+inline
+year_month_day
+operator/(const month_day& md, const year& y) NOEXCEPT
+{
+ return y / md;
+}
+
+CONSTCD11
+inline
+year_month_day
+operator/(const month_day& md, int y) NOEXCEPT
+{
+ return year(y) / md;
+}
+
+// year_month_day_last from operator/()
+
+CONSTCD11
+inline
+year_month_day_last
+operator/(const year_month& ym, last_spec) NOEXCEPT
+{
+ return {ym.year(), month_day_last{ym.month()}};
+}
+
+CONSTCD11
+inline
+year_month_day_last
+operator/(const year& y, const month_day_last& mdl) NOEXCEPT
+{
+ return {y, mdl};
+}
+
+CONSTCD11
+inline
+year_month_day_last
+operator/(int y, const month_day_last& mdl) NOEXCEPT
+{
+ return year(y) / mdl;
+}
+
+CONSTCD11
+inline
+year_month_day_last
+operator/(const month_day_last& mdl, const year& y) NOEXCEPT
+{
+ return y / mdl;
+}
+
+CONSTCD11
+inline
+year_month_day_last
+operator/(const month_day_last& mdl, int y) NOEXCEPT
+{
+ return year(y) / mdl;
+}
+
+// year_month_weekday from operator/()
+
+CONSTCD11
+inline
+year_month_weekday
+operator/(const year_month& ym, const weekday_indexed& wdi) NOEXCEPT
+{
+ return {ym.year(), ym.month(), wdi};
+}
+
+CONSTCD11
+inline
+year_month_weekday
+operator/(const year& y, const month_weekday& mwd) NOEXCEPT
+{
+ return {y, mwd.month(), mwd.weekday_indexed()};
+}
+
+CONSTCD11
+inline
+year_month_weekday
+operator/(int y, const month_weekday& mwd) NOEXCEPT
+{
+ return year(y) / mwd;
+}
+
+CONSTCD11
+inline
+year_month_weekday
+operator/(const month_weekday& mwd, const year& y) NOEXCEPT
+{
+ return y / mwd;
+}
+
+CONSTCD11
+inline
+year_month_weekday
+operator/(const month_weekday& mwd, int y) NOEXCEPT
+{
+ return year(y) / mwd;
+}
+
+// year_month_weekday_last from operator/()
+
+CONSTCD11
+inline
+year_month_weekday_last
+operator/(const year_month& ym, const weekday_last& wdl) NOEXCEPT
+{
+ return {ym.year(), ym.month(), wdl};
+}
+
+CONSTCD11
+inline
+year_month_weekday_last
+operator/(const year& y, const month_weekday_last& mwdl) NOEXCEPT
+{
+ return {y, mwdl.month(), mwdl.weekday_last()};
+}
+
+CONSTCD11
+inline
+year_month_weekday_last
+operator/(int y, const month_weekday_last& mwdl) NOEXCEPT
+{
+ return year(y) / mwdl;
+}
+
+CONSTCD11
+inline
+year_month_weekday_last
+operator/(const month_weekday_last& mwdl, const year& y) NOEXCEPT
+{
+ return y / mwdl;
+}
+
+CONSTCD11
+inline
+year_month_weekday_last
+operator/(const month_weekday_last& mwdl, int y) NOEXCEPT
+{
+ return year(y) / mwdl;
+}
+
+} // namespace islamic
+
+#endif // ISLAMIC_H
diff --git a/src/third-party/date/include/date/iso_week.h b/src/third-party/date/include/date/iso_week.h
new file mode 100644
index 0000000..4a0a4a9
--- /dev/null
+++ b/src/third-party/date/include/date/iso_week.h
@@ -0,0 +1,1751 @@
+#ifndef ISO_WEEK_H
+#define ISO_WEEK_H
+
+// The MIT License (MIT)
+//
+// Copyright (c) 2015, 2016, 2017 Howard Hinnant
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+
+#include "date.h"
+
+#include <climits>
+
+namespace iso_week
+{
+
+// y/wn/wd
+// wn/wd/y
+// wd/wn/y
+
+using days = date::days;
+using weeks = date::weeks;
+using years = date::years;
+
+// time_point
+
+using sys_days = date::sys_days;
+using local_days = date::local_days;
+
+// types
+
+struct last_week
+{
+ explicit last_week() = default;
+};
+
+class weekday;
+class weeknum;
+class year;
+
+class year_weeknum;
+class year_lastweek;
+class weeknum_weekday;
+class lastweek_weekday;
+
+class year_weeknum_weekday;
+class year_lastweek_weekday;
+
+// date composition operators
+
+CONSTCD11 year_weeknum operator/(const year& y, const weeknum& wn) NOEXCEPT;
+CONSTCD11 year_weeknum operator/(const year& y, int wn) NOEXCEPT;
+
+CONSTCD11 year_lastweek operator/(const year& y, last_week wn) NOEXCEPT;
+
+CONSTCD11 weeknum_weekday operator/(const weeknum& wn, const weekday& wd) NOEXCEPT;
+CONSTCD11 weeknum_weekday operator/(const weeknum& wn, int wd) NOEXCEPT;
+CONSTCD11 weeknum_weekday operator/(const weekday& wd, const weeknum& wn) NOEXCEPT;
+CONSTCD11 weeknum_weekday operator/(const weekday& wd, int wn) NOEXCEPT;
+
+CONSTCD11 lastweek_weekday operator/(const last_week& wn, const weekday& wd) NOEXCEPT;
+CONSTCD11 lastweek_weekday operator/(const last_week& wn, int wd) NOEXCEPT;
+CONSTCD11 lastweek_weekday operator/(const weekday& wd, const last_week& wn) NOEXCEPT;
+
+CONSTCD11 year_weeknum_weekday operator/(const year_weeknum& ywn, const weekday& wd) NOEXCEPT;
+CONSTCD11 year_weeknum_weekday operator/(const year_weeknum& ywn, int wd) NOEXCEPT;
+CONSTCD11 year_weeknum_weekday operator/(const weeknum_weekday& wnwd, const year& y) NOEXCEPT;
+CONSTCD11 year_weeknum_weekday operator/(const weeknum_weekday& wnwd, int y) NOEXCEPT;
+
+CONSTCD11 year_lastweek_weekday operator/(const year_lastweek& ylw, const weekday& wd) NOEXCEPT;
+CONSTCD11 year_lastweek_weekday operator/(const year_lastweek& ylw, int wd) NOEXCEPT;
+
+CONSTCD11 year_lastweek_weekday operator/(const lastweek_weekday& lwwd, const year& y) NOEXCEPT;
+CONSTCD11 year_lastweek_weekday operator/(const lastweek_weekday& lwwd, int y) NOEXCEPT;
+
+// weekday
+
+class weekday
+{
+ unsigned char wd_;
+public:
+ explicit CONSTCD11 weekday(unsigned wd) NOEXCEPT;
+ CONSTCD11 weekday(date::weekday wd) NOEXCEPT;
+ explicit weekday(int) = delete;
+ CONSTCD11 weekday(const sys_days& dp) NOEXCEPT;
+ CONSTCD11 explicit weekday(const local_days& dp) NOEXCEPT;
+
+ weekday& operator++() NOEXCEPT;
+ weekday operator++(int) NOEXCEPT;
+ weekday& operator--() NOEXCEPT;
+ weekday operator--(int) NOEXCEPT;
+
+ weekday& operator+=(const days& d) NOEXCEPT;
+ weekday& operator-=(const days& d) NOEXCEPT;
+
+ CONSTCD11 explicit operator unsigned() const NOEXCEPT;
+ CONSTCD11 operator date::weekday() const NOEXCEPT;
+ CONSTCD11 bool ok() const NOEXCEPT;
+
+private:
+ static CONSTCD11 unsigned char weekday_from_days(int z) NOEXCEPT;
+ static CONSTCD11 unsigned char to_iso_encoding(unsigned char) NOEXCEPT;
+ static CONSTCD11 unsigned from_iso_encoding(unsigned) NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const weekday& x, const weekday& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const weekday& x, const weekday& y) NOEXCEPT;
+
+CONSTCD14 weekday operator+(const weekday& x, const days& y) NOEXCEPT;
+CONSTCD14 weekday operator+(const days& x, const weekday& y) NOEXCEPT;
+CONSTCD14 weekday operator-(const weekday& x, const days& y) NOEXCEPT;
+CONSTCD14 days operator-(const weekday& x, const weekday& y) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const weekday& wd);
+
+// year
+
+class year
+{
+ short y_;
+
+public:
+ explicit CONSTCD11 year(int y) NOEXCEPT;
+
+ year& operator++() NOEXCEPT;
+ year operator++(int) NOEXCEPT;
+ year& operator--() NOEXCEPT;
+ year operator--(int) NOEXCEPT;
+
+ year& operator+=(const years& y) NOEXCEPT;
+ year& operator-=(const years& y) NOEXCEPT;
+
+ CONSTCD11 explicit operator int() const NOEXCEPT;
+ CONSTCD11 bool ok() const NOEXCEPT;
+
+ static CONSTCD11 year min() NOEXCEPT;
+ static CONSTCD11 year max() NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const year& x, const year& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const year& x, const year& y) NOEXCEPT;
+CONSTCD11 bool operator< (const year& x, const year& y) NOEXCEPT;
+CONSTCD11 bool operator> (const year& x, const year& y) NOEXCEPT;
+CONSTCD11 bool operator<=(const year& x, const year& y) NOEXCEPT;
+CONSTCD11 bool operator>=(const year& x, const year& y) NOEXCEPT;
+
+CONSTCD11 year operator+(const year& x, const years& y) NOEXCEPT;
+CONSTCD11 year operator+(const years& x, const year& y) NOEXCEPT;
+CONSTCD11 year operator-(const year& x, const years& y) NOEXCEPT;
+CONSTCD11 years operator-(const year& x, const year& y) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year& y);
+
+// weeknum
+
+class weeknum
+{
+ unsigned char wn_;
+
+public:
+ explicit CONSTCD11 weeknum(unsigned wn) NOEXCEPT;
+
+ weeknum& operator++() NOEXCEPT;
+ weeknum operator++(int) NOEXCEPT;
+ weeknum& operator--() NOEXCEPT;
+ weeknum operator--(int) NOEXCEPT;
+
+ weeknum& operator+=(const weeks& y) NOEXCEPT;
+ weeknum& operator-=(const weeks& y) NOEXCEPT;
+
+ CONSTCD11 explicit operator unsigned() const NOEXCEPT;
+ CONSTCD11 bool ok() const NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const weeknum& x, const weeknum& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const weeknum& x, const weeknum& y) NOEXCEPT;
+CONSTCD11 bool operator< (const weeknum& x, const weeknum& y) NOEXCEPT;
+CONSTCD11 bool operator> (const weeknum& x, const weeknum& y) NOEXCEPT;
+CONSTCD11 bool operator<=(const weeknum& x, const weeknum& y) NOEXCEPT;
+CONSTCD11 bool operator>=(const weeknum& x, const weeknum& y) NOEXCEPT;
+
+CONSTCD11 weeknum operator+(const weeknum& x, const weeks& y) NOEXCEPT;
+CONSTCD11 weeknum operator+(const weeks& x, const weeknum& y) NOEXCEPT;
+CONSTCD11 weeknum operator-(const weeknum& x, const weeks& y) NOEXCEPT;
+CONSTCD11 weeks operator-(const weeknum& x, const weeknum& y) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const weeknum& wn);
+
+// year_weeknum
+
+class year_weeknum
+{
+ iso_week::year y_;
+ iso_week::weeknum wn_;
+
+public:
+ CONSTCD11 year_weeknum(const iso_week::year& y, const iso_week::weeknum& wn) NOEXCEPT;
+
+ CONSTCD11 iso_week::year year() const NOEXCEPT;
+ CONSTCD11 iso_week::weeknum weeknum() const NOEXCEPT;
+
+ year_weeknum& operator+=(const years& dy) NOEXCEPT;
+ year_weeknum& operator-=(const years& dy) NOEXCEPT;
+
+ CONSTCD11 bool ok() const NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const year_weeknum& x, const year_weeknum& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const year_weeknum& x, const year_weeknum& y) NOEXCEPT;
+CONSTCD11 bool operator< (const year_weeknum& x, const year_weeknum& y) NOEXCEPT;
+CONSTCD11 bool operator> (const year_weeknum& x, const year_weeknum& y) NOEXCEPT;
+CONSTCD11 bool operator<=(const year_weeknum& x, const year_weeknum& y) NOEXCEPT;
+CONSTCD11 bool operator>=(const year_weeknum& x, const year_weeknum& y) NOEXCEPT;
+
+CONSTCD11 year_weeknum operator+(const year_weeknum& ym, const years& dy) NOEXCEPT;
+CONSTCD11 year_weeknum operator+(const years& dy, const year_weeknum& ym) NOEXCEPT;
+CONSTCD11 year_weeknum operator-(const year_weeknum& ym, const years& dy) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year_weeknum& ym);
+
+// year_lastweek
+
+class year_lastweek
+{
+ iso_week::year y_;
+
+public:
+ CONSTCD11 explicit year_lastweek(const iso_week::year& y) NOEXCEPT;
+
+ CONSTCD11 iso_week::year year() const NOEXCEPT;
+ CONSTCD14 iso_week::weeknum weeknum() const NOEXCEPT;
+
+ year_lastweek& operator+=(const years& dy) NOEXCEPT;
+ year_lastweek& operator-=(const years& dy) NOEXCEPT;
+
+ CONSTCD11 bool ok() const NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const year_lastweek& x, const year_lastweek& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const year_lastweek& x, const year_lastweek& y) NOEXCEPT;
+CONSTCD11 bool operator< (const year_lastweek& x, const year_lastweek& y) NOEXCEPT;
+CONSTCD11 bool operator> (const year_lastweek& x, const year_lastweek& y) NOEXCEPT;
+CONSTCD11 bool operator<=(const year_lastweek& x, const year_lastweek& y) NOEXCEPT;
+CONSTCD11 bool operator>=(const year_lastweek& x, const year_lastweek& y) NOEXCEPT;
+
+CONSTCD11 year_lastweek operator+(const year_lastweek& ym, const years& dy) NOEXCEPT;
+CONSTCD11 year_lastweek operator+(const years& dy, const year_lastweek& ym) NOEXCEPT;
+CONSTCD11 year_lastweek operator-(const year_lastweek& ym, const years& dy) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year_lastweek& ym);
+
+// weeknum_weekday
+
+class weeknum_weekday
+{
+ iso_week::weeknum wn_;
+ iso_week::weekday wd_;
+
+public:
+ CONSTCD11 weeknum_weekday(const iso_week::weeknum& wn,
+ const iso_week::weekday& wd) NOEXCEPT;
+
+ CONSTCD11 iso_week::weeknum weeknum() const NOEXCEPT;
+ CONSTCD11 iso_week::weekday weekday() const NOEXCEPT;
+
+ CONSTCD14 bool ok() const NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const weeknum_weekday& x, const weeknum_weekday& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const weeknum_weekday& x, const weeknum_weekday& y) NOEXCEPT;
+CONSTCD11 bool operator< (const weeknum_weekday& x, const weeknum_weekday& y) NOEXCEPT;
+CONSTCD11 bool operator> (const weeknum_weekday& x, const weeknum_weekday& y) NOEXCEPT;
+CONSTCD11 bool operator<=(const weeknum_weekday& x, const weeknum_weekday& y) NOEXCEPT;
+CONSTCD11 bool operator>=(const weeknum_weekday& x, const weeknum_weekday& y) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const weeknum_weekday& md);
+
+// lastweek_weekday
+
+class lastweek_weekday
+{
+ iso_week::weekday wd_;
+
+public:
+ CONSTCD11 explicit lastweek_weekday(const iso_week::weekday& wd) NOEXCEPT;
+
+ CONSTCD11 iso_week::weekday weekday() const NOEXCEPT;
+
+ CONSTCD14 bool ok() const NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const lastweek_weekday& x, const lastweek_weekday& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const lastweek_weekday& x, const lastweek_weekday& y) NOEXCEPT;
+CONSTCD11 bool operator< (const lastweek_weekday& x, const lastweek_weekday& y) NOEXCEPT;
+CONSTCD11 bool operator> (const lastweek_weekday& x, const lastweek_weekday& y) NOEXCEPT;
+CONSTCD11 bool operator<=(const lastweek_weekday& x, const lastweek_weekday& y) NOEXCEPT;
+CONSTCD11 bool operator>=(const lastweek_weekday& x, const lastweek_weekday& y) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const lastweek_weekday& md);
+
+// year_lastweek_weekday
+
+class year_lastweek_weekday
+{
+ iso_week::year y_;
+ iso_week::weekday wd_;
+
+public:
+ CONSTCD11 year_lastweek_weekday(const iso_week::year& y,
+ const iso_week::weekday& wd) NOEXCEPT;
+
+ year_lastweek_weekday& operator+=(const years& y) NOEXCEPT;
+ year_lastweek_weekday& operator-=(const years& y) NOEXCEPT;
+
+ CONSTCD11 iso_week::year year() const NOEXCEPT;
+ CONSTCD14 iso_week::weeknum weeknum() const NOEXCEPT;
+ CONSTCD11 iso_week::weekday weekday() const NOEXCEPT;
+
+ CONSTCD14 operator sys_days() const NOEXCEPT;
+ CONSTCD14 explicit operator local_days() const NOEXCEPT;
+ CONSTCD11 bool ok() const NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const year_lastweek_weekday& x, const year_lastweek_weekday& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const year_lastweek_weekday& x, const year_lastweek_weekday& y) NOEXCEPT;
+CONSTCD11 bool operator< (const year_lastweek_weekday& x, const year_lastweek_weekday& y) NOEXCEPT;
+CONSTCD11 bool operator> (const year_lastweek_weekday& x, const year_lastweek_weekday& y) NOEXCEPT;
+CONSTCD11 bool operator<=(const year_lastweek_weekday& x, const year_lastweek_weekday& y) NOEXCEPT;
+CONSTCD11 bool operator>=(const year_lastweek_weekday& x, const year_lastweek_weekday& y) NOEXCEPT;
+
+CONSTCD11 year_lastweek_weekday operator+(const year_lastweek_weekday& ywnwd, const years& y) NOEXCEPT;
+CONSTCD11 year_lastweek_weekday operator+(const years& y, const year_lastweek_weekday& ywnwd) NOEXCEPT;
+CONSTCD11 year_lastweek_weekday operator-(const year_lastweek_weekday& ywnwd, const years& y) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year_lastweek_weekday& ywnwd);
+
+// class year_weeknum_weekday
+
+class year_weeknum_weekday
+{
+ iso_week::year y_;
+ iso_week::weeknum wn_;
+ iso_week::weekday wd_;
+
+public:
+ CONSTCD11 year_weeknum_weekday(const iso_week::year& y, const iso_week::weeknum& wn,
+ const iso_week::weekday& wd) NOEXCEPT;
+ CONSTCD14 year_weeknum_weekday(const year_lastweek_weekday& ylwwd) NOEXCEPT;
+ CONSTCD14 year_weeknum_weekday(const sys_days& dp) NOEXCEPT;
+ CONSTCD14 explicit year_weeknum_weekday(const local_days& dp) NOEXCEPT;
+
+ year_weeknum_weekday& operator+=(const years& y) NOEXCEPT;
+ year_weeknum_weekday& operator-=(const years& y) NOEXCEPT;
+
+ CONSTCD11 iso_week::year year() const NOEXCEPT;
+ CONSTCD11 iso_week::weeknum weeknum() const NOEXCEPT;
+ CONSTCD11 iso_week::weekday weekday() const NOEXCEPT;
+
+ CONSTCD14 operator sys_days() const NOEXCEPT;
+ CONSTCD14 explicit operator local_days() const NOEXCEPT;
+ CONSTCD14 bool ok() const NOEXCEPT;
+
+private:
+ static CONSTCD14 year_weeknum_weekday from_days(days dp) NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const year_weeknum_weekday& x, const year_weeknum_weekday& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const year_weeknum_weekday& x, const year_weeknum_weekday& y) NOEXCEPT;
+CONSTCD11 bool operator< (const year_weeknum_weekday& x, const year_weeknum_weekday& y) NOEXCEPT;
+CONSTCD11 bool operator> (const year_weeknum_weekday& x, const year_weeknum_weekday& y) NOEXCEPT;
+CONSTCD11 bool operator<=(const year_weeknum_weekday& x, const year_weeknum_weekday& y) NOEXCEPT;
+CONSTCD11 bool operator>=(const year_weeknum_weekday& x, const year_weeknum_weekday& y) NOEXCEPT;
+
+CONSTCD11 year_weeknum_weekday operator+(const year_weeknum_weekday& ywnwd, const years& y) NOEXCEPT;
+CONSTCD11 year_weeknum_weekday operator+(const years& y, const year_weeknum_weekday& ywnwd) NOEXCEPT;
+CONSTCD11 year_weeknum_weekday operator-(const year_weeknum_weekday& ywnwd, const years& y) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year_weeknum_weekday& ywnwd);
+
+//----------------+
+// Implementation |
+//----------------+
+
+// weekday
+
+CONSTCD11
+inline
+unsigned char
+weekday::to_iso_encoding(unsigned char z) NOEXCEPT
+{
+ return z != 0 ? z : (unsigned char)7;
+}
+
+CONSTCD11
+inline
+unsigned
+weekday::from_iso_encoding(unsigned z) NOEXCEPT
+{
+ return z != 7 ? z : 0u;
+}
+
+CONSTCD11
+inline
+unsigned char
+weekday::weekday_from_days(int z) NOEXCEPT
+{
+ return to_iso_encoding(static_cast<unsigned char>(static_cast<unsigned>(
+ z >= -4 ? (z+4) % 7 : (z+5) % 7 + 6)));
+}
+
+CONSTCD11
+inline
+weekday::weekday(unsigned wd) NOEXCEPT
+ : wd_(static_cast<decltype(wd_)>(wd))
+ {}
+
+CONSTCD11
+inline
+weekday::weekday(date::weekday wd) NOEXCEPT
+ : wd_(wd.iso_encoding())
+ {}
+
+CONSTCD11
+inline
+weekday::weekday(const sys_days& dp) NOEXCEPT
+ : wd_(weekday_from_days(dp.time_since_epoch().count()))
+ {}
+
+CONSTCD11
+inline
+weekday::weekday(const local_days& dp) NOEXCEPT
+ : wd_(weekday_from_days(dp.time_since_epoch().count()))
+ {}
+
+inline weekday& weekday::operator++() NOEXCEPT {if (++wd_ == 8) wd_ = 1; return *this;}
+inline weekday weekday::operator++(int) NOEXCEPT {auto tmp(*this); ++(*this); return tmp;}
+inline weekday& weekday::operator--() NOEXCEPT {if (wd_-- == 1) wd_ = 7; return *this;}
+inline weekday weekday::operator--(int) NOEXCEPT {auto tmp(*this); --(*this); return tmp;}
+
+inline
+weekday&
+weekday::operator+=(const days& d) NOEXCEPT
+{
+ *this = *this + d;
+ return *this;
+}
+
+inline
+weekday&
+weekday::operator-=(const days& d) NOEXCEPT
+{
+ *this = *this - d;
+ return *this;
+}
+
+CONSTCD11
+inline
+weekday::operator unsigned() const NOEXCEPT
+{
+ return wd_;
+}
+
+CONSTCD11
+inline
+weekday::operator date::weekday() const NOEXCEPT
+{
+ return date::weekday{from_iso_encoding(unsigned{wd_})};
+}
+
+CONSTCD11 inline bool weekday::ok() const NOEXCEPT {return 1 <= wd_ && wd_ <= 7;}
+
+CONSTCD11
+inline
+bool
+operator==(const weekday& x, const weekday& y) NOEXCEPT
+{
+ return static_cast<unsigned>(x) == static_cast<unsigned>(y);
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const weekday& x, const weekday& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+CONSTCD14
+inline
+days
+operator-(const weekday& x, const weekday& y) NOEXCEPT
+{
+ auto const diff = static_cast<unsigned>(x) - static_cast<unsigned>(y);
+ return days{diff <= 6 ? diff : diff + 7};
+}
+
+CONSTCD14
+inline
+weekday
+operator+(const weekday& x, const days& y) NOEXCEPT
+{
+ auto const wdu = static_cast<long long>(static_cast<unsigned>(x) - 1u) + y.count();
+ auto const wk = (wdu >= 0 ? wdu : wdu-6) / 7;
+ return weekday{static_cast<unsigned>(wdu - wk * 7) + 1u};
+}
+
+CONSTCD14
+inline
+weekday
+operator+(const days& x, const weekday& y) NOEXCEPT
+{
+ return y + x;
+}
+
+CONSTCD14
+inline
+weekday
+operator-(const weekday& x, const days& y) NOEXCEPT
+{
+ return x + -y;
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const weekday& wd)
+{
+ switch (static_cast<unsigned>(wd))
+ {
+ case 7:
+ os << "Sun";
+ break;
+ case 1:
+ os << "Mon";
+ break;
+ case 2:
+ os << "Tue";
+ break;
+ case 3:
+ os << "Wed";
+ break;
+ case 4:
+ os << "Thu";
+ break;
+ case 5:
+ os << "Fri";
+ break;
+ case 6:
+ os << "Sat";
+ break;
+ default:
+ os << static_cast<unsigned>(wd) << " is not a valid weekday";
+ break;
+ }
+ return os;
+}
+
+// year
+
+CONSTCD11 inline year::year(int y) NOEXCEPT : y_(static_cast<decltype(y_)>(y)) {}
+inline year& year::operator++() NOEXCEPT {++y_; return *this;}
+inline year year::operator++(int) NOEXCEPT {auto tmp(*this); ++(*this); return tmp;}
+inline year& year::operator--() NOEXCEPT {--y_; return *this;}
+inline year year::operator--(int) NOEXCEPT {auto tmp(*this); --(*this); return tmp;}
+inline year& year::operator+=(const years& y) NOEXCEPT {*this = *this + y; return *this;}
+inline year& year::operator-=(const years& y) NOEXCEPT {*this = *this - y; return *this;}
+
+CONSTCD11 inline year::operator int() const NOEXCEPT {return y_;}
+CONSTCD11 inline bool year::ok() const NOEXCEPT {return min() <= *this && *this <= max();}
+
+CONSTCD11
+inline
+year
+year::min() NOEXCEPT
+{
+ using std::chrono::seconds;
+ using std::chrono::minutes;
+ using std::chrono::hours;
+ using std::chrono::duration_cast;
+ static_assert(sizeof(seconds)*CHAR_BIT >= 41, "seconds may overflow");
+ static_assert(sizeof(hours)*CHAR_BIT >= 30, "hours may overflow");
+ return sizeof(minutes)*CHAR_BIT < 34 ?
+ year{1970} + duration_cast<years>(minutes::min()) :
+ year{std::numeric_limits<short>::min()};
+}
+
+CONSTCD11
+inline
+year
+year::max() NOEXCEPT
+{
+ using std::chrono::seconds;
+ using std::chrono::minutes;
+ using std::chrono::hours;
+ using std::chrono::duration_cast;
+ static_assert(sizeof(seconds)*CHAR_BIT >= 41, "seconds may overflow");
+ static_assert(sizeof(hours)*CHAR_BIT >= 30, "hours may overflow");
+ return sizeof(minutes)*CHAR_BIT < 34 ?
+ year{1969} + duration_cast<years>(minutes::max()) :
+ year{std::numeric_limits<short>::max()};
+}
+
+CONSTCD11
+inline
+bool
+operator==(const year& x, const year& y) NOEXCEPT
+{
+ return static_cast<int>(x) == static_cast<int>(y);
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const year& x, const year& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+CONSTCD11
+inline
+bool
+operator<(const year& x, const year& y) NOEXCEPT
+{
+ return static_cast<int>(x) < static_cast<int>(y);
+}
+
+CONSTCD11
+inline
+bool
+operator>(const year& x, const year& y) NOEXCEPT
+{
+ return y < x;
+}
+
+CONSTCD11
+inline
+bool
+operator<=(const year& x, const year& y) NOEXCEPT
+{
+ return !(y < x);
+}
+
+CONSTCD11
+inline
+bool
+operator>=(const year& x, const year& y) NOEXCEPT
+{
+ return !(x < y);
+}
+
+CONSTCD11
+inline
+years
+operator-(const year& x, const year& y) NOEXCEPT
+{
+ return years{static_cast<int>(x) - static_cast<int>(y)};
+}
+
+CONSTCD11
+inline
+year
+operator+(const year& x, const years& y) NOEXCEPT
+{
+ return year{static_cast<int>(x) + y.count()};
+}
+
+CONSTCD11
+inline
+year
+operator+(const years& x, const year& y) NOEXCEPT
+{
+ return y + x;
+}
+
+CONSTCD11
+inline
+year
+operator-(const year& x, const years& y) NOEXCEPT
+{
+ return year{static_cast<int>(x) - y.count()};
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year& y)
+{
+ date::detail::save_ostream<CharT, Traits> _(os);
+ os.fill('0');
+ os.flags(std::ios::dec | std::ios::internal);
+ os.width(4 + (y < year{0}));
+ os << static_cast<int>(y);
+ return os;
+}
+
+#if !defined(_MSC_VER) || (_MSC_VER >= 1900)
+inline namespace literals
+{
+
+CONSTCD11
+inline
+iso_week::year
+operator "" _y(unsigned long long y) NOEXCEPT
+{
+ return iso_week::year(static_cast<int>(y));
+}
+
+CONSTCD11
+inline
+iso_week::weeknum
+operator "" _w(unsigned long long wn) NOEXCEPT
+{
+ return iso_week::weeknum(static_cast<unsigned>(wn));
+}
+
+#endif // !defined(_MSC_VER) || (_MSC_VER >= 1900)
+
+CONSTDATA iso_week::last_week last{};
+
+CONSTDATA iso_week::weekday sun{7u};
+CONSTDATA iso_week::weekday mon{1u};
+CONSTDATA iso_week::weekday tue{2u};
+CONSTDATA iso_week::weekday wed{3u};
+CONSTDATA iso_week::weekday thu{4u};
+CONSTDATA iso_week::weekday fri{5u};
+CONSTDATA iso_week::weekday sat{6u};
+
+#if !defined(_MSC_VER) || (_MSC_VER >= 1900)
+} // inline namespace literals
+#endif
+
+// weeknum
+
+CONSTCD11
+inline
+weeknum::weeknum(unsigned wn) NOEXCEPT
+ : wn_(static_cast<decltype(wn_)>(wn))
+ {}
+
+inline weeknum& weeknum::operator++() NOEXCEPT {++wn_; return *this;}
+inline weeknum weeknum::operator++(int) NOEXCEPT {auto tmp(*this); ++(*this); return tmp;}
+inline weeknum& weeknum::operator--() NOEXCEPT {--wn_; return *this;}
+inline weeknum weeknum::operator--(int) NOEXCEPT {auto tmp(*this); --(*this); return tmp;}
+
+inline
+weeknum&
+weeknum::operator+=(const weeks& y) NOEXCEPT
+{
+ *this = *this + y;
+ return *this;
+}
+
+inline
+weeknum&
+weeknum::operator-=(const weeks& y) NOEXCEPT
+{
+ *this = *this - y;
+ return *this;
+}
+
+CONSTCD11 inline weeknum::operator unsigned() const NOEXCEPT {return wn_;}
+CONSTCD11 inline bool weeknum::ok() const NOEXCEPT {return 1 <= wn_ && wn_ <= 53;}
+
+CONSTCD11
+inline
+bool
+operator==(const weeknum& x, const weeknum& y) NOEXCEPT
+{
+ return static_cast<unsigned>(x) == static_cast<unsigned>(y);
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const weeknum& x, const weeknum& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+CONSTCD11
+inline
+bool
+operator<(const weeknum& x, const weeknum& y) NOEXCEPT
+{
+ return static_cast<unsigned>(x) < static_cast<unsigned>(y);
+}
+
+CONSTCD11
+inline
+bool
+operator>(const weeknum& x, const weeknum& y) NOEXCEPT
+{
+ return y < x;
+}
+
+CONSTCD11
+inline
+bool
+operator<=(const weeknum& x, const weeknum& y) NOEXCEPT
+{
+ return !(y < x);
+}
+
+CONSTCD11
+inline
+bool
+operator>=(const weeknum& x, const weeknum& y) NOEXCEPT
+{
+ return !(x < y);
+}
+
+CONSTCD11
+inline
+weeks
+operator-(const weeknum& x, const weeknum& y) NOEXCEPT
+{
+ return weeks{static_cast<weeks::rep>(static_cast<unsigned>(x)) -
+ static_cast<weeks::rep>(static_cast<unsigned>(y))};
+}
+
+CONSTCD11
+inline
+weeknum
+operator+(const weeknum& x, const weeks& y) NOEXCEPT
+{
+ return weeknum{static_cast<unsigned>(x) + static_cast<unsigned>(y.count())};
+}
+
+CONSTCD11
+inline
+weeknum
+operator+(const weeks& x, const weeknum& y) NOEXCEPT
+{
+ return y + x;
+}
+
+CONSTCD11
+inline
+weeknum
+operator-(const weeknum& x, const weeks& y) NOEXCEPT
+{
+ return x + -y;
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const weeknum& wn)
+{
+ date::detail::save_ostream<CharT, Traits> _(os);
+ os << 'W';
+ os.fill('0');
+ os.flags(std::ios::dec | std::ios::right);
+ os.width(2);
+ os << static_cast<unsigned>(wn);
+ return os;
+}
+
+// year_weeknum
+
+CONSTCD11
+inline
+year_weeknum::year_weeknum(const iso_week::year& y, const iso_week::weeknum& wn) NOEXCEPT
+ : y_(y)
+ , wn_(wn)
+ {}
+
+CONSTCD11 inline year year_weeknum::year() const NOEXCEPT {return y_;}
+CONSTCD11 inline weeknum year_weeknum::weeknum() const NOEXCEPT {return wn_;}
+CONSTCD11 inline bool year_weeknum::ok() const NOEXCEPT
+{
+ return y_.ok() && 1u <= static_cast<unsigned>(wn_) && wn_ <= (y_/last).weeknum();
+}
+
+inline
+year_weeknum&
+year_weeknum::operator+=(const years& dy) NOEXCEPT
+{
+ *this = *this + dy;
+ return *this;
+}
+
+inline
+year_weeknum&
+year_weeknum::operator-=(const years& dy) NOEXCEPT
+{
+ *this = *this - dy;
+ return *this;
+}
+
+CONSTCD11
+inline
+bool
+operator==(const year_weeknum& x, const year_weeknum& y) NOEXCEPT
+{
+ return x.year() == y.year() && x.weeknum() == y.weeknum();
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const year_weeknum& x, const year_weeknum& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+CONSTCD11
+inline
+bool
+operator<(const year_weeknum& x, const year_weeknum& y) NOEXCEPT
+{
+ return x.year() < y.year() ? true
+ : (x.year() > y.year() ? false
+ : (x.weeknum() < y.weeknum()));
+}
+
+CONSTCD11
+inline
+bool
+operator>(const year_weeknum& x, const year_weeknum& y) NOEXCEPT
+{
+ return y < x;
+}
+
+CONSTCD11
+inline
+bool
+operator<=(const year_weeknum& x, const year_weeknum& y) NOEXCEPT
+{
+ return !(y < x);
+}
+
+CONSTCD11
+inline
+bool
+operator>=(const year_weeknum& x, const year_weeknum& y) NOEXCEPT
+{
+ return !(x < y);
+}
+
+CONSTCD11
+inline
+year_weeknum
+operator+(const year_weeknum& ym, const years& dy) NOEXCEPT
+{
+ return (ym.year() + dy) / ym.weeknum();
+}
+
+CONSTCD11
+inline
+year_weeknum
+operator+(const years& dy, const year_weeknum& ym) NOEXCEPT
+{
+ return ym + dy;
+}
+
+CONSTCD11
+inline
+year_weeknum
+operator-(const year_weeknum& ym, const years& dy) NOEXCEPT
+{
+ return ym + -dy;
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year_weeknum& ywn)
+{
+ return os << ywn.year() << '-' << ywn.weeknum();
+}
+
+
+// year_lastweek
+
+CONSTCD11
+inline
+year_lastweek::year_lastweek(const iso_week::year& y) NOEXCEPT
+ : y_(y)
+ {}
+
+CONSTCD11 inline year year_lastweek::year() const NOEXCEPT {return y_;}
+
+CONSTCD14
+inline
+weeknum
+year_lastweek::weeknum() const NOEXCEPT
+{
+ const auto y = date::year{static_cast<int>(y_)};
+ const auto s0 = sys_days((y-years{1})/12/date::thu[date::last]);
+ const auto s1 = sys_days(y/12/date::thu[date::last]);
+ return iso_week::weeknum(static_cast<unsigned>(date::trunc<weeks>(s1-s0).count()));
+}
+
+CONSTCD11 inline bool year_lastweek::ok() const NOEXCEPT {return y_.ok();}
+
+inline
+year_lastweek&
+year_lastweek::operator+=(const years& dy) NOEXCEPT
+{
+ *this = *this + dy;
+ return *this;
+}
+
+inline
+year_lastweek&
+year_lastweek::operator-=(const years& dy) NOEXCEPT
+{
+ *this = *this - dy;
+ return *this;
+}
+
+CONSTCD11
+inline
+bool
+operator==(const year_lastweek& x, const year_lastweek& y) NOEXCEPT
+{
+ return x.year() == y.year();
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const year_lastweek& x, const year_lastweek& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+CONSTCD11
+inline
+bool
+operator<(const year_lastweek& x, const year_lastweek& y) NOEXCEPT
+{
+ return x.year() < y.year();
+}
+
+CONSTCD11
+inline
+bool
+operator>(const year_lastweek& x, const year_lastweek& y) NOEXCEPT
+{
+ return y < x;
+}
+
+CONSTCD11
+inline
+bool
+operator<=(const year_lastweek& x, const year_lastweek& y) NOEXCEPT
+{
+ return !(y < x);
+}
+
+CONSTCD11
+inline
+bool
+operator>=(const year_lastweek& x, const year_lastweek& y) NOEXCEPT
+{
+ return !(x < y);
+}
+
+CONSTCD11
+inline
+year_lastweek
+operator+(const year_lastweek& ym, const years& dy) NOEXCEPT
+{
+ return year_lastweek{ym.year() + dy};
+}
+
+CONSTCD11
+inline
+year_lastweek
+operator+(const years& dy, const year_lastweek& ym) NOEXCEPT
+{
+ return ym + dy;
+}
+
+CONSTCD11
+inline
+year_lastweek
+operator-(const year_lastweek& ym, const years& dy) NOEXCEPT
+{
+ return ym + -dy;
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year_lastweek& ywn)
+{
+ return os << ywn.year() << "-W last";
+}
+
+// weeknum_weekday
+
+CONSTCD11
+inline
+weeknum_weekday::weeknum_weekday(const iso_week::weeknum& wn,
+ const iso_week::weekday& wd) NOEXCEPT
+ : wn_(wn)
+ , wd_(wd)
+ {}
+
+CONSTCD11 inline weeknum weeknum_weekday::weeknum() const NOEXCEPT {return wn_;}
+CONSTCD11 inline weekday weeknum_weekday::weekday() const NOEXCEPT {return wd_;}
+
+CONSTCD14
+inline
+bool
+weeknum_weekday::ok() const NOEXCEPT
+{
+ return wn_.ok() && wd_.ok();
+}
+
+CONSTCD11
+inline
+bool
+operator==(const weeknum_weekday& x, const weeknum_weekday& y) NOEXCEPT
+{
+ return x.weeknum() == y.weeknum() && x.weekday() == y.weekday();
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const weeknum_weekday& x, const weeknum_weekday& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+CONSTCD11
+inline
+bool
+operator<(const weeknum_weekday& x, const weeknum_weekday& y) NOEXCEPT
+{
+ return x.weeknum() < y.weeknum() ? true
+ : (x.weeknum() > y.weeknum() ? false
+ : (static_cast<unsigned>(x.weekday()) < static_cast<unsigned>(y.weekday())));
+}
+
+CONSTCD11
+inline
+bool
+operator>(const weeknum_weekday& x, const weeknum_weekday& y) NOEXCEPT
+{
+ return y < x;
+}
+
+CONSTCD11
+inline
+bool
+operator<=(const weeknum_weekday& x, const weeknum_weekday& y) NOEXCEPT
+{
+ return !(y < x);
+}
+
+CONSTCD11
+inline
+bool
+operator>=(const weeknum_weekday& x, const weeknum_weekday& y) NOEXCEPT
+{
+ return !(x < y);
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const weeknum_weekday& md)
+{
+ return os << md.weeknum() << '-' << md.weekday();
+}
+
+// lastweek_weekday
+
+CONSTCD11
+inline
+lastweek_weekday::lastweek_weekday(const iso_week::weekday& wd) NOEXCEPT
+ : wd_(wd)
+ {}
+
+CONSTCD11 inline weekday lastweek_weekday::weekday() const NOEXCEPT {return wd_;}
+
+CONSTCD14
+inline
+bool
+lastweek_weekday::ok() const NOEXCEPT
+{
+ return wd_.ok();
+}
+
+CONSTCD11
+inline
+bool
+operator==(const lastweek_weekday& x, const lastweek_weekday& y) NOEXCEPT
+{
+ return x.weekday() == y.weekday();
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const lastweek_weekday& x, const lastweek_weekday& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+CONSTCD11
+inline
+bool
+operator<(const lastweek_weekday& x, const lastweek_weekday& y) NOEXCEPT
+{
+ return static_cast<unsigned>(x.weekday()) < static_cast<unsigned>(y.weekday());
+}
+
+CONSTCD11
+inline
+bool
+operator>(const lastweek_weekday& x, const lastweek_weekday& y) NOEXCEPT
+{
+ return y < x;
+}
+
+CONSTCD11
+inline
+bool
+operator<=(const lastweek_weekday& x, const lastweek_weekday& y) NOEXCEPT
+{
+ return !(y < x);
+}
+
+CONSTCD11
+inline
+bool
+operator>=(const lastweek_weekday& x, const lastweek_weekday& y) NOEXCEPT
+{
+ return !(x < y);
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const lastweek_weekday& md)
+{
+ return os << "W last-" << md.weekday();
+}
+
+// year_lastweek_weekday
+
+CONSTCD11
+inline
+year_lastweek_weekday::year_lastweek_weekday(const iso_week::year& y,
+ const iso_week::weekday& wd) NOEXCEPT
+ : y_(y)
+ , wd_(wd)
+ {}
+
+inline
+year_lastweek_weekday&
+year_lastweek_weekday::operator+=(const years& y) NOEXCEPT
+{
+ *this = *this + y;
+ return *this;
+}
+
+inline
+year_lastweek_weekday&
+year_lastweek_weekday::operator-=(const years& y) NOEXCEPT
+{
+ *this = *this - y;
+ return *this;
+}
+
+CONSTCD11 inline year year_lastweek_weekday::year() const NOEXCEPT {return y_;}
+
+CONSTCD14
+inline
+weeknum
+year_lastweek_weekday::weeknum() const NOEXCEPT
+{
+ return (y_ / last).weeknum();
+}
+
+CONSTCD11 inline weekday year_lastweek_weekday::weekday() const NOEXCEPT {return wd_;}
+
+CONSTCD14
+inline
+year_lastweek_weekday::operator sys_days() const NOEXCEPT
+{
+ return sys_days(date::year{static_cast<int>(y_)}/date::dec/date::thu[date::last])
+ + (sun - thu) - (sun - wd_);
+}
+
+CONSTCD14
+inline
+year_lastweek_weekday::operator local_days() const NOEXCEPT
+{
+ return local_days(date::year{static_cast<int>(y_)}/date::dec/date::thu[date::last])
+ + (sun - thu) - (sun - wd_);
+}
+
+CONSTCD11
+inline
+bool
+year_lastweek_weekday::ok() const NOEXCEPT
+{
+ return y_.ok() && wd_.ok();
+}
+
+CONSTCD11
+inline
+bool
+operator==(const year_lastweek_weekday& x, const year_lastweek_weekday& y) NOEXCEPT
+{
+ return x.year() == y.year() && x.weekday() == y.weekday();
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const year_lastweek_weekday& x, const year_lastweek_weekday& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+CONSTCD11
+inline
+bool
+operator<(const year_lastweek_weekday& x, const year_lastweek_weekday& y) NOEXCEPT
+{
+ return x.year() < y.year() ? true
+ : (x.year() > y.year() ? false
+ : (static_cast<unsigned>(x.weekday()) < static_cast<unsigned>(y.weekday())));
+}
+
+CONSTCD11
+inline
+bool
+operator>(const year_lastweek_weekday& x, const year_lastweek_weekday& y) NOEXCEPT
+{
+ return y < x;
+}
+
+CONSTCD11
+inline
+bool
+operator<=(const year_lastweek_weekday& x, const year_lastweek_weekday& y) NOEXCEPT
+{
+ return !(y < x);
+}
+
+CONSTCD11
+inline
+bool
+operator>=(const year_lastweek_weekday& x, const year_lastweek_weekday& y) NOEXCEPT
+{
+ return !(x < y);
+}
+
+CONSTCD11
+inline
+year_lastweek_weekday
+operator+(const year_lastweek_weekday& ywnwd, const years& y) NOEXCEPT
+{
+ return (ywnwd.year() + y) / last / ywnwd.weekday();
+}
+
+CONSTCD11
+inline
+year_lastweek_weekday
+operator+(const years& y, const year_lastweek_weekday& ywnwd) NOEXCEPT
+{
+ return ywnwd + y;
+}
+
+CONSTCD11
+inline
+year_lastweek_weekday
+operator-(const year_lastweek_weekday& ywnwd, const years& y) NOEXCEPT
+{
+ return ywnwd + -y;
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year_lastweek_weekday& ywnwd)
+{
+ return os << ywnwd.year() << "-W last-" << ywnwd.weekday();
+}
+
+// year_weeknum_weekday
+
+CONSTCD11
+inline
+year_weeknum_weekday::year_weeknum_weekday(const iso_week::year& y,
+ const iso_week::weeknum& wn,
+ const iso_week::weekday& wd) NOEXCEPT
+ : y_(y)
+ , wn_(wn)
+ , wd_(wd)
+ {}
+
+CONSTCD14
+inline
+year_weeknum_weekday::year_weeknum_weekday(const year_lastweek_weekday& ylwwd) NOEXCEPT
+ : y_(ylwwd.year())
+ , wn_(ylwwd.weeknum())
+ , wd_(ylwwd.weekday())
+ {}
+
+CONSTCD14
+inline
+year_weeknum_weekday::year_weeknum_weekday(const sys_days& dp) NOEXCEPT
+ : year_weeknum_weekday(from_days(dp.time_since_epoch()))
+ {}
+
+CONSTCD14
+inline
+year_weeknum_weekday::year_weeknum_weekday(const local_days& dp) NOEXCEPT
+ : year_weeknum_weekday(from_days(dp.time_since_epoch()))
+ {}
+
+inline
+year_weeknum_weekday&
+year_weeknum_weekday::operator+=(const years& y) NOEXCEPT
+{
+ *this = *this + y;
+ return *this;
+}
+
+inline
+year_weeknum_weekday&
+year_weeknum_weekday::operator-=(const years& y) NOEXCEPT
+{
+ *this = *this - y;
+ return *this;
+}
+
+CONSTCD11 inline year year_weeknum_weekday::year() const NOEXCEPT {return y_;}
+CONSTCD11 inline weeknum year_weeknum_weekday::weeknum() const NOEXCEPT {return wn_;}
+CONSTCD11 inline weekday year_weeknum_weekday::weekday() const NOEXCEPT {return wd_;}
+
+CONSTCD14
+inline
+year_weeknum_weekday::operator sys_days() const NOEXCEPT
+{
+ return sys_days(date::year{static_cast<int>(y_)-1}/date::dec/date::thu[date::last])
+ + (date::mon - date::thu) + weeks{static_cast<unsigned>(wn_)-1} + (wd_ - mon);
+}
+
+CONSTCD14
+inline
+year_weeknum_weekday::operator local_days() const NOEXCEPT
+{
+ return local_days(date::year{static_cast<int>(y_)-1}/date::dec/date::thu[date::last])
+ + (date::mon - date::thu) + weeks{static_cast<unsigned>(wn_)-1} + (wd_ - mon);
+}
+
+CONSTCD14
+inline
+bool
+year_weeknum_weekday::ok() const NOEXCEPT
+{
+ return y_.ok() && wd_.ok() && iso_week::weeknum{1u} <= wn_ && wn_ <= year_lastweek{y_}.weeknum();
+}
+
+CONSTCD14
+inline
+year_weeknum_weekday
+year_weeknum_weekday::from_days(days d) NOEXCEPT
+{
+ const auto dp = sys_days{d};
+ const auto wd = iso_week::weekday{dp};
+ auto y = date::year_month_day{dp + days{3}}.year();
+ auto start = sys_days((y - date::years{1})/date::dec/date::thu[date::last]) + (mon-thu);
+ if (dp < start)
+ {
+ --y;
+ start = sys_days((y - date::years{1})/date::dec/date::thu[date::last]) + (mon-thu);
+ }
+ const auto wn = iso_week::weeknum(
+ static_cast<unsigned>(date::trunc<weeks>(dp - start).count() + 1));
+ return {iso_week::year(static_cast<int>(y)), wn, wd};
+}
+
+CONSTCD11
+inline
+bool
+operator==(const year_weeknum_weekday& x, const year_weeknum_weekday& y) NOEXCEPT
+{
+ return x.year() == y.year() && x.weeknum() == y.weeknum() && x.weekday() == y.weekday();
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const year_weeknum_weekday& x, const year_weeknum_weekday& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+CONSTCD11
+inline
+bool
+operator<(const year_weeknum_weekday& x, const year_weeknum_weekday& y) NOEXCEPT
+{
+ return x.year() < y.year() ? true
+ : (x.year() > y.year() ? false
+ : (x.weeknum() < y.weeknum() ? true
+ : (x.weeknum() > y.weeknum() ? false
+ : (static_cast<unsigned>(x.weekday()) < static_cast<unsigned>(y.weekday())))));
+}
+
+CONSTCD11
+inline
+bool
+operator>(const year_weeknum_weekday& x, const year_weeknum_weekday& y) NOEXCEPT
+{
+ return y < x;
+}
+
+CONSTCD11
+inline
+bool
+operator<=(const year_weeknum_weekday& x, const year_weeknum_weekday& y) NOEXCEPT
+{
+ return !(y < x);
+}
+
+CONSTCD11
+inline
+bool
+operator>=(const year_weeknum_weekday& x, const year_weeknum_weekday& y) NOEXCEPT
+{
+ return !(x < y);
+}
+
+CONSTCD11
+inline
+year_weeknum_weekday
+operator+(const year_weeknum_weekday& ywnwd, const years& y) NOEXCEPT
+{
+ return (ywnwd.year() + y) / ywnwd.weeknum() / ywnwd.weekday();
+}
+
+CONSTCD11
+inline
+year_weeknum_weekday
+operator+(const years& y, const year_weeknum_weekday& ywnwd) NOEXCEPT
+{
+ return ywnwd + y;
+}
+
+CONSTCD11
+inline
+year_weeknum_weekday
+operator-(const year_weeknum_weekday& ywnwd, const years& y) NOEXCEPT
+{
+ return ywnwd + -y;
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year_weeknum_weekday& ywnwd)
+{
+ return os << ywnwd.year() << '-' << ywnwd.weeknum() << '-' << ywnwd.weekday();
+}
+
+// date composition operators
+
+CONSTCD11
+inline
+year_weeknum
+operator/(const year& y, const weeknum& wn) NOEXCEPT
+{
+ return {y, wn};
+}
+
+CONSTCD11
+inline
+year_weeknum
+operator/(const year& y, int wn) NOEXCEPT
+{
+ return y/weeknum(static_cast<unsigned>(wn));
+}
+
+CONSTCD11
+inline
+year_lastweek
+operator/(const year& y, last_week) NOEXCEPT
+{
+ return year_lastweek{y};
+}
+
+CONSTCD11
+inline
+weeknum_weekday
+operator/(const weeknum& wn, const weekday& wd) NOEXCEPT
+{
+ return {wn, wd};
+}
+
+CONSTCD11
+inline
+weeknum_weekday
+operator/(const weeknum& wn, int wd) NOEXCEPT
+{
+ return wn/weekday{static_cast<unsigned>(wd)};
+}
+
+CONSTCD11
+inline
+weeknum_weekday
+operator/(const weekday& wd, const weeknum& wn) NOEXCEPT
+{
+ return wn/wd;
+}
+
+CONSTCD11
+inline
+weeknum_weekday
+operator/(const weekday& wd, int wn) NOEXCEPT
+{
+ return weeknum{static_cast<unsigned>(wn)}/wd;
+}
+
+CONSTCD11
+inline
+lastweek_weekday
+operator/(const last_week&, const weekday& wd) NOEXCEPT
+{
+ return lastweek_weekday{wd};
+}
+
+CONSTCD11
+inline
+lastweek_weekday
+operator/(const last_week& wn, int wd) NOEXCEPT
+{
+ return wn / weekday{static_cast<unsigned>(wd)};
+}
+
+CONSTCD11
+inline
+lastweek_weekday
+operator/(const weekday& wd, const last_week& wn) NOEXCEPT
+{
+ return wn / wd;
+}
+
+CONSTCD11
+inline
+year_weeknum_weekday
+operator/(const year_weeknum& ywn, const weekday& wd) NOEXCEPT
+{
+ return {ywn.year(), ywn.weeknum(), wd};
+}
+
+CONSTCD11
+inline
+year_weeknum_weekday
+operator/(const year_weeknum& ywn, int wd) NOEXCEPT
+{
+ return ywn / weekday(static_cast<unsigned>(wd));
+}
+
+CONSTCD11
+inline
+year_weeknum_weekday
+operator/(const weeknum_weekday& wnwd, const year& y) NOEXCEPT
+{
+ return {y, wnwd.weeknum(), wnwd.weekday()};
+}
+
+CONSTCD11
+inline
+year_weeknum_weekday
+operator/(const weeknum_weekday& wnwd, int y) NOEXCEPT
+{
+ return wnwd / year{y};
+}
+
+CONSTCD11
+inline
+year_lastweek_weekday
+operator/(const year_lastweek& ylw, const weekday& wd) NOEXCEPT
+{
+ return {ylw.year(), wd};
+}
+
+CONSTCD11
+inline
+year_lastweek_weekday
+operator/(const year_lastweek& ylw, int wd) NOEXCEPT
+{
+ return ylw / weekday(static_cast<unsigned>(wd));
+}
+
+CONSTCD11
+inline
+year_lastweek_weekday
+operator/(const lastweek_weekday& lwwd, const year& y) NOEXCEPT
+{
+ return {y, lwwd.weekday()};
+}
+
+CONSTCD11
+inline
+year_lastweek_weekday
+operator/(const lastweek_weekday& lwwd, int y) NOEXCEPT
+{
+ return lwwd / year{y};
+}
+
+} // namespace iso_week
+
+#endif // ISO_WEEK_H
diff --git a/src/third-party/date/include/date/julian.h b/src/third-party/date/include/date/julian.h
new file mode 100644
index 0000000..d909d69
--- /dev/null
+++ b/src/third-party/date/include/date/julian.h
@@ -0,0 +1,3052 @@
+#ifndef JULIAN_H
+#define JULIAN_H
+
+// The MIT License (MIT)
+//
+// Copyright (c) 2016 Howard Hinnant
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// Our apologies. When the previous paragraph was written, lowercase had not yet
+// been invented (that would involve another several millennia of evolution).
+// We did not mean to shout.
+
+#include "date.h"
+
+namespace julian
+{
+
+// durations
+
+using days = date::days;
+
+using weeks = date::weeks;
+
+using years = std::chrono::duration
+ <int, date::detail::ratio_multiply<std::ratio<1461, 4>, days::period>>;
+
+using months = std::chrono::duration
+ <int, date::detail::ratio_divide<years::period, std::ratio<12>>>;
+
+// time_point
+
+using sys_days = date::sys_days;
+using local_days = date::local_days;
+
+// types
+
+struct last_spec
+{
+ explicit last_spec() = default;
+};
+
+class day;
+class month;
+class year;
+
+class weekday;
+class weekday_indexed;
+class weekday_last;
+
+class month_day;
+class month_day_last;
+class month_weekday;
+class month_weekday_last;
+
+class year_month;
+
+class year_month_day;
+class year_month_day_last;
+class year_month_weekday;
+class year_month_weekday_last;
+
+// date composition operators
+
+CONSTCD11 year_month operator/(const year& y, const month& m) NOEXCEPT;
+CONSTCD11 year_month operator/(const year& y, int m) NOEXCEPT;
+
+CONSTCD11 month_day operator/(const day& d, const month& m) NOEXCEPT;
+CONSTCD11 month_day operator/(const day& d, int m) NOEXCEPT;
+CONSTCD11 month_day operator/(const month& m, const day& d) NOEXCEPT;
+CONSTCD11 month_day operator/(const month& m, int d) NOEXCEPT;
+CONSTCD11 month_day operator/(int m, const day& d) NOEXCEPT;
+
+CONSTCD11 month_day_last operator/(const month& m, last_spec) NOEXCEPT;
+CONSTCD11 month_day_last operator/(int m, last_spec) NOEXCEPT;
+CONSTCD11 month_day_last operator/(last_spec, const month& m) NOEXCEPT;
+CONSTCD11 month_day_last operator/(last_spec, int m) NOEXCEPT;
+
+CONSTCD11 month_weekday operator/(const month& m, const weekday_indexed& wdi) NOEXCEPT;
+CONSTCD11 month_weekday operator/(int m, const weekday_indexed& wdi) NOEXCEPT;
+CONSTCD11 month_weekday operator/(const weekday_indexed& wdi, const month& m) NOEXCEPT;
+CONSTCD11 month_weekday operator/(const weekday_indexed& wdi, int m) NOEXCEPT;
+
+CONSTCD11 month_weekday_last operator/(const month& m, const weekday_last& wdl) NOEXCEPT;
+CONSTCD11 month_weekday_last operator/(int m, const weekday_last& wdl) NOEXCEPT;
+CONSTCD11 month_weekday_last operator/(const weekday_last& wdl, const month& m) NOEXCEPT;
+CONSTCD11 month_weekday_last operator/(const weekday_last& wdl, int m) NOEXCEPT;
+
+CONSTCD11 year_month_day operator/(const year_month& ym, const day& d) NOEXCEPT;
+CONSTCD11 year_month_day operator/(const year_month& ym, int d) NOEXCEPT;
+CONSTCD11 year_month_day operator/(const year& y, const month_day& md) NOEXCEPT;
+CONSTCD11 year_month_day operator/(int y, const month_day& md) NOEXCEPT;
+CONSTCD11 year_month_day operator/(const month_day& md, const year& y) NOEXCEPT;
+CONSTCD11 year_month_day operator/(const month_day& md, int y) NOEXCEPT;
+
+CONSTCD11
+ year_month_day_last operator/(const year_month& ym, last_spec) NOEXCEPT;
+CONSTCD11
+ year_month_day_last operator/(const year& y, const month_day_last& mdl) NOEXCEPT;
+CONSTCD11
+ year_month_day_last operator/(int y, const month_day_last& mdl) NOEXCEPT;
+CONSTCD11
+ year_month_day_last operator/(const month_day_last& mdl, const year& y) NOEXCEPT;
+CONSTCD11
+ year_month_day_last operator/(const month_day_last& mdl, int y) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday
+operator/(const year_month& ym, const weekday_indexed& wdi) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday
+operator/(const year& y, const month_weekday& mwd) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday
+operator/(int y, const month_weekday& mwd) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday
+operator/(const month_weekday& mwd, const year& y) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday
+operator/(const month_weekday& mwd, int y) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday_last
+operator/(const year_month& ym, const weekday_last& wdl) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday_last
+operator/(const year& y, const month_weekday_last& mwdl) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday_last
+operator/(int y, const month_weekday_last& mwdl) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday_last
+operator/(const month_weekday_last& mwdl, const year& y) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday_last
+operator/(const month_weekday_last& mwdl, int y) NOEXCEPT;
+
+// Detailed interface
+
+// day
+
+class day
+{
+ unsigned char d_;
+
+public:
+ explicit CONSTCD11 day(unsigned d) NOEXCEPT;
+
+ CONSTCD14 day& operator++() NOEXCEPT;
+ CONSTCD14 day operator++(int) NOEXCEPT;
+ CONSTCD14 day& operator--() NOEXCEPT;
+ CONSTCD14 day operator--(int) NOEXCEPT;
+
+ CONSTCD14 day& operator+=(const days& d) NOEXCEPT;
+ CONSTCD14 day& operator-=(const days& d) NOEXCEPT;
+
+ CONSTCD11 explicit operator unsigned() const NOEXCEPT;
+ CONSTCD11 bool ok() const NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const day& x, const day& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const day& x, const day& y) NOEXCEPT;
+CONSTCD11 bool operator< (const day& x, const day& y) NOEXCEPT;
+CONSTCD11 bool operator> (const day& x, const day& y) NOEXCEPT;
+CONSTCD11 bool operator<=(const day& x, const day& y) NOEXCEPT;
+CONSTCD11 bool operator>=(const day& x, const day& y) NOEXCEPT;
+
+CONSTCD11 day operator+(const day& x, const days& y) NOEXCEPT;
+CONSTCD11 day operator+(const days& x, const day& y) NOEXCEPT;
+CONSTCD11 day operator-(const day& x, const days& y) NOEXCEPT;
+CONSTCD11 days operator-(const day& x, const day& y) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const day& d);
+
+// month
+
+class month
+{
+ unsigned char m_;
+
+public:
+ explicit CONSTCD11 month(unsigned m) NOEXCEPT;
+
+ CONSTCD14 month& operator++() NOEXCEPT;
+ CONSTCD14 month operator++(int) NOEXCEPT;
+ CONSTCD14 month& operator--() NOEXCEPT;
+ CONSTCD14 month operator--(int) NOEXCEPT;
+
+ CONSTCD14 month& operator+=(const months& m) NOEXCEPT;
+ CONSTCD14 month& operator-=(const months& m) NOEXCEPT;
+
+ CONSTCD11 explicit operator unsigned() const NOEXCEPT;
+ CONSTCD11 bool ok() const NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const month& x, const month& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const month& x, const month& y) NOEXCEPT;
+CONSTCD11 bool operator< (const month& x, const month& y) NOEXCEPT;
+CONSTCD11 bool operator> (const month& x, const month& y) NOEXCEPT;
+CONSTCD11 bool operator<=(const month& x, const month& y) NOEXCEPT;
+CONSTCD11 bool operator>=(const month& x, const month& y) NOEXCEPT;
+
+CONSTCD14 month operator+(const month& x, const months& y) NOEXCEPT;
+CONSTCD14 month operator+(const months& x, const month& y) NOEXCEPT;
+CONSTCD14 month operator-(const month& x, const months& y) NOEXCEPT;
+CONSTCD14 months operator-(const month& x, const month& y) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const month& m);
+
+// year
+
+class year
+{
+ short y_;
+
+public:
+ explicit CONSTCD11 year(int y) NOEXCEPT;
+
+ CONSTCD14 year& operator++() NOEXCEPT;
+ CONSTCD14 year operator++(int) NOEXCEPT;
+ CONSTCD14 year& operator--() NOEXCEPT;
+ CONSTCD14 year operator--(int) NOEXCEPT;
+
+ CONSTCD14 year& operator+=(const years& y) NOEXCEPT;
+ CONSTCD14 year& operator-=(const years& y) NOEXCEPT;
+
+ CONSTCD11 bool is_leap() const NOEXCEPT;
+
+ CONSTCD11 explicit operator int() const NOEXCEPT;
+ CONSTCD11 bool ok() const NOEXCEPT;
+
+ static CONSTCD11 year min() NOEXCEPT;
+ static CONSTCD11 year max() NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const year& x, const year& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const year& x, const year& y) NOEXCEPT;
+CONSTCD11 bool operator< (const year& x, const year& y) NOEXCEPT;
+CONSTCD11 bool operator> (const year& x, const year& y) NOEXCEPT;
+CONSTCD11 bool operator<=(const year& x, const year& y) NOEXCEPT;
+CONSTCD11 bool operator>=(const year& x, const year& y) NOEXCEPT;
+
+CONSTCD11 year operator+(const year& x, const years& y) NOEXCEPT;
+CONSTCD11 year operator+(const years& x, const year& y) NOEXCEPT;
+CONSTCD11 year operator-(const year& x, const years& y) NOEXCEPT;
+CONSTCD11 years operator-(const year& x, const year& y) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year& y);
+
+// weekday
+
+class weekday
+{
+ unsigned char wd_;
+public:
+ explicit CONSTCD11 weekday(unsigned wd) NOEXCEPT;
+ explicit weekday(int) = delete;
+ CONSTCD11 weekday(const sys_days& dp) NOEXCEPT;
+ CONSTCD11 explicit weekday(const local_days& dp) NOEXCEPT;
+
+ CONSTCD14 weekday& operator++() NOEXCEPT;
+ CONSTCD14 weekday operator++(int) NOEXCEPT;
+ CONSTCD14 weekday& operator--() NOEXCEPT;
+ CONSTCD14 weekday operator--(int) NOEXCEPT;
+
+ CONSTCD14 weekday& operator+=(const days& d) NOEXCEPT;
+ CONSTCD14 weekday& operator-=(const days& d) NOEXCEPT;
+
+ CONSTCD11 explicit operator unsigned() const NOEXCEPT;
+ CONSTCD11 bool ok() const NOEXCEPT;
+
+ CONSTCD11 weekday_indexed operator[](unsigned index) const NOEXCEPT;
+ CONSTCD11 weekday_last operator[](last_spec) const NOEXCEPT;
+
+private:
+ static CONSTCD11 unsigned char weekday_from_days(int z) NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const weekday& x, const weekday& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const weekday& x, const weekday& y) NOEXCEPT;
+
+CONSTCD14 weekday operator+(const weekday& x, const days& y) NOEXCEPT;
+CONSTCD14 weekday operator+(const days& x, const weekday& y) NOEXCEPT;
+CONSTCD14 weekday operator-(const weekday& x, const days& y) NOEXCEPT;
+CONSTCD14 days operator-(const weekday& x, const weekday& y) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const weekday& wd);
+
+// weekday_indexed
+
+class weekday_indexed
+{
+ unsigned char wd_ : 4;
+ unsigned char index_ : 4;
+
+public:
+ CONSTCD11 weekday_indexed(const julian::weekday& wd, unsigned index) NOEXCEPT;
+
+ CONSTCD11 julian::weekday weekday() const NOEXCEPT;
+ CONSTCD11 unsigned index() const NOEXCEPT;
+ CONSTCD11 bool ok() const NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const weekday_indexed& x, const weekday_indexed& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const weekday_indexed& x, const weekday_indexed& y) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const weekday_indexed& wdi);
+
+// weekday_last
+
+class weekday_last
+{
+ julian::weekday wd_;
+
+public:
+ explicit CONSTCD11 weekday_last(const julian::weekday& wd) NOEXCEPT;
+
+ CONSTCD11 julian::weekday weekday() const NOEXCEPT;
+ CONSTCD11 bool ok() const NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const weekday_last& x, const weekday_last& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const weekday_last& x, const weekday_last& y) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const weekday_last& wdl);
+
+// year_month
+
+class year_month
+{
+ julian::year y_;
+ julian::month m_;
+
+public:
+ CONSTCD11 year_month(const julian::year& y, const julian::month& m) NOEXCEPT;
+
+ CONSTCD11 julian::year year() const NOEXCEPT;
+ CONSTCD11 julian::month month() const NOEXCEPT;
+
+ CONSTCD14 year_month& operator+=(const months& dm) NOEXCEPT;
+ CONSTCD14 year_month& operator-=(const months& dm) NOEXCEPT;
+ CONSTCD14 year_month& operator+=(const years& dy) NOEXCEPT;
+ CONSTCD14 year_month& operator-=(const years& dy) NOEXCEPT;
+
+ CONSTCD11 bool ok() const NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const year_month& x, const year_month& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const year_month& x, const year_month& y) NOEXCEPT;
+CONSTCD11 bool operator< (const year_month& x, const year_month& y) NOEXCEPT;
+CONSTCD11 bool operator> (const year_month& x, const year_month& y) NOEXCEPT;
+CONSTCD11 bool operator<=(const year_month& x, const year_month& y) NOEXCEPT;
+CONSTCD11 bool operator>=(const year_month& x, const year_month& y) NOEXCEPT;
+
+CONSTCD14 year_month operator+(const year_month& ym, const months& dm) NOEXCEPT;
+CONSTCD14 year_month operator+(const months& dm, const year_month& ym) NOEXCEPT;
+CONSTCD14 year_month operator-(const year_month& ym, const months& dm) NOEXCEPT;
+
+CONSTCD11 months operator-(const year_month& x, const year_month& y) NOEXCEPT;
+CONSTCD11 year_month operator+(const year_month& ym, const years& dy) NOEXCEPT;
+CONSTCD11 year_month operator+(const years& dy, const year_month& ym) NOEXCEPT;
+CONSTCD11 year_month operator-(const year_month& ym, const years& dy) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year_month& ym);
+
+// month_day
+
+class month_day
+{
+ julian::month m_;
+ julian::day d_;
+
+public:
+ CONSTCD11 month_day(const julian::month& m, const julian::day& d) NOEXCEPT;
+
+ CONSTCD11 julian::month month() const NOEXCEPT;
+ CONSTCD11 julian::day day() const NOEXCEPT;
+
+ CONSTCD14 bool ok() const NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const month_day& x, const month_day& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const month_day& x, const month_day& y) NOEXCEPT;
+CONSTCD11 bool operator< (const month_day& x, const month_day& y) NOEXCEPT;
+CONSTCD11 bool operator> (const month_day& x, const month_day& y) NOEXCEPT;
+CONSTCD11 bool operator<=(const month_day& x, const month_day& y) NOEXCEPT;
+CONSTCD11 bool operator>=(const month_day& x, const month_day& y) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const month_day& md);
+
+// month_day_last
+
+class month_day_last
+{
+ julian::month m_;
+
+public:
+ CONSTCD11 explicit month_day_last(const julian::month& m) NOEXCEPT;
+
+ CONSTCD11 julian::month month() const NOEXCEPT;
+ CONSTCD11 bool ok() const NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const month_day_last& x, const month_day_last& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const month_day_last& x, const month_day_last& y) NOEXCEPT;
+CONSTCD11 bool operator< (const month_day_last& x, const month_day_last& y) NOEXCEPT;
+CONSTCD11 bool operator> (const month_day_last& x, const month_day_last& y) NOEXCEPT;
+CONSTCD11 bool operator<=(const month_day_last& x, const month_day_last& y) NOEXCEPT;
+CONSTCD11 bool operator>=(const month_day_last& x, const month_day_last& y) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const month_day_last& mdl);
+
+// month_weekday
+
+class month_weekday
+{
+ julian::month m_;
+ julian::weekday_indexed wdi_;
+public:
+ CONSTCD11 month_weekday(const julian::month& m,
+ const julian::weekday_indexed& wdi) NOEXCEPT;
+
+ CONSTCD11 julian::month month() const NOEXCEPT;
+ CONSTCD11 julian::weekday_indexed weekday_indexed() const NOEXCEPT;
+
+ CONSTCD11 bool ok() const NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const month_weekday& x, const month_weekday& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const month_weekday& x, const month_weekday& y) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const month_weekday& mwd);
+
+// month_weekday_last
+
+class month_weekday_last
+{
+ julian::month m_;
+ julian::weekday_last wdl_;
+
+public:
+ CONSTCD11 month_weekday_last(const julian::month& m,
+ const julian::weekday_last& wd) NOEXCEPT;
+
+ CONSTCD11 julian::month month() const NOEXCEPT;
+ CONSTCD11 julian::weekday_last weekday_last() const NOEXCEPT;
+
+ CONSTCD11 bool ok() const NOEXCEPT;
+};
+
+CONSTCD11
+ bool operator==(const month_weekday_last& x, const month_weekday_last& y) NOEXCEPT;
+CONSTCD11
+ bool operator!=(const month_weekday_last& x, const month_weekday_last& y) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const month_weekday_last& mwdl);
+
+// class year_month_day
+
+class year_month_day
+{
+ julian::year y_;
+ julian::month m_;
+ julian::day d_;
+
+public:
+ CONSTCD11 year_month_day(const julian::year& y, const julian::month& m,
+ const julian::day& d) NOEXCEPT;
+ CONSTCD14 year_month_day(const year_month_day_last& ymdl) NOEXCEPT;
+
+ CONSTCD14 year_month_day(sys_days dp) NOEXCEPT;
+ CONSTCD14 explicit year_month_day(local_days dp) NOEXCEPT;
+
+ CONSTCD14 year_month_day& operator+=(const months& m) NOEXCEPT;
+ CONSTCD14 year_month_day& operator-=(const months& m) NOEXCEPT;
+ CONSTCD14 year_month_day& operator+=(const years& y) NOEXCEPT;
+ CONSTCD14 year_month_day& operator-=(const years& y) NOEXCEPT;
+
+ CONSTCD11 julian::year year() const NOEXCEPT;
+ CONSTCD11 julian::month month() const NOEXCEPT;
+ CONSTCD11 julian::day day() const NOEXCEPT;
+
+ CONSTCD14 operator sys_days() const NOEXCEPT;
+ CONSTCD14 explicit operator local_days() const NOEXCEPT;
+ CONSTCD14 bool ok() const NOEXCEPT;
+
+private:
+ static CONSTCD14 year_month_day from_days(days dp) NOEXCEPT;
+ CONSTCD14 days to_days() const NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const year_month_day& x, const year_month_day& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const year_month_day& x, const year_month_day& y) NOEXCEPT;
+CONSTCD11 bool operator< (const year_month_day& x, const year_month_day& y) NOEXCEPT;
+CONSTCD11 bool operator> (const year_month_day& x, const year_month_day& y) NOEXCEPT;
+CONSTCD11 bool operator<=(const year_month_day& x, const year_month_day& y) NOEXCEPT;
+CONSTCD11 bool operator>=(const year_month_day& x, const year_month_day& y) NOEXCEPT;
+
+CONSTCD14 year_month_day operator+(const year_month_day& ymd, const months& dm) NOEXCEPT;
+CONSTCD14 year_month_day operator+(const months& dm, const year_month_day& ymd) NOEXCEPT;
+CONSTCD14 year_month_day operator-(const year_month_day& ymd, const months& dm) NOEXCEPT;
+CONSTCD11 year_month_day operator+(const year_month_day& ymd, const years& dy) NOEXCEPT;
+CONSTCD11 year_month_day operator+(const years& dy, const year_month_day& ymd) NOEXCEPT;
+CONSTCD11 year_month_day operator-(const year_month_day& ymd, const years& dy) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year_month_day& ymd);
+
+// year_month_day_last
+
+class year_month_day_last
+{
+ julian::year y_;
+ julian::month_day_last mdl_;
+
+public:
+ CONSTCD11 year_month_day_last(const julian::year& y,
+ const julian::month_day_last& mdl) NOEXCEPT;
+
+ CONSTCD14 year_month_day_last& operator+=(const months& m) NOEXCEPT;
+ CONSTCD14 year_month_day_last& operator-=(const months& m) NOEXCEPT;
+ CONSTCD14 year_month_day_last& operator+=(const years& y) NOEXCEPT;
+ CONSTCD14 year_month_day_last& operator-=(const years& y) NOEXCEPT;
+
+ CONSTCD11 julian::year year() const NOEXCEPT;
+ CONSTCD11 julian::month month() const NOEXCEPT;
+ CONSTCD11 julian::month_day_last month_day_last() const NOEXCEPT;
+ CONSTCD14 julian::day day() const NOEXCEPT;
+
+ CONSTCD14 operator sys_days() const NOEXCEPT;
+ CONSTCD14 explicit operator local_days() const NOEXCEPT;
+ CONSTCD11 bool ok() const NOEXCEPT;
+};
+
+CONSTCD11
+ bool operator==(const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT;
+CONSTCD11
+ bool operator!=(const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT;
+CONSTCD11
+ bool operator< (const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT;
+CONSTCD11
+ bool operator> (const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT;
+CONSTCD11
+ bool operator<=(const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT;
+CONSTCD11
+ bool operator>=(const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT;
+
+CONSTCD14
+year_month_day_last
+operator+(const year_month_day_last& ymdl, const months& dm) NOEXCEPT;
+
+CONSTCD14
+year_month_day_last
+operator+(const months& dm, const year_month_day_last& ymdl) NOEXCEPT;
+
+CONSTCD11
+year_month_day_last
+operator+(const year_month_day_last& ymdl, const years& dy) NOEXCEPT;
+
+CONSTCD11
+year_month_day_last
+operator+(const years& dy, const year_month_day_last& ymdl) NOEXCEPT;
+
+CONSTCD14
+year_month_day_last
+operator-(const year_month_day_last& ymdl, const months& dm) NOEXCEPT;
+
+CONSTCD11
+year_month_day_last
+operator-(const year_month_day_last& ymdl, const years& dy) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year_month_day_last& ymdl);
+
+// year_month_weekday
+
+class year_month_weekday
+{
+ julian::year y_;
+ julian::month m_;
+ julian::weekday_indexed wdi_;
+
+public:
+ CONSTCD11 year_month_weekday(const julian::year& y, const julian::month& m,
+ const julian::weekday_indexed& wdi) NOEXCEPT;
+ CONSTCD14 year_month_weekday(const sys_days& dp) NOEXCEPT;
+ CONSTCD14 explicit year_month_weekday(const local_days& dp) NOEXCEPT;
+
+ CONSTCD14 year_month_weekday& operator+=(const months& m) NOEXCEPT;
+ CONSTCD14 year_month_weekday& operator-=(const months& m) NOEXCEPT;
+ CONSTCD14 year_month_weekday& operator+=(const years& y) NOEXCEPT;
+ CONSTCD14 year_month_weekday& operator-=(const years& y) NOEXCEPT;
+
+ CONSTCD11 julian::year year() const NOEXCEPT;
+ CONSTCD11 julian::month month() const NOEXCEPT;
+ CONSTCD11 julian::weekday weekday() const NOEXCEPT;
+ CONSTCD11 unsigned index() const NOEXCEPT;
+ CONSTCD11 julian::weekday_indexed weekday_indexed() const NOEXCEPT;
+
+ CONSTCD14 operator sys_days() const NOEXCEPT;
+ CONSTCD14 explicit operator local_days() const NOEXCEPT;
+ CONSTCD14 bool ok() const NOEXCEPT;
+
+private:
+ static CONSTCD14 year_month_weekday from_days(days dp) NOEXCEPT;
+ CONSTCD14 days to_days() const NOEXCEPT;
+};
+
+CONSTCD11
+ bool operator==(const year_month_weekday& x, const year_month_weekday& y) NOEXCEPT;
+CONSTCD11
+ bool operator!=(const year_month_weekday& x, const year_month_weekday& y) NOEXCEPT;
+
+CONSTCD14
+year_month_weekday
+operator+(const year_month_weekday& ymwd, const months& dm) NOEXCEPT;
+
+CONSTCD14
+year_month_weekday
+operator+(const months& dm, const year_month_weekday& ymwd) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday
+operator+(const year_month_weekday& ymwd, const years& dy) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday
+operator+(const years& dy, const year_month_weekday& ymwd) NOEXCEPT;
+
+CONSTCD14
+year_month_weekday
+operator-(const year_month_weekday& ymwd, const months& dm) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday
+operator-(const year_month_weekday& ymwd, const years& dy) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year_month_weekday& ymwdi);
+
+// year_month_weekday_last
+
+class year_month_weekday_last
+{
+ julian::year y_;
+ julian::month m_;
+ julian::weekday_last wdl_;
+
+public:
+ CONSTCD11 year_month_weekday_last(const julian::year& y, const julian::month& m,
+ const julian::weekday_last& wdl) NOEXCEPT;
+
+ CONSTCD14 year_month_weekday_last& operator+=(const months& m) NOEXCEPT;
+ CONSTCD14 year_month_weekday_last& operator-=(const months& m) NOEXCEPT;
+ CONSTCD14 year_month_weekday_last& operator+=(const years& y) NOEXCEPT;
+ CONSTCD14 year_month_weekday_last& operator-=(const years& y) NOEXCEPT;
+
+ CONSTCD11 julian::year year() const NOEXCEPT;
+ CONSTCD11 julian::month month() const NOEXCEPT;
+ CONSTCD11 julian::weekday weekday() const NOEXCEPT;
+ CONSTCD11 julian::weekday_last weekday_last() const NOEXCEPT;
+
+ CONSTCD14 operator sys_days() const NOEXCEPT;
+ CONSTCD14 explicit operator local_days() const NOEXCEPT;
+ CONSTCD11 bool ok() const NOEXCEPT;
+
+private:
+ CONSTCD14 days to_days() const NOEXCEPT;
+};
+
+CONSTCD11
+bool
+operator==(const year_month_weekday_last& x, const year_month_weekday_last& y) NOEXCEPT;
+
+CONSTCD11
+bool
+operator!=(const year_month_weekday_last& x, const year_month_weekday_last& y) NOEXCEPT;
+
+CONSTCD14
+year_month_weekday_last
+operator+(const year_month_weekday_last& ymwdl, const months& dm) NOEXCEPT;
+
+CONSTCD14
+year_month_weekday_last
+operator+(const months& dm, const year_month_weekday_last& ymwdl) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday_last
+operator+(const year_month_weekday_last& ymwdl, const years& dy) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday_last
+operator+(const years& dy, const year_month_weekday_last& ymwdl) NOEXCEPT;
+
+CONSTCD14
+year_month_weekday_last
+operator-(const year_month_weekday_last& ymwdl, const months& dm) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday_last
+operator-(const year_month_weekday_last& ymwdl, const years& dy) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year_month_weekday_last& ymwdl);
+
+#if !defined(_MSC_VER) || (_MSC_VER >= 1900)
+inline namespace literals
+{
+
+CONSTCD11 julian::day operator "" _d(unsigned long long d) NOEXCEPT;
+CONSTCD11 julian::year operator "" _y(unsigned long long y) NOEXCEPT;
+
+// CONSTDATA julian::month jan{1};
+// CONSTDATA julian::month feb{2};
+// CONSTDATA julian::month mar{3};
+// CONSTDATA julian::month apr{4};
+// CONSTDATA julian::month may{5};
+// CONSTDATA julian::month jun{6};
+// CONSTDATA julian::month jul{7};
+// CONSTDATA julian::month aug{8};
+// CONSTDATA julian::month sep{9};
+// CONSTDATA julian::month oct{10};
+// CONSTDATA julian::month nov{11};
+// CONSTDATA julian::month dec{12};
+
+} // inline namespace literals
+#endif // !defined(_MSC_VER) || (_MSC_VER >= 1900)
+
+//----------------+
+// Implementation |
+//----------------+
+
+// day
+
+CONSTCD11 inline day::day(unsigned d) NOEXCEPT : d_(static_cast<unsigned char>(d)) {}
+CONSTCD14 inline day& day::operator++() NOEXCEPT {++d_; return *this;}
+CONSTCD14 inline day day::operator++(int) NOEXCEPT {auto tmp(*this); ++(*this); return tmp;}
+CONSTCD14 inline day& day::operator--() NOEXCEPT {--d_; return *this;}
+CONSTCD14 inline day day::operator--(int) NOEXCEPT {auto tmp(*this); --(*this); return tmp;}
+CONSTCD14 inline day& day::operator+=(const days& d) NOEXCEPT {*this = *this + d; return *this;}
+CONSTCD14 inline day& day::operator-=(const days& d) NOEXCEPT {*this = *this - d; return *this;}
+CONSTCD11 inline day::operator unsigned() const NOEXCEPT {return d_;}
+CONSTCD11 inline bool day::ok() const NOEXCEPT {return 1 <= d_ && d_ <= 31;}
+
+CONSTCD11
+inline
+bool
+operator==(const day& x, const day& y) NOEXCEPT
+{
+ return static_cast<unsigned>(x) == static_cast<unsigned>(y);
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const day& x, const day& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+CONSTCD11
+inline
+bool
+operator<(const day& x, const day& y) NOEXCEPT
+{
+ return static_cast<unsigned>(x) < static_cast<unsigned>(y);
+}
+
+CONSTCD11
+inline
+bool
+operator>(const day& x, const day& y) NOEXCEPT
+{
+ return y < x;
+}
+
+CONSTCD11
+inline
+bool
+operator<=(const day& x, const day& y) NOEXCEPT
+{
+ return !(y < x);
+}
+
+CONSTCD11
+inline
+bool
+operator>=(const day& x, const day& y) NOEXCEPT
+{
+ return !(x < y);
+}
+
+CONSTCD11
+inline
+days
+operator-(const day& x, const day& y) NOEXCEPT
+{
+ return days{static_cast<days::rep>(static_cast<unsigned>(x)
+ - static_cast<unsigned>(y))};
+}
+
+CONSTCD11
+inline
+day
+operator+(const day& x, const days& y) NOEXCEPT
+{
+ return day{static_cast<unsigned>(x) + static_cast<unsigned>(y.count())};
+}
+
+CONSTCD11
+inline
+day
+operator+(const days& x, const day& y) NOEXCEPT
+{
+ return y + x;
+}
+
+CONSTCD11
+inline
+day
+operator-(const day& x, const days& y) NOEXCEPT
+{
+ return x + -y;
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const day& d)
+{
+ date::detail::save_ostream<CharT, Traits> _(os);
+ os.fill('0');
+ os.flags(std::ios::dec | std::ios::right);
+ os.width(2);
+ os << static_cast<unsigned>(d);
+ return os;
+}
+
+// month
+
+CONSTCD11 inline month::month(unsigned m) NOEXCEPT : m_(static_cast<decltype(m_)>(m)) {}
+CONSTCD14 inline month& month::operator++() NOEXCEPT {if (++m_ == 13) m_ = 1; return *this;}
+CONSTCD14 inline month month::operator++(int) NOEXCEPT {auto tmp(*this); ++(*this); return tmp;}
+CONSTCD14 inline month& month::operator--() NOEXCEPT {if (--m_ == 0) m_ = 12; return *this;}
+CONSTCD14 inline month month::operator--(int) NOEXCEPT {auto tmp(*this); --(*this); return tmp;}
+
+CONSTCD14
+inline
+month&
+month::operator+=(const months& m) NOEXCEPT
+{
+ *this = *this + m;
+ return *this;
+}
+
+CONSTCD14
+inline
+month&
+month::operator-=(const months& m) NOEXCEPT
+{
+ *this = *this - m;
+ return *this;
+}
+
+CONSTCD11 inline month::operator unsigned() const NOEXCEPT {return m_;}
+CONSTCD11 inline bool month::ok() const NOEXCEPT {return 1 <= m_ && m_ <= 12;}
+
+CONSTCD11
+inline
+bool
+operator==(const month& x, const month& y) NOEXCEPT
+{
+ return static_cast<unsigned>(x) == static_cast<unsigned>(y);
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const month& x, const month& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+CONSTCD11
+inline
+bool
+operator<(const month& x, const month& y) NOEXCEPT
+{
+ return static_cast<unsigned>(x) < static_cast<unsigned>(y);
+}
+
+CONSTCD11
+inline
+bool
+operator>(const month& x, const month& y) NOEXCEPT
+{
+ return y < x;
+}
+
+CONSTCD11
+inline
+bool
+operator<=(const month& x, const month& y) NOEXCEPT
+{
+ return !(y < x);
+}
+
+CONSTCD11
+inline
+bool
+operator>=(const month& x, const month& y) NOEXCEPT
+{
+ return !(x < y);
+}
+
+CONSTCD14
+inline
+months
+operator-(const month& x, const month& y) NOEXCEPT
+{
+ auto const d = static_cast<unsigned>(x) - static_cast<unsigned>(y);
+ return months(d <= 11 ? d : d + 12);
+}
+
+CONSTCD14
+inline
+month
+operator+(const month& x, const months& y) NOEXCEPT
+{
+ auto const mu = static_cast<long long>(static_cast<unsigned>(x)) - 1 + y.count();
+ auto const yr = (mu >= 0 ? mu : mu-11) / 12;
+ return month{static_cast<unsigned>(mu - yr * 12 + 1)};
+}
+
+CONSTCD14
+inline
+month
+operator+(const months& x, const month& y) NOEXCEPT
+{
+ return y + x;
+}
+
+CONSTCD14
+inline
+month
+operator-(const month& x, const months& y) NOEXCEPT
+{
+ return x + -y;
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const month& m)
+{
+ switch (static_cast<unsigned>(m))
+ {
+ case 1:
+ os << "Jan";
+ break;
+ case 2:
+ os << "Feb";
+ break;
+ case 3:
+ os << "Mar";
+ break;
+ case 4:
+ os << "Apr";
+ break;
+ case 5:
+ os << "May";
+ break;
+ case 6:
+ os << "Jun";
+ break;
+ case 7:
+ os << "Jul";
+ break;
+ case 8:
+ os << "Aug";
+ break;
+ case 9:
+ os << "Sep";
+ break;
+ case 10:
+ os << "Oct";
+ break;
+ case 11:
+ os << "Nov";
+ break;
+ case 12:
+ os << "Dec";
+ break;
+ default:
+ os << static_cast<unsigned>(m) << " is not a valid month";
+ break;
+ }
+ return os;
+}
+
+// year
+
+CONSTCD11 inline year::year(int y) NOEXCEPT : y_(static_cast<decltype(y_)>(y)) {}
+CONSTCD14 inline year& year::operator++() NOEXCEPT {++y_; return *this;}
+CONSTCD14 inline year year::operator++(int) NOEXCEPT {auto tmp(*this); ++(*this); return tmp;}
+CONSTCD14 inline year& year::operator--() NOEXCEPT {--y_; return *this;}
+CONSTCD14 inline year year::operator--(int) NOEXCEPT {auto tmp(*this); --(*this); return tmp;}
+CONSTCD14 inline year& year::operator+=(const years& y) NOEXCEPT {*this = *this + y; return *this;}
+CONSTCD14 inline year& year::operator-=(const years& y) NOEXCEPT {*this = *this - y; return *this;}
+
+CONSTCD11
+inline
+bool
+year::is_leap() const NOEXCEPT
+{
+ return y_ % 4 == 0;
+}
+
+CONSTCD11 inline year::operator int() const NOEXCEPT {return y_;}
+CONSTCD11 inline bool year::ok() const NOEXCEPT {return true;}
+
+CONSTCD11
+inline
+year
+year::min() NOEXCEPT
+{
+ return year{std::numeric_limits<short>::min()};
+}
+
+CONSTCD11
+inline
+year
+year::max() NOEXCEPT
+{
+ return year{std::numeric_limits<short>::max()};
+}
+
+CONSTCD11
+inline
+bool
+operator==(const year& x, const year& y) NOEXCEPT
+{
+ return static_cast<int>(x) == static_cast<int>(y);
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const year& x, const year& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+CONSTCD11
+inline
+bool
+operator<(const year& x, const year& y) NOEXCEPT
+{
+ return static_cast<int>(x) < static_cast<int>(y);
+}
+
+CONSTCD11
+inline
+bool
+operator>(const year& x, const year& y) NOEXCEPT
+{
+ return y < x;
+}
+
+CONSTCD11
+inline
+bool
+operator<=(const year& x, const year& y) NOEXCEPT
+{
+ return !(y < x);
+}
+
+CONSTCD11
+inline
+bool
+operator>=(const year& x, const year& y) NOEXCEPT
+{
+ return !(x < y);
+}
+
+CONSTCD11
+inline
+years
+operator-(const year& x, const year& y) NOEXCEPT
+{
+ return years{static_cast<int>(x) - static_cast<int>(y)};
+}
+
+CONSTCD11
+inline
+year
+operator+(const year& x, const years& y) NOEXCEPT
+{
+ return year{static_cast<int>(x) + y.count()};
+}
+
+CONSTCD11
+inline
+year
+operator+(const years& x, const year& y) NOEXCEPT
+{
+ return y + x;
+}
+
+CONSTCD11
+inline
+year
+operator-(const year& x, const years& y) NOEXCEPT
+{
+ return year{static_cast<int>(x) - y.count()};
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year& y)
+{
+ date::detail::save_ostream<CharT, Traits> _(os);
+ os.fill('0');
+ os.flags(std::ios::dec | std::ios::internal);
+ os.width(4 + (y < year{0}));
+ os << static_cast<int>(y);
+ return os;
+}
+
+// weekday
+
+CONSTCD11
+inline
+unsigned char
+weekday::weekday_from_days(int z) NOEXCEPT
+{
+ return static_cast<unsigned char>(static_cast<unsigned>(
+ z >= -4 ? (z+4) % 7 : (z+5) % 7 + 6));
+}
+
+CONSTCD11
+inline
+weekday::weekday(unsigned wd) NOEXCEPT
+ : wd_(static_cast<decltype(wd_)>(wd))
+ {}
+
+CONSTCD11
+inline
+weekday::weekday(const sys_days& dp) NOEXCEPT
+ : wd_(weekday_from_days(dp.time_since_epoch().count()))
+ {}
+
+CONSTCD11
+inline
+weekday::weekday(const local_days& dp) NOEXCEPT
+ : wd_(weekday_from_days(dp.time_since_epoch().count()))
+ {}
+
+CONSTCD14 inline weekday& weekday::operator++() NOEXCEPT {if (++wd_ == 7) wd_ = 0; return *this;}
+CONSTCD14 inline weekday weekday::operator++(int) NOEXCEPT {auto tmp(*this); ++(*this); return tmp;}
+CONSTCD14 inline weekday& weekday::operator--() NOEXCEPT {if (wd_-- == 0) wd_ = 6; return *this;}
+CONSTCD14 inline weekday weekday::operator--(int) NOEXCEPT {auto tmp(*this); --(*this); return tmp;}
+
+CONSTCD14
+inline
+weekday&
+weekday::operator+=(const days& d) NOEXCEPT
+{
+ *this = *this + d;
+ return *this;
+}
+
+CONSTCD14
+inline
+weekday&
+weekday::operator-=(const days& d) NOEXCEPT
+{
+ *this = *this - d;
+ return *this;
+}
+
+CONSTCD11
+inline
+weekday::operator unsigned() const NOEXCEPT
+{
+ return static_cast<unsigned>(wd_);
+}
+
+CONSTCD11 inline bool weekday::ok() const NOEXCEPT {return wd_ <= 6;}
+
+CONSTCD11
+inline
+bool
+operator==(const weekday& x, const weekday& y) NOEXCEPT
+{
+ return static_cast<unsigned>(x) == static_cast<unsigned>(y);
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const weekday& x, const weekday& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+CONSTCD14
+inline
+days
+operator-(const weekday& x, const weekday& y) NOEXCEPT
+{
+ auto const diff = static_cast<unsigned>(x) - static_cast<unsigned>(y);
+ return days{diff <= 6 ? diff : diff + 7};
+}
+
+CONSTCD14
+inline
+weekday
+operator+(const weekday& x, const days& y) NOEXCEPT
+{
+ auto const wdu = static_cast<long long>(static_cast<unsigned>(x)) + y.count();
+ auto const wk = (wdu >= 0 ? wdu : wdu-6) / 7;
+ return weekday{static_cast<unsigned>(wdu - wk * 7)};
+}
+
+CONSTCD14
+inline
+weekday
+operator+(const days& x, const weekday& y) NOEXCEPT
+{
+ return y + x;
+}
+
+CONSTCD14
+inline
+weekday
+operator-(const weekday& x, const days& y) NOEXCEPT
+{
+ return x + -y;
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const weekday& wd)
+{
+ switch (static_cast<unsigned>(wd))
+ {
+ case 0:
+ os << "Sun";
+ break;
+ case 1:
+ os << "Mon";
+ break;
+ case 2:
+ os << "Tue";
+ break;
+ case 3:
+ os << "Wed";
+ break;
+ case 4:
+ os << "Thu";
+ break;
+ case 5:
+ os << "Fri";
+ break;
+ case 6:
+ os << "Sat";
+ break;
+ default:
+ os << static_cast<unsigned>(wd) << " is not a valid weekday";
+ break;
+ }
+ return os;
+}
+
+#if !defined(_MSC_VER) || (_MSC_VER >= 1900)
+inline namespace literals
+{
+
+CONSTCD11
+inline
+julian::day
+operator "" _d(unsigned long long d) NOEXCEPT
+{
+ return julian::day{static_cast<unsigned>(d)};
+}
+
+CONSTCD11
+inline
+julian::year
+operator "" _y(unsigned long long y) NOEXCEPT
+{
+ return julian::year(static_cast<int>(y));
+}
+#endif // !defined(_MSC_VER) || (_MSC_VER >= 1900)
+
+CONSTDATA julian::last_spec last{};
+
+CONSTDATA julian::month jan{1};
+CONSTDATA julian::month feb{2};
+CONSTDATA julian::month mar{3};
+CONSTDATA julian::month apr{4};
+CONSTDATA julian::month may{5};
+CONSTDATA julian::month jun{6};
+CONSTDATA julian::month jul{7};
+CONSTDATA julian::month aug{8};
+CONSTDATA julian::month sep{9};
+CONSTDATA julian::month oct{10};
+CONSTDATA julian::month nov{11};
+CONSTDATA julian::month dec{12};
+
+CONSTDATA julian::weekday sun{0u};
+CONSTDATA julian::weekday mon{1u};
+CONSTDATA julian::weekday tue{2u};
+CONSTDATA julian::weekday wed{3u};
+CONSTDATA julian::weekday thu{4u};
+CONSTDATA julian::weekday fri{5u};
+CONSTDATA julian::weekday sat{6u};
+
+#if !defined(_MSC_VER) || (_MSC_VER >= 1900)
+} // inline namespace literals
+#endif
+
+// weekday_indexed
+
+CONSTCD11
+inline
+weekday
+weekday_indexed::weekday() const NOEXCEPT
+{
+ return julian::weekday{static_cast<unsigned>(wd_)};
+}
+
+CONSTCD11 inline unsigned weekday_indexed::index() const NOEXCEPT {return index_;}
+
+CONSTCD11
+inline
+bool
+weekday_indexed::ok() const NOEXCEPT
+{
+ return weekday().ok() && 1 <= index_ && index_ <= 5;
+}
+
+CONSTCD11
+inline
+weekday_indexed::weekday_indexed(const julian::weekday& wd, unsigned index) NOEXCEPT
+ : wd_(static_cast<decltype(wd_)>(static_cast<unsigned>(wd)))
+ , index_(static_cast<decltype(index_)>(index))
+ {}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const weekday_indexed& wdi)
+{
+ return os << wdi.weekday() << '[' << wdi.index() << ']';
+}
+
+CONSTCD11
+inline
+weekday_indexed
+weekday::operator[](unsigned index) const NOEXCEPT
+{
+ return {*this, index};
+}
+
+CONSTCD11
+inline
+bool
+operator==(const weekday_indexed& x, const weekday_indexed& y) NOEXCEPT
+{
+ return x.weekday() == y.weekday() && x.index() == y.index();
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const weekday_indexed& x, const weekday_indexed& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+// weekday_last
+
+CONSTCD11 inline julian::weekday weekday_last::weekday() const NOEXCEPT {return wd_;}
+CONSTCD11 inline bool weekday_last::ok() const NOEXCEPT {return wd_.ok();}
+CONSTCD11 inline weekday_last::weekday_last(const julian::weekday& wd) NOEXCEPT : wd_(wd) {}
+
+CONSTCD11
+inline
+bool
+operator==(const weekday_last& x, const weekday_last& y) NOEXCEPT
+{
+ return x.weekday() == y.weekday();
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const weekday_last& x, const weekday_last& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const weekday_last& wdl)
+{
+ return os << wdl.weekday() << "[last]";
+}
+
+CONSTCD11
+inline
+weekday_last
+weekday::operator[](last_spec) const NOEXCEPT
+{
+ return weekday_last{*this};
+}
+
+// year_month
+
+CONSTCD11
+inline
+year_month::year_month(const julian::year& y, const julian::month& m) NOEXCEPT
+ : y_(y)
+ , m_(m)
+ {}
+
+CONSTCD11 inline year year_month::year() const NOEXCEPT {return y_;}
+CONSTCD11 inline month year_month::month() const NOEXCEPT {return m_;}
+CONSTCD11 inline bool year_month::ok() const NOEXCEPT {return y_.ok() && m_.ok();}
+
+CONSTCD14
+inline
+year_month&
+year_month::operator+=(const months& dm) NOEXCEPT
+{
+ *this = *this + dm;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month&
+year_month::operator-=(const months& dm) NOEXCEPT
+{
+ *this = *this - dm;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month&
+year_month::operator+=(const years& dy) NOEXCEPT
+{
+ *this = *this + dy;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month&
+year_month::operator-=(const years& dy) NOEXCEPT
+{
+ *this = *this - dy;
+ return *this;
+}
+
+CONSTCD11
+inline
+bool
+operator==(const year_month& x, const year_month& y) NOEXCEPT
+{
+ return x.year() == y.year() && x.month() == y.month();
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const year_month& x, const year_month& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+CONSTCD11
+inline
+bool
+operator<(const year_month& x, const year_month& y) NOEXCEPT
+{
+ return x.year() < y.year() ? true
+ : (x.year() > y.year() ? false
+ : (x.month() < y.month()));
+}
+
+CONSTCD11
+inline
+bool
+operator>(const year_month& x, const year_month& y) NOEXCEPT
+{
+ return y < x;
+}
+
+CONSTCD11
+inline
+bool
+operator<=(const year_month& x, const year_month& y) NOEXCEPT
+{
+ return !(y < x);
+}
+
+CONSTCD11
+inline
+bool
+operator>=(const year_month& x, const year_month& y) NOEXCEPT
+{
+ return !(x < y);
+}
+
+CONSTCD14
+inline
+year_month
+operator+(const year_month& ym, const months& dm) NOEXCEPT
+{
+ auto dmi = static_cast<int>(static_cast<unsigned>(ym.month())) - 1 + dm.count();
+ auto dy = (dmi >= 0 ? dmi : dmi-11) / 12;
+ dmi = dmi - dy * 12 + 1;
+ return (ym.year() + years(dy)) / month(static_cast<unsigned>(dmi));
+}
+
+CONSTCD14
+inline
+year_month
+operator+(const months& dm, const year_month& ym) NOEXCEPT
+{
+ return ym + dm;
+}
+
+CONSTCD14
+inline
+year_month
+operator-(const year_month& ym, const months& dm) NOEXCEPT
+{
+ return ym + -dm;
+}
+
+CONSTCD11
+inline
+months
+operator-(const year_month& x, const year_month& y) NOEXCEPT
+{
+ return (x.year() - y.year()) +
+ months(static_cast<unsigned>(x.month()) - static_cast<unsigned>(y.month()));
+}
+
+CONSTCD11
+inline
+year_month
+operator+(const year_month& ym, const years& dy) NOEXCEPT
+{
+ return (ym.year() + dy) / ym.month();
+}
+
+CONSTCD11
+inline
+year_month
+operator+(const years& dy, const year_month& ym) NOEXCEPT
+{
+ return ym + dy;
+}
+
+CONSTCD11
+inline
+year_month
+operator-(const year_month& ym, const years& dy) NOEXCEPT
+{
+ return ym + -dy;
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year_month& ym)
+{
+ return os << ym.year() << '/' << ym.month();
+}
+
+// month_day
+
+CONSTCD11
+inline
+month_day::month_day(const julian::month& m, const julian::day& d) NOEXCEPT
+ : m_(m)
+ , d_(d)
+ {}
+
+CONSTCD11 inline julian::month month_day::month() const NOEXCEPT {return m_;}
+CONSTCD11 inline julian::day month_day::day() const NOEXCEPT {return d_;}
+
+CONSTCD14
+inline
+bool
+month_day::ok() const NOEXCEPT
+{
+ CONSTDATA julian::day d[] = {
+ julian::day(31), julian::day(29), julian::day(31), julian::day(30),
+ julian::day(31), julian::day(30), julian::day(31), julian::day(31),
+ julian::day(30), julian::day(31), julian::day(30), julian::day(31)
+ };
+ return m_.ok() && julian::day(1) <= d_ && d_ <= d[static_cast<unsigned>(m_)-1];
+}
+
+CONSTCD11
+inline
+bool
+operator==(const month_day& x, const month_day& y) NOEXCEPT
+{
+ return x.month() == y.month() && x.day() == y.day();
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const month_day& x, const month_day& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+CONSTCD11
+inline
+bool
+operator<(const month_day& x, const month_day& y) NOEXCEPT
+{
+ return x.month() < y.month() ? true
+ : (x.month() > y.month() ? false
+ : (x.day() < y.day()));
+}
+
+CONSTCD11
+inline
+bool
+operator>(const month_day& x, const month_day& y) NOEXCEPT
+{
+ return y < x;
+}
+
+CONSTCD11
+inline
+bool
+operator<=(const month_day& x, const month_day& y) NOEXCEPT
+{
+ return !(y < x);
+}
+
+CONSTCD11
+inline
+bool
+operator>=(const month_day& x, const month_day& y) NOEXCEPT
+{
+ return !(x < y);
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const month_day& md)
+{
+ return os << md.month() << '/' << md.day();
+}
+
+// month_day_last
+
+CONSTCD11 inline month month_day_last::month() const NOEXCEPT {return m_;}
+CONSTCD11 inline bool month_day_last::ok() const NOEXCEPT {return m_.ok();}
+CONSTCD11 inline month_day_last::month_day_last(const julian::month& m) NOEXCEPT : m_(m) {}
+
+CONSTCD11
+inline
+bool
+operator==(const month_day_last& x, const month_day_last& y) NOEXCEPT
+{
+ return x.month() == y.month();
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const month_day_last& x, const month_day_last& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+CONSTCD11
+inline
+bool
+operator<(const month_day_last& x, const month_day_last& y) NOEXCEPT
+{
+ return x.month() < y.month();
+}
+
+CONSTCD11
+inline
+bool
+operator>(const month_day_last& x, const month_day_last& y) NOEXCEPT
+{
+ return y < x;
+}
+
+CONSTCD11
+inline
+bool
+operator<=(const month_day_last& x, const month_day_last& y) NOEXCEPT
+{
+ return !(y < x);
+}
+
+CONSTCD11
+inline
+bool
+operator>=(const month_day_last& x, const month_day_last& y) NOEXCEPT
+{
+ return !(x < y);
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const month_day_last& mdl)
+{
+ return os << mdl.month() << "/last";
+}
+
+// month_weekday
+
+CONSTCD11
+inline
+month_weekday::month_weekday(const julian::month& m,
+ const julian::weekday_indexed& wdi) NOEXCEPT
+ : m_(m)
+ , wdi_(wdi)
+ {}
+
+CONSTCD11 inline month month_weekday::month() const NOEXCEPT {return m_;}
+
+CONSTCD11
+inline
+weekday_indexed
+month_weekday::weekday_indexed() const NOEXCEPT
+{
+ return wdi_;
+}
+
+CONSTCD11
+inline
+bool
+month_weekday::ok() const NOEXCEPT
+{
+ return m_.ok() && wdi_.ok();
+}
+
+CONSTCD11
+inline
+bool
+operator==(const month_weekday& x, const month_weekday& y) NOEXCEPT
+{
+ return x.month() == y.month() && x.weekday_indexed() == y.weekday_indexed();
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const month_weekday& x, const month_weekday& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const month_weekday& mwd)
+{
+ return os << mwd.month() << '/' << mwd.weekday_indexed();
+}
+
+// month_weekday_last
+
+CONSTCD11
+inline
+month_weekday_last::month_weekday_last(const julian::month& m,
+ const julian::weekday_last& wdl) NOEXCEPT
+ : m_(m)
+ , wdl_(wdl)
+ {}
+
+CONSTCD11 inline month month_weekday_last::month() const NOEXCEPT {return m_;}
+
+CONSTCD11
+inline
+weekday_last
+month_weekday_last::weekday_last() const NOEXCEPT
+{
+ return wdl_;
+}
+
+CONSTCD11
+inline
+bool
+month_weekday_last::ok() const NOEXCEPT
+{
+ return m_.ok() && wdl_.ok();
+}
+
+CONSTCD11
+inline
+bool
+operator==(const month_weekday_last& x, const month_weekday_last& y) NOEXCEPT
+{
+ return x.month() == y.month() && x.weekday_last() == y.weekday_last();
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const month_weekday_last& x, const month_weekday_last& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const month_weekday_last& mwdl)
+{
+ return os << mwdl.month() << '/' << mwdl.weekday_last();
+}
+
+// year_month_day_last
+
+CONSTCD11
+inline
+year_month_day_last::year_month_day_last(const julian::year& y,
+ const julian::month_day_last& mdl) NOEXCEPT
+ : y_(y)
+ , mdl_(mdl)
+ {}
+
+CONSTCD14
+inline
+year_month_day_last&
+year_month_day_last::operator+=(const months& m) NOEXCEPT
+{
+ *this = *this + m;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month_day_last&
+year_month_day_last::operator-=(const months& m) NOEXCEPT
+{
+ *this = *this - m;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month_day_last&
+year_month_day_last::operator+=(const years& y) NOEXCEPT
+{
+ *this = *this + y;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month_day_last&
+year_month_day_last::operator-=(const years& y) NOEXCEPT
+{
+ *this = *this - y;
+ return *this;
+}
+
+CONSTCD11 inline year year_month_day_last::year() const NOEXCEPT {return y_;}
+CONSTCD11 inline month year_month_day_last::month() const NOEXCEPT {return mdl_.month();}
+
+CONSTCD11
+inline
+month_day_last
+year_month_day_last::month_day_last() const NOEXCEPT
+{
+ return mdl_;
+}
+
+CONSTCD14
+inline
+day
+year_month_day_last::day() const NOEXCEPT
+{
+ CONSTDATA julian::day d[] = {
+ julian::day(31), julian::day(28), julian::day(31), julian::day(30),
+ julian::day(31), julian::day(30), julian::day(31), julian::day(31),
+ julian::day(30), julian::day(31), julian::day(30), julian::day(31)
+ };
+ return month() != feb || !y_.is_leap() ? d[static_cast<unsigned>(month())-1] : julian::day(29);
+}
+
+CONSTCD14
+inline
+year_month_day_last::operator sys_days() const NOEXCEPT
+{
+ return sys_days(year()/month()/day());
+}
+
+CONSTCD14
+inline
+year_month_day_last::operator local_days() const NOEXCEPT
+{
+ return local_days(year()/month()/day());
+}
+
+CONSTCD11
+inline
+bool
+year_month_day_last::ok() const NOEXCEPT
+{
+ return y_.ok() && mdl_.ok();
+}
+
+CONSTCD11
+inline
+bool
+operator==(const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT
+{
+ return x.year() == y.year() && x.month_day_last() == y.month_day_last();
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+CONSTCD11
+inline
+bool
+operator<(const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT
+{
+ return x.year() < y.year() ? true
+ : (x.year() > y.year() ? false
+ : (x.month_day_last() < y.month_day_last()));
+}
+
+CONSTCD11
+inline
+bool
+operator>(const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT
+{
+ return y < x;
+}
+
+CONSTCD11
+inline
+bool
+operator<=(const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT
+{
+ return !(y < x);
+}
+
+CONSTCD11
+inline
+bool
+operator>=(const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT
+{
+ return !(x < y);
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year_month_day_last& ymdl)
+{
+ return os << ymdl.year() << '/' << ymdl.month_day_last();
+}
+
+CONSTCD14
+inline
+year_month_day_last
+operator+(const year_month_day_last& ymdl, const months& dm) NOEXCEPT
+{
+ return (ymdl.year() / ymdl.month() + dm) / last;
+}
+
+CONSTCD14
+inline
+year_month_day_last
+operator+(const months& dm, const year_month_day_last& ymdl) NOEXCEPT
+{
+ return ymdl + dm;
+}
+
+CONSTCD14
+inline
+year_month_day_last
+operator-(const year_month_day_last& ymdl, const months& dm) NOEXCEPT
+{
+ return ymdl + (-dm);
+}
+
+CONSTCD11
+inline
+year_month_day_last
+operator+(const year_month_day_last& ymdl, const years& dy) NOEXCEPT
+{
+ return {ymdl.year()+dy, ymdl.month_day_last()};
+}
+
+CONSTCD11
+inline
+year_month_day_last
+operator+(const years& dy, const year_month_day_last& ymdl) NOEXCEPT
+{
+ return ymdl + dy;
+}
+
+CONSTCD11
+inline
+year_month_day_last
+operator-(const year_month_day_last& ymdl, const years& dy) NOEXCEPT
+{
+ return ymdl + (-dy);
+}
+
+// year_month_day
+
+CONSTCD11
+inline
+year_month_day::year_month_day(const julian::year& y, const julian::month& m,
+ const julian::day& d) NOEXCEPT
+ : y_(y)
+ , m_(m)
+ , d_(d)
+ {}
+
+CONSTCD14
+inline
+year_month_day::year_month_day(const year_month_day_last& ymdl) NOEXCEPT
+ : y_(ymdl.year())
+ , m_(ymdl.month())
+ , d_(ymdl.day())
+ {}
+
+CONSTCD14
+inline
+year_month_day::year_month_day(sys_days dp) NOEXCEPT
+ : year_month_day(from_days(dp.time_since_epoch()))
+ {}
+
+CONSTCD14
+inline
+year_month_day::year_month_day(local_days dp) NOEXCEPT
+ : year_month_day(from_days(dp.time_since_epoch()))
+ {}
+
+CONSTCD11 inline year year_month_day::year() const NOEXCEPT {return y_;}
+CONSTCD11 inline month year_month_day::month() const NOEXCEPT {return m_;}
+CONSTCD11 inline day year_month_day::day() const NOEXCEPT {return d_;}
+
+CONSTCD14
+inline
+year_month_day&
+year_month_day::operator+=(const months& m) NOEXCEPT
+{
+ *this = *this + m;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month_day&
+year_month_day::operator-=(const months& m) NOEXCEPT
+{
+ *this = *this - m;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month_day&
+year_month_day::operator+=(const years& y) NOEXCEPT
+{
+ *this = *this + y;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month_day&
+year_month_day::operator-=(const years& y) NOEXCEPT
+{
+ *this = *this - y;
+ return *this;
+}
+
+CONSTCD14
+inline
+days
+year_month_day::to_days() const NOEXCEPT
+{
+ static_assert(std::numeric_limits<unsigned>::digits >= 18,
+ "This algorithm has not been ported to a 16 bit unsigned integer");
+ static_assert(std::numeric_limits<int>::digits >= 20,
+ "This algorithm has not been ported to a 16 bit signed integer");
+ auto const y = static_cast<int>(y_) - (m_ <= feb);
+ auto const m = static_cast<unsigned>(m_);
+ auto const d = static_cast<unsigned>(d_);
+ auto const era = (y >= 0 ? y : y-3) / 4;
+ auto const yoe = static_cast<unsigned>(y - era * 4); // [0, 3]
+ auto const doy = (153*(m > 2 ? m-3 : m+9) + 2)/5 + d-1; // [0, 365]
+ auto const doe = yoe * 365 + doy; // [0, 1460]
+ return days{era * 1461 + static_cast<int>(doe) - 719470};
+}
+
+CONSTCD14
+inline
+year_month_day::operator sys_days() const NOEXCEPT
+{
+ return sys_days{to_days()};
+}
+
+CONSTCD14
+inline
+year_month_day::operator local_days() const NOEXCEPT
+{
+ return local_days{to_days()};
+}
+
+CONSTCD14
+inline
+bool
+year_month_day::ok() const NOEXCEPT
+{
+ if (!(y_.ok() && m_.ok()))
+ return false;
+ return julian::day(1) <= d_ && d_ <= (y_/m_/last).day();
+}
+
+CONSTCD11
+inline
+bool
+operator==(const year_month_day& x, const year_month_day& y) NOEXCEPT
+{
+ return x.year() == y.year() && x.month() == y.month() && x.day() == y.day();
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const year_month_day& x, const year_month_day& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+CONSTCD11
+inline
+bool
+operator<(const year_month_day& x, const year_month_day& y) NOEXCEPT
+{
+ return x.year() < y.year() ? true
+ : (x.year() > y.year() ? false
+ : (x.month() < y.month() ? true
+ : (x.month() > y.month() ? false
+ : (x.day() < y.day()))));
+}
+
+CONSTCD11
+inline
+bool
+operator>(const year_month_day& x, const year_month_day& y) NOEXCEPT
+{
+ return y < x;
+}
+
+CONSTCD11
+inline
+bool
+operator<=(const year_month_day& x, const year_month_day& y) NOEXCEPT
+{
+ return !(y < x);
+}
+
+CONSTCD11
+inline
+bool
+operator>=(const year_month_day& x, const year_month_day& y) NOEXCEPT
+{
+ return !(x < y);
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year_month_day& ymd)
+{
+ date::detail::save_ostream<CharT, Traits> _(os);
+ os.fill('0');
+ os.flags(std::ios::dec | std::ios::right);
+ os << ymd.year() << '-';
+ os.width(2);
+ os << static_cast<unsigned>(ymd.month()) << '-';
+ os << ymd.day();
+ return os;
+}
+
+CONSTCD14
+inline
+year_month_day
+year_month_day::from_days(days dp) NOEXCEPT
+{
+ static_assert(std::numeric_limits<unsigned>::digits >= 18,
+ "This algorithm has not been ported to a 16 bit unsigned integer");
+ static_assert(std::numeric_limits<int>::digits >= 20,
+ "This algorithm has not been ported to a 16 bit signed integer");
+ auto const z = dp.count() + 719470;
+ auto const era = (z >= 0 ? z : z - 1460) / 1461;
+ auto const doe = static_cast<unsigned>(z - era * 1461); // [0, 1460]
+ auto const yoe = (doe - doe/1460) / 365; // [0, 3]
+ auto const y = static_cast<sys_days::rep>(yoe) + era * 4;
+ auto const doy = doe - 365*yoe; // [0, 365]
+ auto const mp = (5*doy + 2)/153; // [0, 11]
+ auto const d = doy - (153*mp+2)/5 + 1; // [1, 31]
+ auto const m = mp < 10 ? mp+3 : mp-9; // [1, 12]
+ return year_month_day{julian::year{y + (m <= 2)}, julian::month(m), julian::day(d)};
+}
+
+CONSTCD14
+inline
+year_month_day
+operator+(const year_month_day& ymd, const months& dm) NOEXCEPT
+{
+ return (ymd.year() / ymd.month() + dm) / ymd.day();
+}
+
+CONSTCD14
+inline
+year_month_day
+operator+(const months& dm, const year_month_day& ymd) NOEXCEPT
+{
+ return ymd + dm;
+}
+
+CONSTCD14
+inline
+year_month_day
+operator-(const year_month_day& ymd, const months& dm) NOEXCEPT
+{
+ return ymd + (-dm);
+}
+
+CONSTCD11
+inline
+year_month_day
+operator+(const year_month_day& ymd, const years& dy) NOEXCEPT
+{
+ return (ymd.year() + dy) / ymd.month() / ymd.day();
+}
+
+CONSTCD11
+inline
+year_month_day
+operator+(const years& dy, const year_month_day& ymd) NOEXCEPT
+{
+ return ymd + dy;
+}
+
+CONSTCD11
+inline
+year_month_day
+operator-(const year_month_day& ymd, const years& dy) NOEXCEPT
+{
+ return ymd + (-dy);
+}
+
+// year_month_weekday
+
+CONSTCD11
+inline
+year_month_weekday::year_month_weekday(const julian::year& y, const julian::month& m,
+ const julian::weekday_indexed& wdi)
+ NOEXCEPT
+ : y_(y)
+ , m_(m)
+ , wdi_(wdi)
+ {}
+
+CONSTCD14
+inline
+year_month_weekday::year_month_weekday(const sys_days& dp) NOEXCEPT
+ : year_month_weekday(from_days(dp.time_since_epoch()))
+ {}
+
+CONSTCD14
+inline
+year_month_weekday::year_month_weekday(const local_days& dp) NOEXCEPT
+ : year_month_weekday(from_days(dp.time_since_epoch()))
+ {}
+
+CONSTCD14
+inline
+year_month_weekday&
+year_month_weekday::operator+=(const months& m) NOEXCEPT
+{
+ *this = *this + m;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month_weekday&
+year_month_weekday::operator-=(const months& m) NOEXCEPT
+{
+ *this = *this - m;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month_weekday&
+year_month_weekday::operator+=(const years& y) NOEXCEPT
+{
+ *this = *this + y;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month_weekday&
+year_month_weekday::operator-=(const years& y) NOEXCEPT
+{
+ *this = *this - y;
+ return *this;
+}
+
+CONSTCD11 inline year year_month_weekday::year() const NOEXCEPT {return y_;}
+CONSTCD11 inline month year_month_weekday::month() const NOEXCEPT {return m_;}
+
+CONSTCD11
+inline
+weekday
+year_month_weekday::weekday() const NOEXCEPT
+{
+ return wdi_.weekday();
+}
+
+CONSTCD11
+inline
+unsigned
+year_month_weekday::index() const NOEXCEPT
+{
+ return wdi_.index();
+}
+
+CONSTCD11
+inline
+weekday_indexed
+year_month_weekday::weekday_indexed() const NOEXCEPT
+{
+ return wdi_;
+}
+
+CONSTCD14
+inline
+year_month_weekday::operator sys_days() const NOEXCEPT
+{
+ return sys_days{to_days()};
+}
+
+CONSTCD14
+inline
+year_month_weekday::operator local_days() const NOEXCEPT
+{
+ return local_days{to_days()};
+}
+
+CONSTCD14
+inline
+bool
+year_month_weekday::ok() const NOEXCEPT
+{
+ if (!y_.ok() || !m_.ok() || !wdi_.weekday().ok() || wdi_.index() < 1)
+ return false;
+ if (wdi_.index() <= 4)
+ return true;
+ auto d2 = wdi_.weekday() - julian::weekday(y_/m_/1) + days((wdi_.index()-1)*7 + 1);
+ return static_cast<unsigned>(d2.count()) <= static_cast<unsigned>((y_/m_/last).day());
+}
+
+CONSTCD14
+inline
+year_month_weekday
+year_month_weekday::from_days(days d) NOEXCEPT
+{
+ sys_days dp{d};
+ auto const wd = julian::weekday(dp);
+ auto const ymd = year_month_day(dp);
+ return {ymd.year(), ymd.month(), wd[(static_cast<unsigned>(ymd.day())-1)/7+1]};
+}
+
+CONSTCD14
+inline
+days
+year_month_weekday::to_days() const NOEXCEPT
+{
+ auto d = sys_days(y_/m_/1);
+ return (d + (wdi_.weekday() - julian::weekday(d) + days{(wdi_.index()-1)*7})
+ ).time_since_epoch();
+}
+
+CONSTCD11
+inline
+bool
+operator==(const year_month_weekday& x, const year_month_weekday& y) NOEXCEPT
+{
+ return x.year() == y.year() && x.month() == y.month() &&
+ x.weekday_indexed() == y.weekday_indexed();
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const year_month_weekday& x, const year_month_weekday& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year_month_weekday& ymwdi)
+{
+ return os << ymwdi.year() << '/' << ymwdi.month()
+ << '/' << ymwdi.weekday_indexed();
+}
+
+CONSTCD14
+inline
+year_month_weekday
+operator+(const year_month_weekday& ymwd, const months& dm) NOEXCEPT
+{
+ return (ymwd.year() / ymwd.month() + dm) / ymwd.weekday_indexed();
+}
+
+CONSTCD14
+inline
+year_month_weekday
+operator+(const months& dm, const year_month_weekday& ymwd) NOEXCEPT
+{
+ return ymwd + dm;
+}
+
+CONSTCD14
+inline
+year_month_weekday
+operator-(const year_month_weekday& ymwd, const months& dm) NOEXCEPT
+{
+ return ymwd + (-dm);
+}
+
+CONSTCD11
+inline
+year_month_weekday
+operator+(const year_month_weekday& ymwd, const years& dy) NOEXCEPT
+{
+ return {ymwd.year()+dy, ymwd.month(), ymwd.weekday_indexed()};
+}
+
+CONSTCD11
+inline
+year_month_weekday
+operator+(const years& dy, const year_month_weekday& ymwd) NOEXCEPT
+{
+ return ymwd + dy;
+}
+
+CONSTCD11
+inline
+year_month_weekday
+operator-(const year_month_weekday& ymwd, const years& dy) NOEXCEPT
+{
+ return ymwd + (-dy);
+}
+
+// year_month_weekday_last
+
+CONSTCD11
+inline
+year_month_weekday_last::year_month_weekday_last(const julian::year& y,
+ const julian::month& m,
+ const julian::weekday_last& wdl) NOEXCEPT
+ : y_(y)
+ , m_(m)
+ , wdl_(wdl)
+ {}
+
+CONSTCD14
+inline
+year_month_weekday_last&
+year_month_weekday_last::operator+=(const months& m) NOEXCEPT
+{
+ *this = *this + m;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month_weekday_last&
+year_month_weekday_last::operator-=(const months& m) NOEXCEPT
+{
+ *this = *this - m;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month_weekday_last&
+year_month_weekday_last::operator+=(const years& y) NOEXCEPT
+{
+ *this = *this + y;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month_weekday_last&
+year_month_weekday_last::operator-=(const years& y) NOEXCEPT
+{
+ *this = *this - y;
+ return *this;
+}
+
+CONSTCD11 inline year year_month_weekday_last::year() const NOEXCEPT {return y_;}
+CONSTCD11 inline month year_month_weekday_last::month() const NOEXCEPT {return m_;}
+
+CONSTCD11
+inline
+weekday
+year_month_weekday_last::weekday() const NOEXCEPT
+{
+ return wdl_.weekday();
+}
+
+CONSTCD11
+inline
+weekday_last
+year_month_weekday_last::weekday_last() const NOEXCEPT
+{
+ return wdl_;
+}
+
+CONSTCD14
+inline
+year_month_weekday_last::operator sys_days() const NOEXCEPT
+{
+ return sys_days{to_days()};
+}
+
+CONSTCD14
+inline
+year_month_weekday_last::operator local_days() const NOEXCEPT
+{
+ return local_days{to_days()};
+}
+
+CONSTCD11
+inline
+bool
+year_month_weekday_last::ok() const NOEXCEPT
+{
+ return y_.ok() && m_.ok() && wdl_.ok();
+}
+
+CONSTCD14
+inline
+days
+year_month_weekday_last::to_days() const NOEXCEPT
+{
+ auto const d = sys_days(y_/m_/last);
+ return (d - (julian::weekday{d} - wdl_.weekday())).time_since_epoch();
+}
+
+CONSTCD11
+inline
+bool
+operator==(const year_month_weekday_last& x, const year_month_weekday_last& y) NOEXCEPT
+{
+ return x.year() == y.year() && x.month() == y.month() &&
+ x.weekday_last() == y.weekday_last();
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const year_month_weekday_last& x, const year_month_weekday_last& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year_month_weekday_last& ymwdl)
+{
+ return os << ymwdl.year() << '/' << ymwdl.month() << '/' << ymwdl.weekday_last();
+}
+
+CONSTCD14
+inline
+year_month_weekday_last
+operator+(const year_month_weekday_last& ymwdl, const months& dm) NOEXCEPT
+{
+ return (ymwdl.year() / ymwdl.month() + dm) / ymwdl.weekday_last();
+}
+
+CONSTCD14
+inline
+year_month_weekday_last
+operator+(const months& dm, const year_month_weekday_last& ymwdl) NOEXCEPT
+{
+ return ymwdl + dm;
+}
+
+CONSTCD14
+inline
+year_month_weekday_last
+operator-(const year_month_weekday_last& ymwdl, const months& dm) NOEXCEPT
+{
+ return ymwdl + (-dm);
+}
+
+CONSTCD11
+inline
+year_month_weekday_last
+operator+(const year_month_weekday_last& ymwdl, const years& dy) NOEXCEPT
+{
+ return {ymwdl.year()+dy, ymwdl.month(), ymwdl.weekday_last()};
+}
+
+CONSTCD11
+inline
+year_month_weekday_last
+operator+(const years& dy, const year_month_weekday_last& ymwdl) NOEXCEPT
+{
+ return ymwdl + dy;
+}
+
+CONSTCD11
+inline
+year_month_weekday_last
+operator-(const year_month_weekday_last& ymwdl, const years& dy) NOEXCEPT
+{
+ return ymwdl + (-dy);
+}
+
+// year_month from operator/()
+
+CONSTCD11
+inline
+year_month
+operator/(const year& y, const month& m) NOEXCEPT
+{
+ return {y, m};
+}
+
+CONSTCD11
+inline
+year_month
+operator/(const year& y, int m) NOEXCEPT
+{
+ return y / month(static_cast<unsigned>(m));
+}
+
+// month_day from operator/()
+
+CONSTCD11
+inline
+month_day
+operator/(const month& m, const day& d) NOEXCEPT
+{
+ return {m, d};
+}
+
+CONSTCD11
+inline
+month_day
+operator/(const day& d, const month& m) NOEXCEPT
+{
+ return m / d;
+}
+
+CONSTCD11
+inline
+month_day
+operator/(const month& m, int d) NOEXCEPT
+{
+ return m / day(static_cast<unsigned>(d));
+}
+
+CONSTCD11
+inline
+month_day
+operator/(int m, const day& d) NOEXCEPT
+{
+ return month(static_cast<unsigned>(m)) / d;
+}
+
+CONSTCD11 inline month_day operator/(const day& d, int m) NOEXCEPT {return m / d;}
+
+// month_day_last from operator/()
+
+CONSTCD11
+inline
+month_day_last
+operator/(const month& m, last_spec) NOEXCEPT
+{
+ return month_day_last{m};
+}
+
+CONSTCD11
+inline
+month_day_last
+operator/(last_spec, const month& m) NOEXCEPT
+{
+ return m/last;
+}
+
+CONSTCD11
+inline
+month_day_last
+operator/(int m, last_spec) NOEXCEPT
+{
+ return month(static_cast<unsigned>(m))/last;
+}
+
+CONSTCD11
+inline
+month_day_last
+operator/(last_spec, int m) NOEXCEPT
+{
+ return m/last;
+}
+
+// month_weekday from operator/()
+
+CONSTCD11
+inline
+month_weekday
+operator/(const month& m, const weekday_indexed& wdi) NOEXCEPT
+{
+ return {m, wdi};
+}
+
+CONSTCD11
+inline
+month_weekday
+operator/(const weekday_indexed& wdi, const month& m) NOEXCEPT
+{
+ return m / wdi;
+}
+
+CONSTCD11
+inline
+month_weekday
+operator/(int m, const weekday_indexed& wdi) NOEXCEPT
+{
+ return month(static_cast<unsigned>(m)) / wdi;
+}
+
+CONSTCD11
+inline
+month_weekday
+operator/(const weekday_indexed& wdi, int m) NOEXCEPT
+{
+ return m / wdi;
+}
+
+// month_weekday_last from operator/()
+
+CONSTCD11
+inline
+month_weekday_last
+operator/(const month& m, const weekday_last& wdl) NOEXCEPT
+{
+ return {m, wdl};
+}
+
+CONSTCD11
+inline
+month_weekday_last
+operator/(const weekday_last& wdl, const month& m) NOEXCEPT
+{
+ return m / wdl;
+}
+
+CONSTCD11
+inline
+month_weekday_last
+operator/(int m, const weekday_last& wdl) NOEXCEPT
+{
+ return month(static_cast<unsigned>(m)) / wdl;
+}
+
+CONSTCD11
+inline
+month_weekday_last
+operator/(const weekday_last& wdl, int m) NOEXCEPT
+{
+ return m / wdl;
+}
+
+// year_month_day from operator/()
+
+CONSTCD11
+inline
+year_month_day
+operator/(const year_month& ym, const day& d) NOEXCEPT
+{
+ return {ym.year(), ym.month(), d};
+}
+
+CONSTCD11
+inline
+year_month_day
+operator/(const year_month& ym, int d) NOEXCEPT
+{
+ return ym / day(static_cast<unsigned>(d));
+}
+
+CONSTCD11
+inline
+year_month_day
+operator/(const year& y, const month_day& md) NOEXCEPT
+{
+ return y / md.month() / md.day();
+}
+
+CONSTCD11
+inline
+year_month_day
+operator/(int y, const month_day& md) NOEXCEPT
+{
+ return year(y) / md;
+}
+
+CONSTCD11
+inline
+year_month_day
+operator/(const month_day& md, const year& y) NOEXCEPT
+{
+ return y / md;
+}
+
+CONSTCD11
+inline
+year_month_day
+operator/(const month_day& md, int y) NOEXCEPT
+{
+ return year(y) / md;
+}
+
+// year_month_day_last from operator/()
+
+CONSTCD11
+inline
+year_month_day_last
+operator/(const year_month& ym, last_spec) NOEXCEPT
+{
+ return {ym.year(), month_day_last{ym.month()}};
+}
+
+CONSTCD11
+inline
+year_month_day_last
+operator/(const year& y, const month_day_last& mdl) NOEXCEPT
+{
+ return {y, mdl};
+}
+
+CONSTCD11
+inline
+year_month_day_last
+operator/(int y, const month_day_last& mdl) NOEXCEPT
+{
+ return year(y) / mdl;
+}
+
+CONSTCD11
+inline
+year_month_day_last
+operator/(const month_day_last& mdl, const year& y) NOEXCEPT
+{
+ return y / mdl;
+}
+
+CONSTCD11
+inline
+year_month_day_last
+operator/(const month_day_last& mdl, int y) NOEXCEPT
+{
+ return year(y) / mdl;
+}
+
+// year_month_weekday from operator/()
+
+CONSTCD11
+inline
+year_month_weekday
+operator/(const year_month& ym, const weekday_indexed& wdi) NOEXCEPT
+{
+ return {ym.year(), ym.month(), wdi};
+}
+
+CONSTCD11
+inline
+year_month_weekday
+operator/(const year& y, const month_weekday& mwd) NOEXCEPT
+{
+ return {y, mwd.month(), mwd.weekday_indexed()};
+}
+
+CONSTCD11
+inline
+year_month_weekday
+operator/(int y, const month_weekday& mwd) NOEXCEPT
+{
+ return year(y) / mwd;
+}
+
+CONSTCD11
+inline
+year_month_weekday
+operator/(const month_weekday& mwd, const year& y) NOEXCEPT
+{
+ return y / mwd;
+}
+
+CONSTCD11
+inline
+year_month_weekday
+operator/(const month_weekday& mwd, int y) NOEXCEPT
+{
+ return year(y) / mwd;
+}
+
+// year_month_weekday_last from operator/()
+
+CONSTCD11
+inline
+year_month_weekday_last
+operator/(const year_month& ym, const weekday_last& wdl) NOEXCEPT
+{
+ return {ym.year(), ym.month(), wdl};
+}
+
+CONSTCD11
+inline
+year_month_weekday_last
+operator/(const year& y, const month_weekday_last& mwdl) NOEXCEPT
+{
+ return {y, mwdl.month(), mwdl.weekday_last()};
+}
+
+CONSTCD11
+inline
+year_month_weekday_last
+operator/(int y, const month_weekday_last& mwdl) NOEXCEPT
+{
+ return year(y) / mwdl;
+}
+
+CONSTCD11
+inline
+year_month_weekday_last
+operator/(const month_weekday_last& mwdl, const year& y) NOEXCEPT
+{
+ return y / mwdl;
+}
+
+CONSTCD11
+inline
+year_month_weekday_last
+operator/(const month_weekday_last& mwdl, int y) NOEXCEPT
+{
+ return year(y) / mwdl;
+}
+
+} // namespace julian
+
+#endif // JULIAN_H
diff --git a/src/third-party/date/include/date/ptz.h b/src/third-party/date/include/date/ptz.h
new file mode 100644
index 0000000..3dca4f0
--- /dev/null
+++ b/src/third-party/date/include/date/ptz.h
@@ -0,0 +1,950 @@
+#ifndef PTZ_H
+#define PTZ_H
+
+// The MIT License (MIT)
+//
+// Copyright (c) 2017 Howard Hinnant
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+
+// This header allows Posix-style time zones as specified for TZ here:
+// http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03
+//
+// Posix::time_zone can be constructed with a posix-style string and then used in
+// a zoned_time like so:
+//
+// zoned_time<system_clock::duration, Posix::time_zone> zt{"EST5EDT,M3.2.0,M11.1.0",
+// system_clock::now()};
+// or:
+//
+// Posix::time_zone tz{"EST5EDT,M3.2.0,M11.1.0"};
+// zoned_time<system_clock::duration, Posix::time_zone> zt{tz, system_clock::now()};
+//
+// In C++17 CTAD simplifies this to:
+//
+// Posix::time_zone tz{"EST5EDT,M3.2.0,M11.1.0"};
+// zoned_time zt{tz, system_clock::now()};
+//
+// Extension to the Posix rules to allow a constant daylight saving offset:
+//
+// If the rule set is missing (everything starting with ','), then
+// there must be exactly one abbreviation (std or daylight) with
+// length 3 or greater, and that will be used as the constant offset. If
+// there are two, the std abbreviation is silently set to "", and the
+// result is constant daylight saving. If there are zero abbreviations
+// with no rule set, an exception is thrown.
+//
+// Example:
+// "EST5" yields a constant offset of -5h with 0h save and "EST abbreviation.
+// "5EDT" yields a constant offset of -4h with 1h save and "EDT" abbreviation.
+// "EST5EDT" and "5EDT4" are both equal to "5EDT".
+//
+// Note, Posix-style time zones are not recommended for all of the reasons described here:
+// https://stackoverflow.com/tags/timezone/info
+//
+// They are provided here as a non-trivial custom time zone example, and if you really
+// have to have Posix time zones, you're welcome to use this one.
+
+#include "date/tz.h"
+#include <algorithm>
+#include <cctype>
+#include <ostream>
+#include <string>
+
+namespace Posix
+{
+
+namespace detail
+{
+
+#if HAS_STRING_VIEW
+
+using string_t = std::string_view;
+
+#else // !HAS_STRING_VIEW
+
+using string_t = std::string;
+
+#endif // !HAS_STRING_VIEW
+
+class rule;
+
+void throw_invalid(const string_t& s, unsigned i, const string_t& message);
+unsigned read_date(const string_t& s, unsigned i, rule& r);
+unsigned read_name(const string_t& s, unsigned i, std::string& name);
+unsigned read_signed_time(const string_t& s, unsigned i, std::chrono::seconds& t);
+unsigned read_unsigned_time(const string_t& s, unsigned i, std::chrono::seconds& t);
+unsigned read_unsigned(const string_t& s, unsigned i, unsigned limit, unsigned& u,
+ const string_t& message = string_t{});
+
+class rule
+{
+ enum {off, J, M, N};
+
+ date::month m_;
+ date::weekday wd_;
+ unsigned short n_ : 14;
+ unsigned short mode_ : 2;
+ std::chrono::duration<std::int32_t> time_ = std::chrono::hours{2};
+
+public:
+ rule() : mode_(off) {}
+
+ bool ok() const {return mode_ != off;}
+ date::local_seconds operator()(date::year y) const;
+ std::string to_string() const;
+
+ friend std::ostream& operator<<(std::ostream& os, const rule& r);
+ friend unsigned read_date(const string_t& s, unsigned i, rule& r);
+ friend bool operator==(const rule& x, const rule& y);
+};
+
+inline
+bool
+operator==(const rule& x, const rule& y)
+{
+ if (x.mode_ != y.mode_)
+ return false;
+ switch (x.mode_)
+ {
+ case rule::J:
+ case rule::N:
+ return x.n_ == y.n_;
+ case rule::M:
+ return x.m_ == y.m_ && x.n_ == y.n_ && x.wd_ == y.wd_;
+ default:
+ return true;
+ }
+}
+
+inline
+bool
+operator!=(const rule& x, const rule& y)
+{
+ return !(x == y);
+}
+
+inline
+date::local_seconds
+rule::operator()(date::year y) const
+{
+ using date::local_days;
+ using date::January;
+ using date::days;
+ using date::last;
+ using sec = std::chrono::seconds;
+ date::local_seconds t;
+ switch (mode_)
+ {
+ case J:
+ t = local_days{y/January/0} + days{n_ + (y.is_leap() && n_ > 59)} + sec{time_};
+ break;
+ case M:
+ t = (n_ == 5 ? local_days{y/m_/wd_[last]} : local_days{y/m_/wd_[n_]}) + sec{time_};
+ break;
+ case N:
+ t = local_days{y/January/1} + days{n_} + sec{time_};
+ break;
+ default:
+ assert(!"rule called with bad mode");
+ }
+ return t;
+}
+
+inline
+std::string
+rule::to_string() const
+{
+ using namespace std::chrono;
+ auto print_offset = [](seconds off)
+ {
+ std::string nm;
+ if (off != hours{2})
+ {
+ date::hh_mm_ss<seconds> offset{off};
+ nm = '/';
+ nm += std::to_string(offset.hours().count());
+ if (offset.minutes() != minutes{0} || offset.seconds() != seconds{0})
+ {
+ nm += ':';
+ if (offset.minutes() < minutes{10})
+ nm += '0';
+ nm += std::to_string(offset.minutes().count());
+ if (offset.seconds() != seconds{0})
+ {
+ nm += ':';
+ if (offset.seconds() < seconds{10})
+ nm += '0';
+ nm += std::to_string(offset.seconds().count());
+ }
+ }
+ }
+ return nm;
+ };
+
+ std::string nm;
+ switch (mode_)
+ {
+ case rule::J:
+ nm = 'J';
+ nm += std::to_string(n_);
+ break;
+ case rule::M:
+ nm = 'M';
+ nm += std::to_string(static_cast<unsigned>(m_));
+ nm += '.';
+ nm += std::to_string(n_);
+ nm += '.';
+ nm += std::to_string(wd_.c_encoding());
+ break;
+ case rule::N:
+ nm = std::to_string(n_);
+ break;
+ default:
+ break;
+ }
+ nm += print_offset(time_);
+ return nm;
+}
+
+inline
+std::ostream&
+operator<<(std::ostream& os, const rule& r)
+{
+ switch (r.mode_)
+ {
+ case rule::J:
+ os << 'J' << r.n_ << date::format(" %T", r.time_);
+ break;
+ case rule::M:
+ if (r.n_ == 5)
+ os << r.m_/r.wd_[date::last];
+ else
+ os << r.m_/r.wd_[r.n_];
+ os << date::format(" %T", r.time_);
+ break;
+ case rule::N:
+ os << r.n_ << date::format(" %T", r.time_);
+ break;
+ default:
+ break;
+ }
+ return os;
+}
+
+} // namespace detail
+
+class time_zone
+{
+ std::string std_abbrev_;
+ std::string dst_abbrev_ = {};
+ std::chrono::seconds offset_;
+ std::chrono::seconds save_ = std::chrono::hours{1};
+ detail::rule start_rule_;
+ detail::rule end_rule_;
+
+public:
+ explicit time_zone(const detail::string_t& name);
+
+ template <class Duration>
+ date::sys_info get_info(date::sys_time<Duration> st) const;
+ template <class Duration>
+ date::local_info get_info(date::local_time<Duration> tp) const;
+
+ template <class Duration>
+ date::sys_time<typename std::common_type<Duration, std::chrono::seconds>::type>
+ to_sys(date::local_time<Duration> tp) const;
+
+ template <class Duration>
+ date::sys_time<typename std::common_type<Duration, std::chrono::seconds>::type>
+ to_sys(date::local_time<Duration> tp, date::choose z) const;
+
+ template <class Duration>
+ date::local_time<typename std::common_type<Duration, std::chrono::seconds>::type>
+ to_local(date::sys_time<Duration> tp) const;
+
+ friend std::ostream& operator<<(std::ostream& os, const time_zone& z);
+
+ const time_zone* operator->() const {return this;}
+
+ std::string name() const;
+
+ friend bool operator==(const time_zone& x, const time_zone& y);
+
+private:
+ date::sys_seconds get_start(date::year y) const;
+ date::sys_seconds get_prev_start(date::year y) const;
+ date::sys_seconds get_next_start(date::year y) const;
+ date::sys_seconds get_end(date::year y) const;
+ date::sys_seconds get_prev_end(date::year y) const;
+ date::sys_seconds get_next_end(date::year y) const;
+ date::sys_info contant_offset() const;
+};
+
+inline
+date::sys_seconds
+time_zone::get_start(date::year y) const
+{
+ return date::sys_seconds{(start_rule_(y) - offset_).time_since_epoch()};
+}
+
+inline
+date::sys_seconds
+time_zone::get_prev_start(date::year y) const
+{
+ return date::sys_seconds{(start_rule_(--y) - offset_).time_since_epoch()};
+}
+
+inline
+date::sys_seconds
+time_zone::get_next_start(date::year y) const
+{
+ return date::sys_seconds{(start_rule_(++y) - offset_).time_since_epoch()};
+}
+
+inline
+date::sys_seconds
+time_zone::get_end(date::year y) const
+{
+ return date::sys_seconds{(end_rule_(y) - (offset_ + save_)).time_since_epoch()};
+}
+
+inline
+date::sys_seconds
+time_zone::get_prev_end(date::year y) const
+{
+ return date::sys_seconds{(end_rule_(--y) - (offset_ + save_)).time_since_epoch()};
+}
+
+inline
+date::sys_seconds
+time_zone::get_next_end(date::year y) const
+{
+ return date::sys_seconds{(end_rule_(++y) - (offset_ + save_)).time_since_epoch()};
+}
+
+inline
+date::sys_info
+time_zone::contant_offset() const
+{
+ using date::year;
+ using date::sys_info;
+ using date::sys_days;
+ using date::January;
+ using date::December;
+ using date::last;
+ using std::chrono::minutes;
+ sys_info r;
+ r.begin = sys_days{year::min()/January/1};
+ r.end = sys_days{year::max()/December/last};
+ if (std_abbrev_.size() > 0)
+ {
+ r.abbrev = std_abbrev_;
+ r.offset = offset_;
+ r.save = {};
+ }
+ else
+ {
+ r.abbrev = dst_abbrev_;
+ r.offset = offset_ + save_;
+ r.save = date::ceil<minutes>(save_);
+ }
+ return r;
+}
+
+inline
+time_zone::time_zone(const detail::string_t& s)
+{
+ using detail::read_name;
+ using detail::read_signed_time;
+ using detail::throw_invalid;
+ auto i = read_name(s, 0, std_abbrev_);
+ auto std_name_i = i;
+ auto abbrev_name_i = i;
+ i = read_signed_time(s, i, offset_);
+ offset_ = -offset_;
+ if (i != s.size())
+ {
+ i = read_name(s, i, dst_abbrev_);
+ abbrev_name_i = i;
+ if (i != s.size())
+ {
+ if (s[i] != ',')
+ {
+ i = read_signed_time(s, i, save_);
+ save_ = -save_ - offset_;
+ }
+ if (i != s.size())
+ {
+ if (s[i] != ',')
+ throw_invalid(s, i, "Expecting end of string or ',' to start rule");
+ ++i;
+ i = read_date(s, i, start_rule_);
+ if (i == s.size() || s[i] != ',')
+ throw_invalid(s, i, "Expecting ',' and then the ending rule");
+ ++i;
+ i = read_date(s, i, end_rule_);
+ if (i != s.size())
+ throw_invalid(s, i, "Found unexpected trailing characters");
+ }
+ }
+ }
+ if (start_rule_.ok())
+ {
+ if (std_abbrev_.size() < 3)
+ throw_invalid(s, std_name_i, "Zone with rules must have a std"
+ " abbreviation of length 3 or greater");
+ if (dst_abbrev_.size() < 3)
+ throw_invalid(s, abbrev_name_i, "Zone with rules must have a daylight"
+ " abbreviation of length 3 or greater");
+ }
+ else
+ {
+ if (dst_abbrev_.size() >= 3)
+ {
+ std_abbrev_.clear();
+ }
+ else if (std_abbrev_.size() < 3)
+ {
+ throw_invalid(s, std_name_i, "Zone must have at least one abbreviation"
+ " of length 3 or greater");
+ }
+ else
+ {
+ dst_abbrev_.clear();
+ save_ = {};
+ }
+ }
+}
+
+template <class Duration>
+date::sys_info
+time_zone::get_info(date::sys_time<Duration> st) const
+{
+ using date::sys_info;
+ using date::year_month_day;
+ using date::sys_days;
+ using date::floor;
+ using date::ceil;
+ using date::days;
+ using date::year;
+ using date::January;
+ using date::December;
+ using date::last;
+ using std::chrono::minutes;
+ sys_info r{};
+ r.offset = offset_;
+ if (start_rule_.ok())
+ {
+ auto y = year_month_day{floor<days>(st)}.year();
+ if (st >= get_next_start(y))
+ ++y;
+ else if (st < get_prev_end(y))
+ --y;
+ auto start = get_start(y);
+ auto end = get_end(y);
+ if (start <= end) // (northern hemisphere)
+ {
+ if (start <= st && st < end)
+ {
+ r.begin = start;
+ r.end = end;
+ r.offset += save_;
+ r.save = ceil<minutes>(save_);
+ r.abbrev = dst_abbrev_;
+ }
+ else if (st < start)
+ {
+ r.begin = get_prev_end(y);
+ r.end = start;
+ r.abbrev = std_abbrev_;
+ }
+ else // st >= end
+ {
+ r.begin = end;
+ r.end = get_next_start(y);
+ r.abbrev = std_abbrev_;
+ }
+ }
+ else // end < start (southern hemisphere)
+ {
+ if (end <= st && st < start)
+ {
+ r.begin = end;
+ r.end = start;
+ r.abbrev = std_abbrev_;
+ }
+ else if (st < end)
+ {
+ r.begin = get_prev_start(y);
+ r.end = end;
+ r.offset += save_;
+ r.save = ceil<minutes>(save_);
+ r.abbrev = dst_abbrev_;
+ }
+ else // st >= start
+ {
+ r.begin = start;
+ r.end = get_next_end(y);
+ r.offset += save_;
+ r.save = ceil<minutes>(save_);
+ r.abbrev = dst_abbrev_;
+ }
+ }
+ }
+ else
+ r = contant_offset();
+ assert(r.begin <= st && st < r.end);
+ return r;
+}
+
+template <class Duration>
+date::local_info
+time_zone::get_info(date::local_time<Duration> tp) const
+{
+ using date::local_info;
+ using date::year_month_day;
+ using date::days;
+ using date::sys_days;
+ using date::sys_seconds;
+ using date::year;
+ using date::ceil;
+ using date::January;
+ using date::December;
+ using date::last;
+ using std::chrono::seconds;
+ using std::chrono::minutes;
+ local_info r{};
+ using date::floor;
+ if (start_rule_.ok())
+ {
+ auto y = year_month_day{floor<days>(tp)}.year();
+ auto start = get_start(y);
+ auto end = get_end(y);
+ auto utcs = sys_seconds{floor<seconds>(tp - offset_).time_since_epoch()};
+ auto utcd = sys_seconds{floor<seconds>(tp - (offset_ + save_)).time_since_epoch()};
+ auto northern = start <= end;
+ if ((utcs < start) != (utcd < start))
+ {
+ if (northern)
+ r.first.begin = get_prev_end(y);
+ else
+ r.first.begin = end;
+ r.first.end = start;
+ r.first.offset = offset_;
+ r.first.abbrev = std_abbrev_;
+ r.second.begin = start;
+ if (northern)
+ r.second.end = end;
+ else
+ r.second.end = get_next_end(y);
+ r.second.abbrev = dst_abbrev_;
+ r.second.offset = offset_ + save_;
+ r.second.save = ceil<minutes>(save_);
+ r.result = save_ > seconds{0} ? local_info::nonexistent
+ : local_info::ambiguous;
+ }
+ else if ((utcs < end) != (utcd < end))
+ {
+ if (northern)
+ r.first.begin = start;
+ else
+ r.first.begin = get_prev_start(y);
+ r.first.end = end;
+ r.first.offset = offset_ + save_;
+ r.first.save = ceil<minutes>(save_);
+ r.first.abbrev = dst_abbrev_;
+ r.second.begin = end;
+ if (northern)
+ r.second.end = get_next_start(y);
+ else
+ r.second.end = start;
+ r.second.abbrev = std_abbrev_;
+ r.second.offset = offset_;
+ r.result = save_ > seconds{0} ? local_info::ambiguous
+ : local_info::nonexistent;
+ }
+ else
+ r.first = get_info(utcs);
+ }
+ else
+ r.first = contant_offset();
+ return r;
+}
+
+template <class Duration>
+date::sys_time<typename std::common_type<Duration, std::chrono::seconds>::type>
+time_zone::to_sys(date::local_time<Duration> tp) const
+{
+ using date::local_info;
+ using date::sys_time;
+ using date::ambiguous_local_time;
+ using date::nonexistent_local_time;
+ auto i = get_info(tp);
+ if (i.result == local_info::nonexistent)
+ throw nonexistent_local_time(tp, i);
+ else if (i.result == local_info::ambiguous)
+ throw ambiguous_local_time(tp, i);
+ return sys_time<Duration>{tp.time_since_epoch()} - i.first.offset;
+}
+
+template <class Duration>
+date::sys_time<typename std::common_type<Duration, std::chrono::seconds>::type>
+time_zone::to_sys(date::local_time<Duration> tp, date::choose z) const
+{
+ using date::local_info;
+ using date::sys_time;
+ using date::choose;
+ auto i = get_info(tp);
+ if (i.result == local_info::nonexistent)
+ {
+ return i.first.end;
+ }
+ else if (i.result == local_info::ambiguous)
+ {
+ if (z == choose::latest)
+ return sys_time<Duration>{tp.time_since_epoch()} - i.second.offset;
+ }
+ return sys_time<Duration>{tp.time_since_epoch()} - i.first.offset;
+}
+
+template <class Duration>
+date::local_time<typename std::common_type<Duration, std::chrono::seconds>::type>
+time_zone::to_local(date::sys_time<Duration> tp) const
+{
+ using date::local_time;
+ using std::chrono::seconds;
+ using LT = local_time<typename std::common_type<Duration, seconds>::type>;
+ auto i = get_info(tp);
+ return LT{(tp + i.offset).time_since_epoch()};
+}
+
+inline
+std::ostream&
+operator<<(std::ostream& os, const time_zone& z)
+{
+ using date::operator<<;
+ os << '{';
+ os << z.std_abbrev_ << ", " << z.dst_abbrev_ << date::format(", %T, ", z.offset_)
+ << date::format("%T, [", z.save_) << z.start_rule_ << ", " << z.end_rule_ << ")}";
+ return os;
+}
+
+inline
+std::string
+time_zone::name() const
+{
+ using namespace date;
+ using namespace std::chrono;
+ auto print_abbrev = [](std::string const& nm)
+ {
+ if (std::any_of(nm.begin(), nm.end(),
+ [](char c)
+ {
+ return !std::isalpha(c);
+ }))
+ {
+ return '<' + nm + '>';
+ }
+ return nm;
+ };
+ auto print_offset = [](seconds off)
+ {
+ std::string nm;
+ hh_mm_ss<seconds> offset{-off};
+ if (offset.is_negative())
+ nm += '-';
+ nm += std::to_string(offset.hours().count());
+ if (offset.minutes() != minutes{0} || offset.seconds() != seconds{0})
+ {
+ nm += ':';
+ if (offset.minutes() < minutes{10})
+ nm += '0';
+ nm += std::to_string(offset.minutes().count());
+ if (offset.seconds() != seconds{0})
+ {
+ nm += ':';
+ if (offset.seconds() < seconds{10})
+ nm += '0';
+ nm += std::to_string(offset.seconds().count());
+ }
+ }
+ return nm;
+ };
+ auto nm = print_abbrev(std_abbrev_);
+ nm += print_offset(offset_);
+ if (!dst_abbrev_.empty())
+ {
+ nm += print_abbrev(dst_abbrev_);
+ if (save_ != hours{1})
+ nm += print_offset(offset_+save_);
+ if (start_rule_.ok())
+ {
+ nm += ',';
+ nm += start_rule_.to_string();
+ nm += ',';
+ nm += end_rule_.to_string();
+ }
+ }
+ return nm;
+}
+
+inline
+bool
+operator==(const time_zone& x, const time_zone& y)
+{
+ return x.std_abbrev_ == y.std_abbrev_ &&
+ x.dst_abbrev_ == y. dst_abbrev_ &&
+ x.offset_ == y.offset_ &&
+ x.save_ == y.save_ &&
+ x.start_rule_ == y.start_rule_ &&
+ x.end_rule_ == y.end_rule_;
+}
+
+inline
+bool
+operator!=(const time_zone& x, const time_zone& y)
+{
+ return !(x == y);
+}
+
+namespace detail
+{
+
+inline
+void
+throw_invalid(const string_t& s, unsigned i, const string_t& message)
+{
+ throw std::runtime_error(std::string("Invalid time_zone initializer.\n") +
+ std::string(message) + ":\n" +
+ std::string(s) + '\n' +
+ "\x1b[1;32m" +
+ std::string(i, '~') + '^' +
+ std::string(i < s.size() ? s.size()-i-1 : 0, '~') +
+ "\x1b[0m");
+}
+
+inline
+unsigned
+read_date(const string_t& s, unsigned i, rule& r)
+{
+ using date::month;
+ using date::weekday;
+ if (i == s.size())
+ throw_invalid(s, i, "Expected rule but found end of string");
+ if (s[i] == 'J')
+ {
+ ++i;
+ unsigned n;
+ i = read_unsigned(s, i, 3, n, "Expected to find the Julian day [1, 365]");
+ if (!(1 <= n && n <= 365))
+ throw_invalid(s, i-1, "Expected Julian day to be in the range [1, 365]");
+ r.mode_ = rule::J;
+ r.n_ = n;
+ }
+ else if (s[i] == 'M')
+ {
+ ++i;
+ unsigned m;
+ i = read_unsigned(s, i, 2, m, "Expected to find month [1, 12]");
+ if (!(1 <= m && m <= 12))
+ throw_invalid(s, i-1, "Expected month to be in the range [1, 12]");
+ if (i == s.size() || s[i] != '.')
+ throw_invalid(s, i, "Expected '.' after month");
+ ++i;
+ unsigned n;
+ i = read_unsigned(s, i, 1, n, "Expected to find week number [1, 5]");
+ if (!(1 <= n && n <= 5))
+ throw_invalid(s, i-1, "Expected week number to be in the range [1, 5]");
+ if (i == s.size() || s[i] != '.')
+ throw_invalid(s, i, "Expected '.' after weekday index");
+ ++i;
+ unsigned wd;
+ i = read_unsigned(s, i, 1, wd, "Expected to find day of week [0, 6]");
+ if (wd > 6)
+ throw_invalid(s, i-1, "Expected day of week to be in the range [0, 6]");
+ r.mode_ = rule::M;
+ r.m_ = month{m};
+ r.wd_ = weekday{wd};
+ r.n_ = n;
+ }
+ else if (std::isdigit(s[i]))
+ {
+ unsigned n;
+ i = read_unsigned(s, i, 3, n);
+ if (n > 365)
+ throw_invalid(s, i-1, "Expected Julian day to be in the range [0, 365]");
+ r.mode_ = rule::N;
+ r.n_ = n;
+ }
+ else
+ throw_invalid(s, i, "Expected 'J', 'M', or a digit to start rule");
+ if (i != s.size() && s[i] == '/')
+ {
+ ++i;
+ std::chrono::seconds t;
+ i = read_unsigned_time(s, i, t);
+ r.time_ = t;
+ }
+ return i;
+}
+
+inline
+unsigned
+read_name(const string_t& s, unsigned i, std::string& name)
+{
+ if (i == s.size())
+ throw_invalid(s, i, "Expected a name but found end of string");
+ if (s[i] == '<')
+ {
+ ++i;
+ while (true)
+ {
+ if (i == s.size())
+ throw_invalid(s, i,
+ "Expected to find closing '>', but found end of string");
+ if (s[i] == '>')
+ break;
+ name.push_back(s[i]);
+ ++i;
+ }
+ ++i;
+ }
+ else
+ {
+ while (i != s.size() && std::isalpha(s[i]))
+ {
+ name.push_back(s[i]);
+ ++i;
+ }
+ }
+ return i;
+}
+
+inline
+unsigned
+read_signed_time(const string_t& s, unsigned i,
+ std::chrono::seconds& t)
+{
+ if (i == s.size())
+ throw_invalid(s, i, "Expected to read signed time, but found end of string");
+ bool negative = false;
+ if (s[i] == '-')
+ {
+ negative = true;
+ ++i;
+ }
+ else if (s[i] == '+')
+ ++i;
+ i = read_unsigned_time(s, i, t);
+ if (negative)
+ t = -t;
+ return i;
+}
+
+inline
+unsigned
+read_unsigned_time(const string_t& s, unsigned i, std::chrono::seconds& t)
+{
+ using std::chrono::seconds;
+ using std::chrono::minutes;
+ using std::chrono::hours;
+ if (i == s.size())
+ throw_invalid(s, i, "Expected to read unsigned time, but found end of string");
+ unsigned x;
+ i = read_unsigned(s, i, 2, x, "Expected to find hours [0, 24]");
+ if (x > 24)
+ throw_invalid(s, i-1, "Expected hours to be in the range [0, 24]");
+ t = hours{x};
+ if (i != s.size() && s[i] == ':')
+ {
+ ++i;
+ i = read_unsigned(s, i, 2, x, "Expected to find minutes [0, 59]");
+ if (x > 59)
+ throw_invalid(s, i-1, "Expected minutes to be in the range [0, 59]");
+ t += minutes{x};
+ if (i != s.size() && s[i] == ':')
+ {
+ ++i;
+ i = read_unsigned(s, i, 2, x, "Expected to find seconds [0, 59]");
+ if (x > 59)
+ throw_invalid(s, i-1, "Expected seconds to be in the range [0, 59]");
+ t += seconds{x};
+ }
+ }
+ return i;
+}
+
+inline
+unsigned
+read_unsigned(const string_t& s, unsigned i, unsigned limit, unsigned& u,
+ const string_t& message)
+{
+ if (i == s.size() || !std::isdigit(s[i]))
+ throw_invalid(s, i, message);
+ u = static_cast<unsigned>(s[i] - '0');
+ unsigned count = 1;
+ for (++i; count < limit && i != s.size() && std::isdigit(s[i]); ++i, ++count)
+ u = u * 10 + static_cast<unsigned>(s[i] - '0');
+ return i;
+}
+
+} // namespace detail
+
+} // namespace Posix
+
+namespace date
+{
+
+template <>
+struct zoned_traits<Posix::time_zone>
+{
+
+#if HAS_STRING_VIEW
+
+ static
+ Posix::time_zone
+ locate_zone(std::string_view name)
+ {
+ return Posix::time_zone{name};
+ }
+
+#else // !HAS_STRING_VIEW
+
+ static
+ Posix::time_zone
+ locate_zone(const std::string& name)
+ {
+ return Posix::time_zone{name};
+ }
+
+ static
+ Posix::time_zone
+ locate_zone(const char* name)
+ {
+ return Posix::time_zone{name};
+ }
+
+#endif // !HAS_STRING_VIEW
+
+};
+
+} // namespace date
+
+#endif // PTZ_H
diff --git a/src/third-party/date/include/date/solar_hijri.h b/src/third-party/date/include/date/solar_hijri.h
new file mode 100644
index 0000000..6f6c331
--- /dev/null
+++ b/src/third-party/date/include/date/solar_hijri.h
@@ -0,0 +1,3151 @@
+#ifndef SOLAR_HIJRI_H
+#define SOLAR_HIJRI_H
+
+// The MIT License (MIT)
+//
+// Copyright (c) 2016 Howard Hinnant
+// Copyright (c) 2019 Asad. Gharighi
+//
+// Calculations are based on:
+// https://www.timeanddate.com/calendar/persian-calendar.html
+// and follow <date.h> style
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// Our apologies. When the previous paragraph was written, lowercase had not yet
+// been invented (that would involve another several millennia of evolution).
+// We did not mean to shout.
+
+#include "date.h"
+
+namespace solar_hijri
+{
+
+namespace internal
+{
+static const auto epoch = static_cast<unsigned>(2121446);
+static const auto days_in_era = static_cast<unsigned>(1029983);
+static const auto years_in_era = static_cast<unsigned>(2820);
+static const auto unix_time_shift = static_cast<unsigned>(2440588);
+auto const years_in_first_cycle = static_cast<unsigned>(29);
+auto const years_in_other_cycles = static_cast<int>(33);
+auto const years_in_period = static_cast<int>(128); // 29 + 3*33
+auto const days_in_first_cycle = static_cast<unsigned>(10592); // 28/4 + 29*365
+auto const days_in_other_cycles = static_cast<unsigned>(12053); // 32/4 + 33*365
+auto const days_in_period = static_cast<unsigned>(46751); // days_in_first_cycle + 3*days_in_other_cycles;
+}
+
+// durations
+
+using days = date::days;
+
+using weeks = date::weeks;
+
+using years = std::chrono::duration
+ <int, date::detail::ratio_multiply<std::ratio<internal::days_in_era, internal::years_in_era>, days::period>>;
+
+using months = std::chrono::duration
+ <int, date::detail::ratio_divide<years::period, std::ratio<12>>>;
+
+// time_point
+
+using sys_days = date::sys_days;
+using local_days = date::local_days;
+
+// types
+
+struct last_spec
+{
+ explicit last_spec() = default;
+};
+
+class day;
+class month;
+class year;
+
+class weekday;
+class weekday_indexed;
+class weekday_last;
+
+class month_day;
+class month_day_last;
+class month_weekday;
+class month_weekday_last;
+
+class year_month;
+
+class year_month_day;
+class year_month_day_last;
+class year_month_weekday;
+class year_month_weekday_last;
+
+// date composition operators
+
+CONSTCD11 year_month operator/(const year& y, const month& m) NOEXCEPT;
+CONSTCD11 year_month operator/(const year& y, int m) NOEXCEPT;
+
+CONSTCD11 month_day operator/(const day& d, const month& m) NOEXCEPT;
+CONSTCD11 month_day operator/(const day& d, int m) NOEXCEPT;
+CONSTCD11 month_day operator/(const month& m, const day& d) NOEXCEPT;
+CONSTCD11 month_day operator/(const month& m, int d) NOEXCEPT;
+CONSTCD11 month_day operator/(int m, const day& d) NOEXCEPT;
+
+CONSTCD11 month_day_last operator/(const month& m, last_spec) NOEXCEPT;
+CONSTCD11 month_day_last operator/(int m, last_spec) NOEXCEPT;
+CONSTCD11 month_day_last operator/(last_spec, const month& m) NOEXCEPT;
+CONSTCD11 month_day_last operator/(last_spec, int m) NOEXCEPT;
+
+CONSTCD11 month_weekday operator/(const month& m, const weekday_indexed& wdi) NOEXCEPT;
+CONSTCD11 month_weekday operator/(int m, const weekday_indexed& wdi) NOEXCEPT;
+CONSTCD11 month_weekday operator/(const weekday_indexed& wdi, const month& m) NOEXCEPT;
+CONSTCD11 month_weekday operator/(const weekday_indexed& wdi, int m) NOEXCEPT;
+
+CONSTCD11 month_weekday_last operator/(const month& m, const weekday_last& wdl) NOEXCEPT;
+CONSTCD11 month_weekday_last operator/(int m, const weekday_last& wdl) NOEXCEPT;
+CONSTCD11 month_weekday_last operator/(const weekday_last& wdl, const month& m) NOEXCEPT;
+CONSTCD11 month_weekday_last operator/(const weekday_last& wdl, int m) NOEXCEPT;
+
+CONSTCD11 year_month_day operator/(const year_month& ym, const day& d) NOEXCEPT;
+CONSTCD11 year_month_day operator/(const year_month& ym, int d) NOEXCEPT;
+CONSTCD11 year_month_day operator/(const year& y, const month_day& md) NOEXCEPT;
+CONSTCD11 year_month_day operator/(int y, const month_day& md) NOEXCEPT;
+CONSTCD11 year_month_day operator/(const month_day& md, const year& y) NOEXCEPT;
+CONSTCD11 year_month_day operator/(const month_day& md, int y) NOEXCEPT;
+
+CONSTCD11
+ year_month_day_last operator/(const year_month& ym, last_spec) NOEXCEPT;
+CONSTCD11
+ year_month_day_last operator/(const year& y, const month_day_last& mdl) NOEXCEPT;
+CONSTCD11
+ year_month_day_last operator/(int y, const month_day_last& mdl) NOEXCEPT;
+CONSTCD11
+ year_month_day_last operator/(const month_day_last& mdl, const year& y) NOEXCEPT;
+CONSTCD11
+ year_month_day_last operator/(const month_day_last& mdl, int y) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday
+operator/(const year_month& ym, const weekday_indexed& wdi) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday
+operator/(const year& y, const month_weekday& mwd) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday
+operator/(int y, const month_weekday& mwd) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday
+operator/(const month_weekday& mwd, const year& y) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday
+operator/(const month_weekday& mwd, int y) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday_last
+operator/(const year_month& ym, const weekday_last& wdl) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday_last
+operator/(const year& y, const month_weekday_last& mwdl) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday_last
+operator/(int y, const month_weekday_last& mwdl) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday_last
+operator/(const month_weekday_last& mwdl, const year& y) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday_last
+operator/(const month_weekday_last& mwdl, int y) NOEXCEPT;
+
+// Detailed interface
+
+// day
+
+class day
+{
+ unsigned char d_;
+
+public:
+ day() = default;
+ explicit CONSTCD11 day(unsigned d) NOEXCEPT;
+
+ CONSTCD14 day& operator++() NOEXCEPT;
+ CONSTCD14 day operator++(int) NOEXCEPT;
+ CONSTCD14 day& operator--() NOEXCEPT;
+ CONSTCD14 day operator--(int) NOEXCEPT;
+
+ CONSTCD14 day& operator+=(const days& d) NOEXCEPT;
+ CONSTCD14 day& operator-=(const days& d) NOEXCEPT;
+
+ CONSTCD11 explicit operator unsigned() const NOEXCEPT;
+ CONSTCD11 bool ok() const NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const day& x, const day& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const day& x, const day& y) NOEXCEPT;
+CONSTCD11 bool operator< (const day& x, const day& y) NOEXCEPT;
+CONSTCD11 bool operator> (const day& x, const day& y) NOEXCEPT;
+CONSTCD11 bool operator<=(const day& x, const day& y) NOEXCEPT;
+CONSTCD11 bool operator>=(const day& x, const day& y) NOEXCEPT;
+
+CONSTCD11 day operator+(const day& x, const days& y) NOEXCEPT;
+CONSTCD11 day operator+(const days& x, const day& y) NOEXCEPT;
+CONSTCD11 day operator-(const day& x, const days& y) NOEXCEPT;
+CONSTCD11 days operator-(const day& x, const day& y) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const day& d);
+
+// month
+
+class month
+{
+ unsigned char m_;
+
+public:
+ month() = default;
+ explicit CONSTCD11 month(unsigned m) NOEXCEPT;
+
+ CONSTCD14 month& operator++() NOEXCEPT;
+ CONSTCD14 month operator++(int) NOEXCEPT;
+ CONSTCD14 month& operator--() NOEXCEPT;
+ CONSTCD14 month operator--(int) NOEXCEPT;
+
+ CONSTCD14 month& operator+=(const months& m) NOEXCEPT;
+ CONSTCD14 month& operator-=(const months& m) NOEXCEPT;
+
+ CONSTCD11 explicit operator unsigned() const NOEXCEPT;
+ CONSTCD11 bool ok() const NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const month& x, const month& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const month& x, const month& y) NOEXCEPT;
+CONSTCD11 bool operator< (const month& x, const month& y) NOEXCEPT;
+CONSTCD11 bool operator> (const month& x, const month& y) NOEXCEPT;
+CONSTCD11 bool operator<=(const month& x, const month& y) NOEXCEPT;
+CONSTCD11 bool operator>=(const month& x, const month& y) NOEXCEPT;
+
+CONSTCD14 month operator+(const month& x, const months& y) NOEXCEPT;
+CONSTCD14 month operator+(const months& x, const month& y) NOEXCEPT;
+CONSTCD14 month operator-(const month& x, const months& y) NOEXCEPT;
+CONSTCD14 months operator-(const month& x, const month& y) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const month& m);
+
+// year
+
+class year
+{
+ short y_;
+
+public:
+ year() = default;
+ explicit CONSTCD11 year(int y) NOEXCEPT;
+
+ CONSTCD14 year& operator++() NOEXCEPT;
+ CONSTCD14 year operator++(int) NOEXCEPT;
+ CONSTCD14 year& operator--() NOEXCEPT;
+ CONSTCD14 year operator--(int) NOEXCEPT;
+
+ CONSTCD14 year& operator+=(const years& y) NOEXCEPT;
+ CONSTCD14 year& operator-=(const years& y) NOEXCEPT;
+
+ CONSTCD14 bool is_leap() const NOEXCEPT;
+
+ CONSTCD11 explicit operator int() const NOEXCEPT;
+ CONSTCD11 bool ok() const NOEXCEPT;
+
+ static CONSTCD11 year min() NOEXCEPT;
+ static CONSTCD11 year max() NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const year& x, const year& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const year& x, const year& y) NOEXCEPT;
+CONSTCD11 bool operator< (const year& x, const year& y) NOEXCEPT;
+CONSTCD11 bool operator> (const year& x, const year& y) NOEXCEPT;
+CONSTCD11 bool operator<=(const year& x, const year& y) NOEXCEPT;
+CONSTCD11 bool operator>=(const year& x, const year& y) NOEXCEPT;
+
+CONSTCD11 year operator+(const year& x, const years& y) NOEXCEPT;
+CONSTCD11 year operator+(const years& x, const year& y) NOEXCEPT;
+CONSTCD11 year operator-(const year& x, const years& y) NOEXCEPT;
+CONSTCD11 years operator-(const year& x, const year& y) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year& y);
+
+// weekday
+
+class weekday
+{
+ unsigned char wd_;
+public:
+ weekday() = default;
+ explicit CONSTCD11 weekday(unsigned wd) NOEXCEPT;
+ explicit weekday(int) = delete;
+ CONSTCD11 weekday(const sys_days& dp) NOEXCEPT;
+ CONSTCD11 explicit weekday(const local_days& dp) NOEXCEPT;
+
+ CONSTCD14 weekday& operator++() NOEXCEPT;
+ CONSTCD14 weekday operator++(int) NOEXCEPT;
+ CONSTCD14 weekday& operator--() NOEXCEPT;
+ CONSTCD14 weekday operator--(int) NOEXCEPT;
+
+ CONSTCD14 weekday& operator+=(const days& d) NOEXCEPT;
+ CONSTCD14 weekday& operator-=(const days& d) NOEXCEPT;
+
+ CONSTCD11 explicit operator unsigned() const NOEXCEPT;
+ CONSTCD11 bool ok() const NOEXCEPT;
+
+ CONSTCD11 weekday_indexed operator[](unsigned index) const NOEXCEPT;
+ CONSTCD11 weekday_last operator[](last_spec) const NOEXCEPT;
+
+private:
+ static CONSTCD11 unsigned char weekday_from_days(int z) NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const weekday& x, const weekday& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const weekday& x, const weekday& y) NOEXCEPT;
+
+CONSTCD14 weekday operator+(const weekday& x, const days& y) NOEXCEPT;
+CONSTCD14 weekday operator+(const days& x, const weekday& y) NOEXCEPT;
+CONSTCD14 weekday operator-(const weekday& x, const days& y) NOEXCEPT;
+CONSTCD14 days operator-(const weekday& x, const weekday& y) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const weekday& wd);
+
+// weekday_indexed
+
+class weekday_indexed
+{
+ unsigned char wd_ : 4;
+ unsigned char index_ : 4;
+
+public:
+ weekday_indexed() = default;
+ CONSTCD11 weekday_indexed(const solar_hijri::weekday& wd, unsigned index) NOEXCEPT;
+
+ CONSTCD11 solar_hijri::weekday weekday() const NOEXCEPT;
+ CONSTCD11 unsigned index() const NOEXCEPT;
+ CONSTCD11 bool ok() const NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const weekday_indexed& x, const weekday_indexed& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const weekday_indexed& x, const weekday_indexed& y) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const weekday_indexed& wdi);
+
+// weekday_last
+
+class weekday_last
+{
+ solar_hijri::weekday wd_;
+
+public:
+ weekday_last() = default;
+ explicit CONSTCD11 weekday_last(const solar_hijri::weekday& wd) NOEXCEPT;
+
+ CONSTCD11 solar_hijri::weekday weekday() const NOEXCEPT;
+ CONSTCD11 bool ok() const NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const weekday_last& x, const weekday_last& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const weekday_last& x, const weekday_last& y) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const weekday_last& wdl);
+
+// year_month
+
+class year_month
+{
+ solar_hijri::year y_;
+ solar_hijri::month m_;
+
+public:
+ year_month() = default;
+ CONSTCD11 year_month(const solar_hijri::year& y, const solar_hijri::month& m) NOEXCEPT;
+
+ CONSTCD11 solar_hijri::year year() const NOEXCEPT;
+ CONSTCD11 solar_hijri::month month() const NOEXCEPT;
+
+ CONSTCD14 year_month& operator+=(const months& dm) NOEXCEPT;
+ CONSTCD14 year_month& operator-=(const months& dm) NOEXCEPT;
+ CONSTCD14 year_month& operator+=(const years& dy) NOEXCEPT;
+ CONSTCD14 year_month& operator-=(const years& dy) NOEXCEPT;
+
+ CONSTCD11 bool ok() const NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const year_month& x, const year_month& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const year_month& x, const year_month& y) NOEXCEPT;
+CONSTCD11 bool operator< (const year_month& x, const year_month& y) NOEXCEPT;
+CONSTCD11 bool operator> (const year_month& x, const year_month& y) NOEXCEPT;
+CONSTCD11 bool operator<=(const year_month& x, const year_month& y) NOEXCEPT;
+CONSTCD11 bool operator>=(const year_month& x, const year_month& y) NOEXCEPT;
+
+CONSTCD14 year_month operator+(const year_month& ym, const months& dm) NOEXCEPT;
+CONSTCD14 year_month operator+(const months& dm, const year_month& ym) NOEXCEPT;
+CONSTCD14 year_month operator-(const year_month& ym, const months& dm) NOEXCEPT;
+
+CONSTCD11 months operator-(const year_month& x, const year_month& y) NOEXCEPT;
+CONSTCD11 year_month operator+(const year_month& ym, const years& dy) NOEXCEPT;
+CONSTCD11 year_month operator+(const years& dy, const year_month& ym) NOEXCEPT;
+CONSTCD11 year_month operator-(const year_month& ym, const years& dy) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year_month& ym);
+
+// month_day
+
+class month_day
+{
+ solar_hijri::month m_;
+ solar_hijri::day d_;
+
+public:
+ month_day() = default;
+ CONSTCD11 month_day(const solar_hijri::month& m, const solar_hijri::day& d) NOEXCEPT;
+
+ CONSTCD11 solar_hijri::month month() const NOEXCEPT;
+ CONSTCD11 solar_hijri::day day() const NOEXCEPT;
+
+ CONSTCD14 bool ok() const NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const month_day& x, const month_day& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const month_day& x, const month_day& y) NOEXCEPT;
+CONSTCD11 bool operator< (const month_day& x, const month_day& y) NOEXCEPT;
+CONSTCD11 bool operator> (const month_day& x, const month_day& y) NOEXCEPT;
+CONSTCD11 bool operator<=(const month_day& x, const month_day& y) NOEXCEPT;
+CONSTCD11 bool operator>=(const month_day& x, const month_day& y) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const month_day& md);
+
+// month_day_last
+
+class month_day_last
+{
+ solar_hijri::month m_;
+
+public:
+ month_day_last() = default;
+ CONSTCD11 explicit month_day_last(const solar_hijri::month& m) NOEXCEPT;
+
+ CONSTCD11 solar_hijri::month month() const NOEXCEPT;
+ CONSTCD11 bool ok() const NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const month_day_last& x, const month_day_last& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const month_day_last& x, const month_day_last& y) NOEXCEPT;
+CONSTCD11 bool operator< (const month_day_last& x, const month_day_last& y) NOEXCEPT;
+CONSTCD11 bool operator> (const month_day_last& x, const month_day_last& y) NOEXCEPT;
+CONSTCD11 bool operator<=(const month_day_last& x, const month_day_last& y) NOEXCEPT;
+CONSTCD11 bool operator>=(const month_day_last& x, const month_day_last& y) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const month_day_last& mdl);
+
+// month_weekday
+
+class month_weekday
+{
+ solar_hijri::month m_;
+ solar_hijri::weekday_indexed wdi_;
+public:
+ month_weekday() = default;
+ CONSTCD11 month_weekday(const solar_hijri::month& m,
+ const solar_hijri::weekday_indexed& wdi) NOEXCEPT;
+
+ CONSTCD11 solar_hijri::month month() const NOEXCEPT;
+ CONSTCD11 solar_hijri::weekday_indexed weekday_indexed() const NOEXCEPT;
+
+ CONSTCD11 bool ok() const NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const month_weekday& x, const month_weekday& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const month_weekday& x, const month_weekday& y) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const month_weekday& mwd);
+
+// month_weekday_last
+
+class month_weekday_last
+{
+ solar_hijri::month m_;
+ solar_hijri::weekday_last wdl_;
+
+public:
+ month_weekday_last() = default;
+ CONSTCD11 month_weekday_last(const solar_hijri::month& m,
+ const solar_hijri::weekday_last& wd) NOEXCEPT;
+
+ CONSTCD11 solar_hijri::month month() const NOEXCEPT;
+ CONSTCD11 solar_hijri::weekday_last weekday_last() const NOEXCEPT;
+
+ CONSTCD11 bool ok() const NOEXCEPT;
+};
+
+CONSTCD11
+ bool operator==(const month_weekday_last& x, const month_weekday_last& y) NOEXCEPT;
+CONSTCD11
+ bool operator!=(const month_weekday_last& x, const month_weekday_last& y) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const month_weekday_last& mwdl);
+
+// class year_month_day
+
+class year_month_day
+{
+ solar_hijri::year y_;
+ solar_hijri::month m_;
+ solar_hijri::day d_;
+
+public:
+ year_month_day() = default;
+ CONSTCD11 year_month_day(const solar_hijri::year& y, const solar_hijri::month& m,
+ const solar_hijri::day& d) NOEXCEPT;
+ CONSTCD14 year_month_day(const year_month_day_last& ymdl) NOEXCEPT;
+
+ CONSTCD14 year_month_day(sys_days dp) NOEXCEPT;
+ CONSTCD14 explicit year_month_day(local_days dp) NOEXCEPT;
+
+ CONSTCD14 year_month_day& operator+=(const months& m) NOEXCEPT;
+ CONSTCD14 year_month_day& operator-=(const months& m) NOEXCEPT;
+ CONSTCD14 year_month_day& operator+=(const years& y) NOEXCEPT;
+ CONSTCD14 year_month_day& operator-=(const years& y) NOEXCEPT;
+
+ CONSTCD11 solar_hijri::year year() const NOEXCEPT;
+ CONSTCD11 solar_hijri::month month() const NOEXCEPT;
+ CONSTCD11 solar_hijri::day day() const NOEXCEPT;
+
+ CONSTCD14 operator sys_days() const NOEXCEPT;
+ CONSTCD14 explicit operator local_days() const NOEXCEPT;
+ CONSTCD14 bool ok() const NOEXCEPT;
+
+private:
+ static CONSTCD14 year_month_day from_days(days dp) NOEXCEPT;
+ CONSTCD14 days to_days() const NOEXCEPT;
+};
+
+CONSTCD11 bool operator==(const year_month_day& x, const year_month_day& y) NOEXCEPT;
+CONSTCD11 bool operator!=(const year_month_day& x, const year_month_day& y) NOEXCEPT;
+CONSTCD11 bool operator< (const year_month_day& x, const year_month_day& y) NOEXCEPT;
+CONSTCD11 bool operator> (const year_month_day& x, const year_month_day& y) NOEXCEPT;
+CONSTCD11 bool operator<=(const year_month_day& x, const year_month_day& y) NOEXCEPT;
+CONSTCD11 bool operator>=(const year_month_day& x, const year_month_day& y) NOEXCEPT;
+
+CONSTCD14 year_month_day operator+(const year_month_day& ymd, const months& dm) NOEXCEPT;
+CONSTCD14 year_month_day operator+(const months& dm, const year_month_day& ymd) NOEXCEPT;
+CONSTCD14 year_month_day operator-(const year_month_day& ymd, const months& dm) NOEXCEPT;
+CONSTCD11 year_month_day operator+(const year_month_day& ymd, const years& dy) NOEXCEPT;
+CONSTCD11 year_month_day operator+(const years& dy, const year_month_day& ymd) NOEXCEPT;
+CONSTCD11 year_month_day operator-(const year_month_day& ymd, const years& dy) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year_month_day& ymd);
+
+// year_month_day_last
+
+class year_month_day_last
+{
+ solar_hijri::year y_;
+ solar_hijri::month_day_last mdl_;
+
+public:
+ year_month_day_last() = default;
+ CONSTCD11 year_month_day_last(const solar_hijri::year& y,
+ const solar_hijri::month_day_last& mdl) NOEXCEPT;
+
+ CONSTCD14 year_month_day_last& operator+=(const months& m) NOEXCEPT;
+ CONSTCD14 year_month_day_last& operator-=(const months& m) NOEXCEPT;
+ CONSTCD14 year_month_day_last& operator+=(const years& y) NOEXCEPT;
+ CONSTCD14 year_month_day_last& operator-=(const years& y) NOEXCEPT;
+
+ CONSTCD11 solar_hijri::year year() const NOEXCEPT;
+ CONSTCD11 solar_hijri::month month() const NOEXCEPT;
+ CONSTCD11 solar_hijri::month_day_last month_day_last() const NOEXCEPT;
+ CONSTCD14 solar_hijri::day day() const NOEXCEPT;
+
+ CONSTCD14 operator sys_days() const NOEXCEPT;
+ CONSTCD14 explicit operator local_days() const NOEXCEPT;
+ CONSTCD11 bool ok() const NOEXCEPT;
+};
+
+CONSTCD11
+ bool operator==(const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT;
+CONSTCD11
+ bool operator!=(const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT;
+CONSTCD11
+ bool operator< (const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT;
+CONSTCD11
+ bool operator> (const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT;
+CONSTCD11
+ bool operator<=(const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT;
+CONSTCD11
+ bool operator>=(const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT;
+
+CONSTCD14
+year_month_day_last
+operator+(const year_month_day_last& ymdl, const months& dm) NOEXCEPT;
+
+CONSTCD14
+year_month_day_last
+operator+(const months& dm, const year_month_day_last& ymdl) NOEXCEPT;
+
+CONSTCD11
+year_month_day_last
+operator+(const year_month_day_last& ymdl, const years& dy) NOEXCEPT;
+
+CONSTCD11
+year_month_day_last
+operator+(const years& dy, const year_month_day_last& ymdl) NOEXCEPT;
+
+CONSTCD14
+year_month_day_last
+operator-(const year_month_day_last& ymdl, const months& dm) NOEXCEPT;
+
+CONSTCD11
+year_month_day_last
+operator-(const year_month_day_last& ymdl, const years& dy) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year_month_day_last& ymdl);
+
+// year_month_weekday
+
+class year_month_weekday
+{
+ solar_hijri::year y_;
+ solar_hijri::month m_;
+ solar_hijri::weekday_indexed wdi_;
+
+public:
+ year_month_weekday() = default;
+ CONSTCD11 year_month_weekday(const solar_hijri::year& y, const solar_hijri::month& m,
+ const solar_hijri::weekday_indexed& wdi) NOEXCEPT;
+ CONSTCD14 year_month_weekday(const sys_days& dp) NOEXCEPT;
+ CONSTCD14 explicit year_month_weekday(const local_days& dp) NOEXCEPT;
+
+ CONSTCD14 year_month_weekday& operator+=(const months& m) NOEXCEPT;
+ CONSTCD14 year_month_weekday& operator-=(const months& m) NOEXCEPT;
+ CONSTCD14 year_month_weekday& operator+=(const years& y) NOEXCEPT;
+ CONSTCD14 year_month_weekday& operator-=(const years& y) NOEXCEPT;
+
+ CONSTCD11 solar_hijri::year year() const NOEXCEPT;
+ CONSTCD11 solar_hijri::month month() const NOEXCEPT;
+ CONSTCD11 solar_hijri::weekday weekday() const NOEXCEPT;
+ CONSTCD11 unsigned index() const NOEXCEPT;
+ CONSTCD11 solar_hijri::weekday_indexed weekday_indexed() const NOEXCEPT;
+
+ CONSTCD14 operator sys_days() const NOEXCEPT;
+ CONSTCD14 explicit operator local_days() const NOEXCEPT;
+ CONSTCD14 bool ok() const NOEXCEPT;
+
+private:
+ static CONSTCD14 year_month_weekday from_days(days dp) NOEXCEPT;
+ CONSTCD14 days to_days() const NOEXCEPT;
+};
+
+CONSTCD11
+ bool operator==(const year_month_weekday& x, const year_month_weekday& y) NOEXCEPT;
+CONSTCD11
+ bool operator!=(const year_month_weekday& x, const year_month_weekday& y) NOEXCEPT;
+
+CONSTCD14
+year_month_weekday
+operator+(const year_month_weekday& ymwd, const months& dm) NOEXCEPT;
+
+CONSTCD14
+year_month_weekday
+operator+(const months& dm, const year_month_weekday& ymwd) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday
+operator+(const year_month_weekday& ymwd, const years& dy) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday
+operator+(const years& dy, const year_month_weekday& ymwd) NOEXCEPT;
+
+CONSTCD14
+year_month_weekday
+operator-(const year_month_weekday& ymwd, const months& dm) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday
+operator-(const year_month_weekday& ymwd, const years& dy) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year_month_weekday& ymwdi);
+
+// year_month_weekday_last
+
+class year_month_weekday_last
+{
+ solar_hijri::year y_;
+ solar_hijri::month m_;
+ solar_hijri::weekday_last wdl_;
+
+public:
+ year_month_weekday_last() = default;
+ CONSTCD11 year_month_weekday_last(const solar_hijri::year& y, const solar_hijri::month& m,
+ const solar_hijri::weekday_last& wdl) NOEXCEPT;
+
+ CONSTCD14 year_month_weekday_last& operator+=(const months& m) NOEXCEPT;
+ CONSTCD14 year_month_weekday_last& operator-=(const months& m) NOEXCEPT;
+ CONSTCD14 year_month_weekday_last& operator+=(const years& y) NOEXCEPT;
+ CONSTCD14 year_month_weekday_last& operator-=(const years& y) NOEXCEPT;
+
+ CONSTCD11 solar_hijri::year year() const NOEXCEPT;
+ CONSTCD11 solar_hijri::month month() const NOEXCEPT;
+ CONSTCD11 solar_hijri::weekday weekday() const NOEXCEPT;
+ CONSTCD11 solar_hijri::weekday_last weekday_last() const NOEXCEPT;
+
+ CONSTCD14 operator sys_days() const NOEXCEPT;
+ CONSTCD14 explicit operator local_days() const NOEXCEPT;
+ CONSTCD11 bool ok() const NOEXCEPT;
+
+private:
+ CONSTCD14 days to_days() const NOEXCEPT;
+};
+
+CONSTCD11
+bool
+operator==(const year_month_weekday_last& x, const year_month_weekday_last& y) NOEXCEPT;
+
+CONSTCD11
+bool
+operator!=(const year_month_weekday_last& x, const year_month_weekday_last& y) NOEXCEPT;
+
+CONSTCD14
+year_month_weekday_last
+operator+(const year_month_weekday_last& ymwdl, const months& dm) NOEXCEPT;
+
+CONSTCD14
+year_month_weekday_last
+operator+(const months& dm, const year_month_weekday_last& ymwdl) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday_last
+operator+(const year_month_weekday_last& ymwdl, const years& dy) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday_last
+operator+(const years& dy, const year_month_weekday_last& ymwdl) NOEXCEPT;
+
+CONSTCD14
+year_month_weekday_last
+operator-(const year_month_weekday_last& ymwdl, const months& dm) NOEXCEPT;
+
+CONSTCD11
+year_month_weekday_last
+operator-(const year_month_weekday_last& ymwdl, const years& dy) NOEXCEPT;
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year_month_weekday_last& ymwdl);
+
+#if !defined(_MSC_VER) || (_MSC_VER >= 1900)
+inline namespace literals
+{
+
+CONSTCD11 solar_hijri::day operator "" _d(unsigned long long d) NOEXCEPT;
+CONSTCD11 solar_hijri::year operator "" _y(unsigned long long y) NOEXCEPT;
+
+} // inline namespace literals
+#endif // !defined(_MSC_VER) || (_MSC_VER >= 1900)
+
+//----------------+
+// Implementation |
+//----------------+
+
+// day
+
+CONSTCD11 inline day::day(unsigned d) NOEXCEPT : d_(static_cast<unsigned char>(d)) {}
+CONSTCD14 inline day& day::operator++() NOEXCEPT {++d_; return *this;}
+CONSTCD14 inline day day::operator++(int) NOEXCEPT {auto tmp(*this); ++(*this); return tmp;}
+CONSTCD14 inline day& day::operator--() NOEXCEPT {--d_; return *this;}
+CONSTCD14 inline day day::operator--(int) NOEXCEPT {auto tmp(*this); --(*this); return tmp;}
+CONSTCD14 inline day& day::operator+=(const days& d) NOEXCEPT {*this = *this + d; return *this;}
+CONSTCD14 inline day& day::operator-=(const days& d) NOEXCEPT {*this = *this - d; return *this;}
+CONSTCD11 inline day::operator unsigned() const NOEXCEPT {return d_;}
+CONSTCD11 inline bool day::ok() const NOEXCEPT {return 1 <= d_ && d_ <= 30;}
+
+CONSTCD11
+inline
+bool
+operator==(const day& x, const day& y) NOEXCEPT
+{
+ return static_cast<unsigned>(x) == static_cast<unsigned>(y);
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const day& x, const day& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+CONSTCD11
+inline
+bool
+operator<(const day& x, const day& y) NOEXCEPT
+{
+ return static_cast<unsigned>(x) < static_cast<unsigned>(y);
+}
+
+CONSTCD11
+inline
+bool
+operator>(const day& x, const day& y) NOEXCEPT
+{
+ return y < x;
+}
+
+CONSTCD11
+inline
+bool
+operator<=(const day& x, const day& y) NOEXCEPT
+{
+ return !(y < x);
+}
+
+CONSTCD11
+inline
+bool
+operator>=(const day& x, const day& y) NOEXCEPT
+{
+ return !(x < y);
+}
+
+CONSTCD11
+inline
+days
+operator-(const day& x, const day& y) NOEXCEPT
+{
+ return days{static_cast<days::rep>(static_cast<unsigned>(x)
+ - static_cast<unsigned>(y))};
+}
+
+CONSTCD11
+inline
+day
+operator+(const day& x, const days& y) NOEXCEPT
+{
+ return day{static_cast<unsigned>(x) + static_cast<unsigned>(y.count())};
+}
+
+CONSTCD11
+inline
+day
+operator+(const days& x, const day& y) NOEXCEPT
+{
+ return y + x;
+}
+
+CONSTCD11
+inline
+day
+operator-(const day& x, const days& y) NOEXCEPT
+{
+ return x + -y;
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const day& d)
+{
+ date::detail::save_ostream<CharT, Traits> _(os);
+ os.fill('0');
+ os.flags(std::ios::dec | std::ios::right);
+ os.width(2);
+ os << static_cast<unsigned>(d);
+ return os;
+}
+
+// month
+
+CONSTCD11 inline month::month(unsigned m) NOEXCEPT : m_(static_cast<decltype(m_)>(m)) {}
+CONSTCD14 inline month& month::operator++() NOEXCEPT {if (++m_ == 13) m_ = 1; return *this;}
+CONSTCD14 inline month month::operator++(int) NOEXCEPT {auto tmp(*this); ++(*this); return tmp;}
+CONSTCD14 inline month& month::operator--() NOEXCEPT {if (--m_ == 0) m_ = 12; return *this;}
+CONSTCD14 inline month month::operator--(int) NOEXCEPT {auto tmp(*this); --(*this); return tmp;}
+
+CONSTCD14
+inline
+month&
+month::operator+=(const months& m) NOEXCEPT
+{
+ *this = *this + m;
+ return *this;
+}
+
+CONSTCD14
+inline
+month&
+month::operator-=(const months& m) NOEXCEPT
+{
+ *this = *this - m;
+ return *this;
+}
+
+CONSTCD11 inline month::operator unsigned() const NOEXCEPT {return m_;}
+CONSTCD11 inline bool month::ok() const NOEXCEPT {return 1 <= m_ && m_ <= 12;}
+
+CONSTCD11
+inline
+bool
+operator==(const month& x, const month& y) NOEXCEPT
+{
+ return static_cast<unsigned>(x) == static_cast<unsigned>(y);
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const month& x, const month& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+CONSTCD11
+inline
+bool
+operator<(const month& x, const month& y) NOEXCEPT
+{
+ return static_cast<unsigned>(x) < static_cast<unsigned>(y);
+}
+
+CONSTCD11
+inline
+bool
+operator>(const month& x, const month& y) NOEXCEPT
+{
+ return y < x;
+}
+
+CONSTCD11
+inline
+bool
+operator<=(const month& x, const month& y) NOEXCEPT
+{
+ return !(y < x);
+}
+
+CONSTCD11
+inline
+bool
+operator>=(const month& x, const month& y) NOEXCEPT
+{
+ return !(x < y);
+}
+
+CONSTCD14
+inline
+months
+operator-(const month& x, const month& y) NOEXCEPT
+{
+ auto const d = static_cast<unsigned>(x) - static_cast<unsigned>(y);
+ return months(d <= 11 ? d : d + 12);
+}
+
+CONSTCD14
+inline
+month
+operator+(const month& x, const months& y) NOEXCEPT
+{
+ auto const mu = static_cast<long long>(static_cast<unsigned>(x)) - 1 + y.count();
+ auto const yr = (mu >= 0 ? mu : mu-11) / 12;
+ return month{static_cast<unsigned>(mu - yr * 12 + 1)};
+}
+
+CONSTCD14
+inline
+month
+operator+(const months& x, const month& y) NOEXCEPT
+{
+ return y + x;
+}
+
+CONSTCD14
+inline
+month
+operator-(const month& x, const months& y) NOEXCEPT
+{
+ return x + -y;
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const month& m)
+{
+ switch (static_cast<unsigned>(m))
+ {
+ case 1:
+ os << "Farvardin";
+ break;
+ case 2:
+ os << "Ordibehesht";
+ break;
+ case 3:
+ os << "Khordad";
+ break;
+ case 4:
+ os << "Tir";
+ break;
+ case 5:
+ os << "Mordad";
+ break;
+ case 6:
+ os << "Shahrivar";
+ break;
+ case 7:
+ os << "Mehr";
+ break;
+ case 8:
+ os << "Aban";
+ break;
+ case 9:
+ os << "Azar";
+ break;
+ case 10:
+ os << "Dey";
+ break;
+ case 11:
+ os << "Bahman";
+ break;
+ case 12:
+ os << "Esfand";
+ break;
+ default:
+ os << static_cast<unsigned>(m) << " is not a valid month";
+ break;
+ }
+ return os;
+}
+
+// year
+
+CONSTCD11 inline year::year(int y) NOEXCEPT : y_(static_cast<decltype(y_)>(y)) {}
+CONSTCD14 inline year& year::operator++() NOEXCEPT {++y_; return *this;}
+CONSTCD14 inline year year::operator++(int) NOEXCEPT {auto tmp(*this); ++(*this); return tmp;}
+CONSTCD14 inline year& year::operator--() NOEXCEPT {--y_; return *this;}
+CONSTCD14 inline year year::operator--(int) NOEXCEPT {auto tmp(*this); --(*this); return tmp;}
+CONSTCD14 inline year& year::operator+=(const years& y) NOEXCEPT {*this = *this + y; return *this;}
+CONSTCD14 inline year& year::operator-=(const years& y) NOEXCEPT {*this = *this - y; return *this;}
+
+CONSTCD14
+inline
+bool
+year::is_leap() const NOEXCEPT
+{
+ using namespace internal;
+ auto const y = static_cast<int>(y_)-475;
+ auto const era_d = static_cast<int>(y >= 0 ? y : y-years_in_era+1) / static_cast<double>(years_in_era);
+ auto const era = static_cast<int>(era_d);
+ auto const yoe = static_cast<unsigned>(y - era * years_in_era);
+
+ // Reference: https://www.timeanddate.com/date/iran-leap-year.html
+ // 29 + 33 + 33 + 33 = 128
+ // 22 * 128 + 4
+ auto const yoc = (yoe < (22 * 128)) ? ((yoe%128) < 29 ? yoe%128 : (yoe%128 - 29)%33) : yoe - (22 * 128) + 33;
+ return (yoc != 0 && (yoc%4)==0);
+}
+
+CONSTCD11 inline year::operator int() const NOEXCEPT {return y_;}
+CONSTCD11 inline bool year::ok() const NOEXCEPT {return true;}
+
+CONSTCD11
+inline
+year
+year::min() NOEXCEPT
+{
+ return year{std::numeric_limits<short>::min()};
+}
+
+CONSTCD11
+inline
+year
+year::max() NOEXCEPT
+{
+ return year{std::numeric_limits<short>::max()};
+}
+
+CONSTCD11
+inline
+bool
+operator==(const year& x, const year& y) NOEXCEPT
+{
+ return static_cast<int>(x) == static_cast<int>(y);
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const year& x, const year& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+CONSTCD11
+inline
+bool
+operator<(const year& x, const year& y) NOEXCEPT
+{
+ return static_cast<int>(x) < static_cast<int>(y);
+}
+
+CONSTCD11
+inline
+bool
+operator>(const year& x, const year& y) NOEXCEPT
+{
+ return y < x;
+}
+
+CONSTCD11
+inline
+bool
+operator<=(const year& x, const year& y) NOEXCEPT
+{
+ return !(y < x);
+}
+
+CONSTCD11
+inline
+bool
+operator>=(const year& x, const year& y) NOEXCEPT
+{
+ return !(x < y);
+}
+
+CONSTCD11
+inline
+years
+operator-(const year& x, const year& y) NOEXCEPT
+{
+ return years{static_cast<int>(x) - static_cast<int>(y)};
+}
+
+CONSTCD11
+inline
+year
+operator+(const year& x, const years& y) NOEXCEPT
+{
+ return year{static_cast<int>(x) + y.count()};
+}
+
+CONSTCD11
+inline
+year
+operator+(const years& x, const year& y) NOEXCEPT
+{
+ return y + x;
+}
+
+CONSTCD11
+inline
+year
+operator-(const year& x, const years& y) NOEXCEPT
+{
+ return year{static_cast<int>(x) - y.count()};
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year& y)
+{
+ date::detail::save_ostream<CharT, Traits> _(os);
+ os.fill('0');
+ os.flags(std::ios::dec | std::ios::internal);
+ os.width(4 + (y < year{0}));
+ os << static_cast<int>(y);
+ return os;
+}
+
+// weekday
+
+CONSTCD11
+inline
+unsigned char
+weekday::weekday_from_days(int z) NOEXCEPT
+{
+ auto u = static_cast<unsigned>(z);
+ return static_cast<unsigned char>(z >= -4 ? (u+4) % 7 : u % 7);
+}
+
+CONSTCD11
+inline
+weekday::weekday(unsigned wd) NOEXCEPT
+ : wd_(static_cast<decltype(wd_)>(wd != 7 ? wd : 0))
+ {}
+
+CONSTCD11
+inline
+weekday::weekday(const sys_days& dp) NOEXCEPT
+ : wd_(weekday_from_days(dp.time_since_epoch().count()))
+ {}
+
+CONSTCD11
+inline
+weekday::weekday(const local_days& dp) NOEXCEPT
+ : wd_(weekday_from_days(dp.time_since_epoch().count()))
+ {}
+
+CONSTCD14 inline weekday& weekday::operator++() NOEXCEPT {if (++wd_ == 7) wd_ = 0; return *this;}
+CONSTCD14 inline weekday weekday::operator++(int) NOEXCEPT {auto tmp(*this); ++(*this); return tmp;}
+CONSTCD14 inline weekday& weekday::operator--() NOEXCEPT {if (wd_-- == 0) wd_ = 6; return *this;}
+CONSTCD14 inline weekday weekday::operator--(int) NOEXCEPT {auto tmp(*this); --(*this); return tmp;}
+
+CONSTCD14
+inline
+weekday&
+weekday::operator+=(const days& d) NOEXCEPT
+{
+ *this = *this + d;
+ return *this;
+}
+
+CONSTCD14
+inline
+weekday&
+weekday::operator-=(const days& d) NOEXCEPT
+{
+ *this = *this - d;
+ return *this;
+}
+
+CONSTCD11
+inline
+weekday::operator unsigned() const NOEXCEPT
+{
+ return static_cast<unsigned>(wd_);
+}
+
+CONSTCD11 inline bool weekday::ok() const NOEXCEPT {return wd_ <= 6;}
+
+CONSTCD11
+inline
+bool
+operator==(const weekday& x, const weekday& y) NOEXCEPT
+{
+ return static_cast<unsigned>(x) == static_cast<unsigned>(y);
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const weekday& x, const weekday& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+CONSTCD14
+inline
+days
+operator-(const weekday& x, const weekday& y) NOEXCEPT
+{
+ auto const diff = static_cast<unsigned>(x) - static_cast<unsigned>(y);
+ return days{diff <= 6 ? diff : diff + 7};
+}
+
+CONSTCD14
+inline
+weekday
+operator+(const weekday& x, const days& y) NOEXCEPT
+{
+ auto const wdu = static_cast<long long>(static_cast<unsigned>(x)) + y.count();
+ auto const wk = (wdu >= 0 ? wdu : wdu-6) / 7;
+ return weekday{static_cast<unsigned>(wdu - wk * 7)};
+}
+
+CONSTCD14
+inline
+weekday
+operator+(const days& x, const weekday& y) NOEXCEPT
+{
+ return y + x;
+}
+
+CONSTCD14
+inline
+weekday
+operator-(const weekday& x, const days& y) NOEXCEPT
+{
+ return x + -y;
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const weekday& wd)
+{
+ switch (static_cast<unsigned>(wd))
+ {
+ case 0:
+ os << "Yekshanbe";
+ break;
+ case 1:
+ os << "Doshanbe";
+ break;
+ case 2:
+ os << "Seshanbe";
+ break;
+ case 3:
+ os << "Chaharshanbe";
+ break;
+ case 4:
+ os << "Panjshanbe";
+ break;
+ case 5:
+ os << "Adine";
+ break;
+ case 6:
+ os << "Shanbe";
+ break;
+ default:
+ os << static_cast<unsigned>(wd) << " is not a valid weekday";
+ break;
+ }
+ return os;
+}
+
+#if !defined(_MSC_VER) || (_MSC_VER >= 1900)
+inline namespace literals
+{
+
+CONSTCD11
+inline
+solar_hijri::day
+operator "" _d(unsigned long long d) NOEXCEPT
+{
+ return solar_hijri::day{static_cast<unsigned>(d)};
+}
+
+CONSTCD11
+inline
+solar_hijri::year
+operator "" _y(unsigned long long y) NOEXCEPT
+{
+ return solar_hijri::year(static_cast<int>(y));
+}
+#endif // !defined(_MSC_VER) || (_MSC_VER >= 1900)
+
+CONSTDATA solar_hijri::last_spec last{};
+
+CONSTDATA solar_hijri::month far {1};
+CONSTDATA solar_hijri::month ord {2};
+CONSTDATA solar_hijri::month kho {3};
+CONSTDATA solar_hijri::month tir {4};
+CONSTDATA solar_hijri::month mor {5};
+CONSTDATA solar_hijri::month sha {6};
+CONSTDATA solar_hijri::month meh {7};
+CONSTDATA solar_hijri::month aba {8};
+CONSTDATA solar_hijri::month aza {9};
+CONSTDATA solar_hijri::month dey {10};
+CONSTDATA solar_hijri::month bah {11};
+CONSTDATA solar_hijri::month esf {12};
+
+CONSTDATA solar_hijri::month Farvardin {1};
+CONSTDATA solar_hijri::month Ordibehesht {2};
+CONSTDATA solar_hijri::month Khordad {3};
+CONSTDATA solar_hijri::month Tir {4};
+CONSTDATA solar_hijri::month Mordad {5};
+CONSTDATA solar_hijri::month Shahrivar {6};
+CONSTDATA solar_hijri::month Mehr {7};
+CONSTDATA solar_hijri::month Aban {8};
+CONSTDATA solar_hijri::month Azar {9};
+CONSTDATA solar_hijri::month Dey {10};
+CONSTDATA solar_hijri::month Bahman {11};
+CONSTDATA solar_hijri::month Esfand {12};
+
+CONSTDATA solar_hijri::weekday yek {0u};
+CONSTDATA solar_hijri::weekday dos {1u};
+CONSTDATA solar_hijri::weekday ses {2u};
+CONSTDATA solar_hijri::weekday cha {3u};
+CONSTDATA solar_hijri::weekday pan {4u};
+CONSTDATA solar_hijri::weekday adi {5u};
+CONSTDATA solar_hijri::weekday shn {6u};
+
+CONSTDATA solar_hijri::weekday Yekshanbe {0u};
+CONSTDATA solar_hijri::weekday Doshanbe {1u};
+CONSTDATA solar_hijri::weekday Seshanbe {2u};
+CONSTDATA solar_hijri::weekday Chaharshanbe {3u};
+CONSTDATA solar_hijri::weekday Panjshanbe {4u};
+CONSTDATA solar_hijri::weekday Adine {5u};
+CONSTDATA solar_hijri::weekday Shanbe {6u};
+
+#if !defined(_MSC_VER) || (_MSC_VER >= 1900)
+} // inline namespace literals
+#endif
+
+// weekday_indexed
+
+CONSTCD11
+inline
+weekday
+weekday_indexed::weekday() const NOEXCEPT
+{
+ return solar_hijri::weekday{static_cast<unsigned>(wd_)};
+}
+
+CONSTCD11 inline unsigned weekday_indexed::index() const NOEXCEPT {return index_;}
+
+CONSTCD11
+inline
+bool
+weekday_indexed::ok() const NOEXCEPT
+{
+ return weekday().ok() && 1 <= index_ && index_ <= 5;
+}
+
+CONSTCD11
+inline
+weekday_indexed::weekday_indexed(const solar_hijri::weekday& wd, unsigned index) NOEXCEPT
+ : wd_(static_cast<decltype(wd_)>(static_cast<unsigned>(wd)))
+ , index_(static_cast<decltype(index_)>(index))
+ {}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const weekday_indexed& wdi)
+{
+ return os << wdi.weekday() << '[' << wdi.index() << ']';
+}
+
+CONSTCD11
+inline
+weekday_indexed
+weekday::operator[](unsigned index) const NOEXCEPT
+{
+ return {*this, index};
+}
+
+CONSTCD11
+inline
+bool
+operator==(const weekday_indexed& x, const weekday_indexed& y) NOEXCEPT
+{
+ return x.weekday() == y.weekday() && x.index() == y.index();
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const weekday_indexed& x, const weekday_indexed& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+// weekday_last
+
+CONSTCD11 inline solar_hijri::weekday weekday_last::weekday() const NOEXCEPT {return wd_;}
+CONSTCD11 inline bool weekday_last::ok() const NOEXCEPT {return wd_.ok();}
+CONSTCD11 inline weekday_last::weekday_last(const solar_hijri::weekday& wd) NOEXCEPT : wd_(wd) {}
+
+CONSTCD11
+inline
+bool
+operator==(const weekday_last& x, const weekday_last& y) NOEXCEPT
+{
+ return x.weekday() == y.weekday();
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const weekday_last& x, const weekday_last& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const weekday_last& wdl)
+{
+ return os << wdl.weekday() << "[last]";
+}
+
+CONSTCD11
+inline
+weekday_last
+weekday::operator[](last_spec) const NOEXCEPT
+{
+ return weekday_last{*this};
+}
+
+// year_month
+
+CONSTCD11
+inline
+year_month::year_month(const solar_hijri::year& y, const solar_hijri::month& m) NOEXCEPT
+ : y_(y)
+ , m_(m)
+ {}
+
+CONSTCD11 inline year year_month::year() const NOEXCEPT {return y_;}
+CONSTCD11 inline month year_month::month() const NOEXCEPT {return m_;}
+CONSTCD11 inline bool year_month::ok() const NOEXCEPT {return y_.ok() && m_.ok();}
+
+CONSTCD14
+inline
+year_month&
+year_month::operator+=(const months& dm) NOEXCEPT
+{
+ *this = *this + dm;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month&
+year_month::operator-=(const months& dm) NOEXCEPT
+{
+ *this = *this - dm;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month&
+year_month::operator+=(const years& dy) NOEXCEPT
+{
+ *this = *this + dy;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month&
+year_month::operator-=(const years& dy) NOEXCEPT
+{
+ *this = *this - dy;
+ return *this;
+}
+
+CONSTCD11
+inline
+bool
+operator==(const year_month& x, const year_month& y) NOEXCEPT
+{
+ return x.year() == y.year() && x.month() == y.month();
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const year_month& x, const year_month& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+CONSTCD11
+inline
+bool
+operator<(const year_month& x, const year_month& y) NOEXCEPT
+{
+ return x.year() < y.year() ? true
+ : (x.year() > y.year() ? false
+ : (x.month() < y.month()));
+}
+
+CONSTCD11
+inline
+bool
+operator>(const year_month& x, const year_month& y) NOEXCEPT
+{
+ return y < x;
+}
+
+CONSTCD11
+inline
+bool
+operator<=(const year_month& x, const year_month& y) NOEXCEPT
+{
+ return !(y < x);
+}
+
+CONSTCD11
+inline
+bool
+operator>=(const year_month& x, const year_month& y) NOEXCEPT
+{
+ return !(x < y);
+}
+
+CONSTCD14
+inline
+year_month
+operator+(const year_month& ym, const months& dm) NOEXCEPT
+{
+ auto dmi = static_cast<int>(static_cast<unsigned>(ym.month())) - 1 + dm.count();
+ auto dy = (dmi >= 0 ? dmi : dmi-11) / 12;
+ dmi = dmi - dy * 12 + 1;
+ return (ym.year() + years(dy)) / month(static_cast<unsigned>(dmi));
+}
+
+CONSTCD14
+inline
+year_month
+operator+(const months& dm, const year_month& ym) NOEXCEPT
+{
+ return ym + dm;
+}
+
+CONSTCD14
+inline
+year_month
+operator-(const year_month& ym, const months& dm) NOEXCEPT
+{
+ return ym + -dm;
+}
+
+CONSTCD11
+inline
+months
+operator-(const year_month& x, const year_month& y) NOEXCEPT
+{
+ return (x.year() - y.year()) +
+ months(static_cast<unsigned>(x.month()) - static_cast<unsigned>(y.month()));
+}
+
+CONSTCD11
+inline
+year_month
+operator+(const year_month& ym, const years& dy) NOEXCEPT
+{
+ return (ym.year() + dy) / ym.month();
+}
+
+CONSTCD11
+inline
+year_month
+operator+(const years& dy, const year_month& ym) NOEXCEPT
+{
+ return ym + dy;
+}
+
+CONSTCD11
+inline
+year_month
+operator-(const year_month& ym, const years& dy) NOEXCEPT
+{
+ return ym + -dy;
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year_month& ym)
+{
+ return os << ym.year() << '/' << ym.month();
+}
+
+// month_day
+
+CONSTCD11
+inline
+month_day::month_day(const solar_hijri::month& m, const solar_hijri::day& d) NOEXCEPT
+ : m_(m)
+ , d_(d)
+ {}
+
+CONSTCD11 inline solar_hijri::month month_day::month() const NOEXCEPT {return m_;}
+CONSTCD11 inline solar_hijri::day month_day::day() const NOEXCEPT {return d_;}
+
+CONSTCD14
+inline
+bool
+month_day::ok() const NOEXCEPT
+{
+ CONSTDATA solar_hijri::day d[] = {
+ solar_hijri::day(31), solar_hijri::day(31), solar_hijri::day(31),
+ solar_hijri::day(31), solar_hijri::day(31), solar_hijri::day(31),
+ solar_hijri::day(30), solar_hijri::day(30), solar_hijri::day(30),
+ solar_hijri::day(30), solar_hijri::day(30), solar_hijri::day(30)
+ };
+ return m_.ok() && solar_hijri::day(1) <= d_ && d_ <= d[static_cast<unsigned>(m_)-1];
+}
+
+CONSTCD11
+inline
+bool
+operator==(const month_day& x, const month_day& y) NOEXCEPT
+{
+ return x.month() == y.month() && x.day() == y.day();
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const month_day& x, const month_day& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+CONSTCD11
+inline
+bool
+operator<(const month_day& x, const month_day& y) NOEXCEPT
+{
+ return x.month() < y.month() ? true
+ : (x.month() > y.month() ? false
+ : (x.day() < y.day()));
+}
+
+CONSTCD11
+inline
+bool
+operator>(const month_day& x, const month_day& y) NOEXCEPT
+{
+ return y < x;
+}
+
+CONSTCD11
+inline
+bool
+operator<=(const month_day& x, const month_day& y) NOEXCEPT
+{
+ return !(y < x);
+}
+
+CONSTCD11
+inline
+bool
+operator>=(const month_day& x, const month_day& y) NOEXCEPT
+{
+ return !(x < y);
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const month_day& md)
+{
+ return os << md.month() << '/' << md.day();
+}
+
+// month_day_last
+
+CONSTCD11 inline month month_day_last::month() const NOEXCEPT {return m_;}
+CONSTCD11 inline bool month_day_last::ok() const NOEXCEPT {return m_.ok();}
+CONSTCD11 inline month_day_last::month_day_last(const solar_hijri::month& m) NOEXCEPT : m_(m) {}
+
+CONSTCD11
+inline
+bool
+operator==(const month_day_last& x, const month_day_last& y) NOEXCEPT
+{
+ return x.month() == y.month();
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const month_day_last& x, const month_day_last& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+CONSTCD11
+inline
+bool
+operator<(const month_day_last& x, const month_day_last& y) NOEXCEPT
+{
+ return x.month() < y.month();
+}
+
+CONSTCD11
+inline
+bool
+operator>(const month_day_last& x, const month_day_last& y) NOEXCEPT
+{
+ return y < x;
+}
+
+CONSTCD11
+inline
+bool
+operator<=(const month_day_last& x, const month_day_last& y) NOEXCEPT
+{
+ return !(y < x);
+}
+
+CONSTCD11
+inline
+bool
+operator>=(const month_day_last& x, const month_day_last& y) NOEXCEPT
+{
+ return !(x < y);
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const month_day_last& mdl)
+{
+ return os << mdl.month() << "/last";
+}
+
+// month_weekday
+
+CONSTCD11
+inline
+month_weekday::month_weekday(const solar_hijri::month& m,
+ const solar_hijri::weekday_indexed& wdi) NOEXCEPT
+ : m_(m)
+ , wdi_(wdi)
+ {}
+
+CONSTCD11 inline month month_weekday::month() const NOEXCEPT {return m_;}
+
+CONSTCD11
+inline
+weekday_indexed
+month_weekday::weekday_indexed() const NOEXCEPT
+{
+ return wdi_;
+}
+
+CONSTCD11
+inline
+bool
+month_weekday::ok() const NOEXCEPT
+{
+ return m_.ok() && wdi_.ok();
+}
+
+CONSTCD11
+inline
+bool
+operator==(const month_weekday& x, const month_weekday& y) NOEXCEPT
+{
+ return x.month() == y.month() && x.weekday_indexed() == y.weekday_indexed();
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const month_weekday& x, const month_weekday& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const month_weekday& mwd)
+{
+ return os << mwd.month() << '/' << mwd.weekday_indexed();
+}
+
+// month_weekday_last
+
+CONSTCD11
+inline
+month_weekday_last::month_weekday_last(const solar_hijri::month& m,
+ const solar_hijri::weekday_last& wdl) NOEXCEPT
+ : m_(m)
+ , wdl_(wdl)
+ {}
+
+CONSTCD11 inline month month_weekday_last::month() const NOEXCEPT {return m_;}
+
+CONSTCD11
+inline
+weekday_last
+month_weekday_last::weekday_last() const NOEXCEPT
+{
+ return wdl_;
+}
+
+CONSTCD11
+inline
+bool
+month_weekday_last::ok() const NOEXCEPT
+{
+ return m_.ok() && wdl_.ok();
+}
+
+CONSTCD11
+inline
+bool
+operator==(const month_weekday_last& x, const month_weekday_last& y) NOEXCEPT
+{
+ return x.month() == y.month() && x.weekday_last() == y.weekday_last();
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const month_weekday_last& x, const month_weekday_last& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const month_weekday_last& mwdl)
+{
+ return os << mwdl.month() << '/' << mwdl.weekday_last();
+}
+
+// year_month_day_last
+
+CONSTCD11
+inline
+year_month_day_last::year_month_day_last(const solar_hijri::year& y,
+ const solar_hijri::month_day_last& mdl) NOEXCEPT
+ : y_(y)
+ , mdl_(mdl)
+ {}
+
+CONSTCD14
+inline
+year_month_day_last&
+year_month_day_last::operator+=(const months& m) NOEXCEPT
+{
+ *this = *this + m;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month_day_last&
+year_month_day_last::operator-=(const months& m) NOEXCEPT
+{
+ *this = *this - m;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month_day_last&
+year_month_day_last::operator+=(const years& y) NOEXCEPT
+{
+ *this = *this + y;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month_day_last&
+year_month_day_last::operator-=(const years& y) NOEXCEPT
+{
+ *this = *this - y;
+ return *this;
+}
+
+CONSTCD11 inline year year_month_day_last::year() const NOEXCEPT {return y_;}
+CONSTCD11 inline month year_month_day_last::month() const NOEXCEPT {return mdl_.month();}
+
+CONSTCD11
+inline
+month_day_last
+year_month_day_last::month_day_last() const NOEXCEPT
+{
+ return mdl_;
+}
+
+CONSTCD14
+inline
+day
+year_month_day_last::day() const NOEXCEPT
+{
+ CONSTDATA solar_hijri::day d[] = {
+ solar_hijri::day(31), solar_hijri::day(31), solar_hijri::day(31),
+ solar_hijri::day(31), solar_hijri::day(31), solar_hijri::day(31),
+ solar_hijri::day(30), solar_hijri::day(30), solar_hijri::day(30),
+ solar_hijri::day(30), solar_hijri::day(30), solar_hijri::day(29)
+ };
+ return month() != esf || !y_.is_leap() ?
+ d[static_cast<unsigned>(month()) - 1] : solar_hijri::day(30);
+}
+
+CONSTCD14
+inline
+year_month_day_last::operator sys_days() const NOEXCEPT
+{
+ return sys_days(year()/month()/day());
+}
+
+CONSTCD14
+inline
+year_month_day_last::operator local_days() const NOEXCEPT
+{
+ return local_days(year()/month()/day());
+}
+
+CONSTCD11
+inline
+bool
+year_month_day_last::ok() const NOEXCEPT
+{
+ return y_.ok() && mdl_.ok();
+}
+
+CONSTCD11
+inline
+bool
+operator==(const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT
+{
+ return x.year() == y.year() && x.month_day_last() == y.month_day_last();
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+CONSTCD11
+inline
+bool
+operator<(const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT
+{
+ return x.year() < y.year() ? true
+ : (x.year() > y.year() ? false
+ : (x.month_day_last() < y.month_day_last()));
+}
+
+CONSTCD11
+inline
+bool
+operator>(const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT
+{
+ return y < x;
+}
+
+CONSTCD11
+inline
+bool
+operator<=(const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT
+{
+ return !(y < x);
+}
+
+CONSTCD11
+inline
+bool
+operator>=(const year_month_day_last& x, const year_month_day_last& y) NOEXCEPT
+{
+ return !(x < y);
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year_month_day_last& ymdl)
+{
+ return os << ymdl.year() << '/' << ymdl.month_day_last();
+}
+
+CONSTCD14
+inline
+year_month_day_last
+operator+(const year_month_day_last& ymdl, const months& dm) NOEXCEPT
+{
+ return (ymdl.year() / ymdl.month() + dm) / last;
+}
+
+CONSTCD14
+inline
+year_month_day_last
+operator+(const months& dm, const year_month_day_last& ymdl) NOEXCEPT
+{
+ return ymdl + dm;
+}
+
+CONSTCD14
+inline
+year_month_day_last
+operator-(const year_month_day_last& ymdl, const months& dm) NOEXCEPT
+{
+ return ymdl + (-dm);
+}
+
+CONSTCD11
+inline
+year_month_day_last
+operator+(const year_month_day_last& ymdl, const years& dy) NOEXCEPT
+{
+ return {ymdl.year()+dy, ymdl.month_day_last()};
+}
+
+CONSTCD11
+inline
+year_month_day_last
+operator+(const years& dy, const year_month_day_last& ymdl) NOEXCEPT
+{
+ return ymdl + dy;
+}
+
+CONSTCD11
+inline
+year_month_day_last
+operator-(const year_month_day_last& ymdl, const years& dy) NOEXCEPT
+{
+ return ymdl + (-dy);
+}
+
+// year_month_day
+
+CONSTCD11
+inline
+year_month_day::year_month_day(const solar_hijri::year& y, const solar_hijri::month& m,
+ const solar_hijri::day& d) NOEXCEPT
+ : y_(y)
+ , m_(m)
+ , d_(d)
+ {}
+
+CONSTCD14
+inline
+year_month_day::year_month_day(const year_month_day_last& ymdl) NOEXCEPT
+ : y_(ymdl.year())
+ , m_(ymdl.month())
+ , d_(ymdl.day())
+ {}
+
+CONSTCD14
+inline
+year_month_day::year_month_day(sys_days dp) NOEXCEPT
+ : year_month_day(from_days(dp.time_since_epoch()))
+ {}
+
+CONSTCD14
+inline
+year_month_day::year_month_day(local_days dp) NOEXCEPT
+ : year_month_day(from_days(dp.time_since_epoch()))
+ {}
+
+CONSTCD11 inline year year_month_day::year() const NOEXCEPT {return y_;}
+CONSTCD11 inline month year_month_day::month() const NOEXCEPT {return m_;}
+CONSTCD11 inline day year_month_day::day() const NOEXCEPT {return d_;}
+
+CONSTCD14
+inline
+year_month_day&
+year_month_day::operator+=(const months& m) NOEXCEPT
+{
+ *this = *this + m;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month_day&
+year_month_day::operator-=(const months& m) NOEXCEPT
+{
+ *this = *this - m;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month_day&
+year_month_day::operator+=(const years& y) NOEXCEPT
+{
+ *this = *this + y;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month_day&
+year_month_day::operator-=(const years& y) NOEXCEPT
+{
+ *this = *this - y;
+ return *this;
+}
+
+CONSTCD14
+inline
+days
+year_month_day::to_days() const NOEXCEPT
+{
+ static_assert(std::numeric_limits<unsigned>::digits >= 18,
+ "This algorithm has not been ported to a 16 bit unsigned integer");
+ static_assert(std::numeric_limits<int>::digits >= 20,
+ "This algorithm has not been ported to a 16 bit signed integer");
+
+ using namespace internal;
+ auto const y = static_cast<int>(y_) - 475;
+ auto const m = static_cast<unsigned>(m_);
+ auto const d = static_cast<unsigned>(d_);
+ auto const era_d = static_cast<int>(y >= 0 ? y : y-years_in_era+1) / static_cast<double>(years_in_era);
+ auto const era = static_cast<int>(era_d);
+ auto const fdoe = static_cast<int>(epoch + era * days_in_era);
+ auto const yoe = static_cast<int>(y - era * years_in_era);
+
+ auto const period_d = static_cast<double>(yoe/years_in_period);
+ auto const period = static_cast<unsigned>(period_d);
+ auto const yop = yoe%years_in_period;
+ auto const fdop = period*days_in_period;
+ auto const cycle = yop < 29 ? 0 : static_cast<unsigned>((yop-29)/years_in_other_cycles + 1);
+ auto const yoc = yop < 29 ? yop : (yop-29)%years_in_other_cycles;
+ auto const fdoc = cycle > 0 ? days_in_first_cycle + (cycle-1)*days_in_other_cycles : 0;
+ auto const group = yoc < 1 ? 0 : static_cast<unsigned>((yoc-1) / 4);
+ auto const yog = static_cast<int>(yoc < 1 ? -1 : (yoc-1) % 4);
+ auto const fdoyog = group*1461 + (yog+1)*365;
+ auto const fdoyoe = fdop + fdoc + fdoyog;
+
+ auto const doy = 30*(m-1) + ((m > 6) ? 6 : m-1) + d-1; // [0, 365]
+ auto const doe = fdoe + fdoyoe + doy;
+ return days{doe - unix_time_shift};
+}
+
+CONSTCD14
+inline
+year_month_day::operator sys_days() const NOEXCEPT
+{
+ return sys_days{to_days()};
+}
+
+CONSTCD14
+inline
+year_month_day::operator local_days() const NOEXCEPT
+{
+ return local_days{to_days()};
+}
+
+CONSTCD14
+inline
+bool
+year_month_day::ok() const NOEXCEPT
+{
+ if (!(y_.ok() && m_.ok()))
+ return false;
+ return solar_hijri::day(1) <= d_ && d_ <= (y_/m_/last).day();
+}
+
+CONSTCD11
+inline
+bool
+operator==(const year_month_day& x, const year_month_day& y) NOEXCEPT
+{
+ return x.year() == y.year() && x.month() == y.month() && x.day() == y.day();
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const year_month_day& x, const year_month_day& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+CONSTCD11
+inline
+bool
+operator<(const year_month_day& x, const year_month_day& y) NOEXCEPT
+{
+ return x.year() < y.year() ? true
+ : (x.year() > y.year() ? false
+ : (x.month() < y.month() ? true
+ : (x.month() > y.month() ? false
+ : (x.day() < y.day()))));
+}
+
+CONSTCD11
+inline
+bool
+operator>(const year_month_day& x, const year_month_day& y) NOEXCEPT
+{
+ return y < x;
+}
+
+CONSTCD11
+inline
+bool
+operator<=(const year_month_day& x, const year_month_day& y) NOEXCEPT
+{
+ return !(y < x);
+}
+
+CONSTCD11
+inline
+bool
+operator>=(const year_month_day& x, const year_month_day& y) NOEXCEPT
+{
+ return !(x < y);
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year_month_day& ymd)
+{
+ date::detail::save_ostream<CharT, Traits> _(os);
+ os.fill('0');
+ os.flags(std::ios::dec | std::ios::right);
+ os << ymd.year() << '-';
+ os.width(2);
+ os << static_cast<unsigned>(ymd.month()) << '-';
+ os << ymd.day();
+ return os;
+}
+
+CONSTCD14
+inline
+year_month_day
+year_month_day::from_days(days dp) NOEXCEPT
+{
+ static_assert(std::numeric_limits<unsigned>::digits >= 18,
+ "This algorithm has not been ported to a 16 bit unsigned integer");
+ static_assert(std::numeric_limits<int>::digits >= 20,
+ "This algorithm has not been ported to a 16 bit signed integer");
+
+ using namespace internal;
+ auto const z = dp.count() + unix_time_shift;
+ auto const delta = static_cast<int>(z - epoch);
+ auto const era = static_cast<int>(delta >= 0 ? delta : delta-days_in_era+1) / static_cast<double>(days_in_era);
+ auto const era_i = static_cast<int>(era);
+ auto const fdoe = static_cast<int>(epoch + static_cast<int>(era_i * days_in_era));
+
+ auto const doe_fdoe = z - fdoe;
+ auto const period = static_cast<unsigned>(doe_fdoe < 22*days_in_period ? doe_fdoe / days_in_period : 22);
+ auto const dop = doe_fdoe % days_in_period;
+ auto const cycle = dop < days_in_first_cycle ? 0 : (dop-days_in_first_cycle) / days_in_other_cycles + 1;
+ auto const doc = dop < days_in_first_cycle ? dop : (dop-days_in_first_cycle) % days_in_other_cycles;
+ auto const group = doc < 365 && period != 22 ? -1 : static_cast<int>(((doc < 365 ? 365 : doc)-365)/1461);
+ auto const yog = doc < 365 && period != 22 ? -1 : static_cast<int>( (period != 22 ? ((doc-365 )%1461) : doc)/365);
+ auto const yoc = group == -1 ? 0 : (period != 22 ? 1 : 0) + group*4 + (yog == 4 ? 3 : yog);
+ auto const doy = group == -1 ? doc : (period != 22 ? ((yoc-1)%4 == 0 ? (group >= 0 ? (doe_fdoe -
+ (period*days_in_period) -
+ (cycle > 0 ? days_in_first_cycle + (cycle-1)*days_in_other_cycles : 0) -
+ (group*1461 + ((yog == 4 ? 3 : yog)+1)*365))
+ : 365)
+ : doe_fdoe -
+ (period*days_in_period) -
+ (cycle > 0 ? days_in_first_cycle + (cycle-1)*days_in_other_cycles : 0) -
+ (group*1461 + ((yog == 4 ? 3 : yog)+1)*365))
+ : (yog == 4 ? 365 : doe_fdoe - (period*days_in_period) - yog*365));
+ auto const yoe = period != 22 ? period*years_in_period +
+ (cycle > 0 ? years_in_first_cycle +
+ (cycle-1)*years_in_other_cycles
+ : 0) +
+ yoc
+ : 22*years_in_period + ((yog == 4) ? 3 : yog);
+ auto const y = static_cast<int>(static_cast<sys_days::rep>(yoe) + 475 + era_i * years_in_era);
+ auto const m = doy < 186 ? doy/31 + 1 : (doy-186)/30 + 7; // [1, 12]
+ auto const d = doy - (30*(m-1) + ((m > 6) ? 6 : m-1) - 1); // [1, 31]
+
+ return year_month_day{solar_hijri::year(y), solar_hijri::month(m), solar_hijri::day(d)};
+}
+
+CONSTCD14
+inline
+year_month_day
+operator+(const year_month_day& ymd, const months& dm) NOEXCEPT
+{
+ return (ymd.year() / ymd.month() + dm) / ymd.day();
+}
+
+CONSTCD14
+inline
+year_month_day
+operator+(const months& dm, const year_month_day& ymd) NOEXCEPT
+{
+ return ymd + dm;
+}
+
+CONSTCD14
+inline
+year_month_day
+operator-(const year_month_day& ymd, const months& dm) NOEXCEPT
+{
+ return ymd + (-dm);
+}
+
+CONSTCD11
+inline
+year_month_day
+operator+(const year_month_day& ymd, const years& dy) NOEXCEPT
+{
+ return (ymd.year() + dy) / ymd.month() / ymd.day();
+}
+
+CONSTCD11
+inline
+year_month_day
+operator+(const years& dy, const year_month_day& ymd) NOEXCEPT
+{
+ return ymd + dy;
+}
+
+CONSTCD11
+inline
+year_month_day
+operator-(const year_month_day& ymd, const years& dy) NOEXCEPT
+{
+ return ymd + (-dy);
+}
+
+// year_month_weekday
+
+CONSTCD11
+inline
+year_month_weekday::year_month_weekday(const solar_hijri::year& y, const solar_hijri::month& m,
+ const solar_hijri::weekday_indexed& wdi)
+ NOEXCEPT
+ : y_(y)
+ , m_(m)
+ , wdi_(wdi)
+ {}
+
+CONSTCD14
+inline
+year_month_weekday::year_month_weekday(const sys_days& dp) NOEXCEPT
+ : year_month_weekday(from_days(dp.time_since_epoch()))
+ {}
+
+CONSTCD14
+inline
+year_month_weekday::year_month_weekday(const local_days& dp) NOEXCEPT
+ : year_month_weekday(from_days(dp.time_since_epoch()))
+ {}
+
+CONSTCD14
+inline
+year_month_weekday&
+year_month_weekday::operator+=(const months& m) NOEXCEPT
+{
+ *this = *this + m;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month_weekday&
+year_month_weekday::operator-=(const months& m) NOEXCEPT
+{
+ *this = *this - m;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month_weekday&
+year_month_weekday::operator+=(const years& y) NOEXCEPT
+{
+ *this = *this + y;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month_weekday&
+year_month_weekday::operator-=(const years& y) NOEXCEPT
+{
+ *this = *this - y;
+ return *this;
+}
+
+CONSTCD11 inline year year_month_weekday::year() const NOEXCEPT {return y_;}
+CONSTCD11 inline month year_month_weekday::month() const NOEXCEPT {return m_;}
+
+CONSTCD11
+inline
+weekday
+year_month_weekday::weekday() const NOEXCEPT
+{
+ return wdi_.weekday();
+}
+
+CONSTCD11
+inline
+unsigned
+year_month_weekday::index() const NOEXCEPT
+{
+ return wdi_.index();
+}
+
+CONSTCD11
+inline
+weekday_indexed
+year_month_weekday::weekday_indexed() const NOEXCEPT
+{
+ return wdi_;
+}
+
+CONSTCD14
+inline
+year_month_weekday::operator sys_days() const NOEXCEPT
+{
+ return sys_days{to_days()};
+}
+
+CONSTCD14
+inline
+year_month_weekday::operator local_days() const NOEXCEPT
+{
+ return local_days{to_days()};
+}
+
+CONSTCD14
+inline
+bool
+year_month_weekday::ok() const NOEXCEPT
+{
+ if (!y_.ok() || !m_.ok() || !wdi_.weekday().ok() || wdi_.index() < 1)
+ return false;
+ if (wdi_.index() <= 4)
+ return true;
+ auto d2 = wdi_.weekday() - solar_hijri::weekday(y_/m_/1) + days((wdi_.index()-1)*7 + 1);
+ return static_cast<unsigned>(d2.count()) <= static_cast<unsigned>((y_/m_/last).day());
+}
+
+CONSTCD14
+inline
+year_month_weekday
+year_month_weekday::from_days(days d) NOEXCEPT
+{
+ sys_days dp{d};
+ auto const wd = solar_hijri::weekday(dp);
+ auto const ymd = year_month_day(dp);
+ return {ymd.year(), ymd.month(), wd[(static_cast<unsigned>(ymd.day())-1)/7+1]};
+}
+
+CONSTCD14
+inline
+days
+year_month_weekday::to_days() const NOEXCEPT
+{
+ auto d = sys_days(y_/m_/1);
+ return (d + (wdi_.weekday() - solar_hijri::weekday(d) + days{(wdi_.index()-1)*7})
+ ).time_since_epoch();
+}
+
+CONSTCD11
+inline
+bool
+operator==(const year_month_weekday& x, const year_month_weekday& y) NOEXCEPT
+{
+ return x.year() == y.year() && x.month() == y.month() &&
+ x.weekday_indexed() == y.weekday_indexed();
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const year_month_weekday& x, const year_month_weekday& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year_month_weekday& ymwdi)
+{
+ return os << ymwdi.year() << '/' << ymwdi.month()
+ << '/' << ymwdi.weekday_indexed();
+}
+
+CONSTCD14
+inline
+year_month_weekday
+operator+(const year_month_weekday& ymwd, const months& dm) NOEXCEPT
+{
+ return (ymwd.year() / ymwd.month() + dm) / ymwd.weekday_indexed();
+}
+
+CONSTCD14
+inline
+year_month_weekday
+operator+(const months& dm, const year_month_weekday& ymwd) NOEXCEPT
+{
+ return ymwd + dm;
+}
+
+CONSTCD14
+inline
+year_month_weekday
+operator-(const year_month_weekday& ymwd, const months& dm) NOEXCEPT
+{
+ return ymwd + (-dm);
+}
+
+CONSTCD11
+inline
+year_month_weekday
+operator+(const year_month_weekday& ymwd, const years& dy) NOEXCEPT
+{
+ return {ymwd.year()+dy, ymwd.month(), ymwd.weekday_indexed()};
+}
+
+CONSTCD11
+inline
+year_month_weekday
+operator+(const years& dy, const year_month_weekday& ymwd) NOEXCEPT
+{
+ return ymwd + dy;
+}
+
+CONSTCD11
+inline
+year_month_weekday
+operator-(const year_month_weekday& ymwd, const years& dy) NOEXCEPT
+{
+ return ymwd + (-dy);
+}
+
+// year_month_weekday_last
+
+CONSTCD11
+inline
+year_month_weekday_last::year_month_weekday_last(const solar_hijri::year& y,
+ const solar_hijri::month& m,
+ const solar_hijri::weekday_last& wdl) NOEXCEPT
+ : y_(y)
+ , m_(m)
+ , wdl_(wdl)
+ {}
+
+CONSTCD14
+inline
+year_month_weekday_last&
+year_month_weekday_last::operator+=(const months& m) NOEXCEPT
+{
+ *this = *this + m;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month_weekday_last&
+year_month_weekday_last::operator-=(const months& m) NOEXCEPT
+{
+ *this = *this - m;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month_weekday_last&
+year_month_weekday_last::operator+=(const years& y) NOEXCEPT
+{
+ *this = *this + y;
+ return *this;
+}
+
+CONSTCD14
+inline
+year_month_weekday_last&
+year_month_weekday_last::operator-=(const years& y) NOEXCEPT
+{
+ *this = *this - y;
+ return *this;
+}
+
+CONSTCD11 inline year year_month_weekday_last::year() const NOEXCEPT {return y_;}
+CONSTCD11 inline month year_month_weekday_last::month() const NOEXCEPT {return m_;}
+
+CONSTCD11
+inline
+weekday
+year_month_weekday_last::weekday() const NOEXCEPT
+{
+ return wdl_.weekday();
+}
+
+CONSTCD11
+inline
+weekday_last
+year_month_weekday_last::weekday_last() const NOEXCEPT
+{
+ return wdl_;
+}
+
+CONSTCD14
+inline
+year_month_weekday_last::operator sys_days() const NOEXCEPT
+{
+ return sys_days{to_days()};
+}
+
+CONSTCD14
+inline
+year_month_weekday_last::operator local_days() const NOEXCEPT
+{
+ return local_days{to_days()};
+}
+
+CONSTCD11
+inline
+bool
+year_month_weekday_last::ok() const NOEXCEPT
+{
+ return y_.ok() && m_.ok() && wdl_.ok();
+}
+
+CONSTCD14
+inline
+days
+year_month_weekday_last::to_days() const NOEXCEPT
+{
+ auto const d = sys_days(y_/m_/last);
+ return (d - (solar_hijri::weekday{d} - wdl_.weekday())).time_since_epoch();
+}
+
+CONSTCD11
+inline
+bool
+operator==(const year_month_weekday_last& x, const year_month_weekday_last& y) NOEXCEPT
+{
+ return x.year() == y.year() && x.month() == y.month() &&
+ x.weekday_last() == y.weekday_last();
+}
+
+CONSTCD11
+inline
+bool
+operator!=(const year_month_weekday_last& x, const year_month_weekday_last& y) NOEXCEPT
+{
+ return !(x == y);
+}
+
+template<class CharT, class Traits>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const year_month_weekday_last& ymwdl)
+{
+ return os << ymwdl.year() << '/' << ymwdl.month() << '/' << ymwdl.weekday_last();
+}
+
+CONSTCD14
+inline
+year_month_weekday_last
+operator+(const year_month_weekday_last& ymwdl, const months& dm) NOEXCEPT
+{
+ return (ymwdl.year() / ymwdl.month() + dm) / ymwdl.weekday_last();
+}
+
+CONSTCD14
+inline
+year_month_weekday_last
+operator+(const months& dm, const year_month_weekday_last& ymwdl) NOEXCEPT
+{
+ return ymwdl + dm;
+}
+
+CONSTCD14
+inline
+year_month_weekday_last
+operator-(const year_month_weekday_last& ymwdl, const months& dm) NOEXCEPT
+{
+ return ymwdl + (-dm);
+}
+
+CONSTCD11
+inline
+year_month_weekday_last
+operator+(const year_month_weekday_last& ymwdl, const years& dy) NOEXCEPT
+{
+ return {ymwdl.year()+dy, ymwdl.month(), ymwdl.weekday_last()};
+}
+
+CONSTCD11
+inline
+year_month_weekday_last
+operator+(const years& dy, const year_month_weekday_last& ymwdl) NOEXCEPT
+{
+ return ymwdl + dy;
+}
+
+CONSTCD11
+inline
+year_month_weekday_last
+operator-(const year_month_weekday_last& ymwdl, const years& dy) NOEXCEPT
+{
+ return ymwdl + (-dy);
+}
+
+// year_month from operator/()
+
+CONSTCD11
+inline
+year_month
+operator/(const year& y, const month& m) NOEXCEPT
+{
+ return {y, m};
+}
+
+CONSTCD11
+inline
+year_month
+operator/(const year& y, int m) NOEXCEPT
+{
+ return y / month(static_cast<unsigned>(m));
+}
+
+// month_day from operator/()
+
+CONSTCD11
+inline
+month_day
+operator/(const month& m, const day& d) NOEXCEPT
+{
+ return {m, d};
+}
+
+CONSTCD11
+inline
+month_day
+operator/(const day& d, const month& m) NOEXCEPT
+{
+ return m / d;
+}
+
+CONSTCD11
+inline
+month_day
+operator/(const month& m, int d) NOEXCEPT
+{
+ return m / day(static_cast<unsigned>(d));
+}
+
+CONSTCD11
+inline
+month_day
+operator/(int m, const day& d) NOEXCEPT
+{
+ return month(static_cast<unsigned>(m)) / d;
+}
+
+CONSTCD11 inline month_day operator/(const day& d, int m) NOEXCEPT {return m / d;}
+
+// month_day_last from operator/()
+
+CONSTCD11
+inline
+month_day_last
+operator/(const month& m, last_spec) NOEXCEPT
+{
+ return month_day_last{m};
+}
+
+CONSTCD11
+inline
+month_day_last
+operator/(last_spec, const month& m) NOEXCEPT
+{
+ return m/last;
+}
+
+CONSTCD11
+inline
+month_day_last
+operator/(int m, last_spec) NOEXCEPT
+{
+ return month(static_cast<unsigned>(m))/last;
+}
+
+CONSTCD11
+inline
+month_day_last
+operator/(last_spec, int m) NOEXCEPT
+{
+ return m/last;
+}
+
+// month_weekday from operator/()
+
+CONSTCD11
+inline
+month_weekday
+operator/(const month& m, const weekday_indexed& wdi) NOEXCEPT
+{
+ return {m, wdi};
+}
+
+CONSTCD11
+inline
+month_weekday
+operator/(const weekday_indexed& wdi, const month& m) NOEXCEPT
+{
+ return m / wdi;
+}
+
+CONSTCD11
+inline
+month_weekday
+operator/(int m, const weekday_indexed& wdi) NOEXCEPT
+{
+ return month(static_cast<unsigned>(m)) / wdi;
+}
+
+CONSTCD11
+inline
+month_weekday
+operator/(const weekday_indexed& wdi, int m) NOEXCEPT
+{
+ return m / wdi;
+}
+
+// month_weekday_last from operator/()
+
+CONSTCD11
+inline
+month_weekday_last
+operator/(const month& m, const weekday_last& wdl) NOEXCEPT
+{
+ return {m, wdl};
+}
+
+CONSTCD11
+inline
+month_weekday_last
+operator/(const weekday_last& wdl, const month& m) NOEXCEPT
+{
+ return m / wdl;
+}
+
+CONSTCD11
+inline
+month_weekday_last
+operator/(int m, const weekday_last& wdl) NOEXCEPT
+{
+ return month(static_cast<unsigned>(m)) / wdl;
+}
+
+CONSTCD11
+inline
+month_weekday_last
+operator/(const weekday_last& wdl, int m) NOEXCEPT
+{
+ return m / wdl;
+}
+
+// year_month_day from operator/()
+
+CONSTCD11
+inline
+year_month_day
+operator/(const year_month& ym, const day& d) NOEXCEPT
+{
+ return {ym.year(), ym.month(), d};
+}
+
+CONSTCD11
+inline
+year_month_day
+operator/(const year_month& ym, int d) NOEXCEPT
+{
+ return ym / day(static_cast<unsigned>(d));
+}
+
+CONSTCD11
+inline
+year_month_day
+operator/(const year& y, const month_day& md) NOEXCEPT
+{
+ return y / md.month() / md.day();
+}
+
+CONSTCD11
+inline
+year_month_day
+operator/(int y, const month_day& md) NOEXCEPT
+{
+ return year(y) / md;
+}
+
+CONSTCD11
+inline
+year_month_day
+operator/(const month_day& md, const year& y) NOEXCEPT
+{
+ return y / md;
+}
+
+CONSTCD11
+inline
+year_month_day
+operator/(const month_day& md, int y) NOEXCEPT
+{
+ return year(y) / md;
+}
+
+// year_month_day_last from operator/()
+
+CONSTCD11
+inline
+year_month_day_last
+operator/(const year_month& ym, last_spec) NOEXCEPT
+{
+ return {ym.year(), month_day_last{ym.month()}};
+}
+
+CONSTCD11
+inline
+year_month_day_last
+operator/(const year& y, const month_day_last& mdl) NOEXCEPT
+{
+ return {y, mdl};
+}
+
+CONSTCD11
+inline
+year_month_day_last
+operator/(int y, const month_day_last& mdl) NOEXCEPT
+{
+ return year(y) / mdl;
+}
+
+CONSTCD11
+inline
+year_month_day_last
+operator/(const month_day_last& mdl, const year& y) NOEXCEPT
+{
+ return y / mdl;
+}
+
+CONSTCD11
+inline
+year_month_day_last
+operator/(const month_day_last& mdl, int y) NOEXCEPT
+{
+ return year(y) / mdl;
+}
+
+// year_month_weekday from operator/()
+
+CONSTCD11
+inline
+year_month_weekday
+operator/(const year_month& ym, const weekday_indexed& wdi) NOEXCEPT
+{
+ return {ym.year(), ym.month(), wdi};
+}
+
+CONSTCD11
+inline
+year_month_weekday
+operator/(const year& y, const month_weekday& mwd) NOEXCEPT
+{
+ return {y, mwd.month(), mwd.weekday_indexed()};
+}
+
+CONSTCD11
+inline
+year_month_weekday
+operator/(int y, const month_weekday& mwd) NOEXCEPT
+{
+ return year(y) / mwd;
+}
+
+CONSTCD11
+inline
+year_month_weekday
+operator/(const month_weekday& mwd, const year& y) NOEXCEPT
+{
+ return y / mwd;
+}
+
+CONSTCD11
+inline
+year_month_weekday
+operator/(const month_weekday& mwd, int y) NOEXCEPT
+{
+ return year(y) / mwd;
+}
+
+// year_month_weekday_last from operator/()
+
+CONSTCD11
+inline
+year_month_weekday_last
+operator/(const year_month& ym, const weekday_last& wdl) NOEXCEPT
+{
+ return {ym.year(), ym.month(), wdl};
+}
+
+CONSTCD11
+inline
+year_month_weekday_last
+operator/(const year& y, const month_weekday_last& mwdl) NOEXCEPT
+{
+ return {y, mwdl.month(), mwdl.weekday_last()};
+}
+
+CONSTCD11
+inline
+year_month_weekday_last
+operator/(int y, const month_weekday_last& mwdl) NOEXCEPT
+{
+ return year(y) / mwdl;
+}
+
+CONSTCD11
+inline
+year_month_weekday_last
+operator/(const month_weekday_last& mwdl, const year& y) NOEXCEPT
+{
+ return y / mwdl;
+}
+
+CONSTCD11
+inline
+year_month_weekday_last
+operator/(const month_weekday_last& mwdl, int y) NOEXCEPT
+{
+ return year(y) / mwdl;
+}
+
+} // namespace solar_hijri
+
+#endif // SOLAR_HIJRI_H
diff --git a/src/third-party/date/include/date/tz.h b/src/third-party/date/include/date/tz.h
new file mode 100644
index 0000000..4921068
--- /dev/null
+++ b/src/third-party/date/include/date/tz.h
@@ -0,0 +1,2792 @@
+#ifndef TZ_H
+#define TZ_H
+
+// The MIT License (MIT)
+//
+// Copyright (c) 2015, 2016, 2017 Howard Hinnant
+// Copyright (c) 2017 Jiangang Zhuang
+// Copyright (c) 2017 Aaron Bishop
+// Copyright (c) 2017 Tomasz Kamiński
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// Our apologies. When the previous paragraph was written, lowercase had not yet
+// been invented (that would involve another several millennia of evolution).
+// We did not mean to shout.
+
+// Get more recent database at http://www.iana.org/time-zones
+
+// The notion of "current timezone" is something the operating system is expected to "just
+// know". How it knows this is system specific. It's often a value set by the user at OS
+// installation time and recorded by the OS somewhere. On Linux and Mac systems the current
+// timezone name is obtained by looking at the name or contents of a particular file on
+// disk. On Windows the current timezone name comes from the registry. In either method,
+// there is no guarantee that the "native" current timezone name obtained will match any
+// of the "Standard" names in this library's "database". On Linux, the names usually do
+// seem to match so mapping functions to map from native to "Standard" are typically not
+// required. On Windows, the names are never "Standard" so mapping is always required.
+// Technically any OS may use the mapping process but currently only Windows does use it.
+
+#ifndef USE_OS_TZDB
+# define USE_OS_TZDB 0
+#endif
+
+#ifndef HAS_REMOTE_API
+# if USE_OS_TZDB == 0
+# ifdef _WIN32
+# define HAS_REMOTE_API 0
+# else
+# define HAS_REMOTE_API 1
+# endif
+# else // HAS_REMOTE_API makes no since when using the OS timezone database
+# define HAS_REMOTE_API 0
+# endif
+#endif
+
+#ifdef __clang__
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wconstant-logical-operand"
+#endif
+
+static_assert(!(USE_OS_TZDB && HAS_REMOTE_API),
+ "USE_OS_TZDB and HAS_REMOTE_API can not be used together");
+
+#ifdef __clang__
+# pragma clang diagnostic pop
+#endif
+
+#ifndef AUTO_DOWNLOAD
+# define AUTO_DOWNLOAD HAS_REMOTE_API
+#endif
+
+static_assert(HAS_REMOTE_API == 0 ? AUTO_DOWNLOAD == 0 : true,
+ "AUTO_DOWNLOAD can not be turned on without HAS_REMOTE_API");
+
+#ifndef USE_SHELL_API
+# define USE_SHELL_API 1
+#endif
+
+#if USE_OS_TZDB
+# ifdef _WIN32
+# error "USE_OS_TZDB can not be used on Windows"
+# endif
+#endif
+
+#ifndef HAS_DEDUCTION_GUIDES
+# if __cplusplus >= 201703
+# define HAS_DEDUCTION_GUIDES 1
+# else
+# define HAS_DEDUCTION_GUIDES 0
+# endif
+#endif // HAS_DEDUCTION_GUIDES
+
+#include "date.h"
+
+#if defined(_MSC_VER) && (_MSC_VER < 1900)
+#include "tz_private.h"
+#endif
+
+#include <algorithm>
+#include <atomic>
+#include <cassert>
+#include <chrono>
+#include <istream>
+#include <locale>
+#include <memory>
+#include <mutex>
+#include <ostream>
+#include <sstream>
+#include <stdexcept>
+#include <string>
+#include <type_traits>
+#include <utility>
+#include <vector>
+
+#ifdef _WIN32
+# ifdef DATE_BUILD_DLL
+# define DATE_API __declspec(dllexport)
+# elif defined(DATE_USE_DLL)
+# define DATE_API __declspec(dllimport)
+# else
+# define DATE_API
+# endif
+#else
+# ifdef DATE_BUILD_DLL
+# define DATE_API __attribute__ ((visibility ("default")))
+# else
+# define DATE_API
+# endif
+#endif
+
+namespace date
+{
+
+enum class choose {earliest, latest};
+
+namespace detail
+{
+ struct undocumented;
+
+ template<typename T>
+ struct nodeduct
+ {
+ using type = T;
+ };
+
+ template<typename T>
+ using nodeduct_t = typename nodeduct<T>::type;
+}
+
+struct sys_info
+{
+ sys_seconds begin;
+ sys_seconds end;
+ std::chrono::seconds offset;
+ std::chrono::minutes save;
+ std::string abbrev;
+};
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const sys_info& r)
+{
+ os << r.begin << '\n';
+ os << r.end << '\n';
+ os << make_time(r.offset) << "\n";
+ os << make_time(r.save) << "\n";
+ os << r.abbrev << '\n';
+ return os;
+}
+
+struct local_info
+{
+ enum {unique, nonexistent, ambiguous} result;
+ sys_info first;
+ sys_info second;
+};
+
+template<class CharT, class Traits>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const local_info& r)
+{
+ if (r.result == local_info::nonexistent)
+ os << "nonexistent between\n";
+ else if (r.result == local_info::ambiguous)
+ os << "ambiguous between\n";
+ os << r.first;
+ if (r.result != local_info::unique)
+ {
+ os << "and\n";
+ os << r.second;
+ }
+ return os;
+}
+
+class nonexistent_local_time
+ : public std::runtime_error
+{
+public:
+ template <class Duration>
+ nonexistent_local_time(local_time<Duration> tp, const local_info& i);
+
+private:
+ template <class Duration>
+ static
+ std::string
+ make_msg(local_time<Duration> tp, const local_info& i);
+};
+
+template <class Duration>
+inline
+nonexistent_local_time::nonexistent_local_time(local_time<Duration> tp,
+ const local_info& i)
+ : std::runtime_error(make_msg(tp, i))
+{
+}
+
+template <class Duration>
+std::string
+nonexistent_local_time::make_msg(local_time<Duration> tp, const local_info& i)
+{
+ assert(i.result == local_info::nonexistent);
+ std::ostringstream os;
+ os << tp << " is in a gap between\n"
+ << local_seconds{i.first.end.time_since_epoch()} + i.first.offset << ' '
+ << i.first.abbrev << " and\n"
+ << local_seconds{i.second.begin.time_since_epoch()} + i.second.offset << ' '
+ << i.second.abbrev
+ << " which are both equivalent to\n"
+ << i.first.end << " UTC";
+ return os.str();
+}
+
+class ambiguous_local_time
+ : public std::runtime_error
+{
+public:
+ template <class Duration>
+ ambiguous_local_time(local_time<Duration> tp, const local_info& i);
+
+private:
+ template <class Duration>
+ static
+ std::string
+ make_msg(local_time<Duration> tp, const local_info& i);
+};
+
+template <class Duration>
+inline
+ambiguous_local_time::ambiguous_local_time(local_time<Duration> tp, const local_info& i)
+ : std::runtime_error(make_msg(tp, i))
+{
+}
+
+template <class Duration>
+std::string
+ambiguous_local_time::make_msg(local_time<Duration> tp, const local_info& i)
+{
+ assert(i.result == local_info::ambiguous);
+ std::ostringstream os;
+ os << tp << " is ambiguous. It could be\n"
+ << tp << ' ' << i.first.abbrev << " == "
+ << tp - i.first.offset << " UTC or\n"
+ << tp << ' ' << i.second.abbrev << " == "
+ << tp - i.second.offset << " UTC";
+ return os.str();
+}
+
+class time_zone;
+
+#if HAS_STRING_VIEW
+DATE_API const time_zone* locate_zone(std::string_view tz_name);
+#else
+DATE_API const time_zone* locate_zone(const std::string& tz_name);
+#endif
+
+DATE_API const time_zone* current_zone();
+
+template <class T>
+struct zoned_traits
+{
+};
+
+template <>
+struct zoned_traits<const time_zone*>
+{
+ static
+ const time_zone*
+ default_zone()
+ {
+ return date::locate_zone("Etc/UTC");
+ }
+
+#if HAS_STRING_VIEW
+
+ static
+ const time_zone*
+ locate_zone(std::string_view name)
+ {
+ return date::locate_zone(name);
+ }
+
+#else // !HAS_STRING_VIEW
+
+ static
+ const time_zone*
+ locate_zone(const std::string& name)
+ {
+ return date::locate_zone(name);
+ }
+
+ static
+ const time_zone*
+ locate_zone(const char* name)
+ {
+ return date::locate_zone(name);
+ }
+
+#endif // !HAS_STRING_VIEW
+};
+
+template <class Duration, class TimeZonePtr>
+class zoned_time;
+
+template <class Duration1, class Duration2, class TimeZonePtr>
+bool
+operator==(const zoned_time<Duration1, TimeZonePtr>& x,
+ const zoned_time<Duration2, TimeZonePtr>& y);
+
+template <class Duration, class TimeZonePtr = const time_zone*>
+class zoned_time
+{
+public:
+ using duration = typename std::common_type<Duration, std::chrono::seconds>::type;
+
+private:
+ TimeZonePtr zone_;
+ sys_time<duration> tp_;
+
+public:
+#if !defined(_MSC_VER) || (_MSC_VER > 1916)
+ template <class T = TimeZonePtr,
+ class = decltype(zoned_traits<T>::default_zone())>
+#endif
+ zoned_time();
+
+#if !defined(_MSC_VER) || (_MSC_VER > 1916)
+ template <class T = TimeZonePtr,
+ class = decltype(zoned_traits<T>::default_zone())>
+#endif
+ zoned_time(const sys_time<Duration>& st);
+ explicit zoned_time(TimeZonePtr z);
+
+#if HAS_STRING_VIEW
+ template <class T = TimeZonePtr,
+ class = typename std::enable_if
+ <
+ std::is_constructible
+ <
+ zoned_time,
+ decltype(zoned_traits<T>::locate_zone(std::string_view()))
+ >::value
+ >::type>
+ explicit zoned_time(std::string_view name);
+#else
+# if !defined(_MSC_VER) || (_MSC_VER > 1916)
+ template <class T = TimeZonePtr,
+ class = typename std::enable_if
+ <
+ std::is_constructible
+ <
+ zoned_time,
+ decltype(zoned_traits<T>::locate_zone(std::string()))
+ >::value
+ >::type>
+# endif
+ explicit zoned_time(const std::string& name);
+#endif
+
+ template <class Duration2,
+ class = typename std::enable_if
+ <
+ std::is_convertible<sys_time<Duration2>,
+ sys_time<Duration>>::value
+ >::type>
+ zoned_time(const zoned_time<Duration2, TimeZonePtr>& zt) NOEXCEPT;
+
+ zoned_time(TimeZonePtr z, const sys_time<Duration>& st);
+
+#if !defined(_MSC_VER) || (_MSC_VER > 1916)
+ template <class T = TimeZonePtr,
+ class = typename std::enable_if
+ <
+ std::is_convertible
+ <
+ decltype(std::declval<T&>()->to_sys(local_time<Duration>{})),
+ sys_time<duration>
+ >::value
+ >::type>
+#endif
+ zoned_time(TimeZonePtr z, const local_time<Duration>& tp);
+
+#if !defined(_MSC_VER) || (_MSC_VER > 1916)
+ template <class T = TimeZonePtr,
+ class = typename std::enable_if
+ <
+ std::is_convertible
+ <
+ decltype(std::declval<T&>()->to_sys(local_time<Duration>{},
+ choose::earliest)),
+ sys_time<duration>
+ >::value
+ >::type>
+#endif
+ zoned_time(TimeZonePtr z, const local_time<Duration>& tp, choose c);
+
+ template <class Duration2, class TimeZonePtr2,
+ class = typename std::enable_if
+ <
+ std::is_convertible<sys_time<Duration2>,
+ sys_time<Duration>>::value
+ >::type>
+ zoned_time(TimeZonePtr z, const zoned_time<Duration2, TimeZonePtr2>& zt);
+
+ template <class Duration2, class TimeZonePtr2,
+ class = typename std::enable_if
+ <
+ std::is_convertible<sys_time<Duration2>,
+ sys_time<Duration>>::value
+ >::type>
+ zoned_time(TimeZonePtr z, const zoned_time<Duration2, TimeZonePtr2>& zt, choose);
+
+#if HAS_STRING_VIEW
+
+ template <class T = TimeZonePtr,
+ class = typename std::enable_if
+ <
+ std::is_constructible
+ <
+ zoned_time,
+ decltype(zoned_traits<T>::locate_zone(std::string_view())),
+ sys_time<Duration>
+ >::value
+ >::type>
+ zoned_time(std::string_view name, detail::nodeduct_t<const sys_time<Duration>&> st);
+
+ template <class T = TimeZonePtr,
+ class = typename std::enable_if
+ <
+ std::is_constructible
+ <
+ zoned_time,
+ decltype(zoned_traits<T>::locate_zone(std::string_view())),
+ local_time<Duration>
+ >::value
+ >::type>
+ zoned_time(std::string_view name, detail::nodeduct_t<const local_time<Duration>&> tp);
+
+ template <class T = TimeZonePtr,
+ class = typename std::enable_if
+ <
+ std::is_constructible
+ <
+ zoned_time,
+ decltype(zoned_traits<T>::locate_zone(std::string_view())),
+ local_time<Duration>,
+ choose
+ >::value
+ >::type>
+ zoned_time(std::string_view name, detail::nodeduct_t<const local_time<Duration>&> tp, choose c);
+
+ template <class Duration2, class TimeZonePtr2, class T = TimeZonePtr,
+ class = typename std::enable_if
+ <
+ std::is_convertible<sys_time<Duration2>,
+ sys_time<Duration>>::value &&
+ std::is_constructible
+ <
+ zoned_time,
+ decltype(zoned_traits<T>::locate_zone(std::string_view())),
+ zoned_time
+ >::value
+ >::type>
+ zoned_time(std::string_view name, const zoned_time<Duration2, TimeZonePtr2>& zt);
+
+ template <class Duration2, class TimeZonePtr2, class T = TimeZonePtr,
+ class = typename std::enable_if
+ <
+ std::is_convertible<sys_time<Duration2>,
+ sys_time<Duration>>::value &&
+ std::is_constructible
+ <
+ zoned_time,
+ decltype(zoned_traits<T>::locate_zone(std::string_view())),
+ zoned_time,
+ choose
+ >::value
+ >::type>
+ zoned_time(std::string_view name, const zoned_time<Duration2, TimeZonePtr2>& zt, choose);
+
+#else // !HAS_STRING_VIEW
+
+#if !defined(_MSC_VER) || (_MSC_VER > 1916)
+ template <class T = TimeZonePtr,
+ class = typename std::enable_if
+ <
+ std::is_constructible
+ <
+ zoned_time,
+ decltype(zoned_traits<T>::locate_zone(std::string())),
+ sys_time<Duration>
+ >::value
+ >::type>
+#endif
+ zoned_time(const std::string& name, const sys_time<Duration>& st);
+
+#if !defined(_MSC_VER) || (_MSC_VER > 1916)
+ template <class T = TimeZonePtr,
+ class = typename std::enable_if
+ <
+ std::is_constructible
+ <
+ zoned_time,
+ decltype(zoned_traits<T>::locate_zone(std::string())),
+ sys_time<Duration>
+ >::value
+ >::type>
+#endif
+ zoned_time(const char* name, const sys_time<Duration>& st);
+
+#if !defined(_MSC_VER) || (_MSC_VER > 1916)
+ template <class T = TimeZonePtr,
+ class = typename std::enable_if
+ <
+ std::is_constructible
+ <
+ zoned_time,
+ decltype(zoned_traits<T>::locate_zone(std::string())),
+ local_time<Duration>
+ >::value
+ >::type>
+#endif
+ zoned_time(const std::string& name, const local_time<Duration>& tp);
+
+#if !defined(_MSC_VER) || (_MSC_VER > 1916)
+ template <class T = TimeZonePtr,
+ class = typename std::enable_if
+ <
+ std::is_constructible
+ <
+ zoned_time,
+ decltype(zoned_traits<T>::locate_zone(std::string())),
+ local_time<Duration>
+ >::value
+ >::type>
+#endif
+ zoned_time(const char* name, const local_time<Duration>& tp);
+
+#if !defined(_MSC_VER) || (_MSC_VER > 1916)
+ template <class T = TimeZonePtr,
+ class = typename std::enable_if
+ <
+ std::is_constructible
+ <
+ zoned_time,
+ decltype(zoned_traits<T>::locate_zone(std::string())),
+ local_time<Duration>,
+ choose
+ >::value
+ >::type>
+#endif
+ zoned_time(const std::string& name, const local_time<Duration>& tp, choose c);
+
+#if !defined(_MSC_VER) || (_MSC_VER > 1916)
+ template <class T = TimeZonePtr,
+ class = typename std::enable_if
+ <
+ std::is_constructible
+ <
+ zoned_time,
+ decltype(zoned_traits<T>::locate_zone(std::string())),
+ local_time<Duration>,
+ choose
+ >::value
+ >::type>
+#endif
+ zoned_time(const char* name, const local_time<Duration>& tp, choose c);
+
+#if !defined(_MSC_VER) || (_MSC_VER > 1916)
+ template <class Duration2, class TimeZonePtr2, class T = TimeZonePtr,
+ class = typename std::enable_if
+ <
+ std::is_convertible<sys_time<Duration2>,
+ sys_time<Duration>>::value &&
+ std::is_constructible
+ <
+ zoned_time,
+ decltype(zoned_traits<T>::locate_zone(std::string())),
+ zoned_time
+ >::value
+ >::type>
+#else
+ template <class Duration2, class TimeZonePtr2>
+#endif
+ zoned_time(const std::string& name, const zoned_time<Duration2, TimeZonePtr2>& zt);
+
+#if !defined(_MSC_VER) || (_MSC_VER > 1916)
+ template <class Duration2, class TimeZonePtr2, class T = TimeZonePtr,
+ class = typename std::enable_if
+ <
+ std::is_convertible<sys_time<Duration2>,
+ sys_time<Duration>>::value &&
+ std::is_constructible
+ <
+ zoned_time,
+ decltype(zoned_traits<T>::locate_zone(std::string())),
+ zoned_time
+ >::value
+ >::type>
+#else
+ template <class Duration2, class TimeZonePtr2>
+#endif
+ zoned_time(const char* name, const zoned_time<Duration2, TimeZonePtr2>& zt);
+
+#if !defined(_MSC_VER) || (_MSC_VER > 1916)
+ template <class Duration2, class TimeZonePtr2, class T = TimeZonePtr,
+ class = typename std::enable_if
+ <
+ std::is_convertible<sys_time<Duration2>,
+ sys_time<Duration>>::value &&
+ std::is_constructible
+ <
+ zoned_time,
+ decltype(zoned_traits<T>::locate_zone(std::string())),
+ zoned_time,
+ choose
+ >::value
+ >::type>
+#else
+ template <class Duration2, class TimeZonePtr2>
+#endif
+ zoned_time(const std::string& name, const zoned_time<Duration2, TimeZonePtr2>& zt,
+ choose);
+
+#if !defined(_MSC_VER) || (_MSC_VER > 1916)
+ template <class Duration2, class TimeZonePtr2, class T = TimeZonePtr,
+ class = typename std::enable_if
+ <
+ std::is_convertible<sys_time<Duration2>,
+ sys_time<Duration>>::value &&
+ std::is_constructible
+ <
+ zoned_time,
+ decltype(zoned_traits<T>::locate_zone(std::string())),
+ zoned_time,
+ choose
+ >::value
+ >::type>
+#else
+ template <class Duration2, class TimeZonePtr2>
+#endif
+ zoned_time(const char* name, const zoned_time<Duration2, TimeZonePtr2>& zt,
+ choose);
+
+#endif // !HAS_STRING_VIEW
+
+ zoned_time& operator=(const sys_time<Duration>& st);
+ zoned_time& operator=(const local_time<Duration>& ut);
+
+ explicit operator sys_time<duration>() const;
+ explicit operator local_time<duration>() const;
+
+ TimeZonePtr get_time_zone() const;
+ local_time<duration> get_local_time() const;
+ sys_time<duration> get_sys_time() const;
+ sys_info get_info() const;
+
+ template <class Duration1, class Duration2, class TimeZonePtr1>
+ friend
+ bool
+ operator==(const zoned_time<Duration1, TimeZonePtr1>& x,
+ const zoned_time<Duration2, TimeZonePtr1>& y);
+
+ template <class CharT, class Traits, class Duration1, class TimeZonePtr1>
+ friend
+ std::basic_ostream<CharT, Traits>&
+ operator<<(std::basic_ostream<CharT, Traits>& os,
+ const zoned_time<Duration1, TimeZonePtr1>& t);
+
+private:
+ template <class D, class T> friend class zoned_time;
+
+ template <class TimeZonePtr2>
+ static
+ TimeZonePtr2&&
+ check(TimeZonePtr2&& p);
+};
+
+using zoned_seconds = zoned_time<std::chrono::seconds>;
+
+#if HAS_DEDUCTION_GUIDES
+
+namespace detail
+{
+ template<typename TimeZonePtrOrName>
+ using time_zone_representation =
+ std::conditional_t
+ <
+ std::is_convertible<TimeZonePtrOrName, std::string_view>::value,
+ time_zone const*,
+ std::remove_cv_t<std::remove_reference_t<TimeZonePtrOrName>>
+ >;
+}
+
+zoned_time()
+ -> zoned_time<std::chrono::seconds>;
+
+template <class Duration>
+zoned_time(sys_time<Duration>)
+ -> zoned_time<std::common_type_t<Duration, std::chrono::seconds>>;
+
+template <class TimeZonePtrOrName>
+zoned_time(TimeZonePtrOrName&&)
+ -> zoned_time<std::chrono::seconds, detail::time_zone_representation<TimeZonePtrOrName>>;
+
+template <class TimeZonePtrOrName, class Duration>
+zoned_time(TimeZonePtrOrName&&, sys_time<Duration>)
+ -> zoned_time<std::common_type_t<Duration, std::chrono::seconds>, detail::time_zone_representation<TimeZonePtrOrName>>;
+
+template <class TimeZonePtrOrName, class Duration>
+zoned_time(TimeZonePtrOrName&&, local_time<Duration>, choose = choose::earliest)
+ -> zoned_time<std::common_type_t<Duration, std::chrono::seconds>, detail::time_zone_representation<TimeZonePtrOrName>>;
+
+template <class Duration, class TimeZonePtrOrName, class TimeZonePtr2>
+zoned_time(TimeZonePtrOrName&&, zoned_time<Duration, TimeZonePtr2>, choose = choose::earliest)
+ -> zoned_time<std::common_type_t<Duration, std::chrono::seconds>, detail::time_zone_representation<TimeZonePtrOrName>>;
+
+#endif // HAS_DEDUCTION_GUIDES
+
+template <class Duration1, class Duration2, class TimeZonePtr>
+inline
+bool
+operator==(const zoned_time<Duration1, TimeZonePtr>& x,
+ const zoned_time<Duration2, TimeZonePtr>& y)
+{
+ return x.zone_ == y.zone_ && x.tp_ == y.tp_;
+}
+
+template <class Duration1, class Duration2, class TimeZonePtr>
+inline
+bool
+operator!=(const zoned_time<Duration1, TimeZonePtr>& x,
+ const zoned_time<Duration2, TimeZonePtr>& y)
+{
+ return !(x == y);
+}
+
+#if !defined(_MSC_VER) || (_MSC_VER >= 1900)
+
+namespace detail
+{
+# if USE_OS_TZDB
+ struct transition;
+ struct expanded_ttinfo;
+# else // !USE_OS_TZDB
+ struct zonelet;
+ class Rule;
+# endif // !USE_OS_TZDB
+}
+
+#endif // !defined(_MSC_VER) || (_MSC_VER >= 1900)
+
+class time_zone
+{
+private:
+ std::string name_;
+#if USE_OS_TZDB
+ std::vector<detail::transition> transitions_;
+ std::vector<detail::expanded_ttinfo> ttinfos_;
+#else // !USE_OS_TZDB
+ std::vector<detail::zonelet> zonelets_;
+#endif // !USE_OS_TZDB
+ std::unique_ptr<std::once_flag> adjusted_;
+
+public:
+#if !defined(_MSC_VER) || (_MSC_VER >= 1900)
+ time_zone(time_zone&&) = default;
+ time_zone& operator=(time_zone&&) = default;
+#else // defined(_MSC_VER) && (_MSC_VER < 1900)
+ time_zone(time_zone&& src);
+ time_zone& operator=(time_zone&& src);
+#endif // defined(_MSC_VER) && (_MSC_VER < 1900)
+
+ DATE_API explicit time_zone(const std::string& s, detail::undocumented);
+
+ const std::string& name() const NOEXCEPT;
+
+ template <class Duration> sys_info get_info(sys_time<Duration> st) const;
+ template <class Duration> local_info get_info(local_time<Duration> tp) const;
+
+ template <class Duration>
+ sys_time<typename std::common_type<Duration, std::chrono::seconds>::type>
+ to_sys(local_time<Duration> tp) const;
+
+ template <class Duration>
+ sys_time<typename std::common_type<Duration, std::chrono::seconds>::type>
+ to_sys(local_time<Duration> tp, choose z) const;
+
+ template <class Duration>
+ local_time<typename std::common_type<Duration, std::chrono::seconds>::type>
+ to_local(sys_time<Duration> tp) const;
+
+ friend bool operator==(const time_zone& x, const time_zone& y) NOEXCEPT;
+ friend bool operator< (const time_zone& x, const time_zone& y) NOEXCEPT;
+ friend DATE_API std::ostream& operator<<(std::ostream& os, const time_zone& z);
+
+#if !USE_OS_TZDB
+ DATE_API void add(const std::string& s);
+#endif // !USE_OS_TZDB
+
+private:
+ DATE_API sys_info get_info_impl(sys_seconds tp) const;
+ DATE_API local_info get_info_impl(local_seconds tp) const;
+
+ template <class Duration>
+ sys_time<typename std::common_type<Duration, std::chrono::seconds>::type>
+ to_sys_impl(local_time<Duration> tp, choose z, std::false_type) const;
+ template <class Duration>
+ sys_time<typename std::common_type<Duration, std::chrono::seconds>::type>
+ to_sys_impl(local_time<Duration> tp, choose, std::true_type) const;
+
+#if USE_OS_TZDB
+ DATE_API void init() const;
+ DATE_API void init_impl();
+ DATE_API sys_info
+ load_sys_info(std::vector<detail::transition>::const_iterator i) const;
+
+ template <class TimeType>
+ DATE_API void
+ load_data(std::istream& inf, std::int32_t tzh_leapcnt, std::int32_t tzh_timecnt,
+ std::int32_t tzh_typecnt, std::int32_t tzh_charcnt);
+#else // !USE_OS_TZDB
+ DATE_API sys_info get_info_impl(sys_seconds tp, int timezone) const;
+ DATE_API void adjust_infos(const std::vector<detail::Rule>& rules);
+ DATE_API void parse_info(std::istream& in);
+#endif // !USE_OS_TZDB
+};
+
+#if defined(_MSC_VER) && (_MSC_VER < 1900)
+
+inline
+time_zone::time_zone(time_zone&& src)
+ : name_(std::move(src.name_))
+ , zonelets_(std::move(src.zonelets_))
+ , adjusted_(std::move(src.adjusted_))
+ {}
+
+inline
+time_zone&
+time_zone::operator=(time_zone&& src)
+{
+ name_ = std::move(src.name_);
+ zonelets_ = std::move(src.zonelets_);
+ adjusted_ = std::move(src.adjusted_);
+ return *this;
+}
+
+#endif // defined(_MSC_VER) && (_MSC_VER < 1900)
+
+inline
+const std::string&
+time_zone::name() const NOEXCEPT
+{
+ return name_;
+}
+
+template <class Duration>
+inline
+sys_info
+time_zone::get_info(sys_time<Duration> st) const
+{
+ return get_info_impl(date::floor<std::chrono::seconds>(st));
+}
+
+template <class Duration>
+inline
+local_info
+time_zone::get_info(local_time<Duration> tp) const
+{
+ return get_info_impl(date::floor<std::chrono::seconds>(tp));
+}
+
+template <class Duration>
+inline
+sys_time<typename std::common_type<Duration, std::chrono::seconds>::type>
+time_zone::to_sys(local_time<Duration> tp) const
+{
+ return to_sys_impl(tp, choose{}, std::true_type{});
+}
+
+template <class Duration>
+inline
+sys_time<typename std::common_type<Duration, std::chrono::seconds>::type>
+time_zone::to_sys(local_time<Duration> tp, choose z) const
+{
+ return to_sys_impl(tp, z, std::false_type{});
+}
+
+template <class Duration>
+inline
+local_time<typename std::common_type<Duration, std::chrono::seconds>::type>
+time_zone::to_local(sys_time<Duration> tp) const
+{
+ using LT = local_time<typename std::common_type<Duration, std::chrono::seconds>::type>;
+ auto i = get_info(tp);
+ return LT{(tp + i.offset).time_since_epoch()};
+}
+
+inline bool operator==(const time_zone& x, const time_zone& y) NOEXCEPT {return x.name_ == y.name_;}
+inline bool operator< (const time_zone& x, const time_zone& y) NOEXCEPT {return x.name_ < y.name_;}
+
+inline bool operator!=(const time_zone& x, const time_zone& y) NOEXCEPT {return !(x == y);}
+inline bool operator> (const time_zone& x, const time_zone& y) NOEXCEPT {return y < x;}
+inline bool operator<=(const time_zone& x, const time_zone& y) NOEXCEPT {return !(y < x);}
+inline bool operator>=(const time_zone& x, const time_zone& y) NOEXCEPT {return !(x < y);}
+
+template <class Duration>
+sys_time<typename std::common_type<Duration, std::chrono::seconds>::type>
+time_zone::to_sys_impl(local_time<Duration> tp, choose z, std::false_type) const
+{
+ auto i = get_info(tp);
+ if (i.result == local_info::nonexistent)
+ {
+ return i.first.end;
+ }
+ else if (i.result == local_info::ambiguous)
+ {
+ if (z == choose::latest)
+ return sys_time<Duration>{tp.time_since_epoch()} - i.second.offset;
+ }
+ return sys_time<Duration>{tp.time_since_epoch()} - i.first.offset;
+}
+
+template <class Duration>
+sys_time<typename std::common_type<Duration, std::chrono::seconds>::type>
+time_zone::to_sys_impl(local_time<Duration> tp, choose, std::true_type) const
+{
+ auto i = get_info(tp);
+ if (i.result == local_info::nonexistent)
+ throw nonexistent_local_time(tp, i);
+ else if (i.result == local_info::ambiguous)
+ throw ambiguous_local_time(tp, i);
+ return sys_time<Duration>{tp.time_since_epoch()} - i.first.offset;
+}
+
+#if !USE_OS_TZDB
+
+class time_zone_link
+{
+private:
+ std::string name_;
+ std::string target_;
+public:
+ DATE_API explicit time_zone_link(const std::string& s);
+
+ const std::string& name() const {return name_;}
+ const std::string& target() const {return target_;}
+
+ friend bool operator==(const time_zone_link& x, const time_zone_link& y) {return x.name_ == y.name_;}
+ friend bool operator< (const time_zone_link& x, const time_zone_link& y) {return x.name_ < y.name_;}
+
+ friend DATE_API std::ostream& operator<<(std::ostream& os, const time_zone_link& x);
+};
+
+using link = time_zone_link;
+
+inline bool operator!=(const time_zone_link& x, const time_zone_link& y) {return !(x == y);}
+inline bool operator> (const time_zone_link& x, const time_zone_link& y) {return y < x;}
+inline bool operator<=(const time_zone_link& x, const time_zone_link& y) {return !(y < x);}
+inline bool operator>=(const time_zone_link& x, const time_zone_link& y) {return !(x < y);}
+
+#endif // !USE_OS_TZDB
+
+class leap_second
+{
+private:
+ sys_seconds date_;
+
+public:
+#if USE_OS_TZDB
+ DATE_API explicit leap_second(const sys_seconds& s, detail::undocumented);
+#else
+ DATE_API explicit leap_second(const std::string& s, detail::undocumented);
+#endif
+
+ sys_seconds date() const {return date_;}
+
+ friend bool operator==(const leap_second& x, const leap_second& y) {return x.date_ == y.date_;}
+ friend bool operator< (const leap_second& x, const leap_second& y) {return x.date_ < y.date_;}
+
+ template <class Duration>
+ friend
+ bool
+ operator==(const leap_second& x, const sys_time<Duration>& y)
+ {
+ return x.date_ == y;
+ }
+
+ template <class Duration>
+ friend
+ bool
+ operator< (const leap_second& x, const sys_time<Duration>& y)
+ {
+ return x.date_ < y;
+ }
+
+ template <class Duration>
+ friend
+ bool
+ operator< (const sys_time<Duration>& x, const leap_second& y)
+ {
+ return x < y.date_;
+ }
+
+ friend DATE_API std::ostream& operator<<(std::ostream& os, const leap_second& x);
+};
+
+inline bool operator!=(const leap_second& x, const leap_second& y) {return !(x == y);}
+inline bool operator> (const leap_second& x, const leap_second& y) {return y < x;}
+inline bool operator<=(const leap_second& x, const leap_second& y) {return !(y < x);}
+inline bool operator>=(const leap_second& x, const leap_second& y) {return !(x < y);}
+
+template <class Duration>
+inline
+bool
+operator==(const sys_time<Duration>& x, const leap_second& y)
+{
+ return y == x;
+}
+
+template <class Duration>
+inline
+bool
+operator!=(const leap_second& x, const sys_time<Duration>& y)
+{
+ return !(x == y);
+}
+
+template <class Duration>
+inline
+bool
+operator!=(const sys_time<Duration>& x, const leap_second& y)
+{
+ return !(x == y);
+}
+
+template <class Duration>
+inline
+bool
+operator> (const leap_second& x, const sys_time<Duration>& y)
+{
+ return y < x;
+}
+
+template <class Duration>
+inline
+bool
+operator> (const sys_time<Duration>& x, const leap_second& y)
+{
+ return y < x;
+}
+
+template <class Duration>
+inline
+bool
+operator<=(const leap_second& x, const sys_time<Duration>& y)
+{
+ return !(y < x);
+}
+
+template <class Duration>
+inline
+bool
+operator<=(const sys_time<Duration>& x, const leap_second& y)
+{
+ return !(y < x);
+}
+
+template <class Duration>
+inline
+bool
+operator>=(const leap_second& x, const sys_time<Duration>& y)
+{
+ return !(x < y);
+}
+
+template <class Duration>
+inline
+bool
+operator>=(const sys_time<Duration>& x, const leap_second& y)
+{
+ return !(x < y);
+}
+
+using leap = leap_second;
+
+#ifdef _WIN32
+
+namespace detail
+{
+
+// The time zone mapping is modelled after this data file:
+// http://unicode.org/repos/cldr/trunk/common/supplemental/windowsZones.xml
+// and the field names match the element names from the mapZone element
+// of windowsZones.xml.
+// The website displays this file here:
+// http://www.unicode.org/cldr/charts/latest/supplemental/zone_tzid.html
+// The html view is sorted before being displayed but is otherwise the same
+// There is a mapping between the os centric view (in this case windows)
+// the html displays uses and the generic view the xml file.
+// That mapping is this:
+// display column "windows" -> xml field "other".
+// display column "region" -> xml field "territory".
+// display column "tzid" -> xml field "type".
+// This structure uses the generic terminology because it could be
+// used to to support other os/native name conversions, not just windows,
+// and using the same generic names helps retain the connection to the
+// origin of the data that we are using.
+struct timezone_mapping
+{
+ timezone_mapping(const char* other, const char* territory, const char* type)
+ : other(other), territory(territory), type(type)
+ {
+ }
+ timezone_mapping() = default;
+ std::string other;
+ std::string territory;
+ std::string type;
+};
+
+} // detail
+
+#endif // _WIN32
+
+struct tzdb
+{
+ std::string version = "unknown";
+ std::vector<time_zone> zones;
+#if !USE_OS_TZDB
+ std::vector<time_zone_link> links;
+#endif
+ std::vector<leap_second> leap_seconds;
+#if !USE_OS_TZDB
+ std::vector<detail::Rule> rules;
+#endif
+#ifdef _WIN32
+ std::vector<detail::timezone_mapping> mappings;
+#endif
+ tzdb* next = nullptr;
+
+ tzdb() = default;
+#if !defined(_MSC_VER) || (_MSC_VER >= 1900)
+ tzdb(tzdb&&) = default;
+ tzdb& operator=(tzdb&&) = default;
+#else // defined(_MSC_VER) && (_MSC_VER < 1900)
+ tzdb(tzdb&& src)
+ : version(std::move(src.version))
+ , zones(std::move(src.zones))
+ , links(std::move(src.links))
+ , leap_seconds(std::move(src.leap_seconds))
+ , rules(std::move(src.rules))
+ , mappings(std::move(src.mappings))
+ {}
+
+ tzdb& operator=(tzdb&& src)
+ {
+ version = std::move(src.version);
+ zones = std::move(src.zones);
+ links = std::move(src.links);
+ leap_seconds = std::move(src.leap_seconds);
+ rules = std::move(src.rules);
+ mappings = std::move(src.mappings);
+ return *this;
+ }
+#endif // defined(_MSC_VER) && (_MSC_VER < 1900)
+
+#if HAS_STRING_VIEW
+ const time_zone* locate_zone(std::string_view tz_name) const;
+#else
+ const time_zone* locate_zone(const std::string& tz_name) const;
+#endif
+ const time_zone* current_zone() const;
+};
+
+using TZ_DB = tzdb;
+
+DATE_API std::ostream&
+operator<<(std::ostream& os, const tzdb& db);
+
+DATE_API const tzdb& get_tzdb();
+
+class tzdb_list
+{
+ std::atomic<tzdb*> head_{nullptr};
+
+public:
+ ~tzdb_list();
+ tzdb_list() = default;
+ tzdb_list(tzdb_list&& x) NOEXCEPT;
+
+ const tzdb& front() const NOEXCEPT {return *head_;}
+ tzdb& front() NOEXCEPT {return *head_;}
+
+ class const_iterator;
+
+ const_iterator begin() const NOEXCEPT;
+ const_iterator end() const NOEXCEPT;
+
+ const_iterator cbegin() const NOEXCEPT;
+ const_iterator cend() const NOEXCEPT;
+
+ const_iterator erase_after(const_iterator p) NOEXCEPT;
+
+ struct undocumented_helper;
+private:
+ void push_front(tzdb* tzdb) NOEXCEPT;
+};
+
+class tzdb_list::const_iterator
+{
+ tzdb* p_ = nullptr;
+
+ explicit const_iterator(tzdb* p) NOEXCEPT : p_{p} {}
+public:
+ const_iterator() = default;
+
+ using iterator_category = std::forward_iterator_tag;
+ using value_type = tzdb;
+ using reference = const value_type&;
+ using pointer = const value_type*;
+ using difference_type = std::ptrdiff_t;
+
+ reference operator*() const NOEXCEPT {return *p_;}
+ pointer operator->() const NOEXCEPT {return p_;}
+
+ const_iterator& operator++() NOEXCEPT {p_ = p_->next; return *this;}
+ const_iterator operator++(int) NOEXCEPT {auto t = *this; ++(*this); return t;}
+
+ friend
+ bool
+ operator==(const const_iterator& x, const const_iterator& y) NOEXCEPT
+ {return x.p_ == y.p_;}
+
+ friend
+ bool
+ operator!=(const const_iterator& x, const const_iterator& y) NOEXCEPT
+ {return !(x == y);}
+
+ friend class tzdb_list;
+};
+
+inline
+tzdb_list::const_iterator
+tzdb_list::begin() const NOEXCEPT
+{
+ return const_iterator{head_};
+}
+
+inline
+tzdb_list::const_iterator
+tzdb_list::end() const NOEXCEPT
+{
+ return const_iterator{nullptr};
+}
+
+inline
+tzdb_list::const_iterator
+tzdb_list::cbegin() const NOEXCEPT
+{
+ return begin();
+}
+
+inline
+tzdb_list::const_iterator
+tzdb_list::cend() const NOEXCEPT
+{
+ return end();
+}
+
+DATE_API tzdb_list& get_tzdb_list();
+
+#if !USE_OS_TZDB
+
+DATE_API const tzdb& reload_tzdb();
+DATE_API void set_install(const std::string& install);
+
+#endif // !USE_OS_TZDB
+
+#if HAS_REMOTE_API
+
+DATE_API std::string remote_version();
+// if provided error_buffer size should be at least CURL_ERROR_SIZE
+DATE_API bool remote_download(const std::string& version, char* error_buffer = nullptr);
+DATE_API bool remote_install(const std::string& version);
+
+#endif
+
+// zoned_time
+
+namespace detail
+{
+
+template <class T>
+inline
+T*
+to_raw_pointer(T* p) NOEXCEPT
+{
+ return p;
+}
+
+template <class Pointer>
+inline
+auto
+to_raw_pointer(Pointer p) NOEXCEPT
+ -> decltype(detail::to_raw_pointer(p.operator->()))
+{
+ return detail::to_raw_pointer(p.operator->());
+}
+
+} // namespace detail
+
+template <class Duration, class TimeZonePtr>
+template <class TimeZonePtr2>
+inline
+TimeZonePtr2&&
+zoned_time<Duration, TimeZonePtr>::check(TimeZonePtr2&& p)
+{
+ if (detail::to_raw_pointer(p) == nullptr)
+ throw std::runtime_error(
+ "zoned_time constructed with a time zone pointer == nullptr");
+ return std::forward<TimeZonePtr2>(p);
+}
+
+template <class Duration, class TimeZonePtr>
+#if !defined(_MSC_VER) || (_MSC_VER > 1916)
+template <class T, class>
+#endif
+inline
+zoned_time<Duration, TimeZonePtr>::zoned_time()
+ : zone_(check(zoned_traits<TimeZonePtr>::default_zone()))
+ {}
+
+template <class Duration, class TimeZonePtr>
+#if !defined(_MSC_VER) || (_MSC_VER > 1916)
+template <class T, class>
+#endif
+inline
+zoned_time<Duration, TimeZonePtr>::zoned_time(const sys_time<Duration>& st)
+ : zone_(check(zoned_traits<TimeZonePtr>::default_zone()))
+ , tp_(st)
+ {}
+
+template <class Duration, class TimeZonePtr>
+inline
+zoned_time<Duration, TimeZonePtr>::zoned_time(TimeZonePtr z)
+ : zone_(check(std::move(z)))
+ {}
+
+#if HAS_STRING_VIEW
+
+template <class Duration, class TimeZonePtr>
+template <class T, class>
+inline
+zoned_time<Duration, TimeZonePtr>::zoned_time(std::string_view name)
+ : zoned_time(zoned_traits<TimeZonePtr>::locate_zone(name))
+ {}
+
+#else // !HAS_STRING_VIEW
+
+template <class Duration, class TimeZonePtr>
+#if !defined(_MSC_VER) || (_MSC_VER > 1916)
+template <class T, class>
+#endif
+inline
+zoned_time<Duration, TimeZonePtr>::zoned_time(const std::string& name)
+ : zoned_time(zoned_traits<TimeZonePtr>::locate_zone(name))
+ {}
+
+#endif // !HAS_STRING_VIEW
+
+template <class Duration, class TimeZonePtr>
+template <class Duration2, class>
+inline
+zoned_time<Duration, TimeZonePtr>::zoned_time(const zoned_time<Duration2, TimeZonePtr>& zt) NOEXCEPT
+ : zone_(zt.zone_)
+ , tp_(zt.tp_)
+ {}
+
+template <class Duration, class TimeZonePtr>
+inline
+zoned_time<Duration, TimeZonePtr>::zoned_time(TimeZonePtr z, const sys_time<Duration>& st)
+ : zone_(check(std::move(z)))
+ , tp_(st)
+ {}
+
+template <class Duration, class TimeZonePtr>
+#if !defined(_MSC_VER) || (_MSC_VER > 1916)
+template <class T, class>
+#endif
+inline
+zoned_time<Duration, TimeZonePtr>::zoned_time(TimeZonePtr z, const local_time<Duration>& t)
+ : zone_(check(std::move(z)))
+ , tp_(zone_->to_sys(t))
+ {}
+
+template <class Duration, class TimeZonePtr>
+#if !defined(_MSC_VER) || (_MSC_VER > 1916)
+template <class T, class>
+#endif
+inline
+zoned_time<Duration, TimeZonePtr>::zoned_time(TimeZonePtr z, const local_time<Duration>& t,
+ choose c)
+ : zone_(check(std::move(z)))
+ , tp_(zone_->to_sys(t, c))
+ {}
+
+template <class Duration, class TimeZonePtr>
+template <class Duration2, class TimeZonePtr2, class>
+inline
+zoned_time<Duration, TimeZonePtr>::zoned_time(TimeZonePtr z,
+ const zoned_time<Duration2, TimeZonePtr2>& zt)
+ : zone_(check(std::move(z)))
+ , tp_(zt.tp_)
+ {}
+
+template <class Duration, class TimeZonePtr>
+template <class Duration2, class TimeZonePtr2, class>
+inline
+zoned_time<Duration, TimeZonePtr>::zoned_time(TimeZonePtr z,
+ const zoned_time<Duration2, TimeZonePtr2>& zt, choose)
+ : zoned_time(std::move(z), zt)
+ {}
+
+#if HAS_STRING_VIEW
+
+template <class Duration, class TimeZonePtr>
+template <class T, class>
+inline
+zoned_time<Duration, TimeZonePtr>::zoned_time(std::string_view name,
+ detail::nodeduct_t<const sys_time<Duration>&> st)
+ : zoned_time(zoned_traits<TimeZonePtr>::locate_zone(name), st)
+ {}
+
+template <class Duration, class TimeZonePtr>
+template <class T, class>
+inline
+zoned_time<Duration, TimeZonePtr>::zoned_time(std::string_view name,
+ detail::nodeduct_t<const local_time<Duration>&> t)
+ : zoned_time(zoned_traits<TimeZonePtr>::locate_zone(name), t)
+ {}
+
+template <class Duration, class TimeZonePtr>
+template <class T, class>
+inline
+zoned_time<Duration, TimeZonePtr>::zoned_time(std::string_view name,
+ detail::nodeduct_t<const local_time<Duration>&> t, choose c)
+ : zoned_time(zoned_traits<TimeZonePtr>::locate_zone(name), t, c)
+ {}
+
+template <class Duration, class TimeZonePtr>
+template <class Duration2, class TimeZonePtr2, class, class>
+inline
+zoned_time<Duration, TimeZonePtr>::zoned_time(std::string_view name,
+ const zoned_time<Duration2, TimeZonePtr2>& zt)
+ : zoned_time(zoned_traits<TimeZonePtr>::locate_zone(name), zt)
+ {}
+
+template <class Duration, class TimeZonePtr>
+template <class Duration2, class TimeZonePtr2, class, class>
+inline
+zoned_time<Duration, TimeZonePtr>::zoned_time(std::string_view name,
+ const zoned_time<Duration2, TimeZonePtr2>& zt,
+ choose c)
+ : zoned_time(zoned_traits<TimeZonePtr>::locate_zone(name), zt, c)
+ {}
+
+#else // !HAS_STRING_VIEW
+
+template <class Duration, class TimeZonePtr>
+#if !defined(_MSC_VER) || (_MSC_VER > 1916)
+template <class T, class>
+#endif
+inline
+zoned_time<Duration, TimeZonePtr>::zoned_time(const std::string& name,
+ const sys_time<Duration>& st)
+ : zoned_time(zoned_traits<TimeZonePtr>::locate_zone(name), st)
+ {}
+
+template <class Duration, class TimeZonePtr>
+#if !defined(_MSC_VER) || (_MSC_VER > 1916)
+template <class T, class>
+#endif
+inline
+zoned_time<Duration, TimeZonePtr>::zoned_time(const char* name,
+ const sys_time<Duration>& st)
+ : zoned_time(zoned_traits<TimeZonePtr>::locate_zone(name), st)
+ {}
+
+template <class Duration, class TimeZonePtr>
+#if !defined(_MSC_VER) || (_MSC_VER > 1916)
+template <class T, class>
+#endif
+inline
+zoned_time<Duration, TimeZonePtr>::zoned_time(const std::string& name,
+ const local_time<Duration>& t)
+ : zoned_time(zoned_traits<TimeZonePtr>::locate_zone(name), t)
+ {}
+
+template <class Duration, class TimeZonePtr>
+#if !defined(_MSC_VER) || (_MSC_VER > 1916)
+template <class T, class>
+#endif
+inline
+zoned_time<Duration, TimeZonePtr>::zoned_time(const char* name,
+ const local_time<Duration>& t)
+ : zoned_time(zoned_traits<TimeZonePtr>::locate_zone(name), t)
+ {}
+
+template <class Duration, class TimeZonePtr>
+#if !defined(_MSC_VER) || (_MSC_VER > 1916)
+template <class T, class>
+#endif
+inline
+zoned_time<Duration, TimeZonePtr>::zoned_time(const std::string& name,
+ const local_time<Duration>& t, choose c)
+ : zoned_time(zoned_traits<TimeZonePtr>::locate_zone(name), t, c)
+ {}
+
+template <class Duration, class TimeZonePtr>
+#if !defined(_MSC_VER) || (_MSC_VER > 1916)
+template <class T, class>
+#endif
+inline
+zoned_time<Duration, TimeZonePtr>::zoned_time(const char* name,
+ const local_time<Duration>& t, choose c)
+ : zoned_time(zoned_traits<TimeZonePtr>::locate_zone(name), t, c)
+ {}
+
+template <class Duration, class TimeZonePtr>
+#if !defined(_MSC_VER) || (_MSC_VER > 1916)
+template <class Duration2, class TimeZonePtr2, class, class>
+#else
+template <class Duration2, class TimeZonePtr2>
+#endif
+inline
+zoned_time<Duration, TimeZonePtr>::zoned_time(const std::string& name,
+ const zoned_time<Duration2, TimeZonePtr2>& zt)
+ : zoned_time(zoned_traits<TimeZonePtr>::locate_zone(name), zt)
+ {}
+
+template <class Duration, class TimeZonePtr>
+#if !defined(_MSC_VER) || (_MSC_VER > 1916)
+template <class Duration2, class TimeZonePtr2, class, class>
+#else
+template <class Duration2, class TimeZonePtr2>
+#endif
+inline
+zoned_time<Duration, TimeZonePtr>::zoned_time(const char* name,
+ const zoned_time<Duration2, TimeZonePtr2>& zt)
+ : zoned_time(zoned_traits<TimeZonePtr>::locate_zone(name), zt)
+ {}
+
+template <class Duration, class TimeZonePtr>
+#if !defined(_MSC_VER) || (_MSC_VER > 1916)
+template <class Duration2, class TimeZonePtr2, class, class>
+#else
+template <class Duration2, class TimeZonePtr2>
+#endif
+inline
+zoned_time<Duration, TimeZonePtr>::zoned_time(const std::string& name,
+ const zoned_time<Duration2, TimeZonePtr2>& zt,
+ choose c)
+ : zoned_time(zoned_traits<TimeZonePtr>::locate_zone(name), zt, c)
+ {}
+
+template <class Duration, class TimeZonePtr>
+#if !defined(_MSC_VER) || (_MSC_VER > 1916)
+template <class Duration2, class TimeZonePtr2, class, class>
+#else
+template <class Duration2, class TimeZonePtr2>
+#endif
+inline
+zoned_time<Duration, TimeZonePtr>::zoned_time(const char* name,
+ const zoned_time<Duration2, TimeZonePtr2>& zt,
+ choose c)
+ : zoned_time(zoned_traits<TimeZonePtr>::locate_zone(name), zt, c)
+ {}
+
+#endif // HAS_STRING_VIEW
+
+template <class Duration, class TimeZonePtr>
+inline
+zoned_time<Duration, TimeZonePtr>&
+zoned_time<Duration, TimeZonePtr>::operator=(const sys_time<Duration>& st)
+{
+ tp_ = st;
+ return *this;
+}
+
+template <class Duration, class TimeZonePtr>
+inline
+zoned_time<Duration, TimeZonePtr>&
+zoned_time<Duration, TimeZonePtr>::operator=(const local_time<Duration>& ut)
+{
+ tp_ = zone_->to_sys(ut);
+ return *this;
+}
+
+template <class Duration, class TimeZonePtr>
+inline
+zoned_time<Duration, TimeZonePtr>::operator local_time<typename zoned_time<Duration, TimeZonePtr>::duration>() const
+{
+ return get_local_time();
+}
+
+template <class Duration, class TimeZonePtr>
+inline
+zoned_time<Duration, TimeZonePtr>::operator sys_time<typename zoned_time<Duration, TimeZonePtr>::duration>() const
+{
+ return get_sys_time();
+}
+
+template <class Duration, class TimeZonePtr>
+inline
+TimeZonePtr
+zoned_time<Duration, TimeZonePtr>::get_time_zone() const
+{
+ return zone_;
+}
+
+template <class Duration, class TimeZonePtr>
+inline
+local_time<typename zoned_time<Duration, TimeZonePtr>::duration>
+zoned_time<Duration, TimeZonePtr>::get_local_time() const
+{
+ return zone_->to_local(tp_);
+}
+
+template <class Duration, class TimeZonePtr>
+inline
+sys_time<typename zoned_time<Duration, TimeZonePtr>::duration>
+zoned_time<Duration, TimeZonePtr>::get_sys_time() const
+{
+ return tp_;
+}
+
+template <class Duration, class TimeZonePtr>
+inline
+sys_info
+zoned_time<Duration, TimeZonePtr>::get_info() const
+{
+ return zone_->get_info(tp_);
+}
+
+// make_zoned_time
+
+inline
+zoned_time<std::chrono::seconds>
+make_zoned()
+{
+ return zoned_time<std::chrono::seconds>();
+}
+
+template <class Duration>
+inline
+zoned_time<typename std::common_type<Duration, std::chrono::seconds>::type>
+make_zoned(const sys_time<Duration>& tp)
+{
+ return zoned_time<typename std::common_type<Duration, std::chrono::seconds>::type>(tp);
+}
+
+template <class TimeZonePtr
+#if !defined(_MSC_VER) || (_MSC_VER > 1916)
+#if !defined(__INTEL_COMPILER) || (__INTEL_COMPILER > 1600)
+ , class = typename std::enable_if
+ <
+ std::is_class
+ <
+ typename std::decay
+ <
+ decltype(*detail::to_raw_pointer(std::declval<TimeZonePtr&>()))
+ >::type
+ >{}
+ >::type
+#endif
+#endif
+ >
+inline
+zoned_time<std::chrono::seconds, TimeZonePtr>
+make_zoned(TimeZonePtr z)
+{
+ return zoned_time<std::chrono::seconds, TimeZonePtr>(std::move(z));
+}
+
+inline
+zoned_seconds
+make_zoned(const std::string& name)
+{
+ return zoned_seconds(name);
+}
+
+template <class Duration, class TimeZonePtr
+#if !defined(_MSC_VER) || (_MSC_VER > 1916)
+#if !defined(__INTEL_COMPILER) || (__INTEL_COMPILER > 1600)
+ , class = typename std::enable_if
+ <
+ std::is_class<typename std::decay<decltype(*std::declval<TimeZonePtr&>())>::type>{}
+ >::type
+#endif
+#endif
+ >
+inline
+zoned_time<typename std::common_type<Duration, std::chrono::seconds>::type, TimeZonePtr>
+make_zoned(TimeZonePtr zone, const local_time<Duration>& tp)
+{
+ return zoned_time<typename std::common_type<Duration, std::chrono::seconds>::type,
+ TimeZonePtr>(std::move(zone), tp);
+}
+
+template <class Duration, class TimeZonePtr
+#if !defined(_MSC_VER) || (_MSC_VER > 1916)
+#if !defined(__INTEL_COMPILER) || (__INTEL_COMPILER > 1600)
+ , class = typename std::enable_if
+ <
+ std::is_class<typename std::decay<decltype(*std::declval<TimeZonePtr&>())>::type>{}
+ >::type
+#endif
+#endif
+ >
+inline
+zoned_time<typename std::common_type<Duration, std::chrono::seconds>::type, TimeZonePtr>
+make_zoned(TimeZonePtr zone, const local_time<Duration>& tp, choose c)
+{
+ return zoned_time<typename std::common_type<Duration, std::chrono::seconds>::type,
+ TimeZonePtr>(std::move(zone), tp, c);
+}
+
+template <class Duration>
+inline
+zoned_time<typename std::common_type<Duration, std::chrono::seconds>::type>
+make_zoned(const std::string& name, const local_time<Duration>& tp)
+{
+ return zoned_time<typename std::common_type<Duration,
+ std::chrono::seconds>::type>(name, tp);
+}
+
+template <class Duration>
+inline
+zoned_time<typename std::common_type<Duration, std::chrono::seconds>::type>
+make_zoned(const std::string& name, const local_time<Duration>& tp, choose c)
+{
+ return zoned_time<typename std::common_type<Duration,
+ std::chrono::seconds>::type>(name, tp, c);
+}
+
+template <class Duration, class TimeZonePtr>
+inline
+zoned_time<Duration, TimeZonePtr>
+make_zoned(TimeZonePtr zone, const zoned_time<Duration, TimeZonePtr>& zt)
+{
+ return zoned_time<Duration, TimeZonePtr>(std::move(zone), zt);
+}
+
+template <class Duration, class TimeZonePtr>
+inline
+zoned_time<Duration, TimeZonePtr>
+make_zoned(const std::string& name, const zoned_time<Duration, TimeZonePtr>& zt)
+{
+ return zoned_time<Duration, TimeZonePtr>(name, zt);
+}
+
+template <class Duration, class TimeZonePtr>
+inline
+zoned_time<Duration, TimeZonePtr>
+make_zoned(TimeZonePtr zone, const zoned_time<Duration, TimeZonePtr>& zt, choose c)
+{
+ return zoned_time<Duration, TimeZonePtr>(std::move(zone), zt, c);
+}
+
+template <class Duration, class TimeZonePtr>
+inline
+zoned_time<Duration, TimeZonePtr>
+make_zoned(const std::string& name, const zoned_time<Duration, TimeZonePtr>& zt, choose c)
+{
+ return zoned_time<Duration, TimeZonePtr>(name, zt, c);
+}
+
+template <class Duration, class TimeZonePtr
+#if !defined(_MSC_VER) || (_MSC_VER > 1916)
+#if !defined(__INTEL_COMPILER) || (__INTEL_COMPILER > 1600)
+ , class = typename std::enable_if
+ <
+ std::is_class<typename std::decay<decltype(*std::declval<TimeZonePtr&>())>::type>{}
+ >::type
+#endif
+#endif
+ >
+inline
+zoned_time<typename std::common_type<Duration, std::chrono::seconds>::type, TimeZonePtr>
+make_zoned(TimeZonePtr zone, const sys_time<Duration>& st)
+{
+ return zoned_time<typename std::common_type<Duration, std::chrono::seconds>::type,
+ TimeZonePtr>(std::move(zone), st);
+}
+
+template <class Duration>
+inline
+zoned_time<typename std::common_type<Duration, std::chrono::seconds>::type>
+make_zoned(const std::string& name, const sys_time<Duration>& st)
+{
+ return zoned_time<typename std::common_type<Duration,
+ std::chrono::seconds>::type>(name, st);
+}
+
+template <class CharT, class Traits, class Duration, class TimeZonePtr>
+std::basic_ostream<CharT, Traits>&
+to_stream(std::basic_ostream<CharT, Traits>& os, const CharT* fmt,
+ const zoned_time<Duration, TimeZonePtr>& tp)
+{
+ using duration = typename zoned_time<Duration, TimeZonePtr>::duration;
+ using LT = local_time<duration>;
+ auto const st = tp.get_sys_time();
+ auto const info = tp.get_time_zone()->get_info(st);
+ return to_stream(os, fmt, LT{(st+info.offset).time_since_epoch()},
+ &info.abbrev, &info.offset);
+}
+
+template <class CharT, class Traits, class Duration, class TimeZonePtr>
+inline
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const zoned_time<Duration, TimeZonePtr>& t)
+{
+ const CharT fmt[] = {'%', 'F', ' ', '%', 'T', ' ', '%', 'Z', CharT{}};
+ return to_stream(os, fmt, t);
+}
+
+class utc_clock
+{
+public:
+ using duration = std::chrono::system_clock::duration;
+ using rep = duration::rep;
+ using period = duration::period;
+ using time_point = std::chrono::time_point<utc_clock>;
+ static CONSTDATA bool is_steady = false;
+
+ static time_point now();
+
+ template<typename Duration>
+ static
+ std::chrono::time_point<std::chrono::system_clock, typename std::common_type<Duration, std::chrono::seconds>::type>
+ to_sys(const std::chrono::time_point<utc_clock, Duration>&);
+
+ template<typename Duration>
+ static
+ std::chrono::time_point<utc_clock, typename std::common_type<Duration, std::chrono::seconds>::type>
+ from_sys(const std::chrono::time_point<std::chrono::system_clock, Duration>&);
+
+ template<typename Duration>
+ static
+ std::chrono::time_point<local_t, typename std::common_type<Duration, std::chrono::seconds>::type>
+ to_local(const std::chrono::time_point<utc_clock, Duration>&);
+
+ template<typename Duration>
+ static
+ std::chrono::time_point<utc_clock, typename std::common_type<Duration, std::chrono::seconds>::type>
+ from_local(const std::chrono::time_point<local_t, Duration>&);
+};
+
+template <class Duration>
+ using utc_time = std::chrono::time_point<utc_clock, Duration>;
+
+using utc_seconds = utc_time<std::chrono::seconds>;
+
+template <class Duration>
+utc_time<typename std::common_type<Duration, std::chrono::seconds>::type>
+utc_clock::from_sys(const sys_time<Duration>& st)
+{
+ using std::chrono::seconds;
+ using CD = typename std::common_type<Duration, seconds>::type;
+ auto const& leaps = get_tzdb().leap_seconds;
+ auto const lt = std::upper_bound(leaps.begin(), leaps.end(), st);
+ return utc_time<CD>{st.time_since_epoch() + seconds{lt-leaps.begin()}};
+}
+
+// Return pair<is_leap_second, seconds{number_of_leap_seconds_since_1970}>
+// first is true if ut is during a leap second insertion, otherwise false.
+// If ut is during a leap second insertion, that leap second is included in the count
+template <class Duration>
+std::pair<bool, std::chrono::seconds>
+is_leap_second(date::utc_time<Duration> const& ut)
+{
+ using std::chrono::seconds;
+ using duration = typename std::common_type<Duration, seconds>::type;
+ auto const& leaps = get_tzdb().leap_seconds;
+ auto tp = sys_time<duration>{ut.time_since_epoch()};
+ auto const lt = std::upper_bound(leaps.begin(), leaps.end(), tp);
+ auto ds = seconds{lt-leaps.begin()};
+ tp -= ds;
+ auto ls = false;
+ if (lt > leaps.begin())
+ {
+ if (tp < lt[-1])
+ {
+ if (tp >= lt[-1].date() - seconds{1})
+ ls = true;
+ else
+ --ds;
+ }
+ }
+ return {ls, ds};
+}
+
+struct leap_second_info
+{
+ bool is_leap_second;
+ std::chrono::seconds elapsed;
+};
+
+template <class Duration>
+leap_second_info
+get_leap_second_info(date::utc_time<Duration> const& ut)
+{
+ auto p = is_leap_second(ut);
+ return {p.first, p.second};
+}
+
+template <class Duration>
+sys_time<typename std::common_type<Duration, std::chrono::seconds>::type>
+utc_clock::to_sys(const utc_time<Duration>& ut)
+{
+ using std::chrono::seconds;
+ using CD = typename std::common_type<Duration, seconds>::type;
+ auto ls = is_leap_second(ut);
+ auto tp = sys_time<CD>{ut.time_since_epoch() - ls.second};
+ if (ls.first)
+ tp = floor<seconds>(tp) + seconds{1} - CD{1};
+ return tp;
+}
+
+inline
+utc_clock::time_point
+utc_clock::now()
+{
+ return from_sys(std::chrono::system_clock::now());
+}
+
+template <class Duration>
+utc_time<typename std::common_type<Duration, std::chrono::seconds>::type>
+utc_clock::from_local(const local_time<Duration>& st)
+{
+ return from_sys(sys_time<Duration>{st.time_since_epoch()});
+}
+
+template <class Duration>
+local_time<typename std::common_type<Duration, std::chrono::seconds>::type>
+utc_clock::to_local(const utc_time<Duration>& ut)
+{
+ using CD = typename std::common_type<Duration, std::chrono::seconds>::type;
+ return local_time<CD>{to_sys(ut).time_since_epoch()};
+}
+
+template <class CharT, class Traits, class Duration>
+std::basic_ostream<CharT, Traits>&
+to_stream(std::basic_ostream<CharT, Traits>& os, const CharT* fmt,
+ const utc_time<Duration>& t)
+{
+ using std::chrono::seconds;
+ using CT = typename std::common_type<Duration, seconds>::type;
+ const std::string abbrev("UTC");
+ CONSTDATA seconds offset{0};
+ auto ls = is_leap_second(t);
+ auto tp = sys_time<CT>{t.time_since_epoch() - ls.second};
+ auto const sd = floor<days>(tp);
+ year_month_day ymd = sd;
+ auto time = make_time(tp - sys_seconds{sd});
+ time.seconds(detail::undocumented{}) += seconds{ls.first};
+ fields<CT> fds{ymd, time};
+ return to_stream(os, fmt, fds, &abbrev, &offset);
+}
+
+template <class CharT, class Traits, class Duration>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const utc_time<Duration>& t)
+{
+ const CharT fmt[] = {'%', 'F', ' ', '%', 'T', CharT{}};
+ return to_stream(os, fmt, t);
+}
+
+template <class Duration, class CharT, class Traits, class Alloc = std::allocator<CharT>>
+std::basic_istream<CharT, Traits>&
+from_stream(std::basic_istream<CharT, Traits>& is, const CharT* fmt,
+ utc_time<Duration>& tp, std::basic_string<CharT, Traits, Alloc>* abbrev = nullptr,
+ std::chrono::minutes* offset = nullptr)
+{
+ using std::chrono::seconds;
+ using std::chrono::minutes;
+ using CT = typename std::common_type<Duration, seconds>::type;
+ minutes offset_local{};
+ auto offptr = offset ? offset : &offset_local;
+ fields<CT> fds{};
+ fds.has_tod = true;
+ from_stream(is, fmt, fds, abbrev, offptr);
+ if (!fds.ymd.ok())
+ is.setstate(std::ios::failbit);
+ if (!is.fail())
+ {
+ bool is_60_sec = fds.tod.seconds() == seconds{60};
+ if (is_60_sec)
+ fds.tod.seconds(detail::undocumented{}) -= seconds{1};
+ auto tmp = utc_clock::from_sys(sys_days(fds.ymd) - *offptr + fds.tod.to_duration());
+ if (is_60_sec)
+ tmp += seconds{1};
+ if (is_60_sec != is_leap_second(tmp).first || !fds.tod.in_conventional_range())
+ {
+ is.setstate(std::ios::failbit);
+ return is;
+ }
+ tp = std::chrono::time_point_cast<Duration>(tmp);
+ }
+ return is;
+}
+
+// tai_clock
+
+class tai_clock
+{
+public:
+ using duration = std::chrono::system_clock::duration;
+ using rep = duration::rep;
+ using period = duration::period;
+ using time_point = std::chrono::time_point<tai_clock>;
+ static const bool is_steady = false;
+
+ static time_point now();
+
+ template<typename Duration>
+ static
+ std::chrono::time_point<utc_clock, typename std::common_type<Duration, std::chrono::seconds>::type>
+ to_utc(const std::chrono::time_point<tai_clock, Duration>&) NOEXCEPT;
+
+ template<typename Duration>
+ static
+ std::chrono::time_point<tai_clock, typename std::common_type<Duration, std::chrono::seconds>::type>
+ from_utc(const std::chrono::time_point<utc_clock, Duration>&) NOEXCEPT;
+
+ template<typename Duration>
+ static
+ std::chrono::time_point<local_t, typename std::common_type<Duration, date::days>::type>
+ to_local(const std::chrono::time_point<tai_clock, Duration>&) NOEXCEPT;
+
+ template<typename Duration>
+ static
+ std::chrono::time_point<tai_clock, typename std::common_type<Duration, date::days>::type>
+ from_local(const std::chrono::time_point<local_t, Duration>&) NOEXCEPT;
+};
+
+template <class Duration>
+ using tai_time = std::chrono::time_point<tai_clock, Duration>;
+
+using tai_seconds = tai_time<std::chrono::seconds>;
+
+template <class Duration>
+inline
+utc_time<typename std::common_type<Duration, std::chrono::seconds>::type>
+tai_clock::to_utc(const tai_time<Duration>& t) NOEXCEPT
+{
+ using std::chrono::seconds;
+ using CD = typename std::common_type<Duration, seconds>::type;
+ return utc_time<CD>{t.time_since_epoch()} -
+ (sys_days(year{1970}/January/1) - sys_days(year{1958}/January/1) + seconds{10});
+}
+
+template <class Duration>
+inline
+tai_time<typename std::common_type<Duration, std::chrono::seconds>::type>
+tai_clock::from_utc(const utc_time<Duration>& t) NOEXCEPT
+{
+ using std::chrono::seconds;
+ using CD = typename std::common_type<Duration, seconds>::type;
+ return tai_time<CD>{t.time_since_epoch()} +
+ (sys_days(year{1970}/January/1) - sys_days(year{1958}/January/1) + seconds{10});
+}
+
+inline
+tai_clock::time_point
+tai_clock::now()
+{
+ return from_utc(utc_clock::now());
+}
+
+template <class Duration>
+inline
+local_time<typename std::common_type<Duration, date::days>::type>
+tai_clock::to_local(const tai_time<Duration>& t) NOEXCEPT
+{
+ using CD = typename std::common_type<Duration, date::days>::type;
+ return local_time<CD>{t.time_since_epoch()} -
+ (local_days(year{1970}/January/1) - local_days(year{1958}/January/1));
+}
+
+template <class Duration>
+inline
+tai_time<typename std::common_type<Duration, date::days>::type>
+tai_clock::from_local(const local_time<Duration>& t) NOEXCEPT
+{
+ using CD = typename std::common_type<Duration, date::days>::type;
+ return tai_time<CD>{t.time_since_epoch()} +
+ (local_days(year{1970}/January/1) - local_days(year{1958}/January/1));
+}
+
+template <class CharT, class Traits, class Duration>
+std::basic_ostream<CharT, Traits>&
+to_stream(std::basic_ostream<CharT, Traits>& os, const CharT* fmt,
+ const tai_time<Duration>& t)
+{
+ const std::string abbrev("TAI");
+ CONSTDATA std::chrono::seconds offset{0};
+ return to_stream(os, fmt, tai_clock::to_local(t), &abbrev, &offset);
+}
+
+template <class CharT, class Traits, class Duration>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const tai_time<Duration>& t)
+{
+ const CharT fmt[] = {'%', 'F', ' ', '%', 'T', CharT{}};
+ return to_stream(os, fmt, t);
+}
+
+template <class Duration, class CharT, class Traits, class Alloc = std::allocator<CharT>>
+std::basic_istream<CharT, Traits>&
+from_stream(std::basic_istream<CharT, Traits>& is, const CharT* fmt,
+ tai_time<Duration>& tp,
+ std::basic_string<CharT, Traits, Alloc>* abbrev = nullptr,
+ std::chrono::minutes* offset = nullptr)
+{
+ local_time<Duration> lp;
+ from_stream(is, fmt, lp, abbrev, offset);
+ if (!is.fail())
+ tp = tai_clock::from_local(lp);
+ return is;
+}
+
+// gps_clock
+
+class gps_clock
+{
+public:
+ using duration = std::chrono::system_clock::duration;
+ using rep = duration::rep;
+ using period = duration::period;
+ using time_point = std::chrono::time_point<gps_clock>;
+ static const bool is_steady = false;
+
+ static time_point now();
+
+ template<typename Duration>
+ static
+ std::chrono::time_point<utc_clock, typename std::common_type<Duration, std::chrono::seconds>::type>
+ to_utc(const std::chrono::time_point<gps_clock, Duration>&) NOEXCEPT;
+
+ template<typename Duration>
+ static
+ std::chrono::time_point<gps_clock, typename std::common_type<Duration, std::chrono::seconds>::type>
+ from_utc(const std::chrono::time_point<utc_clock, Duration>&) NOEXCEPT;
+
+ template<typename Duration>
+ static
+ std::chrono::time_point<local_t, typename std::common_type<Duration, date::days>::type>
+ to_local(const std::chrono::time_point<gps_clock, Duration>&) NOEXCEPT;
+
+ template<typename Duration>
+ static
+ std::chrono::time_point<gps_clock, typename std::common_type<Duration, date::days>::type>
+ from_local(const std::chrono::time_point<local_t, Duration>&) NOEXCEPT;
+};
+
+template <class Duration>
+ using gps_time = std::chrono::time_point<gps_clock, Duration>;
+
+using gps_seconds = gps_time<std::chrono::seconds>;
+
+template <class Duration>
+inline
+utc_time<typename std::common_type<Duration, std::chrono::seconds>::type>
+gps_clock::to_utc(const gps_time<Duration>& t) NOEXCEPT
+{
+ using std::chrono::seconds;
+ using CD = typename std::common_type<Duration, seconds>::type;
+ return utc_time<CD>{t.time_since_epoch()} +
+ (sys_days(year{1980}/January/Sunday[1]) - sys_days(year{1970}/January/1) +
+ seconds{9});
+}
+
+template <class Duration>
+inline
+gps_time<typename std::common_type<Duration, std::chrono::seconds>::type>
+gps_clock::from_utc(const utc_time<Duration>& t) NOEXCEPT
+{
+ using std::chrono::seconds;
+ using CD = typename std::common_type<Duration, seconds>::type;
+ return gps_time<CD>{t.time_since_epoch()} -
+ (sys_days(year{1980}/January/Sunday[1]) - sys_days(year{1970}/January/1) +
+ seconds{9});
+}
+
+inline
+gps_clock::time_point
+gps_clock::now()
+{
+ return from_utc(utc_clock::now());
+}
+
+template <class Duration>
+inline
+local_time<typename std::common_type<Duration, date::days>::type>
+gps_clock::to_local(const gps_time<Duration>& t) NOEXCEPT
+{
+ using CD = typename std::common_type<Duration, date::days>::type;
+ return local_time<CD>{t.time_since_epoch()} +
+ (local_days(year{1980}/January/Sunday[1]) - local_days(year{1970}/January/1));
+}
+
+template <class Duration>
+inline
+gps_time<typename std::common_type<Duration, date::days>::type>
+gps_clock::from_local(const local_time<Duration>& t) NOEXCEPT
+{
+ using CD = typename std::common_type<Duration, date::days>::type;
+ return gps_time<CD>{t.time_since_epoch()} -
+ (local_days(year{1980}/January/Sunday[1]) - local_days(year{1970}/January/1));
+}
+
+
+template <class CharT, class Traits, class Duration>
+std::basic_ostream<CharT, Traits>&
+to_stream(std::basic_ostream<CharT, Traits>& os, const CharT* fmt,
+ const gps_time<Duration>& t)
+{
+ const std::string abbrev("GPS");
+ CONSTDATA std::chrono::seconds offset{0};
+ return to_stream(os, fmt, gps_clock::to_local(t), &abbrev, &offset);
+}
+
+template <class CharT, class Traits, class Duration>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const gps_time<Duration>& t)
+{
+ const CharT fmt[] = {'%', 'F', ' ', '%', 'T', CharT{}};
+ return to_stream(os, fmt, t);
+}
+
+template <class Duration, class CharT, class Traits, class Alloc = std::allocator<CharT>>
+std::basic_istream<CharT, Traits>&
+from_stream(std::basic_istream<CharT, Traits>& is, const CharT* fmt,
+ gps_time<Duration>& tp,
+ std::basic_string<CharT, Traits, Alloc>* abbrev = nullptr,
+ std::chrono::minutes* offset = nullptr)
+{
+ local_time<Duration> lp;
+ from_stream(is, fmt, lp, abbrev, offset);
+ if (!is.fail())
+ tp = gps_clock::from_local(lp);
+ return is;
+}
+
+// clock_time_conversion
+
+template <class DstClock, class SrcClock>
+struct clock_time_conversion
+{};
+
+template <>
+struct clock_time_conversion<std::chrono::system_clock, std::chrono::system_clock>
+{
+ template <class Duration>
+ CONSTCD14
+ sys_time<Duration>
+ operator()(const sys_time<Duration>& st) const
+ {
+ return st;
+ }
+};
+
+template <>
+struct clock_time_conversion<utc_clock, utc_clock>
+{
+ template <class Duration>
+ CONSTCD14
+ utc_time<Duration>
+ operator()(const utc_time<Duration>& ut) const
+ {
+ return ut;
+ }
+};
+
+template<>
+struct clock_time_conversion<local_t, local_t>
+{
+ template <class Duration>
+ CONSTCD14
+ local_time<Duration>
+ operator()(const local_time<Duration>& lt) const
+ {
+ return lt;
+ }
+};
+
+template <>
+struct clock_time_conversion<utc_clock, std::chrono::system_clock>
+{
+ template <class Duration>
+ utc_time<typename std::common_type<Duration, std::chrono::seconds>::type>
+ operator()(const sys_time<Duration>& st) const
+ {
+ return utc_clock::from_sys(st);
+ }
+};
+
+template <>
+struct clock_time_conversion<std::chrono::system_clock, utc_clock>
+{
+ template <class Duration>
+ sys_time<typename std::common_type<Duration, std::chrono::seconds>::type>
+ operator()(const utc_time<Duration>& ut) const
+ {
+ return utc_clock::to_sys(ut);
+ }
+};
+
+template<>
+struct clock_time_conversion<local_t, std::chrono::system_clock>
+{
+ template <class Duration>
+ CONSTCD14
+ local_time<Duration>
+ operator()(const sys_time<Duration>& st) const
+ {
+ return local_time<Duration>{st.time_since_epoch()};
+ }
+};
+
+template<>
+struct clock_time_conversion<std::chrono::system_clock, local_t>
+{
+ template <class Duration>
+ CONSTCD14
+ sys_time<Duration>
+ operator()(const local_time<Duration>& lt) const
+ {
+ return sys_time<Duration>{lt.time_since_epoch()};
+ }
+};
+
+template<>
+struct clock_time_conversion<utc_clock, local_t>
+{
+ template <class Duration>
+ utc_time<typename std::common_type<Duration, std::chrono::seconds>::type>
+ operator()(const local_time<Duration>& lt) const
+ {
+ return utc_clock::from_local(lt);
+ }
+};
+
+template<>
+struct clock_time_conversion<local_t, utc_clock>
+{
+ template <class Duration>
+ local_time<typename std::common_type<Duration, std::chrono::seconds>::type>
+ operator()(const utc_time<Duration>& ut) const
+ {
+ return utc_clock::to_local(ut);
+ }
+};
+
+template<typename Clock>
+struct clock_time_conversion<Clock, Clock>
+{
+ template <class Duration>
+ CONSTCD14
+ std::chrono::time_point<Clock, Duration>
+ operator()(const std::chrono::time_point<Clock, Duration>& tp) const
+ {
+ return tp;
+ }
+};
+
+namespace ctc_detail
+{
+
+template <class Clock, class Duration>
+ using time_point = std::chrono::time_point<Clock, Duration>;
+
+using std::declval;
+using std::chrono::system_clock;
+
+//Check if TimePoint is time for given clock,
+//if not emits hard error
+template <class Clock, class TimePoint>
+struct return_clock_time
+{
+ using clock_time_point = time_point<Clock, typename TimePoint::duration>;
+ using type = TimePoint;
+
+ static_assert(std::is_same<TimePoint, clock_time_point>::value,
+ "time point with appropariate clock shall be returned");
+};
+
+// Check if Clock has to_sys method accepting TimePoint with given duration const& and
+// returning sys_time. If so has nested type member equal to return type to_sys.
+template <class Clock, class Duration, class = void>
+struct return_to_sys
+{};
+
+template <class Clock, class Duration>
+struct return_to_sys
+ <
+ Clock, Duration,
+ decltype(Clock::to_sys(declval<time_point<Clock, Duration> const&>()), void())
+ >
+ : return_clock_time
+ <
+ system_clock,
+ decltype(Clock::to_sys(declval<time_point<Clock, Duration> const&>()))
+ >
+{};
+
+// Similiar to above
+template <class Clock, class Duration, class = void>
+struct return_from_sys
+{};
+
+template <class Clock, class Duration>
+struct return_from_sys
+ <
+ Clock, Duration,
+ decltype(Clock::from_sys(declval<time_point<system_clock, Duration> const&>()),
+ void())
+ >
+ : return_clock_time
+ <
+ Clock,
+ decltype(Clock::from_sys(declval<time_point<system_clock, Duration> const&>()))
+ >
+{};
+
+// Similiar to above
+template <class Clock, class Duration, class = void>
+struct return_to_utc
+{};
+
+template <class Clock, class Duration>
+struct return_to_utc
+ <
+ Clock, Duration,
+ decltype(Clock::to_utc(declval<time_point<Clock, Duration> const&>()), void())
+ >
+ : return_clock_time
+ <
+ utc_clock,
+ decltype(Clock::to_utc(declval<time_point<Clock, Duration> const&>()))>
+{};
+
+// Similiar to above
+template <class Clock, class Duration, class = void>
+struct return_from_utc
+{};
+
+template <class Clock, class Duration>
+struct return_from_utc
+ <
+ Clock, Duration,
+ decltype(Clock::from_utc(declval<time_point<utc_clock, Duration> const&>()),
+ void())
+ >
+ : return_clock_time
+ <
+ Clock,
+ decltype(Clock::from_utc(declval<time_point<utc_clock, Duration> const&>()))
+ >
+{};
+
+// Similiar to above
+template<typename Clock, typename Duration, typename = void>
+struct return_to_local
+{};
+
+template<typename Clock, typename Duration>
+struct return_to_local
+ <
+ Clock, Duration,
+ decltype(Clock::to_local(declval<time_point<Clock, Duration> const&>()),
+ void())
+ >
+ : return_clock_time
+ <
+ local_t,
+ decltype(Clock::to_local(declval<time_point<Clock, Duration> const&>()))
+ >
+{};
+
+// Similiar to above
+template<typename Clock, typename Duration, typename = void>
+struct return_from_local
+{};
+
+template<typename Clock, typename Duration>
+struct return_from_local
+ <
+ Clock, Duration,
+ decltype(Clock::from_local(declval<time_point<local_t, Duration> const&>()),
+ void())
+ >
+ : return_clock_time
+ <
+ Clock,
+ decltype(Clock::from_local(declval<time_point<local_t, Duration> const&>()))
+ >
+{};
+
+} // namespace ctc_detail
+
+template <class SrcClock>
+struct clock_time_conversion<std::chrono::system_clock, SrcClock>
+{
+ template <class Duration>
+ CONSTCD14
+ typename ctc_detail::return_to_sys<SrcClock, Duration>::type
+ operator()(const std::chrono::time_point<SrcClock, Duration>& tp) const
+ {
+ return SrcClock::to_sys(tp);
+ }
+};
+
+template <class DstClock>
+struct clock_time_conversion<DstClock, std::chrono::system_clock>
+{
+ template <class Duration>
+ CONSTCD14
+ typename ctc_detail::return_from_sys<DstClock, Duration>::type
+ operator()(const sys_time<Duration>& st) const
+ {
+ return DstClock::from_sys(st);
+ }
+};
+
+template <class SrcClock>
+struct clock_time_conversion<utc_clock, SrcClock>
+{
+ template <class Duration>
+ CONSTCD14
+ typename ctc_detail::return_to_utc<SrcClock, Duration>::type
+ operator()(const std::chrono::time_point<SrcClock, Duration>& tp) const
+ {
+ return SrcClock::to_utc(tp);
+ }
+};
+
+template <class DstClock>
+struct clock_time_conversion<DstClock, utc_clock>
+{
+ template <class Duration>
+ CONSTCD14
+ typename ctc_detail::return_from_utc<DstClock, Duration>::type
+ operator()(const utc_time<Duration>& ut) const
+ {
+ return DstClock::from_utc(ut);
+ }
+};
+
+template<typename SrcClock>
+struct clock_time_conversion<local_t, SrcClock>
+{
+ template <class Duration>
+ CONSTCD14
+ typename ctc_detail::return_to_local<SrcClock, Duration>::type
+ operator()(const std::chrono::time_point<SrcClock, Duration>& tp) const
+ {
+ return SrcClock::to_local(tp);
+ }
+};
+
+template<typename DstClock>
+struct clock_time_conversion<DstClock, local_t>
+{
+ template <class Duration>
+ CONSTCD14
+ typename ctc_detail::return_from_local<DstClock, Duration>::type
+ operator()(const local_time<Duration>& lt) const
+ {
+ return DstClock::from_local(lt);
+ }
+};
+
+namespace clock_cast_detail
+{
+
+template <class Clock, class Duration>
+ using time_point = std::chrono::time_point<Clock, Duration>;
+using std::chrono::system_clock;
+
+template <class DstClock, class SrcClock, class Duration>
+CONSTCD14
+auto
+conv_clock(const time_point<SrcClock, Duration>& t)
+ -> decltype(std::declval<clock_time_conversion<DstClock, SrcClock>>()(t))
+{
+ return clock_time_conversion<DstClock, SrcClock>{}(t);
+}
+
+//direct trait conversion, 1st candidate
+template <class DstClock, class SrcClock, class Duration>
+CONSTCD14
+auto
+cc_impl(const time_point<SrcClock, Duration>& t, const time_point<SrcClock, Duration>*)
+ -> decltype(conv_clock<DstClock>(t))
+{
+ return conv_clock<DstClock>(t);
+}
+
+//conversion through sys, 2nd candidate
+template <class DstClock, class SrcClock, class Duration>
+CONSTCD14
+auto
+cc_impl(const time_point<SrcClock, Duration>& t, const void*)
+ -> decltype(conv_clock<DstClock>(conv_clock<system_clock>(t)))
+{
+ return conv_clock<DstClock>(conv_clock<system_clock>(t));
+}
+
+//conversion through utc, 2nd candidate
+template <class DstClock, class SrcClock, class Duration>
+CONSTCD14
+auto
+cc_impl(const time_point<SrcClock, Duration>& t, const void*)
+ -> decltype(0, // MSVC_WORKAROUND
+ conv_clock<DstClock>(conv_clock<utc_clock>(t)))
+{
+ return conv_clock<DstClock>(conv_clock<utc_clock>(t));
+}
+
+//conversion through sys and utc, 3rd candidate
+template <class DstClock, class SrcClock, class Duration>
+CONSTCD14
+auto
+cc_impl(const time_point<SrcClock, Duration>& t, ...)
+ -> decltype(conv_clock<DstClock>(conv_clock<utc_clock>(conv_clock<system_clock>(t))))
+{
+ return conv_clock<DstClock>(conv_clock<utc_clock>(conv_clock<system_clock>(t)));
+}
+
+//conversion through utc and sys, 3rd candidate
+template <class DstClock, class SrcClock, class Duration>
+CONSTCD14
+auto
+cc_impl(const time_point<SrcClock, Duration>& t, ...)
+ -> decltype(0, // MSVC_WORKAROUND
+ conv_clock<DstClock>(conv_clock<system_clock>(conv_clock<utc_clock>(t))))
+{
+ return conv_clock<DstClock>(conv_clock<system_clock>(conv_clock<utc_clock>(t)));
+}
+
+} // namespace clock_cast_detail
+
+template <class DstClock, class SrcClock, class Duration>
+CONSTCD14
+auto
+clock_cast(const std::chrono::time_point<SrcClock, Duration>& tp)
+ -> decltype(clock_cast_detail::cc_impl<DstClock>(tp, &tp))
+{
+ return clock_cast_detail::cc_impl<DstClock>(tp, &tp);
+}
+
+// Deprecated API
+
+template <class Duration>
+inline
+sys_time<typename std::common_type<Duration, std::chrono::seconds>::type>
+to_sys_time(const utc_time<Duration>& t)
+{
+ return utc_clock::to_sys(t);
+}
+
+template <class Duration>
+inline
+sys_time<typename std::common_type<Duration, std::chrono::seconds>::type>
+to_sys_time(const tai_time<Duration>& t)
+{
+ return utc_clock::to_sys(tai_clock::to_utc(t));
+}
+
+template <class Duration>
+inline
+sys_time<typename std::common_type<Duration, std::chrono::seconds>::type>
+to_sys_time(const gps_time<Duration>& t)
+{
+ return utc_clock::to_sys(gps_clock::to_utc(t));
+}
+
+
+template <class Duration>
+inline
+utc_time<typename std::common_type<Duration, std::chrono::seconds>::type>
+to_utc_time(const sys_time<Duration>& t)
+{
+ return utc_clock::from_sys(t);
+}
+
+template <class Duration>
+inline
+utc_time<typename std::common_type<Duration, std::chrono::seconds>::type>
+to_utc_time(const tai_time<Duration>& t)
+{
+ return tai_clock::to_utc(t);
+}
+
+template <class Duration>
+inline
+utc_time<typename std::common_type<Duration, std::chrono::seconds>::type>
+to_utc_time(const gps_time<Duration>& t)
+{
+ return gps_clock::to_utc(t);
+}
+
+
+template <class Duration>
+inline
+tai_time<typename std::common_type<Duration, std::chrono::seconds>::type>
+to_tai_time(const sys_time<Duration>& t)
+{
+ return tai_clock::from_utc(utc_clock::from_sys(t));
+}
+
+template <class Duration>
+inline
+tai_time<typename std::common_type<Duration, std::chrono::seconds>::type>
+to_tai_time(const utc_time<Duration>& t)
+{
+ return tai_clock::from_utc(t);
+}
+
+template <class Duration>
+inline
+tai_time<typename std::common_type<Duration, std::chrono::seconds>::type>
+to_tai_time(const gps_time<Duration>& t)
+{
+ return tai_clock::from_utc(gps_clock::to_utc(t));
+}
+
+
+template <class Duration>
+inline
+gps_time<typename std::common_type<Duration, std::chrono::seconds>::type>
+to_gps_time(const sys_time<Duration>& t)
+{
+ return gps_clock::from_utc(utc_clock::from_sys(t));
+}
+
+template <class Duration>
+inline
+gps_time<typename std::common_type<Duration, std::chrono::seconds>::type>
+to_gps_time(const utc_time<Duration>& t)
+{
+ return gps_clock::from_utc(t);
+}
+
+template <class Duration>
+inline
+gps_time<typename std::common_type<Duration, std::chrono::seconds>::type>
+to_gps_time(const tai_time<Duration>& t)
+{
+ return gps_clock::from_utc(tai_clock::to_utc(t));
+}
+
+} // namespace date
+
+#endif // TZ_H
diff --git a/src/third-party/date/include/date/tz_private.h b/src/third-party/date/include/date/tz_private.h
new file mode 100644
index 0000000..aec01d0
--- /dev/null
+++ b/src/third-party/date/include/date/tz_private.h
@@ -0,0 +1,316 @@
+#ifndef TZ_PRIVATE_H
+#define TZ_PRIVATE_H
+
+// The MIT License (MIT)
+//
+// Copyright (c) 2015, 2016 Howard Hinnant
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// Our apologies. When the previous paragraph was written, lowercase had not yet
+// been invented (that would involve another several millennia of evolution).
+// We did not mean to shout.
+
+#if !defined(_MSC_VER) || (_MSC_VER >= 1900)
+#include "tz.h"
+#else
+#include "date.h"
+#include <vector>
+#endif
+
+namespace date
+{
+
+namespace detail
+{
+
+#if !USE_OS_TZDB
+
+enum class tz {utc, local, standard};
+
+//forward declare to avoid warnings in gcc 6.2
+class MonthDayTime;
+std::istream& operator>>(std::istream& is, MonthDayTime& x);
+std::ostream& operator<<(std::ostream& os, const MonthDayTime& x);
+
+
+class MonthDayTime
+{
+private:
+ struct pair
+ {
+#if defined(_MSC_VER) && (_MSC_VER < 1900)
+ pair() : month_day_(date::jan / 1), weekday_(0U) {}
+
+ pair(const date::month_day& month_day, const date::weekday& weekday)
+ : month_day_(month_day), weekday_(weekday) {}
+#endif
+
+ date::month_day month_day_;
+ date::weekday weekday_;
+ };
+
+ enum Type {month_day, month_last_dow, lteq, gteq};
+
+ Type type_{month_day};
+
+#if !defined(_MSC_VER) || (_MSC_VER >= 1900)
+ union U
+#else
+ struct U
+#endif
+ {
+ date::month_day month_day_;
+ date::month_weekday_last month_weekday_last_;
+ pair month_day_weekday_;
+
+#if !defined(_MSC_VER) || (_MSC_VER >= 1900)
+ U() : month_day_{date::jan/1} {}
+#else
+ U() :
+ month_day_(date::jan/1),
+ month_weekday_last_(date::month(0U), date::weekday_last(date::weekday(0U)))
+ {}
+
+#endif // !defined(_MSC_VER) || (_MSC_VER >= 1900)
+
+ U& operator=(const date::month_day& x);
+ U& operator=(const date::month_weekday_last& x);
+ U& operator=(const pair& x);
+ } u;
+
+ std::chrono::hours h_{0};
+ std::chrono::minutes m_{0};
+ std::chrono::seconds s_{0};
+ tz zone_{tz::local};
+
+public:
+ MonthDayTime() = default;
+ MonthDayTime(local_seconds tp, tz timezone);
+ MonthDayTime(const date::month_day& md, tz timezone);
+
+ date::day day() const;
+ date::month month() const;
+ tz zone() const {return zone_;}
+
+ void canonicalize(date::year y);
+
+ sys_seconds
+ to_sys(date::year y, std::chrono::seconds offset, std::chrono::seconds save) const;
+ sys_days to_sys_days(date::year y) const;
+
+ sys_seconds to_time_point(date::year y) const;
+ int compare(date::year y, const MonthDayTime& x, date::year yx,
+ std::chrono::seconds offset, std::chrono::minutes prev_save) const;
+
+ friend std::istream& operator>>(std::istream& is, MonthDayTime& x);
+ friend std::ostream& operator<<(std::ostream& os, const MonthDayTime& x);
+};
+
+// A Rule specifies one or more set of datetimes without using an offset.
+// Multiple dates are specified with multiple years. The years in effect
+// go from starting_year_ to ending_year_, inclusive. starting_year_ <=
+// ending_year_. save_ is in effect for times from the specified time
+// onward, including the specified time. When the specified time is
+// local, it uses the save_ from the chronologically previous Rule, or if
+// there is none, 0.
+
+//forward declare to avoid warnings in gcc 6.2
+class Rule;
+bool operator==(const Rule& x, const Rule& y);
+bool operator<(const Rule& x, const Rule& y);
+bool operator==(const Rule& x, const date::year& y);
+bool operator<(const Rule& x, const date::year& y);
+bool operator==(const date::year& x, const Rule& y);
+bool operator<(const date::year& x, const Rule& y);
+bool operator==(const Rule& x, const std::string& y);
+bool operator<(const Rule& x, const std::string& y);
+bool operator==(const std::string& x, const Rule& y);
+bool operator<(const std::string& x, const Rule& y);
+std::ostream& operator<<(std::ostream& os, const Rule& r);
+
+class Rule
+{
+private:
+ std::string name_;
+ date::year starting_year_{0};
+ date::year ending_year_{0};
+ MonthDayTime starting_at_;
+ std::chrono::minutes save_{0};
+ std::string abbrev_;
+
+public:
+ Rule() = default;
+ explicit Rule(const std::string& s);
+ Rule(const Rule& r, date::year starting_year, date::year ending_year);
+
+ const std::string& name() const {return name_;}
+ const std::string& abbrev() const {return abbrev_;}
+
+ const MonthDayTime& mdt() const {return starting_at_;}
+ const date::year& starting_year() const {return starting_year_;}
+ const date::year& ending_year() const {return ending_year_;}
+ const std::chrono::minutes& save() const {return save_;}
+
+ static void split_overlaps(std::vector<Rule>& rules);
+
+ friend bool operator==(const Rule& x, const Rule& y);
+ friend bool operator<(const Rule& x, const Rule& y);
+ friend bool operator==(const Rule& x, const date::year& y);
+ friend bool operator<(const Rule& x, const date::year& y);
+ friend bool operator==(const date::year& x, const Rule& y);
+ friend bool operator<(const date::year& x, const Rule& y);
+ friend bool operator==(const Rule& x, const std::string& y);
+ friend bool operator<(const Rule& x, const std::string& y);
+ friend bool operator==(const std::string& x, const Rule& y);
+ friend bool operator<(const std::string& x, const Rule& y);
+
+ friend std::ostream& operator<<(std::ostream& os, const Rule& r);
+
+private:
+ date::day day() const;
+ date::month month() const;
+ static void split_overlaps(std::vector<Rule>& rules, std::size_t i, std::size_t& e);
+ static bool overlaps(const Rule& x, const Rule& y);
+ static void split(std::vector<Rule>& rules, std::size_t i, std::size_t k,
+ std::size_t& e);
+};
+
+inline bool operator!=(const Rule& x, const Rule& y) {return !(x == y);}
+inline bool operator> (const Rule& x, const Rule& y) {return y < x;}
+inline bool operator<=(const Rule& x, const Rule& y) {return !(y < x);}
+inline bool operator>=(const Rule& x, const Rule& y) {return !(x < y);}
+
+inline bool operator!=(const Rule& x, const date::year& y) {return !(x == y);}
+inline bool operator> (const Rule& x, const date::year& y) {return y < x;}
+inline bool operator<=(const Rule& x, const date::year& y) {return !(y < x);}
+inline bool operator>=(const Rule& x, const date::year& y) {return !(x < y);}
+
+inline bool operator!=(const date::year& x, const Rule& y) {return !(x == y);}
+inline bool operator> (const date::year& x, const Rule& y) {return y < x;}
+inline bool operator<=(const date::year& x, const Rule& y) {return !(y < x);}
+inline bool operator>=(const date::year& x, const Rule& y) {return !(x < y);}
+
+inline bool operator!=(const Rule& x, const std::string& y) {return !(x == y);}
+inline bool operator> (const Rule& x, const std::string& y) {return y < x;}
+inline bool operator<=(const Rule& x, const std::string& y) {return !(y < x);}
+inline bool operator>=(const Rule& x, const std::string& y) {return !(x < y);}
+
+inline bool operator!=(const std::string& x, const Rule& y) {return !(x == y);}
+inline bool operator> (const std::string& x, const Rule& y) {return y < x;}
+inline bool operator<=(const std::string& x, const Rule& y) {return !(y < x);}
+inline bool operator>=(const std::string& x, const Rule& y) {return !(x < y);}
+
+struct zonelet
+{
+ enum tag {has_rule, has_save, is_empty};
+
+ std::chrono::seconds gmtoff_;
+ tag tag_ = has_rule;
+
+#if !defined(_MSC_VER) || (_MSC_VER >= 1900)
+ union U
+#else
+ struct U
+#endif
+ {
+ std::string rule_;
+ std::chrono::minutes save_;
+
+ ~U() {}
+ U() {}
+ U(const U&) {}
+ U& operator=(const U&) = delete;
+ } u;
+
+ std::string format_;
+ date::year until_year_{0};
+ MonthDayTime until_date_;
+ sys_seconds until_utc_;
+ local_seconds until_std_;
+ local_seconds until_loc_;
+ std::chrono::minutes initial_save_{0};
+ std::string initial_abbrev_;
+ std::pair<const Rule*, date::year> first_rule_{nullptr, date::year::min()};
+ std::pair<const Rule*, date::year> last_rule_{nullptr, date::year::max()};
+
+ ~zonelet();
+ zonelet();
+ zonelet(const zonelet& i);
+ zonelet& operator=(const zonelet&) = delete;
+};
+
+#else // USE_OS_TZDB
+
+struct ttinfo
+{
+ std::int32_t tt_gmtoff;
+ unsigned char tt_isdst;
+ unsigned char tt_abbrind;
+ unsigned char pad[2];
+};
+
+static_assert(sizeof(ttinfo) == 8, "");
+
+struct expanded_ttinfo
+{
+ std::chrono::seconds offset;
+ std::string abbrev;
+ bool is_dst;
+};
+
+struct transition
+{
+ sys_seconds timepoint;
+ const expanded_ttinfo* info;
+
+ transition(sys_seconds tp, const expanded_ttinfo* i = nullptr)
+ : timepoint(tp)
+ , info(i)
+ {}
+
+ friend
+ std::ostream&
+ operator<<(std::ostream& os, const transition& t)
+ {
+ using date::operator<<;
+ os << t.timepoint << "Z ";
+ if (t.info->offset >= std::chrono::seconds{0})
+ os << '+';
+ os << make_time(t.info->offset);
+ if (t.info->is_dst > 0)
+ os << " daylight ";
+ else
+ os << " standard ";
+ os << t.info->abbrev;
+ return os;
+ }
+};
+
+#endif // USE_OS_TZDB
+
+} // namespace detail
+
+} // namespace date
+
+#if defined(_MSC_VER) && (_MSC_VER < 1900)
+#include "tz.h"
+#endif
+
+#endif // TZ_PRIVATE_H
diff --git a/src/third-party/date/src/Makefile.am b/src/third-party/date/src/Makefile.am
new file mode 100644
index 0000000..574114d
--- /dev/null
+++ b/src/third-party/date/src/Makefile.am
@@ -0,0 +1,19 @@
+
+noinst_HEADERS = \
+ ../include/date/tz_private.h \
+ ../include/date/ios.h \
+ ../include/date/ptz.h \
+ ../include/date/solar_hijri.h \
+ ../include/date/date.h \
+ ../include/date/julian.h \
+ ../include/date/chrono_io.h \
+ ../include/date/iso_week.h \
+ ../include/date/tz.h \
+ ../include/date/islamic.h
+
+noinst_LIBRARIES = libdatepp.a
+
+AM_CPPFLAGS = -I$(srcdir)/../include
+
+libdatepp_a_SOURCES = \
+ tz.cpp
diff --git a/src/third-party/date/src/tz.cpp b/src/third-party/date/src/tz.cpp
new file mode 100644
index 0000000..26babbd
--- /dev/null
+++ b/src/third-party/date/src/tz.cpp
@@ -0,0 +1,3944 @@
+// The MIT License (MIT)
+//
+// Copyright (c) 2015, 2016, 2017 Howard Hinnant
+// Copyright (c) 2015 Ville Voutilainen
+// Copyright (c) 2016 Alexander Kormanovsky
+// Copyright (c) 2016, 2017 Jiangang Zhuang
+// Copyright (c) 2017 Nicolas Veloz Savino
+// Copyright (c) 2017 Florian Dang
+// Copyright (c) 2017 Aaron Bishop
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//
+// Our apologies. When the previous paragraph was written, lowercase had not yet
+// been invented (that would involve another several millennia of evolution).
+// We did not mean to shout.
+
+#ifdef _WIN32
+ // windows.h will be included directly and indirectly (e.g. by curl).
+ // We need to define these macros to prevent windows.h bringing in
+ // more than we need and do it early so windows.h doesn't get included
+ // without these macros having been defined.
+ // min/max macros interfere with the C++ versions.
+# ifndef NOMINMAX
+# define NOMINMAX
+# endif
+ // We don't need all that Windows has to offer.
+# ifndef WIN32_LEAN_AND_MEAN
+# define WIN32_LEAN_AND_MEAN
+# endif
+
+ // for wcstombs
+# ifndef _CRT_SECURE_NO_WARNINGS
+# define _CRT_SECURE_NO_WARNINGS
+# endif
+
+ // None of this happens with the MS SDK (at least VS14 which I tested), but:
+ // Compiling with mingw, we get "error: 'KF_FLAG_DEFAULT' was not declared in this scope."
+ // and error: 'SHGetKnownFolderPath' was not declared in this scope.".
+ // It seems when using mingw NTDDI_VERSION is undefined and that
+ // causes KNOWN_FOLDER_FLAG and the KF_ flags to not get defined.
+ // So we must define NTDDI_VERSION to get those flags on mingw.
+ // The docs say though here:
+ // https://msdn.microsoft.com/en-nz/library/windows/desktop/aa383745(v=vs.85).aspx
+ // that "If you define NTDDI_VERSION, you must also define _WIN32_WINNT."
+ // So we declare we require Vista or greater.
+# ifdef __MINGW32__
+
+# ifndef NTDDI_VERSION
+# define NTDDI_VERSION 0x06000000
+# define _WIN32_WINNT _WIN32_WINNT_VISTA
+# elif NTDDI_VERSION < 0x06000000
+# warning "If this fails to compile NTDDI_VERSION may be to low. See comments above."
+# endif
+ // But once we define the values above we then get this linker error:
+ // "tz.cpp:(.rdata$.refptr.FOLDERID_Downloads[.refptr.FOLDERID_Downloads]+0x0): "
+ // "undefined reference to `FOLDERID_Downloads'"
+ // which #include <initguid.h> cures see:
+ // https://support.microsoft.com/en-us/kb/130869
+# include <initguid.h>
+ // But with <initguid.h> included, the error moves on to:
+ // error: 'FOLDERID_Downloads' was not declared in this scope
+ // Which #include <knownfolders.h> cures.
+# include <knownfolders.h>
+
+# endif // __MINGW32__
+
+# include <windows.h>
+#endif // _WIN32
+
+#include "date/tz_private.h"
+
+#ifdef __APPLE__
+# include "date/ios.h"
+#else
+# define TARGET_OS_IPHONE 0
+# define TARGET_OS_SIMULATOR 0
+#endif
+
+#if USE_OS_TZDB
+# include <dirent.h>
+#endif
+#include <algorithm>
+#include <cctype>
+#include <cstdlib>
+#include <cstring>
+#include <cwchar>
+#include <exception>
+#include <fstream>
+#include <iostream>
+#include <iterator>
+#include <memory>
+#if USE_OS_TZDB
+# include <queue>
+#endif
+#include <sstream>
+#include <string>
+#include <tuple>
+#include <vector>
+#include <sys/stat.h>
+
+// unistd.h is used on some platforms as part of the the means to get
+// the current time zone. On Win32 windows.h provides a means to do it.
+// gcc/mingw supports unistd.h on Win32 but MSVC does not.
+
+#ifdef _WIN32
+# ifdef WINAPI_FAMILY
+# include <winapifamily.h>
+# if WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP
+# define WINRT
+# define INSTALL .
+# endif
+# endif
+
+# include <io.h> // _unlink etc.
+
+# if defined(__clang__)
+ struct IUnknown; // fix for issue with static_cast<> in objbase.h
+ // (see https://github.com/philsquared/Catch/issues/690)
+# endif
+
+# include <shlobj.h> // CoTaskFree, ShGetKnownFolderPath etc.
+# if HAS_REMOTE_API
+# include <direct.h> // _mkdir
+# include <shellapi.h> // ShFileOperation etc.
+# endif // HAS_REMOTE_API
+#else // !_WIN32
+# include <unistd.h>
+# if !USE_OS_TZDB && !defined(INSTALL)
+# include <wordexp.h>
+# endif
+# include <limits.h>
+# include <string.h>
+# if !USE_SHELL_API
+# include <sys/stat.h>
+# include <sys/fcntl.h>
+# include <dirent.h>
+# include <cstring>
+# include <sys/wait.h>
+# include <sys/types.h>
+# endif //!USE_SHELL_API
+#endif // !_WIN32
+
+
+#if HAS_REMOTE_API
+ // Note curl includes windows.h so we must include curl AFTER definitions of things
+ // that affect windows.h such as NOMINMAX.
+#if defined(_MSC_VER) && defined(SHORTENED_CURL_INCLUDE)
+ // For rmt_curl nuget package
+# include <curl.h>
+#else
+# include <curl/curl.h>
+#endif
+#endif
+
+#ifdef _WIN32
+static CONSTDATA char folder_delimiter = '\\';
+#else // !_WIN32
+static CONSTDATA char folder_delimiter = '/';
+#endif // !_WIN32
+
+#if defined(__GNUC__) && __GNUC__ < 5
+ // GCC 4.9 Bug 61489 Wrong warning with -Wmissing-field-initializers
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wmissing-field-initializers"
+#endif // defined(__GNUC__) && __GNUC__ < 5
+
+#if !USE_OS_TZDB
+
+# ifdef _WIN32
+# ifndef WINRT
+
+namespace
+{
+ struct task_mem_deleter
+ {
+ void operator()(wchar_t buf[])
+ {
+ if (buf != nullptr)
+ CoTaskMemFree(buf);
+ }
+ };
+ using co_task_mem_ptr = std::unique_ptr<wchar_t[], task_mem_deleter>;
+}
+
+// We might need to know certain locations even if not using the remote API,
+// so keep these routines out of that block for now.
+static
+std::string
+get_known_folder(const GUID& folderid)
+{
+ std::string folder;
+ PWSTR pfolder = nullptr;
+ HRESULT hr = SHGetKnownFolderPath(folderid, KF_FLAG_DEFAULT, nullptr, &pfolder);
+ if (SUCCEEDED(hr))
+ {
+ co_task_mem_ptr folder_ptr(pfolder);
+ const wchar_t* fptr = folder_ptr.get();
+ auto state = std::mbstate_t();
+ const auto required = std::wcsrtombs(nullptr, &fptr, 0, &state);
+ if (required != 0 && required != std::size_t(-1))
+ {
+ folder.resize(required);
+ std::wcsrtombs(&folder[0], &fptr, folder.size(), &state);
+ }
+ }
+ return folder;
+}
+
+# ifndef INSTALL
+
+// Usually something like "c:\Users\username\Downloads".
+static
+std::string
+get_download_folder()
+{
+ return get_known_folder(FOLDERID_Downloads);
+}
+
+# endif // !INSTALL
+
+# endif // WINRT
+# else // !_WIN32
+
+# if !defined(INSTALL)
+
+static
+std::string
+expand_path(std::string path)
+{
+# if TARGET_OS_IPHONE
+ return date::iOSUtils::get_tzdata_path();
+# else // !TARGET_OS_IPHONE
+ ::wordexp_t w{};
+ std::unique_ptr<::wordexp_t, void(*)(::wordexp_t*)> hold{&w, ::wordfree};
+ ::wordexp(path.c_str(), &w, 0);
+ if (w.we_wordc != 1)
+ throw std::runtime_error("Cannot expand path: " + path);
+ path = w.we_wordv[0];
+ return path;
+# endif // !TARGET_OS_IPHONE
+}
+
+static
+std::string
+get_download_folder()
+{
+ return expand_path("~/Downloads");
+}
+
+# endif // !defined(INSTALL)
+
+# endif // !_WIN32
+
+#endif // !USE_OS_TZDB
+
+namespace date
+{
+// +---------------------+
+// | Begin Configuration |
+// +---------------------+
+
+using namespace detail;
+
+#if !USE_OS_TZDB
+
+static
+std::string&
+access_install()
+{
+ static std::string install
+#ifndef INSTALL
+
+ = get_download_folder() + folder_delimiter + "tzdata";
+
+#else // !INSTALL
+
+# define STRINGIZEIMP(x) #x
+# define STRINGIZE(x) STRINGIZEIMP(x)
+
+ = STRINGIZE(INSTALL) + std::string(1, folder_delimiter) + "tzdata";
+
+ #undef STRINGIZEIMP
+ #undef STRINGIZE
+#endif // !INSTALL
+
+ return install;
+}
+
+void
+set_install(const std::string& s)
+{
+ access_install() = s;
+}
+
+static
+const std::string&
+get_install()
+{
+ static const std::string& ref = access_install();
+ return ref;
+}
+
+#if HAS_REMOTE_API
+static
+std::string
+get_download_gz_file(const std::string& version)
+{
+ auto file = get_install() + version + ".tar.gz";
+ return file;
+}
+#endif // HAS_REMOTE_API
+
+#endif // !USE_OS_TZDB
+
+// These can be used to reduce the range of the database to save memory
+CONSTDATA auto min_year = date::year::min();
+CONSTDATA auto max_year = date::year::max();
+
+CONSTDATA auto min_day = date::January/1;
+CONSTDATA auto max_day = date::December/31;
+
+#if USE_OS_TZDB
+
+CONSTCD14 const sys_seconds min_seconds = sys_days(min_year/min_day);
+
+#endif // USE_OS_TZDB
+
+#ifndef _WIN32
+
+static
+std::string
+discover_tz_dir()
+{
+ struct stat sb;
+ using namespace std;
+# ifndef __APPLE__
+ CONSTDATA auto tz_dir_default = "/usr/share/zoneinfo";
+ CONSTDATA auto tz_dir_buildroot = "/usr/share/zoneinfo/uclibc";
+
+ // Check special path which is valid for buildroot with uclibc builds
+ if(stat(tz_dir_buildroot, &sb) == 0 && S_ISDIR(sb.st_mode))
+ return tz_dir_buildroot;
+ else if(stat(tz_dir_default, &sb) == 0 && S_ISDIR(sb.st_mode))
+ return tz_dir_default;
+ else
+ throw runtime_error("discover_tz_dir failed to find zoneinfo\n");
+# else // __APPLE__
+# if TARGET_OS_IPHONE
+# if TARGET_OS_SIMULATOR
+ return "/usr/share/zoneinfo";
+# else
+ return "/var/db/timezone/zoneinfo";
+# endif
+# else
+ CONSTDATA auto timezone = "/etc/localtime";
+ if (!(lstat(timezone, &sb) == 0 && S_ISLNK(sb.st_mode) && sb.st_size > 0))
+ throw runtime_error("discover_tz_dir failed\n");
+ string result;
+ char rp[PATH_MAX+1] = {};
+ if (readlink(timezone, rp, sizeof(rp)-1) > 0)
+ result = string(rp);
+ else
+ throw system_error(errno, system_category(), "readlink() failed");
+ auto i = result.find("zoneinfo");
+ if (i == string::npos)
+ throw runtime_error("discover_tz_dir failed to find zoneinfo\n");
+ i = result.find('/', i);
+ if (i == string::npos)
+ throw runtime_error("discover_tz_dir failed to find '/'\n");
+ return result.substr(0, i);
+# endif
+# endif // __APPLE__
+}
+
+static
+const std::string&
+get_tz_dir()
+{
+ static const std::string tz_dir = discover_tz_dir();
+ return tz_dir;
+}
+
+#endif
+
+// +-------------------+
+// | End Configuration |
+// +-------------------+
+
+#ifndef _MSC_VER
+static_assert(min_year <= max_year, "Configuration error");
+#endif
+
+static std::unique_ptr<tzdb> init_tzdb();
+
+tzdb_list::~tzdb_list()
+{
+ const tzdb* ptr = head_;
+ head_ = nullptr;
+ while (ptr != nullptr)
+ {
+ auto next = ptr->next;
+ delete ptr;
+ ptr = next;
+ }
+}
+
+tzdb_list::tzdb_list(tzdb_list&& x) NOEXCEPT
+ : head_{x.head_.exchange(nullptr)}
+{
+}
+
+void
+tzdb_list::push_front(tzdb* tzdb) NOEXCEPT
+{
+ tzdb->next = head_;
+ head_ = tzdb;
+}
+
+tzdb_list::const_iterator
+tzdb_list::erase_after(const_iterator p) NOEXCEPT
+{
+ auto t = p.p_->next;
+ p.p_->next = p.p_->next->next;
+ delete t;
+ return ++p;
+}
+
+struct tzdb_list::undocumented_helper
+{
+ static void push_front(tzdb_list& db_list, tzdb* tzdb) NOEXCEPT
+ {
+ db_list.push_front(tzdb);
+ }
+};
+
+static
+tzdb_list
+create_tzdb()
+{
+ tzdb_list tz_db;
+ tzdb_list::undocumented_helper::push_front(tz_db, init_tzdb().release());
+ return tz_db;
+}
+
+tzdb_list&
+get_tzdb_list()
+{
+ static tzdb_list tz_db = create_tzdb();
+ return tz_db;
+}
+
+static
+std::string
+parse3(std::istream& in)
+{
+ std::string r(3, ' ');
+ ws(in);
+ r[0] = static_cast<char>(in.get());
+ r[1] = static_cast<char>(in.get());
+ r[2] = static_cast<char>(in.get());
+ return r;
+}
+
+static
+unsigned
+parse_month(std::istream& in)
+{
+ CONSTDATA char*const month_names[] =
+ {"Jan", "Feb", "Mar", "Apr", "May", "Jun",
+ "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
+ auto s = parse3(in);
+ auto m = std::find(std::begin(month_names), std::end(month_names), s) - month_names;
+ if (m >= std::end(month_names) - std::begin(month_names))
+ throw std::runtime_error("oops: bad month name: " + s);
+ return static_cast<unsigned>(++m);
+}
+
+#if !USE_OS_TZDB
+
+#ifdef _WIN32
+
+static
+void
+sort_zone_mappings(std::vector<date::detail::timezone_mapping>& mappings)
+{
+ std::sort(mappings.begin(), mappings.end(),
+ [](const date::detail::timezone_mapping& lhs,
+ const date::detail::timezone_mapping& rhs)->bool
+ {
+ auto other_result = lhs.other.compare(rhs.other);
+ if (other_result < 0)
+ return true;
+ else if (other_result == 0)
+ {
+ auto territory_result = lhs.territory.compare(rhs.territory);
+ if (territory_result < 0)
+ return true;
+ else if (territory_result == 0)
+ {
+ if (lhs.type < rhs.type)
+ return true;
+ }
+ }
+ return false;
+ });
+}
+
+static
+bool
+native_to_standard_timezone_name(const std::string& native_tz_name,
+ std::string& standard_tz_name)
+{
+ // TOOD! Need be a case insensitive compare?
+ if (native_tz_name == "UTC")
+ {
+ standard_tz_name = "Etc/UTC";
+ return true;
+ }
+ standard_tz_name.clear();
+ // TODO! we can improve on linear search.
+ const auto& mappings = date::get_tzdb().mappings;
+ for (const auto& tzm : mappings)
+ {
+ if (tzm.other == native_tz_name)
+ {
+ standard_tz_name = tzm.type;
+ return true;
+ }
+ }
+ return false;
+}
+
+// Parse this XML file:
+// https://raw.githubusercontent.com/unicode-org/cldr/master/common/supplemental/windowsZones.xml
+// The parsing method is designed to be simple and quick. It is not overly
+// forgiving of change but it should diagnose basic format issues.
+// See timezone_mapping structure for more info.
+static
+std::vector<detail::timezone_mapping>
+load_timezone_mappings_from_xml_file(const std::string& input_path)
+{
+ std::size_t line_num = 0;
+ std::vector<detail::timezone_mapping> mappings;
+ std::string line;
+
+ std::ifstream is(input_path);
+ if (!is.is_open())
+ {
+ // We don't emit file exceptions because that's an implementation detail.
+ std::string msg = "Error opening time zone mapping file \"";
+ msg += input_path;
+ msg += "\".";
+ throw std::runtime_error(msg);
+ }
+
+ auto error = [&input_path, &line_num](const char* info)
+ {
+ std::string msg = "Error loading time zone mapping file \"";
+ msg += input_path;
+ msg += "\" at line ";
+ msg += std::to_string(line_num);
+ msg += ": ";
+ msg += info;
+ throw std::runtime_error(msg);
+ };
+ // [optional space]a="b"
+ auto read_attribute = [&line, &error]
+ (const char* name, std::string& value, std::size_t startPos)
+ ->std::size_t
+ {
+ value.clear();
+ // Skip leading space before attribute name.
+ std::size_t spos = line.find_first_not_of(' ', startPos);
+ if (spos == std::string::npos)
+ spos = startPos;
+ // Assume everything up to next = is the attribute name
+ // and that an = will always delimit that.
+ std::size_t epos = line.find('=', spos);
+ if (epos == std::string::npos)
+ error("Expected \'=\' right after attribute name.");
+ std::size_t name_len = epos - spos;
+ // Expect the name we find matches the name we expect.
+ if (line.compare(spos, name_len, name) != 0)
+ {
+ std::string msg;
+ msg = "Expected attribute name \'";
+ msg += name;
+ msg += "\' around position ";
+ msg += std::to_string(spos);
+ msg += " but found something else.";
+ error(msg.c_str());
+ }
+ ++epos; // Skip the '=' that is after the attribute name.
+ spos = epos;
+ if (spos < line.length() && line[spos] == '\"')
+ ++spos; // Skip the quote that is before the attribute value.
+ else
+ {
+ std::string msg = "Expected '\"' to begin value of attribute \'";
+ msg += name;
+ msg += "\'.";
+ error(msg.c_str());
+ }
+ epos = line.find('\"', spos);
+ if (epos == std::string::npos)
+ {
+ std::string msg = "Expected '\"' to end value of attribute \'";
+ msg += name;
+ msg += "\'.";
+ error(msg.c_str());
+ }
+ // Extract everything in between the quotes. Note no escaping is done.
+ std::size_t value_len = epos - spos;
+ value.assign(line, spos, value_len);
+ ++epos; // Skip the quote that is after the attribute value;
+ return epos;
+ };
+
+ // Quick but not overly forgiving XML mapping file processing.
+ bool mapTimezonesOpenTagFound = false;
+ bool mapTimezonesCloseTagFound = false;
+ std::size_t mapZonePos = std::string::npos;
+ std::size_t mapTimezonesPos = std::string::npos;
+ CONSTDATA char mapTimeZonesOpeningTag[] = { "<mapTimezones " };
+ CONSTDATA char mapZoneOpeningTag[] = { "<mapZone " };
+ CONSTDATA std::size_t mapZoneOpeningTagLen = sizeof(mapZoneOpeningTag) /
+ sizeof(mapZoneOpeningTag[0]) - 1;
+ while (!mapTimezonesOpenTagFound)
+ {
+ std::getline(is, line);
+ ++line_num;
+ if (is.eof())
+ {
+ // If there is no mapTimezones tag is it an error?
+ // Perhaps if there are no mapZone mappings it might be ok for
+ // its parent mapTimezones element to be missing?
+ // We treat this as an error though on the assumption that if there
+ // really are no mappings we should still get a mapTimezones parent
+ // element but no mapZone elements inside. Assuming we must
+ // find something will hopefully at least catch more drastic formatting
+ // changes or errors than if we don't do this and assume nothing found.
+ error("Expected a mapTimezones opening tag.");
+ }
+ mapTimezonesPos = line.find(mapTimeZonesOpeningTag);
+ mapTimezonesOpenTagFound = (mapTimezonesPos != std::string::npos);
+ }
+
+ // NOTE: We could extract the version info that follows the opening
+ // mapTimezones tag and compare that to the version of other data we have.
+ // I would have expected them to be kept in synch but testing has shown
+ // it typically does not match anyway. So what's the point?
+ while (!mapTimezonesCloseTagFound)
+ {
+ std::ws(is);
+ std::getline(is, line);
+ ++line_num;
+ if (is.eof())
+ error("Expected a mapTimezones closing tag.");
+ if (line.empty())
+ continue;
+ mapZonePos = line.find(mapZoneOpeningTag);
+ if (mapZonePos != std::string::npos)
+ {
+ mapZonePos += mapZoneOpeningTagLen;
+ detail::timezone_mapping zm{};
+ std::size_t pos = read_attribute("other", zm.other, mapZonePos);
+ pos = read_attribute("territory", zm.territory, pos);
+ read_attribute("type", zm.type, pos);
+ mappings.push_back(std::move(zm));
+
+ continue;
+ }
+ mapTimezonesPos = line.find("</mapTimezones>");
+ mapTimezonesCloseTagFound = (mapTimezonesPos != std::string::npos);
+ if (!mapTimezonesCloseTagFound)
+ {
+ std::size_t commentPos = line.find("<!--");
+ if (commentPos == std::string::npos)
+ error("Unexpected mapping record found. A xml mapZone or comment "
+ "attribute or mapTimezones closing tag was expected.");
+ }
+ }
+
+ is.close();
+ return mappings;
+}
+
+#endif // _WIN32
+
+// Parsing helpers
+
+static
+unsigned
+parse_dow(std::istream& in)
+{
+ CONSTDATA char*const dow_names[] =
+ {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
+ auto s = parse3(in);
+ auto dow = std::find(std::begin(dow_names), std::end(dow_names), s) - dow_names;
+ if (dow >= std::end(dow_names) - std::begin(dow_names))
+ throw std::runtime_error("oops: bad dow name: " + s);
+ return static_cast<unsigned>(dow);
+}
+
+static
+std::chrono::seconds
+parse_unsigned_time(std::istream& in)
+{
+ using namespace std::chrono;
+ int x;
+ in >> x;
+ auto r = seconds{hours{x}};
+ if (!in.eof() && in.peek() == ':')
+ {
+ in.get();
+ in >> x;
+ r += minutes{x};
+ if (!in.eof() && in.peek() == ':')
+ {
+ in.get();
+ in >> x;
+ r += seconds{x};
+ }
+ }
+ return r;
+}
+
+static
+std::chrono::seconds
+parse_signed_time(std::istream& in)
+{
+ ws(in);
+ auto sign = 1;
+ if (in.peek() == '-')
+ {
+ sign = -1;
+ in.get();
+ }
+ else if (in.peek() == '+')
+ in.get();
+ return sign * parse_unsigned_time(in);
+}
+
+// MonthDayTime
+
+detail::MonthDayTime::MonthDayTime(local_seconds tp, tz timezone)
+ : zone_(timezone)
+{
+ using namespace date;
+ const auto dp = date::floor<days>(tp);
+ const auto hms = make_time(tp - dp);
+ const auto ymd = year_month_day(dp);
+ u = ymd.month() / ymd.day();
+ h_ = hms.hours();
+ m_ = hms.minutes();
+ s_ = hms.seconds();
+}
+
+detail::MonthDayTime::MonthDayTime(const date::month_day& md, tz timezone)
+ : zone_(timezone)
+{
+ u = md;
+}
+
+date::day
+detail::MonthDayTime::day() const
+{
+ switch (type_)
+ {
+ case month_day:
+ return u.month_day_.day();
+ case month_last_dow:
+ return date::day{31};
+ case lteq:
+ case gteq:
+ break;
+ }
+ return u.month_day_weekday_.month_day_.day();
+}
+
+date::month
+detail::MonthDayTime::month() const
+{
+ switch (type_)
+ {
+ case month_day:
+ return u.month_day_.month();
+ case month_last_dow:
+ return u.month_weekday_last_.month();
+ case lteq:
+ case gteq:
+ break;
+ }
+ return u.month_day_weekday_.month_day_.month();
+}
+
+int
+detail::MonthDayTime::compare(date::year y, const MonthDayTime& x, date::year yx,
+ std::chrono::seconds offset, std::chrono::minutes prev_save) const
+{
+ if (zone_ != x.zone_)
+ {
+ auto dp0 = to_sys_days(y);
+ auto dp1 = x.to_sys_days(yx);
+ if (std::abs((dp0-dp1).count()) > 1)
+ return dp0 < dp1 ? -1 : 1;
+ if (zone_ == tz::local)
+ {
+ auto tp0 = to_time_point(y) - prev_save;
+ if (x.zone_ == tz::utc)
+ tp0 -= offset;
+ auto tp1 = x.to_time_point(yx);
+ return tp0 < tp1 ? -1 : tp0 == tp1 ? 0 : 1;
+ }
+ else if (zone_ == tz::standard)
+ {
+ auto tp0 = to_time_point(y);
+ auto tp1 = x.to_time_point(yx);
+ if (x.zone_ == tz::local)
+ tp1 -= prev_save;
+ else
+ tp0 -= offset;
+ return tp0 < tp1 ? -1 : tp0 == tp1 ? 0 : 1;
+ }
+ // zone_ == tz::utc
+ auto tp0 = to_time_point(y);
+ auto tp1 = x.to_time_point(yx);
+ if (x.zone_ == tz::local)
+ tp1 -= offset + prev_save;
+ else
+ tp1 -= offset;
+ return tp0 < tp1 ? -1 : tp0 == tp1 ? 0 : 1;
+ }
+ auto const t0 = to_time_point(y);
+ auto const t1 = x.to_time_point(yx);
+ return t0 < t1 ? -1 : t0 == t1 ? 0 : 1;
+}
+
+sys_seconds
+detail::MonthDayTime::to_sys(date::year y, std::chrono::seconds offset,
+ std::chrono::seconds save) const
+{
+ using namespace date;
+ using namespace std::chrono;
+ auto until_utc = to_time_point(y);
+ if (zone_ == tz::standard)
+ until_utc -= offset;
+ else if (zone_ == tz::local)
+ until_utc -= offset + save;
+ return until_utc;
+}
+
+detail::MonthDayTime::U&
+detail::MonthDayTime::U::operator=(const date::month_day& x)
+{
+ month_day_ = x;
+ return *this;
+}
+
+detail::MonthDayTime::U&
+detail::MonthDayTime::U::operator=(const date::month_weekday_last& x)
+{
+ month_weekday_last_ = x;
+ return *this;
+}
+
+detail::MonthDayTime::U&
+detail::MonthDayTime::U::operator=(const pair& x)
+{
+ month_day_weekday_ = x;
+ return *this;
+}
+
+date::sys_days
+detail::MonthDayTime::to_sys_days(date::year y) const
+{
+ using namespace std::chrono;
+ using namespace date;
+ switch (type_)
+ {
+ case month_day:
+ return sys_days(y/u.month_day_);
+ case month_last_dow:
+ return sys_days(y/u.month_weekday_last_);
+ case lteq:
+ {
+ auto const x = y/u.month_day_weekday_.month_day_;
+ auto const wd1 = weekday(static_cast<sys_days>(x));
+ auto const wd0 = u.month_day_weekday_.weekday_;
+ return sys_days(x) - (wd1-wd0);
+ }
+ case gteq:
+ break;
+ }
+ auto const x = y/u.month_day_weekday_.month_day_;
+ auto const wd1 = u.month_day_weekday_.weekday_;
+ auto const wd0 = weekday(static_cast<sys_days>(x));
+ return sys_days(x) + (wd1-wd0);
+}
+
+sys_seconds
+detail::MonthDayTime::to_time_point(date::year y) const
+{
+ // Add seconds first to promote to largest rep early to prevent overflow
+ return to_sys_days(y) + s_ + h_ + m_;
+}
+
+void
+detail::MonthDayTime::canonicalize(date::year y)
+{
+ using namespace std::chrono;
+ using namespace date;
+ switch (type_)
+ {
+ case month_day:
+ return;
+ case month_last_dow:
+ {
+ auto const ymd = year_month_day(sys_days(y/u.month_weekday_last_));
+ u.month_day_ = ymd.month()/ymd.day();
+ type_ = month_day;
+ return;
+ }
+ case lteq:
+ {
+ auto const x = y/u.month_day_weekday_.month_day_;
+ auto const wd1 = weekday(static_cast<sys_days>(x));
+ auto const wd0 = u.month_day_weekday_.weekday_;
+ auto const ymd = year_month_day(sys_days(x) - (wd1-wd0));
+ u.month_day_ = ymd.month()/ymd.day();
+ type_ = month_day;
+ return;
+ }
+ case gteq:
+ {
+ auto const x = y/u.month_day_weekday_.month_day_;
+ auto const wd1 = u.month_day_weekday_.weekday_;
+ auto const wd0 = weekday(static_cast<sys_days>(x));
+ auto const ymd = year_month_day(sys_days(x) + (wd1-wd0));
+ u.month_day_ = ymd.month()/ymd.day();
+ type_ = month_day;
+ return;
+ }
+ }
+}
+
+std::istream&
+detail::operator>>(std::istream& is, MonthDayTime& x)
+{
+ using namespace date;
+ using namespace std::chrono;
+ assert(((std::ios::failbit | std::ios::badbit) & is.exceptions()) ==
+ (std::ios::failbit | std::ios::badbit));
+ x = MonthDayTime{};
+ if (!is.eof() && ws(is) && !is.eof() && is.peek() != '#')
+ {
+ auto m = parse_month(is);
+ if (!is.eof() && ws(is) && !is.eof() && is.peek() != '#')
+ {
+ if (is.peek() == 'l')
+ {
+ for (int i = 0; i < 4; ++i)
+ is.get();
+ auto dow = parse_dow(is);
+ x.type_ = MonthDayTime::month_last_dow;
+ x.u = date::month(m)/weekday(dow)[last];
+ }
+ else if (std::isalpha(is.peek()))
+ {
+ auto dow = parse_dow(is);
+ char c{};
+ is >> c;
+ if (c == '<' || c == '>')
+ {
+ char c2{};
+ is >> c2;
+ if (c2 != '=')
+ throw std::runtime_error(std::string("bad operator: ") + c + c2);
+ int d;
+ is >> d;
+ if (d < 1 || d > 31)
+ throw std::runtime_error(std::string("bad operator: ") + c + c2
+ + std::to_string(d));
+ x.type_ = c == '<' ? MonthDayTime::lteq : MonthDayTime::gteq;
+ x.u = MonthDayTime::pair{ date::month(m) / d, date::weekday(dow) };
+ }
+ else
+ throw std::runtime_error(std::string("bad operator: ") + c);
+ }
+ else // if (std::isdigit(is.peek())
+ {
+ int d;
+ is >> d;
+ if (d < 1 || d > 31)
+ throw std::runtime_error(std::string("day of month: ")
+ + std::to_string(d));
+ x.type_ = MonthDayTime::month_day;
+ x.u = date::month(m)/d;
+ }
+ if (!is.eof() && ws(is) && !is.eof() && is.peek() != '#')
+ {
+ int t;
+ is >> t;
+ x.h_ = hours{t};
+ if (!is.eof() && is.peek() == ':')
+ {
+ is.get();
+ is >> t;
+ x.m_ = minutes{t};
+ if (!is.eof() && is.peek() == ':')
+ {
+ is.get();
+ is >> t;
+ x.s_ = seconds{t};
+ }
+ }
+ if (!is.eof() && std::isalpha(is.peek()))
+ {
+ char c;
+ is >> c;
+ switch (c)
+ {
+ case 's':
+ x.zone_ = tz::standard;
+ break;
+ case 'u':
+ x.zone_ = tz::utc;
+ break;
+ }
+ }
+ }
+ }
+ else
+ {
+ x.u = month{m}/1;
+ }
+ }
+ return is;
+}
+
+std::ostream&
+detail::operator<<(std::ostream& os, const MonthDayTime& x)
+{
+ switch (x.type_)
+ {
+ case MonthDayTime::month_day:
+ os << x.u.month_day_ << " ";
+ break;
+ case MonthDayTime::month_last_dow:
+ os << x.u.month_weekday_last_ << " ";
+ break;
+ case MonthDayTime::lteq:
+ os << x.u.month_day_weekday_.weekday_ << " on or before "
+ << x.u.month_day_weekday_.month_day_ << " ";
+ break;
+ case MonthDayTime::gteq:
+ if ((static_cast<unsigned>(x.day()) - 1) % 7 == 0)
+ {
+ os << (x.u.month_day_weekday_.month_day_.month() /
+ x.u.month_day_weekday_.weekday_[
+ (static_cast<unsigned>(x.day()) - 1)/7+1]) << " ";
+ }
+ else
+ {
+ os << x.u.month_day_weekday_.weekday_ << " on or after "
+ << x.u.month_day_weekday_.month_day_ << " ";
+ }
+ break;
+ }
+ os << date::make_time(x.s_ + x.h_ + x.m_);
+ if (x.zone_ == tz::utc)
+ os << "UTC ";
+ else if (x.zone_ == tz::standard)
+ os << "STD ";
+ else
+ os << " ";
+ return os;
+}
+
+// Rule
+
+detail::Rule::Rule(const std::string& s)
+{
+ try
+ {
+ using namespace date;
+ using namespace std::chrono;
+ std::istringstream in(s);
+ in.exceptions(std::ios::failbit | std::ios::badbit);
+ std::string word;
+ in >> word >> name_;
+ int x;
+ ws(in);
+ if (std::isalpha(in.peek()))
+ {
+ in >> word;
+ if (word == "min")
+ {
+ starting_year_ = year::min();
+ }
+ else
+ throw std::runtime_error("Didn't find expected word: " + word);
+ }
+ else
+ {
+ in >> x;
+ starting_year_ = year{x};
+ }
+ std::ws(in);
+ if (std::isalpha(in.peek()))
+ {
+ in >> word;
+ if (word == "only")
+ {
+ ending_year_ = starting_year_;
+ }
+ else if (word == "max")
+ {
+ ending_year_ = year::max();
+ }
+ else
+ throw std::runtime_error("Didn't find expected word: " + word);
+ }
+ else
+ {
+ in >> x;
+ ending_year_ = year{x};
+ }
+ in >> word; // TYPE (always "-")
+ assert(word == "-");
+ in >> starting_at_;
+ save_ = duration_cast<minutes>(parse_signed_time(in));
+ in >> abbrev_;
+ if (abbrev_ == "-")
+ abbrev_.clear();
+ assert(hours{-1} <= save_ && save_ <= hours{2});
+ }
+ catch (...)
+ {
+ std::cerr << s << '\n';
+ std::cerr << *this << '\n';
+ throw;
+ }
+}
+
+detail::Rule::Rule(const Rule& r, date::year starting_year, date::year ending_year)
+ : name_(r.name_)
+ , starting_year_(starting_year)
+ , ending_year_(ending_year)
+ , starting_at_(r.starting_at_)
+ , save_(r.save_)
+ , abbrev_(r.abbrev_)
+{
+}
+
+bool
+detail::operator==(const Rule& x, const Rule& y)
+{
+ if (std::tie(x.name_, x.save_, x.starting_year_, x.ending_year_) ==
+ std::tie(y.name_, y.save_, y.starting_year_, y.ending_year_))
+ return x.month() == y.month() && x.day() == y.day();
+ return false;
+}
+
+bool
+detail::operator<(const Rule& x, const Rule& y)
+{
+ using namespace std::chrono;
+ auto const xm = x.month();
+ auto const ym = y.month();
+ if (std::tie(x.name_, x.starting_year_, xm, x.ending_year_) <
+ std::tie(y.name_, y.starting_year_, ym, y.ending_year_))
+ return true;
+ if (std::tie(x.name_, x.starting_year_, xm, x.ending_year_) >
+ std::tie(y.name_, y.starting_year_, ym, y.ending_year_))
+ return false;
+ return x.day() < y.day();
+}
+
+bool
+detail::operator==(const Rule& x, const date::year& y)
+{
+ return x.starting_year_ <= y && y <= x.ending_year_;
+}
+
+bool
+detail::operator<(const Rule& x, const date::year& y)
+{
+ return x.ending_year_ < y;
+}
+
+bool
+detail::operator==(const date::year& x, const Rule& y)
+{
+ return y.starting_year_ <= x && x <= y.ending_year_;
+}
+
+bool
+detail::operator<(const date::year& x, const Rule& y)
+{
+ return x < y.starting_year_;
+}
+
+bool
+detail::operator==(const Rule& x, const std::string& y)
+{
+ return x.name() == y;
+}
+
+bool
+detail::operator<(const Rule& x, const std::string& y)
+{
+ return x.name() < y;
+}
+
+bool
+detail::operator==(const std::string& x, const Rule& y)
+{
+ return y.name() == x;
+}
+
+bool
+detail::operator<(const std::string& x, const Rule& y)
+{
+ return x < y.name();
+}
+
+std::ostream&
+detail::operator<<(std::ostream& os, const Rule& r)
+{
+ using namespace date;
+ using namespace std::chrono;
+ detail::save_ostream<char> _(os);
+ os.fill(' ');
+ os.flags(std::ios::dec | std::ios::left);
+ os.width(15);
+ os << r.name_;
+ os << r.starting_year_ << " " << r.ending_year_ << " ";
+ os << r.starting_at_;
+ if (r.save_ >= minutes{0})
+ os << ' ';
+ os << date::make_time(r.save_) << " ";
+ os << r.abbrev_;
+ return os;
+}
+
+date::day
+detail::Rule::day() const
+{
+ return starting_at_.day();
+}
+
+date::month
+detail::Rule::month() const
+{
+ return starting_at_.month();
+}
+
+struct find_rule_by_name
+{
+ bool operator()(const Rule& x, const std::string& nm) const
+ {
+ return x.name() < nm;
+ }
+
+ bool operator()(const std::string& nm, const Rule& x) const
+ {
+ return nm < x.name();
+ }
+};
+
+bool
+detail::Rule::overlaps(const Rule& x, const Rule& y)
+{
+ // assume x.starting_year_ <= y.starting_year_;
+ if (!(x.starting_year_ <= y.starting_year_))
+ {
+ std::cerr << x << '\n';
+ std::cerr << y << '\n';
+ assert(x.starting_year_ <= y.starting_year_);
+ }
+ if (y.starting_year_ > x.ending_year_)
+ return false;
+ return !(x.starting_year_ == y.starting_year_ && x.ending_year_ == y.ending_year_);
+}
+
+void
+detail::Rule::split(std::vector<Rule>& rules, std::size_t i, std::size_t k, std::size_t& e)
+{
+ using namespace date;
+ using difference_type = std::vector<Rule>::iterator::difference_type;
+ // rules[i].starting_year_ <= rules[k].starting_year_ &&
+ // rules[i].ending_year_ >= rules[k].starting_year_ &&
+ // (rules[i].starting_year_ != rules[k].starting_year_ ||
+ // rules[i].ending_year_ != rules[k].ending_year_)
+ assert(rules[i].starting_year_ <= rules[k].starting_year_ &&
+ rules[i].ending_year_ >= rules[k].starting_year_ &&
+ (rules[i].starting_year_ != rules[k].starting_year_ ||
+ rules[i].ending_year_ != rules[k].ending_year_));
+ if (rules[i].starting_year_ == rules[k].starting_year_)
+ {
+ if (rules[k].ending_year_ < rules[i].ending_year_)
+ {
+ rules.insert(rules.begin() + static_cast<difference_type>(k+1),
+ Rule(rules[i], rules[k].ending_year_ + years{1},
+ std::move(rules[i].ending_year_)));
+ ++e;
+ rules[i].ending_year_ = rules[k].ending_year_;
+ }
+ else // rules[k].ending_year_ > rules[i].ending_year_
+ {
+ rules.insert(rules.begin() + static_cast<difference_type>(k+1),
+ Rule(rules[k], rules[i].ending_year_ + years{1},
+ std::move(rules[k].ending_year_)));
+ ++e;
+ rules[k].ending_year_ = rules[i].ending_year_;
+ }
+ }
+ else // rules[i].starting_year_ < rules[k].starting_year_
+ {
+ if (rules[k].ending_year_ < rules[i].ending_year_)
+ {
+ rules.insert(rules.begin() + static_cast<difference_type>(k),
+ Rule(rules[i], rules[k].starting_year_, rules[k].ending_year_));
+ ++k;
+ rules.insert(rules.begin() + static_cast<difference_type>(k+1),
+ Rule(rules[i], rules[k].ending_year_ + years{1},
+ std::move(rules[i].ending_year_)));
+ rules[i].ending_year_ = rules[k].starting_year_ - years{1};
+ e += 2;
+ }
+ else if (rules[k].ending_year_ > rules[i].ending_year_)
+ {
+ rules.insert(rules.begin() + static_cast<difference_type>(k),
+ Rule(rules[i], rules[k].starting_year_, rules[i].ending_year_));
+ ++k;
+ rules.insert(rules.begin() + static_cast<difference_type>(k+1),
+ Rule(rules[k], rules[i].ending_year_ + years{1},
+ std::move(rules[k].ending_year_)));
+ e += 2;
+ rules[k].ending_year_ = std::move(rules[i].ending_year_);
+ rules[i].ending_year_ = rules[k].starting_year_ - years{1};
+ }
+ else // rules[k].ending_year_ == rules[i].ending_year_
+ {
+ rules.insert(rules.begin() + static_cast<difference_type>(k),
+ Rule(rules[i], rules[k].starting_year_,
+ std::move(rules[i].ending_year_)));
+ ++k;
+ ++e;
+ rules[i].ending_year_ = rules[k].starting_year_ - years{1};
+ }
+ }
+}
+
+void
+detail::Rule::split_overlaps(std::vector<Rule>& rules, std::size_t i, std::size_t& e)
+{
+ using difference_type = std::vector<Rule>::iterator::difference_type;
+ auto j = i;
+ for (; i + 1 < e; ++i)
+ {
+ for (auto k = i + 1; k < e; ++k)
+ {
+ if (overlaps(rules[i], rules[k]))
+ {
+ split(rules, i, k, e);
+ std::sort(rules.begin() + static_cast<difference_type>(i),
+ rules.begin() + static_cast<difference_type>(e));
+ }
+ }
+ }
+ for (; j < e; ++j)
+ {
+ if (rules[j].starting_year() == rules[j].ending_year())
+ rules[j].starting_at_.canonicalize(rules[j].starting_year());
+ }
+}
+
+void
+detail::Rule::split_overlaps(std::vector<Rule>& rules)
+{
+ using difference_type = std::vector<Rule>::iterator::difference_type;
+ for (std::size_t i = 0; i < rules.size();)
+ {
+ auto e = static_cast<std::size_t>(std::upper_bound(
+ rules.cbegin()+static_cast<difference_type>(i), rules.cend(), rules[i].name(),
+ [](const std::string& nm, const Rule& x)
+ {
+ return nm < x.name();
+ }) - rules.cbegin());
+ split_overlaps(rules, i, e);
+ auto first_rule = rules.begin() + static_cast<difference_type>(i);
+ auto last_rule = rules.begin() + static_cast<difference_type>(e);
+ auto t = std::lower_bound(first_rule, last_rule, min_year);
+ if (t > first_rule+1)
+ {
+ if (t == last_rule || t->starting_year() >= min_year)
+ --t;
+ auto d = static_cast<std::size_t>(t - first_rule);
+ rules.erase(first_rule, t);
+ e -= d;
+ }
+ first_rule = rules.begin() + static_cast<difference_type>(i);
+ last_rule = rules.begin() + static_cast<difference_type>(e);
+ t = std::upper_bound(first_rule, last_rule, max_year);
+ if (t != last_rule)
+ {
+ auto d = static_cast<std::size_t>(last_rule - t);
+ rules.erase(t, last_rule);
+ e -= d;
+ }
+ i = e;
+ }
+ rules.shrink_to_fit();
+}
+
+// Find the rule that comes chronologically before Rule r. For multi-year rules,
+// y specifies which rules in r. For single year rules, y is assumed to be equal
+// to the year specified by r.
+// Returns a pointer to the chronologically previous rule, and the year within
+// that rule. If there is no previous rule, returns nullptr and year::min().
+// Preconditions:
+// r->starting_year() <= y && y <= r->ending_year()
+static
+std::pair<const Rule*, date::year>
+find_previous_rule(const Rule* r, date::year y)
+{
+ using namespace date;
+ auto const& rules = get_tzdb().rules;
+ if (y == r->starting_year())
+ {
+ if (r == &rules.front() || r->name() != r[-1].name())
+ std::terminate(); // never called with first rule
+ --r;
+ if (y == r->starting_year())
+ return {r, y};
+ return {r, r->ending_year()};
+ }
+ if (r == &rules.front() || r->name() != r[-1].name() ||
+ r[-1].starting_year() < r->starting_year())
+ {
+ while (r < &rules.back() && r->name() == r[1].name() &&
+ r->starting_year() == r[1].starting_year())
+ ++r;
+ return {r, --y};
+ }
+ --r;
+ return {r, y};
+}
+
+// Find the rule that comes chronologically after Rule r. For multi-year rules,
+// y specifies which rules in r. For single year rules, y is assumed to be equal
+// to the year specified by r.
+// Returns a pointer to the chronologically next rule, and the year within
+// that rule. If there is no next rule, return a pointer to a defaulted rule
+// and y+1.
+// Preconditions:
+// first <= r && r < last && r->starting_year() <= y && y <= r->ending_year()
+// [first, last) all have the same name
+static
+std::pair<const Rule*, date::year>
+find_next_rule(const Rule* first_rule, const Rule* last_rule, const Rule* r, date::year y)
+{
+ using namespace date;
+ if (y == r->ending_year())
+ {
+ if (r == last_rule-1)
+ return {nullptr, year::max()};
+ ++r;
+ if (y == r->ending_year())
+ return {r, y};
+ return {r, r->starting_year()};
+ }
+ if (r == last_rule-1 || r->ending_year() < r[1].ending_year())
+ {
+ while (r > first_rule && r->starting_year() == r[-1].starting_year())
+ --r;
+ return {r, ++y};
+ }
+ ++r;
+ return {r, y};
+}
+
+// Find the rule that comes chronologically after Rule r. For multi-year rules,
+// y specifies which rules in r. For single year rules, y is assumed to be equal
+// to the year specified by r.
+// Returns a pointer to the chronologically next rule, and the year within
+// that rule. If there is no next rule, return nullptr and year::max().
+// Preconditions:
+// r->starting_year() <= y && y <= r->ending_year()
+static
+std::pair<const Rule*, date::year>
+find_next_rule(const Rule* r, date::year y)
+{
+ using namespace date;
+ auto const& rules = get_tzdb().rules;
+ if (y == r->ending_year())
+ {
+ if (r == &rules.back() || r->name() != r[1].name())
+ return {nullptr, year::max()};
+ ++r;
+ if (y == r->ending_year())
+ return {r, y};
+ return {r, r->starting_year()};
+ }
+ if (r == &rules.back() || r->name() != r[1].name() ||
+ r->ending_year() < r[1].ending_year())
+ {
+ while (r > &rules.front() && r->name() == r[-1].name() &&
+ r->starting_year() == r[-1].starting_year())
+ --r;
+ return {r, ++y};
+ }
+ ++r;
+ return {r, y};
+}
+
+static
+const Rule*
+find_first_std_rule(const std::pair<const Rule*, const Rule*>& eqr)
+{
+ auto r = eqr.first;
+ auto ry = r->starting_year();
+ while (r->save() != std::chrono::minutes{0})
+ {
+ std::tie(r, ry) = find_next_rule(eqr.first, eqr.second, r, ry);
+ if (r == nullptr)
+ throw std::runtime_error("Could not find standard offset in rule "
+ + eqr.first->name());
+ }
+ return r;
+}
+
+static
+std::pair<const Rule*, date::year>
+find_rule_for_zone(const std::pair<const Rule*, const Rule*>& eqr,
+ const date::year& y, const std::chrono::seconds& offset,
+ const MonthDayTime& mdt)
+{
+ assert(eqr.first != nullptr);
+ assert(eqr.second != nullptr);
+
+ using namespace std::chrono;
+ using namespace date;
+ auto r = eqr.first;
+ auto ry = r->starting_year();
+ auto prev_save = minutes{0};
+ auto prev_year = year::min();
+ const Rule* prev_rule = nullptr;
+ while (r != nullptr)
+ {
+ if (mdt.compare(y, r->mdt(), ry, offset, prev_save) <= 0)
+ break;
+ prev_rule = r;
+ prev_year = ry;
+ prev_save = prev_rule->save();
+ std::tie(r, ry) = find_next_rule(eqr.first, eqr.second, r, ry);
+ }
+ return {prev_rule, prev_year};
+}
+
+static
+std::pair<const Rule*, date::year>
+find_rule_for_zone(const std::pair<const Rule*, const Rule*>& eqr,
+ const sys_seconds& tp_utc,
+ const local_seconds& tp_std,
+ const local_seconds& tp_loc)
+{
+ using namespace std::chrono;
+ using namespace date;
+ auto r = eqr.first;
+ auto ry = r->starting_year();
+ auto prev_save = minutes{0};
+ auto prev_year = year::min();
+ const Rule* prev_rule = nullptr;
+ while (r != nullptr)
+ {
+ bool found = false;
+ switch (r->mdt().zone())
+ {
+ case tz::utc:
+ found = tp_utc < r->mdt().to_time_point(ry);
+ break;
+ case tz::standard:
+ found = sys_seconds{tp_std.time_since_epoch()} < r->mdt().to_time_point(ry);
+ break;
+ case tz::local:
+ found = sys_seconds{tp_loc.time_since_epoch()} < r->mdt().to_time_point(ry);
+ break;
+ }
+ if (found)
+ break;
+ prev_rule = r;
+ prev_year = ry;
+ prev_save = prev_rule->save();
+ std::tie(r, ry) = find_next_rule(eqr.first, eqr.second, r, ry);
+ }
+ return {prev_rule, prev_year};
+}
+
+static
+sys_info
+find_rule(const std::pair<const Rule*, date::year>& first_rule,
+ const std::pair<const Rule*, date::year>& last_rule,
+ const date::year& y, const std::chrono::seconds& offset,
+ const MonthDayTime& mdt, const std::chrono::minutes& initial_save,
+ const std::string& initial_abbrev)
+{
+ using namespace std::chrono;
+ using namespace date;
+ auto r = first_rule.first;
+ auto ry = first_rule.second;
+ sys_info x{sys_days(year::min()/min_day), sys_days(year::max()/max_day),
+ seconds{0}, initial_save, initial_abbrev};
+ while (r != nullptr)
+ {
+ auto tr = r->mdt().to_sys(ry, offset, x.save);
+ auto tx = mdt.to_sys(y, offset, x.save);
+ // Find last rule where tx >= tr
+ if (tx <= tr || (r == last_rule.first && ry == last_rule.second))
+ {
+ if (tx < tr && r == first_rule.first && ry == first_rule.second)
+ {
+ x.end = r->mdt().to_sys(ry, offset, x.save);
+ break;
+ }
+ if (tx < tr)
+ {
+ std::tie(r, ry) = find_previous_rule(r, ry); // can't return nullptr for r
+ assert(r != nullptr);
+ }
+ // r != nullptr && tx >= tr (if tr were to be recomputed)
+ auto prev_save = initial_save;
+ if (!(r == first_rule.first && ry == first_rule.second))
+ prev_save = find_previous_rule(r, ry).first->save();
+ x.begin = r->mdt().to_sys(ry, offset, prev_save);
+ x.save = r->save();
+ x.abbrev = r->abbrev();
+ if (!(r == last_rule.first && ry == last_rule.second))
+ {
+ std::tie(r, ry) = find_next_rule(r, ry); // can't return nullptr for r
+ assert(r != nullptr);
+ x.end = r->mdt().to_sys(ry, offset, x.save);
+ }
+ else
+ x.end = sys_days(year::max()/max_day);
+ break;
+ }
+ x.save = r->save();
+ std::tie(r, ry) = find_next_rule(r, ry); // Can't return nullptr for r
+ assert(r != nullptr);
+ }
+ return x;
+}
+
+// zonelet
+
+detail::zonelet::~zonelet()
+{
+#if !defined(_MSC_VER) || (_MSC_VER >= 1900)
+ using minutes = std::chrono::minutes;
+ using string = std::string;
+ if (tag_ == has_save)
+ u.save_.~minutes();
+ else
+ u.rule_.~string();
+#endif
+}
+
+detail::zonelet::zonelet()
+{
+#if !defined(_MSC_VER) || (_MSC_VER >= 1900)
+ ::new(&u.rule_) std::string();
+#endif
+}
+
+detail::zonelet::zonelet(const zonelet& i)
+ : gmtoff_(i.gmtoff_)
+ , tag_(i.tag_)
+ , format_(i.format_)
+ , until_year_(i.until_year_)
+ , until_date_(i.until_date_)
+ , until_utc_(i.until_utc_)
+ , until_std_(i.until_std_)
+ , until_loc_(i.until_loc_)
+ , initial_save_(i.initial_save_)
+ , initial_abbrev_(i.initial_abbrev_)
+ , first_rule_(i.first_rule_)
+ , last_rule_(i.last_rule_)
+{
+#if !defined(_MSC_VER) || (_MSC_VER >= 1900)
+ if (tag_ == has_save)
+ ::new(&u.save_) std::chrono::minutes(i.u.save_);
+ else
+ ::new(&u.rule_) std::string(i.u.rule_);
+#else
+ if (tag_ == has_save)
+ u.save_ = i.u.save_;
+ else
+ u.rule_ = i.u.rule_;
+#endif
+}
+
+#endif // !USE_OS_TZDB
+
+// time_zone
+
+#if USE_OS_TZDB
+
+time_zone::time_zone(const std::string& s, detail::undocumented)
+ : name_(s)
+ , adjusted_(new std::once_flag{})
+{
+}
+
+enum class endian
+{
+ native = __BYTE_ORDER__,
+ little = __ORDER_LITTLE_ENDIAN__,
+ big = __ORDER_BIG_ENDIAN__
+};
+
+static
+inline
+std::uint32_t
+reverse_bytes(std::uint32_t i)
+{
+ return
+ (i & 0xff000000u) >> 24 |
+ (i & 0x00ff0000u) >> 8 |
+ (i & 0x0000ff00u) << 8 |
+ (i & 0x000000ffu) << 24;
+}
+
+static
+inline
+std::uint64_t
+reverse_bytes(std::uint64_t i)
+{
+ return
+ (i & 0xff00000000000000ull) >> 56 |
+ (i & 0x00ff000000000000ull) >> 40 |
+ (i & 0x0000ff0000000000ull) >> 24 |
+ (i & 0x000000ff00000000ull) >> 8 |
+ (i & 0x00000000ff000000ull) << 8 |
+ (i & 0x0000000000ff0000ull) << 24 |
+ (i & 0x000000000000ff00ull) << 40 |
+ (i & 0x00000000000000ffull) << 56;
+}
+
+template <class T>
+static
+inline
+void
+maybe_reverse_bytes(T&, std::false_type)
+{
+}
+
+static
+inline
+void
+maybe_reverse_bytes(std::int32_t& t, std::true_type)
+{
+ t = static_cast<std::int32_t>(reverse_bytes(static_cast<std::uint32_t>(t)));
+}
+
+static
+inline
+void
+maybe_reverse_bytes(std::int64_t& t, std::true_type)
+{
+ t = static_cast<std::int64_t>(reverse_bytes(static_cast<std::uint64_t>(t)));
+}
+
+template <class T>
+static
+inline
+void
+maybe_reverse_bytes(T& t)
+{
+ maybe_reverse_bytes(t, std::integral_constant<bool,
+ endian::native == endian::little>{});
+}
+
+static
+void
+load_header(std::istream& inf)
+{
+ // Read TZif
+ auto t = inf.get();
+ auto z = inf.get();
+ auto i = inf.get();
+ auto f = inf.get();
+#ifndef NDEBUG
+ assert(t == 'T');
+ assert(z == 'Z');
+ assert(i == 'i');
+ assert(f == 'f');
+#else
+ (void)t;
+ (void)z;
+ (void)i;
+ (void)f;
+#endif
+}
+
+static
+unsigned char
+load_version(std::istream& inf)
+{
+ // Read version
+ auto v = inf.get();
+ assert(v != EOF);
+ return static_cast<unsigned char>(v);
+}
+
+static
+void
+skip_reserve(std::istream& inf)
+{
+ inf.ignore(15);
+}
+
+static
+void
+load_counts(std::istream& inf,
+ std::int32_t& tzh_ttisgmtcnt, std::int32_t& tzh_ttisstdcnt,
+ std::int32_t& tzh_leapcnt, std::int32_t& tzh_timecnt,
+ std::int32_t& tzh_typecnt, std::int32_t& tzh_charcnt)
+{
+ // Read counts;
+ inf.read(reinterpret_cast<char*>(&tzh_ttisgmtcnt), 4);
+ maybe_reverse_bytes(tzh_ttisgmtcnt);
+ inf.read(reinterpret_cast<char*>(&tzh_ttisstdcnt), 4);
+ maybe_reverse_bytes(tzh_ttisstdcnt);
+ inf.read(reinterpret_cast<char*>(&tzh_leapcnt), 4);
+ maybe_reverse_bytes(tzh_leapcnt);
+ inf.read(reinterpret_cast<char*>(&tzh_timecnt), 4);
+ maybe_reverse_bytes(tzh_timecnt);
+ inf.read(reinterpret_cast<char*>(&tzh_typecnt), 4);
+ maybe_reverse_bytes(tzh_typecnt);
+ inf.read(reinterpret_cast<char*>(&tzh_charcnt), 4);
+ maybe_reverse_bytes(tzh_charcnt);
+}
+
+template <class TimeType>
+static
+std::vector<detail::transition>
+load_transitions(std::istream& inf, std::int32_t tzh_timecnt)
+{
+ // Read transitions
+ using namespace std::chrono;
+ std::vector<detail::transition> transitions;
+ transitions.reserve(static_cast<unsigned>(tzh_timecnt));
+ for (std::int32_t i = 0; i < tzh_timecnt; ++i)
+ {
+ TimeType t;
+ inf.read(reinterpret_cast<char*>(&t), sizeof(t));
+ maybe_reverse_bytes(t);
+ transitions.emplace_back(sys_seconds{seconds{t}});
+ if (transitions.back().timepoint < min_seconds)
+ transitions.back().timepoint = min_seconds;
+ }
+ return transitions;
+}
+
+static
+std::vector<std::uint8_t>
+load_indices(std::istream& inf, std::int32_t tzh_timecnt)
+{
+ // Read indices
+ std::vector<std::uint8_t> indices;
+ indices.reserve(static_cast<unsigned>(tzh_timecnt));
+ for (std::int32_t i = 0; i < tzh_timecnt; ++i)
+ {
+ std::uint8_t t;
+ inf.read(reinterpret_cast<char*>(&t), sizeof(t));
+ indices.emplace_back(t);
+ }
+ return indices;
+}
+
+static
+std::vector<ttinfo>
+load_ttinfo(std::istream& inf, std::int32_t tzh_typecnt)
+{
+ // Read ttinfo
+ std::vector<ttinfo> ttinfos;
+ ttinfos.reserve(static_cast<unsigned>(tzh_typecnt));
+ for (std::int32_t i = 0; i < tzh_typecnt; ++i)
+ {
+ ttinfo t;
+ inf.read(reinterpret_cast<char*>(&t), 6);
+ maybe_reverse_bytes(t.tt_gmtoff);
+ ttinfos.emplace_back(t);
+ }
+ return ttinfos;
+}
+
+static
+std::string
+load_abbreviations(std::istream& inf, std::int32_t tzh_charcnt)
+{
+ // Read abbreviations
+ std::string abbrev;
+ abbrev.resize(static_cast<unsigned>(tzh_charcnt), '\0');
+ inf.read(&abbrev[0], tzh_charcnt);
+ return abbrev;
+}
+
+#if !MISSING_LEAP_SECONDS
+
+template <class TimeType>
+static
+std::vector<leap_second>
+load_leaps(std::istream& inf, std::int32_t tzh_leapcnt)
+{
+ // Read tzh_leapcnt pairs
+ using namespace std::chrono;
+ std::vector<leap_second> leap_seconds;
+ leap_seconds.reserve(static_cast<std::size_t>(tzh_leapcnt));
+ for (std::int32_t i = 0; i < tzh_leapcnt; ++i)
+ {
+ TimeType t0;
+ std::int32_t t1;
+ inf.read(reinterpret_cast<char*>(&t0), sizeof(t0));
+ inf.read(reinterpret_cast<char*>(&t1), sizeof(t1));
+ maybe_reverse_bytes(t0);
+ maybe_reverse_bytes(t1);
+ leap_seconds.emplace_back(sys_seconds{seconds{t0 - (t1-1)}},
+ detail::undocumented{});
+ }
+ return leap_seconds;
+}
+
+template <class TimeType>
+static
+std::vector<leap_second>
+load_leap_data(std::istream& inf,
+ std::int32_t tzh_leapcnt, std::int32_t tzh_timecnt,
+ std::int32_t tzh_typecnt, std::int32_t tzh_charcnt)
+{
+ inf.ignore(tzh_timecnt*static_cast<std::int32_t>(sizeof(TimeType)) + tzh_timecnt +
+ tzh_typecnt*6 + tzh_charcnt);
+ return load_leaps<TimeType>(inf, tzh_leapcnt);
+}
+
+static
+std::vector<leap_second>
+load_just_leaps(std::istream& inf)
+{
+ // Read tzh_leapcnt pairs
+ using namespace std::chrono;
+ load_header(inf);
+ auto v = load_version(inf);
+ std::int32_t tzh_ttisgmtcnt, tzh_ttisstdcnt, tzh_leapcnt,
+ tzh_timecnt, tzh_typecnt, tzh_charcnt;
+ skip_reserve(inf);
+ load_counts(inf, tzh_ttisgmtcnt, tzh_ttisstdcnt, tzh_leapcnt,
+ tzh_timecnt, tzh_typecnt, tzh_charcnt);
+ if (v == 0)
+ return load_leap_data<int32_t>(inf, tzh_leapcnt, tzh_timecnt, tzh_typecnt,
+ tzh_charcnt);
+#if !defined(NDEBUG)
+ inf.ignore((4+1)*tzh_timecnt + 6*tzh_typecnt + tzh_charcnt + 8*tzh_leapcnt +
+ tzh_ttisstdcnt + tzh_ttisgmtcnt);
+ load_header(inf);
+ auto v2 = load_version(inf);
+ assert(v == v2);
+ skip_reserve(inf);
+#else // defined(NDEBUG)
+ inf.ignore((4+1)*tzh_timecnt + 6*tzh_typecnt + tzh_charcnt + 8*tzh_leapcnt +
+ tzh_ttisstdcnt + tzh_ttisgmtcnt + (4+1+15));
+#endif // defined(NDEBUG)
+ load_counts(inf, tzh_ttisgmtcnt, tzh_ttisstdcnt, tzh_leapcnt,
+ tzh_timecnt, tzh_typecnt, tzh_charcnt);
+ return load_leap_data<int64_t>(inf, tzh_leapcnt, tzh_timecnt, tzh_typecnt,
+ tzh_charcnt);
+}
+
+#endif // !MISSING_LEAP_SECONDS
+
+template <class TimeType>
+void
+time_zone::load_data(std::istream& inf,
+ std::int32_t tzh_leapcnt, std::int32_t tzh_timecnt,
+ std::int32_t tzh_typecnt, std::int32_t tzh_charcnt)
+{
+ using namespace std::chrono;
+ transitions_ = load_transitions<TimeType>(inf, tzh_timecnt);
+ auto indices = load_indices(inf, tzh_timecnt);
+ auto infos = load_ttinfo(inf, tzh_typecnt);
+ auto abbrev = load_abbreviations(inf, tzh_charcnt);
+#if !MISSING_LEAP_SECONDS
+ auto& leap_seconds = get_tzdb_list().front().leap_seconds;
+ if (leap_seconds.empty() && tzh_leapcnt > 0)
+ leap_seconds = load_leaps<TimeType>(inf, tzh_leapcnt);
+#endif
+ ttinfos_.reserve(infos.size());
+ for (auto& info : infos)
+ {
+ ttinfos_.push_back({seconds{info.tt_gmtoff},
+ abbrev.c_str() + info.tt_abbrind,
+ info.tt_isdst != 0});
+ }
+ auto i = 0u;
+ if (transitions_.empty() || transitions_.front().timepoint != min_seconds)
+ {
+ transitions_.emplace(transitions_.begin(), min_seconds);
+ auto tf = std::find_if(ttinfos_.begin(), ttinfos_.end(),
+ [](const expanded_ttinfo& ti)
+ {return ti.is_dst == 0;});
+ if (tf == ttinfos_.end())
+ tf = ttinfos_.begin();
+ transitions_[i].info = &*tf;
+ ++i;
+ }
+ for (auto j = 0u; i < transitions_.size(); ++i, ++j)
+ transitions_[i].info = ttinfos_.data() + indices[j];
+}
+
+void
+time_zone::init_impl()
+{
+ using namespace std;
+ using namespace std::chrono;
+ auto name = get_tz_dir() + ('/' + name_);
+ std::ifstream inf(name);
+ if (!inf.is_open())
+ throw std::runtime_error{"Unable to open " + name};
+ inf.exceptions(std::ios::failbit | std::ios::badbit);
+ load_header(inf);
+ auto v = load_version(inf);
+ std::int32_t tzh_ttisgmtcnt, tzh_ttisstdcnt, tzh_leapcnt,
+ tzh_timecnt, tzh_typecnt, tzh_charcnt;
+ skip_reserve(inf);
+ load_counts(inf, tzh_ttisgmtcnt, tzh_ttisstdcnt, tzh_leapcnt,
+ tzh_timecnt, tzh_typecnt, tzh_charcnt);
+ if (v == 0)
+ {
+ load_data<int32_t>(inf, tzh_leapcnt, tzh_timecnt, tzh_typecnt, tzh_charcnt);
+ }
+ else
+ {
+#if !defined(NDEBUG)
+ inf.ignore((4+1)*tzh_timecnt + 6*tzh_typecnt + tzh_charcnt + 8*tzh_leapcnt +
+ tzh_ttisstdcnt + tzh_ttisgmtcnt);
+ load_header(inf);
+ auto v2 = load_version(inf);
+ assert(v == v2);
+ skip_reserve(inf);
+#else // defined(NDEBUG)
+ inf.ignore((4+1)*tzh_timecnt + 6*tzh_typecnt + tzh_charcnt + 8*tzh_leapcnt +
+ tzh_ttisstdcnt + tzh_ttisgmtcnt + (4+1+15));
+#endif // defined(NDEBUG)
+ load_counts(inf, tzh_ttisgmtcnt, tzh_ttisstdcnt, tzh_leapcnt,
+ tzh_timecnt, tzh_typecnt, tzh_charcnt);
+ load_data<int64_t>(inf, tzh_leapcnt, tzh_timecnt, tzh_typecnt, tzh_charcnt);
+ }
+#if !MISSING_LEAP_SECONDS
+ if (tzh_leapcnt > 0)
+ {
+ auto& leap_seconds = get_tzdb_list().front().leap_seconds;
+ auto itr = leap_seconds.begin();
+ auto l = itr->date();
+ seconds leap_count{0};
+ for (auto t = std::upper_bound(transitions_.begin(), transitions_.end(), l,
+ [](const sys_seconds& x, const transition& ct)
+ {
+ return x < ct.timepoint;
+ });
+ t != transitions_.end(); ++t)
+ {
+ while (t->timepoint >= l)
+ {
+ ++leap_count;
+ if (++itr == leap_seconds.end())
+ l = sys_days(max_year/max_day);
+ else
+ l = itr->date() + leap_count;
+ }
+ t->timepoint -= leap_count;
+ }
+ }
+#endif // !MISSING_LEAP_SECONDS
+ auto b = transitions_.begin();
+ auto i = transitions_.end();
+ if (i != b)
+ {
+ for (--i; i != b; --i)
+ {
+ if (i->info->offset == i[-1].info->offset &&
+ i->info->abbrev == i[-1].info->abbrev &&
+ i->info->is_dst == i[-1].info->is_dst)
+ i = transitions_.erase(i);
+ }
+ }
+}
+
+void
+time_zone::init() const
+{
+ std::call_once(*adjusted_, [this]() {const_cast<time_zone*>(this)->init_impl();});
+}
+
+sys_info
+time_zone::load_sys_info(std::vector<detail::transition>::const_iterator i) const
+{
+ using namespace std::chrono;
+ assert(!transitions_.empty());
+ sys_info r;
+ if (i != transitions_.begin())
+ {
+ r.begin = i[-1].timepoint;
+ r.end = i != transitions_.end() ? i->timepoint :
+ sys_seconds(sys_days(year::max()/max_day));
+ r.offset = i[-1].info->offset;
+ r.save = i[-1].info->is_dst ? minutes{1} : minutes{0};
+ r.abbrev = i[-1].info->abbrev;
+ }
+ else
+ {
+ r.begin = sys_days(year::min()/min_day);
+ r.end = i+1 != transitions_.end() ? i[1].timepoint :
+ sys_seconds(sys_days(year::max()/max_day));
+ r.offset = i[0].info->offset;
+ r.save = i[0].info->is_dst ? minutes{1} : minutes{0};
+ r.abbrev = i[0].info->abbrev;
+ }
+ return r;
+}
+
+sys_info
+time_zone::get_info_impl(sys_seconds tp) const
+{
+ using namespace std;
+ init();
+ return load_sys_info(upper_bound(transitions_.begin(), transitions_.end(), tp,
+ [](const sys_seconds& x, const transition& t)
+ {
+ return x < t.timepoint;
+ }));
+}
+
+local_info
+time_zone::get_info_impl(local_seconds tp) const
+{
+ using namespace std::chrono;
+ init();
+ local_info i;
+ i.result = local_info::unique;
+ auto tr = upper_bound(transitions_.begin(), transitions_.end(), tp,
+ [](const local_seconds& x, const transition& t)
+ {
+ return sys_seconds{x.time_since_epoch()} -
+ t.info->offset < t.timepoint;
+ });
+ i.first = load_sys_info(tr);
+ auto tps = sys_seconds{(tp - i.first.offset).time_since_epoch()};
+ if (tps < i.first.begin + days{1} && tr != transitions_.begin())
+ {
+ i.second = load_sys_info(--tr);
+ tps = sys_seconds{(tp - i.second.offset).time_since_epoch()};
+ if (tps < i.second.end && i.first.end != i.second.end)
+ {
+ i.result = local_info::ambiguous;
+ std::swap(i.first, i.second);
+ }
+ else
+ {
+ i.second = {};
+ }
+ }
+ else if (tps >= i.first.end && tr != transitions_.end())
+ {
+ i.second = load_sys_info(++tr);
+ tps = sys_seconds{(tp - i.second.offset).time_since_epoch()};
+ if (tps < i.second.begin)
+ i.result = local_info::nonexistent;
+ else
+ i.second = {};
+ }
+ return i;
+}
+
+std::ostream&
+operator<<(std::ostream& os, const time_zone& z)
+{
+ using namespace std::chrono;
+ z.init();
+ os << z.name_ << '\n';
+ os << "Initially: ";
+ auto const& t = z.transitions_.front();
+ if (t.info->offset >= seconds{0})
+ os << '+';
+ os << make_time(t.info->offset);
+ if (t.info->is_dst > 0)
+ os << " daylight ";
+ else
+ os << " standard ";
+ os << t.info->abbrev << '\n';
+ for (auto i = std::next(z.transitions_.cbegin()); i < z.transitions_.cend(); ++i)
+ os << *i << '\n';
+ return os;
+}
+
+leap_second::leap_second(const sys_seconds& s, detail::undocumented)
+ : date_(s)
+{
+}
+
+#else // !USE_OS_TZDB
+
+time_zone::time_zone(const std::string& s, detail::undocumented)
+ : adjusted_(new std::once_flag{})
+{
+ try
+ {
+ using namespace date;
+ std::istringstream in(s);
+ in.exceptions(std::ios::failbit | std::ios::badbit);
+ std::string word;
+ in >> word >> name_;
+ parse_info(in);
+ }
+ catch (...)
+ {
+ std::cerr << s << '\n';
+ std::cerr << *this << '\n';
+ zonelets_.pop_back();
+ throw;
+ }
+}
+
+sys_info
+time_zone::get_info_impl(sys_seconds tp) const
+{
+ return get_info_impl(tp, static_cast<int>(tz::utc));
+}
+
+local_info
+time_zone::get_info_impl(local_seconds tp) const
+{
+ using namespace std::chrono;
+ local_info i{};
+ i.first = get_info_impl(sys_seconds{tp.time_since_epoch()}, static_cast<int>(tz::local));
+ auto tps = sys_seconds{(tp - i.first.offset).time_since_epoch()};
+ if (tps < i.first.begin)
+ {
+ i.second = std::move(i.first);
+ i.first = get_info_impl(i.second.begin - seconds{1}, static_cast<int>(tz::utc));
+ i.result = local_info::nonexistent;
+ }
+ else if (i.first.end - tps <= days{1})
+ {
+ i.second = get_info_impl(i.first.end, static_cast<int>(tz::utc));
+ tps = sys_seconds{(tp - i.second.offset).time_since_epoch()};
+ if (tps >= i.second.begin)
+ i.result = local_info::ambiguous;
+ else
+ i.second = {};
+ }
+ return i;
+}
+
+void
+time_zone::add(const std::string& s)
+{
+ try
+ {
+ std::istringstream in(s);
+ in.exceptions(std::ios::failbit | std::ios::badbit);
+ ws(in);
+ if (!in.eof() && in.peek() != '#')
+ parse_info(in);
+ }
+ catch (...)
+ {
+ std::cerr << s << '\n';
+ std::cerr << *this << '\n';
+ zonelets_.pop_back();
+ throw;
+ }
+}
+
+void
+time_zone::parse_info(std::istream& in)
+{
+ using namespace date;
+ using namespace std::chrono;
+ zonelets_.emplace_back();
+ auto& zonelet = zonelets_.back();
+ zonelet.gmtoff_ = parse_signed_time(in);
+ in >> zonelet.u.rule_;
+ if (zonelet.u.rule_ == "-")
+ zonelet.u.rule_.clear();
+ in >> zonelet.format_;
+ if (!in.eof())
+ ws(in);
+ if (in.eof() || in.peek() == '#')
+ {
+ zonelet.until_year_ = year::max();
+ zonelet.until_date_ = MonthDayTime(max_day, tz::utc);
+ }
+ else
+ {
+ int y;
+ in >> y;
+ zonelet.until_year_ = year{y};
+ in >> zonelet.until_date_;
+ zonelet.until_date_.canonicalize(zonelet.until_year_);
+ }
+ if ((zonelet.until_year_ < min_year) ||
+ (zonelets_.size() > 1 && zonelets_.end()[-2].until_year_ > max_year))
+ zonelets_.pop_back();
+}
+
+void
+time_zone::adjust_infos(const std::vector<Rule>& rules)
+{
+ using namespace std::chrono;
+ using namespace date;
+ const zonelet* prev_zonelet = nullptr;
+ for (auto& z : zonelets_)
+ {
+ std::pair<const Rule*, const Rule*> eqr{};
+ std::istringstream in;
+ in.exceptions(std::ios::failbit | std::ios::badbit);
+ // Classify info as rule-based, has save, or neither
+ if (!z.u.rule_.empty())
+ {
+ // Find out if this zonelet has a rule or a save
+ eqr = std::equal_range(rules.data(), rules.data() + rules.size(), z.u.rule_);
+ if (eqr.first == eqr.second)
+ {
+ // The rule doesn't exist. Assume this is a save
+ try
+ {
+ using namespace std::chrono;
+ using string = std::string;
+ in.str(z.u.rule_);
+ auto tmp = duration_cast<minutes>(parse_signed_time(in));
+#if !defined(_MSC_VER) || (_MSC_VER >= 1900)
+ z.u.rule_.~string();
+ z.tag_ = zonelet::has_save;
+ ::new(&z.u.save_) minutes(tmp);
+#else
+ z.u.rule_.clear();
+ z.tag_ = zonelet::has_save;
+ z.u.save_ = tmp;
+#endif
+ }
+ catch (...)
+ {
+ std::cerr << name_ << " : " << z.u.rule_ << '\n';
+ throw;
+ }
+ }
+ }
+ else
+ {
+ // This zone::zonelet has no rule and no save
+ z.tag_ = zonelet::is_empty;
+ }
+
+ minutes final_save{0};
+ if (z.tag_ == zonelet::has_save)
+ {
+ final_save = z.u.save_;
+ }
+ else if (z.tag_ == zonelet::has_rule)
+ {
+ z.last_rule_ = find_rule_for_zone(eqr, z.until_year_, z.gmtoff_,
+ z.until_date_);
+ if (z.last_rule_.first != nullptr)
+ final_save = z.last_rule_.first->save();
+ }
+ z.until_utc_ = z.until_date_.to_sys(z.until_year_, z.gmtoff_, final_save);
+ z.until_std_ = local_seconds{z.until_utc_.time_since_epoch()} + z.gmtoff_;
+ z.until_loc_ = z.until_std_ + final_save;
+
+ if (z.tag_ == zonelet::has_rule)
+ {
+ if (prev_zonelet != nullptr)
+ {
+ z.first_rule_ = find_rule_for_zone(eqr, prev_zonelet->until_utc_,
+ prev_zonelet->until_std_,
+ prev_zonelet->until_loc_);
+ if (z.first_rule_.first != nullptr)
+ {
+ z.initial_save_ = z.first_rule_.first->save();
+ z.initial_abbrev_ = z.first_rule_.first->abbrev();
+ if (z.first_rule_ != z.last_rule_)
+ {
+ z.first_rule_ = find_next_rule(eqr.first, eqr.second,
+ z.first_rule_.first,
+ z.first_rule_.second);
+ }
+ else
+ {
+ z.first_rule_ = std::make_pair(nullptr, year::min());
+ z.last_rule_ = std::make_pair(nullptr, year::max());
+ }
+ }
+ }
+ if (z.first_rule_.first == nullptr && z.last_rule_.first != nullptr)
+ {
+ z.first_rule_ = std::make_pair(eqr.first, eqr.first->starting_year());
+ z.initial_abbrev_ = find_first_std_rule(eqr)->abbrev();
+ }
+ }
+
+#ifndef NDEBUG
+ if (z.first_rule_.first == nullptr)
+ {
+ assert(z.first_rule_.second == year::min());
+ assert(z.last_rule_.first == nullptr);
+ assert(z.last_rule_.second == year::max());
+ }
+ else
+ {
+ assert(z.last_rule_.first != nullptr);
+ }
+#endif
+ prev_zonelet = &z;
+ }
+}
+
+static
+std::string
+format_abbrev(std::string format, const std::string& variable, std::chrono::seconds off,
+ std::chrono::minutes save)
+{
+ using namespace std::chrono;
+ auto k = format.find("%s");
+ if (k != std::string::npos)
+ {
+ format.replace(k, 2, variable);
+ }
+ else
+ {
+ k = format.find('/');
+ if (k != std::string::npos)
+ {
+ if (save == minutes{0})
+ format.erase(k);
+ else
+ format.erase(0, k+1);
+ }
+ else
+ {
+ k = format.find("%z");
+ if (k != std::string::npos)
+ {
+ std::string temp;
+ if (off < seconds{0})
+ {
+ temp = '-';
+ off = -off;
+ }
+ else
+ temp = '+';
+ auto h = date::floor<hours>(off);
+ off -= h;
+ if (h < hours{10})
+ temp += '0';
+ temp += std::to_string(h.count());
+ if (off > seconds{0})
+ {
+ auto m = date::floor<minutes>(off);
+ off -= m;
+ if (m < minutes{10})
+ temp += '0';
+ temp += std::to_string(m.count());
+ if (off > seconds{0})
+ {
+ if (off < seconds{10})
+ temp += '0';
+ temp += std::to_string(off.count());
+ }
+ }
+ format.replace(k, 2, temp);
+ }
+ }
+ }
+ return format;
+}
+
+sys_info
+time_zone::get_info_impl(sys_seconds tp, int tz_int) const
+{
+ using namespace std::chrono;
+ using namespace date;
+ tz timezone = static_cast<tz>(tz_int);
+ assert(timezone != tz::standard);
+ auto y = year_month_day(floor<days>(tp)).year();
+ if (y < min_year || y > max_year)
+ throw std::runtime_error("The year " + std::to_string(static_cast<int>(y)) +
+ " is out of range:[" + std::to_string(static_cast<int>(min_year)) + ", "
+ + std::to_string(static_cast<int>(max_year)) + "]");
+ std::call_once(*adjusted_,
+ [this]()
+ {
+ const_cast<time_zone*>(this)->adjust_infos(get_tzdb().rules);
+ });
+ auto i = std::upper_bound(zonelets_.begin(), zonelets_.end(), tp,
+ [timezone](sys_seconds t, const zonelet& zl)
+ {
+ return timezone == tz::utc ? t < zl.until_utc_ :
+ t < sys_seconds{zl.until_loc_.time_since_epoch()};
+ });
+
+ sys_info r{};
+ if (i != zonelets_.end())
+ {
+ if (i->tag_ == zonelet::has_save)
+ {
+ if (i != zonelets_.begin())
+ r.begin = i[-1].until_utc_;
+ else
+ r.begin = sys_days(year::min()/min_day);
+ r.end = i->until_utc_;
+ r.offset = i->gmtoff_ + i->u.save_;
+ r.save = i->u.save_;
+ }
+ else if (i->u.rule_.empty())
+ {
+ if (i != zonelets_.begin())
+ r.begin = i[-1].until_utc_;
+ else
+ r.begin = sys_days(year::min()/min_day);
+ r.end = i->until_utc_;
+ r.offset = i->gmtoff_;
+ }
+ else
+ {
+ r = find_rule(i->first_rule_, i->last_rule_, y, i->gmtoff_,
+ MonthDayTime(local_seconds{tp.time_since_epoch()}, timezone),
+ i->initial_save_, i->initial_abbrev_);
+ r.offset = i->gmtoff_ + r.save;
+ if (i != zonelets_.begin() && r.begin < i[-1].until_utc_)
+ r.begin = i[-1].until_utc_;
+ if (r.end > i->until_utc_)
+ r.end = i->until_utc_;
+ }
+ r.abbrev = format_abbrev(i->format_, r.abbrev, r.offset, r.save);
+ assert(r.begin < r.end);
+ }
+ return r;
+}
+
+std::ostream&
+operator<<(std::ostream& os, const time_zone& z)
+{
+ using namespace date;
+ using namespace std::chrono;
+ detail::save_ostream<char> _(os);
+ os.fill(' ');
+ os.flags(std::ios::dec | std::ios::left);
+ std::call_once(*z.adjusted_,
+ [&z]()
+ {
+ const_cast<time_zone&>(z).adjust_infos(get_tzdb().rules);
+ });
+ os.width(35);
+ os << z.name_;
+ std::string indent;
+ for (auto const& s : z.zonelets_)
+ {
+ os << indent;
+ if (s.gmtoff_ >= seconds{0})
+ os << ' ';
+ os << make_time(s.gmtoff_) << " ";
+ os.width(15);
+ if (s.tag_ != zonelet::has_save)
+ os << s.u.rule_;
+ else
+ {
+ std::ostringstream tmp;
+ tmp << make_time(s.u.save_);
+ os << tmp.str();
+ }
+ os.width(8);
+ os << s.format_ << " ";
+ os << s.until_year_ << ' ' << s.until_date_;
+ os << " " << s.until_utc_ << " UTC";
+ os << " " << s.until_std_ << " STD";
+ os << " " << s.until_loc_;
+ os << " " << make_time(s.initial_save_);
+ os << " " << s.initial_abbrev_;
+ if (s.first_rule_.first != nullptr)
+ os << " {" << *s.first_rule_.first << ", " << s.first_rule_.second << '}';
+ else
+ os << " {" << "nullptr" << ", " << s.first_rule_.second << '}';
+ if (s.last_rule_.first != nullptr)
+ os << " {" << *s.last_rule_.first << ", " << s.last_rule_.second << '}';
+ else
+ os << " {" << "nullptr" << ", " << s.last_rule_.second << '}';
+ os << '\n';
+ if (indent.empty())
+ indent = std::string(35, ' ');
+ }
+ return os;
+}
+
+#endif // !USE_OS_TZDB
+
+std::ostream&
+operator<<(std::ostream& os, const leap_second& x)
+{
+ using namespace date;
+ return os << x.date_ << " +";
+}
+
+#if USE_OS_TZDB
+
+static
+std::string
+get_version()
+{
+ using namespace std;
+ auto path = get_tz_dir() + string("/+VERSION");
+ ifstream in{path};
+ string version;
+ if (in)
+ {
+ in >> version;
+ return version;
+ }
+ in.clear();
+ in.open(get_tz_dir() + std::string(1, folder_delimiter) + "version");
+ if (in)
+ {
+ in >> version;
+ return version;
+ }
+ return "unknown";
+}
+
+static
+std::vector<leap_second>
+find_read_and_leap_seconds()
+{
+ std::ifstream in(get_tz_dir() + std::string(1, folder_delimiter) + "leapseconds",
+ std::ios_base::binary);
+ if (in)
+ {
+ std::vector<leap_second> leap_seconds;
+ std::string line;
+ while (in)
+ {
+ std::getline(in, line);
+ if (!line.empty() && line[0] != '#')
+ {
+ std::istringstream in(line);
+ in.exceptions(std::ios::failbit | std::ios::badbit);
+ std::string word;
+ in >> word;
+ if (word == "Leap")
+ {
+ int y, m, d;
+ in >> y;
+ m = static_cast<int>(parse_month(in));
+ in >> d;
+ leap_seconds.push_back(leap_second(sys_days{year{y}/m/d} + days{1},
+ detail::undocumented{}));
+ }
+ else
+ {
+ std::cerr << line << '\n';
+ }
+ }
+ }
+ return leap_seconds;
+ }
+ in.clear();
+ in.open(get_tz_dir() + std::string(1, folder_delimiter) + "leap-seconds.list",
+ std::ios_base::binary);
+ if (in)
+ {
+ std::vector<leap_second> leap_seconds;
+ std::string line;
+ const auto offset = sys_days{1970_y/1/1}-sys_days{1900_y/1/1};
+ while (in)
+ {
+ std::getline(in, line);
+ if (!line.empty() && line[0] != '#')
+ {
+ std::istringstream in(line);
+ in.exceptions(std::ios::failbit | std::ios::badbit);
+ using seconds = std::chrono::seconds;
+ seconds::rep s;
+ in >> s;
+ if (s == 2272060800)
+ continue;
+ leap_seconds.push_back(leap_second(sys_seconds{seconds{s}} - offset,
+ detail::undocumented{}));
+ }
+ }
+ return leap_seconds;
+ }
+ in.clear();
+ in.open(get_tz_dir() + std::string(1, folder_delimiter) + "right/UTC",
+ std::ios_base::binary);
+ if (in)
+ {
+ return load_just_leaps(in);
+ }
+ in.clear();
+ in.open(get_tz_dir() + std::string(1, folder_delimiter) + "UTC",
+ std::ios_base::binary);
+ if (in)
+ {
+ return load_just_leaps(in);
+ }
+ return {};
+}
+
+static
+std::unique_ptr<tzdb>
+init_tzdb()
+{
+ std::unique_ptr<tzdb> db(new tzdb);
+
+ //Iterate through folders
+ std::queue<std::string> subfolders;
+ subfolders.emplace(get_tz_dir());
+ struct dirent* d;
+ struct stat s;
+ while (!subfolders.empty())
+ {
+ auto dirname = std::move(subfolders.front());
+ subfolders.pop();
+ auto dir = opendir(dirname.c_str());
+ if (!dir)
+ continue;
+ while ((d = readdir(dir)) != nullptr)
+ {
+ // Ignore these files:
+ if (d->d_name[0] == '.' || // curdir, prevdir, hidden
+ memcmp(d->d_name, "posix", 5) == 0 || // starts with posix
+ strcmp(d->d_name, "Factory") == 0 ||
+ strcmp(d->d_name, "iso3166.tab") == 0 ||
+ strcmp(d->d_name, "right") == 0 ||
+ strcmp(d->d_name, "+VERSION") == 0 ||
+ strcmp(d->d_name, "version") == 0 ||
+ strcmp(d->d_name, "zone.tab") == 0 ||
+ strcmp(d->d_name, "zone1970.tab") == 0 ||
+ strcmp(d->d_name, "tzdata.zi") == 0 ||
+ strcmp(d->d_name, "leapseconds") == 0 ||
+ strcmp(d->d_name, "leap-seconds.list") == 0 )
+ continue;
+ auto subname = dirname + folder_delimiter + d->d_name;
+ if(stat(subname.c_str(), &s) == 0)
+ {
+ if(S_ISDIR(s.st_mode))
+ {
+ if(!S_ISLNK(s.st_mode))
+ {
+ subfolders.push(subname);
+ }
+ }
+ else
+ {
+ db->zones.emplace_back(subname.substr(get_tz_dir().size()+1),
+ detail::undocumented{});
+ }
+ }
+ }
+ closedir(dir);
+ }
+ db->zones.shrink_to_fit();
+ std::sort(db->zones.begin(), db->zones.end());
+ db->leap_seconds = find_read_and_leap_seconds();
+ db->version = get_version();
+ return db;
+}
+
+#else // !USE_OS_TZDB
+
+// time_zone_link
+
+time_zone_link::time_zone_link(const std::string& s)
+{
+ using namespace date;
+ std::istringstream in(s);
+ in.exceptions(std::ios::failbit | std::ios::badbit);
+ std::string word;
+ in >> word >> target_ >> name_;
+}
+
+std::ostream&
+operator<<(std::ostream& os, const time_zone_link& x)
+{
+ using namespace date;
+ detail::save_ostream<char> _(os);
+ os.fill(' ');
+ os.flags(std::ios::dec | std::ios::left);
+ os.width(35);
+ return os << x.name_ << " --> " << x.target_;
+}
+
+// leap_second
+
+leap_second::leap_second(const std::string& s, detail::undocumented)
+{
+ using namespace date;
+ std::istringstream in(s);
+ in.exceptions(std::ios::failbit | std::ios::badbit);
+ std::string word;
+ int y;
+ MonthDayTime date;
+ in >> word >> y >> date;
+ date_ = date.to_time_point(year(y));
+}
+
+static
+bool
+file_exists(const std::string& filename)
+{
+#ifdef _WIN32
+ return ::_access(filename.c_str(), 0) == 0;
+#else
+ return ::access(filename.c_str(), F_OK) == 0;
+#endif
+}
+
+#if HAS_REMOTE_API
+
+// CURL tools
+
+namespace
+{
+
+struct curl_global_init_and_cleanup
+{
+ ~curl_global_init_and_cleanup()
+ {
+ ::curl_global_cleanup();
+ }
+ curl_global_init_and_cleanup()
+ {
+ if (::curl_global_init(CURL_GLOBAL_DEFAULT) != 0)
+ throw std::runtime_error("CURL global initialization failed");
+ }
+ curl_global_init_and_cleanup(curl_global_init_and_cleanup const&) = delete;
+ curl_global_init_and_cleanup& operator=(curl_global_init_and_cleanup const&) = delete;
+};
+
+struct curl_deleter
+{
+ void operator()(CURL* p) const
+ {
+ ::curl_easy_cleanup(p);
+ }
+};
+
+} // unnamed namespace
+
+static
+std::unique_ptr<CURL, curl_deleter>
+curl_init()
+{
+ static const curl_global_init_and_cleanup _{};
+ return std::unique_ptr<CURL, curl_deleter>{::curl_easy_init()};
+}
+
+static
+bool
+download_to_string(const std::string& url, std::string& str)
+{
+ str.clear();
+ auto curl = curl_init();
+ if (!curl)
+ return false;
+ std::string version;
+ curl_easy_setopt(curl.get(), CURLOPT_USERAGENT, "curl");
+ curl_easy_setopt(curl.get(), CURLOPT_URL, url.c_str());
+ curl_write_callback write_cb = [](char* contents, std::size_t size, std::size_t nmemb,
+ void* userp) -> std::size_t
+ {
+ auto& userstr = *static_cast<std::string*>(userp);
+ auto realsize = size * nmemb;
+ userstr.append(contents, realsize);
+ return realsize;
+ };
+ curl_easy_setopt(curl.get(), CURLOPT_WRITEFUNCTION, write_cb);
+ curl_easy_setopt(curl.get(), CURLOPT_WRITEDATA, &str);
+ curl_easy_setopt(curl.get(), CURLOPT_SSL_VERIFYPEER, false);
+ auto res = curl_easy_perform(curl.get());
+ return (res == CURLE_OK);
+}
+
+namespace
+{
+ enum class download_file_options { binary, text };
+}
+
+static
+bool
+download_to_file(const std::string& url, const std::string& local_filename,
+ download_file_options opts, char* error_buffer)
+{
+ auto curl = curl_init();
+ if (!curl)
+ return false;
+ curl_easy_setopt(curl.get(), CURLOPT_URL, url.c_str());
+ curl_easy_setopt(curl.get(), CURLOPT_SSL_VERIFYPEER, false);
+ if (error_buffer)
+ curl_easy_setopt(curl.get(), CURLOPT_ERRORBUFFER, error_buffer);
+ curl_write_callback write_cb = [](char* contents, std::size_t size, std::size_t nmemb,
+ void* userp) -> std::size_t
+ {
+ auto& of = *static_cast<std::ofstream*>(userp);
+ auto realsize = size * nmemb;
+ of.write(contents, static_cast<std::streamsize>(realsize));
+ return realsize;
+ };
+ curl_easy_setopt(curl.get(), CURLOPT_WRITEFUNCTION, write_cb);
+ decltype(curl_easy_perform(curl.get())) res;
+ {
+ std::ofstream of(local_filename,
+ opts == download_file_options::binary ?
+ std::ofstream::out | std::ofstream::binary :
+ std::ofstream::out);
+ of.exceptions(std::ios::badbit);
+ curl_easy_setopt(curl.get(), CURLOPT_WRITEDATA, &of);
+ res = curl_easy_perform(curl.get());
+ }
+ return res == CURLE_OK;
+}
+
+std::string
+remote_version()
+{
+ std::string version;
+ std::string str;
+ if (download_to_string("https://www.iana.org/time-zones", str))
+ {
+ CONSTDATA char db[] = "/time-zones/releases/tzdata";
+ CONSTDATA auto db_size = sizeof(db) - 1;
+ auto p = str.find(db, 0, db_size);
+ const int ver_str_len = 5;
+ if (p != std::string::npos && p + (db_size + ver_str_len) <= str.size())
+ version = str.substr(p + db_size, ver_str_len);
+ }
+ return version;
+}
+
+
+// TODO! Using system() create a process and a console window.
+// This is useful to see what errors may occur but is slow and distracting.
+// Consider implementing this functionality more directly, such as
+// using _mkdir and CreateProcess etc.
+// But use the current means now as matches Unix implementations and while
+// in proof of concept / testing phase.
+// TODO! Use <filesystem> eventually.
+static
+bool
+remove_folder_and_subfolders(const std::string& folder)
+{
+# ifdef _WIN32
+# if USE_SHELL_API
+ // Delete the folder contents by deleting the folder.
+ std::string cmd = "rd /s /q \"";
+ cmd += folder;
+ cmd += '\"';
+ return std::system(cmd.c_str()) == EXIT_SUCCESS;
+# else // !USE_SHELL_API
+ // Create a buffer containing the path to delete. It must be terminated
+ // by two nuls. Who designs these API's...
+ std::vector<char> from;
+ from.assign(folder.begin(), folder.end());
+ from.push_back('\0');
+ from.push_back('\0');
+ SHFILEOPSTRUCT fo{}; // Zero initialize.
+ fo.wFunc = FO_DELETE;
+ fo.pFrom = from.data();
+ fo.fFlags = FOF_NO_UI;
+ int ret = SHFileOperation(&fo);
+ if (ret == 0 && !fo.fAnyOperationsAborted)
+ return true;
+ return false;
+# endif // !USE_SHELL_API
+# else // !_WIN32
+# if USE_SHELL_API
+ return std::system(("rm -R " + folder).c_str()) == EXIT_SUCCESS;
+# else // !USE_SHELL_API
+ struct dir_deleter {
+ dir_deleter() {}
+ void operator()(DIR* d) const
+ {
+ if (d != nullptr)
+ {
+ int result = closedir(d);
+ assert(result == 0);
+ }
+ }
+ };
+ using closedir_ptr = std::unique_ptr<DIR, dir_deleter>;
+
+ std::string filename;
+ struct stat statbuf;
+ std::size_t folder_len = folder.length();
+ struct dirent* p = nullptr;
+
+ closedir_ptr d(opendir(folder.c_str()));
+ bool r = d.get() != nullptr;
+ while (r && (p=readdir(d.get())) != nullptr)
+ {
+ if (strcmp(p->d_name, ".") == 0 || strcmp(p->d_name, "..") == 0)
+ continue;
+
+ // + 2 for path delimiter and nul terminator.
+ std::size_t buf_len = folder_len + strlen(p->d_name) + 2;
+ filename.resize(buf_len);
+ std::size_t path_len = static_cast<std::size_t>(
+ snprintf(&filename[0], buf_len, "%s/%s", folder.c_str(), p->d_name));
+ assert(path_len == buf_len - 1);
+ filename.resize(path_len);
+
+ if (stat(filename.c_str(), &statbuf) == 0)
+ r = S_ISDIR(statbuf.st_mode)
+ ? remove_folder_and_subfolders(filename)
+ : unlink(filename.c_str()) == 0;
+ }
+ d.reset();
+
+ if (r)
+ r = rmdir(folder.c_str()) == 0;
+
+ return r;
+# endif // !USE_SHELL_API
+# endif // !_WIN32
+}
+
+static
+bool
+make_directory(const std::string& folder)
+{
+# ifdef _WIN32
+# if USE_SHELL_API
+ // Re-create the folder.
+ std::string cmd = "mkdir \"";
+ cmd += folder;
+ cmd += '\"';
+ return std::system(cmd.c_str()) == EXIT_SUCCESS;
+# else // !USE_SHELL_API
+ return _mkdir(folder.c_str()) == 0;
+# endif // !USE_SHELL_API
+# else // !_WIN32
+# if USE_SHELL_API
+ return std::system(("mkdir -p " + folder).c_str()) == EXIT_SUCCESS;
+# else // !USE_SHELL_API
+ return mkdir(folder.c_str(), 0777) == 0;
+# endif // !USE_SHELL_API
+# endif // !_WIN32
+}
+
+static
+bool
+delete_file(const std::string& file)
+{
+# ifdef _WIN32
+# if USE_SHELL_API
+ std::string cmd = "del \"";
+ cmd += file;
+ cmd += '\"';
+ return std::system(cmd.c_str()) == 0;
+# else // !USE_SHELL_API
+ return _unlink(file.c_str()) == 0;
+# endif // !USE_SHELL_API
+# else // !_WIN32
+# if USE_SHELL_API
+ return std::system(("rm " + file).c_str()) == EXIT_SUCCESS;
+# else // !USE_SHELL_API
+ return unlink(file.c_str()) == 0;
+# endif // !USE_SHELL_API
+# endif // !_WIN32
+}
+
+# ifdef _WIN32
+
+static
+bool
+move_file(const std::string& from, const std::string& to)
+{
+# if USE_SHELL_API
+ std::string cmd = "move \"";
+ cmd += from;
+ cmd += "\" \"";
+ cmd += to;
+ cmd += '\"';
+ return std::system(cmd.c_str()) == EXIT_SUCCESS;
+# else // !USE_SHELL_API
+ return !!::MoveFile(from.c_str(), to.c_str());
+# endif // !USE_SHELL_API
+}
+
+// Usually something like "c:\Program Files".
+static
+std::string
+get_program_folder()
+{
+ return get_known_folder(FOLDERID_ProgramFiles);
+}
+
+// Note folder can and usually does contain spaces.
+static
+std::string
+get_unzip_program()
+{
+ std::string path;
+
+ // 7-Zip appears to note its location in the registry.
+ // If that doesn't work, fall through and take a guess, but it will likely be wrong.
+ HKEY hKey = nullptr;
+ if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, "SOFTWARE\\7-Zip", 0, KEY_READ, &hKey) == ERROR_SUCCESS)
+ {
+ char value_buffer[MAX_PATH + 1]; // fyi 260 at time of writing.
+ // in/out parameter. Documentation say that size is a count of bytes not chars.
+ DWORD size = sizeof(value_buffer) - sizeof(value_buffer[0]);
+ DWORD tzi_type = REG_SZ;
+ // Testing shows Path key value is "C:\Program Files\7-Zip\" i.e. always with trailing \.
+ bool got_value = (RegQueryValueExA(hKey, "Path", nullptr, &tzi_type,
+ reinterpret_cast<LPBYTE>(value_buffer), &size) == ERROR_SUCCESS);
+ RegCloseKey(hKey); // Close now incase of throw later.
+ if (got_value)
+ {
+ // Function does not guarantee to null terminate.
+ value_buffer[size / sizeof(value_buffer[0])] = '\0';
+ path = value_buffer;
+ if (!path.empty())
+ {
+ path += "7z.exe";
+ return path;
+ }
+ }
+ }
+ path += get_program_folder();
+ path += folder_delimiter;
+ path += "7-Zip\\7z.exe";
+ return path;
+}
+
+# if !USE_SHELL_API
+static
+int
+run_program(const std::string& command)
+{
+ STARTUPINFO si{};
+ si.cb = sizeof(si);
+ PROCESS_INFORMATION pi{};
+
+ // Allegedly CreateProcess overwrites the command line. Ugh.
+ std::string mutable_command(command);
+ if (CreateProcess(nullptr, &mutable_command[0],
+ nullptr, nullptr, FALSE, CREATE_NO_WINDOW, nullptr, nullptr, &si, &pi))
+ {
+ WaitForSingleObject(pi.hProcess, INFINITE);
+ DWORD exit_code;
+ bool got_exit_code = !!GetExitCodeProcess(pi.hProcess, &exit_code);
+ CloseHandle(pi.hProcess);
+ CloseHandle(pi.hThread);
+ // Not 100% sure about this still active thing is correct,
+ // but I'm going with it because I *think* WaitForSingleObject might
+ // return in some cases without INFINITE-ly waiting.
+ // But why/wouldn't GetExitCodeProcess return false in that case?
+ if (got_exit_code && exit_code != STILL_ACTIVE)
+ return static_cast<int>(exit_code);
+ }
+ return EXIT_FAILURE;
+}
+# endif // !USE_SHELL_API
+
+static
+std::string
+get_download_tar_file(const std::string& version)
+{
+ auto file = get_install();
+ file += folder_delimiter;
+ file += "tzdata";
+ file += version;
+ file += ".tar";
+ return file;
+}
+
+static
+bool
+extract_gz_file(const std::string& version, const std::string& gz_file,
+ const std::string& dest_folder)
+{
+ auto unzip_prog = get_unzip_program();
+ bool unzip_result = false;
+ // Use the unzip program to extract the tar file from the archive.
+
+ // Aim to create a string like:
+ // "C:\Program Files\7-Zip\7z.exe" x "C:\Users\SomeUser\Downloads\tzdata2016d.tar.gz"
+ // -o"C:\Users\SomeUser\Downloads\tzdata"
+ std::string cmd;
+ cmd = '\"';
+ cmd += unzip_prog;
+ cmd += "\" x \"";
+ cmd += gz_file;
+ cmd += "\" -o\"";
+ cmd += dest_folder;
+ cmd += '\"';
+
+# if USE_SHELL_API
+ // When using shelling out with std::system() extra quotes are required around the
+ // whole command. It's weird but necessary it seems, see:
+ // http://stackoverflow.com/q/27975969/576911
+
+ cmd = "\"" + cmd + "\"";
+ if (std::system(cmd.c_str()) == EXIT_SUCCESS)
+ unzip_result = true;
+# else // !USE_SHELL_API
+ if (run_program(cmd) == EXIT_SUCCESS)
+ unzip_result = true;
+# endif // !USE_SHELL_API
+ if (unzip_result)
+ delete_file(gz_file);
+
+ // Use the unzip program extract the data from the tar file that was
+ // just extracted from the archive.
+ auto tar_file = get_download_tar_file(version);
+ cmd = '\"';
+ cmd += unzip_prog;
+ cmd += "\" x \"";
+ cmd += tar_file;
+ cmd += "\" -o\"";
+ cmd += get_install();
+ cmd += '\"';
+# if USE_SHELL_API
+ cmd = "\"" + cmd + "\"";
+ if (std::system(cmd.c_str()) == EXIT_SUCCESS)
+ unzip_result = true;
+# else // !USE_SHELL_API
+ if (run_program(cmd) == EXIT_SUCCESS)
+ unzip_result = true;
+# endif // !USE_SHELL_API
+
+ if (unzip_result)
+ delete_file(tar_file);
+
+ return unzip_result;
+}
+
+static
+std::string
+get_download_mapping_file(const std::string& version)
+{
+ auto file = get_install() + version + "windowsZones.xml";
+ return file;
+}
+
+# else // !_WIN32
+
+# if !USE_SHELL_API
+static
+int
+run_program(const char* prog, const char*const args[])
+{
+ pid_t pid = fork();
+ if (pid == -1) // Child failed to start.
+ return EXIT_FAILURE;
+
+ if (pid != 0)
+ {
+ // We are in the parent. Child started. Wait for it.
+ pid_t ret;
+ int status;
+ while ((ret = waitpid(pid, &status, 0)) == -1)
+ {
+ if (errno != EINTR)
+ break;
+ }
+ if (ret != -1)
+ {
+ if (WIFEXITED(status))
+ return WEXITSTATUS(status);
+ }
+ printf("Child issues!\n");
+
+ return EXIT_FAILURE; // Not sure what status of child is.
+ }
+ else // We are in the child process. Start the program the parent wants to run.
+ {
+
+ if (execv(prog, const_cast<char**>(args)) == -1) // Does not return.
+ {
+ perror("unreachable 0\n");
+ _Exit(127);
+ }
+ printf("unreachable 2\n");
+ }
+ printf("unreachable 2\n");
+ // Unreachable.
+ assert(false);
+ exit(EXIT_FAILURE);
+ return EXIT_FAILURE;
+}
+# endif // !USE_SHELL_API
+
+static
+bool
+extract_gz_file(const std::string&, const std::string& gz_file, const std::string&)
+{
+# if USE_SHELL_API
+ bool unzipped = std::system(("tar -xzf " + gz_file + " -C " + get_install()).c_str()) == EXIT_SUCCESS;
+# else // !USE_SHELL_API
+ const char prog[] = {"/usr/bin/tar"};
+ const char*const args[] =
+ {
+ prog, "-xzf", gz_file.c_str(), "-C", get_install().c_str(), nullptr
+ };
+ bool unzipped = (run_program(prog, args) == EXIT_SUCCESS);
+# endif // !USE_SHELL_API
+ if (unzipped)
+ {
+ delete_file(gz_file);
+ return true;
+ }
+ return false;
+}
+
+# endif // !_WIN32
+
+bool
+remote_download(const std::string& version, char* error_buffer)
+{
+ assert(!version.empty());
+
+# ifdef _WIN32
+ // Download folder should be always available for Windows
+# else // !_WIN32
+ // Create download folder if it does not exist on UNIX system
+ auto download_folder = get_install();
+ if (!file_exists(download_folder))
+ {
+ if (!make_directory(download_folder))
+ return false;
+ }
+# endif // _WIN32
+
+ auto url = "https://data.iana.org/time-zones/releases/tzdata" + version +
+ ".tar.gz";
+ bool result = download_to_file(url, get_download_gz_file(version),
+ download_file_options::binary, error_buffer);
+# ifdef _WIN32
+ if (result)
+ {
+ auto mapping_file = get_download_mapping_file(version);
+ result = download_to_file(
+ "https://raw.githubusercontent.com/unicode-org/cldr/master/"
+ "common/supplemental/windowsZones.xml",
+ mapping_file, download_file_options::text, error_buffer);
+ }
+# endif // _WIN32
+ return result;
+}
+
+bool
+remote_install(const std::string& version)
+{
+ auto success = false;
+ assert(!version.empty());
+
+ std::string install = get_install();
+ auto gz_file = get_download_gz_file(version);
+ if (file_exists(gz_file))
+ {
+ if (file_exists(install))
+ remove_folder_and_subfolders(install);
+ if (make_directory(install))
+ {
+ if (extract_gz_file(version, gz_file, install))
+ success = true;
+# ifdef _WIN32
+ auto mapping_file_source = get_download_mapping_file(version);
+ auto mapping_file_dest = get_install();
+ mapping_file_dest += folder_delimiter;
+ mapping_file_dest += "windowsZones.xml";
+ if (!move_file(mapping_file_source, mapping_file_dest))
+ success = false;
+# endif // _WIN32
+ }
+ }
+ return success;
+}
+
+#endif // HAS_REMOTE_API
+
+static
+std::string
+get_version(const std::string& path)
+{
+ std::string version;
+ std::ifstream infile(path + "version");
+ if (infile.is_open())
+ {
+ infile >> version;
+ if (!infile.fail())
+ return version;
+ }
+ else
+ {
+ infile.open(path + "NEWS");
+ while (infile)
+ {
+ infile >> version;
+ if (version == "Release")
+ {
+ infile >> version;
+ return version;
+ }
+ }
+ }
+ throw std::runtime_error("Unable to get Timezone database version from " + path);
+}
+
+static
+std::unique_ptr<tzdb>
+init_tzdb()
+{
+ using namespace date;
+ const std::string install = get_install();
+ const std::string path = install + folder_delimiter;
+ std::string line;
+ bool continue_zone = false;
+ std::unique_ptr<tzdb> db(new tzdb);
+
+#if AUTO_DOWNLOAD
+ if (!file_exists(install))
+ {
+ auto rv = remote_version();
+ if (!rv.empty() && remote_download(rv))
+ {
+ if (!remote_install(rv))
+ {
+ std::string msg = "Timezone database version \"";
+ msg += rv;
+ msg += "\" did not install correctly to \"";
+ msg += install;
+ msg += "\"";
+ throw std::runtime_error(msg);
+ }
+ }
+ if (!file_exists(install))
+ {
+ std::string msg = "Timezone database not found at \"";
+ msg += install;
+ msg += "\"";
+ throw std::runtime_error(msg);
+ }
+ db->version = get_version(path);
+ }
+ else
+ {
+ db->version = get_version(path);
+ auto rv = remote_version();
+ if (!rv.empty() && db->version != rv)
+ {
+ if (remote_download(rv))
+ {
+ remote_install(rv);
+ db->version = get_version(path);
+ }
+ }
+ }
+#else // !AUTO_DOWNLOAD
+ if (!file_exists(install))
+ {
+ std::string msg = "Timezone database not found at \"";
+ msg += install;
+ msg += "\"";
+ throw std::runtime_error(msg);
+ }
+ db->version = get_version(path);
+#endif // !AUTO_DOWNLOAD
+
+ CONSTDATA char*const files[] =
+ {
+ "africa", "antarctica", "asia", "australasia", "backward", "etcetera", "europe",
+ "pacificnew", "northamerica", "southamerica", "systemv", "leapseconds"
+ };
+
+ for (const auto& filename : files)
+ {
+ std::ifstream infile(path + filename);
+ while (infile)
+ {
+ std::getline(infile, line);
+ if (!line.empty() && line[0] != '#')
+ {
+ std::istringstream in(line);
+ std::string word;
+ in >> word;
+ if (word == "Rule")
+ {
+ db->rules.push_back(Rule(line));
+ continue_zone = false;
+ }
+ else if (word == "Link")
+ {
+ db->links.push_back(time_zone_link(line));
+ continue_zone = false;
+ }
+ else if (word == "Leap")
+ {
+ db->leap_seconds.push_back(leap_second(line, detail::undocumented{}));
+ continue_zone = false;
+ }
+ else if (word == "Zone")
+ {
+ db->zones.push_back(time_zone(line, detail::undocumented{}));
+ continue_zone = true;
+ }
+ else if (line[0] == '\t' && continue_zone)
+ {
+ db->zones.back().add(line);
+ }
+ else
+ {
+ std::cerr << line << '\n';
+ }
+ }
+ }
+ }
+ std::sort(db->rules.begin(), db->rules.end());
+ Rule::split_overlaps(db->rules);
+ std::sort(db->zones.begin(), db->zones.end());
+ db->zones.shrink_to_fit();
+ std::sort(db->links.begin(), db->links.end());
+ db->links.shrink_to_fit();
+ std::sort(db->leap_seconds.begin(), db->leap_seconds.end());
+ db->leap_seconds.shrink_to_fit();
+
+#ifdef _WIN32
+ std::string mapping_file = get_install() + folder_delimiter + "windowsZones.xml";
+ db->mappings = load_timezone_mappings_from_xml_file(mapping_file);
+ sort_zone_mappings(db->mappings);
+#endif // _WIN32
+
+ return db;
+}
+
+const tzdb&
+reload_tzdb()
+{
+#if AUTO_DOWNLOAD
+ auto const& v = get_tzdb_list().front().version;
+ if (!v.empty() && v == remote_version())
+ return get_tzdb_list().front();
+#endif // AUTO_DOWNLOAD
+ tzdb_list::undocumented_helper::push_front(get_tzdb_list(), init_tzdb().release());
+ return get_tzdb_list().front();
+}
+
+#endif // !USE_OS_TZDB
+
+const tzdb&
+get_tzdb()
+{
+ return get_tzdb_list().front();
+}
+
+const time_zone*
+#if HAS_STRING_VIEW
+tzdb::locate_zone(std::string_view tz_name) const
+#else
+tzdb::locate_zone(const std::string& tz_name) const
+#endif
+{
+ auto zi = std::lower_bound(zones.begin(), zones.end(), tz_name,
+#if HAS_STRING_VIEW
+ [](const time_zone& z, const std::string_view& nm)
+#else
+ [](const time_zone& z, const std::string& nm)
+#endif
+ {
+ return z.name() < nm;
+ });
+ if (zi == zones.end() || zi->name() != tz_name)
+ {
+#if !USE_OS_TZDB
+ auto li = std::lower_bound(links.begin(), links.end(), tz_name,
+#if HAS_STRING_VIEW
+ [](const time_zone_link& z, const std::string_view& nm)
+#else
+ [](const time_zone_link& z, const std::string& nm)
+#endif
+ {
+ return z.name() < nm;
+ });
+ if (li != links.end() && li->name() == tz_name)
+ {
+ zi = std::lower_bound(zones.begin(), zones.end(), li->target(),
+ [](const time_zone& z, const std::string& nm)
+ {
+ return z.name() < nm;
+ });
+ if (zi != zones.end() && zi->name() == li->target())
+ return &*zi;
+ }
+#endif // !USE_OS_TZDB
+ throw std::runtime_error(std::string(tz_name) + " not found in timezone database");
+ }
+ return &*zi;
+}
+
+const time_zone*
+#if HAS_STRING_VIEW
+locate_zone(std::string_view tz_name)
+#else
+locate_zone(const std::string& tz_name)
+#endif
+{
+ return get_tzdb().locate_zone(tz_name);
+}
+
+#if USE_OS_TZDB
+
+std::ostream&
+operator<<(std::ostream& os, const tzdb& db)
+{
+ os << "Version: " << db.version << "\n\n";
+ for (const auto& x : db.zones)
+ os << x << '\n';
+ os << '\n';
+ for (const auto& x : db.leap_seconds)
+ os << x << '\n';
+ return os;
+}
+
+#else // !USE_OS_TZDB
+
+std::ostream&
+operator<<(std::ostream& os, const tzdb& db)
+{
+ os << "Version: " << db.version << '\n';
+ std::string title("--------------------------------------------"
+ "--------------------------------------------\n"
+ "Name ""Start Y ""End Y "
+ "Beginning ""Offset "
+ "Designator\n"
+ "--------------------------------------------"
+ "--------------------------------------------\n");
+ int count = 0;
+ for (const auto& x : db.rules)
+ {
+ if (count++ % 50 == 0)
+ os << title;
+ os << x << '\n';
+ }
+ os << '\n';
+ title = std::string("---------------------------------------------------------"
+ "--------------------------------------------------------\n"
+ "Name ""Offset "
+ "Rule ""Abrev ""Until\n"
+ "---------------------------------------------------------"
+ "--------------------------------------------------------\n");
+ count = 0;
+ for (const auto& x : db.zones)
+ {
+ if (count++ % 10 == 0)
+ os << title;
+ os << x << '\n';
+ }
+ os << '\n';
+ title = std::string("---------------------------------------------------------"
+ "--------------------------------------------------------\n"
+ "Alias ""To\n"
+ "---------------------------------------------------------"
+ "--------------------------------------------------------\n");
+ count = 0;
+ for (const auto& x : db.links)
+ {
+ if (count++ % 45 == 0)
+ os << title;
+ os << x << '\n';
+ }
+ os << '\n';
+ title = std::string("---------------------------------------------------------"
+ "--------------------------------------------------------\n"
+ "Leap second on\n"
+ "---------------------------------------------------------"
+ "--------------------------------------------------------\n");
+ os << title;
+ for (const auto& x : db.leap_seconds)
+ os << x << '\n';
+ return os;
+}
+
+#endif // !USE_OS_TZDB
+
+// -----------------------
+
+#ifdef _WIN32
+
+static
+std::string
+getTimeZoneKeyName()
+{
+ DYNAMIC_TIME_ZONE_INFORMATION dtzi{};
+ auto result = GetDynamicTimeZoneInformation(&dtzi);
+ if (result == TIME_ZONE_ID_INVALID)
+ throw std::runtime_error("current_zone(): GetDynamicTimeZoneInformation()"
+ " reported TIME_ZONE_ID_INVALID.");
+ auto wlen = wcslen(dtzi.TimeZoneKeyName);
+ char buf[128] = {};
+ assert(sizeof(buf) >= wlen+1);
+ wcstombs(buf, dtzi.TimeZoneKeyName, wlen);
+ if (strcmp(buf, "Coordinated Universal Time") == 0)
+ return "UTC";
+ return buf;
+}
+
+const time_zone*
+tzdb::current_zone() const
+{
+ std::string win_tzid = getTimeZoneKeyName();
+ std::string standard_tzid;
+ if (!native_to_standard_timezone_name(win_tzid, standard_tzid))
+ {
+ std::string msg;
+ msg = "current_zone() failed: A mapping from the Windows Time Zone id \"";
+ msg += win_tzid;
+ msg += "\" was not found in the time zone mapping database.";
+ throw std::runtime_error(msg);
+ }
+ return locate_zone(standard_tzid);
+}
+
+#else // !_WIN32
+
+#if HAS_STRING_VIEW
+
+static
+std::string_view
+extract_tz_name(char const* rp)
+{
+ using namespace std;
+ string_view result = rp;
+ CONSTDATA string_view zoneinfo = "zoneinfo";
+ size_t pos = result.rfind(zoneinfo);
+ if (pos == result.npos)
+ throw runtime_error(
+ "current_zone() failed to find \"zoneinfo\" in " + string(result));
+ pos = result.find('/', pos);
+ result.remove_prefix(pos + 1);
+ return result;
+}
+
+#else // !HAS_STRING_VIEW
+
+static
+std::string
+extract_tz_name(char const* rp)
+{
+ using namespace std;
+ string result = rp;
+ CONSTDATA char zoneinfo[] = "zoneinfo";
+ size_t pos = result.rfind(zoneinfo);
+ if (pos == result.npos)
+ throw runtime_error(
+ "current_zone() failed to find \"zoneinfo\" in " + result);
+ pos = result.find('/', pos);
+ result.erase(0, pos + 1);
+ return result;
+}
+
+#endif // HAS_STRING_VIEW
+
+static
+bool
+sniff_realpath(const char* timezone)
+{
+ using namespace std;
+ char rp[PATH_MAX+1] = {};
+ if (realpath(timezone, rp) == nullptr)
+ throw system_error(errno, system_category(), "realpath() failed");
+ auto result = extract_tz_name(rp);
+ return result != "posixrules";
+}
+
+const time_zone*
+tzdb::current_zone() const
+{
+ // On some OS's a file called /etc/localtime may
+ // exist and it may be either a real file
+ // containing time zone details or a symlink to such a file.
+ // On MacOS and BSD Unix if this file is a symlink it
+ // might resolve to a path like this:
+ // "/usr/share/zoneinfo/America/Los_Angeles"
+ // If it does, we try to determine the current
+ // timezone from the remainder of the path by removing the prefix
+ // and hoping the rest resolves to a valid timezone.
+ // It may not always work though. If it doesn't then an
+ // exception will be thrown by local_timezone.
+ // The path may also take a relative form:
+ // "../usr/share/zoneinfo/America/Los_Angeles".
+ {
+ struct stat sb;
+ CONSTDATA auto timezone = "/etc/localtime";
+ if (lstat(timezone, &sb) == 0 && S_ISLNK(sb.st_mode) && sb.st_size > 0)
+ {
+ using namespace std;
+ static const bool use_realpath = sniff_realpath(timezone);
+ char rp[PATH_MAX+1] = {};
+ if (use_realpath)
+ {
+ if (realpath(timezone, rp) == nullptr)
+ throw system_error(errno, system_category(), "realpath() failed");
+ }
+ else
+ {
+ if (readlink(timezone, rp, sizeof(rp)-1) <= 0)
+ throw system_error(errno, system_category(), "readlink() failed");
+ }
+ return locate_zone(extract_tz_name(rp));
+ }
+ }
+ // On embedded systems e.g. buildroot with uclibc the timezone is linked
+ // into /etc/TZ which is a symlink to path like this:
+ // "/usr/share/zoneinfo/uclibc/America/Los_Angeles"
+ // If it does, we try to determine the current
+ // timezone from the remainder of the path by removing the prefix
+ // and hoping the rest resolves to valid timezone.
+ // It may not always work though. If it doesn't then an
+ // exception will be thrown by local_timezone.
+ // The path may also take a relative form:
+ // "../usr/share/zoneinfo/uclibc/America/Los_Angeles".
+ {
+ struct stat sb;
+ CONSTDATA auto timezone = "/etc/TZ";
+ if (lstat(timezone, &sb) == 0 && S_ISLNK(sb.st_mode) && sb.st_size > 0) {
+ using namespace std;
+ string result;
+ char rp[PATH_MAX+1] = {};
+ if (readlink(timezone, rp, sizeof(rp)-1) > 0)
+ result = string(rp);
+ else
+ throw system_error(errno, system_category(), "readlink() failed");
+
+ const size_t pos = result.find(get_tz_dir());
+ if (pos != result.npos)
+ result.erase(0, get_tz_dir().size() + 1 + pos);
+ return locate_zone(result);
+ }
+ }
+ {
+ // On some versions of some linux distro's (e.g. Ubuntu),
+ // the current timezone might be in the first line of
+ // the /etc/timezone file.
+ std::ifstream timezone_file("/etc/timezone");
+ if (timezone_file.is_open())
+ {
+ std::string result;
+ std::getline(timezone_file, result);
+ if (!result.empty())
+ return locate_zone(result);
+ }
+ // Fall through to try other means.
+ }
+ {
+ // On some versions of some bsd distro's (e.g. FreeBSD),
+ // the current timezone might be in the first line of
+ // the /var/db/zoneinfo file.
+ std::ifstream timezone_file("/var/db/zoneinfo");
+ if (timezone_file.is_open())
+ {
+ std::string result;
+ std::getline(timezone_file, result);
+ if (!result.empty())
+ return locate_zone(result);
+ }
+ // Fall through to try other means.
+ }
+ {
+ // On some versions of some bsd distro's (e.g. iOS),
+ // it is not possible to use file based approach,
+ // we switch to system API, calling functions in
+ // CoreFoundation framework.
+#if TARGET_OS_IPHONE
+ std::string result = date::iOSUtils::get_current_timezone();
+ if (!result.empty())
+ return locate_zone(result);
+#endif
+ // Fall through to try other means.
+ }
+ {
+ // On some versions of some linux distro's (e.g. Red Hat),
+ // the current timezone might be in the first line of
+ // the /etc/sysconfig/clock file as:
+ // ZONE="US/Eastern"
+ std::ifstream timezone_file("/etc/sysconfig/clock");
+ std::string result;
+ while (timezone_file)
+ {
+ std::getline(timezone_file, result);
+ auto p = result.find("ZONE=\"");
+ if (p != std::string::npos)
+ {
+ result.erase(p, p+6);
+ result.erase(result.rfind('"'));
+ return locate_zone(result);
+ }
+ }
+ // Fall through to try other means.
+ }
+ throw std::runtime_error("Could not get current timezone");
+}
+
+#endif // !_WIN32
+
+const time_zone*
+current_zone()
+{
+ return get_tzdb().current_zone();
+}
+
+} // namespace date
+
+#if defined(__GNUC__) && __GNUC__ < 5
+# pragma GCC diagnostic pop
+#endif
diff --git a/src/third-party/md4c/md4c.c b/src/third-party/md4c/md4c.c
index 3677c0e..812bde5 100644
--- a/src/third-party/md4c/md4c.c
+++ b/src/third-party/md4c/md4c.c
@@ -2,7 +2,7 @@
* MD4C: Markdown parser for C
* (http://github.com/mity/md4c)
*
- * Copyright (c) 2016-2020 Martin Mitas
+ * Copyright (c) 2016-2024 Martin Mitáš
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -67,6 +67,9 @@
#define STRINGIZE_(x) #x
#define STRINGIZE(x) STRINGIZE_(x)
+#define MAX(a,b) ((a) > (b) ? (a) : (b))
+#define MIN(a,b) ((a) < (b) ? (a) : (b))
+
#ifndef TRUE
#define TRUE 1
#define FALSE 0
@@ -115,6 +118,22 @@
#define MD_UNUSED(x) ((void)x)
+/******************************
+ *** Some internal limits ***
+ ******************************/
+
+/* We limit code span marks to lower than 32 backticks. This solves the
+ * pathologic case of too many openers, each of different length: Their
+ * resolving would be then O(n^2). */
+#define CODESPAN_MARK_MAXLEN 32
+
+/* We limit column count of tables to prevent quadratic explosion of output
+ * from pathological input of a table thousands of columns and thousands
+ * of rows where rows are requested with as little as single character
+ * per-line, relying on us to "helpfully" fill all the missing "<td></td>". */
+#define TABLE_MAXCOLCOUNT 128
+
+
/************************
*** Internal Types ***
************************/
@@ -130,14 +149,13 @@ typedef struct MD_CONTAINER_tag MD_CONTAINER;
typedef struct MD_REF_DEF_tag MD_REF_DEF;
-/* During analyzes of inline marks, we need to manage some "mark chains",
- * of (yet unresolved) openers. This structure holds start/end of the chain.
- * The chain internals are then realized through MD_MARK::prev and ::next.
+/* During analyzes of inline marks, we need to manage stacks of unresolved
+ * openers of the given type.
+ * The stack connects the marks via MD_MARK::next;
*/
-typedef struct MD_MARKCHAIN_tag MD_MARKCHAIN;
-struct MD_MARKCHAIN_tag {
- int head; /* Index of first mark in the chain, or -1 if empty. */
- int tail; /* Index of last mark in the chain, or -1 if empty. */
+typedef struct MD_MARKSTACK_tag MD_MARKSTACK;
+struct MD_MARKSTACK_tag {
+ int top; /* -1 if empty. */
};
/* Context propagated through all the parsing. */
@@ -178,24 +196,33 @@ struct MD_CTX_tag {
#endif
/* For resolving of inline spans. */
- MD_MARKCHAIN mark_chains[13];
-#define PTR_CHAIN (ctx->mark_chains[0])
-#define TABLECELLBOUNDARIES (ctx->mark_chains[1])
-#define ASTERISK_OPENERS_extraword_mod3_0 (ctx->mark_chains[2])
-#define ASTERISK_OPENERS_extraword_mod3_1 (ctx->mark_chains[3])
-#define ASTERISK_OPENERS_extraword_mod3_2 (ctx->mark_chains[4])
-#define ASTERISK_OPENERS_intraword_mod3_0 (ctx->mark_chains[5])
-#define ASTERISK_OPENERS_intraword_mod3_1 (ctx->mark_chains[6])
-#define ASTERISK_OPENERS_intraword_mod3_2 (ctx->mark_chains[7])
-#define UNDERSCORE_OPENERS (ctx->mark_chains[8])
-#define TILDE_OPENERS_1 (ctx->mark_chains[9])
-#define TILDE_OPENERS_2 (ctx->mark_chains[10])
-#define BRACKET_OPENERS (ctx->mark_chains[11])
-#define DOLLAR_OPENERS (ctx->mark_chains[12])
-#define OPENERS_CHAIN_FIRST 1
-#define OPENERS_CHAIN_LAST 12
-
+ MD_MARKSTACK opener_stacks[16];
+#define ASTERISK_OPENERS_oo_mod3_0 (ctx->opener_stacks[0]) /* Opener-only */
+#define ASTERISK_OPENERS_oo_mod3_1 (ctx->opener_stacks[1])
+#define ASTERISK_OPENERS_oo_mod3_2 (ctx->opener_stacks[2])
+#define ASTERISK_OPENERS_oc_mod3_0 (ctx->opener_stacks[3]) /* Both opener and closer candidate */
+#define ASTERISK_OPENERS_oc_mod3_1 (ctx->opener_stacks[4])
+#define ASTERISK_OPENERS_oc_mod3_2 (ctx->opener_stacks[5])
+#define UNDERSCORE_OPENERS_oo_mod3_0 (ctx->opener_stacks[6]) /* Opener-only */
+#define UNDERSCORE_OPENERS_oo_mod3_1 (ctx->opener_stacks[7])
+#define UNDERSCORE_OPENERS_oo_mod3_2 (ctx->opener_stacks[8])
+#define UNDERSCORE_OPENERS_oc_mod3_0 (ctx->opener_stacks[9]) /* Both opener and closer candidate */
+#define UNDERSCORE_OPENERS_oc_mod3_1 (ctx->opener_stacks[10])
+#define UNDERSCORE_OPENERS_oc_mod3_2 (ctx->opener_stacks[11])
+#define TILDE_OPENERS_1 (ctx->opener_stacks[12])
+#define TILDE_OPENERS_2 (ctx->opener_stacks[13])
+#define BRACKET_OPENERS (ctx->opener_stacks[14])
+#define DOLLAR_OPENERS (ctx->opener_stacks[15])
+
+ /* Stack of dummies which need to call free() for pointers stored in them.
+ * These are constructed during inline parsing and freed after all the block
+ * is processed (i.e. all callbacks referring those strings are called). */
+ MD_MARKSTACK ptr_stack;
+
+ /* For resolving table rows. */
int n_table_cell_boundaries;
+ int table_cell_boundaries_head;
+ int table_cell_boundaries_tail;
/* For resolving links. */
int unresolved_link_head;
@@ -251,8 +278,9 @@ typedef enum MD_LINETYPE_tag MD_LINETYPE;
typedef struct MD_LINE_ANALYSIS_tag MD_LINE_ANALYSIS;
struct MD_LINE_ANALYSIS_tag {
- MD_LINETYPE type : 16;
- unsigned data : 16;
+ MD_LINETYPE type;
+ unsigned data;
+ int enforce_new_block;
OFF beg;
OFF end;
unsigned indent; /* Indentation level. */
@@ -468,10 +496,10 @@ md_text_with_null_replacement(MD_CTX* ctx, MD_TEXTTYPE type, const CHAR* str, SZ
/* If the offset falls into a gap between line, we return the following
* line. */
static const MD_LINE*
-md_lookup_line(OFF off, const MD_LINE* lines, int n_lines)
+md_lookup_line(OFF off, const MD_LINE* lines, MD_SIZE n_lines, MD_SIZE* p_line_index)
{
- int lo, hi;
- int pivot;
+ MD_SIZE lo, hi;
+ MD_SIZE pivot;
const MD_LINE* line;
lo = 0;
@@ -481,12 +509,17 @@ md_lookup_line(OFF off, const MD_LINE* lines, int n_lines)
line = &lines[pivot];
if(off < line->beg) {
- hi = pivot - 1;
- if(hi < 0 || lines[hi].end <= off)
+ if(hi == 0 || lines[hi-1].end < off) {
+ if(p_line_index != NULL)
+ *p_line_index = pivot;
return line;
+ }
+ hi = pivot - 1;
} else if(off > line->end) {
lo = pivot + 1;
} else {
+ if(p_line_index != NULL)
+ *p_line_index = pivot;
return line;
}
}
@@ -566,39 +599,67 @@ struct MD_UNICODE_FOLD_INFO_tag {
{
#define R(cp_min, cp_max) ((cp_min) | 0x40000000), ((cp_max) | 0x80000000)
#define S(cp) (cp)
- /* Unicode "Pc", "Pd", "Pe", "Pf", "Pi", "Po", "Ps" categories.
+ /* Unicode general "P" and "S" categories.
* (generated by scripts/build_punct_map.py) */
static const unsigned PUNCT_MAP[] = {
- R(0x0021,0x0023), R(0x0025,0x002a), R(0x002c,0x002f), R(0x003a,0x003b), R(0x003f,0x0040),
- R(0x005b,0x005d), S(0x005f), S(0x007b), S(0x007d), S(0x00a1), S(0x00a7), S(0x00ab), R(0x00b6,0x00b7),
- S(0x00bb), S(0x00bf), S(0x037e), S(0x0387), R(0x055a,0x055f), R(0x0589,0x058a), S(0x05be), S(0x05c0),
- S(0x05c3), S(0x05c6), R(0x05f3,0x05f4), R(0x0609,0x060a), R(0x060c,0x060d), S(0x061b), R(0x061e,0x061f),
- R(0x066a,0x066d), S(0x06d4), R(0x0700,0x070d), R(0x07f7,0x07f9), R(0x0830,0x083e), S(0x085e),
- R(0x0964,0x0965), S(0x0970), S(0x09fd), S(0x0a76), S(0x0af0), S(0x0c77), S(0x0c84), S(0x0df4), S(0x0e4f),
- R(0x0e5a,0x0e5b), R(0x0f04,0x0f12), S(0x0f14), R(0x0f3a,0x0f3d), S(0x0f85), R(0x0fd0,0x0fd4),
- R(0x0fd9,0x0fda), R(0x104a,0x104f), S(0x10fb), R(0x1360,0x1368), S(0x1400), S(0x166e), R(0x169b,0x169c),
- R(0x16eb,0x16ed), R(0x1735,0x1736), R(0x17d4,0x17d6), R(0x17d8,0x17da), R(0x1800,0x180a),
- R(0x1944,0x1945), R(0x1a1e,0x1a1f), R(0x1aa0,0x1aa6), R(0x1aa8,0x1aad), R(0x1b5a,0x1b60),
- R(0x1bfc,0x1bff), R(0x1c3b,0x1c3f), R(0x1c7e,0x1c7f), R(0x1cc0,0x1cc7), S(0x1cd3), R(0x2010,0x2027),
- R(0x2030,0x2043), R(0x2045,0x2051), R(0x2053,0x205e), R(0x207d,0x207e), R(0x208d,0x208e),
- R(0x2308,0x230b), R(0x2329,0x232a), R(0x2768,0x2775), R(0x27c5,0x27c6), R(0x27e6,0x27ef),
- R(0x2983,0x2998), R(0x29d8,0x29db), R(0x29fc,0x29fd), R(0x2cf9,0x2cfc), R(0x2cfe,0x2cff), S(0x2d70),
- R(0x2e00,0x2e2e), R(0x2e30,0x2e4f), S(0x2e52), R(0x3001,0x3003), R(0x3008,0x3011), R(0x3014,0x301f),
- S(0x3030), S(0x303d), S(0x30a0), S(0x30fb), R(0xa4fe,0xa4ff), R(0xa60d,0xa60f), S(0xa673), S(0xa67e),
- R(0xa6f2,0xa6f7), R(0xa874,0xa877), R(0xa8ce,0xa8cf), R(0xa8f8,0xa8fa), S(0xa8fc), R(0xa92e,0xa92f),
- S(0xa95f), R(0xa9c1,0xa9cd), R(0xa9de,0xa9df), R(0xaa5c,0xaa5f), R(0xaade,0xaadf), R(0xaaf0,0xaaf1),
- S(0xabeb), R(0xfd3e,0xfd3f), R(0xfe10,0xfe19), R(0xfe30,0xfe52), R(0xfe54,0xfe61), S(0xfe63), S(0xfe68),
- R(0xfe6a,0xfe6b), R(0xff01,0xff03), R(0xff05,0xff0a), R(0xff0c,0xff0f), R(0xff1a,0xff1b),
- R(0xff1f,0xff20), R(0xff3b,0xff3d), S(0xff3f), S(0xff5b), S(0xff5d), R(0xff5f,0xff65), R(0x10100,0x10102),
- S(0x1039f), S(0x103d0), S(0x1056f), S(0x10857), S(0x1091f), S(0x1093f), R(0x10a50,0x10a58), S(0x10a7f),
- R(0x10af0,0x10af6), R(0x10b39,0x10b3f), R(0x10b99,0x10b9c), S(0x10ead), R(0x10f55,0x10f59),
- R(0x11047,0x1104d), R(0x110bb,0x110bc), R(0x110be,0x110c1), R(0x11140,0x11143), R(0x11174,0x11175),
- R(0x111c5,0x111c8), S(0x111cd), S(0x111db), R(0x111dd,0x111df), R(0x11238,0x1123d), S(0x112a9),
- R(0x1144b,0x1144f), R(0x1145a,0x1145b), S(0x1145d), S(0x114c6), R(0x115c1,0x115d7), R(0x11641,0x11643),
- R(0x11660,0x1166c), R(0x1173c,0x1173e), S(0x1183b), R(0x11944,0x11946), S(0x119e2), R(0x11a3f,0x11a46),
- R(0x11a9a,0x11a9c), R(0x11a9e,0x11aa2), R(0x11c41,0x11c45), R(0x11c70,0x11c71), R(0x11ef7,0x11ef8),
- S(0x11fff), R(0x12470,0x12474), R(0x16a6e,0x16a6f), S(0x16af5), R(0x16b37,0x16b3b), S(0x16b44),
- R(0x16e97,0x16e9a), S(0x16fe2), S(0x1bc9f), R(0x1da87,0x1da8b), R(0x1e95e,0x1e95f)
+ R(0x0021,0x002f), R(0x003a,0x0040), R(0x005b,0x0060), R(0x007b,0x007e), R(0x00a1,0x00a9),
+ R(0x00ab,0x00ac), R(0x00ae,0x00b1), S(0x00b4), R(0x00b6,0x00b8), S(0x00bb), S(0x00bf), S(0x00d7),
+ S(0x00f7), R(0x02c2,0x02c5), R(0x02d2,0x02df), R(0x02e5,0x02eb), S(0x02ed), R(0x02ef,0x02ff), S(0x0375),
+ S(0x037e), R(0x0384,0x0385), S(0x0387), S(0x03f6), S(0x0482), R(0x055a,0x055f), R(0x0589,0x058a),
+ R(0x058d,0x058f), S(0x05be), S(0x05c0), S(0x05c3), S(0x05c6), R(0x05f3,0x05f4), R(0x0606,0x060f),
+ S(0x061b), R(0x061d,0x061f), R(0x066a,0x066d), S(0x06d4), S(0x06de), S(0x06e9), R(0x06fd,0x06fe),
+ R(0x0700,0x070d), R(0x07f6,0x07f9), R(0x07fe,0x07ff), R(0x0830,0x083e), S(0x085e), S(0x0888),
+ R(0x0964,0x0965), S(0x0970), R(0x09f2,0x09f3), R(0x09fa,0x09fb), S(0x09fd), S(0x0a76), R(0x0af0,0x0af1),
+ S(0x0b70), R(0x0bf3,0x0bfa), S(0x0c77), S(0x0c7f), S(0x0c84), S(0x0d4f), S(0x0d79), S(0x0df4), S(0x0e3f),
+ S(0x0e4f), R(0x0e5a,0x0e5b), R(0x0f01,0x0f17), R(0x0f1a,0x0f1f), S(0x0f34), S(0x0f36), S(0x0f38),
+ R(0x0f3a,0x0f3d), S(0x0f85), R(0x0fbe,0x0fc5), R(0x0fc7,0x0fcc), R(0x0fce,0x0fda), R(0x104a,0x104f),
+ R(0x109e,0x109f), S(0x10fb), R(0x1360,0x1368), R(0x1390,0x1399), S(0x1400), R(0x166d,0x166e),
+ R(0x169b,0x169c), R(0x16eb,0x16ed), R(0x1735,0x1736), R(0x17d4,0x17d6), R(0x17d8,0x17db),
+ R(0x1800,0x180a), S(0x1940), R(0x1944,0x1945), R(0x19de,0x19ff), R(0x1a1e,0x1a1f), R(0x1aa0,0x1aa6),
+ R(0x1aa8,0x1aad), R(0x1b5a,0x1b6a), R(0x1b74,0x1b7e), R(0x1bfc,0x1bff), R(0x1c3b,0x1c3f),
+ R(0x1c7e,0x1c7f), R(0x1cc0,0x1cc7), S(0x1cd3), S(0x1fbd), R(0x1fbf,0x1fc1), R(0x1fcd,0x1fcf),
+ R(0x1fdd,0x1fdf), R(0x1fed,0x1fef), R(0x1ffd,0x1ffe), R(0x2010,0x2027), R(0x2030,0x205e),
+ R(0x207a,0x207e), R(0x208a,0x208e), R(0x20a0,0x20c0), R(0x2100,0x2101), R(0x2103,0x2106),
+ R(0x2108,0x2109), S(0x2114), R(0x2116,0x2118), R(0x211e,0x2123), S(0x2125), S(0x2127), S(0x2129),
+ S(0x212e), R(0x213a,0x213b), R(0x2140,0x2144), R(0x214a,0x214d), S(0x214f), R(0x218a,0x218b),
+ R(0x2190,0x2426), R(0x2440,0x244a), R(0x249c,0x24e9), R(0x2500,0x2775), R(0x2794,0x2b73),
+ R(0x2b76,0x2b95), R(0x2b97,0x2bff), R(0x2ce5,0x2cea), R(0x2cf9,0x2cfc), R(0x2cfe,0x2cff), S(0x2d70),
+ R(0x2e00,0x2e2e), R(0x2e30,0x2e5d), R(0x2e80,0x2e99), R(0x2e9b,0x2ef3), R(0x2f00,0x2fd5),
+ R(0x2ff0,0x2fff), R(0x3001,0x3004), R(0x3008,0x3020), S(0x3030), R(0x3036,0x3037), R(0x303d,0x303f),
+ R(0x309b,0x309c), S(0x30a0), S(0x30fb), R(0x3190,0x3191), R(0x3196,0x319f), R(0x31c0,0x31e3), S(0x31ef),
+ R(0x3200,0x321e), R(0x322a,0x3247), S(0x3250), R(0x3260,0x327f), R(0x328a,0x32b0), R(0x32c0,0x33ff),
+ R(0x4dc0,0x4dff), R(0xa490,0xa4c6), R(0xa4fe,0xa4ff), R(0xa60d,0xa60f), S(0xa673), S(0xa67e),
+ R(0xa6f2,0xa6f7), R(0xa700,0xa716), R(0xa720,0xa721), R(0xa789,0xa78a), R(0xa828,0xa82b),
+ R(0xa836,0xa839), R(0xa874,0xa877), R(0xa8ce,0xa8cf), R(0xa8f8,0xa8fa), S(0xa8fc), R(0xa92e,0xa92f),
+ S(0xa95f), R(0xa9c1,0xa9cd), R(0xa9de,0xa9df), R(0xaa5c,0xaa5f), R(0xaa77,0xaa79), R(0xaade,0xaadf),
+ R(0xaaf0,0xaaf1), S(0xab5b), R(0xab6a,0xab6b), S(0xabeb), S(0xfb29), R(0xfbb2,0xfbc2), R(0xfd3e,0xfd4f),
+ S(0xfdcf), R(0xfdfc,0xfdff), R(0xfe10,0xfe19), R(0xfe30,0xfe52), R(0xfe54,0xfe66), R(0xfe68,0xfe6b),
+ R(0xff01,0xff0f), R(0xff1a,0xff20), R(0xff3b,0xff40), R(0xff5b,0xff65), R(0xffe0,0xffe6),
+ R(0xffe8,0xffee), R(0xfffc,0xfffd), R(0x10100,0x10102), R(0x10137,0x1013f), R(0x10179,0x10189),
+ R(0x1018c,0x1018e), R(0x10190,0x1019c), S(0x101a0), R(0x101d0,0x101fc), S(0x1039f), S(0x103d0),
+ S(0x1056f), S(0x10857), R(0x10877,0x10878), S(0x1091f), S(0x1093f), R(0x10a50,0x10a58), S(0x10a7f),
+ S(0x10ac8), R(0x10af0,0x10af6), R(0x10b39,0x10b3f), R(0x10b99,0x10b9c), S(0x10ead), R(0x10f55,0x10f59),
+ R(0x10f86,0x10f89), R(0x11047,0x1104d), R(0x110bb,0x110bc), R(0x110be,0x110c1), R(0x11140,0x11143),
+ R(0x11174,0x11175), R(0x111c5,0x111c8), S(0x111cd), S(0x111db), R(0x111dd,0x111df), R(0x11238,0x1123d),
+ S(0x112a9), R(0x1144b,0x1144f), R(0x1145a,0x1145b), S(0x1145d), S(0x114c6), R(0x115c1,0x115d7),
+ R(0x11641,0x11643), R(0x11660,0x1166c), S(0x116b9), R(0x1173c,0x1173f), S(0x1183b), R(0x11944,0x11946),
+ S(0x119e2), R(0x11a3f,0x11a46), R(0x11a9a,0x11a9c), R(0x11a9e,0x11aa2), R(0x11b00,0x11b09),
+ R(0x11c41,0x11c45), R(0x11c70,0x11c71), R(0x11ef7,0x11ef8), R(0x11f43,0x11f4f), R(0x11fd5,0x11ff1),
+ S(0x11fff), R(0x12470,0x12474), R(0x12ff1,0x12ff2), R(0x16a6e,0x16a6f), S(0x16af5), R(0x16b37,0x16b3f),
+ R(0x16b44,0x16b45), R(0x16e97,0x16e9a), S(0x16fe2), S(0x1bc9c), S(0x1bc9f), R(0x1cf50,0x1cfc3),
+ R(0x1d000,0x1d0f5), R(0x1d100,0x1d126), R(0x1d129,0x1d164), R(0x1d16a,0x1d16c), R(0x1d183,0x1d184),
+ R(0x1d18c,0x1d1a9), R(0x1d1ae,0x1d1ea), R(0x1d200,0x1d241), S(0x1d245), R(0x1d300,0x1d356), S(0x1d6c1),
+ S(0x1d6db), S(0x1d6fb), S(0x1d715), S(0x1d735), S(0x1d74f), S(0x1d76f), S(0x1d789), S(0x1d7a9),
+ S(0x1d7c3), R(0x1d800,0x1d9ff), R(0x1da37,0x1da3a), R(0x1da6d,0x1da74), R(0x1da76,0x1da83),
+ R(0x1da85,0x1da8b), S(0x1e14f), S(0x1e2ff), R(0x1e95e,0x1e95f), S(0x1ecac), S(0x1ecb0), S(0x1ed2e),
+ R(0x1eef0,0x1eef1), R(0x1f000,0x1f02b), R(0x1f030,0x1f093), R(0x1f0a0,0x1f0ae), R(0x1f0b1,0x1f0bf),
+ R(0x1f0c1,0x1f0cf), R(0x1f0d1,0x1f0f5), R(0x1f10d,0x1f1ad), R(0x1f1e6,0x1f202), R(0x1f210,0x1f23b),
+ R(0x1f240,0x1f248), R(0x1f250,0x1f251), R(0x1f260,0x1f265), R(0x1f300,0x1f6d7), R(0x1f6dc,0x1f6ec),
+ R(0x1f6f0,0x1f6fc), R(0x1f700,0x1f776), R(0x1f77b,0x1f7d9), R(0x1f7e0,0x1f7eb), S(0x1f7f0),
+ R(0x1f800,0x1f80b), R(0x1f810,0x1f847), R(0x1f850,0x1f859), R(0x1f860,0x1f887), R(0x1f890,0x1f8ad),
+ R(0x1f8b0,0x1f8b1), R(0x1f900,0x1fa53), R(0x1fa60,0x1fa6d), R(0x1fa70,0x1fa7c), R(0x1fa80,0x1fa88),
+ R(0x1fa90,0x1fabd), R(0x1fabf,0x1fac5), R(0x1face,0x1fadb), R(0x1fae0,0x1fae8), R(0x1faf0,0x1faf8),
+ R(0x1fb00,0x1fb92), R(0x1fb94,0x1fbca)
};
#undef R
#undef S
@@ -639,13 +700,14 @@ struct MD_UNICODE_FOLD_INFO_tag {
R(0x1f68,0x1f6f), S(0x1fb8), S(0x1fb9), S(0x1fba), S(0x1fbb), S(0x1fbe), R(0x1fc8,0x1fcb), S(0x1fd8),
S(0x1fd9), S(0x1fda), S(0x1fdb), S(0x1fe8), S(0x1fe9), S(0x1fea), S(0x1feb), S(0x1fec), S(0x1ff8),
S(0x1ff9), S(0x1ffa), S(0x1ffb), S(0x2126), S(0x212a), S(0x212b), S(0x2132), R(0x2160,0x216f), S(0x2183),
- R(0x24b6,0x24cf), R(0x2c00,0x2c2e), S(0x2c60), S(0x2c62), S(0x2c63), S(0x2c64), R(0x2c67,0x2c6b),
+ R(0x24b6,0x24cf), R(0x2c00,0x2c2f), S(0x2c60), S(0x2c62), S(0x2c63), S(0x2c64), R(0x2c67,0x2c6b),
S(0x2c6d), S(0x2c6e), S(0x2c6f), S(0x2c70), S(0x2c72), S(0x2c75), S(0x2c7e), S(0x2c7f), R(0x2c80,0x2ce2),
S(0x2ceb), S(0x2ced), S(0x2cf2), R(0xa640,0xa66c), R(0xa680,0xa69a), R(0xa722,0xa72e), R(0xa732,0xa76e),
S(0xa779), S(0xa77b), S(0xa77d), R(0xa77e,0xa786), S(0xa78b), S(0xa78d), S(0xa790), S(0xa792),
R(0xa796,0xa7a8), S(0xa7aa), S(0xa7ab), S(0xa7ac), S(0xa7ad), S(0xa7ae), S(0xa7b0), S(0xa7b1), S(0xa7b2),
- S(0xa7b3), R(0xa7b4,0xa7be), S(0xa7c2), S(0xa7c4), S(0xa7c5), S(0xa7c6), S(0xa7c7), S(0xa7c9), S(0xa7f5),
- R(0xab70,0xabbf), R(0xff21,0xff3a), R(0x10400,0x10427), R(0x104b0,0x104d3), R(0x10c80,0x10cb2),
+ S(0xa7b3), R(0xa7b4,0xa7c2), S(0xa7c4), S(0xa7c5), S(0xa7c6), S(0xa7c7), S(0xa7c9), S(0xa7d0), S(0xa7d6),
+ S(0xa7d8), S(0xa7f5), R(0xab70,0xabbf), R(0xff21,0xff3a), R(0x10400,0x10427), R(0x104b0,0x104d3),
+ R(0x10570,0x1057a), R(0x1057c,0x1058a), R(0x1058c,0x10592), S(0x10594), S(0x10595), R(0x10c80,0x10cb2),
R(0x118a0,0x118bf), R(0x16e40,0x16e5f), R(0x1e900,0x1e921)
};
static const unsigned FOLD_MAP_1_DATA[] = {
@@ -664,13 +726,13 @@ struct MD_UNICODE_FOLD_INFO_tag {
0x1f10, 0x1f15, 0x1f20, 0x1f27, 0x1f30, 0x1f37, 0x1f40, 0x1f45, 0x1f51, 0x1f53, 0x1f55, 0x1f57, 0x1f60,
0x1f67, 0x1fb0, 0x1fb1, 0x1f70, 0x1f71, 0x03b9, 0x1f72, 0x1f75, 0x1fd0, 0x1fd1, 0x1f76, 0x1f77, 0x1fe0,
0x1fe1, 0x1f7a, 0x1f7b, 0x1fe5, 0x1f78, 0x1f79, 0x1f7c, 0x1f7d, 0x03c9, 0x006b, 0x00e5, 0x214e, 0x2170,
- 0x217f, 0x2184, 0x24d0, 0x24e9, 0x2c30, 0x2c5e, 0x2c61, 0x026b, 0x1d7d, 0x027d, 0x2c68, 0x2c6c, 0x0251,
+ 0x217f, 0x2184, 0x24d0, 0x24e9, 0x2c30, 0x2c5f, 0x2c61, 0x026b, 0x1d7d, 0x027d, 0x2c68, 0x2c6c, 0x0251,
0x0271, 0x0250, 0x0252, 0x2c73, 0x2c76, 0x023f, 0x0240, 0x2c81, 0x2ce3, 0x2cec, 0x2cee, 0x2cf3, 0xa641,
0xa66d, 0xa681, 0xa69b, 0xa723, 0xa72f, 0xa733, 0xa76f, 0xa77a, 0xa77c, 0x1d79, 0xa77f, 0xa787, 0xa78c,
0x0265, 0xa791, 0xa793, 0xa797, 0xa7a9, 0x0266, 0x025c, 0x0261, 0x026c, 0x026a, 0x029e, 0x0287, 0x029d,
- 0xab53, 0xa7b5, 0xa7bf, 0xa7c3, 0xa794, 0x0282, 0x1d8e, 0xa7c8, 0xa7ca, 0xa7f6, 0x13a0, 0x13ef, 0xff41,
- 0xff5a, 0x10428, 0x1044f, 0x104d8, 0x104fb, 0x10cc0, 0x10cf2, 0x118c0, 0x118df, 0x16e60, 0x16e7f, 0x1e922,
- 0x1e943
+ 0xab53, 0xa7b5, 0xa7c3, 0xa794, 0x0282, 0x1d8e, 0xa7c8, 0xa7ca, 0xa7d1, 0xa7d7, 0xa7d9, 0xa7f6, 0x13a0,
+ 0x13ef, 0xff41, 0xff5a, 0x10428, 0x1044f, 0x104d8, 0x104fb, 0x10597, 0x105a1, 0x105a3, 0x105b1, 0x105b3,
+ 0x105b9, 0x105bb, 0x105bc, 0x10cc0, 0x10cf2, 0x118c0, 0x118df, 0x16e60, 0x16e7f, 0x1e922, 0x1e943
};
static const unsigned FOLD_MAP_2[] = {
S(0x00df), S(0x0130), S(0x0149), S(0x01f0), S(0x0587), S(0x1e96), S(0x1e97), S(0x1e98), S(0x1e99),
@@ -923,7 +985,7 @@ struct MD_UNICODE_FOLD_INFO_tag {
* what the caller should allocate.)
*/
static void
-md_merge_lines(MD_CTX* ctx, OFF beg, OFF end, const MD_LINE* lines, int n_lines,
+md_merge_lines(MD_CTX* ctx, OFF beg, OFF end, const MD_LINE* lines, MD_SIZE n_lines,
CHAR line_break_replacement_char, CHAR* buffer, SZ* p_size)
{
CHAR* ptr = buffer;
@@ -960,7 +1022,7 @@ md_merge_lines(MD_CTX* ctx, OFF beg, OFF end, const MD_LINE* lines, int n_lines,
/* Wrapper of md_merge_lines() which allocates new buffer for the output string.
*/
static int
-md_merge_lines_alloc(MD_CTX* ctx, OFF beg, OFF end, const MD_LINE* lines, int n_lines,
+md_merge_lines_alloc(MD_CTX* ctx, OFF beg, OFF end, const MD_LINE* lines, MD_SIZE n_lines,
CHAR line_break_replacement_char, CHAR** p_str, SZ* p_size)
{
CHAR* buffer;
@@ -1007,12 +1069,12 @@ md_skip_unicode_whitespace(const CHAR* label, OFF off, SZ size)
* by n_lines == 0.
*/
static int
-md_is_html_tag(MD_CTX* ctx, const MD_LINE* lines, int n_lines, OFF beg, OFF max_end, OFF* p_end)
+md_is_html_tag(MD_CTX* ctx, const MD_LINE* lines, MD_SIZE n_lines, OFF beg, OFF max_end, OFF* p_end)
{
int attr_state;
OFF off = beg;
OFF line_end = (n_lines > 0) ? lines[0].end : ctx->size;
- int i = 0;
+ MD_SIZE line_index = 0;
MD_ASSERT(CH(beg) == _T('<'));
@@ -1102,12 +1164,12 @@ md_is_html_tag(MD_CTX* ctx, const MD_LINE* lines, int n_lines, OFF beg, OFF max_
if(n_lines == 0)
return FALSE;
- i++;
- if(i >= n_lines)
+ line_index++;
+ if(line_index >= n_lines)
return FALSE;
- off = lines[i].beg;
- line_end = lines[i].end;
+ off = lines[line_index].beg;
+ line_end = lines[line_index].end;
if(attr_state == 0 || attr_state == 41)
attr_state = 1;
@@ -1126,12 +1188,12 @@ done:
static int
md_scan_for_html_closer(MD_CTX* ctx, const MD_CHAR* str, MD_SIZE len,
- const MD_LINE* lines, int n_lines,
+ const MD_LINE* lines, MD_SIZE n_lines,
OFF beg, OFF max_end, OFF* p_end,
OFF* p_scan_horizon)
{
OFF off = beg;
- int i = 0;
+ MD_SIZE line_index = 0;
if(off < *p_scan_horizon && *p_scan_horizon >= max_end - len) {
/* We have already scanned the range up to the max_end so we know
@@ -1140,7 +1202,7 @@ md_scan_for_html_closer(MD_CTX* ctx, const MD_CHAR* str, MD_SIZE len,
}
while(TRUE) {
- while(off + len <= lines[i].end && off + len <= max_end) {
+ while(off + len <= lines[line_index].end && off + len <= max_end) {
if(md_ascii_eq(STR(off), str, len)) {
/* Success. */
*p_end = off + len;
@@ -1149,19 +1211,19 @@ md_scan_for_html_closer(MD_CTX* ctx, const MD_CHAR* str, MD_SIZE len,
off++;
}
- i++;
- if(off >= max_end || i >= n_lines) {
+ line_index++;
+ if(off >= max_end || line_index >= n_lines) {
/* Failure. */
*p_scan_horizon = off;
return FALSE;
}
- off = lines[i].beg;
+ off = lines[line_index].beg;
}
}
static int
-md_is_html_comment(MD_CTX* ctx, const MD_LINE* lines, int n_lines, OFF beg, OFF max_end, OFF* p_end)
+md_is_html_comment(MD_CTX* ctx, const MD_LINE* lines, MD_SIZE n_lines, OFF beg, OFF max_end, OFF* p_end)
{
OFF off = beg;
@@ -1171,30 +1233,17 @@ md_is_html_comment(MD_CTX* ctx, const MD_LINE* lines, int n_lines, OFF beg, OFF
return FALSE;
if(CH(off+1) != _T('!') || CH(off+2) != _T('-') || CH(off+3) != _T('-'))
return FALSE;
- off += 4;
-
- /* ">" and "->" must not follow the opening. */
- if(off < lines[0].end && CH(off) == _T('>'))
- return FALSE;
- if(off+1 < lines[0].end && CH(off) == _T('-') && CH(off+1) == _T('>'))
- return FALSE;
- /* HTML comment must not contain "--", so we scan just for "--" instead
- * of "-->" and verify manually that '>' follows. */
- if(md_scan_for_html_closer(ctx, _T("--"), 2,
- lines, n_lines, off, max_end, p_end, &ctx->html_comment_horizon))
- {
- if(*p_end < max_end && CH(*p_end) == _T('>')) {
- *p_end = *p_end + 1;
- return TRUE;
- }
- }
+ /* Skip only "<!" so that we accept also "<!-->" or "<!--->" */
+ off += 2;
- return FALSE;
+ /* Scan for ordinary comment closer "-->". */
+ return md_scan_for_html_closer(ctx, _T("-->"), 3,
+ lines, n_lines, off, max_end, p_end, &ctx->html_comment_horizon);
}
static int
-md_is_html_processing_instruction(MD_CTX* ctx, const MD_LINE* lines, int n_lines, OFF beg, OFF max_end, OFF* p_end)
+md_is_html_processing_instruction(MD_CTX* ctx, const MD_LINE* lines, MD_SIZE n_lines, OFF beg, OFF max_end, OFF* p_end)
{
OFF off = beg;
@@ -1209,7 +1258,7 @@ md_is_html_processing_instruction(MD_CTX* ctx, const MD_LINE* lines, int n_lines
}
static int
-md_is_html_declaration(MD_CTX* ctx, const MD_LINE* lines, int n_lines, OFF beg, OFF max_end, OFF* p_end)
+md_is_html_declaration(MD_CTX* ctx, const MD_LINE* lines, MD_SIZE n_lines, OFF beg, OFF max_end, OFF* p_end)
{
OFF off = beg;
@@ -1225,15 +1274,13 @@ md_is_html_declaration(MD_CTX* ctx, const MD_LINE* lines, int n_lines, OFF beg,
off++;
while(off < lines[0].end && ISALPHA(off))
off++;
- if(off < lines[0].end && !ISWHITESPACE(off))
- return FALSE;
return md_scan_for_html_closer(ctx, _T(">"), 1,
lines, n_lines, off, max_end, p_end, &ctx->html_decl_horizon);
}
static int
-md_is_html_cdata(MD_CTX* ctx, const MD_LINE* lines, int n_lines, OFF beg, OFF max_end, OFF* p_end)
+md_is_html_cdata(MD_CTX* ctx, const MD_LINE* lines, MD_SIZE n_lines, OFF beg, OFF max_end, OFF* p_end)
{
static const CHAR open_str[] = _T("<![CDATA[");
static const SZ open_size = SIZEOF_ARRAY(open_str) - 1;
@@ -1246,15 +1293,12 @@ md_is_html_cdata(MD_CTX* ctx, const MD_LINE* lines, int n_lines, OFF beg, OFF ma
return FALSE;
off += open_size;
- if(lines[n_lines-1].end < max_end)
- max_end = lines[n_lines-1].end - 2;
-
return md_scan_for_html_closer(ctx, _T("]]>"), 3,
lines, n_lines, off, max_end, p_end, &ctx->html_cdata_horizon);
}
static int
-md_is_html_any(MD_CTX* ctx, const MD_LINE* lines, int n_lines, OFF beg, OFF max_end, OFF* p_end)
+md_is_html_any(MD_CTX* ctx, const MD_LINE* lines, MD_SIZE n_lines, OFF beg, OFF max_end, OFF* p_end)
{
MD_ASSERT(CH(beg) == _T('<'));
return (md_is_html_tag(ctx, lines, n_lines, beg, max_end, p_end) ||
@@ -1882,14 +1926,14 @@ struct MD_LINK_ATTR_tag {
static int
-md_is_link_label(MD_CTX* ctx, const MD_LINE* lines, int n_lines, OFF beg,
- OFF* p_end, int* p_beg_line_index, int* p_end_line_index,
+md_is_link_label(MD_CTX* ctx, const MD_LINE* lines, MD_SIZE n_lines, OFF beg,
+ OFF* p_end, MD_SIZE* p_beg_line_index, MD_SIZE* p_end_line_index,
OFF* p_contents_beg, OFF* p_contents_end)
{
OFF off = beg;
OFF contents_beg = 0;
OFF contents_end = 0;
- int line_index = 0;
+ MD_SIZE line_index = 0;
int len = 0;
if(CH(off) != _T('['))
@@ -2039,13 +2083,13 @@ md_is_link_destination(MD_CTX* ctx, OFF beg, OFF max_end, OFF* p_end,
}
static int
-md_is_link_title(MD_CTX* ctx, const MD_LINE* lines, int n_lines, OFF beg,
- OFF* p_end, int* p_beg_line_index, int* p_end_line_index,
+md_is_link_title(MD_CTX* ctx, const MD_LINE* lines, MD_SIZE n_lines, OFF beg,
+ OFF* p_end, MD_SIZE* p_beg_line_index, MD_SIZE* p_end_line_index,
OFF* p_contents_beg, OFF* p_contents_end)
{
OFF off = beg;
CHAR closer_char;
- int line_index = 0;
+ MD_SIZE line_index = 0;
/* White space with up to one line break. */
while(off < lines[line_index].end && ISWHITESPACE(off))
@@ -2107,21 +2151,21 @@ md_is_link_title(MD_CTX* ctx, const MD_LINE* lines, int n_lines, OFF beg,
* Returns -1 in case of an error (out of memory).
*/
static int
-md_is_link_reference_definition(MD_CTX* ctx, const MD_LINE* lines, int n_lines)
+md_is_link_reference_definition(MD_CTX* ctx, const MD_LINE* lines, MD_SIZE n_lines)
{
OFF label_contents_beg;
OFF label_contents_end;
- int label_contents_line_index = -1;
+ MD_SIZE label_contents_line_index;
int label_is_multiline = FALSE;
OFF dest_contents_beg;
OFF dest_contents_end;
OFF title_contents_beg;
OFF title_contents_end;
- int title_contents_line_index;
+ MD_SIZE title_contents_line_index;
int title_is_multiline = FALSE;
OFF off;
- int line_index = 0;
- int tmp_line_index;
+ MD_SIZE line_index = 0;
+ MD_SIZE tmp_line_index;
MD_REF_DEF* def = NULL;
int ret = 0;
@@ -2229,7 +2273,7 @@ abort:
}
static int
-md_is_link_reference(MD_CTX* ctx, const MD_LINE* lines, int n_lines,
+md_is_link_reference(MD_CTX* ctx, const MD_LINE* lines, MD_SIZE n_lines,
OFF beg, OFF end, MD_LINK_ATTR* attr)
{
const MD_REF_DEF* def;
@@ -2246,7 +2290,7 @@ md_is_link_reference(MD_CTX* ctx, const MD_LINE* lines, int n_lines,
end--;
/* Find lines corresponding to the beg and end positions. */
- beg_line = md_lookup_line(beg, lines, n_lines);
+ beg_line = md_lookup_line(beg, lines, n_lines, NULL);
is_multiline = (end > beg_line->end);
if(is_multiline) {
@@ -2276,14 +2320,14 @@ abort:
}
static int
-md_is_inline_link_spec(MD_CTX* ctx, const MD_LINE* lines, int n_lines,
+md_is_inline_link_spec(MD_CTX* ctx, const MD_LINE* lines, MD_SIZE n_lines,
OFF beg, OFF* p_end, MD_LINK_ATTR* attr)
{
- int line_index = 0;
- int tmp_line_index;
+ MD_SIZE line_index = 0;
+ MD_SIZE tmp_line_index;
OFF title_contents_beg;
OFF title_contents_end;
- int title_contents_line_index;
+ MD_SIZE title_contents_line_index;
int title_is_multiline;
OFF off = beg;
int ret = FALSE;
@@ -2340,7 +2384,7 @@ md_is_inline_link_spec(MD_CTX* ctx, const MD_LINE* lines, int n_lines,
/* Optional whitespace followed with final ')'. */
while(off < lines[line_index].end && ISWHITESPACE(off))
off++;
- if (off >= lines[line_index].end && (off >= ctx->size || ISNEWLINE(off))) {
+ if(off >= lines[line_index].end) {
line_index++;
if(line_index >= n_lines)
return FALSE;
@@ -2460,11 +2504,11 @@ struct MD_MARK_tag {
OFF beg;
OFF end;
- /* For unresolved openers, 'prev' and 'next' form the chain of open openers
- * of given type 'ch'.
+ /* For unresolved openers, 'next' may be used to form a stack of
+ * unresolved open openers.
*
- * During resolving, we disconnect from the chain and point to the
- * corresponding counterpart so opener points to its closer and vice versa.
+ * When resolved with MD_MARK_OPENER/CLOSER flag, next/prev is index of the
+ * respective closer/opener.
*/
int prev;
int next;
@@ -2480,48 +2524,60 @@ struct MD_MARK_tag {
#define MD_MARK_RESOLVED 0x10 /* Resolved in any definite way. */
/* Mark flags specific for various mark types (so they can share bits). */
-#define MD_MARK_EMPH_INTRAWORD 0x20 /* Helper for the "rule of 3". */
+#define MD_MARK_EMPH_OC 0x20 /* Opener/closer mixed candidate. Helper for the "rule of 3". */
#define MD_MARK_EMPH_MOD3_0 0x40
#define MD_MARK_EMPH_MOD3_1 0x80
#define MD_MARK_EMPH_MOD3_2 (0x40 | 0x80)
#define MD_MARK_EMPH_MOD3_MASK (0x40 | 0x80)
#define MD_MARK_AUTOLINK 0x20 /* Distinguisher for '<', '>'. */
+#define MD_MARK_AUTOLINK_MISSING_MAILTO 0x40
#define MD_MARK_VALIDPERMISSIVEAUTOLINK 0x20 /* For permissive autolinks. */
#define MD_MARK_HASNESTEDBRACKETS 0x20 /* For '[' to rule out invalid link labels early */
-static MD_MARKCHAIN*
-md_asterisk_chain(MD_CTX* ctx, unsigned flags)
+static MD_MARKSTACK*
+md_emph_stack(MD_CTX* ctx, MD_CHAR ch, unsigned flags)
{
- switch(flags & (MD_MARK_EMPH_INTRAWORD | MD_MARK_EMPH_MOD3_MASK)) {
- case MD_MARK_EMPH_INTRAWORD | MD_MARK_EMPH_MOD3_0: return &ASTERISK_OPENERS_intraword_mod3_0;
- case MD_MARK_EMPH_INTRAWORD | MD_MARK_EMPH_MOD3_1: return &ASTERISK_OPENERS_intraword_mod3_1;
- case MD_MARK_EMPH_INTRAWORD | MD_MARK_EMPH_MOD3_2: return &ASTERISK_OPENERS_intraword_mod3_2;
- case MD_MARK_EMPH_MOD3_0: return &ASTERISK_OPENERS_extraword_mod3_0;
- case MD_MARK_EMPH_MOD3_1: return &ASTERISK_OPENERS_extraword_mod3_1;
- case MD_MARK_EMPH_MOD3_2: return &ASTERISK_OPENERS_extraword_mod3_2;
- default: MD_UNREACHABLE();
+ MD_MARKSTACK* stack;
+
+ switch(ch) {
+ case '*': stack = &ASTERISK_OPENERS_oo_mod3_0; break;
+ case '_': stack = &UNDERSCORE_OPENERS_oo_mod3_0; break;
+ default: MD_UNREACHABLE();
}
- return NULL;
+
+ if(flags & MD_MARK_EMPH_OC)
+ stack += 3;
+
+ switch(flags & MD_MARK_EMPH_MOD3_MASK) {
+ case MD_MARK_EMPH_MOD3_0: stack += 0; break;
+ case MD_MARK_EMPH_MOD3_1: stack += 1; break;
+ case MD_MARK_EMPH_MOD3_2: stack += 2; break;
+ default: MD_UNREACHABLE();
+ }
+
+ return stack;
}
-static MD_MARKCHAIN*
-md_mark_chain(MD_CTX* ctx, int mark_index)
+static MD_MARKSTACK*
+md_opener_stack(MD_CTX* ctx, int mark_index)
{
MD_MARK* mark = &ctx->marks[mark_index];
switch(mark->ch) {
- case _T('*'): return md_asterisk_chain(ctx, mark->flags);
- case _T('_'): return &UNDERSCORE_OPENERS;
+ case _T('*'):
+ case _T('_'): return md_emph_stack(ctx, mark->ch, mark->flags);
+
case _T('~'): return (mark->end - mark->beg == 1) ? &TILDE_OPENERS_1 : &TILDE_OPENERS_2;
- case _T('!'): MD_FALLTHROUGH();
+
+ case _T('!'):
case _T('['): return &BRACKET_OPENERS;
- case _T('|'): return &TABLECELLBOUNDARIES;
- default: return NULL;
+
+ default: MD_UNREACHABLE();
}
}
static MD_MARK*
-md_push_mark(MD_CTX* ctx)
+md_add_mark(MD_CTX* ctx)
{
if(ctx->n_marks >= ctx->alloc_marks) {
MD_MARK* new_marks;
@@ -2541,18 +2597,18 @@ md_push_mark(MD_CTX* ctx)
return &ctx->marks[ctx->n_marks++];
}
-#define PUSH_MARK_() \
+#define ADD_MARK_() \
do { \
- mark = md_push_mark(ctx); \
+ mark = md_add_mark(ctx); \
if(mark == NULL) { \
ret = -1; \
goto abort; \
} \
} while(0)
-#define PUSH_MARK(ch_, beg_, end_, flags_) \
+#define ADD_MARK(ch_, beg_, end_, flags_) \
do { \
- PUSH_MARK_(); \
+ ADD_MARK_(); \
mark->beg = (beg_); \
mark->end = (end_); \
mark->prev = -1; \
@@ -2562,17 +2618,20 @@ md_push_mark(MD_CTX* ctx)
} while(0)
-static void
-md_mark_chain_append(MD_CTX* ctx, MD_MARKCHAIN* chain, int mark_index)
+static inline void
+md_mark_stack_push(MD_CTX* ctx, MD_MARKSTACK* stack, int mark_index)
{
- if(chain->tail >= 0)
- ctx->marks[chain->tail].next = mark_index;
- else
- chain->head = mark_index;
+ ctx->marks[mark_index].next = stack->top;
+ stack->top = mark_index;
+}
- ctx->marks[mark_index].prev = chain->tail;
- ctx->marks[mark_index].next = -1;
- chain->tail = mark_index;
+static inline int
+md_mark_stack_pop(MD_CTX* ctx, MD_MARKSTACK* stack)
+{
+ int top = stack->top;
+ if(top >= 0)
+ stack->top = ctx->marks[top].next;
+ return top;
}
/* Sometimes, we need to store a pointer into the mark. It is quite rare
@@ -2599,120 +2658,52 @@ md_mark_get_ptr(MD_CTX* ctx, int mark_index)
return ptr;
}
-static void
-md_resolve_range(MD_CTX* ctx, MD_MARKCHAIN* chain, int opener_index, int closer_index)
+static inline void
+md_resolve_range(MD_CTX* ctx, int opener_index, int closer_index)
{
MD_MARK* opener = &ctx->marks[opener_index];
MD_MARK* closer = &ctx->marks[closer_index];
- /* Remove opener from the list of openers. */
- if(chain != NULL) {
- if(opener->prev >= 0)
- ctx->marks[opener->prev].next = opener->next;
- else
- chain->head = opener->next;
-
- if(opener->next >= 0)
- ctx->marks[opener->next].prev = opener->prev;
- else
- chain->tail = opener->prev;
- }
-
/* Interconnect opener and closer and mark both as resolved. */
opener->next = closer_index;
- opener->flags |= MD_MARK_OPENER | MD_MARK_RESOLVED;
closer->prev = opener_index;
+
+ opener->flags |= MD_MARK_OPENER | MD_MARK_RESOLVED;
closer->flags |= MD_MARK_CLOSER | MD_MARK_RESOLVED;
}
-#define MD_ROLLBACK_ALL 0
-#define MD_ROLLBACK_CROSSING 1
+#define MD_ROLLBACK_CROSSING 0
+#define MD_ROLLBACK_ALL 1
/* In the range ctx->marks[opener_index] ... [closer_index], undo some or all
* resolvings accordingly to these rules:
*
- * (1) All openers BEFORE the range corresponding to any closer inside the
- * range are un-resolved and they are re-added to their respective chains
- * of unresolved openers. This ensures we can reuse the opener for closers
- * AFTER the range.
+ * (1) All stacks of openers are cut so that any pending potential openers
+ * are discarded from future consideration.
*
* (2) If 'how' is MD_ROLLBACK_ALL, then ALL resolved marks inside the range
- * are discarded.
+ * are thrown away and turned into dummy marks ('D').
*
- * (3) If 'how' is MD_ROLLBACK_CROSSING, only closers with openers handled
- * in (1) are discarded. I.e. pairs of openers and closers which are both
- * inside the range are retained as well as any unpaired marks.
+ * WARNING: Do not call for arbitrary range of opener and closer.
+ * This must form (potentially) valid range not crossing nesting boundaries
+ * of already resolved ranges.
*/
static void
md_rollback(MD_CTX* ctx, int opener_index, int closer_index, int how)
{
int i;
- int mark_index;
-
- /* Cut all unresolved openers at the mark index. */
- for(i = OPENERS_CHAIN_FIRST; i < OPENERS_CHAIN_LAST+1; i++) {
- MD_MARKCHAIN* chain = &ctx->mark_chains[i];
-
- while(chain->tail >= opener_index) {
- int same = chain->tail == opener_index;
- chain->tail = ctx->marks[chain->tail].prev;
- if (same) break;
- }
-
- if(chain->tail >= 0)
- ctx->marks[chain->tail].next = -1;
- else
- chain->head = -1;
- }
-
- /* Go backwards so that unresolved openers are re-added into their
- * respective chains, in the right order. */
- mark_index = closer_index - 1;
- while(mark_index > opener_index) {
- MD_MARK* mark = &ctx->marks[mark_index];
- int mark_flags = mark->flags;
- int discard_flag = (how == MD_ROLLBACK_ALL);
-
- if(mark->flags & MD_MARK_CLOSER) {
- int mark_opener_index = mark->prev;
-
- /* Undo opener BEFORE the range. */
- if(mark_opener_index < opener_index) {
- MD_MARK* mark_opener = &ctx->marks[mark_opener_index];
- MD_MARKCHAIN* chain;
-
- mark_opener->flags &= ~(MD_MARK_OPENER | MD_MARK_CLOSER | MD_MARK_RESOLVED);
- chain = md_mark_chain(ctx, opener_index);
- if(chain != NULL) {
- md_mark_chain_append(ctx, chain, mark_opener_index);
- discard_flag = 1;
- }
- }
- }
-
- /* And reset our flags. */
- if(discard_flag) {
- /* Make zero-length closer a dummy mark as that's how it was born */
- if((mark->flags & MD_MARK_CLOSER) && mark->beg == mark->end)
- mark->ch = 'D';
- mark->flags &= ~(MD_MARK_OPENER | MD_MARK_CLOSER | MD_MARK_RESOLVED);
- }
+ for(i = 0; i < (int) SIZEOF_ARRAY(ctx->opener_stacks); i++) {
+ MD_MARKSTACK* stack = &ctx->opener_stacks[i];
+ while(stack->top >= opener_index)
+ md_mark_stack_pop(ctx, stack);
+ }
- /* Jump as far as we can over unresolved or non-interesting marks. */
- switch(how) {
- case MD_ROLLBACK_CROSSING:
- if((mark_flags & MD_MARK_CLOSER) && mark->prev > opener_index) {
- /* If we are closer with opener INSIDE the range, there may
- * not be any other crosser inside the subrange. */
- mark_index = mark->prev;
- break;
- }
- MD_FALLTHROUGH();
- default:
- mark_index--;
- break;
+ if(how == MD_ROLLBACK_ALL) {
+ for(i = opener_index + 1; i < closer_index; i++) {
+ ctx->marks[i].ch = 'D';
+ ctx->marks[i].flags = 0;
}
}
}
@@ -2763,15 +2754,9 @@ md_build_mark_char_map(MD_CTX* ctx)
}
}
-/* We limit code span marks to lower than 32 backticks. This solves the
- * pathologic case of too many openers, each of different length: Their
- * resolving would be then O(n^2). */
-#define CODESPAN_MARK_MAXLEN 32
-
static int
-md_is_code_span(MD_CTX* ctx, const MD_LINE* lines, int n_lines, OFF beg,
- OFF* p_opener_beg, OFF* p_opener_end,
- OFF* p_closer_beg, OFF* p_closer_end,
+md_is_code_span(MD_CTX* ctx, const MD_LINE* lines, MD_SIZE n_lines, OFF beg,
+ MD_MARK* opener, MD_MARK* closer,
OFF last_potential_closers[CODESPAN_MARK_MAXLEN],
int* p_reached_paragraph_end)
{
@@ -2786,7 +2771,7 @@ md_is_code_span(MD_CTX* ctx, const MD_LINE* lines, int n_lines, OFF beg,
int has_space_before_closer = FALSE;
int has_eol_before_closer = FALSE;
int has_only_space = TRUE;
- int line_index = 0;
+ MD_SIZE line_index = 0;
line_end = lines[0].end;
opener_end = opener_beg;
@@ -2796,7 +2781,7 @@ md_is_code_span(MD_CTX* ctx, const MD_LINE* lines, int n_lines, OFF beg,
has_eol_after_opener = (opener_end == line_end);
/* The caller needs to know end of the opening mark even if we fail. */
- *p_opener_end = opener_end;
+ opener->end = opener_end;
mark_len = opener_end - opener_beg;
if(mark_len > CODESPAN_MARK_MAXLEN)
@@ -2872,18 +2857,22 @@ md_is_code_span(MD_CTX* ctx, const MD_LINE* lines, int n_lines, OFF beg,
if(has_space_before_closer)
closer_beg--;
else {
+ /* Go back to the end of prev line */
closer_beg = lines[line_index-1].end;
- /* We need to eat the preceding "\r\n" but not any line trailing
- * spaces. */
+ /* But restore any trailing whitespace */
while(closer_beg < ctx->size && ISBLANK(closer_beg))
closer_beg++;
}
}
- *p_opener_beg = opener_beg;
- *p_opener_end = opener_end;
- *p_closer_beg = closer_beg;
- *p_closer_end = closer_end;
+ opener->ch = _T('`');
+ opener->beg = opener_beg;
+ opener->end = opener_end;
+ opener->flags = MD_MARK_POTENTIAL_OPENER;
+ closer->ch = _T('`');
+ closer->beg = closer_beg;
+ closer->end = closer_end;
+ closer->flags = MD_MARK_POTENTIAL_CLOSER;
return TRUE;
}
@@ -2993,18 +2982,17 @@ md_is_autolink(MD_CTX* ctx, OFF beg, OFF max_end, OFF* p_end, int* p_missing_mai
}
static int
-md_collect_marks(MD_CTX* ctx, const MD_LINE* lines, int n_lines, int table_mode)
+md_collect_marks(MD_CTX* ctx, const MD_LINE* lines, MD_SIZE n_lines, int table_mode)
{
- const MD_LINE* line_term = lines + n_lines;
- const MD_LINE* line;
+ MD_SIZE line_index;
int ret = 0;
MD_MARK* mark;
OFF codespan_last_potential_closers[CODESPAN_MARK_MAXLEN] = { 0 };
int codespan_scanned_till_paragraph_end = FALSE;
- for(line = lines; line < line_term; line++) {
+ for(line_index = 0; line_index < n_lines; line_index++) {
+ const MD_LINE* line = &lines[line_index];
OFF off = line->beg;
- OFF line_end = line->end;
while(TRUE) {
CHAR ch;
@@ -3019,13 +3007,13 @@ md_collect_marks(MD_CTX* ctx, const MD_LINE* lines, int n_lines, int table_mode)
#endif
/* Optimization: Use some loop unrolling. */
- while(off + 3 < line_end && !IS_MARK_CHAR(off+0) && !IS_MARK_CHAR(off+1)
- && !IS_MARK_CHAR(off+2) && !IS_MARK_CHAR(off+3))
+ while(off + 3 < line->end && !IS_MARK_CHAR(off+0) && !IS_MARK_CHAR(off+1)
+ && !IS_MARK_CHAR(off+2) && !IS_MARK_CHAR(off+3))
off += 4;
- while(off < line_end && !IS_MARK_CHAR(off+0))
+ while(off < line->end && !IS_MARK_CHAR(off+0))
off++;
- if(off >= line_end)
+ if(off >= line->end)
break;
ch = CH(off);
@@ -3035,8 +3023,8 @@ md_collect_marks(MD_CTX* ctx, const MD_LINE* lines, int n_lines, int table_mode)
* line to form a hard break. */
if(ch == _T('\\') && off+1 < ctx->size && (ISPUNCT(off+1) || ISNEWLINE(off+1))) {
/* Hard-break cannot be on the last line of the block. */
- if(!ISNEWLINE(off+1) || line+1 < line_term)
- PUSH_MARK(ch, off, off+2, MD_MARK_RESOLVED);
+ if(!ISNEWLINE(off+1) || line_index+1 < n_lines)
+ ADD_MARK(ch, off, off+2, MD_MARK_RESOLVED);
off += 2;
continue;
}
@@ -3047,7 +3035,7 @@ md_collect_marks(MD_CTX* ctx, const MD_LINE* lines, int n_lines, int table_mode)
int left_level; /* What precedes: 0 = whitespace; 1 = punctuation; 2 = other char. */
int right_level; /* What follows: 0 = whitespace; 1 = punctuation; 2 = other char. */
- while(tmp < line_end && CH(tmp) == ch)
+ while(tmp < line->end && CH(tmp) == ch)
tmp++;
if(off == line->beg || ISUNICODEWHITESPACEBEFORE(off))
@@ -3057,7 +3045,7 @@ md_collect_marks(MD_CTX* ctx, const MD_LINE* lines, int n_lines, int table_mode)
else
left_level = 2;
- if(tmp == line_end || ISUNICODEWHITESPACE(tmp))
+ if(tmp == line->end || ISUNICODEWHITESPACE(tmp))
right_level = 0;
else if(ISUNICODEPUNCT(tmp))
right_level = 1;
@@ -3077,8 +3065,8 @@ md_collect_marks(MD_CTX* ctx, const MD_LINE* lines, int n_lines, int table_mode)
flags |= MD_MARK_POTENTIAL_CLOSER;
if(right_level > 0 && right_level >= left_level)
flags |= MD_MARK_POTENTIAL_OPENER;
- if(left_level == 2 && right_level == 2)
- flags |= MD_MARK_EMPH_INTRAWORD;
+ if(flags == (MD_MARK_POTENTIAL_OPENER | MD_MARK_POTENTIAL_CLOSER))
+ flags |= MD_MARK_EMPH_OC;
/* For "the rule of three" we need to remember the original
* size of the mark (modulo three), before we potentially
@@ -3090,7 +3078,7 @@ md_collect_marks(MD_CTX* ctx, const MD_LINE* lines, int n_lines, int table_mode)
case 2: flags |= MD_MARK_EMPH_MOD3_2; break;
}
- PUSH_MARK(ch, off, tmp, flags);
+ ADD_MARK(ch, off, tmp, flags);
/* During resolving, multiple asterisks may have to be
* split into independent span start/ends. Consider e.g.
@@ -3098,7 +3086,7 @@ md_collect_marks(MD_CTX* ctx, const MD_LINE* lines, int n_lines, int table_mode)
* marks to have enough space for that. */
off++;
while(off < tmp) {
- PUSH_MARK('D', off, off, 0);
+ ADD_MARK('D', off, off, 0);
off++;
}
continue;
@@ -3110,37 +3098,32 @@ md_collect_marks(MD_CTX* ctx, const MD_LINE* lines, int n_lines, int table_mode)
/* A potential code span start/end. */
if(ch == _T('`')) {
- OFF opener_beg, opener_end;
- OFF closer_beg, closer_end;
+ MD_MARK opener;
+ MD_MARK closer;
int is_code_span;
- is_code_span = md_is_code_span(ctx, line, line_term - line, off,
- &opener_beg, &opener_end, &closer_beg, &closer_end,
- codespan_last_potential_closers,
- &codespan_scanned_till_paragraph_end);
+ is_code_span = md_is_code_span(ctx, line, n_lines - line_index, off,
+ &opener, &closer, codespan_last_potential_closers,
+ &codespan_scanned_till_paragraph_end);
if(is_code_span) {
- PUSH_MARK(_T('`'), opener_beg, opener_end, MD_MARK_OPENER | MD_MARK_RESOLVED);
- PUSH_MARK(_T('`'), closer_beg, closer_end, MD_MARK_CLOSER | MD_MARK_RESOLVED);
- ctx->marks[ctx->n_marks-2].next = ctx->n_marks-1;
- ctx->marks[ctx->n_marks-1].prev = ctx->n_marks-2;
-
- off = closer_end;
+ ADD_MARK(opener.ch, opener.beg, opener.end, opener.flags);
+ ADD_MARK(closer.ch, closer.beg, closer.end, closer.flags);
+ md_resolve_range(ctx, ctx->n_marks-2, ctx->n_marks-1);
+ off = closer.end;
/* Advance the current line accordingly. */
- if(off > line_end) {
- line = md_lookup_line(off, line, line_term - line);
- line_end = line->end;
- }
+ if(off > line->end)
+ line = md_lookup_line(off, lines, n_lines, &line_index);
continue;
}
- off = opener_end;
+ off = opener.end;
continue;
}
/* A potential entity start. */
if(ch == _T('&')) {
- PUSH_MARK(ch, off, off+1, MD_MARK_POTENTIAL_OPENER);
+ ADD_MARK(ch, off, off+1, MD_MARK_POTENTIAL_OPENER);
off++;
continue;
}
@@ -3149,7 +3132,7 @@ md_collect_marks(MD_CTX* ctx, const MD_LINE* lines, int n_lines, int table_mode)
if(ch == _T(';')) {
/* We surely cannot be entity unless the previous mark is '&'. */
if(ctx->n_marks > 0 && ctx->marks[ctx->n_marks-1].ch == _T('&'))
- PUSH_MARK(ch, off, off+1, MD_MARK_POTENTIAL_CLOSER);
+ ADD_MARK(ch, off, off+1, MD_MARK_POTENTIAL_CLOSER);
off++;
continue;
@@ -3168,20 +3151,18 @@ md_collect_marks(MD_CTX* ctx, const MD_LINE* lines, int n_lines, int table_mode)
/* Given the nature of the raw HTML, we have to recognize
* it here. Doing so later in md_analyze_lt_gt() could
* open can of worms of quadratic complexity. */
- is_html = md_is_html_any(ctx, line, line_term - line, off,
+ is_html = md_is_html_any(ctx, line, n_lines - line_index, off,
lines[n_lines-1].end, &html_end);
if(is_html) {
- PUSH_MARK(_T('<'), off, off, MD_MARK_OPENER | MD_MARK_RESOLVED);
- PUSH_MARK(_T('>'), html_end, html_end, MD_MARK_CLOSER | MD_MARK_RESOLVED);
+ ADD_MARK(_T('<'), off, off, MD_MARK_OPENER | MD_MARK_RESOLVED);
+ ADD_MARK(_T('>'), html_end, html_end, MD_MARK_CLOSER | MD_MARK_RESOLVED);
ctx->marks[ctx->n_marks-2].next = ctx->n_marks-1;
ctx->marks[ctx->n_marks-1].prev = ctx->n_marks-2;
off = html_end;
/* Advance the current line accordingly. */
- if(off > line_end) {
- line = md_lookup_line(off, line, line_term - line);
- line_end = line->end;
- }
+ if(off > line->end)
+ line = md_lookup_line(off, lines, n_lines, &line_index);
continue;
}
}
@@ -3189,10 +3170,12 @@ md_collect_marks(MD_CTX* ctx, const MD_LINE* lines, int n_lines, int table_mode)
is_autolink = md_is_autolink(ctx, off, lines[n_lines-1].end,
&autolink_end, &missing_mailto);
if(is_autolink) {
- PUSH_MARK((missing_mailto ? _T('@') : _T('<')), off, off+1,
- MD_MARK_OPENER | MD_MARK_RESOLVED | MD_MARK_AUTOLINK);
- PUSH_MARK(_T('>'), autolink_end-1, autolink_end,
- MD_MARK_CLOSER | MD_MARK_RESOLVED | MD_MARK_AUTOLINK);
+ unsigned flags = MD_MARK_RESOLVED | MD_MARK_AUTOLINK;
+ if(missing_mailto)
+ flags |= MD_MARK_AUTOLINK_MISSING_MAILTO;
+
+ ADD_MARK(_T('<'), off, off+1, MD_MARK_OPENER | flags);
+ ADD_MARK(_T('>'), autolink_end-1, autolink_end, MD_MARK_CLOSER | flags);
ctx->marks[ctx->n_marks-2].next = ctx->n_marks-1;
ctx->marks[ctx->n_marks-1].prev = ctx->n_marks-2;
off = autolink_end;
@@ -3204,18 +3187,18 @@ md_collect_marks(MD_CTX* ctx, const MD_LINE* lines, int n_lines, int table_mode)
}
/* A potential link or its part. */
- if(ch == _T('[') || (ch == _T('!') && off+1 < line_end && CH(off+1) == _T('['))) {
+ if(ch == _T('[') || (ch == _T('!') && off+1 < line->end && CH(off+1) == _T('['))) {
OFF tmp = (ch == _T('[') ? off+1 : off+2);
- PUSH_MARK(ch, off, tmp, MD_MARK_POTENTIAL_OPENER);
+ ADD_MARK(ch, off, tmp, MD_MARK_POTENTIAL_OPENER);
off = tmp;
/* Two dummies to make enough place for data we need if it is
* a link. */
- PUSH_MARK('D', off, off, 0);
- PUSH_MARK('D', off, off, 0);
+ ADD_MARK('D', off, off, 0);
+ ADD_MARK('D', off, off, 0);
continue;
}
if(ch == _T(']')) {
- PUSH_MARK(ch, off, off+1, MD_MARK_POTENTIAL_CLOSER);
+ ADD_MARK(ch, off, off+1, MD_MARK_POTENTIAL_CLOSER);
off++;
continue;
}
@@ -3225,9 +3208,9 @@ md_collect_marks(MD_CTX* ctx, const MD_LINE* lines, int n_lines, int table_mode)
if(line->beg + 1 <= off && ISALNUM(off-1) &&
off + 3 < line->end && ISALNUM(off+1))
{
- PUSH_MARK(ch, off, off+1, MD_MARK_POTENTIAL_OPENER);
+ ADD_MARK(ch, off, off+1, MD_MARK_POTENTIAL_OPENER);
/* Push a dummy as a reserve for a closer. */
- PUSH_MARK('D', off, off, 0);
+ ADD_MARK('D', line->beg, line->end, 0);
}
off++;
@@ -3256,12 +3239,11 @@ md_collect_marks(MD_CTX* ctx, const MD_LINE* lines, int n_lines, int table_mode)
const SZ suffix_size = scheme_map[scheme_index].suffix_size;
if(line->beg + scheme_size <= off && md_ascii_eq(STR(off-scheme_size), scheme, scheme_size) &&
- (line->beg + scheme_size == off || ISWHITESPACE(off-scheme_size-1) || ISANYOF(off-scheme_size-1, _T("*_~(["))) &&
off + 1 + suffix_size < line->end && md_ascii_eq(STR(off+1), suffix, suffix_size))
{
- PUSH_MARK(ch, off-scheme_size, off+1+suffix_size, MD_MARK_POTENTIAL_OPENER);
+ ADD_MARK(ch, off-scheme_size, off+1+suffix_size, MD_MARK_POTENTIAL_OPENER);
/* Push a dummy as a reserve for a closer. */
- PUSH_MARK('D', off, off, 0);
+ ADD_MARK('D', line->beg, line->end, 0);
off += 1 + suffix_size;
break;
}
@@ -3274,12 +3256,11 @@ md_collect_marks(MD_CTX* ctx, const MD_LINE* lines, int n_lines, int table_mode)
/* A potential permissive WWW autolink. */
if(ch == _T('.')) {
if(line->beg + 3 <= off && md_ascii_eq(STR(off-3), _T("www"), 3) &&
- (line->beg + 3 == off || ISWHITESPACE(off-4) || ISANYOF(off-4, _T("*_~(["))) &&
- off + 1 < line_end)
+ (off-3 == line->beg || ISUNICODEWHITESPACEBEFORE(off-3) || ISUNICODEPUNCTBEFORE(off-3)))
{
- PUSH_MARK(ch, off-3, off+1, MD_MARK_POTENTIAL_OPENER);
+ ADD_MARK(ch, off-3, off+1, MD_MARK_POTENTIAL_OPENER);
/* Push a dummy as a reserve for a closer. */
- PUSH_MARK('D', off, off, 0);
+ ADD_MARK('D', line->beg, line->end, 0);
off++;
continue;
}
@@ -3290,7 +3271,7 @@ md_collect_marks(MD_CTX* ctx, const MD_LINE* lines, int n_lines, int table_mode)
/* A potential table cell boundary or wiki link label delimiter. */
if((table_mode || ctx->parser.flags & MD_FLAG_WIKILINKS) && ch == _T('|')) {
- PUSH_MARK(ch, off, off+1, 0);
+ ADD_MARK(ch, off, off+1, 0);
off++;
continue;
}
@@ -3299,18 +3280,18 @@ md_collect_marks(MD_CTX* ctx, const MD_LINE* lines, int n_lines, int table_mode)
if(ch == _T('~')) {
OFF tmp = off+1;
- while(tmp < line_end && CH(tmp) == _T('~'))
+ while(tmp < line->end && CH(tmp) == _T('~'))
tmp++;
if(tmp - off < 3) {
unsigned flags = 0;
- if(tmp < line_end && !ISUNICODEWHITESPACE(tmp))
+ if(tmp < line->end && !ISUNICODEWHITESPACE(tmp))
flags |= MD_MARK_POTENTIAL_OPENER;
if(off > line->beg && !ISUNICODEWHITESPACEBEFORE(off))
flags |= MD_MARK_POTENTIAL_CLOSER;
if(flags != 0)
- PUSH_MARK(ch, off, tmp, flags);
+ ADD_MARK(ch, off, tmp, flags);
}
off = tmp;
@@ -3323,11 +3304,20 @@ md_collect_marks(MD_CTX* ctx, const MD_LINE* lines, int n_lines, int table_mode)
* where two dollar signs signify a display equation. */
OFF tmp = off+1;
- while(tmp < line_end && CH(tmp) == _T('$'))
+ while(tmp < line->end && CH(tmp) == _T('$'))
tmp++;
- if (tmp - off <= 2)
- PUSH_MARK(ch, off, tmp, MD_MARK_POTENTIAL_OPENER | MD_MARK_POTENTIAL_CLOSER);
+ if(tmp - off <= 2) {
+ unsigned flags = MD_MARK_POTENTIAL_OPENER | MD_MARK_POTENTIAL_CLOSER;
+
+ if(off > line->beg && !ISUNICODEWHITESPACEBEFORE(off) && !ISUNICODEPUNCTBEFORE(off))
+ flags &= ~MD_MARK_POTENTIAL_OPENER;
+ if(tmp < line->end && !ISUNICODEWHITESPACE(tmp) && !ISUNICODEPUNCT(tmp))
+ flags &= ~MD_MARK_POTENTIAL_CLOSER;
+ if(flags != 0)
+ ADD_MARK(ch, off, tmp, flags);
+ }
+
off = tmp;
continue;
}
@@ -3336,11 +3326,11 @@ md_collect_marks(MD_CTX* ctx, const MD_LINE* lines, int n_lines, int table_mode)
if(ISWHITESPACE_(ch)) {
OFF tmp = off+1;
- while(tmp < line_end && ISWHITESPACE(tmp))
+ while(tmp < line->end && ISWHITESPACE(tmp))
tmp++;
if(tmp - off > 1 || ch != _T(' '))
- PUSH_MARK(ch, off, tmp, MD_MARK_RESOLVED);
+ ADD_MARK(ch, off, tmp, MD_MARK_RESOLVED);
off = tmp;
continue;
@@ -3348,7 +3338,7 @@ md_collect_marks(MD_CTX* ctx, const MD_LINE* lines, int n_lines, int table_mode)
/* NULL character. */
if(ch == _T('\0')) {
- PUSH_MARK(ch, off, off+1, MD_MARK_RESOLVED);
+ ADD_MARK(ch, off, off+1, MD_MARK_RESOLVED);
off++;
continue;
}
@@ -3359,7 +3349,7 @@ md_collect_marks(MD_CTX* ctx, const MD_LINE* lines, int n_lines, int table_mode)
/* Add a dummy mark at the end of the mark vector to simplify
* process_inlines(). */
- PUSH_MARK(127, ctx->size, ctx->size, MD_MARK_RESOLVED);
+ ADD_MARK(127, ctx->size, ctx->size, MD_MARK_RESOLVED);
abort:
return ret;
@@ -3384,28 +3374,22 @@ md_analyze_bracket(MD_CTX* ctx, int mark_index)
MD_MARK* mark = &ctx->marks[mark_index];
if(mark->flags & MD_MARK_POTENTIAL_OPENER) {
- if(BRACKET_OPENERS.head != -1)
- ctx->marks[BRACKET_OPENERS.tail].flags |= MD_MARK_HASNESTEDBRACKETS;
+ if(BRACKET_OPENERS.top >= 0)
+ ctx->marks[BRACKET_OPENERS.top].flags |= MD_MARK_HASNESTEDBRACKETS;
- md_mark_chain_append(ctx, &BRACKET_OPENERS, mark_index);
+ md_mark_stack_push(ctx, &BRACKET_OPENERS, mark_index);
return;
}
- if(BRACKET_OPENERS.tail >= 0) {
- /* Pop the opener from the chain. */
- int opener_index = BRACKET_OPENERS.tail;
+ if(BRACKET_OPENERS.top >= 0) {
+ int opener_index = md_mark_stack_pop(ctx, &BRACKET_OPENERS);
MD_MARK* opener = &ctx->marks[opener_index];
- if(opener->prev >= 0)
- ctx->marks[opener->prev].next = -1;
- else
- BRACKET_OPENERS.head = -1;
- BRACKET_OPENERS.tail = opener->prev;
/* Interconnect the opener and closer. */
opener->next = mark_index;
mark->prev = opener_index;
- /* Add the pair into chain of potential links for md_resolve_links().
+ /* Add the pair into a list of potential links for md_resolve_links().
* Note we misuse opener->prev for this as opener->next points to its
* closer. */
if(ctx->unresolved_link_tail >= 0)
@@ -3418,11 +3402,11 @@ md_analyze_bracket(MD_CTX* ctx, int mark_index)
}
/* Forward declaration. */
-static void md_analyze_link_contents(MD_CTX* ctx, const MD_LINE* lines, int n_lines,
+static void md_analyze_link_contents(MD_CTX* ctx, const MD_LINE* lines, MD_SIZE n_lines,
int mark_beg, int mark_end);
static int
-md_resolve_links(MD_CTX* ctx, const MD_LINE* lines, int n_lines)
+md_resolve_links(MD_CTX* ctx, const MD_LINE* lines, MD_SIZE n_lines)
{
int opener_index = ctx->unresolved_link_head;
OFF last_link_beg = 0;
@@ -3493,10 +3477,15 @@ md_resolve_links(MD_CTX* ctx, const MD_LINE* lines, int n_lines)
delim = m;
break;
}
- if(m->ch != 'D' && m->beg - opener->end > 100)
- break;
+ if(m->ch != 'D') {
+ if(m->beg - opener->end > 100)
+ break;
+ if(m->ch != 'D' && (m->flags & MD_MARK_OPENER))
+ delim_index = m->next;
+ }
delim_index++;
}
+
dest_beg = opener->end;
dest_end = (delim != NULL) ? delim->beg : closer->beg;
if(dest_end - dest_beg == 0 || dest_end - dest_beg > 100)
@@ -3634,7 +3623,7 @@ md_resolve_links(MD_CTX* ctx, const MD_LINE* lines, int n_lines)
md_mark_store_ptr(ctx, opener_index+2, attr.title);
/* The title might or might not have been allocated for us. */
if(attr.title_needs_free)
- md_mark_chain_append(ctx, &PTR_CHAIN, opener_index+2);
+ md_mark_stack_push(ctx, &ctx->ptr_stack, opener_index+2);
ctx->marks[opener_index+2].prev = attr.title_size;
if(opener->ch == '[') {
@@ -3707,7 +3696,7 @@ md_analyze_entity(MD_CTX* ctx, int mark_index)
if(md_is_entity(ctx, opener->beg, closer->end, &off)) {
MD_ASSERT(off == closer->end);
- md_resolve_range(ctx, NULL, mark_index, mark_index+1);
+ md_resolve_range(ctx, mark_index, mark_index+1);
opener->end = closer->end;
}
}
@@ -3717,8 +3706,13 @@ md_analyze_table_cell_boundary(MD_CTX* ctx, int mark_index)
{
MD_MARK* mark = &ctx->marks[mark_index];
mark->flags |= MD_MARK_RESOLVED;
+ mark->next = -1;
- md_mark_chain_append(ctx, &TABLECELLBOUNDARIES, mark_index);
+ if(ctx->table_cell_boundaries_head < 0)
+ ctx->table_cell_boundaries_head = mark_index;
+ else
+ ctx->marks[ctx->table_cell_boundaries_tail].next = mark_index;
+ ctx->table_cell_boundaries_tail = mark_index;
ctx->n_table_cell_boundaries++;
}
@@ -3747,261 +3741,312 @@ static void
md_analyze_emph(MD_CTX* ctx, int mark_index)
{
MD_MARK* mark = &ctx->marks[mark_index];
- MD_MARKCHAIN* chain = md_mark_chain(ctx, mark_index);
/* If we can be a closer, try to resolve with the preceding opener. */
if(mark->flags & MD_MARK_POTENTIAL_CLOSER) {
MD_MARK* opener = NULL;
int opener_index = 0;
-
- if(mark->ch == _T('*')) {
- MD_MARKCHAIN* opener_chains[6];
- int i, n_opener_chains;
- unsigned flags = mark->flags;
-
- /* Apply the "rule of three". */
- n_opener_chains = 0;
- opener_chains[n_opener_chains++] = &ASTERISK_OPENERS_intraword_mod3_0;
- if((flags & MD_MARK_EMPH_MOD3_MASK) != MD_MARK_EMPH_MOD3_2)
- opener_chains[n_opener_chains++] = &ASTERISK_OPENERS_intraword_mod3_1;
- if((flags & MD_MARK_EMPH_MOD3_MASK) != MD_MARK_EMPH_MOD3_1)
- opener_chains[n_opener_chains++] = &ASTERISK_OPENERS_intraword_mod3_2;
- opener_chains[n_opener_chains++] = &ASTERISK_OPENERS_extraword_mod3_0;
- if(!(flags & MD_MARK_EMPH_INTRAWORD) || (flags & MD_MARK_EMPH_MOD3_MASK) != MD_MARK_EMPH_MOD3_2)
- opener_chains[n_opener_chains++] = &ASTERISK_OPENERS_extraword_mod3_1;
- if(!(flags & MD_MARK_EMPH_INTRAWORD) || (flags & MD_MARK_EMPH_MOD3_MASK) != MD_MARK_EMPH_MOD3_1)
- opener_chains[n_opener_chains++] = &ASTERISK_OPENERS_extraword_mod3_2;
-
- /* Opener is the most recent mark from the allowed chains. */
- for(i = 0; i < n_opener_chains; i++) {
- if(opener_chains[i]->tail >= 0) {
- int tmp_index = opener_chains[i]->tail;
- MD_MARK* tmp_mark = &ctx->marks[tmp_index];
- if(opener == NULL || tmp_mark->end > opener->end) {
- opener_index = tmp_index;
- opener = tmp_mark;
- }
+ MD_MARKSTACK* opener_stacks[6];
+ int i, n_opener_stacks;
+ unsigned flags = mark->flags;
+
+ n_opener_stacks = 0;
+
+ /* Apply the rule of 3 */
+ opener_stacks[n_opener_stacks++] = md_emph_stack(ctx, mark->ch, MD_MARK_EMPH_MOD3_0 | MD_MARK_EMPH_OC);
+ if((flags & MD_MARK_EMPH_MOD3_MASK) != MD_MARK_EMPH_MOD3_2)
+ opener_stacks[n_opener_stacks++] = md_emph_stack(ctx, mark->ch, MD_MARK_EMPH_MOD3_1 | MD_MARK_EMPH_OC);
+ if((flags & MD_MARK_EMPH_MOD3_MASK) != MD_MARK_EMPH_MOD3_1)
+ opener_stacks[n_opener_stacks++] = md_emph_stack(ctx, mark->ch, MD_MARK_EMPH_MOD3_2 | MD_MARK_EMPH_OC);
+ opener_stacks[n_opener_stacks++] = md_emph_stack(ctx, mark->ch, MD_MARK_EMPH_MOD3_0);
+ if(!(flags & MD_MARK_EMPH_OC) || (flags & MD_MARK_EMPH_MOD3_MASK) != MD_MARK_EMPH_MOD3_2)
+ opener_stacks[n_opener_stacks++] = md_emph_stack(ctx, mark->ch, MD_MARK_EMPH_MOD3_1);
+ if(!(flags & MD_MARK_EMPH_OC) || (flags & MD_MARK_EMPH_MOD3_MASK) != MD_MARK_EMPH_MOD3_1)
+ opener_stacks[n_opener_stacks++] = md_emph_stack(ctx, mark->ch, MD_MARK_EMPH_MOD3_2);
+
+ /* Opener is the most recent mark from the allowed stacks. */
+ for(i = 0; i < n_opener_stacks; i++) {
+ if(opener_stacks[i]->top >= 0) {
+ int m_index = opener_stacks[i]->top;
+ MD_MARK* m = &ctx->marks[m_index];
+
+ if(opener == NULL || m->end > opener->end) {
+ opener_index = m_index;
+ opener = m;
}
}
- } else {
- /* Simple emph. mark */
- if(chain->tail >= 0) {
- opener_index = chain->tail;
- opener = &ctx->marks[opener_index];
- }
}
/* Resolve, if we have found matching opener. */
if(opener != NULL) {
SZ opener_size = opener->end - opener->beg;
SZ closer_size = mark->end - mark->beg;
- MD_MARKCHAIN* opener_chain = md_mark_chain(ctx, opener_index);
+ MD_MARKSTACK* stack = md_opener_stack(ctx, opener_index);
if(opener_size > closer_size) {
opener_index = md_split_emph_mark(ctx, opener_index, closer_size);
- md_mark_chain_append(ctx, opener_chain, opener_index);
+ md_mark_stack_push(ctx, stack, opener_index);
} else if(opener_size < closer_size) {
md_split_emph_mark(ctx, mark_index, closer_size - opener_size);
}
+ /* Above we were only peeking. */
+ md_mark_stack_pop(ctx, stack);
+
md_rollback(ctx, opener_index, mark_index, MD_ROLLBACK_CROSSING);
- md_resolve_range(ctx, opener_chain, opener_index, mark_index);
+ md_resolve_range(ctx, opener_index, mark_index);
return;
}
}
/* If we could not resolve as closer, we may be yet be an opener. */
if(mark->flags & MD_MARK_POTENTIAL_OPENER)
- md_mark_chain_append(ctx, chain, mark_index);
+ md_mark_stack_push(ctx, md_emph_stack(ctx, mark->ch, mark->flags), mark_index);
}
static void
md_analyze_tilde(MD_CTX* ctx, int mark_index)
{
MD_MARK* mark = &ctx->marks[mark_index];
- MD_MARKCHAIN* chain = md_mark_chain(ctx, mark_index);
+ MD_MARKSTACK* stack = md_opener_stack(ctx, mark_index);
/* We attempt to be Github Flavored Markdown compatible here. GFM accepts
* only tildes sequences of length 1 and 2, and the length of the opener
* and closer has to match. */
- if((mark->flags & MD_MARK_POTENTIAL_CLOSER) && chain->head >= 0) {
- int opener_index = chain->head;
+ if((mark->flags & MD_MARK_POTENTIAL_CLOSER) && stack->top >= 0) {
+ int opener_index = stack->top;
+ md_mark_stack_pop(ctx, stack);
md_rollback(ctx, opener_index, mark_index, MD_ROLLBACK_CROSSING);
- md_resolve_range(ctx, chain, opener_index, mark_index);
+ md_resolve_range(ctx, opener_index, mark_index);
return;
}
if(mark->flags & MD_MARK_POTENTIAL_OPENER)
- md_mark_chain_append(ctx, chain, mark_index);
+ md_mark_stack_push(ctx, stack, mark_index);
}
static void
md_analyze_dollar(MD_CTX* ctx, int mark_index)
{
- /* This should mimic the way inline equations work in LaTeX, so there
- * can only ever be one item in the chain (i.e. the dollars can't be
- * nested). This is basically the same as the md_analyze_tilde function,
- * except that we require matching openers and closers to be of the same
- * length.
- *
- * E.g.: $abc$$def$$ => abc (display equation) def (end equation) */
- if(DOLLAR_OPENERS.head >= 0) {
+ MD_MARK* mark = &ctx->marks[mark_index];
+
+ if((mark->flags & MD_MARK_POTENTIAL_CLOSER) && DOLLAR_OPENERS.top >= 0) {
/* If the potential closer has a non-matching number of $, discard */
- MD_MARK* open = &ctx->marks[DOLLAR_OPENERS.head];
- MD_MARK* close = &ctx->marks[mark_index];
+ MD_MARK* opener = &ctx->marks[DOLLAR_OPENERS.top];
+ int opener_index = DOLLAR_OPENERS.top;
+ MD_MARK* closer = mark;
+ int closer_index = mark_index;
- int opener_index = DOLLAR_OPENERS.head;
- md_rollback(ctx, opener_index, mark_index, MD_ROLLBACK_ALL);
- if (open->end - open->beg == close->end - close->beg) {
+ if(opener->end - opener->beg == closer->end - closer->beg) {
/* We are the matching closer */
- md_resolve_range(ctx, &DOLLAR_OPENERS, opener_index, mark_index);
+ md_mark_stack_pop(ctx, &DOLLAR_OPENERS);
+ md_rollback(ctx, opener_index, closer_index, MD_ROLLBACK_ALL);
+ md_resolve_range(ctx, opener_index, closer_index);
+
+ /* Discard all pending openers: Latex math span do not allow
+ * nesting. */
+ DOLLAR_OPENERS.top = -1;
return;
}
}
- md_mark_chain_append(ctx, &DOLLAR_OPENERS, mark_index);
+ if(mark->flags & MD_MARK_POTENTIAL_OPENER)
+ md_mark_stack_push(ctx, &DOLLAR_OPENERS, mark_index);
}
-static void
-md_analyze_permissive_url_autolink(MD_CTX* ctx, int mark_index)
+static MD_MARK*
+md_scan_left_for_resolved_mark(MD_CTX* ctx, MD_MARK* mark_from, OFF off, MD_MARK** p_cursor)
{
- MD_MARK* opener = &ctx->marks[mark_index];
- int closer_index = mark_index + 1;
- MD_MARK* closer = &ctx->marks[closer_index];
- MD_MARK* next_resolved_mark;
- OFF off = opener->end;
- int n_dots = FALSE;
- int has_underscore_in_last_seg = FALSE;
- int has_underscore_in_next_to_last_seg = FALSE;
- int n_opened_parenthesis = 0;
- int n_excess_parenthesis = 0;
-
- /* Check for domain. */
- while(off < ctx->size) {
- if(ISALNUM(off) || CH(off) == _T('-')) {
- off++;
- } else if(CH(off) == _T('.')) {
- /* We must see at least one period. */
- n_dots++;
- has_underscore_in_next_to_last_seg = has_underscore_in_last_seg;
- has_underscore_in_last_seg = FALSE;
- off++;
- } else if(CH(off) == _T('_')) {
- /* No underscore may be present in the last two domain segments. */
- has_underscore_in_last_seg = TRUE;
- off++;
- } else {
- break;
+ MD_MARK* mark;
+
+ for(mark = mark_from; mark >= ctx->marks; mark--) {
+ if(mark->ch == 'D' || mark->beg > off)
+ continue;
+ if(mark->beg <= off && off < mark->end && (mark->flags & MD_MARK_RESOLVED)) {
+ if(p_cursor != NULL)
+ *p_cursor = mark;
+ return mark;
}
+ if(mark->end <= off)
+ break;
}
- if(off > opener->end && CH(off-1) == _T('.')) {
- off--;
- n_dots--;
- }
- if(off <= opener->end || n_dots == 0 || has_underscore_in_next_to_last_seg || has_underscore_in_last_seg)
- return;
- /* Check for path. */
- next_resolved_mark = closer + 1;
- while(next_resolved_mark->ch == 'D' || !(next_resolved_mark->flags & MD_MARK_RESOLVED))
- next_resolved_mark++;
- while(off < next_resolved_mark->beg && CH(off) != _T('<') && !ISWHITESPACE(off) && !ISNEWLINE(off)) {
- /* Parenthesis must be balanced. */
- if(CH(off) == _T('(')) {
- n_opened_parenthesis++;
- } else if(CH(off) == _T(')')) {
- if(n_opened_parenthesis > 0)
- n_opened_parenthesis--;
- else
- n_excess_parenthesis++;
- }
+ if(p_cursor != NULL)
+ *p_cursor = mark;
+ return NULL;
+}
- off++;
- }
+static MD_MARK*
+md_scan_right_for_resolved_mark(MD_CTX* ctx, MD_MARK* mark_from, OFF off, MD_MARK** p_cursor)
+{
+ MD_MARK* mark;
- /* Trim a trailing punctuation from the end. */
- while(TRUE) {
- if(ISANYOF(off-1, _T("?!.,:*_~"))) {
- off--;
- } else if(CH(off-1) == ')' && n_excess_parenthesis > 0) {
- /* Unmatched ')' can be in an interior of the path but not at the
- * of it, so the auto-link may be safely nested in a parenthesis
- * pair. */
- off--;
- n_excess_parenthesis--;
- } else {
- break;
+ for(mark = mark_from; mark < ctx->marks + ctx->n_marks; mark++) {
+ if(mark->ch == 'D' || mark->end <= off)
+ continue;
+ if(mark->beg <= off && off < mark->end && (mark->flags & MD_MARK_RESOLVED)) {
+ if(p_cursor != NULL)
+ *p_cursor = mark;
+ return mark;
}
+ if(mark->beg > off)
+ break;
}
- /* Ok. Lets call it an auto-link. Adapt opener and create closer to zero
- * length so all the contents becomes the link text. */
- MD_ASSERT(closer->ch == 'D' ||
- ((ctx->parser.flags & MD_FLAG_PERMISSIVEWWWAUTOLINKS) &&
- (closer->ch == '.' || closer->ch == ':' || closer->ch == '@')));
- opener->end = opener->beg;
- closer->ch = opener->ch;
- closer->beg = off;
- closer->end = off;
- md_resolve_range(ctx, NULL, mark_index, closer_index);
+ if(p_cursor != NULL)
+ *p_cursor = mark;
+ return NULL;
}
-/* The permissive autolinks do not have to be enclosed in '<' '>' but we
- * instead impose stricter rules what is understood as an e-mail address
- * here. Actually any non-alphanumeric characters with exception of '.'
- * are prohibited both in username and after '@'. */
static void
-md_analyze_permissive_email_autolink(MD_CTX* ctx, int mark_index)
+md_analyze_permissive_autolink(MD_CTX* ctx, int mark_index)
{
+ static const struct {
+ const MD_CHAR start_char;
+ const MD_CHAR delim_char;
+ const MD_CHAR* allowed_nonalnum_chars;
+ int min_components;
+ const MD_CHAR optional_end_char;
+ } URL_MAP[] = {
+ { _T('\0'), _T('.'), _T(".-_"), 2, _T('\0') }, /* host, mandatory */
+ { _T('/'), _T('/'), _T("/.-_"), 0, _T('/') }, /* path */
+ { _T('?'), _T('&'), _T("&.-+_=()"), 1, _T('\0') }, /* query */
+ { _T('#'), _T('\0'), _T(".-+_") , 1, _T('\0') } /* fragment */
+ };
+
MD_MARK* opener = &ctx->marks[mark_index];
- int closer_index;
- MD_MARK* closer;
+ MD_MARK* closer = &ctx->marks[mark_index + 1]; /* The dummy. */
+ OFF line_beg = closer->beg; /* md_collect_mark() set this for us */
+ OFF line_end = closer->end; /* ditto */
OFF beg = opener->beg;
OFF end = opener->end;
- int dot_count = 0;
+ MD_MARK* left_cursor = opener;
+ int left_boundary_ok = FALSE;
+ MD_MARK* right_cursor = opener;
+ int right_boundary_ok = FALSE;
+ unsigned i;
+
+ MD_ASSERT(closer->ch == 'D');
+
+ if(opener->ch == '@') {
+ MD_ASSERT(CH(opener->beg) == _T('@'));
+
+ /* Scan backwards for the user name (before '@'). */
+ while(beg > line_beg) {
+ if(ISALNUM(beg-1))
+ beg--;
+ else if(beg >= line_beg+2 && ISALNUM(beg-2) &&
+ ISANYOF(beg-1, _T(".-_+")) &&
+ md_scan_left_for_resolved_mark(ctx, left_cursor, beg-1, &left_cursor) == NULL &&
+ ISALNUM(beg))
+ beg--;
+ else
+ break;
+ }
+ if(beg == opener->beg) /* empty user name */
+ return;
+ }
- MD_ASSERT(opener->ch == _T('@'));
+ /* Verify there's line boundary, whitespace, allowed punctuation or
+ * resolved emphasis mark just before the suspected autolink. */
+ if(beg == line_beg || ISUNICODEWHITESPACEBEFORE(beg) || ISANYOF(beg-1, _T("({["))) {
+ left_boundary_ok = TRUE;
+ } else if(ISANYOF(beg-1, _T("*_~"))) {
+ MD_MARK* left_mark;
- /* Scan for name before '@'. */
- while(beg > 0 && (ISALNUM(beg-1) || ISANYOF(beg-1, _T(".-_+"))))
- beg--;
+ left_mark = md_scan_left_for_resolved_mark(ctx, left_cursor, beg-1, &left_cursor);
+ if(left_mark != NULL && (left_mark->flags & MD_MARK_OPENER))
+ left_boundary_ok = TRUE;
+ }
+ if(!left_boundary_ok)
+ return;
+
+ for(i = 0; i < SIZEOF_ARRAY(URL_MAP); i++) {
+ int n_components = 0;
+ int n_open_brackets = 0;
+
+ if(URL_MAP[i].start_char != _T('\0')) {
+ if(end >= line_end || CH(end) != URL_MAP[i].start_char)
+ continue;
+ if(URL_MAP[i].min_components > 0 && (end+1 >= line_end || !ISALNUM(end+1)))
+ continue;
+ end++;
+ }
+
+ while(end < line_end) {
+ if(ISALNUM(end)) {
+ if(n_components == 0)
+ n_components++;
+ end++;
+ } else if(end < line_end &&
+ ISANYOF(end, URL_MAP[i].allowed_nonalnum_chars) &&
+ md_scan_right_for_resolved_mark(ctx, right_cursor, end, &right_cursor) == NULL &&
+ ((end > line_beg && (ISALNUM(end-1) || CH(end-1) == _T(')'))) || CH(end) == _T('(')) &&
+ ((end+1 < line_end && (ISALNUM(end+1) || CH(end+1) == _T('('))) || CH(end) == _T(')')))
+ {
+ if(CH(end) == URL_MAP[i].delim_char)
+ n_components++;
+
+ /* brackets have to be balanced. */
+ if(CH(end) == _T('(')) {
+ n_open_brackets++;
+ } else if(CH(end) == _T(')')) {
+ if(n_open_brackets <= 0)
+ break;
+ n_open_brackets--;
+ }
- /* Scan for domain after '@'. */
- while(end < ctx->size && (ISALNUM(end) || ISANYOF(end, _T(".-_")))) {
- if(CH(end) == _T('.'))
- dot_count++;
- end++;
+ end++;
+ } else {
+ break;
+ }
+ }
+
+ if(end < line_end && URL_MAP[i].optional_end_char != _T('\0') &&
+ CH(end) == URL_MAP[i].optional_end_char)
+ end++;
+
+ if(n_components < URL_MAP[i].min_components || n_open_brackets != 0)
+ return;
+
+ if(opener->ch == '@') /* E-mail autolinks wants only the host. */
+ break;
}
- if(CH(end-1) == _T('.')) { /* Final '.' not part of it. */
- dot_count--;
- end--;
+
+ /* Verify there's line boundary, whitespace, allowed punctuation or
+ * resolved emphasis mark just after the suspected autolink. */
+ if(end == line_end || ISUNICODEWHITESPACE(end) || ISANYOF(end, _T(")}].!?,;"))) {
+ right_boundary_ok = TRUE;
+ } else {
+ MD_MARK* right_mark;
+
+ right_mark = md_scan_right_for_resolved_mark(ctx, right_cursor, end, &right_cursor);
+ if(right_mark != NULL && (right_mark->flags & MD_MARK_CLOSER))
+ right_boundary_ok = TRUE;
}
- else if(ISANYOF2(end-1, _T('-'), _T('_'))) /* These are forbidden at the end. */
- return;
- if(CH(end-1) == _T('@') || dot_count == 0)
+ if(!right_boundary_ok)
return;
- /* Ok. Lets call it auto-link. Adapt opener and create closer to zero
- * length so all the contents becomes the link text. */
- closer_index = mark_index + 1;
- closer = &ctx->marks[closer_index];
- if (closer->ch != 'D') return;
-
+ /* Success, we are an autolink. */
opener->beg = beg;
opener->end = beg;
- closer->ch = opener->ch;
closer->beg = end;
closer->end = end;
- md_resolve_range(ctx, NULL, mark_index, closer_index);
+ closer->ch = opener->ch;
+ md_resolve_range(ctx, mark_index, mark_index + 1);
}
+#define MD_ANALYZE_NOSKIP_EMPH 0x01
+
static inline void
-md_analyze_marks(MD_CTX* ctx, const MD_LINE* lines, int n_lines,
- int mark_beg, int mark_end, const CHAR* mark_chars)
+md_analyze_marks(MD_CTX* ctx, const MD_LINE* lines, MD_SIZE n_lines,
+ int mark_beg, int mark_end, const CHAR* mark_chars, unsigned flags)
{
int i = mark_beg;
+ OFF last_end = lines[0].beg;
+
MD_UNUSED(lines);
MD_UNUSED(n_lines);
@@ -4010,7 +4055,9 @@ md_analyze_marks(MD_CTX* ctx, const MD_LINE* lines, int n_lines,
/* Skip resolved spans. */
if(mark->flags & MD_MARK_RESOLVED) {
- if(mark->flags & MD_MARK_OPENER) {
+ if((mark->flags & MD_MARK_OPENER) &&
+ !((flags & MD_ANALYZE_NOSKIP_EMPH) && ISANYOF_(mark->ch, "*_~")))
+ {
MD_ASSERT(i < mark->next);
i = mark->next + 1;
} else {
@@ -4025,6 +4072,12 @@ md_analyze_marks(MD_CTX* ctx, const MD_LINE* lines, int n_lines,
continue;
}
+ /* The resolving in previous step could have expanded a mark. */
+ if(mark->beg < last_end) {
+ i++;
+ continue;
+ }
+
/* Analyze the mark. */
switch(mark->ch) {
case '[': /* Pass through. */
@@ -4037,8 +4090,15 @@ md_analyze_marks(MD_CTX* ctx, const MD_LINE* lines, int n_lines,
case '~': md_analyze_tilde(ctx, i); break;
case '$': md_analyze_dollar(ctx, i); break;
case '.': /* Pass through. */
- case ':': md_analyze_permissive_url_autolink(ctx, i); break;
- case '@': md_analyze_permissive_email_autolink(ctx, i); break;
+ case ':': /* Pass through. */
+ case '@': md_analyze_permissive_autolink(ctx, i); break;
+ }
+
+ if(mark->flags & MD_MARK_RESOLVED) {
+ if(mark->flags & MD_MARK_OPENER)
+ last_end = ctx->marks[mark->next].end;
+ else
+ last_end = mark->end;
}
i++;
@@ -4047,7 +4107,7 @@ md_analyze_marks(MD_CTX* ctx, const MD_LINE* lines, int n_lines,
/* Analyze marks (build ctx->marks). */
static int
-md_analyze_inlines(MD_CTX* ctx, const MD_LINE* lines, int n_lines, int table_mode)
+md_analyze_inlines(MD_CTX* ctx, const MD_LINE* lines, MD_SIZE n_lines, int table_mode)
{
int ret;
@@ -4058,22 +4118,17 @@ md_analyze_inlines(MD_CTX* ctx, const MD_LINE* lines, int n_lines, int table_mod
MD_CHECK(md_collect_marks(ctx, lines, n_lines, table_mode));
/* (1) Links. */
- md_analyze_marks(ctx, lines, n_lines, 0, ctx->n_marks, _T("[]!"));
+ md_analyze_marks(ctx, lines, n_lines, 0, ctx->n_marks, _T("[]!"), 0);
MD_CHECK(md_resolve_links(ctx, lines, n_lines));
- BRACKET_OPENERS.head = -1;
- BRACKET_OPENERS.tail = -1;
+ BRACKET_OPENERS.top = -1;
ctx->unresolved_link_head = -1;
ctx->unresolved_link_tail = -1;
if(table_mode) {
- /* (2) Analyze table cell boundaries.
- * Note we reset TABLECELLBOUNDARIES chain prior to the call md_analyze_marks(),
- * not after, because caller may need it. */
+ /* (2) Analyze table cell boundaries. */
MD_ASSERT(n_lines == 1);
- TABLECELLBOUNDARIES.head = -1;
- TABLECELLBOUNDARIES.tail = -1;
ctx->n_table_cell_boundaries = 0;
- md_analyze_marks(ctx, lines, n_lines, 0, ctx->n_marks, _T("|"));
+ md_analyze_marks(ctx, lines, n_lines, 0, ctx->n_marks, _T("|"), 0);
return ret;
}
@@ -4085,23 +4140,28 @@ abort:
}
static void
-md_analyze_link_contents(MD_CTX* ctx, const MD_LINE* lines, int n_lines,
+md_analyze_link_contents(MD_CTX* ctx, const MD_LINE* lines, MD_SIZE n_lines,
int mark_beg, int mark_end)
{
int i;
- md_analyze_marks(ctx, lines, n_lines, mark_beg, mark_end, _T("&"));
- md_analyze_marks(ctx, lines, n_lines, mark_beg, mark_end, _T("*_~$@:."));
+ md_analyze_marks(ctx, lines, n_lines, mark_beg, mark_end, _T("&"), 0);
+ md_analyze_marks(ctx, lines, n_lines, mark_beg, mark_end, _T("*_~$"), 0);
- for(i = OPENERS_CHAIN_FIRST; i <= OPENERS_CHAIN_LAST; i++) {
- ctx->mark_chains[i].head = -1;
- ctx->mark_chains[i].tail = -1;
+ if((ctx->parser.flags & MD_FLAG_PERMISSIVEAUTOLINKS) != 0) {
+ /* These have to be processed last, as they may be greedy and expand
+ * from their original mark. Also their implementation must be careful
+ * not to cross any (previously) resolved marks when doing so. */
+ md_analyze_marks(ctx, lines, n_lines, mark_beg, mark_end, _T("@:."), MD_ANALYZE_NOSKIP_EMPH);
}
+
+ for(i = 0; i < (int) SIZEOF_ARRAY(ctx->opener_stacks); i++)
+ ctx->opener_stacks[i].top = -1;
}
static int
md_enter_leave_span_a(MD_CTX* ctx, int enter, MD_SPANTYPE type,
- const CHAR* dest, SZ dest_size, int prohibit_escapes_in_dest,
+ const CHAR* dest, SZ dest_size, int is_autolink,
const CHAR* title, SZ title_size)
{
MD_ATTRIBUTE_BUILD href_build = { 0 };
@@ -4113,10 +4173,10 @@ md_enter_leave_span_a(MD_CTX* ctx, int enter, MD_SPANTYPE type,
* MD_SPAN_IMG_DETAIL are binary-compatible. */
memset(&det, 0, sizeof(MD_SPAN_A_DETAIL));
MD_CHECK(md_build_attribute(ctx, dest, dest_size,
- (prohibit_escapes_in_dest ? MD_BUILD_ATTR_NO_ESCAPES : 0),
+ (is_autolink ? MD_BUILD_ATTR_NO_ESCAPES : 0),
&det.href, &href_build));
MD_CHECK(md_build_attribute(ctx, title, title_size, 0, &det.title, &title_build));
-
+ det.is_autolink = is_autolink;
if(enter)
MD_ENTER_SPAN(type, &det);
else
@@ -4151,7 +4211,7 @@ abort:
/* Render the output, accordingly to the analyzed ctx->marks. */
static int
-md_process_inlines(MD_CTX* ctx, const MD_LINE* lines, int n_lines)
+md_process_inlines(MD_CTX* ctx, const MD_LINE* lines, MD_SIZE n_lines)
{
MD_TEXTTYPE text_type;
const MD_LINE* line = lines;
@@ -4159,6 +4219,7 @@ md_process_inlines(MD_CTX* ctx, const MD_LINE* lines, int n_lines)
MD_MARK* mark;
OFF off = lines[0].beg;
OFF end = lines[n_lines-1].end;
+ OFF tmp;
int enforce_hardbreak = 0;
int ret = 0;
@@ -4174,7 +4235,7 @@ md_process_inlines(MD_CTX* ctx, const MD_LINE* lines, int n_lines)
while(1) {
/* Process the text up to the next mark or end-of-line. */
- OFF tmp = (line->end < mark->beg ? line->end : mark->beg);
+ tmp = (line->end < mark->beg ? line->end : mark->beg);
if(tmp > off) {
MD_TEXT(text_type, STR(off), tmp - off);
off = tmp;
@@ -4291,7 +4352,7 @@ md_process_inlines(MD_CTX* ctx, const MD_LINE* lines, int n_lines)
dest_mark = opener+1;
MD_ASSERT(dest_mark->ch == 'D');
title_mark = opener+2;
- if (title_mark->ch != 'D') break;
+ MD_ASSERT(title_mark->ch == 'D');
MD_CHECK(md_enter_leave_span_a(ctx, (mark->ch != ']'),
(opener->ch == '!' ? MD_SPAN_IMG : MD_SPAN_A),
@@ -4339,11 +4400,13 @@ md_process_inlines(MD_CTX* ctx, const MD_LINE* lines, int n_lines)
if(mark->flags & MD_MARK_OPENER)
closer->flags |= MD_MARK_VALIDPERMISSIVEAUTOLINK;
- if(opener->ch == '@' || opener->ch == '.') {
+ if(opener->ch == '@' || opener->ch == '.' ||
+ (opener->ch == '<' && (opener->flags & MD_MARK_AUTOLINK_MISSING_MAILTO)))
+ {
dest_size += 7;
MD_TEMP_BUFFER(dest_size * sizeof(CHAR));
memcpy(ctx->buffer,
- (opener->ch == '@' ? _T("mailto:") : _T("http://")),
+ (opener->ch == '.' ? _T("http://") : _T("mailto:")),
7 * sizeof(CHAR));
memcpy(ctx->buffer + 7, dest, (dest_size-7) * sizeof(CHAR));
dest = ctx->buffer;
@@ -4383,8 +4446,6 @@ md_process_inlines(MD_CTX* ctx, const MD_LINE* lines, int n_lines)
break;
if(text_type == MD_TEXT_CODE || text_type == MD_TEXT_LATEXMATH) {
- OFF tmp;
-
MD_ASSERT(prev_mark != NULL);
MD_ASSERT(ISANYOF2_(prev_mark->ch, '`', '$') && (prev_mark->flags & MD_MARK_OPENER));
MD_ASSERT(ISANYOF2_(mark->ch, '`', '$') && (mark->flags & MD_MARK_CLOSER));
@@ -4398,13 +4459,12 @@ md_process_inlines(MD_CTX* ctx, const MD_LINE* lines, int n_lines)
MD_TEXT(text_type, STR(tmp), off-tmp);
/* and new lines are transformed into single spaces. */
- if(prev_mark->end < off && off < mark->beg)
+ if(off == line->end)
MD_TEXT(text_type, _T(" "), 1);
} else if(text_type == MD_TEXT_HTML) {
/* Inside raw HTML, we output the new line verbatim, including
* any trailing spaces. */
- OFF tmp = off;
-
+ tmp = off;
while(tmp < end && ISBLANK(tmp))
tmp++;
if(tmp > off)
@@ -4415,7 +4475,9 @@ md_process_inlines(MD_CTX* ctx, const MD_LINE* lines, int n_lines)
MD_TEXTTYPE break_type = MD_TEXT_SOFTBR;
if(text_type == MD_TEXT_NORMAL) {
- if(enforce_hardbreak)
+ if(ctx->parser.flags & MD_FLAG_HARD_SOFT_BREAKS)
+ break_type = MD_TEXT_BR;
+ else if(enforce_hardbreak)
break_type = MD_TEXT_BR;
else if((CH(line->end) == _T(' ') && CH(line->end+1) == _T(' ')))
break_type = MD_TEXT_BR;
@@ -4467,7 +4529,7 @@ md_analyze_table_alignment(MD_CTX* ctx, OFF beg, OFF end, MD_ALIGN* align, int n
}
/* Forward declaration. */
-static int md_process_normal_block_contents(MD_CTX* ctx, const MD_LINE* lines, int n_lines);
+static int md_process_normal_block_contents(MD_CTX* ctx, const MD_LINE* lines, MD_SIZE n_lines);
static int
md_process_table_cell(MD_CTX* ctx, MD_BLOCKTYPE cell_type, MD_ALIGN align, OFF beg, OFF end)
@@ -4520,7 +4582,7 @@ md_process_table_row(MD_CTX* ctx, MD_BLOCKTYPE cell_type, OFF beg, OFF end,
}
j = 0;
pipe_offs[j++] = beg;
- for(i = TABLECELLBOUNDARIES.head; i >= 0; i = ctx->marks[i].next) {
+ for(i = ctx->table_cell_boundaries_head; i >= 0; i = ctx->marks[i].next) {
MD_MARK* mark = &ctx->marks[i];
pipe_offs[j++] = mark->end;
}
@@ -4542,20 +4604,17 @@ md_process_table_row(MD_CTX* ctx, MD_BLOCKTYPE cell_type, OFF beg, OFF end,
abort:
free(pipe_offs);
- /* Free any temporary memory blocks stored within some dummy marks. */
- for(i = PTR_CHAIN.head; i >= 0; i = ctx->marks[i].next)
- free(md_mark_get_ptr(ctx, i));
- PTR_CHAIN.head = -1;
- PTR_CHAIN.tail = -1;
+ ctx->table_cell_boundaries_head = -1;
+ ctx->table_cell_boundaries_tail = -1;
return ret;
}
static int
-md_process_table_block_contents(MD_CTX* ctx, int col_count, const MD_LINE* lines, int n_lines)
+md_process_table_block_contents(MD_CTX* ctx, int col_count, const MD_LINE* lines, MD_SIZE n_lines)
{
MD_ALIGN* align;
- int i;
+ MD_SIZE line_index;
int ret = 0;
/* At least two lines have to be present: The column headers and the line
@@ -4578,9 +4637,9 @@ md_process_table_block_contents(MD_CTX* ctx, int col_count, const MD_LINE* lines
if(n_lines > 2) {
MD_ENTER_BLOCK(MD_BLOCK_TBODY, NULL);
- for(i = 2; i < n_lines; i++) {
+ for(line_index = 2; line_index < n_lines; line_index++) {
MD_CHECK(md_process_table_row(ctx, MD_BLOCK_TD,
- lines[i].beg, lines[i].end, align, col_count));
+ lines[line_index].beg, lines[line_index].end, align, col_count));
}
MD_LEAVE_BLOCK(MD_BLOCK_TBODY, NULL);
}
@@ -4616,7 +4675,7 @@ struct MD_BLOCK_tag {
* MD_BLOCK_LI: Task mark offset in the input doc.
* MD_BLOCK_OL: Start item number.
*/
- unsigned n_lines;
+ MD_SIZE n_lines;
};
struct MD_CONTAINER_tag {
@@ -4632,7 +4691,7 @@ struct MD_CONTAINER_tag {
static int
-md_process_normal_block_contents(MD_CTX* ctx, const MD_LINE* lines, int n_lines)
+md_process_normal_block_contents(MD_CTX* ctx, const MD_LINE* lines, MD_SIZE n_lines)
{
int i;
int ret;
@@ -4642,25 +4701,24 @@ md_process_normal_block_contents(MD_CTX* ctx, const MD_LINE* lines, int n_lines)
abort:
/* Free any temporary memory blocks stored within some dummy marks. */
- for(i = PTR_CHAIN.head; i >= 0; i = ctx->marks[i].next)
+ for(i = ctx->ptr_stack.top; i >= 0; i = ctx->marks[i].next)
free(md_mark_get_ptr(ctx, i));
- PTR_CHAIN.head = -1;
- PTR_CHAIN.tail = -1;
+ ctx->ptr_stack.top = -1;
return ret;
}
static int
-md_process_verbatim_block_contents(MD_CTX* ctx, MD_TEXTTYPE text_type, const MD_VERBATIMLINE* lines, int n_lines)
+md_process_verbatim_block_contents(MD_CTX* ctx, MD_TEXTTYPE text_type, const MD_VERBATIMLINE* lines, MD_SIZE n_lines)
{
static const CHAR indent_chunk_str[] = _T(" ");
static const SZ indent_chunk_size = SIZEOF_ARRAY(indent_chunk_str) - 1;
- int i;
+ MD_SIZE line_index;
int ret = 0;
- for(i = 0; i < n_lines; i++) {
- const MD_VERBATIMLINE* line = &lines[i];
+ for(line_index = 0; line_index < n_lines; line_index++) {
+ const MD_VERBATIMLINE* line = &lines[line_index];
int indent = line->indent;
MD_ASSERT(indent >= 0);
@@ -4685,7 +4743,7 @@ abort:
}
static int
-md_process_code_block_contents(MD_CTX* ctx, int is_fenced, const MD_VERBATIMLINE* lines, int n_lines)
+md_process_code_block_contents(MD_CTX* ctx, int is_fenced, const MD_VERBATIMLINE* lines, MD_SIZE n_lines)
{
if(is_fenced) {
/* Skip the first line in case of fenced code: It is the fence.
@@ -5012,8 +5070,8 @@ static int
md_consume_link_reference_definitions(MD_CTX* ctx)
{
MD_LINE* lines = (MD_LINE*) (ctx->current_block + 1);
- int n_lines = ctx->current_block->n_lines;
- int n = 0;
+ MD_SIZE n_lines = ctx->current_block->n_lines;
+ MD_SIZE n = 0;
/* Compute how many lines at the start of the block form one or more
* reference definitions. */
@@ -5068,7 +5126,7 @@ md_end_current_block(MD_CTX* ctx)
(ctx->current_block->type == MD_BLOCK_H && (ctx->current_block->flags & MD_BLOCK_SETEXT_HEADER)))
{
MD_LINE* lines = (MD_LINE*) (ctx->current_block + 1);
- if(CH(lines[0].beg) == _T('[')) {
+ if(lines[0].beg < ctx->size && CH(lines[0].beg) == _T('[')) {
MD_CHECK(md_consume_link_reference_definitions(ctx));
if(ctx->current_block == NULL)
return ret;
@@ -5076,7 +5134,7 @@ md_end_current_block(MD_CTX* ctx)
}
if(ctx->current_block->type == MD_BLOCK_H && (ctx->current_block->flags & MD_BLOCK_SETEXT_HEADER)) {
- int n_lines = ctx->current_block->n_lines;
+ MD_SIZE n_lines = ctx->current_block->n_lines;
if(n_lines > 1) {
/* Get rid of the underline. */
@@ -5215,8 +5273,8 @@ md_is_setext_underline(MD_CTX* ctx, OFF beg, OFF* p_end, unsigned* p_level)
while(off < ctx->size && CH(off) == CH(beg))
off++;
- /* Optionally, space(s) can follow. */
- while(off < ctx->size && CH(off) == _T(' '))
+ /* Optionally, space(s) or tabs can follow. */
+ while(off < ctx->size && ISBLANK(off))
off++;
/* But nothing more is allowed on the line. */
@@ -5256,6 +5314,10 @@ md_is_table_underline(MD_CTX* ctx, OFF beg, OFF* p_end, unsigned* p_col_count)
off++;
col_count++;
+ if(col_count > TABLE_MAXCOLCOUNT) {
+ MD_LOG("Suppressing table (column_count >" STRINGIZE(TABLE_MAXCOLCOUNT) ")");
+ return FALSE;
+ }
/* Pipe delimiter (optional at the end of line). */
while(off < ctx->size && ISWHITESPACE(off))
@@ -5344,48 +5406,55 @@ out:
return ret;
}
-/* Returns type of the raw HTML block, or FALSE if it is not HTML block.
- * (Refer to CommonMark specification for details about the types.)
- */
-static int
-md_is_html_block_start_condition(MD_CTX* ctx, OFF beg)
-{
- typedef struct TAG_tag TAG;
- struct TAG_tag {
- const CHAR* name;
- unsigned len : 8;
- };
- /* Type 6 is started by a long list of allowed tags. We use two-level
- * tree to speed-up the search. */
+/* Helper data for md_is_html_block_start_condition() and
+ * md_is_html_block_end_condition() */
+typedef struct TAG_tag TAG;
+struct TAG_tag {
+ const CHAR* name;
+ unsigned len : 8;
+};
+
#ifdef X
#undef X
#endif
#define X(name) { _T(name), (sizeof(name)-1) / sizeof(CHAR) }
#define Xend { NULL, 0 }
- static const TAG t1[] = { X("pre"), X("script"), X("style"), X("textarea"), Xend };
-
- static const TAG a6[] = { X("address"), X("article"), X("aside"), Xend };
- static const TAG b6[] = { X("base"), X("basefont"), X("blockquote"), X("body"), Xend };
- static const TAG c6[] = { X("caption"), X("center"), X("col"), X("colgroup"), Xend };
- static const TAG d6[] = { X("dd"), X("details"), X("dialog"), X("dir"),
- X("div"), X("dl"), X("dt"), Xend };
- static const TAG f6[] = { X("fieldset"), X("figcaption"), X("figure"), X("footer"),
- X("form"), X("frame"), X("frameset"), Xend };
- static const TAG h6[] = { X("h1"), X("head"), X("header"), X("hr"), X("html"), Xend };
- static const TAG i6[] = { X("iframe"), Xend };
- static const TAG l6[] = { X("legend"), X("li"), X("link"), Xend };
- static const TAG m6[] = { X("main"), X("menu"), X("menuitem"), Xend };
- static const TAG n6[] = { X("nav"), X("noframes"), Xend };
- static const TAG o6[] = { X("ol"), X("optgroup"), X("option"), Xend };
- static const TAG p6[] = { X("p"), X("param"), Xend };
- static const TAG s6[] = { X("section"), X("source"), X("summary"), Xend };
- static const TAG t6[] = { X("table"), X("tbody"), X("td"), X("tfoot"), X("th"),
- X("thead"), X("title"), X("tr"), X("track"), Xend };
- static const TAG u6[] = { X("ul"), Xend };
- static const TAG xx[] = { Xend };
+
+static const TAG t1[] = { X("pre"), X("script"), X("style"), X("textarea"), Xend };
+
+static const TAG a6[] = { X("address"), X("article"), X("aside"), Xend };
+static const TAG b6[] = { X("base"), X("basefont"), X("blockquote"), X("body"), Xend };
+static const TAG c6[] = { X("caption"), X("center"), X("col"), X("colgroup"), Xend };
+static const TAG d6[] = { X("dd"), X("details"), X("dialog"), X("dir"),
+ X("div"), X("dl"), X("dt"), Xend };
+static const TAG f6[] = { X("fieldset"), X("figcaption"), X("figure"), X("footer"),
+ X("form"), X("frame"), X("frameset"), Xend };
+static const TAG h6[] = { X("h1"), X("h2"), X("h3"), X("h4"), X("h5"), X("h6"),
+ X("head"), X("header"), X("hr"), X("html"), Xend };
+static const TAG i6[] = { X("iframe"), Xend };
+static const TAG l6[] = { X("legend"), X("li"), X("link"), Xend };
+static const TAG m6[] = { X("main"), X("menu"), X("menuitem"), Xend };
+static const TAG n6[] = { X("nav"), X("noframes"), Xend };
+static const TAG o6[] = { X("ol"), X("optgroup"), X("option"), Xend };
+static const TAG p6[] = { X("p"), X("param"), Xend };
+static const TAG s6[] = { X("search"), X("section"), X("summary"), Xend };
+static const TAG t6[] = { X("table"), X("tbody"), X("td"), X("tfoot"), X("th"),
+ X("thead"), X("title"), X("tr"), X("track"), Xend };
+static const TAG u6[] = { X("ul"), Xend };
+static const TAG xx[] = { Xend };
+
#undef X
+#undef Xend
+/* Returns type of the raw HTML block, or FALSE if it is not HTML block.
+ * (Refer to CommonMark specification for details about the types.)
+ */
+static int
+md_is_html_block_start_condition(MD_CTX* ctx, OFF beg)
+{
+ /* Type 6 is started by a long list of allowed tags. We use two-level
+ * tree to speed-up the search. */
static const TAG* map6[26] = {
a6, b6, c6, d6, xx, f6, xx, h6, i6, xx, xx, l6, m6,
n6, o6, p6, xx, xx, s6, t6, u6, xx, xx, xx, xx, xx
@@ -5496,21 +5565,21 @@ md_is_html_block_end_condition(MD_CTX* ctx, OFF beg, OFF* p_end)
case 1:
{
OFF off = beg;
-
- while(off < ctx->size && !ISNEWLINE(off)) {
- if(CH(off) == _T('<')) {
- #define FIND_TAG_END(string, length) \
- if(off + length <= ctx->size && \
- md_ascii_case_eq(STR(off), _T(string), length)) { \
- *p_end = off + length; \
- return TRUE; \
+ int i;
+
+ while(off+1 < ctx->size && !ISNEWLINE(off)) {
+ if(CH(off) == _T('<') && CH(off+1) == _T('/')) {
+ for(i = 0; t1[i].name != NULL; i++) {
+ if(off + 2 + t1[i].len < ctx->size) {
+ if(md_ascii_case_eq(STR(off+2), t1[i].name, t1[i].len) &&
+ CH(off+2+t1[i].len) == _T('>'))
+ {
+ *p_end = off+2+t1[i].len+1;
+ return TRUE;
+ }
+ }
}
- FIND_TAG_END("</script>", 9)
- FIND_TAG_END("</style>", 8)
- FIND_TAG_END("</pre>", 6)
- #undef FIND_TAG_END
}
-
off++;
}
*p_end = off;
@@ -5531,8 +5600,12 @@ md_is_html_block_end_condition(MD_CTX* ctx, OFF beg, OFF* p_end)
case 6: /* Pass through */
case 7:
- *p_end = beg;
- return (beg >= ctx->size || ISNEWLINE(beg) ? ctx->html_block_type : FALSE);
+ if(beg >= ctx->size || ISNEWLINE(beg)) {
+ /* Blank line ends types 6 and 7. */
+ *p_end = beg;
+ return ctx->html_block_type;
+ }
+ return FALSE;
default:
MD_UNREACHABLE();
@@ -5744,7 +5817,7 @@ md_line_indentation(MD_CTX* ctx, unsigned total_indent, OFF beg, OFF* p_end)
return indent - total_indent;
}
-static const MD_LINE_ANALYSIS md_dummy_blank_line = { MD_LINE_BLANK, 0, 0, 0, 0 };
+static const MD_LINE_ANALYSIS md_dummy_blank_line = { MD_LINE_BLANK, 0, 0, 0, 0, 0 };
/* Analyze type of the line and find some its properties. This serves as a
* main input for determining type and boundaries of a block. */
@@ -5765,6 +5838,7 @@ md_analyze_line(MD_CTX* ctx, OFF beg, OFF* p_end,
line->indent = md_line_indentation(ctx, total_indent, off, &off);
total_indent += line->indent;
line->beg = off;
+ line->enforce_new_block = FALSE;
/* Given the indentation and block quote marks '>', determine how many of
* the current containers are our parents. */
@@ -5906,20 +5980,26 @@ md_analyze_line(MD_CTX* ctx, OFF beg, OFF* p_end,
* was a 2nd blank line at the beginning of the list item) and if
* we would otherwise still belong to the list item, we enforce
* the end of the list. */
- ctx->last_line_has_list_loosening_effect = FALSE;
if(ctx->last_list_item_starts_with_two_blank_lines) {
- if(n_parents > 0 && ctx->containers[n_parents-1].ch != _T('>') &&
+ if(n_parents > 0 && n_parents == ctx->n_containers &&
+ ctx->containers[n_parents-1].ch != _T('>') &&
n_brothers + n_children == 0 && ctx->current_block == NULL &&
ctx->n_block_bytes > (int) sizeof(MD_BLOCK))
{
MD_BLOCK* top_block = (MD_BLOCK*) ((char*)ctx->block_bytes + ctx->n_block_bytes - sizeof(MD_BLOCK));
- if(top_block->type == MD_BLOCK_LI)
+ if(top_block->type == MD_BLOCK_LI) {
n_parents--;
+
+ line->indent = total_indent;
+ if(n_parents > 0)
+ line->indent -= MIN(line->indent, ctx->containers[n_parents-1].contents_indent);
+ }
}
ctx->last_list_item_starts_with_two_blank_lines = FALSE;
}
#endif
+ ctx->last_line_has_list_loosening_effect = FALSE;
}
/* Check whether we are Setext underline. */
@@ -5985,11 +6065,8 @@ md_analyze_line(MD_CTX* ctx, OFF beg, OFF* p_end,
/* Check for indented code.
* Note indented code block cannot interrupt a paragraph. */
- if(line->indent >= ctx->code_indent_offset &&
- (pivot_line->type == MD_LINE_BLANK || pivot_line->type == MD_LINE_INDENTEDCODE))
- {
+ if(line->indent >= ctx->code_indent_offset && (pivot_line->type != MD_LINE_TEXT)) {
line->type = MD_LINE_INDENTEDCODE;
- MD_ASSERT(line->indent >= ctx->code_indent_offset);
line->indent -= ctx->code_indent_offset;
line->data = 0;
break;
@@ -6058,10 +6135,13 @@ md_analyze_line(MD_CTX* ctx, OFF beg, OFF* p_end,
}
/* Check whether we are starting code fence. */
- if(off < ctx->size && ISANYOF2(off, _T('`'), _T('~'))) {
+ if(line->indent < ctx->code_indent_offset &&
+ off < ctx->size && ISANYOF2(off, _T('`'), _T('~')))
+ {
if(md_is_opening_code_fence(ctx, off, &off)) {
line->type = MD_LINE_FENCEDCODE;
line->data = 1;
+ line->enforce_new_block = TRUE;
break;
}
}
@@ -6083,6 +6163,7 @@ md_analyze_line(MD_CTX* ctx, OFF beg, OFF* p_end,
ctx->html_block_type = 0;
}
+ line->enforce_new_block = TRUE;
line->type = MD_LINE_HTML;
break;
}
@@ -6127,9 +6208,8 @@ md_analyze_line(MD_CTX* ctx, OFF beg, OFF* p_end,
task_container->is_task = TRUE;
task_container->task_mark_off = tmp + 1;
off = tmp + 3;
- while(off < ctx->size && ISWHITESPACE(off))
+ while(off < ctx->size && ISWHITESPACE(off))
off++;
- if (off == ctx->size) break;
line->beg = off;
}
}
@@ -6182,7 +6262,7 @@ md_analyze_line(MD_CTX* ctx, OFF beg, OFF* p_end,
}
/* Trim trailing spaces. */
- if(line->type != MD_LINE_INDENTEDCODE && line->type != MD_LINE_FENCEDCODE) {
+ if(line->type != MD_LINE_INDENTEDCODE && line->type != MD_LINE_FENCEDCODE && line->type != MD_LINE_HTML) {
while(line->end > line->beg && CH(line->end-1) == _T(' '))
line->end--;
}
@@ -6243,6 +6323,9 @@ md_process_line(MD_CTX* ctx, const MD_LINE_ANALYSIS** p_pivot_line, MD_LINE_ANAL
return 0;
}
+ if(line->enforce_new_block)
+ MD_CHECK(md_end_current_block(ctx));
+
/* Some line types form block on their own. */
if(line->type == MD_LINE_HR || line->type == MD_LINE_ATXHEADER) {
MD_CHECK(md_end_current_block(ctx));
@@ -6387,13 +6470,14 @@ md_parse(const MD_CHAR* text, MD_SIZE size, const MD_PARSER* parser, void* userd
md_build_mark_char_map(&ctx);
ctx.doc_ends_with_newline = (size > 0 && ISNEWLINE_(text[size-1]));
- /* Reset all unresolved opener mark chains. */
- for(i = 0; i < (int) SIZEOF_ARRAY(ctx.mark_chains); i++) {
- ctx.mark_chains[i].head = -1;
- ctx.mark_chains[i].tail = -1;
- }
+ /* Reset all mark stacks and lists. */
+ for(i = 0; i < (int) SIZEOF_ARRAY(ctx.opener_stacks); i++)
+ ctx.opener_stacks[i].top = -1;
+ ctx.ptr_stack.top = -1;
ctx.unresolved_link_head = -1;
ctx.unresolved_link_tail = -1;
+ ctx.table_cell_boundaries_head = -1;
+ ctx.table_cell_boundaries_tail = -1;
/* All the work. */
ret = md_process_doc(&ctx);
diff --git a/src/third-party/md4c/md4c.h b/src/third-party/md4c/md4c.h
index 95f78f9..8d6be1c 100644
--- a/src/third-party/md4c/md4c.h
+++ b/src/third-party/md4c/md4c.h
@@ -2,7 +2,7 @@
* MD4C: Markdown parser for C
* (http://github.com/mity/md4c)
*
- * Copyright (c) 2016-2020 Martin Mitas
+ * Copyright (c) 2016-2024 Martin Mitáš
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -284,6 +284,7 @@ typedef struct MD_BLOCK_TD_DETAIL {
typedef struct MD_SPAN_A_DETAIL {
MD_ATTRIBUTE href;
MD_ATTRIBUTE title;
+ int is_autolink; /* nonzero if this is an autolink */
} MD_SPAN_A_DETAIL;
/* Detailed info for MD_SPAN_IMG. */
@@ -316,6 +317,7 @@ typedef struct MD_SPAN_WIKILINK {
#define MD_FLAG_LATEXMATHSPANS 0x1000 /* Enable $ and $$ containing LaTeX equations. */
#define MD_FLAG_WIKILINKS 0x2000 /* Enable wiki links extension. */
#define MD_FLAG_UNDERLINE 0x4000 /* Enable underline extension (and disables '_' for normal emphasis). */
+#define MD_FLAG_HARD_SOFT_BREAKS 0x8000 /* Force all soft breaks to act as hard breaks. */
#define MD_FLAG_PERMISSIVEAUTOLINKS (MD_FLAG_PERMISSIVEEMAILAUTOLINKS | MD_FLAG_PERMISSIVEURLAUTOLINKS | MD_FLAG_PERMISSIVEWWWAUTOLINKS)
#define MD_FLAG_NOHTML (MD_FLAG_NOHTMLBLOCKS | MD_FLAG_NOHTMLSPANS)
diff --git a/src/third-party/prqlc-c/Cargo.lock b/src/third-party/prqlc-c/Cargo.lock
new file mode 100644
index 0000000..486bd5c
--- /dev/null
+++ b/src/third-party/prqlc-c/Cargo.lock
@@ -0,0 +1,1602 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 3
+
+[[package]]
+name = "addr2line"
+version = "0.21.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb"
+dependencies = [
+ "gimli",
+]
+
+[[package]]
+name = "adler"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
+
+[[package]]
+name = "ahash"
+version = "0.8.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011"
+dependencies = [
+ "cfg-if",
+ "once_cell",
+ "version_check",
+ "zerocopy",
+]
+
+[[package]]
+name = "aho-corasick"
+version = "1.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "allocator-api2"
+version = "0.2.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5"
+
+[[package]]
+name = "android-tzdata"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"
+
+[[package]]
+name = "android_system_properties"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "anstream"
+version = "0.6.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb"
+dependencies = [
+ "anstyle",
+ "anstyle-parse",
+ "anstyle-query",
+ "anstyle-wincon",
+ "colorchoice",
+ "utf8parse",
+]
+
+[[package]]
+name = "anstyle"
+version = "1.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc"
+
+[[package]]
+name = "anstyle-parse"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c"
+dependencies = [
+ "utf8parse",
+]
+
+[[package]]
+name = "anstyle-query"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648"
+dependencies = [
+ "windows-sys 0.52.0",
+]
+
+[[package]]
+name = "anstyle-wincon"
+version = "3.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7"
+dependencies = [
+ "anstyle",
+ "windows-sys 0.52.0",
+]
+
+[[package]]
+name = "anyhow"
+version = "1.0.81"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247"
+dependencies = [
+ "backtrace",
+]
+
+[[package]]
+name = "ariadne"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dd002a6223f12c7a95cdd4b1cb3a0149d22d37f7a9ecdb2cb691a071fe236c29"
+dependencies = [
+ "unicode-width",
+ "yansi",
+]
+
+[[package]]
+name = "atty"
+version = "0.2.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
+dependencies = [
+ "hermit-abi 0.1.19",
+ "libc",
+ "winapi",
+]
+
+[[package]]
+name = "autocfg"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80"
+
+[[package]]
+name = "backtrace"
+version = "0.3.71"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d"
+dependencies = [
+ "addr2line",
+ "cc",
+ "cfg-if",
+ "libc",
+ "miniz_oxide",
+ "object",
+ "rustc-demangle",
+]
+
+[[package]]
+name = "bitflags"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
+
+[[package]]
+name = "bitflags"
+version = "2.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1"
+
+[[package]]
+name = "bumpalo"
+version = "3.15.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa"
+
+[[package]]
+name = "cc"
+version = "1.0.90"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5"
+
+[[package]]
+name = "cfg-if"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+
+[[package]]
+name = "chrono"
+version = "0.4.37"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8a0d04d43504c61aa6c7531f1871dd0d418d91130162063b789da00fd7057a5e"
+dependencies = [
+ "android-tzdata",
+ "iana-time-zone",
+ "js-sys",
+ "num-traits",
+ "wasm-bindgen",
+ "windows-targets 0.52.4",
+]
+
+[[package]]
+name = "chumsky"
+version = "0.9.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8eebd66744a15ded14960ab4ccdbfb51ad3b81f51f3f04a80adac98c985396c9"
+dependencies = [
+ "hashbrown",
+ "stacker",
+]
+
+[[package]]
+name = "clap"
+version = "4.5.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0"
+dependencies = [
+ "clap_builder",
+ "clap_derive",
+]
+
+[[package]]
+name = "clap_builder"
+version = "4.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4"
+dependencies = [
+ "anstream",
+ "anstyle",
+ "clap_lex",
+ "strsim",
+ "terminal_size",
+]
+
+[[package]]
+name = "clap_complete"
+version = "4.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "885e4d7d5af40bfb99ae6f9433e292feac98d452dcb3ec3d25dfe7552b77da8c"
+dependencies = [
+ "clap",
+]
+
+[[package]]
+name = "clap_complete_command"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "183495371ea78d4c9ff638bfc6497d46fed2396e4f9c50aebc1278a4a9919a3d"
+dependencies = [
+ "clap",
+ "clap_complete",
+ "clap_complete_fig",
+ "clap_complete_nushell",
+]
+
+[[package]]
+name = "clap_complete_fig"
+version = "4.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "54b3e65f91fabdd23cac3d57d39d5d938b4daabd070c335c006dccb866a61110"
+dependencies = [
+ "clap",
+ "clap_complete",
+]
+
+[[package]]
+name = "clap_complete_nushell"
+version = "0.1.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5d02bc8b1a18ee47c4d2eec3fb5ac034dc68ebea6125b1509e9ccdffcddce66e"
+dependencies = [
+ "clap",
+ "clap_complete",
+]
+
+[[package]]
+name = "clap_derive"
+version = "4.5.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64"
+dependencies = [
+ "heck 0.5.0",
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "clap_lex"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce"
+
+[[package]]
+name = "clio"
+version = "0.3.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b7fc6734af48458f72f5a3fa7b840903606427d98a710256e808f76a965047d9"
+dependencies = [
+ "cfg-if",
+ "clap",
+ "is-terminal",
+ "libc",
+ "tempfile",
+ "walkdir",
+ "windows-sys 0.42.0",
+]
+
+[[package]]
+name = "codespan-reporting"
+version = "0.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e"
+dependencies = [
+ "termcolor",
+ "unicode-width",
+]
+
+[[package]]
+name = "color-eyre"
+version = "0.6.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "55146f5e46f237f7423d74111267d4597b59b0dad0ffaf7303bce9945d843ad5"
+dependencies = [
+ "backtrace",
+ "color-spantrace",
+ "eyre",
+ "indenter",
+ "once_cell",
+ "owo-colors",
+ "tracing-error",
+]
+
+[[package]]
+name = "color-spantrace"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cd6be1b2a7e382e2b98b43b2adcca6bb0e465af0bdd38123873ae61eb17a72c2"
+dependencies = [
+ "once_cell",
+ "owo-colors",
+ "tracing-core",
+ "tracing-error",
+]
+
+[[package]]
+name = "colorchoice"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7"
+
+[[package]]
+name = "colorchoice-clap"
+version = "1.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6fe9ad5d064caf028aeb50818a5c7857c28f746ad04111652b85d9bca8b0d0be"
+dependencies = [
+ "clap",
+ "colorchoice",
+]
+
+[[package]]
+name = "core-foundation-sys"
+version = "0.8.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f"
+
+[[package]]
+name = "crossbeam-channel"
+version = "0.5.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ab3db02a9c5b5121e1e42fbdb1aeb65f5e02624cc58c43f2884c6ccac0b82f95"
+dependencies = [
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "crossbeam-utils"
+version = "0.8.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345"
+
+[[package]]
+name = "csv"
+version = "1.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ac574ff4d437a7b5ad237ef331c17ccca63c46479e5b5453eb8e10bb99a759fe"
+dependencies = [
+ "csv-core",
+ "itoa",
+ "ryu",
+ "serde",
+]
+
+[[package]]
+name = "csv-core"
+version = "0.1.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5efa2b3d7902f4b634a20cae3c9c4e6209dc4779feb6863329607560143efa70"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "cxx"
+version = "1.0.120"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ff4dc7287237dd438b926a81a1a5605dad33d286870e5eee2db17bf2bcd9e92a"
+dependencies = [
+ "cc",
+ "cxxbridge-flags",
+ "cxxbridge-macro",
+ "link-cplusplus",
+]
+
+[[package]]
+name = "cxx-build"
+version = "1.0.120"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f47c6c8ad7c1a10d3ef0fe3ff6733f4db0d78f08ef0b13121543163ef327058b"
+dependencies = [
+ "cc",
+ "codespan-reporting",
+ "once_cell",
+ "proc-macro2",
+ "quote",
+ "scratch",
+ "syn",
+]
+
+[[package]]
+name = "cxxbridge-flags"
+version = "1.0.120"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "701a1ac7a697e249cdd8dc026d7a7dafbfd0dbcd8bd24ec55889f2bc13dd6287"
+
+[[package]]
+name = "cxxbridge-macro"
+version = "1.0.120"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b404f596046b0bb2d903a9c786b875a126261b52b7c3a64bbb66382c41c771df"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "either"
+version = "1.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a"
+
+[[package]]
+name = "enum-as-inner"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5ffccbb6966c05b32ef8fbac435df276c4ae4d3dc55a8cd0eb9745e6c12f546a"
+dependencies = [
+ "heck 0.4.1",
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "env_logger"
+version = "0.10.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580"
+dependencies = [
+ "humantime",
+ "is-terminal",
+ "log",
+ "regex",
+ "termcolor",
+]
+
+[[package]]
+name = "equivalent"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
+
+[[package]]
+name = "errno"
+version = "0.3.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245"
+dependencies = [
+ "libc",
+ "windows-sys 0.52.0",
+]
+
+[[package]]
+name = "eyre"
+version = "0.6.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec"
+dependencies = [
+ "indenter",
+ "once_cell",
+]
+
+[[package]]
+name = "fastrand"
+version = "2.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984"
+
+[[package]]
+name = "filetime"
+version = "0.2.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "redox_syscall",
+ "windows-sys 0.52.0",
+]
+
+[[package]]
+name = "fsevent-sys"
+version = "4.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "76ee7a02da4d231650c7cea31349b889be2f45ddb3ef3032d2ec8185f6313fd2"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "gimli"
+version = "0.28.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253"
+
+[[package]]
+name = "hashbrown"
+version = "0.14.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604"
+dependencies = [
+ "ahash",
+ "allocator-api2",
+]
+
+[[package]]
+name = "heck"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
+
+[[package]]
+name = "heck"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
+
+[[package]]
+name = "hermit-abi"
+version = "0.1.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "hermit-abi"
+version = "0.3.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024"
+
+[[package]]
+name = "humantime"
+version = "2.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
+
+[[package]]
+name = "iana-time-zone"
+version = "0.1.60"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141"
+dependencies = [
+ "android_system_properties",
+ "core-foundation-sys",
+ "iana-time-zone-haiku",
+ "js-sys",
+ "wasm-bindgen",
+ "windows-core",
+]
+
+[[package]]
+name = "iana-time-zone-haiku"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
+dependencies = [
+ "cc",
+]
+
+[[package]]
+name = "indenter"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683"
+
+[[package]]
+name = "indexmap"
+version = "2.2.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26"
+dependencies = [
+ "equivalent",
+ "hashbrown",
+]
+
+[[package]]
+name = "inotify"
+version = "0.9.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f8069d3ec154eb856955c1c0fbffefbf5f3c40a104ec912d4797314c1801abff"
+dependencies = [
+ "bitflags 1.3.2",
+ "inotify-sys",
+ "libc",
+]
+
+[[package]]
+name = "inotify-sys"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e05c02b5e89bff3b946cedeca278abc628fe811e604f027c45a8aa3cf793d0eb"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "is-terminal"
+version = "0.4.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b"
+dependencies = [
+ "hermit-abi 0.3.9",
+ "libc",
+ "windows-sys 0.52.0",
+]
+
+[[package]]
+name = "itertools"
+version = "0.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569"
+dependencies = [
+ "either",
+]
+
+[[package]]
+name = "itoa"
+version = "1.0.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b"
+
+[[package]]
+name = "js-sys"
+version = "0.3.69"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d"
+dependencies = [
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "kqueue"
+version = "1.0.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7447f1ca1b7b563588a205fe93dea8df60fd981423a768bc1c0ded35ed147d0c"
+dependencies = [
+ "kqueue-sys",
+ "libc",
+]
+
+[[package]]
+name = "kqueue-sys"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ed9625ffda8729b85e45cf04090035ac368927b8cebc34898e7c120f52e4838b"
+dependencies = [
+ "bitflags 1.3.2",
+ "libc",
+]
+
+[[package]]
+name = "lazy_static"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
+
+[[package]]
+name = "libc"
+version = "0.2.153"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd"
+
+[[package]]
+name = "link-cplusplus"
+version = "1.0.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9d240c6f7e1ba3a28b0249f774e6a9dd0175054b52dfbb61b16eb8505c3785c9"
+dependencies = [
+ "cc",
+]
+
+[[package]]
+name = "linux-raw-sys"
+version = "0.4.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c"
+
+[[package]]
+name = "log"
+version = "0.4.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c"
+
+[[package]]
+name = "memchr"
+version = "2.7.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d"
+
+[[package]]
+name = "minijinja"
+version = "0.31.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "673d1ece89f7e166f43270800d78f9b1a9d21fda92dbcfa3b98b21213cdccbbc"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "minimal-lexical"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
+
+[[package]]
+name = "miniz_oxide"
+version = "0.7.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7"
+dependencies = [
+ "adler",
+]
+
+[[package]]
+name = "mio"
+version = "0.8.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c"
+dependencies = [
+ "libc",
+ "log",
+ "wasi",
+ "windows-sys 0.48.0",
+]
+
+[[package]]
+name = "nom"
+version = "7.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
+dependencies = [
+ "memchr",
+ "minimal-lexical",
+]
+
+[[package]]
+name = "notify"
+version = "6.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6205bd8bb1e454ad2e27422015fb5e4f2bcc7e08fa8f27058670d208324a4d2d"
+dependencies = [
+ "bitflags 2.5.0",
+ "crossbeam-channel",
+ "filetime",
+ "fsevent-sys",
+ "inotify",
+ "kqueue",
+ "libc",
+ "log",
+ "mio",
+ "walkdir",
+ "windows-sys 0.48.0",
+]
+
+[[package]]
+name = "num-traits"
+version = "0.2.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "object"
+version = "0.32.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "once_cell"
+version = "1.19.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92"
+
+[[package]]
+name = "owo-colors"
+version = "3.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f"
+
+[[package]]
+name = "pin-project-lite"
+version = "0.2.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58"
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.79"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e"
+dependencies = [
+ "unicode-ident",
+]
+
+[[package]]
+name = "prqlc"
+version = "0.11.5"
+source = "git+https://github.com/PRQL/prql.git#2663fdda2b44cc0df8b55c4f62b4248614d45db0"
+dependencies = [
+ "anstream",
+ "anyhow",
+ "ariadne",
+ "atty",
+ "chrono",
+ "clap",
+ "clap_complete",
+ "clap_complete_command",
+ "clio",
+ "color-eyre",
+ "colorchoice-clap",
+ "csv",
+ "enum-as-inner",
+ "env_logger",
+ "itertools",
+ "log",
+ "minijinja",
+ "notify",
+ "once_cell",
+ "prqlc-ast",
+ "prqlc-parser",
+ "regex",
+ "semver",
+ "serde",
+ "serde_json",
+ "serde_yaml",
+ "sqlformat",
+ "sqlparser",
+ "strum",
+ "strum_macros",
+ "walkdir",
+]
+
+[[package]]
+name = "prqlc-ast"
+version = "0.11.5"
+source = "git+https://github.com/PRQL/prql.git#2663fdda2b44cc0df8b55c4f62b4248614d45db0"
+dependencies = [
+ "enum-as-inner",
+ "semver",
+ "serde",
+ "strum",
+]
+
+[[package]]
+name = "prqlc-c"
+version = "0.11.3"
+dependencies = [
+ "cxx",
+ "cxx-build",
+ "prqlc",
+]
+
+[[package]]
+name = "prqlc-parser"
+version = "0.11.5"
+source = "git+https://github.com/PRQL/prql.git#2663fdda2b44cc0df8b55c4f62b4248614d45db0"
+dependencies = [
+ "chumsky",
+ "itertools",
+ "prqlc-ast",
+ "semver",
+ "serde",
+ "stacker",
+]
+
+[[package]]
+name = "psm"
+version = "0.1.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5787f7cda34e3033a72192c018bc5883100330f362ef279a8cbccfce8bb4e874"
+dependencies = [
+ "cc",
+]
+
+[[package]]
+name = "quote"
+version = "1.0.35"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef"
+dependencies = [
+ "proc-macro2",
+]
+
+[[package]]
+name = "redox_syscall"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa"
+dependencies = [
+ "bitflags 1.3.2",
+]
+
+[[package]]
+name = "regex"
+version = "1.10.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-automata",
+ "regex-syntax",
+]
+
+[[package]]
+name = "regex-automata"
+version = "0.4.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-syntax",
+]
+
+[[package]]
+name = "regex-syntax"
+version = "0.8.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56"
+
+[[package]]
+name = "rustc-demangle"
+version = "0.1.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76"
+
+[[package]]
+name = "rustix"
+version = "0.38.32"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89"
+dependencies = [
+ "bitflags 2.5.0",
+ "errno",
+ "libc",
+ "linux-raw-sys",
+ "windows-sys 0.52.0",
+]
+
+[[package]]
+name = "rustversion"
+version = "1.0.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4"
+
+[[package]]
+name = "ryu"
+version = "1.0.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1"
+
+[[package]]
+name = "same-file"
+version = "1.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
+dependencies = [
+ "winapi-util",
+]
+
+[[package]]
+name = "scratch"
+version = "1.0.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a3cf7c11c38cb994f3d40e8a8cde3bbd1f72a435e4c49e85d6553d8312306152"
+
+[[package]]
+name = "semver"
+version = "1.0.22"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "serde"
+version = "1.0.197"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2"
+dependencies = [
+ "serde_derive",
+]
+
+[[package]]
+name = "serde_derive"
+version = "1.0.197"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "serde_json"
+version = "1.0.115"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "12dc5c46daa8e9fdf4f5e71b6cf9a53f2487da0e86e55808e2d35539666497dd"
+dependencies = [
+ "itoa",
+ "ryu",
+ "serde",
+]
+
+[[package]]
+name = "serde_yaml"
+version = "0.9.34+deprecated"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47"
+dependencies = [
+ "indexmap",
+ "itoa",
+ "ryu",
+ "serde",
+ "unsafe-libyaml",
+]
+
+[[package]]
+name = "sharded-slab"
+version = "0.1.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6"
+dependencies = [
+ "lazy_static",
+]
+
+[[package]]
+name = "sqlformat"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ce81b7bd7c4493975347ef60d8c7e8b742d4694f4c49f93e0a12ea263938176c"
+dependencies = [
+ "itertools",
+ "nom",
+ "unicode_categories",
+]
+
+[[package]]
+name = "sqlparser"
+version = "0.44.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aaf9c7ff146298ffda83a200f8d5084f08dcee1edfc135fcc1d646a45d50ffd6"
+dependencies = [
+ "log",
+ "serde",
+]
+
+[[package]]
+name = "stacker"
+version = "0.1.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c886bd4480155fd3ef527d45e9ac8dd7118a898a46530b7b94c3e21866259fce"
+dependencies = [
+ "cc",
+ "cfg-if",
+ "libc",
+ "psm",
+ "winapi",
+]
+
+[[package]]
+name = "strsim"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01"
+
+[[package]]
+name = "strum"
+version = "0.26.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5d8cec3501a5194c432b2b7976db6b7d10ec95c253208b45f83f7136aa985e29"
+dependencies = [
+ "strum_macros",
+]
+
+[[package]]
+name = "strum_macros"
+version = "0.26.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c6cf59daf282c0a494ba14fd21610a0325f9f90ec9d1231dea26bcb1d696c946"
+dependencies = [
+ "heck 0.4.1",
+ "proc-macro2",
+ "quote",
+ "rustversion",
+ "syn",
+]
+
+[[package]]
+name = "syn"
+version = "2.0.55"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "002a1b3dbf967edfafc32655d0f377ab0bb7b994aa1d32c8cc7e9b8bf3ebb8f0"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "tempfile"
+version = "3.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1"
+dependencies = [
+ "cfg-if",
+ "fastrand",
+ "rustix",
+ "windows-sys 0.52.0",
+]
+
+[[package]]
+name = "termcolor"
+version = "1.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755"
+dependencies = [
+ "winapi-util",
+]
+
+[[package]]
+name = "terminal_size"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7"
+dependencies = [
+ "rustix",
+ "windows-sys 0.48.0",
+]
+
+[[package]]
+name = "thread_local"
+version = "1.1.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c"
+dependencies = [
+ "cfg-if",
+ "once_cell",
+]
+
+[[package]]
+name = "tracing"
+version = "0.1.40"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef"
+dependencies = [
+ "pin-project-lite",
+ "tracing-core",
+]
+
+[[package]]
+name = "tracing-core"
+version = "0.1.32"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54"
+dependencies = [
+ "once_cell",
+ "valuable",
+]
+
+[[package]]
+name = "tracing-error"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d686ec1c0f384b1277f097b2f279a2ecc11afe8c133c1aabf036a27cb4cd206e"
+dependencies = [
+ "tracing",
+ "tracing-subscriber",
+]
+
+[[package]]
+name = "tracing-subscriber"
+version = "0.3.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b"
+dependencies = [
+ "sharded-slab",
+ "thread_local",
+ "tracing-core",
+]
+
+[[package]]
+name = "unicode-ident"
+version = "1.0.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
+
+[[package]]
+name = "unicode-width"
+version = "0.1.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85"
+
+[[package]]
+name = "unicode_categories"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e"
+
+[[package]]
+name = "unsafe-libyaml"
+version = "0.2.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861"
+
+[[package]]
+name = "utf8parse"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a"
+
+[[package]]
+name = "valuable"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d"
+
+[[package]]
+name = "version_check"
+version = "0.9.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
+
+[[package]]
+name = "walkdir"
+version = "2.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b"
+dependencies = [
+ "same-file",
+ "winapi-util",
+]
+
+[[package]]
+name = "wasi"
+version = "0.11.0+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
+
+[[package]]
+name = "wasm-bindgen"
+version = "0.2.92"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8"
+dependencies = [
+ "cfg-if",
+ "wasm-bindgen-macro",
+]
+
+[[package]]
+name = "wasm-bindgen-backend"
+version = "0.2.92"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da"
+dependencies = [
+ "bumpalo",
+ "log",
+ "once_cell",
+ "proc-macro2",
+ "quote",
+ "syn",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-macro"
+version = "0.2.92"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726"
+dependencies = [
+ "quote",
+ "wasm-bindgen-macro-support",
+]
+
+[[package]]
+name = "wasm-bindgen-macro-support"
+version = "0.2.92"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+ "wasm-bindgen-backend",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-shared"
+version = "0.2.92"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96"
+
+[[package]]
+name = "winapi"
+version = "0.3.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
+dependencies = [
+ "winapi-i686-pc-windows-gnu",
+ "winapi-x86_64-pc-windows-gnu",
+]
+
+[[package]]
+name = "winapi-i686-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
+
+[[package]]
+name = "winapi-util"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "winapi-x86_64-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
+
+[[package]]
+name = "windows-core"
+version = "0.52.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"
+dependencies = [
+ "windows-targets 0.52.4",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.42.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7"
+dependencies = [
+ "windows_aarch64_gnullvm 0.42.2",
+ "windows_aarch64_msvc 0.42.2",
+ "windows_i686_gnu 0.42.2",
+ "windows_i686_msvc 0.42.2",
+ "windows_x86_64_gnu 0.42.2",
+ "windows_x86_64_gnullvm 0.42.2",
+ "windows_x86_64_msvc 0.42.2",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
+dependencies = [
+ "windows-targets 0.48.5",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.52.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
+dependencies = [
+ "windows-targets 0.52.4",
+]
+
+[[package]]
+name = "windows-targets"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"
+dependencies = [
+ "windows_aarch64_gnullvm 0.48.5",
+ "windows_aarch64_msvc 0.48.5",
+ "windows_i686_gnu 0.48.5",
+ "windows_i686_msvc 0.48.5",
+ "windows_x86_64_gnu 0.48.5",
+ "windows_x86_64_gnullvm 0.48.5",
+ "windows_x86_64_msvc 0.48.5",
+]
+
+[[package]]
+name = "windows-targets"
+version = "0.52.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b"
+dependencies = [
+ "windows_aarch64_gnullvm 0.52.4",
+ "windows_aarch64_msvc 0.52.4",
+ "windows_i686_gnu 0.52.4",
+ "windows_i686_msvc 0.52.4",
+ "windows_x86_64_gnu 0.52.4",
+ "windows_x86_64_gnullvm 0.52.4",
+ "windows_x86_64_msvc 0.52.4",
+]
+
+[[package]]
+name = "windows_aarch64_gnullvm"
+version = "0.42.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8"
+
+[[package]]
+name = "windows_aarch64_gnullvm"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
+
+[[package]]
+name = "windows_aarch64_gnullvm"
+version = "0.52.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9"
+
+[[package]]
+name = "windows_aarch64_msvc"
+version = "0.42.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43"
+
+[[package]]
+name = "windows_aarch64_msvc"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
+
+[[package]]
+name = "windows_aarch64_msvc"
+version = "0.52.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675"
+
+[[package]]
+name = "windows_i686_gnu"
+version = "0.42.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f"
+
+[[package]]
+name = "windows_i686_gnu"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
+
+[[package]]
+name = "windows_i686_gnu"
+version = "0.52.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3"
+
+[[package]]
+name = "windows_i686_msvc"
+version = "0.42.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060"
+
+[[package]]
+name = "windows_i686_msvc"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
+
+[[package]]
+name = "windows_i686_msvc"
+version = "0.52.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02"
+
+[[package]]
+name = "windows_x86_64_gnu"
+version = "0.42.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36"
+
+[[package]]
+name = "windows_x86_64_gnu"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
+
+[[package]]
+name = "windows_x86_64_gnu"
+version = "0.52.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03"
+
+[[package]]
+name = "windows_x86_64_gnullvm"
+version = "0.42.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3"
+
+[[package]]
+name = "windows_x86_64_gnullvm"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
+
+[[package]]
+name = "windows_x86_64_gnullvm"
+version = "0.52.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177"
+
+[[package]]
+name = "windows_x86_64_msvc"
+version = "0.42.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0"
+
+[[package]]
+name = "windows_x86_64_msvc"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
+
+[[package]]
+name = "windows_x86_64_msvc"
+version = "0.52.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8"
+
+[[package]]
+name = "yansi"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec"
+
+[[package]]
+name = "zerocopy"
+version = "0.7.32"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be"
+dependencies = [
+ "zerocopy-derive",
+]
+
+[[package]]
+name = "zerocopy-derive"
+version = "0.7.32"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
diff --git a/src/third-party/prqlc-c/Cargo.toml b/src/third-party/prqlc-c/Cargo.toml
new file mode 100644
index 0000000..f66183a
--- /dev/null
+++ b/src/third-party/prqlc-c/Cargo.toml
@@ -0,0 +1,31 @@
+[package]
+name = "prqlc-c"
+publish = false
+version = "0.11.3"
+
+edition = "2021"
+rust-version = "1.70.0"
+
+# This means we can build with `--features=default`, which can make builds more generic
+[features]
+default = []
+
+[lib]
+# We produce both of these at the moment, but could consider refining this. ref
+# https://github.com/rust-lang/cargo/issues/8607 &
+# https://github.com/rust-lang/rust/issues/59302
+crate_type = ["staticlib"]
+doctest = false
+test = false
+doc = false
+
+[dependencies]
+prqlc = { git = "https://github.com/PRQL/prql.git" }
+cxx = "1.0"
+
+[build-dependencies]
+cxx-build = "1.0"
+
+[package.metadata.release]
+tag-name = "{{version}}"
+tag-prefix = ""
diff --git a/src/third-party/prqlc-c/README.md b/src/third-party/prqlc-c/README.md
new file mode 100644
index 0000000..01ceed6
--- /dev/null
+++ b/src/third-party/prqlc-c/README.md
@@ -0,0 +1,97 @@
+# PRQL C library
+
+## Description
+
+This module compiles PRQL as a library (both `.a` and `.so` are generated). This
+allows embedding in languages that support FFI — for example, Golang.
+
+## Linking
+
+Copy the `.a` and `.so` files in a convenient place and add the following
+compile flags to Go (cgo):
+
+`CGO_LDFLAGS="-L/path/to/libprqlc_c.a -lprqlc -pthread -ldl" go build`
+
+## Examples
+
+Below is an example from an actual application that is using PRQL in Go.
+
+```go
+package prql
+
+/*
+
+
+#include <stdlib.h>
+
+int to_sql(char *prql_query, char *sql_query);
+int to_json(char *prql_query, char *json_query);
+
+*/
+import "C"
+
+import (
+ "errors"
+ "strings"
+ "unsafe"
+)
+
+// ToSQL converts a PRQL query to SQL
+func ToSQL(prql string) (string, error) {
+ // buffer length should not be less than 1K because we may get an error
+ // from the PRQL compiler with a very short query
+ cStringBufferLength := 1024
+
+ // allocate a buffer 3 times the length of the PRQL query to store the
+ // generated SQL query
+ if len(prql)*3 > cStringBufferLength {
+ cStringBufferLength = len(prql) * 3
+ }
+
+ // preallocate the buffer
+ cstr := C.CString(strings.Repeat(" ", cStringBufferLength))
+ defer C.free(unsafe.Pointer(cstr))
+
+ // convert the PRQL query to SQL
+ res := C.to_sql(C.CString(prql), cstr)
+ if res == 0 {
+ return C.GoString(cstr), nil
+ }
+
+ return "", errors.New(C.GoString(cstr))
+}
+
+// ToJSON converts a PRQL query to JSON
+func ToJSON(prql string) (string, error) {
+ // buffer length should not be less than 1K because we may get an error
+ cStringBufferLength := 1024
+ if len(prql)*3 > cStringBufferLength {
+ cStringBufferLength = len(prql) * 10
+ }
+
+ // preallocate the buffer
+ cstr := C.CString(strings.Repeat(" ", cStringBufferLength))
+ defer C.free(unsafe.Pointer(cstr))
+
+ // convert the PRQL query to SQL
+ res := C.to_json(C.CString(prql), cstr)
+ if res == 0 {
+ return C.GoString(cstr), nil
+ }
+
+ return "", errors.New(C.GoString(cstr))
+}
+```
+
+## Development
+
+### Headers
+
+The C & C++ header files `prqlc.h` & `prqlc.hpp` were generated using
+[cbindgen](https://github.com/eqrion/cbindgen). To generate a new one run:
+
+```sh
+task build-prqlc-c-header
+```
+
+...or copy & paste the commands from the Taskfile.
diff --git a/src/third-party/prqlc-c/cbindgen.toml b/src/third-party/prqlc-c/cbindgen.toml
new file mode 100644
index 0000000..1f523e7
--- /dev/null
+++ b/src/third-party/prqlc-c/cbindgen.toml
@@ -0,0 +1,14 @@
+language = "C"
+
+header = '''/*
+ * PRQL is a modern language for transforming data — a simple, powerful, pipelined SQL replacement
+ *
+ * License: Apache-2.0
+ * Website: https://prql-lang.org/
+ */'''
+
+autogen_warning = "/* This file is autogenerated. Do not modify this file manually. */"
+
+namespace = "prqlc"
+
+after_includes = '#define FFI_SCOPE "PRQL"'
diff --git a/src/third-party/prqlc-c/prqlc.cxx.cc b/src/third-party/prqlc-c/prqlc.cxx.cc
new file mode 100644
index 0000000..df9c7cb
--- /dev/null
+++ b/src/third-party/prqlc-c/prqlc.cxx.cc
@@ -0,0 +1,891 @@
+#include <algorithm>
+#include <array>
+#include <cassert>
+#include <cstddef>
+#include <cstdint>
+#include <initializer_list>
+#include <iterator>
+#include <new>
+#include <stdexcept>
+#include <string>
+#include <type_traits>
+#include <utility>
+
+namespace rust {
+inline namespace cxxbridge1 {
+// #include "rust/cxx.h"
+
+#ifndef CXXBRIDGE1_PANIC
+#define CXXBRIDGE1_PANIC
+template <typename Exception>
+void panic [[noreturn]] (const char *msg);
+#endif // CXXBRIDGE1_PANIC
+
+struct unsafe_bitcopy_t;
+
+namespace {
+template <typename T>
+class impl;
+} // namespace
+
+class Opaque;
+
+template <typename T>
+::std::size_t size_of();
+template <typename T>
+::std::size_t align_of();
+
+#ifndef CXXBRIDGE1_RUST_STRING
+#define CXXBRIDGE1_RUST_STRING
+class String final {
+public:
+ String() noexcept;
+ String(const String &) noexcept;
+ String(String &&) noexcept;
+ ~String() noexcept;
+
+ String(const std::string &);
+ String(const char *);
+ String(const char *, std::size_t);
+ String(const char16_t *);
+ String(const char16_t *, std::size_t);
+
+ static String lossy(const std::string &) noexcept;
+ static String lossy(const char *) noexcept;
+ static String lossy(const char *, std::size_t) noexcept;
+ static String lossy(const char16_t *) noexcept;
+ static String lossy(const char16_t *, std::size_t) noexcept;
+
+ String &operator=(const String &) &noexcept;
+ String &operator=(String &&) &noexcept;
+
+ explicit operator std::string() const;
+
+ const char *data() const noexcept;
+ std::size_t size() const noexcept;
+ std::size_t length() const noexcept;
+ bool empty() const noexcept;
+
+ const char *c_str() noexcept;
+
+ std::size_t capacity() const noexcept;
+ void reserve(size_t new_cap) noexcept;
+
+ using iterator = char *;
+ iterator begin() noexcept;
+ iterator end() noexcept;
+
+ using const_iterator = const char *;
+ const_iterator begin() const noexcept;
+ const_iterator end() const noexcept;
+ const_iterator cbegin() const noexcept;
+ const_iterator cend() const noexcept;
+
+ bool operator==(const String &) const noexcept;
+ bool operator!=(const String &) const noexcept;
+ bool operator<(const String &) const noexcept;
+ bool operator<=(const String &) const noexcept;
+ bool operator>(const String &) const noexcept;
+ bool operator>=(const String &) const noexcept;
+
+ void swap(String &) noexcept;
+
+ String(unsafe_bitcopy_t, const String &) noexcept;
+
+private:
+ struct lossy_t;
+ String(lossy_t, const char *, std::size_t) noexcept;
+ String(lossy_t, const char16_t *, std::size_t) noexcept;
+ friend void swap(String &lhs, String &rhs) noexcept { lhs.swap(rhs); }
+
+ std::array<std::uintptr_t, 3> repr;
+};
+#endif // CXXBRIDGE1_RUST_STRING
+
+#ifndef CXXBRIDGE1_RUST_SLICE
+#define CXXBRIDGE1_RUST_SLICE
+namespace detail {
+template <bool>
+struct copy_assignable_if {};
+
+template <>
+struct copy_assignable_if<false> {
+ copy_assignable_if() noexcept = default;
+ copy_assignable_if(const copy_assignable_if &) noexcept = default;
+ copy_assignable_if &operator=(const copy_assignable_if &) &noexcept = delete;
+ copy_assignable_if &operator=(copy_assignable_if &&) &noexcept = default;
+};
+} // namespace detail
+
+template <typename T>
+class Slice final
+ : private detail::copy_assignable_if<std::is_const<T>::value> {
+public:
+ using value_type = T;
+
+ Slice() noexcept;
+ Slice(T *, std::size_t count) noexcept;
+
+ Slice &operator=(const Slice<T> &) &noexcept = default;
+ Slice &operator=(Slice<T> &&) &noexcept = default;
+
+ T *data() const noexcept;
+ std::size_t size() const noexcept;
+ std::size_t length() const noexcept;
+ bool empty() const noexcept;
+
+ T &operator[](std::size_t n) const noexcept;
+ T &at(std::size_t n) const;
+ T &front() const noexcept;
+ T &back() const noexcept;
+
+ Slice(const Slice<T> &) noexcept = default;
+ ~Slice() noexcept = default;
+
+ class iterator;
+ iterator begin() const noexcept;
+ iterator end() const noexcept;
+
+ void swap(Slice &) noexcept;
+
+private:
+ class uninit;
+ Slice(uninit) noexcept;
+ friend impl<Slice>;
+ friend void sliceInit(void *, const void *, std::size_t) noexcept;
+ friend void *slicePtr(const void *) noexcept;
+ friend std::size_t sliceLen(const void *) noexcept;
+
+ std::array<std::uintptr_t, 2> repr;
+};
+
+template <typename T>
+class Slice<T>::iterator final {
+public:
+ using iterator_category = std::random_access_iterator_tag;
+ using value_type = T;
+ using difference_type = std::ptrdiff_t;
+ using pointer = typename std::add_pointer<T>::type;
+ using reference = typename std::add_lvalue_reference<T>::type;
+
+ reference operator*() const noexcept;
+ pointer operator->() const noexcept;
+ reference operator[](difference_type) const noexcept;
+
+ iterator &operator++() noexcept;
+ iterator operator++(int) noexcept;
+ iterator &operator--() noexcept;
+ iterator operator--(int) noexcept;
+
+ iterator &operator+=(difference_type) noexcept;
+ iterator &operator-=(difference_type) noexcept;
+ iterator operator+(difference_type) const noexcept;
+ iterator operator-(difference_type) const noexcept;
+ difference_type operator-(const iterator &) const noexcept;
+
+ bool operator==(const iterator &) const noexcept;
+ bool operator!=(const iterator &) const noexcept;
+ bool operator<(const iterator &) const noexcept;
+ bool operator<=(const iterator &) const noexcept;
+ bool operator>(const iterator &) const noexcept;
+ bool operator>=(const iterator &) const noexcept;
+
+private:
+ friend class Slice;
+ void *pos;
+ std::size_t stride;
+};
+
+template <typename T>
+Slice<T>::Slice() noexcept {
+ sliceInit(this, reinterpret_cast<void *>(align_of<T>()), 0);
+}
+
+template <typename T>
+Slice<T>::Slice(T *s, std::size_t count) noexcept {
+ assert(s != nullptr || count == 0);
+ sliceInit(this,
+ s == nullptr && count == 0
+ ? reinterpret_cast<void *>(align_of<T>())
+ : const_cast<typename std::remove_const<T>::type *>(s),
+ count);
+}
+
+template <typename T>
+T *Slice<T>::data() const noexcept {
+ return reinterpret_cast<T *>(slicePtr(this));
+}
+
+template <typename T>
+std::size_t Slice<T>::size() const noexcept {
+ return sliceLen(this);
+}
+
+template <typename T>
+std::size_t Slice<T>::length() const noexcept {
+ return this->size();
+}
+
+template <typename T>
+bool Slice<T>::empty() const noexcept {
+ return this->size() == 0;
+}
+
+template <typename T>
+T &Slice<T>::operator[](std::size_t n) const noexcept {
+ assert(n < this->size());
+ auto ptr = static_cast<char *>(slicePtr(this)) + size_of<T>() * n;
+ return *reinterpret_cast<T *>(ptr);
+}
+
+template <typename T>
+T &Slice<T>::at(std::size_t n) const {
+ if (n >= this->size()) {
+ panic<std::out_of_range>("rust::Slice index out of range");
+ }
+ return (*this)[n];
+}
+
+template <typename T>
+T &Slice<T>::front() const noexcept {
+ assert(!this->empty());
+ return (*this)[0];
+}
+
+template <typename T>
+T &Slice<T>::back() const noexcept {
+ assert(!this->empty());
+ return (*this)[this->size() - 1];
+}
+
+template <typename T>
+typename Slice<T>::iterator::reference
+Slice<T>::iterator::operator*() const noexcept {
+ return *static_cast<T *>(this->pos);
+}
+
+template <typename T>
+typename Slice<T>::iterator::pointer
+Slice<T>::iterator::operator->() const noexcept {
+ return static_cast<T *>(this->pos);
+}
+
+template <typename T>
+typename Slice<T>::iterator::reference Slice<T>::iterator::operator[](
+ typename Slice<T>::iterator::difference_type n) const noexcept {
+ auto ptr = static_cast<char *>(this->pos) + this->stride * n;
+ return *reinterpret_cast<T *>(ptr);
+}
+
+template <typename T>
+typename Slice<T>::iterator &Slice<T>::iterator::operator++() noexcept {
+ this->pos = static_cast<char *>(this->pos) + this->stride;
+ return *this;
+}
+
+template <typename T>
+typename Slice<T>::iterator Slice<T>::iterator::operator++(int) noexcept {
+ auto ret = iterator(*this);
+ this->pos = static_cast<char *>(this->pos) + this->stride;
+ return ret;
+}
+
+template <typename T>
+typename Slice<T>::iterator &Slice<T>::iterator::operator--() noexcept {
+ this->pos = static_cast<char *>(this->pos) - this->stride;
+ return *this;
+}
+
+template <typename T>
+typename Slice<T>::iterator Slice<T>::iterator::operator--(int) noexcept {
+ auto ret = iterator(*this);
+ this->pos = static_cast<char *>(this->pos) - this->stride;
+ return ret;
+}
+
+template <typename T>
+typename Slice<T>::iterator &Slice<T>::iterator::operator+=(
+ typename Slice<T>::iterator::difference_type n) noexcept {
+ this->pos = static_cast<char *>(this->pos) + this->stride * n;
+ return *this;
+}
+
+template <typename T>
+typename Slice<T>::iterator &Slice<T>::iterator::operator-=(
+ typename Slice<T>::iterator::difference_type n) noexcept {
+ this->pos = static_cast<char *>(this->pos) - this->stride * n;
+ return *this;
+}
+
+template <typename T>
+typename Slice<T>::iterator Slice<T>::iterator::operator+(
+ typename Slice<T>::iterator::difference_type n) const noexcept {
+ auto ret = iterator(*this);
+ ret.pos = static_cast<char *>(this->pos) + this->stride * n;
+ return ret;
+}
+
+template <typename T>
+typename Slice<T>::iterator Slice<T>::iterator::operator-(
+ typename Slice<T>::iterator::difference_type n) const noexcept {
+ auto ret = iterator(*this);
+ ret.pos = static_cast<char *>(this->pos) - this->stride * n;
+ return ret;
+}
+
+template <typename T>
+typename Slice<T>::iterator::difference_type
+Slice<T>::iterator::operator-(const iterator &other) const noexcept {
+ auto diff = std::distance(static_cast<char *>(other.pos),
+ static_cast<char *>(this->pos));
+ return diff / static_cast<typename Slice<T>::iterator::difference_type>(
+ this->stride);
+}
+
+template <typename T>
+bool Slice<T>::iterator::operator==(const iterator &other) const noexcept {
+ return this->pos == other.pos;
+}
+
+template <typename T>
+bool Slice<T>::iterator::operator!=(const iterator &other) const noexcept {
+ return this->pos != other.pos;
+}
+
+template <typename T>
+bool Slice<T>::iterator::operator<(const iterator &other) const noexcept {
+ return this->pos < other.pos;
+}
+
+template <typename T>
+bool Slice<T>::iterator::operator<=(const iterator &other) const noexcept {
+ return this->pos <= other.pos;
+}
+
+template <typename T>
+bool Slice<T>::iterator::operator>(const iterator &other) const noexcept {
+ return this->pos > other.pos;
+}
+
+template <typename T>
+bool Slice<T>::iterator::operator>=(const iterator &other) const noexcept {
+ return this->pos >= other.pos;
+}
+
+template <typename T>
+typename Slice<T>::iterator Slice<T>::begin() const noexcept {
+ iterator it;
+ it.pos = slicePtr(this);
+ it.stride = size_of<T>();
+ return it;
+}
+
+template <typename T>
+typename Slice<T>::iterator Slice<T>::end() const noexcept {
+ iterator it = this->begin();
+ it.pos = static_cast<char *>(it.pos) + it.stride * this->size();
+ return it;
+}
+
+template <typename T>
+void Slice<T>::swap(Slice &rhs) noexcept {
+ std::swap(*this, rhs);
+}
+#endif // CXXBRIDGE1_RUST_SLICE
+
+#ifndef CXXBRIDGE1_RUST_BITCOPY_T
+#define CXXBRIDGE1_RUST_BITCOPY_T
+struct unsafe_bitcopy_t final {
+ explicit unsafe_bitcopy_t() = default;
+};
+#endif // CXXBRIDGE1_RUST_BITCOPY_T
+
+#ifndef CXXBRIDGE1_RUST_VEC
+#define CXXBRIDGE1_RUST_VEC
+template <typename T>
+class Vec final {
+public:
+ using value_type = T;
+
+ Vec() noexcept;
+ Vec(std::initializer_list<T>);
+ Vec(const Vec &);
+ Vec(Vec &&) noexcept;
+ ~Vec() noexcept;
+
+ Vec &operator=(Vec &&) &noexcept;
+ Vec &operator=(const Vec &) &;
+
+ std::size_t size() const noexcept;
+ bool empty() const noexcept;
+ const T *data() const noexcept;
+ T *data() noexcept;
+ std::size_t capacity() const noexcept;
+
+ const T &operator[](std::size_t n) const noexcept;
+ const T &at(std::size_t n) const;
+ const T &front() const noexcept;
+ const T &back() const noexcept;
+
+ T &operator[](std::size_t n) noexcept;
+ T &at(std::size_t n);
+ T &front() noexcept;
+ T &back() noexcept;
+
+ void reserve(std::size_t new_cap);
+ void push_back(const T &value);
+ void push_back(T &&value);
+ template <typename... Args>
+ void emplace_back(Args &&...args);
+ void truncate(std::size_t len);
+ void clear();
+
+ using iterator = typename Slice<T>::iterator;
+ iterator begin() noexcept;
+ iterator end() noexcept;
+
+ using const_iterator = typename Slice<const T>::iterator;
+ const_iterator begin() const noexcept;
+ const_iterator end() const noexcept;
+ const_iterator cbegin() const noexcept;
+ const_iterator cend() const noexcept;
+
+ void swap(Vec &) noexcept;
+
+ Vec(unsafe_bitcopy_t, const Vec &) noexcept;
+
+private:
+ void reserve_total(std::size_t new_cap) noexcept;
+ void set_len(std::size_t len) noexcept;
+ void drop() noexcept;
+
+ friend void swap(Vec &lhs, Vec &rhs) noexcept { lhs.swap(rhs); }
+
+ std::array<std::uintptr_t, 3> repr;
+};
+
+template <typename T>
+Vec<T>::Vec(std::initializer_list<T> init) : Vec{} {
+ this->reserve_total(init.size());
+ std::move(init.begin(), init.end(), std::back_inserter(*this));
+}
+
+template <typename T>
+Vec<T>::Vec(const Vec &other) : Vec() {
+ this->reserve_total(other.size());
+ std::copy(other.begin(), other.end(), std::back_inserter(*this));
+}
+
+template <typename T>
+Vec<T>::Vec(Vec &&other) noexcept : repr(other.repr) {
+ new (&other) Vec();
+}
+
+template <typename T>
+Vec<T>::~Vec() noexcept {
+ this->drop();
+}
+
+template <typename T>
+Vec<T> &Vec<T>::operator=(Vec &&other) &noexcept {
+ this->drop();
+ this->repr = other.repr;
+ new (&other) Vec();
+ return *this;
+}
+
+template <typename T>
+Vec<T> &Vec<T>::operator=(const Vec &other) & {
+ if (this != &other) {
+ this->drop();
+ new (this) Vec(other);
+ }
+ return *this;
+}
+
+template <typename T>
+bool Vec<T>::empty() const noexcept {
+ return this->size() == 0;
+}
+
+template <typename T>
+T *Vec<T>::data() noexcept {
+ return const_cast<T *>(const_cast<const Vec<T> *>(this)->data());
+}
+
+template <typename T>
+const T &Vec<T>::operator[](std::size_t n) const noexcept {
+ assert(n < this->size());
+ auto data = reinterpret_cast<const char *>(this->data());
+ return *reinterpret_cast<const T *>(data + n * size_of<T>());
+}
+
+template <typename T>
+const T &Vec<T>::at(std::size_t n) const {
+ if (n >= this->size()) {
+ panic<std::out_of_range>("rust::Vec index out of range");
+ }
+ return (*this)[n];
+}
+
+template <typename T>
+const T &Vec<T>::front() const noexcept {
+ assert(!this->empty());
+ return (*this)[0];
+}
+
+template <typename T>
+const T &Vec<T>::back() const noexcept {
+ assert(!this->empty());
+ return (*this)[this->size() - 1];
+}
+
+template <typename T>
+T &Vec<T>::operator[](std::size_t n) noexcept {
+ assert(n < this->size());
+ auto data = reinterpret_cast<char *>(this->data());
+ return *reinterpret_cast<T *>(data + n * size_of<T>());
+}
+
+template <typename T>
+T &Vec<T>::at(std::size_t n) {
+ if (n >= this->size()) {
+ panic<std::out_of_range>("rust::Vec index out of range");
+ }
+ return (*this)[n];
+}
+
+template <typename T>
+T &Vec<T>::front() noexcept {
+ assert(!this->empty());
+ return (*this)[0];
+}
+
+template <typename T>
+T &Vec<T>::back() noexcept {
+ assert(!this->empty());
+ return (*this)[this->size() - 1];
+}
+
+template <typename T>
+void Vec<T>::reserve(std::size_t new_cap) {
+ this->reserve_total(new_cap);
+}
+
+template <typename T>
+void Vec<T>::push_back(const T &value) {
+ this->emplace_back(value);
+}
+
+template <typename T>
+void Vec<T>::push_back(T &&value) {
+ this->emplace_back(std::move(value));
+}
+
+template <typename T>
+template <typename... Args>
+void Vec<T>::emplace_back(Args &&...args) {
+ auto size = this->size();
+ this->reserve_total(size + 1);
+ ::new (reinterpret_cast<T *>(reinterpret_cast<char *>(this->data()) +
+ size * size_of<T>()))
+ T(std::forward<Args>(args)...);
+ this->set_len(size + 1);
+}
+
+template <typename T>
+void Vec<T>::clear() {
+ this->truncate(0);
+}
+
+template <typename T>
+typename Vec<T>::iterator Vec<T>::begin() noexcept {
+ return Slice<T>(this->data(), this->size()).begin();
+}
+
+template <typename T>
+typename Vec<T>::iterator Vec<T>::end() noexcept {
+ return Slice<T>(this->data(), this->size()).end();
+}
+
+template <typename T>
+typename Vec<T>::const_iterator Vec<T>::begin() const noexcept {
+ return this->cbegin();
+}
+
+template <typename T>
+typename Vec<T>::const_iterator Vec<T>::end() const noexcept {
+ return this->cend();
+}
+
+template <typename T>
+typename Vec<T>::const_iterator Vec<T>::cbegin() const noexcept {
+ return Slice<const T>(this->data(), this->size()).begin();
+}
+
+template <typename T>
+typename Vec<T>::const_iterator Vec<T>::cend() const noexcept {
+ return Slice<const T>(this->data(), this->size()).end();
+}
+
+template <typename T>
+void Vec<T>::swap(Vec &rhs) noexcept {
+ using std::swap;
+ swap(this->repr, rhs.repr);
+}
+
+template <typename T>
+Vec<T>::Vec(unsafe_bitcopy_t, const Vec &bits) noexcept : repr(bits.repr) {}
+#endif // CXXBRIDGE1_RUST_VEC
+
+#ifndef CXXBRIDGE1_IS_COMPLETE
+#define CXXBRIDGE1_IS_COMPLETE
+namespace detail {
+namespace {
+template <typename T, typename = std::size_t>
+struct is_complete : std::false_type {};
+template <typename T>
+struct is_complete<T, decltype(sizeof(T))> : std::true_type {};
+} // namespace
+} // namespace detail
+#endif // CXXBRIDGE1_IS_COMPLETE
+
+#ifndef CXXBRIDGE1_LAYOUT
+#define CXXBRIDGE1_LAYOUT
+class layout {
+ template <typename T>
+ friend std::size_t size_of();
+ template <typename T>
+ friend std::size_t align_of();
+ template <typename T>
+ static typename std::enable_if<std::is_base_of<Opaque, T>::value,
+ std::size_t>::type
+ do_size_of() {
+ return T::layout::size();
+ }
+ template <typename T>
+ static typename std::enable_if<!std::is_base_of<Opaque, T>::value,
+ std::size_t>::type
+ do_size_of() {
+ return sizeof(T);
+ }
+ template <typename T>
+ static
+ typename std::enable_if<detail::is_complete<T>::value, std::size_t>::type
+ size_of() {
+ return do_size_of<T>();
+ }
+ template <typename T>
+ static typename std::enable_if<std::is_base_of<Opaque, T>::value,
+ std::size_t>::type
+ do_align_of() {
+ return T::layout::align();
+ }
+ template <typename T>
+ static typename std::enable_if<!std::is_base_of<Opaque, T>::value,
+ std::size_t>::type
+ do_align_of() {
+ return alignof(T);
+ }
+ template <typename T>
+ static
+ typename std::enable_if<detail::is_complete<T>::value, std::size_t>::type
+ align_of() {
+ return do_align_of<T>();
+ }
+};
+
+template <typename T>
+std::size_t size_of() {
+ return layout::size_of<T>();
+}
+
+template <typename T>
+std::size_t align_of() {
+ return layout::align_of<T>();
+}
+#endif // CXXBRIDGE1_LAYOUT
+
+namespace detail {
+template <typename T, typename = void *>
+struct operator_new {
+ void *operator()(::std::size_t sz) { return ::operator new(sz); }
+};
+
+template <typename T>
+struct operator_new<T, decltype(T::operator new(sizeof(T)))> {
+ void *operator()(::std::size_t sz) { return T::operator new(sz); }
+};
+} // namespace detail
+
+template <typename T>
+union MaybeUninit {
+ T value;
+ void *operator new(::std::size_t sz) { return detail::operator_new<T>{}(sz); }
+ MaybeUninit() {}
+ ~MaybeUninit() {}
+};
+} // namespace cxxbridge1
+} // namespace rust
+
+namespace prqlc {
+ struct Options;
+ struct SourceTreeElement;
+ enum class MessageKind : ::std::uint8_t;
+ struct Message;
+ struct CompileResult2;
+}
+
+namespace prqlc {
+#ifndef CXXBRIDGE1_STRUCT_prqlc$Options
+#define CXXBRIDGE1_STRUCT_prqlc$Options
+struct Options final {
+ bool format;
+ ::rust::String target;
+ bool signature_comment;
+
+ using IsRelocatable = ::std::true_type;
+};
+#endif // CXXBRIDGE1_STRUCT_prqlc$Options
+
+#ifndef CXXBRIDGE1_STRUCT_prqlc$SourceTreeElement
+#define CXXBRIDGE1_STRUCT_prqlc$SourceTreeElement
+struct SourceTreeElement final {
+ ::rust::String path;
+ ::rust::String content;
+
+ using IsRelocatable = ::std::true_type;
+};
+#endif // CXXBRIDGE1_STRUCT_prqlc$SourceTreeElement
+
+#ifndef CXXBRIDGE1_ENUM_prqlc$MessageKind
+#define CXXBRIDGE1_ENUM_prqlc$MessageKind
+enum class MessageKind : ::std::uint8_t {
+ Error = 0,
+ Warning = 1,
+ Lint = 2,
+};
+#endif // CXXBRIDGE1_ENUM_prqlc$MessageKind
+
+#ifndef CXXBRIDGE1_STRUCT_prqlc$Message
+#define CXXBRIDGE1_STRUCT_prqlc$Message
+struct Message final {
+ ::prqlc::MessageKind kind;
+ ::rust::String code;
+ ::rust::String reason;
+ ::rust::Vec<::rust::String> hints;
+ ::rust::String display;
+
+ using IsRelocatable = ::std::true_type;
+};
+#endif // CXXBRIDGE1_STRUCT_prqlc$Message
+
+#ifndef CXXBRIDGE1_STRUCT_prqlc$CompileResult2
+#define CXXBRIDGE1_STRUCT_prqlc$CompileResult2
+struct CompileResult2 final {
+ ::rust::String output;
+ ::rust::Vec<::prqlc::Message> messages;
+
+ using IsRelocatable = ::std::true_type;
+};
+#endif // CXXBRIDGE1_STRUCT_prqlc$CompileResult2
+
+extern "C" {
+void prqlc$cxxbridge1$compile_tree(::rust::Vec<::prqlc::SourceTreeElement> const &tree, ::prqlc::Options const &options, ::prqlc::CompileResult2 *return$) noexcept;
+} // extern "C"
+
+::prqlc::CompileResult2 compile_tree(::rust::Vec<::prqlc::SourceTreeElement> const &tree, ::prqlc::Options const &options) noexcept {
+ ::rust::MaybeUninit<::prqlc::CompileResult2> return$;
+ prqlc$cxxbridge1$compile_tree(tree, options, &return$.value);
+ return ::std::move(return$.value);
+}
+} // namespace prqlc
+
+extern "C" {
+void cxxbridge1$rust_vec$prqlc$Message$new(::rust::Vec<::prqlc::Message> const *ptr) noexcept;
+void cxxbridge1$rust_vec$prqlc$Message$drop(::rust::Vec<::prqlc::Message> *ptr) noexcept;
+::std::size_t cxxbridge1$rust_vec$prqlc$Message$len(::rust::Vec<::prqlc::Message> const *ptr) noexcept;
+::std::size_t cxxbridge1$rust_vec$prqlc$Message$capacity(::rust::Vec<::prqlc::Message> const *ptr) noexcept;
+::prqlc::Message const *cxxbridge1$rust_vec$prqlc$Message$data(::rust::Vec<::prqlc::Message> const *ptr) noexcept;
+void cxxbridge1$rust_vec$prqlc$Message$reserve_total(::rust::Vec<::prqlc::Message> *ptr, ::std::size_t new_cap) noexcept;
+void cxxbridge1$rust_vec$prqlc$Message$set_len(::rust::Vec<::prqlc::Message> *ptr, ::std::size_t len) noexcept;
+void cxxbridge1$rust_vec$prqlc$Message$truncate(::rust::Vec<::prqlc::Message> *ptr, ::std::size_t len) noexcept;
+
+void cxxbridge1$rust_vec$prqlc$SourceTreeElement$new(::rust::Vec<::prqlc::SourceTreeElement> const *ptr) noexcept;
+void cxxbridge1$rust_vec$prqlc$SourceTreeElement$drop(::rust::Vec<::prqlc::SourceTreeElement> *ptr) noexcept;
+::std::size_t cxxbridge1$rust_vec$prqlc$SourceTreeElement$len(::rust::Vec<::prqlc::SourceTreeElement> const *ptr) noexcept;
+::std::size_t cxxbridge1$rust_vec$prqlc$SourceTreeElement$capacity(::rust::Vec<::prqlc::SourceTreeElement> const *ptr) noexcept;
+::prqlc::SourceTreeElement const *cxxbridge1$rust_vec$prqlc$SourceTreeElement$data(::rust::Vec<::prqlc::SourceTreeElement> const *ptr) noexcept;
+void cxxbridge1$rust_vec$prqlc$SourceTreeElement$reserve_total(::rust::Vec<::prqlc::SourceTreeElement> *ptr, ::std::size_t new_cap) noexcept;
+void cxxbridge1$rust_vec$prqlc$SourceTreeElement$set_len(::rust::Vec<::prqlc::SourceTreeElement> *ptr, ::std::size_t len) noexcept;
+void cxxbridge1$rust_vec$prqlc$SourceTreeElement$truncate(::rust::Vec<::prqlc::SourceTreeElement> *ptr, ::std::size_t len) noexcept;
+} // extern "C"
+
+namespace rust {
+inline namespace cxxbridge1 {
+template <>
+Vec<::prqlc::Message>::Vec() noexcept {
+ cxxbridge1$rust_vec$prqlc$Message$new(this);
+}
+template <>
+void Vec<::prqlc::Message>::drop() noexcept {
+ return cxxbridge1$rust_vec$prqlc$Message$drop(this);
+}
+template <>
+::std::size_t Vec<::prqlc::Message>::size() const noexcept {
+ return cxxbridge1$rust_vec$prqlc$Message$len(this);
+}
+template <>
+::std::size_t Vec<::prqlc::Message>::capacity() const noexcept {
+ return cxxbridge1$rust_vec$prqlc$Message$capacity(this);
+}
+template <>
+::prqlc::Message const *Vec<::prqlc::Message>::data() const noexcept {
+ return cxxbridge1$rust_vec$prqlc$Message$data(this);
+}
+template <>
+void Vec<::prqlc::Message>::reserve_total(::std::size_t new_cap) noexcept {
+ return cxxbridge1$rust_vec$prqlc$Message$reserve_total(this, new_cap);
+}
+template <>
+void Vec<::prqlc::Message>::set_len(::std::size_t len) noexcept {
+ return cxxbridge1$rust_vec$prqlc$Message$set_len(this, len);
+}
+template <>
+void Vec<::prqlc::Message>::truncate(::std::size_t len) {
+ return cxxbridge1$rust_vec$prqlc$Message$truncate(this, len);
+}
+template <>
+Vec<::prqlc::SourceTreeElement>::Vec() noexcept {
+ cxxbridge1$rust_vec$prqlc$SourceTreeElement$new(this);
+}
+template <>
+void Vec<::prqlc::SourceTreeElement>::drop() noexcept {
+ return cxxbridge1$rust_vec$prqlc$SourceTreeElement$drop(this);
+}
+template <>
+::std::size_t Vec<::prqlc::SourceTreeElement>::size() const noexcept {
+ return cxxbridge1$rust_vec$prqlc$SourceTreeElement$len(this);
+}
+template <>
+::std::size_t Vec<::prqlc::SourceTreeElement>::capacity() const noexcept {
+ return cxxbridge1$rust_vec$prqlc$SourceTreeElement$capacity(this);
+}
+template <>
+::prqlc::SourceTreeElement const *Vec<::prqlc::SourceTreeElement>::data() const noexcept {
+ return cxxbridge1$rust_vec$prqlc$SourceTreeElement$data(this);
+}
+template <>
+void Vec<::prqlc::SourceTreeElement>::reserve_total(::std::size_t new_cap) noexcept {
+ return cxxbridge1$rust_vec$prqlc$SourceTreeElement$reserve_total(this, new_cap);
+}
+template <>
+void Vec<::prqlc::SourceTreeElement>::set_len(::std::size_t len) noexcept {
+ return cxxbridge1$rust_vec$prqlc$SourceTreeElement$set_len(this, len);
+}
+template <>
+void Vec<::prqlc::SourceTreeElement>::truncate(::std::size_t len) {
+ return cxxbridge1$rust_vec$prqlc$SourceTreeElement$truncate(this, len);
+}
+} // namespace cxxbridge1
+} // namespace rust
diff --git a/src/third-party/prqlc-c/prqlc.cxx.hh b/src/third-party/prqlc-c/prqlc.cxx.hh
new file mode 100644
index 0000000..badfce6
--- /dev/null
+++ b/src/third-party/prqlc-c/prqlc.cxx.hh
@@ -0,0 +1,775 @@
+#pragma once
+#include <algorithm>
+#include <array>
+#include <cassert>
+#include <cstddef>
+#include <cstdint>
+#include <initializer_list>
+#include <iterator>
+#include <new>
+#include <stdexcept>
+#include <string>
+#include <type_traits>
+#include <utility>
+
+namespace rust {
+inline namespace cxxbridge1 {
+// #include "rust/cxx.h"
+
+#ifndef CXXBRIDGE1_PANIC
+#define CXXBRIDGE1_PANIC
+template <typename Exception>
+void panic [[noreturn]] (const char *msg);
+#endif // CXXBRIDGE1_PANIC
+
+struct unsafe_bitcopy_t;
+
+namespace {
+template <typename T>
+class impl;
+} // namespace
+
+class Opaque;
+
+template <typename T>
+::std::size_t size_of();
+template <typename T>
+::std::size_t align_of();
+
+#ifndef CXXBRIDGE1_RUST_STRING
+#define CXXBRIDGE1_RUST_STRING
+class String final {
+public:
+ String() noexcept;
+ String(const String &) noexcept;
+ String(String &&) noexcept;
+ ~String() noexcept;
+
+ String(const std::string &);
+ String(const char *);
+ String(const char *, std::size_t);
+ String(const char16_t *);
+ String(const char16_t *, std::size_t);
+
+ static String lossy(const std::string &) noexcept;
+ static String lossy(const char *) noexcept;
+ static String lossy(const char *, std::size_t) noexcept;
+ static String lossy(const char16_t *) noexcept;
+ static String lossy(const char16_t *, std::size_t) noexcept;
+
+ String &operator=(const String &) &noexcept;
+ String &operator=(String &&) &noexcept;
+
+ explicit operator std::string() const;
+
+ const char *data() const noexcept;
+ std::size_t size() const noexcept;
+ std::size_t length() const noexcept;
+ bool empty() const noexcept;
+
+ const char *c_str() noexcept;
+
+ std::size_t capacity() const noexcept;
+ void reserve(size_t new_cap) noexcept;
+
+ using iterator = char *;
+ iterator begin() noexcept;
+ iterator end() noexcept;
+
+ using const_iterator = const char *;
+ const_iterator begin() const noexcept;
+ const_iterator end() const noexcept;
+ const_iterator cbegin() const noexcept;
+ const_iterator cend() const noexcept;
+
+ bool operator==(const String &) const noexcept;
+ bool operator!=(const String &) const noexcept;
+ bool operator<(const String &) const noexcept;
+ bool operator<=(const String &) const noexcept;
+ bool operator>(const String &) const noexcept;
+ bool operator>=(const String &) const noexcept;
+
+ void swap(String &) noexcept;
+
+ String(unsafe_bitcopy_t, const String &) noexcept;
+
+private:
+ struct lossy_t;
+ String(lossy_t, const char *, std::size_t) noexcept;
+ String(lossy_t, const char16_t *, std::size_t) noexcept;
+ friend void swap(String &lhs, String &rhs) noexcept { lhs.swap(rhs); }
+
+ std::array<std::uintptr_t, 3> repr;
+};
+#endif // CXXBRIDGE1_RUST_STRING
+
+#ifndef CXXBRIDGE1_RUST_SLICE
+#define CXXBRIDGE1_RUST_SLICE
+namespace detail {
+template <bool>
+struct copy_assignable_if {};
+
+template <>
+struct copy_assignable_if<false> {
+ copy_assignable_if() noexcept = default;
+ copy_assignable_if(const copy_assignable_if &) noexcept = default;
+ copy_assignable_if &operator=(const copy_assignable_if &) &noexcept = delete;
+ copy_assignable_if &operator=(copy_assignable_if &&) &noexcept = default;
+};
+} // namespace detail
+
+template <typename T>
+class Slice final
+ : private detail::copy_assignable_if<std::is_const<T>::value> {
+public:
+ using value_type = T;
+
+ Slice() noexcept;
+ Slice(T *, std::size_t count) noexcept;
+
+ Slice &operator=(const Slice<T> &) &noexcept = default;
+ Slice &operator=(Slice<T> &&) &noexcept = default;
+
+ T *data() const noexcept;
+ std::size_t size() const noexcept;
+ std::size_t length() const noexcept;
+ bool empty() const noexcept;
+
+ T &operator[](std::size_t n) const noexcept;
+ T &at(std::size_t n) const;
+ T &front() const noexcept;
+ T &back() const noexcept;
+
+ Slice(const Slice<T> &) noexcept = default;
+ ~Slice() noexcept = default;
+
+ class iterator;
+ iterator begin() const noexcept;
+ iterator end() const noexcept;
+
+ void swap(Slice &) noexcept;
+
+private:
+ class uninit;
+ Slice(uninit) noexcept;
+ friend impl<Slice>;
+ friend void sliceInit(void *, const void *, std::size_t) noexcept;
+ friend void *slicePtr(const void *) noexcept;
+ friend std::size_t sliceLen(const void *) noexcept;
+
+ std::array<std::uintptr_t, 2> repr;
+};
+
+template <typename T>
+class Slice<T>::iterator final {
+public:
+ using iterator_category = std::random_access_iterator_tag;
+ using value_type = T;
+ using difference_type = std::ptrdiff_t;
+ using pointer = typename std::add_pointer<T>::type;
+ using reference = typename std::add_lvalue_reference<T>::type;
+
+ reference operator*() const noexcept;
+ pointer operator->() const noexcept;
+ reference operator[](difference_type) const noexcept;
+
+ iterator &operator++() noexcept;
+ iterator operator++(int) noexcept;
+ iterator &operator--() noexcept;
+ iterator operator--(int) noexcept;
+
+ iterator &operator+=(difference_type) noexcept;
+ iterator &operator-=(difference_type) noexcept;
+ iterator operator+(difference_type) const noexcept;
+ iterator operator-(difference_type) const noexcept;
+ difference_type operator-(const iterator &) const noexcept;
+
+ bool operator==(const iterator &) const noexcept;
+ bool operator!=(const iterator &) const noexcept;
+ bool operator<(const iterator &) const noexcept;
+ bool operator<=(const iterator &) const noexcept;
+ bool operator>(const iterator &) const noexcept;
+ bool operator>=(const iterator &) const noexcept;
+
+private:
+ friend class Slice;
+ void *pos;
+ std::size_t stride;
+};
+
+template <typename T>
+Slice<T>::Slice() noexcept {
+ sliceInit(this, reinterpret_cast<void *>(align_of<T>()), 0);
+}
+
+template <typename T>
+Slice<T>::Slice(T *s, std::size_t count) noexcept {
+ assert(s != nullptr || count == 0);
+ sliceInit(this,
+ s == nullptr && count == 0
+ ? reinterpret_cast<void *>(align_of<T>())
+ : const_cast<typename std::remove_const<T>::type *>(s),
+ count);
+}
+
+template <typename T>
+T *Slice<T>::data() const noexcept {
+ return reinterpret_cast<T *>(slicePtr(this));
+}
+
+template <typename T>
+std::size_t Slice<T>::size() const noexcept {
+ return sliceLen(this);
+}
+
+template <typename T>
+std::size_t Slice<T>::length() const noexcept {
+ return this->size();
+}
+
+template <typename T>
+bool Slice<T>::empty() const noexcept {
+ return this->size() == 0;
+}
+
+template <typename T>
+T &Slice<T>::operator[](std::size_t n) const noexcept {
+ assert(n < this->size());
+ auto ptr = static_cast<char *>(slicePtr(this)) + size_of<T>() * n;
+ return *reinterpret_cast<T *>(ptr);
+}
+
+template <typename T>
+T &Slice<T>::at(std::size_t n) const {
+ if (n >= this->size()) {
+ panic<std::out_of_range>("rust::Slice index out of range");
+ }
+ return (*this)[n];
+}
+
+template <typename T>
+T &Slice<T>::front() const noexcept {
+ assert(!this->empty());
+ return (*this)[0];
+}
+
+template <typename T>
+T &Slice<T>::back() const noexcept {
+ assert(!this->empty());
+ return (*this)[this->size() - 1];
+}
+
+template <typename T>
+typename Slice<T>::iterator::reference
+Slice<T>::iterator::operator*() const noexcept {
+ return *static_cast<T *>(this->pos);
+}
+
+template <typename T>
+typename Slice<T>::iterator::pointer
+Slice<T>::iterator::operator->() const noexcept {
+ return static_cast<T *>(this->pos);
+}
+
+template <typename T>
+typename Slice<T>::iterator::reference Slice<T>::iterator::operator[](
+ typename Slice<T>::iterator::difference_type n) const noexcept {
+ auto ptr = static_cast<char *>(this->pos) + this->stride * n;
+ return *reinterpret_cast<T *>(ptr);
+}
+
+template <typename T>
+typename Slice<T>::iterator &Slice<T>::iterator::operator++() noexcept {
+ this->pos = static_cast<char *>(this->pos) + this->stride;
+ return *this;
+}
+
+template <typename T>
+typename Slice<T>::iterator Slice<T>::iterator::operator++(int) noexcept {
+ auto ret = iterator(*this);
+ this->pos = static_cast<char *>(this->pos) + this->stride;
+ return ret;
+}
+
+template <typename T>
+typename Slice<T>::iterator &Slice<T>::iterator::operator--() noexcept {
+ this->pos = static_cast<char *>(this->pos) - this->stride;
+ return *this;
+}
+
+template <typename T>
+typename Slice<T>::iterator Slice<T>::iterator::operator--(int) noexcept {
+ auto ret = iterator(*this);
+ this->pos = static_cast<char *>(this->pos) - this->stride;
+ return ret;
+}
+
+template <typename T>
+typename Slice<T>::iterator &Slice<T>::iterator::operator+=(
+ typename Slice<T>::iterator::difference_type n) noexcept {
+ this->pos = static_cast<char *>(this->pos) + this->stride * n;
+ return *this;
+}
+
+template <typename T>
+typename Slice<T>::iterator &Slice<T>::iterator::operator-=(
+ typename Slice<T>::iterator::difference_type n) noexcept {
+ this->pos = static_cast<char *>(this->pos) - this->stride * n;
+ return *this;
+}
+
+template <typename T>
+typename Slice<T>::iterator Slice<T>::iterator::operator+(
+ typename Slice<T>::iterator::difference_type n) const noexcept {
+ auto ret = iterator(*this);
+ ret.pos = static_cast<char *>(this->pos) + this->stride * n;
+ return ret;
+}
+
+template <typename T>
+typename Slice<T>::iterator Slice<T>::iterator::operator-(
+ typename Slice<T>::iterator::difference_type n) const noexcept {
+ auto ret = iterator(*this);
+ ret.pos = static_cast<char *>(this->pos) - this->stride * n;
+ return ret;
+}
+
+template <typename T>
+typename Slice<T>::iterator::difference_type
+Slice<T>::iterator::operator-(const iterator &other) const noexcept {
+ auto diff = std::distance(static_cast<char *>(other.pos),
+ static_cast<char *>(this->pos));
+ return diff / static_cast<typename Slice<T>::iterator::difference_type>(
+ this->stride);
+}
+
+template <typename T>
+bool Slice<T>::iterator::operator==(const iterator &other) const noexcept {
+ return this->pos == other.pos;
+}
+
+template <typename T>
+bool Slice<T>::iterator::operator!=(const iterator &other) const noexcept {
+ return this->pos != other.pos;
+}
+
+template <typename T>
+bool Slice<T>::iterator::operator<(const iterator &other) const noexcept {
+ return this->pos < other.pos;
+}
+
+template <typename T>
+bool Slice<T>::iterator::operator<=(const iterator &other) const noexcept {
+ return this->pos <= other.pos;
+}
+
+template <typename T>
+bool Slice<T>::iterator::operator>(const iterator &other) const noexcept {
+ return this->pos > other.pos;
+}
+
+template <typename T>
+bool Slice<T>::iterator::operator>=(const iterator &other) const noexcept {
+ return this->pos >= other.pos;
+}
+
+template <typename T>
+typename Slice<T>::iterator Slice<T>::begin() const noexcept {
+ iterator it;
+ it.pos = slicePtr(this);
+ it.stride = size_of<T>();
+ return it;
+}
+
+template <typename T>
+typename Slice<T>::iterator Slice<T>::end() const noexcept {
+ iterator it = this->begin();
+ it.pos = static_cast<char *>(it.pos) + it.stride * this->size();
+ return it;
+}
+
+template <typename T>
+void Slice<T>::swap(Slice &rhs) noexcept {
+ std::swap(*this, rhs);
+}
+#endif // CXXBRIDGE1_RUST_SLICE
+
+#ifndef CXXBRIDGE1_RUST_BITCOPY_T
+#define CXXBRIDGE1_RUST_BITCOPY_T
+struct unsafe_bitcopy_t final {
+ explicit unsafe_bitcopy_t() = default;
+};
+#endif // CXXBRIDGE1_RUST_BITCOPY_T
+
+#ifndef CXXBRIDGE1_RUST_VEC
+#define CXXBRIDGE1_RUST_VEC
+template <typename T>
+class Vec final {
+public:
+ using value_type = T;
+
+ Vec() noexcept;
+ Vec(std::initializer_list<T>);
+ Vec(const Vec &);
+ Vec(Vec &&) noexcept;
+ ~Vec() noexcept;
+
+ Vec &operator=(Vec &&) &noexcept;
+ Vec &operator=(const Vec &) &;
+
+ std::size_t size() const noexcept;
+ bool empty() const noexcept;
+ const T *data() const noexcept;
+ T *data() noexcept;
+ std::size_t capacity() const noexcept;
+
+ const T &operator[](std::size_t n) const noexcept;
+ const T &at(std::size_t n) const;
+ const T &front() const noexcept;
+ const T &back() const noexcept;
+
+ T &operator[](std::size_t n) noexcept;
+ T &at(std::size_t n);
+ T &front() noexcept;
+ T &back() noexcept;
+
+ void reserve(std::size_t new_cap);
+ void push_back(const T &value);
+ void push_back(T &&value);
+ template <typename... Args>
+ void emplace_back(Args &&...args);
+ void truncate(std::size_t len);
+ void clear();
+
+ using iterator = typename Slice<T>::iterator;
+ iterator begin() noexcept;
+ iterator end() noexcept;
+
+ using const_iterator = typename Slice<const T>::iterator;
+ const_iterator begin() const noexcept;
+ const_iterator end() const noexcept;
+ const_iterator cbegin() const noexcept;
+ const_iterator cend() const noexcept;
+
+ void swap(Vec &) noexcept;
+
+ Vec(unsafe_bitcopy_t, const Vec &) noexcept;
+
+private:
+ void reserve_total(std::size_t new_cap) noexcept;
+ void set_len(std::size_t len) noexcept;
+ void drop() noexcept;
+
+ friend void swap(Vec &lhs, Vec &rhs) noexcept { lhs.swap(rhs); }
+
+ std::array<std::uintptr_t, 3> repr;
+};
+
+template <typename T>
+Vec<T>::Vec(std::initializer_list<T> init) : Vec{} {
+ this->reserve_total(init.size());
+ std::move(init.begin(), init.end(), std::back_inserter(*this));
+}
+
+template <typename T>
+Vec<T>::Vec(const Vec &other) : Vec() {
+ this->reserve_total(other.size());
+ std::copy(other.begin(), other.end(), std::back_inserter(*this));
+}
+
+template <typename T>
+Vec<T>::Vec(Vec &&other) noexcept : repr(other.repr) {
+ new (&other) Vec();
+}
+
+template <typename T>
+Vec<T>::~Vec() noexcept {
+ this->drop();
+}
+
+template <typename T>
+Vec<T> &Vec<T>::operator=(Vec &&other) &noexcept {
+ this->drop();
+ this->repr = other.repr;
+ new (&other) Vec();
+ return *this;
+}
+
+template <typename T>
+Vec<T> &Vec<T>::operator=(const Vec &other) & {
+ if (this != &other) {
+ this->drop();
+ new (this) Vec(other);
+ }
+ return *this;
+}
+
+template <typename T>
+bool Vec<T>::empty() const noexcept {
+ return this->size() == 0;
+}
+
+template <typename T>
+T *Vec<T>::data() noexcept {
+ return const_cast<T *>(const_cast<const Vec<T> *>(this)->data());
+}
+
+template <typename T>
+const T &Vec<T>::operator[](std::size_t n) const noexcept {
+ assert(n < this->size());
+ auto data = reinterpret_cast<const char *>(this->data());
+ return *reinterpret_cast<const T *>(data + n * size_of<T>());
+}
+
+template <typename T>
+const T &Vec<T>::at(std::size_t n) const {
+ if (n >= this->size()) {
+ panic<std::out_of_range>("rust::Vec index out of range");
+ }
+ return (*this)[n];
+}
+
+template <typename T>
+const T &Vec<T>::front() const noexcept {
+ assert(!this->empty());
+ return (*this)[0];
+}
+
+template <typename T>
+const T &Vec<T>::back() const noexcept {
+ assert(!this->empty());
+ return (*this)[this->size() - 1];
+}
+
+template <typename T>
+T &Vec<T>::operator[](std::size_t n) noexcept {
+ assert(n < this->size());
+ auto data = reinterpret_cast<char *>(this->data());
+ return *reinterpret_cast<T *>(data + n * size_of<T>());
+}
+
+template <typename T>
+T &Vec<T>::at(std::size_t n) {
+ if (n >= this->size()) {
+ panic<std::out_of_range>("rust::Vec index out of range");
+ }
+ return (*this)[n];
+}
+
+template <typename T>
+T &Vec<T>::front() noexcept {
+ assert(!this->empty());
+ return (*this)[0];
+}
+
+template <typename T>
+T &Vec<T>::back() noexcept {
+ assert(!this->empty());
+ return (*this)[this->size() - 1];
+}
+
+template <typename T>
+void Vec<T>::reserve(std::size_t new_cap) {
+ this->reserve_total(new_cap);
+}
+
+template <typename T>
+void Vec<T>::push_back(const T &value) {
+ this->emplace_back(value);
+}
+
+template <typename T>
+void Vec<T>::push_back(T &&value) {
+ this->emplace_back(std::move(value));
+}
+
+template <typename T>
+template <typename... Args>
+void Vec<T>::emplace_back(Args &&...args) {
+ auto size = this->size();
+ this->reserve_total(size + 1);
+ ::new (reinterpret_cast<T *>(reinterpret_cast<char *>(this->data()) +
+ size * size_of<T>()))
+ T(std::forward<Args>(args)...);
+ this->set_len(size + 1);
+}
+
+template <typename T>
+void Vec<T>::clear() {
+ this->truncate(0);
+}
+
+template <typename T>
+typename Vec<T>::iterator Vec<T>::begin() noexcept {
+ return Slice<T>(this->data(), this->size()).begin();
+}
+
+template <typename T>
+typename Vec<T>::iterator Vec<T>::end() noexcept {
+ return Slice<T>(this->data(), this->size()).end();
+}
+
+template <typename T>
+typename Vec<T>::const_iterator Vec<T>::begin() const noexcept {
+ return this->cbegin();
+}
+
+template <typename T>
+typename Vec<T>::const_iterator Vec<T>::end() const noexcept {
+ return this->cend();
+}
+
+template <typename T>
+typename Vec<T>::const_iterator Vec<T>::cbegin() const noexcept {
+ return Slice<const T>(this->data(), this->size()).begin();
+}
+
+template <typename T>
+typename Vec<T>::const_iterator Vec<T>::cend() const noexcept {
+ return Slice<const T>(this->data(), this->size()).end();
+}
+
+template <typename T>
+void Vec<T>::swap(Vec &rhs) noexcept {
+ using std::swap;
+ swap(this->repr, rhs.repr);
+}
+
+template <typename T>
+Vec<T>::Vec(unsafe_bitcopy_t, const Vec &bits) noexcept : repr(bits.repr) {}
+#endif // CXXBRIDGE1_RUST_VEC
+
+#ifndef CXXBRIDGE1_IS_COMPLETE
+#define CXXBRIDGE1_IS_COMPLETE
+namespace detail {
+namespace {
+template <typename T, typename = std::size_t>
+struct is_complete : std::false_type {};
+template <typename T>
+struct is_complete<T, decltype(sizeof(T))> : std::true_type {};
+} // namespace
+} // namespace detail
+#endif // CXXBRIDGE1_IS_COMPLETE
+
+#ifndef CXXBRIDGE1_LAYOUT
+#define CXXBRIDGE1_LAYOUT
+class layout {
+ template <typename T>
+ friend std::size_t size_of();
+ template <typename T>
+ friend std::size_t align_of();
+ template <typename T>
+ static typename std::enable_if<std::is_base_of<Opaque, T>::value,
+ std::size_t>::type
+ do_size_of() {
+ return T::layout::size();
+ }
+ template <typename T>
+ static typename std::enable_if<!std::is_base_of<Opaque, T>::value,
+ std::size_t>::type
+ do_size_of() {
+ return sizeof(T);
+ }
+ template <typename T>
+ static
+ typename std::enable_if<detail::is_complete<T>::value, std::size_t>::type
+ size_of() {
+ return do_size_of<T>();
+ }
+ template <typename T>
+ static typename std::enable_if<std::is_base_of<Opaque, T>::value,
+ std::size_t>::type
+ do_align_of() {
+ return T::layout::align();
+ }
+ template <typename T>
+ static typename std::enable_if<!std::is_base_of<Opaque, T>::value,
+ std::size_t>::type
+ do_align_of() {
+ return alignof(T);
+ }
+ template <typename T>
+ static
+ typename std::enable_if<detail::is_complete<T>::value, std::size_t>::type
+ align_of() {
+ return do_align_of<T>();
+ }
+};
+
+template <typename T>
+std::size_t size_of() {
+ return layout::size_of<T>();
+}
+
+template <typename T>
+std::size_t align_of() {
+ return layout::align_of<T>();
+}
+#endif // CXXBRIDGE1_LAYOUT
+} // namespace cxxbridge1
+} // namespace rust
+
+namespace prqlc {
+ struct Options;
+ struct SourceTreeElement;
+ enum class MessageKind : ::std::uint8_t;
+ struct Message;
+ struct CompileResult2;
+}
+
+namespace prqlc {
+#ifndef CXXBRIDGE1_STRUCT_prqlc$Options
+#define CXXBRIDGE1_STRUCT_prqlc$Options
+struct Options final {
+ bool format;
+ ::rust::String target;
+ bool signature_comment;
+
+ using IsRelocatable = ::std::true_type;
+};
+#endif // CXXBRIDGE1_STRUCT_prqlc$Options
+
+#ifndef CXXBRIDGE1_STRUCT_prqlc$SourceTreeElement
+#define CXXBRIDGE1_STRUCT_prqlc$SourceTreeElement
+struct SourceTreeElement final {
+ ::rust::String path;
+ ::rust::String content;
+
+ using IsRelocatable = ::std::true_type;
+};
+#endif // CXXBRIDGE1_STRUCT_prqlc$SourceTreeElement
+
+#ifndef CXXBRIDGE1_ENUM_prqlc$MessageKind
+#define CXXBRIDGE1_ENUM_prqlc$MessageKind
+enum class MessageKind : ::std::uint8_t {
+ Error = 0,
+ Warning = 1,
+ Lint = 2,
+};
+#endif // CXXBRIDGE1_ENUM_prqlc$MessageKind
+
+#ifndef CXXBRIDGE1_STRUCT_prqlc$Message
+#define CXXBRIDGE1_STRUCT_prqlc$Message
+struct Message final {
+ ::prqlc::MessageKind kind;
+ ::rust::String code;
+ ::rust::String reason;
+ ::rust::Vec<::rust::String> hints;
+ ::rust::String display;
+
+ using IsRelocatable = ::std::true_type;
+};
+#endif // CXXBRIDGE1_STRUCT_prqlc$Message
+
+#ifndef CXXBRIDGE1_STRUCT_prqlc$CompileResult2
+#define CXXBRIDGE1_STRUCT_prqlc$CompileResult2
+struct CompileResult2 final {
+ ::rust::String output;
+ ::rust::Vec<::prqlc::Message> messages;
+
+ using IsRelocatable = ::std::true_type;
+};
+#endif // CXXBRIDGE1_STRUCT_prqlc$CompileResult2
+
+::prqlc::CompileResult2 compile_tree(::rust::Vec<::prqlc::SourceTreeElement> const &tree, ::prqlc::Options const &options) noexcept;
+} // namespace prqlc
diff --git a/src/third-party/prqlc-c/prqlc.h b/src/third-party/prqlc-c/prqlc.h
new file mode 100644
index 0000000..aa9fa27
--- /dev/null
+++ b/src/third-party/prqlc-c/prqlc.h
@@ -0,0 +1,193 @@
+/*
+ * PRQL is a modern language for transforming data — a simple, powerful,
+ * pipelined SQL replacement
+ *
+ * License: Apache-2.0
+ * Website: https://prql-lang.org/
+ */
+
+/* This file is autogenerated. Do not modify this file manually. */
+
+#include <stdarg.h>
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdlib.h>
+#define FFI_SCOPE "PRQL"
+
+/**
+ * Compile message kind. Currently only Error is implemented.
+ */
+typedef enum MessageKind {
+ Error,
+ Warning,
+ Lint,
+} MessageKind;
+
+/**
+ * Identifier of a location in source.
+ * Contains offsets in terms of chars.
+ */
+typedef struct Span {
+ size_t start;
+ size_t end;
+} Span;
+
+/**
+ * Location within a source file.
+ */
+typedef struct SourceLocation {
+ size_t start_line;
+ size_t start_col;
+ size_t end_line;
+ size_t end_col;
+} SourceLocation;
+
+/**
+ * Compile result message.
+ *
+ * Calling code is responsible for freeing all memory allocated
+ * for fields as well as strings.
+ */
+typedef struct Message {
+ /**
+ * Message kind. Currently only Error is implemented.
+ */
+ enum MessageKind kind;
+ /**
+ * Machine-readable identifier of the error
+ */
+ const char *const *code;
+ /**
+ * Plain text of the error
+ */
+ const char *reason;
+ /**
+ * A list of suggestions of how to fix the error
+ */
+ const char *const *hint;
+ /**
+ * Character offset of error origin within a source file
+ */
+ const struct Span *span;
+ /**
+ * Annotated code, containing cause and hints.
+ */
+ const char *const *display;
+ /**
+ * Line and column number of error origin within a source file
+ */
+ const struct SourceLocation *location;
+} Message;
+
+/**
+ * Result of compilation.
+ */
+typedef struct CompileResult {
+ const char *output;
+ const struct Message *messages;
+ size_t messages_len;
+} CompileResult;
+
+/**
+ * Compilation options
+ */
+typedef struct Options {
+ /**
+ * Pass generated SQL string trough a formatter that splits it
+ * into multiple lines and prettifies indentation and spacing.
+ *
+ * Defaults to true.
+ */
+ bool format;
+ /**
+ * Target and dialect to compile to.
+ *
+ * Defaults to `sql.any`, which uses `target` argument from the query header
+ * to determine the SQL dialect.
+ */
+ char *target;
+ /**
+ * Emits the compiler signature as a comment after generated SQL
+ *
+ * Defaults to true.
+ */
+ bool signature_comment;
+} Options;
+
+/**
+ * Compile a PRQL string into a SQL string.
+ *
+ * This is a wrapper for: `prql_to_pl`, `pl_to_rq` and `rq_to_sql` without
+ * converting to JSON between each of the functions.
+ *
+ * See `Options` struct for available compilation options.
+ *
+ * # Safety
+ *
+ * This function assumes zero-terminated input strings.
+ * Calling code is responsible for freeing memory allocated for `CompileResult`
+ * by calling `result_destroy`.
+ */
+struct CompileResult compile(const char *prql_query,
+ const struct Options *options);
+
+/**
+ * Build PL AST from a PRQL string. PL in documented in the
+ * [prqlc Rust crate](https://docs.rs/prqlc/latest/prqlc/ir/pl).
+ *
+ * Takes PRQL source buffer and writes PL serialized as JSON to `out` buffer.
+ *
+ * Returns 0 on success and a negative number -1 on failure.
+ *
+ * # Safety
+ *
+ * This function assumes zero-terminated input strings.
+ * Calling code is responsible for freeing memory allocated for `CompileResult`
+ * by calling `result_destroy`.
+ */
+struct CompileResult prql_to_pl(const char *prql_query);
+
+/**
+ * Finds variable references, validates functions calls, determines frames and
+ * converts PL to RQ. PL and RQ are documented in the [prqlc Rust
+ * crate](https://docs.rs/prqlc/latest/prqlc/ast).
+ *
+ * Takes PL serialized as JSON buffer and writes RQ serialized as JSON to `out`
+ * buffer.
+ *
+ * Returns 0 on success and a negative number -1 on failure.
+ *
+ * # Safety
+ *
+ * This function assumes zero-terminated input strings.
+ * Calling code is responsible for freeing memory allocated for `CompileResult`
+ * by calling `result_destroy`.
+ */
+struct CompileResult pl_to_rq(const char *pl_json);
+
+/**
+ * Convert RQ AST into an SQL string. RQ is documented in the
+ * [prqlc Rust crate](https://docs.rs/prqlc/latest/prqlc/ir/rq).
+ *
+ * Takes RQ serialized as JSON buffer and writes SQL source to `out` buffer.
+ *
+ * Returns 0 on success and a negative number -1 on failure.
+ *
+ * # Safety
+ *
+ * This function assumes zero-terminated input strings.
+ * Calling code is responsible for freeing memory allocated for `CompileResult`
+ * by calling `result_destroy`.
+ */
+struct CompileResult rq_to_sql(const char *rq_json,
+ const struct Options *options);
+
+/**
+ * Destroy a `CompileResult` once you are done with it.
+ *
+ * # Safety
+ *
+ * This function expects to be called exactly once after the call of any the
+ * functions that return `CompileResult`. No fields should be freed manually.
+ */
+void result_destroy(struct CompileResult res);
diff --git a/src/third-party/prqlc-c/prqlc.hpp b/src/third-party/prqlc-c/prqlc.hpp
new file mode 100644
index 0000000..e07e90d
--- /dev/null
+++ b/src/third-party/prqlc-c/prqlc.hpp
@@ -0,0 +1,158 @@
+/*
+ * PRQL is a modern language for transforming data — a simple, powerful,
+ * pipelined SQL replacement
+ *
+ * License: Apache-2.0
+ * Website: https://prql-lang.org/
+ */
+
+/* This file is autogenerated. Do not modify this file manually. */
+
+#include <cstdarg>
+#include <cstdint>
+#include <cstdlib>
+#include <new>
+#include <ostream>
+#define FFI_SCOPE "PRQL"
+
+namespace prqlc {
+
+/// Compile message kind. Currently only Error is implemented.
+enum class MessageKind {
+ Error,
+ Warning,
+ Lint,
+};
+
+/// Identifier of a location in source.
+/// Contains offsets in terms of chars.
+struct Span {
+ size_t start;
+ size_t end;
+};
+
+/// Location within a source file.
+struct SourceLocation {
+ size_t start_line;
+ size_t start_col;
+ size_t end_line;
+ size_t end_col;
+};
+
+/// Compile result message.
+///
+/// Calling code is responsible for freeing all memory allocated
+/// for fields as well as strings.
+struct Message {
+ /// Message kind. Currently only Error is implemented.
+ MessageKind kind;
+ /// Machine-readable identifier of the error
+ const char* const* code;
+ /// Plain text of the error
+ const char* reason;
+ /// A list of suggestions of how to fix the error
+ const char* const* hint;
+ /// Character offset of error origin within a source file
+ const Span* span;
+ /// Annotated code, containing cause and hints.
+ const char* const* display;
+ /// Line and column number of error origin within a source file
+ const SourceLocation* location;
+};
+
+/// Result of compilation.
+struct CompileResult {
+ const char* output;
+ const Message* messages;
+ size_t messages_len;
+};
+
+/// Compilation options
+struct Options {
+ /// Pass generated SQL string trough a formatter that splits it
+ /// into multiple lines and prettifies indentation and spacing.
+ ///
+ /// Defaults to true.
+ bool format;
+ /// Target and dialect to compile to.
+ ///
+ /// Defaults to `sql.any`, which uses `target` argument from the query
+ /// header to determine the SQL dialect.
+ const char* target;
+ /// Emits the compiler signature as a comment after generated SQL
+ ///
+ /// Defaults to true.
+ bool signature_comment;
+};
+
+extern "C"
+{
+/// Compile a PRQL string into a SQL string.
+///
+/// This is a wrapper for: `prql_to_pl`, `pl_to_rq` and `rq_to_sql` without
+/// converting to JSON between each of the functions.
+///
+/// See `Options` struct for available compilation options.
+///
+/// # Safety
+///
+/// This function assumes zero-terminated input strings.
+/// Calling code is responsible for freeing memory allocated for `CompileResult`
+/// by calling `result_destroy`.
+CompileResult compile(const char* prql_query, const Options* options);
+
+/// Build PL AST from a PRQL string. PL in documented in the
+/// [prqlc Rust crate](https://docs.rs/prqlc/latest/prqlc/ir/pl).
+///
+/// Takes PRQL source buffer and writes PL serialized as JSON to `out` buffer.
+///
+/// Returns 0 on success and a negative number -1 on failure.
+///
+/// # Safety
+///
+/// This function assumes zero-terminated input strings.
+/// Calling code is responsible for freeing memory allocated for `CompileResult`
+/// by calling `result_destroy`.
+CompileResult prql_to_pl(const char* prql_query);
+
+/// Finds variable references, validates functions calls, determines frames and
+/// converts PL to RQ. PL and RQ are documented in the [prqlc Rust
+/// crate](https://docs.rs/prqlc/latest/prqlc/ast).
+///
+/// Takes PL serialized as JSON buffer and writes RQ serialized as JSON to `out`
+/// buffer.
+///
+/// Returns 0 on success and a negative number -1 on failure.
+///
+/// # Safety
+///
+/// This function assumes zero-terminated input strings.
+/// Calling code is responsible for freeing memory allocated for `CompileResult`
+/// by calling `result_destroy`.
+CompileResult pl_to_rq(const char* pl_json);
+
+/// Convert RQ AST into an SQL string. RQ is documented in the
+/// [prqlc Rust crate](https://docs.rs/prqlc/latest/prqlc/ir/rq).
+///
+/// Takes RQ serialized as JSON buffer and writes SQL source to `out` buffer.
+///
+/// Returns 0 on success and a negative number -1 on failure.
+///
+/// # Safety
+///
+/// This function assumes zero-terminated input strings.
+/// Calling code is responsible for freeing memory allocated for `CompileResult`
+/// by calling `result_destroy`.
+CompileResult rq_to_sql(const char* rq_json, const Options* options);
+
+/// Destroy a `CompileResult` once you are done with it.
+///
+/// # Safety
+///
+/// This function expects to be called exactly once after the call of any the
+/// functions that return `CompileResult`. No fields should be freed manually.
+void result_destroy(CompileResult res);
+
+} // extern "C"
+
+} // namespace prqlc
diff --git a/src/third-party/prqlc-c/src/lib.rs b/src/third-party/prqlc-c/src/lib.rs
new file mode 100644
index 0000000..1a121d7
--- /dev/null
+++ b/src/third-party/prqlc-c/src/lib.rs
@@ -0,0 +1,127 @@
+#![cfg(not(target_family = "wasm"))]
+
+use prqlc::{DisplayOptions, Target};
+use prqlc::{ErrorMessage, ErrorMessages};
+use std::panic;
+use std::path::PathBuf;
+use std::str::FromStr;
+
+#[cxx::bridge(namespace = "prqlc")]
+mod ffi {
+ struct Options {
+ pub format: bool,
+ pub target: String,
+ pub signature_comment: bool,
+ }
+
+ struct SourceTreeElement {
+ pub path: String,
+ pub content: String,
+ }
+
+ enum MessageKind {
+ Error,
+ Warning,
+ Lint,
+ }
+
+ struct Message {
+ pub kind: MessageKind,
+ pub code: String,
+ pub reason: String,
+ pub hints: Vec<String>,
+ pub display: String,
+ }
+
+ #[derive(Default)]
+ struct CompileResult2 {
+ pub output: String,
+ pub messages: Vec<Message>,
+ }
+
+ extern "Rust" {
+ fn compile_tree(tree: &Vec<SourceTreeElement>, options: &Options) -> CompileResult2;
+ }
+}
+
+impl TryFrom<&ffi::Options> for prqlc::Options {
+ type Error = ErrorMessages;
+
+ fn try_from(value: &ffi::Options) -> Result<Self, Self::Error> {
+ Ok(prqlc::Options {
+ format: value.format,
+ target: Target::from_str(value.target.as_str()).map_err(prqlc::ErrorMessages::from)?,
+ signature_comment: value.signature_comment,
+ color: false,
+ display: DisplayOptions::AnsiColor,
+ })
+ }
+}
+
+impl From<prqlc::MessageKind> for ffi::MessageKind {
+ fn from(value: prqlc::MessageKind) -> Self {
+ match value {
+ prqlc::MessageKind::Error => ffi::MessageKind::Error,
+ prqlc::MessageKind::Warning => ffi::MessageKind::Warning,
+ prqlc::MessageKind::Lint => ffi::MessageKind::Lint,
+ }
+ }
+}
+
+impl From<ErrorMessage> for ffi::Message {
+ fn from(value: ErrorMessage) -> Self {
+ ffi::Message {
+ kind: value.kind.into(),
+ code: value.code.unwrap_or(String::new()),
+ reason: value.reason,
+ hints: value.hints,
+ display: value.display.unwrap_or(String::new()),
+ }
+ }
+}
+
+fn compile_tree_int(
+ tree: &Vec<ffi::SourceTreeElement>,
+ options: &ffi::Options,
+) -> Result<String, ErrorMessages> {
+ let tree = prqlc::SourceTree::new(
+ tree.iter()
+ .map(|ste| (PathBuf::from(ste.path.clone()), ste.content.clone())),
+ None,
+ );
+
+ let options: prqlc::Options = options.try_into()?;
+
+ panic::catch_unwind(|| {
+ Ok(prqlc::prql_to_pl_tree(&tree)
+ .and_then(prqlc::pl_to_rq)
+ .map_err(|e: ErrorMessages| ErrorMessages::from(e).composed(&tree))
+ .and_then(|rq| prqlc::rq_to_sql(rq, &options))?)
+ .map_err(|e: ErrorMessages| ErrorMessages::from(e).composed(&tree))
+ })
+ .map_err(|p| {
+ ErrorMessages::from(ErrorMessage {
+ kind: prqlc::MessageKind::Error,
+ code: None,
+ reason: format!("internal error: {:#?}", p),
+ hints: vec![],
+ span: None,
+ display: None,
+ location: None,
+ })
+ })?
+}
+
+pub fn compile_tree(
+ tree: &Vec<ffi::SourceTreeElement>,
+ options: &ffi::Options,
+) -> ffi::CompileResult2 {
+ let mut retval = ffi::CompileResult2::default();
+
+ match compile_tree_int(tree, options) {
+ Ok(output) => retval.output = output,
+ Err(errors) => retval.messages = errors.inner.into_iter().map(|x| x.into()).collect(),
+ }
+
+ retval
+}
diff --git a/src/third-party/rapidyaml/ryml_all.hpp b/src/third-party/rapidyaml/ryml_all.hpp
index 27ed7a6..03734a1 100644
--- a/src/third-party/rapidyaml/ryml_all.hpp
+++ b/src/third-party/rapidyaml/ryml_all.hpp
@@ -1,4 +1,6 @@
#ifndef _RYML_SINGLE_HEADER_AMALGAMATED_HPP_
+#define _RYML_SINGLE_HEADER_AMALGAMATED_HPP_
+
//
// Rapid YAML - a library to parse and emit YAML, and do it fast.
//
@@ -83,6 +85,8 @@
//********************************************************************************
#ifndef _C4CORE_SINGLE_HEADER_AMALGAMATED_HPP_
+#define _C4CORE_SINGLE_HEADER_AMALGAMATED_HPP_
+
//
// c4core - C++ utilities
//
@@ -339,10 +343,10 @@ C4_FOR_EACH(PRN_STRUCT_OFFSETS, a, b, c);
# else
# error "Unknown Apple platform"
# endif
-#elif defined(__linux)
+#elif defined(__linux__) || defined(__linux)
# define C4_UNIX
# define C4_LINUX
-#elif defined(__unix)
+#elif defined(__unix__) || defined(__unix)
# define C4_UNIX
#elif defined(__arm__) || defined(__aarch64__)
# define C4_ARM
@@ -352,7 +356,7 @@ C4_FOR_EACH(PRN_STRUCT_OFFSETS, a, b, c);
# error "unknown platform"
#endif
-#if defined(__posix) || defined(__unix__) || defined(__linux)
+#if defined(__posix) || defined(C4_UNIX) || defined(C4_LINUX)
# define C4_POSIX
#endif
@@ -363,7 +367,7 @@ C4_FOR_EACH(PRN_STRUCT_OFFSETS, a, b, c);
// (end https://github.com/biojppm/c4core/src/c4/platform.hpp)
-#if 0
+
//********************************************************************************
//--------------------------------------------------------------------------------
// src/c4/cpu.hpp
@@ -416,21 +420,25 @@ C4_FOR_EACH(PRN_STRUCT_OFFSETS, a, b, c);
#else
#define C4_CPU_ARM
#define C4_WORDSIZE 4
- #if defined(__ARM_ARCH_8__) || (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM >= 8)
+ #if defined(__ARM_ARCH_8__) || defined(__ARM_ARCH_8A__) \
+ || (defined(__ARCH_ARM) && __ARCH_ARM >= 8)
+ || (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM >= 8) \
#define C4_CPU_ARMV8
#elif defined(__ARM_ARCH_7__) || defined(_ARM_ARCH_7) \
|| defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7R__) \
|| defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__) \
+ || defined(__ARM_ARCH_7EM__) \
|| (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM >= 7) \
|| (defined(_M_ARM) && _M_ARM >= 7)
#define C4_CPU_ARMV7
#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) \
|| defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) \
|| defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6ZK__) \
- || defined(__ARM_ARCH_6M__) \
+ || defined(__ARM_ARCH_6M__) || defined(__ARM_ARCH_6KZ__) \
|| (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM >= 6)
#define C4_CPU_ARMV6
#elif defined(__ARM_ARCH_5TEJ__) \
+ || defined(__ARM_ARCH_5TE__) \
|| (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM >= 5)
#define C4_CPU_ARMV5
#elif defined(__ARM_ARCH_4T__) \
@@ -441,7 +449,11 @@ C4_FOR_EACH(PRN_STRUCT_OFFSETS, a, b, c);
#endif
#endif
#if defined(__ARMEL__) || defined(__LITTLE_ENDIAN__) || defined(__AARCH64EL__) \
- || (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__))
+ || (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)) \
+ || defined(_MSC_VER) // winarm64 does not provide any of the above macros,
+ // but advises little-endianess:
+ // https://docs.microsoft.com/en-us/cpp/build/overview-of-arm-abi-conventions?view=msvc-170
+ // So if it is visual studio compiling, we'll assume little endian.
#define C4_BYTE_ORDER _C4EL
#elif defined(__ARMEB__) || defined(__BIG_ENDIAN__) || defined(__AARCH64EB__) \
|| (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__))
@@ -505,7 +517,7 @@ C4_FOR_EACH(PRN_STRUCT_OFFSETS, a, b, c);
// (end https://github.com/biojppm/c4core/src/c4/cpu.hpp)
-#endif
+
//********************************************************************************
@@ -628,9 +640,9 @@ C4_FOR_EACH(PRN_STRUCT_OFFSETS, a, b, c);
// amalgamate: removed include of
// https://github.com/biojppm/c4core/src/c4/gcc-4.8.hpp
//# include "c4/gcc-4.8.hpp"
-#if !defined(C4_GCC-4_8_HPP_) && !defined(_C4_GCC-4_8_HPP_)
+#if !defined(C4_GCC_4_8_HPP_) && !defined(_C4_GCC_4_8_HPP_)
#error "amalgamate: file c4/gcc-4.8.hpp must have been included at this point"
-#endif /* C4_GCC-4_8_HPP_ */
+#endif /* C4_GCC_4_8_HPP_ */
# else
// we do not support GCC < 4.8:
@@ -952,6 +964,8 @@ typedef long double max_align_t ;
# define C4_RESTRICT_FN __attribute__((restrict))
# define C4_NO_INLINE __attribute__((noinline))
# define C4_ALWAYS_INLINE inline __attribute__((always_inline))
+# define C4_CONST __attribute__((const))
+# define C4_PURE __attribute__((pure))
/** force inlining of every callee function */
# define C4_FLATTEN __atribute__((flatten))
/** mark a function as hot, ie as having a visible impact in CPU time
@@ -973,6 +987,8 @@ typedef long double max_align_t ;
# define C4_NO_INLINE __declspec(noinline)
# define C4_ALWAYS_INLINE inline __forceinline
/** these are not available in VS AFAIK */
+# define C4_CONST
+# define C4_PURE
# define C4_FLATTEN
# define C4_HOT /** @todo */
# define C4_COLD /** @todo */
@@ -1618,9 +1634,9 @@ using index_sequence_for = make_index_sequence<sizeof...(_Tp)>;
// amalgamate: removed include of
// https://github.com/biojppm/c4core/src/c4/cpu.hpp
//#include "c4/cpu.hpp"
-//#if !defined(C4_CPU_HPP_) && !defined(_C4_CPU_HPP_)
-//#error "amalgamate: file c4/cpu.hpp must have been included at this point"
-//#endif /* C4_CPU_HPP_ */
+#if !defined(C4_CPU_HPP_) && !defined(_C4_CPU_HPP_)
+#error "amalgamate: file c4/cpu.hpp must have been included at this point"
+#endif /* C4_CPU_HPP_ */
// amalgamate: removed include of
// https://github.com/biojppm/c4core/src/c4/compiler.hpp
@@ -1750,8 +1766,8 @@ __inline__ static void trap_instruction(void)
/* Known problem:
* Same problem and workaround as Thumb mode */
}
-#elif defined(__aarch64__) && defined(__APPLE__)
- #define DEBUG_BREAK_IMPL DEBUG_BREAK_USE_BULTIN_TRAP
+#elif defined(__aarch64__) && defined(__APPLE__) && defined(__clang__)
+ #define DEBUG_BREAK_IMPL DEBUG_BREAK_USE_BULTIN_DEBUGTRAP
#elif defined(__aarch64__)
#define DEBUG_BREAK_IMPL DEBUG_BREAK_USE_TRAP_INSTRUCTION
__attribute__((always_inline))
@@ -1911,7 +1927,7 @@ struct fail_type__ {};
#endif // _DOXYGEN_
-#ifdef NDEBUG
+#if defined(NDEBUG) || defined(C4_NO_DEBUG_BREAK)
# define C4_DEBUG_BREAK()
#else
# ifdef __clang__
@@ -2312,10 +2328,46 @@ struct srcloc
#error "amalgamate: file c4/config.hpp must have been included at this point"
#endif /* C4_CONFIG_HPP_ */
+// amalgamate: removed include of
+// https://github.com/biojppm/c4core/src/c4/error.hpp
+//#include "c4/error.hpp"
+#if !defined(C4_ERROR_HPP_) && !defined(_C4_ERROR_HPP_)
+#error "amalgamate: file c4/error.hpp must have been included at this point"
+#endif /* C4_ERROR_HPP_ */
+
+// amalgamate: removed include of
+// https://github.com/biojppm/c4core/src/c4/compiler.hpp
+//#include "c4/compiler.hpp"
+#if !defined(C4_COMPILER_HPP_) && !defined(_C4_COMPILER_HPP_)
+#error "amalgamate: file c4/compiler.hpp must have been included at this point"
+#endif /* C4_COMPILER_HPP_ */
+
+// amalgamate: removed include of
+// https://github.com/biojppm/c4core/src/c4/cpu.hpp
+//#include "c4/cpu.hpp"
+#if !defined(C4_CPU_HPP_) && !defined(_C4_CPU_HPP_)
+#error "amalgamate: file c4/cpu.hpp must have been included at this point"
+#endif /* C4_CPU_HPP_ */
+#ifdef C4_MSVC
+#include <intrin.h>
+#endif
//included above:
//#include <string.h>
+#if (defined(__GNUC__) && __GNUC__ >= 10) || defined(__has_builtin)
+#define _C4_USE_LSB_INTRINSIC(which) __has_builtin(which)
+#define _C4_USE_MSB_INTRINSIC(which) __has_builtin(which)
+#elif defined(C4_MSVC)
+#define _C4_USE_LSB_INTRINSIC(which) true
+#define _C4_USE_MSB_INTRINSIC(which) true
+#else
+// let's try our luck
+#define _C4_USE_LSB_INTRINSIC(which) true
+#define _C4_USE_MSB_INTRINSIC(which) true
+#endif
+
+
/** @file memory_util.hpp Some memory utilities. */
namespace c4 {
@@ -2338,7 +2390,11 @@ C4_ALWAYS_INLINE void mem_zero(T* mem)
memset(mem, 0, sizeof(T));
}
-bool mem_overlaps(void const* a, void const* b, size_t sza, size_t szb);
+C4_ALWAYS_INLINE C4_CONST bool mem_overlaps(void const* a, void const* b, size_t sza, size_t szb)
+{
+ // thanks @timwynants
+ return (((const char*)b + szb) > a && b < ((const char*)a+sza));
+}
void mem_repeat(void* dest, void const* pattern, size_t pattern_size, size_t num_times);
@@ -2348,9 +2404,9 @@ void mem_repeat(void* dest, void const* pattern, size_t pattern_size, size_t num
//-----------------------------------------------------------------------------
template<class T>
-bool is_aligned(T *ptr, size_t alignment=alignof(T))
+C4_ALWAYS_INLINE C4_CONST bool is_aligned(T *ptr, uintptr_t alignment=alignof(T))
{
- return (uintptr_t(ptr) & (alignment - 1)) == 0u;
+ return (uintptr_t(ptr) & (alignment - uintptr_t(1))) == uintptr_t(0);
}
@@ -2359,38 +2415,165 @@ bool is_aligned(T *ptr, size_t alignment=alignof(T))
//-----------------------------------------------------------------------------
// least significant bit
-/** least significant bit; this function is constexpr-14 because of the local
- * variable */
+/** @name msb Compute the least significant bit
+ * @note the input value must be nonzero
+ * @note the input type must be unsigned
+ */
+/** @{ */
+
+// https://graphics.stanford.edu/~seander/bithacks.html#ZerosOnRightLinear
+#define _c4_lsb_fallback \
+ unsigned c = 0; \
+ v = (v ^ (v - 1)) >> 1; /* Set v's trailing 0s to 1s and zero rest */ \
+ for(; v; ++c) \
+ v >>= 1; \
+ return (unsigned) c
+
+// u8
template<class I>
-C4_CONSTEXPR14 I lsb(I v)
-{
- if(!v) return 0;
- I b = 0;
- while((v & I(1)) == I(0))
- {
- v >>= 1;
- ++b;
- }
- return b;
+C4_CONSTEXPR14
+auto lsb(I v) noexcept
+ -> typename std::enable_if<sizeof(I) == 1u, unsigned>::type
+{
+ C4_STATIC_ASSERT(std::is_unsigned<I>::value);
+ C4_ASSERT(v != 0);
+ #if _C4_USE_LSB_INTRINSIC(__builtin_ctz)
+ // upcast to use the intrinsic, it's cheaper.
+ #ifdef C4_MSVC
+ #if !defined(C4_CPU_ARM64) && !defined(C4_CPU_ARM)
+ unsigned long bit;
+ _BitScanForward(&bit, (unsigned long)v);
+ return bit;
+ #else
+ _c4_lsb_fallback;
+ #endif
+ #else
+ return (unsigned)__builtin_ctz((unsigned)v);
+ #endif
+ #else
+ _c4_lsb_fallback;
+ #endif
}
-namespace detail {
+// u16
+template<class I>
+C4_CONSTEXPR14
+auto lsb(I v) noexcept
+ -> typename std::enable_if<sizeof(I) == 2u, unsigned>::type
+{
+ C4_STATIC_ASSERT(std::is_unsigned<I>::value);
+ C4_ASSERT(v != 0);
+ #if _C4_USE_LSB_INTRINSIC(__builtin_ctz)
+ // upcast to use the intrinsic, it's cheaper.
+ // Then remember that the upcast makes it to 31bits
+ #ifdef C4_MSVC
+ #if !defined(C4_CPU_ARM64) && !defined(C4_CPU_ARM)
+ unsigned long bit;
+ _BitScanForward(&bit, (unsigned long)v);
+ return bit;
+ #else
+ _c4_lsb_fallback;
+ #endif
+ #else
+ return (unsigned)__builtin_ctz((unsigned)v);
+ #endif
+ #else
+ _c4_lsb_fallback;
+ #endif
+}
+
+// u32
+template<class I>
+C4_CONSTEXPR14
+auto lsb(I v) noexcept
+ -> typename std::enable_if<sizeof(I) == 4u, unsigned>::type
+{
+ C4_STATIC_ASSERT(std::is_unsigned<I>::value);
+ C4_ASSERT(v != 0);
+ #if _C4_USE_LSB_INTRINSIC(__builtin_ctz)
+ #ifdef C4_MSVC
+ #if !defined(C4_CPU_ARM64) && !defined(C4_CPU_ARM)
+ unsigned long bit;
+ _BitScanForward(&bit, v);
+ return bit;
+ #else
+ _c4_lsb_fallback;
+ #endif
+ #else
+ return (unsigned)__builtin_ctz((unsigned)v);
+ #endif
+ #else
+ _c4_lsb_fallback;
+ #endif
+}
-template<class I, I val, I num_bits, bool finished>
-struct _lsb11;
+// u64 in 64bits
+template<class I>
+C4_CONSTEXPR14
+auto lsb(I v) noexcept
+ -> typename std::enable_if<sizeof(I) == 8u && sizeof(unsigned long) == 8u, unsigned>::type
+{
+ C4_STATIC_ASSERT(std::is_unsigned<I>::value);
+ C4_ASSERT(v != 0);
+ #if _C4_USE_LSB_INTRINSIC(__builtin_ctzl)
+ #if defined(C4_MSVC)
+ #if !defined(C4_CPU_ARM64) && !defined(C4_CPU_ARM)
+ unsigned long bit;
+ _BitScanForward64(&bit, v);
+ return bit;
+ #else
+ _c4_lsb_fallback;
+ #endif
+ #else
+ return (unsigned)__builtin_ctzl((unsigned long)v);
+ #endif
+ #else
+ _c4_lsb_fallback;
+ #endif
+}
-template<class I, I val, I num_bits>
-struct _lsb11< I, val, num_bits, false>
+// u64 in 32bits
+template<class I>
+C4_CONSTEXPR14
+auto lsb(I v) noexcept
+ -> typename std::enable_if<sizeof(I) == 8u && sizeof(unsigned long long) == 8u && sizeof(unsigned long) != sizeof(unsigned long long), unsigned>::type
+{
+ C4_STATIC_ASSERT(std::is_unsigned<I>::value);
+ C4_ASSERT(v != 0);
+ #if _C4_USE_LSB_INTRINSIC(__builtin_ctzll)
+ #if defined(C4_MSVC)
+ #if !defined(C4_CPU_X86) && !defined(C4_CPU_ARM64) && !defined(C4_CPU_ARM)
+ unsigned long bit;
+ _BitScanForward64(&bit, v);
+ return bit;
+ #else
+ _c4_lsb_fallback;
+ #endif
+ #else
+ return (unsigned)__builtin_ctzll((unsigned long long)v);
+ #endif
+ #else
+ _c4_lsb_fallback;
+ #endif
+}
+
+#undef _c4_lsb_fallback
+
+/** @} */
+
+
+namespace detail {
+template<class I, I val, unsigned num_bits, bool finished> struct _lsb11;
+template<class I, I val, unsigned num_bits>
+struct _lsb11<I, val, num_bits, false>
{
- enum : I { num = _lsb11<I, (val>>1), num_bits+I(1), (((val>>1)&I(1))!=I(0))>::num };
+ enum : unsigned { num = _lsb11<I, (val>>1), num_bits+I(1), (((val>>1)&I(1))!=I(0))>::num };
};
-
-template<class I, I val, I num_bits>
+template<class I, I val, unsigned num_bits>
struct _lsb11<I, val, num_bits, true>
{
- enum : I { num = num_bits };
+ enum : unsigned { num = num_bits };
};
-
} // namespace detail
@@ -2402,7 +2585,7 @@ template<class I, I number>
struct lsb11
{
static_assert(number != 0, "lsb: number must be nonzero");
- enum : I { value = detail::_lsb11<I, number, 0, ((number&I(1))!=I(0))>::num};
+ enum : unsigned { value = detail::_lsb11<I, number, 0, ((number&I(1))!=I(0))>::num};
};
@@ -2411,51 +2594,199 @@ struct lsb11
//-----------------------------------------------------------------------------
// most significant bit
-/** most significant bit; this function is constexpr-14 because of the local
- * variable
- * @todo implement faster version
- * @see https://stackoverflow.com/questions/2589096/find-most-significant-bit-left-most-that-is-set-in-a-bit-array
+
+/** @name msb Compute the most significant bit
+ * @note the input value must be nonzero
+ * @note the input type must be unsigned
*/
+/** @{ */
+
+
+#define _c4_msb8_fallback \
+ unsigned n = 0; \
+ if(v & I(0xf0)) v >>= 4, n |= I(4); \
+ if(v & I(0x0c)) v >>= 2, n |= I(2); \
+ if(v & I(0x02)) v >>= 1, n |= I(1); \
+ return n
+
+#define _c4_msb16_fallback \
+ unsigned n = 0; \
+ if(v & I(0xff00)) v >>= 8, n |= I(8); \
+ if(v & I(0x00f0)) v >>= 4, n |= I(4); \
+ if(v & I(0x000c)) v >>= 2, n |= I(2); \
+ if(v & I(0x0002)) v >>= 1, n |= I(1); \
+ return n
+
+#define _c4_msb32_fallback \
+ unsigned n = 0; \
+ if(v & I(0xffff0000)) v >>= 16, n |= 16; \
+ if(v & I(0x0000ff00)) v >>= 8, n |= 8; \
+ if(v & I(0x000000f0)) v >>= 4, n |= 4; \
+ if(v & I(0x0000000c)) v >>= 2, n |= 2; \
+ if(v & I(0x00000002)) v >>= 1, n |= 1; \
+ return n
+
+#define _c4_msb64_fallback \
+ unsigned n = 0; \
+ if(v & I(0xffffffff00000000)) v >>= 32, n |= I(32); \
+ if(v & I(0x00000000ffff0000)) v >>= 16, n |= I(16); \
+ if(v & I(0x000000000000ff00)) v >>= 8, n |= I(8); \
+ if(v & I(0x00000000000000f0)) v >>= 4, n |= I(4); \
+ if(v & I(0x000000000000000c)) v >>= 2, n |= I(2); \
+ if(v & I(0x0000000000000002)) v >>= 1, n |= I(1); \
+ return n
+
+
+// u8
template<class I>
-C4_CONSTEXPR14 I msb(I v)
-{
- // TODO:
- //
- //int n;
- //if(input_num & uint64_t(0xffffffff00000000)) input_num >>= 32, n |= 32;
- //if(input_num & uint64_t( 0xffff0000)) input_num >>= 16, n |= 16;
- //if(input_num & uint64_t( 0xff00)) input_num >>= 8, n |= 8;
- //if(input_num & uint64_t( 0xf0)) input_num >>= 4, n |= 4;
- //if(input_num & uint64_t( 0xc)) input_num >>= 2, n |= 2;
- //if(input_num & uint64_t( 0x2)) input_num >>= 1, n |= 1;
- if(!v) return static_cast<I>(-1);
- I b = 0;
- while(v != 0)
- {
- v >>= 1;
- ++b;
- }
- return b-1;
+C4_CONSTEXPR14
+auto msb(I v) noexcept
+ -> typename std::enable_if<sizeof(I) == 1u, unsigned>::type
+{
+ C4_STATIC_ASSERT(std::is_unsigned<I>::value);
+ C4_ASSERT(v != 0);
+ #if _C4_USE_MSB_INTRINSIC(__builtin_clz)
+ // upcast to use the intrinsic, it's cheaper.
+ // Then remember that the upcast makes it to 31bits
+ #ifdef C4_MSVC
+ #if !defined(C4_CPU_ARM64) && !defined(C4_CPU_ARM)
+ unsigned long bit;
+ _BitScanReverse(&bit, (unsigned long)v);
+ return bit;
+ #else
+ _c4_msb8_fallback;
+ #endif
+ #else
+ return 31u - (unsigned)__builtin_clz((unsigned)v);
+ #endif
+ #else
+ _c4_msb8_fallback;
+ #endif
}
-namespace detail {
+// u16
+template<class I>
+C4_CONSTEXPR14
+auto msb(I v) noexcept
+ -> typename std::enable_if<sizeof(I) == 2u, unsigned>::type
+{
+ C4_STATIC_ASSERT(std::is_unsigned<I>::value);
+ C4_ASSERT(v != 0);
+ #if _C4_USE_MSB_INTRINSIC(__builtin_clz)
+ // upcast to use the intrinsic, it's cheaper.
+ // Then remember that the upcast makes it to 31bits
+ #ifdef C4_MSVC
+ #if !defined(C4_CPU_ARM64) && !defined(C4_CPU_ARM)
+ unsigned long bit;
+ _BitScanReverse(&bit, (unsigned long)v);
+ return bit;
+ #else
+ _c4_msb16_fallback;
+ #endif
+ #else
+ return 31u - (unsigned)__builtin_clz((unsigned)v);
+ #endif
+ #else
+ _c4_msb16_fallback;
+ #endif
+}
-template<class I, I val, I num_bits, bool finished>
-struct _msb11;
+// u32
+template<class I>
+C4_CONSTEXPR14
+auto msb(I v) noexcept
+ -> typename std::enable_if<sizeof(I) == 4u, unsigned>::type
+{
+ C4_STATIC_ASSERT(std::is_unsigned<I>::value);
+ C4_ASSERT(v != 0);
+ #if _C4_USE_MSB_INTRINSIC(__builtin_clz)
+ #ifdef C4_MSVC
+ #if !defined(C4_CPU_ARM64) && !defined(C4_CPU_ARM)
+ unsigned long bit;
+ _BitScanReverse(&bit, v);
+ return bit;
+ #else
+ _c4_msb32_fallback;
+ #endif
+ #else
+ return 31u - (unsigned)__builtin_clz((unsigned)v);
+ #endif
+ #else
+ _c4_msb32_fallback;
+ #endif
+}
+
+// u64 in 64bits
+template<class I>
+C4_CONSTEXPR14
+auto msb(I v) noexcept
+ -> typename std::enable_if<sizeof(I) == 8u && sizeof(unsigned long) == 8u, unsigned>::type
+{
+ C4_STATIC_ASSERT(std::is_unsigned<I>::value);
+ C4_ASSERT(v != 0);
+ #if _C4_USE_MSB_INTRINSIC(__builtin_clzl)
+ #ifdef C4_MSVC
+ #if !defined(C4_CPU_ARM64) && !defined(C4_CPU_ARM)
+ unsigned long bit;
+ _BitScanReverse64(&bit, v);
+ return bit;
+ #else
+ _c4_msb64_fallback;
+ #endif
+ #else
+ return 63u - (unsigned)__builtin_clzl((unsigned long)v);
+ #endif
+ #else
+ _c4_msb64_fallback;
+ #endif
+}
+// u64 in 32bits
+template<class I>
+C4_CONSTEXPR14
+auto msb(I v) noexcept
+ -> typename std::enable_if<sizeof(I) == 8u && sizeof(unsigned long long) == 8u && sizeof(unsigned long) != sizeof(unsigned long long), unsigned>::type
+{
+ C4_STATIC_ASSERT(std::is_unsigned<I>::value);
+ C4_ASSERT(v != 0);
+ #if _C4_USE_MSB_INTRINSIC(__builtin_clzll)
+ #ifdef C4_MSVC
+ #if !defined(C4_CPU_X86) && !defined(C4_CPU_ARM64) && !defined(C4_CPU_ARM)
+ unsigned long bit;
+ _BitScanReverse64(&bit, v);
+ return bit;
+ #else
+ _c4_msb64_fallback;
+ #endif
+ #else
+ return 63u - (unsigned)__builtin_clzll((unsigned long long)v);
+ #endif
+ #else
+ _c4_msb64_fallback;
+ #endif
+}
+
+#undef _c4_msb8_fallback
+#undef _c4_msb16_fallback
+#undef _c4_msb32_fallback
+#undef _c4_msb64_fallback
+
+/** @} */
+
+
+namespace detail {
+template<class I, I val, I num_bits, bool finished> struct _msb11;
template<class I, I val, I num_bits>
struct _msb11< I, val, num_bits, false>
{
- enum : I { num = _msb11<I, (val>>1), num_bits+I(1), ((val>>1)==I(0))>::num };
+ enum : unsigned { num = _msb11<I, (val>>1), num_bits+I(1), ((val>>1)==I(0))>::num };
};
-
template<class I, I val, I num_bits>
struct _msb11<I, val, num_bits, true>
{
static_assert(val == 0, "bad implementation");
- enum : I { num = num_bits-1 };
+ enum : unsigned { num = (unsigned)(num_bits-1) };
};
-
} // namespace detail
@@ -2466,10 +2797,126 @@ struct _msb11<I, val, num_bits, true>
template<class I, I number>
struct msb11
{
- enum : I { value = detail::_msb11<I, number, 0, (number==I(0))>::num };
+ enum : unsigned { value = detail::_msb11<I, number, 0, (number==I(0))>::num };
};
+
+#undef _C4_USE_LSB_INTRINSIC
+#undef _C4_USE_MSB_INTRINSIC
+
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+
+// there is an implicit conversion below; it happens when E or B are
+// narrower than int, and thus any operation will upcast the result to
+// int, and then downcast to assign
+C4_SUPPRESS_WARNING_GCC_CLANG_WITH_PUSH("-Wconversion")
+
+/** integer power; this function is constexpr-14 because of the local
+ * variables */
+template<class B, class E>
+C4_CONSTEXPR14 C4_CONST auto ipow(B base, E exponent) noexcept -> typename std::enable_if<std::is_signed<E>::value, B>::type
+{
+ C4_STATIC_ASSERT(std::is_integral<E>::value);
+ B r = B(1);
+ if(exponent >= 0)
+ {
+ for(E e = 0; e < exponent; ++e)
+ r *= base;
+ }
+ else
+ {
+ exponent *= E(-1);
+ for(E e = 0; e < exponent; ++e)
+ r /= base;
+ }
+ return r;
+}
+
+/** integer power; this function is constexpr-14 because of the local
+ * variables */
+template<class B, B base, class E>
+C4_CONSTEXPR14 C4_CONST auto ipow(E exponent) noexcept -> typename std::enable_if<std::is_signed<E>::value, B>::type
+{
+ C4_STATIC_ASSERT(std::is_integral<E>::value);
+ B r = B(1);
+ if(exponent >= 0)
+ {
+ for(E e = 0; e < exponent; ++e)
+ r *= base;
+ }
+ else
+ {
+ exponent *= E(-1);
+ for(E e = 0; e < exponent; ++e)
+ r /= base;
+ }
+ return r;
+}
+
+/** integer power; this function is constexpr-14 because of the local
+ * variables */
+template<class B, class Base, Base base, class E>
+C4_CONSTEXPR14 C4_CONST auto ipow(E exponent) noexcept -> typename std::enable_if<std::is_signed<E>::value, B>::type
+{
+ C4_STATIC_ASSERT(std::is_integral<E>::value);
+ B r = B(1);
+ B bbase = B(base);
+ if(exponent >= 0)
+ {
+ for(E e = 0; e < exponent; ++e)
+ r *= bbase;
+ }
+ else
+ {
+ exponent *= E(-1);
+ for(E e = 0; e < exponent; ++e)
+ r /= bbase;
+ }
+ return r;
+}
+
+/** integer power; this function is constexpr-14 because of the local
+ * variables */
+template<class B, class E>
+C4_CONSTEXPR14 C4_CONST auto ipow(B base, E exponent) noexcept -> typename std::enable_if<!std::is_signed<E>::value, B>::type
+{
+ C4_STATIC_ASSERT(std::is_integral<E>::value);
+ B r = B(1);
+ for(E e = 0; e < exponent; ++e)
+ r *= base;
+ return r;
+}
+
+/** integer power; this function is constexpr-14 because of the local
+ * variables */
+template<class B, B base, class E>
+C4_CONSTEXPR14 C4_CONST auto ipow(E exponent) noexcept -> typename std::enable_if<!std::is_signed<E>::value, B>::type
+{
+ C4_STATIC_ASSERT(std::is_integral<E>::value);
+ B r = B(1);
+ for(E e = 0; e < exponent; ++e)
+ r *= base;
+ return r;
+}
+/** integer power; this function is constexpr-14 because of the local
+ * variables */
+template<class B, class Base, Base base, class E>
+C4_CONSTEXPR14 C4_CONST auto ipow(E exponent) noexcept -> typename std::enable_if<!std::is_signed<E>::value, B>::type
+{
+ C4_STATIC_ASSERT(std::is_integral<E>::value);
+ B r = B(1);
+ B bbase = B(base);
+ for(E e = 0; e < exponent; ++e)
+ r *= bbase;
+ return r;
+}
+
+C4_SUPPRESS_WARNING_GCC_CLANG_POP
+
+
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
@@ -2480,10 +2927,9 @@ template<class I>
C4_CONSTEXPR14 I contiguous_mask(I first_bit, I last_bit)
{
I r = 0;
- constexpr const I o = 1;
for(I i = first_bit; i < last_bit; ++i)
{
- r |= (o << i);
+ r |= (I(1) << i);
}
return r;
}
@@ -4852,28 +5298,28 @@ public:
/** @name Standard accessor methods */
/** @{ */
- bool has_str() const { return ! empty() && str[0] != C(0); }
- bool empty() const { return (len == 0 || str == nullptr); }
- bool not_empty() const { return (len != 0 && str != nullptr); }
- size_t size() const { return len; }
+ C4_ALWAYS_INLINE C4_PURE bool has_str() const noexcept { return ! empty() && str[0] != C(0); }
+ C4_ALWAYS_INLINE C4_PURE bool empty() const noexcept { return (len == 0 || str == nullptr); }
+ C4_ALWAYS_INLINE C4_PURE bool not_empty() const noexcept { return (len != 0 && str != nullptr); }
+ C4_ALWAYS_INLINE C4_PURE size_t size() const noexcept { return len; }
- iterator begin() { return str; }
- iterator end () { return str + len; }
+ C4_ALWAYS_INLINE C4_PURE iterator begin() noexcept { return str; }
+ C4_ALWAYS_INLINE C4_PURE iterator end () noexcept { return str + len; }
- const_iterator begin() const { return str; }
- const_iterator end () const { return str + len; }
+ C4_ALWAYS_INLINE C4_PURE const_iterator begin() const noexcept { return str; }
+ C4_ALWAYS_INLINE C4_PURE const_iterator end () const noexcept { return str + len; }
- C * data() { return str; }
- C const* data() const { return str; }
+ C4_ALWAYS_INLINE C4_PURE C * data() noexcept { return str; }
+ C4_ALWAYS_INLINE C4_PURE C const* data() const noexcept { return str; }
- inline C & operator[] (size_t i) { C4_ASSERT(i >= 0 && i < len); return str[i]; }
- inline C const& operator[] (size_t i) const { C4_ASSERT(i >= 0 && i < len); return str[i]; }
+ C4_ALWAYS_INLINE C4_PURE C & operator[] (size_t i) noexcept { C4_ASSERT(i >= 0 && i < len); return str[i]; }
+ C4_ALWAYS_INLINE C4_PURE C const& operator[] (size_t i) const noexcept { C4_ASSERT(i >= 0 && i < len); return str[i]; }
- inline C & front() { C4_ASSERT(len > 0 && str != nullptr); return *str; }
- inline C const& front() const { C4_ASSERT(len > 0 && str != nullptr); return *str; }
+ C4_ALWAYS_INLINE C4_PURE C & front() noexcept { C4_ASSERT(len > 0 && str != nullptr); return *str; }
+ C4_ALWAYS_INLINE C4_PURE C const& front() const noexcept { C4_ASSERT(len > 0 && str != nullptr); return *str; }
- inline C & back() { C4_ASSERT(len > 0 && str != nullptr); return *(str + len - 1); }
- inline C const& back() const { C4_ASSERT(len > 0 && str != nullptr); return *(str + len - 1); }
+ C4_ALWAYS_INLINE C4_PURE C & back() noexcept { C4_ASSERT(len > 0 && str != nullptr); return *(str + len - 1); }
+ C4_ALWAYS_INLINE C4_PURE C const& back() const noexcept { C4_ASSERT(len > 0 && str != nullptr); return *(str + len - 1); }
/** @} */
@@ -4882,28 +5328,35 @@ public:
/** @name Comparison methods */
/** @{ */
- int compare(C const c) const
+ C4_PURE int compare(C const c) const noexcept
{
C4_XASSERT((str != nullptr) || len == 0);
- if( ! len)
+ if(C4_LIKELY(str != nullptr && len > 0))
+ return (*str != c) ? *str - c : (static_cast<int>(len) - 1);
+ else
return -1;
- if(*str == c)
- return static_cast<int>(len - 1);
- return *str - c;
}
- int compare(const char *that, size_t sz) const
+ C4_PURE int compare(const char *C4_RESTRICT that, size_t sz) const noexcept
{
C4_XASSERT(that || sz == 0);
C4_XASSERT(str || len == 0);
if(C4_LIKELY(str && that))
{
- int ret = strncmp(str, that, len < sz ? len : sz);
- if(ret == 0 && len != sz)
- ret = len < sz ? -1 : 1;
- return ret;
+ {
+ const size_t min = len < sz ? len : sz;
+ for(size_t i = 0; i < min; ++i)
+ if(str[i] != that[i])
+ return str[i] < that[i] ? -1 : 1;
+ }
+ if(len < sz)
+ return -1;
+ else if(len == sz)
+ return 0;
+ else
+ return 1;
}
- if((!str && !that) || (len == sz))
+ else if(len == sz)
{
C4_XASSERT(len == 0 && sz == 0);
return 0;
@@ -4911,31 +5364,31 @@ public:
return len < sz ? -1 : 1;
}
- C4_ALWAYS_INLINE int compare(ro_substr const that) const { return this->compare(that.str, that.len); }
+ C4_ALWAYS_INLINE C4_PURE int compare(ro_substr const that) const noexcept { return this->compare(that.str, that.len); }
- C4_ALWAYS_INLINE bool operator== (std::nullptr_t) const { return str == nullptr || len == 0; }
- C4_ALWAYS_INLINE bool operator!= (std::nullptr_t) const { return str != nullptr || len == 0; }
+ C4_ALWAYS_INLINE C4_PURE bool operator== (std::nullptr_t) const noexcept { return str == nullptr; }
+ C4_ALWAYS_INLINE C4_PURE bool operator!= (std::nullptr_t) const noexcept { return str != nullptr; }
- C4_ALWAYS_INLINE bool operator== (C const c) const { return this->compare(c) == 0; }
- C4_ALWAYS_INLINE bool operator!= (C const c) const { return this->compare(c) != 0; }
- C4_ALWAYS_INLINE bool operator< (C const c) const { return this->compare(c) < 0; }
- C4_ALWAYS_INLINE bool operator> (C const c) const { return this->compare(c) > 0; }
- C4_ALWAYS_INLINE bool operator<= (C const c) const { return this->compare(c) <= 0; }
- C4_ALWAYS_INLINE bool operator>= (C const c) const { return this->compare(c) >= 0; }
+ C4_ALWAYS_INLINE C4_PURE bool operator== (C const c) const noexcept { return this->compare(c) == 0; }
+ C4_ALWAYS_INLINE C4_PURE bool operator!= (C const c) const noexcept { return this->compare(c) != 0; }
+ C4_ALWAYS_INLINE C4_PURE bool operator< (C const c) const noexcept { return this->compare(c) < 0; }
+ C4_ALWAYS_INLINE C4_PURE bool operator> (C const c) const noexcept { return this->compare(c) > 0; }
+ C4_ALWAYS_INLINE C4_PURE bool operator<= (C const c) const noexcept { return this->compare(c) <= 0; }
+ C4_ALWAYS_INLINE C4_PURE bool operator>= (C const c) const noexcept { return this->compare(c) >= 0; }
- template<class U> C4_ALWAYS_INLINE bool operator== (basic_substring<U> const that) const { return this->compare(that) == 0; }
- template<class U> C4_ALWAYS_INLINE bool operator!= (basic_substring<U> const that) const { return this->compare(that) != 0; }
- template<class U> C4_ALWAYS_INLINE bool operator< (basic_substring<U> const that) const { return this->compare(that) < 0; }
- template<class U> C4_ALWAYS_INLINE bool operator> (basic_substring<U> const that) const { return this->compare(that) > 0; }
- template<class U> C4_ALWAYS_INLINE bool operator<= (basic_substring<U> const that) const { return this->compare(that) <= 0; }
- template<class U> C4_ALWAYS_INLINE bool operator>= (basic_substring<U> const that) const { return this->compare(that) >= 0; }
+ template<class U> C4_ALWAYS_INLINE C4_PURE bool operator== (basic_substring<U> const that) const noexcept { return this->compare(that) == 0; }
+ template<class U> C4_ALWAYS_INLINE C4_PURE bool operator!= (basic_substring<U> const that) const noexcept { return this->compare(that) != 0; }
+ template<class U> C4_ALWAYS_INLINE C4_PURE bool operator< (basic_substring<U> const that) const noexcept { return this->compare(that) < 0; }
+ template<class U> C4_ALWAYS_INLINE C4_PURE bool operator> (basic_substring<U> const that) const noexcept { return this->compare(that) > 0; }
+ template<class U> C4_ALWAYS_INLINE C4_PURE bool operator<= (basic_substring<U> const that) const noexcept { return this->compare(that) <= 0; }
+ template<class U> C4_ALWAYS_INLINE C4_PURE bool operator>= (basic_substring<U> const that) const noexcept { return this->compare(that) >= 0; }
- template<size_t N> C4_ALWAYS_INLINE bool operator== (const char (&that)[N]) const { return this->compare(that, N-1) == 0; }
- template<size_t N> C4_ALWAYS_INLINE bool operator!= (const char (&that)[N]) const { return this->compare(that, N-1) != 0; }
- template<size_t N> C4_ALWAYS_INLINE bool operator< (const char (&that)[N]) const { return this->compare(that, N-1) < 0; }
- template<size_t N> C4_ALWAYS_INLINE bool operator> (const char (&that)[N]) const { return this->compare(that, N-1) > 0; }
- template<size_t N> C4_ALWAYS_INLINE bool operator<= (const char (&that)[N]) const { return this->compare(that, N-1) <= 0; }
- template<size_t N> C4_ALWAYS_INLINE bool operator>= (const char (&that)[N]) const { return this->compare(that, N-1) >= 0; }
+ template<size_t N> C4_ALWAYS_INLINE C4_PURE bool operator== (const char (&that)[N]) const noexcept { return this->compare(that, N-1) == 0; }
+ template<size_t N> C4_ALWAYS_INLINE C4_PURE bool operator!= (const char (&that)[N]) const noexcept { return this->compare(that, N-1) != 0; }
+ template<size_t N> C4_ALWAYS_INLINE C4_PURE bool operator< (const char (&that)[N]) const noexcept { return this->compare(that, N-1) < 0; }
+ template<size_t N> C4_ALWAYS_INLINE C4_PURE bool operator> (const char (&that)[N]) const noexcept { return this->compare(that, N-1) > 0; }
+ template<size_t N> C4_ALWAYS_INLINE C4_PURE bool operator<= (const char (&that)[N]) const noexcept { return this->compare(that, N-1) <= 0; }
+ template<size_t N> C4_ALWAYS_INLINE C4_PURE bool operator>= (const char (&that)[N]) const noexcept { return this->compare(that, N-1) >= 0; }
/** @} */
@@ -4945,39 +5398,38 @@ public:
/** @{ */
/** true if *this is a substring of that (ie, from the same buffer) */
- inline bool is_sub(ro_substr const that) const
+ C4_ALWAYS_INLINE C4_PURE bool is_sub(ro_substr const that) const noexcept
{
return that.is_super(*this);
}
/** true if that is a substring of *this (ie, from the same buffer) */
- inline bool is_super(ro_substr const that) const
+ C4_ALWAYS_INLINE C4_PURE bool is_super(ro_substr const that) const noexcept
{
- if(C4_UNLIKELY(len == 0))
- {
+ if(C4_LIKELY(len > 0))
+ return that.str >= str && that.str+that.len <= str+len;
+ else
return that.len == 0 && that.str == str && str != nullptr;
- }
- return that.begin() >= begin() && that.end() <= end();
}
/** true if there is overlap of at least one element between that and *this */
- inline bool overlaps(ro_substr const that) const
+ C4_ALWAYS_INLINE C4_PURE bool overlaps(ro_substr const that) const noexcept
{
// thanks @timwynants
- return (that.end() > begin() && that.begin() < end());
+ return that.str+that.len > str && that.str < str+len;
}
public:
/** return [first,len[ */
- basic_substring sub(size_t first) const
+ C4_ALWAYS_INLINE C4_PURE basic_substring sub(size_t first) const noexcept
{
C4_ASSERT(first >= 0 && first <= len);
return basic_substring(str + first, len - first);
}
/** return [first,first+num[. If num==npos, return [first,len[ */
- basic_substring sub(size_t first, size_t num) const
+ C4_ALWAYS_INLINE C4_PURE basic_substring sub(size_t first, size_t num) const noexcept
{
C4_ASSERT(first >= 0 && first <= len);
C4_ASSERT((num >= 0 && num <= len) || (num == npos));
@@ -4987,7 +5439,7 @@ public:
}
/** return [first,last[. If last==npos, return [first,len[ */
- basic_substring range(size_t first, size_t last=npos) const
+ C4_ALWAYS_INLINE C4_PURE basic_substring range(size_t first, size_t last=npos) const noexcept
{
C4_ASSERT(first >= 0 && first <= len);
last = last != npos ? last : len;
@@ -4996,24 +5448,26 @@ public:
return basic_substring(str + first, last - first);
}
- /** return [0,num[*/
- basic_substring first(size_t num) const
+ /** return the first @p num elements: [0,num[*/
+ C4_ALWAYS_INLINE C4_PURE basic_substring first(size_t num) const noexcept
{
- return sub(0, num);
+ C4_ASSERT(num <= len || num == npos);
+ return basic_substring(str, num != npos ? num : len);
}
- /** return [len-num,len[*/
- basic_substring last(size_t num) const
+ /** return the last @num elements: [len-num,len[*/
+ C4_ALWAYS_INLINE C4_PURE basic_substring last(size_t num) const noexcept
{
- if(num == npos)
- return *this;
- return sub(len - num);
+ C4_ASSERT(num <= len || num == npos);
+ return num != npos ?
+ basic_substring(str + len - num, num) :
+ *this;
}
/** offset from the ends: return [left,len-right[ ; ie, trim a
number of characters from the left and right. This is
equivalent to python's negative list indices. */
- basic_substring offs(size_t left, size_t right) const
+ C4_ALWAYS_INLINE C4_PURE basic_substring offs(size_t left, size_t right) const noexcept
{
C4_ASSERT(left >= 0 && left <= len);
C4_ASSERT(right >= 0 && right <= len);
@@ -5021,27 +5475,47 @@ public:
return basic_substring(str + left, len - right - left);
}
- /** return [0, pos+include_pos[ */
- basic_substring left_of(size_t pos, bool include_pos=false) const
+ /** return [0, pos[ . Same as .first(pos), but provided for compatibility with .right_of() */
+ C4_ALWAYS_INLINE C4_PURE basic_substring left_of(size_t pos) const noexcept
{
- if(pos == npos)
- return *this;
- return first(pos + include_pos);
+ C4_ASSERT(pos <= len || pos == npos);
+ return (pos != npos) ?
+ basic_substring(str, pos) :
+ *this;
+ }
+
+ /** return [0, pos+include_pos[ . Same as .first(pos+1), but provided for compatibility with .right_of() */
+ C4_ALWAYS_INLINE C4_PURE basic_substring left_of(size_t pos, bool include_pos) const noexcept
+ {
+ C4_ASSERT(pos <= len || pos == npos);
+ return (pos != npos) ?
+ basic_substring(str, pos+include_pos) :
+ *this;
+ }
+
+ /** return [pos+1, len[ */
+ C4_ALWAYS_INLINE C4_PURE basic_substring right_of(size_t pos) const noexcept
+ {
+ C4_ASSERT(pos <= len || pos == npos);
+ return (pos != npos) ?
+ basic_substring(str + (pos + 1), len - (pos + 1)) :
+ basic_substring(str + len, size_t(0));
}
/** return [pos+!include_pos, len[ */
- basic_substring right_of(size_t pos, bool include_pos=false) const
+ C4_ALWAYS_INLINE C4_PURE basic_substring right_of(size_t pos, bool include_pos) const noexcept
{
- if(pos == npos)
- return sub(len, 0);
- return sub(pos + !include_pos);
+ C4_ASSERT(pos <= len || pos == npos);
+ return (pos != npos) ?
+ basic_substring(str + (pos + !include_pos), len - (pos + !include_pos)) :
+ basic_substring(str + len, size_t(0));
}
public:
/** given @p subs a substring of the current string, get the
* portion of the current string to the left of it */
- basic_substring left_of(ro_substr const subs) const
+ C4_ALWAYS_INLINE C4_PURE basic_substring left_of(ro_substr const subs) const noexcept
{
C4_ASSERT(is_super(subs) || subs.empty());
auto ssb = subs.begin();
@@ -5055,7 +5529,7 @@ public:
/** given @p subs a substring of the current string, get the
* portion of the current string to the right of it */
- basic_substring right_of(ro_substr const subs) const
+ C4_ALWAYS_INLINE C4_PURE basic_substring right_of(ro_substr const subs) const noexcept
{
C4_ASSERT(is_super(subs) || subs.empty());
auto sse = subs.end();
@@ -5717,55 +6191,64 @@ public:
basic_substring _first_integral_span(size_t skip_start) const
{
C4_ASSERT(!empty());
- if(skip_start == len) {
+ if(skip_start == len)
return first(0);
- }
C4_ASSERT(skip_start < len);
- if(first_of_any("0x", "0X")) // hexadecimal
+ if(len >= skip_start + 3)
{
- skip_start += 2;
- if(len == skip_start)
- return first(0);
- for(size_t i = skip_start; i < len; ++i)
+ if(str[skip_start] != '0')
{
- if( ! _is_hex_char(str[i]))
- return _is_delim_char(str[i]) ? first(i) : first(0);
- }
- }
- else if(first_of_any("0o", "0O")) // octal
- {
- skip_start += 2;
- if(len == skip_start)
- return first(0);
- for(size_t i = skip_start; i < len; ++i)
- {
- char c = str[i];
- if(c < '0' || c > '7')
- return _is_delim_char(str[i]) ? first(i) : first(0);
+ for(size_t i = skip_start; i < len; ++i)
+ {
+ char c = str[i];
+ if(c < '0' || c > '9')
+ return i > skip_start && _is_delim_char(c) ? first(i) : first(0);
+ }
}
- }
- else if(first_of_any("0b", "0B")) // binary
- {
- skip_start += 2;
- if(len == skip_start)
- return first(0);
- for(size_t i = skip_start; i < len; ++i)
+ else
{
- char c = str[i];
- if(c != '0' && c != '1')
- return _is_delim_char(c) ? first(i) : first(0);
+ char next = str[skip_start + 1];
+ if(next == 'x' || next == 'X')
+ {
+ skip_start += 2;
+ for(size_t i = skip_start; i < len; ++i)
+ {
+ const char c = str[i];
+ if( ! _is_hex_char(c))
+ return i > skip_start && _is_delim_char(c) ? first(i) : first(0);
+ }
+ return *this;
+ }
+ else if(next == 'b' || next == 'B')
+ {
+ skip_start += 2;
+ for(size_t i = skip_start; i < len; ++i)
+ {
+ const char c = str[i];
+ if(c != '0' && c != '1')
+ return i > skip_start && _is_delim_char(c) ? first(i) : first(0);
+ }
+ return *this;
+ }
+ else if(next == 'o' || next == 'O')
+ {
+ skip_start += 2;
+ for(size_t i = skip_start; i < len; ++i)
+ {
+ const char c = str[i];
+ if(c < '0' || c > '7')
+ return i > skip_start && _is_delim_char(c) ? first(i) : first(0);
+ }
+ return *this;
+ }
}
}
- else // otherwise, decimal
+ // must be a decimal, or it is not a an number
+ for(size_t i = skip_start; i < len; ++i)
{
- if(len == skip_start)
- return first(0);
- for(size_t i = skip_start; i < len; ++i)
- {
- char c = str[i];
- if(c < '0' || c > '9')
- return _is_delim_char(c) ? first(i) : first(0);
- }
+ const char c = str[i];
+ if(c < '0' || c > '9')
+ return i > skip_start && _is_delim_char(c) ? first(i) : first(0);
}
return *this;
}
@@ -5776,125 +6259,436 @@ public:
basic_substring ne = first_non_empty_span();
if(ne.empty())
return ne;
- size_t skip_start = (ne.str[0] == '+' || ne.str[0] == '-') ? 1 : 0;
- if(ne.first_of_any("0x", "0X")) // hexadecimal
- {
- skip_start += 2;
- if(ne.len == skip_start)
- return ne.first(0);
- for(size_t i = skip_start; i < ne.len; ++i)
+ size_t skip_start = (ne.str[0] == '+' || ne.str[0] == '-');
+ C4_ASSERT(skip_start == 0 || skip_start == 1);
+ // if we have at least three digits after the leading sign, it
+ // can be decimal, or hex, or bin or oct. Ex:
+ // non-decimal: 0x0, 0b0, 0o0
+ // decimal: 1.0, 10., 1e1, 100, inf, nan, infinity
+ if(ne.len >= skip_start+3)
+ {
+ // if it does not have leading 0, it must be decimal, or it is not a real
+ if(ne.str[skip_start] != '0')
{
- char c = ne.str[i];
- if(( ! _is_hex_char(c)) && c != '.' && c != 'p' && c != 'P')
+ if(ne.str[skip_start] == 'i') // is it infinity or inf?
{
- if(c == '-' || c == '+')
- {
- // we can also have a sign for the exponent
- if(i > 1 && (ne[i-1] == 'p' || ne[i-1] == 'P'))
- {
- continue;
- }
- }
- return _is_delim_char(c) ? ne.first(i) : ne.first(0);
+ basic_substring word = ne._word_follows(skip_start + 1, "nfinity");
+ if(word.len)
+ return word;
+ return ne._word_follows(skip_start + 1, "nf");
}
- }
- }
- else if(ne.first_of_any("0b", "0B")) // binary
- {
- skip_start += 2;
- if(ne.len == skip_start)
- return ne.first(0);
- for(size_t i = skip_start; i < ne.len; ++i)
- {
- char c = ne.str[i];
- if(c != '0' && c != '1' && c != '.')
+ else if(ne.str[skip_start] == 'n') // is it nan?
{
- return _is_delim_char(c) ? ne.first(i) : ne.first(0);
+ return ne._word_follows(skip_start + 1, "an");
}
- }
- }
- else if(ne.first_of_any("0o", "0O")) // octal
- {
- skip_start += 2;
- if(ne.len == skip_start)
- return ne.first(0);
- for(size_t i = skip_start; i < ne.len; ++i)
- {
- char c = ne.str[i];
- if((c < '0' || c > '7') && c != '.')
+ else // must be a decimal, or it is not a real
{
- return _is_delim_char(c) ? ne.first(i) : ne.first(0);
+ return ne._first_real_span_dec(skip_start);
}
}
- }
- else // assume decimal
- {
- if(ne.len == skip_start)
- return ne.first(0);
- for(size_t i = skip_start; i < ne.len; ++i)
+ else // starts with 0. is it 0x, 0b or 0o?
{
- char c = ne.str[i];
- if((c < '0' || c > '9') && (c != '.' && c != 'e' && c != 'E'))
- {
- if(c == '-' || c == '+')
- {
- // we can also have a sign for the exponent
- if(i > 1 && (ne[i-1] == 'e' || ne[i-1] == 'E'))
- {
- continue;
- }
- }
- else if(i == skip_start)
- {
- if(c == 'i')
- {
- if(ne.len >= skip_start + 8 && ne.sub(skip_start, 8) == "infinity")
- return _is_delim_char(ne.str[skip_start + 8]) ? ne.first(skip_start + 8) : ne.first(0);
- else if(ne.len >= skip_start + 3 && ne.sub(skip_start, 3) == "inf")
- return _is_delim_char(ne.str[skip_start + 3]) ? ne.first(skip_start + 3) : ne.first(0);
- else
- return ne.first(0);
- }
- else if(c == 'n')
- {
- if(ne.len >= skip_start + 3 && ne.sub(skip_start, 3) == "nan")
- return _is_delim_char(ne.str[skip_start + 3]) ? ne.first(skip_start + 3) : ne.first(0);
- else
- return ne.first(0);
- }
- else
- {
- return ne.first(0);
- }
- }
- else
- {
- return _is_delim_char(c) ? ne.first(i) : ne.first(0);
- }
- }
+ const char next = ne.str[skip_start + 1];
+ // hexadecimal
+ if(next == 'x' || next == 'X')
+ return ne._first_real_span_hex(skip_start + 2);
+ // binary
+ else if(next == 'b' || next == 'B')
+ return ne._first_real_span_bin(skip_start + 2);
+ // octal
+ else if(next == 'o' || next == 'O')
+ return ne._first_real_span_oct(skip_start + 2);
+ // none of the above. may still be a decimal.
+ else
+ return ne._first_real_span_dec(skip_start); // do not skip the 0.
}
}
- return ne;
+ // less than 3 chars after the leading sign. It is either a
+ // decimal or it is not a real. (cannot be any of 0x0, etc).
+ return ne._first_real_span_dec(skip_start);
}
/** true if the character is a delimiter character *at the end* */
- static constexpr C4_ALWAYS_INLINE bool _is_delim_char(char c) noexcept
+ static constexpr C4_ALWAYS_INLINE C4_CONST bool _is_delim_char(char c) noexcept
{
- return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == '\0'
+ return c == ' ' || c == '\n'
|| c == ']' || c == ')' || c == '}'
- || c == ',' || c == ';';
+ || c == ',' || c == ';' || c == '\r' || c == '\t' || c == '\0';
}
/** true if the character is in [0-9a-fA-F] */
- static constexpr C4_ALWAYS_INLINE bool _is_hex_char(char c) noexcept
+ static constexpr C4_ALWAYS_INLINE C4_CONST bool _is_hex_char(char c) noexcept
{
return (c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F');
}
- /** true if the character is in [0-9a-fA-F] */
- static constexpr C4_ALWAYS_INLINE bool _is_oct_char(char c) noexcept
+ C4_NO_INLINE C4_PURE basic_substring _word_follows(size_t pos, csubstr word) const noexcept
{
- return (c >= '0' && c <= '7');
+ size_t posend = pos + word.len;
+ if(len >= posend && sub(pos, word.len) == word)
+ if(len == posend || _is_delim_char(str[posend]))
+ return first(posend);
+ return first(0);
+ }
+
+ // this function is declared inside the class to avoid a VS error with __declspec(dllimport)
+ C4_NO_INLINE C4_PURE basic_substring _first_real_span_dec(size_t pos) const noexcept
+ {
+ bool intchars = false;
+ bool fracchars = false;
+ bool powchars;
+ // integral part
+ for( ; pos < len; ++pos)
+ {
+ const char c = str[pos];
+ if(c >= '0' && c <= '9')
+ {
+ intchars = true;
+ }
+ else if(c == '.')
+ {
+ ++pos;
+ goto fractional_part_dec;
+ }
+ else if(c == 'e' || c == 'E')
+ {
+ ++pos;
+ goto power_part_dec;
+ }
+ else if(_is_delim_char(c))
+ {
+ return intchars ? first(pos) : first(0);
+ }
+ else
+ {
+ return first(0);
+ }
+ }
+ // no . or p were found; this is either an integral number
+ // or not a number at all
+ return intchars ?
+ *this :
+ first(0);
+ fractional_part_dec:
+ C4_ASSERT(pos > 0);
+ C4_ASSERT(str[pos - 1] == '.');
+ for( ; pos < len; ++pos)
+ {
+ const char c = str[pos];
+ if(c >= '0' && c <= '9')
+ {
+ fracchars = true;
+ }
+ else if(c == 'e' || c == 'E')
+ {
+ ++pos;
+ goto power_part_dec;
+ }
+ else if(_is_delim_char(c))
+ {
+ return intchars || fracchars ? first(pos) : first(0);
+ }
+ else
+ {
+ return first(0);
+ }
+ }
+ return intchars || fracchars ?
+ *this :
+ first(0);
+ power_part_dec:
+ C4_ASSERT(pos > 0);
+ C4_ASSERT(str[pos - 1] == 'e' || str[pos - 1] == 'E');
+ // either a + or a - is expected here, followed by more chars.
+ // also, using (pos+1) in this check will cause an early
+ // return when no more chars follow the sign.
+ if(len <= (pos+1) || ((!intchars) && (!fracchars)))
+ return first(0);
+ ++pos; // this was the sign.
+ // ... so the (pos+1) ensures that we enter the loop and
+ // hence that there exist chars in the power part
+ powchars = false;
+ for( ; pos < len; ++pos)
+ {
+ const char c = str[pos];
+ if(c >= '0' && c <= '9')
+ powchars = true;
+ else if(powchars && _is_delim_char(c))
+ return first(pos);
+ else
+ return first(0);
+ }
+ return *this;
+ }
+
+ // this function is declared inside the class to avoid a VS error with __declspec(dllimport)
+ C4_NO_INLINE C4_PURE basic_substring _first_real_span_hex(size_t pos) const noexcept
+ {
+ bool intchars = false;
+ bool fracchars = false;
+ bool powchars;
+ // integral part
+ for( ; pos < len; ++pos)
+ {
+ const char c = str[pos];
+ if(_is_hex_char(c))
+ {
+ intchars = true;
+ }
+ else if(c == '.')
+ {
+ ++pos;
+ goto fractional_part_hex;
+ }
+ else if(c == 'p' || c == 'P')
+ {
+ ++pos;
+ goto power_part_hex;
+ }
+ else if(_is_delim_char(c))
+ {
+ return intchars ? first(pos) : first(0);
+ }
+ else
+ {
+ return first(0);
+ }
+ }
+ // no . or p were found; this is either an integral number
+ // or not a number at all
+ return intchars ?
+ *this :
+ first(0);
+ fractional_part_hex:
+ C4_ASSERT(pos > 0);
+ C4_ASSERT(str[pos - 1] == '.');
+ for( ; pos < len; ++pos)
+ {
+ const char c = str[pos];
+ if(_is_hex_char(c))
+ {
+ fracchars = true;
+ }
+ else if(c == 'p' || c == 'P')
+ {
+ ++pos;
+ goto power_part_hex;
+ }
+ else if(_is_delim_char(c))
+ {
+ return intchars || fracchars ? first(pos) : first(0);
+ }
+ else
+ {
+ return first(0);
+ }
+ }
+ return intchars || fracchars ?
+ *this :
+ first(0);
+ power_part_hex:
+ C4_ASSERT(pos > 0);
+ C4_ASSERT(str[pos - 1] == 'p' || str[pos - 1] == 'P');
+ // either a + or a - is expected here, followed by more chars.
+ // also, using (pos+1) in this check will cause an early
+ // return when no more chars follow the sign.
+ if(len <= (pos+1) || (str[pos] != '+' && str[pos] != '-') || ((!intchars) && (!fracchars)))
+ return first(0);
+ ++pos; // this was the sign.
+ // ... so the (pos+1) ensures that we enter the loop and
+ // hence that there exist chars in the power part
+ powchars = false;
+ for( ; pos < len; ++pos)
+ {
+ const char c = str[pos];
+ if(c >= '0' && c <= '9')
+ powchars = true;
+ else if(powchars && _is_delim_char(c))
+ return first(pos);
+ else
+ return first(0);
+ }
+ return *this;
+ }
+
+ // this function is declared inside the class to avoid a VS error with __declspec(dllimport)
+ C4_NO_INLINE C4_PURE basic_substring _first_real_span_bin(size_t pos) const noexcept
+ {
+ bool intchars = false;
+ bool fracchars = false;
+ bool powchars;
+ // integral part
+ for( ; pos < len; ++pos)
+ {
+ const char c = str[pos];
+ if(c == '0' || c == '1')
+ {
+ intchars = true;
+ }
+ else if(c == '.')
+ {
+ ++pos;
+ goto fractional_part_bin;
+ }
+ else if(c == 'p' || c == 'P')
+ {
+ ++pos;
+ goto power_part_bin;
+ }
+ else if(_is_delim_char(c))
+ {
+ return intchars ? first(pos) : first(0);
+ }
+ else
+ {
+ return first(0);
+ }
+ }
+ // no . or p were found; this is either an integral number
+ // or not a number at all
+ return intchars ?
+ *this :
+ first(0);
+ fractional_part_bin:
+ C4_ASSERT(pos > 0);
+ C4_ASSERT(str[pos - 1] == '.');
+ for( ; pos < len; ++pos)
+ {
+ const char c = str[pos];
+ if(c == '0' || c == '1')
+ {
+ fracchars = true;
+ }
+ else if(c == 'p' || c == 'P')
+ {
+ ++pos;
+ goto power_part_bin;
+ }
+ else if(_is_delim_char(c))
+ {
+ return intchars || fracchars ? first(pos) : first(0);
+ }
+ else
+ {
+ return first(0);
+ }
+ }
+ return intchars || fracchars ?
+ *this :
+ first(0);
+ power_part_bin:
+ C4_ASSERT(pos > 0);
+ C4_ASSERT(str[pos - 1] == 'p' || str[pos - 1] == 'P');
+ // either a + or a - is expected here, followed by more chars.
+ // also, using (pos+1) in this check will cause an early
+ // return when no more chars follow the sign.
+ if(len <= (pos+1) || (str[pos] != '+' && str[pos] != '-') || ((!intchars) && (!fracchars)))
+ return first(0);
+ ++pos; // this was the sign.
+ // ... so the (pos+1) ensures that we enter the loop and
+ // hence that there exist chars in the power part
+ powchars = false;
+ for( ; pos < len; ++pos)
+ {
+ const char c = str[pos];
+ if(c >= '0' && c <= '9')
+ powchars = true;
+ else if(powchars && _is_delim_char(c))
+ return first(pos);
+ else
+ return first(0);
+ }
+ return *this;
+ }
+
+ // this function is declared inside the class to avoid a VS error with __declspec(dllimport)
+ C4_NO_INLINE C4_PURE basic_substring _first_real_span_oct(size_t pos) const noexcept
+ {
+ bool intchars = false;
+ bool fracchars = false;
+ bool powchars;
+ // integral part
+ for( ; pos < len; ++pos)
+ {
+ const char c = str[pos];
+ if(c >= '0' && c <= '7')
+ {
+ intchars = true;
+ }
+ else if(c == '.')
+ {
+ ++pos;
+ goto fractional_part_oct;
+ }
+ else if(c == 'p' || c == 'P')
+ {
+ ++pos;
+ goto power_part_oct;
+ }
+ else if(_is_delim_char(c))
+ {
+ return intchars ? first(pos) : first(0);
+ }
+ else
+ {
+ return first(0);
+ }
+ }
+ // no . or p were found; this is either an integral number
+ // or not a number at all
+ return intchars ?
+ *this :
+ first(0);
+ fractional_part_oct:
+ C4_ASSERT(pos > 0);
+ C4_ASSERT(str[pos - 1] == '.');
+ for( ; pos < len; ++pos)
+ {
+ const char c = str[pos];
+ if(c >= '0' && c <= '7')
+ {
+ fracchars = true;
+ }
+ else if(c == 'p' || c == 'P')
+ {
+ ++pos;
+ goto power_part_oct;
+ }
+ else if(_is_delim_char(c))
+ {
+ return intchars || fracchars ? first(pos) : first(0);
+ }
+ else
+ {
+ return first(0);
+ }
+ }
+ return intchars || fracchars ?
+ *this :
+ first(0);
+ power_part_oct:
+ C4_ASSERT(pos > 0);
+ C4_ASSERT(str[pos - 1] == 'p' || str[pos - 1] == 'P');
+ // either a + or a - is expected here, followed by more chars.
+ // also, using (pos+1) in this check will cause an early
+ // return when no more chars follow the sign.
+ if(len <= (pos+1) || (str[pos] != '+' && str[pos] != '-') || ((!intchars) && (!fracchars)))
+ return first(0);
+ ++pos; // this was the sign.
+ // ... so the (pos+1) ensures that we enter the loop and
+ // hence that there exist chars in the power part
+ powchars = false;
+ for( ; pos < len; ++pos)
+ {
+ const char c = str[pos];
+ if(c >= '0' && c <= '9')
+ powchars = true;
+ else if(powchars && _is_delim_char(c))
+ return first(pos);
+ else
+ return first(0);
+ }
+ return *this;
}
/** @} */
@@ -6265,7 +7059,11 @@ public:
num = num != npos ? num : len - ifirst;
num = num < that.len ? num : that.len;
C4_ASSERT(ifirst + num >= 0 && ifirst + num <= len);
- memcpy(str + sizeof(C) * ifirst, that.str, sizeof(C) * num);
+ // calling memcpy with null strings is undefined behavior
+ // and will wreak havoc in calling code's branches.
+ // see https://github.com/biojppm/rapidyaml/pull/264#issuecomment-1262133637
+ if(num)
+ memcpy(str + sizeof(C) * ifirst, that.str, sizeof(C) * num);
}
public:
@@ -6383,7 +7181,7 @@ public:
{ \
C4_ASSERT((last) >= (first)); \
size_t num = static_cast<size_t>((last) - (first)); \
- if(sz + num <= dst.len) \
+ if(num > 0 && sz + num <= dst.len) \
{ \
memcpy(dst.str + sz, first, num * sizeof(C)); \
} \
@@ -6586,44 +7384,40 @@ inline OStream& operator<< (OStream& os, basic_substring<C> s)
// fast_float by Daniel Lemire
// fast_float by João Paulo Magalhaes
-//
+
+
// with contributions from Eugene Golushkov
// with contributions from Maksim Kita
// with contributions from Marcin Wojdyr
// with contributions from Neal Richardson
// with contributions from Tim Paine
// with contributions from Fabio Pellacini
-//
-// MIT License Notice
-//
-// MIT License
-//
-// Copyright (c) 2021 The fast_float authors
-//
-// Permission is hereby granted, free of charge, to any
-// person obtaining a copy of this software and associated
-// documentation files (the "Software"), to deal in the
-// Software without restriction, including without
-// limitation the rights to use, copy, modify, merge,
-// publish, distribute, sublicense, and/or sell copies of
-// the Software, and to permit persons to whom the Software
-// is furnished to do so, subject to the following
-// conditions:
-//
-// The above copyright notice and this permission notice
-// shall be included in all copies or substantial portions
-// of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
-// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
-// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
-// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
-// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
-// IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-// DEALINGS IN THE SOFTWARE.
-//
+
+
+// Permission is hereby granted, free of charge, to any
+// person obtaining a copy of this software and associated
+// documentation files (the "Software"), to deal in the
+// Software without restriction, including without
+// limitation the rights to use, copy, modify, merge,
+// publish, distribute, sublicense, and/or sell copies of
+// the Software, and to permit persons to whom the Software
+// is furnished to do so, subject to the following
+// conditions:
+//
+// The above copyright notice and this permission notice
+// shall be included in all copies or substantial portions
+// of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
+// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
+// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
+// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
+// IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
#ifndef FASTFLOAT_FAST_FLOAT_H
#define FASTFLOAT_FAST_FLOAT_H
@@ -6688,6 +7482,7 @@ from_chars_result from_chars_advanced(const char *first, const char *last,
}
#endif // FASTFLOAT_FAST_FLOAT_H
+
#ifndef FASTFLOAT_FLOAT_COMMON_H
#define FASTFLOAT_FLOAT_COMMON_H
@@ -6697,8 +7492,6 @@ from_chars_result from_chars_advanced(const char *first, const char *last,
#include <cassert>
//included above:
//#include <cstring>
-//included above:
-//#include <type_traits>
#if (defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) \
|| defined(__amd64) || defined(__aarch64__) || defined(_M_ARM64) \
@@ -6727,16 +7520,15 @@ from_chars_result from_chars_advanced(const char *first, const char *last,
#endif
#if ((defined(_WIN32) || defined(_WIN64)) && !defined(__clang__))
-#include <intrin.h>
+//included above:
+//#include <intrin.h>
#endif
#if defined(_MSC_VER) && !defined(__clang__)
#define FASTFLOAT_VISUAL_STUDIO 1
#endif
-#if defined __BYTE_ORDER__ && defined __ORDER_BIG_ENDIAN__
-#define FASTFLOAT_IS_BIG_ENDIAN (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
-#elif defined _WIN32
+#ifdef _WIN32
#define FASTFLOAT_IS_BIG_ENDIAN 0
#else
#if defined(__APPLE__) || defined(__FreeBSD__)
@@ -6916,8 +7708,6 @@ constexpr static float powers_of_ten_float[] = {1e0, 1e1, 1e2, 1e3, 1e4, 1e5,
1e6, 1e7, 1e8, 1e9, 1e10};
template <typename T> struct binary_format {
- using equiv_uint = typename std::conditional<sizeof(T) == 4, uint32_t, uint64_t>::type;
-
static inline constexpr int mantissa_explicit_bits();
static inline constexpr int minimum_exponent();
static inline constexpr int infinite_power();
@@ -6931,9 +7721,6 @@ template <typename T> struct binary_format {
static inline constexpr int smallest_power_of_ten();
static inline constexpr T exact_power_of_ten(int64_t power);
static inline constexpr size_t max_digits();
- static inline constexpr equiv_uint exponent_mask();
- static inline constexpr equiv_uint mantissa_mask();
- static inline constexpr equiv_uint hidden_bit_mask();
};
template <> inline constexpr int binary_format<double>::mantissa_explicit_bits() {
@@ -7041,33 +7828,6 @@ template <> inline constexpr size_t binary_format<float>::max_digits() {
return 114;
}
-template <> inline constexpr binary_format<float>::equiv_uint
- binary_format<float>::exponent_mask() {
- return 0x7F800000;
-}
-template <> inline constexpr binary_format<double>::equiv_uint
- binary_format<double>::exponent_mask() {
- return 0x7FF0000000000000;
-}
-
-template <> inline constexpr binary_format<float>::equiv_uint
- binary_format<float>::mantissa_mask() {
- return 0x007FFFFF;
-}
-template <> inline constexpr binary_format<double>::equiv_uint
- binary_format<double>::mantissa_mask() {
- return 0x000FFFFFFFFFFFFF;
-}
-
-template <> inline constexpr binary_format<float>::equiv_uint
- binary_format<float>::hidden_bit_mask() {
- return 0x00800000;
-}
-template <> inline constexpr binary_format<double>::equiv_uint
- binary_format<double>::hidden_bit_mask() {
- return 0x0010000000000000;
-}
-
template<typename T>
fastfloat_really_inline void to_float(bool negative, adjusted_mantissa am, T &value) {
uint64_t word = am.mantissa;
@@ -7090,6 +7850,7 @@ fastfloat_really_inline void to_float(bool negative, adjusted_mantissa am, T &va
#endif
+
#ifndef FASTFLOAT_ASCII_NUMBER_H
#define FASTFLOAT_ASCII_NUMBER_H
@@ -7324,6 +8085,7 @@ parsed_number_string parse_number_string(const char *p, const char *pend, parse_
#endif
+
#ifndef FASTFLOAT_FAST_TABLE_H
#define FASTFLOAT_FAST_TABLE_H
@@ -8025,6 +8787,7 @@ using powers = powers_template<>;
#endif
+
#ifndef FASTFLOAT_DECIMAL_TO_BINARY_H
#define FASTFLOAT_DECIMAL_TO_BINARY_H
@@ -8221,6 +8984,7 @@ adjusted_mantissa compute_float(int64_t q, uint64_t w) noexcept {
#endif
+
#ifndef FASTFLOAT_BIGINT_H
#define FASTFLOAT_BIGINT_H
@@ -8814,6 +9578,7 @@ struct bigint {
#endif
+
#ifndef FASTFLOAT_ASCII_NUMBER_H
#define FASTFLOAT_ASCII_NUMBER_H
@@ -9049,6 +9814,7 @@ parsed_number_string parse_number_string(const char *p, const char *pend, parse_
#endif
+
#ifndef FASTFLOAT_DIGIT_COMPARISON_H
#define FASTFLOAT_DIGIT_COMPARISON_H
@@ -9096,24 +9862,40 @@ fastfloat_really_inline int32_t scientific_exponent(parsed_number_string& num) n
// this converts a native floating-point number to an extended-precision float.
template <typename T>
fastfloat_really_inline adjusted_mantissa to_extended(T value) noexcept {
- using equiv_uint = typename binary_format<T>::equiv_uint;
- constexpr equiv_uint exponent_mask = binary_format<T>::exponent_mask();
- constexpr equiv_uint mantissa_mask = binary_format<T>::mantissa_mask();
- constexpr equiv_uint hidden_bit_mask = binary_format<T>::hidden_bit_mask();
-
adjusted_mantissa am;
int32_t bias = binary_format<T>::mantissa_explicit_bits() - binary_format<T>::minimum_exponent();
- equiv_uint bits;
- ::memcpy(&bits, &value, sizeof(T));
- if ((bits & exponent_mask) == 0) {
- // denormal
- am.power2 = 1 - bias;
- am.mantissa = bits & mantissa_mask;
+ if (std::is_same<T, float>::value) {
+ constexpr uint32_t exponent_mask = 0x7F800000;
+ constexpr uint32_t mantissa_mask = 0x007FFFFF;
+ constexpr uint64_t hidden_bit_mask = 0x00800000;
+ uint32_t bits;
+ ::memcpy(&bits, &value, sizeof(T));
+ if ((bits & exponent_mask) == 0) {
+ // denormal
+ am.power2 = 1 - bias;
+ am.mantissa = bits & mantissa_mask;
+ } else {
+ // normal
+ am.power2 = int32_t((bits & exponent_mask) >> binary_format<T>::mantissa_explicit_bits());
+ am.power2 -= bias;
+ am.mantissa = (bits & mantissa_mask) | hidden_bit_mask;
+ }
} else {
- // normal
- am.power2 = int32_t((bits & exponent_mask) >> binary_format<T>::mantissa_explicit_bits());
- am.power2 -= bias;
- am.mantissa = (bits & mantissa_mask) | hidden_bit_mask;
+ constexpr uint64_t exponent_mask = 0x7FF0000000000000;
+ constexpr uint64_t mantissa_mask = 0x000FFFFFFFFFFFFF;
+ constexpr uint64_t hidden_bit_mask = 0x0010000000000000;
+ uint64_t bits;
+ ::memcpy(&bits, &value, sizeof(T));
+ if ((bits & exponent_mask) == 0) {
+ // denormal
+ am.power2 = 1 - bias;
+ am.mantissa = bits & mantissa_mask;
+ } else {
+ // normal
+ am.power2 = int32_t((bits & exponent_mask) >> binary_format<T>::mantissa_explicit_bits());
+ am.power2 -= bias;
+ am.mantissa = (bits & mantissa_mask) | hidden_bit_mask;
+ }
}
return am;
@@ -9138,7 +9920,7 @@ fastfloat_really_inline void round(adjusted_mantissa& am, callback cb) noexcept
if (-am.power2 >= mantissa_shift) {
// have a denormal float
int32_t shift = -am.power2 + 1;
- cb(am, std::min<int32_t>(shift, 64));
+ cb(am, std::min(shift, 64));
// check for round-up: if rounding-nearest carried us to the hidden bit.
am.power2 = (am.mantissa < (uint64_t(1) << binary_format<T>::mantissa_explicit_bits())) ? 0 : 1;
return;
@@ -9458,6 +10240,7 @@ inline adjusted_mantissa digit_comp(parsed_number_string& num, adjusted_mantissa
#endif
+
#ifndef FASTFLOAT_PARSE_NUMBER_H
#define FASTFLOAT_PARSE_NUMBER_H
@@ -9605,10 +10388,17 @@ from_chars_result from_chars_advanced(const char *first, const char *last,
// forward declarations for std::vector
#if defined(__GLIBCXX__) || defined(__GLIBCPP__) || defined(_MSC_VER)
+#if defined(_MSC_VER)
+__pragma(warning(push))
+__pragma(warning(disable : 4643))
+#endif
namespace std {
template<typename> class allocator;
template<typename T, typename Alloc> class vector;
} // namespace std
+#if defined(_MSC_VER)
+__pragma(warning(pop))
+#endif
#elif defined(_LIBCPP_ABI_NAMESPACE)
namespace std {
inline namespace _LIBCPP_ABI_NAMESPACE {
@@ -9707,8 +10497,8 @@ using string = basic_string<char, char_traits<char>, allocator<char>>;
namespace c4 {
-c4::substr to_substr(std::string &s);
-c4::csubstr to_csubstr(std::string const& s);
+C4_ALWAYS_INLINE c4::substr to_substr(std::string &s) noexcept;
+C4_ALWAYS_INLINE c4::csubstr to_csubstr(std::string const& s) noexcept;
bool operator== (c4::csubstr ss, std::string const& s);
bool operator!= (c4::csubstr ss, std::string const& s);
@@ -9805,6 +10595,10 @@ bool from_chars(c4::csubstr buf, std::string * s);
* // Read a value from the string, which must be
* // trimmed to the value (ie, no leading/trailing whitespace).
* // return true if the conversion succeeded.
+ * // There is no check for overflow; the value wraps around in a way similar
+ * // to the standard C/C++ overflow behavior. For example,
+ * // from_chars<int8_t>("128", &val) returns true and val will be
+ * // set tot 0.
* template<class T> bool c4::from_chars(csubstr buf, T * C4_RESTRICT val);
*
*
@@ -9870,44 +10664,61 @@ bool from_chars(c4::csubstr buf, std::string * s);
#ifndef C4CORE_NO_FAST_FLOAT
- C4_SUPPRESS_WARNING_GCC_WITH_PUSH("-Wsign-conversion")
- C4_SUPPRESS_WARNING_GCC("-Warray-bounds")
-#if __GNUC__ >= 5
- C4_SUPPRESS_WARNING_GCC("-Wshift-count-overflow")
-#endif
-// amalgamate: removed include of
-// https://github.com/biojppm/c4core/src/c4/ext/fast_float.hpp
-//# include "c4/ext/fast_float.hpp"
-#if !defined(C4_EXT_FAST_FLOAT_HPP_) && !defined(_C4_EXT_FAST_FLOAT_HPP_)
-#error "amalgamate: file c4/ext/fast_float.hpp must have been included at this point"
-#endif /* C4_EXT_FAST_FLOAT_HPP_ */
-
- C4_SUPPRESS_WARNING_GCC_POP
-# define C4CORE_HAVE_FAST_FLOAT 1
-# define C4CORE_HAVE_STD_FROMCHARS 0
# if (C4_CPP >= 17)
# if defined(_MSC_VER)
-# if (C4_MSVC_VERSION >= C4_MSVC_VERSION_2019)
+# if (C4_MSVC_VERSION >= C4_MSVC_VERSION_2019) // VS2017 and lower do not have these macros
# include <charconv>
# define C4CORE_HAVE_STD_TOCHARS 1
+# define C4CORE_HAVE_STD_FROMCHARS 0 // prefer fast_float with MSVC
+# define C4CORE_HAVE_FAST_FLOAT 1
# else
# define C4CORE_HAVE_STD_TOCHARS 0
+# define C4CORE_HAVE_STD_FROMCHARS 0
+# define C4CORE_HAVE_FAST_FLOAT 1
# endif
-# else // VS2017 and lower do not have these macros
-# if __has_include(<charconv>) && __cpp_lib_to_chars
-# define C4CORE_HAVE_STD_TOCHARS 1
+# else
+# if __has_include(<charconv>)
//included above:
//# include <charconv>
+# if defined(__cpp_lib_to_chars)
+# define C4CORE_HAVE_STD_TOCHARS 1
+# define C4CORE_HAVE_STD_FROMCHARS 0 // glibc uses fast_float internally
+# define C4CORE_HAVE_FAST_FLOAT 1
+# else
+# define C4CORE_HAVE_STD_TOCHARS 0
+# define C4CORE_HAVE_STD_FROMCHARS 0
+# define C4CORE_HAVE_FAST_FLOAT 1
+# endif
# else
# define C4CORE_HAVE_STD_TOCHARS 0
+# define C4CORE_HAVE_STD_FROMCHARS 0
+# define C4CORE_HAVE_FAST_FLOAT 1
# endif
# endif
# else
# define C4CORE_HAVE_STD_TOCHARS 0
+# define C4CORE_HAVE_STD_FROMCHARS 0
+# define C4CORE_HAVE_FAST_FLOAT 1
+# endif
+# if C4CORE_HAVE_FAST_FLOAT
+ C4_SUPPRESS_WARNING_GCC_WITH_PUSH("-Wsign-conversion")
+ C4_SUPPRESS_WARNING_GCC("-Warray-bounds")
+# if __GNUC__ >= 5
+ C4_SUPPRESS_WARNING_GCC("-Wshift-count-overflow")
+# endif
+// amalgamate: removed include of
+// https://github.com/biojppm/c4core/src/c4/ext/fast_float.hpp
+//# include "c4/ext/fast_float.hpp"
+#if !defined(C4_EXT_FAST_FLOAT_HPP_) && !defined(_C4_EXT_FAST_FLOAT_HPP_)
+#error "amalgamate: file c4/ext/fast_float.hpp must have been included at this point"
+#endif /* C4_EXT_FAST_FLOAT_HPP_ */
+
+ C4_SUPPRESS_WARNING_GCC_POP
# endif
#elif (C4_CPP >= 17)
+# define C4CORE_HAVE_FAST_FLOAT 0
# if defined(_MSC_VER)
-# if (C4_MSVC_VERSION >= C4_MSVC_VERSION_2019)
+# if (C4_MSVC_VERSION >= C4_MSVC_VERSION_2019) // VS2017 and lower do not have these macros
//included above:
//# include <charconv>
# define C4CORE_HAVE_STD_TOCHARS 1
@@ -9916,12 +10727,17 @@ bool from_chars(c4::csubstr buf, std::string * s);
# define C4CORE_HAVE_STD_TOCHARS 0
# define C4CORE_HAVE_STD_FROMCHARS 0
# endif
-# else // VS2017 and lower do not have these macros
-# if __has_include(<charconv>) && __cpp_lib_to_chars
-# define C4CORE_HAVE_STD_TOCHARS 1
-# define C4CORE_HAVE_STD_FROMCHARS 1
+# else
+# if __has_include(<charconv>)
//included above:
//# include <charconv>
+# if defined(__cpp_lib_to_chars)
+# define C4CORE_HAVE_STD_TOCHARS 1
+# define C4CORE_HAVE_STD_FROMCHARS 1 // glibc uses fast_float internally
+# else
+# define C4CORE_HAVE_STD_TOCHARS 0
+# define C4CORE_HAVE_STD_FROMCHARS 0
+# endif
# else
# define C4CORE_HAVE_STD_TOCHARS 0
# define C4CORE_HAVE_STD_FROMCHARS 0
@@ -9930,10 +10746,11 @@ bool from_chars(c4::csubstr buf, std::string * s);
#else
# define C4CORE_HAVE_STD_TOCHARS 0
# define C4CORE_HAVE_STD_FROMCHARS 0
+# define C4CORE_HAVE_FAST_FLOAT 0
#endif
-#if !C4CORE_HAVE_STD_FROMCHARS && !defined(C4CORE_HAVE_FAST_FLOAT)
+#if !C4CORE_HAVE_STD_FROMCHARS
#include <cstdio>
#endif
@@ -9959,52 +10776,33 @@ bool from_chars(c4::csubstr buf, std::string * s);
namespace c4 {
-typedef enum : uint8_t {
+#if C4CORE_HAVE_STD_TOCHARS
+/** @warning Use only the symbol. Do not rely on the type or naked value of this enum. */
+typedef enum : std::underlying_type<std::chars_format>::type {
/** print the real number in floating point format (like %f) */
- FTOA_FLOAT = 0,
+ FTOA_FLOAT = static_cast<std::underlying_type<std::chars_format>::type>(std::chars_format::fixed),
/** print the real number in scientific format (like %e) */
- FTOA_SCIENT = 1,
+ FTOA_SCIENT = static_cast<std::underlying_type<std::chars_format>::type>(std::chars_format::scientific),
/** print the real number in flexible format (like %g) */
- FTOA_FLEX = 2,
+ FTOA_FLEX = static_cast<std::underlying_type<std::chars_format>::type>(std::chars_format::general),
/** print the real number in hexadecimal format (like %a) */
- FTOA_HEXA = 3,
- _FTOA_COUNT
+ FTOA_HEXA = static_cast<std::underlying_type<std::chars_format>::type>(std::chars_format::hex),
} RealFormat_e;
+#else
+/** @warning Use only the symbol. Do not rely on the type or naked value of this enum. */
+typedef enum : char {
+ /** print the real number in floating point format (like %f) */
+ FTOA_FLOAT = 'f',
+ /** print the real number in scientific format (like %e) */
+ FTOA_SCIENT = 'e',
+ /** print the real number in flexible format (like %g) */
+ FTOA_FLEX = 'g',
+ /** print the real number in hexadecimal format (like %a) */
+ FTOA_HEXA = 'a',
+} RealFormat_e;
+#endif
-inline C4_CONSTEXPR14 char to_c_fmt(RealFormat_e f)
-{
- constexpr const char fmt[] = {
- 'f', // FTOA_FLOAT
- 'e', // FTOA_SCIENT
- 'g', // FTOA_FLEX
- 'a', // FTOA_HEXA
- };
- C4_STATIC_ASSERT(C4_COUNTOF(fmt) == _FTOA_COUNT);
- #if C4_CPP > 14
- C4_ASSERT(f < _FTOA_COUNT);
- #endif
- return fmt[f];
-}
-
-
-#if C4CORE_HAVE_STD_TOCHARS
-inline C4_CONSTEXPR14 std::chars_format to_std_fmt(RealFormat_e f)
-{
- constexpr const std::chars_format fmt[] = {
- std::chars_format::fixed, // FTOA_FLOAT
- std::chars_format::scientific, // FTOA_SCIENT
- std::chars_format::general, // FTOA_FLEX
- std::chars_format::hex, // FTOA_HEXA
- };
- C4_STATIC_ASSERT(C4_COUNTOF(fmt) == _FTOA_COUNT);
- #if C4_CPP >= 14
- C4_ASSERT(f < _FTOA_COUNT);
- #endif
- return fmt[f];
-}
-#endif // C4CORE_HAVE_STD_TOCHARS
-
/** in some platforms, int,unsigned int
* are not any of int8_t...int64_t and
* long,unsigned long are not any of uint8_t...uint64_t */
@@ -10046,105 +10844,494 @@ struct is_fixed_length
# endif
#endif
-// Helper macros, undefined below
+namespace detail {
+
+/* python command to get the values below:
+def dec(v):
+ return str(v)
+for bits in (8, 16, 32, 64):
+ imin, imax, umax = (-(1 << (bits - 1))), (1 << (bits - 1)) - 1, (1 << bits) - 1
+ for vname, v in (("imin", imin), ("imax", imax), ("umax", umax)):
+ for f in (bin, oct, dec, hex):
+ print(f"{bits}b: {vname}={v} {f.__name__}: len={len(f(v)):2d}: {v} {f(v)}")
+*/
+
+// do not use the type as the template argument because in some
+// platforms long!=int32 and long!=int64. Just use the numbytes
+// which is more generic and spares lengthy SFINAE code.
+template<size_t num_bytes, bool is_signed> struct charconv_digits_;
+template<class T> using charconv_digits = charconv_digits_<sizeof(T), std::is_signed<T>::value>;
+
+template<> struct charconv_digits_<1u, true> // int8_t
+{
+ enum : size_t {
+ maxdigits_bin = 1 + 2 + 8, // -128==-0b10000000
+ maxdigits_oct = 1 + 2 + 3, // -128==-0o200
+ maxdigits_dec = 1 + 3, // -128
+ maxdigits_hex = 1 + 2 + 2, // -128==-0x80
+ maxdigits_bin_nopfx = 8, // -128==-0b10000000
+ maxdigits_oct_nopfx = 3, // -128==-0o200
+ maxdigits_dec_nopfx = 3, // -128
+ maxdigits_hex_nopfx = 2, // -128==-0x80
+ };
+ // min values without sign!
+ static constexpr csubstr min_value_dec() noexcept { return csubstr("128"); }
+ static constexpr csubstr min_value_hex() noexcept { return csubstr("80"); }
+ static constexpr csubstr min_value_oct() noexcept { return csubstr("200"); }
+ static constexpr csubstr min_value_bin() noexcept { return csubstr("10000000"); }
+ static constexpr csubstr max_value_dec() noexcept { return csubstr("127"); }
+ static constexpr bool is_oct_overflow(csubstr str) noexcept { return !((str.len < 3) || (str.len == 3 && str[0] <= '1')); }
+};
+template<> struct charconv_digits_<1u, false> // uint8_t
+{
+ enum : size_t {
+ maxdigits_bin = 2 + 8, // 255 0b11111111
+ maxdigits_oct = 2 + 3, // 255 0o377
+ maxdigits_dec = 3, // 255
+ maxdigits_hex = 2 + 2, // 255 0xff
+ maxdigits_bin_nopfx = 8, // 255 0b11111111
+ maxdigits_oct_nopfx = 3, // 255 0o377
+ maxdigits_dec_nopfx = 3, // 255
+ maxdigits_hex_nopfx = 2, // 255 0xff
+ };
+ static constexpr csubstr max_value_dec() noexcept { return csubstr("255"); }
+ static constexpr bool is_oct_overflow(csubstr str) noexcept { return !((str.len < 3) || (str.len == 3 && str[0] <= '3')); }
+};
+template<> struct charconv_digits_<2u, true> // int16_t
+{
+ enum : size_t {
+ maxdigits_bin = 1 + 2 + 16, // -32768 -0b1000000000000000
+ maxdigits_oct = 1 + 2 + 6, // -32768 -0o100000
+ maxdigits_dec = 1 + 5, // -32768 -32768
+ maxdigits_hex = 1 + 2 + 4, // -32768 -0x8000
+ maxdigits_bin_nopfx = 16, // -32768 -0b1000000000000000
+ maxdigits_oct_nopfx = 6, // -32768 -0o100000
+ maxdigits_dec_nopfx = 5, // -32768 -32768
+ maxdigits_hex_nopfx = 4, // -32768 -0x8000
+ };
+ // min values without sign!
+ static constexpr csubstr min_value_dec() noexcept { return csubstr("32768"); }
+ static constexpr csubstr min_value_hex() noexcept { return csubstr("8000"); }
+ static constexpr csubstr min_value_oct() noexcept { return csubstr("100000"); }
+ static constexpr csubstr min_value_bin() noexcept { return csubstr("1000000000000000"); }
+ static constexpr csubstr max_value_dec() noexcept { return csubstr("32767"); }
+ static constexpr bool is_oct_overflow(csubstr str) noexcept { return !((str.len < 6)); }
+};
+template<> struct charconv_digits_<2u, false> // uint16_t
+{
+ enum : size_t {
+ maxdigits_bin = 2 + 16, // 65535 0b1111111111111111
+ maxdigits_oct = 2 + 6, // 65535 0o177777
+ maxdigits_dec = 6, // 65535 65535
+ maxdigits_hex = 2 + 4, // 65535 0xffff
+ maxdigits_bin_nopfx = 16, // 65535 0b1111111111111111
+ maxdigits_oct_nopfx = 6, // 65535 0o177777
+ maxdigits_dec_nopfx = 6, // 65535 65535
+ maxdigits_hex_nopfx = 4, // 65535 0xffff
+ };
+ static constexpr csubstr max_value_dec() noexcept { return csubstr("65535"); }
+ static constexpr bool is_oct_overflow(csubstr str) noexcept { return !((str.len < 6) || (str.len == 6 && str[0] <= '1')); }
+};
+template<> struct charconv_digits_<4u, true> // int32_t
+{
+ enum : size_t {
+ maxdigits_bin = 1 + 2 + 32, // len=35: -2147483648 -0b10000000000000000000000000000000
+ maxdigits_oct = 1 + 2 + 11, // len=14: -2147483648 -0o20000000000
+ maxdigits_dec = 1 + 10, // len=11: -2147483648 -2147483648
+ maxdigits_hex = 1 + 2 + 8, // len=11: -2147483648 -0x80000000
+ maxdigits_bin_nopfx = 32, // len=35: -2147483648 -0b10000000000000000000000000000000
+ maxdigits_oct_nopfx = 11, // len=14: -2147483648 -0o20000000000
+ maxdigits_dec_nopfx = 10, // len=11: -2147483648 -2147483648
+ maxdigits_hex_nopfx = 8, // len=11: -2147483648 -0x80000000
+ };
+ // min values without sign!
+ static constexpr csubstr min_value_dec() noexcept { return csubstr("2147483648"); }
+ static constexpr csubstr min_value_hex() noexcept { return csubstr("80000000"); }
+ static constexpr csubstr min_value_oct() noexcept { return csubstr("20000000000"); }
+ static constexpr csubstr min_value_bin() noexcept { return csubstr("10000000000000000000000000000000"); }
+ static constexpr csubstr max_value_dec() noexcept { return csubstr("2147483647"); }
+ static constexpr bool is_oct_overflow(csubstr str) noexcept { return !((str.len < 11) || (str.len == 11 && str[0] <= '1')); }
+};
+template<> struct charconv_digits_<4u, false> // uint32_t
+{
+ enum : size_t {
+ maxdigits_bin = 2 + 32, // len=34: 4294967295 0b11111111111111111111111111111111
+ maxdigits_oct = 2 + 11, // len=13: 4294967295 0o37777777777
+ maxdigits_dec = 10, // len=10: 4294967295 4294967295
+ maxdigits_hex = 2 + 8, // len=10: 4294967295 0xffffffff
+ maxdigits_bin_nopfx = 32, // len=34: 4294967295 0b11111111111111111111111111111111
+ maxdigits_oct_nopfx = 11, // len=13: 4294967295 0o37777777777
+ maxdigits_dec_nopfx = 10, // len=10: 4294967295 4294967295
+ maxdigits_hex_nopfx = 8, // len=10: 4294967295 0xffffffff
+ };
+ static constexpr csubstr max_value_dec() noexcept { return csubstr("4294967295"); }
+ static constexpr bool is_oct_overflow(csubstr str) noexcept { return !((str.len < 11) || (str.len == 11 && str[0] <= '3')); }
+};
+template<> struct charconv_digits_<8u, true> // int32_t
+{
+ enum : size_t {
+ maxdigits_bin = 1 + 2 + 64, // len=67: -9223372036854775808 -0b1000000000000000000000000000000000000000000000000000000000000000
+ maxdigits_oct = 1 + 2 + 22, // len=25: -9223372036854775808 -0o1000000000000000000000
+ maxdigits_dec = 1 + 19, // len=20: -9223372036854775808 -9223372036854775808
+ maxdigits_hex = 1 + 2 + 16, // len=19: -9223372036854775808 -0x8000000000000000
+ maxdigits_bin_nopfx = 64, // len=67: -9223372036854775808 -0b1000000000000000000000000000000000000000000000000000000000000000
+ maxdigits_oct_nopfx = 22, // len=25: -9223372036854775808 -0o1000000000000000000000
+ maxdigits_dec_nopfx = 19, // len=20: -9223372036854775808 -9223372036854775808
+ maxdigits_hex_nopfx = 16, // len=19: -9223372036854775808 -0x8000000000000000
+ };
+ static constexpr csubstr min_value_dec() noexcept { return csubstr("9223372036854775808"); }
+ static constexpr csubstr min_value_hex() noexcept { return csubstr("8000000000000000"); }
+ static constexpr csubstr min_value_oct() noexcept { return csubstr("1000000000000000000000"); }
+ static constexpr csubstr min_value_bin() noexcept { return csubstr("1000000000000000000000000000000000000000000000000000000000000000"); }
+ static constexpr csubstr max_value_dec() noexcept { return csubstr("9223372036854775807"); }
+ static constexpr bool is_oct_overflow(csubstr str) noexcept { return !((str.len < 22)); }
+};
+template<> struct charconv_digits_<8u, false>
+{
+ enum : size_t {
+ maxdigits_bin = 2 + 64, // len=66: 18446744073709551615 0b1111111111111111111111111111111111111111111111111111111111111111
+ maxdigits_oct = 2 + 22, // len=24: 18446744073709551615 0o1777777777777777777777
+ maxdigits_dec = 20, // len=20: 18446744073709551615 18446744073709551615
+ maxdigits_hex = 2 + 16, // len=18: 18446744073709551615 0xffffffffffffffff
+ maxdigits_bin_nopfx = 64, // len=66: 18446744073709551615 0b1111111111111111111111111111111111111111111111111111111111111111
+ maxdigits_oct_nopfx = 22, // len=24: 18446744073709551615 0o1777777777777777777777
+ maxdigits_dec_nopfx = 20, // len=20: 18446744073709551615 18446744073709551615
+ maxdigits_hex_nopfx = 16, // len=18: 18446744073709551615 0xffffffffffffffff
+ };
+ static constexpr csubstr max_value_dec() noexcept { return csubstr("18446744073709551615"); }
+ static constexpr bool is_oct_overflow(csubstr str) noexcept { return !((str.len < 22) || (str.len == 22 && str[0] <= '1')); }
+};
+} // namespace detail
+
+
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+// Helper macros, undefined below
#define _c4append(c) { if(C4_LIKELY(pos < buf.len)) { buf.str[pos++] = static_cast<char>(c); } else { ++pos; } }
#define _c4appendhex(i) { if(C4_LIKELY(pos < buf.len)) { buf.str[pos++] = hexchars[i]; } else { ++pos; } }
+/** @name digits_dec return the number of digits required to encode a
+ * decimal number.
+ *
+ * @note At first sight this code may look heavily branchy and
+ * therefore inefficient. However, measurements revealed this to be
+ * the fastest among the alternatives.
+ *
+ * @see https://github.com/biojppm/c4core/pull/77 */
+/** @{ */
+
+template<class T>
+C4_CONSTEXPR14 C4_ALWAYS_INLINE
+auto digits_dec(T v) noexcept
+ -> typename std::enable_if<sizeof(T) == 1u, unsigned>::type
+{
+ C4_STATIC_ASSERT(std::is_integral<T>::value);
+ C4_ASSERT(v >= 0);
+ return ((v >= 100) ? 3u : ((v >= 10) ? 2u : 1u));
}
-#include <iostream>
-namespace c4 {
+
+template<class T>
+C4_CONSTEXPR14 C4_ALWAYS_INLINE
+auto digits_dec(T v) noexcept
+ -> typename std::enable_if<sizeof(T) == 2u, unsigned>::type
+{
+ C4_STATIC_ASSERT(std::is_integral<T>::value);
+ C4_ASSERT(v >= 0);
+ return ((v >= 10000) ? 5u : (v >= 1000) ? 4u : (v >= 100) ? 3u : (v >= 10) ? 2u : 1u);
+}
+
+template<class T>
+C4_CONSTEXPR14 C4_ALWAYS_INLINE
+auto digits_dec(T v) noexcept
+ -> typename std::enable_if<sizeof(T) == 4u, unsigned>::type
+{
+ C4_STATIC_ASSERT(std::is_integral<T>::value);
+ C4_ASSERT(v >= 0);
+ return ((v >= 1000000000) ? 10u : (v >= 100000000) ? 9u : (v >= 10000000) ? 8u :
+ (v >= 1000000) ? 7u : (v >= 100000) ? 6u : (v >= 10000) ? 5u :
+ (v >= 1000) ? 4u : (v >= 100) ? 3u : (v >= 10) ? 2u : 1u);
+}
+
+template<class T>
+C4_CONSTEXPR14 C4_ALWAYS_INLINE
+auto digits_dec(T v) noexcept
+ -> typename std::enable_if<sizeof(T) == 8u, unsigned>::type
+{
+ // thanks @fargies!!!
+ // https://github.com/biojppm/c4core/pull/77#issuecomment-1063753568
+ C4_STATIC_ASSERT(std::is_integral<T>::value);
+ C4_ASSERT(v >= 0);
+ if(v >= 1000000000) // 10
+ {
+ if(v >= 100000000000000) // 15 [15-20] range
+ {
+ if(v >= 100000000000000000) // 18 (15 + (20 - 15) / 2)
+ {
+ if((typename std::make_unsigned<T>::type)v >= 10000000000000000000u) // 20
+ return 20u;
+ else
+ return (v >= 1000000000000000000) ? 19u : 18u;
+ }
+ else if(v >= 10000000000000000) // 17
+ return 17u;
+ else
+ return(v >= 1000000000000000) ? 16u : 15u;
+ }
+ else if(v >= 1000000000000) // 13
+ return (v >= 10000000000000) ? 14u : 13u;
+ else if(v >= 100000000000) // 12
+ return 12;
+ else
+ return(v >= 10000000000) ? 11u : 10u;
+ }
+ else if(v >= 10000) // 5 [5-9] range
+ {
+ if(v >= 10000000) // 8
+ return (v >= 100000000) ? 9u : 8u;
+ else if(v >= 1000000) // 7
+ return 7;
+ else
+ return (v >= 100000) ? 6u : 5u;
+ }
+ else if(v >= 100)
+ return (v >= 1000) ? 4u : 3u;
+ else
+ return (v >= 10) ? 2u : 1u;
+}
+
+/** @} */
+
+
+template<class T>
+C4_CONSTEXPR14 C4_ALWAYS_INLINE unsigned digits_hex(T v) noexcept
+{
+ C4_STATIC_ASSERT(std::is_integral<T>::value);
+ C4_ASSERT(v >= 0);
+ return v ? 1u + (msb((typename std::make_unsigned<T>::type)v) >> 2u) : 1u;
+}
+
+template<class T>
+C4_CONSTEXPR14 C4_ALWAYS_INLINE unsigned digits_bin(T v) noexcept
+{
+ C4_STATIC_ASSERT(std::is_integral<T>::value);
+ C4_ASSERT(v >= 0);
+ return v ? 1u + msb((typename std::make_unsigned<T>::type)v) : 1u;
+}
+
+template<class T>
+C4_CONSTEXPR14 C4_ALWAYS_INLINE unsigned digits_oct(T v_) noexcept
+{
+ // TODO: is there a better way?
+ C4_STATIC_ASSERT(std::is_integral<T>::value);
+ C4_ASSERT(v_ >= 0);
+ using U = typename
+ std::conditional<sizeof(T) <= sizeof(unsigned),
+ unsigned,
+ typename std::make_unsigned<T>::type>::type;
+ U v = (U) v_; // safe because we require v_ >= 0
+ unsigned __n = 1;
+ const unsigned __b2 = 64u;
+ const unsigned __b3 = __b2 * 8u;
+ const unsigned long __b4 = __b3 * 8u;
+ while(true)
+ {
+ if(v < 8u)
+ return __n;
+ if(v < __b2)
+ return __n + 1;
+ if(v < __b3)
+ return __n + 2;
+ if(v < __b4)
+ return __n + 3;
+ v /= (U) __b4;
+ __n += 4;
+ }
+}
+
+
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+
+namespace detail {
C4_INLINE_CONSTEXPR const char hexchars[] = "0123456789abcdef";
+C4_INLINE_CONSTEXPR const char digits0099[] =
+ "0001020304050607080910111213141516171819"
+ "2021222324252627282930313233343536373839"
+ "4041424344454647484950515253545556575859"
+ "6061626364656667686970717273747576777879"
+ "8081828384858687888990919293949596979899";
+} // namespace detail
+
+C4_SUPPRESS_WARNING_GCC_PUSH
+C4_SUPPRESS_WARNING_GCC("-Warray-bounds") // gcc has false positives here
+#if (defined(__GNUC__) && (__GNUC__ >= 7))
+C4_SUPPRESS_WARNING_GCC("-Wstringop-overflow") // gcc has false positives here
+#endif
-/** write an integer to a string in decimal format. This is the
- * lowest level (and the fastest) function to do this task.
- * @note does not accept negative numbers
- * @return the number of characters required for the string,
- * even if the string is not long enough for the result.
- * No writes are done past the end of the string. */
template<class T>
-size_t write_dec(substr buf, T v)
+C4_HOT C4_ALWAYS_INLINE
+void write_dec_unchecked(substr buf, T v, unsigned digits_v) noexcept
{
C4_STATIC_ASSERT(std::is_integral<T>::value);
C4_ASSERT(v >= 0);
- size_t pos = 0;
+ C4_ASSERT(buf.len >= digits_v);
+ C4_XASSERT(digits_v == digits_dec(v));
+ // in bm_xtoa: checkoncelog_singlediv_write2
+ while(v >= T(100))
+ {
+ const T quo = v / T(100);
+ const auto num = (v - quo * T(100)) << 1u;
+ v = quo;
+ buf.str[--digits_v] = detail::digits0099[num + 1];
+ buf.str[--digits_v] = detail::digits0099[num];
+ }
+ if(v >= T(10))
+ {
+ C4_ASSERT(digits_v == 2);
+ const auto num = v << 1u;
+ buf.str[1] = detail::digits0099[num + 1];
+ buf.str[0] = detail::digits0099[num];
+ }
+ else
+ {
+ C4_ASSERT(digits_v == 1);
+ buf.str[0] = (char)('0' + v);
+ }
+}
+
+
+template<class T>
+C4_HOT C4_ALWAYS_INLINE
+void write_hex_unchecked(substr buf, T v, unsigned digits_v) noexcept
+{
+ C4_STATIC_ASSERT(std::is_integral<T>::value);
+ C4_ASSERT(v >= 0);
+ C4_ASSERT(buf.len >= digits_v);
+ C4_XASSERT(digits_v == digits_hex(v));
do {
- _c4append('0' + (v % T(10)));
- v /= T(10);
+ buf.str[--digits_v] = detail::hexchars[v & T(15)];
+ v >>= 4;
} while(v);
- buf.reverse_range(0, pos <= buf.len ? pos : buf.len);
- return pos;
+ C4_ASSERT(digits_v == 0);
}
+template<class T>
+C4_HOT C4_ALWAYS_INLINE
+void write_oct_unchecked(substr buf, T v, unsigned digits_v) noexcept
+{
+ C4_STATIC_ASSERT(std::is_integral<T>::value);
+ C4_ASSERT(v >= 0);
+ C4_ASSERT(buf.len >= digits_v);
+ C4_XASSERT(digits_v == digits_oct(v));
+ do {
+ buf.str[--digits_v] = (char)('0' + (v & T(7)));
+ v >>= 3;
+ } while(v);
+ C4_ASSERT(digits_v == 0);
+}
+
+
+template<class T>
+C4_HOT C4_ALWAYS_INLINE
+void write_bin_unchecked(substr buf, T v, unsigned digits_v) noexcept
+{
+ C4_STATIC_ASSERT(std::is_integral<T>::value);
+ C4_ASSERT(v >= 0);
+ C4_ASSERT(buf.len >= digits_v);
+ C4_XASSERT(digits_v == digits_bin(v));
+ do {
+ buf.str[--digits_v] = (char)('0' + (v & T(1)));
+ v >>= 1;
+ } while(v);
+ C4_ASSERT(digits_v == 0);
+}
+
+
+/** write an integer to a string in decimal format. This is the
+ * lowest level (and the fastest) function to do this task.
+ * @note does not accept negative numbers
+ * @note the resulting string is NOT zero-terminated.
+ * @note it is ok to call this with an empty or too-small buffer;
+ * no writes will occur, and the required size will be returned
+ * @return the number of characters required for the buffer. */
+template<class T>
+C4_ALWAYS_INLINE size_t write_dec(substr buf, T v) noexcept
+{
+ C4_STATIC_ASSERT(std::is_integral<T>::value);
+ C4_ASSERT(v >= 0);
+ unsigned digits = digits_dec(v);
+ if(C4_LIKELY(buf.len >= digits))
+ write_dec_unchecked(buf, v, digits);
+ return digits;
+}
+
/** write an integer to a string in hexadecimal format. This is the
* lowest level (and the fastest) function to do this task.
* @note does not accept negative numbers
- * @return the number of characters required for the string,
- * even if the string is not long enough for the result.
- * No writes are done past the end of the string. */
+ * @note does not prefix with 0x
+ * @note the resulting string is NOT zero-terminated.
+ * @note it is ok to call this with an empty or too-small buffer;
+ * no writes will occur, and the required size will be returned
+ * @return the number of characters required for the buffer. */
template<class T>
-size_t write_hex(substr buf, T v)
+C4_ALWAYS_INLINE size_t write_hex(substr buf, T v) noexcept
{
C4_STATIC_ASSERT(std::is_integral<T>::value);
C4_ASSERT(v >= 0);
- size_t pos = 0;
- do {
- _c4appendhex(v & T(15));
- v >>= 4;
- } while(v);
- buf.reverse_range(0, pos <= buf.len ? pos : buf.len);
- return pos;
+ unsigned digits = digits_hex(v);
+ if(C4_LIKELY(buf.len >= digits))
+ write_hex_unchecked(buf, v, digits);
+ return digits;
}
/** write an integer to a string in octal format. This is the
* lowest level (and the fastest) function to do this task.
* @note does not accept negative numbers
* @note does not prefix with 0o
- * @return the number of characters required for the string,
- * even if the string is not long enough for the result.
- * No writes are done past the end of the string. */
+ * @note the resulting string is NOT zero-terminated.
+ * @note it is ok to call this with an empty or too-small buffer;
+ * no writes will occur, and the required size will be returned
+ * @return the number of characters required for the buffer. */
template<class T>
-size_t write_oct(substr buf, T v)
+C4_ALWAYS_INLINE size_t write_oct(substr buf, T v) noexcept
{
C4_STATIC_ASSERT(std::is_integral<T>::value);
C4_ASSERT(v >= 0);
- size_t pos = 0;
- do {
- _c4append('0' + (v & T(7)));
- v >>= 3;
- } while(v);
- buf.reverse_range(0, pos <= buf.len ? pos : buf.len);
- return pos;
+ unsigned digits = digits_oct(v);
+ if(C4_LIKELY(buf.len >= digits))
+ write_oct_unchecked(buf, v, digits);
+ return digits;
}
/** write an integer to a string in binary format. This is the
* lowest level (and the fastest) function to do this task.
* @note does not accept negative numbers
* @note does not prefix with 0b
- * @return the number of characters required for the string,
- * even if the string is not long enough for the result.
- * No writes are done past the end of the string. */
+ * @note the resulting string is NOT zero-terminated.
+ * @note it is ok to call this with an empty or too-small buffer;
+ * no writes will occur, and the required size will be returned
+ * @return the number of characters required for the buffer. */
template<class T>
-size_t write_bin(substr buf, T v)
+C4_ALWAYS_INLINE size_t write_bin(substr buf, T v) noexcept
{
C4_STATIC_ASSERT(std::is_integral<T>::value);
C4_ASSERT(v >= 0);
- size_t pos = 0;
- do {
- _c4append('0' + (v & T(1)));
- v >>= 1;
- } while(v);
- buf.reverse_range(0, pos <= buf.len ? pos : buf.len);
- return pos;
+ unsigned digits = digits_bin(v);
+ C4_ASSERT(digits > 0);
+ if(C4_LIKELY(buf.len >= digits))
+ write_bin_unchecked(buf, v, digits);
+ return digits;
}
namespace detail {
template<class U> using NumberWriter = size_t (*)(substr, U);
-/** @todo pass the writer as a template parameter */
template<class T, NumberWriter<T> writer>
-size_t write_num_digits(substr buf, T v, size_t num_digits)
+size_t write_num_digits(substr buf, T v, size_t num_digits) noexcept
{
C4_STATIC_ASSERT(std::is_integral<T>::value);
size_t ret = writer(buf, v);
@@ -10163,40 +11350,42 @@ size_t write_num_digits(substr buf, T v, size_t num_digits)
/** same as c4::write_dec(), but pad with zeroes on the left
* such that the resulting string is @p num_digits wide.
- * If the given number is wider than num_digits, then the number prevails. */
+ * If the given number is requires more than num_digits, then the number prevails. */
template<class T>
-size_t write_dec(substr buf, T val, size_t num_digits)
+C4_ALWAYS_INLINE size_t write_dec(substr buf, T val, size_t num_digits) noexcept
{
return detail::write_num_digits<T, &write_dec<T>>(buf, val, num_digits);
}
/** same as c4::write_hex(), but pad with zeroes on the left
* such that the resulting string is @p num_digits wide.
- * If the given number is wider than num_digits, then the number prevails. */
+ * If the given number is requires more than num_digits, then the number prevails. */
template<class T>
-size_t write_hex(substr buf, T val, size_t num_digits)
+C4_ALWAYS_INLINE size_t write_hex(substr buf, T val, size_t num_digits) noexcept
{
return detail::write_num_digits<T, &write_hex<T>>(buf, val, num_digits);
}
/** same as c4::write_bin(), but pad with zeroes on the left
* such that the resulting string is @p num_digits wide.
- * If the given number is wider than num_digits, then the number prevails. */
+ * If the given number is requires more than num_digits, then the number prevails. */
template<class T>
-size_t write_bin(substr buf, T val, size_t num_digits)
+C4_ALWAYS_INLINE size_t write_bin(substr buf, T val, size_t num_digits) noexcept
{
return detail::write_num_digits<T, &write_bin<T>>(buf, val, num_digits);
}
/** same as c4::write_oct(), but pad with zeroes on the left
* such that the resulting string is @p num_digits wide.
- * If the given number is wider than num_digits, then the number prevails. */
+ * If the given number is requires more than num_digits, then the number prevails. */
template<class T>
-size_t write_oct(substr buf, T val, size_t num_digits)
+C4_ALWAYS_INLINE size_t write_oct(substr buf, T val, size_t num_digits) noexcept
{
return detail::write_num_digits<T, &write_oct<T>>(buf, val, num_digits);
}
+C4_SUPPRESS_WARNING_GCC_POP
+
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
@@ -10206,11 +11395,18 @@ size_t write_oct(substr buf, T val, size_t num_digits)
* lowest level (and the fastest) function to do this task.
* @note does not accept negative numbers
* @note The string must be trimmed. Whitespace is not accepted.
- * @return true if the conversion was successful */
+ * @note the string must not be empty
+ * @note there is no check for overflow; the value wraps around
+ * in a way similar to the standard C/C++ overflow behavior.
+ * For example, `read_dec<int8_t>("128", &val)` returns true
+ * and val will be set to 0 because 127 is the max i8 value.
+ * @see overflows<T>() to find out if a number string overflows a type range
+ * @return true if the conversion was successful (no overflow check) */
template<class I>
-C4_ALWAYS_INLINE bool read_dec(csubstr s, I *C4_RESTRICT v)
+C4_ALWAYS_INLINE bool read_dec(csubstr s, I *C4_RESTRICT v) noexcept
{
C4_STATIC_ASSERT(std::is_integral<I>::value);
+ C4_ASSERT(!s.empty());
*v = 0;
for(char c : s)
{
@@ -10225,12 +11421,19 @@ C4_ALWAYS_INLINE bool read_dec(csubstr s, I *C4_RESTRICT v)
* lowest level (and the fastest) function to do this task.
* @note does not accept negative numbers
* @note does not accept leading 0x or 0X
+ * @note the string must not be empty
* @note the string must be trimmed. Whitespace is not accepted.
- * @return true if the conversion was successful */
+ * @note there is no check for overflow; the value wraps around
+ * in a way similar to the standard C/C++ overflow behavior.
+ * For example, `read_hex<int8_t>("80", &val)` returns true
+ * and val will be set to 0 because 7f is the max i8 value.
+ * @see overflows<T>() to find out if a number string overflows a type range
+ * @return true if the conversion was successful (no overflow check) */
template<class I>
-C4_ALWAYS_INLINE bool read_hex(csubstr s, I *C4_RESTRICT v)
+C4_ALWAYS_INLINE bool read_hex(csubstr s, I *C4_RESTRICT v) noexcept
{
C4_STATIC_ASSERT(std::is_integral<I>::value);
+ C4_ASSERT(!s.empty());
*v = 0;
for(char c : s)
{
@@ -10252,12 +11455,19 @@ C4_ALWAYS_INLINE bool read_hex(csubstr s, I *C4_RESTRICT v)
* lowest level (and the fastest) function to do this task.
* @note does not accept negative numbers
* @note does not accept leading 0b or 0B
+ * @note the string must not be empty
* @note the string must be trimmed. Whitespace is not accepted.
- * @return true if the conversion was successful */
+ * @note there is no check for overflow; the value wraps around
+ * in a way similar to the standard C/C++ overflow behavior.
+ * For example, `read_bin<int8_t>("10000000", &val)` returns true
+ * and val will be set to 0 because 1111111 is the max i8 value.
+ * @see overflows<T>() to find out if a number string overflows a type range
+ * @return true if the conversion was successful (no overflow check) */
template<class I>
-C4_ALWAYS_INLINE bool read_bin(csubstr s, I *C4_RESTRICT v)
+C4_ALWAYS_INLINE bool read_bin(csubstr s, I *C4_RESTRICT v) noexcept
{
C4_STATIC_ASSERT(std::is_integral<I>::value);
+ C4_ASSERT(!s.empty());
*v = 0;
for(char c : s)
{
@@ -10274,12 +11484,19 @@ C4_ALWAYS_INLINE bool read_bin(csubstr s, I *C4_RESTRICT v)
* lowest level (and the fastest) function to do this task.
* @note does not accept negative numbers
* @note does not accept leading 0o or 0O
+ * @note the string must not be empty
* @note the string must be trimmed. Whitespace is not accepted.
- * @return true if the conversion was successful */
+ * @note there is no check for overflow; the value wraps around
+ * in a way similar to the standard C/C++ overflow behavior.
+ * For example, `read_oct<int8_t>("200", &val)` returns true
+ * and val will be set to 0 because 177 is the max i8 value.
+ * @see overflows<T>() to find out if a number string overflows a type range
+ * @return true if the conversion was successful (no overflow check) */
template<class I>
-C4_ALWAYS_INLINE bool read_oct(csubstr s, I *C4_RESTRICT v)
+C4_ALWAYS_INLINE bool read_oct(csubstr s, I *C4_RESTRICT v) noexcept
{
C4_STATIC_ASSERT(std::is_integral<I>::value);
+ C4_ASSERT(!s.empty());
*v = 0;
for(char c : s)
{
@@ -10296,177 +11513,219 @@ C4_ALWAYS_INLINE bool read_oct(csubstr s, I *C4_RESTRICT v)
//-----------------------------------------------------------------------------
namespace detail {
-// do not use the type as the template argument because in some
-// platforms long!=int32 and long!=int64. Just use the numbytes
-// which is more generic and spares lengthy SFINAE code.
-template<size_t numbytes> struct itoa_min;
-template<> struct itoa_min<1>
-{
- static csubstr value_dec() { return csubstr("128"); }
- static csubstr value_hex() { return csubstr("80"); }
- static csubstr value_oct() { return csubstr("200"); }
- static csubstr value_bin() { return csubstr("10000000"); }
-};
-template<> struct itoa_min<2>
+inline size_t _itoa2buf(substr buf, size_t pos, csubstr val) noexcept
{
- static csubstr value_dec() { return csubstr("32768"); }
- static csubstr value_hex() { return csubstr("8000"); }
- static csubstr value_oct() { return csubstr("100000"); }
- static csubstr value_bin() { return csubstr("1000000000000000"); }
-};
-template<> struct itoa_min<4>
-{
- static csubstr value_dec() { return csubstr("2147483648"); }
- static csubstr value_hex() { return csubstr("80000000"); }
- static csubstr value_oct() { return csubstr("20000000000"); }
- static csubstr value_bin() { return csubstr("10000000000000000000000000000000"); }
-};
-template<> struct itoa_min<8>
-{
- static csubstr value_dec() { return csubstr("9223372036854775808"); }
- static csubstr value_hex() { return csubstr("8000000000000000"); }
- static csubstr value_oct() { return csubstr("1000000000000000000000"); }
- static csubstr value_bin() { return csubstr("1000000000000000000000000000000000000000000000000000000000000000"); }
-};
-inline size_t _itoa2buf(substr buf, size_t pos, csubstr val)
-{
- if(C4_LIKELY(pos + val.len <= buf.len))
- memcpy(buf.str + pos, val.str, val.len);
+ C4_ASSERT(pos + val.len <= buf.len);
+ memcpy(buf.str + pos, val.str, val.len);
return pos + val.len;
}
-inline size_t _itoa2bufwithdigits(substr buf, size_t pos, size_t num_digits, csubstr val)
+inline size_t _itoa2bufwithdigits(substr buf, size_t pos, size_t num_digits, csubstr val) noexcept
{
num_digits = num_digits > val.len ? num_digits - val.len : 0;
+ C4_ASSERT(num_digits + val.len <= buf.len);
for(size_t i = 0; i < num_digits; ++i)
_c4append('0');
- return _itoa2buf(buf, pos, val);
+ return detail::_itoa2buf(buf, pos, val);
}
-template<class T>
-size_t _itoadec2buf(substr buf)
+template<class I>
+C4_NO_INLINE size_t _itoadec2buf(substr buf) noexcept
{
- if(C4_LIKELY(buf.len > 0))
- {
- buf.str[0] = '-';
- return detail::_itoa2buf(buf, 1, detail::itoa_min<sizeof(T)>::value_dec());
- }
- else
- {
- return detail::_itoa2buf({}, 1, detail::itoa_min<sizeof(T)>::value_dec());
- }
- C4_UNREACHABLE();
+ using digits_type = detail::charconv_digits<I>;
+ if(C4_UNLIKELY(buf.len < digits_type::maxdigits_dec))
+ return digits_type::maxdigits_dec;
+ buf.str[0] = '-';
+ return detail::_itoa2buf(buf, 1, digits_type::min_value_dec());
}
template<class I>
-size_t _itoa2buf(substr buf, I radix)
+C4_NO_INLINE size_t _itoa2buf(substr buf, I radix) noexcept
{
+ using digits_type = detail::charconv_digits<I>;
size_t pos = 0;
- _c4append('-');
+ if(C4_LIKELY(buf.len > 0))
+ buf.str[pos++] = '-';
switch(radix)
{
case I(10):
- /*...........................*/ return _itoa2buf(buf, pos, itoa_min<sizeof(I)>::value_dec());
+ if(C4_UNLIKELY(buf.len < digits_type::maxdigits_dec))
+ return digits_type::maxdigits_dec;
+ pos =_itoa2buf(buf, pos, digits_type::min_value_dec());
+ break;
case I(16):
- _c4append('0'); _c4append('x'); return _itoa2buf(buf, pos, itoa_min<sizeof(I)>::value_hex());
+ if(C4_UNLIKELY(buf.len < digits_type::maxdigits_hex))
+ return digits_type::maxdigits_hex;
+ buf.str[pos++] = '0';
+ buf.str[pos++] = 'x';
+ pos = _itoa2buf(buf, pos, digits_type::min_value_hex());
+ break;
case I( 2):
- _c4append('0'); _c4append('b'); return _itoa2buf(buf, pos, itoa_min<sizeof(I)>::value_bin());
+ if(C4_UNLIKELY(buf.len < digits_type::maxdigits_bin))
+ return digits_type::maxdigits_bin;
+ buf.str[pos++] = '0';
+ buf.str[pos++] = 'b';
+ pos = _itoa2buf(buf, pos, digits_type::min_value_bin());
+ break;
case I( 8):
- _c4append('0'); _c4append('o'); return _itoa2buf(buf, pos, itoa_min<sizeof(I)>::value_oct());
+ if(C4_UNLIKELY(buf.len < digits_type::maxdigits_oct))
+ return digits_type::maxdigits_oct;
+ buf.str[pos++] = '0';
+ buf.str[pos++] = 'o';
+ pos = _itoa2buf(buf, pos, digits_type::min_value_oct());
+ break;
}
- C4_ERROR("unknown radix");
- return 0;
+ return pos;
}
template<class I>
-size_t _itoa2buf(substr buf, I radix, size_t num_digits)
+C4_NO_INLINE size_t _itoa2buf(substr buf, I radix, size_t num_digits) noexcept
{
+ using digits_type = detail::charconv_digits<I>;
size_t pos = 0;
- _c4append('-');
+ size_t needed_digits = 0;
+ if(C4_LIKELY(buf.len > 0))
+ buf.str[pos++] = '-';
switch(radix)
{
case I(10):
- /*...........................*/ return _itoa2bufwithdigits(buf, pos, num_digits, itoa_min<sizeof(I)>::value_dec());
+ // add 1 to account for -
+ needed_digits = num_digits+1 > digits_type::maxdigits_dec ? num_digits+1 : digits_type::maxdigits_dec;
+ if(C4_UNLIKELY(buf.len < needed_digits))
+ return needed_digits;
+ pos = _itoa2bufwithdigits(buf, pos, num_digits, digits_type::min_value_dec());
+ break;
case I(16):
- _c4append('0'); _c4append('x'); return _itoa2bufwithdigits(buf, pos, num_digits, itoa_min<sizeof(I)>::value_hex());
+ // add 3 to account for -0x
+ needed_digits = num_digits+3 > digits_type::maxdigits_hex ? num_digits+3 : digits_type::maxdigits_hex;
+ if(C4_UNLIKELY(buf.len < needed_digits))
+ return needed_digits;
+ buf.str[pos++] = '0';
+ buf.str[pos++] = 'x';
+ pos = _itoa2bufwithdigits(buf, pos, num_digits, digits_type::min_value_hex());
+ break;
case I( 2):
- _c4append('0'); _c4append('b'); return _itoa2bufwithdigits(buf, pos, num_digits, itoa_min<sizeof(I)>::value_bin());
+ // add 3 to account for -0b
+ needed_digits = num_digits+3 > digits_type::maxdigits_bin ? num_digits+3 : digits_type::maxdigits_bin;
+ if(C4_UNLIKELY(buf.len < needed_digits))
+ return needed_digits;
+ C4_ASSERT(buf.len >= digits_type::maxdigits_bin);
+ buf.str[pos++] = '0';
+ buf.str[pos++] = 'b';
+ pos = _itoa2bufwithdigits(buf, pos, num_digits, digits_type::min_value_bin());
+ break;
case I( 8):
- _c4append('0'); _c4append('o'); return _itoa2bufwithdigits(buf, pos, num_digits, itoa_min<sizeof(I)>::value_oct());
+ // add 3 to account for -0o
+ needed_digits = num_digits+3 > digits_type::maxdigits_oct ? num_digits+3 : digits_type::maxdigits_oct;
+ if(C4_UNLIKELY(buf.len < needed_digits))
+ return needed_digits;
+ C4_ASSERT(buf.len >= digits_type::maxdigits_oct);
+ buf.str[pos++] = '0';
+ buf.str[pos++] = 'o';
+ pos = _itoa2bufwithdigits(buf, pos, num_digits, digits_type::min_value_oct());
+ break;
}
- C4_ERROR("unknown radix");
- return 0;
+ return pos;
}
} // namespace detail
/** convert an integral signed decimal to a string.
- * The resulting string is NOT zero-terminated.
- * Writing stops at the buffer's end.
- * @return the number of characters needed for the result, even if the buffer size is insufficient */
+ * @note the resulting string is NOT zero-terminated.
+ * @note it is ok to call this with an empty or too-small buffer;
+ * no writes will occur, and the needed size will be returned
+ * @return the number of characters required for the buffer. */
template<class T>
-size_t itoa(substr buf, T v)
+C4_ALWAYS_INLINE size_t itoa(substr buf, T v) noexcept
{
C4_STATIC_ASSERT(std::is_signed<T>::value);
- if(v >= 0)
+ if(v >= T(0))
{
+ // write_dec() checks the buffer size, so no need to check here
return write_dec(buf, v);
}
- else
+ // when T is the min value (eg i8: -128), negating it
+ // will overflow, so treat the min as a special case
+ else if(C4_LIKELY(v != std::numeric_limits<T>::min()))
{
- if(C4_LIKELY(v != std::numeric_limits<T>::min()))
+ v = -v;
+ unsigned digits = digits_dec(v);
+ if(C4_LIKELY(buf.len >= digits + 1u))
{
- if(C4_LIKELY(buf.len > 0))
- {
- buf.str[0] = '-';
- return size_t(1) + write_dec(buf.sub(1), -v);
- }
- else
- {
- return size_t(1) + write_dec({}, -v);
- }
- C4_UNREACHABLE();
+ buf.str[0] = '-';
+ write_dec_unchecked(buf.sub(1), v, digits);
}
- else
- {
- // when T is the min value (eg i8: -128), negating it
- // will overflow. so we just use the explicit value
- return detail::_itoadec2buf<T>(buf);
- }
- C4_UNREACHABLE();
+ return digits + 1u;
}
- C4_UNREACHABLE();
+ return detail::_itoadec2buf<T>(buf);
}
/** convert an integral signed integer to a string, using a specific
* radix. The radix must be 2, 8, 10 or 16.
*
- * The resulting string is NOT zero-terminated.
- * Writing stops at the buffer's end.
- * @return the number of characters needed for the result, even if the buffer size is insufficient */
+ * @note the resulting string is NOT zero-terminated.
+ * @note it is ok to call this with an empty or too-small buffer;
+ * no writes will occur, and the needed size will be returned
+ * @return the number of characters required for the buffer. */
template<class T>
-size_t itoa(substr buf, T v, T radix)
+C4_ALWAYS_INLINE size_t itoa(substr buf, T v, T radix) noexcept
{
C4_STATIC_ASSERT(std::is_signed<T>::value);
C4_ASSERT(radix == 2 || radix == 8 || radix == 10 || radix == 16);
+ C4_SUPPRESS_WARNING_GCC_PUSH
+ #if (defined(__GNUC__) && (__GNUC__ >= 7))
+ C4_SUPPRESS_WARNING_GCC("-Wstringop-overflow") // gcc has a false positive here
+ #endif
// when T is the min value (eg i8: -128), negating it
- // will overflow
+ // will overflow, so treat the min as a special case
if(C4_LIKELY(v != std::numeric_limits<T>::min()))
{
- size_t pos = 0;
+ unsigned pos = 0;
if(v < 0)
{
v = -v;
- _c4append('-');
+ if(C4_LIKELY(buf.len > 0))
+ buf.str[pos] = '-';
+ ++pos;
}
+ unsigned digits = 0;
switch(radix)
{
- case 10:
- /*............................*/return pos + write_dec(pos < buf.len ? buf.sub(pos) : substr(), v);
- case 16:
- _c4append('0'); _c4append('x'); return pos + write_hex(pos < buf.len ? buf.sub(pos) : substr(), v);
- case 2:
- _c4append('0'); _c4append('b'); return pos + write_bin(pos < buf.len ? buf.sub(pos) : substr(), v);
- case 8:
- _c4append('0'); _c4append('o'); return pos + write_oct(pos < buf.len ? buf.sub(pos) : substr(), v);
+ case T(10):
+ digits = digits_dec(v);
+ if(C4_LIKELY(buf.len >= pos + digits))
+ write_dec_unchecked(buf.sub(pos), v, digits);
+ break;
+ case T(16):
+ digits = digits_hex(v);
+ if(C4_LIKELY(buf.len >= pos + 2u + digits))
+ {
+ buf.str[pos + 0] = '0';
+ buf.str[pos + 1] = 'x';
+ write_hex_unchecked(buf.sub(pos + 2), v, digits);
+ }
+ digits += 2u;
+ break;
+ case T(2):
+ digits = digits_bin(v);
+ if(C4_LIKELY(buf.len >= pos + 2u + digits))
+ {
+ buf.str[pos + 0] = '0';
+ buf.str[pos + 1] = 'b';
+ write_bin_unchecked(buf.sub(pos + 2), v, digits);
+ }
+ digits += 2u;
+ break;
+ case T(8):
+ digits = digits_oct(v);
+ if(C4_LIKELY(buf.len >= pos + 2u + digits))
+ {
+ buf.str[pos + 0] = '0';
+ buf.str[pos + 1] = 'o';
+ write_oct_unchecked(buf.sub(pos + 2), v, digits);
+ }
+ digits += 2u;
+ break;
}
+ return pos + digits;
}
+ C4_SUPPRESS_WARNING_GCC_POP
// when T is the min value (eg i8: -128), negating it
// will overflow
return detail::_itoa2buf<T>(buf, radix);
@@ -10474,37 +11733,77 @@ size_t itoa(substr buf, T v, T radix)
/** same as c4::itoa(), but pad with zeroes on the left such that the
- * resulting string is @p num_digits wide. The @p radix must be 2,
- * 8, 10 or 16. The resulting string is NOT zero-terminated. Writing
- * stops at the buffer's end.
+ * resulting string is @p num_digits wide, not accounting for radix
+ * prefix (0x,0o,0b). The @p radix must be 2, 8, 10 or 16.
*
- * @return the number of characters needed for the result, even if
- * the buffer size is insufficient */
+ * @note the resulting string is NOT zero-terminated.
+ * @note it is ok to call this with an empty or too-small buffer;
+ * no writes will occur, and the needed size will be returned
+ * @return the number of characters required for the buffer. */
template<class T>
-size_t itoa(substr buf, T v, T radix, size_t num_digits)
+C4_ALWAYS_INLINE size_t itoa(substr buf, T v, T radix, size_t num_digits) noexcept
{
C4_STATIC_ASSERT(std::is_signed<T>::value);
C4_ASSERT(radix == 2 || radix == 8 || radix == 10 || radix == 16);
+ C4_SUPPRESS_WARNING_GCC_PUSH
+ #if (defined(__GNUC__) && (__GNUC__ >= 7))
+ C4_SUPPRESS_WARNING_GCC("-Wstringop-overflow") // gcc has a false positive here
+ #endif
+ // when T is the min value (eg i8: -128), negating it
+ // will overflow, so treat the min as a special case
if(C4_LIKELY(v != std::numeric_limits<T>::min()))
{
- size_t pos = 0;
+ unsigned pos = 0;
if(v < 0)
{
v = -v;
- _c4append('-');
+ if(C4_LIKELY(buf.len > 0))
+ buf.str[pos] = '-';
+ ++pos;
}
+ unsigned total_digits = 0;
switch(radix)
{
- case 10:
- /*............................*/return pos + write_dec(pos < buf.len ? buf.sub(pos) : substr(), v, num_digits);
- case 16:
- _c4append('0'); _c4append('x'); return pos + write_hex(pos < buf.len ? buf.sub(pos) : substr(), v, num_digits);
- case 2:
- _c4append('0'); _c4append('b'); return pos + write_bin(pos < buf.len ? buf.sub(pos) : substr(), v, num_digits);
- case 8:
- _c4append('0'); _c4append('o'); return pos + write_oct(pos < buf.len ? buf.sub(pos) : substr(), v, num_digits);
+ case T(10):
+ total_digits = digits_dec(v);
+ total_digits = pos + (unsigned)(num_digits > total_digits ? num_digits : total_digits);
+ if(C4_LIKELY(buf.len >= total_digits))
+ write_dec(buf.sub(pos), v, num_digits);
+ break;
+ case T(16):
+ total_digits = digits_hex(v);
+ total_digits = pos + 2u + (unsigned)(num_digits > total_digits ? num_digits : total_digits);
+ if(C4_LIKELY(buf.len >= total_digits))
+ {
+ buf.str[pos + 0] = '0';
+ buf.str[pos + 1] = 'x';
+ write_hex(buf.sub(pos + 2), v, num_digits);
+ }
+ break;
+ case T(2):
+ total_digits = digits_bin(v);
+ total_digits = pos + 2u + (unsigned)(num_digits > total_digits ? num_digits : total_digits);
+ if(C4_LIKELY(buf.len >= total_digits))
+ {
+ buf.str[pos + 0] = '0';
+ buf.str[pos + 1] = 'b';
+ write_bin(buf.sub(pos + 2), v, num_digits);
+ }
+ break;
+ case T(8):
+ total_digits = digits_oct(v);
+ total_digits = pos + 2u + (unsigned)(num_digits > total_digits ? num_digits : total_digits);
+ if(C4_LIKELY(buf.len >= total_digits))
+ {
+ buf.str[pos + 0] = '0';
+ buf.str[pos + 1] = 'o';
+ write_oct(buf.sub(pos + 2), v, num_digits);
+ }
+ break;
}
+ return total_digits;
}
+ C4_SUPPRESS_WARNING_GCC_POP
// when T is the min value (eg i8: -128), negating it
// will overflow
return detail::_itoa2buf<T>(buf, radix, num_digits);
@@ -10516,67 +11815,127 @@ size_t itoa(substr buf, T v, T radix, size_t num_digits)
//-----------------------------------------------------------------------------
/** convert an integral unsigned decimal to a string.
- * The resulting string is NOT zero-terminated.
- * Writing stops at the buffer's end.
- * @return the number of characters needed for the result, even if the buffer size is insufficient */
+ *
+ * @note the resulting string is NOT zero-terminated.
+ * @note it is ok to call this with an empty or too-small buffer;
+ * no writes will occur, and the needed size will be returned
+ * @return the number of characters required for the buffer. */
template<class T>
-size_t utoa(substr buf, T v)
+C4_ALWAYS_INLINE size_t utoa(substr buf, T v) noexcept
{
C4_STATIC_ASSERT(std::is_unsigned<T>::value);
+ // write_dec() does the buffer length check, so no need to check here
return write_dec(buf, v);
}
-/** convert an integral unsigned integer to a string, using a specific radix. The radix must be 2, 8, 10 or 16.
- * The resulting string is NOT zero-terminated.
- * Writing stops at the buffer's end.
- * @return the number of characters needed for the result, even if the buffer size is insufficient */
+/** convert an integral unsigned integer to a string, using a specific
+ * radix. The radix must be 2, 8, 10 or 16.
+ *
+ * @note the resulting string is NOT zero-terminated.
+ * @note it is ok to call this with an empty or too-small buffer;
+ * no writes will occur, and the needed size will be returned
+ * @return the number of characters required for the buffer. */
template<class T>
-size_t utoa(substr buf, T v, T radix)
+C4_ALWAYS_INLINE size_t utoa(substr buf, T v, T radix) noexcept
{
C4_STATIC_ASSERT(std::is_unsigned<T>::value);
C4_ASSERT(radix == 10 || radix == 16 || radix == 2 || radix == 8);
- size_t pos = 0;
+ unsigned digits = 0;
switch(radix)
{
- case 10:
- /*............................*/return pos + write_dec(pos < buf.len ? buf.sub(pos) : substr(), v);
- case 16:
- _c4append('0'); _c4append('x'); return pos + write_hex(pos < buf.len ? buf.sub(pos) : substr(), v);
- case 2:
- _c4append('0'); _c4append('b'); return pos + write_bin(pos < buf.len ? buf.sub(pos) : substr(), v);
- case 8:
- _c4append('0'); _c4append('o'); return pos + write_oct(pos < buf.len ? buf.sub(pos) : substr(), v);
+ case T(10):
+ digits = digits_dec(v);
+ if(C4_LIKELY(buf.len >= digits))
+ write_dec_unchecked(buf, v, digits);
+ break;
+ case T(16):
+ digits = digits_hex(v);
+ if(C4_LIKELY(buf.len >= digits+2u))
+ {
+ buf.str[0] = '0';
+ buf.str[1] = 'x';
+ write_hex_unchecked(buf.sub(2), v, digits);
+ }
+ digits += 2u;
+ break;
+ case T(2):
+ digits = digits_bin(v);
+ if(C4_LIKELY(buf.len >= digits+2u))
+ {
+ buf.str[0] = '0';
+ buf.str[1] = 'b';
+ write_bin_unchecked(buf.sub(2), v, digits);
+ }
+ digits += 2u;
+ break;
+ case T(8):
+ digits = digits_oct(v);
+ if(C4_LIKELY(buf.len >= digits+2u))
+ {
+ buf.str[0] = '0';
+ buf.str[1] = 'o';
+ write_oct_unchecked(buf.sub(2), v, digits);
+ }
+ digits += 2u;
+ break;
}
- C4_UNREACHABLE();
- return substr::npos;
+ return digits;
}
/** same as c4::utoa(), but pad with zeroes on the left such that the
* resulting string is @p num_digits wide. The @p radix must be 2,
- * 8, 10 or 16. The resulting string is NOT zero-terminated. Writing
- * stops at the buffer's end.
+ * 8, 10 or 16.
*
- * @return the number of characters needed for the result, even if
- * the buffer size is insufficient */
+ * @note the resulting string is NOT zero-terminated.
+ * @note it is ok to call this with an empty or too-small buffer;
+ * no writes will occur, and the needed size will be returned
+ * @return the number of characters required for the buffer. */
template<class T>
-size_t utoa(substr buf, T v, T radix, size_t num_digits)
+C4_ALWAYS_INLINE size_t utoa(substr buf, T v, T radix, size_t num_digits) noexcept
{
C4_STATIC_ASSERT(std::is_unsigned<T>::value);
C4_ASSERT(radix == 10 || radix == 16 || radix == 2 || radix == 8);
- size_t pos = 0;
+ unsigned total_digits = 0;
switch(radix)
{
- case 10:
- /*............................*/return pos + write_dec(pos < buf.len ? buf.sub(pos) : substr(), v, num_digits);
- case 16:
- _c4append('0'); _c4append('x'); return pos + write_hex(pos < buf.len ? buf.sub(pos) : substr(), v, num_digits);
- case 2:
- _c4append('0'); _c4append('b'); return pos + write_bin(pos < buf.len ? buf.sub(pos) : substr(), v, num_digits);
- case 8:
- _c4append('0'); _c4append('o'); return pos + write_oct(pos < buf.len ? buf.sub(pos) : substr(), v, num_digits);
+ case T(10):
+ total_digits = digits_dec(v);
+ total_digits = (unsigned)(num_digits > total_digits ? num_digits : total_digits);
+ if(C4_LIKELY(buf.len >= total_digits))
+ write_dec(buf, v, num_digits);
+ break;
+ case T(16):
+ total_digits = digits_hex(v);
+ total_digits = 2u + (unsigned)(num_digits > total_digits ? num_digits : total_digits);
+ if(C4_LIKELY(buf.len >= total_digits))
+ {
+ buf.str[0] = '0';
+ buf.str[1] = 'x';
+ write_hex(buf.sub(2), v, num_digits);
+ }
+ break;
+ case T(2):
+ total_digits = digits_bin(v);
+ total_digits = 2u + (unsigned)(num_digits > total_digits ? num_digits : total_digits);
+ if(C4_LIKELY(buf.len >= total_digits))
+ {
+ buf.str[0] = '0';
+ buf.str[1] = 'b';
+ write_bin(buf.sub(2), v, num_digits);
+ }
+ break;
+ case T(8):
+ total_digits = digits_oct(v);
+ total_digits = 2u + (unsigned)(num_digits > total_digits ? num_digits : total_digits);
+ if(C4_LIKELY(buf.len >= total_digits))
+ {
+ buf.str[0] = '0';
+ buf.str[1] = 'o';
+ write_oct(buf.sub(2), v, num_digits);
+ }
+ break;
}
- C4_UNREACHABLE();
- return substr::npos;
+ return total_digits;
}
@@ -10584,12 +11943,13 @@ size_t utoa(substr buf, T v, T radix, size_t num_digits)
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-/** Convert a trimmed string to a signed integral value. The string
- * can be formatted as decimal, binary (prefix 0b or 0B), octal
+/** Convert a trimmed string to a signed integral value. The input
+ * string can be formatted as decimal, binary (prefix 0b or 0B), octal
* (prefix 0o or 0O) or hexadecimal (prefix 0x or 0X). Strings with
- * leading zeroes are considered as decimal. Every character in the
- * input string is read for the conversion; it must not contain any
- * leading or trailing whitespace.
+ * leading zeroes are considered as decimal and not octal (unlike the
+ * C/C++ convention). Every character in the input string is read for
+ * the conversion; the input string must not contain any leading or
+ * trailing whitespace.
*
* @return true if the conversion was successful.
*
@@ -10598,9 +11958,12 @@ size_t utoa(substr buf, T v, T radix, size_t num_digits)
* which case the result will wrap around the type's range.
* This is similar to native behavior.
*
+ * @note a positive sign is not accepted. ie, the string must not
+ * start with '+'
+ *
* @see atoi_first() if the string is not trimmed to the value to read. */
template<class T>
-bool atoi(csubstr str, T * C4_RESTRICT v)
+C4_ALWAYS_INLINE bool atoi(csubstr str, T * C4_RESTRICT v) noexcept
{
C4_STATIC_ASSERT(std::is_integral<T>::value);
C4_STATIC_ASSERT(std::is_signed<T>::value);
@@ -10608,70 +11971,42 @@ bool atoi(csubstr str, T * C4_RESTRICT v)
if(C4_UNLIKELY(str.len == 0))
return false;
+ C4_ASSERT(str.str[0] != '+');
+
T sign = 1;
size_t start = 0;
if(str.str[0] == '-')
{
- if(C4_UNLIKELY(str.len == 1))
+ if(C4_UNLIKELY(str.len == ++start))
return false;
- ++start;
sign = -1;
}
- if(str.str[start] != '0')
+ bool parsed_ok = true;
+ if(str.str[start] != '0') // this should be the common case, so put it first
{
- if(C4_UNLIKELY( ! read_dec(str.sub(start), v)))
- return false;
+ parsed_ok = read_dec(str.sub(start), v);
}
- else
+ else if(str.len > start + 1)
{
- if(str.len == start+1)
- {
- *v = 0; // because the first character is 0
- return true;
- }
+ // starts with 0: is it 0x, 0o, 0b?
+ const char pfx = str.str[start + 1];
+ if(pfx == 'x' || pfx == 'X')
+ parsed_ok = str.len > start + 2 && read_hex(str.sub(start + 2), v);
+ else if(pfx == 'b' || pfx == 'B')
+ parsed_ok = str.len > start + 2 && read_bin(str.sub(start + 2), v);
+ else if(pfx == 'o' || pfx == 'O')
+ parsed_ok = str.len > start + 2 && read_oct(str.sub(start + 2), v);
else
- {
- char pfx = str.str[start+1];
- if(pfx == 'x' || pfx == 'X') // hexadecimal
- {
- if(C4_UNLIKELY(str.len <= start + 2))
- return false;
- if(C4_UNLIKELY( ! read_hex(str.sub(start + 2), v)))
- return false;
- }
- else if(pfx == 'b' || pfx == 'B') // binary
- {
- if(C4_UNLIKELY(str.len <= start + 2))
- return false;
- if(C4_UNLIKELY( ! read_bin(str.sub(start + 2), v)))
- return false;
- }
- else if(pfx == 'o' || pfx == 'O') // octal
- {
- if(C4_UNLIKELY(str.len <= start + 2))
- return false;
- if(C4_UNLIKELY( ! read_oct(str.sub(start + 2), v)))
- return false;
- }
- else
- {
- // we know the first character is 0
- auto fno = str.first_not_of('0', start + 1);
- if(fno == csubstr::npos)
- {
- *v = 0;
- return true;
- }
- if(C4_UNLIKELY( ! read_dec(str.sub(fno), v)))
- {
- return false;
- }
- }
- }
+ parsed_ok = read_dec(str.sub(start + 1), v);
}
- *v *= sign;
- return true;
+ else
+ {
+ parsed_ok = read_dec(str.sub(start), v);
+ }
+ if(C4_LIKELY(parsed_ok))
+ *v *= sign;
+ return parsed_ok;
}
@@ -10682,7 +12017,7 @@ bool atoi(csubstr str, T * C4_RESTRICT v)
* @see atoi() if the string is already trimmed to the value to read.
* @see csubstr::first_int_span() */
template<class T>
-inline size_t atoi_first(csubstr str, T * C4_RESTRICT v)
+C4_ALWAYS_INLINE size_t atoi_first(csubstr str, T * C4_RESTRICT v)
{
csubstr trimmed = str.first_int_span();
if(trimmed.len == 0)
@@ -10711,60 +12046,38 @@ inline size_t atoi_first(csubstr str, T * C4_RESTRICT v)
*
* @see atou_first() if the string is not trimmed to the value to read. */
template<class T>
-bool atou(csubstr str, T * C4_RESTRICT v)
+bool atou(csubstr str, T * C4_RESTRICT v) noexcept
{
C4_STATIC_ASSERT(std::is_integral<T>::value);
if(C4_UNLIKELY(str.len == 0 || str.front() == '-'))
return false;
+ bool parsed_ok = true;
if(str.str[0] != '0')
{
- if(C4_UNLIKELY( ! read_dec(str, v)))
- return false;
+ parsed_ok = read_dec(str, v);
}
else
{
- if(str.len == 1)
+ if(str.len > 1)
{
- *v = 0; // we know the first character is 0
- return true;
+ const char pfx = str.str[1];
+ if(pfx == 'x' || pfx == 'X')
+ parsed_ok = str.len > 2 && read_hex(str.sub(2), v);
+ else if(pfx == 'b' || pfx == 'B')
+ parsed_ok = str.len > 2 && read_bin(str.sub(2), v);
+ else if(pfx == 'o' || pfx == 'O')
+ parsed_ok = str.len > 2 && read_oct(str.sub(2), v);
+ else
+ parsed_ok = read_dec(str, v);
}
else
{
- char pfx = str.str[1];
- if(pfx == 'x' || pfx == 'X') // hexadecimal
- {
- if(C4_UNLIKELY(str.len <= 2))
- return false;
- return read_hex(str.sub(2), v);
- }
- else if(pfx == 'b' || pfx == 'B') // binary
- {
- if(C4_UNLIKELY(str.len <= 2))
- return false;
- return read_bin(str.sub(2), v);
- }
- else if(pfx == 'o' || pfx == 'O') // octal
- {
- if(C4_UNLIKELY(str.len <= 2))
- return false;
- return read_oct(str.sub(2), v);
- }
- else
- {
- // we know the first character is 0
- auto fno = str.first_not_of('0');
- if(fno == csubstr::npos)
- {
- *v = 0;
- return true;
- }
- return read_dec(str.sub(fno), v);
- }
+ *v = 0; // we know the first character is 0
}
}
- return true;
+ return parsed_ok;
}
@@ -10775,7 +12088,7 @@ bool atou(csubstr str, T * C4_RESTRICT v)
* @see atou() if the string is already trimmed to the value to read.
* @see csubstr::first_uint_span() */
template<class T>
-inline size_t atou_first(csubstr str, T *v)
+C4_ALWAYS_INLINE size_t atou_first(csubstr str, T *v)
{
csubstr trimmed = str.first_uint_span();
if(trimmed.len == 0)
@@ -10798,21 +12111,209 @@ inline size_t atou_first(csubstr str, T *v)
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
+namespace detail {
+inline bool check_overflow(csubstr str, csubstr limit) noexcept
+{
+ if(str.len == limit.len)
+ {
+ for(size_t i = 0; i < limit.len; ++i)
+ {
+ if(str[i] < limit[i])
+ return false;
+ else if(str[i] > limit[i])
+ return true;
+ }
+ return false;
+ }
+ else
+ return str.len > limit.len;
+}
+} // namespace detail
+
+
+/** Test if the following string would overflow when converted to associated
+ * types.
+ * @return true if number will overflow, false if it fits (or doesn't parse)
+ */
+template<class T>
+auto overflows(csubstr str) noexcept
+ -> typename std::enable_if<std::is_unsigned<T>::value, bool>::type
+{
+ C4_STATIC_ASSERT(std::is_integral<T>::value);
+
+ if(C4_UNLIKELY(str.len == 0))
+ {
+ return false;
+ }
+ else if(str.str[0] == '0')
+ {
+ if (str.len == 1)
+ return false;
+ switch (str.str[1])
+ {
+ case 'x':
+ case 'X':
+ {
+ size_t fno = str.first_not_of('0', 2);
+ if (fno == csubstr::npos)
+ return false;
+ return !(str.len <= fno + (sizeof(T) * 2));
+ }
+ case 'b':
+ case 'B':
+ {
+ size_t fno = str.first_not_of('0', 2);
+ if (fno == csubstr::npos)
+ return false;
+ return !(str.len <= fno +(sizeof(T) * 8));
+ }
+ case 'o':
+ case 'O':
+ {
+ size_t fno = str.first_not_of('0', 2);
+ if(fno == csubstr::npos)
+ return false;
+ return detail::charconv_digits<T>::is_oct_overflow(str.sub(fno));
+ }
+ default:
+ {
+ size_t fno = str.first_not_of('0', 1);
+ if(fno == csubstr::npos)
+ return false;
+ return detail::check_overflow(str.sub(fno), detail::charconv_digits<T>::max_value_dec());
+ }
+ }
+ }
+ else if(C4_UNLIKELY(str[0] == '-'))
+ {
+ return true;
+ }
+ else
+ {
+ return detail::check_overflow(str, detail::charconv_digits<T>::max_value_dec());
+ }
+}
+
+
+/** Test if the following string would overflow when converted to associated
+ * types.
+ * @return true if number will overflow, false if it fits (or doesn't parse)
+ */
+template<class T>
+auto overflows(csubstr str)
+ -> typename std::enable_if<std::is_signed<T>::value, bool>::type
+{
+ C4_STATIC_ASSERT(std::is_integral<T>::value);
+ if(C4_UNLIKELY(str.len == 0))
+ return false;
+ if(str.str[0] == '-')
+ {
+ if(str.str[1] == '0')
+ {
+ if(str.len == 2)
+ return false;
+ switch(str.str[2])
+ {
+ case 'x':
+ case 'X':
+ {
+ size_t fno = str.first_not_of('0', 3);
+ if (fno == csubstr::npos)
+ return false;
+ return detail::check_overflow(str.sub(fno), detail::charconv_digits<T>::min_value_hex());
+ }
+ case 'b':
+ case 'B':
+ {
+ size_t fno = str.first_not_of('0', 3);
+ if (fno == csubstr::npos)
+ return false;
+ return detail::check_overflow(str.sub(fno), detail::charconv_digits<T>::min_value_bin());
+ }
+ case 'o':
+ case 'O':
+ {
+ size_t fno = str.first_not_of('0', 3);
+ if(fno == csubstr::npos)
+ return false;
+ return detail::check_overflow(str.sub(fno), detail::charconv_digits<T>::min_value_oct());
+ }
+ default:
+ {
+ size_t fno = str.first_not_of('0', 2);
+ if(fno == csubstr::npos)
+ return false;
+ return detail::check_overflow(str.sub(fno), detail::charconv_digits<T>::min_value_dec());
+ }
+ }
+ }
+ else
+ return detail::check_overflow(str.sub(1), detail::charconv_digits<T>::min_value_dec());
+ }
+ else if(str.str[0] == '0')
+ {
+ if (str.len == 1)
+ return false;
+ switch(str.str[1])
+ {
+ case 'x':
+ case 'X':
+ {
+ size_t fno = str.first_not_of('0', 2);
+ if (fno == csubstr::npos)
+ return false;
+ const size_t len = str.len - fno;
+ return !((len < sizeof (T) * 2) || (len == sizeof(T) * 2 && str[fno] <= '7'));
+ }
+ case 'b':
+ case 'B':
+ {
+ size_t fno = str.first_not_of('0', 2);
+ if (fno == csubstr::npos)
+ return false;
+ return !(str.len <= fno + (sizeof(T) * 8 - 1));
+ }
+ case 'o':
+ case 'O':
+ {
+ size_t fno = str.first_not_of('0', 2);
+ if(fno == csubstr::npos)
+ return false;
+ return detail::charconv_digits<T>::is_oct_overflow(str.sub(fno));
+ }
+ default:
+ {
+ size_t fno = str.first_not_of('0', 1);
+ if(fno == csubstr::npos)
+ return false;
+ return detail::check_overflow(str.sub(fno), detail::charconv_digits<T>::max_value_dec());
+ }
+ }
+ }
+ else
+ return detail::check_overflow(str, detail::charconv_digits<T>::max_value_dec());
+}
+
+
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
namespace detail {
+#if (!C4CORE_HAVE_STD_FROMCHARS)
/** @see http://www.exploringbinary.com/ for many good examples on float-str conversion */
template<size_t N>
void get_real_format_str(char (& C4_RESTRICT fmt)[N], int precision, RealFormat_e formatting, const char* length_modifier="")
{
int iret;
if(precision == -1)
- iret = snprintf(fmt, sizeof(fmt), "%%%s%c", length_modifier, to_c_fmt(formatting));
+ iret = snprintf(fmt, sizeof(fmt), "%%%s%c", length_modifier, formatting);
else if(precision == 0)
- iret = snprintf(fmt, sizeof(fmt), "%%.%s%c", length_modifier, to_c_fmt(formatting));
+ iret = snprintf(fmt, sizeof(fmt), "%%.%s%c", length_modifier, formatting);
else
- iret = snprintf(fmt, sizeof(fmt), "%%.%d%s%c", precision, length_modifier, to_c_fmt(formatting));
+ iret = snprintf(fmt, sizeof(fmt), "%%.%d%s%c", precision, length_modifier, formatting);
C4_ASSERT(iret >= 2 && size_t(iret) < sizeof(fmt));
C4_UNUSED(iret);
}
@@ -10857,8 +12358,10 @@ size_t print_one(substr str, const char* full_fmt, T v)
return ret;
#endif
}
+#endif // (!C4CORE_HAVE_STD_FROMCHARS)
+
-#if !C4CORE_HAVE_STD_FROMCHARS && !defined(C4CORE_HAVE_FAST_FLOAT)
+#if (!C4CORE_HAVE_STD_FROMCHARS) && (!C4CORE_HAVE_FAST_FLOAT)
/** scans a string using the given type format, while at the same time
* allowing non-null-terminated strings AND guaranteeing that the given
* string length is strictly respected, so that no buffer overflows
@@ -10895,24 +12398,28 @@ inline size_t scan_one(csubstr str, const char *type_fmt, T *v)
C4_ASSERT(num_chars >= 0);
return (size_t)(num_chars);
}
-#endif
+#endif // (!C4CORE_HAVE_STD_FROMCHARS) && (!C4CORE_HAVE_FAST_FLOAT)
#if C4CORE_HAVE_STD_TOCHARS
template<class T>
-size_t rtoa(substr buf, T v, int precision=-1, RealFormat_e formatting=FTOA_FLEX)
+C4_ALWAYS_INLINE size_t rtoa(substr buf, T v, int precision=-1, RealFormat_e formatting=FTOA_FLEX) noexcept
{
std::to_chars_result result;
size_t pos = 0;
if(formatting == FTOA_HEXA)
{
- _c4append('0');
- _c4append('x');
+ if(buf.len > size_t(2))
+ {
+ buf.str[0] = '0';
+ buf.str[1] = 'x';
+ }
+ pos += size_t(2);
}
if(precision == -1)
- result = std::to_chars(buf.str + pos, buf.str + buf.len, v, to_std_fmt(formatting));
+ result = std::to_chars(buf.str + pos, buf.str + buf.len, v, (std::chars_format)formatting);
else
- result = std::to_chars(buf.str + pos, buf.str + buf.len, v, to_std_fmt(formatting), precision);
+ result = std::to_chars(buf.str + pos, buf.str + buf.len, v, (std::chars_format)formatting, precision);
if(result.ec == std::errc())
{
// all good, no errors.
@@ -10936,6 +12443,85 @@ size_t rtoa(substr buf, T v, int precision=-1, RealFormat_e formatting=FTOA_FLEX
}
#endif // C4CORE_HAVE_STD_TOCHARS
+
+#if C4CORE_HAVE_FAST_FLOAT
+template<class T>
+C4_ALWAYS_INLINE bool scan_rhex(csubstr s, T *C4_RESTRICT val) noexcept
+{
+ C4_ASSERT(s.len > 0);
+ C4_ASSERT(s.str[0] != '-');
+ C4_ASSERT(s.str[0] != '+');
+ C4_ASSERT(!s.begins_with("0x"));
+ C4_ASSERT(!s.begins_with("0X"));
+ size_t pos = 0;
+ // integer part
+ for( ; pos < s.len; ++pos)
+ {
+ const char c = s.str[pos];
+ if(c >= '0' && c <= '9')
+ *val = *val * T(16) + T(c - '0');
+ else if(c >= 'a' && c <= 'f')
+ *val = *val * T(16) + T(c - 'a');
+ else if(c >= 'A' && c <= 'F')
+ *val = *val * T(16) + T(c - 'A');
+ else if(c == '.')
+ {
+ ++pos;
+ break; // follow on to mantissa
+ }
+ else if(c == 'p' || c == 'P')
+ {
+ ++pos;
+ goto power; // no mantissa given, jump to power
+ }
+ else
+ {
+ return false;
+ }
+ }
+ // mantissa
+ {
+ // 0.0625 == 1/16 == value of first digit after the comma
+ for(T digit = T(0.0625); pos < s.len; ++pos, digit /= T(16))
+ {
+ const char c = s.str[pos];
+ if(c >= '0' && c <= '9')
+ *val += digit * T(c - '0');
+ else if(c >= 'a' && c <= 'f')
+ *val += digit * T(c - 'a');
+ else if(c >= 'A' && c <= 'F')
+ *val += digit * T(c - 'A');
+ else if(c == 'p' || c == 'P')
+ {
+ ++pos;
+ goto power; // mantissa finished, jump to power
+ }
+ else
+ {
+ return false;
+ }
+ }
+ }
+ return true;
+power:
+ if(C4_LIKELY(pos < s.len))
+ {
+ if(s.str[pos] == '+') // atoi() cannot handle a leading '+'
+ ++pos;
+ if(C4_LIKELY(pos < s.len))
+ {
+ int16_t powval = {};
+ if(C4_LIKELY(atoi(s.sub(pos), &powval)))
+ {
+ *val *= ipow<T, int16_t, 16>(powval);
+ return true;
+ }
+ }
+ }
+ return false;
+}
+#endif
+
} // namespace detail
@@ -10943,11 +12529,15 @@ size_t rtoa(substr buf, T v, int precision=-1, RealFormat_e formatting=FTOA_FLEX
#undef _c4append
-/** Convert a single-precision real number to string.
- * The string will in general be NOT null-terminated.
- * For FTOA_FLEX, \p precision is the number of significand digits. Otherwise
- * \p precision is the number of decimals. */
-inline size_t ftoa(substr str, float v, int precision=-1, RealFormat_e formatting=FTOA_FLEX)
+/** Convert a single-precision real number to string. The string will
+ * in general be NOT null-terminated. For FTOA_FLEX, \p precision is
+ * the number of significand digits. Otherwise \p precision is the
+ * number of decimals. It is safe to call this function with an empty
+ * or too-small buffer.
+ *
+ * @return the size of the buffer needed to write the number
+ */
+C4_ALWAYS_INLINE size_t ftoa(substr str, float v, int precision=-1, RealFormat_e formatting=FTOA_FLEX) noexcept
{
#if C4CORE_HAVE_STD_TOCHARS
return detail::rtoa(str, v, precision, formatting);
@@ -10959,14 +12549,15 @@ inline size_t ftoa(substr str, float v, int precision=-1, RealFormat_e formattin
}
-/** Convert a double-precision real number to string.
- * The string will in general be NOT null-terminated.
- * For FTOA_FLEX, \p precision is the number of significand digits. Otherwise
- * \p precision is the number of decimals.
+/** Convert a double-precision real number to string. The string will
+ * in general be NOT null-terminated. For FTOA_FLEX, \p precision is
+ * the number of significand digits. Otherwise \p precision is the
+ * number of decimals. It is safe to call this function with an empty
+ * or too-small buffer.
*
- * @return the number of characters written.
+ * @return the size of the buffer needed to write the number
*/
-inline size_t dtoa(substr str, double v, int precision=-1, RealFormat_e formatting=FTOA_FLEX)
+C4_ALWAYS_INLINE size_t dtoa(substr str, double v, int precision=-1, RealFormat_e formatting=FTOA_FLEX) noexcept
{
#if C4CORE_HAVE_STD_TOCHARS
return detail::rtoa(str, v, precision, formatting);
@@ -10984,20 +12575,36 @@ inline size_t dtoa(substr str, double v, int precision=-1, RealFormat_e formatti
* @return true iff the conversion succeeded
* @see atof_first() if the string is not trimmed
*/
-inline bool atof(csubstr str, float * C4_RESTRICT v)
+C4_ALWAYS_INLINE bool atof(csubstr str, float * C4_RESTRICT v) noexcept
{
+ C4_ASSERT(str.len > 0);
C4_ASSERT(str.triml(" \r\t\n").len == str.len);
#if C4CORE_HAVE_FAST_FLOAT
- fast_float::from_chars_result result;
- result = fast_float::from_chars(str.str, str.str + str.len, *v);
- return result.ec == std::errc();
+ // fastfloat cannot parse hexadecimal floats
+ bool isneg = (str.str[0] == '-');
+ csubstr rem = str.sub(isneg || str.str[0] == '+');
+ if(!(rem.len >= 2 && (rem.str[0] == '0' && (rem.str[1] == 'x' || rem.str[1] == 'X'))))
+ {
+ fast_float::from_chars_result result;
+ result = fast_float::from_chars(str.str, str.str + str.len, *v);
+ return result.ec == std::errc();
+ }
+ else if(detail::scan_rhex(rem.sub(2), v))
+ {
+ *v *= isneg ? -1.f : 1.f;
+ return true;
+ }
+ return false;
#elif C4CORE_HAVE_STD_FROMCHARS
std::from_chars_result result;
result = std::from_chars(str.str, str.str + str.len, *v);
return result.ec == std::errc();
#else
- size_t ret = detail::scan_one(str, "f", v);
- return ret != csubstr::npos;
+ csubstr rem = str.sub(str.str[0] == '-' || str.str[0] == '+');
+ if(!(rem.len >= 2 && (rem.str[0] == '0' && (rem.str[1] == 'x' || rem.str[1] == 'X'))))
+ return detail::scan_one(str, "f", v) != csubstr::npos;
+ else
+ return detail::scan_one(str, "a", v) != csubstr::npos;
#endif
}
@@ -11008,20 +12615,35 @@ inline bool atof(csubstr str, float * C4_RESTRICT v)
* @return true iff the conversion succeeded
* @see atod_first() if the string is not trimmed
*/
-inline bool atod(csubstr str, double * C4_RESTRICT v)
+C4_ALWAYS_INLINE bool atod(csubstr str, double * C4_RESTRICT v) noexcept
{
C4_ASSERT(str.triml(" \r\t\n").len == str.len);
#if C4CORE_HAVE_FAST_FLOAT
- fast_float::from_chars_result result;
- result = fast_float::from_chars(str.str, str.str + str.len, *v);
- return result.ec == std::errc();
+ // fastfloat cannot parse hexadecimal floats
+ bool isneg = (str.str[0] == '-');
+ csubstr rem = str.sub(isneg || str.str[0] == '+');
+ if(!(rem.len >= 2 && (rem.str[0] == '0' && (rem.str[1] == 'x' || rem.str[1] == 'X'))))
+ {
+ fast_float::from_chars_result result;
+ result = fast_float::from_chars(str.str, str.str + str.len, *v);
+ return result.ec == std::errc();
+ }
+ else if(detail::scan_rhex(rem.sub(2), v))
+ {
+ *v *= isneg ? -1. : 1.;
+ return true;
+ }
+ return false;
#elif C4CORE_HAVE_STD_FROMCHARS
std::from_chars_result result;
result = std::from_chars(str.str, str.str + str.len, *v);
return result.ec == std::errc();
#else
- size_t ret = detail::scan_one(str, "lf", v);
- return ret != csubstr::npos;
+ csubstr rem = str.sub(str.str[0] == '-' || str.str[0] == '+');
+ if(!(rem.len >= 2 && (rem.str[0] == '0' && (rem.str[1] == 'x' || rem.str[1] == 'X'))))
+ return detail::scan_one(str, "lf", v) != csubstr::npos;
+ else
+ return detail::scan_one(str, "la", v) != csubstr::npos;
#endif
}
@@ -11030,7 +12652,7 @@ inline bool atod(csubstr str, double * C4_RESTRICT v)
* Leading whitespace is skipped until valid characters are found.
* @return the number of characters read from the string, or npos if
* conversion was not successful or if the string was empty */
-inline size_t atof_first(csubstr str, float * C4_RESTRICT v)
+inline size_t atof_first(csubstr str, float * C4_RESTRICT v) noexcept
{
csubstr trimmed = str.first_real_span();
if(trimmed.len == 0)
@@ -11045,7 +12667,7 @@ inline size_t atof_first(csubstr str, float * C4_RESTRICT v)
* Leading whitespace is skipped until valid characters are found.
* @return the number of characters read from the string, or npos if
* conversion was not successful or if the string was empty */
-inline size_t atod_first(csubstr str, double * C4_RESTRICT v)
+inline size_t atod_first(csubstr str, double * C4_RESTRICT v) noexcept
{
csubstr trimmed = str.first_real_span();
if(trimmed.len == 0)
@@ -11061,60 +12683,81 @@ inline size_t atod_first(csubstr str, double * C4_RESTRICT v)
//-----------------------------------------------------------------------------
// generic versions
-C4_ALWAYS_INLINE size_t xtoa(substr s, uint8_t v) { return utoa(s, v); }
-C4_ALWAYS_INLINE size_t xtoa(substr s, uint16_t v) { return utoa(s, v); }
-C4_ALWAYS_INLINE size_t xtoa(substr s, uint32_t v) { return utoa(s, v); }
-C4_ALWAYS_INLINE size_t xtoa(substr s, uint64_t v) { return utoa(s, v); }
-C4_ALWAYS_INLINE size_t xtoa(substr s, int8_t v) { return itoa(s, v); }
-C4_ALWAYS_INLINE size_t xtoa(substr s, int16_t v) { return itoa(s, v); }
-C4_ALWAYS_INLINE size_t xtoa(substr s, int32_t v) { return itoa(s, v); }
-C4_ALWAYS_INLINE size_t xtoa(substr s, int64_t v) { return itoa(s, v); }
-C4_ALWAYS_INLINE size_t xtoa(substr s, float v) { return ftoa(s, v); }
-C4_ALWAYS_INLINE size_t xtoa(substr s, double v) { return dtoa(s, v); }
-
-C4_ALWAYS_INLINE bool atox(csubstr s, uint8_t *C4_RESTRICT v) { return atou(s, v); }
-C4_ALWAYS_INLINE bool atox(csubstr s, uint16_t *C4_RESTRICT v) { return atou(s, v); }
-C4_ALWAYS_INLINE bool atox(csubstr s, uint32_t *C4_RESTRICT v) { return atou(s, v); }
-C4_ALWAYS_INLINE bool atox(csubstr s, uint64_t *C4_RESTRICT v) { return atou(s, v); }
-C4_ALWAYS_INLINE bool atox(csubstr s, int8_t *C4_RESTRICT v) { return atoi(s, v); }
-C4_ALWAYS_INLINE bool atox(csubstr s, int16_t *C4_RESTRICT v) { return atoi(s, v); }
-C4_ALWAYS_INLINE bool atox(csubstr s, int32_t *C4_RESTRICT v) { return atoi(s, v); }
-C4_ALWAYS_INLINE bool atox(csubstr s, int64_t *C4_RESTRICT v) { return atoi(s, v); }
-C4_ALWAYS_INLINE bool atox(csubstr s, float *C4_RESTRICT v) { return atof(s, v); }
-C4_ALWAYS_INLINE bool atox(csubstr s, double *C4_RESTRICT v) { return atod(s, v); }
-
-C4_ALWAYS_INLINE size_t to_chars(substr buf, uint8_t v) { return utoa(buf, v); }
-C4_ALWAYS_INLINE size_t to_chars(substr buf, uint16_t v) { return utoa(buf, v); }
-C4_ALWAYS_INLINE size_t to_chars(substr buf, uint32_t v) { return utoa(buf, v); }
-C4_ALWAYS_INLINE size_t to_chars(substr buf, uint64_t v) { return utoa(buf, v); }
-C4_ALWAYS_INLINE size_t to_chars(substr buf, int8_t v) { return itoa(buf, v); }
-C4_ALWAYS_INLINE size_t to_chars(substr buf, int16_t v) { return itoa(buf, v); }
-C4_ALWAYS_INLINE size_t to_chars(substr buf, int32_t v) { return itoa(buf, v); }
-C4_ALWAYS_INLINE size_t to_chars(substr buf, int64_t v) { return itoa(buf, v); }
-C4_ALWAYS_INLINE size_t to_chars(substr buf, float v) { return ftoa(buf, v); }
-C4_ALWAYS_INLINE size_t to_chars(substr buf, double v) { return dtoa(buf, v); }
-
-C4_ALWAYS_INLINE bool from_chars(csubstr buf, uint8_t *C4_RESTRICT v) { return atou(buf, v); }
-C4_ALWAYS_INLINE bool from_chars(csubstr buf, uint16_t *C4_RESTRICT v) { return atou(buf, v); }
-C4_ALWAYS_INLINE bool from_chars(csubstr buf, uint32_t *C4_RESTRICT v) { return atou(buf, v); }
-C4_ALWAYS_INLINE bool from_chars(csubstr buf, uint64_t *C4_RESTRICT v) { return atou(buf, v); }
-C4_ALWAYS_INLINE bool from_chars(csubstr buf, int8_t *C4_RESTRICT v) { return atoi(buf, v); }
-C4_ALWAYS_INLINE bool from_chars(csubstr buf, int16_t *C4_RESTRICT v) { return atoi(buf, v); }
-C4_ALWAYS_INLINE bool from_chars(csubstr buf, int32_t *C4_RESTRICT v) { return atoi(buf, v); }
-C4_ALWAYS_INLINE bool from_chars(csubstr buf, int64_t *C4_RESTRICT v) { return atoi(buf, v); }
-C4_ALWAYS_INLINE bool from_chars(csubstr buf, float *C4_RESTRICT v) { return atof(buf, v); }
-C4_ALWAYS_INLINE bool from_chars(csubstr buf, double *C4_RESTRICT v) { return atod(buf, v); }
-
-C4_ALWAYS_INLINE size_t from_chars_first(csubstr buf, uint8_t *C4_RESTRICT v) { return atou_first(buf, v); }
-C4_ALWAYS_INLINE size_t from_chars_first(csubstr buf, uint16_t *C4_RESTRICT v) { return atou_first(buf, v); }
-C4_ALWAYS_INLINE size_t from_chars_first(csubstr buf, uint32_t *C4_RESTRICT v) { return atou_first(buf, v); }
-C4_ALWAYS_INLINE size_t from_chars_first(csubstr buf, uint64_t *C4_RESTRICT v) { return atou_first(buf, v); }
-C4_ALWAYS_INLINE size_t from_chars_first(csubstr buf, int8_t *C4_RESTRICT v) { return atoi_first(buf, v); }
-C4_ALWAYS_INLINE size_t from_chars_first(csubstr buf, int16_t *C4_RESTRICT v) { return atoi_first(buf, v); }
-C4_ALWAYS_INLINE size_t from_chars_first(csubstr buf, int32_t *C4_RESTRICT v) { return atoi_first(buf, v); }
-C4_ALWAYS_INLINE size_t from_chars_first(csubstr buf, int64_t *C4_RESTRICT v) { return atoi_first(buf, v); }
-C4_ALWAYS_INLINE size_t from_chars_first(csubstr buf, float *C4_RESTRICT v) { return atof_first(buf, v); }
-C4_ALWAYS_INLINE size_t from_chars_first(csubstr buf, double *C4_RESTRICT v) { return atod_first(buf, v); }
+C4_ALWAYS_INLINE size_t xtoa(substr s, uint8_t v) noexcept { return write_dec(s, v); }
+C4_ALWAYS_INLINE size_t xtoa(substr s, uint16_t v) noexcept { return write_dec(s, v); }
+C4_ALWAYS_INLINE size_t xtoa(substr s, uint32_t v) noexcept { return write_dec(s, v); }
+C4_ALWAYS_INLINE size_t xtoa(substr s, uint64_t v) noexcept { return write_dec(s, v); }
+C4_ALWAYS_INLINE size_t xtoa(substr s, int8_t v) noexcept { return itoa(s, v); }
+C4_ALWAYS_INLINE size_t xtoa(substr s, int16_t v) noexcept { return itoa(s, v); }
+C4_ALWAYS_INLINE size_t xtoa(substr s, int32_t v) noexcept { return itoa(s, v); }
+C4_ALWAYS_INLINE size_t xtoa(substr s, int64_t v) noexcept { return itoa(s, v); }
+C4_ALWAYS_INLINE size_t xtoa(substr s, float v) noexcept { return ftoa(s, v); }
+C4_ALWAYS_INLINE size_t xtoa(substr s, double v) noexcept { return dtoa(s, v); }
+
+C4_ALWAYS_INLINE size_t xtoa(substr s, uint8_t v, uint8_t radix) noexcept { return utoa(s, v, radix); }
+C4_ALWAYS_INLINE size_t xtoa(substr s, uint16_t v, uint16_t radix) noexcept { return utoa(s, v, radix); }
+C4_ALWAYS_INLINE size_t xtoa(substr s, uint32_t v, uint32_t radix) noexcept { return utoa(s, v, radix); }
+C4_ALWAYS_INLINE size_t xtoa(substr s, uint64_t v, uint64_t radix) noexcept { return utoa(s, v, radix); }
+C4_ALWAYS_INLINE size_t xtoa(substr s, int8_t v, int8_t radix) noexcept { return itoa(s, v, radix); }
+C4_ALWAYS_INLINE size_t xtoa(substr s, int16_t v, int16_t radix) noexcept { return itoa(s, v, radix); }
+C4_ALWAYS_INLINE size_t xtoa(substr s, int32_t v, int32_t radix) noexcept { return itoa(s, v, radix); }
+C4_ALWAYS_INLINE size_t xtoa(substr s, int64_t v, int64_t radix) noexcept { return itoa(s, v, radix); }
+
+C4_ALWAYS_INLINE size_t xtoa(substr s, uint8_t v, uint8_t radix, size_t num_digits) noexcept { return utoa(s, v, radix, num_digits); }
+C4_ALWAYS_INLINE size_t xtoa(substr s, uint16_t v, uint16_t radix, size_t num_digits) noexcept { return utoa(s, v, radix, num_digits); }
+C4_ALWAYS_INLINE size_t xtoa(substr s, uint32_t v, uint32_t radix, size_t num_digits) noexcept { return utoa(s, v, radix, num_digits); }
+C4_ALWAYS_INLINE size_t xtoa(substr s, uint64_t v, uint64_t radix, size_t num_digits) noexcept { return utoa(s, v, radix, num_digits); }
+C4_ALWAYS_INLINE size_t xtoa(substr s, int8_t v, int8_t radix, size_t num_digits) noexcept { return itoa(s, v, radix, num_digits); }
+C4_ALWAYS_INLINE size_t xtoa(substr s, int16_t v, int16_t radix, size_t num_digits) noexcept { return itoa(s, v, radix, num_digits); }
+C4_ALWAYS_INLINE size_t xtoa(substr s, int32_t v, int32_t radix, size_t num_digits) noexcept { return itoa(s, v, radix, num_digits); }
+C4_ALWAYS_INLINE size_t xtoa(substr s, int64_t v, int64_t radix, size_t num_digits) noexcept { return itoa(s, v, radix, num_digits); }
+
+C4_ALWAYS_INLINE size_t xtoa(substr s, float v, int precision, RealFormat_e formatting=FTOA_FLEX) noexcept { return ftoa(s, v, precision, formatting); }
+C4_ALWAYS_INLINE size_t xtoa(substr s, double v, int precision, RealFormat_e formatting=FTOA_FLEX) noexcept { return dtoa(s, v, precision, formatting); }
+
+C4_ALWAYS_INLINE bool atox(csubstr s, uint8_t *C4_RESTRICT v) noexcept { return atou(s, v); }
+C4_ALWAYS_INLINE bool atox(csubstr s, uint16_t *C4_RESTRICT v) noexcept { return atou(s, v); }
+C4_ALWAYS_INLINE bool atox(csubstr s, uint32_t *C4_RESTRICT v) noexcept { return atou(s, v); }
+C4_ALWAYS_INLINE bool atox(csubstr s, uint64_t *C4_RESTRICT v) noexcept { return atou(s, v); }
+C4_ALWAYS_INLINE bool atox(csubstr s, int8_t *C4_RESTRICT v) noexcept { return atoi(s, v); }
+C4_ALWAYS_INLINE bool atox(csubstr s, int16_t *C4_RESTRICT v) noexcept { return atoi(s, v); }
+C4_ALWAYS_INLINE bool atox(csubstr s, int32_t *C4_RESTRICT v) noexcept { return atoi(s, v); }
+C4_ALWAYS_INLINE bool atox(csubstr s, int64_t *C4_RESTRICT v) noexcept { return atoi(s, v); }
+C4_ALWAYS_INLINE bool atox(csubstr s, float *C4_RESTRICT v) noexcept { return atof(s, v); }
+C4_ALWAYS_INLINE bool atox(csubstr s, double *C4_RESTRICT v) noexcept { return atod(s, v); }
+
+C4_ALWAYS_INLINE size_t to_chars(substr buf, uint8_t v) noexcept { return write_dec(buf, v); }
+C4_ALWAYS_INLINE size_t to_chars(substr buf, uint16_t v) noexcept { return write_dec(buf, v); }
+C4_ALWAYS_INLINE size_t to_chars(substr buf, uint32_t v) noexcept { return write_dec(buf, v); }
+C4_ALWAYS_INLINE size_t to_chars(substr buf, uint64_t v) noexcept { return write_dec(buf, v); }
+C4_ALWAYS_INLINE size_t to_chars(substr buf, int8_t v) noexcept { return itoa(buf, v); }
+C4_ALWAYS_INLINE size_t to_chars(substr buf, int16_t v) noexcept { return itoa(buf, v); }
+C4_ALWAYS_INLINE size_t to_chars(substr buf, int32_t v) noexcept { return itoa(buf, v); }
+C4_ALWAYS_INLINE size_t to_chars(substr buf, int64_t v) noexcept { return itoa(buf, v); }
+C4_ALWAYS_INLINE size_t to_chars(substr buf, float v) noexcept { return ftoa(buf, v); }
+C4_ALWAYS_INLINE size_t to_chars(substr buf, double v) noexcept { return dtoa(buf, v); }
+
+C4_ALWAYS_INLINE bool from_chars(csubstr buf, uint8_t *C4_RESTRICT v) noexcept { return atou(buf, v); }
+C4_ALWAYS_INLINE bool from_chars(csubstr buf, uint16_t *C4_RESTRICT v) noexcept { return atou(buf, v); }
+C4_ALWAYS_INLINE bool from_chars(csubstr buf, uint32_t *C4_RESTRICT v) noexcept { return atou(buf, v); }
+C4_ALWAYS_INLINE bool from_chars(csubstr buf, uint64_t *C4_RESTRICT v) noexcept { return atou(buf, v); }
+C4_ALWAYS_INLINE bool from_chars(csubstr buf, int8_t *C4_RESTRICT v) noexcept { return atoi(buf, v); }
+C4_ALWAYS_INLINE bool from_chars(csubstr buf, int16_t *C4_RESTRICT v) noexcept { return atoi(buf, v); }
+C4_ALWAYS_INLINE bool from_chars(csubstr buf, int32_t *C4_RESTRICT v) noexcept { return atoi(buf, v); }
+C4_ALWAYS_INLINE bool from_chars(csubstr buf, int64_t *C4_RESTRICT v) noexcept { return atoi(buf, v); }
+C4_ALWAYS_INLINE bool from_chars(csubstr buf, float *C4_RESTRICT v) noexcept { return atof(buf, v); }
+C4_ALWAYS_INLINE bool from_chars(csubstr buf, double *C4_RESTRICT v) noexcept { return atod(buf, v); }
+
+C4_ALWAYS_INLINE size_t from_chars_first(csubstr buf, uint8_t *C4_RESTRICT v) noexcept { return atou_first(buf, v); }
+C4_ALWAYS_INLINE size_t from_chars_first(csubstr buf, uint16_t *C4_RESTRICT v) noexcept { return atou_first(buf, v); }
+C4_ALWAYS_INLINE size_t from_chars_first(csubstr buf, uint32_t *C4_RESTRICT v) noexcept { return atou_first(buf, v); }
+C4_ALWAYS_INLINE size_t from_chars_first(csubstr buf, uint64_t *C4_RESTRICT v) noexcept { return atou_first(buf, v); }
+C4_ALWAYS_INLINE size_t from_chars_first(csubstr buf, int8_t *C4_RESTRICT v) noexcept { return atoi_first(buf, v); }
+C4_ALWAYS_INLINE size_t from_chars_first(csubstr buf, int16_t *C4_RESTRICT v) noexcept { return atoi_first(buf, v); }
+C4_ALWAYS_INLINE size_t from_chars_first(csubstr buf, int32_t *C4_RESTRICT v) noexcept { return atoi_first(buf, v); }
+C4_ALWAYS_INLINE size_t from_chars_first(csubstr buf, int64_t *C4_RESTRICT v) noexcept { return atoi_first(buf, v); }
+C4_ALWAYS_INLINE size_t from_chars_first(csubstr buf, float *C4_RESTRICT v) noexcept { return atof_first(buf, v); }
+C4_ALWAYS_INLINE size_t from_chars_first(csubstr buf, double *C4_RESTRICT v) noexcept { return atod_first(buf, v); }
//-----------------------------------------------------------------------------
@@ -11124,20 +12767,20 @@ C4_ALWAYS_INLINE size_t from_chars_first(csubstr buf, double *C4_RESTRICT v) {
#define _C4_IF_NOT_FIXED_LENGTH_I(T, ty) C4_ALWAYS_INLINE typename std::enable_if<std:: is_signed<T>::value && !is_fixed_length<T>::value_i, ty>
#define _C4_IF_NOT_FIXED_LENGTH_U(T, ty) C4_ALWAYS_INLINE typename std::enable_if<std::is_unsigned<T>::value && !is_fixed_length<T>::value_u, ty>
-template <class T> _C4_IF_NOT_FIXED_LENGTH_I(T, size_t)::type xtoa(substr buf, T v) { return itoa(buf, v); }
-template <class T> _C4_IF_NOT_FIXED_LENGTH_U(T, size_t)::type xtoa(substr buf, T v) { return utoa(buf, v); }
+template <class T> _C4_IF_NOT_FIXED_LENGTH_I(T, size_t)::type xtoa(substr buf, T v) noexcept { return itoa(buf, v); }
+template <class T> _C4_IF_NOT_FIXED_LENGTH_U(T, size_t)::type xtoa(substr buf, T v) noexcept { return write_dec(buf, v); }
-template <class T> _C4_IF_NOT_FIXED_LENGTH_I(T, bool )::type atox(csubstr buf, T *C4_RESTRICT v) { return atoi(buf, v); }
-template <class T> _C4_IF_NOT_FIXED_LENGTH_U(T, bool )::type atox(csubstr buf, T *C4_RESTRICT v) { return atou(buf, v); }
+template <class T> _C4_IF_NOT_FIXED_LENGTH_I(T, bool )::type atox(csubstr buf, T *C4_RESTRICT v) noexcept { return atoi(buf, v); }
+template <class T> _C4_IF_NOT_FIXED_LENGTH_U(T, bool )::type atox(csubstr buf, T *C4_RESTRICT v) noexcept { return atou(buf, v); }
-template <class T> _C4_IF_NOT_FIXED_LENGTH_I(T, size_t)::type to_chars(substr buf, T v) { return itoa(buf, v); }
-template <class T> _C4_IF_NOT_FIXED_LENGTH_U(T, size_t)::type to_chars(substr buf, T v) { return utoa(buf, v); }
+template <class T> _C4_IF_NOT_FIXED_LENGTH_I(T, size_t)::type to_chars(substr buf, T v) noexcept { return itoa(buf, v); }
+template <class T> _C4_IF_NOT_FIXED_LENGTH_U(T, size_t)::type to_chars(substr buf, T v) noexcept { return write_dec(buf, v); }
-template <class T> _C4_IF_NOT_FIXED_LENGTH_I(T, bool )::type from_chars(csubstr buf, T *C4_RESTRICT v) { return atoi(buf, v); }
-template <class T> _C4_IF_NOT_FIXED_LENGTH_U(T, bool )::type from_chars(csubstr buf, T *C4_RESTRICT v) { return atou(buf, v); }
+template <class T> _C4_IF_NOT_FIXED_LENGTH_I(T, bool )::type from_chars(csubstr buf, T *C4_RESTRICT v) noexcept { return atoi(buf, v); }
+template <class T> _C4_IF_NOT_FIXED_LENGTH_U(T, bool )::type from_chars(csubstr buf, T *C4_RESTRICT v) noexcept { return atou(buf, v); }
-template <class T> _C4_IF_NOT_FIXED_LENGTH_I(T, size_t)::type from_chars_first(csubstr buf, T *C4_RESTRICT v) { return atoi_first(buf, v); }
-template <class T> _C4_IF_NOT_FIXED_LENGTH_U(T, size_t)::type from_chars_first(csubstr buf, T *C4_RESTRICT v) { return atou_first(buf, v); }
+template <class T> _C4_IF_NOT_FIXED_LENGTH_I(T, size_t)::type from_chars_first(csubstr buf, T *C4_RESTRICT v) noexcept { return atoi_first(buf, v); }
+template <class T> _C4_IF_NOT_FIXED_LENGTH_U(T, size_t)::type from_chars_first(csubstr buf, T *C4_RESTRICT v) noexcept { return atou_first(buf, v); }
#undef _C4_IF_NOT_FIXED_LENGTH_I
#undef _C4_IF_NOT_FIXED_LENGTH_U
@@ -11146,11 +12789,11 @@ template <class T> _C4_IF_NOT_FIXED_LENGTH_U(T, size_t)::type from_chars_first(c
//-----------------------------------------------------------------------------
// for pointers
-template <class T> C4_ALWAYS_INLINE size_t xtoa(substr s, T *v) { return itoa(s, (intptr_t)v, (intptr_t)16); }
-template <class T> C4_ALWAYS_INLINE bool atox(csubstr s, T **v) { intptr_t tmp; bool ret = atox(s, &tmp); if(ret) { *v = (T*)tmp; } return ret; }
-template <class T> C4_ALWAYS_INLINE size_t to_chars(substr s, T *v) { return itoa(s, (intptr_t)v, (intptr_t)16); }
-template <class T> C4_ALWAYS_INLINE bool from_chars(csubstr buf, T **v) { intptr_t tmp; bool ret = from_chars(buf, &tmp); if(ret) { *v = (T*)tmp; } return ret; }
-template <class T> C4_ALWAYS_INLINE size_t from_chars_first(csubstr buf, T **v) { intptr_t tmp; bool ret = from_chars_first(buf, &tmp); if(ret) { *v = (T*)tmp; } return ret; }
+template <class T> C4_ALWAYS_INLINE size_t xtoa(substr s, T *v) noexcept { return itoa(s, (intptr_t)v, (intptr_t)16); }
+template <class T> C4_ALWAYS_INLINE bool atox(csubstr s, T **v) noexcept { intptr_t tmp; bool ret = atox(s, &tmp); if(ret) { *v = (T*)tmp; } return ret; }
+template <class T> C4_ALWAYS_INLINE size_t to_chars(substr s, T *v) noexcept { return itoa(s, (intptr_t)v, (intptr_t)16); }
+template <class T> C4_ALWAYS_INLINE bool from_chars(csubstr buf, T **v) noexcept { intptr_t tmp; bool ret = from_chars(buf, &tmp); if(ret) { *v = (T*)tmp; } return ret; }
+template <class T> C4_ALWAYS_INLINE size_t from_chars_first(csubstr buf, T **v) noexcept { intptr_t tmp; bool ret = from_chars_first(buf, &tmp); if(ret) { *v = (T*)tmp; } return ret; }
//-----------------------------------------------------------------------------
@@ -11162,7 +12805,7 @@ template <class T> C4_ALWAYS_INLINE size_t from_chars_first(csubstr buf, T **v)
*
* @see to_chars() */
template<class T>
-inline substr to_chars_sub(substr buf, T const& C4_RESTRICT v)
+C4_ALWAYS_INLINE substr to_chars_sub(substr buf, T const& C4_RESTRICT v) noexcept
{
size_t sz = to_chars(buf, v);
return buf.left_of(sz <= buf.len ? sz : buf.len);
@@ -11173,13 +12816,13 @@ inline substr to_chars_sub(substr buf, T const& C4_RESTRICT v)
//-----------------------------------------------------------------------------
// bool implementation
-inline size_t to_chars(substr buf, bool v)
+C4_ALWAYS_INLINE size_t to_chars(substr buf, bool v) noexcept
{
int val = v;
return to_chars(buf, val);
}
-inline bool from_chars(csubstr buf, bool * C4_RESTRICT v)
+inline bool from_chars(csubstr buf, bool * C4_RESTRICT v) noexcept
{
if(buf == '0')
{
@@ -11223,7 +12866,7 @@ inline bool from_chars(csubstr buf, bool * C4_RESTRICT v)
return ret;
}
-inline size_t from_chars_first(csubstr buf, bool * C4_RESTRICT v)
+inline size_t from_chars_first(csubstr buf, bool * C4_RESTRICT v) noexcept
{
csubstr trimmed = buf.first_non_empty_span();
if(trimmed.len == 0 || !from_chars(buf, v))
@@ -11235,7 +12878,7 @@ inline size_t from_chars_first(csubstr buf, bool * C4_RESTRICT v)
//-----------------------------------------------------------------------------
// single-char implementation
-inline size_t to_chars(substr buf, char v)
+inline size_t to_chars(substr buf, char v) noexcept
{
if(buf.len > 0)
buf[0] = v;
@@ -11244,7 +12887,7 @@ inline size_t to_chars(substr buf, char v)
/** extract a single character from a substring
* @note to extract a string instead and not just a single character, use the csubstr overload */
-inline bool from_chars(csubstr buf, char * C4_RESTRICT v)
+inline bool from_chars(csubstr buf, char * C4_RESTRICT v) noexcept
{
if(buf.len != 1)
return false;
@@ -11252,7 +12895,7 @@ inline bool from_chars(csubstr buf, char * C4_RESTRICT v)
return true;
}
-inline size_t from_chars_first(csubstr buf, char * C4_RESTRICT v)
+inline size_t from_chars_first(csubstr buf, char * C4_RESTRICT v) noexcept
{
if(buf.len < 1)
return csubstr::npos;
@@ -11264,21 +12907,29 @@ inline size_t from_chars_first(csubstr buf, char * C4_RESTRICT v)
//-----------------------------------------------------------------------------
// csubstr implementation
-inline size_t to_chars(substr buf, csubstr v)
+inline size_t to_chars(substr buf, csubstr v) noexcept
{
C4_ASSERT(!buf.overlaps(v));
size_t len = buf.len < v.len ? buf.len : v.len;
- memcpy(buf.str, v.str, len);
+ // calling memcpy with null strings is undefined behavior
+ // and will wreak havoc in calling code's branches.
+ // see https://github.com/biojppm/rapidyaml/pull/264#issuecomment-1262133637
+ if(len)
+ {
+ C4_ASSERT(buf.str != nullptr);
+ C4_ASSERT(v.str != nullptr);
+ memcpy(buf.str, v.str, len);
+ }
return v.len;
}
-inline bool from_chars(csubstr buf, csubstr *C4_RESTRICT v)
+inline bool from_chars(csubstr buf, csubstr *C4_RESTRICT v) noexcept
{
*v = buf;
return true;
}
-inline size_t from_chars_first(substr buf, csubstr * C4_RESTRICT v)
+inline size_t from_chars_first(substr buf, csubstr * C4_RESTRICT v) noexcept
{
csubstr trimmed = buf.first_non_empty_span();
if(trimmed.len == 0)
@@ -11291,35 +12942,59 @@ inline size_t from_chars_first(substr buf, csubstr * C4_RESTRICT v)
//-----------------------------------------------------------------------------
// substr
-inline size_t to_chars(substr buf, substr v)
+inline size_t to_chars(substr buf, substr v) noexcept
{
C4_ASSERT(!buf.overlaps(v));
size_t len = buf.len < v.len ? buf.len : v.len;
- memcpy(buf.str, v.str, len);
+ // calling memcpy with null strings is undefined behavior
+ // and will wreak havoc in calling code's branches.
+ // see https://github.com/biojppm/rapidyaml/pull/264#issuecomment-1262133637
+ if(len)
+ {
+ C4_ASSERT(buf.str != nullptr);
+ C4_ASSERT(v.str != nullptr);
+ memcpy(buf.str, v.str, len);
+ }
return v.len;
}
-inline bool from_chars(csubstr buf, substr * C4_RESTRICT v)
+inline bool from_chars(csubstr buf, substr * C4_RESTRICT v) noexcept
{
C4_ASSERT(!buf.overlaps(*v));
- if(buf.len <= v->len)
+ // is the destination buffer wide enough?
+ if(v->len >= buf.len)
{
- memcpy(v->str, buf.str, buf.len);
+ // calling memcpy with null strings is undefined behavior
+ // and will wreak havoc in calling code's branches.
+ // see https://github.com/biojppm/rapidyaml/pull/264#issuecomment-1262133637
+ if(buf.len)
+ {
+ C4_ASSERT(buf.str != nullptr);
+ C4_ASSERT(v->str != nullptr);
+ memcpy(v->str, buf.str, buf.len);
+ }
v->len = buf.len;
return true;
}
- memcpy(v->str, buf.str, v->len);
return false;
}
-inline size_t from_chars_first(csubstr buf, substr * C4_RESTRICT v)
+inline size_t from_chars_first(csubstr buf, substr * C4_RESTRICT v) noexcept
{
csubstr trimmed = buf.first_non_empty_span();
C4_ASSERT(!trimmed.overlaps(*v));
if(C4_UNLIKELY(trimmed.len == 0))
return csubstr::npos;
size_t len = trimmed.len > v->len ? v->len : trimmed.len;
- memcpy(v->str, trimmed.str, len);
+ // calling memcpy with null strings is undefined behavior
+ // and will wreak havoc in calling code's branches.
+ // see https://github.com/biojppm/rapidyaml/pull/264#issuecomment-1262133637
+ if(len)
+ {
+ C4_ASSERT(buf.str != nullptr);
+ C4_ASSERT(v->str != nullptr);
+ memcpy(v->str, trimmed.str, len);
+ }
if(C4_UNLIKELY(trimmed.len > v->len))
return csubstr::npos;
return static_cast<size_t>(trimmed.end() - buf.begin());
@@ -11329,13 +13004,13 @@ inline size_t from_chars_first(csubstr buf, substr * C4_RESTRICT v)
//-----------------------------------------------------------------------------
template<size_t N>
-inline size_t to_chars(substr buf, const char (& C4_RESTRICT v)[N])
+inline size_t to_chars(substr buf, const char (& C4_RESTRICT v)[N]) noexcept
{
csubstr sp(v);
return to_chars(buf, sp);
}
-inline size_t to_chars(substr buf, const char * C4_RESTRICT v)
+inline size_t to_chars(substr buf, const char * C4_RESTRICT v) noexcept
{
return to_chars(buf, to_csubstr(v));
}
@@ -11624,15 +13299,28 @@ inline integral_<intptr_t> bin(std::nullptr_t)
return integral_<intptr_t>(intptr_t(0), intptr_t(2));
}
/** format the integral_ argument as a binary 0-1 value
- * @see c4::raw() if you want to use a binary memcpy instead of 0-1 formatting */
+ * @see c4::raw() if you want to use a raw memcpy-based binary dump instead of 0-1 formatting */
template<class T>
inline integral_<T> bin(T v)
{
return integral_<T>(v, T(2));
}
-} // namespace fmt
+template<class T>
+struct overflow_checked_
+{
+ static_assert(std::is_integral<T>::value, "range checking only for integral types");
+ C4_ALWAYS_INLINE overflow_checked_(T &val_) : val(&val_) {}
+ T *val;
+};
+template<class T>
+C4_ALWAYS_INLINE overflow_checked_<T> overflow_checked(T &val)
+{
+ return overflow_checked_<T>(val);
+}
+
+} // namespace fmt
/** format an integral_ signed type */
template<typename T>
@@ -11668,6 +13356,14 @@ to_chars(substr buf, fmt::integral_padded_<T> fmt)
return utoa(buf, fmt.val, fmt.radix, fmt.num_digits);
}
+template<class T>
+C4_ALWAYS_INLINE bool from_chars(csubstr s, fmt::overflow_checked_<T> wrapper)
+{
+ if(C4_LIKELY(!overflows<T>(s)))
+ return atox(s, wrapper.val);
+ return false;
+}
+
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
@@ -14400,18 +16096,32 @@ namespace c4 {
//-----------------------------------------------------------------------------
-/** get a writeable view to an existing std::string */
-inline c4::substr to_substr(std::string &s)
+/** get a writeable view to an existing std::string.
+ * When the string is empty, the returned view will be pointing
+ * at the character with value '\0', but the size will be zero.
+ * @see https://en.cppreference.com/w/cpp/string/basic_string/operator_at
+ */
+C4_ALWAYS_INLINE c4::substr to_substr(std::string &s) noexcept
{
- char* data = ! s.empty() ? &s[0] : nullptr;
- return c4::substr(data, s.size());
+ #if C4_CPP < 11
+ #error this function will do undefined behavior
+ #endif
+ // since c++11 it is legal to call s[s.size()].
+ return c4::substr(&s[0], s.size());
}
-/** get a readonly view to an existing std::string */
-inline c4::csubstr to_csubstr(std::string const& s)
+/** get a readonly view to an existing std::string.
+ * When the string is empty, the returned view will be pointing
+ * at the character with value '\0', but the size will be zero.
+ * @see https://en.cppreference.com/w/cpp/string/basic_string/operator_at
+ */
+C4_ALWAYS_INLINE c4::csubstr to_csubstr(std::string const& s) noexcept
{
- const char* data = ! s.empty() ? &s[0] : nullptr;
- return c4::csubstr(data, s.size());
+ #if C4_CPP < 11
+ #error this function will do undefined behavior
+ #endif
+ // since c++11 it is legal to call s[s.size()].
+ return c4::csubstr(&s[0], s.size());
}
//-----------------------------------------------------------------------------
@@ -14437,7 +16147,15 @@ inline size_t to_chars(c4::substr buf, std::string const& s)
{
C4_ASSERT(!buf.overlaps(to_csubstr(s)));
size_t len = buf.len < s.size() ? buf.len : s.size();
- memcpy(buf.str, s.data(), len);
+ // calling memcpy with null strings is undefined behavior
+ // and will wreak havoc in calling code's branches.
+ // see https://github.com/biojppm/rapidyaml/pull/264#issuecomment-1262133637
+ if(len)
+ {
+ C4_ASSERT(s.data() != nullptr);
+ C4_ASSERT(buf.str != nullptr);
+ memcpy(buf.str, s.data(), len);
+ }
return s.size(); // return the number of needed chars
}
@@ -14446,7 +16164,14 @@ inline bool from_chars(c4::csubstr buf, std::string * s)
{
s->resize(buf.len);
C4_ASSERT(!buf.overlaps(to_csubstr(*s)));
- memcpy(&(*s)[0], buf.str, buf.len);
+ // calling memcpy with null strings is undefined behavior
+ // and will wreak havoc in calling code's branches.
+ // see https://github.com/biojppm/rapidyaml/pull/264#issuecomment-1262133637
+ if(buf.len)
+ {
+ C4_ASSERT(buf.str != nullptr);
+ memcpy(&(*s)[0], buf.str, buf.len);
+ }
return true;
}
@@ -14531,7 +16256,13 @@ inline size_t to_chars(c4::substr buf, std::vector<char, Alloc> const& s)
{
C4_ASSERT(!buf.overlaps(to_csubstr(s)));
size_t len = buf.len < s.size() ? buf.len : s.size();
- memcpy(buf.str, s.data(), len);
+ // calling memcpy with null strings is undefined behavior
+ // and will wreak havoc in calling code's branches.
+ // see https://github.com/biojppm/rapidyaml/pull/264#issuecomment-1262133637
+ if(len > 0)
+ {
+ memcpy(buf.str, s.data(), len);
+ }
return s.size(); // return the number of needed chars
}
@@ -14541,7 +16272,13 @@ inline bool from_chars(c4::csubstr buf, std::vector<char, Alloc> * s)
{
s->resize(buf.len);
C4_ASSERT(!buf.overlaps(to_csubstr(*s)));
- memcpy(&(*s)[0], buf.str, buf.len);
+ // calling memcpy with null strings is undefined behavior
+ // and will wreak havoc in calling code's branches.
+ // see https://github.com/biojppm/rapidyaml/pull/264#issuecomment-1262133637
+ if(buf.len > 0)
+ {
+ memcpy(&(*s)[0], buf.str, buf.len);
+ }
return true;
}
@@ -14791,11 +16528,13 @@ public:
friend bool operator!=(splitmix const &, splitmix const &);
splitmix() : m_seed(1) {}
+ explicit splitmix(uint64_t s) : m_seed(s) {}
explicit splitmix(std::random_device &rd)
{
seed(rd);
}
+ void seed(uint64_t s) { m_seed = s; }
void seed(std::random_device &rd)
{
m_seed = uint64_t(rd()) << 31 | uint64_t(rd());
@@ -14848,6 +16587,7 @@ public:
seed(rd);
}
+ void seed(uint64_t s) { m_seed = s; }
void seed(std::random_device &rd)
{
m_seed = uint64_t(rd()) << 31 | uint64_t(rd());
@@ -14899,11 +16639,13 @@ public:
: m_state(0x853c49e6748fea9bULL)
, m_inc(0xda3e39cb94b95bdbULL)
{}
+ explicit pcg(uint64_t s) { m_state = s; m_inc = m_state << 1; }
explicit pcg(std::random_device &rd)
{
seed(rd);
}
+ void seed(uint64_t s) { m_state = s; }
void seed(std::random_device &rd)
{
uint64_t s0 = uint64_t(rd()) << 31 | uint64_t(rd());
@@ -15462,27 +17204,6 @@ bool from_chars(csubstr buf, fmt::raw_wrapper *r)
namespace c4 {
-/** returns true if the memory overlaps */
-bool mem_overlaps(void const* a, void const* b, size_t sza, size_t szb)
-{
- if(a < b)
- {
- if(size_t(a) + sza > size_t(b))
- return true;
- }
- else if(a > b)
- {
- if(size_t(b) + szb > size_t(a))
- return true;
- }
- else if(a == b)
- {
- if(sza != 0 && szb != 0)
- return true;
- }
- return false;
-}
-
/** Fills 'dest' with the first 'pattern_size' bytes at 'pattern', 'num_times'. */
void mem_repeat(void* dest, void const* pattern, size_t pattern_size, size_t num_times)
{
@@ -15984,6 +17705,7 @@ substr decode_code_point(substr out, csubstr code_point)
C4_ASSERT(!code_point.begins_with("\\U"));
C4_ASSERT(!code_point.begins_with('0'));
C4_ASSERT(code_point.len <= 8);
+ C4_ASSERT(code_point.len > 0);
uint32_t code_point_val;
C4_CHECK(read_hex(code_point, &code_point_val));
size_t ret = decode_code_point((uint8_t*)out.str, out.len, code_point_val);
@@ -16787,11 +18509,24 @@ bool is_debugger_attached()
#endif
+#if defined(NDEBUG) || defined(C4_NO_DEBUG_BREAK)
+# define RYML_DEBUG_BREAK()
+#else
+# define RYML_DEBUG_BREAK() \
+ { \
+ if(c4::get_error_flags() & c4::ON_ERROR_DEBUGBREAK) \
+ { \
+ C4_DEBUG_BREAK(); \
+ } \
+ }
+#endif
+
+
#define RYML_CHECK(cond) \
do { \
if(!(cond)) \
{ \
- C4_DEBUG_BREAK(); \
+ RYML_DEBUG_BREAK() \
c4::yml::error("check failed: " #cond, c4::yml::Location(__FILE__, __LINE__, 0)); \
} \
} while(0)
@@ -16801,7 +18536,7 @@ bool is_debugger_attached()
{ \
if(!(cond)) \
{ \
- C4_DEBUG_BREAK(); \
+ RYML_DEBUG_BREAK() \
c4::yml::error(msg ": check failed: " #cond, c4::yml::Location(__FILE__, __LINE__, 0)); \
} \
} while(0)
@@ -16811,9 +18546,9 @@ bool is_debugger_attached()
# define RYML_DEPRECATED(msg) [[deprecated(msg)]]
#else
# if defined(_MSC_VER)
-# define RYML_DEPRECATED(msg) __declspec(deprecated)
+# define RYML_DEPRECATED(msg) __declspec(deprecated(msg))
# else // defined(__GNUC__) || defined(__clang__)
-# define RYML_DEPRECATED(msg) __attribute__((deprecated))
+# define RYML_DEPRECATED(msg) __attribute__((deprecated(msg)))
# endif
#endif
@@ -16875,7 +18610,11 @@ struct RYML_EXPORT Location : public LineCol
/** the type of the function used to report errors. This function must
* interrupt execution, either by raising an exception or calling
- * std::abort(). */
+ * std::abort().
+ *
+ * @warning the error callback must never return: it must either abort
+ * or throw an exception. Otherwise, the parser will enter into an
+ * infinite loop, or the program may crash. */
using pfn_error = void (*)(const char* msg, size_t msg_len, Location location, void *user_data);
/** the type of the function used to allocate memory */
using pfn_allocate = void* (*)(size_t len, void* hint, void *user_data);
@@ -16904,7 +18643,11 @@ inline void error(const char (&msg)[N])
//-----------------------------------------------------------------------------
-/// a c-style callbacks class
+/** a c-style callbacks class
+ *
+ * @warning the error callback must never return: it must either abort
+ * or throw an exception. Otherwise, the parser will enter into an
+ * infinite loop, or the program may crash. */
struct RYML_EXPORT Callbacks
{
void * m_user_data;
@@ -16925,11 +18668,15 @@ struct RYML_EXPORT Callbacks
}
};
+/** set the global callbacks.
+ *
+ * @warning the error callback must never return: it must either abort
+ * or throw an exception. Otherwise, the parser will enter into an
+ * infinite loop, or the program may crash. */
+RYML_EXPORT void set_callbacks(Callbacks const& c);
/// get the global callbacks
RYML_EXPORT Callbacks const& get_callbacks();
-/// set the global callbacks
-RYML_EXPORT void set_callbacks(Callbacks const& c);
-/// set the global callbacks to their defaults
+/// set the global callbacks back to their defaults
RYML_EXPORT void reset_callbacks();
/// @cond dev
@@ -16937,7 +18684,7 @@ RYML_EXPORT void reset_callbacks();
do \
{ \
const char msg[] = msg_literal; \
- C4_DEBUG_BREAK(); \
+ RYML_DEBUG_BREAK() \
(cb).m_error(msg, sizeof(msg), c4::yml::Location(__FILE__, 0, __LINE__, 0), (cb).m_user_data); \
} while(0)
#define _RYML_CB_CHECK(cb, cond) \
@@ -16946,7 +18693,7 @@ do \
if(!(cond)) \
{ \
const char msg[] = "check failed: " #cond; \
- C4_DEBUG_BREAK(); \
+ RYML_DEBUG_BREAK() \
(cb).m_error(msg, sizeof(msg), c4::yml::Location(__FILE__, 0, __LINE__, 0), (cb).m_user_data); \
} \
} while(0)
@@ -17086,6 +18833,7 @@ struct NodeScalar;
struct NodeInit;
struct NodeData;
class NodeRef;
+class ConstNodeRef;
class Tree;
@@ -17225,6 +18973,8 @@ typedef enum : type_bits {
DOCMAP = DOC|MAP,
DOCSEQ = DOC|SEQ,
DOCVAL = DOC|VAL,
+ _KEYMASK = KEY | KEYQUO | KEYANCH | KEYREF | KEYTAG,
+ _VALMASK = VAL | VALQUO | VALANCH | VALREF | VALTAG,
// these flags are from a work in progress and should not be used yet
_WIP_STYLE_FLOW_SL = c4bit(14), ///< mark container with single-line flow format (seqs as '[val1,val2], maps as '{key: val, key2: val2}')
_WIP_STYLE_FLOW_ML = c4bit(15), ///< mark container with multi-line flow format (seqs as '[val1,\nval2], maps as '{key: val,\nkey2: val2}')
@@ -17264,9 +19014,6 @@ public:
public:
- C4_ALWAYS_INLINE operator NodeType_e & C4_RESTRICT () { return type; }
- C4_ALWAYS_INLINE operator NodeType_e const& C4_RESTRICT () const { return type; }
-
C4_ALWAYS_INLINE NodeType() : type(NOTYPE) {}
C4_ALWAYS_INLINE NodeType(NodeType_e t) : type(t) {}
C4_ALWAYS_INLINE NodeType(type_bits t) : type((NodeType_e)t) {}
@@ -17287,6 +19034,14 @@ public:
public:
+ C4_ALWAYS_INLINE operator NodeType_e & C4_RESTRICT () { return type; }
+ C4_ALWAYS_INLINE operator NodeType_e const& C4_RESTRICT () const { return type; }
+
+ C4_ALWAYS_INLINE bool operator== (NodeType_e t) const { return type == t; }
+ C4_ALWAYS_INLINE bool operator!= (NodeType_e t) const { return type != t; }
+
+public:
+
#if defined(__clang__)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wnull-dereference"
@@ -17297,17 +19052,18 @@ public:
# endif
#endif
+ C4_ALWAYS_INLINE bool is_notype() const { return type == NOTYPE; }
C4_ALWAYS_INLINE bool is_stream() const { return ((type & STREAM) == STREAM) != 0; }
C4_ALWAYS_INLINE bool is_doc() const { return (type & DOC) != 0; }
C4_ALWAYS_INLINE bool is_container() const { return (type & (MAP|SEQ|STREAM)) != 0; }
C4_ALWAYS_INLINE bool is_map() const { return (type & MAP) != 0; }
C4_ALWAYS_INLINE bool is_seq() const { return (type & SEQ) != 0; }
- C4_ALWAYS_INLINE bool has_val() const { return (type & VAL) != 0; }
C4_ALWAYS_INLINE bool has_key() const { return (type & KEY) != 0; }
- C4_ALWAYS_INLINE bool is_val() const { return (type & (KEYVAL)) == VAL; }
+ C4_ALWAYS_INLINE bool has_val() const { return (type & VAL) != 0; }
+ C4_ALWAYS_INLINE bool is_val() const { return (type & KEYVAL) == VAL; }
C4_ALWAYS_INLINE bool is_keyval() const { return (type & KEYVAL) == KEYVAL; }
C4_ALWAYS_INLINE bool has_key_tag() const { return (type & (KEY|KEYTAG)) == (KEY|KEYTAG); }
- C4_ALWAYS_INLINE bool has_val_tag() const { return ((type & (VALTAG)) && (type & (VAL|MAP|SEQ))); }
+ C4_ALWAYS_INLINE bool has_val_tag() const { return ((type & VALTAG) && (type & (VAL|MAP|SEQ))); }
C4_ALWAYS_INLINE bool has_key_anchor() const { return (type & (KEY|KEYANCH)) == (KEY|KEYANCH); }
C4_ALWAYS_INLINE bool is_key_anchor() const { return (type & (KEY|KEYANCH)) == (KEY|KEYANCH); }
C4_ALWAYS_INLINE bool has_val_anchor() const { return (type & VALANCH) != 0 && (type & (VAL|SEQ|MAP)) != 0; }
@@ -17525,14 +19281,10 @@ public:
inline bool empty() const { return m_size == 0; }
- inline size_t size () const { return m_size; }
+ inline size_t size() const { return m_size; }
inline size_t capacity() const { return m_cap; }
inline size_t slack() const { RYML_ASSERT(m_cap >= m_size); return m_cap - m_size; }
- inline size_t arena_size() const { return m_arena_pos; }
- inline size_t arena_capacity() const { return m_arena.len; }
- inline size_t arena_slack() const { RYML_ASSERT(m_arena.len >= m_arena_pos); return m_arena.len - m_arena_pos; }
-
Callbacks const& callbacks() const { return m_callbacks; }
void callbacks(Callbacks const& cb) { m_callbacks = cb; }
@@ -17587,35 +19339,43 @@ public:
size_t root_id() const { RYML_ASSERT(m_cap > 0 && m_size > 0); return 0; }
//! Get a NodeRef of a node by id
- NodeRef ref(size_t id);
+ NodeRef ref(size_t id);
+ //! Get a NodeRef of a node by id
+ ConstNodeRef ref(size_t id) const;
//! Get a NodeRef of a node by id
- NodeRef const ref(size_t id) const;
+ ConstNodeRef cref(size_t id);
+ //! Get a NodeRef of a node by id
+ ConstNodeRef cref(size_t id) const;
//! Get the root as a NodeRef
- NodeRef rootref();
+ NodeRef rootref();
+ //! Get the root as a NodeRef
+ ConstNodeRef rootref() const;
//! Get the root as a NodeRef
- NodeRef const rootref() const;
+ ConstNodeRef crootref();
+ //! Get the root as a NodeRef
+ ConstNodeRef crootref() const;
//! find a root child by name, return it as a NodeRef
//! @note requires the root to be a map.
- NodeRef operator[] (csubstr key);
+ NodeRef operator[] (csubstr key);
//! find a root child by name, return it as a NodeRef
//! @note requires the root to be a map.
- NodeRef const operator[] (csubstr key) const;
+ ConstNodeRef operator[] (csubstr key) const;
//! find a root child by index: return the root node's @p i-th child as a NodeRef
//! @note @i is NOT the node id, but the child's position
- NodeRef operator[] (size_t i);
+ NodeRef operator[] (size_t i);
//! find a root child by index: return the root node's @p i-th child as a NodeRef
//! @note @i is NOT the node id, but the child's position
- NodeRef const operator[] (size_t i) const;
+ ConstNodeRef operator[] (size_t i) const;
//! get the i-th document of the stream
//! @note @i is NOT the node id, but the doc position within the stream
- NodeRef docref(size_t i);
+ NodeRef docref(size_t i);
//! get the i-th document of the stream
//! @note @i is NOT the node id, but the doc position within the stream
- NodeRef const docref(size_t i) const;
+ ConstNodeRef docref(size_t i) const;
/** @} */
@@ -17639,14 +19399,11 @@ public:
csubstr const& val_anchor(size_t node) const { RYML_ASSERT( ! is_val_ref(node) && has_val_anchor(node)); return _p(node)->m_val.anchor; }
NodeScalar const& valsc (size_t node) const { RYML_ASSERT(has_val(node)); return _p(node)->m_val; }
- bool key_is_null(size_t node) const { RYML_ASSERT(has_key(node)); if(is_key_quoted(node)) return false; csubstr s = _p(node)->m_key.scalar; return s == nullptr || s == "~" || s == "null" || s == "Null" || s == "NULL"; }
- bool val_is_null(size_t node) const { RYML_ASSERT(has_val(node)); if(is_val_quoted(node)) return false; csubstr s = _p(node)->m_val.scalar; return s == nullptr || s == "~" || s == "null" || s == "Null" || s == "NULL"; }
-
/** @} */
public:
- /** @name node type predicates */
+ /** @name node predicates */
/** @{ */
C4_ALWAYS_INLINE bool is_stream(size_t node) const { return _p(node)->m_type.is_stream(); }
@@ -17678,9 +19435,20 @@ public:
C4_ALWAYS_INLINE bool parent_is_map(size_t node) const { RYML_ASSERT(has_parent(node)); return is_map(_p(node)->m_parent); }
/** true when key and val are empty, and has no children */
- bool empty(size_t node) const { return ! has_children(node) && _p(node)->m_key.empty() && (( ! (_p(node)->m_type & VAL)) || _p(node)->m_val.empty()); }
+ C4_ALWAYS_INLINE bool empty(size_t node) const { return ! has_children(node) && _p(node)->m_key.empty() && (( ! (_p(node)->m_type & VAL)) || _p(node)->m_val.empty()); }
/** true when the node has an anchor named a */
- bool has_anchor(size_t node, csubstr a) const { return _p(node)->m_key.anchor == a || _p(node)->m_val.anchor == a; }
+ C4_ALWAYS_INLINE bool has_anchor(size_t node, csubstr a) const { return _p(node)->m_key.anchor == a || _p(node)->m_val.anchor == a; }
+
+ C4_ALWAYS_INLINE bool key_is_null(size_t node) const { RYML_ASSERT(has_key(node)); NodeData const* C4_RESTRICT n = _p(node); return !n->m_type.is_key_quoted() && _is_null(n->m_key.scalar); }
+ C4_ALWAYS_INLINE bool val_is_null(size_t node) const { RYML_ASSERT(has_val(node)); NodeData const* C4_RESTRICT n = _p(node); return !n->m_type.is_val_quoted() && _is_null(n->m_val.scalar); }
+ static bool _is_null(csubstr s) noexcept
+ {
+ return s.str == nullptr ||
+ s == "~" ||
+ s == "null" ||
+ s == "Null" ||
+ s == "NULL";
+ }
/** @} */
@@ -17693,16 +19461,30 @@ public:
bool has_parent(size_t node) const { return _p(node)->m_parent != NONE; }
+ /** true if @p node has a child with id @p ch */
+ bool has_child(size_t node, size_t ch) const { return _p(ch)->m_parent == node; }
+ /** true if @p node has a child with key @p key */
bool has_child(size_t node, csubstr key) const { return find_child(node, key) != npos; }
- bool has_child(size_t node, size_t ch) const { return child_pos(node, ch) != npos; }
+ /** true if @p node has any children key */
bool has_children(size_t node) const { return _p(node)->m_first_child != NONE; }
- bool has_sibling(size_t node, size_t sib) const { return is_root(node) ? sib==node : child_pos(_p(node)->m_parent, sib) != npos; }
+ /** true if @p node has a sibling with id @p sib */
+ bool has_sibling(size_t node, size_t sib) const { return _p(node)->m_parent == _p(sib)->m_parent; }
+ /** true if one of the node's siblings has the given key */
bool has_sibling(size_t node, csubstr key) const { return find_sibling(node, key) != npos; }
- /** counts with *this */
- bool has_siblings(size_t /*node*/) const { return true; }
- /** does not count with *this */
- bool has_other_siblings(size_t node) const { return is_root(node) ? false : (_p(_p(node)->m_parent)->m_first_child != _p(_p(node)->m_parent)->m_last_child); }
+ /** true if node is not a single child */
+ bool has_other_siblings(size_t node) const
+ {
+ NodeData const *n = _p(node);
+ if(C4_LIKELY(n->m_parent != NONE))
+ {
+ n = _p(n->m_parent);
+ return n->m_first_child != n->m_last_child;
+ }
+ return false;
+ }
+
+ RYML_DEPRECATED("use has_other_siblings()") bool has_siblings(size_t /*node*/) const { return true; }
/** @} */
@@ -17843,20 +19625,22 @@ public:
/** @name modifying hierarchy */
/** @{ */
- /** create and insert a new child of "parent". insert after the (to-be)
- * sibling "after", which must be a child of "parent". To insert as the
+ /** create and insert a new child of @p parent. insert after the (to-be)
+ * sibling @p after, which must be a child of @p parent. To insert as the
* first child, set after to NONE */
- inline size_t insert_child(size_t parent, size_t after)
+ C4_ALWAYS_INLINE size_t insert_child(size_t parent, size_t after)
{
RYML_ASSERT(parent != NONE);
RYML_ASSERT(is_container(parent) || is_root(parent));
- RYML_ASSERT(after == NONE || has_child(parent, after));
+ RYML_ASSERT(after == NONE || (_p(after)->m_parent == parent));
size_t child = _claim();
_set_hierarchy(child, parent, after);
return child;
}
- inline size_t prepend_child(size_t parent) { return insert_child(parent, NONE); }
- inline size_t append_child(size_t parent) { return insert_child(parent, last_child(parent)); }
+ /** create and insert a node as the first child of @p parent */
+ C4_ALWAYS_INLINE size_t prepend_child(size_t parent) { return insert_child(parent, NONE); }
+ /** create and insert a node as the last child of @p parent */
+ C4_ALWAYS_INLINE size_t append_child(size_t parent) { return insert_child(parent, _p(parent)->m_last_child); }
public:
@@ -17871,17 +19655,13 @@ public:
#endif
//! create and insert a new sibling of n. insert after "after"
- inline size_t insert_sibling(size_t node, size_t after)
+ C4_ALWAYS_INLINE size_t insert_sibling(size_t node, size_t after)
{
- RYML_ASSERT(node != NONE);
- RYML_ASSERT( ! is_root(node));
- RYML_ASSERT(parent(node) != NONE);
- RYML_ASSERT(after == NONE || (has_sibling(node, after) && has_sibling(after, node)));
- RYML_ASSERT(get(node) != nullptr);
- return insert_child(get(node)->m_parent, after);
+ return insert_child(_p(node)->m_parent, after);
}
- inline size_t prepend_sibling(size_t node) { return insert_sibling(node, NONE); }
- inline size_t append_sibling(size_t node) { return insert_sibling(node, last_sibling(node)); }
+ /** create and insert a node as the first node of @p parent */
+ C4_ALWAYS_INLINE size_t prepend_sibling(size_t node) { return prepend_child(_p(node)->m_parent); }
+ C4_ALWAYS_INLINE size_t append_sibling(size_t node) { return append_child(_p(node)->m_parent); }
public:
@@ -17994,7 +19774,13 @@ public:
/** @{ */
/** get the current size of the tree's internal arena */
- size_t arena_pos() const { return m_arena_pos; }
+ RYML_DEPRECATED("use arena_size() instead") size_t arena_pos() const { return m_arena_pos; }
+ /** get the current size of the tree's internal arena */
+ inline size_t arena_size() const { return m_arena_pos; }
+ /** get the current capacity of the tree's internal arena */
+ inline size_t arena_capacity() const { return m_arena.len; }
+ /** get the current slack of the tree's internal arena */
+ inline size_t arena_slack() const { RYML_ASSERT(m_arena.len >= m_arena_pos); return m_arena.len - m_arena_pos; }
/** get the current arena */
substr arena() const { return m_arena.first(m_arena_pos); }
@@ -18005,51 +19791,117 @@ public:
return m_arena.is_super(s);
}
- /** serialize the given non-floating-point variable to the tree's arena, growing it as
- * needed to accomodate the serialization.
+ /** serialize the given floating-point variable to the tree's
+ * arena, growing it as needed to accomodate the serialization.
+ *
* @note Growing the arena may cause relocation of the entire
- * existing arena, and thus change the contents of individual nodes.
+ * existing arena, and thus change the contents of individual
+ * nodes, and thus cost O(numnodes)+O(arenasize). To avoid this
+ * cost, ensure that the arena is reserved to an appropriate size
+ * using .reserve_arena()
+ *
* @see alloc_arena() */
template<class T>
- typename std::enable_if<!std::is_floating_point<T>::value, csubstr>::type
+ typename std::enable_if<std::is_floating_point<T>::value, csubstr>::type
to_arena(T const& C4_RESTRICT a)
{
substr rem(m_arena.sub(m_arena_pos));
- size_t num = to_chars(rem, a);
+ size_t num = to_chars_float(rem, a);
if(num > rem.len)
{
rem = _grow_arena(num);
- num = to_chars(rem, a);
+ num = to_chars_float(rem, a);
RYML_ASSERT(num <= rem.len);
}
rem = _request_span(num);
return rem;
}
- /** serialize the given floating-point variable to the tree's arena, growing it as
- * needed to accomodate the serialization.
+ /** serialize the given non-floating-point variable to the tree's
+ * arena, growing it as needed to accomodate the serialization.
+ *
* @note Growing the arena may cause relocation of the entire
- * existing arena, and thus change the contents of individual nodes.
+ * existing arena, and thus change the contents of individual
+ * nodes, and thus cost O(numnodes)+O(arenasize). To avoid this
+ * cost, ensure that the arena is reserved to an appropriate size
+ * using .reserve_arena()
+ *
* @see alloc_arena() */
template<class T>
- typename std::enable_if<std::is_floating_point<T>::value, csubstr>::type
+ typename std::enable_if<!std::is_floating_point<T>::value, csubstr>::type
to_arena(T const& C4_RESTRICT a)
{
substr rem(m_arena.sub(m_arena_pos));
- size_t num = to_chars_float(rem, a);
+ size_t num = to_chars(rem, a);
if(num > rem.len)
{
rem = _grow_arena(num);
- num = to_chars_float(rem, a);
+ num = to_chars(rem, a);
RYML_ASSERT(num <= rem.len);
}
rem = _request_span(num);
return rem;
}
- /** copy the given substr to the tree's arena, growing it by the required size
+ /** serialize the given csubstr to the tree's arena, growing the
+ * arena as needed to accomodate the serialization.
+ *
* @note Growing the arena may cause relocation of the entire
- * existing arena, and thus change the contents of individual nodes.
+ * existing arena, and thus change the contents of individual
+ * nodes, and thus cost O(numnodes)+O(arenasize). To avoid this
+ * cost, ensure that the arena is reserved to an appropriate size
+ * using .reserve_arena()
+ *
+ * @see alloc_arena() */
+ csubstr to_arena(csubstr a)
+ {
+ if(a.len > 0)
+ {
+ substr rem(m_arena.sub(m_arena_pos));
+ size_t num = to_chars(rem, a);
+ if(num > rem.len)
+ {
+ rem = _grow_arena(num);
+ num = to_chars(rem, a);
+ RYML_ASSERT(num <= rem.len);
+ }
+ return _request_span(num);
+ }
+ else
+ {
+ if(a.str == nullptr)
+ {
+ return csubstr{};
+ }
+ else if(m_arena.str == nullptr)
+ {
+ // Arena is empty and we want to store a non-null
+ // zero-length string.
+ // Even though the string has zero length, we need
+ // some "memory" to store a non-nullptr string
+ _grow_arena(1);
+ }
+ return _request_span(0);
+ }
+ }
+ C4_ALWAYS_INLINE csubstr to_arena(const char *s)
+ {
+ return to_arena(to_csubstr(s));
+ }
+ C4_ALWAYS_INLINE csubstr to_arena(std::nullptr_t)
+ {
+ return csubstr{};
+ }
+
+ /** copy the given substr to the tree's arena, growing it by the
+ * required size
+ *
+ * @note Growing the arena may cause relocation of the entire
+ * existing arena, and thus change the contents of individual
+ * nodes, and thus cost O(numnodes)+O(arenasize). To avoid this
+ * cost, ensure that the arena is reserved to an appropriate size
+ * using .reserve_arena()
+ *
* @see alloc_arena() */
substr copy_to_arena(csubstr s)
{
@@ -18061,7 +19913,8 @@ public:
C4_SUPPRESS_WARNING_GCC("-Wstringop-overflow=") // no need for terminating \0
C4_SUPPRESS_WARNING_GCC( "-Wrestrict") // there's an assert to ensure no violation of restrict behavior
#endif
- memcpy(cp.str, s.str, s.len);
+ if(s.len)
+ memcpy(cp.str, s.str, s.len);
#if (!defined(__clang__)) && (defined(__GNUC__) && __GNUC__ >= 10)
C4_SUPPRESS_WARNING_GCC_POP
#endif
@@ -18070,8 +19923,14 @@ public:
/** grow the tree's string arena by the given size and return a substr
* of the added portion
+ *
* @note Growing the arena may cause relocation of the entire
- * existing arena, and thus change the contents of individual nodes. */
+ * existing arena, and thus change the contents of individual
+ * nodes, and thus cost O(numnodes)+O(arenasize). To avoid this
+ * cost, ensure that the arena is reserved to an appropriate size
+ * using .reserve_arena().
+ *
+ * @see reserve_arena() */
substr alloc_arena(size_t sz)
{
if(sz > arena_slack())
@@ -18081,7 +19940,8 @@ public:
}
/** ensure the tree's internal string arena is at least the given capacity
- * @note Growing the arena may cause relocation of the entire
+ * @note This operation has a potential complexity of O(numNodes)+O(arenasize).
+ * Growing the arena may cause relocation of the entire
* existing arena, and thus change the contents of individual nodes. */
void reserve_arena(size_t arena_cap)
{
@@ -18106,7 +19966,7 @@ private:
substr _grow_arena(size_t more)
{
- size_t cap = m_arena_pos + more;
+ size_t cap = m_arena.len + more;
cap = cap < 2 * m_arena.len ? 2 * m_arena.len : cap;
cap = cap < 64 ? 64 : cap;
reserve_arena(cap);
@@ -18341,21 +20201,14 @@ public:
void _swap_hierarchy(size_t n_, size_t m_);
void _copy_hierarchy(size_t dst_, size_t src_);
- void _copy_props(size_t dst_, size_t src_)
+ inline void _copy_props(size_t dst_, size_t src_)
{
- auto & C4_RESTRICT dst = *_p(dst_);
- auto const& C4_RESTRICT src = *_p(src_);
- dst.m_type = src.m_type;
- dst.m_key = src.m_key;
- dst.m_val = src.m_val;
+ _copy_props(dst_, this, src_);
}
- void _copy_props_wo_key(size_t dst_, size_t src_)
+ inline void _copy_props_wo_key(size_t dst_, size_t src_)
{
- auto & C4_RESTRICT dst = *_p(dst_);
- auto const& C4_RESTRICT src = *_p(src_);
- dst.m_type = src.m_type;
- dst.m_val = src.m_val;
+ _copy_props_wo_key(dst_, this, src_);
}
void _copy_props(size_t dst_, Tree const* that_tree, size_t src_)
@@ -18371,7 +20224,7 @@ public:
{
auto & C4_RESTRICT dst = *_p(dst_);
auto const& C4_RESTRICT src = *that_tree->_p(src_);
- dst.m_type = src.m_type;
+ dst.m_type = (src.m_type & ~_KEYMASK) | (dst.m_type & _KEYMASK);
dst.m_val = src.m_val;
}
@@ -18399,7 +20252,7 @@ public:
inline void _clear_val(size_t node)
{
- _p(node)->m_key.clear();
+ _p(node)->m_val.clear();
_rem_flags(node, VAL);
}
@@ -18520,213 +20373,705 @@ read(NodeRef const& n, T *v);
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-/** a reference to a node in an existing yaml tree, offering a more
- * convenient API than the index-based API used in the tree. */
-class RYML_EXPORT NodeRef
+// forward decls
+class NodeRef;
+class ConstNodeRef;
+
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+
+namespace detail {
+
+template<class NodeRefType>
+struct child_iterator
{
-private:
+ using value_type = NodeRefType;
+ using tree_type = typename NodeRefType::tree_type;
- // require valid: a helper macro, undefined at the end
- #define _C4RV() RYML_ASSERT(valid() && !is_seed())
+ tree_type * C4_RESTRICT m_tree;
+ size_t m_child_id;
- Tree *C4_RESTRICT m_tree;
- size_t m_id;
+ child_iterator(tree_type * t, size_t id) : m_tree(t), m_child_id(id) {}
- /** This member is used to enable lazy operator[] writing. When a child
- * with a key or index is not found, m_id is set to the id of the parent
- * and the asked-for key or index are stored in this member until a write
- * does happen. Then it is given as key or index for creating the child.
- * When a key is used, the csubstr stores it (so the csubstr's string is
- * non-null and the csubstr's size is different from NONE). When an index is
- * used instead, the csubstr's string is set to null, and only the csubstr's
- * size is set to a value different from NONE. Otherwise, when operator[]
- * does find the child then this member is empty: the string is null and
- * the size is NONE. */
- csubstr m_seed;
+ child_iterator& operator++ () { RYML_ASSERT(m_child_id != NONE); m_child_id = m_tree->next_sibling(m_child_id); return *this; }
+ child_iterator& operator-- () { RYML_ASSERT(m_child_id != NONE); m_child_id = m_tree->prev_sibling(m_child_id); return *this; }
+
+ NodeRefType operator* () const { return NodeRefType(m_tree, m_child_id); }
+ NodeRefType operator-> () const { return NodeRefType(m_tree, m_child_id); }
+
+ bool operator!= (child_iterator that) const { RYML_ASSERT(m_tree == that.m_tree); return m_child_id != that.m_child_id; }
+ bool operator== (child_iterator that) const { RYML_ASSERT(m_tree == that.m_tree); return m_child_id == that.m_child_id; }
+};
+
+template<class NodeRefType>
+struct children_view_
+{
+ using n_iterator = child_iterator<NodeRefType>;
+
+ n_iterator b, e;
+
+ inline children_view_(n_iterator const& C4_RESTRICT b_,
+ n_iterator const& C4_RESTRICT e_) : b(b_), e(e_) {}
+
+ inline n_iterator begin() const { return b; }
+ inline n_iterator end () const { return e; }
+};
+
+template<class NodeRefType, class Visitor>
+bool _visit(NodeRefType &node, Visitor fn, size_t indentation_level, bool skip_root=false)
+{
+ size_t increment = 0;
+ if( ! (node.is_root() && skip_root))
+ {
+ if(fn(node, indentation_level))
+ return true;
+ ++increment;
+ }
+ if(node.has_children())
+ {
+ for(auto ch : node.children())
+ {
+ if(_visit(ch, fn, indentation_level + increment, false)) // no need to forward skip_root as it won't be root
+ {
+ return true;
+ }
+ }
+ }
+ return false;
+}
+
+template<class NodeRefType, class Visitor>
+bool _visit_stacked(NodeRefType &node, Visitor fn, size_t indentation_level, bool skip_root=false)
+{
+ size_t increment = 0;
+ if( ! (node.is_root() && skip_root))
+ {
+ if(fn(node, indentation_level))
+ {
+ return true;
+ }
+ ++increment;
+ }
+ if(node.has_children())
+ {
+ fn.push(node, indentation_level);
+ for(auto ch : node.children())
+ {
+ if(_visit_stacked(ch, fn, indentation_level + increment, false)) // no need to forward skip_root as it won't be root
+ {
+ fn.pop(node, indentation_level);
+ return true;
+ }
+ }
+ fn.pop(node, indentation_level);
+ }
+ return false;
+}
+
+
+//-----------------------------------------------------------------------------
+
+/** a CRTP base for read-only node methods */
+template<class Impl, class ConstImpl>
+struct RoNodeMethods
+{
+ C4_SUPPRESS_WARNING_GCC_CLANG_WITH_PUSH("-Wcast-align")
+ // helper CRTP macros, undefined at the end
+ #define tree_ ((ConstImpl const* C4_RESTRICT)this)->m_tree
+ #define id_ ((ConstImpl const* C4_RESTRICT)this)->m_id
+ #define tree__ ((Impl const* C4_RESTRICT)this)->m_tree
+ #define id__ ((Impl const* C4_RESTRICT)this)->m_id
+ // require valid
+ #define _C4RV() \
+ RYML_ASSERT(tree_ != nullptr); \
+ _RYML_CB_ASSERT(tree_->m_callbacks, id_ != NONE)
+ #define _C4_IF_MUTABLE(ty) typename std::enable_if<!std::is_same<U, ConstImpl>::value, ty>::type
public:
- /** @name node construction */
+ /** @name node property getters */
/** @{ */
- NodeRef() : m_tree(nullptr), m_id(NONE), m_seed() { _clear_seed(); }
- NodeRef(Tree &t) : m_tree(&t), m_id(t .root_id()), m_seed() { _clear_seed(); }
- NodeRef(Tree *t) : m_tree(t ), m_id(t->root_id()), m_seed() { _clear_seed(); }
- NodeRef(Tree *t, size_t id) : m_tree(t), m_id(id), m_seed() { _clear_seed(); }
- NodeRef(Tree *t, size_t id, size_t seed_pos) : m_tree(t), m_id(id), m_seed() { m_seed.str = nullptr; m_seed.len = seed_pos; }
- NodeRef(Tree *t, size_t id, csubstr seed_key) : m_tree(t), m_id(id), m_seed(seed_key) {}
- NodeRef(std::nullptr_t) : m_tree(nullptr), m_id(NONE), m_seed() {}
+ /** returns the data or null when the id is NONE */
+ C4_ALWAYS_INLINE C4_PURE NodeData const* get() const noexcept { RYML_ASSERT(tree_ != nullptr); return tree_->get(id_); }
+ /** returns the data or null when the id is NONE */
+ template<class U=Impl>
+ C4_ALWAYS_INLINE C4_PURE auto get() noexcept -> _C4_IF_MUTABLE(NodeData*) { RYML_ASSERT(tree_ != nullptr); return tree__->get(id__); }
- NodeRef(NodeRef const&) = default;
- NodeRef(NodeRef &&) = default;
+ C4_ALWAYS_INLINE C4_PURE NodeType type() const noexcept { _C4RV(); return tree_->type(id_); }
+ C4_ALWAYS_INLINE C4_PURE const char* type_str() const noexcept { return tree_->type_str(id_); }
- NodeRef& operator= (NodeRef const&) = default;
- NodeRef& operator= (NodeRef &&) = default;
+ C4_ALWAYS_INLINE C4_PURE csubstr key() const noexcept { _C4RV(); return tree_->key(id_); }
+ C4_ALWAYS_INLINE C4_PURE csubstr key_tag() const noexcept { _C4RV(); return tree_->key_tag(id_); }
+ C4_ALWAYS_INLINE C4_PURE csubstr key_ref() const noexcept { _C4RV(); return tree_->key_ref(id_); }
+ C4_ALWAYS_INLINE C4_PURE csubstr key_anchor() const noexcept { _C4RV(); return tree_->key_anchor(id_); }
+
+ C4_ALWAYS_INLINE C4_PURE csubstr val() const noexcept { _C4RV(); return tree_->val(id_); }
+ C4_ALWAYS_INLINE C4_PURE csubstr val_tag() const noexcept { _C4RV(); return tree_->val_tag(id_); }
+ C4_ALWAYS_INLINE C4_PURE csubstr val_ref() const noexcept { _C4RV(); return tree_->val_ref(id_); }
+ C4_ALWAYS_INLINE C4_PURE csubstr val_anchor() const noexcept { _C4RV(); return tree_->val_anchor(id_); }
+
+ C4_ALWAYS_INLINE C4_PURE NodeScalar const& keysc() const noexcept { _C4RV(); return tree_->keysc(id_); }
+ C4_ALWAYS_INLINE C4_PURE NodeScalar const& valsc() const noexcept { _C4RV(); return tree_->valsc(id_); }
+
+ C4_ALWAYS_INLINE C4_PURE bool key_is_null() const noexcept { _C4RV(); return tree_->key_is_null(id_); }
+ C4_ALWAYS_INLINE C4_PURE bool val_is_null() const noexcept { _C4RV(); return tree_->val_is_null(id_); }
/** @} */
public:
- inline Tree * tree() { return m_tree; }
- inline Tree const* tree() const { return m_tree; }
+ /** @name node property predicates */
+ /** @{ */
- inline size_t id() const { return m_id; }
+ C4_ALWAYS_INLINE C4_PURE bool empty() const noexcept { _C4RV(); return tree_->empty(id_); }
+ C4_ALWAYS_INLINE C4_PURE bool is_stream() const noexcept { _C4RV(); return tree_->is_stream(id_); }
+ C4_ALWAYS_INLINE C4_PURE bool is_doc() const noexcept { _C4RV(); return tree_->is_doc(id_); }
+ C4_ALWAYS_INLINE C4_PURE bool is_container() const noexcept { _C4RV(); return tree_->is_container(id_); }
+ C4_ALWAYS_INLINE C4_PURE bool is_map() const noexcept { _C4RV(); return tree_->is_map(id_); }
+ C4_ALWAYS_INLINE C4_PURE bool is_seq() const noexcept { _C4RV(); return tree_->is_seq(id_); }
+ C4_ALWAYS_INLINE C4_PURE bool has_val() const noexcept { _C4RV(); return tree_->has_val(id_); }
+ C4_ALWAYS_INLINE C4_PURE bool has_key() const noexcept { _C4RV(); return tree_->has_key(id_); }
+ C4_ALWAYS_INLINE C4_PURE bool is_val() const noexcept { _C4RV(); return tree_->is_val(id_); }
+ C4_ALWAYS_INLINE C4_PURE bool is_keyval() const noexcept { _C4RV(); return tree_->is_keyval(id_); }
+ C4_ALWAYS_INLINE C4_PURE bool has_key_tag() const noexcept { _C4RV(); return tree_->has_key_tag(id_); }
+ C4_ALWAYS_INLINE C4_PURE bool has_val_tag() const noexcept { _C4RV(); return tree_->has_val_tag(id_); }
+ C4_ALWAYS_INLINE C4_PURE bool has_key_anchor() const noexcept { _C4RV(); return tree_->has_key_anchor(id_); }
+ C4_ALWAYS_INLINE C4_PURE bool is_key_anchor() const noexcept { _C4RV(); return tree_->is_key_anchor(id_); }
+ C4_ALWAYS_INLINE C4_PURE bool has_val_anchor() const noexcept { _C4RV(); return tree_->has_val_anchor(id_); }
+ C4_ALWAYS_INLINE C4_PURE bool is_val_anchor() const noexcept { _C4RV(); return tree_->is_val_anchor(id_); }
+ C4_ALWAYS_INLINE C4_PURE bool has_anchor() const noexcept { _C4RV(); return tree_->has_anchor(id_); }
+ C4_ALWAYS_INLINE C4_PURE bool is_anchor() const noexcept { _C4RV(); return tree_->is_anchor(id_); }
+ C4_ALWAYS_INLINE C4_PURE bool is_key_ref() const noexcept { _C4RV(); return tree_->is_key_ref(id_); }
+ C4_ALWAYS_INLINE C4_PURE bool is_val_ref() const noexcept { _C4RV(); return tree_->is_val_ref(id_); }
+ C4_ALWAYS_INLINE C4_PURE bool is_ref() const noexcept { _C4RV(); return tree_->is_ref(id_); }
+ C4_ALWAYS_INLINE C4_PURE bool is_anchor_or_ref() const noexcept { _C4RV(); return tree_->is_anchor_or_ref(id_); }
+ C4_ALWAYS_INLINE C4_PURE bool is_key_quoted() const noexcept { _C4RV(); return tree_->is_key_quoted(id_); }
+ C4_ALWAYS_INLINE C4_PURE bool is_val_quoted() const noexcept { _C4RV(); return tree_->is_val_quoted(id_); }
+ C4_ALWAYS_INLINE C4_PURE bool is_quoted() const noexcept { _C4RV(); return tree_->is_quoted(id_); }
+ C4_ALWAYS_INLINE C4_PURE bool parent_is_seq() const noexcept { _C4RV(); return tree_->parent_is_seq(id_); }
+ C4_ALWAYS_INLINE C4_PURE bool parent_is_map() const noexcept { _C4RV(); return tree_->parent_is_map(id_); }
- inline NodeData * get() { return m_tree->get(m_id); }
- inline NodeData const* get() const { return m_tree->get(m_id); }
+ /** @} */
- inline bool operator== (NodeRef const& that) const { _C4RV(); RYML_ASSERT(that.valid() && !that.is_seed()); RYML_ASSERT(that.m_tree == m_tree); return m_id == that.m_id; }
- inline bool operator!= (NodeRef const& that) const { return ! this->operator==(that); }
+public:
- inline bool operator== (std::nullptr_t) const { return m_tree == nullptr || m_id == NONE || is_seed(); }
- inline bool operator!= (std::nullptr_t) const { return ! this->operator== (nullptr); }
+ /** @name hierarchy predicates */
+ /** @{ */
- inline bool operator== (csubstr val) const { _C4RV(); RYML_ASSERT(has_val()); return m_tree->val(m_id) == val; }
- inline bool operator!= (csubstr val) const { _C4RV(); RYML_ASSERT(has_val()); return m_tree->val(m_id) != val; }
+ C4_ALWAYS_INLINE C4_PURE bool is_root() const noexcept { _C4RV(); return tree_->is_root(id_); }
+ C4_ALWAYS_INLINE C4_PURE bool has_parent() const noexcept { _C4RV(); return tree_->has_parent(id_); }
- //inline operator bool () const { return m_tree == nullptr || m_id == NONE || is_seed(); }
+ C4_ALWAYS_INLINE C4_PURE bool has_child(ConstImpl const& ch) const noexcept { _C4RV(); return tree_->has_child(id_, ch.m_id); }
+ C4_ALWAYS_INLINE C4_PURE bool has_child(csubstr name) const noexcept { _C4RV(); return tree_->has_child(id_, name); }
+ C4_ALWAYS_INLINE C4_PURE bool has_children() const noexcept { _C4RV(); return tree_->has_children(id_); }
+
+ C4_ALWAYS_INLINE C4_PURE bool has_sibling(ConstImpl const& n) const noexcept { _C4RV(); return tree_->has_sibling(id_, n.m_id); }
+ C4_ALWAYS_INLINE C4_PURE bool has_sibling(csubstr name) const noexcept { _C4RV(); return tree_->has_sibling(id_, name); }
+ /** counts with this */
+ C4_ALWAYS_INLINE C4_PURE bool has_siblings() const noexcept { _C4RV(); return tree_->has_siblings(id_); }
+ /** does not count with this */
+ C4_ALWAYS_INLINE C4_PURE bool has_other_siblings() const noexcept { _C4RV(); return tree_->has_other_siblings(id_); }
+
+ /** @} */
public:
- inline bool valid() const { return m_tree != nullptr && m_id != NONE; }
- inline bool is_seed() const { return m_seed.str != nullptr || m_seed.len != NONE; }
+ /** @name hierarchy getters */
+ /** @{ */
- inline void _clear_seed() { /*do this manually or an assert is triggered*/ m_seed.str = nullptr; m_seed.len = NONE; }
+
+ template<class U=Impl>
+ C4_ALWAYS_INLINE C4_PURE auto doc(size_t num) noexcept -> _C4_IF_MUTABLE(Impl) { _C4RV(); return {tree__, tree__->doc(num)}; }
+ C4_ALWAYS_INLINE C4_PURE ConstImpl doc(size_t num) const noexcept { _C4RV(); return {tree_, tree_->doc(num)}; }
+
+
+ template<class U=Impl>
+ C4_ALWAYS_INLINE C4_PURE auto parent() noexcept -> _C4_IF_MUTABLE(Impl) { _C4RV(); return {tree__, tree__->parent(id__)}; }
+ C4_ALWAYS_INLINE C4_PURE ConstImpl parent() const noexcept { _C4RV(); return {tree_, tree_->parent(id_)}; }
+
+
+ /** O(#num_children) */
+ C4_ALWAYS_INLINE C4_PURE size_t child_pos(ConstImpl const& n) const noexcept { _C4RV(); return tree_->child_pos(id_, n.m_id); }
+ C4_ALWAYS_INLINE C4_PURE size_t num_children() const noexcept { _C4RV(); return tree_->num_children(id_); }
+
+ template<class U=Impl>
+ C4_ALWAYS_INLINE C4_PURE auto first_child() noexcept -> _C4_IF_MUTABLE(Impl) { _C4RV(); return {tree__, tree__->first_child(id__)}; }
+ C4_ALWAYS_INLINE C4_PURE ConstImpl first_child() const noexcept { _C4RV(); return {tree_, tree_->first_child(id_)}; }
+
+ template<class U=Impl>
+ C4_ALWAYS_INLINE C4_PURE auto last_child() noexcept -> _C4_IF_MUTABLE(Impl) { _C4RV(); return {tree__, tree__->last_child(id__)}; }
+ C4_ALWAYS_INLINE C4_PURE ConstImpl last_child () const noexcept { _C4RV(); return {tree_, tree_->last_child (id_)}; }
+
+ template<class U=Impl>
+ C4_ALWAYS_INLINE C4_PURE auto child(size_t pos) noexcept -> _C4_IF_MUTABLE(Impl) { _C4RV(); return {tree__, tree__->child(id__, pos)}; }
+ C4_ALWAYS_INLINE C4_PURE ConstImpl child(size_t pos) const noexcept { _C4RV(); return {tree_, tree_->child(id_, pos)}; }
+
+ template<class U=Impl>
+ C4_ALWAYS_INLINE C4_PURE auto find_child(csubstr name) noexcept -> _C4_IF_MUTABLE(Impl) { _C4RV(); return {tree__, tree__->find_child(id__, name)}; }
+ C4_ALWAYS_INLINE C4_PURE ConstImpl find_child(csubstr name) const noexcept { _C4RV(); return {tree_, tree_->find_child(id_, name)}; }
+
+
+ /** O(#num_siblings) */
+ C4_ALWAYS_INLINE C4_PURE size_t num_siblings() const noexcept { _C4RV(); return tree_->num_siblings(id_); }
+ C4_ALWAYS_INLINE C4_PURE size_t num_other_siblings() const noexcept { _C4RV(); return tree_->num_other_siblings(id_); }
+ C4_ALWAYS_INLINE C4_PURE size_t sibling_pos(ConstImpl const& n) const noexcept { _C4RV(); return tree_->child_pos(tree_->parent(id_), n.m_id); }
+
+ template<class U=Impl>
+ C4_ALWAYS_INLINE C4_PURE auto prev_sibling() noexcept -> _C4_IF_MUTABLE(Impl) { _C4RV(); return {tree__, tree__->prev_sibling(id__)}; }
+ C4_ALWAYS_INLINE C4_PURE ConstImpl prev_sibling() const noexcept { _C4RV(); return {tree_, tree_->prev_sibling(id_)}; }
+
+ template<class U=Impl>
+ C4_ALWAYS_INLINE C4_PURE auto next_sibling() noexcept -> _C4_IF_MUTABLE(Impl) { _C4RV(); return {tree__, tree__->next_sibling(id__)}; }
+ C4_ALWAYS_INLINE C4_PURE ConstImpl next_sibling() const noexcept { _C4RV(); return {tree_, tree_->next_sibling(id_)}; }
+
+ template<class U=Impl>
+ C4_ALWAYS_INLINE C4_PURE auto first_sibling() noexcept -> _C4_IF_MUTABLE(Impl) { _C4RV(); return {tree__, tree__->first_sibling(id__)}; }
+ C4_ALWAYS_INLINE C4_PURE ConstImpl first_sibling() const noexcept { _C4RV(); return {tree_, tree_->first_sibling(id_)}; }
+
+ template<class U=Impl>
+ C4_ALWAYS_INLINE C4_PURE auto last_sibling() noexcept -> _C4_IF_MUTABLE(Impl) { _C4RV(); return {tree__, tree__->last_sibling(id__)}; }
+ C4_ALWAYS_INLINE C4_PURE ConstImpl last_sibling () const noexcept { _C4RV(); return {tree_, tree_->last_sibling(id_)}; }
+
+ template<class U=Impl>
+ C4_ALWAYS_INLINE C4_PURE auto sibling(size_t pos) noexcept -> _C4_IF_MUTABLE(Impl) { _C4RV(); return {tree__, tree__->sibling(id__, pos)}; }
+ C4_ALWAYS_INLINE C4_PURE ConstImpl sibling(size_t pos) const noexcept { _C4RV(); return {tree_, tree_->sibling(id_, pos)}; }
+
+ template<class U=Impl>
+ C4_ALWAYS_INLINE C4_PURE auto find_sibling(csubstr name) noexcept -> _C4_IF_MUTABLE(Impl) { _C4RV(); return {tree__, tree__->find_sibling(id__, name)}; }
+ C4_ALWAYS_INLINE C4_PURE ConstImpl find_sibling(csubstr name) const noexcept { _C4RV(); return {tree_, tree_->find_sibling(id_, name)}; }
+
+
+ /** O(num_children) */
+ C4_ALWAYS_INLINE C4_PURE ConstImpl operator[] (csubstr k) const noexcept
+ {
+ _C4RV();
+ size_t ch = tree_->find_child(id_, k);
+ _RYML_CB_ASSERT(tree_->m_callbacks, ch != NONE);
+ return {tree_, ch};
+ }
+ /** Find child by key. O(num_children). returns a seed node if no such child is found. */
+ template<class U=Impl>
+ C4_ALWAYS_INLINE C4_PURE auto operator[] (csubstr k) noexcept -> _C4_IF_MUTABLE(Impl)
+ {
+ _C4RV();
+ size_t ch = tree__->find_child(id__, k);
+ return ch != NONE ? Impl(tree__, ch) : NodeRef(tree__, id__, k);
+ }
+
+ /** O(num_children) */
+ C4_ALWAYS_INLINE C4_PURE ConstImpl operator[] (size_t pos) const noexcept
+ {
+ _C4RV();
+ size_t ch = tree_->child(id_, pos);
+ _RYML_CB_ASSERT(tree_->m_callbacks, ch != NONE);
+ return {tree_, ch};
+ }
+
+ /** Find child by position. O(pos). returns a seed node if no such child is found. */
+ template<class U=Impl>
+ C4_ALWAYS_INLINE C4_PURE auto operator[] (size_t pos) noexcept -> _C4_IF_MUTABLE(Impl)
+ {
+ _C4RV();
+ size_t ch = tree__->child(id__, pos);
+ return ch != NONE ? Impl(tree__, ch) : NodeRef(tree__, id__, pos);
+ }
+
+ /** @} */
public:
- /** @name node property getters */
+ /** deserialization */
/** @{ */
- inline NodeType type() const { _C4RV(); return m_tree->type(m_id); }
- inline const char* type_str() const { _C4RV(); RYML_ASSERT(valid() && ! is_seed()); return m_tree->type_str(m_id); }
+ template<class T>
+ ConstImpl const& operator>> (T &v) const
+ {
+ _C4RV();
+ if( ! read((ConstImpl const&)*this, &v))
+ _RYML_CB_ERR(tree_->m_callbacks, "could not deserialize value");
+ return *((ConstImpl const*)this);
+ }
- inline csubstr key() const { _C4RV(); return m_tree->key(m_id); }
- inline csubstr key_tag() const { _C4RV(); return m_tree->key_tag(m_id); }
- inline csubstr key_ref() const { _C4RV(); return m_tree->key_ref(m_id); }
- inline csubstr key_anchor() const { _C4RV(); return m_tree->key_anchor(m_id); }
- inline NodeScalar keysc() const { _C4RV(); return m_tree->keysc(m_id); }
+ /** deserialize the node's key to the given variable */
+ template<class T>
+ ConstImpl const& operator>> (Key<T> v) const
+ {
+ _C4RV();
+ if( ! from_chars(key(), &v.k))
+ _RYML_CB_ERR(tree_->m_callbacks, "could not deserialize key");
+ return *((ConstImpl const*)this);
+ }
- inline csubstr val() const { _C4RV(); return m_tree->val(m_id); }
- inline csubstr val_tag() const { _C4RV(); return m_tree->val_tag(m_id); }
- inline csubstr val_ref() const { _C4RV(); return m_tree->val_ref(m_id); }
- inline csubstr val_anchor() const { _C4RV(); return m_tree->val_anchor(m_id); }
- inline NodeScalar valsc() const { _C4RV(); return m_tree->valsc(m_id); }
+ /** deserialize the node's key as base64 */
+ ConstImpl const& operator>> (Key<fmt::base64_wrapper> w) const
+ {
+ deserialize_key(w.wrapper);
+ return *((ConstImpl const*)this);
+ }
- inline bool key_is_null() const { _C4RV(); return m_tree->key_is_null(m_id); }
- inline bool val_is_null() const { _C4RV(); return m_tree->val_is_null(m_id); }
+ /** deserialize the node's val as base64 */
+ ConstImpl const& operator>> (fmt::base64_wrapper w) const
+ {
+ deserialize_val(w);
+ return *((ConstImpl const*)this);
+ }
- /** decode the base64-encoded key deserialize and assign the
+ /** decode the base64-encoded key and assign the
* decoded blob to the given buffer/
* @return the size of base64-decoded blob */
- size_t deserialize_key(fmt::base64_wrapper v) const;
- /** decode the base64-encoded key deserialize and assign the
+ size_t deserialize_key(fmt::base64_wrapper v) const
+ {
+ _C4RV();
+ return from_chars(key(), &v);
+ }
+ /** decode the base64-encoded key and assign the
* decoded blob to the given buffer/
* @return the size of base64-decoded blob */
- size_t deserialize_val(fmt::base64_wrapper v) const;
+ size_t deserialize_val(fmt::base64_wrapper v) const
+ {
+ _C4RV();
+ return from_chars(val(), &v);
+ };
+
+ template<class T>
+ bool get_if(csubstr name, T *var) const
+ {
+ auto ch = find_child(name);
+ if(!ch.valid())
+ return false;
+ ch >> *var;
+ return true;
+ }
+
+ template<class T>
+ bool get_if(csubstr name, T *var, T const& fallback) const
+ {
+ auto ch = find_child(name);
+ if(ch.valid())
+ {
+ ch >> *var;
+ return true;
+ }
+ else
+ {
+ *var = fallback;
+ return false;
+ }
+ }
/** @} */
public:
- /** @name node property predicates */
+ #if defined(__clang__)
+ # pragma clang diagnostic push
+ # pragma clang diagnostic ignored "-Wnull-dereference"
+ #elif defined(__GNUC__)
+ # pragma GCC diagnostic push
+ # if __GNUC__ >= 6
+ # pragma GCC diagnostic ignored "-Wnull-dereference"
+ # endif
+ #endif
+
+ /** @name iteration */
+ /** @{ */
+
+ using iterator = detail::child_iterator<Impl>;
+ using const_iterator = detail::child_iterator<ConstImpl>;
+ using children_view = detail::children_view_<Impl>;
+ using const_children_view = detail::children_view_<ConstImpl>;
+
+ template<class U=Impl>
+ C4_ALWAYS_INLINE C4_PURE auto begin() noexcept -> _C4_IF_MUTABLE(iterator) { _C4RV(); return iterator(tree__, tree__->first_child(id__)); }
+ C4_ALWAYS_INLINE C4_PURE const_iterator begin() const noexcept { _C4RV(); return const_iterator(tree_, tree_->first_child(id_)); }
+ C4_ALWAYS_INLINE C4_PURE const_iterator cbegin() const noexcept { _C4RV(); return const_iterator(tree_, tree_->first_child(id_)); }
+
+ template<class U=Impl>
+ C4_ALWAYS_INLINE C4_PURE auto end() noexcept -> _C4_IF_MUTABLE(iterator) { _C4RV(); return iterator(tree__, NONE); }
+ C4_ALWAYS_INLINE C4_PURE const_iterator end() const noexcept { _C4RV(); return const_iterator(tree_, NONE); }
+ C4_ALWAYS_INLINE C4_PURE const_iterator cend() const noexcept { _C4RV(); return const_iterator(tree_, tree_->first_child(id_)); }
+
+ /** get an iterable view over children */
+ template<class U=Impl>
+ C4_ALWAYS_INLINE C4_PURE auto children() noexcept -> _C4_IF_MUTABLE(children_view) { _C4RV(); return children_view(begin(), end()); }
+ /** get an iterable view over children */
+ C4_ALWAYS_INLINE C4_PURE const_children_view children() const noexcept { _C4RV(); return const_children_view(begin(), end()); }
+ /** get an iterable view over children */
+ C4_ALWAYS_INLINE C4_PURE const_children_view cchildren() const noexcept { _C4RV(); return const_children_view(begin(), end()); }
+
+ /** get an iterable view over all siblings (including the calling node) */
+ template<class U=Impl>
+ C4_ALWAYS_INLINE C4_PURE auto siblings() noexcept -> _C4_IF_MUTABLE(children_view)
+ {
+ _C4RV();
+ NodeData const *nd = tree__->get(id__);
+ return (nd->m_parent != NONE) ? // does it have a parent?
+ children_view(iterator(tree__, tree_->get(nd->m_parent)->m_first_child), iterator(tree__, NONE))
+ :
+ children_view(end(), end());
+ }
+ /** get an iterable view over all siblings (including the calling node) */
+ C4_ALWAYS_INLINE C4_PURE const_children_view siblings() const noexcept
+ {
+ _C4RV();
+ NodeData const *nd = tree_->get(id_);
+ return (nd->m_parent != NONE) ? // does it have a parent?
+ const_children_view(const_iterator(tree_, tree_->get(nd->m_parent)->m_first_child), const_iterator(tree_, NONE))
+ :
+ const_children_view(end(), end());
+ }
+ /** get an iterable view over all siblings (including the calling node) */
+ C4_ALWAYS_INLINE C4_PURE const_children_view csiblings() const noexcept { return siblings(); }
+
+ /** visit every child node calling fn(node) */
+ template<class Visitor>
+ C4_ALWAYS_INLINE C4_PURE bool visit(Visitor fn, size_t indentation_level=0, bool skip_root=true) const noexcept
+ {
+ return detail::_visit(*(ConstImpl*)this, fn, indentation_level, skip_root);
+ }
+ /** visit every child node calling fn(node) */
+ template<class Visitor, class U=Impl>
+ auto visit(Visitor fn, size_t indentation_level=0, bool skip_root=true) noexcept
+ -> _C4_IF_MUTABLE(bool)
+ {
+ return detail::_visit(*(Impl*)this, fn, indentation_level, skip_root);
+ }
+
+ /** visit every child node calling fn(node, level) */
+ template<class Visitor>
+ C4_ALWAYS_INLINE C4_PURE bool visit_stacked(Visitor fn, size_t indentation_level=0, bool skip_root=true) const noexcept
+ {
+ return detail::_visit_stacked(*(ConstImpl*)this, fn, indentation_level, skip_root);
+ }
+ /** visit every child node calling fn(node, level) */
+ template<class Visitor, class U=Impl>
+ auto visit_stacked(Visitor fn, size_t indentation_level=0, bool skip_root=true) noexcept
+ -> _C4_IF_MUTABLE(bool)
+ {
+ return detail::_visit_stacked(*(Impl*)this, fn, indentation_level, skip_root);
+ }
+
+ /** @} */
+
+ #if defined(__clang__)
+ # pragma clang diagnostic pop
+ #elif defined(__GNUC__)
+ # pragma GCC diagnostic pop
+ #endif
+
+ #undef _C4_IF_MUTABLE
+ #undef _C4RV
+ #undef tree_
+ #undef tree__
+ #undef id_
+ #undef id__
+
+ C4_SUPPRESS_WARNING_GCC_CLANG_POP
+};
+
+} // namespace detail
+
+
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+class RYML_EXPORT ConstNodeRef : public detail::RoNodeMethods<ConstNodeRef, ConstNodeRef>
+{
+public:
+
+ using tree_type = Tree const;
+
+public:
+
+ Tree const* C4_RESTRICT m_tree;
+ size_t m_id;
+
+ friend NodeRef;
+ friend struct detail::RoNodeMethods<ConstNodeRef, ConstNodeRef>;
+
+public:
+
+ /** @name construction */
/** @{ */
- C4_ALWAYS_INLINE bool is_stream() const { _C4RV(); return m_tree->is_stream(m_id); }
- C4_ALWAYS_INLINE bool is_doc() const { _C4RV(); return m_tree->is_doc(m_id); }
- C4_ALWAYS_INLINE bool is_container() const { _C4RV(); return m_tree->is_container(m_id); }
- C4_ALWAYS_INLINE bool is_map() const { _C4RV(); return m_tree->is_map(m_id); }
- C4_ALWAYS_INLINE bool is_seq() const { _C4RV(); return m_tree->is_seq(m_id); }
- C4_ALWAYS_INLINE bool has_val() const { _C4RV(); return m_tree->has_val(m_id); }
- C4_ALWAYS_INLINE bool has_key() const { _C4RV(); return m_tree->has_key(m_id); }
- C4_ALWAYS_INLINE bool is_val() const { _C4RV(); return m_tree->is_val(m_id); }
- C4_ALWAYS_INLINE bool is_keyval() const { _C4RV(); return m_tree->is_keyval(m_id); }
- C4_ALWAYS_INLINE bool has_key_tag() const { _C4RV(); return m_tree->has_key_tag(m_id); }
- C4_ALWAYS_INLINE bool has_val_tag() const { _C4RV(); return m_tree->has_val_tag(m_id); }
- C4_ALWAYS_INLINE bool has_key_anchor() const { _C4RV(); return m_tree->has_key_anchor(m_id); }
- C4_ALWAYS_INLINE bool is_key_anchor() const { _C4RV(); return m_tree->is_key_anchor(m_id); }
- C4_ALWAYS_INLINE bool has_val_anchor() const { _C4RV(); return m_tree->has_val_anchor(m_id); }
- C4_ALWAYS_INLINE bool is_val_anchor() const { _C4RV(); return m_tree->is_val_anchor(m_id); }
- C4_ALWAYS_INLINE bool has_anchor() const { _C4RV(); return m_tree->has_anchor(m_id); }
- C4_ALWAYS_INLINE bool is_anchor() const { _C4RV(); return m_tree->is_anchor(m_id); }
- C4_ALWAYS_INLINE bool is_key_ref() const { _C4RV(); return m_tree->is_key_ref(m_id); }
- C4_ALWAYS_INLINE bool is_val_ref() const { _C4RV(); return m_tree->is_val_ref(m_id); }
- C4_ALWAYS_INLINE bool is_ref() const { _C4RV(); return m_tree->is_ref(m_id); }
- C4_ALWAYS_INLINE bool is_anchor_or_ref() const { _C4RV(); return m_tree->is_anchor_or_ref(m_id); }
- C4_ALWAYS_INLINE bool is_key_quoted() const { _C4RV(); return m_tree->is_key_quoted(m_id); }
- C4_ALWAYS_INLINE bool is_val_quoted() const { _C4RV(); return m_tree->is_val_quoted(m_id); }
- C4_ALWAYS_INLINE bool is_quoted() const { _C4RV(); return m_tree->is_quoted(m_id); }
-
- C4_ALWAYS_INLINE bool parent_is_seq() const { _C4RV(); return m_tree->parent_is_seq(m_id); }
- C4_ALWAYS_INLINE bool parent_is_map() const { _C4RV(); return m_tree->parent_is_map(m_id); }
-
- /** true when name and value are empty, and has no children */
- C4_ALWAYS_INLINE bool empty() const { _C4RV(); return m_tree->empty(m_id); }
+ ConstNodeRef() : m_tree(nullptr), m_id(NONE) {}
+ ConstNodeRef(Tree const &t) : m_tree(&t), m_id(t .root_id()) {}
+ ConstNodeRef(Tree const *t) : m_tree(t ), m_id(t->root_id()) {}
+ ConstNodeRef(Tree const *t, size_t id) : m_tree(t), m_id(id) {}
+ ConstNodeRef(std::nullptr_t) : m_tree(nullptr), m_id(NONE) {}
+
+ ConstNodeRef(ConstNodeRef const&) = default;
+ ConstNodeRef(ConstNodeRef &&) = default;
+
+ ConstNodeRef(NodeRef const&);
+ ConstNodeRef(NodeRef &&);
/** @} */
public:
- /** @name hierarchy predicates */
+ /** @name assignment */
/** @{ */
- inline bool is_root() const { _C4RV(); return m_tree->is_root(m_id); }
- inline bool has_parent() const { _C4RV(); return m_tree->has_parent(m_id); }
+ ConstNodeRef& operator= (std::nullptr_t) { m_tree = nullptr; m_id = NONE; return *this; }
- inline bool has_child(NodeRef const& ch) const { _C4RV(); return m_tree->has_child(m_id, ch.m_id); }
- inline bool has_child(csubstr name) const { _C4RV(); return m_tree->has_child(m_id, name); }
- inline bool has_children() const { _C4RV(); return m_tree->has_children(m_id); }
+ ConstNodeRef& operator= (ConstNodeRef const&) = default;
+ ConstNodeRef& operator= (ConstNodeRef &&) = default;
+
+ ConstNodeRef& operator= (NodeRef const&);
+ ConstNodeRef& operator= (NodeRef &&);
- inline bool has_sibling(NodeRef const& n) const { _C4RV(); return m_tree->has_sibling(m_id, n.m_id); }
- inline bool has_sibling(csubstr name) const { _C4RV(); return m_tree->has_sibling(m_id, name); }
- /** counts with this */
- inline bool has_siblings() const { _C4RV(); return m_tree->has_siblings(m_id); }
- /** does not count with this */
- inline bool has_other_siblings() const { _C4RV(); return m_tree->has_other_siblings(m_id); }
/** @} */
public:
- /** @name hierarchy getters */
+ /** @name state queries */
/** @{ */
- NodeRef parent() { _C4RV(); return {m_tree, m_tree->parent(m_id)}; }
- NodeRef const parent() const { _C4RV(); return {m_tree, m_tree->parent(m_id)}; }
+ C4_ALWAYS_INLINE C4_PURE bool valid() const noexcept { return m_tree != nullptr && m_id != NONE; }
- NodeRef prev_sibling() { _C4RV(); return {m_tree, m_tree->prev_sibling(m_id)}; }
- NodeRef const prev_sibling() const { _C4RV(); return {m_tree, m_tree->prev_sibling(m_id)}; }
+ /** @} */
- NodeRef next_sibling() { _C4RV(); return {m_tree, m_tree->next_sibling(m_id)}; }
- NodeRef const next_sibling() const { _C4RV(); return {m_tree, m_tree->next_sibling(m_id)}; }
+public:
- /** O(#num_children) */
- size_t num_children() const { _C4RV(); return m_tree->num_children(m_id); }
- size_t child_pos(NodeRef const& n) const { _C4RV(); return m_tree->child_pos(m_id, n.m_id); }
- NodeRef first_child() { _C4RV(); return {m_tree, m_tree->first_child(m_id)}; }
- NodeRef const first_child() const { _C4RV(); return {m_tree, m_tree->first_child(m_id)}; }
- NodeRef last_child () { _C4RV(); return {m_tree, m_tree->last_child (m_id)}; }
- NodeRef const last_child () const { _C4RV(); return {m_tree, m_tree->last_child (m_id)}; }
- NodeRef child(size_t pos) { _C4RV(); return {m_tree, m_tree->child(m_id, pos)}; }
- NodeRef const child(size_t pos) const { _C4RV(); return {m_tree, m_tree->child(m_id, pos)}; }
- NodeRef find_child(csubstr name) { _C4RV(); return {m_tree, m_tree->find_child(m_id, name)}; }
- NodeRef const find_child(csubstr name) const { _C4RV(); return {m_tree, m_tree->find_child(m_id, name)}; }
+ /** @name member getters */
+ /** @{ */
- /** O(#num_siblings) */
- size_t num_siblings() const { _C4RV(); return m_tree->num_siblings(m_id); }
- size_t num_other_siblings() const { _C4RV(); return m_tree->num_other_siblings(m_id); }
- size_t sibling_pos(NodeRef const& n) const { _C4RV(); return m_tree->child_pos(m_tree->parent(m_id), n.m_id); }
- NodeRef first_sibling() { _C4RV(); return {m_tree, m_tree->first_sibling(m_id)}; }
- NodeRef const first_sibling() const { _C4RV(); return {m_tree, m_tree->first_sibling(m_id)}; }
- NodeRef last_sibling () { _C4RV(); return {m_tree, m_tree->last_sibling(m_id)}; }
- NodeRef const last_sibling () const { _C4RV(); return {m_tree, m_tree->last_sibling(m_id)}; }
- NodeRef sibling(size_t pos) { _C4RV(); return {m_tree, m_tree->sibling(m_id, pos)}; }
- NodeRef const sibling(size_t pos) const { _C4RV(); return {m_tree, m_tree->sibling(m_id, pos)}; }
- NodeRef find_sibling(csubstr name) { _C4RV(); return {m_tree, m_tree->find_sibling(m_id, name)}; }
- NodeRef const find_sibling(csubstr name) const { _C4RV(); return {m_tree, m_tree->find_sibling(m_id, name)}; }
-
- NodeRef doc(size_t num) { _C4RV(); return {m_tree, m_tree->doc(num)}; }
- NodeRef const doc(size_t num) const { _C4RV(); return {m_tree, m_tree->doc(num)}; }
+ C4_ALWAYS_INLINE C4_PURE Tree const* tree() const noexcept { return m_tree; }
+ C4_ALWAYS_INLINE C4_PURE size_t id() const noexcept { return m_id; }
+
+ /** @} */
+
+public:
+
+ /** @name comparisons */
+ /** @{ */
+
+ C4_ALWAYS_INLINE C4_PURE bool operator== (ConstNodeRef const& that) const noexcept { RYML_ASSERT(that.m_tree == m_tree); return m_id == that.m_id; }
+ C4_ALWAYS_INLINE C4_PURE bool operator!= (ConstNodeRef const& that) const noexcept { RYML_ASSERT(that.m_tree == m_tree); return ! this->operator==(that); }
+
+ C4_ALWAYS_INLINE C4_PURE bool operator== (std::nullptr_t) const noexcept { return m_tree == nullptr || m_id == NONE; }
+ C4_ALWAYS_INLINE C4_PURE bool operator!= (std::nullptr_t) const noexcept { return ! this->operator== (nullptr); }
+
+ C4_ALWAYS_INLINE C4_PURE bool operator== (csubstr val) const noexcept { RYML_ASSERT(has_val()); return m_tree->val(m_id) == val; }
+ C4_ALWAYS_INLINE C4_PURE bool operator!= (csubstr val) const noexcept { RYML_ASSERT(has_val()); return m_tree->val(m_id) != val; }
+
+ /** @} */
+
+};
+
+
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+
+/** a reference to a node in an existing yaml tree, offering a more
+ * convenient API than the index-based API used in the tree. */
+class RYML_EXPORT NodeRef : public detail::RoNodeMethods<NodeRef, ConstNodeRef>
+{
+public:
+
+ using tree_type = Tree;
+ using base_type = detail::RoNodeMethods<NodeRef, ConstNodeRef>;
+
+private:
+
+ Tree *C4_RESTRICT m_tree;
+ size_t m_id;
+
+ /** This member is used to enable lazy operator[] writing. When a child
+ * with a key or index is not found, m_id is set to the id of the parent
+ * and the asked-for key or index are stored in this member until a write
+ * does happen. Then it is given as key or index for creating the child.
+ * When a key is used, the csubstr stores it (so the csubstr's string is
+ * non-null and the csubstr's size is different from NONE). When an index is
+ * used instead, the csubstr's string is set to null, and only the csubstr's
+ * size is set to a value different from NONE. Otherwise, when operator[]
+ * does find the child then this member is empty: the string is null and
+ * the size is NONE. */
+ csubstr m_seed;
+
+ friend ConstNodeRef;
+ friend struct detail::RoNodeMethods<NodeRef, ConstNodeRef>;
+
+ // require valid: a helper macro, undefined at the end
+ #define _C4RV() \
+ RYML_ASSERT(m_tree != nullptr); \
+ _RYML_CB_ASSERT(m_tree->m_callbacks, m_id != NONE && !is_seed())
+
+public:
+
+ /** @name construction */
+ /** @{ */
+
+ NodeRef() : m_tree(nullptr), m_id(NONE), m_seed() { _clear_seed(); }
+ NodeRef(Tree &t) : m_tree(&t), m_id(t .root_id()), m_seed() { _clear_seed(); }
+ NodeRef(Tree *t) : m_tree(t ), m_id(t->root_id()), m_seed() { _clear_seed(); }
+ NodeRef(Tree *t, size_t id) : m_tree(t), m_id(id), m_seed() { _clear_seed(); }
+ NodeRef(Tree *t, size_t id, size_t seed_pos) : m_tree(t), m_id(id), m_seed() { m_seed.str = nullptr; m_seed.len = seed_pos; }
+ NodeRef(Tree *t, size_t id, csubstr seed_key) : m_tree(t), m_id(id), m_seed(seed_key) {}
+ NodeRef(std::nullptr_t) : m_tree(nullptr), m_id(NONE), m_seed() {}
+
+ /** @} */
+
+public:
+
+ /** @name assignment */
+ /** @{ */
+
+ NodeRef(NodeRef const&) = default;
+ NodeRef(NodeRef &&) = default;
+
+ NodeRef& operator= (NodeRef const&) = default;
+ NodeRef& operator= (NodeRef &&) = default;
+
+ /** @} */
+
+public:
+
+ /** @name state queries */
+ /** @{ */
+
+ inline bool valid() const { return m_tree != nullptr && m_id != NONE; }
+ inline bool is_seed() const { return m_seed.str != nullptr || m_seed.len != NONE; }
+
+ inline void _clear_seed() { /*do this manually or an assert is triggered*/ m_seed.str = nullptr; m_seed.len = NONE; }
+
+ /** @} */
+
+public:
+
+ /** @name comparisons */
+ /** @{ */
+
+ inline bool operator== (NodeRef const& that) const { _C4RV(); RYML_ASSERT(that.valid() && !that.is_seed()); RYML_ASSERT(that.m_tree == m_tree); return m_id == that.m_id; }
+ inline bool operator!= (NodeRef const& that) const { return ! this->operator==(that); }
+
+ inline bool operator== (ConstNodeRef const& that) const { _C4RV(); RYML_ASSERT(that.valid()); RYML_ASSERT(that.m_tree == m_tree); return m_id == that.m_id; }
+ inline bool operator!= (ConstNodeRef const& that) const { return ! this->operator==(that); }
+
+ inline bool operator== (std::nullptr_t) const { return m_tree == nullptr || m_id == NONE || is_seed(); }
+ inline bool operator!= (std::nullptr_t) const { return m_tree != nullptr && m_id != NONE && !is_seed(); }
+
+ inline bool operator== (csubstr val) const { _C4RV(); RYML_ASSERT(has_val()); return m_tree->val(m_id) == val; }
+ inline bool operator!= (csubstr val) const { _C4RV(); RYML_ASSERT(has_val()); return m_tree->val(m_id) != val; }
+
+ //inline operator bool () const { return m_tree == nullptr || m_id == NONE || is_seed(); }
+
+ /** @} */
+
+public:
+
+ /** @name node property getters */
+ /** @{ */
+
+ C4_ALWAYS_INLINE C4_PURE Tree * tree() noexcept { return m_tree; }
+ C4_ALWAYS_INLINE C4_PURE Tree const* tree() const noexcept { return m_tree; }
+
+ C4_ALWAYS_INLINE C4_PURE size_t id() const noexcept { return m_id; }
/** @} */
@@ -18736,6 +21081,7 @@ public:
/** @{ */
void change_type(NodeType t) { _C4RV(); m_tree->change_type(m_id, t); }
+
void set_type(NodeType t) { _C4RV(); m_tree->_set_flags(m_id, t); }
void set_key(csubstr key) { _C4RV(); m_tree->_set_key(m_id, key); }
void set_val(csubstr val) { _C4RV(); m_tree->_set_val(m_id, val); }
@@ -18762,6 +21108,12 @@ public:
m_tree->_set_val(m_id, s);
return s.len;
}
+ size_t set_val_serialized(std::nullptr_t)
+ {
+ _C4RV();
+ m_tree->_set_val(m_id, csubstr{});
+ return 0;
+ }
/** encode a blob as base64, then assign the result to the node's key
* @return the size of base64-encoded blob */
@@ -18801,62 +21153,6 @@ public:
m_tree->remove_children(m_id);
}
- /** @} */
-
-public:
-
- /** hierarchy getters */
- /** @{ */
-
- /** O(num_children) */
- NodeRef operator[] (csubstr k)
- {
- RYML_ASSERT( ! is_seed());
- RYML_ASSERT(valid());
- size_t ch = m_tree->find_child(m_id, k);
- NodeRef r = ch != NONE ? NodeRef(m_tree, ch) : NodeRef(m_tree, m_id, k);
- return r;
- }
-
- /** O(num_children) */
- NodeRef const operator[] (csubstr k) const
- {
- RYML_ASSERT( ! is_seed());
- RYML_ASSERT(valid());
- size_t ch = m_tree->find_child(m_id, k);
- RYML_ASSERT(ch != NONE);
- NodeRef const r(m_tree, ch);
- return r;
- }
-
- /** O(num_children) */
- NodeRef operator[] (size_t pos)
- {
- RYML_ASSERT( ! is_seed());
- RYML_ASSERT(valid());
- size_t ch = m_tree->child(m_id, pos);
- NodeRef r = ch != NONE ? NodeRef(m_tree, ch) : NodeRef(m_tree, m_id, pos);
- return r;
- }
-
- /** O(num_children) */
- NodeRef const operator[] (size_t pos) const
- {
- RYML_ASSERT( ! is_seed());
- RYML_ASSERT(valid());
- size_t ch = m_tree->child(m_id, pos);
- RYML_ASSERT(ch != NONE);
- NodeRef const r(m_tree, ch);
- return r;
- }
-
- /** @} */
-
-public:
-
- /** node modification */
- /** @{ */
-
void create() { _apply_seed(); }
inline void operator= (NodeType_e t)
@@ -18883,6 +21179,12 @@ public:
_apply(v);
}
+ inline void operator= (std::nullptr_t)
+ {
+ _apply_seed();
+ _apply(csubstr{});
+ }
+
inline void operator= (csubstr v)
{
_apply_seed();
@@ -18902,9 +21204,12 @@ public:
public:
+ /** @name serialization */
+ /** @{ */
+
/** serialize a variable to the arena */
template<class T>
- inline csubstr to_arena(T const& C4_RESTRICT s) const
+ inline csubstr to_arena(T const& C4_RESTRICT s)
{
_C4RV();
return m_tree->to_arena(s);
@@ -18929,21 +21234,6 @@ public:
return *this;
}
- template<class T>
- inline NodeRef const& operator>> (T &v) const
- {
- RYML_ASSERT( ! is_seed());
- RYML_ASSERT(valid());
- RYML_ASSERT(get() != nullptr);
- if( ! read(*this, &v))
- {
- c4::yml::error("could not deserialize value");
- }
- return *this;
- }
-
-public:
-
/** serialize a variable, then assign the result to the node's key */
template<class T>
inline NodeRef& operator<< (Key<const T> const& C4_RESTRICT v)
@@ -18962,19 +21252,6 @@ public:
return *this;
}
- /** deserialize the node's key to the given variable */
- template<class T>
- inline NodeRef const& operator>> (Key<T> v) const
- {
- RYML_ASSERT( ! is_seed());
- RYML_ASSERT(valid());
- RYML_ASSERT(get() != nullptr);
- from_chars(key(), &v.k);
- return *this;
- }
-
-public:
-
NodeRef& operator<< (Key<fmt::const_base64_wrapper> w)
{
set_key_serialized(w.wrapper);
@@ -18987,43 +21264,7 @@ public:
return *this;
}
- NodeRef const& operator>> (Key<fmt::base64_wrapper> w) const
- {
- deserialize_key(w.wrapper);
- return *this;
- }
-
- NodeRef const& operator>> (fmt::base64_wrapper w) const
- {
- deserialize_val(w);
- return *this;
- }
-
-public:
-
- template<class T>
- void get_if(csubstr name, T *var) const
- {
- auto ch = find_child(name);
- if(ch.valid())
- {
- ch >> *var;
- }
- }
-
- template<class T>
- void get_if(csubstr name, T *var, T fallback) const
- {
- auto ch = find_child(name);
- if(ch.valid())
- {
- ch >> *var;
- }
- else
- {
- *var = fallback;
- }
- }
+ /** @} */
private:
@@ -19067,6 +21308,9 @@ private:
public:
+ /** @name modification of hierarchy */
+ /** @{ */
+
inline NodeRef insert_child(NodeRef after)
{
_C4RV();
@@ -19116,7 +21360,7 @@ public:
public:
- inline NodeRef insert_sibling(NodeRef const after)
+ inline NodeRef insert_sibling(ConstNodeRef const& after)
{
_C4RV();
RYML_ASSERT(after.m_tree == m_tree);
@@ -19124,7 +21368,7 @@ public:
return r;
}
- inline NodeRef insert_sibling(NodeInit const& i, NodeRef const after)
+ inline NodeRef insert_sibling(NodeInit const& i, ConstNodeRef const& after)
{
_C4RV();
RYML_ASSERT(after.m_tree == m_tree);
@@ -19195,20 +21439,23 @@ public:
public:
- /** change the node's position within its parent */
- inline void move(NodeRef const after)
+ /** change the node's position within its parent, placing it after
+ * @p after. To move to the first position in the parent, simply
+ * pass an empty or default-constructed reference like this:
+ * `n.move({})`. */
+ inline void move(ConstNodeRef const& after)
{
_C4RV();
m_tree->move(m_id, after.m_id);
}
- /** move the node to a different parent, which may belong to a different
- * tree. When this is the case, then this node's tree pointer is reset to
- * the tree of the parent node. */
- inline void move(NodeRef const parent, NodeRef const after)
+ /** move the node to a different @p parent (which may belong to a
+ * different tree), placing it after @p after. When the
+ * destination parent is in a new tree, then this node's tree
+ * pointer is reset to the tree of the parent node. */
+ inline void move(NodeRef const& parent, ConstNodeRef const& after)
{
_C4RV();
- RYML_ASSERT(parent.m_tree == after.m_tree);
if(parent.m_tree == m_tree)
{
m_tree->move(m_id, parent.m_id, after.m_id);
@@ -19220,10 +21467,28 @@ public:
}
}
- inline NodeRef duplicate(NodeRef const parent, NodeRef const after) const
+ /** duplicate the current node somewhere within its parent, and
+ * place it after the node @p after. To place into the first
+ * position of the parent, simply pass an empty or
+ * default-constructed reference like this: `n.move({})`. */
+ inline NodeRef duplicate(ConstNodeRef const& after) const
{
_C4RV();
- RYML_ASSERT(parent.m_tree == after.m_tree);
+ RYML_ASSERT(m_tree == after.m_tree || after.m_id == NONE);
+ size_t dup = m_tree->duplicate(m_id, m_tree->parent(m_id), after.m_id);
+ NodeRef r(m_tree, dup);
+ return r;
+ }
+
+ /** duplicate the current node somewhere into a different @p parent
+ * (possibly from a different tree), and place it after the node
+ * @p after. To place into the first position of the parent,
+ * simply pass an empty or default-constructed reference like
+ * this: `n.move({})`. */
+ inline NodeRef duplicate(NodeRef const& parent, ConstNodeRef const& after) const
+ {
+ _C4RV();
+ RYML_ASSERT(parent.m_tree == after.m_tree || after.m_id == NONE);
if(parent.m_tree == m_tree)
{
size_t dup = m_tree->duplicate(m_id, parent.m_id, after.m_id);
@@ -19238,7 +21503,7 @@ public:
}
}
- inline void duplicate_children(NodeRef const parent, NodeRef const after) const
+ inline void duplicate_children(NodeRef const& parent, ConstNodeRef const& after) const
{
_C4RV();
RYML_ASSERT(parent.m_tree == after.m_tree);
@@ -19252,97 +21517,44 @@ public:
}
}
-private:
-
- template<class Nd>
- struct child_iterator
- {
- Tree * m_tree;
- size_t m_child_id;
-
- using value_type = NodeRef;
-
- child_iterator(Tree * t, size_t id) : m_tree(t), m_child_id(id) {}
-
- child_iterator& operator++ () { RYML_ASSERT(m_child_id != NONE); m_child_id = m_tree->next_sibling(m_child_id); return *this; }
- child_iterator& operator-- () { RYML_ASSERT(m_child_id != NONE); m_child_id = m_tree->prev_sibling(m_child_id); return *this; }
-
- Nd operator* () const { return Nd(m_tree, m_child_id); }
- Nd operator-> () const { return Nd(m_tree, m_child_id); }
-
- bool operator!= (child_iterator that) const { RYML_ASSERT(m_tree == that.m_tree); return m_child_id != that.m_child_id; }
- bool operator== (child_iterator that) const { RYML_ASSERT(m_tree == that.m_tree); return m_child_id == that.m_child_id; }
- };
-
-public:
-
- using iterator = child_iterator< NodeRef>;
- using const_iterator = child_iterator<const NodeRef>;
-
- inline iterator begin() { return iterator(m_tree, m_tree->first_child(m_id)); }
- inline iterator end () { return iterator(m_tree, NONE); }
-
- inline const_iterator begin() const { return const_iterator(m_tree, m_tree->first_child(m_id)); }
- inline const_iterator end () const { return const_iterator(m_tree, NONE); }
-
-private:
-
- template<class Nd>
- struct children_view_
- {
- using n_iterator = child_iterator<Nd>;
-
- n_iterator b, e;
-
- inline children_view_(n_iterator const& b_, n_iterator const& e_) : b(b_), e(e_) {}
-
- inline n_iterator begin() const { return b; }
- inline n_iterator end () const { return e; }
- };
-
-public:
+ /** @} */
- using children_view = children_view_< NodeRef>;
- using const_children_view = children_view_<const NodeRef>;
+#undef _C4RV
+};
- children_view children() { return children_view(begin(), end()); }
- const_children_view children() const { return const_children_view(begin(), end()); }
- #if defined(__clang__)
- # pragma clang diagnostic push
- # pragma clang diagnostic ignored "-Wnull-dereference"
- #elif defined(__GNUC__)
- # pragma GCC diagnostic push
- # if __GNUC__ >= 6
- # pragma GCC diagnostic ignored "-Wnull-dereference"
- # endif
- #endif
+//-----------------------------------------------------------------------------
- children_view siblings() { if(is_root()) { return children_view(end(), end()); } else { size_t p = get()->m_parent; return children_view(iterator(m_tree, m_tree->get(p)->m_first_child), iterator(m_tree, NONE)); } }
- const_children_view siblings() const { if(is_root()) { return const_children_view(end(), end()); } else { size_t p = get()->m_parent; return const_children_view(const_iterator(m_tree, m_tree->get(p)->m_first_child), const_iterator(m_tree, NONE)); } }
+inline ConstNodeRef::ConstNodeRef(NodeRef const& that)
+ : m_tree(that.m_tree)
+ , m_id(!that.is_seed() ? that.id() : NONE)
+{
+}
- #if defined(__clang__)
- # pragma clang diagnostic pop
- #elif defined(__GNUC__)
- # pragma GCC diagnostic pop
- #endif
+inline ConstNodeRef::ConstNodeRef(NodeRef && that)
+ : m_tree(that.m_tree)
+ , m_id(!that.is_seed() ? that.id() : NONE)
+{
+}
-public:
- /** visit every child node calling fn(node) */
- template<class Visitor> bool visit(Visitor fn, size_t indentation_level=0, bool skip_root=true);
- /** visit every child node calling fn(node) */
- template<class Visitor> bool visit(Visitor fn, size_t indentation_level=0, bool skip_root=true) const;
+inline ConstNodeRef& ConstNodeRef::operator= (NodeRef const& that)
+{
+ m_tree = (that.m_tree);
+ m_id = (!that.is_seed() ? that.id() : NONE);
+ return *this;
+}
- /** visit every child node calling fn(node, level) */
- template<class Visitor> bool visit_stacked(Visitor fn, size_t indentation_level=0, bool skip_root=true);
- /** visit every child node calling fn(node, level) */
- template<class Visitor> bool visit_stacked(Visitor fn, size_t indentation_level=0, bool skip_root=true) const;
+inline ConstNodeRef& ConstNodeRef::operator= (NodeRef && that)
+{
+ m_tree = (that.m_tree);
+ m_id = (!that.is_seed() ? that.id() : NONE);
+ return *this;
+}
-#undef _C4RV
-};
//-----------------------------------------------------------------------------
+
template<class T>
inline void write(NodeRef *n, T const& v)
{
@@ -19355,82 +21567,27 @@ inline read(NodeRef const& n, T *v)
{
return from_chars(n.val(), v);
}
-
template<class T>
-typename std::enable_if< std::is_floating_point<T>::value, bool>::type
-inline read(NodeRef const& n, T *v)
+typename std::enable_if< ! std::is_floating_point<T>::value, bool>::type
+inline read(ConstNodeRef const& n, T *v)
{
- return from_chars_float(n.val(), v);
+ return from_chars(n.val(), v);
}
-
-//-----------------------------------------------------------------------------
-template<class Visitor>
-bool NodeRef::visit(Visitor fn, size_t indentation_level, bool skip_root)
+template<class T>
+typename std::enable_if<std::is_floating_point<T>::value, bool>::type
+inline read(NodeRef const& n, T *v)
{
- return const_cast<NodeRef const*>(this)->visit(fn, indentation_level, skip_root);
+ return from_chars_float(n.val(), v);
}
-
-template<class Visitor>
-bool NodeRef::visit(Visitor fn, size_t indentation_level, bool skip_root) const
+template<class T>
+typename std::enable_if<std::is_floating_point<T>::value, bool>::type
+inline read(ConstNodeRef const& n, T *v)
{
- size_t increment = 0;
- if( ! (is_root() && skip_root))
- {
- if(fn(this, indentation_level))
- {
- return true;
- }
- ++increment;
- }
- if(has_children())
- {
- for(auto ch : children())
- {
- if(ch.visit(fn, indentation_level + increment)) // no need to forward skip_root as it won't be root
- {
- return true;
- }
- }
- }
- return false;
+ return from_chars_float(n.val(), v);
}
-template<class Visitor>
-bool NodeRef::visit_stacked(Visitor fn, size_t indentation_level, bool skip_root)
-{
- return const_cast< NodeRef const* >(this)->visit_stacked(fn, indentation_level, skip_root);
-}
-
-template<class Visitor>
-bool NodeRef::visit_stacked(Visitor fn, size_t indentation_level, bool skip_root) const
-{
- size_t increment = 0;
- if( ! (is_root() && skip_root))
- {
- if(fn(this, indentation_level))
- {
- return true;
- }
- ++increment;
- }
- if(has_children())
- {
- fn.push(this, indentation_level);
- for(auto ch : children())
- {
- if(ch.visit(fn, indentation_level + increment)) // no need to forward skip_root as it won't be root
- {
- fn.pop(this, indentation_level);
- return true;
- }
- }
- fn.pop(this, indentation_level);
- }
- return false;
-}
-
} // namespace yml
} // namespace c4
@@ -19881,6 +22038,20 @@ inline void __c4presc(const char *s, size_t len)
#include "./node.hpp"
#endif
+
+#define RYML_DEPRECATE_EMIT \
+ RYML_DEPRECATED("use emit_yaml() instead. See https://github.com/biojppm/rapidyaml/issues/120")
+#ifdef emit
+#error "emit is defined, likely from a Qt include. This will cause a compilation error. See https://github.com/biojppm/rapidyaml/issues/120"
+#endif
+#define RYML_DEPRECATE_EMITRS \
+ RYML_DEPRECATED("use emitrs_yaml() instead. See https://github.com/biojppm/rapidyaml/issues/120")
+
+
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+
namespace c4 {
namespace yml {
@@ -19904,7 +22075,7 @@ struct as_json
size_t node;
as_json(Tree const& t) : tree(&t), node(t.empty() ? NONE : t.root_id()) {}
as_json(Tree const& t, size_t id) : tree(&t), node(id) {}
- as_json(NodeRef const& n) : tree(n.tree()), node(n.id()) {}
+ as_json(ConstNodeRef const& n) : tree(n.tree()), node(n.id()) {}
};
@@ -19928,11 +22099,11 @@ public:
*
* When writing to a file, the returned substr will be null, but its
* length will be set to the number of bytes written. */
- substr emit(EmitType_e type, Tree const& t, size_t id, bool error_on_excess);
+ substr emit_as(EmitType_e type, Tree const& t, size_t id, bool error_on_excess);
/** emit starting at the root node */
- substr emit(EmitType_e type, Tree const& t, bool error_on_excess=true);
+ substr emit_as(EmitType_e type, Tree const& t, bool error_on_excess=true);
/** emit the given node */
- substr emit(EmitType_e type, NodeRef const& n, bool error_on_excess=true);
+ substr emit_as(EmitType_e type, ConstNodeRef const& n, bool error_on_excess=true);
private:
@@ -19988,27 +22159,36 @@ private:
/** emit YAML to the given file. A null file defaults to stdout.
* Return the number of bytes written. */
-inline size_t emit(Tree const& t, size_t id, FILE *f)
+inline size_t emit_yaml(Tree const& t, size_t id, FILE *f)
{
EmitterFile em(f);
- return em.emit(EMIT_YAML, t, id, /*error_on_excess*/true).len;
+ return em.emit_as(EMIT_YAML, t, id, /*error_on_excess*/true).len;
}
+RYML_DEPRECATE_EMIT inline size_t emit(Tree const& t, size_t id, FILE *f)
+{
+ return emit_yaml(t, id, f);
+}
+
/** emit JSON to the given file. A null file defaults to stdout.
* Return the number of bytes written. */
inline size_t emit_json(Tree const& t, size_t id, FILE *f)
{
EmitterFile em(f);
- return em.emit(EMIT_JSON, t, id, /*error_on_excess*/true).len;
+ return em.emit_as(EMIT_JSON, t, id, /*error_on_excess*/true).len;
}
/** emit YAML to the given file. A null file defaults to stdout.
* Return the number of bytes written.
* @overload */
-inline size_t emit(Tree const& t, FILE *f=nullptr)
+inline size_t emit_yaml(Tree const& t, FILE *f=nullptr)
{
EmitterFile em(f);
- return em.emit(EMIT_YAML, t, /*error_on_excess*/true).len;
+ return em.emit_as(EMIT_YAML, t, /*error_on_excess*/true).len;
+}
+RYML_DEPRECATE_EMIT inline size_t emit(Tree const& t, FILE *f=nullptr)
+{
+ return emit_yaml(t, f);
}
/** emit JSON to the given file. A null file defaults to stdout.
@@ -20017,26 +22197,30 @@ inline size_t emit(Tree const& t, FILE *f=nullptr)
inline size_t emit_json(Tree const& t, FILE *f=nullptr)
{
EmitterFile em(f);
- return em.emit(EMIT_JSON, t, /*error_on_excess*/true).len;
+ return em.emit_as(EMIT_JSON, t, /*error_on_excess*/true).len;
}
/** emit YAML to the given file. A null file defaults to stdout.
* Return the number of bytes written.
* @overload */
-inline size_t emit(NodeRef const& r, FILE *f=nullptr)
+inline size_t emit_yaml(ConstNodeRef const& r, FILE *f=nullptr)
{
EmitterFile em(f);
- return em.emit(EMIT_YAML, r, /*error_on_excess*/true).len;
+ return em.emit_as(EMIT_YAML, r, /*error_on_excess*/true).len;
+}
+RYML_DEPRECATE_EMIT inline size_t emit(ConstNodeRef const& r, FILE *f=nullptr)
+{
+ return emit_yaml(r, f);
}
/** emit JSON to the given file. A null file defaults to stdout.
* Return the number of bytes written.
* @overload */
-inline size_t emit_json(NodeRef const& r, FILE *f=nullptr)
+inline size_t emit_json(ConstNodeRef const& r, FILE *f=nullptr)
{
EmitterFile em(f);
- return em.emit(EMIT_JSON, r, /*error_on_excess*/true).len;
+ return em.emit_as(EMIT_JSON, r, /*error_on_excess*/true).len;
}
@@ -20047,17 +22231,17 @@ template<class OStream>
inline OStream& operator<< (OStream& s, Tree const& t)
{
EmitterOStream<OStream> em(s);
- em.emit(EMIT_YAML, t);
+ em.emit_as(EMIT_YAML, t);
return s;
}
/** emit YAML to an STL-like ostream
* @overload */
template<class OStream>
-inline OStream& operator<< (OStream& s, NodeRef const& n)
+inline OStream& operator<< (OStream& s, ConstNodeRef const& n)
{
EmitterOStream<OStream> em(s);
- em.emit(EMIT_YAML, n);
+ em.emit_as(EMIT_YAML, n);
return s;
}
@@ -20066,7 +22250,7 @@ template<class OStream>
inline OStream& operator<< (OStream& s, as_json const& j)
{
EmitterOStream<OStream> em(s);
- em.emit(EMIT_JSON, *j.tree, j.node, true);
+ em.emit_as(EMIT_JSON, *j.tree, j.node, true);
return s;
}
@@ -20077,10 +22261,14 @@ inline OStream& operator<< (OStream& s, as_json const& j)
/** emit YAML to the given buffer. Return a substr trimmed to the emitted YAML.
* @param error_on_excess Raise an error if the space in the buffer is insufficient.
* @overload */
-inline substr emit(Tree const& t, size_t id, substr buf, bool error_on_excess=true)
+inline substr emit_yaml(Tree const& t, size_t id, substr buf, bool error_on_excess=true)
{
EmitterBuf em(buf);
- return em.emit(EMIT_YAML, t, id, error_on_excess);
+ return em.emit_as(EMIT_YAML, t, id, error_on_excess);
+}
+RYML_DEPRECATE_EMIT inline substr emit(Tree const& t, size_t id, substr buf, bool error_on_excess=true)
+{
+ return emit_yaml(t, id, buf, error_on_excess);
}
/** emit JSON to the given buffer. Return a substr trimmed to the emitted JSON.
@@ -20089,17 +22277,21 @@ inline substr emit(Tree const& t, size_t id, substr buf, bool error_on_excess=tr
inline substr emit_json(Tree const& t, size_t id, substr buf, bool error_on_excess=true)
{
EmitterBuf em(buf);
- return em.emit(EMIT_JSON, t, id, error_on_excess);
+ return em.emit_as(EMIT_JSON, t, id, error_on_excess);
}
/** emit YAML to the given buffer. Return a substr trimmed to the emitted YAML.
* @param error_on_excess Raise an error if the space in the buffer is insufficient.
* @overload */
-inline substr emit(Tree const& t, substr buf, bool error_on_excess=true)
+inline substr emit_yaml(Tree const& t, substr buf, bool error_on_excess=true)
{
EmitterBuf em(buf);
- return em.emit(EMIT_YAML, t, error_on_excess);
+ return em.emit_as(EMIT_YAML, t, error_on_excess);
+}
+RYML_DEPRECATE_EMIT inline substr emit(Tree const& t, substr buf, bool error_on_excess=true)
+{
+ return emit_yaml(t, buf, error_on_excess);
}
/** emit JSON to the given buffer. Return a substr trimmed to the emitted JSON.
@@ -20108,7 +22300,7 @@ inline substr emit(Tree const& t, substr buf, bool error_on_excess=true)
inline substr emit_json(Tree const& t, substr buf, bool error_on_excess=true)
{
EmitterBuf em(buf);
- return em.emit(EMIT_JSON, t, error_on_excess);
+ return em.emit_as(EMIT_JSON, t, error_on_excess);
}
@@ -20116,20 +22308,24 @@ inline substr emit_json(Tree const& t, substr buf, bool error_on_excess=true)
* @param error_on_excess Raise an error if the space in the buffer is insufficient.
* @overload
*/
-inline substr emit(NodeRef const& r, substr buf, bool error_on_excess=true)
+inline substr emit_yaml(ConstNodeRef const& r, substr buf, bool error_on_excess=true)
{
EmitterBuf em(buf);
- return em.emit(EMIT_YAML, r, error_on_excess);
+ return em.emit_as(EMIT_YAML, r, error_on_excess);
+}
+RYML_DEPRECATE_EMIT inline substr emit(ConstNodeRef const& r, substr buf, bool error_on_excess=true)
+{
+ return emit_yaml(r, buf, error_on_excess);
}
/** emit JSON to the given buffer. Return a substr trimmed to the emitted JSON.
* @param error_on_excess Raise an error if the space in the buffer is insufficient.
* @overload
*/
-inline substr emit_json(NodeRef const& r, substr buf, bool error_on_excess=true)
+inline substr emit_json(ConstNodeRef const& r, substr buf, bool error_on_excess=true)
{
EmitterBuf em(buf);
- return em.emit(EMIT_JSON, r, error_on_excess);
+ return em.emit_as(EMIT_JSON, r, error_on_excess);
}
@@ -20138,18 +22334,23 @@ inline substr emit_json(NodeRef const& r, substr buf, bool error_on_excess=true)
/** emit+resize: emit YAML to the given std::string/std::vector-like
* container, resizing it as needed to fit the emitted YAML. */
template<class CharOwningContainer>
-substr emitrs(Tree const& t, size_t id, CharOwningContainer * cont)
+substr emitrs_yaml(Tree const& t, size_t id, CharOwningContainer * cont)
{
substr buf = to_substr(*cont);
- substr ret = emit(t, id, buf, /*error_on_excess*/false);
+ substr ret = emit_yaml(t, id, buf, /*error_on_excess*/false);
if(ret.str == nullptr && ret.len > 0)
{
cont->resize(ret.len);
buf = to_substr(*cont);
- ret = emit(t, id, buf, /*error_on_excess*/true);
+ ret = emit_yaml(t, id, buf, /*error_on_excess*/true);
}
return ret;
}
+template<class CharOwningContainer>
+RYML_DEPRECATE_EMITRS substr emitrs(Tree const& t, size_t id, CharOwningContainer * cont)
+{
+ return emitrs_yaml(t, id, cont);
+}
/** emit+resize: emit JSON to the given std::string/std::vector-like
* container, resizing it as needed to fit the emitted JSON. */
@@ -20171,15 +22372,22 @@ substr emitrs_json(Tree const& t, size_t id, CharOwningContainer * cont)
/** emit+resize: emit YAML to the given std::string/std::vector-like
* container, resizing it as needed to fit the emitted YAML. */
template<class CharOwningContainer>
-CharOwningContainer emitrs(Tree const& t, size_t id)
+CharOwningContainer emitrs_yaml(Tree const& t, size_t id)
{
CharOwningContainer c;
- emitrs(t, id, &c);
+ emitrs_yaml(t, id, &c);
+ return c;
+}
+template<class CharOwningContainer>
+RYML_DEPRECATE_EMITRS CharOwningContainer emitrs(Tree const& t, size_t id)
+{
+ CharOwningContainer c;
+ emitrs_yaml(t, id, &c);
return c;
}
-/** emit+resize: emit JSON to the given std::string/std::vector-like container,
- * resizing it as needed to fit the emitted JSON. */
+/** emit+resize: emit JSON to the given std::string/std::vector-like
+ * container, resizing it as needed to fit the emitted JSON. */
template<class CharOwningContainer>
CharOwningContainer emitrs_json(Tree const& t, size_t id)
{
@@ -20189,18 +22397,23 @@ CharOwningContainer emitrs_json(Tree const& t, size_t id)
}
-/** emit+resize: YAML to the given std::string/std::vector-like container,
- * resizing it as needed to fit the emitted YAML. */
+/** emit+resize: YAML to the given std::string/std::vector-like
+ * container, resizing it as needed to fit the emitted YAML. */
template<class CharOwningContainer>
-substr emitrs(Tree const& t, CharOwningContainer * cont)
+substr emitrs_yaml(Tree const& t, CharOwningContainer * cont)
{
if(t.empty())
return {};
- return emitrs(t, t.root_id(), cont);
+ return emitrs_yaml(t, t.root_id(), cont);
+}
+template<class CharOwningContainer>
+RYML_DEPRECATE_EMITRS substr emitrs(Tree const& t, CharOwningContainer * cont)
+{
+ return emitrs_yaml(t, cont);
}
-/** emit+resize: JSON to the given std::string/std::vector-like container,
- * resizing it as needed to fit the emitted JSON. */
+/** emit+resize: JSON to the given std::string/std::vector-like
+ * container, resizing it as needed to fit the emitted JSON. */
template<class CharOwningContainer>
substr emitrs_json(Tree const& t, CharOwningContainer * cont)
{
@@ -20213,14 +22426,19 @@ substr emitrs_json(Tree const& t, CharOwningContainer * cont)
/** emit+resize: YAML to the given std::string/std::vector-like container,
* resizing it as needed to fit the emitted YAML. */
template<class CharOwningContainer>
-CharOwningContainer emitrs(Tree const& t)
+CharOwningContainer emitrs_yaml(Tree const& t)
{
CharOwningContainer c;
if(t.empty())
return c;
- emitrs(t, t.root_id(), &c);
+ emitrs_yaml(t, t.root_id(), &c);
return c;
}
+template<class CharOwningContainer>
+RYML_DEPRECATE_EMITRS CharOwningContainer emitrs(Tree const& t)
+{
+ return emitrs_yaml<CharOwningContainer>(t);
+}
/** emit+resize: JSON to the given std::string/std::vector-like container,
* resizing it as needed to fit the emitted JSON. */
@@ -20238,16 +22456,21 @@ CharOwningContainer emitrs_json(Tree const& t)
/** emit+resize: YAML to the given std::string/std::vector-like container,
* resizing it as needed to fit the emitted YAML. */
template<class CharOwningContainer>
-substr emitrs(NodeRef const& n, CharOwningContainer * cont)
+substr emitrs_yaml(ConstNodeRef const& n, CharOwningContainer * cont)
{
_RYML_CB_CHECK(n.tree()->callbacks(), n.valid());
- return emitrs(*n.tree(), n.id(), cont);
+ return emitrs_yaml(*n.tree(), n.id(), cont);
+}
+template<class CharOwningContainer>
+RYML_DEPRECATE_EMITRS substr emitrs(ConstNodeRef const& n, CharOwningContainer * cont)
+{
+ return emitrs_yaml(n, cont);
}
/** emit+resize: JSON to the given std::string/std::vector-like container,
* resizing it as needed to fit the emitted JSON. */
template<class CharOwningContainer>
-substr emitrs_json(NodeRef const& n, CharOwningContainer * cont)
+substr emitrs_json(ConstNodeRef const& n, CharOwningContainer * cont)
{
_RYML_CB_CHECK(n.tree()->callbacks(), n.valid());
return emitrs_json(*n.tree(), n.id(), cont);
@@ -20257,18 +22480,23 @@ substr emitrs_json(NodeRef const& n, CharOwningContainer * cont)
/** emit+resize: YAML to the given std::string/std::vector-like container,
* resizing it as needed to fit the emitted YAML. */
template<class CharOwningContainer>
-CharOwningContainer emitrs(NodeRef const& n)
+CharOwningContainer emitrs_yaml(ConstNodeRef const& n)
{
_RYML_CB_CHECK(n.tree()->callbacks(), n.valid());
CharOwningContainer c;
- emitrs(*n.tree(), n.id(), &c);
+ emitrs_yaml(*n.tree(), n.id(), &c);
return c;
}
+template<class CharOwningContainer>
+RYML_DEPRECATE_EMITRS CharOwningContainer emitrs(ConstNodeRef const& n)
+{
+ return emitrs_yaml<CharOwningContainer>(n);
+}
/** emit+resize: JSON to the given std::string/std::vector-like container,
* resizing it as needed to fit the emitted JSON. */
template<class CharOwningContainer>
-CharOwningContainer emitrs_json(NodeRef const& n)
+CharOwningContainer emitrs_json(ConstNodeRef const& n)
{
_RYML_CB_CHECK(n.tree()->callbacks(), n.valid());
CharOwningContainer c;
@@ -20279,6 +22507,9 @@ CharOwningContainer emitrs_json(NodeRef const& n)
} // namespace yml
} // namespace c4
+#undef RYML_DEPRECATE_EMIT
+#undef RYML_DEPRECATE_EMITRS
+
// amalgamate: removed include of
// https://github.com/biojppm/rapidyaml/src/c4/yml/emit.def.hpp
//#include "c4/yml/emit.def.hpp"
@@ -20318,7 +22549,7 @@ namespace c4 {
namespace yml {
template<class Writer>
-substr Emitter<Writer>::emit(EmitType_e type, Tree const& t, size_t id, bool error_on_excess)
+substr Emitter<Writer>::emit_as(EmitType_e type, Tree const& t, size_t id, bool error_on_excess)
{
if(t.empty())
{
@@ -20337,18 +22568,18 @@ substr Emitter<Writer>::emit(EmitType_e type, Tree const& t, size_t id, bool err
}
template<class Writer>
-substr Emitter<Writer>::emit(EmitType_e type, Tree const& t, bool error_on_excess)
+substr Emitter<Writer>::emit_as(EmitType_e type, Tree const& t, bool error_on_excess)
{
if(t.empty())
return {};
- return emit(type, t, t.root_id(), error_on_excess);
+ return this->emit_as(type, t, t.root_id(), error_on_excess);
}
template<class Writer>
-substr Emitter<Writer>::emit(EmitType_e type, NodeRef const& n, bool error_on_excess)
+substr Emitter<Writer>::emit_as(EmitType_e type, ConstNodeRef const& n, bool error_on_excess)
{
_RYML_CB_CHECK(n.tree()->callbacks(), n.valid());
- return emit(type, *n.tree(), n.id(), error_on_excess);
+ return this->emit_as(type, *n.tree(), n.id(), error_on_excess);
}
@@ -21076,6 +23307,13 @@ void Emitter<Writer>::_write_scalar_dquo(csubstr s, size_t ilevel)
pos = i;
}
}
+ else if(C4_UNLIKELY(curr == '\r'))
+ {
+ csubstr sub = s.range(pos, i);
+ this->Writer::_do_write(sub); // write everything up to (excluding) this char
+ this->Writer::_do_write("\\r"); // write the escaped char
+ pos = i+1;
+ }
}
// write missing characters at the end of the string
if(pos < s.len)
@@ -21121,7 +23359,7 @@ void Emitter<Writer>::_write_scalar(csubstr s, bool was_quoted)
// was evaluated as true even if s.str was actually a nullptr (!!!)
if(s.len == size_t(0))
{
- if(was_quoted)
+ if(was_quoted || s.str != nullptr)
this->Writer::_do_write("''");
return;
}
@@ -21134,10 +23372,10 @@ void Emitter<Writer>::_write_scalar(csubstr s, bool was_quoted)
&&
(
// has leading whitespace
- s.begins_with_any(" \n\t\r")
- ||
- // looks like reference or anchor or would be treated as a directive
- s.begins_with_any("*&%")
+ // looks like reference or anchor
+ // would be treated as a directive
+ // see https://www.yaml.info/learn/quote.html#noplain
+ s.begins_with_any(" \n\t\r*&%@`")
||
s.begins_with("<<")
||
@@ -21178,16 +23416,27 @@ void Emitter<Writer>::_write_scalar(csubstr s, bool was_quoted)
}
}
template<class Writer>
-void Emitter<Writer>::_write_scalar_json(csubstr s, bool as_key, bool was_quoted)
-{
- if(was_quoted)
- {
- this->Writer::_do_write('"');
- this->Writer::_do_write(s);
- this->Writer::_do_write('"');
- }
- // json only allows strings as keys
- else if(!as_key && (s.is_number() || s == "true" || s == "null" || s == "false"))
+void Emitter<Writer>::_write_scalar_json(csubstr s, bool as_key, bool use_quotes)
+{
+ if((!use_quotes)
+ // json keys require quotes
+ && (!as_key)
+ && (
+ // do not quote special cases
+ (s == "true" || s == "false" || s == "null")
+ || (
+ // do not quote numbers
+ (s.is_number()
+ && (
+ // quote integral numbers if they have a leading 0
+ // https://github.com/biojppm/rapidyaml/issues/291
+ (!(s.len > 1 && s.begins_with('0')))
+ // do not quote reals with leading 0
+ // https://github.com/biojppm/rapidyaml/issues/313
+ || (s.find('.') != csubstr::npos) ))
+ )
+ )
+ )
{
this->Writer::_do_write(s);
}
@@ -21197,26 +23446,43 @@ void Emitter<Writer>::_write_scalar_json(csubstr s, bool as_key, bool was_quoted
this->Writer::_do_write('"');
for(size_t i = 0; i < s.len; ++i)
{
- switch (s[i])
+ switch(s.str[i])
{
- case '"':
- case '\n': {
- if(i > 0)
- {
- csubstr sub = s.range(pos, i);
- this->Writer::_do_write(sub);
- }
- pos = i + 1;
- switch (s[i]) {
- case '"':
- this->Writer::_do_write("\\\"");
- break;
- case '\n':
- this->Writer::_do_write("\\n");
- break;
- }
- break;
- }
+ case '"':
+ this->Writer ::_do_write(s.range(pos, i));
+ this->Writer ::_do_write("\\\"");
+ pos = i + 1;
+ break;
+ case '\n':
+ this->Writer ::_do_write(s.range(pos, i));
+ this->Writer ::_do_write("\\n");
+ pos = i + 1;
+ break;
+ case '\t':
+ this->Writer ::_do_write(s.range(pos, i));
+ this->Writer ::_do_write("\\t");
+ pos = i + 1;
+ break;
+ case '\\':
+ this->Writer ::_do_write(s.range(pos, i));
+ this->Writer ::_do_write("\\\\");
+ pos = i + 1;
+ break;
+ case '\r':
+ this->Writer ::_do_write(s.range(pos, i));
+ this->Writer ::_do_write("\\r");
+ pos = i + 1;
+ break;
+ case '\b':
+ this->Writer ::_do_write(s.range(pos, i));
+ this->Writer ::_do_write("\\b");
+ pos = i + 1;
+ break;
+ case '\f':
+ this->Writer ::_do_write(s.range(pos, i));
+ this->Writer ::_do_write("\\f");
+ pos = i + 1;
+ break;
}
}
if(pos < s.len)
@@ -21579,6 +23845,36 @@ void stack<T, N>::_cb(Callbacks const& cb)
namespace c4 {
namespace yml {
+struct RYML_EXPORT ParserOptions
+{
+private:
+
+ typedef enum : uint32_t {
+ LOCATIONS = (1 << 0),
+ DEFAULTS = 0,
+ } Flags_e;
+
+ uint32_t flags = DEFAULTS;
+public:
+ ParserOptions() = default;
+
+ /** @name source location tracking */
+ /** @{ */
+
+ /** enable/disable source location tracking */
+ ParserOptions& locations(bool enabled)
+ {
+ if(enabled)
+ flags |= LOCATIONS;
+ else
+ flags &= ~LOCATIONS;
+ return *this;
+ }
+ bool locations() const { return (flags & LOCATIONS) != 0u; }
+
+ /** @} */
+};
+
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
@@ -21590,8 +23886,8 @@ public:
/** @name construction and assignment */
/** @{ */
- Parser() : Parser(get_callbacks()) {}
- Parser(Callbacks const& cb);
+ Parser(Callbacks const& cb, ParserOptions opts={});
+ Parser(ParserOptions opts={}) : Parser(get_callbacks(), opts) {}
~Parser();
Parser(Parser &&);
@@ -21661,6 +23957,8 @@ public:
size_t locations_capacity() const { return m_newline_offsets_capacity; }
size_t filter_arena_capacity() const { return m_filter_arena.len; }
+ ParserOptions const& options() const { return m_options; }
+
/** @} */
public:
@@ -21724,7 +24022,7 @@ public:
/** @{ */
// READ THE NOTE ABOVE!
- #define RYML_DONT_PARSE_SUBSTR_IN_ARENA "Do not pass a (mutable) substr to parse_in_arena(); if you have a substr, it should be parsed in place. Consider using parse_in_place() instead, or convert the buffer to csubstr prior to calling. This function is deliberately left undefined and will cause a compiler error."
+ #define RYML_DONT_PARSE_SUBSTR_IN_ARENA "Do not pass a (mutable) substr to parse_in_arena(); if you have a substr, it should be parsed in place. Consider using parse_in_place() instead, or convert the buffer to csubstr prior to calling. This function is deliberately left undefined and will cause a linker error."
RYML_DEPRECATED(RYML_DONT_PARSE_SUBSTR_IN_ARENA) Tree parse_in_arena(csubstr filename, substr csrc);
RYML_DEPRECATED(RYML_DONT_PARSE_SUBSTR_IN_ARENA) void parse_in_arena(csubstr filename, substr csrc, Tree *t);
RYML_DEPRECATED(RYML_DONT_PARSE_SUBSTR_IN_ARENA) void parse_in_arena(csubstr filename, substr csrc, Tree *t, size_t node_id);
@@ -21792,7 +24090,7 @@ public:
/** Get the location of a node of the last tree to be parsed by this parser. */
Location location(Tree const& tree, size_t node_id) const;
/** Get the location of a node of the last tree to be parsed by this parser. */
- Location location(NodeRef node) const;
+ Location location(ConstNodeRef node) const;
/** Get the string starting at a particular location, to the end
* of the parsed source buffer. */
csubstr location_contents(Location const& loc) const;
@@ -21838,7 +24136,11 @@ private:
* Will only be written to if this method returns true.
* Will be set to true if the scanned scalar was quoted, by '', "", > or |.
*/
- bool _scan_scalar(csubstr *C4_RESTRICT scalar, bool *C4_RESTRICT quoted);
+ bool _scan_scalar_seq_blck(csubstr *C4_RESTRICT scalar, bool *C4_RESTRICT quoted);
+ bool _scan_scalar_map_blck(csubstr *C4_RESTRICT scalar, bool *C4_RESTRICT quoted);
+ bool _scan_scalar_seq_flow(csubstr *C4_RESTRICT scalar, bool *C4_RESTRICT quoted);
+ bool _scan_scalar_map_flow(csubstr *C4_RESTRICT scalar, bool *C4_RESTRICT quoted);
+ bool _scan_scalar_unk(csubstr *C4_RESTRICT scalar, bool *C4_RESTRICT quoted);
csubstr _scan_comment();
csubstr _scan_squot_scalar();
@@ -21908,9 +24210,9 @@ private:
csubstr _consume_scalar();
void _move_scalar_from_top();
- inline NodeData* _append_val_null(const char *str) { _RYML_CB_ASSERT(m_stack.m_callbacks, str >= m_buf.begin() && str <= m_buf.end()); return _append_val({str, size_t(0)}); }
- inline NodeData* _append_key_val_null(const char *str) { _RYML_CB_ASSERT(m_stack.m_callbacks, str >= m_buf.begin() && str <= m_buf.end()); return _append_key_val({str, size_t(0)}); }
- inline void _store_scalar_null(const char *str) { _RYML_CB_ASSERT(m_stack.m_callbacks, str >= m_buf.begin() && str <= m_buf.end()); _store_scalar({str, size_t(0)}, false); }
+ inline NodeData* _append_val_null(const char *str) { _RYML_CB_ASSERT(m_stack.m_callbacks, str >= m_buf.begin() && str <= m_buf.end()); return _append_val({nullptr, size_t(0)}); }
+ inline NodeData* _append_key_val_null(const char *str) { _RYML_CB_ASSERT(m_stack.m_callbacks, str >= m_buf.begin() && str <= m_buf.end()); return _append_key_val({nullptr, size_t(0)}); }
+ inline void _store_scalar_null(const char *str) { _RYML_CB_ASSERT(m_stack.m_callbacks, str >= m_buf.begin() && str <= m_buf.end()); _store_scalar({nullptr, size_t(0)}, false); }
void _set_indentation(size_t behind);
void _save_indentation(size_t behind=0);
@@ -22068,11 +24370,13 @@ private:
void _grow_filter_arena(size_t num_characters);
substr _finish_filter_arena(substr dst, size_t pos);
- void _prepare_locations() const; // only changes mutable members
- void _resize_locations(size_t sz) const; // only changes mutable members
- void _mark_locations_dirty();
+ void _prepare_locations();
+ void _resize_locations(size_t sz);
bool _locations_dirty() const;
+ bool _location_from_cont(Tree const& tree, size_t node, Location *C4_RESTRICT loc) const;
+ bool _location_from_node(Tree const& tree, size_t node, Location *C4_RESTRICT loc, size_t level) const;
+
private:
void _free();
@@ -22089,6 +24393,8 @@ private:
private:
+ ParserOptions m_options;
+
csubstr m_file;
substr m_buf;
@@ -22113,10 +24419,10 @@ private:
substr m_filter_arena;
- mutable size_t *m_newline_offsets;
- mutable size_t m_newline_offsets_size;
- mutable size_t m_newline_offsets_capacity;
- mutable csubstr m_newline_offsets_buf;
+ size_t *m_newline_offsets;
+ size_t m_newline_offsets_size;
+ size_t m_newline_offsets_capacity;
+ csubstr m_newline_offsets_buf;
};
@@ -22258,7 +24564,7 @@ template<class K, class V, class Less, class Alloc>
void write(c4::yml::NodeRef *n, std::map<K, V, Less, Alloc> const& m)
{
*n |= c4::yml::MAP;
- for(auto const& p : m)
+ for(auto const& C4_RESTRICT p : m)
{
auto ch = n->append_child();
ch << c4::yml::key(p.first);
@@ -22267,11 +24573,11 @@ void write(c4::yml::NodeRef *n, std::map<K, V, Less, Alloc> const& m)
}
template<class K, class V, class Less, class Alloc>
-bool read(c4::yml::NodeRef const& n, std::map<K, V, Less, Alloc> * m)
+bool read(c4::yml::ConstNodeRef const& n, std::map<K, V, Less, Alloc> * m)
{
K k{};
- V v;
- for(auto const ch : n)
+ V v{};
+ for(auto const& C4_RESTRICT ch : n)
{
ch >> c4::yml::key(k);
ch >> v;
@@ -22352,24 +24658,37 @@ namespace yml {
// in the data tree hierarchy (a SEQ node in ryml parlance).
// So it should be serialized via write()/read().
+
template<class V, class Alloc>
void write(c4::yml::NodeRef *n, std::vector<V, Alloc> const& vec)
{
*n |= c4::yml::SEQ;
for(auto const& v : vec)
- {
n->append_child() << v;
- }
}
template<class V, class Alloc>
-bool read(c4::yml::NodeRef const& n, std::vector<V, Alloc> *vec)
+bool read(c4::yml::ConstNodeRef const& n, std::vector<V, Alloc> *vec)
{
vec->resize(n.num_children());
size_t pos = 0;
for(auto const ch : n)
- {
ch >> (*vec)[pos++];
+ return true;
+}
+
+/** specialization: std::vector<bool> uses std::vector<bool>::reference as
+ * the return value of its operator[]. */
+template<class Alloc>
+bool read(c4::yml::ConstNodeRef const& n, std::vector<bool, Alloc> *vec)
+{
+ vec->resize(n.num_children());
+ size_t pos = 0;
+ bool tmp;
+ for(auto const ch : n)
+ {
+ ch >> tmp;
+ (*vec)[pos++] = tmp;
}
return true;
}
@@ -22450,7 +24769,7 @@ namespace c4 {
namespace yml {
namespace {
-thread_local Callbacks s_default_callbacks;
+Callbacks s_default_callbacks;
} // anon namespace
#ifndef RYML_NO_DEFAULT_CALLBACKS
@@ -22838,9 +25157,18 @@ NodeRef Tree::rootref()
{
return NodeRef(this, root_id());
}
-NodeRef const Tree::rootref() const
+ConstNodeRef Tree::rootref() const
{
- return NodeRef(const_cast<Tree*>(this), root_id());
+ return ConstNodeRef(this, root_id());
+}
+
+ConstNodeRef Tree::crootref()
+{
+ return ConstNodeRef(this, root_id());
+}
+ConstNodeRef Tree::crootref() const
+{
+ return ConstNodeRef(this, root_id());
}
NodeRef Tree::ref(size_t id)
@@ -22848,17 +25176,28 @@ NodeRef Tree::ref(size_t id)
_RYML_CB_ASSERT(m_callbacks, id != NONE && id >= 0 && id < m_size);
return NodeRef(this, id);
}
-NodeRef const Tree::ref(size_t id) const
+ConstNodeRef Tree::ref(size_t id) const
{
_RYML_CB_ASSERT(m_callbacks, id != NONE && id >= 0 && id < m_size);
- return NodeRef(const_cast<Tree*>(this), id);
+ return ConstNodeRef(this, id);
+}
+
+ConstNodeRef Tree::cref(size_t id)
+{
+ _RYML_CB_ASSERT(m_callbacks, id != NONE && id >= 0 && id < m_size);
+ return ConstNodeRef(this, id);
+}
+ConstNodeRef Tree::cref(size_t id) const
+{
+ _RYML_CB_ASSERT(m_callbacks, id != NONE && id >= 0 && id < m_size);
+ return ConstNodeRef(this, id);
}
NodeRef Tree::operator[] (csubstr key)
{
return rootref()[key];
}
-NodeRef const Tree::operator[] (csubstr key) const
+ConstNodeRef Tree::operator[] (csubstr key) const
{
return rootref()[key];
}
@@ -22867,7 +25206,7 @@ NodeRef Tree::operator[] (size_t i)
{
return rootref()[i];
}
-NodeRef const Tree::operator[] (size_t i) const
+ConstNodeRef Tree::operator[] (size_t i) const
{
return rootref()[i];
}
@@ -22876,9 +25215,9 @@ NodeRef Tree::docref(size_t i)
{
return ref(doc(i));
}
-NodeRef const Tree::docref(size_t i) const
+ConstNodeRef Tree::docref(size_t i) const
{
- return ref(doc(i));
+ return cref(doc(i));
}
@@ -23563,8 +25902,9 @@ void Tree::_swap_props(size_t n_, size_t m_)
void Tree::move(size_t node, size_t after)
{
_RYML_CB_ASSERT(m_callbacks, node != NONE);
+ _RYML_CB_ASSERT(m_callbacks, node != after);
_RYML_CB_ASSERT(m_callbacks, ! is_root(node));
- _RYML_CB_ASSERT(m_callbacks, has_sibling(node, after) && has_sibling(after, node));
+ _RYML_CB_ASSERT(m_callbacks, (after == NONE) || (has_sibling(node, after) && has_sibling(after, node)));
_rem_hierarchy(node);
_set_hierarchy(node, parent(node), after);
@@ -23575,7 +25915,10 @@ void Tree::move(size_t node, size_t after)
void Tree::move(size_t node, size_t new_parent, size_t after)
{
_RYML_CB_ASSERT(m_callbacks, node != NONE);
+ _RYML_CB_ASSERT(m_callbacks, node != after);
_RYML_CB_ASSERT(m_callbacks, new_parent != NONE);
+ _RYML_CB_ASSERT(m_callbacks, new_parent != node);
+ _RYML_CB_ASSERT(m_callbacks, new_parent != after);
_RYML_CB_ASSERT(m_callbacks, ! is_root(node));
_rem_hierarchy(node);
@@ -23584,8 +25927,10 @@ void Tree::move(size_t node, size_t new_parent, size_t after)
size_t Tree::move(Tree *src, size_t node, size_t new_parent, size_t after)
{
+ _RYML_CB_ASSERT(m_callbacks, src != nullptr);
_RYML_CB_ASSERT(m_callbacks, node != NONE);
_RYML_CB_ASSERT(m_callbacks, new_parent != NONE);
+ _RYML_CB_ASSERT(m_callbacks, new_parent != after);
size_t dup = duplicate(src, node, new_parent, after);
src->remove(node);
@@ -23786,15 +26131,17 @@ size_t Tree::duplicate_children_no_rep(Tree const *src, size_t node, size_t pare
remove(rep);
prev = duplicate(src, i, parent, prev);
}
- else if(after_pos == NONE || rep_pos >= after_pos)
+ else if(prev == NONE)
+ {
+ // first iteration with prev = after = NONE and repetition
+ prev = rep;
+ }
+ else if(rep != prev)
{
// rep is located after the node which will be inserted
// and overrides it. So move the rep into this node's place.
- if(rep != prev)
- {
- move(rep, prev);
- prev = rep;
- }
+ move(rep, prev);
+ prev = rep;
}
} // there's a repetition
}
@@ -24135,9 +26482,7 @@ size_t Tree::num_children(size_t node) const
{
size_t count = 0;
for(size_t i = first_child(node); i != NONE; i = next_sibling(i))
- {
++count;
- }
return count;
}
@@ -24433,7 +26778,7 @@ void Tree::resolve_tags()
return;
size_t needed_size = _count_resolved_tags_size(this, root_id());
if(needed_size)
- reserve_arena(arena_pos() + needed_size);
+ reserve_arena(arena_size() + needed_size);
_resolve_tags(this, root_id());
}
@@ -24875,7 +27220,7 @@ void _parse_dump(DumpFn dumpfn, c4::csubstr fmt, Args&& ...args)
bool _is_scalar_next__runk(csubstr s)
{
- return !(s.begins_with(": ") || s.begins_with_any("#,:{}[]%&") || s.begins_with("? ") || s == "-" || s.begins_with("- "));
+ return !(s.begins_with(": ") || s.begins_with_any("#,{}[]%&") || s.begins_with("? ") || s == "-" || s.begins_with("- ") || s.begins_with(":\"") || s.begins_with(":'"));
}
bool _is_scalar_next__rseq_rval(csubstr s)
@@ -24948,8 +27293,9 @@ Parser::~Parser()
_clr();
}
-Parser::Parser(Callbacks const& cb)
- : m_file()
+Parser::Parser(Callbacks const& cb, ParserOptions opts)
+ : m_options(opts)
+ , m_file()
, m_buf()
, m_root_id(NONE)
, m_tree()
@@ -24977,7 +27323,8 @@ Parser::Parser(Callbacks const& cb)
}
Parser::Parser(Parser &&that)
- : m_file(that.m_file)
+ : m_options(that.m_options)
+ , m_file(that.m_file)
, m_buf(that.m_buf)
, m_root_id(that.m_root_id)
, m_tree(that.m_tree)
@@ -25004,7 +27351,8 @@ Parser::Parser(Parser &&that)
}
Parser::Parser(Parser const& that)
- : m_file(that.m_file)
+ : m_options(that.m_options)
+ , m_file(that.m_file)
, m_buf(that.m_buf)
, m_root_id(that.m_root_id)
, m_tree(that.m_tree)
@@ -25043,6 +27391,7 @@ Parser::Parser(Parser const& that)
Parser& Parser::operator=(Parser &&that)
{
_free();
+ m_options = (that.m_options);
m_file = (that.m_file);
m_buf = (that.m_buf);
m_root_id = (that.m_root_id);
@@ -25072,6 +27421,7 @@ Parser& Parser::operator=(Parser &&that)
Parser& Parser::operator=(Parser const& that)
{
_free();
+ m_options = (that.m_options);
m_file = (that.m_file);
m_buf = (that.m_buf);
m_root_id = (that.m_root_id);
@@ -25103,6 +27453,7 @@ Parser& Parser::operator=(Parser const& that)
void Parser::_clr()
{
+ m_options = {};
m_file = {};
m_buf = {};
m_root_id = {};
@@ -25167,7 +27518,10 @@ void Parser::_reset()
m_val_anchor_indentation = 0;
m_val_anchor.clear();
- _mark_locations_dirty();
+ if(m_options.locations())
+ {
+ _prepare_locations();
+ }
}
//-----------------------------------------------------------------------------
@@ -25473,7 +27827,7 @@ bool Parser::_handle_unk()
csubstr saved_scalar;
bool is_quoted;
- if(_scan_scalar(&saved_scalar, &is_quoted))
+ if(_scan_scalar_unk(&saved_scalar, &is_quoted))
{
rem = m_state->line_contents.rem;
_c4dbgpf("... and there's also a scalar next! '{}'", saved_scalar);
@@ -25590,7 +27944,7 @@ bool Parser::_handle_unk()
csubstr scalar;
size_t indentation = m_state->line_contents.indentation; // save
bool is_quoted;
- if(_scan_scalar(&scalar, &is_quoted))
+ if(_scan_scalar_unk(&scalar, &is_quoted))
{
_c4dbgpf("got a {} scalar", is_quoted ? "quoted" : "");
rem = m_state->line_contents.rem;
@@ -25714,7 +28068,7 @@ bool Parser::_handle_seq_flow()
{
_RYML_CB_ASSERT(m_stack.m_callbacks, has_none(RNXT));
bool is_quoted;
- if(_scan_scalar(&rem, &is_quoted))
+ if(_scan_scalar_seq_flow(&rem, &is_quoted))
{
_c4dbgp("it's a scalar");
addrem_flags(RNXT, RVAL);
@@ -25858,7 +28212,6 @@ bool Parser::_handle_seq_blck()
rem = _scan_comment();
return true;
}
-
if(has_any(RNXT))
{
_RYML_CB_ASSERT(m_stack.m_callbacks, has_none(RVAL));
@@ -25912,7 +28265,7 @@ bool Parser::_handle_seq_blck()
csubstr s;
bool is_quoted;
- if(_scan_scalar(&s, &is_quoted)) // this also progresses the line
+ if(_scan_scalar_seq_blck(&s, &is_quoted)) // this also progresses the line
{
_c4dbgpf("it's a{} scalar", is_quoted ? " quoted" : "");
@@ -26171,7 +28524,7 @@ bool Parser::_handle_map_flow()
_RYML_CB_ASSERT(m_stack.m_callbacks, has_none(RVAL));
bool is_quoted;
- if(has_none(SSCL) && _scan_scalar(&rem, &is_quoted))
+ if(has_none(SSCL) && _scan_scalar_map_flow(&rem, &is_quoted))
{
_c4dbgp("it's a scalar");
_store_scalar(rem, is_quoted);
@@ -26291,7 +28644,7 @@ bool Parser::_handle_map_flow()
_RYML_CB_ASSERT(m_stack.m_callbacks, has_none(RKEY));
_RYML_CB_ASSERT(m_stack.m_callbacks, has_all(SSCL));
bool is_quoted;
- if(_scan_scalar(&rem, &is_quoted))
+ if(_scan_scalar_map_flow(&rem, &is_quoted))
{
_c4dbgp("it's a scalar");
addrem_flags(RNXT, RVAL|RKEY);
@@ -26375,7 +28728,7 @@ bool Parser::_handle_map_flow()
//-----------------------------------------------------------------------------
bool Parser::_handle_map_blck()
{
- _c4dbgpf("handle_map_impl: node_id={} level={}", m_state->node_id, m_state->level);
+ _c4dbgpf("handle_map_blck: node_id={} level={}", m_state->node_id, m_state->level);
csubstr rem = m_state->line_contents.rem;
_RYML_CB_ASSERT(m_stack.m_callbacks, has_all(RMAP));
@@ -26397,16 +28750,19 @@ bool Parser::_handle_map_blck()
}
if(_handle_indentation())
+ {
+ _c4dbgp("indentation token");
return true;
+ }
if(has_any(RKEY))
{
_RYML_CB_ASSERT(m_stack.m_callbacks, has_none(RNXT));
_RYML_CB_ASSERT(m_stack.m_callbacks, has_none(RVAL));
- _c4dbgp("read scalar?");
+ _c4dbgp("RMAP|RKEY read scalar?");
bool is_quoted;
- if(_scan_scalar(&rem, &is_quoted)) // this also progresses the line
+ if(_scan_scalar_map_blck(&rem, &is_quoted)) // this also progresses the line
{
_c4dbgpf("it's a{} scalar", is_quoted ? " quoted" : "");
if(has_all(QMRK|SSCL))
@@ -26515,9 +28871,10 @@ bool Parser::_handle_map_blck()
_RYML_CB_ASSERT(m_stack.m_callbacks, has_none(RNXT));
_RYML_CB_ASSERT(m_stack.m_callbacks, has_none(RKEY));
+ _c4dbgp("RMAP|RVAL read scalar?");
csubstr s;
bool is_quoted;
- if(_scan_scalar(&s, &is_quoted)) // this also progresses the line
+ if(_scan_scalar_map_blck(&s, &is_quoted)) // this also progresses the line
{
_c4dbgpf("it's a{} scalar", is_quoted ? " quoted" : "");
@@ -26625,6 +28982,13 @@ bool Parser::_handle_map_blck()
_start_new_doc(rem);
return true;
}
+ else if(rem.begins_with("..."))
+ {
+ _c4dbgp("end current document");
+ _end_stream();
+ _line_progressed(3);
+ return true;
+ }
else
{
_c4err("parse error");
@@ -27098,9 +29462,16 @@ csubstr Parser::_slurp_doc_scalar()
return s;
}
+
//-----------------------------------------------------------------------------
-bool Parser::_scan_scalar(csubstr *C4_RESTRICT scalar, bool *C4_RESTRICT quoted)
+
+bool Parser::_scan_scalar_seq_blck(csubstr *C4_RESTRICT scalar, bool *C4_RESTRICT quoted)
{
+ _RYML_CB_ASSERT(m_stack.m_callbacks, has_any(RSEQ));
+ _RYML_CB_ASSERT(m_stack.m_callbacks, has_any(RVAL));
+ _RYML_CB_ASSERT(m_stack.m_callbacks, ! has_any(RKEY));
+ _RYML_CB_ASSERT(m_stack.m_callbacks, ! has_any(FLOW));
+
csubstr s = m_state->line_contents.rem;
if(s.len == 0)
return false;
@@ -27127,136 +29498,339 @@ bool Parser::_scan_scalar(csubstr *C4_RESTRICT scalar, bool *C4_RESTRICT quoted)
else if(s.begins_with('|') || s.begins_with('>'))
{
*scalar = _scan_block();
- *quoted = false;
+ *quoted = true;
return true;
}
else if(has_any(RTOP) && _is_doc_sep(s))
{
return false;
}
- else if(has_any(RSEQ))
+
+ _c4dbgp("RSEQ|RVAL");
+ if( ! _is_scalar_next__rseq_rval(s))
+ return false;
+ _RYML_WITH_TAB_TOKENS(else if(s.begins_with("-\t"))
+ return false;
+ )
+
+ if(s.ends_with(':'))
{
- _RYML_CB_ASSERT(m_stack.m_callbacks, ! has_all(RKEY));
- if(has_all(RVAL))
+ --s.len;
+ }
+ else
+ {
+ auto first = s.first_of_any(": " _RYML_WITH_TAB_TOKENS( , ":\t"), " #");
+ if(first)
+ s.len = first.pos;
+ }
+ s = s.trimr(_RYML_WITH_OR_WITHOUT_TAB_TOKENS(" \t", ' '));
+
+ if(s.empty())
+ return false;
+
+ m_state->scalar_col = m_state->line_contents.current_col(s);
+ _RYML_CB_ASSERT(m_stack.m_callbacks, s.str >= m_state->line_contents.rem.str);
+ _line_progressed(static_cast<size_t>(s.str - m_state->line_contents.rem.str) + s.len);
+
+ if(_at_line_end() && s != '~')
+ {
+ _c4dbgpf("at line end. curr='{}'", s);
+ s = _extend_scanned_scalar(s);
+ }
+
+ _c4dbgpf("scalar was '{}'", s);
+
+ *scalar = s;
+ *quoted = false;
+ return true;
+}
+
+bool Parser::_scan_scalar_map_blck(csubstr *C4_RESTRICT scalar, bool *C4_RESTRICT quoted)
+{
+ _c4dbgp("_scan_scalar_map_blck");
+ _RYML_CB_ASSERT(m_stack.m_callbacks, has_any(RMAP));
+ _RYML_CB_ASSERT(m_stack.m_callbacks, ! has_any(FLOW));
+ _RYML_CB_ASSERT(m_stack.m_callbacks, has_any(RKEY|RVAL));
+
+ csubstr s = m_state->line_contents.rem;
+ #ifdef RYML_NO_COVERAGE__TO_BE_DELETED__OR_REFACTORED
+ if(s.len == 0)
+ return false;
+ #endif
+ s = s.trim(" \t");
+ if(s.len == 0)
+ return false;
+
+ if(s.begins_with('\''))
+ {
+ _c4dbgp("got a ': scanning single-quoted scalar");
+ m_state->scalar_col = m_state->line_contents.current_col(s);
+ *scalar = _scan_squot_scalar();
+ *quoted = true;
+ return true;
+ }
+ else if(s.begins_with('"'))
+ {
+ _c4dbgp("got a \": scanning double-quoted scalar");
+ m_state->scalar_col = m_state->line_contents.current_col(s);
+ *scalar = _scan_dquot_scalar();
+ *quoted = true;
+ return true;
+ }
+ else if(s.begins_with('|') || s.begins_with('>'))
+ {
+ *scalar = _scan_block();
+ *quoted = true;
+ return true;
+ }
+ else if(has_any(RTOP) && _is_doc_sep(s))
+ {
+ return false;
+ }
+
+ if( ! _is_scalar_next__rmap(s))
+ return false;
+
+ size_t colon_token = s.find(": ");
+ if(colon_token == npos)
+ {
+ _RYML_WITH_OR_WITHOUT_TAB_TOKENS(
+ // with tab tokens
+ colon_token = s.find(":\t");
+ if(colon_token == npos)
+ {
+ _RYML_CB_ASSERT(m_stack.m_callbacks, s.len > 0);
+ colon_token = s.find(':');
+ if(colon_token != s.len-1)
+ colon_token = npos;
+ }
+ ,
+ // without tab tokens
+ colon_token = s.find(':');
+ _RYML_CB_ASSERT(m_stack.m_callbacks, s.len > 0);
+ if(colon_token != s.len-1)
+ colon_token = npos;
+ )
+ }
+
+ if(has_all(RKEY))
+ {
+ _RYML_CB_ASSERT(m_stack.m_callbacks, !s.begins_with(' '));
+ if(has_any(QMRK))
{
- _c4dbgp("RSEQ|RVAL");
- if( ! _is_scalar_next__rseq_rval(s))
+ _c4dbgp("RMAP|RKEY|CPLX");
+ _RYML_CB_ASSERT(m_stack.m_callbacks, has_any(RMAP));
+ if(s.begins_with("? ") || s == '?')
return false;
- _RYML_WITH_TAB_TOKENS(else if(s.begins_with("-\t"))
+ s = s.left_of(colon_token);
+ s = s.left_of(s.first_of("#"));
+ s = s.trimr(" \t");
+ if(s.begins_with("---"))
return false;
- )
- if(s.ends_with(':'))
- {
- --s.len;
- }
- else
+ else if(s.begins_with("..."))
+ return false;
+ }
+ else
+ {
+ _c4dbgp("RMAP|RKEY");
+ _RYML_CB_CHECK(m_stack.m_callbacks, !s.begins_with('{'));
+ if(s.begins_with("? ") || s == '?')
+ return false;
+ s = s.left_of(colon_token);
+ s = s.trimr(_RYML_WITH_OR_WITHOUT_TAB_TOKENS(" \t", ' '));
+ if(s.begins_with("---"))
{
- auto first = s.first_of_any(": " _RYML_WITH_TAB_TOKENS( , ":\t"), " #");
- if(first)
- s.len = first.pos;
+ return false;
}
- if(has_all(FLOW))
+ else if(s.begins_with("..."))
{
- _c4dbgp("RSEQ|RVAL|EXPL");
- s = s.left_of(s.first_of(",]"));
+ return false;
}
- s = s.trimr(_RYML_WITH_OR_WITHOUT_TAB_TOKENS(" \t", ' '));
+ }
+ }
+ else if(has_all(RVAL))
+ {
+ _c4dbgp("RMAP|RVAL");
+ _RYML_CB_ASSERT(m_stack.m_callbacks, has_none(QMRK));
+ if( ! _is_scalar_next__rmap_val(s))
+ return false;
+ _RYML_WITH_TAB_TOKENS(
+ else if(s.begins_with("-\t"))
+ return false;
+ )
+ _c4dbgp("RMAP|RVAL: scalar");
+ s = s.left_of(s.find(" #")); // is there a comment?
+ s = s.left_of(s.find("\t#")); // is there a comment?
+ s = s.trim(_RYML_WITH_OR_WITHOUT_TAB_TOKENS(" \t", ' '));
+ if(s.begins_with("---"))
+ return false;
+ #ifdef RYML_NO_COVERAGE__TO_BE_DELETED__OR_REFACTORED
+ else if(s.begins_with("..."))
+ return false;
+ #endif
+ }
+
+ if(s.empty())
+ return false;
+
+ m_state->scalar_col = m_state->line_contents.current_col(s);
+ _RYML_CB_ASSERT(m_stack.m_callbacks, s.str >= m_state->line_contents.rem.str);
+ _line_progressed(static_cast<size_t>(s.str - m_state->line_contents.rem.str) + s.len);
+
+ if(_at_line_end() && s != '~')
+ {
+ _c4dbgpf("at line end. curr='{}'", s);
+ s = _extend_scanned_scalar(s);
+ }
+
+ _c4dbgpf("scalar was '{}'", s);
+
+ *scalar = s;
+ *quoted = false;
+ return true;
+}
+
+bool Parser::_scan_scalar_seq_flow(csubstr *C4_RESTRICT scalar, bool *C4_RESTRICT quoted)
+{
+ _RYML_CB_ASSERT(m_stack.m_callbacks, has_any(RSEQ));
+ _RYML_CB_ASSERT(m_stack.m_callbacks, has_any(FLOW));
+ _RYML_CB_ASSERT(m_stack.m_callbacks, has_any(RVAL));
+ _RYML_CB_ASSERT(m_stack.m_callbacks, ! has_any(RKEY));
+
+ csubstr s = m_state->line_contents.rem;
+ if(s.len == 0)
+ return false;
+ s = s.trim(" \t");
+ if(s.len == 0)
+ return false;
+
+ if(s.begins_with('\''))
+ {
+ _c4dbgp("got a ': scanning single-quoted scalar");
+ m_state->scalar_col = m_state->line_contents.current_col(s);
+ *scalar = _scan_squot_scalar();
+ *quoted = true;
+ return true;
+ }
+ else if(s.begins_with('"'))
+ {
+ _c4dbgp("got a \": scanning double-quoted scalar");
+ m_state->scalar_col = m_state->line_contents.current_col(s);
+ *scalar = _scan_dquot_scalar();
+ *quoted = true;
+ return true;
+ }
+
+ if(has_all(RVAL))
+ {
+ _c4dbgp("RSEQ|RVAL");
+ if( ! _is_scalar_next__rseq_rval(s))
+ return false;
+ _RYML_WITH_TAB_TOKENS(else if(s.begins_with("-\t"))
+ return false;
+ )
+ _c4dbgp("RSEQ|RVAL|FLOW");
+ s = s.left_of(s.first_of(",]"));
+ if(s.ends_with(':'))
+ {
+ --s.len;
}
else
{
- _c4err("internal error");
+ auto first = s.first_of_any(": " _RYML_WITH_TAB_TOKENS( , ":\t"), " #");
+ if(first)
+ s.len = first.pos;
}
+ s = s.trimr(_RYML_WITH_OR_WITHOUT_TAB_TOKENS(" \t", ' '));
}
- else if(has_any(RMAP))
+
+ if(s.empty())
+ return false;
+
+ m_state->scalar_col = m_state->line_contents.current_col(s);
+ _RYML_CB_ASSERT(m_stack.m_callbacks, s.str >= m_state->line_contents.rem.str);
+ _line_progressed(static_cast<size_t>(s.str - m_state->line_contents.rem.str) + s.len);
+
+ if(_at_line_end() && s != '~')
{
- if( ! _is_scalar_next__rmap(s))
- return false;
- size_t colon_space = s.find(": ");
- if(colon_space == npos)
+ _c4dbgpf("at line end. curr='{}'", s);
+ s = _extend_scanned_scalar(s);
+ }
+
+ _c4dbgpf("scalar was '{}'", s);
+
+ *scalar = s;
+ *quoted = false;
+ return true;
+}
+
+bool Parser::_scan_scalar_map_flow(csubstr *C4_RESTRICT scalar, bool *C4_RESTRICT quoted)
+{
+ _RYML_CB_ASSERT(m_stack.m_callbacks, has_any(RMAP));
+ _RYML_CB_ASSERT(m_stack.m_callbacks, has_any(FLOW));
+ _RYML_CB_ASSERT(m_stack.m_callbacks, has_any(RKEY|RVAL));
+
+ csubstr s = m_state->line_contents.rem;
+ if(s.len == 0)
+ return false;
+ s = s.trim(" \t");
+ if(s.len == 0)
+ return false;
+
+ if(s.begins_with('\''))
+ {
+ _c4dbgp("got a ': scanning single-quoted scalar");
+ m_state->scalar_col = m_state->line_contents.current_col(s);
+ *scalar = _scan_squot_scalar();
+ *quoted = true;
+ return true;
+ }
+ else if(s.begins_with('"'))
+ {
+ _c4dbgp("got a \": scanning double-quoted scalar");
+ m_state->scalar_col = m_state->line_contents.current_col(s);
+ *scalar = _scan_dquot_scalar();
+ *quoted = true;
+ return true;
+ }
+
+ if( ! _is_scalar_next__rmap(s))
+ return false;
+
+ if(has_all(RKEY))
+ {
+ _RYML_CB_ASSERT(m_stack.m_callbacks, !s.begins_with(' '));
+ size_t colon_token = s.find(": ");
+ if(colon_token == npos)
{
_RYML_WITH_OR_WITHOUT_TAB_TOKENS(
// with tab tokens
- colon_space = s.find(":\t");
- if(colon_space == npos)
+ colon_token = s.find(":\t");
+ if(colon_token == npos)
{
_RYML_CB_ASSERT(m_stack.m_callbacks, s.len > 0);
- colon_space = s.find(':');
- if(colon_space != s.len-1)
- colon_space = npos;
+ colon_token = s.find(':');
+ if(colon_token != s.len-1)
+ colon_token = npos;
}
,
// without tab tokens
- colon_space = s.find(':');
+ colon_token = s.find(':');
_RYML_CB_ASSERT(m_stack.m_callbacks, s.len > 0);
- if(colon_space != s.len-1)
- colon_space = npos;
+ if(colon_token != s.len-1)
+ colon_token = npos;
)
}
-
- if(has_all(RKEY))
- {
- _RYML_CB_ASSERT(m_stack.m_callbacks, !s.begins_with(' '));
- if(has_any(QMRK))
- {
- _c4dbgp("RMAP|RKEY|CPLX");
- _RYML_CB_ASSERT(m_stack.m_callbacks, has_any(RMAP));
- if(s.begins_with("? ") || s == '?')
- return false;
- s = s.left_of(colon_space);
- s = s.left_of(s.first_of("#"));
- if(has_any(FLOW))
- s = s.left_of(s.first_of(':'));
- s = s.trimr(" \t");
- if(s.begins_with("---"))
- return false;
- else if(s.begins_with("..."))
- return false;
- }
- else
- {
- _c4dbgp("RMAP|RKEY");
- _RYML_CB_CHECK(m_stack.m_callbacks, !s.begins_with('{'));
- if(s.begins_with("? ") || s == '?')
- return false;
- s = s.left_of(colon_space);
- s = s.trimr(_RYML_WITH_OR_WITHOUT_TAB_TOKENS(" \t", ' '));
- if(has_any(FLOW))
- {
- _c4dbgpf("RMAP|RKEY|EXPL: '{}'", s);
- s = s.left_of(s.first_of(",}"));
- if(s.ends_with(':'))
- s = s.offs(0, 1);
- }
- else if(s.begins_with("---"))
- {
- return false;
- }
- else if(s.begins_with("..."))
- {
- return false;
- }
- }
- }
- else if(has_all(RVAL))
- {
- _c4dbgp("RMAP|RVAL");
- _RYML_CB_ASSERT(m_stack.m_callbacks, has_none(QMRK));
- if( ! _is_scalar_next__rmap_val(s))
- return false;
- _RYML_WITH_TAB_TOKENS(else if(s.begins_with("-\t"))
- return false;
- )
- s = s.left_of(s.find(" #")); // is there a comment?
- s = s.left_of(s.find("\t#")); // is there a comment?
- if(has_any(FLOW))
- {
- _c4dbgp("RMAP|RVAL|EXPL");
- if(has_none(RSEQIMAP))
- s = s.left_of(s.first_of(",}"));
- else
- s = s.left_of(s.first_of(",]"));
- }
- s = s.trim(_RYML_WITH_OR_WITHOUT_TAB_TOKENS(" \t", ' '));
+ if(s.begins_with("? ") || s == '?')
+ return false;
+ if(has_any(QMRK))
+ {
+ _c4dbgp("RMAP|RKEY|CPLX");
+ _RYML_CB_ASSERT(m_stack.m_callbacks, has_any(RMAP));
+ s = s.left_of(colon_token);
+ s = s.left_of(s.first_of("#"));
+ s = s.left_of(s.first_of(':'));
+ s = s.trimr(" \t");
if(s.begins_with("---"))
return false;
else if(s.begins_with("..."))
@@ -27264,37 +29838,116 @@ bool Parser::_scan_scalar(csubstr *C4_RESTRICT scalar, bool *C4_RESTRICT quoted)
}
else
{
- _c4err("parse error");
+ _RYML_CB_CHECK(m_stack.m_callbacks, !s.begins_with('{'));
+ _c4dbgp("RMAP|RKEY");
+ s = s.left_of(colon_token);
+ s = s.trimr(_RYML_WITH_OR_WITHOUT_TAB_TOKENS(" \t", ' '));
+ _c4dbgpf("RMAP|RKEY|FLOW: '{}'", s);
+ s = s.left_of(s.first_of(",}"));
+ if(s.ends_with(':'))
+ --s.len;
}
}
- else if(has_all(RUNK))
+ else if(has_all(RVAL))
{
- _c4dbgpf("RUNK '[{}]~~~{}~~~", s.len, s);
- if( ! _is_scalar_next__runk(s))
- {
- _c4dbgp("RUNK: no scalar next");
+ _c4dbgp("RMAP|RVAL");
+ _RYML_CB_ASSERT(m_stack.m_callbacks, has_none(QMRK));
+ if( ! _is_scalar_next__rmap_val(s))
+ return false;
+ _RYML_WITH_TAB_TOKENS(else if(s.begins_with("-\t"))
return false;
- }
- s = s.left_of(s.find(" #"));
- size_t pos = s.find(": ");
- if(pos != npos)
- s = s.left_of(pos);
- else if(s.ends_with(':'))
- s = s.left_of(s.len-1);
- _RYML_WITH_TAB_TOKENS(
- else if((pos = s.find(":\t")) != npos) // TABS
- s = s.left_of(pos);
)
+ _c4dbgp("RMAP|RVAL|FLOW");
+ if(has_none(RSEQIMAP))
+ s = s.left_of(s.first_of(",}"));
else
- s = s.left_of(s.first_of(','));
- s = s.trim(" \t");
- _c4dbgpf("RUNK: scalar='{}'", s);
+ s = s.left_of(s.first_of(",]"));
+ s = s.left_of(s.find(" #")); // is there a comment?
+ s = s.left_of(s.find("\t#")); // is there a comment?
+ s = s.trim(_RYML_WITH_OR_WITHOUT_TAB_TOKENS(" \t", ' '));
}
- else
+
+ if(s.empty())
+ return false;
+
+ m_state->scalar_col = m_state->line_contents.current_col(s);
+ _RYML_CB_ASSERT(m_stack.m_callbacks, s.str >= m_state->line_contents.rem.str);
+ _line_progressed(static_cast<size_t>(s.str - m_state->line_contents.rem.str) + s.len);
+
+ if(_at_line_end() && s != '~')
+ {
+ _c4dbgpf("at line end. curr='{}'", s);
+ s = _extend_scanned_scalar(s);
+ }
+
+ _c4dbgpf("scalar was '{}'", s);
+
+ *scalar = s;
+ *quoted = false;
+ return true;
+}
+
+bool Parser::_scan_scalar_unk(csubstr *C4_RESTRICT scalar, bool *C4_RESTRICT quoted)
+{
+ _RYML_CB_ASSERT(m_stack.m_callbacks, has_any(RUNK));
+
+ csubstr s = m_state->line_contents.rem;
+ if(s.len == 0)
+ return false;
+ s = s.trim(" \t");
+ if(s.len == 0)
+ return false;
+
+ if(s.begins_with('\''))
+ {
+ _c4dbgp("got a ': scanning single-quoted scalar");
+ m_state->scalar_col = m_state->line_contents.current_col(s);
+ *scalar = _scan_squot_scalar();
+ *quoted = true;
+ return true;
+ }
+ else if(s.begins_with('"'))
+ {
+ _c4dbgp("got a \": scanning double-quoted scalar");
+ m_state->scalar_col = m_state->line_contents.current_col(s);
+ *scalar = _scan_dquot_scalar();
+ *quoted = true;
+ return true;
+ }
+ else if(s.begins_with('|') || s.begins_with('>'))
+ {
+ *scalar = _scan_block();
+ *quoted = true;
+ return true;
+ }
+ else if(has_any(RTOP) && _is_doc_sep(s))
{
- _c4err("not implemented");
+ return false;
}
+ _c4dbgpf("RUNK '[{}]~~~{}~~~", s.len, s);
+ if( ! _is_scalar_next__runk(s))
+ {
+ _c4dbgp("RUNK: no scalar next");
+ return false;
+ }
+ size_t pos = s.find(" #");
+ if(pos != npos)
+ s = s.left_of(pos);
+ pos = s.find(": ");
+ if(pos != npos)
+ s = s.left_of(pos);
+ else if(s.ends_with(':'))
+ s = s.left_of(s.len-1);
+ _RYML_WITH_TAB_TOKENS(
+ else if((pos = s.find(":\t")) != npos) // TABS
+ s = s.left_of(pos);
+ )
+ else
+ s = s.left_of(s.first_of(','));
+ s = s.trim(" \t");
+ _c4dbgpf("RUNK: scalar='{}'", s);
+
if(s.empty())
return false;
@@ -27315,6 +29968,7 @@ bool Parser::_scan_scalar(csubstr *C4_RESTRICT scalar, bool *C4_RESTRICT quoted)
return true;
}
+
//-----------------------------------------------------------------------------
csubstr Parser::_extend_scanned_scalar(csubstr s)
@@ -27381,7 +30035,7 @@ substr Parser::_scan_plain_scalar_flow(csubstr currscalar, csubstr peeked_line)
csubstr tpkl = peeked_line.triml(' ').trimr("\r\n");
if(tpkl.begins_with(": ") || tpkl == ':')
{
- _c4dbgpf("rscalar[EXPL]: map value starts on the peeked line: '{}'", peeked_line);
+ _c4dbgpf("rscalar[FLOW]: map value starts on the peeked line: '{}'", peeked_line);
peeked_line = peeked_line.first(0);
break;
}
@@ -27391,7 +30045,7 @@ substr Parser::_scan_plain_scalar_flow(csubstr currscalar, csubstr peeked_line)
if(colon_pos && colon_pos.pos < pos)
{
peeked_line = peeked_line.first(colon_pos.pos);
- _c4dbgpf("rscalar[EXPL]: found colon at {}. peeked='{}'", colon_pos.pos, peeked_line);
+ _c4dbgpf("rscalar[FLOW]: found colon at {}. peeked='{}'", colon_pos.pos, peeked_line);
_RYML_CB_ASSERT(m_stack.m_callbacks, peeked_line.end() >= m_state->line_contents.rem.begin());
_line_progressed(static_cast<size_t>(peeked_line.end() - m_state->line_contents.rem.begin()));
break;
@@ -27400,13 +30054,13 @@ substr Parser::_scan_plain_scalar_flow(csubstr currscalar, csubstr peeked_line)
}
if(pos != npos)
{
- _c4dbgpf("rscalar[EXPL]: found special character '{}' at {}, stopping: '{}'", peeked_line[pos], pos, peeked_line.left_of(pos).trimr("\r\n"));
+ _c4dbgpf("rscalar[FLOW]: found special character '{}' at {}, stopping: '{}'", peeked_line[pos], pos, peeked_line.left_of(pos).trimr("\r\n"));
peeked_line = peeked_line.left_of(pos);
_RYML_CB_ASSERT(m_stack.m_callbacks, peeked_line.end() >= m_state->line_contents.rem.begin());
_line_progressed(static_cast<size_t>(peeked_line.end() - m_state->line_contents.rem.begin()));
break;
}
- _c4dbgpf("rscalar[EXPL]: append another line, full: '{}'", peeked_line.trimr("\r\n"));
+ _c4dbgpf("rscalar[FLOW]: append another line, full: '{}'", peeked_line.trimr("\r\n"));
if(!first)
{
RYML_CHECK(_advance_to_peeked());
@@ -27728,12 +30382,17 @@ void Parser::_line_ended_undo()
_RYML_CB_ASSERT(m_stack.m_callbacks, m_state->pos.col == 1u);
_RYML_CB_ASSERT(m_stack.m_callbacks, m_state->pos.line > 0u);
_RYML_CB_ASSERT(m_stack.m_callbacks, m_state->pos.offset >= m_state->line_contents.full.len - m_state->line_contents.stripped.len);
- _c4dbgpf("line[{}] undo ended! line {}-->{}, offset {}-->{}", m_state->pos.line, m_state->pos.line, m_state->pos.line - 1, m_state->pos.offset, m_state->pos.offset - (m_state->line_contents.full.len - m_state->line_contents.stripped.len));
- m_state->pos.offset -= m_state->line_contents.full.len - m_state->line_contents.stripped.len;
+ size_t delta = m_state->line_contents.full.len - m_state->line_contents.stripped.len;
+ _c4dbgpf("line[{}] undo ended! line {}-->{}, offset {}-->{}", m_state->pos.line, m_state->pos.line, m_state->pos.line - 1, m_state->pos.offset, m_state->pos.offset - delta);
+ m_state->pos.offset -= delta;
--m_state->pos.line;
m_state->pos.col = m_state->line_contents.stripped.len + 1u;
+ // don't forget to undo also the changes to the remainder of the line
+ _RYML_CB_ASSERT(m_stack.m_callbacks, m_state->pos.offset >= m_buf.len || m_buf[m_state->pos.offset] == '\n' || m_buf[m_state->pos.offset] == '\r');
+ m_state->line_contents.rem = m_buf.sub(m_state->pos.offset, 0);
}
+
//-----------------------------------------------------------------------------
void Parser::_set_indentation(size_t indentation)
{
@@ -28392,7 +31051,8 @@ void Parser::_move_scalar_from_top()
}
//-----------------------------------------------------------------------------
-/** @todo this function is a monster and needs love. */
+/** @todo this function is a monster and needs love. Likely, it needs
+ * to be split like _scan_scalar_*() */
bool Parser::_handle_indentation()
{
_RYML_CB_ASSERT(m_stack.m_callbacks, has_none(FLOW));
@@ -28413,38 +31073,40 @@ bool Parser::_handle_indentation()
_c4dbgpf("indentation? ind={} indref={}", ind, m_state->indref);
if(ind == m_state->indref)
{
- if(has_all(SSCL|RVAL) && ! rem.sub(ind).begins_with('-'))
+ _c4dbgpf("same indentation: {}", ind);
+ if(!rem.sub(ind).begins_with('-'))
{
- if(has_all(RMAP))
- {
- _append_key_val_null(rem.str + ind - 1);
- addrem_flags(RKEY, RVAL);
- }
- #ifdef RYML_NO_COVERAGE__TO_BE_DELETED
- else if(has_all(RSEQ))
+ _c4dbgp("does not begin with -");
+ if(has_any(RMAP))
{
- _append_val(_consume_scalar());
- addrem_flags(RNXT, RVAL);
+ if(has_all(SSCL|RVAL))
+ {
+ _c4dbgp("add with null val");
+ _append_key_val_null(rem.str + ind - 1);
+ addrem_flags(RKEY, RVAL);
+ }
}
- else
+ else if(has_any(RSEQ))
{
- _c4err("internal error");
- }
- #endif
- }
- else if(has_all(RSEQ|RNXT) && ! rem.sub(ind).begins_with('-'))
- {
- if(m_stack.size() > 2) // do not pop to root level
- {
- _c4dbgp("end the indentless seq");
- _pop_level();
- return true;
+ if(m_stack.size() > 2) // do not pop to root level
+ {
+ if(has_any(RNXT))
+ {
+ _c4dbgp("end the indentless seq");
+ _pop_level();
+ return true;
+ }
+ else if(has_any(RVAL))
+ {
+ _c4dbgp("add with null val");
+ _append_val_null(rem.str);
+ _c4dbgp("end the indentless seq");
+ _pop_level();
+ return true;
+ }
+ }
}
}
- else
- {
- _c4dbgpf("same indentation ({}) -- nothing to see here", ind);
- }
_line_progressed(ind);
return ind > 0;
}
@@ -28632,10 +31294,9 @@ csubstr Parser::_scan_squot_scalar()
// leading whitespace also needs filtering
needs_filter = needs_filter
- || numlines > 1
+ || (numlines > 1)
|| line_is_blank
- || (_at_line_begin() && line.begins_with(' '))
- || (m_state->line_contents.full.last_of('\r') != csubstr::npos);
+ || (_at_line_begin() && line.begins_with(' '));
if(pos == npos)
{
@@ -28734,10 +31395,9 @@ csubstr Parser::_scan_dquot_scalar()
// leading whitespace also needs filtering
needs_filter = needs_filter
- || numlines > 1
+ || (numlines > 1)
|| line_is_blank
- || (_at_line_begin() && line.begins_with(' '))
- || (m_state->line_contents.full.last_of('\r') != csubstr::npos);
+ || (_at_line_begin() && line.begins_with(' '));
if(pos == npos)
{
@@ -28839,8 +31499,7 @@ csubstr Parser::_scan_block()
_line_ended();
_scan_line();
- _c4dbgpf("scanning block: style={} chomp={} indentation={}", newline==BLOCK_FOLD ? "fold" : "literal",
- chomp==CHOMP_CLIP ? "clip" : (chomp==CHOMP_STRIP ? "strip" : "keep"), indentation);
+ _c4dbgpf("scanning block: style={} chomp={} indentation={}", newline==BLOCK_FOLD ? "fold" : "literal", chomp==CHOMP_CLIP ? "clip" : (chomp==CHOMP_STRIP ? "strip" : "keep"), indentation);
// start with a zero-length block, already pointing at the right place
substr raw_block(m_buf.data() + m_state->pos.offset, size_t(0));// m_state->line_contents.full.sub(0, 0);
@@ -28887,15 +31546,17 @@ csubstr Parser::_scan_block()
_c4dbgpf("scanning block: line not empty. indref={} indprov={} indentation={}", m_state->indref, provisional_indentation, lc.indentation);
if(provisional_indentation == npos)
{
- #ifdef RYML_NO_COVERAGE__TO_BE_DELETED
if(lc.indentation < m_state->indref)
{
_c4dbgpf("scanning block: block terminated indentation={} < indref={}", lc.indentation, m_state->indref);
+ if(raw_block.len == 0)
+ {
+ _c4dbgp("scanning block: was empty, undo next line");
+ _line_ended_undo();
+ }
break;
}
- else
- #endif
- if(lc.indentation == m_state->indref)
+ else if(lc.indentation == m_state->indref)
{
if(has_any(RSEQ|RMAP))
{
@@ -28959,7 +31620,7 @@ csubstr Parser::_scan_block()
_line_ended();
++num_lines;
}
- _RYML_CB_ASSERT(m_stack.m_callbacks, m_state->pos.line == (first + num_lines));
+ _RYML_CB_ASSERT(m_stack.m_callbacks, m_state->pos.line == (first + num_lines) || (raw_block.len == 0));
C4_UNUSED(num_lines);
C4_UNUSED(first);
@@ -29485,7 +32146,7 @@ csubstr Parser::_filter_block_scalar(substr s, BlockStyle_e style, BlockChomp_e
_c4dbgfbl(": indentation={} before=[{}]~~~{}~~~", indentation, s.len, s);
- if(chomp != CHOMP_KEEP && s.trim(" \n\r\t").len == 0u)
+ if(chomp != CHOMP_KEEP && s.trim(" \n\r").len == 0u)
{
_c4dbgp("filt_block: empty scalar");
return s.first(0);
@@ -29994,7 +32655,7 @@ csubstr Parser::location_contents(Location const& loc) const
return m_buf.sub(loc.offset);
}
-Location Parser::location(NodeRef node) const
+Location Parser::location(ConstNodeRef node) const
{
_RYML_CB_ASSERT(m_stack.m_callbacks, node.valid());
return location(*node.tree(), node.id());
@@ -30002,90 +32663,158 @@ Location Parser::location(NodeRef node) const
Location Parser::location(Tree const& tree, size_t node) const
{
- _RYML_CB_CHECK(m_stack.m_callbacks, m_buf.str == m_newline_offsets_buf.str);
- _RYML_CB_CHECK(m_stack.m_callbacks, m_buf.len == m_newline_offsets_buf.len);
+ // try hard to avoid getting the location from a null string.
+ Location loc;
+ if(_location_from_node(tree, node, &loc, 0))
+ return loc;
+ return val_location(m_buf.str);
+}
+
+bool Parser::_location_from_node(Tree const& tree, size_t node, Location *C4_RESTRICT loc, size_t level) const
+{
if(tree.has_key(node))
{
- _RYML_CB_ASSERT(m_stack.m_callbacks, tree.key(node).is_sub(m_buf));
- _RYML_CB_ASSERT(m_stack.m_callbacks, m_buf.is_super(tree.key(node)));
- return val_location(tree.key(node).str);
+ csubstr k = tree.key(node);
+ if(C4_LIKELY(k.str != nullptr))
+ {
+ _RYML_CB_ASSERT(m_stack.m_callbacks, k.is_sub(m_buf));
+ _RYML_CB_ASSERT(m_stack.m_callbacks, m_buf.is_super(k));
+ *loc = val_location(k.str);
+ return true;
+ }
+ }
+
+ if(tree.has_val(node))
+ {
+ csubstr v = tree.val(node);
+ if(C4_LIKELY(v.str != nullptr))
+ {
+ _RYML_CB_ASSERT(m_stack.m_callbacks, v.is_sub(m_buf));
+ _RYML_CB_ASSERT(m_stack.m_callbacks, m_buf.is_super(v));
+ *loc = val_location(v.str);
+ return true;
+ }
}
- else if(tree.has_val(node))
+
+ if(tree.is_container(node))
{
- _RYML_CB_ASSERT(m_stack.m_callbacks, tree.val(node).is_sub(m_buf));
- _RYML_CB_ASSERT(m_stack.m_callbacks, m_buf.is_super(tree.val(node)));
- return val_location(tree.val(node).str);
+ if(_location_from_cont(tree, node, loc))
+ return true;
}
- else if(tree.is_container(node))
+
+ if(tree.type(node) != NOTYPE && level == 0)
{
- _RYML_CB_ASSERT(m_stack.m_callbacks, !tree.has_key(node));
- if(!tree.is_stream(node))
+ // try the prev sibling
{
- const char *node_start = tree._p(node)->m_val.scalar.str; // this was stored in the container
- if(tree.has_children(node))
+ const size_t prev = tree.prev_sibling(node);
+ if(prev != NONE)
{
- size_t child = tree.first_child(node);
- if(tree.has_key(child))
- {
- // when a map starts, the container was set after the key
- csubstr k = tree.key(child);
- if(node_start > k.str)
- node_start = k.str;
- }
+ if(_location_from_node(tree, prev, loc, level+1))
+ return true;
}
- return val_location(node_start);
}
- else // it's a stream
+ // try the next sibling
{
- return val_location(m_buf.str); // just return the front of the buffer
+ const size_t next = tree.next_sibling(node);
+ if(next != NONE)
+ {
+ if(_location_from_node(tree, next, loc, level+1))
+ return true;
+ }
+ }
+ // try the parent
+ {
+ const size_t parent = tree.parent(node);
+ if(parent != NONE)
+ {
+ if(_location_from_node(tree, parent, loc, level+1))
+ return true;
+ }
}
}
- _RYML_CB_ASSERT(m_stack.m_callbacks, tree.type(node) == NOTYPE);
- return val_location(m_buf.str);
+
+ return false;
}
+bool Parser::_location_from_cont(Tree const& tree, size_t node, Location *C4_RESTRICT loc) const
+{
+ _RYML_CB_ASSERT(m_stack.m_callbacks, tree.is_container(node));
+ if(!tree.is_stream(node))
+ {
+ const char *node_start = tree._p(node)->m_val.scalar.str; // this was stored in the container
+ if(tree.has_children(node))
+ {
+ size_t child = tree.first_child(node);
+ if(tree.has_key(child))
+ {
+ // when a map starts, the container was set after the key
+ csubstr k = tree.key(child);
+ if(k.str && node_start > k.str)
+ node_start = k.str;
+ }
+ }
+ *loc = val_location(node_start);
+ return true;
+ }
+ else // it's a stream
+ {
+ *loc = val_location(m_buf.str); // just return the front of the buffer
+ }
+ return true;
+}
+
+
Location Parser::val_location(const char *val) const
{
- if(_locations_dirty())
- _prepare_locations();
- csubstr src = m_buf;
- _RYML_CB_CHECK(m_stack.m_callbacks, src.str == m_newline_offsets_buf.str);
- _RYML_CB_CHECK(m_stack.m_callbacks, src.len == m_newline_offsets_buf.len);
- _RYML_CB_CHECK(m_stack.m_callbacks, val >= src.begin() && val <= src.end());
+ if(C4_UNLIKELY(val == nullptr))
+ return {m_file, 0, 0, 0};
+
+ _RYML_CB_CHECK(m_stack.m_callbacks, m_options.locations());
+ // NOTE: if any of these checks fails, the parser needs to be
+ // instantiated with locations enabled.
+ _RYML_CB_ASSERT(m_stack.m_callbacks, m_buf.str == m_newline_offsets_buf.str);
+ _RYML_CB_ASSERT(m_stack.m_callbacks, m_buf.len == m_newline_offsets_buf.len);
+ _RYML_CB_ASSERT(m_stack.m_callbacks, m_options.locations());
+ _RYML_CB_ASSERT(m_stack.m_callbacks, !_locations_dirty());
_RYML_CB_ASSERT(m_stack.m_callbacks, m_newline_offsets != nullptr);
_RYML_CB_ASSERT(m_stack.m_callbacks, m_newline_offsets_size > 0);
- using linetype = size_t const* C4_RESTRICT;
- linetype line = nullptr;
+ // NOTE: the pointer needs to belong to the buffer that was used to parse.
+ csubstr src = m_buf;
+ _RYML_CB_CHECK(m_stack.m_callbacks, val != nullptr || src.str == nullptr);
+ _RYML_CB_CHECK(m_stack.m_callbacks, (val >= src.begin() && val <= src.end()) || (src.str == nullptr && val == nullptr));
+ // ok. search the first stored newline after the given ptr
+ using lineptr_type = size_t const* C4_RESTRICT;
+ lineptr_type lineptr = nullptr;
size_t offset = (size_t)(val - src.begin());
- if(m_newline_offsets_size < 30)
+ if(m_newline_offsets_size < 30) // TODO magic number
{
- // do a linear search if the size is small.
- for(linetype curr = m_newline_offsets; curr < m_newline_offsets + m_newline_offsets_size; ++curr)
+ // just do a linear search if the size is small.
+ for(lineptr_type curr = m_newline_offsets, last = m_newline_offsets + m_newline_offsets_size; curr < last; ++curr)
{
if(*curr > offset)
{
- line = curr;
+ lineptr = curr;
break;
}
}
}
else
{
- // Do a bisection search if the size is not small.
+ // do a bisection search if the size is not small.
//
// We could use std::lower_bound but this is simple enough and
// spares the include of <algorithm>.
size_t count = m_newline_offsets_size;
size_t step;
- linetype it;
- line = m_newline_offsets;
+ lineptr_type it;
+ lineptr = m_newline_offsets;
while(count)
{
step = count >> 1;
- it = line + step;
+ it = lineptr + step;
if(*it < offset)
{
- line = ++it;
+ lineptr = ++it;
count -= step + 1;
}
else
@@ -30094,31 +32823,23 @@ Location Parser::val_location(const char *val) const
}
}
}
- if(line)
- {
- _RYML_CB_ASSERT(m_stack.m_callbacks, *line > offset);
- }
- else
- {
- _RYML_CB_ASSERT(m_stack.m_callbacks, m_buf.empty());
- _RYML_CB_ASSERT(m_stack.m_callbacks, m_newline_offsets_size == 1);
- line = m_newline_offsets;
- }
- _RYML_CB_ASSERT(m_stack.m_callbacks, line >= m_newline_offsets && line < m_newline_offsets + m_newline_offsets_size);;
- Location loc = {};
+ _RYML_CB_ASSERT(m_stack.m_callbacks, lineptr >= m_newline_offsets);
+ _RYML_CB_ASSERT(m_stack.m_callbacks, lineptr <= m_newline_offsets + m_newline_offsets_size);
+ _RYML_CB_ASSERT(m_stack.m_callbacks, *lineptr > offset);
+ Location loc;
loc.name = m_file;
loc.offset = offset;
- loc.line = (size_t)(line - m_newline_offsets);
- if(line > m_newline_offsets)
- loc.col = (offset - *(line-1) - 1u);
+ loc.line = (size_t)(lineptr - m_newline_offsets);
+ if(lineptr > m_newline_offsets)
+ loc.col = (offset - *(lineptr-1) - 1u);
else
loc.col = offset;
return loc;
}
-void Parser::_prepare_locations() const
+void Parser::_prepare_locations()
{
- _RYML_CB_ASSERT(m_stack.m_callbacks, !m_file.empty());
+ m_newline_offsets_buf = m_buf;
size_t numnewlines = 1u + m_buf.count('\n');
_resize_locations(numnewlines);
m_newline_offsets_size = 0;
@@ -30129,7 +32850,7 @@ void Parser::_prepare_locations() const
_RYML_CB_ASSERT(m_stack.m_callbacks, m_newline_offsets_size == numnewlines);
}
-void Parser::_resize_locations(size_t numnewlines) const
+void Parser::_resize_locations(size_t numnewlines)
{
if(numnewlines > m_newline_offsets_capacity)
{
@@ -30140,12 +32861,6 @@ void Parser::_resize_locations(size_t numnewlines) const
}
}
-void Parser::_mark_locations_dirty()
-{
- m_newline_offsets_size = 0u;
- m_newline_offsets_buf = m_buf;
-}
-
bool Parser::_locations_dirty() const
{
return !m_newline_offsets_size;
@@ -30189,6 +32904,13 @@ bool Parser::_locations_dirty() const
namespace c4 {
namespace yml {
+
+
+
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+
size_t NodeRef::set_key_serialized(c4::fmt::const_base64_wrapper w)
{
_apply_seed();
@@ -30205,22 +32927,6 @@ size_t NodeRef::set_val_serialized(c4::fmt::const_base64_wrapper w)
return encoded.len;
}
-size_t NodeRef::deserialize_key(c4::fmt::base64_wrapper w) const
-{
- RYML_ASSERT( ! is_seed());
- RYML_ASSERT(valid());
- RYML_ASSERT(get() != nullptr);
- return from_chars(key(), &w);
-}
-
-size_t NodeRef::deserialize_val(c4::fmt::base64_wrapper w) const
-{
- RYML_ASSERT( ! is_seed());
- RYML_ASSERT(valid());
- RYML_ASSERT(get() != nullptr);
- return from_chars(val(), &w);
-}
-
} // namespace yml
} // namespace c4
@@ -30823,7 +33529,7 @@ inline size_t print_node(Tree const& p, size_t node, int level, size_t count, bo
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-inline void print_node(NodeRef const& p, int level=0)
+inline void print_node(ConstNodeRef const& p, int level=0)
{
print_node(*p.tree(), p.id(), level, 0, true);
}
diff --git a/src/third-party/robin_hood/robin_hood.h b/src/third-party/robin_hood/robin_hood.h
index 0af031f..b4e0fbc 100644
--- a/src/third-party/robin_hood/robin_hood.h
+++ b/src/third-party/robin_hood/robin_hood.h
@@ -206,7 +206,7 @@ static Counts& counts() {
// workaround missing "is_trivially_copyable" in g++ < 5.0
// See https://stackoverflow.com/a/31798726/48181
-#if defined(__GNUC__) && __GNUC__ < 5
+#if defined(__GNUC__) && __GNUC__ < 5 && !defined(__clang__)
# define ROBIN_HOOD_IS_TRIVIALLY_COPYABLE(...) __has_trivial_copy(__VA_ARGS__)
#else
# define ROBIN_HOOD_IS_TRIVIALLY_COPYABLE(...) std::is_trivially_copyable<__VA_ARGS__>::value
diff --git a/src/time-extension-functions.cc b/src/time-extension-functions.cc
index b92ec2a..b6567fd 100644
--- a/src/time-extension-functions.cc
+++ b/src/time-extension-functions.cc
@@ -34,10 +34,12 @@
#include <string.h>
+#include "base/attr_line.builder.hh"
#include "base/date_time_scanner.hh"
#include "base/humanize.time.hh"
-#include "base/lrucache.hpp"
#include "config.h"
+#include "date/tz.h"
+#include "ptimec.hh"
#include "relative_time.hh"
#include "sql_util.hh"
#include "vtab_module.hh"
@@ -186,6 +188,73 @@ sql_humanize_duration(double value)
return humanize::time::duration::from_tv(tv).to_string();
}
+static nonstd::optional<std::string>
+sql_timezone(std::string tz_str, string_fragment ts_str)
+{
+ thread_local date_time_scanner dts;
+ struct timeval tv;
+ exttm tm1;
+
+ auto scan_end
+ = dts.scan(ts_str.data(), ts_str.length(), nullptr, &tm1, tv, false);
+ if (scan_end == nullptr) {
+ auto um = lnav::console::user_message::error(
+ attr_line_t("unrecognized timestamp: ").append(ts_str));
+ throw um;
+ }
+ size_t matched_size = scan_end - ts_str.data();
+ auto ts_remaining = ts_str.substr(matched_size);
+ if (!ts_remaining.empty()) {
+ auto um
+ = lnav::console::user_message::error(
+ attr_line_t("invalid timestamp: ").append(ts_str))
+ .with_reason(attr_line_t("the leading part of the timestamp "
+ "was matched, however, the trailing "
+ "text ")
+ .append_quoted(ts_remaining)
+ .append(" was not"))
+ .with_note(attr_line_t("input matched time format ")
+ .append_quoted(
+ PTIMEC_FORMATS[dts.dts_fmt_lock].pf_fmt))
+ .with_help("fix the timestamp or remove the trailing text");
+
+ auto ts_attr = attr_line_t().append(ts_str);
+ attr_line_builder alb(ts_attr);
+
+ alb.append("\n").append(matched_size, ' ');
+ {
+ auto attr_guard = alb.with_attr(VC_ROLE.value(role_t::VCR_COMMENT));
+
+ alb.append("^");
+ if (ts_remaining.length() > 1) {
+ if (ts_remaining.length() > 2) {
+ alb.append(ts_remaining.length() - 2, '-');
+ }
+ alb.append("^");
+ }
+ alb.append(" unrecognized input");
+ }
+ um.with_note(ts_attr);
+ throw um;
+ }
+
+ thread_local std::string last_tz;
+ thread_local const date::time_zone* tz;
+
+ if (tz_str != last_tz) {
+ tz = date::locate_zone(tz_str);
+ }
+
+ auto stime = std::chrono::time_point_cast<std::chrono::microseconds>(
+ std::chrono::system_clock::from_time_t(tv.tv_sec));
+ stime += std::chrono::microseconds{tv.tv_usec};
+ auto ztime = date::make_zoned(tz, stime);
+
+ auto retval = date::format("%FT%T%z", ztime);
+
+ return retval;
+}
+
int
time_extension_functions(struct FuncDef** basic_funcs,
struct FuncDefAgg** agg_funcs)
@@ -198,6 +267,7 @@ time_extension_functions(struct FuncDef** basic_funcs,
"timestamp falls in. "
"If the time falls outside of the slice, NULL is returned.")
.sql_function()
+ .with_prql_path({"time", "slice"})
.with_parameter(
{"time", "The timestamp to get the time slice for."})
.with_parameter({"slice", "The size of the time slices"})
@@ -224,6 +294,7 @@ time_extension_functions(struct FuncDef** basic_funcs,
"timediff",
"Compute the difference between two timestamps in seconds")
.sql_function()
+ .with_prql_path({"time", "diff"})
.with_parameter({"time1", "The first timestamp"})
.with_parameter(
{"time2", "The timestamp to subtract from the first"})
@@ -245,6 +316,7 @@ time_extension_functions(struct FuncDef** basic_funcs,
"Format the given seconds value as an abbreviated "
"duration string")
.sql_function()
+ .with_prql_path({"humanize", "duration"})
.with_parameter({"secs", "The duration in seconds"})
.with_tags({"datetime", "string"})
.with_example({
@@ -256,6 +328,19 @@ time_extension_functions(struct FuncDef** basic_funcs,
"SELECT humanize_duration(1.5)",
})),
+ sqlite_func_adapter<decltype(&sql_timezone), sql_timezone>::builder(
+ help_text("timezone", "Convert a timestamp to the given timezone")
+ .sql_function()
+ .with_prql_path({"time", "to_zone"})
+ .with_parameter({"tz", "The target timezone"})
+ .with_parameter({"ts", "The source timestamp"})
+ .with_tags({"datetime", "string"})
+ .with_example({
+ "To convert a time to America/Los_Angeles",
+ "SELECT timezone('America/Los_Angeles', "
+ "'2022-03-02T10:00')",
+ })),
+
{nullptr},
};
diff --git a/src/time_formats.am b/src/time_formats.am
index eb882e4..1716f27 100644
--- a/src/time_formats.am
+++ b/src/time_formats.am
@@ -1,52 +1,83 @@
TIME_FORMATS = \
"@%@" \
- "%Y-%m-%d %H:%M:%S" \
+ "%Y-%m-%d %H:%M:%S.%f%z" \
+ "%Y-%m-%d %H:%M:%S,%f%z" \
+ "%Y-%m-%d %H:%M:%S.%f %Z" \
+ "%Y-%m-%d %H:%M:%S,%f %Z" \
+ "%Y-%m-%d %H:%M:%S,%L%z" \
+ "%Y-%m-%d %H:%M:%S,%L %z" \
+ "%Y-%m-%d %H:%M:%S.%L%z" \
+ "%Y-%m-%d %H:%M:%S.%L %z" \
+ "%Y-%m-%d %H:%M:%S.%L %Z" \
+ "%Y-%m-%d %H:%M:%S,%L" \
+ "%Y-%m-%d %H:%M:%S.%L" \
"%Y-%m-%d %H:%M:%S%z" \
"%Y-%m-%d %H:%M:%S %z" \
+ "%Y-%m-%d %H:%M:%S:%L" \
+ "%Y-%m-%d %H:%M:%S" \
"%Y-%m-%d %H:%M" \
+ "%Y-%m-%dT%H:%M:%S %p %Z" \
+ "%Y-%m-%dT%H:%M:%S.%N%z" \
+ "%y-%m-%dT%H:%M:%S.%N%z" \
"%Y-%m-%dT%H:%M:%S.%f%z" \
"%y-%m-%dT%H:%M:%S.%f%z" \
- "%Y-%m-%dT%H:%M:%SZ" \
+ "%Y-%m-%dT%H:%M:%S.%L%z" \
+ "%y-%m-%dT%H:%M:%S.%L%z" \
"%Y-%m-%dT%H:%M:%S%z" \
- "%Y-%m-%dT%H:%M:%S" \
"%Y-%m-%dT%H:%M:%S%z" \
+ "%Y-%m-%dT%H:%M:%S" \
"%Y-%m-%dT%H:%M" \
- "%Y/%m/%d %H:%M:%S" \
"%Y/%m/%d %H:%M:%S %z" \
"%Y/%m/%d %H:%M:%S%z" \
+ "%Y/%m/%d %H:%M:%S.%f%z" \
+ "%Y/%m/%d %H:%M:%S.%f%Z" \
+ "%Y/%m/%d %H:%M:%S.%f %z" \
+ "%Y/%m/%d %H:%M:%S.%f %Z" \
+ "%Y/%m/%d %H:%M:%S.%f" \
+ "%Y/%m/%d %H:%M:%S.%L" \
+ "%Y/%m/%d %H:%M:%S" \
"%Y/%m/%d %H:%M" \
"%Y %b %d %a %H:%M:%S.%L" \
"%Y %b %d %H:%M:%S.%L" \
"%Y %b %d %H:%M:%S" \
"%a %b %d %H:%M:%S %Y" \
"%a %b %d %H:%M:%S.%f %Y" \
+ "%a %b %d %H:%M:%S:%f %Y" \
"%a %b %d %H:%M:%S %Z %Y" \
+ "%a %b %d %I:%M:%S %p %Z %Y" \
"%a %b %d %H:%M:%S " \
"%a %b %d %H:%M:%S.%L " \
"%a %b %d %H:%M " \
"%a %b %e %H:%M:%S %Z %Y" \
- "%d/%b/%Y:%H:%M:%S +0000" \
"%d/%b/%Y:%H:%M:%S %z" \
"%d-%b-%Y %H:%M:%S %z" \
"%d-%b-%Y %H:%M:%S %Z" \
"%d %b %Y %H:%M:%S" \
+ "%d %b %Y %H:%M:%S.%L%z" \
+ "%d %b %Y %H:%M:%S,%L%z" \
"%d %b %Y %H:%M:%S.%L" \
"%d %b %Y %H:%M:%S,%L" \
"%d %b %Y %H:%M" \
+ "%b-%d %H:%M:%S" \
"%b %d %H:%M:%S" \
"%b %d %k:%M:%S" \
"%b %d %l:%M:%S" \
"%b %d %l:%M" \
"%b %e, %Y %l:%M:%S %p" \
"%b %d, %Y %l:%M:%S %p" \
- "%m/%d/%y %H:%M:%S" \
"%m/%d/%Y %I:%M:%S:%L %p %Z" \
"%m/%d/%Y %I:%M:%S %p %Z" \
"%m/%d/%Y %l:%M:%S %p %Z" \
+ "%m/%d/%Y %I:%M:%S %p%z" \
+ "%m/%d/%Y %l:%M:%S %p%z" \
+ "%m/%e/%Y %l:%M:%S %p%z" \
+ "%m/%e/%Y %l:%M:%S %p %z" \
"%m/%e/%Y %I:%M:%S %p" \
- "%m/%e/%Y %l:%M:%S %p" \
+ "%m/%e/%Y %l:%M:%S%p" \
+ "%m/%d/%y %H:%M:%S" \
"%m/%d/%Y %H:%M:%S" \
+ "%d/%b/%Y %H:%M:%S" \
"%d/%b/%y %H:%M:%S" \
"%m%d %H:%M:%S" \
"%Y%m%d %H:%M:%S" \
diff --git a/src/top_status_source.cc b/src/top_status_source.cc
index 59b95e5..6f7d383 100644
--- a/src/top_status_source.cc
+++ b/src/top_status_source.cc
@@ -29,14 +29,11 @@
#include "top_status_source.hh"
-#include "base/injector.hh"
#include "config.h"
#include "lnav.hh"
#include "md2attr_line.hh"
#include "md4cpp.hh"
#include "shlex.hh"
-#include "shlex.resolver.hh"
-#include "sql_util.hh"
#include "sqlitepp.client.hh"
#include "top_status_source.cfg.hh"
@@ -46,7 +43,7 @@ SELECT message FROM lnav_user_notifications
(expiration IS NULL OR expiration > datetime('now')) AND
(views IS NULL OR
json_contains(views, (SELECT name FROM lnav_top_view)))
- ORDER BY priority DESC
+ ORDER BY priority DESC, expiration ASC
LIMIT 1
)";
@@ -67,12 +64,13 @@ top_status_source::update_time(const timeval& current_time)
{
auto& sf = this->tss_fields[TSF_TIME];
char buffer[32];
+ tm current_tm;
buffer[0] = ' ';
strftime(&buffer[1],
sizeof(buffer) - 1,
this->tss_config.tssc_clock_format.c_str(),
- localtime(&current_time.tv_sec));
+ localtime_r(&current_time.tv_sec, &current_tm));
sf.set_value(buffer);
}
@@ -99,7 +97,8 @@ top_status_source::update_user_msg()
std::string user_note;
lexer.with_ignore_quotes(true).eval(
- user_note, lnav_data.ld_exec_context.ec_global_vars);
+ user_note,
+ scoped_resolver{&lnav_data.ld_exec_context.ec_global_vars});
md2attr_line mdal;
auto parse_res = md4cpp::parse(user_note, mdal);
diff --git a/src/top_status_source.hh b/src/top_status_source.hh
index 5c76796..160aab0 100644
--- a/src/top_status_source.hh
+++ b/src/top_status_source.hh
@@ -30,15 +30,8 @@
#ifndef lnav_top_status_source_hh
#define lnav_top_status_source_hh
-#include <string>
-
-#include <sqlite3.h>
-
-#include "base/injector.hh"
-#include "bound_tags.hh"
-#include "listview_curses.hh"
-#include "sql_util.hh"
#include "sqlitepp.client.hh"
+#include "sqlitepp.hh"
#include "statusview_curses.hh"
#include "top_status_source.cfg.hh"
diff --git a/src/unique_path.cc b/src/unique_path.cc
index c0cbc05..6ffc8ee 100644
--- a/src/unique_path.cc
+++ b/src/unique_path.cc
@@ -30,12 +30,13 @@
#include "unique_path.hh"
#include "config.h"
+#include "fmt/format.h"
void
unique_path_generator::add_source(
const std::shared_ptr<unique_path_source>& path_source)
{
- ghc::filesystem::path path = path_source->get_path();
+ const auto path = path_source->get_path();
path_source->set_unique_path(path.filename());
path_source->set_path_prefix(path.parent_path());
@@ -53,21 +54,22 @@ unique_path_generator::generate()
for (const auto& pair : this->upg_unique_paths) {
if (pair.second.size() == 1) {
if (loop_count > 0) {
- std::shared_ptr<unique_path_source> src = pair.second[0];
-
- src->set_unique_path("[" + src->get_unique_path());
+ const auto src = pair.second[0];
+ auto lsquare = fmt::format(FMT_STRING("[{}"),
+ src->get_unique_path().native());
+ src->set_unique_path(lsquare);
}
- this->upg_max_len
- = std::max(this->upg_max_len,
- pair.second[0]->get_unique_path().size());
+ this->upg_max_len = std::max(
+ this->upg_max_len,
+ pair.second[0]->get_unique_path().native().size());
} else {
bool all_common = true;
do {
std::string common;
- for (auto& src : pair.second) {
+ for (const auto& src : pair.second) {
auto& path = src->get_path_prefix();
if (common.empty()) {
@@ -81,7 +83,7 @@ unique_path_generator::generate()
}
if (all_common) {
- for (auto& src : pair.second) {
+ for (const auto& src : pair.second) {
auto& path = src->get_path_prefix();
auto par = path.parent_path();
@@ -103,22 +105,24 @@ unique_path_generator::generate()
for (auto& src : collisions) {
const auto unique_path = src->get_unique_path();
- auto& prefix = src->get_path_prefix();
+ const auto& prefix = src->get_path_prefix();
if (loop_count == 0) {
src->set_unique_path(prefix.filename().string() + "]/"
- + unique_path);
+ + unique_path.string());
} else {
src->set_unique_path(prefix.filename().string() + "/"
- + unique_path);
+ + unique_path.string());
}
- ghc::filesystem::path parent = prefix.parent_path();
+ const auto parent = prefix.parent_path();
src->set_path_prefix(parent);
if (parent.empty() || parent == prefix) {
- src->set_unique_path("[" + src->get_unique_path());
+ auto lsquare = fmt::format(FMT_STRING("[{}"),
+ src->get_unique_path().native());
+ src->set_unique_path(lsquare);
} else {
this->upg_unique_paths[src->get_unique_path()].push_back(src);
}
diff --git a/src/unique_path.hh b/src/unique_path.hh
index 47ff93b..01fa567 100644
--- a/src/unique_path.hh
+++ b/src/unique_path.hh
@@ -51,11 +51,14 @@ public:
this->ups_unique_path = path;
}
- const std::string& get_unique_path() const { return this->ups_unique_path; }
+ const ghc::filesystem::path& get_unique_path() const
+ {
+ return this->ups_unique_path;
+ }
virtual ghc::filesystem::path get_path() const = 0;
- ghc::filesystem::path& get_path_prefix()
+ const ghc::filesystem::path& get_path_prefix() const
{
return this->ups_prefix;
}
@@ -67,7 +70,7 @@ public:
private:
ghc::filesystem::path ups_prefix;
- std::string ups_unique_path;
+ ghc::filesystem::path ups_unique_path;
};
/**
diff --git a/src/url_handler.cc b/src/url_handler.cc
new file mode 100644
index 0000000..a909253
--- /dev/null
+++ b/src/url_handler.cc
@@ -0,0 +1,259 @@
+/**
+ * Copyright (c) 2023, Timothy Stack
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of Timothy Stack nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ''AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "url_handler.hh"
+
+#include <curl/curl.h>
+
+#include "base/fs_util.hh"
+#include "base/injector.hh"
+#include "base/paths.hh"
+#include "lnav.hh"
+#include "service_tags.hh"
+#include "url_handler.cfg.hh"
+
+namespace lnav {
+namespace url_handler {
+
+void
+looper::handler_looper::loop_body()
+{
+ pollfd pfd[1];
+
+ pfd[0].events = POLLIN;
+ pfd[0].fd = this->hl_line_buffer.get_fd();
+ pfd[0].revents = 0;
+
+ log_debug("doing url handler poll");
+ auto prc = poll(pfd, 1, 100);
+ log_debug("poll rc %d", prc);
+ if (prc > 0) {
+ auto load_res
+ = this->hl_line_buffer.load_next_line(this->hl_last_range);
+
+ if (load_res.isErr()) {
+ log_error("failed to load next line: %s",
+ load_res.unwrapErr().c_str());
+ this->s_looping = false;
+ } else {
+ auto li = load_res.unwrap();
+
+ log_debug("li %d %d:%d",
+ li.li_partial,
+ li.li_file_range.fr_offset,
+ li.li_file_range.fr_size);
+ if (!li.li_partial && !li.li_file_range.empty()) {
+ auto read_res
+ = this->hl_line_buffer.read_range(li.li_file_range);
+
+ if (read_res.isErr()) {
+ log_error("cannot read line: %s",
+ read_res.unwrapErr().c_str());
+ } else {
+ auto cmd = trim(to_string(read_res.unwrap()));
+ log_debug("url handler command: %s", cmd.c_str());
+
+ isc::to<main_looper&, services::main_t>().send(
+ [cmd](auto& mlooper) {
+ auto exec_res
+ = execute_any(lnav_data.ld_exec_context, cmd);
+ if (exec_res.isErr()) {
+ auto um = exec_res.unwrapErr();
+ log_error(
+ "%s",
+ um.to_attr_line().get_string().c_str());
+ }
+ });
+ }
+ this->hl_last_range = li.li_file_range;
+ }
+ }
+
+ if (this->hl_line_buffer.is_pipe_closed()) {
+ log_info("URL handler finished");
+ this->s_looping = false;
+ }
+ }
+}
+
+Result<void, lnav::console::user_message>
+looper::open(std::string url)
+{
+ const auto& cfg = injector::get<const config&>();
+
+ log_info("open request for URL: %s", url.c_str());
+
+ auto* cu = curl_url();
+ auto set_rc = curl_url_set(
+ cu, CURLUPART_URL, url.c_str(), CURLU_NON_SUPPORT_SCHEME);
+ if (set_rc != CURLUE_OK) {
+ return Err(
+ lnav::console::user_message::error(
+ attr_line_t("invalid URL: ").append(lnav::roles::file(url)))
+ .with_reason(curl_url_strerror(set_rc)));
+ }
+
+ char* scheme_part;
+ auto get_rc = curl_url_get(cu, CURLUPART_SCHEME, &scheme_part, 0);
+ if (get_rc != CURLUE_OK) {
+ return Err(lnav::console::user_message::error(
+ attr_line_t("cannot get scheme from URL: ")
+ .append(lnav::roles::file(url)))
+ .with_reason(curl_url_strerror(set_rc)));
+ }
+
+ auto proto_iter = cfg.c_schemes.find(scheme_part);
+ if (proto_iter == cfg.c_schemes.end()) {
+ return Err(lnav::console::user_message::error(
+ attr_line_t("no defined handler for URL scheme: ")
+ .append(lnav::roles::file(scheme_part)))
+ .with_reason(curl_url_strerror(set_rc)));
+ }
+
+ log_info("found URL handler: %s",
+ proto_iter->second.p_handler.pp_value.c_str());
+ auto err_pipe_res = auto_pipe::for_child_fd(STDERR_FILENO);
+ if (err_pipe_res.isErr()) {
+ return Err(
+ lnav::console::user_message::error(
+ attr_line_t("cannot open URL: ").append(lnav::roles::file(url)))
+ .with_reason(err_pipe_res.unwrapErr()));
+ }
+ auto err_pipe = err_pipe_res.unwrap();
+ auto out_pipe_res = auto_pipe::for_child_fd(STDOUT_FILENO);
+ if (out_pipe_res.isErr()) {
+ return Err(
+ lnav::console::user_message::error(
+ attr_line_t("cannot open URL: ").append(lnav::roles::file(url)))
+ .with_reason(out_pipe_res.unwrapErr()));
+ }
+ auto out_pipe = out_pipe_res.unwrap();
+ auto child_pid_res = lnav::pid::from_fork();
+ if (child_pid_res.isErr()) {
+ return Err(
+ lnav::console::user_message::error(
+ attr_line_t("cannot open URL: ").append(lnav::roles::file(url)))
+ .with_reason(child_pid_res.unwrapErr()));
+ }
+
+ auto child_pid = child_pid_res.unwrap();
+
+ out_pipe.after_fork(child_pid.in());
+ err_pipe.after_fork(child_pid.in());
+
+ auto name = proto_iter->second.p_handler.pp_value;
+ if (child_pid.in_child()) {
+ auto dev_null = ::open("/dev/null", O_RDONLY | O_CLOEXEC);
+
+ dup2(dev_null, STDIN_FILENO);
+
+ char* host_part = nullptr;
+ curl_url_get(cu, CURLUPART_HOST, &host_part, 0);
+ std::string host_part_str;
+ if (host_part != nullptr) {
+ host_part_str = host_part;
+ }
+
+ auto source_path = ghc::filesystem::path{
+ proto_iter->second.p_handler.pp_location.sl_source.get()};
+ auto new_path = lnav::filesystem::build_path({
+ source_path.parent_path(),
+ lnav::paths::dotlnav() / "formats/default",
+ });
+ setenv("PATH", new_path.c_str(), 1);
+ setenv("URL_HOSTNAME", host_part_str.c_str(), 1);
+
+ const char* args[] = {
+ name.c_str(),
+ nullptr,
+ };
+
+ execvp(name.c_str(), (char**) args);
+ _exit(EXIT_FAILURE);
+ }
+
+ auto error_queue = std::make_shared<std::vector<std::string>>();
+ std::thread err_reader([err = std::move(err_pipe.read_end()),
+ name,
+ error_queue,
+ child_pid = child_pid.in()]() mutable {
+ line_buffer lb;
+ file_range pipe_range;
+ bool done = false;
+
+ log_debug("error reader");
+ lb.set_fd(err);
+ while (!done) {
+ auto load_res = lb.load_next_line(pipe_range);
+
+ if (load_res.isErr()) {
+ done = true;
+ } else {
+ auto li = load_res.unwrap();
+
+ pipe_range = li.li_file_range;
+ if (li.li_file_range.empty()) {
+ done = true;
+ } else {
+ lb.read_range(li.li_file_range)
+ .then([name, error_queue, child_pid](auto sbr) {
+ auto line_str = string_fragment(
+ sbr.get_data(), 0, sbr.length())
+ .trim("\n");
+ if (error_queue->size() < 5) {
+ error_queue->emplace_back(line_str.to_string());
+ }
+
+ log_debug("%s[%d]: %.*s",
+ name.c_str(),
+ child_pid,
+ line_str.length(),
+ line_str.data());
+ });
+ }
+ }
+ }
+ });
+ err_reader.detach();
+
+ auto child = std::make_shared<handler_looper>(
+ url, std::move(child_pid), std::move(out_pipe.read_end()));
+ this->s_children.add_child_service(child);
+ this->l_children[url] = child;
+
+ return Ok();
+}
+
+void
+looper::close(std::string url)
+{
+}
+
+} // namespace url_handler
+} // namespace lnav
diff --git a/src/url_handler.cfg.hh b/src/url_handler.cfg.hh
new file mode 100644
index 0000000..51b14a9
--- /dev/null
+++ b/src/url_handler.cfg.hh
@@ -0,0 +1,52 @@
+/**
+ * Copyright (c) 2023, Timothy Stack
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of Timothy Stack nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ''AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef lnav_url_handler_cfg_hh
+#define lnav_url_handler_cfg_hh
+
+#include <map>
+#include <string>
+
+#include "yajlpp/yajlpp.hh"
+
+namespace lnav {
+namespace url_handler {
+
+struct scheme {
+ positioned_property<std::string> p_handler;
+};
+
+struct config {
+ std::map<std::string, scheme> c_schemes;
+};
+
+} // namespace url_handler
+} // namespace lnav
+
+#endif
diff --git a/src/url_handler.hh b/src/url_handler.hh
new file mode 100644
index 0000000..6171500
--- /dev/null
+++ b/src/url_handler.hh
@@ -0,0 +1,95 @@
+/**
+ * Copyright (c) 2023, Timothy Stack
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of Timothy Stack nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ''AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// XXX This code is unused right now, but it's nice and I don't want to delete
+// it just yet.
+
+#ifndef lnav_url_handler_hh
+#define lnav_url_handler_hh
+
+#include <map>
+#include <string>
+
+#include "base/auto_fd.hh"
+#include "base/auto_pid.hh"
+#include "base/isc.hh"
+#include "base/lnav.console.hh"
+#include "base/result.h"
+#include "line_buffer.hh"
+#include "mapbox/variant.hpp"
+
+namespace lnav {
+namespace url_handler {
+
+class looper : public isc::service<looper> {
+public:
+ Result<void, lnav::console::user_message> open(std::string url);
+
+ void close(std::string url);
+
+private:
+ class handler_looper : public isc::service<handler_looper> {
+ public:
+ handler_looper(std::string url,
+ auto_pid<process_state::running> pid,
+ auto_fd infd)
+ : isc::service<handler_looper>(url), hl_state(std::move(pid))
+ {
+ this->hl_line_buffer.set_fd(infd);
+ }
+
+ protected:
+ void loop_body() override;
+
+ std::chrono::milliseconds compute_timeout(
+ mstime_t current_time) const override
+ {
+ return std::chrono::milliseconds{0};
+ }
+
+ public:
+ struct handler_completed {};
+
+ using state_v = mapbox::util::variant<auto_pid<process_state::running>,
+ handler_completed>;
+
+ file_range hl_last_range;
+ line_buffer hl_line_buffer;
+ state_v hl_state;
+ };
+
+ struct child {};
+
+ std::map<std::string, std::shared_ptr<handler_looper>> l_children;
+};
+
+} // namespace url_handler
+} // namespace lnav
+
+#endif
diff --git a/src/url_loader.hh b/src/url_loader.hh
index 799d1a2..bbe582f 100644
--- a/src/url_loader.hh
+++ b/src/url_loader.hh
@@ -37,20 +37,23 @@
# include <paths.h>
# include "base/fs_util.hh"
+# include "base/paths.hh"
# include "curl_looper.hh"
class url_loader : public curl_request {
public:
url_loader(const std::string& url) : curl_request(url)
{
- auto tmp_res = lnav::filesystem::open_temp_file(
- ghc::filesystem::temp_directory_path() / "lnav.url.XXXXXX");
+ std::error_code errc;
+ ghc::filesystem::create_directories(lnav::paths::workdir(), errc);
+ auto tmp_res = lnav::filesystem::open_temp_file(lnav::paths::workdir()
+ / "url.XXXXXX");
if (tmp_res.isErr()) {
return;
}
auto tmp_pair = tmp_res.unwrap();
- ghc::filesystem::remove(tmp_pair.first);
+ this->ul_path = tmp_pair.first;
this->ul_fd = std::move(tmp_pair.second);
curl_easy_setopt(this->cr_handle, CURLOPT_URL, this->cr_name.c_str());
@@ -60,9 +63,7 @@ public:
curl_easy_setopt(this->cr_handle, CURLOPT_BUFFERSIZE, 128L * 1024L);
}
- int get_fd() const { return this->ul_fd.get(); }
-
- auto_fd copy_fd() const { return this->ul_fd.dup(); }
+ ghc::filesystem::path get_path() const { return this->ul_path; }
long complete(CURLcode result)
{
@@ -93,7 +94,8 @@ public:
time(&current_time);
if (file_time == -1
- || (current_time - file_time) < FOLLOW_IF_MODIFIED_SINCE) {
+ || (current_time - file_time) < FOLLOW_IF_MODIFIED_SINCE)
+ {
char range[64];
struct stat st;
off_t start;
@@ -142,6 +144,7 @@ private:
return retval;
}
+ ghc::filesystem::path ul_path;
auto_fd ul_fd;
off_t ul_resume_offset{0};
};
diff --git a/src/view_curses.cc b/src/view_curses.cc
index 7f8f079..352ee42 100644
--- a/src/view_curses.cc
+++ b/src/view_curses.cc
@@ -39,12 +39,15 @@
#include "base/ansi_scrubber.hh"
#include "base/attr_line.hh"
+#include "base/from_trait.hh"
+#include "base/injector.hh"
#include "base/itertools.hh"
#include "base/lnav_log.hh"
#include "config.h"
#include "lnav_config.hh"
#include "shlex.hh"
#include "view_curses.hh"
+#include "xterm_mouse.hh"
#if defined HAVE_NCURSESW_CURSES_H
# include <ncursesw/term.h>
@@ -123,11 +126,96 @@ struct utf_to_display_adjustment {
int uda_offset;
utf_to_display_adjustment(int utf_origin, int offset)
- : uda_origin(utf_origin), uda_offset(offset){
-
- };
+ : uda_origin(utf_origin), uda_offset(offset)
+ {
+ }
};
+bool
+mouse_event::is_click_in(mouse_button_t button, int x_start, int x_end) const
+{
+ return this->me_button == button
+ && this->me_state == mouse_button_state_t::BUTTON_STATE_RELEASED
+ && (x_start <= this->me_x && this->me_x <= x_end)
+ && (x_start <= this->me_press_x && this->me_press_x <= x_end)
+ && this->me_y == this->me_press_y;
+}
+
+bool
+mouse_event::is_press_in(mouse_button_t button, line_range lr) const
+{
+ return this->me_button == button
+ && this->me_state == mouse_button_state_t::BUTTON_STATE_PRESSED
+ && lr.contains(this->me_x);
+}
+
+bool
+mouse_event::is_drag_in(mouse_button_t button, line_range lr) const
+{
+ return this->me_button == button
+ && this->me_state == mouse_button_state_t::BUTTON_STATE_DRAGGED
+ && lr.contains(this->me_press_x) && lr.contains(this->me_x);
+}
+
+bool
+mouse_event::is_double_click_in(mouse_button_t button, line_range lr) const
+{
+ return this->me_button == button
+ && this->me_state == mouse_button_state_t::BUTTON_STATE_DOUBLE_CLICK
+ && lr.contains(this->me_x) && this->me_y == this->me_press_y;
+}
+
+bool
+view_curses::handle_mouse(mouse_event& me)
+{
+ if (me.me_state != mouse_button_state_t::BUTTON_STATE_DRAGGED) {
+ this->vc_last_drag_child = nullptr;
+ }
+
+ for (auto* child : this->vc_children) {
+ auto x = this->vc_x + me.me_x;
+ auto y = this->vc_y + me.me_y;
+ if ((me.me_state == mouse_button_state_t::BUTTON_STATE_DRAGGED
+ && child == this->vc_last_drag_child && child->vc_x <= x
+ && x < (child->vc_x + child->vc_width))
+ || child->contains(x, y))
+ {
+ auto sub_me = me;
+
+ sub_me.me_x = x - child->vc_x;
+ sub_me.me_y = y - child->vc_y;
+ sub_me.me_press_x = this->vc_x + me.me_press_x - child->vc_x;
+ sub_me.me_press_y = this->vc_y + me.me_press_y - child->vc_y;
+ if (me.me_state == mouse_button_state_t::BUTTON_STATE_DRAGGED) {
+ this->vc_last_drag_child = child;
+ }
+ return child->handle_mouse(sub_me);
+ }
+ }
+ return false;
+}
+
+bool
+view_curses::contains(int x, int y) const
+{
+ if (!this->vc_visible) {
+ return false;
+ }
+
+ for (auto* child : this->vc_children) {
+ if (child->contains(x, y)) {
+ return true;
+ }
+ }
+ if (this->vc_x <= x
+ && (this->vc_width < 0 || x < this->vc_x + this->vc_width)
+ && this->vc_y == y)
+ {
+ return true;
+ }
+ return false;
+}
+
void
view_curses::awaiting_user_input()
{
@@ -139,32 +227,28 @@ view_curses::awaiting_user_input()
}
}
-size_t
+view_curses::mvwattrline_result
view_curses::mvwattrline(WINDOW* window,
int y,
- int x,
+ const int x,
attr_line_t& al,
const struct line_range& lr_chars,
role_t base_role)
{
auto& sa = al.get_attrs();
- auto& line = al.get_string();
+ const auto& line = al.get_string();
std::vector<utf_to_display_adjustment> utf_adjustments;
std::string full_line;
require(lr_chars.lr_end >= 0);
+ mvwattrline_result retval;
auto line_width_chars = lr_chars.length();
std::string expanded_line;
-
- short* fg_color = (short*) alloca(line_width_chars * sizeof(short));
- bool has_fg = false;
- short* bg_color = (short*) alloca(line_width_chars * sizeof(short));
- bool has_bg = false;
line_range lr_bytes;
int char_index = 0;
- for (size_t lpc = 0; lpc < line.size(); lpc++) {
+ for (size_t lpc = 0; lpc < line.size();) {
int exp_start_index = expanded_line.size();
auto ch = static_cast<unsigned char>(line[lpc]);
@@ -172,6 +256,7 @@ view_curses::mvwattrline(WINDOW* window,
lr_bytes.lr_start = exp_start_index;
} else if (char_index == lr_chars.lr_end) {
lr_bytes.lr_end = exp_start_index;
+ retval.mr_chars_out = char_index;
}
switch (ch) {
@@ -179,47 +264,77 @@ view_curses::mvwattrline(WINDOW* window,
do {
expanded_line.push_back(' ');
char_index += 1;
+ if (char_index == lr_chars.lr_start) {
+ lr_bytes.lr_start = expanded_line.size();
+ }
+ if (char_index == lr_chars.lr_end) {
+ lr_bytes.lr_end = expanded_line.size();
+ retval.mr_chars_out = char_index;
+ }
} while (expanded_line.size() % 8);
utf_adjustments.emplace_back(
lpc, expanded_line.size() - exp_start_index - 1);
+ lpc += 1;
break;
}
+ case '\x1b':
+ expanded_line.append("\u238b");
+ utf_adjustments.emplace_back(lpc, -1);
+ char_index += 1;
+ lpc += 1;
+ break;
+
+ case '\b':
+ expanded_line.append("\u232b");
+ utf_adjustments.emplace_back(lpc, -1);
+ char_index += 1;
+ lpc += 1;
+ break;
+
+ case '\x07':
+ expanded_line.append("\U0001F514");
+ utf_adjustments.emplace_back(lpc, -1);
+ char_index += 1;
+ lpc += 1;
+ break;
+
case '\r':
case '\n':
expanded_line.push_back(' ');
char_index += 1;
+ lpc += 1;
break;
default: {
- auto size_result = ww898::utf::utf8::char_size([&line, lpc]() {
- return std::make_pair(line[lpc], line.length() - lpc - 1);
- });
-
- if (size_result.isErr()) {
+ auto exp_read_start = expanded_line.size();
+ auto lpc_start = lpc;
+ auto read_res
+ = ww898::utf::utf8::read([&line, &expanded_line, &lpc]() {
+ auto ch = line[lpc++];
+ expanded_line.push_back(ch);
+ return ch;
+ });
+
+ if (read_res.isErr()) {
+ log_trace(
+ "error:%d:%d:%s", y, x + lpc, read_res.unwrapErr());
+ expanded_line.resize(exp_read_start);
expanded_line.push_back('?');
+ char_index += 1;
+ lpc = lpc_start + 1;
} else {
- auto offset = 1 - (int) size_result.unwrap();
-
- expanded_line.push_back(ch);
- if (offset) {
-#if 0
- if (char_index < lr_chars.lr_start) {
- lr_bytes.lr_start += abs(offset);
- }
- if (char_index < lr_chars.lr_end) {
- lr_bytes.lr_end += abs(offset);
- }
-#endif
- utf_adjustments.emplace_back(lpc, offset);
- for (; offset && (lpc + 1) < line.size();
- lpc++, offset++)
- {
- expanded_line.push_back(line[lpc + 1]);
- }
+ if (lpc > (lpc_start + 1)) {
+ utf_adjustments.emplace_back(lpc_start,
+ 1 - (lpc - lpc_start));
+ }
+ auto wch = read_res.unwrap();
+ char_index += wcwidth(wch);
+ if (lr_bytes.lr_end == -1 && char_index > lr_chars.lr_end) {
+ lr_bytes.lr_end = exp_start_index;
+ retval.mr_chars_out = char_index - wcwidth(wch);
}
}
- char_index += 1;
break;
}
}
@@ -230,18 +345,22 @@ view_curses::mvwattrline(WINDOW* window,
if (lr_bytes.lr_end == -1) {
lr_bytes.lr_end = expanded_line.size();
}
- size_t retval = expanded_line.size() - lr_bytes.lr_end;
+ if (retval.mr_chars_out == 0) {
+ retval.mr_chars_out = char_index;
+ }
+ retval.mr_bytes_remaining = expanded_line.size() - lr_bytes.lr_end;
full_line = expanded_line;
auto& vc = view_colors::singleton();
auto text_role_attrs = vc.attrs_for_role(role_t::VCR_TEXT);
- auto attrs = vc.attrs_for_role(base_role);
+ auto base_attrs = vc.attrs_for_role(base_role);
wmove(window, y, x);
- wattr_set(window,
- attrs.ta_attrs,
- vc.ensure_color_pair(attrs.ta_fg_color, attrs.ta_bg_color),
- nullptr);
+ wattr_set(
+ window,
+ base_attrs.ta_attrs,
+ vc.ensure_color_pair(base_attrs.ta_fg_color, base_attrs.ta_bg_color),
+ nullptr);
if (lr_bytes.lr_start < (int) full_line.size()) {
waddnstr(
window, &full_line.c_str()[lr_bytes.lr_start], lr_bytes.length());
@@ -250,8 +369,15 @@ view_curses::mvwattrline(WINDOW* window,
whline(window, ' ', lr_chars.lr_end - char_index);
}
+ cchar_t row_ch[line_width_chars + 1];
+ short fg_color[line_width_chars + 1];
+ short bg_color[line_width_chars + 1];
+ memset(fg_color, -1, sizeof(fg_color));
+ memset(bg_color, -1, sizeof(bg_color));
+
+ mvwin_wchnstr(window, y, x, row_ch, line_width_chars);
std::stable_sort(sa.begin(), sa.end());
- for (auto iter = sa.begin(); iter != sa.end(); ++iter) {
+ for (auto iter = sa.cbegin(); iter != sa.cend(); ++iter) {
auto attr_range = iter->sa_range;
require(attr_range.lr_start >= 0);
@@ -260,7 +386,8 @@ view_curses::mvwattrline(WINDOW* window,
if (!(iter->sa_type == &VC_ROLE || iter->sa_type == &VC_ROLE_FG
|| iter->sa_type == &VC_STYLE || iter->sa_type == &VC_GRAPHIC
|| iter->sa_type == &SA_LEVEL || iter->sa_type == &VC_FOREGROUND
- || iter->sa_type == &VC_BACKGROUND))
+ || iter->sa_type == &VC_BACKGROUND
+ || iter->sa_type == &VC_BLOCK_ELEM))
{
continue;
}
@@ -299,9 +426,6 @@ view_curses::mvwattrline(WINDOW* window,
= std::min(line_width_chars, attr_range.lr_end - lr_chars.lr_start);
if (iter->sa_type == &VC_FOREGROUND) {
- if (!has_fg) {
- memset(fg_color, -1, line_width_chars * sizeof(short));
- }
short attr_fg = iter->sa_value.get<int64_t>();
if (attr_fg == view_colors::MATCH_COLOR_SEMANTIC) {
attr_fg = vc.color_for_ident(al.to_string_fragment(iter))
@@ -312,14 +436,10 @@ view_curses::mvwattrline(WINDOW* window,
std::fill(&fg_color[attr_range.lr_start],
&fg_color[attr_range.lr_end],
attr_fg);
- has_fg = true;
continue;
}
if (iter->sa_type == &VC_BACKGROUND) {
- if (!has_bg) {
- memset(bg_color, -1, line_width_chars * sizeof(short));
- }
short attr_bg = iter->sa_value.get<int64_t>();
if (attr_bg == view_colors::MATCH_COLOR_SEMANTIC) {
attr_bg = vc.color_for_ident(al.to_string_fragment(iter))
@@ -328,17 +448,21 @@ view_curses::mvwattrline(WINDOW* window,
std::fill(bg_color + attr_range.lr_start,
bg_color + attr_range.lr_end,
attr_bg);
- has_bg = true;
continue;
}
if (attr_range.lr_start < attr_range.lr_end) {
- int awidth = attr_range.length();
+ auto attrs = text_attrs{};
nonstd::optional<char> graphic;
+ nonstd::optional<wchar_t> block_elem;
if (iter->sa_type == &VC_GRAPHIC) {
graphic = iter->sa_value.get<int64_t>();
attrs = text_attrs{};
+ } else if (iter->sa_type == &VC_BLOCK_ELEM) {
+ auto be = iter->sa_value.get<block_elem_t>();
+ block_elem = be.value;
+ attrs = vc.attrs_for_role(be.role);
} else if (iter->sa_type == &VC_STYLE) {
attrs = iter->sa_value.get<text_attrs>();
} else if (iter->sa_type == &SA_LEVEL) {
@@ -347,18 +471,19 @@ view_curses::mvwattrline(WINDOW* window,
} else if (iter->sa_type == &VC_ROLE) {
auto role = iter->sa_value.get<role_t>();
attrs = vc.attrs_for_role(role);
+
+ if (role == role_t::VCR_SELECTED_TEXT) {
+ retval.mr_selected_text
+ = string_fragment::from_str(line).sub_range(
+ iter->sa_range.lr_start, iter->sa_range.lr_end);
+ }
} else if (iter->sa_type == &VC_ROLE_FG) {
auto role_attrs
= vc.attrs_for_role(iter->sa_value.get<role_t>());
attrs.ta_fg_color = role_attrs.ta_fg_color;
}
- if (graphic || !attrs.empty()) {
- int x_pos = x + attr_range.lr_start;
- int ch_width = std::min(
- awidth, (line_width_chars - attr_range.lr_start));
- cchar_t row_ch[ch_width + 1];
-
+ if (graphic || block_elem || !attrs.empty()) {
if (attrs.ta_attrs & (A_LEFT | A_RIGHT)) {
if (attrs.ta_attrs & A_LEFT) {
attrs.ta_fg_color
@@ -372,32 +497,29 @@ view_curses::mvwattrline(WINDOW* window,
}
if (attrs.ta_fg_color) {
- if (!has_fg) {
- memset(fg_color, -1, line_width_chars * sizeof(short));
- }
std::fill(&fg_color[attr_range.lr_start],
&fg_color[attr_range.lr_end],
attrs.ta_fg_color.value());
- has_fg = true;
}
if (attrs.ta_bg_color) {
- if (!has_bg) {
- memset(bg_color, -1, line_width_chars * sizeof(short));
- }
std::fill(&bg_color[attr_range.lr_start],
&bg_color[attr_range.lr_end],
attrs.ta_bg_color.value());
- has_bg = true;
}
- mvwin_wchnstr(window, y, x_pos, row_ch, ch_width);
- for (int lpc = 0; lpc < ch_width; lpc++) {
+ for (int lpc = attr_range.lr_start;
+ lpc < attr_range.lr_end && lpc < line_width_chars;
+ lpc++)
+ {
bool clear_rev = false;
if (graphic) {
row_ch[lpc].chars[0] = graphic.value();
row_ch[lpc].attr |= A_ALTCHARSET;
}
+ if (block_elem) {
+ row_ch[lpc].chars[0] = block_elem.value();
+ }
if (row_ch[lpc].attr & A_REVERSE
&& attrs.ta_attrs & A_REVERSE)
{
@@ -408,52 +530,93 @@ view_curses::mvwattrline(WINDOW* window,
row_ch[lpc].attr &= ~A_REVERSE;
}
}
- mvwadd_wchnstr(window, y, x_pos, row_ch, ch_width);
}
}
}
- if (has_fg || has_bg) {
- if (!has_fg) {
- memset(fg_color, -1, line_width_chars * sizeof(short));
- }
- if (!has_bg) {
- memset(bg_color, -1, line_width_chars * sizeof(short));
+ for (int lpc = 0; lpc < line_width_chars; lpc++) {
+ if (fg_color[lpc] == -1 && bg_color[lpc] == -1) {
+ continue;
}
-
- int ch_width = lr_chars.length();
- cchar_t row_ch[ch_width + 1];
-
- mvwin_wchnstr(window, y, x, row_ch, ch_width);
- for (int lpc = 0; lpc < ch_width; lpc++) {
- if (fg_color[lpc] == -1 && bg_color[lpc] == -1) {
- continue;
- }
#ifdef NCURSES_EXT_COLORS
- auto cur_pair = row_ch[lpc].ext_color;
+ auto cur_pair = row_ch[lpc].ext_color;
#else
- auto cur_pair = PAIR_NUMBER(row_ch[lpc].attr);
+ auto cur_pair = PAIR_NUMBER(row_ch[lpc].attr);
#endif
- short cur_fg, cur_bg;
- pair_content(cur_pair, &cur_fg, &cur_bg);
- if (fg_color[lpc] == -1) {
- fg_color[lpc] = cur_fg;
+ short cur_fg, cur_bg;
+ pair_content(cur_pair, &cur_fg, &cur_bg);
+
+ auto desired_fg = fg_color[lpc] != -1 ? fg_color[lpc] : cur_fg;
+ auto desired_bg = bg_color[lpc] != -1 ? bg_color[lpc] : cur_bg;
+ if (desired_fg >= COLOR_BLACK && desired_fg <= COLOR_WHITE) {
+ desired_fg = vc.ansi_to_theme_color(desired_fg);
+ }
+ if (desired_bg >= COLOR_BLACK && desired_bg <= COLOR_WHITE) {
+ desired_bg = vc.ansi_to_theme_color(desired_bg);
+ }
+ if (desired_fg == desired_bg) {
+ if (desired_bg >= 0
+ && desired_bg
+ < view_colors::vc_active_palette->tc_palette.size())
+ {
+ auto adjusted_color
+ = view_colors::vc_active_palette->tc_palette[desired_bg]
+ .xc_lab_color;
+ if (adjusted_color.lc_l < 50.0) {
+ adjusted_color.lc_l += 50.0;
+ } else {
+ adjusted_color.lc_l -= 50.0;
+ }
+ bg_color[lpc] = view_colors::vc_active_palette->match_color(
+ adjusted_color);
}
- if (bg_color[lpc] == -1) {
- bg_color[lpc] = cur_bg;
+ } else if (fg_color[lpc] >= 0
+ && fg_color[lpc]
+ < view_colors::vc_active_palette->tc_palette.size()
+ && bg_color[lpc] == -1
+ && base_attrs.ta_bg_color.value_or(0) >= 0
+ && base_attrs.ta_bg_color.value_or(0)
+ < view_colors::vc_active_palette->tc_palette.size())
+ {
+ const auto& fg_color_info
+ = view_colors::vc_active_palette->tc_palette.at(fg_color[lpc]);
+ const auto& bg_color_info
+ = view_colors::vc_active_palette->tc_palette.at(
+ base_attrs.ta_bg_color.value_or(0));
+
+ if (!fg_color_info.xc_lab_color.sufficient_contrast(
+ bg_color_info.xc_lab_color))
+ {
+ auto adjusted_color = bg_color_info.xc_lab_color;
+ adjusted_color.lc_l = std::max(0.0, adjusted_color.lc_l - 40.0);
+ auto new_bg = view_colors::vc_active_palette->match_color(
+ adjusted_color);
+ for (int lpc2 = lpc; lpc2 < line_width_chars; lpc2++) {
+ if (fg_color[lpc2] == fg_color[lpc] && bg_color[lpc2] == -1)
+ {
+ bg_color[lpc2] = new_bg;
+ }
+ }
}
+ }
+
+ if (fg_color[lpc] == -1) {
+ fg_color[lpc] = cur_fg;
+ }
+ if (bg_color[lpc] == -1) {
+ bg_color[lpc] = cur_bg;
+ }
- int color_pair = vc.ensure_color_pair(fg_color[lpc], bg_color[lpc]);
+ int color_pair = vc.ensure_color_pair(fg_color[lpc], bg_color[lpc]);
- row_ch[lpc].attr = row_ch[lpc].attr & ~A_COLOR;
+ row_ch[lpc].attr = row_ch[lpc].attr & ~A_COLOR;
#ifdef NCURSES_EXT_COLORS
- row_ch[lpc].ext_color = color_pair;
+ row_ch[lpc].ext_color = color_pair;
#else
- row_ch[lpc].attr |= COLOR_PAIR(color_pair);
+ row_ch[lpc].attr |= COLOR_PAIR(color_pair);
#endif
- }
- mvwadd_wchnstr(window, y, x, row_ch, ch_width);
}
+ mvwadd_wchnstr(window, y, x, row_ch, line_width_chars);
return retval;
}
@@ -485,7 +648,7 @@ view_colors::view_colors() : vc_dyn_pairs(0)
bool view_colors::initialized = false;
-static std::string COLOR_NAMES[] = {
+static const std::string COLOR_NAMES[] = {
"black",
"red",
"green",
@@ -496,12 +659,14 @@ static std::string COLOR_NAMES[] = {
"white",
};
-class color_listener : public lnav_config_listener {
+class ui_listener : public lnav_config_listener {
public:
+ ui_listener() : lnav_config_listener(__FILE__) {}
+
void reload_config(error_reporter& reporter) override
{
if (!view_colors::initialized) {
- return;
+ view_colors::vc_active_palette = ansi_colors();
}
auto& vc = view_colors::singleton();
@@ -529,11 +694,16 @@ public:
if (view_colors::initialized) {
vc.init_roles(iter->second, reporter);
+
+ auto& mouse_i = injector::get<xterm_mouse&>();
+ mouse_i.set_enabled(check_experimental("mouse")
+ || lnav_config.lc_mouse_mode
+ == lnav_mouse_mode::enabled);
}
}
};
-static color_listener _COLOR_LISTENER;
+static ui_listener _UI_LISTENER;
term_color_palette* view_colors::vc_active_palette;
void
@@ -556,11 +726,10 @@ view_colors::init(bool headless)
initialized = true;
{
- auto reporter = [](const void*, const lnav::console::user_message&) {
+ auto reporter
+ = [](const void*, const lnav::console::user_message& um) {};
- };
-
- _COLOR_LISTENER.reload_config(reporter);
+ _UI_LISTENER.reload_config(reporter);
}
}
@@ -608,7 +777,12 @@ view_colors::to_attrs(const lnav_theme& lt,
std::string fg1, bg1, fg_color, bg_color;
intern_string_t role_class;
- if (!pp_sc.pp_path.empty()) {
+ if (pp_sc.pp_path.empty()) {
+#if 0
+ // too slow to do this now
+ reporter(&sc.sc_color, lnav::console::user_message::warning(""));
+#endif
+ } else {
auto role_class_path
= ghc::filesystem::path(pp_sc.pp_path.to_string()).parent_path();
auto inner = role_class_path.filename().string();
@@ -620,8 +794,12 @@ view_colors::to_attrs(const lnav_theme& lt,
fg1 = sc.sc_color;
bg1 = sc.sc_background_color;
- shlex(fg1).eval(fg_color, lt.lt_vars);
- shlex(bg1).eval(bg_color, lt.lt_vars);
+ std::map<std::string, scoped_value_t> vars;
+ for (const auto& vpair : lt.lt_vars) {
+ vars[vpair.first] = vpair.second;
+ }
+ shlex(fg1).eval(fg_color, scoped_resolver{&vars});
+ shlex(bg1).eval(bg_color, scoped_resolver{&vars});
auto fg = styling::color_unit::from_str(fg_color).unwrapOrElse(
[&](const auto& msg) {
@@ -680,24 +858,26 @@ view_colors::init_roles(const lnav_theme& lt,
auto fg_str = fg_iter == lt.lt_vars.end() ? "" : fg_iter->second;
auto bg_str = bg_iter == lt.lt_vars.end() ? "" : bg_iter->second;
- auto rgb_fg = rgb_color::from_str(fg_str).unwrapOrElse(
- [&](const auto& msg) {
- reporter(&fg_str,
- lnav::console::user_message::error(
- attr_line_t("invalid color -- ")
- .append_quoted(fg_str))
- .with_reason(msg));
- return rgb_color{};
- });
- auto rgb_bg = rgb_color::from_str(bg_str).unwrapOrElse(
- [&](const auto& msg) {
- reporter(&bg_str,
- lnav::console::user_message::error(
- attr_line_t("invalid background color -- ")
- .append_quoted(bg_str))
- .with_reason(msg));
- return rgb_color{};
- });
+ auto rgb_fg = from<rgb_color>(string_fragment::from_str(fg_str))
+ .unwrapOrElse([&](const auto& msg) {
+ reporter(&fg_str,
+ lnav::console::user_message::error(
+ attr_line_t("invalid color -- ")
+ .append_quoted(fg_str))
+ .with_reason(msg));
+ return rgb_color{};
+ });
+ auto rgb_bg
+ = from<rgb_color>(string_fragment::from_str(bg_str))
+ .unwrapOrElse([&](const auto& msg) {
+ reporter(
+ &bg_str,
+ lnav::console::user_message::error(
+ attr_line_t("invalid background color -- ")
+ .append_quoted(bg_str))
+ .with_reason(msg));
+ return rgb_color{};
+ });
short fg = vc_active_palette->match_color(lab_color(rgb_fg));
short bg = vc_active_palette->match_color(lab_color(rgb_bg));
@@ -748,12 +928,17 @@ view_colors::init_roles(const lnav_theme& lt,
= this->to_attrs(lt, lt.lt_style_hidden, reporter);
this->vc_role_attrs[lnav::enums::to_underlying(role_t::VCR_CURSOR_LINE)]
= this->to_attrs(lt, lt.lt_style_cursor_line, reporter);
+ this->vc_role_attrs[lnav::enums::to_underlying(
+ role_t::VCR_DISABLED_CURSOR_LINE)]
+ = this->to_attrs(lt, lt.lt_style_disabled_cursor_line, reporter);
this->vc_role_attrs[lnav::enums::to_underlying(role_t::VCR_ADJUSTED_TIME)]
= this->to_attrs(lt, lt.lt_style_adjusted_time, reporter);
this->vc_role_attrs[lnav::enums::to_underlying(role_t::VCR_SKEWED_TIME)]
= this->to_attrs(lt, lt.lt_style_skewed_time, reporter);
this->vc_role_attrs[lnav::enums::to_underlying(role_t::VCR_OFFSET_TIME)]
= this->to_attrs(lt, lt.lt_style_offset_time, reporter);
+ this->vc_role_attrs[lnav::enums::to_underlying(role_t::VCR_FILE_OFFSET)]
+ = this->to_attrs(lt, lt.lt_style_file_offset, reporter);
this->vc_role_attrs[lnav::enums::to_underlying(role_t::VCR_INVALID_MSG)]
= this->to_attrs(lt, lt.lt_style_invalid_msg, reporter);
@@ -830,6 +1015,8 @@ view_colors::init_roles(const lnav_theme& lt,
= this->to_attrs(lt, lt.lt_style_footnote_text, reporter);
this->vc_role_attrs[lnav::enums::to_underlying(role_t::VCR_SNIPPET_BORDER)]
= this->to_attrs(lt, lt.lt_style_snippet_border, reporter);
+ this->vc_role_attrs[lnav::enums::to_underlying(role_t::VCR_INDENT_GUIDE)]
+ = this->to_attrs(lt, lt.lt_style_indent_guide, reporter);
{
positioned_property<style_config> stitch_sc;
@@ -936,6 +1123,8 @@ view_colors::init_roles(const lnav_theme& lt,
= this->to_attrs(lt, bar_sc, reporter);
}
+ this->vc_role_attrs[lnav::enums::to_underlying(role_t::VCR_INLINE_CODE)]
+ = this->to_attrs(lt, lt.lt_style_inline_code, reporter);
this->vc_role_attrs[lnav::enums::to_underlying(role_t::VCR_QUOTED_CODE)]
= this->to_attrs(lt, lt.lt_style_quoted_code, reporter);
this->vc_role_attrs[lnav::enums::to_underlying(role_t::VCR_CODE_BORDER)]
@@ -952,8 +1141,24 @@ view_colors::init_roles(const lnav_theme& lt,
= this->to_attrs(lt, lt.lt_style_variable, reporter);
this->vc_role_attrs[lnav::enums::to_underlying(role_t::VCR_SYMBOL)]
= this->to_attrs(lt, lt.lt_style_symbol, reporter);
+ this->vc_role_attrs[lnav::enums::to_underlying(role_t::VCR_NULL)]
+ = this->to_attrs(lt, lt.lt_style_null, reporter);
+ this->vc_role_attrs[lnav::enums::to_underlying(role_t::VCR_ASCII_CTRL)]
+ = this->to_attrs(lt, lt.lt_style_ascii_ctrl, reporter);
+ this->vc_role_attrs[lnav::enums::to_underlying(role_t::VCR_NON_ASCII)]
+ = this->to_attrs(lt, lt.lt_style_non_ascii, reporter);
this->vc_role_attrs[lnav::enums::to_underlying(role_t::VCR_NUMBER)]
= this->to_attrs(lt, lt.lt_style_number, reporter);
+ this->vc_role_attrs[lnav::enums::to_underlying(role_t::VCR_FUNCTION)]
+ = this->to_attrs(lt, lt.lt_style_function, reporter);
+ this->vc_role_attrs[lnav::enums::to_underlying(role_t::VCR_TYPE)]
+ = this->to_attrs(lt, lt.lt_style_type, reporter);
+ this->vc_role_attrs[lnav::enums::to_underlying(role_t::VCR_SEP_REF_ACC)]
+ = this->to_attrs(lt, lt.lt_style_sep_ref_acc, reporter);
+ this->vc_role_attrs[lnav::enums::to_underlying(role_t::VCR_SUGGESTION)]
+ = this->to_attrs(lt, lt.lt_style_suggestion, reporter);
+ this->vc_role_attrs[lnav::enums::to_underlying(role_t::VCR_SELECTED_TEXT)]
+ = this->to_attrs(lt, lt.lt_style_selected_text, reporter);
this->vc_role_attrs[lnav::enums::to_underlying(role_t::VCR_RE_SPECIAL)]
= this->to_attrs(lt, lt.lt_style_re_special, reporter);
@@ -1097,21 +1302,17 @@ view_colors::color_for_ident(const char* str, size_t len) const
auto index = crc32(1, (const Bytef*) str, len);
int retval;
- if (COLORS >= 256) {
- if (str[0] == '#' && (len == 4 || len == 7)) {
- auto fg_res
- = styling::color_unit::from_str(string_fragment(str, 0, len));
- if (fg_res.isOk()) {
- return this->match_color(fg_res.unwrap());
- }
+ if (str[0] == '#' && (len == 4 || len == 7)) {
+ auto fg_res
+ = styling::color_unit::from_str(string_fragment(str, 0, len));
+ if (fg_res.isOk()) {
+ return this->match_color(fg_res.unwrap());
}
-
- auto offset = index % HI_COLOR_COUNT;
- retval = this->vc_highlight_colors[offset];
- } else {
- retval = -1;
}
+ auto offset = index % HI_COLOR_COUNT;
+ retval = this->vc_highlight_colors[offset];
+
return retval;
}
@@ -1133,93 +1334,6 @@ view_colors::attrs_for_ident(const char* str, size_t len) const
return retval;
}
-lab_color::lab_color(const rgb_color& rgb)
-{
- double r = rgb.rc_r / 255.0, g = rgb.rc_g / 255.0, b = rgb.rc_b / 255.0, x,
- y, z;
-
- r = (r > 0.04045) ? pow((r + 0.055) / 1.055, 2.4) : r / 12.92;
- g = (g > 0.04045) ? pow((g + 0.055) / 1.055, 2.4) : g / 12.92;
- b = (b > 0.04045) ? pow((b + 0.055) / 1.055, 2.4) : b / 12.92;
-
- x = (r * 0.4124 + g * 0.3576 + b * 0.1805) / 0.95047;
- y = (r * 0.2126 + g * 0.7152 + b * 0.0722) / 1.00000;
- z = (r * 0.0193 + g * 0.1192 + b * 0.9505) / 1.08883;
-
- x = (x > 0.008856) ? pow(x, 1.0 / 3.0) : (7.787 * x) + 16.0 / 116.0;
- y = (y > 0.008856) ? pow(y, 1.0 / 3.0) : (7.787 * y) + 16.0 / 116.0;
- z = (z > 0.008856) ? pow(z, 1.0 / 3.0) : (7.787 * z) + 16.0 / 116.0;
-
- this->lc_l = (116.0 * y) - 16;
- this->lc_a = 500.0 * (x - y);
- this->lc_b = 200.0 * (y - z);
-}
-
-double
-lab_color::deltaE(const lab_color& other) const
-{
- double deltaL = this->lc_l - other.lc_l;
- double deltaA = this->lc_a - other.lc_a;
- double deltaB = this->lc_b - other.lc_b;
- double c1 = sqrt(this->lc_a * this->lc_a + this->lc_b * this->lc_b);
- double c2 = sqrt(other.lc_a * other.lc_a + other.lc_b * other.lc_b);
- double deltaC = c1 - c2;
- double deltaH = deltaA * deltaA + deltaB * deltaB - deltaC * deltaC;
- deltaH = deltaH < 0.0 ? 0.0 : sqrt(deltaH);
- double sc = 1.0 + 0.045 * c1;
- double sh = 1.0 + 0.015 * c1;
- double deltaLKlsl = deltaL / (1.0);
- double deltaCkcsc = deltaC / (sc);
- double deltaHkhsh = deltaH / (sh);
- double i = deltaLKlsl * deltaLKlsl + deltaCkcsc * deltaCkcsc
- + deltaHkhsh * deltaHkhsh;
- return i < 0.0 ? 0.0 : sqrt(i);
-}
-
-bool
-lab_color::operator<(const lab_color& rhs) const
-{
- if (lc_l < rhs.lc_l)
- return true;
- if (rhs.lc_l < lc_l)
- return false;
- if (lc_a < rhs.lc_a)
- return true;
- if (rhs.lc_a < lc_a)
- return false;
- return lc_b < rhs.lc_b;
-}
-
-bool
-lab_color::operator>(const lab_color& rhs) const
-{
- return rhs < *this;
-}
-
-bool
-lab_color::operator<=(const lab_color& rhs) const
-{
- return !(rhs < *this);
-}
-
-bool
-lab_color::operator>=(const lab_color& rhs) const
-{
- return !(*this < rhs);
-}
-
-bool
-lab_color::operator==(const lab_color& rhs) const
-{
- return lc_l == rhs.lc_l && lc_a == rhs.lc_a && lc_b == rhs.lc_b;
-}
-
-bool
-lab_color::operator!=(const lab_color& rhs) const
-{
- return !(rhs == *this);
-}
-
Result<screen_curses, std::string>
screen_curses::create()
{
diff --git a/src/view_curses.hh b/src/view_curses.hh
index afa0be3..eb2fb15 100644
--- a/src/view_curses.hh
+++ b/src/view_curses.hh
@@ -61,6 +61,7 @@
#include "base/attr_line.hh"
#include "base/enum_util.hh"
+#include "base/keycodes.hh"
#include "base/lnav_log.hh"
#include "base/lrucache.hpp"
#include "base/opt_util.hh"
@@ -69,14 +70,6 @@
#include "optional.hpp"
#include "styling.hh"
-#define KEY_CTRL_A 0x01
-#define KEY_CTRL_E 0x05
-#define KEY_CTRL_G 7
-#define KEY_CTRL_L 12
-#define KEY_CTRL_P 16
-#define KEY_CTRL_R 18
-#define KEY_CTRL_W 23
-
class view_curses;
/**
@@ -278,10 +271,9 @@ public:
std::unordered_map<std::string, string_attr_pair> vc_class_to_role;
static bool initialized;
-
-private:
static term_color_palette* vc_active_palette;
+private:
/** Private constructor that initializes the member fields. */
view_colors();
@@ -322,23 +314,52 @@ enum class mouse_button_state_t {
BUTTON_STATE_PRESSED,
BUTTON_STATE_DRAGGED,
BUTTON_STATE_RELEASED,
+ BUTTON_STATE_DOUBLE_CLICK,
};
struct mouse_event {
mouse_event(mouse_button_t button = mouse_button_t::BUTTON_LEFT,
mouse_button_state_t state
= mouse_button_state_t::BUTTON_STATE_PRESSED,
+ uint8_t mods = 0,
int x = -1,
int y = -1)
- : me_button(button), me_state(state), me_x(x), me_y(y)
+ : me_button(button), me_state(state), me_modifiers(mods), me_x(x),
+ me_y(y)
+ {
+ }
+
+ enum class modifier_t : uint8_t {
+ shift = 4,
+ meta = 8,
+ ctrl = 16,
+ };
+
+ bool is_modifier_pressed(modifier_t mod) const
+ {
+ return this->me_modifiers & lnav::enums::to_underlying(mod);
+ }
+
+ bool is_click_in(mouse_button_t button, int x_start, int x_end) const;
+
+ bool is_click_in(mouse_button_t button, line_range lr) const
{
+ return this->is_click_in(button, lr.lr_start, lr.lr_end);
}
+ bool is_press_in(mouse_button_t button, line_range lr) const;
+
+ bool is_drag_in(mouse_button_t button, line_range lr) const;
+ bool is_double_click_in(mouse_button_t button, line_range lr) const;
+
mouse_button_t me_button;
mouse_button_state_t me_state;
+ uint8_t me_modifiers;
struct timeval me_time {};
int me_x;
int me_y;
+ int me_press_x{-1};
+ int me_press_y{-1};
};
/**
@@ -351,20 +372,25 @@ public:
/**
* Update the curses display.
*/
- virtual void do_update()
+ virtual bool do_update()
{
+ bool retval = false;
+
this->vc_needs_update = false;
if (!this->vc_visible) {
- return;
+ return retval;
}
for (auto* child : this->vc_children) {
- child->do_update();
+ retval = child->do_update() || retval;
}
+ return retval;
}
- virtual bool handle_mouse(mouse_event& me) { return false; }
+ virtual bool handle_mouse(mouse_event& me);
+
+ virtual bool contains(int x, int y) const;
void set_needs_update()
{
@@ -389,26 +415,64 @@ public:
bool is_visible() const { return this->vc_visible; }
+ /**
+ * Set the Y position of this view on the display. A value greater than
+ * zero is considered to be an absolute size. A value less than zero makes
+ * the position relative to the bottom of the enclosing window.
+ *
+ * @param y The Y position of the cursor on the curses display.
+ */
+ void set_y(int y)
+ {
+ if (y != this->vc_y) {
+ this->vc_y = y;
+ this->set_needs_update();
+ }
+ }
+
+ int get_y() const { return this->vc_y; }
+
+ void set_x(unsigned int x)
+ {
+ if (x != this->vc_x) {
+ this->vc_x = x;
+ this->set_needs_update();
+ }
+ }
+
+ unsigned int get_x() const { return this->vc_x; }
+
void set_width(long width) { this->vc_width = width; }
long get_width() const { return this->vc_width; }
static void awaiting_user_input();
- static size_t mvwattrline(WINDOW* window,
- int y,
- int x,
- attr_line_t& al,
- const struct line_range& lr,
- role_t base_role = role_t::VCR_TEXT);
+ struct mvwattrline_result {
+ size_t mr_chars_out{0};
+ size_t mr_bytes_remaining{0};
+ string_fragment mr_selected_text;
+ };
+
+ static mvwattrline_result mvwattrline(WINDOW* window,
+ int y,
+ int x,
+ attr_line_t& al,
+ const struct line_range& lr,
+ role_t base_role = role_t::VCR_TEXT);
+
+ bool vc_enabled{true};
protected:
bool vc_visible{true};
/** Flag to indicate if a display update is needed. */
bool vc_needs_update{true};
- long vc_width;
+ unsigned int vc_x{0};
+ int vc_y{0};
+ long vc_width{0};
std::vector<view_curses*> vc_children;
role_t vc_default_role{role_t::VCR_TEXT};
+ view_curses* vc_last_drag_child{nullptr};
};
template<class T>
@@ -424,22 +488,24 @@ public:
return this->vs_views.back();
}
- void do_update() override
+ bool do_update() override
{
if (!this->vc_visible) {
- return;
+ return false;
}
- this->top() | [this](T* vc) {
+ bool retval;
+ this->top() | [this, &retval](T* vc) {
if (this->vc_needs_update) {
vc->set_needs_update();
}
- vc->do_update();
+ retval = vc->do_update();
};
- view_curses::do_update();
+ retval = view_curses::do_update() || retval;
this->vc_needs_update = false;
+ return retval;
}
void push_back(T* view)
diff --git a/src/view_helpers.cc b/src/view_helpers.cc
index 465f9e3..d79f774 100644
--- a/src/view_helpers.cc
+++ b/src/view_helpers.cc
@@ -29,12 +29,13 @@
#include "view_helpers.hh"
-#include "base/humanize.hh"
#include "base/itertools.hh"
+#include "bound_tags.hh"
#include "config.h"
#include "document.sections.hh"
#include "environ_vtab.hh"
#include "filter_sub_source.hh"
+#include "gantt_source.hh"
#include "help-md.h"
#include "intervaltree/IntervalTree.h"
#include "lnav.hh"
@@ -63,6 +64,7 @@ const char* lnav_view_strings[LNV__MAX + 1] = {
"schema",
"pretty",
"spectro",
+ "gantt",
nullptr,
};
@@ -76,6 +78,7 @@ const char* lnav_view_titles[LNV__MAX] = {
"SCHEMA",
"PRETTY",
"SPECTRO",
+ "GANTT",
};
nonstd::optional<lnav_view_t>
@@ -124,8 +127,29 @@ open_schema_view()
schema_tc->redo_search();
}
+static void
+open_gantt_view()
+{
+ auto* gantt_tc = &lnav_data.ld_views[LNV_GANTT];
+ auto* gantt_src = dynamic_cast<gantt_source*>(gantt_tc->get_sub_source());
+
+ gantt_src->rebuild_indexes();
+ gantt_tc->reload_data();
+ gantt_tc->redo_search();
+}
+
class pretty_sub_source : public plain_text_source {
public:
+ void set_indents(std::set<size_t>&& indents)
+ {
+ this->tds_doc_sections.m_indents = std::move(indents);
+ }
+
+ void set_sections_root(std::unique_ptr<lnav::document::hier_node>&& hn)
+ {
+ this->tds_doc_sections.m_sections_root = std::move(hn);
+ }
+
void text_crumbs_for_line(int line,
std::vector<breadcrumb::crumb>& crumbs) override
{
@@ -189,7 +213,7 @@ public:
sib_iter->second->hn_start)
| [](const auto new_top) {
lnav_data.ld_views[LNV_PRETTY]
- .set_top(new_top);
+ .set_selection(new_top);
};
}
},
@@ -201,8 +225,8 @@ public:
= parent_node->hn_children[index].get();
this->line_for_offset(sib->hn_start) |
[](const auto new_top) {
- lnav_data.ld_views[LNV_PRETTY].set_top(
- new_top);
+ lnav_data.ld_views[LNV_PRETTY]
+ .set_selection(new_top);
};
});
};
@@ -253,8 +277,8 @@ public:
if (child_iter != curr_node->hn_named_children.end()) {
this->line_for_offset(child_iter->second->hn_start)
| [](const auto new_top) {
- lnav_data.ld_views[LNV_PRETTY].set_top(
- new_top);
+ lnav_data.ld_views[LNV_PRETTY]
+ .set_selection(new_top);
};
}
},
@@ -262,7 +286,8 @@ public:
auto* child = curr_node->hn_children[index].get();
this->line_for_offset(child->hn_start) |
[](const auto new_top) {
- lnav_data.ld_views[LNV_PRETTY].set_top(new_top);
+ lnav_data.ld_views[LNV_PRETTY].set_selection(
+ new_top);
};
});
};
@@ -280,8 +305,8 @@ public:
= interval_tree::Interval<file_off_t, lnav::document::hier_node*>;
std::shared_ptr<lnav::document::sections_tree_t> pss_interval_tree;
- std::vector<std::unique_ptr<lnav::document::hier_node>> pss_hier_nods;
std::shared_ptr<hier_tree_t> pss_hier_tree;
+ std::unique_ptr<lnav::document::hier_node> pss_root_node;
};
static void
@@ -293,6 +318,18 @@ open_pretty_view()
auto* pretty_tc = &lnav_data.ld_views[LNV_PRETTY];
auto* log_tc = &lnav_data.ld_views[LNV_LOG];
auto* text_tc = &lnav_data.ld_views[LNV_TEXT];
+
+ if (top_tc == log_tc && log_tc->get_inner_height() == 0
+ && text_tc->get_inner_height() > 0)
+ {
+ lnav_data.ld_view_stack.push_back(text_tc);
+ top_tc = text_tc;
+ }
+
+ if (top_tc != log_tc && top_tc != text_tc) {
+ return;
+ }
+
attr_line_t full_text;
delete pretty_tc->get_sub_source();
@@ -305,9 +342,11 @@ open_pretty_view()
std::vector<lnav::document::section_interval_t> all_intervals;
std::vector<std::unique_ptr<lnav::document::hier_node>> hier_nodes;
std::vector<pretty_sub_source::hier_interval_t> hier_tree_vec;
+ std::set<size_t> pretty_indents;
if (top_tc == log_tc) {
auto& lss = lnav_data.ld_log_source;
bool first_line = true;
+ auto start_off = size_t{0};
for (auto vl = log_tc->get_top(); vl <= log_tc->get_bottom(); ++vl) {
content_line_t cl = lss.at(vl);
@@ -328,6 +367,11 @@ open_pretty_view()
al.get_string(),
text_sub_source::RF_FULL | text_sub_source::RF_REWRITE);
lss.text_attrs_for_line(*log_tc, vl, al.get_attrs());
+ {
+ const auto orig_lr
+ = find_string_attr_range(al.get_attrs(), &SA_ORIGINAL_LINE);
+ require(orig_lr.is_valid());
+ }
scrub_ansi_string(al.get_string(), &al.get_attrs());
if (log_tc->get_hide_fields()) {
al.apply_hide();
@@ -335,6 +379,7 @@ open_pretty_view()
const auto orig_lr
= find_string_attr_range(al.get_attrs(), &SA_ORIGINAL_LINE);
+ require(orig_lr.is_valid());
const auto body_lr
= find_string_attr_range(al.get_attrs(), &SA_BODY);
auto orig_al = al.subline(orig_lr.lr_start, orig_lr.length());
@@ -346,7 +391,6 @@ open_pretty_view()
? body_lr.lr_start - orig_lr.lr_start
: orig_lr.lr_start);
pretty_printer pp(&ds, orig_al.get_attrs());
- auto start_off = full_text.length();
if (body_lr.is_valid()) {
// TODO: dump more details of the line in the output.
@@ -356,9 +400,14 @@ open_pretty_view()
}
pretty_al.split_lines(pretty_lines);
+ auto prefix_len = prefix_al.length();
auto curr_intervals = pp.take_intervals();
auto line_hier_root = pp.take_hier_root();
+ auto curr_indents = pp.take_indents()
+ | lnav::itertools::map([&prefix_len](const auto& elem) {
+ return elem + prefix_len;
+ });
auto line_off = 0;
for (auto& pretty_line : pretty_lines) {
if (pretty_line.empty() && &pretty_line == &pretty_lines.back())
@@ -366,24 +415,24 @@ open_pretty_view()
break;
}
pretty_line.insert(0, prefix_al);
- pretty_line.append("\n");
for (auto& interval : curr_intervals) {
if (line_off <= interval.start) {
- interval.start += prefix_al.length();
- interval.stop += prefix_al.length();
+ interval.start += prefix_len;
+ interval.stop += prefix_len;
} else if (line_off < interval.stop) {
- interval.stop += prefix_al.length();
+ interval.stop += prefix_len;
}
}
lnav::document::hier_node::depth_first(
line_hier_root.get(),
- [line_off, prefix_len = prefix_al.length()](auto* hn) {
+ [line_off, prefix_len = prefix_len](auto* hn) {
if (line_off <= hn->hn_start) {
hn->hn_start += prefix_len;
}
});
- line_off += pretty_line.length();
+ line_off += pretty_line.get_string().length();
full_text.append(pretty_line);
+ full_text.append("\n");
}
first_line = false;
@@ -396,15 +445,14 @@ open_pretty_view()
[start_off](auto* hn) { hn->hn_start += start_off; });
hier_nodes.emplace_back(std::move(line_hier_root));
hier_tree_vec.emplace_back(
- start_off, full_text.length(), hier_nodes.back().get());
+ start_off, start_off + line_off, hier_nodes.back().get());
all_intervals.insert(
all_intervals.end(),
std::make_move_iterator(curr_intervals.begin()),
std::make_move_iterator(curr_intervals.end()));
- }
+ pretty_indents.insert(curr_indents.begin(), curr_indents.end());
- if (!full_text.empty()) {
- full_text.erase(full_text.length() - 1, 1);
+ start_off += line_off;
}
} else if (top_tc == text_tc) {
if (text_tc->listview_rows(*text_tc)) {
@@ -414,28 +462,46 @@ open_pretty_view()
*text_tc, text_tc->get_top(), rows);
attr_line_t orig_al;
- for (const auto& row : rows) {
+ for (auto& row : rows) {
+ remove_string_attr(row.get_attrs(), &VC_BLOCK_ELEM);
+ for (auto& attr : row.get_attrs()) {
+ if (attr.sa_type == &VC_ROLE) {
+ auto role = attr.sa_value.get<role_t>();
+
+ if (role == text_tc->tc_cursor_role
+ || role == text_tc->tc_disabled_cursor_role)
+ {
+ attr.sa_range.lr_end = attr.sa_range.lr_start;
+ }
+ }
+ }
orig_al.append(row);
}
data_scanner ds(orig_al.get_string());
- string_attrs_t sa;
pretty_printer pp(&ds, orig_al.get_attrs());
pp.append_to(full_text);
+
all_intervals = pp.take_intervals();
hier_nodes.emplace_back(pp.take_hier_root());
hier_tree_vec.emplace_back(
0, full_text.length(), hier_nodes.back().get());
+ pretty_indents = pp.take_indents();
}
}
auto* pts = new pretty_sub_source();
pts->pss_interval_tree = std::make_shared<lnav::document::sections_tree_t>(
std::move(all_intervals));
- pts->pss_hier_nods = std::move(hier_nodes);
+ auto root_node = std::make_unique<lnav::document::hier_node>();
+ root_node->hn_children = std::move(hier_nodes);
pts->pss_hier_tree = std::make_shared<pretty_sub_source::hier_tree_t>(
std::move(hier_tree_vec));
- pts->replace_with(full_text);
+ pts->pss_root_node = std::move(root_node);
+ pts->set_indents(std::move(pretty_indents));
+
+ pts->replace_with_mutable(full_text,
+ top_tc->get_sub_source()->get_text_format());
pretty_tc->set_sub_source(pts);
if (lnav_data.ld_last_pretty_print_top != log_tc->get_top()) {
pretty_tc->set_top(0_vl);
@@ -444,12 +510,6 @@ open_pretty_view()
pretty_tc->redo_search();
}
-template<typename T>
-static void
-ignore_case(const T&)
-{
-}
-
static void
build_all_help_text()
{
@@ -461,14 +521,15 @@ build_all_help_text()
std::string sub_help_text;
lexer.with_ignore_quotes(true).eval(
- sub_help_text, lnav_data.ld_exec_context.ec_global_vars);
+ sub_help_text,
+ scoped_resolver{&lnav_data.ld_exec_context.ec_global_vars});
md2attr_line mdal;
auto parse_res = md4cpp::parse(sub_help_text, mdal);
attr_line_t all_help_text = parse_res.unwrap();
- std::map<std::string, help_text*> sql_funcs;
- std::map<std::string, help_text*> sql_keywords;
+ std::map<std::string, const help_text*> sql_funcs;
+ std::map<std::string, const help_text*> sql_keywords;
for (const auto& iter : sqlite_function_help) {
switch (iter.second->ht_context) {
@@ -556,6 +617,7 @@ handle_winch()
lnav_data.ld_filter_view.set_needs_update();
lnav_data.ld_files_view.set_needs_update();
lnav_data.ld_spectro_details_view.set_needs_update();
+ lnav_data.ld_gantt_details_view.set_needs_update();
lnav_data.ld_user_message_view.set_needs_update();
return true;
@@ -564,27 +626,32 @@ handle_winch()
void
layout_views()
{
- unsigned long width, height;
-
+ static auto* breadcrumb_view = injector::get<breadcrumb_curses*>();
+ int width, height;
getmaxyx(lnav_data.ld_window, height, width);
+
int doc_height;
bool doc_side_by_side = width > (90 + 60);
- bool preview_status_open
- = !lnav_data.ld_preview_status_source.get_description().empty();
- bool filter_status_open = false;
+ bool preview_open0
+ = !lnav_data.ld_preview_status_source[0].get_description().empty();
+ bool preview_open1
+ = !lnav_data.ld_preview_status_source[1].get_description().empty();
+ bool filters_supported = false;
auto is_spectro = false;
+ auto is_gantt = false;
lnav_data.ld_view_stack.top() | [&](auto tc) {
is_spectro = (tc == &lnav_data.ld_views[LNV_SPECTRO]);
+ is_gantt = (tc == &lnav_data.ld_views[LNV_GANTT]);
- text_sub_source* tss = tc->get_sub_source();
+ auto* tss = tc->get_sub_source();
if (tss == nullptr) {
return;
}
if (tss->tss_supports_filtering) {
- filter_status_open = true;
+ filters_supported = true;
}
};
@@ -596,12 +663,25 @@ layout_views()
+ lnav_data.ld_example_source.text_line_count();
}
- int preview_height = lnav_data.ld_preview_hidden
+ int preview_height0 = lnav_data.ld_preview_hidden
? 0
- : lnav_data.ld_preview_source.text_line_count();
- int match_rows = lnav_data.ld_match_source.text_line_count();
- int match_height = std::min((unsigned long) match_rows, (height - 4) / 2);
+ : lnav_data.ld_preview_view[0].get_inner_height();
+ if (!lnav_data.ld_preview_hidden
+ && lnav_data.ld_preview_view[0].get_overlay_source() != nullptr)
+ {
+ preview_height0 = 6; // XXX extra height for db overlay
+ }
+ int preview_height1 = lnav_data.ld_preview_hidden
+ ? 0
+ : lnav_data.ld_preview_view[1].get_inner_height();
+ if (!lnav_data.ld_preview_hidden
+ && lnav_data.ld_preview_view[1].get_overlay_source() != nullptr)
+ {
+ preview_height1 = 6; // XXX extra height for db overlay
+ }
+ int match_rows = lnav_data.ld_match_source.text_line_count();
+ int match_height = std::min(match_rows, (height - 4) / 2);
lnav_data.ld_match_view.set_height(vis_line_t(match_height));
int um_rows = lnav_data.ld_user_message_source.text_line_count();
@@ -612,105 +692,150 @@ layout_views()
lnav_data.ld_user_message_source.clear();
um_rows = 0;
}
- int um_height = std::min((unsigned long) um_rows, (height - 4) / 2);
-
+ auto um_height = std::min(um_rows, (height - 4) / 2);
lnav_data.ld_user_message_view.set_height(vis_line_t(um_height));
- if (doc_height + 14
- > ((int) height - match_height - um_height - preview_height - 2))
- {
- preview_height = 0;
- preview_status_open = false;
- }
-
- if (doc_height + 14 > ((int) height - match_height - um_height - 2)) {
- doc_height = lnav_data.ld_doc_source.text_line_count();
- if (doc_height + 14 > ((int) height - match_height - um_height - 2)) {
- doc_height = 0;
- }
- }
+ auto config_panel_open = (lnav_data.ld_mode == ln_mode_t::FILTER
+ || lnav_data.ld_mode == ln_mode_t::FILES
+ || lnav_data.ld_mode == ln_mode_t::SEARCH_FILTERS
+ || lnav_data.ld_mode == ln_mode_t::SEARCH_FILES);
+ auto filters_open = (lnav_data.ld_mode == ln_mode_t::FILTER
+ || lnav_data.ld_mode == ln_mode_t::SEARCH_FILTERS);
+ auto files_open = (lnav_data.ld_mode == ln_mode_t::FILES
+ || lnav_data.ld_mode == ln_mode_t::SEARCH_FILES);
+ int filter_height = config_panel_open ? 5 : 0;
- bool doc_open = doc_height > 0;
- bool filters_open = (lnav_data.ld_mode == ln_mode_t::FILTER
- || lnav_data.ld_mode == ln_mode_t::FILES
- || lnav_data.ld_mode == ln_mode_t::SEARCH_FILTERS
- || lnav_data.ld_mode == ln_mode_t::SEARCH_FILES)
- && !preview_status_open && !doc_open;
bool breadcrumb_open = (lnav_data.ld_mode == ln_mode_t::BREADCRUMBS);
- int filter_height = filters_open ? 5 : 0;
- int bottom_height = (doc_open ? 1 : 0) + doc_height
- + (preview_status_open ? 1 : 0) + preview_height + 1 // bottom status
- + match_height + um_height + lnav_data.ld_rl_view->get_height()
- + (is_spectro && !doc_open ? 5 : 0);
+ auto bottom_min = std::min(2 + 3, height);
+ auto bottom = clamped<int>::from(height, bottom_min, height);
- for (auto& tc : lnav_data.ld_views) {
- tc.set_height(vis_line_t(-(bottom_height + (filter_status_open ? 1 : 0)
- + (filters_open ? 1 : 0) + filter_height)));
- }
- lnav_data.ld_status[LNS_FILTER].set_visible(filter_status_open);
- lnav_data.ld_status[LNS_FILTER].set_enabled(filters_open);
- lnav_data.ld_status[LNS_FILTER].set_top(
- -(bottom_height + filter_height + 1 + (filters_open ? 1 : 0)));
- lnav_data.ld_status[LNS_FILTER_HELP].set_visible(filters_open);
- lnav_data.ld_status[LNS_FILTER_HELP].set_top(
- -(bottom_height + filter_height + 1));
- lnav_data.ld_status[LNS_BOTTOM].set_top(-(match_height + um_height + 2));
- lnav_data.ld_status[LNS_BOTTOM].set_enabled(!filters_open
+ lnav_data.ld_rl_view->set_y(height - 1);
+ bottom -= lnav_data.ld_rl_view->get_height();
+ lnav_data.ld_rl_view->set_width(width);
+
+ breadcrumb_view->set_width(width);
+
+ bool vis;
+ vis = bottom.try_consume(lnav_data.ld_match_view.get_height());
+ lnav_data.ld_match_view.set_y(bottom);
+ lnav_data.ld_match_view.set_visible(vis);
+
+ vis = bottom.try_consume(um_height);
+ lnav_data.ld_user_message_view.set_y(bottom);
+ lnav_data.ld_user_message_view.set_visible(vis);
+
+ bottom -= 1;
+ lnav_data.ld_status[LNS_BOTTOM].set_y(bottom);
+ lnav_data.ld_status[LNS_BOTTOM].set_width(width);
+ lnav_data.ld_status[LNS_BOTTOM].set_enabled(!config_panel_open
&& !breadcrumb_open);
- lnav_data.ld_status[LNS_DOC].set_top(height - bottom_height);
- lnav_data.ld_status[LNS_DOC].set_visible(doc_open);
- lnav_data.ld_status[LNS_PREVIEW].set_top(height - bottom_height
- + (doc_open ? 1 : 0) + doc_height);
- lnav_data.ld_status[LNS_PREVIEW].set_visible(preview_status_open);
- lnav_data.ld_status[LNS_SPECTRO].set_top(height - bottom_height - 1);
- lnav_data.ld_status[LNS_SPECTRO].set_visible(is_spectro);
- lnav_data.ld_status[LNS_SPECTRO].set_enabled(lnav_data.ld_mode
- == ln_mode_t::SPECTRO_DETAILS);
- if (!doc_open || doc_side_by_side) {
- lnav_data.ld_doc_view.set_height(vis_line_t(doc_height));
+ vis = preview_open1 && bottom.try_consume(preview_height1 + 1);
+ lnav_data.ld_preview_view[1].set_height(vis_line_t(preview_height1));
+ lnav_data.ld_preview_view[1].set_y(bottom + 1);
+ lnav_data.ld_preview_view[1].set_visible(vis);
+
+ lnav_data.ld_status[LNS_PREVIEW1].set_y(bottom);
+ lnav_data.ld_status[LNS_PREVIEW1].set_width(width);
+ lnav_data.ld_status[LNS_PREVIEW1].set_visible(vis);
+
+ vis = preview_open0 && bottom.try_consume(preview_height0 + 1);
+ lnav_data.ld_preview_view[0].set_height(vis_line_t(preview_height0));
+ lnav_data.ld_preview_view[0].set_y(bottom + 1);
+ lnav_data.ld_preview_view[0].set_visible(vis);
+
+ lnav_data.ld_status[LNS_PREVIEW0].set_y(bottom);
+ lnav_data.ld_status[LNS_PREVIEW0].set_width(width);
+ lnav_data.ld_status[LNS_PREVIEW0].set_visible(vis);
+
+ if (doc_side_by_side && doc_height > 0) {
+ vis = bottom.try_consume(doc_height + 1);
+ lnav_data.ld_example_view.set_height(vis_line_t(doc_height));
+ lnav_data.ld_example_view.set_x(90);
+ lnav_data.ld_example_view.set_y(bottom + 1);
+ } else if (doc_height > 0 && bottom.available_to_consume(doc_height + 1)) {
+ lnav_data.ld_example_view.set_height(
+ vis_line_t(lnav_data.ld_example_source.text_line_count()));
+ vis = bottom.try_consume(lnav_data.ld_example_view.get_height());
+ lnav_data.ld_example_view.set_x(0);
+ lnav_data.ld_example_view.set_y(bottom);
} else {
+ vis = false;
+ lnav_data.ld_example_view.set_height(0_vl);
+ }
+ lnav_data.ld_example_view.set_visible(vis);
+
+ if (doc_side_by_side) {
+ lnav_data.ld_doc_view.set_height(vis_line_t(doc_height));
+ lnav_data.ld_doc_view.set_y(bottom + 1);
+ } else if (doc_height > 0) {
lnav_data.ld_doc_view.set_height(
vis_line_t(lnav_data.ld_doc_source.text_line_count()));
+ vis = bottom.try_consume(lnav_data.ld_doc_view.get_height() + 1);
+ lnav_data.ld_doc_view.set_y(bottom + 1);
+ } else {
+ vis = false;
}
- lnav_data.ld_doc_view.set_y(height - bottom_height + 1);
+ lnav_data.ld_doc_view.set_visible(vis);
- if (!doc_open || doc_side_by_side) {
- lnav_data.ld_example_view.set_height(vis_line_t(doc_height));
- lnav_data.ld_example_view.set_x(doc_open ? 90 : 0);
- lnav_data.ld_example_view.set_y(height - bottom_height + 1);
+ auto has_doc = lnav_data.ld_example_view.get_height() > 0_vl
+ || lnav_data.ld_doc_view.get_height() > 0_vl;
+ lnav_data.ld_status[LNS_DOC].set_y(bottom);
+ lnav_data.ld_status[LNS_DOC].set_width(width);
+ lnav_data.ld_status[LNS_DOC].set_visible(has_doc && vis);
+
+ if (is_gantt) {
+ vis = bottom.try_consume(lnav_data.ld_gantt_details_view.get_height()
+ + 1);
} else {
- lnav_data.ld_example_view.set_height(
- vis_line_t(lnav_data.ld_example_source.text_line_count()));
- lnav_data.ld_example_view.set_x(0);
- lnav_data.ld_example_view.set_y(
- height - bottom_height + lnav_data.ld_doc_view.get_height() + 1);
+ vis = false;
}
+ lnav_data.ld_gantt_details_view.set_y(bottom + 1);
+ lnav_data.ld_gantt_details_view.set_width(width);
+ lnav_data.ld_gantt_details_view.set_visible(vis);
+ lnav_data.ld_status[LNS_GANTT].set_y(bottom);
+ lnav_data.ld_status[LNS_GANTT].set_width(width);
+ lnav_data.ld_status[LNS_GANTT].set_visible(vis);
+
+ vis = bottom.try_consume(filter_height + (config_panel_open ? 1 : 0)
+ + (filters_supported ? 1 : 0));
lnav_data.ld_filter_view.set_height(vis_line_t(filter_height));
- lnav_data.ld_filter_view.set_y(height - bottom_height - filter_height);
+ lnav_data.ld_filter_view.set_y(bottom + 2);
lnav_data.ld_filter_view.set_width(width);
+ lnav_data.ld_filter_view.set_visible(filters_open && vis);
lnav_data.ld_files_view.set_height(vis_line_t(filter_height));
- lnav_data.ld_files_view.set_y(height - bottom_height - filter_height);
+ lnav_data.ld_files_view.set_y(bottom + 2);
lnav_data.ld_files_view.set_width(width);
+ lnav_data.ld_files_view.set_visible(files_open && vis);
+
+ lnav_data.ld_status[LNS_FILTER_HELP].set_visible(config_panel_open && vis);
+ lnav_data.ld_status[LNS_FILTER_HELP].set_y(bottom + 1);
+ lnav_data.ld_status[LNS_FILTER_HELP].set_width(width);
- lnav_data.ld_preview_view.set_height(vis_line_t(preview_height));
- lnav_data.ld_preview_view.set_y(height - bottom_height + 1
- + (doc_open ? 1 : 0) + doc_height);
- lnav_data.ld_user_message_view.set_y(
- height - lnav_data.ld_rl_view->get_height() - match_height - um_height);
+ lnav_data.ld_status[LNS_FILTER].set_visible(vis);
+ lnav_data.ld_status[LNS_FILTER].set_enabled(config_panel_open);
+ lnav_data.ld_status[LNS_FILTER].set_y(bottom);
+ lnav_data.ld_status[LNS_FILTER].set_width(width);
- lnav_data.ld_spectro_details_view.set_y(height - bottom_height);
- lnav_data.ld_spectro_details_view.set_height(
- is_spectro && !doc_open ? 5_vl : 0_vl);
+ vis = is_spectro && bottom.try_consume(5 + 1);
+ lnav_data.ld_spectro_details_view.set_y(bottom + 1);
+ lnav_data.ld_spectro_details_view.set_height(5_vl);
lnav_data.ld_spectro_details_view.set_width(width);
- lnav_data.ld_spectro_details_view.set_title("spectro-details");
+ lnav_data.ld_spectro_details_view.set_visible(vis);
- lnav_data.ld_match_view.set_y(height - lnav_data.ld_rl_view->get_height()
- - match_height);
- lnav_data.ld_rl_view->set_width(width);
+ lnav_data.ld_status[LNS_SPECTRO].set_y(bottom);
+ lnav_data.ld_status[LNS_SPECTRO].set_width(width);
+ lnav_data.ld_status[LNS_SPECTRO].set_visible(vis);
+ lnav_data.ld_status[LNS_SPECTRO].set_enabled(lnav_data.ld_mode
+ == ln_mode_t::SPECTRO_DETAILS);
+
+ auto bottom_used = bottom - height;
+ for (auto& tc : lnav_data.ld_views) {
+ tc.set_height(vis_line_t(bottom_used));
+ }
}
void
@@ -731,7 +856,7 @@ update_hits(textview_curses* tc)
int preview_count = 0;
- vis_bookmarks& bm = tc->get_bookmarks();
+ auto& bm = tc->get_bookmarks();
const auto& bv = bm[&textview_curses::BM_SEARCH];
auto vl = tc->get_top();
unsigned long width;
@@ -803,11 +928,15 @@ update_hits(textview_curses* tc)
}
if (preview_count > 0) {
- lnav_data.ld_preview_status_source.get_description().set_value(
- "Matching lines for search");
- lnav_data.ld_preview_source.replace_with(all_matches)
+ lnav_data.ld_preview_status_source[0]
+ .get_description()
+ .set_value("Matching lines for search");
+ lnav_data.ld_preview_view[0].set_sub_source(
+ &lnav_data.ld_preview_source[0]);
+ lnav_data.ld_preview_source[0]
+ .replace_with(all_matches)
.set_text_format(text_format_t::TF_UNKNOWN);
- lnav_data.ld_preview_view.set_needs_update();
+ lnav_data.ld_preview_view[0].set_needs_update();
}
}
}
@@ -815,68 +944,112 @@ update_hits(textview_curses* tc)
static std::unordered_map<std::string, attr_line_t> EXAMPLE_RESULTS;
-void
-execute_examples()
+static void
+execute_example(const help_text& ht)
{
- db_label_source& dls = lnav_data.ld_db_row_source;
- db_overlay_source& dos = lnav_data.ld_db_overlay;
- textview_curses& db_tc = lnav_data.ld_views[LNV_DB];
+ static const std::set<std::string> IGNORED_NAMES = {"ATTACH"};
- for (auto& help_iter : sqlite_function_help) {
- struct help_text& ht = *(help_iter.second);
+ if (IGNORED_NAMES.count(ht.ht_name)) {
+ return;
+ }
- for (auto& ex : ht.ht_example) {
- std::string alt_msg;
- attr_line_t result;
+ auto& dls = lnav_data.ld_db_row_source;
+ auto& dos = lnav_data.ld_db_overlay;
+ auto& db_tc = lnav_data.ld_views[LNV_DB];
- if (!ex.he_cmd) {
- continue;
- }
+ for (const auto& ex : ht.ht_example) {
+ std::string alt_msg;
+ attr_line_t result;
- switch (ht.ht_context) {
- case help_context_t::HC_SQL_KEYWORD:
- case help_context_t::HC_SQL_INFIX:
- case help_context_t::HC_SQL_FUNCTION:
- case help_context_t::HC_SQL_TABLE_VALUED_FUNCTION: {
- exec_context ec;
+ if (!ex.he_cmd) {
+ continue;
+ }
+
+ if (EXAMPLE_RESULTS.count(ex.he_cmd)) {
+ continue;
+ }
+
+ switch (ht.ht_context) {
+ case help_context_t::HC_SQL_KEYWORD:
+ case help_context_t::HC_SQL_INFIX:
+ case help_context_t::HC_SQL_FUNCTION:
+ case help_context_t::HC_SQL_TABLE_VALUED_FUNCTION:
+ case help_context_t::HC_PRQL_TRANSFORM:
+ case help_context_t::HC_PRQL_FUNCTION: {
+ exec_context ec;
+
+ ec.ec_label_source_stack.push_back(&dls);
- execute_sql(ec, ex.he_cmd, alt_msg);
+ auto exec_res = execute_sql(ec, ex.he_cmd, alt_msg);
- if (dls.dls_rows.size() == 1 && dls.dls_rows[0].size() == 1)
+ if (exec_res.isErr()) {
+ auto um = exec_res.unwrapErr();
+ result.append(um.to_attr_line());
+ } else if (dls.dls_rows.size() == 1
+ && dls.dls_rows[0].size() == 1)
+ {
+ result.append(dls.dls_rows[0][0]);
+ } else {
+ attr_line_t al;
+ dos.list_static_overlay(db_tc, 0, 1, al);
+ result.append(al);
+ for (int lpc = 0; lpc < (int) dls.text_line_count(); lpc++)
{
- result.append(dls.dls_rows[0][0]);
- } else {
- attr_line_t al;
- dos.list_value_for_overlay(db_tc, 0, 1, 0_vl, al);
- result.append(al);
- for (int lpc = 0; lpc < (int) dls.text_line_count();
- lpc++)
- {
- al.clear();
- dls.text_value_for_line(
- db_tc, lpc, al.get_string(), false);
- dls.text_attrs_for_line(db_tc, lpc, al.get_attrs());
- std::replace(al.get_string().begin(),
- al.get_string().end(),
- '\n',
- ' ');
- result.append("\n").append(al);
- }
+ al.clear();
+ dls.text_value_for_line(
+ db_tc, lpc, al.get_string(), false);
+ dls.text_attrs_for_line(db_tc, lpc, al.get_attrs());
+ std::replace(al.get_string().begin(),
+ al.get_string().end(),
+ '\n',
+ ' ');
+ result.append("\n").append(al);
}
+ }
- EXAMPLE_RESULTS[ex.he_cmd] = result;
+ EXAMPLE_RESULTS[ex.he_cmd] = result;
- log_debug("example: %s", ex.he_cmd);
- log_debug("example result: %s",
- result.get_string().c_str());
- break;
- }
- default:
- log_warning("Not executing example: %s", ex.he_cmd);
- break;
+ log_trace("example: %s", ex.he_cmd);
+ log_trace("example result: %s", result.get_string().c_str());
+ break;
}
+ default:
+ log_warning("Not executing example: %s", ex.he_cmd);
+ break;
+ }
+ }
+}
+
+void
+execute_examples()
+{
+ static const auto* sql_cmd_map
+ = injector::get<readline_context::command_map_t*, sql_cmd_map_tag>();
+
+ auto& dls = lnav_data.ld_db_row_source;
+
+ auto old_width = dls.dls_max_column_width;
+ dls.dls_max_column_width = 15;
+ for (auto help_pair : sqlite_function_help) {
+ execute_example(*help_pair.second);
+ }
+ for (auto help_pair : lnav::sql::prql_functions) {
+ if (help_pair.second->ht_context != help_context_t::HC_PRQL_FUNCTION) {
+ continue;
}
+ execute_example(*help_pair.second);
}
+ for (auto cmd_pair : *sql_cmd_map) {
+ if (cmd_pair.second->c_help.ht_context
+ != help_context_t::HC_PRQL_TRANSFORM
+ && cmd_pair.second->c_help.ht_context
+ != help_context_t::HC_PRQL_FUNCTION)
+ {
+ continue;
+ }
+ execute_example(cmd_pair.second->c_help);
+ }
+ dls.dls_max_column_width = old_width;
dls.clear();
}
@@ -903,12 +1076,27 @@ toggle_view(textview_curses* toggle_tc)
require(toggle_tc >= &lnav_data.ld_views[0]);
require(toggle_tc < &lnav_data.ld_views[LNV__MAX]);
+ lnav_data.ld_preview_view[0].set_sub_source(
+ &lnav_data.ld_preview_source[0]);
+ lnav_data.ld_preview_source[0].clear();
+ lnav_data.ld_preview_status_source[0].get_description().clear();
+ lnav_data.ld_preview_view[1].set_sub_source(nullptr);
+ lnav_data.ld_preview_status_source[1].get_description().clear();
+
if (tc == toggle_tc) {
if (lnav_data.ld_view_stack.size() == 1) {
return false;
}
lnav_data.ld_last_view = tc;
lnav_data.ld_view_stack.pop_back();
+ lnav_data.ld_view_stack.top() | [](auto* tc) {
+ // XXX
+ if (tc == &lnav_data.ld_views[LNV_GANTT]) {
+ auto tss = tc->get_sub_source();
+ tss->text_filters_changed();
+ tc->reload_data();
+ }
+ };
} else {
if (toggle_tc == &lnav_data.ld_views[LNV_LOG]
|| toggle_tc == &lnav_data.ld_views[LNV_TEXT])
@@ -919,6 +1107,8 @@ toggle_view(textview_curses* toggle_tc)
open_schema_view();
} else if (toggle_tc == &lnav_data.ld_views[LNV_PRETTY]) {
open_pretty_view();
+ } else if (toggle_tc == &lnav_data.ld_views[LNV_GANTT]) {
+ open_gantt_view();
} else if (toggle_tc == &lnav_data.ld_views[LNV_HISTOGRAM]) {
// Rebuild to reflect changes in marks.
rebuild_hist();
@@ -946,7 +1136,7 @@ toggle_view(textview_curses* toggle_tc)
bool
ensure_view(textview_curses* expected_tc)
{
- textview_curses* tc = lnav_data.ld_view_stack.top().value_or(nullptr);
+ auto* tc = lnav_data.ld_view_stack.top().value_or(nullptr);
bool retval = true;
if (tc != expected_tc) {
@@ -1211,4 +1401,194 @@ lnav_crumb_source()
}
return retval;
-} \ No newline at end of file
+}
+
+void
+clear_preview()
+{
+ for (size_t lpc = 0; lpc < 2; lpc++) {
+ lnav_data.ld_preview_source[lpc].clear();
+ lnav_data.ld_preview_status_source[lpc]
+ .get_description()
+ .set_cylon(false)
+ .clear();
+ lnav_data.ld_db_preview_source[lpc].clear();
+ lnav_data.ld_preview_view[lpc].set_sub_source(nullptr);
+ lnav_data.ld_preview_view[lpc].set_overlay_source(nullptr);
+ }
+}
+
+void
+set_view_mode(ln_mode_t mode)
+{
+ if (mode == lnav_data.ld_mode) {
+ return;
+ }
+
+ static auto* breadcrumb_view = injector::get<breadcrumb_curses*>();
+
+ switch (lnav_data.ld_mode) {
+ case ln_mode_t::BREADCRUMBS: {
+ breadcrumb_view->blur();
+ break;
+ }
+ default:
+ break;
+ }
+ switch (mode) {
+ case ln_mode_t::BREADCRUMBS: {
+ breadcrumb_view->focus();
+ break;
+ }
+ default:
+ break;
+ }
+ lnav_data.ld_mode = mode;
+}
+
+static std::vector<view_curses*>
+all_views()
+{
+ static auto* breadcrumb_view = injector::get<breadcrumb_curses*>();
+
+ std::vector<view_curses*> retval;
+
+ retval.push_back(breadcrumb_view);
+ for (auto& sc : lnav_data.ld_status) {
+ retval.push_back(&sc);
+ }
+ retval.push_back(&lnav_data.ld_doc_view);
+ retval.push_back(&lnav_data.ld_example_view);
+ retval.push_back(&lnav_data.ld_preview_view[0]);
+ retval.push_back(&lnav_data.ld_preview_view[1]);
+ retval.push_back(&lnav_data.ld_files_view);
+ retval.push_back(&lnav_data.ld_filter_view);
+ retval.push_back(&lnav_data.ld_user_message_view);
+ retval.push_back(&lnav_data.ld_spectro_details_view);
+ retval.push_back(&lnav_data.ld_gantt_details_view);
+ retval.push_back(lnav_data.ld_rl_view);
+
+ return retval;
+}
+
+void
+lnav_behavior::mouse_event(int button, bool release, int x, int y)
+{
+ static auto* breadcrumb_view = injector::get<breadcrumb_curses*>();
+ static const std::vector<view_curses*> VIEWS = all_views();
+ static const auto CLICK_INTERVAL
+ = std::chrono::milliseconds(mouseinterval(-1) * 2);
+
+ struct mouse_event me;
+
+ switch (button & xterm_mouse::XT_BUTTON__MASK) {
+ case xterm_mouse::XT_BUTTON1:
+ me.me_button = mouse_button_t::BUTTON_LEFT;
+ break;
+ case xterm_mouse::XT_BUTTON2:
+ me.me_button = mouse_button_t::BUTTON_MIDDLE;
+ break;
+ case xterm_mouse::XT_BUTTON3:
+ me.me_button = mouse_button_t::BUTTON_RIGHT;
+ break;
+ case xterm_mouse::XT_SCROLL_UP:
+ me.me_button = mouse_button_t::BUTTON_SCROLL_UP;
+ break;
+ case xterm_mouse::XT_SCROLL_DOWN:
+ me.me_button = mouse_button_t::BUTTON_SCROLL_DOWN;
+ break;
+ }
+
+ gettimeofday(&me.me_time, nullptr);
+ me.me_modifiers = button & xterm_mouse::XT_MODIFIER_MASK;
+
+ if (release
+ && (to_mstime(me.me_time)
+ - to_mstime(this->lb_last_release_event.me_time))
+ < CLICK_INTERVAL.count())
+ {
+ me.me_state = mouse_button_state_t::BUTTON_STATE_DOUBLE_CLICK;
+ } else if (button & xterm_mouse::XT_DRAG_FLAG) {
+ me.me_state = mouse_button_state_t::BUTTON_STATE_DRAGGED;
+ } else if (release) {
+ me.me_state = mouse_button_state_t::BUTTON_STATE_RELEASED;
+ } else {
+ me.me_state = mouse_button_state_t::BUTTON_STATE_PRESSED;
+ }
+
+ auto width = getmaxx(lnav_data.ld_window);
+
+ me.me_press_x = this->lb_last_event.me_press_x;
+ me.me_press_y = this->lb_last_event.me_press_y;
+ me.me_x = x - 1;
+ if (me.me_x >= width) {
+ me.me_x = width - 1;
+ }
+ me.me_y = y - 1;
+
+ switch (me.me_state) {
+ case mouse_button_state_t::BUTTON_STATE_PRESSED:
+ case mouse_button_state_t::BUTTON_STATE_DOUBLE_CLICK: {
+ if (lnav_data.ld_mode == ln_mode_t::BREADCRUMBS) {
+ if (breadcrumb_view->contains(me.me_x, me.me_y)) {
+ this->lb_last_view = breadcrumb_view;
+ break;
+ } else {
+ set_view_mode(ln_mode_t::PAGING);
+ lnav_data.ld_view_stack.set_needs_update();
+ }
+ }
+
+ auto* tc = *(lnav_data.ld_view_stack.top());
+ if (tc->contains(me.me_x, me.me_y)) {
+ me.me_press_y = me.me_y - tc->get_y();
+ me.me_press_x = me.me_x - tc->get_x();
+ this->lb_last_view = tc;
+
+ switch (lnav_data.ld_mode) {
+ case ln_mode_t::PAGING:
+ break;
+ case ln_mode_t::FILES:
+ case ln_mode_t::FILTER:
+ // Clicking on the main view when the config panels are
+ // open should return us to paging.
+ set_view_mode(ln_mode_t::PAGING);
+ break;
+ default:
+ break;
+ }
+ } else {
+ for (auto* vc : VIEWS) {
+ if (vc->contains(me.me_x, me.me_y)) {
+ this->lb_last_view = vc;
+ me.me_press_y = me.me_y - vc->get_y();
+ me.me_press_x = me.me_x - vc->get_x();
+ break;
+ }
+ }
+ }
+ break;
+ }
+ case mouse_button_state_t::BUTTON_STATE_DRAGGED: {
+ break;
+ }
+ case mouse_button_state_t::BUTTON_STATE_RELEASED: {
+ this->lb_last_release_event = me;
+ break;
+ }
+ }
+
+ if (this->lb_last_view != nullptr) {
+ me.me_y -= this->lb_last_view->get_y();
+ me.me_x -= this->lb_last_view->get_x();
+ this->lb_last_view->handle_mouse(me);
+ }
+ this->lb_last_event = me;
+ if (me.me_state == mouse_button_state_t::BUTTON_STATE_RELEASED
+ || me.me_state == mouse_button_state_t::BUTTON_STATE_DOUBLE_CLICK
+ || me.me_button == mouse_button_t::BUTTON_SCROLL_UP
+ || me.me_button == mouse_button_t::BUTTON_SCROLL_DOWN)
+ {
+ this->lb_last_view = nullptr;
+ }
+}
diff --git a/src/view_helpers.hh b/src/view_helpers.hh
index 19989e1..de3d43a 100644
--- a/src/view_helpers.hh
+++ b/src/view_helpers.hh
@@ -34,8 +34,10 @@
#include "bookmarks.hh"
#include "help_text.hh"
+#include "listview_curses.hh"
#include "logfile_fwd.hh"
#include "vis_line.hh"
+#include "xterm_mouse.hh"
class textview_curses;
class hist_source2;
@@ -51,6 +53,7 @@ typedef enum {
LNV_SCHEMA,
LNV_PRETTY,
LNV_SPECTRO,
+ LNV_GANTT,
LNV__MAX
} lnav_view_t;
@@ -85,6 +88,8 @@ bool toggle_view(textview_curses* toggle_tc);
bool handle_winch();
void layout_views();
void update_hits(textview_curses* tc);
+void clear_preview();
+void set_view_mode(ln_mode_t mode);
nonstd::optional<vis_line_t> next_cluster(
nonstd::optional<vis_line_t> (bookmark_vector<vis_line_t>::*f)(vis_line_t)
@@ -98,4 +103,13 @@ bool moveto_cluster(nonstd::optional<vis_line_t> (
vis_line_t search_forward_from(textview_curses* tc);
textview_curses* get_textview_for_mode(ln_mode_t mode);
+class lnav_behavior : public mouse_behavior {
+public:
+ void mouse_event(int button, bool release, int x, int y) override;
+
+ view_curses* lb_last_view{nullptr};
+ struct mouse_event lb_last_event;
+ struct mouse_event lb_last_release_event;
+};
+
#endif
diff --git a/src/views_vtab.cc b/src/views_vtab.cc
index 6dee241..7c399af 100644
--- a/src/views_vtab.cc
+++ b/src/views_vtab.cc
@@ -34,17 +34,16 @@
#include <unistd.h>
#include "base/injector.bind.hh"
-#include "base/itertools.hh"
#include "base/lnav_log.hh"
#include "base/opt_util.hh"
#include "config.h"
#include "lnav.hh"
-#include "lnav_util.hh"
#include "sql_util.hh"
-#include "view_curses.hh"
#include "vtab_module_json.hh"
#include "yajlpp/yajlpp_def.hh"
+using namespace lnav::roles::literals;
+
template<>
struct from_sqlite<lnav_view_t> {
inline lnav_view_t operator()(int argc, sqlite3_value** val, int argi)
@@ -123,6 +122,8 @@ struct from_sqlite<std::shared_ptr<lnav::pcre2pp::code>> {
}
};
+namespace {
+
static const typed_json_path_container<breadcrumb::possibility>
breadcrumb_possibility_handlers = {
yajlpp::property_handler("display_value")
@@ -174,6 +175,88 @@ static const typed_json_path_container<top_line_meta> top_line_meta_handlers = {
.with_children(breadcrumb_crumb_handlers),
};
+static const typed_json_path_container<line_range> line_range_handlers = {
+ yajlpp::property_handler("start").for_field(&line_range::lr_start),
+ yajlpp::property_handler("end").for_field(&line_range::lr_end),
+};
+
+static const typed_json_path_container<textview_curses::selected_text_info>
+ selected_text_handlers = {
+ yajlpp::property_handler("line").for_field(
+ &textview_curses::selected_text_info::sti_line),
+ yajlpp::property_handler("range")
+ .for_child(&textview_curses::selected_text_info::sti_range)
+ .with_children(line_range_handlers),
+ yajlpp::property_handler("value").for_field(
+ &textview_curses::selected_text_info::sti_value),
+};
+
+enum class row_details_t {
+ hide,
+ show,
+};
+
+enum class word_wrap_t {
+ none,
+ normal,
+};
+
+struct view_options {
+ nonstd::optional<row_details_t> vo_row_details;
+ nonstd::optional<row_details_t> vo_row_time_offset;
+ nonstd::optional<int32_t> vo_overlay_focus;
+ nonstd::optional<word_wrap_t> vo_word_wrap;
+ nonstd::optional<row_details_t> vo_hidden_fields;
+
+ bool empty() const
+ {
+ return !this->vo_row_details.has_value()
+ && !this->vo_row_time_offset.has_value()
+ && !this->vo_overlay_focus.has_value()
+ && !this->vo_word_wrap.has_value()
+ && !this->vo_hidden_fields.has_value();
+ }
+};
+
+static const json_path_handler_base::enum_value_t ROW_DETAILS_ENUM[] = {
+ {"hide", row_details_t::hide},
+ {"show", row_details_t::show},
+
+ json_path_handler_base::ENUM_TERMINATOR,
+};
+
+static const json_path_handler_base::enum_value_t WORD_WRAP_ENUM[] = {
+ {"none", word_wrap_t::none},
+ {"normal", word_wrap_t::normal},
+
+ json_path_handler_base::ENUM_TERMINATOR,
+};
+
+static const typed_json_path_container<view_options> view_options_handlers = {
+ yajlpp::property_handler("row-details")
+ .with_enum_values(ROW_DETAILS_ENUM)
+ .with_description(
+ "Show or hide the details overlay for the focused row")
+ .for_field(&view_options::vo_row_details),
+ yajlpp::property_handler("row-time-offset")
+ .with_enum_values(ROW_DETAILS_ENUM)
+ .with_description(
+ "Show or hide the time-offset from a row to the previous mark")
+ .for_field(&view_options::vo_row_time_offset),
+ yajlpp::property_handler("hidden-fields")
+ .with_enum_values(ROW_DETAILS_ENUM)
+ .with_description(
+ "Show or hide fields that have been hidden by the user")
+ .for_field(&view_options::vo_hidden_fields),
+ yajlpp::property_handler("overlay-focused-line")
+ .with_description("The focused line in an overlay")
+ .for_field(&view_options::vo_overlay_focus),
+ yajlpp::property_handler("word-wrap")
+ .with_enum_values(WORD_WRAP_ENUM)
+ .with_description("How to break long lines")
+ .for_field(&view_options::vo_word_wrap),
+};
+
struct lnav_views : public tvt_iterator_cursor<lnav_views> {
static constexpr const char* NAME = "lnav_views";
static constexpr const char* CREATE_STMT = R"(
@@ -191,7 +274,9 @@ CREATE TABLE lnav_views (
filtering INTEGER, -- Indicates if the view is applying filters.
movement TEXT, -- The movement mode, either 'top' or 'cursor'.
top_meta TEXT, -- A JSON object that contains metadata related to the top line in the view.
- selection INTEGER -- The number of the line that is focused for selection.
+ selection INTEGER, -- The number of the line that is focused for selection.
+ options TEXT, -- A JSON object that contains optional settings for this view.
+ selected_text TEXT -- A JSON object that contains information about the text selected by the mouse in the view.
);
)";
@@ -205,7 +290,7 @@ CREATE TABLE lnav_views (
{
lnav_view_t view_index = (lnav_view_t) std::distance(
std::begin(lnav_data.ld_views), vc.iter);
- textview_curses& tc = *vc.iter;
+ const auto& tc = *vc.iter;
unsigned long width;
vis_line_t height;
@@ -232,14 +317,15 @@ CREATE TABLE lnav_views (
= dynamic_cast<text_time_translator*>(tc.get_sub_source());
if (time_source != nullptr && tc.get_inner_height() > 0) {
- auto top_time_opt = time_source->time_for_row(tc.get_top());
+ auto top_ri_opt
+ = time_source->time_for_row(tc.get_selection());
- if (top_time_opt) {
+ if (top_ri_opt) {
char timestamp[64];
sql_strftime(timestamp,
sizeof(timestamp),
- top_time_opt.value(),
+ top_ri_opt->ri_time,
' ');
sqlite3_result_text(
ctx, timestamp, -1, SQLITE_TRANSIENT);
@@ -288,6 +374,10 @@ CREATE TABLE lnav_views (
case 11: {
static const size_t MAX_POSSIBILITIES = 128;
+ if (sqlite3_vtab_nochange(ctx)) {
+ return SQLITE_OK;
+ }
+
auto* tss = tc.get_sub_source();
if (tss != nullptr && tss->text_line_count() > 0) {
@@ -300,15 +390,15 @@ CREATE TABLE lnav_views (
top_line_meta tlm;
if (time_source != nullptr) {
- auto top_time_opt
- = time_source->time_for_row(tc.get_top());
+ auto top_ri_opt
+ = time_source->time_for_row(tc.get_selection());
- if (top_time_opt) {
+ if (top_ri_opt) {
char timestamp[64];
sql_strftime(timestamp,
sizeof(timestamp),
- top_time_opt.value(),
+ top_ri_opt->ri_time,
' ');
tlm.tlm_time = timestamp;
}
@@ -344,6 +434,55 @@ CREATE TABLE lnav_views (
case 12:
sqlite3_result_int(ctx, (int) tc.get_selection());
break;
+ case 13: {
+ if (sqlite3_vtab_nochange(ctx)) {
+ return SQLITE_OK;
+ }
+
+ auto* text_accel_p
+ = dynamic_cast<text_accel_source*>(tc.get_sub_source());
+ auto vo = view_options{};
+
+ vo.vo_word_wrap = tc.get_word_wrap() ? word_wrap_t::normal
+ : word_wrap_t::none;
+ vo.vo_hidden_fields = tc.get_hide_fields()
+ ? row_details_t::hide
+ : row_details_t::show;
+ if (tc.get_overlay_source()) {
+ auto ov_sel = tc.get_overlay_selection();
+
+ vo.vo_row_details
+ = tc.get_overlay_source()->get_show_details_in_overlay()
+ ? row_details_t::show
+ : row_details_t::hide;
+ if (ov_sel) {
+ vo.vo_overlay_focus = ov_sel.value();
+ }
+ }
+ if (text_accel_p != nullptr) {
+ vo.vo_row_time_offset
+ = text_accel_p->is_time_offset_enabled()
+ ? row_details_t::show
+ : row_details_t::hide;
+ }
+
+ if (vo.empty()) {
+ sqlite3_result_null(ctx);
+ } else {
+ to_sqlite(ctx, view_options_handlers.to_json_string(vo));
+ }
+ break;
+ }
+ case 14: {
+ if (tc.tc_selected_text) {
+ to_sqlite(ctx,
+ selected_text_handlers.to_json_string(
+ tc.tc_selected_text.value()));
+ } else {
+ sqlite3_result_null(ctx);
+ }
+ break;
+ }
}
return SQLITE_OK;
@@ -377,13 +516,36 @@ CREATE TABLE lnav_views (
bool do_filtering,
string_fragment movement,
const char* top_meta,
- int64_t selection)
+ int64_t selection,
+ nonstd::optional<string_fragment> options,
+ nonstd::optional<string_fragment> selected_text)
{
auto& tc = lnav_data.ld_views[index];
auto* time_source
= dynamic_cast<text_time_translator*>(tc.get_sub_source());
+ auto* text_accel_p
+ = dynamic_cast<text_accel_source*>(tc.get_sub_source());
+ view_options vo;
+
+ if (options) {
+ static const intern_string_t OPTIONS_SRC
+ = intern_string::lookup("options");
+
+ auto parse_res = view_options_handlers.parser_for(OPTIONS_SRC)
+ .of(options.value());
+ if (parse_res.isErr()) {
+ auto errmsg = parse_res.unwrapErr();
+
+ set_vtable_errmsg(tab, errmsg[0]);
+ return SQLITE_ERROR;
+ }
+
+ vo = parse_res.unwrap();
+ }
if (tc.get_top() != top_row) {
+ log_debug(
+ "setting top for %s to %d", tc.get_title().c_str(), top_row);
tc.set_top(vis_line_t(top_row));
if (!tc.is_selectable()) {
selection = top_row;
@@ -392,21 +554,41 @@ CREATE TABLE lnav_views (
date_time_scanner dts;
struct timeval tv;
+ log_debug("setting top time for %s to %s",
+ tc.get_title().c_str(),
+ top_time);
if (dts.convert_to_timeval(top_time, -1, nullptr, tv)) {
- auto last_time_opt = time_source->time_for_row(tc.get_top());
+ auto last_ri_opt
+ = time_source->time_for_row(tc.get_selection());
- if (last_time_opt) {
- auto last_time = last_time_opt.value();
+ if (last_ri_opt) {
+ auto last_time = last_ri_opt->ri_time;
if (tv != last_time) {
time_source->row_for_time(tv) |
- [&tc](auto row) { tc.set_top(row); };
+ [&tc, &selection](auto row) {
+ log_debug("setting top for %s to %d from time",
+ tc.get_title().c_str(),
+ row);
+ selection = row;
+ tc.set_selection(row);
+ };
if (!tc.is_selectable()) {
selection = tc.get_top();
}
}
+ } else {
+ log_warning(" could not get for time top row of %s",
+ tc.get_title().c_str());
}
} else {
- tab->zErrMsg = sqlite3_mprintf("Invalid time: %s", top_time);
+ auto um = lnav::console::user_message::error(
+ attr_line_t("Invalid ")
+ .append_quoted("top_time"_symbol)
+ .append(" value"))
+ .with_reason(
+ attr_line_t("Unrecognized time value: ")
+ .append(lnav::roles::string(top_time)));
+ set_vtable_errmsg(tab, um);
return SQLITE_ERROR;
}
}
@@ -421,9 +603,8 @@ CREATE TABLE lnav_views (
string_fragment::from_c_str(top_meta));
if (parse_res.isErr()) {
auto errmsg = parse_res.unwrapErr();
- tab->zErrMsg = sqlite3_mprintf(
- "Invalid top_meta: %s",
- errmsg[0].to_attr_line().get_string().c_str());
+
+ set_vtable_errmsg(tab, errmsg[0]);
return SQLITE_ERROR;
}
@@ -431,9 +612,15 @@ CREATE TABLE lnav_views (
if (index == LNV_TEXT && tlm.tlm_file) {
if (!lnav_data.ld_text_source.to_front(tlm.tlm_file.value())) {
- auto errmsg = parse_res.unwrapErr();
- tab->zErrMsg = sqlite3_mprintf("unknown top_meta.file: %s",
- tlm.tlm_file->c_str());
+ auto um
+ = lnav::console::user_message::error(
+ attr_line_t("Invalid ")
+ .append_quoted("top_meta.file"_symbol)
+ .append(" value"))
+ .with_reason(attr_line_t("Unknown text file: ")
+ .append(lnav::roles::file(
+ tlm.tlm_file.value())));
+ set_vtable_errmsg(tab, um);
return SQLITE_ERROR;
}
}
@@ -451,8 +638,15 @@ CREATE TABLE lnav_views (
tc.set_selection(req_anchor_top.value());
}
} else {
- tab->zErrMsg = sqlite3_mprintf(
- "unknown top_meta.anchor: %s", req_anchor.c_str());
+ auto um
+ = lnav::console::user_message::error(
+ attr_line_t("Invalid ")
+ .append_quoted("top_meta.anchor"_symbol)
+ .append(" value"))
+ .with_reason(
+ attr_line_t("Unknown anchor: ")
+ .append(lnav::roles::symbol(req_anchor)));
+ set_vtable_errmsg(tab, um);
return SQLITE_ERROR;
}
}
@@ -473,6 +667,31 @@ CREATE TABLE lnav_views (
tc.set_selection(cur_bot);
}
}
+ if (vo.vo_row_details && tc.get_overlay_source()) {
+ tc.get_overlay_source()->set_show_details_in_overlay(
+ vo.vo_row_details.value() == row_details_t::show);
+ tc.set_needs_update();
+ }
+ if (vo.vo_overlay_focus && tc.get_overlay_source()) {
+ tc.set_overlay_selection(vis_line_t(vo.vo_overlay_focus.value()));
+ }
+ if (vo.vo_word_wrap) {
+ tc.set_word_wrap(vo.vo_word_wrap.value() == word_wrap_t::normal);
+ }
+ if (vo.vo_hidden_fields) {
+ tc.set_hide_fields(vo.vo_hidden_fields.value()
+ == row_details_t::hide);
+ }
+ if (text_accel_p != nullptr && vo.vo_row_time_offset) {
+ switch (vo.vo_row_time_offset.value()) {
+ case row_details_t::show:
+ text_accel_p->set_time_offset(true);
+ break;
+ case row_details_t::hide:
+ text_accel_p->set_time_offset(false);
+ break;
+ }
+ }
tc.set_left(left);
tc.set_paused(is_paused);
tc.execute_search(search);
@@ -528,6 +747,8 @@ CREATE TABLE lnav_view_stack (
lnav_data.ld_last_view = *lnav_data.ld_view_stack.top();
lnav_data.ld_view_stack.pop_back();
+ clear_preview();
+
return SQLITE_OK;
}
@@ -570,15 +791,15 @@ struct lnav_view_filter_base {
iterator& operator++()
{
while (this->i_view_index < LNV__MAX) {
- textview_curses& tc = lnav_data.ld_views[this->i_view_index];
- text_sub_source* tss = tc.get_sub_source();
+ const auto& tc = lnav_data.ld_views[this->i_view_index];
+ auto* tss = tc.get_sub_source();
if (tss == nullptr) {
this->i_view_index = lnav_view_t(this->i_view_index + 1);
continue;
}
- filter_stack& fs = tss->get_filters();
+ const auto& fs = tss->get_filters();
this->i_filter_index += 1;
if (this->i_filter_index >= (ssize_t) fs.size()) {
@@ -802,10 +1023,7 @@ CREATE TABLE lnav_view_filters (
auto set_res = lnav_data.ld_log_source.set_sql_filter(
clause, stmt.release());
if (set_res.isErr()) {
- tab->zErrMsg = sqlite3_mprintf(
- "%s%s",
- sqlitepp::ERROR_PREFIX,
- lnav::to_json(set_res.unwrapErr()).c_str());
+ set_vtable_errmsg(tab, set_res.unwrapErr());
return SQLITE_ERROR;
}
tf = lnav_data.ld_log_source.get_sql_filter().value();
@@ -903,10 +1121,7 @@ CREATE TABLE lnav_view_filters (
auto set_res = lnav_data.ld_log_source.set_sql_filter(
clause, stmt.release());
if (set_res.isErr()) {
- tab->zErrMsg = sqlite3_mprintf(
- "%s%s",
- sqlitepp::ERROR_PREFIX,
- lnav::to_json(set_res.unwrapErr()).c_str());
+ set_vtable_errmsg(tab, set_res.unwrapErr());
return SQLITE_ERROR;
}
*iter = lnav_data.ld_log_source.get_sql_filter().value();
@@ -1079,6 +1294,7 @@ CREATE TABLE lnav_view_files (
auto& ld = *iter;
if (ld->ld_visible != visible) {
+ ld->get_file_ptr()->set_indexing(visible);
ld->set_visibility(visible);
lss.text_filters_changed();
}
@@ -1087,11 +1303,6 @@ CREATE TABLE lnav_view_files (
}
};
-static const char* CREATE_FILTER_VIEW = R"(
-CREATE VIEW lnav_view_filters_and_stats AS
- SELECT * FROM lnav_view_filters LEFT NATURAL JOIN lnav_view_filter_stats
-)";
-
static auto a = injector::bind_multiple<vtab_module_base>()
.add<vtab_module<lnav_views>>()
.add<vtab_module<lnav_view_stack>>()
@@ -1099,9 +1310,16 @@ static auto a = injector::bind_multiple<vtab_module_base>()
.add<vtab_module<tvt_no_update<lnav_view_filter_stats>>>()
.add<vtab_module<lnav_view_files>>();
+} // namespace
+
int
register_views_vtab(sqlite3* db)
{
+ static const char* CREATE_FILTER_VIEW = R"(
+CREATE VIEW lnav_view_filters_and_stats AS
+ SELECT * FROM lnav_view_filters LEFT NATURAL JOIN lnav_view_filter_stats
+)";
+
auto_mem<char> errmsg(sqlite3_free);
if (sqlite3_exec(db, CREATE_FILTER_VIEW, nullptr, nullptr, errmsg.out())
!= SQLITE_OK)
diff --git a/src/vt52_curses.cc b/src/vt52_curses.cc
index 01dc6ff..e75ddd6 100644
--- a/src/vt52_curses.cc
+++ b/src/vt52_curses.cc
@@ -17,7 +17,7 @@
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ''AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHAN`TABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
@@ -208,8 +208,8 @@ vt52_curses::map_output(const char* output, int len)
if (this->vc_expected_escape_len != -1) {
if (this->vc_escape_len == this->vc_expected_escape_len) {
auto& line_string = this->vc_line.get_string();
- auto x_byte_index
- = utf8_char_to_byte_index(line_string, this->vc_x);
+ auto x_byte_index = utf8_char_to_byte_index(
+ line_string, this->vc_cursor_x);
for (int esc_index = 0; esc_index < this->vc_escape_len;
esc_index++)
@@ -222,7 +222,7 @@ vt52_curses::map_output(const char* output, int len)
}
x_byte_index += 1;
}
- this->vc_x += 1;
+ this->vc_cursor_x += 1;
this->vc_escape_len = 0;
}
} else if ((cap = vt52_escape_map::singleton()[this->vc_escape])
@@ -230,11 +230,11 @@ vt52_curses::map_output(const char* output, int len)
{
this->vc_escape_len = 0;
if (strcmp(cap, "ce") == 0) {
- this->vc_line.erase_utf8_chars(this->vc_x);
+ this->vc_line.erase_utf8_chars(this->vc_cursor_x);
} else if (strcmp(cap, "kl") == 0) {
- this->vc_x -= 1;
+ this->vc_cursor_x -= 1;
} else if (strcmp(cap, "kr") == 0) {
- this->vc_x += 1;
+ this->vc_cursor_x += 1;
} else if (strcmp(cap, "BE") == 0 || strcmp(cap, "BD") == 0) {
// TODO pass bracketed paste mode through
} else {
@@ -256,7 +256,7 @@ vt52_curses::map_output(const char* output, int len)
switch (next_ch) {
case STX:
- this->vc_x = 0;
+ this->vc_cursor_x = 0;
this->vc_line.clear();
break;
@@ -265,7 +265,7 @@ vt52_curses::map_output(const char* output, int len)
break;
case BACKSPACE:
- this->vc_x -= 1;
+ this->vc_cursor_x -= 1;
break;
case ESCAPE:
@@ -275,25 +275,25 @@ vt52_curses::map_output(const char* output, int len)
break;
case '\n':
- this->vc_x = 0;
+ this->vc_cursor_x = 0;
this->vc_line.clear();
break;
case '\r':
- this->vc_x = 0;
+ this->vc_cursor_x = 0;
break;
default: {
auto& line_string = this->vc_line.get_string();
- auto x_byte_index
- = utf8_char_to_byte_index(line_string, this->vc_x);
+ auto x_byte_index = utf8_char_to_byte_index(
+ line_string, this->vc_cursor_x);
if (x_byte_index < this->vc_line.length()) {
line_string[x_byte_index] = next_ch;
} else {
this->vc_line.append(1, next_ch);
}
- this->vc_x += 1;
+ this->vc_cursor_x += 1;
break;
}
}
@@ -301,14 +301,16 @@ vt52_curses::map_output(const char* output, int len)
}
}
-void
+bool
vt52_curses::do_update()
{
auto actual_width = this->get_actual_width();
view_curses::mvwattrline(this->vc_window,
this->get_actual_y(),
- this->vc_left,
+ this->vc_x,
this->vc_line,
line_range{0, (int) actual_width});
- wmove(this->vc_window, this->get_actual_y(), this->vc_left + this->vc_x);
+ wmove(
+ this->vc_window, this->get_actual_y(), this->vc_x + this->vc_cursor_x);
+ return true;
}
diff --git a/src/vt52_curses.hh b/src/vt52_curses.hh
index c78b0e4..0249e69 100644
--- a/src/vt52_curses.hh
+++ b/src/vt52_curses.hh
@@ -59,27 +59,11 @@ public:
/** @return The curses window this view is attached to. */
WINDOW* get_window() { return this->vc_window; }
- void set_left(int left) { this->vc_left = left; }
-
- int get_left() const { return this->vc_left; }
-
- /**
- * Set the Y position of this view on the display. A value greater than
- * zero is considered to be an absolute size. A value less than zero makes
- * the position relative to the bottom of the enclosing window.
- *
- * @param y The Y position of the cursor on the curses display.
- */
- void set_y(int y) { this->vc_y = y; }
-
- /** @return The abs/rel Y position of the cursor on the curses display. */
- int get_y() const { return this->vc_y; }
-
/** @param x The X position of the cursor on the curses display. */
- void set_x(int x) { this->vc_x = x; }
+ void set_cursor_x(int x) { this->vc_cursor_x = x; }
/** @return The X position of the cursor on the curses display. */
- int get_x() const { return this->vc_x; }
+ int get_cursor_x() const { return this->vc_cursor_x; }
/**
* @return The height of this view, which consists of a single line for
@@ -112,7 +96,7 @@ public:
/**
* Paints any past lines and moves the cursor to the current X position.
*/
- void do_update();
+ bool do_update() override;
const static char ESCAPE = 27; /*< VT52 Escape key value. */
const static char BACKSPACE = 8; /*< VT52 Backspace key value. */
@@ -141,20 +125,18 @@ protected:
auto retval = getmaxx(this->vc_window);
if (this->vc_width < 0) {
- retval -= this->vc_left;
+ retval -= this->vc_x;
retval += this->vc_width;
} else if (this->vc_width > 0) {
retval = this->vc_width;
} else {
- retval = retval - this->vc_left;
+ retval = retval - this->vc_x;
}
return retval;
}
WINDOW* vc_window{nullptr}; /*< The window that contains this view. */
- int vc_left{0};
- int vc_x{0}; /*< The X position of the cursor. */
- int vc_y{0}; /*< The Y position of the cursor. */
+ int vc_cursor_x{0}; /*< The X position of the cursor. */
int vc_max_height{0};
char vc_escape[16]; /*< Storage for escape sequences. */
int vc_escape_len{0}; /*< The number of chars in vc_escape. */
diff --git a/src/vtab_module.cc b/src/vtab_module.cc
index 043401a..31597c7 100644
--- a/src/vtab_module.cc
+++ b/src/vtab_module.cc
@@ -46,6 +46,13 @@ to_sqlite(sqlite3_context* ctx, const lnav::console::user_message& um)
sqlite3_result_error(ctx, errmsg.c_str(), errmsg.size());
}
+void
+set_vtable_errmsg(sqlite3_vtab* vtab, const lnav::console::user_message& um)
+{
+ vtab->zErrMsg = sqlite3_mprintf(
+ "%s%s", sqlitepp::ERROR_PREFIX, lnav::to_json(um).c_str());
+}
+
lnav::console::user_message
sqlite3_error_to_user_message(sqlite3* db)
{
diff --git a/src/vtab_module.hh b/src/vtab_module.hh
index a45594c..ff08bfd 100644
--- a/src/vtab_module.hh
+++ b/src/vtab_module.hh
@@ -31,7 +31,6 @@
#define vtab_module_hh
#include <string>
-#include <utility>
#include <vector>
#include <sqlite3.h>
@@ -41,11 +40,11 @@
#include "base/lnav.console.hh"
#include "base/lnav_log.hh"
#include "base/string_util.hh"
+#include "base/types.hh"
#include "fmt/format.h"
#include "help_text_formatter.hh"
#include "mapbox/variant.hpp"
#include "optional.hpp"
-#include "shlex.resolver.hh"
#include "sqlite-extension-func.hh"
lnav::console::user_message sqlite3_error_to_user_message(sqlite3*);
@@ -67,10 +66,7 @@ struct sqlite_func_error : std::exception {
{
}
- const char* what() const noexcept override
- {
- return this->e_what.c_str();
- }
+ const char* what() const noexcept override { return this->e_what.c_str(); }
const std::string e_what;
};
@@ -83,12 +79,10 @@ struct nullable {
};
template<typename>
-struct is_nullable : std::false_type {
-};
+struct is_nullable : std::false_type {};
template<typename T>
-struct is_nullable<nullable<T>> : std::true_type {
-};
+struct is_nullable<nullable<T>> : std::true_type {};
} // namespace vtab_types
@@ -158,9 +152,12 @@ template<>
struct from_sqlite<string_fragment> {
inline string_fragment operator()(int argc, sqlite3_value** val, int argi)
{
- return string_fragment::from_bytes(
- (const char*) sqlite3_value_blob(val[argi]),
- sqlite3_value_bytes(val[argi]));
+ auto ptr = (const char*) sqlite3_value_blob(val[argi]);
+
+ if (ptr == nullptr) {
+ return string_fragment::invalid();
+ }
+ return string_fragment::from_bytes(ptr, sqlite3_value_bytes(val[argi]));
}
};
@@ -223,6 +220,9 @@ struct from_sqlite<vtab_types::nullable<T>> {
void to_sqlite(sqlite3_context* ctx, const lnav::console::user_message& um);
+void set_vtable_errmsg(sqlite3_vtab* vtab,
+ const lnav::console::user_message& um);
+
inline void
to_sqlite(sqlite3_context* ctx, null_value_t)
{
@@ -296,7 +296,7 @@ to_sqlite(sqlite3_context* ctx, double val)
inline void
to_sqlite(sqlite3_context* ctx, auto_mem<char> str)
{
- auto free_func = str.get_free_func<void(*)(void*)>();
+ auto free_func = str.get_free_func<void (*)(void*)>();
sqlite3_result_text(ctx, str.release(), -1, free_func);
}
@@ -372,8 +372,7 @@ struct optional_counter<Arg> {
};
template<typename Arg1, typename... Args>
-struct optional_counter<Arg1, Args...> : optional_counter<Args...> {
-};
+struct optional_counter<Arg1, Args...> : optional_counter<Args...> {};
template<typename... Args>
struct variadic_counter {
@@ -391,8 +390,7 @@ struct variadic_counter<Arg> {
};
template<typename Arg1, typename... Args>
-struct variadic_counter<Arg1, Args...> : variadic_counter<Args...> {
-};
+struct variadic_counter<Arg1, Args...> : variadic_counter<Args...> {};
template<typename F, F f>
struct sqlite_func_adapter;
@@ -821,10 +819,7 @@ struct vtab_module : public vtab_module_base {
return sqlite3_exec(db, create_stmt.c_str(), nullptr, nullptr, nullptr);
}
- int create(sqlite3* db) override
- {
- return this->create(db, T::NAME);
- }
+ int create(sqlite3* db) override { return this->create(db, T::NAME); }
sqlite3_module vm_module;
T vm_impl;
diff --git a/src/ww898/cp_utf8.hpp b/src/ww898/cp_utf8.hpp
index 8eaa133..f1d28fd 100644
--- a/src/ww898/cp_utf8.hpp
+++ b/src/ww898/cp_utf8.hpp
@@ -1,18 +1,18 @@
/*
* MIT License
- *
+ *
* Copyright (c) 2017-2019 Mikhail Pilin
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -25,8 +25,8 @@
#pragma once
#include <cstdint>
-#include <utility>
#include <stdexcept>
+#include <utility>
#include "base/result.h"
@@ -40,8 +40,7 @@ namespace utf {
// 1111_0xxx 10xx_xxxx 10xx_xxxx 10xx_xxxx
// 1111_10xx 10xx_xxxx 10xx_xxxx 10xx_xxxx 10xx_xxxx
// 1111_110x 10xx_xxxx 10xx_xxxx 10xx_xxxx 10xx_xxxx 10xx_xxxx
-struct utf8 final
-{
+struct utf8 final {
static size_t const max_unicode_symbol_size = 4;
static size_t const max_supported_symbol_size = 6;
@@ -50,26 +49,29 @@ struct utf8 final
using char_type = uint8_t;
template<typename PeekFn>
- static Result<size_t, const char *> char_size(PeekFn && peek_fn)
+ static Result<size_t, const char*> char_size(PeekFn&& peek_fn)
{
- const std::pair<char_type, size_t> peek_res = std::forward<PeekFn>(peek_fn)();
+ const std::pair<char_type, size_t> peek_res
+ = std::forward<PeekFn>(peek_fn)();
const auto ch0 = peek_res.first;
const auto remaining = peek_res.second;
size_t retval = 0;
- if (ch0 < 0x80) { // 0xxx_xxxx
+ if (ch0 < 0x80) { // 0xxx_xxxx
retval = 1;
} else if (ch0 < 0xC0) {
return Err("The utf8 first char in sequence is incorrect");
- } else if (ch0 < 0xE0) { // 110x_xxxx 10xx_xxxx
+ } else if (ch0 < 0xE0) { // 110x_xxxx 10xx_xxxx
retval = 2;
- } else if (ch0 < 0xF0) { // 1110_xxxx 10xx_xxxx 10xx_xxxx
+ } else if (ch0 < 0xF0) { // 1110_xxxx 10xx_xxxx 10xx_xxxx
retval = 3;
- } else if (ch0 < 0xF8) { // 1111_0xxx 10xx_xxxx 10xx_xxxx 10xx_xxxx
+ } else if (ch0 < 0xF8) { // 1111_0xxx 10xx_xxxx 10xx_xxxx 10xx_xxxx
retval = 4;
- } else if (ch0 < 0xFC) { // 1111_10xx 10xx_xxxx 10xx_xxxx 10xx_xxxx 10xx_xxxx
+ } else if (ch0 < 0xFC)
+ { // 1111_10xx 10xx_xxxx 10xx_xxxx 10xx_xxxx 10xx_xxxx
retval = 5;
- } else if (ch0 < 0xFE) { // 1111_110x 10xx_xxxx 10xx_xxxx 10xx_xxxx 10xx_xxxx 10xx_xxxx
+ } else if (ch0 < 0xFE)
+ { // 1111_110x 10xx_xxxx 10xx_xxxx 10xx_xxxx 10xx_xxxx 10xx_xxxx
retval = 6;
} else {
return Err("The utf8 first char in sequence is incorrect");
@@ -81,91 +83,129 @@ struct utf8 final
}
template<typename ReadFn>
- static uint32_t read(ReadFn && read_fn)
+ static Result<uint32_t, const char*> read(ReadFn&& read_fn)
{
char_type const ch0 = read_fn();
- if (ch0 < 0x80) // 0xxx_xxxx
- return ch0;
+ if (ch0 < 0x80) // 0xxx_xxxx
+ return Ok((uint32_t) ch0);
if (ch0 < 0xC0)
- throw std::runtime_error("The utf8 first char in sequence is incorrect");
- if (ch0 < 0xE0) // 110x_xxxx 10xx_xxxx
+ return Err("The utf8 first char in sequence is incorrect");
+ if (ch0 < 0xE0) // 110x_xxxx 10xx_xxxx
{
- char_type const ch1 = read_fn(); if (ch1 >> 6 != 2) goto _err;
- return (ch0 << 6) + ch1 - 0x3080;
+ char_type const ch1 = read_fn();
+ if (ch1 >> 6 != 2)
+ goto _err;
+ return Ok((((uint32_t) ch0) << 6) + ch1 - 0x3080);
}
- if (ch0 < 0xF0) // 1110_xxxx 10xx_xxxx 10xx_xxxx
+ if (ch0 < 0xF0) // 1110_xxxx 10xx_xxxx 10xx_xxxx
{
- char_type const ch1 = read_fn(); if (ch1 >> 6 != 2) goto _err;
- char_type const ch2 = read_fn(); if (ch2 >> 6 != 2) goto _err;
- return (ch0 << 12) + (ch1 << 6) + ch2 - 0xE2080;
+ char_type const ch1 = read_fn();
+ if (ch1 >> 6 != 2)
+ goto _err;
+ char_type const ch2 = read_fn();
+ if (ch2 >> 6 != 2)
+ goto _err;
+ return Ok((((uint32_t) ch0) << 12) + (ch1 << 6) + ch2 - 0xE2080);
}
- if (ch0 < 0xF8) // 1111_0xxx 10xx_xxxx 10xx_xxxx 10xx_xxxx
+ if (ch0 < 0xF8) // 1111_0xxx 10xx_xxxx 10xx_xxxx 10xx_xxxx
{
- char_type const ch1 = read_fn(); if (ch1 >> 6 != 2) goto _err;
- char_type const ch2 = read_fn(); if (ch2 >> 6 != 2) goto _err;
- char_type const ch3 = read_fn(); if (ch3 >> 6 != 2) goto _err;
- return (ch0 << 18) + (ch1 << 12) + (ch2 << 6) + ch3 - 0x3C82080;
+ char_type const ch1 = read_fn();
+ if (ch1 >> 6 != 2)
+ goto _err;
+ char_type const ch2 = read_fn();
+ if (ch2 >> 6 != 2)
+ goto _err;
+ char_type const ch3 = read_fn();
+ if (ch3 >> 6 != 2)
+ goto _err;
+ return Ok((((uint32_t) ch0) << 18) + (ch1 << 12) + (ch2 << 6) + ch3
+ - 0x3C82080);
}
- if (ch0 < 0xFC) // 1111_10xx 10xx_xxxx 10xx_xxxx 10xx_xxxx 10xx_xxxx
+ if (ch0 < 0xFC) // 1111_10xx 10xx_xxxx 10xx_xxxx 10xx_xxxx 10xx_xxxx
{
- char_type const ch1 = read_fn(); if (ch1 >> 6 != 2) goto _err;
- char_type const ch2 = read_fn(); if (ch2 >> 6 != 2) goto _err;
- char_type const ch3 = read_fn(); if (ch3 >> 6 != 2) goto _err;
- char_type const ch4 = read_fn(); if (ch4 >> 6 != 2) goto _err;
- return (ch0 << 24) + (ch1 << 18) + (ch2 << 12) + (ch3 << 6) + ch4 - 0xFA082080;
+ char_type const ch1 = read_fn();
+ if (ch1 >> 6 != 2)
+ goto _err;
+ char_type const ch2 = read_fn();
+ if (ch2 >> 6 != 2)
+ goto _err;
+ char_type const ch3 = read_fn();
+ if (ch3 >> 6 != 2)
+ goto _err;
+ char_type const ch4 = read_fn();
+ if (ch4 >> 6 != 2)
+ goto _err;
+ return Ok((ch0 << 24) + (ch1 << 18) + (ch2 << 12) + (ch3 << 6) + ch4
+ - 0xFA082080);
}
- if (ch0 < 0xFE) // 1111_110x 10xx_xxxx 10xx_xxxx 10xx_xxxx 10xx_xxxx 10xx_xxxx
+ if (ch0 < 0xFE) // 1111_110x 10xx_xxxx 10xx_xxxx 10xx_xxxx 10xx_xxxx
+ // 10xx_xxxx
{
- char_type const ch1 = read_fn(); if (ch1 >> 6 != 2) goto _err;
- char_type const ch2 = read_fn(); if (ch2 >> 6 != 2) goto _err;
- char_type const ch3 = read_fn(); if (ch3 >> 6 != 2) goto _err;
- char_type const ch4 = read_fn(); if (ch4 >> 6 != 2) goto _err;
- char_type const ch5 = read_fn(); if (ch5 >> 6 != 2) goto _err;
- return (ch0 << 30) + (ch1 << 24) + (ch2 << 18) + (ch3 << 12) + (ch4 << 6) + ch5 - 0x82082080;
+ char_type const ch1 = read_fn();
+ if (ch1 >> 6 != 2)
+ goto _err;
+ char_type const ch2 = read_fn();
+ if (ch2 >> 6 != 2)
+ goto _err;
+ char_type const ch3 = read_fn();
+ if (ch3 >> 6 != 2)
+ goto _err;
+ char_type const ch4 = read_fn();
+ if (ch4 >> 6 != 2)
+ goto _err;
+ char_type const ch5 = read_fn();
+ if (ch5 >> 6 != 2)
+ goto _err;
+ return Ok((ch0 << 30) + (ch1 << 24) + (ch2 << 18) + (ch3 << 12)
+ + (ch4 << 6) + ch5 - 0x82082080);
}
- throw std::runtime_error("The utf8 first char in sequence is incorrect");
- _err: throw std::runtime_error("The utf8 slave char in sequence is incorrect");
+ return Err("The utf8 first char in sequence is incorrect");
+ _err:
+ return Err("The utf8 slave char in sequence is incorrect");
}
template<typename WriteFn>
- static void write(uint32_t const cp, WriteFn && write_fn)
+ static void write(uint32_t const cp, WriteFn&& write_fn)
{
- if (cp < 0x80) // 0xxx_xxxx
+ if (cp < 0x80) // 0xxx_xxxx
write_fn(static_cast<char_type>(cp));
- else if (cp < 0x800) // 110x_xxxx 10xx_xxxx
+ else if (cp < 0x800) // 110x_xxxx 10xx_xxxx
{
- write_fn(static_cast<char_type>(0xC0 | cp >> 6));
+ write_fn(static_cast<char_type>(0xC0 | cp >> 6));
goto _1;
- }
- else if (cp < 0x10000) // 1110_xxxx 10xx_xxxx 10xx_xxxx
+ } else if (cp < 0x10000) // 1110_xxxx 10xx_xxxx 10xx_xxxx
{
write_fn(static_cast<char_type>(0xE0 | cp >> 12));
goto _2;
- }
- else if (cp < 0x200000) // 1111_0xxx 10xx_xxxx 10xx_xxxx 10xx_xxxx
+ } else if (cp < 0x200000) // 1111_0xxx 10xx_xxxx 10xx_xxxx 10xx_xxxx
{
write_fn(static_cast<char_type>(0xF0 | cp >> 18));
goto _3;
- }
- else if (cp < 0x4000000) // 1111_10xx 10xx_xxxx 10xx_xxxx 10xx_xxxx 10xx_xxxx
+ } else if (cp < 0x4000000) // 1111_10xx 10xx_xxxx 10xx_xxxx 10xx_xxxx
+ // 10xx_xxxx
{
write_fn(static_cast<char_type>(0xF8 | cp >> 24));
goto _4;
- }
- else if (cp < 0x80000000) // 1111_110x 10xx_xxxx 10xx_xxxx 10xx_xxxx 10xx_xxxx 10xx_xxxx
+ } else if (cp < 0x80000000) // 1111_110x 10xx_xxxx 10xx_xxxx 10xx_xxxx
+ // 10xx_xxxx 10xx_xxxx
{
write_fn(static_cast<char_type>(0xFC | cp >> 30));
goto _5;
- }
- else
+ } else
throw std::runtime_error("Tool large UTF8 code point");
return;
- _5: write_fn(static_cast<char_type>(0x80 | (cp >> 24 & 0x3F)));
- _4: write_fn(static_cast<char_type>(0x80 | (cp >> 18 & 0x3F)));
- _3: write_fn(static_cast<char_type>(0x80 | (cp >> 12 & 0x3F)));
- _2: write_fn(static_cast<char_type>(0x80 | (cp >> 6 & 0x3F)));
- _1: write_fn(static_cast<char_type>(0x80 | (cp & 0x3F)));
+ _5:
+ write_fn(static_cast<char_type>(0x80 | (cp >> 24 & 0x3F)));
+ _4:
+ write_fn(static_cast<char_type>(0x80 | (cp >> 18 & 0x3F)));
+ _3:
+ write_fn(static_cast<char_type>(0x80 | (cp >> 12 & 0x3F)));
+ _2:
+ write_fn(static_cast<char_type>(0x80 | (cp >> 6 & 0x3F)));
+ _1:
+ write_fn(static_cast<char_type>(0x80 | (cp & 0x3F)));
}
};
-}}
+} // namespace utf
+} // namespace ww898
diff --git a/src/xpath_vtab.cc b/src/xpath_vtab.cc
index f44bde4..0fe88bd 100644
--- a/src/xpath_vtab.cc
+++ b/src/xpath_vtab.cc
@@ -34,7 +34,6 @@
#include "config.h"
#include "pugixml/pugixml.hpp"
#include "sql_help.hh"
-#include "sql_util.hh"
#include "vtab_module.hh"
#include "xml_util.hh"
#include "yajlpp/yajlpp.hh"
@@ -142,7 +141,7 @@ CREATE TABLE xpath (
{
switch (col) {
case XP_COL_RESULT: {
- auto& xpath_node = vc.c_results[vc.c_rowid];
+ const auto& xpath_node = vc.c_results[vc.c_rowid];
if (xpath_node.node()) {
std::ostringstream oss;
@@ -314,21 +313,38 @@ rcFilter(sqlite3_vtab_cursor* pVtabCursor,
pCur->c_value.assign(blob, byte_count);
auto parse_res = pCur->c_doc.load_string(pCur->c_value.c_str());
if (!parse_res) {
- pVtabCursor->pVtab->zErrMsg
- = sqlite3_mprintf("Invalid XML document at offset %d: %s",
+ static const intern_string_t ARG1 = intern_string::lookup("xmldoc");
+
+ auto attr_xmldoc
+ = attr_line_t(pCur->c_value)
+ .with_attr_for_all(VC_ROLE.value(role_t::VCR_QUOTED_CODE));
+ auto um = lnav::console::user_message::error("Invalid XML document")
+ .with_reason(parse_res.description())
+ .with_snippet(
+ lnav::console::snippet::from_content_with_offset(
+ ARG1,
+ attr_xmldoc,
parse_res.offset,
- parse_res.description());
+ parse_res.description()));
+ set_vtable_errmsg(pVtabCursor->pVtab, um);
return SQLITE_ERROR;
}
pCur->c_xpath = (const char*) sqlite3_value_text(argv[0]);
pCur->c_query = checkout_query(pCur->c_xpath);
if (!pCur->c_query) {
- auto& res = pCur->c_query.result();
- pVtabCursor->pVtab->zErrMsg
- = sqlite3_mprintf("Invalid XPATH expression at offset %d: %s",
- res.offset,
- res.description());
+ static const intern_string_t ARG0 = intern_string::lookup("xpath");
+
+ const auto& res = pCur->c_query.result();
+ auto attr_xpath
+ = attr_line_t(pCur->c_xpath)
+ .with_attr_for_all(VC_ROLE.value(role_t::VCR_QUOTED_CODE));
+ auto um = lnav::console::user_message::error("Invalid XPath expression")
+ .with_reason(res.description())
+ .with_snippet(
+ lnav::console::snippet::from_content_with_offset(
+ ARG0, attr_xpath, res.offset, res.description()));
+ set_vtable_errmsg(pVtabCursor->pVtab, um);
return SQLITE_ERROR;
}
diff --git a/src/xterm_mouse.cc b/src/xterm_mouse.cc
index f1f330a..0091f79 100644
--- a/src/xterm_mouse.cc
+++ b/src/xterm_mouse.cc
@@ -42,7 +42,6 @@ void
xterm_mouse::handle_mouse()
{
bool release = false;
- int ch;
size_t index = 0;
int bstate, x, y;
char buffer[64];
@@ -52,7 +51,7 @@ xterm_mouse::handle_mouse()
if (index >= sizeof(buffer) - 1) {
break;
}
- ch = getch();
+ auto ch = getch();
switch (ch) {
case 'm':
release = true;
@@ -81,11 +80,13 @@ void
xterm_mouse::set_enabled(bool enabled)
{
if (is_available()) {
- putp(tparm((char*) XT_TERMCAP, enabled ? 1 : 0));
- putp(tparm((char*) XT_TERMCAP_TRACKING, enabled ? 1 : 0));
- putp(tparm((char*) XT_TERMCAP_SGR, enabled ? 1 : 0));
- fflush(stdout);
- this->xm_enabled = enabled;
+ if (this->xm_enabled != enabled) {
+ putp(tparm((char*) XT_TERMCAP, enabled ? 1 : 0));
+ putp(tparm((char*) XT_TERMCAP_TRACKING, enabled ? 1 : 0));
+ putp(tparm((char*) XT_TERMCAP_SGR, enabled ? 1 : 0));
+ fflush(stdout);
+ this->xm_enabled = enabled;
+ }
} else {
log_warning("mouse support is not available");
}
diff --git a/src/xterm_mouse.hh b/src/xterm_mouse.hh
index ce29a14..151444f 100644
--- a/src/xterm_mouse.hh
+++ b/src/xterm_mouse.hh
@@ -84,6 +84,12 @@ public:
static const int XT_BUTTON__MASK
= XT_SCROLL_WHEEL_FLAG | XT_BUTTON1 | XT_BUTTON2 | XT_BUTTON3;
+ static const int XT_MODIFIER_SHIFT = 4;
+ static const int XT_MODIFIER_META = 8;
+ static const int XT_MODIFIER_CTRL = 16;
+ static const int XT_MODIFIER_MASK
+ = XT_MODIFIER_SHIFT | XT_MODIFIER_META | XT_MODIFIER_CTRL;
+
static const char* XT_TERMCAP;
static const char* XT_TERMCAP_TRACKING;
static const char* XT_TERMCAP_SGR;
diff --git a/src/yajlpp/CMakeLists.txt b/src/yajlpp/CMakeLists.txt
index 73168ba..260e6e1 100644
--- a/src/yajlpp/CMakeLists.txt
+++ b/src/yajlpp/CMakeLists.txt
@@ -13,7 +13,7 @@ add_library(
target_include_directories(yajlpp PUBLIC . .. ../fmtlib
${CMAKE_CURRENT_BINARY_DIR}/..)
-target_link_libraries(yajlpp pcrepp yajl ncurses::libcurses)
+target_link_libraries(yajlpp pcrepp yajl ncurses::libcurses datepp)
add_executable(test_yajlpp test_yajlpp.cc)
target_link_libraries(test_yajlpp yajlpp base ${lnav_LIBS})
diff --git a/src/yajlpp/Makefile.am b/src/yajlpp/Makefile.am
index cc6bcf6..35688a0 100644
--- a/src/yajlpp/Makefile.am
+++ b/src/yajlpp/Makefile.am
@@ -11,6 +11,7 @@ AM_CPPFLAGS = \
$(PCRE_CFLAGS) \
-I$(top_srcdir)/src/ \
-I$(top_srcdir)/src/fmtlib \
+ -I$(top_srcdir)/src/third-party/date/include \
-I$(top_srcdir)/src/third-party/scnlib/include
AM_LDFLAGS = \
@@ -53,6 +54,7 @@ LDADD = \
libyajlpp.a \
$(top_builddir)/src/base/libbase.a \
$(top_builddir)/src/fmtlib/libcppfmt.a \
+ $(top_builddir)/src/third-party/date/src/libdatepp.a \
$(top_builddir)/src/third-party/scnlib/src/libscnlib.a \
$(top_builddir)/src/pcrepp/libpcrepp.a \
$(top_builddir)/src/yajl/libyajl.a
diff --git a/src/yajlpp/json_ptr.cc b/src/yajlpp/json_ptr.cc
index 4cc0273..3336f4e 100644
--- a/src/yajlpp/json_ptr.cc
+++ b/src/yajlpp/json_ptr.cc
@@ -226,6 +226,19 @@ json_ptr::encode(char* dst, size_t dst_len, const char* src, size_t src_len)
return retval;
}
+std::string
+json_ptr::encode_str(const char* src, size_t src_len)
+{
+ if (src_len == (size_t) -1) {
+ src_len = strlen(src);
+ }
+
+ char retval[src_len * 2 + 1];
+ auto rc = encode(retval, sizeof(retval), src, src_len);
+
+ return std::string(retval, rc);
+}
+
size_t
json_ptr::decode(char* dst, const char* src, ssize_t src_len)
{
@@ -268,6 +281,39 @@ json_ptr::decode(char* dst, const char* src, ssize_t src_len)
return retval;
}
+std::string
+json_ptr::decode(const string_fragment& sf)
+{
+ std::string retval;
+ auto in_escape = false;
+
+ retval.reserve(sf.length());
+ for (const auto ch : sf) {
+ if (in_escape) {
+ switch (ch) {
+ case '0':
+ retval.push_back('~');
+ break;
+ case '1':
+ retval.push_back('/');
+ break;
+ case '2':
+ retval.push_back('#');
+ break;
+ default:
+ break;
+ }
+ in_escape = false;
+ } else if (ch == '~') {
+ in_escape = true;
+ } else {
+ retval.push_back(ch);
+ }
+ }
+
+ return retval;
+}
+
bool
json_ptr::expect_map(int32_t& depth, int32_t& index)
{
diff --git a/src/yajlpp/json_ptr.hh b/src/yajlpp/json_ptr.hh
index f7822ab..463048c 100644
--- a/src/yajlpp/json_ptr.hh
+++ b/src/yajlpp/json_ptr.hh
@@ -41,6 +41,7 @@
#include <sys/types.h>
#include "base/auto_mem.hh"
+#include "base/intern_string.hh"
#include "yajl/api/yajl_parse.h"
#include "yajl/api/yajl_tree.h"
@@ -64,7 +65,8 @@ public:
void inc_array_index()
{
if (!this->jpw_array_indexes.empty()
- && this->jpw_array_indexes.back() != -1) {
+ && this->jpw_array_indexes.back() != -1)
+ {
this->jpw_array_indexes.back() += 1;
}
}
@@ -108,7 +110,14 @@ public:
const char* src,
size_t src_len = -1);
+ static std::string encode_str(const char* src, size_t src_len = -1);
+ static std::string encode_str(const std::string& src)
+ {
+ return encode_str(src.c_str(), src.size());
+ }
+
static size_t decode(char* dst, const char* src, ssize_t src_len = -1);
+ static std::string decode(const string_fragment& sf);
json_ptr(const char* value) : jp_value(value), jp_pos(value) {}
diff --git a/src/yajlpp/yajlpp.cc b/src/yajlpp/yajlpp.cc
index b1362ab..0fc0001 100644
--- a/src/yajlpp/yajlpp.cc
+++ b/src/yajlpp/yajlpp.cc
@@ -34,8 +34,6 @@
#include "yajlpp.hh"
-#include "base/fs_util.hh"
-#include "base/snippet_highlighters.hh"
#include "config.h"
#include "fmt/format.h"
#include "ghc/filesystem.hpp"
@@ -213,10 +211,7 @@ json_path_handler_base::gen(yajlpp_gen_context& ygc, yajl_gen handle) const
if (this->jph_children) {
for (const auto& lpath : local_paths) {
- std::string full_path = lpath;
- if (this->jph_path_provider) {
- full_path += "/";
- }
+ std::string full_path = json_ptr::encode_str(lpath);
int start_depth = ygc.ygc_depth;
yajl_gen_string(handle, lpath);
@@ -455,8 +450,8 @@ json_path_handler_base::gen_schema_type(yajlpp_gen_context& ygc) const
void
json_path_handler_base::walk(
- const std::function<
- void(const json_path_handler_base&, const std::string&, void*)>& cb,
+ const std::function<void(
+ const json_path_handler_base&, const std::string&, const void*)>& cb,
void* root,
const std::string& base) const
{
@@ -465,11 +460,11 @@ json_path_handler_base::walk(
if (this->jph_path_provider) {
this->jph_path_provider(root, local_paths);
- for (auto& lpath : local_paths) {
+ for (const auto& lpath : local_paths) {
cb(*this,
fmt::format(FMT_STRING("{}{}{}"),
base,
- lpath,
+ json_ptr::encode_str(lpath),
this->jph_children ? "/" : ""),
nullptr);
}
@@ -477,6 +472,12 @@ json_path_handler_base::walk(
local_paths.clear();
this->jph_path_provider(root, local_paths);
}
+ if (this->jph_field_getter) {
+ const auto* field = this->jph_field_getter(root, nonstd::nullopt);
+ if (field != nullptr) {
+ cb(*this, base, field);
+ }
+ }
} else {
local_paths.emplace_back(this->jph_property);
@@ -484,6 +485,7 @@ json_path_handler_base::walk(
if (this->jph_children) {
full_path += "/";
}
+
cb(*this, full_path, nullptr);
}
@@ -493,7 +495,7 @@ json_path_handler_base::walk(
static const intern_string_t POSS_SRC
= intern_string::lookup("possibilities");
- std::string full_path = base + lpath;
+ std::string full_path = base + json_ptr::encode_str(lpath);
if (this->jph_children) {
full_path += "/";
}
@@ -509,13 +511,18 @@ json_path_handler_base::walk(
static thread_local auto md
= lnav::pcre2pp::match_data::unitialized();
- std::string full_path = lpath + "/";
+ const auto short_path = json_ptr::encode_str(lpath) + "/";
- if (!this->jph_regex->capture_from(full_path)
+ if (!this->jph_regex->capture_from(short_path)
.into(md)
.matches()
.ignore_error())
{
+ log_error(
+ "path-handler regex (%s) does not match path: "
+ "%s",
+ this->jph_regex->get_pattern().c_str(),
+ full_path.c_str());
ensure(false);
}
child_root = this->jph_obj_provider(
@@ -527,7 +534,7 @@ json_path_handler_base::walk(
}
} else {
for (auto& lpath : local_paths) {
- void* field = nullptr;
+ const void* field = nullptr;
if (this->jph_field_getter) {
field = this->jph_field_getter(root, lpath);
@@ -1370,6 +1377,33 @@ json_path_handler_base::report_pattern_error(yajlpp_parse_context* ypc,
.with_help(this->get_help_text(ypc)));
}
+void
+json_path_handler_base::report_tz_error(yajlpp_parse_context* ypc,
+ const std::string& value_str,
+ const char* msg) const
+{
+ auto help_al = attr_line_t()
+ .append(lnav::roles::h2("Available time zones"))
+ .append("\n");
+
+ try {
+ for (const auto& tz : date::get_tzdb().zones) {
+ help_al.append(" ")
+ .append(lnav::roles::symbol(tz.name()))
+ .append("\n");
+ }
+ } catch (const std::runtime_error& e) {
+ log_error("unable to load timezones: %s", e.what());
+ }
+
+ ypc->report_error(lnav::console::user_message::error(
+ attr_line_t().append_quoted(value_str).append(
+ " is not a valid timezone"))
+ .with_snippet(ypc->get_snippet())
+ .with_reason(msg)
+ .with_help(help_al));
+}
+
attr_line_t
json_path_handler_base::get_help_text(const std::string& full_path) const
{
@@ -1495,6 +1529,7 @@ json_path_container::gen_schema(yajlpp_gen_context& ygc) const
void
json_path_container::gen_properties(yajlpp_gen_context& ygc) const
{
+ static const auto FWD_SLASH = lnav::pcre2pp::code::from_const(R"(\[\^/\])");
auto pattern_count = count_if(
this->jpc_children.begin(), this->jpc_children.end(), [](auto& jph) {
return jph.jph_is_pattern_property;
@@ -1524,7 +1559,10 @@ json_path_container::gen_properties(yajlpp_gen_context& ygc) const
if (!child_handler.jph_is_pattern_property) {
continue;
}
- properties.gen(child_handler.jph_property);
+
+ auto pattern = child_handler.jph_property;
+ pattern = FWD_SLASH.replace(pattern, ".");
+ properties.gen(fmt::format(FMT_STRING("^{}$"), pattern));
child_handler.gen_schema(ygc);
}
}
@@ -1572,3 +1610,17 @@ yajlpp_gen::to_string_fragment()
return string_fragment::from_bytes(buf, len);
}
+
+namespace yajlpp {
+
+auto_mem<yajl_handle_t>
+alloc_handle(const yajl_callbacks* cb, void* cu)
+{
+ auto_mem<yajl_handle_t> retval(yajl_free);
+
+ retval = yajl_alloc(cb, nullptr, cu);
+
+ return retval;
+}
+
+} // namespace yajlpp \ No newline at end of file
diff --git a/src/yajlpp/yajlpp.hh b/src/yajlpp/yajlpp.hh
index 7632329..ecf9734 100644
--- a/src/yajlpp/yajlpp.hh
+++ b/src/yajlpp/yajlpp.hh
@@ -112,6 +112,14 @@ struct factory_container : public positioned_property<std::shared_ptr<T>> {
return Err(
lnav::console::to_user_message(src, from_res.unwrapErr()));
}
+
+ std::string to_string() const
+ {
+ if (this->pp_value != nullptr) {
+ return this->pp_value->to_string();
+ }
+ return "";
+ }
};
template<typename... Args>
@@ -131,6 +139,14 @@ struct factory_container : public positioned_property<std::shared_ptr<T>> {
return Err(lnav::console::to_user_message(src, from_res.unwrapErr()));
}
+
+ std::string to_string() const
+ {
+ if (this->pp_value != nullptr) {
+ return this->pp_value->to_string();
+ }
+ return "";
+ }
};
class yajlpp_gen_context;
@@ -228,11 +244,11 @@ struct json_path_handler_base {
yajl_gen_status gen(yajlpp_gen_context& ygc, yajl_gen handle) const;
yajl_gen_status gen_schema(yajlpp_gen_context& ygc) const;
yajl_gen_status gen_schema_type(yajlpp_gen_context& ygc) const;
- void walk(
- const std::function<
- void(const json_path_handler_base&, const std::string&, void*)>& cb,
- void* root = nullptr,
- const std::string& base = "/") const;
+ void walk(const std::function<void(const json_path_handler_base&,
+ const std::string&,
+ const void*)>& cb,
+ void* root = nullptr,
+ const std::string& base = "/") const;
enum class schema_type_t : std::uint32_t {
ANY,
@@ -255,7 +271,7 @@ struct json_path_handler_base {
std::function<void(yajlpp_parse_context& ypc,
const json_path_handler_base& jph)>
jph_validator;
- std::function<void*(void* root, nonstd::optional<std::string> name)>
+ std::function<const void*(void* root, nonstd::optional<std::string> name)>
jph_field_getter;
std::function<void*(const yajlpp_provider_context& pe, void* root)>
jph_obj_provider;
@@ -283,8 +299,7 @@ struct json_path_handler_base {
std::function<int(yajlpp_parse_context*, int)> jph_bool_cb;
std::function<int(yajlpp_parse_context*, long long)> jph_integer_cb;
std::function<int(yajlpp_parse_context*, double)> jph_double_cb;
- std::function<int(
- yajlpp_parse_context*, const unsigned char* str, size_t len)>
+ std::function<int(yajlpp_parse_context*, const string_fragment& sf)>
jph_str_cb;
void validate_string(yajlpp_parse_context& ypc, string_fragment sf) const;
@@ -301,6 +316,9 @@ struct json_path_handler_base {
void report_error(yajlpp_parse_context* ypc,
const std::string& value_str,
lnav::console::user_message um) const;
+ void report_tz_error(yajlpp_parse_context* ypc,
+ const std::string& value_str,
+ const char* msg) const;
attr_line_t get_help_text(const std::string& full_path) const;
attr_line_t get_help_text(yajlpp_parse_context* ypc) const;
@@ -452,6 +470,16 @@ public:
return obj->*MEM;
}
+ void fill_in_source()
+ {
+ if (this->ypc_locations != nullptr) {
+ (*this->ypc_locations)[this->get_full_path()] = source_location{
+ this->ypc_source,
+ this->get_line_number(),
+ };
+ }
+ }
+
const intern_string_t ypc_source;
int ypc_line_number{1};
const struct json_path_container* ypc_handlers;
@@ -673,10 +701,29 @@ struct json_string {
memcpy((void*) this->js_content.in(), buf, this->js_len);
}
+ explicit json_string(auto_buffer&& buf)
+ {
+ auto buf_pair = buf.release();
+
+ this->js_content = (const unsigned char*) buf_pair.first;
+ this->js_len = buf_pair.second;
+ }
+
+ string_fragment to_string_fragment() const
+ {
+ return string_fragment::from_bytes(this->js_content, this->js_len);
+ }
+
auto_mem<const unsigned char> js_content;
size_t js_len{0};
};
void dump_schema_to(const json_path_container& jpc, const char* internals_dir);
+namespace yajlpp {
+
+auto_mem<yajl_handle_t> alloc_handle(const yajl_callbacks* cb, void* cu);
+
+} // namespace yajlpp
+
#endif
diff --git a/src/yajlpp/yajlpp_def.hh b/src/yajlpp/yajlpp_def.hh
index 22454b1..7bcb687 100644
--- a/src/yajlpp/yajlpp_def.hh
+++ b/src/yajlpp/yajlpp_def.hh
@@ -241,11 +241,13 @@ struct json_path_handler : public json_path_handler_base {
static int null_field_cb(yajlpp_parse_context* ypc)
{
+ ypc->fill_in_source();
return ypc->ypc_current_handler->jph_null_cb(ypc);
}
static int bool_field_cb(yajlpp_parse_context* ypc, int val)
{
+ ypc->fill_in_source();
return ypc->ypc_current_handler->jph_bool_cb(ypc, val);
}
@@ -253,20 +255,36 @@ struct json_path_handler : public json_path_handler_base {
const unsigned char* str,
size_t len)
{
- return ypc->ypc_current_handler->jph_str_cb(ypc, str, len);
+ ypc->fill_in_source();
+ return ypc->ypc_current_handler->jph_str_cb(
+ ypc, string_fragment::from_bytes(str, len));
}
static int int_field_cb(yajlpp_parse_context* ypc, long long val)
{
+ ypc->fill_in_source();
return ypc->ypc_current_handler->jph_integer_cb(ypc, val);
}
static int dbl_field_cb(yajlpp_parse_context* ypc, double val)
{
+ ypc->fill_in_source();
return ypc->ypc_current_handler->jph_double_cb(ypc, val);
}
template<typename T, typename U>
+ static inline U& get_field(T& input, std::shared_ptr<U>(T::*field))
+ {
+ auto& ptr = input.*field;
+
+ if (ptr.get() == nullptr) {
+ ptr = std::make_shared<U>();
+ }
+
+ return *ptr;
+ }
+
+ template<typename T, typename U>
static inline U& get_field(T& input, U(T::*field))
{
return input.*field;
@@ -366,11 +384,64 @@ struct json_path_handler : public json_path_handler_base {
};
template<typename T, typename U>
+ struct LastIsVector<std::shared_ptr<std::vector<U>> T::*> {
+ using value_type = U;
+ static constexpr bool value = true;
+ };
+
+ template<typename T, typename U>
struct LastIsVector<U T::*> {
using value_type = void;
static constexpr bool value = false;
};
+ template<typename T, typename... Args>
+ struct LastIsIntegerVector {
+ using value_type = typename LastIsIntegerVector<Args...>::value_type;
+ static constexpr bool value = LastIsIntegerVector<Args...>::value;
+ };
+
+ template<typename T, typename U>
+ struct LastIsIntegerVector<std::vector<U> T::*> {
+ using value_type = U;
+ static constexpr bool value
+ = std::is_integral<U>::value && !std::is_same<U, bool>::value;
+ };
+
+ template<typename T, typename U>
+ struct LastIsIntegerVector<U T::*> {
+ using value_type = void;
+ static constexpr bool value = false;
+ };
+
+ template<typename T, typename... Args>
+ struct LastIsMap {
+ using key_type = typename LastIsMap<Args...>::key_type;
+ using value_type = typename LastIsMap<Args...>::value_type;
+ static constexpr bool value = LastIsMap<Args...>::value;
+ };
+
+ template<typename T, typename K, typename U>
+ struct LastIsMap<std::shared_ptr<std::map<K, U>> T::*> {
+ using key_type = K;
+ using value_type = U;
+ static constexpr bool value = true;
+ };
+
+ template<typename T, typename K, typename U>
+ struct LastIsMap<std::map<K, U> T::*> {
+ using key_type = K;
+ using value_type = U;
+ static constexpr bool value = true;
+ };
+
+ template<typename T, typename U>
+ struct LastIsMap<U T::*> {
+ using key_type = void;
+ using value_type = void;
+ static constexpr bool value = false;
+ };
+
template<typename T>
static bool is_field_set(const nonstd::optional<T>& field)
{
@@ -434,15 +505,13 @@ struct json_path_handler : public json_path_handler_base {
{
this->add_cb(str_field_cb2);
this->jph_str_cb = [args...](yajlpp_parse_context* ypc,
- const unsigned char* str,
- size_t len) {
- auto obj = ypc->ypc_obj_stack.top();
- auto value_str = std::string((const char*) str, len);
- auto jph = ypc->ypc_current_handler;
+ const string_fragment& value_str) {
+ auto* obj = ypc->ypc_obj_stack.top();
+ const auto* jph = ypc->ypc_current_handler;
jph->validate_string(*ypc, value_str);
json_path_handler::get_field(obj, args...)
- .emplace_back(std::move(value_str));
+ .emplace_back(value_str.to_string());
return 1;
};
@@ -450,10 +519,33 @@ struct json_path_handler : public json_path_handler_base {
}
template<typename... Args,
+ std::enable_if_t<LastIsIntegerVector<Args...>::value, bool> = true>
+ json_path_handler& for_field(Args... args)
+ {
+ this->add_cb(int_field_cb);
+ this->jph_integer_cb
+ = [args...](yajlpp_parse_context* ypc, long long val) {
+ const auto* jph = ypc->ypc_current_handler;
+ auto* obj = ypc->ypc_obj_stack.top();
+
+ if (val < jph->jph_min_value) {
+ jph->report_min_value_error(ypc, val);
+ return 1;
+ }
+
+ json_path_handler::get_field(obj, args...).emplace_back(val);
+
+ return 1;
+ };
+ return *this;
+ }
+
+ template<typename... Args,
std::enable_if_t<LastIsVector<Args...>::value, bool> = true,
std::enable_if_t<
!std::is_same<typename LastIsVector<Args...>::value_type,
- std::string>::value,
+ std::string>::value
+ && !LastIsIntegerVector<Args...>::value,
bool>
= true>
json_path_handler& for_field(Args... args)
@@ -515,16 +607,37 @@ struct json_path_handler : public json_path_handler_base {
{
this->add_cb(str_field_cb2);
this->jph_str_cb = [args...](yajlpp_parse_context* ypc,
- const unsigned char* str,
- size_t len) {
- auto obj = ypc->ypc_obj_stack.top();
+ const string_fragment& value_str) {
+ auto* obj = ypc->ypc_obj_stack.top();
auto key = ypc->get_path_fragment(-1);
json_path_handler::get_field(obj, args...)[key]
- = std::string((const char*) str, len);
+ = value_str.to_string();
return 1;
};
+ this->jph_path_provider =
+ [args...](void* root, std::vector<std::string>& paths_out) {
+ const auto& field = json_path_handler::get_field(root, args...);
+
+ for (const auto& pair : field) {
+ paths_out.emplace_back(pair.first);
+ }
+ };
+ this->jph_field_getter
+ = [args...](void* root,
+ nonstd::optional<std::string> name) -> const void* {
+ const auto& field = json_path_handler::get_field(root, args...);
+ if (!name) {
+ return &field;
+ }
+
+ auto iter = field.find(name.value());
+ if (iter == field.end()) {
+ return nullptr;
+ }
+ return (void*) &iter->second;
+ };
this->jph_gen_callback = [args...](yajlpp_gen_context& ygc,
const json_path_handler_base& jph,
yajl_gen handle) {
@@ -555,6 +668,70 @@ struct json_path_handler : public json_path_handler_base {
}
template<typename... Args,
+ std::enable_if_t<LastIsMap<Args...>::value, bool> = true,
+ std::enable_if_t<
+ std::is_same<intern_string_t,
+ typename LastIsMap<Args...>::key_type>::value,
+ bool>
+ = true>
+ json_path_handler& for_field(Args... args)
+ {
+ this->jph_path_provider =
+ [args...](void* root, std::vector<std::string>& paths_out) {
+ const auto& field = json_path_handler::get_field(root, args...);
+
+ for (const auto& pair : field) {
+ paths_out.emplace_back(std::to_string(pair.first));
+ }
+ };
+ this->jph_obj_provider
+ = [args...](const yajlpp_provider_context& ypc, void* root) {
+ auto& field = json_path_handler::get_field(root, args...);
+
+ return &(field[ypc.get_substr_i(0)]);
+ };
+ return *this;
+ }
+
+ template<
+ typename... Args,
+ std::enable_if_t<LastIsMap<Args...>::value, bool> = true,
+ std::enable_if_t<
+ std::is_same<std::string,
+ typename LastIsMap<Args...>::key_type>::value,
+ bool>
+ = true,
+ std::enable_if_t<
+ !std::is_same<json_any_t,
+ typename LastIsMap<Args...>::value_type>::value
+ && !std::is_same<std::string,
+ typename LastIsMap<Args...>::value_type>::value
+ && !std::is_same<
+ nonstd::optional<std::string>,
+ typename LastIsMap<Args...>::value_type>::value,
+ bool>
+ = true>
+ json_path_handler& for_field(Args... args)
+ {
+ this->jph_path_provider =
+ [args...](void* root, std::vector<std::string>& paths_out) {
+ const auto& field = json_path_handler::get_field(root, args...);
+
+ for (const auto& pair : field) {
+ paths_out.emplace_back(pair.first);
+ }
+ };
+ this->jph_obj_provider
+ = [args...](const yajlpp_provider_context& ypc, void* root) {
+ auto& field = json_path_handler::get_field(root, args...);
+ auto key = ypc.get_substr(0);
+
+ return &(field[key]);
+ };
+ return *this;
+ }
+
+ template<typename... Args,
std::enable_if_t<
LastIs<std::map<std::string, nonstd::optional<std::string>>,
Args...>::value,
@@ -564,13 +741,12 @@ struct json_path_handler : public json_path_handler_base {
{
this->add_cb(str_field_cb2);
this->jph_str_cb = [args...](yajlpp_parse_context* ypc,
- const unsigned char* str,
- size_t len) {
+ const string_fragment& value_str) {
auto obj = ypc->ypc_obj_stack.top();
auto key = ypc->get_path_fragment(-1);
json_path_handler::get_field(obj, args...)[key]
- = std::string((const char*) str, len);
+ = value_str.to_string();
return 1;
};
@@ -642,13 +818,12 @@ struct json_path_handler : public json_path_handler_base {
};
this->add_cb(str_field_cb2);
this->jph_str_cb = [args...](yajlpp_parse_context* ypc,
- const unsigned char* str,
- size_t len) {
+ const string_fragment& value_str) {
auto* obj = ypc->ypc_obj_stack.top();
auto key = ypc->get_path_fragment(-1);
json_path_handler::get_field(obj, args...)[key]
- = std::string((const char*) str, len);
+ = value_str.to_string();
return 1;
};
@@ -691,14 +866,12 @@ struct json_path_handler : public json_path_handler_base {
{
this->add_cb(str_field_cb2);
this->jph_str_cb = [args...](yajlpp_parse_context* ypc,
- const unsigned char* str,
- size_t len) {
- auto obj = ypc->ypc_obj_stack.top();
- auto value_str = std::string((const char*) str, len);
- auto jph = ypc->ypc_current_handler;
+ const string_fragment& value_str) {
+ auto* obj = ypc->ypc_obj_stack.top();
+ const auto* jph = ypc->ypc_current_handler;
jph->validate_string(*ypc, value_str);
- json_path_handler::get_field(obj, args...) = std::move(value_str);
+ json_path_handler::get_field(obj, args...) = value_str.to_string();
return 1;
};
@@ -738,23 +911,22 @@ struct json_path_handler : public json_path_handler_base {
{
this->add_cb(str_field_cb2);
this->jph_str_cb = [args...](yajlpp_parse_context* ypc,
- const unsigned char* str,
- size_t len) {
- auto obj = ypc->ypc_obj_stack.top();
- auto jph = ypc->ypc_current_handler;
+ const string_fragment& value_str) {
+ auto* obj = ypc->ypc_obj_stack.top();
+ const auto* jph = ypc->ypc_current_handler;
date_time_scanner dts;
timeval tv{};
exttm tm;
- if (dts.scan((char*) str, len, nullptr, &tm, tv) == nullptr) {
- ypc->report_error(
- lnav::console::user_message::error(
- attr_line_t("unrecognized timestamp ")
- .append_quoted(
- string_fragment::from_bytes(str, len)))
- .with_snippet(ypc->get_snippet())
- .with_help(jph->get_help_text(ypc)));
+ if (dts.scan(value_str.data(), value_str.length(), nullptr, &tm, tv)
+ == nullptr)
+ {
+ ypc->report_error(lnav::console::user_message::error(
+ attr_line_t("unrecognized timestamp ")
+ .append_quoted(value_str))
+ .with_snippet(ypc->get_snippet())
+ .with_help(jph->get_help_text(ypc)));
} else {
json_path_handler::get_field(obj, args...) = tv;
}
@@ -804,14 +976,20 @@ struct json_path_handler : public json_path_handler_base {
{
this->add_cb(str_field_cb2);
this->jph_str_cb = [args...](yajlpp_parse_context* ypc,
- const unsigned char* str,
- size_t len) {
- auto obj = ypc->ypc_obj_stack.top();
- auto value_str = std::string((const char*) str, len);
- auto jph = ypc->ypc_current_handler;
+ const string_fragment& value_str) {
+ auto* obj = ypc->ypc_obj_stack.top();
+ const auto* jph = ypc->ypc_current_handler;
jph->validate_string(*ypc, value_str);
- json_path_handler::get_field(obj, args...) = std::move(value_str);
+ json_path_handler::get_field(obj, args...) = value_str.to_string();
+
+ return 1;
+ };
+ this->add_cb(null_field_cb);
+ this->jph_null_cb = [args...](yajlpp_parse_context* ypc) {
+ auto* obj = ypc->ypc_obj_stack.top();
+
+ json_path_handler::get_field(obj, args...) = nonstd::nullopt;
return 1;
};
@@ -858,11 +1036,9 @@ struct json_path_handler : public json_path_handler_base {
{
this->add_cb(str_field_cb2);
this->jph_str_cb = [args...](yajlpp_parse_context* ypc,
- const unsigned char* str,
- size_t len) {
- auto obj = ypc->ypc_obj_stack.top();
- auto value_str = std::string((const char*) str, len);
- auto jph = ypc->ypc_current_handler;
+ const string_fragment& value_str) {
+ auto* obj = ypc->ypc_obj_stack.top();
+ const auto* jph = ypc->ypc_current_handler;
jph->validate_string(*ypc, value_str);
auto& field = json_path_handler::get_field(obj, args...);
@@ -870,7 +1046,7 @@ struct json_path_handler : public json_path_handler_base {
field.pp_path = ypc->get_full_path();
field.pp_location.sl_source = ypc->ypc_source;
field.pp_location.sl_line_number = ypc->get_line_number();
- field.pp_value = std::move(value_str);
+ field.pp_value = value_str.to_string();
return 1;
};
@@ -897,6 +1073,10 @@ struct json_path_handler : public json_path_handler_base {
return gen(field.pp_value);
};
+ this->jph_field_getter
+ = [args...](void* root, nonstd::optional<std::string> name) {
+ return (void*) &json_path_handler::get_field(root, args...);
+ };
return *this;
}
@@ -907,11 +1087,9 @@ struct json_path_handler : public json_path_handler_base {
{
this->add_cb(str_field_cb2);
this->jph_str_cb = [args...](yajlpp_parse_context* ypc,
- const unsigned char* str,
- size_t len) {
- auto obj = ypc->ypc_obj_stack.top();
- auto value_str = std::string((const char*) str, len);
- auto jph = ypc->ypc_current_handler;
+ const string_fragment& value_str) {
+ auto* obj = ypc->ypc_obj_stack.top();
+ const auto* jph = ypc->ypc_current_handler;
jph->validate_string(*ypc, value_str);
json_path_handler::get_field(obj, args...)
@@ -945,6 +1123,60 @@ struct json_path_handler : public json_path_handler_base {
return *this;
}
+ template<
+ typename... Args,
+ std::enable_if_t<
+ LastIs<positioned_property<const date::time_zone*>, Args...>::value,
+ bool>
+ = true>
+ json_path_handler& for_field(Args... args)
+ {
+ this->add_cb(str_field_cb2);
+ this->jph_str_cb = [args...](yajlpp_parse_context* ypc,
+ const string_fragment& value_str) {
+ auto* obj = ypc->ypc_obj_stack.top();
+ const auto* jph = ypc->ypc_current_handler;
+
+ try {
+ const auto* tz
+ = date::get_tzdb().locate_zone(value_str.to_string());
+ auto& field = json_path_handler::get_field(obj, args...);
+ field.pp_path = ypc->get_full_path();
+ field.pp_location.sl_source = ypc->ypc_source;
+ field.pp_location.sl_line_number = ypc->get_line_number();
+ field.pp_value = tz;
+ } catch (const std::runtime_error& e) {
+ jph->report_tz_error(ypc, value_str.to_string(), e.what());
+ }
+
+ return 1;
+ };
+ this->jph_gen_callback = [args...](yajlpp_gen_context& ygc,
+ const json_path_handler_base& jph,
+ yajl_gen handle) {
+ const auto& field = json_path_handler::get_field(
+ ygc.ygc_obj_stack.top(), args...);
+
+ if (!ygc.ygc_default_stack.empty()) {
+ const auto& field_def = json_path_handler::get_field(
+ ygc.ygc_default_stack.top(), args...);
+
+ if (field.pp_value == field_def.pp_value) {
+ return yajl_gen_status_ok;
+ }
+ }
+
+ if (ygc.ygc_depth) {
+ yajl_gen_string(handle, jph.jph_property);
+ }
+
+ yajlpp_generator gen(handle);
+
+ return gen(field.pp_value->name());
+ };
+ return *this;
+ }
+
template<typename... Args,
std::enable_if_t<
LastIs<positioned_property<intern_string_t>, Args...>::value,
@@ -954,11 +1186,9 @@ struct json_path_handler : public json_path_handler_base {
{
this->add_cb(str_field_cb2);
this->jph_str_cb = [args...](yajlpp_parse_context* ypc,
- const unsigned char* str,
- size_t len) {
- auto obj = ypc->ypc_obj_stack.top();
- auto value_str = std::string((const char*) str, len);
- auto jph = ypc->ypc_current_handler;
+ const string_fragment& value_str) {
+ auto* obj = ypc->ypc_obj_stack.top();
+ const auto* jph = ypc->ypc_current_handler;
jph->validate_string(*ypc, value_str);
auto& field = json_path_handler::get_field(obj, args...);
@@ -997,7 +1227,7 @@ struct json_path_handler : public json_path_handler_base {
template<typename>
struct int_ {
- typedef int type;
+ using type = int;
};
template<
typename C,
@@ -1009,11 +1239,10 @@ struct json_path_handler : public json_path_handler_base {
json_path_handler& for_field(Args... args, T C::*ptr_arg)
{
this->add_cb(str_field_cb2);
- this->jph_str_cb = [args..., ptr_arg](yajlpp_parse_context* ypc,
- const unsigned char* str,
- size_t len) {
+ this->jph_str_cb = [args..., ptr_arg](
+ yajlpp_parse_context* ypc,
+ const string_fragment& value_frag) {
auto* obj = ypc->ypc_obj_stack.top();
- auto value_frag = string_fragment::from_bytes(str, len);
const auto* jph = ypc->ypc_current_handler;
auto loc = source_location{ypc->ypc_source, ypc->get_line_number()};
@@ -1028,6 +1257,30 @@ struct json_path_handler : public json_path_handler_base {
return 1;
};
+ this->jph_gen_callback
+ = [args..., ptr_arg](yajlpp_gen_context& ygc,
+ const json_path_handler_base& jph,
+ yajl_gen handle) {
+ const auto& field = json_path_handler::get_field(
+ ygc.ygc_obj_stack.top(), args..., ptr_arg);
+
+ if (!ygc.ygc_default_stack.empty()) {
+ const auto& field_def = json_path_handler::get_field(
+ ygc.ygc_default_stack.top(), args..., ptr_arg);
+
+ if (field.pp_value == field_def.pp_value) {
+ return yajl_gen_status_ok;
+ }
+ }
+
+ if (ygc.ygc_depth) {
+ yajl_gen_string(handle, jph.jph_property);
+ }
+
+ yajlpp_generator gen(handle);
+
+ return gen(field.to_string());
+ };
return *this;
}
@@ -1038,7 +1291,7 @@ struct json_path_handler : public json_path_handler_base {
this->add_cb(int_field_cb);
this->jph_integer_cb
= [args...](yajlpp_parse_context* ypc, long long val) {
- auto jph = ypc->ypc_current_handler;
+ const auto* jph = ypc->ypc_current_handler;
auto* obj = ypc->ypc_obj_stack.top();
if (val < jph->jph_min_value) {
@@ -1091,7 +1344,7 @@ struct json_path_handler : public json_path_handler_base {
{
this->add_cb(dbl_field_cb);
this->jph_double_cb = [args...](yajlpp_parse_context* ypc, double val) {
- auto jph = ypc->ypc_current_handler;
+ const auto* jph = ypc->ypc_current_handler;
auto* obj = ypc->ypc_obj_stack.top();
if (val < jph->jph_min_value) {
@@ -1146,18 +1399,16 @@ struct json_path_handler : public json_path_handler_base {
{
this->add_cb(str_field_cb2);
this->jph_str_cb = [args...](yajlpp_parse_context* ypc,
- const unsigned char* str,
- size_t len) {
- auto obj = ypc->ypc_obj_stack.top();
- auto handler = ypc->ypc_current_handler;
- auto parse_res = relative_time::from_str(
- string_fragment::from_bytes(str, len));
+ const string_fragment& value_str) {
+ auto* obj = ypc->ypc_obj_stack.top();
+ const auto* handler = ypc->ypc_current_handler;
+ auto parse_res = relative_time::from_str(value_str);
if (parse_res.isErr()) {
auto parse_error = parse_res.unwrapErr();
- auto value_str = std::string((const char*) str, len);
- handler->report_duration_error(ypc, value_str, parse_error);
+ handler->report_duration_error(
+ ypc, value_str.to_string(), parse_error);
return 1;
}
@@ -1204,18 +1455,16 @@ struct json_path_handler : public json_path_handler_base {
{
this->add_cb(str_field_cb2);
this->jph_str_cb = [args...](yajlpp_parse_context* ypc,
- const unsigned char* str,
- size_t len) {
- auto obj = ypc->ypc_obj_stack.top();
- auto handler = ypc->ypc_current_handler;
- auto res = handler->to_enum_value(string_fragment(str, 0, len));
+ const string_fragment& value_str) {
+ auto* obj = ypc->ypc_obj_stack.top();
+ const auto* handler = ypc->ypc_current_handler;
+ auto res = handler->to_enum_value(value_str);
if (res) {
json_path_handler::get_field(obj, args...)
= (typename LastIsEnum<Args...>::value_type) res.value();
} else {
- handler->report_enum_error(ypc,
- std::string((const char*) str, len));
+ handler->report_enum_error(ypc, value_str.to_string());
}
return 1;
@@ -1325,11 +1574,34 @@ public:
return *this;
}
+ Result<void, std::vector<lnav::console::user_message>> consume(
+ const string_fragment& json)
+ {
+ if (this->yp_parse_context.parse(json) == yajl_status_ok) {
+ if (this->yp_errors.empty()) {
+ return Ok();
+ }
+ }
+
+ return Err(std::move(this->yp_errors));
+ }
+
+ Result<T, std::vector<lnav::console::user_message>> complete()
+ {
+ if (this->yp_parse_context.complete_parse() == yajl_status_ok) {
+ return Ok(std::move(this->yp_obj));
+ }
+
+ return Err(std::move(this->yp_errors));
+ }
+
Result<T, std::vector<lnav::console::user_message>> of(
const string_fragment& json)
{
if (this->yp_parse_context.parse_doc(json)) {
- return Ok(std::move(this->yp_obj));
+ if (this->yp_errors.empty()) {
+ return Ok(std::move(this->yp_obj));
+ }
}
return Err(std::move(this->yp_errors));
@@ -1343,6 +1615,34 @@ private:
};
template<typename T>
+struct typed_json_path_container;
+
+template<typename T>
+struct yajlpp_formatter {
+ const T& yf_obj;
+ const typed_json_path_container<T>& yf_container;
+ yajlpp_gen yf_gen;
+
+ template<typename... Args>
+ yajlpp_formatter<T> with_config(Args... args) &&
+ {
+ yajl_gen_config(this->yf_gen.get_handle(), args...);
+
+ return std::move(*this);
+ }
+
+ std::string to_string() &&
+ {
+ yajlpp_gen_context ygc(this->yf_gen, this->yf_container);
+ ygc.template with_obj(this->yf_obj);
+ ygc.ygc_depth = 1;
+ ygc.gen();
+
+ return this->yf_gen.to_string_fragment().to_string();
+ }
+};
+
+template<typename T>
struct typed_json_path_container : public json_path_container {
typed_json_path_container(std::initializer_list<json_path_handler> children)
: json_path_container(children)
@@ -1366,6 +1666,11 @@ struct typed_json_path_container : public json_path_container {
return yajlpp_parser<T>{src, this};
}
+ yajlpp_formatter<T> formatter_for(const T& obj) const
+ {
+ return yajlpp_formatter<T>{obj, *this};
+ }
+
std::string to_string(const T& obj) const
{
yajlpp_gen gen;
diff --git a/src/yaml-extension-functions.cc b/src/yaml-extension-functions.cc
index 0a58652..e19af49 100644
--- a/src/yaml-extension-functions.cc
+++ b/src/yaml-extension-functions.cc
@@ -36,7 +36,7 @@
#include "ryml_all.hpp"
#include "sqlite-extension-func.hh"
#include "vtab_module.hh"
-#include "yajlpp/yajlpp.hh"
+#include "vtab_module_json.hh"
using namespace lnav::roles::literals;
@@ -57,7 +57,7 @@ ryml_error_to_um(const char* msg, size_t len, ryml::Location loc, void* ud)
source_location{src, (int32_t) loc.line}, ""));
}
-static text_auto_buffer
+static json_string
yaml_to_json(string_fragment in)
{
ryml::Callbacks callbacks(&in, nullptr, nullptr, ryml_error_to_um);
@@ -75,7 +75,7 @@ yaml_to_json(string_fragment in)
ryml::substr(buf.in(), buf.size()),
/*error_on_excess*/ true);
- return {std::move(buf)};
+ return json_string{std::move(buf)};
}
int
@@ -87,6 +87,7 @@ yaml_extension_functions(struct FuncDef** basic_funcs,
help_text("yaml_to_json",
"Convert a YAML document to a JSON-encoded string")
.sql_function()
+ .with_prql_path({"yaml", "to_json"})
.with_parameter({"yaml", "The YAML value to convert to JSON."})
.with_tags({"json", "yaml"})
.with_example({
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index df39caa..fc5fc38 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -2,6 +2,7 @@ enable_testing()
include_directories(
. ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/src/fmtlib
+ ${CMAKE_SOURCE_DIR}/src/third-party/date/include
${CMAKE_CURRENT_BINARY_DIR}/../src ${CMAKE_CURRENT_BINARY_DIR})
add_executable(test_abbrev test_abbrev.cc test_stubs.cc)
@@ -35,7 +36,8 @@ target_link_libraries(test_bookmarks diag)
add_test(NAME test_bookmarks COMMAND test_bookmarks)
add_executable(test_date_time_scanner test_date_time_scanner.cc)
-target_link_libraries(test_date_time_scanner base lnavdt)
+target_include_directories(test_date_time_scanner PUBLIC ../src/third-party/doctest-root)
+target_link_libraries(test_date_time_scanner base lnavdt diag)
add_test(NAME test_date_time_scanner COMMAND test_date_time_scanner)
add_executable(test_grep_proc2 test_grep_proc2.cc)
@@ -84,5 +86,8 @@ target_link_libraries(drive_sql_anno diag)
add_executable(drive_data_scanner drive_data_scanner.cc test_stubs.cc)
target_link_libraries(drive_data_scanner diag logfmt)
+add_executable(drive_doc_discovery drive_doc_discovery.cc test_stubs.cc)
+target_link_libraries(drive_doc_discovery diag logfmt)
+
add_executable(scripty scripty.cc test_stubs.cc)
target_link_libraries(scripty diag)
diff --git a/test/Makefile.am b/test/Makefile.am
index a92ceb8..f7d83f7 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -12,17 +12,29 @@ AM_LIBS = $(CODE_COVERAGE_LIBS)
AM_CFLAGS = $(CODE_COVERAGE_CFLAGS)
AM_CXXFLAGS = $(CODE_COVERAGE_CXXFLAGS)
+if HAVE_CARGO
+RUST_DEPS_CPPFLAGS = -I$(top_srcdir)/src/third-party/prqlc-c -DHAVE_RUST_DEPS=1
+PRQLC_DIR = ../src/third-party/prqlc-c/target
+RUST_DEPS_LIBS = $(PRQLC_DIR)/release/libprqlc_c.a
+else
+RUST_DEPS =
+RUST_DEPS_CPPFLAGS =
+RUST_DEPS_LIBS =
+endif
+
AM_CPPFLAGS = \
-Wall \
-I$(top_srcdir)/src \
-I$(top_srcdir)/src/fmtlib \
-I$(top_srcdir)/src/third-party \
+ -I$(top_srcdir)/src/third-party/date/include \
-I$(top_srcdir)/src/third-party/scnlib/include \
$(CODE_COVERAGE_CPPFLAGS) \
$(LIBARCHIVE_CFLAGS) \
$(READLINE_CFLAGS) \
$(PCRE_CFLAGS) \
- $(SQLITE3_CFLAGS)
+ $(SQLITE3_CFLAGS) \
+ $(RUST_DEPS_CPPFLAGS)
# AM_CFLAGS = -fprofile-arcs -ftest-coverage
# AM_CXXFLAGS = -fprofile-arcs -ftest-coverage
@@ -51,6 +63,7 @@ DUMMY_OBJS = \
check_PROGRAMS = \
drive_data_scanner \
+ drive_doc_discovery \
drive_line_buffer \
drive_grep_proc \
drive_listview \
@@ -113,13 +126,15 @@ LDADD = \
$(top_builddir)/src/base/libbase.a \
$(top_builddir)/src/pugixml/libpugixml.a \
$(top_builddir)/src/third-party/base64/lib/libbase64.a \
+ $(top_builddir)/src/third-party/date/src/libdatepp.a \
$(top_builddir)/src/third-party/scnlib/src/libscnlib.a \
$(READLINE_LIBS) \
$(CURSES_LIB) \
$(LIBARCHIVE_LIBS) \
$(SQLITE3_LIBS) \
$(PCRE_LIBS) \
- $(LIBCURL)
+ $(LIBCURL) \
+ $(RUST_DEPS_LIBS)
test_ansi_scrubber_SOURCES = test_ansi_scrubber.cc
@@ -162,6 +177,9 @@ drive_shlexer_SOURCES = drive_shlexer.cc
drive_data_scanner_SOURCES = \
drive_data_scanner.cc
+drive_doc_discovery_SOURCES = \
+ drive_doc_discovery.cc
+
drive_mvwattrline_SOURCES = drive_mvwattrline.cc
drive_view_colors_SOURCES = drive_view_colors.cc
@@ -188,6 +206,7 @@ dist_noinst_SCRIPTS = \
test_events.sh \
test_format_installer.sh \
test_format_loader.sh \
+ test_gantt.sh \
test_grep_proc.sh \
test_json_format.sh \
test_line_buffer.sh \
@@ -195,6 +214,7 @@ dist_noinst_SCRIPTS = \
test_logfile.sh \
test_meta.sh \
test_mvwattrline.sh \
+ test_prql.sh \
test_regex101.sh \
test_remote.sh \
test_scripts.sh \
@@ -226,7 +246,10 @@ dist_noinst_DATA = \
expected/test_tailer.sh_12f539e535df04364316699f9edeac461aa9f9de.err \
expected/test_tailer.sh_12f539e535df04364316699f9edeac461aa9f9de.out \
ansi-colors.0.in \
+ bad-config/formats/invalid-file-format/format.json \
bad-config/formats/invalid-json-format/format.json \
+ bad-config/formats/invalid-name/format.json \
+ bad-config/formats/invalid-no-tscap/format.json \
bad-config/formats/invalid-properties/format.json \
bad-config/formats/invalid-regex/format.json \
bad-config/formats/invalid-sample/format.json \
@@ -235,12 +258,15 @@ dist_noinst_DATA = \
bad-config/formats/invalid-sql/init2.sql \
bad-config/formats/no-regexes/format.json \
bad-config/formats/no-samples/format.json \
+ bad-config2/configs/invalid-annotation/config.json \
+ bad-config2/configs/invalid-theme/config.json \
bad-config2/formats/invalid-config/config.json \
bad-config2/formats/invalid-config/config.bad-schema.json \
bad-config2/formats/invalid-config/config.malformed.json \
bad-config2/formats/invalid-config/config.truncated.json \
bad-config-json/formats/invalid-json/format.json \
bad-config-json/formats/invalid-key/format.json \
+ books.json \
books.xml \
file_for_dot_read.sql \
datafile_simple.0 \
@@ -269,7 +295,11 @@ dist_noinst_DATA = \
datafile_xml.0 \
dhcp.pcapng \
dhcp-trunc.pcapng \
+ example.patch \
+ example.toml \
expected_help.txt \
+ gharchive_log.jsonl \
+ invalid-books.xml \
listview_output.0 \
listview_output.1 \
listview_output.2 \
@@ -324,10 +354,13 @@ dist_noinst_DATA = \
logfile_logfmt.0 \
logfile_multiline.0 \
logfile_nested_json.json \
+ logfile_nextcloud.0 \
logfile_openam.0 \
+ logfile_partitions.0 \
logfile_plain.0 \
logfile_pretty.0 \
logfile_procstate.0 \
+ logfile_regexp_access_log.0 \
logfile_rollover.0 \
logfile_rollover.1 \
logfile_strace_log.0 \
@@ -357,15 +390,20 @@ dist_noinst_DATA = \
logfile_w3c.6 \
logfile_w3c_big.0 \
logfile_with_a_really_long_name_to_test_a_bug_with_long_names.0 \
+ logfile_with_zones.0 \
logfile_xml_msg.0 \
+ man_echo.txt \
multiline.lnav \
- nested.lnav \
mvwattrline_output.0 \
+ nested.lnav \
+ pyfile_0.py \
textfile_0.md \
textfile_ansi.0 \
textfile_ansi_expanding.0 \
textfile_json_indented.0 \
textfile_json_one_line.0 \
+ textfile_nonl.txt \
+ textfile_plain.0 \
textfile_quoted_json.0 \
toplevel.lnav \
UTF-8-test.txt \
@@ -375,6 +413,10 @@ dist_noinst_DATA = \
vt52_curses_output.0 \
vt52_curses_output.1 \
xpath_tui.0 \
+ configs/installed/anno-test.json \
+ configs/installed/anno-test.sh \
+ configs/installed/hw-url-handler.json \
+ configs/installed/hw-url-handler.lnav \
formats/collision/format.json \
formats/customlevel/format.json \
formats/jsontest/format.json \
@@ -384,15 +426,41 @@ dist_noinst_DATA = \
formats/jsontest3/format.json \
formats/jsontest-subsec/format.json \
formats/nestedjson/format.json \
+ formats/partitions/format.json \
formats/scripts/multiline-echo.lnav \
formats/scripts/redirecting.lnav \
formats/scripts/nested-redirecting.lnav \
formats/sqldir/init.sql \
formats/timestamp/format.json \
formats/xmlmsg/format.json \
- log-samples/sample-27353a72ba4025448f261dcfa6ea16e474187795.txt \
- log-samples/sample-70c906b3c1a1cf03f15bde92ee78edfa6f9b7960.txt \
- log-samples/sample-ad31f12d2adabd07e3ddda3ad5b0dbf6b49c4c99.txt \
+ log-samples/sample-057d6c669632ef9d07b6adec605f6bdeae19af27.txt \
+ log-samples/sample-06aaa6f48a801f592558575d886864d6c3ab9ed4.txt \
+ log-samples/sample-1aeb47c0a97d19bb7418f0172480e05e49c6e53e.txt \
+ log-samples/sample-27353a72ba4025448f261dcfa6ea16e474187795.txt \
+ log-samples/sample-3856ad0f551a04fde41a020158d6b33ef97c870a.txt \
+ log-samples/sample-45364b3fd51af92a4ad8a309b5f4fd88.txt \
+ log-samples/sample-500c9e492e04f5f58862c8086ca301de0dd976ce.txt \
+ log-samples/sample-55ac97afae4b0650ccb62e2dbc8d89bb.txt \
+ log-samples/sample-6049d4309f26eefb1a3406d937a9ba8a0df592a7.txt \
+ log-samples/sample-62315d884afdc4155b35f905415c74bfcfd39fc2.txt \
+ log-samples/sample-70c906b3c1a1cf03f15bde92ee78edfa6f9b7960.txt \
+ log-samples/sample-9cf7fbb3546c676c686fac0ed096d026f46c875f.txt \
+ log-samples/sample-a74570613c082c7fe283672031e18e54e8887ffb.txt \
+ log-samples/sample-aca2878a2e50779c6697c0747ab1f60e4b368dcb.txt \
+ log-samples/sample-ad31f12d2adabd07e3ddda3ad5b0dbf6b49c4c99.txt \
+ log-samples/sample-bc6f6cf689fa5455616b4d9fbe121a48d3c9de59.txt \
+ log-samples/sample-c15acd32844669d23d0cbc88ec548129ed2c592e.txt \
+ log-samples/sample-c23f22c1b932b904203e018f78dead95fb89b15d.txt \
+ log-samples/sample-d0d6b3fc6766caac5ac3fac4a3754ceaab785eb8.txt \
+ log-samples/sample-d4a0aedc8350f64b22403eeef4eca71fbf749d2b.txt \
+ log-samples/sample-d714b5e8cd354321f376ed1c0a70ec9a2f58076d.txt \
+ log-samples/sample-dd7d406352ec6a11d966b6f015a9482b060f2b29.txt \
+ log-samples/sample-e779d1771e34f5203ae73e85802e78002be63db6.txt \
+ log-samples/sample-eef32793daf841a576d8a5cd27239d5d.txt \
+ log-samples/sample-f2fba0d0b1e57f9a707ea96a8a4efcdc.txt \
+ log-samples/sample-f5afbee90a8c054061c4e9ffe673293cce7761de.txt \
+ log-samples/sample-fc8923633e57bacd641d80dde3ff878212230552.txt \
+ naughty_files.py \
remote-log-dir/logfile_access_log.0 \
remote-log-dir/logfile_access_log.1 \
tui-captures/tui_echo.0 \
@@ -415,6 +483,7 @@ TESTS = \
test_listview.sh \
test_meta.sh \
test_mvwattrline.sh \
+ test_gantt.sh \
test_grep_proc.sh \
test_grep_proc2 \
test_json_format.sh \
@@ -445,6 +514,10 @@ TESTS = \
test_view_colors.sh \
test_vt52_curses.sh
+if HAVE_CARGO
+TESTS += test_prql.sh
+endif
+
DISABLED_TESTS = \
test_regex101.sh \
test_remote.sh \
@@ -507,8 +580,12 @@ distclean-local:
$(RM_V)rm -rf remote remote-tmp not:a:remote:dir
$(RM_V)rm -rf sessions
$(RM_V)rm -rf tmp
+ $(RM_V)rm -rf piper-tmp
$(RM_V)rm -rf rotmp
$(RM_V)rm -rf meta-sessions
+ $(RM_V)rm -rf mgmt-config
+ $(RM_V)rm -rf naughty
+ $(RM_V)rm -rf piper-config
$(RM_V)rm -rf nested
$(RM_V)rm -rf test-config
$(RM_V)rm -rf .lnav
diff --git a/test/bad-config/formats/invalid-file-format/format.json b/test/bad-config/formats/invalid-file-format/format.json
new file mode 100644
index 0000000..cca2b47
--- /dev/null
+++ b/test/bad-config/formats/invalid-file-format/format.json
@@ -0,0 +1,27 @@
+{
+ "$schema": "https://lnav.org/schemas/format-v1.schema.json",
+ "bad_file_format1": {
+ "title": "bad file format",
+ "regex": {
+ "std": {
+ "pattern": "(?<timestamp>\\d+): (?<body>.*)$"
+ }
+ },
+ "converter": {
+ "header": {
+ "expr": {
+ "default": ":header REGEXP 'foobar"
+ },
+ "size": 8
+ }
+ },
+ "timestamp-format": [
+ "%i"
+ ],
+ "sample": [
+ {
+ "line": "1234: abcd"
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/test/bad-config/formats/invalid-no-tscap/format.json b/test/bad-config/formats/invalid-no-tscap/format.json
new file mode 100644
index 0000000..5e8eb14
--- /dev/null
+++ b/test/bad-config/formats/invalid-no-tscap/format.json
@@ -0,0 +1,32 @@
+{
+ "$schema": "https://lnav.org/schemas/format-v1.schema.json",
+ "no_tscap_log": {
+ "title": "Sample with no captured timestamp",
+ "multiline": true,
+ "ordered-by-time": false,
+ "regex": {
+ "std": {
+ "pattern": "^(?<container>[\\w-]+)\\s+\\|( (?<timestamp>\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{9}[+-]\\d{2}:\\d{2}))?( (?<body>.*))?$"
+ }
+ },
+ "level-field": "timestamp",
+ "module-field": "container",
+ "value": {
+ "container": {
+ "kind": "string",
+ "identifier": true
+ }
+ },
+ "sample": [
+ {
+ "line": "gitea | 2023-09-24T22:15:55.346526305+02:00 2023/09/24 22:15:55 cmd/web.go:223:runWeb() [I] Starting Gitea on PID: 7"
+ },
+ {
+ "line": "gitea | 2023/09/24 22:15:55 cmd/web.go:223:runWeb() [I] Starting Gitea on PID: 7"
+ },
+ {
+ "line": "gitea-db-1 | 2023-09-24T22:15:37.981051393+02:00 [migrations] started"
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/test/bad-config2/configs/invalid-annotation/config.json b/test/bad-config2/configs/invalid-annotation/config.json
new file mode 100644
index 0000000..9fae7de
--- /dev/null
+++ b/test/bad-config2/configs/invalid-annotation/config.json
@@ -0,0 +1,14 @@
+{
+ "$schema": "https://lnav.org/schemas/config-v1.schema.json",
+ "log": {
+ "annotations": {
+ "org.lnav.test.no-handler": {
+ "description": "annotation without a handler"
+ },
+ "org.lnav.test.no-condition": {
+ "description": "annotation without a condition",
+ "handler": "my-handler"
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/test/bad-config2/configs/invalid-theme/config.json b/test/bad-config2/configs/invalid-theme/config.json
new file mode 100644
index 0000000..cfbeda5
--- /dev/null
+++ b/test/bad-config2/configs/invalid-theme/config.json
@@ -0,0 +1,20 @@
+{
+ "$schema": "https://lnav.org/schemas/config-v1.schema.json",
+ "ui": {
+ "theme-defs": {
+ "invalid-theme": {
+ "styles": {
+ "text": {
+ "color": "InvalidColor",
+ "bad-property": "abc"
+ }
+ },
+ "highlights": {
+ "foobar": {
+ "pattern": "abc("
+ }
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/test/books.json b/test/books.json
new file mode 100644
index 0000000..c885559
--- /dev/null
+++ b/test/books.json
@@ -0,0 +1,14 @@
+{
+ "catalog": [
+ {
+ "author": "Gambardella, Matthew",
+ "title": "XML Developer's Guide",
+ "description": "An in-depth look at creating applications with XML."
+ },
+ {
+ "author": "Ralls, Kim",
+ "title": "Midnight Rain",
+ "description": "A former architect battles corporate zombies, an evil sorceress, and her own childhood to become queen of the world."
+ }
+ ]
+} \ No newline at end of file
diff --git a/test/books.xml b/test/books.xml
index 19c4f73..62158fa 100644
--- a/test/books.xml
+++ b/test/books.xml
@@ -1,5 +1,8 @@
<?xml version="1.0"?>
<catalog>
+ <!--
+ - A comment for testing.
+ -->
<book id="bk101">
<author>Gambardella, Matthew</author>
<title>XML Developer's Guide</title>
@@ -7,7 +10,8 @@
<price>44.95</price>
<publish_date>2000-10-01</publish_date>
<description>An in-depth look at creating applications
- with XML.</description>
+ with XML.
+ </description>
</book>
<book id="bk102">
<author>Ralls, Kim</author>
@@ -17,7 +21,8 @@
<publish_date>2000-12-16</publish_date>
<description>A former architect battles corporate zombies,
an evil sorceress, and her own childhood to become queen
- of the world.</description>
+ of the world.
+ </description>
</book>
<book id="bk103">
<author>Corets, Eva</author>
@@ -27,7 +32,8 @@
<publish_date>2000-11-17</publish_date>
<description>After the collapse of a nanotechnology
society in England, the young survivors lay the
- foundation for a new society.</description>
+ foundation for a new society.
+ </description>
</book>
<book id="bk104">
<author>Corets, Eva</author>
@@ -38,7 +44,8 @@
<description>In post-apocalypse England, the mysterious
agent known only as Oberon helps to create a new life
for the inhabitants of London. Sequel to Maeve
- Ascendant.</description>
+ Ascendant.
+ </description>
</book>
<book id="bk105">
<author>Corets, Eva</author>
@@ -48,7 +55,8 @@
<publish_date>2001-09-10</publish_date>
<description>The two daughters of Maeve, half-sisters,
battle one another for control of England. Sequel to
- Oberon's Legacy.</description>
+ Oberon's Legacy.
+ </description>
</book>
<book id="bk106">
<author>Randall, Cynthia</author>
@@ -57,7 +65,8 @@
<price>4.95</price>
<publish_date>2000-09-02</publish_date>
<description>When Carla meets Paul at an ornithology
- conference, tempers fly as feathers get ruffled.</description>
+ conference, tempers fly as feathers get ruffled.
+ </description>
</book>
<book id="bk107">
<author>Thurman, Paula</author>
@@ -66,7 +75,8 @@
<price>4.95</price>
<publish_date>2000-11-02</publish_date>
<description>A deep sea diver finds true love twenty
- thousand leagues beneath the sea.</description>
+ thousand leagues beneath the sea.
+ </description>
</book>
<book id="bk108">
<author>Knorr, Stefan</author>
@@ -75,7 +85,8 @@
<price>4.95</price>
<publish_date>2000-12-06</publish_date>
<description>An anthology of horror stories about roaches,
- centipedes, scorpions and other insects.</description>
+ centipedes, scorpions and other insects.
+ </description>
</book>
<book id="bk109">
<author>Kress, Peter</author>
@@ -85,7 +96,8 @@
<publish_date>2000-11-02</publish_date>
<description>After an inadvertant trip through a Heisenberg
Uncertainty Device, James Salway discovers the problems
- of being quantum.</description>
+ of being quantum.
+ </description>
</book>
<book id="bk110">
<author>O'Brien, Tim</author>
@@ -94,7 +106,8 @@
<price>36.95</price>
<publish_date>2000-12-09</publish_date>
<description>Microsoft's .NET initiative is explored in
- detail in this deep programmer's reference.</description>
+ detail in this deep programmer's reference.
+ </description>
</book>
<book id="bk111">
<author>O'Brien, Tim</author>
@@ -104,7 +117,8 @@
<publish_date>2000-12-01</publish_date>
<description>The Microsoft MSXML3 parser is covered in
detail, with attention to XML DOM interfaces, XSLT processing,
- SAX and more.</description>
+ SAX and more.
+ </description>
</book>
<book id="bk112">
<author>Galos, Mike</author>
@@ -115,6 +129,7 @@
<description>Microsoft Visual Studio 7 is explored in depth,
looking at how Visual Basic, Visual C++, C#, and ASP+ are
integrated into a comprehensive development
- environment.</description>
+ environment.
+ </description>
</book>
</catalog>
diff --git a/test/configs/installed/anno-test.json b/test/configs/installed/anno-test.json
new file mode 100644
index 0000000..24806c5
--- /dev/null
+++ b/test/configs/installed/anno-test.json
@@ -0,0 +1,12 @@
+{
+ "$schema": "https://lnav.org/schemas/config-v1.schema.json",
+ "log": {
+ "annotations": {
+ "org.lnav.test": {
+ "description": "test annotation",
+ "condition": ":c_ip IS NOT NULL AND $TEST_ANNO = '1'",
+ "handler": "anno-test.sh"
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/test/configs/installed/anno-test.sh b/test/configs/installed/anno-test.sh
new file mode 100755
index 0000000..7633240
--- /dev/null
+++ b/test/configs/installed/anno-test.sh
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+
+echo 'Hello, <span style="color: #f00">World</span>!'
diff --git a/test/configs/installed/hw-url-handler.json b/test/configs/installed/hw-url-handler.json
new file mode 100644
index 0000000..f1d3c73
--- /dev/null
+++ b/test/configs/installed/hw-url-handler.json
@@ -0,0 +1,10 @@
+{
+ "$schema": "https://lnav.org/schemas/config-v1.schema.json",
+ "tuning": {
+ "url-scheme": {
+ "hw": {
+ "handler": "hw-url-handler"
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/test/configs/installed/hw-url-handler.lnav b/test/configs/installed/hw-url-handler.lnav
new file mode 100644
index 0000000..dcf9ec1
--- /dev/null
+++ b/test/configs/installed/hw-url-handler.lnav
@@ -0,0 +1,10 @@
+#
+# @synopsis: hw-url-handler
+# @description: Hello, World! URL handler
+#
+
+;SELECT jget(url, '/host') AS hostname,
+ jget(url, '/path') AS upath
+ FROM (SELECT parse_url($1) AS url)
+
+:sh echo "Hello, $upath at $hostname!"
diff --git a/test/datafile_c.0 b/test/datafile_c.0
new file mode 100644
index 0000000..9a99dd4
--- /dev/null
+++ b/test/datafile_c.0
@@ -0,0 +1,11 @@
+/*
+ * 📂 HELLO, WORLD!
+ */
+
+#include <stdio.h>
+
+int
+main()
+{
+ printf("Hello, World!\n");
+}
diff --git a/test/datafile_simple.1 b/test/datafile_simple.1
index 48bb61a..ed595e3 100644
--- a/test/datafile_simple.1
+++ b/test/datafile_simple.1
@@ -1,13 +1,15 @@
current speed: 38 mph
- key 0:0
key 0:13 ^-----------^ current speed
-pair 0:13 ^-----------^ current speed
- key 15:15 ^
num 15:17 ^^ 38
-pair 15:17 ^^ 38
+ val 15:17 ^^ 38
+pair 0:17 ^---------------^ current speed: 38
+ key 18:18 ^
+word 18:21 ^-^ mph
+ val 18:21 ^-^ mph
+pair 18:21 ^-^ mph
msg :current speed: 38 mph
-format :#: # mph
+format :current speed: # #
{
- "col_0": "current speed",
- "col_1": 38
+ "current speed": 38,
+ "col_0": "mph"
}
diff --git a/test/datafile_simple.14 b/test/datafile_simple.14
index 4c548b9..03bdf90 100644
--- a/test/datafile_simple.14
+++ b/test/datafile_simple.14
@@ -1,8 +1,5 @@
FSChange(Direction.DOWNLOAD, Action.CREATE, name=Fanime 2015, route=[CloudEntry(doc_id=1g5Yho6JmysVGRO-Xmfurra_cQRFb0nTIfZRhGompweg,filename=Baby Names)])
- key 0:0
- sym 0:8 ^------^ FSChange
-pair 0:8 ^------^ FSChange
- key 9:9 ^
+ key 0:8 ^------^ FSChange
key 9:9 ^
sym 9:27 ^----------------^ Direction.DOWNLOAD
val 9:27 ^----------------^ Direction.DOWNLOAD
@@ -13,19 +10,17 @@ pair 9:27 ^----------------^
pair 29:42 ^-----------^ Action.CREATE
key 44:48 ^--^ name
word 49:55 ^----^ Fanime
-wspc 55:56 ^
num 56:60 ^--^ 2015
val 49:60 ^---------^ Fanime 2015
pair 44:60 ^--------------^ name=Fanime 2015
key 62:67 ^---^ route
key 69:79 ^--------^ CloudEntry
key 80:86 ^----^ doc_id
- sym 87:131 ^------------------------------------------^ 1g5Yho6JmysVGRO-Xmfurra_cQRFb0nTIfZRhGompweg
+ id 87:131 ^------------------------------------------^ 1g5Yho6JmysVGRO-Xmfurra_cQRFb0nTIfZRhGompweg
val 87:131 ^------------------------------------------^ 1g5Yho6JmysVGRO-Xmfurra_cQRFb0nTIfZRhGompweg
pair 80:131 ^-------------------------------------------------^ doc_id=1g5Yho6JmysVGRO-Xmfurra_cQRFb0nTIfZRhGompweg
key 132:140 ^------^ filename
word 141:145 ^--^ Baby
-wspc 145:146 ^
word 146:151 ^---^ Names
val 141:151 ^--------^ Baby Names
pair 132:151 ^-----------------^ filename=Baby Names
@@ -36,12 +31,12 @@ pair 69:151
val 69:151 ^--------------------------------------------------------------------------------^ CloudEntry(doc_id=1g5Yho6JmysVGRO-Xmfurra_cQRFb0nTIfZRhGompweg,filename=Baby Names
pair 62:151 ^---------------------------------------------------------------------------------------^ route=[CloudEntry(doc_id=1g5Yho6JmysVGRO-Xmfurra_cQRFb0nTIfZRhGompweg,filename=Baby Names
grp 9:151 ^--------------------------------------------------------------------------------------------------------------------------------------------^ Direction.DOWNLOAD, Action.CREATE, name=Fanime 2015, route=[CloudEntry(doc_id=1g5Yho6JmysVGRO-Xmfurra_cQRFb0nTIfZRhGompweg,filename=Baby Names
-pair 9:151 ^--------------------------------------------------------------------------------------------------------------------------------------------^ Direction.DOWNLOAD, Action.CREATE, name=Fanime 2015, route=[CloudEntry(doc_id=1g5Yho6JmysVGRO-Xmfurra_cQRFb0nTIfZRhGompweg,filename=Baby Names
+ val 9:151 ^--------------------------------------------------------------------------------------------------------------------------------------------^ Direction.DOWNLOAD, Action.CREATE, name=Fanime 2015, route=[CloudEntry(doc_id=1g5Yho6JmysVGRO-Xmfurra_cQRFb0nTIfZRhGompweg,filename=Baby Names
+pair 0:151 ^-----------------------------------------------------------------------------------------------------------------------------------------------------^ FSChange(Direction.DOWNLOAD, Action.CREATE, name=Fanime 2015, route=[CloudEntry(doc_id=1g5Yho6JmysVGRO-Xmfurra_cQRFb0nTIfZRhGompweg,filename=Baby Names
msg :FSChange(Direction.DOWNLOAD, Action.CREATE, name=Fanime 2015, route=[CloudEntry(doc_id=1g5Yho6JmysVGRO-Xmfurra_cQRFb0nTIfZRhGompweg,filename=Baby Names)])
-format :#(#)])
+format :FSChange(#)])
{
- "col_0": "FSChange",
- "col_1": {
+ "FSChange": {
"col_0": "Direction.DOWNLOAD",
"col_1": "Action.CREATE",
"name": "Fanime 2015",
diff --git a/test/datafile_simple.15 b/test/datafile_simple.15
index f0e053d..d921d60 100644
--- a/test/datafile_simple.15
+++ b/test/datafile_simple.15
@@ -1,5 +1,5 @@
Worker successfully completed [ImmutableChange(Direction.UPLOAD, Action.CREATE, ino=LocalID(inode=5567236), path=u'/Users/stack/Google Drive', name=u'pyjsonpath1.patch', parent_ino=LocalID(inode=46166734), is_folder=False)]
- key 31:31 ^
+ key 0:29 ^---------------------------^ Worker successfully completed
key 31:46 ^-------------^ ImmutableChange
key 47:47 ^
sym 47:63 ^--------------^ Direction.UPLOAD
@@ -10,15 +10,17 @@ pair 47:63 ^--------------^
val 65:78 ^-----------^ Action.CREATE
pair 65:78 ^-----------^ Action.CREATE
key 80:83 ^-^ ino
- sym 84:91 ^-----^ LocalID
+quot 84:84 ^
+ val 84:84 ^
+pair 80:84 ^--^ ino=
+ key 84:91 ^-----^ LocalID
key 92:97 ^---^ inode
num 98:105 ^-----^ 5567236
val 98:105 ^-----^ 5567236
pair 92:105 ^-----------^ inode=5567236
grp 92:105 ^-----------^ inode=5567236
+ val 92:105 ^-----------^ inode=5567236
pair 84:105 ^-------------------^ LocalID(inode=5567236
- val 84:105 ^-------------------^ LocalID(inode=5567236
-pair 80:105 ^-----------------------^ ino=LocalID(inode=5567236
key 108:112 ^--^ path
quot 115:140 ^-----------------------^ /Users/stack/Google Drive
val 115:140 ^-----------------------^ /Users/stack/Google Drive
@@ -28,15 +30,17 @@ quot 150:167
val 150:167 ^---------------^ pyjsonpath1.patch
pair 143:167 ^----------------------^ name=u'pyjsonpath1.patch
key 170:180 ^--------^ parent_ino
- sym 181:188 ^-----^ LocalID
+quot 181:181 ^
+ val 181:181 ^
+pair 170:181 ^---------^ parent_ino=
+ key 181:188 ^-----^ LocalID
key 189:194 ^---^ inode
num 195:203 ^------^ 46166734
val 195:203 ^------^ 46166734
pair 189:203 ^------------^ inode=46166734
grp 189:203 ^------------^ inode=46166734
+ val 189:203 ^------------^ inode=46166734
pair 181:203 ^--------------------^ LocalID(inode=46166734
- val 181:203 ^--------------------^ LocalID(inode=46166734
-pair 170:203 ^-------------------------------^ parent_ino=LocalID(inode=46166734
key 206:215 ^-------^ is_folder
cnst 216:221 ^---^ False
val 216:221 ^---^ False
@@ -45,31 +49,46 @@ pair 206:221
val 47:221 ^----------------------------------------------------------------------------------------------------------------------------------------------------------------------------^ Direction.UPLOAD, Action.CREATE, ino=LocalID(inode=5567236), path=u'/Users/stack/Google Drive', name=u'pyjsonpath1.patch', parent_ino=LocalID(inode=46166734), is_folder=False
pair 31:221 ^--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------^ ImmutableChange(Direction.UPLOAD, Action.CREATE, ino=LocalID(inode=5567236), path=u'/Users/stack/Google Drive', name=u'pyjsonpath1.patch', parent_ino=LocalID(inode=46166734), is_folder=False
grp 31:221 ^--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------^ ImmutableChange(Direction.UPLOAD, Action.CREATE, ino=LocalID(inode=5567236), path=u'/Users/stack/Google Drive', name=u'pyjsonpath1.patch', parent_ino=LocalID(inode=46166734), is_folder=False
-pair 31:221 ^--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------^ ImmutableChange(Direction.UPLOAD, Action.CREATE, ino=LocalID(inode=5567236), path=u'/Users/stack/Google Drive', name=u'pyjsonpath1.patch', parent_ino=LocalID(inode=46166734), is_folder=False
+ val 31:221 ^--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------^ ImmutableChange(Direction.UPLOAD, Action.CREATE, ino=LocalID(inode=5567236), path=u'/Users/stack/Google Drive', name=u'pyjsonpath1.patch', parent_ino=LocalID(inode=46166734), is_folder=False
+pair 0:221 ^---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------^ Worker successfully completed [ImmutableChange(Direction.UPLOAD, Action.CREATE, ino=LocalID(inode=5567236), path=u'/Users/stack/Google Drive', name=u'pyjsonpath1.patch', parent_ino=LocalID(inode=46166734), is_folder=False
msg :Worker successfully completed [ImmutableChange(Direction.UPLOAD, Action.CREATE, ino=LocalID(inode=5567236), path=u'/Users/stack/Google Drive', name=u'pyjsonpath1.patch', parent_ino=LocalID(inode=46166734), is_folder=False)]
format :Worker successfully completed [#)]
-[
- {
- "ImmutableChange": {
- "col_0": "Direction.UPLOAD",
- "col_1": "Action.CREATE",
- "ino": {
- "LocalID": [
- {
- "inode": 5567236
- }
- ]
- },
- "path": "/Users/stack/Google Drive",
- "name": "pyjsonpath1.patch",
- "parent_ino": {
- "LocalID": [
- {
- "inode": 46166734
- }
- ]
- },
- "is_folder": false
+{
+ "Worker successfully completed": [
+ {
+ "ImmutableChange": [
+ "Direction.UPLOAD",
+ "Action.CREATE",
+ {
+ "ino": ""
+ },
+ {
+ "LocalID": [
+ {
+ "inode": 5567236
+ }
+ ]
+ },
+ {
+ "path": "/Users/stack/Google Drive"
+ },
+ {
+ "name": "pyjsonpath1.patch"
+ },
+ {
+ "parent_ino": ""
+ },
+ {
+ "LocalID": [
+ {
+ "inode": 46166734
+ }
+ ]
+ },
+ {
+ "is_folder": false
+ }
+ ]
}
- }
-]
+ ]
+}
diff --git a/test/datafile_simple.18 b/test/datafile_simple.18
index 55f125b..aff90b1 100644
--- a/test/datafile_simple.18
+++ b/test/datafile_simple.18
@@ -1,5 +1,5 @@
list [foo(bar=1)]
- key 6:6 ^
+ key 0:4 ^--^ list
key 6:9 ^-^ foo
key 10:13 ^-^ bar
num 14:15 ^ 1
@@ -9,15 +9,18 @@ pair 10:15 ^---^ bar=1
val 10:15 ^---^ bar=1
pair 6:15 ^-------^ foo(bar=1
grp 6:15 ^-------^ foo(bar=1
-pair 6:15 ^-------^ foo(bar=1
+ val 6:15 ^-------^ foo(bar=1
+pair 0:15 ^-------------^ list [foo(bar=1
msg :list [foo(bar=1)]
format :list [#)]
-[
- {
- "foo": [
- {
- "bar": 1
- }
- ]
- }
-]
+{
+ "list": [
+ {
+ "foo": [
+ {
+ "bar": 1
+ }
+ ]
+ }
+ ]
+}
diff --git a/test/datafile_simple.19 b/test/datafile_simple.19
index ce58fc9..4ba0ba4 100644
--- a/test/datafile_simple.19
+++ b/test/datafile_simple.19
@@ -1,5 +1,5 @@
list [foo(bar=1), foo(bar=2), foo(bar=3)]
- key 6:6 ^
+ key 0:4 ^--^ list
key 6:9 ^-^ foo
key 10:13 ^-^ bar
num 14:15 ^ 1
@@ -25,29 +25,32 @@ pair 34:39 ^---^ bar=3
val 34:39 ^---^ bar=3
pair 30:39 ^-------^ foo(bar=3
grp 6:39 ^-------------------------------^ foo(bar=1), foo(bar=2), foo(bar=3
-pair 6:39 ^-------------------------------^ foo(bar=1), foo(bar=2), foo(bar=3
+ val 6:39 ^-------------------------------^ foo(bar=1), foo(bar=2), foo(bar=3
+pair 0:39 ^-------------------------------------^ list [foo(bar=1), foo(bar=2), foo(bar=3
msg :list [foo(bar=1), foo(bar=2), foo(bar=3)]
format :list [#)]
-[
- {
- "foo": [
- {
- "bar": 1
- }
- ]
- },
- {
- "foo": [
- {
- "bar": 2
- }
- ]
- },
- {
- "foo": [
- {
- "bar": 3
- }
- ]
- }
-]
+{
+ "list": [
+ {
+ "foo": [
+ {
+ "bar": 1
+ }
+ ]
+ },
+ {
+ "foo": [
+ {
+ "bar": 2
+ }
+ ]
+ },
+ {
+ "foo": [
+ {
+ "bar": 3
+ }
+ ]
+ }
+ ]
+}
diff --git a/test/datafile_simple.20 b/test/datafile_simple.20
index ea81659..76d5463 100644
--- a/test/datafile_simple.20
+++ b/test/datafile_simple.20
@@ -1,5 +1,5 @@
list ["abc", "def", "ghi"]
- key 7:7 ^
+ key 0:4 ^--^ list
quot 7:10 ^-^ abc
val 7:10 ^-^ abc
quot 14:17 ^-^ def
@@ -7,11 +7,14 @@ quot 14:17 ^-^ def
quot 21:24 ^-^ ghi
val 21:24 ^-^ ghi
grp 7:24 ^---------------^ abc", "def", "ghi
-pair 7:24 ^---------------^ abc", "def", "ghi
+ val 7:24 ^---------------^ abc", "def", "ghi
+pair 0:24 ^----------------------^ list ["abc", "def", "ghi
msg :list ["abc", "def", "ghi"]
format :list [#]
-[
- "abc",
- "def",
- "ghi"
-]
+{
+ "list": [
+ "abc",
+ "def",
+ "ghi"
+ ]
+}
diff --git a/test/datafile_simple.21 b/test/datafile_simple.21
index e570241..3206184 100644
--- a/test/datafile_simple.21
+++ b/test/datafile_simple.21
@@ -13,6 +13,7 @@ quot 59:71 ^-------
quot 74:78 ^--^ test
val 74:78 ^--^ test
grp 2:78 ^--------------------------------------------------------------------------^ correctProperty":"test", "incorrectProperty": "test\"", "nextProperty":"test
+ val 2:78 ^--------------------------------------------------------------------------^ correctProperty":"test", "incorrectProperty": "test\"", "nextProperty":"test
pair 2:78 ^--------------------------------------------------------------------------^ correctProperty":"test", "incorrectProperty": "test\"", "nextProperty":"test
msg :{"correctProperty":"test", "incorrectProperty": "test\"", "nextProperty":"test"}
format :{#}
diff --git a/test/datafile_simple.23 b/test/datafile_simple.23
index d649941..c2b457d 100644
--- a/test/datafile_simple.23
+++ b/test/datafile_simple.23
@@ -1,88 +1,78 @@
2022-06-02T12:26:22.072Z info vpxd[47413] [Originator@6876 sub=vpxLro opID=21fa61e9-3e] [VpxLRO] -- BEGIN lro-954041 -- AuthorizationManager -- vim.AuthorizationManager.hasUserPrivilegeOnEntities -- 52768da7-4006-3d4a-4917-ee027373630f(522e0475-8901-e8b8-1eb8-07ec729ac50c)
- key 23:23 ^
- sym 23:24 ^ Z
-pair 23:24 ^ Z
- key 30:30 ^
- sym 30:34 ^--^ vpxd
-pair 30:34 ^--^ vpxd
- key 35:35 ^
+ key 0:0
+ dt 0:23 ^---------------------^ 2022-06-02T12:26:22.072
+ val 0:23 ^---------------------^ 2022-06-02T12:26:22.072
+pair 0:23 ^---------------------^ 2022-06-02T12:26:22.072
+ key 30:34 ^--^ vpxd
num 35:40 ^---^ 47413
val 35:40 ^---^ 47413
grp 35:40 ^---^ 47413
-pair 35:40 ^---^ 47413
+ val 35:40 ^---^ 47413
+pair 30:40 ^--------^ vpxd[47413
+ key 43:43 ^
key 43:43 ^
- key 43:62 ^-----------------^ Originator@6876 sub
+ id 43:58 ^-------------^ Originator@6876
+ val 43:58 ^-------------^ Originator@6876
+pair 43:58 ^-------------^ Originator@6876
+ key 59:62 ^-^ sub
sym 63:69 ^----^ vpxLro
val 63:69 ^----^ vpxLro
-pair 43:69 ^------------------------^ Originator@6876 sub=vpxLro
+pair 59:69 ^--------^ sub=vpxLro
key 70:74 ^--^ opID
- sym 75:86 ^---------^ 21fa61e9-3e
+ id 75:86 ^---------^ 21fa61e9-3e
val 75:86 ^---------^ 21fa61e9-3e
pair 70:86 ^--------------^ opID=21fa61e9-3e
grp 43:86 ^-----------------------------------------^ Originator@6876 sub=vpxLro opID=21fa61e9-3e
+ val 43:86 ^-----------------------------------------^ Originator@6876 sub=vpxLro opID=21fa61e9-3e
pair 43:86 ^-----------------------------------------^ Originator@6876 sub=vpxLro opID=21fa61e9-3e
key 89:89 ^
sym 89:95 ^----^ VpxLRO
val 89:95 ^----^ VpxLRO
grp 89:95 ^----^ VpxLRO
+ val 89:95 ^----^ VpxLRO
pair 89:95 ^----^ VpxLRO
- key 97:97 ^
- sym 97:99 ^^ --
-pair 97:99 ^^ --
- key 100:100 ^
- sym 100:105 ^---^ BEGIN
-pair 100:105 ^---^ BEGIN
- key 106:106 ^
- sym 106:116 ^--------^ lro-954041
-pair 106:116 ^--------^ lro-954041
- key 117:117 ^
- sym 117:119 ^^ --
-pair 117:119 ^^ --
+ key 100:105 ^---^ BEGIN
+ id 106:116 ^--------^ lro-954041
+ val 106:116 ^--------^ lro-954041
+pair 100:116 ^--------------^ BEGIN lro-954041
key 120:120 ^
sym 120:140 ^------------------^ AuthorizationManager
+ val 120:140 ^------------------^ AuthorizationManager
pair 120:140 ^------------------^ AuthorizationManager
- key 141:141 ^
- sym 141:143 ^^ --
-pair 141:143 ^^ --
key 144:144 ^
sym 144:195 ^-------------------------------------------------^ vim.AuthorizationManager.hasUserPrivilegeOnEntities
+ val 144:195 ^-------------------------------------------------^ vim.AuthorizationManager.hasUserPrivilegeOnEntities
pair 144:195 ^-------------------------------------------------^ vim.AuthorizationManager.hasUserPrivilegeOnEntities
- key 196:196 ^
- sym 196:198 ^^ --
-pair 196:198 ^^ --
key 199:199 ^
uuid 199:235 ^----------------------------------^ 52768da7-4006-3d4a-4917-ee027373630f
+ val 199:235 ^----------------------------------^ 52768da7-4006-3d4a-4917-ee027373630f
pair 199:235 ^----------------------------------^ 52768da7-4006-3d4a-4917-ee027373630f
key 236:236 ^
uuid 236:272 ^----------------------------------^ 522e0475-8901-e8b8-1eb8-07ec729ac50c
val 236:272 ^----------------------------------^ 522e0475-8901-e8b8-1eb8-07ec729ac50c
grp 236:272 ^----------------------------------^ 522e0475-8901-e8b8-1eb8-07ec729ac50c
+ val 236:272 ^----------------------------------^ 522e0475-8901-e8b8-1eb8-07ec729ac50c
pair 236:272 ^----------------------------------^ 522e0475-8901-e8b8-1eb8-07ec729ac50c
msg :2022-06-02T12:26:22.072Z info vpxd[47413] [Originator@6876 sub=vpxLro opID=21fa61e9-3e] [VpxLRO] -- BEGIN lro-954041 -- AuthorizationManager -- vim.AuthorizationManager.hasUserPrivilegeOnEntities -- 52768da7-4006-3d4a-4917-ee027373630f(522e0475-8901-e8b8-1eb8-07ec729ac50c)
-format :2022-06-02T12:26:22.072# info #[#] [#] [#] # # # # # # # # #(#)
+format :#Z info vpxd[#] [#] [#] -- BEGIN # -- # -- # -- #(#)
{
- "col_0": "Z",
- "col_1": "vpxd",
- "col_2": [
+ "col_0": "2022-06-02T12:26:22.072",
+ "vpxd": [
47413
],
- "col_3": {
- "Originator@6876 sub": "vpxLro",
+ "col_1": {
+ "col_0": "Originator@6876",
+ "sub": "vpxLro",
"opID": "21fa61e9-3e"
},
- "col_4": [
+ "col_2": [
"VpxLRO"
],
- "col_5": "--",
- "col_6": "BEGIN",
- "col_7": "lro-954041",
- "col_8": "--",
- "col_9": "AuthorizationManager",
- "col_10": "--",
- "col_11": "vim.AuthorizationManager.hasUserPrivilegeOnEntities",
- "col_12": "--",
- "col_13": "52768da7-4006-3d4a-4917-ee027373630f",
- "col_14": [
+ "BEGIN": "lro-954041",
+ "col_3": "AuthorizationManager",
+ "col_4": "vim.AuthorizationManager.hasUserPrivilegeOnEntities",
+ "col_5": "52768da7-4006-3d4a-4917-ee027373630f",
+ "col_6": [
"522e0475-8901-e8b8-1eb8-07ec729ac50c"
]
}
diff --git a/test/datafile_simple.24 b/test/datafile_simple.24
new file mode 100644
index 0000000..213fb83
--- /dev/null
+++ b/test/datafile_simple.24
@@ -0,0 +1,52 @@
+ LoadResources path (./locale/) locale (en) removeable (false) resMap (00007f9ee4195fa0) extKeys (0000000000000000)
+ key 0:18 ^----------------^ LoadResources path
+ key 20:20 ^
+path 20:30 ^--------^ ./locale/)
+ val 20:30 ^--------^ ./locale/)
+pair 20:30 ^--------^ ./locale/)
+ key 31:37 ^----^ locale
+word 39:41 ^^ en
+ val 39:41 ^^ en
+ grp 39:41 ^^ en
+ val 39:41 ^^ en
+pair 31:41 ^--------^ locale (en
+ key 43:53 ^--------^ removeable
+cnst 55:60 ^---^ false
+ val 55:60 ^---^ false
+ grp 55:60 ^---^ false
+ val 55:60 ^---^ false
+pair 43:60 ^---------------^ removeable (false
+ key 62:68 ^----^ resMap
+ hex 70:86 ^--------------^ 00007f9ee4195fa0
+ val 70:86 ^--------------^ 00007f9ee4195fa0
+ grp 70:86 ^--------------^ 00007f9ee4195fa0
+ val 70:86 ^--------------^ 00007f9ee4195fa0
+pair 62:86 ^----------------------^ resMap (00007f9ee4195fa0
+ key 88:95 ^-----^ extKeys
+ cc 97:113 ^--------------^ 0000000000000000
+ val 97:113 ^--------------^ 0000000000000000
+ grp 97:113 ^--------------^ 0000000000000000
+ val 97:113 ^--------------^ 0000000000000000
+pair 88:113 ^-----------------------^ extKeys (0000000000000000
+ grp 20:113 ^-------------------------------------------------------------------------------------------^ ./locale/) locale (en) removeable (false) resMap (00007f9ee4195fa0) extKeys (0000000000000000
+ val 20:113 ^-------------------------------------------------------------------------------------------^ ./locale/) locale (en) removeable (false) resMap (00007f9ee4195fa0) extKeys (0000000000000000
+pair 0:113 ^---------------------------------------------------------------------------------------------------------------^ LoadResources path (./locale/) locale (en) removeable (false) resMap (00007f9ee4195fa0) extKeys (0000000000000000
+msg :LoadResources path (./locale/) locale (en) removeable (false) resMap (00007f9ee4195fa0) extKeys (0000000000000000)
+format :LoadResources path (#)
+{
+ "LoadResources path": {
+ "col_0": "./locale/)",
+ "locale": [
+ "en"
+ ],
+ "removeable": [
+ false
+ ],
+ "resMap": [
+ "00007f9ee4195fa0"
+ ],
+ "extKeys": [
+ "0000000000000000"
+ ]
+ }
+}
diff --git a/test/datafile_simple.25 b/test/datafile_simple.25
new file mode 100644
index 0000000..db330d1
--- /dev/null
+++ b/test/datafile_simple.25
@@ -0,0 +1,15 @@
+ a=1 b=2
+ key 0:1 ^ a
+ num 2:3 ^ 1
+ val 2:3 ^ 1
+pair 0:3 ^-^ a=1
+ key 4:5 ^ b
+ num 6:7 ^ 2
+ val 6:7 ^ 2
+pair 4:7 ^-^ b=2
+msg :a=1 b=2
+format :a=# b=#
+{
+ "a": 1,
+ "b": 2
+}
diff --git a/test/datafile_simple.7 b/test/datafile_simple.7
index 3c0810f..90dc6e5 100644
--- a/test/datafile_simple.7
+++ b/test/datafile_simple.7
@@ -1,5 +1,5 @@
func(arg1="a", arg2="b")
- key 5:5 ^
+ key 0:4 ^--^ func
key 5:9 ^--^ arg1
quot 11:12 ^ a
val 11:12 ^ a
@@ -9,10 +9,13 @@ quot 21:22 ^ b
val 21:22 ^ b
pair 15:22 ^-----^ arg2="b
grp 5:22 ^---------------^ arg1="a", arg2="b
-pair 5:22 ^---------------^ arg1="a", arg2="b
+ val 5:22 ^---------------^ arg1="a", arg2="b
+pair 0:22 ^--------------------^ func(arg1="a", arg2="b
msg :func(arg1="a", arg2="b")
format :func(#)
{
- "arg1": "a",
- "arg2": "b"
+ "func": {
+ "arg1": "a",
+ "arg2": "b"
+ }
}
diff --git a/test/datafile_simple.8 b/test/datafile_simple.8
index c6363c3..5119ec9 100644
--- a/test/datafile_simple.8
+++ b/test/datafile_simple.8
@@ -1,22 +1,30 @@
Succeeded authorizing right 'system.privilege.taskport.debug' by client '/usr/libexec/taskgated' [76339] for authorization created by '/usr/libexec/taskgated' [77395] (100003,1)
- key 29:29 ^
+word 22:27 ^---^ right
+ key 22:27 ^---^ right
quot 29:60 ^-----------------------------^ system.privilege.taskport.debug
-pair 29:60 ^-----------------------------^ system.privilege.taskport.debug
- key 73:73 ^
+ val 29:60 ^-----------------------------^ system.privilege.taskport.debug
+pair 22:60 ^------------------------------------^ right 'system.privilege.taskport.debug
+word 65:71 ^----^ client
+ key 65:71 ^----^ client
quot 73:95 ^--------------------^ /usr/libexec/taskgated
-pair 73:95 ^--------------------^ /usr/libexec/taskgated
+ val 73:95 ^--------------------^ /usr/libexec/taskgated
+pair 65:95 ^----------------------------^ client '/usr/libexec/taskgated
key 98:98 ^
num 98:103 ^---^ 76339
val 98:103 ^---^ 76339
grp 98:103 ^---^ 76339
+ val 98:103 ^---^ 76339
pair 98:103 ^---^ 76339
- key 135:135 ^
+word 131:133 ^^ by
+ key 131:133 ^^ by
quot 135:157 ^--------------------^ /usr/libexec/taskgated
-pair 135:157 ^--------------------^ /usr/libexec/taskgated
+ val 135:157 ^--------------------^ /usr/libexec/taskgated
+pair 131:157 ^------------------------^ by '/usr/libexec/taskgated
key 160:160 ^
num 160:165 ^---^ 77395
val 160:165 ^---^ 77395
grp 160:165 ^---^ 77395
+ val 160:165 ^---^ 77395
pair 160:165 ^---^ 77395
key 168:168 ^
num 168:174 ^----^ 100003
@@ -24,20 +32,21 @@ pair 160:165
num 175:176 ^ 1
val 175:176 ^ 1
grp 168:176 ^------^ 100003,1
+ val 168:176 ^------^ 100003,1
pair 168:176 ^------^ 100003,1
msg :Succeeded authorizing right 'system.privilege.taskport.debug' by client '/usr/libexec/taskgated' [76339] for authorization created by '/usr/libexec/taskgated' [77395] (100003,1)
format :Succeeded authorizing right # by client # [#] for authorization created by # [#] (#)
{
- "col_0": "system.privilege.taskport.debug",
- "col_1": "/usr/libexec/taskgated",
- "col_2": [
+ "right": "system.privilege.taskport.debug",
+ "client": "/usr/libexec/taskgated",
+ "col_0": [
76339
],
- "col_3": "/usr/libexec/taskgated",
- "col_4": [
+ "by": "/usr/libexec/taskgated",
+ "col_1": [
77395
],
- "col_5": [
+ "col_2": [
100003,
1
]
diff --git a/test/document.sections.tests.cc b/test/document.sections.tests.cc
index 8e88b75..ccafe7e 100644
--- a/test/document.sections.tests.cc
+++ b/test/document.sections.tests.cc
@@ -141,6 +141,59 @@ DESCRIPTION
});
}
+TEST_CASE("lnav::document::sections::doc for diff")
+{
+ attr_line_t INPUT = R"(
+[sql] add json_group_object aggregate function
+
+diff --git a/NEWS b/NEWS
+index d239d2f..7a06070 100644
+--- a/NEWS
++++ b/NEWS
+@@ -4,6 +4,8 @@ lnav v0.8.1:
+ * Log formats can now create SQL views and execute other statements
+ by adding '.sql' files to their format directories. The SQL scripts
+ will be executed on startup.
++ * Added a 'json_group_object' aggregate SQL function that collects values
++ from a GROUP BY query into an JSON object.
+
+ Interface Changes:
+ * The 'o/O' hotkeys have been reassigned to navigate through log
+diff --git a/configure.ac b/configure.ac
+index 718a2d4..10f5580 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -39,8 +39,8 @@ AC_PROG_CXX
+
+ CPPFLAGS="$CPPFLAGS -D_ISOC99_SOURCE -D__STDC_LIMIT_MACROS"
+
+-# CFLAGS=`echo $CFLAGS | sed 's/-O2//g'`
+-# CXXFLAGS=`echo $CXXFLAGS | sed 's/-O2//g'`
++CFLAGS=`echo $CFLAGS | sed 's/-O2//g'`
++CXXFLAGS=`echo $CXXFLAGS | sed 's/-O2//g'`
+
+ AC_ARG_VAR(SFTP_TEST_URL)
+)";
+
+ auto meta = lnav::document::discover_structure(INPUT, line_range{0, -1});
+
+ meta.m_sections_tree.visit_all([](const auto& intv) {
+ auto ser = intv.value.match(
+ [](const std::string& name) { return name; },
+ [](const size_t index) { return fmt::format("{}", index); });
+ printf("interval %d:%d %s\n", intv.start, intv.stop, ser.c_str());
+ });
+ lnav::document::hier_node::depth_first(
+ meta.m_sections_root.get(), [](const auto* node) {
+ printf("node %p %d\n", node, node->hn_start);
+ for (const auto& pair : node->hn_named_children) {
+ printf(" child: %p %s\n", pair.second, pair.first.c_str());
+ }
+ });
+
+ CHECK(meta.m_sections_root->hn_named_children.size() == 2);
+}
+
TEST_CASE("lnav::document::sections::sql")
{
attr_line_t INPUT
diff --git a/test/drive_data_scanner.cc b/test/drive_data_scanner.cc
index a7a0fb7..63e7579 100644
--- a/test/drive_data_scanner.cc
+++ b/test/drive_data_scanner.cc
@@ -37,6 +37,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include "base/injector.bind.hh"
#include "base/injector.hh"
#include "config.h"
#include "data_parser.hh"
@@ -51,6 +52,9 @@
const char* TMP_NAME = "scanned.tmp";
+static auto bound_file_options_hier
+ = injector::bind<lnav::safe_file_options_hier>::to_singleton();
+
int
main(int argc, char* argv[])
{
@@ -190,11 +194,12 @@ main(int argc, char* argv[])
string_attrs_t sa;
if (format.get() != nullptr) {
- format->annotate(0, sa, ll_values);
+ format->annotate(0, sa, ll_values, false);
body = find_string_attr_range(sa, &SA_BODY);
}
data_parser::TRACE_FILE = fopen("scanned.dpt", "w");
+ setvbuf(data_parser::TRACE_FILE, nullptr, _IONBF, 0);
data_scanner ds(sub_line, body.lr_start);
diff --git a/test/drive_doc_discovery.cc b/test/drive_doc_discovery.cc
new file mode 100644
index 0000000..d12f231
--- /dev/null
+++ b/test/drive_doc_discovery.cc
@@ -0,0 +1,120 @@
+/**
+ * Copyright (c) 2024, Timothy Stack
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of Timothy Stack nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ''AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <stdlib.h>
+
+#include "base/fs_util.hh"
+#include "document.sections.hh"
+#include "fmt/color.h"
+
+int
+main(int argc, char* argv[])
+{
+ int retval = EXIT_SUCCESS;
+
+ if (argc < 2) {
+ fprintf(stderr, "error: expecting file to discover\n");
+ retval = EXIT_FAILURE;
+ } else {
+ const auto fn = ghc::filesystem::path(argv[1]);
+ auto read_res = lnav::filesystem::read_file(fn);
+ if (read_res.isErr()) {
+ fprintf(stderr,
+ "error: unable to read %s -- %s\n",
+ fn.c_str(),
+ read_res.unwrapErr().c_str());
+ retval = EXIT_FAILURE;
+ } else {
+ auto content = attr_line_t(read_res.unwrap());
+ const auto& content_sf
+ = string_fragment::from_str(content.get_string());
+ auto tf = detect_text_format(content_sf, fn);
+ auto lr = line_range{0, static_cast<int>(content.length())};
+ auto meta = lnav::document::discover_structure(content, lr, tf);
+
+ auto remaining = content_sf;
+ while (!remaining.empty()) {
+ auto line_pair
+ = remaining.split_when(string_fragment::tag1{'\n'});
+ auto line_sf = line_pair.first;
+ fmt::print(FMT_STRING("{}\n"), line_sf);
+ size_t indent = 0;
+ meta.m_sections_tree.visit_overlapping(
+ line_sf.sf_begin,
+ line_sf.sf_end,
+ [&line_sf, &indent](const auto& iv) {
+ if (iv.start < line_sf.sf_begin) {
+ return;
+ }
+ auto this_indent = iv.start - line_sf.sf_begin;
+ if (this_indent < indent) {
+ return;
+ }
+ auto indent_diff = this_indent - indent;
+ indent = this_indent;
+ fmt::print(FMT_STRING("{}^"),
+ std::string(indent_diff, ' '));
+ if (iv.stop >= line_sf.sf_end + 1) {
+ fmt::print(FMT_STRING(" [{}:{}) - {}"),
+ iv.start,
+ iv.stop,
+ iv.value);
+ return;
+ }
+ auto dot_len = iv.stop - iv.start - 1;
+ fmt::print(FMT_STRING("{}^"),
+ std::string(dot_len, '-'));
+ fmt::print(FMT_STRING(" [{}:{})"), iv.start, iv.stop);
+ });
+ fmt::print(FMT_STRING("\nPath for line[{}:{}): "),
+ line_sf.sf_begin,
+ line_sf.sf_end);
+ meta.m_sections_tree.visit_overlapping(
+ line_sf.sf_begin,
+ line_sf.sf_end,
+ [&line_sf](const auto& iv) {
+ fmt::print(
+ fmt::fg(iv.start < line_sf.sf_begin
+ ? fmt::terminal_color::yellow
+ : fmt::terminal_color::green),
+ FMT_STRING("\uff1a{}"),
+ iv.value.match(
+ [](const std::string& str) { return str; },
+ [](size_t ind) {
+ return fmt::format(FMT_STRING("[{}]"), ind);
+ }));
+ });
+ fmt::print(FMT_STRING("\n"));
+ remaining = line_pair.second;
+ }
+ }
+ }
+
+ return retval;
+}
diff --git a/test/drive_grep_proc.cc b/test/drive_grep_proc.cc
index 4118f43..d90cde4 100644
--- a/test/drive_grep_proc.cc
+++ b/test/drive_grep_proc.cc
@@ -89,7 +89,7 @@ public:
void grep_match(grep_proc<vis_line_t>& gp,
vis_line_t line,
int start,
- int end)
+ int end) override
{
printf("%d:%d:%d\n", (int) line, start, end);
}
@@ -98,12 +98,21 @@ public:
vis_line_t line,
int start,
int end,
- char* capture)
+ const string_fragment& capture) override
{
- fprintf(stderr, "%d(%d:%d)%s\n", (int) line, start, end, capture);
+ fprintf(stderr,
+ "%d(%d:%d)%.*s\n",
+ (int) line,
+ start,
+ end,
+ capture.length(),
+ capture.data());
}
- void grep_end(grep_proc<vis_line_t>& gp) { this->ms_finished = true; }
+ void grep_end(grep_proc<vis_line_t>& gp) override
+ {
+ this->ms_finished = true;
+ }
bool ms_finished;
};
diff --git a/test/drive_listview.cc b/test/drive_listview.cc
index 76d3df8..96fe459 100644
--- a/test/drive_listview.cc
+++ b/test/drive_listview.cc
@@ -41,12 +41,9 @@ static listview_curses lv;
class my_source : public list_data_source {
public:
- my_source() : ms_rows(2){};
+ my_source() : ms_rows(2) {}
- size_t listview_rows(const listview_curses& lv)
- {
- return this->ms_rows;
- };
+ size_t listview_rows(const listview_curses& lv) { return this->ms_rows; }
void listview_value_for_rows(const listview_curses& lv,
vis_line_t row,
@@ -67,12 +64,12 @@ public:
}
++row;
}
- };
+ }
size_t listview_size_for_row(const listview_curses& lv, vis_line_t row)
{
return 100;
- };
+ }
bool attrline_next_token(const view_curses& vc,
int line,
@@ -80,7 +77,7 @@ public:
int& attrs_out)
{
return false;
- };
+ }
int ms_rows;
};
@@ -90,9 +87,14 @@ main(int argc, char* argv[])
{
int c, retval = EXIT_SUCCESS;
bool wait_for_input = false, set_height = false;
+ const char* keys = nullptr;
my_source ms;
WINDOW* win;
+ setenv("DUMP_CRASH", "1", 1);
+ log_install_handlers();
+ lnav_log_crash_dir = "/tmp";
+
win = initscr();
lv.set_data_source(&ms);
lv.set_window(win);
@@ -111,15 +113,9 @@ main(int argc, char* argv[])
lv.set_height(vis_line_t(atoi(optarg)));
set_height = true;
break;
- case 'k': {
- // Treats the string argument as sequence of key presses (only
- // individual characters supported as key input)
- for (char* ptr = optarg; ptr != nullptr && *ptr != '\0'; ++ptr)
- {
- lv.handle_key(static_cast<int>(*ptr));
- }
+ case 'k':
+ keys = optarg;
break;
- }
case 't':
lv.set_selection(vis_line_t(atoi(optarg)));
break;
@@ -141,6 +137,19 @@ main(int argc, char* argv[])
lv.set_height(vis_line_t(height - lv.get_y()));
}
+ if (keys != nullptr) {
+ // Treats the string argument as sequence of key presses (only
+ // individual characters supported as key input)
+ for (const char* ptr = keys; ptr != nullptr && *ptr != '\0'; ++ptr) {
+ lv.do_update();
+ if (wait_for_input) {
+ getch();
+ refresh();
+ }
+ lv.handle_key(static_cast<int>(*ptr));
+ }
+ }
+
lv.do_update();
refresh();
if (wait_for_input) {
diff --git a/test/drive_logfile.cc b/test/drive_logfile.cc
index 2da37dd..52f8baa 100644
--- a/test/drive_logfile.cc
+++ b/test/drive_logfile.cc
@@ -37,6 +37,7 @@
#include <sys/types.h>
#include <unistd.h>
+#include "base/injector.bind.hh"
#include "base/injector.hh"
#include "base/opt_util.hh"
#include "config.h"
@@ -54,6 +55,9 @@ typedef enum {
MODE_LEVELS,
} dl_mode_t;
+static auto bound_file_options_hier
+ = injector::bind<lnav::safe_file_options_hier>::to_singleton();
+
time_t
time(time_t* _unused)
{
diff --git a/test/drive_shlexer.cc b/test/drive_shlexer.cc
index fe6f15f..ffbfc32 100644
--- a/test/drive_shlexer.cc
+++ b/test/drive_shlexer.cc
@@ -35,7 +35,7 @@
using namespace std;
const char* ST_TOKEN_NAMES[] = {
- "err",
+ "eof",
"wsp",
"esc",
"dst",
@@ -47,6 +47,22 @@ const char* ST_TOKEN_NAMES[] = {
"til",
};
+static void
+put_underline(FILE* file, string_fragment frag)
+{
+ for (int lpc = 0; lpc < frag.sf_end; lpc++) {
+ if (lpc == frag.sf_begin) {
+ fputc('^', stdout);
+ } else if (lpc == (frag.sf_end - 1)) {
+ fputc('^', stdout);
+ } else if (lpc > frag.sf_begin) {
+ fputc('-', stdout);
+ } else {
+ fputc(' ', stdout);
+ }
+ }
+}
+
int
main(int argc, char* argv[])
{
@@ -56,39 +72,44 @@ main(int argc, char* argv[])
}
shlex lexer(argv[1], strlen(argv[1]));
- string_fragment cap;
- shlex_token_t token;
+ bool done = false;
printf(" %s\n", argv[1]);
- while (lexer.tokenize(cap, token)) {
- int lpc;
+ while (!done) {
+ auto tokenize_res = lexer.tokenize();
+ if (tokenize_res.isErr()) {
+ auto te = tokenize_res.unwrapErr();
+
+ printf("err ");
+ put_underline(stdout, te.te_source);
+ printf(" -- %s\n", te.te_msg);
+ break;
+ }
- printf("%s ", ST_TOKEN_NAMES[(int) token]);
- for (lpc = 0; lpc < cap.sf_end; lpc++) {
- if (lpc == cap.sf_begin) {
- fputc('^', stdout);
- } else if (lpc == (cap.sf_end - 1)) {
- fputc('^', stdout);
- } else if (lpc > cap.sf_begin) {
- fputc('-', stdout);
- } else {
- fputc(' ', stdout);
- }
+ auto tr = tokenize_res.unwrap();
+ if (tr.tr_token == shlex_token_t::eof) {
+ done = true;
}
+ printf("%s ", ST_TOKEN_NAMES[(int) tr.tr_token]);
+ put_underline(stdout, tr.tr_frag);
printf("\n");
}
lexer.reset();
std::string result;
- if (lexer.eval(result, map<string, string>())) {
+ std::map<std::string, scoped_value_t> vars;
+ if (lexer.eval(result, scoped_resolver{&vars})) {
printf("eval -- %s\n", result.c_str());
}
lexer.reset();
- std::vector<std::string> sresult;
- if (lexer.split(sresult, map<string, string>())) {
+ auto split_res = lexer.split(scoped_resolver{&vars});
+ if (split_res.isOk()) {
+ auto sresult = split_res.unwrap();
printf("split:\n");
for (size_t lpc = 0; lpc < sresult.size(); lpc++) {
- printf(" %zu -- %s\n", lpc, sresult[lpc].c_str());
+ printf("% 3zu ", lpc);
+ put_underline(stdout, sresult[lpc].se_origin);
+ printf(" -- %s\n", sresult[lpc].se_value.c_str());
}
}
diff --git a/test/drive_view_colors.cc b/test/drive_view_colors.cc
index f7b38c1..e806192 100644
--- a/test/drive_view_colors.cc
+++ b/test/drive_view_colors.cc
@@ -38,7 +38,7 @@ class test_colors : public view_curses {
public:
test_colors() : tc_window(nullptr) {}
- void do_update() override
+ bool do_update() override
{
auto& vc = view_colors::singleton();
int lpc;
@@ -68,7 +68,9 @@ public:
al.with_attr(
{line_range{8, 11}, VC_STYLE.value(text_attrs{A_REVERSE})});
test_colors::mvwattrline(this->tc_window, lpc, 0, al, lr);
- };
+
+ return true;
+ }
WINDOW* tc_window;
};
diff --git a/test/example.patch b/test/example.patch
new file mode 100644
index 0000000..fe03d05
--- /dev/null
+++ b/test/example.patch
@@ -0,0 +1,102 @@
+[tests] fix export session test
+
+diff --git a/test/Makefile.am b/test/Makefile.am
+index aad96a87..07afe2d5 100644
+--- a/test/Makefile.am
++++ b/test/Makefile.am
+@@ -483,6 +483,7 @@ distclean-local:
+ $(RM_V)rm -rf .lnav
+ $(RM_V)rm -rf regex101-home
+ $(RM_V)rm -rf events-home
++ $(RM_V)rm -rf support-dump
+ $(RM_V)rm -rf ../installer-test-home
+
+ expected:
+diff --git a/test/expected/expected.am b/test/expected/expected.am
+index 99823624..2fa3d9fd 100644
+--- a/test/expected/expected.am
++++ b/test/expected/expected.am
+@@ -414,6 +414,8 @@ EXPECTED_FILES = \
+ $(srcdir)/%reldir%/test_sessions.sh_b932b33dd087b94d4306dd179c5d4f9ddd394960.out \
+ $(srcdir)/%reldir%/test_sessions.sh_ddf45811e9906de9f3930fe802ac7b2cc6e48106.err \
+ $(srcdir)/%reldir%/test_sessions.sh_ddf45811e9906de9f3930fe802ac7b2cc6e48106.out \
++ $(srcdir)/%reldir%/test_sessions.sh_e39648f425c3f291c9d1c0d14595a019abd0cb48.err \
++ $(srcdir)/%reldir%/test_sessions.sh_e39648f425c3f291c9d1c0d14595a019abd0cb48.out \
+ $(srcdir)/%reldir%/test_shlexer.sh_14dd967cb2af90899c9e5e45d00b676b5a3163aa.err \
+ $(srcdir)/%reldir%/test_shlexer.sh_14dd967cb2af90899c9e5e45d00b676b5a3163aa.out \
+ $(srcdir)/%reldir%/test_shlexer.sh_2781f5dd570580cbe746ad91b58a28b8371283b3.err \
+diff --git a/test/expected/test_sessions.sh_8732dad5481be991ca7f291d9c5451c7b016cea7.out b/test/expected/test_sessions.sh_8732dad5481be991ca7f291d9c5451c7b016cea7.out
+index 7b4c3036..a1e2e6f2 100644
+--- a/test/expected/test_sessions.sh_8732dad5481be991ca7f291d9c5451c7b016cea7.out
++++ b/test/expected/test_sessions.sh_8732dad5481be991ca7f291d9c5451c7b016cea7.out
+@@ -11,6 +11,7 @@
+
+ ;INSERT OR IGNORE INTO environ (name, value) VALUES ('LOG_DIR_0', '{top_srcdir_parent}')
+ :open $LOG_DIR_0/lnav/test/logfile_access_log.0
++
+ :rebuild
+
+
+diff --git a/test/expected/test_sessions.sh_e39648f425c3f291c9d1c0d14595a019abd0cb48.err b/test/expected/test_sessions.sh_e39648f425c3f291c9d1c0d14595a019abd0cb48.err
+new file mode 100644
+index 00000000..e69de29b
+diff --git a/test/expected/test_sessions.sh_e39648f425c3f291c9d1c0d14595a019abd0cb48.out b/test/expected/test_sessions.sh_e39648f425c3f291c9d1c0d14595a019abd0cb48.out
+new file mode 100644
+index 00000000..6cc4bc8c
+--- /dev/null
++++ b/test/expected/test_sessions.sh_e39648f425c3f291c9d1c0d14595a019abd0cb48.out
+@@ -0,0 +1,33 @@
++#!lnav -Nf
++# This file is an export of an lnav session. You can type
++# '|/path/to/this/file' in lnav to execute this file and
++# restore the state of the session.
++
++;SELECT raise_error('This session export was made with a newer version of lnav, please upgrade to ' || '0.11.0' || ' or later')
++ WHERE lnav_version() < '0.11.0' COLLATE naturalcase
++
++# The files loaded into the session were:
++
++
++;INSERT OR IGNORE INTO environ (name, value) VALUES ('LOG_DIR_0', '{builddir}')
++:open $LOG_DIR_0/support-dump/logfile_access_log.0
++
++:rebuild
++
++
++# The following SQL statements will restore the bookmarks,
++# comments, and tags that were added in the session.
++
++;SELECT total_changes() AS before_mark_changes
++;UPDATE all_logs SET log_mark = 1, log_comment = NULL, log_tags = NULL WHERE log_time_msecs = 1248130769000 AND log_format = 'access_log' AND log_line_hash = 'v1:b05c1bdfe75cde41e151c89087e31951'
++
++;SELECT 1 - (total_changes() - $before_mark_changes) AS failed_mark_changes
++;SELECT echoln(printf('%sERROR%s: failed to restore %d bookmarks',
++ $ansi_red, $ansi_norm, $failed_mark_changes))
++ WHERE $failed_mark_changes != 0
++
++
++# The following commands will restore the state of the LOG view.
++
++:switch-to-view log
++:goto 1
+diff --git a/test/test_sessions.sh b/test/test_sessions.sh
+index a2c59bbe..31d6d376 100644
+--- a/test/test_sessions.sh
++++ b/test/test_sessions.sh
+@@ -26,11 +26,15 @@ run_cap_test ${lnav_test} -nq \
+ -c ":save-session" \
+ ${test_dir}/logfile_access_log.0
+
++mkdir -p support-dump
++echo 'Hello' > support-dump/readme
++cp ${test_dir}/logfile_access_log.0 support-dump/
++
+ run_cap_test ${lnav_test} -nq \
+ -c ";update access_log set log_mark = 1 where sc_bytes > 60000" \
+ -c ":goto 1" \
+ -c ":export-session-to -" \
+- ${test_dir}/logfile_access_log.0
++ support-dump/logfile_access_log.0
+
+ run_cap_test ${lnav_test} -nq \
+ -c ";update access_log set log_mark = 1 where sc_bytes > 60000" \
diff --git a/test/example.toml b/test/example.toml
new file mode 100644
index 0000000..909e5b4
--- /dev/null
+++ b/test/example.toml
@@ -0,0 +1,38 @@
+# This is a TOML document
+
+title = "TOML Example"
+
+[owner]
+name = "Tom Preston-Werner"
+dob = 1979-05-27T07:32:00-08:00
+
+[database]
+enabled = true
+ports = [
+ 8000,
+ 8001,
+ 8002,
+ 8003,
+ 8004,
+ 8005,
+ 8006,
+ 8007,
+ 8008,
+ 8009,
+ 8010,
+ 8011,
+ 8012,
+ 8013,
+]
+data = [["delta", "phi"], [3.14]]
+temp_targets = { cpu = 79.5, case = 72.0 }
+
+[servers]
+
+[servers.alpha]
+ip = "10.0.0.1"
+role = "frontend"
+
+[servers.beta]
+ip = "10.0.0.2"
+role = "backend"
diff --git a/test/expected/expected.am b/test/expected/expected.am
index 6a88ee8..bedc4dc 100644
--- a/test/expected/expected.am
+++ b/test/expected/expected.am
@@ -1,15 +1,35 @@
EXPECTED_FILES = \
+ $(srcdir)/%reldir%/test_cli.sh_0b3639753916f71254e8c9cce4ebb8bfd9978d3e.err \
+ $(srcdir)/%reldir%/test_cli.sh_0b3639753916f71254e8c9cce4ebb8bfd9978d3e.out \
+ $(srcdir)/%reldir%/test_cli.sh_108c6922cde063429f76abc3fdb8a81ad9a2f671.err \
+ $(srcdir)/%reldir%/test_cli.sh_108c6922cde063429f76abc3fdb8a81ad9a2f671.out \
+ $(srcdir)/%reldir%/test_cli.sh_10c33e465ef7681c6b5519d05d557426b26cd43d.err \
+ $(srcdir)/%reldir%/test_cli.sh_10c33e465ef7681c6b5519d05d557426b26cd43d.out \
$(srcdir)/%reldir%/test_cli.sh_17a68b798354f9a6cdfab372006caeb74038d15c.err \
$(srcdir)/%reldir%/test_cli.sh_17a68b798354f9a6cdfab372006caeb74038d15c.out \
+ $(srcdir)/%reldir%/test_cli.sh_3114508cf42fb2608ef77f4bc294a84885c97a79.err \
+ $(srcdir)/%reldir%/test_cli.sh_3114508cf42fb2608ef77f4bc294a84885c97a79.out \
+ $(srcdir)/%reldir%/test_cli.sh_4327033cfae0d4c170a38a3c4a570520bfabb493.err \
+ $(srcdir)/%reldir%/test_cli.sh_4327033cfae0d4c170a38a3c4a570520bfabb493.out \
$(srcdir)/%reldir%/test_cli.sh_5524542b1a6954ff9741155101497270a2f0c557.err \
$(srcdir)/%reldir%/test_cli.sh_5524542b1a6954ff9741155101497270a2f0c557.out \
+ $(srcdir)/%reldir%/test_cli.sh_76aa57821598962e59063a40c20171040c95a731.err \
+ $(srcdir)/%reldir%/test_cli.sh_76aa57821598962e59063a40c20171040c95a731.out \
$(srcdir)/%reldir%/test_cli.sh_97e19b9ff3775d84074455a2e8993a0611b1c269.err \
$(srcdir)/%reldir%/test_cli.sh_97e19b9ff3775d84074455a2e8993a0611b1c269.out \
- $(srcdir)/%reldir%/test_cli.sh_a1a09f890f4604309d0a81bbbec8e50fb7d5e887.err \
- $(srcdir)/%reldir%/test_cli.sh_a1a09f890f4604309d0a81bbbec8e50fb7d5e887.out \
+ $(srcdir)/%reldir%/test_cli.sh_af3ace7762b4cc150fcdcac86083b379bded7b32.err \
+ $(srcdir)/%reldir%/test_cli.sh_af3ace7762b4cc150fcdcac86083b379bded7b32.out \
+ $(srcdir)/%reldir%/test_cli.sh_c69c835a3c43210225cf62564b3e9584c899af20.err \
+ $(srcdir)/%reldir%/test_cli.sh_c69c835a3c43210225cf62564b3e9584c899af20.out \
+ $(srcdir)/%reldir%/test_cli.sh_cc06341dd560f927512e92c7c0985ed8b25827ae.err \
+ $(srcdir)/%reldir%/test_cli.sh_cc06341dd560f927512e92c7c0985ed8b25827ae.out \
$(srcdir)/%reldir%/test_cli.sh_f2e41555f1a5f40f54ce241207af602ed1503a2b.err \
$(srcdir)/%reldir%/test_cli.sh_f2e41555f1a5f40f54ce241207af602ed1503a2b.out \
+ $(srcdir)/%reldir%/test_cli.sh_ff7da172f4350a2adb74b8764575823d798ed8b6.err \
+ $(srcdir)/%reldir%/test_cli.sh_ff7da172f4350a2adb74b8764575823d798ed8b6.out \
+ $(srcdir)/%reldir%/test_cmds.sh_015ffe79a08f4c9f0cd1cb84c6afa4398f879fc7.err \
+ $(srcdir)/%reldir%/test_cmds.sh_015ffe79a08f4c9f0cd1cb84c6afa4398f879fc7.out \
$(srcdir)/%reldir%/test_cmds.sh_017b495b95218b7c083951e2dba331cfec6e90be.err \
$(srcdir)/%reldir%/test_cmds.sh_017b495b95218b7c083951e2dba331cfec6e90be.out \
$(srcdir)/%reldir%/test_cmds.sh_0b1e4b1523dfca71927b1fe721c74490c51361d1.err \
@@ -74,6 +94,8 @@ EXPECTED_FILES = \
$(srcdir)/%reldir%/test_cmds.sh_38fa2a95b703d4ce12e82882eca1938264822690.out \
$(srcdir)/%reldir%/test_cmds.sh_3b20a298e2c059d7f6045cbc0c07ca3db3917695.err \
$(srcdir)/%reldir%/test_cmds.sh_3b20a298e2c059d7f6045cbc0c07ca3db3917695.out \
+ $(srcdir)/%reldir%/test_cmds.sh_3b4bea458c59d2bac492e568616b610625037ad0.err \
+ $(srcdir)/%reldir%/test_cmds.sh_3b4bea458c59d2bac492e568616b610625037ad0.out \
$(srcdir)/%reldir%/test_cmds.sh_453054e29aaca4c2662c45c2a1f2f63f3510d8dd.err \
$(srcdir)/%reldir%/test_cmds.sh_453054e29aaca4c2662c45c2a1f2f63f3510d8dd.out \
$(srcdir)/%reldir%/test_cmds.sh_4b2d91b19008d5b775090e3ef87c111f9e603b15.err \
@@ -88,6 +110,8 @@ EXPECTED_FILES = \
$(srcdir)/%reldir%/test_cmds.sh_53a9686102f69b07b034df291f554a00b265ed20.out \
$(srcdir)/%reldir%/test_cmds.sh_55c2fd15ec2c7d96dbef7b36a42a1b7b42f90dbc.err \
$(srcdir)/%reldir%/test_cmds.sh_55c2fd15ec2c7d96dbef7b36a42a1b7b42f90dbc.out \
+ $(srcdir)/%reldir%/test_cmds.sh_5630626e6f68c3d4a2c3e5f27d024df5950b88b5.err \
+ $(srcdir)/%reldir%/test_cmds.sh_5630626e6f68c3d4a2c3e5f27d024df5950b88b5.out \
$(srcdir)/%reldir%/test_cmds.sh_5bfd08c1639701476d7b9348c36afd46fdbe6f2a.err \
$(srcdir)/%reldir%/test_cmds.sh_5bfd08c1639701476d7b9348c36afd46fdbe6f2a.out \
$(srcdir)/%reldir%/test_cmds.sh_624a41e152675575f4b07c19b2cf0e3a028429a2.err \
@@ -96,6 +120,8 @@ EXPECTED_FILES = \
$(srcdir)/%reldir%/test_cmds.sh_62d68c0a11757c996f24c8f003e6b4059c3e30b2.out \
$(srcdir)/%reldir%/test_cmds.sh_661ec61acdd8f6fa6ec1e3c2cf5f896eef431351.err \
$(srcdir)/%reldir%/test_cmds.sh_661ec61acdd8f6fa6ec1e3c2cf5f896eef431351.out \
+ $(srcdir)/%reldir%/test_cmds.sh_68c774418bac897bd4d4fe9dbbf08454886b2e15.err \
+ $(srcdir)/%reldir%/test_cmds.sh_68c774418bac897bd4d4fe9dbbf08454886b2e15.out \
$(srcdir)/%reldir%/test_cmds.sh_6a6031113aca32fabc5a3da64b7be46f5ce5a312.err \
$(srcdir)/%reldir%/test_cmds.sh_6a6031113aca32fabc5a3da64b7be46f5ce5a312.out \
$(srcdir)/%reldir%/test_cmds.sh_6e016c0ed61fc652be1a79b864875ffede64f281.err \
@@ -130,6 +156,10 @@ EXPECTED_FILES = \
$(srcdir)/%reldir%/test_cmds.sh_8d5b43c693e78804a8fb06989392fa8cccb46b7b.out \
$(srcdir)/%reldir%/test_cmds.sh_9445861db011dfa2d21a44788047de345ee291e8.err \
$(srcdir)/%reldir%/test_cmds.sh_9445861db011dfa2d21a44788047de345ee291e8.out \
+ $(srcdir)/%reldir%/test_cmds.sh_949826cc086c7a5c87270be172e3caa3bf8f928d.err \
+ $(srcdir)/%reldir%/test_cmds.sh_949826cc086c7a5c87270be172e3caa3bf8f928d.out \
+ $(srcdir)/%reldir%/test_cmds.sh_9527f941dc84a2ac3a030f222e41c6ccd1961cbe.err \
+ $(srcdir)/%reldir%/test_cmds.sh_9527f941dc84a2ac3a030f222e41c6ccd1961cbe.out \
$(srcdir)/%reldir%/test_cmds.sh_95beaabe41d72cf4c6810e79c623da759ac1c71b.err \
$(srcdir)/%reldir%/test_cmds.sh_95beaabe41d72cf4c6810e79c623da759ac1c71b.out \
$(srcdir)/%reldir%/test_cmds.sh_968dac54dc80d91a5da2322890c6c26dfa0d8462.err \
@@ -150,6 +180,8 @@ EXPECTED_FILES = \
$(srcdir)/%reldir%/test_cmds.sh_ac45fb0f8f9578c3ded0855f694698ec38ce31ad.out \
$(srcdir)/%reldir%/test_cmds.sh_af0fcbd30b3fd0d13477aa3325ef0302052a4d9f.err \
$(srcdir)/%reldir%/test_cmds.sh_af0fcbd30b3fd0d13477aa3325ef0302052a4d9f.out \
+ $(srcdir)/%reldir%/test_cmds.sh_b3d0588ad144a841200692b46125bddf66f5d8bb.err \
+ $(srcdir)/%reldir%/test_cmds.sh_b3d0588ad144a841200692b46125bddf66f5d8bb.out \
$(srcdir)/%reldir%/test_cmds.sh_b5a530d16c982cf769151291f0bfd612ea71183f.err \
$(srcdir)/%reldir%/test_cmds.sh_b5a530d16c982cf769151291f0bfd612ea71183f.out \
$(srcdir)/%reldir%/test_cmds.sh_b6a3bb78e9d60e5e1f5ce5b18e40d2f1662707ab.err \
@@ -184,16 +216,18 @@ EXPECTED_FILES = \
$(srcdir)/%reldir%/test_cmds.sh_ca66660c973f76a3c2a147c7f5035bcb4e8a8bbc.out \
$(srcdir)/%reldir%/test_cmds.sh_ccd326da92d1cacda63501cd1a3077381a18e8f2.err \
$(srcdir)/%reldir%/test_cmds.sh_ccd326da92d1cacda63501cd1a3077381a18e8f2.out \
+ $(srcdir)/%reldir%/test_cmds.sh_d1afefacbdd387f02562c8633968b0162a588502.err \
+ $(srcdir)/%reldir%/test_cmds.sh_d1afefacbdd387f02562c8633968b0162a588502.out \
$(srcdir)/%reldir%/test_cmds.sh_d3b69abdfb39e4bfa5828c2f9593e2b2b7ed4d5d.err \
$(srcdir)/%reldir%/test_cmds.sh_d3b69abdfb39e4bfa5828c2f9593e2b2b7ed4d5d.out \
$(srcdir)/%reldir%/test_cmds.sh_d76d77ad95b9f120825417a6a8220c13df9541fc.err \
$(srcdir)/%reldir%/test_cmds.sh_d76d77ad95b9f120825417a6a8220c13df9541fc.out \
- $(srcdir)/%reldir%/test_cmds.sh_d7eebacdcf2cb194f25fa4ef97b7b5376b442467.err \
- $(srcdir)/%reldir%/test_cmds.sh_d7eebacdcf2cb194f25fa4ef97b7b5376b442467.out \
$(srcdir)/%reldir%/test_cmds.sh_d836c84398c831c976df46f46fe3bf5983c44c37.err \
$(srcdir)/%reldir%/test_cmds.sh_d836c84398c831c976df46f46fe3bf5983c44c37.out \
$(srcdir)/%reldir%/test_cmds.sh_d8eeef53a58bdeddbc1028d7c525413e3ca1c8df.err \
$(srcdir)/%reldir%/test_cmds.sh_d8eeef53a58bdeddbc1028d7c525413e3ca1c8df.out \
+ $(srcdir)/%reldir%/test_cmds.sh_da5f7160b967e60dbd772573614e2da89c5e22b2.err \
+ $(srcdir)/%reldir%/test_cmds.sh_da5f7160b967e60dbd772573614e2da89c5e22b2.out \
$(srcdir)/%reldir%/test_cmds.sh_dbdd62995fdefc8318053af05a32416eccfa79fc.err \
$(srcdir)/%reldir%/test_cmds.sh_dbdd62995fdefc8318053af05a32416eccfa79fc.out \
$(srcdir)/%reldir%/test_cmds.sh_dd41fbbcd71699314af232156d4155fbdf849131.err \
@@ -210,12 +244,16 @@ EXPECTED_FILES = \
$(srcdir)/%reldir%/test_cmds.sh_eb22c3e94c536a1bfaeae0c40d271b5b4b08f4fc.out \
$(srcdir)/%reldir%/test_cmds.sh_ec2b28c6ea328e3ea56b13ab8ca3d9ee856a9dda.err \
$(srcdir)/%reldir%/test_cmds.sh_ec2b28c6ea328e3ea56b13ab8ca3d9ee856a9dda.out \
+ $(srcdir)/%reldir%/test_cmds.sh_ec3a64cad41b070a1d04e2bfc3dc14cb2d964091.err \
+ $(srcdir)/%reldir%/test_cmds.sh_ec3a64cad41b070a1d04e2bfc3dc14cb2d964091.out \
$(srcdir)/%reldir%/test_cmds.sh_ed5b73be0b991e0e8d6735e31df5b37c4286321b.err \
$(srcdir)/%reldir%/test_cmds.sh_ed5b73be0b991e0e8d6735e31df5b37c4286321b.out \
$(srcdir)/%reldir%/test_cmds.sh_f788d5f5932905d09ecbd581040ec5ce76459da5.err \
$(srcdir)/%reldir%/test_cmds.sh_f788d5f5932905d09ecbd581040ec5ce76459da5.out \
$(srcdir)/%reldir%/test_cmds.sh_ff6faebbde8586e04bfadba14a3d2bb4451784ad.err \
$(srcdir)/%reldir%/test_cmds.sh_ff6faebbde8586e04bfadba14a3d2bb4451784ad.out \
+ $(srcdir)/%reldir%/test_config.sh_13fa2428c26fa12e732209620e21466b36bab252.err \
+ $(srcdir)/%reldir%/test_config.sh_13fa2428c26fa12e732209620e21466b36bab252.out \
$(srcdir)/%reldir%/test_config.sh_2765ea0d4c037b8c935840604edb0ae796c97a04.err \
$(srcdir)/%reldir%/test_config.sh_2765ea0d4c037b8c935840604edb0ae796c97a04.out \
$(srcdir)/%reldir%/test_config.sh_5fd9fbccc35e9b06abdd913da0c16bdb306b926e.err \
@@ -244,12 +282,34 @@ EXPECTED_FILES = \
$(srcdir)/%reldir%/test_events.sh_d9c7907f907b2335e1328b23fdc46d0968a608d9.out \
$(srcdir)/%reldir%/test_events.sh_ed8dc44add223341c03ccb7b3e18371bdb42b710.err \
$(srcdir)/%reldir%/test_events.sh_ed8dc44add223341c03ccb7b3e18371bdb42b710.out \
+ $(srcdir)/%reldir%/test_format_installer.sh_1e08efc3b8c7b67d944a1f8c475cd31d98d5b4f6.err \
+ $(srcdir)/%reldir%/test_format_installer.sh_1e08efc3b8c7b67d944a1f8c475cd31d98d5b4f6.out \
+ $(srcdir)/%reldir%/test_format_installer.sh_6cd73153a8990b8ddb8ce489e90ec667a442f7f9.err \
+ $(srcdir)/%reldir%/test_format_installer.sh_6cd73153a8990b8ddb8ce489e90ec667a442f7f9.out \
+ $(srcdir)/%reldir%/test_format_installer.sh_947cbc64a150c7fe2a17e1c7a69e9a932aeaa16b.err \
+ $(srcdir)/%reldir%/test_format_installer.sh_947cbc64a150c7fe2a17e1c7a69e9a932aeaa16b.out \
$(srcdir)/%reldir%/test_format_loader.sh_15e861d2327512a721fd42ae51dc5427689e0bb6.err \
$(srcdir)/%reldir%/test_format_loader.sh_15e861d2327512a721fd42ae51dc5427689e0bb6.out \
$(srcdir)/%reldir%/test_format_loader.sh_5992e2695b7e6cf1f3520dbb87af8fc2b8f27088.err \
$(srcdir)/%reldir%/test_format_loader.sh_5992e2695b7e6cf1f3520dbb87af8fc2b8f27088.out \
$(srcdir)/%reldir%/test_format_loader.sh_fca6c1fb9f3aaa69b3ffb2d1a8a86434b2f4a247.err \
$(srcdir)/%reldir%/test_format_loader.sh_fca6c1fb9f3aaa69b3ffb2d1a8a86434b2f4a247.out \
+ $(srcdir)/%reldir%/test_gantt.sh_3af11588ee36bab7e2caea0f7a24d3c9cafd2310.err \
+ $(srcdir)/%reldir%/test_gantt.sh_3af11588ee36bab7e2caea0f7a24d3c9cafd2310.out \
+ $(srcdir)/%reldir%/test_gantt.sh_63500be50fc6743d8312133e2030cbbc39ca15ff.err \
+ $(srcdir)/%reldir%/test_gantt.sh_63500be50fc6743d8312133e2030cbbc39ca15ff.out \
+ $(srcdir)/%reldir%/test_gantt.sh_74a94ee9103eac5e8e78ca57bccf49efa3827a9d.err \
+ $(srcdir)/%reldir%/test_gantt.sh_74a94ee9103eac5e8e78ca57bccf49efa3827a9d.out \
+ $(srcdir)/%reldir%/test_gantt.sh_83db753dd2669f801810f311e2d7d74397e10f26.err \
+ $(srcdir)/%reldir%/test_gantt.sh_83db753dd2669f801810f311e2d7d74397e10f26.out \
+ $(srcdir)/%reldir%/test_gantt.sh_8fed8a7400042814ba13e50be5e3bd1741d82119.err \
+ $(srcdir)/%reldir%/test_gantt.sh_8fed8a7400042814ba13e50be5e3bd1741d82119.out \
+ $(srcdir)/%reldir%/test_gantt.sh_b013ab41c3cca76cf05a01ca1ba65888be247ada.err \
+ $(srcdir)/%reldir%/test_gantt.sh_b013ab41c3cca76cf05a01ca1ba65888be247ada.out \
+ $(srcdir)/%reldir%/test_gantt.sh_cde7947f361e5f3d4cd1bbc3f7458f426b6a8eb4.err \
+ $(srcdir)/%reldir%/test_gantt.sh_cde7947f361e5f3d4cd1bbc3f7458f426b6a8eb4.out \
+ $(srcdir)/%reldir%/test_gantt.sh_e6a4681a5a671c84c020dc91d7ce03c9d17fde07.err \
+ $(srcdir)/%reldir%/test_gantt.sh_e6a4681a5a671c84c020dc91d7ce03c9d17fde07.out \
$(srcdir)/%reldir%/test_json_format.sh_168cac40c27f547044c89d39eb0ff2ef81da4b21.err \
$(srcdir)/%reldir%/test_json_format.sh_168cac40c27f547044c89d39eb0ff2ef81da4b21.out \
$(srcdir)/%reldir%/test_json_format.sh_1bb0fd243e916546aea22029245ac590dae17a86.err \
@@ -260,6 +320,8 @@ EXPECTED_FILES = \
$(srcdir)/%reldir%/test_json_format.sh_4315a3d6124c14cbe3c474b6dbf4cc8720a9859f.out \
$(srcdir)/%reldir%/test_json_format.sh_469f005b0708d629bc95f0c48a5e390f440c1fef.err \
$(srcdir)/%reldir%/test_json_format.sh_469f005b0708d629bc95f0c48a5e390f440c1fef.out \
+ $(srcdir)/%reldir%/test_json_format.sh_5795c5ffd98ae581b30c6f0983349bf7a6a84501.err \
+ $(srcdir)/%reldir%/test_json_format.sh_5795c5ffd98ae581b30c6f0983349bf7a6a84501.out \
$(srcdir)/%reldir%/test_json_format.sh_6767b91d715338c24c67e928b59c560c84ddf4be.err \
$(srcdir)/%reldir%/test_json_format.sh_6767b91d715338c24c67e928b59c560c84ddf4be.out \
$(srcdir)/%reldir%/test_json_format.sh_6fbe20faa161ab9fa77df7568fff84bf3e47e920.err \
@@ -276,6 +338,8 @@ EXPECTED_FILES = \
$(srcdir)/%reldir%/test_json_format.sh_84a71e94dc34661a70bb9015b67ba00e93e9cfb5.out \
$(srcdir)/%reldir%/test_json_format.sh_85d03b1b41a7f819af135d2521a8f2c59418e907.err \
$(srcdir)/%reldir%/test_json_format.sh_85d03b1b41a7f819af135d2521a8f2c59418e907.out \
+ $(srcdir)/%reldir%/test_json_format.sh_895283eeb4c10e9c1702fafd13723c8085944f88.err \
+ $(srcdir)/%reldir%/test_json_format.sh_895283eeb4c10e9c1702fafd13723c8085944f88.out \
$(srcdir)/%reldir%/test_json_format.sh_8f2ebcd319afc7966ef11e31f9dd646bf6f001dd.err \
$(srcdir)/%reldir%/test_json_format.sh_8f2ebcd319afc7966ef11e31f9dd646bf6f001dd.out \
$(srcdir)/%reldir%/test_json_format.sh_952297a90e312d2184fe3e4df795ddc731b096c9.err \
@@ -302,18 +366,24 @@ EXPECTED_FILES = \
$(srcdir)/%reldir%/test_json_format.sh_f740026626ab554dacb249762d8be7d6539b8c6e.out \
$(srcdir)/%reldir%/test_json_format.sh_fe19b7ebd349cd689b3f5c22618eab5ce995e68e.err \
$(srcdir)/%reldir%/test_json_format.sh_fe19b7ebd349cd689b3f5c22618eab5ce995e68e.out \
+ $(srcdir)/%reldir%/test_logfile.sh_00877d2e9dadab916a02005a068410dfbd85ec74.err \
+ $(srcdir)/%reldir%/test_logfile.sh_00877d2e9dadab916a02005a068410dfbd85ec74.out \
$(srcdir)/%reldir%/test_logfile.sh_05d1505168bf34b89fc0d1a39f1409cfe798119e.err \
$(srcdir)/%reldir%/test_logfile.sh_05d1505168bf34b89fc0d1a39f1409cfe798119e.out \
$(srcdir)/%reldir%/test_logfile.sh_08d731a04c877a34819b35de185e30a74c9fd497.err \
$(srcdir)/%reldir%/test_logfile.sh_08d731a04c877a34819b35de185e30a74c9fd497.out \
$(srcdir)/%reldir%/test_logfile.sh_09bd16e044302f6b121092534708594bdad11b5a.err \
$(srcdir)/%reldir%/test_logfile.sh_09bd16e044302f6b121092534708594bdad11b5a.out \
- $(srcdir)/%reldir%/test_logfile.sh_1c6eee38f66356fcd9a9f0faedaea6dbcc901060.err \
- $(srcdir)/%reldir%/test_logfile.sh_1c6eee38f66356fcd9a9f0faedaea6dbcc901060.out \
+ $(srcdir)/%reldir%/test_logfile.sh_18d9a7beeb09041993d0d6da488fc8192d111bd9.err \
+ $(srcdir)/%reldir%/test_logfile.sh_18d9a7beeb09041993d0d6da488fc8192d111bd9.out \
$(srcdir)/%reldir%/test_logfile.sh_218ecb88b4753010c4264b3ac351260b4811612f.err \
$(srcdir)/%reldir%/test_logfile.sh_218ecb88b4753010c4264b3ac351260b4811612f.out \
$(srcdir)/%reldir%/test_logfile.sh_290a3c49e53c2229a7400c107338fa0bb38375e2.err \
$(srcdir)/%reldir%/test_logfile.sh_290a3c49e53c2229a7400c107338fa0bb38375e2.out \
+ $(srcdir)/%reldir%/test_logfile.sh_2e72d848a51ac1eb476b973c61fe43a65d579ba5.err \
+ $(srcdir)/%reldir%/test_logfile.sh_2e72d848a51ac1eb476b973c61fe43a65d579ba5.out \
+ $(srcdir)/%reldir%/test_logfile.sh_341e491abcf8772422bafb8b0eaea6492da230f6.err \
+ $(srcdir)/%reldir%/test_logfile.sh_341e491abcf8772422bafb8b0eaea6492da230f6.out \
$(srcdir)/%reldir%/test_logfile.sh_3fc6bfd8a6160817211f3e14fde957af75b9dbe7.err \
$(srcdir)/%reldir%/test_logfile.sh_3fc6bfd8a6160817211f3e14fde957af75b9dbe7.out \
$(srcdir)/%reldir%/test_logfile.sh_4a2a907fcb069b8d6e65961a7b2e796d6c3a87b1.err \
@@ -322,12 +392,28 @@ EXPECTED_FILES = \
$(srcdir)/%reldir%/test_logfile.sh_6602faf7817c494c33e32da7ee95f13aa9210d01.out \
$(srcdir)/%reldir%/test_logfile.sh_7c2e11488bccc59458b5775db4b90de964858259.err \
$(srcdir)/%reldir%/test_logfile.sh_7c2e11488bccc59458b5775db4b90de964858259.out \
+ $(srcdir)/%reldir%/test_logfile.sh_82d65f4dac07b1623f8202444d5b9144096e8243.err \
+ $(srcdir)/%reldir%/test_logfile.sh_82d65f4dac07b1623f8202444d5b9144096e8243.out \
+ $(srcdir)/%reldir%/test_logfile.sh_8a5e754cd471e5fdcdaede49c9290903acd7aad6.err \
+ $(srcdir)/%reldir%/test_logfile.sh_8a5e754cd471e5fdcdaede49c9290903acd7aad6.out \
$(srcdir)/%reldir%/test_logfile.sh_a7037efd0c4bbf51940137a44e57d94e9307e83e.err \
$(srcdir)/%reldir%/test_logfile.sh_a7037efd0c4bbf51940137a44e57d94e9307e83e.out \
$(srcdir)/%reldir%/test_logfile.sh_c18e14a26d8261c9f72747118a469266121d5459.err \
$(srcdir)/%reldir%/test_logfile.sh_c18e14a26d8261c9f72747118a469266121d5459.out \
+ $(srcdir)/%reldir%/test_logfile.sh_cc368d4b4bb6a9b9c79bd5a70ffa1f2d9d01e286.err \
+ $(srcdir)/%reldir%/test_logfile.sh_cc368d4b4bb6a9b9c79bd5a70ffa1f2d9d01e286.out \
+ $(srcdir)/%reldir%/test_logfile.sh_ccb0d31813367c8d9dc5b5df383fac5b780711c1.err \
+ $(srcdir)/%reldir%/test_logfile.sh_ccb0d31813367c8d9dc5b5df383fac5b780711c1.out \
+ $(srcdir)/%reldir%/test_logfile.sh_d14f6d8888652321206549df8a9535399f0fd372.err \
+ $(srcdir)/%reldir%/test_logfile.sh_d14f6d8888652321206549df8a9535399f0fd372.out \
+ $(srcdir)/%reldir%/test_logfile.sh_de8d59879fe6aa5a012b0748ff77ae26c07aea89.err \
+ $(srcdir)/%reldir%/test_logfile.sh_de8d59879fe6aa5a012b0748ff77ae26c07aea89.out \
$(srcdir)/%reldir%/test_logfile.sh_e840b674cd65936a72bd64b1dac1524d16fe44c3.err \
$(srcdir)/%reldir%/test_logfile.sh_e840b674cd65936a72bd64b1dac1524d16fe44c3.out \
+ $(srcdir)/%reldir%/test_logfile.sh_f171f265d8d45a2707e8b9f53e938f574c614d25.err \
+ $(srcdir)/%reldir%/test_logfile.sh_f171f265d8d45a2707e8b9f53e938f574c614d25.out \
+ $(srcdir)/%reldir%/test_meta.sh_0ae5840c0758ec95a397493ac3c3d4fabd397a34.err \
+ $(srcdir)/%reldir%/test_meta.sh_0ae5840c0758ec95a397493ac3c3d4fabd397a34.out \
$(srcdir)/%reldir%/test_meta.sh_154047fb52e4831aabf7d36512247bad6a6a2cf7.err \
$(srcdir)/%reldir%/test_meta.sh_154047fb52e4831aabf7d36512247bad6a6a2cf7.out \
$(srcdir)/%reldir%/test_meta.sh_3c9b5940f7533c5fc3d4956a6efce50a9e7132d4.err \
@@ -340,6 +426,8 @@ EXPECTED_FILES = \
$(srcdir)/%reldir%/test_meta.sh_48e85ba0c0945a5085fb4ee255771406061a9c17.out \
$(srcdir)/%reldir%/test_meta.sh_4c39b356748c67ccf8a6027a1af88da532f8252a.err \
$(srcdir)/%reldir%/test_meta.sh_4c39b356748c67ccf8a6027a1af88da532f8252a.out \
+ $(srcdir)/%reldir%/test_meta.sh_65325d1bcb58e530a8d681685fea56803f67a2eb.err \
+ $(srcdir)/%reldir%/test_meta.sh_65325d1bcb58e530a8d681685fea56803f67a2eb.out \
$(srcdir)/%reldir%/test_meta.sh_7b75763926d832bf9784ca234a060859770aabe7.err \
$(srcdir)/%reldir%/test_meta.sh_7b75763926d832bf9784ca234a060859770aabe7.out \
$(srcdir)/%reldir%/test_meta.sh_811b1a8a176b25001a89e35b295a1117ab76969b.err \
@@ -348,6 +436,10 @@ EXPECTED_FILES = \
$(srcdir)/%reldir%/test_meta.sh_83ac877aa9d38b25945cf96d6326a2468187c40f.out \
$(srcdir)/%reldir%/test_meta.sh_a7489c1f0e001adc732b7e2ab31bb30960fda078.err \
$(srcdir)/%reldir%/test_meta.sh_a7489c1f0e001adc732b7e2ab31bb30960fda078.out \
+ $(srcdir)/%reldir%/test_meta.sh_aae427fe704f131f8466fbfc9e7967c2e874530a.err \
+ $(srcdir)/%reldir%/test_meta.sh_aae427fe704f131f8466fbfc9e7967c2e874530a.out \
+ $(srcdir)/%reldir%/test_meta.sh_b622c04c2bede5371bfa6f2627b0474049ecc5e9.err \
+ $(srcdir)/%reldir%/test_meta.sh_b622c04c2bede5371bfa6f2627b0474049ecc5e9.out \
$(srcdir)/%reldir%/test_meta.sh_c063f96398650f130941bbbf4cf63c1244fdbee5.err \
$(srcdir)/%reldir%/test_meta.sh_c063f96398650f130941bbbf4cf63c1244fdbee5.out \
$(srcdir)/%reldir%/test_meta.sh_c75128169049bd88d5eaf8b84a7f617e5ae5d936.err \
@@ -356,6 +448,8 @@ EXPECTED_FILES = \
$(srcdir)/%reldir%/test_meta.sh_c8fb22932af2467a2651797a8a8d8cddcd09431d.out \
$(srcdir)/%reldir%/test_meta.sh_d6af0b41066ca3be0bbce89c83c011f4ecfa516e.err \
$(srcdir)/%reldir%/test_meta.sh_d6af0b41066ca3be0bbce89c83c011f4ecfa516e.out \
+ $(srcdir)/%reldir%/test_meta.sh_f7c55356df0d71c51eb7629c5a81f347083ce1ef.err \
+ $(srcdir)/%reldir%/test_meta.sh_f7c55356df0d71c51eb7629c5a81f347083ce1ef.out \
$(srcdir)/%reldir%/test_meta.sh_fd09cb565f44a114d8c9a519e571918e30262eaf.err \
$(srcdir)/%reldir%/test_meta.sh_fd09cb565f44a114d8c9a519e571918e30262eaf.out \
$(srcdir)/%reldir%/test_meta.sh_fdf4a91aa55262255816dff7d605f1f0a5d6fe92.err \
@@ -376,16 +470,78 @@ EXPECTED_FILES = \
$(srcdir)/%reldir%/test_pretty_print.sh_cd361eeca7e91bfab942b75d6c3422c7a456a111.out \
$(srcdir)/%reldir%/test_pretty_print.sh_f8feb52a321026d9562b271eb37a2c56dfaed329.err \
$(srcdir)/%reldir%/test_pretty_print.sh_f8feb52a321026d9562b271eb37a2c56dfaed329.out \
+ $(srcdir)/%reldir%/test_prql.sh_06900fac5c2e854b1208320b753fcd43d4ba63a3.err \
+ $(srcdir)/%reldir%/test_prql.sh_06900fac5c2e854b1208320b753fcd43d4ba63a3.out \
+ $(srcdir)/%reldir%/test_prql.sh_15ebcd913f56cde35af26c6300533d6e76bf1b55.err \
+ $(srcdir)/%reldir%/test_prql.sh_15ebcd913f56cde35af26c6300533d6e76bf1b55.out \
+ $(srcdir)/%reldir%/test_prql.sh_5aea925b5ad95f55ce6b1b07b7046bc3d7310137.err \
+ $(srcdir)/%reldir%/test_prql.sh_5aea925b5ad95f55ce6b1b07b7046bc3d7310137.out \
+ $(srcdir)/%reldir%/test_regex101.sh_0fa3663a45aca6a328cb728872af7ed7ee896f1c.err \
+ $(srcdir)/%reldir%/test_regex101.sh_0fa3663a45aca6a328cb728872af7ed7ee896f1c.out \
+ $(srcdir)/%reldir%/test_regex101.sh_182ae9244db314a953af2bee969726e381bc5a32.err \
+ $(srcdir)/%reldir%/test_regex101.sh_182ae9244db314a953af2bee969726e381bc5a32.out \
+ $(srcdir)/%reldir%/test_regex101.sh_2158f1f011ba8e1b152396c072790c076fdb8ce8.err \
+ $(srcdir)/%reldir%/test_regex101.sh_2158f1f011ba8e1b152396c072790c076fdb8ce8.out \
+ $(srcdir)/%reldir%/test_regex101.sh_281af24141680330791db7f7c5fa70833ce08a6b.err \
+ $(srcdir)/%reldir%/test_regex101.sh_281af24141680330791db7f7c5fa70833ce08a6b.out \
+ $(srcdir)/%reldir%/test_regex101.sh_35703b13990785632cca82123fb3883797959c0b.err \
+ $(srcdir)/%reldir%/test_regex101.sh_35703b13990785632cca82123fb3883797959c0b.out \
+ $(srcdir)/%reldir%/test_regex101.sh_366730cac50b4a09b7de4b84641791470b1cb9a3.err \
+ $(srcdir)/%reldir%/test_regex101.sh_366730cac50b4a09b7de4b84641791470b1cb9a3.out \
+ $(srcdir)/%reldir%/test_regex101.sh_3d18474a3e472fff6e23e0c41337ec9188fee591.err \
+ $(srcdir)/%reldir%/test_regex101.sh_3d18474a3e472fff6e23e0c41337ec9188fee591.out \
+ $(srcdir)/%reldir%/test_regex101.sh_442cc58676590a3604d5c2183f5fe0a75c98351a.err \
+ $(srcdir)/%reldir%/test_regex101.sh_442cc58676590a3604d5c2183f5fe0a75c98351a.out \
+ $(srcdir)/%reldir%/test_regex101.sh_566fd88d216a44bc1c6e23f2d6f2d0caf99d42f9.err \
+ $(srcdir)/%reldir%/test_regex101.sh_566fd88d216a44bc1c6e23f2d6f2d0caf99d42f9.out \
+ $(srcdir)/%reldir%/test_regex101.sh_5f2f7ecb6ab9cbec4b41385b91bd038906b8a7b2.err \
+ $(srcdir)/%reldir%/test_regex101.sh_5f2f7ecb6ab9cbec4b41385b91bd038906b8a7b2.out \
+ $(srcdir)/%reldir%/test_regex101.sh_629bde30483e0a6461076e9058f3a5eb81ae0425.err \
+ $(srcdir)/%reldir%/test_regex101.sh_629bde30483e0a6461076e9058f3a5eb81ae0425.out \
+ $(srcdir)/%reldir%/test_regex101.sh_630db454054cf92ec9bd0f4e3e83300047f583ff.err \
+ $(srcdir)/%reldir%/test_regex101.sh_630db454054cf92ec9bd0f4e3e83300047f583ff.out \
+ $(srcdir)/%reldir%/test_regex101.sh_771af6f3d29b8350542d5c6e98bdbf4c223cd531.err \
+ $(srcdir)/%reldir%/test_regex101.sh_771af6f3d29b8350542d5c6e98bdbf4c223cd531.out \
+ $(srcdir)/%reldir%/test_regex101.sh_7991a5b617867cf37c9f7baa85ffa425f7d455a2.err \
+ $(srcdir)/%reldir%/test_regex101.sh_7991a5b617867cf37c9f7baa85ffa425f7d455a2.out \
+ $(srcdir)/%reldir%/test_regex101.sh_79ee3f5fe71ccec97b2619d8c1f74ca97ffd2243.err \
+ $(srcdir)/%reldir%/test_regex101.sh_79ee3f5fe71ccec97b2619d8c1f74ca97ffd2243.out \
+ $(srcdir)/%reldir%/test_regex101.sh_7de76c174c58d67bf93e8f01d6d55ebb6a023f10.err \
+ $(srcdir)/%reldir%/test_regex101.sh_7de76c174c58d67bf93e8f01d6d55ebb6a023f10.out \
+ $(srcdir)/%reldir%/test_regex101.sh_8a43e6657d4f60e68d31eb8302542ca28e80d077.err \
+ $(srcdir)/%reldir%/test_regex101.sh_8a43e6657d4f60e68d31eb8302542ca28e80d077.out \
+ $(srcdir)/%reldir%/test_regex101.sh_8e93a3b6b941847c71409a297779fbb0a6666a51.err \
+ $(srcdir)/%reldir%/test_regex101.sh_8e93a3b6b941847c71409a297779fbb0a6666a51.out \
+ $(srcdir)/%reldir%/test_regex101.sh_95c56a9d146ec9a7c2196559d316f928b2ae6ae9.err \
+ $(srcdir)/%reldir%/test_regex101.sh_95c56a9d146ec9a7c2196559d316f928b2ae6ae9.out \
+ $(srcdir)/%reldir%/test_regex101.sh_9d101ee29c45cdb8c0f117ad736c9a5dd5da5839.err \
+ $(srcdir)/%reldir%/test_regex101.sh_9d101ee29c45cdb8c0f117ad736c9a5dd5da5839.out \
+ $(srcdir)/%reldir%/test_regex101.sh_c43e07df9b3068696fdc8759c7561135db981b38.err \
+ $(srcdir)/%reldir%/test_regex101.sh_c43e07df9b3068696fdc8759c7561135db981b38.out \
+ $(srcdir)/%reldir%/test_regex101.sh_cbd859487e4ea011cd6e0f0f114d70158bfd8b43.err \
+ $(srcdir)/%reldir%/test_regex101.sh_cbd859487e4ea011cd6e0f0f114d70158bfd8b43.out \
+ $(srcdir)/%reldir%/test_regex101.sh_cf6c0a9f0f04e24ce1fae7a0a434830b14447f83.err \
+ $(srcdir)/%reldir%/test_regex101.sh_cf6c0a9f0f04e24ce1fae7a0a434830b14447f83.out \
+ $(srcdir)/%reldir%/test_regex101.sh_d84597760285c3964b258726341e018f6cd49954.err \
+ $(srcdir)/%reldir%/test_regex101.sh_d84597760285c3964b258726341e018f6cd49954.out \
+ $(srcdir)/%reldir%/test_regex101.sh_f23e393dbf23d0d8e276e9b7610c7b74d79980f8.err \
+ $(srcdir)/%reldir%/test_regex101.sh_f23e393dbf23d0d8e276e9b7610c7b74d79980f8.out \
+ $(srcdir)/%reldir%/test_regex101.sh_fc41b6ee90cbf038620151f16d164b361acf82dd.err \
+ $(srcdir)/%reldir%/test_regex101.sh_fc41b6ee90cbf038620151f16d164b361acf82dd.out \
$(srcdir)/%reldir%/test_sessions.sh_0300a1391c33b1c45ddfa90198a6bd0a5404a77f.err \
$(srcdir)/%reldir%/test_sessions.sh_0300a1391c33b1c45ddfa90198a6bd0a5404a77f.out \
$(srcdir)/%reldir%/test_sessions.sh_17b85654b929b2a8fc1705a170ced544783292fa.err \
$(srcdir)/%reldir%/test_sessions.sh_17b85654b929b2a8fc1705a170ced544783292fa.out \
+ $(srcdir)/%reldir%/test_sessions.sh_33ab03afda2c9331a289fcbd1abdbc1c37b2e87b.err \
+ $(srcdir)/%reldir%/test_sessions.sh_33ab03afda2c9331a289fcbd1abdbc1c37b2e87b.out \
$(srcdir)/%reldir%/test_sessions.sh_345b0e66dab7b881397c4b38380da81092ab70dd.err \
$(srcdir)/%reldir%/test_sessions.sh_345b0e66dab7b881397c4b38380da81092ab70dd.out \
$(srcdir)/%reldir%/test_sessions.sh_430b9522ba1a37983138f3c4935cba91b781e415.err \
$(srcdir)/%reldir%/test_sessions.sh_430b9522ba1a37983138f3c4935cba91b781e415.out \
$(srcdir)/%reldir%/test_sessions.sh_4f13dd3858546b6e04a27e244159d355e368f2ae.err \
$(srcdir)/%reldir%/test_sessions.sh_4f13dd3858546b6e04a27e244159d355e368f2ae.out \
+ $(srcdir)/%reldir%/test_sessions.sh_639b83ce8f67975dfdc7086946ec287b43b6fa8c.err \
+ $(srcdir)/%reldir%/test_sessions.sh_639b83ce8f67975dfdc7086946ec287b43b6fa8c.out \
$(srcdir)/%reldir%/test_sessions.sh_68a89b56c5e7f7db620084cca1eb547cbb19a2c9.err \
$(srcdir)/%reldir%/test_sessions.sh_68a89b56c5e7f7db620084cca1eb547cbb19a2c9.out \
$(srcdir)/%reldir%/test_sessions.sh_6d87ff483d5785c58fb271a405ff1c35e4f83cd9.err \
@@ -404,8 +560,14 @@ EXPECTED_FILES = \
$(srcdir)/%reldir%/test_sessions.sh_b3d71a87fcb4e3487f71ccad8c6ce681db220572.out \
$(srcdir)/%reldir%/test_sessions.sh_b932b33dd087b94d4306dd179c5d4f9ddd394960.err \
$(srcdir)/%reldir%/test_sessions.sh_b932b33dd087b94d4306dd179c5d4f9ddd394960.out \
+ $(srcdir)/%reldir%/test_sessions.sh_ba1ded92531350668301431db64df2d2f4a2e9ee.err \
+ $(srcdir)/%reldir%/test_sessions.sh_ba1ded92531350668301431db64df2d2f4a2e9ee.out \
$(srcdir)/%reldir%/test_sessions.sh_ddf45811e9906de9f3930fe802ac7b2cc6e48106.err \
$(srcdir)/%reldir%/test_sessions.sh_ddf45811e9906de9f3930fe802ac7b2cc6e48106.out \
+ $(srcdir)/%reldir%/test_sessions.sh_e57697be4d81ac8e5b2b2fa84f919b2d494978f3.err \
+ $(srcdir)/%reldir%/test_sessions.sh_e57697be4d81ac8e5b2b2fa84f919b2d494978f3.out \
+ $(srcdir)/%reldir%/test_sessions.sh_e988439404f2e97604641c8d087855f3efe052e4.err \
+ $(srcdir)/%reldir%/test_sessions.sh_e988439404f2e97604641c8d087855f3efe052e4.out \
$(srcdir)/%reldir%/test_shlexer.sh_14dd967cb2af90899c9e5e45d00b676b5a3163aa.err \
$(srcdir)/%reldir%/test_shlexer.sh_14dd967cb2af90899c9e5e45d00b676b5a3163aa.out \
$(srcdir)/%reldir%/test_shlexer.sh_2781f5dd570580cbe746ad91b58a28b8371283b3.err \
@@ -432,44 +594,62 @@ EXPECTED_FILES = \
$(srcdir)/%reldir%/test_shlexer.sh_e0599f0b53d1bd27af767113853f8e84291f137d.out \
$(srcdir)/%reldir%/test_shlexer.sh_e8fa2239ab17e7563d0c524f5400a79d6ff8bfda.err \
$(srcdir)/%reldir%/test_shlexer.sh_e8fa2239ab17e7563d0c524f5400a79d6ff8bfda.out \
+ $(srcdir)/%reldir%/test_shlexer.sh_e99fe1cde36b85ebbab86ca820f55ec861cdc20b.err \
+ $(srcdir)/%reldir%/test_shlexer.sh_e99fe1cde36b85ebbab86ca820f55ec861cdc20b.out \
$(srcdir)/%reldir%/test_sql.sh_02def66745b063518473df862987747909f56ccc.err \
$(srcdir)/%reldir%/test_sql.sh_02def66745b063518473df862987747909f56ccc.out \
+ $(srcdir)/%reldir%/test_sql.sh_09416e332d9b2f76743836b72e71b6e4492e594e.err \
+ $(srcdir)/%reldir%/test_sql.sh_09416e332d9b2f76743836b72e71b6e4492e594e.out \
$(srcdir)/%reldir%/test_sql.sh_0a5d13b62da4cb66a59a51b0240b5fe0b6036b7e.err \
$(srcdir)/%reldir%/test_sql.sh_0a5d13b62da4cb66a59a51b0240b5fe0b6036b7e.out \
$(srcdir)/%reldir%/test_sql.sh_0d46ee142f80f262c8c14a22751571cc567df525.err \
$(srcdir)/%reldir%/test_sql.sh_0d46ee142f80f262c8c14a22751571cc567df525.out \
$(srcdir)/%reldir%/test_sql.sh_13429aed81d7edfd47b57e9cdb8a25c43aff35c4.err \
$(srcdir)/%reldir%/test_sql.sh_13429aed81d7edfd47b57e9cdb8a25c43aff35c4.out \
+ $(srcdir)/%reldir%/test_sql.sh_19c92996bcc884bfdb70e3d24606cf5070556a74.err \
+ $(srcdir)/%reldir%/test_sql.sh_19c92996bcc884bfdb70e3d24606cf5070556a74.out \
$(srcdir)/%reldir%/test_sql.sh_1cbb81cfe40ee16332c5c775a74d06b945aa65c2.err \
$(srcdir)/%reldir%/test_sql.sh_1cbb81cfe40ee16332c5c775a74d06b945aa65c2.out \
+ $(srcdir)/%reldir%/test_sql.sh_1f892b85dc9008c7b3bab7fdf8aa372a6d5ae22c.err \
+ $(srcdir)/%reldir%/test_sql.sh_1f892b85dc9008c7b3bab7fdf8aa372a6d5ae22c.out \
$(srcdir)/%reldir%/test_sql.sh_2532083f215ed44630621f18df3dd7b77c06ae10.err \
$(srcdir)/%reldir%/test_sql.sh_2532083f215ed44630621f18df3dd7b77c06ae10.out \
+ $(srcdir)/%reldir%/test_sql.sh_26ace94793c68c44801e1ec496e7ab6a02304ce3.err \
+ $(srcdir)/%reldir%/test_sql.sh_26ace94793c68c44801e1ec496e7ab6a02304ce3.out \
$(srcdir)/%reldir%/test_sql.sh_26c0d94d7837792144f2d0f866fb3c12a0bd410d.err \
$(srcdir)/%reldir%/test_sql.sh_26c0d94d7837792144f2d0f866fb3c12a0bd410d.out \
$(srcdir)/%reldir%/test_sql.sh_2959f0c70fca61a07c6c772f193e73022f7794f1.err \
$(srcdir)/%reldir%/test_sql.sh_2959f0c70fca61a07c6c772f193e73022f7794f1.out \
$(srcdir)/%reldir%/test_sql.sh_2a16a6fd0ff235a7877e1ea93b22d873a3609402.err \
$(srcdir)/%reldir%/test_sql.sh_2a16a6fd0ff235a7877e1ea93b22d873a3609402.out \
+ $(srcdir)/%reldir%/test_sql.sh_2c60ed41369d667d1e2a563d54f8edf84682e526.err \
+ $(srcdir)/%reldir%/test_sql.sh_2c60ed41369d667d1e2a563d54f8edf84682e526.out \
$(srcdir)/%reldir%/test_sql.sh_2cc8a92c6eb73741080b187a2670d309b8171c90.err \
$(srcdir)/%reldir%/test_sql.sh_2cc8a92c6eb73741080b187a2670d309b8171c90.out \
+ $(srcdir)/%reldir%/test_sql.sh_2ed3f3b18ef4ecc68e4dd3cc8041b61fcf2a59af.err \
+ $(srcdir)/%reldir%/test_sql.sh_2ed3f3b18ef4ecc68e4dd3cc8041b61fcf2a59af.out \
$(srcdir)/%reldir%/test_sql.sh_2f15b8a38673ac4db45dc6ed2eafe609c332575b.err \
$(srcdir)/%reldir%/test_sql.sh_2f15b8a38673ac4db45dc6ed2eafe609c332575b.out \
$(srcdir)/%reldir%/test_sql.sh_31df37f254255115611fc321b63374a2fa4a1cd5.err \
$(srcdir)/%reldir%/test_sql.sh_31df37f254255115611fc321b63374a2fa4a1cd5.out \
+ $(srcdir)/%reldir%/test_sql.sh_3445b783808f174b76f55dc6b998f721a1aae271.err \
+ $(srcdir)/%reldir%/test_sql.sh_3445b783808f174b76f55dc6b998f721a1aae271.out \
$(srcdir)/%reldir%/test_sql.sh_3d77a2092192caf98e141a6039e886ede836f044.err \
$(srcdir)/%reldir%/test_sql.sh_3d77a2092192caf98e141a6039e886ede836f044.out \
$(srcdir)/%reldir%/test_sql.sh_4090f96ea11a344c1e2939211da778992dab47d8.err \
$(srcdir)/%reldir%/test_sql.sh_4090f96ea11a344c1e2939211da778992dab47d8.out \
+ $(srcdir)/%reldir%/test_sql.sh_4563a807311d0ce3d1f912843e615a6ca579cffa.err \
+ $(srcdir)/%reldir%/test_sql.sh_4563a807311d0ce3d1f912843e615a6ca579cffa.out \
$(srcdir)/%reldir%/test_sql.sh_4629b626c65a85d7a5595571e195b67afca272ba.err \
$(srcdir)/%reldir%/test_sql.sh_4629b626c65a85d7a5595571e195b67afca272ba.out \
+ $(srcdir)/%reldir%/test_sql.sh_4a13356ccbdeb5f73fa063e292b5a6cb25e6c23e.err \
+ $(srcdir)/%reldir%/test_sql.sh_4a13356ccbdeb5f73fa063e292b5a6cb25e6c23e.out \
$(srcdir)/%reldir%/test_sql.sh_50c0b2c93b646b848a017764bde8a4282c556e2d.err \
$(srcdir)/%reldir%/test_sql.sh_50c0b2c93b646b848a017764bde8a4282c556e2d.out \
$(srcdir)/%reldir%/test_sql.sh_528e48a03cdfa7cfbe263a6e22a65606247a8a95.err \
$(srcdir)/%reldir%/test_sql.sh_528e48a03cdfa7cfbe263a6e22a65606247a8a95.out \
$(srcdir)/%reldir%/test_sql.sh_5532c7a21e3f6b7df3aad10d7bdfbb7a812ae6c7.err \
$(srcdir)/%reldir%/test_sql.sh_5532c7a21e3f6b7df3aad10d7bdfbb7a812ae6c7.out \
- $(srcdir)/%reldir%/test_sql.sh_56047c9470e515bc3e3709354c01e5d50462cde7.err \
- $(srcdir)/%reldir%/test_sql.sh_56047c9470e515bc3e3709354c01e5d50462cde7.out \
$(srcdir)/%reldir%/test_sql.sh_57427f3c4b4ec785ffff7c5802c10db0d3e547cf.err \
$(srcdir)/%reldir%/test_sql.sh_57427f3c4b4ec785ffff7c5802c10db0d3e547cf.out \
$(srcdir)/%reldir%/test_sql.sh_57edc93426e6767aa44ab2356c55327553dcdc8d.err \
@@ -478,6 +658,8 @@ EXPECTED_FILES = \
$(srcdir)/%reldir%/test_sql.sh_5801770f3e0ecc1d62c7a97116d6da1981bbc7bd.out \
$(srcdir)/%reldir%/test_sql.sh_5fe26fe4fc22f23f8dbe3a6aab394602886f2971.err \
$(srcdir)/%reldir%/test_sql.sh_5fe26fe4fc22f23f8dbe3a6aab394602886f2971.out \
+ $(srcdir)/%reldir%/test_sql.sh_61471583c5e2f8ede3a8adefce682c27bf3924c8.err \
+ $(srcdir)/%reldir%/test_sql.sh_61471583c5e2f8ede3a8adefce682c27bf3924c8.out \
$(srcdir)/%reldir%/test_sql.sh_62eb85c9569e71a630d72065238559528a16114c.err \
$(srcdir)/%reldir%/test_sql.sh_62eb85c9569e71a630d72065238559528a16114c.out \
$(srcdir)/%reldir%/test_sql.sh_6ad9d0adf85c36363f6b24f49950dcdc13dd34ab.err \
@@ -486,16 +668,22 @@ EXPECTED_FILES = \
$(srcdir)/%reldir%/test_sql.sh_6edb0c8d5323d1b962d90dd6ecdd7eee9008d7b5.out \
$(srcdir)/%reldir%/test_sql.sh_753c343a256d1286750314957d1b4e155464e03e.err \
$(srcdir)/%reldir%/test_sql.sh_753c343a256d1286750314957d1b4e155464e03e.out \
+ $(srcdir)/%reldir%/test_sql.sh_7593b39f4be6fd2124ec7cf10835ee015d475b16.err \
+ $(srcdir)/%reldir%/test_sql.sh_7593b39f4be6fd2124ec7cf10835ee015d475b16.out \
$(srcdir)/%reldir%/test_sql.sh_764306f0e5f610ba71f521ba3d19fe158ece0ba5.err \
$(srcdir)/%reldir%/test_sql.sh_764306f0e5f610ba71f521ba3d19fe158ece0ba5.out \
$(srcdir)/%reldir%/test_sql.sh_7f664c9cda0ae1c48333e21051b5e0eeafd5b4bc.err \
$(srcdir)/%reldir%/test_sql.sh_7f664c9cda0ae1c48333e21051b5e0eeafd5b4bc.out \
+ $(srcdir)/%reldir%/test_sql.sh_859af4cc5f57345be8dcece599419d58f332841a.err \
+ $(srcdir)/%reldir%/test_sql.sh_859af4cc5f57345be8dcece599419d58f332841a.out \
$(srcdir)/%reldir%/test_sql.sh_85fe3b9803254ea54b864d4865d7bd4d7a7f86c6.err \
$(srcdir)/%reldir%/test_sql.sh_85fe3b9803254ea54b864d4865d7bd4d7a7f86c6.out \
$(srcdir)/%reldir%/test_sql.sh_8ee288f1508eaab0367e465e9f382e848f3282aa.err \
$(srcdir)/%reldir%/test_sql.sh_8ee288f1508eaab0367e465e9f382e848f3282aa.out \
$(srcdir)/%reldir%/test_sql.sh_9a209f3ee1b1f543ca2587b695d2eb0e63e74c51.err \
$(srcdir)/%reldir%/test_sql.sh_9a209f3ee1b1f543ca2587b695d2eb0e63e74c51.out \
+ $(srcdir)/%reldir%/test_sql.sh_9aaaa810f883f5dcf8a4d5cda4051fdf4640a65c.err \
+ $(srcdir)/%reldir%/test_sql.sh_9aaaa810f883f5dcf8a4d5cda4051fdf4640a65c.out \
$(srcdir)/%reldir%/test_sql.sh_9b03e9f7a1bc35e408b3a17ee90cfdadea164df6.err \
$(srcdir)/%reldir%/test_sql.sh_9b03e9f7a1bc35e408b3a17ee90cfdadea164df6.out \
$(srcdir)/%reldir%/test_sql.sh_9ceccab07fbf7130bffe3c201c710719e4a3e9af.err \
@@ -504,6 +692,8 @@ EXPECTED_FILES = \
$(srcdir)/%reldir%/test_sql.sh_9e1d05b821822ee40e13fadb24ec558f4bfcff10.out \
$(srcdir)/%reldir%/test_sql.sh_a6b68b9f0044d18e7fa8f9287ddc9110701edc33.err \
$(srcdir)/%reldir%/test_sql.sh_a6b68b9f0044d18e7fa8f9287ddc9110701edc33.out \
+ $(srcdir)/%reldir%/test_sql.sh_a7955e89791db9a252d8323436fabc51e2960731.err \
+ $(srcdir)/%reldir%/test_sql.sh_a7955e89791db9a252d8323436fabc51e2960731.out \
$(srcdir)/%reldir%/test_sql.sh_ae7b1f1684e14bf9c16e0d789257b6ef57cfb2b1.err \
$(srcdir)/%reldir%/test_sql.sh_ae7b1f1684e14bf9c16e0d789257b6ef57cfb2b1.out \
$(srcdir)/%reldir%/test_sql.sh_afe9cdc4898df5c4e112c13dfe3db6dc089c0d7c.err \
@@ -514,10 +704,14 @@ EXPECTED_FILES = \
$(srcdir)/%reldir%/test_sql.sh_b2694e4fbecdd128798af25ee0d069e7e35fb499.out \
$(srcdir)/%reldir%/test_sql.sh_b5aa0561a65de7e8e22085db184c72a94b1a89a9.err \
$(srcdir)/%reldir%/test_sql.sh_b5aa0561a65de7e8e22085db184c72a94b1a89a9.out \
+ $(srcdir)/%reldir%/test_sql.sh_b9330763dea550bbd006d7ae6ae7ea367f831fa3.err \
+ $(srcdir)/%reldir%/test_sql.sh_b9330763dea550bbd006d7ae6ae7ea367f831fa3.out \
$(srcdir)/%reldir%/test_sql.sh_bad03a996c0750733ab99c592b9011851f521a69.err \
$(srcdir)/%reldir%/test_sql.sh_bad03a996c0750733ab99c592b9011851f521a69.out \
$(srcdir)/%reldir%/test_sql.sh_bd46ca4560f8be6307a914e39539bbac0368080a.err \
$(srcdir)/%reldir%/test_sql.sh_bd46ca4560f8be6307a914e39539bbac0368080a.out \
+ $(srcdir)/%reldir%/test_sql.sh_c17933125df910588b806a9d07c2655bc71198ef.err \
+ $(srcdir)/%reldir%/test_sql.sh_c17933125df910588b806a9d07c2655bc71198ef.out \
$(srcdir)/%reldir%/test_sql.sh_c20b0320096342c180146a5d18a6de82319d70b2.err \
$(srcdir)/%reldir%/test_sql.sh_c20b0320096342c180146a5d18a6de82319d70b2.out \
$(srcdir)/%reldir%/test_sql.sh_c353ef036c505b75996252138fbd4c8d22e8149c.err \
@@ -528,20 +722,30 @@ EXPECTED_FILES = \
$(srcdir)/%reldir%/test_sql.sh_c73dec2706fc0b9a124f5da3a83f40d8d3255beb.out \
$(srcdir)/%reldir%/test_sql.sh_c7e1dbf4605914720b55787785abfafdf2c4178a.err \
$(srcdir)/%reldir%/test_sql.sh_c7e1dbf4605914720b55787785abfafdf2c4178a.out \
- $(srcdir)/%reldir%/test_sql.sh_cc77a633a66d1778705a34e3657737547b3fb08d.err \
- $(srcdir)/%reldir%/test_sql.sh_cc77a633a66d1778705a34e3657737547b3fb08d.out \
+ $(srcdir)/%reldir%/test_sql.sh_d4d540f0ef7e34b693fc72078d1cf2e069f86d81.err \
+ $(srcdir)/%reldir%/test_sql.sh_d4d540f0ef7e34b693fc72078d1cf2e069f86d81.out \
$(srcdir)/%reldir%/test_sql.sh_dd540973a0dc86320d84706845a15608196ae5be.err \
$(srcdir)/%reldir%/test_sql.sh_dd540973a0dc86320d84706845a15608196ae5be.out \
+ $(srcdir)/%reldir%/test_sql.sh_e44c0e2834038ec8d9b0b10b993967edb711c03c.err \
+ $(srcdir)/%reldir%/test_sql.sh_e44c0e2834038ec8d9b0b10b993967edb711c03c.out \
$(srcdir)/%reldir%/test_sql.sh_e70dc7d2b686c7f91c2b41b10f3920c50f3ea405.err \
$(srcdir)/%reldir%/test_sql.sh_e70dc7d2b686c7f91c2b41b10f3920c50f3ea405.out \
+ $(srcdir)/%reldir%/test_sql.sh_ef3cecab4ae0b90760f728add5652378e26b2fe6.err \
+ $(srcdir)/%reldir%/test_sql.sh_ef3cecab4ae0b90760f728add5652378e26b2fe6.out \
+ $(srcdir)/%reldir%/test_sql.sh_fea98f976873ee7b55e6f322dda42719a19fb3f0.err \
+ $(srcdir)/%reldir%/test_sql.sh_fea98f976873ee7b55e6f322dda42719a19fb3f0.out \
$(srcdir)/%reldir%/test_sql.sh_ff8a978fc0de0fed675a3cd1454cf435a6856fd5.err \
$(srcdir)/%reldir%/test_sql.sh_ff8a978fc0de0fed675a3cd1454cf435a6856fd5.out \
+ $(srcdir)/%reldir%/test_sql.sh_ffbc3dbf8464455358a77acffa10a8dd8a080374.err \
+ $(srcdir)/%reldir%/test_sql.sh_ffbc3dbf8464455358a77acffa10a8dd8a080374.out \
$(srcdir)/%reldir%/test_sql_anno.sh_028d5d5af2f3519b59d349d41cb7ecf385253b51.err \
$(srcdir)/%reldir%/test_sql_anno.sh_028d5d5af2f3519b59d349d41cb7ecf385253b51.out \
$(srcdir)/%reldir%/test_sql_anno.sh_0a37c43350ddd7a2d0d75695be32fac083ad04a4.err \
$(srcdir)/%reldir%/test_sql_anno.sh_0a37c43350ddd7a2d0d75695be32fac083ad04a4.out \
$(srcdir)/%reldir%/test_sql_anno.sh_1151e5b727f6b57070bf2c8f047f1d7e02b803a6.err \
$(srcdir)/%reldir%/test_sql_anno.sh_1151e5b727f6b57070bf2c8f047f1d7e02b803a6.out \
+ $(srcdir)/%reldir%/test_sql_anno.sh_1398146cf8b4f074ec8b9752f021cf47d011bebc.err \
+ $(srcdir)/%reldir%/test_sql_anno.sh_1398146cf8b4f074ec8b9752f021cf47d011bebc.out \
$(srcdir)/%reldir%/test_sql_anno.sh_1b29488b949c294479aa6054f80a35bc106b454b.err \
$(srcdir)/%reldir%/test_sql_anno.sh_1b29488b949c294479aa6054f80a35bc106b454b.out \
$(srcdir)/%reldir%/test_sql_anno.sh_331a152080d2e278b7cc0a37728eca1ded36ed72.err \
@@ -568,6 +772,10 @@ EXPECTED_FILES = \
$(srcdir)/%reldir%/test_sql_anno.sh_c909647ed0e585002074f55c946f3033df1815b2.out \
$(srcdir)/%reldir%/test_sql_anno.sh_ce0506ee7a12eb0f7b970522cc6a79180ecb20cc.err \
$(srcdir)/%reldir%/test_sql_anno.sh_ce0506ee7a12eb0f7b970522cc6a79180ecb20cc.out \
+ $(srcdir)/%reldir%/test_sql_anno.sh_de46094b6e005285dc0921ef9979e36240c5042d.err \
+ $(srcdir)/%reldir%/test_sql_anno.sh_de46094b6e005285dc0921ef9979e36240c5042d.out \
+ $(srcdir)/%reldir%/test_sql_anno.sh_e7dae4ba18c42c416ed03afd8819200f63e89ac8.err \
+ $(srcdir)/%reldir%/test_sql_anno.sh_e7dae4ba18c42c416ed03afd8819200f63e89ac8.out \
$(srcdir)/%reldir%/test_sql_anno.sh_f3c64191d6016767a5857fbb1bad26548586bb96.err \
$(srcdir)/%reldir%/test_sql_anno.sh_f3c64191d6016767a5857fbb1bad26548586bb96.out \
$(srcdir)/%reldir%/test_sql_coll_func.sh_077cab6e271c914daf5b221cc512853077891f35.err \
@@ -606,8 +814,12 @@ EXPECTED_FILES = \
$(srcdir)/%reldir%/test_sql_fs_func.sh_18ddc138b263dd06f3fe81fec05bc4330caffef7.out \
$(srcdir)/%reldir%/test_sql_fs_func.sh_20a76db446a0a558dcbdf41033f97d4a22ca1bfa.err \
$(srcdir)/%reldir%/test_sql_fs_func.sh_20a76db446a0a558dcbdf41033f97d4a22ca1bfa.out \
+ $(srcdir)/%reldir%/test_sql_fs_func.sh_2aa83fc90c850cdd11e3136a1a02b79c5879824b.err \
+ $(srcdir)/%reldir%/test_sql_fs_func.sh_2aa83fc90c850cdd11e3136a1a02b79c5879824b.out \
$(srcdir)/%reldir%/test_sql_fs_func.sh_2c3f66e78deb8721b1d1fe5a787e9958895401d7.err \
$(srcdir)/%reldir%/test_sql_fs_func.sh_2c3f66e78deb8721b1d1fe5a787e9958895401d7.out \
+ $(srcdir)/%reldir%/test_sql_fs_func.sh_34baa8050f8278d7b68c29e53bdd9f37da0f34c8.err \
+ $(srcdir)/%reldir%/test_sql_fs_func.sh_34baa8050f8278d7b68c29e53bdd9f37da0f34c8.out \
$(srcdir)/%reldir%/test_sql_fs_func.sh_3ed11101a413e47c3dfe219557b7a6df04a64253.err \
$(srcdir)/%reldir%/test_sql_fs_func.sh_3ed11101a413e47c3dfe219557b7a6df04a64253.out \
$(srcdir)/%reldir%/test_sql_fs_func.sh_469380561dccd79c7249562067107c330838eaad.err \
@@ -624,6 +836,8 @@ EXPECTED_FILES = \
$(srcdir)/%reldir%/test_sql_fs_func.sh_7b5d7dd8d0003ab83e3e5cb0a5ce802fe9a0e3b3.out \
$(srcdir)/%reldir%/test_sql_fs_func.sh_917ffde411c1425e8a6addae0170900dcd553986.err \
$(srcdir)/%reldir%/test_sql_fs_func.sh_917ffde411c1425e8a6addae0170900dcd553986.out \
+ $(srcdir)/%reldir%/test_sql_fs_func.sh_9234a453403934587bbbdde355281a956d1fbe5f.err \
+ $(srcdir)/%reldir%/test_sql_fs_func.sh_9234a453403934587bbbdde355281a956d1fbe5f.out \
$(srcdir)/%reldir%/test_sql_fs_func.sh_9e2c0a90ce333365ff7354375f2c609bc27135c8.err \
$(srcdir)/%reldir%/test_sql_fs_func.sh_9e2c0a90ce333365ff7354375f2c609bc27135c8.out \
$(srcdir)/%reldir%/test_sql_fs_func.sh_a247b137e71124e496f1beab56c7fe85717c4199.err \
@@ -648,6 +862,8 @@ EXPECTED_FILES = \
$(srcdir)/%reldir%/test_sql_indexes.sh_026dd9752b6101e0791689d3a2026f7e517e36f5.out \
$(srcdir)/%reldir%/test_sql_indexes.sh_1614ebb5e2e83bab11023354dea8a0885ddf64b4.err \
$(srcdir)/%reldir%/test_sql_indexes.sh_1614ebb5e2e83bab11023354dea8a0885ddf64b4.out \
+ $(srcdir)/%reldir%/test_sql_indexes.sh_2b4945247332d01b08e6f17340f7d17f3b3649b8.err \
+ $(srcdir)/%reldir%/test_sql_indexes.sh_2b4945247332d01b08e6f17340f7d17f3b3649b8.out \
$(srcdir)/%reldir%/test_sql_indexes.sh_541a8e35f34a206e340a3880128b6ce137847872.err \
$(srcdir)/%reldir%/test_sql_indexes.sh_541a8e35f34a206e340a3880128b6ce137847872.out \
$(srcdir)/%reldir%/test_sql_indexes.sh_59a1497c13a5e09bc8f95ef02552b2835ebea6e5.err \
@@ -740,10 +956,16 @@ EXPECTED_FILES = \
$(srcdir)/%reldir%/test_sql_json_func.sh_f34205b59e04f261897ad89f659595c743a18ca9.out \
$(srcdir)/%reldir%/test_sql_json_func.sh_f34f5dfa938a1ac7721f924beb16bbceec127a1b.err \
$(srcdir)/%reldir%/test_sql_json_func.sh_f34f5dfa938a1ac7721f924beb16bbceec127a1b.out \
+ $(srcdir)/%reldir%/test_sql_regexp.sh_02ef03572fd2bcf39bab8e29cf1c735ff7c3f297.err \
+ $(srcdir)/%reldir%/test_sql_regexp.sh_02ef03572fd2bcf39bab8e29cf1c735ff7c3f297.out \
$(srcdir)/%reldir%/test_sql_regexp.sh_03257c56e85558aa0cc925b68d3af962afc25125.err \
$(srcdir)/%reldir%/test_sql_regexp.sh_03257c56e85558aa0cc925b68d3af962afc25125.out \
+ $(srcdir)/%reldir%/test_sql_regexp.sh_219a579cf7744fa08ab79fadd08b521b2f18a661.err \
+ $(srcdir)/%reldir%/test_sql_regexp.sh_219a579cf7744fa08ab79fadd08b521b2f18a661.out \
$(srcdir)/%reldir%/test_sql_regexp.sh_51293df041b6969ccecc60204dce3676d0fb006d.err \
$(srcdir)/%reldir%/test_sql_regexp.sh_51293df041b6969ccecc60204dce3676d0fb006d.out \
+ $(srcdir)/%reldir%/test_sql_regexp.sh_a610798fefdacd8d0179a4b17cd757d00fb731be.err \
+ $(srcdir)/%reldir%/test_sql_regexp.sh_a610798fefdacd8d0179a4b17cd757d00fb731be.out \
$(srcdir)/%reldir%/test_sql_regexp.sh_b841a0c09601e2419eeb99e85f7e286c889e4801.err \
$(srcdir)/%reldir%/test_sql_regexp.sh_b841a0c09601e2419eeb99e85f7e286c889e4801.out \
$(srcdir)/%reldir%/test_sql_regexp.sh_bbd1128cf61a9af8f9dc937b46217443f42e1a7a.err \
@@ -764,12 +986,16 @@ EXPECTED_FILES = \
$(srcdir)/%reldir%/test_sql_search_table.sh_df0fd242f57a96d40f466493938cda0789a094fa.out \
$(srcdir)/%reldir%/test_sql_search_table.sh_ef9373a76853f345d06234f6e0fe11b5d40da27b.err \
$(srcdir)/%reldir%/test_sql_search_table.sh_ef9373a76853f345d06234f6e0fe11b5d40da27b.out \
+ $(srcdir)/%reldir%/test_sql_str_func.sh_00363f89638cb968584afc1ca0a4f52b2cf7a2ae.err \
+ $(srcdir)/%reldir%/test_sql_str_func.sh_00363f89638cb968584afc1ca0a4f52b2cf7a2ae.out \
$(srcdir)/%reldir%/test_sql_str_func.sh_005b9365ac99596e539f47c9fe432668c209b21f.err \
$(srcdir)/%reldir%/test_sql_str_func.sh_005b9365ac99596e539f47c9fe432668c209b21f.out \
$(srcdir)/%reldir%/test_sql_str_func.sh_04712488fe50554eb36d3ced80f9a033602f3daa.err \
$(srcdir)/%reldir%/test_sql_str_func.sh_04712488fe50554eb36d3ced80f9a033602f3daa.out \
$(srcdir)/%reldir%/test_sql_str_func.sh_0947bfe7ec626eaa0409a45b10fcbb634fb12eb7.err \
$(srcdir)/%reldir%/test_sql_str_func.sh_0947bfe7ec626eaa0409a45b10fcbb634fb12eb7.out \
+ $(srcdir)/%reldir%/test_sql_str_func.sh_0db1c1b406ba6ef2dadcbe90a3fdbe794a664eb5.err \
+ $(srcdir)/%reldir%/test_sql_str_func.sh_0db1c1b406ba6ef2dadcbe90a3fdbe794a664eb5.out \
$(srcdir)/%reldir%/test_sql_str_func.sh_11bcc5d32eabbedb6974f160dace9ef1ef0009e9.err \
$(srcdir)/%reldir%/test_sql_str_func.sh_11bcc5d32eabbedb6974f160dace9ef1ef0009e9.out \
$(srcdir)/%reldir%/test_sql_str_func.sh_11d458fdadd00df1239a0eeaac049abb49ed212d.err \
@@ -778,6 +1004,8 @@ EXPECTED_FILES = \
$(srcdir)/%reldir%/test_sql_str_func.sh_129e58679e72f3cc5864812026e49a7917baf3d0.out \
$(srcdir)/%reldir%/test_sql_str_func.sh_151a0fd71ef6837c8cbd8a67e315019b5812b079.err \
$(srcdir)/%reldir%/test_sql_str_func.sh_151a0fd71ef6837c8cbd8a67e315019b5812b079.out \
+ $(srcdir)/%reldir%/test_sql_str_func.sh_1a1e07b6f72bce5402037761fa8afd66c05b4c34.err \
+ $(srcdir)/%reldir%/test_sql_str_func.sh_1a1e07b6f72bce5402037761fa8afd66c05b4c34.out \
$(srcdir)/%reldir%/test_sql_str_func.sh_1e7362ac3d9690b1b2cfbd320b6129c46ecfbb8a.err \
$(srcdir)/%reldir%/test_sql_str_func.sh_1e7362ac3d9690b1b2cfbd320b6129c46ecfbb8a.out \
$(srcdir)/%reldir%/test_sql_str_func.sh_211c5428db0590795072c31cb116ef35281e02b5.err \
@@ -790,8 +1018,6 @@ EXPECTED_FILES = \
$(srcdir)/%reldir%/test_sql_str_func.sh_352434d199f7b493668c9f2774472eb69ef0d9f0.out \
$(srcdir)/%reldir%/test_sql_str_func.sh_36fc9005464f1106f969559e640d9fa36d5fadad.err \
$(srcdir)/%reldir%/test_sql_str_func.sh_36fc9005464f1106f969559e640d9fa36d5fadad.out \
- $(srcdir)/%reldir%/test_sql_str_func.sh_3855d2cc0ab29171cae8e722f130adec25eae36e.err \
- $(srcdir)/%reldir%/test_sql_str_func.sh_3855d2cc0ab29171cae8e722f130adec25eae36e.out \
$(srcdir)/%reldir%/test_sql_str_func.sh_3de72fe5c1751dd212a1cd45cf2caa7f3b52bced.err \
$(srcdir)/%reldir%/test_sql_str_func.sh_3de72fe5c1751dd212a1cd45cf2caa7f3b52bced.out \
$(srcdir)/%reldir%/test_sql_str_func.sh_4b402274da152135c6c99456b693e1ecabca0256.err \
@@ -802,6 +1028,8 @@ EXPECTED_FILES = \
$(srcdir)/%reldir%/test_sql_str_func.sh_51766b600fd158a9e0677f6b0fa31b83537b2e5b.out \
$(srcdir)/%reldir%/test_sql_str_func.sh_5203db1a4a81e43a693f339fd26e1ed635da9d5a.err \
$(srcdir)/%reldir%/test_sql_str_func.sh_5203db1a4a81e43a693f339fd26e1ed635da9d5a.out \
+ $(srcdir)/%reldir%/test_sql_str_func.sh_57fc889eefb98571ecf3892ad670646613bf13a3.err \
+ $(srcdir)/%reldir%/test_sql_str_func.sh_57fc889eefb98571ecf3892ad670646613bf13a3.out \
$(srcdir)/%reldir%/test_sql_str_func.sh_5abe3717393fba14ec510a37b4b94fedc67aae8e.err \
$(srcdir)/%reldir%/test_sql_str_func.sh_5abe3717393fba14ec510a37b4b94fedc67aae8e.out \
$(srcdir)/%reldir%/test_sql_str_func.sh_5e436fbd4efb140600999c5208886a5a57b8a30e.err \
@@ -814,8 +1042,12 @@ EXPECTED_FILES = \
$(srcdir)/%reldir%/test_sql_str_func.sh_660288b48d9b30244621d873944938f7ef043976.out \
$(srcdir)/%reldir%/test_sql_str_func.sh_6607c0dd8baff16930eb3e0daf6354af5b50052b.err \
$(srcdir)/%reldir%/test_sql_str_func.sh_6607c0dd8baff16930eb3e0daf6354af5b50052b.out \
+ $(srcdir)/%reldir%/test_sql_str_func.sh_68860c50e91cd6c1f2004ee0414a6e930ed42c87.err \
+ $(srcdir)/%reldir%/test_sql_str_func.sh_68860c50e91cd6c1f2004ee0414a6e930ed42c87.out \
$(srcdir)/%reldir%/test_sql_str_func.sh_69f5d49e62da48e188bd9d6af4bd3adeb21eb7d1.err \
$(srcdir)/%reldir%/test_sql_str_func.sh_69f5d49e62da48e188bd9d6af4bd3adeb21eb7d1.out \
+ $(srcdir)/%reldir%/test_sql_str_func.sh_6ac7ab1f90c064944ff66bef5974f050c8227d4b.err \
+ $(srcdir)/%reldir%/test_sql_str_func.sh_6ac7ab1f90c064944ff66bef5974f050c8227d4b.out \
$(srcdir)/%reldir%/test_sql_str_func.sh_6ff984d8ed3e5099376d19f0dd20d5fd1ed42494.err \
$(srcdir)/%reldir%/test_sql_str_func.sh_6ff984d8ed3e5099376d19f0dd20d5fd1ed42494.out \
$(srcdir)/%reldir%/test_sql_str_func.sh_71f37db33504b2c08a7a3323c482556f53d88100.err \
@@ -868,6 +1100,8 @@ EXPECTED_FILES = \
$(srcdir)/%reldir%/test_sql_str_func.sh_b2aafbcaa7befe426d3f9df71c24f16fdc9d2856.out \
$(srcdir)/%reldir%/test_sql_str_func.sh_b81b27abfafbd357d41c407428d41ae0f4bb75e2.err \
$(srcdir)/%reldir%/test_sql_str_func.sh_b81b27abfafbd357d41c407428d41ae0f4bb75e2.out \
+ $(srcdir)/%reldir%/test_sql_str_func.sh_b8ebe81c4881f704624a65ec91be0868c310f6ed.err \
+ $(srcdir)/%reldir%/test_sql_str_func.sh_b8ebe81c4881f704624a65ec91be0868c310f6ed.out \
$(srcdir)/%reldir%/test_sql_str_func.sh_bac7f6531a2adf70cd1871fb13eab26dff133b7c.err \
$(srcdir)/%reldir%/test_sql_str_func.sh_bac7f6531a2adf70cd1871fb13eab26dff133b7c.out \
$(srcdir)/%reldir%/test_sql_str_func.sh_bfb7088916412360f77683009058b0747784630a.err \
@@ -880,6 +1114,8 @@ EXPECTED_FILES = \
$(srcdir)/%reldir%/test_sql_str_func.sh_c9e2f41431bef879364dc37a472ab01f64d89f89.out \
$(srcdir)/%reldir%/test_sql_str_func.sh_cc53348c585ee71a7456157ad6b125689813bafe.err \
$(srcdir)/%reldir%/test_sql_str_func.sh_cc53348c585ee71a7456157ad6b125689813bafe.out \
+ $(srcdir)/%reldir%/test_sql_str_func.sh_cdc7b869132c33cae3c2565806c2396e1b4d6253.err \
+ $(srcdir)/%reldir%/test_sql_str_func.sh_cdc7b869132c33cae3c2565806c2396e1b4d6253.out \
$(srcdir)/%reldir%/test_sql_str_func.sh_ce9db1dbc2e5fee87247135d17787ff3af014d77.err \
$(srcdir)/%reldir%/test_sql_str_func.sh_ce9db1dbc2e5fee87247135d17787ff3af014d77.out \
$(srcdir)/%reldir%/test_sql_str_func.sh_d3367527118052081a541a660b091f6f495b1c0d.err \
@@ -916,12 +1152,16 @@ EXPECTED_FILES = \
$(srcdir)/%reldir%/test_sql_time_func.sh_4035ee76938269e9247f9a696927a9ac18cce80a.out \
$(srcdir)/%reldir%/test_sql_time_func.sh_42f0fc1a154b0d79b4f6e846f283426be498040f.err \
$(srcdir)/%reldir%/test_sql_time_func.sh_42f0fc1a154b0d79b4f6e846f283426be498040f.out \
+ $(srcdir)/%reldir%/test_sql_time_func.sh_4364c7f5354fe108874dd22571115e012303e001.err \
+ $(srcdir)/%reldir%/test_sql_time_func.sh_4364c7f5354fe108874dd22571115e012303e001.out \
$(srcdir)/%reldir%/test_sql_time_func.sh_4b96fe71bc2d18955e3625b765a6095ab1f7a75d.err \
$(srcdir)/%reldir%/test_sql_time_func.sh_4b96fe71bc2d18955e3625b765a6095ab1f7a75d.out \
$(srcdir)/%reldir%/test_sql_time_func.sh_53b76b094e47691b5bca106142ee470e82e8e420.err \
$(srcdir)/%reldir%/test_sql_time_func.sh_53b76b094e47691b5bca106142ee470e82e8e420.out \
$(srcdir)/%reldir%/test_sql_time_func.sh_6288a9e690d381602b2be5665cc1cd3552733bc2.err \
$(srcdir)/%reldir%/test_sql_time_func.sh_6288a9e690d381602b2be5665cc1cd3552733bc2.out \
+ $(srcdir)/%reldir%/test_sql_time_func.sh_63f22db8689c238d51c9b9efe9837147ea5318e6.err \
+ $(srcdir)/%reldir%/test_sql_time_func.sh_63f22db8689c238d51c9b9efe9837147ea5318e6.out \
$(srcdir)/%reldir%/test_sql_time_func.sh_652bbd00b5159e22d94970ab1e882997d14b5777.err \
$(srcdir)/%reldir%/test_sql_time_func.sh_652bbd00b5159e22d94970ab1e882997d14b5777.out \
$(srcdir)/%reldir%/test_sql_time_func.sh_6832a58259168622af8b3370b0c89534f98f3f9f.err \
@@ -930,14 +1170,24 @@ EXPECTED_FILES = \
$(srcdir)/%reldir%/test_sql_time_func.sh_72862ec9c8f261a8507d237eb673c7ddfaafd898.out \
$(srcdir)/%reldir%/test_sql_time_func.sh_7797302b63d73234c9ec9f0405c7c0a748daf8e9.err \
$(srcdir)/%reldir%/test_sql_time_func.sh_7797302b63d73234c9ec9f0405c7c0a748daf8e9.out \
+ $(srcdir)/%reldir%/test_sql_time_func.sh_7ae9dbbb69dbc50ee6a34afc03d2579f09363068.err \
+ $(srcdir)/%reldir%/test_sql_time_func.sh_7ae9dbbb69dbc50ee6a34afc03d2579f09363068.out \
$(srcdir)/%reldir%/test_sql_time_func.sh_9569ab40cb2e51c60f818a6c2729c60d86565e7e.err \
$(srcdir)/%reldir%/test_sql_time_func.sh_9569ab40cb2e51c60f818a6c2729c60d86565e7e.out \
$(srcdir)/%reldir%/test_sql_time_func.sh_9e649c4bc10f4d178519983358f7092e9c5dfe71.err \
$(srcdir)/%reldir%/test_sql_time_func.sh_9e649c4bc10f4d178519983358f7092e9c5dfe71.out \
$(srcdir)/%reldir%/test_sql_time_func.sh_b0257ced663fc444801a5e6cba89c3053acca11e.err \
$(srcdir)/%reldir%/test_sql_time_func.sh_b0257ced663fc444801a5e6cba89c3053acca11e.out \
+ $(srcdir)/%reldir%/test_sql_time_func.sh_b3c00f049fdeb551a9165c281630e36359832d1f.err \
+ $(srcdir)/%reldir%/test_sql_time_func.sh_b3c00f049fdeb551a9165c281630e36359832d1f.out \
$(srcdir)/%reldir%/test_sql_time_func.sh_b5f9ec3ea8b4551fd40017398d74c524fb54ebc9.err \
$(srcdir)/%reldir%/test_sql_time_func.sh_b5f9ec3ea8b4551fd40017398d74c524fb54ebc9.out \
+ $(srcdir)/%reldir%/test_sql_time_func.sh_c1d7dc8a4bd3b8cb86a2f893f58a56f0f6ea1bc3.err \
+ $(srcdir)/%reldir%/test_sql_time_func.sh_c1d7dc8a4bd3b8cb86a2f893f58a56f0f6ea1bc3.out \
+ $(srcdir)/%reldir%/test_sql_time_func.sh_c5a5fc2edb54d10f1475afa7fed0b62bc05e1dc6.err \
+ $(srcdir)/%reldir%/test_sql_time_func.sh_c5a5fc2edb54d10f1475afa7fed0b62bc05e1dc6.out \
+ $(srcdir)/%reldir%/test_sql_time_func.sh_c7fc60392a2e52b163da1e1dde6978c16f415a9e.err \
+ $(srcdir)/%reldir%/test_sql_time_func.sh_c7fc60392a2e52b163da1e1dde6978c16f415a9e.out \
$(srcdir)/%reldir%/test_sql_time_func.sh_dbe786c096d5a7a5e1d05311b929f1427d8bac79.err \
$(srcdir)/%reldir%/test_sql_time_func.sh_dbe786c096d5a7a5e1d05311b929f1427d8bac79.out \
$(srcdir)/%reldir%/test_sql_time_func.sh_f3b1ea49779117bf45f85ad5615fdc5e89193db6.err \
@@ -946,6 +1196,10 @@ EXPECTED_FILES = \
$(srcdir)/%reldir%/test_sql_views_vtab.sh_28e23f4e98b1acd6478e39844fd9306b444550c3.out \
$(srcdir)/%reldir%/test_sql_views_vtab.sh_32acc1a8bb5028636fdbf08f077f9a835ab51bec.err \
$(srcdir)/%reldir%/test_sql_views_vtab.sh_32acc1a8bb5028636fdbf08f077f9a835ab51bec.out \
+ $(srcdir)/%reldir%/test_sql_views_vtab.sh_4363d60040424a573ed79ee4260a32e3cd72f62c.err \
+ $(srcdir)/%reldir%/test_sql_views_vtab.sh_4363d60040424a573ed79ee4260a32e3cd72f62c.out \
+ $(srcdir)/%reldir%/test_sql_views_vtab.sh_45dbef06572b43cb997682436e753a13e003f792.err \
+ $(srcdir)/%reldir%/test_sql_views_vtab.sh_45dbef06572b43cb997682436e753a13e003f792.out \
$(srcdir)/%reldir%/test_sql_views_vtab.sh_485a6ac7c69bd4b5d34d3399a9c17f6a2dc89ad3.err \
$(srcdir)/%reldir%/test_sql_views_vtab.sh_485a6ac7c69bd4b5d34d3399a9c17f6a2dc89ad3.out \
$(srcdir)/%reldir%/test_sql_views_vtab.sh_62d15cb9d5a9259f198aa01ca8ed200d6da38d68.err \
@@ -970,6 +1224,8 @@ EXPECTED_FILES = \
$(srcdir)/%reldir%/test_sql_views_vtab.sh_a1e6ee4f098d525330d5f58a9d71cbbd816d51bb.out \
$(srcdir)/%reldir%/test_sql_views_vtab.sh_a2c0f0e51b3f85ea2a05ecdcacaad962b4fe5d4f.err \
$(srcdir)/%reldir%/test_sql_views_vtab.sh_a2c0f0e51b3f85ea2a05ecdcacaad962b4fe5d4f.out \
+ $(srcdir)/%reldir%/test_sql_views_vtab.sh_a7a7fd577f710aa8b0ad5a94fdfb35daea75e06c.err \
+ $(srcdir)/%reldir%/test_sql_views_vtab.sh_a7a7fd577f710aa8b0ad5a94fdfb35daea75e06c.out \
$(srcdir)/%reldir%/test_sql_views_vtab.sh_ac1f6e9a88608ef8939f9c2f7061a25a86742d46.err \
$(srcdir)/%reldir%/test_sql_views_vtab.sh_ac1f6e9a88608ef8939f9c2f7061a25a86742d46.out \
$(srcdir)/%reldir%/test_sql_views_vtab.sh_ade121f29bedea0d1a54452cc994b2302ad9dabb.err \
@@ -990,32 +1246,74 @@ EXPECTED_FILES = \
$(srcdir)/%reldir%/test_sql_xml_func.sh_46dfa23e2effabf3fa150c4b871fd8d22b1c834d.out \
$(srcdir)/%reldir%/test_sql_xml_func.sh_4effabf11b59580e5f0727199eb74fba049c0cda.err \
$(srcdir)/%reldir%/test_sql_xml_func.sh_4effabf11b59580e5f0727199eb74fba049c0cda.out \
+ $(srcdir)/%reldir%/test_sql_xml_func.sh_81ad7678f080870956db37174bcf1054586cfbad.err \
+ $(srcdir)/%reldir%/test_sql_xml_func.sh_81ad7678f080870956db37174bcf1054586cfbad.out \
$(srcdir)/%reldir%/test_sql_xml_func.sh_8912b59d5b515ab1373a3d9bc635ebabacd01dfd.err \
$(srcdir)/%reldir%/test_sql_xml_func.sh_8912b59d5b515ab1373a3d9bc635ebabacd01dfd.out \
$(srcdir)/%reldir%/test_sql_xml_func.sh_b036c73528a446cba46625767517cdac868aba72.err \
$(srcdir)/%reldir%/test_sql_xml_func.sh_b036c73528a446cba46625767517cdac868aba72.out \
+ $(srcdir)/%reldir%/test_sql_xml_func.sh_bcbd691bb24c4f7bcb9fe0e035b290815f1c8874.err \
+ $(srcdir)/%reldir%/test_sql_xml_func.sh_bcbd691bb24c4f7bcb9fe0e035b290815f1c8874.out \
$(srcdir)/%reldir%/test_sql_xml_func.sh_fefeb387ae14d4171225ea06cbbff3ec43990cf0.err \
$(srcdir)/%reldir%/test_sql_xml_func.sh_fefeb387ae14d4171225ea06cbbff3ec43990cf0.out \
- $(srcdir)/%reldir%/test_sql_yaml_func.sh_41c6abde708a69e74f5b7fde865d88fa75f91e0a.err \
- $(srcdir)/%reldir%/test_sql_yaml_func.sh_41c6abde708a69e74f5b7fde865d88fa75f91e0a.out \
$(srcdir)/%reldir%/test_sql_yaml_func.sh_dc189d02e8979b7ed245d5d750f68b9965984699.err \
$(srcdir)/%reldir%/test_sql_yaml_func.sh_dc189d02e8979b7ed245d5d750f68b9965984699.out \
+ $(srcdir)/%reldir%/test_text_file.sh_02a0514e0e384e5511ae202ea519552ba04030ed.err \
+ $(srcdir)/%reldir%/test_text_file.sh_02a0514e0e384e5511ae202ea519552ba04030ed.out \
+ $(srcdir)/%reldir%/test_text_file.sh_0bba304f34ae07c4fa9e91e0b42f5fe98654a6a8.err \
+ $(srcdir)/%reldir%/test_text_file.sh_0bba304f34ae07c4fa9e91e0b42f5fe98654a6a8.out \
+ $(srcdir)/%reldir%/test_text_file.sh_11fd274911e45a743b4de616888a64183d07cb76.err \
+ $(srcdir)/%reldir%/test_text_file.sh_11fd274911e45a743b4de616888a64183d07cb76.out \
+ $(srcdir)/%reldir%/test_text_file.sh_143a40164c93c7ec44a66e7940b92b128a421147.err \
+ $(srcdir)/%reldir%/test_text_file.sh_143a40164c93c7ec44a66e7940b92b128a421147.out \
+ $(srcdir)/%reldir%/test_text_file.sh_1ce4056d72b871f8bb844c86aade2a9b1da58030.err \
+ $(srcdir)/%reldir%/test_text_file.sh_1ce4056d72b871f8bb844c86aade2a9b1da58030.out \
+ $(srcdir)/%reldir%/test_text_file.sh_25cef06efcbe106c2e1cc4a166b673e7b244c6d7.err \
+ $(srcdir)/%reldir%/test_text_file.sh_25cef06efcbe106c2e1cc4a166b673e7b244c6d7.out \
+ $(srcdir)/%reldir%/test_text_file.sh_265a8a5825e6c7dbc85cbe496dab6be7a349f3db.err \
+ $(srcdir)/%reldir%/test_text_file.sh_265a8a5825e6c7dbc85cbe496dab6be7a349f3db.out \
+ $(srcdir)/%reldir%/test_text_file.sh_4226123565a53b4e3f80e602c1f294721e8e07bf.err \
+ $(srcdir)/%reldir%/test_text_file.sh_4226123565a53b4e3f80e602c1f294721e8e07bf.out \
+ $(srcdir)/%reldir%/test_text_file.sh_4dd174410d702a7b4be794fb6fa2c8889bd768d6.err \
+ $(srcdir)/%reldir%/test_text_file.sh_4dd174410d702a7b4be794fb6fa2c8889bd768d6.out \
+ $(srcdir)/%reldir%/test_text_file.sh_596b120fbea638472a27964444e262b4572afacc.err \
+ $(srcdir)/%reldir%/test_text_file.sh_596b120fbea638472a27964444e262b4572afacc.out \
$(srcdir)/%reldir%/test_text_file.sh_5b51b55dff7332c5bee2c9b797c401c5614d574a.err \
$(srcdir)/%reldir%/test_text_file.sh_5b51b55dff7332c5bee2c9b797c401c5614d574a.out \
+ $(srcdir)/%reldir%/test_text_file.sh_5e9320f18d066e6fc930dbbffc357af64312bd4b.err \
+ $(srcdir)/%reldir%/test_text_file.sh_5e9320f18d066e6fc930dbbffc357af64312bd4b.out \
$(srcdir)/%reldir%/test_text_file.sh_6a24078983cf1b7a80b6fb65d5186cd125498136.err \
$(srcdir)/%reldir%/test_text_file.sh_6a24078983cf1b7a80b6fb65d5186cd125498136.out \
+ $(srcdir)/%reldir%/test_text_file.sh_73f69c883f60761bff9f8874f61d21a189e92912.err \
+ $(srcdir)/%reldir%/test_text_file.sh_73f69c883f60761bff9f8874f61d21a189e92912.out \
+ $(srcdir)/%reldir%/test_text_file.sh_786c7262f977201af36b0e69ba1a2aba130bbb06.err \
+ $(srcdir)/%reldir%/test_text_file.sh_786c7262f977201af36b0e69ba1a2aba130bbb06.out \
+ $(srcdir)/%reldir%/test_text_file.sh_78f252288519c8f767bb2759ea32959dab2ebc46.err \
+ $(srcdir)/%reldir%/test_text_file.sh_78f252288519c8f767bb2759ea32959dab2ebc46.out \
$(srcdir)/%reldir%/test_text_file.sh_7b00f32a3fff7fc2d78a87045ae842e58be88480.err \
$(srcdir)/%reldir%/test_text_file.sh_7b00f32a3fff7fc2d78a87045ae842e58be88480.out \
$(srcdir)/%reldir%/test_text_file.sh_87943c6be50d701a03e901f16493314c839af1ab.err \
$(srcdir)/%reldir%/test_text_file.sh_87943c6be50d701a03e901f16493314c839af1ab.out \
+ $(srcdir)/%reldir%/test_text_file.sh_8a4954af3e536b3789b1fd5b33519e9d444cc933.err \
+ $(srcdir)/%reldir%/test_text_file.sh_8a4954af3e536b3789b1fd5b33519e9d444cc933.out \
$(srcdir)/%reldir%/test_text_file.sh_8b2cd055e6a1db2ed9b2af2a917f8556395fa653.err \
$(srcdir)/%reldir%/test_text_file.sh_8b2cd055e6a1db2ed9b2af2a917f8556395fa653.out \
+ $(srcdir)/%reldir%/test_text_file.sh_a87c18c643994c3dbbbbb619a06a601d3668ea71.err \
+ $(srcdir)/%reldir%/test_text_file.sh_a87c18c643994c3dbbbbb619a06a601d3668ea71.out \
$(srcdir)/%reldir%/test_text_file.sh_ac486314c4e02e480d829ea2f077b86c49fedcec.err \
$(srcdir)/%reldir%/test_text_file.sh_ac486314c4e02e480d829ea2f077b86c49fedcec.out \
$(srcdir)/%reldir%/test_text_file.sh_ac872aadda29b9a824361a2c711d62ec1c75d40f.err \
$(srcdir)/%reldir%/test_text_file.sh_ac872aadda29b9a824361a2c711d62ec1c75d40f.out \
$(srcdir)/%reldir%/test_text_file.sh_c2a346ca1da2da4346f1d310212e166767993ce9.err \
$(srcdir)/%reldir%/test_text_file.sh_c2a346ca1da2da4346f1d310212e166767993ce9.out \
+ $(srcdir)/%reldir%/test_text_file.sh_d59b67113864ef5e77267d7fd8ad4072f5aef0fc.err \
+ $(srcdir)/%reldir%/test_text_file.sh_d59b67113864ef5e77267d7fd8ad4072f5aef0fc.out \
$(srcdir)/%reldir%/test_text_file.sh_e088ea61a5382458cc48a2607e2639e52b0be1da.err \
$(srcdir)/%reldir%/test_text_file.sh_e088ea61a5382458cc48a2607e2639e52b0be1da.out \
+ $(srcdir)/%reldir%/test_text_file.sh_e556fa91b91579df20d38540a5db9cedbaf68a62.err \
+ $(srcdir)/%reldir%/test_text_file.sh_e556fa91b91579df20d38540a5db9cedbaf68a62.out \
+ $(srcdir)/%reldir%/test_text_file.sh_f586ef080a86dfe1f981b345bcf8d7a279b2b247.err \
+ $(srcdir)/%reldir%/test_text_file.sh_f586ef080a86dfe1f981b345bcf8d7a279b2b247.out \
+ $(srcdir)/%reldir%/test_text_file.sh_f7522b0a99550a3ff91aae6582eb861547c535e1.err \
+ $(srcdir)/%reldir%/test_text_file.sh_f7522b0a99550a3ff91aae6582eb861547c535e1.out \
$()
diff --git a/test/expected/test_cli.sh_a1a09f890f4604309d0a81bbbec8e50fb7d5e887.err b/test/expected/test_cli.sh_0b3639753916f71254e8c9cce4ebb8bfd9978d3e.err
index e69de29..e69de29 100644
--- a/test/expected/test_cli.sh_a1a09f890f4604309d0a81bbbec8e50fb7d5e887.err
+++ b/test/expected/test_cli.sh_0b3639753916f71254e8c9cce4ebb8bfd9978d3e.err
diff --git a/test/expected/test_cli.sh_0b3639753916f71254e8c9cce4ebb8bfd9978d3e.out b/test/expected/test_cli.sh_0b3639753916f71254e8c9cce4ebb8bfd9978d3e.out
new file mode 100644
index 0000000..1a62b0e
--- /dev/null
+++ b/test/expected/test_cli.sh_0b3639753916f71254e8c9cce4ebb8bfd9978d3e.out
@@ -0,0 +1,5263 @@
+{
+ "tuning": {
+ "archive-manager": {
+ "min-free-space": 33554432,
+ "cache-ttl": "2d"
+ },
+ "piper": {
+ "max-size": 10485760,
+ "rotations": 4,
+ "ttl": "2d"
+ },
+ "file-vtab": {
+ "max-content-size": 33554432
+ },
+ "logfile": {
+ "max-unrecognized-lines": 1000
+ },
+ "remote": {
+ "cache-ttl": "2d",
+ "ssh": {
+ "command": "ssh",
+ "transfer-command": "cat > {0:} && chmod ugo+rx ./{0:}",
+ "start-command": "bash -c ./{0:}",
+ "flags": "",
+ "options": {
+
+ },
+ "config": {
+ "BatchMode": "yes",
+ "ConnectTimeout": "10"
+ }
+ }
+ },
+ "clipboard": {
+ "impls": {
+ "MacOS": {
+ "test": "command -v pbcopy",
+ "general": {
+ "write": "pbcopy",
+ "read": "pbpaste -Prefer txt"
+ },
+ "find": {
+ "write": "pbcopy -pboard find",
+ "read": "pbpaste -pboard find -Prefer txt"
+ }
+ },
+ "NeoVim": {
+ "test": "command -v win32yank.exe",
+ "general": {
+ "write": "win32yank.exe -i --crlf",
+ "read": "win32yank.exe -o --lf"
+ },
+ "find": {
+ "write": "",
+ "read": ""
+ }
+ },
+ "Wayland": {
+ "test": "test -n \"$WAYLAND_DISPLAY\"",
+ "general": {
+ "write": "wl-copy --foreground --type text/plain",
+ "read": "wl-paste --no-newline"
+ },
+ "find": {
+ "write": "",
+ "read": ""
+ }
+ },
+ "Windows": {
+ "test": "command -v clip.exe",
+ "general": {
+ "write": "clip.exe",
+ "read": ""
+ },
+ "find": {
+ "write": "",
+ "read": ""
+ }
+ },
+ "X11-xclip": {
+ "test": "test -n \"$DISPLAY\" && command -v xclip",
+ "general": {
+ "write": "xclip -i -selection clipboard",
+ "read": "xclip -o -selection clipboard"
+ },
+ "find": {
+ "write": "",
+ "read": ""
+ }
+ },
+ "tmux": {
+ "test": "test -n \"$TMUX\" -a -z \"$SSH_CLIENT\"",
+ "general": {
+ "write": "tmux load-buffer -",
+ "read": "tmux save-buffer -"
+ },
+ "find": {
+ "write": "",
+ "read": ""
+ }
+ }
+ }
+ },
+ "url-scheme": {
+ "docker": {
+ "handler": "docker-url-handler"
+ },
+ "docker-compose": {
+ "handler": "docker-compose-url-handler"
+ },
+ "hw": {
+ "handler": "hw-url-handler"
+ },
+ "journald": {
+ "handler": "journald-url-handler"
+ },
+ "piper": {
+ "handler": "piper-url-handler"
+ },
+ "podman": {
+ "handler": "docker-url-handler"
+ }
+ }
+ },
+ "ui": {
+ "clock-format": "%Y-%m-%dT%H:%M:%S %Z",
+ "dim-text": false,
+ "default-colors": true,
+ "keymap": "default",
+ "theme": "default",
+ "theme-defs": {
+ "default": {
+ "vars": {
+ "semantic_highlight_color": "semantic()"
+ },
+ "styles": {
+ "identifier": {
+ "color": "semantic()",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "text": {
+ "color": "Silver",
+ "background-color": "Black",
+ "underline": false,
+ "bold": false
+ },
+ "selected-text": {
+ "color": "",
+ "background-color": "DarkCyan",
+ "underline": false,
+ "bold": false
+ },
+ "alt-text": {
+ "color": "",
+ "background-color": "#262626",
+ "underline": false,
+ "bold": false
+ },
+ "error": {
+ "color": "Red",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "ok": {
+ "color": "Green",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "info": {
+ "color": "Maroon",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "warning": {
+ "color": "Yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "hidden": {
+ "color": "Yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "cursor-line": {
+ "color": "Cyan1",
+ "background-color": "Red",
+ "underline": true,
+ "bold": true
+ },
+ "disabled-cursor-line": {
+ "color": "Cyan1",
+ "background-color": "#5f005f",
+ "underline": false,
+ "bold": false
+ },
+ "adjusted-time": {
+ "color": "Maroon",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "skewed-time": {
+ "color": "Yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "file-offset": {
+ "color": "Silver",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "offset-time": {
+ "color": "Teal",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "invalid-msg": {
+ "color": "Yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "popup": {
+ "color": "Silver",
+ "background-color": "Teal",
+ "underline": false,
+ "bold": false
+ },
+ "focused": {
+ "color": "Black",
+ "background-color": "Silver",
+ "underline": false,
+ "bold": false
+ },
+ "disabled-focused": {
+ "color": "Black",
+ "background-color": "#888",
+ "underline": false,
+ "bold": false
+ },
+ "scrollbar": {
+ "color": "Black",
+ "background-color": "Silver",
+ "underline": false,
+ "bold": false
+ },
+ "h1": {
+ "color": "",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "h2": {
+ "color": "",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "h3": {
+ "color": "",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "h4": {
+ "color": "",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "h5": {
+ "color": "",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "h6": {
+ "color": "",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "hr": {
+ "color": "#444",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "hyperlink": {
+ "color": "",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "list-glyph": {
+ "color": "Yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "breadcrumb": {
+ "color": "Teal",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "table-border": {
+ "color": "#444",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "table-header": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "quote-border": {
+ "color": "#666",
+ "background-color": "#444",
+ "underline": false,
+ "bold": false
+ },
+ "quoted-text": {
+ "color": "",
+ "background-color": "#444",
+ "underline": false,
+ "bold": false
+ },
+ "footnote-border": {
+ "color": "Blue",
+ "background-color": "#444",
+ "underline": false,
+ "bold": false
+ },
+ "footnote-text": {
+ "color": "#eee",
+ "background-color": "#444",
+ "underline": false,
+ "bold": false
+ },
+ "snippet-border": {
+ "color": "Teal",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "indent-guide": {
+ "color": "#444",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ }
+ },
+ "syntax-styles": {
+ "inline-code": {
+ "color": "Red",
+ "background-color": "#121212",
+ "underline": false,
+ "bold": false
+ },
+ "quoted-code": {
+ "color": "Silver",
+ "background-color": "#121212",
+ "underline": false,
+ "bold": false
+ },
+ "code-border": {
+ "color": "#444",
+ "background-color": "#121212",
+ "underline": false,
+ "bold": false
+ },
+ "keyword": {
+ "color": "#00f",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "string": {
+ "color": "Green",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "comment": {
+ "color": "Green",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "doc-directive": {
+ "color": "Teal",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "variable": {
+ "color": "Teal",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "symbol": {
+ "color": "Blue",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "null": {
+ "color": "Silver",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "ascii-control": {
+ "color": "Green",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "non-ascii": {
+ "color": "Yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "number": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "type": {
+ "color": "Blue",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "function": {
+ "color": "Cyan1",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "separators-references-accessors": {
+ "color": "Silver",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "re-special": {
+ "color": "Teal",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "re-repeat": {
+ "color": "Yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "diff-delete": {
+ "color": "Red",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "diff-add": {
+ "color": "Green",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "diff-section": {
+ "color": "Maroon",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "spectrogram-low": {
+ "color": "",
+ "background-color": "Green",
+ "underline": false,
+ "bold": false
+ },
+ "spectrogram-medium": {
+ "color": "",
+ "background-color": "Yellow",
+ "underline": false,
+ "bold": false
+ },
+ "spectrogram-high": {
+ "color": "",
+ "background-color": "Red",
+ "underline": false,
+ "bold": false
+ },
+ "file": {
+ "color": "Blue",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ }
+ },
+ "status-styles": {
+ "text": {
+ "color": "Black",
+ "background-color": "Silver",
+ "underline": false,
+ "bold": false
+ },
+ "warn": {
+ "color": "Yellow",
+ "background-color": "Silver",
+ "underline": false,
+ "bold": false
+ },
+ "alert": {
+ "color": "Red",
+ "background-color": "Silver",
+ "underline": false,
+ "bold": false
+ },
+ "active": {
+ "color": "Green",
+ "background-color": "Silver",
+ "underline": false,
+ "bold": false
+ },
+ "inactive-alert": {
+ "color": "Red",
+ "background-color": "Grey37",
+ "underline": false,
+ "bold": false
+ },
+ "inactive": {
+ "color": "Silver",
+ "background-color": "Grey37",
+ "underline": false,
+ "bold": false
+ },
+ "title-hotkey": {
+ "color": "Teal",
+ "background-color": "Blue",
+ "underline": true,
+ "bold": false
+ },
+ "title": {
+ "color": "Silver",
+ "background-color": "Blue",
+ "underline": false,
+ "bold": true
+ },
+ "disabled-title": {
+ "color": "Black",
+ "background-color": "Silver",
+ "underline": false,
+ "bold": true
+ },
+ "subtitle": {
+ "color": "Black",
+ "background-color": "Teal",
+ "underline": false,
+ "bold": false
+ },
+ "info": {
+ "color": "Silver",
+ "background-color": "Grey37",
+ "underline": false,
+ "bold": false
+ },
+ "hotkey": {
+ "color": "Purple",
+ "background-color": "",
+ "underline": true,
+ "bold": true
+ },
+ "suggestion": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ }
+ },
+ "log-level-styles": {
+ "trace": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "debug5": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "debug4": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "debug3": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "debug2": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "debug": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "info": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "stats": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "notice": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "warning": {
+ "color": "Yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "error": {
+ "color": "Red",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "critical": {
+ "color": "Red",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "fatal": {
+ "color": "Red",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "invalid": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ }
+ },
+ "highlights": {
+ "colors": {
+ "pattern": "(?:#[a-fA-F0-9]{6}|#[a-fA-F0-9]{3}\\b)",
+ "style": {
+ "color": "${semantic_highlight_color}",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ }
+ },
+ "ipv4": {
+ "pattern": "\\b(?<!\\d\\.)\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\b(?!\\.\\d)",
+ "style": {
+ "color": "${semantic_highlight_color}",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ }
+ },
+ "xml": {
+ "pattern": "</?([^ >=!]+)[^>]*>",
+ "style": {
+ "color": "${semantic_highlight_color}",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ }
+ },
+ "xml-decl": {
+ "pattern": "<!([^ >=!]+)[^>]*>",
+ "style": {
+ "color": "${semantic_highlight_color}",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ }
+ }
+ }
+ },
+ "dracula": {
+ "vars": {
+ "black": "#282A36",
+ "blue": "#BD93F9",
+ "cyan": "#8BE9FD",
+ "green": "#50FA7B",
+ "magenta": "#FF79C6",
+ "orange": "#FFB86C",
+ "pink": "#FF79C6",
+ "purple": "#BD93F9",
+ "red": "#FF5555",
+ "semantic_highlight_color": "semantic()",
+ "white": "#F8F8F2",
+ "yellow": "#F1FA8C"
+ },
+ "styles": {
+ "identifier": {
+ "color": "semantic()",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "text": {
+ "color": "#f6f6f6",
+ "background-color": "$black",
+ "underline": false,
+ "bold": false
+ },
+ "selected-text": {
+ "color": "",
+ "background-color": "$cyan",
+ "underline": false,
+ "bold": false
+ },
+ "alt-text": {
+ "color": "",
+ "background-color": "#1c1c1c",
+ "underline": false,
+ "bold": false
+ },
+ "error": {
+ "color": "$red",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "ok": {
+ "color": "$green",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "info": {
+ "color": "$magenta",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "warning": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "hidden": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "cursor-line": {
+ "color": "$cyan",
+ "background-color": "#44475A",
+ "underline": false,
+ "bold": true
+ },
+ "disabled-cursor-line": {
+ "color": "$cyan",
+ "background-color": "#2a2c38",
+ "underline": false,
+ "bold": false
+ },
+ "adjusted-time": {
+ "color": "$magenta",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "skewed-time": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "file-offset": {
+ "color": "#888",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "offset-time": {
+ "color": "$cyan",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "invalid-msg": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "popup": {
+ "color": "$black",
+ "background-color": "$cyan",
+ "underline": false,
+ "bold": false
+ },
+ "focused": {
+ "color": "$black",
+ "background-color": "$white",
+ "underline": false,
+ "bold": false
+ },
+ "disabled-focused": {
+ "color": "$white",
+ "background-color": "#333",
+ "underline": false,
+ "bold": false
+ },
+ "scrollbar": {
+ "color": "$black",
+ "background-color": "#888",
+ "underline": false,
+ "bold": false
+ },
+ "h1": {
+ "color": "$purple",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "h2": {
+ "color": "$purple",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "h3": {
+ "color": "$purple",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "h4": {
+ "color": "",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "h5": {
+ "color": "",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "h6": {
+ "color": "",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "hr": {
+ "color": "#6272A4",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "hyperlink": {
+ "color": "",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "list-glyph": {
+ "color": "$cyan",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "breadcrumb": {
+ "color": "#99a",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "table-border": {
+ "color": "#444",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "table-header": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "quote-border": {
+ "color": "#666",
+ "background-color": "#444",
+ "underline": false,
+ "bold": false
+ },
+ "quoted-text": {
+ "color": "$yellow",
+ "background-color": "#444",
+ "underline": false,
+ "bold": false
+ },
+ "footnote-border": {
+ "color": "$blue",
+ "background-color": "#444",
+ "underline": false,
+ "bold": false
+ },
+ "footnote-text": {
+ "color": "$cyan",
+ "background-color": "#444",
+ "underline": false,
+ "bold": false
+ },
+ "snippet-border": {
+ "color": "$cyan",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "indent-guide": {
+ "color": "#444",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ }
+ },
+ "syntax-styles": {
+ "inline-code": {
+ "color": "$green",
+ "background-color": "#121212",
+ "underline": false,
+ "bold": false
+ },
+ "quoted-code": {
+ "color": "$orange",
+ "background-color": "#121212",
+ "underline": false,
+ "bold": false
+ },
+ "code-border": {
+ "color": "#444",
+ "background-color": "#121212",
+ "underline": false,
+ "bold": false
+ },
+ "keyword": {
+ "color": "$pink",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "string": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "comment": {
+ "color": "#6272A4",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "doc-directive": {
+ "color": "$pink",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "variable": {
+ "color": "$orange",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "symbol": {
+ "color": "#78dce8",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "null": {
+ "color": "#888",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "ascii-control": {
+ "color": "$green",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "non-ascii": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "number": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "type": {
+ "color": "$cyan",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "function": {
+ "color": "$green",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "separators-references-accessors": {
+ "color": "$pink",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "re-special": {
+ "color": "$cyan",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "re-repeat": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "diff-delete": {
+ "color": "#f00",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "diff-add": {
+ "color": "#0f0",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "diff-section": {
+ "color": "#6272A4",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "spectrogram-low": {
+ "color": "",
+ "background-color": "$green",
+ "underline": false,
+ "bold": false
+ },
+ "spectrogram-medium": {
+ "color": "",
+ "background-color": "$yellow",
+ "underline": false,
+ "bold": false
+ },
+ "spectrogram-high": {
+ "color": "",
+ "background-color": "$red",
+ "underline": false,
+ "bold": false
+ },
+ "file": {
+ "color": "$blue",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ }
+ },
+ "status-styles": {
+ "text": {
+ "color": "#f6f6f6",
+ "background-color": "#353535",
+ "underline": false,
+ "bold": false
+ },
+ "warn": {
+ "color": "$yellow",
+ "background-color": "#353535",
+ "underline": false,
+ "bold": false
+ },
+ "alert": {
+ "color": "$red",
+ "background-color": "#353535",
+ "underline": false,
+ "bold": false
+ },
+ "active": {
+ "color": "$green",
+ "background-color": "#353535",
+ "underline": false,
+ "bold": false
+ },
+ "inactive-alert": {
+ "color": "$red",
+ "background-color": "#2f2f2f",
+ "underline": false,
+ "bold": false
+ },
+ "inactive": {
+ "color": "#555",
+ "background-color": "#2f2f2f",
+ "underline": false,
+ "bold": false
+ },
+ "title-hotkey": {
+ "color": "$black",
+ "background-color": "#5394ec",
+ "underline": true,
+ "bold": false
+ },
+ "title": {
+ "color": "#f6f6f6",
+ "background-color": "#5394ec",
+ "underline": false,
+ "bold": true
+ },
+ "disabled-title": {
+ "color": "#5394ec",
+ "background-color": "#353535",
+ "underline": false,
+ "bold": true
+ },
+ "subtitle": {
+ "color": "#555",
+ "background-color": "#66d9ee",
+ "underline": false,
+ "bold": true
+ },
+ "info": {
+ "color": "#aaa",
+ "background-color": "#2f2f2f",
+ "underline": false,
+ "bold": false
+ },
+ "hotkey": {
+ "color": "#fff",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "suggestion": {
+ "color": "#888",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ }
+ },
+ "log-level-styles": {
+ "trace": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "debug5": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "debug4": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "debug3": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "debug2": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "debug": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "info": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "stats": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "notice": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "warning": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "error": {
+ "color": "$red",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "critical": {
+ "color": "$red",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "fatal": {
+ "color": "$red",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "invalid": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ }
+ },
+ "highlights": {
+
+ }
+ },
+ "eldar": {
+ "vars": {
+ "black": "#000000",
+ "blue": "#729fcf",
+ "cyan": "#34e2e2",
+ "green": "#8ae234",
+ "magenta": "#ad7fa8",
+ "orange": "#ef8c29",
+ "red": "#ef2929",
+ "semantic_highlight_color": "semantic()",
+ "white": "#ffffff",
+ "yellow": "#fce94f"
+ },
+ "styles": {
+ "identifier": {
+ "color": "semantic()",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "text": {
+ "color": "$white",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "selected-text": {
+ "color": "",
+ "background-color": "$cyan",
+ "underline": false,
+ "bold": false
+ },
+ "alt-text": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "error": {
+ "color": "$red",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "ok": {
+ "color": "$green",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "info": {
+ "color": "$magenta",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "warning": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "hidden": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "cursor-line": {
+ "color": "$cyan",
+ "background-color": "$red",
+ "underline": true,
+ "bold": true
+ },
+ "disabled-cursor-line": {
+ "color": "$cyan",
+ "background-color": "#5f005f",
+ "underline": false,
+ "bold": false
+ },
+ "adjusted-time": {
+ "color": "$magenta",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "skewed-time": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "file-offset": {
+ "color": "#888",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "offset-time": {
+ "color": "$cyan",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "invalid-msg": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "popup": {
+ "color": "$black",
+ "background-color": "Grey37",
+ "underline": false,
+ "bold": false
+ },
+ "focused": {
+ "color": "$black",
+ "background-color": "$white",
+ "underline": false,
+ "bold": false
+ },
+ "disabled-focused": {
+ "color": "$white",
+ "background-color": "#333",
+ "underline": false,
+ "bold": false
+ },
+ "scrollbar": {
+ "color": "$black",
+ "background-color": "$white",
+ "underline": false,
+ "bold": false
+ },
+ "h1": {
+ "color": "",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "h2": {
+ "color": "",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "h3": {
+ "color": "",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "h4": {
+ "color": "",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "h5": {
+ "color": "",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "h6": {
+ "color": "",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "hr": {
+ "color": "#444",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "hyperlink": {
+ "color": "",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "list-glyph": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "breadcrumb": {
+ "color": "#448",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "table-border": {
+ "color": "#444",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "table-header": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "quote-border": {
+ "color": "#666",
+ "background-color": "#444",
+ "underline": false,
+ "bold": false
+ },
+ "quoted-text": {
+ "color": "",
+ "background-color": "#444",
+ "underline": false,
+ "bold": false
+ },
+ "footnote-border": {
+ "color": "$blue",
+ "background-color": "#444",
+ "underline": false,
+ "bold": false
+ },
+ "footnote-text": {
+ "color": "#eee",
+ "background-color": "#444",
+ "underline": false,
+ "bold": false
+ },
+ "snippet-border": {
+ "color": "$cyan",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "indent-guide": {
+ "color": "#444",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ }
+ },
+ "syntax-styles": {
+ "inline-code": {
+ "color": "$red",
+ "background-color": "#121212",
+ "underline": false,
+ "bold": false
+ },
+ "quoted-code": {
+ "color": "#eee",
+ "background-color": "#121212",
+ "underline": false,
+ "bold": false
+ },
+ "code-border": {
+ "color": "#444",
+ "background-color": "#121212",
+ "underline": false,
+ "bold": false
+ },
+ "keyword": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "string": {
+ "color": "$magenta",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "comment": {
+ "color": "$cyan",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "doc-directive": {
+ "color": "$green",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "variable": {
+ "color": "$green",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "symbol": {
+ "color": "$green",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "null": {
+ "color": "#888",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "ascii-control": {
+ "color": "$green",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "non-ascii": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "number": {
+ "color": "$red",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "type": {
+ "color": "$blue",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "function": {
+ "color": "$cyan",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "separators-references-accessors": {
+ "color": "$red",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "re-special": {
+ "color": "$cyan",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "re-repeat": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "diff-delete": {
+ "color": "$red",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "diff-add": {
+ "color": "$green",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "diff-section": {
+ "color": "$magenta",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "spectrogram-low": {
+ "color": "",
+ "background-color": "$green",
+ "underline": false,
+ "bold": false
+ },
+ "spectrogram-medium": {
+ "color": "",
+ "background-color": "$yellow",
+ "underline": false,
+ "bold": false
+ },
+ "spectrogram-high": {
+ "color": "",
+ "background-color": "$red",
+ "underline": false,
+ "bold": false
+ },
+ "file": {
+ "color": "$blue",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ }
+ },
+ "status-styles": {
+ "text": {
+ "color": "$black",
+ "background-color": "#999",
+ "underline": false,
+ "bold": false
+ },
+ "warn": {
+ "color": "$yellow",
+ "background-color": "#999",
+ "underline": false,
+ "bold": false
+ },
+ "alert": {
+ "color": "$red",
+ "background-color": "#999",
+ "underline": false,
+ "bold": false
+ },
+ "active": {
+ "color": "$green",
+ "background-color": "#999",
+ "underline": false,
+ "bold": false
+ },
+ "inactive-alert": {
+ "color": "$red",
+ "background-color": "Grey",
+ "underline": false,
+ "bold": false
+ },
+ "inactive": {
+ "color": "$black",
+ "background-color": "Grey",
+ "underline": false,
+ "bold": false
+ },
+ "title-hotkey": {
+ "color": "$black",
+ "background-color": "#5394ec",
+ "underline": true,
+ "bold": false
+ },
+ "title": {
+ "color": "$black",
+ "background-color": "$blue",
+ "underline": false,
+ "bold": true
+ },
+ "disabled-title": {
+ "color": "#5394ec",
+ "background-color": "#353535",
+ "underline": false,
+ "bold": true
+ },
+ "subtitle": {
+ "color": "$black",
+ "background-color": "$cyan",
+ "underline": false,
+ "bold": true
+ },
+ "info": {
+ "color": "$black",
+ "background-color": "Grey",
+ "underline": false,
+ "bold": false
+ },
+ "hotkey": {
+ "color": "#fff",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "suggestion": {
+ "color": "#888",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ }
+ },
+ "log-level-styles": {
+ "trace": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "debug5": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "debug4": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "debug3": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "debug2": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "debug": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "info": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "stats": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "notice": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "warning": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "error": {
+ "color": "$red",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "critical": {
+ "color": "$red",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "fatal": {
+ "color": "$red",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "invalid": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ }
+ },
+ "highlights": {
+
+ }
+ },
+ "grayscale": {
+ "vars": {
+ "black": "#2d2a2e",
+ "blue": "#5394ec",
+ "cyan": "#66d9ee",
+ "green": "#a7e22e",
+ "magenta": "#ae81ff",
+ "plaintext": "#ccc",
+ "red": "#f92772",
+ "white": "#f6f6f6",
+ "yellow": "#fe9720"
+ },
+ "styles": {
+ "identifier": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "text": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "selected-text": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "alt-text": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "error": {
+ "color": "$red",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "ok": {
+ "color": "$green",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "info": {
+ "color": "#aaa",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "warning": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "hidden": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "cursor-line": {
+ "color": "#fff",
+ "background-color": "#555",
+ "underline": true,
+ "bold": true
+ },
+ "disabled-cursor-line": {
+ "color": "#888",
+ "background-color": "#333",
+ "underline": false,
+ "bold": false
+ },
+ "adjusted-time": {
+ "color": "$magenta",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "skewed-time": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "file-offset": {
+ "color": "#888",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "offset-time": {
+ "color": "$cyan",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "invalid-msg": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "popup": {
+ "color": "$plaintext",
+ "background-color": "#626262",
+ "underline": false,
+ "bold": false
+ },
+ "focused": {
+ "color": "$black",
+ "background-color": "$plaintext",
+ "underline": false,
+ "bold": false
+ },
+ "disabled-focused": {
+ "color": "$plaintext",
+ "background-color": "#333",
+ "underline": false,
+ "bold": false
+ },
+ "scrollbar": {
+ "color": "$black",
+ "background-color": "#888",
+ "underline": false,
+ "bold": false
+ },
+ "h1": {
+ "color": "",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "h2": {
+ "color": "",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "h3": {
+ "color": "",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "h4": {
+ "color": "",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "h5": {
+ "color": "",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "h6": {
+ "color": "",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "hr": {
+ "color": "#444",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "hyperlink": {
+ "color": "",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "list-glyph": {
+ "color": "#444",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "breadcrumb": {
+ "color": "#999",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "table-border": {
+ "color": "#444",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "table-header": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "quote-border": {
+ "color": "#666",
+ "background-color": "#444",
+ "underline": false,
+ "bold": false
+ },
+ "quoted-text": {
+ "color": "",
+ "background-color": "#444",
+ "underline": false,
+ "bold": false
+ },
+ "footnote-border": {
+ "color": "#888",
+ "background-color": "#444",
+ "underline": false,
+ "bold": false
+ },
+ "footnote-text": {
+ "color": "#eee",
+ "background-color": "#444",
+ "underline": false,
+ "bold": false
+ },
+ "snippet-border": {
+ "color": "#888",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "indent-guide": {
+ "color": "#444",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ }
+ },
+ "syntax-styles": {
+ "inline-code": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "quoted-code": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "code-border": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "keyword": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "string": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "comment": {
+ "color": "#888",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "doc-directive": {
+ "color": "#aaa",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "variable": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "symbol": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "null": {
+ "color": "#888",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "ascii-control": {
+ "color": "#aaa",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "non-ascii": {
+ "color": "#ccc",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "number": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "type": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "function": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "separators-references-accessors": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "re-special": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "re-repeat": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "diff-delete": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "diff-add": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "diff-section": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "spectrogram-low": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "spectrogram-medium": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "spectrogram-high": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "file": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ }
+ },
+ "status-styles": {
+ "text": {
+ "color": "#f6f6f6",
+ "background-color": "#353535",
+ "underline": false,
+ "bold": false
+ },
+ "warn": {
+ "color": "$yellow",
+ "background-color": "#353535",
+ "underline": false,
+ "bold": false
+ },
+ "alert": {
+ "color": "$red",
+ "background-color": "#353535",
+ "underline": false,
+ "bold": false
+ },
+ "active": {
+ "color": "$green",
+ "background-color": "#353535",
+ "underline": false,
+ "bold": false
+ },
+ "inactive-alert": {
+ "color": "$red",
+ "background-color": "#2f2f2f",
+ "underline": false,
+ "bold": false
+ },
+ "inactive": {
+ "color": "#555",
+ "background-color": "#2f2f2f",
+ "underline": false,
+ "bold": false
+ },
+ "title-hotkey": {
+ "color": "$black",
+ "background-color": "#5394ec",
+ "underline": true,
+ "bold": false
+ },
+ "title": {
+ "color": "#f6f6f6",
+ "background-color": "#8a8a8a",
+ "underline": false,
+ "bold": true
+ },
+ "disabled-title": {
+ "color": "#5394ec",
+ "background-color": "#353535",
+ "underline": false,
+ "bold": true
+ },
+ "subtitle": {
+ "color": "#e4e4e4",
+ "background-color": "#626262",
+ "underline": false,
+ "bold": true
+ },
+ "info": {
+ "color": "#555",
+ "background-color": "#2f2f2f",
+ "underline": false,
+ "bold": false
+ },
+ "hotkey": {
+ "color": "#fff",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "suggestion": {
+ "color": "#888",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ }
+ },
+ "log-level-styles": {
+ "trace": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "debug5": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "debug4": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "debug3": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "debug2": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "debug": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "info": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "stats": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "notice": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "warning": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "error": {
+ "color": "$red",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "critical": {
+ "color": "$red",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "fatal": {
+ "color": "$red",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "invalid": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ }
+ },
+ "highlights": {
+
+ }
+ },
+ "monocai": {
+ "vars": {
+ "black": "#2d2a2e",
+ "blue": "#5394ec",
+ "cyan": "#66d9ee",
+ "green": "#a7e22e",
+ "magenta": "#ae81ff",
+ "orange": "#fc9867",
+ "red": "#f92772",
+ "semantic_highlight_color": "semantic()",
+ "white": "#808080",
+ "yellow": "#fe9720"
+ },
+ "styles": {
+ "identifier": {
+ "color": "semantic()",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "text": {
+ "color": "#f6f6f6",
+ "background-color": "$black",
+ "underline": false,
+ "bold": false
+ },
+ "selected-text": {
+ "color": "",
+ "background-color": "$cyan",
+ "underline": false,
+ "bold": false
+ },
+ "alt-text": {
+ "color": "",
+ "background-color": "#1c1c1c",
+ "underline": false,
+ "bold": false
+ },
+ "error": {
+ "color": "$red",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "ok": {
+ "color": "$green",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "info": {
+ "color": "$magenta",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "warning": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "hidden": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "cursor-line": {
+ "color": "$cyan",
+ "background-color": "#7f005f",
+ "underline": false,
+ "bold": true
+ },
+ "disabled-cursor-line": {
+ "color": "$cyan",
+ "background-color": "#5f005f",
+ "underline": false,
+ "bold": false
+ },
+ "adjusted-time": {
+ "color": "$magenta",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "skewed-time": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "file-offset": {
+ "color": "#888",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "offset-time": {
+ "color": "$cyan",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "invalid-msg": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "popup": {
+ "color": "$white",
+ "background-color": "$cyan",
+ "underline": false,
+ "bold": false
+ },
+ "focused": {
+ "color": "$black",
+ "background-color": "$white",
+ "underline": false,
+ "bold": false
+ },
+ "disabled-focused": {
+ "color": "$white",
+ "background-color": "#333",
+ "underline": false,
+ "bold": false
+ },
+ "scrollbar": {
+ "color": "$black",
+ "background-color": "#888",
+ "underline": false,
+ "bold": false
+ },
+ "h1": {
+ "color": "$magenta",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "h2": {
+ "color": "$magenta",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "h3": {
+ "color": "$magenta",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "h4": {
+ "color": "",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "h5": {
+ "color": "",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "h6": {
+ "color": "",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "hr": {
+ "color": "#444",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "hyperlink": {
+ "color": "",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "list-glyph": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "breadcrumb": {
+ "color": "$orange",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "table-border": {
+ "color": "#444",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "table-header": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "quote-border": {
+ "color": "#666",
+ "background-color": "#444",
+ "underline": false,
+ "bold": false
+ },
+ "quoted-text": {
+ "color": "",
+ "background-color": "#444",
+ "underline": false,
+ "bold": false
+ },
+ "footnote-border": {
+ "color": "$blue",
+ "background-color": "#444",
+ "underline": false,
+ "bold": false
+ },
+ "footnote-text": {
+ "color": "#eee",
+ "background-color": "#444",
+ "underline": false,
+ "bold": false
+ },
+ "snippet-border": {
+ "color": "$cyan",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "indent-guide": {
+ "color": "#444",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ }
+ },
+ "syntax-styles": {
+ "inline-code": {
+ "color": "$red",
+ "background-color": "#121212",
+ "underline": false,
+ "bold": false
+ },
+ "quoted-code": {
+ "color": "#eee",
+ "background-color": "#121212",
+ "underline": false,
+ "bold": false
+ },
+ "code-border": {
+ "color": "#444",
+ "background-color": "#121212",
+ "underline": false,
+ "bold": false
+ },
+ "keyword": {
+ "color": "#ff6188",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "string": {
+ "color": "#ffd866",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "comment": {
+ "color": "#949194",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "doc-directive": {
+ "color": "#a9dc76",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "variable": {
+ "color": "#a9dc76",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "symbol": {
+ "color": "#78dce8",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "null": {
+ "color": "#888",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "ascii-control": {
+ "color": "$green",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "non-ascii": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "number": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "type": {
+ "color": "$blue",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "function": {
+ "color": "$cyan",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "separators-references-accessors": {
+ "color": "$red",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "re-special": {
+ "color": "$cyan",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "re-repeat": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "diff-delete": {
+ "color": "#f00",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "diff-add": {
+ "color": "#0f0",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "diff-section": {
+ "color": "#656e76",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "spectrogram-low": {
+ "color": "",
+ "background-color": "$green",
+ "underline": false,
+ "bold": false
+ },
+ "spectrogram-medium": {
+ "color": "",
+ "background-color": "$yellow",
+ "underline": false,
+ "bold": false
+ },
+ "spectrogram-high": {
+ "color": "",
+ "background-color": "$red",
+ "underline": false,
+ "bold": false
+ },
+ "file": {
+ "color": "$blue",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ }
+ },
+ "status-styles": {
+ "text": {
+ "color": "#f6f6f6",
+ "background-color": "#353535",
+ "underline": false,
+ "bold": false
+ },
+ "warn": {
+ "color": "$yellow",
+ "background-color": "#353535",
+ "underline": false,
+ "bold": false
+ },
+ "alert": {
+ "color": "$red",
+ "background-color": "#353535",
+ "underline": false,
+ "bold": false
+ },
+ "active": {
+ "color": "$green",
+ "background-color": "#353535",
+ "underline": false,
+ "bold": false
+ },
+ "inactive-alert": {
+ "color": "$red",
+ "background-color": "#2f2f2f",
+ "underline": false,
+ "bold": false
+ },
+ "inactive": {
+ "color": "#555",
+ "background-color": "#2f2f2f",
+ "underline": false,
+ "bold": false
+ },
+ "title-hotkey": {
+ "color": "$black",
+ "background-color": "#5394ec",
+ "underline": true,
+ "bold": false
+ },
+ "title": {
+ "color": "#f6f6f6",
+ "background-color": "#5394ec",
+ "underline": false,
+ "bold": true
+ },
+ "disabled-title": {
+ "color": "#5394ec",
+ "background-color": "#353535",
+ "underline": false,
+ "bold": true
+ },
+ "subtitle": {
+ "color": "#555",
+ "background-color": "#66d9ee",
+ "underline": false,
+ "bold": true
+ },
+ "info": {
+ "color": "#aaa",
+ "background-color": "#2f2f2f",
+ "underline": false,
+ "bold": false
+ },
+ "hotkey": {
+ "color": "#fff",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "suggestion": {
+ "color": "#888",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ }
+ },
+ "log-level-styles": {
+ "trace": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "debug5": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "debug4": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "debug3": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "debug2": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "debug": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "info": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "stats": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "notice": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "warning": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "error": {
+ "color": "$red",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "critical": {
+ "color": "$red",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "fatal": {
+ "color": "$red",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "invalid": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ }
+ },
+ "highlights": {
+
+ }
+ },
+ "night-owl": {
+ "vars": {
+ "black": "#011627",
+ "blue": "#5394ec",
+ "cyan": "#33cccc",
+ "green": "#007f00",
+ "magenta": "#ff70ff",
+ "red": "#ff6868",
+ "semantic_highlight_color": "semantic()",
+ "white": "#d6deeb",
+ "yellow": "#cdcd00"
+ },
+ "styles": {
+ "identifier": {
+ "color": "semantic()",
+ "background-color": "#011627",
+ "underline": false,
+ "bold": false
+ },
+ "text": {
+ "color": "#d6deeb",
+ "background-color": "#011627",
+ "underline": false,
+ "bold": false
+ },
+ "selected-text": {
+ "color": "",
+ "background-color": "$cyan",
+ "underline": false,
+ "bold": false
+ },
+ "alt-text": {
+ "color": "",
+ "background-color": "#1c1c1c",
+ "underline": false,
+ "bold": false
+ },
+ "error": {
+ "color": "#ef5350",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "ok": {
+ "color": "$green",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "info": {
+ "color": "$magenta",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "warning": {
+ "color": "#b39554",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "hidden": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "cursor-line": {
+ "color": "$cyan",
+ "background-color": "$red",
+ "underline": true,
+ "bold": true
+ },
+ "disabled-cursor-line": {
+ "color": "$cyan",
+ "background-color": "#5f005f",
+ "underline": false,
+ "bold": false
+ },
+ "adjusted-time": {
+ "color": "$magenta",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "skewed-time": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "file-offset": {
+ "color": "#888",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "offset-time": {
+ "color": "$cyan",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "invalid-msg": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "popup": {
+ "color": "$base00",
+ "background-color": "$base3",
+ "underline": false,
+ "bold": false
+ },
+ "focused": {
+ "color": "$black",
+ "background-color": "#666",
+ "underline": false,
+ "bold": false
+ },
+ "disabled-focused": {
+ "color": "$white",
+ "background-color": "#333",
+ "underline": false,
+ "bold": false
+ },
+ "scrollbar": {
+ "color": "$black",
+ "background-color": "$white",
+ "underline": false,
+ "bold": false
+ },
+ "h1": {
+ "color": "",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "h2": {
+ "color": "",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "h3": {
+ "color": "",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "h4": {
+ "color": "",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "h5": {
+ "color": "",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "h6": {
+ "color": "",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "hr": {
+ "color": "#444",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "hyperlink": {
+ "color": "",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "list-glyph": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "breadcrumb": {
+ "color": "#2d5a80",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "table-border": {
+ "color": "#444",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "table-header": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "quote-border": {
+ "color": "#666",
+ "background-color": "#444",
+ "underline": false,
+ "bold": false
+ },
+ "quoted-text": {
+ "color": "",
+ "background-color": "#444",
+ "underline": false,
+ "bold": false
+ },
+ "footnote-border": {
+ "color": "$blue",
+ "background-color": "#444",
+ "underline": false,
+ "bold": false
+ },
+ "footnote-text": {
+ "color": "#eee",
+ "background-color": "#444",
+ "underline": false,
+ "bold": false
+ },
+ "snippet-border": {
+ "color": "$cyan",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "indent-guide": {
+ "color": "#444",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ }
+ },
+ "syntax-styles": {
+ "inline-code": {
+ "color": "$red",
+ "background-color": "#222",
+ "underline": false,
+ "bold": false
+ },
+ "quoted-code": {
+ "color": "#eee",
+ "background-color": "#222",
+ "underline": false,
+ "bold": false
+ },
+ "code-border": {
+ "color": "#444",
+ "background-color": "#222",
+ "underline": false,
+ "bold": false
+ },
+ "keyword": {
+ "color": "#c792ea",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "string": {
+ "color": "#ecc48d",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "comment": {
+ "color": "#676e95",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "doc-directive": {
+ "color": "#addb67",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "variable": {
+ "color": "#addb67",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "symbol": {
+ "color": "#82aaff",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "null": {
+ "color": "#888",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "ascii-control": {
+ "color": "$green",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "non-ascii": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "number": {
+ "color": "#f78c6c",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "type": {
+ "color": "$blue",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "function": {
+ "color": "$cyan",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "separators-references-accessors": {
+ "color": "$red",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "re-special": {
+ "color": "$cyan",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "re-repeat": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "diff-delete": {
+ "color": "#b03435",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "diff-add": {
+ "color": "#264b33",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "diff-section": {
+ "color": "$magenta",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "spectrogram-low": {
+ "color": "",
+ "background-color": "$green",
+ "underline": false,
+ "bold": false
+ },
+ "spectrogram-medium": {
+ "color": "",
+ "background-color": "$yellow",
+ "underline": false,
+ "bold": false
+ },
+ "spectrogram-high": {
+ "color": "",
+ "background-color": "$red",
+ "underline": false,
+ "bold": false
+ },
+ "file": {
+ "color": "#82aaff",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ }
+ },
+ "status-styles": {
+ "text": {
+ "color": "#f8f8f0",
+ "background-color": "#162d40",
+ "underline": false,
+ "bold": false
+ },
+ "warn": {
+ "color": "#b39554",
+ "background-color": "#162d40",
+ "underline": false,
+ "bold": false
+ },
+ "alert": {
+ "color": "#ef5350",
+ "background-color": "#162d40",
+ "underline": false,
+ "bold": false
+ },
+ "active": {
+ "color": "#264b33",
+ "background-color": "#162d40",
+ "underline": false,
+ "bold": false
+ },
+ "inactive-alert": {
+ "color": "#ef5350",
+ "background-color": "#0F1F2B",
+ "underline": false,
+ "bold": false
+ },
+ "inactive": {
+ "color": "#f0f0f0",
+ "background-color": "#0F1F2B",
+ "underline": false,
+ "bold": false
+ },
+ "title-hotkey": {
+ "color": "$black",
+ "background-color": "#2d5a80",
+ "underline": true,
+ "bold": true
+ },
+ "title": {
+ "color": "#f8f0f0",
+ "background-color": "#2d5a80",
+ "underline": false,
+ "bold": true
+ },
+ "disabled-title": {
+ "color": "#5394ec",
+ "background-color": "#353535",
+ "underline": false,
+ "bold": true
+ },
+ "subtitle": {
+ "color": "#f8f8f0",
+ "background-color": "#005f5f",
+ "underline": false,
+ "bold": false
+ },
+ "info": {
+ "color": "#aaa",
+ "background-color": "#0F1F2B",
+ "underline": false,
+ "bold": false
+ },
+ "hotkey": {
+ "color": "#2d5a80",
+ "background-color": "",
+ "underline": true,
+ "bold": true
+ },
+ "suggestion": {
+ "color": "#888",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ }
+ },
+ "log-level-styles": {
+ "trace": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "debug5": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "debug4": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "debug3": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "debug2": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "debug": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "info": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "stats": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "notice": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "warning": {
+ "color": "#b39554",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "error": {
+ "color": "#ef5350",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "critical": {
+ "color": "#ef5350",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "fatal": {
+ "color": "#ef5350",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "invalid": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ }
+ },
+ "highlights": {
+
+ }
+ },
+ "solarized-dark": {
+ "vars": {
+ "base0": "#839496",
+ "base00": "#657b83",
+ "base01": "#586e75",
+ "base02": "#073642",
+ "base03": "#002b36",
+ "base1": "#93a1a1",
+ "base2": "#eee8d5",
+ "base3": "#fdf6e3",
+ "black": "#002b36",
+ "blue": "#268bd2",
+ "cyan": "#2aa198",
+ "green": "#859900",
+ "magenta": "#d33682",
+ "orange": "#cb4b16",
+ "red": "#dc322f",
+ "semantic_highlight_color": "semantic()",
+ "violet": "#6c71c4",
+ "yellow": "#b58900"
+ },
+ "styles": {
+ "identifier": {
+ "color": "semantic()",
+ "background-color": "$base03",
+ "underline": false,
+ "bold": false
+ },
+ "text": {
+ "color": "$base0",
+ "background-color": "$base03",
+ "underline": false,
+ "bold": false
+ },
+ "selected-text": {
+ "color": "",
+ "background-color": "$cyan",
+ "underline": false,
+ "bold": false
+ },
+ "alt-text": {
+ "color": "",
+ "background-color": "$base02",
+ "underline": false,
+ "bold": false
+ },
+ "error": {
+ "color": "$red",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "ok": {
+ "color": "$green",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "info": {
+ "color": "$magenta",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "warning": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "hidden": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "cursor-line": {
+ "color": "$cyan",
+ "background-color": "$red",
+ "underline": true,
+ "bold": true
+ },
+ "disabled-cursor-line": {
+ "color": "$cyan",
+ "background-color": "#5f005f",
+ "underline": false,
+ "bold": false
+ },
+ "adjusted-time": {
+ "color": "$magenta",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "skewed-time": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "file-offset": {
+ "color": "#888",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "offset-time": {
+ "color": "$cyan",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "invalid-msg": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "popup": {
+ "color": "$base00",
+ "background-color": "$base3",
+ "underline": false,
+ "bold": false
+ },
+ "focused": {
+ "color": "$base03",
+ "background-color": "$base01",
+ "underline": false,
+ "bold": false
+ },
+ "disabled-focused": {
+ "color": "$base0",
+ "background-color": "$base02",
+ "underline": false,
+ "bold": false
+ },
+ "scrollbar": {
+ "color": "$base03",
+ "background-color": "$base0",
+ "underline": false,
+ "bold": false
+ },
+ "h1": {
+ "color": "",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "h2": {
+ "color": "",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "h3": {
+ "color": "",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "h4": {
+ "color": "",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "h5": {
+ "color": "",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "h6": {
+ "color": "",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "hr": {
+ "color": "#444",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "hyperlink": {
+ "color": "",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "list-glyph": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "breadcrumb": {
+ "color": "#99a",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "table-border": {
+ "color": "#444",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "table-header": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "quote-border": {
+ "color": "#666",
+ "background-color": "#444",
+ "underline": false,
+ "bold": false
+ },
+ "quoted-text": {
+ "color": "",
+ "background-color": "#444",
+ "underline": false,
+ "bold": false
+ },
+ "footnote-border": {
+ "color": "$blue",
+ "background-color": "#444",
+ "underline": false,
+ "bold": false
+ },
+ "footnote-text": {
+ "color": "#eee",
+ "background-color": "#444",
+ "underline": false,
+ "bold": false
+ },
+ "snippet-border": {
+ "color": "$cyan",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "indent-guide": {
+ "color": "#444",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ }
+ },
+ "syntax-styles": {
+ "inline-code": {
+ "color": "$red",
+ "background-color": "#121212",
+ "underline": false,
+ "bold": false
+ },
+ "quoted-code": {
+ "color": "#eee",
+ "background-color": "#121212",
+ "underline": false,
+ "bold": false
+ },
+ "code-border": {
+ "color": "#444",
+ "background-color": "#121212",
+ "underline": false,
+ "bold": false
+ },
+ "keyword": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "string": {
+ "color": "$cyan",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "comment": {
+ "color": "$base01",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "doc-directive": {
+ "color": "$cyan",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "variable": {
+ "color": "$blue",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "symbol": {
+ "color": "$blue",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "null": {
+ "color": "#888",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "ascii-control": {
+ "color": "$green",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "non-ascii": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "number": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "type": {
+ "color": "$blue",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "function": {
+ "color": "$cyan",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "separators-references-accessors": {
+ "color": "$red",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "re-special": {
+ "color": "$cyan",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "re-repeat": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "diff-delete": {
+ "color": "$red",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "diff-add": {
+ "color": "$green",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "diff-section": {
+ "color": "$magenta",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "spectrogram-low": {
+ "color": "",
+ "background-color": "$green",
+ "underline": false,
+ "bold": false
+ },
+ "spectrogram-medium": {
+ "color": "",
+ "background-color": "$yellow",
+ "underline": false,
+ "bold": false
+ },
+ "spectrogram-high": {
+ "color": "",
+ "background-color": "$red",
+ "underline": false,
+ "bold": false
+ },
+ "file": {
+ "color": "$blue",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ }
+ },
+ "status-styles": {
+ "text": {
+ "color": "$base2",
+ "background-color": "$base01",
+ "underline": false,
+ "bold": false
+ },
+ "warn": {
+ "color": "$yellow",
+ "background-color": "$base01",
+ "underline": false,
+ "bold": false
+ },
+ "alert": {
+ "color": "$red",
+ "background-color": "$base01",
+ "underline": false,
+ "bold": false
+ },
+ "active": {
+ "color": "$green",
+ "background-color": "$base01",
+ "underline": false,
+ "bold": false
+ },
+ "inactive-alert": {
+ "color": "$red",
+ "background-color": "$base02",
+ "underline": false,
+ "bold": false
+ },
+ "inactive": {
+ "color": "$base1",
+ "background-color": "$base02",
+ "underline": false,
+ "bold": false
+ },
+ "title-hotkey": {
+ "color": "$black",
+ "background-color": "#5394ec",
+ "underline": true,
+ "bold": false
+ },
+ "title": {
+ "color": "$base02",
+ "background-color": "$blue",
+ "underline": false,
+ "bold": true
+ },
+ "disabled-title": {
+ "color": "$base01",
+ "background-color": "$base03",
+ "underline": false,
+ "bold": true
+ },
+ "subtitle": {
+ "color": "$base00",
+ "background-color": "$cyan",
+ "underline": false,
+ "bold": true
+ },
+ "info": {
+ "color": "$base1",
+ "background-color": "$base02",
+ "underline": false,
+ "bold": false
+ },
+ "hotkey": {
+ "color": "#fff",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "suggestion": {
+ "color": "$base02",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ }
+ },
+ "log-level-styles": {
+ "trace": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "debug5": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "debug4": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "debug3": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "debug2": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "debug": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "info": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "stats": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "notice": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "warning": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "error": {
+ "color": "$red",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "critical": {
+ "color": "$red",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "fatal": {
+ "color": "$red",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "invalid": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ }
+ },
+ "highlights": {
+
+ }
+ },
+ "solarized-light": {
+ "vars": {
+ "base0": "#839496",
+ "base00": "#657b83",
+ "base01": "#586e75",
+ "base02": "#073642",
+ "base03": "#002b36",
+ "base1": "#93a1a1",
+ "base2": "#ededb0",
+ "base3": "#fdf6e3",
+ "black": "#002b36",
+ "blue": "#268bd2",
+ "cyan": "#2aa198",
+ "green": "#859900",
+ "magenta": "#d33682",
+ "orange": "#cb4b16",
+ "red": "#dc322f",
+ "semantic_highlight_color": "semantic()",
+ "violet": "#6c71c4",
+ "yellow": "#b58900"
+ },
+ "styles": {
+ "identifier": {
+ "color": "semantic()",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "text": {
+ "color": "$base00",
+ "background-color": "$base3",
+ "underline": false,
+ "bold": false
+ },
+ "selected-text": {
+ "color": "",
+ "background-color": "$cyan",
+ "underline": false,
+ "bold": false
+ },
+ "alt-text": {
+ "color": "",
+ "background-color": "$base2",
+ "underline": false,
+ "bold": false
+ },
+ "error": {
+ "color": "$red",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "ok": {
+ "color": "$green",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "info": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "warning": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "hidden": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "cursor-line": {
+ "color": "$base0",
+ "background-color": "#fafa4a",
+ "underline": true,
+ "bold": true
+ },
+ "disabled-cursor-line": {
+ "color": "$cyan",
+ "background-color": "$yellow",
+ "underline": false,
+ "bold": false
+ },
+ "adjusted-time": {
+ "color": "$magenta",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "skewed-time": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "file-offset": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "offset-time": {
+ "color": "$cyan",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "invalid-msg": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "popup": {
+ "color": "$base00",
+ "background-color": "$base2",
+ "underline": false,
+ "bold": false
+ },
+ "focused": {
+ "color": "$base03",
+ "background-color": "$base01",
+ "underline": false,
+ "bold": false
+ },
+ "disabled-focused": {
+ "color": "$base0",
+ "background-color": "$base02",
+ "underline": false,
+ "bold": false
+ },
+ "scrollbar": {
+ "color": "$base3",
+ "background-color": "$base00",
+ "underline": false,
+ "bold": false
+ },
+ "h1": {
+ "color": "",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "h2": {
+ "color": "",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "h3": {
+ "color": "",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "h4": {
+ "color": "",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "h5": {
+ "color": "",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "h6": {
+ "color": "",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "hr": {
+ "color": "#444",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "hyperlink": {
+ "color": "",
+ "background-color": "",
+ "underline": true,
+ "bold": false
+ },
+ "list-glyph": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "breadcrumb": {
+ "color": "#99a",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "table-border": {
+ "color": "#444",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "table-header": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "quote-border": {
+ "color": "#666",
+ "background-color": "#444",
+ "underline": false,
+ "bold": false
+ },
+ "quoted-text": {
+ "color": "",
+ "background-color": "#444",
+ "underline": false,
+ "bold": false
+ },
+ "footnote-border": {
+ "color": "$blue",
+ "background-color": "#444",
+ "underline": false,
+ "bold": false
+ },
+ "footnote-text": {
+ "color": "#eee",
+ "background-color": "#444",
+ "underline": false,
+ "bold": false
+ },
+ "snippet-border": {
+ "color": "$cyan",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "indent-guide": {
+ "color": "$base1",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ }
+ },
+ "syntax-styles": {
+ "inline-code": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "quoted-code": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "code-border": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "keyword": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "string": {
+ "color": "$cyan",
+ "background-color": "",
+ "underline": false,
+ "bold": true
+ },
+ "comment": {
+ "color": "$base1",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "doc-directive": {
+ "color": "$blue",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "variable": {
+ "color": "$blue",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "symbol": {
+ "color": "$blue",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "null": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "ascii-control": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "non-ascii": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "number": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "type": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "function": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "separators-references-accessors": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "re-special": {
+ "color": "$cyan",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "re-repeat": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "diff-delete": {
+ "color": "$red",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "diff-add": {
+ "color": "$green",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "diff-section": {
+ "color": "$magenta",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "spectrogram-low": {
+ "color": "",
+ "background-color": "$green",
+ "underline": false,
+ "bold": false
+ },
+ "spectrogram-medium": {
+ "color": "",
+ "background-color": "$yellow",
+ "underline": false,
+ "bold": false
+ },
+ "spectrogram-high": {
+ "color": "",
+ "background-color": "$red",
+ "underline": false,
+ "bold": false
+ },
+ "file": {
+ "color": "$blue",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ }
+ },
+ "status-styles": {
+ "text": {
+ "color": "$base2",
+ "background-color": "$base03",
+ "underline": false,
+ "bold": false
+ },
+ "warn": {
+ "color": "$yellow",
+ "background-color": "$base03",
+ "underline": false,
+ "bold": false
+ },
+ "alert": {
+ "color": "$red",
+ "background-color": "$base03",
+ "underline": false,
+ "bold": false
+ },
+ "active": {
+ "color": "$green",
+ "background-color": "$base03",
+ "underline": false,
+ "bold": false
+ },
+ "inactive-alert": {
+ "color": "$red",
+ "background-color": "$base03",
+ "underline": false,
+ "bold": false
+ },
+ "inactive": {
+ "color": "$base1",
+ "background-color": "$base03",
+ "underline": false,
+ "bold": false
+ },
+ "title-hotkey": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "title": {
+ "color": "$base2",
+ "background-color": "$base00",
+ "underline": false,
+ "bold": true
+ },
+ "disabled-title": {
+ "color": "$base2",
+ "background-color": "$base02",
+ "underline": false,
+ "bold": true
+ },
+ "subtitle": {
+ "color": "$base2",
+ "background-color": "$base01",
+ "underline": false,
+ "bold": true
+ },
+ "info": {
+ "color": "$base1",
+ "background-color": "$base03",
+ "underline": false,
+ "bold": false
+ },
+ "hotkey": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "suggestion": {
+ "color": "$base1",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ }
+ },
+ "log-level-styles": {
+ "trace": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "debug5": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "debug4": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "debug3": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "debug2": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "debug": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "info": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "stats": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "notice": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "warning": {
+ "color": "$yellow",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "error": {
+ "color": "$red",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "critical": {
+ "color": "$red",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "fatal": {
+ "color": "$red",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ },
+ "invalid": {
+ "color": "",
+ "background-color": "",
+ "underline": false,
+ "bold": false
+ }
+ },
+ "highlights": {
+
+ }
+ }
+ },
+ "mouse": {
+ "mode": "disabled"
+ },
+ "movement": {
+ "mode": "cursor"
+ },
+ "keymap-defs": {
+ "de": {
+ "x21": {
+ "id": "",
+ "command": ":goto last 10 minutes after the hour",
+ "alt-msg": ""
+ },
+ "x22": {
+ "id": "",
+ "command": ":goto last 20 minutes after the hour",
+ "alt-msg": ""
+ },
+ "x24": {
+ "id": "",
+ "command": ":goto last 40 minutes after the hour",
+ "alt-msg": ""
+ },
+ "x25": {
+ "id": "",
+ "command": ":goto last 50 minutes after the hour",
+ "alt-msg": ""
+ },
+ "x26": {
+ "id": "",
+ "command": ":goto last hour",
+ "alt-msg": ""
+ },
+ "x31": {
+ "id": "",
+ "command": ":goto next 10 minutes after the hour",
+ "alt-msg": ""
+ },
+ "x32": {
+ "id": "",
+ "command": ":goto next 20 minutes after the hour",
+ "alt-msg": ""
+ },
+ "x33": {
+ "id": "",
+ "command": ":goto next 30 minutes after the hour",
+ "alt-msg": ""
+ },
+ "x34": {
+ "id": "",
+ "command": ":goto next 40 minutes after the hour",
+ "alt-msg": ""
+ },
+ "x35": {
+ "id": "",
+ "command": ":goto next 50 minutes after the hour",
+ "alt-msg": ""
+ },
+ "x36": {
+ "id": "",
+ "command": ":goto next hour",
+ "alt-msg": ""
+ },
+ "x37": {
+ "id": "",
+ "command": ":goto previous minute",
+ "alt-msg": ""
+ },
+ "x38": {
+ "id": "",
+ "command": ":goto next minute",
+ "alt-msg": ""
+ },
+ "xc2xa7": {
+ "id": "",
+ "command": ":goto last 30 minutes after the hour",
+ "alt-msg": ""
+ }
+ },
+ "default": {
+ "x04": {
+ "id": "",
+ "command": ";UPDATE lnav_views SET top = top + (height / 2), selection = (CASE movement WHEN 'top' THEN selection ELSE top + (height / 2) + (selection - top) END) WHERE name = (SELECT name FROM lnav_top_view)",
+ "alt-msg": ""
+ },
+ "x06": {
+ "id": "",
+ "command": ";UPDATE lnav_view_filters SET enabled = 1 - enabled WHERE view_name = (SELECT name FROM lnav_view_stack WHERE name in ('log', 'text') ORDER BY rowid DESC LIMIT 1)",
+ "alt-msg": ""
+ },
+ "x0c": {
+ "id": "",
+ "command": ":write-screen-to -",
+ "alt-msg": ""
+ },
+ "x12": {
+ "id": "",
+ "command": ":reset-session",
+ "alt-msg": ""
+ },
+ "x15": {
+ "id": "",
+ "command": ";UPDATE lnav_views SET top = max(0, top - (height / 2)), selection = (CASE movement WHEN 'top' THEN selection ELSE max(0, top - (height / 2) + (selection - top)) END) WHERE name = (SELECT name FROM lnav_top_view)",
+ "alt-msg": ""
+ },
+ "x17": {
+ "id": "",
+ "command": ";UPDATE lnav_views SET options = json_set(options, '$.word-wrap', CASE jget(options, '/word-wrap', 'none') WHEN 'none' THEN 'normal' ELSE 'none' END) WHERE name = (SELECT name FROM lnav_top_view)",
+ "alt-msg": ""
+ },
+ "x18": {
+ "id": "",
+ "command": ";UPDATE lnav_views SET movement = (CASE movement WHEN 'top' THEN 'cursor' ELSE 'top' END) WHERE name = (SELECT name FROM lnav_top_view)",
+ "alt-msg": ""
+ },
+ "x21": {
+ "id": "",
+ "command": ":goto last 10 minutes after the hour",
+ "alt-msg": ""
+ },
+ "x23": {
+ "id": "",
+ "command": ":goto last 30 minutes after the hour",
+ "alt-msg": ""
+ },
+ "x24": {
+ "id": "",
+ "command": ":goto last 40 minutes after the hour",
+ "alt-msg": ""
+ },
+ "x25": {
+ "id": "",
+ "command": ":goto last 50 minutes after the hour",
+ "alt-msg": ""
+ },
+ "x2f": {
+ "id": "",
+ "command": ":prompt search",
+ "alt-msg": ""
+ },
+ "x31": {
+ "id": "",
+ "command": ":goto next 10 minutes after the hour",
+ "alt-msg": ""
+ },
+ "x32": {
+ "id": "",
+ "command": ":goto next 20 minutes after the hour",
+ "alt-msg": ""
+ },
+ "x33": {
+ "id": "",
+ "command": ":goto next 30 minutes after the hour",
+ "alt-msg": ""
+ },
+ "x34": {
+ "id": "",
+ "command": ":goto next 40 minutes after the hour",
+ "alt-msg": ""
+ },
+ "x35": {
+ "id": "",
+ "command": ":goto next 50 minutes after the hour",
+ "alt-msg": ""
+ },
+ "x36": {
+ "id": "",
+ "command": ":goto next hour",
+ "alt-msg": ""
+ },
+ "x37": {
+ "id": "",
+ "command": ":goto previous minute",
+ "alt-msg": ""
+ },
+ "x38": {
+ "id": "",
+ "command": ":goto next minute",
+ "alt-msg": ""
+ },
+ "x3a": {
+ "id": "",
+ "command": ":prompt command",
+ "alt-msg": ""
+ },
+ "x3b": {
+ "id": "",
+ "command": ":prompt sql",
+ "alt-msg": ""
+ },
+ "x3d": {
+ "id": "",
+ "command": ";UPDATE lnav_views SET paused = 1 - paused",
+ "alt-msg": ""
+ },
+ "x3f": {
+ "id": "",
+ "command": ":toggle-view help",
+ "alt-msg": ""
+ },
+ "x40": {
+ "id": "",
+ "command": ":goto last 20 minutes after the hour",
+ "alt-msg": ""
+ },
+ "x45": {
+ "id": "",
+ "command": ":prev-mark error",
+ "alt-msg": "${keymap_def_alt_warning}"
+ },
+ "x4e": {
+ "id": "",
+ "command": ":prev-mark search",
+ "alt-msg": "${keymap_def_scroll_horiz}"
+ },
+ "x50": {
+ "id": "",
+ "command": ":toggle-view pretty",
+ "alt-msg": "${keymap_def_pop_view}"
+ },
+ "x51": {
+ "id": "",
+ "command": "|lnav-pop-view ${keyseq}",
+ "alt-msg": ""
+ },
+ "x54": {
+ "id": "",
+ "command": ";UPDATE lnav_views SET options = json_set(options, '$.row-time-offset', CASE jget(options, '/row-time-offset', 'hide') WHEN 'hide' THEN 'show' ELSE 'hide' END) WHERE name = (SELECT name FROM lnav_top_view)",
+ "alt-msg": "${keymap_def_time_offset}"
+ },
+ "x55": {
+ "id": "",
+ "command": ":prev-mark",
+ "alt-msg": ""
+ },
+ "x57": {
+ "id": "",
+ "command": ":prev-mark warning",
+ "alt-msg": "${keymap_def_alt_hour_boundary}"
+ },
+ "x58": {
+ "id": "",
+ "command": ":close",
+ "alt-msg": ""
+ },
+ "x5e": {
+ "id": "",
+ "command": ":goto last hour",
+ "alt-msg": ""
+ },
+ "x60": {
+ "id": "org.lnav.key.breadcrumb.focus",
+ "command": ":prompt breadcrumb",
+ "alt-msg": ""
+ },
+ "x63": {
+ "id": "",
+ "command": "|lnav-copy-text",
+ "alt-msg": "${keymap_def_clear}"
+ },
+ "x65": {
+ "id": "",
+ "command": ":next-mark error",
+ "alt-msg": "${keymap_def_alt_warning}"
+ },
+ "x67": {
+ "id": "",
+ "command": ":goto 0",
+ "alt-msg": ""
+ },
+ "x69": {
+ "id": "",
+ "command": ":toggle-view histogram",
+ "alt-msg": "${keymap_def_zoom}"
+ },
+ "x6d": {
+ "id": "",
+ "command": ":mark",
+ "alt-msg": "${keymap_def_next_user_mark}"
+ },
+ "x6e": {
+ "id": "",
+ "command": ":next-mark search",
+ "alt-msg": "${keymap_def_scroll_horiz}"
+ },
+ "x70": {
+ "id": "",
+ "command": ";UPDATE lnav_views SET options = json_set(options, '$.row-details', CASE jget(options, '/row-details', 'hide') WHEN 'hide' THEN 'show' ELSE 'hide' END) WHERE name = (SELECT name FROM lnav_top_view)",
+ "alt-msg": ""
+ },
+ "x71": {
+ "id": "",
+ "command": "|lnav-pop-view ${keyseq}",
+ "alt-msg": ""
+ },
+ "x75": {
+ "id": "",
+ "command": ":next-mark",
+ "alt-msg": "${keymap_def_next_mark}"
+ },
+ "x76": {
+ "id": "",
+ "command": ":toggle-view db",
+ "alt-msg": ""
+ },
+ "x77": {
+ "id": "",
+ "command": ":next-mark warning",
+ "alt-msg": "${keymap_def_alt_hour_boundary}"
+ },
+ "x78": {
+ "id": "",
+ "command": ";UPDATE lnav_views SET options = json_set(options, '$.hidden-fields', CASE jget(options, '/hidden-fields', 'hide') WHEN 'hide' THEN 'show' ELSE 'hide' END) WHERE name = (SELECT name FROM lnav_top_view)",
+ "alt-msg": ""
+ },
+ "x7b": {
+ "id": "",
+ "command": ":prev-section",
+ "alt-msg": "${keymap_def_next_location}"
+ },
+ "x7c": {
+ "id": "",
+ "command": ":prompt script",
+ "alt-msg": ""
+ },
+ "x7d": {
+ "id": "",
+ "command": ":next-section",
+ "alt-msg": "${keymap_def_prev_location}"
+ }
+ },
+ "fr": {
+ "x22": {
+ "id": "",
+ "command": ":goto next 30 minutes after the hour",
+ "alt-msg": ""
+ },
+ "x26": {
+ "id": "",
+ "command": ":goto next 10 minutes after the hour",
+ "alt-msg": ""
+ },
+ "x27": {
+ "id": "",
+ "command": ":goto next 40 minutes after the hour",
+ "alt-msg": ""
+ },
+ "x28": {
+ "id": "",
+ "command": ":goto next 50 minutes after the hour",
+ "alt-msg": ""
+ },
+ "x2d": {
+ "id": "",
+ "command": ":goto next hour",
+ "alt-msg": ""
+ },
+ "x31": {
+ "id": "",
+ "command": ":goto last 10 minutes after the hour",
+ "alt-msg": ""
+ },
+ "x32": {
+ "id": "",
+ "command": ":goto last 20 minutes after the hour",
+ "alt-msg": ""
+ },
+ "x33": {
+ "id": "",
+ "command": ":goto last 30 minutes after the hour",
+ "alt-msg": ""
+ },
+ "x34": {
+ "id": "",
+ "command": ":goto last 40 minutes after the hour",
+ "alt-msg": ""
+ },
+ "x35": {
+ "id": "",
+ "command": ":goto last 50 minutes after the hour",
+ "alt-msg": ""
+ },
+ "x36": {
+ "id": "",
+ "command": ":goto last hour",
+ "alt-msg": ""
+ },
+ "x37": {
+ "id": "",
+ "command": ":goto previous minute",
+ "alt-msg": ""
+ },
+ "xc3xa8": {
+ "id": "",
+ "command": ":goto next minute",
+ "alt-msg": ""
+ },
+ "xc3xa9": {
+ "id": "",
+ "command": ":goto next 20 minutes after the hour",
+ "alt-msg": ""
+ }
+ },
+ "sv": {
+ "x22": {
+ "id": "",
+ "command": ":goto last 20 minutes after the hour",
+ "alt-msg": ""
+ },
+ "x26": {
+ "id": "",
+ "command": ":goto last hour",
+ "alt-msg": ""
+ },
+ "x2b": {
+ "id": "",
+ "command": ";UPDATE lnav_views SET paused = 1 - paused",
+ "alt-msg": ""
+ },
+ "x3d": {
+ "id": "",
+ "command": ":goto last day",
+ "alt-msg": ""
+ },
+ "x60": {
+ "id": "",
+ "command": ":prompt breadcrumb",
+ "alt-msg": ""
+ },
+ "xc2xa4": {
+ "id": "",
+ "command": ":goto last 40 minutes after the hour",
+ "alt-msg": ""
+ },
+ "xc2xa7": {
+ "id": "org.lnav.key.breadcrumb.focus",
+ "command": ":prompt breadcrumb",
+ "alt-msg": ""
+ },
+ "xe2x82xac": {
+ "id": "",
+ "command": ":goto last 40 minutes after the hour",
+ "alt-msg": ""
+ }
+ },
+ "uk": {
+ "x22": {
+ "id": "",
+ "command": ":goto last 20 minutes after the hour",
+ "alt-msg": ""
+ },
+ "xc2xa3": {
+ "id": "",
+ "command": ":goto last 30 minutes after the hour",
+ "alt-msg": ""
+ }
+ },
+ "us": {
+ "x21": {
+ "id": "",
+ "command": ":goto last 10 minutes after the hour",
+ "alt-msg": ""
+ },
+ "x23": {
+ "id": "",
+ "command": ":goto last 30 minutes after the hour",
+ "alt-msg": ""
+ },
+ "x24": {
+ "id": "",
+ "command": ":goto last 40 minutes after the hour",
+ "alt-msg": ""
+ },
+ "x25": {
+ "id": "",
+ "command": ":goto last 50 minutes after the hour",
+ "alt-msg": ""
+ },
+ "x31": {
+ "id": "",
+ "command": ":goto next 10 minutes after the hour",
+ "alt-msg": ""
+ },
+ "x32": {
+ "id": "",
+ "command": ":goto next 20 minutes after the hour",
+ "alt-msg": ""
+ },
+ "x33": {
+ "id": "",
+ "command": ":goto next 30 minutes after the hour",
+ "alt-msg": ""
+ },
+ "x34": {
+ "id": "",
+ "command": ":goto next 40 minutes after the hour",
+ "alt-msg": ""
+ },
+ "x35": {
+ "id": "",
+ "command": ":goto next 50 minutes after the hour",
+ "alt-msg": ""
+ },
+ "x36": {
+ "id": "",
+ "command": ":goto next hour",
+ "alt-msg": ""
+ },
+ "x37": {
+ "id": "",
+ "command": ":goto previous minute",
+ "alt-msg": ""
+ },
+ "x38": {
+ "id": "",
+ "command": ":goto next minute",
+ "alt-msg": ""
+ },
+ "x40": {
+ "id": "",
+ "command": ":goto last 20 minutes after the hour",
+ "alt-msg": ""
+ },
+ "x5e": {
+ "id": "",
+ "command": ":goto last hour",
+ "alt-msg": ""
+ }
+ }
+ }
+ },
+ "log": {
+ "date-time": {
+ "convert-zoned-to-local": true
+ },
+ "watch-expressions": {
+
+ },
+ "annotations": {
+ "com.vmware.vmacore.backtrace": {
+ "description": "Convert a vmacore backtrace into human-readable text",
+ "condition": ":log_body LIKE '%[context]%[/context]%'",
+ "handler": "com.vmware.btresolver.py"
+ },
+ "org.lnav.test": {
+ "description": "test annotation",
+ "condition": ":c_ip IS NOT NULL AND $TEST_ANNO = '1'",
+ "handler": "anno-test.sh"
+ }
+ }
+ },
+ "global": {
+ "keymap_def_alt_hour_boundary": "Press ${ansi_bold}6${ansi_bold}/${ansi_bold}^${ansi_norm} to move to the next/previous hour boundary",
+ "keymap_def_alt_warning": "Press ${ansi_bold}w${ansi_norm}/${ansi_bold}W${ansi_norm} to move forward/backward through ${ansi_yellow}warning${ansi_norm} messages",
+ "keymap_def_clear": "Press ${ansi_bold}C${ansi_norm} to clear marked messages",
+ "keymap_def_db_view": "Press ${ansi_bold}v${ansi_norm}/${ansi_bold}V${ansi_norm} to switch to the SQL result view",
+ "keymap_def_hist_view": "Press ${ansi_bold}i${ansi_norm}/${ansi_bold}I${ansi_norm} to switch to the histogram view",
+ "keymap_def_next_mark": "Press ${ansi_bold}c${ansi_norm} to copy marked lines to the clipboard; press ${ansi_bold}C${ansi_norm} to clear marked lines",
+ "keymap_def_next_section": "Press ${ansi_bold}}${ansi_norm} to move to the next section in the view",
+ "keymap_def_next_user_mark": "Press ${ansi_bold}u${ansi_norm}/${ansi_bold}U${ansi_norm} to move forward/backward through user bookmarks",
+ "keymap_def_pop_view": "Press ${ansi_bold}q${ansi_norm} to return to the previous view",
+ "keymap_def_prev_section": "Press ${ansi_bold}{${ansi_norm} to move to the previous section in the view",
+ "keymap_def_scroll_horiz": "Press \\'${ansi_bold}>${ansi_norm}\\' or \\'${ansi_bold}<${ansi_norm}\\' to scroll horizontally to a search result",
+ "keymap_def_text_view": "Press ${ansi_bold}t${ansi_norm} to switch to the text view",
+ "keymap_def_time_offset": "Press ${ansi_bold}s${ansi_norm}/${ansi_bold}S${ansi_norm} to move forward/backward through slow downs",
+ "keymap_def_zoom": "Press ${ansi_bold}z${ansi_norm}/${ansi_bold}Z${ansi_norm} to zoom in/out"
+ }
+}
+
diff --git a/test/expected/test_cmds.sh_a0e6214b2a85c90d31aee12efde850441cca7eb3.err b/test/expected/test_cli.sh_108c6922cde063429f76abc3fdb8a81ad9a2f671.err
index e69de29..e69de29 100644
--- a/test/expected/test_cmds.sh_a0e6214b2a85c90d31aee12efde850441cca7eb3.err
+++ b/test/expected/test_cli.sh_108c6922cde063429f76abc3fdb8a81ad9a2f671.err
diff --git a/test/expected/test_cli.sh_108c6922cde063429f76abc3fdb8a81ad9a2f671.out b/test/expected/test_cli.sh_108c6922cde063429f76abc3fdb8a81ad9a2f671.out
new file mode 100644
index 0000000..45b983b
--- /dev/null
+++ b/test/expected/test_cli.sh_108c6922cde063429f76abc3fdb8a81ad9a2f671.out
@@ -0,0 +1 @@
+hi
diff --git a/test/expected/test_cli.sh_10c33e465ef7681c6b5519d05d557426b26cd43d.err b/test/expected/test_cli.sh_10c33e465ef7681c6b5519d05d557426b26cd43d.err
new file mode 100644
index 0000000..0f7ae0c
--- /dev/null
+++ b/test/expected/test_cli.sh_10c33e465ef7681c6b5519d05d557426b26cd43d.err
@@ -0,0 +1,4 @@
+ⓘ info: the following piper captures were found in:
+ piper-tmp/lnav-user-{uid}-work/piper
+ = note: The captures currently consume 33B of disk space. File sizes include associated metadata.
+ = help: You can reopen a capture by passing the piper URL to lnav
diff --git a/test/expected/test_cli.sh_10c33e465ef7681c6b5519d05d557426b26cd43d.out b/test/expected/test_cli.sh_10c33e465ef7681c6b5519d05d557426b26cd43d.out
new file mode 100644
index 0000000..26c7111
--- /dev/null
+++ b/test/expected/test_cli.sh_10c33e465ef7681c6b5519d05d557426b26cd43d.out
@@ -0,0 +1 @@
+ just now piper://p-e25e2eb68547f31e42da0818b4d0084f-000  33.0 B “[0] echo hi”
diff --git a/test/expected/test_cmds.sh_d7eebacdcf2cb194f25fa4ef97b7b5376b442467.out b/test/expected/test_cli.sh_3114508cf42fb2608ef77f4bc294a84885c97a79.err
index e69de29..e69de29 100644
--- a/test/expected/test_cmds.sh_d7eebacdcf2cb194f25fa4ef97b7b5376b442467.out
+++ b/test/expected/test_cli.sh_3114508cf42fb2608ef77f4bc294a84885c97a79.err
diff --git a/test/expected/test_cli.sh_3114508cf42fb2608ef77f4bc294a84885c97a79.out b/test/expected/test_cli.sh_3114508cf42fb2608ef77f4bc294a84885c97a79.out
new file mode 100644
index 0000000..45b983b
--- /dev/null
+++ b/test/expected/test_cli.sh_3114508cf42fb2608ef77f4bc294a84885c97a79.out
@@ -0,0 +1 @@
+hi
diff --git a/test/expected/test_config.sh_5105c29004e297521310ca0bd0fd560b01c2c549.out b/test/expected/test_cli.sh_4327033cfae0d4c170a38a3c4a570520bfabb493.err
index e69de29..e69de29 100644
--- a/test/expected/test_config.sh_5105c29004e297521310ca0bd0fd560b01c2c549.out
+++ b/test/expected/test_cli.sh_4327033cfae0d4c170a38a3c4a570520bfabb493.err
diff --git a/test/expected/test_cli.sh_4327033cfae0d4c170a38a3c4a570520bfabb493.out b/test/expected/test_cli.sh_4327033cfae0d4c170a38a3c4a570520bfabb493.out
new file mode 100644
index 0000000..45b983b
--- /dev/null
+++ b/test/expected/test_cli.sh_4327033cfae0d4c170a38a3c4a570520bfabb493.out
@@ -0,0 +1 @@
+hi
diff --git a/test/expected/test_format_loader.sh_3f1d6f35e8a9ae4fd3e91ffaa82a037b5a847ab7.out b/test/expected/test_cli.sh_76aa57821598962e59063a40c20171040c95a731.err
index e69de29..e69de29 100644
--- a/test/expected/test_format_loader.sh_3f1d6f35e8a9ae4fd3e91ffaa82a037b5a847ab7.out
+++ b/test/expected/test_cli.sh_76aa57821598962e59063a40c20171040c95a731.err
diff --git a/test/expected/test_cli.sh_76aa57821598962e59063a40c20171040c95a731.out b/test/expected/test_cli.sh_76aa57821598962e59063a40c20171040c95a731.out
new file mode 100644
index 0000000..f6223f2
--- /dev/null
+++ b/test/expected/test_cli.sh_76aa57821598962e59063a40c20171040c95a731.out
@@ -0,0 +1,9 @@
+[
+ {
+ "filepath": "[0] echo hi",
+ "descriptor": "org.lnav.piper.header",
+ "mimetype": "application/json",
+ "ctime": "2013-06-06T19:13:20.000",
+ "cwd": "{test_dir}"
+ }
+]
diff --git a/test/expected/test_cli.sh_a1a09f890f4604309d0a81bbbec8e50fb7d5e887.out b/test/expected/test_cli.sh_a1a09f890f4604309d0a81bbbec8e50fb7d5e887.out
deleted file mode 100644
index 1e0a993..0000000
--- a/test/expected/test_cli.sh_a1a09f890f4604309d0a81bbbec8e50fb7d5e887.out
+++ /dev/null
@@ -1,3 +0,0 @@
-2013-06-06T19:13:20.123 Hello, World!
-2013-06-06T19:13:20.123 Goodbye, World!
-2013-06-06T19:13:20.123 ---- END-OF-STDIN ----
diff --git a/test/expected/test_format_loader.sh_a47f2b090a5d8a226783835c7ff7d1c8821f11ed.out b/test/expected/test_cli.sh_af3ace7762b4cc150fcdcac86083b379bded7b32.err
index e69de29..e69de29 100644
--- a/test/expected/test_format_loader.sh_a47f2b090a5d8a226783835c7ff7d1c8821f11ed.out
+++ b/test/expected/test_cli.sh_af3ace7762b4cc150fcdcac86083b379bded7b32.err
diff --git a/test/expected/test_cli.sh_af3ace7762b4cc150fcdcac86083b379bded7b32.out b/test/expected/test_cli.sh_af3ace7762b4cc150fcdcac86083b379bded7b32.out
new file mode 100644
index 0000000..f6223f2
--- /dev/null
+++ b/test/expected/test_cli.sh_af3ace7762b4cc150fcdcac86083b379bded7b32.out
@@ -0,0 +1,9 @@
+[
+ {
+ "filepath": "[0] echo hi",
+ "descriptor": "org.lnav.piper.header",
+ "mimetype": "application/json",
+ "ctime": "2013-06-06T19:13:20.000",
+ "cwd": "{test_dir}"
+ }
+]
diff --git a/test/expected/test_json_format.sh_90a037c7d9d70ac4ca97158271ea242787313377.err b/test/expected/test_cli.sh_c69c835a3c43210225cf62564b3e9584c899af20.err
index e69de29..e69de29 100644
--- a/test/expected/test_json_format.sh_90a037c7d9d70ac4ca97158271ea242787313377.err
+++ b/test/expected/test_cli.sh_c69c835a3c43210225cf62564b3e9584c899af20.err
diff --git a/test/expected/test_cli.sh_c69c835a3c43210225cf62564b3e9584c899af20.out b/test/expected/test_cli.sh_c69c835a3c43210225cf62564b3e9584c899af20.out
new file mode 100644
index 0000000..7600bd0
--- /dev/null
+++ b/test/expected/test_cli.sh_c69c835a3c43210225cf62564b3e9584c899af20.out
@@ -0,0 +1,4 @@
+Feb 25 16:20:15 192.168.4.2 haproxy[7]: 95.216.197.33:56224 [25/Feb/2019:16:20:10.111] prod_http_in/sktst2: SSL handshake failure
+Feb 25 16:20:16 192.168.4.2 haproxy[7]: 87.183.41.77:50188 [25/Feb/2019:16:20:12.321] prod_http_in~ bk_ktest_sonst/nginx_sonst 0/0/1/0/1 200 5959 - - ---- 9/9/0/0/0 0/0 {Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0} {} "GET /media/pi_fontawesome/css/font-awesome.css?1550939694 HTTP/1.1"
+Feb 25 16:20:17 192.168.4.2 haproxy[7]: 87.183.41.77:50187 [25/Feb/2019:16:20:12.325] prod_http_in~ bk_ktest_sonst/nginx_sonst 0/0/1/0/1 200 1859 - - ---- 9/9/0/0/0 0/0 {Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0} {} "GET /media/pi_popup/1.1.0/magnific-popup.css?1550939704 HTTP/1.1"
+Feb 25 16:20:18 192.168.4.2 haproxy[7]: 87.183.41.77:50189 [25/Feb/2019:16:20:12.331] prod_http_in~ bk_ktest_sonst/nginx_sonst 0/0/1/0/1 200 2496 - - ---- 9/9/0/0/0 0/0 {Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0} {} "GET /media/core/core.css?1550939640 HTTP/1.1"
diff --git a/test/expected/test_json_format.sh_a6be47f1311ed92feaf303142fcb103deb80f456.err b/test/expected/test_cli.sh_cc06341dd560f927512e92c7c0985ed8b25827ae.err
index e69de29..e69de29 100644
--- a/test/expected/test_json_format.sh_a6be47f1311ed92feaf303142fcb103deb80f456.err
+++ b/test/expected/test_cli.sh_cc06341dd560f927512e92c7c0985ed8b25827ae.err
diff --git a/test/expected/test_cli.sh_cc06341dd560f927512e92c7c0985ed8b25827ae.out b/test/expected/test_cli.sh_cc06341dd560f927512e92c7c0985ed8b25827ae.out
new file mode 100644
index 0000000..22a87a3
--- /dev/null
+++ b/test/expected/test_cli.sh_cc06341dd560f927512e92c7c0985ed8b25827ae.out
@@ -0,0 +1,1187 @@
+/global/keymap_def_alt_hour_boundary -> default-keymap.json:5
+/global/keymap_def_alt_warning -> default-keymap.json:4
+/global/keymap_def_clear -> default-keymap.json:13
+/global/keymap_def_db_view -> default-keymap.json:8
+/global/keymap_def_hist_view -> default-keymap.json:9
+/global/keymap_def_next_mark -> default-keymap.json:16
+/global/keymap_def_next_section -> default-keymap.json:15
+/global/keymap_def_next_user_mark -> default-keymap.json:7
+/global/keymap_def_pop_view -> default-keymap.json:11
+/global/keymap_def_prev_section -> default-keymap.json:14
+/global/keymap_def_scroll_horiz -> default-keymap.json:6
+/global/keymap_def_text_view -> default-keymap.json:10
+/global/keymap_def_time_offset -> default-keymap.json:17
+/global/keymap_def_zoom -> default-keymap.json:12
+/log/annotations/com.vmware.vmacore.backtrace/condition -> root-config.json:23
+/log/annotations/com.vmware.vmacore.backtrace/description -> root-config.json:22
+/log/annotations/com.vmware.vmacore.backtrace/handler -> root-config.json:24
+/log/annotations/org.lnav.test/condition -> {test_dir}/configs/installed/anno-test.json:7
+/log/annotations/org.lnav.test/description -> {test_dir}/configs/installed/anno-test.json:6
+/log/annotations/org.lnav.test/handler -> {test_dir}/configs/installed/anno-test.json:8
+/log/date-time/convert-zoned-to-local -> root-config.json:18
+/tuning/archive-manager/cache-ttl -> root-config.json:31
+/tuning/archive-manager/min-free-space -> root-config.json:30
+/tuning/clipboard/impls/MacOS/find/read -> root-config.json:59
+/tuning/clipboard/impls/MacOS/find/write -> root-config.json:58
+/tuning/clipboard/impls/MacOS/general/read -> root-config.json:55
+/tuning/clipboard/impls/MacOS/general/write -> root-config.json:54
+/tuning/clipboard/impls/MacOS/test -> root-config.json:52
+/tuning/clipboard/impls/NeoVim/general/read -> root-config.json:87
+/tuning/clipboard/impls/NeoVim/general/write -> root-config.json:86
+/tuning/clipboard/impls/NeoVim/test -> root-config.json:84
+/tuning/clipboard/impls/Wayland/general/read -> root-config.json:66
+/tuning/clipboard/impls/Wayland/general/write -> root-config.json:65
+/tuning/clipboard/impls/Wayland/test -> root-config.json:63
+/tuning/clipboard/impls/Windows/general/write -> root-config.json:93
+/tuning/clipboard/impls/Windows/test -> root-config.json:91
+/tuning/clipboard/impls/X11-xclip/general/read -> root-config.json:73
+/tuning/clipboard/impls/X11-xclip/general/write -> root-config.json:72
+/tuning/clipboard/impls/X11-xclip/test -> root-config.json:70
+/tuning/clipboard/impls/tmux/general/read -> root-config.json:80
+/tuning/clipboard/impls/tmux/general/write -> root-config.json:79
+/tuning/clipboard/impls/tmux/test -> root-config.json:77
+/tuning/piper/max-size -> root-config.json:45
+/tuning/piper/rotations -> root-config.json:46
+/tuning/piper/ttl -> root-config.json:47
+/tuning/remote/ssh/command -> root-config.json:35
+/tuning/remote/ssh/config/BatchMode -> root-config.json:37
+/tuning/remote/ssh/config/ConnectTimeout -> root-config.json:38
+/tuning/remote/ssh/start-command -> root-config.json:40
+/tuning/remote/ssh/transfer-command -> root-config.json:41
+/tuning/url-scheme/docker-compose/handler -> root-config.json:103
+/tuning/url-scheme/docker/handler -> root-config.json:100
+/tuning/url-scheme/hw/handler -> {test_dir}/configs/installed/hw-url-handler.json:6
+/tuning/url-scheme/journald/handler -> root-config.json:106
+/tuning/url-scheme/piper/handler -> root-config.json:109
+/tuning/url-scheme/podman/handler -> root-config.json:112
+/ui/clock-format -> root-config.json:4
+/ui/default-colors -> root-config.json:6
+/ui/dim-text -> root-config.json:5
+/ui/keymap -> root-config.json:7
+/ui/keymap-defs/de/x21/command -> de-keymap.json:31
+/ui/keymap-defs/de/x22/command -> de-keymap.json:34
+/ui/keymap-defs/de/x24/command -> de-keymap.json:40
+/ui/keymap-defs/de/x25/command -> de-keymap.json:43
+/ui/keymap-defs/de/x26/command -> de-keymap.json:46
+/ui/keymap-defs/de/x31/command -> de-keymap.json:7
+/ui/keymap-defs/de/x32/command -> de-keymap.json:10
+/ui/keymap-defs/de/x33/command -> de-keymap.json:13
+/ui/keymap-defs/de/x34/command -> de-keymap.json:16
+/ui/keymap-defs/de/x35/command -> de-keymap.json:19
+/ui/keymap-defs/de/x36/command -> de-keymap.json:22
+/ui/keymap-defs/de/x37/command -> de-keymap.json:25
+/ui/keymap-defs/de/x38/command -> de-keymap.json:28
+/ui/keymap-defs/de/xc2xa7/command -> de-keymap.json:37
+/ui/keymap-defs/default/x04/command -> default-keymap.json:77
+/ui/keymap-defs/default/x06/command -> default-keymap.json:65
+/ui/keymap-defs/default/x0c/command -> default-keymap.json:68
+/ui/keymap-defs/default/x12/command -> default-keymap.json:71
+/ui/keymap-defs/default/x15/command -> default-keymap.json:80
+/ui/keymap-defs/default/x17/command -> default-keymap.json:146
+/ui/keymap-defs/default/x18/command -> default-keymap.json:74
+/ui/keymap-defs/default/x21/command -> default-keymap.json:47
+/ui/keymap-defs/default/x23/command -> default-keymap.json:53
+/ui/keymap-defs/default/x24/command -> default-keymap.json:56
+/ui/keymap-defs/default/x25/command -> default-keymap.json:59
+/ui/keymap-defs/default/x2f/command -> default-keymap.json:95
+/ui/keymap-defs/default/x31/command -> default-keymap.json:23
+/ui/keymap-defs/default/x32/command -> default-keymap.json:26
+/ui/keymap-defs/default/x33/command -> default-keymap.json:29
+/ui/keymap-defs/default/x34/command -> default-keymap.json:32
+/ui/keymap-defs/default/x35/command -> default-keymap.json:35
+/ui/keymap-defs/default/x36/command -> default-keymap.json:38
+/ui/keymap-defs/default/x37/command -> default-keymap.json:41
+/ui/keymap-defs/default/x38/command -> default-keymap.json:44
+/ui/keymap-defs/default/x3a/command -> default-keymap.json:89
+/ui/keymap-defs/default/x3b/command -> default-keymap.json:98
+/ui/keymap-defs/default/x3d/command -> default-keymap.json:83
+/ui/keymap-defs/default/x3f/command -> default-keymap.json:164
+/ui/keymap-defs/default/x40/command -> default-keymap.json:50
+/ui/keymap-defs/default/x45/alt-msg -> default-keymap.json:102
+/ui/keymap-defs/default/x45/command -> default-keymap.json:101
+/ui/keymap-defs/default/x4e/alt-msg -> default-keymap.json:129
+/ui/keymap-defs/default/x4e/command -> default-keymap.json:128
+/ui/keymap-defs/default/x50/alt-msg -> default-keymap.json:172
+/ui/keymap-defs/default/x50/command -> default-keymap.json:171
+/ui/keymap-defs/default/x51/command -> default-keymap.json:185
+/ui/keymap-defs/default/x54/alt-msg -> default-keymap.json:137
+/ui/keymap-defs/default/x54/command -> default-keymap.json:136
+/ui/keymap-defs/default/x55/command -> default-keymap.json:153
+/ui/keymap-defs/default/x57/alt-msg -> default-keymap.json:110
+/ui/keymap-defs/default/x57/command -> default-keymap.json:109
+/ui/keymap-defs/default/x58/command -> default-keymap.json:86
+/ui/keymap-defs/default/x5e/command -> default-keymap.json:62
+/ui/keymap-defs/default/x60/command -> default-keymap.json:176
+/ui/keymap-defs/default/x60/id -> default-keymap.json:175
+/ui/keymap-defs/default/x63/alt-msg -> default-keymap.json:118
+/ui/keymap-defs/default/x63/command -> default-keymap.json:117
+/ui/keymap-defs/default/x65/alt-msg -> default-keymap.json:106
+/ui/keymap-defs/default/x65/command -> default-keymap.json:105
+/ui/keymap-defs/default/x67/command -> default-keymap.json:121
+/ui/keymap-defs/default/x69/alt-msg -> default-keymap.json:168
+/ui/keymap-defs/default/x69/command -> default-keymap.json:167
+/ui/keymap-defs/default/x6d/alt-msg -> default-keymap.json:125
+/ui/keymap-defs/default/x6d/command -> default-keymap.json:124
+/ui/keymap-defs/default/x6e/alt-msg -> default-keymap.json:133
+/ui/keymap-defs/default/x6e/command -> default-keymap.json:132
+/ui/keymap-defs/default/x70/command -> default-keymap.json:140
+/ui/keymap-defs/default/x71/command -> default-keymap.json:182
+/ui/keymap-defs/default/x75/alt-msg -> default-keymap.json:150
+/ui/keymap-defs/default/x75/command -> default-keymap.json:149
+/ui/keymap-defs/default/x76/command -> default-keymap.json:179
+/ui/keymap-defs/default/x77/alt-msg -> default-keymap.json:114
+/ui/keymap-defs/default/x77/command -> default-keymap.json:113
+/ui/keymap-defs/default/x78/command -> default-keymap.json:143
+/ui/keymap-defs/default/x7b/alt-msg -> default-keymap.json:161
+/ui/keymap-defs/default/x7b/command -> default-keymap.json:160
+/ui/keymap-defs/default/x7c/command -> default-keymap.json:92
+/ui/keymap-defs/default/x7d/alt-msg -> default-keymap.json:157
+/ui/keymap-defs/default/x7d/command -> default-keymap.json:156
+/ui/keymap-defs/fr/x22/command -> fr-keymap.json:13
+/ui/keymap-defs/fr/x26/command -> fr-keymap.json:7
+/ui/keymap-defs/fr/x27/command -> fr-keymap.json:16
+/ui/keymap-defs/fr/x28/command -> fr-keymap.json:19
+/ui/keymap-defs/fr/x2d/command -> fr-keymap.json:22
+/ui/keymap-defs/fr/x31/command -> fr-keymap.json:28
+/ui/keymap-defs/fr/x32/command -> fr-keymap.json:31
+/ui/keymap-defs/fr/x33/command -> fr-keymap.json:34
+/ui/keymap-defs/fr/x34/command -> fr-keymap.json:37
+/ui/keymap-defs/fr/x35/command -> fr-keymap.json:40
+/ui/keymap-defs/fr/x36/command -> fr-keymap.json:43
+/ui/keymap-defs/fr/x37/command -> fr-keymap.json:46
+/ui/keymap-defs/fr/xc3xa8/command -> fr-keymap.json:25
+/ui/keymap-defs/fr/xc3xa9/command -> fr-keymap.json:10
+/ui/keymap-defs/sv/x22/command -> sv-keymap.json:7
+/ui/keymap-defs/sv/x26/command -> sv-keymap.json:16
+/ui/keymap-defs/sv/x2b/command -> sv-keymap.json:22
+/ui/keymap-defs/sv/x3d/command -> sv-keymap.json:19
+/ui/keymap-defs/sv/x60/command -> sv-keymap.json:26
+/ui/keymap-defs/sv/x60/id -> sv-keymap.json:25
+/ui/keymap-defs/sv/xc2xa4/command -> sv-keymap.json:10
+/ui/keymap-defs/sv/xc2xa7/command -> sv-keymap.json:30
+/ui/keymap-defs/sv/xc2xa7/id -> sv-keymap.json:29
+/ui/keymap-defs/sv/xe2x82xac/command -> sv-keymap.json:13
+/ui/keymap-defs/uk/x22/command -> uk-keymap.json:7
+/ui/keymap-defs/uk/xc2xa3/command -> uk-keymap.json:10
+/ui/keymap-defs/us/x21/command -> us-keymap.json:31
+/ui/keymap-defs/us/x23/command -> us-keymap.json:37
+/ui/keymap-defs/us/x24/command -> us-keymap.json:40
+/ui/keymap-defs/us/x25/command -> us-keymap.json:43
+/ui/keymap-defs/us/x31/command -> us-keymap.json:7
+/ui/keymap-defs/us/x32/command -> us-keymap.json:10
+/ui/keymap-defs/us/x33/command -> us-keymap.json:13
+/ui/keymap-defs/us/x34/command -> us-keymap.json:16
+/ui/keymap-defs/us/x35/command -> us-keymap.json:19
+/ui/keymap-defs/us/x36/command -> us-keymap.json:22
+/ui/keymap-defs/us/x37/command -> us-keymap.json:25
+/ui/keymap-defs/us/x38/command -> us-keymap.json:28
+/ui/keymap-defs/us/x40/command -> us-keymap.json:34
+/ui/keymap-defs/us/x5e/command -> us-keymap.json:46
+/ui/mouse/mode -> root-config.json:10
+/ui/movement/mode -> root-config.json:13
+/ui/theme -> root-config.json:8
+/ui/theme-defs/default/highlights/colors/pattern -> default-theme.json:295
+/ui/theme-defs/default/highlights/colors/style/color -> default-theme.json:297
+/ui/theme-defs/default/highlights/ipv4/pattern -> default-theme.json:301
+/ui/theme-defs/default/highlights/ipv4/style/color -> default-theme.json:303
+/ui/theme-defs/default/highlights/xml-decl/pattern -> default-theme.json:313
+/ui/theme-defs/default/highlights/xml-decl/style/color -> default-theme.json:315
+/ui/theme-defs/default/highlights/xml/pattern -> default-theme.json:307
+/ui/theme-defs/default/highlights/xml/style/color -> default-theme.json:309
+/ui/theme-defs/default/log-level-styles/critical/color -> default-theme.json:287
+/ui/theme-defs/default/log-level-styles/error/color -> default-theme.json:284
+/ui/theme-defs/default/log-level-styles/fatal/color -> default-theme.json:290
+/ui/theme-defs/default/log-level-styles/warning/color -> default-theme.json:281
+/ui/theme-defs/default/status-styles/active/background-color -> default-theme.json:254
+/ui/theme-defs/default/status-styles/active/color -> default-theme.json:253
+/ui/theme-defs/default/status-styles/alert/background-color -> default-theme.json:250
+/ui/theme-defs/default/status-styles/alert/color -> default-theme.json:249
+/ui/theme-defs/default/status-styles/disabled-title/background-color -> default-theme.json:233
+/ui/theme-defs/default/status-styles/disabled-title/bold -> default-theme.json:234
+/ui/theme-defs/default/status-styles/disabled-title/color -> default-theme.json:232
+/ui/theme-defs/default/status-styles/hotkey/bold -> default-theme.json:276
+/ui/theme-defs/default/status-styles/hotkey/color -> default-theme.json:274
+/ui/theme-defs/default/status-styles/hotkey/underline -> default-theme.json:275
+/ui/theme-defs/default/status-styles/inactive-alert/background-color -> default-theme.json:266
+/ui/theme-defs/default/status-styles/inactive-alert/color -> default-theme.json:265
+/ui/theme-defs/default/status-styles/inactive/background-color -> default-theme.json:262
+/ui/theme-defs/default/status-styles/inactive/color -> default-theme.json:261
+/ui/theme-defs/default/status-styles/info/background-color -> default-theme.json:258
+/ui/theme-defs/default/status-styles/info/color -> default-theme.json:257
+/ui/theme-defs/default/status-styles/subtitle/background-color -> default-theme.json:238
+/ui/theme-defs/default/status-styles/subtitle/color -> default-theme.json:237
+/ui/theme-defs/default/status-styles/text/background-color -> default-theme.json:242
+/ui/theme-defs/default/status-styles/text/color -> default-theme.json:241
+/ui/theme-defs/default/status-styles/title-hotkey/background-color -> default-theme.json:270
+/ui/theme-defs/default/status-styles/title-hotkey/color -> default-theme.json:269
+/ui/theme-defs/default/status-styles/title-hotkey/underline -> default-theme.json:271
+/ui/theme-defs/default/status-styles/title/background-color -> default-theme.json:228
+/ui/theme-defs/default/status-styles/title/bold -> default-theme.json:229
+/ui/theme-defs/default/status-styles/title/color -> default-theme.json:227
+/ui/theme-defs/default/status-styles/warn/background-color -> default-theme.json:246
+/ui/theme-defs/default/status-styles/warn/color -> default-theme.json:245
+/ui/theme-defs/default/styles/adjusted-time/color -> default-theme.json:55
+/ui/theme-defs/default/styles/alt-text/background-color -> default-theme.json:22
+/ui/theme-defs/default/styles/breadcrumb/bold -> default-theme.json:114
+/ui/theme-defs/default/styles/breadcrumb/color -> default-theme.json:113
+/ui/theme-defs/default/styles/cursor-line/background-color -> default-theme.json:46
+/ui/theme-defs/default/styles/cursor-line/bold -> default-theme.json:47
+/ui/theme-defs/default/styles/cursor-line/color -> default-theme.json:45
+/ui/theme-defs/default/styles/cursor-line/underline -> default-theme.json:48
+/ui/theme-defs/default/styles/disabled-cursor-line/background-color -> default-theme.json:52
+/ui/theme-defs/default/styles/disabled-cursor-line/color -> default-theme.json:51
+/ui/theme-defs/default/styles/disabled-focused/background-color -> default-theme.json:83
+/ui/theme-defs/default/styles/disabled-focused/color -> default-theme.json:82
+/ui/theme-defs/default/styles/error/bold -> default-theme.json:34
+/ui/theme-defs/default/styles/error/color -> default-theme.json:33
+/ui/theme-defs/default/styles/file-offset/color -> default-theme.json:64
+/ui/theme-defs/default/styles/focused/background-color -> default-theme.json:79
+/ui/theme-defs/default/styles/focused/color -> default-theme.json:78
+/ui/theme-defs/default/styles/footnote-border/background-color -> default-theme.json:131
+/ui/theme-defs/default/styles/footnote-border/color -> default-theme.json:130
+/ui/theme-defs/default/styles/footnote-text/background-color -> default-theme.json:135
+/ui/theme-defs/default/styles/footnote-text/color -> default-theme.json:134
+/ui/theme-defs/default/styles/h1/underline -> default-theme.json:86
+/ui/theme-defs/default/styles/h2/underline -> default-theme.json:89
+/ui/theme-defs/default/styles/h3/underline -> default-theme.json:92
+/ui/theme-defs/default/styles/h4/underline -> default-theme.json:95
+/ui/theme-defs/default/styles/h5/underline -> default-theme.json:98
+/ui/theme-defs/default/styles/h6/underline -> default-theme.json:101
+/ui/theme-defs/default/styles/hidden/bold -> default-theme.json:42
+/ui/theme-defs/default/styles/hidden/color -> default-theme.json:41
+/ui/theme-defs/default/styles/hr/color -> default-theme.json:104
+/ui/theme-defs/default/styles/hyperlink/underline -> default-theme.json:107
+/ui/theme-defs/default/styles/identifier/background-color -> default-theme.json:18
+/ui/theme-defs/default/styles/identifier/color -> default-theme.json:19
+/ui/theme-defs/default/styles/indent-guide/color -> default-theme.json:141
+/ui/theme-defs/default/styles/info/bold -> default-theme.json:30
+/ui/theme-defs/default/styles/info/color -> default-theme.json:29
+/ui/theme-defs/default/styles/invalid-msg/color -> default-theme.json:67
+/ui/theme-defs/default/styles/list-glyph/color -> default-theme.json:110
+/ui/theme-defs/default/styles/offset-time/color -> default-theme.json:61
+/ui/theme-defs/default/styles/ok/bold -> default-theme.json:26
+/ui/theme-defs/default/styles/ok/color -> default-theme.json:25
+/ui/theme-defs/default/styles/popup/background-color -> default-theme.json:71
+/ui/theme-defs/default/styles/popup/color -> default-theme.json:70
+/ui/theme-defs/default/styles/quote-border/background-color -> default-theme.json:124
+/ui/theme-defs/default/styles/quote-border/color -> default-theme.json:123
+/ui/theme-defs/default/styles/quoted-text/background-color -> default-theme.json:127
+/ui/theme-defs/default/styles/scrollbar/background-color -> default-theme.json:75
+/ui/theme-defs/default/styles/scrollbar/color -> default-theme.json:74
+/ui/theme-defs/default/styles/selected-text/background-color -> default-theme.json:15
+/ui/theme-defs/default/styles/skewed-time/color -> default-theme.json:58
+/ui/theme-defs/default/styles/snippet-border/color -> default-theme.json:138
+/ui/theme-defs/default/styles/table-border/color -> default-theme.json:117
+/ui/theme-defs/default/styles/table-header/bold -> default-theme.json:120
+/ui/theme-defs/default/styles/text/background-color -> default-theme.json:12
+/ui/theme-defs/default/styles/text/color -> default-theme.json:11
+/ui/theme-defs/default/styles/warning/bold -> default-theme.json:38
+/ui/theme-defs/default/styles/warning/color -> default-theme.json:37
+/ui/theme-defs/default/syntax-styles/ascii-control/color -> default-theme.json:207
+/ui/theme-defs/default/syntax-styles/code-border/background-color -> default-theme.json:155
+/ui/theme-defs/default/syntax-styles/code-border/color -> default-theme.json:154
+/ui/theme-defs/default/syntax-styles/comment/color -> default-theme.json:165
+/ui/theme-defs/default/syntax-styles/diff-add/color -> default-theme.json:186
+/ui/theme-defs/default/syntax-styles/diff-delete/color -> default-theme.json:183
+/ui/theme-defs/default/syntax-styles/diff-section/color -> default-theme.json:189
+/ui/theme-defs/default/syntax-styles/doc-directive/color -> default-theme.json:168
+/ui/theme-defs/default/syntax-styles/file/color -> default-theme.json:201
+/ui/theme-defs/default/syntax-styles/function/color -> default-theme.json:216
+/ui/theme-defs/default/syntax-styles/inline-code/background-color -> default-theme.json:147
+/ui/theme-defs/default/syntax-styles/inline-code/color -> default-theme.json:146
+/ui/theme-defs/default/syntax-styles/keyword/color -> default-theme.json:158
+/ui/theme-defs/default/syntax-styles/non-ascii/color -> default-theme.json:210
+/ui/theme-defs/default/syntax-styles/null/color -> default-theme.json:204
+/ui/theme-defs/default/syntax-styles/number/bold -> default-theme.json:213
+/ui/theme-defs/default/syntax-styles/quoted-code/background-color -> default-theme.json:151
+/ui/theme-defs/default/syntax-styles/quoted-code/color -> default-theme.json:150
+/ui/theme-defs/default/syntax-styles/re-repeat/color -> default-theme.json:180
+/ui/theme-defs/default/syntax-styles/re-special/color -> default-theme.json:177
+/ui/theme-defs/default/syntax-styles/separators-references-accessors/color -> default-theme.json:219
+/ui/theme-defs/default/syntax-styles/spectrogram-high/background-color -> default-theme.json:198
+/ui/theme-defs/default/syntax-styles/spectrogram-low/background-color -> default-theme.json:192
+/ui/theme-defs/default/syntax-styles/spectrogram-medium/background-color -> default-theme.json:195
+/ui/theme-defs/default/syntax-styles/string/bold -> default-theme.json:162
+/ui/theme-defs/default/syntax-styles/string/color -> default-theme.json:161
+/ui/theme-defs/default/syntax-styles/symbol/color -> default-theme.json:174
+/ui/theme-defs/default/syntax-styles/type/color -> default-theme.json:222
+/ui/theme-defs/default/syntax-styles/variable/color -> default-theme.json:171
+/ui/theme-defs/default/vars/semantic_highlight_color -> default-theme.json:7
+/ui/theme-defs/dracula/log-level-styles/critical/color -> dracula.json:303
+/ui/theme-defs/dracula/log-level-styles/error/color -> dracula.json:300
+/ui/theme-defs/dracula/log-level-styles/fatal/color -> dracula.json:306
+/ui/theme-defs/dracula/log-level-styles/warning/color -> dracula.json:297
+/ui/theme-defs/dracula/status-styles/active/background-color -> dracula.json:281
+/ui/theme-defs/dracula/status-styles/active/color -> dracula.json:280
+/ui/theme-defs/dracula/status-styles/alert/background-color -> dracula.json:277
+/ui/theme-defs/dracula/status-styles/alert/color -> dracula.json:276
+/ui/theme-defs/dracula/status-styles/disabled-title/background-color -> dracula.json:241
+/ui/theme-defs/dracula/status-styles/disabled-title/bold -> dracula.json:242
+/ui/theme-defs/dracula/status-styles/disabled-title/color -> dracula.json:240
+/ui/theme-defs/dracula/status-styles/hotkey/color -> dracula.json:264
+/ui/theme-defs/dracula/status-styles/hotkey/underline -> dracula.json:265
+/ui/theme-defs/dracula/status-styles/inactive-alert/background-color -> dracula.json:289
+/ui/theme-defs/dracula/status-styles/inactive-alert/color -> dracula.json:288
+/ui/theme-defs/dracula/status-styles/inactive/background-color -> dracula.json:285
+/ui/theme-defs/dracula/status-styles/inactive/color -> dracula.json:284
+/ui/theme-defs/dracula/status-styles/info/background-color -> dracula.json:256
+/ui/theme-defs/dracula/status-styles/info/color -> dracula.json:255
+/ui/theme-defs/dracula/status-styles/subtitle/background-color -> dracula.json:251
+/ui/theme-defs/dracula/status-styles/subtitle/bold -> dracula.json:252
+/ui/theme-defs/dracula/status-styles/subtitle/color -> dracula.json:250
+/ui/theme-defs/dracula/status-styles/suggestion/color -> dracula.json:292
+/ui/theme-defs/dracula/status-styles/text/background-color -> dracula.json:269
+/ui/theme-defs/dracula/status-styles/text/color -> dracula.json:268
+/ui/theme-defs/dracula/status-styles/title-hotkey/background-color -> dracula.json:260
+/ui/theme-defs/dracula/status-styles/title-hotkey/color -> dracula.json:259
+/ui/theme-defs/dracula/status-styles/title-hotkey/underline -> dracula.json:261
+/ui/theme-defs/dracula/status-styles/title/background-color -> dracula.json:246
+/ui/theme-defs/dracula/status-styles/title/bold -> dracula.json:247
+/ui/theme-defs/dracula/status-styles/title/color -> dracula.json:245
+/ui/theme-defs/dracula/status-styles/warn/background-color -> dracula.json:273
+/ui/theme-defs/dracula/status-styles/warn/color -> dracula.json:272
+/ui/theme-defs/dracula/styles/adjusted-time/color -> dracula.json:64
+/ui/theme-defs/dracula/styles/alt-text/background-color -> dracula.json:32
+/ui/theme-defs/dracula/styles/breadcrumb/bold -> dracula.json:125
+/ui/theme-defs/dracula/styles/breadcrumb/color -> dracula.json:124
+/ui/theme-defs/dracula/styles/cursor-line/background-color -> dracula.json:56
+/ui/theme-defs/dracula/styles/cursor-line/bold -> dracula.json:57
+/ui/theme-defs/dracula/styles/cursor-line/color -> dracula.json:55
+/ui/theme-defs/dracula/styles/disabled-cursor-line/background-color -> dracula.json:61
+/ui/theme-defs/dracula/styles/disabled-cursor-line/color -> dracula.json:60
+/ui/theme-defs/dracula/styles/disabled-focused/background-color -> dracula.json:84
+/ui/theme-defs/dracula/styles/disabled-focused/color -> dracula.json:83
+/ui/theme-defs/dracula/styles/error/bold -> dracula.json:44
+/ui/theme-defs/dracula/styles/error/color -> dracula.json:43
+/ui/theme-defs/dracula/styles/file-offset/color -> dracula.json:73
+/ui/theme-defs/dracula/styles/focused/background-color -> dracula.json:80
+/ui/theme-defs/dracula/styles/focused/color -> dracula.json:79
+/ui/theme-defs/dracula/styles/footnote-border/background-color -> dracula.json:143
+/ui/theme-defs/dracula/styles/footnote-border/color -> dracula.json:142
+/ui/theme-defs/dracula/styles/footnote-text/background-color -> dracula.json:147
+/ui/theme-defs/dracula/styles/footnote-text/color -> dracula.json:146
+/ui/theme-defs/dracula/styles/h1/bold -> dracula.json:96
+/ui/theme-defs/dracula/styles/h1/color -> dracula.json:95
+/ui/theme-defs/dracula/styles/h2/color -> dracula.json:99
+/ui/theme-defs/dracula/styles/h2/underline -> dracula.json:100
+/ui/theme-defs/dracula/styles/h3/color -> dracula.json:103
+/ui/theme-defs/dracula/styles/h4/underline -> dracula.json:106
+/ui/theme-defs/dracula/styles/h5/underline -> dracula.json:109
+/ui/theme-defs/dracula/styles/h6/underline -> dracula.json:112
+/ui/theme-defs/dracula/styles/hidden/bold -> dracula.json:52
+/ui/theme-defs/dracula/styles/hidden/color -> dracula.json:51
+/ui/theme-defs/dracula/styles/hr/color -> dracula.json:115
+/ui/theme-defs/dracula/styles/hyperlink/underline -> dracula.json:118
+/ui/theme-defs/dracula/styles/identifier/color -> dracula.json:22
+/ui/theme-defs/dracula/styles/indent-guide/color -> dracula.json:153
+/ui/theme-defs/dracula/styles/info/bold -> dracula.json:40
+/ui/theme-defs/dracula/styles/info/color -> dracula.json:39
+/ui/theme-defs/dracula/styles/invalid-msg/color -> dracula.json:76
+/ui/theme-defs/dracula/styles/list-glyph/color -> dracula.json:121
+/ui/theme-defs/dracula/styles/offset-time/color -> dracula.json:70
+/ui/theme-defs/dracula/styles/ok/bold -> dracula.json:36
+/ui/theme-defs/dracula/styles/ok/color -> dracula.json:35
+/ui/theme-defs/dracula/styles/popup/background-color -> dracula.json:88
+/ui/theme-defs/dracula/styles/popup/color -> dracula.json:87
+/ui/theme-defs/dracula/styles/quote-border/background-color -> dracula.json:135
+/ui/theme-defs/dracula/styles/quote-border/color -> dracula.json:134
+/ui/theme-defs/dracula/styles/quoted-text/background-color -> dracula.json:139
+/ui/theme-defs/dracula/styles/quoted-text/color -> dracula.json:138
+/ui/theme-defs/dracula/styles/scrollbar/background-color -> dracula.json:92
+/ui/theme-defs/dracula/styles/scrollbar/color -> dracula.json:91
+/ui/theme-defs/dracula/styles/selected-text/background-color -> dracula.json:29
+/ui/theme-defs/dracula/styles/skewed-time/color -> dracula.json:67
+/ui/theme-defs/dracula/styles/snippet-border/color -> dracula.json:150
+/ui/theme-defs/dracula/styles/table-border/color -> dracula.json:128
+/ui/theme-defs/dracula/styles/table-header/bold -> dracula.json:131
+/ui/theme-defs/dracula/styles/text/background-color -> dracula.json:26
+/ui/theme-defs/dracula/styles/text/color -> dracula.json:25
+/ui/theme-defs/dracula/styles/warning/bold -> dracula.json:48
+/ui/theme-defs/dracula/styles/warning/color -> dracula.json:47
+/ui/theme-defs/dracula/syntax-styles/ascii-control/color -> dracula.json:220
+/ui/theme-defs/dracula/syntax-styles/code-border/background-color -> dracula.json:167
+/ui/theme-defs/dracula/syntax-styles/code-border/color -> dracula.json:166
+/ui/theme-defs/dracula/syntax-styles/comment/color -> dracula.json:178
+/ui/theme-defs/dracula/syntax-styles/diff-add/color -> dracula.json:199
+/ui/theme-defs/dracula/syntax-styles/diff-delete/color -> dracula.json:196
+/ui/theme-defs/dracula/syntax-styles/diff-section/color -> dracula.json:202
+/ui/theme-defs/dracula/syntax-styles/doc-directive/color -> dracula.json:181
+/ui/theme-defs/dracula/syntax-styles/file/color -> dracula.json:214
+/ui/theme-defs/dracula/syntax-styles/function/color -> dracula.json:229
+/ui/theme-defs/dracula/syntax-styles/inline-code/background-color -> dracula.json:159
+/ui/theme-defs/dracula/syntax-styles/inline-code/color -> dracula.json:158
+/ui/theme-defs/dracula/syntax-styles/keyword/bold -> dracula.json:171
+/ui/theme-defs/dracula/syntax-styles/keyword/color -> dracula.json:170
+/ui/theme-defs/dracula/syntax-styles/non-ascii/color -> dracula.json:223
+/ui/theme-defs/dracula/syntax-styles/null/color -> dracula.json:217
+/ui/theme-defs/dracula/syntax-styles/number/bold -> dracula.json:226
+/ui/theme-defs/dracula/syntax-styles/quoted-code/background-color -> dracula.json:163
+/ui/theme-defs/dracula/syntax-styles/quoted-code/color -> dracula.json:162
+/ui/theme-defs/dracula/syntax-styles/re-repeat/color -> dracula.json:193
+/ui/theme-defs/dracula/syntax-styles/re-special/color -> dracula.json:190
+/ui/theme-defs/dracula/syntax-styles/separators-references-accessors/color -> dracula.json:232
+/ui/theme-defs/dracula/syntax-styles/spectrogram-high/background-color -> dracula.json:211
+/ui/theme-defs/dracula/syntax-styles/spectrogram-low/background-color -> dracula.json:205
+/ui/theme-defs/dracula/syntax-styles/spectrogram-medium/background-color -> dracula.json:208
+/ui/theme-defs/dracula/syntax-styles/string/bold -> dracula.json:175
+/ui/theme-defs/dracula/syntax-styles/string/color -> dracula.json:174
+/ui/theme-defs/dracula/syntax-styles/symbol/color -> dracula.json:187
+/ui/theme-defs/dracula/syntax-styles/type/color -> dracula.json:235
+/ui/theme-defs/dracula/syntax-styles/variable/color -> dracula.json:184
+/ui/theme-defs/dracula/vars/black -> dracula.json:7
+/ui/theme-defs/dracula/vars/blue -> dracula.json:11
+/ui/theme-defs/dracula/vars/cyan -> dracula.json:13
+/ui/theme-defs/dracula/vars/green -> dracula.json:9
+/ui/theme-defs/dracula/vars/magenta -> dracula.json:12
+/ui/theme-defs/dracula/vars/orange -> dracula.json:15
+/ui/theme-defs/dracula/vars/pink -> dracula.json:17
+/ui/theme-defs/dracula/vars/purple -> dracula.json:16
+/ui/theme-defs/dracula/vars/red -> dracula.json:8
+/ui/theme-defs/dracula/vars/semantic_highlight_color -> dracula.json:18
+/ui/theme-defs/dracula/vars/white -> dracula.json:14
+/ui/theme-defs/dracula/vars/yellow -> dracula.json:10
+/ui/theme-defs/eldar/log-level-styles/critical/color -> eldar.json:299
+/ui/theme-defs/eldar/log-level-styles/error/color -> eldar.json:296
+/ui/theme-defs/eldar/log-level-styles/fatal/color -> eldar.json:302
+/ui/theme-defs/eldar/log-level-styles/warning/color -> eldar.json:293
+/ui/theme-defs/eldar/status-styles/active/background-color -> eldar.json:264
+/ui/theme-defs/eldar/status-styles/active/color -> eldar.json:263
+/ui/theme-defs/eldar/status-styles/alert/background-color -> eldar.json:260
+/ui/theme-defs/eldar/status-styles/alert/color -> eldar.json:259
+/ui/theme-defs/eldar/status-styles/disabled-title/background-color -> eldar.json:237
+/ui/theme-defs/eldar/status-styles/disabled-title/bold -> eldar.json:238
+/ui/theme-defs/eldar/status-styles/disabled-title/color -> eldar.json:236
+/ui/theme-defs/eldar/status-styles/hotkey/color -> eldar.json:276
+/ui/theme-defs/eldar/status-styles/hotkey/underline -> eldar.json:277
+/ui/theme-defs/eldar/status-styles/inactive-alert/background-color -> eldar.json:285
+/ui/theme-defs/eldar/status-styles/inactive-alert/color -> eldar.json:284
+/ui/theme-defs/eldar/status-styles/inactive/background-color -> eldar.json:281
+/ui/theme-defs/eldar/status-styles/inactive/color -> eldar.json:280
+/ui/theme-defs/eldar/status-styles/info/background-color -> eldar.json:268
+/ui/theme-defs/eldar/status-styles/info/color -> eldar.json:267
+/ui/theme-defs/eldar/status-styles/subtitle/background-color -> eldar.json:247
+/ui/theme-defs/eldar/status-styles/subtitle/bold -> eldar.json:248
+/ui/theme-defs/eldar/status-styles/subtitle/color -> eldar.json:246
+/ui/theme-defs/eldar/status-styles/suggestion/color -> eldar.json:288
+/ui/theme-defs/eldar/status-styles/text/background-color -> eldar.json:252
+/ui/theme-defs/eldar/status-styles/text/color -> eldar.json:251
+/ui/theme-defs/eldar/status-styles/title-hotkey/background-color -> eldar.json:272
+/ui/theme-defs/eldar/status-styles/title-hotkey/color -> eldar.json:271
+/ui/theme-defs/eldar/status-styles/title-hotkey/underline -> eldar.json:273
+/ui/theme-defs/eldar/status-styles/title/background-color -> eldar.json:242
+/ui/theme-defs/eldar/status-styles/title/bold -> eldar.json:243
+/ui/theme-defs/eldar/status-styles/title/color -> eldar.json:241
+/ui/theme-defs/eldar/status-styles/warn/background-color -> eldar.json:256
+/ui/theme-defs/eldar/status-styles/warn/color -> eldar.json:255
+/ui/theme-defs/eldar/styles/adjusted-time/color -> eldar.json:64
+/ui/theme-defs/eldar/styles/alt-text/bold -> eldar.json:31
+/ui/theme-defs/eldar/styles/breadcrumb/bold -> eldar.json:123
+/ui/theme-defs/eldar/styles/breadcrumb/color -> eldar.json:122
+/ui/theme-defs/eldar/styles/cursor-line/background-color -> eldar.json:55
+/ui/theme-defs/eldar/styles/cursor-line/bold -> eldar.json:56
+/ui/theme-defs/eldar/styles/cursor-line/color -> eldar.json:54
+/ui/theme-defs/eldar/styles/cursor-line/underline -> eldar.json:57
+/ui/theme-defs/eldar/styles/disabled-cursor-line/background-color -> eldar.json:61
+/ui/theme-defs/eldar/styles/disabled-cursor-line/color -> eldar.json:60
+/ui/theme-defs/eldar/styles/disabled-focused/background-color -> eldar.json:84
+/ui/theme-defs/eldar/styles/disabled-focused/color -> eldar.json:83
+/ui/theme-defs/eldar/styles/error/bold -> eldar.json:43
+/ui/theme-defs/eldar/styles/error/color -> eldar.json:42
+/ui/theme-defs/eldar/styles/file-offset/color -> eldar.json:73
+/ui/theme-defs/eldar/styles/focused/background-color -> eldar.json:80
+/ui/theme-defs/eldar/styles/focused/color -> eldar.json:79
+/ui/theme-defs/eldar/styles/footnote-border/background-color -> eldar.json:140
+/ui/theme-defs/eldar/styles/footnote-border/color -> eldar.json:139
+/ui/theme-defs/eldar/styles/footnote-text/background-color -> eldar.json:144
+/ui/theme-defs/eldar/styles/footnote-text/color -> eldar.json:143
+/ui/theme-defs/eldar/styles/h1/underline -> eldar.json:95
+/ui/theme-defs/eldar/styles/h2/underline -> eldar.json:98
+/ui/theme-defs/eldar/styles/h3/underline -> eldar.json:101
+/ui/theme-defs/eldar/styles/h4/underline -> eldar.json:104
+/ui/theme-defs/eldar/styles/h5/underline -> eldar.json:107
+/ui/theme-defs/eldar/styles/h6/underline -> eldar.json:110
+/ui/theme-defs/eldar/styles/hidden/bold -> eldar.json:51
+/ui/theme-defs/eldar/styles/hidden/color -> eldar.json:50
+/ui/theme-defs/eldar/styles/hr/color -> eldar.json:113
+/ui/theme-defs/eldar/styles/hyperlink/underline -> eldar.json:116
+/ui/theme-defs/eldar/styles/identifier/background-color -> eldar.json:20
+/ui/theme-defs/eldar/styles/identifier/color -> eldar.json:21
+/ui/theme-defs/eldar/styles/indent-guide/color -> eldar.json:150
+/ui/theme-defs/eldar/styles/info/bold -> eldar.json:39
+/ui/theme-defs/eldar/styles/info/color -> eldar.json:38
+/ui/theme-defs/eldar/styles/invalid-msg/color -> eldar.json:76
+/ui/theme-defs/eldar/styles/list-glyph/color -> eldar.json:119
+/ui/theme-defs/eldar/styles/offset-time/color -> eldar.json:70
+/ui/theme-defs/eldar/styles/ok/bold -> eldar.json:35
+/ui/theme-defs/eldar/styles/ok/color -> eldar.json:34
+/ui/theme-defs/eldar/styles/popup/background-color -> eldar.json:88
+/ui/theme-defs/eldar/styles/popup/color -> eldar.json:87
+/ui/theme-defs/eldar/styles/quote-border/background-color -> eldar.json:133
+/ui/theme-defs/eldar/styles/quote-border/color -> eldar.json:132
+/ui/theme-defs/eldar/styles/quoted-text/background-color -> eldar.json:136
+/ui/theme-defs/eldar/styles/scrollbar/background-color -> eldar.json:92
+/ui/theme-defs/eldar/styles/scrollbar/color -> eldar.json:91
+/ui/theme-defs/eldar/styles/selected-text/background-color -> eldar.json:28
+/ui/theme-defs/eldar/styles/skewed-time/color -> eldar.json:67
+/ui/theme-defs/eldar/styles/snippet-border/color -> eldar.json:147
+/ui/theme-defs/eldar/styles/table-border/color -> eldar.json:126
+/ui/theme-defs/eldar/styles/table-header/bold -> eldar.json:129
+/ui/theme-defs/eldar/styles/text/background-color -> eldar.json:25
+/ui/theme-defs/eldar/styles/text/color -> eldar.json:24
+/ui/theme-defs/eldar/styles/warning/bold -> eldar.json:47
+/ui/theme-defs/eldar/styles/warning/color -> eldar.json:46
+/ui/theme-defs/eldar/syntax-styles/ascii-control/color -> eldar.json:219
+/ui/theme-defs/eldar/syntax-styles/code-border/background-color -> eldar.json:164
+/ui/theme-defs/eldar/syntax-styles/code-border/color -> eldar.json:163
+/ui/theme-defs/eldar/syntax-styles/comment/color -> eldar.json:174
+/ui/theme-defs/eldar/syntax-styles/diff-add/color -> eldar.json:198
+/ui/theme-defs/eldar/syntax-styles/diff-delete/color -> eldar.json:195
+/ui/theme-defs/eldar/syntax-styles/diff-section/color -> eldar.json:201
+/ui/theme-defs/eldar/syntax-styles/doc-directive/color -> eldar.json:177
+/ui/theme-defs/eldar/syntax-styles/file/color -> eldar.json:213
+/ui/theme-defs/eldar/syntax-styles/function/color -> eldar.json:225
+/ui/theme-defs/eldar/syntax-styles/inline-code/background-color -> eldar.json:156
+/ui/theme-defs/eldar/syntax-styles/inline-code/color -> eldar.json:155
+/ui/theme-defs/eldar/syntax-styles/keyword/color -> eldar.json:167
+/ui/theme-defs/eldar/syntax-styles/non-ascii/color -> eldar.json:222
+/ui/theme-defs/eldar/syntax-styles/null/color -> eldar.json:216
+/ui/theme-defs/eldar/syntax-styles/number/color -> eldar.json:180
+/ui/theme-defs/eldar/syntax-styles/quoted-code/background-color -> eldar.json:160
+/ui/theme-defs/eldar/syntax-styles/quoted-code/color -> eldar.json:159
+/ui/theme-defs/eldar/syntax-styles/re-repeat/color -> eldar.json:192
+/ui/theme-defs/eldar/syntax-styles/re-special/color -> eldar.json:189
+/ui/theme-defs/eldar/syntax-styles/separators-references-accessors/color -> eldar.json:228
+/ui/theme-defs/eldar/syntax-styles/spectrogram-high/background-color -> eldar.json:210
+/ui/theme-defs/eldar/syntax-styles/spectrogram-low/background-color -> eldar.json:204
+/ui/theme-defs/eldar/syntax-styles/spectrogram-medium/background-color -> eldar.json:207
+/ui/theme-defs/eldar/syntax-styles/string/bold -> eldar.json:171
+/ui/theme-defs/eldar/syntax-styles/string/color -> eldar.json:170
+/ui/theme-defs/eldar/syntax-styles/symbol/color -> eldar.json:186
+/ui/theme-defs/eldar/syntax-styles/type/color -> eldar.json:231
+/ui/theme-defs/eldar/syntax-styles/variable/color -> eldar.json:183
+/ui/theme-defs/eldar/vars/black -> eldar.json:7
+/ui/theme-defs/eldar/vars/blue -> eldar.json:11
+/ui/theme-defs/eldar/vars/cyan -> eldar.json:12
+/ui/theme-defs/eldar/vars/green -> eldar.json:13
+/ui/theme-defs/eldar/vars/magenta -> eldar.json:10
+/ui/theme-defs/eldar/vars/orange -> eldar.json:15
+/ui/theme-defs/eldar/vars/red -> eldar.json:9
+/ui/theme-defs/eldar/vars/semantic_highlight_color -> eldar.json:16
+/ui/theme-defs/eldar/vars/white -> eldar.json:14
+/ui/theme-defs/eldar/vars/yellow -> eldar.json:8
+/ui/theme-defs/grayscale/log-level-styles/critical/color -> grayscale.json:235
+/ui/theme-defs/grayscale/log-level-styles/error/color -> grayscale.json:232
+/ui/theme-defs/grayscale/log-level-styles/fatal/color -> grayscale.json:238
+/ui/theme-defs/grayscale/log-level-styles/warning/color -> grayscale.json:229
+/ui/theme-defs/grayscale/status-styles/active/background-color -> grayscale.json:209
+/ui/theme-defs/grayscale/status-styles/active/color -> grayscale.json:208
+/ui/theme-defs/grayscale/status-styles/alert/background-color -> grayscale.json:205
+/ui/theme-defs/grayscale/status-styles/alert/color -> grayscale.json:204
+/ui/theme-defs/grayscale/status-styles/disabled-title/background-color -> grayscale.json:173
+/ui/theme-defs/grayscale/status-styles/disabled-title/bold -> grayscale.json:174
+/ui/theme-defs/grayscale/status-styles/disabled-title/color -> grayscale.json:172
+/ui/theme-defs/grayscale/status-styles/hotkey/color -> grayscale.json:192
+/ui/theme-defs/grayscale/status-styles/hotkey/underline -> grayscale.json:193
+/ui/theme-defs/grayscale/status-styles/inactive-alert/background-color -> grayscale.json:221
+/ui/theme-defs/grayscale/status-styles/inactive-alert/color -> grayscale.json:220
+/ui/theme-defs/grayscale/status-styles/inactive/background-color -> grayscale.json:217
+/ui/theme-defs/grayscale/status-styles/inactive/color -> grayscale.json:216
+/ui/theme-defs/grayscale/status-styles/info/background-color -> grayscale.json:213
+/ui/theme-defs/grayscale/status-styles/info/color -> grayscale.json:212
+/ui/theme-defs/grayscale/status-styles/subtitle/background-color -> grayscale.json:183
+/ui/theme-defs/grayscale/status-styles/subtitle/bold -> grayscale.json:184
+/ui/theme-defs/grayscale/status-styles/subtitle/color -> grayscale.json:182
+/ui/theme-defs/grayscale/status-styles/suggestion/color -> grayscale.json:224
+/ui/theme-defs/grayscale/status-styles/text/background-color -> grayscale.json:197
+/ui/theme-defs/grayscale/status-styles/text/color -> grayscale.json:196
+/ui/theme-defs/grayscale/status-styles/title-hotkey/background-color -> grayscale.json:188
+/ui/theme-defs/grayscale/status-styles/title-hotkey/color -> grayscale.json:187
+/ui/theme-defs/grayscale/status-styles/title-hotkey/underline -> grayscale.json:189
+/ui/theme-defs/grayscale/status-styles/title/background-color -> grayscale.json:178
+/ui/theme-defs/grayscale/status-styles/title/bold -> grayscale.json:179
+/ui/theme-defs/grayscale/status-styles/title/color -> grayscale.json:177
+/ui/theme-defs/grayscale/status-styles/warn/background-color -> grayscale.json:201
+/ui/theme-defs/grayscale/status-styles/warn/color -> grayscale.json:200
+/ui/theme-defs/grayscale/styles/adjusted-time/color -> grayscale.json:61
+/ui/theme-defs/grayscale/styles/alt-text/bold -> grayscale.json:28
+/ui/theme-defs/grayscale/styles/breadcrumb/bold -> grayscale.json:120
+/ui/theme-defs/grayscale/styles/breadcrumb/color -> grayscale.json:119
+/ui/theme-defs/grayscale/styles/cursor-line/background-color -> grayscale.json:52
+/ui/theme-defs/grayscale/styles/cursor-line/bold -> grayscale.json:53
+/ui/theme-defs/grayscale/styles/cursor-line/color -> grayscale.json:51
+/ui/theme-defs/grayscale/styles/cursor-line/underline -> grayscale.json:54
+/ui/theme-defs/grayscale/styles/disabled-cursor-line/background-color -> grayscale.json:58
+/ui/theme-defs/grayscale/styles/disabled-cursor-line/color -> grayscale.json:57
+/ui/theme-defs/grayscale/styles/disabled-focused/background-color -> grayscale.json:81
+/ui/theme-defs/grayscale/styles/disabled-focused/color -> grayscale.json:80
+/ui/theme-defs/grayscale/styles/error/bold -> grayscale.json:40
+/ui/theme-defs/grayscale/styles/error/color -> grayscale.json:39
+/ui/theme-defs/grayscale/styles/file-offset/color -> grayscale.json:70
+/ui/theme-defs/grayscale/styles/focused/background-color -> grayscale.json:77
+/ui/theme-defs/grayscale/styles/focused/color -> grayscale.json:76
+/ui/theme-defs/grayscale/styles/footnote-border/background-color -> grayscale.json:137
+/ui/theme-defs/grayscale/styles/footnote-border/color -> grayscale.json:136
+/ui/theme-defs/grayscale/styles/footnote-text/background-color -> grayscale.json:141
+/ui/theme-defs/grayscale/styles/footnote-text/color -> grayscale.json:140
+/ui/theme-defs/grayscale/styles/h1/underline -> grayscale.json:92
+/ui/theme-defs/grayscale/styles/h2/underline -> grayscale.json:95
+/ui/theme-defs/grayscale/styles/h3/underline -> grayscale.json:98
+/ui/theme-defs/grayscale/styles/h4/underline -> grayscale.json:101
+/ui/theme-defs/grayscale/styles/h5/underline -> grayscale.json:104
+/ui/theme-defs/grayscale/styles/h6/underline -> grayscale.json:107
+/ui/theme-defs/grayscale/styles/hidden/bold -> grayscale.json:48
+/ui/theme-defs/grayscale/styles/hidden/color -> grayscale.json:47
+/ui/theme-defs/grayscale/styles/hr/color -> grayscale.json:110
+/ui/theme-defs/grayscale/styles/hyperlink/underline -> grayscale.json:113
+/ui/theme-defs/grayscale/styles/identifier/background-color -> grayscale.json:19
+/ui/theme-defs/grayscale/styles/identifier/bold -> grayscale.json:21
+/ui/theme-defs/grayscale/styles/identifier/color -> grayscale.json:20
+/ui/theme-defs/grayscale/styles/indent-guide/color -> grayscale.json:147
+/ui/theme-defs/grayscale/styles/info/bold -> grayscale.json:36
+/ui/theme-defs/grayscale/styles/info/color -> grayscale.json:35
+/ui/theme-defs/grayscale/styles/invalid-msg/color -> grayscale.json:73
+/ui/theme-defs/grayscale/styles/list-glyph/color -> grayscale.json:116
+/ui/theme-defs/grayscale/styles/offset-time/color -> grayscale.json:67
+/ui/theme-defs/grayscale/styles/ok/bold -> grayscale.json:32
+/ui/theme-defs/grayscale/styles/ok/color -> grayscale.json:31
+/ui/theme-defs/grayscale/styles/popup/background-color -> grayscale.json:85
+/ui/theme-defs/grayscale/styles/popup/color -> grayscale.json:84
+/ui/theme-defs/grayscale/styles/quote-border/background-color -> grayscale.json:130
+/ui/theme-defs/grayscale/styles/quote-border/color -> grayscale.json:129
+/ui/theme-defs/grayscale/styles/quoted-text/background-color -> grayscale.json:133
+/ui/theme-defs/grayscale/styles/scrollbar/background-color -> grayscale.json:89
+/ui/theme-defs/grayscale/styles/scrollbar/color -> grayscale.json:88
+/ui/theme-defs/grayscale/styles/skewed-time/color -> grayscale.json:64
+/ui/theme-defs/grayscale/styles/snippet-border/color -> grayscale.json:144
+/ui/theme-defs/grayscale/styles/table-border/color -> grayscale.json:123
+/ui/theme-defs/grayscale/styles/table-header/bold -> grayscale.json:126
+/ui/theme-defs/grayscale/styles/text/background-color -> grayscale.json:25
+/ui/theme-defs/grayscale/styles/text/color -> grayscale.json:24
+/ui/theme-defs/grayscale/styles/warning/bold -> grayscale.json:44
+/ui/theme-defs/grayscale/styles/warning/color -> grayscale.json:43
+/ui/theme-defs/grayscale/syntax-styles/ascii-control/color -> grayscale.json:161
+/ui/theme-defs/grayscale/syntax-styles/comment/color -> grayscale.json:152
+/ui/theme-defs/grayscale/syntax-styles/doc-directive/color -> grayscale.json:155
+/ui/theme-defs/grayscale/syntax-styles/non-ascii/color -> grayscale.json:164
+/ui/theme-defs/grayscale/syntax-styles/null/color -> grayscale.json:158
+/ui/theme-defs/grayscale/syntax-styles/number/bold -> grayscale.json:167
+/ui/theme-defs/grayscale/vars/black -> grayscale.json:7
+/ui/theme-defs/grayscale/vars/blue -> grayscale.json:11
+/ui/theme-defs/grayscale/vars/cyan -> grayscale.json:13
+/ui/theme-defs/grayscale/vars/green -> grayscale.json:9
+/ui/theme-defs/grayscale/vars/magenta -> grayscale.json:12
+/ui/theme-defs/grayscale/vars/plaintext -> grayscale.json:15
+/ui/theme-defs/grayscale/vars/red -> grayscale.json:8
+/ui/theme-defs/grayscale/vars/white -> grayscale.json:14
+/ui/theme-defs/grayscale/vars/yellow -> grayscale.json:10
+/ui/theme-defs/monocai/log-level-styles/critical/color -> monocai.json:300
+/ui/theme-defs/monocai/log-level-styles/error/color -> monocai.json:297
+/ui/theme-defs/monocai/log-level-styles/fatal/color -> monocai.json:303
+/ui/theme-defs/monocai/log-level-styles/warning/color -> monocai.json:294
+/ui/theme-defs/monocai/status-styles/active/background-color -> monocai.json:278
+/ui/theme-defs/monocai/status-styles/active/color -> monocai.json:277
+/ui/theme-defs/monocai/status-styles/alert/background-color -> monocai.json:274
+/ui/theme-defs/monocai/status-styles/alert/color -> monocai.json:273
+/ui/theme-defs/monocai/status-styles/disabled-title/background-color -> monocai.json:238
+/ui/theme-defs/monocai/status-styles/disabled-title/bold -> monocai.json:239
+/ui/theme-defs/monocai/status-styles/disabled-title/color -> monocai.json:237
+/ui/theme-defs/monocai/status-styles/hotkey/color -> monocai.json:261
+/ui/theme-defs/monocai/status-styles/hotkey/underline -> monocai.json:262
+/ui/theme-defs/monocai/status-styles/inactive-alert/background-color -> monocai.json:286
+/ui/theme-defs/monocai/status-styles/inactive-alert/color -> monocai.json:285
+/ui/theme-defs/monocai/status-styles/inactive/background-color -> monocai.json:282
+/ui/theme-defs/monocai/status-styles/inactive/color -> monocai.json:281
+/ui/theme-defs/monocai/status-styles/info/background-color -> monocai.json:253
+/ui/theme-defs/monocai/status-styles/info/color -> monocai.json:252
+/ui/theme-defs/monocai/status-styles/subtitle/background-color -> monocai.json:248
+/ui/theme-defs/monocai/status-styles/subtitle/bold -> monocai.json:249
+/ui/theme-defs/monocai/status-styles/subtitle/color -> monocai.json:247
+/ui/theme-defs/monocai/status-styles/suggestion/color -> monocai.json:289
+/ui/theme-defs/monocai/status-styles/text/background-color -> monocai.json:266
+/ui/theme-defs/monocai/status-styles/text/color -> monocai.json:265
+/ui/theme-defs/monocai/status-styles/title-hotkey/background-color -> monocai.json:257
+/ui/theme-defs/monocai/status-styles/title-hotkey/color -> monocai.json:256
+/ui/theme-defs/monocai/status-styles/title-hotkey/underline -> monocai.json:258
+/ui/theme-defs/monocai/status-styles/title/background-color -> monocai.json:243
+/ui/theme-defs/monocai/status-styles/title/bold -> monocai.json:244
+/ui/theme-defs/monocai/status-styles/title/color -> monocai.json:242
+/ui/theme-defs/monocai/status-styles/warn/background-color -> monocai.json:270
+/ui/theme-defs/monocai/status-styles/warn/color -> monocai.json:269
+/ui/theme-defs/monocai/styles/adjusted-time/color -> monocai.json:62
+/ui/theme-defs/monocai/styles/alt-text/background-color -> monocai.json:30
+/ui/theme-defs/monocai/styles/breadcrumb/bold -> monocai.json:123
+/ui/theme-defs/monocai/styles/breadcrumb/color -> monocai.json:122
+/ui/theme-defs/monocai/styles/cursor-line/background-color -> monocai.json:54
+/ui/theme-defs/monocai/styles/cursor-line/bold -> monocai.json:55
+/ui/theme-defs/monocai/styles/cursor-line/color -> monocai.json:53
+/ui/theme-defs/monocai/styles/disabled-cursor-line/background-color -> monocai.json:59
+/ui/theme-defs/monocai/styles/disabled-cursor-line/color -> monocai.json:58
+/ui/theme-defs/monocai/styles/disabled-focused/background-color -> monocai.json:82
+/ui/theme-defs/monocai/styles/disabled-focused/color -> monocai.json:81
+/ui/theme-defs/monocai/styles/error/bold -> monocai.json:42
+/ui/theme-defs/monocai/styles/error/color -> monocai.json:41
+/ui/theme-defs/monocai/styles/file-offset/color -> monocai.json:71
+/ui/theme-defs/monocai/styles/focused/background-color -> monocai.json:78
+/ui/theme-defs/monocai/styles/focused/color -> monocai.json:77
+/ui/theme-defs/monocai/styles/footnote-border/background-color -> monocai.json:140
+/ui/theme-defs/monocai/styles/footnote-border/color -> monocai.json:139
+/ui/theme-defs/monocai/styles/footnote-text/background-color -> monocai.json:144
+/ui/theme-defs/monocai/styles/footnote-text/color -> monocai.json:143
+/ui/theme-defs/monocai/styles/h1/bold -> monocai.json:94
+/ui/theme-defs/monocai/styles/h1/color -> monocai.json:93
+/ui/theme-defs/monocai/styles/h2/color -> monocai.json:97
+/ui/theme-defs/monocai/styles/h2/underline -> monocai.json:98
+/ui/theme-defs/monocai/styles/h3/color -> monocai.json:101
+/ui/theme-defs/monocai/styles/h4/underline -> monocai.json:104
+/ui/theme-defs/monocai/styles/h5/underline -> monocai.json:107
+/ui/theme-defs/monocai/styles/h6/underline -> monocai.json:110
+/ui/theme-defs/monocai/styles/hidden/bold -> monocai.json:50
+/ui/theme-defs/monocai/styles/hidden/color -> monocai.json:49
+/ui/theme-defs/monocai/styles/hr/color -> monocai.json:113
+/ui/theme-defs/monocai/styles/hyperlink/underline -> monocai.json:116
+/ui/theme-defs/monocai/styles/identifier/color -> monocai.json:20
+/ui/theme-defs/monocai/styles/indent-guide/color -> monocai.json:150
+/ui/theme-defs/monocai/styles/info/bold -> monocai.json:38
+/ui/theme-defs/monocai/styles/info/color -> monocai.json:37
+/ui/theme-defs/monocai/styles/invalid-msg/color -> monocai.json:74
+/ui/theme-defs/monocai/styles/list-glyph/color -> monocai.json:119
+/ui/theme-defs/monocai/styles/offset-time/color -> monocai.json:68
+/ui/theme-defs/monocai/styles/ok/bold -> monocai.json:34
+/ui/theme-defs/monocai/styles/ok/color -> monocai.json:33
+/ui/theme-defs/monocai/styles/popup/background-color -> monocai.json:86
+/ui/theme-defs/monocai/styles/popup/color -> monocai.json:85
+/ui/theme-defs/monocai/styles/quote-border/background-color -> monocai.json:133
+/ui/theme-defs/monocai/styles/quote-border/color -> monocai.json:132
+/ui/theme-defs/monocai/styles/quoted-text/background-color -> monocai.json:136
+/ui/theme-defs/monocai/styles/scrollbar/background-color -> monocai.json:90
+/ui/theme-defs/monocai/styles/scrollbar/color -> monocai.json:89
+/ui/theme-defs/monocai/styles/selected-text/background-color -> monocai.json:27
+/ui/theme-defs/monocai/styles/skewed-time/color -> monocai.json:65
+/ui/theme-defs/monocai/styles/snippet-border/color -> monocai.json:147
+/ui/theme-defs/monocai/styles/table-border/color -> monocai.json:126
+/ui/theme-defs/monocai/styles/table-header/bold -> monocai.json:129
+/ui/theme-defs/monocai/styles/text/background-color -> monocai.json:24
+/ui/theme-defs/monocai/styles/text/color -> monocai.json:23
+/ui/theme-defs/monocai/styles/warning/bold -> monocai.json:46
+/ui/theme-defs/monocai/styles/warning/color -> monocai.json:45
+/ui/theme-defs/monocai/syntax-styles/ascii-control/color -> monocai.json:217
+/ui/theme-defs/monocai/syntax-styles/code-border/background-color -> monocai.json:164
+/ui/theme-defs/monocai/syntax-styles/code-border/color -> monocai.json:163
+/ui/theme-defs/monocai/syntax-styles/comment/color -> monocai.json:175
+/ui/theme-defs/monocai/syntax-styles/diff-add/color -> monocai.json:196
+/ui/theme-defs/monocai/syntax-styles/diff-delete/color -> monocai.json:193
+/ui/theme-defs/monocai/syntax-styles/diff-section/color -> monocai.json:199
+/ui/theme-defs/monocai/syntax-styles/doc-directive/color -> monocai.json:178
+/ui/theme-defs/monocai/syntax-styles/file/color -> monocai.json:211
+/ui/theme-defs/monocai/syntax-styles/function/color -> monocai.json:226
+/ui/theme-defs/monocai/syntax-styles/inline-code/background-color -> monocai.json:156
+/ui/theme-defs/monocai/syntax-styles/inline-code/color -> monocai.json:155
+/ui/theme-defs/monocai/syntax-styles/keyword/bold -> monocai.json:168
+/ui/theme-defs/monocai/syntax-styles/keyword/color -> monocai.json:167
+/ui/theme-defs/monocai/syntax-styles/non-ascii/color -> monocai.json:220
+/ui/theme-defs/monocai/syntax-styles/null/color -> monocai.json:214
+/ui/theme-defs/monocai/syntax-styles/number/bold -> monocai.json:223
+/ui/theme-defs/monocai/syntax-styles/quoted-code/background-color -> monocai.json:160
+/ui/theme-defs/monocai/syntax-styles/quoted-code/color -> monocai.json:159
+/ui/theme-defs/monocai/syntax-styles/re-repeat/color -> monocai.json:190
+/ui/theme-defs/monocai/syntax-styles/re-special/color -> monocai.json:187
+/ui/theme-defs/monocai/syntax-styles/separators-references-accessors/color -> monocai.json:229
+/ui/theme-defs/monocai/syntax-styles/spectrogram-high/background-color -> monocai.json:208
+/ui/theme-defs/monocai/syntax-styles/spectrogram-low/background-color -> monocai.json:202
+/ui/theme-defs/monocai/syntax-styles/spectrogram-medium/background-color -> monocai.json:205
+/ui/theme-defs/monocai/syntax-styles/string/bold -> monocai.json:172
+/ui/theme-defs/monocai/syntax-styles/string/color -> monocai.json:171
+/ui/theme-defs/monocai/syntax-styles/symbol/color -> monocai.json:184
+/ui/theme-defs/monocai/syntax-styles/type/color -> monocai.json:232
+/ui/theme-defs/monocai/syntax-styles/variable/color -> monocai.json:181
+/ui/theme-defs/monocai/vars/black -> monocai.json:7
+/ui/theme-defs/monocai/vars/blue -> monocai.json:11
+/ui/theme-defs/monocai/vars/cyan -> monocai.json:13
+/ui/theme-defs/monocai/vars/green -> monocai.json:9
+/ui/theme-defs/monocai/vars/magenta -> monocai.json:12
+/ui/theme-defs/monocai/vars/orange -> monocai.json:15
+/ui/theme-defs/monocai/vars/red -> monocai.json:8
+/ui/theme-defs/monocai/vars/semantic_highlight_color -> monocai.json:16
+/ui/theme-defs/monocai/vars/white -> monocai.json:14
+/ui/theme-defs/monocai/vars/yellow -> monocai.json:10
+/ui/theme-defs/night-owl/log-level-styles/critical/color -> night-owl.json:299
+/ui/theme-defs/night-owl/log-level-styles/error/color -> night-owl.json:296
+/ui/theme-defs/night-owl/log-level-styles/fatal/color -> night-owl.json:302
+/ui/theme-defs/night-owl/log-level-styles/warning/color -> night-owl.json:293
+/ui/theme-defs/night-owl/status-styles/active/background-color -> night-owl.json:266
+/ui/theme-defs/night-owl/status-styles/active/color -> night-owl.json:265
+/ui/theme-defs/night-owl/status-styles/alert/background-color -> night-owl.json:262
+/ui/theme-defs/night-owl/status-styles/alert/color -> night-owl.json:261
+/ui/theme-defs/night-owl/status-styles/disabled-title/background-color -> night-owl.json:236
+/ui/theme-defs/night-owl/status-styles/disabled-title/bold -> night-owl.json:237
+/ui/theme-defs/night-owl/status-styles/disabled-title/color -> night-owl.json:235
+/ui/theme-defs/night-owl/status-styles/hotkey/bold -> night-owl.json:278
+/ui/theme-defs/night-owl/status-styles/hotkey/color -> night-owl.json:277
+/ui/theme-defs/night-owl/status-styles/hotkey/underline -> night-owl.json:279
+/ui/theme-defs/night-owl/status-styles/inactive-alert/background-color -> night-owl.json:274
+/ui/theme-defs/night-owl/status-styles/inactive-alert/color -> night-owl.json:273
+/ui/theme-defs/night-owl/status-styles/inactive/background-color -> night-owl.json:270
+/ui/theme-defs/night-owl/status-styles/inactive/color -> night-owl.json:269
+/ui/theme-defs/night-owl/status-styles/info/background-color -> night-owl.json:250
+/ui/theme-defs/night-owl/status-styles/info/color -> night-owl.json:249
+/ui/theme-defs/night-owl/status-styles/subtitle/background-color -> night-owl.json:246
+/ui/theme-defs/night-owl/status-styles/subtitle/color -> night-owl.json:245
+/ui/theme-defs/night-owl/status-styles/suggestion/color -> night-owl.json:288
+/ui/theme-defs/night-owl/status-styles/text/background-color -> night-owl.json:254
+/ui/theme-defs/night-owl/status-styles/text/color -> night-owl.json:253
+/ui/theme-defs/night-owl/status-styles/title-hotkey/background-color -> night-owl.json:283
+/ui/theme-defs/night-owl/status-styles/title-hotkey/bold -> night-owl.json:284
+/ui/theme-defs/night-owl/status-styles/title-hotkey/color -> night-owl.json:282
+/ui/theme-defs/night-owl/status-styles/title-hotkey/underline -> night-owl.json:285
+/ui/theme-defs/night-owl/status-styles/title/background-color -> night-owl.json:241
+/ui/theme-defs/night-owl/status-styles/title/bold -> night-owl.json:242
+/ui/theme-defs/night-owl/status-styles/title/color -> night-owl.json:240
+/ui/theme-defs/night-owl/status-styles/warn/background-color -> night-owl.json:258
+/ui/theme-defs/night-owl/status-styles/warn/color -> night-owl.json:257
+/ui/theme-defs/night-owl/styles/adjusted-time/color -> night-owl.json:63
+/ui/theme-defs/night-owl/styles/alt-text/background-color -> night-owl.json:30
+/ui/theme-defs/night-owl/styles/breadcrumb/bold -> night-owl.json:122
+/ui/theme-defs/night-owl/styles/breadcrumb/color -> night-owl.json:121
+/ui/theme-defs/night-owl/styles/cursor-line/background-color -> night-owl.json:54
+/ui/theme-defs/night-owl/styles/cursor-line/bold -> night-owl.json:55
+/ui/theme-defs/night-owl/styles/cursor-line/color -> night-owl.json:53
+/ui/theme-defs/night-owl/styles/cursor-line/underline -> night-owl.json:56
+/ui/theme-defs/night-owl/styles/disabled-cursor-line/background-color -> night-owl.json:60
+/ui/theme-defs/night-owl/styles/disabled-cursor-line/color -> night-owl.json:59
+/ui/theme-defs/night-owl/styles/disabled-focused/background-color -> night-owl.json:83
+/ui/theme-defs/night-owl/styles/disabled-focused/color -> night-owl.json:82
+/ui/theme-defs/night-owl/styles/error/bold -> night-owl.json:42
+/ui/theme-defs/night-owl/styles/error/color -> night-owl.json:41
+/ui/theme-defs/night-owl/styles/file-offset/color -> night-owl.json:72
+/ui/theme-defs/night-owl/styles/focused/background-color -> night-owl.json:79
+/ui/theme-defs/night-owl/styles/focused/color -> night-owl.json:78
+/ui/theme-defs/night-owl/styles/footnote-border/background-color -> night-owl.json:139
+/ui/theme-defs/night-owl/styles/footnote-border/color -> night-owl.json:138
+/ui/theme-defs/night-owl/styles/footnote-text/background-color -> night-owl.json:143
+/ui/theme-defs/night-owl/styles/footnote-text/color -> night-owl.json:142
+/ui/theme-defs/night-owl/styles/h1/underline -> night-owl.json:94
+/ui/theme-defs/night-owl/styles/h2/underline -> night-owl.json:97
+/ui/theme-defs/night-owl/styles/h3/underline -> night-owl.json:100
+/ui/theme-defs/night-owl/styles/h4/underline -> night-owl.json:103
+/ui/theme-defs/night-owl/styles/h5/underline -> night-owl.json:106
+/ui/theme-defs/night-owl/styles/h6/underline -> night-owl.json:109
+/ui/theme-defs/night-owl/styles/hidden/bold -> night-owl.json:50
+/ui/theme-defs/night-owl/styles/hidden/color -> night-owl.json:49
+/ui/theme-defs/night-owl/styles/hr/color -> night-owl.json:112
+/ui/theme-defs/night-owl/styles/hyperlink/underline -> night-owl.json:115
+/ui/theme-defs/night-owl/styles/identifier/background-color -> night-owl.json:19
+/ui/theme-defs/night-owl/styles/identifier/color -> night-owl.json:20
+/ui/theme-defs/night-owl/styles/indent-guide/color -> night-owl.json:149
+/ui/theme-defs/night-owl/styles/info/bold -> night-owl.json:38
+/ui/theme-defs/night-owl/styles/info/color -> night-owl.json:37
+/ui/theme-defs/night-owl/styles/invalid-msg/color -> night-owl.json:75
+/ui/theme-defs/night-owl/styles/list-glyph/color -> night-owl.json:118
+/ui/theme-defs/night-owl/styles/offset-time/color -> night-owl.json:69
+/ui/theme-defs/night-owl/styles/ok/bold -> night-owl.json:34
+/ui/theme-defs/night-owl/styles/ok/color -> night-owl.json:33
+/ui/theme-defs/night-owl/styles/popup/background-color -> night-owl.json:87
+/ui/theme-defs/night-owl/styles/popup/color -> night-owl.json:86
+/ui/theme-defs/night-owl/styles/quote-border/background-color -> night-owl.json:132
+/ui/theme-defs/night-owl/styles/quote-border/color -> night-owl.json:131
+/ui/theme-defs/night-owl/styles/quoted-text/background-color -> night-owl.json:135
+/ui/theme-defs/night-owl/styles/scrollbar/background-color -> night-owl.json:91
+/ui/theme-defs/night-owl/styles/scrollbar/color -> night-owl.json:90
+/ui/theme-defs/night-owl/styles/selected-text/background-color -> night-owl.json:27
+/ui/theme-defs/night-owl/styles/skewed-time/color -> night-owl.json:66
+/ui/theme-defs/night-owl/styles/snippet-border/color -> night-owl.json:146
+/ui/theme-defs/night-owl/styles/table-border/color -> night-owl.json:125
+/ui/theme-defs/night-owl/styles/table-header/bold -> night-owl.json:128
+/ui/theme-defs/night-owl/styles/text/background-color -> night-owl.json:24
+/ui/theme-defs/night-owl/styles/text/color -> night-owl.json:23
+/ui/theme-defs/night-owl/styles/warning/bold -> night-owl.json:46
+/ui/theme-defs/night-owl/styles/warning/color -> night-owl.json:45
+/ui/theme-defs/night-owl/syntax-styles/ascii-control/color -> night-owl.json:218
+/ui/theme-defs/night-owl/syntax-styles/code-border/background-color -> night-owl.json:163
+/ui/theme-defs/night-owl/syntax-styles/code-border/color -> night-owl.json:162
+/ui/theme-defs/night-owl/syntax-styles/comment/color -> night-owl.json:173
+/ui/theme-defs/night-owl/syntax-styles/diff-add/color -> night-owl.json:197
+/ui/theme-defs/night-owl/syntax-styles/diff-delete/color -> night-owl.json:194
+/ui/theme-defs/night-owl/syntax-styles/diff-section/color -> night-owl.json:200
+/ui/theme-defs/night-owl/syntax-styles/doc-directive/color -> night-owl.json:176
+/ui/theme-defs/night-owl/syntax-styles/file/color -> night-owl.json:212
+/ui/theme-defs/night-owl/syntax-styles/function/color -> night-owl.json:224
+/ui/theme-defs/night-owl/syntax-styles/inline-code/background-color -> night-owl.json:155
+/ui/theme-defs/night-owl/syntax-styles/inline-code/color -> night-owl.json:154
+/ui/theme-defs/night-owl/syntax-styles/keyword/color -> night-owl.json:166
+/ui/theme-defs/night-owl/syntax-styles/non-ascii/color -> night-owl.json:221
+/ui/theme-defs/night-owl/syntax-styles/null/color -> night-owl.json:215
+/ui/theme-defs/night-owl/syntax-styles/number/color -> night-owl.json:185
+/ui/theme-defs/night-owl/syntax-styles/quoted-code/background-color -> night-owl.json:159
+/ui/theme-defs/night-owl/syntax-styles/quoted-code/color -> night-owl.json:158
+/ui/theme-defs/night-owl/syntax-styles/re-repeat/color -> night-owl.json:191
+/ui/theme-defs/night-owl/syntax-styles/re-special/color -> night-owl.json:188
+/ui/theme-defs/night-owl/syntax-styles/separators-references-accessors/color -> night-owl.json:227
+/ui/theme-defs/night-owl/syntax-styles/spectrogram-high/background-color -> night-owl.json:209
+/ui/theme-defs/night-owl/syntax-styles/spectrogram-low/background-color -> night-owl.json:203
+/ui/theme-defs/night-owl/syntax-styles/spectrogram-medium/background-color -> night-owl.json:206
+/ui/theme-defs/night-owl/syntax-styles/string/bold -> night-owl.json:170
+/ui/theme-defs/night-owl/syntax-styles/string/color -> night-owl.json:169
+/ui/theme-defs/night-owl/syntax-styles/symbol/color -> night-owl.json:182
+/ui/theme-defs/night-owl/syntax-styles/type/color -> night-owl.json:230
+/ui/theme-defs/night-owl/syntax-styles/variable/color -> night-owl.json:179
+/ui/theme-defs/night-owl/vars/black -> night-owl.json:7
+/ui/theme-defs/night-owl/vars/blue -> night-owl.json:11
+/ui/theme-defs/night-owl/vars/cyan -> night-owl.json:13
+/ui/theme-defs/night-owl/vars/green -> night-owl.json:9
+/ui/theme-defs/night-owl/vars/magenta -> night-owl.json:12
+/ui/theme-defs/night-owl/vars/red -> night-owl.json:8
+/ui/theme-defs/night-owl/vars/semantic_highlight_color -> night-owl.json:15
+/ui/theme-defs/night-owl/vars/white -> night-owl.json:14
+/ui/theme-defs/night-owl/vars/yellow -> night-owl.json:10
+/ui/theme-defs/solarized-dark/log-level-styles/critical/color -> solarized-dark.json:307
+/ui/theme-defs/solarized-dark/log-level-styles/error/color -> solarized-dark.json:304
+/ui/theme-defs/solarized-dark/log-level-styles/fatal/color -> solarized-dark.json:310
+/ui/theme-defs/solarized-dark/log-level-styles/warning/color -> solarized-dark.json:301
+/ui/theme-defs/solarized-dark/status-styles/active/background-color -> solarized-dark.json:272
+/ui/theme-defs/solarized-dark/status-styles/active/color -> solarized-dark.json:271
+/ui/theme-defs/solarized-dark/status-styles/alert/background-color -> solarized-dark.json:268
+/ui/theme-defs/solarized-dark/status-styles/alert/color -> solarized-dark.json:267
+/ui/theme-defs/solarized-dark/status-styles/disabled-title/background-color -> solarized-dark.json:245
+/ui/theme-defs/solarized-dark/status-styles/disabled-title/bold -> solarized-dark.json:246
+/ui/theme-defs/solarized-dark/status-styles/disabled-title/color -> solarized-dark.json:244
+/ui/theme-defs/solarized-dark/status-styles/hotkey/color -> solarized-dark.json:284
+/ui/theme-defs/solarized-dark/status-styles/hotkey/underline -> solarized-dark.json:285
+/ui/theme-defs/solarized-dark/status-styles/inactive-alert/background-color -> solarized-dark.json:293
+/ui/theme-defs/solarized-dark/status-styles/inactive-alert/color -> solarized-dark.json:292
+/ui/theme-defs/solarized-dark/status-styles/inactive/background-color -> solarized-dark.json:289
+/ui/theme-defs/solarized-dark/status-styles/inactive/color -> solarized-dark.json:288
+/ui/theme-defs/solarized-dark/status-styles/info/background-color -> solarized-dark.json:276
+/ui/theme-defs/solarized-dark/status-styles/info/color -> solarized-dark.json:275
+/ui/theme-defs/solarized-dark/status-styles/subtitle/background-color -> solarized-dark.json:255
+/ui/theme-defs/solarized-dark/status-styles/subtitle/bold -> solarized-dark.json:256
+/ui/theme-defs/solarized-dark/status-styles/subtitle/color -> solarized-dark.json:254
+/ui/theme-defs/solarized-dark/status-styles/suggestion/color -> solarized-dark.json:296
+/ui/theme-defs/solarized-dark/status-styles/text/background-color -> solarized-dark.json:260
+/ui/theme-defs/solarized-dark/status-styles/text/color -> solarized-dark.json:259
+/ui/theme-defs/solarized-dark/status-styles/title-hotkey/background-color -> solarized-dark.json:280
+/ui/theme-defs/solarized-dark/status-styles/title-hotkey/color -> solarized-dark.json:279
+/ui/theme-defs/solarized-dark/status-styles/title-hotkey/underline -> solarized-dark.json:281
+/ui/theme-defs/solarized-dark/status-styles/title/background-color -> solarized-dark.json:250
+/ui/theme-defs/solarized-dark/status-styles/title/bold -> solarized-dark.json:251
+/ui/theme-defs/solarized-dark/status-styles/title/color -> solarized-dark.json:249
+/ui/theme-defs/solarized-dark/status-styles/warn/background-color -> solarized-dark.json:264
+/ui/theme-defs/solarized-dark/status-styles/warn/color -> solarized-dark.json:263
+/ui/theme-defs/solarized-dark/styles/adjusted-time/color -> solarized-dark.json:72
+/ui/theme-defs/solarized-dark/styles/alt-text/background-color -> solarized-dark.json:39
+/ui/theme-defs/solarized-dark/styles/breadcrumb/bold -> solarized-dark.json:131
+/ui/theme-defs/solarized-dark/styles/breadcrumb/color -> solarized-dark.json:130
+/ui/theme-defs/solarized-dark/styles/cursor-line/background-color -> solarized-dark.json:63
+/ui/theme-defs/solarized-dark/styles/cursor-line/bold -> solarized-dark.json:64
+/ui/theme-defs/solarized-dark/styles/cursor-line/color -> solarized-dark.json:62
+/ui/theme-defs/solarized-dark/styles/cursor-line/underline -> solarized-dark.json:65
+/ui/theme-defs/solarized-dark/styles/disabled-cursor-line/background-color -> solarized-dark.json:69
+/ui/theme-defs/solarized-dark/styles/disabled-cursor-line/color -> solarized-dark.json:68
+/ui/theme-defs/solarized-dark/styles/disabled-focused/background-color -> solarized-dark.json:100
+/ui/theme-defs/solarized-dark/styles/disabled-focused/color -> solarized-dark.json:99
+/ui/theme-defs/solarized-dark/styles/error/bold -> solarized-dark.json:51
+/ui/theme-defs/solarized-dark/styles/error/color -> solarized-dark.json:50
+/ui/theme-defs/solarized-dark/styles/file-offset/color -> solarized-dark.json:81
+/ui/theme-defs/solarized-dark/styles/focused/background-color -> solarized-dark.json:96
+/ui/theme-defs/solarized-dark/styles/focused/color -> solarized-dark.json:95
+/ui/theme-defs/solarized-dark/styles/footnote-border/background-color -> solarized-dark.json:148
+/ui/theme-defs/solarized-dark/styles/footnote-border/color -> solarized-dark.json:147
+/ui/theme-defs/solarized-dark/styles/footnote-text/background-color -> solarized-dark.json:152
+/ui/theme-defs/solarized-dark/styles/footnote-text/color -> solarized-dark.json:151
+/ui/theme-defs/solarized-dark/styles/h1/underline -> solarized-dark.json:103
+/ui/theme-defs/solarized-dark/styles/h2/underline -> solarized-dark.json:106
+/ui/theme-defs/solarized-dark/styles/h3/underline -> solarized-dark.json:109
+/ui/theme-defs/solarized-dark/styles/h4/underline -> solarized-dark.json:112
+/ui/theme-defs/solarized-dark/styles/h5/underline -> solarized-dark.json:115
+/ui/theme-defs/solarized-dark/styles/h6/underline -> solarized-dark.json:118
+/ui/theme-defs/solarized-dark/styles/hidden/bold -> solarized-dark.json:59
+/ui/theme-defs/solarized-dark/styles/hidden/color -> solarized-dark.json:58
+/ui/theme-defs/solarized-dark/styles/hr/color -> solarized-dark.json:121
+/ui/theme-defs/solarized-dark/styles/hyperlink/underline -> solarized-dark.json:124
+/ui/theme-defs/solarized-dark/styles/identifier/background-color -> solarized-dark.json:28
+/ui/theme-defs/solarized-dark/styles/identifier/color -> solarized-dark.json:29
+/ui/theme-defs/solarized-dark/styles/indent-guide/color -> solarized-dark.json:158
+/ui/theme-defs/solarized-dark/styles/info/bold -> solarized-dark.json:47
+/ui/theme-defs/solarized-dark/styles/info/color -> solarized-dark.json:46
+/ui/theme-defs/solarized-dark/styles/invalid-msg/color -> solarized-dark.json:84
+/ui/theme-defs/solarized-dark/styles/list-glyph/color -> solarized-dark.json:127
+/ui/theme-defs/solarized-dark/styles/offset-time/color -> solarized-dark.json:78
+/ui/theme-defs/solarized-dark/styles/ok/bold -> solarized-dark.json:43
+/ui/theme-defs/solarized-dark/styles/ok/color -> solarized-dark.json:42
+/ui/theme-defs/solarized-dark/styles/popup/background-color -> solarized-dark.json:88
+/ui/theme-defs/solarized-dark/styles/popup/color -> solarized-dark.json:87
+/ui/theme-defs/solarized-dark/styles/quote-border/background-color -> solarized-dark.json:141
+/ui/theme-defs/solarized-dark/styles/quote-border/color -> solarized-dark.json:140
+/ui/theme-defs/solarized-dark/styles/quoted-text/background-color -> solarized-dark.json:144
+/ui/theme-defs/solarized-dark/styles/scrollbar/background-color -> solarized-dark.json:92
+/ui/theme-defs/solarized-dark/styles/scrollbar/color -> solarized-dark.json:91
+/ui/theme-defs/solarized-dark/styles/selected-text/background-color -> solarized-dark.json:36
+/ui/theme-defs/solarized-dark/styles/skewed-time/color -> solarized-dark.json:75
+/ui/theme-defs/solarized-dark/styles/snippet-border/color -> solarized-dark.json:155
+/ui/theme-defs/solarized-dark/styles/table-border/color -> solarized-dark.json:134
+/ui/theme-defs/solarized-dark/styles/table-header/bold -> solarized-dark.json:137
+/ui/theme-defs/solarized-dark/styles/text/background-color -> solarized-dark.json:33
+/ui/theme-defs/solarized-dark/styles/text/color -> solarized-dark.json:32
+/ui/theme-defs/solarized-dark/styles/warning/bold -> solarized-dark.json:55
+/ui/theme-defs/solarized-dark/styles/warning/color -> solarized-dark.json:54
+/ui/theme-defs/solarized-dark/syntax-styles/ascii-control/color -> solarized-dark.json:224
+/ui/theme-defs/solarized-dark/syntax-styles/code-border/background-color -> solarized-dark.json:172
+/ui/theme-defs/solarized-dark/syntax-styles/code-border/color -> solarized-dark.json:171
+/ui/theme-defs/solarized-dark/syntax-styles/comment/color -> solarized-dark.json:182
+/ui/theme-defs/solarized-dark/syntax-styles/diff-add/color -> solarized-dark.json:203
+/ui/theme-defs/solarized-dark/syntax-styles/diff-delete/color -> solarized-dark.json:200
+/ui/theme-defs/solarized-dark/syntax-styles/diff-section/color -> solarized-dark.json:206
+/ui/theme-defs/solarized-dark/syntax-styles/doc-directive/color -> solarized-dark.json:185
+/ui/theme-defs/solarized-dark/syntax-styles/file/color -> solarized-dark.json:218
+/ui/theme-defs/solarized-dark/syntax-styles/function/color -> solarized-dark.json:233
+/ui/theme-defs/solarized-dark/syntax-styles/inline-code/background-color -> solarized-dark.json:164
+/ui/theme-defs/solarized-dark/syntax-styles/inline-code/color -> solarized-dark.json:163
+/ui/theme-defs/solarized-dark/syntax-styles/keyword/color -> solarized-dark.json:175
+/ui/theme-defs/solarized-dark/syntax-styles/non-ascii/color -> solarized-dark.json:227
+/ui/theme-defs/solarized-dark/syntax-styles/null/color -> solarized-dark.json:221
+/ui/theme-defs/solarized-dark/syntax-styles/number/bold -> solarized-dark.json:230
+/ui/theme-defs/solarized-dark/syntax-styles/quoted-code/background-color -> solarized-dark.json:168
+/ui/theme-defs/solarized-dark/syntax-styles/quoted-code/color -> solarized-dark.json:167
+/ui/theme-defs/solarized-dark/syntax-styles/re-repeat/color -> solarized-dark.json:197
+/ui/theme-defs/solarized-dark/syntax-styles/re-special/color -> solarized-dark.json:194
+/ui/theme-defs/solarized-dark/syntax-styles/separators-references-accessors/color -> solarized-dark.json:236
+/ui/theme-defs/solarized-dark/syntax-styles/spectrogram-high/background-color -> solarized-dark.json:215
+/ui/theme-defs/solarized-dark/syntax-styles/spectrogram-low/background-color -> solarized-dark.json:209
+/ui/theme-defs/solarized-dark/syntax-styles/spectrogram-medium/background-color -> solarized-dark.json:212
+/ui/theme-defs/solarized-dark/syntax-styles/string/bold -> solarized-dark.json:179
+/ui/theme-defs/solarized-dark/syntax-styles/string/color -> solarized-dark.json:178
+/ui/theme-defs/solarized-dark/syntax-styles/symbol/color -> solarized-dark.json:191
+/ui/theme-defs/solarized-dark/syntax-styles/type/color -> solarized-dark.json:239
+/ui/theme-defs/solarized-dark/syntax-styles/variable/color -> solarized-dark.json:188
+/ui/theme-defs/solarized-dark/vars/base0 -> solarized-dark.json:11
+/ui/theme-defs/solarized-dark/vars/base00 -> solarized-dark.json:10
+/ui/theme-defs/solarized-dark/vars/base01 -> solarized-dark.json:9
+/ui/theme-defs/solarized-dark/vars/base02 -> solarized-dark.json:8
+/ui/theme-defs/solarized-dark/vars/base03 -> solarized-dark.json:7
+/ui/theme-defs/solarized-dark/vars/base1 -> solarized-dark.json:12
+/ui/theme-defs/solarized-dark/vars/base2 -> solarized-dark.json:13
+/ui/theme-defs/solarized-dark/vars/base3 -> solarized-dark.json:14
+/ui/theme-defs/solarized-dark/vars/black -> solarized-dark.json:15
+/ui/theme-defs/solarized-dark/vars/blue -> solarized-dark.json:21
+/ui/theme-defs/solarized-dark/vars/cyan -> solarized-dark.json:22
+/ui/theme-defs/solarized-dark/vars/green -> solarized-dark.json:23
+/ui/theme-defs/solarized-dark/vars/magenta -> solarized-dark.json:19
+/ui/theme-defs/solarized-dark/vars/orange -> solarized-dark.json:17
+/ui/theme-defs/solarized-dark/vars/red -> solarized-dark.json:18
+/ui/theme-defs/solarized-dark/vars/semantic_highlight_color -> solarized-dark.json:24
+/ui/theme-defs/solarized-dark/vars/violet -> solarized-dark.json:20
+/ui/theme-defs/solarized-dark/vars/yellow -> solarized-dark.json:16
+/ui/theme-defs/solarized-light/log-level-styles/critical/color -> solarized-light.json:257
+/ui/theme-defs/solarized-light/log-level-styles/error/color -> solarized-light.json:254
+/ui/theme-defs/solarized-light/log-level-styles/fatal/color -> solarized-light.json:260
+/ui/theme-defs/solarized-light/log-level-styles/warning/color -> solarized-light.json:251
+/ui/theme-defs/solarized-light/status-styles/active/background-color -> solarized-light.json:231
+/ui/theme-defs/solarized-light/status-styles/active/color -> solarized-light.json:230
+/ui/theme-defs/solarized-light/status-styles/alert/background-color -> solarized-light.json:227
+/ui/theme-defs/solarized-light/status-styles/alert/color -> solarized-light.json:226
+/ui/theme-defs/solarized-light/status-styles/disabled-title/background-color -> solarized-light.json:209
+/ui/theme-defs/solarized-light/status-styles/disabled-title/bold -> solarized-light.json:210
+/ui/theme-defs/solarized-light/status-styles/disabled-title/color -> solarized-light.json:208
+/ui/theme-defs/solarized-light/status-styles/inactive-alert/background-color -> solarized-light.json:243
+/ui/theme-defs/solarized-light/status-styles/inactive-alert/color -> solarized-light.json:242
+/ui/theme-defs/solarized-light/status-styles/inactive/background-color -> solarized-light.json:239
+/ui/theme-defs/solarized-light/status-styles/inactive/color -> solarized-light.json:238
+/ui/theme-defs/solarized-light/status-styles/info/background-color -> solarized-light.json:235
+/ui/theme-defs/solarized-light/status-styles/info/color -> solarized-light.json:234
+/ui/theme-defs/solarized-light/status-styles/subtitle/background-color -> solarized-light.json:214
+/ui/theme-defs/solarized-light/status-styles/subtitle/bold -> solarized-light.json:215
+/ui/theme-defs/solarized-light/status-styles/subtitle/color -> solarized-light.json:213
+/ui/theme-defs/solarized-light/status-styles/suggestion/color -> solarized-light.json:246
+/ui/theme-defs/solarized-light/status-styles/text/background-color -> solarized-light.json:219
+/ui/theme-defs/solarized-light/status-styles/text/color -> solarized-light.json:218
+/ui/theme-defs/solarized-light/status-styles/title/background-color -> solarized-light.json:204
+/ui/theme-defs/solarized-light/status-styles/title/bold -> solarized-light.json:205
+/ui/theme-defs/solarized-light/status-styles/title/color -> solarized-light.json:203
+/ui/theme-defs/solarized-light/status-styles/warn/background-color -> solarized-light.json:223
+/ui/theme-defs/solarized-light/status-styles/warn/color -> solarized-light.json:222
+/ui/theme-defs/solarized-light/styles/adjusted-time/color -> solarized-light.json:67
+/ui/theme-defs/solarized-light/styles/alt-text/background-color -> solarized-light.json:38
+/ui/theme-defs/solarized-light/styles/breadcrumb/bold -> solarized-light.json:123
+/ui/theme-defs/solarized-light/styles/breadcrumb/color -> solarized-light.json:122
+/ui/theme-defs/solarized-light/styles/cursor-line/background-color -> solarized-light.json:58
+/ui/theme-defs/solarized-light/styles/cursor-line/bold -> solarized-light.json:59
+/ui/theme-defs/solarized-light/styles/cursor-line/color -> solarized-light.json:57
+/ui/theme-defs/solarized-light/styles/cursor-line/underline -> solarized-light.json:60
+/ui/theme-defs/solarized-light/styles/disabled-cursor-line/background-color -> solarized-light.json:64
+/ui/theme-defs/solarized-light/styles/disabled-cursor-line/color -> solarized-light.json:63
+/ui/theme-defs/solarized-light/styles/disabled-focused/background-color -> solarized-light.json:92
+/ui/theme-defs/solarized-light/styles/disabled-focused/color -> solarized-light.json:91
+/ui/theme-defs/solarized-light/styles/error/bold -> solarized-light.json:46
+/ui/theme-defs/solarized-light/styles/error/color -> solarized-light.json:45
+/ui/theme-defs/solarized-light/styles/focused/background-color -> solarized-light.json:88
+/ui/theme-defs/solarized-light/styles/focused/color -> solarized-light.json:87
+/ui/theme-defs/solarized-light/styles/footnote-border/background-color -> solarized-light.json:140
+/ui/theme-defs/solarized-light/styles/footnote-border/color -> solarized-light.json:139
+/ui/theme-defs/solarized-light/styles/footnote-text/background-color -> solarized-light.json:144
+/ui/theme-defs/solarized-light/styles/footnote-text/color -> solarized-light.json:143
+/ui/theme-defs/solarized-light/styles/h1/underline -> solarized-light.json:95
+/ui/theme-defs/solarized-light/styles/h2/underline -> solarized-light.json:98
+/ui/theme-defs/solarized-light/styles/h3/underline -> solarized-light.json:101
+/ui/theme-defs/solarized-light/styles/h4/underline -> solarized-light.json:104
+/ui/theme-defs/solarized-light/styles/h5/underline -> solarized-light.json:107
+/ui/theme-defs/solarized-light/styles/h6/underline -> solarized-light.json:110
+/ui/theme-defs/solarized-light/styles/hidden/bold -> solarized-light.json:54
+/ui/theme-defs/solarized-light/styles/hidden/color -> solarized-light.json:53
+/ui/theme-defs/solarized-light/styles/hr/color -> solarized-light.json:113
+/ui/theme-defs/solarized-light/styles/hyperlink/underline -> solarized-light.json:116
+/ui/theme-defs/solarized-light/styles/identifier/color -> solarized-light.json:28
+/ui/theme-defs/solarized-light/styles/indent-guide/color -> solarized-light.json:150
+/ui/theme-defs/solarized-light/styles/invalid-msg/color -> solarized-light.json:76
+/ui/theme-defs/solarized-light/styles/list-glyph/color -> solarized-light.json:119
+/ui/theme-defs/solarized-light/styles/offset-time/color -> solarized-light.json:73
+/ui/theme-defs/solarized-light/styles/ok/bold -> solarized-light.json:42
+/ui/theme-defs/solarized-light/styles/ok/color -> solarized-light.json:41
+/ui/theme-defs/solarized-light/styles/popup/background-color -> solarized-light.json:80
+/ui/theme-defs/solarized-light/styles/popup/color -> solarized-light.json:79
+/ui/theme-defs/solarized-light/styles/quote-border/background-color -> solarized-light.json:133
+/ui/theme-defs/solarized-light/styles/quote-border/color -> solarized-light.json:132
+/ui/theme-defs/solarized-light/styles/quoted-text/background-color -> solarized-light.json:136
+/ui/theme-defs/solarized-light/styles/scrollbar/background-color -> solarized-light.json:84
+/ui/theme-defs/solarized-light/styles/scrollbar/color -> solarized-light.json:83
+/ui/theme-defs/solarized-light/styles/selected-text/background-color -> solarized-light.json:35
+/ui/theme-defs/solarized-light/styles/skewed-time/color -> solarized-light.json:70
+/ui/theme-defs/solarized-light/styles/snippet-border/color -> solarized-light.json:147
+/ui/theme-defs/solarized-light/styles/table-border/color -> solarized-light.json:126
+/ui/theme-defs/solarized-light/styles/table-header/bold -> solarized-light.json:129
+/ui/theme-defs/solarized-light/styles/text/background-color -> solarized-light.json:32
+/ui/theme-defs/solarized-light/styles/text/color -> solarized-light.json:31
+/ui/theme-defs/solarized-light/styles/warning/bold -> solarized-light.json:50
+/ui/theme-defs/solarized-light/styles/warning/color -> solarized-light.json:49
+/ui/theme-defs/solarized-light/syntax-styles/comment/color -> solarized-light.json:162
+/ui/theme-defs/solarized-light/syntax-styles/diff-add/color -> solarized-light.json:183
+/ui/theme-defs/solarized-light/syntax-styles/diff-delete/color -> solarized-light.json:180
+/ui/theme-defs/solarized-light/syntax-styles/diff-section/color -> solarized-light.json:186
+/ui/theme-defs/solarized-light/syntax-styles/doc-directive/color -> solarized-light.json:165
+/ui/theme-defs/solarized-light/syntax-styles/file/color -> solarized-light.json:198
+/ui/theme-defs/solarized-light/syntax-styles/keyword/color -> solarized-light.json:155
+/ui/theme-defs/solarized-light/syntax-styles/re-repeat/color -> solarized-light.json:177
+/ui/theme-defs/solarized-light/syntax-styles/re-special/color -> solarized-light.json:174
+/ui/theme-defs/solarized-light/syntax-styles/spectrogram-high/background-color -> solarized-light.json:195
+/ui/theme-defs/solarized-light/syntax-styles/spectrogram-low/background-color -> solarized-light.json:189
+/ui/theme-defs/solarized-light/syntax-styles/spectrogram-medium/background-color -> solarized-light.json:192
+/ui/theme-defs/solarized-light/syntax-styles/string/bold -> solarized-light.json:159
+/ui/theme-defs/solarized-light/syntax-styles/string/color -> solarized-light.json:158
+/ui/theme-defs/solarized-light/syntax-styles/symbol/color -> solarized-light.json:171
+/ui/theme-defs/solarized-light/syntax-styles/variable/color -> solarized-light.json:168
+/ui/theme-defs/solarized-light/vars/base0 -> solarized-light.json:11
+/ui/theme-defs/solarized-light/vars/base00 -> solarized-light.json:10
+/ui/theme-defs/solarized-light/vars/base01 -> solarized-light.json:9
+/ui/theme-defs/solarized-light/vars/base02 -> solarized-light.json:8
+/ui/theme-defs/solarized-light/vars/base03 -> solarized-light.json:7
+/ui/theme-defs/solarized-light/vars/base1 -> solarized-light.json:12
+/ui/theme-defs/solarized-light/vars/base2 -> solarized-light.json:13
+/ui/theme-defs/solarized-light/vars/base3 -> solarized-light.json:14
+/ui/theme-defs/solarized-light/vars/black -> solarized-light.json:15
+/ui/theme-defs/solarized-light/vars/blue -> solarized-light.json:21
+/ui/theme-defs/solarized-light/vars/cyan -> solarized-light.json:22
+/ui/theme-defs/solarized-light/vars/green -> solarized-light.json:23
+/ui/theme-defs/solarized-light/vars/magenta -> solarized-light.json:19
+/ui/theme-defs/solarized-light/vars/orange -> solarized-light.json:17
+/ui/theme-defs/solarized-light/vars/red -> solarized-light.json:18
+/ui/theme-defs/solarized-light/vars/semantic_highlight_color -> solarized-light.json:24
+/ui/theme-defs/solarized-light/vars/violet -> solarized-light.json:20
+/ui/theme-defs/solarized-light/vars/yellow -> solarized-light.json:16
diff --git a/test/expected/test_cli.sh_f2e41555f1a5f40f54ce241207af602ed1503a2b.out b/test/expected/test_cli.sh_f2e41555f1a5f40f54ce241207af602ed1503a2b.out
index 751c83b..2db5d3c 100644
--- a/test/expected/test_cli.sh_f2e41555f1a5f40f54ce241207af602ed1503a2b.out
+++ b/test/expected/test_cli.sh_f2e41555f1a5f40f54ce241207af602ed1503a2b.out
@@ -1,2 +1,2 @@
-filepath lines 
-stdin   4 
+filepath  lines  
+stdin  4
diff --git a/test/expected/test_logfile.sh_1c6eee38f66356fcd9a9f0faedaea6dbcc901060.err b/test/expected/test_cli.sh_ff7da172f4350a2adb74b8764575823d798ed8b6.err
index e69de29..e69de29 100644
--- a/test/expected/test_logfile.sh_1c6eee38f66356fcd9a9f0faedaea6dbcc901060.err
+++ b/test/expected/test_cli.sh_ff7da172f4350a2adb74b8764575823d798ed8b6.err
diff --git a/test/expected/test_cli.sh_ff7da172f4350a2adb74b8764575823d798ed8b6.out b/test/expected/test_cli.sh_ff7da172f4350a2adb74b8764575823d798ed8b6.out
new file mode 100644
index 0000000..8d4265f
--- /dev/null
+++ b/test/expected/test_cli.sh_ff7da172f4350a2adb74b8764575823d798ed8b6.out
@@ -0,0 +1,2 @@
+Hello, World!
+Goodbye, World!
diff --git a/test/expected/test_cmds.sh_015ffe79a08f4c9f0cd1cb84c6afa4398f879fc7.err b/test/expected/test_cmds.sh_015ffe79a08f4c9f0cd1cb84c6afa4398f879fc7.err
new file mode 100644
index 0000000..23dd3a4
--- /dev/null
+++ b/test/expected/test_cmds.sh_015ffe79a08f4c9f0cd1cb84c6afa4398f879fc7.err
@@ -0,0 +1,7 @@
+✘ error: cannot access -- /bad-dir
+ reason: No such file or directory
+ --> command-option:1
+ | :cd /bad-dir 
+ = help: :cd dir
+ ══════════════════════════════════════════════════════════════════════
+ Change the current directory
diff --git a/test/expected/test_sessions.sh_8732dad5481be991ca7f291d9c5451c7b016cea7.err b/test/expected/test_cmds.sh_015ffe79a08f4c9f0cd1cb84c6afa4398f879fc7.out
index e69de29..e69de29 100644
--- a/test/expected/test_sessions.sh_8732dad5481be991ca7f291d9c5451c7b016cea7.err
+++ b/test/expected/test_cmds.sh_015ffe79a08f4c9f0cd1cb84c6afa4398f879fc7.out
diff --git a/test/expected/test_cmds.sh_017b495b95218b7c083951e2dba331cfec6e90be.err b/test/expected/test_cmds.sh_017b495b95218b7c083951e2dba331cfec6e90be.err
index 0d53487..8ecc11d 100644
--- a/test/expected/test_cmds.sh_017b495b95218b7c083951e2dba331cfec6e90be.err
+++ b/test/expected/test_cmds.sh_017b495b95218b7c083951e2dba331cfec6e90be.err
@@ -1,6 +1,6 @@
✘ error: no log files loaded
 --> command-option:2
 | :close 
- = help: :close
+ = help: :close path
══════════════════════════════════════════════════════════════════════
- Close the top file in the view
+ Close the given file(s) or the top file in the view
diff --git a/test/expected/test_cmds.sh_1d92c5bc12f5e7aaa6d84c5ed47f0b9f96e36c6a.out b/test/expected/test_cmds.sh_1d92c5bc12f5e7aaa6d84c5ed47f0b9f96e36c6a.out
index 6dfcc1c..227341b 100644
--- a/test/expected/test_cmds.sh_1d92c5bc12f5e7aaa6d84c5ed47f0b9f96e36c6a.out
+++ b/test/expected/test_cmds.sh_1d92c5bc12f5e7aaa6d84c5ed47f0b9f96e36c6a.out
@@ -1,14 +1,8 @@
[
{
"log_line": 0,
- "log_part": null,
"log_time": "2009-07-20 22:59:26.000",
- "log_idle_msecs": 0,
"log_level": "info",
- "log_mark": 0,
- "log_comment": null,
- "log_tags": null,
- "log_filters": null,
"c_ip": "192.168.202.254",
"cs_method": "GET",
"cs_referer": "-",
@@ -19,18 +13,19 @@
"cs_version": "HTTP/1.0",
"sc_bytes": 134,
"sc_status": 200,
- "cs_host": null
+ "cs_host": null,
+ "log_part": null,
+ "log_idle_msecs": 0,
+ "log_mark": 0,
+ "log_comment": null,
+ "log_tags": null,
+ "log_annotations": null,
+ "log_filters": null
},
{
"log_line": 1,
- "log_part": null,
"log_time": "2009-07-20 22:59:29.000",
- "log_idle_msecs": 3000,
"log_level": "error",
- "log_mark": 0,
- "log_comment": null,
- "log_tags": null,
- "log_filters": null,
"c_ip": "192.168.202.254",
"cs_method": "GET",
"cs_referer": "-",
@@ -41,18 +36,19 @@
"cs_version": "HTTP/1.0",
"sc_bytes": 46210,
"sc_status": 404,
- "cs_host": null
+ "cs_host": null,
+ "log_part": null,
+ "log_idle_msecs": 3000,
+ "log_mark": 0,
+ "log_comment": null,
+ "log_tags": null,
+ "log_annotations": null,
+ "log_filters": null
},
{
"log_line": 2,
- "log_part": null,
"log_time": "2009-07-20 22:59:29.000",
- "log_idle_msecs": 0,
"log_level": "info",
- "log_mark": 0,
- "log_comment": null,
- "log_tags": null,
- "log_filters": null,
"c_ip": "192.168.202.254",
"cs_method": "GET",
"cs_referer": "-",
@@ -63,6 +59,13 @@
"cs_version": "HTTP/1.0",
"sc_bytes": 78929,
"sc_status": 200,
- "cs_host": null
+ "cs_host": null,
+ "log_part": null,
+ "log_idle_msecs": 0,
+ "log_mark": 0,
+ "log_comment": null,
+ "log_tags": null,
+ "log_annotations": null,
+ "log_filters": null
}
]
diff --git a/test/expected/test_cmds.sh_2e123104cdd2087ac40731a0aa533ba6a87ea744.out b/test/expected/test_cmds.sh_2e123104cdd2087ac40731a0aa533ba6a87ea744.out
index 8c91cd9..156d9d9 100644
--- a/test/expected/test_cmds.sh_2e123104cdd2087ac40731a0aa533ba6a87ea744.out
+++ b/test/expected/test_cmds.sh_2e123104cdd2087ac40731a0aa533ba6a87ea744.out
@@ -1 +1 @@
-2009-07-20 22:59:30,221:ERROR:Goodbye, World!
+2009-07-20 22:59:30,221:ERROR:Goodbye, World!
diff --git a/test/expected/test_cmds.sh_2e67bdbbc9a14aa772b2a9f755ed8f8124708558.out b/test/expected/test_cmds.sh_2e67bdbbc9a14aa772b2a9f755ed8f8124708558.out
index 3f55261..ce0cfbf 100644
--- a/test/expected/test_cmds.sh_2e67bdbbc9a14aa772b2a9f755ed8f8124708558.out
+++ b/test/expected/test_cmds.sh_2e67bdbbc9a14aa772b2a9f755ed8f8124708558.out
@@ -1,23 +1,23 @@
-Apr 7 00:49:42 Tim-Abaft-iMac abashed[0]: Aberrant [abhorrent5701Aberrant]: Link up on en0, 1-Aboard, Full-abortive, Abounding flow-abrupt, Absent [796d,2301,0de1,0300,cde1,3800]
-Apr 7 05:49:53 Tim-Abaft-iMac.absorbing Abstracted[17212]: -[absurd abundant] absurd abusive accept: <acceptable:0x511f30
- accessible=<KSOmahaServer:0x510d80>
- url="https://achondroplasia.example.com/account/accurate2"
- achiever=0
- acid=1
- acidic=1
- acoustic=1
+Apr 7 00:49:42 Tim-Stacks-iMac aback[0]: Abaft [abandoned5701Abaft]: Link up on en0, 1-Gigabit, Full-duplex, Ablaze flow-control, Able [796d,2301,0de1,0300,cde1,3800]
+Apr 7 05:49:53 Tim-Stacks-iMac.local Aboard[17212]: -[aboriginal abortive] aboriginal abounding abrasive: <abrupt:0x511f30
+ absent=<KSOmahaServer:0x510d80>
+ url="https://achondroplasia.example.com/absorbing/abstracted2"
+ absurd=0
+ abundant=1
+ abusive=1
+ accept=1
body=
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
- <o:gupdate xmlns:o="http://acinetobacter-infections.example.com/accurate2/acrid" protocol="2.0" version="Act-1.2.0.7709" ismachine="1" requestid="{1ca0a968-cbe9-e75b-d00b-4859609878ea}">
- <o:os platform="mac" version="activity" sp="10.10.2_x86_64h"></o:os>
- <o:app appid="com.actually.Ad hoc" version="1.2.0.7709" lang="en-us" installage="180" brand="GGLG">
+ <o:gupdate xmlns:o="http://acinetobacter-infections.example.com/abstracted2/accessible" protocol="2.0" version="KeystoneDaemon-1.2.0.7709" ismachine="1" requestid="{1ca0a968-cbe9-e75b-d00b-4859609878ea}">
+ <o:os platform="mac" version="account" sp="10.10.2_x86_64h"></o:os>
+ <o:app appid="com.achiever.Acid" version="1.2.0.7709" lang="en-us" installage="180" brand="GGLG">
<o:ping r="1" a="1"></o:ping>
<o:updatecheck></o:updatecheck>
</o:app>
</o:gupdate>
>
-Apr 7 07:31:56 Tim-Abaft-iMac.absorbing Add[36403]: ADDICTED: The Adhesive adjoining adjustment is admit 10.9.2 adorable of 10.10.2. Use advice's afford afraid to get afterthought aggressive agonizing agree
- Call agreement:
-Apr 7 07:31:56 Tim-Abaft-iMac.absorbing Add[36403]: 0 Ahead 0x00007fff8a9b3d9b ___Adhesive_Air_airplane_airport + 113
-Apr 7 07:31:56 Tim-Abaft-iMac.absorbing Add[36403]: 1 ajar.alarm 0x00007fff8bc84c13 _alcoholic_alert_alike + 8
-Apr 7 07:32:56 Tim-Abaft-iMac.absorbing alive[234]: Bad data { abc, 123, 456 )}]
+Apr 7 07:31:56 Tim-Stacks-iMac.local Acoustic[36403]: ACOUSTICS: The Act action activity is actually 10.9.2 ad hoc of 10.10.2. Use add's addition adhesive to get admire admit adorable adventurous
+ Call advice:
+Apr 7 07:31:56 Tim-Stacks-iMac.local Acoustic[36403]: 0 Advise 0x00007fff8a9b3d9b ___Act_Afford_afraid_aftermath + 113
+Apr 7 07:31:56 Tim-Stacks-iMac.local Acoustic[36403]: 1 afternoon.afterthought 0x00007fff8bc84c13 _aggressive_agonizing_agree + 8
+Apr 7 07:32:56 Tim-Stacks-iMac.local agreeable[234]: Bad data { abc, 123, 456 )}]
diff --git a/test/expected/test_cmds.sh_2ff0fe712c9b0012e42282c5f77b0b83cad37ddf.out b/test/expected/test_cmds.sh_2ff0fe712c9b0012e42282c5f77b0b83cad37ddf.out
index c6eedf2..43bbc04 100644
--- a/test/expected/test_cmds.sh_2ff0fe712c9b0012e42282c5f77b0b83cad37ddf.out
+++ b/test/expected/test_cmds.sh_2ff0fe712c9b0012e42282c5f77b0b83cad37ddf.out
@@ -1 +1 @@
-2009-07-20 22:59:30,221:ERROR:Goodbye, World!
+2009-07-20 22:59:30,221:ERROR:Goodbye, World!
diff --git a/test/expected/test_sessions.sh_e39648f425c3f291c9d1c0d14595a019abd0cb48.err b/test/expected/test_cmds.sh_3b4bea458c59d2bac492e568616b610625037ad0.err
index e69de29..e69de29 100644
--- a/test/expected/test_sessions.sh_e39648f425c3f291c9d1c0d14595a019abd0cb48.err
+++ b/test/expected/test_cmds.sh_3b4bea458c59d2bac492e568616b610625037ad0.err
diff --git a/test/expected/test_cmds.sh_3b4bea458c59d2bac492e568616b610625037ad0.out b/test/expected/test_cmds.sh_3b4bea458c59d2bac492e568616b610625037ad0.out
new file mode 100644
index 0000000..891f4a7
--- /dev/null
+++ b/test/expected/test_cmds.sh_3b4bea458c59d2bac492e568616b610625037ad0.out
@@ -0,0 +1,2 @@
+⋮:⋮:foo bar baz
+⋮:⋮:foo bar baz
diff --git a/test/expected/test_cmds.sh_453054e29aaca4c2662c45c2a1f2f63f3510d8dd.out b/test/expected/test_cmds.sh_453054e29aaca4c2662c45c2a1f2f63f3510d8dd.out
index dcd3557..1192d46 100644
--- a/test/expected/test_cmds.sh_453054e29aaca4c2662c45c2a1f2f63f3510d8dd.out
+++ b/test/expected/test_cmds.sh_453054e29aaca4c2662c45c2a1f2f63f3510d8dd.out
@@ -1,2 +1,2 @@
-2009-07-20 22:59:30,221:ERROR:Goodbye, World!
-2009-07-20 22:59:30,221:ERROR:Goodbye, World!
+2009-07-20 22:59:30,221:ERROR:Goodbye, World!
+2009-07-20 22:59:30,221:ERROR:Goodbye, World!
diff --git a/test/expected/test_cmds.sh_4f06183ed231669965965f5042fbbb507fa7deab.out b/test/expected/test_cmds.sh_4f06183ed231669965965f5042fbbb507fa7deab.out
index ef822cd..278a6d1 100644
--- a/test/expected/test_cmds.sh_4f06183ed231669965965f5042fbbb507fa7deab.out
+++ b/test/expected/test_cmds.sh_4f06183ed231669965965f5042fbbb507fa7deab.out
@@ -1,3 +1,3 @@
2009-07-20 22:59:27,672:DEBUG:Hello, World!
How are you today?
-2009-07-20 22:59:30,221:ERROR:Goodbye, World!
+2009-07-20 22:59:30,221:ERROR:Goodbye, World!
diff --git a/test/expected/test_cmds.sh_55c2fd15ec2c7d96dbef7b36a42a1b7b42f90dbc.err b/test/expected/test_cmds.sh_55c2fd15ec2c7d96dbef7b36a42a1b7b42f90dbc.err
index e90b75a..5163792 100644
--- a/test/expected/test_cmds.sh_55c2fd15ec2c7d96dbef7b36a42a1b7b42f90dbc.err
+++ b/test/expected/test_cmds.sh_55c2fd15ec2c7d96dbef7b36a42a1b7b42f90dbc.err
@@ -1,4 +1,4 @@
✘ error: unknown bookmark type: foobar
 --> command-option:2
 | :next-mark foobar 
- = help: available types: error, file, meta, search, user, user-expr, warning
+ = help: available types: error, file, meta, partition, search, user, user-expr, warning
diff --git a/test/expected/test_sql_str_func.sh_3855d2cc0ab29171cae8e722f130adec25eae36e.out b/test/expected/test_cmds.sh_5630626e6f68c3d4a2c3e5f27d024df5950b88b5.err
index e69de29..e69de29 100644
--- a/test/expected/test_sql_str_func.sh_3855d2cc0ab29171cae8e722f130adec25eae36e.out
+++ b/test/expected/test_cmds.sh_5630626e6f68c3d4a2c3e5f27d024df5950b88b5.err
diff --git a/test/expected/test_cmds.sh_5630626e6f68c3d4a2c3e5f27d024df5950b88b5.out b/test/expected/test_cmds.sh_5630626e6f68c3d4a2c3e5f27d024df5950b88b5.out
new file mode 100644
index 0000000..f9264f7
--- /dev/null
+++ b/test/expected/test_cmds.sh_5630626e6f68c3d4a2c3e5f27d024df5950b88b5.out
@@ -0,0 +1,2 @@
+Hello
+World
diff --git a/test/expected/test_sql_yaml_func.sh_41c6abde708a69e74f5b7fde865d88fa75f91e0a.out b/test/expected/test_cmds.sh_68c774418bac897bd4d4fe9dbbf08454886b2e15.err
index e69de29..e69de29 100644
--- a/test/expected/test_sql_yaml_func.sh_41c6abde708a69e74f5b7fde865d88fa75f91e0a.out
+++ b/test/expected/test_cmds.sh_68c774418bac897bd4d4fe9dbbf08454886b2e15.err
diff --git a/test/expected/test_cmds.sh_68c774418bac897bd4d4fe9dbbf08454886b2e15.out b/test/expected/test_cmds.sh_68c774418bac897bd4d4fe9dbbf08454886b2e15.out
new file mode 100644
index 0000000..0dd4cb7
--- /dev/null
+++ b/test/expected/test_cmds.sh_68c774418bac897bd4d4fe9dbbf08454886b2e15.out
@@ -0,0 +1,3 @@
+192.168.202.254 - - [20/Jul/2009:22:59:26 +0000] "GET /vmw/cgi/tramp HTTP/1.0" 200 134 "-" "gPXE/0.9.7"
+192.168.202.254 - - [20/Jul/2009:22:59:29 +0000] "GET /vmw/vSphere/default/vmkboot.gz HTTP/1.0" 404 46210 "-" "gPXE/0.9.7"
+192.168.202.254 - - [20/Jul/2009:22:59:29 +0000] "GET /vmw/vSphere/default/vmkernel.gz HTTP/1.0" 200 78929 "-" "gPXE/0.9.7"
diff --git a/test/expected/test_cmds.sh_7cb644890c4b945ff3f1e15c86a58c85cb5425c0.out b/test/expected/test_cmds.sh_7cb644890c4b945ff3f1e15c86a58c85cb5425c0.out
index 7ad9d78..6377559 100644
--- a/test/expected/test_cmds.sh_7cb644890c4b945ff3f1e15c86a58c85cb5425c0.out
+++ b/test/expected/test_cmds.sh_7cb644890c4b945ff3f1e15c86a58c85cb5425c0.out
@@ -1,5 +1,5 @@
-┏━━┳━━━━━━━━━━━━━┓
-┃c1┃ c2 ┃
-┡━━╇━━━━━━━━━━━━━┩
-│ 1│Hello, World!│
-└━━┴━━━━━━━━━━━━━┘
+┏━━━━━━━━━━┳━━━━━━━━━━━━━┓
+┃ c1 ┃ c2 ┃
+┡━━━━━━━━━━╇━━━━━━━━━━━━━┩
+│ 1│Hello, World!│
+└━━━━━━━━━━┴━━━━━━━━━━━━━┘
diff --git a/test/expected/test_text_file.sh_2e69c22dcfa37b5c3e8490a6026eacb7ca953998.out b/test/expected/test_cmds.sh_949826cc086c7a5c87270be172e3caa3bf8f928d.err
index e69de29..e69de29 100644
--- a/test/expected/test_text_file.sh_2e69c22dcfa37b5c3e8490a6026eacb7ca953998.out
+++ b/test/expected/test_cmds.sh_949826cc086c7a5c87270be172e3caa3bf8f928d.err
diff --git a/test/expected/test_cmds.sh_949826cc086c7a5c87270be172e3caa3bf8f928d.out b/test/expected/test_cmds.sh_949826cc086c7a5c87270be172e3caa3bf8f928d.out
new file mode 100644
index 0000000..0ac26ae
--- /dev/null
+++ b/test/expected/test_cmds.sh_949826cc086c7a5c87270be172e3caa3bf8f928d.out
@@ -0,0 +1 @@
+{"ts": "2013-09-06T22:00:49.124817Z", "lvl": "INFO", "msg": "Shutting down service", "user": "steve@example.com"} info steve@example.com
diff --git a/test/expected/test_text_file.sh_801414c6bb6d3f9225973eafa3c6dfa49cd2081d.err b/test/expected/test_cmds.sh_9527f941dc84a2ac3a030f222e41c6ccd1961cbe.err
index e69de29..e69de29 100644
--- a/test/expected/test_text_file.sh_801414c6bb6d3f9225973eafa3c6dfa49cd2081d.err
+++ b/test/expected/test_cmds.sh_9527f941dc84a2ac3a030f222e41c6ccd1961cbe.err
diff --git a/test/expected/test_cmds.sh_9527f941dc84a2ac3a030f222e41c6ccd1961cbe.out b/test/expected/test_cmds.sh_9527f941dc84a2ac3a030f222e41c6ccd1961cbe.out
new file mode 100644
index 0000000..b91e5b5
--- /dev/null
+++ b/test/expected/test_cmds.sh_9527f941dc84a2ac3a030f222e41c6ccd1961cbe.out
@@ -0,0 +1 @@
+Hello, World!
diff --git a/test/expected/test_cmds.sh_a00943ef715598c7554b85de8502454e41bb9e28.out b/test/expected/test_cmds.sh_a00943ef715598c7554b85de8502454e41bb9e28.out
index 01761e9..bcef8b0 100644
--- a/test/expected/test_cmds.sh_a00943ef715598c7554b85de8502454e41bb9e28.out
+++ b/test/expected/test_cmds.sh_a00943ef715598c7554b85de8502454e41bb9e28.out
@@ -1,4 +1,4 @@
- Thu Nov 03 09:20:00  1 normal 2 errors 0 warnings  0 marks
- Thu Nov 03 09:45:00  1 normal 0 errors 0 warnings 0 marks
- Fri Feb 03 09:20:00  0 normal 1 errors 0 warnings 0 marks
- Wed Jan 03 09:20:00  1 normal 0 errors 0 warnings 0 marks
+ Thu Nov 03 09:20:00  1 normal 2 errors 0 warnings  0 marks
+ Thu Nov 03 09:45:00  1 normal 0 errors 0 warnings 0 marks
+ Fri Feb 03 09:20:00  0 normal 1 errors 0 warnings 0 marks
+ Wed Jan 03 09:20:00  1 normal 0 errors 0 warnings 0 marks
diff --git a/test/expected/test_cmds.sh_a0e6214b2a85c90d31aee12efde850441cca7eb3.out b/test/expected/test_cmds.sh_a0e6214b2a85c90d31aee12efde850441cca7eb3.out
deleted file mode 100644
index 1d3eae4..0000000
--- a/test/expected/test_cmds.sh_a0e6214b2a85c90d31aee12efde850441cca7eb3.out
+++ /dev/null
@@ -1,2 +0,0 @@
-log_top_line() 
- 51
diff --git a/test/expected/test_cmds.sh_a8006c4169d76baecd99a0699c2fc66a583ad676.err b/test/expected/test_cmds.sh_a8006c4169d76baecd99a0699c2fc66a583ad676.err
index 644b202..94f8e7b 100644
--- a/test/expected/test_cmds.sh_a8006c4169d76baecd99a0699c2fc66a583ad676.err
+++ b/test/expected/test_cmds.sh_a8006c4169d76baecd99a0699c2fc66a583ad676.err
@@ -3,5 +3,5 @@
 | :filter-out 32 
 = help: :filter-out pattern
══════════════════════════════════════════════════════════════════════
- Remove lines that match the given regular expression in the current
- view
+ Remove lines that match the given regular expression in the
+ current view
diff --git a/test/expected/test_cmds.sh_ac45fb0f8f9578c3ded0855f694698ec38ce31ad.out b/test/expected/test_cmds.sh_ac45fb0f8f9578c3ded0855f694698ec38ce31ad.out
index fa6a319..877b967 100644
--- a/test/expected/test_cmds.sh_ac45fb0f8f9578c3ded0855f694698ec38ce31ad.out
+++ b/test/expected/test_cmds.sh_ac45fb0f8f9578c3ded0855f694698ec38ce31ad.out
@@ -1,12 +1,12 @@
{
- "foo bar": null,
+ "foo bar": null,
"array": [
- 1,
- 2,
- 3
+ 1,
+ 2,
+ 3
],
"obj": {
- "one": 1,
- "two": true
+ "one": 1,
+ "two": true
}
}
diff --git a/test/expected/test_cmds.sh_af0fcbd30b3fd0d13477aa3325ef0302052a4d9f.out b/test/expected/test_cmds.sh_af0fcbd30b3fd0d13477aa3325ef0302052a4d9f.out
index be06882..f4f4bcd 100644
--- a/test/expected/test_cmds.sh_af0fcbd30b3fd0d13477aa3325ef0302052a4d9f.out
+++ b/test/expected/test_cmds.sh_af0fcbd30b3fd0d13477aa3325ef0302052a4d9f.out
@@ -1 +1 @@
- Sat Nov 03 08:00:00 1 normal 0 errors 0 warnings 0 marks
+ Sat Nov 03 08:00:00 1 normal 0 errors 0 warnings  0 marks
diff --git a/test/expected/test_text_file.sh_c21295f131c221861568bda5014b76ef99bdd11f.err b/test/expected/test_cmds.sh_b3d0588ad144a841200692b46125bddf66f5d8bb.err
index e69de29..e69de29 100644
--- a/test/expected/test_text_file.sh_c21295f131c221861568bda5014b76ef99bdd11f.err
+++ b/test/expected/test_cmds.sh_b3d0588ad144a841200692b46125bddf66f5d8bb.err
diff --git a/test/expected/test_cmds.sh_b3d0588ad144a841200692b46125bddf66f5d8bb.out b/test/expected/test_cmds.sh_b3d0588ad144a841200692b46125bddf66f5d8bb.out
new file mode 100644
index 0000000..8ab686e
--- /dev/null
+++ b/test/expected/test_cmds.sh_b3d0588ad144a841200692b46125bddf66f5d8bb.out
@@ -0,0 +1 @@
+Hello, World!
diff --git a/test/expected/test_cmds.sh_b6a3bb78e9d60e5e1f5ce5b18e40d2f1662707ab.out b/test/expected/test_cmds.sh_b6a3bb78e9d60e5e1f5ce5b18e40d2f1662707ab.out
index aca5279..8352cf5 100644
--- a/test/expected/test_cmds.sh_b6a3bb78e9d60e5e1f5ce5b18e40d2f1662707ab.out
+++ b/test/expected/test_cmds.sh_b6a3bb78e9d60e5e1f5ce5b18e40d2f1662707ab.out
@@ -51,33 +51,27 @@ not have to manually specify the log file format. The currently
supported formats are: syslog, apache, strace, tcsh history, and
generic log files with timestamps.
-Lnav will also display data piped in on the standard input. The
-following options are available when doing so:
-
- •  -t  Prepend timestamps to the lines of data being read
- in on the standard input.
- •  -w file  Write the contents of the standard input to
- this file.
+Lnav will also display data piped in on the standard input.
To automatically execute queries or lnav commands after the files have
been loaded, you can use the following options:
•  -c cmd  A command, query, or file to execute. The
first character determines the type of operation: a colon
- ( : ) is used for the built-in commands; a semi-colon ( ;
- ) for SQL queries; and a pipe symbol ( | ) for executing
- a file containing other commands. For example, to open
- the file "foo.log" and go to the tenth line in the file,
- you can do:
+ ( : ) is used for the built-in commands; a semi-colon (
+  ; ) for SQL/PRQL queries; and a pipe symbol ( | ) for
+ executing a file containing other commands. For example,
+ to open the file "foo.log" and go to the tenth line in
+ the file, you can do:
▌lnav -c ':goto 10' foo.log 
This option can be given multiple times to execute
multiple operations in sequence.
•  -f file  A file that contains commands, queries, or
- files to execute. This option is a shortcut for  -c '|file'
- . You can use a dash ( - ) to execute commands from the
- standard input.
+ files to execute. This option is a shortcut for
+  -c '|file' . You can use a dash ( - ) to execute
+ commands from the standard input.
To execute commands/queries without opening the interactive text UI,
you can pass the  -n  option. This combination of options allows you
@@ -111,7 +105,8 @@ On color displays, the lines will be highlighted as follows:
• Errors will be colored in red;
• warnings will be yellow;
- • boundaries between days will be underlined; and
+ • boundaries between days will be underlined;
+ and
• various color highlights will be applied to: IP
addresses, SQL keywords, XML tags, file and line numbers
in Java backtraces, and quoted strings.
@@ -132,13 +127,14 @@ each message and pressing again will show the full paths.
Above and below the main body are status lines that display a variety
of information. The top line displays:
- • The current time, configurable by the  /ui/clock-format 
- property.
- • The highest priority message from the  lnav_user_notifications 
- table. You can insert rows into this table to display
- your own status messages. The default message displayed
- on startup explains how to focus on the next status line
- at the top, which is an interactive breadcrumb bar.
+ • The current time, configurable by the
+  /ui/clock-format  property.
+ • The highest priority message from the
+  lnav_user_notifications  table. You can insert rows into
+ this table to display your own status messages. The
+ default message displayed on startup explains how to
+ focus on the next status line at the top, which is an
+ interactive breadcrumb bar.
The second status line at the top display breadcrumbs for the top line
in the main view. Pressing  ENTER  will focus input on the breadcrumb
@@ -147,8 +143,8 @@ breadcrumbs are:
• The name of the current view.
• In the log view, the timestamp of the top log message.
- • In the log view, the format of the log file the top log
- message is from.
+ • In the log view, the format of the log file the top
+ log message is from.
• The name of the file the top line was pulled from.
• If the top line is within a larger chunk of structured
data, the path to the value in the top line will be
@@ -156,8 +152,8 @@ breadcrumbs are:
Notes:
- 1. Pressing  CTRL-A / CTRL-E  will select the first/last
- breadcrumb.
+ 1. Pressing  CTRL-A / CTRL-E  will select the
+ first/last breadcrumb.
2. Typing text while a breadcrumb is selected will
perform a fuzzy search on the possibilities.
@@ -172,7 +168,8 @@ the following:
• The number of enabled filters and the total number of
filters.
- • The number of lines not displayed because of filtering.
+ • The number of lines not displayed because of
+ filtering.
To edit the filters, you can press TAB to change the focus from the
main view to the filter editor. The editor allows you to create,
@@ -207,14 +204,14 @@ can always use  q  to pop the top view off of the stack.
the log file view.
Q Similar to  q , except it will try to sync the top
time between the current and former views. For
- example, when leaving the spectrogram view with  Q
- , the top time in that view will be matched to the
- top time in the log view.
+ example, when leaving the spectrogram view with
+  Q , the top time in that view will be matched to
+ the top time in the log view.
TAB Toggle focusing on the filter editor or the main
view.
ENTER Focus on the breadcrumb bar.
- a/A Restore the view that was previously popped with  q
- / Q . The  A  hotkey will try to match the top
+ a/A Restore the view that was previously popped with
+  q / Q . The  A  hotkey will try to match the top
times between the two views.
X Close the current text file or log file.
@@ -263,11 +260,10 @@ can always use  q  to pop the top view off of the stack.
and then the last message arrives five seconds
later, the last message will be highlighted as a
slow down.
- {/} Move to the previous/next location in history.
- Whenever you jump to a new location in the view,
- the location will be added to the history. The
- history is not updated when using only the arrow
- keys.
+ {/} Move to the previous/next section in the view. In
+ the LOG view, this moves through partitions. In
+ other views, it moves through sections of
+ documents.
Chronological Navigation
@@ -427,10 +423,10 @@ can always use  q  to pop the top view off of the stack.
name are treated as arguments can be referenced in
the script using  $1 ,  $2 , and so on, like in a
shell script.
- CTRL+], ESCAPE Abort command-line entry started with  / ,  : ,  ;
- , or  | .
+ CTRL+], ESCAPE Abort command-line entry started with  / ,  : ,
+  ; , or  | .
- ▌Note: The regular expression format used by lnav is PCRE[1]
+ ▌Note: The regular expression format used by lnav is ]8;;http://perldoc.perl.org/perlre.html\PCRE]8;;\[1]
▌(Perl-Compatible Regular Expressions).
▌ ▌[1] - http://perldoc.perl.org/perlre.html
@@ -471,14 +467,14 @@ mouse to mark lines of text and move the view by grabbing the
scrollbar.
NOTE: You need to manually enable this feature by setting the LNAV_EXP
-environment variable to "mouse". F2 toggles mouse support.
+environment variable to "mouse".  F2  toggles mouse support.
-SQL Queries (experimental)
+Log Analysis
Lnav has support for performing SQL queries on log files using the
-Sqlite3 "virtual" table feature. For all supported log file types,
+SQLite3 "virtual" table feature. For all supported log file types,
lnav will create tables that can be queried using the subset of SQL
-that is supported by Sqlite3. For example, to get the top ten URLs
+that is supported by SQLite3. For example, to get the top ten URLs
being accessed in any loaded Apache log files, you can execute:
▌;SELECT cs_uri_stem, count(*) AS total FROM access_log 
@@ -542,8 +538,8 @@ structured.
log_procname The name of the process that sent the message.
log_pid The process ID of the process that sent the
message.
- •  access_log  (The column names are the same as those in
- the Microsoft LogParser tool.)
+ •  access_log  (The column names are the same as those
+ in the Microsoft LogParser tool.)
Column Description
══════════════════════════════════════════════════════════
@@ -579,6 +575,37 @@ example of a top ten query into the "/tmp/topten.db" file, you can do:
▌ FROM access_log GROUP BY cs_uri_stem ORDER BY total DESC 
▌ LIMIT 10; 
+PRQL Support
+
+The Pipelined Relational Query Language ]8;;https://prql-lang.org\(PRQL)]8;;\[1] is an alternative
+database query language that compiles to SQL. The main advantage of
+PRQL, in the context of lnav, is that it is easier to work with
+interactively compared to SQL. For example, lnav can provide previews
+of different stages of the pipeline and provide more accurate
+tab-completions for the columns in the result set.
+
+ ▌[1] - https://prql-lang.org
+
+You can execute a PRQL query in the SQL prompt. A PRQL query starts
+with the  from  keyword that specifies the table to use as a data
+source. The next stage of a pipeline is started by entering a pipe
+symbol ( | ) followed by a ]8;;https://prql-lang.org/book/reference/stdlib/transforms/index.html\PRQL transform]8;;\[1]. As you build the query
+in the prompt, lnav will display any relevant help and preview for the
+current and previous stages of the pipeline.
+
+ ▌[1] - https://prql-lang.org/book/reference/stdlib/transforms/index.html
+
+Using the top ten URLs query from earlier as an example, the PRQL
+version would be as follows:
+
+ ▌;from access_log | stats.count_by cs_uri_stem | take 10 
+
+The first stage selects the data source, the web  access_log  table in
+this case. The  stats.count_by  transform is a convenience provided
+by lnav that groups by the given column, counts the rows in each
+group, and sorts by count in descending order. The  take 10 turns
+into the  LIMIT 10 .
+
Dynamic logline Table (experimental)
(NOTE: This feature is still very new and not completely reliable yet,
@@ -702,7 +729,7 @@ For support questions, email:
Parameter
msg The message to display
See Also
- :echo, :eval, :export-session-to, :rebuild, :redirect-to,
+ :cd, :echo, :eval, :export-session-to, :rebuild, :redirect-to, :sh,
:write-csv-to, :write-json-to, :write-jsonlines-to, :write-raw-to,
:write-screen-to, :write-table-to, :write-to, :write-view-to
Example
@@ -711,26 +738,53 @@ For support questions, email:
+:annotate
+══════════════════════════════════════════════════════════════════════
+ Analyze the focused log message and attach annotations
+See Also
+ :comment, :tag
+
:append-to path
══════════════════════════════════════════════════════════════════════
Append marked lines in the current view to the given file
Parameter
path The path to the file to append to
See Also
- :echo, :export-session-to, :pipe-line-to, :pipe-to, :redirect-to,
- :write-csv-to, :write-json-to, :write-jsonlines-to, :write-raw-to,
- :write-screen-to, :write-table-to, :write-to, :write-view-to, echoln()
+ .dump, .read, :echo, :export-session-to, :pipe-line-to, :pipe-to,
+ :redirect-to, :write-csv-to, :write-json-to, :write-jsonlines-to,
+ :write-raw-to, :write-screen-to, :write-table-to, :write-to,
+ :write-view-to, echoln()
Example
#1 To append marked lines to the file /tmp/interesting-lines.txt:
:append-to /tmp/interesting-lines.txt 
+:cd dir
+══════════════════════════════════════════════════════════════════════
+ Change the current directory
+Parameter
+ dir The new current directory
+See Also
+ :alt-msg, :echo, :eval, :export-session-to, :rebuild, :redirect-to,
+ :sh, :write-csv-to, :write-json-to, :write-jsonlines-to, :write-raw-to,
+ :write-screen-to, :write-table-to, :write-to, :write-view-to
+
:clear-comment
══════════════════════════════════════════════════════════════════════
Clear the comment attached to the top log line
See Also
- :comment, :tag
+ :annotate, :comment, :tag
+
+:clear-file-timezone pattern
+══════════════════════════════════════════════════════════════════════
+ Clear the timezone setting for the focused file or the given glob
+ pattern.
+Parameter
+ pattern The glob pattern to match against files that
+ should no longer use this timezone
+See Also
+ :set-file-timezone
:clear-filter-expr
══════════════════════════════════════════════════════════════════════
@@ -764,20 +818,24 @@ For support questions, email:
Clear the partition the top line is a part of
-:close
+:close path
══════════════════════════════════════════════════════════════════════
- Close the top file in the view
+ Close the given file(s) or the top file in the view
+Parameter
+ path A path or glob pattern that specifies the files to
+ close
:comment text
══════════════════════════════════════════════════════════════════════
- Attach a comment to the top log line. The comment will be displayed
- right below the log message it is associated with. The comment can
- be formatted using markdown and you can add new-lines with '\n'.
+ Attach a comment to the top log line. The comment will be
+ displayed right below the log message it is associated with. The
+ comment can be formatted using markdown and you can add new-lines
+ with '\n'.
Parameter
text The comment text
See Also
- :clear-comment, :tag
+ :annotate, :clear-comment, :tag
Example
#1 To add the comment 'This is where it all went wrong' to the top line:
:comment This is where it all went wrong 
@@ -803,9 +861,17 @@ For support questions, email:
+:convert-time-to zone
+══════════════════════════════════════════════════════════════════════
+ Convert the focused timestamp to the given timezone
+Parameter
+ zone The timezone name
+
+
:create-logline-table table-name
══════════════════════════════════════════════════════════════════════
- Create an SQL table using the top line of the log view as a template
+ Create an SQL table using the top line of the log view as a
+ template
Parameter
table-name The name for the new table
See Also
@@ -823,8 +889,8 @@ For support questions, email:
Create an SQL table based on a regex search
Parameters
table-name The name of the table to create
- pattern The regular expression used to capture the
- table columns. If not given, the current search
+ pattern The regular expression used to capture
+ the table columns. If not given, the current search
pattern is used.
See Also
:create-logline-table, :create-logline-table, :delete-search-table,
@@ -834,14 +900,14 @@ For support questions, email:
Example
#1 To create a table named 'task_durations' that matches log messages with the pattern
'duration=(?<duration>\d+)':
- :create-search-table task_durations duration=(?<duration>\d+)
+ :create-search-table task_durations duration=(?<duration>\d+)
-:current-time
+:current-time
══════════════════════════════════════════════════════════════════════
- Print the current time in human-readable form and seconds since the
- epoch
+ Print the current time in human-readable form and seconds since
+ the epoch
:delete-filter pattern
@@ -896,7 +962,7 @@ For support questions, email:
Parameter
tag The tags to delete
See Also
- :comment, :tag
+ :annotate, :comment, :tag
Example
#1 To remove the tags '#BUG123' and '#needs-review' from all log lines:
:delete-tags #BUG123 #needs-review 
@@ -934,12 +1000,13 @@ For support questions, email:
-n Do not print a line-feed at the end of the output
msg The message to display
See Also
- :alt-msg, :append-to, :eval, :export-session-to, :export-session-to,
- :pipe-line-to, :pipe-to, :rebuild, :redirect-to, :redirect-to,
- :write-csv-to, :write-csv-to, :write-json-to, :write-json-to,
- :write-jsonlines-to, :write-jsonlines-to, :write-raw-to, :write-raw-to,
- :write-screen-to, :write-screen-to, :write-table-to, :write-table-to,
- :write-to, :write-to, :write-view-to, :write-view-to, echoln()
+ .dump, .read, :alt-msg, :append-to, :cd, :eval, :export-session-to,
+ :export-session-to, :pipe-line-to, :pipe-to, :rebuild, :redirect-to,
+ :redirect-to, :sh, :write-csv-to, :write-csv-to, :write-json-to,
+ :write-json-to, :write-jsonlines-to, :write-jsonlines-to,
+ :write-raw-to, :write-raw-to, :write-screen-to, :write-screen-to,
+ :write-table-to, :write-table-to, :write-to, :write-to, :write-view-to,
+ :write-view-to, echoln()
Example
#1 To output 'Hello, World!':
:echo Hello, World! 
@@ -972,9 +1039,10 @@ For support questions, email:
Evaluate the given command/query after doing environment variable
substitution
Parameter
- command The command or query to perform substitution on.
+ command The command or query to perform substitution
+ on.
See Also
- :alt-msg, :echo, :export-session-to, :rebuild, :redirect-to,
+ :alt-msg, :cd, :echo, :export-session-to, :rebuild, :redirect-to, :sh,
:write-csv-to, :write-json-to, :write-jsonlines-to, :write-raw-to,
:write-screen-to, :write-table-to, :write-to, :write-view-to
Example
@@ -985,17 +1053,17 @@ For support questions, email:
:export-session-to path
══════════════════════════════════════════════════════════════════════
- Export the current lnav state to an executable lnav script file that
- contains the commands needed to restore the current session
+ Export the current lnav state to an executable lnav script file
+ that contains the commands needed to restore the current session
Parameter
path The path to the file to write
See Also
- :alt-msg, :append-to, :echo, :echo, :eval, :pipe-line-to, :pipe-to,
- :rebuild, :redirect-to, :redirect-to, :write-csv-to, :write-csv-to,
- :write-json-to, :write-json-to, :write-jsonlines-to,
- :write-jsonlines-to, :write-raw-to, :write-raw-to, :write-screen-to,
- :write-screen-to, :write-table-to, :write-table-to, :write-to,
- :write-to, :write-view-to, :write-view-to, echoln()
+ .dump, .read, :alt-msg, :append-to, :cd, :echo, :echo, :eval,
+ :pipe-line-to, :pipe-to, :rebuild, :redirect-to, :redirect-to, :sh,
+ :write-csv-to, :write-csv-to, :write-json-to, :write-json-to,
+ :write-jsonlines-to, :write-jsonlines-to, :write-raw-to, :write-raw-to,
+ :write-screen-to, :write-screen-to, :write-table-to, :write-table-to,
+ :write-to, :write-to, :write-view-to, :write-view-to, echoln()
:filter-expr expr
══════════════════════════════════════════════════════════════════════
@@ -1035,8 +1103,8 @@ For support questions, email:
:filter-out pattern
══════════════════════════════════════════════════════════════════════
- Remove lines that match the given regular expression in the current
- view
+ Remove lines that match the given regular expression in the
+ current view
Parameter
pattern The regular expression to match
See Also
@@ -1056,7 +1124,8 @@ For support questions, email:
number, percent into the file,
timestamp, or an anchor in a text file
See Also
- :next-location, :next-mark, :prev-location, :prev-mark, :relative-goto
+ :next-location, :next-mark, :next-section, :prev-location, :prev-mark,
+ :prev-section, :relative-goto
Examples
#1 To go to line 22:
:goto 22 
@@ -1102,7 +1171,7 @@ For support questions, email:
:hide-file path
══════════════════════════════════════════════════════════════════════
- Hide the given file(s) and skip indexing until it is shown again.
+ Hide the given file(s) and skip indexing until it is shown again.
If no path is given, the current file in the view is hidden
Parameter
path A path or glob pattern that specifies the files to
@@ -1154,8 +1223,8 @@ For support questions, email:
:highlight pattern
══════════════════════════════════════════════════════════════════════
- Add coloring to log messages fragments that match the given regular
- expression
+ Add coloring to log messages fragments that match the given
+ regular expression
Parameter
pattern The regular expression to match
See Also
@@ -1196,23 +1265,31 @@ For support questions, email:
══════════════════════════════════════════════════════════════════════
Move to the next position in the location history
See Also
- :goto, :next-mark, :prev-location, :prev-mark, :relative-goto
+ :goto, :next-mark, :next-section, :prev-location, :prev-mark,
+ :prev-section, :relative-goto
:next-mark type1 [... typeN]
══════════════════════════════════════════════════════════════════════
Move to the next bookmark of the given type in the current view
Parameter
- type The type of bookmark -- error, warning, search, user,
- file, meta
+ type The type of bookmark -- error, warning, search,
+ user, file, meta
See Also
- :goto, :hide-unmarked-lines, :mark, :next-location, :prev-location,
- :prev-mark, :prev-mark, :relative-goto
+ :goto, :hide-unmarked-lines, :mark, :next-location, :next-section,
+ :prev-location, :prev-mark, :prev-mark, :prev-section, :relative-goto
Example
#1 To go to the next error:
:next-mark error 
+:next-section
+══════════════════════════════════════════════════════════════════════
+ Move to the next section in the document
+See Also
+ :goto, :next-location, :next-mark, :prev-location, :prev-mark,
+ :prev-section, :relative-goto
+
:open path1 [... pathN]
══════════════════════════════════════════════════════════════════════
Open the given file(s) in lnav. Opening files on machines
@@ -1246,13 +1323,15 @@ For support questions, email:
:pipe-line-to shell-cmd
══════════════════════════════════════════════════════════════════════
- Pipe the top line to the given shell command
+ Pipe the focused line to the given shell command. Any fields
+ defined by the format will be set as environment variables.
Parameter
shell-cmd The shell command-line to execute
See Also
- :append-to, :echo, :export-session-to, :pipe-to, :redirect-to,
- :write-csv-to, :write-json-to, :write-jsonlines-to, :write-raw-to,
- :write-screen-to, :write-table-to, :write-to, :write-view-to, echoln()
+ .dump, .read, :append-to, :echo, :export-session-to, :pipe-to,
+ :redirect-to, :write-csv-to, :write-json-to, :write-jsonlines-to,
+ :write-raw-to, :write-screen-to, :write-table-to, :write-to,
+ :write-view-to, echoln()
Example
#1 To write the top line to 'sed' for processing:
:pipe-line-to sed -e 's/foo/bar/g' 
@@ -1265,9 +1344,10 @@ For support questions, email:
Parameter
shell-cmd The shell command-line to execute
See Also
- :append-to, :echo, :export-session-to, :pipe-line-to, :redirect-to,
- :write-csv-to, :write-json-to, :write-jsonlines-to, :write-raw-to,
- :write-screen-to, :write-table-to, :write-to, :write-view-to, echoln()
+ .dump, .read, :append-to, :echo, :export-session-to, :pipe-line-to,
+ :redirect-to, :write-csv-to, :write-json-to, :write-jsonlines-to,
+ :write-raw-to, :write-screen-to, :write-table-to, :write-to,
+ :write-view-to, echoln()
Example
#1 To write marked lines to 'sed' for processing:
:pipe-to sed -e s/foo/bar/g 
@@ -1278,23 +1358,33 @@ For support questions, email:
══════════════════════════════════════════════════════════════════════
Move to the previous position in the location history
See Also
- :goto, :next-location, :next-mark, :prev-mark, :relative-goto
+ :goto, :next-location, :next-mark, :next-section, :prev-mark,
+ :prev-section, :relative-goto
:prev-mark type1 [... typeN]
══════════════════════════════════════════════════════════════════════
- Move to the previous bookmark of the given type in the current view
+ Move to the previous bookmark of the given type in the current
+ view
Parameter
- type The type of bookmark -- error, warning, search, user,
- file, meta
+ type The type of bookmark -- error, warning, search,
+ user, file, meta
See Also
:goto, :hide-unmarked-lines, :mark, :next-location, :next-mark,
- :next-mark, :prev-location, :relative-goto
+ :next-mark, :next-section, :prev-location, :prev-section,
+ :relative-goto
Example
#1 To go to the previous error:
:prev-mark error 
+:prev-section
+══════════════════════════════════════════════════════════════════════
+ Move to the previous section in the document
+See Also
+ :goto, :next-location, :next-mark, :next-section, :prev-location,
+ :prev-mark, :relative-goto
+
:prompt type [--alt] [prompt] [initial-value]
══════════════════════════════════════════════════════════════════════
Open the given prompt
@@ -1304,8 +1394,9 @@ For support questions, email:
--alt Perform the alternate action for
this prompt by default
prompt The prompt to display
- initial-value The initial value to fill in for the
- prompt
+ Values: breadcrumb|command|script|search|sql
+ initial-value The initial value to fill in for
+ the prompt
Examples
#1 To open the command prompt with 'filter-in' already filled in:
@@ -1336,7 +1427,7 @@ For support questions, email:
══════════════════════════════════════════════════════════════════════
Forcefully rebuild file indexes
See Also
- :alt-msg, :echo, :eval, :export-session-to, :redirect-to,
+ :alt-msg, :cd, :echo, :eval, :export-session-to, :redirect-to, :sh,
:write-csv-to, :write-json-to, :write-jsonlines-to, :write-raw-to,
:write-screen-to, :write-table-to, :write-to, :write-view-to
@@ -1345,15 +1436,16 @@ For support questions, email:
Redirect the output of commands that write to stdout to the given
file
Parameter
- path The path to the file to write. If not specified, the
- current redirect will be cleared
+ path The path to the file to write. If not specified,
+ the current redirect will be cleared
See Also
- :alt-msg, :append-to, :echo, :echo, :eval, :export-session-to,
- :export-session-to, :pipe-line-to, :pipe-to, :rebuild, :write-csv-to,
- :write-csv-to, :write-json-to, :write-json-to, :write-jsonlines-to,
- :write-jsonlines-to, :write-raw-to, :write-raw-to, :write-screen-to,
- :write-screen-to, :write-table-to, :write-table-to, :write-to,
- :write-to, :write-view-to, :write-view-to, echoln()
+ .dump, .read, :alt-msg, :append-to, :cd, :echo, :echo, :eval,
+ :export-session-to, :export-session-to, :pipe-line-to, :pipe-to,
+ :rebuild, :sh, :write-csv-to, :write-csv-to, :write-json-to,
+ :write-json-to, :write-jsonlines-to, :write-jsonlines-to,
+ :write-raw-to, :write-raw-to, :write-screen-to, :write-screen-to,
+ :write-table-to, :write-table-to, :write-to, :write-to, :write-view-to,
+ :write-view-to, echoln()
Example
#1 To write the output of lnav commands to the file /tmp/script-output.txt:
:redirect-to /tmp/script-output.txt 
@@ -1371,7 +1463,8 @@ For support questions, email:
Parameter
line-count|N% The amount to move the view by.
See Also
- :goto, :next-location, :next-mark, :prev-location, :prev-mark
+ :goto, :next-location, :next-mark, :next-section, :prev-location,
+ :prev-mark, :prev-section
Examples
#1 To move 22 lines down in the view:
:relative-goto +22 
@@ -1418,6 +1511,18 @@ For support questions, email:
+:set-file-timezone zone [pattern]
+══════════════════════════════════════════════════════════════════════
+ Set the timezone to use for log messages that do not include a
+ timezone. The timezone is applied to the focused file or the given
+ glob pattern.
+Parameters
+ zone The timezone name
+ pattern The glob pattern to match against files that
+ should use this timezone
+See Also
+ :clear-file-timezone
+
:set-min-log-level log-level
══════════════════════════════════════════════════════════════════════
Set the minimum log level to display in the log view
@@ -1430,6 +1535,19 @@ For support questions, email:
+:sh --name=<name> cmdline
+══════════════════════════════════════════════════════════════════════
+ Execute the given command-line and display the captured output
+Parameters
+ --name=<name> The name to give to the captured
+ output
+ cmdline The command-line to execute.
+See Also
+ :alt-msg, :cd, :echo, :eval, :export-session-to, :rebuild,
+ :redirect-to, :write-csv-to, :write-json-to, :write-jsonlines-to,
+ :write-raw-to, :write-screen-to, :write-table-to, :write-to,
+ :write-view-to
+
:show-fields field-name1 [... field-nameN]
══════════════════════════════════════════════════════════════════════
Show log message fields that were previously hidden
@@ -1487,8 +1605,8 @@ For support questions, email:
:summarize column-name
══════════════════════════════════════════════════════════════════════
- Execute a SQL query that computes the characteristics of the values
- in the given column
+ Execute a SQL query that computes the characteristics of the
+ values in the given column
Parameter
column-name The name of the column to analyze.
@@ -1516,7 +1634,7 @@ For support questions, email:
Parameter
tag The tags to attach
See Also
- :comment, :delete-tags, :untag
+ :annotate, :comment, :delete-tags, :untag
Example
#1 To add the tags '#BUG123' and '#needs-review' to the top line:
:tag #BUG123 #needs-review 
@@ -1563,7 +1681,7 @@ For support questions, email:
Parameter
tag The tags to detach
See Also
- :comment, :tag
+ :annotate, :comment, :tag
Example
#1 To remove the tags '#BUG123' and '#needs-review' from the top line:
:untag #BUG123 #needs-review 
@@ -1577,11 +1695,11 @@ For support questions, email:
--anonymize Anonymize the table contents
path The path to the file to write
See Also
- :alt-msg, :append-to, :create-logline-table, :create-search-table,
- :echo, :echo, :eval, :export-session-to, :export-session-to,
- :pipe-line-to, :pipe-to, :rebuild, :redirect-to, :redirect-to,
- :write-csv-to, :write-csv-to, :write-csv-to, :write-json-to,
- :write-json-to, :write-json-to, :write-jsonlines-to,
+ .dump, .read, :alt-msg, :append-to, :cd, :create-logline-table,
+ :create-search-table, :echo, :echo, :eval, :export-session-to,
+ :export-session-to, :pipe-line-to, :pipe-to, :rebuild, :redirect-to,
+ :redirect-to, :sh, :write-csv-to, :write-csv-to, :write-csv-to,
+ :write-json-to, :write-json-to, :write-json-to, :write-jsonlines-to,
:write-jsonlines-to, :write-jsonlines-to, :write-raw-to, :write-raw-to,
:write-raw-to, :write-screen-to, :write-screen-to, :write-screen-to,
:write-to, :write-to, :write-view-to, :write-view-to, :write-view-to,
@@ -1599,14 +1717,15 @@ For support questions, email:
--anonymize Anonymize the row contents
path The path to the file to write
See Also
- :alt-msg, :append-to, :create-logline-table, :create-search-table,
- :echo, :echo, :eval, :export-session-to, :export-session-to,
- :pipe-line-to, :pipe-to, :rebuild, :redirect-to, :redirect-to,
- :write-json-to, :write-json-to, :write-json-to, :write-jsonlines-to,
- :write-jsonlines-to, :write-jsonlines-to, :write-raw-to, :write-raw-to,
- :write-raw-to, :write-screen-to, :write-screen-to, :write-screen-to,
- :write-table-to, :write-table-to, :write-table-to, :write-to,
- :write-to, :write-view-to, :write-view-to, :write-view-to, echoln()
+ .dump, .read, :alt-msg, :append-to, :cd, :create-logline-table,
+ :create-search-table, :echo, :echo, :eval, :export-session-to,
+ :export-session-to, :pipe-line-to, :pipe-to, :rebuild, :redirect-to,
+ :redirect-to, :sh, :write-json-to, :write-json-to, :write-json-to,
+ :write-jsonlines-to, :write-jsonlines-to, :write-jsonlines-to,
+ :write-raw-to, :write-raw-to, :write-raw-to, :write-screen-to,
+ :write-screen-to, :write-screen-to, :write-table-to, :write-table-to,
+ :write-table-to, :write-to, :write-to, :write-view-to, :write-view-to,
+ :write-view-to, echoln()
Example
#1 To write SQL results as CSV to /tmp/table.csv:
:write-csv-to /tmp/table.csv 
@@ -1620,14 +1739,15 @@ For support questions, email:
--anonymize Anonymize the JSON values
path The path to the file to write
See Also
- :alt-msg, :append-to, :create-logline-table, :create-search-table,
- :echo, :echo, :eval, :export-session-to, :export-session-to,
- :pipe-line-to, :pipe-to, :rebuild, :redirect-to, :redirect-to,
- :write-csv-to, :write-csv-to, :write-csv-to, :write-jsonlines-to,
- :write-jsonlines-to, :write-jsonlines-to, :write-raw-to, :write-raw-to,
- :write-raw-to, :write-screen-to, :write-screen-to, :write-screen-to,
- :write-table-to, :write-table-to, :write-table-to, :write-to,
- :write-to, :write-view-to, :write-view-to, :write-view-to, echoln()
+ .dump, .read, :alt-msg, :append-to, :cd, :create-logline-table,
+ :create-search-table, :echo, :echo, :eval, :export-session-to,
+ :export-session-to, :pipe-line-to, :pipe-to, :rebuild, :redirect-to,
+ :redirect-to, :sh, :write-csv-to, :write-csv-to, :write-csv-to,
+ :write-jsonlines-to, :write-jsonlines-to, :write-jsonlines-to,
+ :write-raw-to, :write-raw-to, :write-raw-to, :write-screen-to,
+ :write-screen-to, :write-screen-to, :write-table-to, :write-table-to,
+ :write-table-to, :write-to, :write-to, :write-view-to, :write-view-to,
+ :write-view-to, echoln()
Example
#1 To write SQL results as JSON to /tmp/table.json:
:write-json-to /tmp/table.json 
@@ -1641,14 +1761,15 @@ For support questions, email:
--anonymize Anonymize the JSON values
path The path to the file to write
See Also
- :alt-msg, :append-to, :create-logline-table, :create-search-table,
- :echo, :echo, :eval, :export-session-to, :export-session-to,
- :pipe-line-to, :pipe-to, :rebuild, :redirect-to, :redirect-to,
- :write-csv-to, :write-csv-to, :write-csv-to, :write-json-to,
- :write-json-to, :write-json-to, :write-raw-to, :write-raw-to,
- :write-raw-to, :write-screen-to, :write-screen-to, :write-screen-to,
- :write-table-to, :write-table-to, :write-table-to, :write-to,
- :write-to, :write-view-to, :write-view-to, :write-view-to, echoln()
+ .dump, .read, :alt-msg, :append-to, :cd, :create-logline-table,
+ :create-search-table, :echo, :echo, :eval, :export-session-to,
+ :export-session-to, :pipe-line-to, :pipe-to, :rebuild, :redirect-to,
+ :redirect-to, :sh, :write-csv-to, :write-csv-to, :write-csv-to,
+ :write-json-to, :write-json-to, :write-json-to, :write-raw-to,
+ :write-raw-to, :write-raw-to, :write-screen-to, :write-screen-to,
+ :write-screen-to, :write-table-to, :write-table-to, :write-table-to,
+ :write-to, :write-to, :write-view-to, :write-view-to, :write-view-to,
+ echoln()
Example
#1 To write SQL results as JSON Lines to /tmp/table.json:
:write-jsonlines-to /tmp/table.json 
@@ -1661,16 +1782,16 @@ For support questions, email:
messages to the file. In the DB view, the contents of the cells are
written to the output file.
Parameters
- --view={log,db} The view to use as the source of
- data
+ --view={log,db} The view to use as the source
+ of data
--anonymize Anonymize the lines
path The path to the file to write
See Also
- :alt-msg, :append-to, :create-logline-table, :create-search-table,
- :echo, :echo, :eval, :export-session-to, :export-session-to,
- :pipe-line-to, :pipe-to, :rebuild, :redirect-to, :redirect-to,
- :write-csv-to, :write-csv-to, :write-csv-to, :write-json-to,
- :write-json-to, :write-json-to, :write-jsonlines-to,
+ .dump, .read, :alt-msg, :append-to, :cd, :create-logline-table,
+ :create-search-table, :echo, :echo, :eval, :export-session-to,
+ :export-session-to, :pipe-line-to, :pipe-to, :rebuild, :redirect-to,
+ :redirect-to, :sh, :write-csv-to, :write-csv-to, :write-csv-to,
+ :write-json-to, :write-json-to, :write-json-to, :write-jsonlines-to,
:write-jsonlines-to, :write-jsonlines-to, :write-screen-to,
:write-screen-to, :write-screen-to, :write-table-to, :write-table-to,
:write-table-to, :write-to, :write-to, :write-view-to, :write-view-to,
@@ -1689,11 +1810,11 @@ For support questions, email:
--anonymize Anonymize the lines
path The path to the file to write
See Also
- :alt-msg, :append-to, :create-logline-table, :create-search-table,
- :echo, :echo, :eval, :export-session-to, :export-session-to,
- :pipe-line-to, :pipe-to, :rebuild, :redirect-to, :redirect-to,
- :write-csv-to, :write-csv-to, :write-csv-to, :write-json-to,
- :write-json-to, :write-json-to, :write-jsonlines-to,
+ .dump, .read, :alt-msg, :append-to, :cd, :create-logline-table,
+ :create-search-table, :echo, :echo, :eval, :export-session-to,
+ :export-session-to, :pipe-line-to, :pipe-to, :rebuild, :redirect-to,
+ :redirect-to, :sh, :write-csv-to, :write-csv-to, :write-csv-to,
+ :write-json-to, :write-json-to, :write-json-to, :write-jsonlines-to,
:write-jsonlines-to, :write-jsonlines-to, :write-raw-to, :write-raw-to,
:write-raw-to, :write-table-to, :write-table-to, :write-table-to,
:write-to, :write-to, :write-view-to, :write-view-to, :write-view-to,
@@ -1711,11 +1832,11 @@ For support questions, email:
--anonymize Anonymize the table contents
path The path to the file to write
See Also
- :alt-msg, :append-to, :create-logline-table, :create-search-table,
- :echo, :echo, :eval, :export-session-to, :export-session-to,
- :pipe-line-to, :pipe-to, :rebuild, :redirect-to, :redirect-to,
- :write-csv-to, :write-csv-to, :write-csv-to, :write-json-to,
- :write-json-to, :write-json-to, :write-jsonlines-to,
+ .dump, .read, :alt-msg, :append-to, :cd, :create-logline-table,
+ :create-search-table, :echo, :echo, :eval, :export-session-to,
+ :export-session-to, :pipe-line-to, :pipe-to, :rebuild, :redirect-to,
+ :redirect-to, :sh, :write-csv-to, :write-csv-to, :write-csv-to,
+ :write-json-to, :write-json-to, :write-json-to, :write-jsonlines-to,
:write-jsonlines-to, :write-jsonlines-to, :write-raw-to, :write-raw-to,
:write-raw-to, :write-screen-to, :write-screen-to, :write-screen-to,
:write-to, :write-to, :write-view-to, :write-view-to, :write-view-to,
@@ -1733,13 +1854,13 @@ For support questions, email:
--anonymize Anonymize the lines
path The path to the file to write
See Also
- :alt-msg, :append-to, :echo, :echo, :eval, :export-session-to,
- :export-session-to, :pipe-line-to, :pipe-to, :rebuild, :redirect-to,
- :redirect-to, :write-csv-to, :write-csv-to, :write-json-to,
- :write-json-to, :write-jsonlines-to, :write-jsonlines-to,
- :write-raw-to, :write-raw-to, :write-screen-to, :write-screen-to,
- :write-table-to, :write-table-to, :write-view-to, :write-view-to,
- echoln()
+ .dump, .read, :alt-msg, :append-to, :cd, :echo, :echo, :eval,
+ :export-session-to, :export-session-to, :pipe-line-to, :pipe-to,
+ :rebuild, :redirect-to, :redirect-to, :sh, :write-csv-to,
+ :write-csv-to, :write-json-to, :write-json-to, :write-jsonlines-to,
+ :write-jsonlines-to, :write-raw-to, :write-raw-to, :write-screen-to,
+ :write-screen-to, :write-table-to, :write-table-to, :write-view-to,
+ :write-view-to, echoln()
Example
#1 To write marked lines to the file /tmp/interesting-lines.txt:
:write-to /tmp/interesting-lines.txt 
@@ -1754,11 +1875,11 @@ For support questions, email:
--anonymize Anonymize the lines
path The path to the file to write
See Also
- :alt-msg, :append-to, :create-logline-table, :create-search-table,
- :echo, :echo, :eval, :export-session-to, :export-session-to,
- :pipe-line-to, :pipe-to, :rebuild, :redirect-to, :redirect-to,
- :write-csv-to, :write-csv-to, :write-csv-to, :write-json-to,
- :write-json-to, :write-json-to, :write-jsonlines-to,
+ .dump, .read, :alt-msg, :append-to, :cd, :create-logline-table,
+ :create-search-table, :echo, :echo, :eval, :export-session-to,
+ :export-session-to, :pipe-line-to, :pipe-to, :rebuild, :redirect-to,
+ :redirect-to, :sh, :write-csv-to, :write-csv-to, :write-csv-to,
+ :write-json-to, :write-json-to, :write-json-to, :write-jsonlines-to,
:write-jsonlines-to, :write-jsonlines-to, :write-raw-to, :write-raw-to,
:write-raw-to, :write-screen-to, :write-screen-to, :write-screen-to,
:write-table-to, :write-table-to, :write-table-to, :write-to,
@@ -1864,13 +1985,13 @@ For support questions, email:
See Also
char(), charindex(), decode(), encode(), endswith(), extract(),
group_concat(), group_spooky_hash(), gunzip(), gzip(),
- humanize_duration(), humanize_file_size(), instr(), leftstr(),
- length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
- parse_url(), printf(), proper(), regexp_capture(),
+ humanize_duration(), humanize_file_size(), humanize_id(), instr(),
+ leftstr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(),
+ padr(), parse_url(), printf(), proper(), regexp_capture(),
regexp_capture_into_json(), regexp_match(), regexp_replace(),
replace(), replicate(), reverse(), rightstr(), rtrim(), sparkline(),
- spooky_hash(), startswith(), strfilter(), substr(), trim(), unicode(),
- unparse_url(), upper(), xpath()
+ spooky_hash(), startswith(), strfilter(), substr(), timezone(), trim(),
+ unicode(), unparse_url(), upper(), xpath()
Example
#1 To anonymize an IP address:
;SELECT anonymize('Hello, 192.168.1.2') 
@@ -2042,8 +2163,8 @@ For support questions, email:
changes()
══════════════════════════════════════════════════════════════════════
- The number of database rows that were changed, inserted, or deleted
- by the most recent statement.
+ The number of database rows that were changed, inserted, or
+ deleted by the most recent statement.
char(X, ...)
@@ -2055,16 +2176,16 @@ For support questions, email:
See Also
anonymize(), charindex(), decode(), encode(), endswith(), extract(),
group_concat(), group_spooky_hash(), gunzip(), gzip(),
- humanize_duration(), humanize_file_size(), instr(), leftstr(),
- length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
- parse_url(), printf(), proper(), regexp_capture(),
+ humanize_duration(), humanize_file_size(), humanize_id(), instr(),
+ leftstr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(),
+ padr(), parse_url(), printf(), proper(), regexp_capture(),
regexp_capture_into_json(), regexp_match(), regexp_replace(),
replace(), replicate(), reverse(), rightstr(), rtrim(), sparkline(),
- spooky_hash(), startswith(), strfilter(), substr(), trim(), unicode(),
- unparse_url(), upper(), xpath()
+ spooky_hash(), startswith(), strfilter(), substr(), timezone(), trim(),
+ unicode(), unparse_url(), upper(), xpath()
Example
#1 To get a string with the code points 0x48 and 0x49:
- ;SELECT char(0x48, 0x49) 
+ ;SELECT char(0x48, 0x49) 
@@ -2081,13 +2202,13 @@ For support questions, email:
See Also
anonymize(), char(), decode(), encode(), endswith(), extract(),
group_concat(), group_spooky_hash(), gunzip(), gzip(),
- humanize_duration(), humanize_file_size(), instr(), leftstr(),
- length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
- parse_url(), printf(), proper(), regexp_capture(),
+ humanize_duration(), humanize_file_size(), humanize_id(), instr(),
+ leftstr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(),
+ padr(), parse_url(), printf(), proper(), regexp_capture(),
regexp_capture_into_json(), regexp_match(), regexp_replace(),
replace(), replicate(), reverse(), rightstr(), rtrim(), sparkline(),
- spooky_hash(), startswith(), strfilter(), substr(), trim(), unicode(),
- unparse_url(), upper(), xpath()
+ spooky_hash(), startswith(), strfilter(), substr(), timezone(), trim(),
+ unicode(), unparse_url(), upper(), xpath()
Examples
#1 To search for the string 'abc' within 'abcabc' and starting at position 2:
;SELECT charindex('abc', 'abcabc', 2) 
@@ -2145,7 +2266,7 @@ For support questions, email:
value to the left.
See Also
datetime(), humanize_duration(), julianday(), strftime(), time(),
- timediff(), timeslice()
+ timediff(), timeslice(), timezone()
Examples
#1 To get the date portion of the timestamp '2017-01-02T03:04:05':
;SELECT date('2017-01-02T03:04:05') 
@@ -2164,12 +2285,13 @@ For support questions, email:
══════════════════════════════════════════════════════════════════════
Returns the date and time in this format: YYYY-MM-DD HH:MM:SS.
Parameters
- timestring The string to convert to a date with time.
+ timestring The string to convert to a date with
+ time.
modifier A transformation that is applied to the
value to the left.
See Also
date(), humanize_duration(), julianday(), strftime(), time(),
- timediff(), timeslice()
+ timediff(), timeslice(), timezone()
Examples
#1 To get the date and time portion of the timestamp '2017-01-02T03:04:05':
;SELECT datetime('2017-01-02T03:04:05') 
@@ -2195,13 +2317,13 @@ For support questions, email:
See Also
anonymize(), char(), charindex(), encode(), endswith(), extract(),
group_concat(), group_spooky_hash(), gunzip(), gzip(),
- humanize_duration(), humanize_file_size(), instr(), leftstr(),
- length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
- parse_url(), printf(), proper(), regexp_capture(),
+ humanize_duration(), humanize_file_size(), humanize_id(), instr(),
+ leftstr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(),
+ padr(), parse_url(), printf(), proper(), regexp_capture(),
regexp_capture_into_json(), regexp_match(), regexp_replace(),
replace(), replicate(), reverse(), rightstr(), rtrim(), sparkline(),
- spooky_hash(), startswith(), strfilter(), substr(), trim(), unicode(),
- unparse_url(), upper(), xpath()
+ spooky_hash(), startswith(), strfilter(), substr(), timezone(), trim(),
+ unicode(), unparse_url(), upper(), xpath()
Example
#1 To decode the URI-encoded string '%63%75%72%6c':
;SELECT decode('%63%75%72%6c', 'uri') 
@@ -2266,10 +2388,10 @@ For support questions, email:
Parameter
value The value to write to the current output file
See Also
- :append-to, :echo, :export-session-to, :pipe-line-to, :pipe-to,
- :redirect-to, :write-csv-to, :write-json-to, :write-jsonlines-to,
- :write-raw-to, :write-screen-to, :write-table-to, :write-to,
- :write-view-to
+ .dump, .read, :append-to, :echo, :export-session-to, :pipe-line-to,
+ :pipe-to, :redirect-to, :write-csv-to, :write-json-to,
+ :write-jsonlines-to, :write-raw-to, :write-screen-to, :write-table-to,
+ :write-to, :write-view-to
encode(value, algorithm)
══════════════════════════════════════════════════════════════════════
@@ -2281,13 +2403,13 @@ For support questions, email:
See Also
anonymize(), char(), charindex(), decode(), endswith(), extract(),
group_concat(), group_spooky_hash(), gunzip(), gzip(),
- humanize_duration(), humanize_file_size(), instr(), leftstr(),
- length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
- parse_url(), printf(), proper(), regexp_capture(),
+ humanize_duration(), humanize_file_size(), humanize_id(), instr(),
+ leftstr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(),
+ padr(), parse_url(), printf(), proper(), regexp_capture(),
regexp_capture_into_json(), regexp_match(), regexp_replace(),
replace(), replicate(), reverse(), rightstr(), rtrim(), sparkline(),
- spooky_hash(), startswith(), strfilter(), substr(), trim(), unicode(),
- unparse_url(), upper(), xpath()
+ spooky_hash(), startswith(), strfilter(), substr(), timezone(), trim(),
+ unicode(), unparse_url(), upper(), xpath()
Examples
#1 To base64-encode 'Hello, World!':
;SELECT encode('Hello, World!', 'base64') 
@@ -2311,13 +2433,13 @@ For support questions, email:
See Also
anonymize(), char(), charindex(), decode(), encode(), extract(),
group_concat(), group_spooky_hash(), gunzip(), gzip(),
- humanize_duration(), humanize_file_size(), instr(), leftstr(),
- length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
- parse_url(), printf(), proper(), regexp_capture(),
+ humanize_duration(), humanize_file_size(), humanize_id(), instr(),
+ leftstr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(),
+ padr(), parse_url(), printf(), proper(), regexp_capture(),
regexp_capture_into_json(), regexp_match(), regexp_replace(),
replace(), replicate(), reverse(), rightstr(), rtrim(), sparkline(),
- spooky_hash(), startswith(), strfilter(), substr(), trim(), unicode(),
- unparse_url(), upper(), xpath()
+ spooky_hash(), startswith(), strfilter(), substr(), timezone(), trim(),
+ unicode(), unparse_url(), upper(), xpath()
Examples
#1 To test if the string 'notbad.jpg' ends with '.jpg':
;SELECT endswith('notbad.jpg', '.jpg') 
@@ -2352,13 +2474,13 @@ For support questions, email:
See Also
anonymize(), char(), charindex(), decode(), encode(), endswith(),
group_concat(), group_spooky_hash(), gunzip(), gzip(),
- humanize_duration(), humanize_file_size(), instr(), leftstr(),
- length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
- parse_url(), printf(), proper(), regexp_capture(),
+ humanize_duration(), humanize_file_size(), humanize_id(), instr(),
+ leftstr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(),
+ padr(), parse_url(), printf(), proper(), regexp_capture(),
regexp_capture_into_json(), regexp_match(), regexp_replace(),
replace(), replicate(), reverse(), rightstr(), rtrim(), sparkline(),
- spooky_hash(), startswith(), strfilter(), substr(), trim(), unicode(),
- unparse_url(), upper(), xpath()
+ spooky_hash(), startswith(), strfilter(), substr(), timezone(), trim(),
+ unicode(), unparse_url(), upper(), xpath()
Examples
#1 To extract key/value pairs from a string:
;SELECT extract('foo=1 bar=2 name="Rolo Tomassi"') 
@@ -2394,6 +2516,42 @@ For support questions, email:
+fstat(pattern)
+══════════════════════════════════════════════════════════════════════
+ A table-valued function for getting information about file
+ paths/globs
+Parameter
+ pattern The file path or glob pattern to query.
+Results
+ st_parent The parent path of the directory entry
+ st_name The name of the directory entry
+ st_dev The device number
+ st_ino The inode number
+ st_type The type of the entry
+ st_mode The protection mode
+ st_nlink The number of hard links to the entry
+ st_uid The ID of the owning user
+ st_user The user name
+ st_gid The ID of the owning group
+ st_group The group name
+ st_rdev The device type
+ st_size The size of the entry in bytes
+ st_blksize The optimal size for I/O
+ st_blocks Blocks allocated for the file
+ st_atime The last access time
+ st_mtime The last modified time
+ st_ctime The creation time
+ error Error message if there was a problem
+ looking up the entry
+ data The contents of the file
+
+Example
+#1 To read a file and raise an error if there is a problem:
+ ;SELECT ifnull(data, raise_error('cannot read: ' || st_name, error)) FROM
+  fstat('/non-existent')
+
+
+
generate_series(start, stop, [step])
══════════════════════════════════════════════════════════════════════
A table-valued-function that returns the whole numbers between a
@@ -2468,12 +2626,13 @@ For support questions, email:
See Also
anonymize(), char(), charindex(), decode(), encode(), endswith(),
extract(), group_spooky_hash(), gunzip(), gzip(), humanize_duration(),
- humanize_file_size(), instr(), leftstr(), length(), logfmt2json(),
- lower(), ltrim(), padc(), padl(), padr(), parse_url(), printf(),
- proper(), regexp_capture(), regexp_capture_into_json(), regexp_match(),
- regexp_replace(), replace(), replicate(), reverse(), rightstr(),
- rtrim(), sparkline(), spooky_hash(), startswith(), strfilter(),
- substr(), trim(), unicode(), unparse_url(), upper(), xpath()
+ humanize_file_size(), humanize_id(), instr(), leftstr(), length(),
+ logfmt2json(), lower(), ltrim(), padc(), padl(), padr(), parse_url(),
+ printf(), proper(), regexp_capture(), regexp_capture_into_json(),
+ regexp_match(), regexp_replace(), replace(), replicate(), reverse(),
+ rightstr(), rtrim(), sparkline(), spooky_hash(), startswith(),
+ strfilter(), substr(), timezone(), trim(), unicode(), unparse_url(),
+ upper(), xpath()
Examples
#1 To concatenate the values of the column 'ex_procname' from the table
'lnav_example_log':
@@ -2498,12 +2657,13 @@ For support questions, email:
See Also
anonymize(), char(), charindex(), decode(), encode(), endswith(),
extract(), group_concat(), gunzip(), gzip(), humanize_duration(),
- humanize_file_size(), instr(), leftstr(), length(), logfmt2json(),
- lower(), ltrim(), padc(), padl(), padr(), parse_url(), printf(),
- proper(), regexp_capture(), regexp_capture_into_json(), regexp_match(),
- regexp_replace(), replace(), replicate(), reverse(), rightstr(),
- rtrim(), sparkline(), spooky_hash(), startswith(), strfilter(),
- substr(), trim(), unicode(), unparse_url(), upper(), xpath()
+ humanize_file_size(), humanize_id(), instr(), leftstr(), length(),
+ logfmt2json(), lower(), ltrim(), padc(), padl(), padr(), parse_url(),
+ printf(), proper(), regexp_capture(), regexp_capture_into_json(),
+ regexp_match(), regexp_replace(), replace(), replicate(), reverse(),
+ rightstr(), rtrim(), sparkline(), spooky_hash(), startswith(),
+ strfilter(), substr(), timezone(), trim(), unicode(), unparse_url(),
+ upper(), xpath()
Example
#1 To produce a hash of all of the values of 'column1':
;SELECT group_spooky_hash(column1) FROM (VALUES ('abc'), ('123'))
@@ -2518,13 +2678,13 @@ For support questions, email:
See Also
anonymize(), char(), charindex(), decode(), encode(), endswith(),
extract(), group_concat(), group_spooky_hash(), gzip(),
- humanize_duration(), humanize_file_size(), instr(), leftstr(),
- length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
- parse_url(), printf(), proper(), regexp_capture(),
+ humanize_duration(), humanize_file_size(), humanize_id(), instr(),
+ leftstr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(),
+ padr(), parse_url(), printf(), proper(), regexp_capture(),
regexp_capture_into_json(), regexp_match(), regexp_replace(),
replace(), replicate(), reverse(), rightstr(), rtrim(), sparkline(),
- spooky_hash(), startswith(), strfilter(), substr(), trim(), unicode(),
- unparse_url(), upper(), xpath()
+ spooky_hash(), startswith(), strfilter(), substr(), timezone(), trim(),
+ unicode(), unparse_url(), upper(), xpath()
gzip(value, ...)
══════════════════════════════════════════════════════════════════════
@@ -2534,13 +2694,13 @@ For support questions, email:
See Also
anonymize(), char(), charindex(), decode(), encode(), endswith(),
extract(), group_concat(), group_spooky_hash(), gunzip(),
- humanize_duration(), humanize_file_size(), instr(), leftstr(),
- length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
- parse_url(), printf(), proper(), regexp_capture(),
+ humanize_duration(), humanize_file_size(), humanize_id(), instr(),
+ leftstr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(),
+ padr(), parse_url(), printf(), proper(), regexp_capture(),
regexp_capture_into_json(), regexp_match(), regexp_replace(),
replace(), replicate(), reverse(), rightstr(), rtrim(), sparkline(),
- spooky_hash(), startswith(), strfilter(), substr(), trim(), unicode(),
- unparse_url(), upper(), xpath()
+ spooky_hash(), startswith(), strfilter(), substr(), timezone(), trim(),
+ unicode(), unparse_url(), upper(), xpath()
hex(X)
══════════════════════════════════════════════════════════════════════
@@ -2563,14 +2723,14 @@ For support questions, email:
See Also
anonymize(), char(), charindex(), date(), datetime(), decode(),
encode(), endswith(), extract(), group_concat(), group_spooky_hash(),
- gunzip(), gzip(), humanize_file_size(), instr(), julianday(),
- leftstr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(),
- padr(), parse_url(), printf(), proper(), regexp_capture(),
- regexp_capture_into_json(), regexp_match(), regexp_replace(),
- replace(), replicate(), reverse(), rightstr(), rtrim(), sparkline(),
- spooky_hash(), startswith(), strfilter(), strftime(), substr(), time(),
- timediff(), timeslice(), trim(), unicode(), unparse_url(), upper(),
- xpath()
+ gunzip(), gzip(), humanize_file_size(), humanize_id(), instr(),
+ julianday(), leftstr(), length(), logfmt2json(), lower(), ltrim(),
+ padc(), padl(), padr(), parse_url(), printf(), proper(),
+ regexp_capture(), regexp_capture_into_json(), regexp_match(),
+ regexp_replace(), replace(), replicate(), reverse(), rightstr(),
+ rtrim(), sparkline(), spooky_hash(), startswith(), strfilter(),
+ strftime(), substr(), time(), timediff(), timeslice(), timezone(),
+ timezone(), trim(), unicode(), unparse_url(), upper(), xpath()
Examples
#1 To format a duration:
;SELECT humanize_duration(15 * 60) 
@@ -2589,18 +2749,40 @@ For support questions, email:
See Also
anonymize(), char(), charindex(), decode(), encode(), endswith(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
- humanize_duration(), instr(), leftstr(), length(), logfmt2json(),
- lower(), ltrim(), padc(), padl(), padr(), parse_url(), printf(),
- proper(), regexp_capture(), regexp_capture_into_json(), regexp_match(),
- regexp_replace(), replace(), replicate(), reverse(), rightstr(),
- rtrim(), sparkline(), spooky_hash(), startswith(), strfilter(),
- substr(), trim(), unicode(), unparse_url(), upper(), xpath()
+ humanize_duration(), humanize_id(), instr(), leftstr(), length(),
+ logfmt2json(), lower(), ltrim(), padc(), padl(), padr(), parse_url(),
+ printf(), proper(), regexp_capture(), regexp_capture_into_json(),
+ regexp_match(), regexp_replace(), replace(), replicate(), reverse(),
+ rightstr(), rtrim(), sparkline(), spooky_hash(), startswith(),
+ strfilter(), substr(), timezone(), trim(), unicode(), unparse_url(),
+ upper(), xpath()
Example
#1 To format an amount:
;SELECT humanize_file_size(10 * 1024 * 1024) 
+humanize_id(id)
+══════════════════════════════════════════════════════════════════════
+ Colorize the given ID using ANSI escape codes.
+Parameter
+ id The identifier to color
+See Also
+ anonymize(), char(), charindex(), decode(), encode(), endswith(),
+ extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
+ humanize_duration(), humanize_file_size(), instr(), leftstr(),
+ length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
+ parse_url(), printf(), proper(), regexp_capture(),
+ regexp_capture_into_json(), regexp_match(), regexp_replace(),
+ replace(), replicate(), reverse(), rightstr(), rtrim(), sparkline(),
+ spooky_hash(), startswith(), strfilter(), substr(), timezone(), trim(),
+ unicode(), unparse_url(), upper(), xpath()
+Example
+#1 To colorize the ID 'cluster1':
+ ;SELECT humanize_id('cluster1') 
+
+
+
ifnull(X, Y)
══════════════════════════════════════════════════════════════════════
Returns a copy of its first non-NULL argument, or NULL if both
@@ -2626,13 +2808,13 @@ For support questions, email:
See Also
anonymize(), char(), charindex(), decode(), encode(), endswith(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
- humanize_duration(), humanize_file_size(), leftstr(), length(),
- logfmt2json(), lower(), ltrim(), padc(), padl(), padr(), parse_url(),
- printf(), proper(), regexp_capture(), regexp_capture_into_json(),
- regexp_match(), regexp_replace(), replace(), replicate(), reverse(),
- rightstr(), rtrim(), sparkline(), spooky_hash(), startswith(),
- strfilter(), substr(), trim(), unicode(), unparse_url(), upper(),
- xpath()
+ humanize_duration(), humanize_file_size(), humanize_id(), leftstr(),
+ length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
+ parse_url(), printf(), proper(), regexp_capture(),
+ regexp_capture_into_json(), regexp_match(), regexp_replace(),
+ replace(), replicate(), reverse(), rightstr(), rtrim(), sparkline(),
+ spooky_hash(), startswith(), strfilter(), substr(), timezone(), trim(),
+ unicode(), unparse_url(), upper(), xpath()
Example
#1 To test get the position of 'b' in the string 'abc':
;SELECT instr('abc', 'b') 
@@ -2647,8 +2829,11 @@ For support questions, email:
ptr The JSON-Pointer to lookup in the object.
default The default value if the value was not found
See Also
- json_concat(), json_contains(), json_group_array(),
- json_group_object(), yaml_to_json()
+ json(), json_array(), json_array_length(), json_concat(),
+ json_contains(), json_each(), json_extract(), json_group_array(),
+ json_group_object(), json_insert(), json_object(), json_quote(),
+ json_remove(), json_replace(), json_set(), json_tree(), json_type(),
+ json_valid(), yaml_to_json()
Examples
#1 To get the root of a JSON value:
;SELECT jget('1', '') 
@@ -2691,9 +2876,65 @@ For support questions, email:
+json(X)
+══════════════════════════════════════════════════════════════════════
+ Verifies that its argument is valid JSON and returns a minified
+ version or throws an error.
+Parameter
+ X The string to interpret as JSON.
+See Also
+ jget(), json_array(), json_array_length(), json_concat(),
+ json_contains(), json_each(), json_extract(), json_group_array(),
+ json_group_object(), json_insert(), json_object(), json_quote(),
+ json_remove(), json_replace(), json_set(), json_tree(), json_type(),
+ json_valid(), yaml_to_json()
+
+json_array(X, ...)
+══════════════════════════════════════════════════════════════════════
+ Constructs a JSON array from its arguments.
+Parameter
+ X The values of the JSON array
+See Also
+ jget(), json(), json_array_length(), json_concat(), json_contains(),
+ json_each(), json_extract(), json_group_array(), json_group_object(),
+ json_insert(), json_object(), json_quote(), json_remove(),
+ json_replace(), json_set(), json_tree(), json_type(), json_valid(),
+ yaml_to_json()
+Examples
+#1 To create an array of all types:
+ ;SELECT json_array(NULL, 1, 2.1, 'three', json_array(4), json_object('five', 'six'))
+
+
+#2 To create an empty array:
+ ;SELECT json_array() 
+
+
+
+json_array_length(X, [P])
+══════════════════════════════════════════════════════════════════════
+ Returns the length of a JSON array.
+Parameters
+ X The JSON object.
+ P The path to the array in 'X'.
+See Also
+ jget(), json(), json_array(), json_concat(), json_contains(),
+ json_each(), json_extract(), json_group_array(), json_group_object(),
+ json_insert(), json_object(), json_quote(), json_remove(),
+ json_replace(), json_set(), json_tree(), json_type(), json_valid(),
+ yaml_to_json()
+Examples
+#1 To get the length of an array:
+ ;SELECT json_array_length('[1, 2, 3]') 
+
+
+#2 To get the length of a nested array:
+ ;SELECT json_array_length('{"arr": [1, 2, 3]}', '$.arr')
+
+
+
json_concat(json, value, ...)
══════════════════════════════════════════════════════════════════════
- Returns an array with the given values concatenated onto the end.
+ Returns an array with the given values concatenated onto the end.
If the initial value is null, the result will be an array with the
given elements. If the initial value is an array, the result will
be an array with the given values at the end. If the initial value
@@ -2703,7 +2944,10 @@ For support questions, email:
json The initial JSON value.
value The value(s) to add to the end of the array.
See Also
- jget(), json_contains(), json_group_array(), json_group_object(),
+ jget(), json(), json_array(), json_array_length(), json_contains(),
+ json_each(), json_extract(), json_group_array(), json_group_object(),
+ json_insert(), json_object(), json_quote(), json_remove(),
+ json_replace(), json_set(), json_tree(), json_type(), json_valid(),
yaml_to_json()
Examples
#1 To append the number 4 to null:
@@ -2726,7 +2970,10 @@ For support questions, email:
json The JSON value to query.
value The value to look for in the first argument
See Also
- jget(), json_concat(), json_group_array(), json_group_object(),
+ jget(), json(), json_array(), json_array_length(), json_concat(),
+ json_each(), json_extract(), json_group_array(), json_group_object(),
+ json_insert(), json_object(), json_quote(), json_remove(),
+ json_replace(), json_set(), json_tree(), json_type(), json_valid(),
yaml_to_json()
Examples
#1 To test if a JSON array contains the number 4:
@@ -2738,13 +2985,69 @@ For support questions, email:
+json_each(X, [P])
+══════════════════════════════════════════════════════════════════════
+ A table-valued-function that returns the children of the top-level
+ JSON value
+Parameters
+ X The JSON value to query
+ P The path to the value to query
+Results
+ key The array index for elements of an array or
+ property names of the object
+ value The value for the current element
+ type The type of the current element
+ atom The SQL value of the element, if it is a
+ primitive type
+ fullkey The path to the current element
+See Also
+ jget(), json(), json_array(), json_array_length(), json_concat(),
+ json_contains(), json_extract(), json_group_array(),
+ json_group_object(), json_insert(), json_object(), json_quote(),
+ json_remove(), json_replace(), json_set(), json_tree(), json_type(),
+ json_valid(), yaml_to_json()
+Example
+#1 To iterate over an array:
+ ;SELECT * FROM json_each('[null,1,"two",{"three":4.5}]')
+
+
+
+json_extract(X, P, ...)
+══════════════════════════════════════════════════════════════════════
+ Returns the value(s) from the given JSON at the given path(s).
+Parameters
+ X The JSON value.
+ P The path to extract.
+See Also
+ jget(), json(), json_array(), json_array_length(), json_concat(),
+ json_contains(), json_each(), json_group_array(), json_group_object(),
+ json_insert(), json_object(), json_quote(), json_remove(),
+ json_replace(), json_set(), json_tree(), json_type(), json_valid(),
+ yaml_to_json()
+Examples
+#1 To get a number:
+ ;SELECT json_extract('{"num": 1}', '$.num') 
+
+
+#2 To get two numbers:
+ ;SELECT json_extract('{"num": 1, "val": 2}', '$.num', '$.val')
+
+
+#3 To get an object:
+ ;SELECT json_extract('{"obj": {"sub": 1}}', '$.obj')
+
+
+
json_group_array(value, ...)
══════════════════════════════════════════════════════════════════════
Collect the given values from a query into a JSON array
Parameter
value The values to append to the array
See Also
- jget(), json_concat(), json_contains(), json_group_object(),
+ jget(), json(), json_array(), json_array_length(), json_concat(),
+ json_contains(), json_each(), json_extract(), json_group_object(),
+ json_insert(), json_object(), json_quote(), json_remove(),
+ json_replace(), json_set(), json_tree(), json_type(), json_valid(),
yaml_to_json()
Examples
#1 To create an array from arguments:
@@ -2763,7 +3066,10 @@ For support questions, email:
name The property name for the value
value The value to add to the object
See Also
- jget(), json_concat(), json_contains(), json_group_array(),
+ jget(), json(), json_array(), json_array_length(), json_concat(),
+ json_contains(), json_each(), json_extract(), json_group_array(),
+ json_insert(), json_object(), json_quote(), json_remove(),
+ json_replace(), json_set(), json_tree(), json_type(), json_valid(),
yaml_to_json()
Examples
#1 To create an object from arguments:
@@ -2775,17 +3081,242 @@ For support questions, email:
+json_insert(X, P, Y)
+══════════════════════════════════════════════════════════════════════
+ Inserts values into a JSON object/array at the given locations, if
+ it does not already exist
+Parameters
+ X The JSON value to update
+ P The path to the insertion point. A '#' array index means
+ append the value
+ Y The value to insert
+See Also
+ jget(), json(), json_array(), json_array_length(), json_concat(),
+ json_contains(), json_each(), json_extract(), json_group_array(),
+ json_group_object(), json_object(), json_quote(), json_remove(),
+ json_replace(), json_set(), json_tree(), json_type(), json_valid(),
+ yaml_to_json()
+Examples
+#1 To append to an array:
+ ;SELECT json_insert('[1, 2]', '$[#]', 3) 
+
+
+#2 To update an object:
+ ;SELECT json_insert('{"a": 1}', '$.b', 2) 
+
+
+#3 To ensure a value is set:
+ ;SELECT json_insert('{"a": 1}', '$.a', 2) 
+
+
+#4 To update multiple values:
+ ;SELECT json_insert('{"a": 1}', '$.b', 2, '$.c', 3)
+
+
+
+json_object(N, V)
+══════════════════════════════════════════════════════════════════════
+ Create a JSON object from the given arguments
+Parameters
+ N The property name
+ V The property value
+See Also
+ jget(), json(), json_array(), json_array_length(), json_concat(),
+ json_contains(), json_each(), json_extract(), json_group_array(),
+ json_group_object(), json_insert(), json_quote(), json_remove(),
+ json_replace(), json_set(), json_tree(), json_type(), json_valid(),
+ yaml_to_json()
+Examples
+#1 To create an object:
+ ;SELECT json_object('a', 1, 'b', 'c') 
+
+
+#2 To create an empty object:
+ ;SELECT json_object() 
+
+
+
+json_quote(X)
+══════════════════════════════════════════════════════════════════════
+ Returns the JSON representation of the given value, if it is not
+ already JSON
+Parameter
+ X The value to convert
+See Also
+ jget(), json(), json_array(), json_array_length(), json_concat(),
+ json_contains(), json_each(), json_extract(), json_group_array(),
+ json_group_object(), json_insert(), json_object(), json_remove(),
+ json_replace(), json_set(), json_tree(), json_type(), json_valid(),
+ yaml_to_json()
+Examples
+#1 To convert a string:
+ ;SELECT json_quote('Hello, World!') 
+
+
+#2 To pass through an existing JSON value:
+ ;SELECT json_quote(json('"Hello, World!"')) 
+
+
+
+json_remove(X, P, ...)
+══════════════════════════════════════════════════════════════════════
+ Removes paths from a JSON value
+Parameters
+ X The JSON value to update
+ P The paths to remove
+See Also
+ jget(), json(), json_array(), json_array_length(), json_concat(),
+ json_contains(), json_each(), json_extract(), json_group_array(),
+ json_group_object(), json_insert(), json_object(), json_quote(),
+ json_replace(), json_set(), json_tree(), json_type(), json_valid(),
+ yaml_to_json()
+Examples
+#1 To remove elements of an array:
+ ;SELECT json_remove('[1,2,3]', '$[1]', '$[1]') 
+
+
+#2 To remove object properties:
+ ;SELECT json_remove('{"a":1,"b":2}', '$.b') 
+
+
+
+json_replace(X, P, Y)
+══════════════════════════════════════════════════════════════════════
+ Replaces existing values in a JSON object/array at the given
+ locations
+Parameters
+ X The JSON value to update
+ P The path to replace
+ Y The new value for the property
+See Also
+ jget(), json(), json_array(), json_array_length(), json_concat(),
+ json_contains(), json_each(), json_extract(), json_group_array(),
+ json_group_object(), json_insert(), json_object(), json_quote(),
+ json_remove(), json_set(), json_tree(), json_type(), json_valid(),
+ yaml_to_json()
+Examples
+#1 To replace an existing value:
+ ;SELECT json_replace('{"a": 1}', '$.a', 2) 
+
+
+#2 To replace a value without creating a new property:
+ ;SELECT json_replace('{"a": 1}', '$.a', 2, '$.b', 3)
+
+
+
+json_set(X, P, Y)
+══════════════════════════════════════════════════════════════════════
+ Inserts or replaces existing values in a JSON object/array at the
+ given locations
+Parameters
+ X The JSON value to update
+ P The path to the insertion point. A '#' array index means
+ append the value
+ Y The value to set
+See Also
+ jget(), json(), json_array(), json_array_length(), json_concat(),
+ json_contains(), json_each(), json_extract(), json_group_array(),
+ json_group_object(), json_insert(), json_object(), json_quote(),
+ json_remove(), json_replace(), json_tree(), json_type(), json_valid(),
+ yaml_to_json()
+Examples
+#1 To replace an existing array element:
+ ;SELECT json_set('[1, 2]', '$[1]', 3) 
+
+
+#2 To replace a value and create a new property:
+ ;SELECT json_set('{"a": 1}', '$.a', 2, '$.b', 3) 
+
+
+
+json_tree(X, [P])
+══════════════════════════════════════════════════════════════════════
+ A table-valued-function that recursively descends through a JSON
+ value
+Parameters
+ X The JSON value to query
+ P The path to the value to query
+Results
+ key The array index for elements of an array or
+ property names of the object
+ value The value for the current element
+ type The type of the current element
+ atom The SQL value of the element, if it is a
+ primitive type
+ fullkey The path to the current element
+ path The path to the container of this element
+See Also
+ jget(), json(), json_array(), json_array_length(), json_concat(),
+ json_contains(), json_each(), json_extract(), json_group_array(),
+ json_group_object(), json_insert(), json_object(), json_quote(),
+ json_remove(), json_replace(), json_set(), json_type(), json_valid(),
+ yaml_to_json()
+Example
+#1 To iterate over an array:
+ ;SELECT key,value,type,atom,fullkey,path FROM
+  json_tree('[null,1,"two",{"three":4.5}]')
+
+
+
+json_type(X, [P])
+══════════════════════════════════════════════════════════════════════
+ Returns the type of a JSON value
+Parameters
+ X The JSON value to query
+ P The path to the value
+See Also
+ jget(), json(), json_array(), json_array_length(), json_concat(),
+ json_contains(), json_each(), json_extract(), json_group_array(),
+ json_group_object(), json_insert(), json_object(), json_quote(),
+ json_remove(), json_replace(), json_set(), json_tree(), json_valid(),
+ yaml_to_json()
+Examples
+#1 To get the type of a value:
+ ;SELECT json_type('[null,1,2.1,"three",{"four":5}]')
+
+
+#2 To get the type of an array element:
+ ;SELECT json_type('[null,1,2.1,"three",{"four":5}]', '$[0]')
+
+
+#3 To get the type of a string:
+ ;SELECT json_type('[null,1,2.1,"three",{"four":5}]', '$[3]')
+
+
+
+json_valid(X)
+══════════════════════════════════════════════════════════════════════
+ Tests if the given value is valid JSON
+Parameter
+ X The value to check
+See Also
+ jget(), json(), json_array(), json_array_length(), json_concat(),
+ json_contains(), json_each(), json_extract(), json_group_array(),
+ json_group_object(), json_insert(), json_object(), json_quote(),
+ json_remove(), json_replace(), json_set(), json_tree(), json_type(),
+ yaml_to_json()
+Examples
+#1 To check an empty string:
+ ;SELECT json_valid('') 
+
+
+#2 To check a string:
+ ;SELECT json_valid('"a"') 
+
+
+
julianday(timestring, modifier, ...)
══════════════════════════════════════════════════════════════════════
Returns the number of days since noon in Greenwich on November 24,
4714 B.C.
Parameters
- timestring The string to convert to a date with time.
+ timestring The string to convert to a date with
+ time.
modifier A transformation that is applied to the
value to the left.
See Also
date(), datetime(), humanize_duration(), strftime(), time(),
- timediff(), timeslice()
+ timediff(), timeslice(), timezone()
Examples
#1 To get the julian day from the timestamp '2017-01-02T03:04:05':
;SELECT julianday('2017-01-02T03:04:05') 
@@ -2802,11 +3333,13 @@ For support questions, email:
lag(expr, [offset], [default])
══════════════════════════════════════════════════════════════════════
- Returns the result of evaluating the expression against the previous
- row in the partition.
+ Returns the result of evaluating the expression against the
+ previous row in the partition.
Parameters
- expr The expression to execute over the previous row
- offset The offset from the current row in the partition
+ expr The expression to execute over the previous
+ row
+ offset The offset from the current row in the
+ partition
default The default value if the previous row does not
exist instead of NULL
See Also
@@ -2821,8 +3354,8 @@ For support questions, email:
last_value(expr)
══════════════════════════════════════════════════════════════════════
- Returns the result of evaluating the expression against the last row
- in the window frame.
+ Returns the result of evaluating the expression against the last
+ row in the window frame.
Parameter
expr The expression to execute over the last row
See Also
@@ -2831,13 +3364,14 @@ For support questions, email:
lead(expr, [offset], [default])
══════════════════════════════════════════════════════════════════════
- Returns the result of evaluating the expression against the next row
- in the partition.
+ Returns the result of evaluating the expression against the next
+ row in the partition.
Parameters
expr The expression to execute over the next row
- offset The offset from the current row in the partition
- default The default value if the next row does not exist
- instead of NULL
+ offset The offset from the current row in the
+ partition
+ default The default value if the next row does not
+ exist instead of NULL
See Also
cume_dist(), dense_rank(), first_value(), lag(), last_value(),
nth_value(), ntile(), percent_rank(), rank(), row_number()
@@ -2852,13 +3386,13 @@ For support questions, email:
See Also
anonymize(), char(), charindex(), decode(), encode(), endswith(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
- humanize_duration(), humanize_file_size(), instr(), length(),
- logfmt2json(), lower(), ltrim(), padc(), padl(), padr(), parse_url(),
- printf(), proper(), regexp_capture(), regexp_capture_into_json(),
- regexp_match(), regexp_replace(), replace(), replicate(), reverse(),
- rightstr(), rtrim(), sparkline(), spooky_hash(), startswith(),
- strfilter(), substr(), trim(), unicode(), unparse_url(), upper(),
- xpath()
+ humanize_duration(), humanize_file_size(), humanize_id(), instr(),
+ length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
+ parse_url(), printf(), proper(), regexp_capture(),
+ regexp_capture_into_json(), regexp_match(), regexp_replace(),
+ replace(), replicate(), reverse(), rightstr(), rtrim(), sparkline(),
+ spooky_hash(), startswith(), strfilter(), substr(), timezone(), trim(),
+ unicode(), unparse_url(), upper(), xpath()
Examples
#1 To get the first character of the string 'abc':
;SELECT leftstr('abc', 1) 
@@ -2878,13 +3412,13 @@ For support questions, email:
See Also
anonymize(), char(), charindex(), decode(), encode(), endswith(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
- humanize_duration(), humanize_file_size(), instr(), leftstr(),
- logfmt2json(), lower(), ltrim(), padc(), padl(), padr(), parse_url(),
- printf(), proper(), regexp_capture(), regexp_capture_into_json(),
- regexp_match(), regexp_replace(), replace(), replicate(), reverse(),
- rightstr(), rtrim(), sparkline(), spooky_hash(), startswith(),
- strfilter(), substr(), trim(), unicode(), unparse_url(), upper(),
- xpath()
+ humanize_duration(), humanize_file_size(), humanize_id(), instr(),
+ leftstr(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
+ parse_url(), printf(), proper(), regexp_capture(),
+ regexp_capture_into_json(), regexp_match(), regexp_replace(),
+ replace(), replicate(), reverse(), rightstr(), rtrim(), sparkline(),
+ spooky_hash(), startswith(), strfilter(), substr(), timezone(), trim(),
+ unicode(), unparse_url(), upper(), xpath()
Example
#1 To get the length of the string 'abc':
;SELECT length('abc') 
@@ -2895,12 +3429,12 @@ For support questions, email:
══════════════════════════════════════════════════════════════════════
Match a string against a pattern
Parameters
- pattern The pattern to match. A percent symbol (%) will
- match zero or more characters and an underscore (_) will
- match a single character.
+ pattern The pattern to match. A percent symbol (%)
+ will match zero or more characters and an underscore (_)
+ will match a single character.
str The string to match
- escape The escape character that can be used to prefix
- a literal percent or underscore in the pattern.
+ escape The escape character that can be used to
+ prefix a literal percent or underscore in the pattern.
Examples
#1 To test if the string 'aabcc' contains the letter 'b':
@@ -2981,6 +3515,11 @@ For support questions, email:
+log_msg_line()
+══════════════════════════════════════════════════════════════════════
+ Return the starting line number of the focused log message.
+
+
log_top_datetime()
══════════════════════════════════════════════════════════════════════
Return the timestamp of the line at the top of the log view.
@@ -2988,7 +3527,7 @@ For support questions, email:
log_top_line()
══════════════════════════════════════════════════════════════════════
- Return the line number at the top of the log view.
+ Return the number of the focused line of the log view.
logfmt2json(str)
@@ -2999,13 +3538,13 @@ For support questions, email:
See Also
anonymize(), char(), charindex(), decode(), encode(), endswith(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
- humanize_duration(), humanize_file_size(), instr(), leftstr(),
- length(), lower(), ltrim(), padc(), padl(), padr(), parse_url(),
- printf(), proper(), regexp_capture(), regexp_capture_into_json(),
- regexp_match(), regexp_replace(), replace(), replicate(), reverse(),
- rightstr(), rtrim(), sparkline(), spooky_hash(), startswith(),
- strfilter(), substr(), trim(), unicode(), unparse_url(), upper(),
- xpath()
+ humanize_duration(), humanize_file_size(), humanize_id(), instr(),
+ leftstr(), length(), lower(), ltrim(), padc(), padl(), padr(),
+ parse_url(), printf(), proper(), regexp_capture(),
+ regexp_capture_into_json(), regexp_match(), regexp_replace(),
+ replace(), replicate(), reverse(), rightstr(), rtrim(), sparkline(),
+ spooky_hash(), startswith(), strfilter(), substr(), timezone(), trim(),
+ unicode(), unparse_url(), upper(), xpath()
Example
#1 To extract key/value pairs from a log message:
;SELECT logfmt2json('foo=1 bar=2 name="Rolo Tomassi"')
@@ -3021,13 +3560,13 @@ For support questions, email:
See Also
anonymize(), char(), charindex(), decode(), encode(), endswith(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
- humanize_duration(), humanize_file_size(), instr(), leftstr(),
- length(), logfmt2json(), ltrim(), padc(), padl(), padr(), parse_url(),
- printf(), proper(), regexp_capture(), regexp_capture_into_json(),
- regexp_match(), regexp_replace(), replace(), replicate(), reverse(),
- rightstr(), rtrim(), sparkline(), spooky_hash(), startswith(),
- strfilter(), substr(), trim(), unicode(), unparse_url(), upper(),
- xpath()
+ humanize_duration(), humanize_file_size(), humanize_id(), instr(),
+ leftstr(), length(), logfmt2json(), ltrim(), padc(), padl(), padr(),
+ parse_url(), printf(), proper(), regexp_capture(),
+ regexp_capture_into_json(), regexp_match(), regexp_replace(),
+ replace(), replicate(), reverse(), rightstr(), rtrim(), sparkline(),
+ spooky_hash(), startswith(), strfilter(), substr(), timezone(), trim(),
+ unicode(), unparse_url(), upper(), xpath()
Example
#1 To lowercase the string 'AbC':
;SELECT lower('AbC') 
@@ -3044,13 +3583,13 @@ For support questions, email:
See Also
anonymize(), char(), charindex(), decode(), encode(), endswith(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
- humanize_duration(), humanize_file_size(), instr(), leftstr(),
- length(), logfmt2json(), lower(), padc(), padl(), padr(), parse_url(),
- printf(), proper(), regexp_capture(), regexp_capture_into_json(),
- regexp_match(), regexp_replace(), replace(), replicate(), reverse(),
- rightstr(), rtrim(), sparkline(), spooky_hash(), startswith(),
- strfilter(), substr(), trim(), unicode(), unparse_url(), upper(),
- xpath()
+ humanize_duration(), humanize_file_size(), humanize_id(), instr(),
+ leftstr(), length(), logfmt2json(), lower(), padc(), padl(), padr(),
+ parse_url(), printf(), proper(), regexp_capture(),
+ regexp_capture_into_json(), regexp_match(), regexp_replace(),
+ replace(), replicate(), reverse(), rightstr(), rtrim(), sparkline(),
+ spooky_hash(), startswith(), strfilter(), substr(), timezone(), trim(),
+ unicode(), unparse_url(), upper(), xpath()
Examples
#1 To trim the leading space characters from the string ' abc':
;SELECT ltrim(' abc') 
@@ -3066,8 +3605,8 @@ For support questions, email:
Returns the argument with the maximum value, or return NULL if any
argument is NULL.
Parameter
- X The numbers to find the maximum of. If only one argument is
- given, this function operates as an aggregate.
+ X The numbers to find the maximum of. If only one argument
+ is given, this function operates as an aggregate.
See Also
abs(), acos(), acosh(), asin(), asinh(), atan(), atan2(), atanh(),
atn2(), avg(), ceil(), degrees(), exp(), floor(), log(), log10(),
@@ -3088,8 +3627,8 @@ For support questions, email:
Returns the argument with the minimum value, or return NULL if any
argument is NULL.
Parameter
- X The numbers to find the minimum of. If only one argument is
- given, this function operates as an aggregate.
+ X The numbers to find the minimum of. If only one argument
+ is given, this function operates as an aggregate.
See Also
abs(), acos(), acosh(), asin(), asinh(), atan(), atan2(), atanh(),
atn2(), avg(), ceil(), degrees(), exp(), floor(), log(), log10(),
@@ -3107,8 +3646,8 @@ For support questions, email:
nth_value(expr, N)
══════════════════════════════════════════════════════════════════════
- Returns the result of evaluating the expression against the nth row
- in the window frame.
+ Returns the result of evaluating the expression against the nth
+ row in the window frame.
Parameters
expr The expression to execute over the nth row
N The row number
@@ -3153,13 +3692,13 @@ For support questions, email:
See Also
anonymize(), char(), charindex(), decode(), encode(), endswith(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
- humanize_duration(), humanize_file_size(), instr(), leftstr(),
- length(), logfmt2json(), lower(), ltrim(), padl(), padr(), parse_url(),
- printf(), proper(), regexp_capture(), regexp_capture_into_json(),
- regexp_match(), regexp_replace(), replace(), replicate(), reverse(),
- rightstr(), rtrim(), sparkline(), spooky_hash(), startswith(),
- strfilter(), substr(), trim(), unicode(), unparse_url(), upper(),
- xpath()
+ humanize_duration(), humanize_file_size(), humanize_id(), instr(),
+ leftstr(), length(), logfmt2json(), lower(), ltrim(), padl(), padr(),
+ parse_url(), printf(), proper(), regexp_capture(),
+ regexp_capture_into_json(), regexp_match(), regexp_replace(),
+ replace(), replicate(), reverse(), rightstr(), rtrim(), sparkline(),
+ spooky_hash(), startswith(), strfilter(), substr(), timezone(), trim(),
+ unicode(), unparse_url(), upper(), xpath()
Examples
#1 To pad the string 'abc' to a length of six characters:
;SELECT padc('abc', 6) || 'def' 
@@ -3180,13 +3719,13 @@ For support questions, email:
See Also
anonymize(), char(), charindex(), decode(), encode(), endswith(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
- humanize_duration(), humanize_file_size(), instr(), leftstr(),
- length(), logfmt2json(), lower(), ltrim(), padc(), padr(), parse_url(),
- printf(), proper(), regexp_capture(), regexp_capture_into_json(),
- regexp_match(), regexp_replace(), replace(), replicate(), reverse(),
- rightstr(), rtrim(), sparkline(), spooky_hash(), startswith(),
- strfilter(), substr(), trim(), unicode(), unparse_url(), upper(),
- xpath()
+ humanize_duration(), humanize_file_size(), humanize_id(), instr(),
+ leftstr(), length(), logfmt2json(), lower(), ltrim(), padc(), padr(),
+ parse_url(), printf(), proper(), regexp_capture(),
+ regexp_capture_into_json(), regexp_match(), regexp_replace(),
+ replace(), replicate(), reverse(), rightstr(), rtrim(), sparkline(),
+ spooky_hash(), startswith(), strfilter(), substr(), timezone(), trim(),
+ unicode(), unparse_url(), upper(), xpath()
Examples
#1 To pad the string 'abc' to a length of six characters:
;SELECT padl('abc', 6) 
@@ -3207,13 +3746,13 @@ For support questions, email:
See Also
anonymize(), char(), charindex(), decode(), encode(), endswith(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
- humanize_duration(), humanize_file_size(), instr(), leftstr(),
- length(), logfmt2json(), lower(), ltrim(), padc(), padl(), parse_url(),
- printf(), proper(), regexp_capture(), regexp_capture_into_json(),
- regexp_match(), regexp_replace(), replace(), replicate(), reverse(),
- rightstr(), rtrim(), sparkline(), spooky_hash(), startswith(),
- strfilter(), substr(), trim(), unicode(), unparse_url(), upper(),
- xpath()
+ humanize_duration(), humanize_file_size(), humanize_id(), instr(),
+ leftstr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(),
+ parse_url(), printf(), proper(), regexp_capture(),
+ regexp_capture_into_json(), regexp_match(), regexp_replace(),
+ replace(), replicate(), reverse(), rightstr(), rtrim(), sparkline(),
+ spooky_hash(), startswith(), strfilter(), substr(), timezone(), trim(),
+ unicode(), unparse_url(), upper(), xpath()
Examples
#1 To pad the string 'abc' to a length of six characters:
;SELECT padr('abc', 6) || 'def' 
@@ -3226,31 +3765,33 @@ For support questions, email:
parse_url(url)
══════════════════════════════════════════════════════════════════════
- Parse a URL and return the components in a JSON object. Limitations:
- not all URL schemes are supported and repeated query parameters are
- not captured.
+ Parse a URL and return the components in a JSON object.
+ Limitations: not all URL schemes are supported and repeated query
+ parameters are not captured.
Parameter
url The URL to parse
Results
scheme The URL's scheme
- username The name of the user specified in the URL
+ username The name of the user specified in the
+ URL
password The password specified in the URL
host The host name / IP specified in the URL
port The port specified in the URL
path The path specified in the URL
query The query string in the URL
- parameters An object containing the query parameters
+ parameters An object containing the query
+ parameters
fragment The fragment specified in the URL
See Also
anonymize(), char(), charindex(), decode(), encode(), endswith(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
- humanize_duration(), humanize_file_size(), instr(), leftstr(),
- length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
- printf(), proper(), regexp_capture(), regexp_capture_into_json(),
- regexp_match(), regexp_replace(), replace(), replicate(), reverse(),
- rightstr(), rtrim(), sparkline(), spooky_hash(), startswith(),
- strfilter(), substr(), trim(), unicode(), unparse_url(), unparse_url(),
- upper(), xpath()
+ humanize_duration(), humanize_file_size(), humanize_id(), instr(),
+ leftstr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(),
+ padr(), printf(), proper(), regexp_capture(),
+ regexp_capture_into_json(), regexp_match(), regexp_replace(),
+ replace(), replicate(), reverse(), rightstr(), rtrim(), sparkline(),
+ spooky_hash(), startswith(), strfilter(), substr(), timezone(), trim(),
+ unicode(), unparse_url(), unparse_url(), upper(), xpath()
Examples
#1 To parse the URL 'https://example.com/search?q=hello%20world':
;SELECT parse_url('https://example.com/search?q=hello%20world')
@@ -3301,23 +3842,23 @@ For support questions, email:
printf(format, X)
══════════════════════════════════════════════════════════════════════
- Returns a string with this functions arguments substituted into the
- given format. Substitution points are specified using percent (%)
- options, much like the standard C printf() function.
+ Returns a string with this functions arguments substituted into
+ the given format. Substitution points are specified using percent
+ (%) options, much like the standard C printf() function.
Parameters
format The format of the string to return.
- X The argument to substitute at a given position in
- the format.
+ X The argument to substitute at a given position
+ in the format.
See Also
anonymize(), char(), charindex(), decode(), encode(), endswith(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
- humanize_duration(), humanize_file_size(), instr(), leftstr(),
- length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
- parse_url(), proper(), regexp_capture(), regexp_capture_into_json(),
- regexp_match(), regexp_replace(), replace(), replicate(), reverse(),
- rightstr(), rtrim(), sparkline(), spooky_hash(), startswith(),
- strfilter(), substr(), trim(), unicode(), unparse_url(), upper(),
- xpath()
+ humanize_duration(), humanize_file_size(), humanize_id(), instr(),
+ leftstr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(),
+ padr(), parse_url(), proper(), regexp_capture(),
+ regexp_capture_into_json(), regexp_match(), regexp_replace(),
+ replace(), replicate(), reverse(), rightstr(), rtrim(), sparkline(),
+ spooky_hash(), startswith(), strfilter(), substr(), timezone(), trim(),
+ unicode(), unparse_url(), upper(), xpath()
Examples
#1 To substitute 'World' into the string 'Hello, %s!':
;SELECT printf('Hello, %s!', 'World') 
@@ -3340,13 +3881,13 @@ For support questions, email:
See Also
anonymize(), char(), charindex(), decode(), encode(), endswith(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
- humanize_duration(), humanize_file_size(), instr(), leftstr(),
- length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
- parse_url(), printf(), regexp_capture(), regexp_capture_into_json(),
- regexp_match(), regexp_replace(), replace(), replicate(), reverse(),
- rightstr(), rtrim(), sparkline(), spooky_hash(), startswith(),
- strfilter(), substr(), trim(), unicode(), unparse_url(), upper(),
- xpath()
+ humanize_duration(), humanize_file_size(), humanize_id(), instr(),
+ leftstr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(),
+ padr(), parse_url(), printf(), regexp_capture(),
+ regexp_capture_into_json(), regexp_match(), regexp_replace(),
+ replace(), replicate(), reverse(), rightstr(), rtrim(), sparkline(),
+ spooky_hash(), startswith(), strfilter(), substr(), timezone(), trim(),
+ unicode(), unparse_url(), upper(), xpath()
Example
#1 To capitalize the words in the string 'hello, world!':
;SELECT proper('hello, world!') 
@@ -3385,11 +3926,17 @@ For support questions, email:
-raise_error(msg)
+raise_error(msg, [reason])
══════════════════════════════════════════════════════════════════════
Raises an error with the given message when executed
-Parameter
- msg The error message
+Parameters
+ msg The error message
+ reason The reason the error occurred
+
+Example
+#1 To raise an error if a variable is not set:
+ ;SELECT ifnull($val, raise_error('please set $val', 'because'))
+
random()
@@ -3454,23 +4001,24 @@ For support questions, email:
regex.
capture_name The name of the capture in the
regex.
- capture_count The total number of captures in the
- regex.
+ capture_count The total number of captures in
+ the regex.
range_start The start of the capture in the
input string.
- range_stop The stop of the capture in the input
+ range_stop The stop of the capture in the
+ input string.
+ content The captured value from the
string.
- content The captured value from the string.
See Also
anonymize(), char(), charindex(), decode(), encode(), endswith(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
- humanize_duration(), humanize_file_size(), instr(), leftstr(),
- length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
- parse_url(), printf(), proper(), regexp_capture_into_json(),
+ humanize_duration(), humanize_file_size(), humanize_id(), instr(),
+ leftstr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(),
+ padr(), parse_url(), printf(), proper(), regexp_capture_into_json(),
regexp_match(), regexp_replace(), replace(), replicate(), reverse(),
rightstr(), rtrim(), sparkline(), spooky_hash(), startswith(),
- strfilter(), substr(), trim(), unicode(), unparse_url(), upper(),
- xpath()
+ strfilter(), substr(), timezone(), trim(), unicode(), unparse_url(),
+ upper(), xpath()
Example
#1 To extract the key/value pairs 'a'/1 and 'b'/2 from the string 'a=1; b=2':
;SELECT * FROM regexp_capture('a=1; b=2', '(\w+)=(\d+)')
@@ -3498,12 +4046,13 @@ For support questions, email:
See Also
anonymize(), char(), charindex(), decode(), encode(), endswith(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
- humanize_duration(), humanize_file_size(), instr(), leftstr(),
- length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
- parse_url(), printf(), proper(), regexp_capture(), regexp_match(),
- regexp_replace(), replace(), replicate(), reverse(), rightstr(),
- rtrim(), sparkline(), spooky_hash(), startswith(), strfilter(),
- substr(), trim(), unicode(), unparse_url(), upper(), xpath()
+ humanize_duration(), humanize_file_size(), humanize_id(), instr(),
+ leftstr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(),
+ padr(), parse_url(), printf(), proper(), regexp_capture(),
+ regexp_match(), regexp_replace(), replace(), replicate(), reverse(),
+ rightstr(), rtrim(), sparkline(), spooky_hash(), startswith(),
+ strfilter(), substr(), timezone(), trim(), unicode(), unparse_url(),
+ upper(), xpath()
Example
#1 To extract the key/value pairs 'a'/1 and 'b'/2 from the string 'a=1; b=2':
;SELECT * FROM regexp_capture_into_json('a=1; b=2', '(\w+)=(\d+)')
@@ -3520,13 +4069,13 @@ For support questions, email:
See Also
anonymize(), char(), charindex(), decode(), encode(), endswith(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
- humanize_duration(), humanize_file_size(), instr(), leftstr(),
- length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
- parse_url(), printf(), proper(), regexp_capture(),
+ humanize_duration(), humanize_file_size(), humanize_id(), instr(),
+ leftstr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(),
+ padr(), parse_url(), printf(), proper(), regexp_capture(),
regexp_capture_into_json(), regexp_replace(), regexp_replace(),
replace(), replicate(), reverse(), rightstr(), rtrim(), sparkline(),
- spooky_hash(), startswith(), strfilter(), substr(), trim(), unicode(),
- unparse_url(), upper(), xpath()
+ spooky_hash(), startswith(), strfilter(), substr(), timezone(), trim(),
+ unicode(), unparse_url(), upper(), xpath()
Examples
#1 To capture the digits from the string '123':
;SELECT regexp_match('(\d+)', '123') 
@@ -3555,13 +4104,13 @@ For support questions, email:
See Also
anonymize(), char(), charindex(), decode(), encode(), endswith(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
- humanize_duration(), humanize_file_size(), instr(), leftstr(),
- length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
- parse_url(), printf(), proper(), regexp_capture(),
+ humanize_duration(), humanize_file_size(), humanize_id(), instr(),
+ leftstr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(),
+ padr(), parse_url(), printf(), proper(), regexp_capture(),
regexp_capture_into_json(), regexp_match(), regexp_match(), replace(),
replicate(), reverse(), rightstr(), rtrim(), sparkline(),
- spooky_hash(), startswith(), strfilter(), substr(), trim(), unicode(),
- unparse_url(), upper(), xpath()
+ spooky_hash(), startswith(), strfilter(), substr(), timezone(), trim(),
+ unicode(), unparse_url(), upper(), xpath()
Examples
#1 To replace the word at the start of the string 'Hello, World!' with 'Goodbye':
;SELECT regexp_replace('Hello, World!', '^(\w+)', 'Goodbye')
@@ -3577,20 +4126,21 @@ For support questions, email:
Returns a string formed by substituting the replacement string for
every occurrence of the old string in the given string.
Parameters
- str The string to perform substitutions on.
+ str The string to perform substitutions
+ on.
old The string to be replaced.
- replacement The string to replace any occurrences of
- the old string with.
+ replacement The string to replace any occurrences
+ of the old string with.
See Also
anonymize(), char(), charindex(), decode(), encode(), endswith(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
- humanize_duration(), humanize_file_size(), instr(), leftstr(),
- length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
- parse_url(), printf(), proper(), regexp_capture(),
+ humanize_duration(), humanize_file_size(), humanize_id(), instr(),
+ leftstr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(),
+ padr(), parse_url(), printf(), proper(), regexp_capture(),
regexp_capture_into_json(), regexp_match(), regexp_replace(),
replicate(), reverse(), rightstr(), rtrim(), sparkline(),
- spooky_hash(), startswith(), strfilter(), substr(), trim(), unicode(),
- unparse_url(), upper(), xpath()
+ spooky_hash(), startswith(), strfilter(), substr(), timezone(), trim(),
+ unicode(), unparse_url(), upper(), xpath()
Examples
#1 To replace the string 'x' with 'z' in 'abc':
;SELECT replace('abc', 'x', 'z') 
@@ -3610,13 +4160,13 @@ For support questions, email:
See Also
anonymize(), char(), charindex(), decode(), encode(), endswith(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
- humanize_duration(), humanize_file_size(), instr(), leftstr(),
- length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
- parse_url(), printf(), proper(), regexp_capture(),
+ humanize_duration(), humanize_file_size(), humanize_id(), instr(),
+ leftstr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(),
+ padr(), parse_url(), printf(), proper(), regexp_capture(),
regexp_capture_into_json(), regexp_match(), regexp_replace(),
replace(), reverse(), rightstr(), rtrim(), sparkline(), spooky_hash(),
- startswith(), strfilter(), substr(), trim(), unicode(), unparse_url(),
- upper(), xpath()
+ startswith(), strfilter(), substr(), timezone(), trim(), unicode(),
+ unparse_url(), upper(), xpath()
Example
#1 To repeat the string 'abc' three times:
;SELECT replicate('abc', 3) 
@@ -3631,13 +4181,13 @@ For support questions, email:
See Also
anonymize(), char(), charindex(), decode(), encode(), endswith(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
- humanize_duration(), humanize_file_size(), instr(), leftstr(),
- length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
- parse_url(), printf(), proper(), regexp_capture(),
+ humanize_duration(), humanize_file_size(), humanize_id(), instr(),
+ leftstr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(),
+ padr(), parse_url(), printf(), proper(), regexp_capture(),
regexp_capture_into_json(), regexp_match(), regexp_replace(),
replace(), replicate(), rightstr(), rtrim(), sparkline(),
- spooky_hash(), startswith(), strfilter(), substr(), trim(), unicode(),
- unparse_url(), upper(), xpath()
+ spooky_hash(), startswith(), strfilter(), substr(), timezone(), trim(),
+ unicode(), unparse_url(), upper(), xpath()
Example
#1 To reverse the string 'abc':
;SELECT reverse('abc') 
@@ -3654,13 +4204,13 @@ For support questions, email:
See Also
anonymize(), char(), charindex(), decode(), encode(), endswith(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
- humanize_duration(), humanize_file_size(), instr(), leftstr(),
- length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
- parse_url(), printf(), proper(), regexp_capture(),
+ humanize_duration(), humanize_file_size(), humanize_id(), instr(),
+ leftstr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(),
+ padr(), parse_url(), printf(), proper(), regexp_capture(),
regexp_capture_into_json(), regexp_match(), regexp_replace(),
replace(), replicate(), reverse(), rtrim(), sparkline(), spooky_hash(),
- startswith(), strfilter(), substr(), trim(), unicode(), unparse_url(),
- upper(), xpath()
+ startswith(), strfilter(), substr(), timezone(), trim(), unicode(),
+ unparse_url(), upper(), xpath()
Examples
#1 To get the last character of the string 'abc':
;SELECT rightstr('abc', 1) 
@@ -3673,8 +4223,8 @@ For support questions, email:
round(num, [digits])
══════════════════════════════════════════════════════════════════════
- Returns a floating-point value rounded to the given number of digits
- to the right of the decimal point.
+ Returns a floating-point value rounded to the given number of
+ digits to the right of the decimal point.
Parameters
num The value to round.
digits The number of digits to the right of the decimal
@@ -3700,8 +4250,8 @@ For support questions, email:
row_number()
══════════════════════════════════════════════════════════════════════
- Returns the number of the row within the current partition, starting
- from 1.
+ Returns the number of the row within the current partition,
+ starting from 1.
See Also
cume_dist(), dense_rank(), first_value(), lag(), last_value(), lead(),
nth_value(), ntile(), percent_rank(), rank()
@@ -3722,13 +4272,13 @@ For support questions, email:
See Also
anonymize(), char(), charindex(), decode(), encode(), endswith(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
- humanize_duration(), humanize_file_size(), instr(), leftstr(),
- length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
- parse_url(), printf(), proper(), regexp_capture(),
+ humanize_duration(), humanize_file_size(), humanize_id(), instr(),
+ leftstr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(),
+ padr(), parse_url(), printf(), proper(), regexp_capture(),
regexp_capture_into_json(), regexp_match(), regexp_replace(),
replace(), replicate(), reverse(), rightstr(), sparkline(),
- spooky_hash(), startswith(), strfilter(), substr(), trim(), unicode(),
- unparse_url(), upper(), xpath()
+ spooky_hash(), startswith(), strfilter(), substr(), timezone(), trim(),
+ unicode(), unparse_url(), upper(), xpath()
Examples
#1 To trim the space characters from the end of the string 'abc ':
;SELECT rtrim('abc ') 
@@ -3739,6 +4289,20 @@ For support questions, email:
+shell_exec(cmd, [input], [options])
+══════════════════════════════════════════════════════════════════════
+ Executes a shell command and returns its output.
+Parameters
+ cmd The command to execute.
+ input A blob of data to write to the command's
+ standard input.
+ options A JSON object containing options for the
+ execution with the following properties:
+ env - An object containing the environment
+ variables to set or, if NULL, to unset.
+See Also
+
+
sign(num)
══════════════════════════════════════════════════════════════════════
Returns the sign of the given number as -1, 0, or 1
@@ -3765,10 +4329,10 @@ For support questions, email:
sparkline(value, [upper])
══════════════════════════════════════════════════════════════════════
- Function used to generate a sparkline bar chart. The non-aggregate
- version converts a single numeric value on a range to a bar chart
- character. The aggregate version returns a string with a bar
- character for every numeric input
+ Function used to generate a sparkline bar chart. The
+ non-aggregate version converts a single numeric value on a range to
+ a bar chart character. The aggregate version returns a string with
+ a bar character for every numeric input
Parameters
value The numeric value to convert
upper The upper bound of the numeric range. The
@@ -3777,13 +4341,13 @@ For support questions, email:
See Also
anonymize(), char(), charindex(), decode(), encode(), endswith(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
- humanize_duration(), humanize_file_size(), instr(), leftstr(),
- length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
- parse_url(), printf(), proper(), regexp_capture(),
+ humanize_duration(), humanize_file_size(), humanize_id(), instr(),
+ leftstr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(),
+ padr(), parse_url(), printf(), proper(), regexp_capture(),
regexp_capture_into_json(), regexp_match(), regexp_replace(),
replace(), replicate(), reverse(), rightstr(), rtrim(), spooky_hash(),
- startswith(), strfilter(), substr(), trim(), unicode(), unparse_url(),
- upper(), xpath()
+ startswith(), strfilter(), substr(), timezone(), trim(), unicode(),
+ unparse_url(), upper(), xpath()
Examples
#1 To get the unicode block element for the value 32 in the range of 0-128:
;SELECT sparkline(32, 128) 
@@ -3802,13 +4366,13 @@ For support questions, email:
See Also
anonymize(), char(), charindex(), decode(), encode(), endswith(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
- humanize_duration(), humanize_file_size(), instr(), leftstr(),
- length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
- parse_url(), printf(), proper(), regexp_capture(),
+ humanize_duration(), humanize_file_size(), humanize_id(), instr(),
+ leftstr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(),
+ padr(), parse_url(), printf(), proper(), regexp_capture(),
regexp_capture_into_json(), regexp_match(), regexp_replace(),
replace(), replicate(), reverse(), rightstr(), rtrim(), sparkline(),
- startswith(), strfilter(), substr(), trim(), unicode(), unparse_url(),
- upper(), xpath()
+ startswith(), strfilter(), substr(), timezone(), trim(), unicode(),
+ unparse_url(), upper(), xpath()
Examples
#1 To produce a hash for the string 'Hello, World!':
;SELECT spooky_hash('Hello, World!') 
@@ -3829,8 +4393,8 @@ For support questions, email:
sqlite_compileoption_get(N)
══════════════════════════════════════════════════════════════════════
- Returns the N-th compile-time option used to build SQLite or NULL if
- N is out of range.
+ Returns the N-th compile-time option used to build SQLite or NULL
+ if N is out of range.
Parameter
N The option number to get
@@ -3850,8 +4414,8 @@ For support questions, email:
sqlite_source_id()
══════════════════════════════════════════════════════════════════════
- Returns a string that identifies the specific version of the source
- code that was used to build the SQLite library.
+ Returns a string that identifies the specific version of the
+ source code that was used to build the SQLite library.
sqlite_version()
@@ -3884,13 +4448,13 @@ For support questions, email:
See Also
anonymize(), char(), charindex(), decode(), encode(), endswith(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
- humanize_duration(), humanize_file_size(), instr(), leftstr(),
- length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
- parse_url(), printf(), proper(), regexp_capture(),
+ humanize_duration(), humanize_file_size(), humanize_id(), instr(),
+ leftstr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(),
+ padr(), parse_url(), printf(), proper(), regexp_capture(),
regexp_capture_into_json(), regexp_match(), regexp_replace(),
replace(), replicate(), reverse(), rightstr(), rtrim(), sparkline(),
- spooky_hash(), strfilter(), substr(), trim(), unicode(), unparse_url(),
- upper(), xpath()
+ spooky_hash(), strfilter(), substr(), timezone(), trim(), unicode(),
+ unparse_url(), upper(), xpath()
Examples
#1 To test if the string 'foobar' starts with 'foo':
;SELECT startswith('foobar', 'foo') 
@@ -3911,12 +4475,12 @@ For support questions, email:
See Also
anonymize(), char(), charindex(), decode(), encode(), endswith(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
- humanize_duration(), humanize_file_size(), instr(), leftstr(),
- length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
- parse_url(), printf(), proper(), regexp_capture(),
+ humanize_duration(), humanize_file_size(), humanize_id(), instr(),
+ leftstr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(),
+ padr(), parse_url(), printf(), proper(), regexp_capture(),
regexp_capture_into_json(), regexp_match(), regexp_replace(),
replace(), replicate(), reverse(), rightstr(), rtrim(), sparkline(),
- spooky_hash(), startswith(), substr(), trim(), unicode(),
+ spooky_hash(), startswith(), substr(), timezone(), trim(), unicode(),
unparse_url(), upper(), xpath()
Example
#1 To get the 'b', 'c', and 'd' characters from the string 'abcabc':
@@ -3926,17 +4490,19 @@ For support questions, email:
strftime(format, timestring, modifier, ...)
══════════════════════════════════════════════════════════════════════
- Returns the date formatted according to the format string specified
- as the first argument.
+ Returns the date formatted according to the format string
+ specified as the first argument.
Parameters
- format A format string with substitutions similar
- to those found in the strftime() standard C library.
- timestring The string to convert to a date with time.
+ format A format string with substitutions
+ similar to those found in the strftime() standard C
+ library.
+ timestring The string to convert to a date with
+ time.
modifier A transformation that is applied to the
value to the left.
See Also
date(), datetime(), humanize_duration(), julianday(), time(),
- timediff(), timeslice()
+ timediff(), timeslice(), timezone()
Examples
#1 To get the year from the timestamp '2017-01-02T03:04:05':
;SELECT strftime('%Y', '2017-01-02T03:04:05') 
@@ -3969,13 +4535,13 @@ For support questions, email:
See Also
anonymize(), char(), charindex(), decode(), encode(), endswith(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
- humanize_duration(), humanize_file_size(), instr(), leftstr(),
- length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
- parse_url(), printf(), proper(), regexp_capture(),
+ humanize_duration(), humanize_file_size(), humanize_id(), instr(),
+ leftstr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(),
+ padr(), parse_url(), printf(), proper(), regexp_capture(),
regexp_capture_into_json(), regexp_match(), regexp_replace(),
replace(), replicate(), reverse(), rightstr(), rtrim(), sparkline(),
- spooky_hash(), startswith(), strfilter(), trim(), unicode(),
- unparse_url(), upper(), xpath()
+ spooky_hash(), startswith(), strfilter(), timezone(), trim(),
+ unicode(), unparse_url(), upper(), xpath()
Examples
#1 To get the substring starting at the second character until the end of the string
'abc':
@@ -4024,7 +4590,7 @@ For support questions, email:
value to the left.
See Also
date(), datetime(), humanize_duration(), julianday(), strftime(),
- timediff(), timeslice()
+ timediff(), timeslice(), timezone()
Examples
#1 To get the time portion of the timestamp '2017-01-02T03:04:05':
;SELECT time('2017-01-02T03:04:05') 
@@ -4047,7 +4613,7 @@ For support questions, email:
time2 The timestamp to subtract from the first
See Also
date(), datetime(), humanize_duration(), julianday(), strftime(),
- time(), timeslice()
+ time(), timeslice(), timezone()
Examples
#1 To get the difference between two timestamps:
;SELECT timediff('2017-02-03T04:05:06', '2017-02-03T04:05:00')
@@ -4060,14 +4626,14 @@ For support questions, email:
timeslice(time, slice)
══════════════════════════════════════════════════════════════════════
- Return the start of the slice of time that the given timestamp falls
- in. If the time falls outside of the slice, NULL is returned.
+ Return the start of the slice of time that the given timestamp
+ falls in. If the time falls outside of the slice, NULL is returned.
Parameters
time The timestamp to get the time slice for.
slice The size of the time slices
See Also
date(), datetime(), humanize_duration(), julianday(), strftime(),
- time(), timediff()
+ time(), timediff(), timezone()
Examples
#1 To get the timestamp rounded down to the start of the ten minute slice:
;SELECT timeslice('2017-01-01T05:05:00', '10m') 
@@ -4084,6 +4650,30 @@ For support questions, email:
+timezone(tz, ts)
+══════════════════════════════════════════════════════════════════════
+ Convert a timestamp to the given timezone
+Parameters
+ tz The target timezone
+ ts The source timestamp
+See Also
+ anonymize(), char(), charindex(), date(), datetime(), decode(),
+ encode(), endswith(), extract(), group_concat(), group_spooky_hash(),
+ gunzip(), gzip(), humanize_duration(), humanize_duration(),
+ humanize_file_size(), humanize_id(), instr(), julianday(), leftstr(),
+ length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
+ parse_url(), printf(), proper(), regexp_capture(),
+ regexp_capture_into_json(), regexp_match(), regexp_replace(),
+ replace(), replicate(), reverse(), rightstr(), rtrim(), sparkline(),
+ spooky_hash(), startswith(), strfilter(), strftime(), substr(), time(),
+ timediff(), timeslice(), trim(), unicode(), unparse_url(), upper(),
+ xpath()
+Example
+#1 To convert a time to America/Los_Angeles:
+ ;SELECT timezone('America/Los_Angeles', '2022-03-02T10:00')
+
+
+
total(X)
══════════════════════════════════════════════════════════════════════
Returns the sum of the values in the group as a floating-point.
@@ -4103,8 +4693,8 @@ For support questions, email:
total_changes()
══════════════════════════════════════════════════════════════════════
- Returns the number of row changes caused by INSERT, UPDATE or DELETE
- statements since the current database connection was opened.
+ Returns the number of row changes caused by INSERT, UPDATE or
+ DELETE statements since the current database connection was opened.
trim(str, [chars])
@@ -4119,13 +4709,13 @@ For support questions, email:
See Also
anonymize(), char(), charindex(), decode(), encode(), endswith(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
- humanize_duration(), humanize_file_size(), instr(), leftstr(),
- length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
- parse_url(), printf(), proper(), regexp_capture(),
+ humanize_duration(), humanize_file_size(), humanize_id(), instr(),
+ leftstr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(),
+ padr(), parse_url(), printf(), proper(), regexp_capture(),
regexp_capture_into_json(), regexp_match(), regexp_replace(),
replace(), replicate(), reverse(), rightstr(), rtrim(), sparkline(),
- spooky_hash(), startswith(), strfilter(), substr(), unicode(),
- unparse_url(), upper(), xpath()
+ spooky_hash(), startswith(), strfilter(), substr(), timezone(),
+ unicode(), unparse_url(), upper(), xpath()
Examples
#1 To trim spaces from the start and end of the string ' abc ':
;SELECT trim(' abc ') 
@@ -4162,12 +4752,12 @@ For support questions, email:
See Also
anonymize(), char(), charindex(), decode(), encode(), endswith(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
- humanize_duration(), humanize_file_size(), instr(), leftstr(),
- length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
- parse_url(), printf(), proper(), regexp_capture(),
+ humanize_duration(), humanize_file_size(), humanize_id(), instr(),
+ leftstr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(),
+ padr(), parse_url(), printf(), proper(), regexp_capture(),
regexp_capture_into_json(), regexp_match(), regexp_replace(),
replace(), replicate(), reverse(), rightstr(), rtrim(), sparkline(),
- spooky_hash(), startswith(), strfilter(), substr(), trim(),
+ spooky_hash(), startswith(), strfilter(), substr(), timezone(), trim(),
unparse_url(), upper(), xpath()
Example
#1 To get the unicode code point for the first character of 'abc':
@@ -4191,13 +4781,13 @@ For support questions, email:
See Also
anonymize(), char(), charindex(), decode(), encode(), endswith(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
- humanize_duration(), humanize_file_size(), instr(), leftstr(),
- length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
- parse_url(), parse_url(), printf(), proper(), regexp_capture(),
+ humanize_duration(), humanize_file_size(), humanize_id(), instr(),
+ leftstr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(),
+ padr(), parse_url(), parse_url(), printf(), proper(), regexp_capture(),
regexp_capture_into_json(), regexp_match(), regexp_replace(),
replace(), replicate(), reverse(), rightstr(), rtrim(), sparkline(),
- spooky_hash(), startswith(), strfilter(), substr(), trim(), unicode(),
- upper(), xpath()
+ spooky_hash(), startswith(), strfilter(), substr(), timezone(), trim(),
+ unicode(), upper(), xpath()
Example
#1 To unparse the object '{"scheme": "https", "host": "example.com"}':
;SELECT unparse_url('{"scheme": "https", "host": "example.com"}')
@@ -4213,13 +4803,13 @@ For support questions, email:
See Also
anonymize(), char(), charindex(), decode(), encode(), endswith(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
- humanize_duration(), humanize_file_size(), instr(), leftstr(),
- length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
- parse_url(), printf(), proper(), regexp_capture(),
+ humanize_duration(), humanize_file_size(), humanize_id(), instr(),
+ leftstr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(),
+ padr(), parse_url(), printf(), proper(), regexp_capture(),
regexp_capture_into_json(), regexp_match(), regexp_replace(),
replace(), replicate(), reverse(), rightstr(), rtrim(), sparkline(),
- spooky_hash(), startswith(), strfilter(), substr(), trim(), unicode(),
- unparse_url(), xpath()
+ spooky_hash(), startswith(), strfilter(), substr(), timezone(), trim(),
+ unicode(), unparse_url(), xpath()
Example
#1 To uppercase the string 'aBc':
;SELECT upper('aBc') 
@@ -4236,31 +4826,34 @@ For support questions, email:
xmldoc The XML document as a string.
Results
result The result of the XPATH expression.
- node_path The absolute path to the node containing the
- result.
- node_attr The node's attributes stored in JSON object.
+ node_path The absolute path to the node containing
+ the result.
+ node_attr The node's attributes stored in JSON
+ object.
node_text The node's text value.
See Also
anonymize(), char(), charindex(), decode(), encode(), endswith(),
extract(), group_concat(), group_spooky_hash(), gunzip(), gzip(),
- humanize_duration(), humanize_file_size(), instr(), leftstr(),
- length(), logfmt2json(), lower(), ltrim(), padc(), padl(), padr(),
- parse_url(), printf(), proper(), regexp_capture(),
+ humanize_duration(), humanize_file_size(), humanize_id(), instr(),
+ leftstr(), length(), logfmt2json(), lower(), ltrim(), padc(), padl(),
+ padr(), parse_url(), printf(), proper(), regexp_capture(),
regexp_capture_into_json(), regexp_match(), regexp_replace(),
replace(), replicate(), reverse(), rightstr(), rtrim(), sparkline(),
- spooky_hash(), startswith(), strfilter(), substr(), trim(), unicode(),
- unparse_url(), upper()
+ spooky_hash(), startswith(), strfilter(), substr(), timezone(), trim(),
+ unicode(), unparse_url(), upper()
Examples
#1 To select the XML nodes on the path '/abc/def':
;SELECT * FROM xpath('/abc/def', '<abc><def a="b">Hello</def><def>Bye</def></abc>')
#2 To select all 'a' attributes on the path '/abc/def':
- ;SELECT * FROM xpath('/abc/def/@a', '<abc><def a="b">Hello</def><def>Bye</def></abc>')
+ ;SELECT * FROM xpath('/abc/def/@a', '<abc><def
+  a="b">Hello</def><def>Bye</def></abc>')
#3 To select the text nodes on the path '/abc/def':
- ;SELECT * FROM xpath('/abc/def/text()', '<abc><def a="b">Hello &#x2605;</def></abc>')
+ ;SELECT * FROM xpath('/abc/def/text()', '<abc><def a="b">Hello
+  &#x2605;</def></abc>')
@@ -4270,8 +4863,11 @@ For support questions, email:
Parameter
yaml The YAML value to convert to JSON.
See Also
- jget(), json_concat(), json_contains(), json_group_array(),
- json_group_object()
+ jget(), json(), json_array(), json_array_length(), json_concat(),
+ json_contains(), json_each(), json_extract(), json_group_array(),
+ json_group_object(), json_insert(), json_object(), json_quote(),
+ json_remove(), json_replace(), json_set(), json_tree(), json_type(),
+ json_valid()
Example
#1 To convert the document "abc: def":
;SELECT yaml_to_json('abc: def') 
@@ -4290,7 +4886,8 @@ For support questions, email:
Attach a database file to the current connection.
Parameters
filename The path to the database file.
- schema-name The prefix for tables in this database.
+ schema-name The prefix for tables in this
+ database.
Example
#1 To attach the database file '/tmp/customers.db' with the name customers:
@@ -4306,8 +4903,9 @@ For support questions, email:
Parameters
base-expr The base expression that is used for
comparison in the branches
- cmp-expr The expression to test if this branch should
- be taken
+ cmp-expr The expression to test if this branch
+ should be taken
+ then-expr - The result for this branch.
else-expr The result of this CASE if no branches
matched.
@@ -4321,8 +4919,8 @@ For support questions, email:
══════════════════════════════════════════════════════════════════════
Assign a name to a SELECT statement
Parameters
- IF NOT EXISTS Do not create the view if it already
- exists
+ IF NOT EXISTS Do not create the view if it
+ already exists
schema-name. The database to create the view in
view-name The name of the view
select-stmt The SELECT statement the view
@@ -4341,7 +4939,8 @@ For support questions, email:
══════════════════════════════════════════════════════════════════════
Detach a database from the current connection.
Parameter
- schema-name The prefix for tables in this database.
+ schema-name The prefix for tables in this
+ database.
Example
#1 To detach the database named 'customers':
@@ -4383,10 +4982,10 @@ For support questions, email:
table The table(s) to query for data
cond The conditions used to select the
rows to return.
- grouping-expr The expression to use when grouping
- rows.
- ordering-term The values to use when ordering the
- result set.
+ grouping-expr The expression to use when
+ grouping rows.
+ ordering-term The values to use when ordering
+ the result set.
limit-expr The maximum number of rows to
return.
@@ -4402,8 +5001,10 @@ For support questions, email:
Parameters
table The table to update
column-name The columns in the table to update.
- cond The condition used to determine whether
- a row should be updated.
+ expr - The values to place into the
+ column.
+ cond The condition used to determine
+ whether a row should be updated.
Example
#1 To mark the syslog message at line 40:
@@ -4416,7 +5017,7 @@ For support questions, email:
Create a temporary view that exists only for the duration of a SQL
statement.
Parameters
- cte-table-name The name for the temporary table.
+ cte-table-name The name for the temporary
+ table.
select-stmt The SELECT statement used to
populate the temporary table.
-
diff --git a/test/expected/test_cmds.sh_b755a8b48c0f602f0270500b0117b76e11db546e.out b/test/expected/test_cmds.sh_b755a8b48c0f602f0270500b0117b76e11db546e.out
index 5fb4d90..e27bfe5 100644
--- a/test/expected/test_cmds.sh_b755a8b48c0f602f0270500b0117b76e11db546e.out
+++ b/test/expected/test_cmds.sh_b755a8b48c0f602f0270500b0117b76e11db546e.out
@@ -33,5 +33,6 @@ Apr 7 07:32:56 Tim-Stacks-iMac.local logger[234]: Bad data {
abc,
123,
456
-)
-}]
+ )
+}
+]
diff --git a/test/expected/test_cmds.sh_c7fabc25374ff47c47931f63b1d697061b816a28.out b/test/expected/test_cmds.sh_c7fabc25374ff47c47931f63b1d697061b816a28.out
index 76c53dd..fe0221c 100644
--- a/test/expected/test_cmds.sh_c7fabc25374ff47c47931f63b1d697061b816a28.out
+++ b/test/expected/test_cmds.sh_c7fabc25374ff47c47931f63b1d697061b816a28.out
@@ -1,2 +1,2 @@
- Sat Nov 03 09:20:00 1 normal 2 errors  0 warnings  1 marks
- Sat Nov 03 09:45:00 1 normal 0 errors 0 warnings 0 marks
+ Sat Nov 03 09:20:00 1 normal 2 errors  0 warnings  1 marks
+ Sat Nov 03 09:45:00 1 normal 0 errors 0 warnings 0 marks
diff --git a/test/expected/test_cmds.sh_ccd326da92d1cacda63501cd1a3077381a18e8f2.out b/test/expected/test_cmds.sh_ccd326da92d1cacda63501cd1a3077381a18e8f2.out
index bc67837..0c0137a 100644
--- a/test/expected/test_cmds.sh_ccd326da92d1cacda63501cd1a3077381a18e8f2.out
+++ b/test/expected/test_cmds.sh_ccd326da92d1cacda63501cd1a3077381a18e8f2.out
@@ -1 +1 @@
- Sat Nov 03 00:00:00 2 normal 2 errors 0 warnings 0 marks
+ Sat Nov 03 00:00:00 2 normal  2 errors 0 warnings  0 marks
diff --git a/test/expected/test_cmds.sh_d0d0ff9b68adc17136329f457fe52d5addcb12c0.err b/test/expected/test_cmds.sh_d0d0ff9b68adc17136329f457fe52d5addcb12c0.err
new file mode 100644
index 0000000..a55e4f8
--- /dev/null
+++ b/test/expected/test_cmds.sh_d0d0ff9b68adc17136329f457fe52d5addcb12c0.err
@@ -0,0 +1,6 @@
+✘ error: invalid epoch time: 16120724091612072409 -- Value too large to be stored in data type
+ --> command-option:1
+ | :unix-time 16120724091612072409 
+ = help: :unix-time seconds
+ ══════════════════════════════════════════════════════════════════════
+ Convert epoch time to a human-readable form
diff --git a/test/expected/test_cmds.sh_d0d0ff9b68adc17136329f457fe52d5addcb12c0.out b/test/expected/test_cmds.sh_d0d0ff9b68adc17136329f457fe52d5addcb12c0.out
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_cmds.sh_d0d0ff9b68adc17136329f457fe52d5addcb12c0.out
diff --git a/test/expected/test_cmds.sh_d1afefacbdd387f02562c8633968b0162a588502.err b/test/expected/test_cmds.sh_d1afefacbdd387f02562c8633968b0162a588502.err
new file mode 100644
index 0000000..040fef2
--- /dev/null
+++ b/test/expected/test_cmds.sh_d1afefacbdd387f02562c8633968b0162a588502.err
@@ -0,0 +1,6 @@
+✘ error: {test_dir}/logfile_access_log.0 is not a directory
+ --> command-option:1
+ | :cd {test_dir}/logfile_access_log.0
+ = help: :cd dir
+ ══════════════════════════════════════════════════════════════════════
+ Change the current directory
diff --git a/test/expected/test_cmds.sh_d1afefacbdd387f02562c8633968b0162a588502.out b/test/expected/test_cmds.sh_d1afefacbdd387f02562c8633968b0162a588502.out
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_cmds.sh_d1afefacbdd387f02562c8633968b0162a588502.out
diff --git a/test/expected/test_cmds.sh_d7eebacdcf2cb194f25fa4ef97b7b5376b442467.err b/test/expected/test_cmds.sh_d7eebacdcf2cb194f25fa4ef97b7b5376b442467.err
deleted file mode 100644
index 07df1b2..0000000
--- a/test/expected/test_cmds.sh_d7eebacdcf2cb194f25fa4ef97b7b5376b442467.err
+++ /dev/null
@@ -1,7 +0,0 @@
-✘ error: invalid timestamp: 2022-06-16Tabc
- reason: the leading part of the timestamp was matched, however, the trailing text “Tabc” was not
- --> command-option:1
- | :goto 2022-06-16Tabc 
- |  ^--^ unrecognized input 
- = note: input matched time format “%Y-%m-%d”
- = help: fix the timestamp or remove the trailing text
diff --git a/test/expected/test_cmds.sh_d836c84398c831c976df46f46fe3bf5983c44c37.out b/test/expected/test_cmds.sh_d836c84398c831c976df46f46fe3bf5983c44c37.out
index 1d3eae4..926f0f5 100644
--- a/test/expected/test_cmds.sh_d836c84398c831c976df46f46fe3bf5983c44c37.out
+++ b/test/expected/test_cmds.sh_d836c84398c831c976df46f46fe3bf5983c44c37.out
@@ -1,2 +1,2 @@
-log_top_line() 
+log_top_line() 
51
diff --git a/test/expected/test_cmds.sh_da5f7160b967e60dbd772573614e2da89c5e22b2.err b/test/expected/test_cmds.sh_da5f7160b967e60dbd772573614e2da89c5e22b2.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_cmds.sh_da5f7160b967e60dbd772573614e2da89c5e22b2.err
diff --git a/test/expected/test_cmds.sh_da5f7160b967e60dbd772573614e2da89c5e22b2.out b/test/expected/test_cmds.sh_da5f7160b967e60dbd772573614e2da89c5e22b2.out
new file mode 100644
index 0000000..c9c79dc
--- /dev/null
+++ b/test/expected/test_cmds.sh_da5f7160b967e60dbd772573614e2da89c5e22b2.out
@@ -0,0 +1 @@
+2009-07-20T15:59:26.000 -0700
diff --git a/test/expected/test_cmds.sh_dbdd62995fdefc8318053af05a32416eccfa79fc.out b/test/expected/test_cmds.sh_dbdd62995fdefc8318053af05a32416eccfa79fc.out
index f3d0606..24a89e7 100644
--- a/test/expected/test_cmds.sh_dbdd62995fdefc8318053af05a32416eccfa79fc.out
+++ b/test/expected/test_cmds.sh_dbdd62995fdefc8318053af05a32416eccfa79fc.out
@@ -1 +1 @@
- Sat Nov 03 08:00:00 2 normal 2 errors 0 warnings 0 marks
+ Sat Nov 03 08:00:00 2 normal  2 errors 0 warnings  0 marks
diff --git a/test/expected/test_cmds.sh_df6f4cea16bb8f20e6408fe4b40335e6de8a7f18.out b/test/expected/test_cmds.sh_df6f4cea16bb8f20e6408fe4b40335e6de8a7f18.out
index e905c55..85a13ff 100644
--- a/test/expected/test_cmds.sh_df6f4cea16bb8f20e6408fe4b40335e6de8a7f18.out
+++ b/test/expected/test_cmds.sh_df6f4cea16bb8f20e6408fe4b40335e6de8a7f18.out
@@ -1,3 +1,3 @@
-10.0.0.1 - - [20/Jul/2009:22:59:26 +0000] "GET /vmw/cgi/aberrant HTTP/1.0" 200 134 "-" "gPXE/0.9.7"
-10.0.0.1 - - [20/Jul/2009:22:59:29 +0000] "GET /vmw/abject/ablaze/able.gz HTTP/1.0" 404 46210 "-" "gPXE/0.9.7"
-10.0.0.1 - - [20/Jul/2009:22:59:29 +0000] "GET /vmw/abject/ablaze/aboard.gz HTTP/1.0" 200 78929 "-" "gPXE/0.9.7"
+10.0.0.1 - - [20/Jul/2009:22:59:26 +0000] "GET /vmw/cgi/abashed HTTP/1.0" 200 134 "-" "gPXE/0.9.7"
+10.0.0.1 - - [20/Jul/2009:22:59:29 +0000] "GET /vmw/aberrant/abhorrent/abiding.gz HTTP/1.0" 404 46210 "-" "gPXE/0.9.7"
+10.0.0.1 - - [20/Jul/2009:22:59:29 +0000] "GET /vmw/aberrant/abhorrent/ablaze.gz HTTP/1.0" 200 78929 "-" "gPXE/0.9.7"
diff --git a/test/expected/test_cmds.sh_e7e8244fac65bc51dbd5af31be476fe3b8776bfc.out b/test/expected/test_cmds.sh_e7e8244fac65bc51dbd5af31be476fe3b8776bfc.out
index 21e4506..012e2ef 100644
--- a/test/expected/test_cmds.sh_e7e8244fac65bc51dbd5af31be476fe3b8776bfc.out
+++ b/test/expected/test_cmds.sh_e7e8244fac65bc51dbd5af31be476fe3b8776bfc.out
@@ -1,12 +1,12 @@
{
- "foo bar" : null,
- "array" : [
- 1,
- 2,
- 3
- ],
- "obj" : {
- "one" : 1,
-  "two" : true
+ "foo bar" : null,
+ "array" : [
+ 1,
+ 2,
+ 3
+ ],
+ "obj" : {
+ "one" : 1,
+ "two" : true
}
}
diff --git a/test/expected/test_cmds.sh_eb22c3e94c536a1bfaeae0c40d271b5b4b08f4fc.out b/test/expected/test_cmds.sh_eb22c3e94c536a1bfaeae0c40d271b5b4b08f4fc.out
index 6599581..96a0a22 100644
--- a/test/expected/test_cmds.sh_eb22c3e94c536a1bfaeae0c40d271b5b4b08f4fc.out
+++ b/test/expected/test_cmds.sh_eb22c3e94c536a1bfaeae0c40d271b5b4b08f4fc.out
@@ -1,3 +1,3 @@
-{"log_line":0,"log_part":null,"log_time":"2009-07-20 22:59:26.000","log_idle_msecs":0,"log_level":"info","log_mark":0,"log_comment":null,"log_tags":null,"log_filters":null,"c_ip":"192.168.202.254","cs_method":"GET","cs_referer":"-","cs_uri_query":null,"cs_uri_stem":"/vmw/cgi/tramp","cs_user_agent":"gPXE/0.9.7","cs_username":"-","cs_version":"HTTP/1.0","sc_bytes":134,"sc_status":200,"cs_host":null}
-{"log_line":1,"log_part":null,"log_time":"2009-07-20 22:59:29.000","log_idle_msecs":3000,"log_level":"error","log_mark":0,"log_comment":null,"log_tags":null,"log_filters":null,"c_ip":"192.168.202.254","cs_method":"GET","cs_referer":"-","cs_uri_query":null,"cs_uri_stem":"/vmw/vSphere/default/vmkboot.gz","cs_user_agent":"gPXE/0.9.7","cs_username":"-","cs_version":"HTTP/1.0","sc_bytes":46210,"sc_status":404,"cs_host":null}
-{"log_line":2,"log_part":null,"log_time":"2009-07-20 22:59:29.000","log_idle_msecs":0,"log_level":"info","log_mark":0,"log_comment":null,"log_tags":null,"log_filters":null,"c_ip":"192.168.202.254","cs_method":"GET","cs_referer":"-","cs_uri_query":null,"cs_uri_stem":"/vmw/vSphere/default/vmkernel.gz","cs_user_agent":"gPXE/0.9.7","cs_username":"-","cs_version":"HTTP/1.0","sc_bytes":78929,"sc_status":200,"cs_host":null}
+{"log_line":0,"log_time":"2009-07-20 22:59:26.000","log_level":"info","c_ip":"192.168.202.254","cs_method":"GET","cs_referer":"-","cs_uri_query":null,"cs_uri_stem":"/vmw/cgi/tramp","cs_user_agent":"gPXE/0.9.7","cs_username":"-","cs_version":"HTTP/1.0","sc_bytes":134,"sc_status":200,"cs_host":null,"log_part":null,"log_idle_msecs":0,"log_mark":0,"log_comment":null,"log_tags":null,"log_annotations":null,"log_filters":null}
+{"log_line":1,"log_time":"2009-07-20 22:59:29.000","log_level":"error","c_ip":"192.168.202.254","cs_method":"GET","cs_referer":"-","cs_uri_query":null,"cs_uri_stem":"/vmw/vSphere/default/vmkboot.gz","cs_user_agent":"gPXE/0.9.7","cs_username":"-","cs_version":"HTTP/1.0","sc_bytes":46210,"sc_status":404,"cs_host":null,"log_part":null,"log_idle_msecs":3000,"log_mark":0,"log_comment":null,"log_tags":null,"log_annotations":null,"log_filters":null}
+{"log_line":2,"log_time":"2009-07-20 22:59:29.000","log_level":"info","c_ip":"192.168.202.254","cs_method":"GET","cs_referer":"-","cs_uri_query":null,"cs_uri_stem":"/vmw/vSphere/default/vmkernel.gz","cs_user_agent":"gPXE/0.9.7","cs_username":"-","cs_version":"HTTP/1.0","sc_bytes":78929,"sc_status":200,"cs_host":null,"log_part":null,"log_idle_msecs":0,"log_mark":0,"log_comment":null,"log_tags":null,"log_annotations":null,"log_filters":null}
diff --git a/test/expected/test_cmds.sh_ec3a64cad41b070a1d04e2bfc3dc14cb2d964091.err b/test/expected/test_cmds.sh_ec3a64cad41b070a1d04e2bfc3dc14cb2d964091.err
new file mode 100644
index 0000000..5874e8a
--- /dev/null
+++ b/test/expected/test_cmds.sh_ec3a64cad41b070a1d04e2bfc3dc14cb2d964091.err
@@ -0,0 +1,6 @@
+✘ error: Unable to get timezone: bad-zone -- bad-zone not found in timezone database
+ --> command-option:2
+ | :convert-time-to bad-zone 
+ = help: :convert-time-to zone
+ ══════════════════════════════════════════════════════════════════════
+ Convert the focused timestamp to the given timezone
diff --git a/test/expected/test_cmds.sh_ec3a64cad41b070a1d04e2bfc3dc14cb2d964091.out b/test/expected/test_cmds.sh_ec3a64cad41b070a1d04e2bfc3dc14cb2d964091.out
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_cmds.sh_ec3a64cad41b070a1d04e2bfc3dc14cb2d964091.out
diff --git a/test/expected/test_config.sh_13fa2428c26fa12e732209620e21466b36bab252.err b/test/expected/test_config.sh_13fa2428c26fa12e732209620e21466b36bab252.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_config.sh_13fa2428c26fa12e732209620e21466b36bab252.err
diff --git a/test/expected/test_config.sh_13fa2428c26fa12e732209620e21466b36bab252.out b/test/expected/test_config.sh_13fa2428c26fa12e732209620e21466b36bab252.out
new file mode 100644
index 0000000..3d14be3
--- /dev/null
+++ b/test/expected/test_config.sh_13fa2428c26fa12e732209620e21466b36bab252.out
@@ -0,0 +1 @@
+Hello, /finn at seattle!
diff --git a/test/expected/test_config.sh_5105c29004e297521310ca0bd0fd560b01c2c549.err b/test/expected/test_config.sh_5105c29004e297521310ca0bd0fd560b01c2c549.err
deleted file mode 100644
index 092b26a..0000000
--- a/test/expected/test_config.sh_5105c29004e297521310ca0bd0fd560b01c2c549.err
+++ /dev/null
@@ -1,20 +0,0 @@
-✘ error: 'bad' is not a supported configuration $schema version
- --> {test_dir}/bad-config2/formats/invalid-config/config.bad-schema.json:2
- |  "$schema": "bad" 
- = note: expecting one of the following $schema values:
-  https://lnav.org/schemas/config-v1.schema.json
- = help: Property Synopsis
- /$schema <schema-uri>
- Description
- The URI that specifies the schema that describes this type of file
- Example
- https://lnav.org/schemas/config-v1.schema.json
-✘ error: invalid JSON
- --> {test_dir}/bad-config2/formats/invalid-config/config.malformed.json:3
- | parse error: object key and value must be separated by a colon (':')
- |  "ui": "theme", "abc", "def": "" }
- |  (right here) ------^
- | 
-✘ error: invalid JSON
- reason: parse error: premature EOF
- --> {test_dir}/bad-config2/formats/invalid-config/config.truncated.json:3
diff --git a/test/expected/test_config.sh_a0907769aba112d628e7ebe39c4ec252e5e0bc69.err b/test/expected/test_config.sh_a0907769aba112d628e7ebe39c4ec252e5e0bc69.err
index ec11ba5..f04b83a 100644
--- a/test/expected/test_config.sh_a0907769aba112d628e7ebe39c4ec252e5e0bc69.err
+++ b/test/expected/test_config.sh_a0907769aba112d628e7ebe39c4ec252e5e0bc69.err
@@ -1,4 +1,23 @@
-✘ error: 'bad' is not a supported configuration $schema version
+⚠ warning: unexpected value for property “/ui/theme-defs/invalid-theme/styles/text/bad-property”
+ --> {test_dir}/bad-config2/configs/invalid-theme/config.json:9
+ |  "bad-property": "abc"
+ = help: Available Properties
+ color #hex|color_name
+ background-color #hex|color_name
+ underline
+ bold
+✘ error: “abc(” is not a valid regular expression
+ reason: missing closing parenthesis
+ --> /ui/theme-defs/invalid-theme/highlights/foobar/pattern
+ | abc( 
+ |  ^ missing closing parenthesis 
+ --> {test_dir}/bad-config2/configs/invalid-theme/config.json:14
+ |  "pattern": "abc("
+ = help: Property Synopsis
+ /ui/theme-defs/invalid-theme/highlights/foobar/pattern regular expression
+ Description
+ The regular expression to highlight
+✘ error: “bad” is not a supported configuration $schema version
 --> {test_dir}/bad-config2/formats/invalid-config/config.bad-schema.json:2
 |  "$schema": "bad" 
 = note: expecting one of the following $schema values:
@@ -36,3 +55,28 @@
✘ error: invalid JSON
reason: parse error: premature EOF
 --> {test_dir}/bad-config2/formats/invalid-config/config.truncated.json:3
+✘ error: missing value for property “/log/annotations/org.lnav.test.no-condition/condition”
+ reason: incomplete input
+ --> /log/annotations/org.lnav.test.no-condition/condition
+ = help: Property Synopsis
+ /log/annotations/org.lnav.test.no-condition/condition <SQL-expression>
+ Description
+ The SQLite expression to execute for a log message that determines whether or not this annotation is applicable. The expression is evaluated the same way as a filter expression
+✘ error: missing value for property “/log/annotations/org.lnav.test.no-handler/handler”
+ reason: Every annotation requires a handler
+ = help: Property Synopsis
+ /log/annotations/org.lnav.test.no-handler/handler <script>
+ Description
+ The script to execute to generate the annotation content. A JSON object with the log message content will be sent to the script on the standard input
+✘ error: invalid value for property “/ui/theme-defs/invalid-theme/styles/text/color”
+ reason: invalid color -- “InvalidColor”
+ |  reason: Unknown color: 'InvalidColor'. See https://jonasjacek.github.io/colors/ for a list of supported color names
+ --> {test_dir}/bad-config2/configs/invalid-theme/config.json:8
+ = help: Property Synopsis
+ /ui/theme-defs/invalid-theme/styles/text/color #hex|color_name
+ Description
+ The foreground color value for this style. The value can be the name of an xterm color, the hexadecimal value, or a theme variable reference.
+ Examples
+ #fff
+ Green
+ $black
diff --git a/test/expected/test_config.sh_d708b6fd32d83ce0ee00ca5383388308ba5a06e1.err b/test/expected/test_config.sh_d708b6fd32d83ce0ee00ca5383388308ba5a06e1.err
index 93cba93..1849a63 100644
--- a/test/expected/test_config.sh_d708b6fd32d83ce0ee00ca5383388308ba5a06e1.err
+++ b/test/expected/test_config.sh_d708b6fd32d83ce0ee00ca5383388308ba5a06e1.err
@@ -1,6 +1,6 @@
✘ error: invalid value for property “/ui/theme”
reason: unknown theme -- “baddy”
- |   = help: The available themes are: default, eldar, grayscale, monocai, night-owl, solarized-dark, solarized-light
+ |   = help: The available themes are: default, dracula, eldar, grayscale, monocai, night-owl, solarized-dark, solarized-light
 --> command-option:1
 = help: Property Synopsis
/ui/theme theme_name
diff --git a/test/expected/test_format_installer.sh_1e08efc3b8c7b67d944a1f8c475cd31d98d5b4f6.err b/test/expected/test_format_installer.sh_1e08efc3b8c7b67d944a1f8c475cd31d98d5b4f6.err
new file mode 100644
index 0000000..8b4f3e4
--- /dev/null
+++ b/test/expected/test_format_installer.sh_1e08efc3b8c7b67d944a1f8c475cd31d98d5b4f6.err
@@ -0,0 +1,2 @@
+✘ error: unable to open configuration file: /non-existent/file
+ reason: No such file or directory
diff --git a/test/expected/test_format_installer.sh_1e08efc3b8c7b67d944a1f8c475cd31d98d5b4f6.out b/test/expected/test_format_installer.sh_1e08efc3b8c7b67d944a1f8c475cd31d98d5b4f6.out
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_format_installer.sh_1e08efc3b8c7b67d944a1f8c475cd31d98d5b4f6.out
diff --git a/test/expected/test_format_installer.sh_6cd73153a8990b8ddb8ce489e90ec667a442f7f9.err b/test/expected/test_format_installer.sh_6cd73153a8990b8ddb8ce489e90ec667a442f7f9.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_format_installer.sh_6cd73153a8990b8ddb8ce489e90ec667a442f7f9.err
diff --git a/test/expected/test_format_installer.sh_6cd73153a8990b8ddb8ce489e90ec667a442f7f9.out b/test/expected/test_format_installer.sh_6cd73153a8990b8ddb8ce489e90ec667a442f7f9.out
new file mode 100644
index 0000000..95b5acd
--- /dev/null
+++ b/test/expected/test_format_installer.sh_6cd73153a8990b8ddb8ce489e90ec667a442f7f9.out
@@ -0,0 +1,2 @@
+✔ installed -- ../installer-test-home/.lnav/formats/installed/test_log.json
+ = note: the previously installed “test_log.json” was backed up to -- ../installer-test-home/.lnav/formats/installed/test_log.json.bak
diff --git a/test/expected/test_format_installer.sh_947cbc64a150c7fe2a17e1c7a69e9a932aeaa16b.err b/test/expected/test_format_installer.sh_947cbc64a150c7fe2a17e1c7a69e9a932aeaa16b.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_format_installer.sh_947cbc64a150c7fe2a17e1c7a69e9a932aeaa16b.err
diff --git a/test/expected/test_format_installer.sh_947cbc64a150c7fe2a17e1c7a69e9a932aeaa16b.out b/test/expected/test_format_installer.sh_947cbc64a150c7fe2a17e1c7a69e9a932aeaa16b.out
new file mode 100644
index 0000000..8ac09f2
--- /dev/null
+++ b/test/expected/test_format_installer.sh_947cbc64a150c7fe2a17e1c7a69e9a932aeaa16b.out
@@ -0,0 +1 @@
+ⓘ info: file is already installed at -- ../installer-test-home/.lnav/formats/installed/test_log.json
diff --git a/test/expected/test_format_loader.sh_15e861d2327512a721fd42ae51dc5427689e0bb6.out b/test/expected/test_format_loader.sh_15e861d2327512a721fd42ae51dc5427689e0bb6.out
index 5f62842..2b877c6 100644
--- a/test/expected/test_format_loader.sh_15e861d2327512a721fd42ae51dc5427689e0bb6.out
+++ b/test/expected/test_format_loader.sh_15e861d2327512a721fd42ae51dc5427689e0bb6.out
@@ -1,9 +1,9 @@
-log_line,log_part,log_time,log_idle_msecs,log_level,log_mark,log_comment,log_tags,log_filters
-0,<NULL>,2016-06-30 12:00:01.000,0,trace,0,<NULL>,<NULL>,<NULL>
-1,<NULL>,2016-06-30 12:00:02.000,1000,debug,0,<NULL>,<NULL>,<NULL>
-2,<NULL>,2016-06-30 12:00:03.000,1000,debug2,0,<NULL>,<NULL>,<NULL>
-3,<NULL>,2016-06-30 12:00:04.000,1000,debug3,0,<NULL>,<NULL>,<NULL>
-4,<NULL>,2016-06-30 12:00:05.000,1000,info,0,<NULL>,<NULL>,<NULL>
-5,<NULL>,2016-06-30 12:00:06.000,1000,warning,0,<NULL>,<NULL>,<NULL>
-6,<NULL>,2016-06-30 12:00:07.000,1000,fatal,0,<NULL>,<NULL>,<NULL>
-7,<NULL>,2016-06-30 12:00:08.000,1000,info,0,<NULL>,<NULL>,<NULL>
+log_line,log_time,log_level,log_part,log_idle_msecs,log_mark,log_comment,log_tags,log_annotations,log_filters
+0,2016-06-30 12:00:01.000,trace,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>
+1,2016-06-30 12:00:02.000,debug,<NULL>,1000,0,<NULL>,<NULL>,<NULL>,<NULL>
+2,2016-06-30 12:00:03.000,debug2,<NULL>,1000,0,<NULL>,<NULL>,<NULL>,<NULL>
+3,2016-06-30 12:00:04.000,debug3,<NULL>,1000,0,<NULL>,<NULL>,<NULL>,<NULL>
+4,2016-06-30 12:00:05.000,info,<NULL>,1000,0,<NULL>,<NULL>,<NULL>,<NULL>
+5,2016-06-30 12:00:06.000,warning,<NULL>,1000,0,<NULL>,<NULL>,<NULL>,<NULL>
+6,2016-06-30 12:00:07.000,fatal,<NULL>,1000,0,<NULL>,<NULL>,<NULL>,<NULL>
+7,2016-06-30 12:00:08.000,info,<NULL>,1000,0,<NULL>,<NULL>,<NULL>,<NULL>
diff --git a/test/expected/test_format_loader.sh_3f1d6f35e8a9ae4fd3e91ffaa82a037b5a847ab7.err b/test/expected/test_format_loader.sh_3f1d6f35e8a9ae4fd3e91ffaa82a037b5a847ab7.err
deleted file mode 100644
index 202b451..0000000
--- a/test/expected/test_format_loader.sh_3f1d6f35e8a9ae4fd3e91ffaa82a037b5a847ab7.err
+++ /dev/null
@@ -1,171 +0,0 @@
-✘ error: “invalid(abc” is not a valid regular expression
- reason: missing closing parenthesis
- --> /invalid_props_log/tags/badtag3/pattern
- | invalid(abc 
- |  ^ missing closing parenthesis
- --> {test_dir}/bad-config/formats/invalid-properties/format.json:35
- |  "pattern": "invalid(abc"
- = help: Property Synopsis
- /invalid_props_log/tags/badtag3/pattern <regex>
- Description
- The regular expression to match against the body of the log message
- Example
- \w+ is down
-✘ error: “abc(def” is not a valid regular expression
- reason: missing closing parenthesis
- --> /invalid_props_log/search-table/bad_table_regex/pattern
- | abc(def 
- |  ^ missing closing parenthesis 
- --> {test_dir}/bad-config/formats/invalid-properties/format.json:40
- |  "pattern": "abc(def" 
- = help: Property Synopsis
- /invalid_props_log/search-table/bad_table_regex/pattern <regex>
- Description
- The regular expression for this search table.
-✘ error: “^(?<timestamp>\d+: (?<body>.*)$” is not a valid regular expression
- reason: missing closing parenthesis
- --> /bad_regex_log/regex/std/pattern
- | ^(?<timestamp>\d+: (?<body>.*)$ 
- |  ^ missing closing parenthesis
- --> {test_dir}/bad-config/formats/invalid-regex/format.json:6
- |  "pattern": "^(?<timestamp>\\d+: (?<body>.*)$"
- = help: Property Synopsis
- /bad_regex_log/regex/std/pattern <message-regex>
- Description
- The regular expression to match a log message and capture fields.
-✘ error: “(foo” is not a valid regular expression
- reason: missing closing parenthesis
- --> pattern
- | (foo 
- |  ^ missing closing parenthesis 
- --> {test_dir}/bad-config/formats/invalid-regex/format.json:13
- |  "error": "(foo" 
- = help: Property Synopsis
- /bad_regex_log/level/error <pattern|integer>
- Description
- The regular expression used to match the log text for this level. For JSON logs with numeric levels, this should be the number for the corresponding level.
-✘ error: “abc(” is not a valid regular expression
- reason: missing closing parenthesis
- --> /bad_regex_log/highlights/foobar/pattern
- | abc( 
- |  ^ missing closing parenthesis 
- --> {test_dir}/bad-config/formats/invalid-regex/format.json:25
- |  "pattern": "abc(" 
- = help: Property Synopsis
- /bad_regex_log/highlights/foobar/pattern <regex>
- Description
- A regular expression to highlight in logs of this format.
-✘ error: “foo” is not a valid value for option “/bad_sample_log/value/pid/kind”
- --> {test_dir}/bad-config/formats/invalid-sample/format.json:24
- |  "kind": "foo" 
- = help: Property Synopsis
- /bad_sample_log/value/pid/kind <data-type>
- Description
- The type of data in the field
- Allowed Values
- string, integer, float, boolean, json, struct, quoted, xml
-✘ error: 'bad' is not a supported log format $schema version
- --> {test_dir}/bad-config/formats/invalid-schema/format.json:2
- |  "$schema": "bad" 
- = note: expecting one of the following $schema values:
-  https://lnav.org/schemas/format-v1.schema.json
- = help: Property Synopsis
- /$schema The URI of the schema for this file
- Description
- Specifies the type of this file
-✘ error: invalid pattern: “incomplete-match”
- reason: pattern does not match entire message
- --> {test_dir}/bad-config/formats/invalid-regex/format.json:20
- | 1428634687123; foo 
- |  ^ matched up to here 
- = note: incomplete-match = ^(?<timestamp>\d+);
- = help: update the regular expression to fully capture the sample message
-✘ error: invalid sample log message: "abc: foo"
- reason: unrecognized timestamp -- abc
- --> {test_dir}/bad-config/formats/invalid-sample/format.json:30
- = note: the following custom formats were tried:
- abc
- ^ “%i” matched up to here
- = help: If the timestamp format is not supported by default, you can add a custom format with the “timestamp-format” property
-✘ error: invalid sample log message: "1428634687123| debug hello"
- reason: “debug” does not match the expected level of “info”
- --> {test_dir}/bad-config/formats/invalid-sample/format.json:33
- = note: matched regex = with-level
- captured level = “debug”
-✘ error: invalid pattern: “with-level”
- reason: pattern does not match entire multiline sample message
- --> {test_dir}/bad-config/formats/invalid-sample/format.json:37
- = note: with-level = ^(?<timestamp>\d+)\| (?<level>\w+) (?<body>\w+)$
- = help: use “.*” to match new-lines
-✘ error: invalid sample log message: "1428634687123; foo bar"
- reason: sample does not match any patterns
- --> {test_dir}/bad-config/formats/invalid-sample/format.json:41
- = note: the following shows how each pattern matched this sample:
- 1428634687123; foo bar
- ^ bad-time matched up to here
- ^ semi matched up to here
- ^ std matched up to here
- ^ with-level matched up to here
- = note: bad-time  = “^(?<timestamp>\w+): (?<body>\w+)$”
- semi  = “^(?<timestamp>\d+); (?<body>\w+)$”
- std  = “^(?<timestamp>\d+): (?<pid>\w+) (?<body>.*)$”
- with-level = “^(?<timestamp>\d+)\| (?<level>\w+) (?<body>\w+)$”
-
-⚠ warning: invalid pattern: “/bad_sample_log/regex/semi”
- reason: pattern does not match any samples
- --> {test_dir}/bad-config/formats/invalid-sample/format.json:10
- = help: every pattern should have at least one sample that it matches
-⚠ warning: invalid pattern: “/bad_sample_log/regex/std”
- reason: pattern does not match any samples
- --> {test_dir}/bad-config/formats/invalid-sample/format.json:7
- = help: every pattern should have at least one sample that it matches
-⚠ warning: invalid value “/invalid_props_log/value/non-existent”
- reason: no patterns have a capture named “non-existent”
- --> {test_dir}/bad-config/formats/invalid-properties/format.json:4
- = note: the following captures are available:
- body, pid, timestamp
- = help: values are populated from captures in patterns, so at least one pattern must have a capture with this value name
-✘ error: invalid tag definition “/invalid_props_log/tags/badtag”
- reason: tag definitions must have a non-empty pattern
- --> {test_dir}/bad-config/formats/invalid-properties/format.json:4
-✘ error: invalid tag definition “/invalid_props_log/tags/badtag2”
- reason: tag definitions must have a non-empty pattern
- --> {test_dir}/bad-config/formats/invalid-properties/format.json:4
-✘ error: invalid tag definition “/invalid_props_log/tags/badtag3”
- reason: tag definitions must have a non-empty pattern
- --> {test_dir}/bad-config/formats/invalid-properties/format.json:4
-✘ error: invalid value for property “/invalid_props_log/timestamp-field”
- reason: “ts” was not found in the pattern at /invalid_props_log/regex/std
- --> {test_dir}/bad-config/formats/invalid-properties/format.json:4
- = note: the following captures are available:
- body, pid, timestamp
-✘ error: “not a color” is not a valid color value for property “/invalid_props_log/highlights/hl1/color”
- reason: Unknown color: 'not a color'. See https://jonasjacek.github.io/colors/ for a list of supported color names
- --> {test_dir}/bad-config/formats/invalid-properties/format.json:23
-✘ error: “also not a color” is not a valid color value for property “/invalid_props_log/highlights/hl1/background-color”
- reason: Unknown color: 'also not a color'. See https://jonasjacek.github.io/colors/ for a list of supported color names
- --> {test_dir}/bad-config/formats/invalid-properties/format.json:24
-✘ error: “no_regexes_log” is not a valid log format
- reason: no regexes specified
- --> {test_dir}/bad-config/formats/no-regexes/format.json:4
-✘ error: “no_regexes_log” is not a valid log format
- reason: log message samples must be included in a format definition
- --> {test_dir}/bad-config/formats/no-regexes/format.json:4
-✘ error: “no_sample_log” is not a valid log format
- reason: log message samples must be included in a format definition
- --> {test_dir}/bad-config/formats/no-samples/format.json:4
-✘ error: failed to compile SQL statement
- reason: near "TALE": syntax error
- --> {test_dir}/bad-config/formats/invalid-sql/init.sql:4
- | -- comment test 
- | CREATE TALE invalid (x y z); 
- |  ^ near "TALE": syntax error 
-✘ error: failed to execute SQL statement
- reason: ✘ error: “abc(” is not a valid regular expression
- |  reason: missing closing parenthesis
- |   --> arg
- |   | abc( 
- |   |  ^ missing closing parenthesis
- --> {test_dir}/bad-config/formats/invalid-sql/init2.sql
- | SELECT regexp_match('abc(', '123') 
- | FROM sqlite_master; 
diff --git a/test/expected/test_format_loader.sh_5992e2695b7e6cf1f3520dbb87af8fc2b8f27088.err b/test/expected/test_format_loader.sh_5992e2695b7e6cf1f3520dbb87af8fc2b8f27088.err
index c3d7699..578c06f 100644
--- a/test/expected/test_format_loader.sh_5992e2695b7e6cf1f3520dbb87af8fc2b8f27088.err
+++ b/test/expected/test_format_loader.sh_5992e2695b7e6cf1f3520dbb87af8fc2b8f27088.err
@@ -104,6 +104,13 @@
/$schema The URI of the schema for this file
Description
Specifies the type of this file
+✘ error: SQL expression is invalid
+ reason: unrecognized token: "'foobar"
+ --> /bad_file_format1/converter/header/expr/default
+ | :header REGEXP 'foobar 
+✘ error: A command is required when a converter is defined
+ --> {test_dir}/bad-config/formats/invalid-file-format/format.json:4
+ = help: The converter command transforms the file into a format that can be consumed by lnav
✘ error: invalid line format element “/bad_json_log/line-format/0/field”
reason: “” is not a defined value
 --> {test_dir}/bad-config/formats/invalid-json-format/format.json:7
@@ -160,6 +167,10 @@
reason: pattern does not match any samples
 --> {test_dir}/bad-config/formats/invalid-sample/format.json:7
 = help: every pattern should have at least one sample that it matches
+✘ error: invalid pattern: “/invalid_props_log/regex/std”
+ reason: no timestamp capture found in the pattern
+ --> {test_dir}/bad-config/formats/invalid-properties/format.json:4
+ = help: all log messages need a timestamp
⚠ warning: invalid value “/invalid_props_log/value/non-existent”
reason: no patterns have a capture named “non-existent”
 --> {test_dir}/bad-config/formats/invalid-properties/format.json:4
@@ -198,6 +209,10 @@
✘ error: “no_sample_log” is not a valid log format
reason: log message samples must be included in a format definition
 --> {test_dir}/bad-config/formats/no-samples/format.json:4
+✘ error: invalid sample log message: "gitea | 2023/09/24 22:15:55 cmd/web.go:223:runWeb() [I] Starting Gitea on PID: 7"
+ reason: timestamp was not captured
+ --> {test_dir}/bad-config/formats/invalid-no-tscap/format.json:25
+ = help: A timestamp needs to be captured in order for a line to be recognized as a log message
✘ error: failed to compile SQL statement
reason: near "TALE": syntax error
 --> {test_dir}/bad-config/formats/invalid-sql/init.sql:4
diff --git a/test/expected/test_format_loader.sh_a47f2b090a5d8a226783835c7ff7d1c8821f11ed.err b/test/expected/test_format_loader.sh_a47f2b090a5d8a226783835c7ff7d1c8821f11ed.err
deleted file mode 100644
index f657d87..0000000
--- a/test/expected/test_format_loader.sh_a47f2b090a5d8a226783835c7ff7d1c8821f11ed.err
+++ /dev/null
@@ -1,61 +0,0 @@
-✘ error: invalid JSON
- --> {test_dir}/bad-config-json/formats/invalid-json/format.json:4
- | parse error: object key and value must be separated by a colon (':')
- |  ar_log": { "abc" } }
- |  (right here) ------^
- | 
-✘ error: “abc(” is not a valid regular expression
- reason: missing closing parenthesis
- --> /invalid_key_log/level-pointer
- | abc( 
- |  ^ missing closing parenthesis 
- --> {test_dir}/bad-config-json/formats/invalid-key/format.json:4
- |  "level-pointer": "abc(", 
- = help: Property Synopsis
- /invalid_key_log/level-pointer
- Description
- A regular-expression that matches the JSON-pointer of the level property
-✘ error: “def[ghi” is not a valid regular expression
- reason: missing terminating ] for character class
- --> /invalid_key_log/file-pattern
- | def[ghi 
- |  ^ missing terminating ] for character class
- --> {test_dir}/bad-config-json/formats/invalid-key/format.json:5
- |  "file-pattern": "def[ghi", 
- = help: Property Synopsis
- /invalid_key_log/file-pattern
- Description
- A regular expression that restricts this format to log files with a matching name
-⚠ warning: unexpected value for property “/invalid_key_log/value/test/identifiers”
- --> {test_dir}/bad-config-json/formats/invalid-key/format.json:14
- |  "identifiers": true 
- = help: Available Properties
- kind <data-type>
- collate <function>
- unit/
- identifier <bool>
- foreign-key <bool>
- hidden <bool>
- action-list <string>
- rewriter <command>
- description <string>
-✘ error: “-1.2” is not a valid value for “/invalid_key_log/timestamp-divisor”
- reason: value cannot be less than or equal to zero
- --> {test_dir}/bad-config-json/formats/invalid-key/format.json:25
- |  "timestamp-divisor": -1.2 
- = help: Property Synopsis
- /invalid_key_log/timestamp-divisor <number>
- Description
- The value to divide a numeric timestamp by in a JSON log.
-✘ error: “foobar_log” is not a valid log format
- reason: no regexes specified
- --> {test_dir}/bad-config-json/formats/invalid-json/format.json:3
-✘ error: “foobar_log” is not a valid log format
- reason: log message samples must be included in a format definition
- --> {test_dir}/bad-config-json/formats/invalid-json/format.json:3
-✘ error: “invalid_key_log” is not a valid log format
- reason: structured logs cannot have regexes
- --> {test_dir}/bad-config-json/formats/invalid-key/format.json:4
-✘ error: invalid line format element “/invalid_key_log/line-format/0/field”
- reason: “non-existent” is not a defined value
- --> {test_dir}/bad-config-json/formats/invalid-key/format.json:22
diff --git a/test/expected/test_format_loader.sh_fca6c1fb9f3aaa69b3ffb2d1a8a86434b2f4a247.err b/test/expected/test_format_loader.sh_fca6c1fb9f3aaa69b3ffb2d1a8a86434b2f4a247.err
index 3272370..6ce508e 100644
--- a/test/expected/test_format_loader.sh_fca6c1fb9f3aaa69b3ffb2d1a8a86434b2f4a247.err
+++ b/test/expected/test_format_loader.sh_fca6c1fb9f3aaa69b3ffb2d1a8a86434b2f4a247.err
@@ -58,6 +58,10 @@
✘ error: “foobar_log” is not a valid log format
reason: log message samples must be included in a format definition
 --> {test_dir}/bad-config-json/formats/invalid-json/format.json:3
+✘ error: invalid pattern: “/invalid_key_log/regex/foo”
+ reason: no timestamp capture found in the pattern
+ --> {test_dir}/bad-config-json/formats/invalid-key/format.json:4
+ = help: all log messages need a timestamp
✘ error: “invalid_key_log” is not a valid log format
reason: structured logs cannot have regexes
 --> {test_dir}/bad-config-json/formats/invalid-key/format.json:4
diff --git a/test/expected/test_gantt.sh_3af11588ee36bab7e2caea0f7a24d3c9cafd2310.err b/test/expected/test_gantt.sh_3af11588ee36bab7e2caea0f7a24d3c9cafd2310.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_gantt.sh_3af11588ee36bab7e2caea0f7a24d3c9cafd2310.err
diff --git a/test/expected/test_gantt.sh_3af11588ee36bab7e2caea0f7a24d3c9cafd2310.out b/test/expected/test_gantt.sh_3af11588ee36bab7e2caea0f7a24d3c9cafd2310.out
new file mode 100644
index 0000000..c523914
--- /dev/null
+++ b/test/expected/test_gantt.sh_3af11588ee36bab7e2caea0f7a24d3c9cafd2310.out
@@ -0,0 +1,86 @@
+ 2011-11-03T00:17 5m 2011-11-03T00:22
+ 5m
+ Duration | ✘▲ | Operation
+ 844    CwFs1P2UcUdlSxD2La 192.168.2.76
+     CoX7zA3OJKGUOSCBY2 192.168.2.76
+     CdrfXZ1NOFPEawF218 192.168.2.76
+     CJwUi9bdB9c1lLW44  192.168.2.76
+     CJxSUgkInyKSHiju1  192.168.2.76
+     CT0JIh479jXIGt0Po1 192.168.2.76
+     C6Q4Vm14ZJIlZhsXqk 192.168.2.76
+ 1s070    CtgxRAqDLvrRUQdqe  192.168.2.76
+     CdysLK1XpcrXOpVDuh 192.168.2.76
+ 200    C6nSoj1Qco9PGyslz6 192.168.2.76
+ 23s044    CN5hnY3x51j6Hr1v4 192.168.2.76
+     CdZUPH2DKOE7zzCLE3 192.168.2.76
+ 32s388    CmWpC33jXuKpXNLcie 192.168.2.76
+     CsBgiE1WmGP4Yo749h 192.168.2.76
+ 657    CYfHyC28tAhkLYkXB7 192.168.2.76
+     CtANmVrHYMtkWqPE5  192.168.2.76
+ 647    CSTH8n1O1nv0ztxNQd 192.168.2.76
+     C4uDKU5tpeRU9Su19  192.168.2.76
+     CEh6Ka2HInkNSH01L2 192.168.2.76
+ 4s840    CjPGiy13ncXKxU765j 192.168.2.76
+ 6s895    CPoz7NUpXISemlNSd  192.168.2.76
+ 6s837    Ct6ixh35y9AEr7J7o9 192.168.2.76
+ 6s889    CaEFHq2HVQ5iGJQiD9 192.168.2.76
+ 6s875    CjinlH2fzDtvzI9637 192.168.2.76
+ 6s884    Cedw7H3ddE2yLiLoXc 192.168.2.76
+ 6s917    CAUlC249svUfE6q0g3 192.168.2.76
+     CIJIDL1ULo4HpT24Gl 192.168.2.76
+ 016    CLsqp41RLUd83arUQb 192.168.2.76
+ 166    CbCciH11995WKkobR1 192.168.2.76
+ 457    ClcvKE1dqsEFQu46m9 192.168.2.76
+     CaP2LpLGvsmX7yJO  192.168.2.76
+ 043    CNbPns4mOMGgjI8Ele 192.168.2.76
+ 557    C185u7u9Q4qhJPhzl  192.168.2.76
+ 129    CKzjfhsJ8vrn2rrfg  192.168.2.76
+ 562    CiIjAe1n5MnPOVpQ9f 192.168.2.76
+     CGv2Tp4Ngt8MmKmVRd 192.168.2.76
+ 7s071    C5DisEMFU77Wk9Kae  192.168.2.76
+     Cs5yEZ3ELZTeuTOsP4 192.168.2.76
+ 4s667    Cu4gIx1BDNtGOl7Ht2 192.168.2.76
+ 1s288    CRgW2I2zo3SInm6iT8 192.168.2.76
+     CWJhMU2cTLEnseTmCb 192.168.2.76
+ 042    CejI402rKGtdBXij4f 192.168.2.76
+     C2KnU34GcVV6amo8va 192.168.2.76
+     C5vx4911iSMAJuShFd 192.168.2.76
+     CbUCgw1DrIGcXzONB7 192.168.2.76
+ 502    C96j2X1DixgLTj2Oi8 192.168.2.76
+     CYYyja3FFNEnftw3K6 192.168.2.76
+  █  CBHHuR1xFnm5C5CQBc 192.168.2.76
+     CD1jfU3p9abEm77mzf 192.168.2.76
+     C0K9DaoPFkfnzwlZa 192.168.2.76
+ 616    CbQAWi3GX2bCmX5L56 192.168.2.76
+ 298    Cd8s2R3OGDgkhnvSu9 192.168.2.76
+ 205    CBeaXe4Iyj1gXd2Iq 192.168.2.76
+     CmWpSw3VtjiAceBCwf 192.168.2.76
+ 1m12s201    CbNCgO1MzloHRNeY4f 192.168.2.76
+ 315    CX1GjC4vn52UY1uDv6 192.168.2.76
+     CaPClb1Bf0RrRGtyWi 192.168.2.76
+ 35s642    CibfNy1QQW4ImDWRq5 192.168.2.76
+ 1m11s547    CTRXSR3blXJE5ZE7Ij 192.168.2.76
+ 1m11s536    CnGze54kQWWpKqrrZ4 192.168.2.76
+ 12s337    C3TZMB4CrUwYfkGJy1 192.168.2.76
+     CK957ERTz8lBycly4 192.168.2.76
+ 1s309    CO5QKYQkcSdxQFA35 192.168.2.76
+     CurHpb1TGZOktTRNP1 192.168.2.76
+     CuUKOQ1R3CqKBgeTdf 192.168.2.76
+     C3xkHgJnzZszVSTpi 192.168.2.76
+     CMrjgF2XLmRh9C9TR4 192.168.2.76
+     C2vQ8sVgyADHjtEda 192.168.2.76
+     CD69521bDXIAb4IkW 192.168.2.76
+ 6s648    CC3vUI3gFB04zLvWRa 192.168.2.76
+ 2s666    C7Krri4g9tZfHniGXh 192.168.2.76
+     CmxyBl2c8XAMTuHEk4 192.168.2.76
+ 499    CSvs6v26bQqFylkk6l 192.168.2.76
+     C4pHul1H3OeWYz7o7i 192.168.2.76
+     C7Lcvr4vsTf6eYpBva 192.168.2.76
+     CV8faD4L1sLL5kDwN9 192.168.2.76
+     CxyAKs10ppnHFP6O8i 192.168.2.76
+     C6MrHk2C7rLuJqhjsg 192.168.2.76
+     CvfUrT2DgYXXoZw9Ah 192.168.2.76
+     CBX0254QJoklXNbvv2 192.168.2.76
+     C6Ym6jvMgikT0xTTc 192.168.2.76
+     CRNn9f1zKNlzHSM5pa 192.168.2.76
+     CJLgi92kpp2gLgGTE5 192.168.2.76
diff --git a/test/expected/test_gantt.sh_63500be50fc6743d8312133e2030cbbc39ca15ff.err b/test/expected/test_gantt.sh_63500be50fc6743d8312133e2030cbbc39ca15ff.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_gantt.sh_63500be50fc6743d8312133e2030cbbc39ca15ff.err
diff --git a/test/expected/test_gantt.sh_63500be50fc6743d8312133e2030cbbc39ca15ff.out b/test/expected/test_gantt.sh_63500be50fc6743d8312133e2030cbbc39ca15ff.out
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_gantt.sh_63500be50fc6743d8312133e2030cbbc39ca15ff.out
diff --git a/test/expected/test_gantt.sh_74a94ee9103eac5e8e78ca57bccf49efa3827a9d.err b/test/expected/test_gantt.sh_74a94ee9103eac5e8e78ca57bccf49efa3827a9d.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_gantt.sh_74a94ee9103eac5e8e78ca57bccf49efa3827a9d.err
diff --git a/test/expected/test_gantt.sh_74a94ee9103eac5e8e78ca57bccf49efa3827a9d.out b/test/expected/test_gantt.sh_74a94ee9103eac5e8e78ca57bccf49efa3827a9d.out
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_gantt.sh_74a94ee9103eac5e8e78ca57bccf49efa3827a9d.out
diff --git a/test/expected/test_gantt.sh_83db753dd2669f801810f311e2d7d74397e10f26.err b/test/expected/test_gantt.sh_83db753dd2669f801810f311e2d7d74397e10f26.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_gantt.sh_83db753dd2669f801810f311e2d7d74397e10f26.err
diff --git a/test/expected/test_gantt.sh_83db753dd2669f801810f311e2d7d74397e10f26.out b/test/expected/test_gantt.sh_83db753dd2669f801810f311e2d7d74397e10f26.out
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_gantt.sh_83db753dd2669f801810f311e2d7d74397e10f26.out
diff --git a/test/expected/test_gantt.sh_8fed8a7400042814ba13e50be5e3bd1741d82119.err b/test/expected/test_gantt.sh_8fed8a7400042814ba13e50be5e3bd1741d82119.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_gantt.sh_8fed8a7400042814ba13e50be5e3bd1741d82119.err
diff --git a/test/expected/test_gantt.sh_8fed8a7400042814ba13e50be5e3bd1741d82119.out b/test/expected/test_gantt.sh_8fed8a7400042814ba13e50be5e3bd1741d82119.out
new file mode 100644
index 0000000..ffa9459
--- /dev/null
+++ b/test/expected/test_gantt.sh_8fed8a7400042814ba13e50be5e3bd1741d82119.out
@@ -0,0 +1,85 @@
+ 2011-11-03T00:17 5m 2011-11-03T00:22
+ 5m
+ Duration | ✘▲ | Operation
+ 844    CwFs1P2UcUdlSxD2La 192.168.2.76
+     CoX7zA3OJKGUOSCBY2 192.168.2.76
+     CdrfXZ1NOFPEawF218 192.168.2.76
+     CJwUi9bdB9c1lLW44  192.168.2.76
+     CJxSUgkInyKSHiju1  192.168.2.76
+     CT0JIh479jXIGt0Po1 192.168.2.76
+     C6Q4Vm14ZJIlZhsXqk 192.168.2.76
+ 1s070    CtgxRAqDLvrRUQdqe  192.168.2.76
+ 200    C6nSoj1Qco9PGyslz6 192.168.2.76
+ 23s044    CN5hnY3x51j6Hr1v4 192.168.2.76
+     CdZUPH2DKOE7zzCLE3 192.168.2.76
+ 32s388    CmWpC33jXuKpXNLcie 192.168.2.76
+     CsBgiE1WmGP4Yo749h 192.168.2.76
+ 657    CYfHyC28tAhkLYkXB7 192.168.2.76
+     CtANmVrHYMtkWqPE5  192.168.2.76
+ 647    CSTH8n1O1nv0ztxNQd 192.168.2.76
+     C4uDKU5tpeRU9Su19  192.168.2.76
+     CEh6Ka2HInkNSH01L2 192.168.2.76
+ 4s840    CjPGiy13ncXKxU765j 192.168.2.76
+ 6s895    CPoz7NUpXISemlNSd  192.168.2.76
+ 6s837    Ct6ixh35y9AEr7J7o9 192.168.2.76
+ 6s889    CaEFHq2HVQ5iGJQiD9 192.168.2.76
+ 6s875    CjinlH2fzDtvzI9637 192.168.2.76
+ 6s884    Cedw7H3ddE2yLiLoXc 192.168.2.76
+ 6s917    CAUlC249svUfE6q0g3 192.168.2.76
+     CIJIDL1ULo4HpT24Gl 192.168.2.76
+ 016    CLsqp41RLUd83arUQb 192.168.2.76
+ 166    CbCciH11995WKkobR1 192.168.2.76
+ 457    ClcvKE1dqsEFQu46m9 192.168.2.76
+     CaP2LpLGvsmX7yJO  192.168.2.76
+ 043    CNbPns4mOMGgjI8Ele 192.168.2.76
+ 557    C185u7u9Q4qhJPhzl  192.168.2.76
+ 129    CKzjfhsJ8vrn2rrfg  192.168.2.76
+ 562    CiIjAe1n5MnPOVpQ9f 192.168.2.76
+     CGv2Tp4Ngt8MmKmVRd 192.168.2.76
+ 7s071    C5DisEMFU77Wk9Kae  192.168.2.76
+     Cs5yEZ3ELZTeuTOsP4 192.168.2.76
+ 4s667    Cu4gIx1BDNtGOl7Ht2 192.168.2.76
+ 1s288    CRgW2I2zo3SInm6iT8 192.168.2.76
+     CWJhMU2cTLEnseTmCb 192.168.2.76
+ 042    CejI402rKGtdBXij4f 192.168.2.76
+     C2KnU34GcVV6amo8va 192.168.2.76
+     C5vx4911iSMAJuShFd 192.168.2.76
+     CbUCgw1DrIGcXzONB7 192.168.2.76
+ 502    C96j2X1DixgLTj2Oi8 192.168.2.76
+     CYYyja3FFNEnftw3K6 192.168.2.76
+  █  CBHHuR1xFnm5C5CQBc 192.168.2.76
+     CD1jfU3p9abEm77mzf 192.168.2.76
+     C0K9DaoPFkfnzwlZa 192.168.2.76
+ 616    CbQAWi3GX2bCmX5L56 192.168.2.76
+ 298    Cd8s2R3OGDgkhnvSu9 192.168.2.76
+ 205    CBeaXe4Iyj1gXd2Iq 192.168.2.76
+     CmWpSw3VtjiAceBCwf 192.168.2.76
+ 1m12s201    CbNCgO1MzloHRNeY4f 192.168.2.76
+ 315    CX1GjC4vn52UY1uDv6 192.168.2.76
+     CaPClb1Bf0RrRGtyWi 192.168.2.76
+ 35s642    CibfNy1QQW4ImDWRq5 192.168.2.76
+ 1m11s547    CTRXSR3blXJE5ZE7Ij 192.168.2.76
+ 1m11s536    CnGze54kQWWpKqrrZ4 192.168.2.76
+ 12s337    C3TZMB4CrUwYfkGJy1 192.168.2.76
+     CK957ERTz8lBycly4 192.168.2.76
+ 1s309    CO5QKYQkcSdxQFA35 192.168.2.76
+     CurHpb1TGZOktTRNP1 192.168.2.76
+     CuUKOQ1R3CqKBgeTdf 192.168.2.76
+     C3xkHgJnzZszVSTpi 192.168.2.76
+     CMrjgF2XLmRh9C9TR4 192.168.2.76
+     C2vQ8sVgyADHjtEda 192.168.2.76
+     CD69521bDXIAb4IkW 192.168.2.76
+ 6s648    CC3vUI3gFB04zLvWRa 192.168.2.76
+ 2s666    C7Krri4g9tZfHniGXh 192.168.2.76
+     CmxyBl2c8XAMTuHEk4 192.168.2.76
+ 499    CSvs6v26bQqFylkk6l 192.168.2.76
+     C4pHul1H3OeWYz7o7i 192.168.2.76
+     C7Lcvr4vsTf6eYpBva 192.168.2.76
+     CV8faD4L1sLL5kDwN9 192.168.2.76
+     CxyAKs10ppnHFP6O8i 192.168.2.76
+     C6MrHk2C7rLuJqhjsg 192.168.2.76
+     CvfUrT2DgYXXoZw9Ah 192.168.2.76
+     CBX0254QJoklXNbvv2 192.168.2.76
+     C6Ym6jvMgikT0xTTc 192.168.2.76
+     CRNn9f1zKNlzHSM5pa 192.168.2.76
+     CJLgi92kpp2gLgGTE5 192.168.2.76
diff --git a/test/expected/test_gantt.sh_b013ab41c3cca76cf05a01ca1ba65888be247ada.err b/test/expected/test_gantt.sh_b013ab41c3cca76cf05a01ca1ba65888be247ada.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_gantt.sh_b013ab41c3cca76cf05a01ca1ba65888be247ada.err
diff --git a/test/expected/test_gantt.sh_b013ab41c3cca76cf05a01ca1ba65888be247ada.out b/test/expected/test_gantt.sh_b013ab41c3cca76cf05a01ca1ba65888be247ada.out
new file mode 100644
index 0000000..67a56e3
--- /dev/null
+++ b/test/expected/test_gantt.sh_b013ab41c3cca76cf05a01ca1ba65888be247ada.out
@@ -0,0 +1,70 @@
+ 2011-11-03T00:17 5m 2011-11-03T00:22
+ 5m
+ Duration | ✘▲ | Operation
+ 23s044    CN5hnY3x51j6Hr1v4 192.168.2.76
+ 32s388    CmWpC33jXuKpXNLcie 192.168.2.76
+     CEh6Ka2HInkNSH01L2 192.168.2.76
+ 4s840    CjPGiy13ncXKxU765j 192.168.2.76
+ 6s895    CPoz7NUpXISemlNSd  192.168.2.76
+ 6s837    Ct6ixh35y9AEr7J7o9 192.168.2.76
+ 6s889    CaEFHq2HVQ5iGJQiD9 192.168.2.76
+ 6s875    CjinlH2fzDtvzI9637 192.168.2.76
+ 6s884    Cedw7H3ddE2yLiLoXc 192.168.2.76
+ 6s917    CAUlC249svUfE6q0g3 192.168.2.76
+     CIJIDL1ULo4HpT24Gl 192.168.2.76
+ 016    CLsqp41RLUd83arUQb 192.168.2.76
+ 166    CbCciH11995WKkobR1 192.168.2.76
+ 457    ClcvKE1dqsEFQu46m9 192.168.2.76
+     CaP2LpLGvsmX7yJO  192.168.2.76
+ 043    CNbPns4mOMGgjI8Ele 192.168.2.76
+ 557    C185u7u9Q4qhJPhzl  192.168.2.76
+ 129    CKzjfhsJ8vrn2rrfg  192.168.2.76
+ 562    CiIjAe1n5MnPOVpQ9f 192.168.2.76
+     CGv2Tp4Ngt8MmKmVRd 192.168.2.76
+ 7s071    C5DisEMFU77Wk9Kae  192.168.2.76
+     Cs5yEZ3ELZTeuTOsP4 192.168.2.76
+ 4s667    Cu4gIx1BDNtGOl7Ht2 192.168.2.76
+ 1s288    CRgW2I2zo3SInm6iT8 192.168.2.76
+     CWJhMU2cTLEnseTmCb 192.168.2.76
+ 042    CejI402rKGtdBXij4f 192.168.2.76
+     C2KnU34GcVV6amo8va 192.168.2.76
+     C5vx4911iSMAJuShFd 192.168.2.76
+     CbUCgw1DrIGcXzONB7 192.168.2.76
+ 502    C96j2X1DixgLTj2Oi8 192.168.2.76
+     CYYyja3FFNEnftw3K6 192.168.2.76
+  █  CBHHuR1xFnm5C5CQBc 192.168.2.76
+     CD1jfU3p9abEm77mzf 192.168.2.76
+     C0K9DaoPFkfnzwlZa 192.168.2.76
+ 616    CbQAWi3GX2bCmX5L56 192.168.2.76
+ 298    Cd8s2R3OGDgkhnvSu9 192.168.2.76
+ 205    CBeaXe4Iyj1gXd2Iq 192.168.2.76
+     CmWpSw3VtjiAceBCwf 192.168.2.76
+ 1m12s201    CbNCgO1MzloHRNeY4f 192.168.2.76
+ 315    CX1GjC4vn52UY1uDv6 192.168.2.76
+     CaPClb1Bf0RrRGtyWi 192.168.2.76
+ 35s642    CibfNy1QQW4ImDWRq5 192.168.2.76
+ 1m11s547    CTRXSR3blXJE5ZE7Ij 192.168.2.76
+ 1m11s536    CnGze54kQWWpKqrrZ4 192.168.2.76
+ 12s337    C3TZMB4CrUwYfkGJy1 192.168.2.76
+     CK957ERTz8lBycly4 192.168.2.76
+ 1s309    CO5QKYQkcSdxQFA35 192.168.2.76
+     CurHpb1TGZOktTRNP1 192.168.2.76
+     CuUKOQ1R3CqKBgeTdf 192.168.2.76
+     C3xkHgJnzZszVSTpi 192.168.2.76
+     CMrjgF2XLmRh9C9TR4 192.168.2.76
+     C2vQ8sVgyADHjtEda 192.168.2.76
+     CD69521bDXIAb4IkW 192.168.2.76
+ 6s648    CC3vUI3gFB04zLvWRa 192.168.2.76
+ 2s666    C7Krri4g9tZfHniGXh 192.168.2.76
+     CmxyBl2c8XAMTuHEk4 192.168.2.76
+ 499    CSvs6v26bQqFylkk6l 192.168.2.76
+     C4pHul1H3OeWYz7o7i 192.168.2.76
+     C7Lcvr4vsTf6eYpBva 192.168.2.76
+     CV8faD4L1sLL5kDwN9 192.168.2.76
+     CxyAKs10ppnHFP6O8i 192.168.2.76
+     C6MrHk2C7rLuJqhjsg 192.168.2.76
+     CvfUrT2DgYXXoZw9Ah 192.168.2.76
+     CBX0254QJoklXNbvv2 192.168.2.76
+     C6Ym6jvMgikT0xTTc 192.168.2.76
+     CRNn9f1zKNlzHSM5pa 192.168.2.76
+     CJLgi92kpp2gLgGTE5 192.168.2.76
diff --git a/test/expected/test_gantt.sh_cde7947f361e5f3d4cd1bbc3f7458f426b6a8eb4.err b/test/expected/test_gantt.sh_cde7947f361e5f3d4cd1bbc3f7458f426b6a8eb4.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_gantt.sh_cde7947f361e5f3d4cd1bbc3f7458f426b6a8eb4.err
diff --git a/test/expected/test_gantt.sh_cde7947f361e5f3d4cd1bbc3f7458f426b6a8eb4.out b/test/expected/test_gantt.sh_cde7947f361e5f3d4cd1bbc3f7458f426b6a8eb4.out
new file mode 100644
index 0000000..75ceff3
--- /dev/null
+++ b/test/expected/test_gantt.sh_cde7947f361e5f3d4cd1bbc3f7458f426b6a8eb4.out
@@ -0,0 +1,4 @@
+ 2011-11-03T00:17 5m 2011-11-03T00:22
+ 5m
+ Duration | ✘▲ | Operation
+     CdysLK1XpcrXOpVDuh 192.168.2.76
diff --git a/test/expected/test_gantt.sh_e6a4681a5a671c84c020dc91d7ce03c9d17fde07.err b/test/expected/test_gantt.sh_e6a4681a5a671c84c020dc91d7ce03c9d17fde07.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_gantt.sh_e6a4681a5a671c84c020dc91d7ce03c9d17fde07.err
diff --git a/test/expected/test_gantt.sh_e6a4681a5a671c84c020dc91d7ce03c9d17fde07.out b/test/expected/test_gantt.sh_e6a4681a5a671c84c020dc91d7ce03c9d17fde07.out
new file mode 100644
index 0000000..8e609b1
--- /dev/null
+++ b/test/expected/test_gantt.sh_e6a4681a5a671c84c020dc91d7ce03c9d17fde07.out
@@ -0,0 +1,70 @@
+ 2011-11-03T00:17 5m 2011-11-03T00:22
+ 5m
+ Duration | ✘▲ | Operation
+ 844    CwFs1P2UcUdlSxD2La 192.168.2.76
+     CoX7zA3OJKGUOSCBY2 192.168.2.76
+     CdrfXZ1NOFPEawF218 192.168.2.76
+     CJwUi9bdB9c1lLW44  192.168.2.76
+     CJxSUgkInyKSHiju1  192.168.2.76
+     CT0JIh479jXIGt0Po1 192.168.2.76
+     C6Q4Vm14ZJIlZhsXqk 192.168.2.76
+ 1s070    CtgxRAqDLvrRUQdqe  192.168.2.76
+     CdysLK1XpcrXOpVDuh 192.168.2.76
+ 200    C6nSoj1Qco9PGyslz6 192.168.2.76
+ 23s044    CN5hnY3x51j6Hr1v4 192.168.2.76
+     CdZUPH2DKOE7zzCLE3 192.168.2.76
+ 32s388    CmWpC33jXuKpXNLcie 192.168.2.76
+     CsBgiE1WmGP4Yo749h 192.168.2.76
+ 657    CYfHyC28tAhkLYkXB7 192.168.2.76
+     CtANmVrHYMtkWqPE5  192.168.2.76
+ 647    CSTH8n1O1nv0ztxNQd 192.168.2.76
+     C4uDKU5tpeRU9Su19  192.168.2.76
+     CEh6Ka2HInkNSH01L2 192.168.2.76
+ 4s840    CjPGiy13ncXKxU765j 192.168.2.76
+ 6s895    CPoz7NUpXISemlNSd  192.168.2.76
+ 6s837    Ct6ixh35y9AEr7J7o9 192.168.2.76
+ 6s889    CaEFHq2HVQ5iGJQiD9 192.168.2.76
+ 6s875    CjinlH2fzDtvzI9637 192.168.2.76
+ 6s884    Cedw7H3ddE2yLiLoXc 192.168.2.76
+ 6s917    CAUlC249svUfE6q0g3 192.168.2.76
+     CIJIDL1ULo4HpT24Gl 192.168.2.76
+ 016    CLsqp41RLUd83arUQb 192.168.2.76
+ 166    CbCciH11995WKkobR1 192.168.2.76
+ 457    ClcvKE1dqsEFQu46m9 192.168.2.76
+     CaP2LpLGvsmX7yJO  192.168.2.76
+ 043    CNbPns4mOMGgjI8Ele 192.168.2.76
+ 557    C185u7u9Q4qhJPhzl  192.168.2.76
+ 129    CKzjfhsJ8vrn2rrfg  192.168.2.76
+ 562    CiIjAe1n5MnPOVpQ9f 192.168.2.76
+     CGv2Tp4Ngt8MmKmVRd 192.168.2.76
+ 7s071    C5DisEMFU77Wk9Kae  192.168.2.76
+     Cs5yEZ3ELZTeuTOsP4 192.168.2.76
+ 4s667    Cu4gIx1BDNtGOl7Ht2 192.168.2.76
+ 1s288    CRgW2I2zo3SInm6iT8 192.168.2.76
+     CWJhMU2cTLEnseTmCb 192.168.2.76
+ 042    CejI402rKGtdBXij4f 192.168.2.76
+     C2KnU34GcVV6amo8va 192.168.2.76
+     C5vx4911iSMAJuShFd 192.168.2.76
+     CbUCgw1DrIGcXzONB7 192.168.2.76
+ 502    C96j2X1DixgLTj2Oi8 192.168.2.76
+     CYYyja3FFNEnftw3K6 192.168.2.76
+  █  CBHHuR1xFnm5C5CQBc 192.168.2.76
+     CD1jfU3p9abEm77mzf 192.168.2.76
+     C0K9DaoPFkfnzwlZa 192.168.2.76
+ 616    CbQAWi3GX2bCmX5L56 192.168.2.76
+ 298    Cd8s2R3OGDgkhnvSu9 192.168.2.76
+ 205    CBeaXe4Iyj1gXd2Iq 192.168.2.76
+     CmWpSw3VtjiAceBCwf 192.168.2.76
+ 1m12s201    CbNCgO1MzloHRNeY4f 192.168.2.76
+ 315    CX1GjC4vn52UY1uDv6 192.168.2.76
+     CaPClb1Bf0RrRGtyWi 192.168.2.76
+ 35s642    CibfNy1QQW4ImDWRq5 192.168.2.76
+ 1m11s547    CTRXSR3blXJE5ZE7Ij 192.168.2.76
+ 1m11s536    CnGze54kQWWpKqrrZ4 192.168.2.76
+ 12s337    C3TZMB4CrUwYfkGJy1 192.168.2.76
+     CK957ERTz8lBycly4 192.168.2.76
+ 1s309    CO5QKYQkcSdxQFA35 192.168.2.76
+     CurHpb1TGZOktTRNP1 192.168.2.76
+     CuUKOQ1R3CqKBgeTdf 192.168.2.76
+     C3xkHgJnzZszVSTpi 192.168.2.76
+     CMrjgF2XLmRh9C9TR4 192.168.2.76
diff --git a/test/expected/test_json_format.sh_168cac40c27f547044c89d39eb0ff2ef81da4b21.out b/test/expected/test_json_format.sh_168cac40c27f547044c89d39eb0ff2ef81da4b21.out
index 55657f7..dd6c9d2 100644
--- a/test/expected/test_json_format.sh_168cac40c27f547044c89d39eb0ff2ef81da4b21.out
+++ b/test/expected/test_json_format.sh_168cac40c27f547044c89d39eb0ff2ef81da4b21.out
@@ -1,11 +1,11 @@
-{"ts": "2013-09-06T20:00:48.124817Z", "lvl": "TRACE", "msg": "trace test"}
-{"ts": "2013-09-06T20:00:49.124817Z", "lvl": "INFO", "msg": "Starting up \u001B[0;32mservice\u001B[0m"}
+{"ts": "2013-09-06T20:00:48.124817Z", "logger": "com.example.foo.bar.bazzer", "lvl": "TRACE", "msg": "trace test"}
+{"ts": "2013-09-06T20:00:49.124817Z", "logger": "com.example.demo", "lvl": "INFO", "msg": "Starting up \u001B[0;32mservice\u001B[0m"}
{"ts": "2013-09-06T22:00:49.124817Z", "lvl": "INFO", "msg": "Shutting down service", "user": "steve@example.com"}
-{"ts": "2013-09-06T22:00:59.124817Z", "lvl": "DEBUG5", "msg": "Details...\n"}
-{"ts": "2013-09-06T22:00:59.124817Z", "lvl": "DEBUG4", "msg": "Details...\n"}
+{"ts": "2013-09-06T22:00:59.124817Z", "lvl": "DEBUG5", "msg": "D\bDetails...\n"}
+{"ts": "2013-09-06T22:00:59.124817Z", "lvl": "DEBUG4", "msg": "D\bDe\betails...\n"}
{"ts": "2013-09-06T22:00:59.124817Z", "lvl": "DEBUG3", "msg": "Details...\n"}
{"ts": "2013-09-06T22:00:59.124817Z", "lvl": "DEBUG2", "msg": "Details...\n"}
-{"ts": "2013-09-06T22:00:59.124817Z", "lvl": "DEBUG", "msg": "Details..."}
+{"ts": "2013-09-06 22:01:00Z", "lvl": "DEBUG", "msg": "Details..."}
{"ts": "2013-09-06T22:01:49.124817Z", "lvl": "STATS", "msg": "1 beat per second"}
{"ts": "2013-09-06T22:01:49.124817Z", "lvl": "WARNING", "msg": "not looking good"}
{"ts": "2013-09-06T22:01:49.124817Z", "lvl": "ERROR", "msg": "looking bad"}
diff --git a/test/expected/test_json_format.sh_1bb0fd243e916546aea22029245ac590dae17a86.out b/test/expected/test_json_format.sh_1bb0fd243e916546aea22029245ac590dae17a86.out
index 59872f2..c85be78 100644
--- a/test/expected/test_json_format.sh_1bb0fd243e916546aea22029245ac590dae17a86.out
+++ b/test/expected/test_json_format.sh_1bb0fd243e916546aea22029245ac590dae17a86.out
@@ -1,14 +1,14 @@
-log_line,log_part,log_time,log_idle_msecs,log_level,log_mark,log_comment,log_tags,log_filters,@fields/user,@fields/trace#
-0,<NULL>,2013-09-06 20:00:48.124,0,trace,0,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>
-2,<NULL>,2013-09-06 20:00:49.124,1000,info,0,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>
-4,<NULL>,2013-09-06 22:00:49.124,7200000,info,0,<NULL>,<NULL>,<NULL>,steve@example.com,<NULL>
-7,<NULL>,2013-09-06 22:00:59.124,10000,debug5,0,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>
-9,<NULL>,2013-09-06 22:00:59.124,0,debug4,0,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>
-11,<NULL>,2013-09-06 22:00:59.124,0,debug3,0,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>
-13,<NULL>,2013-09-06 22:00:59.124,0,debug2,0,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>
-15,<NULL>,2013-09-06 22:00:59.124,0,debug,0,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>
-17,<NULL>,2013-09-06 22:01:49.124,50000,stats,0,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>
-19,<NULL>,2013-09-06 22:01:49.124,0,warning,0,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>
-21,<NULL>,2013-09-06 22:01:49.124,0,error,0,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>
-23,<NULL>,2013-09-06 22:01:49.124,0,critical,0,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>
-25,<NULL>,2013-09-06 22:01:49.124,0,fatal,0,<NULL>,<NULL>,<NULL>,<NULL>,line:1
+log_line,log_time,log_level,@fields/user,@fields/trace#,log_part,log_idle_msecs,log_mark,log_comment,log_tags,log_annotations,log_filters
+0,2013-09-06 20:00:48.124,trace,<NULL>,<NULL>,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>
+2,2013-09-06 20:00:49.124,info,<NULL>,<NULL>,<NULL>,1000,0,<NULL>,<NULL>,<NULL>,<NULL>
+4,2013-09-06 22:00:49.124,info,steve@example.com,<NULL>,<NULL>,7200000,0,<NULL>,<NULL>,<NULL>,<NULL>
+7,2013-09-06 22:00:59.124,debug5,<NULL>,<NULL>,<NULL>,10000,0,<NULL>,<NULL>,<NULL>,<NULL>
+9,2013-09-06 22:00:59.124,debug4,<NULL>,<NULL>,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>
+11,2013-09-06 22:00:59.124,debug3,<NULL>,<NULL>,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>
+13,2013-09-06 22:00:59.124,debug2,<NULL>,<NULL>,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>
+15,2013-09-06 22:00:59.124,debug,<NULL>,<NULL>,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>
+17,2013-09-06 22:01:49.124,stats,<NULL>,<NULL>,<NULL>,50000,0,<NULL>,<NULL>,<NULL>,<NULL>
+19,2013-09-06 22:01:49.124,warning,<NULL>,<NULL>,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>
+21,2013-09-06 22:01:49.124,error,<NULL>,<NULL>,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>
+23,2013-09-06 22:01:49.124,critical,<NULL>,<NULL>,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>
+25,2013-09-06 22:01:49.124,fatal,<NULL>,line:1,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>
diff --git a/test/expected/test_json_format.sh_40223ac4742883f883ccc61044bfffd6e102cca6.out b/test/expected/test_json_format.sh_40223ac4742883f883ccc61044bfffd6e102cca6.out
index 0dc139f..53d473d 100644
--- a/test/expected/test_json_format.sh_40223ac4742883f883ccc61044bfffd6e102cca6.out
+++ b/test/expected/test_json_format.sh_40223ac4742883f883ccc61044bfffd6e102cca6.out
@@ -1,194 +1,212 @@
[
{
"log_line": 0,
- "log_part": null,
"log_time": "2013-09-06 20:00:48.124",
- "log_idle_msecs": 0,
"log_level": "trace",
- "log_mark": 0,
- "log_comment": null,
- "log_tags": null,
- "log_filters": null,
"arr": null,
"obj": null,
+ "logger": "com.example.foo.bar.bazzer",
"lvl": "TRACE",
- "user": null
+ "user": null,
+ "log_part": null,
+ "log_idle_msecs": 0,
+ "log_mark": 0,
+ "log_comment": null,
+ "log_tags": null,
+ "log_annotations": null,
+ "log_filters": null
},
{
"log_line": 2,
- "log_part": null,
"log_time": "2013-09-06 20:00:49.124",
- "log_idle_msecs": 1000,
"log_level": "info",
- "log_mark": 0,
- "log_comment": null,
- "log_tags": null,
- "log_filters": null,
"arr": null,
"obj": null,
+ "logger": "com.example.demo",
"lvl": "INFO",
- "user": null
+ "user": null,
+ "log_part": null,
+ "log_idle_msecs": 1000,
+ "log_mark": 0,
+ "log_comment": null,
+ "log_tags": null,
+ "log_annotations": null,
+ "log_filters": null
},
{
"log_line": 4,
- "log_part": null,
"log_time": "2013-09-06 22:00:49.124",
- "log_idle_msecs": 7200000,
"log_level": "info",
- "log_mark": 0,
- "log_comment": null,
- "log_tags": null,
- "log_filters": null,
"arr": null,
"obj": null,
+ "logger": null,
"lvl": "INFO",
- "user": "steve@example.com"
+ "user": "steve@example.com",
+ "log_part": null,
+ "log_idle_msecs": 7200000,
+ "log_mark": 0,
+ "log_comment": null,
+ "log_tags": null,
+ "log_annotations": null,
+ "log_filters": null
},
{
"log_line": 7,
- "log_part": null,
"log_time": "2013-09-06 22:00:59.124",
- "log_idle_msecs": 10000,
"log_level": "debug5",
- "log_mark": 0,
- "log_comment": null,
- "log_tags": null,
- "log_filters": null,
"arr": null,
"obj": null,
+ "logger": null,
"lvl": "DEBUG5",
- "user": null
+ "user": null,
+ "log_part": null,
+ "log_idle_msecs": 10000,
+ "log_mark": 0,
+ "log_comment": null,
+ "log_tags": null,
+ "log_annotations": null,
+ "log_filters": null
},
{
"log_line": 9,
- "log_part": null,
"log_time": "2013-09-06 22:00:59.124",
- "log_idle_msecs": 0,
"log_level": "debug4",
- "log_mark": 0,
- "log_comment": null,
- "log_tags": null,
- "log_filters": null,
"arr": null,
"obj": null,
+ "logger": null,
"lvl": "DEBUG4",
- "user": null
- },
- {
- "log_line": 11,
+ "user": null,
"log_part": null,
- "log_time": "2013-09-06 22:00:59.124",
"log_idle_msecs": 0,
- "log_level": "debug3",
"log_mark": 0,
"log_comment": null,
"log_tags": null,
- "log_filters": null,
+ "log_annotations": null,
+ "log_filters": null
+ },
+ {
+ "log_line": 11,
+ "log_time": "2013-09-06 22:00:59.124",
+ "log_level": "debug3",
"arr": null,
"obj": null,
+ "logger": null,
"lvl": "DEBUG3",
- "user": null
- },
- {
- "log_line": 13,
+ "user": null,
"log_part": null,
- "log_time": "2013-09-06 22:00:59.124",
"log_idle_msecs": 0,
- "log_level": "debug2",
"log_mark": 0,
"log_comment": null,
"log_tags": null,
- "log_filters": null,
+ "log_annotations": null,
+ "log_filters": null
+ },
+ {
+ "log_line": 13,
+ "log_time": "2013-09-06 22:00:59.124",
+ "log_level": "debug2",
"arr": null,
"obj": null,
+ "logger": null,
"lvl": "DEBUG2",
- "user": null
- },
- {
- "log_line": 15,
+ "user": null,
"log_part": null,
- "log_time": "2013-09-06 22:00:59.124",
"log_idle_msecs": 0,
- "log_level": "debug",
"log_mark": 0,
"log_comment": null,
"log_tags": null,
- "log_filters": null,
+ "log_annotations": null,
+ "log_filters": null
+ },
+ {
+ "log_line": 15,
+ "log_time": "2013-09-06 22:01:00.000",
+ "log_level": "debug",
"arr": null,
"obj": null,
+ "logger": null,
"lvl": "DEBUG",
- "user": null
+ "user": null,
+ "log_part": null,
+ "log_idle_msecs": 876,
+ "log_mark": 0,
+ "log_comment": null,
+ "log_tags": null,
+ "log_annotations": null,
+ "log_filters": null
},
{
"log_line": 17,
- "log_part": null,
"log_time": "2013-09-06 22:01:49.124",
- "log_idle_msecs": 50000,
"log_level": "stats",
- "log_mark": 0,
- "log_comment": null,
- "log_tags": null,
- "log_filters": null,
"arr": null,
"obj": null,
+ "logger": null,
"lvl": "STATS",
- "user": null
+ "user": null,
+ "log_part": null,
+ "log_idle_msecs": 49124,
+ "log_mark": 0,
+ "log_comment": null,
+ "log_tags": null,
+ "log_annotations": null,
+ "log_filters": null
},
{
"log_line": 19,
- "log_part": null,
"log_time": "2013-09-06 22:01:49.124",
- "log_idle_msecs": 0,
"log_level": "warning",
- "log_mark": 0,
- "log_comment": null,
- "log_tags": null,
- "log_filters": null,
"arr": null,
"obj": null,
+ "logger": null,
"lvl": "WARNING",
- "user": null
- },
- {
- "log_line": 21,
+ "user": null,
"log_part": null,
- "log_time": "2013-09-06 22:01:49.124",
"log_idle_msecs": 0,
- "log_level": "error",
"log_mark": 0,
"log_comment": null,
"log_tags": null,
- "log_filters": null,
+ "log_annotations": null,
+ "log_filters": null
+ },
+ {
+ "log_line": 21,
+ "log_time": "2013-09-06 22:01:49.124",
+ "log_level": "error",
"arr": null,
"obj": null,
+ "logger": null,
"lvl": "ERROR",
- "user": null
- },
- {
- "log_line": 23,
+ "user": null,
"log_part": null,
- "log_time": "2013-09-06 22:01:49.124",
"log_idle_msecs": 0,
- "log_level": "critical",
"log_mark": 0,
"log_comment": null,
"log_tags": null,
- "log_filters": null,
+ "log_annotations": null,
+ "log_filters": null
+ },
+ {
+ "log_line": 23,
+ "log_time": "2013-09-06 22:01:49.124",
+ "log_level": "critical",
"arr": null,
"obj": null,
+ "logger": null,
"lvl": "CRITICAL",
- "user": null
- },
- {
- "log_line": 25,
+ "user": null,
"log_part": null,
- "log_time": "2013-09-06 22:01:49.124",
"log_idle_msecs": 0,
- "log_level": "fatal",
"log_mark": 0,
"log_comment": null,
"log_tags": null,
- "log_filters": null,
+ "log_annotations": null,
+ "log_filters": null
+ },
+ {
+ "log_line": 25,
+ "log_time": "2013-09-06 22:01:49.124",
+ "log_level": "fatal",
"arr": [
"hi",
{
@@ -199,7 +217,15 @@
"field1": "hi",
"field2": 2
},
+ "logger": null,
"lvl": "FATAL",
- "user": null
+ "user": null,
+ "log_part": null,
+ "log_idle_msecs": 0,
+ "log_mark": 0,
+ "log_comment": null,
+ "log_tags": null,
+ "log_annotations": null,
+ "log_filters": null
}
]
diff --git a/test/expected/test_json_format.sh_4315a3d6124c14cbe3c474b6dbf4cc8720a9859f.out b/test/expected/test_json_format.sh_4315a3d6124c14cbe3c474b6dbf4cc8720a9859f.out
index 9b7fbf1..2063d71 100644
--- a/test/expected/test_json_format.sh_4315a3d6124c14cbe3c474b6dbf4cc8720a9859f.out
+++ b/test/expected/test_json_format.sh_4315a3d6124c14cbe3c474b6dbf4cc8720a9859f.out
@@ -1,3 +1,3 @@
-2017-03-24T20:06:26.240 1.1.1.1 GET 200 443 /example/uri/5
-2017-03-24T20:12:47.764 1.1.1.1 GET 500 4433 /example/uri/5
-2017-03-24T20:15:31.694 1.1.1.1 GET 400 44345 /example/uri/5
+2017-03-24T20:06:26.240Z 1.1.1.1 GET 200 443 /example/uri/5
+2017-03-24T20:12:47.764Z 1.1.1.1 GET 500 4433 /example/uri/5
+2017-03-24T20:15:31.694Z 1.1.1.1 GET 400 44345 /example/uri/5
diff --git a/test/expected/test_json_format.sh_469f005b0708d629bc95f0c48a5e390f440c1fef.out b/test/expected/test_json_format.sh_469f005b0708d629bc95f0c48a5e390f440c1fef.out
index ee41abb..8a1d53c 100644
--- a/test/expected/test_json_format.sh_469f005b0708d629bc95f0c48a5e390f440c1fef.out
+++ b/test/expected/test_json_format.sh_469f005b0708d629bc95f0c48a5e390f440c1fef.out
@@ -1,29 +1,29 @@
-[2013-09-06T20:00:48.124] TRACE trace test
+[2013-09-06T20:00:48.124817Z] ⋮ <c.e.foo.bar.bazzer > trace test
-[2013-09-06T20:00:49.124] INFO Starting up service
+[2013-09-06T20:00:49.124817Z] ⋮ <com.example.demo > Starting up service
-[2013-09-06T22:00:49.124] INFO Shutting down service
+[2013-09-06T22:00:49.124817Z] ⋮ Shutting down service
user: steve@example.com
-[2013-09-06T22:00:59.124] DEBUG5 Details...
+[2013-09-06T22:00:59.124817Z] ⋮ Details...
-[2013-09-06T22:00:59.124] DEBUG4 Details...
+[2013-09-06T22:00:59.124817Z] ⋮ Details...
-[2013-09-06T22:00:59.124] DEBUG3 Details...
+[2013-09-06T22:00:59.124817Z] ⋮ Details...
-[2013-09-06T22:00:59.124] DEBUG2 Details...
+[2013-09-06T22:00:59.124817Z] ⋮ Details...
-[2013-09-06T22:00:59.124] DEBUG Details...
+[2013-09-06 22:01:00Z] ⋮ Details...
-[2013-09-06T22:01:49.124] STATS 1 beat per second
+[2013-09-06T22:01:49.124817Z] ⋮ 1 beat per second
-[2013-09-06T22:01:49.124] WARNING not looking good
+[2013-09-06T22:01:49.124817Z] ⋮ not looking good
-[2013-09-06T22:01:49.124] ERROR looking bad
+[2013-09-06T22:01:49.124817Z] ⋮ looking bad
-[2013-09-06T22:01:49.124] CRITICAL sooo bad
+[2013-09-06T22:01:49.124817Z] ⋮ sooo bad
-[2013-09-06T22:01:49.124] FATAL shoot
+[2013-09-06T22:01:49.124817Z] ⋮ shoot
 obj: { "field1" : "hi", "field2": 2 }
 arr: ["hi", {"sub1": true}]
diff --git a/test/expected/test_json_format.sh_5795c5ffd98ae581b30c6f0983349bf7a6a84501.err b/test/expected/test_json_format.sh_5795c5ffd98ae581b30c6f0983349bf7a6a84501.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_json_format.sh_5795c5ffd98ae581b30c6f0983349bf7a6a84501.err
diff --git a/test/expected/test_json_format.sh_5795c5ffd98ae581b30c6f0983349bf7a6a84501.out b/test/expected/test_json_format.sh_5795c5ffd98ae581b30c6f0983349bf7a6a84501.out
new file mode 100644
index 0000000..94d521d
--- /dev/null
+++ b/test/expected/test_json_format.sh_5795c5ffd98ae581b30c6f0983349bf7a6a84501.out
@@ -0,0 +1,52 @@
+2024-01-01T15:00:00Z MemberEvent mujianwu added Envoy-Z-Lab to Uotan-Dev/UotanWorkStation-ROM-Builder
+2024-01-01T15:00:00Z PushEvent mdmaid69 committed “float further safety possibly strike” to mdmaid69/reimagined-giggle
+2024-01-01T15:00:00Z ForkEvent SynthWave-Systems forked SynthWave-Systems/ampleforth-contracts from ampleforth/ampleforth-contracts
+2024-01-01T15:00:00Z PullRequestEvent tobexyz closed pull-request #90 “merge latest release to master” in tobexyz/yaacc-code
+2024-01-01T15:00:00Z PushEvent dim12512a committed “Empty Commit” to dim12512a/Repo5
+2024-01-01T15:00:00Z PushEvent github-shvabra committed “new change” to saby/ios-sabycom
+2024-01-01T15:00:00Z CreateEvent roman1923 repository off main in roman1923/no-woo-small-cta-fast-food-shop
+2024-01-01T15:00:00Z PushEvent appref5555ix63 committed “Empty Commit” to appref5555ix63/Repo4
+2024-01-01T15:00:00Z PullRequestReviewEvent megusasuke0 created review 1799820649 for pull-request #1 “Feature/lesson01” in megusasuke0/frontendhandson
+2024-01-01T15:00:00Z PushEvent dim12512a committed “Empty Commit” to dim12512a/Repo6
+2024-01-01T15:00:00Z ForkEvent Shadowxiaomo forked Shadowxiaomo/MemDumper from kp7742/MemDumper
+2024-01-01T15:00:00Z PushEvent Jinyeong1611 committed “방향값 추가” to Jinyeong1611/pacman
+2024-01-01T15:00:00Z PullRequestEvent dependabot closed pull-request #911 “Bump @storybook/addon-a11y from 7.5.3 to 7.6.3” in DNNCommunity/dnn-elements
+2024-01-01T15:00:01Z PushEvent ColeMalinchock1 committed “Update backup JSON file” to ColeMalinchock1/HGT-JSON-Server
+2024-01-01T15:00:01Z PushEvent uyenlexx committed “update navbar and search” to HoanqDucAnh/Keebie
+2024-01-01T15:00:01Z DeleteEvent direwolf-github branch direwolf-github/ephemeral-ci-f72a7b4a
+2024-01-01T15:00:01Z PushEvent Zarakkhan-dev committed “khtam” to Zarakkhan-dev/LegalaiAssistentBackend
+2024-01-01T15:00:01Z PushEvent appref5555ix63 committed “Empty Commit” to appref5555ix63/Repo2
+2024-01-01T15:00:01Z ForkEvent tarinisunil forked tarinisunil/Get_Better_at_CP_in_2_Months from sahilbansal17/Get_Better_at_CP_in_2_Months
+2024-01-01T15:00:01Z ForkEvent jackblack369 forked jackblack369/danswer from danswer-ai/danswer
+2024-01-01T15:00:01Z ForkEvent vineetp6 forked vineetp6/pydub from jiaaro/pydub
+2024-01-01T15:00:01Z PushEvent lhduc94 committed “push book” to lhduc94/kungfupandas
+2024-01-01T15:00:01Z PushEvent ranadebsaha committed “Add files via upload” to ranadebsaha/DSA
+2024-01-01T15:00:01Z PushEvent harmanpa committed “Add ability for STL and DXF parsers to read from InputStream rather than just files” to harmanpa/jgeom
+2024-01-01T15:00:01Z PushEvent dim12512a committed “Empty Commit” to dim12512a/Repo6
+2024-01-01T15:00:01Z PushEvent namson26 committed “ industry talk PPG and Habib” to namson26/Technology-Information-System
+2024-01-01T15:00:01Z PushEvent mdmaid69 committed “last recover hurt off claim” to mdmaid69/reimagined-giggle
+2024-01-01T15:00:01Z PushEvent dim12512a committed “Empty Commit” to dim12512a/Repo7
+2024-01-01T15:00:01Z PullRequestEvent tomgransden closed pull-request #26 “Dev/tg/add firestore” in tomgransden/MyTummyHurtsApp
+2024-01-01T15:00:01Z PushEvent dim12512a committed “Empty Commit” to dim12512a/Repo7
+2024-01-01T15:00:01Z PushEvent vedant-z committed “Update to 2 in STEP and README.md” to Exp-Intro-to-GitHub-Flow-Cohort-1/series-intro-to-github-flow-vedant-z
+ payload/commits#/message: Create PROFILE.md
+ payload/commits#/message: Update to 3 in STEP and README.md
+2024-01-01T15:00:01Z WatchEvent morteza-rp started MasoudKaviani/filoger_fanap_402
+2024-01-01T15:00:01Z PushEvent B74LABgit committed “committing files” to B74LABgit/CAM
+2024-01-01T15:00:01Z PushEvent sdhz151 sdhz153/Actions-OpenWrt
+2024-01-01T15:00:01Z CreateEvent UjjawalSah repository off main in UjjawalSah/ModernFarming
+2024-01-01T15:00:01Z PushEvent wodcoredev committed “Update index.html” to wod-core/website
+2024-01-01T15:00:01Z PushEvent Vsonneveld committed “The genre has been updated” to Vsonneveld/foroxity-genres
+2024-01-01T15:00:01Z PushEvent diphons committed “cpu_input_boost: use MI_DRM notifier” to diphons/sdm845-419
+2024-01-01T15:00:01Z PushEvent l1nky-1337 committed “README.md” to l1nky-1337/TimeFn-Updated
+2024-01-01T15:00:01Z CreateEvent luiz8910 repository off main in luiz8910/codeflix
+2024-01-01T15:00:01Z PushEvent Owl3CM committed “sync” to Owl3CM/Eze-Scripts
+2024-01-01T15:00:01Z PullRequestReviewEvent SamboyCoding created review 1799820647 for pull-request #255 “Support Type Parameters in Call Analysis” in SamboyCoding/Cpp2IL
+2024-01-01T15:00:01Z PushEvent lu146enza committed “Empty Commit” to lu146enza/Repo9
+2024-01-01T15:00:01Z PushEvent fdvorak committed “automated commit 2024-01-01 15:59:14” to fdvorak/sandWind
+2024-01-01T15:00:01Z PushEvent github-shvabra committed “new change” to saby/ios-sabycom
+2024-01-01T15:00:01Z DeleteEvent artamonovkirill branch tomtom-international/goji-http-client
+2024-01-01T15:00:01Z PullRequestEvent github-actions closed pull-request #45 “build(deps-dev): bump ts-node from 10.9.1 to 10.9.2” in jckimble/Github-Graph-Background
+2024-01-01T15:00:01Z PushEvent leegical committed “Upload by PicGo” to leegical/Blog_img
+2024-01-01T15:00:01Z CreateEvent mohil298 repository off main in mohil298/PCB-Designing
+2024-01-01T15:00:01Z PullRequestReviewEvent ehsandeep created review 1799820657 for pull-request #1102 “chore(deps): bump github.com/projectdiscovery/goflags from 0.1.32 to 0.1.33 in /v2” in projectdiscovery/subfinder
diff --git a/test/expected/test_json_format.sh_6767b91d715338c24c67e928b59c560c84ddf4be.out b/test/expected/test_json_format.sh_6767b91d715338c24c67e928b59c560c84ddf4be.out
index 19672db..9809b55 100644
--- a/test/expected/test_json_format.sh_6767b91d715338c24c67e928b59c560c84ddf4be.out
+++ b/test/expected/test_json_format.sh_6767b91d715338c24c67e928b59c560c84ddf4be.out
@@ -1,41 +1,41 @@
-2023-03-24T14:26:16.243 renovate[7] DEBUG Found gitlabci-include package files
+2023-03-24T14:26:16.243Z renovate[7] DEBUG Found gitlabci-include package files
logContext: qjifsaDDI
repository: webgui/custom-icons-transformer
-2023-03-24T14:26:16.243 renovate[7] DEBUG Found npm package files
+2023-03-24T14:26:16.243Z renovate[7] DEBUG Found npm package files
logContext: qjifsaDDI
repository: webgui/custom-icons-transformer
-2023-03-24T14:26:16.243 renovate[7] DEBUG [/Users/trentm/tm/node-bunyan/examples/src.js:20:Wuzzle.woos] Found 3 package file(s)
+2023-03-24T14:26:16.243Z renovate[7] DEBUG [/Users/trentm/tm/node-bunyan/examples/src.js:20:Wuzzle.woos] Found 3 package file(s)
logContext: qjifsaDDI
repository: webgui/custom-icons-transformer
-2023-03-24T14:26:16.243 renovate[7] INFO Dependency extraction complete
+2023-03-24T14:26:16.243Z renovate[7] INFO Dependency extraction complete
logContext: qjifsaDDI
repository: webgui/custom-icons-transformer
baseBranch: main
stats: {"managers":{"gitlabci":{"fileCount":1,"depCount":1},"gitlabci-include":{"fileCount":1,"depCount":1},"npm":{"fileCount":1,"depCount":15}},"total":{"fileCount":3,"depCount":17}}
-2023-03-24T14:26:16.390 renovate[7] DEBUG Dependency node has unsupported/unversioned value lts-bullseye-slim (versioning=docker)
+2023-03-24T14:26:16.390Z renovate[7] DEBUG Dependency node has unsupported/unversioned value lts-bullseye-slim (versioning=docker)
logContext: qjifsaDDI
repository: webgui/custom-icons-transformer
-2023-03-24T14:26:17.493 renovate[7] DEBUG Release 2.8.7 is pending status checks
+2023-03-24T14:26:17.493Z renovate[7] DEBUG Release 2.8.7 is pending status checks
logContext: qjifsaDDI
repository: webgui/custom-icons-transformer
depName: prettier
check: stabilityDays
-2023-03-24T14:26:17.897 renovate[7] DEBUG Release 4.4.1 is pending status checks
+2023-03-24T14:26:17.897Z renovate[7] DEBUG Release 4.4.1 is pending status checks
logContext: qjifsaDDI
repository: webgui/custom-icons-transformer
depName: rimraf
check: stabilityDays
-2023-03-24T14:26:17.897 renovate[7] DEBUG All releases are pending - using latest
+2023-03-24T14:26:17.897Z renovate[7] DEBUG All releases are pending - using latest
logContext: qjifsaDDI
repository: webgui/custom-icons-transformer
depName: rimraf
bucket: non-major
-2023-03-24T14:26:18.330 renovate[7] DEBUG Release 2.10.0 is pending status checks
+2023-03-24T14:26:18.330Z renovate[7] DEBUG Release 2.10.0 is pending status checks
logContext: qjifsaDDI
repository: webgui/custom-icons-transformer
depName: prettier-plugin-svelte
check: stabilityDays
-2023-03-24T14:26:18.331 renovate[7] DEBUG All releases are pending - using latest
+2023-03-24T14:26:18.331Z renovate[7] DEBUG All releases are pending - using latest
logContext: qjifsaDDI
repository: webgui/custom-icons-transformer
depName: prettier-plugin-svelte
diff --git a/test/expected/test_json_format.sh_6fbe20faa161ab9fa77df7568fff84bf3e47e920.out b/test/expected/test_json_format.sh_6fbe20faa161ab9fa77df7568fff84bf3e47e920.out
index 128f5ab..3363f23 100644
--- a/test/expected/test_json_format.sh_6fbe20faa161ab9fa77df7568fff84bf3e47e920.out
+++ b/test/expected/test_json_format.sh_6fbe20faa161ab9fa77df7568fff84bf3e47e920.out
@@ -1,4 +1,4 @@
-log_line,log_part,log_time,log_idle_msecs,log_level,log_mark,log_comment,log_tags,log_filters,user,cl
-0,<NULL>,2013-09-06 20:00:49.124,0,info,0,<NULL>,<NULL>,<NULL>,<NULL>,com.exmaple.foo
-1,<NULL>,2013-09-06 22:00:49.124,7200000,info,0,<NULL>,<NULL>,<NULL>,steve@example.com,com.exmaple.foo
-3,<NULL>,2013-09-06 22:01:49.124,60000,error,0,<NULL>,<NULL>,<NULL>,<NULL>,com.exmaple.foo
+log_line,log_time,log_level,user,cl,log_part,log_idle_msecs,log_mark,log_comment,log_tags,log_annotations,log_filters
+0,2013-09-06 20:00:49.124,info,<NULL>,com.exmaple.foo,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>
+1,2013-09-06 22:00:49.124,info,steve@example.com,com.exmaple.foo,<NULL>,7200000,0,<NULL>,<NULL>,<NULL>,<NULL>
+3,2013-09-06 22:01:49.124,error,<NULL>,com.exmaple.foo,<NULL>,60000,0,<NULL>,<NULL>,<NULL>,<NULL>
diff --git a/test/expected/test_json_format.sh_7724d1a96d74d4418dd44d7416270f9bb64b2564.out b/test/expected/test_json_format.sh_7724d1a96d74d4418dd44d7416270f9bb64b2564.out
index c861d3a..16d7261 100644
--- a/test/expected/test_json_format.sh_7724d1a96d74d4418dd44d7416270f9bb64b2564.out
+++ b/test/expected/test_json_format.sh_7724d1a96d74d4418dd44d7416270f9bb64b2564.out
@@ -1,29 +1,29 @@
-2013-09-06T20:00:48.124 TRACE trace test
+2013-09-06T20:00:48.124817Z TRACE trace test
@fields: { "lvl": "TRACE", "msg": "trace test"}
-2013-09-06T20:00:49.124 INFO Starting up service
+2013-09-06T20:00:49.124817Z INFO Starting up service
@fields: { "lvl": "INFO", "msg": "Starting up service"}
-2013-09-06T22:00:49.124 INFO Shutting down service
+2013-09-06T22:00:49.124817Z INFO Shutting down service
@fields/user: steve@example.com
@fields: { "lvl": "INFO", "msg": "Shutting down service", "user": "steve@example.com"}
-2013-09-06T22:00:59.124 DEBUG5 Details...
+2013-09-06T22:00:59.124817Z DEBUG5 Details...
@fields: { "lvl": "DEBUG5", "msg": "Details..."}
-2013-09-06T22:00:59.124 DEBUG4 Details...
+2013-09-06T22:00:59.124817Z DEBUG4 Details...
@fields: { "lvl": "DEBUG4", "msg": "Details..."}
-2013-09-06T22:00:59.124 DEBUG3 Details...
+2013-09-06T22:00:59.124817Z DEBUG3 Details...
@fields: { "lvl": "DEBUG3", "msg": "Details..."}
-2013-09-06T22:00:59.124 DEBUG2 Details...
+2013-09-06T22:00:59.124817Z DEBUG2 Details...
@fields: { "lvl": "DEBUG2", "msg": "Details..."}
-2013-09-06T22:00:59.124 DEBUG Details...
+2013-09-06T22:00:59.124817Z DEBUG Details...
@fields: { "lvl": "DEBUG", "msg": "Details..."}
-2013-09-06T22:01:49.124 STATS 1 beat per second
+2013-09-06T22:01:49.124817Z STATS 1 beat per second
@fields: { "lvl": "STATS", "msg": "1 beat per second"}
-2013-09-06T22:01:49.124 WARNING not looking good
+2013-09-06T22:01:49.124817Z WARNING not looking good
 @fields: { "lvl": "WARNING", "msg": "not looking good"}
-2013-09-06T22:01:49.124 ERROR looking bad
+2013-09-06T22:01:49.124817Z ERROR looking bad
 @fields: { "lvl": "ERROR", "msg": "looking bad"}
-2013-09-06T22:01:49.124 CRITICAL sooo bad
+2013-09-06T22:01:49.124817Z CRITICAL sooo bad
 @fields: { "lvl": "CRITICAL", "msg": "sooo bad"}
-2013-09-06T22:01:49.124 FATAL shoot
+2013-09-06T22:01:49.124817Z FATAL shoot
 @fields/trace#: line:1
 @fields/trace#: line:2
 @fields: { "lvl": "FATAL", "msg": "shoot", "trace": ["line:1", "line:2"]}
diff --git a/test/expected/test_json_format.sh_7c6529f6bf4a0cb565f5665fdcba032f0ae1ebbe.out b/test/expected/test_json_format.sh_7c6529f6bf4a0cb565f5665fdcba032f0ae1ebbe.out
index ce295e2..72f625a 100644
--- a/test/expected/test_json_format.sh_7c6529f6bf4a0cb565f5665fdcba032f0ae1ebbe.out
+++ b/test/expected/test_json_format.sh_7c6529f6bf4a0cb565f5665fdcba032f0ae1ebbe.out
@@ -1,12 +1,12 @@
-2013-09-06T20:00:48.124 TRACE trace test
+2013-09-06T20:00:48.124817Z TRACE trace test
@fields: { "lvl": "TRACE", "msg": "trace test"}
-2013-09-06T20:00:49.124 INFO Starting up service
+2013-09-06T20:00:49.124817Z INFO Starting up service
@fields: { "lvl": "INFO", "msg": "Starting up service"}
[offset: 186] {"ts": "2013-09-06T22:00:49.124817Z", "@fields": { "lvl": "INFO", "msg": "Shutting down service\nline2\nline3\nline4\nline5\nline6\nline7\nline8\nline9\nline10
parse error: premature EOF
{"ts": "2013-09-06T22:00:49.124
(right here) ------^
-2013-09-06T22:00:59.124 DEBUG5 Details...
+2013-09-06T22:00:59.124817Z DEBUG5 Details...
@fields: { "lvl": "DEBUG5", "msg": "Details..."}
-2013-09-06T22:00:59.222 DEBUG4 Details...
+2013-09-06T22:00:59.222222Z DEBUG4 Details...
@fields: { "lvl": "DEBUG4", "msg": "Details..."}
diff --git a/test/expected/test_json_format.sh_80959e2bb6a7fdf938c2e4dbd7d7c81eb84fa072.out b/test/expected/test_json_format.sh_80959e2bb6a7fdf938c2e4dbd7d7c81eb84fa072.out
index 63376a4..4656a00 100644
--- a/test/expected/test_json_format.sh_80959e2bb6a7fdf938c2e4dbd7d7c81eb84fa072.out
+++ b/test/expected/test_json_format.sh_80959e2bb6a7fdf938c2e4dbd7d7c81eb84fa072.out
@@ -1,6 +1,6 @@
-2013-09-06T20:00:48.124 TRACE trace test
+2013-09-06T20:00:48.124817Z TRACE trace test
@fields: { "lvl": "TRACE", "msg": "trace test"}
-2013-09-06T20:00:49.124 INFO Starting up service
+2013-09-06T20:00:49.124817Z INFO Starting up service
@fields: { "lvl": "INFO", "msg": "Starting up service"}
[offset: 186] {"ts": "2013-09-06T22:00:49.124817Z", "@fields": { "lvl": "INFO", "msg":
parse error: premature EOF
diff --git a/test/expected/test_json_format.sh_84a71e94dc34661a70bb9015b67ba00e93e9cfb5.out b/test/expected/test_json_format.sh_84a71e94dc34661a70bb9015b67ba00e93e9cfb5.out
index 58b44ab..474ad83 100644
--- a/test/expected/test_json_format.sh_84a71e94dc34661a70bb9015b67ba00e93e9cfb5.out
+++ b/test/expected/test_json_format.sh_84a71e94dc34661a70bb9015b67ba00e93e9cfb5.out
@@ -1,2 +1,2 @@
-2018-08-21T14:04:21.221 38708007 medusa-GpsLocator.service python[184] FATAL GPS Reference longitude: 7.358143333
-2018-08-21T14:04:21.221 38708007 medusa-GpsLocator.service python[184] INFO GPS Reference latitude: 46.908706667
+2018-08-21T14:04:21.221373Z 38708007 medusa-GpsLocator.service python[184] FATAL GPS Reference longitude: 7.358143333
+2018-08-21T14:04:21.221373Z 38708007 medusa-GpsLocator.service python[184] INFO GPS Reference latitude: 46.908706667
diff --git a/test/expected/test_json_format.sh_85d03b1b41a7f819af135d2521a8f2c59418e907.out b/test/expected/test_json_format.sh_85d03b1b41a7f819af135d2521a8f2c59418e907.out
index 660e90e..48ec77c 100644
--- a/test/expected/test_json_format.sh_85d03b1b41a7f819af135d2521a8f2c59418e907.out
+++ b/test/expected/test_json_format.sh_85d03b1b41a7f819af135d2521a8f2c59418e907.out
@@ -1,14 +1,14 @@
-log_line,log_part,log_time,log_idle_msecs,log_level,log_mark,log_comment,log_tags,log_filters,arr,obj,lvl,user
-0,<NULL>,2013-09-06 20:00:48.124,0,trace,0,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,TRACE,<NULL>
-2,<NULL>,2013-09-06 20:00:49.124,1000,info,0,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,INFO,<NULL>
-4,<NULL>,2013-09-06 22:00:49.124,7200000,info,0,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,INFO,steve@example.com
-7,<NULL>,2013-09-06 22:00:59.124,10000,debug5,0,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,DEBUG5,<NULL>
-9,<NULL>,2013-09-06 22:00:59.124,0,debug4,0,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,DEBUG4,<NULL>
-11,<NULL>,2013-09-06 22:00:59.124,0,debug3,0,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,DEBUG3,<NULL>
-13,<NULL>,2013-09-06 22:00:59.124,0,debug2,0,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,DEBUG2,<NULL>
-15,<NULL>,2013-09-06 22:00:59.124,0,debug,0,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,DEBUG,<NULL>
-17,<NULL>,2013-09-06 22:01:49.124,50000,stats,0,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,STATS,<NULL>
-19,<NULL>,2013-09-06 22:01:49.124,0,warning,0,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,WARNING,<NULL>
-21,<NULL>,2013-09-06 22:01:49.124,0,error,0,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,ERROR,<NULL>
-23,<NULL>,2013-09-06 22:01:49.124,0,critical,0,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,CRITICAL,<NULL>
-25,<NULL>,2013-09-06 22:01:49.124,0,fatal,0,<NULL>,<NULL>,<NULL>,"[""hi"", {""sub1"": true}]","{ ""field1"" : ""hi"", ""field2"": 2 }",FATAL,<NULL>
+log_line,log_time,log_level,arr,obj,logger,lvl,user,log_part,log_idle_msecs,log_mark,log_comment,log_tags,log_annotations,log_filters
+0,2013-09-06 20:00:48.124,trace,<NULL>,<NULL>,com.example.foo.bar.bazzer,TRACE,<NULL>,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>
+2,2013-09-06 20:00:49.124,info,<NULL>,<NULL>,com.example.demo,INFO,<NULL>,<NULL>,1000,0,<NULL>,<NULL>,<NULL>,<NULL>
+4,2013-09-06 22:00:49.124,info,<NULL>,<NULL>,<NULL>,INFO,steve@example.com,<NULL>,7200000,0,<NULL>,<NULL>,<NULL>,<NULL>
+7,2013-09-06 22:00:59.124,debug5,<NULL>,<NULL>,<NULL>,DEBUG5,<NULL>,<NULL>,10000,0,<NULL>,<NULL>,<NULL>,<NULL>
+9,2013-09-06 22:00:59.124,debug4,<NULL>,<NULL>,<NULL>,DEBUG4,<NULL>,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>
+11,2013-09-06 22:00:59.124,debug3,<NULL>,<NULL>,<NULL>,DEBUG3,<NULL>,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>
+13,2013-09-06 22:00:59.124,debug2,<NULL>,<NULL>,<NULL>,DEBUG2,<NULL>,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>
+15,2013-09-06 22:01:00.000,debug,<NULL>,<NULL>,<NULL>,DEBUG,<NULL>,<NULL>,876,0,<NULL>,<NULL>,<NULL>,<NULL>
+17,2013-09-06 22:01:49.124,stats,<NULL>,<NULL>,<NULL>,STATS,<NULL>,<NULL>,49124,0,<NULL>,<NULL>,<NULL>,<NULL>
+19,2013-09-06 22:01:49.124,warning,<NULL>,<NULL>,<NULL>,WARNING,<NULL>,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>
+21,2013-09-06 22:01:49.124,error,<NULL>,<NULL>,<NULL>,ERROR,<NULL>,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>
+23,2013-09-06 22:01:49.124,critical,<NULL>,<NULL>,<NULL>,CRITICAL,<NULL>,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>
+25,2013-09-06 22:01:49.124,fatal,"[""hi"", {""sub1"": true}]","{ ""field1"" : ""hi"", ""field2"": 2 }",<NULL>,FATAL,<NULL>,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>
diff --git a/test/expected/test_json_format.sh_895283eeb4c10e9c1702fafd13723c8085944f88.err b/test/expected/test_json_format.sh_895283eeb4c10e9c1702fafd13723c8085944f88.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_json_format.sh_895283eeb4c10e9c1702fafd13723c8085944f88.err
diff --git a/test/expected/test_json_format.sh_895283eeb4c10e9c1702fafd13723c8085944f88.out b/test/expected/test_json_format.sh_895283eeb4c10e9c1702fafd13723c8085944f88.out
new file mode 100644
index 0000000..143d8af
--- /dev/null
+++ b/test/expected/test_json_format.sh_895283eeb4c10e9c1702fafd13723c8085944f88.out
@@ -0,0 +1,20 @@
+2023-10-01T02:39:09+00:00 twv 10.0.0.1 INFO files_antivirus Tried to scan non file
+ user: admin
+ method:
+ url: --
+2023-10-01T02:39:09+00:00 twv INFO files_antivirus Tried to scan non file
+ user: --
+ method:
+ url: --
+2023-10-01T02:50:03+00:00 pZp INFO fulltextsearch_elasticsearch Request: PUT http://elasticsearch:9200/nextcloud/_doc/files%3A1780281
+ user: --
+ method:
+ url: --
+2023-10-16T01:47:44+00:00 WO0 192.168.1.1 INFO memories Memories: Updated item successfully
+ user: jeff
+ method: PATCH
+ url: --
+2023-10-16T01:50:18+00:00 Sbl 192.168.1.1 INFO files_versions Mark to expire /Documents/phat.txt next version should be 1697407738 or smaller. (prevTimestamp: 1697411338; step: 3600
+ user: jeff
+ method:
+ url: --
diff --git a/test/expected/test_json_format.sh_90a037c7d9d70ac4ca97158271ea242787313377.out b/test/expected/test_json_format.sh_90a037c7d9d70ac4ca97158271ea242787313377.out
deleted file mode 100644
index 30ddacc..0000000
--- a/test/expected/test_json_format.sh_90a037c7d9d70ac4ca97158271ea242787313377.out
+++ /dev/null
@@ -1,3 +0,0 @@
-2017-03-24T20:06:26.240 1.1.1.1 GET 200 /example/uri/5
-2017-03-24T20:12:47.764 1.1.1.1 GET 500 /example/uri/5
-2017-03-24T20:15:31.694 1.1.1.1 GET 400 /example/uri/5
diff --git a/test/expected/test_json_format.sh_952297a90e312d2184fe3e4df795ddc731b096c9.out b/test/expected/test_json_format.sh_952297a90e312d2184fe3e4df795ddc731b096c9.out
index 7cb7336..6de63a2 100644
--- a/test/expected/test_json_format.sh_952297a90e312d2184fe3e4df795ddc731b096c9.out
+++ b/test/expected/test_json_format.sh_952297a90e312d2184fe3e4df795ddc731b096c9.out
@@ -1,4 +1,4 @@
-[-09-06T22:00:49.124] INFO Shutting down service
+[-09-06T22:00:49.124817Z] INFO Shutting down service
user: steve@example.com
diff --git a/test/expected/test_json_format.sh_a06b3cdd46b387e72d6faa4cce648b8b11ae870b.out b/test/expected/test_json_format.sh_a06b3cdd46b387e72d6faa4cce648b8b11ae870b.out
index c3b21be..264a35e 100644
--- a/test/expected/test_json_format.sh_a06b3cdd46b387e72d6faa4cce648b8b11ae870b.out
+++ b/test/expected/test_json_format.sh_a06b3cdd46b387e72d6faa4cce648b8b11ae870b.out
@@ -1,29 +1,29 @@
-
-[2013-09-06T20:00:48.124] ⋮ trace testbork bork bork
-
-[2013-09-06T20:00:49.124] ⋮ Starting up servicebork bork bork
-
-[2013-09-06T22:00:49.124] ⋮ Shutting down servicebork bork bork
+
+[2013-09-06T20:00:48.124817Z] ⋮ <c.e.foo.bar.bazzer > trace testbork bork bork
+
+[2013-09-06T20:00:49.124817Z] ⋮ <com.example.demo > Starting up servicebork bork bork
+
+[2013-09-06T22:00:49.124817Z] ⋮ Shutting down servicebork bork bork
user: mailto:steve@example.com
-
-[2013-09-06T22:00:59.124] ⋮ Details...
+
+[2013-09-06T22:00:59.124817Z] ⋮ Details...
bork bork bork
-
-[2013-09-06T22:00:59.124] ⋮ Details...
+
+[2013-09-06T22:00:59.124817Z] ⋮ Details...
bork bork bork
-
-[2013-09-06T22:00:59.124] ⋮ Details...
+
+[2013-09-06T22:00:59.124817Z] ⋮ Details...
bork bork bork
-
-[2013-09-06T22:00:59.124] ⋮ Details...
+
+[2013-09-06T22:00:59.124817Z] ⋮ Details...
bork bork bork
-
-[2013-09-06T22:00:59.124] ⋮ Details...bork bork bork
-
-[2013-09-06T22:01:49.124] ⋮ 1 beat per secondbork bork bork
-
-[2013-09-06T22:01:49.124] ⋮ not looking goodbork bork bork
-
-[2013-09-06T22:01:49.124] ⋮ looking badbork bork bork
-
-[2013-09-06T22:01:49.124] ⋮ sooo badbork bork bork
+
+[2013-09-06 22:01:00Z] ⋮ Details...bork bork bork
+
+[2013-09-06T22:01:49.124817Z] ⋮ 1 beat per secondbork bork bork
+
+[2013-09-06T22:01:49.124817Z] ⋮ not looking goodbork bork bork
+
+[2013-09-06T22:01:49.124817Z] ⋮ looking badbork bork bork
+
+[2013-09-06T22:01:49.124817Z] ⋮ sooo badbork bork bork
diff --git a/test/expected/test_json_format.sh_a6be47f1311ed92feaf303142fcb103deb80f456.out b/test/expected/test_json_format.sh_a6be47f1311ed92feaf303142fcb103deb80f456.out
deleted file mode 100644
index b356898..0000000
--- a/test/expected/test_json_format.sh_a6be47f1311ed92feaf303142fcb103deb80f456.out
+++ /dev/null
@@ -1,4 +0,0 @@
-log_line,log_part,log_time,log_idle_msecs,log_level,log_mark,log_comment,log_tags,log_filters,client_ip,request/method,request/uri,request/size,response/status,details1,details2,details3
-0,<NULL>,2017-03-24 20:06:26.240,0,info,0,<NULL>,<NULL>,<NULL>,1.1.1.1,GET,/example/uri/5,166,200,<NULL>,<NULL>,<NULL>
-1,<NULL>,2017-03-24 20:12:47.764,381524,critical,0,<NULL>,<NULL>,<NULL>,1.1.1.1,GET,/example/uri/5,166,500,<NULL>,<NULL>,<NULL>
-2,<NULL>,2017-03-24 20:15:31.694,163930,warning,0,<NULL>,<NULL>,<NULL>,1.1.1.1,GET,/example/uri/5,166,400,"{""foo"": ""bar""}","{""foo"": ""bar""}","{""foo"": ""bar""}"
diff --git a/test/expected/test_json_format.sh_ad3a238d03493de305544f9b30a0c69d4f474d3a.out b/test/expected/test_json_format.sh_ad3a238d03493de305544f9b30a0c69d4f474d3a.out
index db5fbef..399bb82 100644
--- a/test/expected/test_json_format.sh_ad3a238d03493de305544f9b30a0c69d4f474d3a.out
+++ b/test/expected/test_json_format.sh_ad3a238d03493de305544f9b30a0c69d4f474d3a.out
@@ -1 +1 @@
-87.226.160.250 2022-10-30T00:00:02.000 "HEAD / HTTP/1.1" 301 570
+87.226.160.250 [2022-10-30T00:00:02Z] "HEAD / HTTP/1.1" 301 570
diff --git a/test/expected/test_json_format.sh_c1a23804c39b0f74642286d69865ee9d0961a58a.out b/test/expected/test_json_format.sh_c1a23804c39b0f74642286d69865ee9d0961a58a.out
index 889eb99..dc77753 100644
--- a/test/expected/test_json_format.sh_c1a23804c39b0f74642286d69865ee9d0961a58a.out
+++ b/test/expected/test_json_format.sh_c1a23804c39b0f74642286d69865ee9d0961a58a.out
@@ -1,2 +1,2 @@
-2022-09-24T00:00:09.484 Hello, World!
-2022-09-24T00:00:19.222 Goodbye, World!
+2022-09-24T00:00:09.484000000Z Hello, World!
+2022-09-24T00:00:19.222000123Z Goodbye, World!
diff --git a/test/expected/test_json_format.sh_c60050b3469f37c5b0864e1dc7eb354e91d6ec81.out b/test/expected/test_json_format.sh_c60050b3469f37c5b0864e1dc7eb354e91d6ec81.out
index abb3b80..2e9cd45 100644
--- a/test/expected/test_json_format.sh_c60050b3469f37c5b0864e1dc7eb354e91d6ec81.out
+++ b/test/expected/test_json_format.sh_c60050b3469f37c5b0864e1dc7eb354e91d6ec81.out
@@ -1,4 +1,4 @@
-2016-08-03T12:06:31.009 - ;Exception initializing page context; java.lang.NoClassDefFoundError: javax/el/StaticFieldELResolver
+2016-08-03T17:06:31.009+0000 - ;Exception initializing page context; java.lang.NoClassDefFoundError: javax/el/StaticFieldELResolver
 at org.apache.jasper.runtime.JspFactoryImpl.internalGetPageContext(JspFactoryImpl.java:172)
 at org.apache.jasper.runtime.JspFactoryImpl.getPageContext(JspFactoryImpl.java:123)
 at org.apache.jsp.errors._404_002dnot_002dfound_jsp._jspService(_404_002dnot_002dfound_jsp.java:38)
@@ -41,7 +41,7 @@
 thread_name: http-bio-0.0.0.0-8081-exec-198
 level: ERROR
 customer: foobaz
-2016-08-03T12:06:31.009 - ;Exception initializing page context; 
+2016-08-03T17:06:31.009+0000 - ;Exception initializing page context; 
 @version: 1
 logger_name: org.apache.jasper.runtime.JspFactoryImpl
 thread_name: http-bio-0.0.0.0-8081-exec-198
diff --git a/test/expected/test_json_format.sh_d0ec34389274affb70a5a76ba4789d51fd60f602.out b/test/expected/test_json_format.sh_d0ec34389274affb70a5a76ba4789d51fd60f602.out
index aa47418..6495db7 100644
--- a/test/expected/test_json_format.sh_d0ec34389274affb70a5a76ba4789d51fd60f602.out
+++ b/test/expected/test_json_format.sh_d0ec34389274affb70a5a76ba4789d51fd60f602.out
@@ -1,4 +1,4 @@
-log_line,log_part,log_time,log_idle_msecs,log_level,log_mark,log_comment,log_tags,log_filters,client_ip,request/method,request/uri,request/size,response/status,response/size,details1,details2,details3
-0,<NULL>,2017-03-24 20:06:26.240,0,info,0,<NULL>,<NULL>,<NULL>,1.1.1.1,GET,/example/uri/5,166,200,443,<NULL>,<NULL>,<NULL>
-1,<NULL>,2017-03-24 20:12:47.764,381524,critical,0,<NULL>,<NULL>,<NULL>,1.1.1.1,GET,/example/uri/5,166,500,4433,<NULL>,<NULL>,<NULL>
-2,<NULL>,2017-03-24 20:15:31.694,163930,warning,0,<NULL>,<NULL>,<NULL>,1.1.1.1,GET,/example/uri/5,166,400,44345,"{""foo"": ""bar""}","{""foo"": ""bar""}","{""foo"": ""bar""}"
+log_line,log_time,log_level,client_ip,request/method,request/uri,request/size,response/status,response/size,details1,details2,details3,log_part,log_idle_msecs,log_mark,log_comment,log_tags,log_annotations,log_filters
+0,2017-03-24 20:06:26.240,info,1.1.1.1,GET,/example/uri/5,166,200,443,<NULL>,<NULL>,<NULL>,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>
+1,2017-03-24 20:12:47.764,critical,1.1.1.1,GET,/example/uri/5,166,500,4433,<NULL>,<NULL>,<NULL>,<NULL>,381524,0,<NULL>,<NULL>,<NULL>,<NULL>
+2,2017-03-24 20:15:31.694,warning,1.1.1.1,GET,/example/uri/5,166,400,44345,"{""foo"": ""bar""}","{""foo"": ""bar""}","{""foo"": ""bar""}",<NULL>,163930,0,<NULL>,<NULL>,<NULL>,<NULL>
diff --git a/test/expected/test_json_format.sh_d7362cffc8335c2fe6b6527315de59bd6f5dcc7f.out b/test/expected/test_json_format.sh_d7362cffc8335c2fe6b6527315de59bd6f5dcc7f.out
index 9a1c882..c65a346 100644
--- a/test/expected/test_json_format.sh_d7362cffc8335c2fe6b6527315de59bd6f5dcc7f.out
+++ b/test/expected/test_json_format.sh_d7362cffc8335c2fe6b6527315de59bd6f5dcc7f.out
@@ -1,3 +1,3 @@
-2017-03-24T16:06:26.240 1.1.1.1 GET 200 443 /example/uri/5
-2017-03-24T16:12:47.764 1.1.1.1 GET 500 4433 /example/uri/5
-2017-03-24T16:15:31.694 1.1.1.1 GET 400 44345 /example/uri/5
+2017-03-24T16:06:26.240-0400 1.1.1.1 GET 200 443 /example/uri/5
+2017-03-24T16:12:47.764-0400 1.1.1.1 GET 500 4433 /example/uri/5
+2017-03-24T16:15:31.694-0400 1.1.1.1 GET 400 44345 /example/uri/5
diff --git a/test/expected/test_json_format.sh_dfff27a651650a04d93de9a06ab5480e94ce3a79.out b/test/expected/test_json_format.sh_dfff27a651650a04d93de9a06ab5480e94ce3a79.out
index db24336..379fc40 100644
--- a/test/expected/test_json_format.sh_dfff27a651650a04d93de9a06ab5480e94ce3a79.out
+++ b/test/expected/test_json_format.sh_dfff27a651650a04d93de9a06ab5480e94ce3a79.out
@@ -1,4 +1,4 @@
-log_line,log_part,log_time,log_idle_msecs,log_level,log_mark,log_comment,log_tags,log_filters,client_ip,request/method,request/uri,request/size,response/status,response/size,details1,details2,details3
-0,<NULL>,2017-03-24 16:06:26.240,0,info,0,<NULL>,<NULL>,<NULL>,1.1.1.1,GET,/example/uri/5,166,200,443,<NULL>,<NULL>,<NULL>
-1,<NULL>,2017-03-24 16:12:47.764,381524,critical,0,<NULL>,<NULL>,<NULL>,1.1.1.1,GET,/example/uri/5,166,500,4433,<NULL>,<NULL>,<NULL>
-2,<NULL>,2017-03-24 16:15:31.694,163930,warning,0,<NULL>,<NULL>,<NULL>,1.1.1.1,GET,/example/uri/5,166,400,44345,"{""foo"": ""bar""}","{""foo"": ""bar""}","{""foo"": ""bar""}"
+log_line,log_time,log_level,client_ip,request/method,request/uri,request/size,response/status,response/size,details1,details2,details3,log_part,log_idle_msecs,log_mark,log_comment,log_tags,log_annotations,log_filters
+0,2017-03-24 16:06:26.240,info,1.1.1.1,GET,/example/uri/5,166,200,443,<NULL>,<NULL>,<NULL>,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>
+1,2017-03-24 16:12:47.764,critical,1.1.1.1,GET,/example/uri/5,166,500,4433,<NULL>,<NULL>,<NULL>,<NULL>,381524,0,<NULL>,<NULL>,<NULL>,<NULL>
+2,2017-03-24 16:15:31.694,warning,1.1.1.1,GET,/example/uri/5,166,400,44345,"{""foo"": ""bar""}","{""foo"": ""bar""}","{""foo"": ""bar""}",<NULL>,163930,0,<NULL>,<NULL>,<NULL>,<NULL>
diff --git a/test/expected/test_json_format.sh_e36401aa54bc61de71f8dcbe66ea16effa59ea52.out b/test/expected/test_json_format.sh_e36401aa54bc61de71f8dcbe66ea16effa59ea52.out
index 05d531a..f80f324 100644
--- a/test/expected/test_json_format.sh_e36401aa54bc61de71f8dcbe66ea16effa59ea52.out
+++ b/test/expected/test_json_format.sh_e36401aa54bc61de71f8dcbe66ea16effa59ea52.out
@@ -1,2 +1,2 @@
-87.226.160.250 2022-10-30T00:00:02.000 "HEAD / HTTP/1.1" 301 570
+87.226.160.250 [2022-10-30T00:00:02Z] "HEAD / HTTP/1.1" 301 570
RayID: 761fde4e984e5ab2
diff --git a/test/expected/test_json_format.sh_f740026626ab554dacb249762d8be7d6539b8c6e.out b/test/expected/test_json_format.sh_f740026626ab554dacb249762d8be7d6539b8c6e.out
index 52f2372..d1cb873 100644
--- a/test/expected/test_json_format.sh_f740026626ab554dacb249762d8be7d6539b8c6e.out
+++ b/test/expected/test_json_format.sh_f740026626ab554dacb249762d8be7d6539b8c6e.out
@@ -1,2 +1,2 @@
-[2013-09-06T20:00:49.124] INFO Starting up service
+[2013-09-06T20:00:49.124817Z] ⋮ <com.example.demo > Starting up service
diff --git a/test/expected/test_json_format.sh_fe19b7ebd349cd689b3f5c22618eab5ce995e68e.out b/test/expected/test_json_format.sh_fe19b7ebd349cd689b3f5c22618eab5ce995e68e.out
index 325af1f..87d2dd4 100644
--- a/test/expected/test_json_format.sh_fe19b7ebd349cd689b3f5c22618eab5ce995e68e.out
+++ b/test/expected/test_json_format.sh_fe19b7ebd349cd689b3f5c22618eab5ce995e68e.out
@@ -1,4 +1,4 @@
--09-06T22:00:49.124 INFO Shutting down service
+-09-06T22:00:49.124817Z INFO Shutting down service
@fields/user: steve@example.com
@fields: { "lvl": "INFO", "msg": "Shutting down service", "user": "steve@example.com"}
diff --git a/test/expected/test_logfile.sh_00877d2e9dadab916a02005a068410dfbd85ec74.err b/test/expected/test_logfile.sh_00877d2e9dadab916a02005a068410dfbd85ec74.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_logfile.sh_00877d2e9dadab916a02005a068410dfbd85ec74.err
diff --git a/test/expected/test_logfile.sh_00877d2e9dadab916a02005a068410dfbd85ec74.out b/test/expected/test_logfile.sh_00877d2e9dadab916a02005a068410dfbd85ec74.out
new file mode 100644
index 0000000..c271f3c
--- /dev/null
+++ b/test/expected/test_logfile.sh_00877d2e9dadab916a02005a068410dfbd85ec74.out
@@ -0,0 +1,4 @@
+Nov 03 16:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 03 16:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 03 16:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 03 16:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
diff --git a/test/expected/test_logfile.sh_08d731a04c877a34819b35de185e30a74c9fd497.out b/test/expected/test_logfile.sh_08d731a04c877a34819b35de185e30a74c9fd497.out
index 9b2a7cd..1d2ec4e 100644
--- a/test/expected/test_logfile.sh_08d731a04c877a34819b35de185e30a74c9fd497.out
+++ b/test/expected/test_logfile.sh_08d731a04c877a34819b35de185e30a74c9fd497.out
@@ -1,3 +1,3 @@
-2600-12-03 09:23:00.000000 0:
-2600-12-03 09:23:00.000000 0:
-2600-12-03 09:23:00.000000 0:
+2600-01-03 09:23:00 0:
+00:2 0 00:00:00 0:
+2600-01-03 09:23:00 0:
diff --git a/test/expected/test_logfile.sh_18d9a7beeb09041993d0d6da488fc8192d111bd9.err b/test/expected/test_logfile.sh_18d9a7beeb09041993d0d6da488fc8192d111bd9.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_logfile.sh_18d9a7beeb09041993d0d6da488fc8192d111bd9.err
diff --git a/test/expected/test_logfile.sh_18d9a7beeb09041993d0d6da488fc8192d111bd9.out b/test/expected/test_logfile.sh_18d9a7beeb09041993d0d6da488fc8192d111bd9.out
new file mode 100644
index 0000000..6e52658
--- /dev/null
+++ b/test/expected/test_logfile.sh_18d9a7beeb09041993d0d6da488fc8192d111bd9.out
@@ -0,0 +1,3 @@
+ File Offset 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f ASCII
+ 0 23 44 61 74 65 3a 09 33 2f 39 2f 33 2f 30 85 20 #Date:_3 /9/3/0×_
+ 10 32 0a 30 0a 2_0_
diff --git a/test/expected/test_logfile.sh_1c6eee38f66356fcd9a9f0faedaea6dbcc901060.out b/test/expected/test_logfile.sh_1c6eee38f66356fcd9a9f0faedaea6dbcc901060.out
deleted file mode 100644
index ff67043..0000000
--- a/test/expected/test_logfile.sh_1c6eee38f66356fcd9a9f0faedaea6dbcc901060.out
+++ /dev/null
@@ -1,2 +0,0 @@
- filepath  descriptor  mimetype  content 
-{test_dir}/logfile_syslog.1.gz net.zlib.gzip.header application/json {"name":"logfile_syslog.1","mtime":"2007-11-03T16:23:00.000","comment":""} 
diff --git a/test/expected/test_logfile.sh_218ecb88b4753010c4264b3ac351260b4811612f.out b/test/expected/test_logfile.sh_218ecb88b4753010c4264b3ac351260b4811612f.out
index 4ed341d..683602c 100644
--- a/test/expected/test_logfile.sh_218ecb88b4753010c4264b3ac351260b4811612f.out
+++ b/test/expected/test_logfile.sh_218ecb88b4753010c4264b3ac351260b4811612f.out
@@ -1,2 +1,2 @@
-basename(filepath)  descriptor  mimetype  content 
-logfile_syslog.1.gz net.zlib.gzip.header application/json {"name":"logfile_syslog.1","mtime":"2007-11-03T09:23:00.000","comment":""} 
+basename(filepath)   descriptor   mimetype   content  
+logfile_syslog.1.gz net.zlib.gzip.header application/json {"name":"logfile_syslog.1","mtime":"2007-11-03T09:23:00.000","comment":""}
diff --git a/test/expected/test_logfile.sh_290a3c49e53c2229a7400c107338fa0bb38375e2.out b/test/expected/test_logfile.sh_290a3c49e53c2229a7400c107338fa0bb38375e2.out
index 7731fde..3052066 100644
--- a/test/expected/test_logfile.sh_290a3c49e53c2229a7400c107338fa0bb38375e2.out
+++ b/test/expected/test_logfile.sh_290a3c49e53c2229a7400c107338fa0bb38375e2.out
@@ -1,2 +1,2 @@
-#Fields: ? )
-0
+ File Offset 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f ASCII
+ 0 23 46 69 65 6c 64 73 3a 20 f9 09 29 0a 30 0a #Fields: _×_)_0_
diff --git a/test/expected/test_logfile.sh_2e72d848a51ac1eb476b973c61fe43a65d579ba5.err b/test/expected/test_logfile.sh_2e72d848a51ac1eb476b973c61fe43a65d579ba5.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_logfile.sh_2e72d848a51ac1eb476b973c61fe43a65d579ba5.err
diff --git a/test/expected/test_logfile.sh_2e72d848a51ac1eb476b973c61fe43a65d579ba5.out b/test/expected/test_logfile.sh_2e72d848a51ac1eb476b973c61fe43a65d579ba5.out
new file mode 100644
index 0000000..1925cdc
--- /dev/null
+++ b/test/expected/test_logfile.sh_2e72d848a51ac1eb476b973c61fe43a65d579ba5.out
@@ -0,0 +1,2 @@
+ options_path   options  
+{test_dir}/logfile_syslog.0 {"default-zone":"America/Los_Angeles"}
diff --git a/test/expected/test_logfile.sh_341e491abcf8772422bafb8b0eaea6492da230f6.err b/test/expected/test_logfile.sh_341e491abcf8772422bafb8b0eaea6492da230f6.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_logfile.sh_341e491abcf8772422bafb8b0eaea6492da230f6.err
diff --git a/test/expected/test_logfile.sh_341e491abcf8772422bafb8b0eaea6492da230f6.out b/test/expected/test_logfile.sh_341e491abcf8772422bafb8b0eaea6492da230f6.out
new file mode 100644
index 0000000..f625ce6
--- /dev/null
+++ b/test/expected/test_logfile.sh_341e491abcf8772422bafb8b0eaea6492da230f6.out
@@ -0,0 +1,3 @@
+Aug 27 14:22:01 2022 -- 613
+Aug 27 14:22:01 2022 -- 694
+Aug 27 14:22:01 2022 -- 888
diff --git a/test/expected/test_logfile.sh_3fc6bfd8a6160817211f3e14fde957af75b9dbe7.out b/test/expected/test_logfile.sh_3fc6bfd8a6160817211f3e14fde957af75b9dbe7.out
index 8d8b6ce..6a73ecb 100644
--- a/test/expected/test_logfile.sh_3fc6bfd8a6160817211f3e14fde957af75b9dbe7.out
+++ b/test/expected/test_logfile.sh_3fc6bfd8a6160817211f3e14fde957af75b9dbe7.out
@@ -1,2 +1,3 @@
-#Date: 20?0-2-02
-0
+ File Offset 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f ASCII
+ 0 23 44 61 74 65 3a 09 32 30 80 30 2d 32 2d 30 32 #Date:_2 0×0-2-02
+ 10 0a 30 0a _0_
diff --git a/test/expected/test_logfile.sh_82d65f4dac07b1623f8202444d5b9144096e8243.err b/test/expected/test_logfile.sh_82d65f4dac07b1623f8202444d5b9144096e8243.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_logfile.sh_82d65f4dac07b1623f8202444d5b9144096e8243.err
diff --git a/test/expected/test_logfile.sh_82d65f4dac07b1623f8202444d5b9144096e8243.out b/test/expected/test_logfile.sh_82d65f4dac07b1623f8202444d5b9144096e8243.out
new file mode 100644
index 0000000..409849c
--- /dev/null
+++ b/test/expected/test_logfile.sh_82d65f4dac07b1623f8202444d5b9144096e8243.out
@@ -0,0 +1,3 @@
+192.168.202.254 - - [20/Jul/2009:15:59:26 -0700] "GET /vmw/cgi/tramp HTTP/1.0" 200 134 "-" "gPXE/0.9.7"
+192.168.202.254 - - [20/Jul/2009:15:59:29 -0700] "GET /vmw/vSphere/default/vmkboot.gz HTTP/1.0" 404 46210 "-" "gPXE/0.9.7"
+192.168.202.254 - - [20/Jul/2009:15:59:29 -0700] "GET /vmw/vSphere/default/vmkernel.gz HTTP/1.0" 200 78929 "-" "gPXE/0.9.7"
diff --git a/test/expected/test_logfile.sh_8a5e754cd471e5fdcdaede49c9290903acd7aad6.err b/test/expected/test_logfile.sh_8a5e754cd471e5fdcdaede49c9290903acd7aad6.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_logfile.sh_8a5e754cd471e5fdcdaede49c9290903acd7aad6.err
diff --git a/test/expected/test_logfile.sh_8a5e754cd471e5fdcdaede49c9290903acd7aad6.out b/test/expected/test_logfile.sh_8a5e754cd471e5fdcdaede49c9290903acd7aad6.out
new file mode 100644
index 0000000..dbd0803
--- /dev/null
+++ b/test/expected/test_logfile.sh_8a5e754cd471e5fdcdaede49c9290903acd7aad6.out
@@ -0,0 +1,3 @@
+Jul 20 15:59:26 2009 -- 000
+Jul 20 15:59:29 2009 -- 000
+Jul 20 15:59:29 2009 -- 000
diff --git a/test/expected/test_logfile.sh_c18e14a26d8261c9f72747118a469266121d5459.out b/test/expected/test_logfile.sh_c18e14a26d8261c9f72747118a469266121d5459.out
index 0733b93..0635648 100644
--- a/test/expected/test_logfile.sh_c18e14a26d8261c9f72747118a469266121d5459.out
+++ b/test/expected/test_logfile.sh_c18e14a26d8261c9f72747118a469266121d5459.out
@@ -1,3 +1,3 @@
-log_line log_part log_time log_idle_msecs log_level log_mark log_comment log_tags log_filters col_0 col_1
- 0 <NULL> 2021-05-19 08:00:01.000 0 info 0 <NULL> <NULL> <NULL> 1 /abc/def
- 2 <NULL> 2021-05-19 08:00:03.000 2000 info 0 <NULL> <NULL> <NULL> 3 /ghi/jkl
+log_line log_time log_level col_0 col_1 log_part log_idle_msecs log_mark log_comment log_tags log_annotations log_filters
+ 0 2021-05-19 08:00:01.000 info 1 /abc/def <NULL> 0 0 <NULL> <NULL> <NULL> <NULL>
+ 2 2021-05-19 08:00:03.000 info 3 /ghi/jkl <NULL> 2000 0 <NULL> <NULL> <NULL> <NULL>
diff --git a/test/expected/test_logfile.sh_cc368d4b4bb6a9b9c79bd5a70ffa1f2d9d01e286.err b/test/expected/test_logfile.sh_cc368d4b4bb6a9b9c79bd5a70ffa1f2d9d01e286.err
new file mode 100644
index 0000000..36412d9
--- /dev/null
+++ b/test/expected/test_logfile.sh_cc368d4b4bb6a9b9c79bd5a70ffa1f2d9d01e286.err
@@ -0,0 +1,15 @@
+✘ error: “bad” is not a valid timezone
+ reason: bad not found in timezone database
+ --> command-option:1
+ | :set-file-timezone bad 
+ = note: did you mean one of the following?
+ America/Bahia_Banderas
+ Asia/Ashkhabad
+ Brazil/DeNoronha
+ America/Barbados
+ Asia/Baghdad
+ = help: :set-file-timezone zone [pattern]
+ ══════════════════════════════════════════════════════════════════════
+ Set the timezone to use for log messages that do not include a
+ timezone. The timezone is applied to the focused file or the given
+ glob pattern.
diff --git a/test/expected/test_logfile.sh_cc368d4b4bb6a9b9c79bd5a70ffa1f2d9d01e286.out b/test/expected/test_logfile.sh_cc368d4b4bb6a9b9c79bd5a70ffa1f2d9d01e286.out
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_logfile.sh_cc368d4b4bb6a9b9c79bd5a70ffa1f2d9d01e286.out
diff --git a/test/expected/test_logfile.sh_ccb0d31813367c8d9dc5b5df383fac5b780711c1.err b/test/expected/test_logfile.sh_ccb0d31813367c8d9dc5b5df383fac5b780711c1.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_logfile.sh_ccb0d31813367c8d9dc5b5df383fac5b780711c1.err
diff --git a/test/expected/test_logfile.sh_ccb0d31813367c8d9dc5b5df383fac5b780711c1.out b/test/expected/test_logfile.sh_ccb0d31813367c8d9dc5b5df383fac5b780711c1.out
new file mode 100644
index 0000000..1bf2d2a
--- /dev/null
+++ b/test/expected/test_logfile.sh_ccb0d31813367c8d9dc5b5df383fac5b780711c1.out
@@ -0,0 +1,3 @@
+Aug 27 10:22:01 2022 -- 613
+Aug 27 10:22:01 2022 -- 694
+Aug 27 10:22:01 2022 -- 888
diff --git a/test/expected/test_logfile.sh_d14f6d8888652321206549df8a9535399f0fd372.err b/test/expected/test_logfile.sh_d14f6d8888652321206549df8a9535399f0fd372.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_logfile.sh_d14f6d8888652321206549df8a9535399f0fd372.err
diff --git a/test/expected/test_logfile.sh_d14f6d8888652321206549df8a9535399f0fd372.out b/test/expected/test_logfile.sh_d14f6d8888652321206549df8a9535399f0fd372.out
new file mode 100644
index 0000000..c271f3c
--- /dev/null
+++ b/test/expected/test_logfile.sh_d14f6d8888652321206549df8a9535399f0fd372.out
@@ -0,0 +1,4 @@
+Nov 03 16:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 03 16:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 03 16:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 03 16:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
diff --git a/test/expected/test_logfile.sh_de8d59879fe6aa5a012b0748ff77ae26c07aea89.err b/test/expected/test_logfile.sh_de8d59879fe6aa5a012b0748ff77ae26c07aea89.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_logfile.sh_de8d59879fe6aa5a012b0748ff77ae26c07aea89.err
diff --git a/test/expected/test_logfile.sh_de8d59879fe6aa5a012b0748ff77ae26c07aea89.out b/test/expected/test_logfile.sh_de8d59879fe6aa5a012b0748ff77ae26c07aea89.out
new file mode 100644
index 0000000..6feae9d
--- /dev/null
+++ b/test/expected/test_logfile.sh_de8d59879fe6aa5a012b0748ff77ae26c07aea89.out
@@ -0,0 +1,4 @@
+Nov 03 13:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 03 13:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 03 13:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 03 13:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
diff --git a/test/expected/test_logfile.sh_e840b674cd65936a72bd64b1dac1524d16fe44c3.out b/test/expected/test_logfile.sh_e840b674cd65936a72bd64b1dac1524d16fe44c3.out
index 9de987f..f551cf0 100644
--- a/test/expected/test_logfile.sh_e840b674cd65936a72bd64b1dac1524d16fe44c3.out
+++ b/test/expected/test_logfile.sh_e840b674cd65936a72bd64b1dac1524d16fe44c3.out
@@ -1,11 +1,11 @@
- log_time  log_body 
-2022-09-19 09:24:04.000 tid:1d1f - Mux ID not found in mapping dictionary 
+ log_time   log_body  
+2022-09-19 09:24:04.000 tid:1d1f - Mux ID not found in mapping dictionary
2022-09-19 09:24:04.000 tid:1d1f - Can't handle disconnect with invalid ecid
2022-09-19 09:24:20.000 Entered:_AMMuxedDeviceDisconnected, mux-device:1003 
-2022-09-19 09:24:20.000 Entered:_AMMuxedDeviceDisconnected, mux-device:1003
-2022-09-19 09:24:20.000 Entered:__thr_AMMuxedDeviceDisconnected, mux-device:1003 
+2022-09-19 09:24:20.000 Entered:_AMMuxedDeviceDisconnected, mux-device:1003 
+2022-09-19 09:24:20.000 Entered:__thr_AMMuxedDeviceDisconnected, mux-device:1003
2022-09-19 09:24:20.000 Entered:__thr_AMMuxedDeviceDisconnected, mux-device:1003
2022-09-19 09:24:20.000 tid:191f - Mux ID not found in mapping dictionary 
-2022-09-19 09:24:20.000 tid:1d1f - Mux ID not found in mapping dictionary
-2022-09-19 09:24:20.000 tid:191f - Can't handle disconnect with invalid ecid 
+2022-09-19 09:24:20.000 tid:1d1f - Mux ID not found in mapping dictionary 
+2022-09-19 09:24:20.000 tid:191f - Can't handle disconnect with invalid ecid
2022-09-19 09:24:20.000 tid:1d1f - Can't handle disconnect with invalid ecid
diff --git a/test/expected/test_logfile.sh_f171f265d8d45a2707e8b9f53e938f574c614d25.err b/test/expected/test_logfile.sh_f171f265d8d45a2707e8b9f53e938f574c614d25.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_logfile.sh_f171f265d8d45a2707e8b9f53e938f574c614d25.err
diff --git a/test/expected/test_logfile.sh_f171f265d8d45a2707e8b9f53e938f574c614d25.out b/test/expected/test_logfile.sh_f171f265d8d45a2707e8b9f53e938f574c614d25.out
new file mode 100644
index 0000000..c210568
--- /dev/null
+++ b/test/expected/test_logfile.sh_f171f265d8d45a2707e8b9f53e938f574c614d25.out
@@ -0,0 +1,3 @@
+Aug 27 07:22:01 2022 -- 613
+Aug 27 07:22:01 2022 -- 694
+Aug 27 07:22:01 2022 -- 888
diff --git a/test/expected/test_meta.sh_0ae5840c0758ec95a397493ac3c3d4fabd397a34.err b/test/expected/test_meta.sh_0ae5840c0758ec95a397493ac3c3d4fabd397a34.err
new file mode 100644
index 0000000..8b8ac40
--- /dev/null
+++ b/test/expected/test_meta.sh_0ae5840c0758ec95a397493ac3c3d4fabd397a34.err
@@ -0,0 +1,7 @@
+✘ error: unexpected JSON value
+ --> command-option:1
+ | ;UPDATE access_log SET log_annotations = '1' WHERE log_line = 0
+ --> log_annotations:1
+ | 1 
+ = help: Available Properties
+ (.*)
diff --git a/test/expected/test_meta.sh_0ae5840c0758ec95a397493ac3c3d4fabd397a34.out b/test/expected/test_meta.sh_0ae5840c0758ec95a397493ac3c3d4fabd397a34.out
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_meta.sh_0ae5840c0758ec95a397493ac3c3d4fabd397a34.out
diff --git a/test/expected/test_meta.sh_41f643bb4f720130625b042563e9591bee4ae588.out b/test/expected/test_meta.sh_41f643bb4f720130625b042563e9591bee4ae588.out
index 171d0f7..d2ad552 100644
--- a/test/expected/test_meta.sh_41f643bb4f720130625b042563e9591bee4ae588.out
+++ b/test/expected/test_meta.sh_41f643bb4f720130625b042563e9591bee4ae588.out
@@ -1,2 +1,2 @@
-log_tags 
+log_tags 
["#foo"]
diff --git a/test/expected/test_meta.sh_4283bf9128e0396c4ff141faf68279d5a3d8ac63.err b/test/expected/test_meta.sh_4283bf9128e0396c4ff141faf68279d5a3d8ac63.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_meta.sh_4283bf9128e0396c4ff141faf68279d5a3d8ac63.err
diff --git a/test/expected/test_meta.sh_4283bf9128e0396c4ff141faf68279d5a3d8ac63.out b/test/expected/test_meta.sh_4283bf9128e0396c4ff141faf68279d5a3d8ac63.out
new file mode 100644
index 0000000..f1362fc
--- /dev/null
+++ b/test/expected/test_meta.sh_4283bf9128e0396c4ff141faf68279d5a3d8ac63.out
@@ -0,0 +1,41 @@
+#!lnav -Nf
+# This file is an export of an lnav session. You can type
+# '|/path/to/this/file' in lnav to execute this file and
+# restore the state of the session.
+
+;SELECT raise_error('This session export was made with a newer version of lnav, please upgrade to ' || '0.11.2' || ' or later')
+ WHERE lnav_version() < '0.11.2' COLLATE naturalcase
+
+# The files loaded into the session were:
+
+
+# Set this environment variable to override this value or edit this script.
+;INSERT OR IGNORE INTO environ (name, value) VALUES ('LOG_DIR_0', '{top_srcdir_parent}')
+:open $LOG_DIR_0/lnav/test/logfile_access_log.0
+
+:rebuild
+
+
+# The following SQL statements will restore the bookmarks,
+# comments, and tags that were added in the session.
+
+;SELECT total_changes() AS before_mark_changes
+;UPDATE all_logs SET log_mark = 0, log_comment = NULL, log_tags = NULL, log_annotations = '{"org.lnav.test":"Hello, <span style=\"color: #f00\">World</span>!\n"}' WHERE log_time_msecs = 1248130766000 AND log_format = 'access_log' AND log_line_hash = 'v1:3f7e0f10f2473f83b2b4eacccfc9b4e2'
+;UPDATE all_logs SET log_mark = 0, log_comment = NULL, log_tags = '["#foo"]', log_annotations = NULL WHERE log_time_msecs = 1248130769000 AND log_format = 'access_log' AND log_line_hash = 'v1:7ad4831dd06e0d6b0ffd965c7d65285f'
+
+;SELECT 2 - (total_changes() - $before_mark_changes) AS failed_mark_changes
+;SELECT echoln(printf('%sERROR%s: failed to restore %d bookmarks',
+ $ansi_red, $ansi_norm, $failed_mark_changes))
+ WHERE $failed_mark_changes != 0
+
+
+# The following SQL statements will restore the filters that
+# were added in the session.
+
+;REPLACE INTO lnav_view_filters (view_name, enabled, type, language, pattern) VALUES ('log', 0, 'in', 'regex', 'credential status')
+
+
+# The following commands will restore the state of the LOG view.
+
+:switch-to-view log
+:goto 0
diff --git a/test/expected/test_meta.sh_65325d1bcb58e530a8d681685fea56803f67a2eb.err b/test/expected/test_meta.sh_65325d1bcb58e530a8d681685fea56803f67a2eb.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_meta.sh_65325d1bcb58e530a8d681685fea56803f67a2eb.err
diff --git a/test/expected/test_meta.sh_65325d1bcb58e530a8d681685fea56803f67a2eb.out b/test/expected/test_meta.sh_65325d1bcb58e530a8d681685fea56803f67a2eb.out
new file mode 100644
index 0000000..25d62c1
--- /dev/null
+++ b/test/expected/test_meta.sh_65325d1bcb58e530a8d681685fea56803f67a2eb.out
@@ -0,0 +1,2 @@
+log_line  log_tags  
+ 46 ["#bro-test"]
diff --git a/test/expected/test_meta.sh_aae427fe704f131f8466fbfc9e7967c2e874530a.err b/test/expected/test_meta.sh_aae427fe704f131f8466fbfc9e7967c2e874530a.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_meta.sh_aae427fe704f131f8466fbfc9e7967c2e874530a.err
diff --git a/test/expected/test_meta.sh_aae427fe704f131f8466fbfc9e7967c2e874530a.out b/test/expected/test_meta.sh_aae427fe704f131f8466fbfc9e7967c2e874530a.out
new file mode 100644
index 0000000..fc8266d
--- /dev/null
+++ b/test/expected/test_meta.sh_aae427fe704f131f8466fbfc9e7967c2e874530a.out
@@ -0,0 +1,2 @@
+log_line log_annotations 
+ 0 {"abc":"def"}
diff --git a/test/expected/test_meta.sh_ad2f396f332d14ed6e95936983bc7e4aeea0bfac.err b/test/expected/test_meta.sh_ad2f396f332d14ed6e95936983bc7e4aeea0bfac.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_meta.sh_ad2f396f332d14ed6e95936983bc7e4aeea0bfac.err
diff --git a/test/expected/test_meta.sh_ad2f396f332d14ed6e95936983bc7e4aeea0bfac.out b/test/expected/test_meta.sh_ad2f396f332d14ed6e95936983bc7e4aeea0bfac.out
new file mode 100644
index 0000000..9fe4123
--- /dev/null
+++ b/test/expected/test_meta.sh_ad2f396f332d14ed6e95936983bc7e4aeea0bfac.out
@@ -0,0 +1,7 @@
+192.168.202.254 - - [20/Jul/2009:22:59:26 +0000] "GET /vmw/cgi/tramp HTTP/1.0" 200 134 "-" "gPXE/0.9.7"
+ ├ org.lnav.test:
+ ╰ Hello, World!
+192.168.202.254 - - [20/Jul/2009:22:59:29 +0000] "GET /vmw/vSphere/default/vmkboot.gz HTTP/1.0" 404 46210 "-" "gPXE/0.9.7"
+ 📝 Annotations available, focus on this line and use :annotate to apply them
+192.168.202.254 - - [20/Jul/2009:22:59:29 +0000] "GET /vmw/vSphere/default/vmkernel.gz HTTP/1.0" 200 78929 "-" "gPXE/0.9.7"
+ 📝 Annotations available, focus on this line and use :annotate to apply them
diff --git a/test/expected/test_meta.sh_b622c04c2bede5371bfa6f2627b0474049ecc5e9.err b/test/expected/test_meta.sh_b622c04c2bede5371bfa6f2627b0474049ecc5e9.err
new file mode 100644
index 0000000..cf52340
--- /dev/null
+++ b/test/expected/test_meta.sh_b622c04c2bede5371bfa6f2627b0474049ecc5e9.err
@@ -0,0 +1,6 @@
+✘ error: invalid JSON
+ reason: parse error: premature EOF
+ --> command-option:1
+ | ;UPDATE access_log SET log_annotations = '{"abc": "def"' WHERE log_line = 0
+ --> log_annotations:1
+ | {"abc": "def" 
diff --git a/test/expected/test_meta.sh_b622c04c2bede5371bfa6f2627b0474049ecc5e9.out b/test/expected/test_meta.sh_b622c04c2bede5371bfa6f2627b0474049ecc5e9.out
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_meta.sh_b622c04c2bede5371bfa6f2627b0474049ecc5e9.out
diff --git a/test/expected/test_meta.sh_c75128169049bd88d5eaf8b84a7f617e5ae5d936.out b/test/expected/test_meta.sh_c75128169049bd88d5eaf8b84a7f617e5ae5d936.out
index 8462ae3..6f1aae9 100644
--- a/test/expected/test_meta.sh_c75128169049bd88d5eaf8b84a7f617e5ae5d936.out
+++ b/test/expected/test_meta.sh_c75128169049bd88d5eaf8b84a7f617e5ae5d936.out
@@ -1,4 +1,4 @@
-log_line  log_comment log_tags 
- 0 Hello, World! ["#foo"] 
+log_line  log_comment  log_tags 
+ 0 Hello, World! ["#foo"]
1 <NULL> <NULL>
 2 <NULL>  <NULL> 
diff --git a/test/expected/test_meta.sh_d6af0b41066ca3be0bbce89c83c011f4ecfa516e.out b/test/expected/test_meta.sh_d6af0b41066ca3be0bbce89c83c011f4ecfa516e.out
index a3e5357..6300f44 100644
--- a/test/expected/test_meta.sh_d6af0b41066ca3be0bbce89c83c011f4ecfa516e.out
+++ b/test/expected/test_meta.sh_d6af0b41066ca3be0bbce89c83c011f4ecfa516e.out
@@ -1,5 +1,5 @@
192.168.202.254 - - [20/Jul/2009:22:59:26 +0000] "GET /vmw/cgi/tramp HTTP/1.0" 200 134 "-" "gPXE/0.9.7"
-192.168.202.254 - - [20/Jul/2009:22:59:29 +0000] "GET /vmw/vSphere/default/vmkboot.gz HTTP/1.0" 404 46210 "-" "gPXE/0.9.7"
├ Hello, World!
└ #foo
+192.168.202.254 - - [20/Jul/2009:22:59:29 +0000] "GET /vmw/vSphere/default/vmkboot.gz HTTP/1.0" 404 46210 "-" "gPXE/0.9.7"
192.168.202.254 - - [20/Jul/2009:22:59:29 +0000] "GET /vmw/vSphere/default/vmkernel.gz HTTP/1.0" 200 78929 "-" "gPXE/0.9.7"
diff --git a/test/expected/test_meta.sh_f7c55356df0d71c51eb7629c5a81f347083ce1ef.err b/test/expected/test_meta.sh_f7c55356df0d71c51eb7629c5a81f347083ce1ef.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_meta.sh_f7c55356df0d71c51eb7629c5a81f347083ce1ef.err
diff --git a/test/expected/test_meta.sh_f7c55356df0d71c51eb7629c5a81f347083ce1ef.out b/test/expected/test_meta.sh_f7c55356df0d71c51eb7629c5a81f347083ce1ef.out
new file mode 100644
index 0000000..25d62c1
--- /dev/null
+++ b/test/expected/test_meta.sh_f7c55356df0d71c51eb7629c5a81f347083ce1ef.out
@@ -0,0 +1,2 @@
+log_line  log_tags  
+ 46 ["#bro-test"]
diff --git a/test/expected/test_pretty_print.sh_3c255c3c8b28df9d694b329a265e8b8140dae4a2.out b/test/expected/test_pretty_print.sh_3c255c3c8b28df9d694b329a265e8b8140dae4a2.out
index 35fadf8..974a0b4 100644
--- a/test/expected/test_pretty_print.sh_3c255c3c8b28df9d694b329a265e8b8140dae4a2.out
+++ b/test/expected/test_pretty_print.sh_3c255c3c8b28df9d694b329a265e8b8140dae4a2.out
@@ -1,8 +1,8 @@
{
- "wrapper": [
+ "wrapper": [
{"message":""
- select Id from Account where id = $sfid
- ^
- ERROR at Row:1:Column:34
- line 1:34 no viable alternative at character '$'
-""}]}
+   select Id from Account where id = $sfid
+     ^
+   ERROR at Row:1:Column:34
+   line 1:34 no viable alternative at character '$'
+""}]}
diff --git a/test/expected/test_pretty_print.sh_7192f8f68adb14705c8a60e73ff8248c61c7fd03.out b/test/expected/test_pretty_print.sh_7192f8f68adb14705c8a60e73ff8248c61c7fd03.out
index 613cc3a..18f1d8a 100644
--- a/test/expected/test_pretty_print.sh_7192f8f68adb14705c8a60e73ff8248c61c7fd03.out
+++ b/test/expected/test_pretty_print.sh_7192f8f68adb14705c8a60e73ff8248c61c7fd03.out
@@ -1,5 +1,5 @@
2015-04-18T13:16:30.003 {
"wrapper": {"msg": r""
Hello,
- World!
-""}}
+
+ ""}}
diff --git a/test/expected/test_pretty_print.sh_a5bee322ea3374690e44a88a16cb6b84feaa11d3.out b/test/expected/test_pretty_print.sh_a5bee322ea3374690e44a88a16cb6b84feaa11d3.out
index 0ac4c9a..f9264f7 100644
--- a/test/expected/test_pretty_print.sh_a5bee322ea3374690e44a88a16cb6b84feaa11d3.out
+++ b/test/expected/test_pretty_print.sh_a5bee322ea3374690e44a88a16cb6b84feaa11d3.out
@@ -1,3 +1,2 @@
Hello
World
-
diff --git a/test/expected/test_prql.sh_06900fac5c2e854b1208320b753fcd43d4ba63a3.err b/test/expected/test_prql.sh_06900fac5c2e854b1208320b753fcd43d4ba63a3.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_prql.sh_06900fac5c2e854b1208320b753fcd43d4ba63a3.err
diff --git a/test/expected/test_prql.sh_06900fac5c2e854b1208320b753fcd43d4ba63a3.out b/test/expected/test_prql.sh_06900fac5c2e854b1208320b753fcd43d4ba63a3.out
new file mode 100644
index 0000000..8b17a01
--- /dev/null
+++ b/test/expected/test_prql.sh_06900fac5c2e854b1208320b753fcd43d4ba63a3.out
@@ -0,0 +1,2 @@
+log_line  log_time  log_level  c_ip  cs_method cs_referer cs_uri_query  cs_uri_stem  cs_user_agent cs_username cs_version  sc_bytes  sc_status cs_host log_part log_idle_msecs log_mark log_comment log_tags log_annotations log_filters 
+ 0 2009-07-20 22:59:26.000 info 192.168.202.254 GET - <NULL> /vmw/cgi/tramp gPXE/0.9.7 - HTTP/1.0  134 200 <NULL> <NULL>  0 0 <NULL> <NULL> <NULL> <NULL>
diff --git a/test/expected/test_prql.sh_15ebcd913f56cde35af26c6300533d6e76bf1b55.err b/test/expected/test_prql.sh_15ebcd913f56cde35af26c6300533d6e76bf1b55.err
new file mode 100644
index 0000000..2d3ebea
--- /dev/null
+++ b/test/expected/test_prql.sh_15ebcd913f56cde35af26c6300533d6e76bf1b55.err
@@ -0,0 +1,10 @@
+✘ error: unable to compile PRQL: from access_log | take abc
+ reason: `take` expected int or range, but found this.access_log.abc
+ = note: Error:
+ ╭─[:1:24]
+ │
+ 1 │ from access_log | take abc
+ │ ─┬─
+ │ ╰─── `take` expected int or range, but found this.access_log.abc
+ ───╯
+
diff --git a/test/expected/test_prql.sh_15ebcd913f56cde35af26c6300533d6e76bf1b55.out b/test/expected/test_prql.sh_15ebcd913f56cde35af26c6300533d6e76bf1b55.out
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_prql.sh_15ebcd913f56cde35af26c6300533d6e76bf1b55.out
diff --git a/test/expected/test_prql.sh_451e242cdfa2db9005d4fe752a7b05d1ab5cba29.err b/test/expected/test_prql.sh_451e242cdfa2db9005d4fe752a7b05d1ab5cba29.err
new file mode 100644
index 0000000..1c7eb34
--- /dev/null
+++ b/test/expected/test_prql.sh_451e242cdfa2db9005d4fe752a7b05d1ab5cba29.err
@@ -0,0 +1,10 @@
+✘ error: unable to compile PRQL: from db.access_log | take abc
+ reason: `take` expected int or range, but found this.access_log.abc
+ = note: Error:
+ ╭─[:1:27]
+ │
+ 1 │ from db.access_log | take abc
+ │ ─┬─
+ │ ╰─── `take` expected int or range, but found this.access_log.abc
+ ───╯
+
diff --git a/test/expected/test_prql.sh_451e242cdfa2db9005d4fe752a7b05d1ab5cba29.out b/test/expected/test_prql.sh_451e242cdfa2db9005d4fe752a7b05d1ab5cba29.out
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_prql.sh_451e242cdfa2db9005d4fe752a7b05d1ab5cba29.out
diff --git a/test/expected/test_prql.sh_45d57a042092ffdcd28ea35a892f02859e78f33d.err b/test/expected/test_prql.sh_45d57a042092ffdcd28ea35a892f02859e78f33d.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_prql.sh_45d57a042092ffdcd28ea35a892f02859e78f33d.err
diff --git a/test/expected/test_prql.sh_45d57a042092ffdcd28ea35a892f02859e78f33d.out b/test/expected/test_prql.sh_45d57a042092ffdcd28ea35a892f02859e78f33d.out
new file mode 100644
index 0000000..e73b017
--- /dev/null
+++ b/test/expected/test_prql.sh_45d57a042092ffdcd28ea35a892f02859e78f33d.out
@@ -0,0 +1,2 @@
+log_line  log_time log_level  c_ip cs_method cs_referer cs_uri_query  cs_uri_stem cs_user_agent cs_username cs_version sc_bytes sc_status cs_host log_part log_idle_msecs log_mark log_comment log_tags log_annotations log_filters 
+ 0 2009-07-20 22:59:26.000 info 192.168.202.254 GET - <NULL> /vmw/cgi/tramp gPXE/0.9.7 - HTTP/1.0  134 200 <NULL> <NULL>  0 0 <NULL> <NULL> <NULL> <NULL>
diff --git a/test/expected/test_prql.sh_5aea925b5ad95f55ce6b1b07b7046bc3d7310137.err b/test/expected/test_prql.sh_5aea925b5ad95f55ce6b1b07b7046bc3d7310137.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_prql.sh_5aea925b5ad95f55ce6b1b07b7046bc3d7310137.err
diff --git a/test/expected/test_prql.sh_5aea925b5ad95f55ce6b1b07b7046bc3d7310137.out b/test/expected/test_prql.sh_5aea925b5ad95f55ce6b1b07b7046bc3d7310137.out
new file mode 100644
index 0000000..3c62603
--- /dev/null
+++ b/test/expected/test_prql.sh_5aea925b5ad95f55ce6b1b07b7046bc3d7310137.out
@@ -0,0 +1,4 @@
+ tslice   v  
+2011-11-03 00:19:00.000 {"a.fsdn.com":33,"Other":31,"ad.doubleclick.net":10,"www.goo⋯"\xaf"dia.com":6,"s0.2mdn.net":5,"googleads.g.doubleclick.net":3}
+2011-11-03 00:20:00.000 {"www.bro-ids.org":24,"www.google.com":15,"search.twitter.c⋯"\x8b""\xaf"ds.org":2,"ad.doubleclick.net":1,"cont-sjl-1.pandora.com":1}
+2011-11-03 00:21:00.000 {"www.google.com":2,"ajax.googleapis.com":1,"api.twitter.com":1,"search.twitter.com":1,"www.bro-ids.org":1} 
diff --git a/test/expected/test_regex101.sh_2158f1f011ba8e1b152396c072790c076fdb8ce8.err b/test/expected/test_regex101.sh_2158f1f011ba8e1b152396c072790c076fdb8ce8.err
index bbcd290..e69de29 100644
--- a/test/expected/test_regex101.sh_2158f1f011ba8e1b152396c072790c076fdb8ce8.err
+++ b/test/expected/test_regex101.sh_2158f1f011ba8e1b152396c072790c076fdb8ce8.err
@@ -1,3 +0,0 @@
-⚠ warning: not deleting regex101 entry “zpEnjV”
- reason: delete code is not known for this entry
- = note: formats created by importing a regex101.com entry will not have a delete code
diff --git a/test/expected/test_regex101.sh_366730cac50b4a09b7de4b84641791470b1cb9a3.out b/test/expected/test_regex101.sh_366730cac50b4a09b7de4b84641791470b1cb9a3.out
index 7f5397d..8035940 100644
--- a/test/expected/test_regex101.sh_366730cac50b4a09b7de4b84641791470b1cb9a3.out
+++ b/test/expected/test_regex101.sh_366730cac50b4a09b7de4b84641791470b1cb9a3.out
@@ -3,7 +3,7 @@
"unit_test_log": {
"regex": {
"std": {
- "pattern": "\\[(?<timestamp>\\d+\\/\\d+\\/\\d+ \\d+:\\d+:\\d+) (?<jobserver>[\\w.]+) (?<workqueue>[\\w.]+) (?<processid>\\d+)\\] (?<body>.*)$"
+ "pattern": "(?<timestamp>[A-Za-z]+ [A-Za-z]+ +[0-9]+ [0-9]+:[0-9]+:[0-9]+ [0-9]+) : (?<level>[A-Z][a-z]+): (?<seq>\\([0-9]+\\) )?(?<body>.*)$"
}
}
}
diff --git a/test/expected/test_regex101.sh_3d18474a3e472fff6e23e0c41337ec9188fee591.err b/test/expected/test_regex101.sh_3d18474a3e472fff6e23e0c41337ec9188fee591.err
index 32c87d4..7450da8 100644
--- a/test/expected/test_regex101.sh_3d18474a3e472fff6e23e0c41337ec9188fee591.err
+++ b/test/expected/test_regex101.sh_3d18474a3e472fff6e23e0c41337ec9188fee591.err
@@ -1,34 +1,13 @@
-✘ error: invalid value “/unit_test_log/value/jobserver”
- reason: no patterns have a capture named “jobserver”
- = note: the following captures are available:
-
- = help: values are populated from captures in patterns, so at least one pattern must have a capture with this value name
-✘ error: invalid value “/unit_test_log/value/processid”
- reason: no patterns have a capture named “processid”
- = note: the following captures are available:
-
- = help: values are populated from captures in patterns, so at least one pattern must have a capture with this value name
-✘ error: invalid value “/unit_test_log/value/timestamp”
- reason: no patterns have a capture named “timestamp”
- = note: the following captures are available:
-
- = help: values are populated from captures in patterns, so at least one pattern must have a capture with this value name
-✘ error: invalid value “/unit_test_log/value/workqueue”
- reason: no patterns have a capture named “workqueue”
- = note: the following captures are available:
-
- = help: values are populated from captures in patterns, so at least one pattern must have a capture with this value name
-✘ error: invalid sample log message: "[03/22/2021 02:00:02 job1074.example.com db.db81.example_events 54026] {\"ELAPSED\":\"0.011\",\"LEVEL\":\"info\",\"MESSAGE\":\"finished in 0.011\\n\",\"PREFIX\":\"YFgyWQriCmsAAofJAAAAHg\",\"ROUTINGKEY\":\"EXAMPLE1366.Example.Events._Publish\"}"
- reason: sample does not match any patterns
- --> regex101-home/.lnav/formats/installed/unit_test_log.json:26
- = note: the following shows how each pattern matched this sample:
- [03/22/2021 02:00:02 job1074.example.com db.db81.example_events 54026] {"ELAPSED":"0.011","LEVEL":"info","MESSAGE":"finished in 0.011\n","PREFIX":"YFgyWQriCmsAAofJAAAAHg","ROUTINGKEY":"EXAMPLE1366.Example.Events._Publish"}
- = note: std = “”
-
-✘ error: invalid sample log message: "[03/22/2021 02:00:02 job1074.example.com db.db81.example_events 54026] {\"ELAPSED\":\"0.011\",\"LEVEL\":\"info\",\"MESSAGE\":\"finished in 0.011\\n\",\"PREFIX\":\"YFgyWQriCmsAAofJAAAAHg\",\"ROUTINGKEY\":\"EXAMPLE1366.Example.Events._Publish\"}"
- reason: sample does not match any patterns
- --> regex101-home/.lnav/formats/installed/unit_test_log.json:30
- = note: the following shows how each pattern matched this sample:
- [03/22/2021 02:00:02 job1074.example.com db.db81.example_events 54026] {"ELAPSED":"0.011","LEVEL":"info","MESSAGE":"finished in 0.011\n","PREFIX":"YFgyWQriCmsAAofJAAAAHg","ROUTINGKEY":"EXAMPLE1366.Example.Events._Publish"}
- = note: std = “”
-
+✘ error: invalid pattern: “/unit_test_log/regex/std”
+ reason: no timestamp capture found in the pattern
+ = help: all log messages need a timestamp
+✘ error: invalid value for property “/unit_test_log/timestamp-field”
+ reason: “timestamp” was not found in the pattern at /unit_test_log/regex/std
+✘ error: invalid value for property “/unit_test_log/timestamp-field”
+ reason: “timestamp” was not found in the pattern at /unit_test_log/regex/std
+✘ error: invalid value for property “/unit_test_log/timestamp-field”
+ reason: “timestamp” was not found in the pattern at /unit_test_log/regex/std
+✘ error: invalid value for property “/unit_test_log/timestamp-field”
+ reason: “timestamp” was not found in the pattern at /unit_test_log/regex/std
+✘ error: invalid value for property “/unit_test_log/timestamp-field”
+ reason: “timestamp” was not found in the pattern at /unit_test_log/regex/std
diff --git a/test/expected/test_regex101.sh_7991a5b617867cf37c9f7baa85ffa425f7d455a2.err b/test/expected/test_regex101.sh_7991a5b617867cf37c9f7baa85ffa425f7d455a2.err
index 450b99b..ec9b9c5 100644
--- a/test/expected/test_regex101.sh_7991a5b617867cf37c9f7baa85ffa425f7d455a2.err
+++ b/test/expected/test_regex101.sh_7991a5b617867cf37c9f7baa85ffa425f7d455a2.err
@@ -1,5 +1,5 @@
✘ error: expecting an operation to perform on the std regex using regex101.com
 = help: the available subcommands are:
- • push: create/update an entry for this regex on regex101.com
- • pull: create a patch format file for this regular expression based on the entry in regex101.com
- • delete: delete the entry regex101.com that was created by a push operation
+ • push: create/update an entry for this regex on regex101.com
+ • pull: create a patch format file for this regular expression based on the entry in regex101.com
+ • delete: delete the entry regex101.com that was created by a push operation
diff --git a/test/expected/test_regex101.sh_8e93a3b6b941847c71409a297779fbb0a6666a51.err b/test/expected/test_regex101.sh_8e93a3b6b941847c71409a297779fbb0a6666a51.err
index db47111..e3e6069 100644
--- a/test/expected/test_regex101.sh_8e93a3b6b941847c71409a297779fbb0a6666a51.err
+++ b/test/expected/test_regex101.sh_8e93a3b6b941847c71409a297779fbb0a6666a51.err
@@ -1,3 +1,3 @@
✘ error: expecting an operation to perform on the std regular expression
 = help: the available subcommands are:
- • regex101: use regex101.com to edit this regular expression
+ • regex101: use regex101.com to edit this regular expression
diff --git a/test/expected/test_regex101.sh_cbd859487e4ea011cd6e0f0f114d70158bfd8b43.out b/test/expected/test_regex101.sh_cbd859487e4ea011cd6e0f0f114d70158bfd8b43.out
index c06f523..b4c5d30 100644
--- a/test/expected/test_regex101.sh_cbd859487e4ea011cd6e0f0f114d70158bfd8b43.out
+++ b/test/expected/test_regex101.sh_cbd859487e4ea011cd6e0f0f114d70158bfd8b43.out
@@ -4,30 +4,35 @@
"description": "Format file generated from regex101 entry -- https://regex101.com/r/zpEnjV/2",
"regex": {
"std": {
- "pattern": "\\[(?<timestamp>\\d+\\/\\d+\\/\\d+ \\d+:\\d+:\\d+) (?<jobserver>[\\w.]+) (?<workqueue>[\\w.]+) (?<processid>\\d+)\\] (?<body>.*)$"
+ "pattern": "(?<timestamp>[A-Za-z]+ [A-Za-z]+ +[0-9]+ [0-9]+:[0-9]+:[0-9]+ [0-9]+) : (?<level>[A-Z][a-z]+): (?<seq>\\([0-9]+\\) )?(?<body>.*)$"
}
},
"value": {
- "jobserver": {
+ "level": {
"kind": "string"
},
- "processid": {
+ "seq": {
"kind": "string"
},
"timestamp": {
"kind": "string"
- },
- "workqueue": {
- "kind": "string"
}
},
"sample": [
{
- "line": "[03/22/2021 02:00:02 job1074.example.com db.db81.example_events 54026] {\"ELAPSED\":\"0.011\",\"LEVEL\":\"info\",\"MESSAGE\":\"finished in 0.011\\n\",\"PREFIX\":\"YFgyWQriCmsAAofJAAAAHg\",\"ROUTINGKEY\":\"EXAMPLE1366.Example.Events._Publish\"}"
+ "line": "Fri Jul 15 23:12:58 2016 : Info: Loaded virtual server <default>"
+ },
+ {
+ "line": "Fri Jul 15 23:12:58 2016 : Warning: Ignoring \"sql\" (see raddb/mods-available/README.rst)"
+ },
+ {
+ "line": "Wed Oct 18 22:17:43 2023 : Info: (102211) radutmp: NAS wifi-router rebooted (Accounting-Off packet seen)"
+ },
+ {
+ "line": "Fri Oct 20 18:50:05 2023 : Auth: (105290) Login OK: [iphonese3] (from client wifi-router port 0 via TLS tunnel)"
},
{
- "description": "sample 1",
- "line": "[03/22/2021 02:00:02 job1074.example.com db.db81.example_events 54026] {\"ELAPSED\":\"0.011\",\"LEVEL\":\"info\",\"MESSAGE\":\"finished in 0.011\\n\",\"PREFIX\":\"YFgyWQriCmsAAofJAAAAHg\",\"ROUTINGKEY\":\"EXAMPLE1366.Example.Events._Publish\"}"
+ "line": "Fri Oct 20 18:50:05 2023 : Auth: (105291) Login OK: [iphonese3] (from client wifi-router port 197 cli 22-2E-28-D6-F5-CC)"
}
]
}
diff --git a/test/expected/test_regex101.sh_d84597760285c3964b258726341e018f6cd49954.err b/test/expected/test_regex101.sh_d84597760285c3964b258726341e018f6cd49954.err
index 85a97ba..ea8c31d 100644
--- a/test/expected/test_regex101.sh_d84597760285c3964b258726341e018f6cd49954.err
+++ b/test/expected/test_regex101.sh_d84597760285c3964b258726341e018f6cd49954.err
@@ -2,6 +2,6 @@
 = note: this regex is currently associated with the following regex101.com entry:
https://regex101.com/r/zpEnjV
 = help: the available subcommands are:
- • push: create/update an entry for this regex on regex101.com
- • pull: create a patch format file for this regular expression based on the entry in regex101.com
- • delete: delete the entry regex101.com that was created by a push operation
+ • push: create/update an entry for this regex on regex101.com
+ • pull: create a patch format file for this regular expression based on the entry in regex101.com
+ • delete: delete the entry regex101.com that was created by a push operation
diff --git a/test/expected/test_sessions.sh_33ab03afda2c9331a289fcbd1abdbc1c37b2e87b.err b/test/expected/test_sessions.sh_33ab03afda2c9331a289fcbd1abdbc1c37b2e87b.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sessions.sh_33ab03afda2c9331a289fcbd1abdbc1c37b2e87b.err
diff --git a/test/expected/test_sessions.sh_33ab03afda2c9331a289fcbd1abdbc1c37b2e87b.out b/test/expected/test_sessions.sh_33ab03afda2c9331a289fcbd1abdbc1c37b2e87b.out
new file mode 100644
index 0000000..2a19a15
--- /dev/null
+++ b/test/expected/test_sessions.sh_33ab03afda2c9331a289fcbd1abdbc1c37b2e87b.out
@@ -0,0 +1,11 @@
+2011-11-03 00:20:39.348046 ⋮ 192.168.2.76 52099 192.150.187.43 80 2 GET www.bro-ids.org /frames/header.html http://git.bro-ids.org/ 1.1 Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20100101 Firefox/7.0.1 0 3516 200 OK - - (empty) - - - - - - Fzea5XNhn9eNRMvx7 - text/html
+2011-11-03 00:20:39.448670 ⋮ 192.168.2.76 52109 192.150.187.43 80 1 GET www.bro-ids.org /frames/footer.html http://git.bro-ids.org/ 1.1 Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20100101 Firefox/7.0.1 0 6695 200 OK - - (empty) - - - - - - FkCp6k4tqksK3tiSy7 - text/html
+2011-11-03 00:20:39.463465 ⋮ 192.168.2.76 52099 192.150.187.43 80 3 GET www.bro-ids.org /images/logo-bro-small.png http://www.bro-ids.org/frames/header.html 1.1 Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20100101 Firefox/7.0.1 0 6075 200 OK - - (empty) - - - - - - Fw6FlF4WtotJFNXmHb - image/png
+2011-11-03 00:20:39.786857 ⋮ 192.168.2.76 52110 199.59.148.201 80 1 GET search.twitter.com /search.json?&q=#BroIDS&rpp=2&callback=jsonp1320279639636 http://www.bro-ids.org/frames/footer.html 1.1 Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20100101 Firefox/7.0.1 0 1543 200 OK - - (empty) - - - - - - Feut0t346XEHsQ0OC7 - text/plain
+2011-11-03 00:21:12.372857 ⋮ 192.168.2.76 52111 192.150.187.43 80 1 GET www.bro-ids.org /research/index.html http://www.bro-ids.org/frames/header.html 1.1 Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20100101 Firefox/7.0.1 0 47728 200 OK - - (empty) - - - - - - FOze0l2aT79uPyMiv7 - text/html
+2011-11-03 00:21:13.121725 ⋮ 192.168.2.76 52087 209.85.145.95 80 7 GET ajax.googleapis.com /ajax/services/feed/load?v=1.0&callback=jsonp1320279672539&q=http://blog.bro-ids.org/feeds/posts/default&num=5 http://www.bro-ids.org/research/index.html 1.1 Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20100101 Firefox/7.0.1 0 6584 200 OK - - (empty) - - - - - - FXEXQEMH8DrEuAdg8 - text/plain
+2011-11-03 00:21:13.123842 ⋮ 192.168.2.76 52089 74.125.225.83 80 4 GET www.google.com /uds/css/clear.gif http://www.google.com/uds/api/search/1.0/473bb688d0c0dd605119ad983f5a4386/default+en.css 1.1 Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20100101 Firefox/7.0.1 0 0 304 Not Modified - - (empty) - - - - - - - - -
+2011-11-03 00:21:13.123121 ⋮ 192.168.2.76 52084 74.125.225.83 80 9 GET www.google.com /uds/css/small-logo.png http://www.bro-ids.org/research/index.html 1.1 Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20100101 Firefox/7.0.1 0 0 304 Not Modified - - (empty) - - - - - - - - -
+2011-11-03 00:21:13.198815 ⋮ 192.168.2.76 52112 199.59.148.201 80 1 GET search.twitter.com /search.json?&q=#BroIDS&rpp=2&callback=jsonp1320279672537 http://www.bro-ids.org/research/index.html 1.1 Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20100101 Firefox/7.0.1 0 1543 200 OK - - (empty) - - - - - - Fzjgwn8xXem3Esvk - text/plain
+#close 2017-04-16-21-36-10
+2011-11-03 00:21:13.204466 ⋮ 192.168.2.76 52113 199.59.148.20 80 1 GET api.twitter.com /1/statuses/user_timeline.json?screen_name=Bro_IDS&count=2&include_rts=1&callback=jsonp1320279672538 http://www.bro-ids.org/research/index.html 1.1 Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20100101 Firefox/7.0.1 0 6095 200 OK - - (empty) - - - - - - FAVIuu2XZQyVznfnq8 - text/plain
diff --git a/test/expected/test_sessions.sh_639b83ce8f67975dfdc7086946ec287b43b6fa8c.err b/test/expected/test_sessions.sh_639b83ce8f67975dfdc7086946ec287b43b6fa8c.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sessions.sh_639b83ce8f67975dfdc7086946ec287b43b6fa8c.err
diff --git a/test/expected/test_sessions.sh_639b83ce8f67975dfdc7086946ec287b43b6fa8c.out b/test/expected/test_sessions.sh_639b83ce8f67975dfdc7086946ec287b43b6fa8c.out
new file mode 100644
index 0000000..4023598
--- /dev/null
+++ b/test/expected/test_sessions.sh_639b83ce8f67975dfdc7086946ec287b43b6fa8c.out
@@ -0,0 +1,89 @@
+[
+ {
+ "top_meta": {
+ "time": "2009-07-20 22:59:29.000",
+ "file": "{test_dir}/logfile_access_log.0",
+ "anchor": "#middle",
+ "breadcrumbs": [
+ {
+ "display_value": "⊑ middle",
+ "search_placeholder": "",
+ "possibilities": [
+ {
+ "display_value": "middle"
+ }
+ ]
+ },
+ {
+ "display_value": "2009-07-20T22:59:29.000",
+ "search_placeholder": "(Enter an absolute or relative time)",
+ "possibilities": [
+ {
+ "display_value": "-1 day"
+ },
+ {
+ "display_value": "-1h"
+ },
+ {
+ "display_value": "-30m"
+ },
+ {
+ "display_value": "-15m"
+ },
+ {
+ "display_value": "-5m"
+ },
+ {
+ "display_value": "-1m"
+ },
+ {
+ "display_value": "+1m"
+ },
+ {
+ "display_value": "+5m"
+ },
+ {
+ "display_value": "+15m"
+ },
+ {
+ "display_value": "+30m"
+ },
+ {
+ "display_value": "+1h"
+ },
+ {
+ "display_value": "+1 day"
+ }
+ ]
+ },
+ {
+ "display_value": "access_log",
+ "search_placeholder": "",
+ "possibilities": [
+ {
+ "display_value": "access_log"
+ }
+ ]
+ },
+ {
+ "display_value": "logfile_access_log.0[2]",
+ "search_placeholder": "",
+ "possibilities": [
+ {
+ "display_value": "logfile_access_log.0"
+ }
+ ]
+ },
+ {
+ "display_value": "192.168.202.254",
+ "search_placeholder": "",
+ "possibilities": [
+ {
+ "display_value": "192.168.202.254"
+ }
+ ]
+ }
+ ]
+ }
+ }
+]
diff --git a/test/expected/test_sessions.sh_6d87ff483d5785c58fb271a405ff1c35e4f83cd9.out b/test/expected/test_sessions.sh_6d87ff483d5785c58fb271a405ff1c35e4f83cd9.out
index eb9e677..8b72915 100644
--- a/test/expected/test_sessions.sh_6d87ff483d5785c58fb271a405ff1c35e4f83cd9.out
+++ b/test/expected/test_sessions.sh_6d87ff483d5785c58fb271a405ff1c35e4f83cd9.out
@@ -3,8 +3,8 @@
# '|/path/to/this/file' in lnav to execute this file and
# restore the state of the session.
-;SELECT raise_error('This session export was made with a newer version of lnav, please upgrade to ' || '0.11.2' || ' or later')
- WHERE lnav_version() < '0.11.2' COLLATE naturalcase
+;SELECT raise_error('This session export was made with a newer version of lnav, please upgrade to ' || '0.12.2' || ' or later')
+ WHERE lnav_version() < '0.12.2' COLLATE naturalcase
# The files loaded into the session were:
@@ -21,7 +21,7 @@
# comments, and tags that were added in the session.
;SELECT total_changes() AS before_mark_changes
-;UPDATE all_logs SET log_mark = 1, log_comment = NULL, log_tags = NULL WHERE log_time_msecs = 1248130769000 AND log_format = 'access_log' AND log_line_hash = 'v1:b05c1bdfe75cde41e151c89087e31951'
+;UPDATE all_logs SET log_mark = 1, log_comment = NULL, log_tags = NULL, log_annotations = NULL WHERE log_time_msecs = 1248130769000 AND log_format = 'access_log' AND log_line_hash = 'v1:b05c1bdfe75cde41e151c89087e31951'
;SELECT 1 - (total_changes() - $before_mark_changes) AS failed_mark_changes
;SELECT echoln(printf('%sERROR%s: failed to restore %d bookmarks',
diff --git a/test/expected/test_sessions.sh_8732dad5481be991ca7f291d9c5451c7b016cea7.out b/test/expected/test_sessions.sh_8732dad5481be991ca7f291d9c5451c7b016cea7.out
deleted file mode 100644
index a1e2e6f..0000000
--- a/test/expected/test_sessions.sh_8732dad5481be991ca7f291d9c5451c7b016cea7.out
+++ /dev/null
@@ -1,33 +0,0 @@
-#!lnav -Nf
-# This file is an export of an lnav session. You can type
-# '|/path/to/this/file' in lnav to execute this file and
-# restore the state of the session.
-
-;SELECT raise_error('This session export was made with a newer version of lnav, please upgrade to ' || '0.11.0' || ' or later')
- WHERE lnav_version() < '0.11.0' COLLATE naturalcase
-
-# The files loaded into the session were:
-
-
-;INSERT OR IGNORE INTO environ (name, value) VALUES ('LOG_DIR_0', '{top_srcdir_parent}')
-:open $LOG_DIR_0/lnav/test/logfile_access_log.0
-
-:rebuild
-
-
-# The following SQL statements will restore the bookmarks,
-# comments, and tags that were added in the session.
-
-;SELECT total_changes() AS before_mark_changes
-;UPDATE all_logs SET log_mark = 1, log_comment = NULL, log_tags = NULL WHERE log_time_msecs = 1248130769000 AND log_format = 'access_log' AND log_line_hash = 'v1:b05c1bdfe75cde41e151c89087e31951'
-
-;SELECT 1 - (total_changes() - $before_mark_changes) AS failed_mark_changes
-;SELECT echoln(printf('%sERROR%s: failed to restore %d bookmarks',
- $ansi_red, $ansi_norm, $failed_mark_changes))
- WHERE $failed_mark_changes != 0
-
-
-# The following commands will restore the state of the LOG view.
-
-:switch-to-view log
-:goto 1
diff --git a/test/expected/test_sessions.sh_9978aaa475513f9981840e612f853a7707ffcf90.out b/test/expected/test_sessions.sh_9978aaa475513f9981840e612f853a7707ffcf90.out
index 3c84ede..20f826b 100644
--- a/test/expected/test_sessions.sh_9978aaa475513f9981840e612f853a7707ffcf90.out
+++ b/test/expected/test_sessions.sh_9978aaa475513f9981840e612f853a7707ffcf90.out
@@ -9,3 +9,4 @@ db
schema
pretty
spectro
+gantt
diff --git a/test/expected/test_sessions.sh_ba1ded92531350668301431db64df2d2f4a2e9ee.err b/test/expected/test_sessions.sh_ba1ded92531350668301431db64df2d2f4a2e9ee.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sessions.sh_ba1ded92531350668301431db64df2d2f4a2e9ee.err
diff --git a/test/expected/test_sessions.sh_ba1ded92531350668301431db64df2d2f4a2e9ee.out b/test/expected/test_sessions.sh_ba1ded92531350668301431db64df2d2f4a2e9ee.out
new file mode 100644
index 0000000..0e301c3
--- /dev/null
+++ b/test/expected/test_sessions.sh_ba1ded92531350668301431db64df2d2f4a2e9ee.out
@@ -0,0 +1,5 @@
+192.168.202.254 - - [20/Jul/2009:22:59:26 +0000] "GET /vmw/cgi/tramp HTTP/1.0" 200 134 "-" "gPXE/0.9.7"
+ ├ org.lnav.test:
+ ╰ Hello, World!
+192.168.202.254 - - [20/Jul/2009:22:59:29 +0000] "GET /vmw/vSphere/default/vmkboot.gz HTTP/1.0" 404 46210 "-" "gPXE/0.9.7"
+192.168.202.254 - - [20/Jul/2009:22:59:29 +0000] "GET /vmw/vSphere/default/vmkernel.gz HTTP/1.0" 200 78929 "-" "gPXE/0.9.7"
diff --git a/test/expected/test_sessions.sh_e57697be4d81ac8e5b2b2fa84f919b2d494978f3.err b/test/expected/test_sessions.sh_e57697be4d81ac8e5b2b2fa84f919b2d494978f3.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sessions.sh_e57697be4d81ac8e5b2b2fa84f919b2d494978f3.err
diff --git a/test/expected/test_sessions.sh_e57697be4d81ac8e5b2b2fa84f919b2d494978f3.out b/test/expected/test_sessions.sh_e57697be4d81ac8e5b2b2fa84f919b2d494978f3.out
new file mode 100644
index 0000000..2a19a15
--- /dev/null
+++ b/test/expected/test_sessions.sh_e57697be4d81ac8e5b2b2fa84f919b2d494978f3.out
@@ -0,0 +1,11 @@
+2011-11-03 00:20:39.348046 ⋮ 192.168.2.76 52099 192.150.187.43 80 2 GET www.bro-ids.org /frames/header.html http://git.bro-ids.org/ 1.1 Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20100101 Firefox/7.0.1 0 3516 200 OK - - (empty) - - - - - - Fzea5XNhn9eNRMvx7 - text/html
+2011-11-03 00:20:39.448670 ⋮ 192.168.2.76 52109 192.150.187.43 80 1 GET www.bro-ids.org /frames/footer.html http://git.bro-ids.org/ 1.1 Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20100101 Firefox/7.0.1 0 6695 200 OK - - (empty) - - - - - - FkCp6k4tqksK3tiSy7 - text/html
+2011-11-03 00:20:39.463465 ⋮ 192.168.2.76 52099 192.150.187.43 80 3 GET www.bro-ids.org /images/logo-bro-small.png http://www.bro-ids.org/frames/header.html 1.1 Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20100101 Firefox/7.0.1 0 6075 200 OK - - (empty) - - - - - - Fw6FlF4WtotJFNXmHb - image/png
+2011-11-03 00:20:39.786857 ⋮ 192.168.2.76 52110 199.59.148.201 80 1 GET search.twitter.com /search.json?&q=#BroIDS&rpp=2&callback=jsonp1320279639636 http://www.bro-ids.org/frames/footer.html 1.1 Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20100101 Firefox/7.0.1 0 1543 200 OK - - (empty) - - - - - - Feut0t346XEHsQ0OC7 - text/plain
+2011-11-03 00:21:12.372857 ⋮ 192.168.2.76 52111 192.150.187.43 80 1 GET www.bro-ids.org /research/index.html http://www.bro-ids.org/frames/header.html 1.1 Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20100101 Firefox/7.0.1 0 47728 200 OK - - (empty) - - - - - - FOze0l2aT79uPyMiv7 - text/html
+2011-11-03 00:21:13.121725 ⋮ 192.168.2.76 52087 209.85.145.95 80 7 GET ajax.googleapis.com /ajax/services/feed/load?v=1.0&callback=jsonp1320279672539&q=http://blog.bro-ids.org/feeds/posts/default&num=5 http://www.bro-ids.org/research/index.html 1.1 Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20100101 Firefox/7.0.1 0 6584 200 OK - - (empty) - - - - - - FXEXQEMH8DrEuAdg8 - text/plain
+2011-11-03 00:21:13.123842 ⋮ 192.168.2.76 52089 74.125.225.83 80 4 GET www.google.com /uds/css/clear.gif http://www.google.com/uds/api/search/1.0/473bb688d0c0dd605119ad983f5a4386/default+en.css 1.1 Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20100101 Firefox/7.0.1 0 0 304 Not Modified - - (empty) - - - - - - - - -
+2011-11-03 00:21:13.123121 ⋮ 192.168.2.76 52084 74.125.225.83 80 9 GET www.google.com /uds/css/small-logo.png http://www.bro-ids.org/research/index.html 1.1 Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20100101 Firefox/7.0.1 0 0 304 Not Modified - - (empty) - - - - - - - - -
+2011-11-03 00:21:13.198815 ⋮ 192.168.2.76 52112 199.59.148.201 80 1 GET search.twitter.com /search.json?&q=#BroIDS&rpp=2&callback=jsonp1320279672537 http://www.bro-ids.org/research/index.html 1.1 Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20100101 Firefox/7.0.1 0 1543 200 OK - - (empty) - - - - - - Fzjgwn8xXem3Esvk - text/plain
+#close 2017-04-16-21-36-10
+2011-11-03 00:21:13.204466 ⋮ 192.168.2.76 52113 199.59.148.20 80 1 GET api.twitter.com /1/statuses/user_timeline.json?screen_name=Bro_IDS&count=2&include_rts=1&callback=jsonp1320279672538 http://www.bro-ids.org/research/index.html 1.1 Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20100101 Firefox/7.0.1 0 6095 200 OK - - (empty) - - - - - - FAVIuu2XZQyVznfnq8 - text/plain
diff --git a/test/expected/test_sessions.sh_e988439404f2e97604641c8d087855f3efe052e4.err b/test/expected/test_sessions.sh_e988439404f2e97604641c8d087855f3efe052e4.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sessions.sh_e988439404f2e97604641c8d087855f3efe052e4.err
diff --git a/test/expected/test_sessions.sh_e39648f425c3f291c9d1c0d14595a019abd0cb48.out b/test/expected/test_sessions.sh_e988439404f2e97604641c8d087855f3efe052e4.out
index 0473e9d..05b7505 100644
--- a/test/expected/test_sessions.sh_e39648f425c3f291c9d1c0d14595a019abd0cb48.out
+++ b/test/expected/test_sessions.sh_e988439404f2e97604641c8d087855f3efe052e4.out
@@ -3,12 +3,13 @@
# '|/path/to/this/file' in lnav to execute this file and
# restore the state of the session.
-;SELECT raise_error('This session export was made with a newer version of lnav, please upgrade to ' || '0.11.0' || ' or later')
- WHERE lnav_version() < '0.11.0' COLLATE naturalcase
+;SELECT raise_error('This session export was made with a newer version of lnav, please upgrade to ' || '0.12.2' || ' or later')
+ WHERE lnav_version() < '0.12.2' COLLATE naturalcase
# The files loaded into the session were:
+# Set this environment variable to override this value or edit this script.
;INSERT OR IGNORE INTO environ (name, value) VALUES ('LOG_DIR_0', '{test_dir}')
:open $LOG_DIR_0/support-dump/logfile_access_log.0
@@ -19,7 +20,7 @@
# comments, and tags that were added in the session.
;SELECT total_changes() AS before_mark_changes
-;UPDATE all_logs SET log_mark = 1, log_comment = NULL, log_tags = NULL WHERE log_time_msecs = 1248130769000 AND log_format = 'access_log' AND log_line_hash = 'v1:b05c1bdfe75cde41e151c89087e31951'
+;UPDATE all_logs SET log_mark = 0, log_comment = NULL, log_tags = NULL, log_annotations = '{"org.lnav.test":"Hello, <span style=\"color: #f00\">World</span>!\n"}' WHERE log_time_msecs = 1248130766000 AND log_format = 'access_log' AND log_line_hash = 'v1:3f7e0f10f2473f83b2b4eacccfc9b4e2'
;SELECT 1 - (total_changes() - $before_mark_changes) AS failed_mark_changes
;SELECT echoln(printf('%sERROR%s: failed to restore %d bookmarks',
@@ -27,7 +28,13 @@
WHERE $failed_mark_changes != 0
+# The following SQL statements will restore the filters that
+# were added in the session.
+
+;REPLACE INTO lnav_view_filters (view_name, enabled, type, language, pattern) VALUES ('log', 0, 'in', 'regex', 'credential status')
+
+
# The following commands will restore the state of the LOG view.
:switch-to-view log
-:goto 1
+:goto 0
diff --git a/test/expected/test_shlexer.sh_14dd967cb2af90899c9e5e45d00b676b5a3163aa.out b/test/expected/test_shlexer.sh_14dd967cb2af90899c9e5e45d00b676b5a3163aa.out
index fd072bc..0dd4080 100644
--- a/test/expected/test_shlexer.sh_14dd967cb2af90899c9e5e45d00b676b5a3163aa.out
+++ b/test/expected/test_shlexer.sh_14dd967cb2af90899c9e5e45d00b676b5a3163aa.out
@@ -1,7 +1,8 @@
~ foo
til ^
wsp ^
+eof ^
eval -- ../test foo
split:
- 0 -- ../test
- 1 -- foo
+ 0 ^ -- ../test
+ 1 ^-^ -- foo
diff --git a/test/expected/test_shlexer.sh_2781f5dd570580cbe746ad91b58a28b8371283b3.out b/test/expected/test_shlexer.sh_2781f5dd570580cbe746ad91b58a28b8371283b3.out
index b7ba9e8..2081fa3 100644
--- a/test/expected/test_shlexer.sh_2781f5dd570580cbe746ad91b58a28b8371283b3.out
+++ b/test/expected/test_shlexer.sh_2781f5dd570580cbe746ad91b58a28b8371283b3.out
@@ -1,7 +1,8 @@
~nonexistent/bar baz
til ^----------^
wsp ^
+eof ^
eval -- ~nonexistent/bar baz
split:
- 0 -- ~nonexistent/bar
- 1 -- baz
+ 0 ^--------------^ -- ~nonexistent/bar
+ 1 ^-^ -- baz
diff --git a/test/expected/test_shlexer.sh_2af44d06fc137a77bc230be86376ccad23a2806b.out b/test/expected/test_shlexer.sh_2af44d06fc137a77bc230be86376ccad23a2806b.out
index 85cca78..8d6bcc0 100644
--- a/test/expected/test_shlexer.sh_2af44d06fc137a77bc230be86376ccad23a2806b.out
+++ b/test/expected/test_shlexer.sh_2af44d06fc137a77bc230be86376ccad23a2806b.out
@@ -1,2 +1,2 @@
\
-err ^
+err ^ -- invalid escape
diff --git a/test/expected/test_shlexer.sh_6858e530a8ecb77cbaec1a7507768dd5a1942ac9.out b/test/expected/test_shlexer.sh_6858e530a8ecb77cbaec1a7507768dd5a1942ac9.out
index f677b17..6869e6d 100644
--- a/test/expected/test_shlexer.sh_6858e530a8ecb77cbaec1a7507768dd5a1942ac9.out
+++ b/test/expected/test_shlexer.sh_6858e530a8ecb77cbaec1a7507768dd5a1942ac9.out
@@ -1,5 +1,6 @@
${FOO}
qrf ^----^
+eof ^
eval -- bar
split:
- 0 -- bar
+ 0 ^----^ -- bar
diff --git a/test/expected/test_shlexer.sh_7f31e16ea2469da7a4328c93c7bcc8e109f84d2f.out b/test/expected/test_shlexer.sh_7f31e16ea2469da7a4328c93c7bcc8e109f84d2f.out
index 630eb1c..46009ec 100644
--- a/test/expected/test_shlexer.sh_7f31e16ea2469da7a4328c93c7bcc8e109f84d2f.out
+++ b/test/expected/test_shlexer.sh_7f31e16ea2469da7a4328c93c7bcc8e109f84d2f.out
@@ -2,6 +2,7 @@
dst ^
qrf ^----^
den ^
+eof ^
eval -- "abc xyz 123"
split:
- 0 -- abc xyz 123
+ 0 ^--------------^ -- abc xyz 123
diff --git a/test/expected/test_shlexer.sh_8aeebcdef56edd783579eaaddaff7c5cc127bb86.out b/test/expected/test_shlexer.sh_8aeebcdef56edd783579eaaddaff7c5cc127bb86.out
index 759e75b..5eda1e5 100644
--- a/test/expected/test_shlexer.sh_8aeebcdef56edd783579eaaddaff7c5cc127bb86.out
+++ b/test/expected/test_shlexer.sh_8aeebcdef56edd783579eaaddaff7c5cc127bb86.out
@@ -1,6 +1,7 @@
'abc $DEF 123'
sst ^
sen ^
+eof ^
eval -- 'abc $DEF 123'
split:
- 0 -- abc $DEF 123
+ 0 ^------------^ -- abc $DEF 123
diff --git a/test/expected/test_shlexer.sh_8e9addb0e5b6f4254d81dd89ecf12783109644bb.out b/test/expected/test_shlexer.sh_8e9addb0e5b6f4254d81dd89ecf12783109644bb.out
index 2cbee1a..6ea7ec2 100644
--- a/test/expected/test_shlexer.sh_8e9addb0e5b6f4254d81dd89ecf12783109644bb.out
+++ b/test/expected/test_shlexer.sh_8e9addb0e5b6f4254d81dd89ecf12783109644bb.out
@@ -2,6 +2,7 @@
dst ^
ref ^--^
den ^
+eof ^
eval -- "abc xyz 123"
split:
- 0 -- abc xyz 123
+ 0 ^------------^ -- abc xyz 123
diff --git a/test/expected/test_shlexer.sh_90961e6728e96d0a44535a6c9907cc990c10316c.out b/test/expected/test_shlexer.sh_90961e6728e96d0a44535a6c9907cc990c10316c.out
index 9a2b2a7..1fc686b 100644
--- a/test/expected/test_shlexer.sh_90961e6728e96d0a44535a6c9907cc990c10316c.out
+++ b/test/expected/test_shlexer.sh_90961e6728e96d0a44535a6c9907cc990c10316c.out
@@ -1,6 +1,7 @@
"def"
dst ^
den ^
+eof ^
eval -- "def"
split:
- 0 -- def
+ 0 ^---^ -- def
diff --git a/test/expected/test_shlexer.sh_95c4e861804a5434900fdb4d67b149d1baa2edf4.out b/test/expected/test_shlexer.sh_95c4e861804a5434900fdb4d67b149d1baa2edf4.out
index 30a7791..465073b 100644
--- a/test/expected/test_shlexer.sh_95c4e861804a5434900fdb4d67b149d1baa2edf4.out
+++ b/test/expected/test_shlexer.sh_95c4e861804a5434900fdb4d67b149d1baa2edf4.out
@@ -1,5 +1,6 @@
$FOO
ref ^--^
+eof ^
eval -- bar
split:
- 0 -- bar
+ 0 ^--^ -- bar
diff --git a/test/expected/test_shlexer.sh_d7fe5f6b8fc9ba00539fad0fa0bfb08319d8b04b.out b/test/expected/test_shlexer.sh_d7fe5f6b8fc9ba00539fad0fa0bfb08319d8b04b.out
index a2ae7ff..8feba4e 100644
--- a/test/expected/test_shlexer.sh_d7fe5f6b8fc9ba00539fad0fa0bfb08319d8b04b.out
+++ b/test/expected/test_shlexer.sh_d7fe5f6b8fc9ba00539fad0fa0bfb08319d8b04b.out
@@ -1,6 +1,7 @@
'abc'
sst ^
sen ^
+eof ^
eval -- 'abc'
split:
- 0 -- abc
+ 0 ^---^ -- abc
diff --git a/test/expected/test_shlexer.sh_d9d46422a913e3a06ddbd262933ef5352c30e68f.out b/test/expected/test_shlexer.sh_d9d46422a913e3a06ddbd262933ef5352c30e68f.out
index def9d5c..5f35534 100644
--- a/test/expected/test_shlexer.sh_d9d46422a913e3a06ddbd262933ef5352c30e68f.out
+++ b/test/expected/test_shlexer.sh_d9d46422a913e3a06ddbd262933ef5352c30e68f.out
@@ -2,8 +2,9 @@
wsp ^
ref ^--^
wsp ^^
+eof ^
eval -- abc xyz 123
split:
- 0 -- abc
- 1 -- xyz
- 2 -- 123
+ 0 ^-^ -- abc
+ 1 ^--^ -- xyz
+ 2 ^-^ -- 123
diff --git a/test/expected/test_shlexer.sh_e0599f0b53d1bd27af767113853f8e84291f137d.out b/test/expected/test_shlexer.sh_e0599f0b53d1bd27af767113853f8e84291f137d.out
index 9b84999..eece1b6 100644
--- a/test/expected/test_shlexer.sh_e0599f0b53d1bd27af767113853f8e84291f137d.out
+++ b/test/expected/test_shlexer.sh_e0599f0b53d1bd27af767113853f8e84291f137d.out
@@ -1,6 +1,7 @@
'"'
sst ^
sen ^
+eof ^
eval -- '"'
split:
- 0 -- "
+ 0 ^-^ -- "
diff --git a/test/expected/test_shlexer.sh_e8fa2239ab17e7563d0c524f5400a79d6ff8bfda.out b/test/expected/test_shlexer.sh_e8fa2239ab17e7563d0c524f5400a79d6ff8bfda.out
index a668d4d..41a0f64 100644
--- a/test/expected/test_shlexer.sh_e8fa2239ab17e7563d0c524f5400a79d6ff8bfda.out
+++ b/test/expected/test_shlexer.sh_e8fa2239ab17e7563d0c524f5400a79d6ff8bfda.out
@@ -1,6 +1,7 @@
"'"
dst ^
den ^
+eof ^
eval -- "'"
split:
- 0 -- '
+ 0 ^-^ -- '
diff --git a/test/expected/test_shlexer.sh_e99fe1cde36b85ebbab86ca820f55ec861cdc20b.err b/test/expected/test_shlexer.sh_e99fe1cde36b85ebbab86ca820f55ec861cdc20b.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_shlexer.sh_e99fe1cde36b85ebbab86ca820f55ec861cdc20b.err
diff --git a/test/expected/test_shlexer.sh_e99fe1cde36b85ebbab86ca820f55ec861cdc20b.out b/test/expected/test_shlexer.sh_e99fe1cde36b85ebbab86ca820f55ec861cdc20b.out
new file mode 100644
index 0000000..9a7083d
--- /dev/null
+++ b/test/expected/test_shlexer.sh_e99fe1cde36b85ebbab86ca820f55ec861cdc20b.out
@@ -0,0 +1,6 @@
+ abc
+wsp ^
+eof ^
+eval -- abc
+split:
+ 0 ^-^ -- abc
diff --git a/test/expected/test_sql.sh_09416e332d9b2f76743836b72e71b6e4492e594e.err b/test/expected/test_sql.sh_09416e332d9b2f76743836b72e71b6e4492e594e.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql.sh_09416e332d9b2f76743836b72e71b6e4492e594e.err
diff --git a/test/expected/test_sql.sh_09416e332d9b2f76743836b72e71b6e4492e594e.out b/test/expected/test_sql.sh_09416e332d9b2f76743836b72e71b6e4492e594e.out
new file mode 100644
index 0000000..4b7bf9a
--- /dev/null
+++ b/test/expected/test_sql.sh_09416e332d9b2f76743836b72e71b6e4492e594e.out
@@ -0,0 +1,3 @@
+group_concat(cs_uri_stem),sc_status
+"/vmw/cgi/tramp,/vmw/vSphere/default/vmkernel.gz",200
+/vmw/vSphere/default/vmkboot.gz,404
diff --git a/test/expected/test_sql.sh_0a5d13b62da4cb66a59a51b0240b5fe0b6036b7e.out b/test/expected/test_sql.sh_0a5d13b62da4cb66a59a51b0240b5fe0b6036b7e.out
index 386f1e3..332a12e 100644
--- a/test/expected/test_sql.sh_0a5d13b62da4cb66a59a51b0240b5fe0b6036b7e.out
+++ b/test/expected/test_sql.sh_0a5d13b62da4cb66a59a51b0240b5fe0b6036b7e.out
@@ -1,2 +1,2 @@
- lnav_top_file() 
+ lnav_top_file()  
{test_dir}/logfile_access_log.0
diff --git a/test/expected/test_sql.sh_13429aed81d7edfd47b57e9cdb8a25c43aff35c4.out b/test/expected/test_sql.sh_13429aed81d7edfd47b57e9cdb8a25c43aff35c4.out
index 4acb940..a8b3bc8 100644
--- a/test/expected/test_sql.sh_13429aed81d7edfd47b57e9cdb8a25c43aff35c4.out
+++ b/test/expected/test_sql.sh_13429aed81d7edfd47b57e9cdb8a25c43aff35c4.out
@@ -1,2 +1,2 @@
-log_line log_part  log_time log_idle_msecs log_level log_mark log_comment log_tags log_filters  c_ip cs_bytes cs_method cs_uri_query  cs_uri_stem cs_username cs_vars cs_version s_app s_core s_pid s_req s_runtime s_switches s_worker_reqs sc_bytes sc_header_bytes sc_headers sc_status 
- 0  <NULL> 2016-03-13 22:49:12.000  0 info   0  <NULL>  <NULL>  <NULL> 127.0.0.1  696 POST   <NULL> /update_metrics     38 HTTP/1.1  0   3  88185  1  0.129  1  1  47  378  9    200 
+log_line  log_time  log_level  c_ip   cs_bytes  cs_method cs_uri_query  cs_uri_stem  cs_username  cs_vars  cs_version s_app s_core s_pid s_req s_runtime  s_switches s_worker_reqs  sc_bytes  sc_header_bytes sc_headers sc_status log_part log_idle_msecs log_mark log_comment log_tags log_annotations log_filters 
+ 0 2016-03-13 22:49:12.000 info 127.0.0.1  696 POST <NULL> /update_metrics  38 HTTP/1.1 0 3 88185 1  0.129  1 1  47  378  9 200 <NULL>  0 0 <NULL> <NULL> <NULL> <NULL>
diff --git a/test/expected/test_sql.sh_19c92996bcc884bfdb70e3d24606cf5070556a74.err b/test/expected/test_sql.sh_19c92996bcc884bfdb70e3d24606cf5070556a74.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql.sh_19c92996bcc884bfdb70e3d24606cf5070556a74.err
diff --git a/test/expected/test_sql.sh_19c92996bcc884bfdb70e3d24606cf5070556a74.out b/test/expected/test_sql.sh_19c92996bcc884bfdb70e3d24606cf5070556a74.out
new file mode 100644
index 0000000..b3c6c23
--- /dev/null
+++ b/test/expected/test_sql.sh_19c92996bcc884bfdb70e3d24606cf5070556a74.out
@@ -0,0 +1,46 @@
+[
+ {
+ "log_line": 0,
+ "log_time": "2014-06-15 01:04:52.000",
+ "log_level": "info",
+ "contextid": "82e87195d704585501",
+ "data": "http://localhost:8086|/|<samlp:Response xmlns:samlp=\"urn:oasis:names:tc:SAML:2.0:protocol\" ID=\"s2daac0735bf476f4560aab81104b623bedfb0cbc0\" InResponseTo=\"84cbf2be33f6410bbe55877545a93f02\" Version=\"2.0\" IssueInstant=\"2014-06-15T01:04:52Z\" Destination=\"http://localhost:8086/api/1/rest/admin/org/530e42ccd6f45fd16d0d0717/saml/consume\"><saml:Issuer xmlns:saml=\"urn:oasis:names:tc:SAML:2.0:assertion\">http://openam.vagrant.dev/openam</saml:Issuer><samlp:Status xmlns:samlp=\"urn:oasis:names:tc:SAML:2.0:protocol\">\\n<samlp:StatusCode xmlns:samlp=\"urn:oasis:names:tc:SAML:2.0:protocol\"\\nValue=\"urn:oasis:names:tc:SAML:2.0:status:Success\">\\n</samlp:StatusCode>\\n</samlp:Status><saml:Assertion xmlns:saml=\"urn:oasis:names:tc:SAML:2.0:assertion\" ID=\"s2a0bee0da937e236167e99b209802056033816ac2\" IssueInstant=\"2014-06-15T01:04:52Z\" Version=\"2.0\">\\n<saml:Issuer>http://openam.vagrant.dev/openam</saml:Issuer><ds:Signature xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\">\\n<ds:SignedInfo>\\n<ds:CanonicalizationMethod Algorithm=\"http://www.w3.org/2001/10/xml-exc-c14n#\"/>\\n<ds:SignatureMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#rsa-sha1\"/>\\n<ds:Reference URI=\"#s2a0bee0da937e236167e99b209802056033816ac2\">\\n<ds:Transforms>\\n<ds:Transform Algorithm=\"http://www.w3.org/2000/09/xmldsig#enveloped-signature\"/>\\n<ds:Transform Algorithm=\"http://www.w3.org/2001/10/xml-exc-c14n#\"/>\\n</ds:Transforms>\\n<ds:DigestMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#sha1\"/>\\n<ds:DigestValue>4uSmVzjovUdQd3px/RcnoxQBsqE=</ds:DigestValue>\\n</ds:Reference>\\n</ds:SignedInfo>\\n<ds:SignatureValue>\\nhm/grge36uA6j1OWif2bTcvVTwESjmuJa27NxepW0AiV5YlcsHDl7RAIk6k/CjsSero3bxGbm56m\\nYncOEi9F1Tu7dS0bfx+vhm/kKTPgwZctf4GWn4qQwP+KeoZywbNj9ShsYJ+zPKzXwN4xBSuPjMxP\\nNf5szzjEWpOndQO/uDs=\\n</ds:SignatureValue>\\n<ds:KeyInfo>\\n<ds:X509Data>\\n<ds:X509Certificate>\\nMIICQDCCAakCBEeNB0swDQYJKoZIhvcNAQEEBQAwZzELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNh\\nbGlmb3JuaWExFDASBgNVBAcTC1NhbnRhIENsYXJhMQwwCgYDVQQKEwNTdW4xEDAOBgNVBAsTB09w\\nZW5TU08xDTALBgNVBAMTBHRlc3QwHhcNMDgwMTE1MTkxOTM5WhcNMTgwMTEyMTkxOTM5WjBnMQsw\\nCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEUMBIGA1UEBxMLU2FudGEgQ2xhcmExDDAK\\nBgNVBAoTA1N1bjEQMA4GA1UECxMHT3BlblNTTzENMAsGA1UEAxMEdGVzdDCBnzANBgkqhkiG9w0B\\nAQEFAAOBjQAwgYkCgYEArSQc/U75GB2AtKhbGS5piiLkmJzqEsp64rDxbMJ+xDrye0EN/q1U5Of+\\nRkDsaN/igkAvV1cuXEgTL6RlafFPcUX7QxDhZBhsYF9pbwtMzi4A4su9hnxIhURebGEmxKW9qJNY\\nJs0Vo5+IgjxuEWnjnnVgHTs1+mq5QYTA7E6ZyL8CAwEAATANBgkqhkiG9w0BAQQFAAOBgQB3Pw/U\\nQzPKTPTYi9upbFXlrAKMwtFf2OW4yvGWWvlcwcNSZJmTJ8ARvVYOMEVNbsT4OFcfu2/PeYoAdiDA\\ncGy/F2Zuj8XJJpuQRSE6PtQqBuDEHjjmOQJ0rV/r8mO1ZCtHRhpZ5zYRjhRC9eCbjx9VrFax0JDC\\n/FfwWigmrW0Y0Q==\\n</ds:X509Certificate>\\n</ds:X509Data>\\n</ds:KeyInfo>\\n</ds:Signature><saml:Subject>\\n<saml:NameID Format=\"urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress\" NameQualifier=\"http://openam.vagrant.dev/openam\">user@example.com</saml:NameID><saml:SubjectConfirmation Method=\"urn:oasis:names:tc:SAML:2.0:cm:bearer\">\\n<saml:SubjectConfirmationData InResponseTo=\"84cbf2be33f6410bbe55877545a93f02\" NotOnOrAfter=\"2014-06-15T01:14:52Z\" Recipient=\"http://localhost:8086/api/1/rest/admin/org/530e42ccd6f45fd16d0d0717/saml/consume\"/></saml:SubjectConfirmation>\\n</saml:Subject><saml:Conditions NotBefore=\"2014-06-15T00:54:52Z\" NotOnOrAfter=\"2014-06-15T01:14:52Z\">\\n<saml:AudienceRestriction>\\n<saml:Audience>http://localhost:8086</saml:Audience>\\n</saml:AudienceRestriction>\\n</saml:Conditions>\\n<saml:AuthnStatement AuthnInstant=\"2014-06-15T01:00:25Z\" SessionIndex=\"s2f9b4d4b453d12b40ef3905cc959cdb40579c2301\"><saml:AuthnContext><saml:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport</saml:AuthnContextClassRef></saml:AuthnContext></saml:AuthnStatement></saml:Assertion></samlp:Response>",
+ "domain": "dc=openam",
+ "hostname": "192.168.33.1\t",
+ "ipaddr": "Not Available",
+ "loggedby": "cn=dsameuser,ou=DSAME Users,dc=openam",
+ "loginid": "id=openamuser,ou=user,dc=openam",
+ "messageid": "SAML2-37",
+ "modulename": "SAML2.access",
+ "nameid": "user@example.com",
+ "log_part": null,
+ "log_idle_msecs": 0,
+ "log_mark": 0,
+ "log_comment": null,
+ "log_tags": null,
+ "log_annotations": null,
+ "log_filters": null
+ },
+ {
+ "log_line": 1,
+ "log_time": "2014-06-15 01:04:52.000",
+ "log_level": "trace",
+ "contextid": "ec5708a7f199678a01",
+ "data": "vagrant|/",
+ "domain": "dc=openam",
+ "hostname": "127.0.1.1\t",
+ "ipaddr": "Not Available",
+ "loggedby": "cn=dsameuser,ou=DSAME Users,dc=openam",
+ "loginid": "cn=dsameuser,ou=DSAME Users,dc=openam",
+ "messageid": "COT-22",
+ "modulename": "COT.access",
+ "nameid": "Not Available",
+ "log_part": null,
+ "log_idle_msecs": 0,
+ "log_mark": 0,
+ "log_comment": null,
+ "log_tags": null,
+ "log_annotations": null,
+ "log_filters": null
+ }
+]
diff --git a/test/expected/test_sql.sh_1cbb81cfe40ee16332c5c775a74d06b945aa65c2.out b/test/expected/test_sql.sh_1cbb81cfe40ee16332c5c775a74d06b945aa65c2.out
index df0e6d7..391a786 100644
--- a/test/expected/test_sql.sh_1cbb81cfe40ee16332c5c775a74d06b945aa65c2.out
+++ b/test/expected/test_sql.sh_1cbb81cfe40ee16332c5c775a74d06b945aa65c2.out
@@ -1,3 +1,3 @@
-id first_name last_name age 
- 0 Phil  Myman   30 
- 1 Lem  Hewitt   35
+id first_name last_name  age  
+ 0 Phil Myman   30
+ 1 Lem Hewitt  35
diff --git a/test/expected/test_sql.sh_1f892b85dc9008c7b3bab7fdf8aa372a6d5ae22c.err b/test/expected/test_sql.sh_1f892b85dc9008c7b3bab7fdf8aa372a6d5ae22c.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql.sh_1f892b85dc9008c7b3bab7fdf8aa372a6d5ae22c.err
diff --git a/test/expected/test_sql.sh_1f892b85dc9008c7b3bab7fdf8aa372a6d5ae22c.out b/test/expected/test_sql.sh_1f892b85dc9008c7b3bab7fdf8aa372a6d5ae22c.out
new file mode 100644
index 0000000..2c56abe
--- /dev/null
+++ b/test/expected/test_sql.sh_1f892b85dc9008c7b3bab7fdf8aa372a6d5ae22c.out
@@ -0,0 +1,23 @@
+[
+ {
+ "cs_headers": {
+ "User-Agent": "Mozilla/5.0 (Linux; Android 4.4.4; SM-G900V Build/KTU84P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.59 Mobile Safari/537.36",
+ "Referer": "http://example.com/Search/SearchResults.pg?informationRecipient.languageCode.c=en",
+ "Host": "xzy.example.com"
+ }
+ },
+ {
+ "cs_headers": {
+ "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2227.1 Safari/537.36",
+ "Referer": null,
+ "Host": "example.hello.com"
+ }
+ },
+ {
+ "cs_headers": {
+ "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 Safari/537.36",
+ "Referer": null,
+ "Host": "hello.example.com"
+ }
+ }
+]
diff --git a/test/expected/test_sql.sh_26ace94793c68c44801e1ec496e7ab6a02304ce3.err b/test/expected/test_sql.sh_26ace94793c68c44801e1ec496e7ab6a02304ce3.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql.sh_26ace94793c68c44801e1ec496e7ab6a02304ce3.err
diff --git a/test/expected/test_sql.sh_26ace94793c68c44801e1ec496e7ab6a02304ce3.out b/test/expected/test_sql.sh_26ace94793c68c44801e1ec496e7ab6a02304ce3.out
new file mode 100644
index 0000000..85a077d
--- /dev/null
+++ b/test/expected/test_sql.sh_26ace94793c68c44801e1ec496e7ab6a02304ce3.out
@@ -0,0 +1,2 @@
+name,content,length(content)
+logfile_empty.0,,0
diff --git a/test/expected/test_sql.sh_2a16a6fd0ff235a7877e1ea93b22d873a3609402.err b/test/expected/test_sql.sh_2a16a6fd0ff235a7877e1ea93b22d873a3609402.err
index bc74c2d..782fe5e 100644
--- a/test/expected/test_sql.sh_2a16a6fd0ff235a7877e1ea93b22d873a3609402.err
+++ b/test/expected/test_sql.sh_2a16a6fd0ff235a7877e1ea93b22d873a3609402.err
@@ -1,4 +1,3 @@
-✘ error: call to raise_error(msg) failed
- reason: oops!
+✘ error: oops!
 --> command-option:1
 | ;SELECT raise_error('oops!') 
diff --git a/test/expected/test_sql.sh_2c60ed41369d667d1e2a563d54f8edf84682e526.err b/test/expected/test_sql.sh_2c60ed41369d667d1e2a563d54f8edf84682e526.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql.sh_2c60ed41369d667d1e2a563d54f8edf84682e526.err
diff --git a/test/expected/test_sql.sh_2c60ed41369d667d1e2a563d54f8edf84682e526.out b/test/expected/test_sql.sh_2c60ed41369d667d1e2a563d54f8edf84682e526.out
new file mode 100644
index 0000000..29ea19f
--- /dev/null
+++ b/test/expected/test_sql.sh_2c60ed41369d667d1e2a563d54f8edf84682e526.out
@@ -0,0 +1,2 @@
+log_top_line() log_msg_line() 
+ 1 0
diff --git a/test/expected/test_sql.sh_2ed3f3b18ef4ecc68e4dd3cc8041b61fcf2a59af.err b/test/expected/test_sql.sh_2ed3f3b18ef4ecc68e4dd3cc8041b61fcf2a59af.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql.sh_2ed3f3b18ef4ecc68e4dd3cc8041b61fcf2a59af.err
diff --git a/test/expected/test_sql.sh_2ed3f3b18ef4ecc68e4dd3cc8041b61fcf2a59af.out b/test/expected/test_sql.sh_2ed3f3b18ef4ecc68e4dd3cc8041b61fcf2a59af.out
new file mode 100644
index 0000000..90d743c
--- /dev/null
+++ b/test/expected/test_sql.sh_2ed3f3b18ef4ecc68e4dd3cc8041b61fcf2a59af.out
@@ -0,0 +1,5 @@
+log_line,log_time,log_level,log_hostname,log_msgid,log_pid,log_pri,log_procname,log_struct,log_syslog_tag,syslog_version,log_part,log_idle_msecs,log_mark,log_comment,log_tags,log_annotations,log_filters
+0,2007-11-03 09:23:38.000,error,veridian,<NULL>,7998,<NULL>,automount,<NULL>,automount[7998],<NULL>,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>
+1,2007-11-03 09:23:38.000,info,veridian,<NULL>,16442,<NULL>,automount,<NULL>,automount[16442],<NULL>,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>
+2,2007-11-03 09:23:38.000,error,veridian,<NULL>,7999,<NULL>,automount,<NULL>,automount[7999],<NULL>,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>
+3,2007-11-03 09:47:02.000,info,veridian,<NULL>,<NULL>,<NULL>,sudo,<NULL>,sudo,<NULL>,<NULL>,1404000,0,<NULL>,<NULL>,<NULL>,<NULL>
diff --git a/test/expected/test_sql.sh_2f15b8a38673ac4db45dc6ed2eafe609c332575b.out b/test/expected/test_sql.sh_2f15b8a38673ac4db45dc6ed2eafe609c332575b.out
index df0e6d7..391a786 100644
--- a/test/expected/test_sql.sh_2f15b8a38673ac4db45dc6ed2eafe609c332575b.out
+++ b/test/expected/test_sql.sh_2f15b8a38673ac4db45dc6ed2eafe609c332575b.out
@@ -1,3 +1,3 @@
-id first_name last_name age 
- 0 Phil  Myman   30 
- 1 Lem  Hewitt   35
+id first_name last_name  age  
+ 0 Phil Myman   30
+ 1 Lem Hewitt  35
diff --git a/test/expected/test_sql.sh_31df37f254255115611fc321b63374a2fa4a1cd5.out b/test/expected/test_sql.sh_31df37f254255115611fc321b63374a2fa4a1cd5.out
index 5118721..2f3d6d4 100644
--- a/test/expected/test_sql.sh_31df37f254255115611fc321b63374a2fa4a1cd5.out
+++ b/test/expected/test_sql.sh_31df37f254255115611fc321b63374a2fa4a1cd5.out
@@ -1,2 +1,2 @@
- replicate('foobar', 120) 
+ replicate('foobar', 120)  
foobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobar⋯oobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobar
diff --git a/test/expected/test_sql.sh_3445b783808f174b76f55dc6b998f721a1aae271.err b/test/expected/test_sql.sh_3445b783808f174b76f55dc6b998f721a1aae271.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql.sh_3445b783808f174b76f55dc6b998f721a1aae271.err
diff --git a/test/expected/test_sql.sh_3445b783808f174b76f55dc6b998f721a1aae271.out b/test/expected/test_sql.sh_3445b783808f174b76f55dc6b998f721a1aae271.out
new file mode 100644
index 0000000..79125db
--- /dev/null
+++ b/test/expected/test_sql.sh_3445b783808f174b76f55dc6b998f721a1aae271.out
@@ -0,0 +1,83 @@
+log_line,log_part,log_body
+0,<NULL>,restart.
+1,<NULL>,Invalid query packet.
+2,<NULL>,DHCPREQUEST on eth0 to 10.1.10.1 port 67 (xid=0x654a04aa)
+3,<NULL>,DHCPNAK from 10.1.10.1 (xid=0x654a04aa)
+4,<NULL>,/sbin/dhclient-script : updated /etc/resolv.conf
+5,<NULL>,Withdrawing address record for 10.1.10.49 on eth0.
+6,<NULL>,Leaving mDNS multicast group on interface eth0.IPv4 with address 10.1.10.49.
+7,<NULL>,iface.c: interface_mdns_mcast_join() called but no local address available.
+8,<NULL>,Interface eth0.IPv4 no longer relevant for mDNS.
+9,<NULL>,DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5 (xid=0x4e17f141)
+10,<NULL>,DHCPOFFER from 10.1.10.1
+11,<NULL>,DHCPREQUEST on eth0 to 255.255.255.255 port 67 (xid=0x4e17f141)
+12,<NULL>,DHCPACK from 10.1.10.1 (xid=0x4e17f141)
+13,<NULL>,New relevant interface eth0.IPv4 for mDNS.
+14,<NULL>,Joining mDNS multicast group on interface eth0.IPv4 with address 10.1.10.103.
+15,<NULL>,Registering new address record for 10.1.10.103 on eth0.
+16,<NULL>,Withdrawing address record for 10.1.10.103 on eth0.
+17,<NULL>,Leaving mDNS multicast group on interface eth0.IPv4 with address 10.1.10.103.
+18,<NULL>,iface.c: interface_mdns_mcast_join() called but no local address available.
+19,<NULL>,Interface eth0.IPv4 no longer relevant for mDNS.
+20,<NULL>,New relevant interface eth0.IPv4 for mDNS.
+21,<NULL>,Joining mDNS multicast group on interface eth0.IPv4 with address 10.1.10.103.
+22,<NULL>,Registering new address record for 10.1.10.103 on eth0.
+23,<NULL>,/sbin/dhclient-script : updated /etc/resolv.conf
+24,10.1.10.103,bound to 10.1.10.103 -- renewal in 54694 seconds.
+25,10.1.10.103,Invalid query packet.
+26,10.1.10.103,Invalid query packet.
+27,10.1.10.103,DHCPREQUEST on eth0 to 10.1.10.1 port 67 (xid=0x4e17f141)
+28,10.1.10.103,DHCPACK from 10.1.10.1 (xid=0x4e17f141)
+29,10.1.10.103,bound to 10.1.10.103 -- renewal in 8787 seconds.
+30,10.1.10.103,Invalid query packet.
+31,10.1.10.103,DHCPREQUEST on eth0 to 10.1.10.1 port 67 (xid=0x4e17f141)
+32,10.1.10.103,DHCPACK from 10.1.10.1 (xid=0x4e17f141)
+33,10.1.10.103,bound to 10.1.10.103 -- renewal in 9938 seconds.
+34,10.1.10.103,Invalid query packet.
+35,10.1.10.103,DHCPREQUEST on eth0 to 10.1.10.1 port 67 (xid=0x4e17f141)
+36,10.1.10.103,DHCPACK from 10.1.10.1 (xid=0x4e17f141)
+37,10.1.10.103,bound to 10.1.10.103 -- renewal in 2656 seconds.
+38,10.1.10.103,Invalid query packet.
+39,10.1.10.103,DHCPREQUEST on eth0 to 10.1.10.1 port 67 (xid=0x4e17f141)
+40,10.1.10.103,DHCPACK from 10.1.10.1 (xid=0x4e17f141)
+41,10.1.10.103,bound to 10.1.10.103 -- renewal in 15112 seconds.
+42,10.1.10.103,Invalid query packet.
+43,10.1.10.103,Invalid query packet.
+44,10.1.10.103,Invalid query packet.
+45,10.1.10.103,DHCPREQUEST on eth0 to 10.1.10.1 port 67 (xid=0x4e17f141)
+46,10.1.10.103,DHCPNAK from 10.1.10.1 (xid=0x4e17f141)
+47,10.1.10.103,/sbin/dhclient-script : updated /etc/resolv.conf
+48,10.1.10.103,Withdrawing address record for 10.1.10.103 on eth0.
+49,10.1.10.103,Leaving mDNS multicast group on interface eth0.IPv4 with address 10.1.10.103.
+50,10.1.10.103,iface.c: interface_mdns_mcast_join() called but no local address available.
+51,10.1.10.103,Interface eth0.IPv4 no longer relevant for mDNS.
+52,10.1.10.103,DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5 (xid=0xd16b79d)
+53,10.1.10.103,DHCPOFFER from 10.1.10.1
+54,10.1.10.103,DHCPREQUEST on eth0 to 255.255.255.255 port 67 (xid=0xd16b79d)
+55,10.1.10.103,DHCPACK from 10.1.10.1 (xid=0xd16b79d)
+56,10.1.10.103,New relevant interface eth0.IPv4 for mDNS.
+57,10.1.10.103,Joining mDNS multicast group on interface eth0.IPv4 with address 10.1.10.62.
+58,10.1.10.103,Registering new address record for 10.1.10.62 on eth0.
+59,10.1.10.103,Withdrawing address record for 10.1.10.62 on eth0.
+60,10.1.10.103,Leaving mDNS multicast group on interface eth0.IPv4 with address 10.1.10.62.
+61,10.1.10.103,iface.c: interface_mdns_mcast_join() called but no local address available.
+62,10.1.10.103,Interface eth0.IPv4 no longer relevant for mDNS.
+63,10.1.10.103,New relevant interface eth0.IPv4 for mDNS.
+64,10.1.10.103,Joining mDNS multicast group on interface eth0.IPv4 with address 10.1.10.62.
+65,10.1.10.103,Registering new address record for 10.1.10.62 on eth0.
+66,10.1.10.103,/sbin/dhclient-script : updated /etc/resolv.conf
+67,10.1.10.62,bound to 10.1.10.62 -- renewal in 31782 seconds.
+68,10.1.10.62,Invalid query packet.
+69,10.1.10.62,Invalid query packet.
+70,10.1.10.62,DHCPREQUEST on eth0 to 10.1.10.1 port 67 (xid=0xd16b79d)
+71,10.1.10.62,DHCPACK from 10.1.10.1 (xid=0xd16b79d)
+72,10.1.10.62,bound to 10.1.10.62 -- renewal in 19742 seconds.
+73,10.1.10.62,Invalid query packet.
+74,10.1.10.62,Invalid query packet.
+75,10.1.10.62,DHCPREQUEST on eth0 to 10.1.10.1 port 67 (xid=0xd16b79d)
+76,10.1.10.62,DHCPACK from 10.1.10.1 (xid=0xd16b79d)
+77,10.1.10.62,bound to 10.1.10.62 -- renewal in 55327 seconds.
+78,10.1.10.62,Invalid query packet.
+79,10.1.10.62,Invalid response packet from host 10.1.10.10.
+80,10.1.10.62,Invalid response packet from host fe80::22c9:d0ff:fe15:1b7c.
+81,10.1.10.62,Invalid query packet.
diff --git a/test/expected/test_sql.sh_4563a807311d0ce3d1f912843e615a6ca579cffa.err b/test/expected/test_sql.sh_4563a807311d0ce3d1f912843e615a6ca579cffa.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql.sh_4563a807311d0ce3d1f912843e615a6ca579cffa.err
diff --git a/test/expected/test_sql.sh_4563a807311d0ce3d1f912843e615a6ca579cffa.out b/test/expected/test_sql.sh_4563a807311d0ce3d1f912843e615a6ca579cffa.out
new file mode 100644
index 0000000..61a6828
--- /dev/null
+++ b/test/expected/test_sql.sh_4563a807311d0ce3d1f912843e615a6ca579cffa.out
@@ -0,0 +1,40 @@
+[
+ {
+ "fields": {
+ "namespace": "inc-1-enh-domain-c14-ns-2",
+ "pod": "hello-inc-1-enh-domain-c14-ns-2-3-d8f465685-k75gp",
+ "reason": "",
+ "status": "Pending"
+ }
+ },
+ {
+ "fields": {
+ "error": "pod inc-1-domain-c14-ns-6/fe-inc-1-domain-c14-ns-6-5-656d9bb695-4584b is not found: PodNotFound",
+ "namespace": "inc-1-domain-c14-ns-6",
+ "pod": "fe-inc-1-domain-c14-ns-6-5-656d9bb695-4584b",
+ "uid": "be2def59-3a08-42fd-8f84-6f64cfcefa93"
+ }
+ },
+ {
+ "fields": {
+ "namespace": "inc-1-domain-c14-ns-6",
+ "pod": "fe-inc-1-domain-c14-ns-6-5-656d9bb695-4584b",
+ "uid": "be2def59-3a08-42fd-8f84-6f64cfcefa93"
+ }
+ },
+ {
+ "fields": {
+ "namespace": "inc-1-domain-c14-ns-6",
+ "pod": "fe-inc-1-domain-c14-ns-6-5-656d9bb695-4584b",
+ "uid": "be2def59-3a08-42fd-8f84-6f64cfcefa93"
+ }
+ },
+ {
+ "fields": {
+ "namespace": "inc-1-enh-domain-c14-ns-2",
+ "pod": "hello-inc-1-enh-domain-c14-ns-2-7-5ddd6bcd69-6rqct",
+ "reason": "",
+ "status": "Pending"
+ }
+ }
+]
diff --git a/test/expected/test_sql.sh_4a13356ccbdeb5f73fa063e292b5a6cb25e6c23e.err b/test/expected/test_sql.sh_4a13356ccbdeb5f73fa063e292b5a6cb25e6c23e.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql.sh_4a13356ccbdeb5f73fa063e292b5a6cb25e6c23e.err
diff --git a/test/expected/test_sql.sh_4a13356ccbdeb5f73fa063e292b5a6cb25e6c23e.out b/test/expected/test_sql.sh_4a13356ccbdeb5f73fa063e292b5a6cb25e6c23e.out
new file mode 100644
index 0000000..85511da
--- /dev/null
+++ b/test/expected/test_sql.sh_4a13356ccbdeb5f73fa063e292b5a6cb25e6c23e.out
@@ -0,0 +1,2 @@
+log_line,log_time,log_level,bro_ts,bro_uid,bro_id_orig_h,bro_id_orig_p,bro_id_resp_h,bro_id_resp_p,bro_trans_depth,bro_method,bro_host,bro_uri,bro_referrer,bro_version,bro_user_agent,bro_request_body_len,bro_response_body_len,bro_status_code,bro_status_msg,bro_info_code,bro_info_msg,bro_tags,bro_username,bro_password,bro_proxied,bro_orig_fuids,bro_orig_filenames,bro_orig_mime_types,bro_resp_fuids,bro_resp_filenames,bro_resp_mime_types,log_part,log_idle_msecs,log_mark,log_comment,log_tags,log_annotations,log_filters
+118,2011-11-03 00:19:49.337,error,1320279589.337053,CBHHuR1xFnm5C5CQBc,192.168.2.76,52074,74.125.225.76,80,1,GET,i4.ytimg.com,/vi/gDbg_GeuiSY/hqdefault.jpg,<NULL>,1.1,Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20100101 Firefox/7.0.1,0,893,404,Not Found,<NULL>,<NULL>,,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,F2GiAw3j1m22R2yIg2,<NULL>,image/jpeg,<NULL>,18,0,<NULL>,<NULL>,<NULL>,<NULL>
diff --git a/test/expected/test_sql.sh_5532c7a21e3f6b7df3aad10d7bdfbb7a812ae6c7.out b/test/expected/test_sql.sh_5532c7a21e3f6b7df3aad10d7bdfbb7a812ae6c7.out
index dbb2a2f..53f730f 100644
--- a/test/expected/test_sql.sh_5532c7a21e3f6b7df3aad10d7bdfbb7a812ae6c7.out
+++ b/test/expected/test_sql.sh_5532c7a21e3f6b7df3aad10d7bdfbb7a812ae6c7.out
@@ -1,2 +1,2 @@
-log_line,log_part,log_time,log_idle_msecs,log_level,log_mark,log_comment,log_tags,log_filters,log_hostname,log_msgid,log_pid,log_pri,log_procname,log_struct,log_syslog_tag,syslog_version,col_0,TTY,PWD,USER,COMMAND
-0,<NULL>,2007-11-03 09:47:02.000,0,info,0,<NULL>,<NULL>,[1],veridian,<NULL>,<NULL>,<NULL>,sudo,<NULL>,sudo,<NULL>,timstack,pts/6,/auto/wstimstack/rpms/lbuild/test,root,/usr/bin/tail /var/log/messages
+log_line,log_time,log_level,log_hostname,log_msgid,log_pid,log_pri,log_procname,log_struct,log_syslog_tag,syslog_version,col_0,TTY,PWD,USER,COMMAND,log_part,log_idle_msecs,log_mark,log_comment,log_tags,log_annotations,log_filters
+0,2007-11-03 09:47:02.000,info,veridian,<NULL>,<NULL>,<NULL>,sudo,<NULL>,sudo,<NULL>,timstack,pts/6,/auto/wstimstack/rpms/lbuild/test,root,/usr/bin/tail /var/log/messages,<NULL>,0,0,<NULL>,<NULL>,<NULL>,[1]
diff --git a/test/expected/test_sql.sh_57edc93426e6767aa44ab2356c55327553dcdc8d.err b/test/expected/test_sql.sh_57edc93426e6767aa44ab2356c55327553dcdc8d.err
index 600e19d..979055d 100644
--- a/test/expected/test_sql.sh_57edc93426e6767aa44ab2356c55327553dcdc8d.err
+++ b/test/expected/test_sql.sh_57edc93426e6767aa44ab2356c55327553dcdc8d.err
@@ -1,5 +1,4 @@
-✘ error: call to raise_error(msg) failed
- reason: no data was redirected to lnav's standard-input
+✘ error: no data was redirected to lnav's standard-input
 --> command-option:1
 | |rename-stdin foo 
 --> ../test/.lnav/formats/default/rename-stdin.lnav:7
diff --git a/test/expected/test_sql.sh_61471583c5e2f8ede3a8adefce682c27bf3924c8.err b/test/expected/test_sql.sh_61471583c5e2f8ede3a8adefce682c27bf3924c8.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql.sh_61471583c5e2f8ede3a8adefce682c27bf3924c8.err
diff --git a/test/expected/test_sql.sh_61471583c5e2f8ede3a8adefce682c27bf3924c8.out b/test/expected/test_sql.sh_61471583c5e2f8ede3a8adefce682c27bf3924c8.out
new file mode 100644
index 0000000..5fc70f1
--- /dev/null
+++ b/test/expected/test_sql.sh_61471583c5e2f8ede3a8adefce682c27bf3924c8.out
@@ -0,0 +1,11 @@
+[
+ {
+ "sc_substatus": 0
+ },
+ {
+ "sc_substatus": 0
+ },
+ {
+ "sc_substatus": null
+ }
+]
diff --git a/test/expected/test_sql.sh_62eb85c9569e71a630d72065238559528a16114c.out b/test/expected/test_sql.sh_62eb85c9569e71a630d72065238559528a16114c.out
index 898c9a8..0f485fb 100644
--- a/test/expected/test_sql.sh_62eb85c9569e71a630d72065238559528a16114c.out
+++ b/test/expected/test_sql.sh_62eb85c9569e71a630d72065238559528a16114c.out
@@ -1,2 +1,2 @@
-filepath 
+filepath 
foo
diff --git a/test/expected/test_sql.sh_753c343a256d1286750314957d1b4e155464e03e.out b/test/expected/test_sql.sh_753c343a256d1286750314957d1b4e155464e03e.out
index 801a9af..069e77a 100644
--- a/test/expected/test_sql.sh_753c343a256d1286750314957d1b4e155464e03e.out
+++ b/test/expected/test_sql.sh_753c343a256d1286750314957d1b4e155464e03e.out
@@ -1,2 +1,2 @@
-log_top_datetime() 
+log_top_datetime() 
<NULL>
diff --git a/test/expected/test_sql.sh_7593b39f4be6fd2124ec7cf10835ee015d475b16.err b/test/expected/test_sql.sh_7593b39f4be6fd2124ec7cf10835ee015d475b16.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql.sh_7593b39f4be6fd2124ec7cf10835ee015d475b16.err
diff --git a/test/expected/test_sql.sh_7593b39f4be6fd2124ec7cf10835ee015d475b16.out b/test/expected/test_sql.sh_7593b39f4be6fd2124ec7cf10835ee015d475b16.out
new file mode 100644
index 0000000..e304578
--- /dev/null
+++ b/test/expected/test_sql.sh_7593b39f4be6fd2124ec7cf10835ee015d475b16.out
@@ -0,0 +1,2 @@
+log_top_line() log_msg_line() 
+ 2 2
diff --git a/test/expected/test_sql.sh_764306f0e5f610ba71f521ba3d19fe158ece0ba5.out b/test/expected/test_sql.sh_764306f0e5f610ba71f521ba3d19fe158ece0ba5.out
index fabc853..57b6d27 100644
--- a/test/expected/test_sql.sh_764306f0e5f610ba71f521ba3d19fe158ece0ba5.out
+++ b/test/expected/test_sql.sh_764306f0e5f610ba71f521ba3d19fe158ece0ba5.out
@@ -1,2 +1,2 @@
- col_0 
+ col_0  
eth0.IPv4
diff --git a/test/expected/test_sql.sh_7f664c9cda0ae1c48333e21051b5e0eeafd5b4bc.err b/test/expected/test_sql.sh_7f664c9cda0ae1c48333e21051b5e0eeafd5b4bc.err
index 1a0c2b0..d068056 100644
--- a/test/expected/test_sql.sh_7f664c9cda0ae1c48333e21051b5e0eeafd5b4bc.err
+++ b/test/expected/test_sql.sh_7f664c9cda0ae1c48333e21051b5e0eeafd5b4bc.err
@@ -1,5 +1,4 @@
-✘ error: call to raise_error(msg) failed
- reason: expecting the new name for stdin as the first argument
+✘ error: expecting the new name for stdin as the first argument
 --> command-option:1
 | |rename-stdin 
 --> ../test/.lnav/formats/default/rename-stdin.lnav:6
diff --git a/test/expected/test_sql.sh_859af4cc5f57345be8dcece599419d58f332841a.err b/test/expected/test_sql.sh_859af4cc5f57345be8dcece599419d58f332841a.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql.sh_859af4cc5f57345be8dcece599419d58f332841a.err
diff --git a/test/expected/test_sql.sh_859af4cc5f57345be8dcece599419d58f332841a.out b/test/expected/test_sql.sh_859af4cc5f57345be8dcece599419d58f332841a.out
new file mode 100644
index 0000000..f648fc6
--- /dev/null
+++ b/test/expected/test_sql.sh_859af4cc5f57345be8dcece599419d58f332841a.out
@@ -0,0 +1,4 @@
+Min: 0   1-23   24-48   49+ Max: 291690
+ Thu Nov 03 00:15:00               
+▲ 70 values in the range 0.00-3788.18
+ Thu Nov 03 00:20:00
diff --git a/test/expected/test_sql.sh_8ee288f1508eaab0367e465e9f382e848f3282aa.out b/test/expected/test_sql.sh_8ee288f1508eaab0367e465e9f382e848f3282aa.out
index b21f574..c5c0c0e 100644
--- a/test/expected/test_sql.sh_8ee288f1508eaab0367e465e9f382e848f3282aa.out
+++ b/test/expected/test_sql.sh_8ee288f1508eaab0367e465e9f382e848f3282aa.out
@@ -1,4 +1,4 @@
- log_time 
+ log_time  
2009-07-20 22:59:26.000
2009-07-20 22:59:29.000
-2009-07-20 22:59:29.000
+2009-07-20 22:59:29.000 
diff --git a/test/expected/test_sql.sh_9aaaa810f883f5dcf8a4d5cda4051fdf4640a65c.err b/test/expected/test_sql.sh_9aaaa810f883f5dcf8a4d5cda4051fdf4640a65c.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql.sh_9aaaa810f883f5dcf8a4d5cda4051fdf4640a65c.err
diff --git a/test/expected/test_sql.sh_9aaaa810f883f5dcf8a4d5cda4051fdf4640a65c.out b/test/expected/test_sql.sh_9aaaa810f883f5dcf8a4d5cda4051fdf4640a65c.out
new file mode 100644
index 0000000..a54d338
--- /dev/null
+++ b/test/expected/test_sql.sh_9aaaa810f883f5dcf8a4d5cda4051fdf4640a65c.out
@@ -0,0 +1,4 @@
+log_line,log_time,log_level,log_msg_format,log_msg_values,log_part,log_idle_msecs,log_mark,log_comment,log_tags,log_annotations,log_filters,log_msg_schema
+0,2015-11-03 09:23:38.000,info,# is up,"{""col_0"":""eth0""}",<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>,ce6143108d22799c9c7a994e21e7302e
+1,2015-11-03 09:23:38.000,info,# is up,"{""col_0"":""eth1""}",<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>,ce6143108d22799c9c7a994e21e7302e
+2,2015-11-03 09:23:38.000,info,# is down,"{""col_0"":""eth0""}",<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>,83cd119b5b6f7e79abff4d28946b7a61
diff --git a/test/expected/test_sql.sh_a7955e89791db9a252d8323436fabc51e2960731.err b/test/expected/test_sql.sh_a7955e89791db9a252d8323436fabc51e2960731.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql.sh_a7955e89791db9a252d8323436fabc51e2960731.err
diff --git a/test/expected/test_sql.sh_a7955e89791db9a252d8323436fabc51e2960731.out b/test/expected/test_sql.sh_a7955e89791db9a252d8323436fabc51e2960731.out
new file mode 100644
index 0000000..de137d9
--- /dev/null
+++ b/test/expected/test_sql.sh_a7955e89791db9a252d8323436fabc51e2960731.out
@@ -0,0 +1,3 @@
+log_line,log_time,log_level,c_ip,cs_method,cs_referer,cs_uri_query,cs_uri_stem,cs_user_agent,cs_username,cs_version,sc_bytes,sc_status,cs_host,log_part,log_idle_msecs,log_mark,log_comment,log_tags,log_annotations,log_filters
+1,2015-03-24 14:02:50.000,info,127.0.0.1,GET,<NULL>,<NULL>,/includes/js/combined-javascript.js,<NULL>,-,HTTP/1.1,65508,200,<NULL>,<NULL>,6927348000,0,<NULL>,<NULL>,<NULL>,<NULL>
+2,2015-03-24 14:02:50.000,error,127.0.0.1,GET,<NULL>,<NULL>,/bad.foo,<NULL>,-,HTTP/1.1,65508,404,<NULL>,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>
diff --git a/test/expected/test_sql.sh_ae7b1f1684e14bf9c16e0d789257b6ef57cfb2b1.out b/test/expected/test_sql.sh_ae7b1f1684e14bf9c16e0d789257b6ef57cfb2b1.out
index c012bd8..176be31 100644
--- a/test/expected/test_sql.sh_ae7b1f1684e14bf9c16e0d789257b6ef57cfb2b1.out
+++ b/test/expected/test_sql.sh_ae7b1f1684e14bf9c16e0d789257b6ef57cfb2b1.out
@@ -1,2 +1,2 @@
- log_time 
+ log_time  
2009-07-20 22:59:26.000
diff --git a/test/expected/test_sql.sh_afe9cdc4898df5c4e112c13dfe3db6dc089c0d7c.out b/test/expected/test_sql.sh_afe9cdc4898df5c4e112c13dfe3db6dc089c0d7c.out
index 4382802..a44dcba 100644
--- a/test/expected/test_sql.sh_afe9cdc4898df5c4e112c13dfe3db6dc089c0d7c.out
+++ b/test/expected/test_sql.sh_afe9cdc4898df5c4e112c13dfe3db6dc089c0d7c.out
@@ -1,4 +1,4 @@
- log_body 
+ log_body  
lookup(file): lookup for foobar failed
attempting to mount entry /auto/opt
-lookup(file): lookup for opt failed
+lookup(file): lookup for opt failed 
diff --git a/test/expected/test_sql.sh_b085d26043f9661d70f82cb90ecb3c5245d25eac.out b/test/expected/test_sql.sh_b085d26043f9661d70f82cb90ecb3c5245d25eac.out
index b21f574..c5c0c0e 100644
--- a/test/expected/test_sql.sh_b085d26043f9661d70f82cb90ecb3c5245d25eac.out
+++ b/test/expected/test_sql.sh_b085d26043f9661d70f82cb90ecb3c5245d25eac.out
@@ -1,4 +1,4 @@
- log_time 
+ log_time  
2009-07-20 22:59:26.000
2009-07-20 22:59:29.000
-2009-07-20 22:59:29.000
+2009-07-20 22:59:29.000 
diff --git a/test/expected/test_sql.sh_b5aa0561a65de7e8e22085db184c72a94b1a89a9.out b/test/expected/test_sql.sh_b5aa0561a65de7e8e22085db184c72a94b1a89a9.out
index c2c44ad..c126651 100644
--- a/test/expected/test_sql.sh_b5aa0561a65de7e8e22085db184c72a94b1a89a9.out
+++ b/test/expected/test_sql.sh_b5aa0561a65de7e8e22085db184c72a94b1a89a9.out
@@ -1,2 +1,2 @@
- log_body 
+ log_body  
timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
diff --git a/test/expected/test_sql.sh_b9330763dea550bbd006d7ae6ae7ea367f831fa3.err b/test/expected/test_sql.sh_b9330763dea550bbd006d7ae6ae7ea367f831fa3.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql.sh_b9330763dea550bbd006d7ae6ae7ea367f831fa3.err
diff --git a/test/expected/test_sql.sh_b9330763dea550bbd006d7ae6ae7ea367f831fa3.out b/test/expected/test_sql.sh_b9330763dea550bbd006d7ae6ae7ea367f831fa3.out
new file mode 100644
index 0000000..de2964d
--- /dev/null
+++ b/test/expected/test_sql.sh_b9330763dea550bbd006d7ae6ae7ea367f831fa3.out
@@ -0,0 +1,10 @@
+node_text
+"Gambardella, Matthew"
+"Ralls, Kim"
+"Corets, Eva"
+"Randall, Cynthia"
+"Thurman, Paula"
+"Knorr, Stefan"
+"Kress, Peter"
+"O'Brien, Tim"
+"Galos, Mike"
diff --git a/test/expected/test_sql.sh_bad03a996c0750733ab99c592b9011851f521a69.out b/test/expected/test_sql.sh_bad03a996c0750733ab99c592b9011851f521a69.out
index 85a1303..9892416 100644
--- a/test/expected/test_sql.sh_bad03a996c0750733ab99c592b9011851f521a69.out
+++ b/test/expected/test_sql.sh_bad03a996c0750733ab99c592b9011851f521a69.out
@@ -1,5 +1,5 @@
-match_index  content  case match_index when 2 then replicate('abc', 1000) else '' end 
-  0 {"col_0":10}  
- 1 {"col_0":50}  
- 2 {"col_0":50} abcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc⋯bcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc 
- 3 {"col_0":50}  
+match_index  content   case match_index when 2 then replicate('abc', 1000) else '' end  
+ 0 {"col_0":10}
+ 1 {"col_0":50}
+ 2 {"col_0":50} abcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc⋯bcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc 
+ 3 {"col_0":50}  
diff --git a/test/expected/test_sql.sh_bd46ca4560f8be6307a914e39539bbac0368080a.out b/test/expected/test_sql.sh_bd46ca4560f8be6307a914e39539bbac0368080a.out
index 7041f45..f32bdce 100644
--- a/test/expected/test_sql.sh_bd46ca4560f8be6307a914e39539bbac0368080a.out
+++ b/test/expected/test_sql.sh_bd46ca4560f8be6307a914e39539bbac0368080a.out
@@ -1,2 +1,2 @@
-lnav_top_file() 
+lnav_top_file() 
<NULL>
diff --git a/test/expected/test_sql.sh_c17933125df910588b806a9d07c2655bc71198ef.err b/test/expected/test_sql.sh_c17933125df910588b806a9d07c2655bc71198ef.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql.sh_c17933125df910588b806a9d07c2655bc71198ef.err
diff --git a/test/expected/test_sql.sh_c17933125df910588b806a9d07c2655bc71198ef.out b/test/expected/test_sql.sh_c17933125df910588b806a9d07c2655bc71198ef.out
new file mode 100644
index 0000000..62d3056
--- /dev/null
+++ b/test/expected/test_sql.sh_c17933125df910588b806a9d07c2655bc71198ef.out
@@ -0,0 +1,6 @@
+log_line,log_time,log_level,bro_ts,bro_uid,bro_id_orig_h,bro_id_orig_p,bro_id_resp_h,bro_id_resp_p,bro_trans_depth,bro_method,bro_host,bro_uri,bro_referrer,bro_version,bro_user_agent,bro_request_body_len,bro_response_body_len,bro_status_code,bro_status_msg,bro_info_code,bro_info_msg,bro_tags,bro_username,bro_password,bro_proxied,bro_orig_fuids,bro_orig_filenames,bro_orig_mime_types,bro_resp_fuids,bro_resp_filenames,bro_resp_mime_types,log_part,log_idle_msecs,log_mark,log_comment,log_tags,log_annotations,log_filters
+0,2011-11-03 00:19:26.452,info,1320279566.452687,CwFs1P2UcUdlSxD2La,192.168.2.76,52026,132.235.215.119,80,1,GET,www.reddit.com,/,<NULL>,1.1,Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20100101 Firefox/7.0.1,0,109978,200,OK,<NULL>,<NULL>,,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,Ftw3fJ2JJF3ntMTL2,<NULL>,text/html,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>
+1,2011-11-03 00:19:26.831,info,1320279566.831619,CJxSUgkInyKSHiju1,192.168.2.76,52030,72.21.211.173,80,1,GET,e.thumbs.redditmedia.com,/E-pbDbmiBclPkDaX.jpg,http://www.reddit.com/,1.1,Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20100101 Firefox/7.0.1,0,2300,200,OK,<NULL>,<NULL>,,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,FFTf9Zdgk3YkfCKo3,<NULL>,image/jpeg,<NULL>,379,0,<NULL>,<NULL>,<NULL>,<NULL>
+2,2011-11-03 00:19:26.831,info,1320279566.831563,CJwUi9bdB9c1lLW44,192.168.2.76,52029,72.21.211.173,80,1,GET,f.thumbs.redditmedia.com,/BP5bQfy4o-C7cF6A.jpg,http://www.reddit.com/,1.1,Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20100101 Firefox/7.0.1,0,2272,200,OK,<NULL>,<NULL>,,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,FfXtOj3o7aub4vbs2j,<NULL>,image/jpeg,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>
+3,2011-11-03 00:19:26.831,info,1320279566.831473,CoX7zA3OJKGUOSCBY2,192.168.2.76,52027,72.21.211.173,80,1,GET,e.thumbs.redditmedia.com,/SVUtep3Rhg5FTRn4.jpg,http://www.reddit.com/,1.1,Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20100101 Firefox/7.0.1,0,2562,200,OK,<NULL>,<NULL>,,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,F21Ybs3PTqS6O4Q2Zh,<NULL>,image/jpeg,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>
+4,2011-11-03 00:19:26.831,info,1320279566.831643,CT0JIh479jXIGt0Po1,192.168.2.76,52031,72.21.211.173,80,1,GET,f.thumbs.redditmedia.com,/uuy31444rLSyKdHS.jpg,http://www.reddit.com/,1.1,Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20100101 Firefox/7.0.1,0,1595,200,OK,<NULL>,<NULL>,,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,Fdk0MZ1wQmKWAJ4WH4,<NULL>,image/jpeg,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>
diff --git a/test/expected/test_sql.sh_c353ef036c505b75996252138fbd4c8d22e8149c.out b/test/expected/test_sql.sh_c353ef036c505b75996252138fbd4c8d22e8149c.out
index b21f574..c5c0c0e 100644
--- a/test/expected/test_sql.sh_c353ef036c505b75996252138fbd4c8d22e8149c.out
+++ b/test/expected/test_sql.sh_c353ef036c505b75996252138fbd4c8d22e8149c.out
@@ -1,4 +1,4 @@
- log_time 
+ log_time  
2009-07-20 22:59:26.000
2009-07-20 22:59:29.000
-2009-07-20 22:59:29.000
+2009-07-20 22:59:29.000 
diff --git a/test/expected/test_sql.sh_c5b8da04734fadf3b9eea80e0af997e38e0fb811.out b/test/expected/test_sql.sh_c5b8da04734fadf3b9eea80e0af997e38e0fb811.out
index 86a4d5a..54fad85 100644
--- a/test/expected/test_sql.sh_c5b8da04734fadf3b9eea80e0af997e38e0fb811.out
+++ b/test/expected/test_sql.sh_c5b8da04734fadf3b9eea80e0af997e38e0fb811.out
@@ -1,3 +1,3 @@
-log_line  col_0 
- 0 eth0.IPv4 
+log_line  col_0  
+ 0 eth0.IPv4
7 eth0.IPv4
diff --git a/test/expected/test_sql.sh_c7e1dbf4605914720b55787785abfafdf2c4178a.out b/test/expected/test_sql.sh_c7e1dbf4605914720b55787785abfafdf2c4178a.out
index 762b09c..f3306ab 100644
--- a/test/expected/test_sql.sh_c7e1dbf4605914720b55787785abfafdf2c4178a.out
+++ b/test/expected/test_sql.sh_c7e1dbf4605914720b55787785abfafdf2c4178a.out
@@ -1,2 +1,2 @@
- log_top_datetime() 
+ log_top_datetime()  
2016-03-13 22:49:15.000
diff --git a/test/expected/test_sql.sh_d4d540f0ef7e34b693fc72078d1cf2e069f86d81.err b/test/expected/test_sql.sh_d4d540f0ef7e34b693fc72078d1cf2e069f86d81.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql.sh_d4d540f0ef7e34b693fc72078d1cf2e069f86d81.err
diff --git a/test/expected/test_sql.sh_d4d540f0ef7e34b693fc72078d1cf2e069f86d81.out b/test/expected/test_sql.sh_d4d540f0ef7e34b693fc72078d1cf2e069f86d81.out
new file mode 100644
index 0000000..6d2a99a
--- /dev/null
+++ b/test/expected/test_sql.sh_d4d540f0ef7e34b693fc72078d1cf2e069f86d81.out
@@ -0,0 +1,4 @@
+ total  log_line  log_time  duration log_formats  log_msg_format  
+ 2 0 2007-04-28 06:53:55.000 syslog_log New relevant interface # for #
+ 2 1 2007-04-28 06:53:55.000 syslog_log Joining # multicast group on interface # with address #
+ 2  2 2007-04-28 06:53:55.000   syslog_log  Registering new address record for # on # 
diff --git a/test/expected/test_sql.sh_dd540973a0dc86320d84706845a15608196ae5be.err b/test/expected/test_sql.sh_dd540973a0dc86320d84706845a15608196ae5be.err
index c7ee159..a179b11 100644
--- a/test/expected/test_sql.sh_dd540973a0dc86320d84706845a15608196ae5be.err
+++ b/test/expected/test_sql.sh_dd540973a0dc86320d84706845a15608196ae5be.err
@@ -1,5 +1,4 @@
-✘ error: call to raise_error(msg) failed
- reason: oops!
+✘ error: oops!
 --> command-option:2
 | ;SELECT $inum, $nul, $fnum, $str, raise_error('oops!')
 = note: the bound parameters are set as follows:
diff --git a/test/expected/test_sql.sh_e44c0e2834038ec8d9b0b10b993967edb711c03c.err b/test/expected/test_sql.sh_e44c0e2834038ec8d9b0b10b993967edb711c03c.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql.sh_e44c0e2834038ec8d9b0b10b993967edb711c03c.err
diff --git a/test/expected/test_sql.sh_e44c0e2834038ec8d9b0b10b993967edb711c03c.out b/test/expected/test_sql.sh_e44c0e2834038ec8d9b0b10b993967edb711c03c.out
new file mode 100644
index 0000000..ab55ad7
--- /dev/null
+++ b/test/expected/test_sql.sh_e44c0e2834038ec8d9b0b10b993967edb711c03c.out
@@ -0,0 +1,11 @@
+duration,bro_uid,req
+116.438679,CwFs1P2UcUdlSxD2La,GET www.reddit.com
+115.202498,CdZUPH2DKOE7zzCLE3,GET feeds.bbci.co.uk
+115.121914,CdrfXZ1NOFPEawF218,GET c.thumbs.redditmedia.com
+115.121837,CoX7zA3OJKGUOSCBY2,GET e.thumbs.redditmedia.com
+115.12181,CJxSUgkInyKSHiju1,GET e.thumbs.redditmedia.com
+115.121506,CT0JIh479jXIGt0Po1,GET f.thumbs.redditmedia.com
+115.121339,CJwUi9bdB9c1lLW44,GET f.thumbs.redditmedia.com
+115.119217,C6Q4Vm14ZJIlZhsXqk,GET a.thumbs.redditmedia.com
+72.274459,CbNCgO1MzloHRNeY4f,GET www.google.com
+71.658218,CnGze54kQWWpKqrrZ4,GET ajax.googleapis.com
diff --git a/test/expected/test_sql.sh_ef3cecab4ae0b90760f728add5652378e26b2fe6.err b/test/expected/test_sql.sh_ef3cecab4ae0b90760f728add5652378e26b2fe6.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql.sh_ef3cecab4ae0b90760f728add5652378e26b2fe6.err
diff --git a/test/expected/test_sql.sh_ef3cecab4ae0b90760f728add5652378e26b2fe6.out b/test/expected/test_sql.sh_ef3cecab4ae0b90760f728add5652378e26b2fe6.out
new file mode 100644
index 0000000..c0c942f
--- /dev/null
+++ b/test/expected/test_sql.sh_ef3cecab4ae0b90760f728add5652378e26b2fe6.out
@@ -0,0 +1,2 @@
+log_line,log_time,log_level,c_ip,cs_method,cs_referer,cs_uri_query,cs_uri_stem,cs_user_agent,cs_username,cs_version,sc_bytes,sc_status,cs_host,log_part,log_idle_msecs,log_mark,log_comment,log_tags,log_annotations,log_filters
+1,2009-07-20 22:59:29.000,error,192.168.202.254,GET,-,<NULL>,/vmw/vSphere/default/vmkboot.gz,gPXE/0.9.7,-,HTTP/1.0,46210,404,<NULL>,<NULL>,3000,0,<NULL>,<NULL>,<NULL>,<NULL>
diff --git a/test/expected/test_sql.sh_fea98f976873ee7b55e6f322dda42719a19fb3f0.err b/test/expected/test_sql.sh_fea98f976873ee7b55e6f322dda42719a19fb3f0.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql.sh_fea98f976873ee7b55e6f322dda42719a19fb3f0.err
diff --git a/test/expected/test_sql.sh_fea98f976873ee7b55e6f322dda42719a19fb3f0.out b/test/expected/test_sql.sh_fea98f976873ee7b55e6f322dda42719a19fb3f0.out
new file mode 100644
index 0000000..8307aba
--- /dev/null
+++ b/test/expected/test_sql.sh_fea98f976873ee7b55e6f322dda42719a19fb3f0.out
@@ -0,0 +1,2 @@
+log_top_line() log_msg_line() 
+ <NULL> <NULL>
diff --git a/test/expected/test_sql.sh_ffbc3dbf8464455358a77acffa10a8dd8a080374.err b/test/expected/test_sql.sh_ffbc3dbf8464455358a77acffa10a8dd8a080374.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql.sh_ffbc3dbf8464455358a77acffa10a8dd8a080374.err
diff --git a/test/expected/test_sql.sh_ffbc3dbf8464455358a77acffa10a8dd8a080374.out b/test/expected/test_sql.sh_ffbc3dbf8464455358a77acffa10a8dd8a080374.out
new file mode 100644
index 0000000..b67d10f
--- /dev/null
+++ b/test/expected/test_sql.sh_ffbc3dbf8464455358a77acffa10a8dd8a080374.out
@@ -0,0 +1,4 @@
+log_line,log_time,log_level,c_ip,cs_method,cs_referer,cs_uri_query,cs_uri_stem,cs_user_agent,cs_username,cs_version,sc_bytes,sc_status,cs_host,log_part,log_idle_msecs,log_mark,log_comment,log_tags,log_annotations,log_filters
+0,2009-07-20 22:59:26.000,info,192.168.202.254,GET,-,<NULL>,/vmw/cgi/tramp,gPXE/0.9.7,-,HTTP/1.0,134,200,<NULL>,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>
+1,2009-07-20 22:59:29.000,error,192.168.202.254,GET,-,<NULL>,/vmw/vSphere/default/vmkboot.gz,gPXE/0.9.7,-,HTTP/1.0,46210,404,<NULL>,<NULL>,3000,0,<NULL>,<NULL>,<NULL>,<NULL>
+2,2009-07-20 22:59:29.000,info,192.168.202.254,GET,-,<NULL>,/vmw/vSphere/default/vmkernel.gz,gPXE/0.9.7,-,HTTP/1.0,78929,200,<NULL>,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>
diff --git a/test/expected/test_sql_anno.sh_1398146cf8b4f074ec8b9752f021cf47d011bebc.err b/test/expected/test_sql_anno.sh_1398146cf8b4f074ec8b9752f021cf47d011bebc.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql_anno.sh_1398146cf8b4f074ec8b9752f021cf47d011bebc.err
diff --git a/test/expected/test_sql_anno.sh_1398146cf8b4f074ec8b9752f021cf47d011bebc.out b/test/expected/test_sql_anno.sh_1398146cf8b4f074ec8b9752f021cf47d011bebc.out
new file mode 100644
index 0000000..7d0d083
--- /dev/null
+++ b/test/expected/test_sql_anno.sh_1398146cf8b4f074ec8b9752f021cf47d011bebc.out
@@ -0,0 +1,9 @@
+ SELECT json_object('abc', 'def') ->> '$.abc'
+ sql_keyword ------
+ sql_func ------------------------
+ sql_ident -----------
+ sql_string -----
+ sql_comma -
+ sql_string -----
+ sql_oper ---
+ sql_string -------
diff --git a/test/expected/test_sql_anno.sh_de46094b6e005285dc0921ef9979e36240c5042d.err b/test/expected/test_sql_anno.sh_de46094b6e005285dc0921ef9979e36240c5042d.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql_anno.sh_de46094b6e005285dc0921ef9979e36240c5042d.err
diff --git a/test/expected/test_sql_anno.sh_de46094b6e005285dc0921ef9979e36240c5042d.out b/test/expected/test_sql_anno.sh_de46094b6e005285dc0921ef9979e36240c5042d.out
new file mode 100644
index 0000000..0dd8902
--- /dev/null
+++ b/test/expected/test_sql_anno.sh_de46094b6e005285dc0921ef9979e36240c5042d.out
@@ -0,0 +1,7 @@
+ SELECT 0x77, 123, 123e4
+ sql_keyword ------
+ sql_number ----
+ sql_comma -
+ sql_number ---
+ sql_comma -
+ sql_number -----
diff --git a/test/expected/test_sql_anno.sh_e7dae4ba18c42c416ed03afd8819200f63e89ac8.err b/test/expected/test_sql_anno.sh_e7dae4ba18c42c416ed03afd8819200f63e89ac8.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql_anno.sh_e7dae4ba18c42c416ed03afd8819200f63e89ac8.err
diff --git a/test/expected/test_sql_anno.sh_e7dae4ba18c42c416ed03afd8819200f63e89ac8.out b/test/expected/test_sql_anno.sh_e7dae4ba18c42c416ed03afd8819200f63e89ac8.out
new file mode 100644
index 0000000..fa79088
--- /dev/null
+++ b/test/expected/test_sql_anno.sh_e7dae4ba18c42c416ed03afd8819200f63e89ac8.out
@@ -0,0 +1,17 @@
+ from access_log | filter cs_method == 'GET' || cs_method == 'PUT'
+ prql_stage ----------------
+ prql_transform ----
+ prql_ident ----------
+ prql_fqid ----------
+ prql_stage -------------------------------------------------
+ prql_pipe -
+ prql_transform ------
+ prql_ident ---------
+ prql_fqid ---------
+ prql_oper --
+ prql_string -----
+ prql_oper --
+ prql_ident ---------
+ prql_fqid ---------
+ prql_oper --
+ prql_string -----
diff --git a/test/expected/test_sql_fs_func.sh_2aa83fc90c850cdd11e3136a1a02b79c5879824b.err b/test/expected/test_sql_fs_func.sh_2aa83fc90c850cdd11e3136a1a02b79c5879824b.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql_fs_func.sh_2aa83fc90c850cdd11e3136a1a02b79c5879824b.err
diff --git a/test/expected/test_sql_fs_func.sh_2aa83fc90c850cdd11e3136a1a02b79c5879824b.out b/test/expected/test_sql_fs_func.sh_2aa83fc90c850cdd11e3136a1a02b79c5879824b.out
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql_fs_func.sh_2aa83fc90c850cdd11e3136a1a02b79c5879824b.out
diff --git a/test/expected/test_sql_fs_func.sh_34baa8050f8278d7b68c29e53bdd9f37da0f34c8.err b/test/expected/test_sql_fs_func.sh_34baa8050f8278d7b68c29e53bdd9f37da0f34c8.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql_fs_func.sh_34baa8050f8278d7b68c29e53bdd9f37da0f34c8.err
diff --git a/test/expected/test_sql_fs_func.sh_34baa8050f8278d7b68c29e53bdd9f37da0f34c8.out b/test/expected/test_sql_fs_func.sh_34baa8050f8278d7b68c29e53bdd9f37da0f34c8.out
new file mode 100644
index 0000000..f5e1ef9
--- /dev/null
+++ b/test/expected/test_sql_fs_func.sh_34baa8050f8278d7b68c29e53bdd9f37da0f34c8.out
@@ -0,0 +1,2 @@
+shell_exec('echo hi')
+ hi␊
diff --git a/test/expected/test_sql_fs_func.sh_9234a453403934587bbbdde355281a956d1fbe5f.err b/test/expected/test_sql_fs_func.sh_9234a453403934587bbbdde355281a956d1fbe5f.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql_fs_func.sh_9234a453403934587bbbdde355281a956d1fbe5f.err
diff --git a/test/expected/test_sql_fs_func.sh_9234a453403934587bbbdde355281a956d1fbe5f.out b/test/expected/test_sql_fs_func.sh_9234a453403934587bbbdde355281a956d1fbe5f.out
new file mode 100644
index 0000000..2329234
--- /dev/null
+++ b/test/expected/test_sql_fs_func.sh_9234a453403934587bbbdde355281a956d1fbe5f.out
@@ -0,0 +1,2 @@
+st_parent st_name st_dev st_ino st_type st_mode st_nlink st_uid st_user st_gid st_group st_rdev st_size st_blksize st_blocks st_atime st_mtime st_ctime error
+/ non-existent <NULL> <NULL> <NULL> <NULL> <NULL> <NULL> <NULL> <NULL> <NULL> <NULL> <NULL> <NULL> <NULL> <NULL> <NULL> <NULL> No such file or directory
diff --git a/test/expected/test_sql_fs_func.sh_9e2c0a90ce333365ff7354375f2c609bc27135c8.err b/test/expected/test_sql_fs_func.sh_9e2c0a90ce333365ff7354375f2c609bc27135c8.err
index c8a3fd0..cac88c8 100644
--- a/test/expected/test_sql_fs_func.sh_9e2c0a90ce333365ff7354375f2c609bc27135c8.err
+++ b/test/expected/test_sql_fs_func.sh_9e2c0a90ce333365ff7354375f2c609bc27135c8.err
@@ -1 +1 @@
-error: sqlite3_exec failed -- lnav-error:{"level":"error","message":{"str":"call to readlink(path) failed","attrs":[{"start":8,"end":16,"type":"role","value":47},{"start":17,"end":21,"type":"role","value":46},{"start":8,"end":22,"type":"role","value":60}]},"reason":{"str":"unable to stat path: non-existent-link -- No such file or directory","attrs":[]},"snippets":[],"help":{"str":"","attrs":[]}}
+error: sqlite3_exec failed -- lnav-error:{"level":"error","message":{"str":"call to readlink(path) failed","attrs":[{"start":8,"end":16,"type":"role","value":49},{"start":17,"end":21,"type":"role","value":48},{"start":8,"end":22,"type":"role","value":65}]},"reason":{"str":"unable to stat path: non-existent-link -- No such file or directory","attrs":[]},"snippets":[],"notes":[],"help":{"str":"","attrs":[]}}
diff --git a/test/expected/test_sql_fs_func.sh_cf670dfa1ae7ac5a074baa642068c6d26ac8e096.err b/test/expected/test_sql_fs_func.sh_cf670dfa1ae7ac5a074baa642068c6d26ac8e096.err
index aa68134..fdc556a 100644
--- a/test/expected/test_sql_fs_func.sh_cf670dfa1ae7ac5a074baa642068c6d26ac8e096.err
+++ b/test/expected/test_sql_fs_func.sh_cf670dfa1ae7ac5a074baa642068c6d26ac8e096.err
@@ -1 +1 @@
-error: sqlite3_exec failed -- lnav-error:{"level":"error","message":{"str":"call to realpath(path) failed","attrs":[{"start":8,"end":16,"type":"role","value":47},{"start":17,"end":21,"type":"role","value":46},{"start":8,"end":22,"type":"role","value":60}]},"reason":{"str":"Could not get real path for non-existent-path -- No such file or directory","attrs":[]},"snippets":[],"help":{"str":"","attrs":[]}}
+error: sqlite3_exec failed -- lnav-error:{"level":"error","message":{"str":"call to realpath(path) failed","attrs":[{"start":8,"end":16,"type":"role","value":49},{"start":17,"end":21,"type":"role","value":48},{"start":8,"end":22,"type":"role","value":65}]},"reason":{"str":"Could not get real path for non-existent-path -- No such file or directory","attrs":[]},"snippets":[],"notes":[],"help":{"str":"","attrs":[]}}
diff --git a/test/expected/test_sql_indexes.sh_1614ebb5e2e83bab11023354dea8a0885ddf64b4.out b/test/expected/test_sql_indexes.sh_1614ebb5e2e83bab11023354dea8a0885ddf64b4.out
index 7179021..f16755c 100644
--- a/test/expected/test_sql_indexes.sh_1614ebb5e2e83bab11023354dea8a0885ddf64b4.out
+++ b/test/expected/test_sql_indexes.sh_1614ebb5e2e83bab11023354dea8a0885ddf64b4.out
@@ -1,3 +1,3 @@
-log_line log_part  log_time log_idle_msecs log_level log_mark log_comment log_tags log_filters log_msg_format 
-  1  <NULL> 2009-07-20 22:59:29.000  3000 error   0  <NULL>  <NULL>  <NULL>  
- 3  <NULL> 2013-02-15 06:00:31.000  112777262000 error   0  <NULL>  <NULL>  <NULL>  
+log_line  log_time  log_level log_msg_format log_msg_values log_part log_idle_msecs log_mark log_comment log_tags log_annotations log_filters 
+ 1 2009-07-20 22:59:29.000 error null <NULL>   3000 0 <NULL> <NULL> <NULL> <NULL>
+ 3 2013-02-15 06:00:31.000 error null <NULL>  112777262000 0 <NULL> <NULL> <NULL> <NULL>
diff --git a/test/expected/test_sql_indexes.sh_2b4945247332d01b08e6f17340f7d17f3b3649b8.err b/test/expected/test_sql_indexes.sh_2b4945247332d01b08e6f17340f7d17f3b3649b8.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql_indexes.sh_2b4945247332d01b08e6f17340f7d17f3b3649b8.err
diff --git a/test/expected/test_sql_indexes.sh_2b4945247332d01b08e6f17340f7d17f3b3649b8.out b/test/expected/test_sql_indexes.sh_2b4945247332d01b08e6f17340f7d17f3b3649b8.out
new file mode 100644
index 0000000..240259b
--- /dev/null
+++ b/test/expected/test_sql_indexes.sh_2b4945247332d01b08e6f17340f7d17f3b3649b8.out
@@ -0,0 +1,5 @@
+log_line  log_time  log_level log_msg_format log_msg_values log_part log_idle_msecs log_mark log_comment log_tags log_annotations log_filters 
+ 0 2009-07-20 22:59:26.000 info null <NULL>  0 0 <NULL> <NULL> <NULL> <NULL>
+ 1 2009-07-20 22:59:29.000 error null <NULL>   3000 0 <NULL> <NULL> <NULL> <NULL>
+ 2 2009-07-20 22:59:29.000 info    null   <NULL>  0  0  <NULL>  <NULL>  <NULL>  <NULL> 
+ 3 2013-02-15 06:00:31.000 error    null   <NULL>  112777262000  0  <NULL>  <NULL>  <NULL>  <NULL> 
diff --git a/test/expected/test_sql_indexes.sh_541a8e35f34a206e340a3880128b6ce137847872.out b/test/expected/test_sql_indexes.sh_541a8e35f34a206e340a3880128b6ce137847872.out
index 5467779..a5e2a8e 100644
--- a/test/expected/test_sql_indexes.sh_541a8e35f34a206e340a3880128b6ce137847872.out
+++ b/test/expected/test_sql_indexes.sh_541a8e35f34a206e340a3880128b6ce137847872.out
@@ -1,5 +1,5 @@
-log_line log_part  log_time log_idle_msecs log_level log_mark log_comment log_tags log_filters  c_ip cs_method cs_referer cs_uri_query  cs_uri_stem cs_user_agent cs_username cs_version sc_bytes sc_status cs_host  log_unique_path 
-  0  <NULL> 2009-07-20 22:59:26.000  0 info   0  <NULL>  <NULL>  <NULL> 192.168.202.254 GET  -   <NULL> /vmw/cgi/tramp  gPXE/0.9.7  -  HTTP/1.0   134  200  <NULL> logfile_access_log.0 
-   1 <NULL> 2009-07-20 22:59:29.000 3000 error 0 <NULL> <NULL> <NULL> 192.168.202.254 GET - <NULL> /vmw/vSphere/default/vmkboot.gz gPXE/0.9.7 - HTTP/1.0 46210 404 <NULL> logfile_access_log.0
-  2  <NULL> 2009-07-20 22:59:29.000  0 info   0  <NULL>  <NULL>  <NULL> 192.168.202.254 GET  -   <NULL> /vmw/vSphere/default/vmkernel.gz gPXE/0.9.7  -  HTTP/1.0   78929  200  <NULL> logfile_access_log.0 
- 3  <NULL> 2013-02-15 06:00:31.000  112777262000 error   0  <NULL>  <NULL>  <NULL> 10.112.81.15  <NULL>  -   <NULL> <NULL>  -  -  <NULL>   0  400  <NULL> logfile_access_log.1
+log_line  log_time  log_level  c_ip  cs_method cs_referer cs_uri_query  cs_uri_stem  cs_user_agent cs_username cs_version  sc_bytes  sc_status cs_host log_part log_idle_msecs log_mark log_comment log_tags log_annotations log_filters  log_unique_path  
+ 0 2009-07-20 22:59:26.000 info 192.168.202.254 GET - <NULL> /vmw/cgi/tramp gPXE/0.9.7 - HTTP/1.0   134 200 <NULL> <NULL>  0 0 <NULL> <NULL> <NULL> <NULL> logfile_access_log.0
+ 1 2009-07-20 22:59:29.000 error 192.168.202.254 GET - <NULL> /vmw/vSphere/default/vmkboot.gz gPXE/0.9.7 - HTTP/1.0  46210 404 <NULL> <NULL>   3000 0 <NULL> <NULL> <NULL> <NULL> logfile_access_log.0
+ 2 2009-07-20 22:59:29.000 info  192.168.202.254 GET  -   <NULL> /vmw/vSphere/default/vmkernel.gz gPXE/0.9.7  -  HTTP/1.0   78929  200  <NULL>  <NULL>  0  0  <NULL>  <NULL>  <NULL>  <NULL> logfile_access_log.0 
+ 3 2013-02-15 06:00:31.000 error  10.112.81.15  <NULL>  -   <NULL> <NULL>  -  -  <NULL>   0  400  <NULL>  <NULL>  112777262000  0  <NULL>  <NULL>  <NULL>  <NULL> logfile_access_log.1 
diff --git a/test/expected/test_sql_indexes.sh_59a1497c13a5e09bc8f95ef02552b2835ebea6e5.out b/test/expected/test_sql_indexes.sh_59a1497c13a5e09bc8f95ef02552b2835ebea6e5.out
index 823c4d0..5c73e94 100644
--- a/test/expected/test_sql_indexes.sh_59a1497c13a5e09bc8f95ef02552b2835ebea6e5.out
+++ b/test/expected/test_sql_indexes.sh_59a1497c13a5e09bc8f95ef02552b2835ebea6e5.out
@@ -1,2 +1,2 @@
-$id $parent $notused  replace($detail, 'SCAN TABLE', 'SCAN') 
- 2  0  0 SCAN all_logs VIRTUAL TABLE INDEX 1:SEARCH all_logs USING log_level < ? 
+$id  $parent   $notused   replace($detail, 'SCAN TABLE', 'SCAN')  
+ 2  0  0 SCAN all_logs VIRTUAL TABLE INDEX 1:SEARCH all_logs USING log_level < ?
diff --git a/test/expected/test_sql_indexes.sh_69fd19d56a8cd1fc9c7eb9351270eabb491f8233.out b/test/expected/test_sql_indexes.sh_69fd19d56a8cd1fc9c7eb9351270eabb491f8233.out
index cb2aac6..c44444c 100644
--- a/test/expected/test_sql_indexes.sh_69fd19d56a8cd1fc9c7eb9351270eabb491f8233.out
+++ b/test/expected/test_sql_indexes.sh_69fd19d56a8cd1fc9c7eb9351270eabb491f8233.out
@@ -1,5 +1,5 @@
-log_line log_part  log_time log_idle_msecs log_level log_mark log_comment log_tags log_filters log_msg_format log_format 
- 0  <NULL> 2009-07-20 22:59:26.000  0 info   0  <NULL>  <NULL>  <NULL>   access_log 
-  1 <NULL> 2009-07-20 22:59:29.000 3000 error 0 <NULL> <NULL> <NULL> access_log
- 2  <NULL> 2009-07-20 22:59:29.000  0 info   0  <NULL>  <NULL>  <NULL>   access_log 
- 3  <NULL> 2013-02-15 06:00:31.000  112777262000 error   0  <NULL>  <NULL>  <NULL>   access_log
+log_line  log_time  log_level log_msg_format log_msg_values log_part log_idle_msecs log_mark log_comment log_tags log_annotations log_filters log_format 
+ 0 2009-07-20 22:59:26.000 info null <NULL>  0 0 <NULL> <NULL> <NULL> <NULL> access_log
+ 1 2009-07-20 22:59:29.000 error null <NULL>   3000 0 <NULL> <NULL> <NULL> <NULL> access_log
+ 2 2009-07-20 22:59:29.000 info    null   <NULL>  0  0  <NULL>  <NULL>  <NULL>  <NULL> access_log 
+ 3 2013-02-15 06:00:31.000 error    null   <NULL>  112777262000  0  <NULL>  <NULL>  <NULL>  <NULL> access_log 
diff --git a/test/expected/test_sql_indexes.sh_6f707b6e856dbaab6f95e7e89b98dc3652021f85.out b/test/expected/test_sql_indexes.sh_6f707b6e856dbaab6f95e7e89b98dc3652021f85.out
index ee48805..8e21b1b 100644
--- a/test/expected/test_sql_indexes.sh_6f707b6e856dbaab6f95e7e89b98dc3652021f85.out
+++ b/test/expected/test_sql_indexes.sh_6f707b6e856dbaab6f95e7e89b98dc3652021f85.out
@@ -1,3 +1,3 @@
-log_line log_part  log_time log_idle_msecs log_level log_mark log_comment log_tags log_filters log_msg_format 
- 0  <NULL> 2009-07-20 22:59:26.000  0 info   0  <NULL>  <NULL>  <NULL>  
- 2 <NULL> 2009-07-20 22:59:29.000 0 info 0 <NULL> <NULL> <NULL>
+log_line  log_time  log_level log_msg_format log_msg_values log_part log_idle_msecs log_mark log_comment log_tags log_annotations log_filters 
+ 0 2009-07-20 22:59:26.000 info null <NULL>  0 0 <NULL> <NULL> <NULL> <NULL>
+ 2 2009-07-20 22:59:29.000 info null <NULL>  0 0 <NULL> <NULL> <NULL> <NULL>
diff --git a/test/expected/test_sql_indexes.sh_b615b6737b1e0d383c8ce4a1db56332f11dbc158.out b/test/expected/test_sql_indexes.sh_b615b6737b1e0d383c8ce4a1db56332f11dbc158.out
index 2a91985..f56f904 100644
--- a/test/expected/test_sql_indexes.sh_b615b6737b1e0d383c8ce4a1db56332f11dbc158.out
+++ b/test/expected/test_sql_indexes.sh_b615b6737b1e0d383c8ce4a1db56332f11dbc158.out
@@ -1,2 +1,2 @@
-$id $parent $notused  replace($detail, 'SCAN TABLE', 'SCAN') 
- 2  0  0 SCAN all_logs VIRTUAL TABLE INDEX 1:SEARCH all_logs USING log_format = ? 
+$id  $parent   $notused   replace($detail, 'SCAN TABLE', 'SCAN')  
+ 2  0  0 SCAN all_logs VIRTUAL TABLE INDEX 1:SEARCH all_logs USING log_format = ?
diff --git a/test/expected/test_sql_indexes.sh_dab07d8de7728752ae938a174468d75e85f3ae7e.out b/test/expected/test_sql_indexes.sh_dab07d8de7728752ae938a174468d75e85f3ae7e.out
index 82958af..7d20aa3 100644
--- a/test/expected/test_sql_indexes.sh_dab07d8de7728752ae938a174468d75e85f3ae7e.out
+++ b/test/expected/test_sql_indexes.sh_dab07d8de7728752ae938a174468d75e85f3ae7e.out
@@ -1,2 +1,2 @@
-$id $parent $notused  replace($detail, 'SCAN TABLE', 'SCAN') 
- 2  0  0 SCAN access_log VIRTUAL TABLE INDEX 1:SEARCH access_log USING log_path GLOB ? 
+$id  $parent   $notused   replace($detail, 'SCAN TABLE', 'SCAN')  
+ 2  0  0 SCAN access_log VIRTUAL TABLE INDEX 1:SEARCH access_log USING log_path GLOB ?
diff --git a/test/expected/test_sql_indexes.sh_f7681c234d4f60df16c997a05163aeb058c52870.out b/test/expected/test_sql_indexes.sh_f7681c234d4f60df16c997a05163aeb058c52870.out
index 16c7c37..240259b 100644
--- a/test/expected/test_sql_indexes.sh_f7681c234d4f60df16c997a05163aeb058c52870.out
+++ b/test/expected/test_sql_indexes.sh_f7681c234d4f60df16c997a05163aeb058c52870.out
@@ -1,5 +1,5 @@
-log_line log_part  log_time log_idle_msecs log_level log_mark log_comment log_tags log_filters log_msg_format 
- 0  <NULL> 2009-07-20 22:59:26.000  0 info   0  <NULL>  <NULL>  <NULL>  
-  1 <NULL> 2009-07-20 22:59:29.000 3000 error 0 <NULL> <NULL> <NULL>
- 2  <NULL> 2009-07-20 22:59:29.000  0 info   0  <NULL>  <NULL>  <NULL>  
- 3  <NULL> 2013-02-15 06:00:31.000  112777262000 error   0  <NULL>  <NULL>  <NULL>  
+log_line  log_time  log_level log_msg_format log_msg_values log_part log_idle_msecs log_mark log_comment log_tags log_annotations log_filters 
+ 0 2009-07-20 22:59:26.000 info null <NULL>  0 0 <NULL> <NULL> <NULL> <NULL>
+ 1 2009-07-20 22:59:29.000 error null <NULL>   3000 0 <NULL> <NULL> <NULL> <NULL>
+ 2 2009-07-20 22:59:29.000 info    null   <NULL>  0  0  <NULL>  <NULL>  <NULL>  <NULL> 
+ 3 2013-02-15 06:00:31.000 error    null   <NULL>  112777262000  0  <NULL>  <NULL>  <NULL>  <NULL> 
diff --git a/test/expected/test_sql_json_func.sh_026077f4d573ee034467065b7e4f1878bdd4e2f2.err b/test/expected/test_sql_json_func.sh_026077f4d573ee034467065b7e4f1878bdd4e2f2.err
index 9654daa..84205dc 100644
--- a/test/expected/test_sql_json_func.sh_026077f4d573ee034467065b7e4f1878bdd4e2f2.err
+++ b/test/expected/test_sql_json_func.sh_026077f4d573ee034467065b7e4f1878bdd4e2f2.err
@@ -1,4 +1 @@
-error: sqlite3_exec failed -- parse error: premature EOF
- [123, true
- (right here) ------^
-
+error: sqlite3_exec failed -- lnav-error:{"level":"error","message":{"str":"invalid JSON","attrs":[]},"reason":{"str":"parse error: premature EOF\n [123, true\n (right here) ------^","attrs":[]},"snippets":[],"notes":[],"help":{"str":"","attrs":[]}}
diff --git a/test/expected/test_sql_json_func.sh_5f2feef079a51410e1f8661bfe92da1c3277f665.err b/test/expected/test_sql_json_func.sh_5f2feef079a51410e1f8661bfe92da1c3277f665.err
index f784e9c..99b48bc 100644
--- a/test/expected/test_sql_json_func.sh_5f2feef079a51410e1f8661bfe92da1c3277f665.err
+++ b/test/expected/test_sql_json_func.sh_5f2feef079a51410e1f8661bfe92da1c3277f665.err
@@ -1 +1 @@
-error: sqlite3_exec failed -- lnav-error:{"level":"error","message":{"str":"call to json_contains(json, value) failed","attrs":[{"start":8,"end":21,"type":"role","value":47},{"start":22,"end":26,"type":"role","value":46},{"start":28,"end":33,"type":"role","value":46},{"start":8,"end":34,"type":"role","value":60}]},"reason":{"str":"parse error: premature EOF\n [\"hi\", \"bye\", \"solong]\n (right here) ------^","attrs":[]},"snippets":[],"help":{"str":"","attrs":[]}}
+error: sqlite3_exec failed -- lnav-error:{"level":"error","message":{"str":"call to json_contains(json, value) failed","attrs":[{"start":8,"end":21,"type":"role","value":49},{"start":22,"end":26,"type":"role","value":48},{"start":28,"end":33,"type":"role","value":48},{"start":8,"end":34,"type":"role","value":65}]},"reason":{"str":"parse error: premature EOF\n [\"hi\", \"bye\", \"solong]\n (right here) ------^","attrs":[]},"snippets":[],"notes":[],"help":{"str":"","attrs":[]}}
diff --git a/test/expected/test_sql_json_func.sh_e0ab80f50fb008700ab6cfb90694ed014d40e44b.err b/test/expected/test_sql_json_func.sh_e0ab80f50fb008700ab6cfb90694ed014d40e44b.err
index 456ef7a..6033ba4 100644
--- a/test/expected/test_sql_json_func.sh_e0ab80f50fb008700ab6cfb90694ed014d40e44b.err
+++ b/test/expected/test_sql_json_func.sh_e0ab80f50fb008700ab6cfb90694ed014d40e44b.err
@@ -1 +1 @@
-error: sqlite3_exec failed -- lnav-error:{"level":"error","message":{"str":"call to json_concat(json, value, ...) failed","attrs":[{"start":8,"end":19,"type":"role","value":47},{"start":20,"end":24,"type":"role","value":46},{"start":26,"end":31,"type":"role","value":46},{"start":8,"end":37,"type":"role","value":60}]},"reason":{"str":"Invalid JSON: parse error: premature EOF\n [null,\n (right here) ------^","attrs":[]},"snippets":[],"help":{"str":"","attrs":[]}}
+error: sqlite3_exec failed -- lnav-error:{"level":"error","message":{"str":"call to json_concat(json, value, ...) failed","attrs":[{"start":8,"end":19,"type":"role","value":49},{"start":20,"end":24,"type":"role","value":48},{"start":26,"end":31,"type":"role","value":48},{"start":8,"end":37,"type":"role","value":65}]},"reason":{"str":"Invalid JSON: parse error: premature EOF\n [null,\n (right here) ------^","attrs":[]},"snippets":[],"notes":[],"help":{"str":"","attrs":[]}}
diff --git a/test/expected/test_sql_json_func.sh_f34f5dfa938a1ac7721f924beb16bbceec127a1b.err b/test/expected/test_sql_json_func.sh_f34f5dfa938a1ac7721f924beb16bbceec127a1b.err
index e8eef68..cffd039 100644
--- a/test/expected/test_sql_json_func.sh_f34f5dfa938a1ac7721f924beb16bbceec127a1b.err
+++ b/test/expected/test_sql_json_func.sh_f34f5dfa938a1ac7721f924beb16bbceec127a1b.err
@@ -1,4 +1 @@
-error: sqlite3_exec failed -- parse error: premature EOF
- [null, true, 20, 30, 40
- (right here) ------^
-
+error: sqlite3_exec failed -- lnav-error:{"level":"error","message":{"str":"invalid JSON","attrs":[]},"reason":{"str":"parse error: premature EOF\n [null, true, 20, 30, 40\n (right here) ------^","attrs":[]},"snippets":[],"notes":[],"help":{"str":"","attrs":[]}}
diff --git a/test/expected/test_sql_regexp.sh_02ef03572fd2bcf39bab8e29cf1c735ff7c3f297.err b/test/expected/test_sql_regexp.sh_02ef03572fd2bcf39bab8e29cf1c735ff7c3f297.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql_regexp.sh_02ef03572fd2bcf39bab8e29cf1c735ff7c3f297.err
diff --git a/test/expected/test_sql_regexp.sh_02ef03572fd2bcf39bab8e29cf1c735ff7c3f297.out b/test/expected/test_sql_regexp.sh_02ef03572fd2bcf39bab8e29cf1c735ff7c3f297.out
new file mode 100644
index 0000000..8948203
--- /dev/null
+++ b/test/expected/test_sql_regexp.sh_02ef03572fd2bcf39bab8e29cf1c735ff7c3f297.out
@@ -0,0 +1,3 @@
+regexp_replace(cs_uri_query, '.*rapidView=(\d+).*', '\1') 
+1295
+1839
diff --git a/test/expected/test_sql_regexp.sh_03257c56e85558aa0cc925b68d3af962afc25125.out b/test/expected/test_sql_regexp.sh_03257c56e85558aa0cc925b68d3af962afc25125.out
index 19aa1c4..5074519 100644
--- a/test/expected/test_sql_regexp.sh_03257c56e85558aa0cc925b68d3af962afc25125.out
+++ b/test/expected/test_sql_regexp.sh_03257c56e85558aa0cc925b68d3af962afc25125.out
@@ -1,4 +1,4 @@
-match_index capture_index capture_name capture_count range_start range_stop content 
- 0  0  <NULL>  3  1  9 abc=def; 
+match_index capture_index capture_name capture_count range_start range_stop content  
+ 0 0 <NULL> 3 1 9 abc=def;
0 1 <NULL> 3 1 4 abc
 0  2  <NULL>  3  5  8 def 
diff --git a/test/expected/test_sql_regexp.sh_219a579cf7744fa08ab79fadd08b521b2f18a661.err b/test/expected/test_sql_regexp.sh_219a579cf7744fa08ab79fadd08b521b2f18a661.err
new file mode 100644
index 0000000..824c120
--- /dev/null
+++ b/test/expected/test_sql_regexp.sh_219a579cf7744fa08ab79fadd08b521b2f18a661.err
@@ -0,0 +1,7 @@
+✘ error: “^(” is not a valid regular expression
+ reason: missing closing parenthesis
+ --> command-option:1
+ | ;SELECT * from regexp_capture_into_json('abc=def;ghi=jkl;', '^(')
+ --> pattern
+ | ^( 
+ |  ^ missing closing parenthesis 
diff --git a/test/expected/test_sql_regexp.sh_219a579cf7744fa08ab79fadd08b521b2f18a661.out b/test/expected/test_sql_regexp.sh_219a579cf7744fa08ab79fadd08b521b2f18a661.out
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql_regexp.sh_219a579cf7744fa08ab79fadd08b521b2f18a661.out
diff --git a/test/expected/test_sql_regexp.sh_51293df041b6969ccecc60204dce3676d0fb006d.out b/test/expected/test_sql_regexp.sh_51293df041b6969ccecc60204dce3676d0fb006d.out
index 4917183..dfdbb10 100644
--- a/test/expected/test_sql_regexp.sh_51293df041b6969ccecc60204dce3676d0fb006d.out
+++ b/test/expected/test_sql_regexp.sh_51293df041b6969ccecc60204dce3676d0fb006d.out
@@ -1,2 +1,2 @@
-match_index  content 
- 0 {"key":"foo","value":4670} 
+match_index  content  
+ 0 {"key":"foo","value":4670}
diff --git a/test/expected/test_sql_regexp.sh_a610798fefdacd8d0179a4b17cd757d00fb731be.err b/test/expected/test_sql_regexp.sh_a610798fefdacd8d0179a4b17cd757d00fb731be.err
new file mode 100644
index 0000000..209f89e
--- /dev/null
+++ b/test/expected/test_sql_regexp.sh_a610798fefdacd8d0179a4b17cd757d00fb731be.err
@@ -0,0 +1,7 @@
+✘ error: “^(” is not a valid regular expression
+ reason: missing closing parenthesis
+ --> command-option:1
+ | ;SELECT * from regexp_capture('abc=def;ghi=jkl;', '^(')
+ --> pattern
+ | ^( 
+ |  ^ missing closing parenthesis 
diff --git a/test/expected/test_sql_regexp.sh_a610798fefdacd8d0179a4b17cd757d00fb731be.out b/test/expected/test_sql_regexp.sh_a610798fefdacd8d0179a4b17cd757d00fb731be.out
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql_regexp.sh_a610798fefdacd8d0179a4b17cd757d00fb731be.out
diff --git a/test/expected/test_sql_regexp.sh_b841a0c09601e2419eeb99e85f7e286c889e4801.out b/test/expected/test_sql_regexp.sh_b841a0c09601e2419eeb99e85f7e286c889e4801.out
index 78f05ff..8ce275a 100644
--- a/test/expected/test_sql_regexp.sh_b841a0c09601e2419eeb99e85f7e286c889e4801.out
+++ b/test/expected/test_sql_regexp.sh_b841a0c09601e2419eeb99e85f7e286c889e4801.out
@@ -1,27 +1,27 @@
-log_line,log_part,log_time,log_idle_msecs,log_level,log_mark,log_comment,log_tags,log_filters,log_hostname,log_msgid,log_pid,log_pri,log_procname,log_struct,log_syslog_tag,syslog_version,match_index,content
-2,<NULL>,2022-08-16 00:32:15.000,199000,info,0,<NULL>,<NULL>,<NULL>,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,0,"{""value"":""com.apple.cdscheduler""}"
-2,<NULL>,2022-08-16 00:32:15.000,199000,info,0,<NULL>,<NULL>,<NULL>,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,1,"{""value"":"" claims selected messages.\n\tThose messages may not appear in standard system log files or in the ASL database.""}"
-5,<NULL>,2022-08-16 00:32:15.000,0,info,0,<NULL>,<NULL>,<NULL>,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,0,"{""value"":""com.apple.install""}"
-5,<NULL>,2022-08-16 00:32:15.000,0,info,0,<NULL>,<NULL>,<NULL>,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,1,"{""value"":"" claims selected messages.\n\tThose messages may not appear in standard system log files or in the ASL database.""}"
-8,<NULL>,2022-08-16 00:32:15.000,0,info,0,<NULL>,<NULL>,<NULL>,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,0,"{""value"":""com.apple.authd""}"
-8,<NULL>,2022-08-16 00:32:15.000,0,info,0,<NULL>,<NULL>,<NULL>,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,1,"{""value"":"" sharing output destination ""}"
-8,<NULL>,2022-08-16 00:32:15.000,0,info,0,<NULL>,<NULL>,<NULL>,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,2,"{""value"":""/var/log/asl""}"
-8,<NULL>,2022-08-16 00:32:15.000,0,info,0,<NULL>,<NULL>,<NULL>,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,3,"{""value"":"" with ASL Module ""}"
-8,<NULL>,2022-08-16 00:32:15.000,0,info,0,<NULL>,<NULL>,<NULL>,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,4,"{""value"":""com.apple.asl""}"
-8,<NULL>,2022-08-16 00:32:15.000,0,info,0,<NULL>,<NULL>,<NULL>,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,5,"{""value"":"".\n\tOutput parameters from ASL Module ""}"
-8,<NULL>,2022-08-16 00:32:15.000,0,info,0,<NULL>,<NULL>,<NULL>,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,6,"{""value"":""com.apple.asl""}"
-8,<NULL>,2022-08-16 00:32:15.000,0,info,0,<NULL>,<NULL>,<NULL>,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,7,"{""value"":"" override any specified in ASL Module ""}"
-8,<NULL>,2022-08-16 00:32:15.000,0,info,0,<NULL>,<NULL>,<NULL>,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,8,"{""value"":""com.apple.authd""}"
-8,<NULL>,2022-08-16 00:32:15.000,0,info,0,<NULL>,<NULL>,<NULL>,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,9,"{""value"":"".""}"
-11,<NULL>,2022-08-16 00:32:15.000,0,info,0,<NULL>,<NULL>,<NULL>,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,0,"{""value"":""com.apple.authd""}"
-11,<NULL>,2022-08-16 00:32:15.000,0,info,0,<NULL>,<NULL>,<NULL>,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,1,"{""value"":"" sharing output destination ""}"
-11,<NULL>,2022-08-16 00:32:15.000,0,info,0,<NULL>,<NULL>,<NULL>,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,2,"{""value"":""/var/log/system.log""}"
-11,<NULL>,2022-08-16 00:32:15.000,0,info,0,<NULL>,<NULL>,<NULL>,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,3,"{""value"":"" with ASL Module ""}"
-11,<NULL>,2022-08-16 00:32:15.000,0,info,0,<NULL>,<NULL>,<NULL>,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,4,"{""value"":""com.apple.asl""}"
-11,<NULL>,2022-08-16 00:32:15.000,0,info,0,<NULL>,<NULL>,<NULL>,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,5,"{""value"":"".\n\tOutput parameters from ASL Module ""}"
-11,<NULL>,2022-08-16 00:32:15.000,0,info,0,<NULL>,<NULL>,<NULL>,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,6,"{""value"":""com.apple.asl""}"
-11,<NULL>,2022-08-16 00:32:15.000,0,info,0,<NULL>,<NULL>,<NULL>,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,7,"{""value"":"" override any specified in ASL Module ""}"
-11,<NULL>,2022-08-16 00:32:15.000,0,info,0,<NULL>,<NULL>,<NULL>,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,8,"{""value"":""com.apple.authd""}"
-11,<NULL>,2022-08-16 00:32:15.000,0,info,0,<NULL>,<NULL>,<NULL>,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,9,"{""value"":"".""}"
-14,<NULL>,2022-08-16 00:32:15.000,0,info,0,<NULL>,<NULL>,<NULL>,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,0,"{""value"":""com.apple.authd""}"
-14,<NULL>,2022-08-16 00:32:15.000,0,info,0,<NULL>,<NULL>,<NULL>,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,1,"{""value"":"" claims selected messages.\n\tThose messages may not appear in standard system log files or in the ASL database.""}"
+log_line,log_time,log_level,log_hostname,log_msgid,log_pid,log_pri,log_procname,log_struct,log_syslog_tag,syslog_version,log_part,log_idle_msecs,log_mark,log_comment,log_tags,log_annotations,log_filters,match_index,content
+2,2022-08-16 00:32:15.000,info,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,<NULL>,199000,0,<NULL>,<NULL>,<NULL>,<NULL>,0,"{""value"":""com.apple.cdscheduler""}"
+2,2022-08-16 00:32:15.000,info,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,<NULL>,199000,0,<NULL>,<NULL>,<NULL>,<NULL>,1,"{""value"":"" claims selected messages.\n\tThose messages may not appear in standard system log files or in the ASL database.""}"
+5,2022-08-16 00:32:15.000,info,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>,0,"{""value"":""com.apple.install""}"
+5,2022-08-16 00:32:15.000,info,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>,1,"{""value"":"" claims selected messages.\n\tThose messages may not appear in standard system log files or in the ASL database.""}"
+8,2022-08-16 00:32:15.000,info,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>,0,"{""value"":""com.apple.authd""}"
+8,2022-08-16 00:32:15.000,info,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>,1,"{""value"":"" sharing output destination ""}"
+8,2022-08-16 00:32:15.000,info,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>,2,"{""value"":""/var/log/asl""}"
+8,2022-08-16 00:32:15.000,info,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>,3,"{""value"":"" with ASL Module ""}"
+8,2022-08-16 00:32:15.000,info,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>,4,"{""value"":""com.apple.asl""}"
+8,2022-08-16 00:32:15.000,info,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>,5,"{""value"":"".\n\tOutput parameters from ASL Module ""}"
+8,2022-08-16 00:32:15.000,info,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>,6,"{""value"":""com.apple.asl""}"
+8,2022-08-16 00:32:15.000,info,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>,7,"{""value"":"" override any specified in ASL Module ""}"
+8,2022-08-16 00:32:15.000,info,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>,8,"{""value"":""com.apple.authd""}"
+8,2022-08-16 00:32:15.000,info,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>,9,"{""value"":"".""}"
+11,2022-08-16 00:32:15.000,info,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>,0,"{""value"":""com.apple.authd""}"
+11,2022-08-16 00:32:15.000,info,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>,1,"{""value"":"" sharing output destination ""}"
+11,2022-08-16 00:32:15.000,info,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>,2,"{""value"":""/var/log/system.log""}"
+11,2022-08-16 00:32:15.000,info,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>,3,"{""value"":"" with ASL Module ""}"
+11,2022-08-16 00:32:15.000,info,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>,4,"{""value"":""com.apple.asl""}"
+11,2022-08-16 00:32:15.000,info,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>,5,"{""value"":"".\n\tOutput parameters from ASL Module ""}"
+11,2022-08-16 00:32:15.000,info,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>,6,"{""value"":""com.apple.asl""}"
+11,2022-08-16 00:32:15.000,info,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>,7,"{""value"":"" override any specified in ASL Module ""}"
+11,2022-08-16 00:32:15.000,info,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>,8,"{""value"":""com.apple.authd""}"
+11,2022-08-16 00:32:15.000,info,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>,9,"{""value"":"".""}"
+14,2022-08-16 00:32:15.000,info,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>,0,"{""value"":""com.apple.authd""}"
+14,2022-08-16 00:32:15.000,info,Tims-Air,<NULL>,314,<NULL>,syslogd,<NULL>,syslogd[314],<NULL>,<NULL>,0,0,<NULL>,<NULL>,<NULL>,<NULL>,1,"{""value"":"" claims selected messages.\n\tThose messages may not appear in standard system log files or in the ASL database.""}"
diff --git a/test/expected/test_sql_regexp.sh_bbd1128cf61a9af8f9dc937b46217443f42e1a7a.out b/test/expected/test_sql_regexp.sh_bbd1128cf61a9af8f9dc937b46217443f42e1a7a.out
index 655ce13..43adbdc 100644
--- a/test/expected/test_sql_regexp.sh_bbd1128cf61a9af8f9dc937b46217443f42e1a7a.out
+++ b/test/expected/test_sql_regexp.sh_bbd1128cf61a9af8f9dc937b46217443f42e1a7a.out
@@ -1,2 +1,2 @@
-match_index  content 
- 0 {"key":"foo","value":"123e"} 
+match_index  content  
+ 0 {"key":"foo","value":"123e"}
diff --git a/test/expected/test_sql_regexp.sh_d61af17ff19d640ddfc879460910991825eedd05.out b/test/expected/test_sql_regexp.sh_d61af17ff19d640ddfc879460910991825eedd05.out
index 6e952fb..2d39ef5 100644
--- a/test/expected/test_sql_regexp.sh_d61af17ff19d640ddfc879460910991825eedd05.out
+++ b/test/expected/test_sql_regexp.sh_d61af17ff19d640ddfc879460910991825eedd05.out
@@ -1,2 +1,2 @@
-match_index  content 
- 0 {"col_0":"abc","col_1":"def"} 
+match_index  content  
+ 0 {"col_0":"abc","col_1":"def"}
diff --git a/test/expected/test_sql_regexp.sh_ed6e9f13f178def009ee58c2aeea8c3c70fdb580.out b/test/expected/test_sql_regexp.sh_ed6e9f13f178def009ee58c2aeea8c3c70fdb580.out
index fef8e26..ae86ce4 100644
--- a/test/expected/test_sql_regexp.sh_ed6e9f13f178def009ee58c2aeea8c3c70fdb580.out
+++ b/test/expected/test_sql_regexp.sh_ed6e9f13f178def009ee58c2aeea8c3c70fdb580.out
@@ -1,2 +1,2 @@
-match_index  content 
- 0 {"key":"foo","value":"0x123e"} 
+match_index  content  
+ 0 {"key":"foo","value":"0x123e"}
diff --git a/test/expected/test_sql_search_table.sh_1a0d872ebc492fcecb2e79a0993170d5fc771a5b.out b/test/expected/test_sql_search_table.sh_1a0d872ebc492fcecb2e79a0993170d5fc771a5b.out
index d56bc20..9a85781 100644
--- a/test/expected/test_sql_search_table.sh_1a0d872ebc492fcecb2e79a0993170d5fc771a5b.out
+++ b/test/expected/test_sql_search_table.sh_1a0d872ebc492fcecb2e79a0993170d5fc771a5b.out
@@ -1,2 +1,2 @@
-log_line log_part  log_time log_idle_msecs log_level log_mark log_comment log_tags log_filters  comp  opid  tid  user  item prc reason  req  sid  src  sub vpxa_update  line  file match_index  lro_id  entity  operation  SessionId  SessionSubId 
- 2  <NULL> 2022-06-02 11:58:12.376  182 info   0  <NULL>  <NULL>  <NULL> <NULL> e3979f6 45709 <NULL> <NULL> vpxd <NULL> <NULL> <NULL> Originator@6876 vpxLro  <NULL> <NULL> <NULL>  0 lro-846064 SessionManager vim.SessionManager.sessionIsActive 52626140-422b-6287-b4e4-344192c6a01d 523e0a4b-6e83-6bcd-9342-22502dd89866 
+log_line  log_time  log_level  comp   opid   tid   user   file   item   line  prc  reason  req   sid   src   sub  vpxa_update match_index  lro_id   entity   operation   SessionId   SessionSubId  log_part log_idle_msecs log_mark log_comment log_tags log_annotations log_filters 
+ 2 2022-06-02 11:58:12.376 info <NULL> e3979f6 45709 <NULL> <NULL> <NULL> <NULL> vpxd <NULL> <NULL> <NULL> Originator@6876 vpxLro <NULL> 0 lro-846064 SessionManager vim.SessionManager.sessionIsActive 52626140-422b-6287-b4e4-344192c6a01d 523e0a4b-6e83-6bcd-9342-22502dd89866 <NULL>  182 0 <NULL> <NULL> <NULL> <NULL>
diff --git a/test/expected/test_sql_search_table.sh_3f5f74863d065418bca5a000e6ad3d9344635164.out b/test/expected/test_sql_search_table.sh_3f5f74863d065418bca5a000e6ad3d9344635164.out
index c92cf49..20f031d 100644
--- a/test/expected/test_sql_search_table.sh_3f5f74863d065418bca5a000e6ad3d9344635164.out
+++ b/test/expected/test_sql_search_table.sh_3f5f74863d065418bca5a000e6ad3d9344635164.out
@@ -1,12 +1,12 @@
-log_line log_part  log_time log_idle_msecs log_level log_mark log_comment log_tags log_filters match_index  name 
- 2  <NULL> 2022-08-16 00:32:15.000  199000 info   0  <NULL>  <NULL>  <NULL>  0 com.apple.cdscheduler 
- 5 <NULL> 2022-08-16 00:32:15.000 0 info 0 <NULL> <NULL> <NULL> 0 com.apple.install
- 8  <NULL> 2022-08-16 00:32:15.000  0 info   0  <NULL>  <NULL>  <NULL>  0 com.apple.authd 
- 8 <NULL> 2022-08-16 00:32:15.000 0 info 0 <NULL> <NULL> <NULL> 1 com.apple.asl
- 8  <NULL> 2022-08-16 00:32:15.000  0 info   0  <NULL>  <NULL>  <NULL>  2 com.apple.asl 
- 8 <NULL> 2022-08-16 00:32:15.000 0 info 0 <NULL> <NULL> <NULL> 3 com.apple.authd
- 11  <NULL> 2022-08-16 00:32:15.000  0 info   0  <NULL>  <NULL>  <NULL>  0 com.apple.authd 
- 11 <NULL> 2022-08-16 00:32:15.000 0 info 0 <NULL> <NULL> <NULL> 1 com.apple.asl
- 11  <NULL> 2022-08-16 00:32:15.000  0 info   0  <NULL>  <NULL>  <NULL>  2 com.apple.asl 
- 11 <NULL> 2022-08-16 00:32:15.000 0 info 0 <NULL> <NULL> <NULL> 3 com.apple.authd
- 14  <NULL> 2022-08-16 00:32:15.000  0 info   0  <NULL>  <NULL>  <NULL>  0 com.apple.authd 
+log_line  log_time  log_level match_index  name  log_part log_idle_msecs log_mark log_comment log_tags log_annotations log_filters 
+ 2 2022-08-16 00:32:15.000 info 0 com.apple.cdscheduler <NULL>  199000 0 <NULL> <NULL> <NULL> <NULL>
+ 5 2022-08-16 00:32:15.000 info 0 com.apple.install <NULL>  0 0 <NULL> <NULL> <NULL> <NULL>
+ 8 2022-08-16 00:32:15.000 info   0 com.apple.authd   <NULL>  0  0  <NULL>  <NULL>  <NULL>  <NULL> 
+ 8 2022-08-16 00:32:15.000 info   1 com.apple.asl   <NULL>  0  0  <NULL>  <NULL>  <NULL>  <NULL> 
+ 8 2022-08-16 00:32:15.000 info 2 com.apple.asl <NULL>  0 0 <NULL> <NULL> <NULL> <NULL>
+ 8 2022-08-16 00:32:15.000 info 3 com.apple.authd <NULL>  0 0 <NULL> <NULL> <NULL> <NULL>
+ 11 2022-08-16 00:32:15.000 info   0 com.apple.authd   <NULL>  0  0  <NULL>  <NULL>  <NULL>  <NULL> 
+ 11 2022-08-16 00:32:15.000 info   1 com.apple.asl   <NULL>  0  0  <NULL>  <NULL>  <NULL>  <NULL> 
+ 11 2022-08-16 00:32:15.000 info 2 com.apple.asl <NULL>  0 0 <NULL> <NULL> <NULL> <NULL>
+ 11 2022-08-16 00:32:15.000 info 3 com.apple.authd <NULL>  0 0 <NULL> <NULL> <NULL> <NULL>
+ 14 2022-08-16 00:32:15.000 info   0 com.apple.authd   <NULL>  0  0  <NULL>  <NULL>  <NULL>  <NULL> 
diff --git a/test/expected/test_sql_search_table.sh_5aaae556ecb1661602f176215e28f661d3404032.out b/test/expected/test_sql_search_table.sh_5aaae556ecb1661602f176215e28f661d3404032.out
index 738eab3..ed52844 100644
--- a/test/expected/test_sql_search_table.sh_5aaae556ecb1661602f176215e28f661d3404032.out
+++ b/test/expected/test_sql_search_table.sh_5aaae556ecb1661602f176215e28f661d3404032.out
@@ -1,4 +1,4 @@
-log_line log_part  log_time log_idle_msecs log_level log_mark log_comment log_tags log_filters match_index user pid cpu_pct mem_pct vsz rss tty stat start_time cpu_time  cmd  cmd_name cmd_args 
- 0  <NULL> 2022-06-02 00:01:01.000  0 info   0  <NULL>  <NULL>  <NULL>  1 root  2  0  0  0  0 ?  S  Jun01  0:00  [kthreadd] [kthreadd]  <NULL> 
- 12  <NULL> 2022-06-02 00:02:01.000  60000 info   0  <NULL>  <NULL>  <NULL>  1 root  2  0  0  0  0 ?  S  Jun01  0:00  [kthreadd] [kthreadd]  <NULL>
- 30  <NULL> 2022-06-02 00:03:01.000  60000 info   0  <NULL>  <NULL>  <NULL>  1 root  2  0  0  0  0 ?  S  Jun01  0:00  [kthreadd] [kthreadd]  <NULL> 
+log_line  log_time  log_level match_index user  ppid  pid  cpu_pct   mem_pct   vsz   rss  tty stat start_time cpu_time maj_flt min_flt  cmd   cmd_name  cmd_args log_part log_idle_msecs log_mark log_comment log_tags log_annotations log_filters 
+ 0 2022-06-02 00:01:01.000 info 1 root <NULL> 2  0  0  0  0 ? S Jun01 0:00 <NULL> <NULL> [kthreadd] [kthreadd] <NULL> <NULL>  0 0 <NULL> <NULL> <NULL> <NULL>
+ 12 2022-06-02 00:02:01.000 info 1 root <NULL> 2  0  0  0  0 ? S Jun01 0:00 <NULL> <NULL> [kthreadd] [kthreadd] <NULL> <NULL>  60000 0 <NULL> <NULL> <NULL> <NULL>
+ 30 2022-06-02 00:03:01.000 info   1 root <NULL>  2  0  0  0  0 ?  S  Jun01  0:00   <NULL>  <NULL> [kthreadd] [kthreadd]  <NULL>  <NULL>  60000  0  <NULL>  <NULL>  <NULL>  <NULL> 
diff --git a/test/expected/test_sql_search_table.sh_df0fd242f57a96d40f466493938cda0789a094fa.out b/test/expected/test_sql_search_table.sh_df0fd242f57a96d40f466493938cda0789a094fa.out
index 326fcbd..7fa2742 100644
--- a/test/expected/test_sql_search_table.sh_df0fd242f57a96d40f466493938cda0789a094fa.out
+++ b/test/expected/test_sql_search_table.sh_df0fd242f57a96d40f466493938cda0789a094fa.out
@@ -1,24 +1,24 @@
-log_line log_part  log_time log_idle_msecs log_level log_mark log_comment log_tags log_filters match_index user pid cpu_pct mem_pct  vsz rss tty stat start_time cpu_time  cmd  cmd_name  cmd_args 
- 0  <NULL> 2022-06-02 00:01:01.000  0 info   0  <NULL>  <NULL>  <NULL>  0 root  1  0  0 158392 7792 ?  Ss  Jun01  0:14  /lib/systemd/systemd --switched-root --system --deserialize 16 /lib/systemd/systemd  --switched-root --system --deserialize 16 
- 0 <NULL> 2022-06-02 00:01:01.000 0 info 0 <NULL> <NULL> <NULL> 1 root 2 0 0 0 0 ? S Jun01 0:00 [kthreadd] [kthreadd] <NULL>
- 0  <NULL> 2022-06-02 00:01:01.000  0 info   0  <NULL>  <NULL>  <NULL>  2 root  3  0  0  0  0 ?  I<  Jun01  0:00  [rcu_gp]  [rcu_gp]  <NULL> 
- 0 <NULL> 2022-06-02 00:01:01.000 0 info 0 <NULL> <NULL> <NULL> 3 root 4 0 0 0 0 ? I< Jun01 0:00 [rcu_par_gp] [rcu_par_gp] <NULL>
- 0  <NULL> 2022-06-02 00:01:01.000  0 info   0  <NULL>  <NULL>  <NULL>  4 root  6  0  0  0  0 ?  I<  Jun01  0:00  [kworker/0:0H-kblockd]  [kworker/0:0H-kblockd] <NULL> 
- 12  <NULL> 2022-06-02 00:02:01.000  60000 info   0  <NULL>  <NULL>  <NULL>  0 root  1  0  0 158392 7792 ?  Ss  Jun01  0:14  /lib/systemd/systemd --switched-root --system --deserialize 16 /lib/systemd/systemd  --switched-root --system --deserialize 16
- 12  <NULL> 2022-06-02 00:02:01.000  60000 info   0  <NULL>  <NULL>  <NULL>  1 root  2  0  0  0  0 ?  S  Jun01  0:00  [kthreadd]  [kthreadd]  <NULL> 
- 12  <NULL> 2022-06-02 00:02:01.000  60000 info   0  <NULL> <NULL> <NULL> 2 root 3 0 0 0 0 ? I< Jun01 0:00 [rcu_gp] [rcu_gp] <NULL>
- 12  <NULL> 2022-06-02 00:02:01.000  60000 info   0  <NULL>  <NULL>  <NULL>  3 root  4  0  0  0  0 ?  I<  Jun01  0:00  [rcu_par_gp]  [rcu_par_gp]  <NULL> 
- 12  <NULL> 2022-06-02 00:02:01.000  60000 info   0  <NULL> <NULL> <NULL> 4 root 6 0 0 0 0 ? I< Jun01 0:00 [kworker/0:0H-kblockd] [kworker/0:0H-kblockd] <NULL>
- 12  <NULL> 2022-06-02 00:02:01.000  60000 info   0  <NULL>  <NULL>  <NULL>  5 root  8  0  0  0  0 ?  I<  Jun01  0:00  [mm_percpu_wq]  [mm_percpu_wq]  <NULL> 
- 12  <NULL> 2022-06-02 00:02:01.000  60000 info   0  <NULL> <NULL> <NULL> 6 root 9 0 0 0 0 ? S Jun01 0:00 [ksoftirqd/0] [ksoftirqd/0] <NULL>
- 12  <NULL> 2022-06-02 00:02:01.000  60000 info   0  <NULL>  <NULL>  <NULL>  7 root  10  0  0  0  0 ?  I  Jun01  0:23  [rcu_sched]  [rcu_sched]  <NULL> 
- 12  <NULL> 2022-06-02 00:02:01.000  60000 info   0  <NULL> <NULL> <NULL> 8 root 11 0 0 0 0 ? I Jun01 0:00 [rcu_bh] [rcu_bh] <NULL>
- 12  <NULL> 2022-06-02 00:02:01.000  60000 info   0  <NULL>  <NULL>  <NULL>  9 root  12  0  0  0  0 ?  S  Jun01  0:00  [migration/0]  [migration/0]  <NULL> 
- 12  <NULL> 2022-06-02 00:02:01.000  60000 info   0  <NULL> <NULL> <NULL> 10 root 14 0 0 0 0 ? S Jun01 0:00 [cpuhp/0] [cpuhp/0] <NULL>
- 30  <NULL> 2022-06-02 00:03:01.000  60000 info   0  <NULL>  <NULL>  <NULL>  0 root  1  0  0 158392 7792 ?  Ss  Jun01  0:14  /lib/systemd/systemd --switched-root --system --deserialize 16 /lib/systemd/systemd  --switched-root --system --deserialize 16 
- 30  <NULL> 2022-06-02 00:03:01.000  60000 info   0  <NULL> <NULL> <NULL> 1 root 2 0 0 0 0 ? S Jun01 0:00 [kthreadd] [kthreadd] <NULL>
- 30  <NULL> 2022-06-02 00:03:01.000  60000 info   0  <NULL>  <NULL>  <NULL>  2 root  3  0  0  0  0 ?  I<  Jun01  0:00  [rcu_gp]  [rcu_gp]  <NULL> 
- 30  <NULL> 2022-06-02 00:03:01.000  60000 info   0  <NULL> <NULL> <NULL> 3 root 4 0 0 0 0 ? I< Jun01 0:00 [rcu_par_gp] [rcu_par_gp] <NULL>
- 30  <NULL> 2022-06-02 00:03:01.000  60000 info   0  <NULL>  <NULL>  <NULL>  4 root  6  0  0  0  0 ?  I<  Jun01  0:00  [kworker/0:0H-kblockd]  [kworker/0:0H-kblockd] <NULL> 
- 30  <NULL> 2022-06-02 00:03:01.000  60000 info   0  <NULL> <NULL> <NULL> 5 root 8 0 0 0 0 ? I< Jun01 0:00 [mm_percpu_wq] [mm_percpu_wq] <NULL>
- 30  <NULL> 2022-06-02 00:03:01.000  60000 info   0  <NULL>  <NULL>  <NULL>  6 root  9  0  0  0  0 ?  S  Jun01  0:00  [ksoftirqd/0]  [ksoftirqd/0]  <NULL> 
+log_line  log_time  log_level match_index user  ppid  pid  cpu_pct   mem_pct   vsz   rss  tty stat start_time cpu_time maj_flt min_flt  cmd   cmd_name   cmd_args  log_part log_idle_msecs log_mark log_comment log_tags log_annotations log_filters 
+ 0 2022-06-02 00:01:01.000 info 0 root <NULL> 1  0  0  158392  7792 ? Ss Jun01 0:14 <NULL> <NULL> /lib/systemd/systemd --switched-root --system --deserialize 16 /lib/systemd/systemd --switched-root --system --deserialize 16 <NULL>  0 0 <NULL> <NULL> <NULL> <NULL>
+ 0 2022-06-02 00:01:01.000 info 1 root <NULL> 2  0  0  0  0 ? S Jun01 0:00 <NULL> <NULL> [kthreadd] [kthreadd] <NULL> <NULL>  0 0 <NULL> <NULL> <NULL> <NULL>
+ 0 2022-06-02 00:01:01.000 info   2 root <NULL>  3  0  0  0  0 ?  I<  Jun01  0:00   <NULL>  <NULL> [rcu_gp]  [rcu_gp]  <NULL>   <NULL>  0  0  <NULL>  <NULL>  <NULL>  <NULL> 
+ 0 2022-06-02 00:01:01.000 info   3 root <NULL>  4  0  0  0  0 ?  I<  Jun01  0:00   <NULL>  <NULL> [rcu_par_gp]  [rcu_par_gp]  <NULL>   <NULL>  0  0  <NULL>  <NULL>  <NULL>  <NULL> 
+ 0 2022-06-02 00:01:01.000 info 4 root <NULL> 6  0  0  0  0 ? I< Jun01 0:00 <NULL> <NULL> [kworker/0:0H-kblockd] [kworker/0:0H-kblockd] <NULL> <NULL>  0 0 <NULL> <NULL> <NULL> <NULL>
+ 12 2022-06-02 00:02:01.000 info 0 root <NULL> 1  0  0  158392  7792 ? Ss Jun01 0:14 <NULL> <NULL> /lib/systemd/systemd --switched-root --system --deserialize 16 /lib/systemd/systemd --switched-root --system --deserialize 16 <NULL>  60000 0 <NULL> <NULL> <NULL> <NULL>
+ 12 2022-06-02 00:02:01.000 info   1 root <NULL>  2  0  0  0  0 ?  S  Jun01  0:00   <NULL>  <NULL> [kthreadd]  [kthreadd]  <NULL>   <NULL>  60000  0  <NULL>  <NULL>  <NULL>  <NULL> 
+ 12 2022-06-02 00:02:01.000 info   2 root <NULL>  3  0  0  0  0 ?  I<  Jun01  0:00   <NULL>  <NULL> [rcu_gp]  [rcu_gp]  <NULL>   <NULL>  60000  0  <NULL>  <NULL>  <NULL>  <NULL> 
+ 12 2022-06-02 00:02:01.000 info 3 root <NULL> 4  0  0  0  0 ? I< Jun01 0:00 <NULL> <NULL> [rcu_par_gp] [rcu_par_gp] <NULL> <NULL>  60000 0 <NULL> <NULL> <NULL> <NULL>
+ 12 2022-06-02 00:02:01.000 info 4 root <NULL> 6  0  0  0  0 ? I< Jun01 0:00 <NULL> <NULL> [kworker/0:0H-kblockd] [kworker/0:0H-kblockd] <NULL> <NULL>  60000 0 <NULL> <NULL> <NULL> <NULL>
+ 12 2022-06-02 00:02:01.000 info   5 root <NULL>  8  0  0  0  0 ?  I<  Jun01  0:00   <NULL>  <NULL> [mm_percpu_wq]  [mm_percpu_wq]  <NULL>   <NULL>  60000  0  <NULL>  <NULL>  <NULL>  <NULL> 
+ 12 2022-06-02 00:02:01.000 info   6 root <NULL>  9  0  0  0  0 ?  S  Jun01  0:00   <NULL>  <NULL> [ksoftirqd/0]  [ksoftirqd/0]  <NULL>   <NULL>  60000  0  <NULL>  <NULL>  <NULL>  <NULL> 
+ 12 2022-06-02 00:02:01.000 info 7 root <NULL> 10  0  0  0  0 ? I Jun01 0:23 <NULL> <NULL> [rcu_sched] [rcu_sched] <NULL> <NULL>  60000 0 <NULL> <NULL> <NULL> <NULL>
+ 12 2022-06-02 00:02:01.000 info 8 root <NULL> 11  0  0  0  0 ? I Jun01 0:00 <NULL> <NULL> [rcu_bh] [rcu_bh] <NULL> <NULL>  60000 0 <NULL> <NULL> <NULL> <NULL>
+ 12 2022-06-02 00:02:01.000 info   9 root <NULL>  12  0  0  0  0 ?  S  Jun01  0:00   <NULL>  <NULL> [migration/0]  [migration/0]  <NULL>   <NULL>  60000  0  <NULL>  <NULL>  <NULL>  <NULL> 
+ 12 2022-06-02 00:02:01.000 info   10 root <NULL>  14  0  0  0  0 ?  S  Jun01  0:00   <NULL>  <NULL> [cpuhp/0]  [cpuhp/0]  <NULL>   <NULL>  60000  0  <NULL>  <NULL>  <NULL>  <NULL> 
+ 30 2022-06-02 00:03:01.000 info 0 root <NULL> 1  0  0  158392  7792 ? Ss Jun01 0:14 <NULL> <NULL> /lib/systemd/systemd --switched-root --system --deserialize 16 /lib/systemd/systemd --switched-root --system --deserialize 16 <NULL>  60000 0 <NULL> <NULL> <NULL> <NULL>
+ 30 2022-06-02 00:03:01.000 info 1 root <NULL> 2  0  0  0  0 ? S Jun01 0:00 <NULL> <NULL> [kthreadd] [kthreadd] <NULL> <NULL>  60000 0 <NULL> <NULL> <NULL> <NULL>
+ 30 2022-06-02 00:03:01.000 info   2 root <NULL>  3  0  0  0  0 ?  I<  Jun01  0:00   <NULL>  <NULL> [rcu_gp]  [rcu_gp]  <NULL>   <NULL>  60000  0  <NULL>  <NULL>  <NULL>  <NULL> 
+ 30 2022-06-02 00:03:01.000 info   3 root <NULL>  4  0  0  0  0 ?  I<  Jun01  0:00   <NULL>  <NULL> [rcu_par_gp]  [rcu_par_gp]  <NULL>   <NULL>  60000  0  <NULL>  <NULL>  <NULL>  <NULL> 
+ 30 2022-06-02 00:03:01.000 info 4 root <NULL> 6  0  0  0  0 ? I< Jun01 0:00 <NULL> <NULL> [kworker/0:0H-kblockd] [kworker/0:0H-kblockd] <NULL> <NULL>  60000 0 <NULL> <NULL> <NULL> <NULL>
+ 30 2022-06-02 00:03:01.000 info 5 root <NULL> 8  0  0  0  0 ? I< Jun01 0:00 <NULL> <NULL> [mm_percpu_wq] [mm_percpu_wq] <NULL> <NULL>  60000 0 <NULL> <NULL> <NULL> <NULL>
+ 30 2022-06-02 00:03:01.000 info   6 root <NULL>  9  0  0  0  0 ?  S  Jun01  0:00   <NULL>  <NULL> [ksoftirqd/0]  [ksoftirqd/0]  <NULL>   <NULL>  60000  0  <NULL>  <NULL>  <NULL>  <NULL> 
diff --git a/test/expected/test_sql_search_table.sh_ef9373a76853f345d06234f6e0fe11b5d40da27b.out b/test/expected/test_sql_search_table.sh_ef9373a76853f345d06234f6e0fe11b5d40da27b.out
index 767d785..263723f 100644
--- a/test/expected/test_sql_search_table.sh_ef9373a76853f345d06234f6e0fe11b5d40da27b.out
+++ b/test/expected/test_sql_search_table.sh_ef9373a76853f345d06234f6e0fe11b5d40da27b.out
@@ -1,6 +1,6 @@
-log_line log_part  log_time log_idle_msecs log_level log_mark log_comment log_tags log_filters  comp  opid  tid  user  item prc reason  req  sid  src  sub vpxa_update  line  file match_index  lro_id  entity  operation  SessionId  SessionSubId  log_body 
- 0  <NULL> 2022-06-02 11:58:12.193  0 info   0  <NULL>  <NULL>  <NULL> <NULL> 7e1280cf  45715 <NULL> <NULL> vpxd <NULL> <NULL> <NULL> Originator@6876 vpxLro  <NULL> <NULL> <NULL>  0 lro-846063 SessionManager  vim.SessionManager.sessionIsActive  528e6e0c-246d-58b5-3234-278c6e0c5d0d 52c289ac-2563-48d5-8a8e-f178da022c0d [VpxLRO] -- BEGIN lro-846063 -- SessionManager -- vim.Sessio⋯8b5-3234-278c6e0c5d0d(52c289ac-2563-48d5-8a8e-f178da022c0d) 
- 2  <NULL> 2022-06-02 11:58:12.376  182 info   0  <NULL>  <NULL>  <NULL> <NULL> e3979f6  45709 <NULL> <NULL> vpxd <NULL> <NULL> <NULL> Originator@6876 vpxLro  <NULL> <NULL> <NULL>  0 lro-846064 SessionManager  vim.SessionManager.sessionIsActive  52626140-422b-6287-b4e4-344192c6a01d 523e0a4b-6e83-6bcd-9342-22502dd89866 [VpxLRO] -- BEGIN lro-846064 -- SessionManager -- vim.Sessio⋯287-b4e4-344192c6a01d(523e0a4b-6e83-6bcd-9342-22502dd89866)
- 4  <NULL> 2022-06-02 11:58:12.623  246 info   0  <NULL>  <NULL>  <NULL> <NULL> l3wrhr4o-cbf-h5:70001034-60 47524 <NULL> <NULL> vpxd <NULL> <NULL> <NULL> Originator@6876 vpxLro  <NULL> <NULL> <NULL>  0 lro-846066 ChangeLogCollector vim.cdc.ChangeLogCollector.waitForChanges 526861fc-0c28-1930-ae5e-d8c2772bf8c2 52a7a308-9646-c054-f1e7-16131c1a7db6 [VpxLRO] -- BEGIN lro-846066 -- ChangeLogCollector -- vim.c⋯1930-ae5e-d8c2772bf8c2(52a7a308-9646-c054-f1e7-16131c1a7db6) 
- 6  <NULL> 2022-06-02 11:58:12.736  113 info   0  <NULL>  <NULL>  <NULL> <NULL> 499b440  48432 <NULL> <NULL> vpxd <NULL> <NULL> <NULL> Originator@6876 vpxLro  <NULL> <NULL> <NULL>  0 lro-846067 SessionManager vim.SessionManager.sessionIsActive 521fe9f6-d061-11a2-ac86-badb3c071373 524cba9b-2cc4-9b70-32e4-421452a404d7 [VpxLRO] -- BEGIN lro-846067 -- SessionManager -- vim.Sessio⋯1a2-ac86-badb3c071373(524cba9b-2cc4-9b70-32e4-421452a404d7)
- 8  <NULL> 2022-06-02 11:58:12.740  4 info   0  <NULL>  <NULL>  <NULL> <NULL> 55a419df  48035 <NULL> <NULL> vpxd <NULL> <NULL> <NULL> Originator@6876 vpxLro  <NULL> <NULL> <NULL>  0 lro-846068 SessionManager  vim.SessionManager.sessionIsActive  52585600-b0bc-76b1-c4d5-4d7708671c5e 523b68ba-e312-9909-a3ca-39cc86aaf206 [VpxLRO] -- BEGIN lro-846068 -- SessionManager -- vim.Sessio⋯6b1-c4d5-4d7708671c5e(523b68ba-e312-9909-a3ca-39cc86aaf206) 
+log_line  log_time  log_level  comp   opid   tid   user   file   item   line  prc  reason  req   sid   src   sub  vpxa_update match_index  lro_id   entity   operation   SessionId   SessionSubId  log_part log_idle_msecs log_mark log_comment log_tags log_annotations log_filters  log_body  
+ 0 2022-06-02 11:58:12.193 info <NULL> 7e1280cf 45715 <NULL> <NULL> <NULL> <NULL> vpxd <NULL> <NULL> <NULL> Originator@6876 vpxLro <NULL> 0 lro-846063 SessionManager vim.SessionManager.sessionIsActive 528e6e0c-246d-58b5-3234-278c6e0c5d0d 52c289ac-2563-48d5-8a8e-f178da022c0d <NULL>  0 0 <NULL> <NULL> <NULL> <NULL> [VpxLRO] -- BEGIN lro-846063 -- SessionManager -- vim.Sessio⋯8b5-3234-278c6e0c5d0d(52c289ac-2563-48d5-8a8e-f178da022c0d)
+ 2 2022-06-02 11:58:12.376 info <NULL> e3979f6 45709 <NULL> <NULL> <NULL> <NULL> vpxd <NULL> <NULL> <NULL> Originator@6876 vpxLro <NULL> 0 lro-846064 SessionManager vim.SessionManager.sessionIsActive 52626140-422b-6287-b4e4-344192c6a01d 523e0a4b-6e83-6bcd-9342-22502dd89866 <NULL>   182 0 <NULL> <NULL> <NULL> <NULL> [VpxLRO] -- BEGIN lro-846064 -- SessionManager -- vim.Sessio⋯287-b4e4-344192c6a01d(523e0a4b-6e83-6bcd-9342-22502dd89866)
+ 4 2022-06-02 11:58:12.623 info  <NULL> l3wrhr4o-cbf-h5:70001034-60 47524 <NULL> <NULL> <NULL> <NULL> vpxd <NULL> <NULL> <NULL> Originator@6876 vpxLro  <NULL>  0 lro-846066 ChangeLogCollector vim.cdc.ChangeLogCollector.waitForChanges 526861fc-0c28-1930-ae5e-d8c2772bf8c2 52a7a308-9646-c054-f1e7-16131c1a7db6  <NULL>  246  0  <NULL>  <NULL>  <NULL>  <NULL> [VpxLRO] -- BEGIN lro-846066 -- ChangeLogCollector -- vim.c⋯1930-ae5e-d8c2772bf8c2(52a7a308-9646-c054-f1e7-16131c1a7db6) 
+ 6 2022-06-02 11:58:12.736 info  <NULL> 499b440  48432 <NULL> <NULL> <NULL> <NULL> vpxd <NULL> <NULL> <NULL> Originator@6876 vpxLro  <NULL>  0 lro-846067 SessionManager  vim.SessionManager.sessionIsActive  521fe9f6-d061-11a2-ac86-badb3c071373 524cba9b-2cc4-9b70-32e4-421452a404d7  <NULL>   113  0  <NULL>  <NULL>  <NULL>  <NULL> [VpxLRO] -- BEGIN lro-846067 -- SessionManager -- vim.Sessio⋯1a2-ac86-badb3c071373(524cba9b-2cc4-9b70-32e4-421452a404d7) 
+ 8 2022-06-02 11:58:12.740 info <NULL> 55a419df 48035 <NULL> <NULL> <NULL> <NULL> vpxd <NULL> <NULL> <NULL> Originator@6876 vpxLro <NULL> 0 lro-846068 SessionManager vim.SessionManager.sessionIsActive 52585600-b0bc-76b1-c4d5-4d7708671c5e 523b68ba-e312-9909-a3ca-39cc86aaf206 <NULL>   4 0 <NULL> <NULL> <NULL> <NULL> [VpxLRO] -- BEGIN lro-846068 -- SessionManager -- vim.Sessio⋯6b1-c4d5-4d7708671c5e(523b68ba-e312-9909-a3ca-39cc86aaf206)
diff --git a/test/expected/test_sql_str_func.sh_00363f89638cb968584afc1ca0a4f52b2cf7a2ae.err b/test/expected/test_sql_str_func.sh_00363f89638cb968584afc1ca0a4f52b2cf7a2ae.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql_str_func.sh_00363f89638cb968584afc1ca0a4f52b2cf7a2ae.err
diff --git a/test/expected/test_sql_str_func.sh_00363f89638cb968584afc1ca0a4f52b2cf7a2ae.out b/test/expected/test_sql_str_func.sh_00363f89638cb968584afc1ca0a4f52b2cf7a2ae.out
new file mode 100644
index 0000000..2bc4087
--- /dev/null
+++ b/test/expected/test_sql_str_func.sh_00363f89638cb968584afc1ca0a4f52b2cf7a2ae.out
@@ -0,0 +1,2 @@
+Row 0:
+ Column parse_url('https://example.com/sea%26rch?flag&flag2&=def&flag3=abc+def#frag1%20space'): {"scheme":"https","username":null,"password":null,"host":"example.com","port":null,"path":"/sea&rch","query":"flag&flag2&=def&flag3=abc+def","parameters":{"flag":null,"flag2":null,"":"def","flag3":"abc def"},"fragment":"frag1 space"}
diff --git a/test/expected/test_sql_str_func.sh_0947bfe7ec626eaa0409a45b10fcbb634fb12eb7.out b/test/expected/test_sql_str_func.sh_0947bfe7ec626eaa0409a45b10fcbb634fb12eb7.out
index e144653..49ed7e2 100644
--- a/test/expected/test_sql_str_func.sh_0947bfe7ec626eaa0409a45b10fcbb634fb12eb7.out
+++ b/test/expected/test_sql_str_func.sh_0947bfe7ec626eaa0409a45b10fcbb634fb12eb7.out
@@ -1,2 +1,2 @@
Row 0:
- Column parse_url('https://example.com/'): {"scheme":"https","user":null,"password":null,"host":"example.com","port":null,"path":"/","query":null,"parameters":null,"fragment":null}
+ Column parse_url('https://example.com/'): {"scheme":"https","username":null,"password":null,"host":"example.com","port":null,"path":"/","query":null,"parameters":null,"fragment":null}
diff --git a/test/expected/test_sql_str_func.sh_0db1c1b406ba6ef2dadcbe90a3fdbe794a664eb5.err b/test/expected/test_sql_str_func.sh_0db1c1b406ba6ef2dadcbe90a3fdbe794a664eb5.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql_str_func.sh_0db1c1b406ba6ef2dadcbe90a3fdbe794a664eb5.err
diff --git a/test/expected/test_sql_str_func.sh_0db1c1b406ba6ef2dadcbe90a3fdbe794a664eb5.out b/test/expected/test_sql_str_func.sh_0db1c1b406ba6ef2dadcbe90a3fdbe794a664eb5.out
new file mode 100644
index 0000000..bda6691
--- /dev/null
+++ b/test/expected/test_sql_str_func.sh_0db1c1b406ba6ef2dadcbe90a3fdbe794a664eb5.out
@@ -0,0 +1,2 @@
+humanize_id('foo') humanize_id('bar') 
+foo bar
diff --git a/test/expected/test_sql_str_func.sh_11d458fdadd00df1239a0eeaac049abb49ed212d.out b/test/expected/test_sql_str_func.sh_11d458fdadd00df1239a0eeaac049abb49ed212d.out
index eea58f2..7d625dd 100644
--- a/test/expected/test_sql_str_func.sh_11d458fdadd00df1239a0eeaac049abb49ed212d.out
+++ b/test/expected/test_sql_str_func.sh_11d458fdadd00df1239a0eeaac049abb49ed212d.out
@@ -1,198 +1,198 @@
-anonymize(bro_id_resp_h)
+anonymize(bro_id_resp_h) 
10.0.0.1
10.0.0.2
+10.0.0.2 
+10.0.0.2 
10.0.0.2
10.0.0.2
-10.0.0.2
-10.0.0.2
-10.0.0.2
-10.0.0.3
+10.0.0.2 
+10.0.0.3 
10.0.0.4
10.0.0.1
-10.0.0.4
-10.0.0.4
+10.0.0.4 
+10.0.0.4 
10.0.0.5
10.0.0.4
-10.0.0.4
-10.0.0.1
+10.0.0.4 
+10.0.0.1 
10.0.0.6
10.0.0.4
-10.0.0.7
-10.0.0.8
-10.0.0.8
+10.0.0.7 
+10.0.0.8 
10.0.0.8
10.0.0.8
+10.0.0.8 
+10.0.0.8 
10.0.0.8
10.0.0.8
-10.0.0.8
-10.0.0.8
-10.0.0.9
+10.0.0.8 
+10.0.0.9 
10.0.0.10
10.0.0.5
+10.0.0.11 
+10.0.0.11 
10.0.0.11
10.0.0.11
-10.0.0.11
-10.0.0.11
-10.0.0.11
-10.0.0.11
+10.0.0.11 
+10.0.0.11 
10.0.0.5
10.0.0.11
+10.0.0.11 
+10.0.0.11 
10.0.0.11
10.0.0.11
+10.0.0.11 
+10.0.0.11 
10.0.0.11
10.0.0.11
-10.0.0.11
-10.0.0.11
-10.0.0.11
-10.0.0.11
-10.0.0.11
-10.0.0.5
+10.0.0.11 
+10.0.0.5 
10.0.0.10
10.0.0.6
-10.0.0.12
-10.0.0.1
+10.0.0.12 
+10.0.0.1 
10.0.0.1
10.0.0.6
-10.0.0.11
-10.0.0.11
+10.0.0.11 
+10.0.0.11 
10.0.0.13
10.0.0.6
-10.0.0.11
-10.0.0.11
+10.0.0.11 
+10.0.0.11 
10.0.0.11
10.0.0.13
+10.0.0.6 
+10.0.0.6 
10.0.0.6
10.0.0.6
+10.0.0.6 
+10.0.0.6 
10.0.0.6
10.0.0.6
-10.0.0.6
-10.0.0.6
-10.0.0.6
-10.0.0.6
-10.0.0.14
-10.0.0.6
+10.0.0.14 
+10.0.0.6 
10.0.0.14
10.0.0.15
-10.0.0.16
-10.0.0.6
+10.0.0.16 
+10.0.0.6 
10.0.0.16
10.0.0.17
-10.0.0.5
-10.0.0.1
+10.0.0.5 
+10.0.0.1 
10.0.0.17
10.0.0.15
-10.0.0.17
-10.0.0.18
+10.0.0.17 
+10.0.0.18 
10.0.0.18
10.0.0.10
-10.0.0.5
-10.0.0.11
-10.0.0.11
-10.0.0.11
-10.0.0.11
-10.0.0.11
+10.0.0.5 
+10.0.0.11 
10.0.0.11
10.0.0.11
+10.0.0.11 
+10.0.0.11 
10.0.0.11
10.0.0.11
+10.0.0.11 
+10.0.0.11 
10.0.0.18
10.0.0.11
-10.0.0.11
-10.0.0.11
+10.0.0.11 
+10.0.0.11 
10.0.0.18
10.0.0.18
+10.0.0.18 
+10.0.0.19 
10.0.0.18
10.0.0.19
-10.0.0.18
-10.0.0.19
-10.0.0.19
-10.0.0.19
-10.0.0.19
-10.0.0.19
+10.0.0.19 
+10.0.0.19 
10.0.0.19
10.0.0.19
+10.0.0.19 
+10.0.0.19 
10.0.0.19
10.0.0.20
-10.0.0.20
-10.0.0.21
+10.0.0.20 
+10.0.0.21 
10.0.0.18
10.0.0.18
-10.0.0.22
-10.0.0.6
-10.0.0.5
-10.0.0.5
+10.0.0.22 
+10.0.0.6 
10.0.0.5
10.0.0.5
+10.0.0.5 
+10.0.0.5 
10.0.0.6
10.0.0.23
-10.0.0.24
-10.0.0.23
-10.0.0.23
-10.0.0.23
-10.0.0.23
-10.0.0.23
-10.0.0.23
-10.0.0.23
+10.0.0.24 
+10.0.0.23 
10.0.0.23
10.0.0.23
+10.0.0.23 
+10.0.0.23 
10.0.0.23
10.0.0.23
+10.0.0.23 
+10.0.0.23 
10.0.0.23
10.0.0.23
+10.0.0.23 
+10.0.0.23 
10.0.0.23
10.0.0.24
-10.0.0.24
-10.0.0.24
+10.0.0.24 
+10.0.0.24 
10.0.0.24
10.0.0.25
-10.0.0.26
-10.0.0.27
-10.0.0.23
+10.0.0.26 
+10.0.0.27 
10.0.0.23
10.0.0.23
-10.0.0.25
+10.0.0.23 
+10.0.0.25 
10.0.0.26
10.0.0.24
-10.0.0.24
-10.0.0.27
+10.0.0.24 
+10.0.0.27 
10.0.0.23
10.0.0.25
-10.0.0.26
-10.0.0.24
+10.0.0.26 
+10.0.0.24 
10.0.0.24
10.0.0.27
-10.0.0.25
-10.0.0.26
+10.0.0.25 
+10.0.0.26 
10.0.0.24
10.0.0.24
-10.0.0.27
-10.0.0.28
+10.0.0.27 
+10.0.0.28 
10.0.0.23
10.0.0.25
-10.0.0.24
-10.0.0.24
+10.0.0.24 
+10.0.0.24 
10.0.0.27
10.0.0.26
-10.0.0.23
-10.0.0.25
+10.0.0.23 
+10.0.0.25 
10.0.0.26
10.0.0.24
-10.0.0.24
-10.0.0.27
-10.0.0.23
-10.0.0.23
-10.0.0.23
+10.0.0.24 
+10.0.0.27 
10.0.0.23
10.0.0.23
+10.0.0.23 
+10.0.0.23 
10.0.0.23
10.0.0.23
+10.0.0.23 
+10.0.0.23 
10.0.0.23
10.0.0.23
-10.0.0.23
-10.0.0.27
-10.0.0.23
+10.0.0.27 
+10.0.0.23 
10.0.0.25
10.0.0.24
-10.0.0.24
-10.0.0.27
+10.0.0.24 
+10.0.0.27 
10.0.0.26
diff --git a/test/expected/test_sql_str_func.sh_1a1e07b6f72bce5402037761fa8afd66c05b4c34.err b/test/expected/test_sql_str_func.sh_1a1e07b6f72bce5402037761fa8afd66c05b4c34.err
new file mode 100644
index 0000000..618c731
--- /dev/null
+++ b/test/expected/test_sql_str_func.sh_1a1e07b6f72bce5402037761fa8afd66c05b4c34.err
@@ -0,0 +1 @@
+error: sqlite3_exec failed -- lnav-error:{"level":"error","message":{"str":"unexpected JSON value","attrs":[]},"reason":{"str":"","attrs":[]},"snippets":[{"source":"arg","line":1,"content":{"str":"123","attrs":[{"start":0,"end":-1,"type":"role","value":42}]}}],"notes":[],"help":{"str":"Available Properties\n scheme \n username \n password \n host \n port \n path \n query \n parameters/ \n fragment","attrs":[{"start":0,"end":20,"type":"role","value":64},{"start":23,"end":29,"type":"role","value":49},{"start":33,"end":41,"type":"role","value":49},{"start":45,"end":53,"type":"role","value":49},{"start":57,"end":61,"type":"role","value":49},{"start":65,"end":69,"type":"role","value":49},{"start":73,"end":77,"type":"role","value":49},{"start":81,"end":86,"type":"role","value":49},{"start":90,"end":100,"type":"role","value":49},{"start":100,"end":101,"type":"role","value":49},{"start":105,"end":113,"type":"role","value":49}]}}
diff --git a/test/expected/test_sql_str_func.sh_1a1e07b6f72bce5402037761fa8afd66c05b4c34.out b/test/expected/test_sql_str_func.sh_1a1e07b6f72bce5402037761fa8afd66c05b4c34.out
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql_str_func.sh_1a1e07b6f72bce5402037761fa8afd66c05b4c34.out
diff --git a/test/expected/test_sql_str_func.sh_3855d2cc0ab29171cae8e722f130adec25eae36e.err b/test/expected/test_sql_str_func.sh_3855d2cc0ab29171cae8e722f130adec25eae36e.err
deleted file mode 100644
index e3d40ab..0000000
--- a/test/expected/test_sql_str_func.sh_3855d2cc0ab29171cae8e722f130adec25eae36e.err
+++ /dev/null
@@ -1 +0,0 @@
-error: sqlite3_exec failed -- lnav-error:{"level":"error","message":{"str":"invalid URL: “https://bad@[fe::”","attrs":[]},"reason":{"str":"Port number was not a decimal number between 0 and 65535","attrs":[]},"snippets":[],"help":{"str":"","attrs":[]}}
diff --git a/test/expected/test_sql_str_func.sh_51766b600fd158a9e0677f6b0fa31b83537b2e5b.out b/test/expected/test_sql_str_func.sh_51766b600fd158a9e0677f6b0fa31b83537b2e5b.out
index 061b9ed..5576c1f 100644
--- a/test/expected/test_sql_str_func.sh_51766b600fd158a9e0677f6b0fa31b83537b2e5b.out
+++ b/test/expected/test_sql_str_func.sh_51766b600fd158a9e0677f6b0fa31b83537b2e5b.out
@@ -1,2 +1,2 @@
Row 0:
- Column parse_url('https://example.com/search?flag&flag2&=def'): {"scheme":"https","user":null,"password":null,"host":"example.com","port":null,"path":"/search","query":"flag&flag2&=def","parameters":{"flag":null,"flag2":null,"":"def"},"fragment":null}
+ Column parse_url('https://example.com/search?flag&flag2&=def'): {"scheme":"https","username":null,"password":null,"host":"example.com","port":null,"path":"/search","query":"flag&flag2&=def","parameters":{"flag":null,"flag2":null,"":"def"},"fragment":null}
diff --git a/test/expected/test_sql_str_func.sh_57fc889eefb98571ecf3892ad670646613bf13a3.err b/test/expected/test_sql_str_func.sh_57fc889eefb98571ecf3892ad670646613bf13a3.err
new file mode 100644
index 0000000..306ed4b
--- /dev/null
+++ b/test/expected/test_sql_str_func.sh_57fc889eefb98571ecf3892ad670646613bf13a3.err
@@ -0,0 +1 @@
+error: sqlite3_exec failed -- lnav-error:{"level":"warning","message":{"str":"unexpected value for property “/unknown”","attrs":[{"start":33,"end":41,"type":"role","value":49}]},"reason":{"str":"","attrs":[]},"snippets":[{"source":"arg","line":1,"content":{"str":"{\"unknown\":\"abc\"}","attrs":[{"start":0,"end":-1,"type":"role","value":42}]}}],"notes":[],"help":{"str":"Available Properties\n scheme \n username \n password \n host \n port \n path \n query \n parameters/ \n fragment","attrs":[{"start":0,"end":20,"type":"role","value":64},{"start":23,"end":29,"type":"role","value":49},{"start":33,"end":41,"type":"role","value":49},{"start":45,"end":53,"type":"role","value":49},{"start":57,"end":61,"type":"role","value":49},{"start":65,"end":69,"type":"role","value":49},{"start":73,"end":77,"type":"role","value":49},{"start":81,"end":86,"type":"role","value":49},{"start":90,"end":100,"type":"role","value":49},{"start":100,"end":101,"type":"role","value":49},{"start":105,"end":113,"type":"role","value":49}]}}
diff --git a/test/expected/test_sql_str_func.sh_57fc889eefb98571ecf3892ad670646613bf13a3.out b/test/expected/test_sql_str_func.sh_57fc889eefb98571ecf3892ad670646613bf13a3.out
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql_str_func.sh_57fc889eefb98571ecf3892ad670646613bf13a3.out
diff --git a/test/expected/test_sql_str_func.sh_68860c50e91cd6c1f2004ee0414a6e930ed42c87.err b/test/expected/test_sql_str_func.sh_68860c50e91cd6c1f2004ee0414a6e930ed42c87.err
new file mode 100644
index 0000000..66d898c
--- /dev/null
+++ b/test/expected/test_sql_str_func.sh_68860c50e91cd6c1f2004ee0414a6e930ed42c87.err
@@ -0,0 +1 @@
+error: sqlite3_exec failed -- lnav-error:{"level":"warning","message":{"str":"unexpected value for property “/#”","attrs":[{"start":33,"end":35,"type":"role","value":49}]},"reason":{"str":"","attrs":[]},"snippets":[{"source":"arg","line":1,"content":{"str":"[1, 2, 3]","attrs":[{"start":0,"end":-1,"type":"role","value":42}]}}],"notes":[],"help":{"str":"Available Properties\n scheme \n username \n password \n host \n port \n path \n query \n parameters/ \n fragment","attrs":[{"start":0,"end":20,"type":"role","value":64},{"start":23,"end":29,"type":"role","value":49},{"start":33,"end":41,"type":"role","value":49},{"start":45,"end":53,"type":"role","value":49},{"start":57,"end":61,"type":"role","value":49},{"start":65,"end":69,"type":"role","value":49},{"start":73,"end":77,"type":"role","value":49},{"start":81,"end":86,"type":"role","value":49},{"start":90,"end":100,"type":"role","value":49},{"start":100,"end":101,"type":"role","value":49},{"start":105,"end":113,"type":"role","value":49}]}}
diff --git a/test/expected/test_sql_str_func.sh_68860c50e91cd6c1f2004ee0414a6e930ed42c87.out b/test/expected/test_sql_str_func.sh_68860c50e91cd6c1f2004ee0414a6e930ed42c87.out
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql_str_func.sh_68860c50e91cd6c1f2004ee0414a6e930ed42c87.out
diff --git a/test/expected/test_sql_str_func.sh_6ac7ab1f90c064944ff66bef5974f050c8227d4b.err b/test/expected/test_sql_str_func.sh_6ac7ab1f90c064944ff66bef5974f050c8227d4b.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql_str_func.sh_6ac7ab1f90c064944ff66bef5974f050c8227d4b.err
diff --git a/test/expected/test_sql_str_func.sh_6ac7ab1f90c064944ff66bef5974f050c8227d4b.out b/test/expected/test_sql_str_func.sh_6ac7ab1f90c064944ff66bef5974f050c8227d4b.out
new file mode 100644
index 0000000..a873544
--- /dev/null
+++ b/test/expected/test_sql_str_func.sh_6ac7ab1f90c064944ff66bef5974f050c8227d4b.out
@@ -0,0 +1,2 @@
+Row 0:
+ Column encode('hi' || char(10), 'hex'): 68690a
diff --git a/test/expected/test_sql_str_func.sh_6ff984d8ed3e5099376d19f0dd20d5fd1ed42494.out b/test/expected/test_sql_str_func.sh_6ff984d8ed3e5099376d19f0dd20d5fd1ed42494.out
index d1dcc93..0a56fcc 100644
--- a/test/expected/test_sql_str_func.sh_6ff984d8ed3e5099376d19f0dd20d5fd1ed42494.out
+++ b/test/expected/test_sql_str_func.sh_6ff984d8ed3e5099376d19f0dd20d5fd1ed42494.out
@@ -1,2 +1,2 @@
Row 0:
- Column parse_url('https://example.com/sea%26rch?flag&flag2&=def#frag1%20space'): {"scheme":"https","user":null,"password":null,"host":"example.com","port":null,"path":"/sea&rch","query":"flag&flag2&=def","parameters":{"flag":null,"flag2":null,"":"def"},"fragment":"frag1 space"}
+ Column parse_url('https://example.com/sea%26rch?flag&flag2&=def#frag1%20space'): {"scheme":"https","username":null,"password":null,"host":"example.com","port":null,"path":"/sea&rch","query":"flag&flag2&=def","parameters":{"flag":null,"flag2":null,"":"def"},"fragment":"frag1 space"}
diff --git a/test/expected/test_sql_str_func.sh_805ca5e97fbf1ed56f2e920befd963255ba190b6.out b/test/expected/test_sql_str_func.sh_805ca5e97fbf1ed56f2e920befd963255ba190b6.out
index 84c7397..01169ce 100644
--- a/test/expected/test_sql_str_func.sh_805ca5e97fbf1ed56f2e920befd963255ba190b6.out
+++ b/test/expected/test_sql_str_func.sh_805ca5e97fbf1ed56f2e920befd963255ba190b6.out
@@ -1,2 +1,2 @@
Row 0:
- Column parse_url('https://example.com/search?flag&flag2'): {"scheme":"https","user":null,"password":null,"host":"example.com","port":null,"path":"/search","query":"flag&flag2","parameters":{"flag":null,"flag2":null},"fragment":null}
+ Column parse_url('https://example.com/search?flag&flag2'): {"scheme":"https","username":null,"password":null,"host":"example.com","port":null,"path":"/search","query":"flag&flag2","parameters":{"flag":null,"flag2":null},"fragment":null}
diff --git a/test/expected/test_sql_str_func.sh_80c1fb9affbfac609ebf1cc5556aafb1ecd223c1.err b/test/expected/test_sql_str_func.sh_80c1fb9affbfac609ebf1cc5556aafb1ecd223c1.err
index a92048a..29338d9 100644
--- a/test/expected/test_sql_str_func.sh_80c1fb9affbfac609ebf1cc5556aafb1ecd223c1.err
+++ b/test/expected/test_sql_str_func.sh_80c1fb9affbfac609ebf1cc5556aafb1ecd223c1.err
@@ -1 +1 @@
-error: sqlite3_exec failed -- lnav-error:{"level":"error","message":{"str":"call to regexp_match(re, str) failed","attrs":[{"start":8,"end":20,"type":"role","value":47},{"start":21,"end":23,"type":"role","value":46},{"start":25,"end":28,"type":"role","value":46},{"start":8,"end":29,"type":"role","value":60}]},"reason":{"str":"regular expression does not have any captures","attrs":[]},"snippets":[],"help":{"str":"","attrs":[]}}
+error: sqlite3_exec failed -- lnav-error:{"level":"error","message":{"str":"call to regexp_match(re, str) failed","attrs":[{"start":8,"end":20,"type":"role","value":49},{"start":21,"end":23,"type":"role","value":48},{"start":25,"end":28,"type":"role","value":48},{"start":8,"end":29,"type":"role","value":65}]},"reason":{"str":"regular expression does not have any captures","attrs":[]},"snippets":[],"notes":[],"help":{"str":"","attrs":[]}}
diff --git a/test/expected/test_sql_str_func.sh_949ffd5b2ef9fbcbe17f2e61ef7750f7038f6fd6.out b/test/expected/test_sql_str_func.sh_949ffd5b2ef9fbcbe17f2e61ef7750f7038f6fd6.out
index f93d348..90daa31 100644
--- a/test/expected/test_sql_str_func.sh_949ffd5b2ef9fbcbe17f2e61ef7750f7038f6fd6.out
+++ b/test/expected/test_sql_str_func.sh_949ffd5b2ef9fbcbe17f2e61ef7750f7038f6fd6.out
@@ -1,2 +1,2 @@
-regexp_match('^(\w+)=([^;]+);', 'abc=def;ghi=jkl;')
+regexp_match('^(\w+)=([^;]+);', 'abc=def;ghi=jkl;') 
{"col_0":"abc","col_1":"def"}
diff --git a/test/expected/test_sql_str_func.sh_a515ba81cc3655c602da28cd0fa1a186d5e9a6e1.err b/test/expected/test_sql_str_func.sh_a515ba81cc3655c602da28cd0fa1a186d5e9a6e1.err
index 475a9b2..7435892 100644
--- a/test/expected/test_sql_str_func.sh_a515ba81cc3655c602da28cd0fa1a186d5e9a6e1.err
+++ b/test/expected/test_sql_str_func.sh_a515ba81cc3655c602da28cd0fa1a186d5e9a6e1.err
@@ -1 +1 @@
-error: sqlite3_exec failed -- lnav-error:{"level":"error","message":{"str":"invalid URL: “https://example.com:100000”","attrs":[]},"reason":{"str":"Port number was not a decimal number between 0 and 65535","attrs":[]},"snippets":[],"help":{"str":"","attrs":[]}}
+error: sqlite3_exec failed -- lnav-error:{"level":"error","message":{"str":"invalid URL: https://example.com:100000","attrs":[{"start":13,"end":39,"type":"role","value":56}]},"reason":{"str":"Port number was not a decimal number between 0 and 65535","attrs":[]},"snippets":[],"notes":[],"help":{"str":"","attrs":[]}}
diff --git a/test/expected/test_sql_str_func.sh_b088735cf46f23ca3d5fb3da41f07a6a3b1cba35.out b/test/expected/test_sql_str_func.sh_b088735cf46f23ca3d5fb3da41f07a6a3b1cba35.out
index e93f55d..7b9ef25 100644
--- a/test/expected/test_sql_str_func.sh_b088735cf46f23ca3d5fb3da41f07a6a3b1cba35.out
+++ b/test/expected/test_sql_str_func.sh_b088735cf46f23ca3d5fb3da41f07a6a3b1cba35.out
@@ -1,2 +1,2 @@
Row 0:
- Column parse_url('https://example.com'): {"scheme":"https","user":null,"password":null,"host":"example.com","port":null,"path":"/","query":null,"parameters":null,"fragment":null}
+ Column parse_url('https://example.com'): {"scheme":"https","username":null,"password":null,"host":"example.com","port":null,"path":"/","query":null,"parameters":null,"fragment":null}
diff --git a/test/expected/test_sql_str_func.sh_b8ebe81c4881f704624a65ec91be0868c310f6ed.err b/test/expected/test_sql_str_func.sh_b8ebe81c4881f704624a65ec91be0868c310f6ed.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql_str_func.sh_b8ebe81c4881f704624a65ec91be0868c310f6ed.err
diff --git a/test/expected/test_sql_str_func.sh_b8ebe81c4881f704624a65ec91be0868c310f6ed.out b/test/expected/test_sql_str_func.sh_b8ebe81c4881f704624a65ec91be0868c310f6ed.out
new file mode 100644
index 0000000..18df174
--- /dev/null
+++ b/test/expected/test_sql_str_func.sh_b8ebe81c4881f704624a65ec91be0868c310f6ed.out
@@ -0,0 +1,2 @@
+Row 0:
+ Column unparse_url(NULL): (null)
diff --git a/test/expected/test_sql_str_func.sh_bac7f6531a2adf70cd1871fb13eab26dff133b7c.out b/test/expected/test_sql_str_func.sh_bac7f6531a2adf70cd1871fb13eab26dff133b7c.out
index daf8e0a..ee5f9c7 100644
--- a/test/expected/test_sql_str_func.sh_bac7f6531a2adf70cd1871fb13eab26dff133b7c.out
+++ b/test/expected/test_sql_str_func.sh_bac7f6531a2adf70cd1871fb13eab26dff133b7c.out
@@ -1,2 +1,2 @@
Row 0:
- Column parse_url('https://example.com/search?flag'): {"scheme":"https","user":null,"password":null,"host":"example.com","port":null,"path":"/search","query":"flag","parameters":{"flag":null},"fragment":null}
+ Column parse_url('https://example.com/search?flag'): {"scheme":"https","username":null,"password":null,"host":"example.com","port":null,"path":"/search","query":"flag","parameters":{"flag":null},"fragment":null}
diff --git a/test/expected/test_sql_str_func.sh_cdc7b869132c33cae3c2565806c2396e1b4d6253.err b/test/expected/test_sql_str_func.sh_cdc7b869132c33cae3c2565806c2396e1b4d6253.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql_str_func.sh_cdc7b869132c33cae3c2565806c2396e1b4d6253.err
diff --git a/test/expected/test_sql_str_func.sh_cdc7b869132c33cae3c2565806c2396e1b4d6253.out b/test/expected/test_sql_str_func.sh_cdc7b869132c33cae3c2565806c2396e1b4d6253.out
new file mode 100644
index 0000000..269441a
--- /dev/null
+++ b/test/expected/test_sql_str_func.sh_cdc7b869132c33cae3c2565806c2396e1b4d6253.out
@@ -0,0 +1,2 @@
+Row 0:
+ Column unparse_url('{}'): (null)
diff --git a/test/expected/test_sql_str_func.sh_d4bc869850f5b7e53353fc2506fea0c8e96f29c5.err b/test/expected/test_sql_str_func.sh_d4bc869850f5b7e53353fc2506fea0c8e96f29c5.err
index f4c8399..c9bad60 100644
--- a/test/expected/test_sql_str_func.sh_d4bc869850f5b7e53353fc2506fea0c8e96f29c5.err
+++ b/test/expected/test_sql_str_func.sh_d4bc869850f5b7e53353fc2506fea0c8e96f29c5.err
@@ -1 +1 @@
-error: sqlite3_exec failed -- Invalid regular expression: missing closing parenthesis
+error: sqlite3_exec failed -- lnav-error:{"level":"error","message":{"str":"“(” is not a valid regular expression","attrs":[]},"reason":{"str":"missing closing parenthesis","attrs":[]},"snippets":[{"source":"pattern","line":0,"content":{"str":"(\n ^ missing closing parenthesis","attrs":[{"start":0,"end":1,"type":"role","value":3},{"start":0,"end":1,"type":"style","value":2359296},{"start":0,"end":1,"type":"role","value":5},{"start":3,"end":5,"type":"role","value":5},{"start":5,"end":32,"type":"role","value":5},{"start":0,"end":-1,"type":"role","value":42}]}}],"notes":[],"help":{"str":"","attrs":[]}}
diff --git a/test/expected/test_sql_str_func.sh_d54a759f5683a22ad289129b2096b80652b1cc0c.out b/test/expected/test_sql_str_func.sh_d54a759f5683a22ad289129b2096b80652b1cc0c.out
index 659abf7..0f59225 100644
--- a/test/expected/test_sql_str_func.sh_d54a759f5683a22ad289129b2096b80652b1cc0c.out
+++ b/test/expected/test_sql_str_func.sh_d54a759f5683a22ad289129b2096b80652b1cc0c.out
@@ -5,16 +5,11 @@
"col_0": [
"VpxLRO"
],
- "col_1": "--",
- "col_2": "BEGIN",
- "col_3": "lro-846063",
- "col_4": "--",
- "col_5": "SessionManager",
- "col_6": "--",
- "col_7": "vim.SessionManager.sessionIsActive",
- "col_8": "--",
- "col_9": "528e6e0c-246d-58b5-3234-278c6e0c5d0d",
- "col_10": [
+ "BEGIN": "lro-846063",
+ "col_1": "SessionManager",
+ "col_2": "vim.SessionManager.sessionIsActive",
+ "col_3": "528e6e0c-246d-58b5-3234-278c6e0c5d0d",
+ "col_4": [
"52c289ac-2563-48d5-8a8e-f178da022c0d"
]
}
@@ -25,22 +20,22 @@
"col_0": [
"VpxLRO"
],
- "col_1": "--",
- "col_2": "FINISH",
- "col_3": "lro-846063"
+ "FINISH": "lro-846063"
}
},
{
"log_body": "Exception was thrown when call vsan-performance-manager for cluster [vim.ClusterComputeResource:domain-c109,Cluster-52] perf metrics: N3Vim5Fault8NotFound9ExceptionE(Fault cause: vim.fault.NotFound\n--> )",
"extract(log_body)": {
- "Exception was thrown when call vsan-performance-manager for cluster [vim.ClusterComputeResource:domain-c109,Cluster-52] perf metrics": {
- "N3Vim5Fault8NotFound9ExceptionE": [
- "Fault cause",
- "vim.fault.NotFound",
- "\n",
- "--",
- ">"
- ]
+ "call": "vsan-performance-manager",
+ "cluster": {
+ "vim.ClusterComputeResource": "domain-c109",
+ "col_0": "Cluster-52"
+ },
+ "col_0": "perf",
+ "metrics": "",
+ "N3Vim5Fault8NotFound9ExceptionE": {
+ "Fault cause": "vim.fault.NotFound",
+ "col_0": ">"
}
}
}
diff --git a/test/expected/test_sql_time_func.sh_42f0fc1a154b0d79b4f6e846f283426be498040f.err b/test/expected/test_sql_time_func.sh_42f0fc1a154b0d79b4f6e846f283426be498040f.err
index 537f7c4..90c4d88 100644
--- a/test/expected/test_sql_time_func.sh_42f0fc1a154b0d79b4f6e846f283426be498040f.err
+++ b/test/expected/test_sql_time_func.sh_42f0fc1a154b0d79b4f6e846f283426be498040f.err
@@ -1 +1 @@
-error: sqlite3_exec failed -- lnav-error:{"level":"error","message":{"str":"call to timeslice(time, slice) failed","attrs":[{"start":8,"end":17,"type":"role","value":47},{"start":18,"end":22,"type":"role","value":46},{"start":24,"end":29,"type":"role","value":46},{"start":8,"end":30,"type":"role","value":60}]},"reason":{"str":"unable to parse time slice value: blah -- Unrecognized input","attrs":[]},"snippets":[],"help":{"str":"","attrs":[]}}
+error: sqlite3_exec failed -- lnav-error:{"level":"error","message":{"str":"call to timeslice(time, slice) failed","attrs":[{"start":8,"end":17,"type":"role","value":49},{"start":18,"end":22,"type":"role","value":48},{"start":24,"end":29,"type":"role","value":48},{"start":8,"end":30,"type":"role","value":65}]},"reason":{"str":"unable to parse time slice value: blah -- Unrecognized input","attrs":[]},"snippets":[],"notes":[],"help":{"str":"","attrs":[]}}
diff --git a/test/expected/test_sql_time_func.sh_4364c7f5354fe108874dd22571115e012303e001.err b/test/expected/test_sql_time_func.sh_4364c7f5354fe108874dd22571115e012303e001.err
new file mode 100644
index 0000000..9d7688e
--- /dev/null
+++ b/test/expected/test_sql_time_func.sh_4364c7f5354fe108874dd22571115e012303e001.err
@@ -0,0 +1,4 @@
+✘ error: call to timezone(tz, ts) failed
+ reason: bad-zone not found in timezone database
+ --> command-option:1
+ | ;SELECT timezone('bad-zone', '2022-03-02T10:20:30.400-0700')
diff --git a/test/expected/test_sql_time_func.sh_4364c7f5354fe108874dd22571115e012303e001.out b/test/expected/test_sql_time_func.sh_4364c7f5354fe108874dd22571115e012303e001.out
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql_time_func.sh_4364c7f5354fe108874dd22571115e012303e001.out
diff --git a/test/expected/test_sql_time_func.sh_63f22db8689c238d51c9b9efe9837147ea5318e6.err b/test/expected/test_sql_time_func.sh_63f22db8689c238d51c9b9efe9837147ea5318e6.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql_time_func.sh_63f22db8689c238d51c9b9efe9837147ea5318e6.err
diff --git a/test/expected/test_sql_time_func.sh_63f22db8689c238d51c9b9efe9837147ea5318e6.out b/test/expected/test_sql_time_func.sh_63f22db8689c238d51c9b9efe9837147ea5318e6.out
new file mode 100644
index 0000000..16f0f98
--- /dev/null
+++ b/test/expected/test_sql_time_func.sh_63f22db8689c238d51c9b9efe9837147ea5318e6.out
@@ -0,0 +1,2 @@
+Row 0:
+ Column timezone('America/Los_Angeles', '2022-04-02T10:20:30.400-0700'): 2022-04-02T10:20:30.400000-0700
diff --git a/test/expected/test_sql_time_func.sh_6fd8504e94688c4e7915f3a9eb5b030713141d03.out b/test/expected/test_sql_time_func.sh_6fd8504e94688c4e7915f3a9eb5b030713141d03.out
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql_time_func.sh_6fd8504e94688c4e7915f3a9eb5b030713141d03.out
diff --git a/test/expected/test_sql_time_func.sh_72862ec9c8f261a8507d237eb673c7ddfaafd898.err b/test/expected/test_sql_time_func.sh_72862ec9c8f261a8507d237eb673c7ddfaafd898.err
index 4180cf6..33e46bd 100644
--- a/test/expected/test_sql_time_func.sh_72862ec9c8f261a8507d237eb673c7ddfaafd898.err
+++ b/test/expected/test_sql_time_func.sh_72862ec9c8f261a8507d237eb673c7ddfaafd898.err
@@ -1 +1 @@
-error: sqlite3_exec failed -- lnav-error:{"level":"error","message":{"str":"call to timeslice(time, slice) failed","attrs":[{"start":8,"end":17,"type":"role","value":47},{"start":18,"end":22,"type":"role","value":46},{"start":24,"end":29,"type":"role","value":46},{"start":8,"end":30,"type":"role","value":60}]},"reason":{"str":"no time slice value given","attrs":[]},"snippets":[],"help":{"str":"","attrs":[]}}
+error: sqlite3_exec failed -- lnav-error:{"level":"error","message":{"str":"call to timeslice(time, slice) failed","attrs":[{"start":8,"end":17,"type":"role","value":49},{"start":18,"end":22,"type":"role","value":48},{"start":24,"end":29,"type":"role","value":48},{"start":8,"end":30,"type":"role","value":65}]},"reason":{"str":"no time slice value given","attrs":[]},"snippets":[],"notes":[],"help":{"str":"","attrs":[]}}
diff --git a/test/expected/test_sql_time_func.sh_7ae9dbbb69dbc50ee6a34afc03d2579f09363068.err b/test/expected/test_sql_time_func.sh_7ae9dbbb69dbc50ee6a34afc03d2579f09363068.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql_time_func.sh_7ae9dbbb69dbc50ee6a34afc03d2579f09363068.err
diff --git a/test/expected/test_sql_time_func.sh_7ae9dbbb69dbc50ee6a34afc03d2579f09363068.out b/test/expected/test_sql_time_func.sh_7ae9dbbb69dbc50ee6a34afc03d2579f09363068.out
new file mode 100644
index 0000000..6401b23
--- /dev/null
+++ b/test/expected/test_sql_time_func.sh_7ae9dbbb69dbc50ee6a34afc03d2579f09363068.out
@@ -0,0 +1,2 @@
+Row 0:
+ Column timezone('UTC', '2022-03-02T10:20:30.400-0700'): 2022-03-02T17:20:30.400000+0000
diff --git a/test/expected/test_sql_time_func.sh_b3c00f049fdeb551a9165c281630e36359832d1f.err b/test/expected/test_sql_time_func.sh_b3c00f049fdeb551a9165c281630e36359832d1f.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql_time_func.sh_b3c00f049fdeb551a9165c281630e36359832d1f.err
diff --git a/test/expected/test_sql_time_func.sh_b3c00f049fdeb551a9165c281630e36359832d1f.out b/test/expected/test_sql_time_func.sh_b3c00f049fdeb551a9165c281630e36359832d1f.out
new file mode 100644
index 0000000..e02d1de
--- /dev/null
+++ b/test/expected/test_sql_time_func.sh_b3c00f049fdeb551a9165c281630e36359832d1f.out
@@ -0,0 +1,2 @@
+Row 0:
+ Column timezone('America/New_York', '2022-03-02T10:20:30.400-0700'): 2022-03-02T12:20:30.400000-0500
diff --git a/test/expected/test_sql_time_func.sh_c1d7dc8a4bd3b8cb86a2f893f58a56f0f6ea1bc3.err b/test/expected/test_sql_time_func.sh_c1d7dc8a4bd3b8cb86a2f893f58a56f0f6ea1bc3.err
new file mode 100644
index 0000000..ad8b26b
--- /dev/null
+++ b/test/expected/test_sql_time_func.sh_c1d7dc8a4bd3b8cb86a2f893f58a56f0f6ea1bc3.err
@@ -0,0 +1,8 @@
+✘ error: invalid timestamp: 2022-03-02T10:20:30.400bad
+ reason: the leading part of the timestamp was matched, however, the trailing text “bad” was not
+ --> command-option:1
+ | ;SELECT timezone('UTC', '2022-03-02T10:20:30.400bad')
+ = note: input matched time format “%Y-%m-%dT%H:%M:%S”
+ = note: 2022-03-02T10:20:30.400bad
+ ^-^ unrecognized input
+ = help: fix the timestamp or remove the trailing text
diff --git a/test/expected/test_sql_time_func.sh_c1d7dc8a4bd3b8cb86a2f893f58a56f0f6ea1bc3.out b/test/expected/test_sql_time_func.sh_c1d7dc8a4bd3b8cb86a2f893f58a56f0f6ea1bc3.out
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql_time_func.sh_c1d7dc8a4bd3b8cb86a2f893f58a56f0f6ea1bc3.out
diff --git a/test/expected/test_sql_time_func.sh_c5a5fc2edb54d10f1475afa7fed0b62bc05e1dc6.err b/test/expected/test_sql_time_func.sh_c5a5fc2edb54d10f1475afa7fed0b62bc05e1dc6.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql_time_func.sh_c5a5fc2edb54d10f1475afa7fed0b62bc05e1dc6.err
diff --git a/test/expected/test_sql_time_func.sh_c5a5fc2edb54d10f1475afa7fed0b62bc05e1dc6.out b/test/expected/test_sql_time_func.sh_c5a5fc2edb54d10f1475afa7fed0b62bc05e1dc6.out
new file mode 100644
index 0000000..689ba47
--- /dev/null
+++ b/test/expected/test_sql_time_func.sh_c5a5fc2edb54d10f1475afa7fed0b62bc05e1dc6.out
@@ -0,0 +1,2 @@
+Row 0:
+ Column timezone('America/Los_Angeles', '2022-03-02T10:20:30.400-0700'): 2022-03-02T09:20:30.400000-0800
diff --git a/test/expected/test_sql_time_func.sh_c7fc60392a2e52b163da1e1dde6978c16f415a9e.err b/test/expected/test_sql_time_func.sh_c7fc60392a2e52b163da1e1dde6978c16f415a9e.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql_time_func.sh_c7fc60392a2e52b163da1e1dde6978c16f415a9e.err
diff --git a/test/expected/test_sql_time_func.sh_c7fc60392a2e52b163da1e1dde6978c16f415a9e.out b/test/expected/test_sql_time_func.sh_c7fc60392a2e52b163da1e1dde6978c16f415a9e.out
new file mode 100644
index 0000000..07dccfa
--- /dev/null
+++ b/test/expected/test_sql_time_func.sh_c7fc60392a2e52b163da1e1dde6978c16f415a9e.out
@@ -0,0 +1,2 @@
+Row 0:
+ Column timezone('America/Los_Angeles', '2022-03-02T10:00'): 2022-03-02T02:00:00.000000-0800
diff --git a/test/expected/test_sql_views_vtab.sh_32acc1a8bb5028636fdbf08f077f9a835ab51bec.out b/test/expected/test_sql_views_vtab.sh_32acc1a8bb5028636fdbf08f077f9a835ab51bec.out
index 710f668..2b6d1d2 100644
--- a/test/expected/test_sql_views_vtab.sh_32acc1a8bb5028636fdbf08f077f9a835ab51bec.out
+++ b/test/expected/test_sql_views_vtab.sh_32acc1a8bb5028636fdbf08f077f9a835ab51bec.out
@@ -11,9 +11,8 @@ Run  ./autogen.sh  if compiling from a cloned repository.
See Also
-Angle-grinder[1] is a tool to slice and dice log files on the
+]8;;https://github.com/rcoh/angle-grinder\Angle-grinder]8;;\[1] is a tool to slice and dice log files on the
command-line. If you're familiar with the SumoLogic query language,
you might find this tool more comfortable to work with.
▌[1] - https://github.com/rcoh/angle-grinder
-
diff --git a/test/expected/test_sql_views_vtab.sh_4363d60040424a573ed79ee4260a32e3cd72f62c.err b/test/expected/test_sql_views_vtab.sh_4363d60040424a573ed79ee4260a32e3cd72f62c.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql_views_vtab.sh_4363d60040424a573ed79ee4260a32e3cd72f62c.err
diff --git a/test/expected/test_sql_views_vtab.sh_4363d60040424a573ed79ee4260a32e3cd72f62c.out b/test/expected/test_sql_views_vtab.sh_4363d60040424a573ed79ee4260a32e3cd72f62c.out
new file mode 100644
index 0000000..a4f45bc
--- /dev/null
+++ b/test/expected/test_sql_views_vtab.sh_4363d60040424a573ed79ee4260a32e3cd72f62c.out
@@ -0,0 +1,46 @@
+2023-03-24T14:26:16.243Z renovate[7] INFO Dependency extraction complete
+ Received Time: 2023-03-24T14:26:16.243 — in the future Format: %Y-%m-%dT%H:%M:%S.%L%z
+ Known message fields for table bunyan_log:
+ | ◆ 📊 name = renovate
+ | ◇ 📊 hostname = renovate-gitlab-67c4bcb5-9ggbv
+ | ◆ 📊 pid = 7
+ | ◇ 📊 level = 30
+ | ◇ 📊 v = 0
+ JSON fields:
+ jget(log_raw_text, '/baseBranch') = main
+ jget(log_raw_text, '/logContext') = qjifsaDDI
+ jget(log_raw_text, '/repository') = webgui/custom-icons-transformer
+ jget(log_raw_text, '/stats') = {"managers":{"gitlabci":{"fileCount":1,"depCount":1},"gitlabci-include":{"fileCount":1,"depCount":1},"npm":{"fileCount":1,"depCount":15}},"total":{"fileCount":3,"depCount":17}}
+ No discovered message fields
+ logContext: qjifsaDDI
+ repository: webgui/custom-icons-transformer
+ baseBranch: main
+ stats: {"managers":{"gitlabci":{"fileCount":1,"depCount":1},"gitlabci-include":{"fileCount":1,"depCount":1},"npm":{"fileCount":1,"depCount":15}},"total":{"fileCount":3,"depCount":17}}
+2023-03-24T14:26:16.390Z renovate[7] DEBUG Dependency node has unsupported/unversioned value lts-bullseye-slim (versioning=docker)
+ logContext: qjifsaDDI
+ repository: webgui/custom-icons-transformer
+2023-03-24T14:26:17.493Z renovate[7] DEBUG Release 2.8.7 is pending status checks
+ logContext: qjifsaDDI
+ repository: webgui/custom-icons-transformer
+ depName: prettier
+ check: stabilityDays
+2023-03-24T14:26:17.897Z renovate[7] DEBUG Release 4.4.1 is pending status checks
+ logContext: qjifsaDDI
+ repository: webgui/custom-icons-transformer
+ depName: rimraf
+ check: stabilityDays
+2023-03-24T14:26:17.897Z renovate[7] DEBUG All releases are pending - using latest
+ logContext: qjifsaDDI
+ repository: webgui/custom-icons-transformer
+ depName: rimraf
+ bucket: non-major
+2023-03-24T14:26:18.330Z renovate[7] DEBUG Release 2.10.0 is pending status checks
+ logContext: qjifsaDDI
+ repository: webgui/custom-icons-transformer
+ depName: prettier-plugin-svelte
+ check: stabilityDays
+2023-03-24T14:26:18.331Z renovate[7] DEBUG All releases are pending - using latest
+ logContext: qjifsaDDI
+ repository: webgui/custom-icons-transformer
+ depName: prettier-plugin-svelte
+ bucket: non-major
diff --git a/test/expected/test_sql_views_vtab.sh_45dbef06572b43cb997682436e753a13e003f792.err b/test/expected/test_sql_views_vtab.sh_45dbef06572b43cb997682436e753a13e003f792.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql_views_vtab.sh_45dbef06572b43cb997682436e753a13e003f792.err
diff --git a/test/expected/test_sql_views_vtab.sh_45dbef06572b43cb997682436e753a13e003f792.out b/test/expected/test_sql_views_vtab.sh_45dbef06572b43cb997682436e753a13e003f792.out
new file mode 100644
index 0000000..74dfce6
--- /dev/null
+++ b/test/expected/test_sql_views_vtab.sh_45dbef06572b43cb997682436e753a13e003f792.out
@@ -0,0 +1,47 @@
+[2020-12-10 06:56:41,092] DEBUG [connect.client:69] Full request text:
+ Received Time: 2020-12-10T06:56:41.092 — in the future Format: %Y-%m-%d %H:%M:%S,%L
+ Pattern: /xml_msg_log/regex/std = ^\[(?<timestamp>\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2},\d{3})\]\s+(?<level>\w+)\s+\[(?<module>[^:]*):(?<line>\d+)\]\s*(?<body>[^\n]*)\n?(?<msg_data>.*)
+ Known message fields for table xml_msg_log:
+ | ◆ 📊 module = connect.client
+ | ◆ 📊 line = 69
+ | ◆ msg_data = <?xml version='1.0' encoding='iso-8859-2'?>␊<a-request>␊ <head>␊ x␊ </head>␊ <source>␊ x␊ </source>␊ <request id="1">␊ <name>␊ x␊ </name>␊ </request>␊</a-request>␊
+ XML fields:
+ xpath('/a-request/head/text()', xml_msg_log.msg_data) = x
+ xpath('/a-request/request/@id', xml_msg_log.msg_data) = 1
+ xpath('/a-request/request/name/text()', xml_msg_log.msg_data) = x
+ xpath('/a-request/source/text()', xml_msg_log.msg_data) = x
+ No discovered message fields
+ └ #xml-req
+<?xml version='1.0' encoding='iso-8859-2'?>
+<a-request>
+ <head>
+ x
+ </head>
+ <source>
+ x
+ </source>
+ <request id="1">
+ <name>
+ x
+ </name>
+ </request>
+</a-request>
+
+[2020-12-10 06:56:41,099] DEBUG [m:85] Full reply text:
+<?xml version='1.0' encoding='iso-8859-2'?>
+<a-reply>
+ <head>
+ x
+ </head>
+ <reply id="2">
+ <status>
+ <result>OK</result>
+ </status>
+ <name>
+ x
+ </name>
+ </reply>
+ <technical-track>
+ x
+ </technical-track>
+</a-reply>
diff --git a/test/expected/test_sql_views_vtab.sh_485a6ac7c69bd4b5d34d3399a9c17f6a2dc89ad3.out b/test/expected/test_sql_views_vtab.sh_485a6ac7c69bd4b5d34d3399a9c17f6a2dc89ad3.out
index bfe5f1e..2ada698 100644
--- a/test/expected/test_sql_views_vtab.sh_485a6ac7c69bd4b5d34d3399a9c17f6a2dc89ad3.out
+++ b/test/expected/test_sql_views_vtab.sh_485a6ac7c69bd4b5d34d3399a9c17f6a2dc89ad3.out
@@ -1 +1 @@
-2014-10-08 16:56:38,344:WARN:foo bar baz
+2014-10-08 16:56:38,344:WARN:foo bar baz
diff --git a/test/expected/test_sql_views_vtab.sh_62d15cb9d5a9259f198aa01ca8ed200d6da38d68.out b/test/expected/test_sql_views_vtab.sh_62d15cb9d5a9259f198aa01ca8ed200d6da38d68.out
index 48f52f3..a988f1b 100644
--- a/test/expected/test_sql_views_vtab.sh_62d15cb9d5a9259f198aa01ca8ed200d6da38d68.out
+++ b/test/expected/test_sql_views_vtab.sh_62d15cb9d5a9259f198aa01ca8ed200d6da38d68.out
@@ -1,3 +1,3 @@
-view_name filter_id enabled type language pattern 
-log   1  1 in  regex  vmk 
-log   2    1 in regex vmk1
+view_name filter_id enabled type language pattern 
+log 1 1 in regex vmk
+log 2 1 in regex vmk1
diff --git a/test/expected/test_sql_views_vtab.sh_6ffd89498b9a7758ded6717148fc2ce77a12621b.out b/test/expected/test_sql_views_vtab.sh_6ffd89498b9a7758ded6717148fc2ce77a12621b.out
index 1ad5fbf..ac0d98c 100644
--- a/test/expected/test_sql_views_vtab.sh_6ffd89498b9a7758ded6717148fc2ce77a12621b.out
+++ b/test/expected/test_sql_views_vtab.sh_6ffd89498b9a7758ded6717148fc2ce77a12621b.out
@@ -1,2 +1,2 @@
-search 
+search 
warn
diff --git a/test/expected/test_sql_views_vtab.sh_81dc3eb51ec4dc3066a2365524001242c423a9cf.out b/test/expected/test_sql_views_vtab.sh_81dc3eb51ec4dc3066a2365524001242c423a9cf.out
index c99c751..25e5645 100644
--- a/test/expected/test_sql_views_vtab.sh_81dc3eb51ec4dc3066a2365524001242c423a9cf.out
+++ b/test/expected/test_sql_views_vtab.sh_81dc3eb51ec4dc3066a2365524001242c423a9cf.out
@@ -1,2 +1,2 @@
-view_name filter_id enabled type language pattern 
-log   0  1 out  sql  1  
+view_name filter_id enabled type language pattern 
+log 0 1 out sql 1
diff --git a/test/expected/test_sql_views_vtab.sh_a2c0f0e51b3f85ea2a05ecdcacaad962b4fe5d4f.out b/test/expected/test_sql_views_vtab.sh_a2c0f0e51b3f85ea2a05ecdcacaad962b4fe5d4f.out
index 38afb7c..4041522 100644
--- a/test/expected/test_sql_views_vtab.sh_a2c0f0e51b3f85ea2a05ecdcacaad962b4fe5d4f.out
+++ b/test/expected/test_sql_views_vtab.sh_a2c0f0e51b3f85ea2a05ecdcacaad962b4fe5d4f.out
@@ -1,2 +1,2 @@
-view_name filter_id enabled type language pattern 
-log   1  1 in  regex  vmk 
+view_name filter_id enabled type language pattern 
+log 1 1 in regex vmk
diff --git a/test/expected/test_sql_views_vtab.sh_a7a7fd577f710aa8b0ad5a94fdfb35daea75e06c.err b/test/expected/test_sql_views_vtab.sh_a7a7fd577f710aa8b0ad5a94fdfb35daea75e06c.err
new file mode 100644
index 0000000..44ba5c2
--- /dev/null
+++ b/test/expected/test_sql_views_vtab.sh_a7a7fd577f710aa8b0ad5a94fdfb35daea75e06c.err
@@ -0,0 +1,4 @@
+✘ error: Invalid “top_meta.file” value
+ reason: Unknown text file: bad
+ --> command-option:1
+ | ;UPDATE lnav_views SET top_meta = json_object('file', 'bad') WHERE name = 'text'
diff --git a/test/expected/test_sql_views_vtab.sh_a7a7fd577f710aa8b0ad5a94fdfb35daea75e06c.out b/test/expected/test_sql_views_vtab.sh_a7a7fd577f710aa8b0ad5a94fdfb35daea75e06c.out
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql_views_vtab.sh_a7a7fd577f710aa8b0ad5a94fdfb35daea75e06c.out
diff --git a/test/expected/test_sql_views_vtab.sh_c851bdf3ba2f56fac5a216457b2d11a109e77f03.err b/test/expected/test_sql_views_vtab.sh_c851bdf3ba2f56fac5a216457b2d11a109e77f03.err
index 4276af6..d4eb104 100644
--- a/test/expected/test_sql_views_vtab.sh_c851bdf3ba2f56fac5a216457b2d11a109e77f03.err
+++ b/test/expected/test_sql_views_vtab.sh_c851bdf3ba2f56fac5a216457b2d11a109e77f03.err
@@ -1,4 +1,4 @@
-✘ error: SQL statement failed
- reason: Invalid time: bad-time
+✘ error: Invalid “top_time” value
+ reason: Unrecognized time value: bad-time
 --> command-option:1
 | ;UPDATE lnav_views SET top_time = 'bad-time' WHERE name = 'log'
diff --git a/test/expected/test_sql_views_vtab.sh_d99d884ba6668b66e3ca9ea4ed2d0e236497c35d.out b/test/expected/test_sql_views_vtab.sh_d99d884ba6668b66e3ca9ea4ed2d0e236497c35d.out
index bc35132..1dda4bf 100644
--- a/test/expected/test_sql_views_vtab.sh_d99d884ba6668b66e3ca9ea4ed2d0e236497c35d.out
+++ b/test/expected/test_sql_views_vtab.sh_d99d884ba6668b66e3ca9ea4ed2d0e236497c35d.out
@@ -1 +1 @@
-2014-10-08 16:56:38,344:WARN:foo bar baz
+2014-10-08 16:56:38,344:WARN:foo bar baz
diff --git a/test/expected/test_sql_xml_func.sh_81ad7678f080870956db37174bcf1054586cfbad.err b/test/expected/test_sql_xml_func.sh_81ad7678f080870956db37174bcf1054586cfbad.err
new file mode 100644
index 0000000..3c5a94b
--- /dev/null
+++ b/test/expected/test_sql_xml_func.sh_81ad7678f080870956db37174bcf1054586cfbad.err
@@ -0,0 +1,11 @@
+✘ error: Invalid XML document
+ reason: Error parsing element attribute
+ --> command-option:1
+ | ;SELECT * FROM xpath('/catalog', (SELECT content FROM lnav_file LIMIT 1))
+ --> xmldoc:35
+ |  </description> 
+ |  </book> 
+ |  <book id=" bk104"> 
+ |  ^ Error parsing element attribute
+ |  <author>Corets, Eva</author> 
+ |  <title>Oberon's Legacy</title> 
diff --git a/test/expected/test_sql_xml_func.sh_81ad7678f080870956db37174bcf1054586cfbad.out b/test/expected/test_sql_xml_func.sh_81ad7678f080870956db37174bcf1054586cfbad.out
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql_xml_func.sh_81ad7678f080870956db37174bcf1054586cfbad.out
diff --git a/test/expected/test_sql_xml_func.sh_b036c73528a446cba46625767517cdac868aba72.err b/test/expected/test_sql_xml_func.sh_b036c73528a446cba46625767517cdac868aba72.err
index 6ac0f80..319fc61 100644
--- a/test/expected/test_sql_xml_func.sh_b036c73528a446cba46625767517cdac868aba72.err
+++ b/test/expected/test_sql_xml_func.sh_b036c73528a446cba46625767517cdac868aba72.err
@@ -1 +1 @@
-error: sqlite3_exec failed -- Invalid XPATH expression at offset 5: Unrecognized node test
+error: sqlite3_exec failed -- lnav-error:{"level":"error","message":{"str":"Invalid XPath expression","attrs":[]},"reason":{"str":"Unrecognized node test","attrs":[]},"snippets":[{"source":"xpath","line":1,"content":{"str":"/abc[\n ^ Unrecognized node test","attrs":[{"start":0,"end":5,"type":"role","value":42},{"start":11,"end":13,"type":"role","value":79},{"start":13,"end":35,"type":"role","value":5},{"start":6,"end":35,"type":"role","value":42},{"start":35,"end":35,"type":"role","value":42}]}}],"notes":[],"help":{"str":"","attrs":[]}}
diff --git a/test/expected/test_sql_xml_func.sh_bcbd691bb24c4f7bcb9fe0e035b290815f1c8874.err b/test/expected/test_sql_xml_func.sh_bcbd691bb24c4f7bcb9fe0e035b290815f1c8874.err
new file mode 100644
index 0000000..d1ff56a
--- /dev/null
+++ b/test/expected/test_sql_xml_func.sh_bcbd691bb24c4f7bcb9fe0e035b290815f1c8874.err
@@ -0,0 +1,7 @@
+✘ error: Invalid XPath expression
+ reason: Expected ']' to match an opening '['
+ --> command-option:1
+ | ;SELECT * FROM xpath('/cat[alog', (SELECT content FROM lnav_file LIMIT 1))
+ --> xpath:1
+ | /cat[alog 
+ |  ^ Expected ']' to match an opening '['
diff --git a/test/expected/test_sql_xml_func.sh_bcbd691bb24c4f7bcb9fe0e035b290815f1c8874.out b/test/expected/test_sql_xml_func.sh_bcbd691bb24c4f7bcb9fe0e035b290815f1c8874.out
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_sql_xml_func.sh_bcbd691bb24c4f7bcb9fe0e035b290815f1c8874.out
diff --git a/test/expected/test_sql_xml_func.sh_fefeb387ae14d4171225ea06cbbff3ec43990cf0.err b/test/expected/test_sql_xml_func.sh_fefeb387ae14d4171225ea06cbbff3ec43990cf0.err
index a97d7cd..f495a72 100644
--- a/test/expected/test_sql_xml_func.sh_fefeb387ae14d4171225ea06cbbff3ec43990cf0.err
+++ b/test/expected/test_sql_xml_func.sh_fefeb387ae14d4171225ea06cbbff3ec43990cf0.err
@@ -1 +1 @@
-error: sqlite3_exec failed -- Invalid XML document at offset 3: Error parsing start element tag
+error: sqlite3_exec failed -- lnav-error:{"level":"error","message":{"str":"Invalid XML document","attrs":[]},"reason":{"str":"Error parsing start element tag","attrs":[]},"snippets":[{"source":"xmldoc","line":1,"content":{"str":"<abc\n ^ Error parsing start element tag","attrs":[{"start":0,"end":4,"type":"role","value":42},{"start":8,"end":10,"type":"role","value":79},{"start":10,"end":41,"type":"role","value":5},{"start":5,"end":41,"type":"role","value":42},{"start":41,"end":41,"type":"role","value":42}]}}],"notes":[],"help":{"str":"","attrs":[]}}
diff --git a/test/expected/test_sql_yaml_func.sh_41c6abde708a69e74f5b7fde865d88fa75f91e0a.err b/test/expected/test_sql_yaml_func.sh_41c6abde708a69e74f5b7fde865d88fa75f91e0a.err
deleted file mode 100644
index b7f3a79..0000000
--- a/test/expected/test_sql_yaml_func.sh_41c6abde708a69e74f5b7fde865d88fa75f91e0a.err
+++ /dev/null
@@ -1,4 +0,0 @@
-✘ error: failed to parse YAML content
- reason: closing ] not found
- --> command-option:1
- | ;SELECT yaml_to_json('[abc') 
diff --git a/test/expected/test_text_file.sh_02a0514e0e384e5511ae202ea519552ba04030ed.err b/test/expected/test_text_file.sh_02a0514e0e384e5511ae202ea519552ba04030ed.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_text_file.sh_02a0514e0e384e5511ae202ea519552ba04030ed.err
diff --git a/test/expected/test_text_file.sh_02a0514e0e384e5511ae202ea519552ba04030ed.out b/test/expected/test_text_file.sh_02a0514e0e384e5511ae202ea519552ba04030ed.out
new file mode 100644
index 0000000..d244d10
--- /dev/null
+++ b/test/expected/test_text_file.sh_02a0514e0e384e5511ae202ea519552ba04030ed.out
@@ -0,0 +1,3 @@
+Hello, World!!
+Goodbye, World!!
+That is not⌫⌫⌫all
diff --git a/test/expected/test_text_file.sh_0bba304f34ae07c4fa9e91e0b42f5fe98654a6a8.err b/test/expected/test_text_file.sh_0bba304f34ae07c4fa9e91e0b42f5fe98654a6a8.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_text_file.sh_0bba304f34ae07c4fa9e91e0b42f5fe98654a6a8.err
diff --git a/test/expected/test_text_file.sh_0bba304f34ae07c4fa9e91e0b42f5fe98654a6a8.out b/test/expected/test_text_file.sh_0bba304f34ae07c4fa9e91e0b42f5fe98654a6a8.out
new file mode 100644
index 0000000..0c3f7da
--- /dev/null
+++ b/test/expected/test_text_file.sh_0bba304f34ae07c4fa9e91e0b42f5fe98654a6a8.out
@@ -0,0 +1,26 @@
+#! /bin/sh
+
+
+if test x"${AUTORECONF}" = x""; then
+ autoreconf -V 1>/dev/null 2>/dev/null
+ if test $? -eq 0; then
+ AUTORECONF=autoreconf
+ fi
+fi
+
+if test x"${AUTORECONF}" != x""; then
+ ${AUTORECONF} -vfi -I m4
+else
+ AUTOCONF=${AUTOCONF:-autoconf}
+ AUTOMAKE=${AUTOMAKE:-automake}
+ AUTOHEADER=${AUTOHEADER:-autoheader}
+ ACLOCAL=${ACLOCAL:-aclocal}
+
+ ${AUTOCONF} --version
+ ${AUTOMAKE} --version
+
+ ${ACLOCAL} -I m4 -I .
+ ${AUTOHEADER} -I .
+ ${AUTOMAKE} --add-missing --copy --force-missing --foreign
+ ${AUTOCONF}
+fi
diff --git a/test/expected/test_text_file.sh_11fd274911e45a743b4de616888a64183d07cb76.err b/test/expected/test_text_file.sh_11fd274911e45a743b4de616888a64183d07cb76.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_text_file.sh_11fd274911e45a743b4de616888a64183d07cb76.err
diff --git a/test/expected/test_text_file.sh_11fd274911e45a743b4de616888a64183d07cb76.out b/test/expected/test_text_file.sh_11fd274911e45a743b4de616888a64183d07cb76.out
new file mode 100644
index 0000000..4ef8aa7
--- /dev/null
+++ b/test/expected/test_text_file.sh_11fd274911e45a743b4de616888a64183d07cb76.out
@@ -0,0 +1,2 @@
+content 
+ abc
diff --git a/test/expected/test_text_file.sh_143a40164c93c7ec44a66e7940b92b128a421147.err b/test/expected/test_text_file.sh_143a40164c93c7ec44a66e7940b92b128a421147.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_text_file.sh_143a40164c93c7ec44a66e7940b92b128a421147.err
diff --git a/test/expected/test_text_file.sh_143a40164c93c7ec44a66e7940b92b128a421147.out b/test/expected/test_text_file.sh_143a40164c93c7ec44a66e7940b92b128a421147.out
new file mode 100644
index 0000000..84ebd40
--- /dev/null
+++ b/test/expected/test_text_file.sh_143a40164c93c7ec44a66e7940b92b128a421147.out
@@ -0,0 +1,5 @@
+ "title": "Midnight Rain",
+ "description": "A former architect battles corporate zombies, an evil sorceress, and her own childhood to become queen of the world."
+ }
+ ]
+}
diff --git a/test/expected/test_text_file.sh_1ce4056d72b871f8bb844c86aade2a9b1da58030.err b/test/expected/test_text_file.sh_1ce4056d72b871f8bb844c86aade2a9b1da58030.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_text_file.sh_1ce4056d72b871f8bb844c86aade2a9b1da58030.err
diff --git a/test/expected/test_text_file.sh_1ce4056d72b871f8bb844c86aade2a9b1da58030.out b/test/expected/test_text_file.sh_1ce4056d72b871f8bb844c86aade2a9b1da58030.out
new file mode 100644
index 0000000..b100f4c
--- /dev/null
+++ b/test/expected/test_text_file.sh_1ce4056d72b871f8bb844c86aade2a9b1da58030.out
@@ -0,0 +1,49 @@
+[
+ {
+ "top_meta": {
+ "file": "stdin",
+ "anchor": "#/test~1Makefile.am/distclean-local:",
+ "breadcrumbs": [
+ {
+ "display_value": "stdin",
+ "search_placeholder": "",
+ "possibilities": [
+ {
+ "display_value": "stdin"
+ }
+ ]
+ },
+ {
+ "display_value": "test/Makefile.am",
+ "search_placeholder": "",
+ "possibilities": [
+ {
+ "display_value": "test/Makefile.am"
+ },
+ {
+ "display_value": "test/expected/expected.am"
+ },
+ {
+ "display_value": "test/expected/test_sessions.sh_8732dad5481be991ca7f291d9c5451c7b016cea7.out"
+ },
+ {
+ "display_value": "test/expected/test_sessions.sh_e39648f425c3f291c9d1c0d14595a019abd0cb48.out"
+ },
+ {
+ "display_value": "test/test_sessions.sh"
+ }
+ ]
+ },
+ {
+ "display_value": "distclean-local:",
+ "search_placeholder": "",
+ "possibilities": [
+ {
+ "display_value": "distclean-local:"
+ }
+ ]
+ }
+ ]
+ }
+ }
+]
diff --git a/test/expected/test_text_file.sh_25cef06efcbe106c2e1cc4a166b673e7b244c6d7.err b/test/expected/test_text_file.sh_25cef06efcbe106c2e1cc4a166b673e7b244c6d7.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_text_file.sh_25cef06efcbe106c2e1cc4a166b673e7b244c6d7.err
diff --git a/test/expected/test_text_file.sh_25cef06efcbe106c2e1cc4a166b673e7b244c6d7.out b/test/expected/test_text_file.sh_25cef06efcbe106c2e1cc4a166b673e7b244c6d7.out
new file mode 100644
index 0000000..80a24fb
--- /dev/null
+++ b/test/expected/test_text_file.sh_25cef06efcbe106c2e1cc4a166b673e7b244c6d7.out
@@ -0,0 +1,25 @@
+[
+ {
+ "top_meta": {
+ "file": "stdin",
+ "breadcrumbs": [
+ {
+ "display_value": "stdin",
+ "search_placeholder": "",
+ "possibilities": [
+ {
+ "display_value": "stdin"
+ }
+ ]
+ },
+ {
+ "display_value": "2013-06-06T12:13:20.123",
+ "search_placeholder": "",
+ "possibilities": [
+
+ ]
+ }
+ ]
+ }
+ }
+]
diff --git a/test/expected/test_text_file.sh_265a8a5825e6c7dbc85cbe496dab6be7a349f3db.err b/test/expected/test_text_file.sh_265a8a5825e6c7dbc85cbe496dab6be7a349f3db.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_text_file.sh_265a8a5825e6c7dbc85cbe496dab6be7a349f3db.err
diff --git a/test/expected/test_text_file.sh_265a8a5825e6c7dbc85cbe496dab6be7a349f3db.out b/test/expected/test_text_file.sh_265a8a5825e6c7dbc85cbe496dab6be7a349f3db.out
new file mode 100644
index 0000000..a330ad5
--- /dev/null
+++ b/test/expected/test_text_file.sh_265a8a5825e6c7dbc85cbe496dab6be7a349f3db.out
@@ -0,0 +1 @@
+2013-06-06T12:13:20.123 Hello, World!
diff --git a/test/expected/test_text_file.sh_2e69c22dcfa37b5c3e8490a6026eacb7ca953998.err b/test/expected/test_text_file.sh_2e69c22dcfa37b5c3e8490a6026eacb7ca953998.err
deleted file mode 100644
index 08a372f..0000000
--- a/test/expected/test_text_file.sh_2e69c22dcfa37b5c3e8490a6026eacb7ca953998.err
+++ /dev/null
@@ -1,2 +0,0 @@
-✘ error: unable to open file: non-existent:
- reason: failed to ssh to host: ssh: Could not resolve hostname non-existent: nodename nor servname provided, or not known
diff --git a/test/expected/test_text_file.sh_4226123565a53b4e3f80e602c1f294721e8e07bf.err b/test/expected/test_text_file.sh_4226123565a53b4e3f80e602c1f294721e8e07bf.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_text_file.sh_4226123565a53b4e3f80e602c1f294721e8e07bf.err
diff --git a/test/expected/test_text_file.sh_4226123565a53b4e3f80e602c1f294721e8e07bf.out b/test/expected/test_text_file.sh_4226123565a53b4e3f80e602c1f294721e8e07bf.out
new file mode 100644
index 0000000..063e8c8
--- /dev/null
+++ b/test/expected/test_text_file.sh_4226123565a53b4e3f80e602c1f294721e8e07bf.out
@@ -0,0 +1,9 @@
+# Test file for syntax-highlighting
+
+def hello(abc):
+ """
+ This is a multi-line string
+
+ @param abc: blah blah
+ """
+ return abc + 1
diff --git a/test/expected/test_text_file.sh_4dd174410d702a7b4be794fb6fa2c8889bd768d6.err b/test/expected/test_text_file.sh_4dd174410d702a7b4be794fb6fa2c8889bd768d6.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_text_file.sh_4dd174410d702a7b4be794fb6fa2c8889bd768d6.err
diff --git a/test/expected/test_text_file.sh_4dd174410d702a7b4be794fb6fa2c8889bd768d6.out b/test/expected/test_text_file.sh_4dd174410d702a7b4be794fb6fa2c8889bd768d6.out
new file mode 100644
index 0000000..e6de131
--- /dev/null
+++ b/test/expected/test_text_file.sh_4dd174410d702a7b4be794fb6fa2c8889bd768d6.out
@@ -0,0 +1,6 @@
+ "author": "Ralls, Kim",
+ "title": "Midnight Rain",
+ "description": "A former architect battles corporate zombies, an evil sorceress, and her own childhood to become queen of the world."
+ }
+ ]
+}
diff --git a/test/expected/test_text_file.sh_596b120fbea638472a27964444e262b4572afacc.err b/test/expected/test_text_file.sh_596b120fbea638472a27964444e262b4572afacc.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_text_file.sh_596b120fbea638472a27964444e262b4572afacc.err
diff --git a/test/expected/test_text_file.sh_596b120fbea638472a27964444e262b4572afacc.out b/test/expected/test_text_file.sh_596b120fbea638472a27964444e262b4572afacc.out
new file mode 100644
index 0000000..84ebd40
--- /dev/null
+++ b/test/expected/test_text_file.sh_596b120fbea638472a27964444e262b4572afacc.out
@@ -0,0 +1,5 @@
+ "title": "Midnight Rain",
+ "description": "A former architect battles corporate zombies, an evil sorceress, and her own childhood to become queen of the world."
+ }
+ ]
+}
diff --git a/test/expected/test_text_file.sh_5b51b55dff7332c5bee2c9b797c401c5614d574a.out b/test/expected/test_text_file.sh_5b51b55dff7332c5bee2c9b797c401c5614d574a.out
index a39be1e..1f28ffd 100644
--- a/test/expected/test_text_file.sh_5b51b55dff7332c5bee2c9b797c401c5614d574a.out
+++ b/test/expected/test_text_file.sh_5b51b55dff7332c5bee2c9b797c401c5614d574a.out
@@ -1,4 +1,4 @@
-Build[1][2] Docs[3][4] Coverage Status[5][6] lnav[7][8]
+]8;;https://github.com/tstack/lnav/actions?query=workflow%3Aci-build\🖼 Build[1]]8;;\[2] ]8;;https://docs.lnav.org\🖼 Docs[3]]8;;\[4] ]8;;https://coveralls.io/github/tstack/lnav?branch=master\🖼 Coverage Status[5]]8;;\[6] ]8;;https://snapcraft.io/lnav\🖼 lnav[7]]8;;\[8]
▌[1] - https://github.com/tstack/lnav/workflows/ci-build/badge.svg
▌[2] - https://github.com/tstack/lnav/actions?query=workflow%3Aci-build
@@ -9,61 +9,122 @@
▌[7] - https://snapcraft.io/lnav/badge.svg
▌[8] - https://snapcraft.io/lnav
-<img
-src="https://assets-global.website-files.com/6257adef93867e50d84d30e2/62594fddd654fc29fcc07359_cb48d2a8d4991281d7a6a95d2f58195e.svg"
-height="20"/>[1]
+]8;;https://discord.gg/erBPnKwz7R\🖼 ]8;;\]8;;https://discord.gg/erBPnKwz7R\Discord Logo]8;;\]8;;https://discord.gg/erBPnKwz7R\[1]]8;;\[2]
- ▌[1] - https://discord.gg/erBPnKwz7R
+ ▌[1] - https://assets-global.website-files.com/6257adef93867e50d84d30e2/62594fddd654fc29fcc07359_cb48d2a8d4991281d7a6a95d2f58195e.svg
+ ▌[2] - https://discord.gg/erBPnKwz7R
-This is the source repository for lnav, visit https://lnav.org[1] for
+This is the source repository for lnav, visit ]8;;https://lnav.org\https://lnav.org]8;;\[1] for
a high level overview.
▌[1] - https://lnav.org
LNAV – The Logfile Navigator
-The Log File Navigator, lnav for short, is an advanced log file viewer
-for the small-scale. It is a terminal application that can understand
-your log files and make it easy for you to find problems with little
-to no setup.
+The Logfile Navigator is a log file viewer for the terminal. Given a
+set of files/directories, lnav will:
+
+ • decompress as needed;
+ • detect their format;
+ • merge the files together by time into a single view;
+ • tail the files, follow renames, find new files in
+ directories;
+ • build an index of errors and warnings;
+ • ]8;;https://docs.lnav.org/en/latest/formats.html#json-lines\pretty-print JSON-lines]8;;\[1].
+
+ ▌[1] - https://docs.lnav.org/en/latest/formats.html#json-lines
+
+Then, in the lnav TUI, you can:
+
+ • jump quickly to the previous/next error (]8;;https://docs.lnav.org/en/latest/hotkeys.html#spatial-navigation\press ]8;;\]8;;https://docs.lnav.org/en/latest/hotkeys.html#spatial-navigation\ e ]8;;\]8;;https://docs.lnav.org/en/latest/hotkeys.html#spatial-navigation\/]8;;\]8;;https://docs.lnav.org/en/latest/hotkeys.html#spatial-navigation\ E ]8;;\[1]);
+ • search using regular expressions (]8;;https://docs.lnav.org/en/latest/hotkeys.html#spatial-navigation\press ]8;;\]8;;https://docs.lnav.org/en/latest/hotkeys.html#spatial-navigation\ / ]8;;\[2]);
+ • highlight text with a regular expression (]8;;https://docs.lnav.org/en/latest/commands.html#highlight-pattern\ :highlight ]8;;\[3]
+ command);
+ • filter messages using ]8;;https://docs.lnav.org/en/latest/usage.html#regular-expression-match\regular expressions]8;;\[4] or ]8;;https://docs.lnav.org/en/latest/usage.html#sqlite-expression\SQLite]8;;\
+ ]8;;https://docs.lnav.org/en/latest/usage.html#sqlite-expression\expressions]8;;\[5];
+ • pretty-print structured text (]8;;https://docs.lnav.org/en/latest/ui.html#pretty\press ]8;;\]8;;https://docs.lnav.org/en/latest/ui.html#pretty\ P ]8;;\[6]);
+ • view a histogram of messages over time (]8;;https://docs.lnav.org/en/latest/ui.html#hist\press ]8;;\]8;;https://docs.lnav.org/en/latest/ui.html#hist\ i ]8;;\[7]);
+ • query messages using SQLite (]8;;https://docs.lnav.org/en/latest/sqlext.html\press ]8;;\]8;;https://docs.lnav.org/en/latest/sqlext.html\ ; ]8;;\[8])
+
+ ▌[1] - https://docs.lnav.org/en/latest/hotkeys.html#spatial-navigation
+ ▌[2] - https://docs.lnav.org/en/latest/hotkeys.html#spatial-navigation
+ ▌[3] - https://docs.lnav.org/en/latest/commands.html#highlight-pattern
+ ▌[4] - https://docs.lnav.org/en/latest/usage.html#regular-expression-match
+ ▌[5] - https://docs.lnav.org/en/latest/usage.html#sqlite-expression
+ ▌[6] - https://docs.lnav.org/en/latest/ui.html#pretty
+ ▌[7] - https://docs.lnav.org/en/latest/ui.html#hist
+ ▌[8] - https://docs.lnav.org/en/latest/sqlext.html
Screenshot
-The following screenshot shows a syslog file. Log lines are displayed
-with highlights. Errors are red and warnings are yellow.
+The following screenshot shows a mix of syslog and web access log
+files. Failed requests are shown in red. Identifiers, like IP
+address and PIDs are semantically highlighted.
-Screenshot[1][2]
+]8;;docs/assets/images/lnav-front-page.png\🖼 Screenshot[1]]8;;\[2]
- ▌[1] - file://{top_srcdir}/docs/assets/images/lnav-syslog-thumb.png
- ▌[2] - file://{top_srcdir}/docs/assets/images/lnav-syslog.png
+ ▌[1] - file://{top_srcdir}/docs/assets/images/lnav-front-page.png
+ ▌[2] - file://{top_srcdir}/docs/assets/images/lnav-front-page.png
-Features
+Why not just use  tail / grep / less ?
- • Log messages from different files are collated together
- into a single view
- • Automatic detection of log format
- • Automatic decompression of GZip and BZip2 files
- • Filter log messages based on regular expressions
- • Use SQL to analyze your logs
- • And more...
+The standard Unix utilities are great for processing raw text lines,
+however, they do not understand log messages. Tail can watch multiple
+files at a time, but it won't display messages in order by time and
+you can't scroll backwards. Grep will only find matching lines, but
+won't return a full multi-line log message. Less can only display a
+single file at a time. Also, none of these basic tools handle
+compressed files.
+
+Try online before installing
+
+You can SSH into a demo node to play with lnav before installing.
+
+The "playground" account starts lnav with a couple of log files as an
+example:
+
+]8;;ssh://playground@demo.lnav.org\ $ ssh playground@demo.lnav.org ]8;;\[1]
+
+ ▌[1] - ssh://playground@demo.lnav.org
+
+The "tutorial 1" account is an interactive tutorial that can teach you
+the basics of operation:
+
+]8;;ssh://tutorial1@demo.lnav.org\ $ ssh tutorial1@demo.lnav.org ]8;;\[1]
+
+ ▌[1] - ssh://tutorial1@demo.lnav.org
Installation
-Download a statically-linked binary for Linux/MacOS from the release
-page[1]
+]8;;https://github.com/tstack/lnav/releases/latest#release-artifacts\Download a statically-linked binary for Linux/MacOS from the release]8;;\
+]8;;https://github.com/tstack/lnav/releases/latest#release-artifacts\page]8;;\[1]
▌[1] - https://github.com/tstack/lnav/releases/latest#release-artifacts
+Brew on MacOS
+
+ ▌$ brew install lnav 
+
Usage
-The only file installed is the executable,  lnav . You can execute it
-with no arguments to view the default set of files:
+Simply point lnav at the files or directories you want to monitor, it
+will figure out the rest:
- ▌$ lnav 
+ ▌$ lnav /path/to/file1 /path/to/dir ... 
-You can view all the syslog messages by running:
+The lnav TUI will pop up right away and begin indexing the files.
+Progress is displayed in the "Files" panel at the bottom. Once the
+indexing has finished, the LOG view will display the log messages that
+were recognized[^1]. You can then use the usual hotkeys to move around
+the view (arrow keys or  j / k / h / l  to move down/up/left/right).
- ▌$ lnav /var/log/messages* 
+See the ]8;;https://docs.lnav.org/en/latest/usage.html\Usage section]8;;\[1] of the online documentation for more
+information.
+
+ ▌[1] - https://docs.lnav.org/en/latest/usage.html
+
+[^1]: Files that do not contain log messages can be seen in the TEXT
+view (reachable by pressing  t ).
Usage with  systemd-journald 
@@ -82,8 +143,9 @@ output format to include the year, otherwise  lnav  gets confused:
▌$ journalctl -o short-iso | lnav 
-It is also possible to use  journalctl 's json output format and  lnav
-will make use of additional fields such as PRIORITY and _SYSTEMD_UNIT:
+It is also possible to use  journalctl 's json output format and
+ lnav will make use of additional fields such as PRIORITY and
+_SYSTEMD_UNIT:
▌$ journalctl -o json | lnav 
@@ -100,8 +162,8 @@ the ones actually recognized by  lnav  for increased efficiency:
▌$ journalctl -o json --output-fields=MESSAGE,PRIORITY,_PID,SYSLOG_IDENTIFIER,_SYSTEMD_UNIT | lnav 
If your system has been running for a long time, for increased
-efficiency you may want to limit the number of log lines fed into  lnav
-, e.g. via  journalctl 's  -n  or  --since=...  options.
+efficiency you may want to limit the number of log lines fed into
+ lnav , e.g. via  journalctl 's  -n  or  --since=...  options.
In case of a persistent journal, you may want to limit the number of
log lines fed into  lnav  via  journalctl 's  -b  option.
@@ -111,9 +173,9 @@ log lines fed into  lnav  via  journalctl 's [
Please file issues on this repository or use the discussions section.
The following alternatives are also available:
- • support@lnav.org[1]
- • Discord[2]
- • Google Groups[3]
+ • ]8;;mailto:support@lnav.org\support@lnav.org]8;;\[1]
+ • ]8;;https://discord.gg/erBPnKwz7R\Discord]8;;\[2]
+ • ]8;;https://groups.google.com/g/lnav\Google Groups]8;;\[3]
▌[1] - mailto:support@lnav.org
▌[2] - https://discord.gg/erBPnKwz7R
@@ -121,9 +183,9 @@ The following alternatives are also available:
Links
- • Main Site[1]
- • Documentation[2] on Read the Docs
- • Internal Architecture[3]
+ • ]8;;https://lnav.org\Main Site]8;;\[1]
+ • ]8;;https://docs.lnav.org\Documentation]8;;\[2] on Read the Docs
+ • ]8;;ARCHITECTURE.md\Internal Architecture]8;;\[3]
▌[1] - https://lnav.org
▌[2] - https://docs.lnav.org
@@ -131,7 +193,7 @@ The following alternatives are also available:
Contributing
- • Become a Sponsor on GitHub[1]
+ • ]8;;https://github.com/sponsors/tstack\Become a Sponsor on GitHub]8;;\[1]
▌[1] - https://github.com/sponsors/tstack
@@ -144,18 +206,20 @@ The following software packages are required to build lnav:
• gcc/clang - A C++14-compatible compiler.
• libpcre2 - The Perl Compatible Regular Expression v2
(PCRE2) library.
- • sqlite - The SQLite database engine. Version 3.9.0
- or higher is required.
+ • sqlite - The SQLite database engine. Version
+ 3.9.0 or higher is required.
• ncurses - The ncurses text UI library.
• readline - The readline line editing library.
• zlib - The zlib compression library.
• bz2 - The bzip2 compression library.
• libcurl - The cURL library for downloading files
from URLs. Version 7.23.0 or higher is required.
- • libarchive - The libarchive library for opening archive
- files, like zip/tgz.
+ • libarchive - The libarchive library for opening
+ archive files, like zip/tgz.
• wireshark - The 'tshark' program is used to interpret
pcap files.
+ • cargo/rust - The Rust language is used to build the
+ PRQL compiler.
Build
@@ -170,9 +234,8 @@ Run  ./autogen.sh  if compiling from a cloned repository.
See Also
-Angle-grinder[1] is a tool to slice and dice log files on the
+]8;;https://github.com/rcoh/angle-grinder\Angle-grinder]8;;\[1] is a tool to slice and dice log files on the
command-line. If you're familiar with the SumoLogic query language,
you might find this tool more comfortable to work with.
▌[1] - https://github.com/rcoh/angle-grinder
-
diff --git a/test/expected/test_text_file.sh_5e9320f18d066e6fc930dbbffc357af64312bd4b.err b/test/expected/test_text_file.sh_5e9320f18d066e6fc930dbbffc357af64312bd4b.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_text_file.sh_5e9320f18d066e6fc930dbbffc357af64312bd4b.err
diff --git a/test/expected/test_text_file.sh_5e9320f18d066e6fc930dbbffc357af64312bd4b.out b/test/expected/test_text_file.sh_5e9320f18d066e6fc930dbbffc357af64312bd4b.out
new file mode 100644
index 0000000..1a4081b
--- /dev/null
+++ b/test/expected/test_text_file.sh_5e9320f18d066e6fc930dbbffc357af64312bd4b.out
@@ -0,0 +1,42 @@
+[
+ {
+ "top_meta": {
+ "file": "ECHO(1)",
+ "breadcrumbs": [
+ {
+ "display_value": "ECHO(1)",
+ "search_placeholder": "",
+ "possibilities": [
+ {
+ "display_value": "ECHO(1)"
+ }
+ ]
+ },
+ {
+ "display_value": "⋯",
+ "search_placeholder": "",
+ "possibilities": [
+ {
+ "display_value": "DESCRIPTION"
+ },
+ {
+ "display_value": "EXIT STATUS"
+ },
+ {
+ "display_value": "NAME"
+ },
+ {
+ "display_value": "SEE ALSO"
+ },
+ {
+ "display_value": "STANDARDS"
+ },
+ {
+ "display_value": "SYNOPSIS"
+ }
+ ]
+ }
+ ]
+ }
+ }
+]
diff --git a/test/expected/test_text_file.sh_6a24078983cf1b7a80b6fb65d5186cd125498136.out b/test/expected/test_text_file.sh_6a24078983cf1b7a80b6fb65d5186cd125498136.out
index accb1c3..3fe2949 100644
--- a/test/expected/test_text_file.sh_6a24078983cf1b7a80b6fb65d5186cd125498136.out
+++ b/test/expected/test_text_file.sh_6a24078983cf1b7a80b6fb65d5186cd125498136.out
@@ -1,40 +1,73 @@
Screenshot
-The following screenshot shows a syslog file. Log lines are displayed
-with highlights. Errors are red and warnings are yellow.
+The following screenshot shows a mix of syslog and web access log
+files. Failed requests are shown in red. Identifiers, like IP
+address and PIDs are semantically highlighted.
-Screenshot[1][2]
+]8;;docs/assets/images/lnav-front-page.png\🖼 Screenshot[1]]8;;\[2]
- ▌[1] - file://{top_srcdir}/docs/assets/images/lnav-syslog-thumb.png
- ▌[2] - file://{top_srcdir}/docs/assets/images/lnav-syslog.png
+ ▌[1] - file://{top_srcdir}/docs/assets/images/lnav-front-page.png
+ ▌[2] - file://{top_srcdir}/docs/assets/images/lnav-front-page.png
-Features
+Why not just use  tail / grep / less ?
- • Log messages from different files are collated together
- into a single view
- • Automatic detection of log format
- • Automatic decompression of GZip and BZip2 files
- • Filter log messages based on regular expressions
- • Use SQL to analyze your logs
- • And more...
+The standard Unix utilities are great for processing raw text lines,
+however, they do not understand log messages. Tail can watch multiple
+files at a time, but it won't display messages in order by time and
+you can't scroll backwards. Grep will only find matching lines, but
+won't return a full multi-line log message. Less can only display a
+single file at a time. Also, none of these basic tools handle
+compressed files.
+
+Try online before installing
+
+You can SSH into a demo node to play with lnav before installing.
+
+The "playground" account starts lnav with a couple of log files as an
+example:
+
+]8;;ssh://playground@demo.lnav.org\ $ ssh playground@demo.lnav.org ]8;;\[1]
+
+ ▌[1] - ssh://playground@demo.lnav.org
+
+The "tutorial 1" account is an interactive tutorial that can teach you
+the basics of operation:
+
+]8;;ssh://tutorial1@demo.lnav.org\ $ ssh tutorial1@demo.lnav.org ]8;;\[1]
+
+ ▌[1] - ssh://tutorial1@demo.lnav.org
Installation
-Download a statically-linked binary for Linux/MacOS from the release
-page[1]
+]8;;https://github.com/tstack/lnav/releases/latest#release-artifacts\Download a statically-linked binary for Linux/MacOS from the release]8;;\
+]8;;https://github.com/tstack/lnav/releases/latest#release-artifacts\page]8;;\[1]
▌[1] - https://github.com/tstack/lnav/releases/latest#release-artifacts
+Brew on MacOS
+
+ ▌$ brew install lnav 
+
Usage
-The only file installed is the executable,  lnav . You can execute it
-with no arguments to view the default set of files:
+Simply point lnav at the files or directories you want to monitor, it
+will figure out the rest:
- ▌$ lnav 
+ ▌$ lnav /path/to/file1 /path/to/dir ... 
-You can view all the syslog messages by running:
+The lnav TUI will pop up right away and begin indexing the files.
+Progress is displayed in the "Files" panel at the bottom. Once the
+indexing has finished, the LOG view will display the log messages that
+were recognized[^1]. You can then use the usual hotkeys to move around
+the view (arrow keys or  j / k / h / l  to move down/up/left/right).
- ▌$ lnav /var/log/messages* 
+See the ]8;;https://docs.lnav.org/en/latest/usage.html\Usage section]8;;\[1] of the online documentation for more
+information.
+
+ ▌[1] - https://docs.lnav.org/en/latest/usage.html
+
+[^1]: Files that do not contain log messages can be seen in the TEXT
+view (reachable by pressing  t ).
Usage with  systemd-journald 
@@ -53,8 +86,9 @@ output format to include the year, otherwise  lnav  gets confused:
▌$ journalctl -o short-iso | lnav 
-It is also possible to use  journalctl 's json output format and  lnav
-will make use of additional fields such as PRIORITY and _SYSTEMD_UNIT:
+It is also possible to use  journalctl 's json output format and
+ lnav will make use of additional fields such as PRIORITY and
+_SYSTEMD_UNIT:
▌$ journalctl -o json | lnav 
@@ -71,8 +105,8 @@ the ones actually recognized by  lnav  for increased efficiency:
▌$ journalctl -o json --output-fields=MESSAGE,PRIORITY,_PID,SYSLOG_IDENTIFIER,_SYSTEMD_UNIT | lnav 
If your system has been running for a long time, for increased
-efficiency you may want to limit the number of log lines fed into  lnav
-, e.g. via  journalctl 's  -n  or  --since=...  options.
+efficiency you may want to limit the number of log lines fed into
+ lnav , e.g. via  journalctl 's  -n  or  --since=...  options.
In case of a persistent journal, you may want to limit the number of
log lines fed into  lnav  via  journalctl 's  -b  option.
@@ -82,9 +116,9 @@ log lines fed into  lnav  via  journalctl 's [
Please file issues on this repository or use the discussions section.
The following alternatives are also available:
- • support@lnav.org[1]
- • Discord[2]
- • Google Groups[3]
+ • ]8;;mailto:support@lnav.org\support@lnav.org]8;;\[1]
+ • ]8;;https://discord.gg/erBPnKwz7R\Discord]8;;\[2]
+ • ]8;;https://groups.google.com/g/lnav\Google Groups]8;;\[3]
▌[1] - mailto:support@lnav.org
▌[2] - https://discord.gg/erBPnKwz7R
@@ -92,9 +126,9 @@ The following alternatives are also available:
Links
- • Main Site[1]
- • Documentation[2] on Read the Docs
- • Internal Architecture[3]
+ • ]8;;https://lnav.org\Main Site]8;;\[1]
+ • ]8;;https://docs.lnav.org\Documentation]8;;\[2] on Read the Docs
+ • ]8;;ARCHITECTURE.md\Internal Architecture]8;;\[3]
▌[1] - https://lnav.org
▌[2] - https://docs.lnav.org
@@ -102,7 +136,7 @@ The following alternatives are also available:
Contributing
- • Become a Sponsor on GitHub[1]
+ • ]8;;https://github.com/sponsors/tstack\Become a Sponsor on GitHub]8;;\[1]
▌[1] - https://github.com/sponsors/tstack
@@ -115,18 +149,20 @@ The following software packages are required to build lnav:
• gcc/clang - A C++14-compatible compiler.
• libpcre2 - The Perl Compatible Regular Expression v2
(PCRE2) library.
- • sqlite - The SQLite database engine. Version 3.9.0
- or higher is required.
+ • sqlite - The SQLite database engine. Version
+ 3.9.0 or higher is required.
• ncurses - The ncurses text UI library.
• readline - The readline line editing library.
• zlib - The zlib compression library.
• bz2 - The bzip2 compression library.
• libcurl - The cURL library for downloading files
from URLs. Version 7.23.0 or higher is required.
- • libarchive - The libarchive library for opening archive
- files, like zip/tgz.
+ • libarchive - The libarchive library for opening
+ archive files, like zip/tgz.
• wireshark - The 'tshark' program is used to interpret
pcap files.
+ • cargo/rust - The Rust language is used to build the
+ PRQL compiler.
Build
@@ -141,9 +177,8 @@ Run  ./autogen.sh  if compiling from a cloned repository.
See Also
-Angle-grinder[1] is a tool to slice and dice log files on the
+]8;;https://github.com/rcoh/angle-grinder\Angle-grinder]8;;\[1] is a tool to slice and dice log files on the
command-line. If you're familiar with the SumoLogic query language,
you might find this tool more comfortable to work with.
▌[1] - https://github.com/rcoh/angle-grinder
-
diff --git a/test/expected/test_text_file.sh_73f69c883f60761bff9f8874f61d21a189e92912.err b/test/expected/test_text_file.sh_73f69c883f60761bff9f8874f61d21a189e92912.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_text_file.sh_73f69c883f60761bff9f8874f61d21a189e92912.err
diff --git a/test/expected/test_text_file.sh_73f69c883f60761bff9f8874f61d21a189e92912.out b/test/expected/test_text_file.sh_73f69c883f60761bff9f8874f61d21a189e92912.out
new file mode 100644
index 0000000..b3ee8cf
--- /dev/null
+++ b/test/expected/test_text_file.sh_73f69c883f60761bff9f8874f61d21a189e92912.out
@@ -0,0 +1,43 @@
+[
+ {
+ "top_meta": {
+ "file": "ECHO(1)",
+ "anchor": "#description",
+ "breadcrumbs": [
+ {
+ "display_value": "ECHO(1)",
+ "search_placeholder": "",
+ "possibilities": [
+ {
+ "display_value": "ECHO(1)"
+ }
+ ]
+ },
+ {
+ "display_value": "DESCRIPTION",
+ "search_placeholder": "",
+ "possibilities": [
+ {
+ "display_value": "DESCRIPTION"
+ },
+ {
+ "display_value": "EXIT STATUS"
+ },
+ {
+ "display_value": "NAME"
+ },
+ {
+ "display_value": "SEE ALSO"
+ },
+ {
+ "display_value": "STANDARDS"
+ },
+ {
+ "display_value": "SYNOPSIS"
+ }
+ ]
+ }
+ ]
+ }
+ }
+]
diff --git a/test/expected/test_text_file.sh_786c7262f977201af36b0e69ba1a2aba130bbb06.err b/test/expected/test_text_file.sh_786c7262f977201af36b0e69ba1a2aba130bbb06.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_text_file.sh_786c7262f977201af36b0e69ba1a2aba130bbb06.err
diff --git a/test/expected/test_text_file.sh_786c7262f977201af36b0e69ba1a2aba130bbb06.out b/test/expected/test_text_file.sh_786c7262f977201af36b0e69ba1a2aba130bbb06.out
new file mode 100644
index 0000000..efb5ebd
--- /dev/null
+++ b/test/expected/test_text_file.sh_786c7262f977201af36b0e69ba1a2aba130bbb06.out
@@ -0,0 +1,4 @@
+Duis aute irure dolor in reprehenderit in voluptate velit
+esse cillum dolore eu fugiat nulla pariatur. Excepteur
+sint occaecat cupidatat non proident, sunt in culpa qui
+officia deserunt mollit anim id est laborum.
diff --git a/test/expected/test_text_file.sh_78f252288519c8f767bb2759ea32959dab2ebc46.err b/test/expected/test_text_file.sh_78f252288519c8f767bb2759ea32959dab2ebc46.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_text_file.sh_78f252288519c8f767bb2759ea32959dab2ebc46.err
diff --git a/test/expected/test_text_file.sh_78f252288519c8f767bb2759ea32959dab2ebc46.out b/test/expected/test_text_file.sh_78f252288519c8f767bb2759ea32959dab2ebc46.out
new file mode 100644
index 0000000..97ad4bc
--- /dev/null
+++ b/test/expected/test_text_file.sh_78f252288519c8f767bb2759ea32959dab2ebc46.out
@@ -0,0 +1,98 @@
+[
+ {
+ "top_meta": {
+ "file": "{test_dir}/formats/jsontest/format.json",
+ "anchor": "#/test_log/line-format/4/overflow",
+ "breadcrumbs": [
+ {
+ "display_value": "format.json",
+ "search_placeholder": "",
+ "possibilities": [
+ {
+ "display_value": "format.json"
+ }
+ ]
+ },
+ {
+ "display_value": "test_log",
+ "search_placeholder": "",
+ "possibilities": [
+ {
+ "display_value": "$schema"
+ },
+ {
+ "display_value": "test_log"
+ }
+ ]
+ },
+ {
+ "display_value": "line-format",
+ "search_placeholder": "",
+ "possibilities": [
+ {
+ "display_value": "body-field"
+ },
+ {
+ "display_value": "description"
+ },
+ {
+ "display_value": "file-pattern"
+ },
+ {
+ "display_value": "json"
+ },
+ {
+ "display_value": "level-field"
+ },
+ {
+ "display_value": "line-format"
+ },
+ {
+ "display_value": "timestamp-field"
+ },
+ {
+ "display_value": "title"
+ },
+ {
+ "display_value": "value"
+ }
+ ]
+ },
+ {
+ "display_value": "[4]",
+ "search_placeholder": "(Enter a number from 0 to 6)",
+ "possibilities": [
+
+ ]
+ },
+ {
+ "display_value": "overflow",
+ "search_placeholder": "",
+ "possibilities": [
+ {
+ "display_value": "default-value"
+ },
+ {
+ "display_value": "field"
+ },
+ {
+ "display_value": "max-width"
+ },
+ {
+ "display_value": "min-width"
+ },
+ {
+ "display_value": "overflow"
+ },
+ {
+ "display_value": "prefix"
+ },
+ {
+ "display_value": "suffix"
+ }
+ ]
+ }
+ ]
+ }
+ }
+]
diff --git a/test/expected/test_text_file.sh_7b00f32a3fff7fc2d78a87045ae842e58be88480.out b/test/expected/test_text_file.sh_7b00f32a3fff7fc2d78a87045ae842e58be88480.out
index 4855b3d..c9d7942 100644
--- a/test/expected/test_text_file.sh_7b00f32a3fff7fc2d78a87045ae842e58be88480.out
+++ b/test/expected/test_text_file.sh_7b00f32a3fff7fc2d78a87045ae842e58be88480.out
@@ -5,6 +5,6 @@
 * FEATURES: network-sandbox preserve-libs sandbox test userpriv usersandbox
* Checking whether python3_11 is suitable ...
* >=dev-lang/python-3.11.1-r1:3.11 ...
- [ ok ]
+ [ ok ]
* Using python3.11 to build (via PYTHON_COMPAT iteration)
>>> Unpacking source...
diff --git a/test/expected/test_text_file.sh_801414c6bb6d3f9225973eafa3c6dfa49cd2081d.out b/test/expected/test_text_file.sh_801414c6bb6d3f9225973eafa3c6dfa49cd2081d.out
deleted file mode 100644
index a7ed740..0000000
--- a/test/expected/test_text_file.sh_801414c6bb6d3f9225973eafa3c6dfa49cd2081d.out
+++ /dev/null
@@ -1,111 +0,0 @@
-/**
- * Copyright (c) 2018, Timothy Stack
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * * Neither the name of Timothy Stack nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ''AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "log_level.hh"
-
-#include <ctype.h>
-
-#include "config.h"
-
-const char* level_names[LEVEL__MAX + 1] = {
- "unknown",
- "trace",
- "debug5",
- "debug4",
- "debug3",
- "debug2",
- "debug",
- "info",
- "stats",
- "notice",
- "warning",
- "error",
- "critical",
- "fatal",
- "invalid",
-
- nullptr,
-};
-
-log_level_t
-abbrev2level(const char* levelstr, ssize_t len)
-{
- if (len == 0 || levelstr[0] == '\0') {
- return LEVEL_UNKNOWN;
- }
-
- switch (toupper(levelstr[0])) {
- case 'T':
- return LEVEL_TRACE;
- case 'D':
- case 'V':
- if (len > 1) {
- switch (levelstr[len - 1]) {
- case '2':
- return LEVEL_DEBUG2;
- case '3':
- return LEVEL_DEBUG3;
- case '4':
- return LEVEL_DEBUG4;
- case '5':
- return LEVEL_DEBUG5;
- }
- }
- return LEVEL_DEBUG;
- case 'I':
- if (len == 7 && toupper(levelstr[1]) == 'N'
- && toupper(levelstr[2]) == 'V' && toupper(levelstr[3]) == 'A'
- && toupper(levelstr[4]) == 'L' && toupper(levelstr[5]) == 'I'
- && toupper(levelstr[6]) == 'D')
- {
- return LEVEL_INVALID;
- }
- return LEVEL_INFO;
- case 'S':
- return LEVEL_STATS;
- case 'N':
- return LEVEL_NOTICE;
- case 'W':
- return LEVEL_WARNING;
- case 'E':
- return LEVEL_ERROR;
- case 'C':
- return LEVEL_CRITICAL;
- case 'F':
- return LEVEL_FATAL;
- default:
- return LEVEL_UNKNOWN;
- }
-}
-
-int
-levelcmp(const char* l1, ssize_t l1_len, const char* l2, ssize_t l2_len)
-{
- return abbrev2level(l1, l1_len) - abbrev2level(l2, l2_len);
-}
diff --git a/test/expected/test_text_file.sh_87943c6be50d701a03e901f16493314c839af1ab.out b/test/expected/test_text_file.sh_87943c6be50d701a03e901f16493314c839af1ab.out
index ae06214..5ab78b4 100644
--- a/test/expected/test_text_file.sh_87943c6be50d701a03e901f16493314c839af1ab.out
+++ b/test/expected/test_text_file.sh_87943c6be50d701a03e901f16493314c839af1ab.out
@@ -1,31 +1,31 @@
-/**
- * Copyright (c) 2018, Timothy Stack
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * * Neither the name of Timothy Stack nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ''AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
+/**
+ * Copyright (c) 2018, Timothy Stack
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of Timothy Stack nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ''AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
#include "log_level.hh"
diff --git a/test/expected/test_text_file.sh_8a4954af3e536b3789b1fd5b33519e9d444cc933.err b/test/expected/test_text_file.sh_8a4954af3e536b3789b1fd5b33519e9d444cc933.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_text_file.sh_8a4954af3e536b3789b1fd5b33519e9d444cc933.err
diff --git a/test/expected/test_text_file.sh_8a4954af3e536b3789b1fd5b33519e9d444cc933.out b/test/expected/test_text_file.sh_8a4954af3e536b3789b1fd5b33519e9d444cc933.out
new file mode 100644
index 0000000..e6de131
--- /dev/null
+++ b/test/expected/test_text_file.sh_8a4954af3e536b3789b1fd5b33519e9d444cc933.out
@@ -0,0 +1,6 @@
+ "author": "Ralls, Kim",
+ "title": "Midnight Rain",
+ "description": "A former architect battles corporate zombies, an evil sorceress, and her own childhood to become queen of the world."
+ }
+ ]
+}
diff --git a/test/expected/test_text_file.sh_8b2cd055e6a1db2ed9b2af2a917f8556395fa653.out b/test/expected/test_text_file.sh_8b2cd055e6a1db2ed9b2af2a917f8556395fa653.out
index c8719bb..0290454 100644
--- a/test/expected/test_text_file.sh_8b2cd055e6a1db2ed9b2af2a917f8556395fa653.out
+++ b/test/expected/test_text_file.sh_8b2cd055e6a1db2ed9b2af2a917f8556395fa653.out
@@ -1,2 +1,2 @@
- filepath  descriptor  mimetype  content 
-{test_dir}/textfile_0.md net.daringfireball.markdown.frontmatter application/json {␊ "comment": "This is JSON front-matter"␊} 
+ filepath   descriptor   mimetype   content  
+{test_dir}/textfile_0.md net.daringfireball.markdown.frontmatter application/json {␊ "comment": "This is JSON front-matter"␊}
diff --git a/test/expected/test_text_file.sh_a87c18c643994c3dbbbbb619a06a601d3668ea71.err b/test/expected/test_text_file.sh_a87c18c643994c3dbbbbb619a06a601d3668ea71.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_text_file.sh_a87c18c643994c3dbbbbb619a06a601d3668ea71.err
diff --git a/test/expected/test_text_file.sh_a87c18c643994c3dbbbbb619a06a601d3668ea71.out b/test/expected/test_text_file.sh_a87c18c643994c3dbbbbb619a06a601d3668ea71.out
new file mode 100644
index 0000000..8fd43aa
--- /dev/null
+++ b/test/expected/test_text_file.sh_a87c18c643994c3dbbbbb619a06a601d3668ea71.out
@@ -0,0 +1,2 @@
+time for a reset ⎋ckapow
+ding dong! 🔔
diff --git a/test/expected/test_text_file.sh_ac486314c4e02e480d829ea2f077b86c49fedcec.out b/test/expected/test_text_file.sh_ac486314c4e02e480d829ea2f077b86c49fedcec.out
index 5a1b89a..243bfc7 100644
--- a/test/expected/test_text_file.sh_ac486314c4e02e480d829ea2f077b86c49fedcec.out
+++ b/test/expected/test_text_file.sh_ac486314c4e02e480d829ea2f077b86c49fedcec.out
@@ -1,4 +1,4 @@
+command-line. If you're familiar with the SumoLogic query language,
you might find this tool more comfortable to work with.
▌[1] - https://github.com/rcoh/angle-grinder
-
diff --git a/test/expected/test_text_file.sh_c21295f131c221861568bda5014b76ef99bdd11f.out b/test/expected/test_text_file.sh_c21295f131c221861568bda5014b76ef99bdd11f.out
deleted file mode 100644
index 59a0aa9..0000000
--- a/test/expected/test_text_file.sh_c21295f131c221861568bda5014b76ef99bdd11f.out
+++ /dev/null
@@ -1,159 +0,0 @@
-Build[1][2] Docs[3][4] Coverage Status[5][6] lnav[7][8]
-
- ▌[1] - https://github.com/tstack/lnav/workflows/ci-build/badge.svg
- ▌[2] - https://github.com/tstack/lnav/actions?query=workflow%3Aci-build
- ▌[3] - https://readthedocs.org/projects/lnav/badge/?version=latest&style=plastic
- ▌[4] - https://docs.lnav.org
- ▌[5] - https://coveralls.io/repos/github/tstack/lnav/badge.svg?branch=master
- ▌[6] - https://coveralls.io/github/tstack/lnav?branch=master
- ▌[7] - https://snapcraft.io//lnav/badge.svg
- ▌[8] - https://snapcraft.io/lnav
-
-This is the source repository for lnav, visit https://lnav.org[1] for
-a high level overview.
-
- ▌[1] - https://lnav.org
-
-LNAV – The Logfile Navigator
-
-The Log File Navigator, lnav for short, is an advanced log file viewer
-for the small-scale. It is a terminal application that can understand
-your log files and make it easy for you to find problems with little
-to no setup.
-
-Screenshot
-
-The following screenshot shows a syslog file. Log lines are displayed
-with highlights. Errors are red and warnings are yellow.
-
-Screenshot[1][2]
-
- ▌[1] - file://{top_srcdir}/docs/assets/images/lnav-syslog-thumb.png
- ▌[2] - file://{top_srcdir}/docs/assets/images/lnav-syslog.png
-
-Features
-
- • Log messages from different files are collated together
- into a single view
- • Automatic detection of log format
- • Automatic decompression of GZip and BZip2 files
- • Filter log messages based on regular expressions
- • Use SQL to analyze your logs
- • And more...
-
-Installation
-
-Download a statically-linked binary for Linux/MacOS from the release
-page[1]
-
- ▌[1] - https://github.com/tstack/lnav/releases/latest#release-artifacts
-
-Usage
-
-The only file installed is the executable,  lnav . You can execute it
-with no arguments to view the default set of files:
-
- ▌$ lnav 
-
-You can view all the syslog messages by running:
-
- ▌$ lnav /var/log/messages* 
-
-Usage with  systemd-journald 
-
-On systems running  systemd-journald , you can use  lnav  as the
-pager:
-
- ▌$ journalctl | lnav 
-
-or in follow mode:
-
- ▌$ journalctl -f | lnav 
-
-Since  journalctl 's default output format omits the year, if you are
-viewing logs which span multiple years you will need to change the
-output format to include the year, otherwise  lnav  gets confused:
-
- ▌$ journalctl -o short-iso | lnav 
-
-It is also possible to use  journalctl 's json output format and  lnav
-will make use of additional fields such as PRIORITY and _SYSTEMD_UNIT:
-
- ▌$ journalctl -o json | lnav 
-
-In case some MESSAGE fields contain special characters such as ANSI
-color codes which are considered as unprintable by journalctl,
-specifying  journalctl 's  -a  option might be preferable in order to
-output those messages still in a non binary representation:
-
- ▌$ journalctl -a -o json | lnav 
-
-If using systemd v236 or newer, the output fields can be limited to
-the ones actually recognized by  lnav  for increased efficiency:
-
- ▌$ journalctl -o json --output-fields=MESSAGE,PRIORITY,_PID,SYSLOG_IDENTIFIER,_SYSTEMD_UNIT | lnav 
-
-If your system has been running for a long time, for increased
-efficiency you may want to limit the number of log lines fed into  lnav
-, e.g. via  journalctl 's  -n  or  --since=...  options.
-
-In case of a persistent journal, you may want to limit the number of
-log lines fed into  lnav  via  journalctl 's  -b  option.
-
-Links
-
- • Main Site[1]
- • Documentation[2] on Read the Docs
- • Internal Architecture[3]
-
- ▌[1] - https://lnav.org
- ▌[2] - https://docs.lnav.org
- ▌[3] - file://{top_srcdir}/ARCHITECTURE.md
-
-Contributing
-
- • Become a Sponsor on GitHub[1]
-
- ▌[1] - https://github.com/sponsors/tstack
-
-Building From Source
-
-Prerequisites
-
-The following software packages are required to build lnav:
-
- • gcc/clang - A C++14-compatible compiler.
- • libpcre - The Perl Compatible Regular Expression
- (PCRE) library.
- • sqlite - The SQLite database engine. Version 3.9.0
- or higher is required.
- • ncurses - The ncurses text UI library.
- • readline - The readline line editing library.
- • zlib - The zlib compression library.
- • bz2 - The bzip2 compression library.
- • libcurl - The cURL library for downloading files
- from URLs. Version 7.23.0 or higher is required.
- • libarchive - The libarchive library for opening archive
- files, like zip/tgz.
- • wireshark - The 'tshark' program is used to interpret
- pcap files.
-
-Build
-
-Lnav follows the usual GNU style for configuring and installing
-software:
-
-Run  ./autogen.sh  if compiling from a cloned repository.
-
- ▌$ ./configure 
- ▌$ make 
- ▌$ sudo make install 
-
-See Also
-
-Angle-grinder[1] is a tool to slice and dice log files on the
-command-line. If you're familiar with the SumoLogic query language,
-you might find this tool more comfortable to work with.
-
- ▌[1] - https://github.com/rcoh/angle-grinder
-
diff --git a/test/expected/test_text_file.sh_c2a346ca1da2da4346f1d310212e166767993ce9.out b/test/expected/test_text_file.sh_c2a346ca1da2da4346f1d310212e166767993ce9.out
index 1efd1ba..48d7862 100644
--- a/test/expected/test_text_file.sh_c2a346ca1da2da4346f1d310212e166767993ce9.out
+++ b/test/expected/test_text_file.sh_c2a346ca1da2da4346f1d310212e166767993ce9.out
@@ -2,7 +2,7 @@
{
"top_meta": {
"file": "{top_srcdir}/README.md",
- "anchor": "#support",
+ "anchor": "#usage",
"breadcrumbs": [
{
"display_value": "README.md",
@@ -23,16 +23,13 @@
]
},
{
- "display_value": "Support",
+ "display_value": "Usage",
"search_placeholder": "",
"possibilities": [
{
"display_value": "Contributing"
},
{
- "display_value": "Features"
- },
- {
"display_value": "Installation"
},
{
@@ -48,7 +45,22 @@
"display_value": "Support"
},
{
+ "display_value": "Try online before installing"
+ },
+ {
"display_value": "Usage"
+ },
+ {
+ "display_value": "Why not just use tail / grep / less ?"
+ }
+ ]
+ },
+ {
+ "display_value": "⋯",
+ "search_placeholder": "",
+ "possibilities": [
+ {
+ "display_value": "Usage with systemd-journald "
}
]
}
diff --git a/test/expected/test_text_file.sh_d59b67113864ef5e77267d7fd8ad4072f5aef0fc.err b/test/expected/test_text_file.sh_d59b67113864ef5e77267d7fd8ad4072f5aef0fc.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_text_file.sh_d59b67113864ef5e77267d7fd8ad4072f5aef0fc.err
diff --git a/test/expected/test_text_file.sh_d59b67113864ef5e77267d7fd8ad4072f5aef0fc.out b/test/expected/test_text_file.sh_d59b67113864ef5e77267d7fd8ad4072f5aef0fc.out
new file mode 100644
index 0000000..30b1d02
--- /dev/null
+++ b/test/expected/test_text_file.sh_d59b67113864ef5e77267d7fd8ad4072f5aef0fc.out
@@ -0,0 +1,51 @@
+
+Test
+
+ • One
+ • Two
+ • Three
+
+🖼 ]8;;file://{top_srcdir}/docs/lnav-tui.png\lnav-tui.png]8;;\[1]
+
+🖼 ]8;;file://{top_srcdir}/docs/lnav-architecture.png\The internal architecture of lnav]8;;\[2]
+
+ ▌[1] - file://{top_srcdir}/docs/lnav-tui.png
+ ▌[2] - file://{top_srcdir}/docs/lnav-architecture.png
+
+Bold red
+
+Underline
+
+ Hello,
+ World!
+
+
+Goodbye, ▌World╏!
+
+ ▌foo bar bar 
+ ▌baz "xyz" 
+
+ ▌/* 
+ ▌ * This program prints "Hello, World!" 
+ ▌ */ 
+ ▌ 
+ ▌#include <stdio.h> 
+ ▌ 
+ ▌int main() { 
+ ▌ printf("Hello, World!\n"); 
+ ▌} 
+
+ ▌def hw(name): 
+ ▌ """ 
+ ▌ This function prints "Hello, <name>!" 
+ ▌ """ 
+ ▌ 
+ ▌ print(f"Hello, {name}!") # test comment 
+
+ ▌<?xml version="1.0" encoding="utf-8" ?> 
+ ▌<books> 
+ ▌ <!-- Line comment --> 
+ ▌ <book id="100"> 
+ ▌ <author>Finnegan</author> 
+ ▌ </book> 
+ ▌</books> 
diff --git a/test/expected/test_text_file.sh_e088ea61a5382458cc48a2607e2639e52b0be1da.out b/test/expected/test_text_file.sh_e088ea61a5382458cc48a2607e2639e52b0be1da.out
index accb1c3..3fe2949 100644
--- a/test/expected/test_text_file.sh_e088ea61a5382458cc48a2607e2639e52b0be1da.out
+++ b/test/expected/test_text_file.sh_e088ea61a5382458cc48a2607e2639e52b0be1da.out
@@ -1,40 +1,73 @@
Screenshot
-The following screenshot shows a syslog file. Log lines are displayed
-with highlights. Errors are red and warnings are yellow.
+The following screenshot shows a mix of syslog and web access log
+files. Failed requests are shown in red. Identifiers, like IP
+address and PIDs are semantically highlighted.
-Screenshot[1][2]
+]8;;docs/assets/images/lnav-front-page.png\🖼 Screenshot[1]]8;;\[2]
- ▌[1] - file://{top_srcdir}/docs/assets/images/lnav-syslog-thumb.png
- ▌[2] - file://{top_srcdir}/docs/assets/images/lnav-syslog.png
+ ▌[1] - file://{top_srcdir}/docs/assets/images/lnav-front-page.png
+ ▌[2] - file://{top_srcdir}/docs/assets/images/lnav-front-page.png
-Features
+Why not just use  tail / grep / less ?
- • Log messages from different files are collated together
- into a single view
- • Automatic detection of log format
- • Automatic decompression of GZip and BZip2 files
- • Filter log messages based on regular expressions
- • Use SQL to analyze your logs
- • And more...
+The standard Unix utilities are great for processing raw text lines,
+however, they do not understand log messages. Tail can watch multiple
+files at a time, but it won't display messages in order by time and
+you can't scroll backwards. Grep will only find matching lines, but
+won't return a full multi-line log message. Less can only display a
+single file at a time. Also, none of these basic tools handle
+compressed files.
+
+Try online before installing
+
+You can SSH into a demo node to play with lnav before installing.
+
+The "playground" account starts lnav with a couple of log files as an
+example:
+
+]8;;ssh://playground@demo.lnav.org\ $ ssh playground@demo.lnav.org ]8;;\[1]
+
+ ▌[1] - ssh://playground@demo.lnav.org
+
+The "tutorial 1" account is an interactive tutorial that can teach you
+the basics of operation:
+
+]8;;ssh://tutorial1@demo.lnav.org\ $ ssh tutorial1@demo.lnav.org ]8;;\[1]
+
+ ▌[1] - ssh://tutorial1@demo.lnav.org
Installation
-Download a statically-linked binary for Linux/MacOS from the release
-page[1]
+]8;;https://github.com/tstack/lnav/releases/latest#release-artifacts\Download a statically-linked binary for Linux/MacOS from the release]8;;\
+]8;;https://github.com/tstack/lnav/releases/latest#release-artifacts\page]8;;\[1]
▌[1] - https://github.com/tstack/lnav/releases/latest#release-artifacts
+Brew on MacOS
+
+ ▌$ brew install lnav 
+
Usage
-The only file installed is the executable,  lnav . You can execute it
-with no arguments to view the default set of files:
+Simply point lnav at the files or directories you want to monitor, it
+will figure out the rest:
- ▌$ lnav 
+ ▌$ lnav /path/to/file1 /path/to/dir ... 
-You can view all the syslog messages by running:
+The lnav TUI will pop up right away and begin indexing the files.
+Progress is displayed in the "Files" panel at the bottom. Once the
+indexing has finished, the LOG view will display the log messages that
+were recognized[^1]. You can then use the usual hotkeys to move around
+the view (arrow keys or  j / k / h / l  to move down/up/left/right).
- ▌$ lnav /var/log/messages* 
+See the ]8;;https://docs.lnav.org/en/latest/usage.html\Usage section]8;;\[1] of the online documentation for more
+information.
+
+ ▌[1] - https://docs.lnav.org/en/latest/usage.html
+
+[^1]: Files that do not contain log messages can be seen in the TEXT
+view (reachable by pressing  t ).
Usage with  systemd-journald 
@@ -53,8 +86,9 @@ output format to include the year, otherwise  lnav  gets confused:
▌$ journalctl -o short-iso | lnav 
-It is also possible to use  journalctl 's json output format and  lnav
-will make use of additional fields such as PRIORITY and _SYSTEMD_UNIT:
+It is also possible to use  journalctl 's json output format and
+ lnav will make use of additional fields such as PRIORITY and
+_SYSTEMD_UNIT:
▌$ journalctl -o json | lnav 
@@ -71,8 +105,8 @@ the ones actually recognized by  lnav  for increased efficiency:
▌$ journalctl -o json --output-fields=MESSAGE,PRIORITY,_PID,SYSLOG_IDENTIFIER,_SYSTEMD_UNIT | lnav 
If your system has been running for a long time, for increased
-efficiency you may want to limit the number of log lines fed into  lnav
-, e.g. via  journalctl 's  -n  or  --since=...  options.
+efficiency you may want to limit the number of log lines fed into
+ lnav , e.g. via  journalctl 's  -n  or  --since=...  options.
In case of a persistent journal, you may want to limit the number of
log lines fed into  lnav  via  journalctl 's  -b  option.
@@ -82,9 +116,9 @@ log lines fed into  lnav  via  journalctl 's [
Please file issues on this repository or use the discussions section.
The following alternatives are also available:
- • support@lnav.org[1]
- • Discord[2]
- • Google Groups[3]
+ • ]8;;mailto:support@lnav.org\support@lnav.org]8;;\[1]
+ • ]8;;https://discord.gg/erBPnKwz7R\Discord]8;;\[2]
+ • ]8;;https://groups.google.com/g/lnav\Google Groups]8;;\[3]
▌[1] - mailto:support@lnav.org
▌[2] - https://discord.gg/erBPnKwz7R
@@ -92,9 +126,9 @@ The following alternatives are also available:
Links
- • Main Site[1]
- • Documentation[2] on Read the Docs
- • Internal Architecture[3]
+ • ]8;;https://lnav.org\Main Site]8;;\[1]
+ • ]8;;https://docs.lnav.org\Documentation]8;;\[2] on Read the Docs
+ • ]8;;ARCHITECTURE.md\Internal Architecture]8;;\[3]
▌[1] - https://lnav.org
▌[2] - https://docs.lnav.org
@@ -102,7 +136,7 @@ The following alternatives are also available:
Contributing
- • Become a Sponsor on GitHub[1]
+ • ]8;;https://github.com/sponsors/tstack\Become a Sponsor on GitHub]8;;\[1]
▌[1] - https://github.com/sponsors/tstack
@@ -115,18 +149,20 @@ The following software packages are required to build lnav:
• gcc/clang - A C++14-compatible compiler.
• libpcre2 - The Perl Compatible Regular Expression v2
(PCRE2) library.
- • sqlite - The SQLite database engine. Version 3.9.0
- or higher is required.
+ • sqlite - The SQLite database engine. Version
+ 3.9.0 or higher is required.
• ncurses - The ncurses text UI library.
• readline - The readline line editing library.
• zlib - The zlib compression library.
• bz2 - The bzip2 compression library.
• libcurl - The cURL library for downloading files
from URLs. Version 7.23.0 or higher is required.
- • libarchive - The libarchive library for opening archive
- files, like zip/tgz.
+ • libarchive - The libarchive library for opening
+ archive files, like zip/tgz.
• wireshark - The 'tshark' program is used to interpret
pcap files.
+ • cargo/rust - The Rust language is used to build the
+ PRQL compiler.
Build
@@ -141,9 +177,8 @@ Run  ./autogen.sh  if compiling from a cloned repository.
See Also
-Angle-grinder[1] is a tool to slice and dice log files on the
+]8;;https://github.com/rcoh/angle-grinder\Angle-grinder]8;;\[1] is a tool to slice and dice log files on the
command-line. If you're familiar with the SumoLogic query language,
you might find this tool more comfortable to work with.
▌[1] - https://github.com/rcoh/angle-grinder
-
diff --git a/test/expected/test_text_file.sh_e556fa91b91579df20d38540a5db9cedbaf68a62.err b/test/expected/test_text_file.sh_e556fa91b91579df20d38540a5db9cedbaf68a62.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_text_file.sh_e556fa91b91579df20d38540a5db9cedbaf68a62.err
diff --git a/test/expected/test_text_file.sh_e556fa91b91579df20d38540a5db9cedbaf68a62.out b/test/expected/test_text_file.sh_e556fa91b91579df20d38540a5db9cedbaf68a62.out
new file mode 100644
index 0000000..7d9e4f4
--- /dev/null
+++ b/test/expected/test_text_file.sh_e556fa91b91579df20d38540a5db9cedbaf68a62.out
@@ -0,0 +1,40 @@
+[
+ {
+ "top_meta": {
+ "file": "stdin",
+ "anchor": "#-owner-",
+ "breadcrumbs": [
+ {
+ "display_value": "stdin",
+ "search_placeholder": "",
+ "possibilities": [
+ {
+ "display_value": "stdin"
+ }
+ ]
+ },
+ {
+ "display_value": "[owner]",
+ "search_placeholder": "",
+ "possibilities": [
+ {
+ "display_value": "[database]"
+ },
+ {
+ "display_value": "[owner]"
+ },
+ {
+ "display_value": "[servers.alpha]"
+ },
+ {
+ "display_value": "[servers.beta]"
+ },
+ {
+ "display_value": "[servers]"
+ }
+ ]
+ }
+ ]
+ }
+ }
+]
diff --git a/test/expected/test_text_file.sh_f586ef080a86dfe1f981b345bcf8d7a279b2b247.err b/test/expected/test_text_file.sh_f586ef080a86dfe1f981b345bcf8d7a279b2b247.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_text_file.sh_f586ef080a86dfe1f981b345bcf8d7a279b2b247.err
diff --git a/test/expected/test_text_file.sh_f586ef080a86dfe1f981b345bcf8d7a279b2b247.out b/test/expected/test_text_file.sh_f586ef080a86dfe1f981b345bcf8d7a279b2b247.out
new file mode 100644
index 0000000..75a01e5
--- /dev/null
+++ b/test/expected/test_text_file.sh_f586ef080a86dfe1f981b345bcf8d7a279b2b247.out
@@ -0,0 +1,38 @@
+ECHO(1) General Commands Manual ECHO(1)
+
+NAME
+ echo – write arguments to the standard output
+
+SYNOPSIS
+ echo [-n] [string ...]
+
+DESCRIPTION
+ The echo utility writes any specified operands, separated by single blank
+ (‘ ’) characters and followed by a newline (‘\n’) character, to the
+ standard output.
+
+ The following option is available:
+
+ -n Do not print the trailing newline character. This may also be
+ achieved by appending ‘\c’ to the end of the string, as is done by
+ iBCS2 compatible systems. Note that this option as well as the
+ effect of ‘\c’ are implementation-defined in IEEE Std 1003.1-2001
+ (“POSIX.1”) as amended by Cor. 1-2002. Applications aiming for
+ maximum portability are strongly encouraged to use printf(1) to
+ suppress the newline character.
+
+ Some shells may provide a builtin echo command which is similar or
+ identical to this utility. Most notably, the builtin echo in sh(1) does
+ not accept the -n option. Consult the builtin(1) manual page.
+
+EXIT STATUS
+ The echo utility exits 0 on success, and >0 if an error occurs.
+
+SEE ALSO
+ builtin(1), csh(1), printf(1), sh(1)
+
+STANDARDS
+ The echo utility conforms to IEEE Std 1003.1-2001 (“POSIX.1”) as amended
+ by Cor. 1-2002.
+
+macOS 13.5 April 12, 2003 macOS 13.5
diff --git a/test/expected/test_text_file.sh_f7522b0a99550a3ff91aae6582eb861547c535e1.err b/test/expected/test_text_file.sh_f7522b0a99550a3ff91aae6582eb861547c535e1.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/expected/test_text_file.sh_f7522b0a99550a3ff91aae6582eb861547c535e1.err
diff --git a/test/expected/test_text_file.sh_f7522b0a99550a3ff91aae6582eb861547c535e1.out b/test/expected/test_text_file.sh_f7522b0a99550a3ff91aae6582eb861547c535e1.out
new file mode 100644
index 0000000..de58bb7
--- /dev/null
+++ b/test/expected/test_text_file.sh_f7522b0a99550a3ff91aae6582eb861547c535e1.out
@@ -0,0 +1,25 @@
+[
+ {
+ "top_meta": {
+ "file": "stdin",
+ "breadcrumbs": [
+ {
+ "display_value": "stdin",
+ "search_placeholder": "",
+ "possibilities": [
+ {
+ "display_value": "stdin"
+ }
+ ]
+ },
+ {
+ "display_value": "2013-06-06T19:13:20.123",
+ "search_placeholder": "",
+ "possibilities": [
+
+ ]
+ }
+ ]
+ }
+ }
+]
diff --git a/test/formats/jsontest/format.json b/test/formats/jsontest/format.json
index 333b8a9..63148ea 100644
--- a/test/formats/jsontest/format.json
+++ b/test/formats/jsontest/format.json
@@ -15,6 +15,15 @@
"field": "lvl",
"auto-width": true
},
+ {
+ "field": "logger",
+ "prefix": " <",
+ "suffix": ">",
+ "min-width": 20,
+ "max-width": 20,
+ "overflow": "abbrev",
+ "default-value": ""
+ },
" ",
{
"field": "msg"
@@ -33,6 +42,10 @@
"obj": {
"kind": "json"
},
+ "logger": {
+ "kind": "string",
+ "identifier": true
+ },
"lvl": {
"kind": "string",
"hidden": true
diff --git a/test/formats/jsontest/lnav-logstash.json b/test/formats/jsontest/lnav-logstash.json
index 27f9239..b821168 100644
--- a/test/formats/jsontest/lnav-logstash.json
+++ b/test/formats/jsontest/lnav-logstash.json
@@ -7,40 +7,48 @@
"json": true,
"hide-extra": false,
"file-pattern": "\\.clog.*",
- "multiline": false,
"line-format": [
- { "field" : "@timestamp" },
+ {
+ "field": "@timestamp"
+ },
" ",
- { "field" : "ipaddress" },
+ {
+ "field": "ipaddress"
+ },
" ",
- { "field" : "message" },
+ {
+ "field": "message"
+ },
" ",
- { "field" : "stack_trace", "default-value" : "" }
+ {
+ "field": "stack_trace",
+ "default-value": ""
+ }
],
- "timestamp-field" : "@timestamp",
- "body-field" : "message",
- "level-field" : "level",
- "level" : {
- "trace" : "TRACE",
- "debug" : "DEBUG",
- "info" : "INFO",
- "error" : "ERROR",
- "warning" : "WARN"
+ "timestamp-field": "@timestamp",
+ "body-field": "message",
+ "level-field": "level",
+ "level": {
+ "trace": "TRACE",
+ "debug": "DEBUG",
+ "info": "INFO",
+ "error": "ERROR",
+ "warning": "WARN"
},
- "value" : {
- "logger_name" : {
- "kind" : "string",
- "identifier" : true
+ "value": {
+ "logger_name": {
+ "kind": "string",
+ "identifier": true
},
- "ipaddress" : {
- "kind" : "string",
- "identifier" : true
+ "ipaddress": {
+ "kind": "string",
+ "identifier": true
},
- "level_value" : {
+ "level_value": {
"hidden": true
},
- "stack_trace" : {
- "kind" : "string"
+ "stack_trace": {
+ "kind": "string"
}
}
}
diff --git a/test/formats/jsontest/rewrite-user.lnav b/test/formats/jsontest/rewrite-user.lnav
index e34aa78..56ff500 100644
--- a/test/formats/jsontest/rewrite-user.lnav
+++ b/test/formats/jsontest/rewrite-user.lnav
@@ -1,2 +1,3 @@
-;SELECT 'mailto:' || :user
+;SELECT 'mailto:' || :user AS mt
+:echo $mt
diff --git a/test/formats/partitions/format.json b/test/formats/partitions/format.json
new file mode 100644
index 0000000..971c542
--- /dev/null
+++ b/test/formats/partitions/format.json
@@ -0,0 +1,11 @@
+{
+ "$schema": "https://lnav.org/schemas/format-v1.schema.json",
+ "syslog_log": {
+ "partitions": {
+ "dhclient-binding": {
+ "description": "Set partition name to current IP",
+ "pattern": " bound to ([^ ]+) --"
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/test/gharchive_log.jsonl b/test/gharchive_log.jsonl
new file mode 100644
index 0000000..e24bb00
--- /dev/null
+++ b/test/gharchive_log.jsonl
@@ -0,0 +1,50 @@
+{"id":"34502641367","type":"MemberEvent","actor":{"id":62330315,"login":"mujianwu","display_login":"mujianwu","gravatar_id":"","url":"https://api.github.com/users/mujianwu","avatar_url":"https://avatars.githubusercontent.com/u/62330315?"},"repo":{"id":708013309,"name":"Uotan-Dev/UotanWorkStation-ROM-Builder","url":"https://api.github.com/repos/Uotan-Dev/UotanWorkStation-ROM-Builder"},"payload":{"member":{"login":"Envoy-Z-Lab","id":152428796,"node_id":"U_kgDOCRXg_A","avatar_url":"https://avatars.githubusercontent.com/u/152428796?v=4","gravatar_id":"","url":"https://api.github.com/users/Envoy-Z-Lab","html_url":"https://github.com/Envoy-Z-Lab","followers_url":"https://api.github.com/users/Envoy-Z-Lab/followers","following_url":"https://api.github.com/users/Envoy-Z-Lab/following{/other_user}","gists_url":"https://api.github.com/users/Envoy-Z-Lab/gists{/gist_id}","starred_url":"https://api.github.com/users/Envoy-Z-Lab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Envoy-Z-Lab/subscriptions","organizations_url":"https://api.github.com/users/Envoy-Z-Lab/orgs","repos_url":"https://api.github.com/users/Envoy-Z-Lab/repos","events_url":"https://api.github.com/users/Envoy-Z-Lab/events{/privacy}","received_events_url":"https://api.github.com/users/Envoy-Z-Lab/received_events","type":"User","site_admin":false},"action":"added"},"public":true,"created_at":"2024-01-01T15:00:00Z","org":{"id":111175685,"login":"Uotan-Dev","gravatar_id":"","url":"https://api.github.com/orgs/Uotan-Dev","avatar_url":"https://avatars.githubusercontent.com/u/111175685?"}}
+{"id":"34502641374","type":"PushEvent","actor":{"id":153940760,"login":"mdmaid69","display_login":"mdmaid69","gravatar_id":"","url":"https://api.github.com/users/mdmaid69","avatar_url":"https://avatars.githubusercontent.com/u/153940760?"},"repo":{"id":732717980,"name":"mdmaid69/reimagined-giggle","url":"https://api.github.com/repos/mdmaid69/reimagined-giggle"},"payload":{"repository_id":732717980,"push_id":16466254513,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"e467bf0b03b2b6815806d33696c92898a0548aed","before":"dc8177f8b942a863ea4c1fb46f3cfcf773880d1b","commits":[{"sha":"e467bf0b03b2b6815806d33696c92898a0548aed","author":{"email":"robot@alexsyw.me","name":"mdmaid69"},"message":"float further safety possibly strike","distinct":true,"url":"https://api.github.com/repos/mdmaid69/reimagined-giggle/commits/e467bf0b03b2b6815806d33696c92898a0548aed"}]},"public":true,"created_at":"2024-01-01T15:00:00Z"}
+{"id":"34502641375","type":"ForkEvent","actor":{"id":137278716,"login":"SynthWave-Systems","display_login":"SynthWave-Systems","gravatar_id":"","url":"https://api.github.com/users/SynthWave-Systems","avatar_url":"https://avatars.githubusercontent.com/u/137278716?"},"repo":{"id":135763852,"name":"ampleforth/ampleforth-contracts","url":"https://api.github.com/repos/ampleforth/ampleforth-contracts"},"payload":{"forkee":{"id":737802483,"node_id":"R_kgDOK_n48w","name":"ampleforth-contracts","full_name":"SynthWave-Systems/ampleforth-contracts","private":false,"owner":{"login":"SynthWave-Systems","id":137278716,"node_id":"O_kgDOCC60_A","avatar_url":"https://avatars.githubusercontent.com/u/137278716?v=4","gravatar_id":"","url":"https://api.github.com/users/SynthWave-Systems","html_url":"https://github.com/SynthWave-Systems","followers_url":"https://api.github.com/users/SynthWave-Systems/followers","following_url":"https://api.github.com/users/SynthWave-Systems/following{/other_user}","gists_url":"https://api.github.com/users/SynthWave-Systems/gists{/gist_id}","starred_url":"https://api.github.com/users/SynthWave-Systems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SynthWave-Systems/subscriptions","organizations_url":"https://api.github.com/users/SynthWave-Systems/orgs","repos_url":"https://api.github.com/users/SynthWave-Systems/repos","events_url":"https://api.github.com/users/SynthWave-Systems/events{/privacy}","received_events_url":"https://api.github.com/users/SynthWave-Systems/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/SynthWave-Systems/ampleforth-contracts","description":"Smart contracts for Ampleforth Protocol (working name uFragments)","fork":true,"url":"https://api.github.com/repos/SynthWave-Systems/ampleforth-contracts","forks_url":"https://api.github.com/repos/SynthWave-Systems/ampleforth-contracts/forks","keys_url":"https://api.github.com/repos/SynthWave-Systems/ampleforth-contracts/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SynthWave-Systems/ampleforth-contracts/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SynthWave-Systems/ampleforth-contracts/teams","hooks_url":"https://api.github.com/repos/SynthWave-Systems/ampleforth-contracts/hooks","issue_events_url":"https://api.github.com/repos/SynthWave-Systems/ampleforth-contracts/issues/events{/number}","events_url":"https://api.github.com/repos/SynthWave-Systems/ampleforth-contracts/events","assignees_url":"https://api.github.com/repos/SynthWave-Systems/ampleforth-contracts/assignees{/user}","branches_url":"https://api.github.com/repos/SynthWave-Systems/ampleforth-contracts/branches{/branch}","tags_url":"https://api.github.com/repos/SynthWave-Systems/ampleforth-contracts/tags","blobs_url":"https://api.github.com/repos/SynthWave-Systems/ampleforth-contracts/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SynthWave-Systems/ampleforth-contracts/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SynthWave-Systems/ampleforth-contracts/git/refs{/sha}","trees_url":"https://api.github.com/repos/SynthWave-Systems/ampleforth-contracts/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SynthWave-Systems/ampleforth-contracts/statuses/{sha}","languages_url":"https://api.github.com/repos/SynthWave-Systems/ampleforth-contracts/languages","stargazers_url":"https://api.github.com/repos/SynthWave-Systems/ampleforth-contracts/stargazers","contributors_url":"https://api.github.com/repos/SynthWave-Systems/ampleforth-contracts/contributors","subscribers_url":"https://api.github.com/repos/SynthWave-Systems/ampleforth-contracts/subscribers","subscription_url":"https://api.github.com/repos/SynthWave-Systems/ampleforth-contracts/subscription","commits_url":"https://api.github.com/repos/SynthWave-Systems/ampleforth-contracts/commits{/sha}","git_commits_url":"https://api.github.com/repos/SynthWave-Systems/ampleforth-contracts/git/commits{/sha}","comments_url":"https://api.github.com/repos/SynthWave-Systems/ampleforth-contracts/comments{/number}","issue_comment_url":"https://api.github.com/repos/SynthWave-Systems/ampleforth-contracts/issues/comments{/number}","contents_url":"https://api.github.com/repos/SynthWave-Systems/ampleforth-contracts/contents/{+path}","compare_url":"https://api.github.com/repos/SynthWave-Systems/ampleforth-contracts/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SynthWave-Systems/ampleforth-contracts/merges","archive_url":"https://api.github.com/repos/SynthWave-Systems/ampleforth-contracts/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SynthWave-Systems/ampleforth-contracts/downloads","issues_url":"https://api.github.com/repos/SynthWave-Systems/ampleforth-contracts/issues{/number}","pulls_url":"https://api.github.com/repos/SynthWave-Systems/ampleforth-contracts/pulls{/number}","milestones_url":"https://api.github.com/repos/SynthWave-Systems/ampleforth-contracts/milestones{/number}","notifications_url":"https://api.github.com/repos/SynthWave-Systems/ampleforth-contracts/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SynthWave-Systems/ampleforth-contracts/labels{/name}","releases_url":"https://api.github.com/repos/SynthWave-Systems/ampleforth-contracts/releases{/id}","deployments_url":"https://api.github.com/repos/SynthWave-Systems/ampleforth-contracts/deployments","created_at":"2024-01-01T14:59:38Z","updated_at":"2024-01-01T14:59:38Z","pushed_at":"2023-10-27T15:10:53Z","git_url":"git://github.com/SynthWave-Systems/ampleforth-contracts.git","ssh_url":"git@github.com:SynthWave-Systems/ampleforth-contracts.git","clone_url":"https://github.com/SynthWave-Systems/ampleforth-contracts.git","svn_url":"https://github.com/SynthWave-Systems/ampleforth-contracts","homepage":"https://ampleforth.org","size":2726,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"has_discussions":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":null,"allow_forking":true,"is_template":false,"web_commit_signoff_required":false,"topics":[],"visibility":"public","forks":0,"open_issues":0,"watchers":0,"default_branch":"main","public":true}},"public":true,"created_at":"2024-01-01T15:00:00Z","org":{"id":36210657,"login":"ampleforth","gravatar_id":"","url":"https://api.github.com/orgs/ampleforth","avatar_url":"https://avatars.githubusercontent.com/u/36210657?"}}
+{"id":"34502641376","type":"PullRequestEvent","actor":{"id":40026159,"login":"tobexyz","display_login":"tobexyz","gravatar_id":"","url":"https://api.github.com/users/tobexyz","avatar_url":"https://avatars.githubusercontent.com/u/40026159?"},"repo":{"id":156070344,"name":"tobexyz/yaacc-code","url":"https://api.github.com/repos/tobexyz/yaacc-code"},"payload":{"action":"closed","number":90,"pull_request":{"url":"https://api.github.com/repos/tobexyz/yaacc-code/pulls/90","id":1661123987,"node_id":"PR_kwDOCU1xyM5jAr2T","html_url":"https://github.com/tobexyz/yaacc-code/pull/90","diff_url":"https://github.com/tobexyz/yaacc-code/pull/90.diff","patch_url":"https://github.com/tobexyz/yaacc-code/pull/90.patch","issue_url":"https://api.github.com/repos/tobexyz/yaacc-code/issues/90","number":90,"state":"closed","locked":false,"title":"merge latest release to master","user":{"login":"tobexyz","id":40026159,"node_id":"MDQ6VXNlcjQwMDI2MTU5","avatar_url":"https://avatars.githubusercontent.com/u/40026159?v=4","gravatar_id":"","url":"https://api.github.com/users/tobexyz","html_url":"https://github.com/tobexyz","followers_url":"https://api.github.com/users/tobexyz/followers","following_url":"https://api.github.com/users/tobexyz/following{/other_user}","gists_url":"https://api.github.com/users/tobexyz/gists{/gist_id}","starred_url":"https://api.github.com/users/tobexyz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobexyz/subscriptions","organizations_url":"https://api.github.com/users/tobexyz/orgs","repos_url":"https://api.github.com/users/tobexyz/repos","events_url":"https://api.github.com/users/tobexyz/events{/privacy}","received_events_url":"https://api.github.com/users/tobexyz/received_events","type":"User","site_admin":false},"body":null,"created_at":"2024-01-01T14:59:25Z","updated_at":"2024-01-01T14:59:38Z","closed_at":"2024-01-01T14:59:38Z","merged_at":"2024-01-01T14:59:38Z","merge_commit_sha":"ea0371c4d11b0dc46a1f8015b5d6730394fa8c00","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"draft":false,"commits_url":"https://api.github.com/repos/tobexyz/yaacc-code/pulls/90/commits","review_comments_url":"https://api.github.com/repos/tobexyz/yaacc-code/pulls/90/comments","review_comment_url":"https://api.github.com/repos/tobexyz/yaacc-code/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tobexyz/yaacc-code/issues/90/comments","statuses_url":"https://api.github.com/repos/tobexyz/yaacc-code/statuses/e6bb06202e68504da818ff5428915d1da3f19e51","head":{"label":"tobexyz:develop","ref":"develop","sha":"e6bb06202e68504da818ff5428915d1da3f19e51","user":{"login":"tobexyz","id":40026159,"node_id":"MDQ6VXNlcjQwMDI2MTU5","avatar_url":"https://avatars.githubusercontent.com/u/40026159?v=4","gravatar_id":"","url":"https://api.github.com/users/tobexyz","html_url":"https://github.com/tobexyz","followers_url":"https://api.github.com/users/tobexyz/followers","following_url":"https://api.github.com/users/tobexyz/following{/other_user}","gists_url":"https://api.github.com/users/tobexyz/gists{/gist_id}","starred_url":"https://api.github.com/users/tobexyz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobexyz/subscriptions","organizations_url":"https://api.github.com/users/tobexyz/orgs","repos_url":"https://api.github.com/users/tobexyz/repos","events_url":"https://api.github.com/users/tobexyz/events{/privacy}","received_events_url":"https://api.github.com/users/tobexyz/received_events","type":"User","site_admin":false},"repo":{"id":156070344,"node_id":"MDEwOlJlcG9zaXRvcnkxNTYwNzAzNDQ=","name":"yaacc-code","full_name":"tobexyz/yaacc-code","private":false,"owner":{"login":"tobexyz","id":40026159,"node_id":"MDQ6VXNlcjQwMDI2MTU5","avatar_url":"https://avatars.githubusercontent.com/u/40026159?v=4","gravatar_id":"","url":"https://api.github.com/users/tobexyz","html_url":"https://github.com/tobexyz","followers_url":"https://api.github.com/users/tobexyz/followers","following_url":"https://api.github.com/users/tobexyz/following{/other_user}","gists_url":"https://api.github.com/users/tobexyz/gists{/gist_id}","starred_url":"https://api.github.com/users/tobexyz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobexyz/subscriptions","organizations_url":"https://api.github.com/users/tobexyz/orgs","repos_url":"https://api.github.com/users/tobexyz/repos","events_url":"https://api.github.com/users/tobexyz/events{/privacy}","received_events_url":"https://api.github.com/users/tobexyz/received_events","type":"User","site_admin":false},"html_url":"https://github.com/tobexyz/yaacc-code","description":"YAACC - UPNP Client and Server","fork":true,"url":"https://api.github.com/repos/tobexyz/yaacc-code","forks_url":"https://api.github.com/repos/tobexyz/yaacc-code/forks","keys_url":"https://api.github.com/repos/tobexyz/yaacc-code/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tobexyz/yaacc-code/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tobexyz/yaacc-code/teams","hooks_url":"https://api.github.com/repos/tobexyz/yaacc-code/hooks","issue_events_url":"https://api.github.com/repos/tobexyz/yaacc-code/issues/events{/number}","events_url":"https://api.github.com/repos/tobexyz/yaacc-code/events","assignees_url":"https://api.github.com/repos/tobexyz/yaacc-code/assignees{/user}","branches_url":"https://api.github.com/repos/tobexyz/yaacc-code/branches{/branch}","tags_url":"https://api.github.com/repos/tobexyz/yaacc-code/tags","blobs_url":"https://api.github.com/repos/tobexyz/yaacc-code/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tobexyz/yaacc-code/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tobexyz/yaacc-code/git/refs{/sha}","trees_url":"https://api.github.com/repos/tobexyz/yaacc-code/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tobexyz/yaacc-code/statuses/{sha}","languages_url":"https://api.github.com/repos/tobexyz/yaacc-code/languages","stargazers_url":"https://api.github.com/repos/tobexyz/yaacc-code/stargazers","contributors_url":"https://api.github.com/repos/tobexyz/yaacc-code/contributors","subscribers_url":"https://api.github.com/repos/tobexyz/yaacc-code/subscribers","subscription_url":"https://api.github.com/repos/tobexyz/yaacc-code/subscription","commits_url":"https://api.github.com/repos/tobexyz/yaacc-code/commits{/sha}","git_commits_url":"https://api.github.com/repos/tobexyz/yaacc-code/git/commits{/sha}","comments_url":"https://api.github.com/repos/tobexyz/yaacc-code/comments{/number}","issue_comment_url":"https://api.github.com/repos/tobexyz/yaacc-code/issues/comments{/number}","contents_url":"https://api.github.com/repos/tobexyz/yaacc-code/contents/{+path}","compare_url":"https://api.github.com/repos/tobexyz/yaacc-code/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tobexyz/yaacc-code/merges","archive_url":"https://api.github.com/repos/tobexyz/yaacc-code/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tobexyz/yaacc-code/downloads","issues_url":"https://api.github.com/repos/tobexyz/yaacc-code/issues{/number}","pulls_url":"https://api.github.com/repos/tobexyz/yaacc-code/pulls{/number}","milestones_url":"https://api.github.com/repos/tobexyz/yaacc-code/milestones{/number}","notifications_url":"https://api.github.com/repos/tobexyz/yaacc-code/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tobexyz/yaacc-code/labels{/name}","releases_url":"https://api.github.com/repos/tobexyz/yaacc-code/releases{/id}","deployments_url":"https://api.github.com/repos/tobexyz/yaacc-code/deployments","created_at":"2018-11-04T10:21:57Z","updated_at":"2024-01-01T14:56:58Z","pushed_at":"2024-01-01T14:59:38Z","git_url":"git://github.com/tobexyz/yaacc-code.git","ssh_url":"git@github.com:tobexyz/yaacc-code.git","clone_url":"https://github.com/tobexyz/yaacc-code.git","svn_url":"https://github.com/tobexyz/yaacc-code","homepage":"","size":23761,"stargazers_count":81,"watchers_count":81,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"has_discussions":true,"forks_count":10,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":7,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"allow_forking":true,"is_template":false,"web_commit_signoff_required":false,"topics":["android-app","dlna","dlna-mediarenderer","dlna-player","dlna-server","dlna-upnp","upnp","upnp-av","upnp-content-directory","upnp-renderer"],"visibility":"public","forks":10,"open_issues":7,"watchers":81,"default_branch":"develop"}},"base":{"label":"tobexyz:master","ref":"master","sha":"369468d82f2e237b4f29b48e3d3057bf6fbcc78e","user":{"login":"tobexyz","id":40026159,"node_id":"MDQ6VXNlcjQwMDI2MTU5","avatar_url":"https://avatars.githubusercontent.com/u/40026159?v=4","gravatar_id":"","url":"https://api.github.com/users/tobexyz","html_url":"https://github.com/tobexyz","followers_url":"https://api.github.com/users/tobexyz/followers","following_url":"https://api.github.com/users/tobexyz/following{/other_user}","gists_url":"https://api.github.com/users/tobexyz/gists{/gist_id}","starred_url":"https://api.github.com/users/tobexyz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobexyz/subscriptions","organizations_url":"https://api.github.com/users/tobexyz/orgs","repos_url":"https://api.github.com/users/tobexyz/repos","events_url":"https://api.github.com/users/tobexyz/events{/privacy}","received_events_url":"https://api.github.com/users/tobexyz/received_events","type":"User","site_admin":false},"repo":{"id":156070344,"node_id":"MDEwOlJlcG9zaXRvcnkxNTYwNzAzNDQ=","name":"yaacc-code","full_name":"tobexyz/yaacc-code","private":false,"owner":{"login":"tobexyz","id":40026159,"node_id":"MDQ6VXNlcjQwMDI2MTU5","avatar_url":"https://avatars.githubusercontent.com/u/40026159?v=4","gravatar_id":"","url":"https://api.github.com/users/tobexyz","html_url":"https://github.com/tobexyz","followers_url":"https://api.github.com/users/tobexyz/followers","following_url":"https://api.github.com/users/tobexyz/following{/other_user}","gists_url":"https://api.github.com/users/tobexyz/gists{/gist_id}","starred_url":"https://api.github.com/users/tobexyz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobexyz/subscriptions","organizations_url":"https://api.github.com/users/tobexyz/orgs","repos_url":"https://api.github.com/users/tobexyz/repos","events_url":"https://api.github.com/users/tobexyz/events{/privacy}","received_events_url":"https://api.github.com/users/tobexyz/received_events","type":"User","site_admin":false},"html_url":"https://github.com/tobexyz/yaacc-code","description":"YAACC - UPNP Client and Server","fork":true,"url":"https://api.github.com/repos/tobexyz/yaacc-code","forks_url":"https://api.github.com/repos/tobexyz/yaacc-code/forks","keys_url":"https://api.github.com/repos/tobexyz/yaacc-code/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tobexyz/yaacc-code/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tobexyz/yaacc-code/teams","hooks_url":"https://api.github.com/repos/tobexyz/yaacc-code/hooks","issue_events_url":"https://api.github.com/repos/tobexyz/yaacc-code/issues/events{/number}","events_url":"https://api.github.com/repos/tobexyz/yaacc-code/events","assignees_url":"https://api.github.com/repos/tobexyz/yaacc-code/assignees{/user}","branches_url":"https://api.github.com/repos/tobexyz/yaacc-code/branches{/branch}","tags_url":"https://api.github.com/repos/tobexyz/yaacc-code/tags","blobs_url":"https://api.github.com/repos/tobexyz/yaacc-code/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tobexyz/yaacc-code/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tobexyz/yaacc-code/git/refs{/sha}","trees_url":"https://api.github.com/repos/tobexyz/yaacc-code/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tobexyz/yaacc-code/statuses/{sha}","languages_url":"https://api.github.com/repos/tobexyz/yaacc-code/languages","stargazers_url":"https://api.github.com/repos/tobexyz/yaacc-code/stargazers","contributors_url":"https://api.github.com/repos/tobexyz/yaacc-code/contributors","subscribers_url":"https://api.github.com/repos/tobexyz/yaacc-code/subscribers","subscription_url":"https://api.github.com/repos/tobexyz/yaacc-code/subscription","commits_url":"https://api.github.com/repos/tobexyz/yaacc-code/commits{/sha}","git_commits_url":"https://api.github.com/repos/tobexyz/yaacc-code/git/commits{/sha}","comments_url":"https://api.github.com/repos/tobexyz/yaacc-code/comments{/number}","issue_comment_url":"https://api.github.com/repos/tobexyz/yaacc-code/issues/comments{/number}","contents_url":"https://api.github.com/repos/tobexyz/yaacc-code/contents/{+path}","compare_url":"https://api.github.com/repos/tobexyz/yaacc-code/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tobexyz/yaacc-code/merges","archive_url":"https://api.github.com/repos/tobexyz/yaacc-code/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tobexyz/yaacc-code/downloads","issues_url":"https://api.github.com/repos/tobexyz/yaacc-code/issues{/number}","pulls_url":"https://api.github.com/repos/tobexyz/yaacc-code/pulls{/number}","milestones_url":"https://api.github.com/repos/tobexyz/yaacc-code/milestones{/number}","notifications_url":"https://api.github.com/repos/tobexyz/yaacc-code/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tobexyz/yaacc-code/labels{/name}","releases_url":"https://api.github.com/repos/tobexyz/yaacc-code/releases{/id}","deployments_url":"https://api.github.com/repos/tobexyz/yaacc-code/deployments","created_at":"2018-11-04T10:21:57Z","updated_at":"2024-01-01T14:56:58Z","pushed_at":"2024-01-01T14:59:38Z","git_url":"git://github.com/tobexyz/yaacc-code.git","ssh_url":"git@github.com:tobexyz/yaacc-code.git","clone_url":"https://github.com/tobexyz/yaacc-code.git","svn_url":"https://github.com/tobexyz/yaacc-code","homepage":"","size":23761,"stargazers_count":81,"watchers_count":81,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"has_discussions":true,"forks_count":10,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":7,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"allow_forking":true,"is_template":false,"web_commit_signoff_required":false,"topics":["android-app","dlna","dlna-mediarenderer","dlna-player","dlna-server","dlna-upnp","upnp","upnp-av","upnp-content-directory","upnp-renderer"],"visibility":"public","forks":10,"open_issues":7,"watchers":81,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/tobexyz/yaacc-code/pulls/90"},"html":{"href":"https://github.com/tobexyz/yaacc-code/pull/90"},"issue":{"href":"https://api.github.com/repos/tobexyz/yaacc-code/issues/90"},"comments":{"href":"https://api.github.com/repos/tobexyz/yaacc-code/issues/90/comments"},"review_comments":{"href":"https://api.github.com/repos/tobexyz/yaacc-code/pulls/90/comments"},"review_comment":{"href":"https://api.github.com/repos/tobexyz/yaacc-code/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tobexyz/yaacc-code/pulls/90/commits"},"statuses":{"href":"https://api.github.com/repos/tobexyz/yaacc-code/statuses/e6bb06202e68504da818ff5428915d1da3f19e51"}},"author_association":"OWNER","auto_merge":null,"active_lock_reason":null,"merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"tobexyz","id":40026159,"node_id":"MDQ6VXNlcjQwMDI2MTU5","avatar_url":"https://avatars.githubusercontent.com/u/40026159?v=4","gravatar_id":"","url":"https://api.github.com/users/tobexyz","html_url":"https://github.com/tobexyz","followers_url":"https://api.github.com/users/tobexyz/followers","following_url":"https://api.github.com/users/tobexyz/following{/other_user}","gists_url":"https://api.github.com/users/tobexyz/gists{/gist_id}","starred_url":"https://api.github.com/users/tobexyz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobexyz/subscriptions","organizations_url":"https://api.github.com/users/tobexyz/orgs","repos_url":"https://api.github.com/users/tobexyz/repos","events_url":"https://api.github.com/users/tobexyz/events{/privacy}","received_events_url":"https://api.github.com/users/tobexyz/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":5,"additions":11,"deletions":3,"changed_files":4}},"public":true,"created_at":"2024-01-01T15:00:00Z"}
+{"id":"34502641379","type":"PushEvent","actor":{"id":155086649,"login":"dim12512a","display_login":"dim12512a","gravatar_id":"","url":"https://api.github.com/users/dim12512a","avatar_url":"https://avatars.githubusercontent.com/u/155086649?"},"repo":{"id":737073761,"name":"dim12512a/Repo5","url":"https://api.github.com/repos/dim12512a/Repo5"},"payload":{"repository_id":737073761,"push_id":16466254392,"size":1,"distinct_size":1,"ref":"refs/heads/main","head":"c34fd919a5cd9b7eb8bad07dab60c2f5a6c65d27","before":"1112698dbd122cbce6d35d4c28ea6b5831dae611","commits":[{"sha":"c34fd919a5cd9b7eb8bad07dab60c2f5a6c65d27","author":{"email":"you@example.com","name":"Your Name"},"message":"Empty Commit","distinct":true,"url":"https://api.github.com/repos/dim12512a/Repo5/commits/c34fd919a5cd9b7eb8bad07dab60c2f5a6c65d27"}]},"public":true,"created_at":"2024-01-01T15:00:00Z"}
+{"id":"34502641382","type":"PushEvent","actor":{"id":97979094,"login":"github-shvabra","display_login":"github-shvabra","gravatar_id":"","url":"https://api.github.com/users/github-shvabra","avatar_url":"https://avatars.githubusercontent.com/u/97979094?"},"repo":{"id":642858622,"name":"saby/ios-sabycom","url":"https://api.github.com/repos/saby/ios-sabycom"},"payload":{"repository_id":642858622,"push_id":16466254503,"size":1,"distinct_size":1,"ref":"refs/heads/rc-23.7146","head":"b4718c5f554b72883fd130fa4e93fdd16b51e7b9","before":"1fa2bca104d44016761a7baaaa4e72481e61bd0c","commits":[{"sha":"b4718c5f554b72883fd130fa4e93fdd16b51e7b9","author":{"email":"unix-prog_server@unix.tensor.ru@sbis-dev-mon.unix.tensor.ru","name":"Служебный пользователь Инц №52255"},"message":"new change","distinct":true,"url":"https://api.github.com/repos/saby/ios-sabycom/commits/b4718c5f554b72883fd130fa4e93fdd16b51e7b9"}]},"public":true,"created_at":"2024-01-01T15:00:00Z","org":{"id":42994484,"login":"saby","gravatar_id":"","url":"https://api.github.com/orgs/saby","avatar_url":"https://avatars.githubusercontent.com/u/42994484?"}}
+{"id":"34502641385","type":"CreateEvent","actor":{"id":72511388,"login":"roman1923","display_login":"roman1923","gravatar_id":"","url":"https://api.github.com/users/roman1923","avatar_url":"https://avatars.githubusercontent.com/u/72511388?"},"repo":{"id":737802482,"name":"roman1923/no-woo-small-cta-fast-food-shop","url":"https://api.github.com/repos/roman1923/no-woo-small-cta-fast-food-shop"},"payload":{"ref":null,"ref_type":"repository","master_branch":"main","description":null,"pusher_type":"user"},"public":true,"created_at":"2024-01-01T15:00:00Z"}
+{"id":"34502641391","type":"PushEvent","actor":{"id":155086563,"login":"appref5555ix63","display_login":"appref5555ix63","gravatar_id":"","url":"https://api.github.com/users/appref5555ix63","avatar_url":"https://avatars.githubusercontent.com/u/155086563?"},"repo":{"id":737072728,"name":"appref5555ix63/Repo4","url":"https://api.github.com/repos/appref5555ix63/Repo4"},"payload":{"repository_id":737072728,"push_id":16466254439,"size":1,"distinct_size":1,"ref":"refs/heads/main","head":"5abbda1f863eee520965bbd7f1560381ef0106c7","before":"29b8e44e30ceb1ba91988fe40495122194516696","commits":[{"sha":"5abbda1f863eee520965bbd7f1560381ef0106c7","author":{"email":"you@example.com","name":"Your Name"},"message":"Empty Commit","distinct":true,"url":"https://api.github.com/repos/appref5555ix63/Repo4/commits/5abbda1f863eee520965bbd7f1560381ef0106c7"}]},"public":true,"created_at":"2024-01-01T15:00:00Z"}
+{"id":"34502641392","type":"PullRequestReviewEvent","actor":{"id":116707505,"login":"megusasuke0","display_login":"megusasuke0","gravatar_id":"","url":"https://api.github.com/users/megusasuke0","avatar_url":"https://avatars.githubusercontent.com/u/116707505?"},"repo":{"id":737461382,"name":"megusasuke0/frontendhandson","url":"https://api.github.com/repos/megusasuke0/frontendhandson"},"payload":{"action":"created","review":{"id":1799820649,"node_id":"PRR_kwDOK_TEhs5rRxVp","user":{"login":"megusasuke0","id":116707505,"node_id":"U_kgDOBvTQsQ","avatar_url":"https://avatars.githubusercontent.com/u/116707505?v=4","gravatar_id":"","url":"https://api.github.com/users/megusasuke0","html_url":"https://github.com/megusasuke0","followers_url":"https://api.github.com/users/megusasuke0/followers","following_url":"https://api.github.com/users/megusasuke0/following{/other_user}","gists_url":"https://api.github.com/users/megusasuke0/gists{/gist_id}","starred_url":"https://api.github.com/users/megusasuke0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/megusasuke0/subscriptions","organizations_url":"https://api.github.com/users/megusasuke0/orgs","repos_url":"https://api.github.com/users/megusasuke0/repos","events_url":"https://api.github.com/users/megusasuke0/events{/privacy}","received_events_url":"https://api.github.com/users/megusasuke0/received_events","type":"User","site_admin":false},"body":null,"commit_id":"e41de9e65b59484d0d70648ac6ebada6e4696d43","submitted_at":"2024-01-01T14:59:38Z","state":"commented","html_url":"https://github.com/megusasuke0/frontendhandson/pull/1#pullrequestreview-1799820649","pull_request_url":"https://api.github.com/repos/megusasuke0/frontendhandson/pulls/1","author_association":"OWNER","_links":{"html":{"href":"https://github.com/megusasuke0/frontendhandson/pull/1#pullrequestreview-1799820649"},"pull_request":{"href":"https://api.github.com/repos/megusasuke0/frontendhandson/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/megusasuke0/frontendhandson/pulls/1","id":1660877925,"node_id":"PR_kwDOK_TEhs5i_vxl","html_url":"https://github.com/megusasuke0/frontendhandson/pull/1","diff_url":"https://github.com/megusasuke0/frontendhandson/pull/1.diff","patch_url":"https://github.com/megusasuke0/frontendhandson/pull/1.patch","issue_url":"https://api.github.com/repos/megusasuke0/frontendhandson/issues/1","number":1,"state":"open","locked":false,"title":"Feature/lesson01","user":{"login":"megusasuke0","id":116707505,"node_id":"U_kgDOBvTQsQ","avatar_url":"https://avatars.githubusercontent.com/u/116707505?v=4","gravatar_id":"","url":"https://api.github.com/users/megusasuke0","html_url":"https://github.com/megusasuke0","followers_url":"https://api.github.com/users/megusasuke0/followers","following_url":"https://api.github.com/users/megusasuke0/following{/other_user}","gists_url":"https://api.github.com/users/megusasuke0/gists{/gist_id}","starred_url":"https://api.github.com/users/megusasuke0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/megusasuke0/subscriptions","organizations_url":"https://api.github.com/users/megusasuke0/orgs","repos_url":"https://api.github.com/users/megusasuke0/repos","events_url":"https://api.github.com/users/megusasuke0/events{/privacy}","received_events_url":"https://api.github.com/users/megusasuke0/received_events","type":"User","site_admin":false},"body":"# [Issue No.1](https://github.com/kenmori/handsonFrontend/blob/master/work/markup/1.md#)\r\n- このDOMをhtml内のulの中に差し込んでください\r\n`<li>これです</li>`\r\n## [stackblitz](https://stackblitz.com/github/megusasuke0/frontendhandson/tree/feature/lesson01?file=1%2Findex.js)\r\n## Concerns and areas to focus on\r\n--------------------------------\r\n- This is my first PR.\r\nI’m so appreciative of your kindness!\r\nPlease teach me how to write JS code and PR sentences. \r\nThank you.\r\n--------------------------------\r\nI pasted the site I referenced below.\r\n--------------------------------\r\nchatGPT prompt:\"javascript DOM作成 li テキスト「これです」\"\r\nreference: #https://www.wakuwakubank.com/posts/306-javascript-dom/#index_id4\r\nreference: #https://stackoverflow.com/questions/50250214/how-to-use-insertbefore-without-second-parameter\r\n","created_at":"2024-01-01T05:29:44Z","updated_at":"2024-01-01T14:59:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"96e9f074fe41c27e20b6aacfbd372ea39edce179","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"draft":false,"commits_url":"https://api.github.com/repos/megusasuke0/frontendhandson/pulls/1/commits","review_comments_url":"https://api.github.com/repos/megusasuke0/frontendhandson/pulls/1/comments","review_comment_url":"https://api.github.com/repos/megusasuke0/frontendhandson/pulls/comments{/number}","comments_url":"https://api.github.com/repos/megusasuke0/frontendhandson/issues/1/comments","statuses_url":"https://api.github.com/repos/megusasuke0/frontendhandson/statuses/d1cd14bfa81aaa8d39ce0a8fd4d90cb7be53f627","head":{"label":"megusasuke0:feature/lesson01","ref":"feature/lesson01","sha":"d1cd14bfa81aaa8d39ce0a8fd4d90cb7be53f627","user":{"login":"megusasuke0","id":116707505,"node_id":"U_kgDOBvTQsQ","avatar_url":"https://avatars.githubusercontent.com/u/116707505?v=4","gravatar_id":"","url":"https://api.github.com/users/megusasuke0","html_url":"https://github.com/megusasuke0","followers_url":"https://api.github.com/users/megusasuke0/followers","following_url":"https://api.github.com/users/megusasuke0/following{/other_user}","gists_url":"https://api.github.com/users/megusasuke0/gists{/gist_id}","starred_url":"https://api.github.com/users/megusasuke0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/megusasuke0/subscriptions","organizations_url":"https://api.github.com/users/megusasuke0/orgs","repos_url":"https://api.github.com/users/megusasuke0/repos","events_url":"https://api.github.com/users/megusasuke0/events{/privacy}","received_events_url":"https://api.github.com/users/megusasuke0/received_events","type":"User","site_admin":false},"repo":{"id":737461382,"node_id":"R_kgDOK_TEhg","name":"frontendhandson","full_name":"megusasuke0/frontendhandson","private":false,"owner":{"login":"megusasuke0","id":116707505,"node_id":"U_kgDOBvTQsQ","avatar_url":"https://avatars.githubusercontent.com/u/116707505?v=4","gravatar_id":"","url":"https://api.github.com/users/megusasuke0","html_url":"https://github.com/megusasuke0","followers_url":"https://api.github.com/users/megusasuke0/followers","following_url":"https://api.github.com/users/megusasuke0/following{/other_user}","gists_url":"https://api.github.com/users/megusasuke0/gists{/gist_id}","starred_url":"https://api.github.com/users/megusasuke0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/megusasuke0/subscriptions","organizations_url":"https://api.github.com/users/megusasuke0/orgs","repos_url":"https://api.github.com/users/megusasuke0/repos","events_url":"https://api.github.com/users/megusasuke0/events{/privacy}","received_events_url":"https://api.github.com/users/megusasuke0/received_events","type":"User","site_admin":false},"html_url":"https://github.com/megusasuke0/frontendhandson","description":"Created with StackBlitz ⚡️","fork":false,"url":"https://api.github.com/repos/megusasuke0/frontendhandson","forks_url":"https://api.github.com/repos/megusasuke0/frontendhandson/forks","keys_url":"https://api.github.com/repos/megusasuke0/frontendhandson/keys{/key_id}","collaborators_url":"https://api.github.com/repos/megusasuke0/frontendhandson/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/megusasuke0/frontendhandson/teams","hooks_url":"https://api.github.com/repos/megusasuke0/frontendhandson/hooks","issue_events_url":"https://api.github.com/repos/megusasuke0/frontendhandson/issues/events{/number}","events_url":"https://api.github.com/repos/megusasuke0/frontendhandson/events","assignees_url":"https://api.github.com/repos/megusasuke0/frontendhandson/assignees{/user}","branches_url":"https://api.github.com/repos/megusasuke0/frontendhandson/branches{/branch}","tags_url":"https://api.github.com/repos/megusasuke0/frontendhandson/tags","blobs_url":"https://api.github.com/repos/megusasuke0/frontendhandson/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/megusasuke0/frontendhandson/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/megusasuke0/frontendhandson/git/refs{/sha}","trees_url":"https://api.github.com/repos/megusasuke0/frontendhandson/git/trees{/sha}","statuses_url":"https://api.github.com/repos/megusasuke0/frontendhandson/statuses/{sha}","languages_url":"https://api.github.com/repos/megusasuke0/frontendhandson/languages","stargazers_url":"https://api.github.com/repos/megusasuke0/frontendhandson/stargazers","contributors_url":"https://api.github.com/repos/megusasuke0/frontendhandson/contributors","subscribers_url":"https://api.github.com/repos/megusasuke0/frontendhandson/subscribers","subscription_url":"https://api.github.com/repos/megusasuke0/frontendhandson/subscription","commits_url":"https://api.github.com/repos/megusasuke0/frontendhandson/commits{/sha}","git_commits_url":"https://api.github.com/repos/megusasuke0/frontendhandson/git/commits{/sha}","comments_url":"https://api.github.com/repos/megusasuke0/frontendhandson/comments{/number}","issue_comment_url":"https://api.github.com/repos/megusasuke0/frontendhandson/issues/comments{/number}","contents_url":"https://api.github.com/repos/megusasuke0/frontendhandson/contents/{+path}","compare_url":"https://api.github.com/repos/megusasuke0/frontendhandson/compare/{base}...{head}","merges_url":"https://api.github.com/repos/megusasuke0/frontendhandson/merges","archive_url":"https://api.github.com/repos/megusasuke0/frontendhandson/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/megusasuke0/frontendhandson/downloads","issues_url":"https://api.github.com/repos/megusasuke0/frontendhandson/issues{/number}","pulls_url":"https://api.github.com/repos/megusasuke0/frontendhandson/pulls{/number}","milestones_url":"https://api.github.com/repos/megusasuke0/frontendhandson/milestones{/number}","notifications_url":"https://api.github.com/repos/megusasuke0/frontendhandson/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/megusasuke0/frontendhandson/labels{/name}","releases_url":"https://api.github.com/repos/megusasuke0/frontendhandson/releases{/id}","deployments_url":"https://api.github.com/repos/megusasuke0/frontendhandson/deployments","created_at":"2023-12-31T05:41:42Z","updated_at":"2023-12-31T05:41:49Z","pushed_at":"2024-01-01T14:56:47Z","git_url":"git://github.com/megusasuke0/frontendhandson.git","ssh_url":"git@github.com:megusasuke0/frontendhandson.git","clone_url":"https://github.com/megusasuke0/frontendhandson.git","svn_url":"https://github.com/megusasuke0/frontendhandson","homepage":"https://stackblitz.com/edit/web-platform-kr2hi6","size":4,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"has_discussions":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":1,"license":null,"allow_forking":true,"is_template":false,"web_commit_signoff_required":false,"topics":[],"visibility":"public","forks":0,"open_issues":1,"watchers":0,"default_branch":"main"}},"base":{"label":"megusasuke0:main","ref":"main","sha":"8ab47b5551ab631cfc429b88eafa6b31b5b73009","user":{"login":"megusasuke0","id":116707505,"node_id":"U_kgDOBvTQsQ","avatar_url":"https://avatars.githubusercontent.com/u/116707505?v=4","gravatar_id":"","url":"https://api.github.com/users/megusasuke0","html_url":"https://github.com/megusasuke0","followers_url":"https://api.github.com/users/megusasuke0/followers","following_url":"https://api.github.com/users/megusasuke0/following{/other_user}","gists_url":"https://api.github.com/users/megusasuke0/gists{/gist_id}","starred_url":"https://api.github.com/users/megusasuke0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/megusasuke0/subscriptions","organizations_url":"https://api.github.com/users/megusasuke0/orgs","repos_url":"https://api.github.com/users/megusasuke0/repos","events_url":"https://api.github.com/users/megusasuke0/events{/privacy}","received_events_url":"https://api.github.com/users/megusasuke0/received_events","type":"User","site_admin":false},"repo":{"id":737461382,"node_id":"R_kgDOK_TEhg","name":"frontendhandson","full_name":"megusasuke0/frontendhandson","private":false,"owner":{"login":"megusasuke0","id":116707505,"node_id":"U_kgDOBvTQsQ","avatar_url":"https://avatars.githubusercontent.com/u/116707505?v=4","gravatar_id":"","url":"https://api.github.com/users/megusasuke0","html_url":"https://github.com/megusasuke0","followers_url":"https://api.github.com/users/megusasuke0/followers","following_url":"https://api.github.com/users/megusasuke0/following{/other_user}","gists_url":"https://api.github.com/users/megusasuke0/gists{/gist_id}","starred_url":"https://api.github.com/users/megusasuke0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/megusasuke0/subscriptions","organizations_url":"https://api.github.com/users/megusasuke0/orgs","repos_url":"https://api.github.com/users/megusasuke0/repos","events_url":"https://api.github.com/users/megusasuke0/events{/privacy}","received_events_url":"https://api.github.com/users/megusasuke0/received_events","type":"User","site_admin":false},"html_url":"https://github.com/megusasuke0/frontendhandson","description":"Created with StackBlitz ⚡️","fork":false,"url":"https://api.github.com/repos/megusasuke0/frontendhandson","forks_url":"https://api.github.com/repos/megusasuke0/frontendhandson/forks","keys_url":"https://api.github.com/repos/megusasuke0/frontendhandson/keys{/key_id}","collaborators_url":"https://api.github.com/repos/megusasuke0/frontendhandson/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/megusasuke0/frontendhandson/teams","hooks_url":"https://api.github.com/repos/megusasuke0/frontendhandson/hooks","issue_events_url":"https://api.github.com/repos/megusasuke0/frontendhandson/issues/events{/number}","events_url":"https://api.github.com/repos/megusasuke0/frontendhandson/events","assignees_url":"https://api.github.com/repos/megusasuke0/frontendhandson/assignees{/user}","branches_url":"https://api.github.com/repos/megusasuke0/frontendhandson/branches{/branch}","tags_url":"https://api.github.com/repos/megusasuke0/frontendhandson/tags","blobs_url":"https://api.github.com/repos/megusasuke0/frontendhandson/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/megusasuke0/frontendhandson/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/megusasuke0/frontendhandson/git/refs{/sha}","trees_url":"https://api.github.com/repos/megusasuke0/frontendhandson/git/trees{/sha}","statuses_url":"https://api.github.com/repos/megusasuke0/frontendhandson/statuses/{sha}","languages_url":"https://api.github.com/repos/megusasuke0/frontendhandson/languages","stargazers_url":"https://api.github.com/repos/megusasuke0/frontendhandson/stargazers","contributors_url":"https://api.github.com/repos/megusasuke0/frontendhandson/contributors","subscribers_url":"https://api.github.com/repos/megusasuke0/frontendhandson/subscribers","subscription_url":"https://api.github.com/repos/megusasuke0/frontendhandson/subscription","commits_url":"https://api.github.com/repos/megusasuke0/frontendhandson/commits{/sha}","git_commits_url":"https://api.github.com/repos/megusasuke0/frontendhandson/git/commits{/sha}","comments_url":"https://api.github.com/repos/megusasuke0/frontendhandson/comments{/number}","issue_comment_url":"https://api.github.com/repos/megusasuke0/frontendhandson/issues/comments{/number}","contents_url":"https://api.github.com/repos/megusasuke0/frontendhandson/contents/{+path}","compare_url":"https://api.github.com/repos/megusasuke0/frontendhandson/compare/{base}...{head}","merges_url":"https://api.github.com/repos/megusasuke0/frontendhandson/merges","archive_url":"https://api.github.com/repos/megusasuke0/frontendhandson/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/megusasuke0/frontendhandson/downloads","issues_url":"https://api.github.com/repos/megusasuke0/frontendhandson/issues{/number}","pulls_url":"https://api.github.com/repos/megusasuke0/frontendhandson/pulls{/number}","milestones_url":"https://api.github.com/repos/megusasuke0/frontendhandson/milestones{/number}","notifications_url":"https://api.github.com/repos/megusasuke0/frontendhandson/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/megusasuke0/frontendhandson/labels{/name}","releases_url":"https://api.github.com/repos/megusasuke0/frontendhandson/releases{/id}","deployments_url":"https://api.github.com/repos/megusasuke0/frontendhandson/deployments","created_at":"2023-12-31T05:41:42Z","updated_at":"2023-12-31T05:41:49Z","pushed_at":"2024-01-01T14:56:47Z","git_url":"git://github.com/megusasuke0/frontendhandson.git","ssh_url":"git@github.com:megusasuke0/frontendhandson.git","clone_url":"https://github.com/megusasuke0/frontendhandson.git","svn_url":"https://github.com/megusasuke0/frontendhandson","homepage":"https://stackblitz.com/edit/web-platform-kr2hi6","size":4,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"has_discussions":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":1,"license":null,"allow_forking":true,"is_template":false,"web_commit_signoff_required":false,"topics":[],"visibility":"public","forks":0,"open_issues":1,"watchers":0,"default_branch":"main"}},"_links":{"self":{"href":"https://api.github.com/repos/megusasuke0/frontendhandson/pulls/1"},"html":{"href":"https://github.com/megusasuke0/frontendhandson/pull/1"},"issue":{"href":"https://api.github.com/repos/megusasuke0/frontendhandson/issues/1"},"comments":{"href":"https://api.github.com/repos/megusasuke0/frontendhandson/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/megusasuke0/frontendhandson/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/megusasuke0/frontendhandson/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/megusasuke0/frontendhandson/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/megusasuke0/frontendhandson/statuses/d1cd14bfa81aaa8d39ce0a8fd4d90cb7be53f627"}},"author_association":"OWNER","auto_merge":null,"active_lock_reason":null}},"public":true,"created_at":"2024-01-01T15:00:00Z"}
+{"id":"34502641394","type":"PushEvent","actor":{"id":155086649,"login":"dim12512a","display_login":"dim12512a","gravatar_id":"","url":"https://api.github.com/users/dim12512a","avatar_url":"https://avatars.githubusercontent.com/u/155086649?"},"repo":{"id":737073774,"name":"dim12512a/Repo6","url":"https://api.github.com/repos/dim12512a/Repo6"},"payload":{"repository_id":737073774,"push_id":16466254509,"size":1,"distinct_size":1,"ref":"refs/heads/main","head":"ecca430b2e030a19a8803cfed3df318521a68509","before":"aa1bdba02efb57b7606de73f4937d7605c8fa51f","commits":[{"sha":"ecca430b2e030a19a8803cfed3df318521a68509","author":{"email":"you@example.com","name":"Your Name"},"message":"Empty Commit","distinct":true,"url":"https://api.github.com/repos/dim12512a/Repo6/commits/ecca430b2e030a19a8803cfed3df318521a68509"}]},"public":true,"created_at":"2024-01-01T15:00:00Z"}
+{"id":"34502641400","type":"ForkEvent","actor":{"id":51039409,"login":"Shadowxiaomo","display_login":"Shadowxiaomo","gravatar_id":"","url":"https://api.github.com/users/Shadowxiaomo","avatar_url":"https://avatars.githubusercontent.com/u/51039409?"},"repo":{"id":209353301,"name":"kp7742/MemDumper","url":"https://api.github.com/repos/kp7742/MemDumper"},"payload":{"forkee":{"id":737802479,"node_id":"R_kgDOK_n47w","name":"MemDumper","full_name":"Shadowxiaomo/MemDumper","private":false,"owner":{"login":"Shadowxiaomo","id":51039409,"node_id":"MDQ6VXNlcjUxMDM5NDA5","avatar_url":"https://avatars.githubusercontent.com/u/51039409?v=4","gravatar_id":"","url":"https://api.github.com/users/Shadowxiaomo","html_url":"https://github.com/Shadowxiaomo","followers_url":"https://api.github.com/users/Shadowxiaomo/followers","following_url":"https://api.github.com/users/Shadowxiaomo/following{/other_user}","gists_url":"https://api.github.com/users/Shadowxiaomo/gists{/gist_id}","starred_url":"https://api.github.com/users/Shadowxiaomo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shadowxiaomo/subscriptions","organizations_url":"https://api.github.com/users/Shadowxiaomo/orgs","repos_url":"https://api.github.com/users/Shadowxiaomo/repos","events_url":"https://api.github.com/users/Shadowxiaomo/events{/privacy}","received_events_url":"https://api.github.com/users/Shadowxiaomo/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Shadowxiaomo/MemDumper","description":"Dump Memory of Process in Android","fork":true,"url":"https://api.github.com/repos/Shadowxiaomo/MemDumper","forks_url":"https://api.github.com/repos/Shadowxiaomo/MemDumper/forks","keys_url":"https://api.github.com/repos/Shadowxiaomo/MemDumper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Shadowxiaomo/MemDumper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Shadowxiaomo/MemDumper/teams","hooks_url":"https://api.github.com/repos/Shadowxiaomo/MemDumper/hooks","issue_events_url":"https://api.github.com/repos/Shadowxiaomo/MemDumper/issues/events{/number}","events_url":"https://api.github.com/repos/Shadowxiaomo/MemDumper/events","assignees_url":"https://api.github.com/repos/Shadowxiaomo/MemDumper/assignees{/user}","branches_url":"https://api.github.com/repos/Shadowxiaomo/MemDumper/branches{/branch}","tags_url":"https://api.github.com/repos/Shadowxiaomo/MemDumper/tags","blobs_url":"https://api.github.com/repos/Shadowxiaomo/MemDumper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Shadowxiaomo/MemDumper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Shadowxiaomo/MemDumper/git/refs{/sha}","trees_url":"https://api.github.com/repos/Shadowxiaomo/MemDumper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Shadowxiaomo/MemDumper/statuses/{sha}","languages_url":"https://api.github.com/repos/Shadowxiaomo/MemDumper/languages","stargazers_url":"https://api.github.com/repos/Shadowxiaomo/MemDumper/stargazers","contributors_url":"https://api.github.com/repos/Shadowxiaomo/MemDumper/contributors","subscribers_url":"https://api.github.com/repos/Shadowxiaomo/MemDumper/subscribers","subscription_url":"https://api.github.com/repos/Shadowxiaomo/MemDumper/subscription","commits_url":"https://api.github.com/repos/Shadowxiaomo/MemDumper/commits{/sha}","git_commits_url":"https://api.github.com/repos/Shadowxiaomo/MemDumper/git/commits{/sha}","comments_url":"https://api.github.com/repos/Shadowxiaomo/MemDumper/comments{/number}","issue_comment_url":"https://api.github.com/repos/Shadowxiaomo/MemDumper/issues/comments{/number}","contents_url":"https://api.github.com/repos/Shadowxiaomo/MemDumper/contents/{+path}","compare_url":"https://api.github.com/repos/Shadowxiaomo/MemDumper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Shadowxiaomo/MemDumper/merges","archive_url":"https://api.github.com/repos/Shadowxiaomo/MemDumper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Shadowxiaomo/MemDumper/downloads","issues_url":"https://api.github.com/repos/Shadowxiaomo/MemDumper/issues{/number}","pulls_url":"https://api.github.com/repos/Shadowxiaomo/MemDumper/pulls{/number}","milestones_url":"https://api.github.com/repos/Shadowxiaomo/MemDumper/milestones{/number}","notifications_url":"https://api.github.com/repos/Shadowxiaomo/MemDumper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Shadowxiaomo/MemDumper/labels{/name}","releases_url":"https://api.github.com/repos/Shadowxiaomo/MemDumper/releases{/id}","deployments_url":"https://api.github.com/repos/Shadowxiaomo/MemDumper/deployments","created_at":"2024-01-01T14:59:37Z","updated_at":"2024-01-01T14:59:37Z","pushed_at":"2021-03-30T22:43:13Z","git_url":"git://github.com/Shadowxiaomo/MemDumper.git","ssh_url":"git@github.com:Shadowxiaomo/MemDumper.git","clone_url":"https://github.com/Shadowxiaomo/MemDumper.git","svn_url":"https://github.com/Shadowxiaomo/MemDumper","homepage":"","size":1692,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"has_discussions":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":null,"allow_forking":true,"is_template":false,"web_commit_signoff_required":false,"topics":[],"visibility":"public","forks":0,"open_issues":0,"watchers":0,"default_branch":"main","public":true}},"public":true,"created_at":"2024-01-01T15:00:00Z"}
+{"id":"34502641401","type":"PushEvent","actor":{"id":68572913,"login":"Jinyeong1611","display_login":"Jinyeong1611","gravatar_id":"","url":"https://api.github.com/users/Jinyeong1611","avatar_url":"https://avatars.githubusercontent.com/u/68572913?"},"repo":{"id":737797611,"name":"Jinyeong1611/pacman","url":"https://api.github.com/repos/Jinyeong1611/pacman"},"payload":{"repository_id":737797611,"push_id":16466254459,"size":7,"distinct_size":7,"ref":"refs/heads/main","head":"eff7b1956dd12bc392b8ca63c595a56949066369","before":"5c6b2e8346450071e242a46fdfab3246a83ddeb5","commits":[{"sha":"a91acbb43cfde07b162d619e6c4eed39c3a9ab7e","author":{"email":"ins1500@naver.com","name":"FastTurtle"},"message":"방향값 추가","distinct":true,"url":"https://api.github.com/repos/Jinyeong1611/pacman/commits/a91acbb43cfde07b162d619e6c4eed39c3a9ab7e"},{"sha":"d55284a7b2a62ead107f6d6a6d9bd7ad89cb17f2","author":{"email":"ins1500@naver.com","name":"FastTurtle"},"message":"direction 필드 추가 moveProcess 메서드 생성","distinct":true,"url":"https://api.github.com/repos/Jinyeong1611/pacman/commits/d55284a7b2a62ead107f6d6a6d9bd7ad89cb17f2"},{"sha":"08ad1dddef61cb29b3e779ae849dc448fdfac6dd","author":{"email":"ins1500@naver.com","name":"FastTurtle"},"message":"moveProcess 메서드 추가","distinct":true,"url":"https://api.github.com/repos/Jinyeong1611/pacman/commits/08ad1dddef61cb29b3e779ae849dc448fdfac6dd"},{"sha":"740fa68d76d587aeb99ae5d4e6bd9d50bf3b482a","author":{"email":"ins1500@naver.com","name":"FastTurtle"},"message":"moveForward 생성","distinct":true,"url":"https://api.github.com/repos/Jinyeong1611/pacman/commits/740fa68d76d587aeb99ae5d4e6bd9d50bf3b482a"},{"sha":"a9bf0b68af631579f66d52f39789664b81f1a21a","author":{"email":"ins1500@naver.com","name":"FastTurtle"},"message":"moveBackward 생성","distinct":true,"url":"https://api.github.com/repos/Jinyeong1611/pacman/commits/a9bf0b68af631579f66d52f39789664b81f1a21a"},{"sha":"2c2673461b0e3daa6fe6be419f8b8fc363744181","author":{"email":"ins1500@naver.com","name":"FastTurtle"},"message":"getMapX, getMapY, getMapXRightSide, getMapYRightSide 메서드 추가","distinct":true,"url":"https://api.github.com/repos/Jinyeong1611/pacman/commits/2c2673461b0e3daa6fe6be419f8b8fc363744181"},{"sha":"eff7b1956dd12bc392b8ca63c595a56949066369","author":{"email":"ins1500@naver.com","name":"FastTurtle"},"message":"코딩 진행현황 추가","distinct":true,"url":"https://api.github.com/repos/Jinyeong1611/pacman/commits/eff7b1956dd12bc392b8ca63c595a56949066369"}]},"public":true,"created_at":"2024-01-01T15:00:00Z"}
+{"id":"34502641404","type":"PullRequestEvent","actor":{"id":49699333,"login":"dependabot[bot]","display_login":"dependabot","gravatar_id":"","url":"https://api.github.com/users/dependabot[bot]","avatar_url":"https://avatars.githubusercontent.com/u/49699333?"},"repo":{"id":216169746,"name":"DNNCommunity/dnn-elements","url":"https://api.github.com/repos/DNNCommunity/dnn-elements"},"payload":{"action":"closed","number":911,"pull_request":{"url":"https://api.github.com/repos/DNNCommunity/dnn-elements/pulls/911","id":1625849822,"node_id":"PR_kwDODOJ9Es5g6H_e","html_url":"https://github.com/DNNCommunity/dnn-elements/pull/911","diff_url":"https://github.com/DNNCommunity/dnn-elements/pull/911.diff","patch_url":"https://github.com/DNNCommunity/dnn-elements/pull/911.patch","issue_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/issues/911","number":911,"state":"closed","locked":false,"title":"Bump @storybook/addon-a11y from 7.5.3 to 7.6.3","user":{"login":"dependabot[bot]","id":49699333,"node_id":"MDM6Qm90NDk2OTkzMzM=","avatar_url":"https://avatars.githubusercontent.com/in/29110?v=4","gravatar_id":"","url":"https://api.github.com/users/dependabot%5Bbot%5D","html_url":"https://github.com/apps/dependabot","followers_url":"https://api.github.com/users/dependabot%5Bbot%5D/followers","following_url":"https://api.github.com/users/dependabot%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/dependabot%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/dependabot%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dependabot%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/dependabot%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/dependabot%5Bbot%5D/repos","events_url":"https://api.github.com/users/dependabot%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/dependabot%5Bbot%5D/received_events","type":"Bot","site_admin":false},"body":"Bumps [@storybook/addon-a11y](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/a11y) from 7.5.3 to 7.6.3.\n<details>\n<summary>Release notes</summary>\n<p><em>Sourced from <a href=\"https://github.com/storybookjs/storybook/releases\"><code>@​storybook/addon-a11y</code>'s releases</a>.</em></p>\n<blockquote>\n<h2>v7.6.3</h2>\n<h2>7.6.3</h2>\n<ul>\n<li>Next.js: Fix next/font/local usage in babel mode - <a href=\"https://redirect.github.com/storybookjs/storybook/pull/25045\">#25045</a>, thanks <a href=\"https://github.com/valentinpalkovic\"><code>@​valentinpalkovic</code></a>!</li>\n</ul>\n<h2>v7.6.2</h2>\n<h2>7.6.2</h2>\n<ul>\n<li>CLI: Improve dependency metadata detection in storybook doctor - <a href=\"https://redirect.github.com/storybookjs/storybook/pull/25037\">#25037</a>, thanks <a href=\"https://github.com/yannbf\"><code>@​yannbf</code></a>!</li>\n<li>React-Docgen: Make error-handling more gentle - <a href=\"https://redirect.github.com/storybookjs/storybook/pull/25055\">#25055</a>, thanks <a href=\"https://github.com/valentinpalkovic\"><code>@​valentinpalkovic</code></a>!</li>\n</ul>\n<h2>v7.6.1</h2>\n<h2>7.6.1</h2>\n<ul>\n<li>Next.js: Fix AppRouterProvider usage - <a href=\"https://redirect.github.com/storybookjs/storybook/pull/25032\">#25032</a>, thanks <a href=\"https://github.com/valentinpalkovic\"><code>@​valentinpalkovic</code></a>!</li>\n<li>SvelteKit: Fix HMR not working - <a href=\"https://redirect.github.com/storybookjs/storybook/pull/25031\">#25031</a>, thanks <a href=\"https://github.com/JReinhold\"><code>@​JReinhold</code></a>!</li>\n<li>Test: Downgrade <code>@​testing-library/user-event</code> to 14.3.0 - <a href=\"https://redirect.github.com/storybookjs/storybook/pull/25004\">#25004</a>, thanks <a href=\"https://github.com/kasperpeulen\"><code>@​kasperpeulen</code></a>!</li>\n<li>Webpack: Fix exclude regex in react-docgen-loader - <a href=\"https://redirect.github.com/storybookjs/storybook/pull/25030\">#25030</a>, thanks <a href=\"https://github.com/valentinpalkovic\"><code>@​valentinpalkovic</code></a>!</li>\n</ul>\n<h2>v7.6.0</h2>\n<h2>7.6.0</h2>\n<p>Storybook 7.6 is here with increased performance and much more!</p>\n<ul>\n<li>🔥 Improved SWC support</li>\n<li>🧪 New test utilities and fast build mode</li>\n<li>🔼 NextJS SWC + avif support &amp; fixes</li>\n<li>🤡 SvelteKit page and navigation mocking</li>\n<li>⚛️ React-docgen upgrade</li>\n<li>🎨 Controls a11y, background theming, and viewports</li>\n<li>🩺 CLI: The doctor is in!</li>\n<li>🚫 Addons: Remove React as a peer dependency</li>\n<li>🪦 Storyshots and Vue2 deprecated</li>\n</ul>\n<p>Check out the blog post for more information: <a href=\"https://storybook.js.org/blog/storybook-7-6/\">https://storybook.js.org/blog/storybook-7-6/</a></p>\n<!-- raw HTML omitted -->\n<ul>\n<li>Actions: Attach spies on actions across stories when defined in meta - <a href=\"https://redirect.github.com/storybookjs/storybook/pull/24451\">#24451</a>, thanks <a href=\"https://github.com/kasperpeulen\"><code>@​kasperpeulen</code></a>!</li>\n<li>Actions: Fix <code>@storybook/core-events/preview-errors</code> dependency missing for Yarn PnP - <a href=\"https://redirect.github.com/storybookjs/storybook/pull/24973\">#24973</a>, thanks <a href=\"https://github.com/JReinhold\"><code>@​JReinhold</code></a>!</li>\n<li>Actions: Fix missing crypto module crashing React Native - <a href=\"https://redirect.github.com/storybookjs/storybook/pull/24546\">#24546</a>, thanks <a href=\"https://github.com/dannyhw\"><code>@​dannyhw</code></a>!</li>\n<li>Actions: Warn on implicit actions - <a href=\"https://redirect.github.com/storybookjs/storybook/pull/24856\">#24856</a>, thanks <a href=\"https://github.com/kasperpeulen\"><code>@​kasperpeulen</code></a>!</li>\n<li>Addon A11y: Avoid CSP issue - <a href=\"https://redirect.github.com/storybookjs/storybook/pull/24477\">#24477</a>, thanks <a href=\"https://github.com/Marklb\"><code>@​Marklb</code></a>!</li>\n<li>Addon: Move Visual Test addon to the code directory - <a href=\"https://redirect.github.com/storybookjs/storybook/pull/24771\">#24771</a>, thanks <a href=\"https://github.com/cdedreuille\"><code>@​cdedreuille</code></a>!</li>\n<li>Addons, core: Make <code>react</code> and Storybook packages <code>devDependencies</code> where possible - <a href=\"https://redirect.github.com/storybookjs/storybook/pull/24676\">#24676</a>, thanks <a href=\"https://github.com/JReinhold\"><code>@​JReinhold</code></a>!</li>\n<li>Addons, core: Make <code>react</code> and Storybook packages <code>devDependencies</code> where possible - ATTEMPT 2 - <a href=\"https://redirect.github.com/storybookjs/storybook/pull/24834\">#24834</a>, thanks <a href=\"https://github.com/JReinhold\"><code>@​JReinhold</code></a>!</li>\n<li>Angular: Add source-map option to builder - <a href=\"https://redirect.github.com/storybookjs/storybook/pull/24466\">#24466</a>, thanks <a href=\"https://github.com/valentinpalkovic\"><code>@​valentinpalkovic</code></a>!</li>\n</ul>\n<!-- raw HTML omitted -->\n</blockquote>\n<p>... (truncated)</p>\n</details>\n<details>\n<summary>Changelog</summary>\n<p><em>Sourced from <a href=\"https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md\"><code>@​storybook/addon-a11y</code>'s changelog</a>.</em></p>\n<blockquote>\n<h2>7.6.3</h2>\n<ul>\n<li>Next.js: Fix next/font/local usage in babel mode - <a href=\"https://redirect.github.com/storybookjs/storybook/pull/25045\">#25045</a>, thanks <a href=\"https://github.com/valentinpalkovic\"><code>@​valentinpalkovic</code></a>!</li>\n</ul>\n<h2>7.6.2</h2>\n<ul>\n<li>CLI: Improve dependency metadata detection in storybook doctor - <a href=\"https://redirect.github.com/storybookjs/storybook/pull/25037\">#25037</a>, thanks <a href=\"https://github.com/yannbf\"><code>@​yannbf</code></a>!</li>\n<li>React-Docgen: Make error-handling more gentle - <a href=\"https://redirect.github.com/storybookjs/storybook/pull/25055\">#25055</a>, thanks <a href=\"https://github.com/valentinpalkovic\"><code>@​valentinpalkovic</code></a>!</li>\n</ul>\n<h2>7.6.1</h2>\n<ul>\n<li>Next.js: Fix AppRouterProvider usage - <a href=\"https://redirect.github.com/storybookjs/storybook/pull/25032\">#25032</a>, thanks <a href=\"https://github.com/valentinpalkovic\"><code>@​valentinpalkovic</code></a>!</li>\n<li>SvelteKit: Fix HMR not working - <a href=\"https://redirect.github.com/storybookjs/storybook/pull/25031\">#25031</a>, thanks <a href=\"https://github.com/JReinhold\"><code>@​JReinhold</code></a>!</li>\n<li>Test: Downgrade <code>@​testing-library/user-event</code> to 14.3.0 - <a href=\"https://redirect.github.com/storybookjs/storybook/pull/25004\">#25004</a>, thanks <a href=\"https://github.com/kasperpeulen\"><code>@​kasperpeulen</code></a>!</li>\n<li>Webpack: Fix exclude regex in react-docgen-loader - <a href=\"https://redirect.github.com/storybookjs/storybook/pull/25030\">#25030</a>, thanks <a href=\"https://github.com/valentinpalkovic\"><code>@​valentinpalkovic</code></a>!</li>\n</ul>\n<h2>7.6.0</h2>\n<p>Storybook 7.6 is here with increased performance and much more!</p>\n<ul>\n<li>🔥 Improved SWC support</li>\n<li>🧪 New test utilities and fast build mode</li>\n<li>🔼 NextJS SWC + avif support &amp; fixes</li>\n<li>🤡 SvelteKit page and navigation mocking</li>\n<li>⚛️ React-docgen upgrade</li>\n<li>🎨 Controls a11y, background theming, and viewports</li>\n<li>🩺 CLI: The doctor is in!</li>\n<li>🚫 Addons: Remove React as a peer dependency</li>\n<li>🪦 Storyshots and Vue2 deprecated</li>\n</ul>\n<!-- raw HTML omitted -->\n<ul>\n<li>Actions: Attach spies on actions across stories when defined in meta - <a href=\"https://redirect.github.com/storybookjs/storybook/pull/24451\">#24451</a>, thanks <a href=\"https://github.com/kasperpeulen\"><code>@​kasperpeulen</code></a>!</li>\n<li>Actions: Fix <code>@storybook/core-events/preview-errors</code> dependency missing for Yarn PnP - <a href=\"https://redirect.github.com/storybookjs/storybook/pull/24973\">#24973</a>, thanks <a href=\"https://github.com/JReinhold\"><code>@​JReinhold</code></a>!</li>\n<li>Actions: Fix missing crypto module crashing React Native - <a href=\"https://redirect.github.com/storybookjs/storybook/pull/24546\">#24546</a>, thanks <a href=\"https://github.com/dannyhw\"><code>@​dannyhw</code></a>!</li>\n<li>Actions: Warn on implicit actions - <a href=\"https://redirect.github.com/storybookjs/storybook/pull/24856\">#24856</a>, thanks <a href=\"https://github.com/kasperpeulen\"><code>@​kasperpeulen</code></a>!</li>\n<li>Addon A11y: Avoid CSP issue - <a href=\"https://redirect.github.com/storybookjs/storybook/pull/24477\">#24477</a>, thanks <a href=\"https://github.com/Marklb\"><code>@​Marklb</code></a>!</li>\n<li>Addon: Move Visual Test addon to the code directory - <a href=\"https://redirect.github.com/storybookjs/storybook/pull/24771\">#24771</a>, thanks <a href=\"https://github.com/cdedreuille\"><code>@​cdedreuille</code></a>!</li>\n<li>Addons, core: Make <code>react</code> and Storybook packages <code>devDependencies</code> where possible - <a href=\"https://redirect.github.com/storybookjs/storybook/pull/24676\">#24676</a>, thanks <a href=\"https://github.com/JReinhold\"><code>@​JReinhold</code></a>!</li>\n<li>Addons, core: Make <code>react</code> and Storybook packages <code>devDependencies</code> where possible - ATTEMPT 2 - <a href=\"https://redirect.github.com/storybookjs/storybook/pull/24834\">#24834</a>, thanks <a href=\"https://github.com/JReinhold\"><code>@​JReinhold</code></a>!</li>\n<li>Angular: Add source-map option to builder - <a href=\"https://redirect.github.com/storybookjs/storybook/pull/24466\">#24466</a>, thanks <a href=\"https://github.com/valentinpalkovic\"><code>@​valentinpalkovic</code></a>!</li>\n<li>Angular: Handle nested module metadata - <a href=\"https://redirect.github.com/storybookjs/storybook/pull/24798\">#24798</a>, thanks <a href=\"https://github.com/valentinpalkovic\"><code>@​valentinpalkovic</code></a>!</li>\n<li>Angular: Include object configured styles - <a href=\"https://redirect.github.com/storybookjs/storybook/pull/24768\">#24768</a>, thanks <a href=\"https://github.com/valentinpalkovic\"><code>@​valentinpalkovic</code></a>!</li>\n<li>Babel: Update all @babel/* dependencies - <a href=\"https://redirect.github.com/storybookjs/storybook/pull/24610\">#24610</a>, thanks <a href=\"https://github.com/valentinpalkovic\"><code>@​valentinpalkovic</code></a>!</li>\n<li>CLI: Add &quot;doctor&quot; command - <a href=\"https://redirect.github.com/storybookjs/storybook/pull/22236\">#22236</a>, thanks <a href=\"https://github.com/yannbf\"><code>@​yannbf</code></a>!</li>\n<li>CLI: Add <code>@​storybook/addon-designs</code> to non-core list - <a href=\"https://redirect.github.com/storybookjs/storybook/pull/24507\">#24507</a>, thanks <a href=\"https://github.com/yannbf\"><code>@​yannbf</code></a>!</li>\n<li>CLI: Ensure errors with opening the browser are caught - <a href=\"https://redirect.github.com/storybookjs/storybook/pull/24668\">#24668</a>, thanks <a href=\"https://github.com/xueyawei\"><code>@​xueyawei</code></a>!</li>\n</ul>\n<!-- raw HTML omitted -->\n</blockquote>\n<p>... (truncated)</p>\n</details>\n<details>\n<summary>Commits</summary>\n<ul>\n<li><a href=\"https://github.com/storybookjs/storybook/commit/afc4c2f4cfc23739b5086a5294eb52e8706d0925\"><code>afc4c2f</code></a> Bump version from &quot;7.6.2&quot; to &quot;7.6.3&quot; [skip ci]</li>\n<li><a href=\"https://github.com/storybookjs/storybook/commit/afc89aab2a02079838f6496f7bd2ba7577aed69b\"><code>afc89aa</code></a> Bump version from &quot;7.6.1&quot; to &quot;7.6.2&quot; [skip ci]</li>\n<li><a href=\"https://github.com/storybookjs/storybook/commit/60f9c9af345477709b1ab453046705821eb71f57\"><code>60f9c9a</code></a> Bump version from &quot;7.6.0&quot; to &quot;7.6.1&quot; [skip ci]</li>\n<li><a href=\"https://github.com/storybookjs/storybook/commit/b64214c7c02b01ed513a62eba7c3356f316de74b\"><code>b64214c</code></a> Bump version from &quot;7.6.0-beta.2&quot; to &quot;7.6.0&quot; [skip ci]</li>\n<li><a href=\"https://github.com/storybookjs/storybook/commit/b9901446e9aa393d188512d5ace39a6fe556ec9b\"><code>b990144</code></a> Bump version from &quot;7.6.0-beta.1&quot; to &quot;7.6.0-beta.2&quot; [skip ci]</li>\n<li><a href=\"https://github.com/storybookjs/storybook/commit/d82167b346b1b0b5e9f19a492cc01a18ae4f4a55\"><code>d82167b</code></a> Bump version from &quot;7.6.0-beta.0&quot; to &quot;7.6.0-beta.1&quot; [skip ci]</li>\n<li><a href=\"https://github.com/storybookjs/storybook/commit/574bb87a3231014ba49d15549de94941bd415d61\"><code>574bb87</code></a> Bump version from &quot;7.6.0-alpha.7&quot; to &quot;7.6.0-beta.0&quot; [skip ci]</li>\n<li><a href=\"https://github.com/storybookjs/storybook/commit/bffa2dbb3270e84628612e9be3a2100377cb667e\"><code>bffa2db</code></a> Bump version from &quot;7.6.0-alpha.6&quot; to &quot;7.6.0-alpha.7&quot; [skip ci]</li>\n<li><a href=\"https://github.com/storybookjs/storybook/commit/df357020e010f49e7c325942f0c891e6702527d6\"><code>df35702</code></a> Merge pull request <a href=\"https://github.com/storybookjs/storybook/tree/HEAD/code/addons/a11y/issues/24834\">#24834</a> from storybookjs/revert-24832-revert-24676-experime...</li>\n<li><a href=\"https://github.com/storybookjs/storybook/commit/f18dbe606d327057a7ee4b307fc9c47378c60138\"><code>f18dbe6</code></a> Merge branch 'next-release' into next</li>\n<li>Additional commits viewable in <a href=\"https://github.com/storybookjs/storybook/commits/v7.6.3/code/addons/a11y\">compare view</a></li>\n</ul>\n</details>\n<br />\n\n\n[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@storybook/addon-a11y&package-manager=npm_and_yarn&previous-version=7.5.3&new-version=7.6.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)\n\nDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.\n\n[//]: # (dependabot-automerge-start)\n[//]: # (dependabot-automerge-end)\n\n---\n\n<details>\n<summary>Dependabot commands and options</summary>\n<br />\n\nYou can trigger Dependabot actions by commenting on this PR:\n- `@dependabot rebase` will rebase this PR\n- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it\n- `@dependabot merge` will merge this PR after your CI passes on it\n- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it\n- `@dependabot cancel merge` will cancel a previously requested merge and block automerging\n- `@dependabot reopen` will reopen this PR if it is closed\n- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually\n- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency\n- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)\n- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)\n- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)\n\n\n</details>","created_at":"2023-12-01T14:59:59Z","updated_at":"2024-01-01T14:59:38Z","closed_at":"2024-01-01T14:59:38Z","merged_at":null,"merge_commit_sha":"91e5a7a4907bedfa2234836f1f528215b98ff6a0","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1673605716,"node_id":"MDU6TGFiZWwxNjczNjA1NzE2","url":"https://api.github.com/repos/DNNCommunity/dnn-elements/labels/dependencies","name":"dependencies","color":"0366d6","default":false,"description":"Pull requests that update a dependency file"},{"id":3968650321,"node_id":"LA_kwDODOJ9Es7sjMxR","url":"https://api.github.com/repos/DNNCommunity/dnn-elements/labels/javascript","name":"javascript","color":"168700","default":false,"description":"Pull requests that update Javascript code"}],"milestone":null,"draft":false,"commits_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/pulls/911/commits","review_comments_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/pulls/911/comments","review_comment_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/issues/911/comments","statuses_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/statuses/405cf37a08a0e8fc65c66efb9b6d6d42b15126e5","head":{"label":"DNNCommunity:dependabot/npm_and_yarn/storybook/addon-a11y-7.6.3","ref":"dependabot/npm_and_yarn/storybook/addon-a11y-7.6.3","sha":"405cf37a08a0e8fc65c66efb9b6d6d42b15126e5","user":{"login":"DNNCommunity","id":9216448,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkyMTY0NDg=","avatar_url":"https://avatars.githubusercontent.com/u/9216448?v=4","gravatar_id":"","url":"https://api.github.com/users/DNNCommunity","html_url":"https://github.com/DNNCommunity","followers_url":"https://api.github.com/users/DNNCommunity/followers","following_url":"https://api.github.com/users/DNNCommunity/following{/other_user}","gists_url":"https://api.github.com/users/DNNCommunity/gists{/gist_id}","starred_url":"https://api.github.com/users/DNNCommunity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DNNCommunity/subscriptions","organizations_url":"https://api.github.com/users/DNNCommunity/orgs","repos_url":"https://api.github.com/users/DNNCommunity/repos","events_url":"https://api.github.com/users/DNNCommunity/events{/privacy}","received_events_url":"https://api.github.com/users/DNNCommunity/received_events","type":"Organization","site_admin":false},"repo":{"id":216169746,"node_id":"MDEwOlJlcG9zaXRvcnkyMTYxNjk3NDY=","name":"dnn-elements","full_name":"DNNCommunity/dnn-elements","private":false,"owner":{"login":"DNNCommunity","id":9216448,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkyMTY0NDg=","avatar_url":"https://avatars.githubusercontent.com/u/9216448?v=4","gravatar_id":"","url":"https://api.github.com/users/DNNCommunity","html_url":"https://github.com/DNNCommunity","followers_url":"https://api.github.com/users/DNNCommunity/followers","following_url":"https://api.github.com/users/DNNCommunity/following{/other_user}","gists_url":"https://api.github.com/users/DNNCommunity/gists{/gist_id}","starred_url":"https://api.github.com/users/DNNCommunity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DNNCommunity/subscriptions","organizations_url":"https://api.github.com/users/DNNCommunity/orgs","repos_url":"https://api.github.com/users/DNNCommunity/repos","events_url":"https://api.github.com/users/DNNCommunity/events{/privacy}","received_events_url":"https://api.github.com/users/DNNCommunity/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/DNNCommunity/dnn-elements","description":"Collection of Dnn Stencil custom elements","fork":false,"url":"https://api.github.com/repos/DNNCommunity/dnn-elements","forks_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/forks","keys_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/teams","hooks_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/hooks","issue_events_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/issues/events{/number}","events_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/events","assignees_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/assignees{/user}","branches_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/branches{/branch}","tags_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/tags","blobs_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/git/refs{/sha}","trees_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/statuses/{sha}","languages_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/languages","stargazers_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/stargazers","contributors_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/contributors","subscribers_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/subscribers","subscription_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/subscription","commits_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/commits{/sha}","git_commits_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/git/commits{/sha}","comments_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/comments{/number}","issue_comment_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/issues/comments{/number}","contents_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/contents/{+path}","compare_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/merges","archive_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/downloads","issues_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/issues{/number}","pulls_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/pulls{/number}","milestones_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/milestones{/number}","notifications_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/labels{/name}","releases_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/releases{/id}","deployments_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/deployments","created_at":"2019-10-19T07:54:22Z","updated_at":"2023-11-30T08:04:56Z","pushed_at":"2024-01-01T14:59:41Z","git_url":"git://github.com/DNNCommunity/dnn-elements.git","ssh_url":"git@github.com:DNNCommunity/dnn-elements.git","clone_url":"https://github.com/DNNCommunity/dnn-elements.git","svn_url":"https://github.com/DNNCommunity/dnn-elements","homepage":"https://dnncommunity.github.io/dnn-elements/","size":28550,"stargazers_count":14,"watchers_count":14,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"has_discussions":false,"forks_count":9,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":14,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"allow_forking":true,"is_template":false,"web_commit_signoff_required":false,"topics":["components","custom-elements","dnn","dnncms","dotnetnuke","hacktoberfest","javascript","stenciljs","web-component","web-components","webcomponents"],"visibility":"public","forks":9,"open_issues":14,"watchers":14,"default_branch":"develop"}},"base":{"label":"DNNCommunity:develop","ref":"develop","sha":"1dcefe27151d1f9e19380f808454f6aa6afe9940","user":{"login":"DNNCommunity","id":9216448,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkyMTY0NDg=","avatar_url":"https://avatars.githubusercontent.com/u/9216448?v=4","gravatar_id":"","url":"https://api.github.com/users/DNNCommunity","html_url":"https://github.com/DNNCommunity","followers_url":"https://api.github.com/users/DNNCommunity/followers","following_url":"https://api.github.com/users/DNNCommunity/following{/other_user}","gists_url":"https://api.github.com/users/DNNCommunity/gists{/gist_id}","starred_url":"https://api.github.com/users/DNNCommunity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DNNCommunity/subscriptions","organizations_url":"https://api.github.com/users/DNNCommunity/orgs","repos_url":"https://api.github.com/users/DNNCommunity/repos","events_url":"https://api.github.com/users/DNNCommunity/events{/privacy}","received_events_url":"https://api.github.com/users/DNNCommunity/received_events","type":"Organization","site_admin":false},"repo":{"id":216169746,"node_id":"MDEwOlJlcG9zaXRvcnkyMTYxNjk3NDY=","name":"dnn-elements","full_name":"DNNCommunity/dnn-elements","private":false,"owner":{"login":"DNNCommunity","id":9216448,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkyMTY0NDg=","avatar_url":"https://avatars.githubusercontent.com/u/9216448?v=4","gravatar_id":"","url":"https://api.github.com/users/DNNCommunity","html_url":"https://github.com/DNNCommunity","followers_url":"https://api.github.com/users/DNNCommunity/followers","following_url":"https://api.github.com/users/DNNCommunity/following{/other_user}","gists_url":"https://api.github.com/users/DNNCommunity/gists{/gist_id}","starred_url":"https://api.github.com/users/DNNCommunity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DNNCommunity/subscriptions","organizations_url":"https://api.github.com/users/DNNCommunity/orgs","repos_url":"https://api.github.com/users/DNNCommunity/repos","events_url":"https://api.github.com/users/DNNCommunity/events{/privacy}","received_events_url":"https://api.github.com/users/DNNCommunity/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/DNNCommunity/dnn-elements","description":"Collection of Dnn Stencil custom elements","fork":false,"url":"https://api.github.com/repos/DNNCommunity/dnn-elements","forks_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/forks","keys_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/teams","hooks_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/hooks","issue_events_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/issues/events{/number}","events_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/events","assignees_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/assignees{/user}","branches_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/branches{/branch}","tags_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/tags","blobs_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/git/refs{/sha}","trees_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/statuses/{sha}","languages_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/languages","stargazers_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/stargazers","contributors_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/contributors","subscribers_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/subscribers","subscription_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/subscription","commits_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/commits{/sha}","git_commits_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/git/commits{/sha}","comments_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/comments{/number}","issue_comment_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/issues/comments{/number}","contents_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/contents/{+path}","compare_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/merges","archive_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/downloads","issues_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/issues{/number}","pulls_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/pulls{/number}","milestones_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/milestones{/number}","notifications_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/labels{/name}","releases_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/releases{/id}","deployments_url":"https://api.github.com/repos/DNNCommunity/dnn-elements/deployments","created_at":"2019-10-19T07:54:22Z","updated_at":"2023-11-30T08:04:56Z","pushed_at":"2024-01-01T14:59:41Z","git_url":"git://github.com/DNNCommunity/dnn-elements.git","ssh_url":"git@github.com:DNNCommunity/dnn-elements.git","clone_url":"https://github.com/DNNCommunity/dnn-elements.git","svn_url":"https://github.com/DNNCommunity/dnn-elements","homepage":"https://dnncommunity.github.io/dnn-elements/","size":28550,"stargazers_count":14,"watchers_count":14,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"has_discussions":false,"forks_count":9,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":14,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"allow_forking":true,"is_template":false,"web_commit_signoff_required":false,"topics":["components","custom-elements","dnn","dnncms","dotnetnuke","hacktoberfest","javascript","stenciljs","web-component","web-components","webcomponents"],"visibility":"public","forks":9,"open_issues":14,"watchers":14,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/DNNCommunity/dnn-elements/pulls/911"},"html":{"href":"https://github.com/DNNCommunity/dnn-elements/pull/911"},"issue":{"href":"https://api.github.com/repos/DNNCommunity/dnn-elements/issues/911"},"comments":{"href":"https://api.github.com/repos/DNNCommunity/dnn-elements/issues/911/comments"},"review_comments":{"href":"https://api.github.com/repos/DNNCommunity/dnn-elements/pulls/911/comments"},"review_comment":{"href":"https://api.github.com/repos/DNNCommunity/dnn-elements/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DNNCommunity/dnn-elements/pulls/911/commits"},"statuses":{"href":"https://api.github.com/repos/DNNCommunity/dnn-elements/statuses/405cf37a08a0e8fc65c66efb9b6d6d42b15126e5"}},"author_association":"CONTRIBUTOR","auto_merge":null,"active_lock_reason":null,"merged":false,"mergeable":true,"rebaseable":true,"mergeable_state":"unstable","merged_by":null,"comments":1,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":179,"deletions":228,"changed_files":1}},"public":true,"created_at":"2024-01-01T15:00:00Z","org":{"id":9216448,"login":"DNNCommunity","gravatar_id":"","url":"https://api.github.com/orgs/DNNCommunity","avatar_url":"https://avatars.githubusercontent.com/u/9216448?"}}
+{"id":"34502641432","type":"PushEvent","actor":{"id":113946722,"login":"ColeMalinchock1","display_login":"ColeMalinchock1","gravatar_id":"","url":"https://api.github.com/users/ColeMalinchock1","avatar_url":"https://avatars.githubusercontent.com/u/113946722?"},"repo":{"id":713591656,"name":"ColeMalinchock1/HGT-JSON-Server","url":"https://api.github.com/repos/ColeMalinchock1/HGT-JSON-Server"},"payload":{"repository_id":713591656,"push_id":16466254508,"size":1,"distinct_size":1,"ref":"refs/heads/main","head":"6f2720260938d330303c6a7222feda7eb9797e7a","before":"ec31f7a8659f5ec9ba55275a402ac00205115a00","commits":[{"sha":"6f2720260938d330303c6a7222feda7eb9797e7a","author":{"email":"113946722+ColeMalinchock1@users.noreply.github.com","name":"Cole Malinchock"},"message":"Update backup JSON file","distinct":true,"url":"https://api.github.com/repos/ColeMalinchock1/HGT-JSON-Server/commits/6f2720260938d330303c6a7222feda7eb9797e7a"}]},"public":true,"created_at":"2024-01-01T15:00:01Z"}
+{"id":"34502641439","type":"PushEvent","actor":{"id":125528565,"login":"uyenlexx","display_login":"uyenlexx","gravatar_id":"","url":"https://api.github.com/users/uyenlexx","avatar_url":"https://avatars.githubusercontent.com/u/125528565?"},"repo":{"id":700946194,"name":"HoanqDucAnh/Keebie","url":"https://api.github.com/repos/HoanqDucAnh/Keebie"},"payload":{"repository_id":700946194,"push_id":16466254418,"size":1,"distinct_size":1,"ref":"refs/heads/main","head":"890bc2abcf6de09615b05b474daf8e1a5f20d3b3","before":"378e69db51a44d657e7f8c0343b9d31c7d20ae9d","commits":[{"sha":"890bc2abcf6de09615b05b474daf8e1a5f20d3b3","author":{"email":"21020672@vnu.edu.vn","name":"uyenlex"},"message":"update navbar and search","distinct":true,"url":"https://api.github.com/repos/HoanqDucAnh/Keebie/commits/890bc2abcf6de09615b05b474daf8e1a5f20d3b3"}]},"public":true,"created_at":"2024-01-01T15:00:01Z"}
+{"id":"34502641440","type":"DeleteEvent","actor":{"id":10810283,"login":"direwolf-github","display_login":"direwolf-github","gravatar_id":"","url":"https://api.github.com/users/direwolf-github","avatar_url":"https://avatars.githubusercontent.com/u/10810283?"},"repo":{"id":737802202,"name":"direwolf-github/ephemeral-ci-f72a7b4a","url":"https://api.github.com/repos/direwolf-github/ephemeral-ci-f72a7b4a"},"payload":{"ref":"branch-13f065df","ref_type":"branch","pusher_type":"user"},"public":true,"created_at":"2024-01-01T15:00:01Z"}
+{"id":"34502641446","type":"PushEvent","actor":{"id":119649492,"login":"Zarakkhan-dev","display_login":"Zarakkhan-dev","gravatar_id":"","url":"https://api.github.com/users/Zarakkhan-dev","avatar_url":"https://avatars.githubusercontent.com/u/119649492?"},"repo":{"id":737711771,"name":"Zarakkhan-dev/LegalaiAssistentBackend","url":"https://api.github.com/repos/Zarakkhan-dev/LegalaiAssistentBackend"},"payload":{"repository_id":737711771,"push_id":16466254504,"size":1,"distinct_size":1,"ref":"refs/heads/main","head":"fcd8d1ddc08fc2edc59047eb71ceb546855b9168","before":"690568ba0f17cb8ba56e239f8094e429d4a10cf4","commits":[{"sha":"fcd8d1ddc08fc2edc59047eb71ceb546855b9168","author":{"email":"119649492+Zarakkhan-dev@users.noreply.github.com","name":"Zarakkhan-dev"},"message":"khtam","distinct":true,"url":"https://api.github.com/repos/Zarakkhan-dev/LegalaiAssistentBackend/commits/fcd8d1ddc08fc2edc59047eb71ceb546855b9168"}]},"public":true,"created_at":"2024-01-01T15:00:01Z"}
+{"id":"34502641447","type":"PushEvent","actor":{"id":155086563,"login":"appref5555ix63","display_login":"appref5555ix63","gravatar_id":"","url":"https://api.github.com/users/appref5555ix63","avatar_url":"https://avatars.githubusercontent.com/u/155086563?"},"repo":{"id":737072686,"name":"appref5555ix63/Repo2","url":"https://api.github.com/repos/appref5555ix63/Repo2"},"payload":{"repository_id":737072686,"push_id":16466254618,"size":1,"distinct_size":1,"ref":"refs/heads/main","head":"ba75f798b41ea6752299b69476c3e91be2e59f9b","before":"090039882f0e56947d3967dfb012c54bf8580509","commits":[{"sha":"ba75f798b41ea6752299b69476c3e91be2e59f9b","author":{"email":"you@example.com","name":"Your Name"},"message":"Empty Commit","distinct":true,"url":"https://api.github.com/repos/appref5555ix63/Repo2/commits/ba75f798b41ea6752299b69476c3e91be2e59f9b"}]},"public":true,"created_at":"2024-01-01T15:00:01Z"}
+{"id":"34502641448","type":"ForkEvent","actor":{"id":9263301,"login":"tarinisunil","display_login":"tarinisunil","gravatar_id":"","url":"https://api.github.com/users/tarinisunil","avatar_url":"https://avatars.githubusercontent.com/u/9263301?"},"repo":{"id":188525890,"name":"sahilbansal17/Get_Better_at_CP_in_2_Months","url":"https://api.github.com/repos/sahilbansal17/Get_Better_at_CP_in_2_Months"},"payload":{"forkee":{"id":737802487,"node_id":"R_kgDOK_n49w","name":"Get_Better_at_CP_in_2_Months","full_name":"tarinisunil/Get_Better_at_CP_in_2_Months","private":false,"owner":{"login":"tarinisunil","id":9263301,"node_id":"MDQ6VXNlcjkyNjMzMDE=","avatar_url":"https://avatars.githubusercontent.com/u/9263301?v=4","gravatar_id":"","url":"https://api.github.com/users/tarinisunil","html_url":"https://github.com/tarinisunil","followers_url":"https://api.github.com/users/tarinisunil/followers","following_url":"https://api.github.com/users/tarinisunil/following{/other_user}","gists_url":"https://api.github.com/users/tarinisunil/gists{/gist_id}","starred_url":"https://api.github.com/users/tarinisunil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tarinisunil/subscriptions","organizations_url":"https://api.github.com/users/tarinisunil/orgs","repos_url":"https://api.github.com/users/tarinisunil/repos","events_url":"https://api.github.com/users/tarinisunil/events{/privacy}","received_events_url":"https://api.github.com/users/tarinisunil/received_events","type":"User","site_admin":false},"html_url":"https://github.com/tarinisunil/Get_Better_at_CP_in_2_Months","description":"This contains the curriculum that I will follow to get better at Competitive Programming in 2 months.","fork":true,"url":"https://api.github.com/repos/tarinisunil/Get_Better_at_CP_in_2_Months","forks_url":"https://api.github.com/repos/tarinisunil/Get_Better_at_CP_in_2_Months/forks","keys_url":"https://api.github.com/repos/tarinisunil/Get_Better_at_CP_in_2_Months/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tarinisunil/Get_Better_at_CP_in_2_Months/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tarinisunil/Get_Better_at_CP_in_2_Months/teams","hooks_url":"https://api.github.com/repos/tarinisunil/Get_Better_at_CP_in_2_Months/hooks","issue_events_url":"https://api.github.com/repos/tarinisunil/Get_Better_at_CP_in_2_Months/issues/events{/number}","events_url":"https://api.github.com/repos/tarinisunil/Get_Better_at_CP_in_2_Months/events","assignees_url":"https://api.github.com/repos/tarinisunil/Get_Better_at_CP_in_2_Months/assignees{/user}","branches_url":"https://api.github.com/repos/tarinisunil/Get_Better_at_CP_in_2_Months/branches{/branch}","tags_url":"https://api.github.com/repos/tarinisunil/Get_Better_at_CP_in_2_Months/tags","blobs_url":"https://api.github.com/repos/tarinisunil/Get_Better_at_CP_in_2_Months/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tarinisunil/Get_Better_at_CP_in_2_Months/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tarinisunil/Get_Better_at_CP_in_2_Months/git/refs{/sha}","trees_url":"https://api.github.com/repos/tarinisunil/Get_Better_at_CP_in_2_Months/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tarinisunil/Get_Better_at_CP_in_2_Months/statuses/{sha}","languages_url":"https://api.github.com/repos/tarinisunil/Get_Better_at_CP_in_2_Months/languages","stargazers_url":"https://api.github.com/repos/tarinisunil/Get_Better_at_CP_in_2_Months/stargazers","contributors_url":"https://api.github.com/repos/tarinisunil/Get_Better_at_CP_in_2_Months/contributors","subscribers_url":"https://api.github.com/repos/tarinisunil/Get_Better_at_CP_in_2_Months/subscribers","subscription_url":"https://api.github.com/repos/tarinisunil/Get_Better_at_CP_in_2_Months/subscription","commits_url":"https://api.github.com/repos/tarinisunil/Get_Better_at_CP_in_2_Months/commits{/sha}","git_commits_url":"https://api.github.com/repos/tarinisunil/Get_Better_at_CP_in_2_Months/git/commits{/sha}","comments_url":"https://api.github.com/repos/tarinisunil/Get_Better_at_CP_in_2_Months/comments{/number}","issue_comment_url":"https://api.github.com/repos/tarinisunil/Get_Better_at_CP_in_2_Months/issues/comments{/number}","contents_url":"https://api.github.com/repos/tarinisunil/Get_Better_at_CP_in_2_Months/contents/{+path}","compare_url":"https://api.github.com/repos/tarinisunil/Get_Better_at_CP_in_2_Months/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tarinisunil/Get_Better_at_CP_in_2_Months/merges","archive_url":"https://api.github.com/repos/tarinisunil/Get_Better_at_CP_in_2_Months/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tarinisunil/Get_Better_at_CP_in_2_Months/downloads","issues_url":"https://api.github.com/repos/tarinisunil/Get_Better_at_CP_in_2_Months/issues{/number}","pulls_url":"https://api.github.com/repos/tarinisunil/Get_Better_at_CP_in_2_Months/pulls{/number}","milestones_url":"https://api.github.com/repos/tarinisunil/Get_Better_at_CP_in_2_Months/milestones{/number}","notifications_url":"https://api.github.com/repos/tarinisunil/Get_Better_at_CP_in_2_Months/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tarinisunil/Get_Better_at_CP_in_2_Months/labels{/name}","releases_url":"https://api.github.com/repos/tarinisunil/Get_Better_at_CP_in_2_Months/releases{/id}","deployments_url":"https://api.github.com/repos/tarinisunil/Get_Better_at_CP_in_2_Months/deployments","created_at":"2024-01-01T14:59:39Z","updated_at":"2024-01-01T14:59:39Z","pushed_at":"2023-08-27T10:12:01Z","git_url":"git://github.com/tarinisunil/Get_Better_at_CP_in_2_Months.git","ssh_url":"git@github.com:tarinisunil/Get_Better_at_CP_in_2_Months.git","clone_url":"https://github.com/tarinisunil/Get_Better_at_CP_in_2_Months.git","svn_url":"https://github.com/tarinisunil/Get_Better_at_CP_in_2_Months","homepage":"","size":53,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"has_discussions":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":null,"allow_forking":true,"is_template":false,"web_commit_signoff_required":false,"topics":[],"visibility":"public","forks":0,"open_issues":0,"watchers":0,"default_branch":"main","public":true}},"public":true,"created_at":"2024-01-01T15:00:01Z"}
+{"id":"34502641452","type":"ForkEvent","actor":{"id":12108942,"login":"jackblack369","display_login":"jackblack369","gravatar_id":"","url":"https://api.github.com/users/jackblack369","avatar_url":"https://avatars.githubusercontent.com/u/12108942?"},"repo":{"id":633262635,"name":"danswer-ai/danswer","url":"https://api.github.com/repos/danswer-ai/danswer"},"payload":{"forkee":{"id":737802480,"node_id":"R_kgDOK_n48A","name":"danswer","full_name":"jackblack369/danswer","private":false,"owner":{"login":"jackblack369","id":12108942,"node_id":"MDQ6VXNlcjEyMTA4OTQy","avatar_url":"https://avatars.githubusercontent.com/u/12108942?v=4","gravatar_id":"","url":"https://api.github.com/users/jackblack369","html_url":"https://github.com/jackblack369","followers_url":"https://api.github.com/users/jackblack369/followers","following_url":"https://api.github.com/users/jackblack369/following{/other_user}","gists_url":"https://api.github.com/users/jackblack369/gists{/gist_id}","starred_url":"https://api.github.com/users/jackblack369/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jackblack369/subscriptions","organizations_url":"https://api.github.com/users/jackblack369/orgs","repos_url":"https://api.github.com/users/jackblack369/repos","events_url":"https://api.github.com/users/jackblack369/events{/privacy}","received_events_url":"https://api.github.com/users/jackblack369/received_events","type":"User","site_admin":false},"html_url":"https://github.com/jackblack369/danswer","description":"Ask Questions in natural language and get Answers backed by private sources. Connects to tools like Slack, GitHub, Confluence, etc.","fork":true,"url":"https://api.github.com/repos/jackblack369/danswer","forks_url":"https://api.github.com/repos/jackblack369/danswer/forks","keys_url":"https://api.github.com/repos/jackblack369/danswer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jackblack369/danswer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jackblack369/danswer/teams","hooks_url":"https://api.github.com/repos/jackblack369/danswer/hooks","issue_events_url":"https://api.github.com/repos/jackblack369/danswer/issues/events{/number}","events_url":"https://api.github.com/repos/jackblack369/danswer/events","assignees_url":"https://api.github.com/repos/jackblack369/danswer/assignees{/user}","branches_url":"https://api.github.com/repos/jackblack369/danswer/branches{/branch}","tags_url":"https://api.github.com/repos/jackblack369/danswer/tags","blobs_url":"https://api.github.com/repos/jackblack369/danswer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jackblack369/danswer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jackblack369/danswer/git/refs{/sha}","trees_url":"https://api.github.com/repos/jackblack369/danswer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jackblack369/danswer/statuses/{sha}","languages_url":"https://api.github.com/repos/jackblack369/danswer/languages","stargazers_url":"https://api.github.com/repos/jackblack369/danswer/stargazers","contributors_url":"https://api.github.com/repos/jackblack369/danswer/contributors","subscribers_url":"https://api.github.com/repos/jackblack369/danswer/subscribers","subscription_url":"https://api.github.com/repos/jackblack369/danswer/subscription","commits_url":"https://api.github.com/repos/jackblack369/danswer/commits{/sha}","git_commits_url":"https://api.github.com/repos/jackblack369/danswer/git/commits{/sha}","comments_url":"https://api.github.com/repos/jackblack369/danswer/comments{/number}","issue_comment_url":"https://api.github.com/repos/jackblack369/danswer/issues/comments{/number}","contents_url":"https://api.github.com/repos/jackblack369/danswer/contents/{+path}","compare_url":"https://api.github.com/repos/jackblack369/danswer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jackblack369/danswer/merges","archive_url":"https://api.github.com/repos/jackblack369/danswer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jackblack369/danswer/downloads","issues_url":"https://api.github.com/repos/jackblack369/danswer/issues{/number}","pulls_url":"https://api.github.com/repos/jackblack369/danswer/pulls{/number}","milestones_url":"https://api.github.com/repos/jackblack369/danswer/milestones{/number}","notifications_url":"https://api.github.com/repos/jackblack369/danswer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jackblack369/danswer/labels{/name}","releases_url":"https://api.github.com/repos/jackblack369/danswer/releases{/id}","deployments_url":"https://api.github.com/repos/jackblack369/danswer/deployments","created_at":"2024-01-01T14:59:37Z","updated_at":"2024-01-01T14:59:37Z","pushed_at":"2024-01-01T05:55:59Z","git_url":"git://github.com/jackblack369/danswer.git","ssh_url":"git@github.com:jackblack369/danswer.git","clone_url":"https://github.com/jackblack369/danswer.git","svn_url":"https://github.com/jackblack369/danswer","homepage":"https://docs.danswer.dev/","size":5028,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"has_discussions":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":null,"allow_forking":true,"is_template":false,"web_commit_signoff_required":false,"topics":[],"visibility":"public","forks":0,"open_issues":0,"watchers":0,"default_branch":"main","public":true}},"public":true,"created_at":"2024-01-01T15:00:01Z","org":{"id":131946000,"login":"danswer-ai","gravatar_id":"","url":"https://api.github.com/orgs/danswer-ai","avatar_url":"https://avatars.githubusercontent.com/u/131946000?"}}
+{"id":"34502641453","type":"ForkEvent","actor":{"id":21022925,"login":"vineetp6","display_login":"vineetp6","gravatar_id":"","url":"https://api.github.com/users/vineetp6","avatar_url":"https://avatars.githubusercontent.com/u/21022925?"},"repo":{"id":1692604,"name":"jiaaro/pydub","url":"https://api.github.com/repos/jiaaro/pydub"},"payload":{"forkee":{"id":737802477,"node_id":"R_kgDOK_n47Q","name":"pydub","full_name":"vineetp6/pydub","private":false,"owner":{"login":"vineetp6","id":21022925,"node_id":"MDQ6VXNlcjIxMDIyOTI1","avatar_url":"https://avatars.githubusercontent.com/u/21022925?v=4","gravatar_id":"","url":"https://api.github.com/users/vineetp6","html_url":"https://github.com/vineetp6","followers_url":"https://api.github.com/users/vineetp6/followers","following_url":"https://api.github.com/users/vineetp6/following{/other_user}","gists_url":"https://api.github.com/users/vineetp6/gists{/gist_id}","starred_url":"https://api.github.com/users/vineetp6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vineetp6/subscriptions","organizations_url":"https://api.github.com/users/vineetp6/orgs","repos_url":"https://api.github.com/users/vineetp6/repos","events_url":"https://api.github.com/users/vineetp6/events{/privacy}","received_events_url":"https://api.github.com/users/vineetp6/received_events","type":"User","site_admin":false},"html_url":"https://github.com/vineetp6/pydub","description":"Manipulate audio with a simple and easy high level interface","fork":true,"url":"https://api.github.com/repos/vineetp6/pydub","forks_url":"https://api.github.com/repos/vineetp6/pydub/forks","keys_url":"https://api.github.com/repos/vineetp6/pydub/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vineetp6/pydub/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vineetp6/pydub/teams","hooks_url":"https://api.github.com/repos/vineetp6/pydub/hooks","issue_events_url":"https://api.github.com/repos/vineetp6/pydub/issues/events{/number}","events_url":"https://api.github.com/repos/vineetp6/pydub/events","assignees_url":"https://api.github.com/repos/vineetp6/pydub/assignees{/user}","branches_url":"https://api.github.com/repos/vineetp6/pydub/branches{/branch}","tags_url":"https://api.github.com/repos/vineetp6/pydub/tags","blobs_url":"https://api.github.com/repos/vineetp6/pydub/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vineetp6/pydub/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vineetp6/pydub/git/refs{/sha}","trees_url":"https://api.github.com/repos/vineetp6/pydub/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vineetp6/pydub/statuses/{sha}","languages_url":"https://api.github.com/repos/vineetp6/pydub/languages","stargazers_url":"https://api.github.com/repos/vineetp6/pydub/stargazers","contributors_url":"https://api.github.com/repos/vineetp6/pydub/contributors","subscribers_url":"https://api.github.com/repos/vineetp6/pydub/subscribers","subscription_url":"https://api.github.com/repos/vineetp6/pydub/subscription","commits_url":"https://api.github.com/repos/vineetp6/pydub/commits{/sha}","git_commits_url":"https://api.github.com/repos/vineetp6/pydub/git/commits{/sha}","comments_url":"https://api.github.com/repos/vineetp6/pydub/comments{/number}","issue_comment_url":"https://api.github.com/repos/vineetp6/pydub/issues/comments{/number}","contents_url":"https://api.github.com/repos/vineetp6/pydub/contents/{+path}","compare_url":"https://api.github.com/repos/vineetp6/pydub/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vineetp6/pydub/merges","archive_url":"https://api.github.com/repos/vineetp6/pydub/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vineetp6/pydub/downloads","issues_url":"https://api.github.com/repos/vineetp6/pydub/issues{/number}","pulls_url":"https://api.github.com/repos/vineetp6/pydub/pulls{/number}","milestones_url":"https://api.github.com/repos/vineetp6/pydub/milestones{/number}","notifications_url":"https://api.github.com/repos/vineetp6/pydub/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vineetp6/pydub/labels{/name}","releases_url":"https://api.github.com/repos/vineetp6/pydub/releases{/id}","deployments_url":"https://api.github.com/repos/vineetp6/pydub/deployments","created_at":"2024-01-01T14:59:37Z","updated_at":"2024-01-01T14:59:37Z","pushed_at":"2023-12-28T21:58:28Z","git_url":"git://github.com/vineetp6/pydub.git","ssh_url":"git@github.com:vineetp6/pydub.git","clone_url":"https://github.com/vineetp6/pydub.git","svn_url":"https://github.com/vineetp6/pydub","homepage":"http://pydub.com","size":36944,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"has_discussions":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":null,"allow_forking":true,"is_template":false,"web_commit_signoff_required":false,"topics":[],"visibility":"public","forks":0,"open_issues":0,"watchers":0,"default_branch":"main","public":true}},"public":true,"created_at":"2024-01-01T15:00:01Z"}
+{"id":"34502641458","type":"PushEvent","actor":{"id":24788447,"login":"lhduc94","display_login":"lhduc94","gravatar_id":"","url":"https://api.github.com/users/lhduc94","avatar_url":"https://avatars.githubusercontent.com/u/24788447?"},"repo":{"id":367932994,"name":"lhduc94/kungfupandas","url":"https://api.github.com/repos/lhduc94/kungfupandas"},"payload":{"repository_id":367932994,"push_id":16466254433,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"b7897bd342e45af4ad6b526771d3d440ccf461bb","before":"84bc7606bdcd827aab72d2ce3e1c565d9638a218","commits":[{"sha":"b7897bd342e45af4ad6b526771d3d440ccf461bb","author":{"email":"lhduc94","name":"unknown"},"message":"push book","distinct":true,"url":"https://api.github.com/repos/lhduc94/kungfupandas/commits/b7897bd342e45af4ad6b526771d3d440ccf461bb"}]},"public":true,"created_at":"2024-01-01T15:00:01Z"}
+{"id":"34502641461","type":"PushEvent","actor":{"id":103212375,"login":"ranadebsaha","display_login":"ranadebsaha","gravatar_id":"","url":"https://api.github.com/users/ranadebsaha","avatar_url":"https://avatars.githubusercontent.com/u/103212375?"},"repo":{"id":726471215,"name":"ranadebsaha/DSA","url":"https://api.github.com/repos/ranadebsaha/DSA"},"payload":{"repository_id":726471215,"push_id":16466254533,"size":1,"distinct_size":1,"ref":"refs/heads/main","head":"b057143916ff05adf28db3c2f9c7d7abf85508cb","before":"7897a7fe7c72b5fa642cb1a7e6f67019129a6bdc","commits":[{"sha":"b057143916ff05adf28db3c2f9c7d7abf85508cb","author":{"email":"103212375+ranadebsaha@users.noreply.github.com","name":"Ranadeb Saha"},"message":"Add files via upload","distinct":true,"url":"https://api.github.com/repos/ranadebsaha/DSA/commits/b057143916ff05adf28db3c2f9c7d7abf85508cb"}]},"public":true,"created_at":"2024-01-01T15:00:01Z"}
+{"id":"34502641462","type":"PushEvent","actor":{"id":1428593,"login":"harmanpa","display_login":"harmanpa","gravatar_id":"","url":"https://api.github.com/users/harmanpa","avatar_url":"https://avatars.githubusercontent.com/u/1428593?"},"repo":{"id":202145289,"name":"harmanpa/jgeom","url":"https://api.github.com/repos/harmanpa/jgeom"},"payload":{"repository_id":202145289,"push_id":16466254498,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"21c9e75040b32283b10ab6139346c973cdc7e5ac","before":"84eebd2b4d9cb167d806ce1843ab8e262ac47aad","commits":[{"sha":"21c9e75040b32283b10ab6139346c973cdc7e5ac","author":{"email":"peter.harman@deltatheta.com","name":"Peter Harman"},"message":"Add ability for STL and DXF parsers to read from InputStream rather than just files","distinct":true,"url":"https://api.github.com/repos/harmanpa/jgeom/commits/21c9e75040b32283b10ab6139346c973cdc7e5ac"}]},"public":true,"created_at":"2024-01-01T15:00:01Z"}
+{"id":"34502641465","type":"PushEvent","actor":{"id":155086649,"login":"dim12512a","display_login":"dim12512a","gravatar_id":"","url":"https://api.github.com/users/dim12512a","avatar_url":"https://avatars.githubusercontent.com/u/155086649?"},"repo":{"id":737073774,"name":"dim12512a/Repo6","url":"https://api.github.com/repos/dim12512a/Repo6"},"payload":{"repository_id":737073774,"push_id":16466254578,"size":1,"distinct_size":1,"ref":"refs/heads/main","head":"858f604c8d47ebdd33ab37204d01d6416588bef6","before":"ecca430b2e030a19a8803cfed3df318521a68509","commits":[{"sha":"858f604c8d47ebdd33ab37204d01d6416588bef6","author":{"email":"you@example.com","name":"Your Name"},"message":"Empty Commit","distinct":true,"url":"https://api.github.com/repos/dim12512a/Repo6/commits/858f604c8d47ebdd33ab37204d01d6416588bef6"}]},"public":true,"created_at":"2024-01-01T15:00:01Z"}
+{"id":"34502641467","type":"PushEvent","actor":{"id":148675473,"login":"namson26","display_login":"namson26","gravatar_id":"","url":"https://api.github.com/users/namson26","avatar_url":"https://avatars.githubusercontent.com/u/148675473?"},"repo":{"id":736165831,"name":"namson26/Technology-Information-System","url":"https://api.github.com/repos/namson26/Technology-Information-System"},"payload":{"repository_id":736165831,"push_id":16466254596,"size":1,"distinct_size":1,"ref":"refs/heads/main","head":"55df0dc4a01496922ab060c9c1f323caf2078312","before":"cef0f3fc0d6147fa852cc5eabd377b19be600ef8","commits":[{"sha":"55df0dc4a01496922ab060c9c1f323caf2078312","author":{"email":"148675473+namson26@users.noreply.github.com","name":"muhammad naim bin abdullah"},"message":" industry talk PPG and Habib","distinct":true,"url":"https://api.github.com/repos/namson26/Technology-Information-System/commits/55df0dc4a01496922ab060c9c1f323caf2078312"}]},"public":true,"created_at":"2024-01-01T15:00:01Z"}
+{"id":"34502641469","type":"PushEvent","actor":{"id":153940760,"login":"mdmaid69","display_login":"mdmaid69","gravatar_id":"","url":"https://api.github.com/users/mdmaid69","avatar_url":"https://avatars.githubusercontent.com/u/153940760?"},"repo":{"id":732717980,"name":"mdmaid69/reimagined-giggle","url":"https://api.github.com/repos/mdmaid69/reimagined-giggle"},"payload":{"repository_id":732717980,"push_id":16466254352,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"dc8177f8b942a863ea4c1fb46f3cfcf773880d1b","before":"3269356e1c35a404aefeb6f4a88b0f9c46d71176","commits":[{"sha":"dc8177f8b942a863ea4c1fb46f3cfcf773880d1b","author":{"email":"robot@alexsyw.me","name":"mdmaid69"},"message":"last recover hurt off claim","distinct":true,"url":"https://api.github.com/repos/mdmaid69/reimagined-giggle/commits/dc8177f8b942a863ea4c1fb46f3cfcf773880d1b"}]},"public":true,"created_at":"2024-01-01T15:00:01Z"}
+{"id":"34502641472","type":"PushEvent","actor":{"id":155086649,"login":"dim12512a","display_login":"dim12512a","gravatar_id":"","url":"https://api.github.com/users/dim12512a","avatar_url":"https://avatars.githubusercontent.com/u/155086649?"},"repo":{"id":737073790,"name":"dim12512a/Repo7","url":"https://api.github.com/repos/dim12512a/Repo7"},"payload":{"repository_id":737073790,"push_id":16466254457,"size":1,"distinct_size":1,"ref":"refs/heads/main","head":"178ec29423bffaa2e5a60d52bcce0d7aa1ba51eb","before":"bf9e72eaa83e2fe0606d525c6bc9a14cd13b66b6","commits":[{"sha":"178ec29423bffaa2e5a60d52bcce0d7aa1ba51eb","author":{"email":"you@example.com","name":"Your Name"},"message":"Empty Commit","distinct":true,"url":"https://api.github.com/repos/dim12512a/Repo7/commits/178ec29423bffaa2e5a60d52bcce0d7aa1ba51eb"}]},"public":true,"created_at":"2024-01-01T15:00:01Z"}
+{"id":"34502641475","type":"PullRequestEvent","actor":{"id":42301553,"login":"tomgransden","display_login":"tomgransden","gravatar_id":"","url":"https://api.github.com/users/tomgransden","avatar_url":"https://avatars.githubusercontent.com/u/42301553?"},"repo":{"id":584227840,"name":"tomgransden/MyTummyHurtsApp","url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp"},"payload":{"action":"closed","number":26,"pull_request":{"url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/pulls/26","id":1661122882,"node_id":"PR_kwDOItKcAM5jArlC","html_url":"https://github.com/tomgransden/MyTummyHurtsApp/pull/26","diff_url":"https://github.com/tomgransden/MyTummyHurtsApp/pull/26.diff","patch_url":"https://github.com/tomgransden/MyTummyHurtsApp/pull/26.patch","issue_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/issues/26","number":26,"state":"closed","locked":false,"title":"Dev/tg/add firestore","user":{"login":"tomgransden","id":42301553,"node_id":"MDQ6VXNlcjQyMzAxNTUz","avatar_url":"https://avatars.githubusercontent.com/u/42301553?v=4","gravatar_id":"","url":"https://api.github.com/users/tomgransden","html_url":"https://github.com/tomgransden","followers_url":"https://api.github.com/users/tomgransden/followers","following_url":"https://api.github.com/users/tomgransden/following{/other_user}","gists_url":"https://api.github.com/users/tomgransden/gists{/gist_id}","starred_url":"https://api.github.com/users/tomgransden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomgransden/subscriptions","organizations_url":"https://api.github.com/users/tomgransden/orgs","repos_url":"https://api.github.com/users/tomgransden/repos","events_url":"https://api.github.com/users/tomgransden/events{/privacy}","received_events_url":"https://api.github.com/users/tomgransden/received_events","type":"User","site_admin":false},"body":null,"created_at":"2024-01-01T14:57:47Z","updated_at":"2024-01-01T14:59:42Z","closed_at":"2024-01-01T14:59:40Z","merged_at":"2024-01-01T14:59:40Z","merge_commit_sha":"9ab8219d9a0dd1ae20b2df08c2ccd8ac3476ede0","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"draft":false,"commits_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/pulls/26/commits","review_comments_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/pulls/26/comments","review_comment_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/issues/26/comments","statuses_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/statuses/5fcc5cf25fab3453c37bcdefb7d6738cd19984f1","head":{"label":"tomgransden:dev/tg/add-firestore","ref":"dev/tg/add-firestore","sha":"5fcc5cf25fab3453c37bcdefb7d6738cd19984f1","user":{"login":"tomgransden","id":42301553,"node_id":"MDQ6VXNlcjQyMzAxNTUz","avatar_url":"https://avatars.githubusercontent.com/u/42301553?v=4","gravatar_id":"","url":"https://api.github.com/users/tomgransden","html_url":"https://github.com/tomgransden","followers_url":"https://api.github.com/users/tomgransden/followers","following_url":"https://api.github.com/users/tomgransden/following{/other_user}","gists_url":"https://api.github.com/users/tomgransden/gists{/gist_id}","starred_url":"https://api.github.com/users/tomgransden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomgransden/subscriptions","organizations_url":"https://api.github.com/users/tomgransden/orgs","repos_url":"https://api.github.com/users/tomgransden/repos","events_url":"https://api.github.com/users/tomgransden/events{/privacy}","received_events_url":"https://api.github.com/users/tomgransden/received_events","type":"User","site_admin":false},"repo":{"id":584227840,"node_id":"R_kgDOItKcAA","name":"MyTummyHurtsApp","full_name":"tomgransden/MyTummyHurtsApp","private":false,"owner":{"login":"tomgransden","id":42301553,"node_id":"MDQ6VXNlcjQyMzAxNTUz","avatar_url":"https://avatars.githubusercontent.com/u/42301553?v=4","gravatar_id":"","url":"https://api.github.com/users/tomgransden","html_url":"https://github.com/tomgransden","followers_url":"https://api.github.com/users/tomgransden/followers","following_url":"https://api.github.com/users/tomgransden/following{/other_user}","gists_url":"https://api.github.com/users/tomgransden/gists{/gist_id}","starred_url":"https://api.github.com/users/tomgransden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomgransden/subscriptions","organizations_url":"https://api.github.com/users/tomgransden/orgs","repos_url":"https://api.github.com/users/tomgransden/repos","events_url":"https://api.github.com/users/tomgransden/events{/privacy}","received_events_url":"https://api.github.com/users/tomgransden/received_events","type":"User","site_admin":false},"html_url":"https://github.com/tomgransden/MyTummyHurtsApp","description":null,"fork":false,"url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp","forks_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/forks","keys_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/teams","hooks_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/hooks","issue_events_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/issues/events{/number}","events_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/events","assignees_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/assignees{/user}","branches_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/branches{/branch}","tags_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/tags","blobs_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/git/refs{/sha}","trees_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/statuses/{sha}","languages_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/languages","stargazers_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/stargazers","contributors_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/contributors","subscribers_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/subscribers","subscription_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/subscription","commits_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/commits{/sha}","git_commits_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/git/commits{/sha}","comments_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/comments{/number}","issue_comment_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/issues/comments{/number}","contents_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/contents/{+path}","compare_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/merges","archive_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/downloads","issues_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/issues{/number}","pulls_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/pulls{/number}","milestones_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/milestones{/number}","notifications_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/labels{/name}","releases_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/releases{/id}","deployments_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/deployments","created_at":"2023-01-01T23:02:13Z","updated_at":"2023-12-31T22:21:32Z","pushed_at":"2024-01-01T14:59:40Z","git_url":"git://github.com/tomgransden/MyTummyHurtsApp.git","ssh_url":"git@github.com:tomgransden/MyTummyHurtsApp.git","clone_url":"https://github.com/tomgransden/MyTummyHurtsApp.git","svn_url":"https://github.com/tomgransden/MyTummyHurtsApp","homepage":null,"size":1291,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"has_discussions":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":5,"license":null,"allow_forking":true,"is_template":false,"web_commit_signoff_required":false,"topics":[],"visibility":"public","forks":0,"open_issues":5,"watchers":0,"default_branch":"main"}},"base":{"label":"tomgransden:main","ref":"main","sha":"1985eb5eafef6430a506c07e4eabf68eb85fd759","user":{"login":"tomgransden","id":42301553,"node_id":"MDQ6VXNlcjQyMzAxNTUz","avatar_url":"https://avatars.githubusercontent.com/u/42301553?v=4","gravatar_id":"","url":"https://api.github.com/users/tomgransden","html_url":"https://github.com/tomgransden","followers_url":"https://api.github.com/users/tomgransden/followers","following_url":"https://api.github.com/users/tomgransden/following{/other_user}","gists_url":"https://api.github.com/users/tomgransden/gists{/gist_id}","starred_url":"https://api.github.com/users/tomgransden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomgransden/subscriptions","organizations_url":"https://api.github.com/users/tomgransden/orgs","repos_url":"https://api.github.com/users/tomgransden/repos","events_url":"https://api.github.com/users/tomgransden/events{/privacy}","received_events_url":"https://api.github.com/users/tomgransden/received_events","type":"User","site_admin":false},"repo":{"id":584227840,"node_id":"R_kgDOItKcAA","name":"MyTummyHurtsApp","full_name":"tomgransden/MyTummyHurtsApp","private":false,"owner":{"login":"tomgransden","id":42301553,"node_id":"MDQ6VXNlcjQyMzAxNTUz","avatar_url":"https://avatars.githubusercontent.com/u/42301553?v=4","gravatar_id":"","url":"https://api.github.com/users/tomgransden","html_url":"https://github.com/tomgransden","followers_url":"https://api.github.com/users/tomgransden/followers","following_url":"https://api.github.com/users/tomgransden/following{/other_user}","gists_url":"https://api.github.com/users/tomgransden/gists{/gist_id}","starred_url":"https://api.github.com/users/tomgransden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomgransden/subscriptions","organizations_url":"https://api.github.com/users/tomgransden/orgs","repos_url":"https://api.github.com/users/tomgransden/repos","events_url":"https://api.github.com/users/tomgransden/events{/privacy}","received_events_url":"https://api.github.com/users/tomgransden/received_events","type":"User","site_admin":false},"html_url":"https://github.com/tomgransden/MyTummyHurtsApp","description":null,"fork":false,"url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp","forks_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/forks","keys_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/teams","hooks_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/hooks","issue_events_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/issues/events{/number}","events_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/events","assignees_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/assignees{/user}","branches_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/branches{/branch}","tags_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/tags","blobs_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/git/refs{/sha}","trees_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/statuses/{sha}","languages_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/languages","stargazers_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/stargazers","contributors_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/contributors","subscribers_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/subscribers","subscription_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/subscription","commits_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/commits{/sha}","git_commits_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/git/commits{/sha}","comments_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/comments{/number}","issue_comment_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/issues/comments{/number}","contents_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/contents/{+path}","compare_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/merges","archive_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/downloads","issues_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/issues{/number}","pulls_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/pulls{/number}","milestones_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/milestones{/number}","notifications_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/labels{/name}","releases_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/releases{/id}","deployments_url":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/deployments","created_at":"2023-01-01T23:02:13Z","updated_at":"2023-12-31T22:21:32Z","pushed_at":"2024-01-01T14:59:40Z","git_url":"git://github.com/tomgransden/MyTummyHurtsApp.git","ssh_url":"git@github.com:tomgransden/MyTummyHurtsApp.git","clone_url":"https://github.com/tomgransden/MyTummyHurtsApp.git","svn_url":"https://github.com/tomgransden/MyTummyHurtsApp","homepage":null,"size":1291,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"has_discussions":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":5,"license":null,"allow_forking":true,"is_template":false,"web_commit_signoff_required":false,"topics":[],"visibility":"public","forks":0,"open_issues":5,"watchers":0,"default_branch":"main"}},"_links":{"self":{"href":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/pulls/26"},"html":{"href":"https://github.com/tomgransden/MyTummyHurtsApp/pull/26"},"issue":{"href":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/issues/26"},"comments":{"href":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/issues/26/comments"},"review_comments":{"href":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/pulls/26/comments"},"review_comment":{"href":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/pulls/26/commits"},"statuses":{"href":"https://api.github.com/repos/tomgransden/MyTummyHurtsApp/statuses/5fcc5cf25fab3453c37bcdefb7d6738cd19984f1"}},"author_association":"OWNER","auto_merge":null,"active_lock_reason":null,"merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"tomgransden","id":42301553,"node_id":"MDQ6VXNlcjQyMzAxNTUz","avatar_url":"https://avatars.githubusercontent.com/u/42301553?v=4","gravatar_id":"","url":"https://api.github.com/users/tomgransden","html_url":"https://github.com/tomgransden","followers_url":"https://api.github.com/users/tomgransden/followers","following_url":"https://api.github.com/users/tomgransden/following{/other_user}","gists_url":"https://api.github.com/users/tomgransden/gists{/gist_id}","starred_url":"https://api.github.com/users/tomgransden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomgransden/subscriptions","organizations_url":"https://api.github.com/users/tomgransden/orgs","repos_url":"https://api.github.com/users/tomgransden/repos","events_url":"https://api.github.com/users/tomgransden/events{/privacy}","received_events_url":"https://api.github.com/users/tomgransden/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":11,"additions":593,"deletions":90,"changed_files":21}},"public":true,"created_at":"2024-01-01T15:00:01Z"}
+{"id":"34502641477","type":"PushEvent","actor":{"id":155086649,"login":"dim12512a","display_login":"dim12512a","gravatar_id":"","url":"https://api.github.com/users/dim12512a","avatar_url":"https://avatars.githubusercontent.com/u/155086649?"},"repo":{"id":737073790,"name":"dim12512a/Repo7","url":"https://api.github.com/repos/dim12512a/Repo7"},"payload":{"repository_id":737073790,"push_id":16466254565,"size":1,"distinct_size":1,"ref":"refs/heads/main","head":"821c6272cf3fcdabbc23684a542e25c1a78a1fd9","before":"178ec29423bffaa2e5a60d52bcce0d7aa1ba51eb","commits":[{"sha":"821c6272cf3fcdabbc23684a542e25c1a78a1fd9","author":{"email":"you@example.com","name":"Your Name"},"message":"Empty Commit","distinct":true,"url":"https://api.github.com/repos/dim12512a/Repo7/commits/821c6272cf3fcdabbc23684a542e25c1a78a1fd9"}]},"public":true,"created_at":"2024-01-01T15:00:01Z"}
+{"id":"34502641480","type":"PushEvent","actor":{"id":93431609,"login":"vedant-z","display_login":"vedant-z","gravatar_id":"","url":"https://api.github.com/users/vedant-z","avatar_url":"https://avatars.githubusercontent.com/u/93431609?"},"repo":{"id":737800788,"name":"Exp-Intro-to-GitHub-Flow-Cohort-1/series-intro-to-github-flow-vedant-z","url":"https://api.github.com/repos/Exp-Intro-to-GitHub-Flow-Cohort-1/series-intro-to-github-flow-vedant-z"},"payload":{"repository_id":737800788,"push_id":16466256123,"size":5,"distinct_size":1,"ref":"refs/heads/main","head":"f2071eee1b5250f8a5d801eb2bb25c06c15169d6","before":"2bf3a7c438e51afc4a4170fa53e029c576324c47","commits":[{"sha":"1df8ecba765e3cc1c887859d0a8f9b8cfb439c47","author":{"email":"github-actions@github.com","name":"github-actions"},"message":"Update to 2 in STEP and README.md","distinct":false,"url":"https://api.github.com/repos/Exp-Intro-to-GitHub-Flow-Cohort-1/series-intro-to-github-flow-vedant-z/commits/1df8ecba765e3cc1c887859d0a8f9b8cfb439c47"},{"sha":"4c44dd3b65a2bdd00c7f074e429721595bba6058","author":{"email":"vedantborkar1234@gmail.com","name":"Vedant Borkar"},"message":"Create PROFILE.md","distinct":false,"url":"https://api.github.com/repos/Exp-Intro-to-GitHub-Flow-Cohort-1/series-intro-to-github-flow-vedant-z/commits/4c44dd3b65a2bdd00c7f074e429721595bba6058"},{"sha":"2129e5f0f9e75975d891710c6ac9c8dc3d53d048","author":{"email":"github-actions@github.com","name":"github-actions"},"message":"Update to 3 in STEP and README.md","distinct":false,"url":"https://api.github.com/repos/Exp-Intro-to-GitHub-Flow-Cohort-1/series-intro-to-github-flow-vedant-z/commits/2129e5f0f9e75975d891710c6ac9c8dc3d53d048"},{"sha":"b53ab157f70194441d2b797723399a10bc38b75f","author":{"email":"github-actions@github.com","name":"github-actions"},"message":"Update to 4 in STEP and README.md","distinct":false,"url":"https://api.github.com/repos/Exp-Intro-to-GitHub-Flow-Cohort-1/series-intro-to-github-flow-vedant-z/commits/b53ab157f70194441d2b797723399a10bc38b75f"},{"sha":"f2071eee1b5250f8a5d801eb2bb25c06c15169d6","author":{"email":"vedantborkar1234@gmail.com","name":"Vedant Borkar"},"message":"Merge pull request #2 from Exp-Intro-to-GitHub-Flow-Cohort-1/my-first-branch\n\nAdd my first file","distinct":true,"url":"https://api.github.com/repos/Exp-Intro-to-GitHub-Flow-Cohort-1/series-intro-to-github-flow-vedant-z/commits/f2071eee1b5250f8a5d801eb2bb25c06c15169d6"}]},"public":true,"created_at":"2024-01-01T15:00:01Z","org":{"id":141875263,"login":"Exp-Intro-to-GitHub-Flow-Cohort-1","gravatar_id":"","url":"https://api.github.com/orgs/Exp-Intro-to-GitHub-Flow-Cohort-1","avatar_url":"https://avatars.githubusercontent.com/u/141875263?"}}
+{"id":"34502641481","type":"WatchEvent","actor":{"id":91947853,"login":"morteza-rp","display_login":"morteza-rp","gravatar_id":"","url":"https://api.github.com/users/morteza-rp","avatar_url":"https://avatars.githubusercontent.com/u/91947853?"},"repo":{"id":737404380,"name":"MasoudKaviani/filoger_fanap_402","url":"https://api.github.com/repos/MasoudKaviani/filoger_fanap_402"},"payload":{"action":"started"},"public":true,"created_at":"2024-01-01T15:00:01Z"}
+{"id":"34502641484","type":"PushEvent","actor":{"id":111329684,"login":"B74LABgit","display_login":"B74LABgit","gravatar_id":"","url":"https://api.github.com/users/B74LABgit","avatar_url":"https://avatars.githubusercontent.com/u/111329684?"},"repo":{"id":728366641,"name":"B74LABgit/CAM","url":"https://api.github.com/repos/B74LABgit/CAM"},"payload":{"repository_id":728366641,"push_id":16466254422,"size":1,"distinct_size":1,"ref":"refs/heads/main","head":"213cdd16a7ab268b37069370090c7f818b1a1ce9","before":"53c681fc38cfcf6e973362bbcec3da755a552f96","commits":[{"sha":"213cdd16a7ab268b37069370090c7f818b1a1ce9","author":{"email":"111329684+B74LABgit@users.noreply.github.com","name":"B74LABgit"},"message":"committing files","distinct":true,"url":"https://api.github.com/repos/B74LABgit/CAM/commits/213cdd16a7ab268b37069370090c7f818b1a1ce9"}]},"public":true,"created_at":"2024-01-01T15:00:01Z"}
+{"id":"34502641486","type":"PushEvent","actor":{"id":17267950,"login":"sdhz151","display_login":"sdhz151","gravatar_id":"","url":"https://api.github.com/users/sdhz151","avatar_url":"https://avatars.githubusercontent.com/u/17267950?"},"repo":{"id":402983519,"name":"sdhz153/Actions-OpenWrt","url":"https://api.github.com/repos/sdhz153/Actions-OpenWrt"},"payload":{"repository_id":402983519,"push_id":16466254615,"size":0,"distinct_size":0,"ref":"refs/heads/main","head":"a3850b8414bd4b10d70e4bf19df7a058429dd24c","before":"04ef7d2e78a35a1a7db9e35d7748e13b5db739df","commits":[]},"public":true,"created_at":"2024-01-01T15:00:01Z","org":{"id":45117601,"login":"sdhz153","gravatar_id":"","url":"https://api.github.com/orgs/sdhz153","avatar_url":"https://avatars.githubusercontent.com/u/45117601?"}}
+{"id":"34502641487","type":"CreateEvent","actor":{"id":116669610,"login":"UjjawalSah","display_login":"UjjawalSah","gravatar_id":"","url":"https://api.github.com/users/UjjawalSah","avatar_url":"https://avatars.githubusercontent.com/u/116669610?"},"repo":{"id":737802490,"name":"UjjawalSah/ModernFarming","url":"https://api.github.com/repos/UjjawalSah/ModernFarming"},"payload":{"ref":null,"ref_type":"repository","master_branch":"main","description":null,"pusher_type":"user"},"public":true,"created_at":"2024-01-01T15:00:01Z"}
+{"id":"34502641494","type":"PushEvent","actor":{"id":155335754,"login":"wodcoredev","display_login":"wodcoredev","gravatar_id":"","url":"https://api.github.com/users/wodcoredev","avatar_url":"https://avatars.githubusercontent.com/u/155335754?"},"repo":{"id":737660090,"name":"wod-core/website","url":"https://api.github.com/repos/wod-core/website"},"payload":{"repository_id":737660090,"push_id":16466254518,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"8f4412316aa0f3e32080a9eeebafa92ae33b7382","before":"4fb485cdccac4dfa06fc942c1886e7a5d9a65abb","commits":[{"sha":"8f4412316aa0f3e32080a9eeebafa92ae33b7382","author":{"email":"155335754+wodcoredev@users.noreply.github.com","name":"wodcoredev"},"message":"Update index.html","distinct":true,"url":"https://api.github.com/repos/wod-core/website/commits/8f4412316aa0f3e32080a9eeebafa92ae33b7382"}]},"public":true,"created_at":"2024-01-01T15:00:01Z","org":{"id":155335799,"login":"wod-core","gravatar_id":"","url":"https://api.github.com/orgs/wod-core","avatar_url":"https://avatars.githubusercontent.com/u/155335799?"}}
+{"id":"34502641496","type":"PushEvent","actor":{"id":33451416,"login":"Vsonneveld","display_login":"Vsonneveld","gravatar_id":"","url":"https://api.github.com/users/Vsonneveld","avatar_url":"https://avatars.githubusercontent.com/u/33451416?"},"repo":{"id":625580055,"name":"Vsonneveld/foroxity-genres","url":"https://api.github.com/repos/Vsonneveld/foroxity-genres"},"payload":{"repository_id":625580055,"push_id":16466254600,"size":1,"distinct_size":1,"ref":"refs/heads/main","head":"6aed4e8eea1cca8f50d11abd15790b987d56fa6e","before":"bdab61c80f8b6acc61b6d7afab66606da4ca1db4","commits":[{"sha":"6aed4e8eea1cca8f50d11abd15790b987d56fa6e","author":{"email":"33451416+Vsonneveld@users.noreply.github.com","name":"Vsonneveld"},"message":"The genre has been updated","distinct":true,"url":"https://api.github.com/repos/Vsonneveld/foroxity-genres/commits/6aed4e8eea1cca8f50d11abd15790b987d56fa6e"}]},"public":true,"created_at":"2024-01-01T15:00:01Z"}
+{"id":"34502641499","type":"PushEvent","actor":{"id":9562747,"login":"diphons","display_login":"diphons","gravatar_id":"","url":"https://api.github.com/users/diphons","avatar_url":"https://avatars.githubusercontent.com/u/9562747?"},"repo":{"id":686583207,"name":"diphons/sdm845-419","url":"https://api.github.com/repos/diphons/sdm845-419"},"payload":{"repository_id":686583207,"push_id":16466254611,"size":1,"distinct_size":1,"ref":"refs/heads/14reb","head":"35d30e32592c4d42cc0474f78ff7ae1c16f785e8","before":"8acd58e9462aed43f2bfc53b89ccd548529ed5b1","commits":[{"sha":"35d30e32592c4d42cc0474f78ff7ae1c16f785e8","author":{"email":"emanuelghub@gmail.com","name":"EmanuelCN"},"message":"cpu_input_boost: use MI_DRM notifier","distinct":true,"url":"https://api.github.com/repos/diphons/sdm845-419/commits/35d30e32592c4d42cc0474f78ff7ae1c16f785e8"}]},"public":true,"created_at":"2024-01-01T15:00:01Z"}
+{"id":"34502641501","type":"PushEvent","actor":{"id":145037011,"login":"l1nky-1337","display_login":"l1nky-1337","gravatar_id":"","url":"https://api.github.com/users/l1nky-1337","avatar_url":"https://avatars.githubusercontent.com/u/145037011?"},"repo":{"id":694954073,"name":"l1nky-1337/TimeFn-Updated","url":"https://api.github.com/repos/l1nky-1337/TimeFn-Updated"},"payload":{"repository_id":694954073,"push_id":16466254579,"size":1,"distinct_size":1,"ref":"refs/heads/main","head":"0512d4f767310fa21c124a55c35089a7605c65c4","before":"e1ef0ee8ded49b2249861f1f3243a8f0c1ef7287","commits":[{"sha":"0512d4f767310fa21c124a55c35089a7605c65c4","author":{"email":"145037011+l1nky-1337@users.noreply.github.com","name":"l1nky"},"message":"README.md","distinct":true,"url":"https://api.github.com/repos/l1nky-1337/TimeFn-Updated/commits/0512d4f767310fa21c124a55c35089a7605c65c4"}]},"public":true,"created_at":"2024-01-01T15:00:01Z"}
+{"id":"34502641504","type":"CreateEvent","actor":{"id":16827672,"login":"luiz8910","display_login":"luiz8910","gravatar_id":"","url":"https://api.github.com/users/luiz8910","avatar_url":"https://avatars.githubusercontent.com/u/16827672?"},"repo":{"id":737802492,"name":"luiz8910/codeflix","url":"https://api.github.com/repos/luiz8910/codeflix"},"payload":{"ref":null,"ref_type":"repository","master_branch":"main","description":null,"pusher_type":"user"},"public":true,"created_at":"2024-01-01T15:00:01Z"}
+{"id":"34502641506","type":"PushEvent","actor":{"id":68462294,"login":"Owl3CM","display_login":"Owl3CM","gravatar_id":"","url":"https://api.github.com/users/Owl3CM","avatar_url":"https://avatars.githubusercontent.com/u/68462294?"},"repo":{"id":696821205,"name":"Owl3CM/Eze-Scripts","url":"https://api.github.com/repos/Owl3CM/Eze-Scripts"},"payload":{"repository_id":696821205,"push_id":16466254585,"size":2,"distinct_size":2,"ref":"refs/heads/main","head":"2d463c971fada9f12a102cb4a15b7a0ae40bae76","before":"a3236f1a3fe40fac8870d6b0354fe229646bd77b","commits":[{"sha":"8e96cfab5ed9a9cc05ab804358cf014d28a07a53","author":{"email":"saochiha@gmail.com","name":"Owl3CM"},"message":"sync","distinct":true,"url":"https://api.github.com/repos/Owl3CM/Eze-Scripts/commits/8e96cfab5ed9a9cc05ab804358cf014d28a07a53"},{"sha":"2d463c971fada9f12a102cb4a15b7a0ae40bae76","author":{"email":"saochiha@gmail.com","name":"Owl3CM"},"message":"sync","distinct":true,"url":"https://api.github.com/repos/Owl3CM/Eze-Scripts/commits/2d463c971fada9f12a102cb4a15b7a0ae40bae76"}]},"public":true,"created_at":"2024-01-01T15:00:01Z"}
+{"id":"34502641508","type":"PullRequestReviewEvent","actor":{"id":7011721,"login":"SamboyCoding","display_login":"SamboyCoding","gravatar_id":"","url":"https://api.github.com/users/SamboyCoding","avatar_url":"https://avatars.githubusercontent.com/u/7011721?"},"repo":{"id":192676329,"name":"SamboyCoding/Cpp2IL","url":"https://api.github.com/repos/SamboyCoding/Cpp2IL"},"payload":{"action":"created","review":{"id":1799820647,"node_id":"PRR_kwDOC3wB6c5rRxVn","user":{"login":"SamboyCoding","id":7011721,"node_id":"MDQ6VXNlcjcwMTE3MjE=","avatar_url":"https://avatars.githubusercontent.com/u/7011721?v=4","gravatar_id":"","url":"https://api.github.com/users/SamboyCoding","html_url":"https://github.com/SamboyCoding","followers_url":"https://api.github.com/users/SamboyCoding/followers","following_url":"https://api.github.com/users/SamboyCoding/following{/other_user}","gists_url":"https://api.github.com/users/SamboyCoding/gists{/gist_id}","starred_url":"https://api.github.com/users/SamboyCoding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SamboyCoding/subscriptions","organizations_url":"https://api.github.com/users/SamboyCoding/orgs","repos_url":"https://api.github.com/users/SamboyCoding/repos","events_url":"https://api.github.com/users/SamboyCoding/events{/privacy}","received_events_url":"https://api.github.com/users/SamboyCoding/received_events","type":"User","site_admin":false},"body":"","commit_id":"bdb8cdc74af47455cc9c609c1135f52b97dde417","submitted_at":"2024-01-01T14:59:37Z","state":"approved","html_url":"https://github.com/SamboyCoding/Cpp2IL/pull/255#pullrequestreview-1799820647","pull_request_url":"https://api.github.com/repos/SamboyCoding/Cpp2IL/pulls/255","author_association":"OWNER","_links":{"html":{"href":"https://github.com/SamboyCoding/Cpp2IL/pull/255#pullrequestreview-1799820647"},"pull_request":{"href":"https://api.github.com/repos/SamboyCoding/Cpp2IL/pulls/255"}}},"pull_request":{"url":"https://api.github.com/repos/SamboyCoding/Cpp2IL/pulls/255","id":1660992577,"node_id":"PR_kwDOC3wB6c5jALxB","html_url":"https://github.com/SamboyCoding/Cpp2IL/pull/255","diff_url":"https://github.com/SamboyCoding/Cpp2IL/pull/255.diff","patch_url":"https://github.com/SamboyCoding/Cpp2IL/pull/255.patch","issue_url":"https://api.github.com/repos/SamboyCoding/Cpp2IL/issues/255","number":255,"state":"closed","locked":false,"title":"Support Type Parameters in Call Analysis","user":{"login":"ds5678","id":49847914,"node_id":"MDQ6VXNlcjQ5ODQ3OTE0","avatar_url":"https://avatars.githubusercontent.com/u/49847914?v=4","gravatar_id":"","url":"https://api.github.com/users/ds5678","html_url":"https://github.com/ds5678","followers_url":"https://api.github.com/users/ds5678/followers","following_url":"https://api.github.com/users/ds5678/following{/other_user}","gists_url":"https://api.github.com/users/ds5678/gists{/gist_id}","starred_url":"https://api.github.com/users/ds5678/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ds5678/subscriptions","organizations_url":"https://api.github.com/users/ds5678/orgs","repos_url":"https://api.github.com/users/ds5678/repos","events_url":"https://api.github.com/users/ds5678/events{/privacy}","received_events_url":"https://api.github.com/users/ds5678/received_events","type":"User","site_admin":false},"body":"Resolves #176 \r\n\r\nI also have #173 implemented locally, but I figured you would want to review them separately.","created_at":"2024-01-01T10:06:38Z","updated_at":"2024-01-01T14:59:42Z","closed_at":"2024-01-01T14:59:42Z","merged_at":"2024-01-01T14:59:41Z","merge_commit_sha":"c0eccb1cf5709c2e5683f069d2bb37d3d7f5b416","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"draft":false,"commits_url":"https://api.github.com/repos/SamboyCoding/Cpp2IL/pulls/255/commits","review_comments_url":"https://api.github.com/repos/SamboyCoding/Cpp2IL/pulls/255/comments","review_comment_url":"https://api.github.com/repos/SamboyCoding/Cpp2IL/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SamboyCoding/Cpp2IL/issues/255/comments","statuses_url":"https://api.github.com/repos/SamboyCoding/Cpp2IL/statuses/bdb8cdc74af47455cc9c609c1135f52b97dde417","head":{"label":"ds5678:call-analysis-improvements","ref":"call-analysis-improvements","sha":"bdb8cdc74af47455cc9c609c1135f52b97dde417","user":{"login":"ds5678","id":49847914,"node_id":"MDQ6VXNlcjQ5ODQ3OTE0","avatar_url":"https://avatars.githubusercontent.com/u/49847914?v=4","gravatar_id":"","url":"https://api.github.com/users/ds5678","html_url":"https://github.com/ds5678","followers_url":"https://api.github.com/users/ds5678/followers","following_url":"https://api.github.com/users/ds5678/following{/other_user}","gists_url":"https://api.github.com/users/ds5678/gists{/gist_id}","starred_url":"https://api.github.com/users/ds5678/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ds5678/subscriptions","organizations_url":"https://api.github.com/users/ds5678/orgs","repos_url":"https://api.github.com/users/ds5678/repos","events_url":"https://api.github.com/users/ds5678/events{/privacy}","received_events_url":"https://api.github.com/users/ds5678/received_events","type":"User","site_admin":false},"repo":{"id":387293635,"node_id":"MDEwOlJlcG9zaXRvcnkzODcyOTM2MzU=","name":"Cpp2IL","full_name":"ds5678/Cpp2IL","private":false,"owner":{"login":"ds5678","id":49847914,"node_id":"MDQ6VXNlcjQ5ODQ3OTE0","avatar_url":"https://avatars.githubusercontent.com/u/49847914?v=4","gravatar_id":"","url":"https://api.github.com/users/ds5678","html_url":"https://github.com/ds5678","followers_url":"https://api.github.com/users/ds5678/followers","following_url":"https://api.github.com/users/ds5678/following{/other_user}","gists_url":"https://api.github.com/users/ds5678/gists{/gist_id}","starred_url":"https://api.github.com/users/ds5678/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ds5678/subscriptions","organizations_url":"https://api.github.com/users/ds5678/orgs","repos_url":"https://api.github.com/users/ds5678/repos","events_url":"https://api.github.com/users/ds5678/events{/privacy}","received_events_url":"https://api.github.com/users/ds5678/received_events","type":"User","site_admin":false},"html_url":"https://github.com/ds5678/Cpp2IL","description":"Work-in-progress tool to reverse unity's IL2CPP toolchain.","fork":true,"url":"https://api.github.com/repos/ds5678/Cpp2IL","forks_url":"https://api.github.com/repos/ds5678/Cpp2IL/forks","keys_url":"https://api.github.com/repos/ds5678/Cpp2IL/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ds5678/Cpp2IL/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ds5678/Cpp2IL/teams","hooks_url":"https://api.github.com/repos/ds5678/Cpp2IL/hooks","issue_events_url":"https://api.github.com/repos/ds5678/Cpp2IL/issues/events{/number}","events_url":"https://api.github.com/repos/ds5678/Cpp2IL/events","assignees_url":"https://api.github.com/repos/ds5678/Cpp2IL/assignees{/user}","branches_url":"https://api.github.com/repos/ds5678/Cpp2IL/branches{/branch}","tags_url":"https://api.github.com/repos/ds5678/Cpp2IL/tags","blobs_url":"https://api.github.com/repos/ds5678/Cpp2IL/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ds5678/Cpp2IL/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ds5678/Cpp2IL/git/refs{/sha}","trees_url":"https://api.github.com/repos/ds5678/Cpp2IL/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ds5678/Cpp2IL/statuses/{sha}","languages_url":"https://api.github.com/repos/ds5678/Cpp2IL/languages","stargazers_url":"https://api.github.com/repos/ds5678/Cpp2IL/stargazers","contributors_url":"https://api.github.com/repos/ds5678/Cpp2IL/contributors","subscribers_url":"https://api.github.com/repos/ds5678/Cpp2IL/subscribers","subscription_url":"https://api.github.com/repos/ds5678/Cpp2IL/subscription","commits_url":"https://api.github.com/repos/ds5678/Cpp2IL/commits{/sha}","git_commits_url":"https://api.github.com/repos/ds5678/Cpp2IL/git/commits{/sha}","comments_url":"https://api.github.com/repos/ds5678/Cpp2IL/comments{/number}","issue_comment_url":"https://api.github.com/repos/ds5678/Cpp2IL/issues/comments{/number}","contents_url":"https://api.github.com/repos/ds5678/Cpp2IL/contents/{+path}","compare_url":"https://api.github.com/repos/ds5678/Cpp2IL/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ds5678/Cpp2IL/merges","archive_url":"https://api.github.com/repos/ds5678/Cpp2IL/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ds5678/Cpp2IL/downloads","issues_url":"https://api.github.com/repos/ds5678/Cpp2IL/issues{/number}","pulls_url":"https://api.github.com/repos/ds5678/Cpp2IL/pulls{/number}","milestones_url":"https://api.github.com/repos/ds5678/Cpp2IL/milestones{/number}","notifications_url":"https://api.github.com/repos/ds5678/Cpp2IL/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ds5678/Cpp2IL/labels{/name}","releases_url":"https://api.github.com/repos/ds5678/Cpp2IL/releases{/id}","deployments_url":"https://api.github.com/repos/ds5678/Cpp2IL/deployments","created_at":"2021-07-19T00:10:02Z","updated_at":"2021-11-23T08:03:40Z","pushed_at":"2024-01-01T14:10:02Z","git_url":"git://github.com/ds5678/Cpp2IL.git","ssh_url":"git@github.com:ds5678/Cpp2IL.git","clone_url":"https://github.com/ds5678/Cpp2IL.git","svn_url":"https://github.com/ds5678/Cpp2IL","homepage":"","size":48217,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"has_discussions":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"allow_forking":true,"is_template":false,"web_commit_signoff_required":false,"topics":[],"visibility":"public","forks":0,"open_issues":1,"watchers":0,"default_branch":"development"}},"base":{"label":"SamboyCoding:development","ref":"development","sha":"a53e72da9b78846404b534e7a6cca7424fa32a01","user":{"login":"SamboyCoding","id":7011721,"node_id":"MDQ6VXNlcjcwMTE3MjE=","avatar_url":"https://avatars.githubusercontent.com/u/7011721?v=4","gravatar_id":"","url":"https://api.github.com/users/SamboyCoding","html_url":"https://github.com/SamboyCoding","followers_url":"https://api.github.com/users/SamboyCoding/followers","following_url":"https://api.github.com/users/SamboyCoding/following{/other_user}","gists_url":"https://api.github.com/users/SamboyCoding/gists{/gist_id}","starred_url":"https://api.github.com/users/SamboyCoding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SamboyCoding/subscriptions","organizations_url":"https://api.github.com/users/SamboyCoding/orgs","repos_url":"https://api.github.com/users/SamboyCoding/repos","events_url":"https://api.github.com/users/SamboyCoding/events{/privacy}","received_events_url":"https://api.github.com/users/SamboyCoding/received_events","type":"User","site_admin":false},"repo":{"id":192676329,"node_id":"MDEwOlJlcG9zaXRvcnkxOTI2NzYzMjk=","name":"Cpp2IL","full_name":"SamboyCoding/Cpp2IL","private":false,"owner":{"login":"SamboyCoding","id":7011721,"node_id":"MDQ6VXNlcjcwMTE3MjE=","avatar_url":"https://avatars.githubusercontent.com/u/7011721?v=4","gravatar_id":"","url":"https://api.github.com/users/SamboyCoding","html_url":"https://github.com/SamboyCoding","followers_url":"https://api.github.com/users/SamboyCoding/followers","following_url":"https://api.github.com/users/SamboyCoding/following{/other_user}","gists_url":"https://api.github.com/users/SamboyCoding/gists{/gist_id}","starred_url":"https://api.github.com/users/SamboyCoding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SamboyCoding/subscriptions","organizations_url":"https://api.github.com/users/SamboyCoding/orgs","repos_url":"https://api.github.com/users/SamboyCoding/repos","events_url":"https://api.github.com/users/SamboyCoding/events{/privacy}","received_events_url":"https://api.github.com/users/SamboyCoding/received_events","type":"User","site_admin":false},"html_url":"https://github.com/SamboyCoding/Cpp2IL","description":"Work-in-progress tool to reverse unity's IL2CPP toolchain.","fork":false,"url":"https://api.github.com/repos/SamboyCoding/Cpp2IL","forks_url":"https://api.github.com/repos/SamboyCoding/Cpp2IL/forks","keys_url":"https://api.github.com/repos/SamboyCoding/Cpp2IL/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SamboyCoding/Cpp2IL/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SamboyCoding/Cpp2IL/teams","hooks_url":"https://api.github.com/repos/SamboyCoding/Cpp2IL/hooks","issue_events_url":"https://api.github.com/repos/SamboyCoding/Cpp2IL/issues/events{/number}","events_url":"https://api.github.com/repos/SamboyCoding/Cpp2IL/events","assignees_url":"https://api.github.com/repos/SamboyCoding/Cpp2IL/assignees{/user}","branches_url":"https://api.github.com/repos/SamboyCoding/Cpp2IL/branches{/branch}","tags_url":"https://api.github.com/repos/SamboyCoding/Cpp2IL/tags","blobs_url":"https://api.github.com/repos/SamboyCoding/Cpp2IL/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SamboyCoding/Cpp2IL/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SamboyCoding/Cpp2IL/git/refs{/sha}","trees_url":"https://api.github.com/repos/SamboyCoding/Cpp2IL/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SamboyCoding/Cpp2IL/statuses/{sha}","languages_url":"https://api.github.com/repos/SamboyCoding/Cpp2IL/languages","stargazers_url":"https://api.github.com/repos/SamboyCoding/Cpp2IL/stargazers","contributors_url":"https://api.github.com/repos/SamboyCoding/Cpp2IL/contributors","subscribers_url":"https://api.github.com/repos/SamboyCoding/Cpp2IL/subscribers","subscription_url":"https://api.github.com/repos/SamboyCoding/Cpp2IL/subscription","commits_url":"https://api.github.com/repos/SamboyCoding/Cpp2IL/commits{/sha}","git_commits_url":"https://api.github.com/repos/SamboyCoding/Cpp2IL/git/commits{/sha}","comments_url":"https://api.github.com/repos/SamboyCoding/Cpp2IL/comments{/number}","issue_comment_url":"https://api.github.com/repos/SamboyCoding/Cpp2IL/issues/comments{/number}","contents_url":"https://api.github.com/repos/SamboyCoding/Cpp2IL/contents/{+path}","compare_url":"https://api.github.com/repos/SamboyCoding/Cpp2IL/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SamboyCoding/Cpp2IL/merges","archive_url":"https://api.github.com/repos/SamboyCoding/Cpp2IL/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SamboyCoding/Cpp2IL/downloads","issues_url":"https://api.github.com/repos/SamboyCoding/Cpp2IL/issues{/number}","pulls_url":"https://api.github.com/repos/SamboyCoding/Cpp2IL/pulls{/number}","milestones_url":"https://api.github.com/repos/SamboyCoding/Cpp2IL/milestones{/number}","notifications_url":"https://api.github.com/repos/SamboyCoding/Cpp2IL/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SamboyCoding/Cpp2IL/labels{/name}","releases_url":"https://api.github.com/repos/SamboyCoding/Cpp2IL/releases{/id}","deployments_url":"https://api.github.com/repos/SamboyCoding/Cpp2IL/deployments","created_at":"2019-06-19T06:56:00Z","updated_at":"2024-01-01T06:04:00Z","pushed_at":"2024-01-01T14:59:41Z","git_url":"git://github.com/SamboyCoding/Cpp2IL.git","ssh_url":"git@github.com:SamboyCoding/Cpp2IL.git","clone_url":"https://github.com/SamboyCoding/Cpp2IL.git","svn_url":"https://github.com/SamboyCoding/Cpp2IL","homepage":"","size":48364,"stargazers_count":1316,"watchers_count":1316,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"has_discussions":false,"forks_count":149,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":24,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"allow_forking":true,"is_template":false,"web_commit_signoff_required":false,"topics":["analysis","decompiler","il2cpp","il2cpp-metadata","reverse-engineering","static-analysis","unity"],"visibility":"public","forks":149,"open_issues":24,"watchers":1316,"default_branch":"new-analysis"}},"_links":{"self":{"href":"https://api.github.com/repos/SamboyCoding/Cpp2IL/pulls/255"},"html":{"href":"https://github.com/SamboyCoding/Cpp2IL/pull/255"},"issue":{"href":"https://api.github.com/repos/SamboyCoding/Cpp2IL/issues/255"},"comments":{"href":"https://api.github.com/repos/SamboyCoding/Cpp2IL/issues/255/comments"},"review_comments":{"href":"https://api.github.com/repos/SamboyCoding/Cpp2IL/pulls/255/comments"},"review_comment":{"href":"https://api.github.com/repos/SamboyCoding/Cpp2IL/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SamboyCoding/Cpp2IL/pulls/255/commits"},"statuses":{"href":"https://api.github.com/repos/SamboyCoding/Cpp2IL/statuses/bdb8cdc74af47455cc9c609c1135f52b97dde417"}},"author_association":"CONTRIBUTOR","auto_merge":null,"active_lock_reason":null}},"public":true,"created_at":"2024-01-01T15:00:01Z"}
+{"id":"34502641513","type":"PushEvent","actor":{"id":155086666,"login":"lu146enza","display_login":"lu146enza","gravatar_id":"","url":"https://api.github.com/users/lu146enza","avatar_url":"https://avatars.githubusercontent.com/u/155086666?"},"repo":{"id":737110895,"name":"lu146enza/Repo9","url":"https://api.github.com/repos/lu146enza/Repo9"},"payload":{"repository_id":737110895,"push_id":16466254411,"size":1,"distinct_size":1,"ref":"refs/heads/main","head":"30f0bf3d0aa3f132294c36ad8510df63fdc4ca74","before":"2b611640aa7a03be3b1a8f36b9a51ed9a4a76aae","commits":[{"sha":"30f0bf3d0aa3f132294c36ad8510df63fdc4ca74","author":{"email":"you@example.com","name":"Your Name"},"message":"Empty Commit","distinct":true,"url":"https://api.github.com/repos/lu146enza/Repo9/commits/30f0bf3d0aa3f132294c36ad8510df63fdc4ca74"}]},"public":true,"created_at":"2024-01-01T15:00:01Z"}
+{"id":"34502641516","type":"PushEvent","actor":{"id":40597892,"login":"fdvorak","display_login":"fdvorak","gravatar_id":"","url":"https://api.github.com/users/fdvorak","avatar_url":"https://avatars.githubusercontent.com/u/40597892?"},"repo":{"id":465250207,"name":"fdvorak/sandWind","url":"https://api.github.com/repos/fdvorak/sandWind"},"payload":{"repository_id":465250207,"push_id":16466254614,"size":1,"distinct_size":1,"ref":"refs/heads/main","head":"75f33e55b3a9470eff31fa39876db6e39799c408","before":"59eeb1a645f783f70f8e7810445b275f4b22810c","commits":[{"sha":"75f33e55b3a9470eff31fa39876db6e39799c408","author":{"email":"40597892+fdvorak@users.noreply.github.com","name":"fdvorak"},"message":"automated commit 2024-01-01 15:59:14","distinct":true,"url":"https://api.github.com/repos/fdvorak/sandWind/commits/75f33e55b3a9470eff31fa39876db6e39799c408"}]},"public":true,"created_at":"2024-01-01T15:00:01Z"}
+{"id":"34502641517","type":"PushEvent","actor":{"id":97979094,"login":"github-shvabra","display_login":"github-shvabra","gravatar_id":"","url":"https://api.github.com/users/github-shvabra","avatar_url":"https://avatars.githubusercontent.com/u/97979094?"},"repo":{"id":642858622,"name":"saby/ios-sabycom","url":"https://api.github.com/repos/saby/ios-sabycom"},"payload":{"repository_id":642858622,"push_id":16466254413,"size":1,"distinct_size":1,"ref":"refs/heads/rc-23.7106","head":"a0e4494a741c48d13be76964d86c7cd76753919a","before":"99492b5c8305e002d575672ef551ecae0d7bce6c","commits":[{"sha":"a0e4494a741c48d13be76964d86c7cd76753919a","author":{"email":"unix-prog_server@unix.tensor.ru@sbis-dev-mon.unix.tensor.ru","name":"Служебный пользователь Инц №52255"},"message":"new change","distinct":true,"url":"https://api.github.com/repos/saby/ios-sabycom/commits/a0e4494a741c48d13be76964d86c7cd76753919a"}]},"public":true,"created_at":"2024-01-01T15:00:01Z","org":{"id":42994484,"login":"saby","gravatar_id":"","url":"https://api.github.com/orgs/saby","avatar_url":"https://avatars.githubusercontent.com/u/42994484?"}}
+{"id":"34502641520","type":"DeleteEvent","actor":{"id":2599636,"login":"artamonovkirill","display_login":"artamonovkirill","gravatar_id":"","url":"https://api.github.com/users/artamonovkirill","avatar_url":"https://avatars.githubusercontent.com/u/2599636?"},"repo":{"id":95086228,"name":"tomtom-international/goji-http-client","url":"https://api.github.com/repos/tomtom-international/goji-http-client"},"payload":{"ref":"dependabot/maven/log4j.version-2.22.1","ref_type":"branch","pusher_type":"user"},"public":true,"created_at":"2024-01-01T15:00:01Z","org":{"id":11631435,"login":"tomtom-international","gravatar_id":"","url":"https://api.github.com/orgs/tomtom-international","avatar_url":"https://avatars.githubusercontent.com/u/11631435?"}}
+{"id":"34502641526","type":"PullRequestEvent","actor":{"id":41898282,"login":"github-actions[bot]","display_login":"github-actions","gravatar_id":"","url":"https://api.github.com/users/github-actions[bot]","avatar_url":"https://avatars.githubusercontent.com/u/41898282?"},"repo":{"id":604901781,"name":"jckimble/Github-Graph-Background","url":"https://api.github.com/repos/jckimble/Github-Graph-Background"},"payload":{"action":"closed","number":45,"pull_request":{"url":"https://api.github.com/repos/jckimble/Github-Graph-Background/pulls/45","id":1661122658,"node_id":"PR_kwDOJA4Rlc5jArhi","html_url":"https://github.com/jckimble/Github-Graph-Background/pull/45","diff_url":"https://github.com/jckimble/Github-Graph-Background/pull/45.diff","patch_url":"https://github.com/jckimble/Github-Graph-Background/pull/45.patch","issue_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/issues/45","number":45,"state":"closed","locked":false,"title":"build(deps-dev): bump ts-node from 10.9.1 to 10.9.2","user":{"login":"dependabot[bot]","id":49699333,"node_id":"MDM6Qm90NDk2OTkzMzM=","avatar_url":"https://avatars.githubusercontent.com/in/29110?v=4","gravatar_id":"","url":"https://api.github.com/users/dependabot%5Bbot%5D","html_url":"https://github.com/apps/dependabot","followers_url":"https://api.github.com/users/dependabot%5Bbot%5D/followers","following_url":"https://api.github.com/users/dependabot%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/dependabot%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/dependabot%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dependabot%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/dependabot%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/dependabot%5Bbot%5D/repos","events_url":"https://api.github.com/users/dependabot%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/dependabot%5Bbot%5D/received_events","type":"Bot","site_admin":false},"body":"Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 10.9.1 to 10.9.2.\n<details>\n<summary>Release notes</summary>\n<p><em>Sourced from <a href=\"https://github.com/TypeStrong/ts-node/releases\">ts-node's releases</a>.</em></p>\n<blockquote>\n<h2>Fix <code>tsconfig.json</code> file not found</h2>\n<p><strong>Fixed</strong></p>\n<ul>\n<li>Fixed <code>tsconfig.json</code> file not found on latest TypeScript version (<a href=\"https://redirect.github.com/TypeStrong/ts-node/pull/2091\">TypeStrong/ts-node#2091</a>)</li>\n</ul>\n</blockquote>\n</details>\n<details>\n<summary>Commits</summary>\n<ul>\n<li><a href=\"https://github.com/TypeStrong/ts-node/commit/057ac1beb118f9c42d21e876a17320ad73ea6be2\"><code>057ac1b</code></a> 10.9.2</li>\n<li><a href=\"https://github.com/TypeStrong/ts-node/commit/c8805d5d4bcdfa564fdcc0ff6630381c9f54ee5a\"><code>c8805d5</code></a> Update package lock</li>\n<li><a href=\"https://github.com/TypeStrong/ts-node/commit/99862f7ec663927045ecb5703230c368816d0857\"><code>99862f7</code></a> Bump swc dependency</li>\n<li><a href=\"https://github.com/TypeStrong/ts-node/commit/cdc4e883ab7072865abc4070f651374503cc88a9\"><code>cdc4e88</code></a> Ignore test files in build schema</li>\n<li><a href=\"https://github.com/TypeStrong/ts-node/commit/08cdfb0c70fbe3cadd658ef025d7947a0a59c920\"><code>08cdfb0</code></a> Backport swc fixes on main</li>\n<li><a href=\"https://github.com/TypeStrong/ts-node/commit/9639daa83c2122dd3d5ac4520f2d990d997fe8ba\"><code>9639daa</code></a> Ignore test files in build</li>\n<li><a href=\"https://github.com/TypeStrong/ts-node/commit/cc1a503e5faae87b034b76a3f5ddd53e5e7a6b3b\"><code>cc1a503</code></a> Fix <code>tsconfig.json</code> not found with TS &gt;= 5.3 (<a href=\"https://redirect.github.com/TypeStrong/ts-node/issues/2091\">#2091</a>)</li>\n<li>See full diff in <a href=\"https://github.com/TypeStrong/ts-node/compare/v10.9.1...v10.9.2\">compare view</a></li>\n</ul>\n</details>\n<br />\n\n\n[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ts-node&package-manager=npm_and_yarn&previous-version=10.9.1&new-version=10.9.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)\n\nDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.\n\n[//]: # (dependabot-automerge-start)\n[//]: # (dependabot-automerge-end)\n\n---\n\n<details>\n<summary>Dependabot commands and options</summary>\n<br />\n\nYou can trigger Dependabot actions by commenting on this PR:\n- `@dependabot rebase` will rebase this PR\n- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it\n- `@dependabot merge` will merge this PR after your CI passes on it\n- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it\n- `@dependabot cancel merge` will cancel a previously requested merge and block automerging\n- `@dependabot reopen` will reopen this PR if it is closed\n- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually\n- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency\n- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)\n- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)\n- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)\n\n\n</details>","created_at":"2024-01-01T14:57:18Z","updated_at":"2024-01-01T14:59:50Z","closed_at":"2024-01-01T14:59:39Z","merged_at":"2024-01-01T14:59:39Z","merge_commit_sha":"ead252ad0a6637850da003273f4c9e76b9c78ec1","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":5213407120,"node_id":"LA_kwDOJA4Rlc8AAAABNr5HkA","url":"https://api.github.com/repos/jckimble/Github-Graph-Background/labels/dependencies","name":"dependencies","color":"0366d6","default":false,"description":"Pull requests that update a dependency file"},{"id":5213407134,"node_id":"LA_kwDOJA4Rlc8AAAABNr5Hng","url":"https://api.github.com/repos/jckimble/Github-Graph-Background/labels/javascript","name":"javascript","color":"168700","default":false,"description":"Pull requests that update Javascript code"}],"milestone":null,"draft":false,"commits_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/pulls/45/commits","review_comments_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/pulls/45/comments","review_comment_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/issues/45/comments","statuses_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/statuses/6666459e54f4da75d0b24dcb82683a400b37c99b","head":{"label":"jckimble:dependabot/npm_and_yarn/ts-node-10.9.2","ref":"dependabot/npm_and_yarn/ts-node-10.9.2","sha":"6666459e54f4da75d0b24dcb82683a400b37c99b","user":{"login":"jckimble","id":1577799,"node_id":"MDQ6VXNlcjE1Nzc3OTk=","avatar_url":"https://avatars.githubusercontent.com/u/1577799?v=4","gravatar_id":"","url":"https://api.github.com/users/jckimble","html_url":"https://github.com/jckimble","followers_url":"https://api.github.com/users/jckimble/followers","following_url":"https://api.github.com/users/jckimble/following{/other_user}","gists_url":"https://api.github.com/users/jckimble/gists{/gist_id}","starred_url":"https://api.github.com/users/jckimble/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jckimble/subscriptions","organizations_url":"https://api.github.com/users/jckimble/orgs","repos_url":"https://api.github.com/users/jckimble/repos","events_url":"https://api.github.com/users/jckimble/events{/privacy}","received_events_url":"https://api.github.com/users/jckimble/received_events","type":"User","site_admin":false},"repo":{"id":604901781,"node_id":"R_kgDOJA4RlQ","name":"Github-Graph-Background","full_name":"jckimble/Github-Graph-Background","private":false,"owner":{"login":"jckimble","id":1577799,"node_id":"MDQ6VXNlcjE1Nzc3OTk=","avatar_url":"https://avatars.githubusercontent.com/u/1577799?v=4","gravatar_id":"","url":"https://api.github.com/users/jckimble","html_url":"https://github.com/jckimble","followers_url":"https://api.github.com/users/jckimble/followers","following_url":"https://api.github.com/users/jckimble/following{/other_user}","gists_url":"https://api.github.com/users/jckimble/gists{/gist_id}","starred_url":"https://api.github.com/users/jckimble/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jckimble/subscriptions","organizations_url":"https://api.github.com/users/jckimble/orgs","repos_url":"https://api.github.com/users/jckimble/repos","events_url":"https://api.github.com/users/jckimble/events{/privacy}","received_events_url":"https://api.github.com/users/jckimble/received_events","type":"User","site_admin":false},"html_url":"https://github.com/jckimble/Github-Graph-Background","description":"A toy program for getting your GitHub Contributions and creating a background image from it with many themes","fork":false,"url":"https://api.github.com/repos/jckimble/Github-Graph-Background","forks_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/forks","keys_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/teams","hooks_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/hooks","issue_events_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/issues/events{/number}","events_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/events","assignees_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/assignees{/user}","branches_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/branches{/branch}","tags_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/tags","blobs_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/git/refs{/sha}","trees_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/statuses/{sha}","languages_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/languages","stargazers_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/stargazers","contributors_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/contributors","subscribers_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/subscribers","subscription_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/subscription","commits_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/commits{/sha}","git_commits_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/git/commits{/sha}","comments_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/comments{/number}","issue_comment_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/issues/comments{/number}","contents_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/contents/{+path}","compare_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/merges","archive_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/downloads","issues_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/issues{/number}","pulls_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/pulls{/number}","milestones_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/milestones{/number}","notifications_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/labels{/name}","releases_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/releases{/id}","deployments_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/deployments","created_at":"2023-02-22T02:42:55Z","updated_at":"2023-11-01T17:29:32Z","pushed_at":"2024-01-01T14:59:49Z","git_url":"git://github.com/jckimble/Github-Graph-Background.git","ssh_url":"git@github.com:jckimble/Github-Graph-Background.git","clone_url":"https://github.com/jckimble/Github-Graph-Background.git","svn_url":"https://github.com/jckimble/Github-Graph-Background","homepage":"","size":2854,"stargazers_count":1,"watchers_count":1,"language":"TypeScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"has_discussions":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":4,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"allow_forking":true,"is_template":false,"web_commit_signoff_required":false,"topics":["background-image","cli","desktop","github","github-api","github-contributions","nodejs","toy-project"],"visibility":"public","forks":0,"open_issues":4,"watchers":1,"default_branch":"master"}},"base":{"label":"jckimble:master","ref":"master","sha":"aa5492fff237d4a4b93c0b48e0750c763f020e30","user":{"login":"jckimble","id":1577799,"node_id":"MDQ6VXNlcjE1Nzc3OTk=","avatar_url":"https://avatars.githubusercontent.com/u/1577799?v=4","gravatar_id":"","url":"https://api.github.com/users/jckimble","html_url":"https://github.com/jckimble","followers_url":"https://api.github.com/users/jckimble/followers","following_url":"https://api.github.com/users/jckimble/following{/other_user}","gists_url":"https://api.github.com/users/jckimble/gists{/gist_id}","starred_url":"https://api.github.com/users/jckimble/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jckimble/subscriptions","organizations_url":"https://api.github.com/users/jckimble/orgs","repos_url":"https://api.github.com/users/jckimble/repos","events_url":"https://api.github.com/users/jckimble/events{/privacy}","received_events_url":"https://api.github.com/users/jckimble/received_events","type":"User","site_admin":false},"repo":{"id":604901781,"node_id":"R_kgDOJA4RlQ","name":"Github-Graph-Background","full_name":"jckimble/Github-Graph-Background","private":false,"owner":{"login":"jckimble","id":1577799,"node_id":"MDQ6VXNlcjE1Nzc3OTk=","avatar_url":"https://avatars.githubusercontent.com/u/1577799?v=4","gravatar_id":"","url":"https://api.github.com/users/jckimble","html_url":"https://github.com/jckimble","followers_url":"https://api.github.com/users/jckimble/followers","following_url":"https://api.github.com/users/jckimble/following{/other_user}","gists_url":"https://api.github.com/users/jckimble/gists{/gist_id}","starred_url":"https://api.github.com/users/jckimble/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jckimble/subscriptions","organizations_url":"https://api.github.com/users/jckimble/orgs","repos_url":"https://api.github.com/users/jckimble/repos","events_url":"https://api.github.com/users/jckimble/events{/privacy}","received_events_url":"https://api.github.com/users/jckimble/received_events","type":"User","site_admin":false},"html_url":"https://github.com/jckimble/Github-Graph-Background","description":"A toy program for getting your GitHub Contributions and creating a background image from it with many themes","fork":false,"url":"https://api.github.com/repos/jckimble/Github-Graph-Background","forks_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/forks","keys_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/teams","hooks_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/hooks","issue_events_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/issues/events{/number}","events_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/events","assignees_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/assignees{/user}","branches_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/branches{/branch}","tags_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/tags","blobs_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/git/refs{/sha}","trees_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/statuses/{sha}","languages_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/languages","stargazers_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/stargazers","contributors_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/contributors","subscribers_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/subscribers","subscription_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/subscription","commits_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/commits{/sha}","git_commits_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/git/commits{/sha}","comments_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/comments{/number}","issue_comment_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/issues/comments{/number}","contents_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/contents/{+path}","compare_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/merges","archive_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/downloads","issues_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/issues{/number}","pulls_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/pulls{/number}","milestones_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/milestones{/number}","notifications_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/labels{/name}","releases_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/releases{/id}","deployments_url":"https://api.github.com/repos/jckimble/Github-Graph-Background/deployments","created_at":"2023-02-22T02:42:55Z","updated_at":"2023-11-01T17:29:32Z","pushed_at":"2024-01-01T14:59:49Z","git_url":"git://github.com/jckimble/Github-Graph-Background.git","ssh_url":"git@github.com:jckimble/Github-Graph-Background.git","clone_url":"https://github.com/jckimble/Github-Graph-Background.git","svn_url":"https://github.com/jckimble/Github-Graph-Background","homepage":"","size":2854,"stargazers_count":1,"watchers_count":1,"language":"TypeScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"has_discussions":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":4,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"allow_forking":true,"is_template":false,"web_commit_signoff_required":false,"topics":["background-image","cli","desktop","github","github-api","github-contributions","nodejs","toy-project"],"visibility":"public","forks":0,"open_issues":4,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jckimble/Github-Graph-Background/pulls/45"},"html":{"href":"https://github.com/jckimble/Github-Graph-Background/pull/45"},"issue":{"href":"https://api.github.com/repos/jckimble/Github-Graph-Background/issues/45"},"comments":{"href":"https://api.github.com/repos/jckimble/Github-Graph-Background/issues/45/comments"},"review_comments":{"href":"https://api.github.com/repos/jckimble/Github-Graph-Background/pulls/45/comments"},"review_comment":{"href":"https://api.github.com/repos/jckimble/Github-Graph-Background/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jckimble/Github-Graph-Background/pulls/45/commits"},"statuses":{"href":"https://api.github.com/repos/jckimble/Github-Graph-Background/statuses/6666459e54f4da75d0b24dcb82683a400b37c99b"}},"author_association":"CONTRIBUTOR","auto_merge":null,"active_lock_reason":null,"merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"github-actions[bot]","id":41898282,"node_id":"MDM6Qm90NDE4OTgyODI=","avatar_url":"https://avatars.githubusercontent.com/in/15368?v=4","gravatar_id":"","url":"https://api.github.com/users/github-actions%5Bbot%5D","html_url":"https://github.com/apps/github-actions","followers_url":"https://api.github.com/users/github-actions%5Bbot%5D/followers","following_url":"https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github-actions%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/github-actions%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/github-actions%5Bbot%5D/repos","events_url":"https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/github-actions%5Bbot%5D/received_events","type":"Bot","site_admin":false},"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":6,"deletions":6,"changed_files":1}},"public":true,"created_at":"2024-01-01T15:00:01Z"}
+{"id":"34502641532","type":"PushEvent","actor":{"id":49145129,"login":"leegical","display_login":"leegical","gravatar_id":"","url":"https://api.github.com/users/leegical","avatar_url":"https://avatars.githubusercontent.com/u/49145129?"},"repo":{"id":517406091,"name":"leegical/Blog_img","url":"https://api.github.com/repos/leegical/Blog_img"},"payload":{"repository_id":517406091,"push_id":16466254427,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"df240698de35f507968050bcf57e3adc4150f4ff","before":"9de5b684596d040b14d5b1bfdb705e5c30d914fe","commits":[{"sha":"df240698de35f507968050bcf57e3adc4150f4ff","author":{"email":"49145129+leegical@users.noreply.github.com","name":"leegical"},"message":"Upload by PicGo","distinct":true,"url":"https://api.github.com/repos/leegical/Blog_img/commits/df240698de35f507968050bcf57e3adc4150f4ff"}]},"public":true,"created_at":"2024-01-01T15:00:01Z"}
+{"id":"34502641535","type":"CreateEvent","actor":{"id":119068515,"login":"mohil298","display_login":"mohil298","gravatar_id":"","url":"https://api.github.com/users/mohil298","avatar_url":"https://avatars.githubusercontent.com/u/119068515?"},"repo":{"id":737802475,"name":"mohil298/PCB-Designing","url":"https://api.github.com/repos/mohil298/PCB-Designing"},"payload":{"ref":null,"ref_type":"repository","master_branch":"main","description":"Created a PCB USDCARDtoSDcard using KICAD Software","pusher_type":"user"},"public":true,"created_at":"2024-01-01T15:00:01Z"}
+{"id":"34502641538","type":"PullRequestReviewEvent","actor":{"id":8293321,"login":"ehsandeep","display_login":"ehsandeep","gravatar_id":"","url":"https://api.github.com/users/ehsandeep","avatar_url":"https://avatars.githubusercontent.com/u/8293321?"},"repo":{"id":127519518,"name":"projectdiscovery/subfinder","url":"https://api.github.com/repos/projectdiscovery/subfinder"},"payload":{"action":"created","review":{"id":1799820657,"node_id":"PRR_kwDOB5nLHs5rRxVx","user":{"login":"ehsandeep","id":8293321,"node_id":"MDQ6VXNlcjgyOTMzMjE=","avatar_url":"https://avatars.githubusercontent.com/u/8293321?v=4","gravatar_id":"","url":"https://api.github.com/users/ehsandeep","html_url":"https://github.com/ehsandeep","followers_url":"https://api.github.com/users/ehsandeep/followers","following_url":"https://api.github.com/users/ehsandeep/following{/other_user}","gists_url":"https://api.github.com/users/ehsandeep/gists{/gist_id}","starred_url":"https://api.github.com/users/ehsandeep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ehsandeep/subscriptions","organizations_url":"https://api.github.com/users/ehsandeep/orgs","repos_url":"https://api.github.com/users/ehsandeep/repos","events_url":"https://api.github.com/users/ehsandeep/events{/privacy}","received_events_url":"https://api.github.com/users/ehsandeep/received_events","type":"User","site_admin":false},"body":"@dependabot merge","commit_id":"398ba867465b270c1f3fae994684a493546198df","submitted_at":"2024-01-01T14:59:39Z","state":"approved","html_url":"https://github.com/projectdiscovery/subfinder/pull/1102#pullrequestreview-1799820657","pull_request_url":"https://api.github.com/repos/projectdiscovery/subfinder/pulls/1102","author_association":"MEMBER","_links":{"html":{"href":"https://github.com/projectdiscovery/subfinder/pull/1102#pullrequestreview-1799820657"},"pull_request":{"href":"https://api.github.com/repos/projectdiscovery/subfinder/pulls/1102"}}},"pull_request":{"url":"https://api.github.com/repos/projectdiscovery/subfinder/pulls/1102","id":1661121201,"node_id":"PR_kwDOB5nLHs5jArKx","html_url":"https://github.com/projectdiscovery/subfinder/pull/1102","diff_url":"https://github.com/projectdiscovery/subfinder/pull/1102.diff","patch_url":"https://github.com/projectdiscovery/subfinder/pull/1102.patch","issue_url":"https://api.github.com/repos/projectdiscovery/subfinder/issues/1102","number":1102,"state":"open","locked":false,"title":"chore(deps): bump github.com/projectdiscovery/goflags from 0.1.32 to 0.1.33 in /v2","user":{"login":"dependabot[bot]","id":49699333,"node_id":"MDM6Qm90NDk2OTkzMzM=","avatar_url":"https://avatars.githubusercontent.com/in/29110?v=4","gravatar_id":"","url":"https://api.github.com/users/dependabot%5Bbot%5D","html_url":"https://github.com/apps/dependabot","followers_url":"https://api.github.com/users/dependabot%5Bbot%5D/followers","following_url":"https://api.github.com/users/dependabot%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/dependabot%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/dependabot%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dependabot%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/dependabot%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/dependabot%5Bbot%5D/repos","events_url":"https://api.github.com/users/dependabot%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/dependabot%5Bbot%5D/received_events","type":"Bot","site_admin":false},"body":"Bumps [github.com/projectdiscovery/goflags](https://github.com/projectdiscovery/goflags) from 0.1.32 to 0.1.33.\n<details>\n<summary>Release notes</summary>\n<p><em>Sourced from <a href=\"https://github.com/projectdiscovery/goflags/releases\">github.com/projectdiscovery/goflags's releases</a>.</em></p>\n<blockquote>\n<h2>Release v0.1.33</h2>\n<h3><a href=\"https://github.com/projectdiscovery/goflags/compare/v0.1.32...v0.1.33\">0.1.33</a> (2023-12-31)</h3>\n</blockquote>\n</details>\n<details>\n<summary>Commits</summary>\n<ul>\n<li><a href=\"https://github.com/projectdiscovery/goflags/commit/7a49db7774c3e54ff8e9822280c0c82a0774cfa4\"><code>7a49db7</code></a> Merge pull request <a href=\"https://redirect.github.com/projectdiscovery/goflags/issues/162\">#162</a> from projectdiscovery/dependabot/go_modules/main/gith...</li>\n<li><a href=\"https://github.com/projectdiscovery/goflags/commit/161bec6c2c19f203881ec54265484a16a02743b6\"><code>161bec6</code></a> chore(deps): bump github.com/projectdiscovery/utils</li>\n<li>See full diff in <a href=\"https://github.com/projectdiscovery/goflags/compare/v0.1.32...v0.1.33\">compare view</a></li>\n</ul>\n</details>\n<br />\n\n\n[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/projectdiscovery/goflags&package-manager=go_modules&previous-version=0.1.32&new-version=0.1.33)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)\n\nDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.\n\n[//]: # (dependabot-automerge-start)\nDependabot will merge this PR once it's up-to-date and CI passes on it, as requested by @ehsandeep.\n\n[//]: # (dependabot-automerge-end)\n\n---\n\n<details>\n<summary>Dependabot commands and options</summary>\n<br />\n\nYou can trigger Dependabot actions by commenting on this PR:\n- `@dependabot rebase` will rebase this PR\n- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it\n- `@dependabot merge` will merge this PR after your CI passes on it\n- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it\n- `@dependabot cancel merge` will cancel a previously requested merge and block automerging\n- `@dependabot reopen` will reopen this PR if it is closed\n- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually\n- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency\n- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)\n- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)\n- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)\n\n\n</details>","created_at":"2024-01-01T14:54:06Z","updated_at":"2024-01-01T14:59:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9a59d3a0bb0f9ef4dab62b10da46a77dcd46b2ff","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":2196499556,"node_id":"MDU6TGFiZWwyMTk2NDk5NTU2","url":"https://api.github.com/repos/projectdiscovery/subfinder/labels/Type:%20Maintenance","name":"Type: Maintenance","color":"fbca03","default":false,"description":"Updating phrasing or wording to make things clearer or removing ambiguity."}],"milestone":null,"draft":false,"commits_url":"https://api.github.com/repos/projectdiscovery/subfinder/pulls/1102/commits","review_comments_url":"https://api.github.com/repos/projectdiscovery/subfinder/pulls/1102/comments","review_comment_url":"https://api.github.com/repos/projectdiscovery/subfinder/pulls/comments{/number}","comments_url":"https://api.github.com/repos/projectdiscovery/subfinder/issues/1102/comments","statuses_url":"https://api.github.com/repos/projectdiscovery/subfinder/statuses/398ba867465b270c1f3fae994684a493546198df","head":{"label":"projectdiscovery:dependabot/go_modules/v2/dev/github.com/projectdiscovery/goflags-0.1.33","ref":"dependabot/go_modules/v2/dev/github.com/projectdiscovery/goflags-0.1.33","sha":"398ba867465b270c1f3fae994684a493546198df","user":{"login":"projectdiscovery","id":50994705,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUwOTk0NzA1","avatar_url":"https://avatars.githubusercontent.com/u/50994705?v=4","gravatar_id":"","url":"https://api.github.com/users/projectdiscovery","html_url":"https://github.com/projectdiscovery","followers_url":"https://api.github.com/users/projectdiscovery/followers","following_url":"https://api.github.com/users/projectdiscovery/following{/other_user}","gists_url":"https://api.github.com/users/projectdiscovery/gists{/gist_id}","starred_url":"https://api.github.com/users/projectdiscovery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projectdiscovery/subscriptions","organizations_url":"https://api.github.com/users/projectdiscovery/orgs","repos_url":"https://api.github.com/users/projectdiscovery/repos","events_url":"https://api.github.com/users/projectdiscovery/events{/privacy}","received_events_url":"https://api.github.com/users/projectdiscovery/received_events","type":"Organization","site_admin":false},"repo":{"id":127519518,"node_id":"MDEwOlJlcG9zaXRvcnkxMjc1MTk1MTg=","name":"subfinder","full_name":"projectdiscovery/subfinder","private":false,"owner":{"login":"projectdiscovery","id":50994705,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUwOTk0NzA1","avatar_url":"https://avatars.githubusercontent.com/u/50994705?v=4","gravatar_id":"","url":"https://api.github.com/users/projectdiscovery","html_url":"https://github.com/projectdiscovery","followers_url":"https://api.github.com/users/projectdiscovery/followers","following_url":"https://api.github.com/users/projectdiscovery/following{/other_user}","gists_url":"https://api.github.com/users/projectdiscovery/gists{/gist_id}","starred_url":"https://api.github.com/users/projectdiscovery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projectdiscovery/subscriptions","organizations_url":"https://api.github.com/users/projectdiscovery/orgs","repos_url":"https://api.github.com/users/projectdiscovery/repos","events_url":"https://api.github.com/users/projectdiscovery/events{/privacy}","received_events_url":"https://api.github.com/users/projectdiscovery/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/projectdiscovery/subfinder","description":"Fast passive subdomain enumeration tool.","fork":false,"url":"https://api.github.com/repos/projectdiscovery/subfinder","forks_url":"https://api.github.com/repos/projectdiscovery/subfinder/forks","keys_url":"https://api.github.com/repos/projectdiscovery/subfinder/keys{/key_id}","collaborators_url":"https://api.github.com/repos/projectdiscovery/subfinder/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/projectdiscovery/subfinder/teams","hooks_url":"https://api.github.com/repos/projectdiscovery/subfinder/hooks","issue_events_url":"https://api.github.com/repos/projectdiscovery/subfinder/issues/events{/number}","events_url":"https://api.github.com/repos/projectdiscovery/subfinder/events","assignees_url":"https://api.github.com/repos/projectdiscovery/subfinder/assignees{/user}","branches_url":"https://api.github.com/repos/projectdiscovery/subfinder/branches{/branch}","tags_url":"https://api.github.com/repos/projectdiscovery/subfinder/tags","blobs_url":"https://api.github.com/repos/projectdiscovery/subfinder/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/projectdiscovery/subfinder/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/projectdiscovery/subfinder/git/refs{/sha}","trees_url":"https://api.github.com/repos/projectdiscovery/subfinder/git/trees{/sha}","statuses_url":"https://api.github.com/repos/projectdiscovery/subfinder/statuses/{sha}","languages_url":"https://api.github.com/repos/projectdiscovery/subfinder/languages","stargazers_url":"https://api.github.com/repos/projectdiscovery/subfinder/stargazers","contributors_url":"https://api.github.com/repos/projectdiscovery/subfinder/contributors","subscribers_url":"https://api.github.com/repos/projectdiscovery/subfinder/subscribers","subscription_url":"https://api.github.com/repos/projectdiscovery/subfinder/subscription","commits_url":"https://api.github.com/repos/projectdiscovery/subfinder/commits{/sha}","git_commits_url":"https://api.github.com/repos/projectdiscovery/subfinder/git/commits{/sha}","comments_url":"https://api.github.com/repos/projectdiscovery/subfinder/comments{/number}","issue_comment_url":"https://api.github.com/repos/projectdiscovery/subfinder/issues/comments{/number}","contents_url":"https://api.github.com/repos/projectdiscovery/subfinder/contents/{+path}","compare_url":"https://api.github.com/repos/projectdiscovery/subfinder/compare/{base}...{head}","merges_url":"https://api.github.com/repos/projectdiscovery/subfinder/merges","archive_url":"https://api.github.com/repos/projectdiscovery/subfinder/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/projectdiscovery/subfinder/downloads","issues_url":"https://api.github.com/repos/projectdiscovery/subfinder/issues{/number}","pulls_url":"https://api.github.com/repos/projectdiscovery/subfinder/pulls{/number}","milestones_url":"https://api.github.com/repos/projectdiscovery/subfinder/milestones{/number}","notifications_url":"https://api.github.com/repos/projectdiscovery/subfinder/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/projectdiscovery/subfinder/labels{/name}","releases_url":"https://api.github.com/repos/projectdiscovery/subfinder/releases{/id}","deployments_url":"https://api.github.com/repos/projectdiscovery/subfinder/deployments","created_at":"2018-03-31T09:44:57Z","updated_at":"2024-01-01T13:13:22Z","pushed_at":"2024-01-01T14:59:24Z","git_url":"git://github.com/projectdiscovery/subfinder.git","ssh_url":"git@github.com:projectdiscovery/subfinder.git","clone_url":"https://github.com/projectdiscovery/subfinder.git","svn_url":"https://github.com/projectdiscovery/subfinder","homepage":"https://projectdiscovery.io","size":9319,"stargazers_count":8699,"watchers_count":8699,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"has_discussions":true,"forks_count":1161,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":22,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"allow_forking":true,"is_template":false,"web_commit_signoff_required":false,"topics":["bugbounty","hacking","osint","reconnaissance","subdomain-enumeration","subdomains"],"visibility":"public","forks":1161,"open_issues":22,"watchers":8699,"default_branch":"dev"}},"base":{"label":"projectdiscovery:dev","ref":"dev","sha":"ba55928386e6795d3a941db11115ecb37fa7f704","user":{"login":"projectdiscovery","id":50994705,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUwOTk0NzA1","avatar_url":"https://avatars.githubusercontent.com/u/50994705?v=4","gravatar_id":"","url":"https://api.github.com/users/projectdiscovery","html_url":"https://github.com/projectdiscovery","followers_url":"https://api.github.com/users/projectdiscovery/followers","following_url":"https://api.github.com/users/projectdiscovery/following{/other_user}","gists_url":"https://api.github.com/users/projectdiscovery/gists{/gist_id}","starred_url":"https://api.github.com/users/projectdiscovery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projectdiscovery/subscriptions","organizations_url":"https://api.github.com/users/projectdiscovery/orgs","repos_url":"https://api.github.com/users/projectdiscovery/repos","events_url":"https://api.github.com/users/projectdiscovery/events{/privacy}","received_events_url":"https://api.github.com/users/projectdiscovery/received_events","type":"Organization","site_admin":false},"repo":{"id":127519518,"node_id":"MDEwOlJlcG9zaXRvcnkxMjc1MTk1MTg=","name":"subfinder","full_name":"projectdiscovery/subfinder","private":false,"owner":{"login":"projectdiscovery","id":50994705,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUwOTk0NzA1","avatar_url":"https://avatars.githubusercontent.com/u/50994705?v=4","gravatar_id":"","url":"https://api.github.com/users/projectdiscovery","html_url":"https://github.com/projectdiscovery","followers_url":"https://api.github.com/users/projectdiscovery/followers","following_url":"https://api.github.com/users/projectdiscovery/following{/other_user}","gists_url":"https://api.github.com/users/projectdiscovery/gists{/gist_id}","starred_url":"https://api.github.com/users/projectdiscovery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projectdiscovery/subscriptions","organizations_url":"https://api.github.com/users/projectdiscovery/orgs","repos_url":"https://api.github.com/users/projectdiscovery/repos","events_url":"https://api.github.com/users/projectdiscovery/events{/privacy}","received_events_url":"https://api.github.com/users/projectdiscovery/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/projectdiscovery/subfinder","description":"Fast passive subdomain enumeration tool.","fork":false,"url":"https://api.github.com/repos/projectdiscovery/subfinder","forks_url":"https://api.github.com/repos/projectdiscovery/subfinder/forks","keys_url":"https://api.github.com/repos/projectdiscovery/subfinder/keys{/key_id}","collaborators_url":"https://api.github.com/repos/projectdiscovery/subfinder/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/projectdiscovery/subfinder/teams","hooks_url":"https://api.github.com/repos/projectdiscovery/subfinder/hooks","issue_events_url":"https://api.github.com/repos/projectdiscovery/subfinder/issues/events{/number}","events_url":"https://api.github.com/repos/projectdiscovery/subfinder/events","assignees_url":"https://api.github.com/repos/projectdiscovery/subfinder/assignees{/user}","branches_url":"https://api.github.com/repos/projectdiscovery/subfinder/branches{/branch}","tags_url":"https://api.github.com/repos/projectdiscovery/subfinder/tags","blobs_url":"https://api.github.com/repos/projectdiscovery/subfinder/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/projectdiscovery/subfinder/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/projectdiscovery/subfinder/git/refs{/sha}","trees_url":"https://api.github.com/repos/projectdiscovery/subfinder/git/trees{/sha}","statuses_url":"https://api.github.com/repos/projectdiscovery/subfinder/statuses/{sha}","languages_url":"https://api.github.com/repos/projectdiscovery/subfinder/languages","stargazers_url":"https://api.github.com/repos/projectdiscovery/subfinder/stargazers","contributors_url":"https://api.github.com/repos/projectdiscovery/subfinder/contributors","subscribers_url":"https://api.github.com/repos/projectdiscovery/subfinder/subscribers","subscription_url":"https://api.github.com/repos/projectdiscovery/subfinder/subscription","commits_url":"https://api.github.com/repos/projectdiscovery/subfinder/commits{/sha}","git_commits_url":"https://api.github.com/repos/projectdiscovery/subfinder/git/commits{/sha}","comments_url":"https://api.github.com/repos/projectdiscovery/subfinder/comments{/number}","issue_comment_url":"https://api.github.com/repos/projectdiscovery/subfinder/issues/comments{/number}","contents_url":"https://api.github.com/repos/projectdiscovery/subfinder/contents/{+path}","compare_url":"https://api.github.com/repos/projectdiscovery/subfinder/compare/{base}...{head}","merges_url":"https://api.github.com/repos/projectdiscovery/subfinder/merges","archive_url":"https://api.github.com/repos/projectdiscovery/subfinder/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/projectdiscovery/subfinder/downloads","issues_url":"https://api.github.com/repos/projectdiscovery/subfinder/issues{/number}","pulls_url":"https://api.github.com/repos/projectdiscovery/subfinder/pulls{/number}","milestones_url":"https://api.github.com/repos/projectdiscovery/subfinder/milestones{/number}","notifications_url":"https://api.github.com/repos/projectdiscovery/subfinder/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/projectdiscovery/subfinder/labels{/name}","releases_url":"https://api.github.com/repos/projectdiscovery/subfinder/releases{/id}","deployments_url":"https://api.github.com/repos/projectdiscovery/subfinder/deployments","created_at":"2018-03-31T09:44:57Z","updated_at":"2024-01-01T13:13:22Z","pushed_at":"2024-01-01T14:59:24Z","git_url":"git://github.com/projectdiscovery/subfinder.git","ssh_url":"git@github.com:projectdiscovery/subfinder.git","clone_url":"https://github.com/projectdiscovery/subfinder.git","svn_url":"https://github.com/projectdiscovery/subfinder","homepage":"https://projectdiscovery.io","size":9319,"stargazers_count":8699,"watchers_count":8699,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"has_discussions":true,"forks_count":1161,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":22,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"allow_forking":true,"is_template":false,"web_commit_signoff_required":false,"topics":["bugbounty","hacking","osint","reconnaissance","subdomain-enumeration","subdomains"],"visibility":"public","forks":1161,"open_issues":22,"watchers":8699,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/projectdiscovery/subfinder/pulls/1102"},"html":{"href":"https://github.com/projectdiscovery/subfinder/pull/1102"},"issue":{"href":"https://api.github.com/repos/projectdiscovery/subfinder/issues/1102"},"comments":{"href":"https://api.github.com/repos/projectdiscovery/subfinder/issues/1102/comments"},"review_comments":{"href":"https://api.github.com/repos/projectdiscovery/subfinder/pulls/1102/comments"},"review_comment":{"href":"https://api.github.com/repos/projectdiscovery/subfinder/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/projectdiscovery/subfinder/pulls/1102/commits"},"statuses":{"href":"https://api.github.com/repos/projectdiscovery/subfinder/statuses/398ba867465b270c1f3fae994684a493546198df"}},"author_association":"CONTRIBUTOR","auto_merge":null,"active_lock_reason":null}},"public":true,"created_at":"2024-01-01T15:00:01Z","org":{"id":50994705,"login":"projectdiscovery","gravatar_id":"","url":"https://api.github.com/orgs/projectdiscovery","avatar_url":"https://avatars.githubusercontent.com/u/50994705?"}}
diff --git a/test/invalid-books.xml b/test/invalid-books.xml
new file mode 100644
index 0000000..66211d6
--- /dev/null
+++ b/test/invalid-books.xml
@@ -0,0 +1,132 @@
+<?xml version="1.0"?>
+<catalog>
+ <book id="bk101">
+ <author>Gambardella, Matthew</author>
+ <title>XML Developer's Guide</title>
+ <genre>Computer</genre>
+ <price>44.95</price>
+ <publish_date>2000-10-01</publish_date>
+ <description>An in-depth look at creating applications
+ with XML.
+ </description>
+ </book>
+ <book id="bk102">
+ <author>Ralls, Kim</author>
+ <title>Midnight Rain</title>
+ <genre>Fantasy</genre>
+ <price>5.95</price>
+ <publish_date>2000-12-16</publish_date>
+ <description>A former architect battles corporate zombies,
+ an evil sorceress, and her own childhood to become queen
+ of the world.
+ </description>
+ </book>
+ <book id="bk103" abc=">
+ <author>Corets, Eva</author>
+ <title>Maeve Ascendant</title>
+ <genre>Fantasy</genre>
+ <price>5.95</price>
+ <publish_date>2000-11-17</publish_date>
+ <description>After the collapse of a nanotechnology
+ society in England, the young survivors lay the
+ foundation for a new society.
+ </description>
+ </book>
+ <book id=" bk104">
+ <author>Corets, Eva</author>
+ <title>Oberon's Legacy</title>
+ <genre>Fantasy</genre>
+ <price>5.95</price>
+ <publish_date>2001-03-10</publish_date>
+ <description>In post-apocalypse England, the mysterious
+ agent known only as Oberon helps to create a new life
+ for the inhabitants of London. Sequel to Maeve
+ Ascendant.
+ </description>
+ </book>
+ <book id="bk105">
+ <author>Corets, Eva</author>
+ <title>The Sundered Grail</title>
+ <genre>Fantasy</genre>
+ <price>5.95</price>
+ <publish_date>2001-09-10</publish_date>
+ <description>The two daughters of Maeve, half-sisters,
+ battle one another for control of England. Sequel to
+ Oberon's Legacy.
+ </description>
+ </book>
+ <book id="bk106">
+ <author>Randall, Cynthia</author>
+ <title>Lover Birds</title>
+ <genre>Romance</genre>
+ <price>4.95</price>
+ <publish_date>2000-09-02</publish_date>
+ <description>When Carla meets Paul at an ornithology
+ conference, tempers fly as feathers get ruffled.
+ </description>
+ </book>
+ <book id="bk107">
+ <author>Thurman, Paula</author>
+ <title>Splish Splash</title>
+ <genre>Romance</genre>
+ <price>4.95</price>
+ <publish_date>2000-11-02</publish_date>
+ <description>A deep sea diver finds true love twenty
+ thousand leagues beneath the sea.
+ </description>
+ </book>
+ <book id="bk108">
+ <author>Knorr, Stefan</author>
+ <title>Creepy Crawlies</title>
+ <genre>Horror</genre>
+ <price>4.95</price>
+ <publish_date>2000-12-06</publish_date>
+ <description>An anthology of horror stories about roaches,
+ centipedes, scorpions and other insects.
+ </description>
+ </book>
+ <book id="bk109">
+ <author>Kress, Peter</author>
+ <title>Paradox Lost</title>
+ <genre>Science Fiction</genre>
+ <price>6.95</price>
+ <publish_date>2000-11-02</publish_date>
+ <description>After an inadvertant trip through a Heisenberg
+ Uncertainty Device, James Salway discovers the problems
+ of being quantum.
+ </description>
+ </book>
+ <book id="bk110">
+ <author>O'Brien, Tim</author>
+ <title>Microsoft .NET: The Programming Bible</title>
+ <genre>Computer</genre>
+ <price>36.95</price>
+ <publish_date>2000-12-09</publish_date>
+ <description>Microsoft's .NET initiative is explored in
+ detail in this deep programmer's reference.
+ </description>
+ </book>
+ <book id="bk111">
+ <author>O'Brien, Tim</author>
+ <title>MSXML3: A Comprehensive Guide</title>
+ <genre>Computer</genre>
+ <price>36.95</price>
+ <publish_date>2000-12-01</publish_date>
+ <description>The Microsoft MSXML3 parser is covered in
+ detail, with attention to XML DOM interfaces, XSLT processing,
+ SAX and more.
+ </description>
+ </book>
+ <book id="bk112">
+ <author>Galos, Mike</author>
+ <title>Visual Studio 7: A Comprehensive Guide</title>
+ <genre>Computer</genre>
+ <price>49.95</price>
+ <publish_date>2001-04-16</publish_date>
+ <description>Microsoft Visual Studio 7 is explored in depth,
+ looking at how Visual Basic, Visual C++, C#, and ASP+ are
+ integrated into a comprehensive development
+ environment.
+ </description>
+ </book>
+</catalog>
diff --git a/test/listview_output_cursor.4 b/test/listview_output_cursor.4
index 3980a0b..3f9e3df 100644
--- a/test/listview_output_cursor.4
+++ b/test/listview_output_cursor.4
@@ -6,15 +6,15 @@ S -1 ┋
A └ normal
CSI Reset Replace mode
CSI Erase all
-S 1 ┋Hello x┋
+S 1 ┋World! x┋
A └┛ alt
-S 2 ┋World! x┋
+S 2 ┋2 x┋
A └┛ alt
-S 3 ┋2 x┋
+S 3 ┋+3 x┋
A └┛ alt
-S 4 ┋+3 x┋
+S 4 ┋4 x┋
A └┛ alt
-S 5 ┋4 x┋
+S 5 ┋5 x┋
A └┛ alt
CSI Erase all
CSI Use normal screen buffer
diff --git a/test/listview_output_cursor.5 b/test/listview_output_cursor.5
index c7d432e..f25061e 100644
--- a/test/listview_output_cursor.5
+++ b/test/listview_output_cursor.5
@@ -6,25 +6,25 @@ S -1 ┋
A └ normal
CSI Reset Replace mode
CSI Erase all
-S 1 ┋17 x┋
+S 1 ┋+18 x┋
A └┛ alt
-S 2 ┋+18 x┋
+S 2 ┋19 x┋
A └┛ alt
-S 3 ┋19 x┋
+S 3 ┋20 x┋
A └┛ alt
-S 4 ┋20 x┋
+S 4 ┋21 x┋
A └┛ alt
-S 5 ┋21 x┋
+S 5 ┋22 x┋
A └┛ alt
-S 6 ┋22 x┋
+S 6 ┋23 x┋
A └┛ alt
-S 7 ┋23 x┋
+S 7 ┋24 x┋
A └┛ alt
-S 8 ┋24 x┋
+S 8 ┋25 x┋
A └┛ alt
-S 9 ┋25 x┋
+S 9 ┋26 x┋
A └┛ alt
-S 10 ┋26 x┋
+S 10 ┋27 x┋
A └┛ alt
CSI Erase all
CSI Use normal screen buffer
diff --git a/test/listview_output_cursor.6 b/test/listview_output_cursor.6
index be86ee1..ec80b89 100644
--- a/test/listview_output_cursor.6
+++ b/test/listview_output_cursor.6
@@ -6,25 +6,25 @@ S -1 ┋
A └ normal
CSI Reset Replace mode
CSI Erase all
-S 1 ┋8 x┋
+S 1 ┋9 x┋
A └┛ alt
-S 2 ┋+9 x┋
+S 2 ┋10 x┋
A └┛ alt
-S 3 ┋10 x┋
+S 3 ┋11 x┋
A └┛ alt
-S 4 ┋11 x┋
+S 4 ┋12 x┋
A └┛ alt
-S 5 ┋12 x┋
+S 5 ┋13 x┋
A └┛ alt
-S 6 ┋13 x┋
+S 6 ┋14 x┋
A └┛ alt
-S 7 ┋14 x┋
+S 7 ┋15 x┋
A └┛ alt
-S 8 ┋15 x┋
+S 8 ┋16 x┋
A └┛ alt
-S 9 ┋16 x┋
+S 9 ┋17 x┋
A └┛ alt
-S 10 ┋17 x┋
+S 10 ┋+18 x┋
A └┛ alt
CSI Erase all
CSI Use normal screen buffer
diff --git a/test/lnav_doctests.cc b/test/lnav_doctests.cc
index 423f807..78acf8d 100644
--- a/test/lnav_doctests.cc
+++ b/test/lnav_doctests.cc
@@ -30,12 +30,15 @@
#include "config.h"
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
+#include "base/from_trait.hh"
#include "byte_array.hh"
#include "data_scanner.hh"
#include "doctest/doctest.h"
#include "lnav_config.hh"
#include "lnav_util.hh"
+#include "ptimec.hh"
#include "relative_time.hh"
+#include "shlex.hh"
#include "unique_path.hh"
using namespace std;
@@ -60,6 +63,66 @@ TEST_CASE("overwritten-logfile") {
}
#endif
+TEST_CASE("shlex::eval")
+{
+ std::string cmdline1 = "${semantic_highlight_color}";
+
+ shlex lexer(cmdline1);
+
+ std::map<std::string, scoped_value_t> vars = {
+ {"semantic_highlight_color", "foo"},
+ };
+
+ std::string out;
+ auto rc = lexer.eval(out, scoped_resolver{&vars});
+ CHECK(rc);
+ CHECK(out == "foo");
+}
+
+TEST_CASE("shlex::split")
+{
+ {
+ std::string cmdline1 = "";
+
+ std::map<std::string, scoped_value_t> vars;
+ shlex lexer(cmdline1);
+ auto split_res = lexer.split(scoped_resolver{&vars});
+ CHECK(split_res.isOk());
+ auto args = split_res.unwrap();
+ CHECK(args.empty());
+ }
+ {
+ std::string cmdline1 = ":sh --name=\"foo $BAR\" echo Hello!";
+
+ std::map<std::string, scoped_value_t> vars;
+ shlex lexer(cmdline1);
+ auto split_res = lexer.split(scoped_resolver{&vars});
+ CHECK(split_res.isOk());
+ auto args = split_res.unwrap();
+ for (const auto& se : args) {
+ printf(" range %d:%d -- %s\n",
+ se.se_origin.sf_begin,
+ se.se_origin.sf_end,
+ se.se_value.c_str());
+ }
+ }
+ {
+ std::string cmdline1 = "abc def $FOO ghi";
+
+ std::map<std::string, scoped_value_t> vars;
+ shlex lexer(cmdline1);
+ auto split_res = lexer.split(scoped_resolver{&vars});
+ CHECK(split_res.isOk());
+ auto args = split_res.unwrap();
+ for (const auto& se : args) {
+ printf(" range %d:%d -- %s\n",
+ se.se_origin.sf_begin,
+ se.se_origin.sf_end,
+ se.se_value.c_str());
+ }
+ }
+}
+
TEST_CASE("byte_array")
{
using my_array_t = byte_array<8>;
@@ -102,8 +165,8 @@ TEST_CASE("ptime_fmt")
TEST_CASE("rgb_color from string")
{
- string name = "SkyBlue1";
- auto color = rgb_color::from_str(name).unwrap();
+ const auto name = string_fragment::from_const("SkyBlue1");
+ auto color = from<rgb_color>(name).unwrap();
CHECK(color.rc_r == 135);
CHECK(color.rc_g == 215);
CHECK(color.rc_b == 255);
@@ -223,7 +286,7 @@ TEST_CASE("data_scanner CSI")
CHECK(tok_res->tr_token == DT_CSI);
CHECK(tok_res->to_string() == "\x1b[32m");
tok_res = ds.tokenize2();
- CHECK(tok_res->tr_token == DT_SYMBOL);
+ CHECK(tok_res->tr_token == DT_WORD);
CHECK(tok_res->to_string() == "Hello");
tok_res = ds.tokenize2();
CHECK(tok_res->tr_token == DT_CSI);
diff --git a/test/log-samples/sample-057d6c669632ef9d07b6adec605f6bdeae19af27.txt b/test/log-samples/sample-057d6c669632ef9d07b6adec605f6bdeae19af27.txt
index c1d9b88..cee08b0 100644
--- a/test/log-samples/sample-057d6c669632ef9d07b6adec605f6bdeae19af27.txt
+++ b/test/log-samples/sample-057d6c669632ef9d07b6adec605f6bdeae19af27.txt
@@ -1,13 +1,11 @@
2013-02-11 06:42:34,310:INFO:com.twisted:Site starting on 8099
- key 29:29 ^
- key 29:40 ^---------^ com.twisted
-pair 29:40 ^---------^ com.twisted
- key 58:58 ^
+word 55:57 ^^ on
+ key 55:57 ^^ on
num 58:62 ^--^ 8099
-pair 58:62 ^--^ 8099
+ val 58:62 ^--^ 8099
+pair 55:62 ^-----^ on 8099
msg ::com.twisted:Site starting on 8099
-format ::#:Site starting on #
+format ::com.twisted:Site starting on #
{
- "col_0": "com.twisted",
- "col_1": 8099
+ "on": 8099
}
diff --git a/test/log-samples/sample-06aaa6f48a801f592558575d886864d6c3ab9ed4.txt b/test/log-samples/sample-06aaa6f48a801f592558575d886864d6c3ab9ed4.txt
index aafb46d..4489627 100644
--- a/test/log-samples/sample-06aaa6f48a801f592558575d886864d6c3ab9ed4.txt
+++ b/test/log-samples/sample-06aaa6f48a801f592558575d886864d6c3ab9ed4.txt
@@ -1,40 +1,40 @@
- Apr 11 16:43:25 localhost smartd[2532]: Device: /dev/sda [SAT], VBOX HARDDISK, S/N:VBc8882b62-a0263a39, FW:1.0, 17.1 GB
- key 40:46 ^----^ Device
-path 48:56 ^------^ /dev/sda
-wspc 56:57 ^
- sym 58:61 ^-^ SAT
- val 58:61 ^-^ SAT
- grp 58:61 ^-^ SAT
- val 48:61 ^-----------^ /dev/sda [SAT
-pair 40:61 ^-------------------^ Device: /dev/sda [SAT
- key 64:64 ^
- sym 64:68 ^--^ VBOX
-wspc 68:69 ^
- sym 69:77 ^------^ HARDDISK
- val 64:77 ^-----------^ VBOX HARDDISK
-pair 64:77 ^-----------^ VBOX HARDDISK
- key 79:79 ^
- sym 79:82 ^-^ S/N
-coln 82:83 ^ :
- sym 83:102 ^-----------------^ VBc8882b62-a0263a39
- val 79:102 ^---------------------^ S/N:VBc8882b62-a0263a39
-pair 79:102 ^---------------------^ S/N:VBc8882b62-a0263a39
- key 104:106 ^^ FW
- num 107:110 ^-^ 1.0
- val 107:110 ^-^ 1.0
-pair 104:110 ^----^ FW:1.0
- key 112:112 ^
- num 112:116 ^--^ 17.1
-wspc 116:117 ^
- sym 117:119 ^^ GB
- val 112:119 ^-----^ 17.1 GB
-pair 112:119 ^-----^ 17.1 GB
-msg :Device: /dev/sda [SAT], VBOX HARDDISK, S/N:VBc8882b62-a0263a39, FW:1.0, 17.1 GB
-format :Device: #], #, #, FW:#, #
+ Apr 11 16:43:25 localhost smartd[2532]: Device: /dev/sda [SAT], VBOX HARDDISK, S/N:VBc8882b62-a0263a39, FW:1.0, 17.1 GB
+ key 48:48 ^
+path 48:56 ^------^ /dev/sda
+ val 48:56 ^------^ /dev/sda
+pair 48:56 ^------^ /dev/sda
+ key 58:58 ^
+ sym 58:61 ^-^ SAT
+ val 58:61 ^-^ SAT
+ grp 58:61 ^-^ SAT
+ val 58:61 ^-^ SAT
+pair 58:61 ^-^ SAT
+ key 64:68 ^--^ VBOX
+ sym 69:77 ^------^ HARDDISK
+ val 69:77 ^------^ HARDDISK
+pair 64:77 ^-----------^ VBOX HARDDISK
+ key 79:82 ^-^ S/N
+ id 83:102 ^-----------------^ VBc8882b62-a0263a39
+ val 83:102 ^-----------------^ VBc8882b62-a0263a39
+pair 79:102 ^---------------------^ S/N:VBc8882b62-a0263a39
+ key 104:106 ^^ FW
+ num 107:110 ^-^ 1.0
+ val 107:110 ^-^ 1.0
+pair 104:110 ^----^ FW:1.0
+ key 112:112 ^
+ num 112:116 ^--^ 17.1
+ sym 117:119 ^^ GB
+ val 112:119 ^-----^ 17.1 GB
+pair 112:119 ^-----^ 17.1 GB
+msg :Device: /dev/sda [SAT], VBOX HARDDISK, S/N:VBc8882b62-a0263a39, FW:1.0, 17.1 GB
+format :Device: # [#], VBOX #, S/N:#, FW:#, #
{
- "Device": "/dev/sda [SAT",
- "col_0": "VBOX HARDDISK",
- "col_1": "S/N:VBc8882b62-a0263a39",
+ "col_0": "/dev/sda",
+ "col_1": [
+ "SAT"
+ ],
+ "VBOX": "HARDDISK",
+ "S/N": "VBc8882b62-a0263a39",
"FW": 1.0,
"col_2": "17.1 GB"
}
diff --git a/test/log-samples/sample-0a470b1dae069dda03984e8e67994d8a.txt b/test/log-samples/sample-0a470b1dae069dda03984e8e67994d8a.txt
new file mode 100644
index 0000000..47859da
--- /dev/null
+++ b/test/log-samples/sample-0a470b1dae069dda03984e8e67994d8a.txt
@@ -0,0 +1,26 @@
+ 2024-01-10T05:27:07.860Z info vmware-vum-server[27909] [Originator@6876 sub=JobDispatcher] [JobDispatcher 2258] Removing task 52b9d918-efe7-29a6-6d38-6eee37e76f87 that imposed VMware vSphere Update Manager load:1, new load: 0, task active Load: 0
+word 122:126 ^--^ task
+ key 122:126 ^--^ task
+uuid 127:163 ^----------------------------------^ 52b9d918-efe7-29a6-6d38-6eee37e76f87
+ val 127:163 ^----------------------------------^ 52b9d918-efe7-29a6-6d38-6eee37e76f87
+pair 122:163 ^---------------------------------------^ task 52b9d918-efe7-29a6-6d38-6eee37e76f87
+ key 207:211 ^--^ load
+ num 212:213 ^ 1
+ val 212:213 ^ 1
+pair 207:213 ^----^ load:1
+ key 215:223 ^------^ new load
+ num 225:226 ^ 0
+ val 225:226 ^ 0
+pair 215:226 ^---------^ new load: 0
+ key 228:244 ^--------------^ task active Load
+ num 246:247 ^ 0
+ val 246:247 ^ 0
+pair 228:247 ^-----------------^ task active Load: 0
+msg :Removing task 52b9d918-efe7-29a6-6d38-6eee37e76f87 that imposed VMware vSphere Update Manager load:1, new load: 0, task active Load: 0
+format :Removing task # that imposed VMware vSphere Update Manager load:#, new load: #, task active Load: #
+{
+ "task": "52b9d918-efe7-29a6-6d38-6eee37e76f87",
+ "load": 1,
+ "new load": 0,
+ "task active Load": 0
+}
diff --git a/test/log-samples/sample-0edd747bbc6d5c173423c079b61c27a4.txt b/test/log-samples/sample-0edd747bbc6d5c173423c079b61c27a4.txt
new file mode 100644
index 0000000..f5efd2a
--- /dev/null
+++ b/test/log-samples/sample-0edd747bbc6d5c173423c079b61c27a4.txt
@@ -0,0 +1,13 @@
+ 2024-01-10T14:29:28.998Z info vmware-vum-server[136895] [Originator@6876 sub=VumVapiAuthzFilter opID=4d3bd186-a9bf-40d3-9b88-5570f530048f] [RequireAdminUserAuthz 362] RequireAdminUserAuthz::Invoke Method is com.vmware.esx.settings.clusters.configuration.drafts.apply
+ key 167:167 ^
+ sym 167:196 ^---------------------------^ RequireAdminUserAuthz::Invoke
+pair 167:196 ^---------------------------^ RequireAdminUserAuthz::Invoke
+ key 207:207 ^
+ sym 207:266 ^---------------------------------------------------------^ com.vmware.esx.settings.clusters.configuration.drafts.apply
+pair 207:266 ^---------------------------------------------------------^ com.vmware.esx.settings.clusters.configuration.drafts.apply
+msg :RequireAdminUserAuthz::Invoke Method is com.vmware.esx.settings.clusters.configuration.drafts.apply
+format :# Method is #
+{
+ "col_0": "RequireAdminUserAuthz::Invoke",
+ "col_1": "com.vmware.esx.settings.clusters.configuration.drafts.apply"
+}
diff --git a/test/log-samples/sample-1aeb47c0a97d19bb7418f0172480e05e49c6e53e.txt b/test/log-samples/sample-1aeb47c0a97d19bb7418f0172480e05e49c6e53e.txt
index 289780a..3f52819 100644
--- a/test/log-samples/sample-1aeb47c0a97d19bb7418f0172480e05e49c6e53e.txt
+++ b/test/log-samples/sample-1aeb47c0a97d19bb7418f0172480e05e49c6e53e.txt
@@ -1,17 +1,19 @@
Apr 29 22:32:27 tstack-centos5 dhclient: bound to 10.1.10.62 -- renewal in 55327 seconds
- key 50:50 ^
+word 47:49 ^^ to
+ key 47:49 ^^ to
ipv4 50:60 ^--------^ 10.1.10.62
-pair 50:60 ^--------^ 10.1.10.62
- key 61:61 ^
- sym 61:63 ^^ --
-pair 61:63 ^^ --
- key 75:75 ^
+ val 50:60 ^--------^ 10.1.10.62
+pair 47:60 ^-----------^ to 10.1.10.62
+ key 64:64 ^
+word 64:71 ^-----^ renewal
+word 72:74 ^^ in
num 75:80 ^---^ 55327
-pair 75:80 ^---^ 55327
+word 81:88 ^-----^ seconds
+ val 64:88 ^----------------------^ renewal in 55327 seconds
+pair 64:88 ^----------------------^ renewal in 55327 seconds
msg :bound to 10.1.10.62 -- renewal in 55327 seconds
-format :bound to # # renewal in # seconds
+format :bound to # -- #
{
- "col_0": "10.1.10.62",
- "col_1": "--",
- "col_2": 55327
+ "to": "10.1.10.62",
+ "col_0": "renewal in 55327 seconds"
}
diff --git a/test/log-samples/sample-207655c886794bc55da226bcb86e3c91.txt b/test/log-samples/sample-207655c886794bc55da226bcb86e3c91.txt
new file mode 100644
index 0000000..26e5bbe
--- /dev/null
+++ b/test/log-samples/sample-207655c886794bc55da226bcb86e3c91.txt
@@ -0,0 +1,33 @@
+ Mar 16 08:09:58 app-1 kernel: [ 0.000000] BIOS-e820: 00000000000e8000 - 0000000000100000 (reserved)
+ key 35:35 ^
+ num 35:43 ^------^ 0.000000
+ val 35:43 ^------^ 0.000000
+ grp 35:43 ^------^ 0.000000
+ val 35:43 ^------^ 0.000000
+pair 35:43 ^------^ 0.000000
+ key 46:55 ^-------^ BIOS-e820
+ hex 57:73 ^--------------^ 00000000000e8000
+ val 57:73 ^--------------^ 00000000000e8000
+pair 46:73 ^-------------------------^ BIOS-e820: 00000000000e8000
+ key 76:76 ^
+hexd 76:92 ^--------------^ 0000000000100000
+ val 76:92 ^--------------^ 0000000000100000
+pair 76:92 ^--------------^ 0000000000100000
+ key 94:94 ^
+word 94:102 ^------^ reserved
+ val 94:102 ^------^ reserved
+ grp 94:102 ^------^ reserved
+ val 94:102 ^------^ reserved
+pair 94:102 ^------^ reserved
+msg :[ 0.000000] BIOS-e820: 00000000000e8000 - 0000000000100000 (reserved)
+format :[ #] BIOS-e820: # - # (#)
+{
+ "col_0": [
+ 0.000000
+ ],
+ "BIOS-e820": "00000000000e8000",
+ "col_1": "0000000000100000",
+ "col_2": [
+ "reserved"
+ ]
+}
diff --git a/test/log-samples/sample-27353a72ba4025448f261dcfa6ea16e474187795.txt b/test/log-samples/sample-27353a72ba4025448f261dcfa6ea16e474187795.txt
index 3a7277b..84404d1 100644
--- a/test/log-samples/sample-27353a72ba4025448f261dcfa6ea16e474187795.txt
+++ b/test/log-samples/sample-27353a72ba4025448f261dcfa6ea16e474187795.txt
@@ -1,4 +1,30 @@
Jun 3 07:00:23 Tim-Stacks-iMac.local sudo[2326]: stack : TTY=ttys002 ; PWD=/ ; USER=root ; COMMAND=/bin/ls
-msg :
-format :
-null
+ key 53:53 ^
+word 53:58 ^---^ stack
+ val 53:58 ^---^ stack
+pair 53:58 ^---^ stack
+ key 61:64 ^-^ TTY
+ sym 65:72 ^-----^ ttys002
+ val 65:72 ^-----^ ttys002
+pair 61:72 ^---------^ TTY=ttys002
+ key 75:78 ^-^ PWD
+path 79:80 ^ /
+ val 79:80 ^ /
+pair 75:80 ^---^ PWD=/
+ key 83:87 ^--^ USER
+word 88:92 ^--^ root
+ val 88:92 ^--^ root
+pair 83:92 ^-------^ USER=root
+ key 95:102 ^-----^ COMMAND
+path 103:110 ^-----^ /bin/ls
+ val 103:110 ^-----^ /bin/ls
+pair 95:110 ^-------------^ COMMAND=/bin/ls
+msg :stack : TTY=ttys002 ; PWD=/ ; USER=root ; COMMAND=/bin/ls
+format :# : TTY=# ; PWD=# ; USER=# ; COMMAND=#
+{
+ "col_0": "stack",
+ "TTY": "ttys002",
+ "PWD": "/",
+ "USER": "root",
+ "COMMAND": "/bin/ls"
+}
diff --git a/test/log-samples/sample-3136b918134d37827ee97f35adb130a5.txt b/test/log-samples/sample-3136b918134d37827ee97f35adb130a5.txt
new file mode 100644
index 0000000..6712649
--- /dev/null
+++ b/test/log-samples/sample-3136b918134d37827ee97f35adb130a5.txt
@@ -0,0 +1,43 @@
+ 2024-01-11T10:46:05.874Z info vmware-vum-server[1243065] [Originator@6876 sub=EHP opID=eb9d737f-fa4f-421d-9beb-ce31fb27938f] [host-553] [vSphere HA] [com.vmware.vcIntegrity.lifecycle.health.vc.host_ha_state] returned status: OK
+ key 126:126 ^
+ id 126:134 ^------^ host-553
+ val 126:134 ^------^ host-553
+ grp 126:134 ^------^ host-553
+ val 126:134 ^------^ host-553
+pair 126:134 ^------^ host-553
+ key 137:137 ^
+ sym 137:144 ^-----^ vSphere
+ sym 145:147 ^^ HA
+ val 137:147 ^--------^ vSphere HA
+ grp 137:147 ^--------^ vSphere HA
+ val 137:147 ^--------^ vSphere HA
+pair 137:147 ^--------^ vSphere HA
+ key 150:150 ^
+ sym 150:206 ^------------------------------------------------------^ com.vmware.vcIntegrity.lifecycle.health.vc.host_ha_state
+ val 150:206 ^------------------------------------------------------^ com.vmware.vcIntegrity.lifecycle.health.vc.host_ha_state
+ grp 150:206 ^------------------------------------------------------^ com.vmware.vcIntegrity.lifecycle.health.vc.host_ha_state
+ val 150:206 ^------------------------------------------------------^ com.vmware.vcIntegrity.lifecycle.health.vc.host_ha_state
+pair 150:206 ^------------------------------------------------------^ com.vmware.vcIntegrity.lifecycle.health.vc.host_ha_state
+ key 208:208 ^
+word 208:216 ^------^ returned
+ val 208:216 ^------^ returned
+pair 208:216 ^------^ returned
+ key 217:223 ^----^ status
+ sym 225:227 ^^ OK
+ val 225:227 ^^ OK
+pair 217:227 ^--------^ status: OK
+msg :[host-553] [vSphere HA] [com.vmware.vcIntegrity.lifecycle.health.vc.host_ha_state] returned status: OK
+format :[#] [#] [#] # status: #
+{
+ "col_0": [
+ "host-553"
+ ],
+ "col_1": [
+ "vSphere HA"
+ ],
+ "col_2": [
+ "com.vmware.vcIntegrity.lifecycle.health.vc.host_ha_state"
+ ],
+ "col_3": "returned",
+ "status": "OK"
+}
diff --git a/test/log-samples/sample-5cbaeeb96f1f0c11a93656107801efc3.txt b/test/log-samples/sample-5cbaeeb96f1f0c11a93656107801efc3.txt
new file mode 100644
index 0000000..e8002c0
--- /dev/null
+++ b/test/log-samples/sample-5cbaeeb96f1f0c11a93656107801efc3.txt
@@ -0,0 +1,52 @@
+ 2024-01-10T05:26:20.440Z error vmware-vum-server[28046] [Originator@6876 sub=Key] [key 59] [backtrace begin] product: VMware Update Manager, version: 8.0.3, build: build-22994205, tag: vmware-vum-server, cpu: x86_64, os: linux, buildType: release
+ key 92:92 ^
+word 92:101 ^-------^ backtrace
+word 102:107 ^---^ begin
+ val 92:107 ^-------------^ backtrace begin
+ grp 92:107 ^-------------^ backtrace begin
+ val 92:107 ^-------------^ backtrace begin
+pair 92:107 ^-------------^ backtrace begin
+ key 109:116 ^-----^ product
+ sym 118:124 ^----^ VMware
+word 125:131 ^----^ Update
+word 132:139 ^-----^ Manager
+ val 118:139 ^-------------------^ VMware Update Manager
+pair 109:139 ^----------------------------^ product: VMware Update Manager
+ key 141:148 ^-----^ version
+vers 150:155 ^---^ 8.0.3
+ val 150:155 ^---^ 8.0.3
+pair 141:155 ^------------^ version: 8.0.3
+ key 157:162 ^---^ build
+ id 164:178 ^------------^ build-22994205
+ val 164:178 ^------------^ build-22994205
+pair 157:178 ^-------------------^ build: build-22994205
+ key 180:183 ^-^ tag
+ id 185:202 ^---------------^ vmware-vum-server
+ val 185:202 ^---------------^ vmware-vum-server
+pair 180:202 ^--------------------^ tag: vmware-vum-server
+ key 204:207 ^-^ cpu
+ sym 209:215 ^----^ x86_64
+ val 209:215 ^----^ x86_64
+pair 204:215 ^---------^ cpu: x86_64
+ key 217:219 ^^ os
+word 221:226 ^---^ linux
+ val 221:226 ^---^ linux
+pair 217:226 ^-------^ os: linux
+ key 228:237 ^-------^ buildType
+word 239:246 ^-----^ release
+ val 239:246 ^-----^ release
+pair 228:246 ^----------------^ buildType: release
+msg :[backtrace begin] product: VMware Update Manager, version: 8.0.3, build: build-22994205, tag: vmware-vum-server, cpu: x86_64, os: linux, buildType: release
+format :[#] product: #, version: #, build: #, tag: #, cpu: #, os: #, buildType: #
+{
+ "col_0": [
+ "backtrace begin"
+ ],
+ "product": "VMware Update Manager",
+ "version": "8.0.3",
+ "build": "build-22994205",
+ "tag": "vmware-vum-server",
+ "cpu": "x86_64",
+ "os": "linux",
+ "buildType": "release"
+}
diff --git a/test/log-samples/sample-63068cd0931f8cbd22c2f15ac318af12.txt b/test/log-samples/sample-63068cd0931f8cbd22c2f15ac318af12.txt
new file mode 100644
index 0000000..8715526
--- /dev/null
+++ b/test/log-samples/sample-63068cd0931f8cbd22c2f15ac318af12.txt
@@ -0,0 +1,135 @@
+ 2021-09-25T11:22:08.034Z info vsand[1000946202] [opID=SWI-5e21ef1d-ddc1-f459 VsanPyVmomiProfiler::logProfile] VIS.GetFileShareObjects: 0.01s, consumed: 97564KB (+0KB), consumedPeak: 98644KB (+0KB), effectiveMin: 117872KB (+0KB), effectiveMinPeak: 121336KB (+0KB), requestedMinPeak: 121336KB (+0KB)
+ key 112:135 ^---------------------^ VIS.GetFileShareObjects
+ num 137:141 ^--^ 0.01
+unit 141:142 ^ s
+meas 137:142 ^---^ 0.01s
+ val 137:142 ^---^ 0.01s
+pair 112:142 ^----------------------------^ VIS.GetFileShareObjects: 0.01s
+ key 144:152 ^------^ consumed
+ num 154:159 ^---^ 97564
+unit 159:161 ^^ KB
+meas 154:161 ^-----^ 97564KB
+ val 154:161 ^-----^ 97564KB
+pair 144:161 ^---------------^ consumed: 97564KB
+ key 164:164 ^
+ num 164:165 ^ 0
+unit 165:167 ^^ KB
+meas 164:167 ^-^ 0KB
+ val 164:167 ^-^ 0KB
+ grp 164:167 ^-^ 0KB
+ val 164:167 ^-^ 0KB
+pair 164:167 ^-^ 0KB
+ key 170:182 ^----------^ consumedPeak
+ num 184:189 ^---^ 98644
+unit 189:191 ^^ KB
+meas 184:191 ^-----^ 98644KB
+ val 184:191 ^-----^ 98644KB
+pair 170:191 ^-------------------^ consumedPeak: 98644KB
+ key 194:194 ^
+ num 194:195 ^ 0
+unit 195:197 ^^ KB
+meas 194:197 ^-^ 0KB
+ val 194:197 ^-^ 0KB
+ grp 194:197 ^-^ 0KB
+ val 194:197 ^-^ 0KB
+pair 194:197 ^-^ 0KB
+ key 200:212 ^----------^ effectiveMin
+ num 214:220 ^----^ 117872
+unit 220:222 ^^ KB
+meas 214:222 ^------^ 117872KB
+ val 214:222 ^------^ 117872KB
+pair 200:222 ^--------------------^ effectiveMin: 117872KB
+ key 225:225 ^
+ num 225:226 ^ 0
+unit 226:228 ^^ KB
+meas 225:228 ^-^ 0KB
+ val 225:228 ^-^ 0KB
+ grp 225:228 ^-^ 0KB
+ val 225:228 ^-^ 0KB
+pair 225:228 ^-^ 0KB
+ key 231:247 ^--------------^ effectiveMinPeak
+ num 249:255 ^----^ 121336
+unit 255:257 ^^ KB
+meas 249:257 ^------^ 121336KB
+ val 249:257 ^------^ 121336KB
+pair 231:257 ^------------------------^ effectiveMinPeak: 121336KB
+ key 260:260 ^
+ num 260:261 ^ 0
+unit 261:263 ^^ KB
+meas 260:263 ^-^ 0KB
+ val 260:263 ^-^ 0KB
+ grp 260:263 ^-^ 0KB
+ val 260:263 ^-^ 0KB
+pair 260:263 ^-^ 0KB
+ key 266:282 ^--------------^ requestedMinPeak
+ num 284:290 ^----^ 121336
+unit 290:292 ^^ KB
+meas 284:292 ^------^ 121336KB
+ val 284:292 ^------^ 121336KB
+pair 266:292 ^------------------------^ requestedMinPeak: 121336KB
+ key 295:295 ^
+ num 295:296 ^ 0
+unit 296:298 ^^ KB
+meas 295:298 ^-^ 0KB
+ val 295:298 ^-^ 0KB
+ grp 295:298 ^-^ 0KB
+ val 295:298 ^-^ 0KB
+pair 295:298 ^-^ 0KB
+msg :VIS.GetFileShareObjects: 0.01s, consumed: 97564KB (+0KB), consumedPeak: 98644KB (+0KB), effectiveMin: 117872KB (+0KB), effectiveMinPeak: 121336KB (+0KB), requestedMinPeak: 121336KB (+0KB)
+format :VIS.GetFileShareObjects: #, consumed: # (+#), consumedPeak: # (+#), effectiveMin: # (+#), effectiveMinPeak: # (+#), requestedMinPeak: # (+#)
+{
+ "VIS.GetFileShareObjects": [
+ 0.01,
+ "s"
+ ],
+ "consumed": [
+ 97564,
+ "KB"
+ ],
+ "col_0": [
+ [
+ 0,
+ "KB"
+ ]
+ ],
+ "consumedPeak": [
+ 98644,
+ "KB"
+ ],
+ "col_1": [
+ [
+ 0,
+ "KB"
+ ]
+ ],
+ "effectiveMin": [
+ 117872,
+ "KB"
+ ],
+ "col_2": [
+ [
+ 0,
+ "KB"
+ ]
+ ],
+ "effectiveMinPeak": [
+ 121336,
+ "KB"
+ ],
+ "col_3": [
+ [
+ 0,
+ "KB"
+ ]
+ ],
+ "requestedMinPeak": [
+ 121336,
+ "KB"
+ ],
+ "col_4": [
+ [
+ 0,
+ "KB"
+ ]
+ ]
+}
diff --git a/test/log-samples/sample-67484ecc8091237a27f12863d36b4d03.txt b/test/log-samples/sample-67484ecc8091237a27f12863d36b4d03.txt
new file mode 100644
index 0000000..5f7cf36
--- /dev/null
+++ b/test/log-samples/sample-67484ecc8091237a27f12863d36b4d03.txt
@@ -0,0 +1,26 @@
+ 2024-01-10T05:27:07.452Z info vmware-vum-server[28092] [Originator@6876 sub=com.vmware.vcIntegrity.lifecycle.DesiredScanClusterTask] [Task, 524] Task:com.vmware.vcIntegrity.lifecycle.DesiredScanClusterTask ID:52b9d918-efe7-29a6-6d38-6eee37e76f87. Combining scan results for 32 hosts
+ key 145:149 ^--^ Task
+ sym 150:205 ^-----------------------------------------------------^ com.vmware.vcIntegrity.lifecycle.DesiredScanClusterTask
+ val 150:205 ^-----------------------------------------------------^ com.vmware.vcIntegrity.lifecycle.DesiredScanClusterTask
+pair 145:205 ^----------------------------------------------------------^ Task:com.vmware.vcIntegrity.lifecycle.DesiredScanClusterTask
+ key 206:208 ^^ ID
+uuid 209:245 ^----------------------------------^ 52b9d918-efe7-29a6-6d38-6eee37e76f87
+ val 209:245 ^----------------------------------^ 52b9d918-efe7-29a6-6d38-6eee37e76f87
+pair 206:245 ^-------------------------------------^ ID:52b9d918-efe7-29a6-6d38-6eee37e76f87
+word 270:273 ^-^ for
+ key 270:273 ^-^ for
+ num 274:276 ^^ 32
+ val 274:276 ^^ 32
+pair 270:276 ^----^ for 32
+ key 277:277 ^
+word 277:282 ^---^ hosts
+ val 277:282 ^---^ hosts
+pair 277:282 ^---^ hosts
+msg :Task:com.vmware.vcIntegrity.lifecycle.DesiredScanClusterTask ID:52b9d918-efe7-29a6-6d38-6eee37e76f87. Combining scan results for 32 hosts
+format :Task:# ID:#. Combining scan results for # #
+{
+ "Task": "com.vmware.vcIntegrity.lifecycle.DesiredScanClusterTask",
+ "ID": "52b9d918-efe7-29a6-6d38-6eee37e76f87",
+ "for": 32,
+ "col_0": "hosts"
+}
diff --git a/test/log-samples/sample-70c906b3c1a1cf03f15bde92ee78edfa6f9b7960.txt b/test/log-samples/sample-70c906b3c1a1cf03f15bde92ee78edfa6f9b7960.txt
index 9d80bf9..34ff50f 100644
--- a/test/log-samples/sample-70c906b3c1a1cf03f15bde92ee78edfa6f9b7960.txt
+++ b/test/log-samples/sample-70c906b3c1a1cf03f15bde92ee78edfa6f9b7960.txt
@@ -1,4 +1,33 @@
Jun 3 07:02:37 Tim-Stacks-iMac.local sudo[2717]: stack : TTY=ttys002 ; PWD=/ ; USER=root ; COMMAND=/usr/bin/env VAR1=foo ls
-msg :
-format :
-null
+ key 53:53 ^
+word 53:58 ^---^ stack
+ val 53:58 ^---^ stack
+pair 53:58 ^---^ stack
+ key 61:64 ^-^ TTY
+ sym 65:72 ^-----^ ttys002
+ val 65:72 ^-----^ ttys002
+pair 61:72 ^---------^ TTY=ttys002
+ key 75:78 ^-^ PWD
+path 79:80 ^ /
+ val 79:80 ^ /
+pair 75:80 ^---^ PWD=/
+ key 83:87 ^--^ USER
+word 88:92 ^--^ root
+ val 88:92 ^--^ root
+pair 83:92 ^-------^ USER=root
+ key 95:102 ^-----^ COMMAND
+path 103:115 ^----------^ /usr/bin/env
+ sym 116:120 ^--^ VAR1
+word 121:124 ^-^ foo
+word 125:127 ^^ ls
+ val 103:127 ^----------------------^ /usr/bin/env VAR1=foo ls
+pair 95:127 ^------------------------------^ COMMAND=/usr/bin/env VAR1=foo ls
+msg :stack : TTY=ttys002 ; PWD=/ ; USER=root ; COMMAND=/usr/bin/env VAR1=foo ls
+format :# : TTY=# ; PWD=# ; USER=# ; COMMAND=#
+{
+ "col_0": "stack",
+ "TTY": "ttys002",
+ "PWD": "/",
+ "USER": "root",
+ "COMMAND": "/usr/bin/env VAR1=foo ls"
+}
diff --git a/test/log-samples/sample-8a6527cdf27015a0204702430b6eca09.txt b/test/log-samples/sample-8a6527cdf27015a0204702430b6eca09.txt
new file mode 100644
index 0000000..8f6bb65
--- /dev/null
+++ b/test/log-samples/sample-8a6527cdf27015a0204702430b6eca09.txt
@@ -0,0 +1,135 @@
+ 2021-09-22T05:54:16.060Z info vsand[1000946217] [opID=Thread-2 VsanPyVmomiProfiler::logProfile] get-disk-data: 0.00s, consumed: 97792KB (+0KB), consumedPeak: 98644KB (+0KB), effectiveMin: 118228KB (+0KB), effectiveMinPeak: 121336KB (+0KB), requestedMinPeak: 121336KB (+0KB)
+ key 98:111 ^-----------^ get-disk-data
+ num 113:117 ^--^ 0.00
+unit 117:118 ^ s
+meas 113:118 ^---^ 0.00s
+ val 113:118 ^---^ 0.00s
+pair 98:118 ^------------------^ get-disk-data: 0.00s
+ key 120:128 ^------^ consumed
+ num 130:135 ^---^ 97792
+unit 135:137 ^^ KB
+meas 130:137 ^-----^ 97792KB
+ val 130:137 ^-----^ 97792KB
+pair 120:137 ^---------------^ consumed: 97792KB
+ key 140:140 ^
+ num 140:141 ^ 0
+unit 141:143 ^^ KB
+meas 140:143 ^-^ 0KB
+ val 140:143 ^-^ 0KB
+ grp 140:143 ^-^ 0KB
+ val 140:143 ^-^ 0KB
+pair 140:143 ^-^ 0KB
+ key 146:158 ^----------^ consumedPeak
+ num 160:165 ^---^ 98644
+unit 165:167 ^^ KB
+meas 160:167 ^-----^ 98644KB
+ val 160:167 ^-----^ 98644KB
+pair 146:167 ^-------------------^ consumedPeak: 98644KB
+ key 170:170 ^
+ num 170:171 ^ 0
+unit 171:173 ^^ KB
+meas 170:173 ^-^ 0KB
+ val 170:173 ^-^ 0KB
+ grp 170:173 ^-^ 0KB
+ val 170:173 ^-^ 0KB
+pair 170:173 ^-^ 0KB
+ key 176:188 ^----------^ effectiveMin
+ num 190:196 ^----^ 118228
+unit 196:198 ^^ KB
+meas 190:198 ^------^ 118228KB
+ val 190:198 ^------^ 118228KB
+pair 176:198 ^--------------------^ effectiveMin: 118228KB
+ key 201:201 ^
+ num 201:202 ^ 0
+unit 202:204 ^^ KB
+meas 201:204 ^-^ 0KB
+ val 201:204 ^-^ 0KB
+ grp 201:204 ^-^ 0KB
+ val 201:204 ^-^ 0KB
+pair 201:204 ^-^ 0KB
+ key 207:223 ^--------------^ effectiveMinPeak
+ num 225:231 ^----^ 121336
+unit 231:233 ^^ KB
+meas 225:233 ^------^ 121336KB
+ val 225:233 ^------^ 121336KB
+pair 207:233 ^------------------------^ effectiveMinPeak: 121336KB
+ key 236:236 ^
+ num 236:237 ^ 0
+unit 237:239 ^^ KB
+meas 236:239 ^-^ 0KB
+ val 236:239 ^-^ 0KB
+ grp 236:239 ^-^ 0KB
+ val 236:239 ^-^ 0KB
+pair 236:239 ^-^ 0KB
+ key 242:258 ^--------------^ requestedMinPeak
+ num 260:266 ^----^ 121336
+unit 266:268 ^^ KB
+meas 260:268 ^------^ 121336KB
+ val 260:268 ^------^ 121336KB
+pair 242:268 ^------------------------^ requestedMinPeak: 121336KB
+ key 271:271 ^
+ num 271:272 ^ 0
+unit 272:274 ^^ KB
+meas 271:274 ^-^ 0KB
+ val 271:274 ^-^ 0KB
+ grp 271:274 ^-^ 0KB
+ val 271:274 ^-^ 0KB
+pair 271:274 ^-^ 0KB
+msg :get-disk-data: 0.00s, consumed: 97792KB (+0KB), consumedPeak: 98644KB (+0KB), effectiveMin: 118228KB (+0KB), effectiveMinPeak: 121336KB (+0KB), requestedMinPeak: 121336KB (+0KB)
+format :get-disk-data: #, consumed: # (+#), consumedPeak: # (+#), effectiveMin: # (+#), effectiveMinPeak: # (+#), requestedMinPeak: # (+#)
+{
+ "get-disk-data": [
+ 0.00,
+ "s"
+ ],
+ "consumed": [
+ 97792,
+ "KB"
+ ],
+ "col_0": [
+ [
+ 0,
+ "KB"
+ ]
+ ],
+ "consumedPeak": [
+ 98644,
+ "KB"
+ ],
+ "col_1": [
+ [
+ 0,
+ "KB"
+ ]
+ ],
+ "effectiveMin": [
+ 118228,
+ "KB"
+ ],
+ "col_2": [
+ [
+ 0,
+ "KB"
+ ]
+ ],
+ "effectiveMinPeak": [
+ 121336,
+ "KB"
+ ],
+ "col_3": [
+ [
+ 0,
+ "KB"
+ ]
+ ],
+ "requestedMinPeak": [
+ 121336,
+ "KB"
+ ],
+ "col_4": [
+ [
+ 0,
+ "KB"
+ ]
+ ]
+}
diff --git a/test/log-samples/sample-97f2106d5fa94132715730416e86b3de.txt b/test/log-samples/sample-97f2106d5fa94132715730416e86b3de.txt
new file mode 100644
index 0000000..027a3eb
--- /dev/null
+++ b/test/log-samples/sample-97f2106d5fa94132715730416e86b3de.txt
@@ -0,0 +1,16 @@
+ 2024-01-11T10:46:03.218Z info vmware-vum-server[28274] [Originator@6876 sub=HostLocator opID=eb9d737f-fa4f-421d-9beb-ce31fb27938f] [hostLocator 239] Getting Management IP for host host-556: 10.172.44.70
+word 175:179 ^--^ host
+ key 175:179 ^--^ host
+ id 180:188 ^------^ host-556
+ val 180:188 ^------^ host-556
+pair 175:188 ^-----------^ host host-556
+ key 190:190 ^
+ipv4 190:202 ^----------^ 10.172.44.70
+ val 190:202 ^----------^ 10.172.44.70
+pair 190:202 ^----------^ 10.172.44.70
+msg :Getting Management IP for host host-556: 10.172.44.70
+format :Getting Management IP for host #: #
+{
+ "host": "host-556",
+ "col_0": "10.172.44.70"
+}
diff --git a/test/log-samples/sample-aca2878a2e50779c6697c0747ab1f60e4b368dcb.txt b/test/log-samples/sample-aca2878a2e50779c6697c0747ab1f60e4b368dcb.txt
index f5c31f2..b69ecf8 100644
--- a/test/log-samples/sample-aca2878a2e50779c6697c0747ab1f60e4b368dcb.txt
+++ b/test/log-samples/sample-aca2878a2e50779c6697c0747ab1f60e4b368dcb.txt
@@ -3,6 +3,7 @@
path 43:64 ^-------------------^ /sbin/dhclient-script
val 43:64 ^-------------------^ /sbin/dhclient-script
pair 43:64 ^-------------------^ /sbin/dhclient-script
+word 67:74 ^-----^ updated
key 67:74 ^-----^ updated
path 75:91 ^--------------^ /etc/resolv.conf
val 75:91 ^--------------^ /etc/resolv.conf
diff --git a/test/log-samples/sample-ad31f12d2adabd07e3ddda3ad5b0dbf6b49c4c99.txt b/test/log-samples/sample-ad31f12d2adabd07e3ddda3ad5b0dbf6b49c4c99.txt
index 63c22cc..7307f40 100644
--- a/test/log-samples/sample-ad31f12d2adabd07e3ddda3ad5b0dbf6b49c4c99.txt
+++ b/test/log-samples/sample-ad31f12d2adabd07e3ddda3ad5b0dbf6b49c4c99.txt
@@ -3,19 +3,14 @@
quot 49:49 ^
val 49:49 ^
pair 43:49 ^----^ vmnet:
- key 50:67 ^---------------^ VNetUserIf_Create
-word 69:76 ^-----^ created
-wspc 76:77 ^
- sym 77:83 ^----^ userIf
-wspc 83:84 ^
word 84:86 ^^ at
-wspc 86:87 ^
+ key 84:86 ^^ at
hex 87:105 ^----------------^ 0xffffff802644f400
- val 69:105 ^----------------------------------^ created userIf at 0xffffff802644f400
-pair 50:105 ^-----------------------------------------------------^ VNetUserIf_Create: created userIf at 0xffffff802644f400
+ val 87:105 ^----------------^ 0xffffff802644f400
+pair 84:105 ^-------------------^ at 0xffffff802644f400
msg :vmnet: VNetUserIf_Create: created userIf at 0xffffff802644f400
-format :vmnet:# VNetUserIf_Create: #
+format :vmnet:# VNetUserIf_Create: created userIf at #
{
"vmnet": "",
- "VNetUserIf_Create": "created userIf at 0xffffff802644f400"
+ "at": "0xffffff802644f400"
}
diff --git a/test/log-samples/sample-bc6f6cf689fa5455616b4d9fbe121a48d3c9de59.txt b/test/log-samples/sample-bc6f6cf689fa5455616b4d9fbe121a48d3c9de59.txt
index 32d86d0..72cc4e2 100644
--- a/test/log-samples/sample-bc6f6cf689fa5455616b4d9fbe121a48d3c9de59.txt
+++ b/test/log-samples/sample-bc6f6cf689fa5455616b4d9fbe121a48d3c9de59.txt
@@ -1,23 +1,22 @@
Apr 29 08:13:42 tstack-centos5 dhclient: DHCPNAK from 10.1.10.1 (xid=0x4e17f141)
- key 41:41 ^
- sym 41:48 ^-----^ DHCPNAK
-pair 41:48 ^-----^ DHCPNAK
- key 54:54 ^
+word 49:53 ^--^ from
+ key 49:53 ^--^ from
ipv4 54:63 ^-------^ 10.1.10.1
-pair 54:63 ^-------^ 10.1.10.1
+ val 54:63 ^-------^ 10.1.10.1
+pair 49:63 ^------------^ from 10.1.10.1
key 65:65 ^
key 65:68 ^-^ xid
hex 69:79 ^--------^ 0x4e17f141
val 69:79 ^--------^ 0x4e17f141
pair 65:79 ^------------^ xid=0x4e17f141
grp 65:79 ^------------^ xid=0x4e17f141
+ val 65:79 ^------------^ xid=0x4e17f141
pair 65:79 ^------------^ xid=0x4e17f141
msg :DHCPNAK from 10.1.10.1 (xid=0x4e17f141)
-format :# from # (#)
+format :DHCPNAK from # (#)
{
- "col_0": "DHCPNAK",
- "col_1": "10.1.10.1",
- "col_2": [
+ "from": "10.1.10.1",
+ "col_0": [
{
"xid": "0x4e17f141"
}
diff --git a/test/log-samples/sample-bed6bfb07b2af767547cedbf489c15ce.txt b/test/log-samples/sample-bed6bfb07b2af767547cedbf489c15ce.txt
new file mode 100644
index 0000000..595f53b
--- /dev/null
+++ b/test/log-samples/sample-bed6bfb07b2af767547cedbf489c15ce.txt
@@ -0,0 +1,15 @@
+ 2024-01-10T05:22:13.258Z info vmware-vum-server[28092] [Originator@6876 sub=ClusterConfigListener] [clusterConfigListener 60] Got UUID for host: host-24 -> 4c4c4544-0052-4310-8057-b3c04f543532
+ key 126:143 ^---------------^ Got UUID for host
+ id 145:152 ^-----^ host-24
+ val 145:152 ^-----^ host-24
+pair 126:152 ^------------------------^ Got UUID for host: host-24
+ key 156:156 ^
+uuid 156:192 ^----------------------------------^ 4c4c4544-0052-4310-8057-b3c04f543532
+ val 156:192 ^----------------------------------^ 4c4c4544-0052-4310-8057-b3c04f543532
+pair 156:192 ^----------------------------------^ 4c4c4544-0052-4310-8057-b3c04f543532
+msg :Got UUID for host: host-24 -> 4c4c4544-0052-4310-8057-b3c04f543532
+format :Got UUID for host: # -> #
+{
+ "Got UUID for host": "host-24",
+ "col_0": "4c4c4544-0052-4310-8057-b3c04f543532"
+}
diff --git a/test/log-samples/sample-c15acd32844669d23d0cbc88ec548129ed2c592e.txt b/test/log-samples/sample-c15acd32844669d23d0cbc88ec548129ed2c592e.txt
index a68d490..ae28119 100644
--- a/test/log-samples/sample-c15acd32844669d23d0cbc88ec548129ed2c592e.txt
+++ b/test/log-samples/sample-c15acd32844669d23d0cbc88ec548129ed2c592e.txt
@@ -1,8 +1,21 @@
Jul 14 14:31:06 linjenkins3 kernel: [31809412.513897] [UFW BLOCK] IN=eth0 OUT= MAC=40:40:2e:9a:ad:92:c4:71:fe:f1:b9:7f:08:00 SRC=69.60.116.202 DST=173.203.237.224 LEN=44 TOS=0x00 PREC=0x00 TTL=29 ID=15852 PROTO=TCP SPT=43998 DPT=3389 WINDOW=3072 RES=0x00 SYN URGP=0
- key 37:68 ^-----------------------------^ 31809412.513897] [UFW BLOCK] IN
+ key 37:37 ^
+ num 37:52 ^-------------^ 31809412.513897
+ val 37:52 ^-------------^ 31809412.513897
+ grp 37:52 ^-------------^ 31809412.513897
+ val 37:52 ^-------------^ 31809412.513897
+pair 37:52 ^-------------^ 31809412.513897
+ key 55:55 ^
+ sym 55:58 ^-^ UFW
+ sym 59:64 ^---^ BLOCK
+ val 55:64 ^-------^ UFW BLOCK
+ grp 55:64 ^-------^ UFW BLOCK
+ val 55:64 ^-------^ UFW BLOCK
+pair 55:64 ^-------^ UFW BLOCK
+ key 66:68 ^^ IN
sym 69:73 ^--^ eth0
val 69:73 ^--^ eth0
-pair 37:73 ^----------------------------------^ 31809412.513897] [UFW BLOCK] IN=eth0
+pair 66:73 ^-----^ IN=eth0
key 74:77 ^-^ OUT
quot 78:78 ^
val 78:78 ^
@@ -57,18 +70,22 @@ pair 225:233
pair 234:245 ^---------^ WINDOW=3072
key 246:249 ^-^ RES
hex 250:254 ^--^ 0x00
-wspc 254:255 ^
- sym 255:258 ^-^ SYN
- val 250:258 ^------^ 0x00 SYN
-pair 246:258 ^----------^ RES=0x00 SYN
+ val 250:254 ^--^ 0x00
+pair 246:254 ^------^ RES=0x00
key 259:263 ^--^ URGP
num 264:265 ^ 0
val 264:265 ^ 0
pair 259:265 ^----^ URGP=0
msg :[31809412.513897] [UFW BLOCK] IN=eth0 OUT= MAC=40:40:2e:9a:ad:92:c4:71:fe:f1:b9:7f:08:00 SRC=69.60.116.202 DST=173.203.237.224 LEN=44 TOS=0x00 PREC=0x00 TTL=29 ID=15852 PROTO=TCP SPT=43998 DPT=3389 WINDOW=3072 RES=0x00 SYN URGP=0
-format :[31809412.513897] [UFW BLOCK] IN=# OUT=# MAC=# SRC=# DST=# LEN=# TOS=# PREC=# TTL=# ID=# PROTO=# SPT=# DPT=# WINDOW=# RES=# URGP=#
+format :[#] [#] IN=# OUT=# MAC=# SRC=# DST=# LEN=# TOS=# PREC=# TTL=# ID=# PROTO=# SPT=# DPT=# WINDOW=# RES=# SYN URGP=#
{
- "31809412.513897] [UFW BLOCK] IN": "eth0",
+ "col_0": [
+ 31809412.513897
+ ],
+ "col_1": [
+ "UFW BLOCK"
+ ],
+ "IN": "eth0",
"OUT": "",
"MAC": "40:40:2e:9a:ad:92:c4:71:fe:f1:b9:7f:08:00",
"SRC": "69.60.116.202",
@@ -82,6 +99,6 @@ format :[31809412.513897] [UFW BLOCK] IN=# OUT=# MAC=# SRC=# DST=# LEN=# TO
"SPT": 43998,
"DPT": 3389,
"WINDOW": 3072,
- "RES": "0x00 SYN",
+ "RES": "0x00",
"URGP": 0
}
diff --git a/test/log-samples/sample-c23f22c1b932b904203e018f78dead95fb89b15d.txt b/test/log-samples/sample-c23f22c1b932b904203e018f78dead95fb89b15d.txt
index 376752b..3d0fe7c 100644
--- a/test/log-samples/sample-c23f22c1b932b904203e018f78dead95fb89b15d.txt
+++ b/test/log-samples/sample-c23f22c1b932b904203e018f78dead95fb89b15d.txt
@@ -1,35 +1,34 @@
Apr 29 08:13:42 tstack-centos5 dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5 (xid=0xd16b79d)
- key 41:41 ^
- sym 41:53 ^----------^ DHCPDISCOVER
-pair 41:53 ^----------^ DHCPDISCOVER
- key 57:57 ^
- sym 57:61 ^--^ eth0
-pair 57:61 ^--^ eth0
- key 65:65 ^
+word 62:64 ^^ to
+ key 62:64 ^^ to
ipv4 65:80 ^-------------^ 255.255.255.255
-pair 65:80 ^-------------^ 255.255.255.255
- key 86:86 ^
+ val 65:80 ^-------------^ 255.255.255.255
+pair 62:80 ^----------------^ to 255.255.255.255
+word 81:85 ^--^ port
+ key 81:85 ^--^ port
num 86:88 ^^ 67
-pair 86:88 ^^ 67
- key 98:98 ^
+ val 86:88 ^^ 67
+pair 81:88 ^-----^ port 67
+word 89:97 ^------^ interval
+ key 89:97 ^------^ interval
num 98:99 ^ 5
-pair 98:99 ^ 5
+ val 98:99 ^ 5
+pair 89:99 ^--------^ interval 5
key 101:101 ^
key 101:104 ^-^ xid
hex 105:114 ^-------^ 0xd16b79d
val 105:114 ^-------^ 0xd16b79d
pair 101:114 ^-----------^ xid=0xd16b79d
grp 101:114 ^-----------^ xid=0xd16b79d
+ val 101:114 ^-----------^ xid=0xd16b79d
pair 101:114 ^-----------^ xid=0xd16b79d
msg :DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5 (xid=0xd16b79d)
-format :# on # to # port # interval # (#)
+format :DHCPDISCOVER on eth0 to # port # interval # (#)
{
- "col_0": "DHCPDISCOVER",
- "col_1": "eth0",
- "col_2": "255.255.255.255",
- "col_3": 67,
- "col_4": 5,
- "col_5": [
+ "to": "255.255.255.255",
+ "port": 67,
+ "interval": 5,
+ "col_0": [
{
"xid": "0xd16b79d"
}
diff --git a/test/log-samples/sample-d0d6b3fc6766caac5ac3fac4a3754ceaab785eb8.txt b/test/log-samples/sample-d0d6b3fc6766caac5ac3fac4a3754ceaab785eb8.txt
index b7aad42..7fb8c1d 100644
--- a/test/log-samples/sample-d0d6b3fc6766caac5ac3fac4a3754ceaab785eb8.txt
+++ b/test/log-samples/sample-d0d6b3fc6766caac5ac3fac4a3754ceaab785eb8.txt
@@ -1,31 +1,28 @@
Apr 29 22:32:26 tstack-centos5 dhclient: DHCPREQUEST on eth0 to 10.1.10.1 port 67 (xid=0xd16b79d)
- key 41:41 ^
- sym 41:52 ^---------^ DHCPREQUEST
-pair 41:52 ^---------^ DHCPREQUEST
- key 56:56 ^
- sym 56:60 ^--^ eth0
-pair 56:60 ^--^ eth0
- key 64:64 ^
+word 61:63 ^^ to
+ key 61:63 ^^ to
ipv4 64:73 ^-------^ 10.1.10.1
-pair 64:73 ^-------^ 10.1.10.1
- key 79:79 ^
+ val 64:73 ^-------^ 10.1.10.1
+pair 61:73 ^----------^ to 10.1.10.1
+word 74:78 ^--^ port
+ key 74:78 ^--^ port
num 79:81 ^^ 67
-pair 79:81 ^^ 67
+ val 79:81 ^^ 67
+pair 74:81 ^-----^ port 67
key 83:83 ^
key 83:86 ^-^ xid
hex 87:96 ^-------^ 0xd16b79d
val 87:96 ^-------^ 0xd16b79d
pair 83:96 ^-----------^ xid=0xd16b79d
grp 83:96 ^-----------^ xid=0xd16b79d
+ val 83:96 ^-----------^ xid=0xd16b79d
pair 83:96 ^-----------^ xid=0xd16b79d
msg :DHCPREQUEST on eth0 to 10.1.10.1 port 67 (xid=0xd16b79d)
-format :# on # to # port # (#)
+format :DHCPREQUEST on eth0 to # port # (#)
{
- "col_0": "DHCPREQUEST",
- "col_1": "eth0",
- "col_2": "10.1.10.1",
- "col_3": 67,
- "col_4": [
+ "to": "10.1.10.1",
+ "port": 67,
+ "col_0": [
{
"xid": "0xd16b79d"
}
diff --git a/test/log-samples/sample-dd7d406352ec6a11d966b6f015a9482b060f2b29.txt b/test/log-samples/sample-dd7d406352ec6a11d966b6f015a9482b060f2b29.txt
index bcf3908..9801802 100644
--- a/test/log-samples/sample-dd7d406352ec6a11d966b6f015a9482b060f2b29.txt
+++ b/test/log-samples/sample-dd7d406352ec6a11d966b6f015a9482b060f2b29.txt
@@ -1,23 +1,24 @@
2013-02-11 06:42:34,311:INFO:com.twisted:Starting factory <twisted.web.server.Site instance at 0x1de9290>
- key 29:29 ^
key 29:40 ^---------^ com.twisted
-pair 29:40 ^---------^ com.twisted
- key 59:59 ^
- sym 59:82 ^---------------------^ twisted.web.server.Site
-wspc 82:83 ^
-word 83:91 ^------^ instance
-wspc 91:92 ^
+word 41:49 ^------^ Starting
+ val 41:49 ^------^ Starting
+pair 29:49 ^------------------^ com.twisted:Starting
+ key 50:57 ^-----^ factory
word 92:94 ^^ at
-wspc 94:95 ^
+ key 92:94 ^^ at
hex 95:104 ^-------^ 0x1de9290
- val 59:104 ^-------------------------------------------^ twisted.web.server.Site instance at 0x1de9290
- grp 59:104 ^-------------------------------------------^ twisted.web.server.Site instance at 0x1de9290
-pair 59:104 ^-------------------------------------------^ twisted.web.server.Site instance at 0x1de9290
+ val 95:104 ^-------^ 0x1de9290
+pair 92:104 ^----------^ at 0x1de9290
+ grp 92:104 ^----------^ at 0x1de9290
+ val 92:104 ^----------^ at 0x1de9290
+pair 50:104 ^----------------------------------------------------^ factory <twisted.web.server.Site instance at 0x1de9290
msg ::com.twisted:Starting factory <twisted.web.server.Site instance at 0x1de9290>
-format ::#:Starting factory <#>
+format ::com.twisted:# factory <twisted.web.server.Site instance #>
{
- "col_0": "com.twisted",
- "col_1": [
- "twisted.web.server.Site instance at 0x1de9290"
+ "com.twisted": "Starting",
+ "factory": [
+ {
+ "at": "0x1de9290"
+ }
]
}
diff --git a/test/log-samples/sample-e779d1771e34f5203ae73e85802e78002be63db6.txt b/test/log-samples/sample-e779d1771e34f5203ae73e85802e78002be63db6.txt
index d527217..ff58580 100644
--- a/test/log-samples/sample-e779d1771e34f5203ae73e85802e78002be63db6.txt
+++ b/test/log-samples/sample-e779d1771e34f5203ae73e85802e78002be63db6.txt
@@ -1,23 +1,22 @@
Apr 29 22:32:27 tstack-centos5 dhclient: DHCPACK from 10.1.10.1 (xid=0xd16b79d)
- key 41:41 ^
- sym 41:48 ^-----^ DHCPACK
-pair 41:48 ^-----^ DHCPACK
- key 54:54 ^
+word 49:53 ^--^ from
+ key 49:53 ^--^ from
ipv4 54:63 ^-------^ 10.1.10.1
-pair 54:63 ^-------^ 10.1.10.1
+ val 54:63 ^-------^ 10.1.10.1
+pair 49:63 ^------------^ from 10.1.10.1
key 65:65 ^
key 65:68 ^-^ xid
hex 69:78 ^-------^ 0xd16b79d
val 69:78 ^-------^ 0xd16b79d
pair 65:78 ^-----------^ xid=0xd16b79d
grp 65:78 ^-----------^ xid=0xd16b79d
+ val 65:78 ^-----------^ xid=0xd16b79d
pair 65:78 ^-----------^ xid=0xd16b79d
msg :DHCPACK from 10.1.10.1 (xid=0xd16b79d)
-format :# from # (#)
+format :DHCPACK from # (#)
{
- "col_0": "DHCPACK",
- "col_1": "10.1.10.1",
- "col_2": [
+ "from": "10.1.10.1",
+ "col_0": [
{
"xid": "0xd16b79d"
}
diff --git a/test/log-samples/sample-e8729677c1b443d8f65124db0d5b6f04.txt b/test/log-samples/sample-e8729677c1b443d8f65124db0d5b6f04.txt
new file mode 100644
index 0000000..54b30fd
--- /dev/null
+++ b/test/log-samples/sample-e8729677c1b443d8f65124db0d5b6f04.txt
@@ -0,0 +1,22 @@
+ 2022-05-17T07:40:38.051Z In(30) init[1001390328]: inittab: /usr/lib/vmware/configmanager/bin/applyconfig --bootstrap (11740460 us)
+ key 50:57 ^-----^ inittab
+path 59:104 ^-------------------------------------------^ /usr/lib/vmware/configmanager/bin/applyconfig
+ val 59:104 ^-------------------------------------------^ /usr/lib/vmware/configmanager/bin/applyconfig
+pair 50:104 ^----------------------------------------------------^ inittab: /usr/lib/vmware/configmanager/bin/applyconfig
+ key 105:116 ^---------^ --bootstrap
+ num 118:126 ^------^ 11740460
+ val 118:126 ^------^ 11740460
+word 127:129 ^^ us
+ val 127:129 ^^ us
+ grp 118:129 ^---------^ 11740460 us
+ val 118:129 ^---------^ 11740460 us
+pair 105:129 ^----------------------^ --bootstrap (11740460 us
+msg :inittab: /usr/lib/vmware/configmanager/bin/applyconfig --bootstrap (11740460 us)
+format :inittab: # --bootstrap (#)
+{
+ "inittab": "/usr/lib/vmware/configmanager/bin/applyconfig",
+ "--bootstrap": [
+ 11740460,
+ "us"
+ ]
+}
diff --git a/test/log-samples/sample-eef32793daf841a576d8a5cd27239d5d.txt b/test/log-samples/sample-eef32793daf841a576d8a5cd27239d5d.txt
new file mode 100644
index 0000000..cac7219
--- /dev/null
+++ b/test/log-samples/sample-eef32793daf841a576d8a5cd27239d5d.txt
@@ -0,0 +1,16 @@
+ 2022-05-17T08:56:54.107Z In(14) settingsd[1001392457]: debug [ConfigStore:66064b9700] File /usr/lib/vmware/configmanager/apply_modules/advanced_options/plugin.json does not support type:3
+word 86:90 ^--^ File
+ key 86:90 ^--^ File
+path 91:163 ^----------------------------------------------------------------------^ /usr/lib/vmware/configmanager/apply_modules/advanced_options/plugin.json
+ val 91:163 ^----------------------------------------------------------------------^ /usr/lib/vmware/configmanager/apply_modules/advanced_options/plugin.json
+pair 86:163 ^---------------------------------------------------------------------------^ File /usr/lib/vmware/configmanager/apply_modules/advanced_options/plugin.json
+ key 181:185 ^--^ type
+ num 186:187 ^ 3
+ val 186:187 ^ 3
+pair 181:187 ^----^ type:3
+msg :File /usr/lib/vmware/configmanager/apply_modules/advanced_options/plugin.json does not support type:3
+format :File # does not support type:#
+{
+ "File": "/usr/lib/vmware/configmanager/apply_modules/advanced_options/plugin.json",
+ "type": 3
+}
diff --git a/test/log-samples/sample-f2fba0d0b1e57f9a707ea96a8a4efcdc.txt b/test/log-samples/sample-f2fba0d0b1e57f9a707ea96a8a4efcdc.txt
new file mode 100644
index 0000000..9e35f8f
--- /dev/null
+++ b/test/log-samples/sample-f2fba0d0b1e57f9a707ea96a8a4efcdc.txt
@@ -0,0 +1,31 @@
+ Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+ key 31:31 ^
+word 31:39 ^------^ timstack
+ val 31:39 ^------^ timstack
+pair 31:39 ^------^ timstack
+ key 42:45 ^-^ TTY
+ id 46:51 ^---^ pts/6
+ val 46:51 ^---^ pts/6
+pair 42:51 ^-------^ TTY=pts/6
+ key 54:57 ^-^ PWD
+path 58:91 ^-------------------------------^ /auto/wstimstack/rpms/lbuild/test
+ val 58:91 ^-------------------------------^ /auto/wstimstack/rpms/lbuild/test
+pair 54:91 ^-----------------------------------^ PWD=/auto/wstimstack/rpms/lbuild/test
+ key 94:98 ^--^ USER
+word 99:103 ^--^ root
+ val 99:103 ^--^ root
+pair 94:103 ^-------^ USER=root
+ key 106:113 ^-----^ COMMAND
+path 114:127 ^-----------^ /usr/bin/tail
+path 128:145 ^---------------^ /var/log/messages
+ val 114:145 ^-----------------------------^ /usr/bin/tail /var/log/messages
+pair 106:145 ^-------------------------------------^ COMMAND=/usr/bin/tail /var/log/messages
+msg :timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+format :# : TTY=# ; PWD=# ; USER=# ; COMMAND=#
+{
+ "col_0": "timstack",
+ "TTY": "pts/6",
+ "PWD": "/auto/wstimstack/rpms/lbuild/test",
+ "USER": "root",
+ "COMMAND": "/usr/bin/tail /var/log/messages"
+}
diff --git a/test/log-samples/sample-f632067ddac054da85b5cade949c6d94.txt b/test/log-samples/sample-f632067ddac054da85b5cade949c6d94.txt
new file mode 100644
index 0000000..048aa7a
--- /dev/null
+++ b/test/log-samples/sample-f632067ddac054da85b5cade949c6d94.txt
@@ -0,0 +1,27 @@
+ 2021-09-02T03:36:27.389Z warning fdm[1000873987] [Originator@6876 sub=Cluster opID=SWI-636bf2b7] Sendto[ipv6] fd01:0:106:5:0:a:0:1511: No route to host
+ key 97:103 ^----^ Sendto
+ sym 104:108 ^--^ ipv6
+ val 104:108 ^--^ ipv6
+ grp 104:108 ^--^ ipv6
+ val 104:108 ^--^ ipv6
+pair 97:108 ^---------^ Sendto[ipv6
+ key 110:110 ^
+ipv6 110:133 ^---------------------^ fd01:0:106:5:0:a:0:1511
+ val 110:133 ^---------------------^ fd01:0:106:5:0:a:0:1511
+pair 110:133 ^---------------------^ fd01:0:106:5:0:a:0:1511
+ key 135:135 ^
+word 135:137 ^^ No
+word 138:143 ^---^ route
+word 144:146 ^^ to
+word 147:151 ^--^ host
+ val 135:151 ^--------------^ No route to host
+pair 135:151 ^--------------^ No route to host
+msg :Sendto[ipv6] fd01:0:106:5:0:a:0:1511: No route to host
+format :Sendto[#] #: #
+{
+ "Sendto": [
+ "ipv6"
+ ],
+ "col_0": "fd01:0:106:5:0:a:0:1511",
+ "col_1": "No route to host"
+}
diff --git a/test/logfile_haproxy.0 b/test/logfile_haproxy.0
index a9ee9e6..92e1a8b 100644
--- a/test/logfile_haproxy.0
+++ b/test/logfile_haproxy.0
@@ -9,9 +9,9 @@ Feb 25 16:20:04 192.168.4.2 haproxy[7]: 141.35.244.171:53337 [25/Feb/2019:16:20:
Feb 25 16:20:09 192.168.4.2 haproxy[7]: 89.247.124.65:15564 [25/Feb/2019:16:20:06.321] prod_http_in~ bk_ktest_kt/nginx_sonst 0/0/1/43/2707 200 26170 - - ---- 3/3/1/1/0 0/0 {Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0} {} "GET /portal/?Script=934&onlinetest=korrektur&anm=13915&currentPage=0 HTTP/1.1"
Feb 25 16:20:11 192.168.4.2 haproxy[7]: 89.247.124.65:15565 [25/Feb/2019:16:20:08.872] prod_http_in~ bk_ktest_kt/nginx_sonst 0/0/1/26/2442 200 26170 - - ---- 3/2/1/1/0 0/0 {Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0} {} "GET /portal/?Script=934&onlinetest=korrektur&anm=13915&currentPage=0 HTTP/1.1"
Feb 25 16:20:12 192.168.4.2 haproxy[7]: 87.183.41.77:50186 [25/Feb/2019:16:20:11.910] prod_http_in~ bk_ktest_kt/nginx_sonst 0/0/0/236/236 200 4586 - - ---- 4/4/3/3/0 0/0 {Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0} {} "GET /portal/?Script=934&lehrer=77798 HTTP/1.1"
-Feb 25 16:20:12 192.168.4.2 haproxy[7]: 87.183.41.77:50186 [25/Feb/2019:16:20:12.234] prod_http_in~ bk_ktest_sonst/nginx_sonst 0/0/1/0/1 200 16416 - - ---- 4/4/0/0/0 0/0 {Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0} {} "GET /media/core/bootstrap_3.3.7/css/bootstrap.css?1550939643 HTTP/1.1"
-Feb 25 16:20:12 192.168.4.2 haproxy[7]: 87.183.41.77:50186 [25/Feb/2019:16:20:12.317] prod_http_in~ bk_ktest_sonst/nginx_sonst 0/0/0/1/1 200 11065 - - ---- 9/9/0/0/0 0/0 {Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0} {} "GET /media/core/jquery/jquery-ui-1.12.1.js?1550939557 HTTP/1.1"
-Feb 25 16:20:12 192.168.4.2 haproxy[7]: 95.216.197.33:56224 [25/Feb/2019:16:20:10.111] prod_http_in/sktst2: SSL handshake failure
-Feb 25 16:20:12 192.168.4.2 haproxy[7]: 87.183.41.77:50188 [25/Feb/2019:16:20:12.321] prod_http_in~ bk_ktest_sonst/nginx_sonst 0/0/1/0/1 200 5959 - - ---- 9/9/0/0/0 0/0 {Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0} {} "GET /media/pi_fontawesome/css/font-awesome.css?1550939694 HTTP/1.1"
-Feb 25 16:20:12 192.168.4.2 haproxy[7]: 87.183.41.77:50187 [25/Feb/2019:16:20:12.325] prod_http_in~ bk_ktest_sonst/nginx_sonst 0/0/1/0/1 200 1859 - - ---- 9/9/0/0/0 0/0 {Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0} {} "GET /media/pi_popup/1.1.0/magnific-popup.css?1550939704 HTTP/1.1"
-Feb 25 16:20:12 192.168.4.2 haproxy[7]: 87.183.41.77:50189 [25/Feb/2019:16:20:12.331] prod_http_in~ bk_ktest_sonst/nginx_sonst 0/0/1/0/1 200 2496 - - ---- 9/9/0/0/0 0/0 {Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0} {} "GET /media/core/core.css?1550939640 HTTP/1.1"
+Feb 25 16:20:13 192.168.4.2 haproxy[7]: 87.183.41.77:50186 [25/Feb/2019:16:20:13.234] prod_http_in~ bk_ktest_sonst/nginx_sonst 0/0/1/0/1 200 16416 - - ---- 4/4/0/0/0 0/0 {Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0} {} "GET /media/core/bootstrap_3.3.7/css/bootstrap.css?1550939643 HTTP/1.1"
+Feb 25 16:20:14 192.168.4.2 haproxy[7]: 87.183.41.77:50186 [25/Feb/2019:16:20:14.317] prod_http_in~ bk_ktest_sonst/nginx_sonst 0/0/0/1/1 200 11065 - - ---- 9/9/0/0/0 0/0 {Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0} {} "GET /media/core/jquery/jquery-ui-1.12.1.js?1550939557 HTTP/1.1"
+Feb 25 16:20:15 192.168.4.2 haproxy[7]: 95.216.197.33:56224 [25/Feb/2019:16:20:10.111] prod_http_in/sktst2: SSL handshake failure
+Feb 25 16:20:16 192.168.4.2 haproxy[7]: 87.183.41.77:50188 [25/Feb/2019:16:20:12.321] prod_http_in~ bk_ktest_sonst/nginx_sonst 0/0/1/0/1 200 5959 - - ---- 9/9/0/0/0 0/0 {Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0} {} "GET /media/pi_fontawesome/css/font-awesome.css?1550939694 HTTP/1.1"
+Feb 25 16:20:17 192.168.4.2 haproxy[7]: 87.183.41.77:50187 [25/Feb/2019:16:20:12.325] prod_http_in~ bk_ktest_sonst/nginx_sonst 0/0/1/0/1 200 1859 - - ---- 9/9/0/0/0 0/0 {Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0} {} "GET /media/pi_popup/1.1.0/magnific-popup.css?1550939704 HTTP/1.1"
+Feb 25 16:20:18 192.168.4.2 haproxy[7]: 87.183.41.77:50189 [25/Feb/2019:16:20:12.331] prod_http_in~ bk_ktest_sonst/nginx_sonst 0/0/1/0/1 200 2496 - - ---- 9/9/0/0/0 0/0 {Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0} {} "GET /media/core/core.css?1550939640 HTTP/1.1"
diff --git a/test/logfile_json.json b/test/logfile_json.json
index 55657f7..dd6c9d2 100644
--- a/test/logfile_json.json
+++ b/test/logfile_json.json
@@ -1,11 +1,11 @@
-{"ts": "2013-09-06T20:00:48.124817Z", "lvl": "TRACE", "msg": "trace test"}
-{"ts": "2013-09-06T20:00:49.124817Z", "lvl": "INFO", "msg": "Starting up \u001B[0;32mservice\u001B[0m"}
+{"ts": "2013-09-06T20:00:48.124817Z", "logger": "com.example.foo.bar.bazzer", "lvl": "TRACE", "msg": "trace test"}
+{"ts": "2013-09-06T20:00:49.124817Z", "logger": "com.example.demo", "lvl": "INFO", "msg": "Starting up \u001B[0;32mservice\u001B[0m"}
{"ts": "2013-09-06T22:00:49.124817Z", "lvl": "INFO", "msg": "Shutting down service", "user": "steve@example.com"}
-{"ts": "2013-09-06T22:00:59.124817Z", "lvl": "DEBUG5", "msg": "Details...\n"}
-{"ts": "2013-09-06T22:00:59.124817Z", "lvl": "DEBUG4", "msg": "Details...\n"}
+{"ts": "2013-09-06T22:00:59.124817Z", "lvl": "DEBUG5", "msg": "D\bDetails...\n"}
+{"ts": "2013-09-06T22:00:59.124817Z", "lvl": "DEBUG4", "msg": "D\bDe\betails...\n"}
{"ts": "2013-09-06T22:00:59.124817Z", "lvl": "DEBUG3", "msg": "Details...\n"}
{"ts": "2013-09-06T22:00:59.124817Z", "lvl": "DEBUG2", "msg": "Details...\n"}
-{"ts": "2013-09-06T22:00:59.124817Z", "lvl": "DEBUG", "msg": "Details..."}
+{"ts": "2013-09-06 22:01:00Z", "lvl": "DEBUG", "msg": "Details..."}
{"ts": "2013-09-06T22:01:49.124817Z", "lvl": "STATS", "msg": "1 beat per second"}
{"ts": "2013-09-06T22:01:49.124817Z", "lvl": "WARNING", "msg": "not looking good"}
{"ts": "2013-09-06T22:01:49.124817Z", "lvl": "ERROR", "msg": "looking bad"}
diff --git a/test/logfile_json_subsec.json b/test/logfile_json_subsec.json
index 3ddc190..c572651 100644
--- a/test/logfile_json_subsec.json
+++ b/test/logfile_json_subsec.json
@@ -1,2 +1,2 @@
{"instant":{"epochSecond": 1663977609,"nanoOfSecond": 484000000}, "msg": "Hello, World!"}
-{"instant":{"epochSecond": 1663977619,"nanoOfSecond": 222000000}, "msg": "Goodbye, World!"}
+{"instant":{"epochSecond": 1663977619,"nanoOfSecond": 222000123}, "msg": "Goodbye, World!"}
diff --git a/test/logfile_nextcloud.0 b/test/logfile_nextcloud.0
new file mode 100644
index 0000000..efa3a1a
--- /dev/null
+++ b/test/logfile_nextcloud.0
@@ -0,0 +1,5 @@
+{"reqId":"twvbRFk1OwgHo2bqggnx","level":1,"time":"2023-10-01T02:39:09+00:00","remoteAddr":"10.0.0.1","user":"admin","app":"files_antivirus","method":"","url":"--","message":"Tried to scan non file","userAgent":"--","version":"29.1.1.0","data":{"app":"files_antivirus"}}
+{"reqId":"twvbRFk1OwgHo2bqggnx","level":1,"time":"2023-10-01T02:39:09+00:00","remoteAddr":"","user":"--","app":"files_antivirus","method":"","url":"--","message":"Tried to scan non file","userAgent":"--","version":"29.1.1.0","data":{"app":"files_antivirus"}}
+{"reqId":"pZpwRdWUcILeyKMZNPQt","level":1,"time":"2023-10-01T02:50:03+00:00","remoteAddr":"","user":"--","app":"fulltextsearch_elasticsearch","method":"","url":"--","message":"Request: PUT http://elasticsearch:9200/nextcloud/_doc/files%3A1780281","userAgent":"--","version":"29.1.1.0","data":{"app":"fulltextsearch_elasticsearch","request":"{\"[object] (GuzzleHttp\\Psr7\\Request)\":{\"GuzzleHttp\\Psr7\\Requestmethod\":\"PUT\",\"GuzzleHttp\\Psr7\\RequestrequestTarget\":null,\"GuzzleHttp\\Psr7\\Requesturi\":{\"[object] (GuzzleHttp\\Psr7\\Uri)\":{\"GuzzleHttp\\Psr7\\Urischeme\":\"http\",\"GuzzleHttp\\Psr7\\UriuserInfo\":\"\",\"GuzzleHttp\\Psr7\\Urihost\":\"elasticsearch\",\"GuzzleHttp\\Psr7\\Uriport\":9200,\"GuzzleHttp\\Psr7\\Uripath\":\"/nextcloud/_doc/files%3A1780281\",\"GuzzleHttp\\Psr7\\Uriquery\":\"\",\"GuzzleHttp\\Psr7\\Urifragment\":\"\",\"GuzzleHttp\\Psr7\\UricomposedComponents\":\"http://elasticsearch:9200/nextcloud/_doc/files%3A1780281\"}},\"GuzzleHttp\\Psr7\\Requestheaders\":{\"Host\":[\"elasticsearch:9200\"],\"Accept\":[\"application/vnd.elasticsearch+json; compatible-with=8\"],\"Content-Type\":[\"application/vnd.elasticsearch+json; compatible-with=8\"],\"User-Agent\":[\"elasticsearch-php/8.6.1 (Linux 5.15.0-84-generic; PHP 8.2.11)\"],\"x-elastic-client-meta\":[\"es=8.6.1,php=8.2.11,t=8.7.0,a=0,gu=7.8.0\"]},\"GuzzleHttp\\Psr7\\RequestheaderNames\":{\"accept\":\"Accept\",\"content-type\":\"Content-Type\",\"host\":\"Host\",\"user-agent\":\"User-Agent\",\"x-elastic-client-meta\":\"x-elastic-client-meta\"},\"GuzzleHttp\\Psr7\\Requestprotocol\":\"1.1\",\"GuzzleHttp\\Psr7\\Requeststream\":{\"[object] (GuzzleHttp\\Psr7\\Stream)\":{\"GuzzleHttp\\Psr7\\Streamstream\":\"[resource] Resource id #1635\",\"GuzzleHttp\\Psr7\\Streamsize\":null,\"GuzzleHttp\\Psr7\\Streamseekable\":true,\"GuzzleHttp\\Psr7\\Streamreadable\":true,\"GuzzleHttp\\Psr7\\Streamwritable\":true,\"GuzzleHttp\\Psr7\\Streamuri\":\"php://temp\",\"GuzzleHttp\\Psr7\\StreamcustomMetadata\":[]}}}}"}}
+{"reqId":"WO0XBZZfZbekindHeptb","level":1,"time":"2023-10-16T01:47:44+00:00","remoteAddr":"192.168.1.1","user":"jeff","app":"memories","method":"PATCH","url":"--","message":"Memories: Updated item successfully","userAgent":"--","version":"29.1.2.1","data":{"app":"memories"}}
+{"reqId":"SblFU0l19re9TAE2UQft","level":1,"time":"2023-10-16T01:50:18+00:00","remoteAddr":"192.168.1.1","user":"jeff","app":"files_versions","method":"","url":"--","message":"Mark to expire /Documents/phat.txt next version should be 1697407738 or smaller. (prevTimestamp: 1697411338; step: 3600","userAgent":"--","version":"29.1.2.1","data":{"app":"files_versions"}}
diff --git a/test/logfile_partitions.0 b/test/logfile_partitions.0
new file mode 100644
index 0000000..5e5487e
--- /dev/null
+++ b/test/logfile_partitions.0
@@ -0,0 +1,82 @@
+Apr 28 04:02:03 tstack-centos5 syslogd 1.4.1: restart.
+Apr 28 04:04:01 tstack-centos5 avahi-daemon[2467]: Invalid query packet.
+Apr 28 06:53:54 tstack-centos5 dhclient: DHCPREQUEST on eth0 to 10.1.10.1 port 67 (xid=0x654a04aa)
+Apr 28 06:53:54 tstack-centos5 dhclient: DHCPNAK from 10.1.10.1 (xid=0x654a04aa)
+Apr 28 06:53:54 tstack-centos5 NET[31050]: /sbin/dhclient-script : updated /etc/resolv.conf
+Apr 28 06:53:54 tstack-centos5 avahi-daemon[2467]: Withdrawing address record for 10.1.10.49 on eth0.
+Apr 28 06:53:54 tstack-centos5 avahi-daemon[2467]: Leaving mDNS multicast group on interface eth0.IPv4 with address 10.1.10.49.
+Apr 28 06:53:54 tstack-centos5 avahi-daemon[2467]: iface.c: interface_mdns_mcast_join() called but no local address available.
+Apr 28 06:53:54 tstack-centos5 avahi-daemon[2467]: Interface eth0.IPv4 no longer relevant for mDNS.
+Apr 28 06:53:54 tstack-centos5 dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5 (xid=0x4e17f141)
+Apr 28 06:53:55 tstack-centos5 dhclient: DHCPOFFER from 10.1.10.1
+Apr 28 06:53:55 tstack-centos5 dhclient: DHCPREQUEST on eth0 to 255.255.255.255 port 67 (xid=0x4e17f141)
+Apr 28 06:53:55 tstack-centos5 dhclient: DHCPACK from 10.1.10.1 (xid=0x4e17f141)
+Apr 28 06:53:55 tstack-centos5 avahi-daemon[2467]: New relevant interface eth0.IPv4 for mDNS.
+Apr 28 06:53:55 tstack-centos5 avahi-daemon[2467]: Joining mDNS multicast group on interface eth0.IPv4 with address 10.1.10.103.
+Apr 28 06:53:55 tstack-centos5 avahi-daemon[2467]: Registering new address record for 10.1.10.103 on eth0.
+Apr 28 06:53:55 tstack-centos5 avahi-daemon[2467]: Withdrawing address record for 10.1.10.103 on eth0.
+Apr 28 06:53:55 tstack-centos5 avahi-daemon[2467]: Leaving mDNS multicast group on interface eth0.IPv4 with address 10.1.10.103.
+Apr 28 06:53:55 tstack-centos5 avahi-daemon[2467]: iface.c: interface_mdns_mcast_join() called but no local address available.
+Apr 28 06:53:55 tstack-centos5 avahi-daemon[2467]: Interface eth0.IPv4 no longer relevant for mDNS.
+Apr 28 06:53:55 tstack-centos5 avahi-daemon[2467]: New relevant interface eth0.IPv4 for mDNS.
+Apr 28 06:53:55 tstack-centos5 avahi-daemon[2467]: Joining mDNS multicast group on interface eth0.IPv4 with address 10.1.10.103.
+Apr 28 06:53:55 tstack-centos5 avahi-daemon[2467]: Registering new address record for 10.1.10.103 on eth0.
+Apr 28 06:53:55 tstack-centos5 NET[31132]: /sbin/dhclient-script : updated /etc/resolv.conf
+Apr 28 06:53:55 tstack-centos5 dhclient: bound to 10.1.10.103 -- renewal in 54694 seconds.
+Apr 28 07:03:50 tstack-centos5 avahi-daemon[2467]: Invalid query packet.
+Apr 28 17:01:19 tstack-centos5 avahi-daemon[2467]: Invalid query packet.
+Apr 28 22:05:28 tstack-centos5 dhclient: DHCPREQUEST on eth0 to 10.1.10.1 port 67 (xid=0x4e17f141)
+Apr 28 22:05:29 tstack-centos5 dhclient: DHCPACK from 10.1.10.1 (xid=0x4e17f141)
+Apr 28 22:05:29 tstack-centos5 dhclient: bound to 10.1.10.103 -- renewal in 8787 seconds.
+Apr 28 22:10:01 tstack-centos5 avahi-daemon[2467]: Invalid query packet.
+Apr 29 00:31:55 tstack-centos5 dhclient: DHCPREQUEST on eth0 to 10.1.10.1 port 67 (xid=0x4e17f141)
+Apr 29 00:31:56 tstack-centos5 dhclient: DHCPACK from 10.1.10.1 (xid=0x4e17f141)
+Apr 29 00:31:56 tstack-centos5 dhclient: bound to 10.1.10.103 -- renewal in 9938 seconds.
+Apr 29 00:39:19 tstack-centos5 avahi-daemon[2467]: Invalid query packet.
+Apr 29 03:17:34 tstack-centos5 dhclient: DHCPREQUEST on eth0 to 10.1.10.1 port 67 (xid=0x4e17f141)
+Apr 29 03:17:34 tstack-centos5 dhclient: DHCPACK from 10.1.10.1 (xid=0x4e17f141)
+Apr 29 03:17:34 tstack-centos5 dhclient: bound to 10.1.10.103 -- renewal in 2656 seconds.
+Apr 29 03:18:07 tstack-centos5 avahi-daemon[2467]: Invalid query packet.
+Apr 29 04:01:50 tstack-centos5 dhclient: DHCPREQUEST on eth0 to 10.1.10.1 port 67 (xid=0x4e17f141)
+Apr 29 04:01:50 tstack-centos5 dhclient: DHCPACK from 10.1.10.1 (xid=0x4e17f141)
+Apr 29 04:01:50 tstack-centos5 dhclient: bound to 10.1.10.103 -- renewal in 15112 seconds.
+Apr 29 04:10:03 tstack-centos5 avahi-daemon[2467]: Invalid query packet.
+Apr 29 05:55:18 tstack-centos5 avahi-daemon[2467]: Invalid query packet.
+Apr 29 06:39:04 tstack-centos5 avahi-daemon[2467]: Invalid query packet.
+Apr 29 08:13:41 tstack-centos5 dhclient: DHCPREQUEST on eth0 to 10.1.10.1 port 67 (xid=0x4e17f141)
+Apr 29 08:13:42 tstack-centos5 dhclient: DHCPNAK from 10.1.10.1 (xid=0x4e17f141)
+Apr 29 08:13:42 tstack-centos5 NET[13600]: /sbin/dhclient-script : updated /etc/resolv.conf
+Apr 29 08:13:42 tstack-centos5 avahi-daemon[2467]: Withdrawing address record for 10.1.10.103 on eth0.
+Apr 29 08:13:42 tstack-centos5 avahi-daemon[2467]: Leaving mDNS multicast group on interface eth0.IPv4 with address 10.1.10.103.
+Apr 29 08:13:42 tstack-centos5 avahi-daemon[2467]: iface.c: interface_mdns_mcast_join() called but no local address available.
+Apr 29 08:13:42 tstack-centos5 avahi-daemon[2467]: Interface eth0.IPv4 no longer relevant for mDNS.
+Apr 29 08:13:42 tstack-centos5 dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5 (xid=0xd16b79d)
+Apr 29 08:13:43 tstack-centos5 dhclient: DHCPOFFER from 10.1.10.1
+Apr 29 08:13:43 tstack-centos5 dhclient: DHCPREQUEST on eth0 to 255.255.255.255 port 67 (xid=0xd16b79d)
+Apr 29 08:13:43 tstack-centos5 dhclient: DHCPACK from 10.1.10.1 (xid=0xd16b79d)
+Apr 29 08:13:43 tstack-centos5 avahi-daemon[2467]: New relevant interface eth0.IPv4 for mDNS.
+Apr 29 08:13:43 tstack-centos5 avahi-daemon[2467]: Joining mDNS multicast group on interface eth0.IPv4 with address 10.1.10.62.
+Apr 29 08:13:43 tstack-centos5 avahi-daemon[2467]: Registering new address record for 10.1.10.62 on eth0.
+Apr 29 08:13:43 tstack-centos5 avahi-daemon[2467]: Withdrawing address record for 10.1.10.62 on eth0.
+Apr 29 08:13:43 tstack-centos5 avahi-daemon[2467]: Leaving mDNS multicast group on interface eth0.IPv4 with address 10.1.10.62.
+Apr 29 08:13:43 tstack-centos5 avahi-daemon[2467]: iface.c: interface_mdns_mcast_join() called but no local address available.
+Apr 29 08:13:43 tstack-centos5 avahi-daemon[2467]: Interface eth0.IPv4 no longer relevant for mDNS.
+Apr 29 08:13:43 tstack-centos5 avahi-daemon[2467]: New relevant interface eth0.IPv4 for mDNS.
+Apr 29 08:13:43 tstack-centos5 avahi-daemon[2467]: Joining mDNS multicast group on interface eth0.IPv4 with address 10.1.10.62.
+Apr 29 08:13:43 tstack-centos5 avahi-daemon[2467]: Registering new address record for 10.1.10.62 on eth0.
+Apr 29 08:13:43 tstack-centos5 NET[13682]: /sbin/dhclient-script : updated /etc/resolv.conf
+Apr 29 08:13:43 tstack-centos5 dhclient: bound to 10.1.10.62 -- renewal in 31782 seconds.
+Apr 29 08:15:06 tstack-centos5 avahi-daemon[2467]: Invalid query packet.
+Apr 29 17:03:19 tstack-centos5 avahi-daemon[2467]: Invalid query packet.
+Apr 29 17:03:25 tstack-centos5 dhclient: DHCPREQUEST on eth0 to 10.1.10.1 port 67 (xid=0xd16b79d)
+Apr 29 17:03:25 tstack-centos5 dhclient: DHCPACK from 10.1.10.1 (xid=0xd16b79d)
+Apr 29 17:03:25 tstack-centos5 dhclient: bound to 10.1.10.62 -- renewal in 19742 seconds.
+Apr 29 17:03:51 tstack-centos5 avahi-daemon[2467]: Invalid query packet.
+Apr 29 17:20:00 tstack-centos5 avahi-daemon[2467]: Invalid query packet.
+Apr 29 22:32:26 tstack-centos5 dhclient: DHCPREQUEST on eth0 to 10.1.10.1 port 67 (xid=0xd16b79d)
+Apr 29 22:32:27 tstack-centos5 dhclient: DHCPACK from 10.1.10.1 (xid=0xd16b79d)
+Apr 29 22:32:27 tstack-centos5 dhclient: bound to 10.1.10.62 -- renewal in 55327 seconds.
+Apr 29 22:45:57 tstack-centos5 avahi-daemon[2467]: Invalid query packet.
+Apr 29 23:02:45 tstack-centos5 avahi-daemon[2467]: Invalid response packet from host 10.1.10.10.
+Apr 29 23:02:45 tstack-centos5 avahi-daemon[2467]: Invalid response packet from host fe80::22c9:d0ff:fe15:1b7c.
+Apr 29 23:02:46 tstack-centos5 avahi-daemon[2467]: Invalid query packet.
diff --git a/test/logfile_regexp_access_log.0 b/test/logfile_regexp_access_log.0
new file mode 100644
index 0000000..6f37afd
--- /dev/null
+++ b/test/logfile_regexp_access_log.0
@@ -0,0 +1,2 @@
+localhost:443 178.20.184.42 1j0vhgd jsmith [26/Jul/2023:00:01:26 -0700] "GET /secure/RapidBoard.jspa?rapidView=1295&selectedIssue=AA-409111&quickFilter=385508&quickFilter=387097 HTTP/2.0" 200 17163 "-" "Mozilla/5.0" 116075
+localhost:443 154.57.4.229 cger1e khenry [26/Jul/2023:00:02:12 -0700] "GET /secure/RapidBoard.jspa?rapidView=1839&view=planning.nodetail&issueLimit=100 HTTP/2.0" 200 16517 "https://localhost/secure/RapidBoard.jspa?rapidView=1843&view=planning.nodetail&issueLimit=100" "Mozilla/5.0" 156302
diff --git a/test/logfile_rollover.2 b/test/logfile_rollover.2
new file mode 100644
index 0000000..6c9f7a4
--- /dev/null
+++ b/test/logfile_rollover.2
@@ -0,0 +1,375 @@
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:34 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
+Nov 3 09:23:38 veridian automount[16442]: attempting to mount entry /auto/opt
+Nov 3 09:23:38 veridian automount[7999]: lookup(file): lookup for opt failed
+Nov 3 09:47:02 veridian sudo: timstack : TTY=pts/6 ; PWD=/auto/wstimstack/rpms/lbuild/test ; USER=root ; COMMAND=/usr/bin/tail /var/log/messages
+Feb 3 09:23:38 veridian automount[7998]: lookup(file): lookup for foobar failed
diff --git a/test/logfile_with_zones.0 b/test/logfile_with_zones.0
new file mode 100644
index 0000000..127d4fe
--- /dev/null
+++ b/test/logfile_with_zones.0
@@ -0,0 +1,3 @@
+2022-08-27T14:22:01.613Z space01.global-acme.entp NSX 3106 - [abc@6876 comp="abc-edge" subcomp="abc-sha" username="root" level="INFO" s2comp="fork-monitor"] keep-alive check received resp {'seq': 1017276, 'type': 0, 'executor': 2, 'timestamp': 3976009.961550321, 'stats': [{'req': 1017277, 'resp': 1017276, 'pending_req': 0, 'peak_pending_req': 2, 'req_error': 0, 'resp_error': 0, 'req_dropped_no_resource': 0}, {0: {'req': 316363, 'resp': 316363}, 1: {'req': 316430, 'resp': 316430}, 2: {'req': 316416, 'resp': 316416}, 3: {'req': 34178, 'resp': 34178}, 4: {'req': 33890, 'resp': 33890}}]} for req{'seq': 1017276, 'check': True, 'timeout': 4, 'timestamp': 3976009.961173802, 'type': 0}
+2022-08-27T17:22:01.694554+03:00 space01.global-acme.entp CRON 20856 - - (root) CMD ( /usr/bin/nice -n 10 /opt/acme/bin/mem_usage_monitor.py >/dev/null 2>&1)
+2022-08-27T14:22:01.888Z space01.global-acme.entp NSX 4828 SWITCHING [abc@6876 comp="abc-edge" subcomp="datapathd" s2comp="neigh" tname="dp-learning3" level="INFO"] dynamic arp entry(28b18eb1-3575-4179-956b-aae009433d27, 10.12.160.4) is created
diff --git a/test/man_echo.txt b/test/man_echo.txt
new file mode 100644
index 0000000..1f4fa53
--- /dev/null
+++ b/test/man_echo.txt
@@ -0,0 +1,38 @@
+ECHO(1) General Commands Manual ECHO(1)
+
+NNAAMMEE
+ eecchhoo – write arguments to the standard output
+
+SSYYNNOOPPSSIISS
+ eecchhoo [--nn] [_s_t_r_i_n_g _._._.]
+
+DDEESSCCRRIIPPTTIIOONN
+ The eecchhoo utility writes any specified operands, separated by single blank
+ (‘ ’) characters and followed by a newline (‘\n’) character, to the
+ standard output.
+
+ The following option is available:
+
+ --nn Do not print the trailing newline character. This may also be
+ achieved by appending ‘\c’ to the end of the string, as is done by
+ iBCS2 compatible systems. Note that this option as well as the
+ effect of ‘\c’ are implementation-defined in IEEE Std 1003.1-2001
+ (“POSIX.1”) as amended by Cor. 1-2002. Applications aiming for
+ maximum portability are strongly encouraged to use printf(1) to
+ suppress the newline character.
+
+ Some shells may provide a builtin eecchhoo command which is similar or
+ identical to this utility. Most notably, the builtin eecchhoo in sh(1) does
+ not accept the --nn option. Consult the builtin(1) manual page.
+
+EEXXIITT SSTTAATTUUSS
+ The eecchhoo utility exits 0 on success, and >0 if an error occurs.
+
+SSEEEE AALLSSOO
+ builtin(1), csh(1), printf(1), sh(1)
+
+SSTTAANNDDAARRDDSS
+ The eecchhoo utility conforms to IEEE Std 1003.1-2001 (“POSIX.1”) as amended
+ by Cor. 1-2002.
+
+macOS 13.5 April 12, 2003 macOS 13.5
diff --git a/test/naughty_files.py b/test/naughty_files.py
new file mode 100755
index 0000000..0b8e5c1
--- /dev/null
+++ b/test/naughty_files.py
@@ -0,0 +1,28 @@
+#!/usr/bin/env python3
+
+import os
+
+os.makedirs("naughty", 0o700, True)
+with open('naughty/file-with-escape-sequences-\x1b[31mred\x1b[m-color.txt', 'w+') as fi:
+ fi.write('boo')
+
+with open('naughty/file-with-escape-sequences-\x1b[31mred\x1b[m-color.log', 'w+') as fi:
+ fi.write('2012-07-02 10:22:40,672:DEBUG:foo bar baz\n')
+
+try:
+ with open(b'naughty/text-file-with-invalid-utf-\xc3\x28', 'w+') as fi:
+ fi.write('boo')
+
+ with open(b'naughty/log-file-with-invalid-utf-\xc3\x28', 'w+') as fi:
+ fi.write('2015-04-24T21:09:39.296 25376]ERROR:somemodule:Something very INFOrmative.')
+except OSError as e:
+ pass
+
+with open('naughty/file-with-hidden-text.txt', 'w+') as fi:
+ fi.write('Hello, \x1b[30;40mWorld!\x1b[m!\n')
+ fi.write('Goodbye, \x1b[37;47mWorld!\x1b[m!\n')
+ fi.write('That is not\b\b\ball\n')
+
+with open('naughty/file-with-terminal-controls.txt', 'w+') as fi:
+ fi.write('time for a reset \x1bckapow\n')
+ fi.write('ding dong! \x07\n')
diff --git a/test/parser_debugger.py b/test/parser_debugger.py
index d2818f5..2f9b102 100755
--- a/test/parser_debugger.py
+++ b/test/parser_debugger.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
# Copyright (c) 2013, Timothy Stack
#
@@ -44,6 +44,7 @@ list_depth = {}
list_format = {}
breakpoints = set()
+
def completer(text, state):
options = [x for x in itertools.chain(name_to_addr,
element_lists,
@@ -54,6 +55,7 @@ def completer(text, state):
except IndexError:
return None
+
readline.set_completer(completer)
if 'libedit' in readline.__doc__:
@@ -67,27 +69,30 @@ for line in open("scanned.dpt"):
if line.startswith("input "):
input_line = line[6:-1]
else:
- ops.append(map(string.strip, line.split()))
+ ops.append([x.strip() for x in line.split()])
+
def getstr(capture):
start, end = capture.split(':')
return input_line[int(start):int(end)]
+
def printlist(name_or_addr):
if name_or_addr in name_to_addr:
addr = name_to_addr[name_or_addr]
- print "% 3d (%s:%s) %s" % (list_depth.get(addr, -1), name_or_addr, addr, element_lists[addr])
+ print("% 3d (%s:%s) %s" % (list_depth.get(addr, -1), name_or_addr, addr, element_lists[addr]))
elif name_or_addr in element_lists:
addr = name_or_addr
- print "% 3d (%s:%s) %s" % (list_depth.get(name_or_addr, -1),
- addr_to_name.get(name_or_addr, name_or_addr),
- name_or_addr,
- element_lists[name_or_addr])
+ print("% 3d (%s:%s) %s" % (list_depth.get(name_or_addr, -1),
+ addr_to_name.get(name_or_addr, name_or_addr),
+ name_or_addr,
+ element_lists[name_or_addr]))
else:
- print "error: unknown list --", name_or_addr
+ print("error: unknown list --", name_or_addr)
if addr in list_format:
- print " format -- appender(%s) term(%s) qual(%s) sep(%s) prefix_term(%s)" % tuple(list_format[addr])
+ print(" format -- appender(%s) term(%s) qual(%s) sep(%s) prefix_term(%s)" % tuple(list_format[addr]))
+
def handleop(fields):
addr = fields[0]
@@ -113,6 +118,8 @@ def handleop(fields):
list_depth[addr] = -1
elif method_name == 'push_back':
el.append((method_args[0], getstr(method_args[1])))
+ elif method_name == 'push_front':
+ el.insert(0, (method_args[0], getstr(method_args[1])))
elif method_name == 'pop_front':
el.pop(0)
elif method_name == 'pop_back':
@@ -122,7 +129,7 @@ def handleop(fields):
elif method_name == 'splice':
pos = int(method_args[0])
other = element_lists[method_args[1]]
- start, from_end = map(int, method_args[2].split(':'))
+ start, from_end = list(map(int, method_args[2].split(':')))
end = len(other) - from_end
sub_list = other[start:end]
del other[start:end]
@@ -134,7 +141,8 @@ def handleop(fields):
elif method_name == 'point':
breakpoints.add(method_args[0])
else:
- print "Unhandled method: ", method_name
+ print("Unhandled method: ", method_name)
+
def playupto(length):
addr_to_name.clear()
@@ -144,6 +152,7 @@ def playupto(length):
for index in range(length):
handleop(ops[index])
+
def find_prev_point(start, name):
orig_start = start
while start > 0:
@@ -155,6 +164,7 @@ def find_prev_point(start, name):
return start + 1
return orig_start + 1
+
def find_next_point(start, name):
orig_start = start
while start < len(ops):
@@ -166,13 +176,15 @@ def find_next_point(start, name):
return start + 1
return orig_start + 1
+
def printall():
- print input_line
+ print(input_line)
sorted_lists = [(list_depth.get(addr, -1), addr) for addr in element_lists]
sorted_lists.sort()
for _depth, addr in sorted_lists:
printlist(addr)
+
index = len(ops)
last_cmd = ['']
watch_list = set()
@@ -180,20 +192,20 @@ while True:
playupto(index)
if index == 0:
- print "init"
+ print("init")
else:
op = ops[index - 1]
- print "#%s %s" % (index -1, op)
+ print("#%s %s" % (index - 1, op))
if op[2] == 'push_back':
- print getstr(op[4])
+ print(getstr(op[4]))
for list_name in watch_list:
printlist(list_name)
try:
- cmd = raw_input("> ").split()
+ cmd = input("> ").split()
except EOFError:
- print
+ print()
break
if not cmd or cmd[0] == '':
@@ -202,16 +214,16 @@ while True:
if not cmd or cmd[0] == '':
pass
elif cmd[0] == 'h':
- print 'Help:'
- print ' q - quit'
- print ' s - Start over'
- print ' n - Next step'
- print ' r - Previous step'
- print ' b - Previous breakpoint'
- print ' c - Next breakpoint'
- print ' p - Print state'
- print ' w <var> - Add a variable to the watch list'
- print ' u <var> - Remove a variable from the watch list'
+ print('Help:')
+ print(' q - quit')
+ print(' s - Start over')
+ print(' n - Next step')
+ print(' r - Previous step')
+ print(' b - Previous breakpoint')
+ print(' c - Next breakpoint')
+ print(' p - Print state')
+ print(' w <var> - Add a variable to the watch list')
+ print(' u <var> - Remove a variable from the watch list')
elif cmd[0] == 'q':
break
elif cmd[0] == 's':
@@ -242,7 +254,7 @@ while True:
if watch_list:
watch_list.remove(cmd[1])
else:
- print "error: unknown command --", cmd
+ print("error: unknown command --", cmd)
printall()
diff --git a/test/pyfile_0.py b/test/pyfile_0.py
new file mode 100644
index 0000000..43696e9
--- /dev/null
+++ b/test/pyfile_0.py
@@ -0,0 +1,9 @@
+# Test file for syntax-highlighting
+
+def hello(abc):
+ """
+ This is a multi-line string
+
+ @param abc: blah blah
+ """
+ return abc + 1
diff --git a/test/scripty.cc b/test/scripty.cc
index 2f7bb94..23144d3 100644
--- a/test/scripty.cc
+++ b/test/scripty.cc
@@ -108,7 +108,8 @@ public:
memset(&ws, 0, sizeof(ws));
if (isatty(STDIN_FILENO)
- && tcgetattr(STDIN_FILENO, &this->ct_termios) == -1) {
+ && tcgetattr(STDIN_FILENO, &this->ct_termios) == -1)
+ {
throw error(errno);
}
@@ -122,7 +123,8 @@ public:
ws.ws_row = 24;
if (openpty(this->ct_master.out(), slave.out(), nullptr, nullptr, &ws)
- < 0) {
+ < 0)
+ {
throw error(errno);
}
@@ -174,20 +176,11 @@ public:
return retval;
};
- bool is_child() const
- {
- return this->ct_child == 0;
- };
+ bool is_child() const { return this->ct_child == 0; };
- pid_t get_child_pid() const
- {
- return this->ct_child;
- };
+ pid_t get_child_pid() const { return this->ct_child; };
- int get_fd() const
- {
- return this->ct_master;
- };
+ int get_fd() const { return this->ct_master; };
protected:
pid_t ct_child;
@@ -328,15 +321,9 @@ struct term_machine {
std::vector<std::string> ta_desc;
};
- term_machine(child_term& ct) : tm_child_term(ct)
- {
- this->clear();
- }
+ term_machine(child_term& ct) : tm_child_term(ct) { this->clear(); }
- ~term_machine()
- {
- this->flush_line();
- }
+ ~term_machine() { this->flush_line(); }
void clear()
{
@@ -460,7 +447,8 @@ struct term_machine {
line_len -= 4;
}
for (size_t lpc2 = lpc + 1; lpc2 < this->tm_line_attrs.size();
- lpc2++) {
+ lpc2++)
+ {
auto bar_pos = 7 + this->tm_line_attrs[lpc2].ta_pos;
if (bar_pos < line_len) {
@@ -488,7 +476,8 @@ struct term_machine {
int val, last;
if (sscanf(&this->tm_escape_buffer[index], "%d%n", &val, &last)
- == 1) {
+ == 1)
+ {
retval.push_back(val);
index += last;
if (this->tm_escape_buffer[index] != ';') {
@@ -503,10 +492,7 @@ struct term_machine {
return retval;
}
- void new_user_input(char ch)
- {
- this->tm_user_input.push_back(ch);
- }
+ void new_user_input(char ch) { this->tm_user_input.push_back(ch); }
void new_input(char ch)
{
@@ -521,7 +507,7 @@ struct term_machine {
this->tm_unicode_buffer.pop_front();
return retval;
- });
+ }).unwrap();
}
return;
} else {
@@ -602,7 +588,8 @@ struct term_machine {
case state::ESCAPE_FIXED_LENGTH: {
this->tm_escape_buffer.push_back(ch);
if (this->tm_escape_buffer.size()
- == this->tm_escape_expected_size) {
+ == this->tm_escape_expected_size)
+ {
auto iter = CSI_TO_DESC.find(
std::string(this->tm_escape_buffer.data(),
this->tm_escape_buffer.size()));
@@ -1101,7 +1088,8 @@ main(int argc, char* argv[])
#endif
tm.new_input(buffer[lpc]);
if (scripty_data.sd_replay.size()
- != last_replay_size) {
+ != last_replay_size)
+ {
last = now;
last_replay_size
= scripty_data.sd_replay.size();
diff --git a/test/test_ansi_scrubber.cc b/test/test_ansi_scrubber.cc
index 5371a31..1bb67f2 100644
--- a/test/test_ansi_scrubber.cc
+++ b/test/test_ansi_scrubber.cc
@@ -37,6 +37,7 @@
#include <assert.h>
#include "base/ansi_scrubber.hh"
+#include "base/attr_line.builder.hh"
#include "config.h"
#include "view_curses.hh"
@@ -45,6 +46,50 @@ using namespace std;
int
main(int argc, char* argv[])
{
+ printf("BEGIN test\n");
+
+ {
+ std::string zero_width = "\x16 1 \x16 2 \x16";
+ string_attrs_t sa;
+
+ scrub_ansi_string(zero_width, &sa);
+ printf("zero width: '%s'\n",
+ fmt::format(FMT_STRING("{:?}"), zero_width).c_str());
+ assert(zero_width == " 1 2 ");
+ for (const auto& attr : sa) {
+ printf("attr %d:%d %s\n",
+ attr.sa_range.lr_start,
+ attr.sa_range.lr_end,
+ attr.sa_type->sat_name);
+ if (attr.sa_type == &VC_HYPERLINK) {
+ printf(" value: %s\n",
+ attr.sa_value.get<std::string>().c_str());
+ }
+ if (attr.sa_type == &SA_ORIGIN_OFFSET) {
+ printf(" value: %lld\n", attr.sa_value.get<int64_t>());
+ }
+ }
+ }
+
+ {
+ std::string bad_bold = "That is not\b\b\ball\n";
+ string_attrs_t sa;
+
+ scrub_ansi_string(bad_bold, &sa);
+ printf("bad bold1: '%s'\n",
+ fmt::format(FMT_STRING("{:?}"), bad_bold).c_str());
+ assert(bad_bold == "That is not\b\b\ball\n");
+ }
+ {
+ std::string bad_bold = "test r\bra\bc not\b\b\ball \x16";
+ string_attrs_t sa;
+
+ scrub_ansi_string(bad_bold, &sa);
+ printf("bad bold2: '%s'\n",
+ fmt::format(FMT_STRING("{:?}"), bad_bold).c_str());
+ assert(bad_bold == "test ra\bc not\b\b\ball ");
+ }
+
{
char input[] = "Hello, \x1b[33;mWorld\x1b[0;m!";
@@ -56,6 +101,13 @@ main(int argc, char* argv[])
}
{
+ std::string bad_bold = "^_\x8b\b ";
+ string_attrs_t sa;
+
+ scrub_ansi_string(bad_bold, &sa);
+ }
+
+ {
std::string boldish
= "\u2022\b\u2022\u2023\b\u2023 h\bhe\bel\blo\bo _\ba_\bb_\bc a\b_ "
"b";
@@ -82,17 +134,61 @@ main(int argc, char* argv[])
}
}
}
+ {
+ string_attrs_t sa;
+ string str_cp;
+
+ str_cp = "Hello, World!";
+ scrub_ansi_string(str_cp, &sa);
+
+ assert(str_cp == "Hello, World!");
+ assert(sa.empty());
+
+ str_cp = "Hello\x1b[44;m, \x1b[33;mWorld\x1b[0;m!";
+ scrub_ansi_string(str_cp, &sa);
+ assert(str_cp == "Hello, World!");
+ printf("%s\n", str_cp.c_str());
+ for (const auto& attr : sa) {
+ printf(" attr %d:%d %s %s\n",
+ attr.sa_range.lr_start,
+ attr.sa_range.lr_end,
+ attr.sa_type->sat_name,
+ string_fragment::from_str_range(
+ str_cp, attr.sa_range.lr_start, attr.sa_range.lr_end)
+ .to_string()
+ .c_str());
+ }
+ }
- string_attrs_t sa;
- string str_cp;
+ {
+ // "•]8;;http://example.com•\This_is_a_link•]8;;•\_"
+ auto hlink = std::string(
+ "\033]8;;http://example.com\033\\This is a "
+ "link\033]8;;\033\\\n");
+
+ auto al = attr_line_t();
+ attr_line_builder alb(al);
- str_cp = "Hello, World!";
- scrub_ansi_string(str_cp, &sa);
+ alb.append_as_hexdump(hlink);
+ printf("%s\n", al.get_string().c_str());
- assert(str_cp == "Hello, World!");
- assert(sa.empty());
+ string_attrs_t sa;
+ scrub_ansi_string(hlink, &sa);
- str_cp = "Hello\x1b[44;m, \x1b[33;mWorld\x1b[0;m!";
- scrub_ansi_string(str_cp, &sa);
- assert(str_cp == "Hello, World!");
+ printf("hlink %d %d %s", hlink.size(), sa.size(), hlink.c_str());
+ assert(sa.size() == 3);
+ for (const auto& attr : sa) {
+ printf("attr %d:%d %s\n",
+ attr.sa_range.lr_start,
+ attr.sa_range.lr_end,
+ attr.sa_type->sat_name);
+ if (attr.sa_type == &VC_HYPERLINK) {
+ printf(" value: %s\n",
+ attr.sa_value.get<std::string>().c_str());
+ }
+ if (attr.sa_type == &SA_ORIGIN_OFFSET) {
+ printf(" value: %lld\n", attr.sa_value.get<int64_t>());
+ }
+ }
+ }
}
diff --git a/test/test_cli.sh b/test/test_cli.sh
index be773f5..195f8bc 100644
--- a/test/test_cli.sh
+++ b/test/test_cli.sh
@@ -5,7 +5,7 @@ export YES_COLOR=1
run_cap_test ${lnav_test} -n -c 'foo'
-run_cap_test ${lnav_test} -d /tmp/lnav.err -t -n <<EOF
+run_cap_test ${lnav_test} -d /tmp/lnav.err -n <<EOF
Hello, World!
Goodbye, World!
EOF
@@ -29,3 +29,33 @@ printf "a\ba _\ba a\b_" | run_cap_test env TEST_COMMENT="overstrike bold" \
grep abcd textfile_long_lines.0 | run_cap_test \
${lnav_test} -n -d /tmp/lnav.err \
-c ';SELECT filepath, lines FROM lnav_file'
+
+export HOME="./piper-config"
+rm -rf ./piper-config
+mkdir -p $HOME/.lnav
+
+${lnav_test} -Nn -c ':config /tuning/piper/max-size 128'
+
+cat ${test_dir}/logfile_haproxy.0 | run_cap_test \
+ env TEST_COMMENT="stdin rotation" ${lnav_test} -n
+
+export HOME="./mgmt-config"
+rm -rf ./mgmt-config
+mkdir -p $HOME/.lnav
+run_cap_test ${lnav_test} -m -I ${test_dir} config get
+
+run_cap_test ${lnav_test} -m -I ${test_dir} config blame
+
+export TMPDIR="piper-tmp"
+rm -rf ./piper-tmp
+run_cap_test ${lnav_test} -n -e 'echo hi'
+
+run_cap_test ${lnav_test} -m piper list
+
+PIPER_URL=$(env NO_COLOR=1 ${lnav_test} -m -q piper list | tail -1 | sed -r -e 's;.*(piper://[^ ]+).*;\1;g')
+
+run_cap_test ${lnav_test} -n $PIPER_URL
+
+run_cap_test ${lnav_test} -n $PIPER_URL \
+ -c ";SELECT filepath, descriptor, mimetype, jget(content, '/ctime') as ctime, jget(content, '/cwd') as cwd FROM lnav_file_metadata" \
+ -c ':write-json-to -'
diff --git a/test/test_cmds.sh b/test/test_cmds.sh
index 5cb0a43..5103f79 100644
--- a/test/test_cmds.sh
+++ b/test/test_cmds.sh
@@ -1,6 +1,38 @@
#! /bin/bash
+export TZ=UTC
export YES_COLOR=1
+export DUMP_CRASH=1
+
+run_cap_test ${lnav_test} -n \
+ -c ":goto 0" \
+ -c ":convert-time-to bad-zone" \
+ ${test_dir}/logfile_access_log.0
+
+run_cap_test ${lnav_test} -n \
+ -c ":goto 0" \
+ -c ":convert-time-to America/Los_Angeles" \
+ ${test_dir}/logfile_access_log.0
+
+run_cap_test ${lnav_test} -nN \
+ -c ";SELECT ':echo Hello' || char(10) || ':echo World' AS cmds" \
+ -c ':eval ${cmds}'
+
+run_cap_test ${lnav_test} -nN \
+ -c ":cd /bad-dir"
+
+run_cap_test ${lnav_test} -nN \
+ -c ":cd ${test_dir}/logfile_access_log.0"
+
+run_cap_test ${lnav_test} -nN \
+ -c ":cd ${test_dir}" \
+ -c ":open logfile_access_log.0"
+
+run_cap_test ${lnav_test} -nN \
+ -e "echo Hello, World!"
+
+run_cap_test ${lnav_test} -nN \
+ -e "echo Hello, World! > /dev/stderr"
run_cap_test ${lnav_test} -n \
-c ":switch-to-view help" \
@@ -30,6 +62,10 @@ run_cap_test env TZ=UTC ${lnav_test} -n \
-c ":unix-time 1612072409" \
"${test_dir}/logfile_access_log.*"
+#run_cap_test env TZ=UTC ${lnav_test} -n \
+# -c ":unix-time 16120724091612072409" \
+# "${test_dir}/logfile_access_log.*"
+
run_cap_test env TZ=UTC ${lnav_test} -n \
-c ":current-time" \
"${test_dir}/logfile_access_log.*"
@@ -143,6 +179,10 @@ run_cap_test ${lnav_test} -n \
-c ":hide-fields access_log.c_ip access_log.cs_uri_stem" \
${test_dir}/logfile_access_log.0
+run_cap_test ${lnav_test} -n \
+ -c ':hide-fields log_time log_level' \
+ ${test_dir}/logfile_generic.0
+
run_cap_test ${lnav_test} -f- -n < ${test_dir}/formats/scripts/multiline-echo.lnav
run_cap_test ${lnav_test} -n \
@@ -375,6 +415,12 @@ run_cap_test ${lnav_test} -n \
${test_dir}/logfile_access_log.0
run_cap_test ${lnav_test} -n \
+ -I ${test_dir} \
+ -c ":goto 5" \
+ -c ":pipe-line-to echo \$log_raw_text \$log_level \$user" \
+ ${test_dir}/logfile_json.json
+
+run_cap_test ${lnav_test} -n \
-c ":switch-to-view pretty" \
${test_dir}/textfile_json_one_line.0
diff --git a/test/test_config.sh b/test/test_config.sh
index 4722abb..e186bb5 100755
--- a/test/test_config.sh
+++ b/test/test_config.sh
@@ -37,3 +37,6 @@ run_cap_test ${lnav_test} -W -n \
run_cap_test ${lnav_test} -nN \
-c ":reset-config /bad/path"
+
+run_cap_test ${lnav_test} -n -I ${test_dir} \
+ hw://seattle/finn
diff --git a/test/test_date_time_scanner.cc b/test/test_date_time_scanner.cc
index 8a85993..c19d9c8 100644
--- a/test/test_date_time_scanner.cc
+++ b/test/test_date_time_scanner.cc
@@ -30,11 +30,24 @@
#include <assert.h>
#include <locale.h>
+#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
#include "../src/lnav_util.hh"
#include "base/date_time_scanner.hh"
#include "config.h"
+#include "doctest/doctest.h"
+#include "lnav_config.hh"
+#include "ptimec.hh"
static const char* GOOD_TIMES[] = {
+ "2023-08-11T00:59:36.208491Z",
+ "09/Aug/2023:21:41:44 +0000",
+ "2022-08-27T17:22:01.694554+03:00",
+ "2022-08-27T17:22:01.694554+0300",
+ "2022-08-27T17:22:01.694554+00:00",
+ "2022-08-27T17:22:01.694554+0000",
+ "2022-08-27T17:22:01.694554Z",
+ "2022-08-27 17:22:01.694554 UTC",
+ "2022-08-27 17:22:01.694554 GMT",
"2017 May 08 Mon 18:57:57.578",
"May 01 00:00:01",
"May 10 12:00:01",
@@ -53,11 +66,11 @@ static const char* BAD_TIMES[] = {
"@4000000043",
};
-int
-main(int argc, char* argv[])
+TEST_CASE("date_time_scanner")
{
setenv("TZ", "UTC", 1);
+ lnav_config.lc_log_date_time.c_zoned_to_local = false;
for (const auto* good_time : GOOD_TIMES) {
date_time_scanner dts;
struct timeval tv;
@@ -65,16 +78,71 @@ main(int argc, char* argv[])
const char* rc;
rc = dts.scan(good_time, strlen(good_time), nullptr, &tm, tv);
+ CHECK(dts.dts_zoned_to_local == false);
printf("ret %s %p\n", good_time, rc);
assert(rc != nullptr);
char ts[64];
- gmtime_r(&tv.tv_sec, &tm.et_tm);
dts.ftime(ts, sizeof(ts), nullptr, tm);
+ printf("fmt %s\n", PTIMEC_FORMATS[dts.dts_fmt_lock].pf_fmt);
printf("orig %s\n", good_time);
printf("loop %s\n", ts);
- assert(strcmp(ts, good_time) == 0);
+ CHECK(std::string(ts) == std::string(good_time));
+ }
+
+ {
+ const auto sf
+ = string_fragment::from_const("2014-02-11 16:12:34.123.456");
+ struct timeval tv;
+ struct exttm tm;
+ date_time_scanner dts;
+ const auto* rc = dts.scan(sf.data(), sf.length(), nullptr, &tm, tv);
+ CHECK((tm.et_flags & ETF_MILLIS_SET));
+ CHECK(std::string(rc) == sf.substr(23).to_string());
+
+ char ts[64];
+ dts.ftime(ts, sizeof(ts), nullptr, tm);
+
+ CHECK(std::string(ts) == std::string("2014-02-11 16:12:34.123"));
+ }
+
+ {
+ const auto sf
+ = string_fragment::from_const("2014-02-11 16:12:34.12345Z");
+ struct timeval tv;
+ struct exttm tm;
+ date_time_scanner dts;
+ const auto* rc = dts.scan(sf.data(), sf.length(), nullptr, &tm, tv);
+ printf("fmt %s\n", PTIMEC_FORMAT_STR[dts.dts_fmt_lock]);
+ CHECK(rc != nullptr);
+ CHECK((tm.et_flags & ETF_MICROS_SET));
+ CHECK(*rc == '\0');
+
+ char ts[64];
+ dts.ftime(ts, sizeof(ts), nullptr, tm);
+
+ CHECK(std::string(ts) == std::string("2014-02-11 16:12:34.123450Z"));
+ }
+
+ {
+ const auto sf
+ = string_fragment::from_const("Tue Jul 25 12:01:01 AM UTC 2023");
+ struct timeval tv;
+ struct exttm tm;
+ date_time_scanner dts;
+ const auto* rc = dts.scan(sf.data(), sf.length(), nullptr, &tm, tv);
+ printf("fmt %s\n", PTIMEC_FORMAT_STR[dts.dts_fmt_lock]);
+ CHECK(rc != nullptr);
+ CHECK((tm.et_flags & ETF_ZONE_SET));
+ CHECK((tm.et_flags & ETF_Z_IS_UTC));
+ CHECK(*rc == '\0');
+
+ char ts[64];
+ dts.ftime(ts, sizeof(ts), nullptr, tm);
+
+ CHECK(std::string(ts)
+ == std::string("Tue Jul 25 12:01:01 AM UTC 2023"));
}
{
diff --git a/test/test_events.sh b/test/test_events.sh
index 2266c4b..494284e 100644
--- a/test/test_events.sh
+++ b/test/test_events.sh
@@ -4,6 +4,7 @@ rm -rf events-home
mkdir -p events-home
export HOME=events-home
export YES_COLOR=1
+export TZ=UTC
run_cap_test ${lnav_test} -n \
-c ';SELECT json(content) as content FROM lnav_events' \
diff --git a/test/test_format_installer.sh b/test/test_format_installer.sh
index 2b94d3d..764f879 100644
--- a/test/test_format_installer.sh
+++ b/test/test_format_installer.sh
@@ -8,6 +8,7 @@ rm -rf "${CONFIG_DIR}/.lnav/formats"
HOME=${CONFIG_DIR}
unset XDG_CONFIG_HOME
export HOME
+export YES_COLOR=1
${lnav_test} -i ${srcdir}/formats/jsontest/format.json
@@ -16,6 +17,19 @@ if ! test -f ${CONFIG_DIR}/.lnav/formats/installed/test_log.json; then
exit 1
fi
+run_cap_test ${lnav_test} -i ${srcdir}/formats/jsontest/format.json
+
+echo corrupt > ${CONFIG_DIR}/.lnav/formats/installed/test_log.json
+
+run_cap_test env TEST_COMMENT='overwrite file' ${lnav_test} -i ${srcdir}/formats/jsontest/format.json
+
+if ! test -f ${CONFIG_DIR}/.lnav/formats/installed/test_log.json.bak; then
+ echo "Format not backed up correctly?"
+ exit 1
+fi
+
+run_cap_test ${lnav_test} -i /non-existent/file
+
if test x"${TEST_GIT_INSTALL}" = x""; then
# Hitting the git repos frequently is slow/noisy
exit 0
diff --git a/test/test_gantt.sh b/test/test_gantt.sh
new file mode 100644
index 0000000..b64c130
--- /dev/null
+++ b/test/test_gantt.sh
@@ -0,0 +1,43 @@
+#! /bin/bash
+
+export YES_COLOR=1
+
+export TZ=UTC
+
+run_cap_test ${lnav_test} -n \
+ -c ':switch-to-view gantt' \
+ ${test_dir}/logfile_generic.0
+
+run_cap_test ${lnav_test} -n \
+ -c ':switch-to-view gantt' \
+ ${test_dir}/logfile_bro_http.log.0
+
+run_cap_test ${lnav_test} -n \
+ -c ':switch-to-view gantt' \
+ -c ':filter-in CdysLK1XpcrXOpVDuh' \
+ ${test_dir}/logfile_bro_http.log.0
+
+run_cap_test ${lnav_test} -n \
+ -c ':switch-to-view gantt' \
+ -c ':filter-out CdysLK1XpcrXOpVDuh' \
+ ${test_dir}/logfile_bro_http.log.0
+
+run_cap_test ${lnav_test} -n \
+ -c ':switch-to-view gantt' \
+ -c ':hide-file *' \
+ ${test_dir}/logfile_bro_http.log.0
+
+run_cap_test ${lnav_test} -n \
+ -c ':switch-to-view gantt' \
+ -c ':close *' \
+ ${test_dir}/logfile_bro_http.log.0
+
+run_cap_test ${lnav_test} -n \
+ -c ':switch-to-view gantt' \
+ -c ':hide-lines-before 2011-11-03 00:19:37' \
+ ${test_dir}/logfile_bro_http.log.0
+
+run_cap_test ${lnav_test} -n \
+ -c ':switch-to-view gantt' \
+ -c ':hide-lines-after 2011-11-03 00:20:30' \
+ ${test_dir}/logfile_bro_http.log.0
diff --git a/test/test_json_format.sh b/test/test_json_format.sh
index 435e8e3..d56f0c8 100644
--- a/test/test_json_format.sh
+++ b/test/test_json_format.sh
@@ -1,5 +1,6 @@
#! /bin/bash
+export TZ=UTC
export YES_COLOR=1
# journald json log format is not working"
@@ -154,3 +155,9 @@ run_cap_test ${lnav_test} -n \
run_cap_test ${lnav_test} -n \
-c ':show-fields RayID' \
${test_dir}/logfile_cloudflare.json
+
+run_cap_test ${lnav_test} -n \
+ ${test_dir}/logfile_nextcloud.0
+
+run_cap_test ${lnav_test} -n \
+ ${test_dir}/gharchive_log.jsonl
diff --git a/test/test_logfile.sh b/test/test_logfile.sh
index 86e26c9..0fe2908 100644
--- a/test/test_logfile.sh
+++ b/test/test_logfile.sh
@@ -1,5 +1,6 @@
#! /bin/bash
+export TZ=UTC
echo ${top_srcdir}
echo ${top_builddir}
@@ -9,6 +10,9 @@ printf '#Date:\t20\x800-2-02\n0\n' | run_cap_test \
printf '000\n000\n#Fields: 0\n0\n#Fields: 0\n0' | run_cap_test \
env TEST_COMMENT="invalid w3c log" ${lnav_test} -n
+printf '#Date:\t3/9/3/0\x85 2\n0\n' | run_cap_test \
+ env TEST_COMMENT="invalid w3c timestamp" ${lnav_test} -n
+
cat > rollover_in.0 <<EOF
2600/2 0 00:00:00 0:
00:2 0 00:00:00 0:
@@ -37,17 +41,18 @@ run_cap_test ${lnav_test} -n \
-c ';SELECT * FROM logline' \
${test_dir}/logfile_block.1
-run_test ${lnav_test} -d /tmp/lnav.err -n -w logfile_stdin.0.log \
- -c ':shexec sleep 1 && touch -t 200711030923 logfile_stdin.0.log' <<EOF
-2013-06-06T19:13:20.123 Hi
-EOF
+if test x"${TSHARK_CMD}" != x""; then
+ run_test env TZ=UTC ${lnav_test} -n ${test_dir}/dhcp.pcapng
-check_output "piping to stdin is not working?" <<EOF
-2013-06-06T19:13:20.123 Hi
+ check_output "pcap file is not recognized" <<EOF
+2004-12-05T19:16:24.317 0.0.0.0 → 255.255.255.255 DHCP 314 DHCP Discover - Transaction ID 0x3d1d
+2004-12-05T19:16:24.317 192.168.0.1 → 192.168.0.10 DHCP 342 DHCP Offer - Transaction ID 0x3d1d
+2004-12-05T19:16:24.387 0.0.0.0 → 255.255.255.255 DHCP 314 DHCP Request - Transaction ID 0x3d1e
+2004-12-05T19:16:24.387 192.168.0.1 → 192.168.0.10 DHCP 342 DHCP ACK - Transaction ID 0x3d1e
EOF
-if test x"${TSHARK_CMD}" != x""; then
- run_test env TZ=UTC ${lnav_test} -n ${test_dir}/dhcp.pcapng
+ # make sure piped binary data is left alone
+ run_test cat ${test_dir}/dhcp.pcapng | env TZ=UTC ${lnav_test} -n
check_output "pcap file is not recognized" <<EOF
2004-12-05T19:16:24.317 0.0.0.0 → 255.255.255.255 DHCP 314 DHCP Discover - Transaction ID 0x3d1d
@@ -59,7 +64,8 @@ EOF
run_test ${lnav_test} -n ${test_dir}/dhcp-trunc.pcapng
check_error_output "truncated pcap file is not recognized" <<EOF
-error: unable to open file: {test_dir}/dhcp-trunc.pcapng -- tshark: The file "{test_dir}/dhcp-trunc.pcapng" appears to have been cut short in the middle of a packet.
+✘ error: unable to open file: {test_dir}/dhcp-trunc.pcapng
+ reason: tshark: The file "{test_dir}/dhcp-trunc.pcapng" appears to have been cut short in the middle of a packet.
EOF
fi
@@ -377,8 +383,6 @@ TCF 2014-04-06 11:01:11.475557: 0: <--- R 2 ["P1"] <eom>
EOF
-# The TCSH format converts to local time, so we need to specify a TZ
-export TZ="UTC"
run_test ./drive_logfile -t -f tcsh_history ${srcdir}/logfile_tcsh_history.0
check_output "TCSH timestamp interpreted incorrectly?" <<EOF
@@ -396,6 +400,10 @@ Jul 20 22:59:29 2009 -- 000
Jul 20 22:59:29 2009 -- 000
EOF
+run_cap_test env TZ=America/Los_Angeles ./drive_logfile -t -f access_log ${srcdir}/logfile_access_log.0
+
+run_cap_test env TZ=America/Los_Angeles ${lnav_test} -n ${srcdir}/logfile_access_log.0
+
run_test ./drive_logfile -t -f generic_log ${srcdir}/logfile_tai64n.0
check_output "tai64n timestamps interpreted incorrectly?" <<EOF
@@ -543,6 +551,12 @@ error 0x0
error 0x0
EOF
+run_cap_test ./drive_logfile -t -f generic_log ${test_dir}/logfile_with_zones.0
+
+run_cap_test env TZ=America/Los_Angeles ./drive_logfile -t -f generic_log ${test_dir}/logfile_with_zones.0
+
+run_cap_test env TZ=America/New_York ./drive_logfile -t -f generic_log ${test_dir}/logfile_with_zones.0
+
touch -t 200711030923 ${srcdir}/logfile_glog.0
run_test ./drive_logfile -t -f glog_log ${srcdir}/logfile_glog.0
@@ -588,15 +602,6 @@ info 0x0
error 0x0
EOF
-run_test ${lnav_test} -d /tmp/lnav.err -nt -w logfile_stdin.log <<EOF
-Hi
-EOF
-
-check_output "piping to stdin is not working?" <<EOF
-2013-06-06T19:13:20.123 Hi
-2013-06-06T19:13:20.123 ---- END-OF-STDIN ----
-EOF
-
run_test ${lnav_test} -C ${test_dir}/logfile_bad_access_log.0
sed -ibak -e "s|/.*/logfile_bad_access_log.0|logfile_bad_access_log.0|g" `test_err_filename`
@@ -635,8 +640,8 @@ EOF
run_test ${lnav_test} -n -I ${test_dir} ${srcdir}/logfile_epoch.0
check_output "rewriting machine-oriented timestamp didn't work?" <<EOF
-2015-04-10 02:58:07.123000 Hello, World!
-2015-04-10 02:58:07.456000 Goodbye, World!
+2015-04-10 02:58:07.123 Hello, World!
+2015-04-10 02:58:07.456 Goodbye, World!
EOF
run_test ${lnav_test} -n -I ${test_dir} ${srcdir}/logfile_crlf.0
@@ -705,3 +710,29 @@ run_cap_test ${lnav_test} -n \
run_cap_test ${lnav_test} -n \
-c ':filter-in Air Mob' \
${test_dir}/logfile_ansi.1
+
+export HOME="./file-tz"
+rm -rf "./file-tz"
+mkdir -p $HOME
+
+touch -t 200711030000 ${srcdir}/logfile_syslog.0
+
+run_cap_test ${lnav_test} -n \
+ -c ':set-file-timezone America/Los_Angeles' \
+ ${test_dir}/logfile_syslog.0
+
+# make sure the file options were saved and restored
+run_cap_test ${lnav_test} -n \
+ ${test_dir}/logfile_syslog.0
+
+run_cap_test ${lnav_test} -n \
+ -c ";SELECT options_path, options FROM lnav_file" \
+ ${test_dir}/logfile_syslog.0
+
+run_cap_test ${lnav_test} -n \
+ -c ':set-file-timezone America/New_York' \
+ ${test_dir}/logfile_syslog.0
+
+run_cap_test ${lnav_test} -n \
+ -c ':set-file-timezone bad' \
+ ${test_dir}/logfile_syslog.0
diff --git a/test/test_meta.sh b/test/test_meta.sh
index caab4f9..e57a30c 100644
--- a/test/test_meta.sh
+++ b/test/test_meta.sh
@@ -2,6 +2,7 @@
export YES_COLOR=1
+export TZ=UTC
export HOME="./meta-sessions"
export XDG_CONFIG_HOME="./meta-sessions/.config"
rm -rf "./meta-sessions"
@@ -108,3 +109,28 @@ run_cap_test ${lnav_test} -n -f- \
This is `markdown` now!
EOF
+
+run_cap_test ${lnav_test} -n \
+ -c ":goto 46" \
+ -c ":tag bro-test" \
+ -c ":save-session" \
+ -c ";SELECT log_line, log_tags FROM bro_http_log WHERE log_tags IS NOT NULL" \
+ ${test_dir}/logfile_bro_http.log.0
+
+run_cap_test ${lnav_test} -n \
+ -c ":load-session" \
+ -c ";SELECT log_line, log_tags FROM bro_http_log WHERE log_tags IS NOT NULL" \
+ ${test_dir}/logfile_bro_http.log.0
+
+run_cap_test ${lnav_test} -n \
+ -c ";UPDATE access_log SET log_annotations = '1' WHERE log_line = 0" \
+ ${test_dir}/logfile_access_log.0
+
+run_cap_test ${lnav_test} -n \
+ -c ";UPDATE access_log SET log_annotations = '{\"abc\": \"def\"' WHERE log_line = 0" \
+ ${test_dir}/logfile_access_log.0
+
+run_cap_test ${lnav_test} -n \
+ -c ";UPDATE access_log SET log_annotations = '{\"abc\": \"def\"}' WHERE log_line = 0" \
+ -c ";SELECT log_line,log_annotations FROM access_log WHERE log_annotations IS NOT NULL" \
+ ${test_dir}/logfile_access_log.0
diff --git a/test/test_prql.sh b/test/test_prql.sh
new file mode 100644
index 0000000..bc27908
--- /dev/null
+++ b/test/test_prql.sh
@@ -0,0 +1,17 @@
+#! /bin/bash
+
+export TZ=UTC
+export YES_COLOR=1
+unset XDG_CONFIG_HOME
+
+run_cap_test ${lnav_test} -n \
+ -c ";from access_log | take 1" \
+ ${test_dir}/logfile_access_log.0
+
+run_cap_test ${lnav_test} -n \
+ -c ";from access_log | take abc" \
+ ${test_dir}/logfile_access_log.0
+
+run_cap_test ${lnav_test} -n \
+ -c ";from bro_http_log | stats.hist bro_host slice:'1m'" \
+ ${test_dir}/logfile_bro_http.log.0
diff --git a/test/test_sessions.sh b/test/test_sessions.sh
index db71e5f..7e5b830 100644
--- a/test/test_sessions.sh
+++ b/test/test_sessions.sh
@@ -1,5 +1,6 @@
#! /bin/bash
+export TZ=UTC
export HOME="./sessions"
unset XDG_CONFIG_HOME
rm -rf "./sessions"
@@ -77,6 +78,14 @@ run_cap_test ${lnav_test} -n \
-c ':write-csv-to -' \
${test_dir}/logfile_access_log.0
+# partition name was not saved in session and doesn't not show up in crumbs
+run_cap_test ${lnav_test} -n \
+ -c ":load-session" \
+ -c ':goto 2' \
+ -c ";SELECT top_meta FROM lnav_views WHERE name = 'log'" \
+ -c ':write-json-to -' \
+ ${test_dir}/logfile_access_log.0
+
# adjust time is not working
run_cap_test ${lnav_test} -nq \
-c ":adjust-log-time 2010-01-01T00:00:00" \
@@ -117,3 +126,31 @@ run_cap_test ${lnav_test} -n -d /tmp/lnav.err \
-c ":load-session" \
-c ":test-comment restore hidden lines" \
${test_dir}/logfile_access_log.0
+
+# hiding fields failed
+export TZ="UTC"
+rm -rf ./sessions
+mkdir -p $HOME
+run_cap_test ${lnav_test} -n \
+ -c ":hide-fields bro_uid" \
+ -c ":goto -10" \
+ -c ":save-session" \
+ ${test_dir}/logfile_bro_http.log.0
+
+# restoring hidden fields failed
+run_cap_test ${lnav_test} -n \
+ -c ":load-session" \
+ -c ":goto -10" \
+ -c ":test-comment restoring hidden fields" \
+ ${test_dir}/logfile_bro_http.log.0
+
+export TEST_ANNO=1
+run_cap_test ${lnav_test} -d /tmp/lnav.err -I ${test_dir} -n \
+ -c ':annotate' \
+ -c ':save-session' \
+ support-dump/logfile_access_log.0
+
+run_cap_test ${lnav_test} -d /tmp/lnav.err -I ${test_dir} -n \
+ -c ':load-session' \
+ -c ':export-session-to -' \
+ support-dump/logfile_access_log.0
diff --git a/test/test_shlexer.sh b/test/test_shlexer.sh
index 747de95..e05cc50 100644
--- a/test/test_shlexer.sh
+++ b/test/test_shlexer.sh
@@ -30,3 +30,5 @@ run_cap_test ./drive_shlexer 'abc $DEF 123'
run_cap_test ./drive_shlexer '~ foo'
run_cap_test ./drive_shlexer '~nonexistent/bar baz'
+
+run_cap_test ./drive_shlexer 'abc '
diff --git a/test/test_sql.sh b/test/test_sql.sh
index 369351c..6abb5ad 100644
--- a/test/test_sql.sh
+++ b/test/test_sql.sh
@@ -1,5 +1,6 @@
#! /bin/bash
+export TZ=UTC
export YES_COLOR=1
lnav_test="${top_builddir}/src/lnav-test"
@@ -29,118 +30,26 @@ run_cap_test ${lnav_test} -n \
cp ${srcdir}/logfile_syslog.2 logfile_syslog_test.2
touch -t 201511030923 logfile_syslog_test.2
-run_test ${lnav_test} -n \
+run_cap_test ${lnav_test} -n \
-c ";SELECT *, log_msg_schema FROM all_logs" \
-c ":write-csv-to -" \
logfile_syslog_test.2
-check_output "all_logs does not work?" <<EOF
-log_line,log_part,log_time,log_idle_msecs,log_level,log_mark,log_comment,log_tags,log_filters,log_msg_format,log_msg_schema
-0,<NULL>,2015-11-03 09:23:38.000,0,info,0,<NULL>,<NULL>,<NULL>,# is up,aff2bfc3c61e7b86329b83190f0912b3
-1,<NULL>,2015-11-03 09:23:38.000,0,info,0,<NULL>,<NULL>,<NULL>,# is up,aff2bfc3c61e7b86329b83190f0912b3
-2,<NULL>,2015-11-03 09:23:38.000,0,info,0,<NULL>,<NULL>,<NULL>,# is down,506560b3c73dee057732e69a3c666718
-EOF
-
-
-run_test ${lnav_test} -n \
+run_cap_test ${lnav_test} -n \
-c ";SELECT fields FROM logfmt_log" \
-c ":write-json-to -" \
${test_dir}/logfile_logfmt.0
-check_output "logfmt fields are not handled correctly?" <<EOF
-[
- {
- "fields": {
- "namespace": "inc-1-enh-domain-c14-ns-2",
- "pod": "hello-inc-1-enh-domain-c14-ns-2-3-d8f465685-k75gp",
- "reason": "",
- "status": "Pending"
- }
- },
- {
- "fields": {
- "error": "pod inc-1-domain-c14-ns-6/fe-inc-1-domain-c14-ns-6-5-656d9bb695-4584b is not found: PodNotFound",
- "namespace": "inc-1-domain-c14-ns-6",
- "pod": "fe-inc-1-domain-c14-ns-6-5-656d9bb695-4584b",
- "uid": "be2def59-3a08-42fd-8f84-6f64cfcefa93"
- }
- },
- {
- "fields": {
- "namespace": "inc-1-domain-c14-ns-6",
- "pod": "fe-inc-1-domain-c14-ns-6-5-656d9bb695-4584b",
- "uid": "be2def59-3a08-42fd-8f84-6f64cfcefa93"
- }
- },
- {
- "fields": {
- "namespace": "inc-1-domain-c14-ns-6",
- "pod": "fe-inc-1-domain-c14-ns-6-5-656d9bb695-4584b",
- "uid": "be2def59-3a08-42fd-8f84-6f64cfcefa93"
- }
- },
- {
- "fields": {
- "namespace": "inc-1-enh-domain-c14-ns-2",
- "pod": "hello-inc-1-enh-domain-c14-ns-2-7-5ddd6bcd69-6rqct",
- "reason": "",
- "status": "Pending"
- }
- }
-]
-EOF
-
-
-run_test ${lnav_test} -n \
+run_cap_test ${lnav_test} -n \
-c ";SELECT sc_substatus FROM w3c_log" \
-c ":write-json-to -" \
${test_dir}/logfile_w3c.3
-check_output "w3c quoted strings are not handled correctly?" <<EOF
-[
- {
- "sc_substatus": 0
- },
- {
- "sc_substatus": 0
- },
- {
- "sc_substatus": null
- }
-]
-EOF
-
-run_test ${lnav_test} -n \
+run_cap_test ${lnav_test} -n \
-c ";SELECT cs_headers FROM w3c_log" \
-c ":write-json-to -" \
${test_dir}/logfile_w3c.3
-check_output "w3c headers are not captured?" <<EOF
-[
- {
- "cs_headers": {
- "User-Agent": "Mozilla/5.0 (Linux; Android 4.4.4; SM-G900V Build/KTU84P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.59 Mobile Safari/537.36",
- "Referer": "http://example.com/Search/SearchResults.pg?informationRecipient.languageCode.c=en",
- "Host": "xzy.example.com"
- }
- },
- {
- "cs_headers": {
- "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2227.1 Safari/537.36",
- "Referer": null,
- "Host": "example.hello.com"
- }
- },
- {
- "cs_headers": {
- "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 Safari/537.36",
- "Referer": null,
- "Host": "hello.example.com"
- }
- }
-]
-EOF
-
run_cap_test ${lnav_test} -n \
-c ";SELECT * FROM generate_series()" \
${test_dir}/logfile_access_log.0
@@ -158,34 +67,16 @@ run_cap_test ${lnav_test} -n \
-c ";SELECT raise_error('oops!')" \
${test_dir}/logfile_access_log.0
-run_test ${lnav_test} -n \
+run_cap_test ${lnav_test} -n \
-c ";SELECT basename(filepath) as name, content, length(content) FROM lnav_file" \
-c ":write-csv-to -" \
${test_dir}/logfile_empty.0
-check_output "empty content not handled correctly?" <<EOF
-name,content,length(content)
-logfile_empty.0,,0
-EOF
-
-run_test ${lnav_test} -n \
+run_cap_test ${lnav_test} -n \
-c ";SELECT distinct xp.node_text FROM lnav_file, xpath('//author', content) as xp" \
-c ":write-csv-to -" \
${test_dir}/books.xml
-check_output "xpath on file content not working?" <<EOF
-node_text
-"Gambardella, Matthew"
-"Ralls, Kim"
-"Corets, Eva"
-"Randall, Cynthia"
-"Thurman, Paula"
-"Knorr, Stefan"
-"Kress, Peter"
-"O'Brien, Tim"
-"Galos, Mike"
-EOF
-
gzip -c ${srcdir}/logfile_json.json > logfile_json.json.gz
dd if=logfile_json.json.gz of=logfile_json-trunc.json.gz bs=64 count=2
@@ -212,7 +103,7 @@ ts
2013-09-06T22:00:59.124817Z
2013-09-06T22:00:59.124817Z
2013-09-06T22:00:59.124817Z
-2013-09-06T22:00:59.124817Z
+2013-09-06 22:01:00Z
2013-09-06T22:01:49.124817Z
2013-09-06T22:01:49.124817Z
2013-09-06T22:01:49.124817Z
@@ -263,10 +154,10 @@ run_test ${lnav_test} -n \
check_output "time_offset in lnav_file table is not reordering?" <<EOF
Wed May 19 12:00:01 2021 line 1
/abc/def
-Wed May 19 12:00:02 UTC 2021 line 2
+Wed May 19 12:00:02 +0000 2021 line 2
Wed May 19 12:00:03 2021 line 3
/ghi/jkl
-Wed May 19 12:00:04 UTC 2021 line 4
+Wed May 19 12:00:04 +0000 2021 line 4
EOF
@@ -280,15 +171,20 @@ EOF
run_cap_test ${lnav_test} -n \
-c ":goto 2" \
- -c ";SELECT log_top_line()" \
+ -c ";SELECT log_top_line(), log_msg_line()" \
${test_dir}/logfile_uwsgi.0
run_cap_test ${lnav_test} -n \
-c ":goto 2" \
- -c ";SELECT log_top_line()" \
+ -c ";SELECT log_top_line(), log_msg_line()" \
${test_dir}/logfile_empty.0
run_cap_test ${lnav_test} -n \
+ -c ":goto 1" \
+ -c ";SELECT log_top_line(), log_msg_line()" \
+ ${test_dir}/logfile_multiline.0
+
+run_cap_test ${lnav_test} -n \
-c ":goto 2" \
-c ";SELECT log_top_datetime()" \
${test_dir}/logfile_uwsgi.0
@@ -317,49 +213,21 @@ s_runtime
0.01
EOF
-run_test env TZ=UTC ${lnav_test} -n \
+run_cap_test env TZ=UTC ${lnav_test} -n \
-c ";SELECT bro_conn_log.bro_duration as duration, bro_conn_log.bro_uid, group_concat( distinct (bro_method || ' ' || bro_host)) as req from bro_http_log, bro_conn_log where bro_http_log.bro_uid = bro_conn_log.bro_uid group by bro_http_log.bro_uid order by duration desc limit 10" \
-c ":write-csv-to -" \
${test_dir}/logfile_bro_http.log.0 ${test_dir}/logfile_bro_conn.log.0
-check_output "bro logs are not recognized?" <<EOF
-duration,bro_uid,req
-116.438679,CwFs1P2UcUdlSxD2La,GET www.reddit.com
-115.202498,CdZUPH2DKOE7zzCLE3,GET feeds.bbci.co.uk
-115.121914,CdrfXZ1NOFPEawF218,GET c.thumbs.redditmedia.com
-115.121837,CoX7zA3OJKGUOSCBY2,GET e.thumbs.redditmedia.com
-115.12181,CJxSUgkInyKSHiju1,GET e.thumbs.redditmedia.com
-115.121506,CT0JIh479jXIGt0Po1,GET f.thumbs.redditmedia.com
-115.121339,CJwUi9bdB9c1lLW44,GET f.thumbs.redditmedia.com
-115.119217,C6Q4Vm14ZJIlZhsXqk,GET a.thumbs.redditmedia.com
-72.274459,CbNCgO1MzloHRNeY4f,GET www.google.com
-71.658218,CnGze54kQWWpKqrrZ4,GET ajax.googleapis.com
-EOF
-
-run_test env TZ=UTC ${lnav_test} -n \
+run_cap_test env TZ=UTC ${lnav_test} -n \
-c ";SELECT * FROM bro_http_log LIMIT 5" \
-c ":write-csv-to -" \
${test_dir}/logfile_bro_http.log.0
-check_output "bro logs are not recognized?" <<EOF
-log_line,log_part,log_time,log_idle_msecs,log_level,log_mark,log_comment,log_tags,log_filters,bro_ts,bro_uid,bro_id_orig_h,bro_id_orig_p,bro_id_resp_h,bro_id_resp_p,bro_trans_depth,bro_method,bro_host,bro_uri,bro_referrer,bro_version,bro_user_agent,bro_request_body_len,bro_response_body_len,bro_status_code,bro_status_msg,bro_info_code,bro_info_msg,bro_tags,bro_username,bro_password,bro_proxied,bro_orig_fuids,bro_orig_filenames,bro_orig_mime_types,bro_resp_fuids,bro_resp_filenames,bro_resp_mime_types
-0,<NULL>,2011-11-03 00:19:26.452,0,info,0,<NULL>,<NULL>,<NULL>,1320279566.452687,CwFs1P2UcUdlSxD2La,192.168.2.76,52026,132.235.215.119,80,1,GET,www.reddit.com,/,<NULL>,1.1,Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20100101 Firefox/7.0.1,0,109978,200,OK,<NULL>,<NULL>,,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,Ftw3fJ2JJF3ntMTL2,<NULL>,text/html
-1,<NULL>,2011-11-03 00:19:26.831,379,info,0,<NULL>,<NULL>,<NULL>,1320279566.831619,CJxSUgkInyKSHiju1,192.168.2.76,52030,72.21.211.173,80,1,GET,e.thumbs.redditmedia.com,/E-pbDbmiBclPkDaX.jpg,http://www.reddit.com/,1.1,Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20100101 Firefox/7.0.1,0,2300,200,OK,<NULL>,<NULL>,,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,FFTf9Zdgk3YkfCKo3,<NULL>,image/jpeg
-2,<NULL>,2011-11-03 00:19:26.831,0,info,0,<NULL>,<NULL>,<NULL>,1320279566.831563,CJwUi9bdB9c1lLW44,192.168.2.76,52029,72.21.211.173,80,1,GET,f.thumbs.redditmedia.com,/BP5bQfy4o-C7cF6A.jpg,http://www.reddit.com/,1.1,Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20100101 Firefox/7.0.1,0,2272,200,OK,<NULL>,<NULL>,,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,FfXtOj3o7aub4vbs2j,<NULL>,image/jpeg
-3,<NULL>,2011-11-03 00:19:26.831,0,info,0,<NULL>,<NULL>,<NULL>,1320279566.831473,CoX7zA3OJKGUOSCBY2,192.168.2.76,52027,72.21.211.173,80,1,GET,e.thumbs.redditmedia.com,/SVUtep3Rhg5FTRn4.jpg,http://www.reddit.com/,1.1,Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20100101 Firefox/7.0.1,0,2562,200,OK,<NULL>,<NULL>,,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,F21Ybs3PTqS6O4Q2Zh,<NULL>,image/jpeg
-4,<NULL>,2011-11-03 00:19:26.831,0,info,0,<NULL>,<NULL>,<NULL>,1320279566.831643,CT0JIh479jXIGt0Po1,192.168.2.76,52031,72.21.211.173,80,1,GET,f.thumbs.redditmedia.com,/uuy31444rLSyKdHS.jpg,http://www.reddit.com/,1.1,Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20100101 Firefox/7.0.1,0,1595,200,OK,<NULL>,<NULL>,,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,Fdk0MZ1wQmKWAJ4WH4,<NULL>,image/jpeg
-EOF
-
-run_test env TZ=UTC ${lnav_test} -n \
+run_cap_test env TZ=UTC ${lnav_test} -n \
-c ";SELECT * FROM bro_http_log WHERE log_level = 'error'" \
-c ":write-csv-to -" \
${test_dir}/logfile_bro_http.log.0
-check_output "bro logs are not recognized?" <<EOF
-log_line,log_part,log_time,log_idle_msecs,log_level,log_mark,log_comment,log_tags,log_filters,bro_ts,bro_uid,bro_id_orig_h,bro_id_orig_p,bro_id_resp_h,bro_id_resp_p,bro_trans_depth,bro_method,bro_host,bro_uri,bro_referrer,bro_version,bro_user_agent,bro_request_body_len,bro_response_body_len,bro_status_code,bro_status_msg,bro_info_code,bro_info_msg,bro_tags,bro_username,bro_password,bro_proxied,bro_orig_fuids,bro_orig_filenames,bro_orig_mime_types,bro_resp_fuids,bro_resp_filenames,bro_resp_mime_types
-118,<NULL>,2011-11-03 00:19:49.337,18,error,0,<NULL>,<NULL>,<NULL>,1320279589.337053,CBHHuR1xFnm5C5CQBc,192.168.2.76,52074,74.125.225.76,80,1,GET,i4.ytimg.com,/vi/gDbg_GeuiSY/hqdefault.jpg,<NULL>,1.1,Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20100101 Firefox/7.0.1,0,893,404,Not Found,<NULL>,<NULL>,,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,F2GiAw3j1m22R2yIg2,<NULL>,image/jpeg
-EOF
-
run_test ${lnav_test} -n \
-c ';select log_time from access_log where log_line > 100000' \
-c ':switch-to-view db' \
@@ -417,7 +285,7 @@ run_cap_test ${lnav_test} -n \
-c ':spectrogram c_ip' \
${test_dir}/logfile_access_log.0
-run_cap_test env TZ=UTC LC_NUMERIC=C ${lnav_test} -n \
+run_cap_test env TZ=UTC LC_ALL=C ${lnav_test} -n \
-c ':spectrogram bro_response_body_len' \
${test_dir}/logfile_bro_http.log.0
@@ -493,59 +361,29 @@ log_line,log_part
EOF
-run_test ${lnav_test} -n \
+run_cap_test ${lnav_test} -n \
-I "${top_srcdir}/test" \
-c ";select * from web_status" \
-c ':write-csv-to -' \
${test_dir}/logfile_access_log.0
-check_output "access_log table is not working" <<EOF
-group_concat(cs_uri_stem),sc_status
-"/vmw/cgi/tramp,/vmw/vSphere/default/vmkernel.gz",200
-/vmw/vSphere/default/vmkboot.gz,404
-EOF
-
-
-run_test ${lnav_test} -n \
+run_cap_test ${lnav_test} -n \
-c ";select * from access_log" \
-c ':write-csv-to -' \
${test_dir}/logfile_access_log.0
-check_output "access_log table is not working" <<EOF
-log_line,log_part,log_time,log_idle_msecs,log_level,log_mark,log_comment,log_tags,log_filters,c_ip,cs_method,cs_referer,cs_uri_query,cs_uri_stem,cs_user_agent,cs_username,cs_version,sc_bytes,sc_status,cs_host
-0,<NULL>,2009-07-20 22:59:26.000,0,info,0,<NULL>,<NULL>,<NULL>,192.168.202.254,GET,-,<NULL>,/vmw/cgi/tramp,gPXE/0.9.7,-,HTTP/1.0,134,200,<NULL>
-1,<NULL>,2009-07-20 22:59:29.000,3000,error,0,<NULL>,<NULL>,<NULL>,192.168.202.254,GET,-,<NULL>,/vmw/vSphere/default/vmkboot.gz,gPXE/0.9.7,-,HTTP/1.0,46210,404,<NULL>
-2,<NULL>,2009-07-20 22:59:29.000,0,info,0,<NULL>,<NULL>,<NULL>,192.168.202.254,GET,-,<NULL>,/vmw/vSphere/default/vmkernel.gz,gPXE/0.9.7,-,HTTP/1.0,78929,200,<NULL>
-EOF
-
-
-run_test ${lnav_test} -n \
+run_cap_test ${lnav_test} -n \
-c ";select * from access_log where log_level >= 'warning'" \
-c ':write-csv-to -' \
${test_dir}/logfile_access_log.0
-check_output "loglevel collator is not working" <<EOF
-log_line,log_part,log_time,log_idle_msecs,log_level,log_mark,log_comment,log_tags,log_filters,c_ip,cs_method,cs_referer,cs_uri_query,cs_uri_stem,cs_user_agent,cs_username,cs_version,sc_bytes,sc_status,cs_host
-1,<NULL>,2009-07-20 22:59:29.000,3000,error,0,<NULL>,<NULL>,<NULL>,192.168.202.254,GET,-,<NULL>,/vmw/vSphere/default/vmkboot.gz,gPXE/0.9.7,-,HTTP/1.0,46210,404,<NULL>
-EOF
-
-
# XXX The timestamp on the file is used to determine the year for syslog files.
touch -t 200711030923 ${test_dir}/logfile_syslog.0
-run_test ${lnav_test} -n \
+run_cap_test ${lnav_test} -n \
-c ";select * from syslog_log" \
-c ':write-csv-to -' \
${test_dir}/logfile_syslog.0
-check_output "syslog_log table is not working" <<EOF
-log_line,log_part,log_time,log_idle_msecs,log_level,log_mark,log_comment,log_tags,log_filters,log_hostname,log_msgid,log_pid,log_pri,log_procname,log_struct,log_syslog_tag,syslog_version
-0,<NULL>,2007-11-03 09:23:38.000,0,error,0,<NULL>,<NULL>,<NULL>,veridian,<NULL>,7998,<NULL>,automount,<NULL>,automount[7998],<NULL>
-1,<NULL>,2007-11-03 09:23:38.000,0,info,0,<NULL>,<NULL>,<NULL>,veridian,<NULL>,16442,<NULL>,automount,<NULL>,automount[16442],<NULL>
-2,<NULL>,2007-11-03 09:23:38.000,0,error,0,<NULL>,<NULL>,<NULL>,veridian,<NULL>,7999,<NULL>,automount,<NULL>,automount[7999],<NULL>
-3,<NULL>,2007-11-03 09:47:02.000,1404000,info,0,<NULL>,<NULL>,<NULL>,veridian,<NULL>,<NULL>,<NULL>,sudo,<NULL>,sudo,<NULL>
-EOF
-
-
run_test ${lnav_test} -n \
-c ";select * from syslog_log where log_time >= NULL" \
-c ':write-csv-to -' \
@@ -736,8 +574,8 @@ check_output "schema view is not working" <<EOF
ATTACH DATABASE '' AS 'main';
CREATE VIRTUAL TABLE environ USING environ_vtab_impl();
CREATE VIRTUAL TABLE lnav_static_files USING lnav_static_file_vtab_impl();
-CREATE VIRTUAL TABLE lnav_views USING lnav_views_impl();
CREATE VIRTUAL TABLE lnav_view_filter_stats USING lnav_view_filter_stats_impl();
+CREATE VIRTUAL TABLE lnav_views USING lnav_views_impl();
CREATE VIRTUAL TABLE lnav_view_files USING lnav_view_files_impl();
CREATE VIRTUAL TABLE lnav_view_stack USING lnav_view_stack_impl();
CREATE VIRTUAL TABLE lnav_view_filters USING lnav_view_filters_impl();
@@ -816,58 +654,19 @@ log_line,log_part
2,<NULL>
EOF
+# test the partitions defined in the format
+run_cap_test ${lnav_test} -n \
+ -I ${test_dir} \
+ -c ";SELECT log_line, log_part, log_body FROM syslog_log" \
+ -c ":write-csv-to -" \
+ ${test_dir}/logfile_partitions.0
-run_test ${lnav_test} -n \
+run_cap_test ${lnav_test} -n \
-c ";SELECT * FROM openam_log" \
-c ":write-json-to -" \
${test_dir}/logfile_openam.0
-check_output "write-json-to isn't working?" <<EOF
-[
- {
- "log_line": 0,
- "log_part": null,
- "log_time": "2014-06-15 01:04:52.000",
- "log_idle_msecs": 0,
- "log_level": "info",
- "log_mark": 0,
- "log_comment": null,
- "log_tags": null,
- "log_filters": null,
- "contextid": "82e87195d704585501",
- "data": "http://localhost:8086|/|<samlp:Response xmlns:samlp=\"urn:oasis:names:tc:SAML:2.0:protocol\" ID=\"s2daac0735bf476f4560aab81104b623bedfb0cbc0\" InResponseTo=\"84cbf2be33f6410bbe55877545a93f02\" Version=\"2.0\" IssueInstant=\"2014-06-15T01:04:52Z\" Destination=\"http://localhost:8086/api/1/rest/admin/org/530e42ccd6f45fd16d0d0717/saml/consume\"><saml:Issuer xmlns:saml=\"urn:oasis:names:tc:SAML:2.0:assertion\">http://openam.vagrant.dev/openam</saml:Issuer><samlp:Status xmlns:samlp=\"urn:oasis:names:tc:SAML:2.0:protocol\">\\\\n<samlp:StatusCode xmlns:samlp=\"urn:oasis:names:tc:SAML:2.0:protocol\"\\\\nValue=\"urn:oasis:names:tc:SAML:2.0:status:Success\">\\\\n</samlp:StatusCode>\\\\n</samlp:Status><saml:Assertion xmlns:saml=\"urn:oasis:names:tc:SAML:2.0:assertion\" ID=\"s2a0bee0da937e236167e99b209802056033816ac2\" IssueInstant=\"2014-06-15T01:04:52Z\" Version=\"2.0\">\\\\n<saml:Issuer>http://openam.vagrant.dev/openam</saml:Issuer><ds:Signature xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\">\\\\n<ds:SignedInfo>\\\\n<ds:CanonicalizationMethod Algorithm=\"http://www.w3.org/2001/10/xml-exc-c14n#\"/>\\\\n<ds:SignatureMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#rsa-sha1\"/>\\\\n<ds:Reference URI=\"#s2a0bee0da937e236167e99b209802056033816ac2\">\\\\n<ds:Transforms>\\\\n<ds:Transform Algorithm=\"http://www.w3.org/2000/09/xmldsig#enveloped-signature\"/>\\\\n<ds:Transform Algorithm=\"http://www.w3.org/2001/10/xml-exc-c14n#\"/>\\\\n</ds:Transforms>\\\\n<ds:DigestMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#sha1\"/>\\\\n<ds:DigestValue>4uSmVzjovUdQd3px/RcnoxQBsqE=</ds:DigestValue>\\\\n</ds:Reference>\\\\n</ds:SignedInfo>\\\\n<ds:SignatureValue>\\\\nhm/grge36uA6j1OWif2bTcvVTwESjmuJa27NxepW0AiV5YlcsHDl7RAIk6k/CjsSero3bxGbm56m\\\\nYncOEi9F1Tu7dS0bfx+vhm/kKTPgwZctf4GWn4qQwP+KeoZywbNj9ShsYJ+zPKzXwN4xBSuPjMxP\\\\nNf5szzjEWpOndQO/uDs=\\\\n</ds:SignatureValue>\\\\n<ds:KeyInfo>\\\\n<ds:X509Data>\\\\n<ds:X509Certificate>\\\\nMIICQDCCAakCBEeNB0swDQYJKoZIhvcNAQEEBQAwZzELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNh\\\\nbGlmb3JuaWExFDASBgNVBAcTC1NhbnRhIENsYXJhMQwwCgYDVQQKEwNTdW4xEDAOBgNVBAsTB09w\\\\nZW5TU08xDTALBgNVBAMTBHRlc3QwHhcNMDgwMTE1MTkxOTM5WhcNMTgwMTEyMTkxOTM5WjBnMQsw\\\\nCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEUMBIGA1UEBxMLU2FudGEgQ2xhcmExDDAK\\\\nBgNVBAoTA1N1bjEQMA4GA1UECxMHT3BlblNTTzENMAsGA1UEAxMEdGVzdDCBnzANBgkqhkiG9w0B\\\\nAQEFAAOBjQAwgYkCgYEArSQc/U75GB2AtKhbGS5piiLkmJzqEsp64rDxbMJ+xDrye0EN/q1U5Of+\\\\nRkDsaN/igkAvV1cuXEgTL6RlafFPcUX7QxDhZBhsYF9pbwtMzi4A4su9hnxIhURebGEmxKW9qJNY\\\\nJs0Vo5+IgjxuEWnjnnVgHTs1+mq5QYTA7E6ZyL8CAwEAATANBgkqhkiG9w0BAQQFAAOBgQB3Pw/U\\\\nQzPKTPTYi9upbFXlrAKMwtFf2OW4yvGWWvlcwcNSZJmTJ8ARvVYOMEVNbsT4OFcfu2/PeYoAdiDA\\\\ncGy/F2Zuj8XJJpuQRSE6PtQqBuDEHjjmOQJ0rV/r8mO1ZCtHRhpZ5zYRjhRC9eCbjx9VrFax0JDC\\\\n/FfwWigmrW0Y0Q==\\\\n</ds:X509Certificate>\\\\n</ds:X509Data>\\\\n</ds:KeyInfo>\\\\n</ds:Signature><saml:Subject>\\\\n<saml:NameID Format=\"urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress\" NameQualifier=\"http://openam.vagrant.dev/openam\">user@example.com</saml:NameID><saml:SubjectConfirmation Method=\"urn:oasis:names:tc:SAML:2.0:cm:bearer\">\\\\n<saml:SubjectConfirmationData InResponseTo=\"84cbf2be33f6410bbe55877545a93f02\" NotOnOrAfter=\"2014-06-15T01:14:52Z\" Recipient=\"http://localhost:8086/api/1/rest/admin/org/530e42ccd6f45fd16d0d0717/saml/consume\"/></saml:SubjectConfirmation>\\\\n</saml:Subject><saml:Conditions NotBefore=\"2014-06-15T00:54:52Z\" NotOnOrAfter=\"2014-06-15T01:14:52Z\">\\\\n<saml:AudienceRestriction>\\\\n<saml:Audience>http://localhost:8086</saml:Audience>\\\\n</saml:AudienceRestriction>\\\\n</saml:Conditions>\\\\n<saml:AuthnStatement AuthnInstant=\"2014-06-15T01:00:25Z\" SessionIndex=\"s2f9b4d4b453d12b40ef3905cc959cdb40579c2301\"><saml:AuthnContext><saml:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport</saml:AuthnContextClassRef></saml:AuthnContext></saml:AuthnStatement></saml:Assertion></samlp:Response>",
- "domain": "dc=openam",
- "hostname": "192.168.33.1\t",
- "ipaddr": "Not Available",
- "loggedby": "cn=dsameuser,ou=DSAME Users,dc=openam",
- "loginid": "id=openamuser,ou=user,dc=openam",
- "messageid": "SAML2-37",
- "modulename": "SAML2.access",
- "nameid": "user@example.com"
- },
- {
- "log_line": 1,
- "log_part": null,
- "log_time": "2014-06-15 01:04:52.000",
- "log_idle_msecs": 0,
- "log_level": "trace",
- "log_mark": 0,
- "log_comment": null,
- "log_tags": null,
- "log_filters": null,
- "contextid": "ec5708a7f199678a01",
- "data": "vagrant|/",
- "domain": "dc=openam",
- "hostname": "127.0.1.1\t",
- "ipaddr": "Not Available",
- "loggedby": "cn=dsameuser,ou=DSAME Users,dc=openam",
- "loginid": "cn=dsameuser,ou=DSAME Users,dc=openam",
- "messageid": "COT-22",
- "modulename": "COT.access",
- "nameid": "Not Available"
- }
-]
-EOF
+touch -t 200711030000 ${srcdir}/logfile_for_join.0
run_cap_test ${lnav_test} -d "/tmp/lnav.err" -n \
-c ";select log_line, col_0 from logline" \
@@ -952,18 +751,11 @@ unset LNAVSECURE
touch -t 201503240923 ${test_dir}/logfile_syslog_with_access_log.0
-run_test ${lnav_test} -n -d /tmp/lnav.err \
+run_cap_test ${lnav_test} -n -d /tmp/lnav.err \
-c ";select * from access_log" \
-c ':write-csv-to -' \
${test_dir}/logfile_syslog_with_access_log.0
-check_output "access_log not found within syslog file" <<EOF
-log_line,log_part,log_time,log_idle_msecs,log_level,log_mark,log_comment,log_tags,log_filters,c_ip,cs_method,cs_referer,cs_uri_query,cs_uri_stem,cs_user_agent,cs_username,cs_version,sc_bytes,sc_status,cs_host
-1,<NULL>,2015-03-24 14:02:50.000,6927348000,info,0,<NULL>,<NULL>,<NULL>,127.0.0.1,GET,<NULL>,<NULL>,/includes/js/combined-javascript.js,<NULL>,-,HTTP/1.1,65508,200,<NULL>
-2,<NULL>,2015-03-24 14:02:50.000,0,error,0,<NULL>,<NULL>,<NULL>,127.0.0.1,GET,<NULL>,<NULL>,/bad.foo,<NULL>,-,HTTP/1.1,65508,404,<NULL>
-EOF
-
-
run_test ${lnav_test} -n \
-c ";select log_text from generic_log" \
-c ":write-json-to -" \
@@ -1095,3 +887,7 @@ run_cap_test ${lnav_test} -n \
run_cap_test ${lnav_test} -Nn \
-c ";select *,case match_index when 2 then replicate('abc', 1000) else '' end from regexp_capture_into_json('10;50;50;50;', '(\d+);')"
+
+run_cap_test ${lnav_test} -n \
+ -c ";.msgformats" \
+ ${test_dir}/logfile_for_join.0
diff --git a/test/test_sql_anno.sh b/test/test_sql_anno.sh
index e09c312..74af141 100644
--- a/test/test_sql_anno.sh
+++ b/test/test_sql_anno.sh
@@ -48,3 +48,9 @@ run_cap_test ./drive_sql_anno \
"SELECT * from vmw_log, regexp_capture(log_body, '--> /SessionStats/SessionPool/Session/(?<line>[abc]+)')"
run_cap_test ./drive_sql_anno "SELECT * FROM foo.bar"
+
+run_cap_test ./drive_sql_anno "SELECT json_object('abc', 'def') ->> '$.abc'"
+
+run_cap_test ./drive_sql_anno "SELECT 0x77, 123, 123e4"
+
+run_cap_test ./drive_sql_anno "from access_log | filter cs_method == 'GET' || cs_method == 'PUT'"
diff --git a/test/test_sql_fs_func.sh b/test/test_sql_fs_func.sh
index e3da92b..7955c57 100644
--- a/test/test_sql_fs_func.sh
+++ b/test/test_sql_fs_func.sh
@@ -51,3 +51,9 @@ run_cap_test ./drive_sql "select joinpath('foo')"
run_cap_test ./drive_sql "select joinpath('foo', 'bar', 'baz')"
run_cap_test ./drive_sql "select joinpath('foo', 'bar', 'baz', '/root')"
+
+run_cap_test ${lnav_test} -Nn -c ";SELECT shell_exec('echo hi')"
+
+run_cap_test ${lnav_test} -Nn -c ";SELECT * FROM fstat('/non-existent')"
+
+run_cap_test ${lnav_test} -Nn -c ";SELECT * FROM fstat('/*.non-existent')"
diff --git a/test/test_sql_indexes.sh b/test/test_sql_indexes.sh
index 951c7a6..763e234 100644
--- a/test/test_sql_indexes.sh
+++ b/test/test_sql_indexes.sh
@@ -1,5 +1,6 @@
#! /bin/bash
+export TZ=UTC
export YES_COLOR=1
# XXX sqlite reports different results for the "detail" column, so we
@@ -43,3 +44,7 @@ run_cap_test ${lnav_test} -n \
run_cap_test ${lnav_test} -n \
-c ";SELECT * FROM all_logs WHERE log_level > 'error'" \
${test_dir}/logfile_access_log.*
+
+run_cap_test ${lnav_test} -n \
+ -c ";SELECT * FROM all_logs WHERE log_line <= 20" \
+ ${test_dir}/logfile_access_log.*
diff --git a/test/test_sql_regexp.sh b/test/test_sql_regexp.sh
index 23d0425..06d7457 100644
--- a/test/test_sql_regexp.sh
+++ b/test/test_sql_regexp.sh
@@ -29,4 +29,14 @@ run_cap_test ${lnav_test} -nN \
-c ";SELECT * from regexp_capture('abc=def;ghi=jkl;', '^(\w+)=([^;]+);')"
run_cap_test ${lnav_test} -nN \
+ -c ";SELECT * from regexp_capture('abc=def;ghi=jkl;', '^(')"
+
+run_cap_test ${lnav_test} -nN \
-c ";SELECT * from regexp_capture_into_json('abc=def;ghi=jkl;', '^(\w+)=([^;]+);')"
+
+run_cap_test ${lnav_test} -nN \
+ -c ";SELECT * from regexp_capture_into_json('abc=def;ghi=jkl;', '^(')"
+
+run_cap_test ${lnav_test} -n \
+ -c ";select regexp_replace(cs_uri_query, '.*rapidView=(\d+).*', '\1') from access_log;" \
+ ${test_dir}/logfile_regexp_access_log.0
diff --git a/test/test_sql_search_table.sh b/test/test_sql_search_table.sh
index bf5e71b..e1e1dbd 100644
--- a/test/test_sql_search_table.sh
+++ b/test/test_sql_search_table.sh
@@ -1,5 +1,6 @@
#! /bin/bash
+export TZ=UTC
export YES_COLOR=1
run_cap_test ${lnav_test} -n \
diff --git a/test/test_sql_str_func.sh b/test/test_sql_str_func.sh
index e4cb96b..816e260 100644
--- a/test/test_sql_str_func.sh
+++ b/test/test_sql_str_func.sh
@@ -1,5 +1,7 @@
#! /bin/bash
+export YES_COLOR=1
+
run_cap_test ./drive_sql "select length(gzip(1))"
run_cap_test ./drive_sql "select gunzip(gzip(1))"
@@ -109,6 +111,8 @@ run_cap_test ./drive_sql "SELECT encode('foo', null)"
run_cap_test ./drive_sql "SELECT encode(null, 'base64')"
+run_cap_test ./drive_sql "SELECT encode('hi' || char(10), 'hex')"
+
run_cap_test ./drive_sql "SELECT gunzip(decode(encode(gzip('Hello, World!'), 'base64'), 'base64'))"
#run_cap_test env TEST_COMMENT=invalid_url ./drive_sql <<'EOF'
@@ -143,6 +147,10 @@ run_cap_test env TEST_COMMENT=parse_url6 ./drive_sql <<'EOF'
SELECT parse_url('https://example.com/sea%26rch?flag&flag2&=def#frag1%20space')
EOF
+run_cap_test env TEST_COMMENT=parse_url7 ./drive_sql <<'EOF'
+SELECT parse_url('https://example.com/sea%26rch?flag&flag2&=def&flag3=abc+def#frag1%20space')
+EOF
+
run_cap_test env TEST_COMMENT=unparse_url3 ./drive_sql <<'EOF'
SELECT unparse_url(parse_url('https://example.com/search?flag'))
@@ -160,6 +168,26 @@ run_cap_test env TEST_COMMENT=unparse_url6 ./drive_sql <<'EOF'
SELECT unparse_url(parse_url('https://example.com/search?flag&flag2&=def#frag1%20space'))
EOF
+run_cap_test env TEST_COMMENT=unparse_url7 ./drive_sql <<'EOF'
+SELECT unparse_url(NULL)
+EOF
+
+run_cap_test env TEST_COMMENT=unparse_url8 ./drive_sql <<'EOF'
+SELECT unparse_url(123)
+EOF
+
+run_cap_test env TEST_COMMENT=unparse_url9 ./drive_sql <<'EOF'
+SELECT unparse_url('[1, 2, 3]')
+EOF
+
+run_cap_test env TEST_COMMENT=unparse_url10 ./drive_sql <<'EOF'
+SELECT unparse_url(json_object('unknown', 'abc'))
+EOF
+
+run_cap_test env TEST_COMMENT=unparse_url11 ./drive_sql <<'EOF'
+SELECT unparse_url('{}')
+EOF
+
run_cap_test ${lnav_test} -n \
-c ';SELECT log_body, extract(log_body) from vmw_log' \
-c ':write-json-to -' \
@@ -168,3 +196,6 @@ run_cap_test ${lnav_test} -n \
run_cap_test ${lnav_test} -n \
-c ';SELECT anonymize(bro_id_resp_h) FROM bro_http_log' \
${test_dir}/logfile_bro_http.log.0
+
+run_cap_test ${lnav_test} -nN \
+ -c ";SELECT humanize_id('foo'), humanize_id('bar')"
diff --git a/test/test_sql_time_func.sh b/test/test_sql_time_func.sh
index 181dd70..1e35bd9 100644
--- a/test/test_sql_time_func.sh
+++ b/test/test_sql_time_func.sh
@@ -69,3 +69,17 @@ run_cap_test ./drive_sql "select timediff('today', 'yesterday')"
# timeslice day
run_cap_test ./drive_sql "select timediff('foo', 'yesterday')"
+
+run_cap_test ./drive_sql "SELECT timezone('America/Los_Angeles', '2022-03-02T10:00')"
+
+run_cap_test ./drive_sql "SELECT timezone('America/Los_Angeles', '2022-03-02T10:20:30.400-0700')"
+
+run_cap_test ./drive_sql "SELECT timezone('America/Los_Angeles', '2022-04-02T10:20:30.400-0700')"
+
+run_cap_test ./drive_sql "SELECT timezone('America/New_York', '2022-03-02T10:20:30.400-0700')"
+
+run_cap_test ./drive_sql "SELECT timezone('UTC', '2022-03-02T10:20:30.400-0700')"
+
+run_cap_test ${lnav_test} -nN -c ";SELECT timezone('bad-zone', '2022-03-02T10:20:30.400-0700')"
+
+run_cap_test ${lnav_test} -nN -c ";SELECT timezone('UTC', '2022-03-02T10:20:30.400bad')"
diff --git a/test/test_sql_views_vtab.sh b/test/test_sql_views_vtab.sh
index 606a673..c1e4d29 100644
--- a/test/test_sql_views_vtab.sh
+++ b/test/test_sql_views_vtab.sh
@@ -1,5 +1,6 @@
#! /bin/bash
+export TZ=UTC
export YES_COLOR=1
unset XDG_CONFIG_HOME
@@ -121,7 +122,7 @@ run_test ${lnav_test} -n \
check_output "delete from lnav_views table works?" <<EOF
count(*)
-8
+9
EOF
@@ -133,7 +134,7 @@ run_test ${lnav_test} -n \
check_output "insert into lnav_views table works?" <<EOF
count(*)
-8
+9
EOF
run_cap_test ${lnav_test} -n \
@@ -177,3 +178,17 @@ run_cap_test ${lnav_test} -n \
-c ";SELECT top_meta FROM lnav_top_view" \
-c ":write-json-to -" \
${test_dir}/logfile_xml_msg.0
+
+run_cap_test ${lnav_test} -n -I ${test_dir} \
+ -c ";UPDATE lnav_views SET options = json_object('row-details', 'show') WHERE name = 'log'" \
+ -c ":goto 2" \
+ ${test_dir}/logfile_xml_msg.0
+
+run_cap_test ${lnav_test} -n -I ${test_dir} \
+ -c ";UPDATE lnav_views SET options = json_object('row-details', 'show') WHERE name = 'log'" \
+ -c ":goto 9" \
+ ${test_dir}/logfile_bunyan.0
+
+run_cap_test ${lnav_test} -n \
+ -c ";UPDATE lnav_views SET top_meta = json_object('file', 'bad') WHERE name = 'text'" \
+ ${test_dir}/textfile_ansi.0
diff --git a/test/test_sql_xml_func.sh b/test/test_sql_xml_func.sh
index 72f1b0c..51357eb 100644
--- a/test/test_sql_xml_func.sh
+++ b/test/test_sql_xml_func.sh
@@ -1,5 +1,7 @@
#! /bin/bash
+export YES_COLOR=1
+
run_cap_test ./drive_sql "SELECT * FROM xpath('/abc[', '<abc/>')"
run_cap_test ./drive_sql "SELECT * FROM xpath('/abc', '<abc')"
@@ -9,3 +11,11 @@ run_cap_test ./drive_sql "SELECT * FROM xpath('/abc/def', '<abc/>')"
run_cap_test ./drive_sql "SELECT * FROM xpath('/abc/def[@a=\"b\"]', '<abc><def/><def a=\"b\">ghi</def></abc>')"
run_cap_test ./drive_sql "SELECT * FROM xpath('/abc/def', '<abc><def>Hello &gt;</def></abc>')"
+
+run_cap_test ${lnav_test} -n \
+ -c ";SELECT * FROM xpath('/catalog', (SELECT content FROM lnav_file LIMIT 1))" \
+ ${test_dir}/invalid-books.xml
+
+run_cap_test ${lnav_test} -n \
+ -c ";SELECT * FROM xpath('/cat[alog', (SELECT content FROM lnav_file LIMIT 1))" \
+ ${test_dir}/books.xml
diff --git a/test/test_stubs.cc b/test/test_stubs.cc
index 7d273b3..ff18224 100644
--- a/test/test_stubs.cc
+++ b/test/test_stubs.cc
@@ -69,6 +69,11 @@ rebuild_indexes_repeatedly()
{
}
+void
+wait_for_pipers(nonstd::optional<timeval>)
+{
+}
+
readline_context::command_map_t lnav_commands;
namespace injector {
diff --git a/test/test_text_anonymizer.cc b/test/test_text_anonymizer.cc
index 162111f..d163085 100644
--- a/test/test_text_anonymizer.cc
+++ b/test/test_text_anonymizer.cc
@@ -59,7 +59,7 @@ TEST_CASE("url")
lnav::text_anonymizer ta;
CHECK(ta.next(string_fragment::from_const("retrieving https://bob:abc@example.com/fooooooo22/192.168.1.33/barrrrr44?abcdef=foobar&ghijkl=123456&bazzer&ip=192.168.1.2#heading-2")) ==
- "aback https://meerkat:67c93775f715ab8ab01178caf86713c6@achondroplasia.example.com/abaft22/10.0.0.1/abashed44?aberrant=abhorrent&abiding=123456&abject&ip=10.0.0.2#able-2");
+ "aback https://meerkat:67c93775f715ab8ab01178caf86713c6@achondroplasia.example.com/abaft22/10.0.0.1/abashed44?aberrant=abhorrent&abiding=123456&abject&ip=10.0.0.2#heading-2");
}
TEST_CASE("email")
@@ -127,5 +127,5 @@ TEST_CASE("xml")
lnav::text_anonymizer ta;
CHECK(ta.next(string_fragment::from_const("<o:gupdate xmlns:o=\"http://www.google.com/update2/request\" protocol=\"2.0\" version=\"KeystoneDaemon-1.2.0.7709\" ismachine=\"1\" requestid=\"{0DFDBCD1-5E29-4DFC-BD99-31A2397198FE}\">")) ==
- "<o:gupdate xmlns:o=\"http://achondroplasia.example.com/aback2/abandoned\" protocol=\"2.0\" version=\"Abashed-1.2.0.7709\" ismachine=\"1\" requestid=\"{1ca0a968-cbe9-e75b-d00b-4859609878ea}\">");
+ "<o:gupdate xmlns:o=\"http://achondroplasia.example.com/aback2/abandoned\" protocol=\"2.0\" version=\"KeystoneDaemon-1.2.0.7709\" ismachine=\"1\" requestid=\"{1ca0a968-cbe9-e75b-d00b-4859609878ea}\">");
}
diff --git a/test/test_text_file.sh b/test/test_text_file.sh
index 166f790..57ac32e 100644
--- a/test/test_text_file.sh
+++ b/test/test_text_file.sh
@@ -1,9 +1,15 @@
#! /bin/bash
+export TZ=UTC
export YES_COLOR=1
unset XDG_CONFIG_HOME
run_cap_test ${lnav_test} -n \
+ -c ':goto 5' \
+ -c ':filter-out Lorem|sed' \
+ ${test_dir}/textfile_plain.0
+
+run_cap_test ${lnav_test} -n \
${top_srcdir}/README.md
run_cap_test ${lnav_test} -n -c ':goto #screenshot' \
@@ -34,3 +40,85 @@ run_cap_test ${lnav_test} -n \
run_cap_test ${lnav_test} -n \
${test_dir}/textfile_ansi_expanding.0
+
+run_cap_test ${lnav_test} -n \
+ ${test_dir}/textfile_0.md
+
+run_cap_test ${lnav_test} -n \
+ ${test_dir}/pyfile_0.py
+
+run_cap_test ${lnav_test} -n \
+ ${test_dir}/man_echo.txt
+
+run_cap_test ${lnav_test} -n \
+ -c ";SELECT top_meta FROM lnav_views WHERE name = 'text'" \
+ -c ':write-json-to -' \
+ ${test_dir}/man_echo.txt
+
+run_cap_test ${lnav_test} -n \
+ -c ':goto 8' \
+ -c ";SELECT top_meta FROM lnav_views WHERE name = 'text'" \
+ -c ':write-json-to -' \
+ < ${test_dir}/man_echo.txt
+
+run_cap_test ${lnav_test} -n \
+ -c ':goto 6' \
+ -c ";SELECT top_meta FROM lnav_views WHERE name = 'text'" \
+ -c ':write-json-to -' \
+ < ${test_dir}/example.toml
+
+run_cap_test ${lnav_test} -n \
+ -c ':goto 9' \
+ -c ";SELECT top_meta FROM lnav_views WHERE name = 'text'" \
+ -c ':write-json-to -' \
+ < ${test_dir}/example.patch
+
+run_cap_test ${lnav_test} -n \
+ < ${top_srcdir}/autogen.sh
+
+run_cap_test ${lnav_test} -n \
+ -c ';SELECT content FROM lnav_file' \
+ ${test_dir}/textfile_nonl.txt
+
+run_cap_test ${lnav_test} -n \
+ -c ':goto 23' \
+ -c ';SELECT top_meta FROM lnav_top_view' \
+ -c ':write-json-to -' \
+ ${test_dir}/formats/jsontest/format.json
+
+run_cap_test ${lnav_test} -n \
+ -c ':goto 3' \
+ -c ':next-section' \
+ ${test_dir}/books.json
+
+run_cap_test ${lnav_test} -n \
+ -c ':goto 3' \
+ -c ':next-section' \
+ < ${test_dir}/books.json
+
+run_cap_test ${lnav_test} -n \
+ -c ':goto #/catalog/1/title' \
+ ${test_dir}/books.json
+
+run_cap_test ${lnav_test} -n \
+ -c ':goto #/catalog/1/title' \
+ < ${test_dir}/books.json
+
+echo "Hello, World!" | run_cap_test env TEST_COMMENT="piper crumbs" ${lnav_test} -n \
+ -c ';SELECT top_meta FROM lnav_top_view' \
+ -c ':write-json-to -'
+
+echo "Hello, World!" | run_cap_test \
+ env TEST_COMMENT="piper crumbs" TZ=America/Los_Angeles \
+ ${lnav_test} -n \
+ -c ';SELECT top_meta FROM lnav_top_view' \
+ -c ':write-json-to -'
+
+echo "Hello, World!" | run_cap_test \
+ env TEST_COMMENT="piper crumbs" TZ=America/Los_Angeles \
+ ${lnav_test} -nt
+
+${test_dir}/naughty_files.py
+run_cap_test ${lnav_test} -n naughty/file-with-hidden-text.txt
+
+run_cap_test ${lnav_test} -n naughty/file-with-terminal-controls.txt
diff --git a/test/textfile_0.md b/test/textfile_0.md
index 377e46f..7bda8e1 100644
--- a/test/textfile_0.md
+++ b/test/textfile_0.md
@@ -7,3 +7,54 @@
* One
* Two
* Three
+
+<img src="../docs/lnav-tui.png" />
+
+<img src="../docs/lnav-architecture.png" alt="The internal architecture of lnav" />
+
+<span style="color: #f00; font-weight: bold">Bold red</span>
+
+<span style="text-decoration: underline; background-color: darkblue">Underline</span>
+
+<pre>
+ Hello,
+ <span class="name">World</span>!
+</pre>
+
+Goodbye, <span style="border-left: solid cyan; border-right: dashed green">World</span>!
+
+```foolang
+foo bar bar
+baz "xyz"
+```
+
+```c
+/*
+ * This program prints "Hello, World!"
+ */
+
+#include <stdio.h>
+
+int main() {
+ printf("Hello, World!\n");
+}
+```
+
+```python
+def hw(name):
+ """
+ This function prints "Hello, <name>!"
+ """
+
+ print(f"Hello, {name}!") # test comment
+```
+
+```xml
+<?xml version="1.0" encoding="utf-8" ?>
+<books>
+ <!-- Line comment -->
+ <book id="100">
+ <author>Finnegan</author>
+ </book>
+</books>
+```
diff --git a/test/textfile_cjk.0 b/test/textfile_cjk.0
new file mode 100644
index 0000000..09c4899
--- /dev/null
+++ b/test/textfile_cjk.0
@@ -0,0 +1,3 @@
+一二三四五六七八九十Group1一二三四五六七八九十Group2一二三四五六七八九十Group3一二三四五六七八九十Group4一二三四五六七八九十Group5
+
+This is an example of a normally-behavioring text wrap example. All letters are ASCII and containing no CJK letters. \ No newline at end of file
diff --git a/test/textfile_nonl.txt b/test/textfile_nonl.txt
new file mode 100644
index 0000000..f2ba8f8
--- /dev/null
+++ b/test/textfile_nonl.txt
@@ -0,0 +1 @@
+abc \ No newline at end of file
diff --git a/test/textfile_plain.0 b/test/textfile_plain.0
new file mode 100644
index 0000000..f7ad1ef
--- /dev/null
+++ b/test/textfile_plain.0
@@ -0,0 +1,9 @@
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit,
+sed do eiusmod tempor incididunt ut labore et dolore magna
+aliqua. Ut enim ad minim veniam, quis nostrud exercitation
+ullamco laboris nisi ut aliquip ex ea commodo consequat.
+Duis aute irure dolor in reprehenderit in voluptate velit
+esse cillum dolore eu fugiat nulla pariatur. Excepteur
+sint occaecat cupidatat non proident, sunt in culpa qui
+officia deserunt mollit anim id est laborum.
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 3dce4e8..4d18c78 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -1,8 +1,13 @@
all-local: bin2c$(BUILD_EXEEXT)
+if CROSS_COMPILING
bin2c$(BUILD_EXEEXT): bin2c.c
- $(AM_V_CC) $(CC_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -g3 -o $@ $? -lz
+ $(AM_V_CC) $(CC_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -g3 -o $@ $? -lz -fPIE
+else
+bin2c: bin2c.c
+ $(AM_V_CC) $(CC) $(CPPFLAGS) $(LDFLAGS) -g3 -o $@ $? -lz -fPIE
+endif
EXTRA_DIST = \
bin2c.c
diff --git a/tools/bin2c.c b/tools/bin2c.c
index 2141bf0..b4286b0 100644
--- a/tools/bin2c.c
+++ b/tools/bin2c.c
@@ -11,6 +11,7 @@
# include <alloca.h>
#endif
+#include <assert.h>
#include <ctype.h>
#include <fcntl.h>
#include <getopt.h>
@@ -67,7 +68,7 @@ process(struct file_meta* fm, FILE* ofile)
}
unsigned char* buf = malloc(st.st_size);
- unsigned char* dest = malloc(st.st_size);
+ unsigned char* dest = malloc(st.st_size + 1024);
int fd = open(fm->fm_name, O_RDONLY);
if (fd == -1) {
@@ -80,8 +81,9 @@ process(struct file_meta* fm, FILE* ofile)
fm->fm_size += rc;
}
- uLongf destLen = st.st_size;
- compress(dest, &destLen, buf, st.st_size);
+ uLongf destLen = st.st_size + 1024;
+ int cres = compress(dest, &destLen, buf, st.st_size);
+ assert(cres == Z_OK);
fm->fm_compressed_size = destLen;
int c, col = 1;
diff --git a/update_expected_output.sh b/update_expected_output.sh
index ad416ee..57573eb 100755
--- a/update_expected_output.sh
+++ b/update_expected_output.sh
@@ -36,7 +36,7 @@ for fname in $(ls -t ${builddir}/*.cmd); do
fi
else
if ! cmp "${exp_stem}.out" "${stem}.out"; then
- diff -u "${exp_stem}.out" "${stem}.out"
+ diff --color=always -u "${exp_stem}.out" "${stem}.out"
if test x"${AUTO_APPROVE}" = x""; then
echo "Expected stdout is different, update with the above?"
select yn in "Yes" "No"; do
@@ -68,7 +68,7 @@ for fname in $(ls -t ${builddir}/*.cmd); do
fi
else
if ! cmp "${exp_stem}.err" "${stem}.err"; then
- diff -u "${exp_stem}.err" "${stem}.err"
+ diff --color=always -u "${exp_stem}.err" "${stem}.err"
if test x"${AUTO_APPROVE}" = x""; then
echo "Expected stderr is different, update with the above?"
select yn in "Yes" "No"; do