Skip to content

Commit

Permalink
Add FSL as language
Browse files Browse the repository at this point in the history
  • Loading branch information
boyter committed Oct 12, 2022
1 parent f33653e commit fff7a11
Show file tree
Hide file tree
Showing 6 changed files with 193 additions and 18 deletions.
1 change: 1 addition & 0 deletions LANGUAGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ FORTRAN Legacy (f,for,ftn,f77,pfo)
FORTRAN Modern (f03,f08,f90,f95)
Fragment Shader File (fsh)
Freemarker Template (ftl)
FSL (fsl)
Futhark (fut)
FXML (fxml)
Game Maker Language (gml)
Expand Down
41 changes: 25 additions & 16 deletions SCC-OUTPUT-REPORT.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<th>443</th>
<th>7286</th>
<th>1506</th>
<th>371497</th>
<th>371753</th>
</tr><tr>
<th>Java</th>
<th>24</th>
Expand All @@ -39,12 +39,12 @@
</tr><tr>
<th>Markdown</th>
<th>11</th>
<th>1422</th>
<th>337</th>
<th>1429</th>
<th>340</th>
<th>0</th>
<th>1085</th>
<th>1089</th>
<th>0</th>
<th>57744</th>
<th>57872</th>
</tr><tr>
<th>Python</th>
<th>10</th>
Expand Down Expand Up @@ -98,7 +98,7 @@
<th>91</th>
<th>917</th>
<th>104</th>
<th>41359</th>
<th>41366</th>
</tr><tr>
<th>C#</th>
<th>2</th>
Expand Down Expand Up @@ -342,6 +342,15 @@
<th>3</th>
<th>1</th>
<th>55</th>
</tr><tr>
<th>FSL</th>
<th>1</th>
<th>151</th>
<th>36</th>
<th>1</th>
<th>114</th>
<th>33</th>
<th>5377</th>
</tr><tr>
<th>FXML</th>
<th>1</th>
Expand Down Expand Up @@ -417,12 +426,12 @@
</tr><tr>
<th>JSON</th>
<th>1</th>
<th>8020</th>
<th>8034</th>
<th>0</th>
<th>0</th>
<th>8020</th>
<th>8034</th>
<th>0</th>
<th>112353</th>
<th>112543</th>
</tr><tr>
<th>Korn Shell</th>
<th>1</th>
Expand Down Expand Up @@ -660,12 +669,12 @@
</tr></tbody>
<tfoot><tr>
<th>Total</th>
<th>185</th>
<th>29884</th>
<th>3338</th>
<th>1930</th>
<th>24616</th>
<th>2629</th>
<th>1906522</th>
<th>186</th>
<th>30056</th>
<th>3377</th>
<th>1931</th>
<th>24748</th>
<th>2662</th>
<th>1912480</th>
</tr></tfoot>
</table></body></html>
151 changes: 151 additions & 0 deletions examples/language/fsl.fsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
machine_name : "Should you use twitter?";
machine_author : "MachinShin ";
machine_license : MIT;
machine_comment : "#madewithfsl";
machine_language : en;
machine_version : 1.0.0;
fsl_version : 1.0.0;

start_states : [Start];

end_states : [
"You can keep your Twitter account"
"Get off Twitter and seek help"
"Sorry Twitter just isn't for you"
"Get off Twitter"
"Maybe you should stick to Facebook"
];

Start -> "Is your Twitter for personal or business use?";
"Is your Twitter for personal or business use?" 'Personal'
-> "Do you have a habit of revealing intimate personal details?";
"Is your Twitter for personal or business use?" 'Business'
-> "Are you using Twitter to communicate\n with customers and send brand updates?";
"Is your Twitter for personal or business use?" 'My business is personal'
-> "Do you distinguish your business account\n from your personal account?";

"Do you have a habit of revealing intimate personal details?" 'No, I have a pretty good ability to self control'
-> "Are a majority of your tweets interesting,\n funny, or thought-provoking?";

"Do you have a habit of revealing intimate personal details?" 'Only when I have had a little took much to drink'
-> "Does your boss follow you?";

"Does your boss follow you?" 'Yes'
-> "Get off Twitter";
"Does your boss follow you?" 'No'
-> "Are you just using Twitter to stalk celebrites?" -> "Get off Twitter and seek help";

"Are a majority of your tweets interesting,\n funny, or thought-provoking?" 'No, they are mostly pics of my lunch or my cat'
-> "Are you a celebrity";

"Are a majority of your tweets interesting,\n funny, or thought-provoking?" 'Yes'
-> "Are you capable of keeping your insights\n to 140 characters or fewer?";

"Are you a celebrity" 'No'
-> "Maybe you should stick to Facebook";
"Are you a celebrity" 'Yes'
-> "You can keep your Twitter account";

"Do you distinguish your business account\n from your personal account?" 'No, of course not'
-> "Get off Twitter";

"Do you distinguish your business account\n from your personal account?" 'Yes'
-> "Are you using Twitter to communicate\n with customers and send brand updates?";

"Are you using Twitter to communicate\n with customers and send brand updates?" 'No, not exactly'
-> "You understand what Twitter is, right?";

"Are you using Twitter to communicate\n with customers and send brand updates?" 'Yes'
-> "Do a majority of your clients or customers remember the good old days of the Coolidge Administration?";

"Do a majority of your clients or customers remember the good old days of the Coolidge Administration?" 'No'
-> "How often do you tweet?";

"Do a majority of your clients or customers remember the good old days of the Coolidge Administration?" 'Yes, and their first zeppelin ride'
-> "Sorry Twitter just isn't for you";

"You can keep your Twitter account" <-
'Yes' "Do you like to know what is going on in the world\n 5-6 minutes before any world news outlet?";
"You can keep your Twitter account" <- 'Yes' "Are a majority of your tweets\n related to your business or industry?";

"Do you like to know what is going on in the world\n 5-6 minutes before any world news outlet?" 'No'
-> "Sorry Twitter just isn't for you";
"Are a majority of your tweets related\n to your business or industry?" 'No'
-> "Sorry Twitter just isn't for you";

"Do you only keep your twitter account\n for the rush you feel when your tweet is retweeted?" 'Yes'
-> "Really?";

"Really?" 'Yes'
-> "Get off Twitter and seek help";
"Really?" 'No'
-> "Do you only keep your twitter account\n for the rush you feel when your tweet is retweeted?";

"Are you capable of keeping your insights\n to 140 characters or fewer?"
-> "Do you only keep your twitter account\n for the rush you feel when your tweet is retweeted?";


"Get off Twitter" <- 'Yeah you caught me' "Wait - Are you spam or a bot?";
"Wait - Are you spam or a bot?" 'No' -> "How often do you tweet?";
"Wait - Are you spam or a bot?" <- 'Yes' "You understand what Twitter is, right?";

"How often do you tweet?" 'Hardly ever'
-> "Are you just using Twitter to stalk celebrites?";
"How often do you tweet?" '15 times a month'
-> "Do you only keep your twitter account\n for the rush you feel when your tweet is retweeted?";
"How often do you tweet?" 'Almost everyday'
-> "Are a majority of your tweets\n related to your business or industry?";



//css for states

state "Really?": {
shape: octagon;
background-color: black;
text-color: white;
};

state "Maybe you should stick to Facebook": {
shape: octagon;
background-color: skyblue;
text-color: white;
};


state "Get off Twitter": {
shape: octagon;
background-color: skyblue;
text-color: white;
};


state "Get off Twitter and seek help": {
shape: octagon;
background-color: skyblue;
text-color: white;
};

state "You can keep your Twitter account": {
shape: octagon;
background-color: skyblue;
text-color: white;
};

state "Sorry Twitter just isn't for you": {
shape: octagon;
background-color: skyblue;
text-color: white;
};

state "Does your boss follow you?" : {
shape: octagon;
background-color: yellow;
};

state Start : {
background-color : limegreen;
text-color : white;
shape : octagon;
linestyle : dashed;
};
14 changes: 14 additions & 0 deletions languages.json
Original file line number Diff line number Diff line change
Expand Up @@ -2455,6 +2455,20 @@
],
"quotes": []
},
"FSL": {
"complexitychecks": [
"->",
"<-"
],
"extensions": [
"fsl"
],
"line_comment": [
"//"
],
"multi_line": [],
"quotes": []
},
"Futhark": {
"complexitychecks": [
"if ",
Expand Down
2 changes: 1 addition & 1 deletion processor/constants.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion test-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@ else
fi

# Try out specific languages
for i in 'Bosque ' 'Flow9 ' 'Bitbucket Pipeline ' 'Docker ignore ' 'Q# ' 'Futhark ' 'Alloy ' 'Wren ' 'Monkey C ' 'Alchemist ' 'Luna ' 'ignore ' 'XML Schema ' 'Web Services' 'Go ' 'Java ' 'Boo ' 'License ' 'BASH ' 'C Shell ' 'Korn Shell ' 'Makefile ' 'Shell ' 'Zsh ' 'Rakefile ' 'Gemfile ' 'Dockerfile ' 'Yarn ' 'Sieve ' 'F# ' 'Elm ' 'Terraform ' 'Clojure ' 'C# ' 'LLVM IR ' 'HAML ' 'FXML ' 'DM ' 'Nushell ' 'Racket ' 'DOT ' 'YAML ' 'Teal '
for i in 'Bosque ' 'Flow9 ' 'Bitbucket Pipeline ' 'Docker ignore ' 'Q# ' 'Futhark ' 'Alloy ' 'Wren ' 'Monkey C ' 'Alchemist ' 'Luna ' 'ignore ' 'XML Schema ' 'Web Services' 'Go ' 'Java ' 'Boo ' 'License ' 'BASH ' 'C Shell ' 'Korn Shell ' 'Makefile ' 'Shell ' 'Zsh ' 'Rakefile ' 'Gemfile ' 'Dockerfile ' 'Yarn ' 'Sieve ' 'F# ' 'Elm ' 'Terraform ' 'Clojure ' 'C# ' 'LLVM IR ' 'HAML ' 'FXML ' 'DM ' 'Nushell ' 'Racket ' 'DOT ' 'YAML ' 'Teal ' 'FSL '
do
if ./scc "examples/language/" | grep -q "$i "; then
echo -e "${GREEN}PASSED $i Language Check"
Expand Down

0 comments on commit fff7a11

Please sign in to comment.