aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Walker: Support string operations on arraysAndré Aparício2012-08-192-1/+18
| | | | | When a variable expansion applies some string operation like replace on the whole array, apply the operation to every element in the array.
* Parser&Walker: Support redirectionAndré Aparício2012-08-031-0/+35
| | | | | | | The order of the arguments for commands in the AST was changed, it was 'command_atom redirection', and now it's 'redirection command_atom'. This is due to the need of having the redirection set before evaluating the expression.
* Builtin: Support more options for declareAndré Aparício2012-07-203-5/+39
|
* Builtin: Support variable declarations in declareAndré Aparício2012-07-202-73/+106
|
* Replace boost::scoped_ptr with std::unique_ptrPetteri Räty2012-07-082-3/+2
| | | | | const std::unique_ptr provides everything that boost::scoped_ptr does so no need to rely on it.
* Builtin: Implement unset array supportAndré Aparício2012-07-083-1/+61
|
* Builtin: Implement set -u optionAndré Aparício2012-07-034-5/+87
|
* Builtin: Implement set builtinAndré Aparício2012-07-036-0/+188
|
* Builtin: implement read builtinAndré Aparício2012-07-034-0/+226
|
* Builtin: improve error output for some builtinsMu Qiao2012-05-265-15/+15
|
* Builtin: handle __export_funcs_var in inheritMu Qiao2012-05-261-3/+16
|
* Walker: support appending array to arrayMu Qiao2012-03-263-0/+23
|
* Builtin: fix argument handling of printf builtinMu Qiao2012-03-261-5/+15
|
* Parser&Walker: support literals in regular expMu Qiao2012-03-022-9/+12
|
* Doc: reduce doxygen warningsMu Qiao2011-08-043-7/+9
|
* Doc: improve \class documentationMu Qiao2011-08-0412-2/+54
|
* Build: install public headersMu Qiao2011-08-0325-487/+16
| | | | We need to put all public headers into the include directory.
* Walker: support expansions without colonMu Qiao2011-08-021-10/+9
|
* Builtin: reimplement the local built-inMu Qiao2011-08-026-10/+100
| | | | | | | Now the local built-in is not handled only in parser grammar so that expansions can happen for the arguments. '=' is not checked in the local and export built-in anymore because we do not generate empty AST for "export foo".
* Core: do not declare $* to be read-onlyMu Qiao2011-08-021-1/+1
| | | | $* can be shifted so it's not read-only.
* Parser&Walker: reimplement export built-inMu Qiao2011-08-025-0/+103
| | | | | Now export built-in will call back to parser grammar in order to support array definition.
* Core: raise exception when using local outside functionMu Qiao2011-08-021-0/+2
|
* Core: erase all \newline before parsingMu Qiao2011-08-022-8/+15
| | | | | | | | The \newline is treated as a line continuation. Handling \newline in the hidden channel is not ideal as it might break tokens. For example, " \newline " will emit two BLANK tokens, which is not what we want. Now \newline is erased before parsing. The drawback is it might not be right when handling single quoted string and comments.
* Walker: reimplement runtime for parameter expansionMu Qiao2011-07-202-0/+18
|
* Build: use bash to verify test scriptsMu Qiao2011-07-182-4/+6
| | | | | We keep the old style for some tests that behave differently depending on different bash versions.
* Parser: reduce backtracking for command_atomMu Qiao2011-07-063-4/+46
| | | | | Backtracking is reduced by left refactoring function definition and bash command.
* Merge branch 'multithreading'Mu Qiao2011-07-053-26/+72
|\
| * Merge remote branch 'betelgeuse/multithread' into multithreadingMu Qiao2011-07-053-26/+72
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/builtins/source_builtin.cpp src/core/bash_ast.cpp src/core/bash_ast.h utils/instruo.cpp
| | * Core: fix memory leakPetteri Räty2011-05-181-1/+9
| | | | | | | | | | | | | | | bash_ast::interpret_with was leaking memory when return_exception was thrown when interpreting.
| | * multithreadPetteri Räty2011-05-183-20/+59
| | |
* | | Walker: support ANSI-C QuotingMu Qiao2011-07-036-8/+25
| | |
* | | Builtin: support shift built-inMu Qiao2011-07-037-0/+193
| | |
* | | Core: fix headers that don't follow the coding styleMu Qiao2011-07-032-4/+4
| | |
* | | Doc: improve documentationMu Qiao2011-07-0316-109/+223
|/ / | | | | | | | | | | Now make doxygen-doc doesn't show so many warnings. The documentation for following things is not fixed: unit tests, private members, some built-in constructors.
* | Utility: improve token printingMu Qiao2011-06-262-2/+4
| | | | | | | | | | Now the ast_printer -t will print out the tokens if the file can be lexed properly (previously it required the file to be parsed properly).
* | Walker: make arithmetic expansion follow POSIXMu Qiao2011-06-268-44/+47
| | | | | | | | | | | | | | POSIX requires signed long integer for arithmetic expansion. $? is implemented in the interpreter class now because POSIX doesn't require the type of $? to be long. It would cause conversion in many places if we used long for $?.
* | Merge remote-tracking branch 'mu/fix_arithmetic'Petteri Räty2011-06-252-2/+24
|\ \
| * | Utility: support printing tokens received by walkerMu Qiao2011-06-222-2/+24
| | | | | | | | | | | | | | | It's helpful if ast_printer can print tokens received by walker grammar. Now this is supported with the -w option.
* | | Merge remote-tracking branch 'mu/break_builtin'Petteri Räty2011-06-255-7/+196
|\ \ \ | | | | | | | | | | | | | | | | Conflicts: src/builtins/builtin_exceptions.h
| * | | Builtin: implement break built-inMu Qiao2011-06-234-0/+157
| | | |
| * | | Core: abstract the role of continue exceptionMu Qiao2011-06-231-7/+39
| |/ /
* | | Builtin: make declare built-in throw exceptionsMu Qiao2011-06-222-34/+47
| | |
* | | Core: improve current exception usageMu Qiao2011-06-2221-123/+89
| | |
* | | Core: add more exceptionsMu Qiao2011-06-2217-10/+327
|/ / | | | | | | | | We don't want to use only one exception everywhere. Now more exceptions are added to improve the exception hierarchy.
* | Merge remote-tracking branch 'mu/bash_options' into reviewPetteri Räty2011-06-165-27/+79
|\ \ | | | | | | | | | | | | | | | | | | Conflicts: bashast/libbashWalker.g src/core/interpreter.cpp src/core/tests/interpreter_test.cpp
| * | Core: first support for bash optionsMu Qiao2011-06-133-0/+52
| | | | | | | | | | | | | | | This commit is intended to support $- so no method for changing bash options is added.
| * | Core: rename bash option to additional optionMu Qiao2011-06-135-27/+27
| | | | | | | | | | | | | | | The shopt built-in only changes additional shell optional behavior. So we change the name to avoid conflicts with the set built-in.
* | | Builtin: cache parsing failures in source built-inMu Qiao2011-06-161-4/+14
| | |
* | | Core: add namespace for interpreter_exceptionMu Qiao2011-06-1423-66/+69
|/ / | | | | | | | | The interpreter_exception is part of our public API so we put it under libbash namespace.
* | Builtin: support printf built-inMu Qiao2011-06-118-40/+218
| | | | | | | | | | Note that we use boost::format to implement printf so it's not completely the same as bash printf.