-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes since 5.4.6: * Allow conditionals of the form "${var1}" == "${var2}" * Check for indentation of .include directives * Check arbitrarily complex license conditions * General code cleanup
- Loading branch information
Showing
30 changed files
with
1,363 additions
and
1,268 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
%{ | ||
package main | ||
%} | ||
|
||
%token <Node> ltNAME | ||
%token ltAND ltOR ltOPEN ltCLOSE | ||
|
||
%union { | ||
Node *LicenseCondition | ||
} | ||
|
||
%type <Node> start list condition | ||
|
||
%% | ||
|
||
start : list { | ||
liyylex.(*licenseLexer).result = $$ | ||
} | ||
|
||
list : condition { | ||
$$ = $1 | ||
} | ||
list : list ltAND condition { | ||
$$.And = append($$.And, $3) | ||
} | ||
list : list ltOR condition { | ||
$$.Or = append($$.Or, $3) | ||
} | ||
|
||
condition : ltNAME { | ||
$$ = $1 | ||
} | ||
condition : ltOPEN list ltCLOSE { | ||
$$ = &LicenseCondition{Main: $2} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.