ridiculousfish
62b3ed17ba
Teach parser_t how to parse an argument list that contains newlines, for
...
complete -a support. Fixes #1369
2014-03-27 11:17:05 -07:00
ridiculousfish
31bf50b2d4
Equip syntax highlighting with a variant that does no disk I/O. Invoke
...
it after expanding an abbreviation, so that the expanded abbreviation
appears with (some) syntax highlighting.
2014-03-26 18:49:09 -07:00
ridiculousfish
0325c1ba65
Teach parse_util_detect_errors to report invalid builtins, as found in
...
issue #1252
2014-03-26 18:20:38 -07:00
ridiculousfish
f2a437bd3b
Merge branch 'master' into parser_cleanup
...
Conflicts:
parse_constants.h
parse_tree.h
2014-03-26 13:59:14 -07:00
ridiculousfish
7a7fb423b3
Remove some unused function declarations
2014-03-26 10:00:32 -07:00
ridiculousfish
d533c1b1c8
Second attempt to fix the build. config.h.in changes need to go in
...
configure.ac.
2014-03-25 20:23:58 -07:00
ridiculousfish
2db013a5fa
Hopeful fix for the build
2014-03-25 20:13:33 -07:00
ridiculousfish
9fece3fdf1
Space and time optimizations for parse_node_t. Reduced size from 48
...
bytes to 20 bytes.
2014-03-25 20:06:34 -07:00
ridiculousfish
b520a03c57
Prefer swap() member function to std::swap. We were hitting the
...
inefficient generic std::swap for some derived types.
2014-03-25 12:44:21 -07:00
ridiculousfish
a4cafaad2e
Turn on the new "ast" parser by default for execution.
...
This change replaces fish's execution model, and obviates much of
parser_t. Instead of parsing fish code into a sequence of
commands-arguments, this reifies syntactic constructs into a grammar,
builds a parse tree, and executes that. This provides a big
simplification and (sometimes) performance boost. fish while loops
become C++ while loops, etc.
There are some known regressions in error reporting, which ought to be
fixed in the soon-to-be-merged parser_cleanup branch. There's also
legitimate changes in edge cases. For example, `command builtin ...` now
executes a command called "builtin" instead of doing something else
weird. The most significant change is that syntactic elements must be
unexpected: for example, single quoting 'command' will now cause it to
not be recognized. This should be fixed soon.
Please open issues for any regressions you find!
2014-03-25 00:34:22 -07:00
ridiculousfish
0d64bbed46
Stop linking iconv, now that we have our own utf8 conversion routines
2014-03-23 13:29:57 -07:00
ridiculousfish
9718e70260
Naive reimplementation of utf2wcs and wcs2utf in
...
env_universal_common.cpp. These use the new utf8 functions exposed in
utf8.h. This will allow us to drop the iconv dependency.
2014-03-23 13:06:24 -07:00
Siteshwar Vashisht
a67dd9fbdd
Included missing stdint.h header in utf8.cpp
2014-03-23 15:09:43 +05:30
ridiculousfish
aabed8279e
Incorporate a modified UTF8 <-> wchar_t implementation from Alexey
...
Vatchenko (http://www.bsdua.org/libbsdua.html ) in preparation for
eliminating our dependency on iconv
2014-03-22 23:46:58 -07:00
ridiculousfish
06eb271bda
Changes full_escape to not generate \x escapes for non-ASCII characters.
...
Partially reverts 51de269
. Fixes #1225
2014-03-22 14:46:23 -07:00
ridiculousfish
12025e3050
Remove unused err_buff variable from parser_t
2014-03-22 01:04:49 -07:00
ridiculousfish
ad6367018b
Excise use of parser_t's error() functionality. Thread a
...
parse_error_list_t through all of the expand functions, enabling them to
report errors more directly. Improve aspects of error reporting for
expansion failures.
2014-03-21 17:13:33 -07:00
ridiculousfish
c71b168402
Remove current_tokenizer and current_tokenizer_pos from old parser
2014-03-20 21:32:03 -07:00
ridiculousfish
4deb46290d
Remove additional dead code from old parser
2014-03-20 21:32:03 -07:00
ridiculousfish
e5ef45e4c0
Rewrite parser_t::test_args and parser_t::eval_args to use new parser
2014-03-20 21:32:02 -07:00
ridiculousfish
e780637cf4
Add some tests for parse_util_detect_errors_in_argument
2014-03-20 21:32:02 -07:00
ridiculousfish
d659e55646
Correct the last keyword enum to reflect the actual last keyword
2014-03-20 21:32:02 -07:00
ridiculousfish
1c58b6d83e
Rewrite parser_t::eval_args to use new AST parser
2014-03-20 21:32:02 -07:00
ridiculousfish
1305c02579
Rewrite parser_t::current_line() to respect new parser
2014-03-20 21:32:02 -07:00
ridiculousfish
2c19ca0dbf
Fix for issue where pager contents may stay around if you executed a
...
command with pager contents visible
2014-03-20 21:32:02 -07:00
ridiculousfish
3cfdc6d126
Fix line number reporting in new parser
2014-03-20 21:32:02 -07:00
ridiculousfish
8ec73b2dd4
Removing some variables from parser_t that are no longer used in the new
...
execution model
2014-03-20 21:32:02 -07:00
jer-gentoo
5f11854286
Check for libtinfo after libncurses
...
See Gentoo bug 459768 (https://bugs.gentoo.org/show_bug.cgi?id=459768 )
Closes #1322 (https://github.com/fish-shell/fish-shell/pull/1322 ).
2014-03-19 11:29:22 +08:00
ridiculousfish
14f4e0e271
Fix for issue where pager contents may stay around if you executed a
...
command with pager contents visible
2014-03-16 16:49:31 -07:00
ridiculousfish
5c54ef7b0d
Merge branch 'master' into parser_cleanup
2014-03-15 20:24:25 -07:00
ridiculousfish
73c2846d64
Remove support for input IO_BUFFERs, which were only used by fish_pager
2014-03-15 19:49:55 -07:00
ridiculousfish
acd2038407
Remove old pager remnants, including documentation and references in the
...
build system
2014-03-15 14:24:05 -07:00
ridiculousfish
2442ae60db
Remove old fish_pager source and implementation
2014-03-15 14:00:18 -07:00
ridiculousfish
6c096191ba
Remove support for invoking old pager
2014-03-15 13:46:15 -07:00
ridiculousfish
20f9dd9a6b
Fix for extra newline that gets appended if a command is not found in
...
the new parser
2014-03-15 13:07:19 -07:00
David Adam
44e94b8cfa
ignore (generated) messages.pot
2014-03-13 21:56:56 +08:00
David Adam
8c21cf7761
translations: update new strings, convert all to UTF-8
2014-03-13 21:56:04 +08:00
David Adam
d2851cf5c5
translations: correct strings for fish_greeting default message
2014-03-13 21:16:35 +08:00
David Adam
b0716253a2
Makefile: assume UTF-8 in our codebase for translation generation
2014-03-13 21:16:35 +08:00
David Adam
eaf023b4d8
Makefile: separate messages.pot error lines
2014-03-13 21:16:35 +08:00
ridiculousfish
e47ad09130
Make contains
take the string by const reference again, for performance reasons
2014-03-11 12:43:52 +08:00
David Adam
689d0082d8
README.md: document build and runtime dependencies even better.
2014-03-10 10:09:52 +08:00
ridiculousfish
390a49072d
Reorganize keyword recognition in the parser to use a single table
2014-03-10 07:38:14 +08:00
Daniel J. Hofmann
7dc0b6f40b
Fixed various Undefined Behavior occurrences.
...
Conditionally uninitialized:
- builtin_commandline.cpp:577
- expand.cpp:869
- parse_util.cpp:1036
Initialization of POD structs:
- event.cpp:61
- autoload.cpp:22
References used with va_start:
- common.cpp:608:18
Found with clang-3.4's awesome -Wconditional-uninitialized,
-Wmissing-field-initializers and -Wvarargs.
2014-03-07 18:28:16 +01:00
ridiculousfish
79d14521db
Support for error detection in arguments in new parser. Restores error
...
reporting for bad arguments (e.g. with bad variable names)
2014-03-04 02:54:08 -08:00
ridiculousfish
8d6b0c8d76
Allow the caller to specify the goal node when parsing a string via the
...
new parser. This enables parsing either a job list or an argument list.
2014-03-04 02:54:08 -08:00
Konrad Borowski
1486774249
Force at least one line of output for set_color
.
...
This should fix #1323 .
2014-03-03 22:17:55 +01:00
ridiculousfish
1fa9167f25
Allow the caller to specify the goal node when parsing a string via the
...
new parser. This enables parsing either a job list or an argument list.
2014-03-02 16:03:05 -08:00
ridiculousfish
cc12225142
Clean up various block types and state as part of new parser
2014-03-02 13:46:30 -08:00
ridiculousfish
6b3a37c597
Remove obviated builtins and additional cleanup of old parser
2014-03-02 13:11:17 -08:00