| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
The antlr generated sources are for 1.4 so add -source 1.4 to
AM_JAVACFLAGS to suppress warnings about unchecked or unsafe
operations.
|
|
|
|
|
| |
?(pattern-list), *(pattern-list), +(pattern-list), @(pattern-list)
are supported now.
|
| |
|
|
|
|
|
| |
With the help of dynamic regular expressions, we can easily build
bracket pattern with little manual parsing work.
|
|\
| |
| |
| |
| | |
Conflicts:
bashast/bashast.g
|
| | |
|
| |
| |
| |
| | |
Patterns like [a-z] and [!0-9] are supported.
|
| |
| |
| |
| | |
Patterns like [abc] and [!abc] are supported now.
|
| |
| |
| |
| |
| |
| | |
Inside the word rule, we used arithmetic rule to do variable
reference. But that requires the variable to be integer. Now it's
fixed by adding a variable reference alternative.
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
* and ? have different meanings in pattern matching. Now virtual
tokens are used to get a clear AST. The order of extended and
basic pattern matching is switched to make the '*' and '?'
correctly parsed.
|
| |
| |
| |
| |
| |
| | |
The token is used to describe bracket pattern matching expressions where
any of the atoms inside the brackets can match to MATCH_ANY is a more
descriptive name.
|
| |
| |
| |
| |
| |
| | |
Prefix tokens used in extended pattern matching with EXTENDED_ so it's
clear what tokens are related to extended pattern matching and normal
matching.
|
| |
| |
| |
| |
| |
| | |
Now the parser doesn't swallow white spaces from the replacement string
in variable expansion and they get reflected properly in the AST. Fixes
bug #364119.
|
|\ \
| |/
|/|
| |
| | |
Conflicts:
src/builtins/source_builtin.cpp
|
| |
| |
| |
| |
| |
| |
| | |
AST can be reused in order to improve the performance. Now we use
a static variable inside the source builtin to cache all the ASTs
created by the builtin. In future we may define rules to change the
internal behavior.
|
| |
| |
| |
| |
| |
| | |
With the help of instruo from Paludis, we can setup variables to
bash env needed for metadata generation. In the meanwhile, we can
compare the original instruo utility with our implementation.
|
| |
| |
| |
| |
| |
| | |
Instead of throw an exception, we should return 0 as bash does. The
exact bash implementation is a bit different so we need to
specialize boost::lexical_cast<int> in future.
|
|\ \
| | |
| | |
| | |
| | | |
Conflicts:
scripts/function_def.bash
|
| | | |
|
| |/ |
|
|/ |
|
|
|
|
| |
Some large methods are moved into cpp source file.
|
|
|
|
| |
&& and || operators are supported for command list.
|
|
|
|
|
| |
metadata_generator is improved to make use of the information added
by inherit builtin.
|
| |
|
|
|
|
|
| |
Empty variable values are all treated as null value. This simplifies
the previous code and fixes some logic errors.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Many builtins use the internal interpreter class so we add it to
the cppbash_builtin class.
|
|\ |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
Only a limited set of operation is supported for now: =, ==, !=,
\>, \<.
|
| |
| |
| |
| |
| | |
Virtual token is used instead of OP['..'] because the previous one
can't be handled by tree grammar.
|
| |
| |
| |
| |
| |
| | |
We don't have to use so many alternatives in cond_part because
fname will cover all that. Reserved word shouldn't be treated
specially.
|
| |
| |
| |
| |
| | |
The syntax for special variables is now supported. Only $? has a
runtime now.
|
| |
| |
| |
| | |
Syntax like for((expr1; expr2; expr3)) is supported now.
|
| |
| |
| |
| |
| | |
Syntax like "for x in blah" is supported now. Empty value used as
$@ is not supported for now. Add support for $? variable.
|
| |
| |
| |
| |
| |
| |
| | |
We used recursive counting algorithm to find the index of LT(2).
Now it's changed to recurrence algorithm that directly traverse the
input stream. This can benefit function definition and compound
command.
|
| |
| |
| |
| |
| | |
Word splitting wouldn't trim leading and trailing IFS characters.
Now it's fixed.
|
| | |
|
| |
| |
| |
| |
| | |
The metadata_generator now generates the same format as what
Portage does.
|
|/
|
|
|
|
| |
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.
|
|
|
|
|
| |
The massif and benchmark_parser make targets show that we benefit
greatly from turning on memoization.
|
|
|
|
|
| |
A simple command substitution is supported. Currently the commands
are executed within the current process.
|