| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
| |
These tokens would prevent the parser doing parameter expansions. Now
this is fixed.
|
|
|
|
| |
This makes ${a:-=} and ${a:+=} work properly.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Within arithmetic expressions digits can't be variables so doing
$((3=7)) is not valid. Now we don't allow digits to match variable names
in arithmetic. This also silences warnings.
|
| |
|
|
|
|
|
|
| |
Eclasses seem to be using a deprecated form of arithmetic expansion with
square brackets that bash does not document anywhere. This is now
supported by the parser.
|
|
|
|
|
| |
Our parser grammar didn't support arithmetic assignment inside
variable expansion like $((${foo[5]}=3)). Now it's supported.
|
|
|
|
|
| |
Parameter expansion happens before arithmetic expansion when it's
used in arithmetic expansion. So the AST is changed to reflect it.
|
|
|
|
|
| |
Array element reference and assignment in arithmetic expansion is
supported now.
|
|
|
|
|
| |
There's no need to list both alternatives as the first choice falls
through to the second any way.
|
|
|
|
|
|
|
| |
Things like double negation $((!!a)) were not supported. Fixing this
resulted in bubbled changes elsewhere. The main change is that we have
less specialized tokens so that we don't end up with special tokens in
wrong contexts.
|
| |
|
|
|
|
| |
A virtual token is added to avoid ambiguity.
|
|
|
|
|
| |
It would be easier for the walker to deal with arithmetic assignment if
the ARITH_ASSIGN is splitted into independent tokens.
|
|
|
|
|
|
|
| |
Having to manually keep the year and names updated in each source file
is prone to not remembering to keep it up to date. The same information
can be found from git so just refer people to that. In most places it's
not a requirement to explicitly state such things.
|
|
|
|
|
| |
Use the format according to
http://www.gnu.org/licenses/gpl-howto.html, unify indentation.
|
|
|
|
|
| |
Arithmetic operations are implemented. A slight change is made to
grammar to avoid ambiguity.
|
|
|
|
|
|
|
|
| |
Adds a virtual token to differentiate between quoted and non-quoted strings.
This will be useful for programs like repoman that will use the tree directly.
examples:
"abc" -> (STRING (DOUBLE_QUOTED_STRING abc))
'abc'123 -> (STRING (SINGLE_QUOTED_STRING abc) 123)
|
|
|
|
|
| |
Parser now supports arithmetic expansion using the $(( )) construct.
Within the (( )) construct, variable names no longer need a $ to reference.
|
|
|
|
|
| |
Adds support for the following arithmetic constructs:
Arithmetic assignment, arithmetic conditionals, and the comma operator.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The bashast grammar no longer relies on Java specific constructs and names.
In order to use with other languages, the "language=" line must be changed.
Also, the "ASTLabelType=" line must be changed for languages other than Java.
These changes will be made by the build system for the project.
Token aggregation in parser rules has been removed.
Now, parts of aggregated tokens are grouped under new virtual tokens.
This removes the problems with the $label.text addition in C.
Some rule names conflicted with preexisiting functions or keywords in C.
These rules (exp, bitand, bitor, bitxor) have been renamed:
exponential, bitwiseand, bitwiseor, bitwisexor.
|
|
Incorporates arithmetic expansion, conditional statements, parameters into AST.
Moves redirect operator tokens to parser rules to avoid conflicts.
Implements unit tests for new functionality of main AST grammar.
Grammars for fragment ASTs needed to be rewritten to fit with current grammar.
As such, some changes have been made:
* AST for arithmetic expansion has been simplified, removing virt. tokens.
* New virtual token: LIST_EXPAND for var_exp, avoid ambiguity
NOTE: Because of conflicts, comments must be preceded with a space or EOL.
As such, a comment can no longer be the first line in a program.
A blank line may be the first line, thus allowing a comment first.
|