| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
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".
|
|
|
|
|
|
| |
Now only '>' is supported because there would be a lot of conflicts if
we want to fully support this. Also the operator other than '>' doesn't
make sense.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Now several tests are not working: var_expansion.bash,
isolated_functions.bash, compound_command.bash, test_expr.bash,
test/ast_printer_test.sh, and test/verify_bashs_test.sh. We will fix
them in later commits.
|
|
|
|
|
|
|
|
| |
Inside command substitution, many characters are allowed. For example,
MY_PV="$(replace_version_separator 1 '')" will reserve the single quotes
for command substitution. Now we support this by handling command
substitution in the lexer rules and call back to parser in walker
grammar.
|
|
|
|
|
| |
We keep the old style for some tests that behave differently depending
on different bash versions.
|
|
|
|
|
| |
Backtracking is reduced by left refactoring function definition and bash
command.
|
|
|
|
|
| |
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).
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
Makefile.am
bashast/features_script/features.sh.ast
bashast/gunit/simp_command.gunit
scripts/command_execution.bash
test/verify_error_output_test.sh
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
Currently the grammar doesn't allow any white space between the command
and the here document due to backtracking.
|
| | |
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | | |
It's helpful if ast_printer can print tokens received by walker grammar.
Now this is supported with the -w option.
|
| | | |
|
|/ /
| |
| |
| |
| | |
We only support brace expansion in raw string for now. Other cases
will cause an interpreter_exception.
|
| |
| |
| |
| |
| |
| | |
The file now needs to be changes less often as it doesn't depend on
exact line numbers any more. This should make it easier to merge
branches.
|
|/ |
|
|
|
|
|
| |
The interpreter_exception is part of our public API so we put it under
libbash namespace.
|
|
|
|
|
|
|
| |
Bash allows redirection to appear after any kind of command including
compound command. Now the parser grammar is changed to reflect this.
Note that we do not support redirection for commands other than
simple built-in execution so the walker grammar is not changed.
|
|
|
|
|
| |
* is removed from var_name as most expansions don't support it. Parser
grammar is adjusted to generate better AST.
|
| |
|
|
|
|
|
|
| |
For a non-interactive shell, an error condition encountered by a special
built-in or other type of utility shall cause the shell to write a
diagnostic message to standard error and exit.
|
|
|
|
|
| |
The author information can be found from git so just refer people
from that.
|
| |
|
| |
|
| |
|
|
|
|
| |
verify_bash_test.sh uses bash syntax so it must be run with bash.
|
|
|
|
|
| |
Now the script name, line number and char position will be printed
out when error occurs. This improvement doesn't cover all cases.
|
| |
|
| |
|
|
|
|
|
|
| |
Now instead of compiling everything as C++ the lexer and parser are
compiled as C. This means that user supplied CFLAGS are not used for c++
code and the compiler can probably do a better job.
|
|
|
|
|
| |
The public API, ast_printer and bash_ast are refactored to return
non zero exit status on failure.
|
|
|
|
|
| |
NULL is not allowed to initialize a string object. A common
helper function is created to solve the problem.
|
|
|
|
|
| |
metadata_generator is improved to make use of the information added
by inherit builtin.
|
|
|
|
|
|
| |
We don't share interpreter object and it's safer to use reference
rather than shared_ptr. Raw pointer is used in the generated C
source code.
|
|\ |
|
| |
| |
| |
| |
| | |
The syntax for special variables is now supported. Only $? has a
runtime now.
|
|/
|
|
|
|
| |
We need to retrieve names of defined functions in order to generate
DEFINED_PHASES. The public API is modified a bit to support it. A
custom test is added for metadata generation.
|
|
|
|
|
|
| |
The suffix is not proper when we want to distinguish normal shell
scripts from ebuilds. So we rename these tests to make it possible
to use metadata_generator as the compiler for *.ebuild.
|
|
|
|
|
|
| |
${parameter#word}, ${parameter##word}, ${parameter%word},
${parameter%%word} are supported for raw string. We haven't
provided any advanced pattern matching yet.
|
| |
|
|\
| |
| |
| |
| | |
Conflicts:
src/core/interpreter.h
|
| |
| |
| |
| |
| |
| |
| |
| | |
Syntax like ${array[@]} and ${array[*]} is supported now. Currently
the only difference between the two is when they are used in a
double quoted string, ${array[*]} will use the first character of
IFS as delimiter rather than space. Rename some variables in test
script for better ordering.
|
| |
| |
| |
| | |
An interpreter_exception will be thrown if index is less than 0.
|
| |
| |
| |
| | |
Syntax like 'a=' and 'a[1]=' is supported now.
|
|/
|
|
|
|
| |
With help from #boost migrated the custom parsing code to use qi. The
grammar was adjusted to have UNDERSCORE token to avoid the token file
having two entries for the same name.
|